Skip to content

fix(deps): update dependency js-yaml to v4.3.2 [security] - #601

Open
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/npm-js-yaml-vulnerability
Open

renovate[bot] wants to merge 1 commit into
masterfrom
renovate/npm-js-yaml-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Nov 14, 2025 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
js-yaml 4.1.0 → 4.3.2 age confidence

js-yaml has prototype pollution in merge (<<)

CVE-2025-64718 / GHSA-mh29-5h37-fv8m

More information

Details

Impact

In js-yaml 4.1.0, 4.0.0, and 3.14.1 and below, it's possible for an attacker to modify the prototype of the result of a parsed yaml document via prototype pollution (__proto__). All users who parse untrusted yaml documents may be impacted.

Patches

Problem is patched in js-yaml 4.1.1 and 3.14.2.

Workarounds

You can protect against this kind of attack on the server by using node --disable-proto=delete or deno (in Deno, pollution protection is on by default).

References

https://cheatsheetseries.owasp.org/cheatsheets/Prototype_Pollution_Prevention_Cheat_Sheet.html

Severity

  • CVSS Score: 5.3 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


JS-YAML: Quadratic-complexity DoS in merge key handling via repeated aliases

CVE-2026-53550 / GHSA-h67p-54hq-rp68

More information

Details

Summary

A crafted YAML document can trigger algorithmic CPU exhaustion in js-yaml merge-key processing (<<) by repeating the same alias many times in a merge sequence.
This causes quadratic parse-time behavior relative to input size and can block a Node.js worker/event loop for seconds with a relatively small payload (tens of KB), resulting in denial of service.

Details

The issue is in merge handling inside lib/loader.js:

  • storeMappingPair(...) iterates every element of a merge sequence when key tag is tag:yaml.org,2002:merge.
  • For each element, it calls mergeMappings(...).
  • mergeMappings(...) computes Object.keys(source) and performs _hasOwnProperty.call(destination, key) checks for each key.

When input is of the form:

a: &a {k0:0, k1:0, ..., kK:0}
b: {<<: [*a, *a, *a, ... repeated M times ...]}
all *a entries refer to the same anchored object. After the first merge, subsequent merges are semantically no-ops, but the parser still reprocesses all keys each time.
Resulting work is O(K * M), while input size is O(K + M), giving quadratic scaling as payload grows.
Relevant code path:
lib/loader.js in storeMappingPair(...) merge branch (keyTag === 'tag:yaml.org,2002:merge')
lib/loader.js mergeMappings(...)

Root cause

File: lib/loader.js
Function: storeMappingPair(state, _result, overridableKeys, keyTag, keyNode,
valueNode, startLine, startLineStart, startPos)
Lines: ~359-366

if (keyTag === 'tag:yaml.org,2002:merge') {
  if (Array.isArray(valueNode)) {
    for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {
      mergeMappings(state, _result, valueNode[index], overridableKeys);
    }
  } else {
    mergeMappings(state, _result, valueNode, overridableKeys);
  }
}

When the merge value is a sequence (YAML 1.1 <<: [ *a, *a, ... ]), each element
is handed to mergeMappings() without deduplication. mergeMappings() then does

sourceKeys = Object.keys(source);
for (index = 0; index < sourceKeys.length; index += 1) {
  key = sourceKeys[index];
  if (!_hasOwnProperty.call(destination, key)) {
    setProperty(destination, key, source[key]);
    overridableKeys[key] = true;
  }
}

Every alias reference in the sequence resolves (by design) to the SAME object
via state.anchorMap. After the first merge, every subsequent merge of that same
reference is a pure no-op semantically, but still performs:

  • one Object.keys(source) call (O(K))
  • K _hasOwnProperty.call checks on the destination

Total: M * K hasOwnProperty checks + M Object.keys allocations, while the final
object and all observable side effects are identical to a single merge.

YAML semantics for <<: are idempotent and commutative over duplicate sources,
so collapsing duplicates preserves behavior exactly; this isn't a spec trade-off.

PoC

Environment:
js-yaml version: 4.1.1
Node.js: v24.5.0
Platform: arm64 macOS (reproduced consistently)
Reproduction script:
Create many keys in one anchored map (&a).
Merge that same alias repeatedly via <<: [*a, *a, ...].
Measure parse time and compare with control payload using single merge (<<: *a).
Observed repeated runs (same machine):
K=M=1000, input 9,909 bytes: ~33–36 ms
K=M=2000, input 20,909 bytes: ~121–123 ms
K=M=4000, input 42,909 bytes: ~524–537 ms
K=M=6000, input 64,909 bytes: ~1,608–1,829 ms
K=M=8000, input 86,909 bytes: ~3,395–3,565 ms
Control (single merge, similar key counts):
K=2000: ~1–2 ms
K=4000: ~3 ms
K=8000: ~5 ms
Also verified: repeated-merge output equals single-merge output (same key count and same JSON), confirming excess time is redundant computation.

Impact

This is a denial-of-service vulnerability (CPU exhaustion / algorithmic complexity).
Any service parsing untrusted YAML with js-yaml can be impacted, including API backends, CI tools, config processors, and automation services. An attacker can submit crafted YAML to significantly increase CPU time and reduce availability.

Suggested fix:

Dedupe the merge source list by reference before invoking mergeMappings. Any of
the following are minimal and preserve YAML 1.1 merge semantics:

dedupe in storeMappingPair:

if (keyTag === 'tag:yaml.org,2002:merge') {
  if (Array.isArray(valueNode)) {
    var seen = new Set();
    for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {
      var src = valueNode[index];
      if (seen.has(src)) continue;   // idempotent; skip redundant alias
      seen.add(src);
      mergeMappings(state, _result, src, overridableKeys);
    }
  } else {
    mergeMappings(state, _result, valueNode, overridableKeys);
  }
}

Severity

  • CVSS Score: 5.3 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


js-yaml: YAML merge-key chains can force quadratic CPU consumption

CVE-2026-59869 / GHSA-52cp-r559-cp3m

More information

Details

Impact

js-yaml can spend quadratic CPU time parsing a document whose size grows only linearly. The issue is triggered by a chain of mappings where each mapping merges the previous one:

a0: &a0 { k0: 0 }
a1: &a1 { <<: *a0, k1: 1 }
a2: &a2 { <<: *a1, k2: 2 }
a3: &a3 { <<: *a2, k3: 3 }
...
b: *aN

For each new mapping, the loader has to enumerate the keys inherited from the previous mapping. With N chained mappings, this results in roughly 1 + 2 + ... + N merged-key visits, i.e., O(N^2) work for O(N) input size.

PoC

From N = 4000 delay become > 1s (doc size < 100K)

import { performance } from 'node:perf_hooks'
import { Buffer } from 'node:buffer'
import { load, YAML11_SCHEMA } from 'js-yaml'

const n = Number(process.argv[2] || 4000)

function makeMergeChain (count) {
  const lines = ['a0: &a0 { k0: 0 }']

  for (let i = 1; i < count; i++) {
    lines.push(`a${i}: &a${i} { <<: *a${i - 1}, k${i}: ${i} }`)
  }

  lines.push(`b: *a${count - 1}`)
  return `${lines.join('\n')}\n`
}

const source = makeMergeChain(n)

console.log(source.split('\n').slice(0, 8).join('\n'))
console.log('...')
console.log(source.split('\n').slice(-4).join('\n'))
console.log()
console.log(`N: ${n}`)
console.log(`YAML size: ${Buffer.byteLength(source)} bytes`)

const started = performance.now()
const result = load(source, { schema: YAML11_SCHEMA })
const elapsed = performance.now() - started

console.log(`parse time: ${elapsed.toFixed(1)} ms`)
console.log(`top-level keys: ${Object.keys(result).length}`)
console.log(`b keys: ${Object.keys(result.b).length}`)
Patches

Fix released. The most robust protection is to limit the total number of merged keys per parse call. This should close all past and future edge cases with merge. The default 10K-key limit should be okay in most cases.

Severity

  • CVSS Score: 7.5 / 10 (High)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


JS-YAML: Quadratic CPU consumption in !!omap resolution (3.x and 4.x) — CVE-2026-59870 fix not backported

GHSA-5p4m-2wfm-xmqj

More information

Details

Quadratic CPU consumption in !!omap resolution (js-yaml 3.x and 4.x)
Summary

resolveYamlOmap() enforces key uniqueness for !!omap sequences with a linear
scan (objectKeys.indexOf(...)) inside the per-element loop, making resolution
O(n²) in the number of entries. A modestly sized YAML document therefore
consumes disproportionate CPU inside yaml.load(), giving a denial of service
against any consumer that parses untrusted YAML.

!!omap is registered in the default schema
(lib/schema/default.js → require('../type/omap')), so a plain
yaml.load(untrustedInput) with no options is affected — no custom schema or
non-default configuration is required.

This is the same weakness as CVE-2026-59870 / GHSA-724g-mxrg-4qvm, which was
fixed in the 5.x line in 5.2.1. That fix was never backported: both currently
maintained legacy lines still carry the original implementation.

Affected versions
Line Latest tested Status
3.x 3.15.0 Affected — objectKeys.indexOf(pairKey) at lib/type/omap.js:29
4.x 4.3.0 Affected — objectKeys.indexOf(pairKey) at lib/type/omap.js:30
5.x 5.2.2 Not affected — fixed in 5.2.1 (uses a Set)

Both figures are the newest release of each line at the time of writing, so
this is not a "you are on an old version" issue.

Details

lib/type/omap.js (js-yaml 4.3.0):

if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey)
else return false

objectKeys grows by one element per entry, and Array.prototype.indexOf is a
linear scan, so resolving an n-entry !!omap performs roughly
1 + 2 + … + n comparisons — quadratic in n. The work happens synchronously
inside yaml.load(), blocking the event loop for its whole duration.

The 5.x line already solves exactly this by tracking seen keys in a Set
(src/tag/sequence/omap.ts):

if (carrier.seen.has(key)) return 'duplicate key in ordered map'
carrier.seen.add(key)
Proof of concept
// poc.js  —  node poc.js
const yaml = require('js-yaml');
const doc = n => '!!omap\n' + Array.from({length: n}, (_, i) => `- k${i}: ${i}`).join('\n') + '\n';

for (const n of [10000, 20000, 40000, 80000]) {
  const d = doc(n), t = Date.now();
  yaml.load(d);                      // default schema, no options
  console.log(`n=${n} bytes=${d.length} load=${Date.now() - t}ms`);
}
Measured (node v20.20.2, default heap, no flags)

js-yaml 4.3.0

n=10000  bytes=137787   load=54ms
n=20000  bytes=297787   load=169ms
n=40000  bytes=617787   load=646ms
n=80000  bytes=1257787  load=2607ms

js-yaml 3.15.0

n=10000  bytes=137787   load=53ms
n=20000  bytes=297787   load=166ms
n=40000  bytes=617787   load=641ms
n=80000  bytes=1257787  load=2567ms

Runtime grows by a factor of ~4 for each doubling of n, which is the
signature of O(n²) (linear growth would be ~2×).

Scaling further: a 2.48 MB document with 150,000 entries blocked
yaml.load() for 10.8 seconds.

Impact

Any service that parses attacker-influenced YAML with js-yaml 3.x or 4.x can be
stalled with a small input. Because the loop is synchronous, a single request
blocks the Node.js event loop and stalls every other request in the process —
so the amplification is per-process, not just per-request.

Suggested severity: consistent with CVE-2026-59870 (the same weakness in
5.x), i.e. Availability-only impact, network attack vector, no privileges or
user interaction required.

Suggested fix

Mirror the 5.x fix — replace the linear scan with a Set:

// lib/type/omap.js
const seen = new Set()
// ...
if (seen.has(pairKey)) return false
seen.add(pairKey)

This preserves the existing duplicate-key rejection semantics exactly while
making resolution O(n). A maxOmapLength-style cap would also work, but the
Set matches what 5.x already ships and requires no new option.

References
  • CVE-2026-59870 / GHSA-724g-mxrg-4qvm — same weakness in 5.0.0–5.2.0, fixed in 5.2.1
  • lib/type/omap.js (3.x, 4.x) — the affected resolver
  • lib/schema/default.js — registers !!omap in the default schema
Discovery

Found by an automated static-analysis and executed-proof-of-concept scanner run
against js-yaml 4.2.0, then manually verified against 3.15.0 and 4.3.0 by
executing the proof of concept above. All timings in this report were measured
on the current releases of each line, not on the version originally scanned.

Severity

  • CVSS Score: 7.5 / 10 (High)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


js-yaml: maxTotalMergeKeys does not limit CPU use for empty merge sources

CVE-2026-84375 / GHSA-2883-xcg3-v3hh

More information

Details

Summary

maxTotalMergeKeys does not count empty mappings. An attacker can repeatedly merge a large sequence of them and consume significant CPU without reaching the configured limit.

Example
arr: &arr [{}, {}, {}, ...] # N empty mappings
targets:
  - <<: *arr                # repeated K times

For every target, the loader iterates all N elements of arr. This results in O(N * K) work while totalMergeKeys remains unchanged.

PoC
import { performance } from 'node:perf_hooks'
import { load, YAML11_SCHEMA } from 'js-yaml'

const n = 20000

const src =
  'arr: &arr [' + '{},'.repeat(n).slice(0, -1) + ']\n' +
  'targets:\n' +
  '  - <<: *arr\n'.repeat(n)

const started = performance.now()

load(src, { schema: YAML11_SCHEMA })

console.log(`${(performance.now() - started).toFixed(1)} ms`)

Observed results:

N YAML size Time
800 ~13 KB ~20 ms
3200 ~50 KB ~180 ms
20000 ~500 KB ~13 s
Impact

An attacker can submit a relatively small YAML document that causes prolonged CPU consumption despite the default maxTotalMergeKeys limit.

Fix

Count each merge-source mapping as one budget unit, in addition to counting its keys.

Difference with v5

In v3 & v4, merge is enabled by default. So, the severity score is higher.

Severity

  • CVSS Score: 7.5 / 10 (High)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

nodeca/js-yaml (js-yaml)

v4.3.2

Compare Source

v4.3.1

Compare Source

v4.3.0

Compare Source

Security
  • Backported maxTotalMergeKeys option.

v4.2.0

Compare Source

Added
  • Added docs/safety.md with notes about processing untrusted YAML.
  • Added maxDepth (100) loader option. Not a problem, but gives a better
    exception instead of RangeError on stack overflow.
  • Added a loader option limiting merge sequence length. Not a problem after
    merge fix, but an additional restriction for safety.
  • Added sourcemaps to dist/ builds.
Changed
  • Stop resolving numbers with underscores as numeric scalars, #​627.
  • Switched dev toolchains to Vite / neostandard.
  • Updated demo.
  • Reorganized tests.
  • dist/ files are no longer kept in the repository.
Fixed
  • Fix parsing of properties on the first implicit block mapping key, #​62.
  • Fix trailing whitespace handling when folding flow scalar lines, #​307.
  • Reject top-level block scalars without content indentation, #​280.
  • Ensure numbers survive round-trip, #​737.
  • Fix test coverage for issue #​221.
  • Fix flow scalar trailing whitespace folding, #​307.
  • Fix digits in YAML named tag handles.
Security
  • Fix potential DoS via quadratic complexity in merge - deduplicate repeated
    elements (makes sense for malformed files > 10K).

v4.1.1

Compare Source

Security
  • Fix prototype pollution issue in yaml merge (<<) operator.

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@netlify

netlify Bot commented Nov 14, 2025 •

Copy link
Copy Markdown

✅ Deploy Preview for computerization-preview ready!

Name Link
🔨 Latest commit 2931a59
🔍 Latest deploy log https://app.netlify.com/projects/computerization-preview/deploys/691be8c4b8eb1e0008896587
😎 Deploy Preview https://deploy-preview-601--computerization-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@renovate renovate Bot changed the title fix(deps): update dependency js-yaml to v4.1.1 [security] fix(deps): update dependency js-yaml to v4.1.1 [security] - autoclosed Nov 17, 2025
@renovate renovate Bot closed this Nov 17, 2025
@renovate
renovate Bot deleted the renovate/npm-js-yaml-vulnerability branch November 17, 2025 15:38
@renovate renovate Bot changed the title fix(deps): update dependency js-yaml to v4.1.1 [security] - autoclosed fix(deps): update dependency js-yaml to v4.1.1 [security] Nov 18, 2025
@renovate renovate Bot reopened this Nov 18, 2025
@renovate
renovate Bot force-pushed the renovate/npm-js-yaml-vulnerability branch 2 times, most recently from 5e1a2c6 to 2931a59 Compare November 18, 2025 03:32
@renovate renovate Bot changed the title fix(deps): update dependency js-yaml to v4.1.1 [security] fix(deps): update dependency js-yaml to v4.1.1 [security] - autoclosed Mar 27, 2026
@renovate renovate Bot closed this Mar 27, 2026
@renovate renovate Bot changed the title fix(deps): update dependency js-yaml to v4.1.1 [security] - autoclosed fix(deps): update dependency js-yaml to v4.1.1 [security] Mar 30, 2026
@renovate renovate Bot reopened this Mar 30, 2026
@renovate
renovate Bot force-pushed the renovate/npm-js-yaml-vulnerability branch 2 times, most recently from 2931a59 to fd5c84a Compare March 30, 2026 21:32
@netlify

netlify Bot commented Mar 30, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for computerization-preview ready!

Name Link
🔨 Latest commit 49d9ca3
🔍 Latest deploy log https://app.netlify.com/projects/computerization-preview/deploys/6a12610bd62b0b00082e6dab
😎 Deploy Preview https://deploy-preview-601--computerization-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@renovate renovate Bot changed the title fix(deps): update dependency js-yaml to v4.1.1 [security] fix(deps): update dependency js-yaml to v4.1.1 [security] - autoclosed Apr 27, 2026
@renovate renovate Bot closed this Apr 27, 2026
@renovate renovate Bot changed the title fix(deps): update dependency js-yaml to v4.1.1 [security] - autoclosed fix(deps): update dependency js-yaml to v4.1.1 [security] Apr 27, 2026
@renovate renovate Bot reopened this Apr 27, 2026
@renovate
renovate Bot force-pushed the renovate/npm-js-yaml-vulnerability branch 2 times, most recently from fd5c84a to 3639390 Compare April 27, 2026 21:33
@renovate renovate Bot changed the title fix(deps): update dependency js-yaml to v4.1.1 [security] fix(deps): update dependency js-yaml to v4.1.1 [security] - autoclosed May 23, 2026
@renovate renovate Bot closed this May 23, 2026
@renovate renovate Bot changed the title fix(deps): update dependency js-yaml to v4.1.1 [security] - autoclosed fix(deps): update dependency js-yaml to v4.1.1 [security] May 24, 2026
@renovate renovate Bot reopened this May 24, 2026
@renovate
renovate Bot force-pushed the renovate/npm-js-yaml-vulnerability branch from 3639390 to 49d9ca3 Compare May 24, 2026 02:23
@renovate
renovate Bot force-pushed the renovate/npm-js-yaml-vulnerability branch from 49d9ca3 to fec3694 Compare August 26, 2026 16:55
@renovate renovate Bot changed the title fix(deps): update dependency js-yaml to v4.1.1 [security] fix(deps): update dependency js-yaml to v4.3.1 [security] Aug 26, 2026
@netlify

netlify Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for computerization-preview failed.

Name Link
🔨 Latest commit 51ce619
🔍 Latest deploy log https://app.netlify.com/projects/computerization-preview/deploys/6ad749d68cd28acbf508f746

@renovate
renovate Bot force-pushed the renovate/npm-js-yaml-vulnerability branch from fec3694 to c9fe578 Compare September 9, 2026 07:03
@renovate renovate Bot changed the title fix(deps): update dependency js-yaml to v4.3.1 [security] fix(deps): update dependency js-yaml to v4.3.2 [security] Sep 9, 2026
@renovate
renovate Bot force-pushed the renovate/npm-js-yaml-vulnerability branch from c9fe578 to fd15b6c Compare September 25, 2026 03:58
@renovate
renovate Bot force-pushed the renovate/npm-js-yaml-vulnerability branch from fd15b6c to c8f4845 Compare October 13, 2026 18:43
@renovate
renovate Bot force-pushed the renovate/npm-js-yaml-vulnerability branch from c8f4845 to 51ce619 Compare October 20, 2026 11:00
@renovate

renovate Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

⚠️ Artifact update problem

Note

This PR body was truncated due to platform limits.

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: yarn.lock
! Corepack is about to download https://repo.yarnpkg.com/3.6.4/packages/yarnpkg-cli/bin/yarn.js
/tmp/containerbase/cache/.cache/node/corepack/v1/yarn/3.6.4/yarn.js:190
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"	",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var x3=w((gtt,v3)=>{"use strict";var aBe=Hy(),{MAX_LENGTH:b3,CHAR_BACKSLASH:vx,CHAR_BACKTICK:ABe,CHAR_COMMA:lBe,CHAR_DOT:cBe,CHAR_LEFT_PARENTHESES:uBe,CHAR_RIGHT_PARENTHESES:gBe,CHAR_LEFT_CURLY_BRACE:fBe,CHAR_RIGHT_CURLY_BRACE:hBe,CHAR_LEFT_SQUARE_BRACKET:Q3,CHAR_RIGHT_SQUARE_BRACKET:S3,CHAR_DOUBLE_QUOTE:pBe,CHAR_SINGLE_QUOTE:dBe,CHAR_NO_BREAK_SPACE:CBe,CHAR_ZERO_WIDTH_NOBREAK_SPACE:mBe}=B3(),EBe=(r,e={})=>{if(typeof r!="string")throw new TypeError("Expected a string");let t=e||{},i=typeof t.maxLength=="number"?Math.min(b3,t.maxLength):b3;if(r.length>i)throw new SyntaxError(`Input length (${r.length}), exceeds max characters (${i})`);let n={type:"root",input:r,nodes:[]},s=[n],o=n,a=n,l=0,c=r.length,u=0,g=0,f,h={},p=()=>r[u++],C=y=>{if(y.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&y.type==="text"){a.value+=y.value;return}return o.nodes.push(y),y.parent=o,y.prev=a,a=y,y};for(C({type:"bos"});u<c;)if(o=s[s.length-1],f=p(),!(f===mBe||f===CBe)){if(f===vx){C({type:"text",value:(e.keepEscaping?f:"")+p()});continue}if(f===S3){C({type:"text",value:"\\"+f});continue}if(f===Q3){l++;let y=!0,B;for(;u<c&&(B=p());){if(f+=B,B===Q3){l++;continue}if(B===vx){f+=p();continue}if(B===S3&&(l--,l===0))break}C({type:"text",value:f});continue}if(f===uBe){o=C({type:"paren",nodes:[]}),s.push(o),C({type:"text",value:f});continue}if(f===gBe){if(o.type!=="paren"){C({type:"text",value:f});continue}o=s.pop(),C({type:"text",value:f}),o=s[s.length-1];continue}if(f===pBe||f===dBe||f===ABe){let y=f,B;for(e.keepQuotes!==!0&&(f="");u<c&&(B=p());){if(B===vx){f+=B+p();continue}if(B===y){e.keepQuotes===!0&&(f+=B);break}f+=B}C({type:"text",value:f});continue}if(f===fBe){g++;let B={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||o.dollar===!0,depth:g,commas:0,ranges:0,nodes:[]};o=C(B),s.push(o),C({type:"open",value:f});continue}if(f===hBe){if(o.type!=="brace"){C({type:"text",value:f});continue}let y="close";o=s.pop(),o.close=!0,C({type:y,value:f}),g--,o=s[s.length-1];continue}if(f===lBe&&g>0){if(o.ranges>0){o.ranges=0;let y=o.nodes.shift();o.nodes=[y,{type:"text",value:aBe(o)}]}C({type:"comma",value:f}),o.commas++;continue}if(f===cBe&&g>0&&o.commas===0){let y=o.nodes;if(g===0||y.length===0){C({type:"text",value:f});continue}if(a.type==="dot"){if(o.range=[],a.value+=f,a.type="range",o.nodes.length!==3&&o.nodes.length!==5){o.invalid=!0,o.ranges=0,a.type="text";continue}o.ranges++,o.args=[];continue}if(a.type==="range"){y.pop();let B=y[y.length-1];B.value+=a.value+f,a=B,o.ranges--;continue}C({type:"dot",value:f});continue}C({type:"text",value:f})}do if(o=s.pop(),o.type!=="root"){o.nodes.forEach(v=>{v.nodes||(v.type==="open"&&(v.isOpen=!0),v.type==="close"&&(v.isClose=!0),v.nodes||(v.type="text"),v.invalid=!0)});let y=s[s.length-1],B=y.nodes.indexOf(o);y.nodes.splice(B,1,...o.nodes)}while(s.length>0);return C({type:"eos"}),n};v3.exports=EBe});var k3=w((ftt,D3)=>{"use strict";var P3=Hy(),IBe=m3(),yBe=y3(),wBe=x3(),Jn=(r,e={})=>{let t=[];if(Array.isArray(r))for(let i of r){let n=Jn.create(i,e);Array.isArray(n)?t.push(...n):t.push(n)}else t=[].concat(Jn.create(r,e));return e&&e.expand===!0&&e.nodupes===!0&&(t=[...new Set(t)]),t};Jn.parse=(r,e={})=>wBe(r,e);Jn.stringify=(r,e={})=>P3(typeof r=="string"?Jn.parse(r,e):r,e);Jn.compile=(r,e={})=>(typeof r=="string"&&(r=Jn.parse(r,e)),IBe(r,e));Jn.expand=(r,e={})=>{typeof r=="string"&&(r=Jn.parse(r,e));let t=yBe(r,e);return e.noempty===!0&&(t=t.filter(Boolean)),e.nodupes===!0&&(t=[...new Set(t)]),t};Jn.create=(r,e={})=>r===""||r.length<3?[r]:e.expand!==!0?Jn.compile(r,e):Jn.expand(r,e);D3.exports=Jn});var Gd=w((htt,L3)=>{"use strict";var BBe=J("path"),Ko="\\\\/",R3=`[^${Ko}]`,Na="\\.",bBe="\\+",QBe="\\?",Yy="\\/",SBe="(?=.)",F3="[^/]",xx=`(?:${Yy}|$)`,N3=`(?:^|${Yy})`,Px=`${Na}{1,2}${xx}`,vBe=`(?!${Na})`,xBe=`(?!${N3}${Px})`,PBe=`(?!${Na}{0,1}${xx})`,DBe=`(?!${Px})`,kBe=`[^.${Yy}]`,RBe=`${F3}*?`,T3={DOT_LITERAL:Na,PLUS_LITERAL:bBe,QMARK_LITERAL:QBe,SLASH_LITERAL:Yy,ONE_CHAR:SBe,QMARK:F3,END_ANCHOR:xx,DOTS_SLASH:Px,NO_DOT:vBe,NO_DOTS:xBe,NO_DOT_SLASH:PBe,NO_DOTS_SLASH:DBe,QMARK_NO_DOT:kBe,STAR:RBe,START_ANCHOR:N3},FBe={...T3,SLASH_LITERAL:`[${Ko}]`,QMARK:R3,STAR:`${R3}*?`,DOTS_SLASH:`${Na}{1,2}(?:[${Ko}]|$)`,NO_DOT:`(?!${Na})`,NO_DOTS:`(?!(?:^|[${Ko}])${Na}{1,2}(?:[${Ko}]|$))`,NO_DOT_SLASH:`(?!${Na}{0,1}(?:[${Ko}]|$))`,NO_DOTS_SLASH:`(?!${Na}{1,2}(?:[${Ko}]|$))`,QMARK_NO_DOT:`[^.${Ko}]`,START_ANCHOR:`(?:^|[${Ko}])`,END_ANCHOR:`(?:[${Ko}]|$)`},NBe={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"};L3.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:NBe,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:BBe.sep,extglobChars(r){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${r.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(r){return r===!0?FBe:T3}}});var Yd=w(wn=>{"use strict";var TBe=J("path"),LBe=process.platform==="win32",{REGEX_BACKSLASH:OBe,REGEX_REMOVE_BACKSLASH:MBe,REGEX_SPECIAL_CHARS:KBe,REGEX_SPECIAL_CHARS_GLOBAL:UBe}=Gd();wn.isObject=r=>r!==null&&typeof r=="object"&&!Array.isArray(r);wn.hasRegexChars=r=>KBe.test(r);wn.isRegexChar=r=>r.length===1&&wn.hasRegexChars(r);wn.escapeRegex=r=>r.replace(UBe,"\\$1");wn.toPosixSlashes=r=>r.replace(OBe,"/");wn.removeBackslashes=r=>r.replace(MBe,e=>e==="\\"?"":e);wn.supportsLookbehinds=()=>{let r=process.version.slice(1).split(".").map(Number);return r.length===3&&r[0]>=9||r[0]===8&&r[1]>=10};wn.isWindows=r=>r&&typeof r.windows=="boolean"?r.windows:LBe===!0||TBe.sep==="\\";wn.escapeLast=(r,e,t)=>{let i=r.lastIndexOf(e,t);return i===-1?r:r[i-1]==="\\"?wn.escapeLast(r,e,i-1):`${r.slice(0,i)}\\${r.slice(i)}`};wn.removePrefix=(r,e={})=>{let t=r;return t.startsWith("./")&&(t=t.slice(2),e.prefix="./"),t};wn.wrapOutput=(r,e={},t={})=>{let i=t.contains?"":"^",n=t.contains?"":"$",s=`${i}(?:${r})${n}`;return e.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var j3=w((dtt,Y3)=>{"use strict";var O3=Yd(),{CHAR_ASTERISK:Dx,CHAR_AT:HBe,CHAR_BACKWARD_SLASH:jd,CHAR_COMMA:GBe,CHAR_DOT:kx,CHAR_EXCLAMATION_MARK:Rx,CHAR_FORWARD_SLASH:G3,CHAR_LEFT_CURLY_BRACE:Fx,CHAR_LEFT_PARENTHESES:Nx,CHAR_LEFT_SQUARE_BRACKET:YBe,CHAR_PLUS:jBe,CHAR_QUESTION_MARK:M3,CHAR_RIGHT_CURLY_BRACE:qBe,CHAR_RIGHT_PARENTHESES:K3,CHAR_RIGHT_SQUARE_BRACKET:JBe}=Gd(),U3=r=>r===G3||r===jd,H3=r=>{r.isPrefix!==!0&&(r.depth=r.isGlobstar?1/0:1)},WBe=(r,e)=>{let t=e||{},i=r.length-1,n=t.parts===!0||t.scanToEnd===!0,s=[],o=[],a=[],l=r,c=-1,u=0,g=0,f=!1,h=!1,p=!1,C=!1,y=!1,B=!1,v=!1,D=!1,T=!1,H=!1,j=0,$,V,W={value:"",depth:0,isGlob:!1},_=()=>c>=i,A=()=>l.charCodeAt(c+1),Ae=()=>($=V,l.charCodeAt(++c));for(;c<i;){V=Ae();let ue;if(V===jd){v=W.backslashes=!0,V=Ae(),V===Fx&&(B=!0);continue}if(B===!0||V===Fx){for(j++;_()!==!0&&(V=Ae());){if(V===jd){v=W.backslashes=!0,Ae();continue}if(V===Fx){j++;continue}if(B!==!0&&V===kx&&(V=Ae())===kx){if(f=W.isBrace=!0,p=W.isGlob=!0,H=!0,n===!0)continue;break}if(B!==!0&&V===GBe){if(f=W.isBrace=!0,p=W.isGlob=!0,H=!0,n===!0)continue;break}if(V===qBe&&(j--,j===0)){B=!1,f=W.isBrace=!0,H=!0;break}}if(n===!0)continue;break}if(V===G3){if(s.push(c),o.push(W),W={value:"",depth:0,isGlob:!1},H===!0)continue;if($===kx&&c===u+1){u+=2;continue}g=c+1;continue}if(t.noext!==!0&&(V===jBe||V===HBe||V===Dx||V===M3||V===Rx)===!0&&A()===Nx){if(p=W.isGlob=!0,C=W.isExtglob=!0,H=!0,V===Rx&&c===u&&(T=!0),n===!0){for(;_()!==!0&&(V=Ae());){if(V===jd){v=W.backslashes=!0,V=Ae();continue}if(V===K3){p=W.isGlob=!0,H=!0;break}}continue}break}if(V===Dx){if($===Dx&&(y=W.isGlobstar=!0),p=W.isGlob=!0,H=!0,n===!0)continue;break}if(V===M3){if(p=W.isGlob=!0,H=!0,n===!0)continue;break}if(V===YBe){for(;_()!==!0&&(ue=Ae());){if(ue===jd){v=W.backslashes=!0,Ae();continue}if(ue===JBe){h=W.isBracket=!0,p=W.isGlob=!0,H=!0;break}}if(n===!0)continue;break}if(t.nonegate!==!0&&V===Rx&&c===u){D=W.negated=!0,u++;continue}if(t.noparen!==!0&&V===Nx){if(p=W.isGlob=!0,n===!0){for(;_()!==!0&&(V=Ae());){if(V===Nx){v=W.backslashes=!0,V=Ae();continue}if(V===K3){H=!0;break}}continue}break}if(p===!0){if(H=!0,n===!0)continue;break}}t.noext===!0&&(C=!1,p=!1);let ge=l,re="",O="";u>0&&(re=l.slice(0,u),l=l.slice(u),g-=u),ge&&p===!0&&g>0?(ge=l.slice(0,g),O=l.slice(g)):p===!0?(ge="",O=l):ge=l,ge&&ge!==""&&ge!=="/"&&ge!==l&&U3(ge.charCodeAt(ge.length-1))&&(ge=ge.slice(0,-1)),t.unescape===!0&&(O&&(O=O3.removeBackslashes(O)),ge&&v===!0&&(ge=O3.removeBackslashes(ge)));let F={prefix:re,input:r,start:u,base:ge,glob:O,isBrace:f,isBracket:h,isGlob:p,isExtglob:C,isGlobstar:y,negated:D,negatedExtglob:T};if(t.tokens===!0&&(F.maxDepth=0,U3(V)||o.push(W),F.tokens=o),t.parts===!0||t.tokens===!0){let ue;for(let pe=0;pe<s.length;pe++){let ke=ue?ue+1:u,Fe=s[pe],Ne=r.slice(ke,Fe);t.tokens&&(pe===0&&u!==0?(o[pe].isPrefix=!0,o[pe].value=re):o[pe].value=Ne,H3(o[pe]),F.maxDepth+=o[pe].depth),(pe!==0||Ne!=="")&&a.push(Ne),ue=Fe}if(ue&&ue+1<r.length){let pe=r.slice(ue+1);a.push(pe),t.tokens&&(o[o.length-1].value=pe,H3(o[o.length-1]),F.maxDepth+=o[o.length-1].depth)}F.slashes=s,F.parts=a}return F};Y3.exports=WBe});var W3=w((Ctt,J3)=>{"use strict";var jy=Gd(),Wn=Yd(),{MAX_LENGTH:qy,POSIX_REGEX_SOURCE:zBe,REGEX_NON_SPECIAL_CHARS:VBe,REGEX_SPECIAL_CHARS_BACKREF:XBe,REPLACEMENTS:q3}=jy,ZBe=(r,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...r,e);r.sort();let t=`[${r.join("-")}]`;try{new RegExp(t)}catch{return r.map(n=>Wn.escapeRegex(n)).join("..")}return t},ff=(r,e)=>`Missing ${r}: "${e}" - use "\\\\${e}" to match literal characters`,Tx=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a string");r=q3[r]||r;let t={...e},i=typeof t.maxLength=="number"?Math.min(qy,t.maxLength):qy,n=r.length;if(n>i)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${i}`);let s={type:"bos",value:"",output:t.prepend||""},o=[s],a=t.capture?"":"?:",l=Wn.isWindows(e),c=jy.globChars(l),u=jy.extglobChars(c),{DOT_LITERAL:g,PLUS_LITERAL:f,SLASH_LITERAL:h,ONE_CHAR:p,DOTS_SLASH:C,NO_DOT:y,NO_DOT_SLASH:B,NO_DOTS_SLASH:v,QMARK:D,QMARK_NO_DOT:T,STAR:H,START_ANCHOR:j}=c,$=Y=>`(${a}(?:(?!${j}${Y.dot?C:g}).)*?)`,V=t.dot?"":y,W=t.dot?D:T,_=t.bash===!0?$(t):H;t.capture&&(_=`(${_})`),typeof t.noext=="boolean"&&(t.noextglob=t.noext);let A={input:r,index:-1,start:0,dot:t.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:o};r=Wn.removePrefix(r,A),n=r.length;let Ae=[],ge=[],re=[],O=s,F,ue=()=>A.index===n-1,pe=A.peek=(Y=1)=>r[A.index+Y],ke=A.advance=()=>r[++A.index]||"",Fe=()=>r.slice(A.index+1),Ne=(Y="",he=0)=>{A.consumed+=Y,A.index+=he},oe=Y=>{A.output+=Y.output!=null?Y.output:Y.value,Ne(Y.value)},le=()=>{let Y=1;for(;pe()==="!"&&(pe(2)!=="("||pe(3)==="?");)ke(),A.start++,Y++;return Y%2===0?!1:(A.negated=!0,A.start++,!0)},Be=Y=>{A[Y]++,re.push(Y)},fe=Y=>{A[Y]--,re.pop()},ae=Y=>{if(O.type==="globstar"){let he=A.braces>0&&(Y.type==="comma"||Y.type==="brace"),ie=Y.extglob===!0||Ae.length&&(Y.type==="pipe"||Y.type==="paren");Y.type!=="slash"&&Y.type!=="paren"&&!he&&!ie&&(A.output=A.output.slice(0,-O.output.length),O.type="star",O.value="*",O.output=_,A.output+=O.output)}if(Ae.length&&Y.type!=="paren"&&(Ae[Ae.length-1].inner+=Y.value),(Y.value||Y.output)&&oe(Y),O&&O.type==="text"&&Y.type==="text"){O.value+=Y.value,O.output=(O.output||"")+Y.value;return}Y.prev=O,o.push(Y),O=Y},qe=(Y,he)=>{let ie={...u[he],conditions:1,inner:""};ie.prev=O,ie.parens=A.parens,ie.output=A.output;let de=(t.capture?"(":"")+ie.open;Be("parens"),ae({type:Y,value:he,output:A.output?"":p}),ae({type:"paren",extglob:!0,value:ke(),output:de}),Ae.push(ie)},ne=Y=>{let he=Y.close+(t.capture?")":""),ie;if(Y.type==="negate"){let de=_;if(Y.inner&&Y.inner.length>1&&Y.inner.includes("/")&&(de=$(t)),(de!==_||ue()||/^\)+$/.test(Fe()))&&(he=Y.close=`)$))${de}`),Y.inner.includes("*")&&(ie=Fe())&&/^\.[^\\/.]+$/.test(ie)){let _e=Tx(ie,{...e,fastpaths:!1}).output;he=Y.close=`)${_e})${de})`}Y.prev.type==="bos"&&(A.negatedExtglob=!0)}ae({type:"paren",extglob:!0,value:F,output:he}),fe("parens")};if(t.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(r)){let Y=!1,he=r.replace(XBe,(ie,de,_e,Pt,It,Or)=>Pt==="\\"?(Y=!0,ie):Pt==="?"?de?de+Pt+(It?D.repeat(It.length):""):Or===0?W+(It?D.repeat(It.length):""):D.repeat(_e.length):Pt==="."?g.repeat(_e.length):Pt==="*"?de?de+Pt+(It?_:""):_:de?ie:`\\${ie}`);return Y===!0&&(t.unescape===!0?he=he.replace(/\\/g,""):he=he.replace(/\\+/g,ie=>ie.length%2===0?"\\\\":ie?"\\":"")),he===r&&t.contains===!0?(A.output=r,A):(A.output=Wn.wrapOutput(he,A,e),A)}for(;!ue();){if(F=ke(),F==="\0")continue;if(F==="\\"){let ie=pe();if(ie==="/"&&t.bash!==!0||ie==="."||ie===";")continue;if(!ie){F+="\\",ae({type:"text",value:F});continue}let de=/^\\+/.exec(Fe()),_e=0;if(de&&de[0].length>2&&(_e=de[0].length,A.index+=_e,_e%2!==0&&(F+="\\")),t.unescape===!0?F=ke():F+=ke(),A.brackets===0){ae({type:"text",value:F});continue}}if(A.brackets>0&&(F!=="]"||O.value==="["||O.value==="[^")){if(t.posix!==!1&&F===":"){let ie=O.value.slice(1);if(ie.includes("[")&&(O.posix=!0,ie.includes(":"))){let de=O.value.lastIndexOf("["),_e=O.value.slice(0,de),Pt=O.value.slice(de+2),It=zBe[Pt];if(It){O.value=_e+It,A.backtrack=!0,ke(),!s.output&&o.indexOf(O)===1&&(s.output=p);continue}}}(F==="["&&pe()!==":"||F==="-"&&pe()==="]")&&(F=`\\${F}`),F==="]"&&(O.value==="["||O.value==="[^")&&(F=`\\${F}`),t.posix===!0&&F==="!"&&O.value==="["&&(F="^"),O.value+=F,oe({value:F});continue}if(A.quotes===1&&F!=='"'){F=Wn.escapeRegex(F),O.value+=F,oe({value:F});continue}if(F==='"'){A.quotes=A.quotes===1?0:1,t.keepQuotes===!0&&ae({type:"text",value:F});continue}if(F==="("){Be("parens"),ae({type:"paren",value:F});continue}if(F===")"){if(A.parens===0&&t.strictBrackets===!0)throw new SyntaxError(ff("opening","("));let ie=Ae[Ae.length-1];if(ie&&A.parens===ie.parens+1){ne(Ae.pop());continue}ae({type:"paren",value:F,output:A.parens?")":"\\)"}),fe("parens");continue}if(F==="["){if(t.nobracket===!0||!Fe().includes("]")){if(t.nobracket!==!0&&t.strictBrackets===!0)throw new SyntaxError(ff("closing","]"));F=`\\${F}`}else Be("brackets");ae({type:"bracket",value:F});continue}if(F==="]"){if(t.nobracket===!0||O&&O.type==="bracket"&&O.value.length===1){ae({type:"text",value:F,output:`\\${F}`});continue}if(A.brackets===0){if(t.strictBrackets===!0)throw new SyntaxError(ff("opening","["));ae({type:"text",value:F,output:`\\${F}`});continue}fe("brackets");let ie=O.value.slice(1);if(O.posix!==!0&&ie[0]==="^"&&!ie.includes("/")&&(F=`/${F}`),O.value+=F,oe({value:F}),t.literalBrackets===!1||Wn.hasRegexChars(ie))continue;let de=Wn.escapeRegex(O.value);if(A.output=A.output.slice(0,-O.value.length),t.literalBrackets===!0){A.output+=de,O.value=de;continue}O.value=`(${a}${de}|${O.value})`,A.output+=O.value;continue}if(F==="{"&&t.nobrace!==!0){Be("braces");let ie={type:"brace",value:F,output:"(",outputIndex:A.output.length,tokensIndex:A.tokens.length};ge.push(ie),ae(ie);continue}if(F==="}"){let ie=ge[ge.length-1];if(t.nobrace===!0||!ie){ae({type:"text",value:F,output:F});continue}let de=")";if(ie.dots===!0){let _e=o.slice(),Pt=[];for(let It=_e.length-1;It>=0&&(o.pop(),_e[It].type!=="brace");It--)_e[It].type!=="dots"&&Pt.unshift(_e[It].value);de=ZBe(Pt,t),A.backtrack=!0}if(ie.comma!==!0&&ie.dots!==!0){let _e=A.output.slice(0,ie.outputIndex),Pt=A.tokens.slice(ie.tokensIndex);ie.value=ie.output="\\{",F=de="\\}",A.output=_e;for(let It of Pt)A.output+=It.output||It.value}ae({type:"brace",value:F,output:de}),fe("braces"),ge.pop();continue}if(F==="|"){Ae.length>0&&Ae[Ae.length-1].conditions++,ae({type:"text",value:F});continue}if(F===","){let ie=F,de=ge[ge.length-1];de&&re[re.length-1]==="braces"&&(de.comma=!0,ie="|"),ae({type:"comma",value:F,output:ie});continue}if(F==="/"){if(O.type==="dot"&&A.index===A.start+1){A.start=A.index+1,A.consumed="",A.output="",o.pop(),O=s;continue}ae({type:"slash",value:F,output:h});continue}if(F==="."){if(A.braces>0&&O.type==="dot"){O.value==="."&&(O.output=g);let ie=ge[ge.length-1];O.type="dots",O.output+=F,O.value+=F,ie.dots=!0;continue}if(A.braces+A.parens===0&&O.type!=="bos"&&O.type!=="slash"){ae({type:"text",value:F,output:g});continue}ae({type:"dot",value:F,output:g});continue}if(F==="?"){if(!(O&&O.value==="(")&&t.noextglob!==!0&&pe()==="("&&pe(2)!=="?"){qe("qmark",F);continue}if(O&&O.type==="paren"){let de=pe(),_e=F;if(de==="<"&&!Wn.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(O.value==="("&&!/[!=<:]/.test(de)||de==="<"&&!/<([!=]|\w+>)/.test(Fe()))&&(_e=`\\${F}`),ae({type:"text",value:F,output:_e});continue}if(t.dot!==!0&&(O.type==="slash"||O.type==="bos")){ae({type:"qmark",value:F,output:T});continue}ae({type:"qmark",value:F,output:D});continue}if(F==="!"){if(t.noextglob!==!0&&pe()==="("&&(pe(2)!=="?"||!/[!=<:]/.test(pe(3)))){qe("negate",F);continue}if(t.nonegate!==!0&&A.index===0){le();continue}}if(F==="+"){if(t.noextglob!==!0&&pe()==="("&&pe(2)!=="?"){qe("plus",F);continue}if(O&&O.value==="("||t.regex===!1){ae({type:"plus",value:F,output:f});continue}if(O&&(O.type==="bracket"||O.type==="paren"||O.type==="brace")||A.parens>0){ae({type:"plus",value:F});continue}ae({type:"plus",value:f});continue}if(F==="@"){if(t.noextglob!==!0&&pe()==="("&&pe(2)!=="?"){ae({type:"at",extglob:!0,value:F,output:""});continue}ae({type:"text",value:F});continue}if(F!=="*"){(F==="$"||F==="^")&&(F=`\\${F}`);let ie=VBe.exec(Fe());ie&&(F+=ie[0],A.index+=ie[0].length),ae({type:"text",value:F});continue}if(O&&(O.type==="globstar"||O.star===!0)){O.type="star",O.star=!0,O.value+=F,O.output=_,A.backtrack=!0,A.globstar=!0,Ne(F);continue}let Y=Fe();if(t.noextglob!==!0&&/^\([^?]/.test(Y)){qe("star",F);continue}if(O.type==="star"){if(t.noglobstar===!0){Ne(F);continue}let ie=O.prev,de=ie.prev,_e=ie.type==="slash"||ie.type==="bos",Pt=de&&(de.type==="star"||de.type==="globstar");if(t.bash===!0&&(!_e||Y[0]&&Y[0]!=="/")){ae({type:"star",value:F,output:""});continue}let It=A.braces>0&&(ie.type==="comma"||ie.type==="brace"),Or=Ae.length&&(ie.type==="pipe"||ie.type==="paren");if(!_e&&ie.type!=="paren"&&!It&&!Or){ae({type:"star",value:F,output:""});continue}for(;Y.slice(0,3)==="/**";){let ii=r[A.index+4];if(ii&&ii!=="/")break;Y=Y.slice(3),Ne("/**",3)}if(ie.type==="bos"&&ue()){O.type="globstar",O.value+=F,O.output=$(t),A.output=O.output,A.globstar=!0,Ne(F);continue}if(ie.type==="slash"&&ie.prev.type!=="bos"&&!Pt&&ue()){A.output=A.output.slice(0,-(ie.output+O.output).length),ie.output=`(?:${ie.output}`,O.type="globstar",O.output=$(t)+(t.strictSlashes?")":"|$)"),O.value+=F,A.globstar=!0,A.output+=ie.output+O.output,Ne(F);continue}if(ie.type==="slash"&&ie.prev.type!=="bos"&&Y[0]==="/"){let ii=Y[1]!==void 0?"|$":"";A.output=A.output.slice(0,-(ie.output+O.output).length),ie.output=`(?:${ie.output}`,O.type="globstar",O.output=`${$(t)}${h}|${h}${ii})`,O.value+=F,A.output+=ie.output+O.output,A.globstar=!0,Ne(F+ke()),ae({type:"slash",value:"/",output:""});continue}if(ie.type==="bos"&&Y[0]==="/"){O.type="globstar",O.value+=F,O.output=`(?:^|${h}|${$(t)}${h})`,A.output=O.output,A.globstar=!0,Ne(F+ke()),ae({type:"slash",value:"/",output:""});continue}A.output=A.output.slice(0,-O.output.length),O.type="globstar",O.output=$(t),O.value+=F,A.output+=O.output,A.globstar=!0,Ne(F);continue}let he={type:"star",value:F,output:_};if(t.bash===!0){he.output=".*?",(O.type==="bos"||O.type==="slash")&&(he.output=V+he.output),ae(he);continue}if(O&&(O.type==="bracket"||O.type==="paren")&&t.regex===!0){he.output=F,ae(he);continue}(A.index===A.start||O.type==="slash"||O.type==="dot")&&(O.type==="dot"?(A.output+=B,O.output+=B):t.dot===!0?(A.output+=v,O.output+=v):(A.output+=V,O.output+=V),pe()!=="*"&&(A.output+=p,O.output+=p)),ae(he)}for(;A.brackets>0;){if(t.strictBrackets===!0)throw new SyntaxError(ff("closing","]"));A.output=Wn.escapeLast(A.output,"["),fe("brackets")}for(;A.parens>0;){if(t.strictBrackets===!0)throw new SyntaxError(ff("closing",")"));A.output=Wn.escapeLast(A.output,"("),fe("parens")}for(;A.braces>0;){if(t.strictBrackets===!0)throw new SyntaxError(ff("closing","}"));A.output=Wn.escapeLast(A.output,"{"),fe("braces")}if(t.strictSlashes!==!0&&(O.type==="star"||O.type==="bracket")&&ae({type:"maybe_slash",value:"",output:`${h}?`}),A.backtrack===!0){A.output="";for(let Y of A.tokens)A.output+=Y.output!=null?Y.output:Y.value,Y.suffix&&(A.output+=Y.suffix)}return A};Tx.fastpaths=(r,e)=>{let t={...e},i=typeof t.maxLength=="number"?Math.min(qy,t.maxLength):qy,n=r.length;if(n>i)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${i}`);r=q3[r]||r;let s=Wn.isWindows(e),{DOT_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:l,DOTS_SLASH:c,NO_DOT:u,NO_DOTS:g,NO_DOTS_SLASH:f,STAR:h,START_ANCHOR:p}=jy.globChars(s),C=t.dot?g:u,y=t.dot?f:u,B=t.capture?"":"?:",v={negated:!1,prefix:""},D=t.bash===!0?".*?":h;t.capture&&(D=`(${D})`);let T=V=>V.noglobstar===!0?D:`(${B}(?:(?!${p}${V.dot?c:o}).)*?)`,H=V=>{switch(V){case"*":return`${C}${l}${D}`;case".*":return`${o}${l}${D}`;case"*.*":return`${C}${D}${o}${l}${D}`;case"*/*":return`${C}${D}${a}${l}${y}${D}`;case"**":return C+T(t);case"**/*":return`(?:${C}${T(t)}${a})?${y}${l}${D}`;case"**/*.*":return`(?:${C}${T(t)}${a})?${y}${D}${o}${l}${D}`;case"**/.*":return`(?:${C}${T(t)}${a})?${o}${l}${D}`;default:{let W=/^(.*?)\.(\w+)$/.exec(V);if(!W)return;let _=H(W[1]);return _?_+o+W[2]:void 0}}},j=Wn.removePrefix(r,v),$=H(j);return $&&t.strictSlashes!==!0&&($+=`${a}?`),$};J3.exports=Tx});var V3=w((mtt,z3)=>{"use strict";var _Be=J("path"),$Be=j3(),Lx=W3(),Ox=Yd(),e0e=Gd(),t0e=r=>r&&typeof r=="object"&&!Array.isArray(r),Gr=(r,e,t=!1)=>{if(Array.isArray(r)){let u=r.map(f=>Gr(f,e,t));return f=>{for(let h of u){let p=h(f);if(p)return p}return!1}}let i=t0e(r)&&r.tokens&&r.input;if(r===""||typeof r!="string"&&!i)throw new TypeError("Expected pattern to be a non-empty string");let n=e||{},s=Ox.isWindows(e),o=i?Gr.compileRe(r,e):Gr.makeRe(r,e,!1,!0),a=o.state;delete o.state;let l=()=>!1;if(n.ignore){let u={...e,ignore:null,onMatch:null,onResult:null};l=Gr(n.ignore,u,t)}let c=(u,g=!1)=>{let{isMatch:f,match:h,output:p}=Gr.test(u,o,e,{glob:r,posix:s}),C={glob:r,state:a,regex:o,posix:s,input:u,output:p,match:h,isMatch:f};return typeof n.onResult=="function"&&n.onResult(C),f===!1?(C.isMatch=!1,g?C:!1):l(u)?(typeof n.onIgnore=="function"&&n.onIgnore(C),C.isMatch=!1,g?C:!1):(typeof n.onMatch=="function"&&n.onMatch(C),g?C:!0)};return t&&(c.state=a),c};Gr.test=(r,e,t,{glob:i,posix:n}={})=>{if(typeof r!="string")throw new TypeError("Expected input to be a string");if(r==="")return{isMatch:!1,output:""};let s=t||{},o=s.format||(n?Ox.toPosixSlashes:null),a=r===i,l=a&&o?o(r):r;return a===!1&&(l=o?o(r):r,a=l===i),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=Gr.matchBase(r,e,t,n):a=e.exec(l)),{isMatch:Boolean(a),match:a,output:l}};Gr.matchBase=(r,e,t,i=Ox.isWindows(t))=>(e instanceof RegExp?e:Gr.makeRe(e,t)).test(_Be.basename(r));Gr.isMatch=(r,e,t)=>Gr(e,t)(r);Gr.parse=(r,e)=>Array.isArray(r)?r.map(t=>Gr.parse(t,e)):Lx(r,{...e,fastpaths:!1});Gr.scan=(r,e)=>$Be(r,e);Gr.compileRe=(r,e,t=!1,i=!1)=>{if(t===!0)return r.output;let n=e||{},s=n.contains?"":"^",o=n.contains?"":"$",a=`${s}(?:${r.output})${o}`;r&&r.negated===!0&&(a=`^(?!${a}).*$`);let l=Gr.toRegex(a,e);return i===!0&&(l.state=r),l};Gr.makeRe=(r,e={},t=!1,i=!1)=>{if(!r||typeof r!="string")throw new TypeError("Expected a non-empty string");let n={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(r[0]==="."||r[0]==="*")&&(n.output=Lx.fastpaths(r,e)),n.output||(n=Lx(r,e)),Gr.compileRe(n,e,t,i)};Gr.toRegex=(r,e)=>{try{let t=e||{};return new RegExp(r,t.flags||(t.nocase?"i":""))}catch(t){if(e&&e.debug===!0)throw t;return/$^/}};Gr.constants=e0e;z3.exports=Gr});var Mx=w((Ett,X3)=>{"use strict";X3.exports=V3()});var Bn=w((Itt,eW)=>{"use strict";var _3=J("util"),$3=k3(),Uo=Mx(),Kx=Yd(),Z3=r=>r===""||r==="./",Sr=(r,e,t)=>{e=[].concat(e),r=[].concat(r);let i=new Set,n=new Set,s=new Set,o=0,a=u=>{s.add(u.output),t&&t.onResult&&t.onResult(u)};for(let u=0;u<e.length;u++){let g=Uo(String(e[u]),{...t,onResult:a},!0),f=g.state.negated||g.state.negatedExtglob;f&&o++;for(let h of r){let p=g(h,!0);!(f?!p.isMatch:p.isMatch)||(f?i.add(p.output):(i.delete(p.output),n.add(p.output)))}}let c=(o===e.length?[...s]:[...n]).filter(u=>!i.has(u));if(t&&c.length===0){if(t.failglob===!0)throw new Error(`No matches found for "${e.join(", ")}"`);if(t.nonull===!0||t.nullglob===!0)return t.unescape?e.map(u=>u.replace(/\\/g,"")):e}return c};Sr.match=Sr;Sr.matcher=(r,e)=>Uo(r,e);Sr.isMatch=(r,e,t)=>Uo(e,t)(r);Sr.any=Sr.isMatch;Sr.not=(r,e,t={})=>{e=[].concat(e).map(String);let i=new Set,n=[],o=Sr(r,e,{...t,onResult:a=>{t.onResult&&t.onResult(a),n.push(a.output)}});for(let a of n)o.includes(a)||i.add(a);return[...i]};Sr.contains=(r,e,t)=>{if(typeof r!="string")throw new TypeError(`Expected a string: "${_3.inspect(r)}"`);if(Array.isArray(e))return e.some(i=>Sr.contains(r,i,t));if(typeof e=="string"){if(Z3(r)||Z3(e))return!1;if(r.includes(e)||r.startsWith("./")&&r.slice(2).includes(e))return!0}return Sr.isMatch(r,e,{...t,contains:!0})};Sr.matchKeys=(r,e,t)=>{if(!Kx.isObject(r))throw new TypeError("Expected the first argument to be an object");let i=Sr(Object.keys(r),e,t),n={};for(let s of i)n[s]=r[s];return n};Sr.some=(r,e,t)=>{let i=[].concat(r);for(let n of[].concat(e)){let s=Uo(String(n),t);if(i.some(o=>s(o)))return!0}return!1};Sr.every=(r,e,t)=>{let i=[].concat(r);for(let n of[].concat(e)){let s=Uo(String(n),t);if(!i.every(o=>s(o)))return!1}return!0};Sr.all=(r,e,t)=>{if(typeof r!="string")throw new TypeError(`Expected a string: "${_3.inspect(r)}"`);return[].concat(e).every(i=>Uo(i,t)(r))};Sr.capture=(r,e,t)=>{let i=Kx.isWindows(t),s=Uo.makeRe(String(r),{...t,capture:!0}).exec(i?Kx.toPosixSlashes(e):e);if(s)return s.slice(1).map(o=>o===void 0?"":o)};Sr.makeRe=(...r)=>Uo.makeRe(...r);Sr.scan=(...r)=>Uo.scan(...r);Sr.parse=(r,e)=>{let t=[];for(let i of[].concat(r||[]))for(let n of $3(String(i),e))t.push(Uo.parse(n,e));return t};Sr.braces=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!/\{.*\}/.test(r)?[r]:$3(r,e)};Sr.braceExpand=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a string");return Sr.braces(r,{...e,expand:!0})};eW.exports=Sr});var rW=w((ytt,tW)=>{"use strict";tW.exports=({onlyFirst:r=!1}={})=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,r?void 0:"g")}});var nW=w((wtt,iW)=>{"use strict";var r0e=rW();iW.exports=r=>typeof r=="string"?r.replace(r0e(),""):r});var mW=w((Ftt,CW)=>{"use strict";CW.exports=(...r)=>[...new Set([].concat(...r))]});var sP=w((Ntt,yW)=>{"use strict";var p0e=J("stream"),EW=p0e.PassThrough,d0e=Array.prototype.slice;yW.exports=C0e;function C0e(){let r=[],e=!1,t=d0e.call(arguments),i=t[t.length-1];i&&!Array.isArray(i)&&i.pipe==null?t.pop():i={};let n=i.end!==!1;i.objectMode==null&&(i.objectMode=!0),i.highWaterMark==null&&(i.highWaterMark=64*1024);let s=EW(i);function o(){for(let c=0,u=arguments.length;c<u;c++)r.push(IW(arguments[c],i));return a(),this}function a(){if(e)return;e=!0;let c=r.shift();if(!c){process.nextTick(l);return}Array.isArray(c)||(c=[c]);let u=c.length+1;function g(){--u>0||(e=!1,a())}function f(h){function p(){h.removeListener("merge2UnpipeEnd",p),h.removeListener("end",p),g()}if(h._readableState.endEmitted)return g();h.on("merge2UnpipeEnd",p),h.on("end",p),h.pipe(s,{end:!1}),h.resume()}for(let h=0;h<c.length;h++)f(c[h]);g()}function l(){return e=!1,s.emit("queueDrain"),n&&s.end()}return s.setMaxListeners(0),s.add=o,s.on("unpipe",function(c){c.emit("merge2UnpipeEnd")}),t.length&&o.apply(null,t),s}function IW(r,e){if(Array.isArray(r))for(let t=0,i=r.length;t<i;t++)r[t]=IW(r[t],e);else{if(!r._readableState&&r.pipe&&(r=r.pipe(EW(e))),!r._readableState||!r.pause||!r.pipe)throw new Error("Only readable stream can be merged.");r.pause()}return r}});var wW=w(Zy=>{"use strict";Object.defineProperty(Zy,"__esModule",{value:!0});function m0e(r){return r.reduce((e,t)=>[].concat(e,t),[])}Zy.flatten=m0e;function E0e(r,e){let t=[[]],i=0;for(let n of r)e(n)?(i++,t[i]=[]):t[i].push(n);return t}Zy.splitWhen=E0e});var BW=w(oP=>{"use strict";Object.defineProperty(oP,"__esModule",{value:!0});function I0e(r){return r.code==="ENOENT"}oP.isEnoentCodeError=I0e});var bW=w(AP=>{"use strict";Object.defineProperty(AP,"__esModule",{value:!0});var aP=class{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}};function y0e(r,e){return new aP(r,e)}AP.createDirentFromStats=y0e});var QW=w(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});var w0e=J("path"),B0e=2,b0e=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;function Q0e(r){return r.replace(/\\/g,"/")}yf.unixify=Q0e;function S0e(r,e){return w0e.resolve(r,e)}yf.makeAbsolute=S0e;function v0e(r){return r.replace(b0e,"\\$2")}yf.escape=v0e;function x0e(r){if(r.charAt(0)==="."){let e=r.charAt(1);if(e==="/"||e==="\\")return r.slice(B0e)}return r}yf.removeLeadingDotSegment=x0e});var vW=w((Ktt,SW)=>{SW.exports=function(e){if(typeof e!="string"||e==="")return!1;for(var t;t=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(t[2])return!0;e=e.slice(t.index+t[0].length)}return!1}});var DW=w((Utt,PW)=>{var P0e=vW(),xW={"{":"}","(":")","[":"]"},D0e=function(r){if(r[0]==="!")return!0;for(var e=0,t=-2,i=-2,n=-2,s=-2,o=-2;e<r.length;){if(r[e]==="*"||r[e+1]==="?"&&/[\].+)]/.test(r[e])||i!==-1&&r[e]==="["&&r[e+1]!=="]"&&(i<e&&(i=r.indexOf("]",e)),i>e&&(o===-1||o>i||(o=r.indexOf("\\",e),o===-1||o>i)))||n!==-1&&r[e]==="{"&&r[e+1]!=="}"&&(n=r.indexOf("}",e),n>e&&(o=r.indexOf("\\",e),o===-1||o>n))||s!==-1&&r[e]==="("&&r[e+1]==="?"&&/[:!=]/.test(r[e+2])&&r[e+3]!==")"&&(s=r.indexOf(")",e),s>e&&(o=r.indexOf("\\",e),o===-1||o>s))||t!==-1&&r[e]==="("&&r[e+1]!=="|"&&(t<e&&(t=r.indexOf("|",e)),t!==-1&&r[t+1]!==")"&&(s=r.indexOf(")",t),s>t&&(o=r.indexOf("\\",t),o===-1||o>s))))return!0;if(r[e]==="\\"){var a=r[e+1];e+=2;var l=xW[a];if(l){var c=r.indexOf(l,e);c!==-1&&(e=c+1)}if(r[e]==="!")return!0}else e++}return!1},k0e=function(r){if(r[0]==="!")return!0;for(var e=0;e<r.length;){if(/[*?{}()[\]]/.test(r[e]))return!0;if(r[e]==="\\"){var t=r[e+1];e+=2;var i=xW[t];if(i){var n=r.indexOf(i,e);n!==-1&&(e=n+1)}if(r[e]==="!")return!0}else e++}return!1};PW.exports=function(e,t){if(typeof e!="string"||e==="")return!1;if(P0e(e))return!0;var i=D0e;return t&&t.strict===!1&&(i=k0e),i(e)}});var RW=w((Htt,kW)=>{"use strict";var R0e=DW(),F0e=J("path").posix.dirname,N0e=J("os").platform()==="win32",lP="/",T0e=/\\/g,L0e=/[\{\[].*[\}\]]$/,O0e=/(^|[^\\])([\{\[]|\([^\)]+$)/,M0e=/\\([\!\*\?\|\[\]\(\)\{\}])/g;kW.exports=function(e,t){var i=Object.assign({flipBackslashes:!0},t);i.flipBackslashes&&N0e&&e.indexOf(lP)<0&&(e=e.replace(T0e,lP)),L0e.test(e)&&(e+=lP),e+="a";do e=F0e(e);while(R0e(e)||O0e.test(e));return e.replace(M0e,"$1")}});var HW=w($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});var K0e=J("path"),U0e=RW(),FW=Bn(),H0e=Mx(),NW="**",G0e="\\",Y0e=/[*?]|^!/,j0e=/\[.*]/,q0e=/(?:^|[^!*+?@])\(.*\|.*\)/,J0e=/[!*+?@]\(.*\)/,W0e=/{.*(?:,|\.\.).*}/;function TW(r,e={}){return!LW(r,e)}$r.isStaticPattern=TW;function LW(r,e={}){return!!(e.caseSensitiveMatch===!1||r.includes(G0e)||Y0e.test(r)||j0e.test(r)||q0e.test(r)||e.extglob!==!1&&J0e.test(r)||e.braceExpansion!==!1&&W0e.test(r))}$r.isDynamicPattern=LW;function z0e(r){return _y(r)?r.slice(1):r}$r.convertToPositivePattern=z0e;function V0e(r){return"!"+r}$r.convertToNegativePattern=V0e;function _y(r){return r.startsWith("!")&&r[1]!=="("}$r.isNegativePattern=_y;function OW(r){return!_y(r)}$r.isPositivePattern=OW;function X0e(r){return r.filter(_y)}$r.getNegativePatterns=X0e;function Z0e(r){return r.filter(OW)}$r.getPositivePatterns=Z0e;function _0e(r){return U0e(r,{flipBackslashes:!1})}$r.getBaseDirectory=_0e;function $0e(r){return r.includes(NW)}$r.hasGlobStar=$0e;function MW(r){return r.endsWith("/"+NW)}$r.endsWithSlashGlobStar=MW;function ebe(r){let e=K0e.basename(r);return MW(r)||TW(e)}$r.isAffectDepthOfReadingPattern=ebe;function tbe(r){return r.reduce((e,t)=>e.concat(KW(t)),[])}$r.expandPatternsWithBraceExpansion=tbe;function KW(r){return FW.braces(r,{expand:!0,nodupes:!0})}$r.expandBraceExpansion=KW;function rbe(r,e){let t=H0e.scan(r,Object.assign(Object.assign({},e),{parts:!0}));return t.parts.length===0?[r]:t.parts}$r.getPatternParts=rbe;function UW(r,e){return FW.makeRe(r,e)}$r.makeRe=UW;function ibe(r,e){return r.map(t=>UW(t,e))}$r.convertPatternsToRe=ibe;function nbe(r,e){return e.some(t=>t.test(r))}$r.matchAny=nbe});var YW=w(cP=>{"use strict";Object.defineProperty(cP,"__esModule",{value:!0});var sbe=sP();function obe(r){let e=sbe(r);return r.forEach(t=>{t.once("error",i=>e.emit("error",i))}),e.once("close",()=>GW(r)),e.once("end",()=>GW(r)),e}cP.merge=obe;function GW(r){r.forEach(e=>e.emit("close"))}});var jW=w($y=>{"use strict";Object.defineProperty($y,"__esModule",{value:!0});function abe(r){return typeof r=="string"}$y.isString=abe;function Abe(r){return r===""}$y.isEmpty=Abe});var Oa=w(La=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});var lbe=wW();La.array=lbe;var cbe=BW();La.errno=cbe;var ube=bW();La.fs=ube;var gbe=QW();La.path=gbe;var fbe=HW();La.pattern=fbe;var hbe=YW();La.stream=hbe;var pbe=jW();La.string=pbe});var VW=w(Ma=>{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});var bc=Oa();function dbe(r,e){let t=qW(r),i=JW(r,e.ignore),n=t.filter(l=>bc.pattern.isStaticPattern(l,e)),s=t.filter(l=>bc.pattern.isDynamicPattern(l,e)),o=uP(n,i,!1),a=uP(s,i,!0);return o.concat(a)}Ma.generate=dbe;function uP(r,e,t){let i=WW(r);return"."in i?[gP(".",r,e,t)]:zW(i,e,t)}Ma.convertPatternsToTasks=uP;function qW(r){return bc.pattern.getPositivePatterns(r)}Ma.getPositivePatterns=qW;function JW(r,e){return bc.pattern.getNegativePatterns(r).concat(e).map(bc.pattern.convertToPositivePattern)}Ma.getNegativePatternsAsPositive=JW;function WW(r){let e={};return r.reduce((t,i)=>{let n=bc.pattern.getBaseDirectory(i);return n in t?t[n].push(i):t[n]=[i],t},e)}Ma.groupPatternsByBaseDirectory=WW;function zW(r,e,t){return Object.keys(r).map(i=>gP(i,r[i],e,t))}Ma.convertPatternGroupsToTasks=zW;function gP(r,e,t,i){return{dynamic:i,positive:e,negative:t,base:r,patterns:[].concat(e,t.map(bc.pattern.convertToNegativePattern))}}Ma.convertPatternGroupToTask=gP});var ZW=w(ew=>{"use strict";Object.defineProperty(ew,"__esModule",{value:!0});ew.read=void 0;function Cbe(r,e,t){e.fs.lstat(r,(i,n)=>{if(i!==null){XW(t,i);return}if(!n.isSymbolicLink()||!e.followSymbolicLink){fP(t,n);return}e.fs.stat(r,(s,o)=>{if(s!==null){if(e.throwErrorOnBrokenSymbolicLink){XW(t,s);return}fP(t,n);return}e.markSymbolicLink&&(o.isSymbolicLink=()=>!0),fP(t,o)})})}ew.read=Cbe;function XW(r,e){r(e)}function fP(r,e){r(null,e)}});var _W=w(tw=>{"use strict";Object.defineProperty(tw,"__esModule",{value:!0});tw.read=void 0;function mbe(r,e){let t=e.fs.lstatSync(r);if(!t.isSymbolicLink()||!e.followSymbolicLink)return t;try{let i=e.fs.statSync(r);return e.markSymbolicLink&&(i.isSymbolicLink=()=>!0),i}catch(i){if(!e.throwErrorOnBrokenSymbolicLink)return t;throw i}}tw.read=mbe});var $W=w(UA=>{"use strict";Object.defineProperty(UA,"__esModule",{value:!0});UA.createFileSystemAdapter=UA.FILE_SYSTEM_ADAPTER=void 0;var rw=J("fs");UA.FILE_SYSTEM_ADAPTER={lstat:rw.lstat,stat:rw.stat,lstatSync:rw.lstatSync,statSync:rw.statSync};function Ebe(r){return r===void 0?UA.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},UA.FILE_SYSTEM_ADAPTER),r)}UA.createFileSystemAdapter=Ebe});var e4=w(pP=>{"use strict";Object.defineProperty(pP,"__esModule",{value:!0});var Ibe=$W(),hP=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=Ibe.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,t){return e!=null?e:t}};pP.default=hP});var Qc=w(HA=>{"use strict";Object.defineProperty(HA,"__esModule",{value:!0});HA.statSync=HA.stat=HA.Settings=void 0;var t4=ZW(),ybe=_W(),dP=e4();HA.Settings=dP.default;function wbe(r,e,t){if(typeof e=="function"){t4.read(r,CP(),e);return}t4.read(r,CP(e),t)}HA.stat=wbe;function Bbe(r,e){let t=CP(e);return ybe.read(r,t)}HA.statSync=Bbe;function CP(r={}){return r instanceof dP.default?r:new dP.default(r)}});var i4=w((_tt,r4)=>{r4.exports=bbe;function bbe(r,e){var t,i,n,s=!0;Array.isArray(r)?(t=[],i=r.length):(n=Object.keys(r),t={},i=n.length);function o(l){function c(){e&&e(l,t),e=null}s?process.nextTick(c):c()}function a(l,c,u){t[l]=u,(--i===0||c)&&o(c)}i?n?n.forEach(function(l){r[l](function(c,u){a(l,c,u)})}):r.forEach(function(l,c){l(function(u,g){a(c,u,g)})}):o(null),s=!1}});var mP=w(nw=>{"use strict";Object.defineProperty(nw,"__esModule",{value:!0});nw.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var iw=process.versions.node.split(".");if(iw[0]===void 0||iw[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var n4=Number.parseInt(iw[0],10),Qbe=Number.parseInt(iw[1],10),s4=10,Sbe=10,vbe=n4>s4,xbe=n4===s4&&Qbe>=Sbe;nw.IS_SUPPORT_READDIR_WITH_FILE_TYPES=vbe||xbe});var o4=w(sw=>{"use strict";Object.defineProperty(sw,"__esModule",{value:!0});sw.createDirentFromStats=void 0;var EP=class{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}};function Pbe(r,e){return new EP(r,e)}sw.createDirentFromStats=Pbe});var IP=w(ow=>{"use strict";Object.defineProperty(ow,"__esModule",{value:!0});ow.fs=void 0;var Dbe=o4();ow.fs=Dbe});var yP=w(aw=>{"use strict";Object.defineProperty(aw,"__esModule",{value:!0});aw.joinPathSegments=void 0;function kbe(r,e,t){return r.endsWith(t)?r+e:r+t+e}aw.joinPathSegments=kbe});var g4=w(GA=>{"use strict";Object.defineProperty(GA,"__esModule",{value:!0});GA.readdir=GA.readdirWithFileTypes=GA.read=void 0;var Rbe=Qc(),a4=i4(),Fbe=mP(),A4=IP(),l4=yP();function Nbe(r,e,t){if(!e.stats&&Fbe.IS_SUPPORT_READDIR_WITH_FILE_TYPES){c4(r,e,t);return}u4(r,e,t)}GA.read=Nbe;function c4(r,e,t){e.fs.readdir(r,{withFileTypes:!0},(i,n)=>{if(i!==null){Aw(t,i);return}let s=n.map(a=>({dirent:a,name:a.name,path:l4.joinPathSegments(r,a.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){wP(t,s);return}let o=s.map(a=>Tbe(a,e));a4(o,(a,l)=>{if(a!==null){Aw(t,a);return}wP(t,l)})})}GA.readdirWithFileTypes=c4;function Tbe(r,e){return t=>{if(!r.dirent.isSymbolicLink()){t(null,r);return}e.fs.stat(r.path,(i,n)=>{if(i!==null){if(e.throwErrorOnBrokenSymbolicLink){t(i);return}t(null,r);return}r.dirent=A4.fs.createDirentFromStats(r.name,n),t(null,r)})}}function u4(r,e,t){e.fs.readdir(r,(i,n)=>{if(i!==null){Aw(t,i);return}let s=n.map(o=>{let a=l4.joinPathSegments(r,o,e.pathSegmentSeparator);return l=>{Rbe.stat(a,e.fsStatSettings,(c,u)=>{if(c!==null){l(c);return}let g={name:o,path:a,dirent:A4.fs.createDirentFromStats(o,u)};e.stats&&(g.stats=u),l(null,g)})}});a4(s,(o,a)=>{if(o!==null){Aw(t,o);return}wP(t,a)})})}GA.readdir=u4;function Aw(r,e){r(e)}function wP(r,e){r(null,e)}});var C4=w(YA=>{"use strict";Object.defineProperty(YA,"__esModule",{value:!0});YA.readdir=YA.readdirWithFileTypes=YA.read=void 0;var Lbe=Qc(),Obe=mP(),f4=IP(),h4=yP();function Mbe(r,e){return!e.stats&&Obe.IS_SUPPORT_READDIR_WITH_FILE_TYPES?p4(r,e):d4(r,e)}YA.read=Mbe;function p4(r,e){return e.fs.readdirSync(r,{withFileTypes:!0}).map(i=>{let n={dirent:i,name:i.name,path:h4.joinPathSegments(r,i.name,e.pathSegmentSeparator)};if(n.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{let s=e.fs.statSync(n.path);n.dirent=f4.fs.createDirentFromStats(n.name,s)}catch(s){if(e.throwErrorOnBrokenSymbolicLink)throw s}return n})}YA.readdirWithFileTypes=p4;function d4(r,e){return e.fs.readdirSync(r).map(i=>{let n=h4.joinPathSegments(r,i,e.pathSegmentSeparator),s=Lbe.statSync(n,e.fsStatSettings),o={name:i,path:n,dirent:f4.fs.createDirentFromStats(i,s)};return e.stats&&(o.stats=s),o})}YA.readdir=d4});var m4=w(jA=>{"use strict";Object.defineProperty(jA,"__esModule",{value:!0});jA.createFileSystemAdapter=jA.FILE_SYSTEM_ADAPTER=void 0;var wf=J("fs");jA.FILE_SYSTEM_ADAPTER={lstat:wf.lstat,stat:wf.stat,lstatSync:wf.lstatSync,statSync:wf.statSync,readdir:wf.readdir,readdirSync:wf.readdirSync};function Kbe(r){return r===void 0?jA.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},jA.FILE_SYSTEM_ADAPTER),r)}jA.createFileSystemAdapter=Kbe});var E4=w(bP=>{"use strict";Object.defineProperty(bP,"__esModule",{value:!0});var Ube=J("path"),Hbe=Qc(),Gbe=m4(),BP=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=Gbe.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,Ube.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new Hbe.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return e!=null?e:t}};bP.default=BP});var lw=w(qA=>{"use strict";Object.defineProperty(qA,"__esModule",{value:!0});qA.Settings=qA.scandirSync=qA.scandir=void 0;var I4=g4(),Ybe=C4(),QP=E4();qA.Settings=QP.default;function jbe(r,e,t){if(typeof e=="function"){I4.read(r,SP(),e);return}I4.read(r,SP(e),t)}qA.scandir=jbe;function qbe(r,e){let t=SP(e);return Ybe.read(r,t)}qA.scandirSync=qbe;function SP(r={}){return r instanceof QP.default?r:new QP.default(r)}});var w4=w((Art,y4)=>{"use strict";function Jbe(r){var e=new r,t=e;function i(){var s=e;return s.next?e=s.next:(e=new r,t=e),s.next=null,s}function n(s){t.next=s,t=s}return{get:i,release:n}}y4.exports=Jbe});var b4=w((lrt,vP)=>{"use strict";var Wbe=w4();function B4(r,e,t){if(typeof r=="function"&&(t=e,e=r,r=null),t<1)throw new Error("fastqueue concurrency must be greater than 1");var i=Wbe(zbe),n=null,s=null,o=0,a=null,l={push:C,drain:Is,saturated:Is,pause:u,paused:!1,concurrency:t,running:c,resume:h,idle:p,length:g,getQueue:f,unshift:y,empty:Is,kill:v,killAndDrain:D,error:T};return l;function c(){return o}function u(){l.paused=!0}function g(){for(var H=n,j=0;H;)H=H.next,j++;return j}function f(){for(var H=n,j=[];H;)j.push(H.value),H=H.next;return j}function h(){if(!!l.paused){l.paused=!1;for(var H=0;H<l.concurrency;H++)o++,B()}}function p(){return o===0&&l.length()===0}function C(H,j){var $=i.get();$.context=r,$.release=B,$.value=H,$.callback=j||Is,$.errorHandler=a,o===l.concurrency||l.paused?s?(s.next=$,s=$):(n=$,s=$,l.saturated()):(o++,e.call(r,$.value,$.worked))}function y(H,j){var $=i.get();$.context=r,$.release=B,$.value=H,$.callback=j||Is,o===l.concurrency||l.paused?n?($.next=n,n=$):(n=$,s=$,l.saturated()):(o++,e.call(r,$.value,$.worked))}function B(H){H&&i.release(H);var j=n;j?l.paused?o--:(s===n&&(s=null),n=j.next,j.next=null,e.call(r,j.value,j.worked),s===null&&l.empty()):--o===0&&l.drain()}function v(){n=null,s=null,l.drain=Is}function D(){n=null,s=null,l.drain(),l.drain=Is}function T(H){a=H}}function Is(){}function zbe(){this.value=null,this.callback=Is,this.next=null,this.release=Is,this.context=null,this.errorHandler=null;var r=this;this.worked=function(t,i){var n=r.callback,s=r.errorHandler,o=r.value;r.value=null,r.callback=Is,r.errorHandler&&s(t,o),n.call(r.context,t,i),r.release(r)}}function Vbe(r,e,t){typeof r=="function"&&(t=e,e=r,r=null);function i(u,g){e.call(this,u).then(function(f){g(null,f)},g)}var n=B4(r,i,t),s=n.push,o=n.unshift;return n.push=a,n.unshift=l,n.drained=c,n;function a(u){var g=new Promise(function(f,h){s(u,function(p,C){if(p){h(p);return}f(C)})});return g.catch(Is),g}function l(u){var g=new Promise(function(f,h){o(u,function(p,C){if(p){h(p);return}f(C)})});return g.catch(Is),g}function c(){var u=n.drain,g=new Promise(function(f){n.drain=function(){u(),f()}});return g}}vP.exports=B4;vP.exports.promise=Vbe});var cw=w(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.joinPathSegments=Yo.replacePathSegmentSeparator=Yo.isAppliedFilter=Yo.isFatalError=void 0;function Xbe(r,e){return r.errorFilter===null?!0:!r.errorFilter(e)}Yo.isFatalError=Xbe;function Zbe(r,e){return r===null||r(e)}Yo.isAppliedFilter=Zbe;function _be(r,e){return r.split(/[/\\]/).join(e)}Yo.replacePathSegmentSeparator=_be;function $be(r,e,t){return r===""?e:r.endsWith(t)?r+e:r+t+e}Yo.joinPathSegments=$be});var DP=w(PP=>{"use strict";Object.defineProperty(PP,"__esModule",{value:!0});var eQe=cw(),xP=class{constructor(e,t){this._root=e,this._settings=t,this._root=eQe.replacePathSegmentSeparator(e,t.pathSegmentSeparator)}};PP.default=xP});var FP=w(RP=>{"use strict";Object.defineProperty(RP,"__esModule",{value:!0});var tQe=J("events"),rQe=lw(),iQe=b4(),uw=cw(),nQe=DP(),kP=class extends nQe.default{constructor(e,t){super(e,t),this._settings=t,this._scandir=rQe.scandir,this._emitter=new tQe.EventEmitter,this._queue=iQe(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){let i={directory:e,base:t};this._queue.push(i,n=>{n!==null&&this._handleError(n)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(i,n)=>{if(i!==null){t(i,void 0);return}for(let s of n)this._handleEntry(s,e.base);t(null,void 0)})}_handleError(e){this._isDestroyed||!uw.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;let i=e.path;t!==void 0&&(e.path=uw.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),uw.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&uw.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(i,e.path)}_emitEntry(e){this._emitter.emit("entry",e)}};RP.default=kP});var Q4=w(TP=>{"use strict";Object.defineProperty(TP,"__esModule",{value:!0});var sQe=FP(),NP=class{constructor(e,t){this._root=e,this._settings=t,this._reader=new sQe.default(this._root,this._settings),this._storage=new Set}read(e){this._reader.onError(t=>{oQe(e,t)}),this._reader.onEntry(t=>{this._storage.add(t)}),this._reader.onEnd(()=>{aQe(e,[...this._storage])}),this._reader.read()}};TP.default=NP;function oQe(r,e){r(e)}function aQe(r,e){r(null,e)}});var S4=w(OP=>{"use strict";Object.defineProperty(OP,"__esModule",{value:!0});var AQe=J("stream"),lQe=FP(),LP=class{constructor(e,t){this._root=e,this._settings=t,this._reader=new lQe.default(this._root,this._settings),this._stream=new AQe.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};OP.default=LP});var v4=w(KP=>{"use strict";Object.defineProperty(KP,"__esModule",{value:!0});var cQe=lw(),gw=cw(),uQe=DP(),MP=class extends uQe.default{constructor(){super(...arguments),this._scandir=cQe.scandirSync,this._storage=new Set,this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),[...this._storage]}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(let e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{let i=this._scandir(e,this._settings.fsScandirSettings);for(let n of i)this._handleEntry(n,t)}catch(i){this._handleError(i)}}_handleError(e){if(!!gw.isFatalError(this._settings,e))throw e}_handleEntry(e,t){let i=e.path;t!==void 0&&(e.path=gw.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),gw.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&gw.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(i,e.path)}_pushToStorage(e){this._storage.add(e)}};KP.default=MP});var x4=w(HP=>{"use strict";Object.defineProperty(HP,"__esModule",{value:!0});var gQe=v4(),UP=class{constructor(e,t){this._root=e,this._settings=t,this._reader=new gQe.default(this._root,this._settings)}read(){return this._reader.read()}};HP.default=UP});var P4=w(YP=>{"use strict";Object.defineProperty(YP,"__esModule",{value:!0});var fQe=J("path"),hQe=lw(),GP=class{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,fQe.sep),this.fsScandirSettings=new hQe.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return e!=null?e:t}};YP.default=GP});var qP=w(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});jo.Settings=jo.walkStream=jo.walkSync=jo.walk=void 0;var D4=Q4(),pQe=S4(),dQe=x4(),jP=P4();jo.Settings=jP.default;function CQe(r,e,t){if(typeof e=="function"){new D4.default(r,fw()).read(e);return}new D4.default(r,fw(e)).read(t)}jo.walk=CQe;function mQe(r,e){let t=fw(e);return new dQe.default(r,t).read()}jo.walkSync=mQe;function EQe(r,e){let t=fw(e);return new pQe.default(r,t).read()}jo.walkStream=EQe;function fw(r={}){return r instanceof jP.default?r:new jP.default(r)}});var zP=w(WP=>{"use strict";Object.defineProperty(WP,"__esModule",{value:!0});var IQe=J("path"),yQe=Qc(),k4=Oa(),JP=class{constructor(e){this._settings=e,this._fsStatSettings=new yQe.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return IQe.resolve(this._settings.cwd,e)}_makeEntry(e,t){let i={name:t,path:t,dirent:k4.fs.createDirentFromStats(t,e)};return this._settings.stats&&(i.stats=e),i}_isFatalError(e){return!k4.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}};WP.default=JP});var ZP=w(XP=>{"use strict";Object.defineProperty(XP,"__esModule",{value:!0});var wQe=J("stream"),BQe=Qc(),bQe=qP(),QQe=zP(),VP=class extends QQe.default{constructor(){super(...arguments),this._walkStream=bQe.walkStream,this._stat=BQe.stat}dynamic(e,t){return this._walkStream(e,t)}static(e,t){let i=e.map(this._getFullEntryPath,this),n=new wQe.PassThrough({objectMode:!0});n._write=(s,o,a)=>this._getEntry(i[s],e[s],t).then(l=>{l!==null&&t.entryFilter(l)&&n.push(l),s===i.length-1&&n.end(),a()}).catch(a);for(let s=0;s<i.length;s++)n.write(s);return n}_getEntry(e,t,i){return this._getStat(e).then(n=>this._makeEntry(n,t)).catch(n=>{if(i.errorFilter(n))return null;throw n})}_getStat(e){return new Promise((t,i)=>{this._stat(e,this._fsStatSettings,(n,s)=>n===null?t(s):i(n))})}};XP.default=VP});var R4=w($P=>{"use strict";Object.defineProperty($P,"__esModule",{value:!0});var Bf=Oa(),_P=class{constructor(e,t,i){this._patterns=e,this._settings=t,this._micromatchOptions=i,this._storage=[],this._fillStorage()}_fillStorage(){let e=Bf.pattern.expandPatternsWithBraceExpansion(this._patterns);for(let t of e){let i=this._getPatternSegments(t),n=this._splitSegmentsIntoSections(i);this._storage.push({complete:n.length<=1,pattern:t,segments:i,sections:n})}}_getPatternSegments(e){return Bf.pattern.getPatternParts(e,this._micromatchOptions).map(i=>Bf.pattern.isDynamicPattern(i,this._settings)?{dynamic:!0,pattern:i,patternRe:Bf.pattern.makeRe(i,this._micromatchOptions)}:{dynamic:!1,pattern:i})}_splitSegmentsIntoSections(e){return Bf.array.splitWhen(e,t=>t.dynamic&&Bf.pattern.hasGlobStar(t.pattern))}};$P.default=_P});var F4=w(tD=>{"use strict";Object.defineProperty(tD,"__esModule",{value:!0});var SQe=R4(),eD=class extends SQe.default{match(e){let t=e.split("/"),i=t.length,n=this._storage.filter(s=>!s.complete||s.segments.length>i);for(let s of n){let o=s.sections[0];if(!s.complete&&i>o.length||t.every((l,c)=>{let u=s.segments[c];return!!(u.dynamic&&u.patternRe.test(l)||!u.dynamic&&u.pattern===l)}))return!0}return!1}};tD.default=eD});var N4=w(iD=>{"use strict";Object.defineProperty(iD,"__esModule",{value:!0});var hw=Oa(),vQe=F4(),rD=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,i){let n=this._getMatcher(t),s=this._getNegativePatternsRe(i);return o=>this._filter(e,o,n,s)}_getMatcher(e){return new vQe.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){let t=e.filter(hw.pattern.isAffectDepthOfReadingPattern);return hw.pattern.convertPatternsToRe(t,this._micromatchOptions)}_filter(e,t,i,n){let s=this._getEntryLevel(e,t.path);if(this._isSkippedByDeep(s)||this._isSkippedSymbolicLink(t))return!1;let o=hw.path.removeLeadingDotSegment(t.path);return this._isSkippedByPositivePatterns(o,i)?!1:this._isSkippedByNegativePatterns(o,n)}_isSkippedByDeep(e){return e>=this._settings.deep}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_getEntryLevel(e,t){let i=e.split("/").length;return t.split("/").length-(e===""?0:i)}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(e,t){return!hw.pattern.matchAny(e,t)}};iD.default=rD});var T4=w(sD=>{"use strict";Object.defineProperty(sD,"__esModule",{value:!0});var Zd=Oa(),nD=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(e,t){let i=Zd.pattern.convertPatternsToRe(e,this._micromatchOptions),n=Zd.pattern.convertPatternsToRe(t,this._micromatchOptions);return s=>this._filter(s,i,n)}_filter(e,t,i){if(this._settings.unique){if(this._isDuplicateEntry(e))return!1;this._createIndexRecord(e)}if(this._onlyFileFilter(e)||this._onlyDirectoryFilter(e)||this._isSkippedByAbsoluteNegativePatterns(e,i))return!1;let n=this._settings.baseNameMatch?e.name:e.path;return this._isMatchToPatterns(n,t)&&!this._isMatchToPatterns(e.path,i)}_isDuplicateEntry(e){return this.index.has(e.path)}_createIndexRecord(e){this.index.set(e.path,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatte

> [!IMPORTANT]
> ✂ PR body was truncated to here.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants