First Commit

This commit is contained in:
shadowdao committed 2025-08-28 19:35:28 -07:00
commit 264e65006a
488 files changed
+155661

No files matched your search

+274
View File
@@ -0,0 +1,274 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var config_exports = {};
__export(config_exports, {
FullConfigInternal: () => FullConfigInternal,
FullProjectInternal: () => FullProjectInternal,
builtInReporters: () => builtInReporters,
defaultGrep: () => defaultGrep,
defaultReporter: () => defaultReporter,
defaultTimeout: () => defaultTimeout,
getProjectId: () => getProjectId,
takeFirst: () => takeFirst,
toReporters: () => toReporters
});
module.exports = __toCommonJS(config_exports);
var import_fs = __toESM(require("fs"));
var import_os = __toESM(require("os"));
var import_path = __toESM(require("path"));
var import_util = require("../util");
const defaultTimeout = 3e4;
class FullConfigInternal {
constructor(location, userConfig, configCLIOverrides, metadata) {
this.projects = [];
this.cliArgs = [];
this.cliListOnly = false;
this.preOnlyTestFilters = [];
this.postShardTestFilters = [];
this.defineConfigWasUsed = false;
this.globalSetups = [];
this.globalTeardowns = [];
if (configCLIOverrides.projects && userConfig.projects)
throw new Error(`Cannot use --browser option when configuration file defines projects. Specify browserName in the projects instead.`);
const { resolvedConfigFile, configDir } = location;
const packageJsonPath = (0, import_util.getPackageJsonPath)(configDir);
const packageJsonDir = packageJsonPath ? import_path.default.dirname(packageJsonPath) : process.cwd();
this.configDir = configDir;
this.configCLIOverrides = configCLIOverrides;
const privateConfiguration = userConfig["@playwright/test"];
this.plugins = (privateConfiguration?.plugins || []).map((p) => ({ factory: p }));
this.singleTSConfigPath = pathResolve(configDir, userConfig.tsconfig);
this.captureGitInfo = userConfig.captureGitInfo;
this.failOnFlakyTests = takeFirst(configCLIOverrides.failOnFlakyTests, userConfig.failOnFlakyTests, false);
this.globalSetups = (Array.isArray(userConfig.globalSetup) ? userConfig.globalSetup : [userConfig.globalSetup]).map((s) => resolveScript(s, configDir)).filter((script) => script !== void 0);
this.globalTeardowns = (Array.isArray(userConfig.globalTeardown) ? userConfig.globalTeardown : [userConfig.globalTeardown]).map((s) => resolveScript(s, configDir)).filter((script) => script !== void 0);
userConfig.metadata = userConfig.metadata || {};
this.config = {
configFile: resolvedConfigFile,
rootDir: pathResolve(configDir, userConfig.testDir) || configDir,
forbidOnly: takeFirst(configCLIOverrides.forbidOnly, userConfig.forbidOnly, false),
fullyParallel: takeFirst(configCLIOverrides.fullyParallel, userConfig.fullyParallel, false),
globalSetup: this.globalSetups[0] ?? null,
globalTeardown: this.globalTeardowns[0] ?? null,
globalTimeout: takeFirst(configCLIOverrides.debug ? 0 : void 0, configCLIOverrides.globalTimeout, userConfig.globalTimeout, 0),
grep: takeFirst(userConfig.grep, defaultGrep),
grepInvert: takeFirst(userConfig.grepInvert, null),
maxFailures: takeFirst(configCLIOverrides.debug ? 1 : void 0, configCLIOverrides.maxFailures, userConfig.maxFailures, 0),
metadata: metadata ?? userConfig.metadata,
preserveOutput: takeFirst(userConfig.preserveOutput, "always"),
reporter: takeFirst(configCLIOverrides.reporter, resolveReporters(userConfig.reporter, configDir), [[defaultReporter]]),
reportSlowTests: takeFirst(userConfig.reportSlowTests, {
max: 5,
threshold: 3e5
/* 5 minutes */
}),
quiet: takeFirst(configCLIOverrides.quiet, userConfig.quiet, false),
projects: [],
shard: takeFirst(configCLIOverrides.shard, userConfig.shard, null),
updateSnapshots: takeFirst(configCLIOverrides.updateSnapshots, userConfig.updateSnapshots, "missing"),
updateSourceMethod: takeFirst(configCLIOverrides.updateSourceMethod, userConfig.updateSourceMethod, "patch"),
version: require("../../package.json").version,
workers: resolveWorkers(takeFirst(configCLIOverrides.debug ? 1 : void 0, configCLIOverrides.workers, userConfig.workers, "50%")),
webServer: null
};
for (const key in userConfig) {
if (key.startsWith("@"))
this.config[key] = userConfig[key];
}
this.config[configInternalSymbol] = this;
const webServers = takeFirst(userConfig.webServer, null);
if (Array.isArray(webServers)) {
this.config.webServer = null;
this.webServers = webServers;
} else if (webServers) {
this.config.webServer = webServers;
this.webServers = [webServers];
} else {
this.webServers = [];
}
const projectConfigs = configCLIOverrides.projects || userConfig.projects || [userConfig];
this.projects = projectConfigs.map((p) => new FullProjectInternal(configDir, userConfig, this, p, this.configCLIOverrides, packageJsonDir));
resolveProjectDependencies(this.projects);
this._assignUniqueProjectIds(this.projects);
this.config.projects = this.projects.map((p) => p.project);
}
_assignUniqueProjectIds(projects) {
const usedNames = /* @__PURE__ */ new Set();
for (const p of projects) {
const name = p.project.name || "";
for (let i = 0; i < projects.length; ++i) {
const candidate = name + (i ? i : "");
if (usedNames.has(candidate))
continue;
p.id = candidate;
p.project.__projectId = p.id;
usedNames.add(candidate);
break;
}
}
}
}
class FullProjectInternal {
constructor(configDir, config, fullConfig, projectConfig, configCLIOverrides, packageJsonDir) {
this.id = "";
this.deps = [];
this.fullConfig = fullConfig;
const testDir = takeFirst(pathResolve(configDir, projectConfig.testDir), pathResolve(configDir, config.testDir), fullConfig.configDir);
this.snapshotPathTemplate = takeFirst(projectConfig.snapshotPathTemplate, config.snapshotPathTemplate);
this.project = {
grep: takeFirst(projectConfig.grep, config.grep, defaultGrep),
grepInvert: takeFirst(projectConfig.grepInvert, config.grepInvert, null),
outputDir: takeFirst(configCLIOverrides.outputDir, pathResolve(configDir, projectConfig.outputDir), pathResolve(configDir, config.outputDir), import_path.default.join(packageJsonDir, "test-results")),
// Note: we either apply the cli override for repeatEach or not, depending on whether the
// project is top-level vs dependency. See collectProjectsAndTestFiles in loadUtils.
repeatEach: takeFirst(projectConfig.repeatEach, config.repeatEach, 1),
retries: takeFirst(configCLIOverrides.retries, projectConfig.retries, config.retries, 0),
metadata: takeFirst(projectConfig.metadata, config.metadata, {}),
name: takeFirst(projectConfig.name, config.name, ""),
testDir,
snapshotDir: takeFirst(pathResolve(configDir, projectConfig.snapshotDir), pathResolve(configDir, config.snapshotDir), testDir),
testIgnore: takeFirst(projectConfig.testIgnore, config.testIgnore, []),
testMatch: takeFirst(projectConfig.testMatch, config.testMatch, "**/*.@(spec|test).?(c|m)[jt]s?(x)"),
timeout: takeFirst(configCLIOverrides.debug ? 0 : void 0, configCLIOverrides.timeout, projectConfig.timeout, config.timeout, defaultTimeout),
use: (0, import_util.mergeObjects)(config.use, projectConfig.use, configCLIOverrides.use),
dependencies: projectConfig.dependencies || [],
teardown: projectConfig.teardown
};
this.fullyParallel = takeFirst(configCLIOverrides.fullyParallel, projectConfig.fullyParallel, config.fullyParallel, void 0);
this.expect = takeFirst(projectConfig.expect, config.expect, {});
if (this.expect.toHaveScreenshot?.stylePath) {
const stylePaths = Array.isArray(this.expect.toHaveScreenshot.stylePath) ? this.expect.toHaveScreenshot.stylePath : [this.expect.toHaveScreenshot.stylePath];
this.expect.toHaveScreenshot.stylePath = stylePaths.map((stylePath) => import_path.default.resolve(configDir, stylePath));
}
this.respectGitIgnore = takeFirst(projectConfig.respectGitIgnore, config.respectGitIgnore, !projectConfig.testDir && !config.testDir);
this.ignoreSnapshots = takeFirst(configCLIOverrides.ignoreSnapshots, projectConfig.ignoreSnapshots, config.ignoreSnapshots, false);
this.workers = projectConfig.workers ? resolveWorkers(projectConfig.workers) : void 0;
if (configCLIOverrides.debug && this.workers)
this.workers = 1;
}
}
function takeFirst(...args) {
for (const arg of args) {
if (arg !== void 0)
return arg;
}
return void 0;
}
function pathResolve(baseDir, relative) {
if (!relative)
return void 0;
return import_path.default.resolve(baseDir, relative);
}
function resolveReporters(reporters, rootDir) {
return toReporters(reporters)?.map(([id, arg]) => {
if (builtInReporters.includes(id))
return [id, arg];
return [require.resolve(id, { paths: [rootDir] }), arg];
});
}
function resolveWorkers(workers) {
if (typeof workers === "string") {
if (workers.endsWith("%")) {
const cpus = import_os.default.cpus().length;
return Math.max(1, Math.floor(cpus * (parseInt(workers, 10) / 100)));
}
const parsedWorkers = parseInt(workers, 10);
if (isNaN(parsedWorkers))
throw new Error(`Workers ${workers} must be a number or percentage.`);
return parsedWorkers;
}
return workers;
}
function resolveProjectDependencies(projects) {
const teardownSet = /* @__PURE__ */ new Set();
for (const project of projects) {
for (const dependencyName of project.project.dependencies) {
const dependencies = projects.filter((p) => p.project.name === dependencyName);
if (!dependencies.length)
throw new Error(`Project '${project.project.name}' depends on unknown project '${dependencyName}'`);
if (dependencies.length > 1)
throw new Error(`Project dependencies should have unique names, reading ${dependencyName}`);
project.deps.push(...dependencies);
}
if (project.project.teardown) {
const teardowns = projects.filter((p) => p.project.name === project.project.teardown);
if (!teardowns.length)
throw new Error(`Project '${project.project.name}' has unknown teardown project '${project.project.teardown}'`);
if (teardowns.length > 1)
throw new Error(`Project teardowns should have unique names, reading ${project.project.teardown}`);
const teardown = teardowns[0];
project.teardown = teardown;
teardownSet.add(teardown);
}
}
for (const teardown of teardownSet) {
if (teardown.deps.length)
throw new Error(`Teardown project ${teardown.project.name} must not have dependencies`);
}
for (const project of projects) {
for (const dep of project.deps) {
if (teardownSet.has(dep))
throw new Error(`Project ${project.project.name} must not depend on a teardown project ${dep.project.name}`);
}
}
}
function toReporters(reporters) {
if (!reporters)
return;
if (typeof reporters === "string")
return [[reporters]];
return reporters;
}
const builtInReporters = ["list", "line", "dot", "json", "junit", "null", "github", "html", "blob"];
function resolveScript(id, rootDir) {
if (!id)
return void 0;
const localPath = import_path.default.resolve(rootDir, id);
if (import_fs.default.existsSync(localPath))
return localPath;
return require.resolve(id, { paths: [rootDir] });
}
const defaultGrep = /.*/;
const defaultReporter = process.env.CI ? "dot" : "list";
const configInternalSymbol = Symbol("configInternalSymbol");
function getProjectId(project) {
return project.__projectId;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
FullConfigInternal,
FullProjectInternal,
builtInReporters,
defaultGrep,
defaultReporter,
defaultTimeout,
getProjectId,
takeFirst,
toReporters
});
+344
View File
@@ -0,0 +1,344 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var configLoader_exports = {};
__export(configLoader_exports, {
defineConfig: () => defineConfig,
deserializeConfig: () => deserializeConfig,
loadConfig: () => loadConfig,
loadConfigFromFile: () => loadConfigFromFile,
loadEmptyConfigForMergeReports: () => loadEmptyConfigForMergeReports,
resolveConfigLocation: () => resolveConfigLocation
});
module.exports = __toCommonJS(configLoader_exports);
var import_fs = __toESM(require("fs"));
var import_path = __toESM(require("path"));
var import_utils = require("playwright-core/lib/utils");
var import_transform = require("../transform/transform");
var import_util = require("../util");
var import_config = require("./config");
var import_esmLoaderHost = require("./esmLoaderHost");
var import_compilationCache = require("../transform/compilationCache");
const kDefineConfigWasUsed = Symbol("defineConfigWasUsed");
const defineConfig = (...configs) => {
let result = configs[0];
for (let i = 1; i < configs.length; ++i) {
const config = configs[i];
const prevProjects = result.projects;
result = {
...result,
...config,
expect: {
...result.expect,
...config.expect
},
use: {
...result.use,
...config.use
},
build: {
...result.build,
...config.build
},
webServer: [
...Array.isArray(result.webServer) ? result.webServer : result.webServer ? [result.webServer] : [],
...Array.isArray(config.webServer) ? config.webServer : config.webServer ? [config.webServer] : []
]
};
if (!result.projects && !config.projects)
continue;
const projectOverrides = /* @__PURE__ */ new Map();
for (const project of config.projects || [])
projectOverrides.set(project.name, project);
const projects = [];
for (const project of prevProjects || []) {
const projectOverride = projectOverrides.get(project.name);
if (projectOverride) {
projects.push({
...project,
...projectOverride,
use: {
...project.use,
...projectOverride.use
}
});
projectOverrides.delete(project.name);
} else {
projects.push(project);
}
}
projects.push(...projectOverrides.values());
result.projects = projects;
}
result[kDefineConfigWasUsed] = true;
return result;
};
async function deserializeConfig(data) {
if (data.compilationCache)
(0, import_compilationCache.addToCompilationCache)(data.compilationCache);
return await loadConfig(data.location, data.configCLIOverrides, void 0, data.metadata ? JSON.parse(data.metadata) : void 0);
}
async function loadUserConfig(location) {
let object = location.resolvedConfigFile ? await (0, import_transform.requireOrImport)(location.resolvedConfigFile) : {};
if (object && typeof object === "object" && "default" in object)
object = object["default"];
return object;
}
async function loadConfig(location, overrides, ignoreProjectDependencies = false, metadata) {
if (!(0, import_esmLoaderHost.registerESMLoader)()) {
if (location.resolvedConfigFile && (0, import_util.fileIsModule)(location.resolvedConfigFile))
throw (0, import_util.errorWithFile)(location.resolvedConfigFile, `Playwright requires Node.js 18.19 or higher to load esm modules. Please update your version of Node.js.`);
}
(0, import_transform.setSingleTSConfig)(overrides?.tsconfig);
await (0, import_esmLoaderHost.configureESMLoader)();
const userConfig = await loadUserConfig(location);
validateConfig(location.resolvedConfigFile || "<default config>", userConfig);
const fullConfig = new import_config.FullConfigInternal(location, userConfig, overrides || {}, metadata);
fullConfig.defineConfigWasUsed = !!userConfig[kDefineConfigWasUsed];
if (ignoreProjectDependencies) {
for (const project of fullConfig.projects) {
project.deps = [];
project.teardown = void 0;
}
}
const babelPlugins = userConfig["@playwright/test"]?.babelPlugins || [];
const external = userConfig.build?.external || [];
(0, import_transform.setTransformConfig)({ babelPlugins, external });
if (!overrides?.tsconfig)
(0, import_transform.setSingleTSConfig)(fullConfig?.singleTSConfigPath);
await (0, import_esmLoaderHost.configureESMLoaderTransformConfig)();
return fullConfig;
}
function validateConfig(file, config) {
if (typeof config !== "object" || !config)
throw (0, import_util.errorWithFile)(file, `Configuration file must export a single object`);
validateProject(file, config, "config");
if ("forbidOnly" in config && config.forbidOnly !== void 0) {
if (typeof config.forbidOnly !== "boolean")
throw (0, import_util.errorWithFile)(file, `config.forbidOnly must be a boolean`);
}
if ("globalSetup" in config && config.globalSetup !== void 0) {
if (Array.isArray(config.globalSetup)) {
config.globalSetup.forEach((item, index) => {
if (typeof item !== "string")
throw (0, import_util.errorWithFile)(file, `config.globalSetup[${index}] must be a string`);
});
} else if (typeof config.globalSetup !== "string") {
throw (0, import_util.errorWithFile)(file, `config.globalSetup must be a string`);
}
}
if ("globalTeardown" in config && config.globalTeardown !== void 0) {
if (Array.isArray(config.globalTeardown)) {
config.globalTeardown.forEach((item, index) => {
if (typeof item !== "string")
throw (0, import_util.errorWithFile)(file, `config.globalTeardown[${index}] must be a string`);
});
} else if (typeof config.globalTeardown !== "string") {
throw (0, import_util.errorWithFile)(file, `config.globalTeardown must be a string`);
}
}
if ("globalTimeout" in config && config.globalTimeout !== void 0) {
if (typeof config.globalTimeout !== "number" || config.globalTimeout < 0)
throw (0, import_util.errorWithFile)(file, `config.globalTimeout must be a non-negative number`);
}
if ("grep" in config && config.grep !== void 0) {
if (Array.isArray(config.grep)) {
config.grep.forEach((item, index) => {
if (!(0, import_utils.isRegExp)(item))
throw (0, import_util.errorWithFile)(file, `config.grep[${index}] must be a RegExp`);
});
} else if (!(0, import_utils.isRegExp)(config.grep)) {
throw (0, import_util.errorWithFile)(file, `config.grep must be a RegExp`);
}
}
if ("grepInvert" in config && config.grepInvert !== void 0) {
if (Array.isArray(config.grepInvert)) {
config.grepInvert.forEach((item, index) => {
if (!(0, import_utils.isRegExp)(item))
throw (0, import_util.errorWithFile)(file, `config.grepInvert[${index}] must be a RegExp`);
});
} else if (!(0, import_utils.isRegExp)(config.grepInvert)) {
throw (0, import_util.errorWithFile)(file, `config.grepInvert must be a RegExp`);
}
}
if ("maxFailures" in config && config.maxFailures !== void 0) {
if (typeof config.maxFailures !== "number" || config.maxFailures < 0)
throw (0, import_util.errorWithFile)(file, `config.maxFailures must be a non-negative number`);
}
if ("preserveOutput" in config && config.preserveOutput !== void 0) {
if (typeof config.preserveOutput !== "string" || !["always", "never", "failures-only"].includes(config.preserveOutput))
throw (0, import_util.errorWithFile)(file, `config.preserveOutput must be one of "always", "never" or "failures-only"`);
}
if ("projects" in config && config.projects !== void 0) {
if (!Array.isArray(config.projects))
throw (0, import_util.errorWithFile)(file, `config.projects must be an array`);
config.projects.forEach((project, index) => {
validateProject(file, project, `config.projects[${index}]`);
});
}
if ("quiet" in config && config.quiet !== void 0) {
if (typeof config.quiet !== "boolean")
throw (0, import_util.errorWithFile)(file, `config.quiet must be a boolean`);
}
if ("reporter" in config && config.reporter !== void 0) {
if (Array.isArray(config.reporter)) {
config.reporter.forEach((item, index) => {
if (!Array.isArray(item) || item.length <= 0 || item.length > 2 || typeof item[0] !== "string")
throw (0, import_util.errorWithFile)(file, `config.reporter[${index}] must be a tuple [name, optionalArgument]`);
});
} else if (typeof config.reporter !== "string") {
throw (0, import_util.errorWithFile)(file, `config.reporter must be a string`);
}
}
if ("reportSlowTests" in config && config.reportSlowTests !== void 0 && config.reportSlowTests !== null) {
if (!config.reportSlowTests || typeof config.reportSlowTests !== "object")
throw (0, import_util.errorWithFile)(file, `config.reportSlowTests must be an object`);
if (!("max" in config.reportSlowTests) || typeof config.reportSlowTests.max !== "number" || config.reportSlowTests.max < 0)
throw (0, import_util.errorWithFile)(file, `config.reportSlowTests.max must be a non-negative number`);
if (!("threshold" in config.reportSlowTests) || typeof config.reportSlowTests.threshold !== "number" || config.reportSlowTests.threshold < 0)
throw (0, import_util.errorWithFile)(file, `config.reportSlowTests.threshold must be a non-negative number`);
}
if ("shard" in config && config.shard !== void 0 && config.shard !== null) {
if (!config.shard || typeof config.shard !== "object")
throw (0, import_util.errorWithFile)(file, `config.shard must be an object`);
if (!("total" in config.shard) || typeof config.shard.total !== "number" || config.shard.total < 1)
throw (0, import_util.errorWithFile)(file, `config.shard.total must be a positive number`);
if (!("current" in config.shard) || typeof config.shard.current !== "number" || config.shard.current < 1 || config.shard.current > config.shard.total)
throw (0, import_util.errorWithFile)(file, `config.shard.current must be a positive number, not greater than config.shard.total`);
}
if ("updateSnapshots" in config && config.updateSnapshots !== void 0) {
if (typeof config.updateSnapshots !== "string" || !["all", "changed", "missing", "none"].includes(config.updateSnapshots))
throw (0, import_util.errorWithFile)(file, `config.updateSnapshots must be one of "all", "changed", "missing" or "none"`);
}
if ("tsconfig" in config && config.tsconfig !== void 0) {
if (typeof config.tsconfig !== "string")
throw (0, import_util.errorWithFile)(file, `config.tsconfig must be a string`);
if (!import_fs.default.existsSync(import_path.default.resolve(file, "..", config.tsconfig)))
throw (0, import_util.errorWithFile)(file, `config.tsconfig does not exist`);
}
}
function validateProject(file, project, title) {
if (typeof project !== "object" || !project)
throw (0, import_util.errorWithFile)(file, `${title} must be an object`);
if ("name" in project && project.name !== void 0) {
if (typeof project.name !== "string")
throw (0, import_util.errorWithFile)(file, `${title}.name must be a string`);
}
if ("outputDir" in project && project.outputDir !== void 0) {
if (typeof project.outputDir !== "string")
throw (0, import_util.errorWithFile)(file, `${title}.outputDir must be a string`);
}
if ("repeatEach" in project && project.repeatEach !== void 0) {
if (typeof project.repeatEach !== "number" || project.repeatEach < 0)
throw (0, import_util.errorWithFile)(file, `${title}.repeatEach must be a non-negative number`);
}
if ("retries" in project && project.retries !== void 0) {
if (typeof project.retries !== "number" || project.retries < 0)
throw (0, import_util.errorWithFile)(file, `${title}.retries must be a non-negative number`);
}
if ("testDir" in project && project.testDir !== void 0) {
if (typeof project.testDir !== "string")
throw (0, import_util.errorWithFile)(file, `${title}.testDir must be a string`);
}
for (const prop of ["testIgnore", "testMatch"]) {
if (prop in project && project[prop] !== void 0) {
const value = project[prop];
if (Array.isArray(value)) {
value.forEach((item, index) => {
if (typeof item !== "string" && !(0, import_utils.isRegExp)(item))
throw (0, import_util.errorWithFile)(file, `${title}.${prop}[${index}] must be a string or a RegExp`);
});
} else if (typeof value !== "string" && !(0, import_utils.isRegExp)(value)) {
throw (0, import_util.errorWithFile)(file, `${title}.${prop} must be a string or a RegExp`);
}
}
}
if ("timeout" in project && project.timeout !== void 0) {
if (typeof project.timeout !== "number" || project.timeout < 0)
throw (0, import_util.errorWithFile)(file, `${title}.timeout must be a non-negative number`);
}
if ("use" in project && project.use !== void 0) {
if (!project.use || typeof project.use !== "object")
throw (0, import_util.errorWithFile)(file, `${title}.use must be an object`);
}
if ("ignoreSnapshots" in project && project.ignoreSnapshots !== void 0) {
if (typeof project.ignoreSnapshots !== "boolean")
throw (0, import_util.errorWithFile)(file, `${title}.ignoreSnapshots must be a boolean`);
}
if ("workers" in project && project.workers !== void 0) {
if (typeof project.workers === "number" && project.workers <= 0)
throw (0, import_util.errorWithFile)(file, `${title}.workers must be a positive number`);
else if (typeof project.workers === "string" && !project.workers.endsWith("%"))
throw (0, import_util.errorWithFile)(file, `${title}.workers must be a number or percentage`);
}
}
function resolveConfigLocation(configFile) {
const configFileOrDirectory = configFile ? import_path.default.resolve(process.cwd(), configFile) : process.cwd();
const resolvedConfigFile = resolveConfigFile(configFileOrDirectory);
return {
resolvedConfigFile,
configDir: resolvedConfigFile ? import_path.default.dirname(resolvedConfigFile) : configFileOrDirectory
};
}
function resolveConfigFile(configFileOrDirectory) {
const resolveConfig = (configFile) => {
if (import_fs.default.existsSync(configFile))
return configFile;
};
const resolveConfigFileFromDirectory = (directory) => {
for (const ext of [".ts", ".js", ".mts", ".mjs", ".cts", ".cjs"]) {
const configFile = resolveConfig(import_path.default.resolve(directory, "playwright.config" + ext));
if (configFile)
return configFile;
}
};
if (!import_fs.default.existsSync(configFileOrDirectory))
throw new Error(`${configFileOrDirectory} does not exist`);
if (import_fs.default.statSync(configFileOrDirectory).isDirectory()) {
const configFile = resolveConfigFileFromDirectory(configFileOrDirectory);
if (configFile)
return configFile;
return void 0;
}
return configFileOrDirectory;
}
async function loadConfigFromFile(configFile, overrides, ignoreDeps) {
return await loadConfig(resolveConfigLocation(configFile), overrides, ignoreDeps);
}
async function loadEmptyConfigForMergeReports() {
return await loadConfig({ configDir: process.cwd() });
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
defineConfig,
deserializeConfig,
loadConfig,
loadConfigFromFile,
loadEmptyConfigForMergeReports,
resolveConfigLocation
});
+102
View File
@@ -0,0 +1,102 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var esmLoaderHost_exports = {};
__export(esmLoaderHost_exports, {
configureESMLoader: () => configureESMLoader,
configureESMLoaderTransformConfig: () => configureESMLoaderTransformConfig,
incorporateCompilationCache: () => incorporateCompilationCache,
registerESMLoader: () => registerESMLoader,
startCollectingFileDeps: () => startCollectingFileDeps,
stopCollectingFileDeps: () => stopCollectingFileDeps
});
module.exports = __toCommonJS(esmLoaderHost_exports);
var import_url = __toESM(require("url"));
var import_compilationCache = require("../transform/compilationCache");
var import_portTransport = require("../transform/portTransport");
var import_transform = require("../transform/transform");
let loaderChannel;
function registerESMLoader() {
if (process.env.PW_DISABLE_TS_ESM)
return true;
if (loaderChannel)
return true;
const register = require("node:module").register;
if (!register)
return false;
const { port1, port2 } = new MessageChannel();
register(import_url.default.pathToFileURL(require.resolve("../transform/esmLoader")), {
data: { port: port2 },
transferList: [port2]
});
loaderChannel = createPortTransport(port1);
return true;
}
function createPortTransport(port) {
return new import_portTransport.PortTransport(port, async (method, params) => {
if (method === "pushToCompilationCache")
(0, import_compilationCache.addToCompilationCache)(params.cache);
});
}
async function startCollectingFileDeps() {
if (!loaderChannel)
return;
await loaderChannel.send("startCollectingFileDeps", {});
}
async function stopCollectingFileDeps(file) {
if (!loaderChannel)
return;
await loaderChannel.send("stopCollectingFileDeps", { file });
}
async function incorporateCompilationCache() {
if (!loaderChannel)
return;
const result = await loaderChannel.send("getCompilationCache", {});
(0, import_compilationCache.addToCompilationCache)(result.cache);
}
async function configureESMLoader() {
if (!loaderChannel)
return;
await loaderChannel.send("setSingleTSConfig", { tsconfig: (0, import_transform.singleTSConfig)() });
await loaderChannel.send("addToCompilationCache", { cache: (0, import_compilationCache.serializeCompilationCache)() });
}
async function configureESMLoaderTransformConfig() {
if (!loaderChannel)
return;
await loaderChannel.send("setSingleTSConfig", { tsconfig: (0, import_transform.singleTSConfig)() });
await loaderChannel.send("setTransformConfig", { config: (0, import_transform.transformConfig)() });
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
configureESMLoader,
configureESMLoaderTransformConfig,
incorporateCompilationCache,
registerESMLoader,
startCollectingFileDeps,
stopCollectingFileDeps
});
+49
View File
@@ -0,0 +1,49 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var expectBundle_exports = {};
__export(expectBundle_exports, {
EXPECTED_COLOR: () => EXPECTED_COLOR,
INVERTED_COLOR: () => INVERTED_COLOR,
RECEIVED_COLOR: () => RECEIVED_COLOR,
asymmetricMatchers: () => asymmetricMatchers,
expect: () => expect,
matcherUtils: () => matcherUtils,
mock: () => mock,
printReceived: () => printReceived
});
module.exports = __toCommonJS(expectBundle_exports);
const expect = require("./expectBundleImpl").expect;
const mock = require("./expectBundleImpl").mock;
const asymmetricMatchers = require("./expectBundleImpl").asymmetricMatchers;
const matcherUtils = require("./expectBundleImpl").matcherUtils;
const EXPECTED_COLOR = require("./expectBundleImpl").EXPECTED_COLOR;
const INVERTED_COLOR = require("./expectBundleImpl").INVERTED_COLOR;
const RECEIVED_COLOR = require("./expectBundleImpl").RECEIVED_COLOR;
const printReceived = require("./expectBundleImpl").printReceived;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
EXPECTED_COLOR,
INVERTED_COLOR,
RECEIVED_COLOR,
asymmetricMatchers,
expect,
matcherUtils,
mock,
printReceived
});
+389
View File
@@ -0,0 +1,389 @@
"use strict";var Fh=Object.create;var $n=Object.defineProperty;var jh=Object.getOwnPropertyDescriptor;var Bh=Object.getOwnPropertyNames;var qh=Object.getPrototypeOf,Hh=Object.prototype.hasOwnProperty;var Uh=(e,t,n)=>t in e?$n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var R=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Gh=(e,t)=>{for(var n in t)$n(e,n,{get:t[n],enumerable:!0})},Tu=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Bh(t))!Hh.call(e,s)&&s!==n&&$n(e,s,{get:()=>t[s],enumerable:!(r=jh(t,s))||r.enumerable});return e};var ie=(e,t,n)=>(n=e!=null?Fh(qh(e)):{},Tu(t||!e||!e.__esModule?$n(n,"default",{value:e,enumerable:!0}):n,e)),Wh=e=>Tu($n({},"__esModule",{value:!0}),e);var ae=(e,t,n)=>Uh(e,typeof t!="symbol"?t+"":t,n);var $u=R((av,xu)=>{"use strict";xu.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var oo=R((cv,Nu)=>{var In=$u(),Iu={};for(let e of Object.keys(In))Iu[In[e]]=e;var P={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};Nu.exports=P;for(let e of Object.keys(P)){if(!("channels"in P[e]))throw new Error("missing channels property: "+e);if(!("labels"in P[e]))throw new Error("missing channel labLine truncated
`:`
`)+n,s=r+1,r=e.indexOf(`
`,s)}while(r!==-1);return o+=e.substr(s),o};Yu.exports={stringReplaceAll:sg,stringEncaseCRLFWithFirstIndex:og}});var ta=R((dv,ea)=>{"use strict";var ig=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Xu=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,ug=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,ag=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,cg=new Map([["n",`
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function Zu(e){let t=e[0]==="u",n=e[1]==="{";return t&&!n&&e.length===5||e[0]==="x"&&e.length===3?String.fromCharCode(parseInt(e.slice(1),16)):t&&n?String.fromCodePoint(parseInt(e.slice(2,-1),16)):cg.get(e)||e}function lg(e,t){let n=[],r=t.trim().split(/\s*,\s*/g),s;for(let o of r){let i=Number(o);if(!Number.isNaN(i))n.push(i);else if(s=o.match(ug))n.push(s[2].replace(ag,(u,a,l)=>a?Zu(a):l));else throw new Error(`Invalid Chalk template style argument: ${o} (in style '${e}')`)}return n}function fg(e){Xu.lastIndex=0;let t=[],n;for(;(n=Xu.exec(e))!==null;){let r=n[1];if(n[2]){let s=lg(r,n[2]);t.push([r].concat(s))}else t.push([r])}return t}function Ju(e,t){let n={};for(let s of t)for(let o of s.styles)n[o[0]]=s.inverse?null:o.slice(1);let r=e;for(let[s,o]of Object.entries(n))if(Array.isArray(o)){if(!(s in r))throw new Error(`Unknown Chalk style: ${s}`);r=o.length>0?r[s](...o):r[s]}return r}ea.exports=(e,t)=>{let n=[],r=[],s=[];if(t.replace(ig,(o,i,u,a,l,c)=>{if(i)s.push(Zu(i));else if(a){let f=s.join("");s=[],r.push(n.length===0?f:Ju(e,n)(f)),n.push({inverse:u,styles:fg(a)})}else if(l){if(n.length===0)throw new Error("Found extraneous } in Chalk template literal");r.push(Ju(e,n)(s.join(""))),s=[],n.pop()}else s.push(c)}),r.push(s.join("")),n.length>0){let o=`Chalk template literal is missing ${n.length} closing bracket${n.length===1?"":"s"} (\`}\`)`;throw new Error(o)}return r.join("")}});var zt=R((yv,ua)=>{"use strict";var Nn=Uu(),{stdout:fo,stderr:po}=Ku(),{stringReplaceAll:pg,stringEncaseCRLFWithFirstIndex:hg}=Qu(),{isArray:br}=Array,ra=["ansi","ansi","ansi256","ansi16m"],Vt=Object.create(null),gg=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let n=fo?fo.level:0;e.level=t.level===void 0?n:t.level},ho=class{constructor(t){return sa(t)}},sa=e=>{let t={};return gg(t,e),t.template=(...n)=>ia(t.template,...n),Object.setPrototypeOf(t,Er.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=ho,t.template};function Er(e){return sa(e)}for(let[e,t]of Object.entries(Nn))Vt[e]={get(){let n=vr(this,go(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:n}),n}};Vt.visible={get(){let e=vr(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};var oa=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let e of oa)Vt[e]={get(){let{level:t}=this;return function(...n){let r=go(Nn.color[ra[t]][e](...n),Nn.color.close,this._styler);return vr(this,r,this._isEmpty)}}};for(let e of oa){let t="bg"+e[0].toUpperCase()+e.slice(1);Vt[t]={get(){let{level:n}=this;return function(...r){let s=go(Nn.bgColor[ra[n]][e](...r),Nn.bgColor.close,this._styler);return vr(this,s,this._isEmpty)}}}}var mg=Object.defineProperties(()=>{},{...Vt,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),go=(e,t,n)=>{let r,s;return n===void 0?(r=e,s=t):(r=n.openAll+e,s=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:s,parent:n}},vr=(e,t,n)=>{let r=(...s)=>br(s[0])&&br(s[0].raw)?na(r,ia(r,...s)):na(r,s.length===1?""+s[0]:s.join(" "));return Object.setPrototypeOf(r,mg),r._generator=e,r._styler=t,r._isEmpty=n,r},na=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let n=e._styler;if(n===void 0)return t;let{openAll:r,closeAll:s}=n;if(t.indexOf("\x1B")!==-1)for(;n!==void 0;)t=pg(t,n.close,n.open),n=n.parent;let o=t.indexOf(`
`);return o!==-1&&(t=hg(t,s,r,o)),r+t+s},lo,ia=(e,...t)=>{let[n]=t;if(!br(n)||!br(n.raw))return t.join(" ");let r=t.slice(1),s=[n.raw[0]];for(let o=1;o<n.length;o++)s.push(String(r[o-1]).replace(/[{}\\]/g,"\\$&"),String(n.raw[o]));return lo===void 0&&(lo=ta()),lo(e,s.join(""))};Object.defineProperties(Er.prototype,Vt);var _r=Er();_r.supportsColor=fo;_r.stderr=Er({level:po?po.level:0});_r.stderr.supportsColor=po;ua.exports=_r});var ot=R(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.getType=dg;Pn.isPrimitive=void 0;function dg(e){if(e===void 0)return"undefined";if(e===null)return"null";if(Array.isArray(e))return"array";if(typeof e=="boolean")return"boolean";if(typeof e=="function")return"function";if(typeof e=="number")return"number";if(typeof e=="string")return"string";if(typeof e=="bigint")return"bigint";if(typeof e=="object"){if(e!=null){if(e.constructor===RegExp)return"regexp";if(e.constructor===Map)return"map";if(e.constructor===Set)return"set";if(e.constructor===Date)return"date"}return"object"}else if(typeof e=="symbol")return"symbol";throw new Error(`value of unknown type: ${e}`)}var yg=e=>Object(e)!==e;Pn.isPrimitive=yg});var fa=R((Ev,la)=>{"use strict";var aa=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,ca=(e=0)=>(t,n,r)=>`\x1B[${38+e};2;${t};${n};${r}m`;function bg(){let e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(let[n,r]of Object.entries(t)){for(let[s,o]of Object.entries(r))t[s]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},r[s]=t[s],e.set(o[0],o[1]);Object.defineProperty(t,n,{value:r,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="\x1B[39m",t.bgColor.close="\x1B[49m",t.color.ansi256=aa(),t.color.ansi16m=ca(),t.bgColor.ansi256=aa(10),t.bgColor.ansi16m=ca(10),Object.defineProperties(t,{rgbToAnsi256:{value:(n,r,s)=>n===r&&r===s?n<8?16:n>248?231:Math.round((n-8)/247*24)+232:16+36*Math.round(n/255*5)+6*Math.round(r/255*5)+Math.round(s/255*5),enumerable:!1},hexToRgb:{value:n=>{let r=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(n.toString(16));if(!r)return[0,0,0];let{colorString:s}=r.groups;s.length===3&&(s=s.split("").map(i=>i+i).join(""));let o=Number.parseInt(s,16);return[o>>16&255,o>>8&255,o&255]},enumerable:!1},hexToAnsi256:{value:n=>t.rgbToAnsi256(...t.hexToRgb(n)),enumerable:!1}}),t}Object.defineProperty(la,"exports",{enumerable:!0,get:bg})});var Ln=R(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.printIteratorEntries=vg;Kt.printIteratorValues=_g;Kt.printListItems=Rg;Kt.printObjectProperties=Og;var Eg=(e,t)=>{let n=Object.keys(e),r=t!==null?n.sort(t):n;return Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(s=>{Object.getOwnPropertyDescriptor(e,s).enumerable&&r.push(s)}),r};function vg(e,t,n,r,s,o,i=": "){let u="",a=0,l=e.next();if(!l.done){u+=t.spacingOuter;let c=n+t.indent;for(;!l.done;){if(u+=c,a++===t.maxWidth){u+="\u2026";break}let f=o(l.value[0],t,c,r,s),p=o(l.value[1],t,c,r,s);u+=f+i+p,l=e.next(),l.done?t.min||(u+=","):u+=`,${t.spacingInner}`}u+=t.spacingOuter+n}return u}function _g(e,t,n,r,s,o){let i="",u=0,a=e.next();if(!a.done){i+=t.spacingOuter;let l=n+t.indent;for(;!a.done;){if(i+=l,u++===t.maxWidth){i+="\u2026";break}i+=o(a.value,t,l,r,s),a=e.next(),a.done?t.min||(i+=","):i+=`,${t.spacingInner}`}i+=t.spacingOuter+n}return i}function Rg(e,t,n,r,s,o){let i="";if(e.length){i+=t.spacingOuter;let u=n+t.indent;for(let a=0;a<e.length;a++){if(i+=u,a===t.maxWidth){i+="\u2026";break}a in e&&(i+=o(e[a],t,u,r,s)),a<e.length-1?i+=`,${t.spacingInner}`:t.min||(i+=",")}i+=t.spacingOuter+n}return i}function Og(e,t,n,r,s,o){let i="",u=Eg(e,t.compareKeys);if(u.length){i+=t.spacingOuter;let a=n+t.indent;for(let l=0;l<u.length;l++){let c=u[l],f=o(c,t,a,r,s),p=o(e[c],t,a,r,s);i+=`${a+f}: ${p}`,l<u.length-1?i+=`,${t.spacingInner}`:t.min||(i+=",")}i+=t.spacingOuter+n}return i}});var ma=R(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.test=it.serialize=it.default=void 0;var pa=Ln(),mo=globalThis["jest-symbol-do-not-touch"]||globalThis.Symbol,Cg=typeof mo=="function"&&mo.for?mo.for("jest.asymmetricMatcher"):1267621,Rr=" ",ha=(e,t,n,r Line truncated
`)!==-1&&(f=n.spacingOuter+u+f+n.spacingOuter+r),f=`{${f}}`),`${n.spacingInner+r+a.prop.open+l+a.prop.close}=${a.value.open}${f}${a.value.close}`}).join("")};Re.printProps=Lg;var kg=(e,t,n,r,s,o)=>e.map(i=>t.spacingOuter+n+(typeof i=="string"?Oa(i,t):o(i,t,n,r,s))).join("");Re.printChildren=kg;var Oa=(e,t)=>{let n=t.colors.content;return n.open+(0,Ra.default)(e)+n.close};Re.printText=Oa;var Dg=(e,t)=>{let n=t.colors.comment;return`${n.open}<!--${(0,Ra.default)(e)}-->${n.close}`};Re.printComment=Dg;var Fg=(e,t,n,r,s)=>{let o=r.colors.tag;return`${o.open}<${e}${t&&o.close+t+r.spacingOuter+s+o.open}${n?`>${o.close}${n}${r.spacingOuter}${s}${o.open}</${e}`:`${t&&!r.min?"":" "}/`}>${o.close}`};Re.printElement=Fg;var jg=(e,t)=>{let n=t.colors.tag;return`${n.open}<${e}${n.close} \u2026${n.open} />${n.close}`};Re.printElementAsLeaf=jg});var Ta=R(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.test=at.serialize=at.default=void 0;var Yt=Or(),Bg=1,Ca=3,Sa=8,wa=11,qg=/^((HTML|SVG)\w*)?Element$/,Hg=e=>{try{return typeof e.hasAttribute=="function"&&e.hasAttribute("is")}catch{return!1}},Ug=e=>{let t=e.constructor.name,{nodeType:n,tagName:r}=e,s=typeof r=="string"&&r.includes("-")||Hg(e);return n===Bg&&(qg.test(t)||s)||n===Ca&&t==="Text"||n===Sa&&t==="Comment"||n===wa&&t==="DocumentFragment"},Aa=e=>{var t;return((t=e==null?void 0:e.constructor)==null?void 0:t.name)&&Ug(e)};at.test=Aa;function Gg(e){return e.nodeType===Ca}function Wg(e){return e.nodeType===Sa}function bo(e){return e.nodeType===wa}var Ma=(e,t,n,r,s,o)=>{if(Gg(e))return(0,Yt.printText)(e.data,t);if(Wg(e))return(0,Yt.printComment)(e.data,t);let i=bo(e)?"DocumentFragment":e.tagName.toLowerCase();return++r>t.maxDepth?(0,Yt.printElementAsLeaf)(i,t):(0,Yt.printElement)(i,(0,Yt.printProps)(bo(e)?[]:Array.from(e.attributes,u=>u.name).sort(),bo(e)?{}:Array.from(e.attributes).reduce((u,a)=>(u[a.name]=a.value,u),{}),t,n+t.indent,r,s,o),(0,Yt.printChildren)(Array.prototype.slice.call(e.childNodes||e.children),t,n+t.indent,r,s,o),t,n)};at.serialize=Ma;var Vg={serialize:Ma,test:Aa},zg=Vg;at.default=zg});var Pa=R(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.test=ct.serialize=ct.default=void 0;var kn=Ln(),Kg="@@__IMMUTABLE_ITERABLE__@@",Yg="@@__IMMUTABLE_LIST__@@",Qg="@@__IMMUTABLE_KEYED__@@",Xg="@@__IMMUTABLE_MAP__@@",xa="@@__IMMUTABLE_ORDERED__@@",Jg="@@__IMMUTABLE_RECORD__@@",Zg="@@__IMMUTABLE_SEQ__@@",em="@@__IMMUTABLE_SET__@@",tm="@@__IMMUTABLE_STACK__@@",Qt=e=>`Immutable.${e}`,Cr=e=>`[${e}]`,Dn=" ",$a="\u2026",nm=(e,t,n,r,s,o,i)=>++r>t.maxDepth?Cr(Qt(i)):`${Qt(i)+Dn}{${(0,kn.printIteratorEntries)(e.entries(),t,n,r,s,o)}}`;function rm(e){let t=0;return{next(){if(t<e._keys.length){let n=e._keys[t++];return{done:!1,value:[n,e.get(n)]}}return{done:!0,value:void 0}}}}var sm=(e,t,n,r,s,o)=>{let i=Qt(e._name||"Record");return++r>t.maxDepth?Cr(i):`${i+Dn}{${(0,kn.printIteratorEntries)(rm(e),t,n,r,s,o)}}`},om=(e,t,n,r,s,o)=>{let i=Qt("Seq");return++r>t.maxDepth?Cr(i):e[Qg]?`${i+Dn}{${e._iter||e._object?(0,kn.printIteratorEntries)(e.entries(),t,n,r,s,o):$a}}`:`${i+Dn}[${e._iter||e._array||e._collection||e._iterable?(0,kn.printIteratorValues)(e.values(),t,n,r,s,o):$a}]`},Eo=(e,t,n,r,s,o,i)=>++r>t.maxDepth?Cr(Qt(i)):`${Qt(i)+Dn}[${(0,kn.printIteratorValues)(e.values(),t,n,r,s,o)}]`,Ia=(e,t,n,r,s,o)=>e[Xg]?nm(e,t,n,r,s,o,e[xa]?"OrderedMap":"Map"):e[Yg]?Eo(e,t,n,r,s,o,"List"):e[em]?Eo(e,t,n,r,s,o,e[xa]?"OrderedSet":"Set"):e[tm]?Eo(e,t,n,r,s,o,"Stack"):e[Zg]?om(e,t,n,r,s,o):sm(e,t,n,r,s,o);ct.serialize=Ia;var Na=e=>e&&(e[Kg]===!0||e[Jg]===!0);ct.test=Na;var im={serialize:Ia,test:Na},um=im;ct.default=um});var ka=R(Y=>{"use strict";var vo=Symbol.for("react.element"),_o=Symbol.for("react.portal"),Sr=Symbol.for("react.fragment"),wr=Symbol.for("react.strict_mode"),Ar=Symbol.for("react.profiler"),Mr=Symbol.for("react.provider"),Tr=Symbol.for("react.context"),am=Symbol.for("react.server_context"),xr=Symbol.for("react.forward_ref"),$r=Symbol.for("react.suspense"),Ir=Symbol.for("react.suspense_list"),Nr=Symbol.for("react.memo"),Pr=Symbol.for("react.lazy"),cm=Symbol.for("react.offscreen"),La;La=Symbol.for("react.module.reference");function Ie(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case vo:switch(e=e.type,e){case Sr:case Ar:case wr:case $r:case Ir:return e;default:switch(e=e&&e.$$typeof,e){case am:case Tr:case xr:case Pr:case Nr:case Mr:return e;default:return t}}case _o:return t}}}Y.ContextConsumer=Tr;Y.ContextProvider=Mr;Y.Element=vo;Y.ForwardRef=xr;Y.Fragment=Sr;Y.Lazy=Pr;Y.Memo=Nr;Y.Portal=_o;Y.Profiler=Ar;Y.StrictMode=wr;Y.Suspense=$r;Y.SuspenseList=Ir;Y.isAsyncMode=function(){return!1};Y.isConcurrentMode=function(){return!1};Y.isContextConsumer=function(e){return Ie(e)===Tr};Y.isContextProvider=function(e){return Ie(e)===Mr};Y.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===vo};Y.isForwardRef=function(e){return Ie(e)===xr};Y.isFragment=function(e){return Ie(e)===Sr};Y.isLazy=function(e){retu Line truncated
${a}`)},{edgeSpacing:n.spacingOuter,min:n.min,spacing:n.spacingInner},n.colors)}catch(u){throw new Dr(u.message,u.stack)}if(typeof i!="string")throw new Error(`pretty-format: Plugin must return type "string" but instead returned "${typeof i}".`);return i}function rc(e,t){for(let n=0;n<e.length;n++)try{if(e[n].test(t))return e[n]}catch(r){throw new Dr(r.message,r.stack)}return null}function pt(e,t,n,r,s,o){let i=rc(t.plugins,e);if(i!==null)return nc(i,e,t,n,r,s);let u=ec(e,t.printFunctionName,t.escapeRegex,t.escapeString);return u!==null?u:tc(e,t,n,r,s,o)}var So={comment:"gray",content:"reset",prop:"yellow",tag:"cyan",value:"green"},sc=Object.keys(So),Pm=e=>e,Ne=Pm({callToJSON:!0,compareKeys:void 0,escapeRegex:!1,escapeString:!0,highlight:!1,indent:2,maxDepth:1/0,maxWidth:1/0,min:!1,plugins:[],printBasicPrototype:!0,printFunctionName:!0,theme:So});et.DEFAULT_OPTIONS=Ne;function Lm(e){if(Object.keys(e).forEach(t=>{if(!Object.prototype.hasOwnProperty.call(Ne,t))throw new Error(`pretty-format: Unknown option "${t}".`)}),e.min&&e.indent!==void 0&&e.indent!==0)throw new Error('pretty-format: Options "min" and "indent" cannot be used together.');if(e.theme!==void 0){if(e.theme===null)throw new Error('pretty-format: Option "theme" must not be null.');if(typeof e.theme!="object")throw new Error(`pretty-format: Option "theme" must be of type "object" but instead received "${typeof e.theme}".`)}}var km=e=>sc.reduce((t,n)=>{let r=e.theme&&e.theme[n]!==void 0?e.theme[n]:So[n],s=r&&bm.default[r];if(s&&typeof s.close=="string"&&typeof s.open=="string")t[n]=s;else throw new Error(`pretty-format: Option "theme" has a key "${n}" whose value "${r}" is undefined in ansi-styles.`);return t},Object.create(null)),Dm=()=>sc.reduce((e,t)=>(e[t]={close:"",open:""},e),Object.create(null)),oc=e=>{var t;return(t=e==null?void 0:e.printFunctionName)!=null?t:Ne.printFunctionName},ic=e=>{var t;return(t=e==null?void 0:e.escapeRegex)!=null?t:Ne.escapeRegex},uc=e=>{var t;return(t=e==null?void 0:e.escapeString)!=null?t:Ne.escapeString},Ja=e=>{var t,n,r,s,o,i,u;return{callToJSON:(t=e==null?void 0:e.callToJSON)!=null?t:Ne.callToJSON,colors:e!=null&&e.highlight?km(e):Dm(),compareKeys:typeof(e==null?void 0:e.compareKeys)=="function"||(e==null?void 0:e.compareKeys)===null?e.compareKeys:Ne.compareKeys,escapeRegex:ic(e),escapeString:uc(e),indent:e!=null&&e.min?"":Fm((n=e==null?void 0:e.indent)!=null?n:Ne.indent),maxDepth:(r=e==null?void 0:e.maxDepth)!=null?r:Ne.maxDepth,maxWidth:(s=e==null?void 0:e.maxWidth)!=null?s:Ne.maxWidth,min:(o=e==null?void 0:e.min)!=null?o:Ne.min,plugins:(i=e==null?void 0:e.plugins)!=null?i:Ne.plugins,printBasicPrototype:(u=e==null?void 0:e.printBasicPrototype)!=null?u:!0,printFunctionName:oc(e),spacingInner:e!=null&&e.min?" ":`
`,spacingOuter:e!=null&&e.min?"":`
`}};function Fm(e){return new Array(e+1).join(" ")}function ac(e,t){if(t&&(Lm(t),t.plugins)){let r=rc(t.plugins,e);if(r!==null)return nc(r,e,Ja(t),"",0,[])}let n=ec(e,oc(t),ic(t),uc(t));return n!==null?n:tc(e,Ja(t),"",0,[])}var jm={AsymmetricMatcher:Em.default,DOMCollection:vm.default,DOMElement:_m.default,Immutable:Rm.default,ReactElement:Om.default,ReactTestComponent:Cm.default};et.plugins=jm;var Bm=ac;et.default=Bm});var Tt=R(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.cleanupSemantic=Pe.Diff=Pe.DIFF_INSERT=Pe.DIFF_EQUAL=Pe.DIFF_DELETE=void 0;var Xt=-1;Pe.DIFF_DELETE=Xt;var Mt=1;Pe.DIFF_INSERT=Mt;var we=0;Pe.DIFF_EQUAL=we;var Ue=class{constructor(t,n){ae(this,0);ae(this,1);this[0]=t,this[1]=n}};Pe.Diff=Ue;var qm=function(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),s=r,o=0;n<s;)e.substring(o,s)==t.substring(o,s)?(n=s,o=n):r=s,s=Math.floor((r-n)/2+n);return s},hc=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),s=r,o=0;n<s;)e.substring(e.length-s,e.length-o)==t.substring(t.length-s,t.length-o)?(n=s,o=n):r=s,s=Math.floor((r-n)/2+n);return s},cc=function(e,t){var n=e.length,r=t.length;if(n==0||r==0)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var s=Math.min(n,r);if(e==t)return s;for(var o=0,i=1;;){var u=e.substring(s-i),a=t.indexOf(u);if(a==-1)return o;i+=a,(a==0||e.substring(s-i)==t.substring(0,i))&&(o=i,i++)}},Hm=function(e){for(var t=!1,n=[],r=0,s=null,o=0,i=0,u=0,a=0,l=0;o<e.length;)e[o][0]==we?(n[r++]=o,i=a,u=l,a=0,l=0,s=e[o][1]):(e[o][0]==Mt?a+=e[o][1].length:l+=e[o][1].length,s&&s.length<=Math.max(i,u)&&s.length<=Math.max(a,l)&&(e.splice(n[r-1],0,new Ue(Xt,s)),e[n[r-1]+1][0]=Mt,r--,r--,o=r>0?n[r-1]:-1,i=0,u=0,a=0,l=0,s=null,t=!0)),o++;for(t&&gc(e),Um(e),o=1;o<e.length;){if(e[o-1][0]==Xt&&e[o][0]==Mt){var c=e[o-1][1],f=e[o][1],p=cc(c,f),m=cc(f,c);p>=m?(p>=c.length/2||p>=f.length/2)&&(e.splice(o,0,new Ue(we,f.substring(0,p))),e[o-1][1]=c.substring(0,c.length-p),e[o+1][1]=f.substring(p),o++):(m>=c.length/2||m>=f.length/2)&&(e.splice(o,0,new Ue(we,c.substring(0,m))),e[o-1][0]=Mt,e[o-1][1]=f.substring(0,f.length-m),e[o+1][0]=Xt,e[o+1][1]=c.substring(m),o++),o++}o++}};Pe.cleanupSemantic=Hm;var Um=function(e){function t(m,h){if(!m||!h)return 6;var d=m.charAt(m.length-1),v=h.charAt(0),O=d.match(lc),A=v.match(lc),w=O&&d.match(fc),M=A&&v.match(fc),T=w&&d.match(pc),B=M&&v.match(pc),G=T&&m.match(Gm),x=B&&h.match(Wm);return G||x?5:T||B?4:O&&!w&&M?3:w||M?2:O||A?1:0}for(var n=1;n<e.length-1;){if(e[n-1][0]==we&&e[n+1][0]==we){var r=e[n-1][1],s=e[n][1],o=e[n+1][1],i=hc(r,s);if(i){var u=s.substring(s.length-i);r=r.substring(0,r.length-i),s=u+s.substring(0,s.length-i),o=u+o}for(var a=r,l=s,c=o,f=t(r,s)+t(s,o);s.charAt(0)===o.charAt(0);){r+=s.charAt(0),s=s.substring(1)+o.charAt(0),o=o.substring(1);var p=t(r,s)+t(s,o);p>=f&&(f=p,a=r,l=s,c=o)}e[n-1][1]!=a&&(a?e[n-1][1]=a:(e.splice(n-1,1),n--),e[n][1]=l,c?e[n+1][1]=c:(e.splice(n+1,1),n--))}n++}},lc=/[^a-zA-Z0-9]/,fc=/\s/,pc=/[\r\n]/,Gm=/\n\r?\n$/,Wm=/^\r?\n\r?\n/,gc=function(e){e.push(new Ue(we,""));for(var t=0,n=0,r=0,s="",o="",i;t<e.length;)switch(e[t][0]){case Mt:r++,o+=e[t][1],t++;break;case Xt:n++,s+=e[t][1],t++;break;case we:n+r>1?(n!==0&&r!==0&&(i=qm(o,s),i!==0&&(t-n-r>0&&e[t-n-r-1][0]==we?e[t-n-r-1][1]+=o.substring(0,i):(e.splice(0,0,new Ue(we,o.substring(0,i))),t++),o=o.substring(i),s=s.substring(i)),i=hc(o,s),i!==0&&(e[t][1]=o.substring(o.length-i)+e[t][1],o=o.substring(0,o.length-i),s=s.substring(0,s.length-i))),t-=n+r,e.splice(t,n+r),s.length&&(e.splice(t,0,new Ue(Xt,s)),t++),o.length&&(e.splice(t,0,new Ue(Mt,o)),t++),t++):t!==0&&e[t-1][0]==we?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,r=0,n=0,s="",o="";break}e[e.length-1][1]===""&&e.pop();var u=!1;for(t=1;t<e.length-1;)e[t-1][0]==we&&e[t+1][0]==we&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)==e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),u=!0):e[t][1].substring(0,e[t+1][1].length)==e[t+1][1]&&(e[t-1][1]+=e[t+1][1],e[t][1]=e[t][1].substring(e[t+1][1].length)+e[t+1][1],e.splice(t+1,1),u=!0)),t++;u&&gc(e)}});var mc=R(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.SIMILAR_MESSAGE=Jt.NO_DIFF_MESSAGE=void 0;var Vm="Compared values have no visual difference.";Jt.NO_DIFF_MESSAGE=Vm;var zm="Compared values serialize to the same structure.\nPrinting internal object structure without calling `toJSON` instead.";Jt.SIMILAR_MESSAGE=zm});var To=R(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});Mo.default=Xm;var Bn="diff-sequences",be=0,qn=(e,t,n,r,s)=>{let o=0;for(;e<t&&n<r&&s(e,n);)e+=1,n+=1,o+=1;return o},Hn=(e,t,n,r,s)=>{let o=0;for(;e<=t&&n<=r&&s(t,r);)t-=1,r-=1,o+=1;return o},wo=(e,t,n,r,s,o,i)=>{let u=0,a=-e,l=o[u],c=l;o[u]+=qn(l+1,t,r+l-a+1,n,s);let f=e<i?e:i;for(u+=1,a+=2;u<=f;u+=1,a+=2){if(u!==e&&c<o[u])l=o[u];else if(l=c+1,t<=l)retu Line truncated
`)};Zt.joinAlignedDiffsNoExpand=Zm;var ed=(e,t)=>e.map((n,r,s)=>{let o=n[1],i=r===0||r===s.length-1;switch(n[0]){case xt.DIFF_DELETE:return vc(o,i,t);case xt.DIFF_INSERT:return _c(o,i,t);default:return Rc(o,i,t)}}).join(`
`);Zt.joinAlignedDiffsExpand=ed});var Fr=R(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.normalizeDiffOptions=en.noColor=void 0;var Un=td(zt());function td(e){return e&&e.__esModule?e:{default:e}}var $o=e=>e;en.noColor=$o;var Cc=5,Sc={aAnnotation:"Expected",aColor:Un.default.green,aIndicator:"-",bAnnotation:"Received",bColor:Un.default.red,bIndicator:"+",changeColor:Un.default.inverse,changeLineTrailingSpaceColor:$o,commonColor:Un.default.dim,commonIndicator:" ",commonLineTrailingSpaceColor:$o,compareKeys:void 0,contextLines:Cc,emptyFirstOrLastLinePlaceholder:"",expand:!0,includeChangeCounts:!1,omitAnnotationLines:!1,patchColor:Un.default.yellow},nd=e=>e&&typeof e=="function"?e:Sc.compareKeys,rd=e=>typeof e=="number"&&Number.isSafeInteger(e)&&e>=0?e:Cc,sd=(e={})=>({...Sc,...e,compareKeys:nd(e.compareKeys),contextLines:rd(e.contextLines)});en.normalizeDiffOptions=sd});var Po=R(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.printDiffLines=Ge.diffLinesUnified2=Ge.diffLinesUnified=Ge.diffLinesRaw=void 0;var od=id(To()),Oe=Tt(),wc=Oc(),Ac=Fr();function id(e){return e&&e.__esModule?e:{default:e}}var tn=e=>e.length===1&&e[0].length===0,ud=e=>{let t=0,n=0;return e.forEach(r=>{switch(r[0]){case Oe.DIFF_DELETE:t+=1;break;case Oe.DIFF_INSERT:n+=1;break}}),{a:t,b:n}},ad=({aAnnotation:e,aColor:t,aIndicator:n,bAnnotation:r,bColor:s,bIndicator:o,includeChangeCounts:i,omitAnnotationLines:u},a)=>{if(u)return"";let l="",c="";if(i){let m=String(a.a),h=String(a.b),d=r.length-e.length,v=" ".repeat(Math.max(0,d)),O=" ".repeat(Math.max(0,-d)),A=h.length-m.length,w=" ".repeat(Math.max(0,A)),M=" ".repeat(Math.max(0,-A));l=`${v} ${n} ${w}${m}`,c=`${O} ${o} ${M}${h}`}let f=`${n} ${e}${l}`,p=`${o} ${r}${c}`;return`${t(f)}
${s(p)}
`},Io=(e,t)=>ad(t,ud(e))+(t.expand?(0,wc.joinAlignedDiffsExpand)(e,t):(0,wc.joinAlignedDiffsNoExpand)(e,t));Ge.printDiffLines=Io;var Mc=(e,t,n)=>Io(No(tn(e)?[]:e,tn(t)?[]:t),(0,Ac.normalizeDiffOptions)(n));Ge.diffLinesUnified=Mc;var cd=(e,t,n,r,s)=>{if(tn(e)&&tn(n)&&(e=[],n=[]),tn(t)&&tn(r)&&(t=[],r=[]),e.length!==n.length||t.length!==r.length)return Mc(e,t,s);let o=No(n,r),i=0,u=0;return o.forEach(a=>{switch(a[0]){case Oe.DIFF_DELETE:a[1]=e[i],i+=1;break;case Oe.DIFF_INSERT:a[1]=t[u],u+=1;break;default:a[1]=t[u],i+=1,u+=1}}),Io(o,(0,Ac.normalizeDiffOptions)(s))};Ge.diffLinesUnified2=cd;var No=(e,t)=>{let n=e.length,r=t.length,s=(l,c)=>e[l]===t[c],o=[],i=0,u=0,a=(l,c,f)=>{for(;i!==c;i+=1)o.push(new Oe.Diff(Oe.DIFF_DELETE,e[i]));for(;u!==f;u+=1)o.push(new Oe.Diff(Oe.DIFF_INSERT,t[u]));for(;l!==0;l-=1,i+=1,u+=1)o.push(new Oe.Diff(Oe.DIFF_EQUAL,t[u]))};for((0,od.default)(n,r,s,a);i!==n;i+=1)o.push(new Oe.Diff(Oe.DIFF_DELETE,e[i]));for(;u!==r;u+=1)o.push(new Oe.Diff(Oe.DIFF_INSERT,t[u]));return o};Ge.diffLinesRaw=No});var Tc=R(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.default=void 0;var ld=fd(To()),We=Tt();function fd(e){return e&&e.__esModule?e:{default:e}}var pd=(e,t)=>{let n=(u,a)=>e[u]===t[a],r=0,s=0,o=[],i=(u,a,l)=>{r!==a&&o.push(new We.Diff(We.DIFF_DELETE,e.slice(r,a))),s!==l&&o.push(new We.Diff(We.DIFF_INSERT,t.slice(s,l))),r=a+u,s=l+u,o.push(new We.Diff(We.DIFF_EQUAL,t.slice(l,s)))};return(0,ld.default)(e.length,t.length,n,i),r!==e.length&&o.push(new We.Diff(We.DIFF_DELETE,e.slice(r))),s!==t.length&&o.push(new We.Diff(We.DIFF_INSERT,t.slice(s))),o},hd=pd;jr.default=hd});var xc=R(qr=>{"use strict";Object.defineProperty(qr,"__esModule",{value:!0});qr.default=void 0;var Be=Tt(),gd=(e,t,n)=>t.reduce((r,s)=>r+(s[0]===Be.DIFF_EQUAL?s[1]:s[0]===e&&s[1].length!==0?n(s[1]):""),""),Br=class{constructor(t,n){ae(this,"op");ae(this,"line");ae(this,"lines");ae(this,"changeColor");this.op=t,this.line=[],this.lines=[],this.changeColor=n}pushSubstring(t){this.pushDiff(new Be.Diff(this.op,t))}pushLine(){this.lines.push(this.line.length!==1?new Be.Diff(this.op,gd(this.op,this.line,this.changeColor)):this.line[0][0]===this.op?this.line[0]:new Be.Diff(this.op,this.line[0][1])),this.line.length=0}isLineEmpty(){return this.line.length===0}pushDiff(t){this.line.push(t)}align(t){let n=t[1];if(n.includes(`
`)){let r=n.split(`
`),s=r.length-1;r.forEach((o,i)=>{i<s?(this.pushSubstring(o),this.pushLine()):o.length!==0&&this.pushSubstring(o)})}else this.pushDiff(t)}moveLinesTo(t){this.isLineEmpty()||this.pushLine(),t.push(...this.lines),this.lines.length=0}},Lo=class{constructor(t,n){ae(this,"deleteBuffer");ae(this,"insertBuffer");ae(this,"lines");this.deleteBuffer=t,this.insertBuffer=n,this.lines=[]}pushDiffCommonLine(t){this.lines.push(t)}pushDiffChangeLines(t){let n=t[1].length===0;(!n||this.deleteBuffer.isLineEmpty())&&this.deleteBuffer.pushDiff(t),(!n||this.insertBuffer.isLineEmpty())&&this.insertBuffer.pushDiff(t)}flushChangeLines(){this.deleteBuffer.moveLinesTo(this.lines),this.insertBuffer.moveLinesTo(this.lines)}align(t){let n=t[0],r=t[1];if(r.includes(`
`)){let s=r.split(`
`),o=s.length-1;s.forEach((i,u)=>{if(u===0){let a=new Be.Diff(n,i);this.deleteBuffer.isLineEmpty()&&this.insertBuffer.isLineEmpty()?(this.flushChangeLines(),this.pushDiffCommonLine(a)):(this.pushDiffChangeLines(a),this.flushChangeLines())}else u<o?this.pushDiffCommonLine(new Be.Diff(n,i)):i.length!==0&&this.pushDiffChangeLines(new Be.Diff(n,i))})}else this.pushDiffChangeLines(t)}getLines(){return this.flushChangeLines(),this.lines}},md=(e,t)=>{let n=new Br(Be.DIFF_DELETE,t),r=new Br(Be.DIFF_INSERT,t),s=new Lo(n,r);return e.forEach(o=>{switch(o[0]){case Be.DIFF_DELETE:n.align(o);break;case Be.DIFF_INSERT:r.align(o);break;default:s.align(o)}}),s.getLines()},dd=md;qr.default=dd});var Pc=R(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.diffStringsUnified=nn.diffStringsRaw=void 0;var ko=Tt(),$c=Po(),yd=Ic(Tc()),bd=Ic(xc()),Ed=Fr();function Ic(e){return e&&e.__esModule?e:{default:e}}var vd=(e,t)=>{if(t){let n=e.length-1;return e.some((r,s)=>r[0]===ko.DIFF_EQUAL&&(s!==n||r[1]!==`
`))}return e.some(n=>n[0]===ko.DIFF_EQUAL)},_d=(e,t,n)=>{if(e!==t&&e.length!==0&&t.length!==0){let r=e.includes(`
`)||t.includes(`
`),s=Nc(r?`${e}
`:e,r?`${t}
`:t,!0);if(vd(s,r)){let o=(0,Ed.normalizeDiffOptions)(n),i=(0,bd.default)(s,o.changeColor);return(0,$c.printDiffLines)(i,o)}}return(0,$c.diffLinesUnified)(e.split(`
`),t.split(`
`),n)};nn.diffStringsUnified=_d;var Nc=(e,t,n)=>{let r=(0,yd.default)(e,t);return n&&(0,ko.cleanupSemantic)(r),r};nn.diffStringsRaw=Nc});var Uc=R(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Object.defineProperty(Le,"DIFF_DELETE",{enumerable:!0,get:function(){return Hr.DIFF_DELETE}});Object.defineProperty(Le,"DIFF_EQUAL",{enumerable:!0,get:function(){return Hr.DIFF_EQUAL}});Object.defineProperty(Le,"DIFF_INSERT",{enumerable:!0,get:function(){return Hr.DIFF_INSERT}});Object.defineProperty(Le,"Diff",{enumerable:!0,get:function(){return Hr.Diff}});Le.diff=$d;Object.defineProperty(Le,"diffLinesRaw",{enumerable:!0,get:function(){return rn.diffLinesRaw}});Object.defineProperty(Le,"diffLinesUnified",{enumerable:!0,get:function(){return rn.diffLinesUnified}});Object.defineProperty(Le,"diffLinesUnified2",{enumerable:!0,get:function(){return rn.diffLinesUnified2}});Object.defineProperty(Le,"diffStringsRaw",{enumerable:!0,get:function(){return qc.diffStringsRaw}});Object.defineProperty(Le,"diffStringsUnified",{enumerable:!0,get:function(){return qc.diffStringsUnified}});var Lc=Rd(zt()),Do=ot(),$t=jn(),Hr=Tt(),Gn=mc(),rn=Po(),Bc=Fr(),qc=Pc();function Rd(e){return e&&e.__esModule?e:{default:e}}var Od=globalThis["jest-symbol-do-not-touch"]||globalThis.Symbol,Wn=(e,t)=>{let{commonColor:n}=(0,Bc.normalizeDiffOptions)(t);return n(e)},{AsymmetricMatcher:Cd,DOMCollection:Sd,DOMElement:wd,Immutable:Ad,ReactElement:Md,ReactTestComponent:Td}=$t.plugins,Hc=[Td,Md,wd,Sd,Ad,Cd],jo={plugins:Hc},xd={callToJSON:!1,maxDepth:10,plugins:Hc};function $d(e,t,n){if(Object.is(e,t))return Wn(Gn.NO_DIFF_MESSAGE,n);let r=(0,Do.getType)(e),s=r,o=!1;if(r==="object"&&typeof e.asymmetricMatch=="function"){if(e.$$typeof!==Od.for("jest.asymmetricMatcher")||typeof e.getExpectedType!="function")return null;s=e.getExpectedType(),o=s==="string"}if(s!==(0,Do.getType)(t))return` Comparing two different types of values. Expected ${Lc.default.green(s)} but received ${Lc.default.red((0,Do.getType)(t))}.`;if(o)return null;switch(r){case"string":return(0,rn.diffLinesUnified)(e.split(`
`),t.split(`
`),n);case"boolean":case"number":return Id(e,t,n);case"map":return Fo(kc(e),kc(t),n);case"set":return Fo(Dc(e),Dc(t),n);default:return Fo(e,t,n)}}function Id(e,t,n){let r=(0,$t.format)(e,jo),s=(0,$t.format)(t,jo);return r===s?Wn(Gn.NO_DIFF_MESSAGE,n):(0,rn.diffLinesUnified)(r.split(`
`),s.split(`
`),n)}function kc(e){return new Map(Array.from(e.entries()).sort())}function Dc(e){return new Set(Array.from(e.values()).sort())}function Fo(e,t,n){let r,s=!1;try{let i=Fc(jo,n);r=jc(e,t,i,n)}catch{s=!0}let o=Wn(Gn.NO_DIFF_MESSAGE,n);if(r===void 0||r===o){let i=Fc(xd,n);r=jc(e,t,i,n),r!==o&&!s&&(r=`${Wn(Gn.SIMILAR_MESSAGE,n)}
${r}`)}return r}function Fc(e,t){let{compareKeys:n}=(0,Bc.normalizeDiffOptions)(t);return{...e,compareKeys:n}}function jc(e,t,n,r){let s={...n,indent:0},o=(0,$t.format)(e,s),i=(0,$t.format)(t,s);if(o===i)return Wn(Gn.NO_DIFF_MESSAGE,r);{let u=(0,$t.format)(e,n),a=(0,$t.format)(t,n);return(0,rn.diffLinesUnified2)(u.split(`
`),a.split(`
`),o.split(`
`),i.split(`
`),r)}}});var Wc=R(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.default=void 0;var Bo=ot(),Gc=["map","array","object"],qo=class{constructor(t){ae(this,"object");ae(this,"type");if(this.object=t,this.type=(0,Bo.getType)(t),!Gc.includes(this.type))throw new Error(`Type ${this.type} is not support in Replaceable!`)}static isReplaceable(t,n){let r=(0,Bo.getType)(t),s=(0,Bo.getType)(n);return r===s&&Gc.includes(r)}forEach(t){if(this.type==="object"){let n=Object.getOwnPropertyDescriptors(this.object);[...Object.keys(n),...Object.getOwnPropertySymbols(n)].filter(r=>n[r].enumerable).forEach(r=>{t(this.object[r],r,this.object)})}else this.object.forEach(t)}get(t){return this.type==="map"?this.object.get(t):this.object[t]}set(t,n){this.type==="map"?this.object.set(t,n):this.object[t]=n}};Ur.default=qo});var zc=R(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.default=Gr;var Nd=jn(),Vc=[Array,Date,Float32Array,Float64Array,Int16Array,Int32Array,Int8Array,Map,Set,RegExp,Uint16Array,Uint32Array,Uint8Array,Uint8ClampedArray];typeof Buffer!="undefined"&&Vc.push(Buffer);var Pd=e=>Vc.includes(e.constructor),Ld=e=>e.constructor===Map;function Gr(e,t=new WeakMap){return typeof e!="object"||e===null?e:t.has(e)?t.get(e):Array.isArray(e)?Dd(e,t):Ld(e)?Fd(e,t):Pd(e)?e:Nd.plugins.DOMElement.test(e)?e.cloneNode(!0):kd(e,t)}function kd(e,t){let n=Object.create(Object.getPrototypeOf(e)),r={},s=e;do r=Object.assign({},Object.getOwnPropertyDescriptors(s),r);while((s=Object.getPrototypeOf(s))&&s!==Object.getPrototypeOf({}));t.set(e,n);let o=[...Object.keys(r),...Object.getOwnPropertySymbols(r)].reduce((i,u)=>{let a=r[u].enumerable;return i[u]={configurable:!0,enumerable:a,value:Gr(e[u],t),writable:!0},i},{});return Object.defineProperties(n,o)}function Dd(e,t){let n=new(Object.getPrototypeOf(e)).constructor(e.length),r=e.length;t.set(e,n);for(let s=0;s<r;s++)n[s]=Gr(e[s],t);return n}function Fd(e,t){let n=new Map;return t.set(e,n),e.forEach((r,s)=>{n.set(s,Gr(r,t))}),n}});var ze=R(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.printReceived=q.printExpected=q.printDiffOrStringify=q.pluralize=q.matcherHint=q.matcherErrorMessage=q.highlightTrailingWhitespace=q.getLabelPrinter=q.ensureNumbers=q.ensureNoExpected=q.ensureExpectedIsNumber=q.ensureExpectedIsNonNegativeInteger=q.ensureActualIsNumber=q.diff=q.SUGGEST_TO_CONTAIN_EQUAL=q.RECEIVED_COLOR=q.INVERTED_COLOR=q.EXPECTED_COLOR=q.DIM_COLOR=q.BOLD_WEIGHT=void 0;q.printWithType=zn;q.replaceMatchedToAsymmetricMatcher=sl;q.stringify=void 0;var Ve=Wo(zt()),gt=Uc(),Vn=ot(),Uo=jn(),Wr=Wo(Wc()),Kc=Wo(zc());function Wo(e){return e&&e.__esModule?e:{default:e}}var{AsymmetricMatcher:jd,DOMCollection:Bd,DOMElement:qd,Immutable:Hd,ReactElement:Ud,ReactTestComponent:Gd}=Uo.plugins,Yc=[Gd,Ud,qd,Bd,Hd,jd],sn=Ve.default.green;q.EXPECTED_COLOR=sn;var zr=Ve.default.red;q.RECEIVED_COLOR=zr;var el=Ve.default.inverse;q.INVERTED_COLOR=el;var Wd=Ve.default.bold;q.BOLD_WEIGHT=Wd;var ht=Ve.default.dim;q.DIM_COLOR=ht;var Qc=/\n/,Vd="\xB7",zd=["zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen"],Kd=Ve.default.dim("Looks like you wanted to test for object/array equality with the stricter `toContain` matcher. You probably need to use `toContainEqual` instead.");q.SUGGEST_TO_CONTAIN_EQUAL=Kd;var It=(e,t=10,n=10)=>{let s;try{s=(0,Uo.format)(e,{maxDepth:t,maxWidth:n,min:!0,plugins:Yc})}catch{s=(0,Uo.format)(e,{callToJSON:!1,maxDepth:t,maxWidth:n,min:!0,plugins:Yc})}return s.length>=1e4&&t>1?It(e,Math.floor(t/2),n):s.length>=1e4&&n>1?It(e,t,Math.floor(n/2)):s};q.stringify=It;var Yd=e=>e.replace(/\s+$/gm,Ve.default.inverse("$&"));q.highlightTrailingWhitespace=Yd;var tl=e=>e.replace(/\s+$/gm,t=>Vd.repeat(t.length)),Vr=e=>zr(tl(It(e)));q.printReceived=Vr;var on=e=>sn(tl(It(e)));q.printExpected=on;function zn(e,t,n){let r=(0,Vn.getType)(t),s=r!=="null"&&r!=="undefined"?`${e} has type: ${r}
`:"",o=`${e} has value: ${n(t)}`;return s+o}var Qd=(e,t,n)=>{if(typeof e!="undefined"){let r=(n?"":"[.not]")+t;throw new Error(Kn(Yn(r,void 0,"",n),"this matcher must not have an expected argument",zn("Expected",e,on)))}};q.ensureNoExpected=Qd;var nl=(e,t,n)=>{if(typeof e!="number"&&typeof e!="bigint"){let r=(n?"":"[.not]")+t;throw new Error(Kn(Yn(r,void 0,void 0,n),`${zr("received")} value must be a number or bigint`,zn("Received",e,Vr)))}};q.ensureActualIsNumber=nl;var rl=(e,t,n)=>{if(typeof e!="number"&&typeof e!="bigint"){let r=(n?"":"[.not]")+t;throw new Error(Kn(Yn(r,void 0,void 0,n),`${sn("expected")} value must be a number or bigint`,zn("Expected",e,on)))}};q.ensureExpectedIsNumber=rl;var Xd=(e,t,n,r)=>{nl(e,n,r),rl(t,n,r)};q.ensureNumbers=Xd;var Jd=(e,t,n)=>{if(typeof e!="number"||!Number.isSafeInteger(e)||e<0){let r=(n?"":"[.not]")+t;throw new Error(Kn(Yn(r,void 0,void 0,n),`${sn("expected")} value must be a non-negative integer`,zn("Expected",e,on)))}};q.ensureExpectedIsNonNegativeInteger=Jd;var Xc=(e,t,n)=>e.reduce((r,s)=>r+(s[0]===gt.DIFF_EQUAL?s[1]:s[0]!==t?"":n?el(s[1]):s[1]),""),Zd=(e,t)=>{let n=(0,Vn.getType)(e),r=(0,Vn.getType)(t);return n!==r?!1:(0,Vn.isPrimitive)(e)?typeof e=="string"&&typeof t=="string"&&e.length!==0&&t.length!==0&&(Qc.test(e)||Qc.test(t)):!(n==="date"||n==="function"||n==="regexp"||e instanceof Error&&t instanceof Error||r==="object"&&typeof t.asymmetricMatch=="function")},Jc=2e4,e1=(e,t,n,r,s)=>{if(typeof e=="string"&&typeof t=="string"&&e.length!==0&&t.length!==0&&e.length<=Jc&&t.length<=Jc&&e!==t){if(e.includes(`
`)||t.includes(`
`))return(0,gt.diffStringsUnified)(e,t,{aAnnotation:n,bAnnotation:r,changeLineTrailingSpaceColor:Ve.default.bgYellow,commonLineTrailingSpaceColor:Ve.default.bgYellow,emptyFirstOrLastLinePlaceholder:"\u21B5",expand:s,includeChangeCounts:!0});let a=(0,gt.diffStringsRaw)(e,t,!0),l=a.some(m=>m[0]===gt.DIFF_EQUAL),c=Go(n,r),f=c(n)+on(Xc(a,gt.DIFF_DELETE,l)),p=c(r)+Vr(Xc(a,gt.DIFF_INSERT,l));return`${f}
${p}`}if(Zd(e,t)){let{replacedExpected:a,replacedReceived:l}=sl(e,t,[],[]),c=(0,gt.diff)(a,l,{aAnnotation:n,bAnnotation:r,expand:s,includeChangeCounts:!0});if(typeof c=="string"&&c.includes(`- ${n}`)&&c.includes(`+ ${r}`))return c}let o=Go(n,r),i=o(n)+on(e),u=o(r)+(It(e)===It(t)?"serializes to the same string":Vr(t));return`${i}
${u}`};q.printDiffOrStringify=e1;var t1=(e,t)=>!(typeof e=="number"&&typeof t=="number"||typeof e=="bigint"&&typeof t=="bigint"||typeof e=="boolean"&&typeof t=="boolean");function sl(e,t,n,r){return ol((0,Kc.default)(e),(0,Kc.default)(t),n,r)}function ol(e,t,n,r){if(!Wr.default.isReplaceable(e,t))return{replacedExpected:e,replacedReceived:t};if(n.includes(e)||r.includes(t))return{replacedExpected:e,replacedReceived:t};n.push(e),r.push(t);let s=new Wr.default(e),o=new Wr.default(t);return s.forEach((i,u)=>{let a=o.get(u);if(Zc(i))i.asymmetricMatch(a)&&o.set(u,i);else if(Zc(a))a.asymmetricMatch(i)&&s.set(u,a);else if(Wr.default.isReplaceable(i,a)){let l=ol(i,a,n,r);s.set(u,l.replacedExpected),o.set(u,l.replacedReceived)}}),{replacedExpected:s.object,replacedReceived:o.object}}function Zc(e){return(0,Vn.getType)(e)==="object"&&typeof e.asymmetricMatch=="function"}var n1=(e,t,n)=>t1(e,t)?(0,gt.diff)(e,t,n):null;q.diff=n1;var r1=(e,t)=>`${zd[t]||t} ${e}${t===1?"":"s"}`;q.pluralize=r1;var Go=(...e)=>{let t=e.reduce((n,r)=>r.length>n?r.length:n,0);return n=>`${n}: ${" ".repeat(t-n.length)}`};q.getLabelPrinter=Go;var Kn=(e,t,n)=>`${e}
${Ve.default.bold("Matcher error")}: ${t}${typeof n=="string"?`
${n}`:""}`;q.matcherErrorMessage=Kn;var Yn=(e,t="received",n="expected",r={})=>{let{comment:s="",expectedColor:o=sn,isDirectExpectCall:i=!1,isNot:u=!1,promise:a="",receivedColor:l=zr,secondArgument:c="",secondArgumentColor:f=sn}=r,p="",m="expect";return!i&&t!==""&&(p+=ht(`${m}(`)+l(t),m=")"),a!==""&&(p+=ht(`${m}.`)+a,m=""),u&&(p+=`${ht(`${m}.`)}not`,m=""),e.includes(".")?m+=e:(p+=ht(`${m}.`)+e,m=""),n===""?m+="()":(p+=ht(`${m}(`)+o(n),c&&(p+=ht(", ")+f(c)),m=")"),s!==""&&(m+=` // ${s}`),m!==""&&(p+=ht(m)),p};q.matcherHint=Yn});var zo=R(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.equals=void 0;Xn.isA=cl;var al=(e,t,n,r)=>(n=n||[],Vo(e,t,[],[],n,r));Xn.equals=al;function Qn(e){return!!e&&cl("Function",e.asymmetricMatch)}function s1(e,t){let n=Qn(e),r=Qn(t);if(!(n&&r)){if(n)return e.asymmetricMatch(t);if(r)return t.asymmetricMatch(e)}}function Vo(e,t,n,r,s,o){let i=!0,u=s1(e,t);if(u!==void 0)return u;let a={equals:al};for(let d=0;d<s.length;d++){let v=s[d].call(a,e,t,s);if(v!==void 0)return v}if(e instanceof Error&&t instanceof Error)return e.message==t.message;if(Object.is(e,t))return!0;if(e===null||t===null)return e===t;let l=Object.prototype.toString.call(e);if(l!=Object.prototype.toString.call(t))return!1;switch(l){case"[object Boolean]":case"[object String]":case"[object Number]":return typeof e!=typeof t?!1:typeof e!="object"&&typeof t!="object"?Object.is(e,t):Object.is(e.valueOf(),t.valueOf());case"[object Date]":return+e==+t;case"[object RegExp]":return e.source===t.source&&e.flags===t.flags}if(typeof e!="object"||typeof t!="object")return!1;if(ul(e)&&ul(t))return e.isEqualNode(t);let c=n.length;for(;c--;){if(n[c]===e)return r[c]===t;if(r[c]===t)return!1}if(n.push(e),r.push(t),o&&l=="[object Array]"&&e.length!==t.length)return!1;let f=il(e,un),p,m=il(t,un);if(!o){for(let d=0;d!==m.length;++d)p=m[d],(Qn(t[p])||t[p]===void 0)&&!un(e,p)&&f.push(p);for(let d=0;d!==f.length;++d)p=f[d],(Qn(e[p])||e[p]===void 0)&&!un(t,p)&&m.push(p)}let h=f.length;if(m.length!==h)return!1;for(;h--;)if(p=f[h],o?i=un(t,p)&&Vo(e[p],t[p],n,r,s,o):i=(un(t,p)||Qn(e[p])||e[p]===void 0)&&Vo(e[p],t[p],n,r,s,o),!i)return!1;return n.pop(),r.pop(),i}function il(e,t){let n=[];for(let r in e)t(e,r)&&n.push(r);return n.concat(Object.getOwnPropertySymbols(e).filter(r=>Object.getOwnPropertyDescriptor(e,r).enumerable))}function un(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function cl(e,t){return Object.prototype.toString.apply(t)===`[object ${e}]`}function ul(e){return e!==null&&typeof e=="object"&&typeof e.nodeType=="number"&&typeof e.nodeName=="string"&&typeof e.isEqualNode=="function"}});var pl=R(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.isImmutableList=c1;mt.isImmutableOrderedKeyed=l1;mt.isImmutableOrderedSet=f1;mt.isImmutableRecord=p1;mt.isImmutableUnorderedKeyed=u1;mt.isImmutableUnorderedSet=a1;var ll="@@__IMMUTABLE_KEYED__@@",fl="@@__IMMUTABLE_SET__@@",o1="@@__IMMUTABLE_LIST__@@",Kr="@@__IMMUTABLE_ORDERED__@@",i1="@@__IMMUTABLE_RECORD__@@";function an(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function u1(e){return!!(e&&an(e)&&e[ll]&&!e[Kr])}function a1(e){return!!(e&&an(e)&&e[fl]&&!e[Kr])}function c1(e){return!!(e&&an(e)&&e[o1])}function l1(e){return!!(e&&an(e)&&e[ll]&&e[Kr])}function f1(e){return!!(e&&an(e)&&e[fl]&&e[Kr])}function p1(e){return!!(e&&an(e)&&e[i1])}});var vl=R(J=>{"use strict";Object.defineProperty(J,"__esModule",{value:!0});J.arrayBufferEquality=void 0;J.emptyObject=E1;J.typeEquality=J.subsetEquality=J.sparseArrayEquality=J.pathAsArray=J.partition=J.iterableEquality=J.isOneline=J.isError=J.getPath=J.getObjectSubset=J.getObjectKeys=void 0;var h1=ot(),cn=pl(),Ae=zo(),g1=globalThis["jest-symbol-do-not-touch"]||globalThis.Symbol,Qo=(e,t)=>!e||typeof e!="object"||e===Object.prototype?!1:Object.prototype.hasOwnProperty.call(e,t)||Qo(Object.getPrototypeOf(e),t),Yr=e=>[...Object.keys(e),...Object.getOwnPropertySymbols(e)];J.getObjectKeys=Yr;var dl=(e,t)=>{if(Array.isArray(t)||(t=El(t)),t.length){let n=t.length===1,r=t[0],s=e[r];if(!n&&s==null)return{hasEndProp:!1,lastTraversedObject:e,traversedPath:[]};let o=dl(s,t.slice(1));return o.lastTraversedObject===null&&(o.lastTraversedObject=e),o.traversedPath.unshift(r),n&&(o.endPropIsDefined=!(0,h1.isPrimitive)(e)&&r in e,o.hasEndProp=s!==void 0||o.endPropIsDefined,o.hasEndProp||o.traversedPath.shift()),o}return{lastTraversedObject:null,traversedPath:[],value:e}};J.getPath=dl;var Ko=(e,t,n=[],r=new WeakMap)=>{if(Array.isArray(e)){if(Array.isArray(t)&&t.length===e.length)return t.map((s,o)=>Ko(e[o],s,n))}else{if(e instanceof Date)return e;if(Yo(e)&&Yo(t)){if((0,Ae.equals)(e,t,[...n,Qr,Xo]))return t;let s={};if(r.set(e,s),Yr(e).filter(o=>Qo(t,o)).forEach(o=>{s[o]=r.has(e[o])?r.get(e[o]):Ko(e[o],t[o],n,r)}),Yr(s).length>0)return s}}return e};J.getObjectSubset=Ko;var yl=g1.iterator,hl=e=>!!(e!=null&&e[yl]),Qr=(e,t,n=[],r=[],s=[])=>{if(typeof e!="object"||typeof t!="object"||Array.isArray(e)||Array.isArray(Line truncated
GFS4: `),console.error(e)});se[ye]||(Fl=global[ye]||[],Bl(se,Fl),se.close=function(e){function t(n,r){return e.call(se,n,function(s){s||jl(),typeof r=="function"&&r.apply(this,arguments)})}return Object.defineProperty(t,ns,{value:e}),t}(se.close),se.closeSync=function(e){function t(n){e.apply(se,arguments),jl()}return Object.defineProperty(t,ns,{value:e}),t}(se.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Pt(se[ye]),require("assert").equal(se[ye].length,0)}));var Fl;global[ye]||Bl(global,se[ye]);ui.exports=oi(j1(se));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!se.__patched&&(ui.exports=oi(se),se.__patched=!0);function oi(e){D1(e),e.gracefulify=oi,e.createReadStream=T,e.createWriteStream=B;var t=e.readFile;e.readFile=n;function n(C,N,y){return typeof N=="function"&&(y=N,N=null),F(C,N,y);function F(k,W,b,E){return t(k,W,function(j){j&&(j.code==="EMFILE"||j.code==="ENFILE")?fn([F,[k,W,b],j,E||Date.now(),Date.now()]):typeof b=="function"&&b.apply(this,arguments)})}}var r=e.writeFile;e.writeFile=s;function s(C,N,y,F){return typeof y=="function"&&(F=y,y=null),k(C,N,y,F);function k(W,b,E,j,D){return r(W,b,E,function(H){H&&(H.code==="EMFILE"||H.code==="ENFILE")?fn([k,[W,b,E,j],H,D||Date.now(),Date.now()]):typeof j=="function"&&j.apply(this,arguments)})}}var o=e.appendFile;o&&(e.appendFile=i);function i(C,N,y,F){return typeof y=="function"&&(F=y,y=null),k(C,N,y,F);function k(W,b,E,j,D){return o(W,b,E,function(H){H&&(H.code==="EMFILE"||H.code==="ENFILE")?fn([k,[W,b,E,j],H,D||Date.now(),Date.now()]):typeof j=="function"&&j.apply(this,arguments)})}}var u=e.copyFile;u&&(e.copyFile=a);function a(C,N,y,F){return typeof y=="function"&&(F=y,y=0),k(C,N,y,F);function k(W,b,E,j,D){return u(W,b,E,function(H){H&&(H.code==="EMFILE"||H.code==="ENFILE")?fn([k,[W,b,E,j],H,D||Date.now(),Date.now()]):typeof j=="function"&&j.apply(this,arguments)})}}var l=e.readdir;e.readdir=f;var c=/^v[0-5]\./;function f(C,N,y){typeof N=="function"&&(y=N,N=null);var F=c.test(process.version)?function(b,E,j,D){return l(b,k(b,E,j,D))}:function(b,E,j,D){return l(b,E,k(b,E,j,D))};return F(C,N,y);function k(W,b,E,j){return function(D,H){D&&(D.code==="EMFILE"||D.code==="ENFILE")?fn([F,[W,b,E],D,j||Date.now(),Date.now()]):(H&&H.sort&&H.sort(),typeof E=="function"&&E.call(this,D,H))}}}if(process.version.substr(0,4)==="v0.8"){var p=F1(e);O=p.ReadStream,w=p.WriteStream}var m=e.ReadStream;m&&(O.prototype=Object.create(m.prototype),O.prototype.open=A);var h=e.WriteStream;h&&(w.prototype=Object.create(h.prototype),w.prototype.open=M),Object.defineProperty(e,"ReadStream",{get:function(){return O},set:function(C){O=C},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return w},set:function(C){w=C},enumerable:!0,configurable:!0});var d=O;Object.defineProperty(e,"FileReadStream",{get:function(){return d},set:function(C){d=C},enumerable:!0,configurable:!0});var v=w;Object.defineProperty(e,"FileWriteStream",{get:function(){return v},set:function(C){v=C},enumerable:!0,configurable:!0});function O(C,N){return this instanceof O?(m.apply(this,arguments),this):O.apply(Object.create(O.prototype),arguments)}function A(){var C=this;x(C.path,C.flags,C.mode,function(N,y){N?(C.autoClose&&C.destroy(),C.emit("error",N)):(C.fd=y,C.emit("open",y),C.read())})}function w(C,N){return this instanceof w?(h.apply(this,arguments),this):w.apply(Object.create(w.prototype),arguments)}function M(){var C=this;x(C.path,C.flags,C.mode,function(N,y){N?(C.destroy(),C.emit("error",N)):(C.fd=y,C.emit("open",y))})}function T(C,N){return new e.ReadStream(C,N)}function B(C,N){return new e.WriteStream(C,N)}var G=e.open;e.open=x;function x(C,N,y,F){return typeof y=="function"&&(F=y,y=null),k(C,N,y,F);function k(W,b,E,j,D){return G(W,b,E,function(H,Se){H&&(H.code==="EMFILE"||H.code==="ENFILE")?fn([k,[W,b,E,j],H,D||Date.now(),Date.now()]):typeof j=="function"&&j.apply(this,arguments)})}}return e}function fn(e){Pt("ENQUEUE",e[0].name,e[1]),se[ye].push(e),ii()}var ts;function jl(){for(var e=Date.now(),t=0;t<se[ye].length;++t)se[ye][t].length>2&&(se[ye][t][3]=e,se[ye][t][4]=e);ii()}function ii(){if(clearTimeout(ts),ts=void 0,se[ye].length!==0){var e=se[ye].shift(),t=e[0],n=e[1],r=e[2],s=e[3],o=e[4];if(s===void 0)Pt("RETRY",t.name,n),t.apply(null,n);else if(Date.now()-s>=6e4){Pt("TIMEOUT",t.name,n);var i=n.pop();typeof i=="function"&&i.call(null,r)}else{var u=Date.now()-o,a=Math.max(o-s,1),l=Math.min(a*1.2,100);u>=l?(Pt("RETRY",t.name,n),t.apply(null,n.concat([s]))):se[ye].push(e)}ts===void 0&&(ts=setTimeout(ii,0))}}});var Ul=R(ai=>{"use strict";Object.defineProperty(ai,"__esModule",{value:!0});ai.default=H1;function ql(){let e=q1(Jn());return ql=function(){return e},e}function Hl(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Hl=function(r){return r?n:t})(e)}function q1(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Hl(t);if(n&&n.ha Line truncated
${r.message}`,r}let n=e;for(;n=Object.getPrototypeOf(n);)typeof n.constructor=="function"&&n.constructor.call(t);return t.env=K1(),t.send=()=>!0,Object.defineProperty(t,"domain",{get(){return e.domain}}),t}});var Ql=R(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.default=ey;function Lt(){let e=J1(Jn());return Lt=function(){return e},e}var Q1=Kl(zl()),X1=Kl(ss());function Kl(e){return e&&e.__esModule?e:{default:e}}function Yl(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Yl=function(r){return r?n:t})(e)}function J1(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Yl(t);if(n&&n.has(e))return n.get(e);var r={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(r,o,i):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}var Z1=Object.keys(globalThis).filter(e=>e.startsWith("DTRACE"));function ey(e,t){e.process=(0,Q1.default)();let n=e.Symbol;return Object.defineProperties(e,{[n.for("jest-native-promise")]:{enumerable:!1,value:Promise,writable:!1},[n.for("jest-native-now")]:{enumerable:!1,value:e.Date.now.bind(e.Date),writable:!1},[n.for("jest-native-read-file")]:{enumerable:!1,value:Lt().readFileSync.bind(Lt()),writable:!1},[n.for("jest-native-write-file")]:{enumerable:!1,value:Lt().writeFileSync.bind(Lt()),writable:!1},[n.for("jest-native-exists-file")]:{enumerable:!1,value:Lt().existsSync.bind(Lt()),writable:!1},"jest-symbol-do-not-touch":{enumerable:!1,value:n,writable:!1}}),Z1.forEach(r=>{e[r]=function(...s){return globalThis[r].apply(this,s)}}),Object.assign(e,(0,X1.default)(t))}});var di=R(mi=>{"use strict";Object.defineProperty(mi,"__esModule",{value:!0});mi.default=ty;function ty(e){return e&&e.__esModule?e:{default:e}}});var Xl=R(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.default=ny;function ny(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}});var Jl=R(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.default=ry;function ry(e,t,n){e[t]=n}});var Zl=R(Ei=>{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});Ei.default=sy;function sy(e){switch(typeof e){case"function":if(e.name)return e.name;break;case"number":case"undefined":return`${e}`;case"string":return e}throw new Error(`Invalid first argument, ${e}. It must be a named class, named function, number, or string.`)}});var _i=R(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.default=oy;function oy(e){return e.replace(/\\(?![{}()+?.^$])/g,"/")}});var ef=R(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.default=iy;function iy(e){return new RegExp(e,"i")}});var Zn=R((v_,of)=>{"use strict";var uy=require("path"),Ke="\\\\/",tf=`[^${Ke}]`,tt="\\.",ay="\\+",cy="\\?",os="\\/",ly="(?=.)",nf="[^/]",Oi=`(?:${os}|$)`,rf=`(?:^|${os})`,Ci=`${tt}{1,2}${Oi}`,fy=`(?!${tt})`,py=`(?!${rf}${Ci})`,hy=`(?!${tt}{0,1}${Oi})`,gy=`(?!${Ci})`,my=`[^.${os}]`,dy=`${nf}*?`,sf={DOT_LITERAL:tt,PLUS_LITERAL:ay,QMARK_LITERAL:cy,SLASH_LITERAL:os,ONE_CHAR:ly,QMARK:nf,END_ANCHOR:Oi,DOTS_SLASH:Ci,NO_DOT:fy,NO_DOTS:py,NO_DOT_SLASH:hy,NO_DOTS_SLASH:gy,QMARK_NO_DOT:my,STAR:dy,START_ANCHOR:rf},yy={...sf,SLASH_LITERAL:`[${Ke}]`,QMARK:tf,STAR:`${tf}*?`,DOTS_SLASH:`${tt}{1,2}(?:[${Ke}]|$)`,NO_DOT:`(?!${tt})`,NO_DOTS:`(?!(?:^|[${Ke}])${tt}{1,2}(?:[${Ke}]|$))`,NO_DOT_SLASH:`(?!${tt}{0,1}(?:[${Ke}]|$))`,NO_DOTS_SLASH:`(?!${tt}{1,2}(?:[${Ke}]|$))`,QMARK_NO_DOT:`[^.${Ke}]`,START_ANCHOR:`(?:^|[${Ke}])`,END_ANCHOR:`(?:[${Ke}]|$)`},by={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};of.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:by,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHARLine truncated
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function Dp(e){return e[0]==="u"&&e.length===5||e[0]==="x"&&e.length===3?String.fromCharCode(parseInt(e.slice(1),16)):oE.get(e)||e}function iE(e,t){let n=[],r=t.trim().split(/\s*,\s*/g),s;for(let o of r)if(!isNaN(o))n.push(Number(o));else if(s=o.match(rE))n.push(s[2].replace(sE,(i,u,a)=>u?Dp(u):a));else throw new Error(`Invalid Chalk template style argument: ${o} (in style '${e}')`);return n}function uE(e){Lp.lastIndex=0;let t=[],n;for(;(n=Lp.exec(e))!==null;){let r=n[1];if(n[2]){let s=iE(r,n[2]);t.push([r].concat(s))}else t.push([r])}return t}function kp(e,t){let n={};for(let s of t)for(let o of s.styles)n[o[0]]=s.inverse?null:o.slice(1);let r=e;for(let s of Object.keys(n))if(Array.isArray(n[s])){if(!(s in r))throw new Error(`Unknown Chalk style: ${s}`);n[s].length>0?r=r[s].apply(r,n[s]):r=r[s]}return r}Fp.exports=(e,t)=>{let n=[],r=[],s=[];if(t.replace(nE,(o,i,u,a,l,c)=>{if(i)s.push(Dp(i));else if(a){let f=s.join("");s=[],r.push(n.length===0?f:kp(e,n)(f)),n.push({inverse:u,styles:uE(a)})}else if(l){if(n.length===0)throw new Error("Found extraneous } in Chalk template literal");r.push(kp(e,n)(s.join(""))),s=[],n.pop()}else s.push(c)}),r.push(s.join("")),n.length>0){let o=`Chalk template literal is missing ${n.length} closing bracket${n.length===1?"":"s"} (\`}\`)`;throw new Error(o)}return r.join("")}});var Gp=R((sR,pr)=>{"use strict";var lu=bp(),ce=xp(),cu=Pp().stdout,aE=jp(),qp=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),Hp=["ansi","ansi","ansi256","ansi16m"],Up=new Set(["gray"]),Sn=Object.create(null);function Bp(e,t){t=t||{};let n=cu?cu.level:0;e.level=t.level===void 0?n:t.level,e.enabled="enabled"in t?t.enabled:e.level>0}function fr(e){if(!this||!(this instanceof fr)||this.template){let t={};return Bp(t,e),t.template=function(){let n=[].slice.call(arguments);return fE.apply(null,[t.template].concat(n))},Object.setPrototypeOf(t,fr.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=fr,t.template}Bp(this,e)}qp&&(ce.blue.open="\x1B[94m");for(let e of Object.keys(ce))ce[e].closeRe=new RegExp(lu(ce[e].close),"g"),Sn[e]={get(){let t=ce[e];return Gs.call(this,this._styles?this._styles.concat(t):[t],this._empty,e)}};Sn.visible={get(){return Gs.call(this,this._styles||[],!0,"visible")}};ce.color.closeRe=new RegExp(lu(ce.color.close),"g");for(let e of Object.keys(ce.color.ansi))Up.has(e)||(Sn[e]={get(){let t=this.level;return function(){let r={open:ce.color[Hp[t]][e].apply(null,arguments),close:ce.color.close,closeRe:ce.color.closeRe};return Gs.call(this,this._styles?this._styles.concat(r):[r],this._empty,e)}}});ce.bgColor.closeRe=new RegExp(lu(ce.bgColor.close),"g");for(let e of Object.keys(ce.bgColor.ansi)){if(Up.has(e))continue;let t="bg"+e[0].toUpperCase()+e.slice(1);Sn[t]={get(){let n=this.level;return function(){let s={open:ce.bgColor[Hp[n]][e].apply(null,arguments),close:ce.bgColor.close,closeRe:ce.bgColor.closeRe};return Gs.call(this,this._styles?this._styles.concat(s):[s],this._empty,e)}}}}var cE=Object.defineProperties(()=>{},Sn);function Gs(e,t,n){let r=function(){return lE.apply(r,arguments)};r._styles=e,r._empty=t;let s=this;return Object.defineProperty(r,"level",{enumerable:!0,get(){return s.level},set(o){s.level=o}}),Object.defineProperty(r,"enabled",{enumerable:!0,get(){return s.enabled},set(o){s.enabled=o}}),r.hasGrey=this.hasGrey||n==="gray"||n==="grey",r.__proto__=cE,r}function lE(){let e=arguments,t=e.length,n=String(arguments[0]);if(t===0)return"";if(t>1)for(let s=1;s<t;s++)n+=" "+e[s];if(!this.enabled||this.level<=0||!n)return this._empty?"":n;let r=ce.dim.open;qp&&this.hasGrey&&(ce.dim.open="");for(let s of this._styles.slice().reverse())n=s.open+n.replace(s.closeRe,s.open)+s.close,n=n.replace(/\r?\n/g,`${s.close}$&${s.open}`);return ce.dim.open=r,n}function fE(e,t){if(!Array.isArray(t))return[].slice.call(arguments,1).join(" ");let n=[].slice.call(arguments,2),r=[t.raw[0]];for(let s=1;s<t.length;s++)r.push(String(n[s-1]).replace(/[{}\\]/g,"\\$&")),r.push(String(t.raw[s]));return aE(e,r.join(""))}Object.defineProperties(fr.prototype,Sn);pr.exports=fr();pr.exports.supportsColor=cu;pr.exports.default=pr.exports});var Jp=R(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.default=EE;hr.shouldHighlight=Xp;var Wp=sp(),Vp=gp(),pu=pE(ou(),!0);function Kp(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Kp=function(r){return r?n:t})(e)}function pE(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Kp(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&{}.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(r,o,i):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}vLine truncated
`):n+=s}return n}function Xp(e){return Yp.isColorSupported||e.forceColor}var fu;function bE(e){if(e){var t;return(t=fu)!=null||(fu=(0,pu.createColors)(!0)),fu}return Yp}function EE(e,t={}){if(e!==""&&Xp(t)){let n=gE(bE(t.forceColor));return yE(n,e)}else return e}{let e,t;hr.getChalk=({forceColor:n})=>{var r;if((r=e)!=null||(e=Gp()),n){var s;return(s=t)!=null||(t=new e.constructor({enabled:!0,level:1})),t}return e}}});var o0=R(Ws=>{"use strict";Object.defineProperty(Ws,"__esModule",{value:!0});Ws.codeFrameColumns=s0;Ws.default=SE;var Zp=Jp(),gu=vE(ou(),!0);function r0(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(r0=function(r){return r?n:t})(e)}function vE(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=r0(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&{}.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(r,o,i):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}var _E=typeof process=="object"&&(process.env.FORCE_COLOR==="0"||process.env.FORCE_COLOR==="false")?(0,gu.createColors)(!1):gu.default,e0=(e,t)=>n=>e(t(n)),hu;function RE(e){if(e){var t;return(t=hu)!=null||(hu=(0,gu.createColors)(!0)),hu}return _E}var t0=!1;function OE(e){return{gutter:e.gray,marker:e0(e.red,e.bold),message:e0(e.red,e.bold)}}var n0=/\r\n|[\n\r\u2028\u2029]/;function CE(e,t,n){let r=Object.assign({column:0,line:-1},e.start),s=Object.assign({},r,e.end),{linesAbove:o=2,linesBelow:i=3}=n||{},u=r.line,a=r.column,l=s.line,c=s.column,f=Math.max(u-(o+1),0),p=Math.min(t.length,l+i);u===-1&&(f=0),l===-1&&(p=t.length);let m=l-u,h={};if(m)for(let d=0;d<=m;d++){let v=d+u;if(!a)h[v]=!0;else if(d===0){let O=t[v-1].length;h[v]=[a,O-a+1]}else if(d===m)h[v]=[0,c];else{let O=t[v-d].length;h[v]=[0,O]}}else a===c?a?h[u]=[a,0]:h[u]=!0:h[u]=[a,c-a];return{start:f,end:p,markerLines:h}}function s0(e,t,n={}){let r=(n.highlightCode||n.forceColor)&&(0,Zp.shouldHighlight)(n),s=RE(n.forceColor),o=OE(s),i=(d,v)=>r?d(v):v,u=e.split(n0),{start:a,end:l,markerLines:c}=CE(t,u,n),f=t.start&&typeof t.start.column=="number",p=String(l).length,h=(r?(0,Zp.default)(e,n):e).split(n0,l).slice(a,l).map((d,v)=>{let O=a+1+v,w=` ${` ${O}`.slice(-p)} |`,M=c[O],T=!c[O+1];if(M){let B="";if(Array.isArray(M)){let G=d.slice(0,Math.max(M[0]-1,0)).replace(/[^\t]/g," "),x=M[1]||1;B=[`
`,i(o.gutter,w.replace(/\d/g," "))," ",G,i(o.marker,"^").repeat(x)].join(""),T&&n.message&&(B+=" "+i(o.message,n.message))}return[i(o.marker,">"),i(o.gutter,w),d.length>0?` ${d}`:"",B].join("")}else return` ${i(o.gutter,w)}${d.length>0?` ${d}`:""}`}).join(`
`);return n.message&&!f&&(h=`${" ".repeat(p+1)}${n.message}
${h}`),r?s.reset(h):h}function SE(e,t,n,r={}){if(!t0){t0=!0;let o="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(process.emitWarning)process.emitWarning(o,"DeprecationWarning");else{let i=new Error(o);i.name="DeprecationWarning",console.warn(new Error(o))}}return n=Math.max(n,0),s0(e,{start:{column:n,line:t}},r)}});var Vs=R(Fe=>{"use strict";Fe.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;Fe.find=(e,t)=>e.nodes.find(n=>n.type===t);Fe.exceedsLimit=(e,t,n=1,r)=>r===!1||!Fe.isInteger(e)||!Fe.isInteger(t)?!1:(Number(t)-Number(e))/Number(n)>=r;Fe.escapeNode=(e,t=0,n)=>{let r=e.nodes[t];r&&(n&&r.type===n||r.type==="open"||r.type==="close")&&r.escaped!==!0&&(r.value="\\"+r.value,r.escaped=!0)};Fe.encloseBrace=e=>e.type!=="brace"?!1:e.commas>>0+e.ranges>>0===0?(e.invalid=!0,!0):!1;Fe.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:e.commas>>0+e.ranges>>0===0||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1;Fe.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;Fe.reduce=e=>e.reduce((t,n)=>(n.type==="text"&&t.push(n.value),n.type==="range"&&(n.type="text"),t),[]);Fe.flatten=(...e)=>{let t=[],n=r=>{for(let s=0;s<r.length;s++){let o=r[s];if(Array.isArray(o)){n(o);continue}o!==void 0&&t.push(o)}return t};return n(e),t}});var zs=R((aR,u0)=>{"use strict";var i0=Vs();u0.exports=(e,t={})=>{let n=(r,s={})=>{let o=t.escapeInvalid&&i0.isInvalidBrace(s),i=r.invalid===!0&&t.escapeInvalid===!0,u="";if(r.value)return(o||i)&&i0.isOpenOrClose(r)?"\\"+r.value:r.value;if(r.value)return r.value;if(r.nodes)for(let a of r.nodes)u+=n(a);return u};return n(e)}});var c0=R((cR,a0)=>{"use strict";a0.exports=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var b0=R((lR,y0)=>{"use strict";var l0=c0(),Ft=(e,t,n)=>{if(l0(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(l0(t)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let r={relaxZeros:!0,...n};typeof r.strictZeros=="boolean"&&(r.relaxZeros=r.strictZeros===!1);let s=String(r.relaxZeros),o=String(r.shorthand),i=String(r.capture),u=String(r.wrap),a=e+":"+t+"="+s+o+i+u;if(Ft.cache.hasOwnProperty(a))return Ft.cache[a].result;let l=Math.min(e,t),c=Math.max(e,t);if(Math.abs(l-c)===1){let d=e+"|"+t;return r.capture?`(${d})`:r.wrap===!1?d:`(?:${d})`}let f=d0(e)||d0(t),p={min:e,max:t,a:l,b:c},m=[],h=[];if(f&&(p.isPadded=f,p.maxLen=String(p.max).length),l<0){let d=c<0?Math.abs(c):1;h=f0(d,Math.abs(l),p,r),l=p.a=0}return c>=0&&(m=f0(l,c,p,r)),p.negatives=h,p.positives=m,p.result=wE(h,m,r),r.capture===!0?p.result=`(${p.result})`:r.wrap!==!1&&m.length+h.length>1&&(p.result=`(?:${p.result})`),Ft.cache[a]=p,p.result};function wE(e,t,n){let r=mu(e,t,"-",!1,n)||[],s=mu(t,e,"",!1,n)||[],o=mu(e,t,"-?",!0,n)||[];return r.concat(o).concat(s).join("|")}function AE(e,t){let n=1,r=1,s=h0(e,n),o=new Set([t]);for(;e<=s&&s<=t;)o.add(s),n+=1,s=h0(e,n);for(s=g0(t+1,r)-1;e<s&&s<=t;)o.add(s),r+=1,s=g0(t+1,r)-1;return o=[...o],o.sort(xE),o}function ME(e,t,n){if(e===t)return{pattern:e,count:[],digits:0};let r=TE(e,t),s=r.length,o="",i=0;for(let u=0;u<s;u++){let[a,l]=r[u];a===l?o+=a:a!=="0"||l!=="9"?o+=$E(a,l,n):i++}return i&&(o+=n.shorthand===!0?"\\d":"[0-9]"),{pattern:o,count:[i],digits:s}}function f0(e,t,n,r){let s=AE(e,t),o=[],i=e,u;for(let a=0;a<s.length;a++){let l=s[a],c=ME(String(i),String(l),r),f="";if(!n.isPadded&&u&&u.pattern===c.pattern){u.count.length>1&&u.count.pop(),u.count.push(c.count[0]),u.string=u.pattern+m0(u.count),i=l+1;continue}n.isPadded&&(f=IE(l,n,r)),c.string=f+c.pattern+m0(c.count),o.push(c),i=l+1,u=c}return o}function mu(e,t,n,r,s){let o=[];for(let i of e){let{string:u}=i;!r&&!p0(t,"string",u)&&o.push(n+u),r&&p0(t,"string",u)&&o.push(n+u)}return o}function TE(e,t){let n=[];for(let r=0;r<e.length;r++)n.push([e[r],t[r]]);return n}function xE(e,t){return e>t?1:t>e?-1:0}function p0(e,t,n){return e.some(r=>r[t]===n)}function h0(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function g0(e,t){return e-e%Math.pow(10,t)}function m0(e){let[t=0,n=""]=e;return n||t>1?`{${t+(n?","+n:"")}}`:""}function $E(e,t,n){return`[${e}${t-e===1?"":"-"}${t}]`}function d0(e){return/^-?(0+)\d/.test(e)}function IE(e,t,n){if(!t.isPadded)return e;let r=Math.abs(t.maxLen-String(e).length),s=n.relaxZeros!==!1;switch(r){case 0:return"";case 1:return s?"0?":"0";case 2:return s?"0{0,2}":"00";default:return s?`0{0,${r}}`:`0{${r}}`}}Ft.cache={};Ft.clearCache=()=>Ft.cache={};y0.exports=Ft});var bu=R((fR,S0)=>{"use strict";var NE=require("util"),v0=b0(),E0=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),PE=e=>t=>e===!0?Number(t):String(t),du=e=>typeof e=="number"||typeof e=="string"&&e!=="",gr=e=>Number.isInteger(+e),yu=e=>{let t=`${e}`,n=-1;if(t[0]=== Line truncated
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var F0=R((mR,D0)=>{"use strict";var WE=zs(),{MAX_LENGTH:P0,CHAR_BACKSLASH:Eu,CHAR_BACKTICK:VE,CHAR_COMMA:zE,CHAR_DOT:KE,CHAR_LEFT_PARENTHESES:YE,CHAR_RIGHT_PARENTHESES:QE,CHAR_LEFT_CURLY_BRACE:XE,CHAR_RIGHT_CURLY_BRACE:JE,CHAR_LEFT_SQUARE_BRACKET:L0,CHAR_RIGHT_SQUARE_BRACKET:k0,CHAR_DOUBLE_QUOTE:ZE,CHAR_SINGLE_QUOTE:e2,CHAR_NO_BREAK_SPACE:t2,CHAR_ZERO_WIDTH_NOBREAK_SPACE:n2}=N0(),r2=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let n=t||{},r=typeof n.maxLength=="number"?Math.min(P0,n.maxLength):P0;if(e.length>r)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${r})`);let s={type:"root",input:e,nodes:[]},o=[s],i=s,u=s,a=0,l=e.length,c=0,f=0,p,m=()=>e[c++],h=d=>{if(d.type==="text"&&u.type==="dot"&&(u.type="text"),u&&u.type==="text"&&d.type==="text"){u.value+=d.value;return}return i.nodes.push(d),d.parent=i,d.prev=u,u=d,d};for(h({type:"bos"});c<l;)if(i=o[o.length-1],p=m(),!(p===n2||p===t2)){if(p===Eu){h({type:"text",value:(t.keepEscaping?p:"")+m()});continue}if(p===k0){h({type:"text",value:"\\"+p});continue}if(p===L0){a++;let d;for(;c<l&&(d=m());){if(p+=d,d===L0){a++;continue}if(d===Eu){p+=m();continue}if(d===k0&&(a--,a===0))break}h({type:"text",value:p});continue}if(p===YE){i=h({type:"paren",nodes:[]}),o.push(i),h({type:"text",value:p});continue}if(p===QE){if(i.type!=="paren"){h({type:"text",value:p});continue}i=o.pop(),h({type:"text",value:p}),i=o[o.length-1];continue}if(p===ZE||p===e2||p===VE){let d=p,v;for(t.keepQuotes!==!0&&(p="");c<l&&(v=m());){if(v===Eu){p+=v+m();continue}if(v===d){t.keepQuotes===!0&&(p+=v);break}p+=v}h({type:"text",value:p});continue}if(p===XE){f++;let v={type:"brace",open:!0,close:!1,dollar:u.value&&u.value.slice(-1)==="$"||i.dollar===!0,depth:f,commas:0,ranges:0,nodes:[]};i=h(v),o.push(i),h({type:"open",value:p});continue}if(p===JE){if(i.type!=="brace"){h({type:"text",value:p});continue}let d="close";i=o.pop(),i.close=!0,h({type:d,value:p}),f--,i=o[o.length-1];continue}if(p===zE&&f>0){if(i.ranges>0){i.ranges=0;let d=i.nodes.shift();i.nodes=[d,{type:"text",value:WE(i)}]}h({type:"comma",value:p}),i.commas++;continue}if(p===KE&&f>0&&i.commas===0){let d=i.nodes;if(f===0||d.length===0){h({type:"text",value:p});continue}if(u.type==="dot"){if(i.range=[],u.value+=p,u.type="range",i.nodes.length!==3&&i.nodes.length!==5){i.invalid=!0,i.ranges=0,u.type="text";continue}i.ranges++,i.args=[];continue}if(u.type==="range"){d.pop();let v=d[d.length-1];v.value+=u.value+p,u=v,i.ranges--;continue}h({type:"dot",value:p});continue}h({type:"text",value:p})}do if(i=o.pop(),i.type!=="root"){i.nodes.forEach(O=>{O.nodes||(O.type==="open"&&(O.isOpen=!0),O.type==="close"&&(O.isClose=!0),O.nodes||(O.type="text"),O.invalid=!0)});let d=o[o.length-1],v=d.nodes.indexOf(i);d.nodes.splice(v,1,...i.nodes)}while(o.length>0);return h({type:"eos"}),s};D0.exports=r2});var q0=R((dR,B0)=>{"use strict";var j0=zs(),s2=M0(),o2=$0(),i2=F0(),xe=(e,t={})=>{let n=[];if(Array.isArray(e))for(let r of e){let s=xe.create(r,t);Array.isArray(s)?n.push(...s):n.push(s)}else n=[].concat(xe.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(n=[...new Set(n)]),n};xe.parse=(e,t={})=>i2(e,t);xe.stringify=(e,t={})=>j0(typeof e=="string"?xe.parse(e,t):e,t);xe.compile=(e,t={})=>(typeof e=="string"&&(e=xe.parse(e,t)),s2(e,t));xe.expand=(e,t={})=>{typeof e=="string"&&(e=xe.parse(e,t));let n=o2(e,t);return t.noempty===!0&&(n=n.filter(Boolean)),t.nodupes===!0&&(n=[...new Set(n)]),n};xe.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?xe.compile(e,t):xe.expand(e,t);B0.exports=xe});var z0=R((yR,V0)=>{"use strict";var U0=require("util"),G0=q0(),Xe=Ni(),vu=er(),H0=e=>e===""||e==="./",W0=e=>{let t=e.indexOf("{");return t>-1&&e.indexOf("}",t)>-1},te=(e,t,n)=>{t=[].concat(t),e=[].concat(e);let r=new Set,s=new Set,o=new Set,i=0,u=c=>{o.add(c.output),n&&n.onResult&&n.onResult(c)};for(let c=0;c<t.length;c++){let f=Xe(String(t[c]),{...n,onResult:u},!0),p=f.state.negated||f.state.negatedExtglob;p&&i++;for(let m of e){let h=f(m,!0);(p?!h.isMatch:h.isMatch)&&(p?r.add(h.output):(r.delete(h.output),s.add(h.output)))}}let l=(i===t.length?[...o]:[...s]).filter(c=>!r.has(c));if(n&&l.length===0){if(n.failglob===!0)throw new Error(`No matches found for "${t.join(", ")}"`);if(n.nonull===!0||n.nullglob===!0)return n.unescape?t.map(c=>c.replace(/\\/g,"")):t}return l};te.match=te;te.matcher=(e,t)=>Xe(e,t);te.isMatch=(e,t,n)=>Xe(t,n)(e);te.any=te.isMatch;te.not=(e,t,n={})=>{t=[].concat(t).map(String);let r=new Set,s=[],o=u=>{n.onResult&&n.onResult(u),s.push(u.output)},i=new Set(te(e,t,{...n,onResult:o}));for(let u of s)i.has(u)||r.add(u);return[...r]};te.contains=(e,t,n)=>{if(typeof e!="string")thr Line truncated
`)),!/^\s*at /.test(t[0])&&/^\s*at /.test(t[1])&&(t=t.slice(1));let r=!1,s=null,o=[];return t.forEach(i=>{if(i=i.replace(/\\/g,"/"),this._internals.some(a=>a.test(i)))return;let u=/^\s*at /.test(i);r?i=i.trimEnd().replace(/^(\s+)at /,"$1"):(i=i.trim(),u&&(i=i.slice(3))),i=i.replace(`${this._cwd}/`,""),i&&(u?(s&&(o.push(s),s=null),o.push(i)):(r=!0,s=i))}),o.map(i=>`${n}${i}
`).join("")}captureString(t,n=this.captureString){typeof t=="function"&&(n=t,t=1/0);let{stackTraceLimit:r}=Error;t&&(Error.stackTraceLimit=t);let s={};Error.captureStackTrace(s,n);let{stack:o}=s;return Error.stackTraceLimit=r,this.clean(o)}capture(t,n=this.capture){typeof t=="function"&&(n=t,t=1/0);let{prepareStackTrace:r,stackTraceLimit:s}=Error;Error.prepareStackTrace=(u,a)=>this._wrapCallSite?a.map(this._wrapCallSite):a,t&&(Error.stackTraceLimit=t);let o={};Error.captureStackTrace(o,n);let{stack:i}=o;return Object.assign(Error,{prepareStackTrace:r,stackTraceLimit:s}),i}at(t=this.at){let[n]=this.capture(1,t);if(!n)return{};let r={line:n.getLineNumber(),column:n.getColumnNumber()};J0(r,n.getFileName(),this._cwd),n.isConstructor()&&Object.defineProperty(r,"constructor",{value:!0,configurable:!0}),n.isEval()&&(r.evalOrigin=n.getEvalOrigin()),n.isNative()&&(r.native=!0);let s;try{s=n.getTypeName()}catch{}s&&s!=="Object"&&s!=="[object Object]"&&(r.type=s);let o=n.getFunctionName();o&&(r.function=o);let i=n.getMethodName();return i&&o!==i&&(r.method=i),r}parseLine(t){let n=t&&t.match(f2);if(!n)return null;let r=n[1]==="new",s=n[2],o=n[3],i=n[4],u=Number(n[5]),a=Number(n[6]),l=n[7],c=n[8],f=n[9],p=n[10]==="native",m=n[11]===")",h,d={};if(c&&(d.line=Number(c)),f&&(d.column=Number(f)),m&&l){let v=0;for(let O=l.length-1;O>0;O--)if(l.charAt(O)===")")v++;else if(l.charAt(O)==="("&&l.charAt(O-1)===" "&&(v--,v===-1&&l.charAt(O-1)===" ")){let A=l.slice(0,O-1);l=l.slice(O+1),s+=` (${A}`;break}}if(s){let v=s.match(p2);v&&(s=v[1],h=v[2])}return J0(d,l,this._cwd),r&&Object.defineProperty(d,"constructor",{value:!0,configurable:!0}),o&&(d.evalOrigin=o,d.evalLine=u,d.evalColumn=a,d.evalFile=i&&i.replace(/\\/g,"/")),p&&(d.native=!0),s&&(d.function=s),h&&s!==h&&(d.method=h),d}};function J0(e,t,n){t&&(t=t.replace(/\\/g,"/"),t.startsWith(`${n}/`)&&(t=t.slice(n.length+1)),e.file=t)}function l2(e){if(e.length===0)return[];let t=e.map(n=>a2(n));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${t.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var f2=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),p2=/^(.*?) \[as (.*?)\]$/;eh.exports=_u});var Rh=R(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.separateMessageFromStack=de.indentAllLines=de.getTopFrame=de.getStackTraceLines=de.formatStackTrace=de.formatResultsErrors=de.formatPath=de.formatExecError=void 0;var Rt=ch(require("path")),h2=require("url"),Qs=require("util"),g2=o0(),Mn=Xs(zt()),m2=ch(Jn()),d2=Xs(z0()),Cu=Xs(Y0()),uh=Xs(th()),nh=jn();function Xs(e){return e&&e.__esModule?e:{default:e}}function ah(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(ah=function(r){return r?n:t})(e)}function ch(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=ah(t);if(n&&n.has(e))return n.get(e);var r={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(r,o,i):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}var lh=globalThis["jest-symbol-do-not-touch"]||globalThis.Symbol,lh=globalThis["jest-symbol-do-not-touch"]||globalThis.Symbol,y2=globalThis[lh.for("jest-native-read-file")]||m2.readFileSync,b2=new uh.default({cwd:"something which does not exist"}),fh=[];try{fh=uh.default.nodeInternals()}catch{}var E2=`${Rt.sep}node_modules${Rt.sep}`,v2=`${Rt.sep}jest${Rt.sep}packages${Rt.sep}`,_2=/^\s+at(?:(?:.jasmine-)|\s+jasmine\.buildExpectationResult)/,R2=/^\s+at.*?jest(-.*?)?(\/|\\)(build|node_modules|packages)(\/|\\)/,O2=/^\s+at <anonymous>.*$/,C2=/^\s+at (new )?Promise \(<anonymous>\).*$/,S2=/^\s+at Generator.next \(<anonymous>\).*$/,w2=/^\s+at next \(native\).*$/,ph=" ",hh=" ",A2=" ",rh=" \u203A ",gh=Mn.default.bold("\u25CF "),Ru=Mn.default.dim,mh=/\s*at.*\(?(:\d*:\d*|native)\)?/,M2="Test suite failed to run",T2=/^(?!$)/gm,An=e=>e.replace(T2,hh);de.indentAllLines=An;var dh=e=>(e||"").trim(),x2=e=>e.match(mh)?dh(e):e,$2=(e,t,n)=>{let r=(0,g2.codeFrameColumns)(e,{start:{column:n,line:t}},{highlightCode:!0});return r=An(r),r=`
${r}
`,r},sh=/^\s*$/;function yh(e){return e.includes("ReferenceError: document is not defined")||e.includes("ReferenceError: window is not defined")||e.includes("ReferenceError: navigator is not defined")?oh(e,"jsdom"):e.includes(".unref is not a function")?oh(e,"node"):e}function oh(e,t){return Mn.default.bold.red(`The error below may be caused by using the wrong test environment, see ${Mn.default.dim.underline("https://jestjs.io/docs/configuration#testenvironment-string")}.
Consider using the "${t}" test environment.
`)+e}var Ou=(e,t,n,r,s,o)=>{(!e||typeof e=="number")&&(e=new Error(`Expected an Error, but "${String(e)}" was thrown`),e.stack="");let i,u,a="",l=[];if(typeof e=="string"||!e)e||(e="EMPTY ERROR"),i="",u=e;else{if(i=e.message,u=typeof e.stack=="string"?e.stack:`thrown: ${(0,nh.format)(e,{maxDepth:3})}`,"cause"in e){let h=`
Cause:
`;if(typeof e.cause=="string"||typeof e.cause=="number")a+=`${h}${e.cause}`;else if(Qs.types.isNativeError(e.cause)||e.cause instanceof Error){let d=Ou(e.cause,t,n,r,s,!0);a+=`${h}${d}`}}if("errors"in e&&Array.isArray(e.errors))for(let h of e.errors)l.push(Ou(h,t,n,r,s,!0))}a!==""&&(a=An(a));let c=wu(u||"");u=c.stack,c.message.includes(dh(i))&&(i=c.message),i=yh(i),i=An(i),u=u&&!n.noStackTrace?`
${Su(u,t,n,r)}`:"",(typeof u!="string"||sh.test(i)&&sh.test(u))&&(i=`thrown: ${(0,nh.format)(e,{maxDepth:3})}`);let f;s||o?f=` ${i.trim()}`:f=`${M2}
${i}`;let p=o?"":`${ph+gh}`,m=l.length>0?An(`
Errors contained in AggregateError:
${l.join(`
`)}`):"";return`${p+f+u+a+m}
`};de.formatExecError=Ou;var I2=(e,t)=>{let n=0;return e.filter(r=>O2.test(r)||C2.test(r)||S2.test(r)||w2.test(r)||fh.some(s=>s.test(r))?!1:mh.test(r)?_2.test(r)?!1:++n===1?!0:!(t.noStackTrace||R2.test(r)):!0)},bh=(e,t,n=null)=>{let r=e.match(/(^\s*at .*?\(?)([^()]+)(:[0-9]+:[0-9]+\)?.*$)/);if(!r)return e;let s=(0,Cu.default)(Rt.relative(t.rootDir,r[2]));return(t.testMatch&&t.testMatch.length&&(0,d2.default)([s],t.testMatch).length>0||s===n)&&(s=Mn.default.reset.cyan(s)),Ru(r[1])+s+Ru(r[3])};de.formatPath=bh;var Eh=(e,t={noCodeFrame:!1,noStackTrace:!1})=>I2(e.split(/\n/),t);de.getStackTraceLines=Eh;var vh=e=>{for(let t of e){if(t.includes(E2)||t.includes(v2))continue;let n=b2.parseLine(t.trim());if(n&&n.file)return n.file.startsWith("file://")&&(n.file=(0,Cu.default)((0,h2.fileURLToPath)(n.file))),n}return null};de.getTopFrame=vh;var Su=(e,t,n,r)=>{let s=Eh(e,n),o="",i=r?(0,Cu.default)(Rt.relative(t.rootDir,r)):null;if(!n.noStackTrace&&!n.noCodeFrame){let a=vh(s);if(a){let{column:l,file:c,line:f}=a;if(f&&c&&Rt.isAbsolute(c)){let p;try{p=y2(c,"utf8"),o=$2(p,f,l)}catch{}}}}let u=s.filter(Boolean).map(a=>A2+bh(x2(a),t,i)).join(`
`);return o?`${o}
${u}`:`
${u}`};de.formatStackTrace=Su;function N2(e){return typeof e!="string"&&"cause"in e&&(typeof e.cause=="string"||Qs.types.isNativeError(e.cause)||e.cause instanceof Error)}function _h(e,t,n,r){let s=typeof e=="string"?e:e.stack||"",{message:o,stack:i}=wu(s);i=n.noStackTrace?"":`${Ru(Su(i,t,n,r))}
`,o=yh(o),o=An(o);let u="";if(N2(e)){let a=_h(e.cause,t,n,r);u=`
${hh}Cause:
${a}`}return`${o}
${i}${u}`}function P2(e,t){return e?Qs.types.isNativeError(e)||e instanceof Error?e:typeof e=="object"&&"error"in e&&(Qs.types.isNativeError(e.error)||e.error instanceof Error)?e.error:t:t}var L2=(e,t,n,r)=>{let s=e.reduce((o,i)=>(i.failureMessages.forEach((u,a)=>{o.push({content:u,failureDetails:i.failureDetails[a],result:i})}),o),[]);return s.length?s.map(({result:o,content:i,failureDetails:u})=>{let a=P2(u,i);return`${`${Mn.default.bold.red(ph+gh+o.ancestorTitles.join(rh)+(o.ancestorTitles.length?rh:"")+o.title)}
`}
${_h(a,t,n,r)}`}).join(`
`):null};de.formatResultsErrors=L2;var k2=/^Error:?\s*$/,ih=e=>e.split(`
`).filter(t=>!k2.test(t)).join(`
`).trimRight(),wu=e=>{if(!e)return{message:"",stack:""};let t=e.match(/^(?:Error: )?([\s\S]*?(?=\n\s*at\s.*:\d*:\d*)|\s*.*)([\s\S]*)$/);if(!t)throw new Error("If you hit this error, the regex above is buggy.");let n=ih(t[1]),r=ih(t[2]);return{message:n,stack:r}};de.separateMessageFromStack=wu});var Lh=R(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.spyOn=je.replaceProperty=je.mocked=je.fn=je.ModuleMocker=void 0;function Nh(){let e=as();return Nh=function(){return e},e}var Au="mockConstructor",Ph=/[\s!-/:-@[-`{-~]/,K2=new RegExp(Ph.source,"g"),Y2=new Set(["arguments","await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","eval","export","extends","false","finally","for","function","if","implements","import","in","instanceof","interface","let","new","null","package","private","protected","public","return","static","super","switch","this","throw","true","try","typeof","var","void","while","with","yield"]);function Q2(e,t){let n;switch(t){case 1:n=function(r){return e.apply(this,arguments)};break;case 2:n=function(r,s){return e.apply(this,arguments)};break;case 3:n=function(r,s,o){return e.apply(this,arguments)};break;case 4:n=function(r,s,o,i){return e.apply(this,arguments)};break;case 5:n=function(r,s,o,i,u){return e.apply(this,arguments)};break;case 6:n=function(r,s,o,i,u,a){return e.apply(this,arguments)};break;case 7:n=function(r,s,o,i,u,a,l){return e.apply(this,arguments)};break;case 8:n=function(r,s,o,i,u,a,l,c){return e.apply(this,arguments)};break;case 9:n=function(r,s,o,i,u,a,l,c,f){return e.apply(this,arguments)};break;default:n=function(){return e.apply(this,arguments)};break}return n}function Mu(e){return Object.prototype.toString.apply(e).slice(8,-1)}function X2(e){let t=Mu(e);return t==="Function"||t==="AsyncFunction"||t==="GeneratorFunction"||t==="AsyncGeneratorFunction"?"function":Array.isArray(e)?"array":t==="Object"||t==="Module"?"object":t==="Number"||t==="String"||t==="Boolean"||t==="Symbol"?"constant":t==="Map"||t==="WeakMap"||t==="Set"?"collection":t==="RegExp"?"regexp":e===void 0?"undefined":e===null?"null":null}function J2(e,t){if(t==="arguments"||t==="caller"||t==="callee"||t==="name"||t==="length"){let n=Mu(e);return n==="Function"||n==="AsyncFunction"||n==="GeneratorFunction"||n==="AsyncGeneratorFunction"}return t==="source"||t==="global"||t==="ignoreCase"||t==="multiline"?Mu(e)==="RegExp":!1}var no=class{constructor(t){ae(this,"_environmentGlobal");ae(this,"_mockState");ae(this,"_mockConfigRegistry");ae(this,"_spyState");ae(this,"_invocationCallCounter");this._environmentGlobal=t,this._mockState=new WeakMap,this._mockConfigRegistry=new WeakMap,this._spyState=new Set,this._invocationCallCounter=1}_getSlots(t){if(!t)return[];let n=new Set,r=this._environmentGlobal.Object.prototype,s=this._environmentGlobal.Function.prototype,o=this._environmentGlobal.RegExp.prototype,i=Object.prototype,u=Function.prototype,a=RegExp.prototype;for(;t!=null&&t!==r&&t!==s&&t!==o&&t!==i&&t!==u&&t!==a;){let l=Object.getOwnPropertyNames(t);for(let c=0;c<l.length;c++){let f=l[c];if(!J2(t,f)){let p=Object.getOwnPropertyDescriptor(t,f);(p!==void 0&&!p.get||t.__esModule)&&n.add(f)}}t=Object.getPrototypeOf(t)}return Array.from(n)}_ensureMockConfig(t){let n=this._mockConfigRegistry.get(t);return n||(n=this._defaultMockConfig(),this._mockConfigRegistry.set(t,n)),n}_ensureMockState(t){let n=this._mockState.get(t);return n||(n=this._defaultMockState(),this._mockState.set(t,n)),n.calls.length>0&&(n.lastCall=n.calls[n.calls.length-1]),n}_defaultMockConfig(){return{mockImpl:void 0,mockName:"jest.fn()",specificMockImpls:[]}}_defaultMockState(){return{calls:[],contexts:[],instances:[],invocationCallOrder:[],results:[]}}_makeComponent(t,n){if(t.type==="object")return new this._environmentGlobal.Object;if(t.type==="array")return new this._environmentGlobal.Array;if(t.type==="regexp")return new this._environmentGlobal.RegExp("");if(t.type==="constant"||t.type==="collection"||t.type==="null"||t.type==="undefined")return t.value;if(t.type==="function"){let a=function(l,c){let f=this._ensureMockConfig(u),p=f.mockImpl,m=f.specificMockImpls;f.mockImpl=l,f.specificMockImpls=[];let h=c();if((0,Nh().isPromise)(h))return h.then(()=>{f.mockImpl=p,f.specificMockImpls=m});f.mockImpl=p,f.specificMockImpls=m},r=t.members&&t.members.prototype&&t.members.prototype.members||{},s=this._getSlots(r),o=this,i=Q2(function(...l){let c=o._ensureMockState(u),f=o._ensureMockConfig(u);c.instances.push(this),c.contexts.push(this),c.calls.push(l);let p={type:"incomplete",value:void 0};c.results.push(p),c.invocationCallOrder.push(o._invocationCallCounter++);let m,h,d=!1;try{m=(()=>{if(this instanceof u){s.forEach(A=>{if(r[A].type==="function"){let w=this[A];this[A]=o.generateFromMetadata(r[A]),this[A]._protoImpl=w}});let O=f.specificMockImpls.length?f.specificMockImpls.shift():f.mockImpl;return O&&O.apply(this,arguments)}let v=f.specificMockImpls.shift();if(v===void 0&&(v=f.mocLine truncated
Expected ${i} to be called but received ${(0,De.RECEIVED_COLOR)((0,De.pluralize)("assertion call",t||0))}.`,e.push({actual:t.toString(),error:r,expected:n.toString()})}if(s&&t===0){let i=(0,De.EXPECTED_COLOR)("at least one assertion"),u=(0,De.RECEIVED_COLOR)("received none");o.message=`${(0,De.matcherHint)(".hasAssertions","","",{isDirectExpectCall:!0})}
Expected ${i} to be called but ${u}.`,e.push({actual:"none",error:o,expected:"at least one"})}return e},Bf=Cb;var K=ie(ln()),Et=ie(ot()),g=ie(ze());var ge=ie(ze()),Wi=e=>e.replace(/"|\\/g,"\\$&"),mn=(e,t,n)=>(0,ge.RECEIVED_COLOR)(`"${Wi(e.slice(0,t))}${(0,ge.INVERTED_COLOR)(Wi(e.slice(t,t+n)))}${Wi(e.slice(t+n))}"`),As=(e,t)=>t===null?(0,ge.printReceived)(e):mn(e,t.index,t[0].length),Vi=(e,t)=>(0,ge.RECEIVED_COLOR)(`[${e.map((n,r)=>{let s=(0,ge.stringify)(n);return r===t?(0,ge.INVERTED_COLOR)(s):s}).join(", ")}]`),zi=(e,t,n,r)=>{let s=(0,ge.stringify)(e),o=s.includes("e")?t.toExponential(0):0<=n&&n<20?t.toFixed(n+1):(0,ge.stringify)(t);return`Expected precision: ${r?" ":""} ${(0,ge.stringify)(n)}
Expected difference: ${r?"not ":""}< ${(0,ge.EXPECTED_COLOR)(o)}
Received difference: ${r?" ":""} ${(0,ge.RECEIVED_COLOR)(s)}`},Ms=(e,t)=>`${rr(e,t,!1,!0)}
`,Ts=(e,t)=>`${rr(e,t,!0,!0)}
`,xs=(e,t)=>`${rr(e,t,!1,!1)}
`,$s=(e,t,n)=>typeof n.name=="string"&&n.name.length!==0&&typeof t.name=="string"&&t.name.length!==0?`${rr(e,t,!0,!1)} ${Object.getPrototypeOf(t)===n?"extends":"extends \u2026 extends"} ${(0,ge.EXPECTED_COLOR)(n.name)}
`:`${rr(e,t,!1,!1)}
`,rr=(e,t,n,r)=>typeof t.name!="string"?`${e} name is not a string`:t.name.length===0?`${e} name is an empty string`:`${e}: ${n?r?"not ":" ":""}${r?(0,ge.EXPECTED_COLOR)(t.name):(0,ge.RECEIVED_COLOR)(t.name)}`;var Is="Expected",Ns="Received",Sb="Expected value",wb="Received value",sr=e=>e!==!1,qf=[K.iterableEquality,K.typeEquality,K.sparseArrayEquality,K.arrayBufferEquality],Ab={toBe(e,t){let n="toBe",r={comment:"Object.is equality",isNot:this.isNot,promise:this.promise},s=Object.is(e,t);return{actual:e,expected:t,message:s?()=>(0,g.matcherHint)(n,void 0,void 0,r)+`
Expected: not ${(0,g.printExpected)(t)}`:()=>{let i=(0,Et.getType)(t),u=null;return i!=="map"&&i!=="set"&&((0,K.equals)(e,t,[...this.customTesters,...qf],!0)?u="toStrictEqual":(0,K.equals)(e,t,[...this.customTesters,K.iterableEquality])&&(u="toEqual")),(0,g.matcherHint)(n,void 0,void 0,r)+`
`+(u!==null?`${(0,g.DIM_COLOR)(`If it should pass with deep equality, replace "${n}" with "${u}"`)}
`:"")+(0,g.printDiffOrStringify)(t,e,Is,Ns,sr(this.expand))},name:n,pass:s}},toBeCloseTo(e,t,n=2){let r="toBeCloseTo",s=arguments.length===3?"precision":void 0,o=this.isNot,i={isNot:o,promise:this.promise,secondArgument:s,secondArgumentColor:f=>f};if(typeof t!="number")throw new Error((0,g.matcherErrorMessage)((0,g.matcherHint)(r,void 0,void 0,i),`${(0,g.EXPECTED_COLOR)("expected")} value must be a number`,(0,g.printWithType)("Expected",t,g.printExpected)));if(typeof e!="number")throw new Error((0,g.matcherErrorMessage)((0,g.matcherHint)(r,void 0,void 0,i),`${(0,g.RECEIVED_COLOR)("received")} value must be a number`,(0,g.printWithType)("Received",e,g.printReceived)));let u=!1,a=0,l=0;return e===1/0&&t===1/0||e===-1/0&&t===-1/0?u=!0:(a=Math.pow(10,-n)/2,l=Math.abs(t-e),u=l<a),{message:u?()=>(0,g.matcherHint)(r,void 0,void 0,i)+`
Expected: not ${(0,g.printExpected)(t)}
`+(l===0?"":`Received: ${(0,g.printReceived)(e)}
${zi(l,a,n,o)}`):()=>(0,g.matcherHint)(r,void 0,void 0,i)+`
Expected: ${(0,g.printExpected)(t)}
Received: ${(0,g.printReceived)(e)}
`+zi(l,a,n,o),pass:u}},toBeDefined(e,t){let n="toBeDefined",r={isNot:this.isNot,promise:this.promise};return(0,g.ensureNoExpected)(t,n,r),{message:()=>(0,g.matcherHint)(n,void 0,"",r)+`
Received: ${(0,g.printReceived)(e)}`,pass:e!==void 0}},toBeFalsy(e,t){let n="toBeFalsy",r={isNot:this.isNot,promise:this.promise};return(0,g.ensureNoExpected)(t,n,r),{message:()=>(0,g.matcherHint)(n,void 0,"",r)+`
Received: ${(0,g.printReceived)(e)}`,pass:!e}},toBeGreaterThan(e,t){let n="toBeGreaterThan",r=this.isNot,s={isNot:r,promise:this.promise};(0,g.ensureNumbers)(e,t,n,s);let o=e>t;return{message:()=>(0,g.matcherHint)(n,void 0,void 0,s)+`
Expected:${r?" not":""} > ${(0,g.printExpected)(t)}
Received:${r?" ":""} ${(0,g.printReceived)(e)}`,pass:o}},toBeGreaterThanOrEqual(e,t){let n="toBeGreaterThanOrEqual",r=this.isNot,s={isNot:r,promise:this.promise};(0,g.ensureNumbers)(e,t,n,s);let o=e>=t;return{message:()=>(0,g.matcherHint)(n,void 0,void 0,s)+`
Expected:${r?" not":""} >= ${(0,g.printExpected)(t)}
Received:${r?" ":""} ${(0,g.printReceived)(e)}`,pass:o}},toBeInstanceOf(e,t){let n="toBeInstanceOf",r={isNot:this.isNot,promise:this.promise};if(typeof t!="function")throw new Error((0,g.matcherErrorMessage)((0,g.matcherHint)(n,void 0,void 0,r),`${(0,g.EXPECTED_COLOR)("expected")} value must be a function`,(0,g.printWithType)("Expected",t,g.printExpected)));let s=e instanceof t;return{message:s?()=>(0,g.matcherHint)(n,void 0,void 0,r)+`
`+Ts("Expected constructor",t)+(typeof e.constructor=="function"&&e.constructor!==t?$s("Received constructor",e.constructor,t):""):()=>(0,g.matcherHint)(n,void 0,void 0,r)+`
`+Ms("Expected constructor",t)+((0,Et.isPrimitive)(e)||Object.getPrototypeOf(e)===null?`
Received value has no prototype
Received value: ${(0,g.printReceived)(e)}`:typeof e.constructor!="function"?`
Received value: ${(0,g.printReceived)(e)}`:xs("Received constructor",e.constructor)),pass:s}},toBeLessThan(e,t){let n="toBeLessThan",r=this.isNot,s={isNot:r,promise:this.promise};(0,g.ensureNumbers)(e,t,n,s);let o=e<t;return{message:()=>(0,g.matcherHint)(n,void 0,void 0,s)+`
Expected:${r?" not":""} < ${(0,g.printExpected)(t)}
Received:${r?" ":""} ${(0,g.printReceived)(e)}`,pass:o}},toBeLessThanOrEqual(e,t){let n="toBeLessThanOrEqual",r=this.isNot,s={isNot:r,promise:this.promise};(0,g.ensureNumbers)(e,t,n,s);let o=e<=t;return{message:()=>(0,g.matcherHint)(n,void 0,void 0,s)+`
Expected:${r?" not":""} <= ${(0,g.printExpected)(t)}
Received:${r?" ":""} ${(0,g.printReceived)(e)}`,pass:o}},toBeNaN(e,t){let n="toBeNaN",r={isNot:this.isNot,promise:this.promise};(0,g.ensureNoExpected)(t,n,r);let s=Number.isNaN(e);return{message:()=>(0,g.matcherHint)(n,void 0,"",r)+`
Received: ${(0,g.printReceived)(e)}`,pass:s}},toBeNull(e,t){let n="toBeNull",r={isNot:this.isNot,promise:this.promise};return(0,g.ensureNoExpected)(t,n,r),{message:()=>(0,g.matcherHint)(n,void 0,"",r)+`
Received: ${(0,g.printReceived)(e)}`,pass:e===null}},toBeTruthy(e,t){let n="toBeTruthy",r={isNot:this.isNot,promise:this.promise};return(0,g.ensureNoExpected)(t,n,r),{message:()=>(0,g.matcherHint)(n,void 0,"",r)+`
Received: ${(0,g.printReceived)(e)}`,pass:!!e}},toBeUndefined(e,t){let n="toBeUndefined",r={isNot:this.isNot,promise:this.promise};return(0,g.ensureNoExpected)(t,n,r),{message:()=>(0,g.matcherHint)(n,void 0,"",r)+`
Received: ${(0,g.printReceived)(e)}`,pass:e===void 0}},toContain(e,t){let n="toContain",r=this.isNot,s={comment:"indexOf",isNot:r,promise:this.promise};if(e==null)throw new Error((0,g.matcherErrorMessage)((0,g.matcherHint)(n,void 0,void 0,s),`${(0,g.RECEIVED_COLOR)("received")} value must not be null nor undefined`,(0,g.printWithType)("Received",e,g.printReceived)));if(typeof e=="string"){let l=`${(0,g.EXPECTED_COLOR)("expected")} value must be a string if ${(0,g.RECEIVED_COLOR)("received")} value is a string`;if(typeof t!="string")throw new Error((0,g.matcherErrorMessage)((0,g.matcherHint)(n,e,String(t),s),l,(0,g.printWithType)("Expected",t,g.printExpected)+`
`+(0,g.printWithType)("Received",e,g.printReceived)));let c=e.indexOf(String(t));return{message:()=>{let m=`Expected ${typeof t=="string"?"substring":"value"}`,h="Received string",d=(0,g.getLabelPrinter)(m,h);return(0,g.matcherHint)(n,void 0,void 0,s)+`
${d(m)}${r?"not ":""}${(0,g.printExpected)(t)}
${d(h)}${r?" ":""}${r?mn(e,c,String(t).length):(0,g.printReceived)(e)}`},pass:c!==-1}}let o=Array.from(e),i=o.indexOf(t);return{message:()=>{let l="Expected value",c=`Received ${(0,Et.getType)(e)}`,f=(0,g.getLabelPrinter)(l,c);return(0,g.matcherHint)(n,void 0,void 0,s)+`
${f(l)}${r?"not ":""}${(0,g.printExpected)(t)}
${f(c)}${r?" ":""}${r&&Array.isArray(e)?Vi(e,i):(0,g.printReceived)(e)}`+(!r&&o.findIndex(p=>(0,K.equals)(p,t,[...this.customTesters,K.iterableEquality]))!==-1?`
${g.SUGGEST_TO_CONTAIN_EQUAL}`:"")},pass:i!==-1}},toContainEqual(e,t){let n="toContainEqual",r=this.isNot,s={comment:"deep equality",isNot:r,promise:this.promise};if(e==null)throw new Error((0,g.matcherErrorMessage)((0,g.matcherHint)(n,void 0,void 0,s),`${(0,g.RECEIVED_COLOR)("received")} value must not be null nor undefined`,(0,g.printWithType)("Received",e,g.printReceived)));let o=Array.from(e).findIndex(a=>(0,K.equals)(a,t,[...this.customTesters,K.iterableEquality]));return{message:()=>{let a="Expected value",l=`Received ${(0,Et.getType)(e)}`,c=(0,g.getLabelPrinter)(a,l);return(0,g.matcherHint)(n,void 0,void 0,s)+`
${c(a)}${r?"not ":""}${(0,g.printExpected)(t)}
${c(l)}${r?" ":""}${r&&Array.isArray(e)?Vi(e,o):(0,g.printReceived)(e)}`},pass:o!==-1}},toEqual(e,t){let n="toEqual",r={comment:"deep equality",isNot:this.isNot,promise:this.promise},s=(0,K.equals)(e,t,[...this.customTesters,K.iterableEquality]);return{actual:e,expected:t,message:s?()=>(0,g.matcherHint)(n,void 0,void 0,r)+`
Expected: not ${(0,g.printExpected)(t)}
`+((0,g.stringify)(t)!==(0,g.stringify)(e)?`Received: ${(0,g.printReceived)(e)}`:""):()=>(0,g.matcherHint)(n,void 0,void 0,r)+`
`+(0,g.printDiffOrStringify)(t,e,Is,Ns,sr(this.expand)),name:n,pass:s}},toHaveLength(e,t){let n="toHaveLength",r=this.isNot,s={isNot:r,promise:this.promise};if(typeof(e==null?void 0:e.length)!="number")throw new Error((0,g.matcherErrorMessage)((0,g.matcherHint)(n,void 0,void 0,s),`${(0,g.RECEIVED_COLOR)("received")} value must have a length property whose value must be a number`,(0,g.printWithType)("Received",e,g.printReceived)));(0,g.ensureExpectedIsNonNegativeInteger)(t,n,s);let o=e.length===t;return{message:()=>{let u="Expected length",a="Received length",l=`Received ${(0,Et.getType)(e)}`,c=(0,g.getLabelPrinter)(u,a,l);return(0,g.matcherHint)(n,void 0,void 0,s)+`
${c(u)}${r?"not ":""}${(0,g.printExpected)(t)}
`+(r?"":`${c(a)}${(0,g.printReceived)(e.length)}
`)+`${c(l)}${r?" ":""}${(0,g.printReceived)(e)}`},pass:o}},toHaveProperty(e,t,n){let r="toHaveProperty",s="path",o=arguments.length===3,i={isNot:this.isNot,promise:this.promise,secondArgument:o?"value":""};if(e==null)throw new Error((0,g.matcherErrorMessage)((0,g.matcherHint)(r,void 0,s,i),`${(0,g.RECEIVED_COLOR)("received")} value must not be null nor undefined`,(0,g.printWithType)("Received",e,g.printReceived)));let u=(0,Et.getType)(t);if(u!=="string"&&u!=="array")throw new Error((0,g.matcherErrorMessage)((0,g.matcherHint)(r,void 0,s,i),`${(0,g.EXPECTED_COLOR)("expected")} path must be a string or array`,(0,g.printWithType)("Expected",t,g.printExpected)));let a=typeof t=="string"?(0,K.pathAsArray)(t).length:t.length;if(u==="array"&&a===0)throw new Error((0,g.matcherErrorMessage)((0,g.matcherHint)(r,void 0,s,i),`${(0,g.EXPECTED_COLOR)("expected")} path must not be an empty array`,(0,g.printWithType)("Expected",t,g.printExpected)));let l=(0,K.getPath)(e,t),{lastTraversedObject:c,endPropIsDefined:f,hasEndProp:p,value:m}=l,h=l.traversedPath,d=h.length===a,v=d?l.value:c,O=o&&f?(0,K.equals)(m,n,[...this.customTesters,K.iterableEquality]):!!p;return{message:O?()=>(0,g.matcherHint)(r,void 0,s,i)+`
`+(o?`Expected path: ${(0,g.printExpected)(t)}
Expected value: not ${(0,g.printExpected)(n)}${(0,g.stringify)(n)!==(0,g.stringify)(v)?`
Received value: ${(0,g.printReceived)(v)}`:""}`:`Expected path: not ${(0,g.printExpected)(t)}
Received value: ${(0,g.printReceived)(v)}`):()=>(0,g.matcherHint)(r,void 0,s,i)+`
Expected path: ${(0,g.printExpected)(t)}
`+(d?`
${(0,g.printDiffOrStringify)(n,v,Sb,wb,sr(this.expand))}`:`Received path: ${(0,g.printReceived)(u==="array"||h.length===0?h:h.join("."))}
${o?`Expected value: ${(0,g.printExpected)(n)}
`:""}Received value: ${(0,g.printReceived)(v)}`),pass:O}},toMatch(e,t){let n="toMatch",r={isNot:this.isNot,promise:this.promise};if(typeof e!="string")throw new Error((0,g.matcherErrorMessage)((0,g.matcherHint)(n,void 0,void 0,r),`${(0,g.RECEIVED_COLOR)("received")} value must be a string`,(0,g.printWithType)("Received",e,g.printReceived)));if(typeof t!="string"&&!(t&&typeof t.test=="function"))throw new Error((0,g.matcherErrorMessage)((0,g.matcherHint)(n,void 0,void 0,r),`${(0,g.EXPECTED_COLOR)("expected")} value must be a string or regular expression`,(0,g.printWithType)("Expected",t,g.printExpected)));let s=typeof t=="string"?e.includes(t):new RegExp(t).test(e);return{message:s?()=>typeof t=="string"?(0,g.matcherHint)(n,void 0,void 0,r)+`
Expected substring: not ${(0,g.printExpected)(t)}
Received string: ${mn(e,e.indexOf(t),t.length)}`:(0,g.matcherHint)(n,void 0,void 0,r)+`
Expected pattern: not ${(0,g.printExpected)(t)}
Received string: ${As(e,typeof t.exec=="function"?t.exec(e):null)}`:()=>{let i=`Expected ${typeof t=="string"?"substring":"pattern"}`,u="Received string",a=(0,g.getLabelPrinter)(i,u);return(0,g.matcherHint)(n,void 0,void 0,r)+`
${a(i)}${(0,g.printExpected)(t)}
${a(u)}${(0,g.printReceived)(e)}`},pass:s}},toMatchObject(e,t){let n="toMatchObject",r={isNot:this.isNot,promise:this.promise};if(typeof e!="object"||e===null)throw new Error((0,g.matcherErrorMessage)((0,g.matcherHint)(n,void 0,void 0,r),`${(0,g.RECEIVED_COLOR)("received")} value must be a non-null object`,(0,g.printWithType)("Received",e,g.printReceived)));if(typeof t!="object"||t===null)throw new Error((0,g.matcherErrorMessage)((0,g.matcherHint)(n,void 0,void 0,r),`${(0,g.EXPECTED_COLOR)("expected")} value must be a non-null object`,(0,g.printWithType)("Expected",t,g.printExpected)));let s=(0,K.equals)(e,t,[...this.customTesters,K.iterableEquality,K.subsetEquality]);return{message:s?()=>(0,g.matcherHint)(n,void 0,void 0,r)+`
Expected: not ${(0,g.printExpected)(t)}`+((0,g.stringify)(t)!==(0,g.stringify)(e)?`
Received: ${(0,g.printReceived)(e)}`:""):()=>(0,g.matcherHint)(n,void 0,void 0,r)+`
`+(0,g.printDiffOrStringify)(t,(0,K.getObjectSubset)(e,t,this.customTesters),Is,Ns,sr(this.expand)),pass:s}},toStrictEqual(e,t){let n="toStrictEqual",r={comment:"deep equality",isNot:this.isNot,promise:this.promise},s=(0,K.equals)(e,t,[...this.customTesters,...qf],!0);return{actual:e,expected:t,message:s?()=>(0,g.matcherHint)(n,void 0,void 0,r)+`
Expected: not ${(0,g.printExpected)(t)}
`+((0,g.stringify)(t)!==(0,g.stringify)(e)?`Received: ${(0,g.printReceived)(e)}`:""):()=>(0,g.matcherHint)(n,void 0,void 0,r)+`
`+(0,g.printDiffOrStringify)(t,e,Is,Ns,sr(this.expand)),name:n,pass:s}}},Hf=Ab;var Ps=ie(ln()),or=ie(ot()),_=ie(ze());var Yi=e=>e!==!1,dn=3,tp="called with 0 arguments",Ls=e=>e.length===0?tp:e.map(t=>(0,_.printExpected)(t)).join(", "),ir=(e,t)=>e.length===0?tp:e.map((n,r)=>Array.isArray(t)&&r<t.length&&vn(t[r],n)?ks(n):(0,_.printReceived)(n)).join(", "),ks=e=>(0,_.DIM_COLOR)((0,_.stringify)(e)),vn=(e,t)=>(0,Ps.equals)(e,t,[...gn(),Ps.iterableEquality]),vt=(e,t)=>t.length===e.length&&vn(e,t),_t=(e,t)=>t.type==="return"&&vn(e,t.value),yn=e=>e.reduce((t,n)=>n.type==="return"?t+1:t,0),bn=(e,t)=>`
Number of returns: ${(0,_.printReceived)(e)}${t!==e?`
Number of calls: ${(0,_.printReceived)(t)}`:""}`,Qi=e=>{let t=e.indexOf(":"),n=e.slice(t);return(r,s)=>(s?`->${" ".repeat(Math.max(0,t-2-r.length))}`:" ".repeat(Math.max(t-r.length)))+r+n},Xi=(e,t,n,r)=>{if(t.length===0)return"";let s="Received: ";if(n)return`${s+ir(t[0],e)}
`;let o=Qi(s);return`Received
${t.reduce((i,[u,a])=>`${i+o(String(u+1),u===r)+ir(a,e)}
`,"")}`},Ji=(e,t,n,r,s)=>{let o=`Expected: ${Ls(e)}
`;if(t.length===0)return o;let i="Received: ";if(r&&(s===0||s===void 0)){let a=t[0][1];if(Uf(e,a)){let l=[(0,_.EXPECTED_COLOR)("- Expected"),(0,_.RECEIVED_COLOR)("+ Received"),""],c=Math.max(e.length,a.length);for(let f=0;f<c;f+=1){if(f<e.length&&f<a.length){if(vn(e[f],a[f])){l.push(` ${ks(a[f])},`);continue}if(Zi(e[f],a[f])){let p=(0,_.diff)(e[f],a[f],{expand:n});if(typeof p=="string"&&p.includes("- Expected")&&p.includes("+ Received")){l.push(`${p.split(`
`).slice(3).join(`
`)},`);continue}}}f<e.length&&l.push(`${(0,_.EXPECTED_COLOR)(`- ${(0,_.stringify)(e[f])}`)},`),f<a.length&&l.push(`${(0,_.RECEIVED_COLOR)(`+ ${(0,_.stringify)(a[f])}`)},`)}return`${l.join(`
`)}
`}return`${o+i+ir(a,e)}
`}let u=Qi(i);return o+`Received
`+t.reduce((a,[l,c])=>{let f=u(String(l+1),l===s);return`${a+((l===s||s===void 0)&&Uf(e,c)?f.replace(": ",`
`)+Mb(e,c,n):f+ir(c,e))}
`},"")},Ki="Received".replace(/\w/g," "),Mb=(e,t,n)=>t.map((r,s)=>{if(s<e.length){if(vn(e[s],r))return`${Ki} ${ks(r)},`;if(Zi(e[s],r)){let o=(0,_.diff)(e[s],r,{expand:n});if(typeof o=="string"&&o.includes("- Expected")&&o.includes("+ Received"))return`${o.split(`
`).slice(3).map(i=>Ki+i).join(`
`)},`}}return`${Ki+(s<e.length?` ${(0,_.printReceived)(r)}`:(0,_.RECEIVED_COLOR)(`+ ${(0,_.stringify)(r)}`))},`}).join(`
`),Uf=(e,t)=>e.some((n,r)=>r<t.length&&Zi(n,t[r])),Zi=(e,t)=>{let n=(0,or.getType)(e),r=(0,or.getType)(t);return!(n!==r||(0,or.isPrimitive)(e)||n==="date"||n==="function"||n==="regexp"||e instanceof Error&&t instanceof Error||n==="object"&&typeof e.asymmetricMatch=="function"||r==="object"&&typeof t.asymmetricMatch=="function")},Gf=(e,t)=>e.type==="throw"?"function call threw an error":e.type==="incomplete"?"function call has not returned yet":vn(t,e.value)?ks(e.value):(0,_.printReceived)(e.value),En=(e,t,n,r,s)=>{if(n.length===0)return"";if(r&&(s===0||s===void 0))return`${e+Gf(n[0][1],t)}
`;let o=Qi(e);return e.replace(":","").trim()+`
`+n.reduce((i,[u,a])=>`${i+o(String(u+1),u===s)+Gf(a,t)}
`,"")},Wf=e=>function(t,n){let r="",s={isNot:this.isNot,promise:this.promise};(0,_.ensureNoExpected)(n,e,s),ur(t,e,r,s);let o=_n(t),i=o?"spy":t.getMockName(),u=o?t.calls.count():t.mock.calls.length,a=o?t.calls.all().map(f=>f.args):t.mock.calls,l=u>0;return{message:l?()=>(0,_.matcherHint)(e,i,r,s)+`
Expected number of calls: ${(0,_.printExpected)(0)}
Received number of calls: ${(0,_.printReceived)(u)}
`+a.reduce((f,p,m)=>(f.length<dn&&f.push(`${m+1}: ${ir(p)}`),f),[]).join(`
`):()=>(0,_.matcherHint)(e,i,r,s)+`
Expected number of calls: >= ${(0,_.printExpected)(1)}
Received number of calls: ${(0,_.printReceived)(u)}`,pass:l}},Vf=e=>function(t,n){let r="",s={isNot:this.isNot,promise:this.promise};(0,_.ensureNoExpected)(n,e,s),ar(t,e,r,s);let o=t.getMockName(),i=t.mock.results.reduce((l,c)=>c.type==="return"?l+1:l,0),u=i>0;return{message:u?()=>(0,_.matcherHint)(e,o,r,s)+`
Expected number of returns: ${(0,_.printExpected)(0)}
Received number of returns: ${(0,_.printReceived)(i)}
`+t.mock.results.reduce((l,c,f)=>(c.type==="return"&&l.length<dn&&l.push(`${f+1}: ${(0,_.printReceived)(c.value)}`),l),[]).join(`
`)+(t.mock.calls.length!==i?`
Received number of calls: ${(0,_.printReceived)(t.mock.calls.length)}`:""):()=>(0,_.matcherHint)(e,o,r,s)+`
Expected number of returns: >= ${(0,_.printExpected)(1)}
Received number of returns: ${(0,_.printReceived)(i)}`+(t.mock.calls.length!==i?`
Received number of calls: ${(0,_.printReceived)(t.mock.calls.length)}`:""),pass:u}},zf=e=>function(t,n){let r="expected",s={isNot:this.isNot,promise:this.promise};(0,_.ensureExpectedIsNonNegativeInteger)(n,e,s),ur(t,e,r,s);let o=_n(t),i=o?"spy":t.getMockName(),u=o?t.calls.count():t.mock.calls.length,a=u===n;return{message:a?()=>(0,_.matcherHint)(e,i,r,s)+`
Expected number of calls: not ${(0,_.printExpected)(n)}`:()=>(0,_.matcherHint)(e,i,r,s)+`
Expected number of calls: ${(0,_.printExpected)(n)}
Received number of calls: ${(0,_.printReceived)(u)}`,pass:a}},Kf=e=>function(t,n){let r="expected",s={isNot:this.isNot,promise:this.promise};(0,_.ensureExpectedIsNonNegativeInteger)(n,e,s),ar(t,e,r,s);let o=t.getMockName(),i=t.mock.results.reduce((l,c)=>c.type==="return"?l+1:l,0),u=i===n;return{message:u?()=>(0,_.matcherHint)(e,o,r,s)+`
Expected number of returns: not ${(0,_.printExpected)(n)}`+(t.mock.calls.length!==i?`
Received number of calls: ${(0,_.printReceived)(t.mock.calls.length)}`:""):()=>(0,_.matcherHint)(e,o,r,s)+`
Expected number of returns: ${(0,_.printExpected)(n)}
Received number of returns: ${(0,_.printReceived)(i)}`+(t.mock.calls.length!==i?`
Received number of calls: ${(0,_.printReceived)(t.mock.calls.length)}`:""),pass:u}},Yf=e=>function(t,...n){let r="...expected",s={isNot:this.isNot,promise:this.promise};ur(t,e,r,s);let o=_n(t),i=o?"spy":t.getMockName(),u=o?t.calls.all().map(c=>c.args):t.mock.calls,a=u.some(c=>vt(n,c));return{message:a?()=>{let c=[],f=0;for(;f<u.length&&c.length<dn;)vt(n,u[f])&&c.push([f,u[f]]),f+=1;return(0,_.matcherHint)(e,i,r,s)+`
Expected: not ${Ls(n)}
`+(u.length===1&&(0,_.stringify)(u[0])===(0,_.stringify)(n)?"":Xi(n,c,u.length===1))+`
Number of calls: ${(0,_.printReceived)(u.length)}`}:()=>{let c=[],f=0;for(;f<u.length&&c.length<dn;)c.push([f,u[f]]),f+=1;return(0,_.matcherHint)(e,i,r,s)+`
`+Ji(n,c,Yi(this.expand),u.length===1)+`
Number of calls: ${(0,_.printReceived)(u.length)}`},pass:a}},Qf=e=>function(t,n){let r="expected",s={isNot:this.isNot,promise:this.promise};ar(t,e,r,s);let o=t.getMockName(),{calls:i,results:u}=t.mock,a=u.some(c=>_t(n,c));return{message:a?()=>{let c=[],f=0;for(;f<u.length&&c.length<dn;)_t(n,u[f])&&c.push([f,u[f]]),f+=1;return(0,_.matcherHint)(e,o,r,s)+`
Expected: not ${(0,_.printExpected)(n)}
`+(u.length===1&&u[0].type==="return"&&(0,_.stringify)(u[0].value)===(0,_.stringify)(n)?"":En("Received: ",n,c,u.length===1))+bn(yn(u),i.length)}:()=>{let c=[],f=0;for(;f<u.length&&c.length<dn;)c.push([f,u[f]]),f+=1;return(0,_.matcherHint)(e,o,r,s)+`
Expected: ${(0,_.printExpected)(n)}
`+En("Received: ",n,c,u.length===1)+bn(yn(u),i.length)},pass:a}},Xf=e=>function(t,...n){let r="...expected",s={isNot:this.isNot,promise:this.promise};ur(t,e,r,s);let o=_n(t),i=o?"spy":t.getMockName(),u=o?t.calls.all().map(f=>f.args):t.mock.calls,a=u.length-1,l=a>=0&&vt(n,u[a]);return{message:l?()=>{let f=[];return a>0&&f.push([a-1,u[a-1]]),f.push([a,u[a]]),(0,_.matcherHint)(e,i,r,s)+`
Expected: not ${Ls(n)}
`+(u.length===1&&(0,_.stringify)(u[0])===(0,_.stringify)(n)?"":Xi(n,f,u.length===1,a))+`
Number of calls: ${(0,_.printReceived)(u.length)}`}:()=>{let f=[];if(a>=0){if(a>0){let p=a-1;for(;p>=0&&!vt(n,u[p]);)p-=1;p<0&&(p=a-1),f.push([p,u[p]])}f.push([a,u[a]])}return(0,_.matcherHint)(e,i,r,s)+`
`+Ji(n,f,Yi(this.expand),u.length===1,a)+`
Number of calls: ${(0,_.printReceived)(u.length)}`},pass:l}},Jf=e=>function(t,n){let r="expected",s={isNot:this.isNot,promise:this.promise};ar(t,e,r,s);let o=t.getMockName(),{calls:i,results:u}=t.mock,a=u.length-1,l=a>=0&&_t(n,u[a]);return{message:l?()=>{let f=[];return a>0&&f.push([a-1,u[a-1]]),f.push([a,u[a]]),(0,_.matcherHint)(e,o,r,s)+`
Expected: not ${(0,_.printExpected)(n)}
`+(u.length===1&&u[0].type==="return"&&(0,_.stringify)(u[0].value)===(0,_.stringify)(n)?"":En("Received: ",n,f,u.length===1,a))+bn(yn(u),i.length)}:()=>{let f=[];if(a>=0){if(a>0){let p=a-1;for(;p>=0&&!_t(n,u[p]);)p-=1;p<0&&(p=a-1),f.push([p,u[p]])}f.push([a,u[a]])}return(0,_.matcherHint)(e,o,r,s)+`
Expected: ${(0,_.printExpected)(n)}
`+En("Received: ",n,f,u.length===1,a)+bn(yn(u),i.length)},pass:l}},Zf=e=>function(t,n,...r){let s="n",o={expectedColor:m=>m,isNot:this.isNot,promise:this.promise,secondArgument:"...expected"};if(ur(t,e,s,o),!Number.isSafeInteger(n)||n<1)throw new Error((0,_.matcherErrorMessage)((0,_.matcherHint)(e,void 0,s,o),`${s} must be a positive integer`,(0,_.printWithType)(s,n,_.stringify)));let i=_n(t),u=i?"spy":t.getMockName(),a=i?t.calls.all().map(m=>m.args):t.mock.calls,l=a.length,c=n-1,f=c<l&&vt(r,a[c]);return{message:f?()=>{let m=[];return c-1>=0&&m.push([c-1,a[c-1]]),m.push([c,a[c]]),c+1<l&&m.push([c+1,a[c+1]]),(0,_.matcherHint)(e,u,s,o)+`
n: ${n}
Expected: not ${Ls(r)}
`+(a.length===1&&(0,_.stringify)(a[0])===(0,_.stringify)(r)?"":Xi(r,m,a.length===1,c))+`
Number of calls: ${(0,_.printReceived)(a.length)}`}:()=>{let m=[];if(c<l){if(c-1>=0){let h=c-1;for(;h>=0&&!vt(r,a[h]);)h-=1;h<0&&(h=c-1),m.push([h,a[h]])}if(m.push([c,a[c]]),c+1<l){let h=c+1;for(;h<l&&!vt(r,a[h]);)h+=1;h>=l&&(h=c+1),m.push([h,a[h]])}}else if(l>0){let h=l-1;for(;h>=0&&!vt(r,a[h]);)h-=1;h<0&&(h=l-1),m.push([h,a[h]])}return(0,_.matcherHint)(e,u,s,o)+`
n: ${n}
`+Ji(r,m,Yi(this.expand),a.length===1,c)+`
Number of calls: ${(0,_.printReceived)(a.length)}`},pass:f}},ep=e=>function(t,n,r){let s="n",o={expectedColor:m=>m,isNot:this.isNot,promise:this.promise,secondArgument:"expected"};if(ar(t,e,s,o),!Number.isSafeInteger(n)||n<1)throw new Error((0,_.matcherErrorMessage)((0,_.matcherHint)(e,void 0,s,o),`${s} must be a positive integer`,(0,_.printWithType)(s,n,_.stringify)));let i=t.getMockName(),{calls:u,results:a}=t.mock,l=a.length,c=n-1,f=c<l&&_t(r,a[c]);return{message:f?()=>{let m=[];return c-1>=0&&m.push([c-1,a[c-1]]),m.push([c,a[c]]),c+1<l&&m.push([c+1,a[c+1]]),(0,_.matcherHint)(e,i,s,o)+`
n: ${n}
Expected: not ${(0,_.printExpected)(r)}
`+(a.length===1&&a[0].type==="return"&&(0,_.stringify)(a[0].value)===(0,_.stringify)(r)?"":En("Received: ",r,m,a.length===1,c))+bn(yn(a),u.length)}:()=>{let m=[];if(c<l){if(c-1>=0){let h=c-1;for(;h>=0&&!_t(r,a[h]);)h-=1;h<0&&(h=c-1),m.push([h,a[h]])}if(m.push([c,a[c]]),c+1<l){let h=c+1;for(;h<l&&!_t(r,a[h]);)h+=1;h>=l&&(h=c+1),m.push([h,a[h]])}}else if(l>0){let h=l-1;for(;h>=0&&!_t(r,a[h]);)h-=1;h<0&&(h=l-1),m.push([h,a[h]])}return(0,_.matcherHint)(e,i,s,o)+`
n: ${n}
Expected: ${(0,_.printExpected)(r)}
`+En("Received: ",r,m,a.length===1,c)+bn(yn(a),u.length)},pass:f}},Tb={lastCalledWith:Xf("lastCalledWith"),lastReturnedWith:Jf("lastReturnedWith"),nthCalledWith:Zf("nthCalledWith"),nthReturnedWith:ep("nthReturnedWith"),toBeCalled:Wf("toBeCalled"),toBeCalledTimes:zf("toBeCalledTimes"),toBeCalledWith:Yf("toBeCalledWith"),toHaveBeenCalled:Wf("toHaveBeenCalled"),toHaveBeenCalledTimes:zf("toHaveBeenCalledTimes"),toHaveBeenCalledWith:Yf("toHaveBeenCalledWith"),toHaveBeenLastCalledWith:Xf("toHaveBeenLastCalledWith"),toHaveBeenNthCalledWith:Zf("toHaveBeenNthCalledWith"),toHaveLastReturnedWith:Jf("toHaveLastReturnedWith"),toHaveNthReturnedWith:ep("toHaveNthReturnedWith"),toHaveReturned:Vf("toHaveReturned"),toHaveReturnedTimes:Kf("toHaveReturnedTimes"),toHaveReturnedWith:Qf("toHaveReturnedWith"),toReturn:Vf("toReturn"),toReturnTimes:Kf("toReturnTimes"),toReturnWith:Qf("toReturnWith")},np=e=>e!=null&&e._isMockFunction===!0,_n=e=>e!=null&&e.calls!=null&&typeof e.calls.all=="function"&&typeof e.calls.count=="function",ur=(e,t,n,r)=>{if(!np(e)&&!_n(e))throw new Error((0,_.matcherErrorMessage)((0,_.matcherHint)(t,void 0,n,r),`${(0,_.RECEIVED_COLOR)("received")} value must be a mock or spy function`,(0,_.printWithType)("Received",e,_.printReceived)))},ar=(e,t,n,r)=>{if(!np(e))throw new Error((0,_.matcherErrorMessage)((0,_.matcherHint)(t,void 0,n,r),`${(0,_.RECEIVED_COLOR)("received")} value must be a mock function`,(0,_.printWithType)("Received",e,_.printReceived)))},rp=Tb;var Sh=ie(ln()),z=ie(ze()),Zs=ie(Rh());var Tn="Received function did not throw",Oh=e=>{let t=e!=null&&typeof e.message=="string";return t&&typeof e.name=="string"&&typeof e.stack=="string"?{hasMessage:t,isError:!0,message:e.message,value:e}:{hasMessage:t,isError:!1,message:t?e.message:String(e),value:e}},Js=(e,t)=>function(n,r){let s={isNot:this.isNot,promise:this.promise},o=null;if(t&&(0,Sh.isError)(n))o=Oh(n);else if(typeof n!="function"){if(!t){let i=r===void 0?"":"expected";throw new Error((0,z.matcherErrorMessage)((0,z.matcherHint)(e,void 0,i,s),`${(0,z.RECEIVED_COLOR)("received")} value must be a function`,(0,z.printWithType)("Received",n,z.printReceived)))}}else try{n()}catch(i){o=Oh(i)}if(r===void 0)return U2(e,s,o);if(typeof r=="function")return q2(e,s,o,r);if(typeof r=="string")return H2(e,s,o,r);if(r!==null&&typeof r.test=="function")return F2(e,s,o,r);if(r!==null&&typeof r.asymmetricMatch=="function")return j2(e,s,o,r);if(r!==null&&typeof r=="object")return B2(e,s,o,r);throw new Error((0,z.matcherErrorMessage)((0,z.matcherHint)(e,void 0,void 0,s),`${(0,z.EXPECTED_COLOR)("expected")} value must be a string or regular expression or class or error`,(0,z.printWithType)("Expected",r,z.printExpected)))},D2={toThrow:Js("toThrow"),toThrowError:Js("toThrowError")},F2=(e,t,n,r)=>{let s=n!==null&&r.test(n.message);return{message:s?()=>(0,z.matcherHint)(e,void 0,void 0,t)+`
`+nt("Expected pattern: not ",r)+(n!==null&&n.hasMessage?oe("Received message: ",n,"message",r)+He(n):oe("Received value: ",n,"value")):()=>(0,z.matcherHint)(e,void 0,void 0,t)+`
`+nt("Expected pattern: ",r)+(n===null?`
${Tn}`:n.hasMessage?oe("Received message: ",n,"message")+He(n):oe("Received value: ",n,"value")),pass:s}},j2=(e,t,n,r)=>{let s=n!==null&&r.asymmetricMatch(n.value);return{message:s?()=>(0,z.matcherHint)(e,void 0,void 0,t)+`
`+nt("Expected asymmetric matcher: not ",r)+`
`+(n!==null&&n.hasMessage?oe("Received name: ",n,"name")+oe("Received message: ",n,"message")+He(n):oe("Thrown value: ",n,"value")):()=>(0,z.matcherHint)(e,void 0,void 0,t)+`
`+nt("Expected asymmetric matcher: ",r)+`
`+(n===null?Tn:n.hasMessage?oe("Received name: ",n,"name")+oe("Received message: ",n,"message")+He(n):oe("Thrown value: ",n,"value")),pass:s}},B2=(e,t,n,r)=>{let s=Ch(r),o=n!==null?Ch(n.value):null,i=n!==null&&n.message===r.message&&o===s;return{message:i?()=>(0,z.matcherHint)(e,void 0,void 0,t)+`
`+nt(`Expected ${mr(r)}: not `,s)+(n!==null&&n.hasMessage?He(n):oe("Received value: ",n,"value")):()=>(0,z.matcherHint)(e,void 0,void 0,t)+`
`+(n===null?nt(`Expected ${mr(r)}: `,s)+`
`+Tn:n.hasMessage?(0,z.printDiffOrStringify)(s,o,`Expected ${mr(r)}`,`Received ${mr(n.value)}`,!0)+`
`+He(n):nt(`Expected ${mr(r)}: `,s)+oe("Received value: ",n,"value")),pass:i}},q2=(e,t,n,r)=>{let s=n!==null&&n.value instanceof r;return{message:s?()=>(0,z.matcherHint)(e,void 0,void 0,t)+`
`+Ts("Expected constructor",r)+(n!==null&&n.value!=null&&typeof n.value.constructor=="function"&&n.value.constructor!==r?$s("Received constructor",n.value.constructor,r):"")+`
`+(n!==null&&n.hasMessage?oe("Received message: ",n,"message")+He(n):oe("Received value: ",n,"value")):()=>(0,z.matcherHint)(e,void 0,void 0,t)+`
`+Ms("Expected constructor",r)+(n===null?`
${Tn}`:`${n.value!=null&&typeof n.value.constructor=="function"?xs("Received constructor",n.value.constructor):""}
${n.hasMessage?oe("Received message: ",n,"message")+He(n):oe("Received value: ",n,"value")}`),pass:s}},H2=(e,t,n,r)=>{let s=n!==null&&n.message.includes(r);return{message:s?()=>(0,z.matcherHint)(e,void 0,void 0,t)+`
`+nt("Expected substring: not ",r)+(n!==null&&n.hasMessage?oe("Received message: ",n,"message",r)+He(n):oe("Received value: ",n,"value")):()=>(0,z.matcherHint)(e,void 0,void 0,t)+`
`+nt("Expected substring: ",r)+(n===null?`
${Tn}`:n.hasMessage?oe("Received message: ",n,"message")+He(n):oe("Received value: ",n,"value")),pass:s}},U2=(e,t,n)=>{let r=n!==null;return{message:r?()=>(0,z.matcherHint)(e,void 0,"",t)+`
`+(n!==null&&n.hasMessage?oe("Error name: ",n,"name")+oe("Error message: ",n,"message")+He(n):oe("Thrown value: ",n,"value")):()=>(0,z.matcherHint)(e,void 0,"",t)+`
`+Tn,pass:r}},nt=(e,t)=>`${e+(0,z.printExpected)(t)}
`,oe=(e,t,n,r)=>{if(t===null)return"";if(n==="message"){let s=t.message;if(typeof r=="string"){let o=s.indexOf(r);if(o!==-1)return`${e+mn(s,o,r.length)}
`}else if(r instanceof RegExp)return`${e+As(s,typeof r.exec=="function"?r.exec(s):null)}
`;return`${e+(0,z.printReceived)(s)}
`}return n==="name"?t.isError?`${e+(0,z.printReceived)(t.value.name)}
`:"":n==="value"?t.isError?"":`${e+(0,z.printReceived)(t.value)}
`:""},He=e=>e===null||!e.isError?"":(0,Zs.formatStackTrace)((0,Zs.separateMessageFromStack)(e.value.stack).stack,{rootDir:process.cwd(),testMatch:[]},{noStackTrace:!1});function wh(e){return e.cause instanceof Error?`{ message: ${e.message}, cause: ${wh(e.cause)}}`:`{ message: ${e.message} }`}function Ch(e){return e.cause instanceof Error?wh(e):e.message}function mr(e){return e.cause===void 0?"message":"message and cause"}var Ah=D2;var Je=class extends Error{},G2=function(e){return function(t,n){return e.apply(this,[t,n,!0])}},W2=(e,t)=>e==="toThrow"||e==="toThrowError"?Js(e,!0):e==="toThrowErrorMatchingSnapshot"||e==="toThrowErrorMatchingInlineSnapshot"?G2(t):null,le=(e,...t)=>{if(t.length!==0)throw new Error("Expect takes at most one argument.");let n=Lf(),r={not:{},rejects:{not:{}},resolves:{not:{}}},s=new Je;return Object.keys(n).forEach(o=>{let i=n[o],u=W2(o,i)||i;r[o]=eo(i,!1,"",e),r.not[o]=eo(i,!0,"",e),r.resolves[o]=Mh(o,u,!1,e,s),r.resolves.not[o]=Mh(o,u,!0,e,s),r.rejects[o]=Th(o,u,!1,e,s),r.rejects.not[o]=Th(o,u,!0,e,s)}),r},V2=e=>e&&e()||ne.RECEIVED_COLOR("No message was specified for this matcher."),Mh=(e,t,n,r,s)=>(...o)=>{let i={isNot:n,promise:"resolves"};if(!(0,to.isPromise)(r))throw new Je(ne.matcherErrorMessage(ne.matcherHint(e,void 0,"",i),`${ne.RECEIVED_COLOR("received")} value must be a promise`,ne.printWithType("Received",r,ne.printReceived)));let u=new Je;return r.then(a=>eo(t,n,"resolves",a,u).apply(null,o),a=>(s.message=`${ne.matcherHint(e,void 0,"",i)}
Received promise rejected instead of resolved
Rejected to value: ${ne.printReceived(a)}`,Promise.reject(s)))},Th=(e,t,n,r,s)=>(...o)=>{let i={isNot:n,promise:"rejects"},u=typeof r=="function"?r():r;if(!(0,to.isPromise)(u))throw new Je(ne.matcherErrorMessage(ne.matcherHint(e,void 0,"",i),`${ne.RECEIVED_COLOR("received")} value must be a promise or a function returning a promise`,ne.printWithType("Received",r,ne.printReceived)));let a=new Je;return u.then(l=>(s.message=`${ne.matcherHint(e,void 0,"",i)}
Received promise resolved instead of rejected
Resolved to value: ${ne.printReceived(l)}`,Promise.reject(s)),l=>eo(t,n,"rejects",l,a).apply(null,o))},eo=(e,t,n,r,s)=>function o(...i){let u=!0,a={...ne,iterableEquality:xn.iterableEquality,subsetEquality:xn.subsetEquality},l={customTesters:gn(),dontThrow:()=>u=!1,equals:xn.equals,utils:a},c={...Ye(),...l,error:s,isNot:t,promise:n},f=(h,d)=>{if(z2(h),Ye().assertionCalls++,h.pass&&t||!h.pass&&!t){let v=V2(h.message),O;if(s?(O=s,O.message=v):d?(O=d,O.message=v):(O=new Je(v),Error.captureStackTrace&&Error.captureStackTrace(O,o)),O.matcherResult={...h,message:v},u)throw O;Ye().suppressedErrors.push(O)}else Ye().numPassingAsserts++},p=h=>{throw e[cs]===!0&&!(h instanceof Je)&&h.name!=="PrettyFormatPluginError"&&Error.captureStackTrace&&Error.captureStackTrace(h,o),h},m;try{if(m=e[cs]===!0?e.call(c,r,...i):function(){return e.call(c,r,...i)}(),(0,to.isPromise)(m)){let h=new Je;return Error.captureStackTrace&&Error.captureStackTrace(h,o),m.then(d=>f(d,h)).catch(p)}else return f(m)}catch(h){return p(h)}};le.extend=e=>nr(e,!1,le);le.addEqualityTesters=e=>kf(e);le.anything=ds;le.any=ms;le.not={arrayContaining:bs,closeTo:ws,objectContaining:vs,stringContaining:Rs,stringMatching:Cs};le.arrayContaining=ys;le.closeTo=Ss;le.objectContaining=Es;le.stringContaining=_s;le.stringMatching=Os;var z2=e=>{if(typeof e!="object"||typeof e.pass!="boolean"||e.message&&typeof e.message!="string"&&typeof e.message!="function")throw new Error(`Unexpected return from a matcher function.
Matcher functions should return an object in the following format:
{message?: string | function, pass: boolean}
'${ne.stringify(e)}' was returned`)};function xh(e){let t=new Error;Error.captureStackTrace&&Error.captureStackTrace(t,xh),hn({expectedAssertionsNumber:e,expectedAssertionsNumberError:t})}function $h(...e){let t=new Error;Error.captureStackTrace&&Error.captureStackTrace(t,$h),ne.ensureNoExpected(e[0],".hasAssertions"),hn({isExpectingAssertions:!0,isExpectingAssertionsError:t})}nr(Hf,!0,le);nr(rp,!0,le);nr(Ah,!0,le);le.assertions=xh;le.hasAssertions=$h;le.getState=Ye;le.setState=hn;le.extractExpectedAssertionsErrors=Bf;var Ih=le;var Dh=ie(Lh()),Ct=ie(ze()),rv=Ih,sv={any:ms,anything:ds,arrayContaining:ys,arrayNotContaining:bs,closeTo:Ss,notCloseTo:ws,objectContaining:Es,objectNotContaining:vs,stringContaining:_s,stringMatching:Os,stringNotContaining:Rs,stringNotMatching:Cs},ov={stringify:kh.stringify};0&&(module.exports={EXPECTED_COLOR,INVERTED_COLOR,RECEIVED_COLOR,asymmetricMatchers,expect,matcherUtils,mock,printReceived});
/*! Bundled license information:
react-is/cjs/react-is.production.min.js:
(**
* @license React
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
react-is/cjs/react-is.development.js:
(**
* @license React
* react-is.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
is-number/index.js:
(*!
* is-number <https://github.com/jonschlinkert/is-number>
*
* Copyright (c) 2014-present, Jon Schlinkert.
* Released under the MIT License.
*)
to-regex-range/index.js:
(*!
* to-regex-range <https://github.com/micromatch/to-regex-range>
*
* Copyright (c) 2015-present, Jon Schlinkert.
* Released under the MIT License.
*)
fill-range/index.js:
(*!
* fill-range <https://github.com/jonschlinkert/fill-range>
*
* Copyright (c) 2014-present, Jon Schlinkert.
* Licensed under the MIT License.
*)
*/
+302
View File
@@ -0,0 +1,302 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var fixtures_exports = {};
__export(fixtures_exports, {
FixturePool: () => FixturePool,
fixtureParameterNames: () => fixtureParameterNames,
formatPotentiallyInternalLocation: () => formatPotentiallyInternalLocation,
inheritFixtureNames: () => inheritFixtureNames
});
module.exports = __toCommonJS(fixtures_exports);
var import_crypto = __toESM(require("crypto"));
var import_util = require("../util");
const kScopeOrder = ["test", "worker"];
function isFixtureTuple(value) {
return Array.isArray(value) && typeof value[1] === "object";
}
function isFixtureOption(value) {
return isFixtureTuple(value) && !!value[1].option;
}
class FixturePool {
constructor(fixturesList, onLoadError, parentPool, disallowWorkerFixtures, optionOverrides) {
this._registrations = new Map(parentPool ? parentPool._registrations : []);
this._onLoadError = onLoadError;
const allOverrides = optionOverrides?.overrides ?? {};
const overrideKeys = new Set(Object.keys(allOverrides));
for (const list of fixturesList) {
this._appendFixtureList(list, !!disallowWorkerFixtures, false);
const selectedOverrides = {};
for (const [key, value] of Object.entries(list.fixtures)) {
if (isFixtureOption(value) && overrideKeys.has(key))
selectedOverrides[key] = [allOverrides[key], value[1]];
}
if (Object.entries(selectedOverrides).length)
this._appendFixtureList({ fixtures: selectedOverrides, location: optionOverrides.location }, !!disallowWorkerFixtures, true);
}
this.digest = this.validate();
}
_appendFixtureList(list, disallowWorkerFixtures, isOptionsOverride) {
const { fixtures, location } = list;
for (const entry of Object.entries(fixtures)) {
const name = entry[0];
let value = entry[1];
let options;
if (isFixtureTuple(value)) {
options = {
auto: value[1].auto ?? false,
scope: value[1].scope || "test",
option: !!value[1].option,
timeout: value[1].timeout,
customTitle: value[1].title,
box: value[1].box
};
value = value[0];
}
let fn = value;
const previous = this._registrations.get(name);
if (previous && options) {
if (previous.scope !== options.scope) {
this._addLoadError(`Fixture "${name}" has already been registered as a { scope: '${previous.scope}' } fixture defined in ${(0, import_util.formatLocation)(previous.location)}.`, location);
continue;
}
if (previous.auto !== options.auto) {
this._addLoadError(`Fixture "${name}" has already been registered as a { auto: '${previous.scope}' } fixture defined in ${(0, import_util.formatLocation)(previous.location)}.`, location);
continue;
}
} else if (previous) {
options = { auto: previous.auto, scope: previous.scope, option: previous.option, timeout: previous.timeout, customTitle: previous.customTitle };
} else if (!options) {
options = { auto: false, scope: "test", option: false, timeout: void 0 };
}
if (!kScopeOrder.includes(options.scope)) {
this._addLoadError(`Fixture "${name}" has unknown { scope: '${options.scope}' }.`, location);
continue;
}
if (options.scope === "worker" && disallowWorkerFixtures) {
this._addLoadError(`Cannot use({ ${name} }) in a describe group, because it forces a new worker.
Make it top-level in the test file or put in the configuration file.`, location);
continue;
}
if (fn === void 0 && options.option && previous) {
let original = previous;
while (!original.optionOverride && original.super)
original = original.super;
fn = original.fn;
}
const deps = fixtureParameterNames(fn, location, (e) => this._onLoadError(e));
const registration = { id: "", name, location, scope: options.scope, fn, auto: options.auto, option: options.option, timeout: options.timeout, customTitle: options.customTitle, box: options.box, deps, super: previous, optionOverride: isOptionsOverride };
registrationId(registration);
this._registrations.set(name, registration);
}
}
validate() {
const markers = /* @__PURE__ */ new Map();
const stack = [];
let hasDependencyErrors = false;
const addDependencyError = (message, location) => {
hasDependencyErrors = true;
this._addLoadError(message, location);
};
const visit = (registration, boxedOnly) => {
markers.set(registration, "visiting");
stack.push(registration);
for (const name of registration.deps) {
const dep = this.resolve(name, registration);
if (!dep) {
if (name === registration.name)
addDependencyError(`Fixture "${registration.name}" references itself, but does not have a base implementation.`, registration.location);
else
addDependencyError(`Fixture "${registration.name}" has unknown parameter "${name}".`, registration.location);
continue;
}
if (kScopeOrder.indexOf(registration.scope) > kScopeOrder.indexOf(dep.scope)) {
addDependencyError(`${registration.scope} fixture "${registration.name}" cannot depend on a ${dep.scope} fixture "${name}" defined in ${formatPotentiallyInternalLocation(dep.location)}.`, registration.location);
continue;
}
if (!markers.has(dep)) {
visit(dep, boxedOnly);
} else if (markers.get(dep) === "visiting") {
const index = stack.indexOf(dep);
const allRegs = stack.slice(index, stack.length);
const filteredRegs = allRegs.filter((r) => !r.box);
const regs = boxedOnly ? filteredRegs : allRegs;
const names2 = regs.map((r) => `"${r.name}"`);
addDependencyError(`Fixtures ${names2.join(" -> ")} -> "${dep.name}" form a dependency cycle: ${regs.map((r) => formatPotentiallyInternalLocation(r.location)).join(" -> ")} -> ${formatPotentiallyInternalLocation(dep.location)}`, dep.location);
continue;
}
}
markers.set(registration, "visited");
stack.pop();
};
const names = Array.from(this._registrations.keys()).sort();
for (const name of names) {
const registration = this._registrations.get(name);
if (!registration.box)
visit(registration, true);
}
if (!hasDependencyErrors) {
for (const name of names) {
const registration = this._registrations.get(name);
if (registration.box)
visit(registration, false);
}
}
const hash = import_crypto.default.createHash("sha1");
for (const name of names) {
const registration = this._registrations.get(name);
if (registration.scope === "worker")
hash.update(registration.id + ";");
}
return hash.digest("hex");
}
validateFunction(fn, prefix, location) {
for (const name of fixtureParameterNames(fn, location, (e) => this._onLoadError(e))) {
const registration = this._registrations.get(name);
if (!registration)
this._addLoadError(`${prefix} has unknown parameter "${name}".`, location);
}
}
resolve(name, forFixture) {
if (name === forFixture?.name)
return forFixture.super;
return this._registrations.get(name);
}
autoFixtures() {
return [...this._registrations.values()].filter((r) => r.auto !== false);
}
_addLoadError(message, location) {
this._onLoadError({ message, location });
}
}
const signatureSymbol = Symbol("signature");
function formatPotentiallyInternalLocation(location) {
const isUserFixture = location && (0, import_util.filterStackFile)(location.file);
return isUserFixture ? (0, import_util.formatLocation)(location) : "<builtin>";
}
function fixtureParameterNames(fn, location, onError) {
if (typeof fn !== "function")
return [];
if (!fn[signatureSymbol])
fn[signatureSymbol] = innerFixtureParameterNames(fn, location, onError);
return fn[signatureSymbol];
}
function inheritFixtureNames(from, to) {
to[signatureSymbol] = from[signatureSymbol];
}
function innerFixtureParameterNames(fn, location, onError) {
const text = filterOutComments(fn.toString());
const match = text.match(/(?:async)?(?:\s+function)?[^(]*\(([^)]*)/);
if (!match)
return [];
const trimmedParams = match[1].trim();
if (!trimmedParams)
return [];
const [firstParam] = splitByComma(trimmedParams);
if (firstParam[0] !== "{" || firstParam[firstParam.length - 1] !== "}") {
onError({ message: "First argument must use the object destructuring pattern: " + firstParam, location });
return [];
}
const props = splitByComma(firstParam.substring(1, firstParam.length - 1)).map((prop) => {
const colon = prop.indexOf(":");
return colon === -1 ? prop.trim() : prop.substring(0, colon).trim();
});
const restProperty = props.find((prop) => prop.startsWith("..."));
if (restProperty) {
onError({ message: `Rest property "${restProperty}" is not supported. List all used fixtures explicitly, separated by comma.`, location });
return [];
}
return props;
}
function filterOutComments(s) {
const result = [];
let commentState = "none";
for (let i = 0; i < s.length; ++i) {
if (commentState === "singleline") {
if (s[i] === "\n")
commentState = "none";
} else if (commentState === "multiline") {
if (s[i - 1] === "*" && s[i] === "/")
commentState = "none";
} else if (commentState === "none") {
if (s[i] === "/" && s[i + 1] === "/") {
commentState = "singleline";
} else if (s[i] === "/" && s[i + 1] === "*") {
commentState = "multiline";
i += 2;
} else {
result.push(s[i]);
}
}
}
return result.join("");
}
function splitByComma(s) {
const result = [];
const stack = [];
let start = 0;
for (let i = 0; i < s.length; i++) {
if (s[i] === "{" || s[i] === "[") {
stack.push(s[i] === "{" ? "}" : "]");
} else if (s[i] === stack[stack.length - 1]) {
stack.pop();
} else if (!stack.length && s[i] === ",") {
const token = s.substring(start, i).trim();
if (token)
result.push(token);
start = i + 1;
}
}
const lastToken = s.substring(start).trim();
if (lastToken)
result.push(lastToken);
return result;
}
const registrationIdMap = /* @__PURE__ */ new Map();
let lastId = 0;
function registrationId(registration) {
if (registration.id)
return registration.id;
const key = registration.name + "@@@" + (registration.super ? registrationId(registration.super) : "");
let map = registrationIdMap.get(key);
if (!map) {
map = /* @__PURE__ */ new Map();
registrationIdMap.set(key, map);
}
if (!map.has(registration.fn))
map.set(registration.fn, String(lastId++));
registration.id = map.get(registration.fn);
return registration.id;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
FixturePool,
fixtureParameterNames,
formatPotentiallyInternalLocation,
inheritFixtureNames
});
+58
View File
@@ -0,0 +1,58 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var globals_exports = {};
__export(globals_exports, {
currentTestInfo: () => currentTestInfo,
currentlyLoadingFileSuite: () => currentlyLoadingFileSuite,
isWorkerProcess: () => isWorkerProcess,
setCurrentTestInfo: () => setCurrentTestInfo,
setCurrentlyLoadingFileSuite: () => setCurrentlyLoadingFileSuite,
setIsWorkerProcess: () => setIsWorkerProcess
});
module.exports = __toCommonJS(globals_exports);
let currentTestInfoValue = null;
function setCurrentTestInfo(testInfo) {
currentTestInfoValue = testInfo;
}
function currentTestInfo() {
return currentTestInfoValue;
}
let currentFileSuite;
function setCurrentlyLoadingFileSuite(suite) {
currentFileSuite = suite;
}
function currentlyLoadingFileSuite() {
return currentFileSuite;
}
let _isWorkerProcess = false;
function setIsWorkerProcess() {
_isWorkerProcess = true;
}
function isWorkerProcess() {
return _isWorkerProcess;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
currentTestInfo,
currentlyLoadingFileSuite,
isWorkerProcess,
setCurrentTestInfo,
setCurrentlyLoadingFileSuite,
setIsWorkerProcess
});
+60
View File
@@ -0,0 +1,60 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var ipc_exports = {};
__export(ipc_exports, {
serializeConfig: () => serializeConfig,
stdioChunkToParams: () => stdioChunkToParams
});
module.exports = __toCommonJS(ipc_exports);
var import_util = __toESM(require("util"));
var import_compilationCache = require("../transform/compilationCache");
function serializeConfig(config, passCompilationCache) {
const result = {
location: { configDir: config.configDir, resolvedConfigFile: config.config.configFile },
configCLIOverrides: config.configCLIOverrides,
compilationCache: passCompilationCache ? (0, import_compilationCache.serializeCompilationCache)() : void 0
};
try {
result.metadata = JSON.stringify(config.config.metadata);
} catch (error) {
}
return result;
}
function stdioChunkToParams(chunk) {
if (chunk instanceof Uint8Array)
return { buffer: Buffer.from(chunk).toString("base64") };
if (typeof chunk !== "string")
return { text: import_util.default.inspect(chunk) };
return { text: chunk };
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
serializeConfig,
stdioChunkToParams
});
+85
View File
@@ -0,0 +1,85 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var poolBuilder_exports = {};
__export(poolBuilder_exports, {
PoolBuilder: () => PoolBuilder
});
module.exports = __toCommonJS(poolBuilder_exports);
var import_fixtures = require("./fixtures");
var import_util = require("../util");
class PoolBuilder {
constructor(type, project) {
this._testTypePools = /* @__PURE__ */ new Map();
this._type = type;
this._project = project;
}
static createForLoader() {
return new PoolBuilder("loader");
}
static createForWorker(project) {
return new PoolBuilder("worker", project);
}
buildPools(suite, testErrors) {
suite.forEachTest((test) => {
const pool = this._buildPoolForTest(test, testErrors);
if (this._type === "loader")
test._poolDigest = pool.digest;
if (this._type === "worker")
test._pool = pool;
});
}
_buildPoolForTest(test, testErrors) {
let pool = this._buildTestTypePool(test._testType, testErrors);
const parents = [];
for (let parent = test.parent; parent; parent = parent.parent)
parents.push(parent);
parents.reverse();
for (const parent of parents) {
if (parent._use.length)
pool = new import_fixtures.FixturePool(parent._use, (e) => this._handleLoadError(e, testErrors), pool, parent._type === "describe");
for (const hook of parent._hooks)
pool.validateFunction(hook.fn, hook.type + " hook", hook.location);
for (const modifier of parent._modifiers)
pool.validateFunction(modifier.fn, modifier.type + " modifier", modifier.location);
}
pool.validateFunction(test.fn, "Test", test.location);
return pool;
}
_buildTestTypePool(testType, testErrors) {
if (!this._testTypePools.has(testType)) {
const optionOverrides = {
overrides: this._project?.project?.use ?? {},
location: { file: `project#${this._project?.id}`, line: 1, column: 1 }
};
const pool = new import_fixtures.FixturePool(testType.fixtures, (e) => this._handleLoadError(e, testErrors), void 0, void 0, optionOverrides);
this._testTypePools.set(testType, pool);
}
return this._testTypePools.get(testType);
}
_handleLoadError(e, testErrors) {
if (testErrors)
testErrors.push(e);
else
throw new Error(`${(0, import_util.formatLocation)(e.location)}: ${e.message}`);
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
PoolBuilder
});
+104
View File
@@ -0,0 +1,104 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var process_exports = {};
__export(process_exports, {
ProcessRunner: () => ProcessRunner
});
module.exports = __toCommonJS(process_exports);
var import_utils = require("playwright-core/lib/utils");
var import_util = require("../util");
class ProcessRunner {
async gracefullyClose() {
}
dispatchEvent(method, params) {
const response = { method, params };
sendMessageToParent({ method: "__dispatch__", params: response });
}
}
let gracefullyCloseCalled = false;
let forceExitInitiated = false;
sendMessageToParent({ method: "ready" });
process.on("disconnect", () => gracefullyCloseAndExit(true));
process.on("SIGINT", () => {
});
process.on("SIGTERM", () => {
});
let processRunner;
let processName;
const startingEnv = { ...process.env };
process.on("message", async (message) => {
if (message.method === "__init__") {
const { processParams, runnerParams, runnerScript } = message.params;
void (0, import_utils.startProfiling)();
(0, import_utils.setTimeOrigin)(processParams.timeOrigin);
const { create } = require(runnerScript);
processRunner = create(runnerParams);
processName = processParams.processName;
return;
}
if (message.method === "__stop__") {
const keys = /* @__PURE__ */ new Set([...Object.keys(process.env), ...Object.keys(startingEnv)]);
const producedEnv = [...keys].filter((key) => startingEnv[key] !== process.env[key]).map((key) => [key, process.env[key] ?? null]);
sendMessageToParent({ method: "__env_produced__", params: producedEnv });
await gracefullyCloseAndExit(false);
return;
}
if (message.method === "__dispatch__") {
const { id, method, params } = message.params;
try {
const result = await processRunner[method](params);
const response = { id, result };
sendMessageToParent({ method: "__dispatch__", params: response });
} catch (e) {
const response = { id, error: (0, import_util.serializeError)(e) };
sendMessageToParent({ method: "__dispatch__", params: response });
}
}
});
const kForceExitTimeout = +(process.env.PWTEST_FORCE_EXIT_TIMEOUT || 3e4);
async function gracefullyCloseAndExit(forceExit) {
if (forceExit && !forceExitInitiated) {
forceExitInitiated = true;
setTimeout(() => process.exit(0), kForceExitTimeout);
}
if (!gracefullyCloseCalled) {
gracefullyCloseCalled = true;
await processRunner?.gracefullyClose().catch(() => {
});
if (processName)
await (0, import_utils.stopProfiling)(processName).catch(() => {
});
process.exit(0);
}
}
function sendMessageToParent(message) {
try {
process.send(message);
} catch (e) {
try {
JSON.stringify(message);
} catch {
throw e;
}
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
ProcessRunner
});
+140
View File
@@ -0,0 +1,140 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var suiteUtils_exports = {};
__export(suiteUtils_exports, {
applyRepeatEachIndex: () => applyRepeatEachIndex,
bindFileSuiteToProject: () => bindFileSuiteToProject,
filterByFocusedLine: () => filterByFocusedLine,
filterOnly: () => filterOnly,
filterSuite: () => filterSuite,
filterTestsRemoveEmptySuites: () => filterTestsRemoveEmptySuites
});
module.exports = __toCommonJS(suiteUtils_exports);
var import_path = __toESM(require("path"));
var import_utils = require("playwright-core/lib/utils");
var import_util = require("../util");
function filterSuite(suite, suiteFilter, testFilter) {
for (const child of suite.suites) {
if (!suiteFilter(child))
filterSuite(child, suiteFilter, testFilter);
}
const filteredTests = suite.tests.filter(testFilter);
const entries = /* @__PURE__ */ new Set([...suite.suites, ...filteredTests]);
suite._entries = suite._entries.filter((e) => entries.has(e));
}
function filterTestsRemoveEmptySuites(suite, filter) {
const filteredSuites = suite.suites.filter((child) => filterTestsRemoveEmptySuites(child, filter));
const filteredTests = suite.tests.filter(filter);
const entries = /* @__PURE__ */ new Set([...filteredSuites, ...filteredTests]);
suite._entries = suite._entries.filter((e) => entries.has(e));
return !!suite._entries.length;
}
function bindFileSuiteToProject(project, suite) {
const relativeFile = import_path.default.relative(project.project.testDir, suite.location.file);
const fileId = (0, import_utils.calculateSha1)((0, import_utils.toPosixPath)(relativeFile)).slice(0, 20);
const result = suite._deepClone();
result._fileId = fileId;
result.forEachTest((test, suite2) => {
suite2._fileId = fileId;
const [file, ...titles] = test.titlePath();
const testIdExpression = `[project=${project.id}]${(0, import_utils.toPosixPath)(file)}${titles.join("")}`;
const testId = fileId + "-" + (0, import_utils.calculateSha1)(testIdExpression).slice(0, 20);
test.id = testId;
test._projectId = project.id;
let inheritedRetries;
let inheritedTimeout;
for (let parentSuite = suite2; parentSuite; parentSuite = parentSuite.parent) {
if (parentSuite._staticAnnotations.length)
test.annotations.unshift(...parentSuite._staticAnnotations);
if (inheritedRetries === void 0 && parentSuite._retries !== void 0)
inheritedRetries = parentSuite._retries;
if (inheritedTimeout === void 0 && parentSuite._timeout !== void 0)
inheritedTimeout = parentSuite._timeout;
}
test.retries = inheritedRetries ?? project.project.retries;
test.timeout = inheritedTimeout ?? project.project.timeout;
if (test.annotations.some((a) => a.type === "skip" || a.type === "fixme"))
test.expectedStatus = "skipped";
if (test._poolDigest)
test._workerHash = `${project.id}-${test._poolDigest}-0`;
});
return result;
}
function applyRepeatEachIndex(project, fileSuite, repeatEachIndex) {
fileSuite.forEachTest((test, suite) => {
if (repeatEachIndex) {
const [file, ...titles] = test.titlePath();
const testIdExpression = `[project=${project.id}]${(0, import_utils.toPosixPath)(file)}${titles.join("")} (repeat:${repeatEachIndex})`;
const testId = suite._fileId + "-" + (0, import_utils.calculateSha1)(testIdExpression).slice(0, 20);
test.id = testId;
test.repeatEachIndex = repeatEachIndex;
if (test._poolDigest)
test._workerHash = `${project.id}-${test._poolDigest}-${repeatEachIndex}`;
}
});
}
function filterOnly(suite) {
if (!suite._getOnlyItems().length)
return;
const suiteFilter = (suite2) => suite2._only;
const testFilter = (test) => test._only;
return filterSuiteWithOnlySemantics(suite, suiteFilter, testFilter);
}
function filterSuiteWithOnlySemantics(suite, suiteFilter, testFilter) {
const onlySuites = suite.suites.filter((child) => filterSuiteWithOnlySemantics(child, suiteFilter, testFilter) || suiteFilter(child));
const onlyTests = suite.tests.filter(testFilter);
const onlyEntries = /* @__PURE__ */ new Set([...onlySuites, ...onlyTests]);
if (onlyEntries.size) {
suite._entries = suite._entries.filter((e) => onlyEntries.has(e));
return true;
}
return false;
}
function filterByFocusedLine(suite, focusedTestFileLines) {
if (!focusedTestFileLines.length)
return;
const matchers = focusedTestFileLines.map(createFileMatcherFromFilter);
const testFileLineMatches = (testFileName, testLine, testColumn) => matchers.some((m) => m(testFileName, testLine, testColumn));
const suiteFilter = (suite2) => !!suite2.location && testFileLineMatches(suite2.location.file, suite2.location.line, suite2.location.column);
const testFilter = (test) => testFileLineMatches(test.location.file, test.location.line, test.location.column);
return filterSuite(suite, suiteFilter, testFilter);
}
function createFileMatcherFromFilter(filter) {
const fileMatcher = (0, import_util.createFileMatcher)(filter.re || filter.exact || "");
return (testFileName, testLine, testColumn) => fileMatcher(testFileName) && (filter.line === testLine || filter.line === null) && (filter.column === testColumn || filter.column === null);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
applyRepeatEachIndex,
bindFileSuiteToProject,
filterByFocusedLine,
filterOnly,
filterSuite,
filterTestsRemoveEmptySuites
});
+321
View File
@@ -0,0 +1,321 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var test_exports = {};
__export(test_exports, {
Suite: () => Suite,
TestCase: () => TestCase
});
module.exports = __toCommonJS(test_exports);
var import_testType = require("./testType");
var import_teleReceiver = require("../isomorphic/teleReceiver");
class Base {
constructor(title) {
this._only = false;
this._requireFile = "";
this.title = title;
}
}
class Suite extends Base {
constructor(title, type) {
super(title);
this._use = [];
this._entries = [];
this._hooks = [];
// Annotations known statically before running the test, e.g. `test.describe.skip()` or `test.describe({ annotation }, body)`.
this._staticAnnotations = [];
// Explicitly declared tags that are not a part of the title.
this._tags = [];
this._modifiers = [];
this._parallelMode = "none";
this._type = type;
}
get type() {
return this._type;
}
entries() {
return this._entries;
}
get suites() {
return this._entries.filter((entry) => entry instanceof Suite);
}
get tests() {
return this._entries.filter((entry) => entry instanceof TestCase);
}
_addTest(test) {
test.parent = this;
this._entries.push(test);
}
_addSuite(suite) {
suite.parent = this;
this._entries.push(suite);
}
_prependSuite(suite) {
suite.parent = this;
this._entries.unshift(suite);
}
allTests() {
const result = [];
const visit = (suite) => {
for (const entry of suite._entries) {
if (entry instanceof Suite)
visit(entry);
else
result.push(entry);
}
};
visit(this);
return result;
}
_hasTests() {
let result = false;
const visit = (suite) => {
for (const entry of suite._entries) {
if (result)
return;
if (entry instanceof Suite)
visit(entry);
else
result = true;
}
};
visit(this);
return result;
}
titlePath() {
const titlePath = this.parent ? this.parent.titlePath() : [];
if (this.title || this._type !== "describe")
titlePath.push(this.title);
return titlePath;
}
_collectGrepTitlePath(path) {
if (this.parent)
this.parent._collectGrepTitlePath(path);
if (this.title || this._type !== "describe")
path.push(this.title);
path.push(...this._tags);
}
_getOnlyItems() {
const items = [];
if (this._only)
items.push(this);
for (const suite of this.suites)
items.push(...suite._getOnlyItems());
items.push(...this.tests.filter((test) => test._only));
return items;
}
_deepClone() {
const suite = this._clone();
for (const entry of this._entries) {
if (entry instanceof Suite)
suite._addSuite(entry._deepClone());
else
suite._addTest(entry._clone());
}
return suite;
}
_deepSerialize() {
const suite = this._serialize();
suite.entries = [];
for (const entry of this._entries) {
if (entry instanceof Suite)
suite.entries.push(entry._deepSerialize());
else
suite.entries.push(entry._serialize());
}
return suite;
}
static _deepParse(data) {
const suite = Suite._parse(data);
for (const entry of data.entries) {
if (entry.kind === "suite")
suite._addSuite(Suite._deepParse(entry));
else
suite._addTest(TestCase._parse(entry));
}
return suite;
}
forEachTest(visitor) {
for (const entry of this._entries) {
if (entry instanceof Suite)
entry.forEachTest(visitor);
else
visitor(entry, this);
}
}
_serialize() {
return {
kind: "suite",
title: this.title,
type: this._type,
location: this.location,
only: this._only,
requireFile: this._requireFile,
timeout: this._timeout,
retries: this._retries,
staticAnnotations: this._staticAnnotations.slice(),
tags: this._tags.slice(),
modifiers: this._modifiers.slice(),
parallelMode: this._parallelMode,
hooks: this._hooks.map((h) => ({ type: h.type, location: h.location, title: h.title })),
fileId: this._fileId
};
}
static _parse(data) {
const suite = new Suite(data.title, data.type);
suite.location = data.location;
suite._only = data.only;
suite._requireFile = data.requireFile;
suite._timeout = data.timeout;
suite._retries = data.retries;
suite._staticAnnotations = data.staticAnnotations;
suite._tags = data.tags;
suite._modifiers = data.modifiers;
suite._parallelMode = data.parallelMode;
suite._hooks = data.hooks.map((h) => ({ type: h.type, location: h.location, title: h.title, fn: () => {
} }));
suite._fileId = data.fileId;
return suite;
}
_clone() {
const data = this._serialize();
const suite = Suite._parse(data);
suite._use = this._use.slice();
suite._hooks = this._hooks.slice();
suite._fullProject = this._fullProject;
return suite;
}
project() {
return this._fullProject?.project || this.parent?.project();
}
}
class TestCase extends Base {
constructor(title, fn, testType, location) {
super(title);
this.results = [];
this.type = "test";
this.expectedStatus = "passed";
this.timeout = 0;
this.annotations = [];
this.retries = 0;
this.repeatEachIndex = 0;
this.id = "";
this._poolDigest = "";
this._workerHash = "";
this._projectId = "";
// Explicitly declared tags that are not a part of the title.
this._tags = [];
this.fn = fn;
this._testType = testType;
this.location = location;
}
titlePath() {
const titlePath = this.parent ? this.parent.titlePath() : [];
titlePath.push(this.title);
return titlePath;
}
outcome() {
return (0, import_teleReceiver.computeTestCaseOutcome)(this);
}
ok() {
const status = this.outcome();
return status === "expected" || status === "flaky" || status === "skipped";
}
get tags() {
const titleTags = this._grepBaseTitlePath().join(" ").match(/@[\S]+/g) || [];
return [
...titleTags,
...this._tags
];
}
_serialize() {
return {
kind: "test",
id: this.id,
title: this.title,
retries: this.retries,
timeout: this.timeout,
expectedStatus: this.expectedStatus,
location: this.location,
only: this._only,
requireFile: this._requireFile,
poolDigest: this._poolDigest,
workerHash: this._workerHash,
annotations: this.annotations.slice(),
tags: this._tags.slice(),
projectId: this._projectId
};
}
static _parse(data) {
const test = new TestCase(data.title, () => {
}, import_testType.rootTestType, data.location);
test.id = data.id;
test.retries = data.retries;
test.timeout = data.timeout;
test.expectedStatus = data.expectedStatus;
test._only = data.only;
test._requireFile = data.requireFile;
test._poolDigest = data.poolDigest;
test._workerHash = data.workerHash;
test.annotations = data.annotations;
test._tags = data.tags;
test._projectId = data.projectId;
return test;
}
_clone() {
const data = this._serialize();
const test = TestCase._parse(data);
test._testType = this._testType;
test.fn = this.fn;
return test;
}
_appendTestResult() {
const result = {
retry: this.results.length,
parallelIndex: -1,
workerIndex: -1,
duration: 0,
startTime: /* @__PURE__ */ new Date(),
stdout: [],
stderr: [],
attachments: [],
status: "skipped",
steps: [],
errors: [],
annotations: []
};
this.results.push(result);
return result;
}
_grepBaseTitlePath() {
const path = [];
this.parent._collectGrepTitlePath(path);
path.push(this.title);
return path;
}
_grepTitleWithTags() {
const path = this._grepBaseTitlePath();
path.push(...this._tags);
return path.join(" ");
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Suite,
TestCase
});
+100
View File
@@ -0,0 +1,100 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var testLoader_exports = {};
__export(testLoader_exports, {
defaultTimeout: () => defaultTimeout,
loadTestFile: () => loadTestFile
});
module.exports = __toCommonJS(testLoader_exports);
var import_path = __toESM(require("path"));
var import_util = __toESM(require("util"));
var esmLoaderHost = __toESM(require("./esmLoaderHost"));
var import_globals = require("./globals");
var import_test = require("./test");
var import_compilationCache = require("../transform/compilationCache");
var import_transform = require("../transform/transform");
var import_util2 = require("../util");
const defaultTimeout = 3e4;
const cachedFileSuites = /* @__PURE__ */ new Map();
async function loadTestFile(file, rootDir, testErrors) {
if (cachedFileSuites.has(file))
return cachedFileSuites.get(file);
const suite = new import_test.Suite(import_path.default.relative(rootDir, file) || import_path.default.basename(file), "file");
suite._requireFile = file;
suite.location = { file, line: 0, column: 0 };
(0, import_globals.setCurrentlyLoadingFileSuite)(suite);
if (!(0, import_globals.isWorkerProcess)()) {
(0, import_compilationCache.startCollectingFileDeps)();
await esmLoaderHost.startCollectingFileDeps();
}
try {
await (0, import_transform.requireOrImport)(file);
cachedFileSuites.set(file, suite);
} catch (e) {
if (!testErrors)
throw e;
testErrors.push(serializeLoadError(file, e));
} finally {
(0, import_globals.setCurrentlyLoadingFileSuite)(void 0);
if (!(0, import_globals.isWorkerProcess)()) {
(0, import_compilationCache.stopCollectingFileDeps)(file);
await esmLoaderHost.stopCollectingFileDeps(file);
}
}
{
const files = /* @__PURE__ */ new Set();
suite.allTests().map((t) => files.add(t.location.file));
if (files.size === 1) {
const mappedFile = files.values().next().value;
if (suite.location.file !== mappedFile) {
if (import_path.default.extname(mappedFile) !== import_path.default.extname(suite.location.file))
suite.location.file = mappedFile;
}
}
}
return suite;
}
function serializeLoadError(file, error) {
if (error instanceof Error) {
const result = (0, import_util2.filterStackTrace)(error);
const loc = error.loc;
result.location = loc ? {
file,
line: loc.line || 0,
column: loc.column || 0
} : void 0;
return result;
}
return { value: import_util.default.inspect(error) };
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
defaultTimeout,
loadTestFile
});
+307
View File
@@ -0,0 +1,307 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var testType_exports = {};
__export(testType_exports, {
TestTypeImpl: () => TestTypeImpl,
mergeTests: () => mergeTests,
rootTestType: () => rootTestType
});
module.exports = __toCommonJS(testType_exports);
var import_playwright_core = require("playwright-core");
var import_utils = require("playwright-core/lib/utils");
var import_globals = require("./globals");
var import_test = require("./test");
var import_expect = require("../matchers/expect");
var import_transform = require("../transform/transform");
const testTypeSymbol = Symbol("testType");
class TestTypeImpl {
constructor(fixtures) {
this.fixtures = fixtures;
const test = (0, import_transform.wrapFunctionWithLocation)(this._createTest.bind(this, "default"));
test[testTypeSymbol] = this;
test.expect = import_expect.expect;
test.only = (0, import_transform.wrapFunctionWithLocation)(this._createTest.bind(this, "only"));
test.describe = (0, import_transform.wrapFunctionWithLocation)(this._describe.bind(this, "default"));
test.describe.only = (0, import_transform.wrapFunctionWithLocation)(this._describe.bind(this, "only"));
test.describe.configure = (0, import_transform.wrapFunctionWithLocation)(this._configure.bind(this));
test.describe.fixme = (0, import_transform.wrapFunctionWithLocation)(this._describe.bind(this, "fixme"));
test.describe.parallel = (0, import_transform.wrapFunctionWithLocation)(this._describe.bind(this, "parallel"));
test.describe.parallel.only = (0, import_transform.wrapFunctionWithLocation)(this._describe.bind(this, "parallel.only"));
test.describe.serial = (0, import_transform.wrapFunctionWithLocation)(this._describe.bind(this, "serial"));
test.describe.serial.only = (0, import_transform.wrapFunctionWithLocation)(this._describe.bind(this, "serial.only"));
test.describe.skip = (0, import_transform.wrapFunctionWithLocation)(this._describe.bind(this, "skip"));
test.beforeEach = (0, import_transform.wrapFunctionWithLocation)(this._hook.bind(this, "beforeEach"));
test.afterEach = (0, import_transform.wrapFunctionWithLocation)(this._hook.bind(this, "afterEach"));
test.beforeAll = (0, import_transform.wrapFunctionWithLocation)(this._hook.bind(this, "beforeAll"));
test.afterAll = (0, import_transform.wrapFunctionWithLocation)(this._hook.bind(this, "afterAll"));
test.skip = (0, import_transform.wrapFunctionWithLocation)(this._modifier.bind(this, "skip"));
test.fixme = (0, import_transform.wrapFunctionWithLocation)(this._modifier.bind(this, "fixme"));
test.fail = (0, import_transform.wrapFunctionWithLocation)(this._modifier.bind(this, "fail"));
test.fail.only = (0, import_transform.wrapFunctionWithLocation)(this._createTest.bind(this, "fail.only"));
test.slow = (0, import_transform.wrapFunctionWithLocation)(this._modifier.bind(this, "slow"));
test.setTimeout = (0, import_transform.wrapFunctionWithLocation)(this._setTimeout.bind(this));
test.step = this._step.bind(this, "pass");
test.step.skip = this._step.bind(this, "skip");
test.use = (0, import_transform.wrapFunctionWithLocation)(this._use.bind(this));
test.extend = (0, import_transform.wrapFunctionWithLocation)(this._extend.bind(this));
test.info = () => {
const result = (0, import_globals.currentTestInfo)();
if (!result)
throw new Error("test.info() can only be called while test is running");
return result;
};
this.test = test;
}
_currentSuite(location, title) {
const suite = (0, import_globals.currentlyLoadingFileSuite)();
if (!suite) {
throw new Error([
`Playwright Test did not expect ${title} to be called here.`,
`Most common reasons include:`,
`- You are calling ${title} in a configuration file.`,
`- You are calling ${title} in a file that is imported by the configuration file.`,
`- You have two different versions of @playwright/test. This usually happens`,
` when one of the dependencies in your package.json depends on @playwright/test.`
].join("\n"));
}
return suite;
}
_createTest(type, location, title, fnOrDetails, fn) {
throwIfRunningInsideJest();
const suite = this._currentSuite(location, "test()");
if (!suite)
return;
let details;
let body;
if (typeof fnOrDetails === "function") {
body = fnOrDetails;
details = {};
} else {
body = fn;
details = fnOrDetails;
}
const validatedDetails = validateTestDetails(details, location);
const test = new import_test.TestCase(title, body, this, location);
test._requireFile = suite._requireFile;
test.annotations.push(...validatedDetails.annotations);
test._tags.push(...validatedDetails.tags);
suite._addTest(test);
if (type === "only" || type === "fail.only")
test._only = true;
if (type === "skip" || type === "fixme" || type === "fail")
test.annotations.push({ type, location });
else if (type === "fail.only")
test.annotations.push({ type: "fail", location });
}
_describe(type, location, titleOrFn, fnOrDetails, fn) {
throwIfRunningInsideJest();
const suite = this._currentSuite(location, "test.describe()");
if (!suite)
return;
let title;
let body;
let details;
if (typeof titleOrFn === "function") {
title = "";
details = {};
body = titleOrFn;
} else if (typeof fnOrDetails === "function") {
title = titleOrFn;
details = {};
body = fnOrDetails;
} else {
title = titleOrFn;
details = fnOrDetails;
body = fn;
}
const validatedDetails = validateTestDetails(details, location);
const child = new import_test.Suite(title, "describe");
child._requireFile = suite._requireFile;
child.location = location;
child._staticAnnotations.push(...validatedDetails.annotations);
child._tags.push(...validatedDetails.tags);
suite._addSuite(child);
if (type === "only" || type === "serial.only" || type === "parallel.only")
child._only = true;
if (type === "serial" || type === "serial.only")
child._parallelMode = "serial";
if (type === "parallel" || type === "parallel.only")
child._parallelMode = "parallel";
if (type === "skip" || type === "fixme")
child._staticAnnotations.push({ type, location });
for (let parent = suite; parent; parent = parent.parent) {
if (parent._parallelMode === "serial" && child._parallelMode === "parallel")
throw new Error("describe.parallel cannot be nested inside describe.serial");
if (parent._parallelMode === "default" && child._parallelMode === "parallel")
throw new Error("describe.parallel cannot be nested inside describe with default mode");
}
(0, import_globals.setCurrentlyLoadingFileSuite)(child);
body();
(0, import_globals.setCurrentlyLoadingFileSuite)(suite);
}
_hook(name, location, title, fn) {
const suite = this._currentSuite(location, `test.${name}()`);
if (!suite)
return;
if (typeof title === "function") {
fn = title;
title = `${name} hook`;
}
suite._hooks.push({ type: name, fn, title, location });
}
_configure(location, options) {
throwIfRunningInsideJest();
const suite = this._currentSuite(location, `test.describe.configure()`);
if (!suite)
return;
if (options.timeout !== void 0)
suite._timeout = options.timeout;
if (options.retries !== void 0)
suite._retries = options.retries;
if (options.mode !== void 0) {
if (suite._parallelMode !== "none")
throw new Error(`"${suite._parallelMode}" mode is already assigned for the enclosing scope.`);
suite._parallelMode = options.mode;
for (let parent = suite.parent; parent; parent = parent.parent) {
if (parent._parallelMode === "serial" && suite._parallelMode === "parallel")
throw new Error("describe with parallel mode cannot be nested inside describe with serial mode");
if (parent._parallelMode === "default" && suite._parallelMode === "parallel")
throw new Error("describe with parallel mode cannot be nested inside describe with default mode");
}
}
}
_modifier(type, location, ...modifierArgs) {
const suite = (0, import_globals.currentlyLoadingFileSuite)();
if (suite) {
if (typeof modifierArgs[0] === "string" && typeof modifierArgs[1] === "function" && (type === "skip" || type === "fixme" || type === "fail")) {
this._createTest(type, location, modifierArgs[0], modifierArgs[1]);
return;
}
if (typeof modifierArgs[0] === "string" && typeof modifierArgs[1] === "object" && typeof modifierArgs[2] === "function" && (type === "skip" || type === "fixme" || type === "fail")) {
this._createTest(type, location, modifierArgs[0], modifierArgs[1], modifierArgs[2]);
return;
}
if (typeof modifierArgs[0] === "function") {
suite._modifiers.push({ type, fn: modifierArgs[0], location, description: modifierArgs[1] });
} else {
if (modifierArgs.length >= 1 && !modifierArgs[0])
return;
const description = modifierArgs[1];
suite._staticAnnotations.push({ type, description, location });
}
return;
}
const testInfo = (0, import_globals.currentTestInfo)();
if (!testInfo)
throw new Error(`test.${type}() can only be called inside test, describe block or fixture`);
if (typeof modifierArgs[0] === "function")
throw new Error(`test.${type}() with a function can only be called inside describe block`);
testInfo._modifier(type, location, modifierArgs);
}
_setTimeout(location, timeout) {
const suite = (0, import_globals.currentlyLoadingFileSuite)();
if (suite) {
suite._timeout = timeout;
return;
}
const testInfo = (0, import_globals.currentTestInfo)();
if (!testInfo)
throw new Error(`test.setTimeout() can only be called from a test`);
testInfo.setTimeout(timeout);
}
_use(location, fixtures) {
const suite = this._currentSuite(location, `test.use()`);
if (!suite)
return;
suite._use.push({ fixtures, location });
}
async _step(expectation, title, body, options = {}) {
const testInfo = (0, import_globals.currentTestInfo)();
if (!testInfo)
throw new Error(`test.step() can only be called from a test`);
const step = testInfo._addStep({ category: "test.step", title, location: options.location, box: options.box });
return await (0, import_utils.currentZone)().with("stepZone", step).run(async () => {
try {
let result = void 0;
result = await (0, import_utils.raceAgainstDeadline)(async () => {
try {
return await step.info._runStepBody(expectation === "skip", body, step.location);
} catch (e) {
if (result?.timedOut)
testInfo._failWithError(e);
throw e;
}
}, options.timeout ? (0, import_utils.monotonicTime)() + options.timeout : 0);
if (result.timedOut)
throw new import_playwright_core.errors.TimeoutError(`Step timeout of ${options.timeout}ms exceeded.`);
step.complete({});
return result.result;
} catch (error) {
step.complete({ error });
throw error;
}
});
}
_extend(location, fixtures) {
if (fixtures[testTypeSymbol])
throw new Error(`test.extend() accepts fixtures object, not a test object.
Did you mean to call mergeTests()?`);
const fixturesWithLocation = { fixtures, location };
return new TestTypeImpl([...this.fixtures, fixturesWithLocation]).test;
}
}
function throwIfRunningInsideJest() {
if (process.env.JEST_WORKER_ID) {
const packageManagerCommand = (0, import_utils.getPackageManagerExecCommand)();
throw new Error(
`Playwright Test needs to be invoked via '${packageManagerCommand} playwright test' and excluded from Jest test runs.
Creating one directory for Playwright tests and one for Jest is the recommended way of doing it.
See https://playwright.dev/docs/intro for more information about Playwright Test.`
);
}
}
function validateTestDetails(details, location) {
const originalAnnotations = Array.isArray(details.annotation) ? details.annotation : details.annotation ? [details.annotation] : [];
const annotations = originalAnnotations.map((annotation) => ({ ...annotation, location }));
const tags = Array.isArray(details.tag) ? details.tag : details.tag ? [details.tag] : [];
for (const tag of tags) {
if (tag[0] !== "@")
throw new Error(`Tag must start with "@" symbol, got "${tag}" instead.`);
}
return { annotations, tags };
}
const rootTestType = new TestTypeImpl([]);
function mergeTests(...tests) {
let result = rootTestType;
for (const t of tests) {
const testTypeImpl = t[testTypeSymbol];
if (!testTypeImpl)
throw new Error(`mergeTests() accepts "test" functions as parameters.
Did you mean to call test.extend() with fixtures instead?`);
const newFixtures = testTypeImpl.fixtures.filter((theirs) => !result.fixtures.find((ours) => ours.fixtures === theirs.fixtures));
result = new TestTypeImpl([...result.fixtures, ...newFixtures]);
}
return result.test;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
TestTypeImpl,
mergeTests,
rootTestType
});