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AC,EAAM,KAClB,MAAM,EAAI,IAAI,SAAQ,CAAC,EAAS,KAC9B,IAAI,OAAO,GAAM,GAAG,OAAQ,GAAS,GAAG,QAAS,GAAQ,OAAM,IAEjE,OAAO,EAAW,EAAE,MAAK,GAAO,EAAS,KAAM,IAAM,GAAY,GAG7D,SAAW,GAAQ,IAAI,WAAW,GAAM,QAAQ,OAEtD,OAAO,QAAU,KACjB,KAAK,KAAO,SACZ,KAAK,OAAS,OACd,KAAK,WAAa","file":"/npm/npm@11.6.2/node_modules/ignore-walk/lib/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/npm@11.6.2/node_modules/ignore-walk/lib/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict'\n\nconst fs = require('fs')\nconst path = require('path')\nconst EE = require('events').EventEmitter\nconst Minimatch = require('minimatch').Minimatch\n\nclass Walker extends EE {\n  constructor (opts) {\n    opts = opts || {}\n    super(opts)\n    // set to true if this.path is a symlink, whether follow is true or not\n    this.isSymbolicLink = opts.isSymbolicLink\n    this.path = opts.path || process.cwd()\n    this.basename = path.basename(this.path)\n    this.ignoreFiles = opts.ignoreFiles || ['.ignore']\n    this.ignoreRules = {}\n    this.parent = opts.parent || null\n    this.includeEmpty = !!opts.includeEmpty\n    this.root = this.parent ? this.parent.root : this.path\n    this.follow = !!opts.follow\n    this.result = this.parent ? this.parent.result : new Set()\n    this.entries = null\n    this.sawError = false\n    this.exact = opts.exact\n  }\n\n  sort (a, b) {\n    return a.localeCompare(b, 'en')\n  }\n\n  emit (ev, data) {\n    let ret = false\n    if (!(this.sawError && ev === 'error')) {\n      if (ev === 'error') {\n        this.sawError = true\n      } else if (ev === 'done' && !this.parent) {\n        data = Array.from(data)\n          .map(e => /^@/.test(e) ? `./${e}` : e).sort(this.sort)\n        this.result = data\n      }\n\n      if (ev === 'error' && this.parent) {\n        ret = this.parent.emit('error', data)\n      } else {\n        ret = super.emit(ev, data)\n      }\n    }\n    return ret\n  }\n\n  start () {\n    fs.readdir(this.path, (er, entries) =>\n      er ? this.emit('error', er) : this.onReaddir(entries))\n    return this\n  }\n\n  isIgnoreFile (e) {\n    return e !== '.' &&\n      e !== '..' &&\n      this.ignoreFiles.indexOf(e) !== -1\n  }\n\n  onReaddir (entries) {\n    this.entries = entries\n    if (entries.length === 0) {\n      if (this.includeEmpty) {\n        this.result.add(this.path.slice(this.root.length + 1))\n      }\n      this.emit('done', this.result)\n    } else {\n      const hasIg = this.entries.some(e =>\n        this.isIgnoreFile(e))\n\n      if (hasIg) {\n        this.addIgnoreFiles()\n      } else {\n        this.filterEntries()\n      }\n    }\n  }\n\n  addIgnoreFiles () {\n    const newIg = this.entries\n      .filter(e => this.isIgnoreFile(e))\n\n    let igCount = newIg.length\n    const then = () => {\n      if (--igCount === 0) {\n        this.filterEntries()\n      }\n    }\n\n    newIg.forEach(e => this.addIgnoreFile(e, then))\n  }\n\n  addIgnoreFile (file, then) {\n    const ig = path.resolve(this.path, file)\n    fs.readFile(ig, 'utf8', (er, data) =>\n      er ? this.emit('error', er) : this.onReadIgnoreFile(file, data, then))\n  }\n\n  onReadIgnoreFile (file, data, then) {\n    const mmopt = {\n      matchBase: true,\n      dot: true,\n      flipNegate: true,\n      nocase: true,\n    }\n    const rules = data.split(/\\r?\\n/)\n      .filter(line => !/^#|^$/.test(line.trim()))\n      .map(rule => {\n        return new Minimatch(rule.trim(), mmopt)\n      })\n\n    this.ignoreRules[file] = rules\n\n    then()\n  }\n\n  filterEntries () {\n    // at this point we either have ignore rules, or just inheriting\n    // this exclusion is at the point where we know the list of\n    // entries in the dir, but don't know what they are.  since\n    // some of them *might* be directories, we have to run the\n    // match in dir-mode as well, so that we'll pick up partials\n    // of files that will be included later.  Anything included\n    // at this point will be checked again later once we know\n    // what it is.\n    const filtered = this.entries.map(entry => {\n      // at this point, we don't know if it's a dir or not.\n      const passFile = this.filterEntry(entry)\n      const passDir = this.filterEntry(entry, true)\n      return (passFile || passDir) ? [entry, passFile, passDir] : false\n    }).filter(e => e)\n\n    // now we stat them all\n    // if it's a dir, and passes as a dir, then recurse\n    // if it's not a dir, but passes as a file, add to set\n    let entryCount = filtered.length\n    if (entryCount === 0) {\n      this.emit('done', this.result)\n    } else {\n      const then = () => {\n        if (--entryCount === 0) {\n          this.emit('done', this.result)\n        }\n      }\n      filtered.forEach(filt => {\n        const entry = filt[0]\n        const file = filt[1]\n        const dir = filt[2]\n        this.stat({ entry, file, dir }, then)\n      })\n    }\n  }\n\n  onstat ({ st, entry, file, dir, isSymbolicLink }, then) {\n    const abs = this.path + '/' + entry\n    if (!st.isDirectory()) {\n      if (file) {\n        this.result.add(abs.slice(this.root.length + 1))\n      }\n      then()\n    } else {\n      // is a directory\n      if (dir) {\n        this.walker(entry, { isSymbolicLink, exact: file || this.filterEntry(entry + '/') }, then)\n      } else {\n        then()\n      }\n    }\n  }\n\n  stat ({ entry, file, dir }, then) {\n    const abs = this.path + '/' + entry\n    fs.lstat(abs, (lstatErr, lstatResult) => {\n      if (lstatErr) {\n        this.emit('error', lstatErr)\n      } else {\n        const isSymbolicLink = lstatResult.isSymbolicLink()\n        if (this.follow && isSymbolicLink) {\n          fs.stat(abs, (statErr, statResult) => {\n            if (statErr) {\n              this.emit('error', statErr)\n            } else {\n              this.onstat({ st: statResult, entry, file, dir, isSymbolicLink }, then)\n            }\n          })\n        } else {\n          this.onstat({ st: lstatResult, entry, file, dir, isSymbolicLink }, then)\n        }\n      }\n    })\n  }\n\n  walkerOpt (entry, opts) {\n    return {\n      path: this.path + '/' + entry,\n      parent: this,\n      ignoreFiles: this.ignoreFiles,\n      follow: this.follow,\n      includeEmpty: this.includeEmpty,\n      ...opts,\n    }\n  }\n\n  walker (entry, opts, then) {\n    new Walker(this.walkerOpt(entry, opts)).on('done', then).start()\n  }\n\n  filterEntry (entry, partial, entryBasename) {\n    let included = true\n\n    // this = /a/b/c\n    // entry = d\n    // parent /a/b sees c/d\n    if (this.parent && this.parent.filterEntry) {\n      const parentEntry = this.basename + '/' + entry\n      const parentBasename = entryBasename || entry\n      included = this.parent.filterEntry(parentEntry, partial, parentBasename)\n      if (!included && !this.exact) {\n        return false\n      }\n    }\n\n    this.ignoreFiles.forEach(f => {\n      if (this.ignoreRules[f]) {\n        this.ignoreRules[f].forEach(rule => {\n          // negation means inclusion\n          // so if it's negated, and already included, no need to check\n          // likewise if it's neither negated nor included\n          if (rule.negate !== included) {\n            const isRelativeRule = entryBasename && rule.globParts.some(part =>\n              part.length <= (part.slice(-1)[0] ? 1 : 2)\n            )\n\n            // first, match against /foo/bar\n            // then, against foo/bar\n            // then, in the case of partials, match with a /\n            //   then, if also the rule is relative, match against basename\n            const match = rule.match('/' + entry) ||\n              rule.match(entry) ||\n              !!partial && (\n                rule.match('/' + entry + '/') ||\n                rule.match(entry + '/') ||\n                rule.negate && (\n                  rule.match('/' + entry, true) ||\n                  rule.match(entry, true)) ||\n                isRelativeRule && (\n                  rule.match('/' + entryBasename + '/') ||\n                  rule.match(entryBasename + '/') ||\n                  rule.negate && (\n                    rule.match('/' + entryBasename, true) ||\n                    rule.match(entryBasename, true))))\n\n            if (match) {\n              included = rule.negate\n            }\n          }\n        })\n      }\n    })\n\n    return included\n  }\n}\n\nclass WalkerSync extends Walker {\n  start () {\n    this.onReaddir(fs.readdirSync(this.path))\n    return this\n  }\n\n  addIgnoreFile (file, then) {\n    const ig = path.resolve(this.path, file)\n    this.onReadIgnoreFile(file, fs.readFileSync(ig, 'utf8'), then)\n  }\n\n  stat ({ entry, file, dir }, then) {\n    const abs = this.path + '/' + entry\n    let st = fs.lstatSync(abs)\n    const isSymbolicLink = st.isSymbolicLink()\n    if (this.follow && isSymbolicLink) {\n      st = fs.statSync(abs)\n    }\n\n    // console.error('STAT SYNC', {st, entry, file, dir, isSymbolicLink, then})\n    this.onstat({ st, entry, file, dir, isSymbolicLink }, then)\n  }\n\n  walker (entry, opts, then) {\n    new WalkerSync(this.walkerOpt(entry, opts)).start()\n    then()\n  }\n}\n\nconst walk = (opts, callback) => {\n  const p = new Promise((resolve, reject) => {\n    new Walker(opts).on('done', resolve).on('error', reject).start()\n  })\n  return callback ? p.then(res => callback(null, res), callback) : p\n}\n\nconst walkSync = opts => new WalkerSync(opts).start().result\n\nmodule.exports = walk\nwalk.sync = walkSync\nwalk.Walker = Walker\nwalk.WalkerSync = WalkerSync\n"]}