{"ast":null,"code":"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nconst utils = require(\"../../utils\");\nconst partial_1 = require(\"../matchers/partial\");\nclass DeepFilter {\n  constructor(_settings, _micromatchOptions) {\n    this._settings = _settings;\n    this._micromatchOptions = _micromatchOptions;\n  }\n  getFilter(basePath, positive, negative) {\n    const matcher = this._getMatcher(positive);\n    const negativeRe = this._getNegativePatternsRe(negative);\n    return entry => this._filter(basePath, entry, matcher, negativeRe);\n  }\n  _getMatcher(patterns) {\n    return new partial_1.default(patterns, this._settings, this._micromatchOptions);\n  }\n  _getNegativePatternsRe(patterns) {\n    const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern);\n    return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions);\n  }\n  _filter(basePath, entry, matcher, negativeRe) {\n    if (this._isSkippedByDeep(basePath, entry.path)) {\n      return false;\n    }\n    if (this._isSkippedSymbolicLink(entry)) {\n      return false;\n    }\n    const filepath = utils.path.removeLeadingDotSegment(entry.path);\n    if (this._isSkippedByPositivePatterns(filepath, matcher)) {\n      return false;\n    }\n    return this._isSkippedByNegativePatterns(filepath, negativeRe);\n  }\n  _isSkippedByDeep(basePath, entryPath) {\n    /**\n     * Avoid unnecessary depth calculations when it doesn't matter.\n     */\n    if (this._settings.deep === Infinity) {\n      return false;\n    }\n    return this._getEntryLevel(basePath, entryPath) >= this._settings.deep;\n  }\n  _getEntryLevel(basePath, entryPath) {\n    const entryPathDepth = entryPath.split('/').length;\n    if (basePath === '') {\n      return entryPathDepth;\n    }\n    const basePathDepth = basePath.split('/').length;\n    return entryPathDepth - basePathDepth;\n  }\n  _isSkippedSymbolicLink(entry) {\n    return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink();\n  }\n  _isSkippedByPositivePatterns(entryPath, matcher) {\n    return !this._settings.baseNameMatch && !matcher.match(entryPath);\n  }\n  _isSkippedByNegativePatterns(entryPath, patternsRe) {\n    return !utils.pattern.matchAny(entryPath, patternsRe);\n  }\n}\nexports.default = DeepFilter;","map":{"version":3,"names":["Object","defineProperty","exports","value","utils","require","partial_1","DeepFilter","constructor","_settings","_micromatchOptions","getFilter","basePath","positive","negative","matcher","_getMatcher","negativeRe","_getNegativePatternsRe","entry","_filter","patterns","default","affectDepthOfReadingPatterns","filter","pattern","isAffectDepthOfReadingPattern","convertPatternsToRe","_isSkippedByDeep","path","_isSkippedSymbolicLink","filepath","removeLeadingDotSegment","_isSkippedByPositivePatterns","_isSkippedByNegativePatterns","entryPath","deep","Infinity","_getEntryLevel","entryPathDepth","split","length","basePathDepth","followSymbolicLinks","dirent","isSymbolicLink","baseNameMatch","match","patternsRe","matchAny"],"sources":["C:/Users/user/Desktop/000newport/node_modules/fast-glob/out/providers/filters/deep.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst utils = require(\"../../utils\");\nconst partial_1 = require(\"../matchers/partial\");\nclass DeepFilter {\n    constructor(_settings, _micromatchOptions) {\n        this._settings = _settings;\n        this._micromatchOptions = _micromatchOptions;\n    }\n    getFilter(basePath, positive, negative) {\n        const matcher = this._getMatcher(positive);\n        const negativeRe = this._getNegativePatternsRe(negative);\n        return (entry) => this._filter(basePath, entry, matcher, negativeRe);\n    }\n    _getMatcher(patterns) {\n        return new partial_1.default(patterns, this._settings, this._micromatchOptions);\n    }\n    _getNegativePatternsRe(patterns) {\n        const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern);\n        return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions);\n    }\n    _filter(basePath, entry, matcher, negativeRe) {\n        if (this._isSkippedByDeep(basePath, entry.path)) {\n            return false;\n        }\n        if (this._isSkippedSymbolicLink(entry)) {\n            return false;\n        }\n        const filepath = utils.path.removeLeadingDotSegment(entry.path);\n        if (this._isSkippedByPositivePatterns(filepath, matcher)) {\n            return false;\n        }\n        return this._isSkippedByNegativePatterns(filepath, negativeRe);\n    }\n    _isSkippedByDeep(basePath, entryPath) {\n        /**\n         * Avoid unnecessary depth calculations when it doesn't matter.\n         */\n        if (this._settings.deep === Infinity) {\n            return false;\n        }\n        return this._getEntryLevel(basePath, entryPath) >= this._settings.deep;\n    }\n    _getEntryLevel(basePath, entryPath) {\n        const entryPathDepth = entryPath.split('/').length;\n        if (basePath === '') {\n            return entryPathDepth;\n        }\n        const basePathDepth = basePath.split('/').length;\n        return entryPathDepth - basePathDepth;\n    }\n    _isSkippedSymbolicLink(entry) {\n        return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink();\n    }\n    _isSkippedByPositivePatterns(entryPath, matcher) {\n        return !this._settings.baseNameMatch && !matcher.match(entryPath);\n    }\n    _isSkippedByNegativePatterns(entryPath, patternsRe) {\n        return !utils.pattern.matchAny(entryPath, patternsRe);\n    }\n}\nexports.default = DeepFilter;\n"],"mappings":"AAAA,YAAY;;AACZA,MAAM,CAACC,cAAc,CAACC,OAAO,EAAE,YAAY,EAAE;EAAEC,KAAK,EAAE;AAAK,CAAC,CAAC;AAC7D,MAAMC,KAAK,GAAGC,OAAO,CAAC,aAAa,CAAC;AACpC,MAAMC,SAAS,GAAGD,OAAO,CAAC,qBAAqB,CAAC;AAChD,MAAME,UAAU,CAAC;EACbC,WAAWA,CAACC,SAAS,EAAEC,kBAAkB,EAAE;IACvC,IAAI,CAACD,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACC,kBAAkB,GAAGA,kBAAkB;EAChD;EACAC,SAASA,CAACC,QAAQ,EAAEC,QAAQ,EAAEC,QAAQ,EAAE;IACpC,MAAMC,OAAO,GAAG,IAAI,CAACC,WAAW,CAACH,QAAQ,CAAC;IAC1C,MAAMI,UAAU,GAAG,IAAI,CAACC,sBAAsB,CAACJ,QAAQ,CAAC;IACxD,OAAQK,KAAK,IAAK,IAAI,CAACC,OAAO,CAACR,QAAQ,EAAEO,KAAK,EAAEJ,OAAO,EAAEE,UAAU,C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