From 4062956ee52d7ea0a4c32ec293ba3fa91a1070e8 Mon Sep 17 00:00:00 2001 From: Leo Hanisch Date: Thu, 1 Feb 2024 20:12:21 +0100 Subject: [PATCH] chore: upgrade to node v20 --- .github/workflows/CI.yml | 2 +- .nvmrc | 1 + CHANGELOG.md | 15 +- action.yml | 2 +- dist/index.js | 71903 ++++++++++++++++++++++++++----------- package-lock.json | 1457 +- tsconfig.json | 2 +- 7 files changed, 50825 insertions(+), 22557 deletions(-) create mode 100644 .nvmrc diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 70c7f3f..098fd8a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -24,7 +24,7 @@ jobs: - macos-latest - windows-latest node: - - 16 + - 20 steps: - name: Checkout Source uses: actions/checkout@v2 diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..9a2a0e2 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v20 diff --git a/CHANGELOG.md b/CHANGELOG.md index bc5a1e2..a28c7c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased -[All Changes](https://github.com/HaaLeo/publish-vscode-extension/compare/v1.5.0...master) +[All Changes](https://github.com/HaaLeo/publish-vscode-extension/compare/v1.6.0...master) + +## [1.6.0](https://github.com/HaaLeo/publish-vscode-extension/tree/1.6.0) 2024-02-01 + +### Changed + +* Upgraded the action's node version to v20 [#50](https://github.com/HaaLeo/publish-vscode-extension/issues/50) +* Changed build target from `es6` to `es2022` + +### Security +* Updated dependencies to + * `@vscode/vsce@2.23.0` + +[All Changes](https://github.com/HaaLeo/publish-vscode-extension/compare/v1.5.0...v1.6.0) ## [1.5.0](https://github.com/HaaLeo/publish-vscode-extension/tree/1.5.0) 2023-10-03 diff --git a/action.yml b/action.yml index 16bf0b1..45a2d9c 100644 --- a/action.yml +++ b/action.yml @@ -64,5 +64,5 @@ outputs: description: The path to the packaged and published VSIX file. runs: - using: 'node16' + using: 'node20' main: 'dist/index.js' diff --git a/dist/index.js b/dist/index.js index 9449a62..adf861f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,7 +1,7 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ 7351: +/***/ 87351: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -27,7 +27,7 @@ var __importStar = (this && this.__importStar) || function (mod) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.issue = exports.issueCommand = void 0; -const os = __importStar(__nccwpck_require__(2037)); +const os = __importStar(__nccwpck_require__(22037)); const utils_1 = __nccwpck_require__(5278); /** * Commands @@ -100,7 +100,7 @@ function escapeProperty(s) { /***/ }), -/***/ 2186: +/***/ 42186: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -135,12 +135,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; -const command_1 = __nccwpck_require__(7351); +const command_1 = __nccwpck_require__(87351); const file_command_1 = __nccwpck_require__(717); const utils_1 = __nccwpck_require__(5278); -const os = __importStar(__nccwpck_require__(2037)); -const path = __importStar(__nccwpck_require__(1017)); -const oidc_utils_1 = __nccwpck_require__(8041); +const os = __importStar(__nccwpck_require__(22037)); +const path = __importStar(__nccwpck_require__(71017)); +const oidc_utils_1 = __nccwpck_require__(98041); /** * The code to exit an action */ @@ -425,12 +425,12 @@ exports.getIDToken = getIDToken; /** * Summary exports */ -var summary_1 = __nccwpck_require__(1327); +var summary_1 = __nccwpck_require__(81327); Object.defineProperty(exports, "summary", ({ enumerable: true, get: function () { return summary_1.summary; } })); /** * @deprecated use core.summary */ -var summary_2 = __nccwpck_require__(1327); +var summary_2 = __nccwpck_require__(81327); Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } })); /** * Path exports @@ -472,9 +472,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; // We use any as a valid input type /* eslint-disable @typescript-eslint/no-explicit-any */ -const fs = __importStar(__nccwpck_require__(7147)); -const os = __importStar(__nccwpck_require__(2037)); -const uuid_1 = __nccwpck_require__(5840); +const fs = __importStar(__nccwpck_require__(57147)); +const os = __importStar(__nccwpck_require__(22037)); +const uuid_1 = __nccwpck_require__(75840); const utils_1 = __nccwpck_require__(5278); function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; @@ -508,7 +508,7 @@ exports.prepareKeyValueMessage = prepareKeyValueMessage; /***/ }), -/***/ 8041: +/***/ 98041: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -524,9 +524,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.OidcClient = void 0; -const http_client_1 = __nccwpck_require__(6255); -const auth_1 = __nccwpck_require__(5526); -const core_1 = __nccwpck_require__(2186); +const http_client_1 = __nccwpck_require__(96255); +const auth_1 = __nccwpck_require__(35526); +const core_1 = __nccwpck_require__(42186); class OidcClient { static createHttpClient(allowRetry = true, maxRetry = 10) { const requestOptions = { @@ -618,7 +618,7 @@ var __importStar = (this && this.__importStar) || function (mod) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; -const path = __importStar(__nccwpck_require__(1017)); +const path = __importStar(__nccwpck_require__(71017)); /** * toPosixPath converts the given path to the posix form. On Windows, \\ will be * replaced with /. @@ -657,7 +657,7 @@ exports.toPlatformPath = toPlatformPath; /***/ }), -/***/ 1327: +/***/ 81327: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -673,8 +673,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; -const os_1 = __nccwpck_require__(2037); -const fs_1 = __nccwpck_require__(7147); +const os_1 = __nccwpck_require__(22037); +const fs_1 = __nccwpck_require__(57147); const { access, appendFile, writeFile } = fs_1.promises; exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'; exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary'; @@ -994,7 +994,7 @@ exports.toCommandProperties = toCommandProperties; /***/ }), -/***/ 5526: +/***/ 35526: /***/ (function(__unused_webpack_module, exports) { "use strict"; @@ -1082,7 +1082,7 @@ exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHand /***/ }), -/***/ 6255: +/***/ 96255: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -1090,7 +1090,11 @@ exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHand /* eslint-disable @typescript-eslint/no-explicit-any */ 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]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -1103,7 +1107,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( 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); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -1118,10 +1122,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; -const http = __importStar(__nccwpck_require__(3685)); -const https = __importStar(__nccwpck_require__(5687)); -const pm = __importStar(__nccwpck_require__(9835)); -const tunnel = __importStar(__nccwpck_require__(4294)); +const http = __importStar(__nccwpck_require__(13685)); +const https = __importStar(__nccwpck_require__(95687)); +const pm = __importStar(__nccwpck_require__(19835)); +const tunnel = __importStar(__nccwpck_require__(74294)); +const undici_1 = __nccwpck_require__(41773); var HttpCodes; (function (HttpCodes) { HttpCodes[HttpCodes["OK"] = 200] = "OK"; @@ -1151,16 +1156,16 @@ var HttpCodes; HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; -})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); +})(HttpCodes || (exports.HttpCodes = HttpCodes = {})); var Headers; (function (Headers) { Headers["Accept"] = "accept"; Headers["ContentType"] = "content-type"; -})(Headers = exports.Headers || (exports.Headers = {})); +})(Headers || (exports.Headers = Headers = {})); var MediaTypes; (function (MediaTypes) { MediaTypes["ApplicationJson"] = "application/json"; -})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); +})(MediaTypes || (exports.MediaTypes = MediaTypes = {})); /** * Returns the proxy URL, depending upon the supplied url and proxy environment variables. * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com @@ -1529,6 +1534,15 @@ class HttpClient { const parsedUrl = new URL(serverUrl); return this._getAgent(parsedUrl); } + getAgentDispatcher(serverUrl) { + const parsedUrl = new URL(serverUrl); + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (!useProxy) { + return; + } + return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); + } _prepareRequest(method, requestUrl, headers) { const info = {}; info.parsedUrl = requestUrl; @@ -1628,6 +1642,30 @@ class HttpClient { } return agent; } + _getProxyAgentDispatcher(parsedUrl, proxyUrl) { + let proxyAgent; + if (this._keepAlive) { + proxyAgent = this._proxyAgentDispatcher; + } + // if agent is already assigned use that agent. + if (proxyAgent) { + return proxyAgent; + } + const usingSsl = parsedUrl.protocol === 'https:'; + proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && { + token: `${proxyUrl.username}:${proxyUrl.password}` + }))); + this._proxyAgentDispatcher = proxyAgent; + if (usingSsl && this._ignoreSslError) { + // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process + // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options + // we have to cast it to any and change it directly + proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { + rejectUnauthorized: false + }); + } + return proxyAgent; + } _performExponentialBackoff(retryNumber) { return __awaiter(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); @@ -1707,7 +1745,7 @@ const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCa /***/ }), -/***/ 9835: +/***/ 19835: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -1796,15 +1834,15 @@ function isLoopbackAddress(host) { /***/ }), -/***/ 9295: +/***/ 79295: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.publishVSIX = exports.listFiles = exports.publish = exports.createVSIX = exports.PackageManager = void 0; -const publish_1 = __nccwpck_require__(9979); -const package_1 = __nccwpck_require__(5387); +const publish_1 = __nccwpck_require__(69979); +const package_1 = __nccwpck_require__(85387); /** * The supported list of package managers. * @public @@ -1860,7 +1898,7 @@ exports.publishVSIX = publishVSIX; /***/ }), -/***/ 4355: +/***/ 94355: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -1889,7 +1927,7 @@ exports.patchNLS = patchNLS; /***/ }), -/***/ 4534: +/***/ 25122: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -1922,11 +1960,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getLatestVersion = exports.getDependencies = exports.detectYarn = void 0; -const path = __importStar(__nccwpck_require__(1017)); -const fs = __importStar(__nccwpck_require__(7147)); -const cp = __importStar(__nccwpck_require__(2081)); -const parse_semver_1 = __importDefault(__nccwpck_require__(4336)); -const util_1 = __nccwpck_require__(3026); +const path = __importStar(__nccwpck_require__(71017)); +const fs = __importStar(__nccwpck_require__(57147)); +const cp = __importStar(__nccwpck_require__(32081)); +const find_yarn_workspace_root_1 = __importDefault(__nccwpck_require__(96748)); +const package_1 = __nccwpck_require__(85387); +const util_1 = __nccwpck_require__(43026); const exists = (file) => fs.promises.stat(file).then(_ => true, _ => false); function parseStdout({ stdout }) { return stdout.split(/[\r\n]/).filter(line => !!line)[0]; @@ -1962,29 +2001,49 @@ async function checkNPM(cancellationToken) { function getNpmDependencies(cwd) { return checkNPM() .then(() => exec('npm list --production --parseable --depth=99999 --loglevel=error', { cwd, maxBuffer: 5000 * 1024 })) - .then(({ stdout }) => stdout.split(/[\r\n]/).filter(dir => path.isAbsolute(dir))); + .then(({ stdout }) => stdout.split(/[\r\n]/).filter(dir => path.isAbsolute(dir)) + .map(dir => { + return { + src: dir, + dest: path.relative(cwd, dir) + }; + })); } -function asYarnDependency(prefix, tree, prune) { - if (prune && /@[\^~]/.test(tree.name)) { - return null; - } - let name; - try { - const parseResult = (0, parse_semver_1.default)(tree.name); - name = parseResult.name; - } - catch (err) { - name = tree.name.replace(/^([^@+])@.*$/, '$1'); - } - const dependencyPath = path.join(prefix, name); - const children = []; - for (const child of tree.children || []) { - const dep = asYarnDependency(path.join(prefix, name, 'node_modules'), child, prune); - if (dep) { - children.push(dep); +async function asYarnDependencies(root, rootDependencies) { + const resolve = async (prefix, dependencies, collected = new Map()) => await Promise.all(dependencies + .map(async (name) => { + let newPrefix = prefix, depPath = null, depManifest = null; + while (!depManifest && root.length <= newPrefix.length) { + depPath = path.join(newPrefix, 'node_modules', name); + try { + depManifest = await (0, package_1.readNodeManifest)(depPath); + } + catch (err) { + newPrefix = path.join(newPrefix, '..'); + if (newPrefix.length < root.length) { + throw err; + } + } } - } - return { name, path: dependencyPath, children }; + if (!depPath || !depManifest) { + throw new Error(`Error finding dependencies`); + } + const result = { + name, + path: { + src: depPath, + dest: path.relative(root, depPath), + }, + children: [], + }; + const shouldResolveChildren = !collected.has(depPath); + collected.set(depPath, result); + if (shouldResolveChildren) { + result.children = await resolve(depPath, Object.keys(depManifest.dependencies || {}), collected); + } + return result; + })); + return resolve(root, rootDependencies); } function selectYarnDependencies(deps, packagedDependencies) { const index = new (class { @@ -2030,35 +2089,38 @@ function selectYarnDependencies(deps, packagedDependencies) { packagedDependencies.forEach(visit); return reached.values; } -async function getYarnProductionDependencies(cwd, packagedDependencies) { - const raw = await new Promise((c, e) => cp.exec('yarn list --prod --json', { cwd, encoding: 'utf8', env: { ...process.env }, maxBuffer: 5000 * 1024 }, (err, stdout) => (err ? e(err) : c(stdout)))); - const match = /^{"type":"tree".*$/m.exec(raw); - if (!match || match.length !== 1) { - throw new Error('Could not parse result of `yarn list --json`'); - } +async function getYarnProductionDependencies(root, manifest, packagedDependencies) { const usingPackagedDependencies = Array.isArray(packagedDependencies); - const trees = JSON.parse(match[0]).data.trees; - let result = trees - .map(tree => asYarnDependency(path.join(cwd, 'node_modules'), tree, !usingPackagedDependencies)) - .filter(util_1.nonnull); + let result = await asYarnDependencies(root, Object.keys(manifest.dependencies || {})); if (usingPackagedDependencies) { result = selectYarnDependencies(result, packagedDependencies); } return result; } -async function getYarnDependencies(cwd, packagedDependencies) { - const result = new Set([cwd]); - const deps = await getYarnProductionDependencies(cwd, packagedDependencies); - const flatten = (dep) => { - result.add(dep.path); - dep.children.forEach(flatten); - }; - deps.forEach(flatten); - return [...result]; +async function getYarnDependencies(cwd, root, manifest, packagedDependencies) { + const result = [{ + src: cwd, + dest: '' + }]; + if (await exists(path.join(root, 'yarn.lock'))) { + const deps = await getYarnProductionDependencies(root, manifest, packagedDependencies); + const flatten = (dep) => { + result.push(dep.path); + dep.children.forEach(flatten); + }; + deps.forEach(flatten); + } + const dedup = new Map(); + for (const item of result) { + if (!dedup.has(item.src)) { + dedup.set(item.src, item); + } + } + return [...dedup.values()]; } -async function detectYarn(cwd) { +async function detectYarn(root) { for (const name of ['yarn.lock', '.yarnrc', '.yarnrc.yaml', '.pnp.cjs', '.yarn']) { - if (await exists(path.join(cwd, name))) { + if (await exists(path.join(root, name))) { if (!process.env['VSCE_TESTS']) { util_1.log.info(`Detected presence of ${name}. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).`); } @@ -2068,12 +2130,13 @@ async function detectYarn(cwd) { return false; } exports.detectYarn = detectYarn; -async function getDependencies(cwd, dependencies, packagedDependencies) { +async function getDependencies(cwd, manifest, dependencies, packagedDependencies) { + const root = (0, find_yarn_workspace_root_1.default)(cwd) || cwd; if (dependencies === 'none') { - return [cwd]; + return [{ src: root, dest: '' }]; } - else if (dependencies === 'yarn' || (dependencies === undefined && (await detectYarn(cwd)))) { - return await getYarnDependencies(cwd, packagedDependencies); + else if (dependencies === 'yarn' || (dependencies === undefined && (await detectYarn(root)))) { + return await getYarnDependencies(cwd, root, manifest, packagedDependencies); } else { return await getNpmDependencies(cwd); @@ -2090,7 +2153,7 @@ exports.getLatestVersion = getLatestVersion; /***/ }), -/***/ 5387: +/***/ 85387: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -2122,27 +2185,27 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ls = exports.listFiles = exports.packageCommand = exports.pack = exports.prepublish = exports.collect = exports.createDefaultProcessors = exports.processFiles = exports.toContentTypes = exports.toVsixManifest = exports.readManifest = exports.validateManifest = exports.ValidationProcessor = exports.NLSProcessor = exports.isWebKind = exports.LicenseProcessor = exports.ChangelogProcessor = exports.ReadmeProcessor = exports.MarkdownProcessor = exports.TagsProcessor = exports.ManifestProcessor = exports.Targets = exports.versionBump = exports.BaseProcessor = exports.read = void 0; -const fs = __importStar(__nccwpck_require__(7147)); -const path = __importStar(__nccwpck_require__(1017)); -const util_1 = __nccwpck_require__(3837); -const cp = __importStar(__nccwpck_require__(2081)); +exports.ls = exports.listFiles = exports.packageCommand = exports.pack = exports.prepublish = exports.collect = exports.createDefaultProcessors = exports.processFiles = exports.toContentTypes = exports.toVsixManifest = exports.readManifest = exports.readNodeManifest = exports.validateManifest = exports.ValidationProcessor = exports.NLSProcessor = exports.isWebKind = exports.LicenseProcessor = exports.ChangelogProcessor = exports.ReadmeProcessor = exports.MarkdownProcessor = exports.TagsProcessor = exports.ManifestProcessor = exports.Targets = exports.versionBump = exports.BaseProcessor = exports.read = void 0; +const fs = __importStar(__nccwpck_require__(57147)); +const path = __importStar(__nccwpck_require__(71017)); +const util_1 = __nccwpck_require__(73837); +const cp = __importStar(__nccwpck_require__(32081)); const yazl = __importStar(__nccwpck_require__(8483)); -const nls_1 = __nccwpck_require__(4355); -const util = __importStar(__nccwpck_require__(3026)); -const glob_1 = __importDefault(__nccwpck_require__(1957)); -const minimatch_1 = __importDefault(__nccwpck_require__(3973)); -const markdown_it_1 = __importDefault(__nccwpck_require__(8561)); -const cheerio = __importStar(__nccwpck_require__(4612)); -const url = __importStar(__nccwpck_require__(7310)); -const mime_1 = __importDefault(__nccwpck_require__(5018)); -const semver = __importStar(__nccwpck_require__(1383)); -const url_join_1 = __importDefault(__nccwpck_require__(2821)); -const validation_1 = __nccwpck_require__(4944); -const npm_1 = __nccwpck_require__(4534); -const GitHost = __importStar(__nccwpck_require__(8869)); -const parse_semver_1 = __importDefault(__nccwpck_require__(4336)); -const jsonc = __importStar(__nccwpck_require__(245)); +const nls_1 = __nccwpck_require__(94355); +const util = __importStar(__nccwpck_require__(43026)); +const glob_1 = __importDefault(__nccwpck_require__(91957)); +const minimatch_1 = __importDefault(__nccwpck_require__(83973)); +const markdown_it_1 = __importDefault(__nccwpck_require__(58561)); +const cheerio = __importStar(__nccwpck_require__(34612)); +const url = __importStar(__nccwpck_require__(57310)); +const mime_1 = __importDefault(__nccwpck_require__(65018)); +const semver = __importStar(__nccwpck_require__(11383)); +const url_join_1 = __importDefault(__nccwpck_require__(12821)); +const validation_1 = __nccwpck_require__(94944); +const npm_1 = __nccwpck_require__(25122); +const GitHost = __importStar(__nccwpck_require__(88869)); +const parse_semver_1 = __importDefault(__nccwpck_require__(44336)); +const jsonc = __importStar(__nccwpck_require__(80245)); const MinimatchOptions = { dot: true }; function isInMemoryFile(file) { return !!file.contents; @@ -2342,7 +2405,6 @@ async function versionBump(options) { exports.versionBump = versionBump; exports.Targets = new Set([ 'win32-x64', - 'win32-ia32', 'win32-arm64', 'linux-x64', 'linux-arm64', @@ -2461,13 +2523,13 @@ class ManifestProcessor extends BaseProcessor { throw new Error("It's not allowed to use the 'vscode-samples' publisher. Learn more at: https://code.visualstudio.com/api/working-with-extensions/publishing-extension."); } if (!this.options.allowMissingRepository && !this.manifest.repository) { - util.log.warn(`A 'repository' field is missing from the 'package.json' manifest file.`); + util.log.warn(`A 'repository' field is missing from the 'package.json' manifest file.\nUse --allow-missing-repository to bypass.`); if (!/^y$/i.test(await util.read('Do you want to continue? [y/N] '))) { throw new Error('Aborted'); } } if (!this.options.allowStarActivation && this.manifest.activationEvents?.some(e => e === '*')) { - util.log.warn(`Using '*' activation is usually a bad idea as it impacts performance.\nMore info: https://code.visualstudio.com/api/references/activation-events#Start-up`); + util.log.warn(`Using '*' activation is usually a bad idea as it impacts performance.\nMore info: https://code.visualstudio.com/api/references/activation-events#Start-up\nUse --allow-star-activation to bypass.`); if (!/^y$/i.test(await util.read('Do you want to continue? [y/N] '))) { throw new Error('Aborted'); } @@ -2570,11 +2632,11 @@ TagsProcessor.Keywords = { rust: ['rust'], }; class MarkdownProcessor extends BaseProcessor { - constructor(manifest, name, regexp, assetType, options = {}) { + constructor(manifest, name, filePath, assetType, options = {}) { super(manifest); this.name = name; - this.regexp = regexp; this.assetType = assetType; + this.regexp = new RegExp(`^extension/${filePath}$`, 'i'); const guess = this.guessBaseUrls(options.githubBranch || options.gitlabBranch); this.baseContentUrl = options.baseContentUrl || (guess && guess.content); this.baseImagesUrl = options.baseImagesUrl || options.baseContentUrl || (guess && guess.images); @@ -2618,8 +2680,8 @@ class MarkdownProcessor extends BaseProcessor { // Replace Markdown links with urls contents = contents.replace(markdownPathRegex, urlReplace); // Replace links with urls - contents = contents.replace(//g, (all, link) => { - const isLinkRelative = !/^\w+:\/\//.test(link) && link[0] !== '#'; + contents = contents.replace(/<(?:img|video)[^>]+src=["']([/.\w\s#-]+)['"][^>]*>/gm, (all, link) => { + const isLinkRelative = !/^\w+:\/\//.test(link) && link[0] !== '#' && !link.startsWith('data:'); if (!this.baseImagesUrl && isLinkRelative) { throw new Error(`Couldn't detect the repository where this extension is published. The image will be broken in ${this.name}. GitHub/GitLab repositories will be automatically detected. Otherwise, please provide the repository URL in package.json or use the --baseContentUrl and --baseImagesUrl options.`); } @@ -2668,7 +2730,13 @@ class MarkdownProcessor extends BaseProcessor { throw new Error(`Images in ${this.name} must have a source.`); } const src = decodeURI(rawSrc); - const srcUrl = new url.URL(src); + let srcUrl; + try { + srcUrl = new url.URL(src); + } + catch (err) { + throw new Error(`Invalid image source in ${this.name}: ${src}`); + } if (/^data:$/i.test(srcUrl.protocol) && /^image$/i.test(srcUrl.host) && /\/svg/i.test(srcUrl.pathname)) { throw new Error(`SVG data URLs are not allowed in ${this.name}: ${src}`); } @@ -2728,13 +2796,13 @@ class MarkdownProcessor extends BaseProcessor { exports.MarkdownProcessor = MarkdownProcessor; class ReadmeProcessor extends MarkdownProcessor { constructor(manifest, options = {}) { - super(manifest, 'README.md', /^extension\/readme.md$/i, 'Microsoft.VisualStudio.Services.Content.Details', options); + super(manifest, 'README.md', options.readmePath ?? 'readme.md', 'Microsoft.VisualStudio.Services.Content.Details', options); } } exports.ReadmeProcessor = ReadmeProcessor; class ChangelogProcessor extends MarkdownProcessor { constructor(manifest, options = {}) { - super(manifest, 'CHANGELOG.md', /^extension\/changelog.md$/i, 'Microsoft.VisualStudio.Services.Content.Changelog', options); + super(manifest, 'CHANGELOG.md', options.changelogPath ?? 'changelog.md', 'Microsoft.VisualStudio.Services.Content.Changelog', options); } } exports.ChangelogProcessor = ChangelogProcessor; @@ -3015,7 +3083,13 @@ function validateManifest(manifest) { } (manifest.badges ?? []).forEach(badge => { const decodedUrl = decodeURI(badge.url); - const srcUrl = new url.URL(decodedUrl); + let srcUrl; + try { + srcUrl = new url.URL(decodedUrl); + } + catch (err) { + throw new Error(`Badge URL is invalid: ${badge.url}`); + } if (!/^https:$/i.test(srcUrl.protocol)) { throw new Error(`Badge URLs must come from an HTTPS source: ${badge.url}`); } @@ -3056,9 +3130,8 @@ function validateManifest(manifest) { return manifest; } exports.validateManifest = validateManifest; -function readManifest(cwd = process.cwd(), nls = true) { +function readNodeManifest(cwd = process.cwd()) { const manifestPath = path.join(cwd, 'package.json'); - const manifestNLSPath = path.join(cwd, 'package.nls.json'); const manifest = fs.promises .readFile(manifestPath, 'utf8') .catch(() => Promise.reject(`Extension manifest not found: ${manifestPath}`)) @@ -3070,11 +3143,17 @@ function readManifest(cwd = process.cwd(), nls = true) { console.error(`Error parsing 'package.json' manifest file: not a valid JSON file.`); throw e; } - }) + }); + return manifest; +} +exports.readNodeManifest = readNodeManifest; +function readManifest(cwd = process.cwd(), nls = true) { + const manifest = readNodeManifest(cwd) .then(validateManifest); if (!nls) { return manifest; } + const manifestNLSPath = path.join(cwd, 'package.nls.json'); const manifestNLS = fs.promises .readFile(manifestNLSPath, 'utf8') .catch(err => (err.code !== 'ENOENT' ? Promise.reject(err) : Promise.resolve('{}'))) @@ -3227,14 +3306,38 @@ const defaultIgnore = [ '**/.vscode-test-web/**', ]; const notIgnored = ['!package.json', '!README.md']; -async function collectAllFiles(cwd, dependencies, dependencyEntryPoints) { - const deps = await (0, npm_1.getDependencies)(cwd, dependencies, dependencyEntryPoints); - const promises = deps.map(dep => (0, util_1.promisify)(glob_1.default)('**', { cwd: dep, nodir: true, dot: true, ignore: 'node_modules/**' }).then(files => files.map(f => path.relative(cwd, path.join(dep, f))).map(f => f.replace(/\\/g, '/')))); +async function collectAllFiles(cwd, manifest, dependencies, dependencyEntryPoints) { + const deps = await (0, npm_1.getDependencies)(cwd, manifest, dependencies, dependencyEntryPoints); + const promises = deps.map(dep => (0, util_1.promisify)(glob_1.default)('**', { cwd: dep.src, nodir: true, dot: true, ignore: 'node_modules/**' }).then(files => files.map(f => ({ + src: path.relative(cwd, path.join(dep.src, f)).replace(/\\/g, '/'), + dest: path.join(dep.dest, f).replace(/\\/g, '/') + })))); return Promise.all(promises).then(util.flatten); } -function collectFiles(cwd, dependencies, dependencyEntryPoints, ignoreFile) { - return collectAllFiles(cwd, dependencies, dependencyEntryPoints).then(files => { - files = files.filter(f => !/\r$/m.test(f)); +function getDependenciesOption(options) { + if (options.dependencies === false) { + return 'none'; + } + switch (options.useYarn) { + case true: + return 'yarn'; + case false: + return 'npm'; + default: + return undefined; + } +} +function collectFiles(cwd, manifest, options) { + const packagedDependencies = options.dependencyEntryPoints || undefined; + const ignoreFile = options.ignoreFile || undefined; + const target = options.target || undefined; + return collectAllFiles(cwd, manifest, getDependenciesOption(options), packagedDependencies).then(files => { + files = files.filter(f => !/\r$/m.test(f.src)); + // Filter data from other platforms + if (target && options.ignoreOtherTargetFolders) { + const regex = new RegExp(`(^|/)(${Array.from(exports.Targets, v => v).filter(v => v !== target).join('|')})/`); + files = files.filter(f => !regex.test(f.src)); + } return (fs.promises .readFile(ignoreFile ? ignoreFile : path.join(cwd, '.vscodeignore'), 'utf8') .catch(err => err.code !== 'ENOENT' ? Promise.reject(err) : ignoreFile ? Promise.reject(err) : Promise.resolve('')) @@ -3255,8 +3358,8 @@ function collectFiles(cwd, dependencies, dependencyEntryPoints, ignoreFile) { .then(ignore => ignore.reduce((r, e) => (!/^\s*!/.test(e) ? [[...r[0], e], r[1]] : [r[0], [...r[1], e]]), [[], []])) .then(r => ({ ignore: r[0], negate: r[1] })) // Filter out files - .then(({ ignore, negate }) => files.filter(f => !ignore.some(i => (0, minimatch_1.default)(f, i, MinimatchOptions)) || - negate.some(i => (0, minimatch_1.default)(f, i.substr(1), MinimatchOptions))))); + .then(({ ignore, negate }) => files.filter(f => !ignore.some(i => (0, minimatch_1.default)(f.src, i, MinimatchOptions)) || + negate.some(i => (0, minimatch_1.default)(f.src, i.substr(1), MinimatchOptions))))); }); } function processFiles(processors, files) { @@ -3300,26 +3403,11 @@ function createDefaultProcessors(manifest, options = {}) { ]; } exports.createDefaultProcessors = createDefaultProcessors; -function getDependenciesOption(options) { - if (options.dependencies === false) { - return 'none'; - } - switch (options.useYarn) { - case true: - return 'yarn'; - case false: - return 'npm'; - default: - return undefined; - } -} function collect(manifest, options = {}) { const cwd = options.cwd || process.cwd(); - const packagedDependencies = options.dependencyEntryPoints || undefined; - const ignoreFile = options.ignoreFile || undefined; const processors = createDefaultProcessors(manifest, options); - return collectFiles(cwd, getDependenciesOption(options), packagedDependencies, ignoreFile).then(fileNames => { - const files = fileNames.map(f => ({ path: `extension/${f}`, localPath: path.join(cwd, f) })); + return collectFiles(cwd, manifest, options).then(fileNames => { + const files = fileNames.map(f => ({ path: `extension/${f.dest}`, localPath: path.join(cwd, f.src) })); return processFiles(processors, files); }); } @@ -3394,7 +3482,7 @@ async function pack(options = {}) { if (files.length > 5000 || jsFiles.length > 100) { console.log(`This extension consists of ${files.length} files, out of which ${jsFiles.length} are JavaScript files. For performance reasons, you should bundle your extension: https://aka.ms/vscode-bundle-extension . You should also exclude unnecessary files by adding them to your .vscodeignore: https://aka.ms/vscode-vscodeignore`); } - if (options.version) { + if (options.version && !(options.updatePackageJson ?? true)) { manifest.version = options.version; } const packagePath = await getPackagePath(cwd, manifest, options); @@ -3432,7 +3520,8 @@ async function listFiles(options = {}) { if (options.prepublish) { await prepublish(cwd, manifest, options.useYarn); } - return await collectFiles(cwd, getDependenciesOption(options), options.packagedDependencies, options.ignoreFile); + const files = await collectFiles(cwd, manifest, options); + return files.map(f => f.src); } exports.listFiles = listFiles; /** @@ -3449,16 +3538,16 @@ exports.ls = ls; /***/ }), -/***/ 1661: +/***/ 11661: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.PublicGalleryAPI = void 0; -const HttpClient_1 = __nccwpck_require__(5538); -const GalleryInterfaces_1 = __nccwpck_require__(8905); -const Serialization_1 = __nccwpck_require__(5817); +const HttpClient_1 = __nccwpck_require__(15538); +const GalleryInterfaces_1 = __nccwpck_require__(48905); +const Serialization_1 = __nccwpck_require__(15817); class PublicGalleryAPI { constructor(baseUrl, apiVersion = '3.0-preview.1') { this.baseUrl = baseUrl; @@ -3495,7 +3584,7 @@ exports.PublicGalleryAPI = PublicGalleryAPI; /***/ }), -/***/ 9979: +/***/ 69979: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -3525,16 +3614,16 @@ var __importStar = (this && this.__importStar) || function (mod) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.unpublish = exports.publish = void 0; -const fs = __importStar(__nccwpck_require__(7147)); -const util_1 = __nccwpck_require__(3837); -const semver = __importStar(__nccwpck_require__(1383)); -const GalleryInterfaces_1 = __nccwpck_require__(8905); -const package_1 = __nccwpck_require__(5387); +const fs = __importStar(__nccwpck_require__(57147)); +const util_1 = __nccwpck_require__(73837); +const semver = __importStar(__nccwpck_require__(11383)); +const GalleryInterfaces_1 = __nccwpck_require__(48905); +const package_1 = __nccwpck_require__(85387); const tmp = __importStar(__nccwpck_require__(8517)); -const store_1 = __nccwpck_require__(4198); -const util_2 = __nccwpck_require__(3026); -const zip_1 = __nccwpck_require__(1377); -const validation_1 = __nccwpck_require__(4944); +const store_1 = __nccwpck_require__(24198); +const util_2 = __nccwpck_require__(43026); +const zip_1 = __nccwpck_require__(91377); +const validation_1 = __nccwpck_require__(94944); const tmpName = (0, util_1.promisify)(tmp.tmpName); async function publish(options = {}) { if (options.packagePath) { @@ -3591,11 +3680,11 @@ async function publish(options = {}) { exports.publish = publish; async function _publish(packagePath, manifest, options) { (0, validation_1.validatePublisher)(manifest.publisher); - if (!options.noVerify && manifest.enableProposedApi) { - throw new Error("Extensions using proposed API (enableProposedApi: true) can't be published to the Marketplace"); + if (manifest.enableProposedApi && !options.allowAllProposedApis && !options.noVerify) { + throw new Error("Extensions using proposed API (enableProposedApi: true) can't be published to the Marketplace. Use --allow-all-proposed-apis to bypass."); } - if (!options.noVerify && manifest.enabledApiProposals) { - throw new Error("Extensions using proposed API (enabledApiProposals: [...]) can't be published to the Marketplace"); + if (manifest.enabledApiProposals && !options.allowAllProposedApis && !options.noVerify && manifest.enabledApiProposals?.some(p => !options.allowProposedApis?.includes(p))) { + throw new Error(`Extensions using unallowed proposed API (enabledApiProposals: [${manifest.enabledApiProposals}], allowed: [${options.allowProposedApis ?? []}]) can't be published to the Marketplace. Use --allow-proposed-apis or --allow-all-proposed-apis to bypass.`); } if (semver.prerelease(manifest.version)) { throw new Error(`The VS Marketplace doesn't support prerelease versions: '${manifest.version}'`); @@ -3693,7 +3782,7 @@ exports.unpublish = unpublish; /***/ }), -/***/ 4198: +/***/ 24198: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -3723,12 +3812,12 @@ var __importStar = (this && this.__importStar) || function (mod) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.listPublishers = exports.deletePublisher = exports.logoutPublisher = exports.loginPublisher = exports.getPublisher = exports.verifyPat = exports.KeytarStore = exports.FileStore = void 0; -const fs = __importStar(__nccwpck_require__(7147)); -const path = __importStar(__nccwpck_require__(1017)); -const os_1 = __nccwpck_require__(2037); -const util_1 = __nccwpck_require__(3026); -const validation_1 = __nccwpck_require__(4944); -const package_1 = __nccwpck_require__(5387); +const fs = __importStar(__nccwpck_require__(57147)); +const path = __importStar(__nccwpck_require__(71017)); +const os_1 = __nccwpck_require__(22037); +const util_1 = __nccwpck_require__(43026); +const validation_1 = __nccwpck_require__(94944); +const package_1 = __nccwpck_require__(85387); class FileStore { constructor(path, publishers) { this.path = path; @@ -3787,7 +3876,7 @@ class KeytarStore { this.publishers = publishers; } static async open(serviceName = 'vscode-vsce') { - const keytar = await Promise.resolve().then(() => __importStar(__nccwpck_require__(3229))); + const keytar = await Promise.resolve().then(() => __importStar(__nccwpck_require__(43229))); const creds = await keytar.findCredentials(serviceName); return new KeytarStore(keytar, serviceName, creds.map(({ account, password }) => ({ name: account, pat: password }))); } @@ -3929,7 +4018,7 @@ exports.listPublishers = listPublishers; /***/ }), -/***/ 3026: +/***/ 43026: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -3939,13 +4028,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.patchOptionsWithManifest = exports.log = exports.sequence = exports.CancellationToken = exports.isCancelledError = exports.nonnull = exports.flatten = exports.chain = exports.normalize = exports.getPublicGalleryAPI = exports.getSecurityRolesAPI = exports.getGalleryAPI = exports.getHubUrl = exports.getPublishedUrl = exports.read = void 0; -const util_1 = __nccwpck_require__(3837); -const read_1 = __importDefault(__nccwpck_require__(1822)); -const WebApi_1 = __nccwpck_require__(7967); -const GalleryApi_1 = __nccwpck_require__(1939); -const chalk_1 = __importDefault(__nccwpck_require__(8707)); -const publicgalleryapi_1 = __nccwpck_require__(1661); -const os_1 = __nccwpck_require__(2037); +const util_1 = __nccwpck_require__(73837); +const read_1 = __importDefault(__nccwpck_require__(31822)); +const WebApi_1 = __nccwpck_require__(67967); +const GalleryApi_1 = __nccwpck_require__(81939); +const chalk_1 = __importDefault(__nccwpck_require__(38707)); +const publicgalleryapi_1 = __nccwpck_require__(11661); +const os_1 = __nccwpck_require__(22037); const __read = (0, util_1.promisify)(read_1.default); function read(prompt, options = {}) { if (process.env['VSCE_TESTS'] || !process.stdout.isTTY) { @@ -4101,7 +4190,7 @@ exports.patchOptionsWithManifest = patchOptionsWithManifest; /***/ }), -/***/ 4944: +/***/ 94944: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -4134,8 +4223,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.validateVSCodeTypesCompatibility = exports.validateEngineCompatibility = exports.validateVersion = exports.validateExtensionName = exports.validatePublisher = void 0; -const semver = __importStar(__nccwpck_require__(1383)); -const parse_semver_1 = __importDefault(__nccwpck_require__(4336)); +const semver = __importStar(__nccwpck_require__(11383)); +const parse_semver_1 = __importDefault(__nccwpck_require__(44336)); const nameRegex = /^[a-z0-9][a-z0-9\-]*$/i; function validatePublisher(publisher) { if (!publisher) { @@ -4219,7 +4308,7 @@ function validateVSCodeTypesCompatibility(engineVersion, typeVersion) { return 0; } }); - const error = new Error(`@types/vscode ${typeVersion} greater than engines.vscode ${engineVersion}. Consider upgrade engines.vscode or use an older @types/vscode version`); + const error = new Error(`@types/vscode ${typeVersion} greater than engines.vscode ${engineVersion}. Either upgrade engines.vscode or use an older @types/vscode version`); if (typeMajor > engineMajor) { throw error; } @@ -4232,15 +4321,15 @@ exports.validateVSCodeTypesCompatibility = validateVSCodeTypesCompatibility; /***/ }), -/***/ 8410: +/***/ 68410: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.parseContentTypes = exports.parseXmlManifest = void 0; -const util_1 = __nccwpck_require__(3837); -const xml2js_1 = __nccwpck_require__(6189); +const util_1 = __nccwpck_require__(73837); +const xml2js_1 = __nccwpck_require__(66189); function createXMLParser() { return (0, util_1.promisify)(xml2js_1.parseString); } @@ -4250,15 +4339,15 @@ exports.parseContentTypes = createXMLParser(); /***/ }), -/***/ 1377: +/***/ 91377: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.readVSIXPackage = exports.readZip = void 0; -const yauzl_1 = __nccwpck_require__(8781); -const xml_1 = __nccwpck_require__(8410); +const yauzl_1 = __nccwpck_require__(78781); +const xml_1 = __nccwpck_require__(68410); async function bufferStream(stream) { return await new Promise((c, e) => { const buffers = []; @@ -4314,13 +4403,13 @@ exports.readVSIXPackage = readVSIXPackage; /***/ }), -/***/ 2068: +/***/ 52068: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; /* module decorator */ module = __nccwpck_require__.nmd(module); -const colorConvert = __nccwpck_require__(6931); +const colorConvert = __nccwpck_require__(86931); const wrapAnsi16 = (fn, offset) => function () { const code = fn.apply(colorConvert, arguments); @@ -4488,7 +4577,7 @@ Object.defineProperty(module, 'exports', { /***/ }), -/***/ 9893: +/***/ 29893: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -4511,8 +4600,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const BuildInterfaces = __nccwpck_require__(2167); +const basem = __nccwpck_require__(80273); +const BuildInterfaces = __nccwpck_require__(42167); class BuildApi extends basem.ClientApiBase { constructor(baseUrl, handlers, options) { super(baseUrl, handlers, 'node-Build-api', options); @@ -7622,7 +7711,7 @@ exports.BuildApi = BuildApi; /***/ }), -/***/ 273: +/***/ 80273: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -7630,10 +7719,10 @@ exports.BuildApi = BuildApi; // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. Object.defineProperty(exports, "__esModule", ({ value: true })); -const vsom = __nccwpck_require__(9686); -const serm = __nccwpck_require__(5817); -const rm = __nccwpck_require__(7405); -const hm = __nccwpck_require__(5538); +const vsom = __nccwpck_require__(29686); +const serm = __nccwpck_require__(15817); +const rm = __nccwpck_require__(87405); +const hm = __nccwpck_require__(15538); class ClientApiBase { constructor(baseUrl, handlers, userAgent, options) { this.baseUrl = baseUrl; @@ -7664,7 +7753,7 @@ exports.ClientApiBase = ClientApiBase; /***/ }), -/***/ 4020: +/***/ 54020: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -7687,9 +7776,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const CoreInterfaces = __nccwpck_require__(3931); -const OperationsInterfaces = __nccwpck_require__(3052); +const basem = __nccwpck_require__(80273); +const CoreInterfaces = __nccwpck_require__(73931); +const OperationsInterfaces = __nccwpck_require__(63052); class CoreApi extends basem.ClientApiBase { constructor(baseUrl, handlers, options) { super(baseUrl, handlers, 'node-Core-api', options); @@ -8595,7 +8684,7 @@ exports.CoreApi = CoreApi; /***/ }), -/***/ 7539: +/***/ 17539: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -8618,8 +8707,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const DashboardInterfaces = __nccwpck_require__(6890); +const basem = __nccwpck_require__(80273); +const DashboardInterfaces = __nccwpck_require__(86890); class DashboardApi extends basem.ClientApiBase { constructor(baseUrl, handlers, options) { super(baseUrl, handlers, 'node-Dashboard-api', options); @@ -9085,7 +9174,7 @@ exports.DashboardApi = DashboardApi; /***/ }), -/***/ 4605: +/***/ 94605: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -9108,9 +9197,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const ExtensionManagementInterfaces = __nccwpck_require__(7357); -const GalleryInterfaces = __nccwpck_require__(8905); +const basem = __nccwpck_require__(80273); +const ExtensionManagementInterfaces = __nccwpck_require__(67357); +const GalleryInterfaces = __nccwpck_require__(48905); class ExtensionManagementApi extends basem.ClientApiBase { constructor(baseUrl, handlers, options) { super(baseUrl, handlers, 'node-ExtensionManagement-api', options); @@ -9863,7 +9952,7 @@ exports.ExtensionManagementApi = ExtensionManagementApi; /***/ }), -/***/ 3193: +/***/ 33193: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -9886,8 +9975,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const FeatureManagementInterfaces = __nccwpck_require__(7278); +const basem = __nccwpck_require__(80273); +const FeatureManagementInterfaces = __nccwpck_require__(17278); class FeatureManagementApi extends basem.ClientApiBase { constructor(baseUrl, handlers, options) { super(baseUrl, handlers, 'node-FeatureManagement-api', options); @@ -10167,7 +10256,7 @@ exports.FeatureManagementApi = FeatureManagementApi; /***/ }), -/***/ 7558: +/***/ 87558: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -10191,9 +10280,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); // Licensed under the MIT license. See LICENSE file in the project root for full license information. -const stream = __nccwpck_require__(2781); -const zlib = __nccwpck_require__(9796); -const httpm = __nccwpck_require__(5538); +const stream = __nccwpck_require__(12781); +const zlib = __nccwpck_require__(59796); +const httpm = __nccwpck_require__(15538); const FileContainerApiBase = __nccwpck_require__(5145); const FileContainerInterfaces = __nccwpck_require__(6110); class FileContainerApi extends FileContainerApiBase.FileContainerApiBase { @@ -10433,7 +10522,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); +const basem = __nccwpck_require__(80273); const FileContainerInterfaces = __nccwpck_require__(6110); class FileContainerApiBase extends basem.ClientApiBase { constructor(baseUrl, handlers, options) { @@ -10586,7 +10675,7 @@ exports.FileContainerApiBase = FileContainerApiBase; /***/ }), -/***/ 1939: +/***/ 81939: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -10609,8 +10698,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const compatBase = __nccwpck_require__(946); -const GalleryInterfaces = __nccwpck_require__(8905); +const compatBase = __nccwpck_require__(30946); +const GalleryInterfaces = __nccwpck_require__(48905); class GalleryApi extends compatBase.GalleryCompatHttpClientBase { constructor(baseUrl, handlers, options) { super(baseUrl, handlers, 'node-Gallery-api', options); @@ -13085,7 +13174,7 @@ exports.GalleryApi = GalleryApi; /***/ }), -/***/ 946: +/***/ 30946: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -13108,8 +13197,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const GalleryInterfaces = __nccwpck_require__(8905); +const basem = __nccwpck_require__(80273); +const GalleryInterfaces = __nccwpck_require__(48905); class GalleryCompatHttpClientBase extends basem.ClientApiBase { constructor(baseUrl, handlers, userAgent, options) { super(baseUrl, handlers, userAgent, options); @@ -13211,7 +13300,7 @@ exports.GalleryCompatHttpClientBase = GalleryCompatHttpClientBase; /***/ }), -/***/ 4996: +/***/ 64996: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -13234,8 +13323,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const GitInterfaces = __nccwpck_require__(9803); +const basem = __nccwpck_require__(80273); +const GitInterfaces = __nccwpck_require__(89803); class GitApi extends basem.ClientApiBase { constructor(baseUrl, handlers, options) { super(baseUrl, handlers, 'node-Git-api', options); @@ -17713,7 +17802,7 @@ exports.GitApi = GitApi; /***/ }), -/***/ 4771: +/***/ 44771: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -17736,8 +17825,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const LocationsInterfaces = __nccwpck_require__(3215); +const basem = __nccwpck_require__(80273); +const LocationsInterfaces = __nccwpck_require__(13215); class LocationsApi extends basem.ClientApiBase { constructor(baseUrl, handlers, options) { super(baseUrl, handlers, 'node-Locations-api', options); @@ -18001,7 +18090,7 @@ exports.LocationsApi = LocationsApi; /***/ }), -/***/ 8221: +/***/ 18221: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -18024,9 +18113,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const NotificationInterfaces = __nccwpck_require__(3044); -const VSSInterfaces = __nccwpck_require__(4498); +const basem = __nccwpck_require__(80273); +const NotificationInterfaces = __nccwpck_require__(13044); +const VSSInterfaces = __nccwpck_require__(94498); class NotificationApi extends basem.ClientApiBase { constructor(baseUrl, handlers, options) { super(baseUrl, handlers, 'node-Notification-api', options); @@ -18655,7 +18744,7 @@ exports.NotificationApi = NotificationApi; /***/ }), -/***/ 266: +/***/ 40266: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -18678,8 +18767,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const PolicyInterfaces = __nccwpck_require__(8555); +const basem = __nccwpck_require__(80273); +const PolicyInterfaces = __nccwpck_require__(88555); class PolicyApi extends basem.ClientApiBase { constructor(baseUrl, handlers, options) { super(baseUrl, handlers, 'node-Policy-api', options); @@ -19050,7 +19139,7 @@ exports.PolicyApi = PolicyApi; /***/ }), -/***/ 8101: +/***/ 98101: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -19073,8 +19162,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const ProfileInterfaces = __nccwpck_require__(879); +const basem = __nccwpck_require__(80273); +const ProfileInterfaces = __nccwpck_require__(40879); class ProfileApi extends basem.ClientApiBase { constructor(baseUrl, handlers, options) { super(baseUrl, handlers, 'node-Profile-api', options); @@ -19552,7 +19641,7 @@ exports.ProfileApi = ProfileApi; /***/ }), -/***/ 1682: +/***/ 21682: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -19575,8 +19664,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const ProjectAnalysisInterfaces = __nccwpck_require__(4323); +const basem = __nccwpck_require__(80273); +const ProjectAnalysisInterfaces = __nccwpck_require__(84323); class ProjectAnalysisApi extends basem.ClientApiBase { constructor(baseUrl, handlers, options) { super(baseUrl, handlers, 'node-ProjectAnalysis-api', options); @@ -19734,7 +19823,7 @@ exports.ProjectAnalysisApi = ProjectAnalysisApi; /***/ }), -/***/ 3075: +/***/ 63075: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -19757,8 +19846,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const ReleaseInterfaces = __nccwpck_require__(7421); +const basem = __nccwpck_require__(80273); +const ReleaseInterfaces = __nccwpck_require__(47421); class ReleaseApi extends basem.ClientApiBase { constructor(baseUrl, handlers, options) { super(baseUrl, handlers, 'node-Release-api', options); @@ -22538,7 +22627,7 @@ exports.ReleaseApi = ReleaseApi; /***/ }), -/***/ 806: +/***/ 10806: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -22561,7 +22650,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); +const basem = __nccwpck_require__(80273); const SecurityRolesInterfaces = __nccwpck_require__(6573); class SecurityRolesApi extends basem.ClientApiBase { constructor(baseUrl, handlers, options) { @@ -22734,7 +22823,7 @@ exports.SecurityRolesApi = SecurityRolesApi; /***/ }), -/***/ 5817: +/***/ 15817: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -23013,7 +23102,7 @@ var ContractSerializer; /***/ }), -/***/ 5899: +/***/ 55899: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -23027,8 +23116,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const taskagentbasem = __nccwpck_require__(3390); -const url = __nccwpck_require__(7310); +const taskagentbasem = __nccwpck_require__(63390); +const url = __nccwpck_require__(57310); class TaskAgentApi extends taskagentbasem.TaskAgentApiBase { constructor(baseUrl, handlers, options) { super(baseUrl, handlers, options); @@ -23222,7 +23311,7 @@ exports.TaskAgentApi = TaskAgentApi; /***/ }), -/***/ 3390: +/***/ 63390: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -23245,8 +23334,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const TaskAgentInterfaces = __nccwpck_require__(9565); +const basem = __nccwpck_require__(80273); +const TaskAgentInterfaces = __nccwpck_require__(69565); class TaskAgentApiBase extends basem.ClientApiBase { constructor(baseUrl, handlers, options) { super(baseUrl, handlers, 'node-TaskAgent-api', options); @@ -27876,7 +27965,7 @@ exports.TaskAgentApiBase = TaskAgentApiBase; /***/ }), -/***/ 2354: +/***/ 72354: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -27899,8 +27988,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const TaskAgentInterfaces = __nccwpck_require__(9565); +const basem = __nccwpck_require__(80273); +const TaskAgentInterfaces = __nccwpck_require__(69565); class TaskApi extends basem.ClientApiBase { constructor(baseUrl, handlers, options) { super(baseUrl, handlers, 'node-Task-api', options); @@ -28710,7 +28799,7 @@ exports.TaskApi = TaskApi; /***/ }), -/***/ 5742: +/***/ 45742: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -28733,8 +28822,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const TestInterfaces = __nccwpck_require__(3047); +const basem = __nccwpck_require__(80273); +const TestInterfaces = __nccwpck_require__(93047); class TestApi extends basem.ClientApiBase { constructor(baseUrl, handlers, options) { super(baseUrl, handlers, 'node-Test-api', options); @@ -31239,7 +31328,7 @@ exports.TestApi = TestApi; /***/ }), -/***/ 5417: +/***/ 75417: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -31262,8 +31351,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const TfvcInterfaces = __nccwpck_require__(9003); +const basem = __nccwpck_require__(80273); +const TfvcInterfaces = __nccwpck_require__(99003); class TfvcApi extends basem.ClientApiBase { constructor(baseUrl, handlers, options) { super(baseUrl, handlers, 'node-Tfvc-api', options); @@ -32103,7 +32192,7 @@ exports.TfvcApi = TfvcApi; /***/ }), -/***/ 9686: +/***/ 29686: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -32113,8 +32202,8 @@ exports.TfvcApi = TfvcApi; //******************************************************************************************************* Object.defineProperty(exports, "__esModule", ({ value: true })); /// Imports of 3rd Party /// -const url = __nccwpck_require__(7310); -const path = __nccwpck_require__(1017); +const url = __nccwpck_require__(57310); +const path = __nccwpck_require__(71017); class InvalidApiResourceVersionError { constructor(message) { this.name = "Invalid resource version"; @@ -32364,7 +32453,7 @@ exports.VsoClient = VsoClient; /***/ }), -/***/ 7967: +/***/ 67967: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -32380,41 +32469,41 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const buildm = __nccwpck_require__(9893); -const corem = __nccwpck_require__(4020); -const dashboardm = __nccwpck_require__(7539); -const extmgmtm = __nccwpck_require__(4605); -const featuremgmtm = __nccwpck_require__(3193); -const filecontainerm = __nccwpck_require__(7558); -const gallerym = __nccwpck_require__(1939); -const gitm = __nccwpck_require__(4996); -const locationsm = __nccwpck_require__(4771); -const notificationm = __nccwpck_require__(8221); -const policym = __nccwpck_require__(266); -const profilem = __nccwpck_require__(8101); -const projectm = __nccwpck_require__(1682); -const releasem = __nccwpck_require__(3075); -const securityrolesm = __nccwpck_require__(806); -const taskagentm = __nccwpck_require__(5899); -const taskm = __nccwpck_require__(2354); -const testm = __nccwpck_require__(5742); -const tfvcm = __nccwpck_require__(5417); -const wikim = __nccwpck_require__(6391); -const workm = __nccwpck_require__(8186); -const workitemtrackingm = __nccwpck_require__(8409); -const workitemtrackingprocessm = __nccwpck_require__(1178); -const workitemtrackingprocessdefinitionm = __nccwpck_require__(3333); -const basicm = __nccwpck_require__(6456); -const bearm = __nccwpck_require__(1141); -const ntlmm = __nccwpck_require__(3450); -const patm = __nccwpck_require__(4551); -const rm = __nccwpck_require__(7405); -const vsom = __nccwpck_require__(9686); +const buildm = __nccwpck_require__(29893); +const corem = __nccwpck_require__(54020); +const dashboardm = __nccwpck_require__(17539); +const extmgmtm = __nccwpck_require__(94605); +const featuremgmtm = __nccwpck_require__(33193); +const filecontainerm = __nccwpck_require__(87558); +const gallerym = __nccwpck_require__(81939); +const gitm = __nccwpck_require__(64996); +const locationsm = __nccwpck_require__(44771); +const notificationm = __nccwpck_require__(18221); +const policym = __nccwpck_require__(40266); +const profilem = __nccwpck_require__(98101); +const projectm = __nccwpck_require__(21682); +const releasem = __nccwpck_require__(63075); +const securityrolesm = __nccwpck_require__(10806); +const taskagentm = __nccwpck_require__(55899); +const taskm = __nccwpck_require__(72354); +const testm = __nccwpck_require__(45742); +const tfvcm = __nccwpck_require__(75417); +const wikim = __nccwpck_require__(36391); +const workm = __nccwpck_require__(28186); +const workitemtrackingm = __nccwpck_require__(88409); +const workitemtrackingprocessm = __nccwpck_require__(21178); +const workitemtrackingprocessdefinitionm = __nccwpck_require__(53333); +const basicm = __nccwpck_require__(26456); +const bearm = __nccwpck_require__(91141); +const ntlmm = __nccwpck_require__(33450); +const patm = __nccwpck_require__(266); +const rm = __nccwpck_require__(87405); +const vsom = __nccwpck_require__(29686); const crypto = __nccwpck_require__(6113); -const fs = __nccwpck_require__(7147); -const os = __nccwpck_require__(2037); -const url = __nccwpck_require__(7310); -const path = __nccwpck_require__(1017); +const fs = __nccwpck_require__(57147); +const os = __nccwpck_require__(22037); +const url = __nccwpck_require__(57310); +const path = __nccwpck_require__(71017); const isBrowser = typeof window !== 'undefined'; /** * Methods to return handler objects (see handlers folder) @@ -32809,7 +32898,7 @@ exports.WebApi = WebApi; /***/ }), -/***/ 6391: +/***/ 36391: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -32832,9 +32921,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const Comments_Contracts = __nccwpck_require__(4743); -const WikiInterfaces = __nccwpck_require__(5787); +const basem = __nccwpck_require__(80273); +const Comments_Contracts = __nccwpck_require__(74743); +const WikiInterfaces = __nccwpck_require__(75787); class WikiApi extends basem.ClientApiBase { constructor(baseUrl, handlers, options) { super(baseUrl, handlers, 'node-Wiki-api', options); @@ -33583,7 +33672,7 @@ exports.WikiApi = WikiApi; /***/ }), -/***/ 8186: +/***/ 28186: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -33606,7 +33695,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); +const basem = __nccwpck_require__(80273); const WorkInterfaces = __nccwpck_require__(7480); class WorkApi extends basem.ClientApiBase { constructor(baseUrl, handlers, options) { @@ -35528,7 +35617,7 @@ exports.WorkApi = WorkApi; /***/ }), -/***/ 8409: +/***/ 88409: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -35551,8 +35640,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const WorkItemTrackingInterfaces = __nccwpck_require__(6938); +const basem = __nccwpck_require__(80273); +const WorkItemTrackingInterfaces = __nccwpck_require__(26938); class WorkItemTrackingApi extends basem.ClientApiBase { constructor(baseUrl, handlers, options) { super(baseUrl, handlers, 'node-WorkItemTracking-api', options); @@ -38384,7 +38473,7 @@ exports.WorkItemTrackingApi = WorkItemTrackingApi; /***/ }), -/***/ 1178: +/***/ 21178: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -38407,8 +38496,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const WorkItemTrackingProcessInterfaces = __nccwpck_require__(4524); +const basem = __nccwpck_require__(80273); +const WorkItemTrackingProcessInterfaces = __nccwpck_require__(44524); class WorkItemTrackingProcessApi extends basem.ClientApiBase { constructor(baseUrl, handlers, options) { super(baseUrl, handlers, 'node-WorkItemTracking-api', options); @@ -40126,7 +40215,7 @@ exports.WorkItemTrackingProcessApi = WorkItemTrackingProcessApi; /***/ }), -/***/ 3333: +/***/ 53333: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -40149,8 +40238,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const WorkItemTrackingProcessDefinitionsInterfaces = __nccwpck_require__(1655); +const basem = __nccwpck_require__(80273); +const WorkItemTrackingProcessDefinitionsInterfaces = __nccwpck_require__(21655); class WorkItemTrackingProcessDefinitionsApi extends basem.ClientApiBase { constructor(baseUrl, handlers, options) { super(baseUrl, handlers, 'node-WorkItemTracking-api', options); @@ -41537,7 +41626,7 @@ exports.WorkItemTrackingProcessDefinitionsApi = WorkItemTrackingProcessDefinitio /***/ }), -/***/ 6456: +/***/ 26456: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -41545,7 +41634,7 @@ exports.WorkItemTrackingProcessDefinitionsApi = WorkItemTrackingProcessDefinitio // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. Object.defineProperty(exports, "__esModule", ({ value: true })); -const resthandlers = __nccwpck_require__(4442); +const resthandlers = __nccwpck_require__(74442); class BasicCredentialHandler extends resthandlers.BasicCredentialHandler { constructor(username, password, allowCrossOriginAuthentication = true) { super(username, password, allowCrossOriginAuthentication); @@ -41556,7 +41645,7 @@ exports.BasicCredentialHandler = BasicCredentialHandler; /***/ }), -/***/ 1141: +/***/ 91141: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -41564,7 +41653,7 @@ exports.BasicCredentialHandler = BasicCredentialHandler; // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. Object.defineProperty(exports, "__esModule", ({ value: true })); -const resthandlers = __nccwpck_require__(4442); +const resthandlers = __nccwpck_require__(74442); class BearerCredentialHandler extends resthandlers.BearerCredentialHandler { constructor(token, allowCrossOriginAuthentication = true) { super(token, allowCrossOriginAuthentication); @@ -41575,7 +41664,7 @@ exports.BearerCredentialHandler = BearerCredentialHandler; /***/ }), -/***/ 3450: +/***/ 33450: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -41583,7 +41672,7 @@ exports.BearerCredentialHandler = BearerCredentialHandler; // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. Object.defineProperty(exports, "__esModule", ({ value: true })); -const resthandlers = __nccwpck_require__(4442); +const resthandlers = __nccwpck_require__(74442); class NtlmCredentialHandler extends resthandlers.NtlmCredentialHandler { constructor(username, password, workstation, domain) { super(username, password, workstation, domain); @@ -41594,7 +41683,7 @@ exports.NtlmCredentialHandler = NtlmCredentialHandler; /***/ }), -/***/ 4551: +/***/ 266: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -41602,7 +41691,7 @@ exports.NtlmCredentialHandler = NtlmCredentialHandler; // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. Object.defineProperty(exports, "__esModule", ({ value: true })); -const resthandlers = __nccwpck_require__(4442); +const resthandlers = __nccwpck_require__(74442); class PersonalAccessTokenCredentialHandler extends resthandlers.PersonalAccessTokenCredentialHandler { constructor(token, allowCrossOriginAuthentication = true) { super(token, allowCrossOriginAuthentication); @@ -41613,7 +41702,7 @@ exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHand /***/ }), -/***/ 2167: +/***/ 42167: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -41628,8 +41717,8 @@ exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHand */ Object.defineProperty(exports, "__esModule", ({ value: true })); -const TFS_TestManagement_Contracts = __nccwpck_require__(3047); -const TfsCoreInterfaces = __nccwpck_require__(3931); +const TFS_TestManagement_Contracts = __nccwpck_require__(93047); +const TfsCoreInterfaces = __nccwpck_require__(73931); var AgentStatus; (function (AgentStatus) { /** @@ -43128,7 +43217,7 @@ exports.TypeInfo.XamlBuildDefinition.fields = { /***/ }), -/***/ 4743: +/***/ 74743: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -43343,7 +43432,7 @@ exports.TypeInfo.CommentVersion.fields = { /***/ }), -/***/ 3931: +/***/ 73931: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -43552,7 +43641,7 @@ exports.TypeInfo.WebApiProject.fields = { /***/ }), -/***/ 6890: +/***/ 86890: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -43753,7 +43842,7 @@ exports.TypeInfo.WidgetTypesResponse.fields = { /***/ }), -/***/ 7357: +/***/ 67357: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -43768,7 +43857,7 @@ exports.TypeInfo.WidgetTypesResponse.fields = { */ Object.defineProperty(exports, "__esModule", ({ value: true })); -const GalleryInterfaces = __nccwpck_require__(8905); +const GalleryInterfaces = __nccwpck_require__(48905); /** * How the acquisition is assigned */ @@ -44347,7 +44436,7 @@ exports.TypeInfo.RequestedExtension.fields = { /***/ }), -/***/ 7278: +/***/ 17278: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -44534,7 +44623,7 @@ exports.TypeInfo.FileContainerItem.fields = { /***/ }), -/***/ 8905: +/***/ 48905: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -46002,7 +46091,7 @@ exports.TypeInfo.UserReportedConcern.fields = { /***/ }), -/***/ 9803: +/***/ 89803: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -46017,8 +46106,8 @@ exports.TypeInfo.UserReportedConcern.fields = { */ Object.defineProperty(exports, "__esModule", ({ value: true })); -const PolicyInterfaces = __nccwpck_require__(8555); -const TfsCoreInterfaces = __nccwpck_require__(3931); +const PolicyInterfaces = __nccwpck_require__(88555); +const TfsCoreInterfaces = __nccwpck_require__(73931); /** * The status of a comment thread. */ @@ -48440,7 +48529,7 @@ exports.TypeInfo.VersionControlProjectInfo.fields = { /***/ }), -/***/ 3215: +/***/ 13215: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -48455,7 +48544,7 @@ exports.TypeInfo.VersionControlProjectInfo.fields = { */ Object.defineProperty(exports, "__esModule", ({ value: true })); -const VSSInterfaces = __nccwpck_require__(4498); +const VSSInterfaces = __nccwpck_require__(94498); var InheritLevel; (function (InheritLevel) { InheritLevel[InheritLevel["None"] = 0] = "None"; @@ -48536,7 +48625,7 @@ exports.TypeInfo.ServiceDefinition.fields = { /***/ }), -/***/ 3044: +/***/ 13044: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -49416,7 +49505,7 @@ exports.TypeInfo.SubscriptionTracing.fields = { /***/ }), -/***/ 8555: +/***/ 88555: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -49498,7 +49587,7 @@ exports.TypeInfo.PolicyEvaluationRecord.fields = { /***/ }), -/***/ 879: +/***/ 40879: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -49623,7 +49712,7 @@ exports.TypeInfo.ProfileRegions.fields = { /***/ }), -/***/ 4323: +/***/ 84323: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -49705,7 +49794,7 @@ exports.TypeInfo.RepositoryLanguageAnalytics.fields = { /***/ }), -/***/ 7421: +/***/ 47421: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -49720,7 +49809,7 @@ exports.TypeInfo.RepositoryLanguageAnalytics.fields = { */ Object.defineProperty(exports, "__esModule", ({ value: true })); -const FormInputInterfaces = __nccwpck_require__(3627); +const FormInputInterfaces = __nccwpck_require__(43627); var AgentArtifactType; (function (AgentArtifactType) { /** @@ -51921,7 +52010,7 @@ exports.TypeInfo.RoleAssignment.fields = { /***/ }), -/***/ 9565: +/***/ 69565: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -51936,7 +52025,7 @@ exports.TypeInfo.RoleAssignment.fields = { */ Object.defineProperty(exports, "__esModule", ({ value: true })); -const FormInputInterfaces = __nccwpck_require__(3627); +const FormInputInterfaces = __nccwpck_require__(43627); var AadLoginPromptOption; (function (AadLoginPromptOption) { /** @@ -53720,7 +53809,7 @@ exports.TypeInfo.VirtualMachineResourceCreateParameters.fields = { /***/ }), -/***/ 3047: +/***/ 93047: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -53735,8 +53824,8 @@ exports.TypeInfo.VirtualMachineResourceCreateParameters.fields = { */ Object.defineProperty(exports, "__esModule", ({ value: true })); -const SystemData = __nccwpck_require__(4652); -const TfsCoreInterfaces = __nccwpck_require__(3931); +const SystemData = __nccwpck_require__(64652); +const TfsCoreInterfaces = __nccwpck_require__(73931); /** * The types of test attachments. */ @@ -56017,7 +56106,7 @@ exports.TypeInfo.WorkItemToTestLinks.fields = { /***/ }), -/***/ 9003: +/***/ 99003: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -56032,7 +56121,7 @@ exports.TypeInfo.WorkItemToTestLinks.fields = { */ Object.defineProperty(exports, "__esModule", ({ value: true })); -const TfsCoreInterfaces = __nccwpck_require__(3931); +const TfsCoreInterfaces = __nccwpck_require__(73931); var ItemContentType; (function (ItemContentType) { ItemContentType[ItemContentType["RawText"] = 0] = "RawText"; @@ -56335,7 +56424,7 @@ exports.TypeInfo.VersionControlProjectInfo.fields = { /***/ }), -/***/ 5787: +/***/ 75787: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -56350,7 +56439,7 @@ exports.TypeInfo.VersionControlProjectInfo.fields = { */ Object.defineProperty(exports, "__esModule", ({ value: true })); -const GitInterfaces = __nccwpck_require__(9803); +const GitInterfaces = __nccwpck_require__(89803); /** * Wiki types. */ @@ -56449,7 +56538,7 @@ exports.TypeInfo.WikiV2.fields = { */ Object.defineProperty(exports, "__esModule", ({ value: true })); -const SystemInterfaces = __nccwpck_require__(6790); +const SystemInterfaces = __nccwpck_require__(66790); /** * Definition of the type of backlog level */ @@ -56998,7 +57087,7 @@ exports.TypeInfo.UpdatePlan.fields = { /***/ }), -/***/ 6938: +/***/ 26938: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -57847,7 +57936,7 @@ exports.TypeInfo.WorkItemUpdate.fields = { /***/ }), -/***/ 1655: +/***/ 21655: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -58037,7 +58126,7 @@ exports.TypeInfo.WorkItemTypeModel.fields = { /***/ }), -/***/ 4524: +/***/ 44524: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -58582,7 +58671,7 @@ exports.TypeInfo.WorkItemTypeModel.fields = { /***/ }), -/***/ 3627: +/***/ 43627: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -58764,7 +58853,7 @@ exports.TypeInfo.InputValuesQuery.fields = { /***/ }), -/***/ 3052: +/***/ 63052: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -58830,7 +58919,7 @@ exports.TypeInfo.OperationReference.fields = { /***/ }), -/***/ 6790: +/***/ 66790: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -58884,7 +58973,7 @@ exports.TypeInfo = { /***/ }), -/***/ 4652: +/***/ 64652: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -59064,7 +59153,7 @@ exports.TypeInfo = { /***/ }), -/***/ 4498: +/***/ 94498: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -59259,7 +59348,7 @@ function range(a, b, str) { /***/ }), -/***/ 4159: +/***/ 44159: /***/ ((module) => { module.exports = { @@ -59273,10 +59362,10 @@ module.exports = { /***/ }), -/***/ 3717: +/***/ 33717: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var concatMap = __nccwpck_require__(6891); +var concatMap = __nccwpck_require__(86891); var balanced = __nccwpck_require__(9417); module.exports = expandTop; @@ -59481,1838 +59570,1573 @@ function expand(str, isTop) { /***/ }), -/***/ 4794: +/***/ 50610: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var Buffer = (__nccwpck_require__(4300).Buffer); +"use strict"; -var CRC_TABLE = [ - 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, - 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, - 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, - 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, - 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, - 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, - 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, - 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, - 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, - 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, - 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, - 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, - 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, - 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, - 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, - 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, - 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, - 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, - 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, - 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, - 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, - 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, - 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, - 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, - 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, - 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, - 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, - 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, - 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, - 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, - 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, - 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, - 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, - 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, - 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, - 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, - 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, - 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, - 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, - 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, - 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, - 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, - 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, - 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, - 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, - 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, - 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, - 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, - 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, - 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, - 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, - 0x2d02ef8d -]; -if (typeof Int32Array !== 'undefined') { - CRC_TABLE = new Int32Array(CRC_TABLE); -} +const stringify = __nccwpck_require__(38750); +const compile = __nccwpck_require__(79434); +const expand = __nccwpck_require__(35873); +const parse = __nccwpck_require__(96477); -function ensureBuffer(input) { - if (Buffer.isBuffer(input)) { - return input; +/** + * Expand the given pattern or create a regex-compatible string. + * + * ```js + * const braces = require('braces'); + * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)'] + * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c'] + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {String} + * @api public + */ + +const braces = (input, options = {}) => { + let output = []; + + if (Array.isArray(input)) { + for (let pattern of input) { + let result = braces.create(pattern, options); + if (Array.isArray(result)) { + output.push(...result); + } else { + output.push(result); + } + } + } else { + output = [].concat(braces.create(input, options)); } - var hasNewBufferAPI = - typeof Buffer.alloc === "function" && - typeof Buffer.from === "function"; + if (options && options.expand === true && options.nodupes === true) { + output = [...new Set(output)]; + } + return output; +}; - if (typeof input === "number") { - return hasNewBufferAPI ? Buffer.alloc(input) : new Buffer(input); +/** + * Parse the given `str` with the given `options`. + * + * ```js + * // braces.parse(pattern, [, options]); + * const ast = braces.parse('a/{b,c}/d'); + * console.log(ast); + * ``` + * @param {String} pattern Brace pattern to parse + * @param {Object} options + * @return {Object} Returns an AST + * @api public + */ + +braces.parse = (input, options = {}) => parse(input, options); + +/** + * Creates a braces string from an AST, or an AST node. + * + * ```js + * const braces = require('braces'); + * let ast = braces.parse('foo/{a,b}/bar'); + * console.log(stringify(ast.nodes[2])); //=> '{a,b}' + * ``` + * @param {String} `input` Brace pattern or AST. + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.stringify = (input, options = {}) => { + if (typeof input === 'string') { + return stringify(braces.parse(input, options), options); } - else if (typeof input === "string") { - return hasNewBufferAPI ? Buffer.from(input) : new Buffer(input); + return stringify(input, options); +}; + +/** + * Compiles a brace pattern into a regex-compatible, optimized string. + * This method is called by the main [braces](#braces) function by default. + * + * ```js + * const braces = require('braces'); + * console.log(braces.compile('a/{b,c}/d')); + * //=> ['a/(b|c)/d'] + * ``` + * @param {String} `input` Brace pattern or AST. + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.compile = (input, options = {}) => { + if (typeof input === 'string') { + input = braces.parse(input, options); } - else { - throw new Error("input must be buffer, number, or string, received " + - typeof input); + return compile(input, options); +}; + +/** + * Expands a brace pattern into an array. This method is called by the + * main [braces](#braces) function when `options.expand` is true. Before + * using this method it's recommended that you read the [performance notes](#performance)) + * and advantages of using [.compile](#compile) instead. + * + * ```js + * const braces = require('braces'); + * console.log(braces.expand('a/{b,c}/d')); + * //=> ['a/b/d', 'a/c/d']; + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.expand = (input, options = {}) => { + if (typeof input === 'string') { + input = braces.parse(input, options); } -} -function bufferizeInt(num) { - var tmp = ensureBuffer(4); - tmp.writeInt32BE(num, 0); - return tmp; -} + let result = expand(input, options); -function _crc32(buf, previous) { - buf = ensureBuffer(buf); - if (Buffer.isBuffer(previous)) { - previous = previous.readUInt32BE(0); + // filter out empty strings if specified + if (options.noempty === true) { + result = result.filter(Boolean); } - var crc = ~~previous ^ -1; - for (var n = 0; n < buf.length; n++) { - crc = CRC_TABLE[(crc ^ buf[n]) & 0xff] ^ (crc >>> 8); + + // filter out duplicates if specified + if (options.nodupes === true) { + result = [...new Set(result)]; } - return (crc ^ -1); -} -function crc32() { - return bufferizeInt(_crc32.apply(null, arguments)); -} -crc32.signed = function () { - return _crc32.apply(null, arguments); + return result; }; -crc32.unsigned = function () { - return _crc32.apply(null, arguments) >>> 0; + +/** + * Processes a brace pattern and returns either an expanded array + * (if `options.expand` is true), a highly optimized regex-compatible string. + * This method is called by the main [braces](#braces) function. + * + * ```js + * const braces = require('braces'); + * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}')) + * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)' + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.create = (input, options = {}) => { + if (input === '' || input.length < 3) { + return [input]; + } + + return options.expand !== true + ? braces.compile(input, options) + : braces.expand(input, options); }; -module.exports = crc32; +/** + * Expose "braces" + */ + +module.exports = braces; /***/ }), -/***/ 8803: +/***/ 79434: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -var GetIntrinsic = __nccwpck_require__(4538); +const fill = __nccwpck_require__(6330); +const utils = __nccwpck_require__(45207); -var callBind = __nccwpck_require__(2977); +const compile = (ast, options = {}) => { + let walk = (node, parent = {}) => { + let invalidBlock = utils.isInvalidBrace(parent); + let invalidNode = node.invalid === true && options.escapeInvalid === true; + let invalid = invalidBlock === true || invalidNode === true; + let prefix = options.escapeInvalid === true ? '\\' : ''; + let output = ''; -var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + if (node.isOpen === true) { + return prefix + node.value; + } + if (node.isClose === true) { + return prefix + node.value; + } -module.exports = function callBoundIntrinsic(name, allowMissing) { - var intrinsic = GetIntrinsic(name, !!allowMissing); - if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { - return callBind(intrinsic); - } - return intrinsic; -}; + if (node.type === 'open') { + return invalid ? (prefix + node.value) : '('; + } + if (node.type === 'close') { + return invalid ? (prefix + node.value) : ')'; + } -/***/ }), + if (node.type === 'comma') { + return node.prev.type === 'comma' ? '' : (invalid ? node.value : '|'); + } -/***/ 2977: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (node.value) { + return node.value; + } -"use strict"; + if (node.nodes && node.ranges > 0) { + let args = utils.reduce(node.nodes); + let range = fill(...args, { ...options, wrap: false, toRegex: true }); + + if (range.length !== 0) { + return args.length > 1 && range.length > 1 ? `(${range})` : range; + } + } + if (node.nodes) { + for (let child of node.nodes) { + output += walk(child, node); + } + } + return output; + }; -var bind = __nccwpck_require__(8334); -var GetIntrinsic = __nccwpck_require__(4538); + return walk(ast); +}; -var $apply = GetIntrinsic('%Function.prototype.apply%'); -var $call = GetIntrinsic('%Function.prototype.call%'); -var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); +module.exports = compile; -var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); -var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); -var $max = GetIntrinsic('%Math.max%'); -if ($defineProperty) { - try { - $defineProperty({}, 'a', { value: 1 }); - } catch (e) { - // IE 8 has a broken defineProperty - $defineProperty = null; - } -} +/***/ }), -module.exports = function callBind(originalFunction) { - var func = $reflectApply(bind, $call, arguments); - if ($gOPD && $defineProperty) { - var desc = $gOPD(func, 'length'); - if (desc.configurable) { - // original length, plus the receiver, minus any additional arguments (after the receiver) - $defineProperty( - func, - 'length', - { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) } - ); - } - } - return func; -}; +/***/ 18774: +/***/ ((module) => { -var applyBind = function applyBind() { - return $reflectApply(bind, $apply, arguments); -}; +"use strict"; -if ($defineProperty) { - $defineProperty(module.exports, 'apply', { value: applyBind }); -} else { - module.exports.apply = applyBind; -} + +module.exports = { + MAX_LENGTH: 1024 * 64, + + // Digits + CHAR_0: '0', /* 0 */ + CHAR_9: '9', /* 9 */ + + // Alphabet chars. + CHAR_UPPERCASE_A: 'A', /* A */ + CHAR_LOWERCASE_A: 'a', /* a */ + CHAR_UPPERCASE_Z: 'Z', /* Z */ + CHAR_LOWERCASE_Z: 'z', /* z */ + + CHAR_LEFT_PARENTHESES: '(', /* ( */ + CHAR_RIGHT_PARENTHESES: ')', /* ) */ + + CHAR_ASTERISK: '*', /* * */ + + // Non-alphabetic chars. + CHAR_AMPERSAND: '&', /* & */ + CHAR_AT: '@', /* @ */ + CHAR_BACKSLASH: '\\', /* \ */ + CHAR_BACKTICK: '`', /* ` */ + CHAR_CARRIAGE_RETURN: '\r', /* \r */ + CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */ + CHAR_COLON: ':', /* : */ + CHAR_COMMA: ',', /* , */ + CHAR_DOLLAR: '$', /* . */ + CHAR_DOT: '.', /* . */ + CHAR_DOUBLE_QUOTE: '"', /* " */ + CHAR_EQUAL: '=', /* = */ + CHAR_EXCLAMATION_MARK: '!', /* ! */ + CHAR_FORM_FEED: '\f', /* \f */ + CHAR_FORWARD_SLASH: '/', /* / */ + CHAR_HASH: '#', /* # */ + CHAR_HYPHEN_MINUS: '-', /* - */ + CHAR_LEFT_ANGLE_BRACKET: '<', /* < */ + CHAR_LEFT_CURLY_BRACE: '{', /* { */ + CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */ + CHAR_LINE_FEED: '\n', /* \n */ + CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */ + CHAR_PERCENT: '%', /* % */ + CHAR_PLUS: '+', /* + */ + CHAR_QUESTION_MARK: '?', /* ? */ + CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */ + CHAR_RIGHT_CURLY_BRACE: '}', /* } */ + CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */ + CHAR_SEMICOLON: ';', /* ; */ + CHAR_SINGLE_QUOTE: '\'', /* ' */ + CHAR_SPACE: ' ', /* */ + CHAR_TAB: '\t', /* \t */ + CHAR_UNDERSCORE: '_', /* _ */ + CHAR_VERTICAL_LINE: '|', /* | */ + CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */ +}; /***/ }), -/***/ 8707: +/***/ 35873: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const escapeStringRegexp = __nccwpck_require__(8691); -const ansiStyles = __nccwpck_require__(2068); -const stdoutColor = (__nccwpck_require__(9318).stdout); -const template = __nccwpck_require__(2138); +const fill = __nccwpck_require__(6330); +const stringify = __nccwpck_require__(38750); +const utils = __nccwpck_require__(45207); -const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); +const append = (queue = '', stash = '', enclose = false) => { + let result = []; -// `supportsColor.level` → `ansiStyles.color[name]` mapping -const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; + queue = [].concat(queue); + stash = [].concat(stash); -// `color-convert` models to exclude from the Chalk API due to conflicts and such -const skipModels = new Set(['gray']); + if (!stash.length) return queue; + if (!queue.length) { + return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash; + } -const styles = Object.create(null); + for (let item of queue) { + if (Array.isArray(item)) { + for (let value of item) { + result.push(append(value, stash, enclose)); + } + } else { + for (let ele of stash) { + if (enclose === true && typeof ele === 'string') ele = `{${ele}}`; + result.push(Array.isArray(ele) ? append(item, ele, enclose) : (item + ele)); + } + } + } + return utils.flatten(result); +}; -function applyOptions(obj, options) { - options = options || {}; +const expand = (ast, options = {}) => { + let rangeLimit = options.rangeLimit === void 0 ? 1000 : options.rangeLimit; - // Detect level if not set manually - const scLevel = stdoutColor ? stdoutColor.level : 0; - obj.level = options.level === undefined ? scLevel : options.level; - obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0; -} + let walk = (node, parent = {}) => { + node.queue = []; -function Chalk(options) { - // We check for this.template here since calling `chalk.constructor()` - // by itself will have a `this` of a previously constructed chalk object - if (!this || !(this instanceof Chalk) || this.template) { - const chalk = {}; - applyOptions(chalk, options); + let p = parent; + let q = parent.queue; - chalk.template = function () { - const args = [].slice.call(arguments); - return chalkTag.apply(null, [chalk.template].concat(args)); - }; + while (p.type !== 'brace' && p.type !== 'root' && p.parent) { + p = p.parent; + q = p.queue; + } - Object.setPrototypeOf(chalk, Chalk.prototype); - Object.setPrototypeOf(chalk.template, chalk); + if (node.invalid || node.dollar) { + q.push(append(q.pop(), stringify(node, options))); + return; + } - chalk.template.constructor = Chalk; + if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) { + q.push(append(q.pop(), ['{}'])); + return; + } - return chalk.template; - } + if (node.nodes && node.ranges > 0) { + let args = utils.reduce(node.nodes); - applyOptions(this, options); -} + if (utils.exceedsLimit(...args, options.step, rangeLimit)) { + throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.'); + } -// Use bright blue on Windows as the normal blue color is illegible -if (isSimpleWindowsTerm) { - ansiStyles.blue.open = '\u001B[94m'; -} + let range = fill(...args, options); + if (range.length === 0) { + range = stringify(node, options); + } -for (const key of Object.keys(ansiStyles)) { - ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + q.push(append(q.pop(), range)); + node.nodes = []; + return; + } - styles[key] = { - get() { - const codes = ansiStyles[key]; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); - } - }; -} + let enclose = utils.encloseBrace(node); + let queue = node.queue; + let block = node; -styles.visible = { - get() { - return build.call(this, this._styles || [], true, 'visible'); - } -}; + while (block.type !== 'brace' && block.type !== 'root' && block.parent) { + block = block.parent; + queue = block.queue; + } -ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); -for (const model of Object.keys(ansiStyles.color.ansi)) { - if (skipModels.has(model)) { - continue; - } + for (let i = 0; i < node.nodes.length; i++) { + let child = node.nodes[i]; - styles[model] = { - get() { - const level = this.level; - return function () { - const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); - const codes = { - open, - close: ansiStyles.color.close, - closeRe: ansiStyles.color.closeRe - }; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); - }; - } - }; -} + if (child.type === 'comma' && node.type === 'brace') { + if (i === 1) queue.push(''); + queue.push(''); + continue; + } -ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); -for (const model of Object.keys(ansiStyles.bgColor.ansi)) { - if (skipModels.has(model)) { - continue; - } + if (child.type === 'close') { + q.push(append(q.pop(), queue, enclose)); + continue; + } - const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); - styles[bgModel] = { - get() { - const level = this.level; - return function () { - const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); - const codes = { - open, - close: ansiStyles.bgColor.close, - closeRe: ansiStyles.bgColor.closeRe - }; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); - }; - } - }; -} + if (child.value && child.type !== 'open') { + queue.push(append(queue.pop(), child.value)); + continue; + } -const proto = Object.defineProperties(() => {}, styles); + if (child.nodes) { + walk(child, node); + } + } -function build(_styles, _empty, key) { - const builder = function () { - return applyStyle.apply(builder, arguments); - }; + return queue; + }; - builder._styles = _styles; - builder._empty = _empty; + return utils.flatten(walk(ast)); +}; - const self = this; +module.exports = expand; - Object.defineProperty(builder, 'level', { - enumerable: true, - get() { - return self.level; - }, - set(level) { - self.level = level; - } - }); - Object.defineProperty(builder, 'enabled', { - enumerable: true, - get() { - return self.enabled; - }, - set(enabled) { - self.enabled = enabled; - } - }); +/***/ }), - // See below for fix regarding invisible grey/dim combination on Windows - builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; +/***/ 96477: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // `__proto__` is used because we must return a function, but there is - // no way to create a function with a different prototype - builder.__proto__ = proto; // eslint-disable-line no-proto +"use strict"; - return builder; -} -function applyStyle() { - // Support varags, but simply cast to string in case there's only one arg - const args = arguments; - const argsLen = args.length; - let str = String(arguments[0]); +const stringify = __nccwpck_require__(38750); - if (argsLen === 0) { - return ''; - } +/** + * Constants + */ - if (argsLen > 1) { - // Don't slice `arguments`, it prevents V8 optimizations - for (let a = 1; a < argsLen; a++) { - str += ' ' + args[a]; - } - } +const { + MAX_LENGTH, + CHAR_BACKSLASH, /* \ */ + CHAR_BACKTICK, /* ` */ + CHAR_COMMA, /* , */ + CHAR_DOT, /* . */ + CHAR_LEFT_PARENTHESES, /* ( */ + CHAR_RIGHT_PARENTHESES, /* ) */ + CHAR_LEFT_CURLY_BRACE, /* { */ + CHAR_RIGHT_CURLY_BRACE, /* } */ + CHAR_LEFT_SQUARE_BRACKET, /* [ */ + CHAR_RIGHT_SQUARE_BRACKET, /* ] */ + CHAR_DOUBLE_QUOTE, /* " */ + CHAR_SINGLE_QUOTE, /* ' */ + CHAR_NO_BREAK_SPACE, + CHAR_ZERO_WIDTH_NOBREAK_SPACE +} = __nccwpck_require__(18774); + +/** + * parse + */ + +const parse = (input, options = {}) => { + if (typeof input !== 'string') { + throw new TypeError('Expected a string'); + } + + let opts = options || {}; + let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + if (input.length > max) { + throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); + } + + let ast = { type: 'root', input, nodes: [] }; + let stack = [ast]; + let block = ast; + let prev = ast; + let brackets = 0; + let length = input.length; + let index = 0; + let depth = 0; + let value; + let memo = {}; - if (!this.enabled || this.level <= 0 || !str) { - return this._empty ? '' : str; - } + /** + * Helpers + */ - // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, - // see https://github.com/chalk/chalk/issues/58 - // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. - const originalDim = ansiStyles.dim.open; - if (isSimpleWindowsTerm && this.hasGrey) { - ansiStyles.dim.open = ''; - } + const advance = () => input[index++]; + const push = node => { + if (node.type === 'text' && prev.type === 'dot') { + prev.type = 'text'; + } - for (const code of this._styles.slice().reverse()) { - // Replace any instances already present with a re-opening code - // otherwise only the part of the string until said closing code - // will be colored, and the rest will simply be 'plain'. - str = code.open + str.replace(code.closeRe, code.open) + code.close; + if (prev && prev.type === 'text' && node.type === 'text') { + prev.value += node.value; + return; + } - // Close the styling before a linebreak and reopen - // after next line to fix a bleed issue on macOS - // https://github.com/chalk/chalk/pull/92 - str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); - } + block.nodes.push(node); + node.parent = block; + node.prev = prev; + prev = node; + return node; + }; - // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue - ansiStyles.dim.open = originalDim; + push({ type: 'bos' }); - return str; -} + while (index < length) { + block = stack[stack.length - 1]; + value = advance(); -function chalkTag(chalk, strings) { - if (!Array.isArray(strings)) { - // If chalk() was called by itself or with a string, - // return the string itself as a string. - return [].slice.call(arguments, 1).join(' '); - } + /** + * Invalid chars + */ - const args = [].slice.call(arguments, 2); - const parts = [strings.raw[0]]; + if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) { + continue; + } - for (let i = 1; i < strings.length; i++) { - parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); - parts.push(String(strings.raw[i])); - } + /** + * Escaped chars + */ - return template(chalk, parts.join('')); -} + if (value === CHAR_BACKSLASH) { + push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() }); + continue; + } -Object.defineProperties(Chalk.prototype, styles); + /** + * Right square bracket (literal): ']' + */ -module.exports = Chalk(); // eslint-disable-line new-cap -module.exports.supportsColor = stdoutColor; -module.exports["default"] = module.exports; // For TypeScript + if (value === CHAR_RIGHT_SQUARE_BRACKET) { + push({ type: 'text', value: '\\' + value }); + continue; + } + /** + * Left square bracket: '[' + */ -/***/ }), + if (value === CHAR_LEFT_SQUARE_BRACKET) { + brackets++; -/***/ 2138: -/***/ ((module) => { + let closed = true; + let next; -"use strict"; + while (index < length && (next = advance())) { + value += next; -const TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; -const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; -const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; -const ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi; + if (next === CHAR_LEFT_SQUARE_BRACKET) { + brackets++; + continue; + } -const ESCAPES = new Map([ - ['n', '\n'], - ['r', '\r'], - ['t', '\t'], - ['b', '\b'], - ['f', '\f'], - ['v', '\v'], - ['0', '\0'], - ['\\', '\\'], - ['e', '\u001B'], - ['a', '\u0007'] -]); + if (next === CHAR_BACKSLASH) { + value += advance(); + continue; + } -function unescape(c) { - if ((c[0] === 'u' && c.length === 5) || (c[0] === 'x' && c.length === 3)) { - return String.fromCharCode(parseInt(c.slice(1), 16)); - } + if (next === CHAR_RIGHT_SQUARE_BRACKET) { + brackets--; - return ESCAPES.get(c) || c; -} + if (brackets === 0) { + break; + } + } + } -function parseArguments(name, args) { - const results = []; - const chunks = args.trim().split(/\s*,\s*/g); - let matches; + push({ type: 'text', value }); + continue; + } - for (const chunk of chunks) { - if (!isNaN(chunk)) { - results.push(Number(chunk)); - } else if ((matches = chunk.match(STRING_REGEX))) { - results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr)); - } else { - throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); - } - } + /** + * Parentheses + */ - return results; -} + if (value === CHAR_LEFT_PARENTHESES) { + block = push({ type: 'paren', nodes: [] }); + stack.push(block); + push({ type: 'text', value }); + continue; + } -function parseStyle(style) { - STYLE_REGEX.lastIndex = 0; + if (value === CHAR_RIGHT_PARENTHESES) { + if (block.type !== 'paren') { + push({ type: 'text', value }); + continue; + } + block = stack.pop(); + push({ type: 'text', value }); + block = stack[stack.length - 1]; + continue; + } - const results = []; - let matches; + /** + * Quotes: '|"|` + */ - while ((matches = STYLE_REGEX.exec(style)) !== null) { - const name = matches[1]; + if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) { + let open = value; + let next; - if (matches[2]) { - const args = parseArguments(name, matches[2]); - results.push([name].concat(args)); - } else { - results.push([name]); - } - } + if (options.keepQuotes !== true) { + value = ''; + } - return results; -} + while (index < length && (next = advance())) { + if (next === CHAR_BACKSLASH) { + value += next + advance(); + continue; + } -function buildStyle(chalk, styles) { - const enabled = {}; + if (next === open) { + if (options.keepQuotes === true) value += next; + break; + } - for (const layer of styles) { - for (const style of layer.styles) { - enabled[style[0]] = layer.inverse ? null : style.slice(1); - } - } + value += next; + } - let current = chalk; - for (const styleName of Object.keys(enabled)) { - if (Array.isArray(enabled[styleName])) { - if (!(styleName in current)) { - throw new Error(`Unknown Chalk style: ${styleName}`); - } + push({ type: 'text', value }); + continue; + } - if (enabled[styleName].length > 0) { - current = current[styleName].apply(current, enabled[styleName]); - } else { - current = current[styleName]; - } - } - } + /** + * Left curly brace: '{' + */ - return current; -} + if (value === CHAR_LEFT_CURLY_BRACE) { + depth++; -module.exports = (chalk, tmp) => { - const styles = []; - const chunks = []; - let chunk = []; + let dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true; + let brace = { + type: 'brace', + open: true, + close: false, + dollar, + depth, + commas: 0, + ranges: 0, + nodes: [] + }; - // eslint-disable-next-line max-params - tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => { - if (escapeChar) { - chunk.push(unescape(escapeChar)); - } else if (style) { - const str = chunk.join(''); - chunk = []; - chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str)); - styles.push({inverse, styles: parseStyle(style)}); - } else if (close) { - if (styles.length === 0) { - throw new Error('Found extraneous } in Chalk template literal'); - } + block = push(brace); + stack.push(block); + push({ type: 'open', value }); + continue; + } - chunks.push(buildStyle(chalk, styles)(chunk.join(''))); - chunk = []; - styles.pop(); - } else { - chunk.push(chr); - } - }); + /** + * Right curly brace: '}' + */ - chunks.push(chunk.join('')); + if (value === CHAR_RIGHT_CURLY_BRACE) { + if (block.type !== 'brace') { + push({ type: 'text', value }); + continue; + } - if (styles.length > 0) { - const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`; - throw new Error(errMsg); - } + let type = 'close'; + block = stack.pop(); + block.close = true; - return chunks.join(''); -}; + push({ type, value }); + depth--; + + block = stack[stack.length - 1]; + continue; + } + /** + * Comma: ',' + */ -/***/ }), + if (value === CHAR_COMMA && depth > 0) { + if (block.ranges > 0) { + block.ranges = 0; + let open = block.nodes.shift(); + block.nodes = [open, { type: 'text', value: stringify(block) }]; + } -/***/ 8513: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + push({ type: 'comma', value }); + block.commas++; + continue; + } -"use strict"; + /** + * Dot: '.' + */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.groupSelectors = exports.getDocumentRoot = void 0; -var positionals_js_1 = __nccwpck_require__(9159); -function getDocumentRoot(node) { - while (node.parent) - node = node.parent; - return node; -} -exports.getDocumentRoot = getDocumentRoot; -function groupSelectors(selectors) { - var filteredSelectors = []; - var plainSelectors = []; - for (var _i = 0, selectors_1 = selectors; _i < selectors_1.length; _i++) { - var selector = selectors_1[_i]; - if (selector.some(positionals_js_1.isFilter)) { - filteredSelectors.push(selector); + if (value === CHAR_DOT && depth > 0 && block.commas === 0) { + let siblings = block.nodes; + + if (depth === 0 || siblings.length === 0) { + push({ type: 'text', value }); + continue; + } + + if (prev.type === 'dot') { + block.range = []; + prev.value += value; + prev.type = 'range'; + + if (block.nodes.length !== 3 && block.nodes.length !== 5) { + block.invalid = true; + block.ranges = 0; + prev.type = 'text'; + continue; } - else { - plainSelectors.push(selector); + + block.ranges++; + block.args = []; + continue; + } + + if (prev.type === 'range') { + siblings.pop(); + + let before = siblings[siblings.length - 1]; + before.value += prev.value + value; + prev = before; + block.ranges--; + continue; + } + + push({ type: 'dot', value }); + continue; + } + + /** + * Text + */ + + push({ type: 'text', value }); + } + + // Mark imbalanced braces and brackets as invalid + do { + block = stack.pop(); + + if (block.type !== 'root') { + block.nodes.forEach(node => { + if (!node.nodes) { + if (node.type === 'open') node.isOpen = true; + if (node.type === 'close') node.isClose = true; + if (!node.nodes) node.type = 'text'; + node.invalid = true; } + }); + + // get the location of the block on parent.nodes (block's siblings) + let parent = stack[stack.length - 1]; + let index = parent.nodes.indexOf(block); + // replace the (invalid) block with it's nodes + parent.nodes.splice(index, 1, ...block.nodes); } - return [plainSelectors, filteredSelectors]; -} -exports.groupSelectors = groupSelectors; -//# sourceMappingURL=helpers.js.map + } while (stack.length > 0); + + push({ type: 'eos' }); + return ast; +}; + +module.exports = parse; + /***/ }), -/***/ 5409: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 38750: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; + +const utils = __nccwpck_require__(45207); + +module.exports = (ast, options = {}) => { + let stringify = (node, parent = {}) => { + let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); + let invalidNode = node.invalid === true && options.escapeInvalid === true; + let output = ''; + + if (node.value) { + if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) { + return '\\' + node.value; + } + return node.value; } - Object.defineProperty(o, k2, desc); -}) : (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.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } + + if (node.value) { + return node.value; } - return to.concat(ar || Array.prototype.slice.call(from)); + + if (node.nodes) { + for (let child of node.nodes) { + output += stringify(child); + } + } + return output; + }; + + return stringify(ast); }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.select = exports.filter = exports.some = exports.is = exports.aliases = exports.pseudos = exports.filters = void 0; -var css_what_1 = __nccwpck_require__(284); -var css_select_1 = __nccwpck_require__(4508); -var DomUtils = __importStar(__nccwpck_require__(1754)); -var boolbase = __importStar(__nccwpck_require__(4159)); -var helpers_js_1 = __nccwpck_require__(8513); -var positionals_js_1 = __nccwpck_require__(9159); -// Re-export pseudo extension points -var css_select_2 = __nccwpck_require__(4508); -Object.defineProperty(exports, "filters", ({ enumerable: true, get: function () { return css_select_2.filters; } })); -Object.defineProperty(exports, "pseudos", ({ enumerable: true, get: function () { return css_select_2.pseudos; } })); -Object.defineProperty(exports, "aliases", ({ enumerable: true, get: function () { return css_select_2.aliases; } })); -var UNIVERSAL_SELECTOR = { - type: css_what_1.SelectorType.Universal, - namespace: null, + + + +/***/ }), + +/***/ 45207: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +exports.isInteger = num => { + if (typeof num === 'number') { + return Number.isInteger(num); + } + if (typeof num === 'string' && num.trim() !== '') { + return Number.isInteger(Number(num)); + } + return false; }; -var SCOPE_PSEUDO = { - type: css_what_1.SelectorType.Pseudo, - name: "scope", - data: null, + +/** + * Find a node of the given type + */ + +exports.find = (node, type) => node.nodes.find(node => node.type === type); + +/** + * Find a node of the given type + */ + +exports.exceedsLimit = (min, max, step = 1, limit) => { + if (limit === false) return false; + if (!exports.isInteger(min) || !exports.isInteger(max)) return false; + return ((Number(max) - Number(min)) / Number(step)) >= limit; }; -function is(element, selector, options) { - if (options === void 0) { options = {}; } - return some([element], selector, options); -} -exports.is = is; -function some(elements, selector, options) { - if (options === void 0) { options = {}; } - if (typeof selector === "function") - return elements.some(selector); - var _a = (0, helpers_js_1.groupSelectors)((0, css_what_1.parse)(selector)), plain = _a[0], filtered = _a[1]; - return ((plain.length > 0 && elements.some((0, css_select_1._compileToken)(plain, options))) || - filtered.some(function (sel) { return filterBySelector(sel, elements, options).length > 0; })); -} -exports.some = some; -function filterByPosition(filter, elems, data, options) { - var num = typeof data === "string" ? parseInt(data, 10) : NaN; - switch (filter) { - case "first": - case "lt": - // Already done in `getLimit` - return elems; - case "last": - return elems.length > 0 ? [elems[elems.length - 1]] : elems; - case "nth": - case "eq": - return isFinite(num) && Math.abs(num) < elems.length - ? [num < 0 ? elems[elems.length + num] : elems[num]] - : []; - case "gt": - return isFinite(num) ? elems.slice(num + 1) : []; - case "even": - return elems.filter(function (_, i) { return i % 2 === 0; }); - case "odd": - return elems.filter(function (_, i) { return i % 2 === 1; }); - case "not": { - var filtered_1 = new Set(filterParsed(data, elems, options)); - return elems.filter(function (e) { return !filtered_1.has(e); }); - } - } -} -function filter(selector, elements, options) { - if (options === void 0) { options = {}; } - return filterParsed((0, css_what_1.parse)(selector), elements, options); -} -exports.filter = filter; + /** - * Filter a set of elements by a selector. - * - * Will return elements in the original order. - * - * @param selector Selector to filter by. - * @param elements Elements to filter. - * @param options Options for selector. + * Escape the given node with '\\' before node.value */ -function filterParsed(selector, elements, options) { - if (elements.length === 0) - return []; - var _a = (0, helpers_js_1.groupSelectors)(selector), plainSelectors = _a[0], filteredSelectors = _a[1]; - var found; - if (plainSelectors.length) { - var filtered = filterElements(elements, plainSelectors, options); - // If there are no filters, just return - if (filteredSelectors.length === 0) { - return filtered; - } - // Otherwise, we have to do some filtering - if (filtered.length) { - found = new Set(filtered); - } - } - for (var i = 0; i < filteredSelectors.length && (found === null || found === void 0 ? void 0 : found.size) !== elements.length; i++) { - var filteredSelector = filteredSelectors[i]; - var missing = found - ? elements.filter(function (e) { return DomUtils.isTag(e) && !found.has(e); }) - : elements; - if (missing.length === 0) - break; - var filtered = filterBySelector(filteredSelector, elements, options); - if (filtered.length) { - if (!found) { - /* - * If we haven't found anything before the last selector, - * just return what we found now. - */ - if (i === filteredSelectors.length - 1) { - return filtered; - } - found = new Set(filtered); - } - else { - filtered.forEach(function (el) { return found.add(el); }); - } - } - } - return typeof found !== "undefined" - ? (found.size === elements.length - ? elements - : // Filter elements to preserve order - elements.filter(function (el) { - return found.has(el); - })) - : []; -} -function filterBySelector(selector, elements, options) { - var _a; - if (selector.some(css_what_1.isTraversal)) { - /* - * Get root node, run selector with the scope - * set to all of our nodes. - */ - var root = (_a = options.root) !== null && _a !== void 0 ? _a : (0, helpers_js_1.getDocumentRoot)(elements[0]); - var opts = __assign(__assign({}, options), { context: elements, relativeSelector: false }); - selector.push(SCOPE_PSEUDO); - return findFilterElements(root, selector, opts, true, elements.length); - } - // Performance optimization: If we don't have to traverse, just filter set. - return findFilterElements(elements, selector, options, false, elements.length); -} -function select(selector, root, options, limit) { - if (options === void 0) { options = {}; } - if (limit === void 0) { limit = Infinity; } - if (typeof selector === "function") { - return find(root, selector); - } - var _a = (0, helpers_js_1.groupSelectors)((0, css_what_1.parse)(selector)), plain = _a[0], filtered = _a[1]; - var results = filtered.map(function (sel) { - return findFilterElements(root, sel, options, true, limit); - }); - // Plain selectors can be queried in a single go - if (plain.length) { - results.push(findElements(root, plain, options, limit)); - } - if (results.length === 0) { - return []; - } - // If there was only a single selector, just return the result - if (results.length === 1) { - return results[0]; + +exports.escapeNode = (block, n = 0, type) => { + let node = block.nodes[n]; + if (!node) return; + + if ((type && node.type === type) || node.type === 'open' || node.type === 'close') { + if (node.escaped !== true) { + node.value = '\\' + node.value; + node.escaped = true; } - // Sort results, filtering for duplicates - return DomUtils.uniqueSort(results.reduce(function (a, b) { return __spreadArray(__spreadArray([], a, true), b, true); })); -} -exports.select = select; + } +}; + /** - * - * @param root Element(s) to search from. - * @param selector Selector to look for. - * @param options Options for querying. - * @param queryForSelector Query multiple levels deep for the initial selector, even if it doesn't contain a traversal. + * Returns true if the given brace node should be enclosed in literal braces */ -function findFilterElements(root, selector, options, queryForSelector, totalLimit) { - var filterIndex = selector.findIndex(positionals_js_1.isFilter); - var sub = selector.slice(0, filterIndex); - var filter = selector[filterIndex]; - // If we are at the end of the selector, we can limit the number of elements to retrieve. - var partLimit = selector.length - 1 === filterIndex ? totalLimit : Infinity; - /* - * Set the number of elements to retrieve. - * Eg. for :first, we only have to get a single element. - */ - var limit = (0, positionals_js_1.getLimit)(filter.name, filter.data, partLimit); - if (limit === 0) - return []; - /* - * Skip `findElements` call if our selector starts with a positional - * pseudo. - */ - var elemsNoLimit = sub.length === 0 && !Array.isArray(root) - ? DomUtils.getChildren(root).filter(DomUtils.isTag) - : sub.length === 0 - ? (Array.isArray(root) ? root : [root]).filter(DomUtils.isTag) - : queryForSelector || sub.some(css_what_1.isTraversal) - ? findElements(root, [sub], options, limit) - : filterElements(root, [sub], options); - var elems = elemsNoLimit.slice(0, limit); - var result = filterByPosition(filter.name, elems, filter.data, options); - if (result.length === 0 || selector.length === filterIndex + 1) { - return result; - } - var remainingSelector = selector.slice(filterIndex + 1); - var remainingHasTraversal = remainingSelector.some(css_what_1.isTraversal); - if (remainingHasTraversal) { - if ((0, css_what_1.isTraversal)(remainingSelector[0])) { - var type = remainingSelector[0].type; - if (type === css_what_1.SelectorType.Sibling || - type === css_what_1.SelectorType.Adjacent) { - // If we have a sibling traversal, we need to also look at the siblings. - result = (0, css_select_1.prepareContext)(result, DomUtils, true); - } - // Avoid a traversal-first selector error. - remainingSelector.unshift(UNIVERSAL_SELECTOR); - } - options = __assign(__assign({}, options), { - // Avoid absolutizing the selector - relativeSelector: false, - /* - * Add a custom root func, to make sure traversals don't match elements - * that aren't a part of the considered tree. - */ - rootFunc: function (el) { return result.includes(el); } }); - } - else if (options.rootFunc && options.rootFunc !== boolbase.trueFunc) { - options = __assign(__assign({}, options), { rootFunc: boolbase.trueFunc }); + +exports.encloseBrace = node => { + if (node.type !== 'brace') return false; + if ((node.commas >> 0 + node.ranges >> 0) === 0) { + node.invalid = true; + return true; + } + return false; +}; + +/** + * Returns true if a brace node is invalid. + */ + +exports.isInvalidBrace = block => { + if (block.type !== 'brace') return false; + if (block.invalid === true || block.dollar) return true; + if ((block.commas >> 0 + block.ranges >> 0) === 0) { + block.invalid = true; + return true; + } + if (block.open !== true || block.close !== true) { + block.invalid = true; + return true; + } + return false; +}; + +/** + * Returns true if a node is an open or close node + */ + +exports.isOpenOrClose = node => { + if (node.type === 'open' || node.type === 'close') { + return true; + } + return node.open === true || node.close === true; +}; + +/** + * Reduce an array of text nodes. + */ + +exports.reduce = nodes => nodes.reduce((acc, node) => { + if (node.type === 'text') acc.push(node.value); + if (node.type === 'range') node.type = 'text'; + return acc; +}, []); + +/** + * Flatten an array + */ + +exports.flatten = (...args) => { + const result = []; + const flat = arr => { + for (let i = 0; i < arr.length; i++) { + let ele = arr[i]; + Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele); } - /* - * If we have another filter, recursively call `findFilterElements`, - * with the `recursive` flag disabled. We only have to look for more - * elements when we see a traversal. - * - * Otherwise, - */ - return remainingSelector.some(positionals_js_1.isFilter) - ? findFilterElements(result, remainingSelector, options, false, totalLimit) - : remainingHasTraversal - ? // Query existing elements to resolve traversal. - findElements(result, [remainingSelector], options, totalLimit) - : // If we don't have any more traversals, simply filter elements. - filterElements(result, [remainingSelector], options); + return result; + }; + flat(args); + return result; +}; + + +/***/ }), + +/***/ 84794: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var Buffer = (__nccwpck_require__(14300).Buffer); + +var CRC_TABLE = [ + 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, + 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, + 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, + 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, + 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, + 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, + 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, + 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, + 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, + 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, + 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, + 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, + 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, + 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, + 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, + 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, + 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, + 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, + 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, + 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, + 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, + 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, + 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, + 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, + 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, + 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, + 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, + 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, + 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, + 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, + 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, + 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, + 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, + 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, + 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, + 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, + 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, + 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, + 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, + 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, + 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, + 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, + 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, + 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, + 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, + 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, + 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, + 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, + 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, + 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, + 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, + 0x2d02ef8d +]; + +if (typeof Int32Array !== 'undefined') { + CRC_TABLE = new Int32Array(CRC_TABLE); } -function findElements(root, sel, options, limit) { - var query = (0, css_select_1._compileToken)(sel, options, root); - return find(root, query, limit); + +function ensureBuffer(input) { + if (Buffer.isBuffer(input)) { + return input; + } + + var hasNewBufferAPI = + typeof Buffer.alloc === "function" && + typeof Buffer.from === "function"; + + if (typeof input === "number") { + return hasNewBufferAPI ? Buffer.alloc(input) : new Buffer(input); + } + else if (typeof input === "string") { + return hasNewBufferAPI ? Buffer.from(input) : new Buffer(input); + } + else { + throw new Error("input must be buffer, number, or string, received " + + typeof input); + } } -function find(root, query, limit) { - if (limit === void 0) { limit = Infinity; } - var elems = (0, css_select_1.prepareContext)(root, DomUtils, query.shouldTestNextSiblings); - return DomUtils.find(function (node) { return DomUtils.isTag(node) && query(node); }, elems, true, limit); + +function bufferizeInt(num) { + var tmp = ensureBuffer(4); + tmp.writeInt32BE(num, 0); + return tmp; } -function filterElements(elements, sel, options) { - var els = (Array.isArray(elements) ? elements : [elements]).filter(DomUtils.isTag); - if (els.length === 0) - return els; - var query = (0, css_select_1._compileToken)(sel, options); - return query === boolbase.trueFunc ? els : els.filter(query); + +function _crc32(buf, previous) { + buf = ensureBuffer(buf); + if (Buffer.isBuffer(previous)) { + previous = previous.readUInt32BE(0); + } + var crc = ~~previous ^ -1; + for (var n = 0; n < buf.length; n++) { + crc = CRC_TABLE[(crc ^ buf[n]) & 0xff] ^ (crc >>> 8); + } + return (crc ^ -1); } -//# sourceMappingURL=index.js.map + +function crc32() { + return bufferizeInt(_crc32.apply(null, arguments)); +} +crc32.signed = function () { + return _crc32.apply(null, arguments); +}; +crc32.unsigned = function () { + return _crc32.apply(null, arguments) >>> 0; +}; + +module.exports = crc32; + /***/ }), -/***/ 9159: -/***/ ((__unused_webpack_module, exports) => { +/***/ 28803: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getLimit = exports.isFilter = exports.filterNames = void 0; -exports.filterNames = new Set([ - "first", - "last", - "eq", - "gt", - "nth", - "lt", - "even", - "odd", -]); -function isFilter(s) { - if (s.type !== "pseudo") - return false; - if (exports.filterNames.has(s.name)) - return true; - if (s.name === "not" && Array.isArray(s.data)) { - // Only consider `:not` with embedded filters - return s.data.some(function (s) { return s.some(isFilter); }); - } - return false; -} -exports.isFilter = isFilter; -function getLimit(filter, data, partLimit) { - var num = data != null ? parseInt(data, 10) : NaN; - switch (filter) { - case "first": - return 1; - case "nth": - case "eq": - return isFinite(num) ? (num >= 0 ? num + 1 : Infinity) : 0; - case "lt": - return isFinite(num) - ? num >= 0 - ? Math.min(num, partLimit) - : Infinity - : 0; - case "gt": - return isFinite(num) ? Infinity : 0; - case "odd": - return 2 * partLimit; - case "even": - return 2 * partLimit - 1; - case "last": - case "not": - return Infinity; - } -} -exports.getLimit = getLimit; -//# sourceMappingURL=positionals.js.map + +var GetIntrinsic = __nccwpck_require__(74538); + +var callBind = __nccwpck_require__(62977); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + /***/ }), -/***/ 8596: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 62977: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -/** - * Methods for getting and modifying attributes. - * - * @module cheerio/attributes - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toggleClass = exports.removeClass = exports.addClass = exports.hasClass = exports.removeAttr = exports.val = exports.data = exports.prop = exports.attr = void 0; -var static_js_1 = __nccwpck_require__(2); -var utils_js_1 = __nccwpck_require__(1183); -var domutils_1 = __nccwpck_require__(1754); -var hasOwn = Object.prototype.hasOwnProperty; -var rspace = /\s+/; -var dataAttrPrefix = 'data-'; -/* - * Lookup table for coercing string data-* attributes to their corresponding - * JavaScript primitives - */ -var primitives = { - null: null, - true: true, - false: false, + +var bind = __nccwpck_require__(88334); +var GetIntrinsic = __nccwpck_require__(74538); +var setFunctionLength = __nccwpck_require__(64056); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); +var $max = GetIntrinsic('%Math.max%'); + +if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + } catch (e) { + // IE 8 has a broken defineProperty + $defineProperty = null; + } +} + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); }; -// Attributes that are booleans -var rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i; -// Matches strings that look like JSON objects or arrays -var rbrace = /^{[^]*}$|^\[[^]*]$/; -function getAttr(elem, name, xmlMode) { - var _a; - if (!elem || !(0, utils_js_1.isTag)(elem)) - return undefined; - (_a = elem.attribs) !== null && _a !== void 0 ? _a : (elem.attribs = {}); - // Return the entire attribs object if no attribute specified - if (!name) { - return elem.attribs; - } - if (hasOwn.call(elem.attribs, name)) { - // Get the (decoded) attribute - return !xmlMode && rboolean.test(name) ? name : elem.attribs[name]; - } - // Mimic the DOM and return text content as value for `option's` - if (elem.name === 'option' && name === 'value') { - return (0, static_js_1.text)(elem.children); - } - // Mimic DOM with default value for radios/checkboxes - if (elem.name === 'input' && - (elem.attribs['type'] === 'radio' || elem.attribs['type'] === 'checkbox') && - name === 'value') { - return 'on'; - } - return undefined; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; } -/** - * Sets the value of an attribute. The attribute will be deleted if the value is `null`. - * - * @private - * @param el - The element to set the attribute on. - * @param name - The attribute's name. - * @param value - The attribute's value. - */ -function setAttr(el, name, value) { - if (value === null) { - removeAttribute(el, name); - } - else { - el.attribs[name] = "".concat(value); - } + + +/***/ }), + +/***/ 38707: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const escapeStringRegexp = __nccwpck_require__(98691); +const ansiStyles = __nccwpck_require__(52068); +const stdoutColor = (__nccwpck_require__(59318).stdout); + +const template = __nccwpck_require__(52138); + +const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); + +// `supportsColor.level` → `ansiStyles.color[name]` mapping +const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; + +// `color-convert` models to exclude from the Chalk API due to conflicts and such +const skipModels = new Set(['gray']); + +const styles = Object.create(null); + +function applyOptions(obj, options) { + options = options || {}; + + // Detect level if not set manually + const scLevel = stdoutColor ? stdoutColor.level : 0; + obj.level = options.level === undefined ? scLevel : options.level; + obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0; } -function attr(name, value) { - // Set the value (with attr map support) - if (typeof name === 'object' || value !== undefined) { - if (typeof value === 'function') { - if (typeof name !== 'string') { - { - throw new Error('Bad combination of arguments.'); - } - } - return (0, utils_js_1.domEach)(this, function (el, i) { - if ((0, utils_js_1.isTag)(el)) - setAttr(el, name, value.call(el, i, el.attribs[name])); - }); - } - return (0, utils_js_1.domEach)(this, function (el) { - if (!(0, utils_js_1.isTag)(el)) - return; - if (typeof name === 'object') { - Object.keys(name).forEach(function (objName) { - var objValue = name[objName]; - setAttr(el, objName, objValue); - }); - } - else { - setAttr(el, name, value); - } - }); - } - return arguments.length > 1 - ? this - : getAttr(this[0], name, this.options.xmlMode); + +function Chalk(options) { + // We check for this.template here since calling `chalk.constructor()` + // by itself will have a `this` of a previously constructed chalk object + if (!this || !(this instanceof Chalk) || this.template) { + const chalk = {}; + applyOptions(chalk, options); + + chalk.template = function () { + const args = [].slice.call(arguments); + return chalkTag.apply(null, [chalk.template].concat(args)); + }; + + Object.setPrototypeOf(chalk, Chalk.prototype); + Object.setPrototypeOf(chalk.template, chalk); + + chalk.template.constructor = Chalk; + + return chalk.template; + } + + applyOptions(this, options); } -exports.attr = attr; -/** - * Gets a node's prop. - * - * @private - * @category Attributes - * @param el - Element to get the prop of. - * @param name - Name of the prop. - * @returns The prop's value. - */ -function getProp(el, name, xmlMode) { - return name in el - ? // @ts-expect-error TS doesn't like us accessing the value directly here. - el[name] - : !xmlMode && rboolean.test(name) - ? getAttr(el, name, false) !== undefined - : getAttr(el, name, xmlMode); + +// Use bright blue on Windows as the normal blue color is illegible +if (isSimpleWindowsTerm) { + ansiStyles.blue.open = '\u001B[94m'; } -/** - * Sets the value of a prop. - * - * @private - * @param el - The element to set the prop on. - * @param name - The prop's name. - * @param value - The prop's value. - */ -function setProp(el, name, value, xmlMode) { - if (name in el) { - // @ts-expect-error Overriding value - el[name] = value; - } - else { - setAttr(el, name, !xmlMode && rboolean.test(name) ? (value ? '' : null) : "".concat(value)); - } + +for (const key of Object.keys(ansiStyles)) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + + styles[key] = { + get() { + const codes = ansiStyles[key]; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); + } + }; } -function prop(name, value) { - var _this = this; - var _a; - if (typeof name === 'string' && value === undefined) { - var el = this[0]; - if (!el || !(0, utils_js_1.isTag)(el)) - return undefined; - switch (name) { - case 'style': { - var property_1 = this.css(); - var keys = Object.keys(property_1); - keys.forEach(function (p, i) { - property_1[i] = p; - }); - property_1.length = keys.length; - return property_1; - } - case 'tagName': - case 'nodeName': { - return el.name.toUpperCase(); - } - case 'href': - case 'src': { - var prop_1 = (_a = el.attribs) === null || _a === void 0 ? void 0 : _a[name]; - /* eslint-disable node/no-unsupported-features/node-builtins */ - if (typeof URL !== 'undefined' && - ((name === 'href' && (el.tagName === 'a' || el.name === 'link')) || - (name === 'src' && - (el.tagName === 'img' || - el.tagName === 'iframe' || - el.tagName === 'audio' || - el.tagName === 'video' || - el.tagName === 'source'))) && - prop_1 !== undefined && - this.options.baseURI) { - return new URL(prop_1, this.options.baseURI).href; - } - /* eslint-enable node/no-unsupported-features/node-builtins */ - return prop_1; - } - case 'innerText': { - return (0, domutils_1.innerText)(el); - } - case 'textContent': { - return (0, domutils_1.textContent)(el); - } - case 'outerHTML': - return this.clone().wrap('').parent().html(); - case 'innerHTML': - return this.html(); - default: - return getProp(el, name, this.options.xmlMode); - } - } - if (typeof name === 'object' || value !== undefined) { - if (typeof value === 'function') { - if (typeof name === 'object') { - throw new Error('Bad combination of arguments.'); - } - return (0, utils_js_1.domEach)(this, function (el, i) { - if ((0, utils_js_1.isTag)(el)) { - setProp(el, name, value.call(el, i, getProp(el, name, _this.options.xmlMode)), _this.options.xmlMode); - } - }); - } - return (0, utils_js_1.domEach)(this, function (el) { - if (!(0, utils_js_1.isTag)(el)) - return; - if (typeof name === 'object') { - Object.keys(name).forEach(function (key) { - var val = name[key]; - setProp(el, key, val, _this.options.xmlMode); - }); - } - else { - setProp(el, name, value, _this.options.xmlMode); - } - }); - } - return undefined; + +styles.visible = { + get() { + return build.call(this, this._styles || [], true, 'visible'); + } +}; + +ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); +for (const model of Object.keys(ansiStyles.color.ansi)) { + if (skipModels.has(model)) { + continue; + } + + styles[model] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.color.close, + closeRe: ansiStyles.color.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; } -exports.prop = prop; -/** - * Sets the value of a data attribute. - * - * @private - * @param el - The element to set the data attribute on. - * @param name - The data attribute's name. - * @param value - The data attribute's value. - */ -function setData(el, name, value) { - var _a; - var elem = el; - (_a = elem.data) !== null && _a !== void 0 ? _a : (elem.data = {}); - if (typeof name === 'object') - Object.assign(elem.data, name); - else if (typeof name === 'string' && value !== undefined) { - elem.data[name] = value; - } + +ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); +for (const model of Object.keys(ansiStyles.bgColor.ansi)) { + if (skipModels.has(model)) { + continue; + } + + const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); + styles[bgModel] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.bgColor.close, + closeRe: ansiStyles.bgColor.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; } -/** - * Read the specified attribute from the equivalent HTML5 `data-*` attribute, - * and (if present) cache the value in the node's internal data store. If no - * attribute name is specified, read _all_ HTML5 `data-*` attributes in this manner. - * - * @private - * @category Attributes - * @param el - Element to get the data attribute of. - * @param name - Name of the data attribute. - * @returns The data attribute's value, or a map with all of the data attributes. - */ -function readData(el, name) { - var domNames; - var jsNames; - var value; - if (name == null) { - domNames = Object.keys(el.attribs).filter(function (attrName) { - return attrName.startsWith(dataAttrPrefix); - }); - jsNames = domNames.map(function (domName) { - return (0, utils_js_1.camelCase)(domName.slice(dataAttrPrefix.length)); - }); - } - else { - domNames = [dataAttrPrefix + (0, utils_js_1.cssCase)(name)]; - jsNames = [name]; - } - for (var idx = 0; idx < domNames.length; ++idx) { - var domName = domNames[idx]; - var jsName = jsNames[idx]; - if (hasOwn.call(el.attribs, domName) && - !hasOwn.call(el.data, jsName)) { - value = el.attribs[domName]; - if (hasOwn.call(primitives, value)) { - value = primitives[value]; - } - else if (value === String(Number(value))) { - value = Number(value); - } - else if (rbrace.test(value)) { - try { - value = JSON.parse(value); - } - catch (e) { - /* Ignore */ - } - } - el.data[jsName] = value; - } - } - return name == null ? el.data : value; + +const proto = Object.defineProperties(() => {}, styles); + +function build(_styles, _empty, key) { + const builder = function () { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + builder._empty = _empty; + + const self = this; + + Object.defineProperty(builder, 'level', { + enumerable: true, + get() { + return self.level; + }, + set(level) { + self.level = level; + } + }); + + Object.defineProperty(builder, 'enabled', { + enumerable: true, + get() { + return self.enabled; + }, + set(enabled) { + self.enabled = enabled; + } + }); + + // See below for fix regarding invisible grey/dim combination on Windows + builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; + + // `__proto__` is used because we must return a function, but there is + // no way to create a function with a different prototype + builder.__proto__ = proto; // eslint-disable-line no-proto + + return builder; } -function data(name, value) { - var _a; - var elem = this[0]; - if (!elem || !(0, utils_js_1.isTag)(elem)) - return; - var dataEl = elem; - (_a = dataEl.data) !== null && _a !== void 0 ? _a : (dataEl.data = {}); - // Return the entire data object if no data specified - if (!name) { - return readData(dataEl); - } - // Set the value (with attr map support) - if (typeof name === 'object' || value !== undefined) { - (0, utils_js_1.domEach)(this, function (el) { - if ((0, utils_js_1.isTag)(el)) { - if (typeof name === 'object') - setData(el, name); - else - setData(el, name, value); - } - }); - return this; - } - if (hasOwn.call(dataEl.data, name)) { - return dataEl.data[name]; - } - return readData(dataEl, name); + +function applyStyle() { + // Support varags, but simply cast to string in case there's only one arg + const args = arguments; + const argsLen = args.length; + let str = String(arguments[0]); + + if (argsLen === 0) { + return ''; + } + + if (argsLen > 1) { + // Don't slice `arguments`, it prevents V8 optimizations + for (let a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || this.level <= 0 || !str) { + return this._empty ? '' : str; + } + + // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + const originalDim = ansiStyles.dim.open; + if (isSimpleWindowsTerm && this.hasGrey) { + ansiStyles.dim.open = ''; + } + + for (const code of this._styles.slice().reverse()) { + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; + + // Close the styling before a linebreak and reopen + // after next line to fix a bleed issue on macOS + // https://github.com/chalk/chalk/pull/92 + str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); + } + + // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue + ansiStyles.dim.open = originalDim; + + return str; } -exports.data = data; -function val(value) { - var querying = arguments.length === 0; - var element = this[0]; - if (!element || !(0, utils_js_1.isTag)(element)) - return querying ? undefined : this; - switch (element.name) { - case 'textarea': - return this.text(value); - case 'select': { - var option = this.find('option:selected'); - if (!querying) { - if (this.attr('multiple') == null && typeof value === 'object') { - return this; - } - this.find('option').removeAttr('selected'); - var values = typeof value !== 'object' ? [value] : value; - for (var i = 0; i < values.length; i++) { - this.find("option[value=\"".concat(values[i], "\"]")).attr('selected', ''); - } - return this; - } - return this.attr('multiple') - ? option.toArray().map(function (el) { return (0, static_js_1.text)(el.children); }) - : option.attr('value'); - } - case 'input': - case 'option': - return querying - ? this.attr('value') - : this.attr('value', value); - } - return undefined; + +function chalkTag(chalk, strings) { + if (!Array.isArray(strings)) { + // If chalk() was called by itself or with a string, + // return the string itself as a string. + return [].slice.call(arguments, 1).join(' '); + } + + const args = [].slice.call(arguments, 2); + const parts = [strings.raw[0]]; + + for (let i = 1; i < strings.length; i++) { + parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); + parts.push(String(strings.raw[i])); + } + + return template(chalk, parts.join('')); } -exports.val = val; -/** - * Remove an attribute. - * - * @private - * @param elem - Node to remove attribute from. - * @param name - Name of the attribute to remove. - */ -function removeAttribute(elem, name) { - if (!elem.attribs || !hasOwn.call(elem.attribs, name)) - return; - delete elem.attribs[name]; + +Object.defineProperties(Chalk.prototype, styles); + +module.exports = Chalk(); // eslint-disable-line new-cap +module.exports.supportsColor = stdoutColor; +module.exports["default"] = module.exports; // For TypeScript + + +/***/ }), + +/***/ 52138: +/***/ ((module) => { + +"use strict"; + +const TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; +const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; +const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; +const ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi; + +const ESCAPES = new Map([ + ['n', '\n'], + ['r', '\r'], + ['t', '\t'], + ['b', '\b'], + ['f', '\f'], + ['v', '\v'], + ['0', '\0'], + ['\\', '\\'], + ['e', '\u001B'], + ['a', '\u0007'] +]); + +function unescape(c) { + if ((c[0] === 'u' && c.length === 5) || (c[0] === 'x' && c.length === 3)) { + return String.fromCharCode(parseInt(c.slice(1), 16)); + } + + return ESCAPES.get(c) || c; } -/** - * Splits a space-separated list of names to individual names. - * - * @category Attributes - * @param names - Names to split. - * @returns - Split names. - */ -function splitNames(names) { - return names ? names.trim().split(rspace) : []; + +function parseArguments(name, args) { + const results = []; + const chunks = args.trim().split(/\s*,\s*/g); + let matches; + + for (const chunk of chunks) { + if (!isNaN(chunk)) { + results.push(Number(chunk)); + } else if ((matches = chunk.match(STRING_REGEX))) { + results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr)); + } else { + throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); + } + } + + return results; } -/** - * Method for removing attributes by `name`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').removeAttr('class').html(); - * //=>
  • Pear
  • - * - * $('.apple').attr('id', 'favorite'); - * $('.apple').removeAttr('id class').html(); - * //=>
  • Apple
  • - * ``` - * - * @param name - Name of the attribute. - * @returns The instance itself. - * @see {@link https://api.jquery.com/removeAttr/} - */ -function removeAttr(name) { - var attrNames = splitNames(name); - var _loop_1 = function (i) { - (0, utils_js_1.domEach)(this_1, function (elem) { - if ((0, utils_js_1.isTag)(elem)) - removeAttribute(elem, attrNames[i]); - }); - }; - var this_1 = this; - for (var i = 0; i < attrNames.length; i++) { - _loop_1(i); - } - return this; + +function parseStyle(style) { + STYLE_REGEX.lastIndex = 0; + + const results = []; + let matches; + + while ((matches = STYLE_REGEX.exec(style)) !== null) { + const name = matches[1]; + + if (matches[2]) { + const args = parseArguments(name, matches[2]); + results.push([name].concat(args)); + } else { + results.push([name]); + } + } + + return results; } -exports.removeAttr = removeAttr; -/** - * Check to see if _any_ of the matched elements have the given `className`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').hasClass('pear'); - * //=> true - * - * $('apple').hasClass('fruit'); - * //=> false - * - * $('li').hasClass('pear'); - * //=> true - * ``` - * - * @param className - Name of the class. - * @returns Indicates if an element has the given `className`. - * @see {@link https://api.jquery.com/hasClass/} - */ -function hasClass(className) { - return this.toArray().some(function (elem) { - var clazz = (0, utils_js_1.isTag)(elem) && elem.attribs['class']; - var idx = -1; - if (clazz && className.length) { - while ((idx = clazz.indexOf(className, idx + 1)) > -1) { - var end = idx + className.length; - if ((idx === 0 || rspace.test(clazz[idx - 1])) && - (end === clazz.length || rspace.test(clazz[end]))) { - return true; - } - } - } - return false; - }); -} -exports.hasClass = hasClass; -/** - * Adds class(es) to all of the matched elements. Also accepts a `function`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').addClass('fruit').html(); - * //=>
  • Pear
  • - * - * $('.apple').addClass('fruit red').html(); - * //=>
  • Apple
  • - * ``` - * - * @param value - Name of new class. - * @returns The instance itself. - * @see {@link https://api.jquery.com/addClass/} - */ -function addClass(value) { - // Support functions - if (typeof value === 'function') { - return (0, utils_js_1.domEach)(this, function (el, i) { - if ((0, utils_js_1.isTag)(el)) { - var className = el.attribs['class'] || ''; - addClass.call([el], value.call(el, i, className)); - } - }); - } - // Return if no value or not a string or function - if (!value || typeof value !== 'string') - return this; - var classNames = value.split(rspace); - var numElements = this.length; - for (var i = 0; i < numElements; i++) { - var el = this[i]; - // If selected element isn't a tag, move on - if (!(0, utils_js_1.isTag)(el)) - continue; - // If we don't already have classes — always set xmlMode to false here, as it doesn't matter for classes - var className = getAttr(el, 'class', false); - if (!className) { - setAttr(el, 'class', classNames.join(' ').trim()); - } - else { - var setClass = " ".concat(className, " "); - // Check if class already exists - for (var j = 0; j < classNames.length; j++) { - var appendClass = "".concat(classNames[j], " "); - if (!setClass.includes(" ".concat(appendClass))) - setClass += appendClass; - } - setAttr(el, 'class', setClass.trim()); - } - } - return this; -} -exports.addClass = addClass; -/** - * Removes one or more space-separated classes from the selected elements. If no - * `className` is defined, all classes will be removed. Also accepts a `function`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').removeClass('pear').html(); - * //=>
  • Pear
  • - * - * $('.apple').addClass('red').removeClass().html(); - * //=>
  • Apple
  • - * ``` - * - * @param name - Name of the class. If not specified, removes all elements. - * @returns The instance itself. - * @see {@link https://api.jquery.com/removeClass/} - */ -function removeClass(name) { - // Handle if value is a function - if (typeof name === 'function') { - return (0, utils_js_1.domEach)(this, function (el, i) { - if ((0, utils_js_1.isTag)(el)) { - removeClass.call([el], name.call(el, i, el.attribs['class'] || '')); - } - }); - } - var classes = splitNames(name); - var numClasses = classes.length; - var removeAll = arguments.length === 0; - return (0, utils_js_1.domEach)(this, function (el) { - if (!(0, utils_js_1.isTag)(el)) - return; - if (removeAll) { - // Short circuit the remove all case as this is the nice one - el.attribs['class'] = ''; - } - else { - var elClasses = splitNames(el.attribs['class']); - var changed = false; - for (var j = 0; j < numClasses; j++) { - var index = elClasses.indexOf(classes[j]); - if (index >= 0) { - elClasses.splice(index, 1); - changed = true; - /* - * We have to do another pass to ensure that there are not duplicate - * classes listed - */ - j--; - } - } - if (changed) { - el.attribs['class'] = elClasses.join(' '); - } - } - }); -} -exports.removeClass = removeClass; -/** - * Add or remove class(es) from the matched elements, depending on either the - * class's presence or the value of the switch argument. Also accepts a `function`. - * - * @category Attributes - * @example - * - * ```js - * $('.apple.green').toggleClass('fruit green red').html(); - * //=>
  • Apple
  • - * - * $('.apple.green').toggleClass('fruit green red', true).html(); - * //=>
  • Apple
  • - * ``` - * - * @param value - Name of the class. Can also be a function. - * @param stateVal - If specified the state of the class. - * @returns The instance itself. - * @see {@link https://api.jquery.com/toggleClass/} - */ -function toggleClass(value, stateVal) { - // Support functions - if (typeof value === 'function') { - return (0, utils_js_1.domEach)(this, function (el, i) { - if ((0, utils_js_1.isTag)(el)) { - toggleClass.call([el], value.call(el, i, el.attribs['class'] || '', stateVal), stateVal); - } - }); - } - // Return if no value or not a string or function - if (!value || typeof value !== 'string') - return this; - var classNames = value.split(rspace); - var numClasses = classNames.length; - var state = typeof stateVal === 'boolean' ? (stateVal ? 1 : -1) : 0; - var numElements = this.length; - for (var i = 0; i < numElements; i++) { - var el = this[i]; - // If selected element isn't a tag, move on - if (!(0, utils_js_1.isTag)(el)) - continue; - var elementClasses = splitNames(el.attribs['class']); - // Check if class already exists - for (var j = 0; j < numClasses; j++) { - // Check if the class name is currently defined - var index = elementClasses.indexOf(classNames[j]); - // Add if stateValue === true or we are toggling and there is no value - if (state >= 0 && index < 0) { - elementClasses.push(classNames[j]); - } - else if (state <= 0 && index >= 0) { - // Otherwise remove but only if the item exists - elementClasses.splice(index, 1); - } - } - el.attribs['class'] = elementClasses.join(' '); - } - return this; -} -exports.toggleClass = toggleClass; -//# sourceMappingURL=attributes.js.map -/***/ }), +function buildStyle(chalk, styles) { + const enabled = {}; -/***/ 7084: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + for (const layer of styles) { + for (const style of layer.styles) { + enabled[style[0]] = layer.inverse ? null : style.slice(1); + } + } -"use strict"; + let current = chalk; + for (const styleName of Object.keys(enabled)) { + if (Array.isArray(enabled[styleName])) { + if (!(styleName in current)) { + throw new Error(`Unknown Chalk style: ${styleName}`); + } -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.css = void 0; -var utils_js_1 = __nccwpck_require__(1183); -/** - * Set multiple CSS properties for every matched element. - * - * @category CSS - * @param prop - The names of the properties. - * @param val - The new values. - * @returns The instance itself. - * @see {@link https://api.jquery.com/css/} - */ -function css(prop, val) { - if ((prop != null && val != null) || - // When `prop` is a "plain" object - (typeof prop === 'object' && !Array.isArray(prop))) { - return (0, utils_js_1.domEach)(this, function (el, i) { - if ((0, utils_js_1.isTag)(el)) { - // `prop` can't be an array here anymore. - setCss(el, prop, val, i); - } - }); - } - if (this.length === 0) { - return undefined; - } - return getCss(this[0], prop); -} -exports.css = css; -/** - * Set styles of all elements. - * - * @private - * @param el - Element to set style of. - * @param prop - Name of property. - * @param value - Value to set property to. - * @param idx - Optional index within the selection. - */ -function setCss(el, prop, value, idx) { - if (typeof prop === 'string') { - var styles = getCss(el); - var val = typeof value === 'function' ? value.call(el, idx, styles[prop]) : value; - if (val === '') { - delete styles[prop]; - } - else if (val != null) { - styles[prop] = val; - } - el.attribs['style'] = stringify(styles); - } - else if (typeof prop === 'object') { - Object.keys(prop).forEach(function (k, i) { - setCss(el, k, prop[k], i); - }); - } -} -function getCss(el, prop) { - if (!el || !(0, utils_js_1.isTag)(el)) - return; - var styles = parse(el.attribs['style']); - if (typeof prop === 'string') { - return styles[prop]; - } - if (Array.isArray(prop)) { - var newStyles_1 = {}; - prop.forEach(function (item) { - if (styles[item] != null) { - newStyles_1[item] = styles[item]; - } - }); - return newStyles_1; - } - return styles; -} -/** - * Stringify `obj` to styles. - * - * @private - * @category CSS - * @param obj - Object to stringify. - * @returns The serialized styles. - */ -function stringify(obj) { - return Object.keys(obj).reduce(function (str, prop) { return "".concat(str).concat(str ? ' ' : '').concat(prop, ": ").concat(obj[prop], ";"); }, ''); -} -/** - * Parse `styles`. - * - * @private - * @category CSS - * @param styles - Styles to be parsed. - * @returns The parsed styles. - */ -function parse(styles) { - styles = (styles || '').trim(); - if (!styles) - return {}; - var obj = {}; - var key; - for (var _i = 0, _a = styles.split(';'); _i < _a.length; _i++) { - var str = _a[_i]; - var n = str.indexOf(':'); - // If there is no :, or if it is the first/last character, add to the previous item's value - if (n < 1 || n === str.length - 1) { - var trimmed = str.trimEnd(); - if (trimmed.length > 0 && key !== undefined) { - obj[key] += ";".concat(trimmed); - } - } - else { - key = str.slice(0, n).trim(); - obj[key] = str.slice(n + 1).trim(); - } - } - return obj; + if (enabled[styleName].length > 0) { + current = current[styleName].apply(current, enabled[styleName]); + } else { + current = current[styleName]; + } + } + } + + return current; } -//# sourceMappingURL=css.js.map + +module.exports = (chalk, tmp) => { + const styles = []; + const chunks = []; + let chunk = []; + + // eslint-disable-next-line max-params + tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => { + if (escapeChar) { + chunk.push(unescape(escapeChar)); + } else if (style) { + const str = chunk.join(''); + chunk = []; + chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str)); + styles.push({inverse, styles: parseStyle(style)}); + } else if (close) { + if (styles.length === 0) { + throw new Error('Found extraneous } in Chalk template literal'); + } + + chunks.push(buildStyle(chalk, styles)(chunk.join(''))); + chunk = []; + styles.pop(); + } else { + chunk.push(chr); + } + }); + + chunks.push(chunk.join('')); + + if (styles.length > 0) { + const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`; + throw new Error(errMsg); + } + + return chunks.join(''); +}; + /***/ }), -/***/ 5954: +/***/ 28513: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.serializeArray = exports.serialize = void 0; -var utils_js_1 = __nccwpck_require__(1183); -/* - * https://github.com/jquery/jquery/blob/2.1.3/src/manipulation/var/rcheckableType.js - * https://github.com/jquery/jquery/blob/2.1.3/src/serialize.js - */ -var submittableSelector = 'input,select,textarea,keygen'; -var r20 = /%20/g; -var rCRLF = /\r?\n/g; -/** - * Encode a set of form elements as a string for submission. - * - * @category Forms - * @example - * - * ```js - * $('
    ').serialize(); - * //=> 'foo=bar' - * ``` - * - * @returns The serialized form. - * @see {@link https://api.jquery.com/serialize/} - */ -function serialize() { - // Convert form elements into name/value objects - var arr = this.serializeArray(); - // Serialize each element into a key/value string - var retArr = arr.map(function (data) { - return "".concat(encodeURIComponent(data.name), "=").concat(encodeURIComponent(data.value)); - }); - // Return the resulting serialization - return retArr.join('&').replace(r20, '+'); +exports.groupSelectors = exports.getDocumentRoot = void 0; +var positionals_js_1 = __nccwpck_require__(59159); +function getDocumentRoot(node) { + while (node.parent) + node = node.parent; + return node; } -exports.serialize = serialize; -/** - * Encode a set of form elements as an array of names and values. - * - * @category Forms - * @example - * - * ```js - * $('
    ').serializeArray(); - * //=> [ { name: 'foo', value: 'bar' } ] - * ``` - * - * @returns The serialized form. - * @see {@link https://api.jquery.com/serializeArray/} - */ -function serializeArray() { - var _this = this; - // Resolve all form elements from either forms or collections of form elements - return this.map(function (_, elem) { - var $elem = _this._make(elem); - if ((0, utils_js_1.isTag)(elem) && elem.name === 'form') { - return $elem.find(submittableSelector).toArray(); +exports.getDocumentRoot = getDocumentRoot; +function groupSelectors(selectors) { + var filteredSelectors = []; + var plainSelectors = []; + for (var _i = 0, selectors_1 = selectors; _i < selectors_1.length; _i++) { + var selector = selectors_1[_i]; + if (selector.some(positionals_js_1.isFilter)) { + filteredSelectors.push(selector); } - return $elem.filter(submittableSelector).toArray(); - }) - .filter( - // Verify elements have a name (`attr.name`) and are not disabled (`:enabled`) - '[name!=""]:enabled' + - // And cannot be clicked (`[type=submit]`) or are used in `x-www-form-urlencoded` (`[type=file]`) - ':not(:submit, :button, :image, :reset, :file)' + - // And are either checked/don't have a checkable state - ':matches([checked], :not(:checkbox, :radio))' - // Convert each of the elements to its value(s) - ) - .map(function (_, elem) { - var _a; - var $elem = _this._make(elem); - var name = $elem.attr('name'); // We have filtered for elements with a name before. - // If there is no value set (e.g. `undefined`, `null`), then default value to empty - var value = (_a = $elem.val()) !== null && _a !== void 0 ? _a : ''; - // If we have an array of values (e.g. `