@onoxm/vite-plugin-auto-router 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";var t=require("os"),e=require("path"),n=require("util"),r=require("stream"),s=require("events"),i=require("fs"),o=require("node:fs"),a=require("node:path"),u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function c(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var l,p={},f={},h={};function d(){if(l)return h;return l=1,Object.defineProperty(h,"__esModule",{value:!0}),h.splitWhen=h.flatten=void 0,h.flatten=function(t){return t.reduce((t,e)=>[].concat(t,e),[])},h.splitWhen=function(t,e){const n=[[]];let r=0;for(const s of t)e(s)?(r++,n[r]=[]):n[r].push(s);return n},h}var _,g={};function y(){if(_)return g;return _=1,Object.defineProperty(g,"__esModule",{value:!0}),g.isEnoentCodeError=void 0,g.isEnoentCodeError=function(t){return"ENOENT"===t.code},g}var m,S={};var v,b={};function E(){if(v)return b;v=1,Object.defineProperty(b,"__esModule",{value:!0}),b.convertPosixPathToPattern=b.convertWindowsPathToPattern=b.convertPathToPattern=b.escapePosixPath=b.escapeWindowsPath=b.escape=b.removeLeadingDotSegment=b.makeAbsolute=b.unixify=void 0;const n=e,r="win32"===t.platform(),s=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,i=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,o=/^\\\\([.?])/,a=/\\(?![!()+@[\]{}])/g;function u(t){return t.replace(i,"\\$2")}function c(t){return t.replace(s,"\\$2")}function l(t){return u(t).replace(o,"//$1").replace(a,"/")}function p(t){return c(t)}return b.unixify=function(t){return t.replace(/\\/g,"/")},b.makeAbsolute=function(t,e){return n.resolve(t,e)},b.removeLeadingDotSegment=function(t){if("."===t.charAt(0)){const e=t.charAt(1);if("/"===e||"\\"===e)return t.slice(2)}return t},b.escape=r?u:c,b.escapeWindowsPath=u,b.escapePosixPath=c,b.convertPathToPattern=r?l:p,b.convertWindowsPathToPattern=l,b.convertPosixPathToPattern=p,b}var A,R,x,P,C,w,O={};function T(){return R?A:(R=1,A=function(t){if("string"!=typeof t||""===t)return!1;for(var e;e=/(\\).|([@?!+*]\(.*\))/g.exec(t);){if(e[2])return!0;t=t.slice(e.index+e[0].length)}return!1})}function k(){if(P)return x;P=1;var t=T(),e={"{":"}","(":")","[":"]"},n=function(t){if("!"===t[0])return!0;for(var n=0,r=-2,s=-2,i=-2,o=-2,a=-2;n<t.length;){if("*"===t[n])return!0;if("?"===t[n+1]&&/[\].+)]/.test(t[n]))return!0;if(-1!==s&&"["===t[n]&&"]"!==t[n+1]&&(s<n&&(s=t.indexOf("]",n)),s>n)){if(-1===a||a>s)return!0;if(-1===(a=t.indexOf("\\",n))||a>s)return!0}if(-1!==i&&"{"===t[n]&&"}"!==t[n+1]&&(i=t.indexOf("}",n))>n&&(-1===(a=t.indexOf("\\",n))||a>i))return!0;if(-1!==o&&"("===t[n]&&"?"===t[n+1]&&/[:!=]/.test(t[n+2])&&")"!==t[n+3]&&(o=t.indexOf(")",n))>n&&(-1===(a=t.indexOf("\\",n))||a>o))return!0;if(-1!==r&&"("===t[n]&&"|"!==t[n+1]&&(r<n&&(r=t.indexOf("|",n)),-1!==r&&")"!==t[r+1]&&(o=t.indexOf(")",r))>r&&(-1===(a=t.indexOf("\\",r))||a>o)))return!0;if("\\"===t[n]){var u=t[n+1];n+=2;var c=e[u];if(c){var l=t.indexOf(c,n);-1!==l&&(n=l+1)}if("!"===t[n])return!0}else n++}return!1},r=function(t){if("!"===t[0])return!0;for(var n=0;n<t.length;){if(/[*?{}()[\]]/.test(t[n]))return!0;if("\\"===t[n]){var r=t[n+1];n+=2;var s=e[r];if(s){var i=t.indexOf(s,n);-1!==i&&(n=i+1)}if("!"===t[n])return!0}else n++}return!1};return x=function(e,s){if("string"!=typeof e||""===e)return!1;if(t(e))return!0;var i=n;return s&&!1===s.strict&&(i=r),i(e)}}function L(){if(w)return C;w=1;var n=k(),r=e.posix.dirname,s="win32"===t.platform(),i=/\\/g,o=/[\{\[].*[\}\]]$/,a=/(^|[^\\])([\{\[]|\([^\)]+$)/,u=/\\([\!\*\?\|\[\]\(\)\{\}])/g;return C=function(t,e){Object.assign({flipBackslashes:!0},e).flipBackslashes&&s&&t.indexOf("/")<0&&(t=t.replace(i,"/")),o.test(t)&&(t+="/"),t+="a";do{t=r(t)}while(n(t)||a.test(t));return t.replace(u,"$1")}}var $,H,M,D,F,N,I,j,B,G,U,W,K,V,q,Q,Y,X,Z,z={};function J(){return $||($=1,(t=z).isInteger=t=>"number"==typeof t?Number.isInteger(t):"string"==typeof t&&""!==t.trim()&&Number.isInteger(Number(t)),t.find=(t,e)=>t.nodes.find(t=>t.type===e),t.exceedsLimit=(e,n,r=1,s)=>!1!==s&&!(!t.isInteger(e)||!t.isInteger(n))&&(Number(n)-Number(e))/Number(r)>=s,t.escapeNode=(t,e=0,n)=>{const r=t.nodes[e];r&&(n&&r.type===n||"open"===r.type||"close"===r.type)&&!0!==r.escaped&&(r.value="\\"+r.value,r.escaped=!0)},t.encloseBrace=t=>!("brace"!==t.type||t.commas>>0+t.ranges|0||(t.invalid=!0,0)),t.isInvalidBrace=t=>!("brace"!==t.type||!0!==t.invalid&&!t.dollar&&(t.commas>>0+t.ranges|0&&!0===t.open&&!0===t.close||(t.invalid=!0,0))),t.isOpenOrClose=t=>"open"===t.type||"close"===t.type||!0===t.open||!0===t.close,t.reduce=t=>t.reduce((t,e)=>("text"===e.type&&t.push(e.value),"range"===e.type&&(e.type="text"),t),[]),t.flatten=(...t)=>{const e=[],n=t=>{for(let r=0;r<t.length;r++){const s=t[r];Array.isArray(s)?n(s):void 0!==s&&e.push(s)}return e};return n(t),e}),z;var t}function tt(){if(M)return H;M=1;const t=J();return H=(e,n={})=>{const r=(e,s={})=>{const i=n.escapeInvalid&&t.isInvalidBrace(s),o=!0===e.invalid&&!0===n.escapeInvalid;let a="";if(e.value)return(i||o)&&t.isOpenOrClose(e)?"\\"+e.value:e.value;if(e.value)return e.value;if(e.nodes)for(const t of e.nodes)a+=r(t);return a};return r(e)}}function et(){return F?D:(F=1,D=function(t){return"number"==typeof t?t-t===0:"string"==typeof t&&""!==t.trim()&&(Number.isFinite?Number.isFinite(+t):isFinite(+t))})}function nt(){if(I)return N;I=1;const t=et(),e=(n,i,o)=>{if(!1===t(n))throw new TypeError("toRegexRange: expected the first argument to be a number");if(void 0===i||n===i)return String(n);if(!1===t(i))throw new TypeError("toRegexRange: expected the second argument to be a number.");let a={relaxZeros:!0,...o};"boolean"==typeof a.strictZeros&&(a.relaxZeros=!1===a.strictZeros);let u=n+":"+i+"="+String(a.relaxZeros)+String(a.shorthand)+String(a.capture)+String(a.wrap);if(e.cache.hasOwnProperty(u))return e.cache[u].result;let c=Math.min(n,i),l=Math.max(n,i);if(1===Math.abs(c-l)){let t=n+"|"+i;return a.capture?`(${t})`:!1===a.wrap?t:`(?:${t})`}let f=p(n)||p(i),h={min:n,max:i,a:c,b:l},d=[],_=[];if(f&&(h.isPadded=f,h.maxLen=String(h.max).length),c<0){_=r(l<0?Math.abs(l):1,Math.abs(c),h,a),c=h.a=0}return l>=0&&(d=r(c,l,h,a)),h.negatives=_,h.positives=d,h.result=function(t,e){let n=s(t,e,"-",!1)||[],r=s(e,t,"",!1)||[],i=s(t,e,"-?",!0)||[];return n.concat(i).concat(r).join("|")}(_,d),!0===a.capture?h.result=`(${h.result})`:!1!==a.wrap&&d.length+_.length>1&&(h.result=`(?:${h.result})`),e.cache[u]=h,h.result};function n(t,e,n){if(t===e)return{pattern:t,count:[],digits:0};let r=function(t,e){let n=[];for(let r=0;r<t.length;r++)n.push([t[r],e[r]]);return n}(t,e),s=r.length,i="",o=0;for(let t=0;t<s;t++){let[e,n]=r[t];e===n?i+=e:"0"!==e||"9"!==n?i+=l(e,n):o++}return o&&(i+=!0===n.shorthand?"\\d":"[0-9]"),{pattern:i,count:[o],digits:s}}function r(t,e,r,s){let o,l=function(t,e){let n=1,r=1,s=a(t,n),o=new Set([e]);for(;t<=s&&s<=e;)o.add(s),n+=1,s=a(t,n);for(s=u(e+1,r)-1;t<s&&s<=e;)o.add(s),r+=1,s=u(e+1,r)-1;return o=[...o],o.sort(i),o}(t,e),p=[],h=t;for(let t=0;t<l.length;t++){let e=l[t],i=n(String(h),String(e),s),a="";r.isPadded||!o||o.pattern!==i.pattern?(r.isPadded&&(a=f(e,r,s)),i.string=a+i.pattern+c(i.count),p.push(i),h=e+1,o=i):(o.count.length>1&&o.count.pop(),o.count.push(i.count[0]),o.string=o.pattern+c(o.count),h=e+1)}return p}function s(t,e,n,r,s){let i=[];for(let s of t){let{string:t}=s;r||o(e,"string",t)||i.push(n+t),r&&o(e,"string",t)&&i.push(n+t)}return i}function i(t,e){return t>e?1:e>t?-1:0}function o(t,e,n){return t.some(t=>t[e]===n)}function a(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function u(t,e){return t-t%Math.pow(10,e)}function c(t){let[e=0,n=""]=t;return n||e>1?`{${e+(n?","+n:"")}}`:""}function l(t,e,n){return`[${t}${e-t===1?"":"-"}${e}]`}function p(t){return/^-?(0+)\d/.test(t)}function f(t,e,n){if(!e.isPadded)return t;let r=Math.abs(e.maxLen-String(t).length),s=!1!==n.relaxZeros;switch(r){case 0:return"";case 1:return s?"0?":"0";case 2:return s?"0{0,2}":"00";default:return s?`0{0,${r}}`:`0{${r}}`}}return e.cache={},e.clearCache=()=>e.cache={},N=e}function rt(){if(B)return j;B=1;const t=n,e=nt(),r=t=>null!==t&&"object"==typeof t&&!Array.isArray(t),s=t=>"number"==typeof t||"string"==typeof t&&""!==t,i=t=>Number.isInteger(+t),o=t=>{let e=`${t}`,n=-1;if("-"===e[0]&&(e=e.slice(1)),"0"===e)return!1;for(;"0"===e[++n];);return n>0},a=(t,e,n)=>{if(e>0){let n="-"===t[0]?"-":"";n&&(t=t.slice(1)),t=n+t.padStart(n?e-1:e,"0")}return!1===n?String(t):t},u=(t,e)=>{let n="-"===t[0]?"-":"";for(n&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return n?"-"+t:t},c=(t,n,r,s)=>{if(r)return e(t,n,{wrap:!1,...s});let i=String.fromCharCode(t);return t===n?i:`[${i}-${String.fromCharCode(n)}]`},l=(t,n,r)=>{if(Array.isArray(t)){let e=!0===r.wrap,n=r.capture?"":"?:";return e?`(${n}${t.join("|")})`:t.join("|")}return e(t,n,r)},p=(...e)=>new RangeError("Invalid range arguments: "+t.inspect(...e)),f=(t,e,n)=>{if(!0===n.strictRanges)throw p([t,e]);return[]},h=(t,e,n=1,r={})=>{let s=Number(t),i=Number(e);if(!Number.isInteger(s)||!Number.isInteger(i)){if(!0===r.strictRanges)throw p([t,e]);return[]}0===s&&(s=0),0===i&&(i=0);let f=s>i,h=String(t),d=String(e),_=String(n);n=Math.max(Math.abs(n),1);let g=o(h)||o(d)||o(_),y=g?Math.max(h.length,d.length,_.length):0,m=!1===g&&!1===((t,e,n)=>"string"==typeof t||"string"==typeof e||!0===n.stringify)(t,e,r),S=r.transform||(t=>e=>!0===t?Number(e):String(e))(m);if(r.toRegex&&1===n)return c(u(t,y),u(e,y),!0,r);let v={negatives:[],positives:[]},b=t=>v[t<0?"negatives":"positives"].push(Math.abs(t)),E=[],A=0;for(;f?s>=i:s<=i;)!0===r.toRegex&&n>1?b(s):E.push(a(S(s,A),y,m)),s=f?s-n:s+n,A++;return!0===r.toRegex?n>1?((t,e,n)=>{t.negatives.sort((t,e)=>t<e?-1:t>e?1:0),t.positives.sort((t,e)=>t<e?-1:t>e?1:0);let r,s=e.capture?"":"?:",i="",o="";return t.positives.length&&(i=t.positives.map(t=>u(String(t),n)).join("|")),t.negatives.length&&(o=`-(${s}${t.negatives.map(t=>u(String(t),n)).join("|")})`),r=i&&o?`${i}|${o}`:i||o,e.wrap?`(${s}${r})`:r})(v,r,y):l(E,null,{wrap:!1,...r}):E},d=(t,e,n,o={})=>{if(null==e&&s(t))return[t];if(!s(t)||!s(e))return f(t,e,o);if("function"==typeof n)return d(t,e,1,{transform:n});if(r(n))return d(t,e,0,n);let a={...o};return!0===a.capture&&(a.wrap=!0),n=n||a.step||1,i(n)?i(t)&&i(e)?h(t,e,n,a):((t,e,n=1,r={})=>{if(!i(t)&&t.length>1||!i(e)&&e.length>1)return f(t,e,r);let s=r.transform||(t=>String.fromCharCode(t)),o=`${t}`.charCodeAt(0),a=`${e}`.charCodeAt(0),u=o>a,p=Math.min(o,a),h=Math.max(o,a);if(r.toRegex&&1===n)return c(p,h,!1,r);let d=[],_=0;for(;u?o>=a:o<=a;)d.push(s(o,_)),o=u?o-n:o+n,_++;return!0===r.toRegex?l(d,null,{wrap:!1,options:r}):d})(t,e,Math.max(Math.abs(n),1),a):null==n||r(n)?d(t,e,1,n):((t,e)=>{if(!0===e.strictRanges)throw new TypeError(`Expected step "${t}" to be a number`);return[]})(n,a)};return j=d}function st(){if(Y)return Q;Y=1;const t=tt(),{MAX_LENGTH:e,CHAR_BACKSLASH:n,CHAR_BACKTICK:r,CHAR_COMMA:s,CHAR_DOT:i,CHAR_LEFT_PARENTHESES:o,CHAR_RIGHT_PARENTHESES:a,CHAR_LEFT_CURLY_BRACE:u,CHAR_RIGHT_CURLY_BRACE:c,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_RIGHT_SQUARE_BRACKET:p,CHAR_DOUBLE_QUOTE:f,CHAR_SINGLE_QUOTE:h,CHAR_NO_BREAK_SPACE:d,CHAR_ZERO_WIDTH_NOBREAK_SPACE:_}=q?V:(q=1,V={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"});return Q=(g,y={})=>{if("string"!=typeof g)throw new TypeError("Expected a string");const m=y||{},S="number"==typeof m.maxLength?Math.min(e,m.maxLength):e;if(g.length>S)throw new SyntaxError(`Input length (${g.length}), exceeds max characters (${S})`);const v={type:"root",input:g,nodes:[]},b=[v];let E=v,A=v,R=0;const x=g.length;let P,C=0,w=0;const O=()=>g[C++],T=t=>{if("text"===t.type&&"dot"===A.type&&(A.type="text"),!A||"text"!==A.type||"text"!==t.type)return E.nodes.push(t),t.parent=E,t.prev=A,A=t,t;A.value+=t.value};for(T({type:"bos"});C<x;)if(E=b[b.length-1],P=O(),P!==_&&P!==d)if(P!==n)if(P!==p){if(P===l){let t;for(R++;C<x&&(t=O());)if(P+=t,t!==l)if(t!==n){if(t===p&&(R--,0===R))break}else P+=O();else R++;T({type:"text",value:P});continue}if(P!==o)if(P!==a){if(P===f||P===h||P===r){const t=P;let e;for(!0!==y.keepQuotes&&(P="");C<x&&(e=O());)if(e!==n){if(e===t){!0===y.keepQuotes&&(P+=e);break}P+=e}else P+=e+O();T({type:"text",value:P});continue}if(P===u){w++;const t=A.value&&"$"===A.value.slice(-1)||!0===E.dollar;E=T({type:"brace",open:!0,close:!1,dollar:t,depth:w,commas:0,ranges:0,nodes:[]}),b.push(E),T({type:"open",value:P});continue}if(P===c){if("brace"!==E.type){T({type:"text",value:P});continue}const t="close";E=b.pop(),E.close=!0,T({type:t,value:P}),w--,E=b[b.length-1];continue}if(P===s&&w>0){if(E.ranges>0){E.ranges=0;const e=E.nodes.shift();E.nodes=[e,{type:"text",value:t(E)}]}T({type:"comma",value:P}),E.commas++}else{if(P===i&&w>0&&0===E.commas){const t=E.nodes;if(0===w||0===t.length){T({type:"text",value:P});continue}if("dot"===A.type){if(E.range=[],A.value+=P,A.type="range",3!==E.nodes.length&&5!==E.nodes.length){E.invalid=!0,E.ranges=0,A.type="text";continue}E.ranges++,E.args=[];continue}if("range"===A.type){t.pop();const e=t[t.length-1];e.value+=A.value+P,A=e,E.ranges--;continue}T({type:"dot",value:P});continue}T({type:"text",value:P})}}else{if("paren"!==E.type){T({type:"text",value:P});continue}E=b.pop(),T({type:"text",value:P}),E=b[b.length-1]}else E=T({type:"paren",nodes:[]}),b.push(E),T({type:"text",value:P})}else T({type:"text",value:"\\"+P});else T({type:"text",value:(y.keepEscaping?P:"")+O()});do{if(E=b.pop(),"root"!==E.type){E.nodes.forEach(t=>{t.nodes||("open"===t.type&&(t.isOpen=!0),"close"===t.type&&(t.isClose=!0),t.nodes||(t.type="text"),t.invalid=!0)});const t=b[b.length-1],e=t.nodes.indexOf(E);t.nodes.splice(e,1,...E.nodes)}}while(b.length>0);return T({type:"eos"}),v}}function it(){if(Z)return X;Z=1;const t=tt(),e=function(){if(U)return G;U=1;const t=rt(),e=J();return G=(n,r={})=>{const s=(n,i={})=>{const o=e.isInvalidBrace(i),a=!0===n.invalid&&!0===r.escapeInvalid,u=!0===o||!0===a,c=!0===r.escapeInvalid?"\\":"";let l="";if(!0===n.isOpen)return c+n.value;if(!0===n.isClose)return console.log("node.isClose",c,n.value),c+n.value;if("open"===n.type)return u?c+n.value:"(";if("close"===n.type)return u?c+n.value:")";if("comma"===n.type)return"comma"===n.prev.type?"":u?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){const s=e.reduce(n.nodes),i=t(...s,{...r,wrap:!1,toRegex:!0,strictZeros:!0});if(0!==i.length)return s.length>1&&i.length>1?`(${i})`:i}if(n.nodes)for(const t of n.nodes)l+=s(t,n);return l};return s(n)}}(),n=function(){if(K)return W;K=1;const t=rt(),e=tt(),n=J(),r=(t="",e="",s=!1)=>{const i=[];if(t=[].concat(t),!(e=[].concat(e)).length)return t;if(!t.length)return s?n.flatten(e).map(t=>`{${t}}`):e;for(const n of t)if(Array.isArray(n))for(const t of n)i.push(r(t,e,s));else for(let t of e)!0===s&&"string"==typeof t&&(t=`{${t}}`),i.push(Array.isArray(t)?r(n,t,s):n+t);return n.flatten(i)};return W=(s,i={})=>{const o=void 0===i.rangeLimit?1e3:i.rangeLimit,a=(s,u={})=>{s.queue=[];let c=u,l=u.queue;for(;"brace"!==c.type&&"root"!==c.type&&c.parent;)c=c.parent,l=c.queue;if(s.invalid||s.dollar)return void l.push(r(l.pop(),e(s,i)));if("brace"===s.type&&!0!==s.invalid&&2===s.nodes.length)return void l.push(r(l.pop(),["{}"]));if(s.nodes&&s.ranges>0){const a=n.reduce(s.nodes);if(n.exceedsLimit(...a,i.step,o))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let u=t(...a,i);return 0===u.length&&(u=e(s,i)),l.push(r(l.pop(),u)),void(s.nodes=[])}const p=n.encloseBrace(s);let f=s.queue,h=s;for(;"brace"!==h.type&&"root"!==h.type&&h.parent;)h=h.parent,f=h.queue;for(let t=0;t<s.nodes.length;t++){const e=s.nodes[t];"comma"!==e.type||"brace"!==s.type?"close"!==e.type?e.value&&"open"!==e.type?f.push(r(f.pop(),e.value)):e.nodes&&a(e,s):l.push(r(l.pop(),f,p)):(1===t&&f.push(""),f.push(""))}return f};return n.flatten(a(s))},W}(),r=st(),s=(t,e={})=>{let n=[];if(Array.isArray(t))for(const r of t){const t=s.create(r,e);Array.isArray(t)?n.push(...t):n.push(t)}else n=[].concat(s.create(t,e));return e&&!0===e.expand&&!0===e.nodupes&&(n=[...new Set(n)]),n};return s.parse=(t,e={})=>r(t,e),s.stringify=(e,n={})=>t("string"==typeof e?s.parse(e,n):e,n),s.compile=(t,n={})=>("string"==typeof t&&(t=s.parse(t,n)),e(t,n)),s.expand=(t,e={})=>{"string"==typeof t&&(t=s.parse(t,e));let r=n(t,e);return!0===e.noempty&&(r=r.filter(Boolean)),!0===e.nodupes&&(r=[...new Set(r)]),r},s.create=(t,e={})=>""===t||t.length<3?[t]:!0!==e.expand?s.compile(t,e):s.expand(t,e),X=s}var ot,at,ut,ct,lt,pt,ft,ht,dt,_t,gt,yt,mt,St,vt={};function bt(){if(at)return ot;at=1;const t=e,n="\\\\/",r=`[^${n}]`,s="\\.",i="\\/",o="[^/]",a=`(?:${i}|$)`,u=`(?:^|${i})`,c=`${s}{1,2}${a}`,l={DOT_LITERAL:s,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:i,ONE_CHAR:"(?=.)",QMARK:o,END_ANCHOR:a,DOTS_SLASH:c,NO_DOT:`(?!${s})`,NO_DOTS:`(?!${u}${c})`,NO_DOT_SLASH:`(?!${s}{0,1}${a})`,NO_DOTS_SLASH:`(?!${c})`,QMARK_NO_DOT:`[^.${i}]`,STAR:`${o}*?`,START_ANCHOR:u},p={...l,SLASH_LITERAL:`[${n}]`,QMARK:r,STAR:`${r}*?`,DOTS_SLASH:`${s}{1,2}(?:[${n}]|$)`,NO_DOT:`(?!${s})`,NO_DOTS:`(?!(?:^|[${n}])${s}{1,2}(?:[${n}]|$))`,NO_DOT_SLASH:`(?!${s}{0,1}(?:[${n}]|$))`,NO_DOTS_SLASH:`(?!${s}{1,2}(?:[${n}]|$))`,QMARK_NO_DOT:`[^.${n}]`,START_ANCHOR:`(?:^|[${n}])`,END_ANCHOR:`(?:[${n}]|$)`};return ot={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:t.sep,extglobChars:t=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:t=>!0===t?p:l}}function Et(){return ut||(ut=1,function(t){const n=e,r="win32"===process.platform,{REGEX_BACKSLASH:s,REGEX_REMOVE_BACKSLASH:i,REGEX_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_GLOBAL:a}=bt();t.isObject=t=>null!==t&&"object"==typeof t&&!Array.isArray(t),t.hasRegexChars=t=>o.test(t),t.isRegexChar=e=>1===e.length&&t.hasRegexChars(e),t.escapeRegex=t=>t.replace(a,"\\$1"),t.toPosixSlashes=t=>t.replace(s,"/"),t.removeBackslashes=t=>t.replace(i,t=>"\\"===t?"":t),t.supportsLookbehinds=()=>{const t=process.version.slice(1).split(".").map(Number);return 3===t.length&&t[0]>=9||8===t[0]&&t[1]>=10},t.isWindows=t=>t&&"boolean"==typeof t.windows?t.windows:!0===r||"\\"===n.sep,t.escapeLast=(e,n,r)=>{const s=e.lastIndexOf(n,r);return-1===s?e:"\\"===e[s-1]?t.escapeLast(e,n,s-1):`${e.slice(0,s)}\\${e.slice(s)}`},t.removePrefix=(t,e={})=>{let n=t;return n.startsWith("./")&&(n=n.slice(2),e.prefix="./"),n},t.wrapOutput=(t,e={},n={})=>{let r=`${n.contains?"":"^"}(?:${t})${n.contains?"":"$"}`;return!0===e.negated&&(r=`(?:^(?!${r}).*$)`),r}}(vt)),vt}function At(){if(dt)return ht;dt=1;const t=e,n=function(){if(lt)return ct;lt=1;const t=Et(),{CHAR_ASTERISK:e,CHAR_AT:n,CHAR_BACKWARD_SLASH:r,CHAR_COMMA:s,CHAR_DOT:i,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:u,CHAR_LEFT_PARENTHESES:c,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_PLUS:p,CHAR_QUESTION_MARK:f,CHAR_RIGHT_CURLY_BRACE:h,CHAR_RIGHT_PARENTHESES:d,CHAR_RIGHT_SQUARE_BRACKET:_}=bt(),g=t=>t===a||t===r,y=t=>{!0!==t.isPrefix&&(t.depth=t.isGlobstar?1/0:1)};return ct=(m,S)=>{const v=S||{},b=m.length-1,E=!0===v.parts||!0===v.scanToEnd,A=[],R=[],x=[];let P,C,w=m,O=-1,T=0,k=0,L=!1,$=!1,H=!1,M=!1,D=!1,F=!1,N=!1,I=!1,j=!1,B=!1,G=0,U={value:"",depth:0,isGlob:!1};const W=()=>O>=b,K=()=>w.charCodeAt(O+1),V=()=>(P=C,w.charCodeAt(++O));for(;O<b;){let t;if(C=V(),C!==r){if(!0===F||C===u){for(G++;!0!==W()&&(C=V());)if(C!==r)if(C!==u){if(!0!==F&&C===i&&(C=V())===i){if(L=U.isBrace=!0,H=U.isGlob=!0,B=!0,!0===E)continue;break}if(!0!==F&&C===s){if(L=U.isBrace=!0,H=U.isGlob=!0,B=!0,!0===E)continue;break}if(C===h&&(G--,0===G)){F=!1,L=U.isBrace=!0,B=!0;break}}else G++;else N=U.backslashes=!0,V();if(!0===E)continue;break}if(C!==a){if(!0!==v.noext&&!0==(C===p||C===n||C===e||C===f||C===o)&&K()===c){if(H=U.isGlob=!0,M=U.isExtglob=!0,B=!0,C===o&&O===T&&(j=!0),!0===E){for(;!0!==W()&&(C=V());)if(C!==r){if(C===d){H=U.isGlob=!0,B=!0;break}}else N=U.backslashes=!0,C=V();continue}break}if(C===e){if(P===e&&(D=U.isGlobstar=!0),H=U.isGlob=!0,B=!0,!0===E)continue;break}if(C===f){if(H=U.isGlob=!0,B=!0,!0===E)continue;break}if(C===l){for(;!0!==W()&&(t=V());)if(t!==r){if(t===_){$=U.isBracket=!0,H=U.isGlob=!0,B=!0;break}}else N=U.backslashes=!0,V();if(!0===E)continue;break}if(!0===v.nonegate||C!==o||O!==T){if(!0!==v.noparen&&C===c){if(H=U.isGlob=!0,!0===E){for(;!0!==W()&&(C=V());)if(C!==c){if(C===d){B=!0;break}}else N=U.backslashes=!0,C=V();continue}break}if(!0===H){if(B=!0,!0===E)continue;break}}else I=U.negated=!0,T++}else{if(A.push(O),R.push(U),U={value:"",depth:0,isGlob:!1},!0===B)continue;if(P===i&&O===T+1){T+=2;continue}k=O+1}}else N=U.backslashes=!0,C=V(),C===u&&(F=!0)}!0===v.noext&&(M=!1,H=!1);let q=w,Q="",Y="";T>0&&(Q=w.slice(0,T),w=w.slice(T),k-=T),q&&!0===H&&k>0?(q=w.slice(0,k),Y=w.slice(k)):!0===H?(q="",Y=w):q=w,q&&""!==q&&"/"!==q&&q!==w&&g(q.charCodeAt(q.length-1))&&(q=q.slice(0,-1)),!0===v.unescape&&(Y&&(Y=t.removeBackslashes(Y)),q&&!0===N&&(q=t.removeBackslashes(q)));const X={prefix:Q,input:m,start:T,base:q,glob:Y,isBrace:L,isBracket:$,isGlob:H,isExtglob:M,isGlobstar:D,negated:I,negatedExtglob:j};if(!0===v.tokens&&(X.maxDepth=0,g(C)||R.push(U),X.tokens=R),!0===v.parts||!0===v.tokens){let t;for(let e=0;e<A.length;e++){const n=t?t+1:T,r=A[e],s=m.slice(n,r);v.tokens&&(0===e&&0!==T?(R[e].isPrefix=!0,R[e].value=Q):R[e].value=s,y(R[e]),X.maxDepth+=R[e].depth),0===e&&""===s||x.push(s),t=r}if(t&&t+1<m.length){const e=m.slice(t+1);x.push(e),v.tokens&&(R[R.length-1].value=e,y(R[R.length-1]),X.maxDepth+=R[R.length-1].depth)}X.slashes=A,X.parts=x}return X},ct}(),r=function(){if(ft)return pt;ft=1;const t=bt(),e=Et(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:r,REGEX_NON_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_BACKREF:i,REPLACEMENTS:o}=t,a=(t,n)=>{if("function"==typeof n.expandRange)return n.expandRange(...t,n);t.sort();const r=`[${t.join("-")}]`;try{new RegExp(r)}catch(n){return t.map(t=>e.escapeRegex(t)).join("..")}return r},u=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,c=(l,p)=>{if("string"!=typeof l)throw new TypeError("Expected a string");l=o[l]||l;const f={...p},h="number"==typeof f.maxLength?Math.min(n,f.maxLength):n;let d=l.length;if(d>h)throw new SyntaxError(`Input length: ${d}, exceeds maximum allowed length: ${h}`);const _={type:"bos",value:"",output:f.prepend||""},g=[_],y=f.capture?"":"?:",m=e.isWindows(p),S=t.globChars(m),v=t.extglobChars(S),{DOT_LITERAL:b,PLUS_LITERAL:E,SLASH_LITERAL:A,ONE_CHAR:R,DOTS_SLASH:x,NO_DOT:P,NO_DOT_SLASH:C,NO_DOTS_SLASH:w,QMARK:O,QMARK_NO_DOT:T,STAR:k,START_ANCHOR:L}=S,$=t=>`(${y}(?:(?!${L}${t.dot?x:b}).)*?)`,H=f.dot?"":P,M=f.dot?O:T;let D=!0===f.bash?$(f):k;f.capture&&(D=`(${D})`),"boolean"==typeof f.noext&&(f.noextglob=f.noext);const F={input:l,index:-1,start:0,dot:!0===f.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};l=e.removePrefix(l,F),d=l.length;const N=[],I=[],j=[];let B,G=_;const U=()=>F.index===d-1,W=F.peek=(t=1)=>l[F.index+t],K=F.advance=()=>l[++F.index]||"",V=()=>l.slice(F.index+1),q=(t="",e=0)=>{F.consumed+=t,F.index+=e},Q=t=>{F.output+=null!=t.output?t.output:t.value,q(t.value)},Y=()=>{let t=1;for(;"!"===W()&&("("!==W(2)||"?"===W(3));)K(),F.start++,t++;return t%2!=0&&(F.negated=!0,F.start++,!0)},X=t=>{F[t]++,j.push(t)},Z=t=>{F[t]--,j.pop()},z=t=>{if("globstar"===G.type){const e=F.braces>0&&("comma"===t.type||"brace"===t.type),n=!0===t.extglob||N.length&&("pipe"===t.type||"paren"===t.type);"slash"===t.type||"paren"===t.type||e||n||(F.output=F.output.slice(0,-G.output.length),G.type="star",G.value="*",G.output=D,F.output+=G.output)}if(N.length&&"paren"!==t.type&&(N[N.length-1].inner+=t.value),(t.value||t.output)&&Q(t),G&&"text"===G.type&&"text"===t.type)return G.value+=t.value,void(G.output=(G.output||"")+t.value);t.prev=G,g.push(t),G=t},J=(t,e)=>{const n={...v[e],conditions:1,inner:""};n.prev=G,n.parens=F.parens,n.output=F.output;const r=(f.capture?"(":"")+n.open;X("parens"),z({type:t,value:e,output:F.output?"":R}),z({type:"paren",extglob:!0,value:K(),output:r}),N.push(n)},tt=t=>{let e,n=t.close+(f.capture?")":"");if("negate"===t.type){let r=D;if(t.inner&&t.inner.length>1&&t.inner.includes("/")&&(r=$(f)),(r!==D||U()||/^\)+$/.test(V()))&&(n=t.close=`)$))${r}`),t.inner.includes("*")&&(e=V())&&/^\.[^\\/.]+$/.test(e)){const s=c(e,{...p,fastpaths:!1}).output;n=t.close=`)${s})${r})`}"bos"===t.prev.type&&(F.negatedExtglob=!0)}z({type:"paren",extglob:!0,value:B,output:n}),Z("parens")};if(!1!==f.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(l)){let t=!1,n=l.replace(i,(e,n,r,s,i,o)=>"\\"===s?(t=!0,e):"?"===s?n?n+s+(i?O.repeat(i.length):""):0===o?M+(i?O.repeat(i.length):""):O.repeat(r.length):"."===s?b.repeat(r.length):"*"===s?n?n+s+(i?D:""):D:n?e:`\\${e}`);return!0===t&&(n=!0===f.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,t=>t.length%2==0?"\\\\":t?"\\":"")),n===l&&!0===f.contains?(F.output=l,F):(F.output=e.wrapOutput(n,F,p),F)}for(;!U();){if(B=K(),"\0"===B)continue;if("\\"===B){const t=W();if("/"===t&&!0!==f.bash)continue;if("."===t||";"===t)continue;if(!t){B+="\\",z({type:"text",value:B});continue}const e=/^\\+/.exec(V());let n=0;if(e&&e[0].length>2&&(n=e[0].length,F.index+=n,n%2!=0&&(B+="\\")),!0===f.unescape?B=K():B+=K(),0===F.brackets){z({type:"text",value:B});continue}}if(F.brackets>0&&("]"!==B||"["===G.value||"[^"===G.value)){if(!1!==f.posix&&":"===B){const t=G.value.slice(1);if(t.includes("[")&&(G.posix=!0,t.includes(":"))){const t=G.value.lastIndexOf("["),e=G.value.slice(0,t),n=G.value.slice(t+2),s=r[n];if(s){G.value=e+s,F.backtrack=!0,K(),_.output||1!==g.indexOf(G)||(_.output=R);continue}}}("["===B&&":"!==W()||"-"===B&&"]"===W())&&(B=`\\${B}`),"]"!==B||"["!==G.value&&"[^"!==G.value||(B=`\\${B}`),!0===f.posix&&"!"===B&&"["===G.value&&(B="^"),G.value+=B,Q({value:B});continue}if(1===F.quotes&&'"'!==B){B=e.escapeRegex(B),G.value+=B,Q({value:B});continue}if('"'===B){F.quotes=1===F.quotes?0:1,!0===f.keepQuotes&&z({type:"text",value:B});continue}if("("===B){X("parens"),z({type:"paren",value:B});continue}if(")"===B){if(0===F.parens&&!0===f.strictBrackets)throw new SyntaxError(u("opening","("));const t=N[N.length-1];if(t&&F.parens===t.parens+1){tt(N.pop());continue}z({type:"paren",value:B,output:F.parens?")":"\\)"}),Z("parens");continue}if("["===B){if(!0!==f.nobracket&&V().includes("]"))X("brackets");else{if(!0!==f.nobracket&&!0===f.strictBrackets)throw new SyntaxError(u("closing","]"));B=`\\${B}`}z({type:"bracket",value:B});continue}if("]"===B){if(!0===f.nobracket||G&&"bracket"===G.type&&1===G.value.length){z({type:"text",value:B,output:`\\${B}`});continue}if(0===F.brackets){if(!0===f.strictBrackets)throw new SyntaxError(u("opening","["));z({type:"text",value:B,output:`\\${B}`});continue}Z("brackets");const t=G.value.slice(1);if(!0===G.posix||"^"!==t[0]||t.includes("/")||(B=`/${B}`),G.value+=B,Q({value:B}),!1===f.literalBrackets||e.hasRegexChars(t))continue;const n=e.escapeRegex(G.value);if(F.output=F.output.slice(0,-G.value.length),!0===f.literalBrackets){F.output+=n,G.value=n;continue}G.value=`(${y}${n}|${G.value})`,F.output+=G.value;continue}if("{"===B&&!0!==f.nobrace){X("braces");const t={type:"brace",value:B,output:"(",outputIndex:F.output.length,tokensIndex:F.tokens.length};I.push(t),z(t);continue}if("}"===B){const t=I[I.length-1];if(!0===f.nobrace||!t){z({type:"text",value:B,output:B});continue}let e=")";if(!0===t.dots){const t=g.slice(),n=[];for(let e=t.length-1;e>=0&&(g.pop(),"brace"!==t[e].type);e--)"dots"!==t[e].type&&n.unshift(t[e].value);e=a(n,f),F.backtrack=!0}if(!0!==t.comma&&!0!==t.dots){const n=F.output.slice(0,t.outputIndex),r=F.tokens.slice(t.tokensIndex);t.value=t.output="\\{",B=e="\\}",F.output=n;for(const t of r)F.output+=t.output||t.value}z({type:"brace",value:B,output:e}),Z("braces"),I.pop();continue}if("|"===B){N.length>0&&N[N.length-1].conditions++,z({type:"text",value:B});continue}if(","===B){let t=B;const e=I[I.length-1];e&&"braces"===j[j.length-1]&&(e.comma=!0,t="|"),z({type:"comma",value:B,output:t});continue}if("/"===B){if("dot"===G.type&&F.index===F.start+1){F.start=F.index+1,F.consumed="",F.output="",g.pop(),G=_;continue}z({type:"slash",value:B,output:A});continue}if("."===B){if(F.braces>0&&"dot"===G.type){"."===G.value&&(G.output=b);const t=I[I.length-1];G.type="dots",G.output+=B,G.value+=B,t.dots=!0;continue}if(F.braces+F.parens===0&&"bos"!==G.type&&"slash"!==G.type){z({type:"text",value:B,output:b});continue}z({type:"dot",value:B,output:b});continue}if("?"===B){if((!G||"("!==G.value)&&!0!==f.noextglob&&"("===W()&&"?"!==W(2)){J("qmark",B);continue}if(G&&"paren"===G.type){const t=W();let n=B;if("<"===t&&!e.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===G.value&&!/[!=<:]/.test(t)||"<"===t&&!/<([!=]|\w+>)/.test(V()))&&(n=`\\${B}`),z({type:"text",value:B,output:n});continue}if(!0!==f.dot&&("slash"===G.type||"bos"===G.type)){z({type:"qmark",value:B,output:T});continue}z({type:"qmark",value:B,output:O});continue}if("!"===B){if(!0!==f.noextglob&&"("===W()&&("?"!==W(2)||!/[!=<:]/.test(W(3)))){J("negate",B);continue}if(!0!==f.nonegate&&0===F.index){Y();continue}}if("+"===B){if(!0!==f.noextglob&&"("===W()&&"?"!==W(2)){J("plus",B);continue}if(G&&"("===G.value||!1===f.regex){z({type:"plus",value:B,output:E});continue}if(G&&("bracket"===G.type||"paren"===G.type||"brace"===G.type)||F.parens>0){z({type:"plus",value:B});continue}z({type:"plus",value:E});continue}if("@"===B){if(!0!==f.noextglob&&"("===W()&&"?"!==W(2)){z({type:"at",extglob:!0,value:B,output:""});continue}z({type:"text",value:B});continue}if("*"!==B){"$"!==B&&"^"!==B||(B=`\\${B}`);const t=s.exec(V());t&&(B+=t[0],F.index+=t[0].length),z({type:"text",value:B});continue}if(G&&("globstar"===G.type||!0===G.star)){G.type="star",G.star=!0,G.value+=B,G.output=D,F.backtrack=!0,F.globstar=!0,q(B);continue}let t=V();if(!0!==f.noextglob&&/^\([^?]/.test(t)){J("star",B);continue}if("star"===G.type){if(!0===f.noglobstar){q(B);continue}const e=G.prev,n=e.prev,r="slash"===e.type||"bos"===e.type,s=n&&("star"===n.type||"globstar"===n.type);if(!0===f.bash&&(!r||t[0]&&"/"!==t[0])){z({type:"star",value:B,output:""});continue}const i=F.braces>0&&("comma"===e.type||"brace"===e.type),o=N.length&&("pipe"===e.type||"paren"===e.type);if(!r&&"paren"!==e.type&&!i&&!o){z({type:"star",value:B,output:""});continue}for(;"/**"===t.slice(0,3);){const e=l[F.index+4];if(e&&"/"!==e)break;t=t.slice(3),q("/**",3)}if("bos"===e.type&&U()){G.type="globstar",G.value+=B,G.output=$(f),F.output=G.output,F.globstar=!0,q(B);continue}if("slash"===e.type&&"bos"!==e.prev.type&&!s&&U()){F.output=F.output.slice(0,-(e.output+G.output).length),e.output=`(?:${e.output}`,G.type="globstar",G.output=$(f)+(f.strictSlashes?")":"|$)"),G.value+=B,F.globstar=!0,F.output+=e.output+G.output,q(B);continue}if("slash"===e.type&&"bos"!==e.prev.type&&"/"===t[0]){const n=void 0!==t[1]?"|$":"";F.output=F.output.slice(0,-(e.output+G.output).length),e.output=`(?:${e.output}`,G.type="globstar",G.output=`${$(f)}${A}|${A}${n})`,G.value+=B,F.output+=e.output+G.output,F.globstar=!0,q(B+K()),z({type:"slash",value:"/",output:""});continue}if("bos"===e.type&&"/"===t[0]){G.type="globstar",G.value+=B,G.output=`(?:^|${A}|${$(f)}${A})`,F.output=G.output,F.globstar=!0,q(B+K()),z({type:"slash",value:"/",output:""});continue}F.output=F.output.slice(0,-G.output.length),G.type="globstar",G.output=$(f),G.value+=B,F.output+=G.output,F.globstar=!0,q(B);continue}const n={type:"star",value:B,output:D};!0!==f.bash?!G||"bracket"!==G.type&&"paren"!==G.type||!0!==f.regex?(F.index!==F.start&&"slash"!==G.type&&"dot"!==G.type||("dot"===G.type?(F.output+=C,G.output+=C):!0===f.dot?(F.output+=w,G.output+=w):(F.output+=H,G.output+=H),"*"!==W()&&(F.output+=R,G.output+=R)),z(n)):(n.output=B,z(n)):(n.output=".*?","bos"!==G.type&&"slash"!==G.type||(n.output=H+n.output),z(n))}for(;F.brackets>0;){if(!0===f.strictBrackets)throw new SyntaxError(u("closing","]"));F.output=e.escapeLast(F.output,"["),Z("brackets")}for(;F.parens>0;){if(!0===f.strictBrackets)throw new SyntaxError(u("closing",")"));F.output=e.escapeLast(F.output,"("),Z("parens")}for(;F.braces>0;){if(!0===f.strictBrackets)throw new SyntaxError(u("closing","}"));F.output=e.escapeLast(F.output,"{"),Z("braces")}if(!0===f.strictSlashes||"star"!==G.type&&"bracket"!==G.type||z({type:"maybe_slash",value:"",output:`${A}?`}),!0===F.backtrack){F.output="";for(const t of F.tokens)F.output+=null!=t.output?t.output:t.value,t.suffix&&(F.output+=t.suffix)}return F};return c.fastpaths=(r,s)=>{const i={...s},a="number"==typeof i.maxLength?Math.min(n,i.maxLength):n,u=r.length;if(u>a)throw new SyntaxError(`Input length: ${u}, exceeds maximum allowed length: ${a}`);r=o[r]||r;const c=e.isWindows(s),{DOT_LITERAL:l,SLASH_LITERAL:p,ONE_CHAR:f,DOTS_SLASH:h,NO_DOT:d,NO_DOTS:_,NO_DOTS_SLASH:g,STAR:y,START_ANCHOR:m}=t.globChars(c),S=i.dot?_:d,v=i.dot?g:d,b=i.capture?"":"?:";let E=!0===i.bash?".*?":y;i.capture&&(E=`(${E})`);const A=t=>!0===t.noglobstar?E:`(${b}(?:(?!${m}${t.dot?h:l}).)*?)`,R=t=>{switch(t){case"*":return`${S}${f}${E}`;case".*":return`${l}${f}${E}`;case"*.*":return`${S}${E}${l}${f}${E}`;case"*/*":return`${S}${E}${p}${f}${v}${E}`;case"**":return S+A(i);case"**/*":return`(?:${S}${A(i)}${p})?${v}${f}${E}`;case"**/*.*":return`(?:${S}${A(i)}${p})?${v}${E}${l}${f}${E}`;case"**/.*":return`(?:${S}${A(i)}${p})?${l}${f}${E}`;default:{const e=/^(.*?)\.(\w+)$/.exec(t);if(!e)return;const n=R(e[1]);if(!n)return;return n+l+e[2]}}},x=e.removePrefix(r,{negated:!1,prefix:""});let P=R(x);return P&&!0!==i.strictSlashes&&(P+=`${p}?`),P},pt=c}(),s=Et(),i=bt(),o=(t,e,n=!1)=>{if(Array.isArray(t)){const r=t.map(t=>o(t,e,n)),s=t=>{for(const e of r){const n=e(t);if(n)return n}return!1};return s}const r=(i=t)&&"object"==typeof i&&!Array.isArray(i)&&t.tokens&&t.input;var i;if(""===t||"string"!=typeof t&&!r)throw new TypeError("Expected pattern to be a non-empty string");const a=e||{},u=s.isWindows(e),c=r?o.compileRe(t,e):o.makeRe(t,e,!1,!0),l=c.state;delete c.state;let p=()=>!1;if(a.ignore){const t={...e,ignore:null,onMatch:null,onResult:null};p=o(a.ignore,t,n)}const f=(n,r=!1)=>{const{isMatch:s,match:i,output:f}=o.test(n,c,e,{glob:t,posix:u}),h={glob:t,state:l,regex:c,posix:u,input:n,output:f,match:i,isMatch:s};return"function"==typeof a.onResult&&a.onResult(h),!1===s?(h.isMatch=!1,!!r&&h):p(n)?("function"==typeof a.onIgnore&&a.onIgnore(h),h.isMatch=!1,!!r&&h):("function"==typeof a.onMatch&&a.onMatch(h),!r||h)};return n&&(f.state=l),f};return o.test=(t,e,n,{glob:r,posix:i}={})=>{if("string"!=typeof t)throw new TypeError("Expected input to be a string");if(""===t)return{isMatch:!1,output:""};const a=n||{},u=a.format||(i?s.toPosixSlashes:null);let c=t===r,l=c&&u?u(t):t;return!1===c&&(l=u?u(t):t,c=l===r),!1!==c&&!0!==a.capture||(c=!0===a.matchBase||!0===a.basename?o.matchBase(t,e,n,i):e.exec(l)),{isMatch:Boolean(c),match:c,output:l}},o.matchBase=(e,n,r,i=s.isWindows(r))=>(n instanceof RegExp?n:o.makeRe(n,r)).test(t.basename(e)),o.isMatch=(t,e,n)=>o(e,n)(t),o.parse=(t,e)=>Array.isArray(t)?t.map(t=>o.parse(t,e)):r(t,{...e,fastpaths:!1}),o.scan=(t,e)=>n(t,e),o.compileRe=(t,e,n=!1,r=!1)=>{if(!0===n)return t.output;const s=e||{},i=s.contains?"":"^",a=s.contains?"":"$";let u=`${i}(?:${t.output})${a}`;t&&!0===t.negated&&(u=`^(?!${u}).*$`);const c=o.toRegex(u,e);return!0===r&&(c.state=t),c},o.makeRe=(t,e={},n=!1,s=!1)=>{if(!t||"string"!=typeof t)throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return!1===e.fastpaths||"."!==t[0]&&"*"!==t[0]||(i.output=r.fastpaths(t,e)),i.output||(i=r(t,e)),o.compileRe(i,e,n,s)},o.toRegex=(t,e)=>{try{const n=e||{};return new RegExp(t,n.flags||(n.nocase?"i":""))}catch(t){if(e&&!0===e.debug)throw t;return/$^/}},o.constants=i,ht=o}function Rt(){return gt?_t:(gt=1,_t=At())}function xt(){if(St)return O;St=1,Object.defineProperty(O,"__esModule",{value:!0}),O.isAbsolute=O.partitionAbsoluteAndRelative=O.removeDuplicateSlashes=O.matchAny=O.convertPatternsToRe=O.makeRe=O.getPatternParts=O.expandBraceExpansion=O.expandPatternsWithBraceExpansion=O.isAffectDepthOfReadingPattern=O.endsWithSlashGlobStar=O.hasGlobStar=O.getBaseDirectory=O.isPatternRelatedToParentDirectory=O.getPatternsOutsideCurrentDirectory=O.getPatternsInsideCurrentDirectory=O.getPositivePatterns=O.getNegativePatterns=O.isPositivePattern=O.isNegativePattern=O.convertToNegativePattern=O.convertToPositivePattern=O.isDynamicPattern=O.isStaticPattern=void 0;const t=e,r=L(),s=function(){if(mt)return yt;mt=1;const t=n,e=it(),r=Rt(),s=Et(),i=t=>""===t||"./"===t,o=t=>{const e=t.indexOf("{");return e>-1&&t.indexOf("}",e)>-1},a=(t,e,n)=>{e=[].concat(e),t=[].concat(t);let s=new Set,i=new Set,o=new Set,a=0,u=t=>{o.add(t.output),n&&n.onResult&&n.onResult(t)};for(let o=0;o<e.length;o++){let c=r(String(e[o]),{...n,onResult:u},!0),l=c.state.negated||c.state.negatedExtglob;l&&a++;for(let e of t){let t=c(e,!0);(l?!t.isMatch:t.isMatch)&&(l?s.add(t.output):(s.delete(t.output),i.add(t.output)))}}let c=(a===e.length?[...o]:[...i]).filter(t=>!s.has(t));if(n&&0===c.length){if(!0===n.failglob)throw new Error(`No matches found for "${e.join(", ")}"`);if(!0===n.nonull||!0===n.nullglob)return n.unescape?e.map(t=>t.replace(/\\/g,"")):e}return c};return a.match=a,a.matcher=(t,e)=>r(t,e),a.any=a.isMatch=(t,e,n)=>r(e,n)(t),a.not=(t,e,n={})=>{e=[].concat(e).map(String);let r=new Set,s=[],i=new Set(a(t,e,{...n,onResult:t=>{n.onResult&&n.onResult(t),s.push(t.output)}}));for(let t of s)i.has(t)||r.add(t);return[...r]},a.contains=(e,n,r)=>{if("string"!=typeof e)throw new TypeError(`Expected a string: "${t.inspect(e)}"`);if(Array.isArray(n))return n.some(t=>a.contains(e,t,r));if("string"==typeof n){if(i(e)||i(n))return!1;if(e.includes(n)||e.startsWith("./")&&e.slice(2).includes(n))return!0}return a.isMatch(e,n,{...r,contains:!0})},a.matchKeys=(t,e,n)=>{if(!s.isObject(t))throw new TypeError("Expected the first argument to be an object");let r=a(Object.keys(t),e,n),i={};for(let e of r)i[e]=t[e];return i},a.some=(t,e,n)=>{let s=[].concat(t);for(let t of[].concat(e)){let e=r(String(t),n);if(s.some(t=>e(t)))return!0}return!1},a.every=(t,e,n)=>{let s=[].concat(t);for(let t of[].concat(e)){let e=r(String(t),n);if(!s.every(t=>e(t)))return!1}return!0},a.all=(e,n,s)=>{if("string"!=typeof e)throw new TypeError(`Expected a string: "${t.inspect(e)}"`);return[].concat(n).every(t=>r(t,s)(e))},a.capture=(t,e,n)=>{let i=s.isWindows(n),o=r.makeRe(String(t),{...n,capture:!0}).exec(i?s.toPosixSlashes(e):e);if(o)return o.slice(1).map(t=>void 0===t?"":t)},a.makeRe=(...t)=>r.makeRe(...t),a.scan=(...t)=>r.scan(...t),a.parse=(t,n)=>{let s=[];for(let i of[].concat(t||[]))for(let t of e(String(i),n))s.push(r.parse(t,n));return s},a.braces=(t,n)=>{if("string"!=typeof t)throw new TypeError("Expected a string");return n&&!0===n.nobrace||!o(t)?[t]:e(t,n)},a.braceExpand=(t,e)=>{if("string"!=typeof t)throw new TypeError("Expected a string");return a.braces(t,{...e,expand:!0})},a.hasBraces=o,yt=a}(),i=/[*?]|^!/,o=/\[[^[]*]/,a=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,u=/[!*+?@]\([^(]*\)/,c=/,|\.\./,l=/(?!^)\/{2,}/g;function p(t,e={}){return!f(t,e)}function f(t,e={}){return""!==t&&(!(!1!==e.caseSensitiveMatch&&!t.includes("\\"))||(!!(i.test(t)||o.test(t)||a.test(t))||(!(!1===e.extglob||!u.test(t))||!(!1===e.braceExpansion||!function(t){const e=t.indexOf("{");if(-1===e)return!1;const n=t.indexOf("}",e+1);if(-1===n)return!1;const r=t.slice(e,n);return c.test(r)}(t)))))}function h(t){return t.startsWith("!")&&"("!==t[1]}function d(t){return!h(t)}function _(t){return t.startsWith("..")||t.startsWith("./..")}function g(t){return t.endsWith("/**")}function y(t){const e=s.braces(t,{expand:!0,nodupes:!0,keepEscaping:!0});return e.sort((t,e)=>t.length-e.length),e.filter(t=>""!==t)}function m(t,e){return s.makeRe(t,e)}function S(e){return t.isAbsolute(e)}return O.isStaticPattern=p,O.isDynamicPattern=f,O.convertToPositivePattern=function(t){return h(t)?t.slice(1):t},O.convertToNegativePattern=function(t){return"!"+t},O.isNegativePattern=h,O.isPositivePattern=d,O.getNegativePatterns=function(t){return t.filter(h)},O.getPositivePatterns=function(t){return t.filter(d)},O.getPatternsInsideCurrentDirectory=function(t){return t.filter(t=>!_(t))},O.getPatternsOutsideCurrentDirectory=function(t){return t.filter(_)},O.isPatternRelatedToParentDirectory=_,O.getBaseDirectory=function(t){return r(t,{flipBackslashes:!1})},O.hasGlobStar=function(t){return t.includes("**")},O.endsWithSlashGlobStar=g,O.isAffectDepthOfReadingPattern=function(e){const n=t.basename(e);return g(e)||p(n)},O.expandPatternsWithBraceExpansion=function(t){return t.reduce((t,e)=>t.concat(y(e)),[])},O.expandBraceExpansion=y,O.getPatternParts=function(t,e){let{parts:n}=s.scan(t,Object.assign(Object.assign({},e),{parts:!0}));return 0===n.length&&(n=[t]),n[0].startsWith("/")&&(n[0]=n[0].slice(1),n.unshift("")),n},O.makeRe=m,O.convertPatternsToRe=function(t,e){return t.map(t=>m(t,e))},O.matchAny=function(t,e){return e.some(e=>e.test(t))},O.removeDuplicateSlashes=function(t){return t.replace(l,"/")},O.partitionAbsoluteAndRelative=function(t){const e=[],n=[];for(const r of t)S(r)?e.push(r):n.push(r);return[e,n]},O.isAbsolute=S,O}var Pt,Ct,wt,Ot={};function Tt(){if(Ct)return Pt;Ct=1;const t=r.PassThrough,e=Array.prototype.slice;function n(e,r){if(Array.isArray(e))for(let t=0,s=e.length;t<s;t++)e[t]=n(e[t],r);else{if(!e._readableState&&e.pipe&&(e=e.pipe(t(r))),!e._readableState||!e.pause||!e.pipe)throw new Error("Only readable stream can be merged.");e.pause()}return e}return Pt=function(){const r=[],s=e.call(arguments);let i=!1,o=s[s.length-1];o&&!Array.isArray(o)&&null==o.pipe?s.pop():o={};const a=!1!==o.end,u=!0===o.pipeError;null==o.objectMode&&(o.objectMode=!0);null==o.highWaterMark&&(o.highWaterMark=65536);const c=t(o);function l(){for(let t=0,e=arguments.length;t<e;t++)r.push(n(arguments[t],o));return p(),this}function p(){if(i)return;i=!0;let t=r.shift();if(!t)return void process.nextTick(f);Array.isArray(t)||(t=[t]);let e=t.length+1;function n(){--e>0||(i=!1,p())}function s(t){function e(){t.removeListener("merge2UnpipeEnd",e),t.removeListener("end",e),u&&t.removeListener("error",r),n()}function r(t){c.emit("error",t)}if(t._readableState.endEmitted)return n();t.on("merge2UnpipeEnd",e),t.on("end",e),u&&t.on("error",r),t.pipe(c,{end:!1}),t.resume()}for(let e=0;e<t.length;e++)s(t[e]);n()}function f(){i=!1,c.emit("queueDrain"),a&&c.end()}c.setMaxListeners(0),c.add=l,c.on("unpipe",function(t){t.emit("merge2UnpipeEnd")}),s.length&&l.apply(null,s);return c},Pt}var kt,Lt,$t,Ht={};function Mt(){if(kt)return Ht;return kt=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.isEmpty=Ht.isString=void 0,Ht.isString=function(t){return"string"==typeof t},Ht.isEmpty=function(t){return""===t},Ht}function Dt(){if(Lt)return f;Lt=1,Object.defineProperty(f,"__esModule",{value:!0}),f.string=f.stream=f.pattern=f.path=f.fs=f.errno=f.array=void 0;const t=d();f.array=t;const e=y();f.errno=e;const n=function(){if(m)return S;m=1,Object.defineProperty(S,"__esModule",{value:!0}),S.createDirentFromStats=void 0;class t{constructor(t,e){this.name=t,this.isBlockDevice=e.isBlockDevice.bind(e),this.isCharacterDevice=e.isCharacterDevice.bind(e),this.isDirectory=e.isDirectory.bind(e),this.isFIFO=e.isFIFO.bind(e),this.isFile=e.isFile.bind(e),this.isSocket=e.isSocket.bind(e),this.isSymbolicLink=e.isSymbolicLink.bind(e)}}return S.createDirentFromStats=function(e,n){return new t(e,n)},S}();f.fs=n;const r=E();f.path=r;const s=xt();f.pattern=s;const i=function(){if(wt)return Ot;wt=1,Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.merge=void 0;const t=Tt();function e(t){t.forEach(t=>t.emit("close"))}return Ot.merge=function(n){const r=t(n);return n.forEach(t=>{t.once("error",t=>r.emit("error",t))}),r.once("close",()=>e(n)),r.once("end",()=>e(n)),r},Ot}();f.stream=i;const o=Mt();return f.string=o,f}var Ft,Nt={},It={},jt={},Bt={},Gt={},Ut={},Wt={},Kt={},Vt={};function qt(){if(Ft)return Vt;function t(t,e){t(e)}function e(t,e){t(null,e)}return Ft=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.read=void 0,Vt.read=function(n,r,s){r.fs.lstat(n,(i,o)=>{null===i?o.isSymbolicLink()&&r.followSymbolicLink?r.fs.stat(n,(n,i)=>{if(null!==n)return r.throwErrorOnBrokenSymbolicLink?void t(s,n):void e(s,o);r.markSymbolicLink&&(i.isSymbolicLink=()=>!0),e(s,i)}):e(s,o):t(s,i)})},Vt}var Qt,Yt={};var Xt,Zt,zt,Jt,te,ee,ne,re={},se={};function ie(){if(Zt)return re;Zt=1,Object.defineProperty(re,"__esModule",{value:!0});const t=(Xt||(Xt=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createFileSystemAdapter=t.FILE_SYSTEM_ADAPTER=void 0;const e=i;t.FILE_SYSTEM_ADAPTER={lstat:e.lstat,stat:e.stat,lstatSync:e.lstatSync,statSync:e.statSync},t.createFileSystemAdapter=function(e){return void 0===e?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),e)}}(se)),se);return re.default=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=t.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(t,e){return null!=t?t:e}},re}function oe(){if(zt)return Kt;zt=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.statSync=Kt.stat=Kt.Settings=void 0;const t=qt(),e=(Qt||(Qt=1,Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.read=void 0,Yt.read=function(t,e){const n=e.fs.lstatSync(t);if(!n.isSymbolicLink()||!e.followSymbolicLink)return n;try{const n=e.fs.statSync(t);return e.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(t){if(!e.throwErrorOnBrokenSymbolicLink)return n;throw t}}),Yt),n=ie();function r(t={}){return t instanceof n.default?t:new n.default(t)}return Kt.Settings=n.default,Kt.stat=function(e,n,s){"function"!=typeof n?t.read(e,r(n),s):t.read(e,r(),n)},Kt.statSync=function(t,n){const s=r(n);return e.read(t,s)},Kt}function ae(){if(te)return Jt;let t;return te=1,Jt="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:u):e=>(t||(t=Promise.resolve())).then(e).catch(t=>setTimeout(()=>{throw t},0))}var ue,ce={};function le(){if(ue)return ce;ue=1,Object.defineProperty(ce,"__esModule",{value:!0}),ce.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const t=process.versions.node.split(".");if(void 0===t[0]||void 0===t[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const e=Number.parseInt(t[0],10),n=Number.parseInt(t[1],10),r=e>10,s=10===e&&n>=10;return ce.IS_SUPPORT_READDIR_WITH_FILE_TYPES=r||s,ce}var pe,fe,he={},de={};function _e(){if(fe)return he;fe=1,Object.defineProperty(he,"__esModule",{value:!0}),he.fs=void 0;const t=function(){if(pe)return de;pe=1,Object.defineProperty(de,"__esModule",{value:!0}),de.createDirentFromStats=void 0;class t{constructor(t,e){this.name=t,this.isBlockDevice=e.isBlockDevice.bind(e),this.isCharacterDevice=e.isCharacterDevice.bind(e),this.isDirectory=e.isDirectory.bind(e),this.isFIFO=e.isFIFO.bind(e),this.isFile=e.isFile.bind(e),this.isSocket=e.isSocket.bind(e),this.isSymbolicLink=e.isSymbolicLink.bind(e)}}return de.createDirentFromStats=function(e,n){return new t(e,n)},de}();return he.fs=t,he}var ge,ye,me={};function Se(){if(ge)return me;return ge=1,Object.defineProperty(me,"__esModule",{value:!0}),me.joinPathSegments=void 0,me.joinPathSegments=function(t,e,n){return t.endsWith(n)?t+e:t+n+e},me}function ve(){if(ye)return Wt;ye=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.readdir=Wt.readdirWithFileTypes=Wt.read=void 0;const t=oe(),e=function(){if(ne)return ee;ne=1,ee=function(e,n){let r,s,i,o=!0;function a(e){function s(){n&&n(e,r),n=null}o?t(s):s()}function u(t,e,n){r[t]=n,(0===--s||e)&&a(e)}Array.isArray(e)?(r=[],s=e.length):(i=Object.keys(e),r={},s=i.length),s?i?i.forEach(function(t){e[t](function(e,n){u(t,e,n)})}):e.forEach(function(t,e){t(function(t,n){u(e,t,n)})}):a(null),o=!1};const t=ae();return ee}(),n=le(),r=_e(),s=Se();function i(t,n,i){n.fs.readdir(t,{withFileTypes:!0},(o,c)=>{if(null!==o)return void a(i,o);const l=c.map(e=>({dirent:e,name:e.name,path:s.joinPathSegments(t,e.name,n.pathSegmentSeparator)}));if(!n.followSymbolicLinks)return void u(i,l);const p=l.map(t=>function(t,e){return n=>{t.dirent.isSymbolicLink()?e.fs.stat(t.path,(s,i)=>{if(null!==s)return e.throwErrorOnBrokenSymbolicLink?void n(s):void n(null,t);t.dirent=r.fs.createDirentFromStats(t.name,i),n(null,t)}):n(null,t)}}(t,n));e(p,(t,e)=>{null===t?u(i,e):a(i,t)})})}function o(n,i,o){i.fs.readdir(n,(c,l)=>{if(null!==c)return void a(o,c);const p=l.map(e=>{const o=s.joinPathSegments(n,e,i.pathSegmentSeparator);return n=>{t.stat(o,i.fsStatSettings,(t,s)=>{if(null!==t)return void n(t);const a={name:e,path:o,dirent:r.fs.createDirentFromStats(e,s)};i.stats&&(a.stats=s),n(null,a)})}});e(p,(t,e)=>{null===t?u(o,e):a(o,t)})})}function a(t,e){t(e)}function u(t,e){t(null,e)}return Wt.read=function(t,e,r){e.stats||!n.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(t,e,r):i(t,e,r)},Wt.readdirWithFileTypes=i,Wt.readdir=o,Wt}var be,Ee={};var Ae,Re,xe,Pe={},Ce={};function we(){return Ae||(Ae=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createFileSystemAdapter=t.FILE_SYSTEM_ADAPTER=void 0;const e=i;t.FILE_SYSTEM_ADAPTER={lstat:e.lstat,stat:e.stat,lstatSync:e.lstatSync,statSync:e.statSync,readdir:e.readdir,readdirSync:e.readdirSync},t.createFileSystemAdapter=function(e){return void 0===e?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),e)}}(Ce)),Ce}function Oe(){if(xe)return Ut;xe=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const t=ve(),n=function(){if(be)return Ee;be=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.readdir=Ee.readdirWithFileTypes=Ee.read=void 0;const t=oe(),e=le(),n=_e(),r=Se();function s(t,e){return e.fs.readdirSync(t,{withFileTypes:!0}).map(s=>{const i={dirent:s,name:s.name,path:r.joinPathSegments(t,s.name,e.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{const t=e.fs.statSync(i.path);i.dirent=n.fs.createDirentFromStats(i.name,t)}catch(t){if(e.throwErrorOnBrokenSymbolicLink)throw t}return i})}function i(e,s){return s.fs.readdirSync(e).map(i=>{const o=r.joinPathSegments(e,i,s.pathSegmentSeparator),a=t.statSync(o,s.fsStatSettings),u={name:i,path:o,dirent:n.fs.createDirentFromStats(i,a)};return s.stats&&(u.stats=a),u})}return Ee.read=function(t,n){return!n.stats&&e.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(t,n):i(t,n)},Ee.readdirWithFileTypes=s,Ee.readdir=i,Ee}(),r=function(){if(Re)return Pe;Re=1,Object.defineProperty(Pe,"__esModule",{value:!0});const t=e,n=oe(),r=we();return Pe.default=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=r.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,t.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new n.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(t,e){return null!=t?t:e}},Pe}();function s(t={}){return t instanceof r.default?t:new r.default(t)}return Ut.Settings=r.default,Ut.scandir=function(e,n,r){"function"!=typeof n?t.read(e,s(n),r):t.read(e,s(),n)},Ut.scandirSync=function(t,e){const r=s(e);return n.read(t,r)},Ut}var Te,ke,Le,$e={exports:{}};function He(){if(Le)return $e.exports;Le=1;var t=ke?Te:(ke=1,Te=function(t){var e=new t,n=e;return{get:function(){var r=e;return r.next?e=r.next:(e=new t,n=e),r.next=null,r},release:function(t){n.next=t,n=t}}});function e(e,s,i){if("function"==typeof e&&(i=s,s=e,e=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var o=t(r),a=null,u=null,c=0,l=null,p={push:function(t,r){var h=o.get();h.context=e,h.release=f,h.value=t,h.callback=r||n,h.errorHandler=l,c>=i||p.paused?u?(u.next=h,u=h):(a=h,u=h,p.saturated()):(c++,s.call(e,h.value,h.worked))},drain:n,saturated:n,pause:function(){p.paused=!0},paused:!1,get concurrency(){return i},set concurrency(t){if(!(t>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=t,!p.paused)for(;a&&c<i;)c++,f()},running:function(){return c},resume:function(){if(!p.paused)return;if(p.paused=!1,null===a)return c++,void f();for(;a&&c<i;)c++,f()},idle:function(){return 0===c&&0===p.length()},length:function(){var t=a,e=0;for(;t;)t=t.next,e++;return e},getQueue:function(){var t=a,e=[];for(;t;)e.push(t.value),t=t.next;return e},unshift:function(t,r){var h=o.get();h.context=e,h.release=f,h.value=t,h.callback=r||n,h.errorHandler=l,c>=i||p.paused?a?(h.next=a,a=h):(a=h,u=h,p.saturated()):(c++,s.call(e,h.value,h.worked))},empty:n,kill:function(){a=null,u=null,p.drain=n},killAndDrain:function(){a=null,u=null,p.drain(),p.drain=n},error:function(t){l=t},abort:function(){var t=a;a=null,u=null;for(;t;){var e=t.next,r=t.callback,s=t.errorHandler,i=t.value,o=t.context;t.value=null,t.callback=n,t.errorHandler=null,s&&s(new Error("abort"),i),r.call(o,new Error("abort")),t.release(t),t=e}p.drain=n}};return p;function f(t){t&&o.release(t);var n=a;n&&c<=i?p.paused?c--:(u===a&&(u=null),a=n.next,n.next=null,s.call(e,n.value,n.worked),null===u&&p.empty()):0===--c&&p.drain()}}function n(){}function r(){this.value=null,this.callback=n,this.next=null,this.release=n,this.context=null,this.errorHandler=null;var t=this;this.worked=function(e,r){var s=t.callback,i=t.errorHandler,o=t.value;t.value=null,t.callback=n,t.errorHandler&&i(e,o),s.call(t.context,e,r),t.release(t)}}return $e.exports=e,$e.exports.promise=function(t,r,s){"function"==typeof t&&(s=r,r=t,t=null);var i=e(t,function(t,e){r.call(this,t).then(function(t){e(null,t)},e)},s),o=i.push,a=i.unshift;return i.push=function(t){var e=new Promise(function(e,n){o(t,function(t,r){t?n(t):e(r)})});return e.catch(n),e},i.unshift=function(t){var e=new Promise(function(e,n){a(t,function(t,r){t?n(t):e(r)})});return e.catch(n),e},i.drained=function(){return new Promise(function(t){process.nextTick(function(){if(i.idle())t();else{var e=i.drain;i.drain=function(){"function"==typeof e&&e(),t(),i.drain=e}}})})},i},$e.exports}var Me,De={};function Fe(){if(Me)return De;return Me=1,Object.defineProperty(De,"__esModule",{value:!0}),De.joinPathSegments=De.replacePathSegmentSeparator=De.isAppliedFilter=De.isFatalError=void 0,De.isFatalError=function(t,e){return null===t.errorFilter||!t.errorFilter(e)},De.isAppliedFilter=function(t,e){return null===t||t(e)},De.replacePathSegmentSeparator=function(t,e){return t.split(/[/\\]/).join(e)},De.joinPathSegments=function(t,e,n){return""===t?e:t.endsWith(n)?t+e:t+n+e},De}var Ne,Ie,je,Be={};function Ge(){if(Ne)return Be;Ne=1,Object.defineProperty(Be,"__esModule",{value:!0});const t=Fe();return Be.default=class{constructor(e,n){this._root=e,this._settings=n,this._root=t.replacePathSegmentSeparator(e,n.pathSegmentSeparator)}},Be}function Ue(){if(Ie)return Gt;Ie=1,Object.defineProperty(Gt,"__esModule",{value:!0});const t=s,e=Oe(),n=He(),r=Fe(),i=Ge();class o extends i.default{constructor(r,s){super(r,s),this._settings=s,this._scandir=e.scandir,this._emitter=new t.EventEmitter,this._queue=n(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(t){this._emitter.on("entry",t)}onError(t){this._emitter.once("error",t)}onEnd(t){this._emitter.once("end",t)}_pushToQueue(t,e){const n={directory:t,base:e};this._queue.push(n,t=>{null!==t&&this._handleError(t)})}_worker(t,e){this._scandir(t.directory,this._settings.fsScandirSettings,(n,r)=>{if(null===n){for(const e of r)this._handleEntry(e,t.base);e(null,void 0)}else e(n,void 0)})}_handleError(t){!this._isDestroyed&&r.isFatalError(this._settings,t)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",t))}_handleEntry(t,e){if(this._isDestroyed||this._isFatalError)return;const n=t.path;void 0!==e&&(t.path=r.joinPathSegments(e,t.name,this._settings.pathSegmentSeparator)),r.isAppliedFilter(this._settings.entryFilter,t)&&this._emitEntry(t),t.dirent.isDirectory()&&r.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(n,void 0===e?void 0:t.path)}_emitEntry(t){this._emitter.emit("entry",t)}}return Gt.default=o,Gt}var We,Ke={};var Ve,qe,Qe={},Ye={};function Xe(){if(qe)return Qe;qe=1,Object.defineProperty(Qe,"__esModule",{value:!0});const t=function(){if(Ve)return Ye;Ve=1,Object.defineProperty(Ye,"__esModule",{value:!0});const t=Oe(),e=Fe(),n=Ge();class r extends n.default{constructor(){super(...arguments),this._scandir=t.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(t,e){this._queue.add({directory:t,base:e})}_handleQueue(){for(const t of this._queue.values())this._handleDirectory(t.directory,t.base)}_handleDirectory(t,e){try{const n=this._scandir(t,this._settings.fsScandirSettings);for(const t of n)this._handleEntry(t,e)}catch(t){this._handleError(t)}}_handleError(t){if(e.isFatalError(this._settings,t))throw t}_handleEntry(t,n){const r=t.path;void 0!==n&&(t.path=e.joinPathSegments(n,t.name,this._settings.pathSegmentSeparator)),e.isAppliedFilter(this._settings.entryFilter,t)&&this._pushToStorage(t),t.dirent.isDirectory()&&e.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(r,void 0===n?void 0:t.path)}_pushToStorage(t){this._storage.push(t)}}return Ye.default=r,Ye}();return Qe.default=class{constructor(e,n){this._root=e,this._settings=n,this._reader=new t.default(this._root,this._settings)}read(){return this._reader.read()}},Qe}var Ze,ze,Je={};function tn(){if(ze)return jt;ze=1,Object.defineProperty(jt,"__esModule",{value:!0}),jt.Settings=jt.walkStream=jt.walkSync=jt.walk=void 0;const t=function(){if(je)return Bt;je=1,Object.defineProperty(Bt,"__esModule",{value:!0});const t=Ue();return Bt.default=class{constructor(e,n){this._root=e,this._settings=n,this._reader=new t.default(this._root,this._settings),this._storage=[]}read(t){this._reader.onError(e=>{!function(t,e){t(e)}(t,e)}),this._reader.onEntry(t=>{this._storage.push(t)}),this._reader.onEnd(()=>{!function(t,e){t(null,e)}(t,this._storage)}),this._reader.read()}},Bt}(),n=function(){if(We)return Ke;We=1,Object.defineProperty(Ke,"__esModule",{value:!0});const t=r,e=Ue();return Ke.default=class{constructor(n,r){this._root=n,this._settings=r,this._reader=new e.default(this._root,this._settings),this._stream=new t.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}},Ke}(),s=Xe(),i=function(){if(Ze)return Je;Ze=1,Object.defineProperty(Je,"__esModule",{value:!0});const t=e,n=Oe();return Je.default=class{constructor(e={}){this._options=e,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,t.sep),this.fsScandirSettings=new n.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(t,e){return null!=t?t:e}},Je}();function o(t={}){return t instanceof i.default?t:new i.default(t)}return jt.Settings=i.default,jt.walk=function(e,n,r){"function"!=typeof n?new t.default(e,o(n)).read(r):new t.default(e,o()).read(n)},jt.walkSync=function(t,e){const n=o(e);return new s.default(t,n).read()},jt.walkStream=function(t,e){const r=o(e);return new n.default(t,r).read()},jt}var en,nn={};function rn(){if(en)return nn;en=1,Object.defineProperty(nn,"__esModule",{value:!0});const t=e,n=oe(),r=Dt();return nn.default=class{constructor(t){this._settings=t,this._fsStatSettings=new n.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return t.resolve(this._settings.cwd,e)}_makeEntry(t,e){const n={name:e,path:e,dirent:r.fs.createDirentFromStats(e,t)};return this._settings.stats&&(n.stats=t),n}_isFatalError(t){return!r.errno.isEnoentCodeError(t)&&!this._settings.suppressErrors}},nn}var sn,on,an={};function un(){if(sn)return an;sn=1,Object.defineProperty(an,"__esModule",{value:!0});const t=r,e=oe(),n=tn(),s=rn();class i extends s.default{constructor(){super(...arguments),this._walkStream=n.walkStream,this._stat=e.stat}dynamic(t,e){return this._walkStream(t,e)}static(e,n){const r=e.map(this._getFullEntryPath,this),s=new t.PassThrough({objectMode:!0});s._write=(t,i,o)=>this._getEntry(r[t],e[t],n).then(e=>{null!==e&&n.entryFilter(e)&&s.push(e),t===r.length-1&&s.end(),o()}).catch(o);for(let t=0;t<r.length;t++)s.write(t);return s}_getEntry(t,e,n){return this._getStat(t).then(t=>this._makeEntry(t,e)).catch(t=>{if(n.errorFilter(t))return null;throw t})}_getStat(t){return new Promise((e,n)=>{this._stat(t,this._fsStatSettings,(t,r)=>null===t?e(r):n(t))})}}return an.default=i,an}var cn,ln,pn,fn={},hn={},dn={},_n={};function gn(){if(ln)return dn;ln=1,Object.defineProperty(dn,"__esModule",{value:!0});const t=function(){if(cn)return _n;cn=1,Object.defineProperty(_n,"__esModule",{value:!0});const t=Dt();return _n.default=class{constructor(t,e,n){this._patterns=t,this._settings=e,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){for(const t of this._patterns){const e=this._getPatternSegments(t),n=this._splitSegmentsIntoSections(e);this._storage.push({complete:n.length<=1,pattern:t,segments:e,sections:n})}}_getPatternSegments(e){return t.pattern.getPatternParts(e,this._micromatchOptions).map(e=>t.pattern.isDynamicPattern(e,this._settings)?{dynamic:!0,pattern:e,patternRe:t.pattern.makeRe(e,this._micromatchOptions)}:{dynamic:!1,pattern:e})}_splitSegmentsIntoSections(e){return t.array.splitWhen(e,e=>e.dynamic&&t.pattern.hasGlobStar(e.pattern))}},_n}();class e extends t.default{match(t){const e=t.split("/"),n=e.length,r=this._storage.filter(t=>!t.complete||t.segments.length>n);for(const t of r){const r=t.sections[0];if(!t.complete&&n>r.length)return!0;if(e.every((e,n)=>{const r=t.segments[n];return!(!r.dynamic||!r.patternRe.test(e))||!r.dynamic&&r.pattern===e}))return!0}return!1}}return dn.default=e,dn}var yn,mn={};var Sn,vn={};var bn,En,An,Rn={};function xn(){if(En)return fn;En=1,Object.defineProperty(fn,"__esModule",{value:!0});const t=e,n=function(){if(pn)return hn;pn=1,Object.defineProperty(hn,"__esModule",{value:!0});const t=Dt(),e=gn();return hn.default=class{constructor(t,e){this._settings=t,this._micromatchOptions=e}getFilter(t,e,n){const r=this._getMatcher(e),s=this._getNegativePatternsRe(n);return e=>this._filter(t,e,r,s)}_getMatcher(t){return new e.default(t,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){const n=e.filter(t.pattern.isAffectDepthOfReadingPattern);return t.pattern.convertPatternsToRe(n,this._micromatchOptions)}_filter(e,n,r,s){if(this._isSkippedByDeep(e,n.path))return!1;if(this._isSkippedSymbolicLink(n))return!1;const i=t.path.removeLeadingDotSegment(n.path);return!this._isSkippedByPositivePatterns(i,r)&&this._isSkippedByNegativePatterns(i,s)}_isSkippedByDeep(t,e){return this._settings.deep!==1/0&&this._getEntryLevel(t,e)>=this._settings.deep}_getEntryLevel(t,e){const n=e.split("/").length;return""===t?n:n-t.split("/").length}_isSkippedSymbolicLink(t){return!this._settings.followSymbolicLinks&&t.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(t,e){return!this._settings.baseNameMatch&&!e.match(t)}_isSkippedByNegativePatterns(e,n){return!t.pattern.matchAny(e,n)}},hn}(),r=function(){if(yn)return mn;yn=1,Object.defineProperty(mn,"__esModule",{value:!0});const t=Dt();return mn.default=class{constructor(t,e){this._settings=t,this._micromatchOptions=e,this.index=new Map}getFilter(e,n){const[r,s]=t.pattern.partitionAbsoluteAndRelative(n),i={positive:{all:t.pattern.convertPatternsToRe(e,this._micromatchOptions)},negative:{absolute:t.pattern.convertPatternsToRe(r,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:t.pattern.convertPatternsToRe(s,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return t=>this._filter(t,i)}_filter(e,n){const r=t.path.removeLeadingDotSegment(e.path);if(this._settings.unique&&this._isDuplicateEntry(r))return!1;if(this._onlyFileFilter(e)||this._onlyDirectoryFilter(e))return!1;const s=this._isMatchToPatternsSet(r,n,e.dirent.isDirectory());return this._settings.unique&&s&&this._createIndexRecord(r),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()}_isMatchToPatternsSet(t,e,n){return!!this._isMatchToPatterns(t,e.positive.all,n)&&(!this._isMatchToPatterns(t,e.negative.relative,n)&&!this._isMatchToAbsoluteNegative(t,e.negative.absolute,n))}_isMatchToAbsoluteNegative(e,n,r){if(0===n.length)return!1;const s=t.path.makeAbsolute(this._settings.cwd,e);return this._isMatchToPatterns(s,n,r)}_isMatchToPatterns(e,n,r){if(0===n.length)return!1;const s=t.pattern.matchAny(e,n);return!s&&r?t.pattern.matchAny(e+"/",n):s}},mn}(),s=function(){if(Sn)return vn;Sn=1,Object.defineProperty(vn,"__esModule",{value:!0});const t=Dt();return vn.default=class{constructor(t){this._settings=t}getFilter(){return t=>this._isNonFatalError(t)}_isNonFatalError(e){return t.errno.isEnoentCodeError(e)||this._settings.suppressErrors}},vn}(),i=function(){if(bn)return Rn;bn=1,Object.defineProperty(Rn,"__esModule",{value:!0});const t=Dt();return Rn.default=class{constructor(t){this._settings=t}getTransformer(){return t=>this._transform(t)}_transform(e){let n=e.path;return this._settings.absolute&&(n=t.path.makeAbsolute(this._settings.cwd,n),n=t.path.unixify(n)),this._settings.markDirectories&&e.dirent.isDirectory()&&(n+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:n}):n}},Rn}();return fn.default=class{constructor(t){this._settings=t,this.errorFilter=new s.default(this._settings),this.entryFilter=new r.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new n.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(e){return t.resolve(this._settings.cwd,e.base)}_getReaderOptions(t){const e="."===t.base?"":t.base;return{basePath:e,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(e,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}}},fn}function Pn(){if(An)return Nt;An=1,Object.defineProperty(Nt,"__esModule",{value:!0});const t=function(){if(on)return It;on=1,Object.defineProperty(It,"__esModule",{value:!0});const t=tn(),e=rn(),n=un();class r extends e.default{constructor(){super(...arguments),this._walkAsync=t.walk,this._readerStream=new n.default(this._settings)}dynamic(t,e){return new Promise((n,r)=>{this._walkAsync(t,e,(t,e)=>{null===t?n(e):r(t)})})}async static(t,e){const n=[],r=this._readerStream.static(t,e);return new Promise((t,e)=>{r.once("error",e),r.on("data",t=>n.push(t)),r.once("end",()=>t(n))})}}return It.default=r,It}(),e=xn();class n extends e.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}async read(t){const e=this._getRootDirectory(t),n=this._getReaderOptions(t);return(await this.api(e,t,n)).map(t=>n.transform(t))}api(t,e,n){return e.dynamic?this._reader.dynamic(t,n):this._reader.static(e.patterns,n)}}return Nt.default=n,Nt}var Cn,wn={};var On,Tn,kn={},Ln={};function $n(){if(Tn)return kn;Tn=1,Object.defineProperty(kn,"__esModule",{value:!0});const t=function(){if(On)return Ln;On=1,Object.defineProperty(Ln,"__esModule",{value:!0});const t=oe(),e=tn(),n=rn();class r extends n.default{constructor(){super(...arguments),this._walkSync=e.walkSync,this._statSync=t.statSync}dynamic(t,e){return this._walkSync(t,e)}static(t,e){const n=[];for(const r of t){const t=this._getFullEntryPath(r),s=this._getEntry(t,r,e);null!==s&&e.entryFilter(s)&&n.push(s)}return n}_getEntry(t,e,n){try{const n=this._getStat(t);return this._makeEntry(n,e)}catch(t){if(n.errorFilter(t))return null;throw t}}_getStat(t){return this._statSync(t,this._fsStatSettings)}}return Ln.default=r,Ln}(),e=xn();class n extends e.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const e=this._getRootDirectory(t),n=this._getReaderOptions(t);return this.api(e,t,n).map(n.transform)}api(t,e,n){return e.dynamic?this._reader.dynamic(t,n):this._reader.static(e.patterns,n)}}return kn.default=n,kn}var Hn,Mn,Dn,Fn={};var Nn=function(){if(Dn)return Mn;Dn=1;const e=function(){if($t)return p;$t=1,Object.defineProperty(p,"__esModule",{value:!0}),p.convertPatternGroupToTask=p.convertPatternGroupsToTasks=p.groupPatternsByBaseDirectory=p.getNegativePatternsAsPositive=p.getPositivePatterns=p.convertPatternsToTasks=p.generate=void 0;const t=Dt();function e(e,n){let r=e;return n.braceExpansion&&(r=t.pattern.expandPatternsWithBraceExpansion(r)),n.baseNameMatch&&(r=r.map(t=>t.includes("/")?t:`**/${t}`)),r.map(e=>t.pattern.removeDuplicateSlashes(e))}function n(e,n,r){const s=[],u=t.pattern.getPatternsOutsideCurrentDirectory(e),c=t.pattern.getPatternsInsideCurrentDirectory(e),l=i(u),p=i(c);return s.push(...o(l,n,r)),"."in p?s.push(a(".",c,n,r)):s.push(...o(p,n,r)),s}function r(e){return t.pattern.getPositivePatterns(e)}function s(e,n){return t.pattern.getNegativePatterns(e).concat(n).map(t.pattern.convertToPositivePattern)}function i(e){return e.reduce((e,n)=>{const r=t.pattern.getBaseDirectory(n);return r in e?e[r].push(n):e[r]=[n],e},{})}function o(t,e,n){return Object.keys(t).map(r=>a(r,t[r],e,n))}function a(e,n,r,s){return{dynamic:s,positive:n,negative:r,base:e,patterns:[].concat(n,r.map(t.pattern.convertToNegativePattern))}}return p.generate=function(i,o){const a=e(i,o),u=e(o.ignore,o),c=r(a),l=s(a,u),p=c.filter(e=>t.pattern.isStaticPattern(e,o)),f=c.filter(e=>t.pattern.isDynamicPattern(e,o)),h=n(p,l,!1),d=n(f,l,!0);return h.concat(d)},p.convertPatternsToTasks=n,p.getPositivePatterns=r,p.getNegativePatternsAsPositive=s,p.groupPatternsByBaseDirectory=i,p.convertPatternGroupsToTasks=o,p.convertPatternGroupToTask=a,p}(),n=Pn(),s=function(){if(Cn)return wn;Cn=1,Object.defineProperty(wn,"__esModule",{value:!0});const t=r,e=un(),n=xn();class s extends n.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const n=this._getRootDirectory(e),r=this._getReaderOptions(e),s=this.api(n,e,r),i=new t.Readable({objectMode:!0,read:()=>{}});return s.once("error",t=>i.emit("error",t)).on("data",t=>i.emit("data",r.transform(t))).once("end",()=>i.emit("end")),i.once("close",()=>s.destroy()),i}api(t,e,n){return e.dynamic?this._reader.dynamic(t,n):this._reader.static(e.patterns,n)}}return wn.default=s,wn}(),o=$n(),a=(Hn||(Hn=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=i,r=t,s=Math.max(r.cpus().length,1);e.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},e.default=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,s),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,e){return void 0===t?e:t}_getFileSystemMethods(t={}){return Object.assign(Object.assign({},e.DEFAULT_FILE_SYSTEM_ADAPTER),t)}}}(Fn)),Fn),u=Dt();async function c(t,e){f(t);const r=l(t,n.default,e),s=await Promise.all(r);return u.array.flatten(s)}function l(t,n,r){const s=[].concat(t),i=new a.default(r),o=e.generate(s,i),u=new n(i);return o.map(u.read,u)}function f(t){if(![].concat(t).every(t=>u.string.isString(t)&&!u.string.isEmpty(t)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(t){function n(t,e){f(t);const n=l(t,o.default,e);return u.array.flatten(n)}function r(t,e){f(t);const n=l(t,s.default,e);return u.stream.merge(n)}var i,c;t.glob=t,t.globSync=n,t.globStream=r,t.async=t,t.sync=n,t.stream=r,t.generateTasks=function(t,n){f(t);const r=[].concat(t),s=new a.default(n);return e.generate(r,s)},t.isDynamicPattern=function(t,e){f(t);const n=new a.default(e);return u.pattern.isDynamicPattern(t,n)},t.escapePath=function(t){return f(t),u.path.escape(t)},t.convertPathToPattern=function(t){return f(t),u.path.convertPathToPattern(t)},(i=t.posix||(t.posix={})).escapePath=function(t){return f(t),u.path.escapePosixPath(t)},i.convertPathToPattern=function(t){return f(t),u.path.convertPosixPathToPattern(t)},(c=t.win32||(t.win32={})).escapePath=function(t){return f(t),u.path.escapeWindowsPath(t)},c.convertPathToPattern=function(t){return f(t),u.path.convertWindowsPathToPattern(t)}}(c||(c={})),Mn=c}(),In=c(Nn);function jn(t){let e=0;for(;e<t.length&&/\s/.test(t[e]);)e++;if(e<t.length&&"("===t[e])return t;const n=t.indexOf("(");if(-1===n)return t;const r=t.indexOf(")",n);if(-1===r)return t;return t.slice(n,r+1)+" => "+t.slice(r+1)}const Bn=/\\/g,Gn=t=>t.replace(Bn,"/"),Un=(t,e)=>Gn(a.relative(e,t)),Wn=/export\s+default\s+[\w(\[\]\{\})]+/;function Kn(t){try{if(!o.existsSync(t))return console.warn(`File not found: ${t}`),!1;const e=o.readFileSync(t,"utf-8");return Wn.test(e)}catch(t){return console.error("Read error:",t),!1}}const Vn=(t,e)=>{const n=new Set;return t.some(t=>!!n.has(t[e])||(n.add(t[e]),!1))};function qn(t){return t.replace(/"<start>([\s\S]*?)<\/end>"/g,"$1")}const Qn=t=>t.replace(/\[([^\]]+)\]/g,":$1").replace(".tsx","");const Yn={"/home":"/","/root":"/"},Xn=(t,e)=>{const n=t.split("/"),r=n[n.length-1];return r.endsWith(e)?r.slice(0,-e.length):r},Zn=t=>{const e=Yn[t];if(e)return e;return"/notfound"===t.toLowerCase()||"/404"===t?"/*":t},zn=t=>{if(t.endsWith(".config.ts")){return"index"===Xn(t,".config.ts")?t.replace("index.config.ts","index.ts"):t.slice(0,-10)+".tsx"}return t.replace("index.config.ts","index.ts")},Jn=t=>{if(t.endsWith(".config.ts")){const e=Xn(t,".config.ts"),n=(t=>{const e=t.split("/");return e.pop(),e.join("/")})(t).replace("/src/pages","");return"index"===e?n||"/":n?`${n}/${e}`:`/${e}`}return t.replace("/src/pages","").replace("/index.config.ts","")||"/"},tr=async(t,e)=>{const n=[];for(const[r,s]of((t,e)=>Object.keys(t).map(t=>{const n=(r=t).endsWith(".tsx")?r.slice(0,-4)+".config.ts":r.replace("index.ts","index.config.ts");var r;return[n,e[n]||{}]}))(t,e)){const e=zn(r);if(!t[e])continue;const i=s?.path||Jn(r)||"/",o=Qn(i),a=Zn(o);n.push({...s,path:a,type:s?.type,isRoot:"/root"===o,element:t[e]})}return n},er=t=>{if(t.index)return t;if("wrap"!==t.type){const{path:e,children:n,...r}=t;if(Object.keys(r).length>0){return{path:e,children:[{path:"",index:!0,...r},...(n||[]).map(er)]}}}return t.children?{...t,children:t.children.map(er)}:t},nr=t=>{const e=(t=>{const e=new Map,n=[],r=new Map,s=t=>{let e=r.get(t);return void 0===e&&(e="/"===t?[]:t.split("/").filter(Boolean),r.set(t,e)),e},i=t.slice().sort((t,e)=>t.path.length-e.path.length);for(const t of i){const r=t.path,i=s(r),o={...t,children:[]};if(e.set(r,o),i.length<=1){n.push(o);continue}const a="/"+i.slice(0,-1).join("/"),u=e.get(a);u?(o.path=i[i.length-1],u.children.push(o)):n.push(o)}return n})(t);return(t=>t.map(er))(e)},rr=t=>{const{isRoot:e,type:n,children:r,...s}=t;return r?.length?{...s,children:r.map(rr)}:s},sr=t=>{const{children:e}=t;if(!e?.length){const{children:e,...n}=t;return n}const n=e.map(sr);if("wrap"===t.type)return{...t,children:n};const{path:r,element:s,type:i,children:o,...a}=t;return s?{path:r,children:[{index:!0,element:s,...a},...n]}:{path:r,...a,children:n}},ir=t=>rr(sr(t)),or=t=>nr(t).map(ir),ar=t=>{if(t.some(t=>t.isRoot))return(t=>{let e,n,r;const s=[];for(const i of t)if(i.isRoot){if(e)throw new Error("There cannot be multiple root routes in a route");e=i}else"/"===i.path?n=i:"/*"===i.path?r=i:s.push(i);if(Vn(s,"path"))throw new Error("There cannot be duplicate paths in a route");const i=[n&&{...n,index:!0},...or(s)].filter(t=>Boolean(t)),o=[];return e&&o.push(rr({...e,children:i})),r&&o.push(rr(r)),o})(t);if(Vn(t,"path"))throw new Error("There cannot be duplicate paths in a route");return or(t)},ur=(t,e)=>({import:`import ${t} from './${e}'`,component:`<start><${t} /></end>`,lazy:`const ${t} = lazy(() => import('${e}'))`,lazyComponent:`<start><Suspense><${t} /></Suspense></end>`}),cr=(t,e,n,r)=>{let s=t;for(const[t,n]of e){const e=ur(n.componentName,n.path);s=s.replace(t,r?e.lazyComponent:e.component)}for(const[t,e]of n)s=s.replace(t,e);return function(t){let e=t;for(;;){const t=qn(e);if(t===e)break;e=t}return e}(s)};const lr=/[/\\]/,pr=/[^a-zA-Z0-9]/g,fr=/^(\d)/,hr="index.tsx",dr=t=>t?t.charAt(0).toUpperCase()+t.slice(1).toLowerCase():"";function _r(t){const e=a.extname(t),n=a.basename(t,e),r=a.dirname(t).split(lr).filter(Boolean);"index"!==n&&"Index"!==n&&r.push(n);return r.map(t=>{const e=(t=>t.replace(pr,"_").replace(fr,"_$1"))(t);return e.split("_").map(dr).join("")}).join("")||"Component"}const gr=(t,e,n,r,s,i)=>{const o=(t=>t.includes(hr)?t.replace(hr,"index.ts"):t)(Un(t,e)),u=Gn(function(t,e){let n=a.resolve(t);if(n.endsWith(".js")||n.endsWith(".jsx")||n.endsWith(".ts")||n.endsWith(".tsx")){const t=n.split("\\");n=t.slice(0,-1).join("\\")}const r=a.resolve(e);return a.relative(n,r)}(n,t)),c=((t,e)=>{if(!e.has(t))return e.add(t),t;let n=1;for(;e.has(`${t}_${n}`);)n++;return`${t}_${n}`})(_r(u),i),l=`element(${u})`;r[`/${o}`]=l,s.set(l,{path:u,componentName:c})},yr=(t,e,n,r)=>{const s=Un(t,e);n[`/${s}`]=((t,e,n)=>{const r={};for(const[s,i]of Object.entries(e))if("function"==typeof i){const e=`${t}-${s}`;r[s]=e,n.set(e,`<start>${jn(i.toString())}</end>`)}else r[s]=i;return r})(s,function(t){try{const e=o.readFileSync(t,"utf-8").match(/export\s+default\s+([\s\S]*?)(?=\n\w|$)/);if(!e)return console.warn("No export default found in:",t),null;const n=e[1].trim();try{if(n.startsWith("{"))return new Function(`return ${n}`)();if(n.includes("defineConfig(")){const t=n.match(/defineConfig([\s\S]*)$/);if(t)return new Function(`return ${t[1]}`)()}return null}catch(t){return console.error("Error parsing export default content:",t),null}}catch(t){return console.error("Error reading file:",t),null}}(t),r)};function mr(t,e,n,r,s,i,o,a){const u={},c=t.replace(/^\/+/,""),l=In.sync(c,{cwd:e,absolute:!0,onlyFiles:!0}).filter(Kn);for(const t of l)if("module"===s){if(t.includes(".config."))continue;gr(t,n,r,u,i,o)}else yr(t,n,u,a);return u}exports.generateComponentName=_r,exports.generateReactRoutes=async(t,e,n,r,s)=>{const i=a.resolve(e,t);if(!o.existsSync(i))throw new Error(`[ono-auto-router] Pages directory does not exist: ${i}`);const u=new Map,c=new Set,l=new Map,p=mr("/**/*.{jsx,tsx}",i,e,n,"module",u,c,l),f=mr("/**/*.config.{js,ts,jsx,tsx}",i,e,n,"config",u,c,l),h=await tr(p,f),d=ar(h),_=cr(function(t,e,n,r){const s=n.length>0?`\n${n.join("\n")}\n`:"";return`// Auto-generated by ono-auto-router\n${r?"import type { RouteObject } from 'react-router-dom'":""}\n${e.join("\n")}\n${r?"\ntype PageConfig = Partial<\n Omit<RouteObject, 'path' | 'Component' | 'element' | 'children'> & {\n path: string\n type?: 'single' | 'wrap'\n }\n>\n":""}${r?"\nexport const defineConfig = (config: PageConfig) => config":""}\n${s}\nexport const routes${r?": RouteObject[]":""} = ${JSON.stringify(t,null,2)}\n`}(d,((t,e)=>{if(t)return["import { lazy, Suspense } from 'react'"];const n=[];for(const t of e.values())n.push(ur(t.componentName,t.path).import);return n})(r,u),((t,e)=>{if(!t)return[];const n=[];for(const t of e.values())n.push(ur(t.componentName,t.path).lazy);return n})(r,u),s),u,l,r);!async function(t,e){const n=a.dirname(t);await o.promises.mkdir(n,{recursive:!0}),await o.promises.writeFile(t,e,"utf-8")}(n,_)};
1
+ "use strict";var t=require("os"),e=require("path"),n=require("util"),r=require("stream"),s=require("events"),i=require("fs"),o=require("node:fs"),a=require("node:path"),u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function c(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var l,p={},f={},h={};function d(){if(l)return h;return l=1,Object.defineProperty(h,"__esModule",{value:!0}),h.splitWhen=h.flatten=void 0,h.flatten=function(t){return t.reduce((t,e)=>[].concat(t,e),[])},h.splitWhen=function(t,e){const n=[[]];let r=0;for(const s of t)e(s)?(r++,n[r]=[]):n[r].push(s);return n},h}var _,g={};function y(){if(_)return g;return _=1,Object.defineProperty(g,"__esModule",{value:!0}),g.isEnoentCodeError=void 0,g.isEnoentCodeError=function(t){return"ENOENT"===t.code},g}var m,S={};var v,b={};function E(){if(v)return b;v=1,Object.defineProperty(b,"__esModule",{value:!0}),b.convertPosixPathToPattern=b.convertWindowsPathToPattern=b.convertPathToPattern=b.escapePosixPath=b.escapeWindowsPath=b.escape=b.removeLeadingDotSegment=b.makeAbsolute=b.unixify=void 0;const n=e,r="win32"===t.platform(),s=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,i=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,o=/^\\\\([.?])/,a=/\\(?![!()+@[\]{}])/g;function u(t){return t.replace(i,"\\$2")}function c(t){return t.replace(s,"\\$2")}function l(t){return u(t).replace(o,"//$1").replace(a,"/")}function p(t){return c(t)}return b.unixify=function(t){return t.replace(/\\/g,"/")},b.makeAbsolute=function(t,e){return n.resolve(t,e)},b.removeLeadingDotSegment=function(t){if("."===t.charAt(0)){const e=t.charAt(1);if("/"===e||"\\"===e)return t.slice(2)}return t},b.escape=r?u:c,b.escapeWindowsPath=u,b.escapePosixPath=c,b.convertPathToPattern=r?l:p,b.convertWindowsPathToPattern=l,b.convertPosixPathToPattern=p,b}var A,R,x,P,C,w,T={};function O(){return R?A:(R=1,A=function(t){if("string"!=typeof t||""===t)return!1;for(var e;e=/(\\).|([@?!+*]\(.*\))/g.exec(t);){if(e[2])return!0;t=t.slice(e.index+e[0].length)}return!1})}function k(){if(P)return x;P=1;var t=O(),e={"{":"}","(":")","[":"]"},n=function(t){if("!"===t[0])return!0;for(var n=0,r=-2,s=-2,i=-2,o=-2,a=-2;n<t.length;){if("*"===t[n])return!0;if("?"===t[n+1]&&/[\].+)]/.test(t[n]))return!0;if(-1!==s&&"["===t[n]&&"]"!==t[n+1]&&(s<n&&(s=t.indexOf("]",n)),s>n)){if(-1===a||a>s)return!0;if(-1===(a=t.indexOf("\\",n))||a>s)return!0}if(-1!==i&&"{"===t[n]&&"}"!==t[n+1]&&(i=t.indexOf("}",n))>n&&(-1===(a=t.indexOf("\\",n))||a>i))return!0;if(-1!==o&&"("===t[n]&&"?"===t[n+1]&&/[:!=]/.test(t[n+2])&&")"!==t[n+3]&&(o=t.indexOf(")",n))>n&&(-1===(a=t.indexOf("\\",n))||a>o))return!0;if(-1!==r&&"("===t[n]&&"|"!==t[n+1]&&(r<n&&(r=t.indexOf("|",n)),-1!==r&&")"!==t[r+1]&&(o=t.indexOf(")",r))>r&&(-1===(a=t.indexOf("\\",r))||a>o)))return!0;if("\\"===t[n]){var u=t[n+1];n+=2;var c=e[u];if(c){var l=t.indexOf(c,n);-1!==l&&(n=l+1)}if("!"===t[n])return!0}else n++}return!1},r=function(t){if("!"===t[0])return!0;for(var n=0;n<t.length;){if(/[*?{}()[\]]/.test(t[n]))return!0;if("\\"===t[n]){var r=t[n+1];n+=2;var s=e[r];if(s){var i=t.indexOf(s,n);-1!==i&&(n=i+1)}if("!"===t[n])return!0}else n++}return!1};return x=function(e,s){if("string"!=typeof e||""===e)return!1;if(t(e))return!0;var i=n;return s&&!1===s.strict&&(i=r),i(e)}}function L(){if(w)return C;w=1;var n=k(),r=e.posix.dirname,s="win32"===t.platform(),i=/\\/g,o=/[\{\[].*[\}\]]$/,a=/(^|[^\\])([\{\[]|\([^\)]+$)/,u=/\\([\!\*\?\|\[\]\(\)\{\}])/g;return C=function(t,e){Object.assign({flipBackslashes:!0},e).flipBackslashes&&s&&t.indexOf("/")<0&&(t=t.replace(i,"/")),o.test(t)&&(t+="/"),t+="a";do{t=r(t)}while(n(t)||a.test(t));return t.replace(u,"$1")}}var $,H,M,D,F,N,I,j,B,G,U,W,K,V,q,Q,Y,X,Z,z={};function J(){return $||($=1,(t=z).isInteger=t=>"number"==typeof t?Number.isInteger(t):"string"==typeof t&&""!==t.trim()&&Number.isInteger(Number(t)),t.find=(t,e)=>t.nodes.find(t=>t.type===e),t.exceedsLimit=(e,n,r=1,s)=>!1!==s&&!(!t.isInteger(e)||!t.isInteger(n))&&(Number(n)-Number(e))/Number(r)>=s,t.escapeNode=(t,e=0,n)=>{const r=t.nodes[e];r&&(n&&r.type===n||"open"===r.type||"close"===r.type)&&!0!==r.escaped&&(r.value="\\"+r.value,r.escaped=!0)},t.encloseBrace=t=>!("brace"!==t.type||t.commas>>0+t.ranges|0||(t.invalid=!0,0)),t.isInvalidBrace=t=>!("brace"!==t.type||!0!==t.invalid&&!t.dollar&&(t.commas>>0+t.ranges|0&&!0===t.open&&!0===t.close||(t.invalid=!0,0))),t.isOpenOrClose=t=>"open"===t.type||"close"===t.type||!0===t.open||!0===t.close,t.reduce=t=>t.reduce((t,e)=>("text"===e.type&&t.push(e.value),"range"===e.type&&(e.type="text"),t),[]),t.flatten=(...t)=>{const e=[],n=t=>{for(let r=0;r<t.length;r++){const s=t[r];Array.isArray(s)?n(s):void 0!==s&&e.push(s)}return e};return n(t),e}),z;var t}function tt(){if(M)return H;M=1;const t=J();return H=(e,n={})=>{const r=(e,s={})=>{const i=n.escapeInvalid&&t.isInvalidBrace(s),o=!0===e.invalid&&!0===n.escapeInvalid;let a="";if(e.value)return(i||o)&&t.isOpenOrClose(e)?"\\"+e.value:e.value;if(e.value)return e.value;if(e.nodes)for(const t of e.nodes)a+=r(t);return a};return r(e)}}function et(){return F?D:(F=1,D=function(t){return"number"==typeof t?t-t===0:"string"==typeof t&&""!==t.trim()&&(Number.isFinite?Number.isFinite(+t):isFinite(+t))})}function nt(){if(I)return N;I=1;const t=et(),e=(n,i,o)=>{if(!1===t(n))throw new TypeError("toRegexRange: expected the first argument to be a number");if(void 0===i||n===i)return String(n);if(!1===t(i))throw new TypeError("toRegexRange: expected the second argument to be a number.");let a={relaxZeros:!0,...o};"boolean"==typeof a.strictZeros&&(a.relaxZeros=!1===a.strictZeros);let u=n+":"+i+"="+String(a.relaxZeros)+String(a.shorthand)+String(a.capture)+String(a.wrap);if(e.cache.hasOwnProperty(u))return e.cache[u].result;let c=Math.min(n,i),l=Math.max(n,i);if(1===Math.abs(c-l)){let t=n+"|"+i;return a.capture?`(${t})`:!1===a.wrap?t:`(?:${t})`}let f=p(n)||p(i),h={min:n,max:i,a:c,b:l},d=[],_=[];if(f&&(h.isPadded=f,h.maxLen=String(h.max).length),c<0){_=r(l<0?Math.abs(l):1,Math.abs(c),h,a),c=h.a=0}return l>=0&&(d=r(c,l,h,a)),h.negatives=_,h.positives=d,h.result=function(t,e){let n=s(t,e,"-",!1)||[],r=s(e,t,"",!1)||[],i=s(t,e,"-?",!0)||[];return n.concat(i).concat(r).join("|")}(_,d),!0===a.capture?h.result=`(${h.result})`:!1!==a.wrap&&d.length+_.length>1&&(h.result=`(?:${h.result})`),e.cache[u]=h,h.result};function n(t,e,n){if(t===e)return{pattern:t,count:[],digits:0};let r=function(t,e){let n=[];for(let r=0;r<t.length;r++)n.push([t[r],e[r]]);return n}(t,e),s=r.length,i="",o=0;for(let t=0;t<s;t++){let[e,n]=r[t];e===n?i+=e:"0"!==e||"9"!==n?i+=l(e,n):o++}return o&&(i+=!0===n.shorthand?"\\d":"[0-9]"),{pattern:i,count:[o],digits:s}}function r(t,e,r,s){let o,l=function(t,e){let n=1,r=1,s=a(t,n),o=new Set([e]);for(;t<=s&&s<=e;)o.add(s),n+=1,s=a(t,n);for(s=u(e+1,r)-1;t<s&&s<=e;)o.add(s),r+=1,s=u(e+1,r)-1;return o=[...o],o.sort(i),o}(t,e),p=[],h=t;for(let t=0;t<l.length;t++){let e=l[t],i=n(String(h),String(e),s),a="";r.isPadded||!o||o.pattern!==i.pattern?(r.isPadded&&(a=f(e,r,s)),i.string=a+i.pattern+c(i.count),p.push(i),h=e+1,o=i):(o.count.length>1&&o.count.pop(),o.count.push(i.count[0]),o.string=o.pattern+c(o.count),h=e+1)}return p}function s(t,e,n,r,s){let i=[];for(let s of t){let{string:t}=s;r||o(e,"string",t)||i.push(n+t),r&&o(e,"string",t)&&i.push(n+t)}return i}function i(t,e){return t>e?1:e>t?-1:0}function o(t,e,n){return t.some(t=>t[e]===n)}function a(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function u(t,e){return t-t%Math.pow(10,e)}function c(t){let[e=0,n=""]=t;return n||e>1?`{${e+(n?","+n:"")}}`:""}function l(t,e,n){return`[${t}${e-t===1?"":"-"}${e}]`}function p(t){return/^-?(0+)\d/.test(t)}function f(t,e,n){if(!e.isPadded)return t;let r=Math.abs(e.maxLen-String(t).length),s=!1!==n.relaxZeros;switch(r){case 0:return"";case 1:return s?"0?":"0";case 2:return s?"0{0,2}":"00";default:return s?`0{0,${r}}`:`0{${r}}`}}return e.cache={},e.clearCache=()=>e.cache={},N=e}function rt(){if(B)return j;B=1;const t=n,e=nt(),r=t=>null!==t&&"object"==typeof t&&!Array.isArray(t),s=t=>"number"==typeof t||"string"==typeof t&&""!==t,i=t=>Number.isInteger(+t),o=t=>{let e=`${t}`,n=-1;if("-"===e[0]&&(e=e.slice(1)),"0"===e)return!1;for(;"0"===e[++n];);return n>0},a=(t,e,n)=>{if(e>0){let n="-"===t[0]?"-":"";n&&(t=t.slice(1)),t=n+t.padStart(n?e-1:e,"0")}return!1===n?String(t):t},u=(t,e)=>{let n="-"===t[0]?"-":"";for(n&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return n?"-"+t:t},c=(t,n,r,s)=>{if(r)return e(t,n,{wrap:!1,...s});let i=String.fromCharCode(t);return t===n?i:`[${i}-${String.fromCharCode(n)}]`},l=(t,n,r)=>{if(Array.isArray(t)){let e=!0===r.wrap,n=r.capture?"":"?:";return e?`(${n}${t.join("|")})`:t.join("|")}return e(t,n,r)},p=(...e)=>new RangeError("Invalid range arguments: "+t.inspect(...e)),f=(t,e,n)=>{if(!0===n.strictRanges)throw p([t,e]);return[]},h=(t,e,n=1,r={})=>{let s=Number(t),i=Number(e);if(!Number.isInteger(s)||!Number.isInteger(i)){if(!0===r.strictRanges)throw p([t,e]);return[]}0===s&&(s=0),0===i&&(i=0);let f=s>i,h=String(t),d=String(e),_=String(n);n=Math.max(Math.abs(n),1);let g=o(h)||o(d)||o(_),y=g?Math.max(h.length,d.length,_.length):0,m=!1===g&&!1===((t,e,n)=>"string"==typeof t||"string"==typeof e||!0===n.stringify)(t,e,r),S=r.transform||(t=>e=>!0===t?Number(e):String(e))(m);if(r.toRegex&&1===n)return c(u(t,y),u(e,y),!0,r);let v={negatives:[],positives:[]},b=t=>v[t<0?"negatives":"positives"].push(Math.abs(t)),E=[],A=0;for(;f?s>=i:s<=i;)!0===r.toRegex&&n>1?b(s):E.push(a(S(s,A),y,m)),s=f?s-n:s+n,A++;return!0===r.toRegex?n>1?((t,e,n)=>{t.negatives.sort((t,e)=>t<e?-1:t>e?1:0),t.positives.sort((t,e)=>t<e?-1:t>e?1:0);let r,s=e.capture?"":"?:",i="",o="";return t.positives.length&&(i=t.positives.map(t=>u(String(t),n)).join("|")),t.negatives.length&&(o=`-(${s}${t.negatives.map(t=>u(String(t),n)).join("|")})`),r=i&&o?`${i}|${o}`:i||o,e.wrap?`(${s}${r})`:r})(v,r,y):l(E,null,{wrap:!1,...r}):E},d=(t,e,n,o={})=>{if(null==e&&s(t))return[t];if(!s(t)||!s(e))return f(t,e,o);if("function"==typeof n)return d(t,e,1,{transform:n});if(r(n))return d(t,e,0,n);let a={...o};return!0===a.capture&&(a.wrap=!0),n=n||a.step||1,i(n)?i(t)&&i(e)?h(t,e,n,a):((t,e,n=1,r={})=>{if(!i(t)&&t.length>1||!i(e)&&e.length>1)return f(t,e,r);let s=r.transform||(t=>String.fromCharCode(t)),o=`${t}`.charCodeAt(0),a=`${e}`.charCodeAt(0),u=o>a,p=Math.min(o,a),h=Math.max(o,a);if(r.toRegex&&1===n)return c(p,h,!1,r);let d=[],_=0;for(;u?o>=a:o<=a;)d.push(s(o,_)),o=u?o-n:o+n,_++;return!0===r.toRegex?l(d,null,{wrap:!1,options:r}):d})(t,e,Math.max(Math.abs(n),1),a):null==n||r(n)?d(t,e,1,n):((t,e)=>{if(!0===e.strictRanges)throw new TypeError(`Expected step "${t}" to be a number`);return[]})(n,a)};return j=d}function st(){if(Y)return Q;Y=1;const t=tt(),{MAX_LENGTH:e,CHAR_BACKSLASH:n,CHAR_BACKTICK:r,CHAR_COMMA:s,CHAR_DOT:i,CHAR_LEFT_PARENTHESES:o,CHAR_RIGHT_PARENTHESES:a,CHAR_LEFT_CURLY_BRACE:u,CHAR_RIGHT_CURLY_BRACE:c,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_RIGHT_SQUARE_BRACKET:p,CHAR_DOUBLE_QUOTE:f,CHAR_SINGLE_QUOTE:h,CHAR_NO_BREAK_SPACE:d,CHAR_ZERO_WIDTH_NOBREAK_SPACE:_}=q?V:(q=1,V={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"});return Q=(g,y={})=>{if("string"!=typeof g)throw new TypeError("Expected a string");const m=y||{},S="number"==typeof m.maxLength?Math.min(e,m.maxLength):e;if(g.length>S)throw new SyntaxError(`Input length (${g.length}), exceeds max characters (${S})`);const v={type:"root",input:g,nodes:[]},b=[v];let E=v,A=v,R=0;const x=g.length;let P,C=0,w=0;const T=()=>g[C++],O=t=>{if("text"===t.type&&"dot"===A.type&&(A.type="text"),!A||"text"!==A.type||"text"!==t.type)return E.nodes.push(t),t.parent=E,t.prev=A,A=t,t;A.value+=t.value};for(O({type:"bos"});C<x;)if(E=b[b.length-1],P=T(),P!==_&&P!==d)if(P!==n)if(P!==p){if(P===l){let t;for(R++;C<x&&(t=T());)if(P+=t,t!==l)if(t!==n){if(t===p&&(R--,0===R))break}else P+=T();else R++;O({type:"text",value:P});continue}if(P!==o)if(P!==a){if(P===f||P===h||P===r){const t=P;let e;for(!0!==y.keepQuotes&&(P="");C<x&&(e=T());)if(e!==n){if(e===t){!0===y.keepQuotes&&(P+=e);break}P+=e}else P+=e+T();O({type:"text",value:P});continue}if(P===u){w++;const t=A.value&&"$"===A.value.slice(-1)||!0===E.dollar;E=O({type:"brace",open:!0,close:!1,dollar:t,depth:w,commas:0,ranges:0,nodes:[]}),b.push(E),O({type:"open",value:P});continue}if(P===c){if("brace"!==E.type){O({type:"text",value:P});continue}const t="close";E=b.pop(),E.close=!0,O({type:t,value:P}),w--,E=b[b.length-1];continue}if(P===s&&w>0){if(E.ranges>0){E.ranges=0;const e=E.nodes.shift();E.nodes=[e,{type:"text",value:t(E)}]}O({type:"comma",value:P}),E.commas++}else{if(P===i&&w>0&&0===E.commas){const t=E.nodes;if(0===w||0===t.length){O({type:"text",value:P});continue}if("dot"===A.type){if(E.range=[],A.value+=P,A.type="range",3!==E.nodes.length&&5!==E.nodes.length){E.invalid=!0,E.ranges=0,A.type="text";continue}E.ranges++,E.args=[];continue}if("range"===A.type){t.pop();const e=t[t.length-1];e.value+=A.value+P,A=e,E.ranges--;continue}O({type:"dot",value:P});continue}O({type:"text",value:P})}}else{if("paren"!==E.type){O({type:"text",value:P});continue}E=b.pop(),O({type:"text",value:P}),E=b[b.length-1]}else E=O({type:"paren",nodes:[]}),b.push(E),O({type:"text",value:P})}else O({type:"text",value:"\\"+P});else O({type:"text",value:(y.keepEscaping?P:"")+T()});do{if(E=b.pop(),"root"!==E.type){E.nodes.forEach(t=>{t.nodes||("open"===t.type&&(t.isOpen=!0),"close"===t.type&&(t.isClose=!0),t.nodes||(t.type="text"),t.invalid=!0)});const t=b[b.length-1],e=t.nodes.indexOf(E);t.nodes.splice(e,1,...E.nodes)}}while(b.length>0);return O({type:"eos"}),v}}function it(){if(Z)return X;Z=1;const t=tt(),e=function(){if(U)return G;U=1;const t=rt(),e=J();return G=(n,r={})=>{const s=(n,i={})=>{const o=e.isInvalidBrace(i),a=!0===n.invalid&&!0===r.escapeInvalid,u=!0===o||!0===a,c=!0===r.escapeInvalid?"\\":"";let l="";if(!0===n.isOpen)return c+n.value;if(!0===n.isClose)return console.log("node.isClose",c,n.value),c+n.value;if("open"===n.type)return u?c+n.value:"(";if("close"===n.type)return u?c+n.value:")";if("comma"===n.type)return"comma"===n.prev.type?"":u?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){const s=e.reduce(n.nodes),i=t(...s,{...r,wrap:!1,toRegex:!0,strictZeros:!0});if(0!==i.length)return s.length>1&&i.length>1?`(${i})`:i}if(n.nodes)for(const t of n.nodes)l+=s(t,n);return l};return s(n)}}(),n=function(){if(K)return W;K=1;const t=rt(),e=tt(),n=J(),r=(t="",e="",s=!1)=>{const i=[];if(t=[].concat(t),!(e=[].concat(e)).length)return t;if(!t.length)return s?n.flatten(e).map(t=>`{${t}}`):e;for(const n of t)if(Array.isArray(n))for(const t of n)i.push(r(t,e,s));else for(let t of e)!0===s&&"string"==typeof t&&(t=`{${t}}`),i.push(Array.isArray(t)?r(n,t,s):n+t);return n.flatten(i)};return W=(s,i={})=>{const o=void 0===i.rangeLimit?1e3:i.rangeLimit,a=(s,u={})=>{s.queue=[];let c=u,l=u.queue;for(;"brace"!==c.type&&"root"!==c.type&&c.parent;)c=c.parent,l=c.queue;if(s.invalid||s.dollar)return void l.push(r(l.pop(),e(s,i)));if("brace"===s.type&&!0!==s.invalid&&2===s.nodes.length)return void l.push(r(l.pop(),["{}"]));if(s.nodes&&s.ranges>0){const a=n.reduce(s.nodes);if(n.exceedsLimit(...a,i.step,o))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let u=t(...a,i);return 0===u.length&&(u=e(s,i)),l.push(r(l.pop(),u)),void(s.nodes=[])}const p=n.encloseBrace(s);let f=s.queue,h=s;for(;"brace"!==h.type&&"root"!==h.type&&h.parent;)h=h.parent,f=h.queue;for(let t=0;t<s.nodes.length;t++){const e=s.nodes[t];"comma"!==e.type||"brace"!==s.type?"close"!==e.type?e.value&&"open"!==e.type?f.push(r(f.pop(),e.value)):e.nodes&&a(e,s):l.push(r(l.pop(),f,p)):(1===t&&f.push(""),f.push(""))}return f};return n.flatten(a(s))},W}(),r=st(),s=(t,e={})=>{let n=[];if(Array.isArray(t))for(const r of t){const t=s.create(r,e);Array.isArray(t)?n.push(...t):n.push(t)}else n=[].concat(s.create(t,e));return e&&!0===e.expand&&!0===e.nodupes&&(n=[...new Set(n)]),n};return s.parse=(t,e={})=>r(t,e),s.stringify=(e,n={})=>t("string"==typeof e?s.parse(e,n):e,n),s.compile=(t,n={})=>("string"==typeof t&&(t=s.parse(t,n)),e(t,n)),s.expand=(t,e={})=>{"string"==typeof t&&(t=s.parse(t,e));let r=n(t,e);return!0===e.noempty&&(r=r.filter(Boolean)),!0===e.nodupes&&(r=[...new Set(r)]),r},s.create=(t,e={})=>""===t||t.length<3?[t]:!0!==e.expand?s.compile(t,e):s.expand(t,e),X=s}var ot,at,ut,ct,lt,pt,ft,ht,dt,_t,gt,yt,mt,St,vt={};function bt(){if(at)return ot;at=1;const t=e,n="\\\\/",r=`[^${n}]`,s="\\.",i="\\/",o="[^/]",a=`(?:${i}|$)`,u=`(?:^|${i})`,c=`${s}{1,2}${a}`,l={DOT_LITERAL:s,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:i,ONE_CHAR:"(?=.)",QMARK:o,END_ANCHOR:a,DOTS_SLASH:c,NO_DOT:`(?!${s})`,NO_DOTS:`(?!${u}${c})`,NO_DOT_SLASH:`(?!${s}{0,1}${a})`,NO_DOTS_SLASH:`(?!${c})`,QMARK_NO_DOT:`[^.${i}]`,STAR:`${o}*?`,START_ANCHOR:u},p={...l,SLASH_LITERAL:`[${n}]`,QMARK:r,STAR:`${r}*?`,DOTS_SLASH:`${s}{1,2}(?:[${n}]|$)`,NO_DOT:`(?!${s})`,NO_DOTS:`(?!(?:^|[${n}])${s}{1,2}(?:[${n}]|$))`,NO_DOT_SLASH:`(?!${s}{0,1}(?:[${n}]|$))`,NO_DOTS_SLASH:`(?!${s}{1,2}(?:[${n}]|$))`,QMARK_NO_DOT:`[^.${n}]`,START_ANCHOR:`(?:^|[${n}])`,END_ANCHOR:`(?:[${n}]|$)`};return ot={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:t.sep,extglobChars:t=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:t=>!0===t?p:l}}function Et(){return ut||(ut=1,function(t){const n=e,r="win32"===process.platform,{REGEX_BACKSLASH:s,REGEX_REMOVE_BACKSLASH:i,REGEX_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_GLOBAL:a}=bt();t.isObject=t=>null!==t&&"object"==typeof t&&!Array.isArray(t),t.hasRegexChars=t=>o.test(t),t.isRegexChar=e=>1===e.length&&t.hasRegexChars(e),t.escapeRegex=t=>t.replace(a,"\\$1"),t.toPosixSlashes=t=>t.replace(s,"/"),t.removeBackslashes=t=>t.replace(i,t=>"\\"===t?"":t),t.supportsLookbehinds=()=>{const t=process.version.slice(1).split(".").map(Number);return 3===t.length&&t[0]>=9||8===t[0]&&t[1]>=10},t.isWindows=t=>t&&"boolean"==typeof t.windows?t.windows:!0===r||"\\"===n.sep,t.escapeLast=(e,n,r)=>{const s=e.lastIndexOf(n,r);return-1===s?e:"\\"===e[s-1]?t.escapeLast(e,n,s-1):`${e.slice(0,s)}\\${e.slice(s)}`},t.removePrefix=(t,e={})=>{let n=t;return n.startsWith("./")&&(n=n.slice(2),e.prefix="./"),n},t.wrapOutput=(t,e={},n={})=>{let r=`${n.contains?"":"^"}(?:${t})${n.contains?"":"$"}`;return!0===e.negated&&(r=`(?:^(?!${r}).*$)`),r}}(vt)),vt}function At(){if(dt)return ht;dt=1;const t=e,n=function(){if(lt)return ct;lt=1;const t=Et(),{CHAR_ASTERISK:e,CHAR_AT:n,CHAR_BACKWARD_SLASH:r,CHAR_COMMA:s,CHAR_DOT:i,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:u,CHAR_LEFT_PARENTHESES:c,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_PLUS:p,CHAR_QUESTION_MARK:f,CHAR_RIGHT_CURLY_BRACE:h,CHAR_RIGHT_PARENTHESES:d,CHAR_RIGHT_SQUARE_BRACKET:_}=bt(),g=t=>t===a||t===r,y=t=>{!0!==t.isPrefix&&(t.depth=t.isGlobstar?1/0:1)};return ct=(m,S)=>{const v=S||{},b=m.length-1,E=!0===v.parts||!0===v.scanToEnd,A=[],R=[],x=[];let P,C,w=m,T=-1,O=0,k=0,L=!1,$=!1,H=!1,M=!1,D=!1,F=!1,N=!1,I=!1,j=!1,B=!1,G=0,U={value:"",depth:0,isGlob:!1};const W=()=>T>=b,K=()=>w.charCodeAt(T+1),V=()=>(P=C,w.charCodeAt(++T));for(;T<b;){let t;if(C=V(),C!==r){if(!0===F||C===u){for(G++;!0!==W()&&(C=V());)if(C!==r)if(C!==u){if(!0!==F&&C===i&&(C=V())===i){if(L=U.isBrace=!0,H=U.isGlob=!0,B=!0,!0===E)continue;break}if(!0!==F&&C===s){if(L=U.isBrace=!0,H=U.isGlob=!0,B=!0,!0===E)continue;break}if(C===h&&(G--,0===G)){F=!1,L=U.isBrace=!0,B=!0;break}}else G++;else N=U.backslashes=!0,V();if(!0===E)continue;break}if(C!==a){if(!0!==v.noext&&!0==(C===p||C===n||C===e||C===f||C===o)&&K()===c){if(H=U.isGlob=!0,M=U.isExtglob=!0,B=!0,C===o&&T===O&&(j=!0),!0===E){for(;!0!==W()&&(C=V());)if(C!==r){if(C===d){H=U.isGlob=!0,B=!0;break}}else N=U.backslashes=!0,C=V();continue}break}if(C===e){if(P===e&&(D=U.isGlobstar=!0),H=U.isGlob=!0,B=!0,!0===E)continue;break}if(C===f){if(H=U.isGlob=!0,B=!0,!0===E)continue;break}if(C===l){for(;!0!==W()&&(t=V());)if(t!==r){if(t===_){$=U.isBracket=!0,H=U.isGlob=!0,B=!0;break}}else N=U.backslashes=!0,V();if(!0===E)continue;break}if(!0===v.nonegate||C!==o||T!==O){if(!0!==v.noparen&&C===c){if(H=U.isGlob=!0,!0===E){for(;!0!==W()&&(C=V());)if(C!==c){if(C===d){B=!0;break}}else N=U.backslashes=!0,C=V();continue}break}if(!0===H){if(B=!0,!0===E)continue;break}}else I=U.negated=!0,O++}else{if(A.push(T),R.push(U),U={value:"",depth:0,isGlob:!1},!0===B)continue;if(P===i&&T===O+1){O+=2;continue}k=T+1}}else N=U.backslashes=!0,C=V(),C===u&&(F=!0)}!0===v.noext&&(M=!1,H=!1);let q=w,Q="",Y="";O>0&&(Q=w.slice(0,O),w=w.slice(O),k-=O),q&&!0===H&&k>0?(q=w.slice(0,k),Y=w.slice(k)):!0===H?(q="",Y=w):q=w,q&&""!==q&&"/"!==q&&q!==w&&g(q.charCodeAt(q.length-1))&&(q=q.slice(0,-1)),!0===v.unescape&&(Y&&(Y=t.removeBackslashes(Y)),q&&!0===N&&(q=t.removeBackslashes(q)));const X={prefix:Q,input:m,start:O,base:q,glob:Y,isBrace:L,isBracket:$,isGlob:H,isExtglob:M,isGlobstar:D,negated:I,negatedExtglob:j};if(!0===v.tokens&&(X.maxDepth=0,g(C)||R.push(U),X.tokens=R),!0===v.parts||!0===v.tokens){let t;for(let e=0;e<A.length;e++){const n=t?t+1:O,r=A[e],s=m.slice(n,r);v.tokens&&(0===e&&0!==O?(R[e].isPrefix=!0,R[e].value=Q):R[e].value=s,y(R[e]),X.maxDepth+=R[e].depth),0===e&&""===s||x.push(s),t=r}if(t&&t+1<m.length){const e=m.slice(t+1);x.push(e),v.tokens&&(R[R.length-1].value=e,y(R[R.length-1]),X.maxDepth+=R[R.length-1].depth)}X.slashes=A,X.parts=x}return X},ct}(),r=function(){if(ft)return pt;ft=1;const t=bt(),e=Et(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:r,REGEX_NON_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_BACKREF:i,REPLACEMENTS:o}=t,a=(t,n)=>{if("function"==typeof n.expandRange)return n.expandRange(...t,n);t.sort();const r=`[${t.join("-")}]`;try{new RegExp(r)}catch(n){return t.map(t=>e.escapeRegex(t)).join("..")}return r},u=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,c=(l,p)=>{if("string"!=typeof l)throw new TypeError("Expected a string");l=o[l]||l;const f={...p},h="number"==typeof f.maxLength?Math.min(n,f.maxLength):n;let d=l.length;if(d>h)throw new SyntaxError(`Input length: ${d}, exceeds maximum allowed length: ${h}`);const _={type:"bos",value:"",output:f.prepend||""},g=[_],y=f.capture?"":"?:",m=e.isWindows(p),S=t.globChars(m),v=t.extglobChars(S),{DOT_LITERAL:b,PLUS_LITERAL:E,SLASH_LITERAL:A,ONE_CHAR:R,DOTS_SLASH:x,NO_DOT:P,NO_DOT_SLASH:C,NO_DOTS_SLASH:w,QMARK:T,QMARK_NO_DOT:O,STAR:k,START_ANCHOR:L}=S,$=t=>`(${y}(?:(?!${L}${t.dot?x:b}).)*?)`,H=f.dot?"":P,M=f.dot?T:O;let D=!0===f.bash?$(f):k;f.capture&&(D=`(${D})`),"boolean"==typeof f.noext&&(f.noextglob=f.noext);const F={input:l,index:-1,start:0,dot:!0===f.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};l=e.removePrefix(l,F),d=l.length;const N=[],I=[],j=[];let B,G=_;const U=()=>F.index===d-1,W=F.peek=(t=1)=>l[F.index+t],K=F.advance=()=>l[++F.index]||"",V=()=>l.slice(F.index+1),q=(t="",e=0)=>{F.consumed+=t,F.index+=e},Q=t=>{F.output+=null!=t.output?t.output:t.value,q(t.value)},Y=()=>{let t=1;for(;"!"===W()&&("("!==W(2)||"?"===W(3));)K(),F.start++,t++;return t%2!=0&&(F.negated=!0,F.start++,!0)},X=t=>{F[t]++,j.push(t)},Z=t=>{F[t]--,j.pop()},z=t=>{if("globstar"===G.type){const e=F.braces>0&&("comma"===t.type||"brace"===t.type),n=!0===t.extglob||N.length&&("pipe"===t.type||"paren"===t.type);"slash"===t.type||"paren"===t.type||e||n||(F.output=F.output.slice(0,-G.output.length),G.type="star",G.value="*",G.output=D,F.output+=G.output)}if(N.length&&"paren"!==t.type&&(N[N.length-1].inner+=t.value),(t.value||t.output)&&Q(t),G&&"text"===G.type&&"text"===t.type)return G.value+=t.value,void(G.output=(G.output||"")+t.value);t.prev=G,g.push(t),G=t},J=(t,e)=>{const n={...v[e],conditions:1,inner:""};n.prev=G,n.parens=F.parens,n.output=F.output;const r=(f.capture?"(":"")+n.open;X("parens"),z({type:t,value:e,output:F.output?"":R}),z({type:"paren",extglob:!0,value:K(),output:r}),N.push(n)},tt=t=>{let e,n=t.close+(f.capture?")":"");if("negate"===t.type){let r=D;if(t.inner&&t.inner.length>1&&t.inner.includes("/")&&(r=$(f)),(r!==D||U()||/^\)+$/.test(V()))&&(n=t.close=`)$))${r}`),t.inner.includes("*")&&(e=V())&&/^\.[^\\/.]+$/.test(e)){const s=c(e,{...p,fastpaths:!1}).output;n=t.close=`)${s})${r})`}"bos"===t.prev.type&&(F.negatedExtglob=!0)}z({type:"paren",extglob:!0,value:B,output:n}),Z("parens")};if(!1!==f.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(l)){let t=!1,n=l.replace(i,(e,n,r,s,i,o)=>"\\"===s?(t=!0,e):"?"===s?n?n+s+(i?T.repeat(i.length):""):0===o?M+(i?T.repeat(i.length):""):T.repeat(r.length):"."===s?b.repeat(r.length):"*"===s?n?n+s+(i?D:""):D:n?e:`\\${e}`);return!0===t&&(n=!0===f.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,t=>t.length%2==0?"\\\\":t?"\\":"")),n===l&&!0===f.contains?(F.output=l,F):(F.output=e.wrapOutput(n,F,p),F)}for(;!U();){if(B=K(),"\0"===B)continue;if("\\"===B){const t=W();if("/"===t&&!0!==f.bash)continue;if("."===t||";"===t)continue;if(!t){B+="\\",z({type:"text",value:B});continue}const e=/^\\+/.exec(V());let n=0;if(e&&e[0].length>2&&(n=e[0].length,F.index+=n,n%2!=0&&(B+="\\")),!0===f.unescape?B=K():B+=K(),0===F.brackets){z({type:"text",value:B});continue}}if(F.brackets>0&&("]"!==B||"["===G.value||"[^"===G.value)){if(!1!==f.posix&&":"===B){const t=G.value.slice(1);if(t.includes("[")&&(G.posix=!0,t.includes(":"))){const t=G.value.lastIndexOf("["),e=G.value.slice(0,t),n=G.value.slice(t+2),s=r[n];if(s){G.value=e+s,F.backtrack=!0,K(),_.output||1!==g.indexOf(G)||(_.output=R);continue}}}("["===B&&":"!==W()||"-"===B&&"]"===W())&&(B=`\\${B}`),"]"!==B||"["!==G.value&&"[^"!==G.value||(B=`\\${B}`),!0===f.posix&&"!"===B&&"["===G.value&&(B="^"),G.value+=B,Q({value:B});continue}if(1===F.quotes&&'"'!==B){B=e.escapeRegex(B),G.value+=B,Q({value:B});continue}if('"'===B){F.quotes=1===F.quotes?0:1,!0===f.keepQuotes&&z({type:"text",value:B});continue}if("("===B){X("parens"),z({type:"paren",value:B});continue}if(")"===B){if(0===F.parens&&!0===f.strictBrackets)throw new SyntaxError(u("opening","("));const t=N[N.length-1];if(t&&F.parens===t.parens+1){tt(N.pop());continue}z({type:"paren",value:B,output:F.parens?")":"\\)"}),Z("parens");continue}if("["===B){if(!0!==f.nobracket&&V().includes("]"))X("brackets");else{if(!0!==f.nobracket&&!0===f.strictBrackets)throw new SyntaxError(u("closing","]"));B=`\\${B}`}z({type:"bracket",value:B});continue}if("]"===B){if(!0===f.nobracket||G&&"bracket"===G.type&&1===G.value.length){z({type:"text",value:B,output:`\\${B}`});continue}if(0===F.brackets){if(!0===f.strictBrackets)throw new SyntaxError(u("opening","["));z({type:"text",value:B,output:`\\${B}`});continue}Z("brackets");const t=G.value.slice(1);if(!0===G.posix||"^"!==t[0]||t.includes("/")||(B=`/${B}`),G.value+=B,Q({value:B}),!1===f.literalBrackets||e.hasRegexChars(t))continue;const n=e.escapeRegex(G.value);if(F.output=F.output.slice(0,-G.value.length),!0===f.literalBrackets){F.output+=n,G.value=n;continue}G.value=`(${y}${n}|${G.value})`,F.output+=G.value;continue}if("{"===B&&!0!==f.nobrace){X("braces");const t={type:"brace",value:B,output:"(",outputIndex:F.output.length,tokensIndex:F.tokens.length};I.push(t),z(t);continue}if("}"===B){const t=I[I.length-1];if(!0===f.nobrace||!t){z({type:"text",value:B,output:B});continue}let e=")";if(!0===t.dots){const t=g.slice(),n=[];for(let e=t.length-1;e>=0&&(g.pop(),"brace"!==t[e].type);e--)"dots"!==t[e].type&&n.unshift(t[e].value);e=a(n,f),F.backtrack=!0}if(!0!==t.comma&&!0!==t.dots){const n=F.output.slice(0,t.outputIndex),r=F.tokens.slice(t.tokensIndex);t.value=t.output="\\{",B=e="\\}",F.output=n;for(const t of r)F.output+=t.output||t.value}z({type:"brace",value:B,output:e}),Z("braces"),I.pop();continue}if("|"===B){N.length>0&&N[N.length-1].conditions++,z({type:"text",value:B});continue}if(","===B){let t=B;const e=I[I.length-1];e&&"braces"===j[j.length-1]&&(e.comma=!0,t="|"),z({type:"comma",value:B,output:t});continue}if("/"===B){if("dot"===G.type&&F.index===F.start+1){F.start=F.index+1,F.consumed="",F.output="",g.pop(),G=_;continue}z({type:"slash",value:B,output:A});continue}if("."===B){if(F.braces>0&&"dot"===G.type){"."===G.value&&(G.output=b);const t=I[I.length-1];G.type="dots",G.output+=B,G.value+=B,t.dots=!0;continue}if(F.braces+F.parens===0&&"bos"!==G.type&&"slash"!==G.type){z({type:"text",value:B,output:b});continue}z({type:"dot",value:B,output:b});continue}if("?"===B){if((!G||"("!==G.value)&&!0!==f.noextglob&&"("===W()&&"?"!==W(2)){J("qmark",B);continue}if(G&&"paren"===G.type){const t=W();let n=B;if("<"===t&&!e.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===G.value&&!/[!=<:]/.test(t)||"<"===t&&!/<([!=]|\w+>)/.test(V()))&&(n=`\\${B}`),z({type:"text",value:B,output:n});continue}if(!0!==f.dot&&("slash"===G.type||"bos"===G.type)){z({type:"qmark",value:B,output:O});continue}z({type:"qmark",value:B,output:T});continue}if("!"===B){if(!0!==f.noextglob&&"("===W()&&("?"!==W(2)||!/[!=<:]/.test(W(3)))){J("negate",B);continue}if(!0!==f.nonegate&&0===F.index){Y();continue}}if("+"===B){if(!0!==f.noextglob&&"("===W()&&"?"!==W(2)){J("plus",B);continue}if(G&&"("===G.value||!1===f.regex){z({type:"plus",value:B,output:E});continue}if(G&&("bracket"===G.type||"paren"===G.type||"brace"===G.type)||F.parens>0){z({type:"plus",value:B});continue}z({type:"plus",value:E});continue}if("@"===B){if(!0!==f.noextglob&&"("===W()&&"?"!==W(2)){z({type:"at",extglob:!0,value:B,output:""});continue}z({type:"text",value:B});continue}if("*"!==B){"$"!==B&&"^"!==B||(B=`\\${B}`);const t=s.exec(V());t&&(B+=t[0],F.index+=t[0].length),z({type:"text",value:B});continue}if(G&&("globstar"===G.type||!0===G.star)){G.type="star",G.star=!0,G.value+=B,G.output=D,F.backtrack=!0,F.globstar=!0,q(B);continue}let t=V();if(!0!==f.noextglob&&/^\([^?]/.test(t)){J("star",B);continue}if("star"===G.type){if(!0===f.noglobstar){q(B);continue}const e=G.prev,n=e.prev,r="slash"===e.type||"bos"===e.type,s=n&&("star"===n.type||"globstar"===n.type);if(!0===f.bash&&(!r||t[0]&&"/"!==t[0])){z({type:"star",value:B,output:""});continue}const i=F.braces>0&&("comma"===e.type||"brace"===e.type),o=N.length&&("pipe"===e.type||"paren"===e.type);if(!r&&"paren"!==e.type&&!i&&!o){z({type:"star",value:B,output:""});continue}for(;"/**"===t.slice(0,3);){const e=l[F.index+4];if(e&&"/"!==e)break;t=t.slice(3),q("/**",3)}if("bos"===e.type&&U()){G.type="globstar",G.value+=B,G.output=$(f),F.output=G.output,F.globstar=!0,q(B);continue}if("slash"===e.type&&"bos"!==e.prev.type&&!s&&U()){F.output=F.output.slice(0,-(e.output+G.output).length),e.output=`(?:${e.output}`,G.type="globstar",G.output=$(f)+(f.strictSlashes?")":"|$)"),G.value+=B,F.globstar=!0,F.output+=e.output+G.output,q(B);continue}if("slash"===e.type&&"bos"!==e.prev.type&&"/"===t[0]){const n=void 0!==t[1]?"|$":"";F.output=F.output.slice(0,-(e.output+G.output).length),e.output=`(?:${e.output}`,G.type="globstar",G.output=`${$(f)}${A}|${A}${n})`,G.value+=B,F.output+=e.output+G.output,F.globstar=!0,q(B+K()),z({type:"slash",value:"/",output:""});continue}if("bos"===e.type&&"/"===t[0]){G.type="globstar",G.value+=B,G.output=`(?:^|${A}|${$(f)}${A})`,F.output=G.output,F.globstar=!0,q(B+K()),z({type:"slash",value:"/",output:""});continue}F.output=F.output.slice(0,-G.output.length),G.type="globstar",G.output=$(f),G.value+=B,F.output+=G.output,F.globstar=!0,q(B);continue}const n={type:"star",value:B,output:D};!0!==f.bash?!G||"bracket"!==G.type&&"paren"!==G.type||!0!==f.regex?(F.index!==F.start&&"slash"!==G.type&&"dot"!==G.type||("dot"===G.type?(F.output+=C,G.output+=C):!0===f.dot?(F.output+=w,G.output+=w):(F.output+=H,G.output+=H),"*"!==W()&&(F.output+=R,G.output+=R)),z(n)):(n.output=B,z(n)):(n.output=".*?","bos"!==G.type&&"slash"!==G.type||(n.output=H+n.output),z(n))}for(;F.brackets>0;){if(!0===f.strictBrackets)throw new SyntaxError(u("closing","]"));F.output=e.escapeLast(F.output,"["),Z("brackets")}for(;F.parens>0;){if(!0===f.strictBrackets)throw new SyntaxError(u("closing",")"));F.output=e.escapeLast(F.output,"("),Z("parens")}for(;F.braces>0;){if(!0===f.strictBrackets)throw new SyntaxError(u("closing","}"));F.output=e.escapeLast(F.output,"{"),Z("braces")}if(!0===f.strictSlashes||"star"!==G.type&&"bracket"!==G.type||z({type:"maybe_slash",value:"",output:`${A}?`}),!0===F.backtrack){F.output="";for(const t of F.tokens)F.output+=null!=t.output?t.output:t.value,t.suffix&&(F.output+=t.suffix)}return F};return c.fastpaths=(r,s)=>{const i={...s},a="number"==typeof i.maxLength?Math.min(n,i.maxLength):n,u=r.length;if(u>a)throw new SyntaxError(`Input length: ${u}, exceeds maximum allowed length: ${a}`);r=o[r]||r;const c=e.isWindows(s),{DOT_LITERAL:l,SLASH_LITERAL:p,ONE_CHAR:f,DOTS_SLASH:h,NO_DOT:d,NO_DOTS:_,NO_DOTS_SLASH:g,STAR:y,START_ANCHOR:m}=t.globChars(c),S=i.dot?_:d,v=i.dot?g:d,b=i.capture?"":"?:";let E=!0===i.bash?".*?":y;i.capture&&(E=`(${E})`);const A=t=>!0===t.noglobstar?E:`(${b}(?:(?!${m}${t.dot?h:l}).)*?)`,R=t=>{switch(t){case"*":return`${S}${f}${E}`;case".*":return`${l}${f}${E}`;case"*.*":return`${S}${E}${l}${f}${E}`;case"*/*":return`${S}${E}${p}${f}${v}${E}`;case"**":return S+A(i);case"**/*":return`(?:${S}${A(i)}${p})?${v}${f}${E}`;case"**/*.*":return`(?:${S}${A(i)}${p})?${v}${E}${l}${f}${E}`;case"**/.*":return`(?:${S}${A(i)}${p})?${l}${f}${E}`;default:{const e=/^(.*?)\.(\w+)$/.exec(t);if(!e)return;const n=R(e[1]);if(!n)return;return n+l+e[2]}}},x=e.removePrefix(r,{negated:!1,prefix:""});let P=R(x);return P&&!0!==i.strictSlashes&&(P+=`${p}?`),P},pt=c}(),s=Et(),i=bt(),o=(t,e,n=!1)=>{if(Array.isArray(t)){const r=t.map(t=>o(t,e,n)),s=t=>{for(const e of r){const n=e(t);if(n)return n}return!1};return s}const r=(i=t)&&"object"==typeof i&&!Array.isArray(i)&&t.tokens&&t.input;var i;if(""===t||"string"!=typeof t&&!r)throw new TypeError("Expected pattern to be a non-empty string");const a=e||{},u=s.isWindows(e),c=r?o.compileRe(t,e):o.makeRe(t,e,!1,!0),l=c.state;delete c.state;let p=()=>!1;if(a.ignore){const t={...e,ignore:null,onMatch:null,onResult:null};p=o(a.ignore,t,n)}const f=(n,r=!1)=>{const{isMatch:s,match:i,output:f}=o.test(n,c,e,{glob:t,posix:u}),h={glob:t,state:l,regex:c,posix:u,input:n,output:f,match:i,isMatch:s};return"function"==typeof a.onResult&&a.onResult(h),!1===s?(h.isMatch=!1,!!r&&h):p(n)?("function"==typeof a.onIgnore&&a.onIgnore(h),h.isMatch=!1,!!r&&h):("function"==typeof a.onMatch&&a.onMatch(h),!r||h)};return n&&(f.state=l),f};return o.test=(t,e,n,{glob:r,posix:i}={})=>{if("string"!=typeof t)throw new TypeError("Expected input to be a string");if(""===t)return{isMatch:!1,output:""};const a=n||{},u=a.format||(i?s.toPosixSlashes:null);let c=t===r,l=c&&u?u(t):t;return!1===c&&(l=u?u(t):t,c=l===r),!1!==c&&!0!==a.capture||(c=!0===a.matchBase||!0===a.basename?o.matchBase(t,e,n,i):e.exec(l)),{isMatch:Boolean(c),match:c,output:l}},o.matchBase=(e,n,r,i=s.isWindows(r))=>(n instanceof RegExp?n:o.makeRe(n,r)).test(t.basename(e)),o.isMatch=(t,e,n)=>o(e,n)(t),o.parse=(t,e)=>Array.isArray(t)?t.map(t=>o.parse(t,e)):r(t,{...e,fastpaths:!1}),o.scan=(t,e)=>n(t,e),o.compileRe=(t,e,n=!1,r=!1)=>{if(!0===n)return t.output;const s=e||{},i=s.contains?"":"^",a=s.contains?"":"$";let u=`${i}(?:${t.output})${a}`;t&&!0===t.negated&&(u=`^(?!${u}).*$`);const c=o.toRegex(u,e);return!0===r&&(c.state=t),c},o.makeRe=(t,e={},n=!1,s=!1)=>{if(!t||"string"!=typeof t)throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return!1===e.fastpaths||"."!==t[0]&&"*"!==t[0]||(i.output=r.fastpaths(t,e)),i.output||(i=r(t,e)),o.compileRe(i,e,n,s)},o.toRegex=(t,e)=>{try{const n=e||{};return new RegExp(t,n.flags||(n.nocase?"i":""))}catch(t){if(e&&!0===e.debug)throw t;return/$^/}},o.constants=i,ht=o}function Rt(){return gt?_t:(gt=1,_t=At())}function xt(){if(St)return T;St=1,Object.defineProperty(T,"__esModule",{value:!0}),T.isAbsolute=T.partitionAbsoluteAndRelative=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;const t=e,r=L(),s=function(){if(mt)return yt;mt=1;const t=n,e=it(),r=Rt(),s=Et(),i=t=>""===t||"./"===t,o=t=>{const e=t.indexOf("{");return e>-1&&t.indexOf("}",e)>-1},a=(t,e,n)=>{e=[].concat(e),t=[].concat(t);let s=new Set,i=new Set,o=new Set,a=0,u=t=>{o.add(t.output),n&&n.onResult&&n.onResult(t)};for(let o=0;o<e.length;o++){let c=r(String(e[o]),{...n,onResult:u},!0),l=c.state.negated||c.state.negatedExtglob;l&&a++;for(let e of t){let t=c(e,!0);(l?!t.isMatch:t.isMatch)&&(l?s.add(t.output):(s.delete(t.output),i.add(t.output)))}}let c=(a===e.length?[...o]:[...i]).filter(t=>!s.has(t));if(n&&0===c.length){if(!0===n.failglob)throw new Error(`No matches found for "${e.join(", ")}"`);if(!0===n.nonull||!0===n.nullglob)return n.unescape?e.map(t=>t.replace(/\\/g,"")):e}return c};return a.match=a,a.matcher=(t,e)=>r(t,e),a.any=a.isMatch=(t,e,n)=>r(e,n)(t),a.not=(t,e,n={})=>{e=[].concat(e).map(String);let r=new Set,s=[],i=new Set(a(t,e,{...n,onResult:t=>{n.onResult&&n.onResult(t),s.push(t.output)}}));for(let t of s)i.has(t)||r.add(t);return[...r]},a.contains=(e,n,r)=>{if("string"!=typeof e)throw new TypeError(`Expected a string: "${t.inspect(e)}"`);if(Array.isArray(n))return n.some(t=>a.contains(e,t,r));if("string"==typeof n){if(i(e)||i(n))return!1;if(e.includes(n)||e.startsWith("./")&&e.slice(2).includes(n))return!0}return a.isMatch(e,n,{...r,contains:!0})},a.matchKeys=(t,e,n)=>{if(!s.isObject(t))throw new TypeError("Expected the first argument to be an object");let r=a(Object.keys(t),e,n),i={};for(let e of r)i[e]=t[e];return i},a.some=(t,e,n)=>{let s=[].concat(t);for(let t of[].concat(e)){let e=r(String(t),n);if(s.some(t=>e(t)))return!0}return!1},a.every=(t,e,n)=>{let s=[].concat(t);for(let t of[].concat(e)){let e=r(String(t),n);if(!s.every(t=>e(t)))return!1}return!0},a.all=(e,n,s)=>{if("string"!=typeof e)throw new TypeError(`Expected a string: "${t.inspect(e)}"`);return[].concat(n).every(t=>r(t,s)(e))},a.capture=(t,e,n)=>{let i=s.isWindows(n),o=r.makeRe(String(t),{...n,capture:!0}).exec(i?s.toPosixSlashes(e):e);if(o)return o.slice(1).map(t=>void 0===t?"":t)},a.makeRe=(...t)=>r.makeRe(...t),a.scan=(...t)=>r.scan(...t),a.parse=(t,n)=>{let s=[];for(let i of[].concat(t||[]))for(let t of e(String(i),n))s.push(r.parse(t,n));return s},a.braces=(t,n)=>{if("string"!=typeof t)throw new TypeError("Expected a string");return n&&!0===n.nobrace||!o(t)?[t]:e(t,n)},a.braceExpand=(t,e)=>{if("string"!=typeof t)throw new TypeError("Expected a string");return a.braces(t,{...e,expand:!0})},a.hasBraces=o,yt=a}(),i=/[*?]|^!/,o=/\[[^[]*]/,a=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,u=/[!*+?@]\([^(]*\)/,c=/,|\.\./,l=/(?!^)\/{2,}/g;function p(t,e={}){return!f(t,e)}function f(t,e={}){return""!==t&&(!(!1!==e.caseSensitiveMatch&&!t.includes("\\"))||(!!(i.test(t)||o.test(t)||a.test(t))||(!(!1===e.extglob||!u.test(t))||!(!1===e.braceExpansion||!function(t){const e=t.indexOf("{");if(-1===e)return!1;const n=t.indexOf("}",e+1);if(-1===n)return!1;const r=t.slice(e,n);return c.test(r)}(t)))))}function h(t){return t.startsWith("!")&&"("!==t[1]}function d(t){return!h(t)}function _(t){return t.startsWith("..")||t.startsWith("./..")}function g(t){return t.endsWith("/**")}function y(t){const e=s.braces(t,{expand:!0,nodupes:!0,keepEscaping:!0});return e.sort((t,e)=>t.length-e.length),e.filter(t=>""!==t)}function m(t,e){return s.makeRe(t,e)}function S(e){return t.isAbsolute(e)}return T.isStaticPattern=p,T.isDynamicPattern=f,T.convertToPositivePattern=function(t){return h(t)?t.slice(1):t},T.convertToNegativePattern=function(t){return"!"+t},T.isNegativePattern=h,T.isPositivePattern=d,T.getNegativePatterns=function(t){return t.filter(h)},T.getPositivePatterns=function(t){return t.filter(d)},T.getPatternsInsideCurrentDirectory=function(t){return t.filter(t=>!_(t))},T.getPatternsOutsideCurrentDirectory=function(t){return t.filter(_)},T.isPatternRelatedToParentDirectory=_,T.getBaseDirectory=function(t){return r(t,{flipBackslashes:!1})},T.hasGlobStar=function(t){return t.includes("**")},T.endsWithSlashGlobStar=g,T.isAffectDepthOfReadingPattern=function(e){const n=t.basename(e);return g(e)||p(n)},T.expandPatternsWithBraceExpansion=function(t){return t.reduce((t,e)=>t.concat(y(e)),[])},T.expandBraceExpansion=y,T.getPatternParts=function(t,e){let{parts:n}=s.scan(t,Object.assign(Object.assign({},e),{parts:!0}));return 0===n.length&&(n=[t]),n[0].startsWith("/")&&(n[0]=n[0].slice(1),n.unshift("")),n},T.makeRe=m,T.convertPatternsToRe=function(t,e){return t.map(t=>m(t,e))},T.matchAny=function(t,e){return e.some(e=>e.test(t))},T.removeDuplicateSlashes=function(t){return t.replace(l,"/")},T.partitionAbsoluteAndRelative=function(t){const e=[],n=[];for(const r of t)S(r)?e.push(r):n.push(r);return[e,n]},T.isAbsolute=S,T}var Pt,Ct,wt,Tt={};function Ot(){if(Ct)return Pt;Ct=1;const t=r.PassThrough,e=Array.prototype.slice;function n(e,r){if(Array.isArray(e))for(let t=0,s=e.length;t<s;t++)e[t]=n(e[t],r);else{if(!e._readableState&&e.pipe&&(e=e.pipe(t(r))),!e._readableState||!e.pause||!e.pipe)throw new Error("Only readable stream can be merged.");e.pause()}return e}return Pt=function(){const r=[],s=e.call(arguments);let i=!1,o=s[s.length-1];o&&!Array.isArray(o)&&null==o.pipe?s.pop():o={};const a=!1!==o.end,u=!0===o.pipeError;null==o.objectMode&&(o.objectMode=!0);null==o.highWaterMark&&(o.highWaterMark=65536);const c=t(o);function l(){for(let t=0,e=arguments.length;t<e;t++)r.push(n(arguments[t],o));return p(),this}function p(){if(i)return;i=!0;let t=r.shift();if(!t)return void process.nextTick(f);Array.isArray(t)||(t=[t]);let e=t.length+1;function n(){--e>0||(i=!1,p())}function s(t){function e(){t.removeListener("merge2UnpipeEnd",e),t.removeListener("end",e),u&&t.removeListener("error",r),n()}function r(t){c.emit("error",t)}if(t._readableState.endEmitted)return n();t.on("merge2UnpipeEnd",e),t.on("end",e),u&&t.on("error",r),t.pipe(c,{end:!1}),t.resume()}for(let e=0;e<t.length;e++)s(t[e]);n()}function f(){i=!1,c.emit("queueDrain"),a&&c.end()}c.setMaxListeners(0),c.add=l,c.on("unpipe",function(t){t.emit("merge2UnpipeEnd")}),s.length&&l.apply(null,s);return c},Pt}var kt,Lt,$t,Ht={};function Mt(){if(kt)return Ht;return kt=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.isEmpty=Ht.isString=void 0,Ht.isString=function(t){return"string"==typeof t},Ht.isEmpty=function(t){return""===t},Ht}function Dt(){if(Lt)return f;Lt=1,Object.defineProperty(f,"__esModule",{value:!0}),f.string=f.stream=f.pattern=f.path=f.fs=f.errno=f.array=void 0;const t=d();f.array=t;const e=y();f.errno=e;const n=function(){if(m)return S;m=1,Object.defineProperty(S,"__esModule",{value:!0}),S.createDirentFromStats=void 0;class t{constructor(t,e){this.name=t,this.isBlockDevice=e.isBlockDevice.bind(e),this.isCharacterDevice=e.isCharacterDevice.bind(e),this.isDirectory=e.isDirectory.bind(e),this.isFIFO=e.isFIFO.bind(e),this.isFile=e.isFile.bind(e),this.isSocket=e.isSocket.bind(e),this.isSymbolicLink=e.isSymbolicLink.bind(e)}}return S.createDirentFromStats=function(e,n){return new t(e,n)},S}();f.fs=n;const r=E();f.path=r;const s=xt();f.pattern=s;const i=function(){if(wt)return Tt;wt=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.merge=void 0;const t=Ot();function e(t){t.forEach(t=>t.emit("close"))}return Tt.merge=function(n){const r=t(n);return n.forEach(t=>{t.once("error",t=>r.emit("error",t))}),r.once("close",()=>e(n)),r.once("end",()=>e(n)),r},Tt}();f.stream=i;const o=Mt();return f.string=o,f}var Ft,Nt={},It={},jt={},Bt={},Gt={},Ut={},Wt={},Kt={},Vt={};function qt(){if(Ft)return Vt;function t(t,e){t(e)}function e(t,e){t(null,e)}return Ft=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.read=void 0,Vt.read=function(n,r,s){r.fs.lstat(n,(i,o)=>{null===i?o.isSymbolicLink()&&r.followSymbolicLink?r.fs.stat(n,(n,i)=>{if(null!==n)return r.throwErrorOnBrokenSymbolicLink?void t(s,n):void e(s,o);r.markSymbolicLink&&(i.isSymbolicLink=()=>!0),e(s,i)}):e(s,o):t(s,i)})},Vt}var Qt,Yt={};var Xt,Zt,zt,Jt,te,ee,ne,re={},se={};function ie(){if(Zt)return re;Zt=1,Object.defineProperty(re,"__esModule",{value:!0});const t=(Xt||(Xt=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createFileSystemAdapter=t.FILE_SYSTEM_ADAPTER=void 0;const e=i;t.FILE_SYSTEM_ADAPTER={lstat:e.lstat,stat:e.stat,lstatSync:e.lstatSync,statSync:e.statSync},t.createFileSystemAdapter=function(e){return void 0===e?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),e)}}(se)),se);return re.default=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=t.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(t,e){return null!=t?t:e}},re}function oe(){if(zt)return Kt;zt=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.statSync=Kt.stat=Kt.Settings=void 0;const t=qt(),e=(Qt||(Qt=1,Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.read=void 0,Yt.read=function(t,e){const n=e.fs.lstatSync(t);if(!n.isSymbolicLink()||!e.followSymbolicLink)return n;try{const n=e.fs.statSync(t);return e.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(t){if(!e.throwErrorOnBrokenSymbolicLink)return n;throw t}}),Yt),n=ie();function r(t={}){return t instanceof n.default?t:new n.default(t)}return Kt.Settings=n.default,Kt.stat=function(e,n,s){"function"!=typeof n?t.read(e,r(n),s):t.read(e,r(),n)},Kt.statSync=function(t,n){const s=r(n);return e.read(t,s)},Kt}function ae(){if(te)return Jt;let t;return te=1,Jt="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:u):e=>(t||(t=Promise.resolve())).then(e).catch(t=>setTimeout(()=>{throw t},0))}var ue,ce={};function le(){if(ue)return ce;ue=1,Object.defineProperty(ce,"__esModule",{value:!0}),ce.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const t=process.versions.node.split(".");if(void 0===t[0]||void 0===t[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const e=Number.parseInt(t[0],10),n=Number.parseInt(t[1],10),r=e>10,s=10===e&&n>=10;return ce.IS_SUPPORT_READDIR_WITH_FILE_TYPES=r||s,ce}var pe,fe,he={},de={};function _e(){if(fe)return he;fe=1,Object.defineProperty(he,"__esModule",{value:!0}),he.fs=void 0;const t=function(){if(pe)return de;pe=1,Object.defineProperty(de,"__esModule",{value:!0}),de.createDirentFromStats=void 0;class t{constructor(t,e){this.name=t,this.isBlockDevice=e.isBlockDevice.bind(e),this.isCharacterDevice=e.isCharacterDevice.bind(e),this.isDirectory=e.isDirectory.bind(e),this.isFIFO=e.isFIFO.bind(e),this.isFile=e.isFile.bind(e),this.isSocket=e.isSocket.bind(e),this.isSymbolicLink=e.isSymbolicLink.bind(e)}}return de.createDirentFromStats=function(e,n){return new t(e,n)},de}();return he.fs=t,he}var ge,ye,me={};function Se(){if(ge)return me;return ge=1,Object.defineProperty(me,"__esModule",{value:!0}),me.joinPathSegments=void 0,me.joinPathSegments=function(t,e,n){return t.endsWith(n)?t+e:t+n+e},me}function ve(){if(ye)return Wt;ye=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.readdir=Wt.readdirWithFileTypes=Wt.read=void 0;const t=oe(),e=function(){if(ne)return ee;ne=1,ee=function(e,n){let r,s,i,o=!0;function a(e){function s(){n&&n(e,r),n=null}o?t(s):s()}function u(t,e,n){r[t]=n,(0===--s||e)&&a(e)}Array.isArray(e)?(r=[],s=e.length):(i=Object.keys(e),r={},s=i.length),s?i?i.forEach(function(t){e[t](function(e,n){u(t,e,n)})}):e.forEach(function(t,e){t(function(t,n){u(e,t,n)})}):a(null),o=!1};const t=ae();return ee}(),n=le(),r=_e(),s=Se();function i(t,n,i){n.fs.readdir(t,{withFileTypes:!0},(o,c)=>{if(null!==o)return void a(i,o);const l=c.map(e=>({dirent:e,name:e.name,path:s.joinPathSegments(t,e.name,n.pathSegmentSeparator)}));if(!n.followSymbolicLinks)return void u(i,l);const p=l.map(t=>function(t,e){return n=>{t.dirent.isSymbolicLink()?e.fs.stat(t.path,(s,i)=>{if(null!==s)return e.throwErrorOnBrokenSymbolicLink?void n(s):void n(null,t);t.dirent=r.fs.createDirentFromStats(t.name,i),n(null,t)}):n(null,t)}}(t,n));e(p,(t,e)=>{null===t?u(i,e):a(i,t)})})}function o(n,i,o){i.fs.readdir(n,(c,l)=>{if(null!==c)return void a(o,c);const p=l.map(e=>{const o=s.joinPathSegments(n,e,i.pathSegmentSeparator);return n=>{t.stat(o,i.fsStatSettings,(t,s)=>{if(null!==t)return void n(t);const a={name:e,path:o,dirent:r.fs.createDirentFromStats(e,s)};i.stats&&(a.stats=s),n(null,a)})}});e(p,(t,e)=>{null===t?u(o,e):a(o,t)})})}function a(t,e){t(e)}function u(t,e){t(null,e)}return Wt.read=function(t,e,r){e.stats||!n.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(t,e,r):i(t,e,r)},Wt.readdirWithFileTypes=i,Wt.readdir=o,Wt}var be,Ee={};var Ae,Re,xe,Pe={},Ce={};function we(){return Ae||(Ae=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createFileSystemAdapter=t.FILE_SYSTEM_ADAPTER=void 0;const e=i;t.FILE_SYSTEM_ADAPTER={lstat:e.lstat,stat:e.stat,lstatSync:e.lstatSync,statSync:e.statSync,readdir:e.readdir,readdirSync:e.readdirSync},t.createFileSystemAdapter=function(e){return void 0===e?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),e)}}(Ce)),Ce}function Te(){if(xe)return Ut;xe=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const t=ve(),n=function(){if(be)return Ee;be=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.readdir=Ee.readdirWithFileTypes=Ee.read=void 0;const t=oe(),e=le(),n=_e(),r=Se();function s(t,e){return e.fs.readdirSync(t,{withFileTypes:!0}).map(s=>{const i={dirent:s,name:s.name,path:r.joinPathSegments(t,s.name,e.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{const t=e.fs.statSync(i.path);i.dirent=n.fs.createDirentFromStats(i.name,t)}catch(t){if(e.throwErrorOnBrokenSymbolicLink)throw t}return i})}function i(e,s){return s.fs.readdirSync(e).map(i=>{const o=r.joinPathSegments(e,i,s.pathSegmentSeparator),a=t.statSync(o,s.fsStatSettings),u={name:i,path:o,dirent:n.fs.createDirentFromStats(i,a)};return s.stats&&(u.stats=a),u})}return Ee.read=function(t,n){return!n.stats&&e.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(t,n):i(t,n)},Ee.readdirWithFileTypes=s,Ee.readdir=i,Ee}(),r=function(){if(Re)return Pe;Re=1,Object.defineProperty(Pe,"__esModule",{value:!0});const t=e,n=oe(),r=we();return Pe.default=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=r.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,t.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new n.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(t,e){return null!=t?t:e}},Pe}();function s(t={}){return t instanceof r.default?t:new r.default(t)}return Ut.Settings=r.default,Ut.scandir=function(e,n,r){"function"!=typeof n?t.read(e,s(n),r):t.read(e,s(),n)},Ut.scandirSync=function(t,e){const r=s(e);return n.read(t,r)},Ut}var Oe,ke,Le,$e={exports:{}};function He(){if(Le)return $e.exports;Le=1;var t=ke?Oe:(ke=1,Oe=function(t){var e=new t,n=e;return{get:function(){var r=e;return r.next?e=r.next:(e=new t,n=e),r.next=null,r},release:function(t){n.next=t,n=t}}});function e(e,s,i){if("function"==typeof e&&(i=s,s=e,e=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var o=t(r),a=null,u=null,c=0,l=null,p={push:function(t,r){var h=o.get();h.context=e,h.release=f,h.value=t,h.callback=r||n,h.errorHandler=l,c>=i||p.paused?u?(u.next=h,u=h):(a=h,u=h,p.saturated()):(c++,s.call(e,h.value,h.worked))},drain:n,saturated:n,pause:function(){p.paused=!0},paused:!1,get concurrency(){return i},set concurrency(t){if(!(t>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=t,!p.paused)for(;a&&c<i;)c++,f()},running:function(){return c},resume:function(){if(!p.paused)return;if(p.paused=!1,null===a)return c++,void f();for(;a&&c<i;)c++,f()},idle:function(){return 0===c&&0===p.length()},length:function(){var t=a,e=0;for(;t;)t=t.next,e++;return e},getQueue:function(){var t=a,e=[];for(;t;)e.push(t.value),t=t.next;return e},unshift:function(t,r){var h=o.get();h.context=e,h.release=f,h.value=t,h.callback=r||n,h.errorHandler=l,c>=i||p.paused?a?(h.next=a,a=h):(a=h,u=h,p.saturated()):(c++,s.call(e,h.value,h.worked))},empty:n,kill:function(){a=null,u=null,p.drain=n},killAndDrain:function(){a=null,u=null,p.drain(),p.drain=n},error:function(t){l=t},abort:function(){var t=a;a=null,u=null;for(;t;){var e=t.next,r=t.callback,s=t.errorHandler,i=t.value,o=t.context;t.value=null,t.callback=n,t.errorHandler=null,s&&s(new Error("abort"),i),r.call(o,new Error("abort")),t.release(t),t=e}p.drain=n}};return p;function f(t){t&&o.release(t);var n=a;n&&c<=i?p.paused?c--:(u===a&&(u=null),a=n.next,n.next=null,s.call(e,n.value,n.worked),null===u&&p.empty()):0===--c&&p.drain()}}function n(){}function r(){this.value=null,this.callback=n,this.next=null,this.release=n,this.context=null,this.errorHandler=null;var t=this;this.worked=function(e,r){var s=t.callback,i=t.errorHandler,o=t.value;t.value=null,t.callback=n,t.errorHandler&&i(e,o),s.call(t.context,e,r),t.release(t)}}return $e.exports=e,$e.exports.promise=function(t,r,s){"function"==typeof t&&(s=r,r=t,t=null);var i=e(t,function(t,e){r.call(this,t).then(function(t){e(null,t)},e)},s),o=i.push,a=i.unshift;return i.push=function(t){var e=new Promise(function(e,n){o(t,function(t,r){t?n(t):e(r)})});return e.catch(n),e},i.unshift=function(t){var e=new Promise(function(e,n){a(t,function(t,r){t?n(t):e(r)})});return e.catch(n),e},i.drained=function(){return new Promise(function(t){process.nextTick(function(){if(i.idle())t();else{var e=i.drain;i.drain=function(){"function"==typeof e&&e(),t(),i.drain=e}}})})},i},$e.exports}var Me,De={};function Fe(){if(Me)return De;return Me=1,Object.defineProperty(De,"__esModule",{value:!0}),De.joinPathSegments=De.replacePathSegmentSeparator=De.isAppliedFilter=De.isFatalError=void 0,De.isFatalError=function(t,e){return null===t.errorFilter||!t.errorFilter(e)},De.isAppliedFilter=function(t,e){return null===t||t(e)},De.replacePathSegmentSeparator=function(t,e){return t.split(/[/\\]/).join(e)},De.joinPathSegments=function(t,e,n){return""===t?e:t.endsWith(n)?t+e:t+n+e},De}var Ne,Ie,je,Be={};function Ge(){if(Ne)return Be;Ne=1,Object.defineProperty(Be,"__esModule",{value:!0});const t=Fe();return Be.default=class{constructor(e,n){this._root=e,this._settings=n,this._root=t.replacePathSegmentSeparator(e,n.pathSegmentSeparator)}},Be}function Ue(){if(Ie)return Gt;Ie=1,Object.defineProperty(Gt,"__esModule",{value:!0});const t=s,e=Te(),n=He(),r=Fe(),i=Ge();class o extends i.default{constructor(r,s){super(r,s),this._settings=s,this._scandir=e.scandir,this._emitter=new t.EventEmitter,this._queue=n(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(t){this._emitter.on("entry",t)}onError(t){this._emitter.once("error",t)}onEnd(t){this._emitter.once("end",t)}_pushToQueue(t,e){const n={directory:t,base:e};this._queue.push(n,t=>{null!==t&&this._handleError(t)})}_worker(t,e){this._scandir(t.directory,this._settings.fsScandirSettings,(n,r)=>{if(null===n){for(const e of r)this._handleEntry(e,t.base);e(null,void 0)}else e(n,void 0)})}_handleError(t){!this._isDestroyed&&r.isFatalError(this._settings,t)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",t))}_handleEntry(t,e){if(this._isDestroyed||this._isFatalError)return;const n=t.path;void 0!==e&&(t.path=r.joinPathSegments(e,t.name,this._settings.pathSegmentSeparator)),r.isAppliedFilter(this._settings.entryFilter,t)&&this._emitEntry(t),t.dirent.isDirectory()&&r.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(n,void 0===e?void 0:t.path)}_emitEntry(t){this._emitter.emit("entry",t)}}return Gt.default=o,Gt}var We,Ke={};var Ve,qe,Qe={},Ye={};function Xe(){if(qe)return Qe;qe=1,Object.defineProperty(Qe,"__esModule",{value:!0});const t=function(){if(Ve)return Ye;Ve=1,Object.defineProperty(Ye,"__esModule",{value:!0});const t=Te(),e=Fe(),n=Ge();class r extends n.default{constructor(){super(...arguments),this._scandir=t.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(t,e){this._queue.add({directory:t,base:e})}_handleQueue(){for(const t of this._queue.values())this._handleDirectory(t.directory,t.base)}_handleDirectory(t,e){try{const n=this._scandir(t,this._settings.fsScandirSettings);for(const t of n)this._handleEntry(t,e)}catch(t){this._handleError(t)}}_handleError(t){if(e.isFatalError(this._settings,t))throw t}_handleEntry(t,n){const r=t.path;void 0!==n&&(t.path=e.joinPathSegments(n,t.name,this._settings.pathSegmentSeparator)),e.isAppliedFilter(this._settings.entryFilter,t)&&this._pushToStorage(t),t.dirent.isDirectory()&&e.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(r,void 0===n?void 0:t.path)}_pushToStorage(t){this._storage.push(t)}}return Ye.default=r,Ye}();return Qe.default=class{constructor(e,n){this._root=e,this._settings=n,this._reader=new t.default(this._root,this._settings)}read(){return this._reader.read()}},Qe}var Ze,ze,Je={};function tn(){if(ze)return jt;ze=1,Object.defineProperty(jt,"__esModule",{value:!0}),jt.Settings=jt.walkStream=jt.walkSync=jt.walk=void 0;const t=function(){if(je)return Bt;je=1,Object.defineProperty(Bt,"__esModule",{value:!0});const t=Ue();return Bt.default=class{constructor(e,n){this._root=e,this._settings=n,this._reader=new t.default(this._root,this._settings),this._storage=[]}read(t){this._reader.onError(e=>{!function(t,e){t(e)}(t,e)}),this._reader.onEntry(t=>{this._storage.push(t)}),this._reader.onEnd(()=>{!function(t,e){t(null,e)}(t,this._storage)}),this._reader.read()}},Bt}(),n=function(){if(We)return Ke;We=1,Object.defineProperty(Ke,"__esModule",{value:!0});const t=r,e=Ue();return Ke.default=class{constructor(n,r){this._root=n,this._settings=r,this._reader=new e.default(this._root,this._settings),this._stream=new t.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}},Ke}(),s=Xe(),i=function(){if(Ze)return Je;Ze=1,Object.defineProperty(Je,"__esModule",{value:!0});const t=e,n=Te();return Je.default=class{constructor(e={}){this._options=e,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,t.sep),this.fsScandirSettings=new n.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(t,e){return null!=t?t:e}},Je}();function o(t={}){return t instanceof i.default?t:new i.default(t)}return jt.Settings=i.default,jt.walk=function(e,n,r){"function"!=typeof n?new t.default(e,o(n)).read(r):new t.default(e,o()).read(n)},jt.walkSync=function(t,e){const n=o(e);return new s.default(t,n).read()},jt.walkStream=function(t,e){const r=o(e);return new n.default(t,r).read()},jt}var en,nn={};function rn(){if(en)return nn;en=1,Object.defineProperty(nn,"__esModule",{value:!0});const t=e,n=oe(),r=Dt();return nn.default=class{constructor(t){this._settings=t,this._fsStatSettings=new n.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return t.resolve(this._settings.cwd,e)}_makeEntry(t,e){const n={name:e,path:e,dirent:r.fs.createDirentFromStats(e,t)};return this._settings.stats&&(n.stats=t),n}_isFatalError(t){return!r.errno.isEnoentCodeError(t)&&!this._settings.suppressErrors}},nn}var sn,on,an={};function un(){if(sn)return an;sn=1,Object.defineProperty(an,"__esModule",{value:!0});const t=r,e=oe(),n=tn(),s=rn();class i extends s.default{constructor(){super(...arguments),this._walkStream=n.walkStream,this._stat=e.stat}dynamic(t,e){return this._walkStream(t,e)}static(e,n){const r=e.map(this._getFullEntryPath,this),s=new t.PassThrough({objectMode:!0});s._write=(t,i,o)=>this._getEntry(r[t],e[t],n).then(e=>{null!==e&&n.entryFilter(e)&&s.push(e),t===r.length-1&&s.end(),o()}).catch(o);for(let t=0;t<r.length;t++)s.write(t);return s}_getEntry(t,e,n){return this._getStat(t).then(t=>this._makeEntry(t,e)).catch(t=>{if(n.errorFilter(t))return null;throw t})}_getStat(t){return new Promise((e,n)=>{this._stat(t,this._fsStatSettings,(t,r)=>null===t?e(r):n(t))})}}return an.default=i,an}var cn,ln,pn,fn={},hn={},dn={},_n={};function gn(){if(ln)return dn;ln=1,Object.defineProperty(dn,"__esModule",{value:!0});const t=function(){if(cn)return _n;cn=1,Object.defineProperty(_n,"__esModule",{value:!0});const t=Dt();return _n.default=class{constructor(t,e,n){this._patterns=t,this._settings=e,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){for(const t of this._patterns){const e=this._getPatternSegments(t),n=this._splitSegmentsIntoSections(e);this._storage.push({complete:n.length<=1,pattern:t,segments:e,sections:n})}}_getPatternSegments(e){return t.pattern.getPatternParts(e,this._micromatchOptions).map(e=>t.pattern.isDynamicPattern(e,this._settings)?{dynamic:!0,pattern:e,patternRe:t.pattern.makeRe(e,this._micromatchOptions)}:{dynamic:!1,pattern:e})}_splitSegmentsIntoSections(e){return t.array.splitWhen(e,e=>e.dynamic&&t.pattern.hasGlobStar(e.pattern))}},_n}();class e extends t.default{match(t){const e=t.split("/"),n=e.length,r=this._storage.filter(t=>!t.complete||t.segments.length>n);for(const t of r){const r=t.sections[0];if(!t.complete&&n>r.length)return!0;if(e.every((e,n)=>{const r=t.segments[n];return!(!r.dynamic||!r.patternRe.test(e))||!r.dynamic&&r.pattern===e}))return!0}return!1}}return dn.default=e,dn}var yn,mn={};var Sn,vn={};var bn,En,An,Rn={};function xn(){if(En)return fn;En=1,Object.defineProperty(fn,"__esModule",{value:!0});const t=e,n=function(){if(pn)return hn;pn=1,Object.defineProperty(hn,"__esModule",{value:!0});const t=Dt(),e=gn();return hn.default=class{constructor(t,e){this._settings=t,this._micromatchOptions=e}getFilter(t,e,n){const r=this._getMatcher(e),s=this._getNegativePatternsRe(n);return e=>this._filter(t,e,r,s)}_getMatcher(t){return new e.default(t,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){const n=e.filter(t.pattern.isAffectDepthOfReadingPattern);return t.pattern.convertPatternsToRe(n,this._micromatchOptions)}_filter(e,n,r,s){if(this._isSkippedByDeep(e,n.path))return!1;if(this._isSkippedSymbolicLink(n))return!1;const i=t.path.removeLeadingDotSegment(n.path);return!this._isSkippedByPositivePatterns(i,r)&&this._isSkippedByNegativePatterns(i,s)}_isSkippedByDeep(t,e){return this._settings.deep!==1/0&&this._getEntryLevel(t,e)>=this._settings.deep}_getEntryLevel(t,e){const n=e.split("/").length;return""===t?n:n-t.split("/").length}_isSkippedSymbolicLink(t){return!this._settings.followSymbolicLinks&&t.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(t,e){return!this._settings.baseNameMatch&&!e.match(t)}_isSkippedByNegativePatterns(e,n){return!t.pattern.matchAny(e,n)}},hn}(),r=function(){if(yn)return mn;yn=1,Object.defineProperty(mn,"__esModule",{value:!0});const t=Dt();return mn.default=class{constructor(t,e){this._settings=t,this._micromatchOptions=e,this.index=new Map}getFilter(e,n){const[r,s]=t.pattern.partitionAbsoluteAndRelative(n),i={positive:{all:t.pattern.convertPatternsToRe(e,this._micromatchOptions)},negative:{absolute:t.pattern.convertPatternsToRe(r,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:t.pattern.convertPatternsToRe(s,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return t=>this._filter(t,i)}_filter(e,n){const r=t.path.removeLeadingDotSegment(e.path);if(this._settings.unique&&this._isDuplicateEntry(r))return!1;if(this._onlyFileFilter(e)||this._onlyDirectoryFilter(e))return!1;const s=this._isMatchToPatternsSet(r,n,e.dirent.isDirectory());return this._settings.unique&&s&&this._createIndexRecord(r),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()}_isMatchToPatternsSet(t,e,n){return!!this._isMatchToPatterns(t,e.positive.all,n)&&(!this._isMatchToPatterns(t,e.negative.relative,n)&&!this._isMatchToAbsoluteNegative(t,e.negative.absolute,n))}_isMatchToAbsoluteNegative(e,n,r){if(0===n.length)return!1;const s=t.path.makeAbsolute(this._settings.cwd,e);return this._isMatchToPatterns(s,n,r)}_isMatchToPatterns(e,n,r){if(0===n.length)return!1;const s=t.pattern.matchAny(e,n);return!s&&r?t.pattern.matchAny(e+"/",n):s}},mn}(),s=function(){if(Sn)return vn;Sn=1,Object.defineProperty(vn,"__esModule",{value:!0});const t=Dt();return vn.default=class{constructor(t){this._settings=t}getFilter(){return t=>this._isNonFatalError(t)}_isNonFatalError(e){return t.errno.isEnoentCodeError(e)||this._settings.suppressErrors}},vn}(),i=function(){if(bn)return Rn;bn=1,Object.defineProperty(Rn,"__esModule",{value:!0});const t=Dt();return Rn.default=class{constructor(t){this._settings=t}getTransformer(){return t=>this._transform(t)}_transform(e){let n=e.path;return this._settings.absolute&&(n=t.path.makeAbsolute(this._settings.cwd,n),n=t.path.unixify(n)),this._settings.markDirectories&&e.dirent.isDirectory()&&(n+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:n}):n}},Rn}();return fn.default=class{constructor(t){this._settings=t,this.errorFilter=new s.default(this._settings),this.entryFilter=new r.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new n.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(e){return t.resolve(this._settings.cwd,e.base)}_getReaderOptions(t){const e="."===t.base?"":t.base;return{basePath:e,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(e,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}}},fn}function Pn(){if(An)return Nt;An=1,Object.defineProperty(Nt,"__esModule",{value:!0});const t=function(){if(on)return It;on=1,Object.defineProperty(It,"__esModule",{value:!0});const t=tn(),e=rn(),n=un();class r extends e.default{constructor(){super(...arguments),this._walkAsync=t.walk,this._readerStream=new n.default(this._settings)}dynamic(t,e){return new Promise((n,r)=>{this._walkAsync(t,e,(t,e)=>{null===t?n(e):r(t)})})}async static(t,e){const n=[],r=this._readerStream.static(t,e);return new Promise((t,e)=>{r.once("error",e),r.on("data",t=>n.push(t)),r.once("end",()=>t(n))})}}return It.default=r,It}(),e=xn();class n extends e.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}async read(t){const e=this._getRootDirectory(t),n=this._getReaderOptions(t);return(await this.api(e,t,n)).map(t=>n.transform(t))}api(t,e,n){return e.dynamic?this._reader.dynamic(t,n):this._reader.static(e.patterns,n)}}return Nt.default=n,Nt}var Cn,wn={};var Tn,On,kn={},Ln={};function $n(){if(On)return kn;On=1,Object.defineProperty(kn,"__esModule",{value:!0});const t=function(){if(Tn)return Ln;Tn=1,Object.defineProperty(Ln,"__esModule",{value:!0});const t=oe(),e=tn(),n=rn();class r extends n.default{constructor(){super(...arguments),this._walkSync=e.walkSync,this._statSync=t.statSync}dynamic(t,e){return this._walkSync(t,e)}static(t,e){const n=[];for(const r of t){const t=this._getFullEntryPath(r),s=this._getEntry(t,r,e);null!==s&&e.entryFilter(s)&&n.push(s)}return n}_getEntry(t,e,n){try{const n=this._getStat(t);return this._makeEntry(n,e)}catch(t){if(n.errorFilter(t))return null;throw t}}_getStat(t){return this._statSync(t,this._fsStatSettings)}}return Ln.default=r,Ln}(),e=xn();class n extends e.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const e=this._getRootDirectory(t),n=this._getReaderOptions(t);return this.api(e,t,n).map(n.transform)}api(t,e,n){return e.dynamic?this._reader.dynamic(t,n):this._reader.static(e.patterns,n)}}return kn.default=n,kn}var Hn,Mn,Dn,Fn={};var Nn=function(){if(Dn)return Mn;Dn=1;const e=function(){if($t)return p;$t=1,Object.defineProperty(p,"__esModule",{value:!0}),p.convertPatternGroupToTask=p.convertPatternGroupsToTasks=p.groupPatternsByBaseDirectory=p.getNegativePatternsAsPositive=p.getPositivePatterns=p.convertPatternsToTasks=p.generate=void 0;const t=Dt();function e(e,n){let r=e;return n.braceExpansion&&(r=t.pattern.expandPatternsWithBraceExpansion(r)),n.baseNameMatch&&(r=r.map(t=>t.includes("/")?t:`**/${t}`)),r.map(e=>t.pattern.removeDuplicateSlashes(e))}function n(e,n,r){const s=[],u=t.pattern.getPatternsOutsideCurrentDirectory(e),c=t.pattern.getPatternsInsideCurrentDirectory(e),l=i(u),p=i(c);return s.push(...o(l,n,r)),"."in p?s.push(a(".",c,n,r)):s.push(...o(p,n,r)),s}function r(e){return t.pattern.getPositivePatterns(e)}function s(e,n){return t.pattern.getNegativePatterns(e).concat(n).map(t.pattern.convertToPositivePattern)}function i(e){return e.reduce((e,n)=>{const r=t.pattern.getBaseDirectory(n);return r in e?e[r].push(n):e[r]=[n],e},{})}function o(t,e,n){return Object.keys(t).map(r=>a(r,t[r],e,n))}function a(e,n,r,s){return{dynamic:s,positive:n,negative:r,base:e,patterns:[].concat(n,r.map(t.pattern.convertToNegativePattern))}}return p.generate=function(i,o){const a=e(i,o),u=e(o.ignore,o),c=r(a),l=s(a,u),p=c.filter(e=>t.pattern.isStaticPattern(e,o)),f=c.filter(e=>t.pattern.isDynamicPattern(e,o)),h=n(p,l,!1),d=n(f,l,!0);return h.concat(d)},p.convertPatternsToTasks=n,p.getPositivePatterns=r,p.getNegativePatternsAsPositive=s,p.groupPatternsByBaseDirectory=i,p.convertPatternGroupsToTasks=o,p.convertPatternGroupToTask=a,p}(),n=Pn(),s=function(){if(Cn)return wn;Cn=1,Object.defineProperty(wn,"__esModule",{value:!0});const t=r,e=un(),n=xn();class s extends n.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const n=this._getRootDirectory(e),r=this._getReaderOptions(e),s=this.api(n,e,r),i=new t.Readable({objectMode:!0,read:()=>{}});return s.once("error",t=>i.emit("error",t)).on("data",t=>i.emit("data",r.transform(t))).once("end",()=>i.emit("end")),i.once("close",()=>s.destroy()),i}api(t,e,n){return e.dynamic?this._reader.dynamic(t,n):this._reader.static(e.patterns,n)}}return wn.default=s,wn}(),o=$n(),a=(Hn||(Hn=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=i,r=t,s=Math.max(r.cpus().length,1);e.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},e.default=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,s),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,e){return void 0===t?e:t}_getFileSystemMethods(t={}){return Object.assign(Object.assign({},e.DEFAULT_FILE_SYSTEM_ADAPTER),t)}}}(Fn)),Fn),u=Dt();async function c(t,e){f(t);const r=l(t,n.default,e),s=await Promise.all(r);return u.array.flatten(s)}function l(t,n,r){const s=[].concat(t),i=new a.default(r),o=e.generate(s,i),u=new n(i);return o.map(u.read,u)}function f(t){if(![].concat(t).every(t=>u.string.isString(t)&&!u.string.isEmpty(t)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(t){function n(t,e){f(t);const n=l(t,o.default,e);return u.array.flatten(n)}function r(t,e){f(t);const n=l(t,s.default,e);return u.stream.merge(n)}var i,c;t.glob=t,t.globSync=n,t.globStream=r,t.async=t,t.sync=n,t.stream=r,t.generateTasks=function(t,n){f(t);const r=[].concat(t),s=new a.default(n);return e.generate(r,s)},t.isDynamicPattern=function(t,e){f(t);const n=new a.default(e);return u.pattern.isDynamicPattern(t,n)},t.escapePath=function(t){return f(t),u.path.escape(t)},t.convertPathToPattern=function(t){return f(t),u.path.convertPathToPattern(t)},(i=t.posix||(t.posix={})).escapePath=function(t){return f(t),u.path.escapePosixPath(t)},i.convertPathToPattern=function(t){return f(t),u.path.convertPosixPathToPattern(t)},(c=t.win32||(t.win32={})).escapePath=function(t){return f(t),u.path.escapeWindowsPath(t)},c.convertPathToPattern=function(t){return f(t),u.path.convertWindowsPathToPattern(t)}}(c||(c={})),Mn=c}(),In=c(Nn);function jn(t){let e=Bn(t,0),n=!1;if(e+5<=t.length&&"async"===t.slice(e,e+5).toLowerCase()&&(n=!0,e=Bn(t,e+5)),e<t.length&&"("===t[e]){const n=Gn(t,e);if(-1!==n){let e=Bn(t,n+1);if(e+1<t.length&&"="===t[e]&&">"===t[e+1])return t}}const r=t.indexOf("(");if(-1===r)return t;const s=Gn(t,r);if(-1===s)return t;return(n?"async ":"")+t.slice(r,s+1)+" => "+t.slice(s+1)}function Bn(t,e){for(;e<t.length&&/\s/.test(t[e]);)e++;return e}function Gn(t,e){let n=0,r=!1,s="";for(let i=e;i<t.length;i++){const e=t[i];if('"'!==e&&"'"!==e&&"`"!==e){if(!r)if("("===e)n++;else if(")"===e&&(n--,0===n))return i}else r?e===s&&(r=!1):(r=!0,s=e)}return-1}const Un=/\\/g,Wn=t=>t.replace(Un,"/"),Kn=(t,e)=>Wn(a.relative(e,t)),Vn=/export\s+default\s+[\w(\[\]\{\})]+/;function qn(t){try{if(!o.existsSync(t))return console.warn(`File not found: ${t}`),!1;const e=o.readFileSync(t,"utf-8");return Vn.test(e)}catch(t){return console.error("Read error:",t),!1}}const Qn=(t,e)=>{const n=new Set;return t.some(t=>!!n.has(t[e])||(n.add(t[e]),!1))};function Yn(t){return t.replace(/"<start>([\s\S]*?)<\/end>"/g,"$1")}const Xn=t=>t.replace(/\[([^\]]+)\]/g,":$1").replace(".tsx","");const Zn={"/home":"/","/root":"/"},zn=(t,e)=>{const n=t.split("/"),r=n[n.length-1];return r.endsWith(e)?r.slice(0,-e.length):r},Jn=t=>{const e=Zn[t];if(e)return e;return"/notfound"===t.toLowerCase()||"/404"===t?"/*":t},tr=t=>{if(t.endsWith(".config.ts")){return"index"===zn(t,".config.ts")?t.replace("index.config.ts","index.ts"):t.slice(0,-10)+".tsx"}return t.replace("index.config.ts","index.ts")},er=t=>{if(t.endsWith(".config.ts")){const e=zn(t,".config.ts"),n=(t=>{const e=t.split("/");return e.pop(),e.join("/")})(t).replace("/src/pages","");return"index"===e?n||"/":n?`${n}/${e}`:`/${e}`}return t.replace("/src/pages","").replace("/index.config.ts","")||"/"},nr=async(t,e)=>{const n=[];for(const[r,s]of((t,e)=>Object.keys(t).map(t=>{const n=(r=t).endsWith(".tsx")?r.slice(0,-4)+".config.ts":r.replace("index.ts","index.config.ts");var r;return[n,e[n]||{}]}))(t,e)){const e=tr(r);if(!t[e])continue;const i=s?.path||er(r)||"/",o=Xn(i),a=Jn(o);n.push({...s,path:a,type:s?.type,isRoot:"/root"===o,element:t[e]})}return n},rr=t=>{if(t.index)return t;if("wrap"!==t.type){const{path:e,children:n,...r}=t;if(Object.keys(r).length>0){return{path:e,children:[{path:"",index:!0,...r},...(n||[]).map(rr)]}}}return t.children?{...t,children:t.children.map(rr)}:t},sr=t=>{const e=(t=>{const e=new Map,n=[],r=new Map,s=t=>{let e=r.get(t);return void 0===e&&(e="/"===t?[]:t.split("/").filter(Boolean),r.set(t,e)),e},i=t.slice().sort((t,e)=>t.path.length-e.path.length);for(const t of i){const r=t.path,i=s(r),o={...t,children:[]};if(e.set(r,o),i.length<=1){n.push(o);continue}const a="/"+i.slice(0,-1).join("/"),u=e.get(a);u?(o.path=i[i.length-1],u.children.push(o)):n.push(o)}return n})(t);return(t=>t.map(rr))(e)},ir=t=>{const{isRoot:e,type:n,children:r,...s}=t;return r?.length?{...s,children:r.map(ir)}:s},or=t=>{const{children:e}=t;if(!e?.length){const{children:e,...n}=t;return n}const n=e.map(or);if("wrap"===t.type)return{...t,children:n};const{path:r,element:s,type:i,children:o,...a}=t;return s?{path:r,children:[{index:!0,element:s,...a},...n]}:{path:r,...a,children:n}},ar=t=>ir(or(t)),ur=t=>sr(t).map(ar),cr=t=>{if(t.some(t=>t.isRoot))return(t=>{let e,n,r;const s=[];for(const i of t)if(i.isRoot){if(e)throw new Error("There cannot be multiple root routes in a route");e=i}else"/"===i.path?n=i:"/*"===i.path?r=i:s.push(i);if(Qn(s,"path"))throw new Error("There cannot be duplicate paths in a route");const i=[n&&{...n,index:!0},...ur(s)].filter(t=>Boolean(t)),o=[];return e&&o.push(ir({...e,children:i})),r&&o.push(ir(r)),o})(t);if(Qn(t,"path"))throw new Error("There cannot be duplicate paths in a route");return ur(t)},lr=(t,e)=>({import:`import ${t} from './${e}'`,component:`<start><${t} /></end>`,lazy:`const ${t} = lazy(() => import('${e}'))`,lazyComponent:`<start><Suspense><${t} /></Suspense></end>`}),pr=(t,e,n,r)=>{let s=t;for(const[t,n]of e){const e=lr(n.componentName,n.path);s=s.replace(t,r?e.lazyComponent:e.component)}for(const[t,e]of n)s=s.replace(t,e);return function(t){let e=t;for(;;){const t=Yn(e);if(t===e)break;e=t}return e}(s)};const fr=/[/\\]/,hr=/[^a-zA-Z0-9]/g,dr=/^(\d)/,_r="index.tsx",gr=t=>t?t.charAt(0).toUpperCase()+t.slice(1).toLowerCase():"";function yr(t){const e=a.extname(t),n=a.basename(t,e),r=a.dirname(t).split(fr).filter(Boolean);"index"!==n&&"Index"!==n&&r.push(n);return r.map(t=>{const e=(t=>t.replace(hr,"_").replace(dr,"_$1"))(t);return e.split("_").map(gr).join("")}).join("")||"Component"}const mr=(t,e,n,r,s,i)=>{const o=(t=>t.includes(_r)?t.replace(_r,"index.ts"):t)(Kn(t,e)),u=Wn(function(t,e){let n=a.resolve(t);if(n.endsWith(".js")||n.endsWith(".jsx")||n.endsWith(".ts")||n.endsWith(".tsx")){const t=n.split("\\");n=t.slice(0,-1).join("\\")}const r=a.resolve(e);return a.relative(n,r)}(n,t)),c=((t,e)=>{if(!e.has(t))return e.add(t),t;let n=1;for(;e.has(`${t}_${n}`);)n++;return`${t}_${n}`})(yr(u),i),l=`element(${u})`;r[`/${o}`]=l,s.set(l,{path:u,componentName:c})},Sr=(t,e,n,r)=>{const s=Kn(t,e);n[`/${s}`]=((t,e,n)=>{const r={};for(const[s,i]of Object.entries(e))if("function"==typeof i){const e=`${t}-${s}`;r[s]=e,n.set(e,`<start>${jn(i.toString())}</end>`)}else r[s]=i;return r})(s,function(t){try{const e=o.readFileSync(t,"utf-8").match(/export\s+default\s+([\s\S]*?)(?=\n\w|$)/);if(!e)return console.warn("No export default found in:",t),null;const n=e[1].trim();try{if(n.startsWith("{"))return new Function(`return ${n}`)();if(n.includes("defineConfig(")){const t=n.match(/defineConfig([\s\S]*)$/);if(t)return new Function(`return ${t[1]}`)()}return null}catch(t){return console.error("Error parsing export default content:",t),null}}catch(t){return console.error("Error reading file:",t),null}}(t),r)};function vr(t,e,n,r,s,i,o,a){const u={},c=t.replace(/^\/+/,""),l=In.sync(c,{cwd:e,absolute:!0,onlyFiles:!0}).filter(qn);for(const t of l)if("module"===s){if(t.includes(".config."))continue;mr(t,n,r,u,i,o)}else Sr(t,n,u,a);return u}exports.generateComponentName=yr,exports.generateReactRoutes=async(t,e,n,r,s)=>{const i=a.resolve(e,t);if(!o.existsSync(i))throw new Error(`[ono-auto-router] Pages directory does not exist: ${i}`);const u=new Map,c=new Set,l=new Map,p=vr("/**/*.{jsx,tsx}",i,e,n,"module",u,c,l),f=vr("/**/*.config.{js,ts,jsx,tsx}",i,e,n,"config",u,c,l),h=await nr(p,f),d=cr(h),_=pr(function(t,e,n,r){const s=n.length>0?`\n${n.join("\n")}\n`:"";return`// Auto-generated by ono-auto-router\n${r?"import type { RouteObject } from 'react-router-dom'":""}\n${e.join("\n")}\n${r?"\ntype PageConfig = Partial<\n Omit<RouteObject, 'path' | 'Component' | 'element' | 'children'> & {\n path: string\n type?: 'single' | 'wrap'\n }\n>\n":""}${r?"\nexport const defineConfig = (config: PageConfig) => config":""}\n${s}\nexport const routes${r?": RouteObject[]":""} = ${JSON.stringify(t,null,2)}\n`}(d,((t,e)=>{if(t)return["import { lazy, Suspense } from 'react'"];const n=[];for(const t of e.values())n.push(lr(t.componentName,t.path).import);return n})(r,u),((t,e)=>{if(!t)return[];const n=[];for(const t of e.values())n.push(lr(t.componentName,t.path).lazy);return n})(r,u),s),u,l,r);!async function(t,e){const n=a.dirname(t);await o.promises.mkdir(n,{recursive:!0}),await o.promises.writeFile(t,e,"utf-8")}(n,_)};