Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

webpack

Package Overview
Dependencies
Maintainers
8
Versions
874
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack - npm Package Compare versions

Comparing version
5.107.0
to
5.107.1
+10
lib/ModuleNotFoundError.js
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
// TODO remove in webpack 6
// Some old plugins use `require("webpack/lib/ModuleNotFoundError")`, in webpack@6 developer should migrate to `compiler.webpack.ModuleNotFoundError`
module.exports = require("./errors/ModuleNotFoundError");
+6
-6

@@ -12,7 +12,7 @@ /*

const {
ASSET_URL_TYPE,
ASSET_URL_TYPES,
CSS_TYPE,
CSS_URL_TYPE,
CSS_URL_TYPES,
HTML_TYPE,
JAVASCRIPT_AND_CSS_URL_TYPES,
JAVASCRIPT_AND_ASSET_URL_TYPES,
JAVASCRIPT_TYPE,

@@ -84,3 +84,3 @@ JAVASCRIPT_TYPES,

}
case CSS_URL_TYPE: {
case ASSET_URL_TYPE: {
if (!originalSource) {

@@ -156,5 +156,5 @@ return null;

) {
return JAVASCRIPT_AND_CSS_URL_TYPES;
return JAVASCRIPT_AND_ASSET_URL_TYPES;
} else if (sourceTypes.has(CSS_TYPE) || sourceTypes.has(HTML_TYPE)) {
return CSS_URL_TYPES;
return ASSET_URL_TYPES;
}

@@ -161,0 +161,0 @@ return JAVASCRIPT_TYPES;

@@ -13,11 +13,11 @@ /*

const {
ASSET_AND_CSS_URL_TYPES,
ASSET_AND_JAVASCRIPT_AND_CSS_URL_TYPES,
ASSET_AND_ASSET_URL_TYPES,
ASSET_AND_JAVASCRIPT_AND_ASSET_URL_TYPES,
ASSET_AND_JAVASCRIPT_TYPES,
ASSET_TYPES,
ASSET_URL_TYPE,
ASSET_URL_TYPES,
CSS_TYPE,
CSS_URL_TYPE,
CSS_URL_TYPES,
HTML_TYPE,
JAVASCRIPT_AND_CSS_URL_TYPES,
JAVASCRIPT_AND_ASSET_URL_TYPES,
JAVASCRIPT_TYPE,

@@ -377,3 +377,3 @@ JAVASCRIPT_TYPES,

generatorOptions.publicPath !== undefined &&
type === CSS_URL_TYPE
type === ASSET_URL_TYPE
) {

@@ -399,3 +399,3 @@ const { path, info } = runtimeTemplate.compilation.getAssetPathWithInfo(

);
} else if (type === CSS_URL_TYPE) {
} else if (type === ASSET_URL_TYPE) {
const compilation = runtimeTemplate.compilation;

@@ -566,3 +566,3 @@ const path =

const needContent = type === JAVASCRIPT_TYPE || type === CSS_URL_TYPE;
const needContent = type === JAVASCRIPT_TYPE || type === ASSET_URL_TYPE;
const data = getData ? getData() : undefined;

@@ -620,3 +620,3 @@

if (data && (type === JAVASCRIPT_TYPE || type === CSS_URL_TYPE)) {
if (data && (type === JAVASCRIPT_TYPE || type === ASSET_URL_TYPE)) {
data.set("url", { ...data.get("url"), [type]: assetPath });

@@ -665,3 +665,3 @@ }

return new RawSource(`${module.moduleArgument}.exports = ${content};`);
} else if (type === CSS_URL_TYPE) {
} else if (type === ASSET_URL_TYPE) {
return null;

@@ -719,5 +719,5 @@ }

) {
return JAVASCRIPT_AND_CSS_URL_TYPES;
return JAVASCRIPT_AND_ASSET_URL_TYPES;
} else if (sourceTypes.has(CSS_TYPE) || sourceTypes.has(HTML_TYPE)) {
return CSS_URL_TYPES;
return ASSET_URL_TYPES;
}

@@ -735,5 +735,5 @@ return JAVASCRIPT_TYPES;

) {
return ASSET_AND_JAVASCRIPT_AND_CSS_URL_TYPES;
return ASSET_AND_JAVASCRIPT_AND_ASSET_URL_TYPES;
} else if (sourceTypes.has(CSS_TYPE) || sourceTypes.has(HTML_TYPE)) {
return ASSET_AND_CSS_URL_TYPES;
return ASSET_AND_ASSET_URL_TYPES;
}

@@ -740,0 +740,0 @@ return ASSET_AND_JAVASCRIPT_TYPES;

@@ -23,3 +23,3 @@ /*

/** @typedef {import("../../declarations/WebpackOptions").RawPublicPath} RawPublicPath */
/** @typedef {import("../../declarations/WebpackOptions").FilenameTemplate} FilenameTemplate */
/** @typedef {import("../../declarations/WebpackOptions").AssetModuleFilename} AssetModuleFilename */
/** @typedef {import("../Compilation").AssetInfo} AssetInfo */

@@ -30,3 +30,2 @@ /** @typedef {import("../Compiler")} Compiler */

/** @typedef {import("../NormalModule")} NormalModule */
/** @typedef {import("../NormalModule").NormalModuleCreateData} NormalModuleCreateData */

@@ -103,6 +102,3 @@ /**

// TODO create the module via new AssetModule with its own properties
const module = new NormalModule(
/** @type {NormalModuleCreateData} */
(createData)
);
const module = new NormalModule(createData);
if (this.options.sideEffectFree) {

@@ -233,3 +229,3 @@ module.factoryMeta = { sideEffectFree: true };

/** @type {undefined | FilenameTemplate} */
/** @type {undefined | AssetModuleFilename} */
let filename;

@@ -236,0 +232,0 @@ /** @type {undefined | RawPublicPath} */

@@ -12,7 +12,7 @@ /*

const {
ASSET_URL_TYPE,
ASSET_URL_TYPES,
CSS_TYPE,
CSS_URL_TYPE,
CSS_URL_TYPES,
HTML_TYPE,
JAVASCRIPT_AND_CSS_URL_TYPES,
JAVASCRIPT_AND_ASSET_URL_TYPES,
JAVASCRIPT_TYPE,

@@ -83,3 +83,3 @@ JAVASCRIPT_TYPES,

}
case CSS_URL_TYPE: {
case ASSET_URL_TYPE: {
if (!originalSource) {

@@ -155,5 +155,5 @@ return null;

) {
return JAVASCRIPT_AND_CSS_URL_TYPES;
return JAVASCRIPT_AND_ASSET_URL_TYPES;
} else if (sourceTypes.has(CSS_TYPE) || sourceTypes.has(HTML_TYPE)) {
return CSS_URL_TYPES;
return ASSET_URL_TYPES;
}

@@ -160,0 +160,0 @@ return JAVASCRIPT_TYPES;

@@ -16,6 +16,5 @@ /*

/** @typedef {import("../declarations/plugins/BannerPlugin").BannerPluginOptions} BannerPluginOptions */
/** @typedef {import("./Compilation").PathData} PathData */
/** @typedef {import("./Compilation").PathDataChunk} PathDataChunk */
/** @typedef {import("./Compiler")} Compiler */
/** @typedef {import("./Chunk")} Chunk */
/** @typedef {import("./TemplatedPathPlugin").TemplatePath} TemplatePath */

@@ -121,7 +120,7 @@ /** @typedef {(data: { hash?: string, chunk: Chunk, filename: string }) => string} BannerFunction */

/** @type {PathData} */
/** @type {PathDataChunk} */
const data = { chunk, filename: file };
const comment = compilation.getPath(
/** @type {TemplatePath} */
/** @type {string | import("./TemplatedPathPlugin").TemplatePathFn<PathDataChunk>} */
(banner),

@@ -128,0 +127,0 @@ data

@@ -29,3 +29,5 @@ /*

/** @typedef {import("./Module")} Module */
/** @typedef {import("./TemplatedPathPlugin").TemplatePath} TemplatePath */
/** @typedef {import("./Compilation").PathDataChunk} PathDataChunk */
/** @typedef {import("./TemplatedPathPlugin").TemplatePathFn<PathDataChunk>} ChunkFilenameTemplateFn */
/** @typedef {string | ChunkFilenameTemplateFn} ChunkFilenameTemplate */
/** @typedef {import("./util/Hash")} Hash */

@@ -102,5 +104,5 @@ /** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */

this.preventIntegration = false;
/** @type {TemplatePath | undefined} */
/** @type {ChunkFilenameTemplate | undefined} */
this.filenameTemplate = undefined;
/** @type {TemplatePath | undefined} */
/** @type {ChunkFilenameTemplate | undefined} */
this.cssFilenameTemplate = undefined;

@@ -797,22 +799,17 @@ /**

for (const childGroup of group.childrenIterable) {
for (const key of Object.keys(childGroup.options)) {
if (key.endsWith("Order")) {
const name = key.slice(0, key.length - "Order".length);
let list = lists.get(name);
if (list === undefined) {
list = [];
lists.set(name, list);
}
list.push({
order:
/** @type {number} */
(
childGroup.options[
/** @type {keyof ChunkGroupOptions} */
(key)
]
),
group: childGroup
});
const edgeOptions = group.getChildOrderOptions(
childGroup,
chunkGraph
);
for (const key of Object.keys(edgeOptions)) {
const name = key.slice(0, key.length - "Order".length);
let list = lists.get(name);
if (list === undefined) {
list = [];
lists.set(name, list);
}
list.push({
order: edgeOptions[key],
group: childGroup
});
}

@@ -856,5 +853,4 @@ }

for (const childGroup of group.childrenIterable) {
const order =
/** @type {number} */
(childGroup.options[/** @type {keyof ChunkGroupOptions} */ (type)]);
const edgeOptions = group.getChildOrderOptions(childGroup, chunkGraph);
const order = edgeOptions[type];
if (order === undefined) continue;

@@ -861,0 +857,0 @@ list.push({

@@ -548,2 +548,49 @@ /*

/**
* Aggregates per-block `*Order` options for the blocks that bridge this
* chunk group to the given child chunk group. `*Order` options are tied to
* the originating `import()` call and must not be sourced from the child's
* shared options, otherwise a webpackPrefetch/Preload directive from one
* parent would leak into other parents that share the child by name.
* @param {ChunkGroup} childGroup the child chunk group
* @param {ChunkGraph} chunkGraph the chunk graph
* @returns {Record<string, number>} merged `*Order` options for the edge from this group to `childGroup`
*/
getChildOrderOptions(childGroup, chunkGraph) {
/** @type {Record<string, number>} */
const result = Object.create(null);
let bridged = false;
for (const block of childGroup.blocksIterable) {
const rootModule = /** @type {Module} */ (block.getRootBlock());
if (!chunkGraph.isModuleInChunkGroup(rootModule, this)) continue;
bridged = true;
const opts = block.groupOptions;
if (!opts) continue;
for (const key of Object.keys(opts)) {
if (!key.endsWith("Order")) continue;
const value =
/** @type {number} */
(opts[/** @type {keyof ChunkGroupOptions} */ (key)]);
if (typeof value !== "number") continue;
if (result[key] === undefined || value > result[key]) {
result[key] = value;
}
}
}
// Fall back to the child's own options only when no block bridges
// this edge (e.g. a chunk group created by APIs that don't go through
// an AsyncDependenciesBlock). Otherwise we'd reintroduce the leak.
if (!bridged) {
for (const key of Object.keys(childGroup.options)) {
if (!key.endsWith("Order")) continue;
const value =
childGroup.options[/** @type {keyof ChunkGroupOptions} */ (key)];
if (typeof value === "number") {
result[key] = value;
}
}
}
return result;
}
/**
* Groups child chunk groups by their `*Order` options and sorts each group

@@ -559,18 +606,13 @@ * by descending order and deterministic chunk-group comparison.

for (const childGroup of this._children) {
for (const key of Object.keys(childGroup.options)) {
if (key.endsWith("Order")) {
const name = key.slice(0, key.length - "Order".length);
let list = lists.get(name);
if (list === undefined) {
lists.set(name, (list = []));
}
list.push({
order:
/** @type {number} */
(
childGroup.options[/** @type {keyof ChunkGroupOptions} */ (key)]
),
group: childGroup
});
const edgeOptions = this.getChildOrderOptions(childGroup, chunkGraph);
for (const key of Object.keys(edgeOptions)) {
const name = key.slice(0, key.length - "Order".length);
let list = lists.get(name);
if (list === undefined) {
lists.set(name, (list = []));
}
list.push({
order: edgeOptions[key],
group: childGroup
});
}

@@ -577,0 +619,0 @@ }

@@ -61,3 +61,3 @@ /*

/** @typedef {import("../Template").RuntimeTemplate} RuntimeTemplate */
/** @typedef {import("../TemplatedPathPlugin").TemplatePath} TemplatePath */
/** @typedef {import("../Chunk").ChunkFilenameTemplate} ChunkFilenameTemplate */
/** @typedef {import("../util/Hash")} Hash */

@@ -1156,3 +1156,3 @@ /** @typedef {import("../Module").BuildMeta} BuildMeta */

* @param {OutputOptions} outputOptions output options
* @returns {TemplatePath} used filename template
* @returns {ChunkFilenameTemplate} used filename template
*/

@@ -1159,0 +1159,0 @@ static getChunkFilenameTemplate(chunk, outputOptions) {

@@ -51,2 +51,18 @@ /*

/**
* Per-`const NAME = require(LITERAL)` binding state used to forward
* member-access references on `NAME` to the `CommonJsRequireDependency`
* created for the `require()` call.
* @typedef {object} RequireBindingData
* @property {RawReferencedExports} referencedExports mutable list shared with the dependency; pushed to as `NAME.x.y` accesses are walked
* @property {InstanceType<typeof import("./CommonJsRequireDependency")> | null} dep dependency for the `require()` call (assigned during walk)
*/
/** @type {WeakMap<CallExpression, RequireBindingData>} */
const requireBindingData = new WeakMap();
const REQUIRE_BINDING_TAG = Symbol(
"CommonJsImportsParserPlugin require binding"
);
const PLUGIN_NAME = "CommonJsImportsParserPlugin";

@@ -156,6 +172,14 @@

if (param.isString()) {
const referencedExports = getRequireReferencedExportsFromDestructuring(
let referencedExports = getRequireReferencedExportsFromDestructuring(
parser,
expr
);
const binding = requireBindingData.get(
/** @type {CallExpression} */ (expr)
);
if (binding && !referencedExports) {
// `const NAME = require(LITERAL)` — let later member-access walks
// on `NAME` populate the dependency's referenced exports.
referencedExports = binding.referencedExports;
}
const dep = new CommonJsRequireDependency(

@@ -168,2 +192,3 @@ /** @type {string} */ (param.string),

);
if (binding) binding.dep = dep;
dep.loc = /** @type {DependencyLocation} */ (expr.loc);

@@ -668,2 +693,84 @@ dep.optional = Boolean(parser.scope.inTry);

// #region Require bound to a const variable
// Track `const NAME = require(LITERAL)` so that static member accesses on
// `NAME` (e.g. `NAME.foo`, `NAME.foo()`) are forwarded to the same
// `CommonJsRequireDependency` as referenced exports — enabling tree
// shaking of CommonJS modules that are imported into a named binding
// rather than destructured.
parser.hooks.preDeclarator.tap(PLUGIN_NAME, (declarator, statement) => {
if (statement.kind !== "const") return;
if (declarator.id.type !== "Identifier") return;
if (!declarator.init || declarator.init.type !== "CallExpression") {
return;
}
const init = declarator.init;
if (
init.callee.type !== "Identifier" ||
init.callee.name !== "require" ||
init.arguments.length !== 1
) {
return;
}
const arg = init.arguments[0];
if (arg.type !== "Literal" || typeof arg.value !== "string") return;
// Only attach binding state when `require` resolves to the free
// `require` (i.e. it isn't shadowed in the current scope).
const requireInfo = parser.getFreeInfoFromVariable("require");
if (!requireInfo || requireInfo.name !== "require") return;
/** @type {RequireBindingData} */
const binding = {
referencedExports: [],
dep: null
};
requireBindingData.set(init, binding);
parser.tagVariable(declarator.id.name, REQUIRE_BINDING_TAG, binding);
return true;
});
parser.hooks.expression.for(REQUIRE_BINDING_TAG).tap(PLUGIN_NAME, () => {
const binding =
/** @type {RequireBindingData} */
(parser.currentTagData);
if (binding && binding.dep) {
// `NAME` is read as a value (not as the object of a static member
// chain), so we have to assume the whole exports object is used.
binding.dep.referencedExports = null;
}
});
parser.hooks.expressionMemberChain
.for(REQUIRE_BINDING_TAG)
.tap(PLUGIN_NAME, (_expr, members) => {
const binding =
/** @type {RequireBindingData} */
(parser.currentTagData);
if (binding && binding.dep && binding.dep.referencedExports) {
binding.dep.referencedExports.push(members);
}
// Returning truthy suppresses the parser's fallback chain (which
// would otherwise walk `NAME` as a bare expression and trigger our
// `expression` hook above, marking the whole namespace as used).
return true;
});
parser.hooks.callMemberChain
.for(REQUIRE_BINDING_TAG)
.tap(PLUGIN_NAME, (expr, members) => {
const binding =
/** @type {RequireBindingData} */
(parser.currentTagData);
if (binding && binding.dep && binding.dep.referencedExports) {
if (members.length === 0) {
// `NAME(...)` — calling the require result directly; the
// whole exports object is observable.
binding.dep.referencedExports = null;
} else {
binding.dep.referencedExports.push(members);
}
}
if (expr.arguments) parser.walkExpressions(expr.arguments);
return true;
});
// #endregion
// #region Require.resolve

@@ -670,0 +777,0 @@ /**

@@ -8,2 +8,3 @@ /*

const { ASSET_URL_TYPE } = require("../ModuleSourceTypeConstants");
const RawDataUrlModule = require("../asset/RawDataUrlModule");

@@ -212,4 +213,4 @@ const makeSerializable = require("../util/makeSerializable");

const url = data.get("url");
if (!url || !url["css-url"]) return "data:,";
return url["css-url"];
if (!url || !url[ASSET_URL_TYPE]) return "data:,";
return url[ASSET_URL_TYPE];
}

@@ -216,0 +217,0 @@ };

@@ -95,2 +95,15 @@ /*

/**
* Walks call arguments so import bindings used inside callbacks are
* still tracked, then skips default AMD/CommonJS handling.
* @param {import("estree").CallExpression} expr call expression
* @returns {boolean | undefined} true if in harmony
*/
const walkArgumentsAndSkipInHarmony = (expr) => {
if (HarmonyExports.isEnabled(parser.state)) {
if (expr.arguments) parser.walkExpressions(expr.arguments);
return true;
}
};
const nonHarmonyIdentifiers = ["define", "exports"];

@@ -104,5 +117,12 @@ for (const identifier of nonHarmonyIdentifiers) {

parser.hooks.expression.for(identifier).tap(PLUGIN_NAME, skipInHarmony);
parser.hooks.call.for(identifier).tap(PLUGIN_NAME, skipInHarmony);
parser.hooks.call
.for(identifier)
.tap(
PLUGIN_NAME,
identifier === "define"
? walkArgumentsAndSkipInHarmony
: skipInHarmony
);
}
}
};

@@ -7,2 +7,7 @@ /*

const {
CSS_IMPORT_TYPE,
CSS_TYPE,
JAVASCRIPT_TYPE
} = require("../ModuleSourceTypeConstants");
const makeSerializable = require("../util/makeSerializable");

@@ -14,2 +19,3 @@ const CssUrlDependency = require("./CssUrlDependency");

/** @typedef {import("../Chunk")} Chunk */
/** @typedef {import("../ChunkGraph")} ChunkGraph */
/** @typedef {import("../Dependency")} Dependency */

@@ -190,2 +196,140 @@ /** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */

/**
* Whether webpack will emit a `.js` file for this chunk that must be
* loaded with a `<script>` tag. Covers three independent reasons a
* chunk needs JS output: it owns one or more JS-source-type modules;
* it has entry modules whose source types include JavaScript (entry
* modules don't show up in `getChunkModulesIterableBySourceType` until
* they're connected as regular modules — this is why
* `JavascriptModulesPlugin#_chunkHasJs` checks them separately); or it
* is a runtime chunk — `chunk.hasRuntime()` — which produces a `.js`
* file holding the webpack runtime, but its `RuntimeModule`s live in
* a separate `runtimeModules` set and are *not* surfaced via
* `getChunkModulesIterableBySourceType`. Missing the runtime case
* would cause a `runtimeChunk`-split chunk to fall out of the
* `<script>` list and re-emerge after the chunks that depend on it,
* producing `__webpack_require__ is not defined` at load time.
* @param {Chunk} chunk chunk
* @param {ChunkGraph} chunkGraph chunk graph
* @returns {boolean} true if the chunk emits a `.js` file
*/
const chunkHasJs = (chunk, chunkGraph) => {
if (chunk.hasRuntime()) return true;
if (chunkGraph.getNumberOfEntryModules(chunk) > 0) {
for (const module of chunkGraph.getChunkEntryModulesIterable(chunk)) {
if (chunkGraph.getModuleSourceTypes(module).has(JAVASCRIPT_TYPE)) {
return true;
}
}
}
return Boolean(
chunkGraph.getChunkModulesIterableBySourceType(chunk, JAVASCRIPT_TYPE)
);
};
/**
* Whether webpack will emit a `.css` file for this chunk that must be
* loaded with a `<link rel="stylesheet">` tag. Matches
* `CssModulesPlugin.chunkHasCss` exactly — both regular CSS modules
* and pure `@import` placeholder modules count, since the latter
* still contribute a `.css` asset to the chunk.
* @param {Chunk} chunk chunk
* @param {ChunkGraph} chunkGraph chunk graph
* @returns {boolean} true if the chunk emits a `.css` file
*/
const chunkHasCss = (chunk, chunkGraph) =>
Boolean(chunkGraph.getChunkModulesIterableBySourceType(chunk, CSS_TYPE)) ||
Boolean(
chunkGraph.getChunkModulesIterableBySourceType(chunk, CSS_IMPORT_TYPE)
);
/**
* Compare two chunks for a deterministic tie-break in CSS link ordering.
* `chunk.name` and `chunk.id` are both stable strings (when present);
* one of them is set for every chunk webpack emits. We can't rely on
* `Array.prototype.sort` being stable — webpack still supports Node
* 10.13 where V8's sort is not guaranteed stable for arrays larger
* than ten elements — so any time `firstCssModulePostOrderIndex`
* returns the same value for two chunks (most commonly when several
* chunks have no reachable CSS module in the entrypoint's dependency
* walk and all map to `Infinity`) this comparator picks the canonical
* order.
* @param {Chunk} a first chunk
* @param {Chunk} b second chunk
* @returns {-1 | 0 | 1} ordering
*/
const compareChunksForCssTieBreak = (a, b) => {
const an = `${a.name || ""} ${a.id === null || a.id === undefined ? "" : a.id}`;
const bn = `${b.name || ""} ${b.id === null || b.id === undefined ? "" : b.id}`;
if (an < bn) return -1;
if (an > bn) return 1;
return 0;
};
/**
* Smallest post-order index among the CSS modules of a chunk, taken
* from the entrypoint's view of the dependency graph. Used to sort
* sibling CSS chunks so they appear in source import order in the
* extracted HTML — `entrypoint.chunks` itself does not give that
* ordering for arbitrary splitChunks layouts. Considers both
* `CSS_TYPE` and `CSS_IMPORT_TYPE` modules so a chunk made up
* exclusively of `@import` placeholder modules (e.g. when splitChunks
* separates them from their target CSS) still sorts by its true
* source position rather than collapsing to `Infinity` and relying on
* the chunk-name tie-breaker.
* @param {Chunk} chunk chunk
* @param {Entrypoint} entrypoint entrypoint the chunk belongs to
* @param {ChunkGraph} chunkGraph chunk graph
* @returns {number} the lowest post-order index of any CSS or
* CSS-import module in the chunk, or `Number.POSITIVE_INFINITY` when
* no such module has a defined index (e.g. for a module the
* entrypoint never reached on its own dependency walk — runtime-only
* modules, modules reached via `dependOn`, etc.) so such chunks sort
* last among CSS chunks
*/
const firstCssModulePostOrderIndex = (chunk, entrypoint, chunkGraph) => {
let min = Number.POSITIVE_INFINITY;
for (const sourceType of [CSS_TYPE, CSS_IMPORT_TYPE]) {
const modules = chunkGraph.getChunkModulesIterableBySourceType(
chunk,
sourceType
);
if (!modules) continue;
for (const module of modules) {
const idx = entrypoint.getModulePostOrderIndex(module);
if (idx !== undefined && idx < min) min = idx;
}
}
return min;
};
const COPYABLE_LINK_ATTRS = ["nonce", "crossorigin", "referrerpolicy"];
/**
* Build a fresh `<link rel="stylesheet" href="…">` for a CSS chunk that
* was pulled in by a `<script src>` entry — the originating tag was a
* `<script>`, but the chunk is CSS so cloning the script tag verbatim
* would produce nonsense (`<script src="…\.css">`). Copy
* `nonce`/`crossorigin`/`referrerpolicy` from the original element so
* the same CSP and fetch policy applies; `defer`/`async`/`type` have no
* meaning on `<link>` and are dropped.
* @param {string} originalTag the originating `<script>`/`<link>` tag's source text
* @param {string} href URL for the stylesheet
* @returns {string} the sibling `<link>` tag's HTML
*/
const buildStylesheetLink = (originalTag, href) => {
let extra = "";
for (const attr of COPYABLE_LINK_ATTRS) {
// Match ` <attr>`, ` <attr>=value`, ` <attr>="value"`, ` <attr>='value'`.
const re = new RegExp(
`\\s${attr}(?:\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]+))?(?=[\\s/>])`,
"i"
);
const m = originalTag.match(re);
if (m) extra += m[0];
}
const safeHref = href.replace(/"/g, "&quot;");
return `<link rel="stylesheet" href="${safeHref}"${extra}>`;
};
/**
* Clone the original `<script>`/`<link>` opening tag with its `src`/`href`

@@ -258,2 +402,3 @@ * value swapped for a different chunk URL. Reusing the source text verbatim

const compilation = runtimeTemplate.compilation;
const { chunkGraph } = compilation;
const entrypoint = /** @type {Entrypoint | undefined} */ (

@@ -270,23 +415,29 @@ compilation.entrypoints.get(dep.entryName)

const entryChunk = orderedChunks[orderedChunks.length - 1];
const contentHashType =
dep.elementKind === "stylesheet" ? "css" : "javascript";
const isStylesheet = dep.elementKind === "stylesheet";
// Rewrite the originating tag's src/href to the entry chunk's
// primary asset for that element kind: `.css` for
// `<link rel="stylesheet">`, `.js` for everything else.
const entryContentHashType = isStylesheet ? "css" : "javascript";
const entryUrl = `${CssUrlDependency.PUBLIC_PATH_AUTO}${getChunkFilename(
entryChunk,
compilation,
contentHashType
entryContentHashType
)}`;
source.replace(dep.range[0], dep.range[1] - 1, entryUrl);
if (
orderedChunks.length <= 1 ||
dep.tagStart < 0 ||
dep.tagOpenEnd <= dep.tagStart
) {
if (dep.tagStart < 0 || dep.tagOpenEnd <= dep.tagStart) {
return;
}
// The browser must load every chunk in dependency order, not just the
// entry chunk. Clone the original tag for each non-entry chunk so the
// preserved attributes (nonce, crossorigin, …) match the entry tag,
// and insert the clones before the original tag's `<`.
// The browser must load every chunk the entry needs, not just the
// entry chunk. For `<script>` entries that's the JS for sibling
// chunks plus — critically — the CSS for any chunk that holds
// stylesheets imported transitively from the JS source. Previously
// every sibling was cloned as a `<script>` pointing at a `.js`
// filename, so CSS chunks ended up as `<script src="foo.css">`
// pointing at non-existent `.js` files (the bug in
// html-webpack-plugin#1838 / webpack/mini-css-extract-plugin#959,
// magnified here because the entry chunk's own CSS was emitted to
// disk but never linked from the HTML at all).
const originalContent = /** @type {string} */ (source.original().source());

@@ -297,20 +448,108 @@ const originalTag = originalContent.slice(dep.tagStart, dep.tagOpenEnd);

const siblings = [];
for (let i = 0; i < orderedChunks.length - 1; i++) {
/**
* @param {Chunk} chunk chunk to emit a sibling tag for
* @param {"javascript" | "css"} kind content type slice of the chunk to emit
* @returns {string} a single sibling tag's HTML
*/
const buildSibling = (chunk, kind) => {
const url = `${CssUrlDependency.PUBLIC_PATH_AUTO}${getChunkFilename(
orderedChunks[i],
chunk,
compilation,
contentHashType
kind
)}`;
siblings.push(
cloneTagWithUrl(
originalTag,
srcStartInTag,
srcEndInTag,
url,
dep.elementKind
)
if (kind === "css" && !isStylesheet) {
// Originating tag is `<script>` (or `<link rel=modulepreload>`)
// but this chunk is CSS — emit a fresh `<link>` rather than
// cloning the script.
return buildStylesheetLink(originalTag, url);
}
return cloneTagWithUrl(
originalTag,
srcStartInTag,
srcEndInTag,
url,
dep.elementKind
);
};
const siblings = [];
if (isStylesheet) {
// `<link rel="stylesheet">` entries are CSS-only — every sibling
// chunk in the entrypoint is also CSS. Keep cloning the original
// `<link>` for them so attributes like `media` carry over.
for (let i = 0; i < orderedChunks.length - 1; i++) {
siblings.push(buildSibling(orderedChunks[i], "css"));
}
} else {
// CSS chunks are emitted before JS chunks so the cascade is set
// up before any script runs. Within CSS the order needs to match
// the source's import order — `entrypoint.chunks` alone doesn't
// give us that for arbitrary splitChunks layouts (splitChunks
// inserts each new chunk before the entry chunk via
// `insertChunk(_, before)`, so split CSS siblings end up in
// *reverse* of the order they were processed — exactly the
// html-webpack-plugin#1838 / mini-css-extract#959 symptom). We
// re-derive the order from the entrypoint's module post-order
// index, which mirrors the dependency walk and so reflects the
// import order.
/** @type {{ chunk: Chunk, index: number }[]} */
const cssChunkOrder = [];
/** @type {Chunk[]} */
const jsChunks = [];
for (let i = 0; i < orderedChunks.length - 1; i++) {
const chunk = orderedChunks[i];
const hasCss = chunkHasCss(chunk, chunkGraph);
const hasJs = chunkHasJs(chunk, chunkGraph);
if (hasCss) {
cssChunkOrder.push({
chunk,
index: firstCssModulePostOrderIndex(chunk, entrypoint, chunkGraph)
});
}
// Anything that isn't CSS-only stays on the JS lane, in the
// `orderedChunks` order — that preserves the runtime-first /
// vendor-before-entry invariant of `getEntrypointChunksInLoadOrder`.
// Chunks that produce no `.js` and no `.css` (e.g. wasm-only
// or asset-only) still get a `<script>` clone here so we
// keep prior behavior for users who relied on it.
if (hasJs || !hasCss) jsChunks.push(chunk);
}
// If the entry chunk itself contains CSS (entry JS imports CSS
// without splitChunks separating it), fold it into the same CSS
// ordering so the entry-chunk `<link>` lands in the correct
// cascade position relative to sibling CSS chunks.
if (chunkHasCss(entryChunk, chunkGraph)) {
cssChunkOrder.push({
chunk: entryChunk,
index: firstCssModulePostOrderIndex(
entryChunk,
entrypoint,
chunkGraph
)
});
}
cssChunkOrder.sort((a, b) => {
// Direct subtraction would yield `NaN` when both indices are
// `Infinity` (the documented fallback for chunks whose CSS
// modules the entrypoint's walk never reaches), and
// `Array#sort` doesn't promise stable ordering on the legacy
// Node 10 targets this repo still supports — so the
// tie-breaker must always run when the indices match,
// including the `Infinity === Infinity` case.
if (a.index < b.index) return -1;
if (a.index > b.index) return 1;
return compareChunksForCssTieBreak(a.chunk, b.chunk);
});
for (const { chunk } of cssChunkOrder) {
siblings.push(buildSibling(chunk, "css"));
}
for (const chunk of jsChunks) {
siblings.push(buildSibling(chunk, "javascript"));
}
}
source.insert(dep.tagStart, siblings.join(""));
if (siblings.length > 0) {
source.insert(dep.tagStart, siblings.join(""));
}
}

@@ -317,0 +556,0 @@ };

@@ -8,2 +8,3 @@ /*

const { ASSET_URL_TYPE } = require("../ModuleSourceTypeConstants");
const RawDataUrlModule = require("../asset/RawDataUrlModule");

@@ -118,4 +119,4 @@ const makeSerializable = require("../util/makeSerializable");

const url = data.get("url");
if (!url || !url["css-url"]) return "data:,";
return url["css-url"];
if (!url || !url[ASSET_URL_TYPE]) return "data:,";
return url[ASSET_URL_TYPE];
}

@@ -122,0 +123,0 @@ };

@@ -26,3 +26,2 @@ /*

/** @typedef {import("./ChunkGraph").ModuleId} ModuleId */
/** @typedef {import("./TemplatedPathPlugin").TemplatePath} TemplatePath */

@@ -29,0 +28,0 @@ /** @type {WeakMap<Source, Source>} */

@@ -117,2 +117,17 @@ /*

this._exports = new Map();
// `_otherExportsInfo` is a fallback entry for unlisted exports. Two roles:
// 1. factory template — `getExportInfo` creates `new ExportInfo(name, this)`,
// so created export info extends its properties.
// 2. flags whether the whole exportsInfo can be statically analyzed.
// Its `used` reachable values:
// - NoInfo: no use analysis yet (`optimization#usedExports` off), or used without info
// - Unused: analyzed, no unlisted export needed
// - Unknown: used in unknown way
// - Used/OnlyPropertiesUsed: never reached
// Its `provided` reachable values:
// - undefined: provision not determined yet
// - false: determined, no unlisted export is provided
// - null: only runtime knows (dynamic/unknown exports)
// - true: never reached
/** @type {ExportInfo} */

@@ -243,8 +258,3 @@ this._otherExportsInfo = new ExportInfo(null);

for (const exportInfo of this._exports.values()) {
if (exportInfo.provided === undefined) {
exportInfo.provided = false;
}
if (exportInfo.canMangleProvide === undefined) {
exportInfo.canMangleProvide = true;
}
exportInfo.setHasProvideInfo();
}

@@ -254,8 +264,3 @@ if (this._redirectTo !== undefined) {

} else {
if (this._otherExportsInfo.provided === undefined) {
this._otherExportsInfo.provided = false;
}
if (this._otherExportsInfo.canMangleProvide === undefined) {
this._otherExportsInfo.canMangleProvide = true;
}
this._otherExportsInfo.setHasProvideInfo();
}

@@ -442,16 +447,4 @@ }

}
} else {
if (
this._otherExportsInfo.setUsedConditionally(
(used) => used < UsageState.Unknown,
UsageState.Unknown,
runtime
)
) {
changed = true;
}
if (this._otherExportsInfo.canMangleUse !== false) {
this._otherExportsInfo.canMangleUse = false;
changed = true;
}
} else if (this._otherExportsInfo.setUsedInUnknownWay(runtime)) {
changed = true;
}

@@ -477,10 +470,4 @@ return changed;

}
} else {
if (this._otherExportsInfo.setUsed(UsageState.NoInfo, runtime)) {
changed = true;
}
if (this._otherExportsInfo.canMangleUse !== false) {
this._otherExportsInfo.canMangleUse = false;
changed = true;
}
} else if (this._otherExportsInfo.setUsedWithoutInfo(runtime)) {
changed = true;
}

@@ -1038,2 +1025,11 @@ return changed;

setHasProvideInfo() {
if (this.provided === undefined) {
this.provided = false;
}
if (this.canMangleProvide === undefined) {
this.canMangleProvide = true;
}
}
setHasUseInfo() {

@@ -1040,0 +1036,0 @@ if (!this._hasUseInRuntimeInfo) {

@@ -15,4 +15,5 @@ /*

const {
ASSET_URL_TYPE,
ASSET_URL_TYPES,
CSS_IMPORT_TYPES,
CSS_URL_TYPES,
JAVASCRIPT_TYPE,

@@ -76,3 +77,3 @@ JAVASCRIPT_TYPES

/** @typedef {{ layer?: string, supports?: string, media?: string }} CssImportDependencyMeta */
/** @typedef {{ sourceType: "css-url" }} AssetDependencyMeta */
/** @typedef {{ sourceType: "asset-url" | "css-url" }} AssetDependencyMeta */

@@ -741,9 +742,10 @@ /** @typedef {ImportDependencyMeta | CssImportDependencyMeta | AssetDependencyMeta} DependencyMeta */

getSourceTypes() {
if (
this.externalType === "asset" &&
this.dependencyMeta &&
/** @type {AssetDependencyMeta} */
(this.dependencyMeta).sourceType === "css-url"
) {
return CSS_URL_TYPES;
if (this.externalType === "asset" && this.dependencyMeta) {
const sourceType =
/** @type {AssetDependencyMeta} */
(this.dependencyMeta).sourceType;
// TODO webpack 6 drop "css-url" once the alias is removed
if (sourceType === ASSET_URL_TYPE || sourceType === "css-url") {
return ASSET_URL_TYPES;
}
} else if (this.externalType === "css-import") {

@@ -1119,3 +1121,5 @@ return CSS_IMPORT_TYPES;

}
case "css-url": {
// TODO webpack 6 remove "css-url" alias
case "css-url":
case "asset-url": {
/** @type {Sources} */

@@ -1125,3 +1129,3 @@ const sources = new Map();

const data = new Map();
data.set("url", { "css-url": /** @type {string} */ (request) });
data.set("url", { [ASSET_URL_TYPE]: /** @type {string} */ (request) });
return { sources, runtimeRequirements: RUNTIME_REQUIREMENTS, data };

@@ -1128,0 +1132,0 @@ }

@@ -10,2 +10,3 @@ /*

const ExternalModule = require("./ExternalModule");
const { ASSET_URL_TYPE } = require("./ModuleSourceTypeConstants");
const ContextElementDependency = require("./dependencies/ContextElementDependency");

@@ -216,3 +217,3 @@ const CssImportDependency = require("./dependencies/CssImportDependency");

) {
dependencyMeta = { sourceType: "css-url" };
dependencyMeta = { sourceType: ASSET_URL_TYPE };
}

@@ -219,0 +220,0 @@

@@ -258,7 +258,3 @@ /*

);
return new HtmlGenerator(
/** @type {import("../../declarations/WebpackOptions").HtmlGeneratorOptions} */
(generatorOptions),
compilation.moduleGraph
);
return new HtmlGenerator(generatorOptions, compilation.moduleGraph);
});

@@ -265,0 +261,0 @@

@@ -44,2 +44,4 @@ /*

/** @typedef {import("./Compilation").PathData} PathData */
/** @typedef {import("./Compilation").PathDataChunk} PathDataChunk */
/** @typedef {import("./Compilation").PathDataModule} PathDataModule */
/** @typedef {import("./CodeGenerationResults")} CodeGenerationResults */

@@ -46,0 +48,0 @@ /** @typedef {import("./Entrypoint")} Entrypoint */

@@ -122,3 +122,3 @@ /*

* @property {InitFragment<EXPECTED_ANY>[]} chunkInitFragments chunk init fragments for javascript modules
* @property {{ javascript?: string, ["css-url"]?: string }} url url for css and javascript modules
* @property {{ javascript?: string, ["asset-url"]?: string }} url url for asset modules
* @property {string} filename a filename for asset modules

@@ -125,0 +125,0 @@ * @property {AssetInfo} assetInfo an asset info for asset modules

@@ -29,2 +29,7 @@ /*

/**
* @type {Readonly<"asset-url">}
*/
const ASSET_URL_TYPE = "asset-url";
/**
* @type {Readonly<"css">}

@@ -40,7 +45,2 @@ */

/**
* @type {Readonly<"css-url">}
*/
const CSS_URL_TYPE = "css-url";
/**
* @type {Readonly<"css-text">}

@@ -77,3 +77,3 @@ */

* Defines the all types type used by this module.
* @typedef {JAVASCRIPT_TYPE | RUNTIME_TYPE | WEBASSEMBLY_TYPE | ASSET_TYPE | CSS_TYPE | CSS_IMPORT_TYPE | CSS_URL_TYPE | CSS_TEXT_TYPE | HTML_TYPE | SHARED_INIT_TYPE | REMOTE_GENERATOR_TYPE | CONSUME_SHARED_GENERATOR_TYPE | UNKNOWN_TYPE} AllTypes
* @typedef {JAVASCRIPT_TYPE | RUNTIME_TYPE | WEBASSEMBLY_TYPE | ASSET_TYPE | ASSET_URL_TYPE | CSS_TYPE | CSS_IMPORT_TYPE | CSS_TEXT_TYPE | HTML_TYPE | SHARED_INIT_TYPE | REMOTE_GENERATOR_TYPE | CONSUME_SHARED_GENERATOR_TYPE | UNKNOWN_TYPE} AllTypes
*/

@@ -97,13 +97,13 @@

/**
* @type {ReadonlySet<"css-url" | "asset">}
* @type {ReadonlySet<"asset-url" | "asset">}
*/
const ASSET_AND_CSS_URL_TYPES = new Set([ASSET_TYPE, CSS_URL_TYPE]);
const ASSET_AND_ASSET_URL_TYPES = new Set([ASSET_TYPE, ASSET_URL_TYPE]);
/**
* @type {ReadonlySet<"javascript" | "css-url" | "asset">}
* @type {ReadonlySet<"javascript" | "asset-url" | "asset">}
*/
const ASSET_AND_JAVASCRIPT_AND_CSS_URL_TYPES = new Set([
const ASSET_AND_JAVASCRIPT_AND_ASSET_URL_TYPES = new Set([
ASSET_TYPE,
JAVASCRIPT_TYPE,
CSS_URL_TYPE
ASSET_URL_TYPE
]);

@@ -117,5 +117,8 @@

/**
* @type {ReadonlySet<"javascript" | "css-url">}
* @type {ReadonlySet<"javascript" | "asset-url">}
*/
const JAVASCRIPT_AND_CSS_URL_TYPES = new Set([JAVASCRIPT_TYPE, CSS_URL_TYPE]);
const JAVASCRIPT_AND_ASSET_URL_TYPES = new Set([
JAVASCRIPT_TYPE,
ASSET_URL_TYPE
]);

@@ -133,5 +136,5 @@ /**

/**
* @type {ReadonlySet<"css-url">}
* @type {ReadonlySet<"asset-url">}
*/
const CSS_URL_TYPES = new Set([CSS_URL_TYPE]);
const ASSET_URL_TYPES = new Set([ASSET_URL_TYPE]);

@@ -185,8 +188,10 @@ /**

module.exports.ASSET_AND_CSS_URL_TYPES = ASSET_AND_CSS_URL_TYPES;
module.exports.ASSET_AND_JAVASCRIPT_AND_CSS_URL_TYPES =
ASSET_AND_JAVASCRIPT_AND_CSS_URL_TYPES;
module.exports.ASSET_AND_ASSET_URL_TYPES = ASSET_AND_ASSET_URL_TYPES;
module.exports.ASSET_AND_JAVASCRIPT_AND_ASSET_URL_TYPES =
ASSET_AND_JAVASCRIPT_AND_ASSET_URL_TYPES;
module.exports.ASSET_AND_JAVASCRIPT_TYPES = ASSET_AND_JAVASCRIPT_TYPES;
module.exports.ASSET_TYPE = ASSET_TYPE;
module.exports.ASSET_TYPES = ASSET_TYPES;
module.exports.ASSET_URL_TYPE = ASSET_URL_TYPE;
module.exports.ASSET_URL_TYPES = ASSET_URL_TYPES;
module.exports.CONSUME_SHARED_TYPES = CONSUME_SHARED_TYPES;

@@ -198,11 +203,8 @@ module.exports.CSS_IMPORT_TYPE = CSS_IMPORT_TYPE;

module.exports.CSS_TYPE = CSS_TYPE;
module.exports.CSS_TYPE = CSS_TYPE;
module.exports.CSS_TYPES = CSS_TYPES;
module.exports.CSS_URL_TYPE = CSS_URL_TYPE;
module.exports.CSS_URL_TYPES = CSS_URL_TYPES;
module.exports.HTML_TYPE = HTML_TYPE;
module.exports.HTML_TYPES = HTML_TYPES;
module.exports.JAVASCRIPT_AND_ASSET_URL_TYPES = JAVASCRIPT_AND_ASSET_URL_TYPES;
module.exports.JAVASCRIPT_AND_CSS_TEXT_TYPES = JAVASCRIPT_AND_CSS_TEXT_TYPES;
module.exports.JAVASCRIPT_AND_CSS_TYPES = JAVASCRIPT_AND_CSS_TYPES;
module.exports.JAVASCRIPT_AND_CSS_URL_TYPES = JAVASCRIPT_AND_CSS_URL_TYPES;
module.exports.JAVASCRIPT_TYPE = JAVASCRIPT_TYPE;

@@ -209,0 +211,0 @@ module.exports.JAVASCRIPT_TYPES = JAVASCRIPT_TYPES;

@@ -64,2 +64,3 @@ /*

/** @typedef {import("./config/defaults").WebpackOptionsNormalizedWithDefaults} WebpackOptions */
/** @typedef {import("./Dependency")} Dependency */
/** @typedef {import("./Dependency").UpdateHashContext} UpdateHashContext */

@@ -89,4 +90,9 @@ /** @typedef {import("./Generator")} Generator */

/** @typedef {import("./ModuleGraphConnection").ConnectionState} ConnectionState */
/** @typedef {Iterator<SideEffectsWalk, ConnectionState, ConnectionState>} SideEffectsWalk */
/** @typedef {import("./NormalModuleFactory")} NormalModuleFactory */
/** @typedef {import("./NormalModuleFactory").NormalModuleTypes} NormalModuleTypes */
/** @typedef {import("./NormalModuleFactory").ParserByType} ParserByType */
/** @typedef {import("./NormalModuleFactory").ParserOptionsByType} ParserOptionsByType */
/** @typedef {import("./NormalModuleFactory").GeneratorByType} GeneratorByType */
/** @typedef {import("./NormalModuleFactory").GeneratorOptionsByType} GeneratorOptionsByType */
/** @typedef {import("./NormalModuleFactory").ResourceSchemeData} ResourceSchemeData */

@@ -131,2 +137,83 @@ /** @typedef {import("./Parser")} Parser */

const getHarmonyImportSideEffectDependency = memoize(() =>
require("./dependencies/HarmonyImportSideEffectDependency")
);
/**
* @param {NormalModule} mod the module
* @param {ModuleGraph} moduleGraph the module graph
* @param {Dependency} dep the dep that triggered the bailout
*/
const recordSideEffectsBailout = (mod, moduleGraph, dep) => {
if (mod._addedSideEffectsBailout === undefined) {
mod._addedSideEffectsBailout = new WeakSet();
} else if (mod._addedSideEffectsBailout.has(moduleGraph)) {
return;
}
mod._addedSideEffectsBailout.add(moduleGraph);
moduleGraph
.getOptimizationBailout(mod)
.push(
() =>
`Dependency (${dep.type}) with side effects at ${formatLocation(dep.loc)}`
);
};
/**
* Generator form of `getSideEffectsConnectionState` — descends through
* `HarmonyImportSideEffectDependency` via `yield` so the trampoline in
* `getSideEffectsConnectionState` can drive the walk iteratively (#20986).
* @param {NormalModule} mod the module being evaluated
* @param {ModuleGraph} moduleGraph the module graph
* @returns {SideEffectsWalk} the generator
*/
function* walkSideEffects(mod, moduleGraph) {
if (mod.factoryMeta !== undefined) {
if (mod.factoryMeta.sideEffectFree) return false;
if (mod.factoryMeta.sideEffectFree === false) return true;
}
if (!(mod.buildMeta !== undefined && mod.buildMeta.sideEffectFree)) {
return true;
}
if (mod._isEvaluatingSideEffects) {
return ModuleGraphConnection.CIRCULAR_CONNECTION;
}
const SideEffectDep = getHarmonyImportSideEffectDependency();
mod._isEvaluatingSideEffects = true;
/** @type {ConnectionState} */
let current = false;
for (const dep of mod.dependencies) {
/** @type {ConnectionState} */
let state;
if (dep instanceof SideEffectDep) {
const refModule = moduleGraph.getModule(dep);
if (!refModule) {
state = true;
} else if (refModule instanceof NormalModule) {
state = yield walkSideEffects(refModule, moduleGraph);
} else {
state = refModule.getSideEffectsConnectionState(moduleGraph);
}
} else {
state = dep.getModuleEvaluationSideEffectsState(moduleGraph);
}
if (state === true) {
recordSideEffectsBailout(mod, moduleGraph, dep);
mod._isEvaluatingSideEffects = false;
return true;
}
if (state !== ModuleGraphConnection.CIRCULAR_CONNECTION) {
current = ModuleGraphConnection.addConnectionStates(current, state);
}
}
mod._isEvaluatingSideEffects = false;
// When caching is implemented here, make sure to not cache when
// at least one circular connection was folded into `current`.
return current;
}
const ABSOLUTE_PATH_REGEX = /^(?:[a-z]:\\|\\\\|\/)/i;

@@ -235,5 +322,6 @@

/**
* @template {NormalModuleTypes | ""} [T=NormalModuleTypes | ""]
* @typedef {object} NormalModuleCreateData
* @property {string=} layer an optional layer in which the module is
* @property {NormalModuleTypes | ""} type module type. When deserializing, this is set to an empty string "".
* @property {T} type module type. When deserializing, this is set to an empty string "".
* @property {string} request request string

@@ -247,6 +335,6 @@ * @property {string} userRequest request intended by user (without loaders from config)

* @property {string=} matchResource path + query of the matched resource (virtual)
* @property {Parser} parser the parser used
* @property {ParserOptions=} parserOptions the options of the parser used
* @property {Generator} generator the generator used
* @property {GeneratorOptions=} generatorOptions the options of the generator used
* @property {ParserByType[T]} parser the parser used
* @property {ParserOptionsByType[T]=} parserOptions the options of the parser used
* @property {GeneratorByType[T]} generator the generator used
* @property {GeneratorOptionsByType[T]=} generatorOptions the options of the generator used
* @property {ResolveOptions=} resolveOptions options used for resolving requests from this module

@@ -413,3 +501,2 @@ * @property {boolean} extractSourceMap enable/disable extracting source map

/**
* @private
* @type {boolean}

@@ -419,3 +506,2 @@ */

/**
* @private
* @type {WeakSet<ModuleGraph> | undefined}

@@ -1463,43 +1549,17 @@ */

getSideEffectsConnectionState(moduleGraph) {
if (this.factoryMeta !== undefined) {
if (this.factoryMeta.sideEffectFree) return false;
if (this.factoryMeta.sideEffectFree === false) return true;
}
if (this.buildMeta !== undefined && this.buildMeta.sideEffectFree) {
if (this._isEvaluatingSideEffects) {
return ModuleGraphConnection.CIRCULAR_CONNECTION;
// Trampoline `walkSideEffects` so the descent doesn't consume the
// call stack (#20986).
const stack = [walkSideEffects(this, moduleGraph)];
/** @type {ConnectionState} */
let r = false;
while (stack.length > 0) {
const step = stack[stack.length - 1].next(r);
if (step.done) {
stack.pop();
r = step.value;
} else {
stack.push(step.value);
}
this._isEvaluatingSideEffects = true;
/** @type {ConnectionState} */
let current = false;
for (const dep of this.dependencies) {
const state = dep.getModuleEvaluationSideEffectsState(moduleGraph);
if (state === true) {
if (
this._addedSideEffectsBailout === undefined
? ((this._addedSideEffectsBailout = new WeakSet()), true)
: !this._addedSideEffectsBailout.has(moduleGraph)
) {
this._addedSideEffectsBailout.add(moduleGraph);
moduleGraph
.getOptimizationBailout(this)
.push(
() =>
`Dependency (${
dep.type
}) with side effects at ${formatLocation(dep.loc)}`
);
}
this._isEvaluatingSideEffects = false;
return true;
} else if (state !== ModuleGraphConnection.CIRCULAR_CONNECTION) {
current = ModuleGraphConnection.addConnectionStates(current, state);
}
}
this._isEvaluatingSideEffects = false;
// When caching is implemented here, make sure to not cache when
// at least one circular connection was in the loop above
return current;
}
return true;
return r;
}

@@ -1506,0 +1566,0 @@

@@ -72,3 +72,3 @@ /*

/** @typedef {Pick<RuleSetRule, "type" | "sideEffects" | "parser" | "generator" | "resolve" | "layer" | "extractSourceMap">} ModuleSettings */
/** @typedef {Partial<NormalModuleCreateData & { settings: ModuleSettings }>} CreateData */
/** @typedef {NormalModuleCreateData & { settings: ModuleSettings }} CreateData */

@@ -86,3 +86,3 @@ /**

* @property {string} dependencyType
* @property {CreateData} createData
* @property {Partial<CreateData>} createData
* @property {FileSystemDependencies} fileDependencies

@@ -329,3 +329,3 @@ * @property {FileSystemDependencies} missingDependencies

/** @typedef {import("./html/HtmlGenerator")} HtmlGenerator */
/** @typedef {import("../declarations/WebpackOptions").EmptyGeneratorOptions} HtmlGeneratorOptions */
/** @typedef {import("../declarations/WebpackOptions").HtmlGeneratorOptions} HtmlGeneratorOptions */

@@ -345,4 +345,4 @@ /* eslint-disable jsdoc/type-formatting */

* [ASSET_MODULE_TYPE_BYTES, AssetBytesParser, EmptyParserOptions, AssetBytesGenerator, EmptyGeneratorOptions],
* [WEBASSEMBLY_MODULE_TYPE_ASYNC, AsyncWebAssemblyParser, EmptyParserOptions, Generator, EmptyParserOptions],
* [WEBASSEMBLY_MODULE_TYPE_SYNC, WebAssemblyParser, EmptyParserOptions, Generator, EmptyParserOptions],
* [WEBASSEMBLY_MODULE_TYPE_ASYNC, AsyncWebAssemblyParser, EmptyParserOptions, Generator, EmptyGeneratorOptions],
* [WEBASSEMBLY_MODULE_TYPE_SYNC, WebAssemblyParser, EmptyParserOptions, Generator, EmptyGeneratorOptions],
* [CSS_MODULE_TYPE, CssParser, CssParserOptions, CssGenerator, CssGeneratorOptions],

@@ -373,2 +373,14 @@ * [CSS_MODULE_TYPE_AUTO, CssParser, CssModuleParserOptions, CssGenerator, CssModuleGeneratorOptions],

/**
* Maps each tuple in `T` to a record from its `[0]` key to its `[I]` value.
* @template {unknown[]} T
* @template {number} I
* @typedef {T extends [infer Head extends [string, ...unknown[]], ...infer Tail extends [string, ...unknown[]][]] ? Record<Head[0], I extends keyof Head ? Head[I] : never> & TupleToTypeMap<Tail, I> : unknown } TupleToTypeMap
*/
/** @typedef {TupleToTypeMap<ParsersAndGeneratorsByTypes, 1>} ParserByType */
/** @typedef {TupleToTypeMap<ParsersAndGeneratorsByTypes, 2>} ParserOptionsByType */
/** @typedef {TupleToTypeMap<ParsersAndGeneratorsByTypes, 3>} GeneratorByType */
/** @typedef {TupleToTypeMap<ParsersAndGeneratorsByTypes, 4>} GeneratorOptionsByType */
class NormalModuleFactory extends ModuleFactory {

@@ -501,3 +513,5 @@ /**

const createData = resolveData.createData;
const createData =
/** @type {CreateData} */
(resolveData.createData);

@@ -515,6 +529,3 @@ this.hooks.createModule.callAsync(

createdModule = this.hooks.createModuleClass
.for(
/** @type {ModuleSettings} */
(createData.settings).type
)
.for(createData.settings.type)
.call(createData, resolveData);

@@ -524,6 +535,3 @@

createdModule = /** @type {Module} */ (
new NormalModule(
/** @type {NormalModuleCreateData} */
(createData)
)
new NormalModule(createData)
);

@@ -1416,5 +1424,6 @@ }

* Returns parser.
* @param {string} type type
* @template {string} T
* @param {T} type type
* @param {ParserOptions} parserOptions parser options
* @returns {Parser} parser
* @returns {ParserByType[T]} parser
*/

@@ -1436,3 +1445,3 @@ getParser(type, parserOptions = EMPTY_PARSER_OPTIONS) {

return parser;
return /** @type {ParserByType[T]} */ (parser);
}

@@ -1442,5 +1451,6 @@

* Creates a parser from the provided type.
* @param {string} type type
* @template {string} T
* @param {T} type type
* @param {ParserOptions} parserOptions parser options
* @returns {Parser} parser
* @returns {ParserByType[T]} parser
*/

@@ -1458,3 +1468,3 @@ createParser(type, parserOptions = {}) {

this.hooks.parser.for(type).call(parser, parserOptions);
return parser;
return /** @type {ParserByType[T]} */ (parser);
}

@@ -1464,5 +1474,6 @@

* Returns generator.
* @param {string} type type of generator
* @template {string} T
* @param {T} type type of generator
* @param {GeneratorOptions} generatorOptions generator options
* @returns {Generator} generator
* @returns {GeneratorByType[T]} generator
*/

@@ -1484,3 +1495,3 @@ getGenerator(type, generatorOptions = EMPTY_GENERATOR_OPTIONS) {

return generator;
return /** @type {GeneratorByType[T]} */ (generator);
}

@@ -1490,5 +1501,6 @@

* Creates a generator.
* @param {string} type type of generator
* @template {string} T
* @param {T} type type of generator
* @param {GeneratorOptions} generatorOptions generator options
* @returns {Generator} generator
* @returns {GeneratorByType[T]} generator
*/

@@ -1508,3 +1520,3 @@ createGenerator(type, generatorOptions = {}) {

this.hooks.generator.for(type).call(generator, generatorOptions);
return generator;
return /** @type {GeneratorByType[T]} */ (generator);
}

@@ -1511,0 +1523,0 @@

@@ -30,3 +30,2 @@ /*

/** @typedef {import("../ModuleGraphConnection")} ModuleGraphConnection */
/** @typedef {import("../NormalModuleFactory").ModuleSettings} ModuleSettings */
/** @typedef {import("../javascript/JavascriptParser")} JavascriptParser */

@@ -138,3 +137,3 @@ /** @typedef {import("../javascript/JavascriptParser").Range} Range */

normalModuleFactory.hooks.module.tap(PLUGIN_NAME, (module, data) => {
const settings = /** @type {ModuleSettings} */ (data.settings);
const settings = data.settings;
if (typeof settings.sideEffects === "boolean") {

@@ -141,0 +140,0 @@ if (module.factoryMeta === undefined) {

@@ -35,3 +35,3 @@ /*

/** @typedef {import("../ModuleGraph")} ModuleGraph */
/** @typedef {import("../TemplatedPathPlugin").TemplatePath} TemplatePath */
/** @typedef {import("../Chunk").ChunkFilenameTemplate} ChunkFilenameTemplate */
/** @typedef {import("../util/deterministicGrouping").GroupedItems<Module>} DeterministicGroupingGroupedItemsForModule */

@@ -82,3 +82,3 @@ /** @typedef {import("../util/deterministicGrouping").Options<Module>} DeterministicGroupingOptionsForModule */

* @property {CountOfRequest=} maxInitialRequests
* @property {TemplatePath=} filename
* @property {ChunkFilenameTemplate=} filename
* @property {string=} idHint

@@ -106,3 +106,3 @@ * @property {string=} automaticNameDelimiter

* @property {CountOfRequest} maxInitialRequests
* @property {TemplatePath=} filename
* @property {ChunkFilenameTemplate=} filename
* @property {string} idHint

@@ -169,3 +169,3 @@ * @property {string} automaticNameDelimiter

* @property {boolean} hidePathInfo
* @property {TemplatePath=} filename
* @property {ChunkFilenameTemplate=} filename
* @property {string} automaticNameDelimiter

@@ -172,0 +172,0 @@ * @property {GetCacheGroups} getCacheGroups

@@ -29,10 +29,10 @@ /*

compilation.outputOptions;
const chunk = /** @type {Chunk} */ (this.chunk);
const chunkName = compilation.getPath(
JavascriptModulesPlugin.getChunkFilenameTemplate(
/** @type {Chunk} */
(this.chunk),
chunk,
compilation.outputOptions
),
{
chunk: this.chunk,
chunk,
contentHashType: "javascript"

@@ -39,0 +39,0 @@ }

@@ -17,3 +17,3 @@ /*

/** @typedef {import("../Compilation").HashWithLengthFunction} HashWithLengthFunction */
/** @typedef {import("../TemplatedPathPlugin").TemplatePath} TemplatePath */
/** @typedef {import("../Chunk").ChunkFilenameTemplate} ChunkFilenameTemplate */

@@ -25,3 +25,3 @@ class GetChunkFilenameRuntimeModule extends RuntimeModule {

* @param {string} global function name to be assigned
* @param {(chunk: Chunk) => TemplatePath | false} getFilenameForChunk functor to get the filename or function
* @param {(chunk: Chunk) => ChunkFilenameTemplate | false} getFilenameForChunk functor to get the filename or function
* @param {boolean} allChunks when false, only async chunks are included

@@ -35,3 +35,3 @@ */

this.global = global;
/** @type {(chunk: Chunk) => TemplatePath | false} */
/** @type {(chunk: Chunk) => ChunkFilenameTemplate | false} */
this.getFilenameForChunk = getFilenameForChunk;

@@ -55,3 +55,3 @@ /** @type {boolean} */

/** @type {Map<string | TemplatePath, Set<Chunk>>} */
/** @type {Map<ChunkFilenameTemplate, Set<Chunk>>} */
const chunkFilenames = new Map();

@@ -133,3 +133,3 @@ let maxChunks = 0;

* @param {Chunk} c the chunk
* @param {string | TemplatePath} chunkFilename the filename template for the chunk
* @param {ChunkFilenameTemplate} chunkFilename the filename template for the chunk
* @returns {void}

@@ -136,0 +136,0 @@ */

@@ -284,3 +284,3 @@ /*

typeof publicPath !== "string" ||
/\[(?:full)?hash\]/.test(publicPath)
FULLHASH_REGEXP.test(publicPath)
) {

@@ -287,0 +287,0 @@ module.fullHash = true;

@@ -359,11 +359,5 @@ /*

}
const options = resolvedConsumes.get(
/** @type {string} */ (resource)
);
const options = resolvedConsumes.get(resource);
if (options !== undefined) {
return createConsumeSharedModule(
context,
/** @type {string} */ (resource),
options
);
return createConsumeSharedModule(context, resource, options);
}

@@ -370,0 +364,0 @@ return Promise.resolve();

@@ -172,3 +172,3 @@ /*

(module, { resource, resourceResolveData }, resolveData) => {
if (resolvedProvideMap.has(/** @type {string} */ (resource))) {
if (resolvedProvideMap.has(resource)) {
return module;

@@ -183,3 +183,3 @@ }

config,
/** @type {string} */ (resource),
resource,
resourceResolveData

@@ -194,3 +194,3 @@ );

provideSharedModule(
/** @type {string} */ (resource),
resource,
{

@@ -200,3 +200,3 @@ ...config,

},
/** @type {string} */ (resource),
resource,
resourceResolveData

@@ -203,0 +203,0 @@ );

@@ -33,3 +33,3 @@ /*

/** @typedef {import("./NormalModule").RawSourceMap} RawSourceMap */
/** @typedef {import("./TemplatedPathPlugin").TemplatePath} TemplatePath */
/** @typedef {import("./TemplatedPathPlugin").TemplatePath} SourceMappingURLComment */
/** @typedef {import("./util/fs").OutputFileSystem} OutputFileSystem */

@@ -75,2 +75,87 @@

/**
* Compilation-scoped registry of original asset sources for multi-plugin
* cooperation. The first SourceMapDevToolPlugin instance to see a file pins a
* reference to the asset's still-unwrapped {@link Source} object; later
* instances whose `asset.source.sourceAndMap()` would now return `null` (the
* earlier instance replaced the asset with a `RawSource`) can re-extract the
* map from this pinned reference. We keep the registry on a module-scoped
* `WeakMap` so the entries are reclaimed automatically when the compilation
* itself becomes unreachable; we never store anything on the compilation
* object directly.
*
* Stashing the `Source` object itself rather than an extracted map keeps the
* fast path free of cloning and source-map serialization work — the
* extraction only happens if a subsequent plugin actually needs the map.
* @type {WeakMap<Compilation, Map<string, Source>>}
*/
const originalSourceRegistry = new WeakMap();
/**
* Returns (creating if necessary) the per-compilation registry of original
* asset {@link Source} objects.
* @param {Compilation} compilation compilation
* @returns {Map<string, Source>} registry
*/
const getOriginalSourceRegistry = (compilation) => {
let registry = originalSourceRegistry.get(compilation);
if (registry === undefined) {
registry = new Map();
originalSourceRegistry.set(compilation, registry);
}
return registry;
};
/**
* Extracts source and source map from a Source object, falling back to a
* registered original source for assets that another SourceMapDevToolPlugin
* instance has already wrapped (whose internal map is now `null`).
*
* The returned source is read from the asset as it currently stands — that way
* any `sourceMappingURL` comments appended by earlier plugin instances survive
* — while the map is taken from the pinned original Source when the current
* one no longer carries it.
* @param {string} file file name
* @param {Source} asset source object as currently held by the compilation
* @param {MapOptions} options map extraction options
* @param {Map<string, Source>} registry compilation-scoped original-source registry
* @returns {{ source: string, sourceMap: RawSourceMap } | undefined} extracted pair or `undefined` when no map is recoverable
*/
const extractSourceAndMap = (file, asset, options, registry) => {
/** @type {string | Buffer} */
let source;
/** @type {null | RawSourceMap} */
let sourceMap;
if (asset.sourceAndMap) {
const sourceAndMap = asset.sourceAndMap(options);
source = sourceAndMap.source;
sourceMap = sourceAndMap.map;
} else {
source = asset.source();
sourceMap = asset.map(options);
}
// Bail before touching the registry if we can't return a usable string
// source — pinning a non-string-producing asset would only waste the slot.
if (typeof source !== "string") return;
if (sourceMap) {
// The current asset still owns the original map — pin a reference so
// that a later plugin instance (which will see a rewrapped asset
// without a map) can recover it on demand.
if (!registry.has(file)) registry.set(file, asset);
} else {
// The current asset (typically a `RawSource` left by an earlier
// SourceMapDevToolPlugin instance) has no internal map. Re-extract
// the map from the original Source we pinned earlier. We keep using
// `source` from the current asset so that any prior wrappers (e.g.
// appended sourceMappingURL comments) are preserved.
const original = registry.get(file);
if (!original) return;
sourceMap = original.sourceAndMap
? original.sourceAndMap(options).map
: original.map(options);
if (!sourceMap) return;
}
return { source, sourceMap };
};
/**
* Creating {@link SourceMapTask} for given file

@@ -83,2 +168,3 @@ * @param {string} file current compiled file

* @param {ItemCacheFacade} cacheItem cache item
* @param {Map<string, Source>} registry compilation-scoped original-source registry
* @returns {SourceMapTask | undefined} created task instance or `undefined`

@@ -92,20 +178,8 @@ */

compilation,
cacheItem
cacheItem,
registry
) => {
/** @type {string | Buffer} */
let source;
/** @type {null | RawSourceMap} */
let sourceMap;
/**
* Check if asset can build source map
*/
if (asset.sourceAndMap) {
const sourceAndMap = asset.sourceAndMap(options);
sourceMap = sourceAndMap.map;
source = sourceAndMap.source;
} else {
sourceMap = asset.map(options);
source = asset.source();
}
if (!sourceMap || typeof source !== "string") return;
const extracted = extractSourceAndMap(file, asset, options, registry);
if (!extracted) return;
const { source, sourceMap } = extracted;
const context = compilation.options.context;

@@ -124,3 +198,3 @@ const root = compilation.compiler.root;

asset,
source,
source: /** @type {string} */ (source),
assetInfo,

@@ -135,2 +209,25 @@ sourceMap,

/**
* Maps a configuration value (string, RegExp, function, nullish, or array of
* such) into a JSON-serializable form. Functions and RegExps are turned into
* their `.toString()` representation so that changes to inline callbacks
* invalidate caches; everything else is returned as-is so that the surrounding
* `JSON.stringify` does the escaping.
*
* The result is used through `JSON.stringify` to build cache identifiers, so
* we deliberately avoid any homemade `|` / `,` separators that could collide
* with characters appearing inside user-provided values such as `publicPath`,
* template strings, or `sourceRoot`.
* @param {EXPECTED_ANY} value option value
* @returns {EXPECTED_ANY} JSON-serializable representation
*/
const toCacheKeyValue = (value) => {
if (value === undefined || value === null) return value;
if (Array.isArray(value)) return value.map(toCacheKeyValue);
if (value instanceof RegExp || typeof value === "function") {
return value.toString();
}
return value;
};
class SourceMapDevToolPlugin {

@@ -145,3 +242,3 @@ /**

this.sourceMapFilename = options.filename;
/** @type {false | TemplatePath} */
/** @type {false | SourceMappingURLComment} */
this.sourceMappingURLComment =

@@ -163,2 +260,24 @@ options.append === false

this.options = options;
// Cache salt derived from output-affecting options, so that two
// SourceMapDevToolPlugin instances (or `devtool` + a plugin) operating
// on the same asset don't share a cache entry. We serialize via
// `JSON.stringify` rather than a homemade separator so that any
// special characters (e.g. `|` inside a publicPath or sourceRoot)
// can't accidentally make two different option sets collide.
/** @type {string} */
this._cacheSalt = JSON.stringify([
toCacheKeyValue(options.filename),
toCacheKeyValue(options.append),
toCacheKeyValue(this.moduleFilenameTemplate),
toCacheKeyValue(this.fallbackModuleFilenameTemplate),
toCacheKeyValue(this.namespace),
options.module !== false,
options.columns !== false,
Boolean(options.noSources),
Boolean(options.debugIds),
options.sourceRoot || "",
toCacheKeyValue(options.ignoreList),
options.publicPath || "",
options.fileContext || ""
]);
}

@@ -206,2 +325,10 @@

// All SourceMapDevToolPlugin instances on the same compilation share
// a registry of pristine asset sources, so the second instance to
// run can still recover the original map after the first instance
// has replaced the asset with a `RawSource`. The registry lives on a
// module-scoped `WeakMap` keyed by compilation so it is released
// automatically and never pollutes the compilation object.
const originalSources = getOriginalSourceRegistry(compilation);
compilation.hooks.processAssets.tapAsync(

@@ -251,6 +378,2 @@ {

(compilation.getAsset(file));
if (asset.info.related && asset.info.related.sourceMap) {
fileIndex++;
return callback();
}

@@ -262,4 +385,12 @@ const chunk = fileToChunk.get(file);

// The cache item identifier must include the per-instance
// salt so two SourceMapDevToolPlugin instances that target
// the same `file` don't collide in the persistent cache —
// they'd otherwise write different content to the same key
// and invalidate every pack on each build. We encode via
// `JSON.stringify` so that special characters (e.g. `|`)
// in an asset filename can't be spoofed to collide with the
// salt portion of the identifier.
const cacheItem = cache.getItemCache(
file,
JSON.stringify([file, this._cacheSalt]),
cache.mergeEtags(

@@ -279,2 +410,12 @@ cache.getLazyHashedEtag(asset.source),

if (cacheEntry) {
// Pin the still-unwrapped asset source in the registry
// before `compilation.updateAsset` replaces it. This is a
// pointer assignment — no source-map extraction work — and
// it lets a subsequent SourceMapDevToolPlugin instance
// extract the original map on demand even though the
// persistent cache hit lets us skip processing here.
if (!originalSources.has(file)) {
originalSources.set(file, asset.source);
}
const { assets, assetsInfo } = cacheEntry;

@@ -328,3 +469,4 @@ for (const cachedFile of Object.keys(assets)) {

compilation,
cacheItem
cacheItem,
originalSources
);

@@ -462,8 +604,17 @@

const moduleFilenames = modules.map((m) =>
moduleToSourceNameMapping.get(m)
);
sourceMap.sources = /** @type {string[]} */ (moduleFilenames);
const moduleFilenames =
/** @type {string[]} */
(modules.map((m) => moduleToSourceNameMapping.get(m)));
// We deliberately do NOT mutate `sourceMap` in place: the
// task's `sourceMap` reference may be shared with a
// `SourceMapSource` whose internal map cache is the same
// object (webpack-sources keeps it cached). A second
// `SourceMapDevToolPlugin` instance that reads the original
// source through the registry would otherwise see our
// rewrites. Instead we build a fresh `outputSourceMap` for
// the .map file and leave the original alone.
/** @type {number[] | undefined} */
let ignoreList;
if (options.ignoreList) {
const ignoreList = sourceMap.sources.reduce(
const list = moduleFilenames.reduce(
/** @type {(acc: number[], sourceName: string, idx: number) => number[]} */ (

@@ -484,12 +635,5 @@ (acc, sourceName, idx) => {

);
if (ignoreList.length > 0) {
sourceMap.ignoreList = ignoreList;
}
if (list.length > 0) ignoreList = list;
}
if (options.noSources) {
sourceMap.sourcesContent = undefined;
}
sourceMap.sourceRoot = options.sourceRoot || "";
sourceMap.file = file;
const usesContentHash =

@@ -501,2 +645,3 @@ sourceMapFilename &&

let outputFile = file;
// If SourceMap and asset uses contenthash, avoid a circular dependency by hiding hash in `file`

@@ -508,3 +653,3 @@ if (usesContentHash && task.assetInfo.contenthash) {

: quoteMeta(contenthash);
sourceMap.file = sourceMap.file.replace(
outputFile = outputFile.replace(
new RegExp(pattern, "g"),

@@ -515,3 +660,3 @@ (m) => "x".repeat(m.length)

/** @type {false | TemplatePath} */
/** @type {false | SourceMappingURLComment} */
let currentSourceMappingURLComment = sourceMappingURLComment;

@@ -533,14 +678,44 @@ const cssExtensionDetected =

/** @type {string | undefined} */
let debugIdValue;
if (options.debugIds) {
const debugId = generateDebugId(source, sourceMap.file);
sourceMap.debugId = debugId;
const debugId = generateDebugId(source, outputFile);
debugIdValue = debugId;
const debugIdComment = `\n//# debugId=${debugId}`;
currentSourceMappingURLComment =
currentSourceMappingURLComment
? `${debugIdComment}${currentSourceMappingURLComment}`
: debugIdComment;
if (currentSourceMappingURLComment === false) {
currentSourceMappingURLComment = debugIdComment;
} else if (
typeof currentSourceMappingURLComment === "function"
) {
// Wrap the user's append function so the debug-id
// comment is prepended at call time. Template-string
// concatenation would coerce the function to a string
// and lose its dynamic behavior.
const wrappedFn = currentSourceMappingURLComment;
currentSourceMappingURLComment = (pathData, assetInfo) =>
`${debugIdComment}${wrappedFn(pathData, assetInfo)}`;
} else {
currentSourceMappingURLComment = `${debugIdComment}${currentSourceMappingURLComment}`;
}
}
const sourceMapString = JSON.stringify(sourceMap);
/** @type {RawSourceMap} */
const outputSourceMap = {
...sourceMap,
sources: moduleFilenames,
sourceRoot: options.sourceRoot || "",
file: outputFile
};
if (ignoreList !== undefined) {
outputSourceMap.ignoreList = ignoreList;
}
if (options.noSources) {
outputSourceMap.sourcesContent = undefined;
}
if (debugIdValue !== undefined) {
outputSourceMap.debugId = debugIdValue;
}
const sourceMapString = JSON.stringify(outputSourceMap);
if (sourceMapFilename) {

@@ -589,4 +764,30 @@ const filename = file;

}
// Preserve any existing related.sourceMap entries from
// earlier SourceMapDevToolPlugin runs on the same asset so
// that all generated maps remain discoverable via asset
// info (the schema allows string or string[]).
const existingSourceMap =
task.assetInfo.related &&
task.assetInfo.related.sourceMap;
/** @type {string | string[]} */
let relatedSourceMap;
if (
existingSourceMap === undefined ||
existingSourceMap === null
) {
relatedSourceMap = sourceMapFile;
} else if (Array.isArray(existingSourceMap)) {
relatedSourceMap = existingSourceMap.includes(
sourceMapFile
)
? existingSourceMap
: [...existingSourceMap, sourceMapFile];
} else {
relatedSourceMap =
existingSourceMap === sourceMapFile
? existingSourceMap
: [existingSourceMap, sourceMapFile];
}
const assetInfo = {
related: { sourceMap: sourceMapFile }
related: { sourceMap: relatedSourceMap }
};

@@ -593,0 +794,0 @@ assets[file] = asset;

@@ -66,3 +66,3 @@ /*

* @property {() => Source} render
* @property {TemplatePath} filenameTemplate
* @property {string | import("./TemplatedPathPlugin").TemplatePathFn<EXPECTED_ANY>} filenameTemplate
* @property {PathData=} pathOptions

@@ -69,0 +69,0 @@ * @property {AssetInfo=} info

@@ -21,2 +21,4 @@ /*

/** @typedef {import("./Compilation").PathData} PathData */
/** @typedef {import("./Compilation").PathDataChunk} PathDataChunk */
/** @typedef {import("./Compilation").PathDataModule} PathDataModule */
/** @typedef {import("./Compiler")} Compiler */

@@ -142,9 +144,25 @@

/** @typedef {(pathData: PathData, assetInfo?: AssetInfo) => string} TemplatePathFn */
/** @typedef {string | TemplatePathFn} TemplatePath */
/**
* Callback used to compute a path from contextual data. The type parameter
* narrows the `pathData` shape when the caller knows it operates in a chunk
* (`PathDataChunk`) or module (`PathDataModule`) context — defaults to the
* fully-optional `PathData` for backward compatibility.
* @template {PathData} [T=PathData]
* @typedef {(pathData: T, assetInfo?: AssetInfo) => string} TemplatePathFn
*/
/**
* Either a raw template string (e.g. `"[name].[contenthash].js"`) or a
* generic `TemplatePathFn`. Method signatures that need to thread a narrowed
* `PathData` shape spell the function side out as `TemplatePathFn<T>`
* directly — `TemplatePath` itself stays a plain alias so local JSDoc
* re-imports keep a single shared identity.
* @typedef {string | TemplatePathFn} TemplatePath
*/
/**
* Returns the interpolated path.
* @param {TemplatePath} path the raw path
* @param {PathData} data context data
* @template {PathData} [T=PathData]
* @param {string | TemplatePathFn<T>} path the raw path
* @param {T} data context data
* @param {AssetInfo=} assetInfo extra info about the asset (will be written to)

@@ -151,0 +169,0 @@ * @returns {string} the interpolated path

@@ -219,4 +219,3 @@ /*

new AsyncWasmModule({
.../** @type {NormalModuleCreateData & { type: string }} */
(createData),
...createData,
phase: resolveData.phase

@@ -223,0 +222,0 @@ })

{
"name": "webpack",
"version": "5.107.0",
"version": "5.107.1",
"description": "Packs ECMAScript/CommonJs/AMD modules for the browser. Allows you to split your codebase into multiple bundles, which can be loaded on demand. Supports loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.",

@@ -37,3 +37,3 @@ "homepage": "https://github.com/webpack/webpack",

"lint:code": "node node_modules/eslint/bin/eslint.js --cache .",
"lint:special": "node node_modules/tooling/lockfile-lint && node node_modules/tooling/schemas-lint && node node_modules/tooling/inherit-types && node node_modules/tooling/format-schemas && node tooling/generate-runtime-code.js && node tooling/generate-wasm-code.js && node node_modules/tooling/compile-to-definitions && node node_modules/tooling/precompile-schemas && node node_modules/tooling/generate-types --no-template-literals",
"lint:special": "node node_modules/tooling/lockfile-lint && node node_modules/tooling/schemas-lint && node node_modules/tooling/inherit-types && node node_modules/tooling/format-schemas && node tooling/generate-runtime-code.js && node tooling/generate-wasm-code.js && node tooling/generate-html-entities.js && node node_modules/tooling/compile-to-definitions && node node_modules/tooling/precompile-schemas && node node_modules/tooling/generate-types --no-template-literals",
"lint:types": "tsc",

@@ -52,3 +52,3 @@ "lint:types-test": "tsc -p tsconfig.types.test.json",

"fix:code": "yarn lint:code --fix",
"fix:special": "node node_modules/tooling/inherit-types --write && node node_modules/tooling/format-schemas --write && node tooling/generate-runtime-code.js --write && node tooling/generate-wasm-code.js --write && node node_modules/tooling/compile-to-definitions --write && node node_modules/tooling/precompile-schemas --write && node node_modules/tooling/generate-types --no-template-literals --write",
"fix:special": "node node_modules/tooling/inherit-types --write && node node_modules/tooling/format-schemas --write && node tooling/generate-runtime-code.js --write && node tooling/generate-wasm-code.js --write && node tooling/generate-html-entities.js --write && node node_modules/tooling/compile-to-definitions --write && node node_modules/tooling/precompile-schemas --write && node node_modules/tooling/generate-types --no-template-literals --write",
"build:examples": "cd examples && node buildAll.js",

@@ -55,0 +55,0 @@ "benchmark": "node --max-old-space-size=6144 --experimental-vm-modules --trace-deprecation --hash-seed=1 --random-seed=1 --no-opt --predictable --predictable-gc-schedule --interpreted-frames-native-stack --allow-natives-syntax --expose-gc --no-concurrent-sweeping ./test/BenchmarkTestCases.benchmark.mjs",

@@ -6,2 +6,2 @@ /*

*/
"use strict";function r(t,{instancePath:e="",parentData:a,parentDataProperty:n,rootData:s=t}={}){if(!Array.isArray(t))return r.errors=[{params:{type:"array"}}],!1;{const e=t.length;for(let a=0;a<e;a++){let e=t[a];const n=0;if("string"!=typeof e)return r.errors=[{params:{type:"string"}}],!1;if(e.length<1)return r.errors=[{params:{}}],!1;if(0!==n)break}}return r.errors=null,!0}function t(e,{instancePath:a="",parentData:n,parentDataProperty:s,rootData:o=e}={}){let l=null,p=0;if(0===p){if(!e||"object"!=typeof e||Array.isArray(e))return t.errors=[{params:{type:"object"}}],!1;{let n;if(void 0===e.external&&(n="external"))return t.errors=[{params:{missingProperty:n}}],!1;{const n=p;for(const r in e)if("external"!==r&&"shareScope"!==r)return t.errors=[{params:{additionalProperty:r}}],!1;if(n===p){if(void 0!==e.external){let n=e.external;const s=p,u=p;let f=!1;const m=p;if(p==p)if("string"==typeof n){if(n.length<1){const r={params:{}};null===l?l=[r]:l.push(r),p++}}else{const r={params:{type:"string"}};null===l?l=[r]:l.push(r),p++}var i=m===p;if(f=f||i,!f){const t=p;r(n,{instancePath:a+"/external",parentData:e,parentDataProperty:"external",rootData:o})||(l=null===l?r.errors:l.concat(r.errors),p=l.length),i=t===p,f=f||i}if(!f){const r={params:{}};return null===l?l=[r]:l.push(r),p++,t.errors=l,!1}p=u,null!==l&&(u?l.length=u:l=null);var c=s===p}else c=!0;if(c)if(void 0!==e.shareScope){let r=e.shareScope;const a=p;if(p===a){if("string"!=typeof r)return t.errors=[{params:{type:"string"}}],!1;if(r.length<1)return t.errors=[{params:{}}],!1}c=a===p}else c=!0}}}}return t.errors=l,0===p}function e(a,{instancePath:n="",parentData:s,parentDataProperty:o,rootData:l=a}={}){let p=null,i=0;if(0===i){if(!a||"object"!=typeof a||Array.isArray(a))return e.errors=[{params:{type:"object"}}],!1;for(const s in a){let o=a[s];const u=i,f=i;let m=!1;const y=i;t(o,{instancePath:n+"/"+s.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:a,parentDataProperty:s,rootData:l})||(p=null===p?t.errors:p.concat(t.errors),i=p.length);var c=y===i;if(m=m||c,!m){const t=i;if(i==i)if("string"==typeof o){if(o.length<1){const r={params:{}};null===p?p=[r]:p.push(r),i++}}else{const r={params:{type:"string"}};null===p?p=[r]:p.push(r),i++}if(c=t===i,m=m||c,!m){const t=i;r(o,{instancePath:n+"/"+s.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:a,parentDataProperty:s,rootData:l})||(p=null===p?r.errors:p.concat(r.errors),i=p.length),c=t===i,m=m||c}}if(!m){const r={params:{}};return null===p?p=[r]:p.push(r),i++,e.errors=p,!1}if(i=f,null!==p&&(f?p.length=f:p=null),u!==i)break}}return e.errors=p,0===i}function a(r,{instancePath:t="",parentData:n,parentDataProperty:s,rootData:o=r}={}){let l=null,p=0;const i=p;let c=!1;const u=p;if(p===u)if(Array.isArray(r)){const a=r.length;for(let n=0;n<a;n++){let a=r[n];const s=p,i=p;let c=!1;const u=p;if(p==p)if("string"==typeof a){if(a.length<1){const r={params:{}};null===l?l=[r]:l.push(r),p++}}else{const r={params:{type:"string"}};null===l?l=[r]:l.push(r),p++}var f=u===p;if(c=c||f,!c){const s=p;e(a,{instancePath:t+"/"+n,parentData:r,parentDataProperty:n,rootData:o})||(l=null===l?e.errors:l.concat(e.errors),p=l.length),f=s===p,c=c||f}if(c)p=i,null!==l&&(i?l.length=i:l=null);else{const r={params:{}};null===l?l=[r]:l.push(r),p++}if(s!==p)break}}else{const r={params:{type:"array"}};null===l?l=[r]:l.push(r),p++}var m=u===p;if(c=c||m,!c){const a=p;e(r,{instancePath:t,parentData:n,parentDataProperty:s,rootData:o})||(l=null===l?e.errors:l.concat(e.errors),p=l.length),m=a===p,c=c||m}if(!c){const r={params:{}};return null===l?l=[r]:l.push(r),p++,a.errors=l,!1}return p=i,null!==l&&(i?l.length=i:l=null),a.errors=l,0===p}function n(r,{instancePath:t="",parentData:e,parentDataProperty:s,rootData:o=r}={}){let l=null,p=0;if(0===p){if(!r||"object"!=typeof r||Array.isArray(r))return n.errors=[{params:{type:"object"}}],!1;{let e;if(void 0===r.remoteType&&(e="remoteType")||void 0===r.remotes&&(e="remotes"))return n.errors=[{params:{missingProperty:e}}],!1;{const e=p;for(const t in r)if("remoteType"!==t&&"remotes"!==t&&"shareScope"!==t)return n.errors=[{params:{additionalProperty:t}}],!1;if(e===p){if(void 0!==r.remoteType){let t=r.remoteType;const e=p,a=p;let s=!1,o=null;const c=p;if("var"!==t&&"module"!==t&&"assign"!==t&&"this"!==t&&"window"!==t&&"self"!==t&&"global"!==t&&"commonjs"!==t&&"commonjs2"!==t&&"commonjs-module"!==t&&"commonjs-static"!==t&&"amd"!==t&&"amd-require"!==t&&"umd"!==t&&"umd2"!==t&&"jsonp"!==t&&"system"!==t&&"promise"!==t&&"import"!==t&&"module-import"!==t&&"script"!==t&&"node-commonjs"!==t&&"asset"!==t&&"css-import"!==t&&"css-url"!==t){const r={params:{}};null===l?l=[r]:l.push(r),p++}if(c===p&&(s=!0,o=0),!s){const r={params:{passingSchemas:o}};return null===l?l=[r]:l.push(r),p++,n.errors=l,!1}p=a,null!==l&&(a?l.length=a:l=null);var i=e===p}else i=!0;if(i){if(void 0!==r.remotes){const e=p;a(r.remotes,{instancePath:t+"/remotes",parentData:r,parentDataProperty:"remotes",rootData:o})||(l=null===l?a.errors:l.concat(a.errors),p=l.length),i=e===p}else i=!0;if(i)if(void 0!==r.shareScope){let t=r.shareScope;const e=p;if(p===e){if("string"!=typeof t)return n.errors=[{params:{type:"string"}}],!1;if(t.length<1)return n.errors=[{params:{}}],!1}i=e===p}else i=!0}}}}}return n.errors=l,0===p}module.exports=n,module.exports.default=n;
"use strict";function r(t,{instancePath:e="",parentData:a,parentDataProperty:n,rootData:s=t}={}){if(!Array.isArray(t))return r.errors=[{params:{type:"array"}}],!1;{const e=t.length;for(let a=0;a<e;a++){let e=t[a];const n=0;if("string"!=typeof e)return r.errors=[{params:{type:"string"}}],!1;if(e.length<1)return r.errors=[{params:{}}],!1;if(0!==n)break}}return r.errors=null,!0}function t(e,{instancePath:a="",parentData:n,parentDataProperty:s,rootData:o=e}={}){let l=null,p=0;if(0===p){if(!e||"object"!=typeof e||Array.isArray(e))return t.errors=[{params:{type:"object"}}],!1;{let n;if(void 0===e.external&&(n="external"))return t.errors=[{params:{missingProperty:n}}],!1;{const n=p;for(const r in e)if("external"!==r&&"shareScope"!==r)return t.errors=[{params:{additionalProperty:r}}],!1;if(n===p){if(void 0!==e.external){let n=e.external;const s=p,u=p;let f=!1;const m=p;if(p==p)if("string"==typeof n){if(n.length<1){const r={params:{}};null===l?l=[r]:l.push(r),p++}}else{const r={params:{type:"string"}};null===l?l=[r]:l.push(r),p++}var i=m===p;if(f=f||i,!f){const t=p;r(n,{instancePath:a+"/external",parentData:e,parentDataProperty:"external",rootData:o})||(l=null===l?r.errors:l.concat(r.errors),p=l.length),i=t===p,f=f||i}if(!f){const r={params:{}};return null===l?l=[r]:l.push(r),p++,t.errors=l,!1}p=u,null!==l&&(u?l.length=u:l=null);var c=s===p}else c=!0;if(c)if(void 0!==e.shareScope){let r=e.shareScope;const a=p;if(p===a){if("string"!=typeof r)return t.errors=[{params:{type:"string"}}],!1;if(r.length<1)return t.errors=[{params:{}}],!1}c=a===p}else c=!0}}}}return t.errors=l,0===p}function e(a,{instancePath:n="",parentData:s,parentDataProperty:o,rootData:l=a}={}){let p=null,i=0;if(0===i){if(!a||"object"!=typeof a||Array.isArray(a))return e.errors=[{params:{type:"object"}}],!1;for(const s in a){let o=a[s];const u=i,f=i;let m=!1;const y=i;t(o,{instancePath:n+"/"+s.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:a,parentDataProperty:s,rootData:l})||(p=null===p?t.errors:p.concat(t.errors),i=p.length);var c=y===i;if(m=m||c,!m){const t=i;if(i==i)if("string"==typeof o){if(o.length<1){const r={params:{}};null===p?p=[r]:p.push(r),i++}}else{const r={params:{type:"string"}};null===p?p=[r]:p.push(r),i++}if(c=t===i,m=m||c,!m){const t=i;r(o,{instancePath:n+"/"+s.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:a,parentDataProperty:s,rootData:l})||(p=null===p?r.errors:p.concat(r.errors),i=p.length),c=t===i,m=m||c}}if(!m){const r={params:{}};return null===p?p=[r]:p.push(r),i++,e.errors=p,!1}if(i=f,null!==p&&(f?p.length=f:p=null),u!==i)break}}return e.errors=p,0===i}function a(r,{instancePath:t="",parentData:n,parentDataProperty:s,rootData:o=r}={}){let l=null,p=0;const i=p;let c=!1;const u=p;if(p===u)if(Array.isArray(r)){const a=r.length;for(let n=0;n<a;n++){let a=r[n];const s=p,i=p;let c=!1;const u=p;if(p==p)if("string"==typeof a){if(a.length<1){const r={params:{}};null===l?l=[r]:l.push(r),p++}}else{const r={params:{type:"string"}};null===l?l=[r]:l.push(r),p++}var f=u===p;if(c=c||f,!c){const s=p;e(a,{instancePath:t+"/"+n,parentData:r,parentDataProperty:n,rootData:o})||(l=null===l?e.errors:l.concat(e.errors),p=l.length),f=s===p,c=c||f}if(c)p=i,null!==l&&(i?l.length=i:l=null);else{const r={params:{}};null===l?l=[r]:l.push(r),p++}if(s!==p)break}}else{const r={params:{type:"array"}};null===l?l=[r]:l.push(r),p++}var m=u===p;if(c=c||m,!c){const a=p;e(r,{instancePath:t,parentData:n,parentDataProperty:s,rootData:o})||(l=null===l?e.errors:l.concat(e.errors),p=l.length),m=a===p,c=c||m}if(!c){const r={params:{}};return null===l?l=[r]:l.push(r),p++,a.errors=l,!1}return p=i,null!==l&&(i?l.length=i:l=null),a.errors=l,0===p}function n(r,{instancePath:t="",parentData:e,parentDataProperty:s,rootData:o=r}={}){let l=null,p=0;if(0===p){if(!r||"object"!=typeof r||Array.isArray(r))return n.errors=[{params:{type:"object"}}],!1;{let e;if(void 0===r.remoteType&&(e="remoteType")||void 0===r.remotes&&(e="remotes"))return n.errors=[{params:{missingProperty:e}}],!1;{const e=p;for(const t in r)if("remoteType"!==t&&"remotes"!==t&&"shareScope"!==t)return n.errors=[{params:{additionalProperty:t}}],!1;if(e===p){if(void 0!==r.remoteType){let t=r.remoteType;const e=p,a=p;let s=!1,o=null;const c=p;if("var"!==t&&"module"!==t&&"assign"!==t&&"this"!==t&&"window"!==t&&"self"!==t&&"global"!==t&&"commonjs"!==t&&"commonjs2"!==t&&"commonjs-module"!==t&&"commonjs-static"!==t&&"amd"!==t&&"amd-require"!==t&&"umd"!==t&&"umd2"!==t&&"jsonp"!==t&&"system"!==t&&"promise"!==t&&"import"!==t&&"module-import"!==t&&"script"!==t&&"node-commonjs"!==t&&"asset"!==t&&"asset-url"!==t&&"css-import"!==t&&"css-url"!==t){const r={params:{}};null===l?l=[r]:l.push(r),p++}if(c===p&&(s=!0,o=0),!s){const r={params:{passingSchemas:o}};return null===l?l=[r]:l.push(r),p++,n.errors=l,!1}p=a,null!==l&&(a?l.length=a:l=null);var i=e===p}else i=!0;if(i){if(void 0!==r.remotes){const e=p;a(r.remotes,{instancePath:t+"/remotes",parentData:r,parentDataProperty:"remotes",rootData:o})||(l=null===l?a.errors:l.concat(a.errors),p=l.length),i=e===p}else i=!0;if(i)if(void 0!==r.shareScope){let t=r.shareScope;const e=p;if(p===e){if("string"!=typeof t)return n.errors=[{params:{type:"string"}}],!1;if(t.length<1)return n.errors=[{params:{}}],!1}i=e===p}else i=!0}}}}}return n.errors=l,0===p}module.exports=n,module.exports.default=n;

@@ -29,2 +29,3 @@ {

"asset",
"asset-url",
"css-import",

@@ -31,0 +32,0 @@ "css-url"

@@ -6,2 +6,2 @@ /*

*/
"use strict";function o(s,{instancePath:r="",parentData:m,parentDataProperty:t,rootData:e=s}={}){return"var"!==s&&"module"!==s&&"assign"!==s&&"this"!==s&&"window"!==s&&"self"!==s&&"global"!==s&&"commonjs"!==s&&"commonjs2"!==s&&"commonjs-module"!==s&&"commonjs-static"!==s&&"amd"!==s&&"amd-require"!==s&&"umd"!==s&&"umd2"!==s&&"jsonp"!==s&&"system"!==s&&"promise"!==s&&"import"!==s&&"module-import"!==s&&"script"!==s&&"node-commonjs"!==s&&"asset"!==s&&"css-import"!==s&&"css-url"!==s?(o.errors=[{params:{}}],!1):(o.errors=null,!0)}module.exports=o,module.exports.default=o;
"use strict";function o(s,{instancePath:r="",parentData:t,parentDataProperty:m,rootData:e=s}={}){return"var"!==s&&"module"!==s&&"assign"!==s&&"this"!==s&&"window"!==s&&"self"!==s&&"global"!==s&&"commonjs"!==s&&"commonjs2"!==s&&"commonjs-module"!==s&&"commonjs-static"!==s&&"amd"!==s&&"amd-require"!==s&&"umd"!==s&&"umd2"!==s&&"jsonp"!==s&&"system"!==s&&"promise"!==s&&"import"!==s&&"module-import"!==s&&"script"!==s&&"node-commonjs"!==s&&"asset"!==s&&"asset-url"!==s&&"css-import"!==s&&"css-url"!==s?(o.errors=[{params:{}}],!1):(o.errors=null,!0)}module.exports=o,module.exports.default=o;

@@ -6,2 +6,2 @@ /*

*/
const t=/^(?:[A-Za-z]:[\\/]|\\\\|\/)/;module.exports=D,module.exports.default=D;const e={definitions:{AmdContainer:{type:"string",minLength:1},AuxiliaryComment:{anyOf:[{type:"string"},{$ref:"#/definitions/LibraryCustomUmdCommentObject"}]},EntryRuntime:{anyOf:[{enum:[!1]},{type:"string",minLength:1}]},Exposes:{anyOf:[{type:"array",items:{anyOf:[{$ref:"#/definitions/ExposesItem"},{$ref:"#/definitions/ExposesObject"}]}},{$ref:"#/definitions/ExposesObject"}]},ExposesConfig:{type:"object",additionalProperties:!1,properties:{import:{anyOf:[{$ref:"#/definitions/ExposesItem"},{$ref:"#/definitions/ExposesItems"}]},name:{type:"string"}},required:["import"]},ExposesItem:{type:"string",minLength:1},ExposesItems:{type:"array",items:{$ref:"#/definitions/ExposesItem"}},ExposesObject:{type:"object",additionalProperties:{anyOf:[{$ref:"#/definitions/ExposesConfig"},{$ref:"#/definitions/ExposesItem"},{$ref:"#/definitions/ExposesItems"}]}},ExternalsType:{enum:["var","module","assign","this","window","self","global","commonjs","commonjs2","commonjs-module","commonjs-static","amd","amd-require","umd","umd2","jsonp","system","promise","import","module-import","script","node-commonjs","asset","css-import","css-url"]},LibraryCustomUmdCommentObject:{type:"object",additionalProperties:!1,properties:{amd:{type:"string"},commonjs:{type:"string"},commonjs2:{type:"string"},root:{type:"string"}}},LibraryCustomUmdObject:{type:"object",additionalProperties:!1,properties:{amd:{type:"string",minLength:1},commonjs:{type:"string",minLength:1},root:{anyOf:[{type:"array",items:{type:"string",minLength:1}},{type:"string",minLength:1}]}}},LibraryExport:{anyOf:[{type:"array",items:{type:"string",minLength:1}},{type:"string",minLength:1}]},LibraryName:{anyOf:[{type:"array",items:{type:"string",minLength:1},minItems:1},{type:"string",minLength:1},{$ref:"#/definitions/LibraryCustomUmdObject"}]},LibraryOptions:{type:"object",additionalProperties:!1,properties:{amdContainer:{$ref:"#/definitions/AmdContainer"},auxiliaryComment:{$ref:"#/definitions/AuxiliaryComment"},export:{$ref:"#/definitions/LibraryExport"},name:{$ref:"#/definitions/LibraryName"},type:{$ref:"#/definitions/LibraryType"},umdNamedDefine:{$ref:"#/definitions/UmdNamedDefine"}},required:["type"]},LibraryType:{anyOf:[{enum:["var","module","assign","assign-properties","this","window","self","global","commonjs","commonjs2","commonjs-module","commonjs-static","amd","amd-require","umd","umd2","jsonp","system"]},{type:"string"}]},Remotes:{anyOf:[{type:"array",items:{anyOf:[{$ref:"#/definitions/RemotesItem"},{$ref:"#/definitions/RemotesObject"}]}},{$ref:"#/definitions/RemotesObject"}]},RemotesConfig:{type:"object",additionalProperties:!1,properties:{external:{anyOf:[{$ref:"#/definitions/RemotesItem"},{$ref:"#/definitions/RemotesItems"}]},shareScope:{type:"string",minLength:1}},required:["external"]},RemotesItem:{type:"string",minLength:1},RemotesItems:{type:"array",items:{$ref:"#/definitions/RemotesItem"}},RemotesObject:{type:"object",additionalProperties:{anyOf:[{$ref:"#/definitions/RemotesConfig"},{$ref:"#/definitions/RemotesItem"},{$ref:"#/definitions/RemotesItems"}]}},Shared:{anyOf:[{type:"array",items:{anyOf:[{$ref:"#/definitions/SharedItem"},{$ref:"#/definitions/SharedObject"}]}},{$ref:"#/definitions/SharedObject"}]},SharedConfig:{type:"object",additionalProperties:!1,properties:{eager:{type:"boolean"},import:{anyOf:[{enum:[!1]},{$ref:"#/definitions/SharedItem"}]},packageName:{type:"string",minLength:1},requiredVersion:{anyOf:[{enum:[!1]},{type:"string"}]},shareKey:{type:"string",minLength:1},shareScope:{type:"string",minLength:1},singleton:{type:"boolean"},strictVersion:{type:"boolean"},version:{anyOf:[{enum:[!1]},{type:"string"}]}}},SharedItem:{type:"string",minLength:1},SharedObject:{type:"object",additionalProperties:{anyOf:[{$ref:"#/definitions/SharedConfig"},{$ref:"#/definitions/SharedItem"}]}},UmdNamedDefine:{type:"boolean"}},type:"object",additionalProperties:!1,properties:{exposes:{$ref:"#/definitions/Exposes"},filename:{type:"string",absolutePath:!1},library:{$ref:"#/definitions/LibraryOptions"},name:{type:"string"},remoteType:{oneOf:[{$ref:"#/definitions/ExternalsType"}]},remotes:{$ref:"#/definitions/Remotes"},runtime:{$ref:"#/definitions/EntryRuntime"},shareScope:{type:"string",minLength:1},shared:{$ref:"#/definitions/Shared"}}},r=Object.prototype.hasOwnProperty;function n(t,{instancePath:e="",parentData:r,parentDataProperty:s,rootData:a=t}={}){if(!Array.isArray(t))return n.errors=[{params:{type:"array"}}],!1;{const e=t.length;for(let r=0;r<e;r++){let e=t[r];const s=0;if("string"!=typeof e)return n.errors=[{params:{type:"string"}}],!1;if(e.length<1)return n.errors=[{params:{}}],!1;if(0!==s)break}}return n.errors=null,!0}function s(t,{instancePath:e="",parentData:r,parentDataProperty:a,rootData:o=t}={}){let i=null,l=0;if(0===l){if(!t||"object"!=typeof t||Array.isArray(t))return s.errors=[{params:{type:"object"}}],!1;{let r;if(void 0===t.import&&(r="import"))return s.errors=[{params:{missingProperty:r}}],!1;{const r=l;for(const e in t)if("import"!==e&&"name"!==e)return s.errors=[{params:{additionalProperty:e}}],!1;if(r===l){if(void 0!==t.import){let r=t.import;const a=l,c=l;let m=!1;const u=l;if(l==l)if("string"==typeof r){if(r.length<1){const t={params:{}};null===i?i=[t]:i.push(t),l++}}else{const t={params:{type:"string"}};null===i?i=[t]:i.push(t),l++}var p=u===l;if(m=m||p,!m){const s=l;n(r,{instancePath:e+"/import",parentData:t,parentDataProperty:"import",rootData:o})||(i=null===i?n.errors:i.concat(n.errors),l=i.length),p=s===l,m=m||p}if(!m){const t={params:{}};return null===i?i=[t]:i.push(t),l++,s.errors=i,!1}l=c,null!==i&&(c?i.length=c:i=null);var f=a===l}else f=!0;if(f)if(void 0!==t.name){const e=l;if("string"!=typeof t.name)return s.errors=[{params:{type:"string"}}],!1;f=e===l}else f=!0}}}}return s.errors=i,0===l}function a(t,{instancePath:e="",parentData:r,parentDataProperty:o,rootData:i=t}={}){let l=null,p=0;if(0===p){if(!t||"object"!=typeof t||Array.isArray(t))return a.errors=[{params:{type:"object"}}],!1;for(const r in t){let o=t[r];const c=p,m=p;let u=!1;const y=p;s(o,{instancePath:e+"/"+r.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:r,rootData:i})||(l=null===l?s.errors:l.concat(s.errors),p=l.length);var f=y===p;if(u=u||f,!u){const s=p;if(p==p)if("string"==typeof o){if(o.length<1){const t={params:{}};null===l?l=[t]:l.push(t),p++}}else{const t={params:{type:"string"}};null===l?l=[t]:l.push(t),p++}if(f=s===p,u=u||f,!u){const s=p;n(o,{instancePath:e+"/"+r.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:r,rootData:i})||(l=null===l?n.errors:l.concat(n.errors),p=l.length),f=s===p,u=u||f}}if(!u){const t={params:{}};return null===l?l=[t]:l.push(t),p++,a.errors=l,!1}if(p=m,null!==l&&(m?l.length=m:l=null),c!==p)break}}return a.errors=l,0===p}function o(t,{instancePath:e="",parentData:r,parentDataProperty:n,rootData:s=t}={}){let i=null,l=0;const p=l;let f=!1;const c=l;if(l===c)if(Array.isArray(t)){const r=t.length;for(let n=0;n<r;n++){let r=t[n];const o=l,p=l;let f=!1;const c=l;if(l==l)if("string"==typeof r){if(r.length<1){const t={params:{}};null===i?i=[t]:i.push(t),l++}}else{const t={params:{type:"string"}};null===i?i=[t]:i.push(t),l++}var m=c===l;if(f=f||m,!f){const o=l;a(r,{instancePath:e+"/"+n,parentData:t,parentDataProperty:n,rootData:s})||(i=null===i?a.errors:i.concat(a.errors),l=i.length),m=o===l,f=f||m}if(f)l=p,null!==i&&(p?i.length=p:i=null);else{const t={params:{}};null===i?i=[t]:i.push(t),l++}if(o!==l)break}}else{const t={params:{type:"array"}};null===i?i=[t]:i.push(t),l++}var u=c===l;if(f=f||u,!f){const o=l;a(t,{instancePath:e,parentData:r,parentDataProperty:n,rootData:s})||(i=null===i?a.errors:i.concat(a.errors),l=i.length),u=o===l,f=f||u}if(!f){const t={params:{}};return null===i?i=[t]:i.push(t),l++,o.errors=i,!1}return l=p,null!==i&&(p?i.length=p:i=null),o.errors=i,0===l}function i(t,{instancePath:e="",parentData:r,parentDataProperty:n,rootData:s=t}={}){let a=null,o=0;const l=o;let p=!1;const f=o;if("string"!=typeof t){const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}var c=f===o;if(p=p||c,!p){const e=o;if(o==o)if(t&&"object"==typeof t&&!Array.isArray(t)){const e=o;for(const e in t)if("amd"!==e&&"commonjs"!==e&&"commonjs2"!==e&&"root"!==e){const t={params:{additionalProperty:e}};null===a?a=[t]:a.push(t),o++;break}if(e===o){if(void 0!==t.amd){const e=o;if("string"!=typeof t.amd){const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}var m=e===o}else m=!0;if(m){if(void 0!==t.commonjs){const e=o;if("string"!=typeof t.commonjs){const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}m=e===o}else m=!0;if(m){if(void 0!==t.commonjs2){const e=o;if("string"!=typeof t.commonjs2){const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}m=e===o}else m=!0;if(m)if(void 0!==t.root){const e=o;if("string"!=typeof t.root){const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}m=e===o}else m=!0}}}}else{const t={params:{type:"object"}};null===a?a=[t]:a.push(t),o++}c=e===o,p=p||c}if(!p){const t={params:{}};return null===a?a=[t]:a.push(t),o++,i.errors=a,!1}return o=l,null!==a&&(l?a.length=l:a=null),i.errors=a,0===o}function l(t,{instancePath:e="",parentData:r,parentDataProperty:n,rootData:s=t}={}){let a=null,o=0;const i=o;let p=!1;const f=o;if(o===f)if(Array.isArray(t))if(t.length<1){const t={params:{limit:1}};null===a?a=[t]:a.push(t),o++}else{const e=t.length;for(let r=0;r<e;r++){let e=t[r];const n=o;if(o===n)if("string"==typeof e){if(e.length<1){const t={params:{}};null===a?a=[t]:a.push(t),o++}}else{const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}if(n!==o)break}}else{const t={params:{type:"array"}};null===a?a=[t]:a.push(t),o++}var c=f===o;if(p=p||c,!p){const e=o;if(o===e)if("string"==typeof t){if(t.length<1){const t={params:{}};null===a?a=[t]:a.push(t),o++}}else{const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}if(c=e===o,p=p||c,!p){const e=o;if(o==o)if(t&&"object"==typeof t&&!Array.isArray(t)){const e=o;for(const e in t)if("amd"!==e&&"commonjs"!==e&&"root"!==e){const t={params:{additionalProperty:e}};null===a?a=[t]:a.push(t),o++;break}if(e===o){if(void 0!==t.amd){let e=t.amd;const r=o;if(o===r)if("string"==typeof e){if(e.length<1){const t={params:{}};null===a?a=[t]:a.push(t),o++}}else{const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}var m=r===o}else m=!0;if(m){if(void 0!==t.commonjs){let e=t.commonjs;const r=o;if(o===r)if("string"==typeof e){if(e.length<1){const t={params:{}};null===a?a=[t]:a.push(t),o++}}else{const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}m=r===o}else m=!0;if(m)if(void 0!==t.root){let e=t.root;const r=o,n=o;let s=!1;const i=o;if(o===i)if(Array.isArray(e)){const t=e.length;for(let r=0;r<t;r++){let t=e[r];const n=o;if(o===n)if("string"==typeof t){if(t.length<1){const t={params:{}};null===a?a=[t]:a.push(t),o++}}else{const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}if(n!==o)break}}else{const t={params:{type:"array"}};null===a?a=[t]:a.push(t),o++}var u=i===o;if(s=s||u,!s){const t=o;if(o===t)if("string"==typeof e){if(e.length<1){const t={params:{}};null===a?a=[t]:a.push(t),o++}}else{const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}u=t===o,s=s||u}if(s)o=n,null!==a&&(n?a.length=n:a=null);else{const t={params:{}};null===a?a=[t]:a.push(t),o++}m=r===o}else m=!0}}}else{const t={params:{type:"object"}};null===a?a=[t]:a.push(t),o++}c=e===o,p=p||c}}if(!p){const t={params:{}};return null===a?a=[t]:a.push(t),o++,l.errors=a,!1}return o=i,null!==a&&(i?a.length=i:a=null),l.errors=a,0===o}function p(t,{instancePath:e="",parentData:r,parentDataProperty:n,rootData:s=t}={}){let a=null,o=0;if(0===o){if(!t||"object"!=typeof t||Array.isArray(t))return p.errors=[{params:{type:"object"}}],!1;{let r;if(void 0===t.type&&(r="type"))return p.errors=[{params:{missingProperty:r}}],!1;{const r=o;for(const e in t)if("amdContainer"!==e&&"auxiliaryComment"!==e&&"export"!==e&&"name"!==e&&"type"!==e&&"umdNamedDefine"!==e)return p.errors=[{params:{additionalProperty:e}}],!1;if(r===o){if(void 0!==t.amdContainer){let e=t.amdContainer;const r=o;if(o==o){if("string"!=typeof e)return p.errors=[{params:{type:"string"}}],!1;if(e.length<1)return p.errors=[{params:{}}],!1}var f=r===o}else f=!0;if(f){if(void 0!==t.auxiliaryComment){const r=o;i(t.auxiliaryComment,{instancePath:e+"/auxiliaryComment",parentData:t,parentDataProperty:"auxiliaryComment",rootData:s})||(a=null===a?i.errors:a.concat(i.errors),o=a.length),f=r===o}else f=!0;if(f){if(void 0!==t.export){let e=t.export;const r=o,n=o;let s=!1;const i=o;if(o===i)if(Array.isArray(e)){const t=e.length;for(let r=0;r<t;r++){let t=e[r];const n=o;if(o===n)if("string"==typeof t){if(t.length<1){const t={params:{}};null===a?a=[t]:a.push(t),o++}}else{const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}if(n!==o)break}}else{const t={params:{type:"array"}};null===a?a=[t]:a.push(t),o++}var c=i===o;if(s=s||c,!s){const t=o;if(o===t)if("string"==typeof e){if(e.length<1){const t={params:{}};null===a?a=[t]:a.push(t),o++}}else{const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}c=t===o,s=s||c}if(!s){const t={params:{}};return null===a?a=[t]:a.push(t),o++,p.errors=a,!1}o=n,null!==a&&(n?a.length=n:a=null),f=r===o}else f=!0;if(f){if(void 0!==t.name){const r=o;l(t.name,{instancePath:e+"/name",parentData:t,parentDataProperty:"name",rootData:s})||(a=null===a?l.errors:a.concat(l.errors),o=a.length),f=r===o}else f=!0;if(f){if(void 0!==t.type){let e=t.type;const r=o,n=o;let s=!1;const i=o;if("var"!==e&&"module"!==e&&"assign"!==e&&"assign-properties"!==e&&"this"!==e&&"window"!==e&&"self"!==e&&"global"!==e&&"commonjs"!==e&&"commonjs2"!==e&&"commonjs-module"!==e&&"commonjs-static"!==e&&"amd"!==e&&"amd-require"!==e&&"umd"!==e&&"umd2"!==e&&"jsonp"!==e&&"system"!==e){const t={params:{}};null===a?a=[t]:a.push(t),o++}var m=i===o;if(s=s||m,!s){const t=o;if("string"!=typeof e){const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}m=t===o,s=s||m}if(!s){const t={params:{}};return null===a?a=[t]:a.push(t),o++,p.errors=a,!1}o=n,null!==a&&(n?a.length=n:a=null),f=r===o}else f=!0;if(f)if(void 0!==t.umdNamedDefine){const e=o;if("boolean"!=typeof t.umdNamedDefine)return p.errors=[{params:{type:"boolean"}}],!1;f=e===o}else f=!0}}}}}}}}return p.errors=a,0===o}function f(t,{instancePath:e="",parentData:r,parentDataProperty:n,rootData:s=t}={}){if(!Array.isArray(t))return f.errors=[{params:{type:"array"}}],!1;{const e=t.length;for(let r=0;r<e;r++){let e=t[r];const n=0;if("string"!=typeof e)return f.errors=[{params:{type:"string"}}],!1;if(e.length<1)return f.errors=[{params:{}}],!1;if(0!==n)break}}return f.errors=null,!0}function c(t,{instancePath:e="",parentData:r,parentDataProperty:n,rootData:s=t}={}){let a=null,o=0;if(0===o){if(!t||"object"!=typeof t||Array.isArray(t))return c.errors=[{params:{type:"object"}}],!1;{let r;if(void 0===t.external&&(r="external"))return c.errors=[{params:{missingProperty:r}}],!1;{const r=o;for(const e in t)if("external"!==e&&"shareScope"!==e)return c.errors=[{params:{additionalProperty:e}}],!1;if(r===o){if(void 0!==t.external){let r=t.external;const n=o,p=o;let m=!1;const u=o;if(o==o)if("string"==typeof r){if(r.length<1){const t={params:{}};null===a?a=[t]:a.push(t),o++}}else{const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}var i=u===o;if(m=m||i,!m){const n=o;f(r,{instancePath:e+"/external",parentData:t,parentDataProperty:"external",rootData:s})||(a=null===a?f.errors:a.concat(f.errors),o=a.length),i=n===o,m=m||i}if(!m){const t={params:{}};return null===a?a=[t]:a.push(t),o++,c.errors=a,!1}o=p,null!==a&&(p?a.length=p:a=null);var l=n===o}else l=!0;if(l)if(void 0!==t.shareScope){let e=t.shareScope;const r=o;if(o===r){if("string"!=typeof e)return c.errors=[{params:{type:"string"}}],!1;if(e.length<1)return c.errors=[{params:{}}],!1}l=r===o}else l=!0}}}}return c.errors=a,0===o}function m(t,{instancePath:e="",parentData:r,parentDataProperty:n,rootData:s=t}={}){let a=null,o=0;if(0===o){if(!t||"object"!=typeof t||Array.isArray(t))return m.errors=[{params:{type:"object"}}],!1;for(const r in t){let n=t[r];const l=o,p=o;let u=!1;const y=o;c(n,{instancePath:e+"/"+r.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:r,rootData:s})||(a=null===a?c.errors:a.concat(c.errors),o=a.length);var i=y===o;if(u=u||i,!u){const l=o;if(o==o)if("string"==typeof n){if(n.length<1){const t={params:{}};null===a?a=[t]:a.push(t),o++}}else{const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}if(i=l===o,u=u||i,!u){const l=o;f(n,{instancePath:e+"/"+r.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:r,rootData:s})||(a=null===a?f.errors:a.concat(f.errors),o=a.length),i=l===o,u=u||i}}if(!u){const t={params:{}};return null===a?a=[t]:a.push(t),o++,m.errors=a,!1}if(o=p,null!==a&&(p?a.length=p:a=null),l!==o)break}}return m.errors=a,0===o}function u(t,{instancePath:e="",parentData:r,parentDataProperty:n,rootData:s=t}={}){let a=null,o=0;const i=o;let l=!1;const p=o;if(o===p)if(Array.isArray(t)){const r=t.length;for(let n=0;n<r;n++){let r=t[n];const i=o,l=o;let p=!1;const c=o;if(o==o)if("string"==typeof r){if(r.length<1){const t={params:{}};null===a?a=[t]:a.push(t),o++}}else{const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}var f=c===o;if(p=p||f,!p){const i=o;m(r,{instancePath:e+"/"+n,parentData:t,parentDataProperty:n,rootData:s})||(a=null===a?m.errors:a.concat(m.errors),o=a.length),f=i===o,p=p||f}if(p)o=l,null!==a&&(l?a.length=l:a=null);else{const t={params:{}};null===a?a=[t]:a.push(t),o++}if(i!==o)break}}else{const t={params:{type:"array"}};null===a?a=[t]:a.push(t),o++}var c=p===o;if(l=l||c,!l){const i=o;m(t,{instancePath:e,parentData:r,parentDataProperty:n,rootData:s})||(a=null===a?m.errors:a.concat(m.errors),o=a.length),c=i===o,l=l||c}if(!l){const t={params:{}};return null===a?a=[t]:a.push(t),o++,u.errors=a,!1}return o=i,null!==a&&(i?a.length=i:a=null),u.errors=a,0===o}const y={type:"object",additionalProperties:!1,properties:{eager:{type:"boolean"},import:{anyOf:[{enum:[!1]},{$ref:"#/definitions/SharedItem"}]},packageName:{type:"string",minLength:1},requiredVersion:{anyOf:[{enum:[!1]},{type:"string"}]},shareKey:{type:"string",minLength:1},shareScope:{type:"string",minLength:1},singleton:{type:"boolean"},strictVersion:{type:"boolean"},version:{anyOf:[{enum:[!1]},{type:"string"}]}}};function h(t,{instancePath:e="",parentData:n,parentDataProperty:s,rootData:a=t}={}){let o=null,i=0;if(0===i){if(!t||"object"!=typeof t||Array.isArray(t))return h.errors=[{params:{type:"object"}}],!1;{const e=i;for(const e in t)if(!r.call(y.properties,e))return h.errors=[{params:{additionalProperty:e}}],!1;if(e===i){if(void 0!==t.eager){const e=i;if("boolean"!=typeof t.eager)return h.errors=[{params:{type:"boolean"}}],!1;var l=e===i}else l=!0;if(l){if(void 0!==t.import){let e=t.import;const r=i,n=i;let s=!1;const a=i;if(!1!==e){const t={params:{}};null===o?o=[t]:o.push(t),i++}var p=a===i;if(s=s||p,!s){const t=i;if(i==i)if("string"==typeof e){if(e.length<1){const t={params:{}};null===o?o=[t]:o.push(t),i++}}else{const t={params:{type:"string"}};null===o?o=[t]:o.push(t),i++}p=t===i,s=s||p}if(!s){const t={params:{}};return null===o?o=[t]:o.push(t),i++,h.errors=o,!1}i=n,null!==o&&(n?o.length=n:o=null),l=r===i}else l=!0;if(l){if(void 0!==t.packageName){let e=t.packageName;const r=i;if(i===r){if("string"!=typeof e)return h.errors=[{params:{type:"string"}}],!1;if(e.length<1)return h.errors=[{params:{}}],!1}l=r===i}else l=!0;if(l){if(void 0!==t.requiredVersion){let e=t.requiredVersion;const r=i,n=i;let s=!1;const a=i;if(!1!==e){const t={params:{}};null===o?o=[t]:o.push(t),i++}var f=a===i;if(s=s||f,!s){const t=i;if("string"!=typeof e){const t={params:{type:"string"}};null===o?o=[t]:o.push(t),i++}f=t===i,s=s||f}if(!s){const t={params:{}};return null===o?o=[t]:o.push(t),i++,h.errors=o,!1}i=n,null!==o&&(n?o.length=n:o=null),l=r===i}else l=!0;if(l){if(void 0!==t.shareKey){let e=t.shareKey;const r=i;if(i===r){if("string"!=typeof e)return h.errors=[{params:{type:"string"}}],!1;if(e.length<1)return h.errors=[{params:{}}],!1}l=r===i}else l=!0;if(l){if(void 0!==t.shareScope){let e=t.shareScope;const r=i;if(i===r){if("string"!=typeof e)return h.errors=[{params:{type:"string"}}],!1;if(e.length<1)return h.errors=[{params:{}}],!1}l=r===i}else l=!0;if(l){if(void 0!==t.singleton){const e=i;if("boolean"!=typeof t.singleton)return h.errors=[{params:{type:"boolean"}}],!1;l=e===i}else l=!0;if(l){if(void 0!==t.strictVersion){const e=i;if("boolean"!=typeof t.strictVersion)return h.errors=[{params:{type:"boolean"}}],!1;l=e===i}else l=!0;if(l)if(void 0!==t.version){let e=t.version;const r=i,n=i;let s=!1;const a=i;if(!1!==e){const t={params:{}};null===o?o=[t]:o.push(t),i++}var c=a===i;if(s=s||c,!s){const t=i;if("string"!=typeof e){const t={params:{type:"string"}};null===o?o=[t]:o.push(t),i++}c=t===i,s=s||c}if(!s){const t={params:{}};return null===o?o=[t]:o.push(t),i++,h.errors=o,!1}i=n,null!==o&&(n?o.length=n:o=null),l=r===i}else l=!0}}}}}}}}}}return h.errors=o,0===i}function g(t,{instancePath:e="",parentData:r,parentDataProperty:n,rootData:s=t}={}){let a=null,o=0;if(0===o){if(!t||"object"!=typeof t||Array.isArray(t))return g.errors=[{params:{type:"object"}}],!1;for(const r in t){let n=t[r];const l=o,p=o;let f=!1;const c=o;h(n,{instancePath:e+"/"+r.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:r,rootData:s})||(a=null===a?h.errors:a.concat(h.errors),o=a.length);var i=c===o;if(f=f||i,!f){const t=o;if(o==o)if("string"==typeof n){if(n.length<1){const t={params:{}};null===a?a=[t]:a.push(t),o++}}else{const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}i=t===o,f=f||i}if(!f){const t={params:{}};return null===a?a=[t]:a.push(t),o++,g.errors=a,!1}if(o=p,null!==a&&(p?a.length=p:a=null),l!==o)break}}return g.errors=a,0===o}function d(t,{instancePath:e="",parentData:r,parentDataProperty:n,rootData:s=t}={}){let a=null,o=0;const i=o;let l=!1;const p=o;if(o===p)if(Array.isArray(t)){const r=t.length;for(let n=0;n<r;n++){let r=t[n];const i=o,l=o;let p=!1;const c=o;if(o==o)if("string"==typeof r){if(r.length<1){const t={params:{}};null===a?a=[t]:a.push(t),o++}}else{const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}var f=c===o;if(p=p||f,!p){const i=o;g(r,{instancePath:e+"/"+n,parentData:t,parentDataProperty:n,rootData:s})||(a=null===a?g.errors:a.concat(g.errors),o=a.length),f=i===o,p=p||f}if(p)o=l,null!==a&&(l?a.length=l:a=null);else{const t={params:{}};null===a?a=[t]:a.push(t),o++}if(i!==o)break}}else{const t={params:{type:"array"}};null===a?a=[t]:a.push(t),o++}var c=p===o;if(l=l||c,!l){const i=o;g(t,{instancePath:e,parentData:r,parentDataProperty:n,rootData:s})||(a=null===a?g.errors:a.concat(g.errors),o=a.length),c=i===o,l=l||c}if(!l){const t={params:{}};return null===a?a=[t]:a.push(t),o++,d.errors=a,!1}return o=i,null!==a&&(i?a.length=i:a=null),d.errors=a,0===o}function D(n,{instancePath:s="",parentData:a,parentDataProperty:i,rootData:l=n}={}){let f=null,c=0;if(0===c){if(!n||"object"!=typeof n||Array.isArray(n))return D.errors=[{params:{type:"object"}}],!1;{const a=c;for(const t in n)if(!r.call(e.properties,t))return D.errors=[{params:{additionalProperty:t}}],!1;if(a===c){if(void 0!==n.exposes){const t=c;o(n.exposes,{instancePath:s+"/exposes",parentData:n,parentDataProperty:"exposes",rootData:l})||(f=null===f?o.errors:f.concat(o.errors),c=f.length);var m=t===c}else m=!0;if(m){if(void 0!==n.filename){let e=n.filename;const r=c;if(c===r){if("string"!=typeof e)return D.errors=[{params:{type:"string"}}],!1;if(e.includes("!")||!1!==t.test(e))return D.errors=[{params:{}}],!1}m=r===c}else m=!0;if(m){if(void 0!==n.library){const t=c;p(n.library,{instancePath:s+"/library",parentData:n,parentDataProperty:"library",rootData:l})||(f=null===f?p.errors:f.concat(p.errors),c=f.length),m=t===c}else m=!0;if(m){if(void 0!==n.name){const t=c;if("string"!=typeof n.name)return D.errors=[{params:{type:"string"}}],!1;m=t===c}else m=!0;if(m){if(void 0!==n.remoteType){let t=n.remoteType;const e=c,r=c;let s=!1,a=null;const o=c;if("var"!==t&&"module"!==t&&"assign"!==t&&"this"!==t&&"window"!==t&&"self"!==t&&"global"!==t&&"commonjs"!==t&&"commonjs2"!==t&&"commonjs-module"!==t&&"commonjs-static"!==t&&"amd"!==t&&"amd-require"!==t&&"umd"!==t&&"umd2"!==t&&"jsonp"!==t&&"system"!==t&&"promise"!==t&&"import"!==t&&"module-import"!==t&&"script"!==t&&"node-commonjs"!==t&&"asset"!==t&&"css-import"!==t&&"css-url"!==t){const t={params:{}};null===f?f=[t]:f.push(t),c++}if(o===c&&(s=!0,a=0),!s){const t={params:{passingSchemas:a}};return null===f?f=[t]:f.push(t),c++,D.errors=f,!1}c=r,null!==f&&(r?f.length=r:f=null),m=e===c}else m=!0;if(m){if(void 0!==n.remotes){const t=c;u(n.remotes,{instancePath:s+"/remotes",parentData:n,parentDataProperty:"remotes",rootData:l})||(f=null===f?u.errors:f.concat(u.errors),c=f.length),m=t===c}else m=!0;if(m){if(void 0!==n.runtime){let t=n.runtime;const e=c,r=c;let s=!1;const a=c;if(!1!==t){const t={params:{}};null===f?f=[t]:f.push(t),c++}var y=a===c;if(s=s||y,!s){const e=c;if(c===e)if("string"==typeof t){if(t.length<1){const t={params:{}};null===f?f=[t]:f.push(t),c++}}else{const t={params:{type:"string"}};null===f?f=[t]:f.push(t),c++}y=e===c,s=s||y}if(!s){const t={params:{}};return null===f?f=[t]:f.push(t),c++,D.errors=f,!1}c=r,null!==f&&(r?f.length=r:f=null),m=e===c}else m=!0;if(m){if(void 0!==n.shareScope){let t=n.shareScope;const e=c;if(c===e){if("string"!=typeof t)return D.errors=[{params:{type:"string"}}],!1;if(t.length<1)return D.errors=[{params:{}}],!1}m=e===c}else m=!0;if(m)if(void 0!==n.shared){const t=c;d(n.shared,{instancePath:s+"/shared",parentData:n,parentDataProperty:"shared",rootData:l})||(f=null===f?d.errors:f.concat(d.errors),c=f.length),m=t===c}else m=!0}}}}}}}}}}return D.errors=f,0===c}
const t=/^(?:[A-Za-z]:[\\/]|\\\\|\/)/;module.exports=D,module.exports.default=D;const e={definitions:{AmdContainer:{type:"string",minLength:1},AuxiliaryComment:{anyOf:[{type:"string"},{$ref:"#/definitions/LibraryCustomUmdCommentObject"}]},EntryRuntime:{anyOf:[{enum:[!1]},{type:"string",minLength:1}]},Exposes:{anyOf:[{type:"array",items:{anyOf:[{$ref:"#/definitions/ExposesItem"},{$ref:"#/definitions/ExposesObject"}]}},{$ref:"#/definitions/ExposesObject"}]},ExposesConfig:{type:"object",additionalProperties:!1,properties:{import:{anyOf:[{$ref:"#/definitions/ExposesItem"},{$ref:"#/definitions/ExposesItems"}]},name:{type:"string"}},required:["import"]},ExposesItem:{type:"string",minLength:1},ExposesItems:{type:"array",items:{$ref:"#/definitions/ExposesItem"}},ExposesObject:{type:"object",additionalProperties:{anyOf:[{$ref:"#/definitions/ExposesConfig"},{$ref:"#/definitions/ExposesItem"},{$ref:"#/definitions/ExposesItems"}]}},ExternalsType:{enum:["var","module","assign","this","window","self","global","commonjs","commonjs2","commonjs-module","commonjs-static","amd","amd-require","umd","umd2","jsonp","system","promise","import","module-import","script","node-commonjs","asset","asset-url","css-import","css-url"]},LibraryCustomUmdCommentObject:{type:"object",additionalProperties:!1,properties:{amd:{type:"string"},commonjs:{type:"string"},commonjs2:{type:"string"},root:{type:"string"}}},LibraryCustomUmdObject:{type:"object",additionalProperties:!1,properties:{amd:{type:"string",minLength:1},commonjs:{type:"string",minLength:1},root:{anyOf:[{type:"array",items:{type:"string",minLength:1}},{type:"string",minLength:1}]}}},LibraryExport:{anyOf:[{type:"array",items:{type:"string",minLength:1}},{type:"string",minLength:1}]},LibraryName:{anyOf:[{type:"array",items:{type:"string",minLength:1},minItems:1},{type:"string",minLength:1},{$ref:"#/definitions/LibraryCustomUmdObject"}]},LibraryOptions:{type:"object",additionalProperties:!1,properties:{amdContainer:{$ref:"#/definitions/AmdContainer"},auxiliaryComment:{$ref:"#/definitions/AuxiliaryComment"},export:{$ref:"#/definitions/LibraryExport"},name:{$ref:"#/definitions/LibraryName"},type:{$ref:"#/definitions/LibraryType"},umdNamedDefine:{$ref:"#/definitions/UmdNamedDefine"}},required:["type"]},LibraryType:{anyOf:[{enum:["var","module","assign","assign-properties","this","window","self","global","commonjs","commonjs2","commonjs-module","commonjs-static","amd","amd-require","umd","umd2","jsonp","system"]},{type:"string"}]},Remotes:{anyOf:[{type:"array",items:{anyOf:[{$ref:"#/definitions/RemotesItem"},{$ref:"#/definitions/RemotesObject"}]}},{$ref:"#/definitions/RemotesObject"}]},RemotesConfig:{type:"object",additionalProperties:!1,properties:{external:{anyOf:[{$ref:"#/definitions/RemotesItem"},{$ref:"#/definitions/RemotesItems"}]},shareScope:{type:"string",minLength:1}},required:["external"]},RemotesItem:{type:"string",minLength:1},RemotesItems:{type:"array",items:{$ref:"#/definitions/RemotesItem"}},RemotesObject:{type:"object",additionalProperties:{anyOf:[{$ref:"#/definitions/RemotesConfig"},{$ref:"#/definitions/RemotesItem"},{$ref:"#/definitions/RemotesItems"}]}},Shared:{anyOf:[{type:"array",items:{anyOf:[{$ref:"#/definitions/SharedItem"},{$ref:"#/definitions/SharedObject"}]}},{$ref:"#/definitions/SharedObject"}]},SharedConfig:{type:"object",additionalProperties:!1,properties:{eager:{type:"boolean"},import:{anyOf:[{enum:[!1]},{$ref:"#/definitions/SharedItem"}]},packageName:{type:"string",minLength:1},requiredVersion:{anyOf:[{enum:[!1]},{type:"string"}]},shareKey:{type:"string",minLength:1},shareScope:{type:"string",minLength:1},singleton:{type:"boolean"},strictVersion:{type:"boolean"},version:{anyOf:[{enum:[!1]},{type:"string"}]}}},SharedItem:{type:"string",minLength:1},SharedObject:{type:"object",additionalProperties:{anyOf:[{$ref:"#/definitions/SharedConfig"},{$ref:"#/definitions/SharedItem"}]}},UmdNamedDefine:{type:"boolean"}},type:"object",additionalProperties:!1,properties:{exposes:{$ref:"#/definitions/Exposes"},filename:{type:"string",absolutePath:!1},library:{$ref:"#/definitions/LibraryOptions"},name:{type:"string"},remoteType:{oneOf:[{$ref:"#/definitions/ExternalsType"}]},remotes:{$ref:"#/definitions/Remotes"},runtime:{$ref:"#/definitions/EntryRuntime"},shareScope:{type:"string",minLength:1},shared:{$ref:"#/definitions/Shared"}}},r=Object.prototype.hasOwnProperty;function n(t,{instancePath:e="",parentData:r,parentDataProperty:s,rootData:a=t}={}){if(!Array.isArray(t))return n.errors=[{params:{type:"array"}}],!1;{const e=t.length;for(let r=0;r<e;r++){let e=t[r];const s=0;if("string"!=typeof e)return n.errors=[{params:{type:"string"}}],!1;if(e.length<1)return n.errors=[{params:{}}],!1;if(0!==s)break}}return n.errors=null,!0}function s(t,{instancePath:e="",parentData:r,parentDataProperty:a,rootData:o=t}={}){let i=null,l=0;if(0===l){if(!t||"object"!=typeof t||Array.isArray(t))return s.errors=[{params:{type:"object"}}],!1;{let r;if(void 0===t.import&&(r="import"))return s.errors=[{params:{missingProperty:r}}],!1;{const r=l;for(const e in t)if("import"!==e&&"name"!==e)return s.errors=[{params:{additionalProperty:e}}],!1;if(r===l){if(void 0!==t.import){let r=t.import;const a=l,c=l;let m=!1;const u=l;if(l==l)if("string"==typeof r){if(r.length<1){const t={params:{}};null===i?i=[t]:i.push(t),l++}}else{const t={params:{type:"string"}};null===i?i=[t]:i.push(t),l++}var p=u===l;if(m=m||p,!m){const s=l;n(r,{instancePath:e+"/import",parentData:t,parentDataProperty:"import",rootData:o})||(i=null===i?n.errors:i.concat(n.errors),l=i.length),p=s===l,m=m||p}if(!m){const t={params:{}};return null===i?i=[t]:i.push(t),l++,s.errors=i,!1}l=c,null!==i&&(c?i.length=c:i=null);var f=a===l}else f=!0;if(f)if(void 0!==t.name){const e=l;if("string"!=typeof t.name)return s.errors=[{params:{type:"string"}}],!1;f=e===l}else f=!0}}}}return s.errors=i,0===l}function a(t,{instancePath:e="",parentData:r,parentDataProperty:o,rootData:i=t}={}){let l=null,p=0;if(0===p){if(!t||"object"!=typeof t||Array.isArray(t))return a.errors=[{params:{type:"object"}}],!1;for(const r in t){let o=t[r];const c=p,m=p;let u=!1;const y=p;s(o,{instancePath:e+"/"+r.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:r,rootData:i})||(l=null===l?s.errors:l.concat(s.errors),p=l.length);var f=y===p;if(u=u||f,!u){const s=p;if(p==p)if("string"==typeof o){if(o.length<1){const t={params:{}};null===l?l=[t]:l.push(t),p++}}else{const t={params:{type:"string"}};null===l?l=[t]:l.push(t),p++}if(f=s===p,u=u||f,!u){const s=p;n(o,{instancePath:e+"/"+r.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:r,rootData:i})||(l=null===l?n.errors:l.concat(n.errors),p=l.length),f=s===p,u=u||f}}if(!u){const t={params:{}};return null===l?l=[t]:l.push(t),p++,a.errors=l,!1}if(p=m,null!==l&&(m?l.length=m:l=null),c!==p)break}}return a.errors=l,0===p}function o(t,{instancePath:e="",parentData:r,parentDataProperty:n,rootData:s=t}={}){let i=null,l=0;const p=l;let f=!1;const c=l;if(l===c)if(Array.isArray(t)){const r=t.length;for(let n=0;n<r;n++){let r=t[n];const o=l,p=l;let f=!1;const c=l;if(l==l)if("string"==typeof r){if(r.length<1){const t={params:{}};null===i?i=[t]:i.push(t),l++}}else{const t={params:{type:"string"}};null===i?i=[t]:i.push(t),l++}var m=c===l;if(f=f||m,!f){const o=l;a(r,{instancePath:e+"/"+n,parentData:t,parentDataProperty:n,rootData:s})||(i=null===i?a.errors:i.concat(a.errors),l=i.length),m=o===l,f=f||m}if(f)l=p,null!==i&&(p?i.length=p:i=null);else{const t={params:{}};null===i?i=[t]:i.push(t),l++}if(o!==l)break}}else{const t={params:{type:"array"}};null===i?i=[t]:i.push(t),l++}var u=c===l;if(f=f||u,!f){const o=l;a(t,{instancePath:e,parentData:r,parentDataProperty:n,rootData:s})||(i=null===i?a.errors:i.concat(a.errors),l=i.length),u=o===l,f=f||u}if(!f){const t={params:{}};return null===i?i=[t]:i.push(t),l++,o.errors=i,!1}return l=p,null!==i&&(p?i.length=p:i=null),o.errors=i,0===l}function i(t,{instancePath:e="",parentData:r,parentDataProperty:n,rootData:s=t}={}){let a=null,o=0;const l=o;let p=!1;const f=o;if("string"!=typeof t){const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}var c=f===o;if(p=p||c,!p){const e=o;if(o==o)if(t&&"object"==typeof t&&!Array.isArray(t)){const e=o;for(const e in t)if("amd"!==e&&"commonjs"!==e&&"commonjs2"!==e&&"root"!==e){const t={params:{additionalProperty:e}};null===a?a=[t]:a.push(t),o++;break}if(e===o){if(void 0!==t.amd){const e=o;if("string"!=typeof t.amd){const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}var m=e===o}else m=!0;if(m){if(void 0!==t.commonjs){const e=o;if("string"!=typeof t.commonjs){const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}m=e===o}else m=!0;if(m){if(void 0!==t.commonjs2){const e=o;if("string"!=typeof t.commonjs2){const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}m=e===o}else m=!0;if(m)if(void 0!==t.root){const e=o;if("string"!=typeof t.root){const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}m=e===o}else m=!0}}}}else{const t={params:{type:"object"}};null===a?a=[t]:a.push(t),o++}c=e===o,p=p||c}if(!p){const t={params:{}};return null===a?a=[t]:a.push(t),o++,i.errors=a,!1}return o=l,null!==a&&(l?a.length=l:a=null),i.errors=a,0===o}function l(t,{instancePath:e="",parentData:r,parentDataProperty:n,rootData:s=t}={}){let a=null,o=0;const i=o;let p=!1;const f=o;if(o===f)if(Array.isArray(t))if(t.length<1){const t={params:{limit:1}};null===a?a=[t]:a.push(t),o++}else{const e=t.length;for(let r=0;r<e;r++){let e=t[r];const n=o;if(o===n)if("string"==typeof e){if(e.length<1){const t={params:{}};null===a?a=[t]:a.push(t),o++}}else{const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}if(n!==o)break}}else{const t={params:{type:"array"}};null===a?a=[t]:a.push(t),o++}var c=f===o;if(p=p||c,!p){const e=o;if(o===e)if("string"==typeof t){if(t.length<1){const t={params:{}};null===a?a=[t]:a.push(t),o++}}else{const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}if(c=e===o,p=p||c,!p){const e=o;if(o==o)if(t&&"object"==typeof t&&!Array.isArray(t)){const e=o;for(const e in t)if("amd"!==e&&"commonjs"!==e&&"root"!==e){const t={params:{additionalProperty:e}};null===a?a=[t]:a.push(t),o++;break}if(e===o){if(void 0!==t.amd){let e=t.amd;const r=o;if(o===r)if("string"==typeof e){if(e.length<1){const t={params:{}};null===a?a=[t]:a.push(t),o++}}else{const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}var m=r===o}else m=!0;if(m){if(void 0!==t.commonjs){let e=t.commonjs;const r=o;if(o===r)if("string"==typeof e){if(e.length<1){const t={params:{}};null===a?a=[t]:a.push(t),o++}}else{const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}m=r===o}else m=!0;if(m)if(void 0!==t.root){let e=t.root;const r=o,n=o;let s=!1;const i=o;if(o===i)if(Array.isArray(e)){const t=e.length;for(let r=0;r<t;r++){let t=e[r];const n=o;if(o===n)if("string"==typeof t){if(t.length<1){const t={params:{}};null===a?a=[t]:a.push(t),o++}}else{const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}if(n!==o)break}}else{const t={params:{type:"array"}};null===a?a=[t]:a.push(t),o++}var u=i===o;if(s=s||u,!s){const t=o;if(o===t)if("string"==typeof e){if(e.length<1){const t={params:{}};null===a?a=[t]:a.push(t),o++}}else{const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}u=t===o,s=s||u}if(s)o=n,null!==a&&(n?a.length=n:a=null);else{const t={params:{}};null===a?a=[t]:a.push(t),o++}m=r===o}else m=!0}}}else{const t={params:{type:"object"}};null===a?a=[t]:a.push(t),o++}c=e===o,p=p||c}}if(!p){const t={params:{}};return null===a?a=[t]:a.push(t),o++,l.errors=a,!1}return o=i,null!==a&&(i?a.length=i:a=null),l.errors=a,0===o}function p(t,{instancePath:e="",parentData:r,parentDataProperty:n,rootData:s=t}={}){let a=null,o=0;if(0===o){if(!t||"object"!=typeof t||Array.isArray(t))return p.errors=[{params:{type:"object"}}],!1;{let r;if(void 0===t.type&&(r="type"))return p.errors=[{params:{missingProperty:r}}],!1;{const r=o;for(const e in t)if("amdContainer"!==e&&"auxiliaryComment"!==e&&"export"!==e&&"name"!==e&&"type"!==e&&"umdNamedDefine"!==e)return p.errors=[{params:{additionalProperty:e}}],!1;if(r===o){if(void 0!==t.amdContainer){let e=t.amdContainer;const r=o;if(o==o){if("string"!=typeof e)return p.errors=[{params:{type:"string"}}],!1;if(e.length<1)return p.errors=[{params:{}}],!1}var f=r===o}else f=!0;if(f){if(void 0!==t.auxiliaryComment){const r=o;i(t.auxiliaryComment,{instancePath:e+"/auxiliaryComment",parentData:t,parentDataProperty:"auxiliaryComment",rootData:s})||(a=null===a?i.errors:a.concat(i.errors),o=a.length),f=r===o}else f=!0;if(f){if(void 0!==t.export){let e=t.export;const r=o,n=o;let s=!1;const i=o;if(o===i)if(Array.isArray(e)){const t=e.length;for(let r=0;r<t;r++){let t=e[r];const n=o;if(o===n)if("string"==typeof t){if(t.length<1){const t={params:{}};null===a?a=[t]:a.push(t),o++}}else{const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}if(n!==o)break}}else{const t={params:{type:"array"}};null===a?a=[t]:a.push(t),o++}var c=i===o;if(s=s||c,!s){const t=o;if(o===t)if("string"==typeof e){if(e.length<1){const t={params:{}};null===a?a=[t]:a.push(t),o++}}else{const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}c=t===o,s=s||c}if(!s){const t={params:{}};return null===a?a=[t]:a.push(t),o++,p.errors=a,!1}o=n,null!==a&&(n?a.length=n:a=null),f=r===o}else f=!0;if(f){if(void 0!==t.name){const r=o;l(t.name,{instancePath:e+"/name",parentData:t,parentDataProperty:"name",rootData:s})||(a=null===a?l.errors:a.concat(l.errors),o=a.length),f=r===o}else f=!0;if(f){if(void 0!==t.type){let e=t.type;const r=o,n=o;let s=!1;const i=o;if("var"!==e&&"module"!==e&&"assign"!==e&&"assign-properties"!==e&&"this"!==e&&"window"!==e&&"self"!==e&&"global"!==e&&"commonjs"!==e&&"commonjs2"!==e&&"commonjs-module"!==e&&"commonjs-static"!==e&&"amd"!==e&&"amd-require"!==e&&"umd"!==e&&"umd2"!==e&&"jsonp"!==e&&"system"!==e){const t={params:{}};null===a?a=[t]:a.push(t),o++}var m=i===o;if(s=s||m,!s){const t=o;if("string"!=typeof e){const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}m=t===o,s=s||m}if(!s){const t={params:{}};return null===a?a=[t]:a.push(t),o++,p.errors=a,!1}o=n,null!==a&&(n?a.length=n:a=null),f=r===o}else f=!0;if(f)if(void 0!==t.umdNamedDefine){const e=o;if("boolean"!=typeof t.umdNamedDefine)return p.errors=[{params:{type:"boolean"}}],!1;f=e===o}else f=!0}}}}}}}}return p.errors=a,0===o}function f(t,{instancePath:e="",parentData:r,parentDataProperty:n,rootData:s=t}={}){if(!Array.isArray(t))return f.errors=[{params:{type:"array"}}],!1;{const e=t.length;for(let r=0;r<e;r++){let e=t[r];const n=0;if("string"!=typeof e)return f.errors=[{params:{type:"string"}}],!1;if(e.length<1)return f.errors=[{params:{}}],!1;if(0!==n)break}}return f.errors=null,!0}function c(t,{instancePath:e="",parentData:r,parentDataProperty:n,rootData:s=t}={}){let a=null,o=0;if(0===o){if(!t||"object"!=typeof t||Array.isArray(t))return c.errors=[{params:{type:"object"}}],!1;{let r;if(void 0===t.external&&(r="external"))return c.errors=[{params:{missingProperty:r}}],!1;{const r=o;for(const e in t)if("external"!==e&&"shareScope"!==e)return c.errors=[{params:{additionalProperty:e}}],!1;if(r===o){if(void 0!==t.external){let r=t.external;const n=o,p=o;let m=!1;const u=o;if(o==o)if("string"==typeof r){if(r.length<1){const t={params:{}};null===a?a=[t]:a.push(t),o++}}else{const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}var i=u===o;if(m=m||i,!m){const n=o;f(r,{instancePath:e+"/external",parentData:t,parentDataProperty:"external",rootData:s})||(a=null===a?f.errors:a.concat(f.errors),o=a.length),i=n===o,m=m||i}if(!m){const t={params:{}};return null===a?a=[t]:a.push(t),o++,c.errors=a,!1}o=p,null!==a&&(p?a.length=p:a=null);var l=n===o}else l=!0;if(l)if(void 0!==t.shareScope){let e=t.shareScope;const r=o;if(o===r){if("string"!=typeof e)return c.errors=[{params:{type:"string"}}],!1;if(e.length<1)return c.errors=[{params:{}}],!1}l=r===o}else l=!0}}}}return c.errors=a,0===o}function m(t,{instancePath:e="",parentData:r,parentDataProperty:n,rootData:s=t}={}){let a=null,o=0;if(0===o){if(!t||"object"!=typeof t||Array.isArray(t))return m.errors=[{params:{type:"object"}}],!1;for(const r in t){let n=t[r];const l=o,p=o;let u=!1;const y=o;c(n,{instancePath:e+"/"+r.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:r,rootData:s})||(a=null===a?c.errors:a.concat(c.errors),o=a.length);var i=y===o;if(u=u||i,!u){const l=o;if(o==o)if("string"==typeof n){if(n.length<1){const t={params:{}};null===a?a=[t]:a.push(t),o++}}else{const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}if(i=l===o,u=u||i,!u){const l=o;f(n,{instancePath:e+"/"+r.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:r,rootData:s})||(a=null===a?f.errors:a.concat(f.errors),o=a.length),i=l===o,u=u||i}}if(!u){const t={params:{}};return null===a?a=[t]:a.push(t),o++,m.errors=a,!1}if(o=p,null!==a&&(p?a.length=p:a=null),l!==o)break}}return m.errors=a,0===o}function u(t,{instancePath:e="",parentData:r,parentDataProperty:n,rootData:s=t}={}){let a=null,o=0;const i=o;let l=!1;const p=o;if(o===p)if(Array.isArray(t)){const r=t.length;for(let n=0;n<r;n++){let r=t[n];const i=o,l=o;let p=!1;const c=o;if(o==o)if("string"==typeof r){if(r.length<1){const t={params:{}};null===a?a=[t]:a.push(t),o++}}else{const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}var f=c===o;if(p=p||f,!p){const i=o;m(r,{instancePath:e+"/"+n,parentData:t,parentDataProperty:n,rootData:s})||(a=null===a?m.errors:a.concat(m.errors),o=a.length),f=i===o,p=p||f}if(p)o=l,null!==a&&(l?a.length=l:a=null);else{const t={params:{}};null===a?a=[t]:a.push(t),o++}if(i!==o)break}}else{const t={params:{type:"array"}};null===a?a=[t]:a.push(t),o++}var c=p===o;if(l=l||c,!l){const i=o;m(t,{instancePath:e,parentData:r,parentDataProperty:n,rootData:s})||(a=null===a?m.errors:a.concat(m.errors),o=a.length),c=i===o,l=l||c}if(!l){const t={params:{}};return null===a?a=[t]:a.push(t),o++,u.errors=a,!1}return o=i,null!==a&&(i?a.length=i:a=null),u.errors=a,0===o}const y={type:"object",additionalProperties:!1,properties:{eager:{type:"boolean"},import:{anyOf:[{enum:[!1]},{$ref:"#/definitions/SharedItem"}]},packageName:{type:"string",minLength:1},requiredVersion:{anyOf:[{enum:[!1]},{type:"string"}]},shareKey:{type:"string",minLength:1},shareScope:{type:"string",minLength:1},singleton:{type:"boolean"},strictVersion:{type:"boolean"},version:{anyOf:[{enum:[!1]},{type:"string"}]}}};function h(t,{instancePath:e="",parentData:n,parentDataProperty:s,rootData:a=t}={}){let o=null,i=0;if(0===i){if(!t||"object"!=typeof t||Array.isArray(t))return h.errors=[{params:{type:"object"}}],!1;{const e=i;for(const e in t)if(!r.call(y.properties,e))return h.errors=[{params:{additionalProperty:e}}],!1;if(e===i){if(void 0!==t.eager){const e=i;if("boolean"!=typeof t.eager)return h.errors=[{params:{type:"boolean"}}],!1;var l=e===i}else l=!0;if(l){if(void 0!==t.import){let e=t.import;const r=i,n=i;let s=!1;const a=i;if(!1!==e){const t={params:{}};null===o?o=[t]:o.push(t),i++}var p=a===i;if(s=s||p,!s){const t=i;if(i==i)if("string"==typeof e){if(e.length<1){const t={params:{}};null===o?o=[t]:o.push(t),i++}}else{const t={params:{type:"string"}};null===o?o=[t]:o.push(t),i++}p=t===i,s=s||p}if(!s){const t={params:{}};return null===o?o=[t]:o.push(t),i++,h.errors=o,!1}i=n,null!==o&&(n?o.length=n:o=null),l=r===i}else l=!0;if(l){if(void 0!==t.packageName){let e=t.packageName;const r=i;if(i===r){if("string"!=typeof e)return h.errors=[{params:{type:"string"}}],!1;if(e.length<1)return h.errors=[{params:{}}],!1}l=r===i}else l=!0;if(l){if(void 0!==t.requiredVersion){let e=t.requiredVersion;const r=i,n=i;let s=!1;const a=i;if(!1!==e){const t={params:{}};null===o?o=[t]:o.push(t),i++}var f=a===i;if(s=s||f,!s){const t=i;if("string"!=typeof e){const t={params:{type:"string"}};null===o?o=[t]:o.push(t),i++}f=t===i,s=s||f}if(!s){const t={params:{}};return null===o?o=[t]:o.push(t),i++,h.errors=o,!1}i=n,null!==o&&(n?o.length=n:o=null),l=r===i}else l=!0;if(l){if(void 0!==t.shareKey){let e=t.shareKey;const r=i;if(i===r){if("string"!=typeof e)return h.errors=[{params:{type:"string"}}],!1;if(e.length<1)return h.errors=[{params:{}}],!1}l=r===i}else l=!0;if(l){if(void 0!==t.shareScope){let e=t.shareScope;const r=i;if(i===r){if("string"!=typeof e)return h.errors=[{params:{type:"string"}}],!1;if(e.length<1)return h.errors=[{params:{}}],!1}l=r===i}else l=!0;if(l){if(void 0!==t.singleton){const e=i;if("boolean"!=typeof t.singleton)return h.errors=[{params:{type:"boolean"}}],!1;l=e===i}else l=!0;if(l){if(void 0!==t.strictVersion){const e=i;if("boolean"!=typeof t.strictVersion)return h.errors=[{params:{type:"boolean"}}],!1;l=e===i}else l=!0;if(l)if(void 0!==t.version){let e=t.version;const r=i,n=i;let s=!1;const a=i;if(!1!==e){const t={params:{}};null===o?o=[t]:o.push(t),i++}var c=a===i;if(s=s||c,!s){const t=i;if("string"!=typeof e){const t={params:{type:"string"}};null===o?o=[t]:o.push(t),i++}c=t===i,s=s||c}if(!s){const t={params:{}};return null===o?o=[t]:o.push(t),i++,h.errors=o,!1}i=n,null!==o&&(n?o.length=n:o=null),l=r===i}else l=!0}}}}}}}}}}return h.errors=o,0===i}function g(t,{instancePath:e="",parentData:r,parentDataProperty:n,rootData:s=t}={}){let a=null,o=0;if(0===o){if(!t||"object"!=typeof t||Array.isArray(t))return g.errors=[{params:{type:"object"}}],!1;for(const r in t){let n=t[r];const l=o,p=o;let f=!1;const c=o;h(n,{instancePath:e+"/"+r.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:r,rootData:s})||(a=null===a?h.errors:a.concat(h.errors),o=a.length);var i=c===o;if(f=f||i,!f){const t=o;if(o==o)if("string"==typeof n){if(n.length<1){const t={params:{}};null===a?a=[t]:a.push(t),o++}}else{const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}i=t===o,f=f||i}if(!f){const t={params:{}};return null===a?a=[t]:a.push(t),o++,g.errors=a,!1}if(o=p,null!==a&&(p?a.length=p:a=null),l!==o)break}}return g.errors=a,0===o}function d(t,{instancePath:e="",parentData:r,parentDataProperty:n,rootData:s=t}={}){let a=null,o=0;const i=o;let l=!1;const p=o;if(o===p)if(Array.isArray(t)){const r=t.length;for(let n=0;n<r;n++){let r=t[n];const i=o,l=o;let p=!1;const c=o;if(o==o)if("string"==typeof r){if(r.length<1){const t={params:{}};null===a?a=[t]:a.push(t),o++}}else{const t={params:{type:"string"}};null===a?a=[t]:a.push(t),o++}var f=c===o;if(p=p||f,!p){const i=o;g(r,{instancePath:e+"/"+n,parentData:t,parentDataProperty:n,rootData:s})||(a=null===a?g.errors:a.concat(g.errors),o=a.length),f=i===o,p=p||f}if(p)o=l,null!==a&&(l?a.length=l:a=null);else{const t={params:{}};null===a?a=[t]:a.push(t),o++}if(i!==o)break}}else{const t={params:{type:"array"}};null===a?a=[t]:a.push(t),o++}var c=p===o;if(l=l||c,!l){const i=o;g(t,{instancePath:e,parentData:r,parentDataProperty:n,rootData:s})||(a=null===a?g.errors:a.concat(g.errors),o=a.length),c=i===o,l=l||c}if(!l){const t={params:{}};return null===a?a=[t]:a.push(t),o++,d.errors=a,!1}return o=i,null!==a&&(i?a.length=i:a=null),d.errors=a,0===o}function D(n,{instancePath:s="",parentData:a,parentDataProperty:i,rootData:l=n}={}){let f=null,c=0;if(0===c){if(!n||"object"!=typeof n||Array.isArray(n))return D.errors=[{params:{type:"object"}}],!1;{const a=c;for(const t in n)if(!r.call(e.properties,t))return D.errors=[{params:{additionalProperty:t}}],!1;if(a===c){if(void 0!==n.exposes){const t=c;o(n.exposes,{instancePath:s+"/exposes",parentData:n,parentDataProperty:"exposes",rootData:l})||(f=null===f?o.errors:f.concat(o.errors),c=f.length);var m=t===c}else m=!0;if(m){if(void 0!==n.filename){let e=n.filename;const r=c;if(c===r){if("string"!=typeof e)return D.errors=[{params:{type:"string"}}],!1;if(e.includes("!")||!1!==t.test(e))return D.errors=[{params:{}}],!1}m=r===c}else m=!0;if(m){if(void 0!==n.library){const t=c;p(n.library,{instancePath:s+"/library",parentData:n,parentDataProperty:"library",rootData:l})||(f=null===f?p.errors:f.concat(p.errors),c=f.length),m=t===c}else m=!0;if(m){if(void 0!==n.name){const t=c;if("string"!=typeof n.name)return D.errors=[{params:{type:"string"}}],!1;m=t===c}else m=!0;if(m){if(void 0!==n.remoteType){let t=n.remoteType;const e=c,r=c;let s=!1,a=null;const o=c;if("var"!==t&&"module"!==t&&"assign"!==t&&"this"!==t&&"window"!==t&&"self"!==t&&"global"!==t&&"commonjs"!==t&&"commonjs2"!==t&&"commonjs-module"!==t&&"commonjs-static"!==t&&"amd"!==t&&"amd-require"!==t&&"umd"!==t&&"umd2"!==t&&"jsonp"!==t&&"system"!==t&&"promise"!==t&&"import"!==t&&"module-import"!==t&&"script"!==t&&"node-commonjs"!==t&&"asset"!==t&&"asset-url"!==t&&"css-import"!==t&&"css-url"!==t){const t={params:{}};null===f?f=[t]:f.push(t),c++}if(o===c&&(s=!0,a=0),!s){const t={params:{passingSchemas:a}};return null===f?f=[t]:f.push(t),c++,D.errors=f,!1}c=r,null!==f&&(r?f.length=r:f=null),m=e===c}else m=!0;if(m){if(void 0!==n.remotes){const t=c;u(n.remotes,{instancePath:s+"/remotes",parentData:n,parentDataProperty:"remotes",rootData:l})||(f=null===f?u.errors:f.concat(u.errors),c=f.length),m=t===c}else m=!0;if(m){if(void 0!==n.runtime){let t=n.runtime;const e=c,r=c;let s=!1;const a=c;if(!1!==t){const t={params:{}};null===f?f=[t]:f.push(t),c++}var y=a===c;if(s=s||y,!s){const e=c;if(c===e)if("string"==typeof t){if(t.length<1){const t={params:{}};null===f?f=[t]:f.push(t),c++}}else{const t={params:{type:"string"}};null===f?f=[t]:f.push(t),c++}y=e===c,s=s||y}if(!s){const t={params:{}};return null===f?f=[t]:f.push(t),c++,D.errors=f,!1}c=r,null!==f&&(r?f.length=r:f=null),m=e===c}else m=!0;if(m){if(void 0!==n.shareScope){let t=n.shareScope;const e=c;if(c===e){if("string"!=typeof t)return D.errors=[{params:{type:"string"}}],!1;if(t.length<1)return D.errors=[{params:{}}],!1}m=e===c}else m=!0;if(m)if(void 0!==n.shared){const t=c;d(n.shared,{instancePath:s+"/shared",parentData:n,parentDataProperty:"shared",rootData:l})||(f=null===f?d.errors:f.concat(d.errors),c=f.length),m=t===c}else m=!0}}}}}}}}}}return D.errors=f,0===c}

@@ -133,2 +133,3 @@ {

"asset",
"asset-url",
"css-import",

@@ -135,0 +136,0 @@ "css-url"

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display