@visulima/vis 1.0.0-alpha.29 → 1.0.0-alpha.30

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.
Files changed (118) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/bin.js +1 -1
  3. package/dist/binx.js +1 -1
  4. package/dist/packem_chunks/bin.js +368 -367
  5. package/dist/packem_chunks/bloom-status.js +1 -1
  6. package/dist/packem_chunks/bloom-sync.js +1 -1
  7. package/dist/packem_chunks/config.js +15 -15
  8. package/dist/packem_chunks/doctor-probe.js +1 -1
  9. package/dist/packem_chunks/fix.js +1 -1
  10. package/dist/packem_chunks/handler.js +1 -1
  11. package/dist/packem_chunks/handler10.js +1 -1
  12. package/dist/packem_chunks/handler11.js +4 -4
  13. package/dist/packem_chunks/handler12.js +1 -1
  14. package/dist/packem_chunks/handler13.js +2 -2
  15. package/dist/packem_chunks/handler14.js +1 -1
  16. package/dist/packem_chunks/handler15.js +1 -1
  17. package/dist/packem_chunks/handler16.js +1 -1
  18. package/dist/packem_chunks/handler17.js +1 -1
  19. package/dist/packem_chunks/handler18.js +1 -1
  20. package/dist/packem_chunks/handler19.js +1 -1
  21. package/dist/packem_chunks/handler2.js +1 -1
  22. package/dist/packem_chunks/handler20.js +1 -1
  23. package/dist/packem_chunks/handler21.js +2 -2
  24. package/dist/packem_chunks/handler22.js +2 -2
  25. package/dist/packem_chunks/handler23.js +1 -1
  26. package/dist/packem_chunks/handler25.js +1 -1
  27. package/dist/packem_chunks/handler26.js +1 -1
  28. package/dist/packem_chunks/handler27.js +1 -1
  29. package/dist/packem_chunks/handler28.js +1 -1
  30. package/dist/packem_chunks/handler29.js +1 -1
  31. package/dist/packem_chunks/handler30.js +7 -7
  32. package/dist/packem_chunks/handler32.js +1 -1
  33. package/dist/packem_chunks/handler33.js +1 -1
  34. package/dist/packem_chunks/handler34.js +4 -4
  35. package/dist/packem_chunks/handler35.js +1 -1
  36. package/dist/packem_chunks/handler36.js +1 -1
  37. package/dist/packem_chunks/handler37.js +5 -5
  38. package/dist/packem_chunks/handler38.js +4 -4
  39. package/dist/packem_chunks/handler39.js +1 -1
  40. package/dist/packem_chunks/handler4.js +1 -1
  41. package/dist/packem_chunks/handler40.js +2 -2
  42. package/dist/packem_chunks/handler41.js +6 -6
  43. package/dist/packem_chunks/handler42.js +13 -13
  44. package/dist/packem_chunks/handler43.js +5 -5
  45. package/dist/packem_chunks/handler44.js +5 -5
  46. package/dist/packem_chunks/handler45.js +1 -1
  47. package/dist/packem_chunks/handler46.js +12 -12
  48. package/dist/packem_chunks/handler47.js +40 -40
  49. package/dist/packem_chunks/handler48.js +15 -15
  50. package/dist/packem_chunks/handler49.js +3 -3
  51. package/dist/packem_chunks/handler5.js +1 -1
  52. package/dist/packem_chunks/handler50.js +9 -9
  53. package/dist/packem_chunks/handler51.js +1 -1
  54. package/dist/packem_chunks/handler52.js +1 -1
  55. package/dist/packem_chunks/handler6.js +1 -1
  56. package/dist/packem_chunks/handler7.js +1 -1
  57. package/dist/packem_chunks/handler8.js +1 -1
  58. package/dist/packem_chunks/handler9.js +1 -1
  59. package/dist/packem_chunks/heal-accept.js +1 -1
  60. package/dist/packem_chunks/heal.js +1 -1
  61. package/dist/packem_chunks/help-command.js +7 -7
  62. package/dist/packem_chunks/index.js +6 -6
  63. package/dist/packem_chunks/keys-refresh.js +1 -1
  64. package/dist/packem_chunks/list.js +2 -2
  65. package/dist/packem_chunks/loader.js +1 -1
  66. package/dist/packem_chunks/loader2.js +1 -1
  67. package/dist/packem_chunks/prune.js +1 -1
  68. package/dist/packem_chunks/run.js +1 -1
  69. package/dist/packem_chunks/status.js +1 -1
  70. package/dist/packem_chunks/sync.js +1 -1
  71. package/dist/packem_chunks/sync2.js +1 -1
  72. package/dist/packem_chunks/tripwire.js +2 -2
  73. package/dist/packem_chunks/verify-lockfile.js +1 -1
  74. package/dist/packem_shared/Table-DoSoazT6-DwnyTUsA.js +12 -0
  75. package/dist/packem_shared/{advisories-DpgSuWDH.js → advisories-BxXiKFbL.js} +1 -1
  76. package/dist/packem_shared/{affected-shas-BkXXecyi.js → affected-shas-BdnlfiV1.js} +1 -1
  77. package/dist/packem_shared/{ai-fix-CfFWatGY.js → ai-fix-BkPUHA0z.js} +1 -1
  78. package/dist/packem_shared/{applyDefaults-DLvOqXGX.js → applyDefaults-BogleaFi.js} +1 -1
  79. package/dist/packem_shared/build-scripts-DE6U8jVq.js +1 -0
  80. package/dist/packem_shared/{cyclonedx-B04lIvwu.js → cyclonedx-BpGVHqSW.js} +1 -1
  81. package/dist/packem_shared/{dependency-scan-B9wTcLxf.js → dependency-scan-BUbOcMwX.js} +1 -1
  82. package/dist/packem_shared/{docker-DxA80dRx.js → docker-CTE3s4LW.js} +1 -1
  83. package/dist/packem_shared/{failure-log-n3j_-w8s.js → failure-log-34Wl3npC.js} +1 -1
  84. package/dist/packem_shared/glob-D_7bct6p-D8itOHsr.js +1 -0
  85. package/dist/packem_shared/{index-BfG9_znI.js → index-D1xC1Y_R.js} +1 -1
  86. package/dist/packem_shared/index-hoWfZmNo.js +30 -0
  87. package/dist/packem_shared/{lifecycle-NHIKDiCh.js → lifecycle-CXaqPGAQ.js} +2 -2
  88. package/dist/packem_shared/lockfile-CrT86D6d.js +1 -0
  89. package/dist/packem_shared/{lockfile-DAuTDwow.js → lockfile-Cu2BH6bl.js} +1 -1
  90. package/dist/packem_shared/{manifests-B7wUR3Rk.js → manifests-BzWpKW8F.js} +1 -1
  91. package/dist/packem_shared/{min-release-age-YyNI7gqV.js → min-release-age-BPVXwPUg.js} +2 -2
  92. package/dist/packem_shared/{native-config-sync-CgRIIRZV.js → native-config-sync-BRZZetn3.js} +8 -8
  93. package/dist/packem_shared/{osv-bloom-BQSIHt5h.js → osv-bloom-DSZcHLsM.js} +1 -1
  94. package/dist/packem_shared/{pm-runner-Ta_yz2uP.js → pm-runner-DmKT2FqF.js} +1 -1
  95. package/dist/packem_shared/{provenance-DoEp2uOo.js → provenance-DkCA8BrN.js} +1 -1
  96. package/dist/packem_shared/readFileSync-DseCu8sg-DEq4Fn3a.js +1 -0
  97. package/dist/packem_shared/{registry-keys-CD1xHavV.js → registry-keys-Mixm4eAY.js} +1 -1
  98. package/dist/packem_shared/{resolve-explicit-DpSc7RN2.js → resolve-explicit-D5E72FfN.js} +1 -1
  99. package/dist/packem_shared/runtime-check-CilFOqUU.js +1 -0
  100. package/dist/packem_shared/{s1ngularity-CIX7UcT5.js → s1ngularity-Qxc6tRRI.js} +1 -1
  101. package/dist/packem_shared/{scan-progress-CTVVf9WW.js → scan-progress-DVtCtI2z.js} +1 -1
  102. package/dist/packem_shared/{selectors-BU8aTRQm.js → selectors-DkgYFzdq.js} +1 -1
  103. package/dist/packem_shared/{signatures-BHM7cnqB.js → signatures-byuFrtAH.js} +1 -1
  104. package/dist/packem_shared/{toolchain-juKl-WgV.js → toolchain-DoG6b_G_.js} +2 -2
  105. package/dist/packem_shared/{typosquats-DRKU6d2S.js → typosquats-BiDxQj7R.js} +1 -1
  106. package/dist/packem_shared/{verify-DA80ja1b.js → verify-cLcZwKqe.js} +1 -1
  107. package/dist/packem_shared/{watch-DdR-pFzX.js → watch-DEL0yol9.js} +1 -1
  108. package/dist/packem_shared/{watch-loop-C8csFvRU.js → watch-loop-C31Ar7BX.js} +3 -3
  109. package/index.d.ts +201 -201
  110. package/index.js +26 -26
  111. package/package.json +10 -10
  112. package/dist/packem_shared/Table-3pFgIUZ2-DABgc6rj.js +0 -12
  113. package/dist/packem_shared/build-scripts-D-ysm_bS.js +0 -1
  114. package/dist/packem_shared/glob-MHJQjR39-CQ2GC0b_.js +0 -1
  115. package/dist/packem_shared/index-BDF8gawl.js +0 -29
  116. package/dist/packem_shared/lockfile-CoeFxWAv.js +0 -1
  117. package/dist/packem_shared/readFileSync-4c_c6Qey-6SWMDNdw.js +0 -1
  118. package/dist/packem_shared/runtime-check-Cbtb_Utb.js +0 -1
@@ -1 +0,0 @@
1
- var rr=Object.defineProperty;var d=(t,e)=>rr(t,"name",{value:e,configurable:!0});import{createRequire as nr}from"node:module";const sr=nr(import.meta.url),Ht=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,or=d(t=>{if(typeof Ht<"u"&&Ht.versions&&Ht.versions.node){const[e,r]=Ht.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Ht.getBuiltinModule(t)}return sr(t)},"__cjs_getBuiltinModule"),{createRequire:ir}=or("node:module");var ur=Object.defineProperty,kt=d((t,e)=>ur(t,"name",{value:e,configurable:!0}),"r$1"),ar=Object.defineProperty,wt=kt((t,e)=>ar(t,"name",{value:e,configurable:!0}),"r"),lr=Object.defineProperty,Ot=wt((t,e)=>lr(t,"name",{value:e,configurable:!0}),"t");function Qt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}d(Qt,"p");kt(Qt,"f");wt(Qt,"getDefaultExportFromCjs");Ot(Qt,"getDefaultExportFromCjs");function Se(t){return t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}d(Se,"f$1");kt(Se,"l");wt(Se,"getDefaultExportFromNamespaceIfPresent");Ot(Se,"getDefaultExportFromNamespaceIfPresent");function xe(t){return t&&Object.prototype.hasOwnProperty.call(t,"default")&&Object.keys(t).length===1?t.default:t}d(xe,"l$1");kt(xe,"s");wt(xe,"getDefaultExportFromNamespaceIfNotNamed");Ot(xe,"getDefaultExportFromNamespaceIfNotNamed");function Ce(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var r=Ot(wt(kt(d(function s(){var l=!1;try{l=this instanceof s}catch{}return l?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)},"u"),"n"),"a"),"a");r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(s){var l=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(r,s,l.get?l:{enumerable:!0,get:Ot(function(){return t[s]},"get")})}),r}d(Ce,"s");kt(Ce,"m");wt(Ce,"getAugmentedNamespace");Ot(Ce,"getAugmentedNamespace");var cr=Object.defineProperty,_t=d((t,e)=>cr(t,"name",{value:e,configurable:!0}),"lt$1"),pr=Object.defineProperty,at=_t((t,e)=>pr(t,"name",{value:e,configurable:!0}),"ut"),De={},ve,Ne;function Pt(){if(Ne)return ve;Ne=1;const t="[^\\\\/]",e=Symbol("unignore"),r="\\.",s="\\+",l="\\?",a="\\/",c="(?=.)",y="[^/]",p=`(?:${a}|$)`,b=`(?:^|${a})`,R=`${r}{1,2}${p}`,T=`(?!${r})`,H=`(?!${b}${R})`,k=`(?!${r}{0,1}${p})`,D=`(?!${R})`,x=`[^.${a}]`,w=`${y}*?`,it="/",F={DOT_LITERAL:r,PLUS_LITERAL:s,QMARK_LITERAL:l,SLASH_LITERAL:a,ONE_CHAR:c,QMARK:y,END_ANCHOR:p,DOTS_SLASH:R,NO_DOT:T,NO_DOTS:H,NO_DOT_SLASH:k,NO_DOTS_SLASH:D,QMARK_NO_DOT:x,STAR:w,START_ANCHOR:b,SEP:it},K={...F,SLASH_LITERAL:"[\\\\/]",QMARK:t,STAR:`${t}*?`,DOTS_SLASH:`${r}{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!${r})`,NO_DOTS:`(?!(?:^|[\\\\/])${r}{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!${r}{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!${r}{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},h={__proto__:null,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"};return ve={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:h,UNIGNORE:e,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(A){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${A.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(A){return A===!0?K:F}},ve}d(Pt,"_t$1");_t(Pt,"bt");at(Pt,"requireConstants");var Ie;function Tt(){return Ie||(Ie=1,(function(t){const{REGEX_BACKSLASH:e,REGEX_REMOVE_BACKSLASH:r,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:l}=Pt();t.isObject=a=>a!==null&&typeof a=="object"&&!Array.isArray(a),t.hasRegexChars=a=>s.test(a),t.isRegexChar=a=>a.length===1&&t.hasRegexChars(a),t.escapeRegex=a=>a.replace(l,"\\$1"),t.toPosixSlashes=a=>a.replace(e,"/"),t.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){const a=navigator.platform.toLowerCase();return a==="win32"||a==="windows"}return process.platform?process.platform==="win32":!1},t.removeBackslashes=a=>a.replace(r,c=>c==="\\"?"":c),t.escapeLast=(a,c,y)=>{const p=a.lastIndexOf(c,y);return p===-1?a:a[p-1]==="\\"?t.escapeLast(a,c,p-1):`${a.slice(0,p)}\\${a.slice(p)}`},t.removePrefix=(a,c={})=>{let y=a;return y.startsWith("./")&&(y=y.slice(2),c.prefix="./"),y},t.wrapOutput=(a,c={},y={})=>{const p=y.contains?"":"^",b=y.contains?"":"$";let R=`${p}(?:${a})${b}`;return c.negated===!0&&(R=`(?:^(?!${R}).*$)`),R},t.basename=(a,{windows:c}={})=>{const y=a.split(c?/[\\/]/:"/"),p=y[y.length-1];return p===""?y[y.length-2]:p}})(De)),De}d(Tt,"Et$1");_t(Tt,"yt");at(Tt,"requireUtils");var _e,Fe;function Oe(){if(Fe)return _e;Fe=1;var t=Object.defineProperty,e=at((h,A)=>t(h,"name",{value:A,configurable:!0}),"k");const r=Tt(),{CHAR_ASTERISK:s,CHAR_AT:l,CHAR_BACKWARD_SLASH:a,CHAR_COMMA:c,CHAR_DOT:y,CHAR_EXCLAMATION_MARK:p,CHAR_FORWARD_SLASH:b,CHAR_LEFT_CURLY_BRACE:R,CHAR_LEFT_PARENTHESES:T,CHAR_LEFT_SQUARE_BRACKET:H,CHAR_PLUS:k,CHAR_QUESTION_MARK:D,CHAR_RIGHT_CURLY_BRACE:x,CHAR_RIGHT_PARENTHESES:w,CHAR_RIGHT_SQUARE_BRACKET:it}=Pt(),F=e(h=>h===b||h===a,"isPathSeparator"),K=e(h=>{h.isPrefix!==!0&&(h.depth=h.isGlobstar?1/0:1)},"depth");return _e=e((h,A)=>{const n=A||{},E=h.length-1,C=n.parts===!0||n.scanToEnd===!0,m=[],v=[],O=[];let Z=h,rt=-1,Q=0,lt=0,tt=!1,ct=!1,U=!1,yt=!1,mt=!1,pt=!1,G=!1,ht=!1,Rt=!1,et=!1,J=0,st,P,I={value:"",depth:0,isGlob:!1};const u=e(()=>rt>=E,"eos"),nt=e(()=>Z.charCodeAt(rt+1),"peek"),z=e(()=>(st=P,Z.charCodeAt(++rt)),"advance");for(;rt<E;){P=z();let M;if(P===a){G=I.backslashes=!0,P=z(),P===R&&(pt=!0);continue}if(pt===!0||P===R){for(J++;u()!==!0&&(P=z());){if(P===a){G=I.backslashes=!0,z();continue}if(P===R){J++;continue}if(pt!==!0&&P===y&&(P=z())===y){if(tt=I.isBrace=!0,U=I.isGlob=!0,et=!0,C===!0)continue;break}if(pt!==!0&&P===c){if(tt=I.isBrace=!0,U=I.isGlob=!0,et=!0,C===!0)continue;break}if(P===x&&(J--,J===0)){pt=!1,tt=I.isBrace=!0,et=!0;break}}if(C===!0)continue;break}if(P===b){if(m.push(rt),v.push(I),I={value:"",depth:0,isGlob:!1},et===!0)continue;if(st===y&&rt===Q+1){Q+=2;continue}lt=rt+1;continue}if(n.noext!==!0&&(P===k||P===l||P===s||P===D||P===p)&&nt()===T){if(U=I.isGlob=!0,yt=I.isExtglob=!0,et=!0,P===p&&rt===Q&&(Rt=!0),C===!0){for(;u()!==!0&&(P=z());){if(P===a){G=I.backslashes=!0,P=z();continue}if(P===w){U=I.isGlob=!0,et=!0;break}}continue}break}if(P===s){if(st===s&&(mt=I.isGlobstar=!0),U=I.isGlob=!0,et=!0,C===!0)continue;break}if(P===D){if(U=I.isGlob=!0,et=!0,C===!0)continue;break}if(P===H){for(;u()!==!0&&(M=z());){if(M===a){G=I.backslashes=!0,z();continue}if(M===it){ct=I.isBracket=!0,U=I.isGlob=!0,et=!0;break}}if(C===!0)continue;break}if(n.nonegate!==!0&&P===p&&rt===Q){ht=I.negated=!0,Q++;continue}if(n.noparen!==!0&&P===T){if(U=I.isGlob=!0,C===!0){for(;u()!==!0&&(P=z());){if(P===T){G=I.backslashes=!0,P=z();continue}if(P===w){et=!0;break}}continue}break}if(U===!0){if(et=!0,C===!0)continue;break}}n.noext===!0&&(yt=!1,U=!1);let X=Z,o="",i="";Q>0&&(o=Z.slice(0,Q),Z=Z.slice(Q),lt-=Q),X&&U===!0&&lt>0?(X=Z.slice(0,lt),i=Z.slice(lt)):U===!0?(X="",i=Z):X=Z,X&&X!==""&&X!=="/"&&X!==Z&&F(X.charCodeAt(X.length-1))&&(X=X.slice(0,-1)),n.unescape===!0&&(i&&(i=r.removeBackslashes(i)),X&&G===!0&&(X=r.removeBackslashes(X)));const ut={prefix:o,input:h,start:Q,base:X,glob:i,isBrace:tt,isBracket:ct,isGlob:U,isExtglob:yt,isGlobstar:mt,negated:ht,negatedExtglob:Rt};if(n.tokens===!0&&(ut.maxDepth=0,F(P)||v.push(I),ut.tokens=v),n.parts===!0||n.tokens===!0){let M;for(let q=0;q<m.length;q++){const dt=M?M+1:Q,ot=m[q],bt=h.slice(dt,ot);n.tokens&&(q===0&&Q!==0?(v[q].isPrefix=!0,v[q].value=o):v[q].value=bt,K(v[q]),ut.maxDepth+=v[q].depth),(q!==0||bt!=="")&&O.push(bt),M=ot}if(M&&M+1<h.length){const q=h.slice(M+1);O.push(q),n.tokens&&(v[v.length-1].value=q,K(v[v.length-1]),ut.maxDepth+=v[v.length-1].depth)}ut.slashes=m,ut.parts=O}return ut},"scan"),_e}d(Oe,"Nt$1");_t(Oe,"wt");at(Oe,"requireScan");var me,Me;function ke(){if(Me)return me;Me=1;var t=Object.defineProperty,e=at((h,A)=>t(h,"name",{value:A,configurable:!0}),"y");const r=Pt(),s=Tt(),{MAX_LENGTH:l,POSIX_REGEX_SOURCE:a,REGEX_NON_SPECIAL_CHARS:c,REGEX_SPECIAL_CHARS_BACKREF:y,REPLACEMENTS:p}=r,b=e((h,A)=>typeof A.expandRange=="function"?A.expandRange(...h,A):(h.sort(),`[${h.join("-")}]`),"expandRange"),R=e((h,A)=>`Missing ${h}: "${A}" - use "\\\\${A}" to match literal characters`,"syntaxError"),T=e(h=>{const A=[];let n=0,E=0,C=0,m="",v=!1;for(const O of h){if(v===!0){m+=O,v=!1;continue}if(O==="\\"){m+=O,v=!0;continue}if(O==='"'){C=C===1?0:1,m+=O;continue}if(C===0){if(O==="[")n++;else if(O==="]"&&n>0)n--;else if(n===0){if(O==="(")E++;else if(O===")"&&E>0)E--;else if(O==="|"&&E===0){A.push(m),m="";continue}}}m+=O}return A.push(m),A},"splitTopLevel"),H=e(h=>{let A=!1;for(const n of h){if(A===!0){A=!1;continue}if(n==="\\"){A=!0;continue}if(/[?*+@!()[\]{}]/.test(n))return!1}return!0},"isPlainBranch"),k=e(h=>{let A=h.trim(),n=!0;for(;n===!0;)n=!1,/^@\([^\\()[\]{}|]+\)$/.test(A)&&(A=A.slice(2,-1),n=!0);if(H(A))return A.replace(/\\(.)/g,"$1")},"normalizeSimpleBranch"),D=e(h=>{const A=h.map(k).filter(Boolean);for(let n=0;n<A.length;n++)for(let E=n+1;E<A.length;E++){const C=A[n],m=A[E],v=C[0];if(!(!v||C!==v.repeat(C.length)||m!==v.repeat(m.length))&&(C===m||C.startsWith(m)||m.startsWith(C)))return!0}return!1},"hasRepeatedCharPrefixOverlap"),x=e((h,A=!0)=>{if(h[0]!=="+"&&h[0]!=="*"||h[1]!=="(")return;let n=0,E=0,C=0,m=!1;for(let v=1;v<h.length;v++){const O=h[v];if(m===!0){m=!1;continue}if(O==="\\"){m=!0;continue}if(O==='"'){C=C===1?0:1;continue}if(C!==1){if(O==="["){n++;continue}if(O==="]"&&n>0){n--;continue}if(!(n>0)){if(O==="("){E++;continue}if(O===")"&&(E--,E===0))return A===!0&&v!==h.length-1?void 0:{type:h[0],body:h.slice(2,v),end:v}}}}},"parseRepeatedExtglob"),w=e(h=>{let A=0;const n=[];for(;A<h.length;){const E=x(h.slice(A),!1);if(!E||E.type!=="*")return;const C=T(E.body).map(v=>v.trim());if(C.length!==1)return;const m=k(C[0]);if(!m||m.length!==1)return;n.push(m),A+=E.end+1}return n.length<1?void 0:`${n.length===1?s.escapeRegex(n[0]):`[${n.map(E=>s.escapeRegex(E)).join("")}]`}*`},"getStarExtglobSequenceOutput"),it=e(h=>{let A=0,n=h.trim(),E=x(n);for(;E;)A++,n=E.body.trim(),E=x(n);return A},"repeatedExtglobRecursion"),F=e((h,A)=>{if(A.maxExtglobRecursion===!1)return{risky:!1};const n=typeof A.maxExtglobRecursion=="number"?A.maxExtglobRecursion:r.DEFAULT_MAX_EXTGLOB_RECURSION,E=T(h).map(C=>C.trim());if(E.length>1&&(E.some(C=>C==="")||E.some(C=>/^[*?]+$/.test(C))||D(E)))return{risky:!0};for(const C of E){const m=w(C);if(m)return{risky:!0,safeOutput:m};if(it(C)>n)return{risky:!0}}return{risky:!1}},"analyzeRepeatedExtglob"),K=e((h,A)=>{if(typeof h!="string")throw new TypeError("Expected a string");h=p[h]||h;const n={...A},E=typeof n.maxLength=="number"?Math.min(l,n.maxLength):l;let C=h.length;if(C>E)throw new SyntaxError(`Input length: ${C}, exceeds maximum allowed length: ${E}`);const m={type:"bos",value:"",output:n.prepend||""},v=[m],O=n.capture?"":"?:",Z=r.globChars(n.windows),rt=r.extglobChars(Z),{DOT_LITERAL:Q,PLUS_LITERAL:lt,SLASH_LITERAL:tt,ONE_CHAR:ct,DOTS_SLASH:U,NO_DOT:yt,NO_DOT_SLASH:mt,NO_DOTS_SLASH:pt,QMARK:G,QMARK_NO_DOT:ht,STAR:Rt,START_ANCHOR:et}=Z,J=e(g=>`(${O}(?:(?!${et}${g.dot?U:Q}).)*?)`,"globstar"),st=n.dot?"":yt,P=n.dot?G:ht;let I=n.bash===!0?J(n):Rt;n.capture&&(I=`(${I})`),typeof n.noext=="boolean"&&(n.noextglob=n.noext);const u={input:h,index:-1,start:0,dot:n.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:v};h=s.removePrefix(h,u),C=h.length;const nt=[],z=[],X=[];let o=m,i;const ut=e(()=>u.index===C-1,"eos"),M=u.peek=(g=1)=>h[u.index+g],q=u.advance=()=>h[++u.index]||"",dt=e(()=>h.slice(u.index+1),"remaining"),ot=e((g="",j=0)=>{u.consumed+=g,u.index+=j},"consume"),bt=e(g=>{u.output+=g.output!=null?g.output:g.value,ot(g.value)},"append"),tr=e(()=>{let g=1;for(;M()==="!"&&(M(2)!=="("||M(3)==="?");)q(),u.start++,g++;return g%2===0?!1:(u.negated=!0,u.start++,!0)},"negate"),Wt=e(g=>{u[g]++,X.push(g)},"increment"),At=e(g=>{u[g]--,X.pop()},"decrement"),L=e(g=>{if(o.type==="globstar"){const j=u.braces>0&&(g.type==="comma"||g.type==="brace"),f=g.extglob===!0||nt.length&&(g.type==="pipe"||g.type==="paren");g.type!=="slash"&&g.type!=="paren"&&!j&&!f&&(u.output=u.output.slice(0,-o.output.length),o.type="star",o.value="*",o.output=I,u.output+=o.output)}if(nt.length&&g.type!=="paren"&&(nt[nt.length-1].inner+=g.value),(g.value||g.output)&&bt(g),o&&o.type==="text"&&g.type==="text"){o.output=(o.output||o.value)+g.value,o.value+=g.value;return}g.prev=o,v.push(g),o=g},"push"),Xt=e((g,j)=>{const f={...rt[j],conditions:1,inner:""};f.prev=o,f.parens=u.parens,f.output=u.output,f.startIndex=u.index,f.tokensIndex=v.length;const N=(n.capture?"(":"")+f.open;Wt("parens"),L({type:g,value:j,output:u.output?"":ct}),L({type:"paren",extglob:!0,value:q(),output:N}),nt.push(f)},"extglobOpen"),er=e(g=>{const j=h.slice(g.startIndex,u.index+1),f=h.slice(g.startIndex+2,u.index),N=F(f,n);if((g.type==="plus"||g.type==="star")&&N.risky){const B=N.safeOutput?(g.output?"":ct)+(n.capture?`(${N.safeOutput})`:N.safeOutput):void 0,ft=v[g.tokensIndex];ft.type="text",ft.value=j,ft.output=B||s.escapeRegex(j);for(let gt=g.tokensIndex+1;gt<v.length;gt++)v[gt].value="",v[gt].output="",delete v[gt].suffix;u.output=g.output+ft.output,u.backtrack=!0,L({type:"paren",extglob:!0,value:i,output:""}),At("parens");return}let W=g.close+(n.capture?")":""),Y;if(g.type==="negate"){let B=I;if(g.inner&&g.inner.length>1&&g.inner.includes("/")&&(B=J(n)),(B!==I||ut()||/^\)+$/.test(dt()))&&(W=g.close=`)$))${B}`),g.inner.includes("*")&&(Y=dt())&&/^\.[^\\/.]+$/.test(Y)){const ft=K(Y,{...A,fastpaths:!1}).output;W=g.close=`)${ft})${B})`}g.prev.type==="bos"&&(u.negatedExtglob=!0)}L({type:"paren",extglob:!0,value:i,output:W}),At("parens")},"extglobClose");if(n.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(h)){let g=!1,j=h.replace(y,(f,N,W,Y,B,ft)=>Y==="\\"?(g=!0,f):Y==="?"?N?N+Y+(B?G.repeat(B.length):""):ft===0?P+(B?G.repeat(B.length):""):G.repeat(W.length):Y==="."?Q.repeat(W.length):Y==="*"?N?N+Y+(B?I:""):I:N?f:`\\${f}`);return g===!0&&(n.unescape===!0?j=j.replace(/\\/g,""):j=j.replace(/\\+/g,f=>f.length%2===0?"\\\\":f?"\\":"")),j===h&&n.contains===!0?(u.output=h,u):(u.output=s.wrapOutput(j,u,A),u)}for(;!ut();){if(i=q(),i==="\0")continue;if(i==="\\"){const f=M();if(f==="/"&&n.bash!==!0||f==="."||f===";")continue;if(!f){i+="\\",L({type:"text",value:i});continue}const N=/^\\+/.exec(dt());let W=0;if(N&&N[0].length>2&&(W=N[0].length,u.index+=W,W%2!==0&&(i+="\\")),n.unescape===!0?i=q():i+=q(),u.brackets===0){L({type:"text",value:i});continue}}if(u.brackets>0&&(i!=="]"||o.value==="["||o.value==="[^")){if(n.posix!==!1&&i===":"){const f=o.value.slice(1);if(f.includes("[")&&(o.posix=!0,f.includes(":"))){const N=o.value.lastIndexOf("["),W=o.value.slice(0,N),Y=o.value.slice(N+2),B=a[Y];if(B){o.value=W+B,u.backtrack=!0,q(),!m.output&&v.indexOf(o)===1&&(m.output=ct);continue}}}(i==="["&&M()!==":"||i==="-"&&M()==="]")&&(i=`\\${i}`),i==="]"&&(o.value==="["||o.value==="[^")&&(i=`\\${i}`),n.posix===!0&&i==="!"&&o.value==="["&&(i="^"),o.value+=i,bt({value:i});continue}if(u.quotes===1&&i!=='"'){i=s.escapeRegex(i),o.value+=i,bt({value:i});continue}if(i==='"'){u.quotes=u.quotes===1?0:1,n.keepQuotes===!0&&L({type:"text",value:i});continue}if(i==="("){Wt("parens"),L({type:"paren",value:i});continue}if(i===")"){if(u.parens===0&&n.strictBrackets===!0)throw new SyntaxError(R("opening","("));const f=nt[nt.length-1];if(f&&u.parens===f.parens+1){er(nt.pop());continue}L({type:"paren",value:i,output:u.parens?")":"\\)"}),At("parens");continue}if(i==="["){if(n.nobracket===!0||!dt().includes("]")){if(n.nobracket!==!0&&n.strictBrackets===!0)throw new SyntaxError(R("closing","]"));i=`\\${i}`}else Wt("brackets");L({type:"bracket",value:i});continue}if(i==="]"){if(n.nobracket===!0||o&&o.type==="bracket"&&o.value.length===1){L({type:"text",value:i,output:`\\${i}`});continue}if(u.brackets===0){if(n.strictBrackets===!0)throw new SyntaxError(R("opening","["));L({type:"text",value:i,output:`\\${i}`});continue}At("brackets");const f=o.value.slice(1);if(o.posix!==!0&&f[0]==="^"&&!f.includes("/")&&(i=`/${i}`),o.value+=i,bt({value:i}),n.literalBrackets===!1||s.hasRegexChars(f))continue;const N=s.escapeRegex(o.value);if(u.output=u.output.slice(0,-o.value.length),n.literalBrackets===!0){u.output+=N,o.value=N;continue}o.value=`(${O}${N}|${o.value})`,u.output+=o.value;continue}if(i==="{"&&n.nobrace!==!0){Wt("braces");const f={type:"brace",value:i,output:"(",outputIndex:u.output.length,tokensIndex:u.tokens.length};z.push(f),L(f);continue}if(i==="}"){const f=z[z.length-1];if(n.nobrace===!0||!f){L({type:"text",value:i,output:i});continue}let N=")";if(f.dots===!0){const W=v.slice(),Y=[];for(let B=W.length-1;B>=0&&(v.pop(),W[B].type!=="brace");B--)W[B].type!=="dots"&&Y.unshift(W[B].value);N=b(Y,n),u.backtrack=!0}if(f.comma!==!0&&f.dots!==!0){const W=u.output.slice(0,f.outputIndex),Y=u.tokens.slice(f.tokensIndex);f.value=f.output="\\{",i=N="\\}",u.output=W;for(const B of Y)u.output+=B.output||B.value}L({type:"brace",value:i,output:N}),At("braces"),z.pop();continue}if(i==="|"){nt.length>0&&nt[nt.length-1].conditions++,L({type:"text",value:i});continue}if(i===","){let f=i;const N=z[z.length-1];N&&X[X.length-1]==="braces"&&(N.comma=!0,f="|"),L({type:"comma",value:i,output:f});continue}if(i==="/"){if(o.type==="dot"&&u.index===u.start+1){u.start=u.index+1,u.consumed="",u.output="",v.pop(),o=m;continue}L({type:"slash",value:i,output:tt});continue}if(i==="."){if(u.braces>0&&o.type==="dot"){o.value==="."&&(o.output=Q);const f=z[z.length-1];o.type="dots",o.output+=i,o.value+=i,f.dots=!0;continue}if(u.braces+u.parens===0&&o.type!=="bos"&&o.type!=="slash"){L({type:"text",value:i,output:Q});continue}L({type:"dot",value:i,output:Q});continue}if(i==="?"){if(!(o&&o.value==="(")&&n.noextglob!==!0&&M()==="("&&M(2)!=="?"){Xt("qmark",i);continue}if(o&&o.type==="paren"){const f=M();let N=i;(o.value==="("&&!/[!=<:]/.test(f)||f==="<"&&!/<([!=]|\w+>)/.test(dt()))&&(N=`\\${i}`),L({type:"text",value:i,output:N});continue}if(n.dot!==!0&&(o.type==="slash"||o.type==="bos")){L({type:"qmark",value:i,output:ht});continue}L({type:"qmark",value:i,output:G});continue}if(i==="!"){if(n.noextglob!==!0&&M()==="("&&(M(2)!=="?"||!/[!=<:]/.test(M(3)))){Xt("negate",i);continue}if(n.nonegate!==!0&&u.index===0){tr();continue}}if(i==="+"){if(n.noextglob!==!0&&M()==="("&&M(2)!=="?"){Xt("plus",i);continue}if(o&&o.value==="("||n.regex===!1){L({type:"plus",value:i,output:lt});continue}if(o&&(o.type==="bracket"||o.type==="paren"||o.type==="brace")||u.parens>0){L({type:"plus",value:i});continue}L({type:"plus",value:lt});continue}if(i==="@"){if(n.noextglob!==!0&&M()==="("&&M(2)!=="?"){L({type:"at",extglob:!0,value:i,output:""});continue}L({type:"text",value:i});continue}if(i!=="*"){(i==="$"||i==="^")&&(i=`\\${i}`);const f=c.exec(dt());f&&(i+=f[0],u.index+=f[0].length),L({type:"text",value:i});continue}if(o&&(o.type==="globstar"||o.star===!0)){o.type="star",o.star=!0,o.value+=i,o.output=I,u.backtrack=!0,u.globstar=!0,ot(i);continue}let g=dt();if(n.noextglob!==!0&&/^\([^?]/.test(g)){Xt("star",i);continue}if(o.type==="star"){if(n.noglobstar===!0){ot(i);continue}const f=o.prev,N=f.prev,W=f.type==="slash"||f.type==="bos",Y=N&&(N.type==="star"||N.type==="globstar");if(n.bash===!0&&(!W||g[0]&&g[0]!=="/")){L({type:"star",value:i,output:""});continue}const B=u.braces>0&&(f.type==="comma"||f.type==="brace"),ft=nt.length&&(f.type==="pipe"||f.type==="paren");if(!W&&f.type!=="paren"&&!B&&!ft){L({type:"star",value:i,output:""});continue}for(;g.slice(0,3)==="/**";){const gt=h[u.index+4];if(gt&&gt!=="/")break;g=g.slice(3),ot("/**",3)}if(f.type==="bos"&&ut()){o.type="globstar",o.value+=i,o.output=J(n),u.output=o.output,u.globstar=!0,ot(i);continue}if(f.type==="slash"&&f.prev.type!=="bos"&&!Y&&ut()){u.output=u.output.slice(0,-(f.output+o.output).length),f.output=`(?:${f.output}`,o.type="globstar",o.output=J(n)+(n.strictSlashes?")":"|$)"),o.value+=i,u.globstar=!0,u.output+=f.output+o.output,ot(i);continue}if(f.type==="slash"&&f.prev.type!=="bos"&&g[0]==="/"){const gt=g[1]!==void 0?"|$":"";u.output=u.output.slice(0,-(f.output+o.output).length),f.output=`(?:${f.output}`,o.type="globstar",o.output=`${J(n)}${tt}|${tt}${gt})`,o.value+=i,u.output+=f.output+o.output,u.globstar=!0,ot(i+q()),L({type:"slash",value:"/",output:""});continue}if(f.type==="bos"&&g[0]==="/"){o.type="globstar",o.value+=i,o.output=`(?:^|${tt}|${J(n)}${tt})`,u.output=o.output,u.globstar=!0,ot(i+q()),L({type:"slash",value:"/",output:""});continue}if(B&&g[0]==="/"){o.type="globstar",o.value+=i,o.output=`(?:^|${tt}|${J(n)}${tt})`,u.output+=o.output,u.globstar=!0,ot(i+q()),L({type:"slash",value:"/",output:""});continue}u.output=u.output.slice(0,-o.output.length),o.type="globstar",o.output=J(n),o.value+=i,u.output+=o.output,u.globstar=!0,ot(i);continue}const j={type:"star",value:i,output:I};if(n.bash===!0){j.output=".*?",(o.type==="bos"||o.type==="slash")&&(j.output=st+j.output),L(j);continue}if(o&&(o.type==="bracket"||o.type==="paren")&&n.regex===!0){j.output=i,L(j);continue}(u.index===u.start||o.type==="slash"||o.type==="dot")&&(o.type==="dot"?(u.output+=mt,o.output+=mt):n.dot===!0?(u.output+=pt,o.output+=pt):(u.output+=st,o.output+=st),M()!=="*"&&(u.output+=ct,o.output+=ct)),L(j)}for(;u.brackets>0;){if(n.strictBrackets===!0)throw new SyntaxError(R("closing","]"));u.output=s.escapeLast(u.output,"["),At("brackets")}for(;u.parens>0;){if(n.strictBrackets===!0)throw new SyntaxError(R("closing",")"));u.output=s.escapeLast(u.output,"("),At("parens")}for(;u.braces>0;){if(n.strictBrackets===!0)throw new SyntaxError(R("closing","}"));u.output=s.escapeLast(u.output,"{"),At("braces")}if(n.strictSlashes!==!0&&(o.type==="star"||o.type==="bracket")&&L({type:"maybe_slash",value:"",output:`${tt}?`}),u.backtrack===!0){u.output="";for(const g of u.tokens)u.output+=g.output!=null?g.output:g.value,g.suffix&&(u.output+=g.suffix)}return u},"parse");return K.fastpaths=(h,A)=>{const n={...A},E=typeof n.maxLength=="number"?Math.min(l,n.maxLength):l,C=h.length;if(C>E)throw new SyntaxError(`Input length: ${C}, exceeds maximum allowed length: ${E}`);h=p[h]||h;const{DOT_LITERAL:m,SLASH_LITERAL:v,ONE_CHAR:O,DOTS_SLASH:Z,NO_DOT:rt,NO_DOTS:Q,NO_DOTS_SLASH:lt,STAR:tt,START_ANCHOR:ct}=r.globChars(n.windows),U=n.dot?Q:rt,yt=n.dot?lt:rt,mt=n.capture?"":"?:",pt={negated:!1,prefix:""};let G=n.bash===!0?".*?":tt;n.capture&&(G=`(${G})`);const ht=e(st=>st.noglobstar===!0?G:`(${mt}(?:(?!${ct}${st.dot?Z:m}).)*?)`,"globstar"),Rt=e(st=>{switch(st){case"*":return`${U}${O}${G}`;case".*":return`${m}${O}${G}`;case"*.*":return`${U}${G}${m}${O}${G}`;case"*/*":return`${U}${G}${v}${O}${yt}${G}`;case"**":return U+ht(n);case"**/*":return`(?:${U}${ht(n)}${v})?${yt}${O}${G}`;case"**/*.*":return`(?:${U}${ht(n)}${v})?${yt}${G}${m}${O}${G}`;case"**/.*":return`(?:${U}${ht(n)}${v})?${m}${O}${G}`;default:{const P=/^(.*?)\.(\w+)$/.exec(st);if(!P)return;const I=Rt(P[1]);return I?I+m+P[2]:void 0}}},"create"),et=s.removePrefix(h,pt);let J=Rt(et);return J&&n.strictSlashes!==!0&&(J+=`${v}?`),J},me=K,me}d(ke,"It$1");_t(ke,"Bt");at(ke,"requireParse");var Re,Be;function we(){if(Be)return Re;Be=1;var t=Object.defineProperty,e=at((p,b)=>t(p,"name",{value:b,configurable:!0}),"h");const r=Oe(),s=ke(),l=Tt(),a=Pt(),c=e(p=>p&&typeof p=="object"&&!Array.isArray(p),"isObject"),y=e((p,b,R=!1)=>{if(Array.isArray(p)){const F=p.map(K=>y(K,b,R));return e(K=>{for(const h of F){const A=h(K);if(A)return A}return!1},"arrayMatcher")}const T=c(p)&&p.tokens&&p.input;if(p===""||typeof p!="string"&&!T)throw new TypeError("Expected pattern to be a non-empty string");const H=b||{},k=H.windows,D=T?y.compileRe(p,b):y.makeRe(p,b,!1,!0),x=D.state;delete D.state;let w=e(()=>!1,"isIgnored");if(H.ignore){const F={...b,ignore:null,onMatch:null,onResult:null};w=y(H.ignore,F,R)}const it=e((F,K=!1)=>{const{isMatch:h,match:A,output:n}=y.test(F,D,b,{glob:p,posix:k}),E={glob:p,state:x,regex:D,posix:k,input:F,output:n,match:A,isMatch:h};if(typeof H.onResult=="function"&&H.onResult(E),h===!1)return E.isMatch=!1,K?E:!1;t:if(w(F)){if(typeof H.onIgnore=="function"&&H.onIgnore(E)===a.UNIGNORE){E.isMatch=!0;break t}return E.isMatch=!1,K?E:!1}return typeof H.onMatch=="function"&&H.onMatch(E),K?E:!0},"matcher");return R&&(it.state=x),it},"picomatch");return y.test=(p,b,R,{glob:T,posix:H}={})=>{if(typeof p!="string")throw new TypeError("Expected input to be a string");if(p==="")return{isMatch:!1,output:""};const k=R||{},D=k.format||(H?l.toPosixSlashes:null);let x=p===T,w=x&&D?D(p):p;return x===!1&&(w=D?D(p):p,x=w===T),(x===!1||k.capture===!0)&&(k.matchBase===!0||k.basename===!0?x=y.matchBase(p,b,R,H):x=b.exec(w)),{isMatch:!!x,match:x,output:w}},y.matchBase=(p,b,R)=>(b instanceof RegExp?b:y.makeRe(b,R)).test(l.basename(p)),y.isMatch=(p,b,R)=>y(b,R)(p),y.parse=(p,b)=>Array.isArray(p)?p.map(R=>y.parse(R,b)):s(p,{...b,fastpaths:!1}),y.scan=(p,b)=>r(p,b),y.compileRe=(p,b,R=!1,T=!1)=>{if(R===!0)return p.output;const H=b||{},k=H.contains?"":"^",D=H.contains?"":"$";let x=`${k}(?:${p.output})${D}`;p&&p.negated===!0&&(x=`^(?!${x}).*$`);const w=y.toRegex(x,b);return T===!0&&(w.state=p),w},y.makeRe=(p,b={},R=!1,T=!1)=>{if(!p||typeof p!="string")throw new TypeError("Expected a non-empty string");let H={negated:!1,fastpaths:!0};return b.fastpaths!==!1&&(p[0]==="."||p[0]==="*")&&(H.output=s.fastpaths(p,b)),H.output||(H=s(p,b)),y.compileRe(H,b,R,T)},y.toRegex=(p,b)=>{try{const R=b||{};return new RegExp(p,R.flags||(R.nocase?"i":""))}catch(R){if(b&&b.debug===!0)throw R;return/$^/}},y.constants=a,Re=y,Re}d(we,"wt");_t(we,"Gt");at(we,"requirePicomatch$1");var Ee,Ge;function Pe(){if(Ge)return Ee;Ge=1;var t=Object.defineProperty,e=at((a,c)=>t(a,"name",{value:c,configurable:!0}),"c");const r=we(),s=Tt();function l(a,c,y=!1){return c&&(c.windows===null||c.windows===void 0)&&(c={...c,windows:s.isWindows()}),r(a,c,y)}return d(l,"D"),_t(l,"D"),at(l,"picomatch"),e(l,"picomatch"),Object.assign(l,r),Ee=l,Ee}d(Pe,"Pt$1");_t(Pe,"Mt");at(Pe,"requirePicomatch");var hr=Pe();const Et=Qt(hr);var fr=Object.defineProperty,S=d((t,e)=>fr(t,"name",{value:e,configurable:!0}),"u"),gr=Object.defineProperty,$=S((t,e)=>gr(t,"name",{value:e,configurable:!0}),"l");const yr=ir(import.meta.url),Lt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,It=$(t=>{if(typeof Lt<"u"&&Lt.versions&&Lt.versions.node){const[e,r]=Lt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Lt.getBuiltinModule(t)}return yr(t)},"__cjs_getBuiltinModule"),je=It("fs"),dr={...je,default:je},{statSync:br,stat:Ar,realpathSync:vr,realpath:_r,readdirSync:mr,readdir:Rr}=It("fs"),{sep:Ke,basename:Er,dirname:$e,resolve:We,normalize:$r,relative:Sr,posix:$t,isAbsolute:xr}=It("path"),{fileURLToPath:Cr}=It("url"),{createRequire:Or}=It("module");var kr=Object.defineProperty,_=$((t,e)=>kr(t,"name",{value:e,configurable:!0}),"r"),Ue=Or(import.meta.url);function zt(t){let e=$r(t);return e.length>1&&e[e.length-1]===Ke&&(e=e.substring(0,e.length-1)),e}d(zt,"H");S(zt,"tt");$(zt,"M$1");_(zt,"cleanPath");const wr=/[\\/]/g;function Ft(t,e){return t.replace(wr,e)}d(Ft,"M");S(Ft,"T");$(Ft,"D$1");_(Ft,"convertSlashes");const Pr=/^[a-z]:[\\/]$/i;function Zt(t){return t==="/"||Pr.test(t)}d(Zt,"J");S(Zt,"et");$(Zt,"T$1");_(Zt,"isRootDirectory");function xt(t,e){const{resolvePaths:r,normalizePath:s,pathSeparator:l}=e,a=process.platform==="win32"&&t.includes("/")||t.startsWith(".");if(r&&(t=We(t)),(s||a)&&(t=zt(t)),t===".")return"";const c=t[t.length-1]!==l;return Ft(c?t+l:t,l)}d(xt,"q");S(xt,"q");$(xt,"w");_(xt,"normalizePath");function Mt(t,e){return e+t}d(Mt,"B");S(Mt,"I");$(Mt,"P");_(Mt,"joinPathWithBasePath");function Yt(t,e){return function(r,s){return s.startsWith(t)?s.slice(t.length)+r:Ft(Sr(t,s),e.pathSeparator)+e.pathSeparator+r}}d(Yt,"K");S(Yt,"st");$(Yt,"X");_(Yt,"joinPathWithRelativePath");function Vt(t){return t}d(Vt,"V");S(Vt,"rt");$(Vt,"H");_(Vt,"joinPath");function Jt(t,e,r){return e+t+r}d(Jt,"X");S(Jt,"nt");$(Jt,"U$1");_(Jt,"joinDirectoryPath");function te(t,e){const{relativePaths:r,includeBasePath:s}=e;return r&&t?Yt(t,e):s?Mt:Vt}d(te,"Z");S(te,"it");$(te,"J");_(te,"build$7");function ee(t){return function(e,r){r.push(e.substring(t.length)||".")}}d(ee,"tt");S(ee,"ot");$(ee,"K$1");_(ee,"pushDirectoryWithRelativePath");function re(t){return function(e,r,s){const l=e.substring(t.length)||".";s.every(a=>a(l,!0))&&r.push(l)}}d(re,"et");S(re,"ut");$(re,"V");_(re,"pushDirectoryFilterWithRelativePath");const Tr=_((t,e)=>{e.push(t||".")},"pushDirectory"),Hr=_((t,e,r)=>{const s=t||".";r.every(l=>l(s,!0))&&e.push(s)},"pushDirectoryFilter"),Lr=_(()=>{},"empty$2");function ne(t,e){const{includeDirs:r,filters:s,relativePaths:l}=e;return r?l?s&&s.length?re(t):ee(t):s&&s.length?Hr:Tr:Lr}d(ne,"st");S(ne,"lt");$(ne,"st$1");_(ne,"build$6");const Dr=_((t,e,r,s)=>{s.every(l=>l(t,!1))&&r.files++},"pushFileFilterAndCount"),Nr=_((t,e,r,s)=>{s.every(l=>l(t,!1))&&e.push(t)},"pushFileFilter"),Ir=_((t,e,r,s)=>{r.files++},"pushFileCount"),Fr=_((t,e)=>{e.push(t)},"pushFile"),Mr=_(()=>{},"empty$1");function se(t){const{excludeFiles:e,filters:r,onlyCounts:s}=t;return e?Mr:r&&r.length?s?Dr:Nr:s?Ir:Fr}d(se,"it");S(se,"at");$(se,"ut$1");_(se,"build$5");const Br=_(t=>t,"getArray"),Gr=_(()=>[""].slice(0,0),"getArrayGroup");function oe(t){return t.group?Gr:Br}d(oe,"nt");S(oe,"ct");$(oe,"ct$1");_(oe,"build$4");const jr=_((t,e,r)=>{t.push({directory:e,files:r,dir:e})},"groupFiles"),Ur=_(()=>{},"empty");function ie(t){return t.group?jr:Ur}d(ie,"rt");S(ie,"ht");$(ie,"ft$1");_(ie,"build$3");const qr=_(function(t,e,r){const{queue:s,fs:l,options:{suppressErrors:a}}=e;s.enqueue(),l.realpath(t,(c,y)=>{if(c)return s.dequeue(a?null:c,e);l.stat(y,(p,b)=>{if(p)return s.dequeue(a?null:p,e);if(b.isDirectory()&&Bt(t,y,e))return s.dequeue(null,e);r(b,y),s.dequeue(null,e)})})},"resolveSymlinksAsync"),Kr=_(function(t,e,r){const{queue:s,fs:l,options:{suppressErrors:a}}=e;s.enqueue();try{const c=l.realpathSync(t),y=l.statSync(c);if(y.isDirectory()&&Bt(t,c,e))return;r(y,c)}catch(c){if(!a)throw c}},"resolveSymlinks");function ue(t,e){return!t.resolveSymlinks||t.excludeSymlinks?null:e?Kr:qr}d(ue,"ot");S(ue,"pt");$(ue,"gt$1");_(ue,"build$2");function Bt(t,e,r){if(r.options.useRealPaths)return ae(e,r);let s=$e(t),l=1;for(;s!==r.root&&l<2;){const a=r.symlinks.get(s);a&&(a===e||a.startsWith(e)||e.startsWith(a))?l++:s=$e(s)}return r.symlinks.set(t,e),l>1}d(Bt,"_");S(Bt,"L");$(Bt,"E$1");_(Bt,"isRecursive");function ae(t,e){return e.visited.includes(t+e.options.pathSeparator)}d(ae,"lt");S(ae,"ft");$(ae,"dt$1");_(ae,"isRecursiveUsingRealPaths");const Wr=_(t=>t.counts,"onlyCountsSync"),Xr=_(t=>t.groups,"groupsSync"),Qr=_(t=>t.paths,"defaultSync"),zr=_(t=>t.paths.slice(0,t.options.maxFiles),"limitFilesSync"),Zr=_((t,e,r)=>(St(e,r,t.counts,t.options.suppressErrors),null),"onlyCountsAsync"),Yr=_((t,e,r)=>(St(e,r,t.paths,t.options.suppressErrors),null),"defaultAsync"),Vr=_((t,e,r)=>(St(e,r,t.paths.slice(0,t.options.maxFiles),t.options.suppressErrors),null),"limitFilesAsync"),Jr=_((t,e,r)=>(St(e,r,t.groups,t.options.suppressErrors),null),"groupsAsync");function St(t,e,r,s){e(t&&!s?t:null,r)}d(St,"A");S(St,"j");$(St,"y");_(St,"report");function le(t,e){const{onlyCounts:r,group:s,maxFiles:l}=t;return r?e?Wr:Zr:s?e?Xr:Jr:l?e?zr:Vr:e?Qr:Yr}d(le,"at");S(le,"gt");$(le,"Et");_(le,"build$1");const Xe={withFileTypes:!0},tn=_((t,e,r,s,l)=>{if(t.queue.enqueue(),s<0)return t.queue.dequeue(null,t);const{fs:a}=t;t.visited.push(e),t.counts.directories++,a.readdir(e||".",Xe,(c,y=[])=>{l(y,r,s),t.queue.dequeue(t.options.suppressErrors?null:c,t)})},"walkAsync"),en=_((t,e,r,s,l)=>{const{fs:a}=t;if(s<0)return;t.visited.push(e),t.counts.directories++;let c=[];try{c=a.readdirSync(e||".",Xe)}catch(y){if(!t.options.suppressErrors)throw y}l(c,r,s)},"walkSync");function ce(t){return t?en:tn}d(ce,"ut");S(ce,"yt");$(ce,"xt$1");_(ce,"build");var rn=class{static{d(this,"De")}static{S(this,"we")}static{$(this,"_t")}static{_(this,"Queue")}count=0;constructor(t){this.onQueueEmpty=t}enqueue(){return this.count++,this.count}dequeue(t,e){this.onQueueEmpty&&(--this.count<=0||t)&&(this.onQueueEmpty(t,e),t&&(e.controller.abort(),this.onQueueEmpty=void 0))}},nn=class{static{d(this,"Ae")}static{S(this,"$e")}static{$(this,"At")}static{_(this,"Counter")}_files=0;_directories=0;set files(t){this._files=t}get files(){return this._files}set directories(t){this._directories=t}get directories(){return this._directories}get dirs(){return this._directories}},sn=class{static{d(this,"Ee")}static{S(this,"Se")}static{$(this,"Wt")}static{_(this,"Aborter")}aborted=!1;abort(){this.aborted=!0}},Qe=class{static{d(this,"Dt")}static{S(this,"mt")}static{$(this,"q")}static{_(this,"Walker")}root;isSynchronous;state;joinPath;pushDirectory;pushFile;getArray;groupFiles;resolveSymlink;walkDirectory;callbackInvoker;constructor(t,e,r){this.isSynchronous=!r,this.callbackInvoker=le(e,this.isSynchronous),this.root=xt(t,e),this.state={root:Zt(this.root)?this.root:this.root.slice(0,-1),paths:[""].slice(0,0),groups:[],counts:new nn,options:e,queue:new rn((s,l)=>this.callbackInvoker(l,s,r)),symlinks:new Map,visited:[""].slice(0,0),controller:new sn,fs:e.fs||dr},this.joinPath=te(this.root,e),this.pushDirectory=ne(this.root,e),this.pushFile=se(e),this.getArray=oe(e),this.groupFiles=ie(e),this.resolveSymlink=ue(e,this.isSynchronous),this.walkDirectory=ce(this.isSynchronous)}start(){return this.pushDirectory(this.root,this.state.paths,this.state.options.filters),this.walkDirectory(this.state,this.root,this.root,this.state.options.maxDepth,this.walk),this.isSynchronous?this.callbackInvoker(this.state,null):null}walk=_((t,e,r)=>{const{paths:s,options:{filters:l,resolveSymlinks:a,excludeSymlinks:c,exclude:y,maxFiles:p,signal:b,useRealPaths:R,pathSeparator:T},controller:H}=this.state;if(H.aborted||b&&b.aborted||p&&s.length>p)return;const k=this.getArray(this.state.paths);for(let D=0;D<t.length;++D){const x=t[D];if(x.isFile()||x.isSymbolicLink()&&!a&&!c){const w=this.joinPath(x.name,e);this.pushFile(w,k,this.state.counts,l)}else if(x.isDirectory()){let w=Jt(x.name,e,this.state.options.pathSeparator);if(y&&y(x.name,w))continue;this.pushDirectory(w,s,l),this.walkDirectory(this.state,w,w,r-1,this.walk)}else if(this.resolveSymlink&&x.isSymbolicLink()){let w=Mt(x.name,e);this.resolveSymlink(w,this.state,(it,F)=>{if(it.isDirectory()){if(F=xt(F,this.state.options),y&&y(x.name,R?F:w+T))return;this.walkDirectory(this.state,F,R?F:w+T,r-1,this.walk)}else{F=R?F:w;const K=Er(F),h=xt($e(F),this.state.options);F=this.joinPath(K,h),this.pushFile(F,k,this.state.counts,l)}})}}this.groupFiles(this.state.groups,e,k)},"walk")};function pe(t,e){return new Promise((r,s)=>{Gt(t,e,(l,a)=>{if(l)return s(l);r(a)})})}d(pe,"ct");S(pe,"bt");$(pe,"Ct");_(pe,"promise");function Gt(t,e,r){new Qe(t,e,r).start()}d(Gt,"T");S(Gt,"G");$(Gt,"x");_(Gt,"callback");function he(t,e){return new Qe(t,e).start()}d(he,"ht");S(he,"vt");$(he,"jt");_(he,"sync");var qe=class{static{d(this,"kt")}static{S(this,"J")}static{$(this,"F")}static{_(this,"APIBuilder")}constructor(t,e){this.root=t,this.options=e}withPromise(){return pe(this.root,this.options)}withCallback(t){Gt(this.root,this.options,t)}sync(){return he(this.root,this.options)}};let ze=null;try{Ue.resolve("picomatch"),ze=Ue("picomatch")}catch{}var on=class{static{d(this,"We")}static{S(this,"ke")}static{$(this,"$t")}static{_(this,"Builder")}globCache={};options={maxDepth:1/0,suppressErrors:!0,pathSeparator:Ke,filters:[]};globFunction;constructor(t){this.options={...this.options,...t},this.globFunction=this.options.globFunction}group(){return this.options.group=!0,this}withPathSeparator(t){return this.options.pathSeparator=t,this}withBasePath(){return this.options.includeBasePath=!0,this}withRelativePaths(){return this.options.relativePaths=!0,this}withDirs(){return this.options.includeDirs=!0,this}withMaxDepth(t){return this.options.maxDepth=t,this}withMaxFiles(t){return this.options.maxFiles=t,this}withFullPaths(){return this.options.resolvePaths=!0,this.options.includeBasePath=!0,this}withErrors(){return this.options.suppressErrors=!1,this}withSymlinks({resolvePaths:t=!0}={}){return this.options.resolveSymlinks=!0,this.options.useRealPaths=t,this.withFullPaths()}withAbortSignal(t){return this.options.signal=t,this}normalize(){return this.options.normalizePath=!0,this}filter(t){return this.options.filters.push(t),this}onlyDirs(){return this.options.excludeFiles=!0,this.options.includeDirs=!0,this}exclude(t){return this.options.exclude=t,this}onlyCounts(){return this.options.onlyCounts=!0,this}crawl(t){return new qe(t||".",this.options)}withGlobFunction(t){return this.globFunction=t,this}crawlWithOptions(t,e){return this.options={...this.options,...e},new qe(t||".",this.options)}glob(...t){return this.globFunction?this.globWithOptions(t):this.globWithOptions(t,{dot:!0})}globWithOptions(t,...e){const r=this.globFunction||ze;if(!r)throw new Error("Please specify a glob function to use glob matching.");var s=this.globCache[t.join("\0")];return s||(s=r(t,...e),this.globCache[t.join("\0")]=s),this.options.filters.push(l=>s(l)),this}},un=Object.defineProperty,V=$((t,e)=>un(t,"name",{value:e,configurable:!0}),"a");const an=Array.isArray,Ze=/\\/g,Ye=process.platform==="win32",ln=/^(\/?\.\.)+$/;function Dt(t,e={}){const r=t.length,s=Array(r),l=Array(r);let a,c;for(a=0;a<r;a++){const y=jt(t[a]);s[a]=y;const p=y.length,b=Array(p);for(c=0;c<p;c++)b[c]=Et(y[c],e);l[a]=b}return y=>{const p=y.split("/");if(p[0]===".."&&ln.test(y))return!0;for(a=0;a<r;a++){const b=s[a],R=l[a],T=p.length,H=Math.min(T,b.length);for(c=0;c<H;){const k=b[c];if(k.includes("/"))return!0;if(!R[c](p[c]))break;if(!e.noglobstar&&k==="**")return!0;c++}if(c===T)return!0}return!1}}d(Dt,"R");S(Dt,"B");$(Dt,"D");V(Dt,"getPartialMatcher");const cn=/^[A-Z]:\/$/i,pn=Ye?t=>cn.test(t):t=>t==="/";function Nt(t,e,r){if(t===e||e.startsWith(`${t}/`)){if(r){const l=t.length+ +!pn(t);return(a,c)=>a.slice(l,c?-1:void 0)||"."}const s=e.slice(t.length+1);return s?(l,a)=>{if(l===".")return s;const c=`${s}/${l}`;return a?c.slice(0,-1):c}:(l,a)=>a&&l!=="."?l.slice(0,-1):l}return r?s=>$t.relative(t,s)||".":s=>$t.relative(t,`${e}/${s}`)||"."}d(Nt,"O");S(Nt,"M");$(Nt,"M");V(Nt,"buildFormat");function fe(t,e){if(e.startsWith(`${t}/`)){const r=e.slice(t.length+1);return s=>`${r}/${s}`}return r=>{const s=$t.relative(t,`${e}/${r}`);return r[r.length-1]==="/"&&s!==""?`${s}/`:s||"."}}d(fe,"pt");S(fe,"St");$(fe,"at");V(fe,"buildRelative");const hn={parts:!0};function jt(t){var e;const r=Et.scan(t,hn);return!((e=r.parts)===null||e===void 0)&&e.length?r.parts:[t]}d(jt,"I");S(jt,"z");$(jt,"N");V(jt,"splitPattern");const fn=/\\(?![()[\]{}!+@])/g;function Te(t){return Ve(t)}d(Te,"qt");S(Te,"Ee");$(Te,"ut");V(Te,"convertPosixPathToPattern");function He(t){return Je(t).replace(fn,"/")}d(He,"jt");S(He,"Re");$(He,"ft");V(He,"convertWin32PathToPattern");const gn=/(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g,yn=/(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g,Ve=V(t=>t.replace(gn,"\\$&"),"escapePosixPath"),Je=V(t=>t.replace(yn,"\\$&"),"escapeWin32Path"),dn=Ye?Je:Ve;function ge(t,e){if(e?.caseSensitiveMatch===!1)return!0;const r=Et.scan(t);return r.isGlob||r.negated}d(ge,"ft");S(ge,"Dt");$(ge,"k");V(ge,"isDynamicPattern");function vt(...t){console.log(`[tinyglobby ${new Date().toLocaleTimeString("es")}]`,...t)}d(vt,"D");S(vt,"D");$(vt,"E");V(vt,"log");function Ut(t){return typeof t=="string"?[t]:t??[]}d(Ut,"L");S(Ut,"U");$(Ut,"W");V(Ut,"ensureStringArray");const bn=/^(\/?\.\.)+/,An=/\\(?=[()[\]{}!*+?@|])/g;function Ct(t,e,r,s){var l;const a=e.cwd;let c=t;t[t.length-1]==="/"&&(c=t.slice(0,-1));const y=c.lastIndexOf("/"),p=(y===-1?c:c.slice(y+1)).startsWith("!(");c[c.length-1]!=="*"&&!p&&e.expandDirectories&&(c+="/**");const b=dn(a);c=xr(c.replace(An,""))?$t.relative(b,c):$t.normalize(c);const R=(l=bn.exec(c))===null||l===void 0?void 0:l[0],T=jt(c);if(R){const k=(R.length+1)/3;let D=0;const x=b.split("/");for(;D<k&&T[D+k]===x[x.length+D-k];)c=c.slice(0,(k-D-1)*3)+c.slice((k-D)*3+T[D+k].length+1)||".",D++;const w=$t.join(a,R.slice(D*3));w[0]!=="."&&r.root.length>w.length&&(r.root=w,r.depthOffset=-k+D)}if(!s&&r.depthOffset>=0){var H;(H=r.commonPath)!==null&&H!==void 0||(r.commonPath=T);const k=[],D=Math.min(r.commonPath.length,T.length);for(let x=0;x<D;x++){const w=T[x];if(w==="**"&&!T[x+1]){k.pop();break}if(x===T.length-1||w!==r.commonPath[x]||ge(w))break;k.push(w)}r.depthOffset=k.length,r.commonPath=k,r.root=k.length>0?$t.join(a,...k):a}return c}d(Ct,"j");S(Ct,"E");$(Ct,"$");V(Ct,"normalizePattern");function ye(t,e,r){const s=[],l=[],a=[];for(const c of t.ignore)c&&(c[0]!=="!"||c[1]==="("?l.push(Ct(c,t,r,!0)):a.push(c.slice(1)));for(const c of e)c&&(c[0]!=="!"||c[1]==="("?s.push(Ct(c,t,r,!1)):(c[1]!=="!"||c[2]==="(")&&l.push(Ct(c.slice(1),t,r,!0)));return{match:s,ignore:l,unignore:a}}d(ye,"gt");S(ye,"xt");$(ye,"St");V(ye,"processPatterns");function de(t,e){const r=t.cwd,s={root:r,depthOffset:0},l=ye(t,e,s);t.debug&&vt("internal processing patterns:",l);const{absolute:a,caseSensitiveMatch:c,debug:y,dot:p,followSymbolicLinks:b,onlyDirectories:R}=t,T=s.root.replace(Ze,""),H={dot:p,nobrace:t.braceExpansion===!1,nocase:!c,noextglob:t.extglob===!1,noglobstar:t.globstar===!1,posix:!0},k=l.unignore.length>0,D=k?Et(l.unignore,H):void 0,x=k?Dt(l.unignore,H):void 0,w=Et(l.match,{...H,ignore:l.ignore,onIgnore:D?m=>D(m.output)&&Et.constants.UNIGNORE:void 0}),it=Et(l.ignore,H),F=Dt(l.match,H),K=Nt(r,T,a),h=a?K:Nt(r,T,!0),A=l.match.length>0&&l.match.every(m=>m==="**"||m==="**/*"),n=l.ignore.length>0||k||!A?(m,v)=>{const O=h(v,!0);return O==="."||x&&x(O)?!1:!F(O)||it(O)}:void 0;let E;t.deep!==void 0&&(E=Math.round(t.deep-s.depthOffset));const C=new on({filters:[y?(m,v)=>{const O=K(m,v),Z=w(O);return Z&&vt(`matched ${O}`),Z}:(m,v)=>{const O=K(m,v);return w(O)}],exclude:y&&n?(m,v)=>{const O=n(m,v);return vt(`${O?"skipped":"crawling"} ${v}`),O}:n,fs:t.fs,pathSeparator:"/",relativePaths:!a,resolvePaths:a,includeBasePath:a,resolveSymlinks:b,excludeSymlinks:!b,excludeFiles:R,includeDirs:R||!t.onlyFiles,maxDepth:E,signal:t.signal}).crawl(T);return t.debug&&vt("internal properties:",{...s,root:T}),[C,r!==T&&!a&&fe(r,T)]}d(de,"dt");S(de,"At");$(de,"vt");V(de,"buildCrawler");function qt(t,e){if(e)for(let r=t.length-1;r>=0;r--)t[r]=e(t[r]);return t}d(qt,"z");S(qt,"N");$(qt,"U");V(qt,"formatPaths");const vn={caseSensitiveMatch:!0,cwd:process.cwd(),debug:!!process.env.TINYGLOBBY_DEBUG,expandDirectories:!0,followSymbolicLinks:!0,onlyFiles:!0};function be(t){const e={...vn,...t};return e.cwd=(e.cwd instanceof URL?Cr(e.cwd):We(e.cwd)).replace(Ze,"/"),e.ignore=Ut(e.ignore),e.fs&&(e.fs={readdir:e.fs.readdir||Rr,readdirSync:e.fs.readdirSync||mr,realpath:e.fs.realpath||_r,realpathSync:e.fs.realpathSync||vr,stat:e.fs.stat||Ar,statSync:e.fs.statSync||br}),e.debug&&vt("globbing with options:",e),e}d(be,"yt");S(be,"_t");$(be,"pt");V(be,"getOptions");function Kt(t,e={}){var r;if(t&&e?.patterns)throw new Error("Cannot pass patterns as both an argument and an option");const s=an(t)||typeof t=="string",l=Ut((r=s?t:t.patterns)!==null&&r!==void 0?r:"**/*"),a=be(s?e:t);return l.length>0?de(a,l):[]}d(Kt,"G");S(Kt,"Q");$(Kt,"G");V(Kt,"getCrawler");async function Ae(t,e){const[r,s]=Kt(t,e);return r?qt(await r.withPromise(),s):[]}d(Ae,"mt");S(Ae,"Ie");$(Ae,"bt");V(Ae,"glob");function Le(t,e){const[r,s]=Kt(t,e);return r?qt(r.sync(),s):[]}d(Le,"vt");S(Le,"Le");$(Le,"xt");V(Le,"globSync");var _n=Object.defineProperty,mn=d((t,e)=>_n(t,"name",{value:e,configurable:!0}),"r"),Rn=Object.defineProperty,En=mn((t,e)=>Rn(t,"name",{value:e,configurable:!0}),"r"),$n=Object.defineProperty,Sn=En((t,e)=>$n(t,"name",{value:e,configurable:!0}),"r");const On=Sn(async(t,e)=>await Ae(t,e),"glob");export{On as i};
@@ -1,29 +0,0 @@
1
- var Un=Object.defineProperty;var j=(t,e)=>Un(t,"name",{value:e,configurable:!0});import{createRequire as Vn}from"node:module";import"./_commonjsHelpers-CLblCigl.js";import __cjs_mod__ from "node:module"; // -- packem CommonJS require shim --
2
- const require = __cjs_mod__.createRequire(import.meta.url);
3
- const Bn=Vn(import.meta.url),fe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Dn=j(t=>{if(typeof fe<"u"&&fe.versions&&fe.versions.node){const[e,n]=fe.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return fe.getBuiltinModule(t)}return Bn(t)},"__cjs_getBuiltinModule"),{createRequire:Ke}=Dn("node:module"),Rn=16,tt=32,zn=64,re=128,Pe="positionals";var Fn=Object.defineProperty,Lt=j((t,e)=>Fn(t,"name",{value:e,configurable:!0}),"i$6"),Wn=Object.defineProperty,Tt=Lt((t,e)=>Wn(t,"name",{value:e,configurable:!0}),"s"),qn=Object.defineProperty,It=Tt((t,e)=>qn(t,"name",{value:e,configurable:!0}),"s"),Gn=Object.defineProperty,St=It((t,e)=>Gn(t,"name",{value:e,configurable:!0}),"i"),Hn=Object.defineProperty,Mt=St((t,e)=>Hn(t,"name",{value:e,configurable:!0}),"t");Mt(t=>t instanceof Error&&t.type==="VisulimaError","isVisulimaError");let ye=class extends Error{static{j(this,"V")}static{Lt(this,"g")}static{Tt(this,"p")}static{It(this,"V")}static{St(this,"VisulimaError")}static{Mt(this,"VisulimaError")}loc;title;hint;type="VisulimaError";constructor({cause:e,hint:n,location:i,message:r,name:o,stack:s,title:l}){super(r,{cause:e}),this.title=l,this.name=o,this.stack=s??this.stack,this.loc=i,this.hint=n}setLocation(e){this.loc=e}setName(e){this.name=e}setMessage(e){this.message=e}setHint(e){this.hint=e}};var Jn=Object.defineProperty,Ut=j((t,e)=>Jn(t,"name",{value:e,configurable:!0}),"t$3"),Kn=Object.defineProperty,Vt=Ut((t,e)=>Kn(t,"name",{value:e,configurable:!0}),"t"),Zn=Object.defineProperty,Yn=Vt((t,e)=>Zn(t,"name",{value:e,configurable:!0}),"e");let E=class extends ye{static{j(this,"m")}static{Ut(this,"u")}static{Vt(this,"c")}static{Yn(this,"CerebroError")}code;context;constructor(e,n,i){super({message:e,name:"CerebroError"}),this.code=n,this.context=i}};var Qn=Object.defineProperty,Xn=j((t,e)=>Qn(t,"name",{value:e,configurable:!0}),"a$2"),ei=Object.defineProperty,ti=Xn((t,e)=>ei(t,"name",{value:e,configurable:!0}),"l"),ni=Object.defineProperty,I=ti((t,e)=>ni(t,"name",{value:e,configurable:!0}),"r");const D=I(t=>"Deno"in t,"hasDeno"),R=I(t=>"Bun"in t,"hasBun"),Ae=I(()=>{if(D(globalThis)){const t=globalThis.Deno,e=t.execPath();let n=e;try{const{importMeta:i}=globalThis;i?.url&&(n=i.url)}catch{}return[e,n,...t.args]}return R(globalThis)?globalThis.Bun.process.argv:process.argv},"getArgv"),ii=I(()=>D(globalThis)?globalThis.Deno.cwd():R(globalThis)?globalThis.Bun.process.cwd():process.cwd(),"getCwd"),J=I(()=>{if(D(globalThis)){const t=globalThis.Deno;return new Proxy(t.env.toObject(),{get:I((e,n)=>typeof n=="string"?t.env.get(n):e[n],"get"),has:I((e,n)=>typeof n=="string"?t.env.has(n):n in e,"has"),set:I((e,n,i)=>typeof n=="string"?(i===void 0||t.env.set(n,i),!0):!1,"set")})}return R(globalThis)?globalThis.Bun.process.env:process.env},"getEnv"),Bt=I(()=>D(globalThis)?[]:R(globalThis)?globalThis.Bun.process.execArgv:process.execArgv,"getExecArgv"),Dt=I(()=>D(globalThis)?globalThis.Deno.execPath():R(globalThis)?globalThis.Bun.process.execPath:process.execPath,"getExecPath"),oi=I(()=>{if(D(globalThis)){const t=globalThis.Deno.build?.os??"unknown";return t==="windows"?"win32":t}return R(globalThis)?globalThis.Bun.platform??"unknown":process.platform},"getPlatform"),ri=I(()=>{if(D(globalThis)){const t=globalThis.Deno.build?.arch??"unknown";return t==="x86_64"?"x64":t==="aarch64"?"arm64":t}return R(globalThis)?globalThis.Bun.process.arch:process.arch},"getArch");I(()=>{if(D(globalThis)){const t=globalThis.Deno,e={};return t.version?.deno&&(e.deno=t.version.deno),t.version?.v8&&(e.v8=t.version.v8),t.version?.typescript&&(e.typescript=t.version.typescript),e}if(R(globalThis)){const t=globalThis.Bun,e={...t.process.versions};return t.version&&(e.bun=t.version),e}return process.versions},"getVersions");const q=I((t=0)=>{if(D(globalThis))throw globalThis.Deno.exit(t),new Error("Deno exit failed");if(R(globalThis))throw globalThis.Bun.process.exit(t),new Error("Bun exit failed");process.exit(t)},"exitProcess"),nt=I((t,e)=>{if(D(globalThis))return()=>{};if(R(globalThis)){try{const i=globalThis.Bun;if(i.process?.on)return i.process.on(t,e),()=>{i.process?.removeListener&&i.process.removeListener(t,e)}}catch{}return()=>{}}const n=process;return n.on(t,e),()=>{n.removeListener(t,e)}},"onProcessEvent");var ai=Object.defineProperty,Ce=j((t,e)=>ai(t,"name",{value:e,configurable:!0}),"k$3");const W=new Uint32Array(65536),si=Ce((t,e)=>{const n=t.length,i=e.length,r=1<<n-1;let o=-1,s=0,l=n,f=n;for(;f--;)W[t.charCodeAt(f)]|=1<<f;for(f=0;f<i;f++){let a=W[e.charCodeAt(f)];const c=a|s;a|=(a&o)+o^o,s|=~(a|o),o&=a,s&r&&l++,o&r&&l--,s=s<<1|1,o=o<<1|~(c|s),s&=c}for(f=n;f--;)W[t.charCodeAt(f)]=0;return l},"myers_32"),li=Ce((t,e)=>{const n=e.length,i=t.length,r=[],o=[],s=Math.ceil(n/32),l=Math.ceil(i/32);for(let u=0;u<s;u++)o[u]=-1,r[u]=0;let f=0;for(;f<l-1;f++){let u=0,v=-1;const w=f*32,b=Math.min(32,i)+w;for(let $=w;$<b;$++)W[t.charCodeAt($)]|=1<<$;for(let $=0;$<n;$++){const A=W[e.charCodeAt($)],N=o[$/32|0]>>>$&1,d=r[$/32|0]>>>$&1,g=A|u,y=((A|d)&v)+v^v|A|d;let O=u|~(y|v),P=v&y;O>>>31^N&&(o[$/32|0]^=1<<$),P>>>31^d&&(r[$/32|0]^=1<<$),O=O<<1|N,P=P<<1|d,v=P|~(g|O),u=O&g}for(let $=w;$<b;$++)W[t.charCodeAt($)]=0}let a=0,c=-1;const h=f*32,p=Math.min(32,i-h)+h;for(let u=h;u<p;u++)W[t.charCodeAt(u)]|=1<<u;let m=i;for(let u=0;u<n;u++){const v=W[e.charCodeAt(u)],w=o[u/32|0]>>>u&1,b=r[u/32|0]>>>u&1,$=v|a,A=((v|b)&c)+c^c|v|b;let N=a|~(A|c),d=c&A;m+=N>>>i-1&1,m-=d>>>i-1&1,N>>>31^w&&(o[u/32|0]^=1<<u),d>>>31^b&&(r[u/32|0]^=1<<u),N=N<<1|w,d=d<<1|b,c=d|~($|N),a=N&$}for(let u=h;u<p;u++)W[t.charCodeAt(u)]=0;return m},"myers_x"),Rt=Ce((t,e)=>{if(t.length<e.length){const n=e;e=t,t=n}return e.length===0?t.length:t.length<=32?si(t,e):li(t,e)},"distance");Ce((t,e)=>{let n=1/0,i=0;for(let r=0;r<e.length;r++){const o=Rt(t,e[r]);o<n&&(n=o,i=r)}return e[i]},"closest");var ci=Object.defineProperty,ui=j((t,e)=>ci(t,"name",{value:e,configurable:!0}),"a$1"),pi=Object.defineProperty,fi=ui((t,e)=>pi(t,"name",{value:e,configurable:!0}),"a"),di=Object.defineProperty,hi=fi((t,e)=>di(t,"name",{value:e,configurable:!0}),"p"),mi=Object.defineProperty,zt=hi((t,e)=>mi(t,"name",{value:e,configurable:!0}),"e"),gi=Object.defineProperty,vi=zt((t,e)=>gi(t,"name",{value:e,configurable:!0}),"E");const Ft=String.raw,it=Ft`\p{Emoji}(?:\p{EMod}|[\u{E0020}-\u{E007E}]+\u{E007F}|\uFE0F?\u20E3?)`,bi=vi(()=>new RegExp(Ft`\p{RI}{2}|(?![#*\d](?!\uFE0F?\u20E3))${it}(?:\u200D${it})*`,"gu"),"default");var yi=Object.defineProperty,wi=zt((t,e)=>yi(t,"name",{value:e,configurable:!0}),"p");Object.freeze(new Map([[0,0],[1,22],[2,22],[3,23],[4,24],[7,27],[8,28],[9,29],[30,39],[31,39],[32,39],[33,39],[34,39],[35,39],[36,39],[37,39],[40,49],[41,49],[42,49],[43,49],[44,49],[45,49],[46,49],[47,49],[90,39]]));const Ac=/[\u001B\u009B](?:[[()#;?]{0,10}(?:\d{1,4}(?:;\d{0,4})*)?[0-9A-ORZcf-nqry=><]|\]8;;[^\u0007\u001B]{0,100}(?:\u0007|\u001B\\))/g,Ec=/[\u0000-\u0008\n-\u001F\u007F-\u009F]{1,1000}/y,K=bi(),$i=/[-_./\s]+/g,ve=/(\u001B\[[0-9;]*[a-z])/i,ot=new RegExp("\\p{Script=Arabic}","u"),Oi=new RegExp("\\p{Script=Bengali}","u"),ie=new RegExp("\\p{Script=Cyrillic}","u"),xi=new RegExp("\\p{Script=Devanagari}","u"),Pi=new RegExp("\\p{Script=Ethiopic}","u"),Be=new RegExp("\\p{Script=Greek}","u"),rt=new RegExp("\\p{Script=Greek}+|\\p{Script=Latin}+|[^\\p{Script=Greek}\\p{Script=Latin}]+","gu"),Ai=new RegExp("\\p{Script=Gujarati}","u"),Ei=new RegExp("\\p{Script=Gurmukhi}","u"),at=new RegExp("\\p{Script=Hangul}","u"),st=new RegExp("\\p{Script=Hebrew}","u"),Ni=new RegExp("\\p{Script=Hiragana}","u"),lt=new RegExp("\\p{Script=Han}","u"),Ci=new RegExp("\\p{Script=Kannada}","u"),ji=new RegExp("\\p{Script=Katakana}","u"),ki=new RegExp("\\p{Script=Khmer}","u"),_i=new RegExp("\\p{Script=Lao}","u"),M=new RegExp("\\p{Script=Latin}","u"),Li=new RegExp("\\p{Script=Malayalam}","u"),Ti=new RegExp("\\p{Script=Myanmar}","u"),Ii=new RegExp("\\p{Script=Oriya}","u"),Si=new RegExp("\\p{Script=Sinhala}","u"),Mi=new RegExp("\\p{Script=Tamil}","u"),Ui=new RegExp("\\p{Script=Telugu}","u"),Vi=new RegExp("\\p{Script=Thai}","u"),Bi=new RegExp("\\p{Script=Tibetan}","u"),ct=/[\u02BB\u02BC\u0027]/u,Di=wi(t=>t.replace(K,""),"stripEmoji");var Ri=Object.defineProperty,S=j((t,e)=>Ri(t,"name",{value:e,configurable:!0}),"L$1"),zi=Object.defineProperty,x=S((t,e)=>zi(t,"name",{value:e,configurable:!0}),"$");const Fi=Ke(import.meta.url),de=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Wt=x(t=>{if(typeof de<"u"&&de.versions&&de.versions.node){const[e,n]=de.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return de.getBuiltinModule(t)}return Fi(t)},"__cjs_getBuiltinModule"),{writeFile:Wi,stat:qi,rm:Gi,readFile:ut,readdir:Hi,mkdir:Ji,access:Ki}=Wt("node:fs/promises"),{createRequire:Zi}=Wt("node:module"),$e=[{alias:"v",description:"Turn on verbose output",group:"global",name:"verbose",type:Boolean},{description:"Turn on debugging output",group:"global",name:"debug",type:Boolean},{alias:"h",description:"Print out helpful usage information",group:"global",name:"help",type:Boolean},{alias:"q",description:"Silence output",group:"global",name:"quiet",type:Boolean},{alias:"V",description:"Print version info",group:"global",name:"version",type:Boolean},{description:"Turn off colored output",group:"global",name:"no-color",type:Boolean},{description:"Force colored output",group:"global",name:"color",type:Boolean}];var Yi=Object.defineProperty,Qi=x((t,e)=>Yi(t,"name",{value:e,configurable:!0}),"t$9");let Z=class extends E{static{j(this,"B")}static{S(this,"V")}static{x(this,"a")}static{Qi(this,"CommandNotFoundError")}commandName;constructor(e,n=[]){const i=`Command "${e}" not found${n.length>0?`. Did you mean: ${n.join(", ")}?`:""}`;super(i,"COMMAND_NOT_FOUND",{commandName:e,suggestions:n}),this.name="CommandNotFoundError",this.commandName=e,n.length>0&&(this.hint=`Try one of these commands: ${n.join(", ")}`)}};var Xi=Object.defineProperty,eo=x((t,e)=>Xi(t,"name",{value:e,configurable:!0}),"e$7");let qt=class extends E{static{j(this,"st")}static{S(this,"at")}static{x(this,"o")}static{eo(this,"ConflictingOptionsError")}option1;option2;constructor(t,e){super(`Options "${t}" and "${e}" cannot be used together`,"CONFLICTING_OPTIONS",{option1:t,option2:e}),this.name="ConflictingOptionsError",this.option1=t,this.option2=e,this.hint=`Remove either --${t} or --${e}`}};var to=Object.defineProperty,no=x((t,e)=>to(t,"name",{value:e,configurable:!0}),"e$6");let io=class extends E{static{j(this,"xn")}static{S(this,"kn")}static{x(this,"o")}static{no(this,"PluginError")}pluginName;constructor(t,e,n){super(`Plugin "${t}" error: ${e}`,"PLUGIN_ERROR",{originalError:n,pluginName:t}),this.name="PluginError",this.pluginName=t,n&&(this.cause=n)}};var oo=Object.defineProperty,pt=x((t,e)=>oo(t,"name",{value:e,configurable:!0}),"d$6");let ro=class{static{j(this,"Ln")}static{S(this,"xn")}static{x(this,"p")}static{pt(this,"PluginManager")}logger;plugins=new Map;initialized=!1;cachedDependencyOrder=void 0;constructor(t){this.logger=t}hasPlugins(){return this.plugins.size>0}register(t){if(this.initialized)throw new Error(`Cannot register plugin "${t.name}" after initialization`);if(this.plugins.has(t.name))throw new Error(`Plugin "${t.name}" is already registered`);J().CEREBRO_OUTPUT_LEVEL===String(re)&&this.logger.debug(`registering plugin: ${t.name}`),this.plugins.set(t.name,t),this.cachedDependencyOrder=void 0}async init(t){if(this.initialized)throw new Error("PluginManager already initialized");if(this.plugins.size===0){this.logger.debug("no plugins registered, skipping initialization"),this.initialized=!0;return}this.validateDependencies();const e=this.getDependencyOrder();this.logger.debug(`initializing ${String(e.length)} plugin(s)...`);for(const n of e)if(typeof n.init=="function"){this.logger.debug(`initializing plugin: ${n.name}`);try{await n.init(t)}catch(i){const r=new io(n.name,`Failed to initialize: ${i instanceof Error?i.message:String(i)}`,i instanceof Error?i:void 0);throw this.logger.error(r.message),r}}this.initialized=!0}async executeLifecycle(t,e,n){if(!this.initialized)throw new Error("PluginManager not initialized");if(this.plugins.size===0)return;const i=this.getDependencyOrder();for(const r of i){const o=r[t];if(typeof o=="function"){this.logger.debug(`executing ${t} hook for plugin: ${r.name}`);try{await(t==="afterCommand"?o(e,n):o(e))}catch(s){throw this.logger.error(`Error in ${t} hook for plugin "${r.name}":`,s),s}}}}async executeErrorHandlers(t,e){if(!this.initialized||this.plugins.size===0)return;const n=this.getDependencyOrder();for(const i of n)if(typeof i.onError=="function"){this.logger.debug(`executing error handler for plugin: ${i.name}`);try{await i.onError(t,e)}catch(r){this.logger.error(`Error in error handler for plugin "${i.name}":`,r)}}}getDependencyOrder(){if(this.cachedDependencyOrder!==void 0)return this.cachedDependencyOrder;const t=[],e=new Set,n=new Set,i=pt(r=>{if(e.has(r))return;if(n.has(r))throw new Error(`Circular dependency detected involving plugin "${r}"`);const o=this.plugins.get(r);if(!o)throw new Error(`Plugin "${r}" not found`);if(n.add(r),o.dependencies)for(const s of o.dependencies)i(s);n.delete(r),e.add(r),t.push(o)},"visit");for(const r of this.plugins.keys())i(r);return this.cachedDependencyOrder=t,t}validateDependencies(){for(const t of this.plugins.values())if(t.dependencies){for(const e of t.dependencies)if(!this.plugins.has(e))throw new Error(`Plugin "${t.name}" depends on "${e}" which is not registered`)}}};var ao=Object.defineProperty,so=x((t,e)=>ao(t,"name",{value:e,configurable:!0}),"n$b");const be=so(t=>t.type?.name==="Boolean","optionIsBoolean");var lo=Object.defineProperty,Gt=x((t,e)=>lo(t,"name",{value:e,configurable:!0}),"p$6");const co=Gt(t=>{let e=t.type?t.type.name.toLowerCase():"string";const n=t.multiple??t.lazyMultiple?"[]":"";return e&&(e=e==="boolean"?"":`{underline ${e}${n}}`),e},"getTypeLabel"),ft=Gt(t=>(be(t)||(t.typeLabel=t.typeLabel??co(t),t.defaultOption&&(t.typeLabel=`${t.typeLabel} (D)`),t.required&&(t.typeLabel=`${t.typeLabel} (R)`)),t),"mapOptionTypeLabel");var uo=Object.defineProperty,Ht=x((t,e)=>uo(t,"name",{value:e,configurable:!0}),"e$4");const po=new RegExp(/^-([^\d-])$/),fo=new RegExp(/^--(\S+)/),ho=new RegExp(/^-([^\d-]{2,})$/),mo=Ht(t=>po.test(t)||fo.test(t)||ho.test(t),"isOption"),go=Ht((t,e)=>{const n=e[0]&&mo(e[0])||e.length===0?null:e.shift()??null;if(!t.includes(n)){const i=new Error(`Command not recognised: ${String(n)}`);throw i.command=n,i.name="INVALID_COMMAND",i}return{argv:e,command:n}},"commandLineCommands");var vo=Object.defineProperty,Jt=x((t,e)=>vo(t,"name",{value:e,configurable:!0}),"o$b"),bo=Object.defineProperty,Kt=Jt((t,e)=>bo(t,"name",{value:e,configurable:!0}),"o"),yo=Object.defineProperty,wo=Kt((t,e)=>yo(t,"name",{value:e,configurable:!0}),"i");let $o=class Zt extends ye{static{j(this,"pt")}static{S(this,"ut")}static{x(this,"a")}static{Jt(this,"r")}static{Kt(this,"t")}static{wo(this,"AlreadySetError")}optionName;constructor(e){super({cause:void 0,hint:`Remove the duplicate option '${e}' from your command line arguments.`,location:void 0,message:`Option '${e}' is already set`,name:"ALREADY_SET",stack:void 0,title:"Option Already Set"}),this.optionName=e,Object.setPrototypeOf(this,Zt.prototype)}};var Oo=Object.defineProperty,Yt=x((t,e)=>Oo(t,"name",{value:e,configurable:!0}),"t$7"),xo=Object.defineProperty,Qt=Yt((t,e)=>xo(t,"name",{value:e,configurable:!0}),"e"),Po=Object.defineProperty,Ao=Qt((t,e)=>Po(t,"name",{value:e,configurable:!0}),"e");let dt=class Xt extends ye{static{j(this,"ft")}static{S(this,"dt")}static{x(this,"n")}static{Yt(this,"n")}static{Qt(this,"o")}static{Ao(this,"UnknownOptionError")}optionName;constructor(e){super({cause:void 0,hint:`Check your option definitions or remove the unknown option '${e}' from your command line arguments.`,location:void 0,message:`Unknown option: --${e}`,name:"UNKNOWN_OPTION",stack:void 0,title:"Unknown Option"}),this.optionName=`--${e}`,Object.setPrototypeOf(this,Xt.prototype)}};var Eo=Object.defineProperty,en=x((t,e)=>Eo(t,"name",{value:e,configurable:!0}),"a$9"),No=Object.defineProperty,tn=en((t,e)=>No(t,"name",{value:e,configurable:!0}),"a"),Co=Object.defineProperty,jo=tn((t,e)=>Co(t,"name",{value:e,configurable:!0}),"o");let ko=class nn extends ye{static{j(this,"vt")}static{S(this,"gt")}static{x(this,"o")}static{en(this,"r")}static{tn(this,"e")}static{jo(this,"UnknownValueError")}value;constructor(e){super({hint:"Use a defined option or add a defaultOption to capture this value.",message:`Unknown value: ${e}`,name:"UNKNOWN_VALUE",title:"Unknown Value"}),this.value=e,Object.setPrototypeOf(this,nn.prototype)}};var _o=Object.defineProperty,on=x((t,e)=>_o(t,"name",{value:e,configurable:!0}),"i$8"),Lo=Object.defineProperty,rn=on((t,e)=>Lo(t,"name",{value:e,configurable:!0}),"i"),To=Object.defineProperty,Io=rn((t,e)=>To(t,"name",{value:e,configurable:!0}),"i");let U=class an extends ye{static{j(this,"bt")}static{S(this,"yt")}static{x(this,"a")}static{on(this,"o")}static{rn(this,"e")}static{Io(this,"InvalidDefinitionsError")}constructor(e,n){super({cause:void 0,hint:n,location:void 0,message:e,name:"INVALID_DEFINITIONS",stack:void 0,title:"Invalid Option Definition"}),Object.setPrototypeOf(this,an.prototype)}};var So=Object.defineProperty,Mo=x((t,e)=>So(t,"name",{value:e,configurable:!0}),"E$3"),Uo=Object.defineProperty,le=Mo((t,e)=>Uo(t,"name",{value:e,configurable:!0}),"C"),Vo=Object.defineProperty,je=le((t,e)=>Vo(t,"name",{value:e,configurable:!0}),"o");const ht=je(t=>t===Boolean||typeof t=="function"&&t.name==="Boolean","isBooleanType"),mt=je(t=>t===Number||typeof t=="function"&&t.name==="Number","isNumberType"),gt=je(t=>t===String||typeof t=="function"&&t.name==="String","isStringType"),Bo=je((t,e)=>Array.isArray(t)?ht(e)?t.map(Boolean):mt(e)?t.map(Number):gt(e)?t.map(String):t.map(n=>e(String(n))):t===null?null:ht(e)?!!t:mt(e)?Number(t):gt(e)?typeof t=="string"?t:String(t):e(typeof t=="string"?t:String(t)),"convertValue");var Do=Object.defineProperty,Ro=le((t,e)=>Do(t,"name",{value:e,configurable:!0}),"e");const L=Ro((t,e,n,...i)=>{t&&console.debug(`[command-line-args:${n}] ${e}`,...i)},"debug");var zo=Object.defineProperty,ne=le((t,e)=>zo(t,"name",{value:e,configurable:!0}),"x$2");const Fo=/-([a-z])/g,Wo=/^\d+$/,De=ne(t=>t===Boolean||typeof t=="function"&&t.name==="Boolean","isBooleanType"),qo=ne(t=>t.codePointAt(0)===95,"isSpecialKey"),vt=ne((t,e)=>Array.isArray(t)?[...t,...e]:[t,...e],"appendToArrayMultiple"),bt=ne(t=>t==="__proto__"||t==="constructor"||t==="prototype","isUnsafeKey"),yt=ne((t,e,n,i=!1)=>{t[e]===void 0?t[e]=i?[n]:n:i&&Array.isArray(t[e])?t[e].push(n):t[e]=[t[e],n]},"createOrAppendArray"),Go=ne((t,e,n,i,r)=>{let o=e.get(t)??n.get(t);if(!o&&i){const s=t.toLowerCase();o=i.get(s)??r?.get(s)}return o},"getDefinition"),Ho=ne((t,e,n,i)=>{const r=n.debug??!1;L(r,"resolveArgs called with options:","resolver",{partial:n.partial,stopAtFirstUnknown:n.stopAtFirstUnknown}),L(r,"Starting argument resolution","resolver"),L(r,"Tokens:","resolver",t),L(r,"Definitions:","resolver",e),L(r,"Processing tokens...","resolver");const o=new Map,s=new Map,l=n.caseInsensitive?new Map:void 0,f=n.caseInsensitive?new Map:void 0,a=n.camelCase?new Map:void 0,c=n.camelCase?new Map:void 0;for(const d of e)if(o.set(d.name,d),d.alias&&s.set(d.alias,d),n.caseInsensitive&&l&&(l.set(d.name.toLowerCase(),d),d.alias&&f&&f.set(d.alias.toLowerCase(),d)),n.camelCase&&a&&c){const g=d.name.replaceAll(Fo,(y,O)=>O.toUpperCase());a.set(d.name,g),c.set(g,d.name)}const h={},p={},m=[],u=[],v=new Set;let w=!1;const b=e.find(d=>d.defaultOption),$=e.some(d=>d.group),A=e.some(d=>d.type===Number);for(let d=0;d<t.length;d++){const g=t[d];if(g.kind==="option-terminator"){h._unknown=i.slice(g.index),w=!0;break}if(g.kind==="option"&&g.name){let y=Go(g.name,o,s,l,f);if(!y&&g.value===void 0&&A&&Wo.test(g.name)){const C=e.find(z=>z.type===Number);C&&(y=C,g.value=g.name,g.name=C.name)}const O=y?y.name:g.name,P=y?.multiple,V=y?.lazyMultiple;if(p[O]!==void 0&&!P&&!V&&!n.partial)throw new $o(O);if(!y&&n.partial){const C=g.rawName??`--${g.name}${g.value!==void 0&&g.inlineValue?`=${g.value}`:""}`;m.push({index:g.index,value:C});continue}if(!y&&n.stopAtFirstUnknown){h._unknown=i.slice(g.index);break}if(!y&&!n.partial)throw new dt(g.name);if(g.value===void 0){const C=t[d+1],z=C?.kind==="option"&&!("name"in C)&&C.value!==void 0,T=C&&y&&!(y.type&&De(y.type))&&(C.kind==="positional"||z),Mn=y&&y.defaultOption&&!y.multiple&&!y.lazyMultiple;if(T&&(!y?.defaultOption||Mn))if(P){let F=d+1;const Ve=[];for(;F<t.length&&(t[F].kind==="positional"||t[F].kind==="option"&&!("name"in t[F])&&t[F].value!==void 0);)Ve.push(t[F].value),v.add(t[F].index),F++;p[O]=p[O]===void 0?Ve:vt(p[O],Ve),d=F-1}else V?(yt(p,O,C.value,!0),v.add(C.index),d++):(p[O]=C.value,v.add(C.index),d++);else y?.type&&De(y.type)?yt(p,O,!0,P):p[O]=P?[]:null}else{let{value:C}=g;if(y?.type&&De(y.type))switch(C){case"":{if(n.partial){p._unknown??=[];const T=`${g.rawName??`--${g.name}`}${g.value?`=${g.value}`:""}`;p._unknown.push(T),u.push({index:g.index,value:T}),C=!0}else throw new dt(g.name);break}case"false":{C=!1;break}case"true":{C=!0;break}default:C=!0}const z=[C];if(P){let T=d+1;for(;T<t.length&&t[T].kind==="positional";)z.push(t[T].value),v.add(t[T].index),T++;d=T-1}p[O]===void 0?p[O]=P||V?z:C:P||V?p[O]=vt(p[O],z):p[O]=C}}else if(g.kind==="positional"&&n.stopAtFirstUnknown&&!v.has(g.index)&&!b){L(r,`Found unconsumed positional token at index ${String(g.index)}, stopping processing`,"resolver"),h._unknown=i.slice(g.index);break}}for(const[d,g]of Object.entries(p)){const y=o.get(d);y&&(y.multiple||y.lazyMultiple)&&!Array.isArray(g)&&(p[d]=[g])}let N=Number.POSITIVE_INFINITY;if(n.stopAtFirstUnknown&&!w){for(const d of t)if(d.kind==="option"&&!o.has(d.name??"")&&!s.has(d.name??"")&&(!n.caseInsensitive||!l?.has(d.name?.toLowerCase()??"")&&!f?.has(d.name?.toLowerCase()??""))){N=d.index;break}}if(b){const d=[],g=[];for(const y of t)y.kind==="positional"&&!v.has(y.index)&&y.index<N&&(d.push(y.value),g.push(y));if(d.length>0){const y=p[b.name],O=b.multiple??b.lazyMultiple;y===void 0?O?(g.forEach(P=>v.add(P.index)),p[b.name]=d):(v.add(g[0].index),p[b.name]=d[0]):O&&(g.forEach(P=>v.add(P.index)),p[b.name]=Array.isArray(y)?[...d,...y]:[...d,y])}}if(!n.partial){for(const d of t)if(d.kind==="positional"&&!v.has(d.index))throw new ko(i[d.index])}if(n.partial&&!n.stopAtFirstUnknown){const d=[...m];if(p._unknown)for(const g of u)d.push({index:g.index,value:g.value});for(const g of t)g.kind==="positional"&&!v.has(g.index)&&d.push({index:g.index,value:i[g.index]});d.length>0&&(d.sort((g,y)=>g.index-y.index),h._unknown=d.map(g=>g.value))}if(n.stopAtFirstUnknown&&!w){const d=t.findIndex(O=>O.kind==="option"&&!o.has(O.name??"")&&!s.has(O.name??"")&&(!n.caseInsensitive||!l?.has(O.name?.toLowerCase()??"")&&!f?.has(O.name?.toLowerCase()??""))),g=t.findIndex(O=>O.kind==="positional"&&!v.has(O.index));let y=-1;if(d!==-1&&g!==-1?y=Math.min(d,g):d!==-1?y=d:g!==-1&&(y=g),y>=0){const O=t[y].index;h._unknown=i.slice(O)}}else m.length>0&&!n.partial&&(h._unknown=m.map(d=>d.value));for(const[d,g]of Object.entries(p)){const y=n.camelCase?a?.get(d)??d:d,O=o.get(d);h[y]=O?.type?Bo(g,O.type):g===void 0?null:g}for(const d of e){const g=n.camelCase?a?.get(d.name)??d.name:d.name;!(g in h)&&d.defaultValue!==void 0&&(d.multiple??d.lazyMultiple?h[g]=Array.isArray(d.defaultValue)?[...d.defaultValue]:[d.defaultValue]:h[g]=d.defaultValue)}if($){const d={},g={},y={};for(const P of e)if(P.group){const V=Array.isArray(P.group)?P.group:[P.group];for(const C of V)bt(C)||(d[C]??={})}for(const P of Object.keys(h))if(!qo(P)){g[P]=h[P];let V=P;n.camelCase&&(V=c?.get(P)??P);const C=o.get(V);if(C?.group){const z=Array.isArray(C.group)?C.group:[C.group];for(const T of z)bt(T)||d[T]&&(d[T][P]=h[P])}else y[P]=h[P]}const O={_all:g};for(const[P,V]of Object.entries(d))O[P]=V;Object.keys(y).length>0&&(O._none=y),h._unknown&&(O._unknown=h._unknown),Object.keys(h).forEach(P=>delete h[P]),Object.assign(h,O)}return L(r,"Final parsed result:","resolver",h),h},"resolveArgs");var Jo=Object.defineProperty,ce=le((t,e)=>Jo(t,"name",{value:e,configurable:!0}),"l");const se="-".codePointAt(0),X="=",Ko=X.codePointAt(0),Zo="--",Yo="-",Qo="--",sn=ce(t=>t.length>2&&t.startsWith(Qo),"hasLongOptionPrefix"),Xo=ce(t=>sn(t)&&!t.includes(X,3),"isLongOption"),er=ce(t=>sn(t)&&t.includes(X,3),"isLongOptionAndValue"),tr=ce(t=>{if(t.length!==2||t.codePointAt(0)!==se||t.codePointAt(1)===se)return!1;const e=t.codePointAt(1);return e!==void 0&&(e<48||e>57)},"isShortOption"),nr=ce(t=>!(t.length<=2||t.codePointAt(0)!==se||t.codePointAt(1)===se),"isShortOptionGroup"),ir=ce(t=>{const e=[],n=[...t];let i=-1,r=0;for(;n.length>0;){const o=n.shift();if(o===void 0)break;if(r>0?r--:i++,o===Zo){e.push({index:i,kind:"option-terminator"});const s=n.map((l,f)=>({index:i+f+1,kind:"positional",value:l}));e.push(...s),i+=n.length;break}if(tr(o)){const s=o.charAt(1);e.push({index:i,kind:"option",name:s,rawName:o});continue}if(nr(o)&&!o.includes(X)){const s=[];let l="",f=!1;for(let a=1;a<o.length;a++){const c=o.charAt(a);f?l+=c:c.codePointAt(0)===Ko?f=!0:s.push(`${Yo}${c}`)}if(f)if(s.length>0){const a=s.pop();s.push(`${a}=${l}`)}else s.push(l);n.unshift(...s),r=s.length;continue}if(Xo(o)){const s=o.slice(2);e.push({index:i,kind:"option",name:s,rawName:o});continue}if(er(o)){const s=o.indexOf(X),l=o.slice(2,s),f=o.slice(s+1);e.push({index:i,inlineValue:!0,kind:"option",name:l,rawName:o,value:f});continue}if(o.length>2&&o.codePointAt(0)===se&&o.codePointAt(1)!==se&&o.includes(X)){const s=o.indexOf(X),l=o.charAt(1),f=o.slice(s+1);e.push({index:i,inlineValue:!0,kind:"option",name:l,rawName:o,value:f});continue}e.push({index:i,kind:"positional",value:o})}return e},"parseArgsTokens");var or=Object.defineProperty,Ze=le((t,e)=>or(t,"name",{value:e,configurable:!0}),"d");const rr=/\d/,ar=Ze(t=>t===Boolean||typeof t=="function"&&t.name==="Boolean","isBooleanType"),sr=Ze(t=>typeof t=="function","isValidCustomTypeFunction"),lr=Ze((t,e,n)=>{const i=n?.debug??!1;L(i,"Validating definitions:","validation",t,"caseInsensitive:",e);const r=new Set,o=new Set,s=new Set,l=new Set;let f=0;for(const a of t){if(L(i,"Checking definition:","validation",a),!a.name)throw L(i,"Validation failed: name is required","validation"),new U("Invalid option definition: name is required");if(typeof a.name!="string")throw new U("Invalid option definition: name must be a string");if(a.name.trim()==="")throw new U("Invalid option definition: name cannot be empty");const c=e?a.name.toLowerCase():"";if(r.has(a.name)||e&&s.has(c))throw new U(`Invalid option definition: duplicate name '${a.name}'`);if(o.has(a.name)||e&&l.has(c))throw new U(`Invalid option definition: name '${a.name}' conflicts with an existing alias`);if(r.add(a.name),e&&s.add(c),a.alias!==void 0){if(typeof a.alias!="string")throw new U("Invalid option definition: alias must be a string");if(a.alias.length!==1)throw new U("Invalid option definition: alias must be a single character");if(rr.test(a.alias))throw new U("Invalid option definition: alias cannot be numeric");if(a.alias==="-")throw new U('Invalid option definition: alias cannot be "-"');const h=e?a.alias.toLowerCase():"";if(o.has(a.alias)||e&&l.has(h))throw new U(`Invalid option definition: duplicate alias '${a.alias}'`);if(r.has(a.alias)||e&&s.has(h))throw new U(`Invalid option definition: alias '${a.alias}' conflicts with an existing option name`);o.add(a.alias),e&&l.add(h)}if(a.defaultOption&&(f++,a.type!==void 0&&ar(a.type)))throw new U("Invalid option definition: defaultOption cannot be Boolean type");if(a.type!==void 0&&!(a.type===Boolean||a.type===Number||a.type===String||typeof a.type=="function"&&sr(a.type)))throw new U("Invalid option definition: invalid type")}if(f>1)throw L(i,"Validation failed: multiple defaultOptions not allowed","validation"),new U("Invalid option definition: multiple defaultOptions not allowed");L(i,"Validation completed successfully","validation")},"validateDefinitions");var cr=Object.defineProperty,ur=le((t,e)=>cr(t,"name",{value:e,configurable:!0}),"O");const pr=ur((t,e={})=>{const n=e.debug??!1;L(n,"Starting command-line-args parsing","index"),L(n,"Options:","index",e);const i={...e};i.stopAtFirstUnknown&&(i.partial=!0);const r=Array.isArray(t)?t:[t];L(n,"Normalized definitions:","index",r),lr(r,i.caseInsensitive,n?i:void 0);let{argv:o}=i;if(!o&&(o=process.argv.slice(2),process.execArgv.length>0)){const a=new Set(process.execArgv);o=o.filter(c=>!a.has(c))}L(n,"Using argv:","index",o);let s=o;i.caseInsensitive&&(s=o.map(a=>{if(a.startsWith("--")){const c=a.indexOf("="),h=(c===-1?a.slice(2):a.slice(2,c)).toLowerCase();return c===-1?`--${h}`:`--${h}${a.slice(c)}`}if(a.startsWith("-")&&!a.startsWith("--")&&a.length>1){const c=a.slice(1).split("=",2),h=c[0],p=c[1];if(!h)return a;const m=h.toLowerCase();return p===void 0?`-${m}`:`-${m}=${p}`}return a}));const l=ir(s.map(String));L(n,"Tokenized arguments:","index",l);const f=Ho(l,r,i,o);return L(n,"Command-line-args parsing completed","index"),f},"commandLineArgs");var fr=Object.defineProperty,dr=x((t,e)=>fr(t,"name",{value:e,configurable:!0}),"b$2");let hr=class{static{j(this,"Di")}static{S(this,"Vo")}static{x(this,"m")}static{dr(this,"EmptyToolbox")}result;argv;options;argument;command;commandName;env;logger;console;fs;process;runtime;rawUnknown;constructor(t,e){this.commandName=t,this.command=e}};var mr=Object.defineProperty,gr=x((t,e)=>mr(t,"name",{value:e,configurable:!0}),"n$7");let Re=class extends E{static{j(this,"Ae")}static{S(this,"$e")}static{x(this,"i")}static{gr(this,"CommandLoaderError")}commandName;constructor(e,n,i){super(`Failed to load command "${e}": ${n}`,"COMMAND_LOADER_ERROR",{commandName:e,reason:n}),this.name="CommandLoaderError",this.commandName=e,this.hint="Ensure the loader resolves to a module with a default export that is the command handler function.",i!==void 0&&(this.cause=i)}};var vr=Object.defineProperty,br=x((t,e)=>vr(t,"name",{value:e,configurable:!0}),"f$5");const yr=/^-{1,2}(\w+)(=(.+))?$/,ln=br((t,e,n,i)=>{const r=yr.exec(t);if(r===null)return{};const o=r[1];if(!o)return{};const s=n&&i?n.get(o)??i.get(o):e.find(l=>l.name===o||l.alias===o);return s!==void 0?{argName:s.name,argValue:r[3],option:s}:{}},"getParameterOption");var wr=Object.defineProperty,Je=x((t,e)=>wr(t,"name",{value:e,configurable:!0}),"e$3");const wt=Je((t,e)=>{if(e.type===void 0)return t;if(e.type.name==="Boolean"){if(t==="true"||t==="1")return e.type(!0);if(t==="false"||t==="0")return e.type(!1)}return e.type(t)},"convertType"),$r=new Set(["0","1","false","true"]),Or=Je((t,e,n,i)=>{if(e.length===0||t.length===0)return{};const r=Je((o,s)=>{const{argName:l,argValue:f,option:a}=ln(s,e,n,i),{lastOption:c}=o;return a&&be(a)&&f&&l?o.partial[l]=wt(f,a):o.lastName&&c&&be(c)&&$r.has(s)&&(o.partial[o.lastName]=wt(s,c)),{lastName:l,lastOption:a,partial:o.partial}},"getBooleanValue");return t.reduce(r,{partial:{}}).partial},"getBooleanValues");var xr=Object.defineProperty,$t=x((t,e)=>xr(t,"name",{value:e,configurable:!0}),"s$9");const Pr=new Set(["0","1","false","true"]),Ar=$t((t,e,n,i)=>{if(e.length===0||t.length===0)return t;const r=$t((o,s)=>{const{argValue:l,option:f}=ln(s,e,n,i),{lastOption:a}=o;if(a&&be(a)&&Pr.has(s)){const{args:c}=o;return{args:c.slice(0,-1)}}return f&&be(f)&&l?{args:o.args}:{args:[...o.args,s],lastOption:f}},"removeBooleanArguments");return t.reduce(r,{args:[]}).args},"removeBooleanValues");var Er=Object.defineProperty,Nr=x((t,e)=>Er(t,"name",{value:e,configurable:!0}),"o$8");const Cr=Nr(t=>{const e=new Map;for(const n of t){const i=e.get(n.name);i?e.set(n.name,{...i,...n}):e.set(n.name,n)}return[...e.values()]},"mergeArguments");var jr=Object.defineProperty,ke=x((t,e)=>jr(t,"name",{value:e,configurable:!0}),"o$7");const kr=ke(t=>{if(t===void 0)return;const e=t.toLowerCase().trim();return e==="true"||e==="1"||e==="yes"||e==="on"},"transformBooleanEnv"),_r=ke((t,e)=>{if(!t.type)return e;if(e!==void 0){if(t.type===Boolean||typeof t.type=="function"&&t.type.name==="Boolean")return kr(e);if(t.type===Number||typeof t.type=="function"&&t.type.name==="Number"){const n=Number.parseFloat(e);return Number.isNaN(n)?void 0:n}return t.type===String||typeof t.type=="function"&&t.type.name==="String"?e:t.type(e)}},"transformEnvValue"),Lr=/_./g,Tr=/^[A-Z]/,Ir=ke(t=>t.toLowerCase().replaceAll(Lr,e=>e[1]?.toUpperCase()??e).replace(Tr,e=>e.toLowerCase()),"toCamelCase"),Sr=ke(t=>{if(!t||t.length===0)return{};const e={},n=J();for(const i of t){const r=n[i.name],o=_r(i,r),s=o===void 0?i.defaultValue:o,l=Ir(i.name);e[l]=s}return e},"processEnvVariables");var Mr=Object.defineProperty,we=x((t,e)=>Mr(t,"name",{value:e,configurable:!0}),"a$5");const Ur=we(t=>{const e=new Map,n=new Map;for(const i of t)if(e.set(i.name,i),i.alias){const r=Array.isArray(i.alias)?i.alias:[i.alias];for(const o of r)n.set(o,i)}return{optionMapByAlias:n,optionMapByName:e}},"buildOptionMaps"),cn=we(async t=>{if(typeof t.__resolvedExecute__=="function")return t.__resolvedExecute__;if(typeof t.loader!="function")throw new Re(t.name,"no execute or loader defined");let e;try{e=await t.loader()}catch(i){throw new Re(t.name,i instanceof Error?i.message:String(i),i)}const n=e.default;if(typeof n!="function")throw new Re(t.name,"loader did not return a module with a default-exported handler function");return t.__resolvedExecute__=n,n},"loadLazyHandler"),Vr=we((t,e,n,i)=>{const r=new hr(t.name,t),{_all:o,_unknown:s,positionals:l}=e,f=Object.keys(n).length>0?{...o,...n}:o;Pe in f&&delete f[Pe],r.argument=l?.[Pe]??[],r.rawUnknown=[...s??[]];const a=Object.keys(i).length>0;return r.options=a?{...f,...i}:f,r.env=Sr(t.env),r},"prepareToolbox"),Br=we((t,e,n)=>{const i=t.options??[],r=i.length>0;let o=Cr(r?[...i,...n]:n);if(o.length>0){for(const a of o)if(a.multiple&&a.lazyMultiple)throw new Error(`Argument "${a.name}" cannot have both multiple and lazyMultiple options, please choose one.`)}t.argument&&(o=[{defaultOption:!0,description:t.argument.description,group:"positionals",multiple:!0,name:Pe,type:t.argument.type,typeLabel:t.argument.typeLabel},...o]);let s,l;if(r){const{optionMapByAlias:a,optionMapByName:c}=Ur(i);s=Ar(e,i,c,a),l=Or(e,i,c,a)}else s=e,l={};const f=pr(o,{argv:s,camelCase:!0,partial:!0,stopAtFirstUnknown:!0});return{arguments_:o,booleanValues:l,parsedArgs:f}},"processCommandArgs"),oe=we(async(t,e,n)=>typeof t.execute=="function"?t.execute(e):(await cn(t))(e),"executeCommand");var Dr=Object.defineProperty,Rr=x((t,e)=>Dr(t,"name",{value:e,configurable:!0}),"n$6");let zr=class extends E{static{j(this,"fo")}static{S(this,"fi")}static{x(this,"s")}static{Rr(this,"CommandValidationError")}commandName;missingOptions;constructor(t,e){super(`Command "${t}" is missing required options: ${e.join(", ")}`,"COMMAND_VALIDATION_ERROR",{commandName:t,missingOptions:e}),this.name="CommandValidationError",this.commandName=t,this.missingOptions=e,this.hint=`Provide the following required options: ${e.join(", ")}`}};var Fr=Object.defineProperty,Wr=x((t,e)=>Fr(t,"name",{value:e,configurable:!0}),"t$5");const Ot=Wr((t,e,n=!1)=>{const i=[];for(const r of t)if(!(!n&&!r.required)&&e[r.name]===void 0){if(r.type?.name==="Boolean"){e[r.name]=!1;continue}i.push(r)}return i},"listMissingArguments");var qr=Object.defineProperty,un=x((t,e)=>qr(t,"name",{value:e,configurable:!0}),"n$5");const Gr=un((t,e)=>e.includes(t)?!0:Math.abs(t.length-e.length)>t.length/2?!1:Rt(t,e)<=t.length/3,"isSimilar"),Q=un((t,e)=>{const n=t.toLowerCase();return e.filter(i=>Gr(i.toLowerCase(),n))},"findAlternatives");var Hr=Object.defineProperty,_e=x((t,e)=>Hr(t,"name",{value:e,configurable:!0}),"a$4");const Jr=_e((t,e)=>{const n=[];if(t._unknown&&t._unknown.forEach(i=>{const r=i.startsWith("--");let o=`Found unknown ${r?"option":"argument"} "${i}"`;if(r){const s=Q(i.replace("--",""),(e.options??[]).map(l=>l.name));if(s.length>0){const[l,...f]=s.map(a=>`--${a}`);o+=f.length>0?`, did you mean ${l??""} or ${f.join(", ")}?`:`, did you mean ${l??""}?`}}n.push(o)}),n.length>0)throw new Error(n.join(`
4
- `))},"validateUnknownOptions"),Kr=_e((t,e,n)=>{const i=n.__requiredOptions__,r=i?Ot(i,e,!0):Ot(t,e,!1);if(r.length>0)throw new zr(n.name,r.map(o=>o.name));e._unknown&&e._unknown.length>0&&!n.argument&&Jr(e,n)},"validateRequiredOptions"),Zr=_e((t,e,n)=>{const i=n.__conflictingOptions__??t.filter(r=>r.conflicts!==void 0);if(i.length>0){const r=i.find(o=>Array.isArray(o.conflicts)?o.conflicts.some(s=>e[s]!==void 0)&&e[o.name]!==void 0:e[o.conflicts]!==void 0&&e[o.name]!==void 0);if(r)throw new qt(r.name,typeof r.conflicts=="string"?r.conflicts:r.conflicts?.[0]??"unknown")}},"validateConflictingOptions"),Yr=_e(t=>{if(!Array.isArray(t.options))return;const e=new Map,n=new Map;for(const r of t.options){if(r.name){const o=e.get(r.name)??[];o.push(r),e.set(r.name,o)}if(typeof r.alias=="string"&&r.alias.length>0){const o=n.get(r.alias)??[];o.push(r),n.set(r.alias,o)}else if(Array.isArray(r.alias)){for(const o of r.alias)if(o.length>0){const s=n.get(o)??[];s.push(r),n.set(o,s)}}}const i=[];for(const[r,o]of e)o.length>1&&i.push(`Duplicate option name "${r}" in command "${t.name}": ${JSON.stringify(o)}`);for(const[r,o]of n)o.length>1&&i.push(`Duplicate option alias "-${r}" used by options ${o.map(s=>`"${s.name}"`).join(", ")} in command "${t.name}"`);if(i.length>0)throw new Error(i.join(`
5
- `))},"validateDuplicateOptions");var Qr=Object.defineProperty,Ye=x((t,e)=>Qr(t,"name",{value:e,configurable:!0}),"s$5");const Xr=Ye((t,e)=>{if(e.length===0)return{argv:[],commandPath:void 0};const n=[];let i;for(let r=1;r<=e.length;r+=1){const o=e[r-1];if(o===void 0||o.startsWith("-"))break;n.push(o);const s=n.join(" ");t.has(s)&&(i={commandPath:[...n],depth:r})}return i?{argv:e.slice(i.depth),commandPath:i.commandPath}:{argv:e,commandPath:void 0}},"parseNestedCommand"),Y=Ye(t=>t.join(" "),"getCommandPathKey"),xt=Ye((t,e)=>e&&e.length>0?[...e,t]:[t],"getFullCommandPath");var ea=Object.defineProperty,pn=x((t,e)=>ea(t,"name",{value:e,configurable:!0}),"a$3"),ta=Object.defineProperty,fn=pn((t,e)=>ta(t,"name",{value:e,configurable:!0}),"a"),na=Object.defineProperty,ia=fn((t,e)=>na(t,"name",{value:e,configurable:!0}),"a");let dn=class{static{j(this,"_t")}static{S(this,"Nt")}static{x(this,"u")}static{pn(this,"n")}static{fn(this,"s")}static{ia(this,"LRUCache")}capacity;cache;constructor(t){this.capacity=t,this.cache=new Map}get(t){if(!this.cache.has(t))return;const e=this.cache.get(t);return this.cache.delete(t),this.cache.set(t,e),e}has(t){return this.cache.has(t)}set(t,e){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.capacity){const n=this.cache.keys().next().value;n!==void 0&&this.cache.delete(n)}this.cache.set(t,e)}delete(t){this.cache.delete(t)}clear(){this.cache.clear()}size(){return this.cache.size}};var oa=Object.defineProperty,ra=x((t,e)=>oa(t,"name",{value:e,configurable:!0}),"r$5"),aa=Object.defineProperty,sa=ra((t,e)=>aa(t,"name",{value:e,configurable:!0}),"a"),la=Object.defineProperty,ca=sa((t,e)=>la(t,"name",{value:e,configurable:!0}),"s");const ua=ca((t,e)=>typeof t!="string"||t===""?"":(e?.locale?t[0].toLocaleLowerCase(e.locale):t[0].toLowerCase())+t.slice(1),"lowerFirst");var pa=Object.defineProperty,fa=x((t,e)=>pa(t,"name",{value:e,configurable:!0}),"T"),da=Object.defineProperty,Le=fa((t,e)=>da(t,"name",{value:e,configurable:!0}),"j");const ha=Zi(import.meta.url),he=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ma=Le(t=>{if(typeof he<"u"&&he.versions&&he.versions.node){const[e,n]=he.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return he.getBuiltinModule(t)}return ha(t)},"__cjs_getBuiltinModule"),{stripVTControlCharacters:ga}=ma("node:util");var va=Object.defineProperty,ba=Le((t,e)=>va(t,"name",{value:e,configurable:!0}),"a");const ze=new dn(1e3),ya=/[.*+?^${}()|[\]\\]/g,wa=ba(t=>{const e=t.join("");if(ze.has(e)){const r=ze.get(e);return r.lastIndex=0,r}const n=t.map(r=>r.replaceAll(ya,String.raw`\$&`)).join("|"),i=new RegExp(n,"g");return ze.set(e,i),i},"getSeparatorsRegex");var $a=Object.defineProperty,Oa=Le((t,e)=>$a(t,"name",{value:e,configurable:!0}),"t");const xa=Oa(t=>{const e=[];let n=0,i;for(K.lastIndex=0;(i=K.exec(t))!==null;)i.index>n&&e.push(t.slice(n,i.index)),e.push(i[0]),n=K.lastIndex;return n<t.length&&e.push(t.slice(n)),e.filter(Boolean)},"splitByEmoji");var Pa=Object.defineProperty,k=Le((t,e)=>Pa(t,"name",{value:e,configurable:!0}),"u");const Aa=/[ČŠŽĐ]/i,hn=new Uint8Array(128),mn=new Uint8Array(128),gn=new Uint8Array(128);for(let t=0;t<128;t++)hn[t]=t>=65&&t<=90?1:0,mn[t]=t>=97&&t<=122?1:0,gn[t]=t>=48&&t<=57?1:0;const Fe=k(t=>hn[t],"isUpper"),Pt=k(t=>mn[t],"isLower"),We=k(t=>gn[t],"isDigit"),H=k((t,e,n,i,r)=>{if(t.length===0)return[];let o=!1;const s=Object.values(e);for(const m of s)if(m(t[0])){o=!0;break}if(!o&&!n)return[t];const l=[...t],f=[];let a=l[0],c="other";const h=Object.entries(e);for(const m of h){const[u,v]=m;if(v(l[0])){c=u;break}}let p=n&&i?l[0]===l[0].toLocaleUpperCase(i):!1;for(let m=1;m<l.length;m++){const u=l[m];let v="other";for(const $ of h){const[A,N]=$;if(N(u)){v=A;break}}const w=n&&i?u===u.toLocaleUpperCase(i):!1;let b=!1;r?b=r(c,v,p,w,u,m,l):(c!==v&&c!=="other"&&v!=="other"&&(b=!0),n&&v!=="other"&&!p&&w&&(b=!0)),b?(f.push(a),a=u):a+=u,c=v,n&&(p=w)}return a&&a.length>0&&f.push(a),f.length>0?f:[t]},"handleScriptTransitions"),Ea=k((t,e,n,i)=>{if(n.size===0)return e;for(const r of n)if(t.startsWith(r,e))return i.push(r),e+r.length;return e},"detectAndProcessAcronym"),vn=k((t,e=new Set)=>{if(t.length===0)return[];if(t.toUpperCase()===t)return[t];let n=0;const i=[],r=t.length;for(let o=1;o<r;o++){const s=Ea(t,n,e,i);if(s!==n){n=s,o=n-1;continue}const l=t.codePointAt(o-1),f=t.codePointAt(o),a=l&&l<128&&Fe(l),c=f&&f<128&&Fe(f),h=l&&l<128&&Pt(l),p=l&&l<128&&We(l),m=f&&f<128&&We(f);if(h&&c){i.push(t.slice(n,o)),n=o;continue}if(p&&!m||!p&&m){i.push(t.slice(n,o)),n=o;continue}if(m&&!p){let u=!1,v=!1;if(o+1<r){const w=t.codePointAt(o+1);u=w&&w<128&&Fe(w),v=w&&w<128&&We(w)}if(!v&&u){i.push(t.slice(n,o),t.slice(o,o+1)),n=o+1;continue}}if(o+1<r){const u=t.codePointAt(o+1),v=u&&u<128&&Pt(u);if(a&&c&&v){const w=t.slice(n,o+1);e.has(w)||(i.push(t.slice(n,o)),n=o)}}}return n<r&&i.push(t.slice(n)),i.filter(o=>o!=="")},"splitCamelCaseFast"),bn=k((t,e,n)=>{if(t.length===0)return[];const i=t===t.toLocaleUpperCase(e);if(e.startsWith("de")){if(!i&&t.replaceAll("ß","SS")===t.toLocaleUpperCase(e))return[t];const a=[...t],c=a.length,h=[];let p=a[0],m=a[0]===a[0].toLocaleUpperCase(e),u=m,v=m?0:-1;for(let w=1;w<c;w++){const b=a[w],$=b===b.toLocaleUpperCase(e);if($===m)p+=b;else if($)p&&p.length>0&&(h.push(p),p=b),u=!0,v=w;else{if(u&&w-v>1){const A=a[w-1],N=p.slice(0,-1);N&&N.length>0&&h.push(N),p=A+b}else p+=b;u=!1,v=-1}m=$}return p&&p.length>0&&h.push(p),h}if(e.startsWith("uk")||e.startsWith("ru")||e.startsWith("bg")||e.startsWith("sr")||e.startsWith("mk")||e.startsWith("be")){if(!ie.test(t)&&!M.test(t))return[t];const a=[...t],c=a.length,h=[];let p=a[0];const m=a[0];let u;ie.test(m)?u=1:M.test(m)?u=2:u=0;let v=m===m.toLocaleUpperCase(e);for(let b=1;b<c;b++){const $=a[b];let A;ie.test($)?A=1:M.test($)?A=2:A=0;const N=$===$.toLocaleUpperCase(e);u!==A&&(u===1||u===2)&&(A===1||A===2)||A===u&&!v&&N?(h.push(p),p=$):p+=$,u=A,v=N}p&&p.length>0&&h.push(p);const w=[];for(let b=0;b<h.length;b++)b<h.length-1&&h[b].length===1&&M.test(h[b])&&ie.test(h[b+1][0])?(w.push(h[b]+h[b+1]),b+=1):w.push(h[b]);return w}if(e.startsWith("el")){if(!Be.test(t)&&!M.test(t))return[t];const a=[];rt.lastIndex=0;let c;for(;(c=rt.exec(t))!==null;)a.push(c[0]);a.length===0&&a.push(t);const h=[];if(a.length===1){const p=a[0];if(!p||!Be.test(p[0])||p.length===1)return[p??t]}for(const p of a){if(!p)continue;if(!Be.test(p[0])||p.length===1){h.push(p);continue}const m=p.length;let u=p[0],v=p[0]===p[0].toLocaleUpperCase(e);for(let w=1;w<m;w++){const b=p[w],$=b===b.toLocaleUpperCase(e);!v&&$?(h.push(u),u=b):u+=b,v=$}u&&h.push(u)}return h}if(e.startsWith("ja")||e.startsWith("ko")){const a=e.startsWith("ja"),c=a?{hiragana:k(p=>Ni.test(p),"hiragana"),kanji:k(p=>lt.test(p),"kanji"),katakana:k(p=>ji.test(p),"katakana"),latin:k(p=>M.test(p),"latin")}:{hangul:k(p=>at.test(p),"hangul"),latin:k(p=>M.test(p),"latin")},h=new Set(["が","で","と","に","の","は","へ","も","や","を"]);if(a){const p=H(t,c,!1,e,(u,v)=>u==="hiragana"&&v==="katakana"||u==="katakana"&&v==="hiragana"||u==="hiragana"&&v==="latin"||u==="katakana"&&v==="latin"||u==="kanji"&&v==="latin"||u==="latin"&&(v==="hiragana"||v==="katakana"||v==="kanji")),m=[];for(const u of p){const v=u;v.length===1&&h.has(v)&&m.length>0?m[m.length-1]=m.at(-1)+v:m.push(v)}return m.length>0?m:[t]}return H(t,c,!1,e,(p,m)=>p==="hangul"&&m==="latin"||p==="latin"&&m==="hangul")}if(e.startsWith("sl")){const a=[...t],c=a.length,h=[];let p=a[0],m=a[0]===a[0].toLocaleUpperCase(e);for(let u=1;u<c;u++){const v=a[u],w=v===v.toLocaleUpperCase(e),b=Aa.test(v),$=u<c-1&&a[u+1]===a[u+1].toLocaleUpperCase(e);!m&&w||b&&$?(h.push(p),p=v,b&&$&&(h.push(p),p="")):p+=v,m=w}return p&&p.length>0&&h.push(p),h}if(e.startsWith("zh"))return H(t,{han:k(a=>lt.test(a),"han"),latin:k(a=>M.test(a),"latin")},!1,e);if(["ar","fa","he","ur"].includes(e.split("-")[0])){const a=k(c=>st.test(c)||ot.test(c),"isRtlChar");return H(t,{latin:k(c=>M.test(c),"latin"),rtl:k(c=>a(c),"rtl")},!1,e)}if(["am","bn","gu","hi","km","kn","lo","ml","mr","ne","or","pa","si","ta","te","th"].includes(e.split("-")[0])){const a=k(c=>xi.test(c)||Oi.test(c)||Ai.test(c)||Ei.test(c)||Ci.test(c)||Mi.test(c)||Ui.test(c)||Li.test(c)||Si.test(c)||Vi.test(c)||_i.test(c)||Bi.test(c)||Ti.test(c)||Pi.test(c)||ki.test(c)||Ii.test(c),"isIndicChar");return H(t,{indic:k(c=>a(c),"indic"),latin:k(c=>M.test(c),"latin")},!1,e)}if(["be","bg","ru","sr","uk"].includes(e))return H(t,{cyrillic:k(a=>ie.test(a),"cyrillic"),latin:k(a=>M.test(a),"latin")},!0,e);if(["ar","fa","he"].includes(e))return H(t,{latin:k(a=>M.test(a),"latin"),rtl:k(a=>st.test(a)||ot.test(a),"rtl")},!1,e);if(e.startsWith("ko"))return H(t,{hangul:k(a=>at.test(a),"hangul"),latin:k(a=>M.test(a),"latin")},!1,e);if(e.startsWith("uz")){if(!ie.test(t)&&!M.test(t))return[t];const a=[...t],c=a.length,h=[];let p=a[0],m=a[0]===a[0].toLocaleUpperCase(e);for(let u=1;u<c;u++){const v=a[u],w=v===v.toLocaleUpperCase(e);if(ct.test(v)||ct.test(a[u-1])){p+=v;continue}!m&&w?(h.push(p),p=v):p+=v,m=w}return p&&p.length>0&&h.push(p),h}const r=[...t],o=r.length,s=[];let l=r[0],f=r[0]===r[0].toLocaleUpperCase(e);for(const a of n)if(t.startsWith(a)){s.push(a),l=r[a.length],f=l===l.toLocaleUpperCase(e);break}for(let a=1;a<o;a++){const c=r[a],h=c===c.toLocaleUpperCase(e);let p=0;for(const m of n)if(t.startsWith(m,a)){s.push(l,m),p=m.length,l="";const u=m.at(-1);u&&(f=u===u.toLocaleUpperCase(e));break}if(p>0){a+=p-1;continue}!f&&h?(s.push(l),l=c):l+=c,f=h}return l&&s.push(l),s},"splitCamelCaseLocale"),Na=k((t,e,n)=>{const i=[],r=ve.test(t)?t.split(ve).filter(Boolean):[t];for(const o of r){const s=o;if(ve.test(s))i.push(s);else{K.lastIndex=0;const l=K.test(s)?xa(s).filter(Boolean):[s];for(const f of l)if(K.lastIndex=0,K.test(f))i.push(f);else if(e){const a=e.toLowerCase().split("-")[0];i.push(...bn(f,a,n))}else i.push(...vn(f,n))}}return i},"processTextWithAnsiEmoji"),Ca=k((t,e={})=>{if(!t||typeof t!="string")return[];const{handleAnsi:n=!1,handleEmoji:i=!1,knownAcronyms:r=[],locale:o,normalize:s=!1,separators:l,stripAnsi:f=!1,stripEmoji:a=!1}=e,c=new Set([...r].toSorted((b,$)=>$.length-b.length));let h=t;f&&(h=ga(h)),a&&(h=Di(h));let p;Array.isArray(l)?p=wa(l):l instanceof RegExp?p=l:p=$i;const m=[];let u=h;const v=p.flags.includes("g")?p:new RegExp(p.source,`${p.flags}g`);for(;u.length>0;){const b=v.exec(u);if(!b){u===".."?m.push(".."):u==="."?m.push("."):u.length>0&&m.push(u);break}const $=b.index,A=b[0],N=A.length,d=u.slice(0,$),g=u.slice($+N);if(A.startsWith("../"))m.push(".."),u=u.slice($+3);else if(A.startsWith("./"))m.push("."),u=u.slice($+2);else if($===0&&A==="..")m.push(".."),u=u.slice(2);else if($===0&&A===".")m.push("."),u=u.slice(1);else{d.length>0&&m.push(d);let y=0;for(;(y=A.indexOf("../",y))!==-1;)m.push(".."),y+=3;for(y=0;(y=A.indexOf("./",y))!==-1;)(y===0||A[y-1]!==".")&&m.push("."),y+=2;let O=g;for(;O.startsWith("../");)m.push(".."),O=O.slice(3);for(;O.startsWith("./");)m.push("."),O=O.slice(2);if(O===".."){m.push("..");break}else if(O==="."){m.push(".");break}else u=O}v.lastIndex=0}if(m.length===0){const b=h.split(p).filter(Boolean);m.push(...b)}let w=[];for(const b of m)n||i?w.push(...Na(b,o,c)):o?w.push(...bn(b,o,c)):w.push(...vn(b,c));return s&&(w=w.map(b=>c.has(b)?b:o&&b===b.toLocaleUpperCase(o)?b[0]+b.slice(1).toLocaleLowerCase(o):b.toUpperCase()===b&&!c.has(b)?b.slice(0,1)+b.slice(1).toLowerCase():b)),w},"splitByCase");var ja=Object.defineProperty,ka=x((t,e)=>ja(t,"name",{value:e,configurable:!0}),"r$4"),_a=Object.defineProperty,La=ka((t,e)=>_a(t,"name",{value:e,configurable:!0}),"o"),Ta=Object.defineProperty,Ia=La((t,e)=>Ta(t,"name",{value:e,configurable:!0}),"s");const Sa=Ia((t,e)=>typeof t!="string"||t===""?"":(e?.locale?t[0].toLocaleUpperCase(e.locale):t[0].toUpperCase())+t.slice(1),"upperFirst");var Ma=Object.defineProperty,Ua=x((t,e)=>Ma(t,"name",{value:e,configurable:!0}),"r$3"),Va=Object.defineProperty,Ba=Ua((t,e)=>Va(t,"name",{value:e,configurable:!0}),"r"),Da=Object.defineProperty,Ra=Ba((t,e)=>Da(t,"name",{value:e,configurable:!0}),"n");const za=Ra((t,e)=>`${t}::${e?.joiner??""}::${e?.locale??""}::${e?.knownAcronyms?.join(",")??""}::${e?.normalize?"true":"false"}`,"generateCacheKey");var Fa=Object.defineProperty,Wa=x((t,e)=>Fa(t,"name",{value:e,configurable:!0}),"i$3"),qa=Object.defineProperty,Ga=Wa((t,e)=>qa(t,"name",{value:e,configurable:!0}),"f"),Ha=Object.defineProperty,Ja=Ga((t,e)=>Ha(t,"name",{value:e,configurable:!0}),"l");const Ka=Ja((t,e)=>{const{length:n}=t;if(n===0)return"";if(n===1)return t[0];const i=[];let r="",o="";for(let s=0;s<n;s++){const l=t[s];if(ve.test(l)){r?(i.push(r+o+l),r="",o=""):(i.length>0&&i.push(e),r=l);continue}r?(o&&(o+=e),o+=l):(i.length>0&&i.push(e),i.push(l))}return i.join("")},"joinSegments");var Za=Object.defineProperty,Ya=x((t,e)=>Za(t,"name",{value:e,configurable:!0}),"r$2"),Qa=Object.defineProperty,Xa=Ya((t,e)=>Qa(t,"name",{value:e,configurable:!0}),"a"),es=Object.defineProperty,ts=Xa((t,e)=>es(t,"name",{value:e,configurable:!0}),"e");const ns=/(?<![a-zß])SS(?![a-z])/g,is=ts(t=>t.replaceAll(ns,"ß"),"normalizeGermanEszett");var os=Object.defineProperty,rs=x((t,e)=>os(t,"name",{value:e,configurable:!0}),"c$2"),as=Object.defineProperty,ss=rs((t,e)=>as(t,"name",{value:e,configurable:!0}),"c"),ls=Object.defineProperty,cs=ss((t,e)=>ls(t,"name",{value:e,configurable:!0}),"o");const us=new dn(1e3),yn=cs((t,e)=>{if(typeof t!="string"||!t)return"";const n=e?.cache??!1,i=e?.cacheStore??us;let r;if(n&&(r=za(t,e)),n&&r&&i.has(r))return i.get(r);let o=!0;const s=Ka(Ca(t,{handleAnsi:e?.handleAnsi,handleEmoji:e?.handleEmoji,knownAcronyms:e?.knownAcronyms,locale:e?.locale,normalize:e?.normalize,separators:void 0,stripAnsi:e?.stripAnsi,stripEmoji:e?.stripEmoji}).map(l=>{if(e?.handleAnsi&&ve.test(l))return l;const f=e?.locale?.startsWith("de")?is(l):l,a=e?.locale?f.toLocaleLowerCase(e.locale):f.toLowerCase();return o?(o=!1,ua(a,e)):Sa(a,e)}),"");return n&&r&&i.set(r,s),s},"camelCase");var ps=Object.defineProperty,Te=x((t,e)=>ps(t,"name",{value:e,configurable:!0}),"a$2");const fs=Te(t=>{t.options?.forEach(e=>{e.__camelCaseName__=yn(e.name)})},"processOptionNames"),ds=Te(t=>{if(!Array.isArray(t.options)||t.options.length===0)return;const e=new Set;for(const i of t.options)e.add(i.name);const n=[];for(const i of t.options)if(i.name.startsWith("no-")){const r=i.name.replace(/^no-/,"");if(!e.has(r)){if(i.type!==Boolean)throw new Error(`Cannot add negated option "${i.name}" to command "${t.name}" because it is not a boolean.`);const o={...i,defaultValue:i.defaultValue===void 0?!0:!i.defaultValue,name:r};n.push(o),e.add(r)}}n.length>0&&t.options.push(...n)},"addNegatableOptions"),hs=Te((t,e)=>{if(!e.options||e.options.length===0)return;const{options:n}=t,i=new Map;for(const o of e.options)if(o.name.startsWith("no-")){const s=yn(o.name);i.set(s,o)}const r=Object.keys(n).filter(o=>i.has(o));if(r.length!==0)for(const o of r){const s=o.charAt(2);if(!s)continue;const l=s.toLowerCase()+o.slice(3),f=i.get(o);f&&(f.__negated__=!0),n[l]=!n[o],Reflect.deleteProperty(n,o)}},"mapNegatableOptions"),ms=Te((t,e)=>{if(!e.options||e.options.length===0)return;const n=new Map;for(const r of e.options)r.__camelCaseName__&&r.__negated__===void 0&&r.implies!==void 0&&n.set(r.__camelCaseName__,r);if(n.size===0)return;const{options:i}=t;for(const r of Object.keys(i)){const o=n.get(r);if(o?.implies){const{implies:s}=o;for(const[l,f]of Object.entries(s))i[l]===void 0&&(i[l]=f)}}},"mapImpliedOptions");var gs=Object.defineProperty,Ie=x((t,e)=>gs(t,"name",{value:e,configurable:!0}),"e$2");const vs=Ie(()=>!!process.versions.electron,"isElectronApp"),bs=Ie(()=>vs()&&!process.defaultApp,"isBundledElectronApp"),ys=Ie(()=>bs()?0:1,"getProcessArgvBinIndex"),ws=Ie(t=>t.slice(ys()+1),"hideBin");var $s=Object.defineProperty,wn=x((t,e)=>$s(t,"name",{value:e,configurable:!0}),"e$1");const Os=" ",xs=wn((t,e)=>t===e?!0:t.length!==e.length?!1:t.every((n,i)=>n===e[i]),"equals"),Ps=wn(t=>{if(typeof t=="string")return t.split(Os);const e=Ae();return xs(t,e)?ws(t):t},"parseRawCommand");var As=Object.defineProperty,qe=x((t,e)=>As(t,"name",{value:e,configurable:!0}),"r");const Es=qe(t=>{const e=qe(o=>{t.error(`Uncaught exception: ${o.message||o}`),o.stack&&t.error(o.stack),q(1)},"uncaughtExceptionHandler"),n=qe((o,s)=>{if(o instanceof Error)t.error(`Promise rejection: ${o.message||o}`),o.stack&&t.error(o.stack);else{let l;if(typeof o=="string")l=o;else try{l=JSON.stringify(o)}catch{l=String(o)}t.error(`Promise rejection: ${l}`)}q(1)},"unhandledRejectionHandler"),i=nt("uncaughtException",e),r=nt("unhandledRejection",n);return()=>{i(),r()}},"registerExceptionHandler");var Ns=Object.defineProperty,ue=x((t,e)=>Ns(t,"name",{value:e,configurable:!0}),"e");const Ee=100,$n=/^[a-z][\w-]*$/i,Ne=ue((t,e)=>{if(typeof t!="string"||t.trim().length===0)throw new E(`${e} must be a non-empty string`,"INVALID_INPUT",{fieldName:e,value:t});return t.trim()},"validateNonEmptyString"),At=ue((t,e)=>{if(!Array.isArray(t)||!t.every(n=>typeof n=="string"))throw new E(`${e} must be an array of strings`,"INVALID_INPUT",{fieldName:e,value:t});return t},"validateStringArray");ue((t,e)=>{if(typeof t!="function")throw new E(`${e} must be a function`,"INVALID_INPUT",{fieldName:e,value:t});return t},"validateFunction");const Ge=ue((t,e)=>{if(typeof t!="object"||t===null)throw new E(`${e} must be an object`,"INVALID_INPUT",{fieldName:e,value:t});return t},"validateObject"),Oe=ue(t=>{const e=Ne(t,"Command name");if(e.length>Ee)throw new E(`Command name is too long (maximum ${String(Ee)} characters)`,"INVALID_COMMAND_NAME",{commandName:e,length:e.length});if(e.includes("..")||e.includes("/")||e.includes("\\")||e.includes(";")||e.includes("|")||e.includes("&"))throw new E(`Command name "${e}" contains invalid characters`,"INVALID_COMMAND_NAME",{commandName:e});if(!$n.test(e))throw new E(`Command name "${e}" must start with a letter and contain only letters, numbers, hyphens, and underscores`,"INVALID_COMMAND_NAME",{commandName:e});return e},"validateCommandName");ue(t=>{const e=Ne(t,"Plugin name");if(e.length>Ee)throw new E(`Plugin name is too long (maximum ${String(Ee)} characters)`,"INVALID_PLUGIN_NAME",{length:e.length,pluginName:e});if(e.includes("..")||e.includes("/")||e.includes("\\")||e.includes(";")||e.includes("|")||e.includes("&"))throw new E(`Plugin name "${e}" contains invalid characters`,"INVALID_PLUGIN_NAME",{pluginName:e});if(!$n.test(e))throw new E(`Plugin name "${e}" must start with a letter and contain only letters, numbers, hyphens, and underscores`,"INVALID_PLUGIN_NAME",{pluginName:e});return e},"validatePluginName");var Cs=Object.defineProperty,Se=x((t,e)=>Cs(t,"name",{value:e,configurable:!0}),"s");const js=new Set([`
6
- `,"\r"," ","\0",'"',"$","&","'","(",")",";","<",">","[","\\","]","`","{","|","}"]),ks=/^[A-Z]:/i,_s=Se((t,e=!0)=>{if(typeof t!="string")throw new TypeError("Argument must be a string");if(t.length>1e4)throw new Error(`Argument is too long (maximum ${String(1e4)} characters)`);if(e){for(const n of t)if(js.has(n))throw new Error(`Argument contains dangerous character: ${n}`)}return t.trim()},"sanitizeArgument"),Et=Se((t,e=!0)=>{if(!Array.isArray(t))throw new TypeError("Arguments must be an array");if(t.length>100)throw new Error(`Too many arguments (maximum ${String(100)})`);return t.map(n=>_s(n,e))},"sanitizeArguments");Se(t=>{if(typeof t!="string")throw new TypeError("Path must be a string");const e=t.trim();if(e.split(/[/\\]/).includes(".."))throw new Error("Path contains directory traversal sequences");if(e.startsWith("/")||ks.test(e))throw new Error("Absolute paths are not allowed");if(e.length>1e3)throw new Error("Path is too long");return e},"validateSafePath");class jc{static{j(this,"vs")}static{S(this,"Ar")}static{x(this,"RateLimiter")}static{Se(this,"RateLimiter")}attempts=new Map;maxAttempts;windowMs;constructor(e=5,n=6e4){if(e<=0||n<=0)throw new Error("maxAttempts and windowMs must be positive numbers");this.maxAttempts=e,this.windowMs=n}checkLimit(e){const n=Date.now(),i=this.attempts.get(e);return!i||n>i.resetTime?(this.attempts.set(e,{count:1,resetTime:n+this.windowMs}),this.cleanup(n),!0):i.count>=this.maxAttempts?!1:(i.count+=1,!0)}reset(e){this.attempts.delete(e)}cleanup(e){for(const[n,i]of this.attempts.entries())e>i.resetTime&&this.attempts.delete(n)}}var Ls=Object.defineProperty,B=x((t,e)=>Ls(t,"name",{value:e,configurable:!0}),"b");const Ts=/^-([^\d-])$/,Is=/^--(\S+)/,Ss=/^-([^\d-]{2,})$/,He=B(t=>Ts.test(t)||Is.test(t)||Ss.test(t),"isOption"),Ms={access:B((t,e)=>Ki(t,e),"access"),mkdir:B((t,e)=>Ji(t,e),"mkdir"),readdir:B(t=>Hi(t),"readdir"),readFile:B((async(t,e)=>e===void 0?ut(t):ut(t,e)),"readFile"),rm:B((t,e)=>Gi(t,e),"rm"),stat:B(t=>qi(t),"stat"),writeFile:B((t,e,n)=>Wi(t,e,n),"writeFile")};let Us=class On{static{j(this,"je")}static{S(this,"Tt")}static{x(this,"Cli")}static{B(this,"Cli")}#t;#e;#c;#u;#f;#d;#y;#w;#$;#O;#x;#p;#n;#i;#o;#r;#a;#h=!1;#P;#A=!1;#m;#g;#v;#l=[];#k(){return this.#m===void 0&&(this.#m=[...this.#i.keys()]),this.#m}#E(){return this.#g===void 0&&(this.#g=[...this.#n.keys()]),this.#g}#s(){return this.#v===void 0&&(this.#v=[...this.#k(),...this.#E()]),this.#v}#N(){return this.#l.length===0?$e:[...$e,...this.#l]}#C(){this.#m=void 0,this.#g=void 0,this.#v=void 0}#b(){if(this.#c===void 0){const e=Ps(this.#e.argv);this.#c=Et(e,!1),this.#_()}return this.#c}#_(){if(!this.#c)return;const e=J();let n=!1;for(const i of this.#c){if(i==="--quiet"||i==="-q"){e.CEREBRO_OUTPUT_LEVEL=String(Rn),n=!0;break}if(i==="--verbose"||i==="-v"){e.CEREBRO_OUTPUT_LEVEL=String(zn),n=!0;break}if(i==="--debug"){e.CEREBRO_OUTPUT_LEVEL=String(re),n=!0;break}}n||(e.CEREBRO_OUTPUT_LEVEL=Object.hasOwn(e,"DEBUG")?String(re):String(tt))}#L(){this.#A||(this.#P=Es(this.#t),this.#A=!0)}#T(){return{arch:ri(),argv:this.#b(),cwd:this.#u,env:this.#O??J(),exit:this.#$??(e=>q(e??0)),platform:oi(),stdin:this.#x}}#j(e,n,i,r){this.#t.debug(`command '${r}' found, parsing command args: ${n.join(", ")}`);const{arguments_:o,booleanValues:s,parsedArgs:l}=Br(e,n,this.#N()),f=Object.keys(s).length>0;let a=l;f&&(a={...l,_all:{...l._all,...s}}),Kr(o,a,e);const c=Vr(e,l,s,i);c.runtime=this,c.argv=this.#b(),c.fs=this.#w??Ms,c.process=this.#T(),c.console=this.#t;const h=e.options&&e.options.length>0;if(h&&e.options){const p=e.options.filter(m=>m.name.startsWith("no-"));for(const m of p){const u=m.name.replace(/^no-/,""),v=`--${m.name}`,w=`--${u}`,b=n.includes(v),$=n.includes(w);if(b&&$)throw new qt(u,m.name)}}return h&&(hs(c,e),ms(c,e)),Zr(o,c.options,e),J().CEREBRO_OUTPUT_LEVEL===String(re)&&(this.#t.debug("command options parsed from options:"),this.#t.debug(JSON.stringify(c.options,null,2)),this.#t.debug("command argument parsed from argument:"),this.#t.debug(JSON.stringify(c.argument,null,2))),{arguments_:o,booleanValues:s,commandArgs:a,parsedArgs:l,toolbox:c}}constructor(e,n={}){if(typeof e!="string"||e.trim().length===0)throw new E("CLI name must be a non-empty string","INVALID_INPUT",{cliName:e});this.#f=e.trim();const i=n.argv??Ae(),r=n.cwd??ii();if(this.#e={...n,argv:i,cwd:r},this.#e.argv&&!Array.isArray(this.#e.argv))throw new E("CLI argv option must be an array of strings","INVALID_INPUT",{argv:this.#e.argv});if(this.#e.cwd&&typeof this.#e.cwd!="string")throw new E("CLI cwd option must be a string","INVALID_INPUT",{cwd:this.#e.cwd});if(this.#e.packageName&&typeof this.#e.packageName!="string")throw new E("CLI packageName option must be a string","INVALID_INPUT",{packageName:this.#e.packageName});if(this.#e.packageVersion&&typeof this.#e.packageVersion!="string")throw new E("CLI packageVersion option must be a string","INVALID_INPUT",{packageVersion:this.#e.packageVersion});const o=J();if(o.CEREBRO_OUTPUT_LEVEL=String(tt),typeof this.#e.logger=="object"){const c=["debug","error","info","log","warn"],h=[],p=this.#e.logger;for(const m of c)typeof p[m]!="function"&&h.push(m);if(h.length>0)throw new E(`Logger object is missing required methods: ${h.join(", ")}`,"INVALID_INPUT",{logger:this.#e.logger,missingMethods:h});this.#t=this.#e.logger}else this.#t={...console,debug:B((...c)=>{o.CEREBRO_OUTPUT_LEVEL===String(re)&&console.debug(...c)},"debug")};this.#d=this.#e.packageVersion,this.#y=this.#e.packageName,this.#u=this.#e.cwd,this.#r="help",this.#a={};const s=n.fs;if(s!==void 0&&(typeof s!="object"||s===null))throw new E("CLI fs option must be an object implementing the CerebroFs interface","INVALID_INPUT",{fs:n.fs});const l=n.exit;if(l!==void 0&&typeof l!="function")throw new E("CLI exit option must be a function","INVALID_INPUT",{exit:n.exit});const f=n.env;if(f!==void 0&&(typeof f!="object"||f===null))throw new E("CLI env option must be a record of string keys","INVALID_INPUT",{env:n.env});const a=n.stdin;if(a!==void 0&&typeof a!="string")throw new E("CLI stdin option must be a string","INVALID_INPUT",{stdin:n.stdin});this.#w=n.fs,this.#$=n.exit,this.#O=n.env,this.#x=n.stdin??"",this.#n=new Map,this.#i=new Map,this.#o=new Map}setCommandSection(e){return this.#a=e,this}getCommandSection(){return this.#a.header||(this.#a.header=`${this.#f}${this.#d?` v${this.#d}`:""}`),this.#a}setDefaultCommand(e){return this.#r=e,this}get defaultCommand(){return this.#r}addCommand(e){Ge(e,"Command"),Oe(e.name);const n=typeof e.execute=="function",i=typeof e.loader=="function";if(n&&i)throw new E(`Command "${e.name}" cannot define both "execute" and "loader" — choose one`,"INVALID_COMMAND",{commandName:e.name});if(!n&&!i)throw new E(`Command "${e.name}" must define either "execute" or "loader"`,"INVALID_COMMAND",{commandName:e.name});e.alias&&(typeof e.alias=="string"?Oe(e.alias):At(e.alias,"Command alias").forEach(a=>Oe(a))),e.argument&&Ge(e.argument,"Command argument"),e.options&&Ge(e.options,"Command options"),e.commandPath&&(At(e.commandPath,"Command commandPath"),e.commandPath.forEach(a=>{Oe(a)}));const r=xt(e.name,e.commandPath),o=Y(r);if(this.#i.has(o))throw new E(`Command with path "${o}" already exists`,"DUPLICATE_COMMAND",{commandName:e.name,commandPath:e.commandPath});const s=Array.isArray(e.commandPath)&&e.commandPath.length>0,l=this.#n.get(e.name),f=l!==void 0&&(l.commandPath===void 0||l.commandPath.length===0);if(!s&&f)throw new E(`Command with name "${e.name}" already exists`,"DUPLICATE_COMMAND",{commandName:e.name});if(e.options)for(const a of e.options)ft(a);if(Yr(e),ds(e),fs(e),e.options&&(e.__conflictingOptions__=e.options.filter(a=>a.conflicts!==void 0),e.__requiredOptions__=e.options.filter(a=>a.required===!0)),s&&l!==void 0)this.#n.set(o,e);else{if(!s&&l!==void 0&&!f){const a=xt(l.name,l.commandPath);this.#n.set(Y(a),l)}this.#n.set(e.name,e)}if(this.#i.set(o,r),this.#o.set(o,e),this.#C(),e.alias!==void 0){const a=typeof e.alias=="string"?[e.alias]:e.alias;for(const c of a){if(J().CEREBRO_OUTPUT_LEVEL===String(re)&&this.#t.debug("adding alias",c),this.#n.has(c))throw new E(`Command alias "${c}" conflicts with existing command`,"DUPLICATE_COMMAND",{alias:c,commandName:e.name});this.#n.set(c,e)}}return this}addGlobalOption(e){const n=e,i=new Set($e.map(o=>o.name)),r=new Set($e.map(o=>o.alias).filter(Boolean));if(i.has(n.name))throw new E(`Cannot add global option "--${n.name}": it conflicts with a built-in global option`,"DUPLICATE_OPTION",{optionName:n.name});if(n.alias&&r.has(n.alias))throw new E(`Cannot add global option with alias "-${n.alias}": it conflicts with a built-in global option alias`,"DUPLICATE_OPTION",{alias:n.alias,optionName:n.name});if(new Set(this.#l.map(o=>o.name)).has(n.name))throw new E(`Global option "--${n.name}" has already been added`,"DUPLICATE_OPTION",{optionName:n.name});return n.group="global",ft(n),this.#l.push(n),this}getGlobalOptions(){return this.#N()}addPlugin(e){return this.getPluginManager().register(e),this}getPluginManager(){return this.#p?this.#p:(this.#p=new ro(this.#t),this.#p.register({description:"Attaches the logger to the toolbox",execute:B(e=>{e.logger=this.#t,e.console=e.logger},"execute"),name:"logger"}),this.#p)}getCliName(){return this.#f}getPackageVersion(){return this.#d}getPackageName(){return this.#y}getCommands(){return this.#n}getCwd(){return this.#u}dispose(){this.#P?.()}async run(e={}){const{autoDispose:n=!0,shouldExitProcess:i=!0,...r}=e;if(!this.#n.has("help")){const{default:d}=await import("../packem_chunks/help-command.js");this.addCommand(new d(this.#n))}const o=this.#E(),s=this.#i;this.#L();const l=this.#b();let f,a=[...l];const c=Dt(),h=Bt(),p=Ae();this.#t.debug(`process.execPath: ${c}`),this.#t.debug(`process.execArgv: ${h.join(" ")}`),this.#t.debug(`process.argv: ${p.join(" ")}`);const m=Xr(s,[...l]);if(m.commandPath)f=m.commandPath,a=m.argv;else{if(l.length>1&&l[0]&&l[1]&&!He(l[0])&&!He(l[1])){const g=[];let y=0;for(;y<l.length;){const P=l[y];if(!P||He(P))break;g.push(P),y+=1}const O=Y(g);if(g[0]&&!o.includes(g[0])){const P=this.#s(),V=Q(O,P);throw new Z(O,V)}}let d;try{d=go([null,...o],[...l])}catch(g){if(g instanceof Error&&g.name==="INVALID_COMMAND"&&"command"in g){const y=g.command,O=this.#s(),P=Q(y,O);throw new Z(y,P)}throw g}d.command&&(f=[d.command],a=d.argv)}if(!f)if(this.#r)f=[this.#r];else{const d=this.#s();throw new Z("",d)}const u=Y(f),v=this.#i.get(u);let w;if(v){if(w=this.#o.get(u),!w||Y(v)!==u){const d=this.#s(),g=Q(u,d);throw new Z(u,g)}}else{const d=f.at(-1);if(w=d?this.#n.get(d):void 0,!w){const g=this.#s(),y=Q(u,g);throw new Z(u,y)}}if(typeof w.execute!="function"&&typeof w.loader!="function")return this.#t.error(`Command "${w.name}" has no function to execute.`),i?q(1):void 0;const b=a;let $,A;try{({commandArgs:$,toolbox:A}=this.#j(w,b,r,u))}catch(d){if(this.#t.error(d),i)return q(1);throw d}const N=this.getPluginManager();try{!this.#h&&N.hasPlugins()&&(await N.init({cli:this,cwd:this.#u,logger:this.#t}),this.#h=!0),await N.executeLifecycle("execute",A),await N.executeLifecycle("beforeCommand",A);let d;const g=$.global;if(g?.help){const y=this.#n.get("help");if(!y)throw new E("Help command not found","COMMAND_NOT_FOUND");d=await oe(y,A,$)}else if(g?.version??g?.V){const y=this.#n.get("version");if(!y)throw new E("Version command not found","COMMAND_NOT_FOUND");d=await oe(y,A,$)}else d=await oe(w,A,$);return await N.executeLifecycle("afterCommand",A,d),i?q(0):void 0}catch(d){throw await N.executeErrorHandlers(d,A),d}finally{n&&this.dispose()}}async runCommand(e,n={}){const{argv:i=[],...r}=n;Ne(e,"Command name");const o=e.split(" ").filter(Boolean),s=Y(o),l=this.#i.get(s)?this.#o.get(s):this.#n.get(e);if(!l){const p=this.#s(),m=Q(s||e,p);throw new Z(e,m)}if(typeof l.execute!="function"&&typeof l.loader!="function")throw new E(`Command "${l.name}" has no function to execute`,"INVALID_COMMAND",{commandName:l.name});const f=[...Et(i,!1)];this.#t.debug(`running command '${e}' programmatically with args: ${f.join(", ")}`);const{commandArgs:a,toolbox:c}=this.#j(l,f,r,s||e),h=this.getPluginManager();try{!this.#h&&h.hasPlugins()&&(await h.init({cli:this,cwd:this.#u,logger:this.#t}),this.#h=!0),await h.executeLifecycle("execute",c),await h.executeLifecycle("beforeCommand",c);let p;const m=a.global;if(m?.help){const u=this.#n.get("help");if(!u)throw new E("Help command not found","COMMAND_NOT_FOUND");p=await oe(u,c,a)}else if(m?.version??m?.V){const u=this.#n.get("version");if(!u)throw new E("Version command not found","COMMAND_NOT_FOUND");p=await oe(u,c,a)}else p=await oe(l,c,a);return await h.executeLifecycle("afterCommand",c,p),p}catch(p){throw await h.executeErrorHandlers(p,c),p}}clone(e){const n={...this.#e,...e},i=new On(this.#f,n);for(const[r,o]of this.#n)i.#n.set(r,o);for(const[r,o]of this.#i)i.#i.set(r,[...o]);for(const[r,o]of this.#o)i.#o.set(r,o);for(const r of this.#l)i.#l.push(r);return i.#r=this.#r,i.#a={...this.#a},i.#C(),i}async getAction(e){Ne(e,"Command name");const n=e.split(" ").filter(Boolean),i=Y(n),r=this.#i.get(i)?this.#o.get(i):this.#n.get(e);if(!r){const o=this.#s(),s=Q(i||e,o);throw new Z(e,s)}if(typeof r.execute=="function")return r.execute;if(typeof r.loader=="function")return cn(r);throw new E(`Command "${r.name}" has no execute or loader defined`,"INVALID_COMMAND",{commandName:r.name})}};var Vs=Object.defineProperty,Bs=j((t,e)=>Vs(t,"name",{value:e,configurable:!0}),"e$1"),Ds=Object.defineProperty,Rs=Bs((t,e)=>Ds(t,"name",{value:e,configurable:!0}),"o"),zs=Object.defineProperty,Fs=Rs((t,e)=>zs(t,"name",{value:e,configurable:!0}),"t");const kc=Fs((t,e)=>new Us(t,e),"createCerebro");var Ws=Object.defineProperty,qs=j((t,e)=>Ws(t,"name",{value:e,configurable:!0}),"r$1"),Gs=Object.defineProperty,Hs=qs((t,e)=>Gs(t,"name",{value:e,configurable:!0}),"r"),Js=Object.defineProperty,Ks=Hs((t,e)=>Js(t,"name",{value:e,configurable:!0}),"o");const _c=Ks(()=>{try{const t=require("node:module");if(typeof t.enableCompileCache=="function"){t.enableCompileCache();return}}catch{}try{require("v8-compile-cache")}catch{}},"enableCompileCache");var Zs=Object.defineProperty,Ys=j((t,e)=>Zs(t,"name",{value:e,configurable:!0}),"u$2"),Qs=Object.defineProperty,xn=Ys((t,e)=>Qs(t,"name",{value:e,configurable:!0}),"p");const Xs=Ke(import.meta.url),me=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Pn=xn(t=>{if(typeof me<"u"&&me.versions&&me.versions.node){const[e,n]=me.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return me.getBuiltinModule(t)}return Xs(t)},"__cjs_getBuiltinModule"),{execFileSync:el}=Pn("node:child_process"),{totalmem:tl}=Pn("node:os");var nl=Object.defineProperty,Me=xn((t,e)=>nl(t,"name",{value:e,configurable:!0}),"r");const il=/--max-old-space-size=(\d+)/,ol=/--max-semi-space-size=(\d+)/,rl=Me(t=>Math.floor(tl()/1024/1024*t),"getDefaultMaxOldSpaceSize"),al=Me(t=>t<=512?4:t<=1024?8:t<=2048?16:t<=4096?32:t<=8192?64:Math.floor(Math.log2(t))*8,"getSemiSpaceSize"),Nt=Me((t,e)=>{for(const n of e){const i=t.exec(n);if(i)return Number.parseInt(i[1],10)}},"extractFlag"),Lc=Me(t=>{const e=t?.maxOldSpacePercent??.75,n=[...Bt()],i=[...Ae()],r=Nt(il,n),o=Nt(ol,n);if(r!==void 0&&o!==void 0)return;const s=r??rl(e),l=o??al(s),f=[];if(r===void 0&&f.push(`--max-old-space-size=${String(s)}`),o===void 0&&f.push(`--max-semi-space-size=${String(l)}`),f.length!==0)try{el(Dt(),[...f,...n,...i.slice(1)],{env:J(),stdio:"inherit"}),q(0)}catch(a){const c=a.status;q(typeof c=="number"?c:1)}},"applyHeapTuning");var sl=Object.defineProperty,ll=j((t,e)=>sl(t,"name",{value:e,configurable:!0}),"T"),cl=Object.defineProperty,Ue=ll((t,e)=>cl(t,"name",{value:e,configurable:!0}),"N");const ul=Ke(import.meta.url),ge=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,pl=Ue(t=>{if(typeof ge<"u"&&ge.versions&&ge.versions.node){const[e,n]=ge.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return ge.getBuiltinModule(t)}return ul(t)},"__cjs_getBuiltinModule"),{createRequire:fl}=pl("node:module");var dl=Object.defineProperty,hl=Ue((t,e)=>dl(t,"name",{value:e,configurable:!0}),"A$2"),ml=Object.defineProperty,Qe=hl((t,e)=>ml(t,"name",{value:e,configurable:!0}),"$"),gl=Object.defineProperty,vl=Qe((t,e)=>gl(t,"name",{value:e,configurable:!0}),"r$1");const bl=vl(t=>t.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
7
- `),"normalizeLF"),yl=globalThis.process??Object.create(null),Ct={versions:{}},jt=new Proxy(yl,{get(t,e){if(e in t)return t[e];if(e in Ct)return Ct[e]}});var wl=Object.defineProperty,$l=Qe((t,e)=>wl(t,"name",{value:e,configurable:!0}),"b");const Ol=$l((t,e,n,i)=>{const r={column:0,line:-1,...t.start},o={...r,...t.end},s=r.line,l=r.column,f=o.line,a=o.column;let c=Math.max(s-(n+1),0),h=Math.min(e.length,f+i);s===-1&&(c=0),f===-1&&(h=e.length);const p=f-s,m={};if(p)for(let u=0;u<=p;u++){const v=u+s;if(!l)m[v]=!0;else if(u===0){const w=e[v-1]?.length;m[v]=[l,(w??0)-l+1]}else if(u===p)m[v]=[0,a];else{const w=e[v-u]?.length;m[v]=[0,w]}}else l===a?m[s]=l?[l,0]:!0:m[s]=[l,(a??0)-(l??0)];return{end:h,markerLines:m,start:c}},"getMarkerLines");var xl=Object.defineProperty,xe=Qe((t,e)=>xl(t,"name",{value:e,configurable:!0}),"t");const Pl=jt.platform==="win32"&&!jt.env?.WT_SESSION?">":"❯",Al=xe((t,e,n)=>{const i={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...n,color:{gutter:xe(u=>u,"gutter"),marker:xe(u=>u,"marker"),message:xe(u=>u,"message"),...n?.color}},r=typeof e.start.column=="number";let o=bl(t).split(`
8
- `);typeof i.tabWidth=="number"&&(o=o.map(u=>u.replaceAll(" "," ".repeat(i.tabWidth))));const{end:s,markerLines:l,start:f}=Ol(e,o,i.linesAbove,i.linesBelow),a=String(s).length,{gutter:c,marker:h,message:p}=i.color;let m=o.slice(f,s).map((u,v)=>{const w=f+1+v,b=l[w],$=` ${String(w)}`.slice(-a),A=!l[w+1],N=` ${$}${i.showGutter?" |":""}`;if(b){let d="";if(Array.isArray(b)){const g=u.replaceAll(/[^\t]/g," ").slice(0,Math.max(b[0]-1,0)),y=b[1]||1;d=[`
9
- `,i.prefix+c(N.replaceAll(/\d/g," "))," ",g,h("^").repeat(y)].join(""),A&&i.message&&(d+=` ${p(i.message)}`)}return[i.prefix+h(Pl),c(N),u.length>0?` ${u}`:"",d].join("")}return`${i.prefix} ${c(N)}${u.length>0?` ${u}`:""}`}).join(`
10
- `);return i.message&&!r&&(m=`${i.prefix+" ".repeat(a+1)+i.message}
11
- ${m}`),m},"codeFrame");var El=Object.defineProperty,Nl=Ue((t,e)=>El(t,"name",{value:e,configurable:!0}),"x$1"),Cl=Object.defineProperty,jl=Nl((t,e)=>Cl(t,"name",{value:e,configurable:!0}),"x"),kl=Object.defineProperty,G=jl((t,e)=>kl(t,"name",{value:e,configurable:!0}),"u");const ee=G((t,...e)=>{process.env.DEBUG&&process.env.DEBUG==="true"&&console.debug(`error:parse-stacktrace: ${t}`,...e)},"debugLog"),te="<unknown>",_l=/^.*?\s*at\s(?:(.+?\)(?:\s\[.+\])?|\(?.*?)\s?\((?:address\sat\s)?)?(?:async\s)?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ll=/\((\S+)\),\s(<[^>]+>)?:(\d+)?:(\d+)?\)?/,Tl=/(.*?):(\d+):(\d+)(?:\s<-\s.+:\d+:\d+)?/,Il=/eval\sat\s(<anonymous>)\s\((.*)\)?:(\d+)?:(\d+)\),\s*<anonymous>?:(\d+)?:(\d+)/,Sl=/^\s*in\s(?:([^\\/]+(?:\s\[as\s\S+\])?)\s\(?)?\(at?\s?(.*?):(\d+)(?::(\d+))?\)?\s*$/,Ml=/in\s(.*)\s\(at\s(.+)\)\sat/,Ul=/^(?:.*@)?(.*):(\d+):(\d+)$/,Vl=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. \/=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Bl=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Dl=/(\S[^\s[]*\[.*\]|.*?)@(.*):(\d+):(\d+)/,kt=/\(error: (.*)\)/,Rl=/at\s/,zl=/^(\S+):(\d+):(\d+)$|^(\S+):(\d+)$/,Fl=/\S*(?:Error: |AggregateError:)/,An=/^Anonymous function$/,Wl=/^\s*in\s.*/,ql=/^.*?\s*at\s.*/,Gl=/^.*?\s*@.*|\[native code\]/,En=G((t,e)=>{const n=t.includes("safari-extension"),i=t.includes("safari-web-extension");return n||i?[t.includes("@")?t.split("@")[0]:te,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},"extractSafariExtensionDetails"),Nn=G((t,e)=>{const n=Tl.exec(e);n&&(t.file=n[1],t.line=+n[2],t.column=+n[3])},"parseMapped"),Hl=G(t=>{const e=Ml.exec(t);if(e){ee(`parse nested node error stack line: "${t}"`,`found: ${JSON.stringify(e)}`);const i=e[2].split(":");return{column:i[2]?+i[2]:void 0,file:i[0],line:i[1]?+i[1]:void 0,methodName:e[1]??te,raw:t,type:void 0}}const n=Sl.exec(t);if(n){ee(`parse node error stack line: "${t}"`,`found: ${JSON.stringify(n)}`);const i={column:n[4]?+n[4]:void 0,file:n[2]?n[2].replace(Rl,""):void 0,line:n[3]?+n[3]:void 0,methodName:n[1]??te,raw:t,type:t.startsWith("internal")?"internal":void 0};return Nn(i,`${n[2]}:${n[3]}:${n[4]}`),i}},"parseNode"),Jl=G(t=>{const e=_l.exec(t);if(e){ee(`parse chrome error stack line: "${t}"`,`found: ${JSON.stringify(e)}`);const n=e[2]?.startsWith("native"),i=e[2]?.startsWith("eval")||e[1]?.startsWith("eval");let r,o;if(i){const a=Ll.exec(t);if(a){const c=zl.exec(a[1]);c?(e[2]=c[4]??c[1],e[3]=c[5]??c[2],e[4]=c[3]):a[2]&&(e[2]=a[1]),a[2]&&(r={column:a[4]?+a[4]:void 0,file:a[2],line:a[3]?+a[3]:void 0,methodName:"eval",raw:t,type:"eval"})}else{const c=Il.exec(t);c&&(o={column:c[4]?+c[4]:void 0,file:c[2],line:c[3]?+c[3]:void 0},r={column:c[6]?+c[6]:void 0,file:c[1],line:c[5]?+c[5]:void 0,methodName:"eval",raw:c[0],type:"eval"})}}const[s,l]=En(e[1]?e[1].replace(An,"<anonymous>"):te,e[2]),f={column:e[4]?+e[4]:void 0,evalOrigin:r,file:l,line:e[3]?+e[3]:void 0,methodName:s,raw:t,type:i?"eval":n?"native":void 0};return o?(f.column=o.column,f.file=o.file,f.line=o.line):Nn(f,`${l}:${e[3]}:${e[4]}`),f}},"parseChromium"),Kl=G((t,e)=>{const n=Vl.exec(t);if(n){ee(`parse gecko error stack line: "${t}"`,`found: ${JSON.stringify(n)}`);const i=n[3]?.includes(" > eval"),r=i&&n[3]&&Bl.exec(n[3]);let o;i&&r&&(n[3]=r[1],o={column:n[5]?+n[5]:void 0,file:n[3],line:n[4]?+n[4]:void 0,methodName:"eval",raw:t,type:"eval"},n[4]=r[2]);const[s,l]=En(n[1]?n[1].replace(An,"<anonymous>"):te,n[3]);let f;(e?.type==="safari"||!i&&e?.type==="firefox")&&e.column?f=e.column:!i&&n[5]&&(f=+n[5]);let a;return(e?.type==="safari"||!i&&e?.type==="firefox")&&e.line?a=e.line:n[4]&&(a=+n[4]),{column:f,evalOrigin:o,file:l,line:a,methodName:s,raw:t,type:i?"eval":l.includes("[native code]")?"native":void 0}}},"parseGecko"),Zl=G((t,e)=>{const n=Dl.exec(t);if(!(n&&n[2].includes(" > eval"))&&n)return ee(`parse firefox error stack line: "${t}"`,`found: ${JSON.stringify(n)}`),{column:n[4]?+n[4]:e?.column??void 0,file:n[2],line:n[3]?+n[3]:e?.line??void 0,methodName:n[1]||te,raw:t,type:void 0}},"parseFirefox"),Yl=G(t=>{const e=Ul.exec(t);if(e)return ee(`parse react android native error stack line: "${t}"`,`found: ${JSON.stringify(e)}`),{column:e[3]?+e[3]:void 0,file:e[1],line:e[2]?+e[2]:void 0,methodName:te,raw:t,type:void 0}},"parseReactAndroidNative"),Cn=G((t,{filter:e,frameLimit:n=50}={})=>{const i=t;let r=(typeof i.stacktrace=="string"?i.stacktrace:t.stack??"").split(`
12
- `).map(o=>(kt.test(o)?o.replace(kt,"$1"):o).trim()).filter(o=>!Fl.test(o)&&o!=="eval code");return e&&(r=r.filter(o=>e(o))),r=r.slice(0,n),r.reduce((o,s,l)=>{if(!s||s.length>1024)return o;let f;if(Wl.test(s))f=Hl(s);else if(ql.test(s))f=Jl(s);else if(Gl.test(s)){let a;if(l===0){const c=t,h=c.columnNumber,p=c.lineNumber,m=c.line,u=c.column;h||p?a={column:h,line:p,type:"firefox"}:(m||u)&&(a={column:u,line:m,type:"safari"})}f=Zl(s,a)??Kl(s,a)}else f=Yl(s);return f?o.push(f):ee(`parse error stack line: "${s}"`,"not parser found"),o},[])},"parseStacktrace");var Ql=Object.defineProperty,Xl=Ue((t,e)=>Ql(t,"name",{value:e,configurable:!0}),"p"),ec=Object.defineProperty,jn=Xl((t,e)=>ec(t,"name",{value:e,configurable:!0}),"m");const tc=fl(import.meta.url),ae=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Xe=jn(t=>{if(typeof ae<"u"&&ae.versions&&ae.versions.node){const[e,n]=ae.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return ae.getBuiltinModule(t)}return tc(t)},"__cjs_getBuiltinModule"),{existsSync:nc,readFileSync:ic}=Xe("node:fs"),{relative:oc}=Xe("node:path"),{cwd:rc}=ae,{fileURLToPath:ac}=Xe("node:url");var sc=Object.defineProperty,_=jn((t,e)=>sc(t,"name",{value:e,configurable:!0}),"o");const pe=_((t,e,n)=>n===0?t:e===" "?t+" ".repeat(n):t+" ".repeat(e*n),"getPrefix"),lc=_((t,e)=>{const n=t.replace("async file:","file:");return oc(e,n.startsWith("file:")?ac(n):n)},"getRelativePath"),cc=_((t,e,n)=>{if(e)return n.title(t.message);const i=t.message?`: ${t.message}`:"";return n.title(t.name+i)},"getTitleText"),kn=_((t,{color:e,hideErrorTitle:n,indentation:i,prefix:r},o)=>`${pe(r,i,o)}${cc(t,n,e)}
13
- `,"getMessage"),_n=_((t,{color:e,indentation:n,prefix:i},r)=>{if(t.hint===void 0)return;const o=pe(i,n,r);let s="";if(Array.isArray(t.hint))for(const l of t.hint)s+=`${o+l}
14
- `;else s+=o+t.hint;return e.hint(s)},"getHint"),et=_((t,{color:e,cwd:n,displayShortPath:i,indentation:r,prefix:o},s=0)=>{const l=i?lc(t.file,n):t.file,{fileLine:f,method:a}=e;return`${pe(o,r,s)}at ${t.methodName?`${a(t.methodName)} `:""}${f(l)}:${f(t.line?.toString()??"")}`},"getMainFrame"),Ln=_((t,{color:e,indentation:n,linesAbove:i,linesBelow:r,prefix:o,showGutter:s,showLineNumbers:l,tabWidth:f},a)=>{if(t.file===void 0)return;const c=t.file.replace("file://","");if(!nc(c))return;const h=ic(c,"utf8");return Al(h,{start:{column:t.column,line:t.line}},{color:e,linesAbove:i,linesBelow:r,prefix:pe(o,n,a),showGutter:s,showLineNumbers:l,tabWidth:f})},"getCode"),Tn=_((t,e,n)=>{if(t.errors.length===0)return;let i=`${pe(e.prefix,e.indentation,n)}Errors:
15
-
16
- `,r=!0;for(const o of t.errors)r?r=!1:i+=`
17
-
18
- `,i+=Sn(o,{...e,framesMaxLimit:1,hideErrorCodeView:e.hideErrorErrorsCodeView},n+1);return`
19
- ${i}`},"getErrors"),In=_((t,e,n)=>{let i=`${pe(e.prefix,e.indentation,n)}Caused by:
20
-
21
- `;const r=t.cause;i+=kn(r,e,n);const o=Cn(r).shift(),s=_n(r,e,n);if(s&&(i+=`${s}
22
- `),o&&(i+=et(o,e,n),!e.hideErrorCauseCodeView)){const l=Ln(o,e,n);l!==void 0&&(i+=`
23
- ${l}`)}if(r.cause)i+=`
24
- ${In(r,e,n+1)}`;else if(r instanceof AggregateError){const l=Tn(r,e,n);l!==void 0&&(i+=`
25
- ${l}`)}return`
26
- ${i}`},"getCause"),uc=_((t,e)=>(t.length>0?`
27
- `:"")+t.map(n=>et(n,e)).join(`
28
- `),"getStacktrace"),Sn=_((t,e,n)=>{const i={cwd:rc(),displayShortPath:!1,filterStacktrace:void 0,framesMaxLimit:Number.POSITIVE_INFINITY,hideErrorCauseCodeView:!1,hideErrorCodeView:!1,hideErrorErrorsCodeView:!1,hideErrorTitle:!1,hideMessage:!1,indentation:4,linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,showLineNumbers:!0,tabWidth:4,...e,color:{fileLine:_(s=>s,"fileLine"),gutter:_(s=>s,"gutter"),hint:_(s=>s,"hint"),marker:_(s=>s,"marker"),message:_(s=>s,"message"),method:_(s=>s,"method"),title:_(s=>s,"title"),...e.color}},r=Cn(t,{filter:e.filterStacktrace,frameLimit:i.framesMaxLimit}),o=r.shift();return[e.hideMessage?void 0:kn(t,i,n),_n(t,i,n),o?et(o,i,n):void 0,o&&!i.hideErrorCodeView?Ln(o,i,n):void 0,t instanceof AggregateError?Tn(t,i,n):void 0,t.cause===void 0?void 0:In(t,i,n),r.length>0?uc(r,i):void 0].filter(Boolean).join(`
29
- `).replaceAll("\\","/")},"internalRenderError"),pc=_((t,e={})=>{if(e.framesMaxLimit!==void 0&&e.framesMaxLimit<=0)throw new RangeError("The 'framesMaxLimit' option must be a positive number");return Sn(t,e,0)},"renderError");var fc=Object.defineProperty,dc=j((t,e)=>fc(t,"name",{value:e,configurable:!0}),"i$1"),hc=Object.defineProperty,mc=dc((t,e)=>hc(t,"name",{value:e,configurable:!0}),"n"),gc=Object.defineProperty,_t=mc((t,e)=>gc(t,"name",{value:e,configurable:!0}),"n");const Tc=_t((t={})=>({description:"Enhanced error handling and reporting with beautiful code frames",name:"error-handler",onError:_t((e,n)=>{const{logger:i,runtime:r}=n,{detailed:o=!1,exitOnError:s=!0,formatter:l,logErrors:f=!0,renderOptions:a={}}=t;if(f)if(l)i.error(l(e));else if(o){const c=r.getCwd(),h=pc(e,{cwd:c,hideErrorCodeView:!1,hideErrorTitle:!1,hideMessage:!1,linesAbove:2,linesBelow:3,...a});i.error(h)}else i.error(e);s&&q(1)},"handleError"),version:"1.0.0"}),"errorHandlerPlugin");var vc="1.0.0-alpha.28";const Ic={version:vc};var bc=Object.defineProperty,yc=j((t,e)=>bc(t,"name",{value:e,configurable:!0}),"e");const Sc={argument:{description:"Package to execute (optionally with @version)",name:"package",type:String},description:"Execute a remote package without permanent installation",examples:[["vis dlx create-vite my-app","Scaffold a new project"],["vis dlx typescript@5.5.4 tsc --version","Run specific version"],["vis dlx -p cowsay -p lolcatjs -c 'echo hi | cowsay | lolcatjs'","Multiple packages with shell"],["vis install && vis dlx --offline typescript tsc --version","Hardened: pre-install + offline (no registry fetch on dlx)"]],group:"Run & Execute",loader:yc(()=>import("../packem_chunks/handler9.js"),"loader"),name:"dlx",options:[{alias:"p",description:"Additional packages to install (repeatable)",multiple:!0,name:"package",type:String},{alias:"c",defaultValue:!1,description:"Execute within shell environment",name:"shell-mode",type:Boolean},{alias:"s",defaultValue:!1,description:"Suppress output except command results",name:"silent",type:Boolean},{defaultValue:!1,description:"Resolve from local store only — fail rather than fetch from the registry. Pair with `vis install` for hardened npx-style workflows.",name:"offline",type:Boolean}]};export{Lc as N,kc as T,Sc as a,J as b,Ac as c,E as d,Ec as f,_c as i,Ic as m,K as n,Tc as w};
@@ -1 +0,0 @@
1
- var T=Object.defineProperty;var j=(n,e)=>T(n,"name",{value:e,configurable:!0});import{createRequire as B}from"node:module";import{u as R,U}from"../packem_chunks/bin.js";const q=B(import.meta.url),h=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,A=j(n=>{if(typeof h<"u"&&h.versions&&h.versions.node){const[e,t]=h.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return h.getBuiltinModule(n)}return q(n)},"__cjs_getBuiltinModule"),{createRequire:N}=A("node:module");var C=Object.defineProperty,z=j((n,e)=>C(n,"name",{value:e,configurable:!0}),"L"),I=Object.defineProperty,S=z((n,e)=>I(n,"name",{value:e,configurable:!0}),"b");const J=N(import.meta.url),y=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,_=S(n=>{if(typeof y<"u"&&y.versions&&y.versions.node){const[e,t]=y.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return y.getBuiltinModule(n)}return J(n)},"__cjs_getBuiltinModule"),{readFileSync:Y}=_("node:fs"),{readFile:Z}=_("node:fs/promises");var K=Object.defineProperty,l=S((n,e)=>K(n,"name",{value:e,configurable:!0}),"g");const G={sha256:"sha256",sha384:"sha384",sha512:"sha512"},H=1024,Q=/^[A-Z0-9+/]+={0,2}$/i,V=/.*node_modules\/((?:@[^/]+\/)?[^/]+)$/,k=/^['"]/,v=/['"]$/,X=/^[a-z][a-zA-Z0-9]*:\s*$/m,ee=/resolution:\s*\{[^}]*integrity:\s*([^,}\s]+)/,ne=/^["']?((?:@[^/@"']+\/)?[^@"'\n]+)@[^\n]+\n((?:[\t ][^\n]*(?:\n|$))+)/gm,te=/^\s+version:?\s+"?([^"\n]+)"?/m,se=/^\s+integrity[\s:]+"?([^"\s]+)"?/m,x=l(n=>{if(n.length>H)return;const e=n.indexOf("-");if(e<=0)return;const t=G[n.slice(0,e).toLowerCase()];if(!t)return;const s=n.slice(e+1);if(Q.test(s))try{const i=Buffer.from(s,"base64");return i.length===0?void 0:{algorithm:t,hex:i.toString("hex")}}catch{return}},"decodeSriIntegrity"),w=l((n,e,t)=>{const s=`${t.name}@${t.version}`;e.has(s)||(e.add(s),n.push(t))},"pushUniqueEntry"),m=l((n,e,t)=>{t&&Object.keys(t).length>0&&(n[e]={...t})},"copyDepMap"),g=l(n=>{if(!n)return;const e={};for(const[t,s]of Object.entries(n))e[t]=[s];return Object.keys(e).length>0?e:void 0},"liftDepMap"),re=l(n=>{const e=[],t=new Set;let s;try{s=JSON.parse(n)}catch{return e}if(!s.packages)return e;for(const[i,r]of Object.entries(s.packages)){if(!i||!r.version)continue;const p=V.exec(i);if(!p?.[1])continue;const c=r.name??p[1];if(c.startsWith("."))continue;const o={name:c,version:r.version};if(r.integrity){const a=x(r.integrity);a&&(o.integrity=a)}m(o,"dependencies",g(r.dependencies)),m(o,"peerDependencies",g(r.peerDependencies)),m(o,"optionalDependencies",g(r.optionalDependencies)),w(e,t,o)}return e},"parseNpmLockFile"),W=l(n=>{let e=n.trim();e.startsWith("/")&&(e=e.slice(1)),e=e.replace(k,"").replace(v,"");const t=e.indexOf("(");t>0&&(e=e.slice(0,t));const s=e.lastIndexOf("@");if(s<=0)return;const i=e.slice(0,s),r=e.slice(s+1);if(!(!i||!r||r.startsWith("link:")||r.startsWith("workspace:")||r.startsWith("file:")))return{name:i,version:r}},"splitPnpmPackageKey"),F=l((n,e)=>{const t=new RegExp(String.raw`^${e}:\s*$`,"m").exec(n);if(!t)return;const s=t.index+t[0].length,i=X.exec(n.slice(s));return n.slice(s,i?s+i.index:n.length)},"sliceTopLevelSection"),oe=l(n=>{const e=new Map,t=F(n,"snapshots");if(!t)return e;const s=/^ {2}(['"]?[^\s:][^:\n]*?['"]?):\s*\n((?: {4}[^\n]*\n?)+)/gm;let i;for(;(i=s.exec(t)??void 0)!==void 0;){const r=W(i[1]);if(!r)continue;const p=`${r.name}@${r.version}`,c=i[2],o=e.get(p)??{};for(const a of["dependencies","peerDependencies","optionalDependencies"]){const u=b(c,a);if(!u)continue;const d=o[a]??{};for(const[f,P]of Object.entries(u)){const D=d[f]??[];for(const O of P)D.includes(O)||D.push(O);d[f]=D}o[a]=d}e.set(p,o)}return e},"parsePnpmSnapshotEdges"),ie=l(n=>{const e=[],t=new Set,s=F(n,"packages");if(!s)return e;const i=oe(n),r=/^ {2}(['"]?[^\s:][^:\n]*?['"]?):\s*\n((?: {4}[^\n]*\n?)+)/gm;let p;for(;(p=r.exec(s)??void 0)!==void 0;){const c=W(p[1]);if(!c)continue;const o=p[2],a=ee.exec(o),u={name:c.name,version:c.version};if(a?.[1]){const f=x(a[1]);f&&(u.integrity=f)}const d=i.get(`${c.name}@${c.version}`);m(u,"dependencies",d?.dependencies??b(o,"dependencies")),m(u,"peerDependencies",d?.peerDependencies??b(o,"peerDependencies")),m(u,"optionalDependencies",d?.optionalDependencies??b(o,"optionalDependencies")),w(e,t,u)}return e},"parsePnpmLockFile"),b=l((n,e)=>{const t=new RegExp(String.raw`^ {4}${e}:\s*\n((?: {6,}[^\n]*\n?)+)`,"m").exec(n);if(!t?.[1])return;const s={},i=/^ {6}([^\s:]+):\s*([^\n]+)/gm;let r;for(;(r=i.exec(t[1])??void 0)!==void 0;){const p=r[1].replace(k,"").replace(v,"");let c=r[2].trim();c=c.replace(k,"").replace(v,"");const o=c.indexOf("(");if(o>0&&(c=c.slice(0,o).trim()),!p||!c)continue;const a=s[p]??[];a.includes(c)||a.push(c),s[p]=a}return Object.keys(s).length>0?s:void 0},"extractPnpmDependencyMap"),ce=l(n=>{const e=[],t=new Set,s=ne;s.lastIndex=0;let i;for(;(i=s.exec(n)??void 0)!==void 0;){const r=i[1].replace(k,"").replace(v,"");if(!r)continue;const p=i[2],c=te.exec(p);if(!c?.[1])continue;const o={name:r,version:c[1].trim()},a=se.exec(p);if(a?.[1]){const u=x(a[1]);u&&(o.integrity=u)}m(o,"dependencies",$(p,"dependencies")),m(o,"peerDependencies",$(p,"peerDependencies")),m(o,"optionalDependencies",$(p,"optionalDependencies")),w(e,t,o)}return e},"parseYarnLockFile"),$=l((n,e)=>{const t=new RegExp(String.raw`^ {2}${e}:\s*\n((?: {4,}[^\n]*\n?)+)`,"m").exec(n);if(!t?.[1])return;const s={},i=/^ {4}(['"]?[^\s:'"]+['"]?)\s*(?::\s*)?['"]([^'"\n]+)['"]/gm;let r;for(;(r=i.exec(t[1])??void 0)!==void 0;){const p=r[1].replace(k,"").replace(v,""),c=r[2];if(p&&c){const o=s[p]??[];o.includes(c)||o.push(c),s[p]=o}}return Object.keys(s).length>0?s:void 0},"extractYarnDependencyMap"),pe=/,(?=\s*[}\]])/g,ae=l(n=>{const e=[],t=new Set;let s;try{s=JSON.parse(n.replaceAll(pe,""))}catch{return e}if(!s.packages)return e;for(const i of Object.values(s.packages)){const r=i[0];if(typeof r!="string")continue;const p=r.indexOf("@",1);if(p<=0)continue;const c=r.slice(0,p),o=r.slice(p+1);if(!c||!o||o.startsWith("workspace:")||o.startsWith("link:")||o.startsWith("file:"))continue;const a={name:c,version:o},u=i[3];if(typeof u=="string"&&u.length>0){const f=x(u);f&&(a.integrity=f)}const d=i[2];if(d&&typeof d=="object"&&!Array.isArray(d)){const f=d;m(a,"dependencies",g(f.dependencies)),m(a,"peerDependencies",g(f.peerDependencies)),m(a,"optionalDependencies",g(f.optionalDependencies))}w(e,t,a)}return e},"parseBunLockFile"),L=l(n=>{if(n.endsWith("pnpm-lock.yaml"))return"pnpm";if(n.endsWith("package-lock.json"))return"npm";if(n.endsWith("yarn.lock"))return"yarn";if(n.endsWith("bun.lock"))return"bun"},"inferLockFileType"),E=l((n,e)=>{switch(e){case"bun":return ae(n);case"npm":return re(n);case"pnpm":return ie(n);case"yarn":return ce(n);default:return[]}},"parseLockFileContent"),M=["pnpm-lock.yaml","package-lock.json","yarn.lock","bun.lock"];l(async n=>{const e=await R(M,{type:"file",...n&&{cwd:n}});if(!e)throw new Error("Could not find a supported lock file (pnpm-lock.yaml, package-lock.json, yarn.lock, bun.lock)");const t=L(e);if(!t)throw new Error(`Unsupported lock file: ${e}`);const s=await Z(e,"utf8");return{entries:E(s,t),path:e,type:t}},"parseLockFile");l(n=>{const e=U(M,{type:"file",...n&&{cwd:n}});if(!e)throw new Error("Could not find a supported lock file (pnpm-lock.yaml, package-lock.json, yarn.lock, bun.lock)");const t=L(e);if(!t)throw new Error(`Unsupported lock file: ${e}`);return{entries:E(Y(e,"utf8"),t),path:e,type:t}},"parseLockFileSync");export{E as S};
@@ -1 +0,0 @@
1
- var Or=Object.defineProperty;var b=(e,n)=>Or(e,"name",{value:n,configurable:!0});import{createRequire as Pr}from"node:module";const zr=Pr(import.meta.url),q=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,_r=b(e=>{if(typeof q<"u"&&q.versions&&q.versions.node){const[n,i]=q.versions.node.split(".").map(Number);if(n>22||n===22&&i>=3||n===20&&i>=16)return q.getBuiltinModule(e)}return zr(e)},"__cjs_getBuiltinModule"),{createRequire:oe}=_r("node:module"),Er=0,Mr=4,Cn=Symbol("findUpStop"),Fn=/"(?:[^"\\]|\\.)*"|\/\/[^\r\n]*|\/\*[\s\S]*?\*\//g;var kr=Object.defineProperty,Ar=b((e,n)=>kr(e,"name",{value:n,configurable:!0}),"t$2"),Sr=Object.defineProperty,Rr=Ar((e,n)=>Sr(e,"name",{value:n,configurable:!0}),"t"),Tr=Object.defineProperty,Br=Rr((e,n)=>Tr(e,"name",{value:n,configurable:!0}),"n");const Ie=Br(e=>{if(!e||!(e instanceof URL)&&typeof e!="string")throw new TypeError("Path must be a non-empty string or URL.")},"assertValidFileOrDirectoryPath");var Nr=Object.defineProperty,Ir=b((e,n)=>Nr(e,"name",{value:n,configurable:!0}),"$e"),Cr=Object.defineProperty,se=Ir((e,n)=>Cr(e,"name",{value:n,configurable:!0}),"W"),Fr=Object.defineProperty,c=se((e,n)=>Fr(e,"name",{value:n,configurable:!0}),"u$1");let Ae=c(()=>{var e=(()=>{var n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,u=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,x=c((t,r)=>{for(var o in r)n(t,o,{get:r[o],enumerable:!0})},"ne"),P=c((t,r,o,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of u(r))!g.call(t,s)&&s!==o&&n(t,s,{get:c(()=>r[s],"get"),enumerable:!(a=i(r,s))||a.enumerable});return t},"ae"),v=c(t=>P(n({},"__esModule",{value:!0}),t),"oe"),_={};x(_,{zeptomatch:c(()=>ke,"zeptomatch")});var fe=c(t=>{const r=new Set,o=[t];for(let a=0;a<o.length;a++){const s=o[a];if(r.has(s))continue;r.add(s);const{children:l}=s;if(l?.length)for(let f=0,d=l.length;f<d;f++)o.push(l[f])}return Array.from(r)},"M"),Ke=c(t=>{let r="";const o=fe(t);for(let a=0,s=o.length;a<s;a++){const l=o[a];if(!l.regex)continue;const f=l.regex.flags;if(r||(r=f),r!==f)throw new Error(`Inconsistent RegExp flags used: "${r}" and "${f}"`)}return r},"se"),pe=c((t,r,o)=>{const a=o.get(t);if(a!==void 0)return a;const s=t.partial??r;let l="";if(t.regex&&(l+=s?"(?:$|":"",l+=t.regex.source),t.children?.length){const f=Xe(t.children.map(d=>pe(d,r,o)).filter(Boolean));if(f?.length){const d=t.children.some(F=>!F.regex||!(F.partial??r)),h=f.length>1||s&&(!l.length||d);l+=h?s?"(?:$|":"(?:":"",l+=f.join("|"),l+=h?")":""}}return t.regex&&(l+=s?")":""),o.set(t,l),l},"O"),Qe=c((t,r)=>{const o=new Map,a=fe(t);for(let s=a.length-1;s>=0;s--){const l=pe(a[s],r,o);if(!(s>0))return l}return""},"ie"),Xe=c(t=>Array.from(new Set(t)),"ue"),J=c((t,r,o)=>J.compile(t,o).test(r),"R");J.compile=(t,r)=>{const o=r?.partial??!1,a=Qe(t,o),s=Ke(t);return new RegExp(`^(?:${a})$`,s)};var et=J,tt=c((t,r)=>{const o=et.compile(t,r),a=`${o.source.slice(0,-1)}[\\\\/]?$`,s=o.flags;return new RegExp(a,s)},"le"),rt=tt,nt=c(t=>{const r=t.map(a=>a.source).join("|")||"$^",o=t[0]?.flags;return new RegExp(r,o)},"ve"),ot=nt,ge=c(t=>Array.isArray(t),"j"),I=c(t=>typeof t=="function","_"),st=c(t=>t.length===0,"he"),at=(()=>{const{toString:t}=Function.prototype,r=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return o=>(o.length===0||o.length===1)&&r.test(t.call(o))})(),it=c(t=>typeof t=="number","de"),lt=c(t=>typeof t=="object"&&t!==null,"xe"),ut=c(t=>t instanceof RegExp,"me"),ct=(()=>{const t=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return r=>t.test(r.source)})(),ft=(()=>{const t=/^[a-zA-Z0-9_-]+$/;return r=>t.test(r.source)&&!r.flags.includes("i")})(),de=c(t=>typeof t=="string","A"),E=c(t=>t===void 0,"f"),pt=c(t=>{const r=new Map;return o=>{const a=r.get(o);if(a!==void 0)return a;const s=t(o);return r.set(o,s),s}},"ye"),me=c((t,r,o={})=>{const a={cache:{},input:t,index:0,indexBacktrackMax:0,options:o,output:[]},s=M(r)(a),l=Math.max(a.index,a.indexBacktrackMax);if(s&&a.index===t.length)return a.output;throw new Error(`Failed to parse at index ${l}`)},"I"),p=c((t,r)=>ge(t)?gt(t,r):de(t)?he(t,r):dt(t,r),"i"),gt=c((t,r)=>{const o={};for(const a of t){if(a.length!==1)throw new Error(`Invalid character: "${a}"`);const s=a.charCodeAt(0);o[s]=!0}return a=>{const s=a.input;let l=a.index,f=l;for(;f<s.length&&s.charCodeAt(f)in o;)f+=1;if(f>l){if(!E(r)&&!a.options.silent){const d=s.slice(l,f),h=I(r)?r(d,s,`${l}`):r;E(h)||a.output.push(h)}a.index=f}return!0}},"we"),dt=c((t,r)=>{if(ft(t))return he(t.source,r);{const o=t.source,a=t.flags.replace(/y|$/,"y"),s=new RegExp(o,a);return ct(t)&&I(r)&&!at(r)?mt(s,r):ht(s,r)}},"$e"),mt=c((t,r)=>o=>{const a=o.index,s=o.input;t.lastIndex=a;const l=t.exec(s);if(l){const f=t.lastIndex;if(!o.options.silent){const d=r(...l,s,`${a}`);E(d)||o.output.push(d)}return o.index=f,!0}else return!1},"Ee"),ht=c((t,r)=>o=>{const a=o.index,s=o.input;if(t.lastIndex=a,t.test(s)){const l=t.lastIndex;if(!E(r)&&!o.options.silent){const f=I(r)?r(s.slice(a,l),s,`${a}`):r;E(f)||o.output.push(f)}return o.index=l,!0}else return!1},"Ce"),he=c((t,r)=>o=>{const a=o.index,s=o.input;if(s.startsWith(t,a)){if(!E(r)&&!o.options.silent){const l=I(r)?r(t,s,`${a}`):r;E(l)||o.output.push(l)}return o.index+=t.length,!0}else return!1},"F"),K=c((t,r,o,a)=>{const s=M(t),l=r>1;return X(Q(xe(f=>{let d=0;for(;d<o;){const h=f.index;if(!s(f)||(d+=1,f.index===h))break}return d>=r},l),a))},"k"),be=c((t,r)=>K(t,0,1,r),"L"),V=c((t,r)=>K(t,0,1/0,r),"$"),bt=c((t,r)=>K(t,1,1/0,r),"Re"),R=c((t,r)=>{const o=t.map(M);return X(Q(xe(a=>{for(let s=0,l=o.length;s<l;s++)if(!o[s](a))return!1;return!0}),r))},"x"),y=c((t,r)=>{const o=t.map(M);return X(Q(a=>{for(let s=0,l=o.length;s<l;s++)if(o[s](a))return!0;return!1},r))},"p"),xe=c((t,r=!0,o=!1)=>{const a=M(t);return r?s=>{const l=s.index,f=s.output.length,d=a(s);return!d&&!o&&(s.indexBacktrackMax=Math.max(s.indexBacktrackMax,s.index)),(!d||o)&&(s.index=l,s.output.length!==f&&(s.output.length=f)),d}:a},"q"),Q=c((t,r)=>{const o=M(t);return r?a=>{if(a.options.silent)return o(a);const s=a.output.length;if(o(a)){const l=a.output.splice(s,1/0),f=r(l);return E(f)||a.output.push(f),!0}else return!1}:o},"B"),X=(()=>{let t=0;return r=>{const o=M(r),a=t+=1;return s=>{var l;if(s.options.memoization===!1)return o(s);const f=s.index,d=(l=s.cache)[a]||(l[a]={indexMax:-1,queue:[]}),h=d.queue;if(f<=d.indexMax){const W=d.store||(d.store=new Map);if(h.length){for(let B=0,yr=h.length;B<yr;B+=2){const wr=h[B*2],jr=h[B*2+1];W.set(wr,jr)}h.length=0}const w=W.get(f);if(w===!1)return!1;if(it(w))return s.index=w,!0;if(w)return s.index=w.index,w.output?.length&&s.output.push(...w.output),!0}const F=s.output.length,$r=o(s);if(d.indexMax=Math.max(d.indexMax,f),$r){const W=s.index,w=s.output.length;if(w>F){const B=s.output.slice(F,w);h.push(f,{index:W,output:B})}else h.push(f,W);return!0}else return h.push(f,!1),!1}}})(),ve=c(t=>{let r;return o=>(r||(r=M(t())),r(o))},"G"),M=pt(t=>{if(I(t))return st(t)?ve(t):t;if(de(t)||ut(t))return p(t);if(ge(t))return R(t);if(lt(t))return y(Object.values(t));throw new Error("Invalid rule")}),A=c(t=>t,"d"),xt=c(t=>typeof t=="string","ke"),vt=c(t=>{const r=new WeakMap,o=new WeakMap;return(a,s)=>{const l=s?.partial?o:r,f=l.get(a);if(f!==void 0)return f;const d=t(a,s);return l.set(a,d),d}},"Be"),$t=c(t=>{const r={},o={};return(a,s)=>{const l=s?.partial?o:r;return l[a]??(l[a]=t(a,s))}},"Pe"),yt=p(/\\./,A),wt=p(/./,A),jt=p(/\*\*\*+/,"*"),Ot=p(/([^/{[(!])\*\*/,(t,r)=>`${r}*`),Pt=p(/(^|.)\*\*(?=[^*/)\]}])/,(t,r)=>`${r}*`),zt=V(y([yt,jt,Ot,Pt,wt])),_t=zt,Et=c(t=>me(t,_t,{memoization:!1}).join(""),"Ie"),Mt=Et,$e="abcdefghijklmnopqrstuvwxyz",kt=c(t=>{let r="";for(;t>0;){const o=(t-1)%26;r=$e[o]+r,t=Math.floor((t-1)/26)}return r},"Le"),ye=c(t=>{let r=0;for(let o=0,a=t.length;o<a;o++)r=r*26+$e.indexOf(t[o])+1;return r},"V"),ee=c((t,r)=>{if(r<t)return ee(r,t);const o=[];for(;t<=r;)o.push(t++);return o},"b"),At=c((t,r,o)=>ee(t,r).map(a=>String(a).padStart(o,"0")),"qe"),we=c((t,r)=>ee(ye(t),ye(r)).map(kt),"W"),m=c(t=>({partial:!1,regex:new RegExp(t,"s"),children:[]}),"c"),C=c(t=>({children:t}),"y"),T=(()=>{const t=c((r,o,a)=>{if(a.has(r))return;a.add(r);const{children:s}=r;if(!s.length)s.push(o);else for(let l=0,f=s.length;l<f;l++)t(s[l],o,a)},"e");return r=>{if(!r.length)return C([]);for(let o=r.length-1;o>=1;o--){const a=new Set,s=r[o-1],l=r[o];t(s,l,a)}return r[0]}})(),k=c(()=>({regex:new RegExp("[\\\\/]","s"),children:[]}),"g"),St=p(/\\./,m),Rt=p(/[$.*+?^(){}[\]\|]/,t=>m(`\\${t}`)),Tt=p(/[\\\/]/,k),Bt=p(/[^$.*+?^(){}[\]\|\\\/]+/,m),Nt=p(/^(?:!!)*!(.*)$/,(t,r)=>m(`(?!^${ke.compile(r).source}$).*?`)),It=p(/^(!!)+/),Ct=y([Nt,It]),Ft=p(/\/(\*\*\/)+/,()=>C([T([k(),m(".+?"),k()]),k()])),Wt=p(/^(\*\*\/)+/,()=>C([m("^"),T([m(".*?"),k()])])),qt=p(/\/(\*\*)$/,()=>C([T([k(),m(".*?")]),m("$")])),Dt=p(/\*\*/,()=>m(".*?")),je=y([Ft,Wt,qt,Dt]),Lt=p(/\*\/(?!\*\*\/|\*$)/,()=>T([m("[^\\\\/]*?"),k()])),Ut=p(/\*/,()=>m("[^\\\\/]*")),Oe=y([Lt,Ut]),Pe=p("?",()=>m("[^\\\\/]")),Zt=p("[",A),Gt=p("]",A),Vt=p(/[!^]/,"^\\\\/"),Yt=p(/[a-z]-[a-z]|[0-9]-[0-9]/i,A),Ht=p(/\\./,A),Jt=p(/[$.*+?^(){}[\|]/,t=>`\\${t}`),Kt=p(/[\\\/]/,"\\\\/"),Qt=p(/[^$.*+?^(){}[\]\|\\\/]+/,A),Xt=y([Ht,Jt,Kt,Yt,Qt]),ze=R([Zt,be(Vt),V(Xt),Gt],t=>m(t.join(""))),er=p("{","(?:"),tr=p("}",")"),rr=p(/(\d+)\.\.(\d+)/,(t,r,o)=>At(+r,+o,Math.min(r.length,o.length)).join("|")),nr=p(/([a-z]+)\.\.([a-z]+)/,(t,r,o)=>we(r,o).join("|")),or=p(/([A-Z]+)\.\.([A-Z]+)/,(t,r,o)=>we(r.toLowerCase(),o.toLowerCase()).join("|").toUpperCase()),sr=y([rr,nr,or]),_e=R([er,sr,tr],t=>m(t.join(""))),ar=p("{"),ir=p("}"),lr=p(","),ur=p(/\\./,m),cr=p(/[$.*+?^(){[\]\|]/,t=>m(`\\${t}`)),fr=p(/[\\\/]/,k),pr=p(/[^$.*+?^(){}[\]\|\\\/,]+/,m),gr=ve(()=>Me),dr=p("",()=>m("(?:)")),mr=bt(y([je,Oe,Pe,ze,_e,gr,ur,cr,fr,pr]),T),Ee=y([mr,dr]),Me=R([ar,be(R([Ee,V(R([lr,Ee]))])),ir],C),hr=V(y([Ct,je,Oe,Pe,ze,_e,Me,St,Rt,Tt,Bt]),T),br=hr,xr=c(t=>me(t,br,{memoization:!1})[0],"kr"),vr=xr,te=c((t,r,o)=>te.compile(t,o).test(r),"N");te.compile=(()=>{const t=$t((o,a)=>rt(vr(Mt(o)),a)),r=vt((o,a)=>ot(o.map(s=>t(s,a))));return(o,a)=>xt(o)?t(o,a):r(o,a)})();var ke=te;return v(_)})();return e.default||e},"_lazyMatch"),re;const Wr=c((e,n)=>(re||(re=Ae(),Ae=null),re(e,n)),"default");var qr=Object.defineProperty,Dr=se((e,n)=>qr(e,"name",{value:n,configurable:!0}),"t$1");const Lr=/^[A-Z]:\//i,j=Dr((e="")=>e&&e.replaceAll("\\","/").replace(Lr,n=>n.toUpperCase()),"normalizeWindowsPath");var Ur=Object.defineProperty,$=se((e,n)=>Ur(e,"name",{value:n,configurable:!0}),"r");const Zr=/^[/\\]{2}/,Gr=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,Ce=/^[A-Z]:$/i,Se=/^\/([A-Z]:)?$/i,Vr=/.(\.[^./]+)$/,Yr=/^[/\\]|^[a-z]:[/\\]/i,Hr=/\/$/,Jr=/^win/i,Kr=$(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),Wn="/",qn=Jr.test(globalThis.process?.platform??"")?";":":",Fe=$((e,n)=>{let i="",u=0,g=-1,x=0,P;for(let v=0;v<=e.length;++v){if(v<e.length)P=e[v];else{if(P==="/")break;P="/"}if(P==="/"){if(!(g===v-1||x===1))if(x===2){if(i.length<2||u!==2||!i.endsWith(".")||i.at(-2)!=="."){if(i.length>2){const _=i.lastIndexOf("/");_===-1?(i="",u=0):(i=i.slice(0,_),u=i.length-1-i.lastIndexOf("/")),g=v,x=0;continue}else if(i.length>0){i="",u=0,g=v,x=0;continue}}n&&(i+=i.length>0?"/..":"..",u=2)}else i.length>0?i+=`/${e.slice(g+1,v)}`:i=e.slice(g+1,v),u=v-g-1;g=v,x=0}else P==="."&&x!==-1?++x:x=-1}return i},"normalizeString"),Z=$(e=>Gr.test(e),"isAbsolute"),We=$(function(e){if(e.length===0)return".";e=j(e);const n=Zr.exec(e),i=Z(e),u=e.at(-1)==="/";return e=Fe(e,!i),e.length===0?i?"/":u?"./":".":(u&&(e+="/"),Ce.test(e)&&(e+="/"),n?i?`//${e}`:`//./${e}`:i&&!Z(e)?`/${e}`:e)},"normalize"),qe=$((...e)=>{let n="";for(const i of e)if(i)if(n.length>0){const u=n.at(-1)==="/",g=i[0]==="/";u&&g?n+=i.slice(1):n+=u||g?i:`/${i}`}else n+=i;return We(n)},"join"),ne=$(function(...e){e=e.map(u=>j(u));let n="",i=!1;for(let u=e.length-1;u>=-1&&!i;u--){const g=u>=0?e[u]:Kr();!g||g.length===0||(n=`${g}/${n}`,i=Z(g))}return n=Fe(n,!i),i&&!Z(n)?`/${n}`:n.length>0?n:"."},"resolve");$(function(e){return j(e)},"toNamespacedPath");const De=$(function(e){return Vr.exec(j(e))?.[1]??""},"extname"),Dn=$(function(e,n){const i=ne(e).replace(Se,"$1").split("/"),u=ne(n).replace(Se,"$1").split("/");if(u[0][1]===":"&&i[0][1]===":"&&i[0]!==u[0])return u.join("/");const g=[...i];for(const x of g){if(u[0]!==x)break;i.shift(),u.shift()}return[...i.map(()=>".."),...u].join("/")},"relative"),Qr=$(e=>{const n=j(e).replace(Hr,"").split("/").slice(0,-1);return n.length===1&&Ce.test(n[0])&&(n[0]=`${n[0]}/`),n.join("/")||(Z(e)?"/":".")},"dirname");$(function(e){const n=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return j(e.root?ne(...n):n.join("/"))},"format");const Xr=$((e,n)=>{const i=j(e).split("/").pop();return n&&i.endsWith(n)?i.slice(0,-n.length):i},"basename"),Ln=$(function(e){const n=Yr.exec(e)?.[0]?.replaceAll("\\","/")??"",i=Xr(e),u=De(i);return{base:i,dir:Qr(e),ext:u,name:i.slice(0,i.length-u.length),root:n}},"parse");$((e,n)=>Wr(n,We(e)),"matchesGlob");var en=Object.defineProperty,S=b((e,n)=>en(e,"name",{value:n,configurable:!0}),"n$1"),tn=Object.defineProperty,z=S((e,n)=>tn(e,"name",{value:n,configurable:!0}),"a");const rn=oe(import.meta.url),D=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,nn=z(e=>{if(typeof D<"u"&&D.versions&&D.versions.node){const[n,i]=D.versions.node.split(".").map(Number);if(n>22||n===22&&i>=3||n===20&&i>=16)return D.getBuiltinModule(e)}return rn(e)},"__cjs_getBuiltinModule"),{fileURLToPath:on}=nn("node:url");var sn=Object.defineProperty,N=z((e,n)=>sn(e,"name",{value:n,configurable:!0}),"t$1");function H(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}b(H,"m$1");S(H,"d");z(H,"getDefaultExportFromCjs");N(H,"getDefaultExportFromCjs");function ae(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}b(ae,"h");S(ae,"O");z(ae,"getDefaultExportFromNamespaceIfPresent");N(ae,"getDefaultExportFromNamespaceIfPresent");function ie(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")&&Object.keys(e).length===1?e.default:e}b(ie,"x");S(ie,"P");z(ie,"getDefaultExportFromNamespaceIfNotNamed");N(ie,"getDefaultExportFromNamespaceIfNotNamed");function le(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var n=e.default;if(typeof n=="function"){var i=N(z(S(b(function u(){var g=!1;try{g=this instanceof u}catch{}return g?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)},"a"),"s"),"a"),"a");i.prototype=n.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach(function(u){var g=Object.getOwnPropertyDescriptor(e,u);Object.defineProperty(i,u,g.get?g:{enumerable:!0,get:N(function(){return e[u]},"get")})}),i}b(le,"y$1");S(le,"_");z(le,"getAugmentedNamespace");N(le,"getAugmentedNamespace");var Re,Te;function ue(){return Te||(Te=1,Re=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cr3","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),Re}b(ue,"w");S(ue,"k");z(ue,"requireBinaryExtensions");var an=ue();const ln=H(an);var un=Object.defineProperty,O=z((e,n)=>un(e,"name",{value:n,configurable:!0}),"r");const cn=new Set(ln),fn=new Set(["/","\\",void 0]),Be=Symbol.for("pathe:normalizedAlias"),pn=/(^|[/\\])([^/\\]+?)(?=(?:\.[^.]+)?$)/,gn=O((e,n)=>n.split("/").length-e.split("/").length,"compareAliases"),Y=O((e="/")=>{const n=e.at(-1);return n==="/"||n==="\\"},"hasTrailingSlash"),Le=O(e=>{if(e[Be])return e;const n=Object.fromEntries(Object.entries(e).toSorted(([i],[u])=>gn(i,u)));for(const i in n)for(const u in n)u===i||i.startsWith(u)||n[i].startsWith(u)&&fn.has(n[i][u.length])&&(n[i]=n[u]+n[i].slice(u.length));return Object.defineProperty(n,Be,{enumerable:!1,value:!0}),n},"normalizeAliases");O((e,n)=>{e=j(e),n=Le(n);for(const[i,u]of Object.entries(n)){if(!e.startsWith(i))continue;const g=Y(i)?i.slice(0,-1):i;if(Y(e[g.length]))return qe(u,e.slice(i.length))}return e},"resolveAlias");O(e=>pn.exec(e)?.[2],"filename");O((e,n)=>{e=j(e),n=Le(n);for(const[i,u]of Object.entries(n).toReversed()){if(!e.startsWith(u))continue;const g=Y(u)?u.slice(0,-1):u;if(Y(e[g.length]))return qe(i,e.slice(u.length))}return e},"reverseResolveAlias");const dn=/^(?:\.?\.[/\\]|\.\.\B)/,mn=/^(?:msys|cygwin)$/;O(e=>dn.test(e)||e==="..","isRelative");O(e=>cn.has(De(e).slice(1).toLowerCase()),"isBinaryPath");const Ue=O(e=>j(e instanceof URL?on(e):e),"toPath");O(()=>{if(!globalThis.process)return!1;if(globalThis.process.platform==="win32"||globalThis.process.platform==="cygwin")return!0;const e=globalThis.process.env.OSTYPE;return typeof e!="string"?!1:mn.test(e)},"isWindows");var hn=Object.defineProperty,Ze=b((e,n)=>hn(e,"name",{value:n,configurable:!0}),"t$1"),bn=Object.defineProperty,ce=Ze((e,n)=>bn(e,"name",{value:n,configurable:!0}),"t");const xn=oe(import.meta.url),L=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,vn=ce(e=>{if(typeof L<"u"&&L.versions&&L.versions.node){const[n,i]=L.versions.node.split(".").map(Number);if(n>22||n===22&&i>=3||n===20&&i>=16)return L.getBuiltinModule(e)}return xn(e)},"__cjs_getBuiltinModule"),{accessSync:$n}=vn("node:fs");var yn=Object.defineProperty,wn=ce((e,n)=>yn(e,"name",{value:n,configurable:!0}),"o");function G(e,n=Er){Ie(e),e=Ue(e);try{return $n(e,n),!0}catch{return!1}}b(G,"i$1");Ze(G,"d");ce(G,"m");wn(G,"isAccessibleSync");var jn=Object.defineProperty,Ge=b((e,n)=>jn(e,"name",{value:n,configurable:!0}),"t"),On=Object.defineProperty,Ve=Ge((e,n)=>On(e,"name",{value:n,configurable:!0}),"t"),Pn=Object.defineProperty,zn=Ve((e,n)=>Pn(e,"name",{value:n,configurable:!0}),"o");let Ne=class extends Error{static{b(this,"c")}static{Ge(this,"i")}static{Ve(this,"n")}static{zn(this,"PermissionError")}constructor(n){super(`EPERM: Operation not permitted, ${n}`)}get code(){return"EPERM"}set code(n){throw new Error("Cannot overwrite code EPERM")}get name(){return"PermissionError"}set name(n){throw new Error("Cannot overwrite name of PermissionError")}};var _n=Object.defineProperty,En=b((e,n)=>_n(e,"name",{value:n,configurable:!0}),"s"),Mn=Object.defineProperty,Ye=En((e,n)=>Mn(e,"name",{value:n,configurable:!0}),"t");const kn=oe(import.meta.url),U=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,He=Ye(e=>{if(typeof U<"u"&&U.versions&&U.versions.node){const[n,i]=U.versions.node.split(".").map(Number);if(n>22||n===22&&i>=3||n===20&&i>=16)return U.getBuiltinModule(e)}return kn(e)},"__cjs_getBuiltinModule"),{readFileSync:An}=He("node:fs"),{unzipSync:Sn,brotliDecompressSync:Rn}=He("node:zlib");var Tn=Object.defineProperty,Je=Ye((e,n)=>Tn(e,"name",{value:n,configurable:!0}),"n");const Bn={brotli:Rn,gzip:Sn,none:Je(e=>e,"none")},Zn=Je((e,n)=>{if(Ie(e),e=Ue(e),!G(e))throw new Ne(`unable to read the non-accessible file: ${e}`);if(!G(e,Mr))throw new Ne(`invalid access to read file at: ${e}`);const{buffer:i,compression:u,encoding:g,flag:x}=n??{},P=An(e,x?{flag:x}:{}),v=Bn[u??"none"],_=v(P);return i?_:_.toString(g??"utf8")},"readFileSync");export{Zn as $,ne as C,Qr as K,We as L,qe as M,Ln as O,Xr as Q,Ue as U,Er as _,Z as a,Cn as b,Ne as c,Ie as f,G as i,qn as j,Fn as o,Mr as s,Wn as y,Dn as z};
@@ -1 +0,0 @@
1
- var h=Object.defineProperty;var f=(n,r)=>h(n,"name",{value:r,configurable:!0});import{M as m,i as k,$ as v}from"./readFileSync-4c_c6Qey-6SWMDNdw.js";import{n as M}from"../packem_chunks/config.js";import{whichBin as $}from"#native";var b=Object.defineProperty,g=f((n,r)=>b(n,"name",{value:r,configurable:!0}),"p");const j=g(n=>{for(const r of[".nvmrc",".node-version"]){const i=m(n,r);if(k(i))try{return v(i).trim().replace(/^v/,"")}catch{}}},"readNodeVersionFile"),l=g((n,r)=>{const i=n.split(/[.\-+]/).map(s=>Number.parseInt(s,10)||0),o=r.split(/[.\-+]/).map(s=>Number.parseInt(s,10)||0),e=Math.max(i.length,o.length);for(let s=0;s<e;s++){const t=i[s]??0,a=o[s]??0;if(t!==a)return t-a}return 0},"compareVersions"),y=g((n,r)=>{const i=r.trim();if(i===""||i==="*")return!0;const o=i.split(/\s+/).filter(Boolean);for(const e of o)if(e.startsWith(">=")){if(l(n,e.slice(2).trim())<0)return!1}else if(e.startsWith("<=")){if(l(n,e.slice(2).trim())>0)return!1}else if(e.startsWith(">")){if(l(n,e.slice(1).trim())<=0)return!1}else if(e.startsWith("<")){if(l(n,e.slice(1).trim())>=0)return!1}else if(/^\d/.test(e)){const s=n.split("."),t=e.split(".");for(const[a,c]of t.entries())if(c!==s[a])return!1}return!0},"satisfiesRange"),V=g(n=>{const r=[],i=m(n,"package.json");let o;try{o=M(i)}catch{return r}const e=process.versions.node;if(o.engines?.node){const t=o.engines.node;y(e,t)||r.push({actual:e,expected:t,kind:"node",message:`package.json engines.node requires ${t}, but the current Node.js is ${e}.`,severity:"error"})}const s=j(n);if(s){const[t,a]=s.split("."),[c,p]=e.split(".");(t!==c||a!==void 0&&a!==p)&&r.push({actual:e,expected:s,kind:"node",message:`.nvmrc pins Node ${s} but the current Node.js is ${e}. Run \`nvm use\` or switch runtimes.`,severity:"warning"})}if(o.packageManager){const[t,a]=o.packageManager.split("@"),c=(process.env.npm_config_user_agent??"").split(" ")[0]??"",[p,u]=c.split("/"),d=t==="aube"&&$("aube")!==null;p&&t&&p!==t?r.push({actual:p,expected:t,kind:"packageManager",message:`package.json packageManager pins ${o.packageManager} but the current invocation is ${c}. Install the correct package manager.`,severity:d?"warning":"error"}):u&&a&&u!==a&&r.push({actual:u,expected:a,kind:"packageManager",message:`package.json packageManager pins ${t}@${a} but the current invocation uses ${t}@${u}.`,severity:"warning"})}return r},"checkRuntimeVersions");export{V as c};