valaxy 0.20.1 → 0.20.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/components/ValaxyFootnoteTooltip.vue +12 -15
- package/client/composables/index.ts +1 -0
- package/client/composables/search/fuse.ts +57 -0
- package/client/composables/search/index.ts +1 -0
- package/client/modules/floating-vue.ts +3 -9
- package/client/stores/app.ts +11 -2
- package/dist/chunk-3BOTWUWT.cjs +161 -0
- package/dist/chunk-YHBMYDF7.mjs +162 -0
- package/dist/{config-DRImYfNf.d.cts → config-DfXD9Gt_.d.cts} +32 -4
- package/dist/{config-DRImYfNf.d.ts → config-DfXD9Gt_.d.ts} +32 -4
- 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 +73 -11
- package/dist/node/index.d.ts +73 -11
- 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 +23 -21
- package/types/config.ts +31 -3
- package/types/node.ts +1 -1
- package/dist/chunk-G54Q6VIZ.mjs +0 -157
- package/dist/chunk-SHLDAAJY.cjs +0 -156
- /package/dist/{chunk-SWO32WYT.cjs → chunk-7EKNBB3E.cjs} +0 -0
- /package/dist/{chunk-FRSA4VPQ.mjs → chunk-AUDFAOQV.mjs} +0 -0
package/dist/chunk-G54Q6VIZ.mjs
DELETED
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
|
|
2
|
-
import{a as K,b as C,c as Q,d as l}from"./chunk-FRSA4VPQ.mjs";var ee=C((Xx,Zr)=>{"use strict";l();var Yt=process||{},_i=Yt.argv||[],zt=Yt.env||{},Wu=!(zt.NO_COLOR||_i.includes("--no-color"))&&(!!zt.FORCE_COLOR||_i.includes("--color")||Yt.platform==="win32"||(Yt.stdout||{}).isTTY&&zt.TERM!=="dumb"||!!zt.CI),Gu=(e,t,r=e)=>n=>{let o=""+n,i=o.indexOf(t,e.length);return~i?e+Ku(o,t,r,i)+t:e+o+t},Ku=(e,t,r,n)=>{let o="",i=0;do o+=e.substring(i,n)+r,i=n+t.length,n=e.indexOf(t,i);while(~n);return o+e.substring(i)},bi=(e=Wu)=>{let t=e?Gu:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};Zr.exports=bi();Zr.exports.createColors=bi});var Ri=C(st=>{"use strict";l();Object.defineProperty(st,"__esModule",{value:!0});st.splitWhen=st.flatten=void 0;function zu(e){return e.reduce((t,r)=>[].concat(t,r),[])}st.flatten=zu;function Yu(e,t){let r=[[]],n=0;for(let o of e)t(o)?(n++,r[n]=[]):r[n].push(o);return r}st.splitWhen=Yu});var Ci=C(Xt=>{"use strict";l();Object.defineProperty(Xt,"__esModule",{value:!0});Xt.isEnoentCodeError=void 0;function Xu(e){return e.code==="ENOENT"}Xt.isEnoentCodeError=Xu});var Si=C(Qt=>{"use strict";l();Object.defineProperty(Qt,"__esModule",{value:!0});Qt.createDirentFromStats=void 0;var en=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 Qu(e,t){return new en(e,t)}Qt.createDirentFromStats=Qu});var Pi=C(Y=>{"use strict";l();Object.defineProperty(Y,"__esModule",{value:!0});Y.convertPosixPathToPattern=Y.convertWindowsPathToPattern=Y.convertPathToPattern=Y.escapePosixPath=Y.escapeWindowsPath=Y.escape=Y.removeLeadingDotSegment=Y.makeAbsolute=Y.unixify=void 0;var Ju=K("os"),Zu=K("path"),wi=Ju.platform()==="win32",ef=2,tf=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,rf=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,nf=/^\\\\([.?])/,of=/\\(?![!()+@[\]{}])/g;function sf(e){return e.replace(/\\/g,"/")}Y.unixify=sf;function af(e,t){return Zu.resolve(e,t)}Y.makeAbsolute=af;function lf(e){if(e.charAt(0)==="."){let t=e.charAt(1);if(t==="/"||t==="\\")return e.slice(ef)}return e}Y.removeLeadingDotSegment=lf;Y.escape=wi?tn:rn;function tn(e){return e.replace(rf,"\\$2")}Y.escapeWindowsPath=tn;function rn(e){return e.replace(tf,"\\$2")}Y.escapePosixPath=rn;Y.convertPathToPattern=wi?Ei:Ai;function Ei(e){return tn(e).replace(nf,"//$1").replace(of,"/")}Y.convertWindowsPathToPattern=Ei;function Ai(e){return rn(e)}Y.convertPosixPathToPattern=Ai});var Oi=C((sv,ki)=>{"use strict";l();ki.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 Vi=C((lv,$i)=>{"use strict";l();var cf=Oi(),Ti={"{":"}","(":")","[":"]"},uf=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 c=Ti[a];if(c){var u=e.indexOf(c,t);u!==-1&&(t=u+1)}if(e[t]==="!")return!0}else t++}return!1},ff=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=Ti[r];if(n){var o=e.indexOf(n,t);o!==-1&&(t=o+1)}if(e[t]==="!")return!0}else t++}return!1};$i.exports=function(t,r){if(typeof t!="string"||t==="")return!1;if(cf(t))return!0;var n=uf;return r&&r.strict===!1&&(n=ff),n(t)}});var Mi=C((uv,Li)=>{"use strict";l();var pf=Vi(),mf=K("path").posix.dirname,df=K("os").platform()==="win32",nn="/",gf=/\\/g,hf=/[\{\[].*[\}\]]$/,yf=/(^|[^\\])([\{\[]|\([^\)]+$)/,xf=/\\([\!\*\?\|\[\]\(\)\{\}])/g;Li.exports=function(t,r){var n=Object.assign({flipBackslashes:!0},r);n.flipBackslashes&&df&&t.indexOf(nn)<0&&(t=t.replace(gf,nn)),hf.test(t)&&(t+=nn),t+="a";do t=mf(t);while(pf(t)||yf.test(t));return t.replace(xf,"$1")}});var Jt=C(ce=>{"use strict";l();ce.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;ce.find=(e,t)=>e.nodes.find(r=>r.type===t);ce.exceedsLimit=(e,t,r=1,n)=>n===!1||!ce.isInteger(e)||!ce.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=n;ce.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)};ce.encloseBrace=e=>e.type!=="brace"||e.commas>>0+e.ranges>>0?!1:(e.invalid=!0,!0);ce.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;ce.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;ce.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);ce.flatten=(...e)=>{let t=[],r=n=>{for(let o=0;o<n.length;o++){let i=n[o];if(Array.isArray(i)){r(i);continue}i!==void 0&&t.push(i)}return t};return r(e),t}});var Zt=C((dv,Ni)=>{"use strict";l();var Ii=Jt();Ni.exports=(e,t={})=>{let r=(n,o={})=>{let i=t.escapeInvalid&&Ii.isInvalidBrace(o),s=n.invalid===!0&&t.escapeInvalid===!0,a="";if(n.value)return(i||s)&&Ii.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let c of n.nodes)a+=r(c);return a};return r(e)}});var Di=C((hv,Fi)=>{"use strict";l();Fi.exports=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var zi=C((xv,Ki)=>{"use strict";l();var Hi=Di(),Xe=(e,t,r)=>{if(Hi(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(Hi(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),c=e+":"+t+"="+o+i+s+a;if(Xe.cache.hasOwnProperty(c))return Xe.cache[c].result;let u=Math.min(e,t),f=Math.max(e,t);if(Math.abs(u-f)===1){let v=e+"|"+t;return n.capture?`(${v})`:n.wrap===!1?v:`(?:${v})`}let m=Gi(e)||Gi(t),p={min:e,max:t,a:u,b:f},y=[],h=[];if(m&&(p.isPadded=m,p.maxLen=String(p.max).length),u<0){let v=f<0?Math.abs(f):1;h=ji(v,Math.abs(u),p,n),u=p.a=0}return f>=0&&(y=ji(u,f,p,n)),p.negatives=h,p.positives=y,p.result=vf(h,y,n),n.capture===!0?p.result=`(${p.result})`:n.wrap!==!1&&y.length+h.length>1&&(p.result=`(?:${p.result})`),Xe.cache[c]=p,p.result};function vf(e,t,r){let n=on(e,t,"-",!1,r)||[],o=on(t,e,"",!1,r)||[],i=on(e,t,"-?",!0,r)||[];return n.concat(i).concat(o).join("|")}function _f(e,t){let r=1,n=1,o=qi(e,r),i=new Set([t]);for(;e<=o&&o<=t;)i.add(o),r+=1,o=qi(e,r);for(o=Ui(t+1,n)-1;e<o&&o<=t;)i.add(o),n+=1,o=Ui(t+1,n)-1;return i=[...i],i.sort(Cf),i}function bf(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let n=Rf(e,t),o=n.length,i="",s=0;for(let a=0;a<o;a++){let[c,u]=n[a];c===u?i+=c:c!=="0"||u!=="9"?i+=Sf(c,u,r):s++}return s&&(i+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:i,count:[s],digits:o}}function ji(e,t,r,n){let o=_f(e,t),i=[],s=e,a;for(let c=0;c<o.length;c++){let u=o[c],f=bf(String(s),String(u),n),m="";if(!r.isPadded&&a&&a.pattern===f.pattern){a.count.length>1&&a.count.pop(),a.count.push(f.count[0]),a.string=a.pattern+Wi(a.count),s=u+1;continue}r.isPadded&&(m=wf(u,r,n)),f.string=m+f.pattern+Wi(f.count),i.push(f),s=u+1,a=f}return i}function on(e,t,r,n,o){let i=[];for(let s of e){let{string:a}=s;!n&&!Bi(t,"string",a)&&i.push(r+a),n&&Bi(t,"string",a)&&i.push(r+a)}return i}function Rf(e,t){let r=[];for(let n=0;n<e.length;n++)r.push([e[n],t[n]]);return r}function Cf(e,t){return e>t?1:t>e?-1:0}function Bi(e,t,r){return e.some(n=>n[t]===r)}function qi(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function Ui(e,t){return e-e%Math.pow(10,t)}function Wi(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function Sf(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function Gi(e){return/^-?(0+)\d/.test(e)}function wf(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}}`}}Xe.cache={};Xe.clearCache=()=>Xe.cache={};Ki.exports=Xe});var ln=C((_v,ts)=>{"use strict";l();var Ef=K("util"),Xi=zi(),Yi=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),Af=e=>t=>e===!0?Number(t):String(t),sn=e=>typeof e=="number"||typeof e=="string"&&e!=="",wt=e=>Number.isInteger(+e),an=e=>{let t=`${e}`,r=-1;if(t[0]==="-"&&(t=t.slice(1)),t==="0")return!1;for(;t[++r]==="0";);return r>0},Pf=(e,t,r)=>typeof e=="string"||typeof t=="string"?!0:r.stringify===!0,kf=(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},tr=(e,t)=>{let r=e[0]==="-"?"-":"";for(r&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return r?"-"+e:e},Of=(e,t,r)=>{e.negatives.sort((a,c)=>a<c?-1:a>c?1:0),e.positives.sort((a,c)=>a<c?-1:a>c?1:0);let n=t.capture?"":"?:",o="",i="",s;return e.positives.length&&(o=e.positives.map(a=>tr(String(a),r)).join("|")),e.negatives.length&&(i=`-(${n}${e.negatives.map(a=>tr(String(a),r)).join("|")})`),o&&i?s=`${o}|${i}`:s=o||i,t.wrap?`(${n}${s})`:s},Qi=(e,t,r,n)=>{if(r)return Xi(e,t,{wrap:!1,...n});let o=String.fromCharCode(e);if(e===t)return o;let i=String.fromCharCode(t);return`[${o}-${i}]`},Ji=(e,t,r)=>{if(Array.isArray(e)){let n=r.wrap===!0,o=r.capture?"":"?:";return n?`(${o}${e.join("|")})`:e.join("|")}return Xi(e,t,r)},Zi=(...e)=>new RangeError("Invalid range arguments: "+Ef.inspect(...e)),es=(e,t,r)=>{if(r.strictRanges===!0)throw Zi([e,t]);return[]},Tf=(e,t)=>{if(t.strictRanges===!0)throw new TypeError(`Expected step "${e}" to be a number`);return[]},$f=(e,t,r=1,n={})=>{let o=Number(e),i=Number(t);if(!Number.isInteger(o)||!Number.isInteger(i)){if(n.strictRanges===!0)throw Zi([e,t]);return[]}o===0&&(o=0),i===0&&(i=0);let s=o>i,a=String(e),c=String(t),u=String(r);r=Math.max(Math.abs(r),1);let f=an(a)||an(c)||an(u),m=f?Math.max(a.length,c.length,u.length):0,p=f===!1&&Pf(e,t,n)===!1,y=n.transform||Af(p);if(n.toRegex&&r===1)return Qi(tr(e,m),tr(t,m),!0,n);let h={negatives:[],positives:[]},v=$=>h[$<0?"negatives":"positives"].push(Math.abs($)),k=[],w=0;for(;s?o>=i:o<=i;)n.toRegex===!0&&r>1?v(o):k.push(kf(y(o,w),m,p)),o=s?o-r:o+r,w++;return n.toRegex===!0?r>1?Of(h,n,m):Ji(k,null,{wrap:!1,...n}):k},Vf=(e,t,r=1,n={})=>{if(!wt(e)&&e.length>1||!wt(t)&&t.length>1)return es(e,t,n);let o=n.transform||(p=>String.fromCharCode(p)),i=`${e}`.charCodeAt(0),s=`${t}`.charCodeAt(0),a=i>s,c=Math.min(i,s),u=Math.max(i,s);if(n.toRegex&&r===1)return Qi(c,u,!1,n);let f=[],m=0;for(;a?i>=s:i<=s;)f.push(o(i,m)),i=a?i-r:i+r,m++;return n.toRegex===!0?Ji(f,null,{wrap:!1,options:n}):f},er=(e,t,r,n={})=>{if(t==null&&sn(e))return[e];if(!sn(e)||!sn(t))return es(e,t,n);if(typeof r=="function")return er(e,t,1,{transform:r});if(Yi(r))return er(e,t,0,r);let o={...n};return o.capture===!0&&(o.wrap=!0),r=r||o.step||1,wt(r)?wt(e)&&wt(t)?$f(e,t,r,o):Vf(e,t,Math.max(Math.abs(r),1),o):r!=null&&!Yi(r)?Tf(r,o):er(e,t,1,r)};ts.exports=er});var os=C((Rv,ns)=>{"use strict";l();var Lf=ln(),rs=Jt(),Mf=(e,t={})=>{let r=(n,o={})=>{let i=rs.isInvalidBrace(o),s=n.invalid===!0&&t.escapeInvalid===!0,a=i===!0||s===!0,c=t.escapeInvalid===!0?"\\":"",u="";if(n.isOpen===!0)return c+n.value;if(n.isClose===!0)return console.log("node.isClose",c,n.value),c+n.value;if(n.type==="open")return a?c+n.value:"(";if(n.type==="close")return a?c+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 f=rs.reduce(n.nodes),m=Lf(...f,{...t,wrap:!1,toRegex:!0,strictZeros:!0});if(m.length!==0)return f.length>1&&m.length>1?`(${m})`:m}if(n.nodes)for(let f of n.nodes)u+=r(f,n);return u};return r(e)};ns.exports=Mf});var as=C((Sv,ss)=>{"use strict";l();var If=ln(),is=Zt(),at=Jt(),Qe=(e="",t="",r=!1)=>{let n=[];if(e=[].concat(e),t=[].concat(t),!t.length)return e;if(!e.length)return r?at.flatten(t).map(o=>`{${o}}`):t;for(let o of e)if(Array.isArray(o))for(let i of o)n.push(Qe(i,t,r));else for(let i of t)r===!0&&typeof i=="string"&&(i=`{${i}}`),n.push(Array.isArray(i)?Qe(o,i,r):o+i);return at.flatten(n)},Nf=(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(Qe(a.pop(),is(o,t)));return}if(o.type==="brace"&&o.invalid!==!0&&o.nodes.length===2){a.push(Qe(a.pop(),["{}"]));return}if(o.nodes&&o.ranges>0){let m=at.reduce(o.nodes);if(at.exceedsLimit(...m,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let p=If(...m,t);p.length===0&&(p=is(o,t)),a.push(Qe(a.pop(),p)),o.nodes=[];return}let c=at.encloseBrace(o),u=o.queue,f=o;for(;f.type!=="brace"&&f.type!=="root"&&f.parent;)f=f.parent,u=f.queue;for(let m=0;m<o.nodes.length;m++){let p=o.nodes[m];if(p.type==="comma"&&o.type==="brace"){m===1&&u.push(""),u.push("");continue}if(p.type==="close"){a.push(Qe(a.pop(),u,c));continue}if(p.value&&p.type!=="open"){u.push(Qe(u.pop(),p.value));continue}p.nodes&&n(p,o)}return u};return at.flatten(n(e))};ss.exports=Nf});var cs=C((Ev,ls)=>{"use strict";l();ls.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
|
|
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 ds=C((Pv,ms)=>{"use strict";l();var Ff=Zt(),{MAX_LENGTH:us,CHAR_BACKSLASH:cn,CHAR_BACKTICK:Df,CHAR_COMMA:Hf,CHAR_DOT:jf,CHAR_LEFT_PARENTHESES:Bf,CHAR_RIGHT_PARENTHESES:qf,CHAR_LEFT_CURLY_BRACE:Uf,CHAR_RIGHT_CURLY_BRACE:Wf,CHAR_LEFT_SQUARE_BRACKET:fs,CHAR_RIGHT_SQUARE_BRACKET:ps,CHAR_DOUBLE_QUOTE:Gf,CHAR_SINGLE_QUOTE:Kf,CHAR_NO_BREAK_SPACE:zf,CHAR_ZERO_WIDTH_NOBREAK_SPACE:Yf}=cs(),Xf=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="number"?Math.min(us,r.maxLength):us;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,c=0,u=e.length,f=0,m=0,p,y=()=>e[f++],h=v=>{if(v.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&v.type==="text"){a.value+=v.value;return}return s.nodes.push(v),v.parent=s,v.prev=a,a=v,v};for(h({type:"bos"});f<u;)if(s=i[i.length-1],p=y(),!(p===Yf||p===zf)){if(p===cn){h({type:"text",value:(t.keepEscaping?p:"")+y()});continue}if(p===ps){h({type:"text",value:"\\"+p});continue}if(p===fs){c++;let v;for(;f<u&&(v=y());){if(p+=v,v===fs){c++;continue}if(v===cn){p+=y();continue}if(v===ps&&(c--,c===0))break}h({type:"text",value:p});continue}if(p===Bf){s=h({type:"paren",nodes:[]}),i.push(s),h({type:"text",value:p});continue}if(p===qf){if(s.type!=="paren"){h({type:"text",value:p});continue}s=i.pop(),h({type:"text",value:p}),s=i[i.length-1];continue}if(p===Gf||p===Kf||p===Df){let v=p,k;for(t.keepQuotes!==!0&&(p="");f<u&&(k=y());){if(k===cn){p+=k+y();continue}if(k===v){t.keepQuotes===!0&&(p+=k);break}p+=k}h({type:"text",value:p});continue}if(p===Uf){m++;let k={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||s.dollar===!0,depth:m,commas:0,ranges:0,nodes:[]};s=h(k),i.push(s),h({type:"open",value:p});continue}if(p===Wf){if(s.type!=="brace"){h({type:"text",value:p});continue}let v="close";s=i.pop(),s.close=!0,h({type:v,value:p}),m--,s=i[i.length-1];continue}if(p===Hf&&m>0){if(s.ranges>0){s.ranges=0;let v=s.nodes.shift();s.nodes=[v,{type:"text",value:Ff(s)}]}h({type:"comma",value:p}),s.commas++;continue}if(p===jf&&m>0&&s.commas===0){let v=s.nodes;if(m===0||v.length===0){h({type:"text",value:p});continue}if(a.type==="dot"){if(s.range=[],a.value+=p,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"){v.pop();let k=v[v.length-1];k.value+=a.value+p,a=k,s.ranges--;continue}h({type:"dot",value:p});continue}h({type:"text",value:p})}do if(s=i.pop(),s.type!=="root"){s.nodes.forEach(w=>{w.nodes||(w.type==="open"&&(w.isOpen=!0),w.type==="close"&&(w.isClose=!0),w.nodes||(w.type="text"),w.invalid=!0)});let v=i[i.length-1],k=v.nodes.indexOf(s);v.nodes.splice(k,1,...s.nodes)}while(i.length>0);return h({type:"eos"}),o};ms.exports=Xf});var ys=C((Ov,hs)=>{"use strict";l();var gs=Zt(),Qf=os(),Jf=as(),Zf=ds(),ae=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let o=ae.create(n,t);Array.isArray(o)?r.push(...o):r.push(o)}else r=[].concat(ae.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};ae.parse=(e,t={})=>Zf(e,t);ae.stringify=(e,t={})=>gs(typeof e=="string"?ae.parse(e,t):e,t);ae.compile=(e,t={})=>(typeof e=="string"&&(e=ae.parse(e,t)),Qf(e,t));ae.expand=(e,t={})=>{typeof e=="string"&&(e=ae.parse(e,t));let r=Jf(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};ae.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?ae.compile(e,t):ae.expand(e,t);hs.exports=ae});var Et=C(($v,Rs)=>{"use strict";l();var ep=K("path"),ve="\\\\/",xs=`[^${ve}]`,Pe="\\.",tp="\\+",rp="\\?",rr="\\/",np="(?=.)",vs="[^/]",un=`(?:${rr}|$)`,_s=`(?:^|${rr})`,fn=`${Pe}{1,2}${un}`,op=`(?!${Pe})`,ip=`(?!${_s}${fn})`,sp=`(?!${Pe}{0,1}${un})`,ap=`(?!${fn})`,lp=`[^.${rr}]`,cp=`${vs}*?`,bs={DOT_LITERAL:Pe,PLUS_LITERAL:tp,QMARK_LITERAL:rp,SLASH_LITERAL:rr,ONE_CHAR:np,QMARK:vs,END_ANCHOR:un,DOTS_SLASH:fn,NO_DOT:op,NO_DOTS:ip,NO_DOT_SLASH:sp,NO_DOTS_SLASH:ap,QMARK_NO_DOT:lp,STAR:cp,START_ANCHOR:_s},up={...bs,SLASH_LITERAL:`[${ve}]`,QMARK:xs,STAR:`${xs}*?`,DOTS_SLASH:`${Pe}{1,2}(?:[${ve}]|$)`,NO_DOT:`(?!${Pe})`,NO_DOTS:`(?!(?:^|[${ve}])${Pe}{1,2}(?:[${ve}]|$))`,NO_DOT_SLASH:`(?!${Pe}{0,1}(?:[${ve}]|$))`,NO_DOTS_SLASH:`(?!${Pe}{1,2}(?:[${ve}]|$))`,QMARK_NO_DOT:`[^.${ve}]`,START_ANCHOR:`(?:^|[${ve}])`,END_ANCHOR:`(?:[${ve}]|$)`},fp={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"};Rs.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:fp,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:ep.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?up:bs}}});var At=C(ie=>{"use strict";l();var pp=K("path"),mp=process.platform==="win32",{REGEX_BACKSLASH:dp,REGEX_REMOVE_BACKSLASH:gp,REGEX_SPECIAL_CHARS:hp,REGEX_SPECIAL_CHARS_GLOBAL:yp}=Et();ie.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);ie.hasRegexChars=e=>hp.test(e);ie.isRegexChar=e=>e.length===1&&ie.hasRegexChars(e);ie.escapeRegex=e=>e.replace(yp,"\\$1");ie.toPosixSlashes=e=>e.replace(dp,"/");ie.removeBackslashes=e=>e.replace(gp,t=>t==="\\"?"":t);ie.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};ie.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:mp===!0||pp.sep==="\\";ie.escapeLast=(e,t,r)=>{let n=e.lastIndexOf(t,r);return n===-1?e:e[n-1]==="\\"?ie.escapeLast(e,t,n-1):`${e.slice(0,n)}\\${e.slice(n)}`};ie.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r};ie.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",o=r.contains?"":"$",i=`${n}(?:${e})${o}`;return t.negated===!0&&(i=`(?:^(?!${i}).*$)`),i}});var Os=C((Iv,ks)=>{"use strict";l();var Cs=At(),{CHAR_ASTERISK:pn,CHAR_AT:xp,CHAR_BACKWARD_SLASH:Pt,CHAR_COMMA:vp,CHAR_DOT:mn,CHAR_EXCLAMATION_MARK:dn,CHAR_FORWARD_SLASH:Ps,CHAR_LEFT_CURLY_BRACE:gn,CHAR_LEFT_PARENTHESES:hn,CHAR_LEFT_SQUARE_BRACKET:_p,CHAR_PLUS:bp,CHAR_QUESTION_MARK:Ss,CHAR_RIGHT_CURLY_BRACE:Rp,CHAR_RIGHT_PARENTHESES:ws,CHAR_RIGHT_SQUARE_BRACKET:Cp}=Et(),Es=e=>e===Ps||e===Pt,As=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},Sp=(e,t)=>{let r=t||{},n=e.length-1,o=r.parts===!0||r.scanToEnd===!0,i=[],s=[],a=[],c=e,u=-1,f=0,m=0,p=!1,y=!1,h=!1,v=!1,k=!1,w=!1,$=!1,E=!1,V=!1,A=!1,L=0,O,P,F={value:"",depth:0,isGlob:!1},W=()=>u>=n,b=()=>c.charCodeAt(u+1),q=()=>(O=P,c.charCodeAt(++u));for(;u<n;){P=q();let ne;if(P===Pt){$=F.backslashes=!0,P=q(),P===gn&&(w=!0);continue}if(w===!0||P===gn){for(L++;W()!==!0&&(P=q());){if(P===Pt){$=F.backslashes=!0,q();continue}if(P===gn){L++;continue}if(w!==!0&&P===mn&&(P=q())===mn){if(p=F.isBrace=!0,h=F.isGlob=!0,A=!0,o===!0)continue;break}if(w!==!0&&P===vp){if(p=F.isBrace=!0,h=F.isGlob=!0,A=!0,o===!0)continue;break}if(P===Rp&&(L--,L===0)){w=!1,p=F.isBrace=!0,A=!0;break}}if(o===!0)continue;break}if(P===Ps){if(i.push(u),s.push(F),F={value:"",depth:0,isGlob:!1},A===!0)continue;if(O===mn&&u===f+1){f+=2;continue}m=u+1;continue}if(r.noext!==!0&&(P===bp||P===xp||P===pn||P===Ss||P===dn)===!0&&b()===hn){if(h=F.isGlob=!0,v=F.isExtglob=!0,A=!0,P===dn&&u===f&&(V=!0),o===!0){for(;W()!==!0&&(P=q());){if(P===Pt){$=F.backslashes=!0,P=q();continue}if(P===ws){h=F.isGlob=!0,A=!0;break}}continue}break}if(P===pn){if(O===pn&&(k=F.isGlobstar=!0),h=F.isGlob=!0,A=!0,o===!0)continue;break}if(P===Ss){if(h=F.isGlob=!0,A=!0,o===!0)continue;break}if(P===_p){for(;W()!==!0&&(ne=q());){if(ne===Pt){$=F.backslashes=!0,q();continue}if(ne===Cp){y=F.isBracket=!0,h=F.isGlob=!0,A=!0;break}}if(o===!0)continue;break}if(r.nonegate!==!0&&P===dn&&u===f){E=F.negated=!0,f++;continue}if(r.noparen!==!0&&P===hn){if(h=F.isGlob=!0,o===!0){for(;W()!==!0&&(P=q());){if(P===hn){$=F.backslashes=!0,P=q();continue}if(P===ws){A=!0;break}}continue}break}if(h===!0){if(A=!0,o===!0)continue;break}}r.noext===!0&&(v=!1,h=!1);let H=c,$e="",x="";f>0&&($e=c.slice(0,f),c=c.slice(f),m-=f),H&&h===!0&&m>0?(H=c.slice(0,m),x=c.slice(m)):h===!0?(H="",x=c):H=c,H&&H!==""&&H!=="/"&&H!==c&&Es(H.charCodeAt(H.length-1))&&(H=H.slice(0,-1)),r.unescape===!0&&(x&&(x=Cs.removeBackslashes(x)),H&&$===!0&&(H=Cs.removeBackslashes(H)));let _={prefix:$e,input:e,start:f,base:H,glob:x,isBrace:p,isBracket:y,isGlob:h,isExtglob:v,isGlobstar:k,negated:E,negatedExtglob:V};if(r.tokens===!0&&(_.maxDepth=0,Es(P)||s.push(F),_.tokens=s),r.parts===!0||r.tokens===!0){let ne;for(let D=0;D<i.length;D++){let ye=ne?ne+1:f,xe=i[D],se=e.slice(ye,xe);r.tokens&&(D===0&&f!==0?(s[D].isPrefix=!0,s[D].value=$e):s[D].value=se,As(s[D]),_.maxDepth+=s[D].depth),(D!==0||se!=="")&&a.push(se),ne=xe}if(ne&&ne+1<e.length){let D=e.slice(ne+1);a.push(D),r.tokens&&(s[s.length-1].value=D,As(s[s.length-1]),_.maxDepth+=s[s.length-1].depth)}_.slashes=i,_.parts=a}return _};ks.exports=Sp});var Vs=C((Fv,$s)=>{"use strict";l();var nr=Et(),le=At(),{MAX_LENGTH:or,POSIX_REGEX_SOURCE:wp,REGEX_NON_SPECIAL_CHARS:Ep,REGEX_SPECIAL_CHARS_BACKREF:Ap,REPLACEMENTS:Ts}=nr,Pp=(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=>le.escapeRegex(o)).join("..")}return r},lt=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,yn=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=Ts[e]||e;let r={...t},n=typeof r.maxLength=="number"?Math.min(or,r.maxLength):or,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?"":"?:",c=le.isWindows(t),u=nr.globChars(c),f=nr.extglobChars(u),{DOT_LITERAL:m,PLUS_LITERAL:p,SLASH_LITERAL:y,ONE_CHAR:h,DOTS_SLASH:v,NO_DOT:k,NO_DOT_SLASH:w,NO_DOTS_SLASH:$,QMARK:E,QMARK_NO_DOT:V,STAR:A,START_ANCHOR:L}=u,O=S=>`(${a}(?:(?!${L}${S.dot?v:m}).)*?)`,P=r.dot?"":k,F=r.dot?E:V,W=r.bash===!0?O(r):A;r.capture&&(W=`(${W})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let b={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=le.removePrefix(e,b),o=e.length;let q=[],H=[],$e=[],x=i,_,ne=()=>b.index===o-1,D=b.peek=(S=1)=>e[b.index+S],ye=b.advance=()=>e[++b.index]||"",xe=()=>e.slice(b.index+1),se=(S="",j=0)=>{b.consumed+=S,b.index+=j},Ut=S=>{b.output+=S.output!=null?S.output:S.value,se(S.value)},Bu=()=>{let S=1;for(;D()==="!"&&(D(2)!=="("||D(3)==="?");)ye(),b.start++,S++;return S%2===0?!1:(b.negated=!0,b.start++,!0)},Wt=S=>{b[S]++,$e.push(S)},Ye=S=>{b[S]--,$e.pop()},I=S=>{if(x.type==="globstar"){let j=b.braces>0&&(S.type==="comma"||S.type==="brace"),R=S.extglob===!0||q.length&&(S.type==="pipe"||S.type==="paren");S.type!=="slash"&&S.type!=="paren"&&!j&&!R&&(b.output=b.output.slice(0,-x.output.length),x.type="star",x.value="*",x.output=W,b.output+=x.output)}if(q.length&&S.type!=="paren"&&(q[q.length-1].inner+=S.value),(S.value||S.output)&&Ut(S),x&&x.type==="text"&&S.type==="text"){x.value+=S.value,x.output=(x.output||"")+S.value;return}S.prev=x,s.push(S),x=S},Gt=(S,j)=>{let R={...f[j],conditions:1,inner:""};R.prev=x,R.parens=b.parens,R.output=b.output;let M=(r.capture?"(":"")+R.open;Wt("parens"),I({type:S,value:j,output:b.output?"":h}),I({type:"paren",extglob:!0,value:ye(),output:M}),q.push(R)},qu=S=>{let j=S.close+(r.capture?")":""),R;if(S.type==="negate"){let M=W;if(S.inner&&S.inner.length>1&&S.inner.includes("/")&&(M=O(r)),(M!==W||ne()||/^\)+$/.test(xe()))&&(j=S.close=`)$))${M}`),S.inner.includes("*")&&(R=xe())&&/^\.[^\\/.]+$/.test(R)){let G=yn(R,{...t,fastpaths:!1}).output;j=S.close=`)${G})${M})`}S.prev.type==="bos"&&(b.negatedExtglob=!0)}I({type:"paren",extglob:!0,value:_,output:j}),Ye("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let S=!1,j=e.replace(Ap,(R,M,G,oe,X,Jr)=>oe==="\\"?(S=!0,R):oe==="?"?M?M+oe+(X?E.repeat(X.length):""):Jr===0?F+(X?E.repeat(X.length):""):E.repeat(G.length):oe==="."?m.repeat(G.length):oe==="*"?M?M+oe+(X?W:""):W:M?R:`\\${R}`);return S===!0&&(r.unescape===!0?j=j.replace(/\\/g,""):j=j.replace(/\\+/g,R=>R.length%2===0?"\\\\":R?"\\":"")),j===e&&r.contains===!0?(b.output=e,b):(b.output=le.wrapOutput(j,b,t),b)}for(;!ne();){if(_=ye(),_==="\0")continue;if(_==="\\"){let R=D();if(R==="/"&&r.bash!==!0||R==="."||R===";")continue;if(!R){_+="\\",I({type:"text",value:_});continue}let M=/^\\+/.exec(xe()),G=0;if(M&&M[0].length>2&&(G=M[0].length,b.index+=G,G%2!==0&&(_+="\\")),r.unescape===!0?_=ye():_+=ye(),b.brackets===0){I({type:"text",value:_});continue}}if(b.brackets>0&&(_!=="]"||x.value==="["||x.value==="[^")){if(r.posix!==!1&&_===":"){let R=x.value.slice(1);if(R.includes("[")&&(x.posix=!0,R.includes(":"))){let M=x.value.lastIndexOf("["),G=x.value.slice(0,M),oe=x.value.slice(M+2),X=wp[oe];if(X){x.value=G+X,b.backtrack=!0,ye(),!i.output&&s.indexOf(x)===1&&(i.output=h);continue}}}(_==="["&&D()!==":"||_==="-"&&D()==="]")&&(_=`\\${_}`),_==="]"&&(x.value==="["||x.value==="[^")&&(_=`\\${_}`),r.posix===!0&&_==="!"&&x.value==="["&&(_="^"),x.value+=_,Ut({value:_});continue}if(b.quotes===1&&_!=='"'){_=le.escapeRegex(_),x.value+=_,Ut({value:_});continue}if(_==='"'){b.quotes=b.quotes===1?0:1,r.keepQuotes===!0&&I({type:"text",value:_});continue}if(_==="("){Wt("parens"),I({type:"paren",value:_});continue}if(_===")"){if(b.parens===0&&r.strictBrackets===!0)throw new SyntaxError(lt("opening","("));let R=q[q.length-1];if(R&&b.parens===R.parens+1){qu(q.pop());continue}I({type:"paren",value:_,output:b.parens?")":"\\)"}),Ye("parens");continue}if(_==="["){if(r.nobracket===!0||!xe().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(lt("closing","]"));_=`\\${_}`}else Wt("brackets");I({type:"bracket",value:_});continue}if(_==="]"){if(r.nobracket===!0||x&&x.type==="bracket"&&x.value.length===1){I({type:"text",value:_,output:`\\${_}`});continue}if(b.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(lt("opening","["));I({type:"text",value:_,output:`\\${_}`});continue}Ye("brackets");let R=x.value.slice(1);if(x.posix!==!0&&R[0]==="^"&&!R.includes("/")&&(_=`/${_}`),x.value+=_,Ut({value:_}),r.literalBrackets===!1||le.hasRegexChars(R))continue;let M=le.escapeRegex(x.value);if(b.output=b.output.slice(0,-x.value.length),r.literalBrackets===!0){b.output+=M,x.value=M;continue}x.value=`(${a}${M}|${x.value})`,b.output+=x.value;continue}if(_==="{"&&r.nobrace!==!0){Wt("braces");let R={type:"brace",value:_,output:"(",outputIndex:b.output.length,tokensIndex:b.tokens.length};H.push(R),I(R);continue}if(_==="}"){let R=H[H.length-1];if(r.nobrace===!0||!R){I({type:"text",value:_,output:_});continue}let M=")";if(R.dots===!0){let G=s.slice(),oe=[];for(let X=G.length-1;X>=0&&(s.pop(),G[X].type!=="brace");X--)G[X].type!=="dots"&&oe.unshift(G[X].value);M=Pp(oe,r),b.backtrack=!0}if(R.comma!==!0&&R.dots!==!0){let G=b.output.slice(0,R.outputIndex),oe=b.tokens.slice(R.tokensIndex);R.value=R.output="\\{",_=M="\\}",b.output=G;for(let X of oe)b.output+=X.output||X.value}I({type:"brace",value:_,output:M}),Ye("braces"),H.pop();continue}if(_==="|"){q.length>0&&q[q.length-1].conditions++,I({type:"text",value:_});continue}if(_===","){let R=_,M=H[H.length-1];M&&$e[$e.length-1]==="braces"&&(M.comma=!0,R="|"),I({type:"comma",value:_,output:R});continue}if(_==="/"){if(x.type==="dot"&&b.index===b.start+1){b.start=b.index+1,b.consumed="",b.output="",s.pop(),x=i;continue}I({type:"slash",value:_,output:y});continue}if(_==="."){if(b.braces>0&&x.type==="dot"){x.value==="."&&(x.output=m);let R=H[H.length-1];x.type="dots",x.output+=_,x.value+=_,R.dots=!0;continue}if(b.braces+b.parens===0&&x.type!=="bos"&&x.type!=="slash"){I({type:"text",value:_,output:m});continue}I({type:"dot",value:_,output:m});continue}if(_==="?"){if(!(x&&x.value==="(")&&r.noextglob!==!0&&D()==="("&&D(2)!=="?"){Gt("qmark",_);continue}if(x&&x.type==="paren"){let M=D(),G=_;if(M==="<"&&!le.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(x.value==="("&&!/[!=<:]/.test(M)||M==="<"&&!/<([!=]|\w+>)/.test(xe()))&&(G=`\\${_}`),I({type:"text",value:_,output:G});continue}if(r.dot!==!0&&(x.type==="slash"||x.type==="bos")){I({type:"qmark",value:_,output:V});continue}I({type:"qmark",value:_,output:E});continue}if(_==="!"){if(r.noextglob!==!0&&D()==="("&&(D(2)!=="?"||!/[!=<:]/.test(D(3)))){Gt("negate",_);continue}if(r.nonegate!==!0&&b.index===0){Bu();continue}}if(_==="+"){if(r.noextglob!==!0&&D()==="("&&D(2)!=="?"){Gt("plus",_);continue}if(x&&x.value==="("||r.regex===!1){I({type:"plus",value:_,output:p});continue}if(x&&(x.type==="bracket"||x.type==="paren"||x.type==="brace")||b.parens>0){I({type:"plus",value:_});continue}I({type:"plus",value:p});continue}if(_==="@"){if(r.noextglob!==!0&&D()==="("&&D(2)!=="?"){I({type:"at",extglob:!0,value:_,output:""});continue}I({type:"text",value:_});continue}if(_!=="*"){(_==="$"||_==="^")&&(_=`\\${_}`);let R=Ep.exec(xe());R&&(_+=R[0],b.index+=R[0].length),I({type:"text",value:_});continue}if(x&&(x.type==="globstar"||x.star===!0)){x.type="star",x.star=!0,x.value+=_,x.output=W,b.backtrack=!0,b.globstar=!0,se(_);continue}let S=xe();if(r.noextglob!==!0&&/^\([^?]/.test(S)){Gt("star",_);continue}if(x.type==="star"){if(r.noglobstar===!0){se(_);continue}let R=x.prev,M=R.prev,G=R.type==="slash"||R.type==="bos",oe=M&&(M.type==="star"||M.type==="globstar");if(r.bash===!0&&(!G||S[0]&&S[0]!=="/")){I({type:"star",value:_,output:""});continue}let X=b.braces>0&&(R.type==="comma"||R.type==="brace"),Jr=q.length&&(R.type==="pipe"||R.type==="paren");if(!G&&R.type!=="paren"&&!X&&!Jr){I({type:"star",value:_,output:""});continue}for(;S.slice(0,3)==="/**";){let Kt=e[b.index+4];if(Kt&&Kt!=="/")break;S=S.slice(3),se("/**",3)}if(R.type==="bos"&&ne()){x.type="globstar",x.value+=_,x.output=O(r),b.output=x.output,b.globstar=!0,se(_);continue}if(R.type==="slash"&&R.prev.type!=="bos"&&!oe&&ne()){b.output=b.output.slice(0,-(R.output+x.output).length),R.output=`(?:${R.output}`,x.type="globstar",x.output=O(r)+(r.strictSlashes?")":"|$)"),x.value+=_,b.globstar=!0,b.output+=R.output+x.output,se(_);continue}if(R.type==="slash"&&R.prev.type!=="bos"&&S[0]==="/"){let Kt=S[1]!==void 0?"|$":"";b.output=b.output.slice(0,-(R.output+x.output).length),R.output=`(?:${R.output}`,x.type="globstar",x.output=`${O(r)}${y}|${y}${Kt})`,x.value+=_,b.output+=R.output+x.output,b.globstar=!0,se(_+ye()),I({type:"slash",value:"/",output:""});continue}if(R.type==="bos"&&S[0]==="/"){x.type="globstar",x.value+=_,x.output=`(?:^|${y}|${O(r)}${y})`,b.output=x.output,b.globstar=!0,se(_+ye()),I({type:"slash",value:"/",output:""});continue}b.output=b.output.slice(0,-x.output.length),x.type="globstar",x.output=O(r),x.value+=_,b.output+=x.output,b.globstar=!0,se(_);continue}let j={type:"star",value:_,output:W};if(r.bash===!0){j.output=".*?",(x.type==="bos"||x.type==="slash")&&(j.output=P+j.output),I(j);continue}if(x&&(x.type==="bracket"||x.type==="paren")&&r.regex===!0){j.output=_,I(j);continue}(b.index===b.start||x.type==="slash"||x.type==="dot")&&(x.type==="dot"?(b.output+=w,x.output+=w):r.dot===!0?(b.output+=$,x.output+=$):(b.output+=P,x.output+=P),D()!=="*"&&(b.output+=h,x.output+=h)),I(j)}for(;b.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(lt("closing","]"));b.output=le.escapeLast(b.output,"["),Ye("brackets")}for(;b.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(lt("closing",")"));b.output=le.escapeLast(b.output,"("),Ye("parens")}for(;b.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(lt("closing","}"));b.output=le.escapeLast(b.output,"{"),Ye("braces")}if(r.strictSlashes!==!0&&(x.type==="star"||x.type==="bracket")&&I({type:"maybe_slash",value:"",output:`${y}?`}),b.backtrack===!0){b.output="";for(let S of b.tokens)b.output+=S.output!=null?S.output:S.value,S.suffix&&(b.output+=S.suffix)}return b};yn.fastpaths=(e,t)=>{let r={...t},n=typeof r.maxLength=="number"?Math.min(or,r.maxLength):or,o=e.length;if(o>n)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${n}`);e=Ts[e]||e;let i=le.isWindows(t),{DOT_LITERAL:s,SLASH_LITERAL:a,ONE_CHAR:c,DOTS_SLASH:u,NO_DOT:f,NO_DOTS:m,NO_DOTS_SLASH:p,STAR:y,START_ANCHOR:h}=nr.globChars(i),v=r.dot?m:f,k=r.dot?p:f,w=r.capture?"":"?:",$={negated:!1,prefix:""},E=r.bash===!0?".*?":y;r.capture&&(E=`(${E})`);let V=P=>P.noglobstar===!0?E:`(${w}(?:(?!${h}${P.dot?u:s}).)*?)`,A=P=>{switch(P){case"*":return`${v}${c}${E}`;case".*":return`${s}${c}${E}`;case"*.*":return`${v}${E}${s}${c}${E}`;case"*/*":return`${v}${E}${a}${c}${k}${E}`;case"**":return v+V(r);case"**/*":return`(?:${v}${V(r)}${a})?${k}${c}${E}`;case"**/*.*":return`(?:${v}${V(r)}${a})?${k}${E}${s}${c}${E}`;case"**/.*":return`(?:${v}${V(r)}${a})?${s}${c}${E}`;default:{let F=/^(.*?)\.(\w+)$/.exec(P);if(!F)return;let W=A(F[1]);return W?W+s+F[2]:void 0}}},L=le.removePrefix(e,$),O=A(L);return O&&r.strictSlashes!==!0&&(O+=`${a}?`),O};$s.exports=yn});var Ms=C((Hv,Ls)=>{"use strict";l();var kp=K("path"),Op=Os(),xn=Vs(),vn=At(),Tp=Et(),$p=e=>e&&typeof e=="object"&&!Array.isArray(e),z=(e,t,r=!1)=>{if(Array.isArray(e)){let f=e.map(p=>z(p,t,r));return p=>{for(let y of f){let h=y(p);if(h)return h}return!1}}let n=$p(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=vn.isWindows(t),s=n?z.compileRe(e,t):z.makeRe(e,t,!1,!0),a=s.state;delete s.state;let c=()=>!1;if(o.ignore){let f={...t,ignore:null,onMatch:null,onResult:null};c=z(o.ignore,f,r)}let u=(f,m=!1)=>{let{isMatch:p,match:y,output:h}=z.test(f,s,t,{glob:e,posix:i}),v={glob:e,state:a,regex:s,posix:i,input:f,output:h,match:y,isMatch:p};return typeof o.onResult=="function"&&o.onResult(v),p===!1?(v.isMatch=!1,m?v:!1):c(f)?(typeof o.onIgnore=="function"&&o.onIgnore(v),v.isMatch=!1,m?v:!1):(typeof o.onMatch=="function"&&o.onMatch(v),m?v:!0)};return r&&(u.state=a),u};z.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?vn.toPosixSlashes:null),a=e===n,c=a&&s?s(e):e;return a===!1&&(c=s?s(e):e,a=c===n),(a===!1||i.capture===!0)&&(i.matchBase===!0||i.basename===!0?a=z.matchBase(e,t,r,o):a=t.exec(c)),{isMatch:!!a,match:a,output:c}};z.matchBase=(e,t,r,n=vn.isWindows(r))=>(t instanceof RegExp?t:z.makeRe(t,r)).test(kp.basename(e));z.isMatch=(e,t,r)=>z(t,r)(e);z.parse=(e,t)=>Array.isArray(e)?e.map(r=>z.parse(r,t)):xn(e,{...t,fastpaths:!1});z.scan=(e,t)=>Op(e,t);z.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 c=z.toRegex(a,t);return n===!0&&(c.state=e),c};z.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=xn.fastpaths(e,t)),o.output||(o=xn(e,t)),z.compileRe(o,t,r,n)};z.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/$^/}};z.constants=Tp;Ls.exports=z});var Ns=C((Bv,Is)=>{"use strict";l();Is.exports=Ms()});var qs=C((Uv,Bs)=>{"use strict";l();var Ds=K("util"),Hs=ys(),_e=Ns(),_n=At(),Fs=e=>e===""||e==="./",js=e=>{let t=e.indexOf("{");return t>-1&&e.indexOf("}",t)>-1},B=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let n=new Set,o=new Set,i=new Set,s=0,a=f=>{i.add(f.output),r&&r.onResult&&r.onResult(f)};for(let f=0;f<t.length;f++){let m=_e(String(t[f]),{...r,onResult:a},!0),p=m.state.negated||m.state.negatedExtglob;p&&s++;for(let y of e){let h=m(y,!0);(p?!h.isMatch:h.isMatch)&&(p?n.add(h.output):(n.delete(h.output),o.add(h.output)))}}let u=(s===t.length?[...i]:[...o]).filter(f=>!n.has(f));if(r&&u.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(f=>f.replace(/\\/g,"")):t}return u};B.match=B;B.matcher=(e,t)=>_e(e,t);B.isMatch=(e,t,r)=>_e(t,r)(e);B.any=B.isMatch;B.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(B(e,t,{...r,onResult:i}));for(let a of o)s.has(a)||n.add(a);return[...n]};B.contains=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${Ds.inspect(e)}"`);if(Array.isArray(t))return t.some(n=>B.contains(e,n,r));if(typeof t=="string"){if(Fs(e)||Fs(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return B.isMatch(e,t,{...r,contains:!0})};B.matchKeys=(e,t,r)=>{if(!_n.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=B(Object.keys(e),t,r),o={};for(let i of n)o[i]=e[i];return o};B.some=(e,t,r)=>{let n=[].concat(e);for(let o of[].concat(t)){let i=_e(String(o),r);if(n.some(s=>i(s)))return!0}return!1};B.every=(e,t,r)=>{let n=[].concat(e);for(let o of[].concat(t)){let i=_e(String(o),r);if(!n.every(s=>i(s)))return!1}return!0};B.all=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${Ds.inspect(e)}"`);return[].concat(t).every(n=>_e(n,r)(e))};B.capture=(e,t,r)=>{let n=_n.isWindows(r),i=_e.makeRe(String(e),{...r,capture:!0}).exec(n?_n.toPosixSlashes(t):t);if(i)return i.slice(1).map(s=>s===void 0?"":s)};B.makeRe=(...e)=>_e.makeRe(...e);B.scan=(...e)=>_e.scan(...e);B.parse=(e,t)=>{let r=[];for(let n of[].concat(e||[]))for(let o of Hs(String(n),t))r.push(_e.parse(o,t));return r};B.braces=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return t&&t.nobrace===!0||!js(e)?[e]:Hs(e,t)};B.braceExpand=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return B.braces(e,{...t,expand:!0})};B.hasBraces=js;Bs.exports=B});var Qs=C(T=>{"use strict";l();Object.defineProperty(T,"__esModule",{value:!0});T.removeDuplicateSlashes=T.matchAny=T.convertPatternsToRe=T.makeRe=T.getPatternParts=T.expandBraceExpansion=T.expandPatternsWithBraceExpansion=T.isAffectDepthOfReadingPattern=T.endsWithSlashGlobStar=T.hasGlobStar=T.getBaseDirectory=T.isPatternRelatedToParentDirectory=T.getPatternsOutsideCurrentDirectory=T.getPatternsInsideCurrentDirectory=T.getPositivePatterns=T.getNegativePatterns=T.isPositivePattern=T.isNegativePattern=T.convertToNegativePattern=T.convertToPositivePattern=T.isDynamicPattern=T.isStaticPattern=void 0;var Vp=K("path"),Lp=Mi(),bn=qs(),Us="**",Mp="\\",Ip=/[*?]|^!/,Np=/\[[^[]*]/,Fp=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,Dp=/[!*+?@]\([^(]*\)/,Hp=/,|\.\./,jp=/(?!^)\/{2,}/g;function Ws(e,t={}){return!Gs(e,t)}T.isStaticPattern=Ws;function Gs(e,t={}){return e===""?!1:!!(t.caseSensitiveMatch===!1||e.includes(Mp)||Ip.test(e)||Np.test(e)||Fp.test(e)||t.extglob!==!1&&Dp.test(e)||t.braceExpansion!==!1&&Bp(e))}T.isDynamicPattern=Gs;function Bp(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 Hp.test(n)}function qp(e){return ir(e)?e.slice(1):e}T.convertToPositivePattern=qp;function Up(e){return"!"+e}T.convertToNegativePattern=Up;function ir(e){return e.startsWith("!")&&e[1]!=="("}T.isNegativePattern=ir;function Ks(e){return!ir(e)}T.isPositivePattern=Ks;function Wp(e){return e.filter(ir)}T.getNegativePatterns=Wp;function Gp(e){return e.filter(Ks)}T.getPositivePatterns=Gp;function Kp(e){return e.filter(t=>!Rn(t))}T.getPatternsInsideCurrentDirectory=Kp;function zp(e){return e.filter(Rn)}T.getPatternsOutsideCurrentDirectory=zp;function Rn(e){return e.startsWith("..")||e.startsWith("./..")}T.isPatternRelatedToParentDirectory=Rn;function Yp(e){return Lp(e,{flipBackslashes:!1})}T.getBaseDirectory=Yp;function Xp(e){return e.includes(Us)}T.hasGlobStar=Xp;function zs(e){return e.endsWith("/"+Us)}T.endsWithSlashGlobStar=zs;function Qp(e){let t=Vp.basename(e);return zs(e)||Ws(t)}T.isAffectDepthOfReadingPattern=Qp;function Jp(e){return e.reduce((t,r)=>t.concat(Ys(r)),[])}T.expandPatternsWithBraceExpansion=Jp;function Ys(e){let t=bn.braces(e,{expand:!0,nodupes:!0,keepEscaping:!0});return t.sort((r,n)=>r.length-n.length),t.filter(r=>r!=="")}T.expandBraceExpansion=Ys;function Zp(e,t){let{parts:r}=bn.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}T.getPatternParts=Zp;function Xs(e,t){return bn.makeRe(e,t)}T.makeRe=Xs;function em(e,t){return e.map(r=>Xs(r,t))}T.convertPatternsToRe=em;function tm(e,t){return t.some(r=>r.test(e))}T.matchAny=tm;function rm(e){return e.replace(jp,"/")}T.removeDuplicateSlashes=rm});var ta=C((zv,ea)=>{"use strict";l();var nm=K("stream"),Js=nm.PassThrough,om=Array.prototype.slice;ea.exports=im;function im(){let e=[],t=om.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=Js(n);function a(){for(let f=0,m=arguments.length;f<m;f++)e.push(Zs(arguments[f],n));return c(),this}function c(){if(r)return;r=!0;let f=e.shift();if(!f){process.nextTick(u);return}Array.isArray(f)||(f=[f]);let m=f.length+1;function p(){--m>0||(r=!1,c())}function y(h){function v(){h.removeListener("merge2UnpipeEnd",v),h.removeListener("end",v),i&&h.removeListener("error",k),p()}function k(w){s.emit("error",w)}if(h._readableState.endEmitted)return p();h.on("merge2UnpipeEnd",v),h.on("end",v),i&&h.on("error",k),h.pipe(s,{end:!1}),h.resume()}for(let h=0;h<f.length;h++)y(f[h]);p()}function u(){r=!1,s.emit("queueDrain"),o&&s.end()}return s.setMaxListeners(0),s.add=a,s.on("unpipe",function(f){f.emit("merge2UnpipeEnd")}),t.length&&a.apply(null,t),s}function Zs(e,t){if(Array.isArray(e))for(let r=0,n=e.length;r<n;r++)e[r]=Zs(e[r],t);else{if(!e._readableState&&e.pipe&&(e=e.pipe(Js(t))),!e._readableState||!e.pause||!e.pipe)throw new Error("Only readable stream can be merged.");e.pause()}return e}});var na=C(sr=>{"use strict";l();Object.defineProperty(sr,"__esModule",{value:!0});sr.merge=void 0;var sm=ta();function am(e){let t=sm(e);return e.forEach(r=>{r.once("error",n=>t.emit("error",n))}),t.once("close",()=>ra(e)),t.once("end",()=>ra(e)),t}sr.merge=am;function ra(e){e.forEach(t=>t.emit("close"))}});var oa=C(ct=>{"use strict";l();Object.defineProperty(ct,"__esModule",{value:!0});ct.isEmpty=ct.isString=void 0;function lm(e){return typeof e=="string"}ct.isString=lm;function cm(e){return e===""}ct.isEmpty=cm});var ke=C(te=>{"use strict";l();Object.defineProperty(te,"__esModule",{value:!0});te.string=te.stream=te.pattern=te.path=te.fs=te.errno=te.array=void 0;var um=Ri();te.array=um;var fm=Ci();te.errno=fm;var pm=Si();te.fs=pm;var mm=Pi();te.path=mm;var dm=Qs();te.pattern=dm;var gm=na();te.stream=gm;var hm=oa();te.string=hm});var la=C(re=>{"use strict";l();Object.defineProperty(re,"__esModule",{value:!0});re.convertPatternGroupToTask=re.convertPatternGroupsToTasks=re.groupPatternsByBaseDirectory=re.getNegativePatternsAsPositive=re.getPositivePatterns=re.convertPatternsToTasks=re.generate=void 0;var de=ke();function ym(e,t){let r=ia(e,t),n=ia(t.ignore,t),o=sa(r),i=aa(r,n),s=o.filter(f=>de.pattern.isStaticPattern(f,t)),a=o.filter(f=>de.pattern.isDynamicPattern(f,t)),c=Cn(s,i,!1),u=Cn(a,i,!0);return c.concat(u)}re.generate=ym;function ia(e,t){let r=e;return t.braceExpansion&&(r=de.pattern.expandPatternsWithBraceExpansion(r)),t.baseNameMatch&&(r=r.map(n=>n.includes("/")?n:`**/${n}`)),r.map(n=>de.pattern.removeDuplicateSlashes(n))}function Cn(e,t,r){let n=[],o=de.pattern.getPatternsOutsideCurrentDirectory(e),i=de.pattern.getPatternsInsideCurrentDirectory(e),s=Sn(o),a=Sn(i);return n.push(...wn(s,t,r)),"."in a?n.push(En(".",i,t,r)):n.push(...wn(a,t,r)),n}re.convertPatternsToTasks=Cn;function sa(e){return de.pattern.getPositivePatterns(e)}re.getPositivePatterns=sa;function aa(e,t){return de.pattern.getNegativePatterns(e).concat(t).map(de.pattern.convertToPositivePattern)}re.getNegativePatternsAsPositive=aa;function Sn(e){let t={};return e.reduce((r,n)=>{let o=de.pattern.getBaseDirectory(n);return o in r?r[o].push(n):r[o]=[n],r},t)}re.groupPatternsByBaseDirectory=Sn;function wn(e,t,r){return Object.keys(e).map(n=>En(n,e[n],t,r))}re.convertPatternGroupsToTasks=wn;function En(e,t,r,n){return{dynamic:n,positive:t,negative:r,base:e,patterns:[].concat(t,r.map(de.pattern.convertToNegativePattern))}}re.convertPatternGroupToTask=En});var ua=C(ar=>{"use strict";l();Object.defineProperty(ar,"__esModule",{value:!0});ar.read=void 0;function xm(e,t,r){t.fs.lstat(e,(n,o)=>{if(n!==null){ca(r,n);return}if(!o.isSymbolicLink()||!t.followSymbolicLink){An(r,o);return}t.fs.stat(e,(i,s)=>{if(i!==null){if(t.throwErrorOnBrokenSymbolicLink){ca(r,i);return}An(r,o);return}t.markSymbolicLink&&(s.isSymbolicLink=()=>!0),An(r,s)})})}ar.read=xm;function ca(e,t){e(t)}function An(e,t){e(null,t)}});var fa=C(lr=>{"use strict";l();Object.defineProperty(lr,"__esModule",{value:!0});lr.read=void 0;function vm(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=vm});var pa=C(Ve=>{"use strict";l();Object.defineProperty(Ve,"__esModule",{value:!0});Ve.createFileSystemAdapter=Ve.FILE_SYSTEM_ADAPTER=void 0;var cr=K("fs");Ve.FILE_SYSTEM_ADAPTER={lstat:cr.lstat,stat:cr.stat,lstatSync:cr.lstatSync,statSync:cr.statSync};function _m(e){return e===void 0?Ve.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Ve.FILE_SYSTEM_ADAPTER),e)}Ve.createFileSystemAdapter=_m});var ma=C(kn=>{"use strict";l();Object.defineProperty(kn,"__esModule",{value:!0});var bm=pa(),Pn=class{constructor(t={}){this._options=t,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=bm.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}};kn.default=Pn});var Je=C(Le=>{"use strict";l();Object.defineProperty(Le,"__esModule",{value:!0});Le.statSync=Le.stat=Le.Settings=void 0;var da=ua(),Rm=fa(),On=ma();Le.Settings=On.default;function Cm(e,t,r){if(typeof t=="function"){da.read(e,Tn(),t);return}da.read(e,Tn(t),r)}Le.stat=Cm;function Sm(e,t){let r=Tn(t);return Rm.read(e,r)}Le.statSync=Sm;function Tn(e={}){return e instanceof On.default?e:new On.default(e)}});var ya=C((d_,ha)=>{"use strict";l();var ga;ha.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:global):e=>(ga||(ga=Promise.resolve())).then(e).catch(t=>setTimeout(()=>{throw t},0))});var va=C((h_,xa)=>{"use strict";l();xa.exports=Em;var wm=ya();function Em(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(c){function u(){t&&t(c,r),t=null}i?wm(u):u()}function a(c,u,f){r[c]=f,(--n===0||u)&&s(u)}n?o?o.forEach(function(c){e[c](function(u,f){a(c,u,f)})}):e.forEach(function(c,u){c(function(f,m){a(u,f,m)})}):s(null),i=!1}});var $n=C(fr=>{"use strict";l();Object.defineProperty(fr,"__esModule",{value:!0});fr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var ur=process.versions.node.split(".");if(ur[0]===void 0||ur[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var _a=Number.parseInt(ur[0],10),Am=Number.parseInt(ur[1],10),ba=10,Pm=10,km=_a>ba,Om=_a===ba&&Am>=Pm;fr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=km||Om});var Ra=C(pr=>{"use strict";l();Object.defineProperty(pr,"__esModule",{value:!0});pr.createDirentFromStats=void 0;var Vn=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 Tm(e,t){return new Vn(e,t)}pr.createDirentFromStats=Tm});var Ln=C(mr=>{"use strict";l();Object.defineProperty(mr,"__esModule",{value:!0});mr.fs=void 0;var $m=Ra();mr.fs=$m});var Mn=C(dr=>{"use strict";l();Object.defineProperty(dr,"__esModule",{value:!0});dr.joinPathSegments=void 0;function Vm(e,t,r){return e.endsWith(r)?e+t:e+r+t}dr.joinPathSegments=Vm});var Pa=C(Me=>{"use strict";l();Object.defineProperty(Me,"__esModule",{value:!0});Me.readdir=Me.readdirWithFileTypes=Me.read=void 0;var Lm=Je(),Ca=va(),Mm=$n(),Sa=Ln(),wa=Mn();function Im(e,t,r){if(!t.stats&&Mm.IS_SUPPORT_READDIR_WITH_FILE_TYPES){Ea(e,t,r);return}Aa(e,t,r)}Me.read=Im;function Ea(e,t,r){t.fs.readdir(e,{withFileTypes:!0},(n,o)=>{if(n!==null){gr(r,n);return}let i=o.map(a=>({dirent:a,name:a.name,path:wa.joinPathSegments(e,a.name,t.pathSegmentSeparator)}));if(!t.followSymbolicLinks){In(r,i);return}let s=i.map(a=>Nm(a,t));Ca(s,(a,c)=>{if(a!==null){gr(r,a);return}In(r,c)})})}Me.readdirWithFileTypes=Ea;function Nm(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=Sa.fs.createDirentFromStats(e.name,o),r(null,e)})}}function Aa(e,t,r){t.fs.readdir(e,(n,o)=>{if(n!==null){gr(r,n);return}let i=o.map(s=>{let a=wa.joinPathSegments(e,s,t.pathSegmentSeparator);return c=>{Lm.stat(a,t.fsStatSettings,(u,f)=>{if(u!==null){c(u);return}let m={name:s,path:a,dirent:Sa.fs.createDirentFromStats(s,f)};t.stats&&(m.stats=f),c(null,m)})}});Ca(i,(s,a)=>{if(s!==null){gr(r,s);return}In(r,a)})})}Me.readdir=Aa;function gr(e,t){e(t)}function In(e,t){e(null,t)}});var Va=C(Ie=>{"use strict";l();Object.defineProperty(Ie,"__esModule",{value:!0});Ie.readdir=Ie.readdirWithFileTypes=Ie.read=void 0;var Fm=Je(),Dm=$n(),ka=Ln(),Oa=Mn();function Hm(e,t){return!t.stats&&Dm.IS_SUPPORT_READDIR_WITH_FILE_TYPES?Ta(e,t):$a(e,t)}Ie.read=Hm;function Ta(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(n=>{let o={dirent:n,name:n.name,path:Oa.joinPathSegments(e,n.name,t.pathSegmentSeparator)};if(o.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{let i=t.fs.statSync(o.path);o.dirent=ka.fs.createDirentFromStats(o.name,i)}catch(i){if(t.throwErrorOnBrokenSymbolicLink)throw i}return o})}Ie.readdirWithFileTypes=Ta;function $a(e,t){return t.fs.readdirSync(e).map(n=>{let o=Oa.joinPathSegments(e,n,t.pathSegmentSeparator),i=Fm.statSync(o,t.fsStatSettings),s={name:n,path:o,dirent:ka.fs.createDirentFromStats(n,i)};return t.stats&&(s.stats=i),s})}Ie.readdir=$a});var La=C(Ne=>{"use strict";l();Object.defineProperty(Ne,"__esModule",{value:!0});Ne.createFileSystemAdapter=Ne.FILE_SYSTEM_ADAPTER=void 0;var ut=K("fs");Ne.FILE_SYSTEM_ADAPTER={lstat:ut.lstat,stat:ut.stat,lstatSync:ut.lstatSync,statSync:ut.statSync,readdir:ut.readdir,readdirSync:ut.readdirSync};function jm(e){return e===void 0?Ne.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Ne.FILE_SYSTEM_ADAPTER),e)}Ne.createFileSystemAdapter=jm});var Ma=C(Fn=>{"use strict";l();Object.defineProperty(Fn,"__esModule",{value:!0});var Bm=K("path"),qm=Je(),Um=La(),Nn=class{constructor(t={}){this._options=t,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=Um.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,Bm.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new qm.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(t,r){return t??r}};Fn.default=Nn});var hr=C(Fe=>{"use strict";l();Object.defineProperty(Fe,"__esModule",{value:!0});Fe.Settings=Fe.scandirSync=Fe.scandir=void 0;var Ia=Pa(),Wm=Va(),Dn=Ma();Fe.Settings=Dn.default;function Gm(e,t,r){if(typeof t=="function"){Ia.read(e,Hn(),t);return}Ia.read(e,Hn(t),r)}Fe.scandir=Gm;function Km(e,t){let r=Hn(t);return Wm.read(e,r)}Fe.scandirSync=Km;function Hn(e={}){return e instanceof Dn.default?e:new Dn.default(e)}});var Fa=C((I_,Na)=>{"use strict";l();function zm(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}}Na.exports=zm});var Ha=C((F_,jn)=>{"use strict";l();var Ym=Fa();function Da(e,t,r){if(typeof e=="function"&&(r=t,t=e,e=null),!(r>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var n=Ym(Xm),o=null,i=null,s=0,a=null,c={push:v,drain:ue,saturated:ue,pause:f,paused:!1,get concurrency(){return r},set concurrency(A){if(!(A>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(r=A,!c.paused)for(;o&&s<r;)s++,w()},running:u,resume:y,idle:h,length:m,getQueue:p,unshift:k,empty:ue,kill:$,killAndDrain:E,error:V};return c;function u(){return s}function f(){c.paused=!0}function m(){for(var A=o,L=0;A;)A=A.next,L++;return L}function p(){for(var A=o,L=[];A;)L.push(A.value),A=A.next;return L}function y(){if(c.paused){if(c.paused=!1,o===null){s++,w();return}for(;o&&s<r;)s++,w()}}function h(){return s===0&&c.length()===0}function v(A,L){var O=n.get();O.context=e,O.release=w,O.value=A,O.callback=L||ue,O.errorHandler=a,s>=r||c.paused?i?(i.next=O,i=O):(o=O,i=O,c.saturated()):(s++,t.call(e,O.value,O.worked))}function k(A,L){var O=n.get();O.context=e,O.release=w,O.value=A,O.callback=L||ue,O.errorHandler=a,s>=r||c.paused?o?(O.next=o,o=O):(o=O,i=O,c.saturated()):(s++,t.call(e,O.value,O.worked))}function w(A){A&&n.release(A);var L=o;L&&s<=r?c.paused?s--:(i===o&&(i=null),o=L.next,L.next=null,t.call(e,L.value,L.worked),i===null&&c.empty()):--s===0&&c.drain()}function $(){o=null,i=null,c.drain=ue}function E(){o=null,i=null,c.drain(),c.drain=ue}function V(A){a=A}}function ue(){}function Xm(){this.value=null,this.callback=ue,this.next=null,this.release=ue,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=ue,e.errorHandler&&i(r,s),o.call(e.context,r,n),e.release(e)}}function Qm(e,t,r){typeof e=="function"&&(r=t,t=e,e=null);function n(f,m){t.call(this,f).then(function(p){m(null,p)},m)}var o=Da(e,n,r),i=o.push,s=o.unshift;return o.push=a,o.unshift=c,o.drained=u,o;function a(f){var m=new Promise(function(p,y){i(f,function(h,v){if(h){y(h);return}p(v)})});return m.catch(ue),m}function c(f){var m=new Promise(function(p,y){s(f,function(h,v){if(h){y(h);return}p(v)})});return m.catch(ue),m}function u(){if(o.idle())return new Promise(function(p){p()});var f=o.drain,m=new Promise(function(p){o.drain=function(){f(),p()}});return m}}jn.exports=Da;jn.exports.promise=Qm});var yr=C(be=>{"use strict";l();Object.defineProperty(be,"__esModule",{value:!0});be.joinPathSegments=be.replacePathSegmentSeparator=be.isAppliedFilter=be.isFatalError=void 0;function Jm(e,t){return e.errorFilter===null?!0:!e.errorFilter(t)}be.isFatalError=Jm;function Zm(e,t){return e===null||e(t)}be.isAppliedFilter=Zm;function ed(e,t){return e.split(/[/\\]/).join(t)}be.replacePathSegmentSeparator=ed;function td(e,t,r){return e===""?t:e.endsWith(r)?e+t:e+r+t}be.joinPathSegments=td});var Un=C(qn=>{"use strict";l();Object.defineProperty(qn,"__esModule",{value:!0});var rd=yr(),Bn=class{constructor(t,r){this._root=t,this._settings=r,this._root=rd.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}};qn.default=Bn});var Kn=C(Gn=>{"use strict";l();Object.defineProperty(Gn,"__esModule",{value:!0});var nd=K("events"),od=hr(),id=Ha(),xr=yr(),sd=Un(),Wn=class extends sd.default{constructor(t,r){super(t,r),this._settings=r,this._scandir=od.scandir,this._emitter=new nd.EventEmitter,this._queue=id(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||!xr.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=xr.joinPathSegments(r,t.name,this._settings.pathSegmentSeparator)),xr.isAppliedFilter(this._settings.entryFilter,t)&&this._emitEntry(t),t.dirent.isDirectory()&&xr.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(n,r===void 0?void 0:t.path)}_emitEntry(t){this._emitter.emit("entry",t)}};Gn.default=Wn});var ja=C(Yn=>{"use strict";l();Object.defineProperty(Yn,"__esModule",{value:!0});var ad=Kn(),zn=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new ad.default(this._root,this._settings),this._storage=[]}read(t){this._reader.onError(r=>{ld(t,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{cd(t,this._storage)}),this._reader.read()}};Yn.default=zn;function ld(e,t){e(t)}function cd(e,t){e(null,t)}});var Ba=C(Qn=>{"use strict";l();Object.defineProperty(Qn,"__esModule",{value:!0});var ud=K("stream"),fd=Kn(),Xn=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new fd.default(this._root,this._settings),this._stream=new ud.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}};Qn.default=Xn});var qa=C(Zn=>{"use strict";l();Object.defineProperty(Zn,"__esModule",{value:!0});var pd=hr(),vr=yr(),md=Un(),Jn=class extends md.default{constructor(){super(...arguments),this._scandir=pd.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(vr.isFatalError(this._settings,t))throw t}_handleEntry(t,r){let n=t.path;r!==void 0&&(t.path=vr.joinPathSegments(r,t.name,this._settings.pathSegmentSeparator)),vr.isAppliedFilter(this._settings.entryFilter,t)&&this._pushToStorage(t),t.dirent.isDirectory()&&vr.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(n,r===void 0?void 0:t.path)}_pushToStorage(t){this._storage.push(t)}};Zn.default=Jn});var Ua=C(to=>{"use strict";l();Object.defineProperty(to,"__esModule",{value:!0});var dd=qa(),eo=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new dd.default(this._root,this._settings)}read(){return this._reader.read()}};to.default=eo});var Wa=C(no=>{"use strict";l();Object.defineProperty(no,"__esModule",{value:!0});var gd=K("path"),hd=hr(),ro=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,gd.sep),this.fsScandirSettings=new hd.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}};no.default=ro});var br=C(Re=>{"use strict";l();Object.defineProperty(Re,"__esModule",{value:!0});Re.Settings=Re.walkStream=Re.walkSync=Re.walk=void 0;var Ga=ja(),yd=Ba(),xd=Ua(),oo=Wa();Re.Settings=oo.default;function vd(e,t,r){if(typeof t=="function"){new Ga.default(e,_r()).read(t);return}new Ga.default(e,_r(t)).read(r)}Re.walk=vd;function _d(e,t){let r=_r(t);return new xd.default(e,r).read()}Re.walkSync=_d;function bd(e,t){let r=_r(t);return new yd.default(e,r).read()}Re.walkStream=bd;function _r(e={}){return e instanceof oo.default?e:new oo.default(e)}});var Rr=C(so=>{"use strict";l();Object.defineProperty(so,"__esModule",{value:!0});var Rd=K("path"),Cd=Je(),Ka=ke(),io=class{constructor(t){this._settings=t,this._fsStatSettings=new Cd.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return Rd.resolve(this._settings.cwd,t)}_makeEntry(t,r){let n={name:r,path:r,dirent:Ka.fs.createDirentFromStats(r,t)};return this._settings.stats&&(n.stats=t),n}_isFatalError(t){return!Ka.errno.isEnoentCodeError(t)&&!this._settings.suppressErrors}};so.default=io});var co=C(lo=>{"use strict";l();Object.defineProperty(lo,"__esModule",{value:!0});var Sd=K("stream"),wd=Je(),Ed=br(),Ad=Rr(),ao=class extends Ad.default{constructor(){super(...arguments),this._walkStream=Ed.walkStream,this._stat=wd.stat}dynamic(t,r){return this._walkStream(t,r)}static(t,r){let n=t.map(this._getFullEntryPath,this),o=new Sd.PassThrough({objectMode:!0});o._write=(i,s,a)=>this._getEntry(n[i],t[i],r).then(c=>{c!==null&&r.entryFilter(c)&&o.push(c),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))})}};lo.default=ao});var za=C(fo=>{"use strict";l();Object.defineProperty(fo,"__esModule",{value:!0});var Pd=br(),kd=Rr(),Od=co(),uo=class extends kd.default{constructor(){super(...arguments),this._walkAsync=Pd.walk,this._readerStream=new Od.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))})}};fo.default=uo});var Ya=C(mo=>{"use strict";l();Object.defineProperty(mo,"__esModule",{value:!0});var kt=ke(),po=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 kt.pattern.getPatternParts(t,this._micromatchOptions).map(n=>kt.pattern.isDynamicPattern(n,this._settings)?{dynamic:!0,pattern:n,patternRe:kt.pattern.makeRe(n,this._micromatchOptions)}:{dynamic:!1,pattern:n})}_splitSegmentsIntoSections(t){return kt.array.splitWhen(t,r=>r.dynamic&&kt.pattern.hasGlobStar(r.pattern))}};mo.default=po});var Xa=C(ho=>{"use strict";l();Object.defineProperty(ho,"__esModule",{value:!0});var Td=Ya(),go=class extends Td.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((c,u)=>{let f=i.segments[u];return!!(f.dynamic&&f.patternRe.test(c)||!f.dynamic&&f.pattern===c)}))return!0}return!1}};ho.default=go});var Qa=C(xo=>{"use strict";l();Object.defineProperty(xo,"__esModule",{value:!0});var Cr=ke(),$d=Xa(),yo=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 $d.default(t,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){let r=t.filter(Cr.pattern.isAffectDepthOfReadingPattern);return Cr.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path)||this._isSkippedSymbolicLink(r))return!1;let i=Cr.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!Cr.pattern.matchAny(t,r)}};xo.default=yo});var Ja=C(_o=>{"use strict";l();Object.defineProperty(_o,"__esModule",{value:!0});var Ze=ke(),vo=class{constructor(t,r){this._settings=t,this._micromatchOptions=r,this.index=new Map}getFilter(t,r){let n=Ze.pattern.convertPatternsToRe(t,this._micromatchOptions),o=Ze.pattern.convertPatternsToRe(r,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}));return i=>this._filter(i,n,o)}_filter(t,r,n){let o=Ze.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=Ze.path.makeAbsolute(this._settings.cwd,t);return Ze.pattern.matchAny(n,r)}_isMatchToPatterns(t,r,n){let o=Ze.pattern.matchAny(t,r);return!o&&n?Ze.pattern.matchAny(t+"/",r):o}};_o.default=vo});var Za=C(Ro=>{"use strict";l();Object.defineProperty(Ro,"__esModule",{value:!0});var Vd=ke(),bo=class{constructor(t){this._settings=t}getFilter(){return t=>this._isNonFatalError(t)}_isNonFatalError(t){return Vd.errno.isEnoentCodeError(t)||this._settings.suppressErrors}};Ro.default=bo});var tl=C(So=>{"use strict";l();Object.defineProperty(So,"__esModule",{value:!0});var el=ke(),Co=class{constructor(t){this._settings=t}getTransformer(){return t=>this._transform(t)}_transform(t){let r=t.path;return this._settings.absolute&&(r=el.path.makeAbsolute(this._settings.cwd,r),r=el.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}};So.default=Co});var Sr=C(Eo=>{"use strict";l();Object.defineProperty(Eo,"__esModule",{value:!0});var Ld=K("path"),Md=Qa(),Id=Ja(),Nd=Za(),Fd=tl(),wo=class{constructor(t){this._settings=t,this.errorFilter=new Nd.default(this._settings),this.entryFilter=new Id.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new Md.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new Fd.default(this._settings)}_getRootDirectory(t){return Ld.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}}};Eo.default=wo});var rl=C(Po=>{"use strict";l();Object.defineProperty(Po,"__esModule",{value:!0});var Dd=za(),Hd=Sr(),Ao=class extends Hd.default{constructor(){super(...arguments),this._reader=new Dd.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)}};Po.default=Ao});var nl=C(Oo=>{"use strict";l();Object.defineProperty(Oo,"__esModule",{value:!0});var jd=K("stream"),Bd=co(),qd=Sr(),ko=class extends qd.default{constructor(){super(...arguments),this._reader=new Bd.default(this._settings)}read(t){let r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new jd.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)}};Oo.default=ko});var ol=C($o=>{"use strict";l();Object.defineProperty($o,"__esModule",{value:!0});var Ud=Je(),Wd=br(),Gd=Rr(),To=class extends Gd.default{constructor(){super(...arguments),this._walkSync=Wd.walkSync,this._statSync=Ud.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)}};$o.default=To});var il=C(Lo=>{"use strict";l();Object.defineProperty(Lo,"__esModule",{value:!0});var Kd=ol(),zd=Sr(),Vo=class extends zd.default{constructor(){super(...arguments),this._reader=new Kd.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)}};Lo.default=Vo});var sl=C(pt=>{"use strict";l();Object.defineProperty(pt,"__esModule",{value:!0});pt.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var ft=K("fs"),Yd=K("os"),Xd=Math.max(Yd.cpus().length,1);pt.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:ft.lstat,lstatSync:ft.lstatSync,stat:ft.stat,statSync:ft.statSync,readdir:ft.readdir,readdirSync:ft.readdirSync};var Mo=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,Xd),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({},pt.DEFAULT_FILE_SYSTEM_ADAPTER),t)}};pt.default=Mo});var wr=C((Lb,ll)=>{"use strict";l();var al=la(),Qd=rl(),Jd=nl(),Zd=il(),Io=sl(),fe=ke();async function No(e,t){ge(e);let r=Fo(e,Qd.default,t),n=await Promise.all(r);return fe.array.flatten(n)}(function(e){e.glob=e,e.globSync=t,e.globStream=r,e.async=e;function t(u,f){ge(u);let m=Fo(u,Zd.default,f);return fe.array.flatten(m)}e.sync=t;function r(u,f){ge(u);let m=Fo(u,Jd.default,f);return fe.stream.merge(m)}e.stream=r;function n(u,f){ge(u);let m=[].concat(u),p=new Io.default(f);return al.generate(m,p)}e.generateTasks=n;function o(u,f){ge(u);let m=new Io.default(f);return fe.pattern.isDynamicPattern(u,m)}e.isDynamicPattern=o;function i(u){return ge(u),fe.path.escape(u)}e.escapePath=i;function s(u){return ge(u),fe.path.convertPathToPattern(u)}e.convertPathToPattern=s;let a;(function(u){function f(p){return ge(p),fe.path.escapePosixPath(p)}u.escapePath=f;function m(p){return ge(p),fe.path.convertPosixPathToPattern(p)}u.convertPathToPattern=m})(a=e.posix||(e.posix={}));let c;(function(u){function f(p){return ge(p),fe.path.escapeWindowsPath(p)}u.escapePath=f;function m(p){return ge(p),fe.path.convertWindowsPathToPattern(p)}u.convertPathToPattern=m})(c=e.win32||(e.win32={}))})(No||(No={}));function Fo(e,t,r){let n=[].concat(e),o=new Io.default(r),i=al.generate(n,o),s=new t(o);return i.map(s.read,s)}function ge(e){if(![].concat(e).every(n=>fe.string.isString(n)&&!fe.string.isEmpty(n)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}ll.exports=No});var lc=C((hw,ac)=>{"use strict";l();var{hasOwnProperty:Wo}=Object.prototype,Go=(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
|
|
4
|
-
`:`
|
|
5
|
-
`,n=t.whitespace?" = ":"=",o=[],i=t.sort?Object.keys(e).sort():Object.keys(e),s=0;t.align&&(s=Oe(i.filter(u=>e[u]===null||Array.isArray(e[u])||typeof e[u]!="object").map(u=>Array.isArray(e[u])?`${u}[]`:u).concat([""]).reduce((u,f)=>Oe(u).length>=Oe(f).length?u:f)).length);let a="",c=t.bracketedArray?"[]":"";for(let u of i){let f=e[u];if(f&&Array.isArray(f))for(let m of f)a+=Oe(`${u}${c}`).padEnd(s," ")+n+Oe(m)+r;else f&&typeof f=="object"?o.push(u):a+=Oe(u).padEnd(s," ")+n+Oe(f)+r}t.section&&a.length&&(a="["+Oe(t.section)+"]"+(t.newline?r+r:r)+a);for(let u of o){let f=ic(u,".").join("\\."),m=(t.section?t.section+".":"")+f,p=Go(e[u],{...t,section:m});a.length&&p.length&&(a+=r),a+=p}return a};function ic(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 oc=(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 u of s){if(!u||u.match(/^\s*[;#]/)||u.match(/^\s*$/))continue;let f=u.match(i);if(!f)continue;if(f[1]!==void 0){if(o=Fr(f[1]),o==="__proto__"){n=Object.create(null);continue}n=r[o]=r[o]||Object.create(null);continue}let m=Fr(f[2]),p;t.bracketedArray?p=m.length>2&&m.slice(-2)==="[]":(a[m]=(a?.[m]||0)+1,p=a[m]>1);let y=p?m.slice(0,-2):m;if(y==="__proto__")continue;let h=f[3]?Fr(f[4]):!0,v=h==="true"||h==="false"||h==="null"?JSON.parse(h):h;p&&(Wo.call(n,y)?Array.isArray(n[y])||(n[y]=[n[y]]):n[y]=[]),Array.isArray(n[y])?n[y].push(v):n[y]=v}let c=[];for(let u of Object.keys(r)){if(!Wo.call(r,u)||typeof r[u]!="object"||Array.isArray(r[u]))continue;let f=ic(u,".");n=r;let m=f.pop(),p=m.replace(/\\\./g,".");for(let y of f)y!=="__proto__"&&((!Wo.call(n,y)||typeof n[y]!="object")&&(n[y]=Object.create(null)),n=n[y]);n===r&&p===m||(n[p]=r[u],c.push(u))}for(let u of c)delete r[u];return r},sc=e=>e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"),Oe=e=>typeof e!="string"||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&sc(e)||e!==e.trim()?JSON.stringify(e):e.split(";").join("\\;").split("#").join("\\#"),Fr=(e,t)=>{if(e=(e||"").trim(),sc(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};ac.exports={parse:oc,decode:oc,stringify:Go,encode:Go,safe:Oe,unsafe:Fr}});l();import Wx from"node:process";import Gx from"yargs";import{hideBin as Kx}from"yargs/helpers";var it="0.20.1";l();var me=Q(ee(),1),Gl=Q(wr(),1);import{dirname as Hg,join as jg,resolve as Lr}from"node:path";import{readFile as Bg}from"node:fs/promises";import Lt from"fs-extra";import qg from"gray-matter";import Ug from"markdown-it";import{Feed as Wg}from"feed";import tt from"consola";l();import cl from"fs-extra";l();import{spawn as eg}from"cross-spawn";function Ot(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=eg("git",o),s="";i.stdout.on("data",a=>s+=String(a)),i.on("close",()=>{r(+new Date(s))}),i.on("error",()=>{r(0)})})}async function ul(e){return await Ot(e,"created")||(await cl.stat(e)).ctime}async function fl(e){return await Ot(e,"created")||(await cl.stat(e)).mtime}l();import gl,{CORE_SCHEMA as tg}from"js-yaml";l();var pl="<!-- more -->",mt=/^https?:/i,ml=/^pathname:\/\//,qb="/:all(.*)*",dl=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"]),dt={css:{preprocessorOptions:{scss:{api:"modern-compiler"}}}};var De={excerpt_separator:pl,engines:{yaml:{parse:e=>gl.load(e,{schema:tg}),stringify:e=>gl.dump(e)}}};l();var jl=Q(wr(),1),je=Q(ee(),1);import{dirname as Lg}from"node:path";import Fl from"node:process";import{resolve as Vt}from"pathe";import Hl from"fs-extra";import Mg from"debug";import{ensureSuffix as Dl,uniq as Ig}from"@antfu/utils";import Bl from"defu";import ql from"consola";l();l();import{resolvePath as rg}from"mlly";import{resolveGlobal as ng}from"resolve-global";import hl from"consola";var og={};async function Ce(e,t=!1){try{return await rg(e,{url:import.meta.url})}catch(r){hl.log(r)}if(og.value)try{return ng(e)}catch{}if(t)throw new Error(`Failed to resolve package ${e}`);hl.warn(`Failed to resolve package ${e}`)}l();function yl(e){return mt.test(e)}function ig(e){return e.replace(/\\/g,"/")}function Do(e,t){return t.startsWith(e)?t:e+t}function U(e){return`/@fs${Do("/",ig(e))}`}function xl(e){return e.startsWith("/")||/^\.\.?[\/\\]/.test(e)}function vl(e){return`JSON.parse(${JSON.stringify(JSON.stringify(e))})`}l();l();import sg from"node:process";import ag from"fs-extra";import{createJiti as lg}from"jiti";import{resolve as cg}from"pathe";import _l from"consola";var ug=lg(import.meta.url,{moduleCache:!1});async function fg(e){let{name:t,cwd:r}=e,n=cg(r,`${t}.config.ts`),o={};if(await ag.exists(n))try{o=await ug.import(n,{default:!0})}catch{_l.error(`Failed to load config file: ${n}`)}else _l.debug(`Config file not found: ${n}`);return{config:o,configFile:n}}async function gt(e,t={}){let{config:r,configFile:n}=await fg({name:e,cwd:t.cwd||sg.cwd()}),o=r;return typeof r=="function"&&(o=await r(t.valaxyOptions||{})),{config:o,configFile:n}}l();var yt=Q(ee(),1);import gg from"node:process";import{createDefu as hg}from"defu";import{mergeConfig as yg}from"vite";import{isFunction as Rl}from"@antfu/utils";import xg from"consola";l();function He(){let e=performance.now();return()=>{let r=performance.now()-e;return r>1e3?`${(r/1e3).toFixed(2)}s`:`${r.toFixed(2)}ms`}}l();var ht=Q(ee(),1);import{webcrypto as bl}from"node:crypto";import pg from"consola";import{options as mg}from"floating-vue";var Er={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:{}},floatingVue:mg,statistics:{enable:!1,readTime:{speed:{cn:300,en:100}}},pageSize:7,encrypt:{enable:!1,algorithm:"AES-CBC",salt:bl.getRandomValues(new Uint8Array(16)),iv:bl.getRandomValues(new Uint8Array(16))},redirects:{useVueRouter:!0,rules:[]}};function CR(e){return e}async function dg(e){return gt("site",{cwd:e})}async function Ar(e){let t=He(),{config:r,configFile:n}=await dg(e),o=t();return r&&n&&pg.success(`Resolve ${(0,ht.cyan)("siteConfig")} from ${(0,ht.dim)(n)} ${(0,ht.yellow)(o)}`),{siteConfig:r,siteConfigFile:n}}var Cl={siteConfig:Er,theme:"yun",themeConfig:{pkg:{name:"",version:""}},build:{ssgForPagination:!1},deploy:{},runtimeConfig:{addons:{},redirects:{useVueRouter:!0,redirectRoutes:[]}},modules:{rss:{enable:!0,fullText:!1}},features:{katex:!0},vite:{build:{rollupOptions:{external:[]}}},devtools:!0};function vg(e){return e}var LR=vg;async function Tt(e,t){return await gt("valaxy",{cwd:e,valaxyOptions:t})}var et=hg((e,t,r)=>{if(Rl(e[t])&&Rl(r)&&(e[t]=function(...n){e[t].call(this,...n),r.call(this,...n)}),t==="vite")return e[t]=yg(e[t],r),!0});async function Sl(e){let t=e.userRoot||gg.cwd(),r=He(),{config:n,configFile:o}=await Tt(t),i=r();o&&n&&Object.keys(n).length!==0&&xg.success(`Resolve ${(0,yt.cyan)("userValaxyConfig")} from ${(0,yt.dim)(o)} ${(0,yt.yellow)(i)}`);let s=e.theme||n?.theme||"yun";return{config:n,configFile:o,theme:s}}l();import _g from"node:path";import bg from"fs-extra";function Rg(e){return e}var HR=Rg;async function wl(e,t){let r={};for(let n of e){let o=_g.resolve(n.root,"valaxy.config.ts");if(!await bg.exists(o))continue;let{config:i,configFile:s}=await Tt(n.root,t);i&&(n.configFile=s,r=et(i,r))}return r}l();var Or=Q(ee(),1);import Eg from"defu";l();var Al=Q(ee(),1);import wg from"consola";l();import El from"node:process";import Cg from"node:fs";import Sg from"node:path";function $t(){return El.env.NODE_ENV==="production"}function Ho(e="development"){El.env.NODE_ENV=e,Se.level=$t()?2:3}function xt(){return Ho("production")}function Pr(e){let t=Cg.existsSync(Sg.resolve(e,"pages"));return t||Se.error(`No pages directory found in ${e}`),t}var Se=wg.create({level:$t()?2:3}),jo=`${(0,Al.magenta)("valaxy")}:`,vt={success:e=>Se.success(jo,e),info:e=>Se.info(jo,e),ready:e=>Se.ready(jo,e)};async function kr(e){return gt("theme",{cwd:e})}async function Pl(e){let{config:t,configFile:r}=await kr(e.userRoot);if(t&&r&&Se.info(`Resolve ${(0,Or.cyan)("themeConfig")} from ${(0,Or.dim)(r)}`),e?.themeRoot){let{config:n}=await kr(e.themeRoot);t=Eg(t||{},n)}return{themeConfig:t,themeConfigFile:r}}function Ag(e){return e}var rC=Ag;function iC(e){return e}l();var we=Q(ee(),1);import Ll from"node:process";import{resolve as kg}from"pathe";import Tl from"fs-extra";import $l from"defu";import Og from"ora";l();import{dirname as kl}from"node:path";import{resolve as Ol}from"pathe";import Pg from"fs-extra";async function Tr(e,t){if(!e)return"";if(xl(e))if(t){let r=Pg.lstatSync(t).isFile();return Ol(r?kl(t):t,e)}else throw new Error(`entry is required when ${e} is path`);else return Ol(kl(await Ce(`${e}/package.json`)||""))}async function Ml(e,t=Ll.cwd()){let r=Og(`Resolve ${(0,we.cyan)("addons")} from ${(0,we.dim)(t)}`).start(),n={},o=s=>{s&&(n[s.name]=$l(n[s.name]||{},s))};if(Array.isArray(e))for(let s of e){if(typeof s=="string"){o(await Vl(s,{cwd:t}));continue}typeof s=="object"&&o($l(await Vl(s.name,{cwd:t}),s||{}))}r.succeed();let i=Object.values(n).filter(s=>s.enable);return i.forEach((s,a)=>{console.log(` ${a===i.length-1?"\u2514\u2500":"\u251C\u2500"} ${(0,we.yellow)(s.name)} ${(0,we.blue)(`v${s.pkg?.version}`)}${s.global?(0,we.cyan)(" (global)"):""} ${(0,we.dim)(s.pkg.homepage||s.pkg.repository?.url||s.pkg.repository||"")}`)}),i}async function Vl(e,t={}){let r=await Tg(e,t.cwd||Ll.cwd()),n=kg(r,"./package.json");if(!await Tl.exists(n)){Se.error(`No addon named ${e} found`);return}let o=await Tl.readJSON(n);return{enable:!0,name:o.name,global:!!o.global,root:r,options:{},props:{},pkg:o}}async function Tg(e,t){let r=e.startsWith("valaxy-addon")||e.startsWith(".")?e:`valaxy-addon-${e}`;return await Tr(r,t)}l();async function Il(e,t){let r=e.startsWith("valaxy-theme")||e.startsWith(".")?e:`valaxy-theme-${e}`;return await Tr(r,t)}l();import{writeFile as $g}from"node:fs/promises";import{ensureFile as Vg}from"fs-extra";function $r(e){return e==="/"?"/index":e.endsWith("/")?e.slice(0,-1):e}function Vr(e){if(!e)return[];let t=[];for(let r of e)if(Array.isArray(r.from))for(let n of r.from)t.push({from:$r(n),to:$r(r.to)});else t.push({from:$r(r.from),to:$r(r.to)});return t}async function Nl(e,t){await Vg(t),await $g(t,`
|
|
6
|
-
<!DOCTYPE html>
|
|
7
|
-
<html lang="en">
|
|
8
|
-
<head>
|
|
9
|
-
<meta charset="UTF-8">
|
|
10
|
-
<meta http-equiv="refresh" content="0; url=${e}">
|
|
11
|
-
<link rel="canonical" href="${e}">
|
|
12
|
-
</head>
|
|
13
|
-
<script>
|
|
14
|
-
window.location.href = '${e}' + window.location.search + window.location.hash
|
|
15
|
-
</script>
|
|
16
|
-
</html>
|
|
17
|
-
`)}var Ng=Mg("valaxy:options");async function Fg(e){let{config:t,themeRoot:r,theme:n}=e,o=t.siteConfig;o.url=Dl("/",o.url||""),o.cdn.prefix=Dl("/",o.cdn.prefix||"");let i=Vt(r,"package.json");try{t.themeConfig.pkg=await Hl.readJson(i,"utf-8")}catch{console.error(`valaxy-theme-${n} doesn't have package.json`)}}async function Bo(e,t){let{clientRoot:r,themeRoot:n,userRoot:o}=e,i=await Ml(t.addons||[],e.userRoot),s=await wl(i,e);t=et(t,s);let a=Bl(t,Cl);e.config={...a,runtimeConfig:{addons:{},redirects:{useVueRouter:!0,redirectRoutes:[]}}},e.addons=i,i.forEach(m=>{e.config.runtimeConfig.addons[m.name]=m});let c=i.map(({root:m})=>m),u=i.map(({name:m})=>m);e.addonRoots=c,e.roots=Ig([r,n,...c,o]);let f=e.config.vite?.build?.rollupOptions?.external||[];return e.config.vite.build.rollupOptions.external=f.filter(m=>!u.includes(m)),await Fg(e),e}async function pe(e={userRoot:Fl.cwd()},t="dev"){let r=Lg(await Ce("valaxy/package.json",!0)),n=Vt(r,"client"),o=Vt(e.userRoot||Fl.cwd());ql.start(`Resolve ${(0,je.magenta)("valaxy")} config...`);let[i,s,a,c]=await Promise.all([Sl(e),Ar(e.userRoot),kr(e.userRoot),(0,jl.default)(["**.md"],{cwd:Vt(o,"pages"),ignore:["**/node_modules"]})]),{config:u,configFile:f,theme:m}=i,p=await Il(m,e.userRoot),{siteConfig:y,siteConfigFile:h}=s,{config:v,configFile:k}=a,w=Vr(y.redirects?.rules);u=Bl({siteConfig:y},{themeConfig:v},u);let $={mode:t,pkgRoot:r,tempDir:Vt(o,".valaxy"),clientRoot:n,userRoot:o,themeRoot:p,addonRoots:[],roots:[],theme:m,config:{...u,runtimeConfig:{addons:{},redirects:{useVueRouter:!0,redirectRoutes:[]}}},configFile:f||"",siteConfigFile:h||"",themeConfigFile:k||"",pages:c.sort(),addons:[],redirects:w,env:{id:"",links:[]}};Ng($);let E=await qo($),V=et(u,E);return $=await Bo($,V),Hl.ensureDirSync($.tempDir),$}async function qo(e){let t=He(),{config:r}=await Tt(e.themeRoot,e),n=t();return r&&ql.success(`Resolve ${(0,je.cyan)("valaxy.config.ts")} from ${(0,je.blue)(`theme(${e.theme})`)} ${(0,je.yellow)(n)}`),r}l();function Be(e){return e.positional("root",{default:".",type:"string",describe:"root folder of your source files"})}l();function Ul(e,t){t.forEach(r=>{r.setup?.(e)})}var Gg=Ug({html:!0,breaks:!0,linkify:!0});async function Wl(e){tt.info(`${(0,me.yellow)("RSS Generating ...")}`);let{config:t}=e,r=t.siteConfig;if(!r.url||r.url==="/"){tt.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};tt.info(`RSS Site Url: ${(0,me.cyan)(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`},c={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(w=>{c.feedLinks[w]=`${n}${a[w]}`});let u=await(0,Gl.default)(`${e.userRoot}/pages/posts/**/*.md`),f=e.config.siteConfig.lang||"en",m=[];for await(let w of u){let $=await Bg(w,"utf-8"),{data:E,content:V,excerpt:A}=qg($,De);if(E.password)continue;if(E.draft){tt.warn(`Ignore draft post: ${(0,me.dim)(w)}`);continue}if(E.hide)continue;let L=w;E.date||(E.date=await ul(L)),r.lastUpdated&&(E.updated||(E.updated=await fl(L)));let O=e.config.modules.rss.fullText,P=O?V:A||V.slice(0,100),F=Gg.render(P).replace('src="/',`src="${o}/`);E.image?.startsWith("/")&&(E.image=o+E.image);let W=o+w.replace(`${e.userRoot}/pages`,"").replace(/\.md$/,""),b=`<br/><p>${f==="zh-CN"?`\u8BBF\u95EE <a href="${W}" target="_blank">${W}</a> ${O?"\u67E5\u770B\u539F\u6587":"\u9605\u8BFB\u5168\u6587"}\u3002`:`Visit <a href="${W}" target="_blank">${W}</a> to ${O?"view original article":"read more"}.`}</p>`;m.push({title:"",...E,date:new Date(E.date),published:new Date(E.updated||E.date),content:F+b,author:[i],id:E.id?.toString()||"",link:W})}m.sort((w,$)=>+new Date($.published||$.date)-+new Date(w.published||w.date));let p=r.author?.avatar||"/favicon.svg";c.author=i,c.image=yl(p)?r.author?.avatar:`${o}${Do("/",p)}`,c.favicon=`${o}${r.feed?.favicon||r.favicon}`;let y=new Wg(c);m.forEach(w=>y.addItem(w)),await Lt.ensureDir(Hg(`./dist/${a.atom}`));let h=Lr(e.userRoot,"./dist"),v=Lr(e.userRoot,"public");["rss","atom","json"].forEach(async w=>{let $="",E=`${h}/${a[w]}`;w==="rss"?$=y.rss2():w==="atom"?$=y.atom1():w==="json"&&($=y.json1()),Lt.writeFileSync(E,$,"utf-8"),tt.success(`[${(0,me.cyan)(w)}] dist: ${(0,me.dim)(E)}`);let V=Lr(v,a[w]),A=jg("public",a[w]);Lt.writeFileSync(V,$,"utf-8"),tt.success(`[${(0,me.cyan)(w)}] public: ${(0,me.dim)(E)}`);try{let L=Lr(e.userRoot,".gitignore"),O=await Lt.readFile(L,"utf-8"),P=A.replace(/\\/g,"/");O.includes(P)||(await Lt.appendFile(L,`
|
|
18
|
-
# valaxy rss
|
|
19
|
-
${P}
|
|
20
|
-
`),tt.success(`Add ${(0,me.dim)(P)} to ${(0,me.dim)(".gitignore")}`))}catch{}})}var Mr={extendCli(e){e.command("rss [root]","generate rss feed",t=>Be(t).strict().help(),async({root:t})=>{xt();let r=await pe({userRoot:t},"build");await Wl(r)})},setup(e){e.hook("build:after",()=>{console.log(),Wl(e.options)})}};l();var Kl=Q(wr(),1),Ue=Q(ee(),1);import _t from"node:path";import qe from"fs-extra";import bt from"consola";import Kg from"gray-matter";async function zg(e){bt.start(`Generate List for Fuse Search by (${(0,Ue.cyan)("fuse.js")}) ...`);let t=await(0,Kl.default)(`${e.userRoot}/pages/posts/**/*.md`),r=[];for await(let n of t){let o=qe.readFileSync(n,"utf-8"),{data:i,excerpt:s,content:a}=Kg(o,De);if(i.draft){bt.warn(`Ignore draft post: ${(0,Ue.dim)(n)}`);continue}if(i.hide||i.password)continue;let c=e.config.siteConfig.fuse.options.keys||[],u=n.replace(`${e.userRoot}/pages`,""),f=n.endsWith("index.md")?u.replace(/\/index\.md$/,""):u.replace(/\.md$/,""),m={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(f)};c.includes("content")&&(m.content=a||""),r.push(m)}return r}async function zl(e){bt.info("Start generate fuse list...");let t=await zg(e);await qe.ensureDir("./dist");let r=_t.resolve(e.userRoot,"public"),n=_t.resolve(r,e.config.siteConfig.fuse.dataPath),o=_t.join("public",e.config.siteConfig.fuse.dataPath);await qe.ensureFile(n),qe.writeJSONSync(n,t),bt.success(`Generate fuse list in ${(0,Ue.dim)(r)}`);let i=_t.resolve(e.userRoot,"dist"),s=_t.resolve(i,e.config.siteConfig.fuse.dataPath);await qe.ensureDir(i),qe.writeJSONSync(s,t),bt.success(`Generate fuse list in ${(0,Ue.dim)(i)}`);try{let a=_t.resolve(e.userRoot,".gitignore"),c=await qe.readFile(a,"utf-8"),u=o.replace(/\\/g,"/");c.includes(u)||(await qe.appendFile(a,`
|
|
21
|
-
# valaxy fuse
|
|
22
|
-
${u}
|
|
23
|
-
`),bt.success(`Add ${(0,Ue.dim)(u)} to ${(0,Ue.dim)(".gitignore")}`))}catch{}}function Yg(e){e.command("fuse [root]","generate fuse list for search",t=>Be(t).strict().help(),async({root:t})=>{xt();let r=await pe({userRoot:t},"build");await zl(r)})}var Ir={extendCli(e){Yg(e)},setup(e){e.hook("build:before",async()=>{await zl(e.options)})}};l();l();var Nr=Q(ee(),1);import{join as eh,resolve as Ql}from"node:path";import{writeFile as th}from"node:fs/promises";import{render as rh}from"ejs";import{ensureSuffix as nh}from"@antfu/utils";import{consola as Uo}from"consola";import{format as oh}from"date-fns";l();import{access as Xg}from"node:fs/promises";async function rt(e){try{return await Xg(e),!0}catch{return!1}}l();import Jg from"node:path";import{readFile as Zg}from"node:fs/promises";l();import Qg from"node:process";var Mt=Qg.cwd(),Yl=`---
|
|
24
|
-
layout: <%=layout%>
|
|
25
|
-
title: <%=title%>
|
|
26
|
-
date: <%=date%>
|
|
27
|
-
---
|
|
28
|
-
`;async function Xl(e){let{clientRoot:t,themeRoot:r}=await pe({userRoot:Mt}),n=[Mt,r,t];for(let o of n){let i=Jg.resolve(o,"scaffolds",`${e}.md`);if(await rt(i))return Zg(i,"utf-8")}return!1}async function Jl(e){let t=Ql(Mt,"pages"),{path:r,title:n}=e,o=r||eh("posts",n),i=0;for(;;){let s=Ql(t,o);if(i&&(s=`${s}-${i}`),s=nh(".md",s),!await rt(s)){let a=await ih(e);try{await th(s,a,"utf-8"),Uo.success(`[valaxy new]: successfully generated file ${(0,Nr.magenta)(s)}`)}catch(c){console.log(c),Uo.error(`[valaxy new]: failed to write file ${s}`),Uo.warn(`You should run ${(0,Nr.green)("valaxy new")} in your valaxy project root directory.`)}return s}i++}}async function ih({date:e,title:t,layout:r="post"}){let n=await Xl(r);return n||(n=Yl),rh(n,{title:t,layout:r,date:e?oh(new Date,"yyyy-MM-dd HH:mm:ss"):""})}function Zl(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 Jl({title:t,date:n,layout:o,path:r})})}l();var St=Q(ee(),1);import yi from"node:path";import Tx from"node:process";import ze from"consola";import{mergeConfig as Tu}from"vite";l();var Cu=Q(ee(),1);import{join as _u,resolve as bu}from"node:path";import{mergeConfig as Ru,build as vx}from"vite";import{build as _x}from"vite-ssg/node";import bx from"vite-ssg-sitemap";import Kr from"fs-extra";import zr from"consola";l();import mx from"@vitejs/plugin-vue";import dx from"vite-plugin-vue-layouts";import gx from"unplugin-vue-components/vite";import hx from"@intlify/unplugin-vue-i18n/vite";import yx from"@unhead/addons/vite";import{resolve as xx}from"pathe";import vu from"consola";l();import{resolve as fh}from"node:path";import ph from"fs-extra";import{createJiti as mh}from"jiti";import rc from"defu";import{presetAttributify as dh,presetIcons as gh,presetTypography as hh,presetUno as yh,transformerDirectives as xh,transformerVariantGroup as vh}from"unocss";l();import{resolve as sh}from"node:path";import ah from"fs-extra";import{isObject as lh}from"@antfu/utils";import{createJiti as ch}from"jiti";var uh=ch(import.meta.url);function ec(e,t,r=""){return e={...e},Object.keys(t).forEach(n=>{lh(e[n])?e[n]=ec(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 tc(e,t,r,n,o=!0){let i=n;for(let s of e){let a=sh(s,"setup",t);if(ah.existsSync(a)){let u=await(await uh.import(a,{default:!0}))(r);u!==null&&(i=o?ec(i,u):u)}}return i}var _h=mh(import.meta.url);async function bh(e){let{config:t}=e,n=["animate-fade-in","m-auto","text-left","rotate-y-180",...["i-ri-clipboard-line","i-ri-archive-line","i-ri-folder-2-line","i-ri-price-tag-3-line","i-ri-cloud-line"],...e.config.unocss?.safelist??[]],o=t.siteConfig;if(t.markdown?.blocks){let s=t.markdown.blocks;Object.entries(s).forEach(([a,c])=>{c.icon&&n.push(c.icon)})}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 Rh(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:[yh(t.unocssPresets?.uno),dh(t.unocssPresets?.attributify),gh({scale:1.2,...t.unocssPresets?.icons}),hh(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:[xh(),vh()],safelist:await bh(e)}}async function nc(e){let t=await import("unocss/vite").then(p=>p.default),{unocss:r}=e.config,n=await Rh(e),{themeRoot:o,clientRoot:i,roots:s}=e,a=["uno.config.ts","unocss.config.ts"],c=[];[o,i].forEach(p=>a.forEach(y=>c.push(fh(p,y))));let f={},m=[];for(let p of c)if(await ph.exists(p)){let y=await _h.import(p,{default:!0});f=rc(f,y),m.push(p)}return f=await tc(s,"unocss.ts",{},f,!0),t({configDeps:m,configFile:!1,...rc(r||{},f,n)})}l();import{dirname as Mh,join as Jo,resolve as Ae}from"node:path";import{mergeConfig as Ih,searchForWorkspaceRoot as Zo}from"vite";l();import Ph from"node:fs";import kh from"node:path";import{fileURLToPath as Oh}from"node:url";l();var uc=Q(lc(),1);import J from"node:process";import Z from"node:path";import Ko from"node:os";import Dr from"node:fs";var Nt=J.platform==="win32",cc=e=>{try{return uc.default.parse(Dr.readFileSync(e,"utf8")).prefix}catch{}},Ch=()=>Object.keys(J.env).reduce((e,t)=>/^npm_config_prefix$/i.test(t)?J.env[t]:e,void 0),Sh=()=>{if(Nt&&J.env.APPDATA)return Z.join(J.env.APPDATA,"/npm/etc/npmrc");if(J.execPath.includes("/Cellar/node")){let e=J.execPath.slice(0,J.execPath.indexOf("/Cellar/node"));return Z.join(e,"/lib/node_modules/npm/npmrc")}if(J.execPath.endsWith("/bin/node")){let e=Z.dirname(Z.dirname(J.execPath));return Z.join(e,"/etc/npmrc")}},wh=()=>{if(Nt){let{APPDATA:e}=J.env;return e?Z.join(e,"npm"):Z.dirname(J.execPath)}return Z.dirname(Z.dirname(J.execPath))},Eh=()=>{let e=Ch();if(e)return e;let t=cc(Z.join(Ko.homedir(),".npmrc"));if(t)return t;if(J.env.PREFIX)return J.env.PREFIX;let r=cc(Sh());return r||wh()},It=Z.resolve(Eh()),fc=()=>{if(Nt&&J.env.LOCALAPPDATA){let e=Z.join(J.env.LOCALAPPDATA,"Yarn");if(Dr.existsSync(e))return e}return!1},Ah=()=>{if(J.env.PREFIX)return J.env.PREFIX;let e=fc();if(e)return e;let t=Z.join(Ko.homedir(),".config/yarn");if(Dr.existsSync(t))return t;let r=Z.join(Ko.homedir(),".yarn-config");return Dr.existsSync(r)?r:It},Ee={};Ee.npm={};Ee.npm.prefix=It;Ee.npm.packages=Z.join(It,Nt?"node_modules":"lib/node_modules");Ee.npm.binaries=Nt?It:Z.join(It,"bin");var pc=Z.resolve(Ah());Ee.yarn={};Ee.yarn.prefix=pc;Ee.yarn.packages=Z.join(pc,fc()?"Data/global/node_modules":"global/node_modules");Ee.yarn.binaries=Z.join(Ee.yarn.packages,".bin");var zo=Ee;l();import Yo from"node:path";function Hr(e,t){let r=Yo.relative(t,e);return!!(r&&r!==".."&&!r.startsWith(`..${Yo.sep}`)&&r!==Yo.resolve(e))}var mc=kh.dirname(Oh(import.meta.url)),Th=(()=>{try{return Hr(mc,zo.yarn.packages)||Hr(mc,Ph.realpathSync(zo.npm.packages))}catch{return!1}})(),dc=Th;import{uniq as hc}from"@antfu/utils";l();import{join as Xo}from"node:path";import Qo from"fs-extra";import{uniq as $h}from"@antfu/utils";import{loadConfigFromFile as Vh,mergeConfig as Lh}from"vite";async function jr({userRoot:e,themeRoot:t},r){let n={mode:"development",command:r},o={},i=$h([t,e]).map(s=>Xo(s,"vite.config.ts"));for await(let s of i){if(!Qo.existsSync(s))continue;let a=await Vh(n,s);a?.config&&(o=Lh(o,a.config))}return o}async function gc({clientRoot:e,themeRoot:t,userRoot:r,config:n},o){let i=o,s="",a="";n.siteConfig.favicon&&(s+=`<link rel="icon" href="${n.siteConfig.favicon}">`);let c=[r,t];n.siteConfig.mode==="auto"&&(s+=`
|
|
29
|
-
<script>
|
|
30
|
-
;(function () {
|
|
31
|
-
const prefersDark =
|
|
32
|
-
window.matchMedia &&
|
|
33
|
-
window.matchMedia('(prefers-color-scheme: dark)').matches
|
|
34
|
-
const setting = localStorage.getItem('vueuse-color-scheme') || 'auto'
|
|
35
|
-
if (setting === 'dark' || (prefersDark && setting !== 'light'))
|
|
36
|
-
document.documentElement.classList.toggle('dark', true)
|
|
37
|
-
})()
|
|
38
|
-
</script>
|
|
39
|
-
`,s+=`<style type="text/css">
|
|
40
|
-
:root { color-scheme: light dark; --va-c-bg: #fff; }
|
|
41
|
-
html.dark { --va-c-bg: #000; }
|
|
42
|
-
html { background-color: var(--va-c-bg); }
|
|
43
|
-
</style>`),n.siteConfig.lang&&(s+=`
|
|
44
|
-
<script>
|
|
45
|
-
const locale = localStorage.getItem('valaxy-locale') || '${n.siteConfig.lang}';
|
|
46
|
-
document.documentElement.setAttribute('lang', locale);
|
|
47
|
-
</script>
|
|
48
|
-
`);for(let u of c){let f=Xo(u,"index.html");if(!Qo.existsSync(f))continue;let m=await Qo.readFile(f,"utf-8");s+=`
|
|
49
|
-
${(m.match(/<head>([\s\S]*?)<\/head>/im)?.[1]||"").trim()}`,a+=`
|
|
50
|
-
${(m.match(/<body>([\s\S]*?)<\/body>/im)?.[1]||"").trim()}`}return i=i.replace("__ENTRY__",U(Xo(e,"main.ts"))).replace("<!-- head -->",s).replace("<!-- body -->",a),i}var Nh=["@unhead/schema-org","@unhead/vue","@vueuse/integrations/useFuse","defu","katex","nprogress","unocss","vue","vue-router","vue-i18n","fuse.js","medium-zoom","vanilla-lazyload","@vue/devtools-api"],yc=["@docsearch/css","@vueuse/core","@vueuse/shared","@unocss/reset","unocss","vue","vue-router","vue-demi","@vue/devtools-api","meting","valaxy","/@valaxyjs/config","/@valaxyjs/context","/@valaxyjs/addons","/@valaxyjs/locales","/@valaxyjs/styles"];function xc(e){let t=e.addons.map(r=>Object.keys(r.pkg.dependencies||{})).flat();return{name:"valaxy:site",enforce:"pre",async config(r){let n={root:e.clientRoot,cacheDir:Jo(e.userRoot,"node_modules/.vite"),publicDir:Jo(e.userRoot,"public"),define:ei(e),resolve:{alias:await Fh(e),dedupe:["vue"]},optimizeDeps:{entries:[Ae(e.clientRoot,"main.ts")],include:hc([...Nh,...t]).filter(o=>!yc.includes(o)),exclude:yc},server:{fs:{allow:hc([Zo(e.clientRoot),Zo(e.themeRoot),Zo(e.userRoot),Mh(await Ce("katex/package.json",!0))])}}};return dc&&(n.cacheDir=Jo(e.pkgRoot,"node_modules/.vite"),n.resolve.alias.vue=`${Ce("vue/dist/vue.esm-browser.js",!0)}`),Ih(r,n)},async transformIndexHtml(r){return r=await gc(e,r),{html:r,tags:[]}}}}function ei(e){return{__VUE_PROD_DEVTOOLS__:!1,__INTLIFY_PROD_DEVTOOLS__:!1}}async function Fh(e){let t=[{find:"~/",replacement:`${U(e.userRoot)}/`},{find:"valaxy/client/",replacement:`${U(e.clientRoot)}/`},{find:"valaxy/package.json",replacement:U(Ae(e.clientRoot,"../package.json"))},{find:/^valaxy$/,replacement:U(Ae(e.clientRoot,"index.ts"))},{find:"@valaxyjs/client/",replacement:`${U(e.clientRoot)}/`},{find:"virtual:valaxy-theme",replacement:`${U(e.themeRoot)}/client/index.ts`},{find:`valaxy-theme-${e.theme}/client`,replacement:`${U(Ae(e.themeRoot))}/client/index.ts`},{find:`valaxy-theme-${e.theme}/`,replacement:`${U(Ae(e.themeRoot))}/`},{find:`valaxy-theme-${e.theme}`,replacement:`${U(Ae(e.themeRoot))}/client/index.ts`}];return e.config.siteConfig.encrypt.enable&&t.push({find:/^vue$/,replacement:await Ce("vue/dist/vue.esm-bundler.js",!0)}),e.addons.forEach(r=>{t.push({find:`${r.name}/client/`,replacement:`${U(`${Ae(r.root)}`)}/client/`}),t.push({find:`${r.name}/App.vue`,replacement:`${U(Ae(r.root))}/App.vue`}),t.push({find:r.name,replacement:`${U(Ae(r.root))}/client/index.ts`})}),t.push({find:/^valaxy-addon-(.*)$/,replacement:U(Ae(e.clientRoot,"./addons/index.ts"))}),t}l();import{existsSync as Dh}from"node:fs";import{join as Hh,resolve as jh}from"node:path";import{slash as Bh,uniq as qh}from"@antfu/utils";function vc({clientRoot:e,themeRoot:t,userRoot:r}){let n=Bh(jh(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=[],c=[];return qh([t,r]).map(f=>Hh(f,"setup",s)).forEach((f,m)=>{if(!Dh(f))return;a.push(`import __n${m} from '${U(f)}'`);let p=`__n${m}`;/\binjection_return\b/g.test(o)&&(p=`injection_return = ${p}`),/\binjection_arg\b/g.test(o)?p+="(injection_arg)":p+="()",c.push(`// ${f}`,p)}),o=o.replace("/* __imports__ */",a.join(`
|
|
51
|
-
`)),o=o.replace("/* __injections__ */",c.join(`
|
|
52
|
-
`)),o}return null}}}l();import{objectEntries as Uh}from"@antfu/utils";function _c(e){let t=Uh(ei(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}}}]}l();import Fy from"unplugin-vue-router/vite";import di from"fs-extra";import{resolve as Dy}from"pathe";import{convert as Hy}from"html-to-text";import jy from"markdown-it";import By from"gray-matter";l();import{existsSync as Wh,readFileSync as Gh}from"node:fs";function Kh(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 zh({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 Yh({cn:e,en:t}){let r=e+t;return r<1e3?r.toString():`${Math.round(r/100)/10}k`}function Xh(e,t){let r=Kh(e);return{countData:r,wordCount:Yh(r),readingTime:zh(r,t.readTime)}}function bc({route:e,options:t}){let r=e.components.get("default")||"";if(Wh(r)){let n=Gh(r,"utf-8"),{wordCount:o,readingTime:i}=Xh(n,{readTime:Object.assign({speed:{cn:300,en:100}},t.readTime)});e.meta.frontmatter&&(e.meta.frontmatter.wordCount||(e.meta.frontmatter.wordCount=o),e.meta.frontmatter.readingTime||(e.meta.frontmatter.readingTime=i))}}l();import tP from"markdown-it";l();l();import{webcrypto as Cc}from"node:crypto";l();var Rc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var Qh=128,We,Ge;function Sc(e){!We||We.length<e?(We=Buffer.allocUnsafe(e*Qh),Cc.getRandomValues(We),Ge=0):Ge+e>We.length&&(Cc.getRandomValues(We),Ge=0),Ge+=e}function Jh(e){return Sc(e-=0),We.subarray(Ge-e,Ge)}function Zh(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),c=o;for(;c--;)if(s+=e[a[c]&n]||"",s.length===i)return s}}}function wc(e,t=21){return Zh(e,t,Jh)}function ti(e=21){Sc(e-=0);let t="";for(let r=Ge-e;r<Ge;r++)t+=Rc[We[r]&63];return t}var Tc=Q(ee(),1);l();function Ec(e=[]){return{name:"@shikijs/transformers:compact-line-options",line(t,r){let n=e.find(o=>o.line===r);return n?.classes&&this.addClassToHast(t,n.classes),t}}}function ey(e,t,r,n=!1){return{name:e,code(o){let i=o.children.filter(a=>a.type==="element"),s=[];i.forEach((a,c)=>{let u;for(let f of a.children){if(f.type!=="element")continue;let m=f.children[0];if(m.type!=="text")continue;let p=!1;m.value=m.value.replace(t,(...y)=>r.call(this,y,a,f,i,c)?(p=!0,""):y[0]),p&&!m.value.trim()&&(u=f)}if(u&&(a.children.splice(a.children.indexOf(u),1),a.children.length===0&&(s.push(a),n))){let f=o.children[o.children.indexOf(a)+1];f&&f.type==="text"&&f.value===`
|
|
53
|
-
`&&s.push(f)}});for(let a of s)o.children.splice(o.children.indexOf(a),1)}}}function ty(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Br(e={},t="@shikijs/transformers:notation-map"){let{classMap:r={},classActivePre:n=void 0}=e;return ey(t,new RegExp(`\\s*(?://|/\\*|<!--|#|--|%{1,2}|;{1,2}|"|')\\s+\\[!code (${Object.keys(r).map(ty).join("|")})(:\\d+)?\\]\\s*(?:\\*/|-->)?\\s*$`),function([o,i,s=":1"],a,c,u,f){let m=Number.parseInt(s.slice(1),10);return u.slice(f,f+m).forEach(p=>{this.addClassToHast(p,r[i])}),n&&this.addClassToHast(this.pre,n),!0})}function Ac(e={}){let{classLineAdd:t="diff add",classLineRemove:r="diff remove",classActivePre:n="has-diff"}=e;return Br({classMap:{"++":t,"--":r},classActivePre:n},"@shikijs/transformers:notation-diff")}function Pc(e={}){let{classMap:t={error:["highlighted","error"],warning:["highlighted","warning"]},classActivePre:r="has-highlighted"}=e;return Br({classMap:t,classActivePre:r},"@shikijs/transformers:notation-error-level")}function kc(e={}){let{classActiveLine:t="focused",classActivePre:r="has-focused"}=e;return Br({classMap:{focus:t},classActivePre:r},"@shikijs/transformers:notation-focus")}function Oc(e={}){let{classActiveLine:t="highlighted",classActivePre:r="has-highlighted"}=e;return Br({classMap:{highlight:t,hl:t},classActivePre:r},"@shikijs/transformers:notation-highlight")}var dE=Symbol("highlighted-lines");import{addClassToHast as ry,bundledLanguages as ny,getHighlighter as oy,isSpecialLang as iy}from"shiki";var sy=wc("abcdefghijklmnopqrstuvwxyz",10);function ay(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"]}))):[]}async function ri(e,t,r=console){let{defaultHighlightLang:n="",codeTransformers:o=[]}=t,i=await oy({themes:typeof e=="object"&&"light"in e&&"dark"in e?[e.light,e.dark]:[e],langs:[...Object.keys(ny),...t.languages||[]],langAlias:t.languageAlias});await t?.shikiSetup?.(i);let s=[Ac(),kc({classActiveLine:"has-focus",classActivePre:"has-focused-lines"}),Oc(),Pc(),{name:"valaxy:add-class",pre(m){ry(m,"vp-code")}},{name:"valaxy:clean-up",pre(m){delete m.properties.tabindex,delete m.properties.style}}],a=/-vue$/,c=/=(\d*)/,u=/:(no-)?line-numbers(=\d*)?$/,f=/\{\{.*?\}\}/g;return(m,p,y)=>{let h=a.test(p)?"":"v-pre";p=p.replace(c,"").replace(u,"").replace(a,"").toLowerCase()||n,p&&!i.getLoadedLanguages().includes(p)&&!iy(p)&&(r.warn(Tc.default.yellow(`
|
|
54
|
-
The language '${p}' is not loaded, falling back to '${n||"txt"}' for syntax highlighting.`)),p=n);let v=ay(y),k=new Map,w=V=>h?V:V.replace(f,A=>{let L=k.get(A);return L||(L=sy(),k.set(A,L)),L}),$=V=>(k.forEach((A,L)=>{V=V.replaceAll(A,L)}),V);m=w(m).trimEnd();let E=i.codeToHtml(m,{lang:p,transformers:[...s,Ec(v),{name:"valaxy:v-pre",pre(V){h&&(V.properties["v-pre"]="")}},{name:"valaxy:empty-line",code(V){V.children.forEach(A=>{A.type==="element"&&A.tagName==="span"&&Array.isArray(A.properties.class)&&A.properties.class.includes("line")&&A.children.length===0&&A.children.push({type:"element",tagName:"wbr",properties:{},children:[]})})}},...o],meta:{__raw:y},...typeof e=="object"&&"light"in e&&"dark"in e?{themes:e,defaultColor:!1}:{theme:e}});return $(E)}}l();import Jc from"markdown-it-anchor";import Py from"markdown-it-attrs";import{full as ky}from"markdown-it-emoji";import Oy from"markdown-it-footnote";import Ty from"markdown-it-task-lists";import $y from"markdown-it-image-figures";l();l();var ly={"&":"&","<":"<",">":">","'":"'",'"':"""},cy=/[&<>'"]/g,nt=e=>e.replace(cy,t=>ly[t]);var ni=(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}${nt(a.content)}`:`${s}${a.content}`,"").trim()},qr=(e,{level:t,shouldAllowHtml:r,shouldAllowNested:n,shouldEscapeText:o,slugify:i,format:s})=>{let a=[],c=[],u=f=>{for(;c.length!==0&&f.level<=c[0].level;)c.shift();c.length===0?(a.push(f),c.push(f)):(c[0].children.push(f),c.unshift(f))};for(let f=0;f<e.length;f+=1){let m=e[f];if(m.type!=="heading_open"||m.level!==0&&!n)continue;let p=Number.parseInt(m.tag.slice(1),10);if(!t.includes(p))continue;let y=e[f+1];if(!y)continue;let h=ni(y,{shouldAllowHtml:r,shouldEscapeText:o}),v=m.attrGet("id")??i(h);u({level:p,title:s?.(h)??h,slug:v,link:`#${v}`,children:[]})}return a},uy=/[\u0000-\u001f]/g,fy=/[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'“”‘’<>,.?/]+/g,py=/[\u0300-\u036F]/g,ot=e=>e.normalize("NFKD").replace(py,"").replace(uy,"").replace(fy,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/^(\d)/,"_$1").toLowerCase();var $c=(e,{level:t=[2,3],shouldAllowNested:r=!1,slugify:n=ot,format:o}={})=>{let i=e.renderer.render.bind(e.renderer);e.renderer.render=(s,a,c)=>(c.headers=qr(s,{level:t,shouldAllowHtml:!1,shouldAllowNested:r,shouldEscapeText:!1,slugify:n,format:o}),i(s,a,c))};l();var Vc="script",Lc="style",Ft="template",my=/^<script\s+.*?\bsetup\b.*?>$/is,dy=({customBlocks:e})=>{let t=Array.from(new Set([Vc,Lc,...e])).join("|");return new RegExp(`^\\s*(?<content>(?<tagOpen><(?<type>${t})\\s?.*?>)(?<contentStripped>.*)(?<tagClose><\\/\\k<type>\\s*>))\\s*$`,"is")},Mc=(e,{customBlocks:t=[]}={})=>{let r=dy({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:Ft,content:`<${Ft}>${a}</${Ft}>`,contentStripped:a,tagOpen:`<${Ft}>`,tagClose:`</${Ft}>`},a};let o=e.renderer.rules.html_block;e.renderer.rules.html_block=(i,s,a,c,u)=>{if(!c.sfcBlocks)return o(i,s,a,c,u);let p=i[s].content.match(r);if(!p)return o(i,s,a,c,u);let y=p.groups;return y.type===Vc?(c.sfcBlocks.scripts.push(y),my.test(y.tagOpen)?c.sfcBlocks.scriptSetup=y:c.sfcBlocks.script=y):y.type===Lc?c.sfcBlocks.styles.push(y):c.sfcBlocks.customBlocks.push(y),""}};l();var Ic=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?ni(r[i+1],{shouldAllowHtml:!1,shouldEscapeText:!1}):"",t(r,n,o)}};l();var gy=({listTag:e,listClass:t,itemClass:r,linkTag:n,linkClass:o})=>{let i=nt(e),s=t?` class="${nt(t)}"`:"",a="li",c=r?` class="${nt(r)}"`:"",u=nt(n),f=o?` class="${nt(o)}"`:"",m=y=>n==="router-link"?` to="${y}"`:` href="${y}"`,p=y=>`<${i}${s}>${y.map(h=>`<${a}${c}><${u}${f}${m(h.link)}>${h.title}</${u}>${h.children.length>0?p(h.children):""}</${a}>`).join("")}</${i}>`;return p},hy=({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],c=n.eMarks[o],u=n.src.slice(a,c).split(" ")[0];if(!e.test(u))return!1;if(s)return!0;n.line=o+1;let f=n.push("toc_open",t,1);f.markup="",f.map=[o,n.line],r&&f.attrSet("class",r);let m=n.push("toc_body","",0);m.markup=u,m.map=[o,n.line],m.hidden=!0;let p=n.push("toc_close",t,-1);return p.markup="",m.map=[o,n.line],!0},Nc=(e,{pattern:t=/^\[\[toc\]\]$/i,slugify:r=ot,format:n,level:o=[2,3],shouldAllowNested:i=!1,containerTag:s="nav",containerClass:a="table-of-contents",listTag:c="ul",listClass:u="",itemClass:f="",linkTag:m="a",linkClass:p=""}={})=>{e.block.ruler.before("heading","toc",hy({pattern:t,containerTag:s,containerClass:a}),{alt:["paragraph","reference","blockquote"]});let y=gy({listTag:c,listClass:u,itemClass:f,linkTag:m,linkClass:p});e.renderer.rules.toc_body=h=>y(qr(h,{level:o,shouldAllowHtml:!0,shouldAllowNested:i,shouldEscapeText:!0,slugify:r,format:n}))};import{cssI18nContainer as Vy}from"css-i18n";l();import Fc from"katex";function Dc(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 yy(e,t){let r,n,o,i;if(e.src[e.pos]!=="$")return!1;if(o=Dc(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=Dc(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 xy(e,t,r,n){let o,i,s,a,c=!1,u=e.bMarks[t]+e.tShift[t],f=e.eMarks[t];if(u+2>f||e.src.slice(u,u+2)!=="$$")return!1;if(u+=2,o=e.src.slice(u,f),n)return!0;for(o.trim().slice(-2)==="$$"&&(o=o.trim().slice(0,-2),c=!0),s=t;!c&&(s++,!(s>=r||(u=e.bMarks[s]+e.tShift[s],f=e.eMarks[s],u<f&&e.tShift[s]<e.blkIndent)));)e.src.slice(u,f).trim().slice(-2)==="$$"&&(a=e.src.slice(0,f).lastIndexOf("$$"),i=e.src.slice(u,a),c=!0);e.line=s+1;let m=e.push("math_block","math",0);return m.block=!0,m.content=(o&&o.trim()?`${o}
|
|
55
|
-
`:"")+e.getLines(t+1,s,e.tShift[t],!0)+(i&&i.trim()?i:""),m.map=[t,e.line],m.markup="$$",!0}function oi(e,t){t=t||{};let r=function(s){t.displayMode=!1;try{return Fc.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>${Fc.renderToString(s,t)}</p>`}catch(a){return t.throwOnError&&console.warn(a),s}},i=function(s,a){return`${o(s[a].content)}
|
|
56
|
-
`};e.inline.ruler.after("escape","math_inline",yy),e.block.ruler.after("blockquote","math_block",xy,{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.math_inline=n,e.renderer.rules.math_block=i}l();import si from"markdown-it-container";l();function Hc(e){return e.trim().replace(/=(\d*)/,"").replace(/:(no-)?line-numbers({| |$|=\d*).*/,"").replace(/(-vue|{| ).*$/,"").replace(/^vue-html$/,"template").replace(/^ansi$/,"")}function ii(e){return e.hasSingleTheme?"":" vp-adaptive-theme"}function jc(e,t=!1){return t?e.replace(/<!--[^]*?-->/g,"").match(/data-title="(.*?)"/)?.[1]||"":e.match(/\[(.*)\]/)?.[1]||Hc(e)||"txt"}function vy(e,t){let r=t.frontmatter?.codeHeightLimit||e?.siteConfig?.codeHeightLimit;return r===void 0||r<=0?"":`style="max-height: ${r}px;"`}function Bc(e,t){let r=e.renderer.rules.fence;e.renderer.rules.fence=(...n)=>{let[o,i,s,a]=n,c=o[i];c.info=c.info.replace(/\[.*\]/,"");let u=Hc(c.info),f=r(...n);return`
|
|
57
|
-
<div ${vy(t,a)} class="language-${u}${ii(t)}${/ active( |$)/.test(c.info)?" active":""}">
|
|
58
|
-
<button title="Copy Code" class="copy"></button><span class="lang">${u}</span>${f}<button class="collapse"></button>
|
|
59
|
-
</div>`}}function _y(e,{icon:t,color:r,text:n,langs:o}={}){return[si,e,{render(i,s){let a=i[s],c=a.info.trim().slice(e.length).trim();if(a.nesting===1){if(e==="details")return`<details class="${e} custom-block">${`<summary>${c}</summary>`}
|
|
60
|
-
`;let u="";t&&(u=`<i class="icon ${t}" ${r?`style="color: ${r}"`:""}></i>`);let f=`<span lang="en">${c||n}</span>`;return o&&Object.keys(o).forEach(m=>{f+=`<span lang="${m}">${c||o[m]}</span>`}),`<div class="${e} custom-block"><p class="custom-block-title">${u}${f}</p>
|
|
61
|
-
`}else return e==="details"?`</details>
|
|
62
|
-
`:`</div>
|
|
63
|
-
`}}]}var qc={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 Uc(e,t,r={}){Object.keys(qc).forEach(o=>{let i={...qc[o],...r[o]||{}};e.use(..._y(o,i))}),e.use(...by(t)),["zh-CN","en"].forEach(o=>{e.use(si,o,{render:(i,s)=>i[s].nesting===1?`<div lang="${o}">
|
|
64
|
-
`:`</div>
|
|
65
|
-
`})})}function by(e){return[si,"code-group",{render(t,r){if(t[r].nesting===1){let n=ti(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 c=jc(a?t[s].content:t[s].info,a);if(c){let u=ti(7);o+=`<input type="radio" name="group-${n}" id="tab-${u}" ${i}><label for="tab-${u}">${c}</label>`,i&&!a&&(t[s].info+=" active"),i=""}}}return`<div class="vp-code-group${ii(e)}"><div class="tabs">${o}</div><div class="blocks">
|
|
66
|
-
`}return`</div></div>
|
|
67
|
-
`}}]}l();var ai=/{([\d,-]+)}/;function Wc(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 c=i.info;if(!c||!ai.test(c))return t(...r);let u=c.replace(ai,"").trim();i.info=u,a=ai.exec(c)[1]}return!a&&(a=s[0],!a||!/[\d,-]+/.test(a))?t(...r):(i.info+=` ${a}`,t(...r))}}l();import{URL as Ry}from"node:url";var Cy=/(^|.*\/)index.md(#?.*)$/i;function Gc(e,t,r){e.renderer.rules.link_open=(i,s,a,c,u)=>{let f=i[s],m=f.attrIndex("href");if(m>=0){let p=f.attrs[m],y=p[1];mt.test(y)?(Object.entries(t).forEach(([v,k])=>{f.attrSet(v,k)}),p[1]=y.replace(ml,"")):!y.startsWith("#")&&!y.startsWith("mailto:")&&!/\.(?!html|md)\w+($|\?)/i.test(y)&&n(p,c),p[1]=p[1].replace(/\bimport\.meta/g,"import%2Emeta").replace(/\bprocess\.env/g,"process%2Eenv")}return u.renderToken(i,s,a)};function n(i,s){let a=i[1],c=a.match(Cy);if(c){let[,u,f]=c;a=u+f}else{let u=a.replace(/[?#].*$/,"");u.endsWith(".md")&&(u=u.replace(/\.md$/,s.cleanUrls==="disabled"?".html":"")),s.cleanUrls==="disabled"&&!u.endsWith(".html")&&!u.endsWith("/")&&(u+=".html");let f=new Ry(a,"http://a.com");a=u+f.search+f.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)}}l();function Kc(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 c=1,u=a.match(/=(\d*)/);u&&u[1]&&(c=Number.parseInt(u[1]));let m=o.slice(o.indexOf("<code>"),o.indexOf("</code>")).split(`
|
|
68
|
-
`),y=`<div class="line-numbers-wrapper" aria-hidden="true">${[...Array(m.length)].map((v,k)=>`<span class="line-number">${k+c}</span><br>`).join("")}</div>`;return o.replace(/<\/div>$/,`${y}</div>`).replace(/"(language-[^"]*?)"/,'"$1 line-numbers-mode"')}}l();import zc from"pathe";import li from"fs-extra";var Sy=/^(.+?(?:(?:\.([a-z0-9]+))?))(?:(#[\w-]+))?(?: ?(?:{(\d+(?:[,-]\d+)*)? ?(\S+)?}))? ?(?:\[(.+)\])?$/;function wy(e){let[t="",r="",n="",o="",i="",s=""]=(Sy.exec(e)||[]).slice(1),a=s||t.split("/").pop()||"";return{filepath:t,extension:r,region:n,lines:o,lang:i,title:a}}function Ey(e){let t=e.split(`
|
|
69
|
-
`),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(`
|
|
70
|
-
`):e}function Yc(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 Ay(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(Yc(s,a,t)){o=i+1,n=a;break}}else if(Yc(s,n,t,!0))return{start:o,end:i,regexp:n};return null}function Xc(e,t){let r=(o,i,s,a)=>{let u=o.bMarks[i]+o.tShift[i],f=o.eMarks[i];if(o.sCount[i]-o.blkIndent>=4)return!1;for(let P=0;P<3;++P)if(o.src.charCodeAt(u+P)!==60||u+P>=f)return!1;if(a)return!0;let m=u+3,p=o.skipSpacesBack(f,u),y=o.src.slice(m,p).trim().replace(/^@/,t).trim(),{filepath:h,extension:v,region:k,lines:w,lang:$,title:E}=wy(y);o.line=i+1;let V=o.push("fence","code",0);V.info=`${$||v}${w?`{${w}}`:""}${E?`[${E}]`:""}`;let{realPath:A,path:L}=o.env,O=zc.resolve(zc.dirname(A??L),h);return V.src=[O,k.slice(1)],V.markup="```",V.map=[i,i+1],!0},n=e.renderer.rules.fence;e.renderer.rules.fence=(...o)=>{let[i,s,,{includes:a}]=o,c=i[s],[u,f]=c.src??[];if(!u)return n(...o);a&&a.push(u);let m=li.statSync(u).isFile();if(!li.existsSync(u)||!m)return c.content=m?`Code snippet path not found: ${u}`:"Invalid code snippet option",c.info="",n(...o);let p=li.readFileSync(u,"utf8");if(f){let y=p.split(/\r?\n/),h=Ay(y,f);h&&(p=Ey(y.slice(h.start,h.end).filter(v=>!h.regexp.test(v.trim())).join(`
|
|
71
|
-
`)))}return c.content=p,n(...o)},e.block.ruler.before("fence","snippet",r)}l();function Qc(e){let t=e.renderer.rules.footnote_ref,r=e.renderer.rules.footnote_open,n=e.renderer.rules.footnote_close,o=e.renderer.rules.footnote_anchor;e.renderer.rules.footnote_ref=function(i,s,a,c,u){let f=t(i,s,a,c,u),m=f.match(/href="(.*?)"/)[0],p=f.match(/id="(.*?)"/)[0];return`<ValaxyFootnoteRef ${m} ${p}>${f}</ValaxyFootnoteRef>`},e.renderer.rules.footnote_open=function(i,s,a,c,u){let f=r(i,s,a,c,u);return`<ValaxyFootnoteItem ${f.match(/id="(.*?)"/)[0]}>${f}<ValaxyFootnoteContent>`},e.renderer.rules.footnote_close=function(i,s,a,c,u){return`</ValaxyFootnoteContent>${n(i,s,a,c,u)}</ValaxyFootnoteItem>`},e.renderer.rules.footnote_anchor=function(i,s,a,c,u){let f=o(i,s,a,c,u);return`<ValaxyFootnoteAnchor ${f.match(/href="(.*?)"/)[0]}>${f}</ValaxyFootnoteAnchor>`}}var Ur={light:"github-light",dark:"github-dark"};async function Dt(e,t,r="/"){let n=t?.config.markdown||{},o=n.theme??Ur,i=typeof o=="string"||"name"in o,s=t?.config.siteConfig||{};n.preConfig&&n.preConfig(e),e.use(Wc).use(Bc,{theme:o,siteConfig:s}).use(Xc,t?.userRoot).use(Uc,{hasSingleTheme:i},{...n.blocks,...n?.container}).use(Vy,{languages:t?.config.siteConfig.languages}).use(Gc,{target:"_blank",rel:"noreferrer",...n.externalLinks},r),e.use(Kc,n.lineNumbers),n.attrs?.disable||e.use(Py,n.attrs),e.use(ky).use(Oy).use(Qc),e.use(Jc,{slugify:ot,permalink:Jc.permalink.linkInsideHeader({symbol:"​",renderAttrs:(c,u)=>{let f=u.tokens.findIndex(p=>{let h=p.attrs?.find(v=>v[0]==="id");return h&&c===h[1]});return{"aria-label":`Permalink to "${u.tokens[f+1].content}"`}}}),...n.anchor}),e.use($c,{slugify:ot,...typeof n.headers=="boolean"?void 0:n.headers}).use(Mc,{...n.sfc}).use(Ic).use(Nc,{...n.toc}),e.use(oi,n.katex);let a=t?.config.siteConfig.vanillaLazyload||{enable:!1};return e.use($y,{figcaption:!0,lazy:!0,async:!0,...a.enable?{lazy:!0,async:!0,classes:"lazy"}:{},...n.imageFigures}),e.use(Ty),n.config&&n.config(e),e}l();l();import Ny from"unplugin-vue-markdown/vite";l();import mi from"pathe";import{slash as My}from"@antfu/utils";l();l();import ci from"node:process";var ui=new Set;function Zc(e){if(ui.size===0){let r=typeof ci=="object"&&ci.env.VITE_EXTRA_EXTENSIONS||ci.env?.VITE_EXTRA_EXTENSIONS||"";`3g2,3gp,aac,ai,apng,au,avif,bin,bmp,cer,class,conf,crl,css,csv,dll,doc,eps,epub,exe,gif,gz,ics,ief,jar,jpe,jpeg,jpg,js,json,jsonld,m4a,man,mid,midi,mjs,mov,mp2,mp3,mp4,mpe,mpeg,mpg,mpp,oga,ogg,ogv,ogx,opus,otf,p10,p7c,p7m,p7s,pdf,png,ps,qt,roff,rtf,rtx,ser,svg,t,tif,tiff,tr,ts,tsv,ttf,txt,vtt,wav,weba,webm,webp,woff,woff2,xhtml,xml,yaml,yml,zip${r&&typeof r=="string"?`,${r}`:""}`.split(",").forEach(n=>ui.add(n))}let t=e.split(".").pop();return t==null||!ui.has(t.toLowerCase())}l();import fi from"node:path";import Ly from"fs-extra";function pi(e,t,r){let n=/<!--\s*@include:\s*(.*?)\s*-->/g,o=/\{(\d*),(\d*)\}$/;return t.replace(n,(i,s)=>{if(!s.length)return i;let a=s.match(o);a&&(s=s.slice(0,-a[0].length));let c=s[0]==="@";try{let u=c?fi.join(e,s.slice(s[1]==="/"?2:1)):fi.join(fi.dirname(r),s),f=Ly.readFileSync(u,"utf-8");if(a){let[,m,p]=a;f=f.split(/\r?\n/).slice(m?Number.parseInt(m,10)-1:void 0,p?Number.parseInt(p,10):void 0).join(`
|
|
72
|
-
`)}return f=`<!-- @included: ${s} -->
|
|
73
|
-
${f}`,pi(e,f,u)}catch{return i}})}var Iy=/<!--\s*@included:\s*(.*?)\s*-->/g;function eu(e){let t=e.userRoot;return(r,n)=>pi(t,r,n)}function tu(e,t,r){let n=[],o=mi.dirname(t);return e=e.replace(Iy,(i,s)=>{let c=s.startsWith("@")?mi.resolve(r.userRoot,s.slice(s[1]==="/"?2:1)):mi.join(o,s);return n.push(My(c)),""}),{code:e,includes:n}}l();import*as ru from"js-base64";function nu(e){return e=e.replace(/^````txt\n```mermaid/mg,"````txt\n\\`\\`\\`mermaid"),e=e.replace(/^```mermaid\s*?({.*?})?\n([\s\S]+?)\n```/mg,(t,r="",n="")=>(n=n.trim(),r=r.trim()||"{}",`<ValaxyMermaid :code="'${ru.encode(n,!0)}'" v-bind="${r}" />`)),e=e.replace(/^````txt\n\\`\\`\\`mermaid/mg,"````txt\n```mermaid"),e}async function ou(e){let t=e?.config.markdown||{},r=t.theme??Ur,n=eu(e);return Ny({include:[/\.md$/],wrapperClasses:"",frontmatter:!0,exportFrontmatter:!1,frontmatterOptions:{grayMatterOptions:De},escapeCodeTagInterpolation:!0,markdownItOptions:{quotes:`""''`,html:!0,xhtmlOut:!0,linkify:!0,highlight:await ri(r,t),...t?.markdownItOptions},async markdownItSetup(o){o.linkify.set({fuzzyLink:!1}),await Dt(o,e),e?.config.markdown?.markdownItSetup?.(o);function i(s){s.core.ruler.push("valaxy_md_env",a=>{e.env=a.env})}o.use(i)},transforms:{before(o,i){return o=nu(o),o=n(o,i),o}},...t})}function qy(e="",t="html",r){switch(t){case"ai":case"md":return e;case"html":return r.render(e);case"text":return Hy(r.render(e));default:return e}}async function iu(e){let{options:t}=e,{roots:r,config:n}=t,o=new jy({html:!0});return await Dt(o,t),Fy({extensions:[".vue",".md"],routesFolder:r.map(i=>`${i}/pages`),dts:Dy(t.tempDir,"typed-router.d.ts"),...n.router,async extendRoute(i){let s=JSON.parse(JSON.stringify(n.siteConfig.frontmatter))||{};if(i.meta&&i.meta.frontmatter){let{frontmatter:c,otherMeta:u}=i.meta;i.meta=u}i.addToMeta({frontmatter:s}),(i.fullPath==="/"||i.fullPath==="/page")&&i.addToMeta({layout:"home"}),["/posts","/posts/"].includes(i.fullPath)?i.addToMeta({layout:"posts"}):i.fullPath.startsWith("/posts/")&&i.children.length===0&&i.addToMeta({layout:"post"});let a=i.components.get("default")||"";if(a.endsWith(".md")){let c=di.readFileSync(a,"utf-8"),{data:u,excerpt:f,content:m}=By(c,De),p=u,y=t.config.siteConfig.lastUpdated;if(delete p.password,p.gallery_password&&(delete p.gallery_password,delete p.photos),p.date||(p.date=di.statSync(a).mtime),y&&(p.updated||(p.updated=di.statSync(a).ctime)),p.from&&(Array.isArray(p.from)?p.from.forEach(v=>{t.redirects.push({from:v,to:i.fullPath})}):t.redirects.push({from:p.from,to:i.fullPath})),i.addToMeta({frontmatter:p,excerpt:f?qy(f,p.excerpt_type,o):""}),u.layout&&i.addToMeta({layout:u.layout}),i.meta.frontmatter?.updated||(i.meta.frontmatter.updated=i.meta.frontmatter.date),i.meta.frontmatter.tags){let v=i.meta.frontmatter.tags;typeof v=="string"&&(i.meta.frontmatter.tags=[v])}n.siteConfig.statistics.enable&&bc({options:n.siteConfig.statistics,route:i});let h={route:i,data:u,excerpt:f,content:m,path:a};n.extendMd?.(h)}return await e.hooks.callHook("vue-router:extendRoute",i),n.router?.extendRoute?.(i)}})}l();var Gr=Q(ee(),1);import{join as Ht,relative as ox,resolve as ix}from"pathe";import jt from"fs-extra";import{defu as sx}from"defu";import ax from"pascalcase";import yu from"consola";l();import{LRUCache as ex}from"lru-cache";import tx from"debug";import rx from"pathe";l();import Rt from"pathe";import{slash as Uy}from"@antfu/utils";import Wy from"fs-extra";function su(e){let t=Rt.resolve(e.userRoot,"pages"),{ignoreDeadLinks:r}=e.config,n=e.config.vite?.publicDir||"public";return(o,i)=>{let{links:s=[]}=e.env,a=i,c=i,u=[],f=p=>{u.push({url:p,file:Rt.relative(t,a)})};function m(p){return r?r===!0?!0:r==="localhostLinks"?p.replace(mt,"").startsWith("//localhost"):r.some(y=>typeof y=="string"?p===y:y instanceof RegExp?y.test(p):typeof y=="function"?y(p):!1):!1}if(s){let p=Rt.dirname(c);for(let y of s){let{pathname:h}=new URL(y,"http://a.com");if(!Zc(h))continue;y=y.replace(/[?#].*$/,"").replace(/\.(html|md)$/,""),y.endsWith("/")&&(y+="index");let v=decodeURIComponent(Uy(y.startsWith("/")?y.slice(1):Rt.relative(t,Rt.resolve(p,y)))).replace(/\/index$/,"");!e.pages.includes(v)&&!Wy.existsSync(Rt.resolve(p,n,`${v}.html`))&&!m(y)&&f(y)}}return u}}l();function Gy(e){return["import { provide } from 'vue'","import { useRoute } from 'vue-router'",`
|
|
74
|
-
const data = ${vl(e)}
|
|
75
|
-
const route = useRoute()`,`const $frontmatter = data.frontmatter || {}
|
|
76
|
-
route.meta.frontmatter = Object.assign(route.meta.frontmatter || {}, data.frontmatter || {})
|
|
77
|
-
provide('pageData', data)
|
|
78
|
-
provide('valaxy:frontmatter', $frontmatter)
|
|
79
|
-
`]}function au(e){return(t,r,n)=>{let o=Gy(n),i=e.mode==="dev",s=[...o,i?`
|
|
80
|
-
window.$pageData = data
|
|
81
|
-
window.$frontmatter = $frontmatter
|
|
82
|
-
`:"","globalThis.$frontmatter = $frontmatter"],a=t.indexOf("<script setup>");a!==-1?t=t.slice(0,a+14)+s.join(`
|
|
83
|
-
`)+t.slice(a+14):t=`<script setup>
|
|
84
|
-
${s.join(`
|
|
85
|
-
`)}
|
|
86
|
-
</script>
|
|
87
|
-
${t}`;let c=t.indexOf("<template>")+10,u=t.lastIndexOf("</template>"),f=t.slice(c,u).trim();return f.startsWith("<div>")&&f.endsWith("</div>")&&(f=f.slice(5,-6)),t=`${t.slice(0,c)}
|
|
88
|
-
${lu(f)}
|
|
89
|
-
${t.slice(u)}`,t}}l();import Ky from"pathe";function zy(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 Yy(e){let{description:t,head:r}=e;return t!==void 0?t:r&&zy(r,"description")||""}async function cu(e,t,r){let{frontmatter:n={}}=r.env,o=Ky.relative(r.userRoot,t),i=JSON.parse(JSON.stringify(n)),s={title:i.title||r.env.title||"",titleTemplate:i.titleTemplate,description:Yy(i),frontmatter:i,headers:r.env.headers||[],relativePath:o,path:t};return s.lastUpdated=await Ot(t),s}l();function Xy(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}function uu(e){return t=>{let{frontmatter:r={}}=e.env;return Xy(t,e,r.codeHeightLimit)}}l();l();import{webcrypto as gi}from"node:crypto";function Qy(e){let t=new TextEncoder;return gi.subtle.importKey("raw",t.encode(e),"PBKDF2",!1,["deriveBits","deriveKey"])}function Jy(e,t){return gi.subtle.deriveKey({name:"PBKDF2",salt:t,iterations:1e5,hash:"SHA-256"},e,{name:"AES-CBC",length:256},!0,["encrypt","decrypt"])}async function Wr(e,t){let{password:r,iv:n,salt:o}=t,i=await Qy(r),s=await Jy(i,o),a=new TextEncoder,c=await gi.subtle.encrypt({name:"AES-CBC",iv:n},s,a.encode(e));return String.fromCharCode(...new Uint8Array(c))}function fu(e){let{config:{siteConfig:{encrypt:t}}}=e;return async(r,n,o)=>{let{frontmatter:i={}}=o;if(t.enable){let s=/<!-- valaxy-encrypt-start:(?<password>\w+) -->(?<content>.*?)<!-- valaxy-encrypt-end -->/gs,a=/((<!-- valaxy-encrypt-start:\w+ -->)|(<!-- valaxy-encrypt-end -->))/g;if(i.password)r=r.replaceAll(a,"");else{let c=[];for(let f of r.matchAll(s))c.push(await Wr(f.groups.content,{password:f.groups.password,iv:t.iv,salt:t.salt}));let u=0;c.length&&(i.partiallyEncryptedContents=c,r=r.replaceAll(s,()=>`<ClientOnly><ValaxyDecrypt :encrypted-content="${`$frontmatter.partiallyEncryptedContents[${u++}]`}" /></ClientOnly>`))}if(i.password){let c=r.indexOf("<template>"),u=r.lastIndexOf("</template>"),f=r.slice(c+10,u),m=await Wr(f,{password:i.password,iv:t.iv,salt:t.salt});i.encryptedContent=m,i.encrypt=!0,delete i.password,r=r.replace(f,'<ClientOnly><ValaxyDecrypt :encrypted-content="$frontmatter.encryptedContent" /></ClientOnly>');let y=r.lastIndexOf("<script setup>"),h=r.lastIndexOf("</script>"),v=r.slice(y+14,h);r=r.replace(v,"")}if(i.gallery_password){let c=await Wr(JSON.stringify(i.photos),{password:i.gallery_password,iv:t.iv,salt:t.salt});i.encryptedPhotos=c,delete i.gallery_password,delete i.photos}}return r}}l();var Ct=Q(ee(),1);import Zy from"consola";function pu(e,t){return e.includes("{%")&&e.includes("%}")&&Zy.error(`${`${t}
|
|
90
|
-
`} Please ${(0,Ct.red)("remove")} ${(0,Ct.cyan)("{% %}")}, because it conflicts with ${(0,Ct.yellow)("markdown-it-attrs")}.`),e.replace("{%","{%"),e.replace("%}","%}"),e}l();function mu(e){let t=new Map;return e.replace(/<ValaxyFootnoteItem id="(.*?)">(.*?)<\/ValaxyFootnoteItem>/gs,(r,n,o)=>{let i=o.match(/<ValaxyFootnoteContent>(.*?)<\/ValaxyFootnoteContent>/s)[1].replace(/<ValaxyFootnoteAnchor(?:.*?)>(.*?)<\/ValaxyFootnoteAnchor>/gs,""),s=o.replace(/<ValaxyFootnoteContent>(.*?)<\/ValaxyFootnoteContent>/gs,(a,c)=>c).replace(/<ValaxyFootnoteAnchor(?:.*?)>(.*?)<\/ValaxyFootnoteAnchor>/gs,(a,c)=>c);return t.set(n,i),s}).replace(/<ValaxyFootnoteRef href="#(.*?)"(?:.*?)>(.*?)<\/ValaxyFootnoteRef>/gs,(r,n,o)=>`<ValaxyFootnoteTooltip>${o}<template #popper>${t.get(n)}</template></ValaxyFootnoteTooltip>`)}var du=tx("valaxy:md"),gu=new ex({max:128});function nx(){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(r=>`<template #${r}><slot name="${r}" /></template>`).join("")}function lu(e){let t="ValaxyMain";return`
|
|
91
|
-
<${t} :frontmatter="$frontmatter">
|
|
92
|
-
<template #main-content-md>${e}</template>
|
|
93
|
-
${nx()}
|
|
94
|
-
<slot />
|
|
95
|
-
</${t}>
|
|
96
|
-
`}async function hu(e,t){e.pages=e.pages.map(c=>c.replace(/\.md$/,"").replace(/\/index$/,""));let r=uu(e),n=au(e),o=fu(e),i=su(e),s=e.userRoot,a=e.mode==="build";return async(c,u)=>{let f=u,m=rx.relative(s,f),p=i(c,u),y=JSON.stringify({code:c,id:u});if(a){let E=JSON.stringify({code:c,id:u}),V=gu.get(E);if(V)return du(`[cache hit] ${m}`),V}let h=Date.now(),v=await cu(c,u,e);c=pu(c,u);let k=tu(c,u,e),w=k.includes;c=k.code,c=r(c),c=await o(c,u,v),c=mu(c),c=n(c,u,v),du(`[render] ${f} in ${Date.now()-h}ms.`);let $={code:c,pageData:v,deadLinks:p,includes:w};return a&&gu.set(y,$),$}}function lx(e){let t=e.redirects.map(r=>({path:r.from,redirect:r.to}));return e.config.runtimeConfig.redirects={useVueRouter:$t()?e.config.siteConfig.redirects.useVueRouter:!0,redirectRoutes:t},`export default ${JSON.stringify(JSON.stringify(e.config))}`}async function cx(e,t){let r=[];t.config.features?.katex&&(r.push(`import "${U(await Ce("katex/dist/katex.min.css",!0))}"`),r.push(`import "${U(Ht(t.clientRoot,"styles/third/katex.scss"))}"`));for(let n of e){let o=[];["css-vars","index"].forEach(s=>{o.push(Ht(n,"styles",`${s}.css`)),o.push(Ht(n,"styles",`${s}.scss`))});for(let s of o)jt.existsSync(s)&&r.push(`import "${U(s)}"`)}return r.join(`
|
|
97
|
-
`)}function ux(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(jt.existsSync(s)&&jt.readFileSync(s,"utf-8")){let a=i.replace("-","")+o;t.unshift(`import ${a} from "${U(s)}"`),t.push(`messages['${i}'] = defu(${a}, messages['${i}'])`)}})}),t.push("export default messages"),t.join(`
|
|
98
|
-
`)}function fx(e){let t=e.addons.filter(i=>i.global).filter(i=>jt.existsSync(Ht(i.root,"./App.vue"))),r=i=>`Addon${ax(i)}App`,n=t.map(i=>`import ${r(i.name)} from "${i.name}/App.vue"`).join(`
|
|
99
|
-
`),o=t.map(i=>`{ component: ${r(i.name)}, props: ${JSON.stringify(i.props)} }`).join(",");return`${n}
|
|
100
|
-
export default [${o}]`}var px='import { defineComponent } from "vue"; export default defineComponent({ render: () => null });';function hi(e){let t=Ht(e,"App.vue");return jt.existsSync(t)?[`import AppVue from "${U(t)}"`,"export default AppVue"].join(`
|
|
101
|
-
`):px}async function xu(e,t={}){let{config:r}=e,n="/@valaxy",o=e.roots,i=!1,s,a;return[{name:"valaxy:loader",enforce:"pre",async configResolved(c){a=c,s=await hu(e,a)},configureServer(c){c.watcher.add([e.configFile,e.clientRoot,e.themeRoot,e.userRoot])},resolveId(c){return c.startsWith(n)?c:null},async load(c){if(c==="/@valaxyjs/config")return lx(e);if(c==="/@valaxyjs/context")return`export default ${JSON.stringify(JSON.stringify({userRoot:e.userRoot}))}`;if(c==="/@valaxyjs/styles")return await cx(o,e);if(c==="/@valaxyjs/locales")return ux(o);if(c==="/@valaxyjs/addons")return fx(e);if(c==="/@valaxyjs/AppVue")return hi(e.clientRoot);if(c==="/@valaxyjs/UserAppVue")return hi(e.userRoot);if(c==="/@valaxyjs/ThemeAppVue")return hi(e.themeRoot);if(c.startsWith(n))return{code:"",map:{mappings:""}}},async transform(c,u){if(u.endsWith(".md")){let{code:f,deadLinks:m,includes:p}=await s(c,u);return m.length&&(i=!0,yu.error(`Dead links found in ${u}`),yu.error(m)),p.length&&p.forEach(y=>{this.addWatchFile(y)}),f}},renderStart(){if(i&&!(r.ignoreDeadLinks||r.build.ignoreDeadLinks))throw new Error("One or more pages contain dead links.")},async handleHotUpdate(c){let{file:u,server:f,read:m}=c,p=h=>{t.onConfigReload?.(h,e.config),Object.assign(e.config,h),r=h;let v=["/@valaxyjs/config","/@valaxyjs/context"];return[...Array.from(v).map(w=>f.moduleGraph.getModuleById(w))].filter(w=>!!w)};if([e.configFile].includes(u)){let{config:h}=await pe({userRoot:e.userRoot});return p(h)}if(u===e.siteConfigFile){let{siteConfig:h}=await Ar(e.userRoot);return r.siteConfig=sx(h,Er),p(r)}if(u===e.themeConfigFile){let{themeConfig:h}=await Pl(e),v=r.themeConfig.pkg;return h.pkg=v,r.themeConfig=h,p(r)}if(u===ix(e.themeRoot,"valaxy.config.ts")){let h=await qo(e),v=et(e.config,h),{config:k}=await Bo(e,v);return p(k)}if(u.endsWith(".md")){let h=He(),v=await m(),{code:k,pageData:w}=await s(v,u),E={path:`/${ox(`${e.userRoot}/pages`,u)}`,pageData:w};f.hot.send({type:"custom",event:"valaxy:pageData",data:E}),vt.success(`${(0,Gr.yellow)("[HMR]")} ${u} ${(0,Gr.dim)(`updated in ${h()}`)}`),c.read=()=>k}}}]}async function Bt(e,t={}){let{options:r}=e,{roots:n,config:o}=r,i=await ou(r),s=await xu(r,t),a=[i,xc(r),vc(r),mx({include:[/\.vue$/,/\.md$/],exclude:[],template:{compilerOptions:{isCustomElement:c=>{let u=dl.has(c);return o.vue?.isCustomElement?.forEach(f=>{u=u||f(c)}),u}}},...o.vue}),s,yx(),await iu(e),dx({layoutsDirs:n.map(c=>`${c}/layouts`),...o.layouts}),gx({extensions:["vue","md"],include:[/\.vue$/,/\.vue\?vue/,/\.md$/],exclude:[],allowOverrides:!0,dirs:n.map(c=>`${c}/components`).concat(["src/components","components"]),dts:xx(r.tempDir,"components.d.ts"),...o.components}),await nc(r),hx({runtimeOnly:!0,compositionOnly:!0,include:n.map(c=>`${c}/locales/**`),jitCompilation:!1}),_c(r)];if(o.visualizer)try{let c=(await import("rollup-plugin-visualizer")).visualizer;a.push(c({open:!0,gzipSize:!0,...o.visualizer}))}catch{console.error("Failed to load rollup-plugin-visualizer"),vu.error("Please install `rollup-plugin-visualizer` to enable the feature"),console.log(),vu.info("pnpm add -D rollup-plugin-visualizer"),console.log()}return a}async function Su(e,t=dt){let r=Ru(t,{...dt,plugins:await Bt(e)});await vx(r)}async function wu(e,t={}){let{options:r}=e,n={...dt,plugins:await Bt(e),ssr:{noExternal:["workbox-window",/vue-i18n/,"@vue/devtools-api"]}};n.ssgOptions={script:"async",formatting:"minify",crittersOptions:{reduceInlineStyles:!1},onFinished(){bx({hostname:r.config.siteConfig.url})}},r.config.build.ssgForPagination&&(n.ssgOptions.includedRoutes=(i,s)=>{let a=i,c=i.filter(f=>f.startsWith("/posts/")),u=Math.ceil(c.length/r.config.siteConfig.pageSize);zr.info(`Generate ${Cu.default.yellow(u)} pages for pagination.`);for(let f=1;f<=u;f++)a.push(`/page/${f}`);return r.config.vite?.ssgOptions?.includeAllRoutes?a:a.filter(f=>!f.split("/").some(m=>m.startsWith(":")))});let o=Ru(n,t);await _x({},o)}async function Eu(e){let{userRoot:t}=e,r=bu(t,"dist/index.html");if(Kr.existsSync(r)){zr.info("post process for ssg...");let n=await Kr.readFile(r,"utf-8"),o="</html>";if(!n.endsWith(o)){zr.warn("fix incomplete index.html...");let i=n.lastIndexOf(o);await Kr.writeFile(r,n.slice(0,i+o.length),"utf-8")}}e.config.siteConfig.redirects?.useVueRouter||await Rx(e)}async function Rx(e){zr.info("generate client redirects...");let t=bu(e.userRoot,"dist"),n=Vr(e.redirects).map(async o=>{let i=_u(t,`${o.from}.html`),s=_u(t,`${o.to}.html`);if(!await Kr.pathExists(s))throw new Error(`the route of '${o.to}' not exists`);await Nl(o.to,i)});await Promise.all(n)}l();l();l();l();import Au from"node:process";import{createServer as Cx,mergeConfig as Sx}from"vite";async function Pu(e,t={},r={}){Au.env.EDITOR=Au.env.EDITOR||"code";let{options:n}=e,o=await Bt(e,r),i=n.mode==="dev"&&n.config.devtools,s=[...o];i&&s.push((await import("vite-plugin-vue-devtools")).default(),(await import("@valaxyjs/devtools")).default());let a=Sx(t,{plugins:s});return await Cx(a)}l();l();import{createHooks as wx}from"hookable";var Ex=["build:before","build:after"];function Yr(e){let t=wx();typeof e.config.hooks=="object"&&Object.keys(e.config.hooks).forEach(n=>{let o=n,i=e.config.hooks[o];typeof i=="function"&&(Ex.includes(o)?e.mode==="build"&&t.hook(o,i):t.hook(o,i))});let r={version:it,hooks:t,hook:t.hook,options:e};return e.addons.forEach(n=>{typeof n.setup=="function"&&n.setup(r)}),r}l();var N=Q(ee(),1);import*as ku from"node:readline";import Ax from"node:path";import Px from"node:os";import Ke from"node:process";import kx from"consola";import{mergeConfig as Ox}from"vite";var Xr;function Qr(e,t,r){let n=(0,N.blue)(`v${e.config.themeConfig?.pkg?.version}`)||"unknown";if(console.log(),console.log(` ${(0,N.bold)("\u{1F30C} Valaxy")} ${(0,N.blue)(`v${it}`)}`),console.log(),console.log(`${(0,N.dim)(" \u{1FA90} theme ")} > ${e.theme?(0,N.green)(e.theme):(0,N.gray)("none")} (${n})`),console.log(` ${(0,N.dim)("\u{1F4C1}")} ${(0,N.dim)(Ax.resolve(e.userRoot))}`),t){console.log(),console.log(`${(0,N.dim)(" Preview ")} > ${(0,N.cyan)(`http://localhost:${(0,N.bold)(t)}/`)}`),r&&Object.values(Px.networkInterfaces()).forEach(u=>(u||[]).filter(f=>f.family==="IPv4"&&!f.address.includes("127.0.0.1")).forEach(({address:f})=>{console.log(`${(0,N.dim)(" Network ")} > ${(0,N.blue)(`http://${f}:${(0,N.bold)(t)}/`)}`)})),console.log();let o=`${(0,N.underline)("r")}${(0,N.dim)("estart")}`,i=`${(0,N.underline)("e")}${(0,N.dim)("dit")}`,s=`${(0,N.underline)("o")}${(0,N.dim)("pen")}`,a=`${(0,N.underline)("q")}${(0,N.dim)("r")}`,c=`${(0,N.dim)(" | ")}`;console.log(`${(0,N.dim)(" shortcuts ")} > ${o}${c}${s}${c}${a}${c}${i}`)}console.log()}async function qt(e,t){Xr&&(vt.info("close server..."),await Xr.close());let{options:r}=e,n=Ox(await jr(r,"serve"),t);try{Xr=await Pu(e,n,{async onConfigReload(o,i,s=!1){s&&(vt.info(`${(0,N.yellow)("force")} reload the server`),qt(e,t));let a=!1;o.theme!==i.theme&&(a=!0),a&&qt(e,t)}}),await Xr.listen(),vt.ready("server ready")}catch(o){kx.error(`failed to start server. error:
|
|
102
|
-
`),console.error(o),Ke.exit(1)}}function Ou(e){Ke.stdin.resume(),Ke.stdin.setEncoding("utf8"),ku.emitKeypressEvents(Ke.stdin),Ke.stdin.isTTY&&Ke.stdin.setRawMode(!0),Ke.stdin.on("keypress",(t,r)=>{if(r.ctrl&&r.name==="c")Ke.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)}}})}async function xi({ssg:e,root:t,output:r,log:n}){xt(),Pr(t)||Tx.exit(0);let o=yi.resolve(t),i=await pe({userRoot:o},"build");Qr(i);let s=Yr(i);ze.start(`Run ${(0,St.yellow)("options:resolved")} hooks`),await s.hooks.callHook("options:resolved");let a=[];i.config.siteConfig.search.type==="fuse"&&a.push(Ir),i.config.modules.rss.enable&&a.push(Mr),Ul(s,a);let c=Tu(await jr(i,"build"),i.config.vite||{}),u=Tu(c,{configFile:yi.resolve(i.clientRoot,"vite.config.ts"),build:{emptyOutDir:!0,outDir:yi.resolve(i.userRoot,r)},logLevel:n});ze.start(`Run ${(0,St.yellow)("config:init")} hooks`),await s.hooks.callHook("config:init"),ze.start(`Run ${(0,St.yellow)("build:before")} hooks`),await s.hooks.callHook("build:before"),ze.box("\u{1F320} Start building...");try{if(e){ze.info(`use ${(0,St.yellow)("vite-ssg")} to do ssg build...`);try{await wu(s,u),await Eu(i)}catch(f){ze.error("[vite-ssg] An internal error occurred."),console.log(f)}}else ze.info("use vite do spa build..."),await Su(s,u)}catch(f){console.log(f)}finally{ze.start(`Run ${(0,St.yellow)("build:after")} hooks`),await s.hooks.callHook("build:after")}}function $u(e){e.command("build [root]","build your blog to static content",t=>Be(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})=>{await xi({ssg:t,root:r,output:n,log:o})})}l();import Lx from"node:path";import{exec as Mx}from"node:child_process";import Ix from"node:process";import Nx from"node:os";import{mergeConfig as Fx}from"vite";import Dx from"qrcode";l();import $x from"node:net";async function vi(e){return await Vx(e)?e:await vi(e+1)}function Vx(e){return new Promise(t=>{let r=$x.createServer(n=>{n.write(`Echo server\r
|
|
103
|
-
`),n.pipe(n)});r.listen(e,"0.0.0.0"),r.on("error",()=>{t(!1)}),r.on("listening",()=>{r.close(),t(!0)})})}function Vu(e){e.command("* [root]","Start a local server for Valaxy",t=>Be(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})=>{Ho(),Pr(t)||Ix.exit(0);let s=r||await vi(4859),a=await pe({userRoot:t}),c=Yr(a),u=Fx({...dt,configFile:Lx.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 qt(c,u),Qr(a,s,o),Ou([{name:"r",fullName:"restart",action(){qt(c,u)}},{name:"o",fullName:"open",async action(){let{default:m}=await import("open");m(`http://localhost:${s}`)}},{name:"q",fullName:"qr",action(){let p=`http://${Object.values(Nx.networkInterfaces()).flat().filter(y=>y?.family==="IPv4"&&!y.address.includes("127.0.0.1"))[0]?.address||"localhost"}:${s}`;Dx.toString(p,{type:"terminal"},(y,h)=>{if(y)throw y;console.log(h)})}},{name:"e",fullName:"edit",action(){Mx(`code "${t}"`)}}])})}l();import Lu from"node:path";import Mu from"node:process";import Iu from"fs-extra";import he from"consola";async function Hx(){let e=Lu.join(Mu.cwd(),"dist"),t=Lu.join(Mu.cwd(),".valaxy");if(he.box("\u{1F9F9} Starting clean..."),await rt(e)){he.info("dist directory exists, removing...");try{await Iu.rm(e,{recursive:!0,force:!0}),he.success("dist directory has been successfully removed.")}catch(r){he.error("Failed to remove dist directory."),he.error(r)}}else he.info("No dist directory found, nothing to clean.");if(await rt(t)){he.info(".valaxy cache directory exists, removing...");try{await Iu.rm(t,{recursive:!0,force:!0}),he.success(".valaxy cache directory has been successfully removed.")}catch(r){he.error("Failed to remove .valaxy cache directory."),he.error(r)}}else he.info("No .valaxy cache directory found, nothing to clean.")}function Nu(e){e.command("clean","Clean the dist folder and cache",()=>{},async()=>{await Hx()})}l();import jx from"node:process";import{confirm as Fu,intro as Bx,outro as Du,select as qx}from"@clack/prompts";function Hu(e){e.command("deploy","deploy your blog to the cloud",async()=>{if(Bx("Deploying Your Blog"),await Fu({message:"Do you want to build your blog before deploying?"})&&await xi({ssg:!0,root:jx.cwd(),output:"dist",log:"info"}),await qx({message:"Where do you want to deploy?",options:[{label:"GitHub Pages",value:"gh-pages",hint:"You need install `gh-pages` dependencies."},{label:"Your Own Server",value:"server"}]})==="gh-pages"){let n=!1;try{await import("gh-pages"),n=!0}catch(o){console.error(o),await Fu({message:"Do you want to install `gh-pages` now?"})?(await import("@antfu/install-pkg").then(s=>s.installPackage("gh-pages",{dev:!0})),n=!0):Du("Please install `gh-pages` before deploying to GitHub Pages.")}if(n){let{publish:o}=await import("gh-pages");await o("dist",{branch:"gh-pages",message:"chore: deploy by valaxy"}),Du("Done!")}}})}l();import Ux from"consola";function ju(e){e.command("debug","Debug your blog",async()=>{Ux.info("\u63D0\u95EE\u524D\u8BF7\u643A\u5E26\u4EE5\u4E0B\u4FE1\u606F\uFF1A")})}var Te=Gx(Kx(Wx.argv)).scriptName("valaxy").usage("$0 [args]").version(it).showHelpOnFail(!1).alias("h","help").alias("v","version");Vu(Te);$u(Te);Zl(Te);Nu(Te);Hu(Te);ju(Te);Te.help();var zx=[Ir,Mr];zx.forEach(e=>{e.extendCli?.(Te)});function HT(){Te.parse()}export{Ot as a,pl as b,mt as c,ml as d,qb as e,dl as f,dt as g,og as h,Ce as i,yl as j,ig as k,Do as l,U as m,xl as n,vl as o,fg as p,gt as q,Er as r,CR as s,dg as t,Ar as u,Cl as v,vg as w,LR as x,Tt as y,et as z,Sl as A,Rg as B,HR as C,wl as D,kr as E,Pl as F,Ag as G,rC as H,iC as I,Bo as J,pe as K,qo as L,jr as M,gc as N,xu as O,Bt as P,Su as Q,wu as R,Eu as S,Rx as T,Pu as U,Te as V,HT as W};
|
|
104
|
-
/*! Bundled license information:
|
|
105
|
-
|
|
106
|
-
is-extglob/index.js:
|
|
107
|
-
(*!
|
|
108
|
-
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
109
|
-
*
|
|
110
|
-
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
111
|
-
* Licensed under the MIT License.
|
|
112
|
-
*)
|
|
113
|
-
|
|
114
|
-
is-glob/index.js:
|
|
115
|
-
(*!
|
|
116
|
-
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
117
|
-
*
|
|
118
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
119
|
-
* Released under the MIT License.
|
|
120
|
-
*)
|
|
121
|
-
|
|
122
|
-
is-number/index.js:
|
|
123
|
-
(*!
|
|
124
|
-
* is-number <https://github.com/jonschlinkert/is-number>
|
|
125
|
-
*
|
|
126
|
-
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
127
|
-
* Released under the MIT License.
|
|
128
|
-
*)
|
|
129
|
-
|
|
130
|
-
to-regex-range/index.js:
|
|
131
|
-
(*!
|
|
132
|
-
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
|
133
|
-
*
|
|
134
|
-
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
135
|
-
* Released under the MIT License.
|
|
136
|
-
*)
|
|
137
|
-
|
|
138
|
-
fill-range/index.js:
|
|
139
|
-
(*!
|
|
140
|
-
* fill-range <https://github.com/jonschlinkert/fill-range>
|
|
141
|
-
*
|
|
142
|
-
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
143
|
-
* Licensed under the MIT License.
|
|
144
|
-
*)
|
|
145
|
-
|
|
146
|
-
queue-microtask/index.js:
|
|
147
|
-
(*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
148
|
-
|
|
149
|
-
run-parallel/index.js:
|
|
150
|
-
(*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
151
|
-
|
|
152
|
-
@mdit-vue/shared/dist/index.mjs:
|
|
153
|
-
(* istanbul ignore if -- @preserve *)
|
|
154
|
-
|
|
155
|
-
@mdit-vue/plugin-sfc/dist/index.mjs:
|
|
156
|
-
(* istanbul ignore if -- @preserve *)
|
|
157
|
-
*/
|