diff --git a/.github/workflows/example-11.yml b/.github/workflows/example-11.yml new file mode 100644 index 00000000..4c54f344 --- /dev/null +++ b/.github/workflows/example-11.yml @@ -0,0 +1,57 @@ +name: "Example 11: Alternative architectures" + +on: + pull_request: + branches: + - "*" + push: + branches: + - "master" + schedule: + # Note that cronjobs run on master/main by default + - cron: "0 0 * * *" + +jobs: + example-11: + # prevent cronjobs from running on forks + if: + (github.event_name == 'schedule' && github.repository == + 'conda-incubator/setup-miniconda') || (github.event_name != 'schedule') + name: + Ex11 (os=${{ matrix.os }} architecture=${{ matrix.architecture }} + miniconda-version=${{ matrix.miniconda-version }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: ["ubuntu-latest", "windows-latest"] + architecture: ["x86"] + miniconda-version: ["latest"] + steps: + - uses: actions/checkout@v2 + - uses: ./ + id: setup-miniconda + continue-on-error: true + with: + architecture: ${{ matrix.architecture }} + miniconda-version: ${{ matrix.miniconda-version }} + auto-update-conda: true + python-version: "3.8" + - name: Check previous step outcome + shell: bash + if: always() + run: | + if [[ ${{ matrix.os }} == 'ubuntu-latest' ]]; then + ${{ steps.setup-miniconda.outcome == 'failure' }} + else + ${{ steps.setup-miniconda.outcome == 'success' }} + fi + - name: Conda info + shell: bash -l {0} + run: conda info + - name: Conda list + shell: pwsh + run: conda list + - name: Environment + shell: bash -l {0} + run: printenv | sort diff --git a/README.md b/README.md index f8f84946..68c47fa4 100644 --- a/README.md +++ b/README.md @@ -526,6 +526,35 @@ jobs: use-mamba: true ``` +### Example 11: Alternative Architectures + +In addition to the default 64-bit builds of Miniconda, 32-bit versions are +available for Windows. Note that although some x86 builds are available for +Linux and MacOS, these are too old (<4.6) to be supported by this action. + +```yaml +jobs: + example-11: + name: + Ex11 (os=${{ matrix.os }} architecture=${{ matrix.architecture }} + miniconda-version=${{ matrix.miniconda-version }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: ["windows-latest"] + architecture: ["x86"] + miniconda-version: ["latest"] + steps: + - uses: actions/checkout@v2 + - uses: ./ + with: + architecture: ${{ matrix.architecture }} + miniconda-version: $${{ matrix.miniconda-version }} + auto-update-conda: true + python-version: "3.8" +``` + ## Caching If you want to enable package caching for conda you can use the diff --git a/dist/setup/index.js b/dist/setup/index.js index efc29f33..47ec13c2 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -1081,9 +1081,16 @@ module.exports = realNames; /* 14 */, /* 15 */, /* 16 */ -/***/ (function(module) { +/***/ (function(module, __unusedexports, __webpack_require__) { + +const SemVer = __webpack_require__(65) +const compareBuild = (a, b, loose) => { + const versionA = new SemVer(a, loose) + const versionB = new SemVer(b, loose) + return versionA.compare(versionB) || versionA.compareBuild(versionB) +} +module.exports = compareBuild -module.exports = require("tls"); /***/ }), /* 17 */, @@ -1115,67 +1122,79 @@ module.exports = setCacheAdd; /***/ }), /* 21 */ -/***/ (function(__unusedmodule, exports, __webpack_require__) { +/***/ (function(module, __unusedexports, __webpack_require__) { -"use strict"; +var Parser = __webpack_require__(178); +var DomHandler = __webpack_require__(281); -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ensureSimple = void 0; -const core = __importStar(__webpack_require__(470)); -const utils = __importStar(__webpack_require__(163)); -const conda = __importStar(__webpack_require__(259)); -/** - * Install an environment with `conda create` when no `envSpec` is detected - * - * ## Notes - * Can presently install the given version of `python`. - * - * In the future, this may need its own providers of environment patches. - */ -exports.ensureSimple = { - label: "conda create (simple)", - provides: (inputs, options) => __awaiter(void 0, void 0, void 0, function* () { - var _a, _b, _c; - return !(((_b = (_a = options.envSpec) === null || _a === void 0 ? void 0 : _a.explicit) === null || _b === void 0 ? void 0 : _b.length) || - Object.keys(((_c = options.envSpec) === null || _c === void 0 ? void 0 : _c.yaml) || {}).length); - }), - condaArgs: (inputs, options) => __awaiter(void 0, void 0, void 0, function* () { - const args = ["create", ...conda.envCommandFlag(inputs)]; - if (inputs.pythonVersion) { - const spec = utils.makeSpec("python", inputs.pythonVersion); - core.info(`Adding spec: ${spec}`); - args.push(spec); - } - return args; - }), +function defineProp(name, value) { + delete module.exports[name]; + module.exports[name] = value; + return value; +} + +module.exports = { + Parser: Parser, + Tokenizer: __webpack_require__(843), + ElementType: __webpack_require__(855), + DomHandler: DomHandler, + get FeedHandler() { + return defineProp("FeedHandler", __webpack_require__(504)); + }, + get Stream() { + return defineProp("Stream", __webpack_require__(650)); + }, + get WritableStream() { + return defineProp("WritableStream", __webpack_require__(837)); + }, + get ProxyHandler() { + return defineProp("ProxyHandler", __webpack_require__(633)); + }, + get DomUtils() { + return defineProp("DomUtils", __webpack_require__(104)); + }, + get CollectingHandler() { + return defineProp( + "CollectingHandler", + __webpack_require__(119) + ); + }, + // For legacy support + DefaultHandler: DomHandler, + get RssHandler() { + return defineProp("RssHandler", this.FeedHandler); + }, + //helper methods + parseDOM: function(data, options) { + var handler = new DomHandler(options); + new Parser(handler, options).end(data); + return handler.dom; + }, + parseFeed: function(feed, options) { + var handler = new module.exports.FeedHandler(options); + new Parser(handler, options).end(feed); + return handler.dom; + }, + createDomStream: function(cb, options, elementCb) { + var handler = new DomHandler(cb, options, elementCb); + return new Parser(handler, options); + }, + // List of all events that the parser emits + EVENTS: { + /* Format: eventname: number of arguments */ + attribute: 2, + cdatastart: 0, + cdataend: 0, + text: 1, + processinginstruction: 2, + comment: 1, + commentend: 0, + closetag: 1, + opentag: 2, + opentagname: 1, + error: 1, + end: 0 + } }; @@ -1274,7 +1293,7 @@ var __importStar = (this && this.__importStar) || function (mod) { return result; }; Object.defineProperty(exports, "__esModule", { value: true }); -const semver = __importStar(__webpack_require__(280)); +const semver = __importStar(__webpack_require__(550)); const core_1 = __webpack_require__(470); // needs to be require for core node modules to be mocked /* eslint @typescript-eslint/no-require-imports: 0 */ @@ -1371,7 +1390,7 @@ exports._readLinuxVersionFile = _readLinuxVersionFile; var arraySome = __webpack_require__(743), baseIteratee = __webpack_require__(295), baseSome = __webpack_require__(250), - isArray = __webpack_require__(143), + isArray = __webpack_require__(806), isIterateeCall = __webpack_require__(663); /** @@ -1436,7 +1455,7 @@ module.exports = require("https"); /* Module Dependencies */ -var htmlparser = __webpack_require__(818), +var htmlparser = __webpack_require__(21), parse5 = __webpack_require__(76); /* @@ -1847,7 +1866,7 @@ var _Object$setPrototypeO; function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -var finished = __webpack_require__(740); +var finished = __webpack_require__(287); var kLastResolve = Symbol('lastResolve'); var kLastReject = Symbol('lastReject'); @@ -2088,7 +2107,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge Object.defineProperty(exports, "__esModule", { value: true }); exports.installBaseTools = void 0; const core = __importStar(__webpack_require__(470)); -const conda = __importStar(__webpack_require__(259)); +const conda = __importStar(__webpack_require__(506)); const update_conda_1 = __webpack_require__(715); const update_mamba_1 = __webpack_require__(269); const update_python_1 = __webpack_require__(113); @@ -2492,7 +2511,7 @@ var Tokenizer = __webpack_require__(990), defaultTreeAdapter = __webpack_require__(275), mergeOptions = __webpack_require__(349), doctype = __webpack_require__(334), - foreignContent = __webpack_require__(298), + foreignContent = __webpack_require__(998), UNICODE = __webpack_require__(56), HTML = __webpack_require__(621); @@ -5309,7 +5328,299 @@ function endTagInForeignContent(p, token) { /* 62 */, /* 63 */, /* 64 */, -/* 65 */, +/* 65 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const debug = __webpack_require__(548) +const { MAX_LENGTH, MAX_SAFE_INTEGER } = __webpack_require__(181) +const { re, t } = __webpack_require__(976) + +const parseOptions = __webpack_require__(143) +const { compareIdentifiers } = __webpack_require__(760) +class SemVer { + constructor (version, options) { + options = parseOptions(options) + + if (version instanceof SemVer) { + if (version.loose === !!options.loose && + version.includePrerelease === !!options.includePrerelease) { + return version + } else { + version = version.version + } + } else if (typeof version !== 'string') { + throw new TypeError(`Invalid Version: ${version}`) + } + + if (version.length > MAX_LENGTH) { + throw new TypeError( + `version is longer than ${MAX_LENGTH} characters` + ) + } + + debug('SemVer', version, options) + this.options = options + this.loose = !!options.loose + // this isn't actually relevant for versions, but keep it so that we + // don't run into trouble passing this.options around. + this.includePrerelease = !!options.includePrerelease + + const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) + + if (!m) { + throw new TypeError(`Invalid Version: ${version}`) + } + + this.raw = version + + // these are actually numbers + this.major = +m[1] + this.minor = +m[2] + this.patch = +m[3] + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError('Invalid major version') + } + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError('Invalid minor version') + } + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError('Invalid patch version') + } + + // numberify any prerelease numeric ids + if (!m[4]) { + this.prerelease = [] + } else { + this.prerelease = m[4].split('.').map((id) => { + if (/^[0-9]+$/.test(id)) { + const num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num + } + } + return id + }) + } + + this.build = m[5] ? m[5].split('.') : [] + this.format() + } + + format () { + this.version = `${this.major}.${this.minor}.${this.patch}` + if (this.prerelease.length) { + this.version += `-${this.prerelease.join('.')}` + } + return this.version + } + + toString () { + return this.version + } + + compare (other) { + debug('SemVer.compare', this.version, this.options, other) + if (!(other instanceof SemVer)) { + if (typeof other === 'string' && other === this.version) { + return 0 + } + other = new SemVer(other, this.options) + } + + if (other.version === this.version) { + return 0 + } + + return this.compareMain(other) || this.comparePre(other) + } + + compareMain (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return ( + compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch) + ) + } + + comparePre (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) { + return -1 + } else if (!this.prerelease.length && other.prerelease.length) { + return 1 + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0 + } + + let i = 0 + do { + const a = this.prerelease[i] + const b = other.prerelease[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) + } + + compareBuild (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + let i = 0 + do { + const a = this.build[i] + const b = other.build[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) + } + + // preminor will bump the version up to the next minor release, and immediately + // down to pre-release. premajor and prepatch work the same way. + inc (release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0 + this.patch = 0 + this.minor = 0 + this.major++ + this.inc('pre', identifier) + break + case 'preminor': + this.prerelease.length = 0 + this.patch = 0 + this.minor++ + this.inc('pre', identifier) + break + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0 + this.inc('patch', identifier) + this.inc('pre', identifier) + break + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) { + this.inc('patch', identifier) + } + this.inc('pre', identifier) + break + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if ( + this.minor !== 0 || + this.patch !== 0 || + this.prerelease.length === 0 + ) { + this.major++ + } + this.minor = 0 + this.patch = 0 + this.prerelease = [] + break + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++ + } + this.patch = 0 + this.prerelease = [] + break + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) { + this.patch++ + } + this.prerelease = [] + break + // This probably shouldn't be used publicly. + // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) { + this.prerelease = [0] + } else { + let i = this.prerelease.length + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++ + i = -2 + } + } + if (i === -1) { + // didn't increment anything + this.prerelease.push(0) + } + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0] + } + } else { + this.prerelease = [identifier, 0] + } + } + break + + default: + throw new Error(`invalid increment argument: ${release}`) + } + this.format() + this.raw = this.version + return this + } +} + +module.exports = SemVer + + +/***/ }), /* 66 */ /***/ (function(module, __unusedexports, __webpack_require__) { @@ -5930,7 +6241,7 @@ module.exports = mapCacheDelete; /***/ (function(module, __unusedexports, __webpack_require__) { var parse = __webpack_require__(245), - compile = __webpack_require__(976); + compile = __webpack_require__(600); module.exports = function nthCheck(formula){ return compile(parse(formula)); @@ -6240,49 +6551,7 @@ exports.flatten = function(options) { /***/ }), /* 98 */, -/* 99 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var Symbol = __webpack_require__(498), - arrayMap = __webpack_require__(766), - isArray = __webpack_require__(143), - isSymbol = __webpack_require__(186); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; - -/** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (isArray(value)) { - // Recursively convert values (susceptible to call stack limits). - return arrayMap(value, baseToString) + ''; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -module.exports = baseToString; - - -/***/ }), +/* 99 */, /* 100 */ /***/ (function(module, __unusedexports, __webpack_require__) { @@ -6523,7 +6792,7 @@ function CollectingHandler(cbs) { this.events = []; } -var EVENTS = __webpack_require__(818).EVENTS; +var EVENTS = __webpack_require__(21).EVENTS; Object.keys(EVENTS).forEach(function(name) { if (EVENTS[name] === 0) { name = "on" + name; @@ -6576,7 +6845,15 @@ CollectingHandler.prototype.restart = function() { /***/ }), -/* 120 */, +/* 120 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const compareBuild = __webpack_require__(16) +const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)) +module.exports = sort + + +/***/ }), /* 121 */ /***/ (function(module, __unusedexports, __webpack_require__) { @@ -6796,198 +7073,516 @@ module.exports = { /* 124 */ /***/ (function(module, __unusedexports, __webpack_require__) { -/* - compiles a selector to an executable function -*/ +// hoisted class for cyclic dependency +class Range { + constructor (range, options) { + options = parseOptions(options) -module.exports = compile; -module.exports.compileUnsafe = compileUnsafe; -module.exports.compileToken = compileToken; + if (range instanceof Range) { + if ( + range.loose === !!options.loose && + range.includePrerelease === !!options.includePrerelease + ) { + return range + } else { + return new Range(range.raw, options) + } + } -var parse = __webpack_require__(442), - DomUtils = __webpack_require__(104), - isTag = DomUtils.isTag, - Rules = __webpack_require__(123), - sortRules = __webpack_require__(642), - BaseFuncs = __webpack_require__(312), - trueFunc = BaseFuncs.trueFunc, - falseFunc = BaseFuncs.falseFunc, - procedure = __webpack_require__(926); + if (range instanceof Comparator) { + // just put it in the set and return + this.raw = range.value + this.set = [[range]] + this.format() + return this + } + + this.options = options + this.loose = !!options.loose + this.includePrerelease = !!options.includePrerelease + + // First, split based on boolean or || + this.raw = range + this.set = range + .split(/\s*\|\|\s*/) + // map the range to a 2d array of comparators + .map(range => this.parseRange(range.trim())) + // throw out any comparator lists that are empty + // this generally means that it was not a valid range, which is allowed + // in loose mode, but will still throw if the WHOLE range is invalid. + .filter(c => c.length) + + if (!this.set.length) { + throw new TypeError(`Invalid SemVer Range: ${range}`) + } + + // if we have any that are not the null set, throw out null sets. + if (this.set.length > 1) { + // keep the first one, in case they're all null sets + const first = this.set[0] + this.set = this.set.filter(c => !isNullSet(c[0])) + if (this.set.length === 0) + this.set = [first] + else if (this.set.length > 1) { + // if we have any that are *, then the range is just * + for (const c of this.set) { + if (c.length === 1 && isAny(c[0])) { + this.set = [c] + break + } + } + } + } -function compile(selector, options, context){ - var next = compileUnsafe(selector, options, context); - return wrap(next); -} + this.format() + } -function wrap(next){ - return function base(elem){ - return isTag(elem) && next(elem); - }; -} + format () { + this.range = this.set + .map((comps) => { + return comps.join(' ').trim() + }) + .join('||') + .trim() + return this.range + } + + toString () { + return this.range + } + + parseRange (range) { + range = range.trim() + + // memoize range parsing for performance. + // this is a very hot path, and fully deterministic. + const memoOpts = Object.keys(this.options).join(',') + const memoKey = `parseRange:${memoOpts}:${range}` + const cached = cache.get(memoKey) + if (cached) + return cached + + const loose = this.options.loose + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] + range = range.replace(hr, hyphenReplace(this.options.includePrerelease)) + debug('hyphen replace', range) + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range, re[t.COMPARATORTRIM]) + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[t.TILDETRIM], tildeTrimReplace) + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[t.CARETTRIM], caretTrimReplace) + + // normalize spaces + range = range.split(/\s+/).join(' ') + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + + const compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + const rangeList = range + .split(' ') + .map(comp => parseComparator(comp, this.options)) + .join(' ') + .split(/\s+/) + // >=0.0.0 is equivalent to * + .map(comp => replaceGTE0(comp, this.options)) + // in loose mode, throw out any that are not valid comparators + .filter(this.options.loose ? comp => !!comp.match(compRe) : () => true) + .map(comp => new Comparator(comp, this.options)) + + // if any comparators are the null set, then replace with JUST null set + // if more than one comparator, remove any * comparators + // also, don't include the same comparator more than once + const l = rangeList.length + const rangeMap = new Map() + for (const comp of rangeList) { + if (isNullSet(comp)) + return [comp] + rangeMap.set(comp.value, comp) + } + if (rangeMap.size > 1 && rangeMap.has('')) + rangeMap.delete('') + + const result = [...rangeMap.values()] + cache.set(memoKey, result) + return result + } + + intersects (range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required') + } + + return this.set.some((thisComparators) => { + return ( + isSatisfiable(thisComparators, options) && + range.set.some((rangeComparators) => { + return ( + isSatisfiable(rangeComparators, options) && + thisComparators.every((thisComparator) => { + return rangeComparators.every((rangeComparator) => { + return thisComparator.intersects(rangeComparator, options) + }) + }) + ) + }) + ) + }) + } -function compileUnsafe(selector, options, context){ - var token = parse(selector, options); - return compileToken(token, options, context); -} + // if ANY of the sets match ALL of its comparators, then pass + test (version) { + if (!version) { + return false + } -function includesScopePseudo(t){ - return t.type === "pseudo" && ( - t.name === "scope" || ( - Array.isArray(t.data) && - t.data.some(function(data){ - return data.some(includesScopePseudo); - }) - ) - ); + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + + for (let i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true + } + } + return false + } } +module.exports = Range -var DESCENDANT_TOKEN = {type: "descendant"}, - SCOPE_TOKEN = {type: "pseudo", name: "scope"}, - PLACEHOLDER_ELEMENT = {}, - getParent = DomUtils.getParent; +const LRU = __webpack_require__(200) +const cache = new LRU({ max: 1000 }) -//CSS 4 Spec (Draft): 3.3.1. Absolutizing a Scope-relative Selector -//http://www.w3.org/TR/selectors4/#absolutizing -function absolutize(token, context){ - //TODO better check if context is document - var hasContext = !!context && !!context.length && context.every(function(e){ - return e === PLACEHOLDER_ELEMENT || !!getParent(e); - }); +const parseOptions = __webpack_require__(143) +const Comparator = __webpack_require__(174) +const debug = __webpack_require__(548) +const SemVer = __webpack_require__(65) +const { + re, + t, + comparatorTrimReplace, + tildeTrimReplace, + caretTrimReplace +} = __webpack_require__(976) +const isNullSet = c => c.value === '<0.0.0-0' +const isAny = c => c.value === '' - token.forEach(function(t){ - if(t.length > 0 && isTraversal(t[0]) && t[0].type !== "descendant"){ - //don't return in else branch - } else if(hasContext && !includesScopePseudo(t)){ - t.unshift(DESCENDANT_TOKEN); - } else { - return; - } +// take a set of comparators and determine whether there +// exists a version which can satisfy it +const isSatisfiable = (comparators, options) => { + let result = true + const remainingComparators = comparators.slice() + let testComparator = remainingComparators.pop() - t.unshift(SCOPE_TOKEN); - }); -} + while (result && remainingComparators.length) { + result = remainingComparators.every((otherComparator) => { + return testComparator.intersects(otherComparator, options) + }) -function compileToken(token, options, context){ - token = token.filter(function(t){ return t.length > 0; }); + testComparator = remainingComparators.pop() + } - token.forEach(sortRules); + return result +} - var isArrayContext = Array.isArray(context); +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +const parseComparator = (comp, options) => { + debug('comp', comp, options) + comp = replaceCarets(comp, options) + debug('caret', comp) + comp = replaceTildes(comp, options) + debug('tildes', comp) + comp = replaceXRanges(comp, options) + debug('xrange', comp) + comp = replaceStars(comp, options) + debug('stars', comp) + return comp +} - context = (options && options.context) || context; +const isX = id => !id || id.toLowerCase() === 'x' || id === '*' - if(context && !isArrayContext) context = [context]; +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0 +const replaceTildes = (comp, options) => + comp.trim().split(/\s+/).map((comp) => { + return replaceTilde(comp, options) + }).join(' ') - absolutize(token, context); +const replaceTilde = (comp, options) => { + const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] + return comp.replace(r, (_, M, m, p, pr) => { + debug('tilde', comp, _, M, m, p, pr) + let ret - return token - .map(function(rules){ return compileRules(rules, options, context, isArrayContext); }) - .reduce(reduceRules, falseFunc); -} + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = `>=${M}.0.0 <${+M + 1}.0.0-0` + } else if (isX(p)) { + // ~1.2 == >=1.2.0 <1.3.0-0 + ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0` + } else if (pr) { + debug('replaceTilde pr', pr) + ret = `>=${M}.${m}.${p}-${pr + } <${M}.${+m + 1}.0-0` + } else { + // ~1.2.3 == >=1.2.3 <1.3.0-0 + ret = `>=${M}.${m}.${p + } <${M}.${+m + 1}.0-0` + } -function isTraversal(t){ - return procedure[t.type] < 0; + debug('tilde return', ret) + return ret + }) } -function compileRules(rules, options, context, isArrayContext){ - var acceptSelf = (isArrayContext && rules[0].name === "scope" && rules[1].type === "descendant"); - return rules.reduce(function(func, rule, index){ - if(func === falseFunc) return func; - return Rules[rule.type](func, rule, options, context, acceptSelf && index === 1); - }, options && options.rootFunc || trueFunc); -} +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0 +// ^1.2.3 --> >=1.2.3 <2.0.0-0 +// ^1.2.0 --> >=1.2.0 <2.0.0-0 +const replaceCarets = (comp, options) => + comp.trim().split(/\s+/).map((comp) => { + return replaceCaret(comp, options) + }).join(' ') -function reduceRules(a, b){ - if(b === falseFunc || a === trueFunc){ - return a; - } - if(a === falseFunc || b === trueFunc){ - return b; - } +const replaceCaret = (comp, options) => { + debug('caret', comp, options) + const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] + const z = options.includePrerelease ? '-0' : '' + return comp.replace(r, (_, M, m, p, pr) => { + debug('caret', comp, _, M, m, p, pr) + let ret - return function combine(elem){ - return a(elem) || b(elem); - }; + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` + } else if (isX(p)) { + if (M === '0') { + ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0` + } else { + ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0` + } + } else if (pr) { + debug('replaceCaret pr', pr) + if (M === '0') { + if (m === '0') { + ret = `>=${M}.${m}.${p}-${pr + } <${M}.${m}.${+p + 1}-0` + } else { + ret = `>=${M}.${m}.${p}-${pr + } <${M}.${+m + 1}.0-0` + } + } else { + ret = `>=${M}.${m}.${p}-${pr + } <${+M + 1}.0.0-0` + } + } else { + debug('no pr') + if (M === '0') { + if (m === '0') { + ret = `>=${M}.${m}.${p + }${z} <${M}.${m}.${+p + 1}-0` + } else { + ret = `>=${M}.${m}.${p + }${z} <${M}.${+m + 1}.0-0` + } + } else { + ret = `>=${M}.${m}.${p + } <${+M + 1}.0.0-0` + } + } + + debug('caret return', ret) + return ret + }) } -//:not, :has and :matches have to compile selectors -//doing this in lib/pseudos.js would lead to circular dependencies, -//so we add them here +const replaceXRanges = (comp, options) => { + debug('replaceXRanges', comp, options) + return comp.split(/\s+/).map((comp) => { + return replaceXRange(comp, options) + }).join(' ') +} -var Pseudos = __webpack_require__(589), - filters = Pseudos.filters, - existsOne = DomUtils.existsOne, - isTag = DomUtils.isTag, - getChildren = DomUtils.getChildren; +const replaceXRange = (comp, options) => { + comp = comp.trim() + const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] + return comp.replace(r, (ret, gtlt, M, m, p, pr) => { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + const xM = isX(M) + const xm = xM || isX(m) + const xp = xm || isX(p) + const anyX = xp + if (gtlt === '=' && anyX) { + gtlt = '' + } -function containsTraversal(t){ - return t.some(isTraversal); -} + // if we're including prereleases in the match, then we need + // to fix this to -0, the lowest possible prerelease value + pr = options.includePrerelease ? '-0' : '' -filters.not = function(next, token, options, context){ - var opts = { - xmlMode: !!(options && options.xmlMode), - strict: !!(options && options.strict) - }; + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0-0' + } else { + // nothing is forbidden + ret = '*' + } + } else if (gtlt && anyX) { + // we know patch is an x, because we have any x at all. + // replace X with 0 + if (xm) { + m = 0 + } + p = 0 - if(opts.strict){ - if(token.length > 1 || token.some(containsTraversal)){ - throw new SyntaxError("complex selectors in :not aren't allowed in strict mode"); - } - } + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + gtlt = '>=' + if (xm) { + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 + } + } - var func = compileToken(token, opts, context); + if (gtlt === '<') + pr = '-0' - if(func === falseFunc) return next; - if(func === trueFunc) return falseFunc; + ret = `${gtlt + M}.${m}.${p}${pr}` + } else if (xm) { + ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0` + } else if (xp) { + ret = `>=${M}.${m}.0${pr + } <${M}.${+m + 1}.0-0` + } - return function(elem){ - return !func(elem) && next(elem); - }; -}; + debug('xRange return', ret) -filters.has = function(next, token, options){ - var opts = { - xmlMode: !!(options && options.xmlMode), - strict: !!(options && options.strict) - }; + return ret + }) +} - //FIXME: Uses an array as a pointer to the current element (side effects) - var context = token.some(containsTraversal) ? [PLACEHOLDER_ELEMENT] : null; +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +const replaceStars = (comp, options) => { + debug('replaceStars', comp, options) + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[t.STAR], '') +} - var func = compileToken(token, opts, context); +const replaceGTE0 = (comp, options) => { + debug('replaceGTE0', comp, options) + return comp.trim() + .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '') +} - if(func === falseFunc) return falseFunc; - if(func === trueFunc) return function(elem){ - return getChildren(elem).some(isTag) && next(elem); - }; +// This function is passed to string.replace(re[t.HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0-0 +const hyphenReplace = incPr => ($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) => { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = `>=${fM}.0.0${incPr ? '-0' : ''}` + } else if (isX(fp)) { + from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}` + } else if (fpr) { + from = `>=${from}` + } else { + from = `>=${from}${incPr ? '-0' : ''}` + } - func = wrap(func); + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = `<${+tM + 1}.0.0-0` + } else if (isX(tp)) { + to = `<${tM}.${+tm + 1}.0-0` + } else if (tpr) { + to = `<=${tM}.${tm}.${tp}-${tpr}` + } else if (incPr) { + to = `<${tM}.${tm}.${+tp + 1}-0` + } else { + to = `<=${to}` + } - if(context){ - return function has(elem){ - return next(elem) && ( - (context[0] = elem), existsOne(func, getChildren(elem)) - ); - }; + return (`${from} ${to}`).trim() +} + +const testSet = (set, version, options) => { + for (let i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false } + } - return function has(elem){ - return next(elem) && existsOne(func, getChildren(elem)); - }; -}; + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (let i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === Comparator.ANY) { + continue + } -filters.matches = function(next, token, options, context){ - var opts = { - xmlMode: !!(options && options.xmlMode), - strict: !!(options && options.strict), - rootFunc: next - }; + if (set[i].semver.prerelease.length > 0) { + const allowed = set[i].semver + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) { + return true + } + } + } - return compileToken(token, opts, context); -}; + // Version has a -pre, but it's not one of the ones we like. + return false + } + + return true +} /***/ }), @@ -7364,7 +7959,21 @@ module.exports = bind; /***/ }), /* 133 */, /* 134 */, -/* 135 */, +/* 135 */ +/***/ (function(module) { + +"use strict"; + +module.exports = function (Yallist) { + Yallist.prototype[Symbol.iterator] = function* () { + for (let walker = this.head; walker; walker = walker.next) { + yield walker.value + } + } +} + + +/***/ }), /* 136 */, /* 137 */, /* 138 */ @@ -7512,7 +8121,7 @@ exports.isHtml = function(str) { var net = __webpack_require__(631); -var tls = __webpack_require__(16); +var tls = __webpack_require__(818); var http = __webpack_require__(605); var https = __webpack_require__(34); var events = __webpack_require__(614); @@ -7780,32 +8389,17 @@ exports.debug = debug; // for test /* 143 */ /***/ (function(module) { -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; - -module.exports = isArray; +// parse out just the options we care about so we always get a consistent +// obj with keys in a consistent order. +const opts = ['includePrerelease', 'loose', 'rtl'] +const parseOptions = options => + !options ? {} + : typeof options !== 'object' ? { loose: true } + : opts.filter(k => options[k]).reduce((options, k) => { + options[k] = true + return options + }, {}) +module.exports = parseOptions /***/ }), @@ -7976,7 +8570,7 @@ var arrayReduce = __webpack_require__(445), baseEach = __webpack_require__(804), baseIteratee = __webpack_require__(295), baseReduce = __webpack_require__(942), - isArray = __webpack_require__(143); + isArray = __webpack_require__(806); /** * Reduces `collection` to a value which is the accumulated result of running @@ -8054,7 +8648,204 @@ module.exports = metaMap; /***/ }), /* 157 */, -/* 158 */, +/* 158 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +/* + compiles a selector to an executable function +*/ + +module.exports = compile; +module.exports.compileUnsafe = compileUnsafe; +module.exports.compileToken = compileToken; + +var parse = __webpack_require__(442), + DomUtils = __webpack_require__(104), + isTag = DomUtils.isTag, + Rules = __webpack_require__(123), + sortRules = __webpack_require__(642), + BaseFuncs = __webpack_require__(312), + trueFunc = BaseFuncs.trueFunc, + falseFunc = BaseFuncs.falseFunc, + procedure = __webpack_require__(926); + +function compile(selector, options, context){ + var next = compileUnsafe(selector, options, context); + return wrap(next); +} + +function wrap(next){ + return function base(elem){ + return isTag(elem) && next(elem); + }; +} + +function compileUnsafe(selector, options, context){ + var token = parse(selector, options); + return compileToken(token, options, context); +} + +function includesScopePseudo(t){ + return t.type === "pseudo" && ( + t.name === "scope" || ( + Array.isArray(t.data) && + t.data.some(function(data){ + return data.some(includesScopePseudo); + }) + ) + ); +} + +var DESCENDANT_TOKEN = {type: "descendant"}, + SCOPE_TOKEN = {type: "pseudo", name: "scope"}, + PLACEHOLDER_ELEMENT = {}, + getParent = DomUtils.getParent; + +//CSS 4 Spec (Draft): 3.3.1. Absolutizing a Scope-relative Selector +//http://www.w3.org/TR/selectors4/#absolutizing +function absolutize(token, context){ + //TODO better check if context is document + var hasContext = !!context && !!context.length && context.every(function(e){ + return e === PLACEHOLDER_ELEMENT || !!getParent(e); + }); + + + token.forEach(function(t){ + if(t.length > 0 && isTraversal(t[0]) && t[0].type !== "descendant"){ + //don't return in else branch + } else if(hasContext && !includesScopePseudo(t)){ + t.unshift(DESCENDANT_TOKEN); + } else { + return; + } + + t.unshift(SCOPE_TOKEN); + }); +} + +function compileToken(token, options, context){ + token = token.filter(function(t){ return t.length > 0; }); + + token.forEach(sortRules); + + var isArrayContext = Array.isArray(context); + + context = (options && options.context) || context; + + if(context && !isArrayContext) context = [context]; + + absolutize(token, context); + + return token + .map(function(rules){ return compileRules(rules, options, context, isArrayContext); }) + .reduce(reduceRules, falseFunc); +} + +function isTraversal(t){ + return procedure[t.type] < 0; +} + +function compileRules(rules, options, context, isArrayContext){ + var acceptSelf = (isArrayContext && rules[0].name === "scope" && rules[1].type === "descendant"); + return rules.reduce(function(func, rule, index){ + if(func === falseFunc) return func; + return Rules[rule.type](func, rule, options, context, acceptSelf && index === 1); + }, options && options.rootFunc || trueFunc); +} + +function reduceRules(a, b){ + if(b === falseFunc || a === trueFunc){ + return a; + } + if(a === falseFunc || b === trueFunc){ + return b; + } + + return function combine(elem){ + return a(elem) || b(elem); + }; +} + +//:not, :has and :matches have to compile selectors +//doing this in lib/pseudos.js would lead to circular dependencies, +//so we add them here + +var Pseudos = __webpack_require__(589), + filters = Pseudos.filters, + existsOne = DomUtils.existsOne, + isTag = DomUtils.isTag, + getChildren = DomUtils.getChildren; + + +function containsTraversal(t){ + return t.some(isTraversal); +} + +filters.not = function(next, token, options, context){ + var opts = { + xmlMode: !!(options && options.xmlMode), + strict: !!(options && options.strict) + }; + + if(opts.strict){ + if(token.length > 1 || token.some(containsTraversal)){ + throw new SyntaxError("complex selectors in :not aren't allowed in strict mode"); + } + } + + var func = compileToken(token, opts, context); + + if(func === falseFunc) return next; + if(func === trueFunc) return falseFunc; + + return function(elem){ + return !func(elem) && next(elem); + }; +}; + +filters.has = function(next, token, options){ + var opts = { + xmlMode: !!(options && options.xmlMode), + strict: !!(options && options.strict) + }; + + //FIXME: Uses an array as a pointer to the current element (side effects) + var context = token.some(containsTraversal) ? [PLACEHOLDER_ELEMENT] : null; + + var func = compileToken(token, opts, context); + + if(func === falseFunc) return falseFunc; + if(func === trueFunc) return function(elem){ + return getChildren(elem).some(isTag) && next(elem); + }; + + func = wrap(func); + + if(context){ + return function has(elem){ + return next(elem) && ( + (context[0] = elem), existsOne(func, getChildren(elem)) + ); + }; + } + + return function has(elem){ + return next(elem) && existsOne(func, getChildren(elem)); + }; +}; + +filters.matches = function(next, token, options, context){ + var opts = { + xmlMode: !!(options && options.xmlMode), + strict: !!(options && options.strict), + rootFunc: next + }; + + return compileToken(token, opts, context); +}; + + +/***/ }), /* 159 */ /***/ (function(module, __unusedexports, __webpack_require__) { @@ -8231,17 +9022,230 @@ exports.makeSpec = makeSpec; /***/ }), -/* 164 */, +/* 164 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const SemVer = __webpack_require__(65) +const Range = __webpack_require__(124) +const gt = __webpack_require__(486) + +const minVersion = (range, loose) => { + range = new Range(range, loose) + + let minver = new SemVer('0.0.0') + if (range.test(minver)) { + return minver + } + + minver = new SemVer('0.0.0-0') + if (range.test(minver)) { + return minver + } + + minver = null + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i] + + let setMin = null + comparators.forEach((comparator) => { + // Clone to avoid manipulating the comparator's semver object. + const compver = new SemVer(comparator.semver.version) + switch (comparator.operator) { + case '>': + if (compver.prerelease.length === 0) { + compver.patch++ + } else { + compver.prerelease.push(0) + } + compver.raw = compver.format() + /* fallthrough */ + case '': + case '>=': + if (!setMin || gt(compver, setMin)) { + setMin = compver + } + break + case '<': + case '<=': + /* Ignore maximum versions */ + break + /* istanbul ignore next */ + default: + throw new Error(`Unexpected operation: ${comparator.operator}`) + } + }) + if (setMin && (!minver || gt(minver, setMin))) + minver = setMin + } + + if (minver && range.test(minver)) { + return minver + } + + return null +} +module.exports = minVersion + + +/***/ }), /* 165 */, /* 166 */, -/* 167 */, +/* 167 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const compare = __webpack_require__(874) +const gte = (a, b, loose) => compare(a, b, loose) >= 0 +module.exports = gte + + +/***/ }), /* 168 */, /* 169 */, /* 170 */, /* 171 */, /* 172 */, /* 173 */, -/* 174 */, +/* 174 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const ANY = Symbol('SemVer ANY') +// hoisted class for cyclic dependency +class Comparator { + static get ANY () { + return ANY + } + constructor (comp, options) { + options = parseOptions(options) + + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp + } else { + comp = comp.value + } + } + + debug('comparator', comp, options) + this.options = options + this.loose = !!options.loose + this.parse(comp) + + if (this.semver === ANY) { + this.value = '' + } else { + this.value = this.operator + this.semver.version + } + + debug('comp', this) + } + + parse (comp) { + const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + const m = comp.match(r) + + if (!m) { + throw new TypeError(`Invalid comparator: ${comp}`) + } + + this.operator = m[1] !== undefined ? m[1] : '' + if (this.operator === '=') { + this.operator = '' + } + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) { + this.semver = ANY + } else { + this.semver = new SemVer(m[2], this.options.loose) + } + } + + toString () { + return this.value + } + + test (version) { + debug('Comparator.test', version, this.options.loose) + + if (this.semver === ANY || version === ANY) { + return true + } + + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + + return cmp(version, this.operator, this.semver, this.options) + } + + intersects (comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required') + } + + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (this.operator === '') { + if (this.value === '') { + return true + } + return new Range(comp.value, options).test(this.value) + } else if (comp.operator === '') { + if (comp.value === '') { + return true + } + return new Range(this.value, options).test(comp.semver) + } + + const sameDirectionIncreasing = + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '>=' || comp.operator === '>') + const sameDirectionDecreasing = + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '<=' || comp.operator === '<') + const sameSemVer = this.semver.version === comp.semver.version + const differentDirectionsInclusive = + (this.operator === '>=' || this.operator === '<=') && + (comp.operator === '>=' || comp.operator === '<=') + const oppositeDirectionsLessThan = + cmp(this.semver, '<', comp.semver, options) && + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '<=' || comp.operator === '<') + const oppositeDirectionsGreaterThan = + cmp(this.semver, '>', comp.semver, options) && + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '>=' || comp.operator === '>') + + return ( + sameDirectionIncreasing || + sameDirectionDecreasing || + (sameSemVer && differentDirectionsInclusive) || + oppositeDirectionsLessThan || + oppositeDirectionsGreaterThan + ) + } +} + +module.exports = Comparator + +const parseOptions = __webpack_require__(143) +const {re, t} = __webpack_require__(976) +const cmp = __webpack_require__(752) +const debug = __webpack_require__(548) +const SemVer = __webpack_require__(65) +const Range = __webpack_require__(124) + + +/***/ }), /* 175 */, /* 176 */ /***/ (function(module, __unusedexports, __webpack_require__) { @@ -8704,7 +9708,29 @@ module.exports = Parser; /***/ }), /* 179 */, /* 180 */, -/* 181 */, +/* 181 */ +/***/ (function(module) { + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +const SEMVER_SPEC_VERSION = '2.0.0' + +const MAX_LENGTH = 256 +const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || + /* istanbul ignore next */ 9007199254740991 + +// Max safe segment length for coercion. +const MAX_SAFE_COMPONENT_LENGTH = 16 + +module.exports = { + SEMVER_SPEC_VERSION, + MAX_LENGTH, + MAX_SAFE_INTEGER, + MAX_SAFE_COMPONENT_LENGTH +} + + +/***/ }), /* 182 */, /* 183 */, /* 184 */, @@ -8789,7 +9815,7 @@ module.exports = baseIsEqual; var select = __webpack_require__(720), utils = __webpack_require__(140), domEach = utils.domEach, - uniqueSort = __webpack_require__(818).DomUtils.uniqueSort, + uniqueSort = __webpack_require__(21).DomUtils.uniqueSort, isTag = utils.isTag, _ = { bind: __webpack_require__(132), @@ -9224,7 +10250,347 @@ exports.addBack = function(selector) { /* 197 */, /* 198 */, /* 199 */, -/* 200 */, +/* 200 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +"use strict"; + + +// A linked list to keep track of recently-used-ness +const Yallist = __webpack_require__(381) + +const MAX = Symbol('max') +const LENGTH = Symbol('length') +const LENGTH_CALCULATOR = Symbol('lengthCalculator') +const ALLOW_STALE = Symbol('allowStale') +const MAX_AGE = Symbol('maxAge') +const DISPOSE = Symbol('dispose') +const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet') +const LRU_LIST = Symbol('lruList') +const CACHE = Symbol('cache') +const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet') + +const naiveLength = () => 1 + +// lruList is a yallist where the head is the youngest +// item, and the tail is the oldest. the list contains the Hit +// objects as the entries. +// Each Hit object has a reference to its Yallist.Node. This +// never changes. +// +// cache is a Map (or PseudoMap) that matches the keys to +// the Yallist.Node object. +class LRUCache { + constructor (options) { + if (typeof options === 'number') + options = { max: options } + + if (!options) + options = {} + + if (options.max && (typeof options.max !== 'number' || options.max < 0)) + throw new TypeError('max must be a non-negative number') + // Kind of weird to have a default max of Infinity, but oh well. + const max = this[MAX] = options.max || Infinity + + const lc = options.length || naiveLength + this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc + this[ALLOW_STALE] = options.stale || false + if (options.maxAge && typeof options.maxAge !== 'number') + throw new TypeError('maxAge must be a number') + this[MAX_AGE] = options.maxAge || 0 + this[DISPOSE] = options.dispose + this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false + this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false + this.reset() + } + + // resize the cache when the max changes. + set max (mL) { + if (typeof mL !== 'number' || mL < 0) + throw new TypeError('max must be a non-negative number') + + this[MAX] = mL || Infinity + trim(this) + } + get max () { + return this[MAX] + } + + set allowStale (allowStale) { + this[ALLOW_STALE] = !!allowStale + } + get allowStale () { + return this[ALLOW_STALE] + } + + set maxAge (mA) { + if (typeof mA !== 'number') + throw new TypeError('maxAge must be a non-negative number') + + this[MAX_AGE] = mA + trim(this) + } + get maxAge () { + return this[MAX_AGE] + } + + // resize the cache when the lengthCalculator changes. + set lengthCalculator (lC) { + if (typeof lC !== 'function') + lC = naiveLength + + if (lC !== this[LENGTH_CALCULATOR]) { + this[LENGTH_CALCULATOR] = lC + this[LENGTH] = 0 + this[LRU_LIST].forEach(hit => { + hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key) + this[LENGTH] += hit.length + }) + } + trim(this) + } + get lengthCalculator () { return this[LENGTH_CALCULATOR] } + + get length () { return this[LENGTH] } + get itemCount () { return this[LRU_LIST].length } + + rforEach (fn, thisp) { + thisp = thisp || this + for (let walker = this[LRU_LIST].tail; walker !== null;) { + const prev = walker.prev + forEachStep(this, fn, walker, thisp) + walker = prev + } + } + + forEach (fn, thisp) { + thisp = thisp || this + for (let walker = this[LRU_LIST].head; walker !== null;) { + const next = walker.next + forEachStep(this, fn, walker, thisp) + walker = next + } + } + + keys () { + return this[LRU_LIST].toArray().map(k => k.key) + } + + values () { + return this[LRU_LIST].toArray().map(k => k.value) + } + + reset () { + if (this[DISPOSE] && + this[LRU_LIST] && + this[LRU_LIST].length) { + this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value)) + } + + this[CACHE] = new Map() // hash of items by key + this[LRU_LIST] = new Yallist() // list of items in order of use recency + this[LENGTH] = 0 // length of items in the list + } + + dump () { + return this[LRU_LIST].map(hit => + isStale(this, hit) ? false : { + k: hit.key, + v: hit.value, + e: hit.now + (hit.maxAge || 0) + }).toArray().filter(h => h) + } + + dumpLru () { + return this[LRU_LIST] + } + + set (key, value, maxAge) { + maxAge = maxAge || this[MAX_AGE] + + if (maxAge && typeof maxAge !== 'number') + throw new TypeError('maxAge must be a number') + + const now = maxAge ? Date.now() : 0 + const len = this[LENGTH_CALCULATOR](value, key) + + if (this[CACHE].has(key)) { + if (len > this[MAX]) { + del(this, this[CACHE].get(key)) + return false + } + + const node = this[CACHE].get(key) + const item = node.value + + // dispose of the old one before overwriting + // split out into 2 ifs for better coverage tracking + if (this[DISPOSE]) { + if (!this[NO_DISPOSE_ON_SET]) + this[DISPOSE](key, item.value) + } + + item.now = now + item.maxAge = maxAge + item.value = value + this[LENGTH] += len - item.length + item.length = len + this.get(key) + trim(this) + return true + } + + const hit = new Entry(key, value, len, now, maxAge) + + // oversized objects fall out of cache automatically. + if (hit.length > this[MAX]) { + if (this[DISPOSE]) + this[DISPOSE](key, value) + + return false + } + + this[LENGTH] += hit.length + this[LRU_LIST].unshift(hit) + this[CACHE].set(key, this[LRU_LIST].head) + trim(this) + return true + } + + has (key) { + if (!this[CACHE].has(key)) return false + const hit = this[CACHE].get(key).value + return !isStale(this, hit) + } + + get (key) { + return get(this, key, true) + } + + peek (key) { + return get(this, key, false) + } + + pop () { + const node = this[LRU_LIST].tail + if (!node) + return null + + del(this, node) + return node.value + } + + del (key) { + del(this, this[CACHE].get(key)) + } + + load (arr) { + // reset the cache + this.reset() + + const now = Date.now() + // A previous serialized cache has the most recent items first + for (let l = arr.length - 1; l >= 0; l--) { + const hit = arr[l] + const expiresAt = hit.e || 0 + if (expiresAt === 0) + // the item was created without expiration in a non aged cache + this.set(hit.k, hit.v) + else { + const maxAge = expiresAt - now + // dont add already expired items + if (maxAge > 0) { + this.set(hit.k, hit.v, maxAge) + } + } + } + } + + prune () { + this[CACHE].forEach((value, key) => get(this, key, false)) + } +} + +const get = (self, key, doUse) => { + const node = self[CACHE].get(key) + if (node) { + const hit = node.value + if (isStale(self, hit)) { + del(self, node) + if (!self[ALLOW_STALE]) + return undefined + } else { + if (doUse) { + if (self[UPDATE_AGE_ON_GET]) + node.value.now = Date.now() + self[LRU_LIST].unshiftNode(node) + } + } + return hit.value + } +} + +const isStale = (self, hit) => { + if (!hit || (!hit.maxAge && !self[MAX_AGE])) + return false + + const diff = Date.now() - hit.now + return hit.maxAge ? diff > hit.maxAge + : self[MAX_AGE] && (diff > self[MAX_AGE]) +} + +const trim = self => { + if (self[LENGTH] > self[MAX]) { + for (let walker = self[LRU_LIST].tail; + self[LENGTH] > self[MAX] && walker !== null;) { + // We know that we're about to delete this one, and also + // what the next least recently used key will be, so just + // go ahead and set it now. + const prev = walker.prev + del(self, walker) + walker = prev + } + } +} + +const del = (self, node) => { + if (node) { + const hit = node.value + if (self[DISPOSE]) + self[DISPOSE](hit.key, hit.value) + + self[LENGTH] -= hit.length + self[CACHE].delete(hit.key) + self[LRU_LIST].removeNode(node) + } +} + +class Entry { + constructor (key, value, length, now, maxAge) { + this.key = key + this.value = value + this.length = length + this.now = now + this.maxAge = maxAge || 0 + } +} + +const forEachStep = (self, fn, node, thisp) => { + let hit = node.value + if (isStale(self, hit)) { + del(self, node) + if (!self[ALLOW_STALE]) + hit = undefined + } + if (hit) + fn.call(thisp, hit.value, hit.key, self) +} + +module.exports = LRUCache + + +/***/ }), /* 201 */, /* 202 */ /***/ (function(module, __unusedexports, __webpack_require__) { @@ -9685,7 +11051,20 @@ module.exports = { /***/ }), /* 217 */, /* 218 */, -/* 219 */, +/* 219 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const Range = __webpack_require__(124) + +// Mostly just for testing and legacy API reasons +const toComparators = (range, options) => + new Range(range, options).set + .map(comp => comp.map(c => c.value).join(' ').trim().split(' ')) + +module.exports = toComparators + + +/***/ }), /* 220 */, /* 221 */, /* 222 */ @@ -11371,7 +12750,7 @@ function destroyer(stream, reading, writing, callback) { stream.on('close', function () { closed = true; }); - if (eos === undefined) eos = __webpack_require__(740); + if (eos === undefined) eos = __webpack_require__(287); eos(stream, { readable: reading, writable: writing @@ -13002,13 +14381,251 @@ module.exports = isStrictComparable; /***/ }), /* 259 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const Range = __webpack_require__(124) +const intersects = (r1, r2, options) => { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2) +} +module.exports = intersects + + +/***/ }), +/* 260 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var baseIndexOf = __webpack_require__(571); + +/** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; +} + +module.exports = arrayIncludes; + + +/***/ }), +/* 261 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var nativeCreate = __webpack_require__(878); + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +module.exports = hashSet; + + +/***/ }), +/* 262 */ +/***/ (function(module) { + +"use strict"; + + +//Const +var NOAH_ARK_CAPACITY = 3; + +//List of formatting elements +var FormattingElementList = module.exports = function (treeAdapter) { + this.length = 0; + this.entries = []; + this.treeAdapter = treeAdapter; + this.bookmark = null; +}; + +//Entry types +FormattingElementList.MARKER_ENTRY = 'MARKER_ENTRY'; +FormattingElementList.ELEMENT_ENTRY = 'ELEMENT_ENTRY'; + +//Noah Ark's condition +//OPTIMIZATION: at first we try to find possible candidates for exclusion using +//lightweight heuristics without thorough attributes check. +FormattingElementList.prototype._getNoahArkConditionCandidates = function (newElement) { + var candidates = []; + + if (this.length >= NOAH_ARK_CAPACITY) { + var neAttrsLength = this.treeAdapter.getAttrList(newElement).length, + neTagName = this.treeAdapter.getTagName(newElement), + neNamespaceURI = this.treeAdapter.getNamespaceURI(newElement); + + for (var i = this.length - 1; i >= 0; i--) { + var entry = this.entries[i]; + + if (entry.type === FormattingElementList.MARKER_ENTRY) + break; + + var element = entry.element, + elementAttrs = this.treeAdapter.getAttrList(element), + isCandidate = this.treeAdapter.getTagName(element) === neTagName && + this.treeAdapter.getNamespaceURI(element) === neNamespaceURI && + elementAttrs.length === neAttrsLength; + + if (isCandidate) + candidates.push({idx: i, attrs: elementAttrs}); + } + } + + return candidates.length < NOAH_ARK_CAPACITY ? [] : candidates; +}; + +FormattingElementList.prototype._ensureNoahArkCondition = function (newElement) { + var candidates = this._getNoahArkConditionCandidates(newElement), + cLength = candidates.length; + + if (cLength) { + var neAttrs = this.treeAdapter.getAttrList(newElement), + neAttrsLength = neAttrs.length, + neAttrsMap = Object.create(null); + + //NOTE: build attrs map for the new element so we can perform fast lookups + for (var i = 0; i < neAttrsLength; i++) { + var neAttr = neAttrs[i]; + + neAttrsMap[neAttr.name] = neAttr.value; + } + + for (i = 0; i < neAttrsLength; i++) { + for (var j = 0; j < cLength; j++) { + var cAttr = candidates[j].attrs[i]; + + if (neAttrsMap[cAttr.name] !== cAttr.value) { + candidates.splice(j, 1); + cLength--; + } + + if (candidates.length < NOAH_ARK_CAPACITY) + return; + } + } + + //NOTE: remove bottommost candidates until Noah's Ark condition will not be met + for (i = cLength - 1; i >= NOAH_ARK_CAPACITY - 1; i--) { + this.entries.splice(candidates[i].idx, 1); + this.length--; + } + } +}; + +//Mutations +FormattingElementList.prototype.insertMarker = function () { + this.entries.push({type: FormattingElementList.MARKER_ENTRY}); + this.length++; +}; + +FormattingElementList.prototype.pushElement = function (element, token) { + this._ensureNoahArkCondition(element); + + this.entries.push({ + type: FormattingElementList.ELEMENT_ENTRY, + element: element, + token: token + }); + + this.length++; +}; + +FormattingElementList.prototype.insertElementAfterBookmark = function (element, token) { + var bookmarkIdx = this.length - 1; + + for (; bookmarkIdx >= 0; bookmarkIdx--) { + if (this.entries[bookmarkIdx] === this.bookmark) + break; + } + + this.entries.splice(bookmarkIdx + 1, 0, { + type: FormattingElementList.ELEMENT_ENTRY, + element: element, + token: token + }); + + this.length++; +}; + +FormattingElementList.prototype.removeEntry = function (entry) { + for (var i = this.length - 1; i >= 0; i--) { + if (this.entries[i] === entry) { + this.entries.splice(i, 1); + this.length--; + break; + } + } +}; + +FormattingElementList.prototype.clearToLastMarker = function () { + while (this.length) { + var entry = this.entries.pop(); + + this.length--; + + if (entry.type === FormattingElementList.MARKER_ENTRY) + break; + } +}; + +//Search +FormattingElementList.prototype.getElementEntryInScopeWithTagName = function (tagName) { + for (var i = this.length - 1; i >= 0; i--) { + var entry = this.entries[i]; + + if (entry.type === FormattingElementList.MARKER_ENTRY) + return null; + + if (this.treeAdapter.getTagName(entry.element) === tagName) + return entry; + } + + return null; +}; + +FormattingElementList.prototype.getElementEntry = function (element) { + for (var i = this.length - 1; i >= 0; i--) { + var entry = this.entries[i]; + + if (entry.type === FormattingElementList.ELEMENT_ENTRY && entry.element === element) + return entry; + } + + return null; +}; + + +/***/ }), +/* 263 */, +/* 264 */, +/* 265 */ /***/ (function(__unusedmodule, exports, __webpack_require__) { "use strict"; -//----------------------------------------------------------------------- -// Conda helpers -//----------------------------------------------------------------------- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); @@ -13038,802 +14655,273 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.condaInit = exports.applyCondaConfiguration = exports.copyConfig = exports.bootstrapConfig = exports.condaCommand = exports.isMambaInstalled = exports.condaExecutable = exports.envCommandFlag = exports.condaBasePath = void 0; -const fs = __importStar(__webpack_require__(747)); +exports.parseInputs = void 0; const path = __importStar(__webpack_require__(622)); -const os = __importStar(__webpack_require__(87)); const core = __importStar(__webpack_require__(470)); -const io = __importStar(__webpack_require__(1)); +const semver = __importStar(__webpack_require__(876)); const constants = __importStar(__webpack_require__(211)); -const utils = __importStar(__webpack_require__(163)); -/** - * Provide current location of miniconda or location where it will be installed - */ -function condaBasePath(options) { - let condaPath = constants.MINICONDA_DIR_PATH; - if (!options.useBundled) { - if (constants.IS_MAC) { - condaPath = "/Users/runner/miniconda3"; - } - else { - condaPath += "3"; - } - } - return condaPath; -} -exports.condaBasePath = condaBasePath; +const urlExt = (url) => path.posix.extname(new URL(url).pathname); /** - * Provide conda CLI arguments for identifying an env by name or prefix/path + * The currrent known set of input validation rules. * * ### Note - * Only really detects by presence of a path separator, as the path may not yet exist - */ -function envCommandFlag(inputs) { - return [ - inputs.activateEnvironment.match(/(\\|\/)/) ? "--prefix" : "--name", - inputs.activateEnvironment, - ]; -} -exports.envCommandFlag = envCommandFlag; -/** - * Provide cross platform location of conda/mamba executable - */ -function condaExecutable(options, subcommand) { - const dir = condaBasePath(options); - let condaExe; - let commandName = "conda"; - if (options.useMamba && - (subcommand == null || constants.MAMBA_SUBCOMMANDS.includes(subcommand))) { - commandName = "mamba"; - } - commandName = constants.IS_WINDOWS ? commandName + ".bat" : commandName; - condaExe = path.join(dir, "condabin", commandName); - return condaExe; -} -exports.condaExecutable = condaExecutable; -/** Detect the presence of mamba */ -function isMambaInstalled(options) { - const mamba = condaExecutable(Object.assign(Object.assign({}, options), { useMamba: true })); - return fs.existsSync(mamba); -} -exports.isMambaInstalled = isMambaInstalled; -/** - * Run Conda command - */ -function condaCommand(cmd, options) { - return __awaiter(this, void 0, void 0, function* () { - const command = [condaExecutable(options, cmd[0]), ...cmd]; - return yield utils.execute(command); - }); -} -exports.condaCommand = condaCommand; -/** - * Create a baseline .condarc - */ -function bootstrapConfig() { - return __awaiter(this, void 0, void 0, function* () { - yield fs.promises.writeFile(constants.CONDARC_PATH, constants.BOOTSTRAP_CONDARC); - }); -} -exports.bootstrapConfig = bootstrapConfig; -/** - * Copy the given condarc file into place - */ -function copyConfig(inputs) { - return __awaiter(this, void 0, void 0, function* () { - const sourcePath = path.join(process.env["GITHUB_WORKSPACE"] || "", inputs.condaConfigFile); - core.info(`Copying "${sourcePath}" to "${constants.CONDARC_PATH}..."`); - yield io.cp(sourcePath, constants.CONDARC_PATH); - }); -} -exports.copyConfig = copyConfig; -/** - * Setup Conda configuration + * Adding a new validation rule: + * - implement IRule + * - add it here + * - add a test! + * + * When the #107 changes have been completed, some of these rules can be moved to + * specific providers, but still checked up-front, with the name and type of provider + * for additional context. */ -function applyCondaConfiguration(inputs, options) { - var _a, _b, _c; - return __awaiter(this, void 0, void 0, function* () { - const configEntries = Object.entries(inputs.condaConfig); - // Channels are special: if specified as an action input, these take priority - // over what is found in (at present) a YAML-based environment - let channels = inputs.condaConfig.channels - .trim() - .split(/,/) - .map((c) => c.trim()) - .filter((c) => c.length); - if (!channels.length && ((_c = (_b = (_a = options.envSpec) === null || _a === void 0 ? void 0 : _a.yaml) === null || _b === void 0 ? void 0 : _b.channels) === null || _c === void 0 ? void 0 : _c.length)) { - channels = options.envSpec.yaml.channels; - } - // LIFO: reverse order to preserve higher priority as listed in the option - // .slice ensures working against a copy - for (const channel of channels.slice().reverse()) { - core.info(`Adding channel '${channel}'`); - yield condaCommand(["config", "--add", "channels", channel], options); - } - // All other options are just passed as their string representations - for (const [key, value] of configEntries) { - if (value.trim().length === 0 || key === "channels") { - continue; - } - core.info(`${key}: ${value}`); - try { - yield condaCommand(["config", "--set", key, value], options); - } - catch (err) { - core.warning(err); - } - } - // Log all configuration information - yield condaCommand(["config", "--show-sources"], options); - yield condaCommand(["config", "--show"], options); - }); -} -exports.applyCondaConfiguration = applyCondaConfiguration; -/** - * Initialize Conda +const RULES = [ + (i, c) => !!(i.condaVersion && c.auto_update_conda === "true") && + `only one of 'conda-version: ${i.condaVersion}' or 'auto-update-conda: true' may be provided`, + (i) => !!(i.pythonVersion && !i.activateEnvironment) && + `'python-version: ${i.pythonVersion}' requires 'activate-environment: true'`, + (i) => !!(i.minicondaVersion && i.miniforgeVersion) && + `only one of 'miniconda-version: ${i.minicondaVersion}' or 'miniforge-version: ${i.miniforgeVersion}' may be provided`, + (i) => !!(i.installerUrl && i.minicondaVersion) && + `only one of 'installer-url: ${i.installerUrl}' or 'miniconda-version: ${i.minicondaVersion}' may be provided`, + (i) => !!(i.installerUrl && i.miniforgeVersion) && + `only one of 'installer-url: ${i.installerUrl}' or 'miniforge-version: ${i.miniforgeVersion}' may be provided`, + (i) => !!(i.installerUrl && + !constants.KNOWN_EXTENSIONS.includes(urlExt(i.installerUrl))) && + `'installer-url' extension '${urlExt(i.installerUrl)}' must be one of: ${constants.KNOWN_EXTENSIONS}`, + (i) => !!(!i.minicondaVersion && i.architecture !== "x64") && + `'architecture: ${i.architecture}' requires "miniconda-version"`, + (i // Miniconda x86 is only published for Windows lately (last Linux was 2019, last MacOS 2015) + ) => !!(i.architecture === "x86" && !constants.IS_WINDOWS) && + `'architecture: ${i.architecture}' is only available for recent versions on Windows`, + (i // We only support miniconda 4.6 or later (`conda init` and /condabin were added here, which we need) + ) => !!(!["latest", ""].includes(i.minicondaVersion) && + semver.lt(i.minicondaVersion, "4.6.0")) && + `'architecture: ${i.architecture}' requires "miniconda-version">=4.6 but you chose '${i.minicondaVersion}'`, +]; +/* + * Parse, validate, and normalize string-ish inputs from a workflow action's `with` */ -function condaInit(inputs, options) { +function parseInputs() { return __awaiter(this, void 0, void 0, function* () { - let ownPath; - const isValidActivate = !utils.isBaseEnv(inputs.activateEnvironment); - const autoActivateBase = options.condaConfig["auto_activate_base"] === "true"; - // Fix ownership of folders - if (options.useBundled) { - if (constants.IS_MAC) { - core.info("Fixing conda folders ownership"); - const userName = process.env.USER; - yield utils.execute([ - "sudo", - "chown", - "-R", - `${userName}:staff`, - condaBasePath(options), - ]); - } - else if (constants.IS_WINDOWS) { - for (let folder of constants.WIN_PERMS_FOLDERS) { - ownPath = path.join(condaBasePath(options), folder); - if (fs.existsSync(ownPath)) { - core.info(`Fixing ${folder} ownership`); - yield utils.execute(["takeown", "/f", ownPath, "/r", "/d", "y"]); - } - } - } - } - // Remove profile files - if (inputs.removeProfiles == "true") { - for (let rc of constants.PROFILES) { - try { - let file = path.join(os.homedir(), rc); - if (fs.existsSync(file)) { - core.info(`Removing "${file}"`); - yield io.rmRF(file); - } - } - catch (err) { - core.warning(err); - } + const inputs = Object.freeze({ + activateEnvironment: core.getInput("activate-environment"), + architecture: core.getInput("architecture"), + condaBuildVersion: core.getInput("conda-build-version"), + condaConfigFile: core.getInput("condarc-file"), + condaVersion: core.getInput("conda-version"), + environmentFile: core.getInput("environment-file"), + installerUrl: core.getInput("installer-url"), + mambaVersion: core.getInput("mamba-version"), + useMamba: core.getInput("use-mamba"), + minicondaVersion: core.getInput("miniconda-version"), + miniforgeVariant: core.getInput("miniforge-variant"), + miniforgeVersion: core.getInput("miniforge-version"), + pythonVersion: core.getInput("python-version"), + removeProfiles: core.getInput("remove-profiles"), + condaConfig: Object.freeze({ + add_anaconda_token: core.getInput("add-anaconda-token"), + add_pip_as_python_dependency: core.getInput("add-pip-as-python-dependency"), + allow_softlinks: core.getInput("allow-softlinks"), + auto_activate_base: core.getInput("auto-activate-base"), + auto_update_conda: core.getInput("auto-update-conda"), + channel_alias: core.getInput("channel-alias"), + channel_priority: core.getInput("channel-priority"), + channels: core.getInput("channels"), + show_channel_urls: core.getInput("show-channel-urls"), + use_only_tar_bz2: core.getInput("use-only-tar-bz2"), + // These are always set to avoid terminal issues + always_yes: "true", + changeps1: "false", + }), + cleanPatchedEnvironmentFile: core.getInput("clean-patched-environment-file"), + }); + const errors = RULES.reduce((errors, rule) => { + const msg = rule(inputs, inputs.condaConfig); + if (msg) { + core.error(msg); + errors.push(msg); } + return errors; + }, []); + if (errors.length) { + throw Error(`${errors.length} errors found in action inputs`); } - // Run conda init - for (let cmd of ["--all"]) { - yield condaCommand(["init", cmd], options); - } - // Rename files - if (constants.IS_LINUX) { - let source = "~/.bashrc".replace("~", os.homedir()); - let dest = "~/.profile".replace("~", os.homedir()); - core.info(`Renaming "${source}" to "${dest}"\n`); - yield io.mv(source, dest); - } - else if (constants.IS_MAC) { - let source = "~/.bash_profile".replace("~", os.homedir()); - let dest = "~/.profile".replace("~", os.homedir()); - core.info(`Renaming "${source}" to "${dest}"\n`); - yield io.mv(source, dest); - } - // PowerShell profiles - let powerExtraText = ` - # ----------------------------------------------------------------------------`; - if (isValidActivate) { - powerExtraText += ` - # Conda Setup Action: Custom activation - conda activate "${inputs.activateEnvironment}"`; - } - powerExtraText += ` - # ----------------------------------------------------------------------------`; - // Bash profiles - let bashExtraText = ` - # ---------------------------------------------------------------------------- - # Conda Setup Action: Basic configuration - set -eo pipefail`; - if (isValidActivate) { - bashExtraText += ` - # Conda Setup Action: Custom activation - conda activate "${inputs.activateEnvironment}"`; - bashExtraText += ` - # ----------------------------------------------------------------------------`; - } - // Batch profiles - let batchExtraText = ` - :: ---------------------------------------------------------------------------`; - if (autoActivateBase) { - batchExtraText += ` - :: Conda Setup Action: Activate base - @CALL "%CONDA_BAT%" activate base`; - } - if (isValidActivate) { - batchExtraText += ` - :: Conda Setup Action: Custom activation - @CALL "%CONDA_BAT%" activate "${inputs.activateEnvironment}"`; - } - batchExtraText += ` - :: Conda Setup Action: Basic configuration - @SETLOCAL EnableExtensions - @SETLOCAL DisableDelayedExpansion - :: ---------------------------------------------------------------------------`; - let extraShells; - const shells = { - "~/.bash_profile": bashExtraText, - "~/.profile": bashExtraText, - "~/.zshrc": bashExtraText, - "~/.config/fish/config.fish": bashExtraText, - "~/.tcshrc": bashExtraText, - "~/.xonshrc": bashExtraText, - "~/.config/powershell/profile.ps1": powerExtraText, - "~/Documents/PowerShell/profile.ps1": powerExtraText, - "~/Documents/WindowsPowerShell/profile.ps1": powerExtraText, - }; - if (options.useBundled) { - extraShells = { - "C:/Miniconda/etc/profile.d/conda.sh": bashExtraText, - "C:/Miniconda/etc/fish/conf.d/conda.fish": bashExtraText, - "C:/Miniconda/condabin/conda_hook.bat": batchExtraText, - }; - } - else { - extraShells = { - "C:/Miniconda3/etc/profile.d/conda.sh": bashExtraText, - "C:/Miniconda3/etc/fish/conf.d/conda.fish": bashExtraText, - "C:/Miniconda3/condabin/conda_hook.bat": batchExtraText, - }; - } - const allShells = Object.assign(Object.assign({}, shells), extraShells); - Object.keys(allShells).forEach((key) => { - let filePath = key.replace("~", os.homedir()); - const text = allShells[key]; - if (fs.existsSync(filePath)) { - core.info(`Append to "${filePath}":\n ${text} \n`); - fs.appendFileSync(filePath, text); - } - }); + return inputs; }); } -exports.condaInit = condaInit; +exports.parseInputs = parseInputs; /***/ }), -/* 260 */ +/* 266 */, +/* 267 */, +/* 268 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var baseIndexOf = __webpack_require__(571); +var assocIndexOf = __webpack_require__(820); /** - * A specialized version of `_.includes` for arrays without support for - * specifying an index to search from. + * Sets the list cache `key` to `value`. * * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @returns {boolean} Returns `true` if `target` is found, else `false`. + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. */ -function arrayIncludes(array, value) { - var length = array == null ? 0 : array.length; - return !!length && baseIndexOf(array, value, 0) > -1; +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; } -module.exports = arrayIncludes; +module.exports = listCacheSet; /***/ }), -/* 261 */ -/***/ (function(module, __unusedexports, __webpack_require__) { +/* 269 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { -var nativeCreate = __webpack_require__(878); +"use strict"; -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.updateMamba = void 0; +const fs = __importStar(__webpack_require__(747)); +const core = __importStar(__webpack_require__(470)); +const constants = __importStar(__webpack_require__(211)); +const utils = __importStar(__webpack_require__(163)); +const conda = __importStar(__webpack_require__(506)); +/** Install `mamba` in the `base` env at a specified version */ +exports.updateMamba = { + label: "update mamba", + provides: (inputs, options) => __awaiter(void 0, void 0, void 0, function* () { return inputs.mambaVersion !== "" || options.mambaInInstaller; }), + toolPackages: (inputs, options) => __awaiter(void 0, void 0, void 0, function* () { + core.warning(`Mamba support is still experimental and can result in differently solved environments!`); + return { + tools: inputs.mambaVersion !== "" + ? [utils.makeSpec("mamba", inputs.mambaVersion)] + : [], + options: Object.assign(Object.assign({}, options), { useMamba: true }), + }; + }), + postInstall: (inputs, options) => __awaiter(void 0, void 0, void 0, function* () { + if (!constants.IS_WINDOWS) { + core.info("`mamba` is already executable"); + return; + } + core.info("Creating bash wrapper for `mamba`..."); + // Add bat-less forwarder for bash users on Windows + const mambaBat = conda.condaExecutable(options).replace(/\\/g, "/"); + const contents = `bash.exe -c "exec '${mambaBat}' $*" || exit 1`; + fs.writeFileSync(mambaBat.slice(0, -4), contents); + core.info(`... wrote ${mambaBat}:\n${contents}`); + }), +}; + + +/***/ }), +/* 270 */, +/* 271 */, +/* 272 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var identity = __webpack_require__(83), + overRest = __webpack_require__(430), + setToString = __webpack_require__(70); /** - * Sets the hash `key` to `value`. + * The base implementation of `_.rest` which doesn't validate or coerce arguments. * * @private - * @name set - * @memberOf Hash - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the hash instance. + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. */ -function hashSet(key, value) { - var data = this.__data__; - this.size += this.has(key) ? 0 : 1; - data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; - return this; +function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); } -module.exports = hashSet; +module.exports = baseRest; /***/ }), -/* 262 */ +/* 273 */ /***/ (function(module) { +module.exports = {"amp":"&","apos":"'","gt":">","lt":"<","quot":"\""}; + +/***/ }), +/* 274 */, +/* 275 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { + "use strict"; -//Const -var NOAH_ARK_CAPACITY = 3; +var DOCUMENT_MODE = __webpack_require__(621).DOCUMENT_MODE; -//List of formatting elements -var FormattingElementList = module.exports = function (treeAdapter) { - this.length = 0; - this.entries = []; - this.treeAdapter = treeAdapter; - this.bookmark = null; +//Node construction +exports.createDocument = function () { + return { + nodeName: '#document', + mode: DOCUMENT_MODE.NO_QUIRKS, + childNodes: [] + }; }; -//Entry types -FormattingElementList.MARKER_ENTRY = 'MARKER_ENTRY'; -FormattingElementList.ELEMENT_ENTRY = 'ELEMENT_ENTRY'; +exports.createDocumentFragment = function () { + return { + nodeName: '#document-fragment', + childNodes: [] + }; +}; -//Noah Ark's condition -//OPTIMIZATION: at first we try to find possible candidates for exclusion using -//lightweight heuristics without thorough attributes check. -FormattingElementList.prototype._getNoahArkConditionCandidates = function (newElement) { - var candidates = []; - - if (this.length >= NOAH_ARK_CAPACITY) { - var neAttrsLength = this.treeAdapter.getAttrList(newElement).length, - neTagName = this.treeAdapter.getTagName(newElement), - neNamespaceURI = this.treeAdapter.getNamespaceURI(newElement); - - for (var i = this.length - 1; i >= 0; i--) { - var entry = this.entries[i]; - - if (entry.type === FormattingElementList.MARKER_ENTRY) - break; - - var element = entry.element, - elementAttrs = this.treeAdapter.getAttrList(element), - isCandidate = this.treeAdapter.getTagName(element) === neTagName && - this.treeAdapter.getNamespaceURI(element) === neNamespaceURI && - elementAttrs.length === neAttrsLength; - - if (isCandidate) - candidates.push({idx: i, attrs: elementAttrs}); - } - } - - return candidates.length < NOAH_ARK_CAPACITY ? [] : candidates; -}; - -FormattingElementList.prototype._ensureNoahArkCondition = function (newElement) { - var candidates = this._getNoahArkConditionCandidates(newElement), - cLength = candidates.length; - - if (cLength) { - var neAttrs = this.treeAdapter.getAttrList(newElement), - neAttrsLength = neAttrs.length, - neAttrsMap = Object.create(null); - - //NOTE: build attrs map for the new element so we can perform fast lookups - for (var i = 0; i < neAttrsLength; i++) { - var neAttr = neAttrs[i]; - - neAttrsMap[neAttr.name] = neAttr.value; - } - - for (i = 0; i < neAttrsLength; i++) { - for (var j = 0; j < cLength; j++) { - var cAttr = candidates[j].attrs[i]; - - if (neAttrsMap[cAttr.name] !== cAttr.value) { - candidates.splice(j, 1); - cLength--; - } - - if (candidates.length < NOAH_ARK_CAPACITY) - return; - } - } - - //NOTE: remove bottommost candidates until Noah's Ark condition will not be met - for (i = cLength - 1; i >= NOAH_ARK_CAPACITY - 1; i--) { - this.entries.splice(candidates[i].idx, 1); - this.length--; - } - } -}; - -//Mutations -FormattingElementList.prototype.insertMarker = function () { - this.entries.push({type: FormattingElementList.MARKER_ENTRY}); - this.length++; -}; - -FormattingElementList.prototype.pushElement = function (element, token) { - this._ensureNoahArkCondition(element); - - this.entries.push({ - type: FormattingElementList.ELEMENT_ENTRY, - element: element, - token: token - }); - - this.length++; -}; - -FormattingElementList.prototype.insertElementAfterBookmark = function (element, token) { - var bookmarkIdx = this.length - 1; - - for (; bookmarkIdx >= 0; bookmarkIdx--) { - if (this.entries[bookmarkIdx] === this.bookmark) - break; - } - - this.entries.splice(bookmarkIdx + 1, 0, { - type: FormattingElementList.ELEMENT_ENTRY, - element: element, - token: token - }); - - this.length++; -}; - -FormattingElementList.prototype.removeEntry = function (entry) { - for (var i = this.length - 1; i >= 0; i--) { - if (this.entries[i] === entry) { - this.entries.splice(i, 1); - this.length--; - break; - } - } -}; - -FormattingElementList.prototype.clearToLastMarker = function () { - while (this.length) { - var entry = this.entries.pop(); - - this.length--; - - if (entry.type === FormattingElementList.MARKER_ENTRY) - break; - } -}; - -//Search -FormattingElementList.prototype.getElementEntryInScopeWithTagName = function (tagName) { - for (var i = this.length - 1; i >= 0; i--) { - var entry = this.entries[i]; - - if (entry.type === FormattingElementList.MARKER_ENTRY) - return null; - - if (this.treeAdapter.getTagName(entry.element) === tagName) - return entry; - } - - return null; -}; - -FormattingElementList.prototype.getElementEntry = function (element) { - for (var i = this.length - 1; i >= 0; i--) { - var entry = this.entries[i]; - - if (entry.type === FormattingElementList.ELEMENT_ENTRY && entry.element === element) - return entry; - } - - return null; -}; - - -/***/ }), -/* 263 */, -/* 264 */, -/* 265 */ -/***/ (function(__unusedmodule, exports, __webpack_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseInputs = void 0; -const path = __importStar(__webpack_require__(622)); -const core = __importStar(__webpack_require__(470)); -const constants = __importStar(__webpack_require__(211)); -const urlExt = (url) => path.posix.extname(new URL(url).pathname); -/** - * The currrent known set of input validation rules. - * - * ### Note - * Adding a new validation rule: - * - implement IRule - * - add it here - * - add a test! - * - * When the #107 changes have been completed, some of these rules can be moved to - * specific providers, but still checked up-front, with the name and type of provider - * for additional context. - */ -const RULES = [ - (i, c) => !!(i.condaVersion && c.auto_update_conda === "true") && - `only one of 'conda-version: ${i.condaVersion}' or 'auto-update-conda: true' may be provided`, - (i) => !!(i.pythonVersion && !i.activateEnvironment) && - `'python-version: ${i.pythonVersion}' requires 'activate-environment: true'`, - (i) => !!(i.minicondaVersion && i.miniforgeVersion) && - `only one of 'miniconda-version: ${i.minicondaVersion}' or 'miniforge-version: ${i.miniforgeVersion}' may be provided`, - (i) => !!(i.installerUrl && i.minicondaVersion) && - `only one of 'installer-url: ${i.installerUrl}' or 'miniconda-version: ${i.minicondaVersion}' may be provided`, - (i) => !!(i.installerUrl && i.miniforgeVersion) && - `only one of 'installer-url: ${i.installerUrl}' or 'miniforge-version: ${i.miniforgeVersion}' may be provided`, - (i) => !!(i.installerUrl && - !constants.KNOWN_EXTENSIONS.includes(urlExt(i.installerUrl))) && - `'installer-url' extension '${urlExt(i.installerUrl)}' must be one of: ${constants.KNOWN_EXTENSIONS}`, - (i) => !!(i.minicondaVersion && i.architecture !== "x64") && - `'architecture: ${i.architecture}' requires "miniconda-version"`, -]; -/* - * Parse, validate, and normalize string-ish inputs from a workflow action's `with` - */ -function parseInputs() { - return __awaiter(this, void 0, void 0, function* () { - const inputs = Object.freeze({ - activateEnvironment: core.getInput("activate-environment"), - architecture: core.getInput("architecture"), - condaBuildVersion: core.getInput("conda-build-version"), - condaConfigFile: core.getInput("condarc-file"), - condaVersion: core.getInput("conda-version"), - environmentFile: core.getInput("environment-file"), - installerUrl: core.getInput("installer-url"), - mambaVersion: core.getInput("mamba-version"), - useMamba: core.getInput("use-mamba"), - minicondaVersion: core.getInput("miniconda-version"), - miniforgeVariant: core.getInput("miniforge-variant"), - miniforgeVersion: core.getInput("miniforge-version"), - pythonVersion: core.getInput("python-version"), - removeProfiles: core.getInput("remove-profiles"), - condaConfig: Object.freeze({ - add_anaconda_token: core.getInput("add-anaconda-token"), - add_pip_as_python_dependency: core.getInput("add-pip-as-python-dependency"), - allow_softlinks: core.getInput("allow-softlinks"), - auto_activate_base: core.getInput("auto-activate-base"), - auto_update_conda: core.getInput("auto-update-conda"), - channel_alias: core.getInput("channel-alias"), - channel_priority: core.getInput("channel-priority"), - channels: core.getInput("channels"), - show_channel_urls: core.getInput("show-channel-urls"), - use_only_tar_bz2: core.getInput("use-only-tar-bz2"), - // These are always set to avoid terminal issues - always_yes: "true", - changeps1: "false", - }), - cleanPatchedEnvironmentFile: core.getInput("clean-patched-environment-file"), - }); - const errors = RULES.reduce((errors, rule) => { - const msg = rule(inputs, inputs.condaConfig); - if (msg) { - core.error(msg); - errors.push(msg); - } - return errors; - }, []); - if (errors.length) { - throw Error(`${errors.length} errors found in action inputs`); - } - return inputs; - }); -} -exports.parseInputs = parseInputs; - - -/***/ }), -/* 266 */, -/* 267 */, -/* 268 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var assocIndexOf = __webpack_require__(820); - -/** - * Sets the list cache `key` to `value`. - * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. - */ -function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - ++this.size; - data.push([key, value]); - } else { - data[index][1] = value; - } - return this; -} - -module.exports = listCacheSet; - - -/***/ }), -/* 269 */ -/***/ (function(__unusedmodule, exports, __webpack_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.updateMamba = void 0; -const fs = __importStar(__webpack_require__(747)); -const core = __importStar(__webpack_require__(470)); -const constants = __importStar(__webpack_require__(211)); -const utils = __importStar(__webpack_require__(163)); -const conda = __importStar(__webpack_require__(259)); -/** Install `mamba` in the `base` env at a specified version */ -exports.updateMamba = { - label: "update mamba", - provides: (inputs, options) => __awaiter(void 0, void 0, void 0, function* () { return inputs.mambaVersion !== "" || options.mambaInInstaller; }), - toolPackages: (inputs, options) => __awaiter(void 0, void 0, void 0, function* () { - core.warning(`Mamba support is still experimental and can result in differently solved environments!`); - return { - tools: inputs.mambaVersion !== "" - ? [utils.makeSpec("mamba", inputs.mambaVersion)] - : [], - options: Object.assign(Object.assign({}, options), { useMamba: true }), - }; - }), - postInstall: (inputs, options) => __awaiter(void 0, void 0, void 0, function* () { - if (!constants.IS_WINDOWS) { - core.info("`mamba` is already executable"); - return; - } - core.info("Creating bash wrapper for `mamba`..."); - // Add bat-less forwarder for bash users on Windows - const mambaBat = conda.condaExecutable(options).replace(/\\/g, "/"); - const contents = `bash.exe -c "exec '${mambaBat}' $*" || exit 1`; - fs.writeFileSync(mambaBat.slice(0, -4), contents); - core.info(`... wrote ${mambaBat}:\n${contents}`); - }), -}; - - -/***/ }), -/* 270 */, -/* 271 */, -/* 272 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var identity = __webpack_require__(83), - overRest = __webpack_require__(430), - setToString = __webpack_require__(70); - -/** - * The base implementation of `_.rest` which doesn't validate or coerce arguments. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - */ -function baseRest(func, start) { - return setToString(overRest(func, start, identity), func + ''); -} - -module.exports = baseRest; - - -/***/ }), -/* 273 */ -/***/ (function(module) { - -module.exports = {"amp":"&","apos":"'","gt":">","lt":"<","quot":"\""}; - -/***/ }), -/* 274 */, -/* 275 */ -/***/ (function(__unusedmodule, exports, __webpack_require__) { - -"use strict"; - - -var DOCUMENT_MODE = __webpack_require__(621).DOCUMENT_MODE; - -//Node construction -exports.createDocument = function () { - return { - nodeName: '#document', - mode: DOCUMENT_MODE.NO_QUIRKS, - childNodes: [] - }; -}; - -exports.createDocumentFragment = function () { - return { - nodeName: '#document-fragment', - childNodes: [] - }; -}; - -exports.createElement = function (tagName, namespaceURI, attrs) { - return { - nodeName: tagName, - tagName: tagName, - attrs: attrs, - namespaceURI: namespaceURI, - childNodes: [], - parentNode: null - }; -}; +exports.createElement = function (tagName, namespaceURI, attrs) { + return { + nodeName: tagName, + tagName: tagName, + attrs: attrs, + namespaceURI: namespaceURI, + childNodes: [], + parentNode: null + }; +}; exports.createCommentNode = function (data) { return { @@ -14021,1837 +15109,1447 @@ exports.isElementNode = function (node) { /* 278 */, /* 279 */, /* 280 */ -/***/ (function(module, exports) { +/***/ (function(module, __unusedexports, __webpack_require__) { -exports = module.exports = SemVer +var Symbol = __webpack_require__(498), + arrayMap = __webpack_require__(766), + isArray = __webpack_require__(806), + isSymbol = __webpack_require__(186); -var debug -/* istanbul ignore next */ -if (typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG)) { - debug = function () { - var args = Array.prototype.slice.call(arguments, 0) - args.unshift('SEMVER') - console.log.apply(console, args) +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; } -} else { - debug = function () {} + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -exports.SEMVER_SPEC_VERSION = '2.0.0' +module.exports = baseToString; -var MAX_LENGTH = 256 -var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || - /* istanbul ignore next */ 9007199254740991 -// Max safe segment length for coercion. -var MAX_SAFE_COMPONENT_LENGTH = 16 +/***/ }), +/* 281 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -// The actual regexps go on exports.re -var re = exports.re = [] -var src = exports.src = [] -var t = exports.tokens = {} -var R = 0 +var ElementType = __webpack_require__(855); -function tok (n) { - t[n] = R++ -} +var re_whitespace = /\s+/g; +var NodePrototype = __webpack_require__(798); +var ElementPrototype = __webpack_require__(402); -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. +function DomHandler(callback, options, elementCB){ + if(typeof callback === "object"){ + elementCB = options; + options = callback; + callback = null; + } else if(typeof options === "function"){ + elementCB = options; + options = defaultOpts; + } + this._callback = callback; + this._options = options || defaultOpts; + this._elementCB = elementCB; + this.dom = []; + this._done = false; + this._tagStack = []; + this._parser = this._parser || null; +} -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. +//default options +var defaultOpts = { + normalizeWhitespace: false, //Replace all whitespace with single spaces + withStartIndices: false, //Add startIndex properties to nodes + withEndIndices: false, //Add endIndex properties to nodes +}; -tok('NUMERICIDENTIFIER') -src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*' -tok('NUMERICIDENTIFIERLOOSE') -src[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+' +DomHandler.prototype.onparserinit = function(parser){ + this._parser = parser; +}; -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. +//Resets the handler back to starting state +DomHandler.prototype.onreset = function(){ + DomHandler.call(this, this._callback, this._options, this._elementCB); +}; -tok('NONNUMERICIDENTIFIER') -src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' +//Signals the handler that parsing is done +DomHandler.prototype.onend = function(){ + if(this._done) return; + this._done = true; + this._parser = null; + this._handleCallback(null); +}; -// ## Main Version -// Three dot-separated numeric identifiers. +DomHandler.prototype._handleCallback = +DomHandler.prototype.onerror = function(error){ + if(typeof this._callback === "function"){ + this._callback(error, this.dom); + } else { + if(error) throw error; + } +}; -tok('MAINVERSION') -src[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + - '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + - '(' + src[t.NUMERICIDENTIFIER] + ')' +DomHandler.prototype.onclosetag = function(){ + //if(this._tagStack.pop().name !== name) this._handleCallback(Error("Tagname didn't match!")); + + var elem = this._tagStack.pop(); -tok('MAINVERSIONLOOSE') -src[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')' + if(this._options.withEndIndices && elem){ + elem.endIndex = this._parser.endIndex; + } -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. + if(this._elementCB) this._elementCB(elem); +}; -tok('PRERELEASEIDENTIFIER') -src[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] + - '|' + src[t.NONNUMERICIDENTIFIER] + ')' +DomHandler.prototype._createDomElement = function(properties){ + if (!this._options.withDomLvl1) return properties; -tok('PRERELEASEIDENTIFIERLOOSE') -src[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] + - '|' + src[t.NONNUMERICIDENTIFIER] + ')' + var element; + if (properties.type === "tag") { + element = Object.create(ElementPrototype); + } else { + element = Object.create(NodePrototype); + } -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. + for (var key in properties) { + if (properties.hasOwnProperty(key)) { + element[key] = properties[key]; + } + } -tok('PRERELEASE') -src[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] + - '(?:\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))' + return element; +}; -tok('PRERELEASELOOSE') -src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))' +DomHandler.prototype._addDomElement = function(element){ + var parent = this._tagStack[this._tagStack.length - 1]; + var siblings = parent ? parent.children : this.dom; + var previousSibling = siblings[siblings.length - 1]; -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. + element.next = null; -tok('BUILDIDENTIFIER') -src[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+' + if(this._options.withStartIndices){ + element.startIndex = this._parser.startIndex; + } + if(this._options.withEndIndices){ + element.endIndex = this._parser.endIndex; + } -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. + if(previousSibling){ + element.prev = previousSibling; + previousSibling.next = element; + } else { + element.prev = null; + } -tok('BUILD') -src[t.BUILD] = '(?:\\+(' + src[t.BUILDIDENTIFIER] + - '(?:\\.' + src[t.BUILDIDENTIFIER] + ')*))' + siblings.push(element); + element.parent = parent || null; +}; -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. +DomHandler.prototype.onopentag = function(name, attribs){ + var properties = { + type: name === "script" ? ElementType.Script : name === "style" ? ElementType.Style : ElementType.Tag, + name: name, + attribs: attribs, + children: [] + }; -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. + var element = this._createDomElement(properties); -tok('FULL') -tok('FULLPLAIN') -src[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] + - src[t.PRERELEASE] + '?' + - src[t.BUILD] + '?' + this._addDomElement(element); -src[t.FULL] = '^' + src[t.FULLPLAIN] + '$' + this._tagStack.push(element); +}; -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -tok('LOOSEPLAIN') -src[t.LOOSEPLAIN] = '[v=\\s]*' + src[t.MAINVERSIONLOOSE] + - src[t.PRERELEASELOOSE] + '?' + - src[t.BUILD] + '?' +DomHandler.prototype.ontext = function(data){ + //the ignoreWhitespace is officially dropped, but for now, + //it's an alias for normalizeWhitespace + var normalize = this._options.normalizeWhitespace || this._options.ignoreWhitespace; -tok('LOOSE') -src[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$' + var lastTag; -tok('GTLT') -src[t.GTLT] = '((?:<|>)?=?)' + if(!this._tagStack.length && this.dom.length && (lastTag = this.dom[this.dom.length-1]).type === ElementType.Text){ + if(normalize){ + lastTag.data = (lastTag.data + data).replace(re_whitespace, " "); + } else { + lastTag.data += data; + } + } else { + if( + this._tagStack.length && + (lastTag = this._tagStack[this._tagStack.length - 1]) && + (lastTag = lastTag.children[lastTag.children.length - 1]) && + lastTag.type === ElementType.Text + ){ + if(normalize){ + lastTag.data = (lastTag.data + data).replace(re_whitespace, " "); + } else { + lastTag.data += data; + } + } else { + if(normalize){ + data = data.replace(re_whitespace, " "); + } -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -tok('XRANGEIDENTIFIERLOOSE') -src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' -tok('XRANGEIDENTIFIER') -src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\*' + var element = this._createDomElement({ + data: data, + type: ElementType.Text + }); -tok('XRANGEPLAIN') -src[t.XRANGEPLAIN] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + - '(?:' + src[t.PRERELEASE] + ')?' + - src[t.BUILD] + '?' + - ')?)?' + this._addDomElement(element); + } + } +}; -tok('XRANGEPLAINLOOSE') -src[t.XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + - '(?:' + src[t.PRERELEASELOOSE] + ')?' + - src[t.BUILD] + '?' + - ')?)?' +DomHandler.prototype.oncomment = function(data){ + var lastTag = this._tagStack[this._tagStack.length - 1]; -tok('XRANGE') -src[t.XRANGE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAIN] + '$' -tok('XRANGELOOSE') -src[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAINLOOSE] + '$' + if(lastTag && lastTag.type === ElementType.Comment){ + lastTag.data += data; + return; + } -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -tok('COERCE') -src[t.COERCE] = '(^|[^\\d])' + - '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:$|[^\\d])' -tok('COERCERTL') -re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g') + var properties = { + data: data, + type: ElementType.Comment + }; -// Tilde ranges. -// Meaning is "reasonably at or greater than" -tok('LONETILDE') -src[t.LONETILDE] = '(?:~>?)' + var element = this._createDomElement(properties); -tok('TILDETRIM') -src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+' -re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g') -var tildeTrimReplace = '$1~' + this._addDomElement(element); + this._tagStack.push(element); +}; -tok('TILDE') -src[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$' -tok('TILDELOOSE') -src[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$' +DomHandler.prototype.oncdatastart = function(){ + var properties = { + children: [{ + data: "", + type: ElementType.Text + }], + type: ElementType.CDATA + }; -// Caret ranges. -// Meaning is "at least and backwards compatible with" -tok('LONECARET') -src[t.LONECARET] = '(?:\\^)' + var element = this._createDomElement(properties); -tok('CARETTRIM') -src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+' -re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g') -var caretTrimReplace = '$1^' + this._addDomElement(element); + this._tagStack.push(element); +}; -tok('CARET') -src[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$' -tok('CARETLOOSE') -src[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$' +DomHandler.prototype.oncommentend = DomHandler.prototype.oncdataend = function(){ + this._tagStack.pop(); +}; -// A simple gt/lt/eq thing, or just "" to indicate "any version" -tok('COMPARATORLOOSE') -src[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + ')$|^$' -tok('COMPARATOR') -src[t.COMPARATOR] = '^' + src[t.GTLT] + '\\s*(' + src[t.FULLPLAIN] + ')$|^$' +DomHandler.prototype.onprocessinginstruction = function(name, data){ + var element = this._createDomElement({ + name: name, + data: data, + type: ElementType.Directive + }); -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -tok('COMPARATORTRIM') -src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] + - '\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')' + this._addDomElement(element); +}; -// this one has to use the /g flag -re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g') -var comparatorTrimReplace = '$1$2$3' +module.exports = DomHandler; -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -tok('HYPHENRANGE') -src[t.HYPHENRANGE] = '^\\s*(' + src[t.XRANGEPLAIN] + ')' + - '\\s+-\\s+' + - '(' + src[t.XRANGEPLAIN] + ')' + - '\\s*$' -tok('HYPHENRANGELOOSE') -src[t.HYPHENRANGELOOSE] = '^\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' + - '\\s+-\\s+' + - '(' + src[t.XRANGEPLAINLOOSE] + ')' + - '\\s*$' +/***/ }), +/* 282 */, +/* 283 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -// Star ranges basically just allow anything at all. -tok('STAR') -src[t.STAR] = '(<|>)?=?\\s*\\*' +const compare = __webpack_require__(874) +const compareLoose = (a, b) => compare(a, b, true) +module.exports = compareLoose -// Compile to actual regexp objects. -// All are flag-free, unless they were created above with a flag. -for (var i = 0; i < R; i++) { - debug(i, src[i]) - if (!re[i]) { - re[i] = new RegExp(src[i]) - } -} -exports.parse = parse -function parse (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } +/***/ }), +/* 284 */, +/* 285 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { - if (version instanceof SemVer) { - return version - } +"use strict"; - if (typeof version !== 'string') { - return null - } +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ensureExplicit = void 0; +const conda = __importStar(__webpack_require__(506)); +const outputs = __importStar(__webpack_require__(405)); +/** + * Install an environment from an explicit file generated `conda list --explicit` + * or `conda-lock` + */ +exports.ensureExplicit = { + label: "conda create (from explicit)", + provides: (inputs, options) => __awaiter(void 0, void 0, void 0, function* () { var _a, _b; return !!((_b = (_a = options.envSpec) === null || _a === void 0 ? void 0 : _a.explicit) === null || _b === void 0 ? void 0 : _b.length); }), + condaArgs: (inputs, options) => __awaiter(void 0, void 0, void 0, function* () { + var _c; + if (inputs.pythonVersion) { + throw Error(`'python-version: ${inputs.pythonVersion}' is incompatible with an explicit 'environmentFile`); + } + if ((_c = options.envSpec) === null || _c === void 0 ? void 0 : _c.explicit) { + outputs.setEnvironmentFileOutputs(inputs.environmentFile, options.envSpec.explicit); + } + return [ + "create", + ...conda.envCommandFlag(inputs), + "--file", + inputs.environmentFile, + ]; + }), +}; - if (version.length > MAX_LENGTH) { - return null - } - var r = options.loose ? re[t.LOOSE] : re[t.FULL] - if (!r.test(version)) { - return null - } +/***/ }), +/* 286 */, +/* 287 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - try { - return new SemVer(version, options) - } catch (er) { - return null - } -} +"use strict"; +// Ported from https://github.com/mafintosh/end-of-stream with +// permission from the author, Mathias Buus (@mafintosh). -exports.valid = valid -function valid (version, options) { - var v = parse(version, options) - return v ? v.version : null -} -exports.clean = clean -function clean (version, options) { - var s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} +var ERR_STREAM_PREMATURE_CLOSE = __webpack_require__(563).codes.ERR_STREAM_PREMATURE_CLOSE; -exports.SemVer = SemVer +function once(callback) { + var called = false; + return function () { + if (called) return; + called = true; -function SemVer (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - if (version instanceof SemVer) { - if (version.loose === options.loose) { - return version - } else { - version = version.version + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; } - } else if (typeof version !== 'string') { - throw new TypeError('Invalid Version: ' + version) - } - if (version.length > MAX_LENGTH) { - throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') - } + callback.apply(this, args); + }; +} - if (!(this instanceof SemVer)) { - return new SemVer(version, options) - } +function noop() {} - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose +function isRequest(stream) { + return stream.setHeader && typeof stream.abort === 'function'; +} - var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) +function eos(stream, opts, callback) { + if (typeof opts === 'function') return eos(stream, null, opts); + if (!opts) opts = {}; + callback = once(callback || noop); + var readable = opts.readable || opts.readable !== false && stream.readable; + var writable = opts.writable || opts.writable !== false && stream.writable; - if (!m) { - throw new TypeError('Invalid Version: ' + version) - } + var onlegacyfinish = function onlegacyfinish() { + if (!stream.writable) onfinish(); + }; - this.raw = version + var writableEnded = stream._writableState && stream._writableState.finished; - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] + var onfinish = function onfinish() { + writable = false; + writableEnded = true; + if (!readable) callback.call(stream); + }; - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } + var readableEnded = stream._readableState && stream._readableState.endEmitted; - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') - } + var onend = function onend() { + readable = false; + readableEnded = true; + if (!writable) callback.call(stream); + }; - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') - } + var onerror = function onerror(err) { + callback.call(stream, err); + }; - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] - } else { - this.prerelease = m[4].split('.').map(function (id) { - if (/^[0-9]+$/.test(id)) { - var num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }) - } + var onclose = function onclose() { + var err; - this.build = m[5] ? m[5].split('.') : [] - this.format() -} + if (readable && !readableEnded) { + if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); + return callback.call(stream, err); + } -SemVer.prototype.format = function () { - this.version = this.major + '.' + this.minor + '.' + this.patch - if (this.prerelease.length) { - this.version += '-' + this.prerelease.join('.') - } - return this.version -} + if (writable && !writableEnded) { + if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); + return callback.call(stream, err); + } + }; -SemVer.prototype.toString = function () { - return this.version -} + var onrequest = function onrequest() { + stream.req.on('finish', onfinish); + }; -SemVer.prototype.compare = function (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) + if (isRequest(stream)) { + stream.on('complete', onfinish); + stream.on('abort', onclose); + if (stream.req) onrequest();else stream.on('request', onrequest); + } else if (writable && !stream._writableState) { + // legacy streams + stream.on('end', onlegacyfinish); + stream.on('close', onlegacyfinish); } - return this.compareMain(other) || this.comparePre(other) + stream.on('end', onend); + stream.on('finish', onfinish); + if (opts.error !== false) stream.on('error', onerror); + stream.on('close', onclose); + return function () { + stream.removeListener('complete', onfinish); + stream.removeListener('abort', onclose); + stream.removeListener('request', onrequest); + if (stream.req) stream.req.removeListener('finish', onfinish); + stream.removeListener('end', onlegacyfinish); + stream.removeListener('close', onlegacyfinish); + stream.removeListener('finish', onfinish); + stream.removeListener('end', onend); + stream.removeListener('error', onerror); + stream.removeListener('close', onclose); + }; } -SemVer.prototype.compareMain = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) -} +module.exports = eos; -SemVer.prototype.comparePre = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } +/***/ }), +/* 288 */ +/***/ (function(module) { - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); - var i = 0 - do { - var a = this.prerelease[i] - var b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; } - } while (++i) -} - -SemVer.prototype.compareBuild = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) } - - var i = 0 - do { - var a = this.build[i] - var b = other.build[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) + return -1; } -// preminor will bump the version up to the next minor release, and immediately -// down to pre-release. premajor and prepatch work the same way. -SemVer.prototype.inc = function (release, identifier) { - switch (release) { - case 'premajor': - this.prerelease.length = 0 - this.patch = 0 - this.minor = 0 - this.major++ - this.inc('pre', identifier) - break - case 'preminor': - this.prerelease.length = 0 - this.patch = 0 - this.minor++ - this.inc('pre', identifier) - break - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch', identifier) - this.inc('pre', identifier) - break - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier) - } - this.inc('pre', identifier) - break +module.exports = baseFindIndex; - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if (this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0) { - this.major++ - } - this.minor = 0 - this.patch = 0 - this.prerelease = [] - break - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++ - } - this.patch = 0 - this.prerelease = [] - break - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) { - this.patch++ - } - this.prerelease = [] - break - // This probably shouldn't be used publicly. - // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. - case 'pre': - if (this.prerelease.length === 0) { - this.prerelease = [0] - } else { - var i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 - } - } - if (i === -1) { - // didn't increment anything - this.prerelease.push(0) - } - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - if (this.prerelease[0] === identifier) { - if (isNaN(this.prerelease[1])) { - this.prerelease = [identifier, 0] - } - } else { - this.prerelease = [identifier, 0] - } - } - break - default: - throw new Error('invalid increment argument: ' + release) - } - this.format() - this.raw = this.version - return this -} +/***/ }), +/* 289 */, +/* 290 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -exports.inc = inc -function inc (version, release, loose, identifier) { - if (typeof (loose) === 'string') { - identifier = loose - loose = undefined - } +var isArray = __webpack_require__(806), + isSymbol = __webpack_require__(186); - try { - return new SemVer(version, loose).inc(release, identifier).version - } catch (er) { - return null - } -} +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; -exports.diff = diff -function diff (version1, version2) { - if (eq(version1, version2)) { - return null - } else { - var v1 = parse(version1) - var v2 = parse(version2) - var prefix = '' - if (v1.prerelease.length || v2.prerelease.length) { - prefix = 'pre' - var defaultResult = 'prerelease' - } - for (var key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return prefix + key - } - } - } - return defaultResult // may be undefined +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); } -exports.compareIdentifiers = compareIdentifiers +module.exports = isKey; -var numeric = /^[0-9]+$/ -function compareIdentifiers (a, b) { - var anum = numeric.test(a) - var bnum = numeric.test(b) - if (anum && bnum) { - a = +a - b = +b - } +/***/ }), +/* 291 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 -} +var copyArray = __webpack_require__(239), + isIndex = __webpack_require__(160); -exports.rcompareIdentifiers = rcompareIdentifiers -function rcompareIdentifiers (a, b) { - return compareIdentifiers(b, a) -} +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; -exports.major = major -function major (a, loose) { - return new SemVer(a, loose).major -} +/** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ +function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = copyArray(array); -exports.minor = minor -function minor (a, loose) { - return new SemVer(a, loose).minor + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; } -exports.patch = patch -function patch (a, loose) { - return new SemVer(a, loose).patch -} +module.exports = reorder; -exports.compare = compare -function compare (a, b, loose) { - return new SemVer(a, loose).compare(new SemVer(b, loose)) -} -exports.compareLoose = compareLoose -function compareLoose (a, b) { - return compare(a, b, true) -} +/***/ }), +/* 292 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -exports.compareBuild = compareBuild -function compareBuild (a, b, loose) { - var versionA = new SemVer(a, loose) - var versionB = new SemVer(b, loose) - return versionA.compare(versionB) || versionA.compareBuild(versionB) -} +var constant = __webpack_require__(817), + defineProperty = __webpack_require__(382), + identity = __webpack_require__(83); -exports.rcompare = rcompare -function rcompare (a, b, loose) { - return compare(b, a, loose) -} +/** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); +}; -exports.sort = sort -function sort (list, loose) { - return list.sort(function (a, b) { - return exports.compareBuild(a, b, loose) - }) -} +module.exports = baseSetToString; -exports.rsort = rsort -function rsort (list, loose) { - return list.sort(function (a, b) { - return exports.compareBuild(b, a, loose) - }) -} -exports.gt = gt -function gt (a, b, loose) { - return compare(a, b, loose) > 0 -} +/***/ }), +/* 293 */ +/***/ (function(module) { -exports.lt = lt -function lt (a, b, loose) { - return compare(a, b, loose) < 0 -} +module.exports = require("buffer"); -exports.eq = eq -function eq (a, b, loose) { - return compare(a, b, loose) === 0 -} +/***/ }), +/* 294 */, +/* 295 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -exports.neq = neq -function neq (a, b, loose) { - return compare(a, b, loose) !== 0 -} +var baseMatches = __webpack_require__(974), + baseMatchesProperty = __webpack_require__(728), + identity = __webpack_require__(83), + isArray = __webpack_require__(806), + property = __webpack_require__(927); -exports.gte = gte -function gte (a, b, loose) { - return compare(a, b, loose) >= 0 +/** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ +function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) + ? baseMatchesProperty(value[0], value[1]) + : baseMatches(value); + } + return property(value); } -exports.lte = lte -function lte (a, b, loose) { - return compare(a, b, loose) <= 0 -} +module.exports = baseIteratee; -exports.cmp = cmp -function cmp (a, op, b, loose) { - switch (op) { - case '===': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a === b - case '!==': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a !== b - - case '': - case '=': - case '==': - return eq(a, b, loose) - - case '!=': - return neq(a, b, loose) - - case '>': - return gt(a, b, loose) +/***/ }), +/* 296 */, +/* 297 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - case '>=': - return gte(a, b, loose) +var arrayMap = __webpack_require__(766), + baseIteratee = __webpack_require__(295), + baseMap = __webpack_require__(852), + isArray = __webpack_require__(806); - case '<': - return lt(a, b, loose) +/** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ +function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, baseIteratee(iteratee, 3)); +} - case '<=': - return lte(a, b, loose) +module.exports = map; - default: - throw new TypeError('Invalid operator: ' + op) - } -} -exports.Comparator = Comparator -function Comparator (comp, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } +/***/ }), +/* 298 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp - } else { - comp = comp.value - } - } +const compare = __webpack_require__(874) +const eq = (a, b, loose) => compare(a, b, loose) === 0 +module.exports = eq - if (!(this instanceof Comparator)) { - return new Comparator(comp, options) - } - debug('comparator', comp, options) - this.options = options - this.loose = !!options.loose - this.parse(comp) +/***/ }), +/* 299 */, +/* 300 */, +/* 301 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - if (this.semver === ANY) { - this.value = '' - } else { - this.value = this.operator + this.semver.version - } +var isArrayLike = __webpack_require__(146), + isObjectLike = __webpack_require__(337); - debug('comp', this) +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); } -var ANY = {} -Comparator.prototype.parse = function (comp) { - var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] - var m = comp.match(r) +module.exports = isArrayLikeObject; - if (!m) { - throw new TypeError('Invalid comparator: ' + comp) - } - this.operator = m[1] !== undefined ? m[1] : '' - if (this.operator === '=') { - this.operator = '' - } +/***/ }), +/* 302 */, +/* 303 */, +/* 304 */ +/***/ (function(module) { - // if it literally is just '>' or '' then allow anything. - if (!m[2]) { - this.semver = ANY - } else { - this.semver = new SemVer(m[2], this.options.loose) - } -} +module.exports = require("string_decoder"); -Comparator.prototype.toString = function () { - return this.value -} +/***/ }), +/* 305 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -Comparator.prototype.test = function (version) { - debug('Comparator.test', version, this.options.loose) +var assignMergeValue = __webpack_require__(110), + cloneBuffer = __webpack_require__(920), + cloneTypedArray = __webpack_require__(422), + copyArray = __webpack_require__(239), + initCloneObject = __webpack_require__(66), + isArguments = __webpack_require__(460), + isArray = __webpack_require__(806), + isArrayLikeObject = __webpack_require__(301), + isBuffer = __webpack_require__(546), + isFunction = __webpack_require__(10), + isObject = __webpack_require__(988), + isPlainObject = __webpack_require__(585), + isTypedArray = __webpack_require__(850), + safeGet = __webpack_require__(807), + toPlainObject = __webpack_require__(808); - if (this.semver === ANY || version === ANY) { - return true - } +/** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), + stacked = stack.get(srcValue); - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false - } + if (stacked) { + assignMergeValue(object, key, stacked); + return; } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; - return cmp(version, this.operator, this.semver, this.options) -} + var isCommon = newValue === undefined; -Comparator.prototype.intersects = function (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required') - } + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } } - } - - var rangeTmp - - if (this.operator === '') { - if (this.value === '') { - return true + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || isFunction(objValue)) { + newValue = initCloneObject(srcValue); + } } - rangeTmp = new Range(comp.value, options) - return satisfies(this.value, rangeTmp, options) - } else if (comp.operator === '') { - if (comp.value === '') { - return true + else { + isCommon = false; } - rangeTmp = new Range(this.value, options) - return satisfies(comp.semver, rangeTmp, options) } - - var sameDirectionIncreasing = - (this.operator === '>=' || this.operator === '>') && - (comp.operator === '>=' || comp.operator === '>') - var sameDirectionDecreasing = - (this.operator === '<=' || this.operator === '<') && - (comp.operator === '<=' || comp.operator === '<') - var sameSemVer = this.semver.version === comp.semver.version - var differentDirectionsInclusive = - (this.operator === '>=' || this.operator === '<=') && - (comp.operator === '>=' || comp.operator === '<=') - var oppositeDirectionsLessThan = - cmp(this.semver, '<', comp.semver, options) && - ((this.operator === '>=' || this.operator === '>') && - (comp.operator === '<=' || comp.operator === '<')) - var oppositeDirectionsGreaterThan = - cmp(this.semver, '>', comp.semver, options) && - ((this.operator === '<=' || this.operator === '<') && - (comp.operator === '>=' || comp.operator === '>')) - - return sameDirectionIncreasing || sameDirectionDecreasing || - (sameSemVer && differentDirectionsInclusive) || - oppositeDirectionsLessThan || oppositeDirectionsGreaterThan + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); } -exports.Range = Range -function Range (range, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } +module.exports = baseMergeDeep; - if (range instanceof Range) { - if (range.loose === !!options.loose && - range.includePrerelease === !!options.includePrerelease) { - return range - } else { - return new Range(range.raw, options) - } - } - if (range instanceof Comparator) { - return new Range(range.value, options) - } +/***/ }), +/* 306 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { - if (!(this instanceof Range)) { - return new Range(range, options) - } +var inverseXML = getInverseObj(__webpack_require__(273)), + xmlReplacer = getInverseReplacer(inverseXML); - this.options = options - this.loose = !!options.loose - this.includePrerelease = !!options.includePrerelease +exports.XML = getInverse(inverseXML, xmlReplacer); - // First, split based on boolean or || - this.raw = range - this.set = range.split(/\s*\|\|\s*/).map(function (range) { - return this.parseRange(range.trim()) - }, this).filter(function (c) { - // throw out any that are not relevant for whatever reason - return c.length - }) +var inverseHTML = getInverseObj(__webpack_require__(252)), + htmlReplacer = getInverseReplacer(inverseHTML); - if (!this.set.length) { - throw new TypeError('Invalid SemVer Range: ' + range) - } +exports.HTML = getInverse(inverseHTML, htmlReplacer); - this.format() +function getInverseObj(obj) { + return Object.keys(obj) + .sort() + .reduce(function(inverse, name) { + inverse[obj[name]] = "&" + name + ";"; + return inverse; + }, {}); } -Range.prototype.format = function () { - this.range = this.set.map(function (comps) { - return comps.join(' ').trim() - }).join('||').trim() - return this.range -} +function getInverseReplacer(inverse) { + var single = [], + multiple = []; -Range.prototype.toString = function () { - return this.range -} + Object.keys(inverse).forEach(function(k) { + if (k.length === 1) { + single.push("\\" + k); + } else { + multiple.push(k); + } + }); -Range.prototype.parseRange = function (range) { - var loose = this.options.loose - range = range.trim() - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] - range = range.replace(hr, hyphenReplace) - debug('hyphen replace', range) - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range, re[t.COMPARATORTRIM]) + //TODO add ranges + multiple.unshift("[" + single.join("") + "]"); - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[t.TILDETRIM], tildeTrimReplace) + return new RegExp(multiple.join("|"), "g"); +} - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[t.CARETTRIM], caretTrimReplace) +var re_nonASCII = /[^\0-\x7F]/g, + re_astralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; - // normalize spaces - range = range.split(/\s+/).join(' ') +function singleCharReplacer(c) { + return ( + "&#x" + + c + .charCodeAt(0) + .toString(16) + .toUpperCase() + + ";" + ); +} - // At this point, the range is completely trimmed and - // ready to be split into comparators. +function astralReplacer(c) { + // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + var high = c.charCodeAt(0); + var low = c.charCodeAt(1); + var codePoint = (high - 0xd800) * 0x400 + low - 0xdc00 + 0x10000; + return "&#x" + codePoint.toString(16).toUpperCase() + ";"; +} - var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] - var set = range.split(' ').map(function (comp) { - return parseComparator(comp, this.options) - }, this).join(' ').split(/\s+/) - if (this.options.loose) { - // in loose mode, throw out any that are not valid comparators - set = set.filter(function (comp) { - return !!comp.match(compRe) - }) - } - set = set.map(function (comp) { - return new Comparator(comp, this.options) - }, this) +function getInverse(inverse, re) { + function func(name) { + return inverse[name]; + } - return set + return function(data) { + return data + .replace(re, func) + .replace(re_astralSymbols, astralReplacer) + .replace(re_nonASCII, singleCharReplacer); + }; } -Range.prototype.intersects = function (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required') - } +var re_xmlChars = getInverseReplacer(inverseXML); - return this.set.some(function (thisComparators) { - return ( - isSatisfiable(thisComparators, options) && - range.set.some(function (rangeComparators) { - return ( - isSatisfiable(rangeComparators, options) && - thisComparators.every(function (thisComparator) { - return rangeComparators.every(function (rangeComparator) { - return thisComparator.intersects(rangeComparator, options) - }) - }) - ) - }) - ) - }) +function escapeXML(data) { + return data + .replace(re_xmlChars, singleCharReplacer) + .replace(re_astralSymbols, astralReplacer) + .replace(re_nonASCII, singleCharReplacer); } -// take a set of comparators and determine whether there -// exists a version which can satisfy it -function isSatisfiable (comparators, options) { - var result = true - var remainingComparators = comparators.slice() - var testComparator = remainingComparators.pop() +exports.escape = escapeXML; - while (result && remainingComparators.length) { - result = remainingComparators.every(function (otherComparator) { - return testComparator.intersects(otherComparator, options) - }) - testComparator = remainingComparators.pop() - } +/***/ }), +/* 307 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { - return result -} +var encode = __webpack_require__(306), + decode = __webpack_require__(253); -// Mostly just for testing and legacy API reasons -exports.toComparators = toComparators -function toComparators (range, options) { - return new Range(range, options).set.map(function (comp) { - return comp.map(function (c) { - return c.value - }).join(' ').trim().split(' ') - }) -} +exports.decode = function(data, level) { + return (!level || level <= 0 ? decode.XML : decode.HTML)(data); +}; -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -function parseComparator (comp, options) { - debug('comp', comp, options) - comp = replaceCarets(comp, options) - debug('caret', comp) - comp = replaceTildes(comp, options) - debug('tildes', comp) - comp = replaceXRanges(comp, options) - debug('xrange', comp) - comp = replaceStars(comp, options) - debug('stars', comp) - return comp -} +exports.decodeStrict = function(data, level) { + return (!level || level <= 0 ? decode.XML : decode.HTMLStrict)(data); +}; -function isX (id) { - return !id || id.toLowerCase() === 'x' || id === '*' -} +exports.encode = function(data, level) { + return (!level || level <= 0 ? encode.XML : encode.HTML)(data); +}; -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 -function replaceTildes (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceTilde(comp, options) - }).join(' ') -} +exports.encodeXML = encode.XML; -function replaceTilde (comp, options) { - var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] - return comp.replace(r, function (_, M, m, p, pr) { - debug('tilde', comp, _, M, m, p, pr) - var ret +exports.encodeHTML4 = exports.encodeHTML5 = exports.encodeHTML = encode.HTML; - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0 - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else if (pr) { - debug('replaceTilde pr', pr) - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } else { - // ~1.2.3 == >=1.2.3 <1.3.0 - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } +exports.decodeXML = exports.decodeXMLStrict = decode.XML; - debug('tilde return', ret) - return ret - }) -} +exports.decodeHTML4 = exports.decodeHTML5 = exports.decodeHTML = decode.HTML; -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 -// ^1.2.3 --> >=1.2.3 <2.0.0 -// ^1.2.0 --> >=1.2.0 <2.0.0 -function replaceCarets (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceCaret(comp, options) - }).join(' ') -} +exports.decodeHTML4Strict = exports.decodeHTML5Strict = exports.decodeHTMLStrict = decode.HTMLStrict; -function replaceCaret (comp, options) { - debug('caret', comp, options) - var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] - return comp.replace(r, function (_, M, m, p, pr) { - debug('caret', comp, _, M, m, p, pr) - var ret +exports.escape = encode.escape; - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - if (M === '0') { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else { - ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' - } - } else if (pr) { - debug('replaceCaret pr', pr) - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + (+M + 1) + '.0.0' - } - } else { - debug('no pr') - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + (+M + 1) + '.0.0' - } - } - debug('caret return', ret) - return ret - }) -} +/***/ }), +/* 308 */, +/* 309 */, +/* 310 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -function replaceXRanges (comp, options) { - debug('replaceXRanges', comp, options) - return comp.split(/\s+/).map(function (comp) { - return replaceXRange(comp, options) - }).join(' ') +const Range = __webpack_require__(124) +const satisfies = (version, range, options) => { + try { + range = new Range(range, options) + } catch (er) { + return false + } + return range.test(version) } +module.exports = satisfies -function replaceXRange (comp, options) { - comp = comp.trim() - var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] - return comp.replace(r, function (ret, gtlt, M, m, p, pr) { - debug('xRange', comp, ret, gtlt, M, m, p, pr) - var xM = isX(M) - var xm = xM || isX(m) - var xp = xm || isX(p) - var anyX = xp - if (gtlt === '=' && anyX) { - gtlt = '' - } +/***/ }), +/* 311 */, +/* 312 */ +/***/ (function(module) { - // if we're including prereleases in the match, then we need - // to fix this to -0, the lowest possible prerelease value - pr = options.includePrerelease ? '-0' : '' +module.exports = { + trueFunc: function trueFunc(){ + return true; + }, + falseFunc: function falseFunc(){ + return false; + } +}; - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0-0' - } else { - // nothing is forbidden - ret = '*' - } - } else if (gtlt && anyX) { - // we know patch is an x, because we have any x at all. - // replace X with 0 - if (xm) { - m = 0 - } - p = 0 +/***/ }), +/* 313 */, +/* 314 */, +/* 315 */ +/***/ (function(module) { - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - // >1.2.3 => >= 1.2.4 - gtlt = '>=' - if (xm) { - M = +M + 1 - m = 0 - p = 0 - } else { - m = +m + 1 - p = 0 - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<' - if (xm) { - M = +M + 1 - } else { - m = +m + 1 +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true } - } - - ret = gtlt + M + '.' + m + '.' + p + pr - } else if (xm) { - ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr - } else if (xp) { - ret = '>=' + M + '.' + m + '.0' + pr + - ' <' + M + '.' + (+m + 1) + '.0' + pr + }) + } + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor } + } +} - debug('xRange return', ret) - return ret - }) -} +/***/ }), +/* 316 */ +/***/ (function(module) { -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -function replaceStars (comp, options) { - debug('replaceStars', comp, options) - // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[t.STAR], '') -} +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; -// This function is passed to string.replace(re[t.HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0 -function hyphenReplace ($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) { - if (isX(fM)) { - from = '' - } else if (isX(fm)) { - from = '>=' + fM + '.0.0' - } else if (isX(fp)) { - from = '>=' + fM + '.' + fm + '.0' - } else { - from = '>=' + from +/** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ +function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); } + return function() { + var args = arguments; + switch (args.length) { + case 0: return !predicate.call(this); + case 1: return !predicate.call(this, args[0]); + case 2: return !predicate.call(this, args[0], args[1]); + case 3: return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); + }; +} - if (isX(tM)) { - to = '' - } else if (isX(tm)) { - to = '<' + (+tM + 1) + '.0.0' - } else if (isX(tp)) { - to = '<' + tM + '.' + (+tm + 1) + '.0' - } else if (tpr) { - to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr - } else { - to = '<=' + to - } +module.exports = negate; - return (from + ' ' + to).trim() -} -// if ANY of the sets match ALL of its comparators, then pass -Range.prototype.test = function (version) { - if (!version) { - return false - } +/***/ }), +/* 317 */, +/* 318 */, +/* 319 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false - } - } +var baseIsNative = __webpack_require__(248), + getValue = __webpack_require__(879); - for (var i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true - } - } - return false +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; } -function testSet (set, version, options) { - for (var i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false - } - } +module.exports = getNative; - if (version.prerelease.length && !options.includePrerelease) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (i = 0; i < set.length; i++) { - debug(set[i].semver) - if (set[i].semver === ANY) { - continue - } - if (set[i].semver.prerelease.length > 0) { - var allowed = set[i].semver - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) { - return true - } - } - } +/***/ }), +/* 320 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - // Version has a -pre, but it's not one of the ones we like. - return false - } +var basePick = __webpack_require__(362), + flatRest = __webpack_require__(521); - return true -} +/** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ +var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); +}); -exports.satisfies = satisfies -function satisfies (version, range, options) { - try { - range = new Range(range, options) - } catch (er) { - return false - } - return range.test(version) -} +module.exports = pick; -exports.maxSatisfying = maxSatisfying -function maxSatisfying (versions, range, options) { - var max = null - var maxSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { - // compare(max, v, true) - max = v - maxSV = new SemVer(max, options) - } - } - }) - return max -} -exports.minSatisfying = minSatisfying -function minSatisfying (versions, range, options) { - var min = null - var minSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { - // compare(min, v, true) - min = v - minSV = new SemVer(min, options) - } +/***/ }), +/* 321 */, +/* 322 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var baseCreate = __webpack_require__(782), + isObject = __webpack_require__(988); + +/** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ +function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); } - }) - return min + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; } -exports.minVersion = minVersion -function minVersion (range, loose) { - range = new Range(range, loose) +module.exports = createCtor; - var minver = new SemVer('0.0.0') - if (range.test(minver)) { - return minver - } - minver = new SemVer('0.0.0-0') - if (range.test(minver)) { - return minver - } - - minver = null - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - comparators.forEach(function (comparator) { - // Clone to avoid manipulating the comparator's semver object. - var compver = new SemVer(comparator.semver.version) - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++ - } else { - compver.prerelease.push(0) - } - compver.raw = compver.format() - /* fallthrough */ - case '': - case '>=': - if (!minver || gt(minver, compver)) { - minver = compver - } - break - case '<': - case '<=': - /* Ignore maximum versions */ - break - /* istanbul ignore next */ - default: - throw new Error('Unexpected operation: ' + comparator.operator) - } - }) - } - - if (minver && range.test(minver)) { - return minver - } - - return null -} - -exports.validRange = validRange -function validRange (range, options) { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, options).range || '*' - } catch (er) { - return null - } -} +/***/ }), +/* 323 */ +/***/ (function(module, __unusedexports, __webpack_require__) { +const outside = __webpack_require__(462) // Determine if version is less than all the versions possible in the range -exports.ltr = ltr -function ltr (version, range, options) { - return outside(version, range, '<', options) -} - -// Determine if version is greater than all the versions possible in the range. -exports.gtr = gtr -function gtr (version, range, options) { - return outside(version, range, '>', options) -} +const ltr = (version, range, options) => outside(version, range, '<', options) +module.exports = ltr -exports.outside = outside -function outside (version, range, hilo, options) { - version = new SemVer(version, options) - range = new Range(range, options) - - var gtfn, ltefn, ltfn, comp, ecomp - switch (hilo) { - case '>': - gtfn = gt - ltefn = lte - ltfn = lt - comp = '>' - ecomp = '>=' - break - case '<': - gtfn = lt - ltefn = gte - ltfn = gt - comp = '<' - ecomp = '<=' - break - default: - throw new TypeError('Must provide a hilo val of "<" or ">"') - } - // If it satisifes the range it is not outside - if (satisfies(version, range, options)) { - return false - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. +/***/ }), +/* 324 */, +/* 325 */, +/* 326 */, +/* 327 */, +/* 328 */, +/* 329 */, +/* 330 */, +/* 331 */, +/* 332 */, +/* 333 */, +/* 334 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] +"use strict"; - var high = null - var low = null - comparators.forEach(function (comparator) { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator - low = low || comparator - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator - } - }) +var DOCUMENT_MODE = __webpack_require__(621).DOCUMENT_MODE; - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false - } +//Const +var VALID_DOCTYPE_NAME = 'html', + QUIRKS_MODE_SYSTEM_ID = 'http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd', + QUIRKS_MODE_PUBLIC_ID_PREFIXES = [ + '+//silmaril//dtd html pro v0r11 19970101//en', + '-//advasoft ltd//dtd html 3.0 aswedit + extensions//en', + '-//as//dtd html 3.0 aswedit + extensions//en', + '-//ietf//dtd html 2.0 level 1//en', + '-//ietf//dtd html 2.0 level 2//en', + '-//ietf//dtd html 2.0 strict level 1//en', + '-//ietf//dtd html 2.0 strict level 2//en', + '-//ietf//dtd html 2.0 strict//en', + '-//ietf//dtd html 2.0//en', + '-//ietf//dtd html 2.1e//en', + '-//ietf//dtd html 3.0//en', + '-//ietf//dtd html 3.0//en//', + '-//ietf//dtd html 3.2 final//en', + '-//ietf//dtd html 3.2//en', + '-//ietf//dtd html 3//en', + '-//ietf//dtd html level 0//en', + '-//ietf//dtd html level 0//en//2.0', + '-//ietf//dtd html level 1//en', + '-//ietf//dtd html level 1//en//2.0', + '-//ietf//dtd html level 2//en', + '-//ietf//dtd html level 2//en//2.0', + '-//ietf//dtd html level 3//en', + '-//ietf//dtd html level 3//en//3.0', + '-//ietf//dtd html strict level 0//en', + '-//ietf//dtd html strict level 0//en//2.0', + '-//ietf//dtd html strict level 1//en', + '-//ietf//dtd html strict level 1//en//2.0', + '-//ietf//dtd html strict level 2//en', + '-//ietf//dtd html strict level 2//en//2.0', + '-//ietf//dtd html strict level 3//en', + '-//ietf//dtd html strict level 3//en//3.0', + '-//ietf//dtd html strict//en', + '-//ietf//dtd html strict//en//2.0', + '-//ietf//dtd html strict//en//3.0', + '-//ietf//dtd html//en', + '-//ietf//dtd html//en//2.0', + '-//ietf//dtd html//en//3.0', + '-//metrius//dtd metrius presentational//en', + '-//microsoft//dtd internet explorer 2.0 html strict//en', + '-//microsoft//dtd internet explorer 2.0 html//en', + '-//microsoft//dtd internet explorer 2.0 tables//en', + '-//microsoft//dtd internet explorer 3.0 html strict//en', + '-//microsoft//dtd internet explorer 3.0 html//en', + '-//microsoft//dtd internet explorer 3.0 tables//en', + '-//netscape comm. corp.//dtd html//en', + '-//netscape comm. corp.//dtd strict html//en', + '-//o\'reilly and associates//dtd html 2.0//en', + '-//o\'reilly and associates//dtd html extended 1.0//en', + '-//spyglass//dtd html 2.0 extended//en', + '-//sq//dtd html 2.0 hotmetal + extensions//en', + '-//sun microsystems corp.//dtd hotjava html//en', + '-//sun microsystems corp.//dtd hotjava strict html//en', + '-//w3c//dtd html 3 1995-03-24//en', + '-//w3c//dtd html 3.2 draft//en', + '-//w3c//dtd html 3.2 final//en', + '-//w3c//dtd html 3.2//en', + '-//w3c//dtd html 3.2s draft//en', + '-//w3c//dtd html 4.0 frameset//en', + '-//w3c//dtd html 4.0 transitional//en', + '-//w3c//dtd html experimental 19960712//en', + '-//w3c//dtd html experimental 970421//en', + '-//w3c//dtd w3 html//en', + '-//w3o//dtd w3 html 3.0//en', + '-//w3o//dtd w3 html 3.0//en//', + '-//webtechs//dtd mozilla html 2.0//en', + '-//webtechs//dtd mozilla html//en' + ], + QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES = QUIRKS_MODE_PUBLIC_ID_PREFIXES.concat([ + '-//w3c//dtd html 4.01 frameset//', + '-//w3c//dtd html 4.01 transitional//' + ]), + QUIRKS_MODE_PUBLIC_IDS = [ + '-//w3o//dtd w3 html strict 3.0//en//', + '-/w3c/dtd html 4.0 transitional/en', + 'html' + ], + LIMITED_QUIRKS_PUBLIC_ID_PREFIXES = [ + '-//W3C//DTD XHTML 1.0 Frameset//', + '-//W3C//DTD XHTML 1.0 Transitional//' + ], + LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES = LIMITED_QUIRKS_PUBLIC_ID_PREFIXES.concat([ + '-//W3C//DTD HTML 4.01 Frameset//', + '-//W3C//DTD HTML 4.01 Transitional//' + ]); - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false - } - } - return true -} -exports.prerelease = prerelease -function prerelease (version, options) { - var parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} +//Utils +function enquoteDoctypeId(id) { + var quote = id.indexOf('"') !== -1 ? '\'' : '"'; -exports.intersects = intersects -function intersects (r1, r2, options) { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2) + return quote + id + quote; } -exports.coerce = coerce -function coerce (version, options) { - if (version instanceof SemVer) { - return version - } - - if (typeof version === 'number') { - version = String(version) - } - - if (typeof version !== 'string') { - return null - } - - options = options || {} - - var match = null - if (!options.rtl) { - match = version.match(re[t.COERCE]) - } else { - // Find the right-most coercible string that does not share - // a terminus with a more left-ward coercible string. - // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' - // - // Walk through the string checking with a /g regexp - // Manually set the index so as to pick up overlapping matches. - // Stop when we get a match that ends at the string end, since no - // coercible string can be more right-ward without the same terminus. - var next - while ((next = re[t.COERCERTL].exec(version)) && - (!match || match.index + match[0].length !== version.length) - ) { - if (!match || - next.index + next[0].length !== match.index + match[0].length) { - match = next - } - re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length +function hasPrefix(publicId, prefixes) { + for (var i = 0; i < prefixes.length; i++) { + if (publicId.indexOf(prefixes[i]) === 0) + return true; } - // leave it in a clean state - re[t.COERCERTL].lastIndex = -1 - } - if (match === null) { - return null - } - - return parse(match[2] + - '.' + (match[3] || '0') + - '.' + (match[4] || '0'), options) + return false; } -/***/ }), -/* 281 */ -/***/ (function(module, __unusedexports, __webpack_require__) { +//API +exports.getDocumentMode = function (name, publicId, systemId) { + if (name !== VALID_DOCTYPE_NAME) + return DOCUMENT_MODE.QUIRKS; -var ElementType = __webpack_require__(855); + if (systemId && systemId.toLowerCase() === QUIRKS_MODE_SYSTEM_ID) + return DOCUMENT_MODE.QUIRKS; -var re_whitespace = /\s+/g; -var NodePrototype = __webpack_require__(798); -var ElementPrototype = __webpack_require__(402); + if (publicId !== null) { + publicId = publicId.toLowerCase(); -function DomHandler(callback, options, elementCB){ - if(typeof callback === "object"){ - elementCB = options; - options = callback; - callback = null; - } else if(typeof options === "function"){ - elementCB = options; - options = defaultOpts; - } - this._callback = callback; - this._options = options || defaultOpts; - this._elementCB = elementCB; - this.dom = []; - this._done = false; - this._tagStack = []; - this._parser = this._parser || null; -} + if (QUIRKS_MODE_PUBLIC_IDS.indexOf(publicId) > -1) + return DOCUMENT_MODE.QUIRKS; -//default options -var defaultOpts = { - normalizeWhitespace: false, //Replace all whitespace with single spaces - withStartIndices: false, //Add startIndex properties to nodes - withEndIndices: false, //Add endIndex properties to nodes -}; + var prefixes = systemId === null ? QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES : QUIRKS_MODE_PUBLIC_ID_PREFIXES; -DomHandler.prototype.onparserinit = function(parser){ - this._parser = parser; -}; + if (hasPrefix(publicId, prefixes)) + return DOCUMENT_MODE.QUIRKS; -//Resets the handler back to starting state -DomHandler.prototype.onreset = function(){ - DomHandler.call(this, this._callback, this._options, this._elementCB); -}; + prefixes = systemId === null ? LIMITED_QUIRKS_PUBLIC_ID_PREFIXES : LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES; -//Signals the handler that parsing is done -DomHandler.prototype.onend = function(){ - if(this._done) return; - this._done = true; - this._parser = null; - this._handleCallback(null); -}; + if (hasPrefix(publicId, prefixes)) + return DOCUMENT_MODE.LIMITED_QUIRKS; + } -DomHandler.prototype._handleCallback = -DomHandler.prototype.onerror = function(error){ - if(typeof this._callback === "function"){ - this._callback(error, this.dom); - } else { - if(error) throw error; - } + return DOCUMENT_MODE.NO_QUIRKS; }; -DomHandler.prototype.onclosetag = function(){ - //if(this._tagStack.pop().name !== name) this._handleCallback(Error("Tagname didn't match!")); - - var elem = this._tagStack.pop(); - - if(this._options.withEndIndices && elem){ - elem.endIndex = this._parser.endIndex; - } +exports.serializeContent = function (name, publicId, systemId) { + var str = '!DOCTYPE '; - if(this._elementCB) this._elementCB(elem); -}; + if (name) + str += name; -DomHandler.prototype._createDomElement = function(properties){ - if (!this._options.withDomLvl1) return properties; + if (publicId !== null) + str += ' PUBLIC ' + enquoteDoctypeId(publicId); - var element; - if (properties.type === "tag") { - element = Object.create(ElementPrototype); - } else { - element = Object.create(NodePrototype); - } + else if (systemId !== null) + str += ' SYSTEM'; - for (var key in properties) { - if (properties.hasOwnProperty(key)) { - element[key] = properties[key]; - } - } + if (systemId !== null) + str += ' ' + enquoteDoctypeId(systemId); - return element; + return str; }; -DomHandler.prototype._addDomElement = function(element){ - var parent = this._tagStack[this._tagStack.length - 1]; - var siblings = parent ? parent.children : this.dom; - var previousSibling = siblings[siblings.length - 1]; - element.next = null; +/***/ }), +/* 335 */, +/* 336 */, +/* 337 */ +/***/ (function(module) { - if(this._options.withStartIndices){ - element.startIndex = this._parser.startIndex; - } - if(this._options.withEndIndices){ - element.endIndex = this._parser.endIndex; - } +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return value != null && typeof value == 'object'; +} - if(previousSibling){ - element.prev = previousSibling; - previousSibling.next = element; - } else { - element.prev = null; - } +module.exports = isObjectLike; - siblings.push(element); - element.parent = parent || null; -}; -DomHandler.prototype.onopentag = function(name, attribs){ - var properties = { - type: name === "script" ? ElementType.Script : name === "style" ? ElementType.Style : ElementType.Tag, - name: name, - attribs: attribs, - children: [] - }; +/***/ }), +/* 338 */ +/***/ (function(module) { - var element = this._createDomElement(properties); +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} - this._addDomElement(element); +module.exports = eq; - this._tagStack.push(element); -}; -DomHandler.prototype.ontext = function(data){ - //the ignoreWhitespace is officially dropped, but for now, - //it's an alias for normalizeWhitespace - var normalize = this._options.normalizeWhitespace || this._options.ignoreWhitespace; +/***/ }), +/* 339 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { - var lastTag; - - if(!this._tagStack.length && this.dom.length && (lastTag = this.dom[this.dom.length-1]).type === ElementType.Text){ - if(normalize){ - lastTag.data = (lastTag.data + data).replace(re_whitespace, " "); - } else { - lastTag.data += data; - } - } else { - if( - this._tagStack.length && - (lastTag = this._tagStack[this._tagStack.length - 1]) && - (lastTag = lastTag.children[lastTag.children.length - 1]) && - lastTag.type === ElementType.Text - ){ - if(normalize){ - lastTag.data = (lastTag.data + data).replace(re_whitespace, " "); - } else { - lastTag.data += data; - } - } else { - if(normalize){ - data = data.replace(re_whitespace, " "); - } - - var element = this._createDomElement({ - data: data, - type: ElementType.Text - }); - - this._addDomElement(element); - } - } -}; - -DomHandler.prototype.oncomment = function(data){ - var lastTag = this._tagStack[this._tagStack.length - 1]; - - if(lastTag && lastTag.type === ElementType.Comment){ - lastTag.data += data; - return; - } - - var properties = { - data: data, - type: ElementType.Comment - }; - - var element = this._createDomElement(properties); - - this._addDomElement(element); - this._tagStack.push(element); -}; - -DomHandler.prototype.oncdatastart = function(){ - var properties = { - children: [{ - data: "", - type: ElementType.Text - }], - type: ElementType.CDATA - }; - - var element = this._createDomElement(properties); - - this._addDomElement(element); - this._tagStack.push(element); -}; - -DomHandler.prototype.oncommentend = DomHandler.prototype.oncdataend = function(){ - this._tagStack.pop(); -}; - -DomHandler.prototype.onprocessinginstruction = function(name, data){ - var element = this._createDomElement({ - name: name, - data: data, - type: ElementType.Directive - }); - - this._addDomElement(element); -}; - -module.exports = DomHandler; - - -/***/ }), -/* 282 */, -/* 283 */, -/* 284 */, -/* 285 */ -/***/ (function(__unusedmodule, exports, __webpack_require__) { - -"use strict"; +"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; @@ -15882,1303 +16580,1291 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.ensureExplicit = void 0; -const conda = __importStar(__webpack_require__(259)); -const outputs = __importStar(__webpack_require__(405)); +exports.urlDownloader = void 0; +const base = __importStar(__webpack_require__(122)); /** - * Install an environment from an explicit file generated `conda list --explicit` - * or `conda-lock` + * Provide a path to a `constructor`-compatible installer downloaded from + * any URL, including `file://` URLs. + * + * ### Note + * The entire local URL is used as the cache key. */ -exports.ensureExplicit = { - label: "conda create (from explicit)", - provides: (inputs, options) => __awaiter(void 0, void 0, void 0, function* () { var _a, _b; return !!((_b = (_a = options.envSpec) === null || _a === void 0 ? void 0 : _a.explicit) === null || _b === void 0 ? void 0 : _b.length); }), - condaArgs: (inputs, options) => __awaiter(void 0, void 0, void 0, function* () { - var _c; - if (inputs.pythonVersion) { - throw Error(`'python-version: ${inputs.pythonVersion}' is incompatible with an explicit 'environmentFile`); - } - if ((_c = options.envSpec) === null || _c === void 0 ? void 0 : _c.explicit) { - outputs.setEnvironmentFileOutputs(inputs.environmentFile, options.envSpec.explicit); - } - return [ - "create", - ...conda.envCommandFlag(inputs), - "--file", - inputs.environmentFile, - ]; +exports.urlDownloader = { + label: "download a custom installer by URL", + provides: (inputs, options) => __awaiter(void 0, void 0, void 0, function* () { return !!inputs.installerUrl; }), + installerPath: (inputs, options) => __awaiter(void 0, void 0, void 0, function* () { + return { + localInstallerPath: yield base.ensureLocalInstaller({ + url: inputs.installerUrl, + }), + options: Object.assign(Object.assign({}, options), { useBundled: false }), + }; }), }; /***/ }), -/* 286 */, -/* 287 */, -/* 288 */ -/***/ (function(module) { +/* 340 */, +/* 341 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var baseFor = __webpack_require__(354), + keys = __webpack_require__(863); /** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. + * The base implementation of `_.forOwn` without support for iteratee shorthands. * * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. */ -function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); +function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); +} - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; +module.exports = baseForOwn; + + +/***/ }), +/* 342 */, +/* 343 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var isKeyable = __webpack_require__(511); + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +module.exports = getMapData; + + +/***/ }), +/* 344 */ +/***/ (function(module) { + +"use strict"; + + + +function isNothing(subject) { + return (typeof subject === 'undefined') || (subject === null); +} + + +function isObject(subject) { + return (typeof subject === 'object') && (subject !== null); +} + + +function toArray(sequence) { + if (Array.isArray(sequence)) return sequence; + else if (isNothing(sequence)) return []; + + return [ sequence ]; +} + + +function extend(target, source) { + var index, length, key, sourceKeys; + + if (source) { + sourceKeys = Object.keys(source); + + for (index = 0, length = sourceKeys.length; index < length; index += 1) { + key = sourceKeys[index]; + target[key] = source[key]; } } - return -1; + + return target; } -module.exports = baseFindIndex; +function repeat(string, count) { + var result = '', cycle; -/***/ }), -/* 289 */, -/* 290 */ -/***/ (function(module, __unusedexports, __webpack_require__) { + for (cycle = 0; cycle < count; cycle += 1) { + result += string; + } -var isArray = __webpack_require__(143), - isSymbol = __webpack_require__(186); + return result; +} -/** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/; + +function isNegativeZero(number) { + return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number); +} + + +module.exports.isNothing = isNothing; +module.exports.isObject = isObject; +module.exports.toArray = toArray; +module.exports.repeat = repeat; +module.exports.isNegativeZero = isNegativeZero; +module.exports.extend = extend; + + +/***/ }), +/* 345 */, +/* 346 */, +/* 347 */, +/* 348 */ +/***/ (function(module) { /** - * Checks if `value` is a property name and not a property path. + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. * * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. */ -function isKey(value, object) { - if (isArray(value)) { - return false; - } - var type = typeof value; - if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || isSymbol(value)) { - return true; +function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || - (object != null && value in Object(object)); + return result; } -module.exports = isKey; +module.exports = arrayFilter; /***/ }), -/* 291 */ +/* 349 */ +/***/ (function(module) { + +"use strict"; + + +module.exports = function mergeOptions(defaults, options) { + options = options || Object.create(null); + + return [defaults, options].reduce(function (merged, optObj) { + Object.keys(optObj).forEach(function (key) { + merged[key] = optObj[key]; + }); + + return merged; + }, Object.create(null)); +}; + + +/***/ }), +/* 350 */, +/* 351 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var copyArray = __webpack_require__(239), - isIndex = __webpack_require__(160); +var isPrototype = __webpack_require__(514), + nativeKeys = __webpack_require__(773); -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMin = Math.min; +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; /** - * Reorder `array` according to the specified indexes where the element at - * the first index is assigned as the first element, the element at - * the second index is assigned as the second element, and so on. + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. * * @private - * @param {Array} array The array to reorder. - * @param {Array} indexes The arranged array indexes. - * @returns {Array} Returns `array`. + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. */ -function reorder(array, indexes) { - var arrLength = array.length, - length = nativeMin(indexes.length, arrLength), - oldArray = copyArray(array); - - while (length--) { - var index = indexes[length]; - array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; +function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); } - return array; + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; } -module.exports = reorder; +module.exports = baseKeys; /***/ }), -/* 292 */ +/* 352 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var constant = __webpack_require__(817), - defineProperty = __webpack_require__(382), - identity = __webpack_require__(83); +var baseGet = __webpack_require__(356); /** - * The base implementation of `setToString` without support for hot loop shorting. + * A specialized version of `baseProperty` which supports deep paths. * * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. */ -var baseSetToString = !defineProperty ? identity : function(func, string) { - return defineProperty(func, 'toString', { - 'configurable': true, - 'enumerable': false, - 'value': constant(string), - 'writable': true - }); -}; +function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; +} -module.exports = baseSetToString; +module.exports = basePropertyDeep; /***/ }), -/* 293 */ -/***/ (function(module) { +/* 353 */, +/* 354 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var createBaseFor = __webpack_require__(795); + +/** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseFor = createBaseFor(); + +module.exports = baseFor; -module.exports = require("buffer"); /***/ }), -/* 294 */, -/* 295 */ +/* 355 */, +/* 356 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var baseMatches = __webpack_require__(974), - baseMatchesProperty = __webpack_require__(728), - identity = __webpack_require__(83), - isArray = __webpack_require__(143), - property = __webpack_require__(927); +var castPath = __webpack_require__(929), + toKey = __webpack_require__(484); /** - * The base implementation of `_.iteratee`. + * The base implementation of `_.get` without support for default values. * * @private - * @param {*} [value=_.identity] The value to convert to an iteratee. - * @returns {Function} Returns the iteratee. + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. */ -function baseIteratee(value) { - // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. - // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. - if (typeof value == 'function') { - return value; - } - if (value == null) { - return identity; - } - if (typeof value == 'object') { - return isArray(value) - ? baseMatchesProperty(value[0], value[1]) - : baseMatches(value); +function baseGet(object, path) { + path = castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; } - return property(value); + return (index && index == length) ? object : undefined; } -module.exports = baseIteratee; +module.exports = baseGet; /***/ }), -/* 296 */, -/* 297 */ +/* 357 */ +/***/ (function(module) { + +module.exports = require("assert"); + +/***/ }), +/* 358 */, +/* 359 */, +/* 360 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var arrayMap = __webpack_require__(766), - baseIteratee = __webpack_require__(295), - baseMap = __webpack_require__(852), - isArray = __webpack_require__(143); +var baseHasIn = __webpack_require__(754), + hasPath = __webpack_require__(800); /** - * Creates an array of values by running each element in `collection` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. - * - * The guarded methods are: - * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, - * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, - * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, - * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * Checks if `path` is a direct or inherited property of `object`. * * @static * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new mapped array. + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. * @example * - * function square(n) { - * return n * n; - * } + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); * - * _.map([4, 8], square); - * // => [16, 64] + * _.hasIn(object, 'a'); + * // => true * - * _.map({ 'a': 4, 'b': 8 }, square); - * // => [16, 64] (iteration order is not guaranteed) + * _.hasIn(object, 'a.b'); + * // => true * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; + * _.hasIn(object, ['a', 'b']); + * // => true * - * // The `_.property` iteratee shorthand. - * _.map(users, 'user'); - * // => ['barney', 'fred'] + * _.hasIn(object, 'b'); + * // => false */ -function map(collection, iteratee) { - var func = isArray(collection) ? arrayMap : baseMap; - return func(collection, baseIteratee(iteratee, 3)); +function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); } -module.exports = map; +module.exports = hasIn; /***/ }), -/* 298 */ -/***/ (function(__unusedmodule, exports, __webpack_require__) { +/* 361 */, +/* 362 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -"use strict"; +var basePickBy = __webpack_require__(86), + hasIn = __webpack_require__(360); +/** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ +function basePick(object, paths) { + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); +} -var Tokenizer = __webpack_require__(990), - HTML = __webpack_require__(621); +module.exports = basePick; -//Aliases -var $ = HTML.TAG_NAMES, - NS = HTML.NAMESPACES, - ATTRS = HTML.ATTRS; +/***/ }), +/* 363 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -//MIME types -var MIME_TYPES = { - TEXT_HTML: 'text/html', - APPLICATION_XML: 'application/xhtml+xml' -}; +var baseAssignValue = __webpack_require__(772), + eq = __webpack_require__(338); -//Attributes -var DEFINITION_URL_ATTR = 'definitionurl', - ADJUSTED_DEFINITION_URL_ATTR = 'definitionURL', - SVG_ATTRS_ADJUSTMENT_MAP = { - 'attributename': 'attributeName', - 'attributetype': 'attributeType', - 'basefrequency': 'baseFrequency', - 'baseprofile': 'baseProfile', - 'calcmode': 'calcMode', - 'clippathunits': 'clipPathUnits', - 'diffuseconstant': 'diffuseConstant', - 'edgemode': 'edgeMode', - 'filterunits': 'filterUnits', - 'glyphref': 'glyphRef', - 'gradienttransform': 'gradientTransform', - 'gradientunits': 'gradientUnits', - 'kernelmatrix': 'kernelMatrix', - 'kernelunitlength': 'kernelUnitLength', - 'keypoints': 'keyPoints', - 'keysplines': 'keySplines', - 'keytimes': 'keyTimes', - 'lengthadjust': 'lengthAdjust', - 'limitingconeangle': 'limitingConeAngle', - 'markerheight': 'markerHeight', - 'markerunits': 'markerUnits', - 'markerwidth': 'markerWidth', - 'maskcontentunits': 'maskContentUnits', - 'maskunits': 'maskUnits', - 'numoctaves': 'numOctaves', - 'pathlength': 'pathLength', - 'patterncontentunits': 'patternContentUnits', - 'patterntransform': 'patternTransform', - 'patternunits': 'patternUnits', - 'pointsatx': 'pointsAtX', - 'pointsaty': 'pointsAtY', - 'pointsatz': 'pointsAtZ', - 'preservealpha': 'preserveAlpha', - 'preserveaspectratio': 'preserveAspectRatio', - 'primitiveunits': 'primitiveUnits', - 'refx': 'refX', - 'refy': 'refY', - 'repeatcount': 'repeatCount', - 'repeatdur': 'repeatDur', - 'requiredextensions': 'requiredExtensions', - 'requiredfeatures': 'requiredFeatures', - 'specularconstant': 'specularConstant', - 'specularexponent': 'specularExponent', - 'spreadmethod': 'spreadMethod', - 'startoffset': 'startOffset', - 'stddeviation': 'stdDeviation', - 'stitchtiles': 'stitchTiles', - 'surfacescale': 'surfaceScale', - 'systemlanguage': 'systemLanguage', - 'tablevalues': 'tableValues', - 'targetx': 'targetX', - 'targety': 'targetY', - 'textlength': 'textLength', - 'viewbox': 'viewBox', - 'viewtarget': 'viewTarget', - 'xchannelselector': 'xChannelSelector', - 'ychannelselector': 'yChannelSelector', - 'zoomandpan': 'zoomAndPan' - }, - XML_ATTRS_ADJUSTMENT_MAP = { - 'xlink:actuate': {prefix: 'xlink', name: 'actuate', namespace: NS.XLINK}, - 'xlink:arcrole': {prefix: 'xlink', name: 'arcrole', namespace: NS.XLINK}, - 'xlink:href': {prefix: 'xlink', name: 'href', namespace: NS.XLINK}, - 'xlink:role': {prefix: 'xlink', name: 'role', namespace: NS.XLINK}, - 'xlink:show': {prefix: 'xlink', name: 'show', namespace: NS.XLINK}, - 'xlink:title': {prefix: 'xlink', name: 'title', namespace: NS.XLINK}, - 'xlink:type': {prefix: 'xlink', name: 'type', namespace: NS.XLINK}, - 'xml:base': {prefix: 'xml', name: 'base', namespace: NS.XML}, - 'xml:lang': {prefix: 'xml', name: 'lang', namespace: NS.XML}, - 'xml:space': {prefix: 'xml', name: 'space', namespace: NS.XML}, - 'xmlns': {prefix: '', name: 'xmlns', namespace: NS.XMLNS}, - 'xmlns:xlink': {prefix: 'xmlns', name: 'xlink', namespace: NS.XMLNS} +/** Used for built-in method references. */ +var objectProto = Object.prototype; - }; +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; -//SVG tag names adjustment map -var SVG_TAG_NAMES_ADJUSTMENT_MAP = exports.SVG_TAG_NAMES_ADJUSTMENT_MAP = { - 'altglyph': 'altGlyph', - 'altglyphdef': 'altGlyphDef', - 'altglyphitem': 'altGlyphItem', - 'animatecolor': 'animateColor', - 'animatemotion': 'animateMotion', - 'animatetransform': 'animateTransform', - 'clippath': 'clipPath', - 'feblend': 'feBlend', - 'fecolormatrix': 'feColorMatrix', - 'fecomponenttransfer': 'feComponentTransfer', - 'fecomposite': 'feComposite', - 'feconvolvematrix': 'feConvolveMatrix', - 'fediffuselighting': 'feDiffuseLighting', - 'fedisplacementmap': 'feDisplacementMap', - 'fedistantlight': 'feDistantLight', - 'feflood': 'feFlood', - 'fefunca': 'feFuncA', - 'fefuncb': 'feFuncB', - 'fefuncg': 'feFuncG', - 'fefuncr': 'feFuncR', - 'fegaussianblur': 'feGaussianBlur', - 'feimage': 'feImage', - 'femerge': 'feMerge', - 'femergenode': 'feMergeNode', - 'femorphology': 'feMorphology', - 'feoffset': 'feOffset', - 'fepointlight': 'fePointLight', - 'fespecularlighting': 'feSpecularLighting', - 'fespotlight': 'feSpotLight', - 'fetile': 'feTile', - 'feturbulence': 'feTurbulence', - 'foreignobject': 'foreignObject', - 'glyphref': 'glyphRef', - 'lineargradient': 'linearGradient', - 'radialgradient': 'radialGradient', - 'textpath': 'textPath' -}; +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } +} -//Tags that causes exit from foreign content -var EXITS_FOREIGN_CONTENT = Object.create(null); +module.exports = assignValue; -EXITS_FOREIGN_CONTENT[$.B] = true; -EXITS_FOREIGN_CONTENT[$.BIG] = true; -EXITS_FOREIGN_CONTENT[$.BLOCKQUOTE] = true; -EXITS_FOREIGN_CONTENT[$.BODY] = true; -EXITS_FOREIGN_CONTENT[$.BR] = true; -EXITS_FOREIGN_CONTENT[$.CENTER] = true; -EXITS_FOREIGN_CONTENT[$.CODE] = true; -EXITS_FOREIGN_CONTENT[$.DD] = true; -EXITS_FOREIGN_CONTENT[$.DIV] = true; -EXITS_FOREIGN_CONTENT[$.DL] = true; -EXITS_FOREIGN_CONTENT[$.DT] = true; -EXITS_FOREIGN_CONTENT[$.EM] = true; -EXITS_FOREIGN_CONTENT[$.EMBED] = true; -EXITS_FOREIGN_CONTENT[$.H1] = true; -EXITS_FOREIGN_CONTENT[$.H2] = true; -EXITS_FOREIGN_CONTENT[$.H3] = true; -EXITS_FOREIGN_CONTENT[$.H4] = true; -EXITS_FOREIGN_CONTENT[$.H5] = true; -EXITS_FOREIGN_CONTENT[$.H6] = true; -EXITS_FOREIGN_CONTENT[$.HEAD] = true; -EXITS_FOREIGN_CONTENT[$.HR] = true; -EXITS_FOREIGN_CONTENT[$.I] = true; -EXITS_FOREIGN_CONTENT[$.IMG] = true; -EXITS_FOREIGN_CONTENT[$.LI] = true; -EXITS_FOREIGN_CONTENT[$.LISTING] = true; -EXITS_FOREIGN_CONTENT[$.MENU] = true; -EXITS_FOREIGN_CONTENT[$.META] = true; -EXITS_FOREIGN_CONTENT[$.NOBR] = true; -EXITS_FOREIGN_CONTENT[$.OL] = true; -EXITS_FOREIGN_CONTENT[$.P] = true; -EXITS_FOREIGN_CONTENT[$.PRE] = true; -EXITS_FOREIGN_CONTENT[$.RUBY] = true; -EXITS_FOREIGN_CONTENT[$.S] = true; -EXITS_FOREIGN_CONTENT[$.SMALL] = true; -EXITS_FOREIGN_CONTENT[$.SPAN] = true; -EXITS_FOREIGN_CONTENT[$.STRONG] = true; -EXITS_FOREIGN_CONTENT[$.STRIKE] = true; -EXITS_FOREIGN_CONTENT[$.SUB] = true; -EXITS_FOREIGN_CONTENT[$.SUP] = true; -EXITS_FOREIGN_CONTENT[$.TABLE] = true; -EXITS_FOREIGN_CONTENT[$.TT] = true; -EXITS_FOREIGN_CONTENT[$.U] = true; -EXITS_FOREIGN_CONTENT[$.UL] = true; -EXITS_FOREIGN_CONTENT[$.VAR] = true; -//Check exit from foreign content -exports.causesExit = function (startTagToken) { - var tn = startTagToken.tagName; - var isFontWithAttrs = tn === $.FONT && (Tokenizer.getTokenAttr(startTagToken, ATTRS.COLOR) !== null || - Tokenizer.getTokenAttr(startTagToken, ATTRS.SIZE) !== null || - Tokenizer.getTokenAttr(startTagToken, ATTRS.FACE) !== null); +/***/ }), +/* 364 */, +/* 365 */, +/* 366 */, +/* 367 */, +/* 368 */, +/* 369 */, +/* 370 */, +/* 371 */, +/* 372 */, +/* 373 */, +/* 374 */, +/* 375 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { - return isFontWithAttrs ? true : EXITS_FOREIGN_CONTENT[tn]; -}; +"use strict"; -//Token adjustments -exports.adjustTokenMathMLAttrs = function (token) { - for (var i = 0; i < token.attrs.length; i++) { - if (token.attrs[i].name === DEFINITION_URL_ATTR) { - token.attrs[i].name = ADJUSTED_DEFINITION_URL_ATTR; - break; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ensureSimple = void 0; +const core = __importStar(__webpack_require__(470)); +const utils = __importStar(__webpack_require__(163)); +const conda = __importStar(__webpack_require__(506)); +/** + * Install an environment with `conda create` when no `envSpec` is detected + * + * ## Notes + * Can presently install the given version of `python`. + * + * In the future, this may need its own providers of environment patches. + */ +exports.ensureSimple = { + label: "conda create (simple)", + provides: (inputs, options) => __awaiter(void 0, void 0, void 0, function* () { + var _a, _b, _c; + return !(((_b = (_a = options.envSpec) === null || _a === void 0 ? void 0 : _a.explicit) === null || _b === void 0 ? void 0 : _b.length) || + Object.keys(((_c = options.envSpec) === null || _c === void 0 ? void 0 : _c.yaml) || {}).length); + }), + condaArgs: (inputs, options) => __awaiter(void 0, void 0, void 0, function* () { + const args = ["create", ...conda.envCommandFlag(inputs)]; + if (inputs.pythonVersion) { + const spec = utils.makeSpec("python", inputs.pythonVersion); + core.info(`Adding spec: ${spec}`); + args.push(spec); } - } + return args; + }), }; -exports.adjustTokenSVGAttrs = function (token) { - for (var i = 0; i < token.attrs.length; i++) { - var adjustedAttrName = SVG_ATTRS_ADJUSTMENT_MAP[token.attrs[i].name]; - if (adjustedAttrName) - token.attrs[i].name = adjustedAttrName; - } -}; +/***/ }), +/* 376 */, +/* 377 */, +/* 378 */, +/* 379 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -exports.adjustTokenXMLAttrs = function (token) { - for (var i = 0; i < token.attrs.length; i++) { - var adjustedAttrEntry = XML_ATTRS_ADJUSTMENT_MAP[token.attrs[i].name]; +var getNative = __webpack_require__(319), + root = __webpack_require__(824); - if (adjustedAttrEntry) { - token.attrs[i].prefix = adjustedAttrEntry.prefix; - token.attrs[i].name = adjustedAttrEntry.name; - token.attrs[i].namespace = adjustedAttrEntry.namespace; - } - } -}; +/* Built-in method references that are verified to be native. */ +var WeakMap = getNative(root, 'WeakMap'); -exports.adjustTokenSVGTagName = function (token) { - var adjustedTagName = SVG_TAG_NAMES_ADJUSTMENT_MAP[token.tagName]; +module.exports = WeakMap; - if (adjustedTagName) - token.tagName = adjustedTagName; -}; -//Integration points -function isMathMLTextIntegrationPoint(tn, ns) { - return ns === NS.MATHML && (tn === $.MI || tn === $.MO || tn === $.MN || tn === $.MS || tn === $.MTEXT); -} +/***/ }), +/* 380 */, +/* 381 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -function isHtmlIntegrationPoint(tn, ns, attrs) { - if (ns === NS.MATHML && tn === $.ANNOTATION_XML) { - for (var i = 0; i < attrs.length; i++) { - if (attrs[i].name === ATTRS.ENCODING) { - var value = attrs[i].value.toLowerCase(); +"use strict"; - return value === MIME_TYPES.TEXT_HTML || value === MIME_TYPES.APPLICATION_XML; - } - } +module.exports = Yallist + +Yallist.Node = Node +Yallist.create = Yallist + +function Yallist (list) { + var self = this + if (!(self instanceof Yallist)) { + self = new Yallist() + } + + self.tail = null + self.head = null + self.length = 0 + + if (list && typeof list.forEach === 'function') { + list.forEach(function (item) { + self.push(item) + }) + } else if (arguments.length > 0) { + for (var i = 0, l = arguments.length; i < l; i++) { + self.push(arguments[i]) } + } - return ns === NS.SVG && (tn === $.FOREIGN_OBJECT || tn === $.DESC || tn === $.TITLE); + return self } -exports.isIntegrationPoint = function (tn, ns, attrs, foreignNS) { - if ((!foreignNS || foreignNS === NS.HTML) && isHtmlIntegrationPoint(tn, ns, attrs)) - return true; +Yallist.prototype.removeNode = function (node) { + if (node.list !== this) { + throw new Error('removing node which does not belong to this list') + } - if ((!foreignNS || foreignNS === NS.MATHML) && isMathMLTextIntegrationPoint(tn, ns)) - return true; + var next = node.next + var prev = node.prev - return false; -}; + if (next) { + next.prev = prev + } + if (prev) { + prev.next = next + } -/***/ }), -/* 299 */, -/* 300 */, -/* 301 */ -/***/ (function(module, __unusedexports, __webpack_require__) { + if (node === this.head) { + this.head = next + } + if (node === this.tail) { + this.tail = prev + } -var isArrayLike = __webpack_require__(146), - isObjectLike = __webpack_require__(337); + node.list.length-- + node.next = null + node.prev = null + node.list = null -/** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ -function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); + return next } -module.exports = isArrayLikeObject; +Yallist.prototype.unshiftNode = function (node) { + if (node === this.head) { + return + } + if (node.list) { + node.list.removeNode(node) + } -/***/ }), -/* 302 */, -/* 303 */, -/* 304 */ -/***/ (function(module) { + var head = this.head + node.list = this + node.next = head + if (head) { + head.prev = node + } -module.exports = require("string_decoder"); + this.head = node + if (!this.tail) { + this.tail = node + } + this.length++ +} -/***/ }), -/* 305 */ -/***/ (function(module, __unusedexports, __webpack_require__) { +Yallist.prototype.pushNode = function (node) { + if (node === this.tail) { + return + } -var assignMergeValue = __webpack_require__(110), - cloneBuffer = __webpack_require__(744), - cloneTypedArray = __webpack_require__(422), - copyArray = __webpack_require__(239), - initCloneObject = __webpack_require__(66), - isArguments = __webpack_require__(460), - isArray = __webpack_require__(143), - isArrayLikeObject = __webpack_require__(301), - isBuffer = __webpack_require__(546), - isFunction = __webpack_require__(10), - isObject = __webpack_require__(988), - isPlainObject = __webpack_require__(585), - isTypedArray = __webpack_require__(850), - safeGet = __webpack_require__(807), - toPlainObject = __webpack_require__(808); + if (node.list) { + node.list.removeNode(node) + } -/** - * A specialized version of `baseMerge` for arrays and objects which performs - * deep merges and tracks traversed objects enabling objects with circular - * references to be merged. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {string} key The key of the value to merge. - * @param {number} srcIndex The index of `source`. - * @param {Function} mergeFunc The function to merge values. - * @param {Function} [customizer] The function to customize assigned values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - */ -function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { - var objValue = safeGet(object, key), - srcValue = safeGet(source, key), - stacked = stack.get(srcValue); + var tail = this.tail + node.list = this + node.prev = tail + if (tail) { + tail.next = node + } - if (stacked) { - assignMergeValue(object, key, stacked); - return; + this.tail = node + if (!this.head) { + this.head = node } - var newValue = customizer - ? customizer(objValue, srcValue, (key + ''), object, source, stack) - : undefined; + this.length++ +} - var isCommon = newValue === undefined; +Yallist.prototype.push = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + push(this, arguments[i]) + } + return this.length +} - if (isCommon) { - var isArr = isArray(srcValue), - isBuff = !isArr && isBuffer(srcValue), - isTyped = !isArr && !isBuff && isTypedArray(srcValue); +Yallist.prototype.unshift = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + unshift(this, arguments[i]) + } + return this.length +} - newValue = srcValue; - if (isArr || isBuff || isTyped) { - if (isArray(objValue)) { - newValue = objValue; - } - else if (isArrayLikeObject(objValue)) { - newValue = copyArray(objValue); - } - else if (isBuff) { - isCommon = false; - newValue = cloneBuffer(srcValue, true); - } - else if (isTyped) { - isCommon = false; - newValue = cloneTypedArray(srcValue, true); - } - else { - newValue = []; - } - } - else if (isPlainObject(srcValue) || isArguments(srcValue)) { - newValue = objValue; - if (isArguments(objValue)) { - newValue = toPlainObject(objValue); - } - else if (!isObject(objValue) || isFunction(objValue)) { - newValue = initCloneObject(srcValue); - } - } - else { - isCommon = false; - } +Yallist.prototype.pop = function () { + if (!this.tail) { + return undefined } - if (isCommon) { - // Recursively merge objects and arrays (susceptible to call stack limits). - stack.set(srcValue, newValue); - mergeFunc(newValue, srcValue, srcIndex, customizer, stack); - stack['delete'](srcValue); + + var res = this.tail.value + this.tail = this.tail.prev + if (this.tail) { + this.tail.next = null + } else { + this.head = null } - assignMergeValue(object, key, newValue); + this.length-- + return res } -module.exports = baseMergeDeep; - +Yallist.prototype.shift = function () { + if (!this.head) { + return undefined + } -/***/ }), -/* 306 */ -/***/ (function(__unusedmodule, exports, __webpack_require__) { + var res = this.head.value + this.head = this.head.next + if (this.head) { + this.head.prev = null + } else { + this.tail = null + } + this.length-- + return res +} -var inverseXML = getInverseObj(__webpack_require__(273)), - xmlReplacer = getInverseReplacer(inverseXML); +Yallist.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.head, i = 0; walker !== null; i++) { + fn.call(thisp, walker.value, i, this) + walker = walker.next + } +} -exports.XML = getInverse(inverseXML, xmlReplacer); +Yallist.prototype.forEachReverse = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { + fn.call(thisp, walker.value, i, this) + walker = walker.prev + } +} -var inverseHTML = getInverseObj(__webpack_require__(252)), - htmlReplacer = getInverseReplacer(inverseHTML); +Yallist.prototype.get = function (n) { + for (var i = 0, walker = this.head; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.next + } + if (i === n && walker !== null) { + return walker.value + } +} -exports.HTML = getInverse(inverseHTML, htmlReplacer); +Yallist.prototype.getReverse = function (n) { + for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.prev + } + if (i === n && walker !== null) { + return walker.value + } +} -function getInverseObj(obj) { - return Object.keys(obj) - .sort() - .reduce(function(inverse, name) { - inverse[obj[name]] = "&" + name + ";"; - return inverse; - }, {}); +Yallist.prototype.map = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.head; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.next + } + return res } -function getInverseReplacer(inverse) { - var single = [], - multiple = []; +Yallist.prototype.mapReverse = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.tail; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.prev + } + return res +} - Object.keys(inverse).forEach(function(k) { - if (k.length === 1) { - single.push("\\" + k); - } else { - multiple.push(k); - } - }); +Yallist.prototype.reduce = function (fn, initial) { + var acc + var walker = this.head + if (arguments.length > 1) { + acc = initial + } else if (this.head) { + walker = this.head.next + acc = this.head.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } - //TODO add ranges - multiple.unshift("[" + single.join("") + "]"); + for (var i = 0; walker !== null; i++) { + acc = fn(acc, walker.value, i) + walker = walker.next + } - return new RegExp(multiple.join("|"), "g"); + return acc } -var re_nonASCII = /[^\0-\x7F]/g, - re_astralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; +Yallist.prototype.reduceReverse = function (fn, initial) { + var acc + var walker = this.tail + if (arguments.length > 1) { + acc = initial + } else if (this.tail) { + walker = this.tail.prev + acc = this.tail.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } -function singleCharReplacer(c) { - return ( - "&#x" + - c - .charCodeAt(0) - .toString(16) - .toUpperCase() + - ";" - ); + for (var i = this.length - 1; walker !== null; i--) { + acc = fn(acc, walker.value, i) + walker = walker.prev + } + + return acc } -function astralReplacer(c) { - // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - var high = c.charCodeAt(0); - var low = c.charCodeAt(1); - var codePoint = (high - 0xd800) * 0x400 + low - 0xdc00 + 0x10000; - return "&#x" + codePoint.toString(16).toUpperCase() + ";"; +Yallist.prototype.toArray = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.head; walker !== null; i++) { + arr[i] = walker.value + walker = walker.next + } + return arr } -function getInverse(inverse, re) { - function func(name) { - return inverse[name]; - } +Yallist.prototype.toArrayReverse = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.tail; walker !== null; i++) { + arr[i] = walker.value + walker = walker.prev + } + return arr +} - return function(data) { - return data - .replace(re, func) - .replace(re_astralSymbols, astralReplacer) - .replace(re_nonASCII, singleCharReplacer); - }; +Yallist.prototype.slice = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = 0, walker = this.head; walker !== null && i < from; i++) { + walker = walker.next + } + for (; walker !== null && i < to; i++, walker = walker.next) { + ret.push(walker.value) + } + return ret } -var re_xmlChars = getInverseReplacer(inverseXML); +Yallist.prototype.sliceReverse = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { + walker = walker.prev + } + for (; walker !== null && i > from; i--, walker = walker.prev) { + ret.push(walker.value) + } + return ret +} -function escapeXML(data) { - return data - .replace(re_xmlChars, singleCharReplacer) - .replace(re_astralSymbols, astralReplacer) - .replace(re_nonASCII, singleCharReplacer); +Yallist.prototype.splice = function (start, deleteCount, ...nodes) { + if (start > this.length) { + start = this.length - 1 + } + if (start < 0) { + start = this.length + start; + } + + for (var i = 0, walker = this.head; walker !== null && i < start; i++) { + walker = walker.next + } + + var ret = [] + for (var i = 0; walker && i < deleteCount; i++) { + ret.push(walker.value) + walker = this.removeNode(walker) + } + if (walker === null) { + walker = this.tail + } + + if (walker !== this.head && walker !== this.tail) { + walker = walker.prev + } + + for (var i = 0; i < nodes.length; i++) { + walker = insert(this, walker, nodes[i]) + } + return ret; } -exports.escape = escapeXML; +Yallist.prototype.reverse = function () { + var head = this.head + var tail = this.tail + for (var walker = head; walker !== null; walker = walker.prev) { + var p = walker.prev + walker.prev = walker.next + walker.next = p + } + this.head = tail + this.tail = head + return this +} +function insert (self, node, value) { + var inserted = node === self.head ? + new Node(value, null, node, self) : + new Node(value, node, node.next, self) -/***/ }), -/* 307 */ -/***/ (function(__unusedmodule, exports, __webpack_require__) { + if (inserted.next === null) { + self.tail = inserted + } + if (inserted.prev === null) { + self.head = inserted + } -var encode = __webpack_require__(306), - decode = __webpack_require__(253); + self.length++ -exports.decode = function(data, level) { - return (!level || level <= 0 ? decode.XML : decode.HTML)(data); -}; + return inserted +} -exports.decodeStrict = function(data, level) { - return (!level || level <= 0 ? decode.XML : decode.HTMLStrict)(data); -}; +function push (self, item) { + self.tail = new Node(item, self.tail, null, self) + if (!self.head) { + self.head = self.tail + } + self.length++ +} -exports.encode = function(data, level) { - return (!level || level <= 0 ? encode.XML : encode.HTML)(data); -}; +function unshift (self, item) { + self.head = new Node(item, null, self.head, self) + if (!self.tail) { + self.tail = self.head + } + self.length++ +} -exports.encodeXML = encode.XML; +function Node (value, prev, next, list) { + if (!(this instanceof Node)) { + return new Node(value, prev, next, list) + } -exports.encodeHTML4 = exports.encodeHTML5 = exports.encodeHTML = encode.HTML; + this.list = list + this.value = value -exports.decodeXML = exports.decodeXMLStrict = decode.XML; + if (prev) { + prev.next = this + this.prev = prev + } else { + this.prev = null + } -exports.decodeHTML4 = exports.decodeHTML5 = exports.decodeHTML = decode.HTML; + if (next) { + next.prev = this + this.next = next + } else { + this.next = null + } +} -exports.decodeHTML4Strict = exports.decodeHTML5Strict = exports.decodeHTMLStrict = decode.HTMLStrict; +try { + // add if support for Symbol.iterator is present + __webpack_require__(135)(Yallist) +} catch (er) {} -exports.escape = encode.escape; + +/***/ }), +/* 382 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var getNative = __webpack_require__(319); + +var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} +}()); + +module.exports = defineProperty; /***/ }), -/* 308 */, -/* 309 */, -/* 310 */ +/* 383 */, +/* 384 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var castPath = __webpack_require__(929), - isArguments = __webpack_require__(460), - isArray = __webpack_require__(143), - isIndex = __webpack_require__(160), - isLength = __webpack_require__(611), - toKey = __webpack_require__(503); +var LazyWrapper = __webpack_require__(922), + getData = __webpack_require__(418), + getFuncName = __webpack_require__(202), + lodash = __webpack_require__(751); /** - * Checks if `path` exists on `object`. + * Checks if `func` has a lazy counterpart. * * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @param {Function} hasFunc The function to check properties. - * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, + * else `false`. */ -function hasPath(object, path, hasFunc) { - path = castPath(path, object); - - var index = -1, - length = path.length, - result = false; +function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; - while (++index < length) { - var key = toKey(path[index]); - if (!(result = object != null && hasFunc(object, key))) { - break; - } - object = object[key]; + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; } - if (result || ++index != length) { - return result; + if (func === other) { + return true; } - length = object == null ? 0 : object.length; - return !!length && isLength(length) && isIndex(key, length) && - (isArray(object) || isArguments(object)); + var data = getData(other); + return !!data && func === data[0]; } -module.exports = hasPath; +module.exports = isLaziable; /***/ }), -/* 311 */, -/* 312 */ -/***/ (function(module) { +/* 385 */, +/* 386 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -module.exports = { - trueFunc: function trueFunc(){ - return true; - }, - falseFunc: function falseFunc(){ - return false; - } -}; +"use strict"; -/***/ }), -/* 313 */, -/* 314 */, -/* 315 */ -/***/ (function(module) { -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }) - } - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } - } -} +var Type = __webpack_require__(750); +function resolveJavascriptUndefined() { + return true; +} -/***/ }), -/* 316 */ -/***/ (function(module) { +function constructJavascriptUndefined() { + /*eslint-disable no-undefined*/ + return undefined; +} -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; +function representJavascriptUndefined() { + return ''; +} -/** - * Creates a function that negates the result of the predicate `func`. The - * `func` predicate is invoked with the `this` binding and arguments of the - * created function. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {Function} predicate The predicate to negate. - * @returns {Function} Returns the new negated function. - * @example - * - * function isEven(n) { - * return n % 2 == 0; - * } - * - * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); - * // => [1, 3, 5] - */ -function negate(predicate) { - if (typeof predicate != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return function() { - var args = arguments; - switch (args.length) { - case 0: return !predicate.call(this); - case 1: return !predicate.call(this, args[0]); - case 2: return !predicate.call(this, args[0], args[1]); - case 3: return !predicate.call(this, args[0], args[1], args[2]); - } - return !predicate.apply(this, args); - }; +function isUndefined(object) { + return typeof object === 'undefined'; } -module.exports = negate; +module.exports = new Type('tag:yaml.org,2002:js/undefined', { + kind: 'scalar', + resolve: resolveJavascriptUndefined, + construct: constructJavascriptUndefined, + predicate: isUndefined, + represent: representJavascriptUndefined +}); /***/ }), -/* 317 */, -/* 318 */, -/* 319 */ +/* 387 */, +/* 388 */, +/* 389 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var baseIsNative = __webpack_require__(248), - getValue = __webpack_require__(879); +var baseTimes = __webpack_require__(553), + isArguments = __webpack_require__(460), + isArray = __webpack_require__(806), + isBuffer = __webpack_require__(546), + isIndex = __webpack_require__(160), + isTypedArray = __webpack_require__(850); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; /** - * Gets the native function at `key` of `object`. + * Creates an array of the enumerable property names of the array-like `value`. * * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. */ -function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; +function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; } -module.exports = getNative; +module.exports = arrayLikeKeys; /***/ }), -/* 320 */ +/* 390 */, +/* 391 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var basePick = __webpack_require__(362), - flatRest = __webpack_require__(521); +var arrayFilter = __webpack_require__(348), + baseFilter = __webpack_require__(793), + baseIteratee = __webpack_require__(295), + isArray = __webpack_require__(806); /** - * Creates an object composed of the picked `object` properties. + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. * * @static - * @since 0.1.0 * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Object} Returns the new object. + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject * @example * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; * - * _.pick(object, ['a', 'c']); - * // => { 'a': 1, 'c': 3 } + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + * + * // Combining several predicates using `_.overEvery` or `_.overSome`. + * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); + * // => objects for ['fred', 'barney'] */ -var pick = flatRest(function(object, paths) { - return object == null ? {} : basePick(object, paths); -}); +function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, baseIteratee(predicate, 3)); +} -module.exports = pick; +module.exports = filter; /***/ }), -/* 321 */, -/* 322 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var baseCreate = __webpack_require__(782), - isObject = __webpack_require__(988); +/* 392 */, +/* 393 */ +/***/ (function(module) { /** - * Creates a function that produces an instance of `Ctor` regardless of - * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * Creates a unary function that invokes `func` with its argument transformed. * * @private - * @param {Function} Ctor The constructor to wrap. - * @returns {Function} Returns the new wrapped function. + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. */ -function createCtor(Ctor) { - return function() { - // Use a `switch` statement to work with class constructors. See - // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist - // for more details. - var args = arguments; - switch (args.length) { - case 0: return new Ctor; - case 1: return new Ctor(args[0]); - case 2: return new Ctor(args[0], args[1]); - case 3: return new Ctor(args[0], args[1], args[2]); - case 4: return new Ctor(args[0], args[1], args[2], args[3]); - case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); - case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); - case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); - } - var thisBinding = baseCreate(Ctor.prototype), - result = Ctor.apply(thisBinding, args); - - // Mimic the constructor's `return` behavior. - // See https://es5.github.io/#x13.2.2 for more details. - return isObject(result) ? result : thisBinding; +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); }; } -module.exports = createCtor; +module.exports = overArg; /***/ }), -/* 323 */, -/* 324 */, -/* 325 */, -/* 326 */, -/* 327 */, -/* 328 */, -/* 329 */, -/* 330 */, -/* 331 */, -/* 332 */, -/* 333 */, -/* 334 */ -/***/ (function(__unusedmodule, exports, __webpack_require__) { +/* 394 */, +/* 395 */, +/* 396 */ +/***/ (function(module, __unusedexports, __webpack_require__) { "use strict"; -var DOCUMENT_MODE = __webpack_require__(621).DOCUMENT_MODE; - -//Const -var VALID_DOCTYPE_NAME = 'html', - QUIRKS_MODE_SYSTEM_ID = 'http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd', - QUIRKS_MODE_PUBLIC_ID_PREFIXES = [ - '+//silmaril//dtd html pro v0r11 19970101//en', - '-//advasoft ltd//dtd html 3.0 aswedit + extensions//en', - '-//as//dtd html 3.0 aswedit + extensions//en', - '-//ietf//dtd html 2.0 level 1//en', - '-//ietf//dtd html 2.0 level 2//en', - '-//ietf//dtd html 2.0 strict level 1//en', - '-//ietf//dtd html 2.0 strict level 2//en', - '-//ietf//dtd html 2.0 strict//en', - '-//ietf//dtd html 2.0//en', - '-//ietf//dtd html 2.1e//en', - '-//ietf//dtd html 3.0//en', - '-//ietf//dtd html 3.0//en//', - '-//ietf//dtd html 3.2 final//en', - '-//ietf//dtd html 3.2//en', - '-//ietf//dtd html 3//en', - '-//ietf//dtd html level 0//en', - '-//ietf//dtd html level 0//en//2.0', - '-//ietf//dtd html level 1//en', - '-//ietf//dtd html level 1//en//2.0', - '-//ietf//dtd html level 2//en', - '-//ietf//dtd html level 2//en//2.0', - '-//ietf//dtd html level 3//en', - '-//ietf//dtd html level 3//en//3.0', - '-//ietf//dtd html strict level 0//en', - '-//ietf//dtd html strict level 0//en//2.0', - '-//ietf//dtd html strict level 1//en', - '-//ietf//dtd html strict level 1//en//2.0', - '-//ietf//dtd html strict level 2//en', - '-//ietf//dtd html strict level 2//en//2.0', - '-//ietf//dtd html strict level 3//en', - '-//ietf//dtd html strict level 3//en//3.0', - '-//ietf//dtd html strict//en', - '-//ietf//dtd html strict//en//2.0', - '-//ietf//dtd html strict//en//3.0', - '-//ietf//dtd html//en', - '-//ietf//dtd html//en//2.0', - '-//ietf//dtd html//en//3.0', - '-//metrius//dtd metrius presentational//en', - '-//microsoft//dtd internet explorer 2.0 html strict//en', - '-//microsoft//dtd internet explorer 2.0 html//en', - '-//microsoft//dtd internet explorer 2.0 tables//en', - '-//microsoft//dtd internet explorer 3.0 html strict//en', - '-//microsoft//dtd internet explorer 3.0 html//en', - '-//microsoft//dtd internet explorer 3.0 tables//en', - '-//netscape comm. corp.//dtd html//en', - '-//netscape comm. corp.//dtd strict html//en', - '-//o\'reilly and associates//dtd html 2.0//en', - '-//o\'reilly and associates//dtd html extended 1.0//en', - '-//spyglass//dtd html 2.0 extended//en', - '-//sq//dtd html 2.0 hotmetal + extensions//en', - '-//sun microsystems corp.//dtd hotjava html//en', - '-//sun microsystems corp.//dtd hotjava strict html//en', - '-//w3c//dtd html 3 1995-03-24//en', - '-//w3c//dtd html 3.2 draft//en', - '-//w3c//dtd html 3.2 final//en', - '-//w3c//dtd html 3.2//en', - '-//w3c//dtd html 3.2s draft//en', - '-//w3c//dtd html 4.0 frameset//en', - '-//w3c//dtd html 4.0 transitional//en', - '-//w3c//dtd html experimental 19960712//en', - '-//w3c//dtd html experimental 970421//en', - '-//w3c//dtd w3 html//en', - '-//w3o//dtd w3 html 3.0//en', - '-//w3o//dtd w3 html 3.0//en//', - '-//webtechs//dtd mozilla html 2.0//en', - '-//webtechs//dtd mozilla html//en' - ], - QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES = QUIRKS_MODE_PUBLIC_ID_PREFIXES.concat([ - '-//w3c//dtd html 4.01 frameset//', - '-//w3c//dtd html 4.01 transitional//' - ]), - QUIRKS_MODE_PUBLIC_IDS = [ - '-//w3o//dtd w3 html strict 3.0//en//', - '-/w3c/dtd html 4.0 transitional/en', - 'html' - ], - LIMITED_QUIRKS_PUBLIC_ID_PREFIXES = [ - '-//W3C//DTD XHTML 1.0 Frameset//', - '-//W3C//DTD XHTML 1.0 Transitional//' - ], - LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES = LIMITED_QUIRKS_PUBLIC_ID_PREFIXES.concat([ - '-//W3C//DTD HTML 4.01 Frameset//', - '-//W3C//DTD HTML 4.01 Transitional//' - ]); - - -//Utils -function enquoteDoctypeId(id) { - var quote = id.indexOf('"') !== -1 ? '\'' : '"'; - - return quote + id + quote; -} - -function hasPrefix(publicId, prefixes) { - for (var i = 0; i < prefixes.length; i++) { - if (publicId.indexOf(prefixes[i]) === 0) - return true; - } - - return false; -} +var WritableStream = __webpack_require__(413).Writable, + inherits = __webpack_require__(669).inherits, + Parser = __webpack_require__(60); +var ParserStream = module.exports = function (options) { + WritableStream.call(this); -//API -exports.getDocumentMode = function (name, publicId, systemId) { - if (name !== VALID_DOCTYPE_NAME) - return DOCUMENT_MODE.QUIRKS; + this.parser = new Parser(options); - if (systemId && systemId.toLowerCase() === QUIRKS_MODE_SYSTEM_ID) - return DOCUMENT_MODE.QUIRKS; + this.lastChunkWritten = false; + this.writeCallback = null; + this.pausedByScript = false; - if (publicId !== null) { - publicId = publicId.toLowerCase(); + this.document = this.parser.treeAdapter.createDocument(); - if (QUIRKS_MODE_PUBLIC_IDS.indexOf(publicId) > -1) - return DOCUMENT_MODE.QUIRKS; + this.pendingHtmlInsertions = []; - var prefixes = systemId === null ? QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES : QUIRKS_MODE_PUBLIC_ID_PREFIXES; + this._resume = this._resume.bind(this); + this._documentWrite = this._documentWrite.bind(this); + this._scriptHandler = this._scriptHandler.bind(this); - if (hasPrefix(publicId, prefixes)) - return DOCUMENT_MODE.QUIRKS; + this.parser._bootstrap(this.document, null); +}; - prefixes = systemId === null ? LIMITED_QUIRKS_PUBLIC_ID_PREFIXES : LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES; +inherits(ParserStream, WritableStream); - if (hasPrefix(publicId, prefixes)) - return DOCUMENT_MODE.LIMITED_QUIRKS; - } +//WritableStream implementation +ParserStream.prototype._write = function (chunk, encoding, callback) { + this.writeCallback = callback; + this.parser.tokenizer.write(chunk.toString('utf8'), this.lastChunkWritten); + this._runParsingLoop(); +}; - return DOCUMENT_MODE.NO_QUIRKS; +ParserStream.prototype.end = function (chunk, encoding, callback) { + this.lastChunkWritten = true; + WritableStream.prototype.end.call(this, chunk || '', encoding, callback); }; -exports.serializeContent = function (name, publicId, systemId) { - var str = '!DOCTYPE '; +//Scriptable parser implementation +ParserStream.prototype._runParsingLoop = function () { + this.parser.runParsingLoopForCurrentChunk(this.writeCallback, this._scriptHandler); +}; - if (name) - str += name; +ParserStream.prototype._resume = function () { + if (!this.pausedByScript) + throw new Error('Parser was already resumed'); - if (publicId !== null) - str += ' PUBLIC ' + enquoteDoctypeId(publicId); + while (this.pendingHtmlInsertions.length) { + var html = this.pendingHtmlInsertions.pop(); - else if (systemId !== null) - str += ' SYSTEM'; + this.parser.tokenizer.insertHtmlAtCurrentPos(html); + } - if (systemId !== null) - str += ' ' + enquoteDoctypeId(systemId); + this.pausedByScript = false; - return str; + //NOTE: keep parsing if we don't wait for the next input chunk + if (this.parser.tokenizer.active) + this._runParsingLoop(); }; +ParserStream.prototype._documentWrite = function (html) { + if (!this.parser.stopped) + this.pendingHtmlInsertions.push(html); +}; -/***/ }), -/* 335 */, -/* 336 */, -/* 337 */ -/***/ (function(module) { - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} +ParserStream.prototype._scriptHandler = function (scriptElement) { + if (this.listeners('script').length) { + this.pausedByScript = true; + this.emit('script', scriptElement, this._documentWrite, this._resume); + } + else + this._runParsingLoop(); +}; -module.exports = isObjectLike; /***/ }), -/* 338 */ -/***/ (function(module) { +/* 397 */, +/* 398 */, +/* 399 */, +/* 400 */, +/* 401 */, +/* 402 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -/** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ -function eq(value, other) { - return value === other || (value !== value && other !== other); -} +// DOM-Level-1-compliant structure +var NodePrototype = __webpack_require__(798); +var ElementPrototype = module.exports = Object.create(NodePrototype); -module.exports = eq; +var domLvl1 = { + tagName: "name" +}; + +Object.keys(domLvl1).forEach(function(key) { + var shorthand = domLvl1[key]; + Object.defineProperty(ElementPrototype, key, { + get: function() { + return this[shorthand] || null; + }, + set: function(val) { + this[shorthand] = val; + return val; + } + }); +}); /***/ }), -/* 339 */ +/* 403 */, +/* 404 */, +/* 405 */ /***/ (function(__unusedmodule, exports, __webpack_require__) { "use strict"; @@ -17212,2028 +17898,2138 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.urlDownloader = void 0; -const base = __importStar(__webpack_require__(122)); +exports.setEnvironmentFileOutputs = exports.setCacheVariable = exports.setPathVariables = void 0; /** - * Provide a path to a `constructor`-compatible installer downloaded from - * any URL, including `file://` URLs. - * - * ### Note - * The entire local URL is used as the cache key. + * Modify environment variables and action outputs. */ -exports.urlDownloader = { - label: "download a custom installer by URL", - provides: (inputs, options) => __awaiter(void 0, void 0, void 0, function* () { return !!inputs.installerUrl; }), - installerPath: (inputs, options) => __awaiter(void 0, void 0, void 0, function* () { - return { - localInstallerPath: yield base.ensureLocalInstaller({ - url: inputs.installerUrl, - }), - options: Object.assign(Object.assign({}, options), { useBundled: false }), - }; - }), -}; +const path = __importStar(__webpack_require__(622)); +const core = __importStar(__webpack_require__(470)); +const constants = __importStar(__webpack_require__(211)); +const conda = __importStar(__webpack_require__(506)); +const utils = __importStar(__webpack_require__(163)); +/** + * Add Conda executable to PATH environment variable + */ +function setPathVariables(options) { + return __awaiter(this, void 0, void 0, function* () { + const condaBin = path.join(conda.condaBasePath(options), "condabin"); + const condaPath = conda.condaBasePath(options); + core.info(`Add "${condaBin}" to PATH`); + core.addPath(condaBin); + if (!options.useBundled) { + core.info(`Set 'CONDA="${condaPath}"'`); + core.exportVariable("CONDA", condaPath); + } + }); +} +exports.setPathVariables = setPathVariables; +/** + * Ensure the conda cache path is available as an environment variable + */ +function setCacheVariable(options) { + return __awaiter(this, void 0, void 0, function* () { + const folder = utils.cacheFolder(); + yield conda.condaCommand(["config", "--add", "pkgs_dirs", folder], options); + core.exportVariable(constants.ENV_VAR_CONDA_PKGS, folder); + }); +} +exports.setCacheVariable = setCacheVariable; +/** + * Export the effective environment-file path + */ +function setEnvironmentFileOutputs(envFile, envContent, patched = false) { + core.setOutput(constants.OUTPUT_ENV_FILE_PATH, path.resolve(envFile)); + core.setOutput(constants.OUTPUT_ENV_FILE_CONTENT, envContent); + core.setOutput(constants.OUTPUT_ENV_FILE_WAS_PATCHED, patched ? "true" : "false"); + core.saveState(constants.OUTPUT_ENV_FILE_WAS_PATCHED, patched); +} +exports.setEnvironmentFileOutputs = setEnvironmentFileOutputs; /***/ }), -/* 340 */, -/* 341 */ +/* 406 */, +/* 407 */, +/* 408 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var baseFor = __webpack_require__(354), - keys = __webpack_require__(863); +var Symbol = __webpack_require__(498), + isArguments = __webpack_require__(460), + isArray = __webpack_require__(806); + +/** Built-in value references. */ +var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; /** - * The base implementation of `_.forOwn` without support for iteratee shorthands. + * Checks if `value` is a flattenable `arguments` object or array. * * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. */ -function baseForOwn(object, iteratee) { - return object && baseFor(object, iteratee, keys); +function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); } -module.exports = baseForOwn; +module.exports = isFlattenable; /***/ }), -/* 342 */, -/* 343 */ +/* 409 */, +/* 410 */, +/* 411 */, +/* 412 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var isKeyable = __webpack_require__(511); +var baseGetTag = __webpack_require__(51), + isLength = __webpack_require__(611), + isObjectLike = __webpack_require__(337); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; /** - * Gets the data for `map`. + * The base implementation of `_.isTypedArray` without Node.js optimizations. * * @private - * @param {Object} map The map to query. - * @param {string} key The reference key. - * @returns {*} Returns the map data. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. */ -function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) - ? data[typeof key == 'string' ? 'string' : 'hash'] - : data.map; +function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } -module.exports = getMapData; +module.exports = baseIsTypedArray; /***/ }), -/* 344 */ +/* 413 */ /***/ (function(module) { -"use strict"; +module.exports = require("stream"); +/***/ }), +/* 414 */ +/***/ (function(module, __unusedexports, __webpack_require__) { +"use strict"; -function isNothing(subject) { - return (typeof subject === 'undefined') || (subject === null); -} -function isObject(subject) { - return (typeof subject === 'object') && (subject !== null); -} +var yaml = __webpack_require__(819); -function toArray(sequence) { - if (Array.isArray(sequence)) return sequence; - else if (isNothing(sequence)) return []; +module.exports = yaml; - return [ sequence ]; -} +/***/ }), +/* 415 */, +/* 416 */, +/* 417 */ +/***/ (function(module) { -function extend(target, source) { - var index, length, key, sourceKeys; +module.exports = require("crypto"); - if (source) { - sourceKeys = Object.keys(source); +/***/ }), +/* 418 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - for (index = 0, length = sourceKeys.length; index < length; index += 1) { - key = sourceKeys[index]; - target[key] = source[key]; - } - } +var metaMap = __webpack_require__(156), + noop = __webpack_require__(439); - return target; -} +/** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ +var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); +}; - -function repeat(string, count) { - var result = '', cycle; - - for (cycle = 0; cycle < count; cycle += 1) { - result += string; - } - - return result; -} - - -function isNegativeZero(number) { - return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number); -} - - -module.exports.isNothing = isNothing; -module.exports.isObject = isObject; -module.exports.toArray = toArray; -module.exports.repeat = repeat; -module.exports.isNegativeZero = isNegativeZero; -module.exports.extend = extend; +module.exports = getData; /***/ }), -/* 345 */, -/* 346 */, -/* 347 */, -/* 348 */ -/***/ (function(module) { +/* 419 */, +/* 420 */, +/* 421 */, +/* 422 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var cloneArrayBuffer = __webpack_require__(517); /** - * A specialized version of `_.filter` for arrays without support for - * iteratee shorthands. + * Creates a clone of `typedArray`. * * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. */ -function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[resIndex++] = value; - } - } - return result; +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); } -module.exports = arrayFilter; +module.exports = cloneTypedArray; /***/ }), -/* 349 */ -/***/ (function(module) { - -"use strict"; - +/* 423 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -module.exports = function mergeOptions(defaults, options) { - options = options || Object.create(null); +var getNative = __webpack_require__(319), + root = __webpack_require__(824); - return [defaults, options].reduce(function (merged, optObj) { - Object.keys(optObj).forEach(function (key) { - merged[key] = optObj[key]; - }); +/* Built-in method references that are verified to be native. */ +var Set = getNative(root, 'Set'); - return merged; - }, Object.create(null)); -}; +module.exports = Set; /***/ }), -/* 350 */, -/* 351 */ +/* 424 */, +/* 425 */, +/* 426 */, +/* 427 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var isPrototype = __webpack_require__(514), - nativeKeys = __webpack_require__(773); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeys(object) { - if (!isPrototype(object)) { - return nativeKeys(object); - } - var result = []; - for (var key in Object(object)) { - if (hasOwnProperty.call(object, key) && key != 'constructor') { - result.push(key); - } - } - return result; -} - -module.exports = baseKeys; +module.exports = __webpack_require__(413); /***/ }), -/* 352 */ +/* 428 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var baseGet = __webpack_require__(356); +var baseToString = __webpack_require__(280); /** - * A specialized version of `baseProperty` which supports deep paths. + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. * - * @private - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' */ -function basePropertyDeep(path) { - return function(object) { - return baseGet(object, path); - }; +function toString(value) { + return value == null ? '' : baseToString(value); } -module.exports = basePropertyDeep; +module.exports = toString; /***/ }), -/* 353 */, -/* 354 */ +/* 429 */, +/* 430 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var createBaseFor = __webpack_require__(795); +var apply = __webpack_require__(512); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; /** - * The base implementation of `baseForOwn` which iterates over `object` - * properties returned by `keysFunc` and invokes `iteratee` for each property. - * Iteratee functions may exit iteration early by explicitly returning `false`. + * A specialized version of `baseRest` which transforms the rest array. * * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. */ -var baseFor = createBaseFor(); +function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); -module.exports = baseFor; + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; +} + +module.exports = overRest; /***/ }), -/* 355 */, -/* 356 */ -/***/ (function(module, __unusedexports, __webpack_require__) { +/* 431 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { -var castPath = __webpack_require__(929), - toKey = __webpack_require__(503); +"use strict"; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const os = __importStar(__webpack_require__(87)); +const utils_1 = __webpack_require__(82); /** - * The base implementation of `_.get` without support for default values. + * Commands * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @returns {*} Returns the resolved value. + * Command Format: + * ::name key=value,key=value::message + * + * Examples: + * ::warning::This is the message + * ::set-env name=MY_VAR::some value */ -function baseGet(object, path) { - path = castPath(path, object); - - var index = 0, - length = path.length; - - while (object != null && index < length) { - object = object[toKey(path[index++])]; - } - return (index && index == length) ? object : undefined; +function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os.EOL); } - -module.exports = baseGet; - - -/***/ }), -/* 357 */ -/***/ (function(module) { - -module.exports = require("assert"); +exports.issueCommand = issueCommand; +function issue(name, message = '') { + issueCommand(name, {}, message); +} +exports.issue = issue; +const CMD_STRING = '::'; +class Command { + constructor(command, properties, message) { + if (!command) { + command = 'missing.command'; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += ' '; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } + else { + cmdStr += ','; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } +} +function escapeData(s) { + return utils_1.toCommandValue(s) + .replace(/%/g, '%25') + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A'); +} +function escapeProperty(s) { + return utils_1.toCommandValue(s) + .replace(/%/g, '%25') + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A') + .replace(/:/g, '%3A') + .replace(/,/g, '%2C'); +} +//# sourceMappingURL=command.js.map /***/ }), -/* 358 */, -/* 359 */, -/* 360 */ +/* 432 */, +/* 433 */, +/* 434 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var baseHasIn = __webpack_require__(754), - hasPath = __webpack_require__(310); +var arrayFilter = __webpack_require__(348), + baseFilter = __webpack_require__(793), + baseIteratee = __webpack_require__(295), + isArray = __webpack_require__(806), + negate = __webpack_require__(316); /** - * Checks if `path` is a direct or inherited property of `object`. + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. * * @static * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.filter * @example * - * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; * - * _.hasIn(object, 'a'); - * // => true + * _.reject(users, function(o) { return !o.active; }); + * // => objects for ['fred'] * - * _.hasIn(object, 'a.b'); - * // => true + * // The `_.matches` iteratee shorthand. + * _.reject(users, { 'age': 40, 'active': true }); + * // => objects for ['barney'] * - * _.hasIn(object, ['a', 'b']); - * // => true + * // The `_.matchesProperty` iteratee shorthand. + * _.reject(users, ['active', false]); + * // => objects for ['fred'] * - * _.hasIn(object, 'b'); - * // => false + * // The `_.property` iteratee shorthand. + * _.reject(users, 'active'); + * // => objects for ['barney'] */ -function hasIn(object, path) { - return object != null && hasPath(object, path, baseHasIn); +function reject(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, negate(baseIteratee(predicate, 3))); } -module.exports = hasIn; +module.exports = reject; /***/ }), -/* 361 */, -/* 362 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var basePickBy = __webpack_require__(86), - hasIn = __webpack_require__(360); +/* 435 */, +/* 436 */, +/* 437 */, +/* 438 */ +/***/ (function(module) { /** - * The base implementation of `_.pick` without support for individual - * property identifiers. + * Converts `set` to an array of its values. * * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @returns {Object} Returns the new object. + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. */ -function basePick(object, paths) { - return basePickBy(object, paths, function(value, path) { - return hasIn(object, path); +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; }); + return result; } -module.exports = basePick; +module.exports = setToArray; /***/ }), -/* 363 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var baseAssignValue = __webpack_require__(772), - eq = __webpack_require__(338); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +/* 439 */ +/***/ (function(module) { /** - * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. + * This method returns `undefined`. * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] */ -function assignValue(object, key, value) { - var objValue = object[key]; - if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || - (value === undefined && !(key in object))) { - baseAssignValue(object, key, value); - } +function noop() { + // No operation performed. } -module.exports = assignValue; - - -/***/ }), -/* 364 */, -/* 365 */, -/* 366 */, -/* 367 */, -/* 368 */, -/* 369 */, -/* 370 */, -/* 371 */, -/* 372 */, -/* 373 */, -/* 374 */, -/* 375 */, -/* 376 */, -/* 377 */, -/* 378 */, -/* 379 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var getNative = __webpack_require__(319), - root = __webpack_require__(824); - -/* Built-in method references that are verified to be native. */ -var WeakMap = getNative(root, 'WeakMap'); - -module.exports = WeakMap; +module.exports = noop; /***/ }), -/* 380 */, -/* 381 */, -/* 382 */ +/* 440 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var getNative = __webpack_require__(319); - -var defineProperty = (function() { - try { - var func = getNative(Object, 'defineProperty'); - func({}, '', {}); - return func; - } catch (e) {} -}()); - -module.exports = defineProperty; - +var memoizeCapped = __webpack_require__(138); -/***/ }), -/* 383 */, -/* 384 */ -/***/ (function(module, __unusedexports, __webpack_require__) { +/** Used to match property names within property paths. */ +var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; -var LazyWrapper = __webpack_require__(922), - getData = __webpack_require__(418), - getFuncName = __webpack_require__(202), - lodash = __webpack_require__(751); +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; /** - * Checks if `func` has a lazy counterpart. + * Converts `string` to a property path array. * * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` has a lazy counterpart, - * else `false`. + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. */ -function isLaziable(func) { - var funcName = getFuncName(func), - other = lodash[funcName]; - - if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { - return false; - } - if (func === other) { - return true; +var stringToPath = memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); } - var data = getData(other); - return !!data && func === data[0]; -} + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); -module.exports = isLaziable; +module.exports = stringToPath; /***/ }), -/* 385 */, -/* 386 */ -/***/ (function(module, __unusedexports, __webpack_require__) { +/* 441 */, +/* 442 */ +/***/ (function(module) { "use strict"; -var Type = __webpack_require__(750); +module.exports = parse; -function resolveJavascriptUndefined() { - return true; -} +var re_name = /^(?:\\.|[\w\-\u00b0-\uFFFF])+/, + re_escape = /\\([\da-f]{1,6}\s?|(\s)|.)/ig, + //modified version of https://github.com/jquery/sizzle/blob/master/src/sizzle.js#L87 + re_attr = /^\s*((?:\\.|[\w\u00b0-\uFFFF\-])+)\s*(?:(\S?)=\s*(?:(['"])([^]*?)\3|(#?(?:\\.|[\w\u00b0-\uFFFF\-])*)|)|)\s*(i)?\]/; -function constructJavascriptUndefined() { - /*eslint-disable no-undefined*/ - return undefined; -} +var actionTypes = { + __proto__: null, + "undefined": "exists", + "": "equals", + "~": "element", + "^": "start", + "$": "end", + "*": "any", + "!": "not", + "|": "hyphen" +}; -function representJavascriptUndefined() { - return ''; -} +var simpleSelectors = { + __proto__: null, + ">": "child", + "<": "parent", + "~": "sibling", + "+": "adjacent" +}; -function isUndefined(object) { - return typeof object === 'undefined'; -} +var attribSelectors = { + __proto__: null, + "#": ["id", "equals"], + ".": ["class", "element"] +}; -module.exports = new Type('tag:yaml.org,2002:js/undefined', { - kind: 'scalar', - resolve: resolveJavascriptUndefined, - construct: constructJavascriptUndefined, - predicate: isUndefined, - represent: representJavascriptUndefined -}); +//pseudos, whose data-property is parsed as well +var unpackPseudos = { + __proto__: null, + "has": true, + "not": true, + "matches": true +}; +var stripQuotesFromPseudos = { + __proto__: null, + "contains": true, + "icontains": true +}; -/***/ }), -/* 387 */, -/* 388 */, -/* 389 */ -/***/ (function(module, __unusedexports, __webpack_require__) { +var quotes = { + __proto__: null, + "\"": true, + "'": true +}; -var baseTimes = __webpack_require__(553), - isArguments = __webpack_require__(460), - isArray = __webpack_require__(143), - isBuffer = __webpack_require__(546), - isIndex = __webpack_require__(160), - isTypedArray = __webpack_require__(850); +//unescape function taken from https://github.com/jquery/sizzle/blob/master/src/sizzle.js#L139 +function funescape( _, escaped, escapedWhitespace ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + // Support: Firefox + // Workaround erroneous numeric interpretation of +"0x" + return high !== high || escapedWhitespace ? + escaped : + // BMP codepoint + high < 0 ? + String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); +} -/** Used for built-in method references. */ -var objectProto = Object.prototype; +function unescapeCSS(str){ + return str.replace(re_escape, funescape); +} -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +function isWhitespace(c){ + return c === " " || c === "\n" || c === "\t" || c === "\f" || c === "\r"; +} -/** - * Creates an array of the enumerable property names of the array-like `value`. - * - * @private - * @param {*} value The value to query. - * @param {boolean} inherited Specify returning inherited property names. - * @returns {Array} Returns the array of property names. - */ -function arrayLikeKeys(value, inherited) { - var isArr = isArray(value), - isArg = !isArr && isArguments(value), - isBuff = !isArr && !isArg && isBuffer(value), - isType = !isArr && !isArg && !isBuff && isTypedArray(value), - skipIndexes = isArr || isArg || isBuff || isType, - result = skipIndexes ? baseTimes(value.length, String) : [], - length = result.length; +function parse(selector, options){ + var subselects = []; - for (var key in value) { - if ((inherited || hasOwnProperty.call(value, key)) && - !(skipIndexes && ( - // Safari 9 has enumerable `arguments.length` in strict mode. - key == 'length' || - // Node.js 0.10 has enumerable non-index properties on buffers. - (isBuff && (key == 'offset' || key == 'parent')) || - // PhantomJS 2 has enumerable non-index properties on typed arrays. - (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || - // Skip index properties. - isIndex(key, length) - ))) { - result.push(key); - } - } - return result; + selector = parseSelector(subselects, selector + "", options); + + if(selector !== ""){ + throw new SyntaxError("Unmatched selector: " + selector); + } + + return subselects; } -module.exports = arrayLikeKeys; +function parseSelector(subselects, selector, options){ + var tokens = [], + sawWS = false, + data, firstChar, name, quot; + function getName(){ + var sub = selector.match(re_name)[0]; + selector = selector.substr(sub.length); + return unescapeCSS(sub); + } -/***/ }), -/* 390 */, -/* 391 */ -/***/ (function(module, __unusedexports, __webpack_require__) { + function stripWhitespace(start){ + while(isWhitespace(selector.charAt(start))) start++; + selector = selector.substr(start); + } -var arrayFilter = __webpack_require__(348), - baseFilter = __webpack_require__(793), - baseIteratee = __webpack_require__(295), - isArray = __webpack_require__(143); + function isEscaped(pos) { + var slashCount = 0; -/** - * Iterates over elements of `collection`, returning an array of all elements - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * **Note:** Unlike `_.remove`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - * @see _.reject - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * _.filter(users, function(o) { return !o.active; }); - * // => objects for ['fred'] - * - * // The `_.matches` iteratee shorthand. - * _.filter(users, { 'age': 36, 'active': true }); - * // => objects for ['barney'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.filter(users, ['active', false]); - * // => objects for ['fred'] - * - * // The `_.property` iteratee shorthand. - * _.filter(users, 'active'); - * // => objects for ['barney'] - * - * // Combining several predicates using `_.overEvery` or `_.overSome`. - * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); - * // => objects for ['fred', 'barney'] - */ -function filter(collection, predicate) { - var func = isArray(collection) ? arrayFilter : baseFilter; - return func(collection, baseIteratee(predicate, 3)); -} + while (selector.charAt(--pos) === "\\") slashCount++; + return (slashCount & 1) === 1; + } -module.exports = filter; + stripWhitespace(0); + while(selector !== ""){ + firstChar = selector.charAt(0); -/***/ }), -/* 392 */, -/* 393 */ -/***/ (function(module) { + if(isWhitespace(firstChar)){ + sawWS = true; + stripWhitespace(1); + } else if(firstChar in simpleSelectors){ + tokens.push({type: simpleSelectors[firstChar]}); + sawWS = false; -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; -} + stripWhitespace(1); + } else if(firstChar === ","){ + if(tokens.length === 0){ + throw new SyntaxError("empty sub-selector"); + } + subselects.push(tokens); + tokens = []; + sawWS = false; + stripWhitespace(1); + } else { + if(sawWS){ + if(tokens.length > 0){ + tokens.push({type: "descendant"}); + } + sawWS = false; + } -module.exports = overArg; + if(firstChar === "*"){ + selector = selector.substr(1); + tokens.push({type: "universal"}); + } else if(firstChar in attribSelectors){ + selector = selector.substr(1); + tokens.push({ + type: "attribute", + name: attribSelectors[firstChar][0], + action: attribSelectors[firstChar][1], + value: getName(), + ignoreCase: false + }); + } else if(firstChar === "["){ + selector = selector.substr(1); + data = selector.match(re_attr); + if(!data){ + throw new SyntaxError("Malformed attribute selector: " + selector); + } + selector = selector.substr(data[0].length); + name = unescapeCSS(data[1]); + if( + !options || ( + "lowerCaseAttributeNames" in options ? + options.lowerCaseAttributeNames : + !options.xmlMode + ) + ){ + name = name.toLowerCase(); + } -/***/ }), -/* 394 */, -/* 395 */, -/* 396 */ -/***/ (function(module, __unusedexports, __webpack_require__) { + tokens.push({ + type: "attribute", + name: name, + action: actionTypes[data[2]], + value: unescapeCSS(data[4] || data[5] || ""), + ignoreCase: !!data[6] + }); -"use strict"; + } else if(firstChar === ":"){ + if(selector.charAt(1) === ":"){ + selector = selector.substr(2); + tokens.push({type: "pseudo-element", name: getName().toLowerCase()}); + continue; + } + selector = selector.substr(1); -var WritableStream = __webpack_require__(413).Writable, - inherits = __webpack_require__(669).inherits, - Parser = __webpack_require__(60); + name = getName().toLowerCase(); + data = null; -var ParserStream = module.exports = function (options) { - WritableStream.call(this); + if(selector.charAt(0) === "("){ + if(name in unpackPseudos){ + quot = selector.charAt(1); + var quoted = quot in quotes; - this.parser = new Parser(options); + selector = selector.substr(quoted + 1); - this.lastChunkWritten = false; - this.writeCallback = null; - this.pausedByScript = false; + data = []; + selector = parseSelector(data, selector, options); - this.document = this.parser.treeAdapter.createDocument(); + if(quoted){ + if(selector.charAt(0) !== quot){ + throw new SyntaxError("unmatched quotes in :" + name); + } else { + selector = selector.substr(1); + } + } - this.pendingHtmlInsertions = []; + if(selector.charAt(0) !== ")"){ + throw new SyntaxError("missing closing parenthesis in :" + name + " " + selector); + } - this._resume = this._resume.bind(this); - this._documentWrite = this._documentWrite.bind(this); - this._scriptHandler = this._scriptHandler.bind(this); + selector = selector.substr(1); + } else { + var pos = 1, counter = 1; - this.parser._bootstrap(this.document, null); -}; + for(; counter > 0 && pos < selector.length; pos++){ + if(selector.charAt(pos) === "(" && !isEscaped(pos)) counter++; + else if(selector.charAt(pos) === ")" && !isEscaped(pos)) counter--; + } -inherits(ParserStream, WritableStream); + if(counter){ + throw new SyntaxError("parenthesis not matched"); + } -//WritableStream implementation -ParserStream.prototype._write = function (chunk, encoding, callback) { - this.writeCallback = callback; - this.parser.tokenizer.write(chunk.toString('utf8'), this.lastChunkWritten); - this._runParsingLoop(); -}; + data = selector.substr(1, pos - 2); + selector = selector.substr(pos); -ParserStream.prototype.end = function (chunk, encoding, callback) { - this.lastChunkWritten = true; - WritableStream.prototype.end.call(this, chunk || '', encoding, callback); -}; + if(name in stripQuotesFromPseudos){ + quot = data.charAt(0); -//Scriptable parser implementation -ParserStream.prototype._runParsingLoop = function () { - this.parser.runParsingLoopForCurrentChunk(this.writeCallback, this._scriptHandler); -}; + if(quot === data.slice(-1) && quot in quotes){ + data = data.slice(1, -1); + } -ParserStream.prototype._resume = function () { - if (!this.pausedByScript) - throw new Error('Parser was already resumed'); + data = unescapeCSS(data); + } + } + } - while (this.pendingHtmlInsertions.length) { - var html = this.pendingHtmlInsertions.pop(); + tokens.push({type: "pseudo", name: name, data: data}); + } else if(re_name.test(selector)){ + name = getName(); - this.parser.tokenizer.insertHtmlAtCurrentPos(html); - } + if(!options || ("lowerCaseTags" in options ? options.lowerCaseTags : !options.xmlMode)){ + name = name.toLowerCase(); + } - this.pausedByScript = false; + tokens.push({type: "tag", name: name}); + } else { + if(tokens.length && tokens[tokens.length - 1].type === "descendant"){ + tokens.pop(); + } + addToken(subselects, tokens); + return selector; + } + } + } - //NOTE: keep parsing if we don't wait for the next input chunk - if (this.parser.tokenizer.active) - this._runParsingLoop(); -}; + addToken(subselects, tokens); -ParserStream.prototype._documentWrite = function (html) { - if (!this.parser.stopped) - this.pendingHtmlInsertions.push(html); -}; + return selector; +} -ParserStream.prototype._scriptHandler = function (scriptElement) { - if (this.listeners('script').length) { - this.pausedByScript = true; - this.emit('script', scriptElement, this._documentWrite, this._resume); - } - else - this._runParsingLoop(); -}; +function addToken(subselects, tokens){ + if(subselects.length > 0 && tokens.length === 0){ + throw new SyntaxError("empty sub-selector"); + } + subselects.push(tokens); +} /***/ }), -/* 397 */, -/* 398 */, -/* 399 */, -/* 400 */, -/* 401 */, -/* 402 */ -/***/ (function(module, __unusedexports, __webpack_require__) { +/* 443 */, +/* 444 */, +/* 445 */ +/***/ (function(module) { -// DOM-Level-1-compliant structure -var NodePrototype = __webpack_require__(798); -var ElementPrototype = module.exports = Object.create(NodePrototype); +/** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; -var domLvl1 = { - tagName: "name" -}; + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; +} -Object.keys(domLvl1).forEach(function(key) { - var shorthand = domLvl1[key]; - Object.defineProperty(ElementPrototype, key, { - get: function() { - return this[shorthand] || null; - }, - set: function(val) { - this[shorthand] = val; - return val; - } - }); -}); +module.exports = arrayReduce; /***/ }), -/* 403 */, -/* 404 */, -/* 405 */ +/* 446 */, +/* 447 */, +/* 448 */, +/* 449 */ /***/ (function(__unusedmodule, exports, __webpack_require__) { -"use strict"; +var domEach = __webpack_require__(140).domEach, + _ = { + pick: __webpack_require__(320), + }; + +var toString = Object.prototype.toString; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.setEnvironmentFileOutputs = exports.setCacheVariable = exports.setPathVariables = void 0; -/** - * Modify environment variables and action outputs. - */ -const path = __importStar(__webpack_require__(622)); -const core = __importStar(__webpack_require__(470)); -const constants = __importStar(__webpack_require__(211)); -const conda = __importStar(__webpack_require__(259)); -const utils = __importStar(__webpack_require__(163)); -/** - * Add Conda executable to PATH environment variable - */ -function setPathVariables(options) { - return __awaiter(this, void 0, void 0, function* () { - const condaBin = path.join(conda.condaBasePath(options), "condabin"); - const condaPath = conda.condaBasePath(options); - core.info(`Add "${condaBin}" to PATH`); - core.addPath(condaBin); - if (!options.useBundled) { - core.info(`Set 'CONDA="${condaPath}"'`); - core.exportVariable("CONDA", condaPath); - } - }); -} -exports.setPathVariables = setPathVariables; /** - * Ensure the conda cache path is available as an environment variable + * Set / Get css. + * + * @param {String|Object} prop + * @param {String} val + * @return {self} + * @api public */ -function setCacheVariable(options) { - return __awaiter(this, void 0, void 0, function* () { - const folder = utils.cacheFolder(); - yield conda.condaCommand(["config", "--add", "pkgs_dirs", folder], options); - core.exportVariable(constants.ENV_VAR_CONDA_PKGS, folder); + +exports.css = function(prop, val) { + if (arguments.length === 2 || + // When `prop` is a "plain" object + (toString.call(prop) === '[object Object]')) { + return domEach(this, function(idx, el) { + setCss(el, prop, val, idx); }); -} -exports.setCacheVariable = setCacheVariable; + } else { + return getCss(this[0], prop); + } +}; + /** - * Export the effective environment-file path + * Set styles of all elements. + * + * @param {String|Object} prop + * @param {String} val + * @param {Number} idx - optional index within the selection + * @return {self} + * @api private */ -function setEnvironmentFileOutputs(envFile, envContent, patched = false) { - core.setOutput(constants.OUTPUT_ENV_FILE_PATH, path.resolve(envFile)); - core.setOutput(constants.OUTPUT_ENV_FILE_CONTENT, envContent); - core.setOutput(constants.OUTPUT_ENV_FILE_WAS_PATCHED, patched ? "true" : "false"); - core.saveState(constants.OUTPUT_ENV_FILE_WAS_PATCHED, patched); -} -exports.setEnvironmentFileOutputs = setEnvironmentFileOutputs; +function setCss(el, prop, val, idx) { + if ('string' == typeof prop) { + var styles = getCss(el); + if (typeof val === 'function') { + val = val.call(el, idx, styles[prop]); + } -/***/ }), -/* 406 */, -/* 407 */, -/* 408 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var Symbol = __webpack_require__(498), - isArguments = __webpack_require__(460), - isArray = __webpack_require__(143); + if (val === '') { + delete styles[prop]; + } else if (val != null) { + styles[prop] = val; + } -/** Built-in value references. */ -var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; + el.attribs.style = stringify(styles); + } else if ('object' == typeof prop) { + Object.keys(prop).forEach(function(k){ + setCss(el, k, prop[k]); + }); + } +} /** - * Checks if `value` is a flattenable `arguments` object or array. + * Get parsed styles of the first element. * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + * @param {String} prop + * @return {Object} + * @api private */ -function isFlattenable(value) { - return isArray(value) || isArguments(value) || - !!(spreadableSymbol && value && value[spreadableSymbol]); -} - -module.exports = isFlattenable; - - -/***/ }), -/* 409 */, -/* 410 */, -/* 411 */, -/* 412 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var baseGetTag = __webpack_require__(51), - isLength = __webpack_require__(611), - isObjectLike = __webpack_require__(337); -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - weakMapTag = '[object WeakMap]'; +function getCss(el, prop) { + var styles = parse(el.attribs.style); + if (typeof prop === 'string') { + return styles[prop]; + } else if (Array.isArray(prop)) { + return _.pick(styles, prop); + } else { + return styles; + } +} -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; +/** + * Stringify `obj` to styles. + * + * @param {Object} obj + * @return {Object} + * @api private + */ -/** Used to identify `toStringTag` values of typed arrays. */ -var typedArrayTags = {}; -typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = -typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = -typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = -typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = -typedArrayTags[uint32Tag] = true; -typedArrayTags[argsTag] = typedArrayTags[arrayTag] = -typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = -typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = -typedArrayTags[errorTag] = typedArrayTags[funcTag] = -typedArrayTags[mapTag] = typedArrayTags[numberTag] = -typedArrayTags[objectTag] = typedArrayTags[regexpTag] = -typedArrayTags[setTag] = typedArrayTags[stringTag] = -typedArrayTags[weakMapTag] = false; +function stringify(obj) { + return Object.keys(obj || {}) + .reduce(function(str, prop){ + return str += '' + + (str ? ' ' : '') + + prop + + ': ' + + obj[prop] + + ';'; + }, ''); +} /** - * The base implementation of `_.isTypedArray` without Node.js optimizations. + * Parse `styles`. * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @param {String} styles + * @return {Object} + * @api private */ -function baseIsTypedArray(value) { - return isObjectLike(value) && - isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; -} -module.exports = baseIsTypedArray; +function parse(styles) { + styles = (styles || '').trim(); + if (!styles) return {}; -/***/ }), -/* 413 */ -/***/ (function(module) { + return styles + .split(';') + .reduce(function(obj, str){ + var n = str.indexOf(':'); + // skip if there is no :, or if it is the first/last character + if (n < 1 || n === str.length-1) return obj; + obj[str.slice(0,n).trim()] = str.slice(n+1).trim(); + return obj; + }, {}); +} -module.exports = require("stream"); /***/ }), -/* 414 */ +/* 450 */ /***/ (function(module, __unusedexports, __webpack_require__) { "use strict"; +var Type = __webpack_require__(750); -var yaml = __webpack_require__(819); - - -module.exports = yaml; +module.exports = new Type('tag:yaml.org,2002:str', { + kind: 'scalar', + construct: function (data) { return data !== null ? data : ''; } +}); /***/ }), -/* 415 */, -/* 416 */, -/* 417 */ +/* 451 */ /***/ (function(module) { -module.exports = require("crypto"); - -/***/ }), -/* 418 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var metaMap = __webpack_require__(156), - noop = __webpack_require__(439); - /** - * Gets metadata for `func`. + * This method returns `false`. * - * @private - * @param {Function} func The function to query. - * @returns {*} Returns the metadata for `func`. + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] */ -var getData = !metaMap ? noop : function(func) { - return metaMap.get(func); -}; +function stubFalse() { + return false; +} -module.exports = getData; +module.exports = stubFalse; /***/ }), -/* 419 */, -/* 420 */, -/* 421 */, -/* 422 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var cloneArrayBuffer = __webpack_require__(600); +/* 452 */, +/* 453 */, +/* 454 */, +/* 455 */ +/***/ (function(module) { /** - * Creates a clone of `typedArray`. + * The base implementation of `_.isNaN` without support for number objects. * * @private - * @param {Object} typedArray The typed array to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned typed array. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. */ -function cloneTypedArray(typedArray, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; - return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); +function baseIsNaN(value) { + return value !== value; } -module.exports = cloneTypedArray; +module.exports = baseIsNaN; /***/ }), -/* 423 */ +/* 456 */, +/* 457 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var getNative = __webpack_require__(319), - root = __webpack_require__(824); +var arrayEach = __webpack_require__(698), + arrayIncludes = __webpack_require__(260); -/* Built-in method references that are verified to be native. */ -var Set = getNative(root, 'Set'); +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; -module.exports = Set; +/** Used to associate wrap methods with their bit flags. */ +var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG] +]; + +/** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ +function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = '_.' + pair[0]; + if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); +} + +module.exports = updateWrapDetails; /***/ }), -/* 424 */, -/* 425 */, -/* 426 */, -/* 427 */ +/* 458 */, +/* 459 */, +/* 460 */ /***/ (function(module, __unusedexports, __webpack_require__) { -module.exports = __webpack_require__(413); +var baseIsArguments = __webpack_require__(208), + isObjectLike = __webpack_require__(337); +/** Used for built-in method references. */ +var objectProto = Object.prototype; -/***/ }), -/* 428 */ -/***/ (function(module, __unusedexports, __webpack_require__) { +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; -var baseToString = __webpack_require__(99); +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; /** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. + * Checks if `value` is likely an `arguments` object. * * @static * @memberOf _ - * @since 4.0.0 + * @since 0.1.0 * @category Lang - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. * @example * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' + * _.isArguments(function() { return arguments; }()); + * // => true * - * _.toString([1, 2, 3]); - * // => '1,2,3' + * _.isArguments([1, 2, 3]); + * // => false */ -function toString(value) { - return value == null ? '' : baseToString(value); -} +var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); +}; -module.exports = toString; +module.exports = isArguments; /***/ }), -/* 429 */, -/* 430 */ +/* 461 */, +/* 462 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var apply = __webpack_require__(512); +const SemVer = __webpack_require__(65) +const Comparator = __webpack_require__(174) +const {ANY} = Comparator +const Range = __webpack_require__(124) +const satisfies = __webpack_require__(310) +const gt = __webpack_require__(486) +const lt = __webpack_require__(586) +const lte = __webpack_require__(898) +const gte = __webpack_require__(167) + +const outside = (version, range, hilo, options) => { + version = new SemVer(version, options) + range = new Range(range, options) -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; + let gtfn, ltefn, ltfn, comp, ecomp + switch (hilo) { + case '>': + gtfn = gt + ltefn = lte + ltfn = lt + comp = '>' + ecomp = '>=' + break + case '<': + gtfn = lt + ltefn = gte + ltfn = gt + comp = '<' + ecomp = '<=' + break + default: + throw new TypeError('Must provide a hilo val of "<" or ">"') + } -/** - * A specialized version of `baseRest` which transforms the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @param {Function} transform The rest array transform. - * @returns {Function} Returns the new function. - */ -function overRest(func, start, transform) { - start = nativeMax(start === undefined ? (func.length - 1) : start, 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); + // If it satisfies the range it is not outside + if (satisfies(version, range, options)) { + return false + } - while (++index < length) { - array[index] = args[start + index]; + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i] + + let high = null + let low = null + + comparators.forEach((comparator) => { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator + low = low || comparator + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator + } + }) + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false } - index = -1; - var otherArgs = Array(start + 1); - while (++index < start) { - otherArgs[index] = args[index]; + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false } - otherArgs[start] = transform(array); - return apply(func, this, otherArgs); - }; + } + return true } -module.exports = overRest; +module.exports = outside /***/ }), -/* 431 */ -/***/ (function(__unusedmodule, exports, __webpack_require__) { +/* 463 */, +/* 464 */, +/* 465 */, +/* 466 */, +/* 467 */, +/* 468 */ +/***/ (function(__unusedmodule, exports) { "use strict"; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const os = __importStar(__webpack_require__(87)); -const utils_1 = __webpack_require__(82); -/** - * Commands - * - * Command Format: - * ::name key=value,key=value::message +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.bundledMinicondaUser = void 0; +/** + * Provide a path to the pre-bundled (but probably old) Miniconda base installation * - * Examples: - * ::warning::This is the message - * ::set-env name=MY_VAR::some value + * ### Note + * This is the "cheapest" provider: if miniconda is already on disk, it can be + * fastest to avoid the download/install and use what's already on the image. */ -function issueCommand(command, properties, message) { - const cmd = new Command(command, properties, message); - process.stdout.write(cmd.toString() + os.EOL); +exports.bundledMinicondaUser = { + label: "use bundled Miniconda", + provides: (inputs, options) => __awaiter(void 0, void 0, void 0, function* () { + return (inputs.minicondaVersion === "" && + inputs.miniforgeVariant === "" && + inputs.miniforgeVersion === "" && + inputs.architecture === "x64" && + inputs.installerUrl === ""); + }), + installerPath: (inputs, options) => __awaiter(void 0, void 0, void 0, function* () { + // No actions are performed. This is the only place `useBundled` will ever be true. + return { + localInstallerPath: "", + options: Object.assign(Object.assign({}, options), { useBundled: true }), + }; + }), +}; + + +/***/ }), +/* 469 */, +/* 470 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const command_1 = __webpack_require__(431); +const file_command_1 = __webpack_require__(102); +const utils_1 = __webpack_require__(82); +const os = __importStar(__webpack_require__(87)); +const path = __importStar(__webpack_require__(622)); +/** + * The code to exit an action + */ +var ExitCode; +(function (ExitCode) { + /** + * A code indicating that the action was successful + */ + ExitCode[ExitCode["Success"] = 0] = "Success"; + /** + * A code indicating that the action was a failure + */ + ExitCode[ExitCode["Failure"] = 1] = "Failure"; +})(ExitCode = exports.ExitCode || (exports.ExitCode = {})); +//----------------------------------------------------------------------- +// Variables +//----------------------------------------------------------------------- +/** + * Sets env variable for this action and future actions in the job + * @param name the name of the variable to set + * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function exportVariable(name, val) { + const convertedVal = utils_1.toCommandValue(val); + process.env[name] = convertedVal; + const filePath = process.env['GITHUB_ENV'] || ''; + if (filePath) { + const delimiter = '_GitHubActionsFileCommandDelimeter_'; + const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`; + file_command_1.issueCommand('ENV', commandValue); + } + else { + command_1.issueCommand('set-env', { name }, convertedVal); + } } -exports.issueCommand = issueCommand; -function issue(name, message = '') { - issueCommand(name, {}, message); +exports.exportVariable = exportVariable; +/** + * Registers a secret which will get masked from logs + * @param secret value of the secret + */ +function setSecret(secret) { + command_1.issueCommand('add-mask', {}, secret); } -exports.issue = issue; -const CMD_STRING = '::'; -class Command { - constructor(command, properties, message) { - if (!command) { - command = 'missing.command'; - } - this.command = command; - this.properties = properties; - this.message = message; +exports.setSecret = setSecret; +/** + * Prepends inputPath to the PATH (for this action and future actions) + * @param inputPath + */ +function addPath(inputPath) { + const filePath = process.env['GITHUB_PATH'] || ''; + if (filePath) { + file_command_1.issueCommand('PATH', inputPath); } - toString() { - let cmdStr = CMD_STRING + this.command; - if (this.properties && Object.keys(this.properties).length > 0) { - cmdStr += ' '; - let first = true; - for (const key in this.properties) { - if (this.properties.hasOwnProperty(key)) { - const val = this.properties[key]; - if (val) { - if (first) { - first = false; - } - else { - cmdStr += ','; - } - cmdStr += `${key}=${escapeProperty(val)}`; - } - } - } - } - cmdStr += `${CMD_STRING}${escapeData(this.message)}`; - return cmdStr; + else { + command_1.issueCommand('add-path', {}, inputPath); } + process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; } -function escapeData(s) { - return utils_1.toCommandValue(s) - .replace(/%/g, '%25') - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A'); +exports.addPath = addPath; +/** + * Gets the value of an input. The value is also trimmed. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string + */ +function getInput(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + return val.trim(); } -function escapeProperty(s) { - return utils_1.toCommandValue(s) - .replace(/%/g, '%25') - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A') - .replace(/:/g, '%3A') - .replace(/,/g, '%2C'); +exports.getInput = getInput; +/** + * Sets the value of an output. + * + * @param name name of the output to set + * @param value value to store. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function setOutput(name, value) { + command_1.issueCommand('set-output', { name }, value); } -//# sourceMappingURL=command.js.map - -/***/ }), -/* 432 */, -/* 433 */, -/* 434 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var arrayFilter = __webpack_require__(348), - baseFilter = __webpack_require__(793), - baseIteratee = __webpack_require__(295), - isArray = __webpack_require__(143), - negate = __webpack_require__(316); - +exports.setOutput = setOutput; /** - * The opposite of `_.filter`; this method returns the elements of `collection` - * that `predicate` does **not** return truthy for. + * Enables or disables the echoing of commands into stdout for the rest of the step. + * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - * @see _.filter - * @example + */ +function setCommandEcho(enabled) { + command_1.issue('echo', enabled ? 'on' : 'off'); +} +exports.setCommandEcho = setCommandEcho; +//----------------------------------------------------------------------- +// Results +//----------------------------------------------------------------------- +/** + * Sets the action status to failed. + * When the action exits it will be with an exit code of 1 + * @param message add error issue message + */ +function setFailed(message) { + process.exitCode = ExitCode.Failure; + error(message); +} +exports.setFailed = setFailed; +//----------------------------------------------------------------------- +// Logging Commands +//----------------------------------------------------------------------- +/** + * Gets whether Actions Step Debug is on or not + */ +function isDebug() { + return process.env['RUNNER_DEBUG'] === '1'; +} +exports.isDebug = isDebug; +/** + * Writes debug message to user log + * @param message debug message + */ +function debug(message) { + command_1.issueCommand('debug', {}, message); +} +exports.debug = debug; +/** + * Adds an error issue + * @param message error issue message. Errors will be converted to string via toString() + */ +function error(message) { + command_1.issue('error', message instanceof Error ? message.toString() : message); +} +exports.error = error; +/** + * Adds an warning issue + * @param message warning issue message. Errors will be converted to string via toString() + */ +function warning(message) { + command_1.issue('warning', message instanceof Error ? message.toString() : message); +} +exports.warning = warning; +/** + * Writes info to log with console.log. + * @param message info message + */ +function info(message) { + process.stdout.write(message + os.EOL); +} +exports.info = info; +/** + * Begin an output group. * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false }, - * { 'user': 'fred', 'age': 40, 'active': true } - * ]; + * Output until the next `groupEnd` will be foldable in this group * - * _.reject(users, function(o) { return !o.active; }); - * // => objects for ['fred'] + * @param name The name of the output group + */ +function startGroup(name) { + command_1.issue('group', name); +} +exports.startGroup = startGroup; +/** + * End an output group. + */ +function endGroup() { + command_1.issue('endgroup'); +} +exports.endGroup = endGroup; +/** + * Wrap an asynchronous function call in a group. * - * // The `_.matches` iteratee shorthand. - * _.reject(users, { 'age': 40, 'active': true }); - * // => objects for ['barney'] + * Returns the same type as the function itself. * - * // The `_.matchesProperty` iteratee shorthand. - * _.reject(users, ['active', false]); - * // => objects for ['fred'] + * @param name The name of the group + * @param fn The function to wrap in the group + */ +function group(name, fn) { + return __awaiter(this, void 0, void 0, function* () { + startGroup(name); + let result; + try { + result = yield fn(); + } + finally { + endGroup(); + } + return result; + }); +} +exports.group = group; +//----------------------------------------------------------------------- +// Wrapper action state +//----------------------------------------------------------------------- +/** + * Saves state for current action, the state can only be retrieved by this action's post job execution. * - * // The `_.property` iteratee shorthand. - * _.reject(users, 'active'); - * // => objects for ['barney'] + * @param name name of the state to store + * @param value value to store. Non-string values will be converted to a string via JSON.stringify */ -function reject(collection, predicate) { - var func = isArray(collection) ? arrayFilter : baseFilter; - return func(collection, negate(baseIteratee(predicate, 3))); +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function saveState(name, value) { + command_1.issueCommand('save-state', { name }, value); } - -module.exports = reject; - - -/***/ }), -/* 435 */, -/* 436 */, -/* 437 */, -/* 438 */ -/***/ (function(module) { - +exports.saveState = saveState; /** - * Converts `set` to an array of its values. + * Gets the value of an state set by this action's main execution. * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. + * @param name name of the state to get + * @returns string */ -function setToArray(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = value; - }); - return result; +function getState(name) { + return process.env[`STATE_${name}`] || ''; } +exports.getState = getState; +//# sourceMappingURL=core.js.map -module.exports = setToArray; +/***/ }), +/* 471 */, +/* 472 */ +/***/ (function(module, __unusedexports, __webpack_require__) { +var assignValue = __webpack_require__(363), + copyObject = __webpack_require__(875), + createAssigner = __webpack_require__(797), + isArrayLike = __webpack_require__(146), + isPrototype = __webpack_require__(514), + keys = __webpack_require__(863); -/***/ }), -/* 439 */ -/***/ (function(module) { +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; /** - * This method returns `undefined`. + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). * * @static * @memberOf _ - * @since 2.3.0 - * @category Util + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn * @example * - * _.times(2, _.noop); - * // => [undefined, undefined] + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } */ -function noop() { - // No operation performed. -} +var assign = createAssigner(function(object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } +}); -module.exports = noop; +module.exports = assign; /***/ }), -/* 440 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var memoizeCapped = __webpack_require__(138); +/* 473 */ +/***/ (function(module) { -/** Used to match property names within property paths. */ -var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; +/** Used for built-in method references. */ +var funcProto = Function.prototype; -/** Used to match backslashes in property paths. */ -var reEscapeChar = /\\(\\)?/g; +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; /** - * Converts `string` to a property path array. + * Converts `func` to its source code. * * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. */ -var stringToPath = memoizeCapped(function(string) { - var result = []; - if (string.charCodeAt(0) === 46 /* . */) { - result.push(''); +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} } - string.replace(rePropName, function(match, number, quote, subString) { - result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; -}); + return ''; +} -module.exports = stringToPath; +module.exports = toSource; /***/ }), -/* 441 */, -/* 442 */ -/***/ (function(module) { +/* 474 */, +/* 475 */, +/* 476 */, +/* 477 */, +/* 478 */, +/* 479 */, +/* 480 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -"use strict"; +const Range = __webpack_require__(124) +const validRange = (range, options) => { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, options).range || '*' + } catch (er) { + return null + } +} +module.exports = validRange -module.exports = parse; +/***/ }), +/* 481 */, +/* 482 */, +/* 483 */, +/* 484 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -var re_name = /^(?:\\.|[\w\-\u00b0-\uFFFF])+/, - re_escape = /\\([\da-f]{1,6}\s?|(\s)|.)/ig, - //modified version of https://github.com/jquery/sizzle/blob/master/src/sizzle.js#L87 - re_attr = /^\s*((?:\\.|[\w\u00b0-\uFFFF\-])+)\s*(?:(\S?)=\s*(?:(['"])([^]*?)\3|(#?(?:\\.|[\w\u00b0-\uFFFF\-])*)|)|)\s*(i)?\]/; +var isSymbol = __webpack_require__(186); -var actionTypes = { - __proto__: null, - "undefined": "exists", - "": "equals", - "~": "element", - "^": "start", - "$": "end", - "*": "any", - "!": "not", - "|": "hyphen" -}; +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; -var simpleSelectors = { - __proto__: null, - ">": "child", - "<": "parent", - "~": "sibling", - "+": "adjacent" -}; +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} -var attribSelectors = { - __proto__: null, - "#": ["id", "equals"], - ".": ["class", "element"] -}; +module.exports = toKey; -//pseudos, whose data-property is parsed as well -var unpackPseudos = { - __proto__: null, - "has": true, - "not": true, - "matches": true -}; -var stripQuotesFromPseudos = { - __proto__: null, - "contains": true, - "icontains": true -}; +/***/ }), +/* 485 */, +/* 486 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -var quotes = { - __proto__: null, - "\"": true, - "'": true -}; +const compare = __webpack_require__(874) +const gt = (a, b, loose) => compare(a, b, loose) > 0 +module.exports = gt -//unescape function taken from https://github.com/jquery/sizzle/blob/master/src/sizzle.js#L139 -function funescape( _, escaped, escapedWhitespace ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - // Support: Firefox - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace ? - escaped : - // BMP codepoint - high < 0 ? - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); -} -function unescapeCSS(str){ - return str.replace(re_escape, funescape); -} +/***/ }), +/* 487 */, +/* 488 */, +/* 489 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -function isWhitespace(c){ - return c === " " || c === "\n" || c === "\t" || c === "\f" || c === "\r"; -} +const SemVer = __webpack_require__(65) +const patch = (a, loose) => new SemVer(a, loose).patch +module.exports = patch -function parse(selector, options){ - var subselects = []; - selector = parseSelector(subselects, selector + "", options); +/***/ }), +/* 490 */, +/* 491 */, +/* 492 */, +/* 493 */, +/* 494 */, +/* 495 */, +/* 496 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - if(selector !== ""){ - throw new SyntaxError("Unmatched selector: " + selector); - } +var arrayPush = __webpack_require__(883), + isFlattenable = __webpack_require__(408); - return subselects; -} +/** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ +function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; -function parseSelector(subselects, selector, options){ - var tokens = [], - sawWS = false, - data, firstChar, name, quot; + predicate || (predicate = isFlattenable); + result || (result = []); - function getName(){ - var sub = selector.match(re_name)[0]; - selector = selector.substr(sub.length); - return unescapeCSS(sub); - } + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; +} - function stripWhitespace(start){ - while(isWhitespace(selector.charAt(start))) start++; - selector = selector.substr(start); - } +module.exports = baseFlatten; - function isEscaped(pos) { - var slashCount = 0; - while (selector.charAt(--pos) === "\\") slashCount++; - return (slashCount & 1) === 1; - } +/***/ }), +/* 497 */, +/* 498 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - stripWhitespace(0); +var root = __webpack_require__(824); - while(selector !== ""){ - firstChar = selector.charAt(0); +/** Built-in value references. */ +var Symbol = root.Symbol; - if(isWhitespace(firstChar)){ - sawWS = true; - stripWhitespace(1); - } else if(firstChar in simpleSelectors){ - tokens.push({type: simpleSelectors[firstChar]}); - sawWS = false; +module.exports = Symbol; - stripWhitespace(1); - } else if(firstChar === ","){ - if(tokens.length === 0){ - throw new SyntaxError("empty sub-selector"); - } - subselects.push(tokens); - tokens = []; - sawWS = false; - stripWhitespace(1); - } else { - if(sawWS){ - if(tokens.length > 0){ - tokens.push({type: "descendant"}); - } - sawWS = false; - } - if(firstChar === "*"){ - selector = selector.substr(1); - tokens.push({type: "universal"}); - } else if(firstChar in attribSelectors){ - selector = selector.substr(1); - tokens.push({ - type: "attribute", - name: attribSelectors[firstChar][0], - action: attribSelectors[firstChar][1], - value: getName(), - ignoreCase: false - }); - } else if(firstChar === "["){ - selector = selector.substr(1); - data = selector.match(re_attr); - if(!data){ - throw new SyntaxError("Malformed attribute selector: " + selector); - } - selector = selector.substr(data[0].length); - name = unescapeCSS(data[1]); +/***/ }), +/* 499 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - if( - !options || ( - "lowerCaseAttributeNames" in options ? - options.lowerCaseAttributeNames : - !options.xmlMode - ) - ){ - name = name.toLowerCase(); - } +const SemVer = __webpack_require__(65) +const parse = __webpack_require__(830) +const {re, t} = __webpack_require__(976) - tokens.push({ - type: "attribute", - name: name, - action: actionTypes[data[2]], - value: unescapeCSS(data[4] || data[5] || ""), - ignoreCase: !!data[6] - }); +const coerce = (version, options) => { + if (version instanceof SemVer) { + return version + } - } else if(firstChar === ":"){ - if(selector.charAt(1) === ":"){ - selector = selector.substr(2); - tokens.push({type: "pseudo-element", name: getName().toLowerCase()}); - continue; - } + if (typeof version === 'number') { + version = String(version) + } - selector = selector.substr(1); + if (typeof version !== 'string') { + return null + } - name = getName().toLowerCase(); - data = null; + options = options || {} - if(selector.charAt(0) === "("){ - if(name in unpackPseudos){ - quot = selector.charAt(1); - var quoted = quot in quotes; + let match = null + if (!options.rtl) { + match = version.match(re[t.COERCE]) + } else { + // Find the right-most coercible string that does not share + // a terminus with a more left-ward coercible string. + // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' + // + // Walk through the string checking with a /g regexp + // Manually set the index so as to pick up overlapping matches. + // Stop when we get a match that ends at the string end, since no + // coercible string can be more right-ward without the same terminus. + let next + while ((next = re[t.COERCERTL].exec(version)) && + (!match || match.index + match[0].length !== version.length) + ) { + if (!match || + next.index + next[0].length !== match.index + match[0].length) { + match = next + } + re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length + } + // leave it in a clean state + re[t.COERCERTL].lastIndex = -1 + } - selector = selector.substr(quoted + 1); + if (match === null) + return null - data = []; - selector = parseSelector(data, selector, options); + return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options) +} +module.exports = coerce - if(quoted){ - if(selector.charAt(0) !== quot){ - throw new SyntaxError("unmatched quotes in :" + name); - } else { - selector = selector.substr(1); - } - } - if(selector.charAt(0) !== ")"){ - throw new SyntaxError("missing closing parenthesis in :" + name + " " + selector); - } +/***/ }), +/* 500 */, +/* 501 */, +/* 502 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - selector = selector.substr(1); - } else { - var pos = 1, counter = 1; +/* + Module dependencies +*/ +var ElementType = __webpack_require__(855); +var entities = __webpack_require__(307); - for(; counter > 0 && pos < selector.length; pos++){ - if(selector.charAt(pos) === "(" && !isEscaped(pos)) counter++; - else if(selector.charAt(pos) === ")" && !isEscaped(pos)) counter--; - } +var unencodedElements = { + __proto__: null, + style: true, + script: true, + xmp: true, + iframe: true, + noembed: true, + noframes: true, + plaintext: true, + noscript: true +}; - if(counter){ - throw new SyntaxError("parenthesis not matched"); - } +/* + Format attributes +*/ +function formatAttrs(attributes, opts) { + if (!attributes) return; - data = selector.substr(1, pos - 2); - selector = selector.substr(pos); + var output = '', + value; - if(name in stripQuotesFromPseudos){ - quot = data.charAt(0); + // Loop through the attributes + for (var key in attributes) { + value = attributes[key]; + if (output) { + output += ' '; + } - if(quot === data.slice(-1) && quot in quotes){ - data = data.slice(1, -1); - } + output += key; + if ((value !== null && value !== '') || opts.xmlMode) { + output += '="' + (opts.decodeEntities ? entities.encodeXML(value) : value) + '"'; + } + } - data = unescapeCSS(data); - } - } - } + return output; +} - tokens.push({type: "pseudo", name: name, data: data}); - } else if(re_name.test(selector)){ - name = getName(); +/* + Self-enclosing tags (stolen from node-htmlparser) +*/ +var singleTag = { + __proto__: null, + area: true, + base: true, + basefont: true, + br: true, + col: true, + command: true, + embed: true, + frame: true, + hr: true, + img: true, + input: true, + isindex: true, + keygen: true, + link: true, + meta: true, + param: true, + source: true, + track: true, + wbr: true, +}; - if(!options || ("lowerCaseTags" in options ? options.lowerCaseTags : !options.xmlMode)){ - name = name.toLowerCase(); - } - tokens.push({type: "tag", name: name}); - } else { - if(tokens.length && tokens[tokens.length - 1].type === "descendant"){ - tokens.pop(); - } - addToken(subselects, tokens); - return selector; - } - } - } +var render = module.exports = function(dom, opts) { + if (!Array.isArray(dom) && !dom.cheerio) dom = [dom]; + opts = opts || {}; - addToken(subselects, tokens); + var output = ''; - return selector; -} + for(var i = 0; i < dom.length; i++){ + var elem = dom[i]; -function addToken(subselects, tokens){ - if(subselects.length > 0 && tokens.length === 0){ - throw new SyntaxError("empty sub-selector"); - } + if (elem.type === 'root') + output += render(elem.children, opts); + else if (ElementType.isTag(elem)) + output += renderTag(elem, opts); + else if (elem.type === ElementType.Directive) + output += renderDirective(elem); + else if (elem.type === ElementType.Comment) + output += renderComment(elem); + else if (elem.type === ElementType.CDATA) + output += renderCdata(elem); + else + output += renderText(elem, opts); + } - subselects.push(tokens); -} + return output; +}; +function renderTag(elem, opts) { + // Handle SVG + if (elem.name === "svg") opts = {decodeEntities: opts.decodeEntities, xmlMode: true}; -/***/ }), -/* 443 */, -/* 444 */, -/* 445 */ -/***/ (function(module) { + var tag = '<' + elem.name, + attribs = formatAttrs(elem.attribs, opts); -/** - * A specialized version of `_.reduce` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the first element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ -function arrayReduce(array, iteratee, accumulator, initAccum) { - var index = -1, - length = array == null ? 0 : array.length; + if (attribs) { + tag += ' ' + attribs; + } - if (initAccum && length) { - accumulator = array[++index]; + if ( + opts.xmlMode + && (!elem.children || elem.children.length === 0) + ) { + tag += '/>'; + } else { + tag += '>'; + if (elem.children) { + tag += render(elem.children, opts); + } + + if (!singleTag[elem.name] || opts.xmlMode) { + tag += ''; + } } - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); + + return tag; +} + +function renderDirective(elem) { + return '<' + elem.data + '>'; +} + +function renderText(elem, opts) { + var data = elem.data || ''; + + // if entities weren't decoded, no need to encode them back + if (opts.decodeEntities && !(elem.parent && elem.parent.name in unencodedElements)) { + data = entities.encodeXML(data); } - return accumulator; + + return data; } -module.exports = arrayReduce; +function renderCdata(elem) { + return ''; +} + +function renderComment(elem) { + return ''; +} /***/ }), -/* 446 */, -/* 447 */, -/* 448 */, -/* 449 */ -/***/ (function(__unusedmodule, exports, __webpack_require__) { +/* 503 */ +/***/ (function(module, __unusedexports, __webpack_require__) { -var domEach = __webpack_require__(140).domEach, - _ = { - pick: __webpack_require__(320), - }; +const parse = __webpack_require__(830) +const clean = (version, options) => { + const s = parse(version.trim().replace(/^[=v]+/, ''), options) + return s ? s.version : null +} +module.exports = clean -var toString = Object.prototype.toString; -/** - * Set / Get css. - * - * @param {String|Object} prop - * @param {String} val - * @return {self} - * @api public - */ - -exports.css = function(prop, val) { - if (arguments.length === 2 || - // When `prop` is a "plain" object - (toString.call(prop) === '[object Object]')) { - return domEach(this, function(idx, el) { - setCss(el, prop, val, idx); - }); - } else { - return getCss(this[0], prop); - } -}; - -/** - * Set styles of all elements. - * - * @param {String|Object} prop - * @param {String} val - * @param {Number} idx - optional index within the selection - * @return {self} - * @api private - */ - -function setCss(el, prop, val, idx) { - if ('string' == typeof prop) { - var styles = getCss(el); - if (typeof val === 'function') { - val = val.call(el, idx, styles[prop]); - } +/***/ }), +/* 504 */ +/***/ (function(module, __unusedexports, __webpack_require__) { - if (val === '') { - delete styles[prop]; - } else if (val != null) { - styles[prop] = val; - } +var DomHandler = __webpack_require__(281); +var DomUtils = __webpack_require__(104); - el.attribs.style = stringify(styles); - } else if ('object' == typeof prop) { - Object.keys(prop).forEach(function(k){ - setCss(el, k, prop[k]); - }); - } +//TODO: make this a streamable handler +function FeedHandler(callback, options) { + this.init(callback, options); } -/** - * Get parsed styles of the first element. - * - * @param {String} prop - * @return {Object} - * @api private - */ - -function getCss(el, prop) { - var styles = parse(el.attribs.style); - if (typeof prop === 'string') { - return styles[prop]; - } else if (Array.isArray(prop)) { - return _.pick(styles, prop); - } else { - return styles; - } -} +__webpack_require__(689)(FeedHandler, DomHandler); -/** - * Stringify `obj` to styles. - * - * @param {Object} obj - * @return {Object} - * @api private - */ +FeedHandler.prototype.init = DomHandler; -function stringify(obj) { - return Object.keys(obj || {}) - .reduce(function(str, prop){ - return str += '' - + (str ? ' ' : '') - + prop - + ': ' - + obj[prop] - + ';'; - }, ''); +function getElements(what, where) { + return DomUtils.getElementsByTagName(what, where, true); } - -/** - * Parse `styles`. - * - * @param {String} styles - * @return {Object} - * @api private - */ - -function parse(styles) { - styles = (styles || '').trim(); - - if (!styles) return {}; - - return styles - .split(';') - .reduce(function(obj, str){ - var n = str.indexOf(':'); - // skip if there is no :, or if it is the first/last character - if (n < 1 || n === str.length-1) return obj; - obj[str.slice(0,n).trim()] = str.slice(n+1).trim(); - return obj; - }, {}); +function getOneElement(what, where) { + return DomUtils.getElementsByTagName(what, where, true, 1)[0]; } - - -/***/ }), -/* 450 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -"use strict"; - - -var Type = __webpack_require__(750); - -module.exports = new Type('tag:yaml.org,2002:str', { - kind: 'scalar', - construct: function (data) { return data !== null ? data : ''; } -}); - - -/***/ }), -/* 451 */ -/***/ (function(module) { - -/** - * This method returns `false`. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {boolean} Returns `false`. - * @example - * - * _.times(2, _.stubFalse); - * // => [false, false] - */ -function stubFalse() { - return false; +function fetch(what, where, recurse) { + return DomUtils.getText( + DomUtils.getElementsByTagName(what, where, recurse, 1) + ).trim(); } -module.exports = stubFalse; - - -/***/ }), -/* 452 */, -/* 453 */, -/* 454 */, -/* 455 */ -/***/ (function(module) { - -/** - * The base implementation of `_.isNaN` without support for number objects. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - */ -function baseIsNaN(value) { - return value !== value; +function addConditionally(obj, prop, what, where, recurse) { + var tmp = fetch(what, where, recurse); + if (tmp) obj[prop] = tmp; } -module.exports = baseIsNaN; - - -/***/ }), -/* 456 */, -/* 457 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var arrayEach = __webpack_require__(698), - arrayIncludes = __webpack_require__(260); - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_CURRY_FLAG = 8, - WRAP_CURRY_RIGHT_FLAG = 16, - WRAP_PARTIAL_FLAG = 32, - WRAP_PARTIAL_RIGHT_FLAG = 64, - WRAP_ARY_FLAG = 128, - WRAP_REARG_FLAG = 256, - WRAP_FLIP_FLAG = 512; +var isValidFeed = function(value) { + return value === "rss" || value === "feed" || value === "rdf:RDF"; +}; -/** Used to associate wrap methods with their bit flags. */ -var wrapFlags = [ - ['ary', WRAP_ARY_FLAG], - ['bind', WRAP_BIND_FLAG], - ['bindKey', WRAP_BIND_KEY_FLAG], - ['curry', WRAP_CURRY_FLAG], - ['curryRight', WRAP_CURRY_RIGHT_FLAG], - ['flip', WRAP_FLIP_FLAG], - ['partial', WRAP_PARTIAL_FLAG], - ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], - ['rearg', WRAP_REARG_FLAG] -]; +FeedHandler.prototype.onend = function() { + var feed = {}, + feedRoot = getOneElement(isValidFeed, this.dom), + tmp, + childs; -/** - * Updates wrapper `details` based on `bitmask` flags. - * - * @private - * @returns {Array} details The details to modify. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @returns {Array} Returns `details`. - */ -function updateWrapDetails(details, bitmask) { - arrayEach(wrapFlags, function(pair) { - var value = '_.' + pair[0]; - if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { - details.push(value); - } - }); - return details.sort(); -} + if (feedRoot) { + if (feedRoot.name === "feed") { + childs = feedRoot.children; -module.exports = updateWrapDetails; + feed.type = "atom"; + addConditionally(feed, "id", "id", childs); + addConditionally(feed, "title", "title", childs); + if ( + (tmp = getOneElement("link", childs)) && + (tmp = tmp.attribs) && + (tmp = tmp.href) + ) + feed.link = tmp; + addConditionally(feed, "description", "subtitle", childs); + if ((tmp = fetch("updated", childs))) feed.updated = new Date(tmp); + addConditionally(feed, "author", "email", childs, true); + feed.items = getElements("entry", childs).map(function(item) { + var entry = {}, + tmp; -/***/ }), -/* 458 */, -/* 459 */, -/* 460 */ -/***/ (function(module, __unusedexports, __webpack_require__) { + item = item.children; -var baseIsArguments = __webpack_require__(208), - isObjectLike = __webpack_require__(337); + addConditionally(entry, "id", "id", item); + addConditionally(entry, "title", "title", item); + if ( + (tmp = getOneElement("link", item)) && + (tmp = tmp.attribs) && + (tmp = tmp.href) + ) + entry.link = tmp; + if ((tmp = fetch("summary", item) || fetch("content", item))) + entry.description = tmp; + if ((tmp = fetch("updated", item))) + entry.pubDate = new Date(tmp); + return entry; + }); + } else { + childs = getOneElement("channel", feedRoot.children).children; -/** Used for built-in method references. */ -var objectProto = Object.prototype; + feed.type = feedRoot.name.substr(0, 3); + feed.id = ""; + addConditionally(feed, "title", "title", childs); + addConditionally(feed, "link", "link", childs); + addConditionally(feed, "description", "description", childs); + if ((tmp = fetch("lastBuildDate", childs))) + feed.updated = new Date(tmp); + addConditionally(feed, "author", "managingEditor", childs, true); -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; + feed.items = getElements("item", feedRoot.children).map(function( + item + ) { + var entry = {}, + tmp; -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; + item = item.children; -/** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ -var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { - return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && - !propertyIsEnumerable.call(value, 'callee'); + addConditionally(entry, "id", "guid", item); + addConditionally(entry, "title", "title", item); + addConditionally(entry, "link", "link", item); + addConditionally(entry, "description", "description", item); + if ((tmp = fetch("pubDate", item))) + entry.pubDate = new Date(tmp); + return entry; + }); + } + } + this.dom = feed; + DomHandler.prototype._handleCallback.call( + this, + feedRoot ? null : Error("couldn't find root of feed") + ); }; -module.exports = isArguments; - - -/***/ }), -/* 461 */, -/* 462 */, -/* 463 */, -/* 464 */, -/* 465 */, -/* 466 */, -/* 467 */, -/* 468 */ -/***/ (function(__unusedmodule, exports) { - -"use strict"; - -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.bundledMinicondaUser = void 0; -/** - * Provide a path to the pre-bundled (but probably old) Miniconda base installation - * - * ### Note - * This is the "cheapest" provider: if miniconda is already on disk, it can be - * fastest to avoid the download/install and use what's already on the image. - */ -exports.bundledMinicondaUser = { - label: "use bundled Miniconda", - provides: (inputs, options) => __awaiter(void 0, void 0, void 0, function* () { - return (inputs.minicondaVersion === "" && - inputs.miniforgeVariant === "" && - inputs.miniforgeVersion === "" && - inputs.architecture === "x64" && - inputs.installerUrl === ""); - }), - installerPath: (inputs, options) => __awaiter(void 0, void 0, void 0, function* () { - // No actions are performed. This is the only place `useBundled` will ever be true. - return { - localInstallerPath: "", - options: Object.assign(Object.assign({}, options), { useBundled: true }), - }; - }), -}; +module.exports = FeedHandler; /***/ }), -/* 469 */, -/* 470 */ +/* 505 */, +/* 506 */ /***/ (function(__unusedmodule, exports, __webpack_require__) { "use strict"; +//----------------------------------------------------------------------- +// Conda helpers +//----------------------------------------------------------------------- +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -19243,823 +20039,387 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; Object.defineProperty(exports, "__esModule", { value: true }); -const command_1 = __webpack_require__(431); -const file_command_1 = __webpack_require__(102); -const utils_1 = __webpack_require__(82); -const os = __importStar(__webpack_require__(87)); +exports.condaInit = exports.applyCondaConfiguration = exports.copyConfig = exports.bootstrapConfig = exports.condaCommand = exports.isMambaInstalled = exports.condaExecutable = exports.envCommandFlag = exports.condaBasePath = void 0; +const fs = __importStar(__webpack_require__(747)); const path = __importStar(__webpack_require__(622)); +const os = __importStar(__webpack_require__(87)); +const core = __importStar(__webpack_require__(470)); +const io = __importStar(__webpack_require__(1)); +const constants = __importStar(__webpack_require__(211)); +const utils = __importStar(__webpack_require__(163)); /** - * The code to exit an action - */ -var ExitCode; -(function (ExitCode) { - /** - * A code indicating that the action was successful - */ - ExitCode[ExitCode["Success"] = 0] = "Success"; - /** - * A code indicating that the action was a failure - */ - ExitCode[ExitCode["Failure"] = 1] = "Failure"; -})(ExitCode = exports.ExitCode || (exports.ExitCode = {})); -//----------------------------------------------------------------------- -// Variables -//----------------------------------------------------------------------- -/** - * Sets env variable for this action and future actions in the job - * @param name the name of the variable to set - * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify + * Provide current location of miniconda or location where it will be installed */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function exportVariable(name, val) { - const convertedVal = utils_1.toCommandValue(val); - process.env[name] = convertedVal; - const filePath = process.env['GITHUB_ENV'] || ''; - if (filePath) { - const delimiter = '_GitHubActionsFileCommandDelimeter_'; - const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`; - file_command_1.issueCommand('ENV', commandValue); - } - else { - command_1.issueCommand('set-env', { name }, convertedVal); +function condaBasePath(options) { + let condaPath = constants.MINICONDA_DIR_PATH; + if (!options.useBundled) { + if (constants.IS_MAC) { + condaPath = "/Users/runner/miniconda3"; + } + else { + condaPath += "3"; + } } + return condaPath; } -exports.exportVariable = exportVariable; +exports.condaBasePath = condaBasePath; /** - * Registers a secret which will get masked from logs - * @param secret value of the secret + * Provide conda CLI arguments for identifying an env by name or prefix/path + * + * ### Note + * Only really detects by presence of a path separator, as the path may not yet exist */ -function setSecret(secret) { - command_1.issueCommand('add-mask', {}, secret); +function envCommandFlag(inputs) { + return [ + inputs.activateEnvironment.match(/(\\|\/)/) ? "--prefix" : "--name", + inputs.activateEnvironment, + ]; } -exports.setSecret = setSecret; +exports.envCommandFlag = envCommandFlag; /** - * Prepends inputPath to the PATH (for this action and future actions) - * @param inputPath + * Provide cross platform location of conda/mamba executable */ -function addPath(inputPath) { - const filePath = process.env['GITHUB_PATH'] || ''; - if (filePath) { - file_command_1.issueCommand('PATH', inputPath); - } - else { - command_1.issueCommand('add-path', {}, inputPath); +function condaExecutable(options, subcommand) { + const dir = condaBasePath(options); + let condaExe; + let commandName = "conda"; + if (options.useMamba && + (subcommand == null || constants.MAMBA_SUBCOMMANDS.includes(subcommand))) { + commandName = "mamba"; } - process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; + commandName = constants.IS_WINDOWS ? commandName + ".bat" : commandName; + condaExe = path.join(dir, "condabin", commandName); + return condaExe; } -exports.addPath = addPath; -/** - * Gets the value of an input. The value is also trimmed. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string - */ -function getInput(name, options) { - const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''; - if (options && options.required && !val) { - throw new Error(`Input required and not supplied: ${name}`); - } - return val.trim(); -} -exports.getInput = getInput; -/** - * Sets the value of an output. - * - * @param name name of the output to set - * @param value value to store. Non-string values will be converted to a string via JSON.stringify - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function setOutput(name, value) { - command_1.issueCommand('set-output', { name }, value); -} -exports.setOutput = setOutput; -/** - * Enables or disables the echoing of commands into stdout for the rest of the step. - * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. - * - */ -function setCommandEcho(enabled) { - command_1.issue('echo', enabled ? 'on' : 'off'); -} -exports.setCommandEcho = setCommandEcho; -//----------------------------------------------------------------------- -// Results -//----------------------------------------------------------------------- -/** - * Sets the action status to failed. - * When the action exits it will be with an exit code of 1 - * @param message add error issue message - */ -function setFailed(message) { - process.exitCode = ExitCode.Failure; - error(message); -} -exports.setFailed = setFailed; -//----------------------------------------------------------------------- -// Logging Commands -//----------------------------------------------------------------------- -/** - * Gets whether Actions Step Debug is on or not - */ -function isDebug() { - return process.env['RUNNER_DEBUG'] === '1'; -} -exports.isDebug = isDebug; -/** - * Writes debug message to user log - * @param message debug message - */ -function debug(message) { - command_1.issueCommand('debug', {}, message); -} -exports.debug = debug; -/** - * Adds an error issue - * @param message error issue message. Errors will be converted to string via toString() - */ -function error(message) { - command_1.issue('error', message instanceof Error ? message.toString() : message); -} -exports.error = error; -/** - * Adds an warning issue - * @param message warning issue message. Errors will be converted to string via toString() - */ -function warning(message) { - command_1.issue('warning', message instanceof Error ? message.toString() : message); +exports.condaExecutable = condaExecutable; +/** Detect the presence of mamba */ +function isMambaInstalled(options) { + const mamba = condaExecutable(Object.assign(Object.assign({}, options), { useMamba: true })); + return fs.existsSync(mamba); } -exports.warning = warning; +exports.isMambaInstalled = isMambaInstalled; /** - * Writes info to log with console.log. - * @param message info message + * Run Conda command */ -function info(message) { - process.stdout.write(message + os.EOL); +function condaCommand(cmd, options) { + return __awaiter(this, void 0, void 0, function* () { + const command = [condaExecutable(options, cmd[0]), ...cmd]; + return yield utils.execute(command); + }); } -exports.info = info; +exports.condaCommand = condaCommand; /** - * Begin an output group. - * - * Output until the next `groupEnd` will be foldable in this group - * - * @param name The name of the output group + * Create a baseline .condarc */ -function startGroup(name) { - command_1.issue('group', name); +function bootstrapConfig() { + return __awaiter(this, void 0, void 0, function* () { + yield fs.promises.writeFile(constants.CONDARC_PATH, constants.BOOTSTRAP_CONDARC); + }); } -exports.startGroup = startGroup; +exports.bootstrapConfig = bootstrapConfig; /** - * End an output group. + * Copy the given condarc file into place */ -function endGroup() { - command_1.issue('endgroup'); +function copyConfig(inputs) { + return __awaiter(this, void 0, void 0, function* () { + const sourcePath = path.join(process.env["GITHUB_WORKSPACE"] || "", inputs.condaConfigFile); + core.info(`Copying "${sourcePath}" to "${constants.CONDARC_PATH}..."`); + yield io.cp(sourcePath, constants.CONDARC_PATH); + }); } -exports.endGroup = endGroup; +exports.copyConfig = copyConfig; /** - * Wrap an asynchronous function call in a group. - * - * Returns the same type as the function itself. - * - * @param name The name of the group - * @param fn The function to wrap in the group + * Setup Conda configuration */ -function group(name, fn) { +function applyCondaConfiguration(inputs, options) { + var _a, _b, _c; return __awaiter(this, void 0, void 0, function* () { - startGroup(name); - let result; - try { - result = yield fn(); + const configEntries = Object.entries(inputs.condaConfig); + // Channels are special: if specified as an action input, these take priority + // over what is found in (at present) a YAML-based environment + let channels = inputs.condaConfig.channels + .trim() + .split(/,/) + .map((c) => c.trim()) + .filter((c) => c.length); + if (!channels.length && ((_c = (_b = (_a = options.envSpec) === null || _a === void 0 ? void 0 : _a.yaml) === null || _b === void 0 ? void 0 : _b.channels) === null || _c === void 0 ? void 0 : _c.length)) { + channels = options.envSpec.yaml.channels; } - finally { - endGroup(); + // LIFO: reverse order to preserve higher priority as listed in the option + // .slice ensures working against a copy + for (const channel of channels.slice().reverse()) { + core.info(`Adding channel '${channel}'`); + yield condaCommand(["config", "--add", "channels", channel], options); } - return result; + // All other options are just passed as their string representations + for (const [key, value] of configEntries) { + if (value.trim().length === 0 || key === "channels") { + continue; + } + core.info(`${key}: ${value}`); + try { + yield condaCommand(["config", "--set", key, value], options); + } + catch (err) { + core.warning(err); + } + } + // Log all configuration information + yield condaCommand(["config", "--show-sources"], options); + yield condaCommand(["config", "--show"], options); }); } -exports.group = group; -//----------------------------------------------------------------------- -// Wrapper action state -//----------------------------------------------------------------------- -/** - * Saves state for current action, the state can only be retrieved by this action's post job execution. - * - * @param name name of the state to store - * @param value value to store. Non-string values will be converted to a string via JSON.stringify - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function saveState(name, value) { - command_1.issueCommand('save-state', { name }, value); -} -exports.saveState = saveState; +exports.applyCondaConfiguration = applyCondaConfiguration; /** - * Gets the value of an state set by this action's main execution. - * - * @param name name of the state to get - * @returns string + * Initialize Conda */ -function getState(name) { - return process.env[`STATE_${name}`] || ''; +function condaInit(inputs, options) { + return __awaiter(this, void 0, void 0, function* () { + let ownPath; + const isValidActivate = !utils.isBaseEnv(inputs.activateEnvironment); + const autoActivateBase = options.condaConfig["auto_activate_base"] === "true"; + // Fix ownership of folders + if (options.useBundled) { + if (constants.IS_MAC) { + core.info("Fixing conda folders ownership"); + const userName = process.env.USER; + yield utils.execute([ + "sudo", + "chown", + "-R", + `${userName}:staff`, + condaBasePath(options), + ]); + } + else if (constants.IS_WINDOWS) { + for (let folder of constants.WIN_PERMS_FOLDERS) { + ownPath = path.join(condaBasePath(options), folder); + if (fs.existsSync(ownPath)) { + core.info(`Fixing ${folder} ownership`); + yield utils.execute(["takeown", "/f", ownPath, "/r", "/d", "y"]); + } + } + } + } + // Remove profile files + if (inputs.removeProfiles == "true") { + for (let rc of constants.PROFILES) { + try { + let file = path.join(os.homedir(), rc); + if (fs.existsSync(file)) { + core.info(`Removing "${file}"`); + yield io.rmRF(file); + } + } + catch (err) { + core.warning(err); + } + } + } + // Run conda init + for (let cmd of ["--all"]) { + yield condaCommand(["init", cmd], options); + } + // Rename files + if (constants.IS_LINUX) { + let source = "~/.bashrc".replace("~", os.homedir()); + let dest = "~/.profile".replace("~", os.homedir()); + core.info(`Renaming "${source}" to "${dest}"\n`); + yield io.mv(source, dest); + } + else if (constants.IS_MAC) { + let source = "~/.bash_profile".replace("~", os.homedir()); + let dest = "~/.profile".replace("~", os.homedir()); + core.info(`Renaming "${source}" to "${dest}"\n`); + yield io.mv(source, dest); + } + // PowerShell profiles + let powerExtraText = ` + # ----------------------------------------------------------------------------`; + if (isValidActivate) { + powerExtraText += ` + # Conda Setup Action: Custom activation + conda activate "${inputs.activateEnvironment}"`; + } + powerExtraText += ` + # ----------------------------------------------------------------------------`; + // Bash profiles + let bashExtraText = ` + # ---------------------------------------------------------------------------- + # Conda Setup Action: Basic configuration + set -eo pipefail`; + if (isValidActivate) { + bashExtraText += ` + # Conda Setup Action: Custom activation + conda activate "${inputs.activateEnvironment}"`; + bashExtraText += ` + # ----------------------------------------------------------------------------`; + } + // Batch profiles + let batchExtraText = ` + :: ---------------------------------------------------------------------------`; + if (autoActivateBase) { + batchExtraText += ` + :: Conda Setup Action: Activate base + @CALL "%CONDA_BAT%" activate base`; + } + if (isValidActivate) { + batchExtraText += ` + :: Conda Setup Action: Custom activation + @CALL "%CONDA_BAT%" activate "${inputs.activateEnvironment}"`; + } + batchExtraText += ` + :: Conda Setup Action: Basic configuration + @SETLOCAL EnableExtensions + @SETLOCAL DisableDelayedExpansion + :: ---------------------------------------------------------------------------`; + let extraShells; + const shells = { + "~/.bash_profile": bashExtraText, + "~/.profile": bashExtraText, + "~/.zshrc": bashExtraText, + "~/.config/fish/config.fish": bashExtraText, + "~/.tcshrc": bashExtraText, + "~/.xonshrc": bashExtraText, + "~/.config/powershell/profile.ps1": powerExtraText, + "~/Documents/PowerShell/profile.ps1": powerExtraText, + "~/Documents/WindowsPowerShell/profile.ps1": powerExtraText, + }; + if (options.useBundled) { + extraShells = { + "C:/Miniconda/etc/profile.d/conda.sh": bashExtraText, + "C:/Miniconda/etc/fish/conf.d/conda.fish": bashExtraText, + "C:/Miniconda/condabin/conda_hook.bat": batchExtraText, + }; + } + else { + extraShells = { + "C:/Miniconda3/etc/profile.d/conda.sh": bashExtraText, + "C:/Miniconda3/etc/fish/conf.d/conda.fish": bashExtraText, + "C:/Miniconda3/condabin/conda_hook.bat": batchExtraText, + }; + } + const allShells = Object.assign(Object.assign({}, shells), extraShells); + Object.keys(allShells).forEach((key) => { + let filePath = key.replace("~", os.homedir()); + const text = allShells[key]; + if (fs.existsSync(filePath)) { + core.info(`Append to "${filePath}":\n ${text} \n`); + fs.appendFileSync(filePath, text); + } + }); + }); } -exports.getState = getState; -//# sourceMappingURL=core.js.map +exports.condaInit = condaInit; + /***/ }), -/* 471 */, -/* 472 */ +/* 507 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var assignValue = __webpack_require__(363), - copyObject = __webpack_require__(875), - createAssigner = __webpack_require__(797), - isArrayLike = __webpack_require__(146), - isPrototype = __webpack_require__(514), - keys = __webpack_require__(863); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; +var MapCache = __webpack_require__(978); -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; /** - * Assigns own enumerable string keyed properties of source objects to the - * destination object. Source objects are applied from left to right. - * Subsequent sources overwrite property assignments of previous sources. + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. * - * **Note:** This method mutates `object` and is loosely based on - * [`Object.assign`](https://mdn.io/Object/assign). + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. * * @static * @memberOf _ - * @since 0.10.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.assignIn + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. * @example * - * function Foo() { - * this.a = 1; - * } + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; * - * function Bar() { - * this.c = 3; - * } + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] * - * Foo.prototype.b = 2; - * Bar.prototype.d = 4; + * values(other); + * // => [3, 4] * - * _.assign({ 'a': 0 }, new Foo, new Bar); - * // => { 'a': 1, 'c': 3 } + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; */ -var assign = createAssigner(function(object, source) { - if (isPrototype(source) || isArrayLike(source)) { - copyObject(source, keys(source), object); - return; +function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); } - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - assignValue(object, key, source[key]); + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); } - } -}); + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; +} -module.exports = assign; +// Expose `MapCache`. +memoize.Cache = MapCache; + +module.exports = memoize; /***/ }), -/* 473 */ +/* 508 */, +/* 509 */ /***/ (function(module) { -/** Used for built-in method references. */ -var funcProto = Function.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - /** - * Converts `func` to its source code. + * The base implementation of `_.property` without support for deep paths. * * @private - * @param {Function} func The function to convert. - * @returns {string} Returns the source code. + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. */ -function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) {} - try { - return (func + ''); - } catch (e) {} - } - return ''; +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; } -module.exports = toSource; +module.exports = baseProperty; /***/ }), -/* 474 */, -/* 475 */, -/* 476 */, -/* 477 */, -/* 478 */, -/* 479 */, -/* 480 */, -/* 481 */, -/* 482 */, -/* 483 */, -/* 484 */, -/* 485 */, -/* 486 */, -/* 487 */, -/* 488 */, -/* 489 */, -/* 490 */, -/* 491 */, -/* 492 */, -/* 493 */, -/* 494 */, -/* 495 */, -/* 496 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var arrayPush = __webpack_require__(883), - isFlattenable = __webpack_require__(408); +/* 510 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { /** - * The base implementation of `_.flatten` with support for restricting flattening. - * - * @private - * @param {Array} array The array to flatten. - * @param {number} depth The maximum recursion depth. - * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. - * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. - * @param {Array} [result=[]] The initial result value. - * @returns {Array} Returns the new flattened array. - */ -function baseFlatten(array, depth, predicate, isStrict, result) { - var index = -1, - length = array.length; - - predicate || (predicate = isFlattenable); - result || (result = []); - - while (++index < length) { - var value = array[index]; - if (depth > 0 && predicate(value)) { - if (depth > 1) { - // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, depth - 1, predicate, isStrict, result); - } else { - arrayPush(result, value); - } - } else if (!isStrict) { - result[result.length] = value; - } - } - return result; -} - -module.exports = baseFlatten; - - -/***/ }), -/* 497 */, -/* 498 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var root = __webpack_require__(824); - -/** Built-in value references. */ -var Symbol = root.Symbol; - -module.exports = Symbol; - - -/***/ }), -/* 499 */, -/* 500 */, -/* 501 */, -/* 502 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -/* - Module dependencies -*/ -var ElementType = __webpack_require__(855); -var entities = __webpack_require__(307); - -var unencodedElements = { - __proto__: null, - style: true, - script: true, - xmp: true, - iframe: true, - noembed: true, - noframes: true, - plaintext: true, - noscript: true -}; - -/* - Format attributes -*/ -function formatAttrs(attributes, opts) { - if (!attributes) return; - - var output = '', - value; - - // Loop through the attributes - for (var key in attributes) { - value = attributes[key]; - if (output) { - output += ' '; - } - - output += key; - if ((value !== null && value !== '') || opts.xmlMode) { - output += '="' + (opts.decodeEntities ? entities.encodeXML(value) : value) + '"'; - } - } - - return output; -} - -/* - Self-enclosing tags (stolen from node-htmlparser) -*/ -var singleTag = { - __proto__: null, - area: true, - base: true, - basefont: true, - br: true, - col: true, - command: true, - embed: true, - frame: true, - hr: true, - img: true, - input: true, - isindex: true, - keygen: true, - link: true, - meta: true, - param: true, - source: true, - track: true, - wbr: true, -}; - - -var render = module.exports = function(dom, opts) { - if (!Array.isArray(dom) && !dom.cheerio) dom = [dom]; - opts = opts || {}; - - var output = ''; - - for(var i = 0; i < dom.length; i++){ - var elem = dom[i]; - - if (elem.type === 'root') - output += render(elem.children, opts); - else if (ElementType.isTag(elem)) - output += renderTag(elem, opts); - else if (elem.type === ElementType.Directive) - output += renderDirective(elem); - else if (elem.type === ElementType.Comment) - output += renderComment(elem); - else if (elem.type === ElementType.CDATA) - output += renderCdata(elem); - else - output += renderText(elem, opts); - } - - return output; -}; - -function renderTag(elem, opts) { - // Handle SVG - if (elem.name === "svg") opts = {decodeEntities: opts.decodeEntities, xmlMode: true}; - - var tag = '<' + elem.name, - attribs = formatAttrs(elem.attribs, opts); - - if (attribs) { - tag += ' ' + attribs; - } - - if ( - opts.xmlMode - && (!elem.children || elem.children.length === 0) - ) { - tag += '/>'; - } else { - tag += '>'; - if (elem.children) { - tag += render(elem.children, opts); - } - - if (!singleTag[elem.name] || opts.xmlMode) { - tag += ''; - } - } - - return tag; -} - -function renderDirective(elem) { - return '<' + elem.data + '>'; -} - -function renderText(elem, opts) { - var data = elem.data || ''; - - // if entities weren't decoded, no need to encode them back - if (opts.decodeEntities && !(elem.parent && elem.parent.name in unencodedElements)) { - data = entities.encodeXML(data); - } - - return data; -} - -function renderCdata(elem) { - return ''; -} - -function renderComment(elem) { - return ''; -} - - -/***/ }), -/* 503 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var isSymbol = __webpack_require__(186); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Converts `value` to a string key if it's not a string or symbol. - * - * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. - */ -function toKey(value) { - if (typeof value == 'string' || isSymbol(value)) { - return value; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -module.exports = toKey; - - -/***/ }), -/* 504 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var DomHandler = __webpack_require__(281); -var DomUtils = __webpack_require__(104); - -//TODO: make this a streamable handler -function FeedHandler(callback, options) { - this.init(callback, options); -} - -__webpack_require__(689)(FeedHandler, DomHandler); - -FeedHandler.prototype.init = DomHandler; - -function getElements(what, where) { - return DomUtils.getElementsByTagName(what, where, true); -} -function getOneElement(what, where) { - return DomUtils.getElementsByTagName(what, where, true, 1)[0]; -} -function fetch(what, where, recurse) { - return DomUtils.getText( - DomUtils.getElementsByTagName(what, where, recurse, 1) - ).trim(); -} - -function addConditionally(obj, prop, what, where, recurse) { - var tmp = fetch(what, where, recurse); - if (tmp) obj[prop] = tmp; -} - -var isValidFeed = function(value) { - return value === "rss" || value === "feed" || value === "rdf:RDF"; -}; - -FeedHandler.prototype.onend = function() { - var feed = {}, - feedRoot = getOneElement(isValidFeed, this.dom), - tmp, - childs; - - if (feedRoot) { - if (feedRoot.name === "feed") { - childs = feedRoot.children; - - feed.type = "atom"; - addConditionally(feed, "id", "id", childs); - addConditionally(feed, "title", "title", childs); - if ( - (tmp = getOneElement("link", childs)) && - (tmp = tmp.attribs) && - (tmp = tmp.href) - ) - feed.link = tmp; - addConditionally(feed, "description", "subtitle", childs); - if ((tmp = fetch("updated", childs))) feed.updated = new Date(tmp); - addConditionally(feed, "author", "email", childs, true); - - feed.items = getElements("entry", childs).map(function(item) { - var entry = {}, - tmp; - - item = item.children; - - addConditionally(entry, "id", "id", item); - addConditionally(entry, "title", "title", item); - if ( - (tmp = getOneElement("link", item)) && - (tmp = tmp.attribs) && - (tmp = tmp.href) - ) - entry.link = tmp; - if ((tmp = fetch("summary", item) || fetch("content", item))) - entry.description = tmp; - if ((tmp = fetch("updated", item))) - entry.pubDate = new Date(tmp); - return entry; - }); - } else { - childs = getOneElement("channel", feedRoot.children).children; - - feed.type = feedRoot.name.substr(0, 3); - feed.id = ""; - addConditionally(feed, "title", "title", childs); - addConditionally(feed, "link", "link", childs); - addConditionally(feed, "description", "description", childs); - if ((tmp = fetch("lastBuildDate", childs))) - feed.updated = new Date(tmp); - addConditionally(feed, "author", "managingEditor", childs, true); - - feed.items = getElements("item", feedRoot.children).map(function( - item - ) { - var entry = {}, - tmp; - - item = item.children; - - addConditionally(entry, "id", "guid", item); - addConditionally(entry, "title", "title", item); - addConditionally(entry, "link", "link", item); - addConditionally(entry, "description", "description", item); - if ((tmp = fetch("pubDate", item))) - entry.pubDate = new Date(tmp); - return entry; - }); - } - } - this.dom = feed; - DomHandler.prototype._handleCallback.call( - this, - feedRoot ? null : Error("couldn't find root of feed") - ); -}; - -module.exports = FeedHandler; - - -/***/ }), -/* 505 */, -/* 506 */, -/* 507 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var MapCache = __webpack_require__(978); - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * Creates a function that memoizes the result of `func`. If `resolver` is - * provided, it determines the cache key for storing the result based on the - * arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is used as the map cache key. The `func` - * is invoked with the `this` binding of the memoized function. - * - * **Note:** The cache is exposed as the `cache` property on the memoized - * function. Its creation may be customized by replacing the `_.memoize.Cache` - * constructor with one whose instances implement the - * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) - * method interface of `clear`, `delete`, `get`, `has`, and `set`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoized function. - * @example - * - * var object = { 'a': 1, 'b': 2 }; - * var other = { 'c': 3, 'd': 4 }; - * - * var values = _.memoize(_.values); - * values(object); - * // => [1, 2] - * - * values(other); - * // => [3, 4] - * - * object.a = 2; - * values(object); - * // => [1, 2] - * - * // Modify the result cache. - * values.cache.set(object, ['a', 'b']); - * values(object); - * // => ['a', 'b'] - * - * // Replace `_.memoize.Cache`. - * _.memoize.Cache = WeakMap; - */ -function memoize(func, resolver) { - if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { - throw new TypeError(FUNC_ERROR_TEXT); - } - var memoized = function() { - var args = arguments, - key = resolver ? resolver.apply(this, args) : args[0], - cache = memoized.cache; - - if (cache.has(key)) { - return cache.get(key); - } - var result = func.apply(this, args); - memoized.cache = cache.set(key, result) || cache; - return result; - }; - memoized.cache = new (memoize.Cache || MapCache); - return memoized; -} - -// Expose `MapCache`. -memoize.Cache = MapCache; - -module.exports = memoize; - - -/***/ }), -/* 508 */, -/* 509 */ -/***/ (function(module) { - -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -module.exports = baseProperty; - - -/***/ }), -/* 510 */ -/***/ (function(__unusedmodule, exports, __webpack_require__) { - -/** - * Module dependencies + * Module dependencies */ var serialize = __webpack_require__(502), @@ -20373,30 +20733,22 @@ module.exports = isPrototype; /* 517 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var isStrictComparable = __webpack_require__(258), - keys = __webpack_require__(863); +var Uint8Array = __webpack_require__(161); /** - * Gets the property names, values, and compare flags of `object`. + * Creates a clone of `arrayBuffer`. * * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the match data of `object`. + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. */ -function getMatchData(object) { - var result = keys(object), - length = result.length; - - while (length--) { - var key = result[length], - value = object[key]; - - result[length] = [key, value, isStrictComparable(value)]; - } +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); return result; } -module.exports = getMatchData; +module.exports = cloneArrayBuffer; /***/ }), @@ -20547,7 +20899,7 @@ const constants = __importStar(__webpack_require__(211)); const input = __importStar(__webpack_require__(265)); const outputs = __importStar(__webpack_require__(405)); const installer = __importStar(__webpack_require__(555)); -const conda = __importStar(__webpack_require__(259)); +const conda = __importStar(__webpack_require__(506)); const env = __importStar(__webpack_require__(956)); const baseTools = __importStar(__webpack_require__(49)); /** @@ -20661,7 +21013,7 @@ const path = __importStar(__webpack_require__(622)); const yaml = __importStar(__webpack_require__(414)); const core = __importStar(__webpack_require__(470)); const constants = __importStar(__webpack_require__(211)); -const conda = __importStar(__webpack_require__(259)); +const conda = __importStar(__webpack_require__(506)); const utils = __importStar(__webpack_require__(163)); const outputs = __importStar(__webpack_require__(405)); /** @@ -20756,7 +21108,16 @@ exports.ensureYaml = { /***/ }), /* 529 */, /* 530 */, -/* 531 */, +/* 531 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +// Determine if version is greater than all the versions possible in the range. +const outside = __webpack_require__(462) +const gtr = (version, range, options) => outside(version, range, '>', options) +module.exports = gtr + + +/***/ }), /* 532 */, /* 533 */ /***/ (function(__unusedmodule, exports, __webpack_require__) { @@ -20790,7 +21151,7 @@ const mm = __importStar(__webpack_require__(31)); const os = __importStar(__webpack_require__(87)); const path = __importStar(__webpack_require__(622)); const httpm = __importStar(__webpack_require__(539)); -const semver = __importStar(__webpack_require__(280)); +const semver = __importStar(__webpack_require__(550)); const stream = __importStar(__webpack_require__(413)); const util = __importStar(__webpack_require__(669)); const v4_1 = __importDefault(__webpack_require__(826)); @@ -21937,174 +22298,1789 @@ class HttpClient { }); } } -exports.HttpClient = HttpClient; +exports.HttpClient = HttpClient; + + +/***/ }), +/* 540 */ +/***/ (function(module) { + +/** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; +} + +module.exports = nativeKeysIn; + + +/***/ }), +/* 541 */, +/* 542 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var apply = __webpack_require__(512), + createCtor = __webpack_require__(322), + createHybrid = __webpack_require__(224), + createRecurry = __webpack_require__(673), + getHolder = __webpack_require__(683), + replaceHolders = __webpack_require__(944), + root = __webpack_require__(824); + +/** + * Creates a function that wraps `func` to enable currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {number} arity The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length, + placeholder = getHolder(wrapper); + + while (index--) { + args[index] = arguments[index]; + } + var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) + ? [] + : replaceHolders(args, placeholder); + + length -= holders.length; + if (length < arity) { + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, undefined, + args, holders, undefined, undefined, arity - length); + } + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return apply(fn, this, args); + } + return wrapper; +} + +module.exports = createCurry; + + +/***/ }), +/* 543 */, +/* 544 */, +/* 545 */, +/* 546 */ +/***/ (function(module, exports, __webpack_require__) { + +/* module decorator */ module = __webpack_require__.nmd(module); +var root = __webpack_require__(824), + stubFalse = __webpack_require__(451); + +/** Detect free variable `exports`. */ +var freeExports = true && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || stubFalse; + +module.exports = isBuffer; + + +/***/ }), +/* 547 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var createCtor = __webpack_require__(322), + root = __webpack_require__(824); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1; + +/** + * Creates a function that wraps `func` to invoke it with the optional `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; +} + +module.exports = createBind; + + +/***/ }), +/* 548 */ +/***/ (function(module) { + +const debug = ( + typeof process === 'object' && + process.env && + process.env.NODE_DEBUG && + /\bsemver\b/i.test(process.env.NODE_DEBUG) +) ? (...args) => console.error('SEMVER', ...args) + : () => {} + +module.exports = debug + + +/***/ }), +/* 549 */, +/* 550 */ +/***/ (function(module, exports) { + +exports = module.exports = SemVer + +var debug +/* istanbul ignore next */ +if (typeof process === 'object' && + process.env && + process.env.NODE_DEBUG && + /\bsemver\b/i.test(process.env.NODE_DEBUG)) { + debug = function () { + var args = Array.prototype.slice.call(arguments, 0) + args.unshift('SEMVER') + console.log.apply(console, args) + } +} else { + debug = function () {} +} + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +exports.SEMVER_SPEC_VERSION = '2.0.0' + +var MAX_LENGTH = 256 +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || + /* istanbul ignore next */ 9007199254740991 + +// Max safe segment length for coercion. +var MAX_SAFE_COMPONENT_LENGTH = 16 + +// The actual regexps go on exports.re +var re = exports.re = [] +var src = exports.src = [] +var t = exports.tokens = {} +var R = 0 + +function tok (n) { + t[n] = R++ +} + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +tok('NUMERICIDENTIFIER') +src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*' +tok('NUMERICIDENTIFIERLOOSE') +src[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+' + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +tok('NONNUMERICIDENTIFIER') +src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' + +// ## Main Version +// Three dot-separated numeric identifiers. + +tok('MAINVERSION') +src[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIER] + ')' + +tok('MAINVERSIONLOOSE') +src[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')' + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +tok('PRERELEASEIDENTIFIER') +src[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] + + '|' + src[t.NONNUMERICIDENTIFIER] + ')' + +tok('PRERELEASEIDENTIFIERLOOSE') +src[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] + + '|' + src[t.NONNUMERICIDENTIFIER] + ')' + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +tok('PRERELEASE') +src[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] + + '(?:\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))' + +tok('PRERELEASELOOSE') +src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))' + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +tok('BUILDIDENTIFIER') +src[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+' + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +tok('BUILD') +src[t.BUILD] = '(?:\\+(' + src[t.BUILDIDENTIFIER] + + '(?:\\.' + src[t.BUILDIDENTIFIER] + ')*))' + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +tok('FULL') +tok('FULLPLAIN') +src[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] + + src[t.PRERELEASE] + '?' + + src[t.BUILD] + '?' + +src[t.FULL] = '^' + src[t.FULLPLAIN] + '$' + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +tok('LOOSEPLAIN') +src[t.LOOSEPLAIN] = '[v=\\s]*' + src[t.MAINVERSIONLOOSE] + + src[t.PRERELEASELOOSE] + '?' + + src[t.BUILD] + '?' + +tok('LOOSE') +src[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$' + +tok('GTLT') +src[t.GTLT] = '((?:<|>)?=?)' + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +tok('XRANGEIDENTIFIERLOOSE') +src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' +tok('XRANGEIDENTIFIER') +src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\*' + +tok('XRANGEPLAIN') +src[t.XRANGEPLAIN] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:' + src[t.PRERELEASE] + ')?' + + src[t.BUILD] + '?' + + ')?)?' + +tok('XRANGEPLAINLOOSE') +src[t.XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[t.PRERELEASELOOSE] + ')?' + + src[t.BUILD] + '?' + + ')?)?' + +tok('XRANGE') +src[t.XRANGE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAIN] + '$' +tok('XRANGELOOSE') +src[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAINLOOSE] + '$' + +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +tok('COERCE') +src[t.COERCE] = '(^|[^\\d])' + + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:$|[^\\d])' +tok('COERCERTL') +re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g') + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +tok('LONETILDE') +src[t.LONETILDE] = '(?:~>?)' + +tok('TILDETRIM') +src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+' +re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g') +var tildeTrimReplace = '$1~' + +tok('TILDE') +src[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$' +tok('TILDELOOSE') +src[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$' + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +tok('LONECARET') +src[t.LONECARET] = '(?:\\^)' + +tok('CARETTRIM') +src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+' +re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g') +var caretTrimReplace = '$1^' + +tok('CARET') +src[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$' +tok('CARETLOOSE') +src[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$' + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +tok('COMPARATORLOOSE') +src[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + ')$|^$' +tok('COMPARATOR') +src[t.COMPARATOR] = '^' + src[t.GTLT] + '\\s*(' + src[t.FULLPLAIN] + ')$|^$' + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +tok('COMPARATORTRIM') +src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] + + '\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')' + +// this one has to use the /g flag +re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g') +var comparatorTrimReplace = '$1$2$3' + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +tok('HYPHENRANGE') +src[t.HYPHENRANGE] = '^\\s*(' + src[t.XRANGEPLAIN] + ')' + + '\\s+-\\s+' + + '(' + src[t.XRANGEPLAIN] + ')' + + '\\s*$' + +tok('HYPHENRANGELOOSE') +src[t.HYPHENRANGELOOSE] = '^\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' + + '\\s+-\\s+' + + '(' + src[t.XRANGEPLAINLOOSE] + ')' + + '\\s*$' + +// Star ranges basically just allow anything at all. +tok('STAR') +src[t.STAR] = '(<|>)?=?\\s*\\*' + +// Compile to actual regexp objects. +// All are flag-free, unless they were created above with a flag. +for (var i = 0; i < R; i++) { + debug(i, src[i]) + if (!re[i]) { + re[i] = new RegExp(src[i]) + } +} + +exports.parse = parse +function parse (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + if (version.length > MAX_LENGTH) { + return null + } + + var r = options.loose ? re[t.LOOSE] : re[t.FULL] + if (!r.test(version)) { + return null + } + + try { + return new SemVer(version, options) + } catch (er) { + return null + } +} + +exports.valid = valid +function valid (version, options) { + var v = parse(version, options) + return v ? v.version : null +} + +exports.clean = clean +function clean (version, options) { + var s = parse(version.trim().replace(/^[=v]+/, ''), options) + return s ? s.version : null +} + +exports.SemVer = SemVer + +function SemVer (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + if (version instanceof SemVer) { + if (version.loose === options.loose) { + return version + } else { + version = version.version + } + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version) + } + + if (version.length > MAX_LENGTH) { + throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') + } + + if (!(this instanceof SemVer)) { + return new SemVer(version, options) + } + + debug('SemVer', version, options) + this.options = options + this.loose = !!options.loose + + var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) + + if (!m) { + throw new TypeError('Invalid Version: ' + version) + } + + this.raw = version + + // these are actually numbers + this.major = +m[1] + this.minor = +m[2] + this.patch = +m[3] + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError('Invalid major version') + } + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError('Invalid minor version') + } + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError('Invalid patch version') + } + + // numberify any prerelease numeric ids + if (!m[4]) { + this.prerelease = [] + } else { + this.prerelease = m[4].split('.').map(function (id) { + if (/^[0-9]+$/.test(id)) { + var num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num + } + } + return id + }) + } + + this.build = m[5] ? m[5].split('.') : [] + this.format() +} + +SemVer.prototype.format = function () { + this.version = this.major + '.' + this.minor + '.' + this.patch + if (this.prerelease.length) { + this.version += '-' + this.prerelease.join('.') + } + return this.version +} + +SemVer.prototype.toString = function () { + return this.version +} + +SemVer.prototype.compare = function (other) { + debug('SemVer.compare', this.version, this.options, other) + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return this.compareMain(other) || this.comparePre(other) +} + +SemVer.prototype.compareMain = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch) +} + +SemVer.prototype.comparePre = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) { + return -1 + } else if (!this.prerelease.length && other.prerelease.length) { + return 1 + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0 + } + + var i = 0 + do { + var a = this.prerelease[i] + var b = other.prerelease[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} + +SemVer.prototype.compareBuild = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + var i = 0 + do { + var a = this.build[i] + var b = other.build[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} + +// preminor will bump the version up to the next minor release, and immediately +// down to pre-release. premajor and prepatch work the same way. +SemVer.prototype.inc = function (release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0 + this.patch = 0 + this.minor = 0 + this.major++ + this.inc('pre', identifier) + break + case 'preminor': + this.prerelease.length = 0 + this.patch = 0 + this.minor++ + this.inc('pre', identifier) + break + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0 + this.inc('patch', identifier) + this.inc('pre', identifier) + break + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) { + this.inc('patch', identifier) + } + this.inc('pre', identifier) + break + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || + this.patch !== 0 || + this.prerelease.length === 0) { + this.major++ + } + this.minor = 0 + this.patch = 0 + this.prerelease = [] + break + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++ + } + this.patch = 0 + this.prerelease = [] + break + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) { + this.patch++ + } + this.prerelease = [] + break + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) { + this.prerelease = [0] + } else { + var i = this.prerelease.length + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++ + i = -2 + } + } + if (i === -1) { + // didn't increment anything + this.prerelease.push(0) + } + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0] + } + } else { + this.prerelease = [identifier, 0] + } + } + break + + default: + throw new Error('invalid increment argument: ' + release) + } + this.format() + this.raw = this.version + return this +} + +exports.inc = inc +function inc (version, release, loose, identifier) { + if (typeof (loose) === 'string') { + identifier = loose + loose = undefined + } + + try { + return new SemVer(version, loose).inc(release, identifier).version + } catch (er) { + return null + } +} + +exports.diff = diff +function diff (version1, version2) { + if (eq(version1, version2)) { + return null + } else { + var v1 = parse(version1) + var v2 = parse(version2) + var prefix = '' + if (v1.prerelease.length || v2.prerelease.length) { + prefix = 'pre' + var defaultResult = 'prerelease' + } + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return prefix + key + } + } + } + return defaultResult // may be undefined + } +} + +exports.compareIdentifiers = compareIdentifiers + +var numeric = /^[0-9]+$/ +function compareIdentifiers (a, b) { + var anum = numeric.test(a) + var bnum = numeric.test(b) + + if (anum && bnum) { + a = +a + b = +b + } + + return a === b ? 0 + : (anum && !bnum) ? -1 + : (bnum && !anum) ? 1 + : a < b ? -1 + : 1 +} + +exports.rcompareIdentifiers = rcompareIdentifiers +function rcompareIdentifiers (a, b) { + return compareIdentifiers(b, a) +} + +exports.major = major +function major (a, loose) { + return new SemVer(a, loose).major +} + +exports.minor = minor +function minor (a, loose) { + return new SemVer(a, loose).minor +} + +exports.patch = patch +function patch (a, loose) { + return new SemVer(a, loose).patch +} + +exports.compare = compare +function compare (a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)) +} + +exports.compareLoose = compareLoose +function compareLoose (a, b) { + return compare(a, b, true) +} + +exports.compareBuild = compareBuild +function compareBuild (a, b, loose) { + var versionA = new SemVer(a, loose) + var versionB = new SemVer(b, loose) + return versionA.compare(versionB) || versionA.compareBuild(versionB) +} + +exports.rcompare = rcompare +function rcompare (a, b, loose) { + return compare(b, a, loose) +} + +exports.sort = sort +function sort (list, loose) { + return list.sort(function (a, b) { + return exports.compareBuild(a, b, loose) + }) +} + +exports.rsort = rsort +function rsort (list, loose) { + return list.sort(function (a, b) { + return exports.compareBuild(b, a, loose) + }) +} + +exports.gt = gt +function gt (a, b, loose) { + return compare(a, b, loose) > 0 +} + +exports.lt = lt +function lt (a, b, loose) { + return compare(a, b, loose) < 0 +} + +exports.eq = eq +function eq (a, b, loose) { + return compare(a, b, loose) === 0 +} + +exports.neq = neq +function neq (a, b, loose) { + return compare(a, b, loose) !== 0 +} + +exports.gte = gte +function gte (a, b, loose) { + return compare(a, b, loose) >= 0 +} + +exports.lte = lte +function lte (a, b, loose) { + return compare(a, b, loose) <= 0 +} + +exports.cmp = cmp +function cmp (a, op, b, loose) { + switch (op) { + case '===': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a === b + + case '!==': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a !== b + + case '': + case '=': + case '==': + return eq(a, b, loose) + + case '!=': + return neq(a, b, loose) + + case '>': + return gt(a, b, loose) + + case '>=': + return gte(a, b, loose) + + case '<': + return lt(a, b, loose) + + case '<=': + return lte(a, b, loose) + + default: + throw new TypeError('Invalid operator: ' + op) + } +} + +exports.Comparator = Comparator +function Comparator (comp, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp + } else { + comp = comp.value + } + } + + if (!(this instanceof Comparator)) { + return new Comparator(comp, options) + } + + debug('comparator', comp, options) + this.options = options + this.loose = !!options.loose + this.parse(comp) + + if (this.semver === ANY) { + this.value = '' + } else { + this.value = this.operator + this.semver.version + } + + debug('comp', this) +} + +var ANY = {} +Comparator.prototype.parse = function (comp) { + var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + var m = comp.match(r) + + if (!m) { + throw new TypeError('Invalid comparator: ' + comp) + } + + this.operator = m[1] !== undefined ? m[1] : '' + if (this.operator === '=') { + this.operator = '' + } + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) { + this.semver = ANY + } else { + this.semver = new SemVer(m[2], this.options.loose) + } +} + +Comparator.prototype.toString = function () { + return this.value +} + +Comparator.prototype.test = function (version) { + debug('Comparator.test', version, this.options.loose) + + if (this.semver === ANY || version === ANY) { + return true + } + + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + + return cmp(version, this.operator, this.semver, this.options) +} + +Comparator.prototype.intersects = function (comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required') + } + + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + var rangeTmp + + if (this.operator === '') { + if (this.value === '') { + return true + } + rangeTmp = new Range(comp.value, options) + return satisfies(this.value, rangeTmp, options) + } else if (comp.operator === '') { + if (comp.value === '') { + return true + } + rangeTmp = new Range(this.value, options) + return satisfies(comp.semver, rangeTmp, options) + } + + var sameDirectionIncreasing = + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '>=' || comp.operator === '>') + var sameDirectionDecreasing = + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '<=' || comp.operator === '<') + var sameSemVer = this.semver.version === comp.semver.version + var differentDirectionsInclusive = + (this.operator === '>=' || this.operator === '<=') && + (comp.operator === '>=' || comp.operator === '<=') + var oppositeDirectionsLessThan = + cmp(this.semver, '<', comp.semver, options) && + ((this.operator === '>=' || this.operator === '>') && + (comp.operator === '<=' || comp.operator === '<')) + var oppositeDirectionsGreaterThan = + cmp(this.semver, '>', comp.semver, options) && + ((this.operator === '<=' || this.operator === '<') && + (comp.operator === '>=' || comp.operator === '>')) + + return sameDirectionIncreasing || sameDirectionDecreasing || + (sameSemVer && differentDirectionsInclusive) || + oppositeDirectionsLessThan || oppositeDirectionsGreaterThan +} + +exports.Range = Range +function Range (range, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (range instanceof Range) { + if (range.loose === !!options.loose && + range.includePrerelease === !!options.includePrerelease) { + return range + } else { + return new Range(range.raw, options) + } + } + + if (range instanceof Comparator) { + return new Range(range.value, options) + } + + if (!(this instanceof Range)) { + return new Range(range, options) + } + + this.options = options + this.loose = !!options.loose + this.includePrerelease = !!options.includePrerelease + + // First, split based on boolean or || + this.raw = range + this.set = range.split(/\s*\|\|\s*/).map(function (range) { + return this.parseRange(range.trim()) + }, this).filter(function (c) { + // throw out any that are not relevant for whatever reason + return c.length + }) + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + range) + } + + this.format() +} + +Range.prototype.format = function () { + this.range = this.set.map(function (comps) { + return comps.join(' ').trim() + }).join('||').trim() + return this.range +} + +Range.prototype.toString = function () { + return this.range +} + +Range.prototype.parseRange = function (range) { + var loose = this.options.loose + range = range.trim() + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] + range = range.replace(hr, hyphenReplace) + debug('hyphen replace', range) + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range, re[t.COMPARATORTRIM]) + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[t.TILDETRIM], tildeTrimReplace) + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[t.CARETTRIM], caretTrimReplace) + + // normalize spaces + range = range.split(/\s+/).join(' ') + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + + var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + var set = range.split(' ').map(function (comp) { + return parseComparator(comp, this.options) + }, this).join(' ').split(/\s+/) + if (this.options.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function (comp) { + return !!comp.match(compRe) + }) + } + set = set.map(function (comp) { + return new Comparator(comp, this.options) + }, this) + + return set +} + +Range.prototype.intersects = function (range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required') + } + + return this.set.some(function (thisComparators) { + return ( + isSatisfiable(thisComparators, options) && + range.set.some(function (rangeComparators) { + return ( + isSatisfiable(rangeComparators, options) && + thisComparators.every(function (thisComparator) { + return rangeComparators.every(function (rangeComparator) { + return thisComparator.intersects(rangeComparator, options) + }) + }) + ) + }) + ) + }) +} + +// take a set of comparators and determine whether there +// exists a version which can satisfy it +function isSatisfiable (comparators, options) { + var result = true + var remainingComparators = comparators.slice() + var testComparator = remainingComparators.pop() + + while (result && remainingComparators.length) { + result = remainingComparators.every(function (otherComparator) { + return testComparator.intersects(otherComparator, options) + }) + + testComparator = remainingComparators.pop() + } + + return result +} + +// Mostly just for testing and legacy API reasons +exports.toComparators = toComparators +function toComparators (range, options) { + return new Range(range, options).set.map(function (comp) { + return comp.map(function (c) { + return c.value + }).join(' ').trim().split(' ') + }) +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +function parseComparator (comp, options) { + debug('comp', comp, options) + comp = replaceCarets(comp, options) + debug('caret', comp) + comp = replaceTildes(comp, options) + debug('tildes', comp) + comp = replaceXRanges(comp, options) + debug('xrange', comp) + comp = replaceStars(comp, options) + debug('stars', comp) + return comp +} + +function isX (id) { + return !id || id.toLowerCase() === 'x' || id === '*' +} + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 +function replaceTildes (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceTilde(comp, options) + }).join(' ') +} + +function replaceTilde (comp, options) { + var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] + return comp.replace(r, function (_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else if (pr) { + debug('replaceTilde pr', pr) + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } else { + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + + debug('tilde return', ret) + return ret + }) +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2.0 --> >=1.2.0 <2.0.0 +function replaceCarets (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceCaret(comp, options) + }).join(' ') +} + +function replaceCaret (comp, options) { + debug('caret', comp, options) + var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] + return comp.replace(r, function (_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + if (M === '0') { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else { + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' + } + } else if (pr) { + debug('replaceCaret pr', pr) + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + (+M + 1) + '.0.0' + } + } else { + debug('no pr') + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0' + } + } + + debug('caret return', ret) + return ret + }) +} + +function replaceXRanges (comp, options) { + debug('replaceXRanges', comp, options) + return comp.split(/\s+/).map(function (comp) { + return replaceXRange(comp, options) + }).join(' ') +} + +function replaceXRange (comp, options) { + comp = comp.trim() + var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] + return comp.replace(r, function (ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + var xM = isX(M) + var xm = xM || isX(m) + var xp = xm || isX(p) + var anyX = xp + + if (gtlt === '=' && anyX) { + gtlt = '' + } + + // if we're including prereleases in the match, then we need + // to fix this to -0, the lowest possible prerelease value + pr = options.includePrerelease ? '-0' : '' + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0-0' + } else { + // nothing is forbidden + ret = '*' + } + } else if (gtlt && anyX) { + // we know patch is an x, because we have any x at all. + // replace X with 0 + if (xm) { + m = 0 + } + p = 0 + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>=' + if (xm) { + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 + } + } + + ret = gtlt + M + '.' + m + '.' + p + pr + } else if (xm) { + ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr + } else if (xp) { + ret = '>=' + M + '.' + m + '.0' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + pr + } + + debug('xRange return', ret) + + return ret + }) +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +function replaceStars (comp, options) { + debug('replaceStars', comp, options) + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[t.STAR], '') +} +// This function is passed to string.replace(re[t.HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace ($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = '>=' + fM + '.0.0' + } else if (isX(fp)) { + from = '>=' + fM + '.' + fm + '.0' + } else { + from = '>=' + from + } -/***/ }), -/* 540 */ -/***/ (function(module) { + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = '<' + (+tM + 1) + '.0.0' + } else if (isX(tp)) { + to = '<' + tM + '.' + (+tm + 1) + '.0' + } else if (tpr) { + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr + } else { + to = '<=' + to + } -/** - * This function is like - * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * except that it includes inherited enumerable properties. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function nativeKeysIn(object) { - var result = []; - if (object != null) { - for (var key in Object(object)) { - result.push(key); + return (from + ' ' + to).trim() +} + +// if ANY of the sets match ALL of its comparators, then pass +Range.prototype.test = function (version) { + if (!version) { + return false + } + + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false } } - return result; + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true + } + } + return false } -module.exports = nativeKeysIn; +function testSet (set, version, options) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false + } + } + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === ANY) { + continue + } -/***/ }), -/* 541 */, -/* 542 */ -/***/ (function(module, __unusedexports, __webpack_require__) { + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) { + return true + } + } + } -var apply = __webpack_require__(512), - createCtor = __webpack_require__(322), - createHybrid = __webpack_require__(224), - createRecurry = __webpack_require__(673), - getHolder = __webpack_require__(683), - replaceHolders = __webpack_require__(944), - root = __webpack_require__(824); + // Version has a -pre, but it's not one of the ones we like. + return false + } -/** - * Creates a function that wraps `func` to enable currying. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {number} arity The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ -function createCurry(func, bitmask, arity) { - var Ctor = createCtor(func); + return true +} - function wrapper() { - var length = arguments.length, - args = Array(length), - index = length, - placeholder = getHolder(wrapper); +exports.satisfies = satisfies +function satisfies (version, range, options) { + try { + range = new Range(range, options) + } catch (er) { + return false + } + return range.test(version) +} - while (index--) { - args[index] = arguments[index]; +exports.maxSatisfying = maxSatisfying +function maxSatisfying (versions, range, options) { + var max = null + var maxSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v + maxSV = new SemVer(max, options) + } } - var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) - ? [] - : replaceHolders(args, placeholder); + }) + return max +} - length -= holders.length; - if (length < arity) { - return createRecurry( - func, bitmask, createHybrid, wrapper.placeholder, undefined, - args, holders, undefined, undefined, arity - length); - } - var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - return apply(fn, this, args); +exports.minSatisfying = minSatisfying +function minSatisfying (versions, range, options) { + var min = null + var minSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null } - return wrapper; + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v + minSV = new SemVer(min, options) + } + } + }) + return min } -module.exports = createCurry; +exports.minVersion = minVersion +function minVersion (range, loose) { + range = new Range(range, loose) + var minver = new SemVer('0.0.0') + if (range.test(minver)) { + return minver + } -/***/ }), -/* 543 */, -/* 544 */, -/* 545 */, -/* 546 */ -/***/ (function(module, exports, __webpack_require__) { + minver = new SemVer('0.0.0-0') + if (range.test(minver)) { + return minver + } -/* module decorator */ module = __webpack_require__.nmd(module); -var root = __webpack_require__(824), - stubFalse = __webpack_require__(451); + minver = null + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] -/** Detect free variable `exports`. */ -var freeExports = true && exports && !exports.nodeType && exports; + comparators.forEach(function (comparator) { + // Clone to avoid manipulating the comparator's semver object. + var compver = new SemVer(comparator.semver.version) + switch (comparator.operator) { + case '>': + if (compver.prerelease.length === 0) { + compver.patch++ + } else { + compver.prerelease.push(0) + } + compver.raw = compver.format() + /* fallthrough */ + case '': + case '>=': + if (!minver || gt(minver, compver)) { + minver = compver + } + break + case '<': + case '<=': + /* Ignore maximum versions */ + break + /* istanbul ignore next */ + default: + throw new Error('Unexpected operation: ' + comparator.operator) + } + }) + } -/** Detect free variable `module`. */ -var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module; + if (minver && range.test(minver)) { + return minver + } -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; + return null +} -/** Built-in value references. */ -var Buffer = moduleExports ? root.Buffer : undefined; +exports.validRange = validRange +function validRange (range, options) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, options).range || '*' + } catch (er) { + return null + } +} -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; +// Determine if version is less than all the versions possible in the range +exports.ltr = ltr +function ltr (version, range, options) { + return outside(version, range, '<', options) +} -/** - * Checks if `value` is a buffer. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. - * @example - * - * _.isBuffer(new Buffer(2)); - * // => true - * - * _.isBuffer(new Uint8Array(2)); - * // => false - */ -var isBuffer = nativeIsBuffer || stubFalse; +// Determine if version is greater than all the versions possible in the range. +exports.gtr = gtr +function gtr (version, range, options) { + return outside(version, range, '>', options) +} -module.exports = isBuffer; +exports.outside = outside +function outside (version, range, hilo, options) { + version = new SemVer(version, options) + range = new Range(range, options) + + var gtfn, ltefn, ltfn, comp, ecomp + switch (hilo) { + case '>': + gtfn = gt + ltefn = lte + ltfn = lt + comp = '>' + ecomp = '>=' + break + case '<': + gtfn = lt + ltefn = gte + ltfn = gt + comp = '<' + ecomp = '<=' + break + default: + throw new TypeError('Must provide a hilo val of "<" or ">"') + } + // If it satisifes the range it is not outside + if (satisfies(version, range, options)) { + return false + } -/***/ }), -/* 547 */ -/***/ (function(module, __unusedexports, __webpack_require__) { + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. -var createCtor = __webpack_require__(322), - root = __webpack_require__(824); + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1; + var high = null + var low = null -/** - * Creates a function that wraps `func` to invoke it with the optional `this` - * binding of `thisArg`. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {*} [thisArg] The `this` binding of `func`. - * @returns {Function} Returns the new wrapped function. - */ -function createBind(func, bitmask, thisArg) { - var isBind = bitmask & WRAP_BIND_FLAG, - Ctor = createCtor(func); + comparators.forEach(function (comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator + low = low || comparator + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator + } + }) - function wrapper() { - var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - return fn.apply(isBind ? thisArg : this, arguments); + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false + } } - return wrapper; + return true } -module.exports = createBind; +exports.prerelease = prerelease +function prerelease (version, options) { + var parsed = parse(version, options) + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null +} + +exports.intersects = intersects +function intersects (r1, r2, options) { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2) +} + +exports.coerce = coerce +function coerce (version, options) { + if (version instanceof SemVer) { + return version + } + + if (typeof version === 'number') { + version = String(version) + } + + if (typeof version !== 'string') { + return null + } + + options = options || {} + + var match = null + if (!options.rtl) { + match = version.match(re[t.COERCE]) + } else { + // Find the right-most coercible string that does not share + // a terminus with a more left-ward coercible string. + // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' + // + // Walk through the string checking with a /g regexp + // Manually set the index so as to pick up overlapping matches. + // Stop when we get a match that ends at the string end, since no + // coercible string can be more right-ward without the same terminus. + var next + while ((next = re[t.COERCERTL].exec(version)) && + (!match || match.index + match[0].length !== version.length) + ) { + if (!match || + next.index + next[0].length !== match.index + match[0].length) { + match = next + } + re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length + } + // leave it in a clean state + re[t.COERCERTL].lastIndex = -1 + } + + if (match === null) { + return null + } + + return parse(match[2] + + '.' + (match[3] || '0') + + '.' + (match[4] || '0'), options) +} /***/ }), -/* 548 */, -/* 549 */, -/* 550 */, /* 551 */, /* 552 */, /* 553 */ @@ -22172,7 +24148,7 @@ exports.runInstaller = exports.getLocalInstallerPath = void 0; const path = __importStar(__webpack_require__(622)); const core = __importStar(__webpack_require__(470)); const utils = __importStar(__webpack_require__(163)); -const conda = __importStar(__webpack_require__(259)); +const conda = __importStar(__webpack_require__(506)); const download_miniforge_1 = __webpack_require__(897); const download_miniconda_1 = __webpack_require__(768); const download_url_1 = __webpack_require__(339); @@ -22500,7 +24476,7 @@ if (process.env.READABLE_STREAM === 'disable' && Stream) { exports.Duplex = __webpack_require__(831); exports.Transform = __webpack_require__(925); exports.PassThrough = __webpack_require__(882); - exports.finished = __webpack_require__(740); + exports.finished = __webpack_require__(287); exports.pipeline = __webpack_require__(238); } @@ -22674,96 +24650,9 @@ module.exports = isPlainObject; /* 586 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var getAllKeys = __webpack_require__(706); - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - objProps = getAllKeys(object), - objLength = objProps.length, - othProps = getAllKeys(other), - othLength = othProps.length; - - if (objLength != othLength && !isPartial) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { - return false; - } - } - // Check that cyclic values are equal. - var objStacked = stack.get(object); - var othStacked = stack.get(other); - if (objStacked && othStacked) { - return objStacked == other && othStacked == object; - } - var result = true; - stack.set(object, other); - stack.set(other, object); - - var skipCtor = isPartial; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, objValue, key, other, object, stack) - : customizer(objValue, othValue, key, object, other, stack); - } - // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) - : compared - )) { - result = false; - break; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - result = false; - } - } - stack['delete'](object); - stack['delete'](other); - return result; -} - -module.exports = equalObjects; +const compare = __webpack_require__(874) +const lt = (a, b, loose) => compare(a, b, loose) < 0 +module.exports = lt /***/ }), @@ -23307,7 +25196,15 @@ module.exports = { /* 590 */, /* 591 */, /* 592 */, -/* 593 */, +/* 593 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const compareBuild = __webpack_require__(16) +const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)) +module.exports = rsort + + +/***/ }), /* 594 */, /* 595 */ /***/ (function(module) { @@ -23372,23 +25269,46 @@ module.exports = Stack; /* 600 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var Uint8Array = __webpack_require__(161); +module.exports = compile; -/** - * Creates a clone of `arrayBuffer`. - * - * @private - * @param {ArrayBuffer} arrayBuffer The array buffer to clone. - * @returns {ArrayBuffer} Returns the cloned array buffer. - */ -function cloneArrayBuffer(arrayBuffer) { - var result = new arrayBuffer.constructor(arrayBuffer.byteLength); - new Uint8Array(result).set(new Uint8Array(arrayBuffer)); - return result; -} +var BaseFuncs = __webpack_require__(312), + trueFunc = BaseFuncs.trueFunc, + falseFunc = BaseFuncs.falseFunc; -module.exports = cloneArrayBuffer; +/* + returns a function that checks if an elements index matches the given rule + highly optimized to return the fastest solution +*/ +function compile(parsed){ + var a = parsed[0], + b = parsed[1] - 1; + + //when b <= 0, a*n won't be possible for any matches when a < 0 + //besides, the specification says that no element is matched when a and b are 0 + if(b < 0 && a <= 0) return falseFunc; + + //when a is in the range -1..1, it matches any element (so only b is checked) + if(a ===-1) return function(pos){ return pos <= b; }; + if(a === 0) return function(pos){ return pos === b; }; + //when b <= 0 and a === 1, they match any element + if(a === 1) return b < 0 ? trueFunc : function(pos){ return pos >= b; }; + + //when a > 0, modulo can be used to check if there is a match + var bMod = b % a; + if(bMod < 0) bMod += a; + + if(a > 1){ + return function(pos){ + return pos >= b && pos % a === bMod; + }; + } + + a *= -1; //make `a` positive + return function(pos){ + return pos <= b && pos % a === bMod; + }; +} /***/ }), /* 601 */, @@ -23858,7 +25778,102 @@ module.exports = require("path"); /***/ }), /* 623 */, /* 624 */, -/* 625 */, +/* 625 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var getAllKeys = __webpack_require__(706); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Check that cyclic values are equal. + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; +} + +module.exports = equalObjects; + + +/***/ }), /* 626 */, /* 627 */, /* 628 */, @@ -23929,7 +25944,15 @@ module.exports = new Type('tag:yaml.org,2002:js/regexp', { /***/ }), -/* 630 */, +/* 630 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const compare = __webpack_require__(874) +const rcompare = (a, b, loose) => compare(b, a, loose) +module.exports = rcompare + + +/***/ }), /* 631 */ /***/ (function(module) { @@ -23946,7 +25969,7 @@ function ProxyHandler(cbs) { this._cbs = cbs || {}; } -var EVENTS = __webpack_require__(818).EVENTS; +var EVENTS = __webpack_require__(21).EVENTS; Object.keys(EVENTS).forEach(function(name) { if (EVENTS[name] === 0) { name = "on" + name; @@ -24108,7 +26131,36 @@ function getProcedure(token){ /***/ }), /* 643 */, /* 644 */, -/* 645 */, +/* 645 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var isStrictComparable = __webpack_require__(258), + keys = __webpack_require__(863); + +/** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; + } + return result; +} + +module.exports = getMatchData; + + +/***/ }), /* 646 */, /* 647 */, /* 648 */, @@ -24132,7 +26184,7 @@ function Cbs(scope) { this.scope = scope; } -var EVENTS = __webpack_require__(818).EVENTS; +var EVENTS = __webpack_require__(21).EVENTS; Object.keys(EVENTS).forEach(function(name) { if (EVENTS[name] === 0) { @@ -24266,7 +26318,7 @@ module.exports = mapToArray; var Tokenizer = __webpack_require__(990), - foreignContent = __webpack_require__(298), + foreignContent = __webpack_require__(998), UNICODE = __webpack_require__(56), HTML = __webpack_require__(621); @@ -26521,7 +28573,18 @@ module.exports = hashClear; /***/ }), /* 712 */, /* 713 */, -/* 714 */, +/* 714 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const parse = __webpack_require__(830) +const valid = (version, options) => { + const v = parse(version, options) + return v ? v.version : null +} +module.exports = valid + + +/***/ }), /* 715 */ /***/ (function(__unusedmodule, exports, __webpack_require__) { @@ -26599,7 +28662,7 @@ var Pseudos = __webpack_require__(589), getChildren = DomUtils.getChildren, removeSubsets = DomUtils.removeSubsets, falseFunc = __webpack_require__(312).falseFunc, - compile = __webpack_require__(124), + compile = __webpack_require__(158), compileUnsafe = compile.compileUnsafe, compileToken = compile.compileToken; @@ -26763,7 +28826,7 @@ var baseIsEqual = __webpack_require__(190), isKey = __webpack_require__(290), isStrictComparable = __webpack_require__(258), matchesStrictComparable = __webpack_require__(2), - toKey = __webpack_require__(503); + toKey = __webpack_require__(484); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, @@ -27043,111 +29106,31 @@ var isNode = function(obj) { /* 740 */ /***/ (function(module, __unusedexports, __webpack_require__) { -"use strict"; -// Ported from https://github.com/mafintosh/end-of-stream with -// permission from the author, Mathias Buus (@mafintosh). - - -var ERR_STREAM_PREMATURE_CLOSE = __webpack_require__(563).codes.ERR_STREAM_PREMATURE_CLOSE; - -function once(callback) { - var called = false; - return function () { - if (called) return; - called = true; - - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - callback.apply(this, args); - }; -} - -function noop() {} - -function isRequest(stream) { - return stream.setHeader && typeof stream.abort === 'function'; -} - -function eos(stream, opts, callback) { - if (typeof opts === 'function') return eos(stream, null, opts); - if (!opts) opts = {}; - callback = once(callback || noop); - var readable = opts.readable || opts.readable !== false && stream.readable; - var writable = opts.writable || opts.writable !== false && stream.writable; - - var onlegacyfinish = function onlegacyfinish() { - if (!stream.writable) onfinish(); - }; - - var writableEnded = stream._writableState && stream._writableState.finished; - - var onfinish = function onfinish() { - writable = false; - writableEnded = true; - if (!readable) callback.call(stream); - }; - - var readableEnded = stream._readableState && stream._readableState.endEmitted; - - var onend = function onend() { - readable = false; - readableEnded = true; - if (!writable) callback.call(stream); - }; - - var onerror = function onerror(err) { - callback.call(stream, err); - }; - - var onclose = function onclose() { - var err; - - if (readable && !readableEnded) { - if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); - return callback.call(stream, err); - } - - if (writable && !writableEnded) { - if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); - return callback.call(stream, err); - } - }; - - var onrequest = function onrequest() { - stream.req.on('finish', onfinish); - }; - - if (isRequest(stream)) { - stream.on('complete', onfinish); - stream.on('abort', onclose); - if (stream.req) onrequest();else stream.on('request', onrequest); - } else if (writable && !stream._writableState) { - // legacy streams - stream.on('end', onlegacyfinish); - stream.on('close', onlegacyfinish); +const SemVer = __webpack_require__(65) +const Range = __webpack_require__(124) +const minSatisfying = (versions, range, options) => { + let min = null + let minSV = null + let rangeObj = null + try { + rangeObj = new Range(range, options) + } catch (er) { + return null } - - stream.on('end', onend); - stream.on('finish', onfinish); - if (opts.error !== false) stream.on('error', onerror); - stream.on('close', onclose); - return function () { - stream.removeListener('complete', onfinish); - stream.removeListener('abort', onclose); - stream.removeListener('request', onrequest); - if (stream.req) stream.req.removeListener('finish', onfinish); - stream.removeListener('end', onlegacyfinish); - stream.removeListener('close', onlegacyfinish); - stream.removeListener('finish', onfinish); - stream.removeListener('end', onend); - stream.removeListener('error', onerror); - stream.removeListener('close', onclose); - }; + versions.forEach((v) => { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v + minSV = new SemVer(min, options) + } + } + }) + return min } +module.exports = minSatisfying -module.exports = eos; /***/ }), /* 741 */, @@ -27182,44 +29165,11 @@ module.exports = arraySome; /***/ }), /* 744 */ -/***/ (function(module, exports, __webpack_require__) { - -/* module decorator */ module = __webpack_require__.nmd(module); -var root = __webpack_require__(824); - -/** Detect free variable `exports`. */ -var freeExports = true && exports && !exports.nodeType && exports; - -/** Detect free variable `module`. */ -var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module; - -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; - -/** Built-in value references. */ -var Buffer = moduleExports ? root.Buffer : undefined, - allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; - -/** - * Creates a clone of `buffer`. - * - * @private - * @param {Buffer} buffer The buffer to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Buffer} Returns the cloned buffer. - */ -function cloneBuffer(buffer, isDeep) { - if (isDeep) { - return buffer.slice(); - } - var length = buffer.length, - result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); - - buffer.copy(result); - return result; -} +/***/ (function(module, __unusedexports, __webpack_require__) { -module.exports = cloneBuffer; +const SemVer = __webpack_require__(65) +const major = (a, loose) => new SemVer(a, loose).major +module.exports = major /***/ }), @@ -27475,7 +29425,7 @@ module.exports = Type; var LazyWrapper = __webpack_require__(922), LodashWrapper = __webpack_require__(204), baseLodash = __webpack_require__(681), - isArray = __webpack_require__(143), + isArray = __webpack_require__(806), isObjectLike = __webpack_require__(337), wrapperClone = __webpack_require__(953); @@ -27622,7 +29572,60 @@ module.exports = lodash; /***/ }), -/* 752 */, +/* 752 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const eq = __webpack_require__(298) +const neq = __webpack_require__(873) +const gt = __webpack_require__(486) +const gte = __webpack_require__(167) +const lt = __webpack_require__(586) +const lte = __webpack_require__(898) + +const cmp = (a, op, b, loose) => { + switch (op) { + case '===': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a === b + + case '!==': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a !== b + + case '': + case '=': + case '==': + return eq(a, b, loose) + + case '!=': + return neq(a, b, loose) + + case '>': + return gt(a, b, loose) + + case '>=': + return gte(a, b, loose) + + case '<': + return lt(a, b, loose) + + case '<=': + return lte(a, b, loose) + + default: + throw new TypeError(`Invalid operator: ${op}`) + } +} +module.exports = cmp + + +/***/ }), /* 753 */, /* 754 */ /***/ (function(module) { @@ -27672,7 +29675,35 @@ module.exports = listCacheGet; /* 757 */, /* 758 */, /* 759 */, -/* 760 */, +/* 760 */ +/***/ (function(module) { + +const numeric = /^[0-9]+$/ +const compareIdentifiers = (a, b) => { + const anum = numeric.test(a) + const bnum = numeric.test(b) + + if (anum && bnum) { + a = +a + b = +b + } + + return a === b ? 0 + : (anum && !bnum) ? -1 + : (bnum && !anum) ? 1 + : a < b ? -1 + : 1 +} + +const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a) + +module.exports = { + compareIdentifiers, + rcompareIdentifiers +} + + +/***/ }), /* 761 */, /* 762 */, /* 763 */, @@ -30000,7 +32031,7 @@ module.exports.safeLoad = safeLoad; /* 771 */ /***/ (function(module) { -module.exports = {"_args":[["cheerio@1.0.0-rc.3","/home/weg/projects/actions/setup-miniconda"]],"_from":"cheerio@1.0.0-rc.3","_id":"cheerio@1.0.0-rc.3","_inBundle":false,"_integrity":"sha512-0td5ijfUPuubwLUu0OBoe98gZj8C/AA+RW3v67GPlGOrvxWjZmBXiBCRU+I8VEiNyJzjth40POfHiz2RB3gImA==","_location":"/cheerio","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"cheerio@1.0.0-rc.3","name":"cheerio","escapedName":"cheerio","rawSpec":"1.0.0-rc.3","saveSpec":null,"fetchSpec":"1.0.0-rc.3"},"_requiredBy":["/get-hrefs"],"_resolved":"https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.3.tgz","_spec":"1.0.0-rc.3","_where":"/home/weg/projects/actions/setup-miniconda","author":{"name":"Matt Mueller","email":"mattmuelle@gmail.com","url":"mat.io"},"bugs":{"url":"https://github.com/cheeriojs/cheerio/issues"},"dependencies":{"css-select":"~1.2.0","dom-serializer":"~0.1.1","entities":"~1.1.1","htmlparser2":"^3.9.1","lodash":"^4.15.0","parse5":"^3.0.1"},"description":"Tiny, fast, and elegant implementation of core jQuery designed specifically for the server","devDependencies":{"benchmark":"^2.1.0","coveralls":"^2.11.9","expect.js":"~0.3.1","istanbul":"^0.4.3","jquery":"^3.0.0","jsdom":"^9.2.1","jshint":"^2.9.2","mocha":"^3.1.2","xyz":"~1.1.0"},"engines":{"node":">= 0.6"},"files":["index.js","lib"],"homepage":"https://github.com/cheeriojs/cheerio#readme","keywords":["htmlparser","jquery","selector","scraper","parser","html"],"license":"MIT","main":"./index.js","name":"cheerio","repository":{"type":"git","url":"git://github.com/cheeriojs/cheerio.git"},"scripts":{"test":"make test"},"version":"1.0.0-rc.3"}; +module.exports = {"_args":[["cheerio@1.0.0-rc.3","/Users/jrodriguez/devel/setup-miniconda"]],"_from":"cheerio@1.0.0-rc.3","_id":"cheerio@1.0.0-rc.3","_inBundle":false,"_integrity":"sha512-0td5ijfUPuubwLUu0OBoe98gZj8C/AA+RW3v67GPlGOrvxWjZmBXiBCRU+I8VEiNyJzjth40POfHiz2RB3gImA==","_location":"/cheerio","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"cheerio@1.0.0-rc.3","name":"cheerio","escapedName":"cheerio","rawSpec":"1.0.0-rc.3","saveSpec":null,"fetchSpec":"1.0.0-rc.3"},"_requiredBy":["/get-hrefs"],"_resolved":"https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.3.tgz","_spec":"1.0.0-rc.3","_where":"/Users/jrodriguez/devel/setup-miniconda","author":{"name":"Matt Mueller","email":"mattmuelle@gmail.com","url":"mat.io"},"bugs":{"url":"https://github.com/cheeriojs/cheerio/issues"},"dependencies":{"css-select":"~1.2.0","dom-serializer":"~0.1.1","entities":"~1.1.1","htmlparser2":"^3.9.1","lodash":"^4.15.0","parse5":"^3.0.1"},"description":"Tiny, fast, and elegant implementation of core jQuery designed specifically for the server","devDependencies":{"benchmark":"^2.1.0","coveralls":"^2.11.9","expect.js":"~0.3.1","istanbul":"^0.4.3","jquery":"^3.0.0","jsdom":"^9.2.1","jshint":"^2.9.2","mocha":"^3.1.2","xyz":"~1.1.0"},"engines":{"node":">= 0.6"},"files":["index.js","lib"],"homepage":"https://github.com/cheeriojs/cheerio#readme","keywords":["htmlparser","jquery","selector","scraper","parser","html"],"license":"MIT","main":"./index.js","name":"cheerio","repository":{"type":"git","url":"git://github.com/cheeriojs/cheerio.git"},"scripts":{"test":"make test"},"version":"1.0.0-rc.3"}; /***/ }), /* 772 */ @@ -30052,7 +32083,7 @@ module.exports = nativeKeys; var arrayEach = __webpack_require__(698), baseEach = __webpack_require__(804), castFunction = __webpack_require__(946), - isArray = __webpack_require__(143); + isArray = __webpack_require__(806); /** * Iterates over elements of `collection` and invokes `iteratee` for each element. @@ -30610,7 +32641,51 @@ Preprocessor.prototype.retreat = function () { /***/ }), -/* 800 */, +/* 800 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +var castPath = __webpack_require__(929), + isArguments = __webpack_require__(460), + isArray = __webpack_require__(806), + isIndex = __webpack_require__(160), + isLength = __webpack_require__(611), + toKey = __webpack_require__(484); + +/** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ +function hasPath(object, path, hasFunc) { + path = castPath(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && + (isArray(object) || isArguments(object)); +} + +module.exports = hasPath; + + +/***/ }), /* 801 */ /***/ (function(__unusedmodule, exports, __webpack_require__) { @@ -31138,7 +33213,15 @@ module.exports = hashHas; /***/ }), -/* 803 */, +/* 803 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const SemVer = __webpack_require__(65) +const minor = (a, loose) => new SemVer(a, loose).minor +module.exports = minor + + +/***/ }), /* 804 */ /***/ (function(module, __unusedexports, __webpack_require__) { @@ -31184,7 +33267,38 @@ module.exports = new Schema({ /***/ }), -/* 806 */, +/* 806 */ +/***/ (function(module) { + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +module.exports = isArray; + + +/***/ }), /* 807 */ /***/ (function(module) { @@ -31292,7 +33406,37 @@ module.exports = new Type('tag:yaml.org,2002:null', { /***/ }), /* 810 */, -/* 811 */, +/* 811 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const SemVer = __webpack_require__(65) +const Range = __webpack_require__(124) + +const maxSatisfying = (versions, range, options) => { + let max = null + let maxSV = null + let rangeObj = null + try { + rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v + maxSV = new SemVer(max, options) + } + } + }) + return max +} +module.exports = maxSatisfying + + +/***/ }), /* 812 */ /***/ (function(module, __unusedexports, __webpack_require__) { @@ -31492,81 +33636,9 @@ module.exports = constant; /***/ }), /* 818 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -var Parser = __webpack_require__(178); -var DomHandler = __webpack_require__(281); - -function defineProp(name, value) { - delete module.exports[name]; - module.exports[name] = value; - return value; -} - -module.exports = { - Parser: Parser, - Tokenizer: __webpack_require__(843), - ElementType: __webpack_require__(855), - DomHandler: DomHandler, - get FeedHandler() { - return defineProp("FeedHandler", __webpack_require__(504)); - }, - get Stream() { - return defineProp("Stream", __webpack_require__(650)); - }, - get WritableStream() { - return defineProp("WritableStream", __webpack_require__(837)); - }, - get ProxyHandler() { - return defineProp("ProxyHandler", __webpack_require__(633)); - }, - get DomUtils() { - return defineProp("DomUtils", __webpack_require__(104)); - }, - get CollectingHandler() { - return defineProp( - "CollectingHandler", - __webpack_require__(119) - ); - }, - // For legacy support - DefaultHandler: DomHandler, - get RssHandler() { - return defineProp("RssHandler", this.FeedHandler); - }, - //helper methods - parseDOM: function(data, options) { - var handler = new DomHandler(options); - new Parser(handler, options).end(data); - return handler.dom; - }, - parseFeed: function(feed, options) { - var handler = new module.exports.FeedHandler(options); - new Parser(handler, options).end(feed); - return handler.dom; - }, - createDomStream: function(cb, options, elementCb) { - var handler = new DomHandler(cb, options, elementCb); - return new Parser(handler, options); - }, - // List of all events that the parser emits - EVENTS: { - /* Format: eventname: number of arguments */ - attribute: 2, - cdatastart: 0, - cdataend: 0, - text: 1, - processinginstruction: 2, - comment: 1, - commentend: 0, - closetag: 1, - opentag: 2, - opentagname: 1, - error: 1, - end: 0 - } -}; +/***/ (function(module) { +module.exports = require("tls"); /***/ }), /* 819 */ @@ -31643,7 +33715,35 @@ module.exports = assocIndexOf; /***/ }), /* 821 */, -/* 822 */, +/* 822 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const parse = __webpack_require__(830) +const eq = __webpack_require__(298) + +const diff = (version1, version2) => { + if (eq(version1, version2)) { + return null + } else { + const v1 = parse(version1) + const v2 = parse(version2) + const hasPre = v1.prerelease.length || v2.prerelease.length + const prefix = hasPre ? 'pre' : '' + const defaultResult = hasPre ? 'prerelease' : '' + for (const key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return prefix + key + } + } + } + return defaultResult // may be undefined + } +} +module.exports = diff + + +/***/ }), /* 823 */, /* 824 */ /***/ (function(module, __unusedexports, __webpack_require__) { @@ -31699,7 +33799,45 @@ module.exports = v4; /* 827 */, /* 828 */, /* 829 */, -/* 830 */, +/* 830 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const {MAX_LENGTH} = __webpack_require__(181) +const { re, t } = __webpack_require__(976) +const SemVer = __webpack_require__(65) + +const parseOptions = __webpack_require__(143) +const parse = (version, options) => { + options = parseOptions(options) + + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + if (version.length > MAX_LENGTH) { + return null + } + + const r = options.loose ? re[t.LOOSE] : re[t.FULL] + if (!r.test(version)) { + return null + } + + try { + return new SemVer(version, options) + } catch (er) { + return null + } +} + +module.exports = parse + + +/***/ }), /* 831 */ /***/ (function(module, __unusedexports, __webpack_require__) { @@ -31998,9 +34136,9 @@ module.exports = new Type('tag:yaml.org,2002:js/function', { var Stack = __webpack_require__(598), equalArrays = __webpack_require__(90), equalByTag = __webpack_require__(74), - equalObjects = __webpack_require__(586), + equalObjects = __webpack_require__(625), getTag = __webpack_require__(700), - isArray = __webpack_require__(143), + isArray = __webpack_require__(806), isBuffer = __webpack_require__(546), isTypedArray = __webpack_require__(850); @@ -33407,7 +35545,7 @@ var assignValue = __webpack_require__(363), castPath = __webpack_require__(929), isIndex = __webpack_require__(160), isObject = __webpack_require__(988), - toKey = __webpack_require__(503); + toKey = __webpack_require__(484); /** * The base implementation of `_.set`. @@ -33618,7 +35756,7 @@ module.exports = __webpack_require__(141); /***/ (function(module, __unusedexports, __webpack_require__) { var arrayPush = __webpack_require__(883), - isArray = __webpack_require__(143); + isArray = __webpack_require__(806); /** * The base implementation of `getAllKeys` and `getAllKeysIn` which uses @@ -33787,8 +35925,26 @@ module.exports = coreJsData; /***/ }), /* 872 */, -/* 873 */, -/* 874 */, +/* 873 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const compare = __webpack_require__(874) +const neq = (a, b, loose) => compare(a, b, loose) !== 0 +module.exports = neq + + +/***/ }), +/* 874 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const SemVer = __webpack_require__(65) +const compare = (a, b, loose) => + new SemVer(a, loose).compare(new SemVer(b, loose)) + +module.exports = compare + + +/***/ }), /* 875 */ /***/ (function(module, __unusedexports, __webpack_require__) { @@ -33835,8 +35991,110 @@ module.exports = copyObject; /***/ }), -/* 876 */, -/* 877 */, +/* 876 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +// just pre-load all the stuff that index.js lazily exports +const internalRe = __webpack_require__(976) +module.exports = { + re: internalRe.re, + src: internalRe.src, + tokens: internalRe.t, + SEMVER_SPEC_VERSION: __webpack_require__(181).SEMVER_SPEC_VERSION, + SemVer: __webpack_require__(65), + compareIdentifiers: __webpack_require__(760).compareIdentifiers, + rcompareIdentifiers: __webpack_require__(760).rcompareIdentifiers, + parse: __webpack_require__(830), + valid: __webpack_require__(714), + clean: __webpack_require__(503), + inc: __webpack_require__(928), + diff: __webpack_require__(822), + major: __webpack_require__(744), + minor: __webpack_require__(803), + patch: __webpack_require__(489), + prerelease: __webpack_require__(968), + compare: __webpack_require__(874), + rcompare: __webpack_require__(630), + compareLoose: __webpack_require__(283), + compareBuild: __webpack_require__(16), + sort: __webpack_require__(120), + rsort: __webpack_require__(593), + gt: __webpack_require__(486), + lt: __webpack_require__(586), + eq: __webpack_require__(298), + neq: __webpack_require__(873), + gte: __webpack_require__(167), + lte: __webpack_require__(898), + cmp: __webpack_require__(752), + coerce: __webpack_require__(499), + Comparator: __webpack_require__(174), + Range: __webpack_require__(124), + satisfies: __webpack_require__(310), + toComparators: __webpack_require__(219), + maxSatisfying: __webpack_require__(811), + minSatisfying: __webpack_require__(740), + minVersion: __webpack_require__(164), + validRange: __webpack_require__(480), + outside: __webpack_require__(462), + gtr: __webpack_require__(531), + ltr: __webpack_require__(323), + intersects: __webpack_require__(259), + simplifyRange: __webpack_require__(877), + subset: __webpack_require__(999), +} + + +/***/ }), +/* 877 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +// given a set of versions and a range, create a "simplified" range +// that includes the same versions that the original range does +// If the original range is shorter than the simplified one, return that. +const satisfies = __webpack_require__(310) +const compare = __webpack_require__(874) +module.exports = (versions, range, options) => { + const set = [] + let min = null + let prev = null + const v = versions.sort((a, b) => compare(a, b, options)) + for (const version of v) { + const included = satisfies(version, range, options) + if (included) { + prev = version + if (!min) + min = version + } else { + if (prev) { + set.push([min, prev]) + } + prev = null + min = null + } + } + if (min) + set.push([min, null]) + + const ranges = [] + for (const [min, max] of set) { + if (min === max) + ranges.push(min) + else if (!max && min === v[0]) + ranges.push('*') + else if (!max) + ranges.push(`>=${min}`) + else if (min === v[0]) + ranges.push(`<=${max}`) + else + ranges.push(`${min} - ${max}`) + } + const simplified = ranges.join(' || ') + const original = typeof range.raw === 'string' ? range.raw : String(range) + return simplified.length < original.length ? simplified : range +} + + +/***/ }), /* 878 */ /***/ (function(module, __unusedexports, __webpack_require__) { @@ -34268,7 +36526,15 @@ exports.miniforgeDownloader = { /***/ }), -/* 898 */, +/* 898 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const compare = __webpack_require__(874) +const lte = (a, b, loose) => compare(a, b, loose) <= 0 +module.exports = lte + + +/***/ }), /* 899 */, /* 900 */, /* 901 */, @@ -34573,7 +36839,48 @@ module.exports = createBaseEach; /***/ }), -/* 920 */, +/* 920 */ +/***/ (function(module, exports, __webpack_require__) { + +/* module decorator */ module = __webpack_require__.nmd(module); +var root = __webpack_require__(824); + +/** Detect free variable `exports`. */ +var freeExports = true && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; + +/** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; +} + +module.exports = cloneBuffer; + + +/***/ }), /* 921 */ /***/ (function(module, __unusedexports, __webpack_require__) { @@ -34844,7 +37151,7 @@ module.exports = {"universal":50,"tag":30,"attribute":1,"pseudo":0,"descendant": var baseProperty = __webpack_require__(509), basePropertyDeep = __webpack_require__(352), isKey = __webpack_require__(290), - toKey = __webpack_require__(503); + toKey = __webpack_require__(484); /** * Creates a function that returns the value at `path` of a given object. @@ -34876,11 +37183,31 @@ module.exports = property; /***/ }), -/* 928 */, +/* 928 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const SemVer = __webpack_require__(65) + +const inc = (version, release, options, identifier) => { + if (typeof (options) === 'string') { + identifier = options + options = undefined + } + + try { + return new SemVer(version, options).inc(release, identifier).version + } catch (er) { + return null + } +} +module.exports = inc + + +/***/ }), /* 929 */ /***/ (function(module, __unusedexports, __webpack_require__) { -var isArray = __webpack_require__(143), +var isArray = __webpack_require__(806), isKey = __webpack_require__(290), stringToPath = __webpack_require__(440), toString = __webpack_require__(428); @@ -35439,10 +37766,10 @@ const path = __importStar(__webpack_require__(622)); const fs = __importStar(__webpack_require__(747)); const yaml = __importStar(__webpack_require__(414)); const core = __importStar(__webpack_require__(470)); -const conda = __importStar(__webpack_require__(259)); +const conda = __importStar(__webpack_require__(506)); const explicit_1 = __webpack_require__(285); const yaml_1 = __webpack_require__(528); -const simple_1 = __webpack_require__(21); +const simple_1 = __webpack_require__(375); /** * The current known providers of envs * @@ -35638,7 +37965,18 @@ SAXParser.prototype._emitPendingText = function () { /***/ }), -/* 968 */, +/* 968 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const parse = __webpack_require__(830) +const prerelease = (version, options) => { + const parsed = parse(version, options) + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null +} +module.exports = prerelease + + +/***/ }), /* 969 */, /* 970 */, /* 971 */ @@ -35694,7 +38032,7 @@ module.exports = freeGlobal; /***/ (function(module, __unusedexports, __webpack_require__) { var baseIsMatch = __webpack_require__(255), - getMatchData = __webpack_require__(517), + getMatchData = __webpack_require__(645), matchesStrictComparable = __webpack_require__(2); /** @@ -35720,48 +38058,191 @@ module.exports = baseMatches; /***/ }), /* 975 */, /* 976 */ -/***/ (function(module, __unusedexports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { -module.exports = compile; +const { MAX_SAFE_COMPONENT_LENGTH } = __webpack_require__(181) +const debug = __webpack_require__(548) +exports = module.exports = {} -var BaseFuncs = __webpack_require__(312), - trueFunc = BaseFuncs.trueFunc, - falseFunc = BaseFuncs.falseFunc; +// The actual regexps go on exports.re +const re = exports.re = [] +const src = exports.src = [] +const t = exports.t = {} +let R = 0 -/* - returns a function that checks if an elements index matches the given rule - highly optimized to return the fastest solution -*/ -function compile(parsed){ - var a = parsed[0], - b = parsed[1] - 1; +const createToken = (name, value, isGlobal) => { + const index = R++ + debug(index, value) + t[name] = index + src[index] = value + re[index] = new RegExp(value, isGlobal ? 'g' : undefined) +} - //when b <= 0, a*n won't be possible for any matches when a < 0 - //besides, the specification says that no element is matched when a and b are 0 - if(b < 0 && a <= 0) return falseFunc; +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. - //when a is in the range -1..1, it matches any element (so only b is checked) - if(a ===-1) return function(pos){ return pos <= b; }; - if(a === 0) return function(pos){ return pos === b; }; - //when b <= 0 and a === 1, they match any element - if(a === 1) return b < 0 ? trueFunc : function(pos){ return pos >= b; }; +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. - //when a > 0, modulo can be used to check if there is a match - var bMod = b % a; - if(bMod < 0) bMod += a; +createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*') +createToken('NUMERICIDENTIFIERLOOSE', '[0-9]+') - if(a > 1){ - return function(pos){ - return pos >= b && pos % a === bMod; - }; - } +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. - a *= -1; //make `a` positive +createToken('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*') + +// ## Main Version +// Three dot-separated numeric identifiers. + +createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` + + `(${src[t.NUMERICIDENTIFIER]})\\.` + + `(${src[t.NUMERICIDENTIFIER]})`) + +createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + + `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + + `(${src[t.NUMERICIDENTIFIERLOOSE]})`) + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER] +}|${src[t.NONNUMERICIDENTIFIER]})`) + +createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE] +}|${src[t.NONNUMERICIDENTIFIER]})`) + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER] +}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`) + +createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE] +}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`) + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +createToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+') + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER] +}(?:\\.${src[t.BUILDIDENTIFIER]})*))`) + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +createToken('FULLPLAIN', `v?${src[t.MAINVERSION] +}${src[t.PRERELEASE]}?${ + src[t.BUILD]}?`) + +createToken('FULL', `^${src[t.FULLPLAIN]}$`) + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE] +}${src[t.PRERELEASELOOSE]}?${ + src[t.BUILD]}?`) + +createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`) + +createToken('GTLT', '((?:<|>)?=?)') + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`) +createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`) + +createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + + `(?:${src[t.PRERELEASE]})?${ + src[t.BUILD]}?` + + `)?)?`) + +createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + + `(?:${src[t.PRERELEASELOOSE]})?${ + src[t.BUILD]}?` + + `)?)?`) + +createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`) +createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`) + +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +createToken('COERCE', `${'(^|[^\\d])' + + '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` + + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + + `(?:$|[^\\d])`) +createToken('COERCERTL', src[t.COERCE], true) + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +createToken('LONETILDE', '(?:~>?)') + +createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true) +exports.tildeTrimReplace = '$1~' + +createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`) +createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`) + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +createToken('LONECARET', '(?:\\^)') + +createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true) +exports.caretTrimReplace = '$1^' + +createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`) +createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`) + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`) +createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`) + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT] +}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true) +exports.comparatorTrimReplace = '$1$2$3' + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` + + `\\s+-\\s+` + + `(${src[t.XRANGEPLAIN]})` + + `\\s*$`) + +createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + + `\\s+-\\s+` + + `(${src[t.XRANGEPLAINLOOSE]})` + + `\\s*$`) + +// Star ranges basically just allow anything at all. +createToken('STAR', '(<|>)?=?\\s*\\*') +// >=0.0.0 is like a star +createToken('GTE0', '^\\s*>=\\s*0\.0\.0\\s*$') +createToken('GTE0PRE', '^\\s*>=\\s*0\.0\.0-0\\s*$') - return function(pos){ - return pos <= b && pos % a === bMod; - }; -} /***/ }), /* 977 */, @@ -38348,6 +40829,507 @@ LocationInfoTokenizerMixin.prototype._getOverriddenMethods = function (mxn, orig +/***/ }), +/* 992 */, +/* 993 */, +/* 994 */, +/* 995 */, +/* 996 */, +/* 997 */, +/* 998 */ +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + + +var Tokenizer = __webpack_require__(990), + HTML = __webpack_require__(621); + +//Aliases +var $ = HTML.TAG_NAMES, + NS = HTML.NAMESPACES, + ATTRS = HTML.ATTRS; + + +//MIME types +var MIME_TYPES = { + TEXT_HTML: 'text/html', + APPLICATION_XML: 'application/xhtml+xml' +}; + +//Attributes +var DEFINITION_URL_ATTR = 'definitionurl', + ADJUSTED_DEFINITION_URL_ATTR = 'definitionURL', + SVG_ATTRS_ADJUSTMENT_MAP = { + 'attributename': 'attributeName', + 'attributetype': 'attributeType', + 'basefrequency': 'baseFrequency', + 'baseprofile': 'baseProfile', + 'calcmode': 'calcMode', + 'clippathunits': 'clipPathUnits', + 'diffuseconstant': 'diffuseConstant', + 'edgemode': 'edgeMode', + 'filterunits': 'filterUnits', + 'glyphref': 'glyphRef', + 'gradienttransform': 'gradientTransform', + 'gradientunits': 'gradientUnits', + 'kernelmatrix': 'kernelMatrix', + 'kernelunitlength': 'kernelUnitLength', + 'keypoints': 'keyPoints', + 'keysplines': 'keySplines', + 'keytimes': 'keyTimes', + 'lengthadjust': 'lengthAdjust', + 'limitingconeangle': 'limitingConeAngle', + 'markerheight': 'markerHeight', + 'markerunits': 'markerUnits', + 'markerwidth': 'markerWidth', + 'maskcontentunits': 'maskContentUnits', + 'maskunits': 'maskUnits', + 'numoctaves': 'numOctaves', + 'pathlength': 'pathLength', + 'patterncontentunits': 'patternContentUnits', + 'patterntransform': 'patternTransform', + 'patternunits': 'patternUnits', + 'pointsatx': 'pointsAtX', + 'pointsaty': 'pointsAtY', + 'pointsatz': 'pointsAtZ', + 'preservealpha': 'preserveAlpha', + 'preserveaspectratio': 'preserveAspectRatio', + 'primitiveunits': 'primitiveUnits', + 'refx': 'refX', + 'refy': 'refY', + 'repeatcount': 'repeatCount', + 'repeatdur': 'repeatDur', + 'requiredextensions': 'requiredExtensions', + 'requiredfeatures': 'requiredFeatures', + 'specularconstant': 'specularConstant', + 'specularexponent': 'specularExponent', + 'spreadmethod': 'spreadMethod', + 'startoffset': 'startOffset', + 'stddeviation': 'stdDeviation', + 'stitchtiles': 'stitchTiles', + 'surfacescale': 'surfaceScale', + 'systemlanguage': 'systemLanguage', + 'tablevalues': 'tableValues', + 'targetx': 'targetX', + 'targety': 'targetY', + 'textlength': 'textLength', + 'viewbox': 'viewBox', + 'viewtarget': 'viewTarget', + 'xchannelselector': 'xChannelSelector', + 'ychannelselector': 'yChannelSelector', + 'zoomandpan': 'zoomAndPan' + }, + XML_ATTRS_ADJUSTMENT_MAP = { + 'xlink:actuate': {prefix: 'xlink', name: 'actuate', namespace: NS.XLINK}, + 'xlink:arcrole': {prefix: 'xlink', name: 'arcrole', namespace: NS.XLINK}, + 'xlink:href': {prefix: 'xlink', name: 'href', namespace: NS.XLINK}, + 'xlink:role': {prefix: 'xlink', name: 'role', namespace: NS.XLINK}, + 'xlink:show': {prefix: 'xlink', name: 'show', namespace: NS.XLINK}, + 'xlink:title': {prefix: 'xlink', name: 'title', namespace: NS.XLINK}, + 'xlink:type': {prefix: 'xlink', name: 'type', namespace: NS.XLINK}, + 'xml:base': {prefix: 'xml', name: 'base', namespace: NS.XML}, + 'xml:lang': {prefix: 'xml', name: 'lang', namespace: NS.XML}, + 'xml:space': {prefix: 'xml', name: 'space', namespace: NS.XML}, + 'xmlns': {prefix: '', name: 'xmlns', namespace: NS.XMLNS}, + 'xmlns:xlink': {prefix: 'xmlns', name: 'xlink', namespace: NS.XMLNS} + + }; + +//SVG tag names adjustment map +var SVG_TAG_NAMES_ADJUSTMENT_MAP = exports.SVG_TAG_NAMES_ADJUSTMENT_MAP = { + 'altglyph': 'altGlyph', + 'altglyphdef': 'altGlyphDef', + 'altglyphitem': 'altGlyphItem', + 'animatecolor': 'animateColor', + 'animatemotion': 'animateMotion', + 'animatetransform': 'animateTransform', + 'clippath': 'clipPath', + 'feblend': 'feBlend', + 'fecolormatrix': 'feColorMatrix', + 'fecomponenttransfer': 'feComponentTransfer', + 'fecomposite': 'feComposite', + 'feconvolvematrix': 'feConvolveMatrix', + 'fediffuselighting': 'feDiffuseLighting', + 'fedisplacementmap': 'feDisplacementMap', + 'fedistantlight': 'feDistantLight', + 'feflood': 'feFlood', + 'fefunca': 'feFuncA', + 'fefuncb': 'feFuncB', + 'fefuncg': 'feFuncG', + 'fefuncr': 'feFuncR', + 'fegaussianblur': 'feGaussianBlur', + 'feimage': 'feImage', + 'femerge': 'feMerge', + 'femergenode': 'feMergeNode', + 'femorphology': 'feMorphology', + 'feoffset': 'feOffset', + 'fepointlight': 'fePointLight', + 'fespecularlighting': 'feSpecularLighting', + 'fespotlight': 'feSpotLight', + 'fetile': 'feTile', + 'feturbulence': 'feTurbulence', + 'foreignobject': 'foreignObject', + 'glyphref': 'glyphRef', + 'lineargradient': 'linearGradient', + 'radialgradient': 'radialGradient', + 'textpath': 'textPath' +}; + +//Tags that causes exit from foreign content +var EXITS_FOREIGN_CONTENT = Object.create(null); + +EXITS_FOREIGN_CONTENT[$.B] = true; +EXITS_FOREIGN_CONTENT[$.BIG] = true; +EXITS_FOREIGN_CONTENT[$.BLOCKQUOTE] = true; +EXITS_FOREIGN_CONTENT[$.BODY] = true; +EXITS_FOREIGN_CONTENT[$.BR] = true; +EXITS_FOREIGN_CONTENT[$.CENTER] = true; +EXITS_FOREIGN_CONTENT[$.CODE] = true; +EXITS_FOREIGN_CONTENT[$.DD] = true; +EXITS_FOREIGN_CONTENT[$.DIV] = true; +EXITS_FOREIGN_CONTENT[$.DL] = true; +EXITS_FOREIGN_CONTENT[$.DT] = true; +EXITS_FOREIGN_CONTENT[$.EM] = true; +EXITS_FOREIGN_CONTENT[$.EMBED] = true; +EXITS_FOREIGN_CONTENT[$.H1] = true; +EXITS_FOREIGN_CONTENT[$.H2] = true; +EXITS_FOREIGN_CONTENT[$.H3] = true; +EXITS_FOREIGN_CONTENT[$.H4] = true; +EXITS_FOREIGN_CONTENT[$.H5] = true; +EXITS_FOREIGN_CONTENT[$.H6] = true; +EXITS_FOREIGN_CONTENT[$.HEAD] = true; +EXITS_FOREIGN_CONTENT[$.HR] = true; +EXITS_FOREIGN_CONTENT[$.I] = true; +EXITS_FOREIGN_CONTENT[$.IMG] = true; +EXITS_FOREIGN_CONTENT[$.LI] = true; +EXITS_FOREIGN_CONTENT[$.LISTING] = true; +EXITS_FOREIGN_CONTENT[$.MENU] = true; +EXITS_FOREIGN_CONTENT[$.META] = true; +EXITS_FOREIGN_CONTENT[$.NOBR] = true; +EXITS_FOREIGN_CONTENT[$.OL] = true; +EXITS_FOREIGN_CONTENT[$.P] = true; +EXITS_FOREIGN_CONTENT[$.PRE] = true; +EXITS_FOREIGN_CONTENT[$.RUBY] = true; +EXITS_FOREIGN_CONTENT[$.S] = true; +EXITS_FOREIGN_CONTENT[$.SMALL] = true; +EXITS_FOREIGN_CONTENT[$.SPAN] = true; +EXITS_FOREIGN_CONTENT[$.STRONG] = true; +EXITS_FOREIGN_CONTENT[$.STRIKE] = true; +EXITS_FOREIGN_CONTENT[$.SUB] = true; +EXITS_FOREIGN_CONTENT[$.SUP] = true; +EXITS_FOREIGN_CONTENT[$.TABLE] = true; +EXITS_FOREIGN_CONTENT[$.TT] = true; +EXITS_FOREIGN_CONTENT[$.U] = true; +EXITS_FOREIGN_CONTENT[$.UL] = true; +EXITS_FOREIGN_CONTENT[$.VAR] = true; + +//Check exit from foreign content +exports.causesExit = function (startTagToken) { + var tn = startTagToken.tagName; + var isFontWithAttrs = tn === $.FONT && (Tokenizer.getTokenAttr(startTagToken, ATTRS.COLOR) !== null || + Tokenizer.getTokenAttr(startTagToken, ATTRS.SIZE) !== null || + Tokenizer.getTokenAttr(startTagToken, ATTRS.FACE) !== null); + + return isFontWithAttrs ? true : EXITS_FOREIGN_CONTENT[tn]; +}; + +//Token adjustments +exports.adjustTokenMathMLAttrs = function (token) { + for (var i = 0; i < token.attrs.length; i++) { + if (token.attrs[i].name === DEFINITION_URL_ATTR) { + token.attrs[i].name = ADJUSTED_DEFINITION_URL_ATTR; + break; + } + } +}; + +exports.adjustTokenSVGAttrs = function (token) { + for (var i = 0; i < token.attrs.length; i++) { + var adjustedAttrName = SVG_ATTRS_ADJUSTMENT_MAP[token.attrs[i].name]; + + if (adjustedAttrName) + token.attrs[i].name = adjustedAttrName; + } +}; + +exports.adjustTokenXMLAttrs = function (token) { + for (var i = 0; i < token.attrs.length; i++) { + var adjustedAttrEntry = XML_ATTRS_ADJUSTMENT_MAP[token.attrs[i].name]; + + if (adjustedAttrEntry) { + token.attrs[i].prefix = adjustedAttrEntry.prefix; + token.attrs[i].name = adjustedAttrEntry.name; + token.attrs[i].namespace = adjustedAttrEntry.namespace; + } + } +}; + +exports.adjustTokenSVGTagName = function (token) { + var adjustedTagName = SVG_TAG_NAMES_ADJUSTMENT_MAP[token.tagName]; + + if (adjustedTagName) + token.tagName = adjustedTagName; +}; + +//Integration points +function isMathMLTextIntegrationPoint(tn, ns) { + return ns === NS.MATHML && (tn === $.MI || tn === $.MO || tn === $.MN || tn === $.MS || tn === $.MTEXT); +} + +function isHtmlIntegrationPoint(tn, ns, attrs) { + if (ns === NS.MATHML && tn === $.ANNOTATION_XML) { + for (var i = 0; i < attrs.length; i++) { + if (attrs[i].name === ATTRS.ENCODING) { + var value = attrs[i].value.toLowerCase(); + + return value === MIME_TYPES.TEXT_HTML || value === MIME_TYPES.APPLICATION_XML; + } + } + } + + return ns === NS.SVG && (tn === $.FOREIGN_OBJECT || tn === $.DESC || tn === $.TITLE); +} + +exports.isIntegrationPoint = function (tn, ns, attrs, foreignNS) { + if ((!foreignNS || foreignNS === NS.HTML) && isHtmlIntegrationPoint(tn, ns, attrs)) + return true; + + if ((!foreignNS || foreignNS === NS.MATHML) && isMathMLTextIntegrationPoint(tn, ns)) + return true; + + return false; +}; + + +/***/ }), +/* 999 */ +/***/ (function(module, __unusedexports, __webpack_require__) { + +const Range = __webpack_require__(124) +const Comparator = __webpack_require__(174) +const { ANY } = Comparator +const satisfies = __webpack_require__(310) +const compare = __webpack_require__(874) + +// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff: +// - Every simple range `r1, r2, ...` is a null set, OR +// - Every simple range `r1, r2, ...` which is not a null set is a subset of +// some `R1, R2, ...` +// +// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff: +// - If c is only the ANY comparator +// - If C is only the ANY comparator, return true +// - Else if in prerelease mode, return false +// - else replace c with `[>=0.0.0]` +// - If C is only the ANY comparator +// - if in prerelease mode, return true +// - else replace C with `[>=0.0.0]` +// - Let EQ be the set of = comparators in c +// - If EQ is more than one, return true (null set) +// - Let GT be the highest > or >= comparator in c +// - Let LT be the lowest < or <= comparator in c +// - If GT and LT, and GT.semver > LT.semver, return true (null set) +// - If any C is a = range, and GT or LT are set, return false +// - If EQ +// - If GT, and EQ does not satisfy GT, return true (null set) +// - If LT, and EQ does not satisfy LT, return true (null set) +// - If EQ satisfies every C, return true +// - Else return false +// - If GT +// - If GT.semver is lower than any > or >= comp in C, return false +// - If GT is >=, and GT.semver does not satisfy every C, return false +// - If GT.semver has a prerelease, and not in prerelease mode +// - If no C has a prerelease and the GT.semver tuple, return false +// - If LT +// - If LT.semver is greater than any < or <= comp in C, return false +// - If LT is <=, and LT.semver does not satisfy every C, return false +// - If GT.semver has a prerelease, and not in prerelease mode +// - If no C has a prerelease and the LT.semver tuple, return false +// - Else return true + +const subset = (sub, dom, options = {}) => { + if (sub === dom) + return true + + sub = new Range(sub, options) + dom = new Range(dom, options) + let sawNonNull = false + + OUTER: for (const simpleSub of sub.set) { + for (const simpleDom of dom.set) { + const isSub = simpleSubset(simpleSub, simpleDom, options) + sawNonNull = sawNonNull || isSub !== null + if (isSub) + continue OUTER + } + // the null set is a subset of everything, but null simple ranges in + // a complex range should be ignored. so if we saw a non-null range, + // then we know this isn't a subset, but if EVERY simple range was null, + // then it is a subset. + if (sawNonNull) + return false + } + return true +} + +const simpleSubset = (sub, dom, options) => { + if (sub === dom) + return true + + if (sub.length === 1 && sub[0].semver === ANY) { + if (dom.length === 1 && dom[0].semver === ANY) + return true + else if (options.includePrerelease) + sub = [ new Comparator('>=0.0.0-0') ] + else + sub = [ new Comparator('>=0.0.0') ] + } + + if (dom.length === 1 && dom[0].semver === ANY) { + if (options.includePrerelease) + return true + else + dom = [ new Comparator('>=0.0.0') ] + } + + const eqSet = new Set() + let gt, lt + for (const c of sub) { + if (c.operator === '>' || c.operator === '>=') + gt = higherGT(gt, c, options) + else if (c.operator === '<' || c.operator === '<=') + lt = lowerLT(lt, c, options) + else + eqSet.add(c.semver) + } + + if (eqSet.size > 1) + return null + + let gtltComp + if (gt && lt) { + gtltComp = compare(gt.semver, lt.semver, options) + if (gtltComp > 0) + return null + else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) + return null + } + + // will iterate one or zero times + for (const eq of eqSet) { + if (gt && !satisfies(eq, String(gt), options)) + return null + + if (lt && !satisfies(eq, String(lt), options)) + return null + + for (const c of dom) { + if (!satisfies(eq, String(c), options)) + return false + } + + return true + } + + let higher, lower + let hasDomLT, hasDomGT + // if the subset has a prerelease, we need a comparator in the superset + // with the same tuple and a prerelease, or it's not a subset + let needDomLTPre = lt && + !options.includePrerelease && + lt.semver.prerelease.length ? lt.semver : false + let needDomGTPre = gt && + !options.includePrerelease && + gt.semver.prerelease.length ? gt.semver : false + // exception: <1.2.3-0 is the same as <1.2.3 + if (needDomLTPre && needDomLTPre.prerelease.length === 1 && + lt.operator === '<' && needDomLTPre.prerelease[0] === 0) { + needDomLTPre = false + } + + for (const c of dom) { + hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=' + hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=' + if (gt) { + if (needDomGTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && + c.semver.major === needDomGTPre.major && + c.semver.minor === needDomGTPre.minor && + c.semver.patch === needDomGTPre.patch) { + needDomGTPre = false + } + } + if (c.operator === '>' || c.operator === '>=') { + higher = higherGT(gt, c, options) + if (higher === c && higher !== gt) + return false + } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) + return false + } + if (lt) { + if (needDomLTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && + c.semver.major === needDomLTPre.major && + c.semver.minor === needDomLTPre.minor && + c.semver.patch === needDomLTPre.patch) { + needDomLTPre = false + } + } + if (c.operator === '<' || c.operator === '<=') { + lower = lowerLT(lt, c, options) + if (lower === c && lower !== lt) + return false + } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) + return false + } + if (!c.operator && (lt || gt) && gtltComp !== 0) + return false + } + + // if there was a < or >, and nothing in the dom, then must be false + // UNLESS it was limited by another range in the other direction. + // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0 + if (gt && hasDomLT && !lt && gtltComp !== 0) + return false + + if (lt && hasDomGT && !gt && gtltComp !== 0) + return false + + // we needed a prerelease range in a specific tuple, but didn't get one + // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0, + // because it includes prereleases in the 1.2.3 tuple + if (needDomGTPre || needDomLTPre) + return false + + return true +} + +// >=1.2.3 is lower than >1.2.3 +const higherGT = (a, b, options) => { + if (!a) + return b + const comp = compare(a.semver, b.semver, options) + return comp > 0 ? a + : comp < 0 ? b + : b.operator === '>' && a.operator === '>=' ? b + : a +} + +// <=1.2.3 is higher than <1.2.3 +const lowerLT = (a, b, options) => { + if (!a) + return b + const comp = compare(a.semver, b.semver, options) + return comp < 0 ? a + : comp > 0 ? b + : b.operator === '<' && a.operator === '<=' ? b + : a +} + +module.exports = subset + + /***/ }) /******/ ], /******/ function(__webpack_require__) { // webpackRuntimeModules diff --git a/package-lock.json b/package-lock.json index 1fbf0abe..fc5eb565 100644 --- a/package-lock.json +++ b/package-lock.json @@ -41,6 +41,13 @@ "@actions/io": "^1.0.1", "semver": "^6.1.0", "uuid": "^3.3.2" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } } }, "@babel/code-frame": { @@ -197,6 +204,14 @@ "npm-package-arg": "^6.1.0", "p-map": "^2.1.0", "semver": "^6.2.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "@lerna/bootstrap": { @@ -228,6 +243,14 @@ "p-waterfall": "^1.0.0", "read-package-tree": "^5.1.6", "semver": "^6.2.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "@lerna/changed": { @@ -367,6 +390,12 @@ "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true } } }, @@ -408,6 +437,12 @@ "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "dev": true }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, "slash": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", @@ -546,6 +581,14 @@ "requires": { "@lerna/child-process": "3.16.5", "semver": "^6.2.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "@lerna/import": { @@ -810,6 +853,14 @@ "npm-package-arg": "^6.1.0", "npmlog": "^4.1.2", "semver": "^6.2.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "@lerna/prerelease-id-from-version": { @@ -819,6 +870,14 @@ "dev": true, "requires": { "semver": "^6.2.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "@lerna/profiler": { @@ -1043,6 +1102,14 @@ "p-map": "^2.1.0", "p-pipe": "^1.2.0", "semver": "^6.2.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "@lerna/pulse-till-done": { @@ -1222,6 +1289,12 @@ "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "dev": true }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, "slash": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", @@ -1540,6 +1613,11 @@ "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", "dev": true }, + "@types/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-D/2EJvAlCEtYFEYmmlGwbGXuK886HzyCc3nZX/tkFTQdEU8jZDAgiv08P162yB17y4ZXZoq7yFAnW4GDBb9Now==" + }, "@typescript-eslint/eslint-plugin": { "version": "2.34.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.34.0.tgz", @@ -2777,6 +2855,12 @@ "strip-indent": "^3.0.0" } }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, "strip-indent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", @@ -3836,6 +3920,12 @@ "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true } } }, @@ -4832,6 +4922,12 @@ "redent": "^2.0.0", "trim-newlines": "^2.0.0" } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true } } }, @@ -7855,9 +7951,27 @@ "dev": true }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "requires": { + "lru-cache": "^6.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } }, "semver-compare": { "version": "1.0.0", diff --git a/package.json b/package.json index 53e89af9..3cc2136d 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,9 @@ "@actions/io": "^1.0.1", "@actions/tool-cache": "^1.1.2", "get-hrefs": "^4.0.0", - "js-yaml": "^3.13.1" + "js-yaml": "^3.13.1", + "semver": "^7.3.5", + "@types/semver": "^7.3.8" }, "devDependencies": { "@types/js-yaml": "^3.12.4", diff --git a/src/input.ts b/src/input.ts index 89439a77..17491951 100644 --- a/src/input.ts +++ b/src/input.ts @@ -1,5 +1,6 @@ import * as path from "path"; import * as core from "@actions/core"; +import * as semver from "semver"; import * as constants from "./constants"; import * as types from "./types"; @@ -59,8 +60,21 @@ const RULES: IRule[] = [ constants.KNOWN_EXTENSIONS }`, (i) => - !!(i.minicondaVersion && i.architecture !== "x64") && + !!(!i.minicondaVersion && i.architecture !== "x64") && `'architecture: ${i.architecture}' requires "miniconda-version"`, + ( + i // Miniconda x86 is only published for Windows lately (last Linux was 2019, last MacOS 2015) + ) => + !!(i.architecture === "x86" && !constants.IS_WINDOWS) && + `'architecture: ${i.architecture}' is only available for recent versions on Windows`, + ( + i // We only support miniconda 4.6 or later (`conda init` and /condabin were added here, which we need) + ) => + !!( + !["latest", ""].includes(i.minicondaVersion) && + semver.lt(i.minicondaVersion, "4.6.0") + ) && + `'architecture: ${i.architecture}' requires "miniconda-version">=4.6 but you chose '${i.minicondaVersion}'`, ]; /*