@vue/compiler-sfc 3.6.0-rc.13 → 3.6.0-rc.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/compiler-sfc.cjs.js +1255 -973
- package/dist/compiler-sfc.d.ts +0 -1
- package/dist/compiler-sfc.esm-browser.js +6154 -5786
- package/package.json +12 -12
package/dist/compiler-sfc.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-sfc v3.6.0-rc.
|
|
2
|
+
* @vue/compiler-sfc v3.6.0-rc.15
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1682,80 +1682,6 @@ function parseUrl(url$4) {
|
|
|
1682
1682
|
function parseUriParts(urlString) {
|
|
1683
1683
|
return (0, url.parse)((0, _vue_shared.isString)(urlString) ? urlString : "", false, true);
|
|
1684
1684
|
}
|
|
1685
|
-
/**
|
|
1686
|
-
* Whether the current component should be treated as multi-root at the
|
|
1687
|
-
* component boundary.
|
|
1688
|
-
*
|
|
1689
|
-
* This is currently only attached to Vapor components. During Vapor hydration,
|
|
1690
|
-
* components hydrate while they are being created, so the runtime needs this
|
|
1691
|
-
* metadata to know whether the current SSR `<!--[--> ... <!--]-->` belongs to
|
|
1692
|
-
* the component itself and should be consumed before hydrating its children.
|
|
1693
|
-
*
|
|
1694
|
-
* The inference is aligned with compile-ssr's ownership semantics: it answers
|
|
1695
|
-
* whether the component root itself owns an outer fragment wrapper.
|
|
1696
|
-
*/
|
|
1697
|
-
function isMultiRoot(template, parserOptions) {
|
|
1698
|
-
const preserveComments = parserOptions?.comments !== false;
|
|
1699
|
-
if (typeof template === "string") return countRootUnits(parse(`<template>${template}</template>`, {
|
|
1700
|
-
sourceMap: false,
|
|
1701
|
-
ignoreEmpty: false,
|
|
1702
|
-
templateParseOptions: parserOptions
|
|
1703
|
-
}).descriptor.template.ast, preserveComments) > 1;
|
|
1704
|
-
if (isTemplateBlock(template)) return countRootUnits(template.ast, preserveComments) > 1;
|
|
1705
|
-
return countRootUnits(template, preserveComments) > 1;
|
|
1706
|
-
}
|
|
1707
|
-
function countRootUnits(parent, preserveComments) {
|
|
1708
|
-
const { children } = parent;
|
|
1709
|
-
let count = 0;
|
|
1710
|
-
for (let i = 0; i < children.length; i++) {
|
|
1711
|
-
const child = children[i];
|
|
1712
|
-
if (isWhitespaceRootText(child)) continue;
|
|
1713
|
-
if (isIfBranchStart(child)) {
|
|
1714
|
-
count++;
|
|
1715
|
-
let lastBranchIndex = i;
|
|
1716
|
-
let nextIndex = i + 1;
|
|
1717
|
-
while (nextIndex < children.length) {
|
|
1718
|
-
let continuationIndex = nextIndex;
|
|
1719
|
-
while (continuationIndex < children.length && isIgnorableIfChainSeparator(children[continuationIndex])) continuationIndex++;
|
|
1720
|
-
if (continuationIndex < children.length && isIfBranchContinuation(children[continuationIndex])) {
|
|
1721
|
-
lastBranchIndex = continuationIndex;
|
|
1722
|
-
nextIndex = continuationIndex + 1;
|
|
1723
|
-
continue;
|
|
1724
|
-
}
|
|
1725
|
-
break;
|
|
1726
|
-
}
|
|
1727
|
-
i = lastBranchIndex;
|
|
1728
|
-
continue;
|
|
1729
|
-
}
|
|
1730
|
-
count += countRootUnit(child, preserveComments);
|
|
1731
|
-
}
|
|
1732
|
-
return count;
|
|
1733
|
-
}
|
|
1734
|
-
function countRootUnit(node, preserveComments) {
|
|
1735
|
-
if (node.type !== 1) return node.type === 3 && !preserveComments ? 0 : 1;
|
|
1736
|
-
if (hasStructuralDirective(node, "if") || hasStructuralDirective(node, "for")) return 1;
|
|
1737
|
-
if (node.tag === "slot" || node.tagType === 1) return 1;
|
|
1738
|
-
if (node.tagType === 3) return countRootUnits(node, preserveComments);
|
|
1739
|
-
return 1;
|
|
1740
|
-
}
|
|
1741
|
-
function hasStructuralDirective(node, name) {
|
|
1742
|
-
return !!(0, _vue_compiler_dom.findDir)(node, name);
|
|
1743
|
-
}
|
|
1744
|
-
function isIfBranchStart(node) {
|
|
1745
|
-
return node.type === 1 && hasStructuralDirective(node, "if");
|
|
1746
|
-
}
|
|
1747
|
-
function isIfBranchContinuation(node) {
|
|
1748
|
-
return node.type === 1 && !!(0, _vue_compiler_dom.findDir)(node, /^else(-if)?$/, true);
|
|
1749
|
-
}
|
|
1750
|
-
function isWhitespaceRootText(node) {
|
|
1751
|
-
return node.type === 2 && !node.content.trim();
|
|
1752
|
-
}
|
|
1753
|
-
function isIgnorableIfChainSeparator(node) {
|
|
1754
|
-
return isWhitespaceRootText(node) || node.type === 3;
|
|
1755
|
-
}
|
|
1756
|
-
function isTemplateBlock(value) {
|
|
1757
|
-
return "content" in value && "attrs" in value;
|
|
1758
|
-
}
|
|
1759
1685
|
//#endregion
|
|
1760
1686
|
//#region packages/compiler-sfc/src/template/transformAssetUrl.ts
|
|
1761
1687
|
const resourceUrlTagConfig = {
|
|
@@ -3372,19 +3298,17 @@ function doCompileTemplate({ filename, id, scoped, slotted, inMap, source, ast:
|
|
|
3372
3298
|
if (map) map = mapLines(inMap, map);
|
|
3373
3299
|
if (errors.length) patchErrors(errors, source, inMap);
|
|
3374
3300
|
}
|
|
3375
|
-
const tips = warnings.map((w) => {
|
|
3376
|
-
let msg = w.message;
|
|
3377
|
-
if (w.loc) msg += `\n${(0, _vue_shared.generateCodeFrame)(inAST?.source || source, w.loc.start.offset, w.loc.end.offset)}`;
|
|
3378
|
-
return msg;
|
|
3379
|
-
});
|
|
3380
3301
|
return {
|
|
3381
3302
|
code,
|
|
3382
3303
|
ast,
|
|
3383
3304
|
preamble,
|
|
3384
|
-
multiRoot: vapor ? isMultiRoot(inAST || source, compilerOptions) : void 0,
|
|
3385
3305
|
source,
|
|
3386
3306
|
errors,
|
|
3387
|
-
tips
|
|
3307
|
+
tips: warnings.map((w) => {
|
|
3308
|
+
let msg = w.message;
|
|
3309
|
+
if (w.loc) msg += `\n${(0, _vue_shared.generateCodeFrame)(inAST?.source || source, w.loc.start.offset, w.loc.end.offset)}`;
|
|
3310
|
+
return msg;
|
|
3311
|
+
}),
|
|
3388
3312
|
map,
|
|
3389
3313
|
helpers
|
|
3390
3314
|
};
|
|
@@ -3457,7 +3381,7 @@ const trimPlugin = () => {
|
|
|
3457
3381
|
};
|
|
3458
3382
|
trimPlugin.postcss = true;
|
|
3459
3383
|
//#endregion
|
|
3460
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
3384
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/util/unesc.js
|
|
3461
3385
|
var require_unesc = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3462
3386
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3463
3387
|
exports.default = unesc;
|
|
@@ -3469,18 +3393,18 @@ var require_unesc = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3469
3393
|
function gobbleHex(str) {
|
|
3470
3394
|
var lower = str.toLowerCase();
|
|
3471
3395
|
var hex = "";
|
|
3472
|
-
var spaceTerminated = false;
|
|
3473
3396
|
for (var i = 0; i < 6 && lower[i] !== void 0; i++) {
|
|
3474
3397
|
var code = lower.charCodeAt(i);
|
|
3475
|
-
|
|
3476
|
-
spaceTerminated = code === 32;
|
|
3477
|
-
if (!valid) break;
|
|
3398
|
+
if (!(code >= 97 && code <= 102 || code >= 48 && code <= 57)) break;
|
|
3478
3399
|
hex += lower[i];
|
|
3479
3400
|
}
|
|
3480
3401
|
if (hex.length === 0) return;
|
|
3402
|
+
var consumed = hex.length;
|
|
3403
|
+
var next = str[consumed];
|
|
3404
|
+
if (next === " " || next === " " || next === "\n" || next === "\r" || next === "\f") consumed += next === "\r" && str[consumed + 1] === "\n" ? 2 : 1;
|
|
3481
3405
|
var codePoint = parseInt(hex, 16);
|
|
3482
|
-
if (codePoint >= 55296 && codePoint <= 57343 || codePoint === 0 || codePoint > 1114111) return ["�",
|
|
3483
|
-
return [String.fromCodePoint(codePoint),
|
|
3406
|
+
if (codePoint >= 55296 && codePoint <= 57343 || codePoint === 0 || codePoint > 1114111) return ["�", consumed];
|
|
3407
|
+
return [String.fromCodePoint(codePoint), consumed];
|
|
3484
3408
|
}
|
|
3485
3409
|
var CONTAINS_ESCAPE = /\\/;
|
|
3486
3410
|
function unesc(str) {
|
|
@@ -3488,7 +3412,7 @@ var require_unesc = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3488
3412
|
var ret = "";
|
|
3489
3413
|
for (var i = 0; i < str.length; i++) {
|
|
3490
3414
|
if (str[i] === "\\") {
|
|
3491
|
-
var gobbled = gobbleHex(str.slice(i + 1, i +
|
|
3415
|
+
var gobbled = gobbleHex(str.slice(i + 1, i + 9));
|
|
3492
3416
|
if (gobbled !== void 0) {
|
|
3493
3417
|
ret += gobbled[0];
|
|
3494
3418
|
i += gobbled[1];
|
|
@@ -3508,7 +3432,7 @@ var require_unesc = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3508
3432
|
}
|
|
3509
3433
|
}));
|
|
3510
3434
|
//#endregion
|
|
3511
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
3435
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/util/getProp.js
|
|
3512
3436
|
var require_getProp = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3513
3437
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3514
3438
|
exports.default = getProp;
|
|
@@ -3524,7 +3448,7 @@ var require_getProp = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3524
3448
|
}
|
|
3525
3449
|
}));
|
|
3526
3450
|
//#endregion
|
|
3527
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
3451
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/util/ensureObject.js
|
|
3528
3452
|
var require_ensureObject = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3529
3453
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3530
3454
|
exports.default = ensureObject;
|
|
@@ -3539,7 +3463,7 @@ var require_ensureObject = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3539
3463
|
}
|
|
3540
3464
|
}));
|
|
3541
3465
|
//#endregion
|
|
3542
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
3466
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/util/stripComments.js
|
|
3543
3467
|
var require_stripComments = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3544
3468
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3545
3469
|
exports.default = stripComments;
|
|
@@ -3559,7 +3483,7 @@ var require_stripComments = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3559
3483
|
}
|
|
3560
3484
|
}));
|
|
3561
3485
|
//#endregion
|
|
3562
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
3486
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/util/maxNestingDepth.js
|
|
3563
3487
|
var require_maxNestingDepth = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3564
3488
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3565
3489
|
exports.MAX_NESTING_DEPTH = void 0;
|
|
@@ -3586,7 +3510,7 @@ var require_maxNestingDepth = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3586
3510
|
}
|
|
3587
3511
|
}));
|
|
3588
3512
|
//#endregion
|
|
3589
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
3513
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/util/index.js
|
|
3590
3514
|
var require_util$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3591
3515
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
3592
3516
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -3636,7 +3560,7 @@ var require_util$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3636
3560
|
});
|
|
3637
3561
|
}));
|
|
3638
3562
|
//#endregion
|
|
3639
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
3563
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/selectors/node.js
|
|
3640
3564
|
var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3641
3565
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3642
3566
|
var util_1 = require_util$1();
|
|
@@ -3790,7 +3714,7 @@ var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3790
3714
|
}();
|
|
3791
3715
|
}));
|
|
3792
3716
|
//#endregion
|
|
3793
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
3717
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/selectors/types.js
|
|
3794
3718
|
var require_types = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3795
3719
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3796
3720
|
exports.UNIVERSAL = exports.ATTRIBUTE = exports.CLASS = exports.COMBINATOR = exports.COMMENT = exports.ID = exports.NESTING = exports.PSEUDO = exports.ROOT = exports.SELECTOR = exports.STRING = exports.TAG = void 0;
|
|
@@ -3808,7 +3732,7 @@ var require_types = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3808
3732
|
exports.UNIVERSAL = "universal";
|
|
3809
3733
|
}));
|
|
3810
3734
|
//#endregion
|
|
3811
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
3735
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/selectors/container.js
|
|
3812
3736
|
var require_container = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3813
3737
|
var __extends = exports && exports.__extends || (function() {
|
|
3814
3738
|
var extendStatics = function(d, b) {
|
|
@@ -3998,7 +3922,10 @@ var require_container = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3998
3922
|
newNode.parent = this;
|
|
3999
3923
|
var oldIndex = this.index(oldNode);
|
|
4000
3924
|
var resetNode = [];
|
|
4001
|
-
for (var i = 2; i < arguments.length; i++)
|
|
3925
|
+
for (var i = 2; i < arguments.length; i++) {
|
|
3926
|
+
arguments[i].parent = this;
|
|
3927
|
+
resetNode.push(arguments[i]);
|
|
3928
|
+
}
|
|
4002
3929
|
(_a = this.nodes).splice.apply(_a, __spreadArray([
|
|
4003
3930
|
oldIndex + 1,
|
|
4004
3931
|
0,
|
|
@@ -4017,7 +3944,10 @@ var require_container = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4017
3944
|
newNode.parent = this;
|
|
4018
3945
|
var oldIndex = this.index(oldNode);
|
|
4019
3946
|
var resetNode = [];
|
|
4020
|
-
for (var i = 2; i < arguments.length; i++)
|
|
3947
|
+
for (var i = 2; i < arguments.length; i++) {
|
|
3948
|
+
arguments[i].parent = this;
|
|
3949
|
+
resetNode.push(arguments[i]);
|
|
3950
|
+
}
|
|
4021
3951
|
(_a = this.nodes).splice.apply(_a, __spreadArray([
|
|
4022
3952
|
oldIndex,
|
|
4023
3953
|
0,
|
|
@@ -4199,7 +4129,7 @@ var require_container = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4199
4129
|
}(node_1.default);
|
|
4200
4130
|
}));
|
|
4201
4131
|
//#endregion
|
|
4202
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
4132
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/selectors/root.js
|
|
4203
4133
|
var require_root = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4204
4134
|
var __extends = exports && exports.__extends || (function() {
|
|
4205
4135
|
var extendStatics = function(d, b) {
|
|
@@ -4255,7 +4185,7 @@ var require_root = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4255
4185
|
}(container_1.default);
|
|
4256
4186
|
}));
|
|
4257
4187
|
//#endregion
|
|
4258
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
4188
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/selectors/selector.js
|
|
4259
4189
|
var require_selector = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4260
4190
|
var __extends = exports && exports.__extends || (function() {
|
|
4261
4191
|
var extendStatics = function(d, b) {
|
|
@@ -4354,7 +4284,7 @@ var require_cssesc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4354
4284
|
module.exports = cssesc;
|
|
4355
4285
|
}));
|
|
4356
4286
|
//#endregion
|
|
4357
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
4287
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/selectors/className.js
|
|
4358
4288
|
var require_className = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4359
4289
|
var __extends = exports && exports.__extends || (function() {
|
|
4360
4290
|
var extendStatics = function(d, b) {
|
|
@@ -4414,7 +4344,7 @@ var require_className = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4414
4344
|
}(node_1.default);
|
|
4415
4345
|
}));
|
|
4416
4346
|
//#endregion
|
|
4417
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
4347
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/selectors/comment.js
|
|
4418
4348
|
var require_comment = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4419
4349
|
var __extends = exports && exports.__extends || (function() {
|
|
4420
4350
|
var extendStatics = function(d, b) {
|
|
@@ -4451,7 +4381,7 @@ var require_comment = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4451
4381
|
}(node_1.default);
|
|
4452
4382
|
}));
|
|
4453
4383
|
//#endregion
|
|
4454
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
4384
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/selectors/id.js
|
|
4455
4385
|
var require_id = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4456
4386
|
var __extends = exports && exports.__extends || (function() {
|
|
4457
4387
|
var extendStatics = function(d, b) {
|
|
@@ -4491,7 +4421,7 @@ var require_id = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4491
4421
|
}(node_1.default);
|
|
4492
4422
|
}));
|
|
4493
4423
|
//#endregion
|
|
4494
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
4424
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/selectors/namespace.js
|
|
4495
4425
|
var require_namespace = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4496
4426
|
var __extends = exports && exports.__extends || (function() {
|
|
4497
4427
|
var extendStatics = function(d, b) {
|
|
@@ -4574,7 +4504,7 @@ var require_namespace = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4574
4504
|
}(__importDefault(require_node$1()).default);
|
|
4575
4505
|
}));
|
|
4576
4506
|
//#endregion
|
|
4577
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
4507
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/selectors/tag.js
|
|
4578
4508
|
var require_tag = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4579
4509
|
var __extends = exports && exports.__extends || (function() {
|
|
4580
4510
|
var extendStatics = function(d, b) {
|
|
@@ -4611,7 +4541,7 @@ var require_tag = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4611
4541
|
}(namespace_1.default);
|
|
4612
4542
|
}));
|
|
4613
4543
|
//#endregion
|
|
4614
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
4544
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/selectors/string.js
|
|
4615
4545
|
var require_string = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4616
4546
|
var __extends = exports && exports.__extends || (function() {
|
|
4617
4547
|
var extendStatics = function(d, b) {
|
|
@@ -4649,7 +4579,7 @@ var require_string = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4649
4579
|
exports.default = String;
|
|
4650
4580
|
}));
|
|
4651
4581
|
//#endregion
|
|
4652
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
4582
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/selectors/pseudo.js
|
|
4653
4583
|
var require_pseudo = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4654
4584
|
var __extends = exports && exports.__extends || (function() {
|
|
4655
4585
|
var extendStatics = function(d, b) {
|
|
@@ -4707,7 +4637,7 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4707
4637
|
module.exports = require("util").deprecate;
|
|
4708
4638
|
}));
|
|
4709
4639
|
//#endregion
|
|
4710
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
4640
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/selectors/attribute.js
|
|
4711
4641
|
var require_attribute = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4712
4642
|
var __extends = exports && exports.__extends || (function() {
|
|
4713
4643
|
var extendStatics = function(d, b) {
|
|
@@ -5093,7 +5023,7 @@ var require_attribute = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5093
5023
|
}
|
|
5094
5024
|
}));
|
|
5095
5025
|
//#endregion
|
|
5096
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
5026
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/selectors/universal.js
|
|
5097
5027
|
var require_universal = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5098
5028
|
var __extends = exports && exports.__extends || (function() {
|
|
5099
5029
|
var extendStatics = function(d, b) {
|
|
@@ -5131,7 +5061,7 @@ var require_universal = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5131
5061
|
}(namespace_1.default);
|
|
5132
5062
|
}));
|
|
5133
5063
|
//#endregion
|
|
5134
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
5064
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/selectors/combinator.js
|
|
5135
5065
|
var require_combinator = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5136
5066
|
var __extends = exports && exports.__extends || (function() {
|
|
5137
5067
|
var extendStatics = function(d, b) {
|
|
@@ -5162,13 +5092,25 @@ var require_combinator = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5162
5092
|
function Combinator(opts) {
|
|
5163
5093
|
var _this = _super.call(this, opts) || this;
|
|
5164
5094
|
_this.type = types_1.COMBINATOR;
|
|
5095
|
+
_this._constructed = true;
|
|
5165
5096
|
return _this;
|
|
5166
5097
|
}
|
|
5098
|
+
Object.defineProperty(Combinator.prototype, "value", {
|
|
5099
|
+
get: function() {
|
|
5100
|
+
return this._value;
|
|
5101
|
+
},
|
|
5102
|
+
set: function(value) {
|
|
5103
|
+
if (this._constructed && this.raws) delete this.raws.value;
|
|
5104
|
+
this._value = value;
|
|
5105
|
+
},
|
|
5106
|
+
enumerable: false,
|
|
5107
|
+
configurable: true
|
|
5108
|
+
});
|
|
5167
5109
|
return Combinator;
|
|
5168
5110
|
}(node_1.default);
|
|
5169
5111
|
}));
|
|
5170
5112
|
//#endregion
|
|
5171
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
5113
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/selectors/nesting.js
|
|
5172
5114
|
var require_nesting = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5173
5115
|
var __extends = exports && exports.__extends || (function() {
|
|
5174
5116
|
var extendStatics = function(d, b) {
|
|
@@ -5206,7 +5148,7 @@ var require_nesting = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5206
5148
|
}(node_1.default);
|
|
5207
5149
|
}));
|
|
5208
5150
|
//#endregion
|
|
5209
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
5151
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/sortAscending.js
|
|
5210
5152
|
var require_sortAscending = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5211
5153
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5212
5154
|
exports.default = sortAscending;
|
|
@@ -5217,7 +5159,7 @@ var require_sortAscending = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5217
5159
|
}
|
|
5218
5160
|
}));
|
|
5219
5161
|
//#endregion
|
|
5220
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
5162
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/tokenTypes.js
|
|
5221
5163
|
var require_tokenTypes = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5222
5164
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5223
5165
|
exports.combinator = exports.word = exports.comment = exports.str = exports.tab = exports.newline = exports.feed = exports.cr = exports.backslash = exports.bang = exports.slash = exports.doubleQuote = exports.singleQuote = exports.space = exports.greaterThan = exports.pipe = exports.equals = exports.plus = exports.caret = exports.tilde = exports.dollar = exports.closeSquare = exports.openSquare = exports.closeParenthesis = exports.openParenthesis = exports.semicolon = exports.colon = exports.comma = exports.at = exports.asterisk = exports.ampersand = void 0;
|
|
@@ -5254,7 +5196,7 @@ var require_tokenTypes = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5254
5196
|
exports.combinator = -3;
|
|
5255
5197
|
}));
|
|
5256
5198
|
//#endregion
|
|
5257
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
5199
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/tokenize.js
|
|
5258
5200
|
var require_tokenize = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5259
5201
|
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
5260
5202
|
if (k2 === void 0) k2 = k;
|
|
@@ -5496,7 +5438,7 @@ var require_tokenize = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5496
5438
|
}
|
|
5497
5439
|
}));
|
|
5498
5440
|
//#endregion
|
|
5499
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
5441
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/parser.js
|
|
5500
5442
|
var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5501
5443
|
var __assign = exports && exports.__assign || function() {
|
|
5502
5444
|
__assign = Object.assign || function(t) {
|
|
@@ -5688,6 +5630,15 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5688
5630
|
return _this.rule.error(message, errorOptions);
|
|
5689
5631
|
};
|
|
5690
5632
|
};
|
|
5633
|
+
Parser.prototype.namespaceSeparatorFollows = function(attr, pos) {
|
|
5634
|
+
var next = pos;
|
|
5635
|
+
while (attr[next] && attr[next][tokenize_1.FIELDS.TYPE] === tokens.space) next++;
|
|
5636
|
+
if (!attr[next] || this.content(attr[next]) !== "|") return false;
|
|
5637
|
+
next++;
|
|
5638
|
+
if (attr[next] && attr[next][tokenize_1.FIELDS.TYPE] === tokens.equals) return false;
|
|
5639
|
+
while (attr[next] && attr[next][tokenize_1.FIELDS.TYPE] === tokens.space) next++;
|
|
5640
|
+
return Boolean(attr[next]);
|
|
5641
|
+
};
|
|
5691
5642
|
Parser.prototype.attribute = function() {
|
|
5692
5643
|
var attr = [];
|
|
5693
5644
|
var startingToken = this.currToken;
|
|
@@ -5709,6 +5660,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5709
5660
|
var commentBefore = "";
|
|
5710
5661
|
var lastAdded = null;
|
|
5711
5662
|
var spaceAfterMeaningfulToken = false;
|
|
5663
|
+
var namespaceSpaces = null;
|
|
5712
5664
|
while (pos < len) {
|
|
5713
5665
|
var token = attr[pos];
|
|
5714
5666
|
var content = this.content(token);
|
|
@@ -5717,6 +5669,15 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5717
5669
|
case tokens.space:
|
|
5718
5670
|
spaceAfterMeaningfulToken = true;
|
|
5719
5671
|
if (this.options.lossy) break;
|
|
5672
|
+
if (namespaceSpaces !== null) {
|
|
5673
|
+
namespaceSpaces += content;
|
|
5674
|
+
break;
|
|
5675
|
+
}
|
|
5676
|
+
if (lastAdded === "namespace") {
|
|
5677
|
+
(0, util_1.ensureObject)(node, "raws");
|
|
5678
|
+
node.raws.namespace = (node.raws.namespace || node.namespace) + content;
|
|
5679
|
+
break;
|
|
5680
|
+
}
|
|
5720
5681
|
if (lastAdded) {
|
|
5721
5682
|
(0, util_1.ensureObject)(node, "spaces", lastAdded);
|
|
5722
5683
|
var prevContent = node.spaces[lastAdded].after || "";
|
|
@@ -5733,6 +5694,9 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5733
5694
|
node.operator = content;
|
|
5734
5695
|
lastAdded = "operator";
|
|
5735
5696
|
} else if ((!node.namespace || lastAdded === "namespace" && !spaceAfterMeaningfulToken) && next) {
|
|
5697
|
+
node.namespace = (node.namespace || "") + content;
|
|
5698
|
+
var rawValue = (0, util_1.getProp)(node, "raws", "namespace") || null;
|
|
5699
|
+
if (rawValue) node.raws.namespace += content;
|
|
5736
5700
|
if (spaceBefore) {
|
|
5737
5701
|
(0, util_1.ensureObject)(node, "spaces", "attribute");
|
|
5738
5702
|
node.spaces.attribute.before = spaceBefore;
|
|
@@ -5743,9 +5707,6 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5743
5707
|
node.raws.spaces.attribute.before = commentBefore;
|
|
5744
5708
|
commentBefore = "";
|
|
5745
5709
|
}
|
|
5746
|
-
node.namespace = (node.namespace || "") + content;
|
|
5747
|
-
var rawValue = (0, util_1.getProp)(node, "raws", "namespace") || null;
|
|
5748
|
-
if (rawValue) node.raws.namespace += content;
|
|
5749
5710
|
lastAdded = "namespace";
|
|
5750
5711
|
}
|
|
5751
5712
|
spaceAfterMeaningfulToken = false;
|
|
@@ -5775,11 +5736,14 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5775
5736
|
if (next[tokenize_1.FIELDS.TYPE] === tokens.equals) {
|
|
5776
5737
|
node.operator = content;
|
|
5777
5738
|
lastAdded = "operator";
|
|
5778
|
-
} else if (!node.
|
|
5739
|
+
} else if (!node.operator) {
|
|
5740
|
+
if (!node.namespace && !node.attribute) node.namespace = true;
|
|
5741
|
+
namespaceSpaces = "";
|
|
5742
|
+
}
|
|
5779
5743
|
spaceAfterMeaningfulToken = false;
|
|
5780
5744
|
break;
|
|
5781
5745
|
case tokens.word:
|
|
5782
|
-
if (
|
|
5746
|
+
if (this.namespaceSeparatorFollows(attr, pos + 1) && !node.operator && !node.namespace) {
|
|
5783
5747
|
node.namespace = content;
|
|
5784
5748
|
lastAdded = "namespace";
|
|
5785
5749
|
} else if (!node.attribute || lastAdded === "attribute" && !spaceAfterMeaningfulToken) {
|
|
@@ -5793,6 +5757,11 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5793
5757
|
node.raws.spaces.attribute.before = commentBefore;
|
|
5794
5758
|
commentBefore = "";
|
|
5795
5759
|
}
|
|
5760
|
+
if (namespaceSpaces) {
|
|
5761
|
+
(0, util_1.ensureObject)(node, "raws");
|
|
5762
|
+
node.raws.attribute = namespaceSpaces + (node.raws.attribute || node.attribute || "");
|
|
5763
|
+
}
|
|
5764
|
+
namespaceSpaces = null;
|
|
5796
5765
|
node.attribute = (node.attribute || "") + content;
|
|
5797
5766
|
var rawValue = (0, util_1.getProp)(node, "raws", "attribute") || null;
|
|
5798
5767
|
if (rawValue) node.raws.attribute += content;
|
|
@@ -6034,7 +6003,23 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6034
6003
|
}
|
|
6035
6004
|
return this.newNode(node);
|
|
6036
6005
|
};
|
|
6006
|
+
Parser.prototype.flushPendingSpaces = function() {
|
|
6007
|
+
if (!this.spaces) return;
|
|
6008
|
+
var last = this.current.last;
|
|
6009
|
+
if (last) {
|
|
6010
|
+
last.spaces.after += this.spaces;
|
|
6011
|
+
this.spaces = "";
|
|
6012
|
+
return;
|
|
6013
|
+
}
|
|
6014
|
+
var token = this.currToken || this.prevToken;
|
|
6015
|
+
this.newNode(new string_1.default({
|
|
6016
|
+
value: "",
|
|
6017
|
+
source: token ? getTokenSource(token) : void 0,
|
|
6018
|
+
sourceIndex: token ? token[tokenize_1.FIELDS.START_POS] : 0
|
|
6019
|
+
}));
|
|
6020
|
+
};
|
|
6037
6021
|
Parser.prototype.comma = function() {
|
|
6022
|
+
this.flushPendingSpaces();
|
|
6038
6023
|
if (this.position === this.tokens.length - 1) {
|
|
6039
6024
|
this.root.trailingComma = true;
|
|
6040
6025
|
this.position++;
|
|
@@ -6125,6 +6110,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6125
6110
|
if (this.currToken[tokenize_1.FIELDS.TYPE] === tokens.closeParenthesis) unbalanced--;
|
|
6126
6111
|
if (unbalanced) this.parse();
|
|
6127
6112
|
else {
|
|
6113
|
+
this.flushPendingSpaces();
|
|
6128
6114
|
this.current.source.end = tokenEnd(this.currToken);
|
|
6129
6115
|
this.current.parent.source.end = tokenEnd(this.currToken);
|
|
6130
6116
|
this.position++;
|
|
@@ -6295,6 +6281,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6295
6281
|
};
|
|
6296
6282
|
Parser.prototype.loop = function() {
|
|
6297
6283
|
while (this.position < this.tokens.length) this.parse(true);
|
|
6284
|
+
this.flushPendingSpaces();
|
|
6298
6285
|
this.current._inferEndPosition();
|
|
6299
6286
|
return this.root;
|
|
6300
6287
|
};
|
|
@@ -6429,7 +6416,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6429
6416
|
}();
|
|
6430
6417
|
}));
|
|
6431
6418
|
//#endregion
|
|
6432
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
6419
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/processor.js
|
|
6433
6420
|
var require_processor = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6434
6421
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
6435
6422
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -6578,7 +6565,7 @@ var require_processor = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6578
6565
|
}();
|
|
6579
6566
|
}));
|
|
6580
6567
|
//#endregion
|
|
6581
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
6568
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/selectors/constructors.js
|
|
6582
6569
|
var require_constructors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6583
6570
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
6584
6571
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -6647,7 +6634,7 @@ var require_constructors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6647
6634
|
exports.universal = universal;
|
|
6648
6635
|
}));
|
|
6649
6636
|
//#endregion
|
|
6650
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
6637
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/selectors/guards.js
|
|
6651
6638
|
var require_guards = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6652
6639
|
var _a;
|
|
6653
6640
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -6691,7 +6678,7 @@ var require_guards = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6691
6678
|
}
|
|
6692
6679
|
}));
|
|
6693
6680
|
//#endregion
|
|
6694
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
6681
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/selectors/index.js
|
|
6695
6682
|
var require_selectors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6696
6683
|
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
6697
6684
|
if (k2 === void 0) k2 = k;
|
|
@@ -6716,7 +6703,7 @@ var require_selectors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6716
6703
|
__exportStar(require_guards(), exports);
|
|
6717
6704
|
}));
|
|
6718
6705
|
//#endregion
|
|
6719
|
-
//#region node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
6706
|
+
//#region node_modules/.pnpm/postcss-selector-parser@7.1.7/node_modules/postcss-selector-parser/dist/index.js
|
|
6720
6707
|
var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6721
6708
|
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
6722
6709
|
if (k2 === void 0) k2 = k;
|
|
@@ -9141,7 +9128,7 @@ const processors = {
|
|
|
9141
9128
|
stylus: styl
|
|
9142
9129
|
};
|
|
9143
9130
|
//#endregion
|
|
9144
|
-
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
9131
|
+
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.32/node_modules/postcss-modules/build/fs.js
|
|
9145
9132
|
var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
9146
9133
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9147
9134
|
exports.getFileSystem = getFileSystem;
|
|
@@ -9163,7 +9150,7 @@ var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9163
9150
|
}
|
|
9164
9151
|
}));
|
|
9165
9152
|
//#endregion
|
|
9166
|
-
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
9153
|
+
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.32/node_modules/postcss-modules/build/unquote.js
|
|
9167
9154
|
var require_unquote = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
9168
9155
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9169
9156
|
exports.default = unquote;
|
|
@@ -9176,7 +9163,7 @@ var require_unquote = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9176
9163
|
}
|
|
9177
9164
|
}));
|
|
9178
9165
|
//#endregion
|
|
9179
|
-
//#region node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.
|
|
9166
|
+
//#region node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.32/node_modules/icss-utils/src/replaceValueSymbols.js
|
|
9180
9167
|
var require_replaceValueSymbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
9181
9168
|
const matchValueName = /[$]?[\w-]+/g;
|
|
9182
9169
|
const replaceValueSymbols = (value, replacements) => {
|
|
@@ -9193,7 +9180,7 @@ var require_replaceValueSymbols = /* @__PURE__ */ __commonJSMin(((exports, modul
|
|
|
9193
9180
|
module.exports = replaceValueSymbols;
|
|
9194
9181
|
}));
|
|
9195
9182
|
//#endregion
|
|
9196
|
-
//#region node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.
|
|
9183
|
+
//#region node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.32/node_modules/icss-utils/src/replaceSymbols.js
|
|
9197
9184
|
var require_replaceSymbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
9198
9185
|
const replaceValueSymbols = require_replaceValueSymbols();
|
|
9199
9186
|
const replaceSymbols = (css, replacements) => {
|
|
@@ -9206,7 +9193,7 @@ var require_replaceSymbols = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
9206
9193
|
module.exports = replaceSymbols;
|
|
9207
9194
|
}));
|
|
9208
9195
|
//#endregion
|
|
9209
|
-
//#region node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.
|
|
9196
|
+
//#region node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.32/node_modules/icss-utils/src/extractICSS.js
|
|
9210
9197
|
var require_extractICSS = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
9211
9198
|
const importPattern = /^:import\(("[^"]*"|'[^']*'|[^"']+)\)$/;
|
|
9212
9199
|
const balancedQuotes = /^("[^"]*"|'[^']*'|[^"']+)$/;
|
|
@@ -9260,7 +9247,7 @@ var require_extractICSS = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9260
9247
|
module.exports = extractICSS;
|
|
9261
9248
|
}));
|
|
9262
9249
|
//#endregion
|
|
9263
|
-
//#region node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.
|
|
9250
|
+
//#region node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.32/node_modules/icss-utils/src/createICSSRules.js
|
|
9264
9251
|
var require_createICSSRules = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
9265
9252
|
const createImports = (imports, postcss, mode = "rule") => {
|
|
9266
9253
|
return Object.keys(imports).map((path) => {
|
|
@@ -9304,7 +9291,7 @@ var require_createICSSRules = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
9304
9291
|
module.exports = createICSSRules;
|
|
9305
9292
|
}));
|
|
9306
9293
|
//#endregion
|
|
9307
|
-
//#region node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.
|
|
9294
|
+
//#region node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.32/node_modules/icss-utils/src/index.js
|
|
9308
9295
|
var require_src$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
9309
9296
|
module.exports = {
|
|
9310
9297
|
replaceValueSymbols: require_replaceValueSymbols(),
|
|
@@ -9314,7 +9301,7 @@ var require_src$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9314
9301
|
};
|
|
9315
9302
|
}));
|
|
9316
9303
|
//#endregion
|
|
9317
|
-
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
9304
|
+
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.32/node_modules/postcss-modules/build/Parser.js
|
|
9318
9305
|
var require_Parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
9319
9306
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9320
9307
|
exports.default = void 0;
|
|
@@ -9382,7 +9369,7 @@ var require_Parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9382
9369
|
exports.default = Parser;
|
|
9383
9370
|
}));
|
|
9384
9371
|
//#endregion
|
|
9385
|
-
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
9372
|
+
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.32/node_modules/postcss-modules/build/saveJSON.js
|
|
9386
9373
|
var require_saveJSON = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
9387
9374
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9388
9375
|
exports.default = saveJSON;
|
|
@@ -10063,7 +10050,7 @@ var require_lodash_camelcase = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
10063
10050
|
module.exports = camelCase;
|
|
10064
10051
|
}));
|
|
10065
10052
|
//#endregion
|
|
10066
|
-
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
10053
|
+
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.32/node_modules/postcss-modules/build/localsConvention.js
|
|
10067
10054
|
var require_localsConvention = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10068
10055
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10069
10056
|
exports.makeLocalsConventionReducer = makeLocalsConventionReducer;
|
|
@@ -10101,7 +10088,7 @@ var require_localsConvention = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10101
10088
|
}
|
|
10102
10089
|
}));
|
|
10103
10090
|
//#endregion
|
|
10104
|
-
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
10091
|
+
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.32/node_modules/postcss-modules/build/FileSystemLoader.js
|
|
10105
10092
|
var require_FileSystemLoader = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10106
10093
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10107
10094
|
exports.default = void 0;
|
|
@@ -10186,7 +10173,7 @@ var require_FileSystemLoader = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10186
10173
|
exports.default = FileSystemLoader;
|
|
10187
10174
|
}));
|
|
10188
10175
|
//#endregion
|
|
10189
|
-
//#region node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.
|
|
10176
|
+
//#region node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.32/node_modules/postcss-modules-extract-imports/src/topologicalSort.js
|
|
10190
10177
|
var require_topologicalSort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
10191
10178
|
const PERMANENT_MARKER = 2;
|
|
10192
10179
|
const TEMPORARY_MARKER = 1;
|
|
@@ -10225,7 +10212,7 @@ var require_topologicalSort = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
10225
10212
|
module.exports = topologicalSort;
|
|
10226
10213
|
}));
|
|
10227
10214
|
//#endregion
|
|
10228
|
-
//#region node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.
|
|
10215
|
+
//#region node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.32/node_modules/postcss-modules-extract-imports/src/index.js
|
|
10229
10216
|
var require_src$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
10230
10217
|
const topologicalSort = require_topologicalSort();
|
|
10231
10218
|
const matchImports = /^(.+?)\s+from\s+(?:"([^"]+)"|'([^']+)'|(global))$/;
|
|
@@ -11148,7 +11135,7 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11148
11135
|
module.exports = ValueParser;
|
|
11149
11136
|
}));
|
|
11150
11137
|
//#endregion
|
|
11151
|
-
//#region node_modules/.pnpm/postcss-modules-local-by-default@4.2.0_postcss@8.5.
|
|
11138
|
+
//#region node_modules/.pnpm/postcss-modules-local-by-default@4.2.0_postcss@8.5.32/node_modules/postcss-modules-local-by-default/src/index.js
|
|
11152
11139
|
var require_src$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
11153
11140
|
const selectorParser = require_dist();
|
|
11154
11141
|
const valueParser = require_lib();
|
|
@@ -11545,7 +11532,7 @@ var require_src$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11545
11532
|
module.exports.postcss = true;
|
|
11546
11533
|
}));
|
|
11547
11534
|
//#endregion
|
|
11548
|
-
//#region node_modules/.pnpm/postcss-modules-scope@3.2.1_postcss@8.5.
|
|
11535
|
+
//#region node_modules/.pnpm/postcss-modules-scope@3.2.1_postcss@8.5.32/node_modules/postcss-modules-scope/src/index.js
|
|
11549
11536
|
var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
11550
11537
|
const selectorParser = require_dist();
|
|
11551
11538
|
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
@@ -11723,7 +11710,7 @@ var require_string_hash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11723
11710
|
module.exports = hash;
|
|
11724
11711
|
}));
|
|
11725
11712
|
//#endregion
|
|
11726
|
-
//#region node_modules/.pnpm/postcss-modules-values@4.0.0_postcss@8.5.
|
|
11713
|
+
//#region node_modules/.pnpm/postcss-modules-values@4.0.0_postcss@8.5.32/node_modules/postcss-modules-values/src/index.js
|
|
11727
11714
|
var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
11728
11715
|
const ICSSUtils = require_src$4();
|
|
11729
11716
|
const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/;
|
|
@@ -11810,7 +11797,7 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11810
11797
|
module.exports.postcss = true;
|
|
11811
11798
|
}));
|
|
11812
11799
|
//#endregion
|
|
11813
|
-
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
11800
|
+
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.32/node_modules/postcss-modules/build/scoping.js
|
|
11814
11801
|
var require_scoping = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11815
11802
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11816
11803
|
exports.behaviours = void 0;
|
|
@@ -11872,7 +11859,7 @@ var require_scoping = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11872
11859
|
}
|
|
11873
11860
|
}));
|
|
11874
11861
|
//#endregion
|
|
11875
|
-
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
11862
|
+
//#region node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.32/node_modules/postcss-modules/build/pluginFactory.js
|
|
11876
11863
|
var require_pluginFactory = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11877
11864
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11878
11865
|
exports.makePlugin = makePlugin;
|
|
@@ -12101,10 +12088,10 @@ function toFileNameLowerCase(x) {
|
|
|
12101
12088
|
function createGetCanonicalFileName(useCaseSensitiveFileNames) {
|
|
12102
12089
|
return useCaseSensitiveFileNames ? identity : toFileNameLowerCase;
|
|
12103
12090
|
}
|
|
12104
|
-
const normalize = (path.default.posix || path.default).normalize;
|
|
12091
|
+
const normalize$1 = (path.default.posix || path.default).normalize;
|
|
12105
12092
|
const windowsSlashRE = /\\/g;
|
|
12106
12093
|
function normalizePath(p) {
|
|
12107
|
-
return normalize(p.replace(windowsSlashRE, "/"));
|
|
12094
|
+
return normalize$1(p.replace(windowsSlashRE, "/"));
|
|
12108
12095
|
}
|
|
12109
12096
|
const joinPaths = (path.default.posix || path.default).join;
|
|
12110
12097
|
/**
|
|
@@ -12387,7 +12374,7 @@ const range = (a, b, str) => {
|
|
|
12387
12374
|
return result;
|
|
12388
12375
|
};
|
|
12389
12376
|
//#endregion
|
|
12390
|
-
//#region node_modules/.pnpm/brace-expansion@5.0.
|
|
12377
|
+
//#region node_modules/.pnpm/brace-expansion@5.0.12/node_modules/brace-expansion/dist/esm/index.js
|
|
12391
12378
|
const escSlash = "\0SLASH" + Math.random() + "\0";
|
|
12392
12379
|
const escOpen = "\0OPEN" + Math.random() + "\0";
|
|
12393
12380
|
const escClose = "\0CLOSE" + Math.random() + "\0";
|
|
@@ -12405,6 +12392,8 @@ const commaPattern = /\\,/g;
|
|
|
12405
12392
|
const periodPattern = /\\\./g;
|
|
12406
12393
|
const EXPANSION_MAX = 1e5;
|
|
12407
12394
|
const EXPANSION_MAX_LENGTH = 4e6;
|
|
12395
|
+
const EXPANSION_MAX_DEPTH = 1e3;
|
|
12396
|
+
const EXPANSION_MAX_REWRITES = 1e3;
|
|
12408
12397
|
function numeric(str) {
|
|
12409
12398
|
return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
|
|
12410
12399
|
}
|
|
@@ -12414,32 +12403,43 @@ function escapeBraces(str) {
|
|
|
12414
12403
|
function unescapeBraces(str) {
|
|
12415
12404
|
return str.replace(escSlashPattern, "\\").replace(escOpenPattern, "{").replace(escClosePattern, "}").replace(escCommaPattern, ",").replace(escPeriodPattern, ".");
|
|
12416
12405
|
}
|
|
12406
|
+
function pushAll(target, items) {
|
|
12407
|
+
for (let i = 0; i < items.length; i++) target.push(items[i]);
|
|
12408
|
+
}
|
|
12417
12409
|
/**
|
|
12418
12410
|
* Basically just str.split(","), but handling cases
|
|
12419
12411
|
* where we have nested braced sections, which should be
|
|
12420
12412
|
* treated as individual members, like {a,{b,c},d}
|
|
12421
12413
|
*/
|
|
12422
12414
|
function parseCommaParts(str) {
|
|
12423
|
-
if (!str) return [""];
|
|
12424
12415
|
const parts = [];
|
|
12425
|
-
|
|
12426
|
-
|
|
12427
|
-
|
|
12428
|
-
|
|
12429
|
-
|
|
12430
|
-
|
|
12431
|
-
|
|
12432
|
-
|
|
12433
|
-
|
|
12434
|
-
|
|
12435
|
-
|
|
12436
|
-
|
|
12416
|
+
let carry = "";
|
|
12417
|
+
for (;;) {
|
|
12418
|
+
const m = balanced("{", "}", str);
|
|
12419
|
+
if (!m) {
|
|
12420
|
+
const tail = str.split(",");
|
|
12421
|
+
tail[0] = carry + tail[0];
|
|
12422
|
+
pushAll(parts, tail);
|
|
12423
|
+
return parts;
|
|
12424
|
+
}
|
|
12425
|
+
const { pre, body, post } = m;
|
|
12426
|
+
const p = pre.split(",");
|
|
12427
|
+
p[0] = carry + p[0];
|
|
12428
|
+
p[p.length - 1] += "{" + body + "}";
|
|
12429
|
+
if (!post.length) {
|
|
12430
|
+
pushAll(parts, p);
|
|
12431
|
+
return parts;
|
|
12432
|
+
}
|
|
12433
|
+
carry = p.pop();
|
|
12434
|
+
pushAll(parts, p);
|
|
12435
|
+
str = post;
|
|
12436
|
+
}
|
|
12437
12437
|
}
|
|
12438
12438
|
function expand(str, options = {}) {
|
|
12439
12439
|
if (!str) return [];
|
|
12440
|
-
const { max = EXPANSION_MAX, maxLength = EXPANSION_MAX_LENGTH } = options;
|
|
12440
|
+
const { max = EXPANSION_MAX, maxLength = EXPANSION_MAX_LENGTH, maxDepth = EXPANSION_MAX_DEPTH, maxRewrites = EXPANSION_MAX_REWRITES } = options;
|
|
12441
12441
|
if (str.slice(0, 2) === "{}") str = "\\{\\}" + str.slice(2);
|
|
12442
|
-
return expand_(escapeBraces(str), max, maxLength, true).map(unescapeBraces);
|
|
12442
|
+
return expand_(escapeBraces(str), max, maxLength, maxDepth, 0, maxRewrites, true).map(unescapeBraces);
|
|
12443
12443
|
}
|
|
12444
12444
|
function embrace(str) {
|
|
12445
12445
|
return "{" + str + "}";
|
|
@@ -12505,8 +12505,10 @@ function expandSequence(body, isAlphaSequence, max, maxLength) {
|
|
|
12505
12505
|
}
|
|
12506
12506
|
return N;
|
|
12507
12507
|
}
|
|
12508
|
-
function expand_(str, max, maxLength, isTop) {
|
|
12508
|
+
function expand_(str, max, maxLength, maxDepth, depth, maxRewrites, isTop) {
|
|
12509
|
+
if (depth > maxDepth) return [str];
|
|
12509
12510
|
let acc = [""];
|
|
12511
|
+
let rewrites = 0;
|
|
12510
12512
|
let dropEmpties = false;
|
|
12511
12513
|
let firstGroup = true;
|
|
12512
12514
|
for (;;) {
|
|
@@ -12525,7 +12527,8 @@ function expand_(str, max, maxLength, isTop) {
|
|
|
12525
12527
|
const isSequence = isNumericSequence || isAlphaSequence;
|
|
12526
12528
|
const isOptions = m.body.indexOf(",") >= 0;
|
|
12527
12529
|
if (!isSequence && !isOptions) {
|
|
12528
|
-
if (m.post.match(/,(?!,).*\}/)) {
|
|
12530
|
+
if (rewrites < maxRewrites && m.post.match(/,(?!,).*\}/)) {
|
|
12531
|
+
rewrites++;
|
|
12529
12532
|
str = m.pre + "{" + m.body + escClose + m.post;
|
|
12530
12533
|
isTop = true;
|
|
12531
12534
|
continue;
|
|
@@ -12541,7 +12544,7 @@ function expand_(str, max, maxLength, isTop) {
|
|
|
12541
12544
|
else {
|
|
12542
12545
|
let n = parseCommaParts(m.body);
|
|
12543
12546
|
if (n.length === 1 && n[0] !== void 0) {
|
|
12544
|
-
n = expand_(n[0], max, maxLength, false).map(embrace);
|
|
12547
|
+
n = expand_(n[0], max, maxLength, maxDepth, depth + 1, maxRewrites, false).map(embrace);
|
|
12545
12548
|
/* c8 ignore start */
|
|
12546
12549
|
if (n.length === 1) {
|
|
12547
12550
|
acc = combine(acc, pre + n[0], [""], max, maxLength, dropEmpties && !m.post.length);
|
|
@@ -12555,7 +12558,7 @@ function expand_(str, max, maxLength, isTop) {
|
|
|
12555
12558
|
values = [];
|
|
12556
12559
|
let valuesLength = 0;
|
|
12557
12560
|
outer: for (let j = 0; j < n.length; j++) {
|
|
12558
|
-
const expanded = expand_(n[j], max, maxLength, false);
|
|
12561
|
+
const expanded = expand_(n[j], max, maxLength, maxDepth, depth + 1, maxRewrites, false);
|
|
12559
12562
|
for (let k = 0; k < expanded.length; k++) {
|
|
12560
12563
|
const v = expanded[k];
|
|
12561
12564
|
if (dropsEmpties && !v) continue;
|
|
@@ -12572,38 +12575,30 @@ function expand_(str, max, maxLength, isTop) {
|
|
|
12572
12575
|
return acc;
|
|
12573
12576
|
}
|
|
12574
12577
|
//#endregion
|
|
12575
|
-
//#region node_modules/.pnpm
|
|
12576
|
-
const MAX_PATTERN_LENGTH = 65536;
|
|
12577
|
-
const assertValidPattern = (pattern) => {
|
|
12578
|
-
if (typeof pattern !== "string") throw new TypeError("invalid pattern");
|
|
12579
|
-
if (pattern.length > MAX_PATTERN_LENGTH) throw new TypeError("pattern is too long");
|
|
12580
|
-
};
|
|
12581
|
-
//#endregion
|
|
12582
|
-
//#region node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/brace-expressions.js
|
|
12578
|
+
//#region node_modules/.pnpm/@isaacs+nonrecursive-glob-match@1.0.3/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/parse-class.js
|
|
12583
12579
|
const posixClasses = {
|
|
12584
|
-
"[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}"
|
|
12585
|
-
"[:alpha:]": ["\\p{L}\\p{Nl}"
|
|
12586
|
-
"[:ascii:]": ["\\x00-\\x7f"
|
|
12587
|
-
"[:blank:]": ["\\p{Zs}\\t"
|
|
12588
|
-
"[:cntrl:]": ["\\p{Cc}"
|
|
12589
|
-
"[:digit:]": ["\\p{Nd}"
|
|
12590
|
-
"[:graph:]": [
|
|
12591
|
-
|
|
12592
|
-
true,
|
|
12593
|
-
true
|
|
12594
|
-
],
|
|
12595
|
-
"[:lower:]": ["\\p{Ll}", true],
|
|
12580
|
+
"[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}"],
|
|
12581
|
+
"[:alpha:]": ["\\p{L}\\p{Nl}"],
|
|
12582
|
+
"[:ascii:]": ["\\x00-\\x7f"],
|
|
12583
|
+
"[:blank:]": ["\\p{Zs}\\t"],
|
|
12584
|
+
"[:cntrl:]": ["\\p{Cc}"],
|
|
12585
|
+
"[:digit:]": ["\\p{Nd}"],
|
|
12586
|
+
"[:graph:]": ["\\p{Z}\\p{C}", true],
|
|
12587
|
+
"[:lower:]": ["\\p{Ll}"],
|
|
12596
12588
|
"[:print:]": ["\\p{C}", true],
|
|
12597
|
-
"[:punct:]": ["\\p{P}"
|
|
12598
|
-
"[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f"
|
|
12599
|
-
"[:upper:]": ["\\p{Lu}"
|
|
12600
|
-
"[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}"
|
|
12601
|
-
"[:xdigit:]": ["A-Fa-f0-9"
|
|
12589
|
+
"[:punct:]": ["\\p{P}\\p{S}"],
|
|
12590
|
+
"[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f"],
|
|
12591
|
+
"[:upper:]": ["\\p{Lu}"],
|
|
12592
|
+
"[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}"],
|
|
12593
|
+
"[:xdigit:]": ["A-Fa-f0-9"]
|
|
12602
12594
|
};
|
|
12603
12595
|
const braceEscape = (s) => s.replace(/[[\]\\-]/g, "\\$&");
|
|
12604
|
-
const
|
|
12605
|
-
const
|
|
12606
|
-
const
|
|
12596
|
+
const noMatch = /$./;
|
|
12597
|
+
const parseClass = (glob, position, nocase = false, form) => {
|
|
12598
|
+
const norm = (c) => {
|
|
12599
|
+
const n = form ? c.normalize(form) : c;
|
|
12600
|
+
return [...n].length === 1 ? n : c;
|
|
12601
|
+
};
|
|
12607
12602
|
const pos = position;
|
|
12608
12603
|
/* c8 ignore start */
|
|
12609
12604
|
if (glob.charAt(pos) !== "[") throw new Error("not in a brace expression");
|
|
@@ -12612,13 +12607,12 @@ const parseClass = (glob, position) => {
|
|
|
12612
12607
|
const negs = [];
|
|
12613
12608
|
let i = pos + 1;
|
|
12614
12609
|
let sawStart = false;
|
|
12615
|
-
let uflag = false;
|
|
12616
12610
|
let escaping = false;
|
|
12617
12611
|
let negate = false;
|
|
12618
12612
|
let endPos = pos;
|
|
12619
12613
|
let rangeStart = "";
|
|
12620
12614
|
WHILE: while (i < glob.length) {
|
|
12621
|
-
const c = glob.
|
|
12615
|
+
const c = String.fromCodePoint(glob.codePointAt(i));
|
|
12622
12616
|
if ((c === "!" || c === "^") && i === pos + 1) {
|
|
12623
12617
|
negate = true;
|
|
12624
12618
|
i++;
|
|
@@ -12637,607 +12631,644 @@ const parseClass = (glob, position) => {
|
|
|
12637
12631
|
}
|
|
12638
12632
|
}
|
|
12639
12633
|
if (c === "[" && !escaping) {
|
|
12640
|
-
for (const [cls, [unip,
|
|
12641
|
-
if (rangeStart) return [
|
|
12642
|
-
"$.",
|
|
12643
|
-
false,
|
|
12644
|
-
glob.length - pos,
|
|
12645
|
-
true
|
|
12646
|
-
];
|
|
12634
|
+
for (const [cls, [unip, neg]] of Object.entries(posixClasses)) if (glob.startsWith(cls, i)) {
|
|
12635
|
+
if (rangeStart) return [noMatch, glob.length - pos];
|
|
12647
12636
|
i += cls.length;
|
|
12648
12637
|
if (neg) negs.push(unip);
|
|
12649
12638
|
else ranges.push(unip);
|
|
12650
|
-
uflag = uflag || u;
|
|
12651
12639
|
continue WHILE;
|
|
12652
12640
|
}
|
|
12653
12641
|
}
|
|
12654
12642
|
escaping = false;
|
|
12643
|
+
const n = norm(c);
|
|
12655
12644
|
if (rangeStart) {
|
|
12656
|
-
if (
|
|
12657
|
-
else if (
|
|
12645
|
+
if (n.codePointAt(0) > rangeStart.codePointAt(0)) ranges.push(braceEscape(rangeStart) + "-" + braceEscape(n));
|
|
12646
|
+
else if (n === rangeStart) ranges.push(braceEscape(n));
|
|
12658
12647
|
rangeStart = "";
|
|
12659
|
-
i
|
|
12648
|
+
i += c.length;
|
|
12660
12649
|
continue;
|
|
12661
12650
|
}
|
|
12662
|
-
if (glob.startsWith("-]", i +
|
|
12663
|
-
ranges.push(braceEscape(
|
|
12664
|
-
i +=
|
|
12651
|
+
if (glob.startsWith("-]", i + c.length)) {
|
|
12652
|
+
ranges.push(braceEscape(n + "-"));
|
|
12653
|
+
i += c.length + 1;
|
|
12665
12654
|
continue;
|
|
12666
12655
|
}
|
|
12667
|
-
if (glob.startsWith("-", i +
|
|
12668
|
-
rangeStart =
|
|
12669
|
-
i +=
|
|
12656
|
+
if (glob.startsWith("-", i + c.length)) {
|
|
12657
|
+
rangeStart = n;
|
|
12658
|
+
i += c.length + 1;
|
|
12670
12659
|
continue;
|
|
12671
12660
|
}
|
|
12672
|
-
ranges.push(braceEscape(
|
|
12673
|
-
i
|
|
12661
|
+
ranges.push(braceEscape(n));
|
|
12662
|
+
i += c.length;
|
|
12674
12663
|
}
|
|
12675
|
-
if (endPos < i) return [
|
|
12676
|
-
|
|
12677
|
-
|
|
12678
|
-
|
|
12679
|
-
|
|
12680
|
-
];
|
|
12681
|
-
if (!ranges.length && !negs.length) return [
|
|
12682
|
-
"$.",
|
|
12683
|
-
false,
|
|
12684
|
-
glob.length - pos,
|
|
12685
|
-
true
|
|
12686
|
-
];
|
|
12687
|
-
if (negs.length === 0 && ranges.length === 1 && /^\\?.$/.test(ranges[0]) && !negate) {
|
|
12688
|
-
const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];
|
|
12689
|
-
return [
|
|
12690
|
-
regexpEscape(r),
|
|
12691
|
-
false,
|
|
12692
|
-
endPos - pos,
|
|
12693
|
-
false
|
|
12694
|
-
];
|
|
12695
|
-
}
|
|
12696
|
-
const sranges = "[" + (negate ? "^" : "") + rangesToString(ranges) + "]";
|
|
12697
|
-
const snegs = "[" + (negate ? "" : "^") + rangesToString(negs) + "]";
|
|
12698
|
-
return [
|
|
12699
|
-
ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs,
|
|
12700
|
-
uflag,
|
|
12701
|
-
endPos - pos,
|
|
12702
|
-
true
|
|
12703
|
-
];
|
|
12664
|
+
if (endPos < i) return [noMatch, 0];
|
|
12665
|
+
if (!ranges.length && !negs.length) return [noMatch, glob.length - pos];
|
|
12666
|
+
const sranges = "[" + (negate ? "^" : "") + ranges.join("") + "]";
|
|
12667
|
+
const snegs = "[" + (negate ? "" : "^") + negs.join("") + "]";
|
|
12668
|
+
const comb = "^" + (ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs);
|
|
12669
|
+
return [new RegExp(comb, nocase ? "iu" : "u"), endPos - pos];
|
|
12704
12670
|
};
|
|
12705
12671
|
//#endregion
|
|
12706
|
-
//#region node_modules/.pnpm
|
|
12707
|
-
|
|
12708
|
-
|
|
12709
|
-
|
|
12710
|
-
* If the {@link MinimatchOptions.windowsPathsNoEscape} option is used, then
|
|
12711
|
-
* square-bracket escapes are removed, but not backslash escapes.
|
|
12712
|
-
*
|
|
12713
|
-
* For example, it will turn the string `'[*]'` into `*`, but it will not
|
|
12714
|
-
* turn `'\\*'` into `'*'`, because `\` is a path separator in
|
|
12715
|
-
* `windowsPathsNoEscape` mode.
|
|
12716
|
-
*
|
|
12717
|
-
* When `windowsPathsNoEscape` is not set, then both square-bracket escapes and
|
|
12718
|
-
* backslash escapes are removed.
|
|
12719
|
-
*
|
|
12720
|
-
* Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
|
|
12721
|
-
* or unescaped.
|
|
12722
|
-
*
|
|
12723
|
-
* When `magicalBraces` is not set, escapes of braces (`{` and `}`) will not be
|
|
12724
|
-
* unescaped.
|
|
12725
|
-
*/
|
|
12726
|
-
const unescape = (s, { windowsPathsNoEscape = false, magicalBraces = true } = {}) => {
|
|
12727
|
-
if (magicalBraces) return windowsPathsNoEscape ? s.replace(/\[([^/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^/\\])\]/g, "$1$2").replace(/\\([^/])/g, "$1");
|
|
12728
|
-
return windowsPathsNoEscape ? s.replace(/\[([^/\\{}])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^/\\{}])\]/g, "$1$2").replace(/\\([^/{}])/g, "$1");
|
|
12672
|
+
//#region node_modules/.pnpm/@isaacs+nonrecursive-glob-match@1.0.3/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.js
|
|
12673
|
+
const MATCH = {
|
|
12674
|
+
t: "match",
|
|
12675
|
+
id: 0
|
|
12729
12676
|
};
|
|
12730
|
-
|
|
12731
|
-
|
|
12732
|
-
|
|
12733
|
-
|
|
12734
|
-
|
|
12735
|
-
|
|
12736
|
-
|
|
12737
|
-
|
|
12738
|
-
|
|
12739
|
-
|
|
12740
|
-
|
|
12741
|
-
|
|
12742
|
-
|
|
12743
|
-
|
|
12744
|
-
|
|
12745
|
-
|
|
12746
|
-
|
|
12747
|
-
|
|
12748
|
-
|
|
12749
|
-
|
|
12750
|
-
|
|
12751
|
-
|
|
12752
|
-
|
|
12753
|
-
]);
|
|
12754
|
-
|
|
12755
|
-
|
|
12756
|
-
|
|
12757
|
-
|
|
12758
|
-
|
|
12759
|
-
const
|
|
12760
|
-
|
|
12761
|
-
|
|
12762
|
-
|
|
12763
|
-
|
|
12764
|
-
|
|
12765
|
-
|
|
12766
|
-
"?",
|
|
12767
|
-
"@"
|
|
12768
|
-
]],
|
|
12769
|
-
["+", [
|
|
12770
|
-
"+",
|
|
12771
|
-
"@",
|
|
12772
|
-
"?",
|
|
12773
|
-
"*"
|
|
12774
|
-
]]
|
|
12775
|
-
]);
|
|
12776
|
-
const usurpMap = /* @__PURE__ */ new Map([
|
|
12777
|
-
["!", /* @__PURE__ */ new Map([["!", "@"]])],
|
|
12778
|
-
["?", /* @__PURE__ */ new Map([["*", "*"], ["+", "*"]])],
|
|
12779
|
-
["@", /* @__PURE__ */ new Map([
|
|
12780
|
-
["!", "!"],
|
|
12781
|
-
["?", "?"],
|
|
12782
|
-
["@", "@"],
|
|
12783
|
-
["*", "*"],
|
|
12784
|
-
["+", "+"]
|
|
12785
|
-
])],
|
|
12786
|
-
["+", /* @__PURE__ */ new Map([["?", "*"], ["*", "*"]])]
|
|
12787
|
-
]);
|
|
12788
|
-
const startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
|
|
12789
|
-
const startNoDot = "(?!\\.)";
|
|
12790
|
-
const addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
|
|
12791
|
-
const justDots = /* @__PURE__ */ new Set(["..", "."]);
|
|
12792
|
-
const reSpecials = /* @__PURE__ */ new Set("().*{}+?[]^$\\!");
|
|
12793
|
-
const regExpEscape$1 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
12794
|
-
const qmark = "[^/]";
|
|
12795
|
-
const star$1 = "[^/]*?";
|
|
12796
|
-
const starNoEmpty = "[^/]+?";
|
|
12797
|
-
let ID = 0;
|
|
12798
|
-
var AST = class {
|
|
12799
|
-
type;
|
|
12800
|
-
#root;
|
|
12801
|
-
#hasMagic;
|
|
12802
|
-
#uflag = false;
|
|
12803
|
-
#parts = [];
|
|
12804
|
-
#parent;
|
|
12805
|
-
#parentIndex;
|
|
12806
|
-
#negs;
|
|
12807
|
-
#filledNegs = false;
|
|
12808
|
-
#options;
|
|
12809
|
-
#toString;
|
|
12810
|
-
#emptyExt = false;
|
|
12811
|
-
id = ++ID;
|
|
12812
|
-
get depth() {
|
|
12813
|
-
return (this.#parent?.depth ?? -1) + 1;
|
|
12814
|
-
}
|
|
12815
|
-
[Symbol.for("nodejs.util.inspect.custom")]() {
|
|
12816
|
-
return {
|
|
12817
|
-
"@@type": "AST",
|
|
12818
|
-
id: this.id,
|
|
12819
|
-
type: this.type,
|
|
12820
|
-
root: this.#root.id,
|
|
12821
|
-
parent: this.#parent?.id,
|
|
12822
|
-
depth: this.depth,
|
|
12823
|
-
partsLength: this.#parts.length,
|
|
12824
|
-
parts: this.#parts
|
|
12825
|
-
};
|
|
12826
|
-
}
|
|
12827
|
-
constructor(type, parent, options = {}) {
|
|
12828
|
-
this.type = type;
|
|
12829
|
-
if (type) this.#hasMagic = true;
|
|
12830
|
-
this.#parent = parent;
|
|
12831
|
-
this.#root = this.#parent ? this.#parent.#root : this;
|
|
12832
|
-
this.#options = this.#root === this ? options : this.#root.#options;
|
|
12833
|
-
this.#negs = this.#root === this ? [] : this.#root.#negs;
|
|
12834
|
-
if (type === "!" && !this.#root.#filledNegs) this.#negs.push(this);
|
|
12835
|
-
this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0;
|
|
12836
|
-
}
|
|
12837
|
-
get hasMagic() {
|
|
12838
|
-
/* c8 ignore start */
|
|
12839
|
-
if (this.#hasMagic !== void 0) return this.#hasMagic;
|
|
12840
|
-
/* c8 ignore stop */
|
|
12841
|
-
for (const p of this.#parts) {
|
|
12842
|
-
if (typeof p === "string") continue;
|
|
12843
|
-
if (p.type || p.hasMagic) return this.#hasMagic = true;
|
|
12677
|
+
const extTypes = "!?+*@";
|
|
12678
|
+
const lit = (ch) => ({
|
|
12679
|
+
t: "lit",
|
|
12680
|
+
ch
|
|
12681
|
+
});
|
|
12682
|
+
const reEscape = (s) => s.replace(/[\\^$.*+?()[\]{}|/]/g, "\\$&");
|
|
12683
|
+
const newFoldRe = (s) => new RegExp(`^${reEscape(s)}$`, "iu");
|
|
12684
|
+
const foldCache = /* @__PURE__ */ new Map();
|
|
12685
|
+
const foldRe = (ch) => {
|
|
12686
|
+
let re = foldCache.get(ch);
|
|
12687
|
+
if (!re) {
|
|
12688
|
+
re = newFoldRe(ch);
|
|
12689
|
+
if (foldCache.size >= 1e3) foldCache.clear();
|
|
12690
|
+
foldCache.set(ch, re);
|
|
12691
|
+
}
|
|
12692
|
+
return re;
|
|
12693
|
+
};
|
|
12694
|
+
const litMatch = (l, c) => {
|
|
12695
|
+
if (c === l.ch) return true;
|
|
12696
|
+
if (!l.re) return false;
|
|
12697
|
+
const code = c.charCodeAt(0);
|
|
12698
|
+
if (code >= 128) return l.re.test(c);
|
|
12699
|
+
const ascii = l.ascii ??= /* @__PURE__ */ new Uint8Array(128);
|
|
12700
|
+
ascii[code] ||= l.re.test(c) ? 1 : 2;
|
|
12701
|
+
return ascii[code] === 1;
|
|
12702
|
+
};
|
|
12703
|
+
const tokenize = (p, nocase, noext, form) => {
|
|
12704
|
+
const toks = [];
|
|
12705
|
+
for (let i = 0; i < p.length;) {
|
|
12706
|
+
const c = String.fromCodePoint(p.codePointAt(i));
|
|
12707
|
+
if (c === "\\") {
|
|
12708
|
+
const e = p.codePointAt(i + 1);
|
|
12709
|
+
const ch = e === void 0 ? c : String.fromCodePoint(e);
|
|
12710
|
+
toks.push(lit(ch));
|
|
12711
|
+
i += 1 + ch.length;
|
|
12712
|
+
continue;
|
|
12844
12713
|
}
|
|
12845
|
-
|
|
12846
|
-
|
|
12847
|
-
|
|
12848
|
-
|
|
12849
|
-
|
|
12850
|
-
|
|
12851
|
-
|
|
12852
|
-
|
|
12853
|
-
|
|
12854
|
-
/* c8 ignore stop */
|
|
12855
|
-
this.toString();
|
|
12856
|
-
this.#filledNegs = true;
|
|
12857
|
-
let n;
|
|
12858
|
-
while (n = this.#negs.pop()) {
|
|
12859
|
-
if (n.type !== "!") continue;
|
|
12860
|
-
let p = n;
|
|
12861
|
-
let pp = p.#parent;
|
|
12862
|
-
while (pp) {
|
|
12863
|
-
for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) for (const part of n.#parts) {
|
|
12864
|
-
/* c8 ignore start */
|
|
12865
|
-
if (typeof part === "string") throw new Error("string part in extglob AST??");
|
|
12866
|
-
/* c8 ignore stop */
|
|
12867
|
-
part.copyIn(pp.#parts[i]);
|
|
12868
|
-
}
|
|
12869
|
-
p = pp;
|
|
12870
|
-
pp = p.#parent;
|
|
12714
|
+
if (c === "[") {
|
|
12715
|
+
const [re, consumed] = parseClass(p, i, nocase, form);
|
|
12716
|
+
if (consumed) {
|
|
12717
|
+
toks.push({
|
|
12718
|
+
t: "class",
|
|
12719
|
+
re
|
|
12720
|
+
});
|
|
12721
|
+
i += consumed;
|
|
12722
|
+
continue;
|
|
12871
12723
|
}
|
|
12872
12724
|
}
|
|
12873
|
-
|
|
12874
|
-
|
|
12875
|
-
|
|
12876
|
-
|
|
12877
|
-
|
|
12878
|
-
|
|
12879
|
-
|
|
12880
|
-
/* c8 ignore stop */
|
|
12881
|
-
this.#parts.push(p);
|
|
12725
|
+
if (!noext && extTypes.includes(c) && p[i + 1] === "(") {
|
|
12726
|
+
toks.push({
|
|
12727
|
+
t: "open",
|
|
12728
|
+
type: c
|
|
12729
|
+
});
|
|
12730
|
+
i += 2;
|
|
12731
|
+
continue;
|
|
12882
12732
|
}
|
|
12733
|
+
toks.push(!noext && c === "|" ? { t: "bar" } : !noext && c === ")" ? { t: "close" } : c === "*" ? { t: "star" } : c === "?" ? { t: "any" } : lit(c));
|
|
12734
|
+
i += c.length;
|
|
12883
12735
|
}
|
|
12884
|
-
|
|
12885
|
-
|
|
12886
|
-
|
|
12887
|
-
|
|
12888
|
-
|
|
12736
|
+
return toks;
|
|
12737
|
+
};
|
|
12738
|
+
const pair = (toks) => {
|
|
12739
|
+
const pairs = /* @__PURE__ */ new Map();
|
|
12740
|
+
const stack = [];
|
|
12741
|
+
toks.forEach((tok, i) => {
|
|
12742
|
+
if (tok.t === "open") stack.push(i);
|
|
12743
|
+
else if (tok.t === "close" && stack.length) pairs.set(stack.pop(), i);
|
|
12744
|
+
});
|
|
12745
|
+
return pairs;
|
|
12746
|
+
};
|
|
12747
|
+
const build = (toks, pairs, start, end, top) => {
|
|
12748
|
+
let seq = [];
|
|
12749
|
+
const alts = [seq];
|
|
12750
|
+
for (let i = start; i < end; i++) {
|
|
12751
|
+
const tok = toks[i];
|
|
12752
|
+
const close = pairs.get(i);
|
|
12753
|
+
if (tok.t === "open" && close !== void 0) {
|
|
12754
|
+
const sub = build(toks, pairs, i + 1, close, false);
|
|
12755
|
+
seq.push({
|
|
12756
|
+
t: "ext",
|
|
12757
|
+
type: tok.type,
|
|
12758
|
+
alts: sub
|
|
12759
|
+
});
|
|
12760
|
+
i = close;
|
|
12761
|
+
} else if (tok.t === "bar" && !top) alts.push(seq = []);
|
|
12762
|
+
else if (tok.t === "open") seq.push(lit(tok.type), lit("("));
|
|
12763
|
+
else if (tok.t === "bar") seq.push(lit("|"));
|
|
12764
|
+
else if (tok.t === "close") seq.push(lit(")"));
|
|
12765
|
+
else seq.push(tok);
|
|
12766
|
+
}
|
|
12767
|
+
return alts;
|
|
12768
|
+
};
|
|
12769
|
+
const normalize = (items, form) => {
|
|
12770
|
+
const out = [];
|
|
12771
|
+
let run = "";
|
|
12772
|
+
const flush = () => {
|
|
12773
|
+
for (const ch of run.normalize(form)) out.push(lit(ch));
|
|
12774
|
+
run = "";
|
|
12775
|
+
};
|
|
12776
|
+
for (const it of items) {
|
|
12777
|
+
if (it.t === "lit") {
|
|
12778
|
+
run += it.ch;
|
|
12779
|
+
continue;
|
|
12780
|
+
}
|
|
12781
|
+
flush();
|
|
12782
|
+
out.push(it.t === "ext" ? {
|
|
12783
|
+
...it,
|
|
12784
|
+
alts: it.alts.map((a) => normalize(a, form))
|
|
12785
|
+
} : it);
|
|
12889
12786
|
}
|
|
12890
|
-
|
|
12891
|
-
|
|
12892
|
-
|
|
12893
|
-
|
|
12894
|
-
|
|
12895
|
-
|
|
12896
|
-
|
|
12897
|
-
|
|
12787
|
+
flush();
|
|
12788
|
+
return out;
|
|
12789
|
+
};
|
|
12790
|
+
const compile = (items, nocase) => {
|
|
12791
|
+
let id = 1;
|
|
12792
|
+
const split = (out) => ({
|
|
12793
|
+
t: "split",
|
|
12794
|
+
id: id++,
|
|
12795
|
+
out
|
|
12796
|
+
});
|
|
12797
|
+
const seq = (items, next) => items.reduceRight((next, it) => item(it, next), next);
|
|
12798
|
+
const item = (it, next) => {
|
|
12799
|
+
switch (it.t) {
|
|
12800
|
+
case "lit":
|
|
12801
|
+
const re = nocase ? foldRe(it.ch) : void 0;
|
|
12802
|
+
return {
|
|
12803
|
+
t: "lit",
|
|
12804
|
+
id: id++,
|
|
12805
|
+
ch: it.ch,
|
|
12806
|
+
re,
|
|
12807
|
+
next
|
|
12808
|
+
};
|
|
12809
|
+
case "any":
|
|
12810
|
+
case "star": return {
|
|
12811
|
+
t: it.t,
|
|
12812
|
+
id: id++,
|
|
12813
|
+
next
|
|
12814
|
+
};
|
|
12815
|
+
case "class": return {
|
|
12816
|
+
t: "class",
|
|
12817
|
+
id: id++,
|
|
12818
|
+
re: it.re,
|
|
12819
|
+
next
|
|
12820
|
+
};
|
|
12898
12821
|
}
|
|
12822
|
+
const alts = (next) => it.alts.map((a) => seq(a, next));
|
|
12823
|
+
switch (it.type) {
|
|
12824
|
+
case "@": return split(alts(next));
|
|
12825
|
+
case "?": return split([next, ...alts(next)]);
|
|
12826
|
+
case "!": return {
|
|
12827
|
+
t: "neg",
|
|
12828
|
+
id: id++,
|
|
12829
|
+
sub: split(alts(MATCH)),
|
|
12830
|
+
next
|
|
12831
|
+
};
|
|
12832
|
+
}
|
|
12833
|
+
const after = split([]);
|
|
12834
|
+
const entry = split(alts(after));
|
|
12835
|
+
after.out.push(next, entry);
|
|
12836
|
+
return it.type === "*" ? after : entry;
|
|
12837
|
+
};
|
|
12838
|
+
return [seq(items, MATCH), id];
|
|
12839
|
+
};
|
|
12840
|
+
const show = (start) => {
|
|
12841
|
+
const lines = [];
|
|
12842
|
+
const seen = /* @__PURE__ */ new Set();
|
|
12843
|
+
const ref = (n) => n.t === "match" ? "match" : String(n.id);
|
|
12844
|
+
const walk = (n, indent) => {
|
|
12845
|
+
if (n.t === "match" || seen.has(n)) return;
|
|
12846
|
+
seen.add(n);
|
|
12847
|
+
const line = (desc) => lines.push(`${indent}${n.id}: ${desc}`);
|
|
12848
|
+
switch (n.t) {
|
|
12849
|
+
case "split":
|
|
12850
|
+
line(`split -> ${n.out.map(ref).join(", ")}`);
|
|
12851
|
+
for (const o of n.out) walk(o, indent);
|
|
12852
|
+
return;
|
|
12853
|
+
case "neg":
|
|
12854
|
+
line(`!(${ref(n.sub)}) -> ${ref(n.next)}`);
|
|
12855
|
+
walk(n.sub, indent + " ");
|
|
12856
|
+
return walk(n.next, indent);
|
|
12857
|
+
case "lit":
|
|
12858
|
+
line(`${JSON.stringify(n.ch)} -> ${ref(n.next)}`);
|
|
12859
|
+
break;
|
|
12860
|
+
case "class":
|
|
12861
|
+
line(`${n.re} -> ${ref(n.next)}`);
|
|
12862
|
+
break;
|
|
12863
|
+
default: line(`${n.t === "any" ? "?" : "*"} -> ${ref(n.next)}`);
|
|
12864
|
+
}
|
|
12865
|
+
walk(n.next, indent);
|
|
12866
|
+
};
|
|
12867
|
+
walk(start, "");
|
|
12868
|
+
return [`start -> ${ref(start)}`, ...lines].join("\n");
|
|
12869
|
+
};
|
|
12870
|
+
var State = class {
|
|
12871
|
+
gen;
|
|
12872
|
+
threads = [];
|
|
12873
|
+
match = false;
|
|
12874
|
+
runs = [];
|
|
12875
|
+
ids = [];
|
|
12876
|
+
constructor(gen) {
|
|
12877
|
+
this.gen = gen;
|
|
12878
|
+
}
|
|
12879
|
+
get dead() {
|
|
12880
|
+
return !this.threads.length && !this.match && !this.runs.length;
|
|
12881
|
+
}
|
|
12882
|
+
};
|
|
12883
|
+
const sameState = (a, b) => {
|
|
12884
|
+
if (a.ids.length !== b.ids.length) return false;
|
|
12885
|
+
if (a.runs.length !== b.runs.length) return false;
|
|
12886
|
+
if (a.ids.some((id, i) => id !== b.ids[i])) return false;
|
|
12887
|
+
return a.runs.every((r) => b.runs.some((o) => o.neg === r.neg && sameState(o.state, r.state)));
|
|
12888
|
+
};
|
|
12889
|
+
const marks = (size) => ({
|
|
12890
|
+
has: new Float64Array(size),
|
|
12891
|
+
seen: new Float64Array(size),
|
|
12892
|
+
gen: 0
|
|
12893
|
+
});
|
|
12894
|
+
var Sim = class {
|
|
12895
|
+
dots;
|
|
12896
|
+
dotStart;
|
|
12897
|
+
#marks;
|
|
12898
|
+
constructor(dots, dotStart, marks) {
|
|
12899
|
+
this.dots = dots;
|
|
12900
|
+
this.dotStart = dotStart;
|
|
12901
|
+
this.#marks = marks;
|
|
12902
|
+
}
|
|
12903
|
+
state() {
|
|
12904
|
+
return new State(++this.#marks.gen);
|
|
12905
|
+
}
|
|
12906
|
+
done(state) {
|
|
12907
|
+
state.ids = state.threads.map((n) => n.id).sort((a, b) => a - b);
|
|
12908
|
+
if (state.match) state.ids.unshift(MATCH.id);
|
|
12909
|
+
return state;
|
|
12910
|
+
}
|
|
12911
|
+
#visit(state, node) {
|
|
12912
|
+
const { seen } = this.#marks;
|
|
12913
|
+
if (seen[node.id] === state.gen) return false;
|
|
12914
|
+
seen[node.id] = state.gen;
|
|
12899
12915
|
return true;
|
|
12900
12916
|
}
|
|
12901
|
-
|
|
12902
|
-
|
|
12903
|
-
if (
|
|
12904
|
-
|
|
12905
|
-
|
|
12906
|
-
|
|
12907
|
-
|
|
12908
|
-
|
|
12909
|
-
return this
|
|
12910
|
-
}
|
|
12911
|
-
|
|
12912
|
-
|
|
12913
|
-
|
|
12914
|
-
|
|
12915
|
-
|
|
12916
|
-
|
|
12917
|
-
|
|
12918
|
-
|
|
12919
|
-
|
|
12920
|
-
|
|
12921
|
-
|
|
12922
|
-
|
|
12923
|
-
|
|
12924
|
-
|
|
12925
|
-
|
|
12926
|
-
|
|
12927
|
-
|
|
12928
|
-
|
|
12929
|
-
|
|
12930
|
-
|
|
12931
|
-
|
|
12932
|
-
|
|
12933
|
-
|
|
12934
|
-
|
|
12935
|
-
}
|
|
12936
|
-
if (inBrace) {
|
|
12937
|
-
if (i === braceStart + 1) {
|
|
12938
|
-
if (c === "^" || c === "!") braceNeg = true;
|
|
12939
|
-
} else if (c === "]" && !(i === braceStart + 2 && braceNeg)) inBrace = false;
|
|
12940
|
-
acc += c;
|
|
12941
|
-
continue;
|
|
12942
|
-
} else if (c === "[") {
|
|
12943
|
-
inBrace = true;
|
|
12944
|
-
braceStart = i;
|
|
12945
|
-
braceNeg = false;
|
|
12946
|
-
acc += c;
|
|
12947
|
-
continue;
|
|
12948
|
-
}
|
|
12949
|
-
if (!opt.noext && isExtglobType(c) && str.charAt(i) === "(" && extDepth <= maxDepth) {
|
|
12950
|
-
ast.push(acc);
|
|
12951
|
-
acc = "";
|
|
12952
|
-
const ext = new _a(c, ast);
|
|
12953
|
-
i = _a.#parseAST(str, ext, i, opt, extDepth + 1);
|
|
12954
|
-
ast.push(ext);
|
|
12955
|
-
continue;
|
|
12956
|
-
}
|
|
12957
|
-
acc += c;
|
|
12958
|
-
}
|
|
12959
|
-
ast.push(acc);
|
|
12960
|
-
return i;
|
|
12917
|
+
#addThread(state, node) {
|
|
12918
|
+
const { has } = this.#marks;
|
|
12919
|
+
if (has[node.id] === state.gen) return false;
|
|
12920
|
+
has[node.id] = state.gen;
|
|
12921
|
+
state.threads.push(node);
|
|
12922
|
+
return true;
|
|
12923
|
+
}
|
|
12924
|
+
restricted(i, top) {
|
|
12925
|
+
return top && (this.dots || this.dotStart && i === 0);
|
|
12926
|
+
}
|
|
12927
|
+
add(state, node, i, top) {
|
|
12928
|
+
switch (node.t) {
|
|
12929
|
+
case "split":
|
|
12930
|
+
if (!this.#visit(state, node)) return;
|
|
12931
|
+
for (const o of node.out) this.add(state, o, i, top);
|
|
12932
|
+
return;
|
|
12933
|
+
case "neg":
|
|
12934
|
+
if (!this.#visit(state, node)) return;
|
|
12935
|
+
const sub = this.state();
|
|
12936
|
+
this.add(sub, node.sub, i, false);
|
|
12937
|
+
this.done(sub);
|
|
12938
|
+
return this.addRun(state, {
|
|
12939
|
+
t: "run",
|
|
12940
|
+
neg: node,
|
|
12941
|
+
state: sub
|
|
12942
|
+
}, i, top);
|
|
12943
|
+
case "star":
|
|
12944
|
+
if (this.restricted(i, top)) return;
|
|
12945
|
+
if (this.#addThread(state, node)) this.add(state, node.next, i, top);
|
|
12946
|
+
return;
|
|
12947
|
+
case "match":
|
|
12948
|
+
state.match = true;
|
|
12949
|
+
return;
|
|
12950
|
+
default: this.#addThread(state, node);
|
|
12961
12951
|
}
|
|
12962
|
-
|
|
12963
|
-
|
|
12964
|
-
const
|
|
12965
|
-
|
|
12966
|
-
|
|
12967
|
-
|
|
12968
|
-
|
|
12969
|
-
|
|
12970
|
-
|
|
12971
|
-
|
|
12972
|
-
|
|
12973
|
-
|
|
12974
|
-
|
|
12975
|
-
|
|
12976
|
-
|
|
12977
|
-
|
|
12978
|
-
|
|
12979
|
-
|
|
12980
|
-
|
|
12981
|
-
|
|
12982
|
-
|
|
12983
|
-
|
|
12984
|
-
|
|
12985
|
-
}
|
|
12986
|
-
/* c8 ignore stop */
|
|
12987
|
-
if (!opt.noext && isExtglobType(c) && str.charAt(i) === "(" && (extDepth <= maxDepth || ast && ast.#canAdoptType(c))) {
|
|
12988
|
-
const depthAdd = ast && ast.#canAdoptType(c) ? 0 : 1;
|
|
12989
|
-
part.push(acc);
|
|
12990
|
-
acc = "";
|
|
12991
|
-
const ext = new _a(c, part);
|
|
12992
|
-
part.push(ext);
|
|
12993
|
-
i = _a.#parseAST(str, ext, i, opt, extDepth + depthAdd);
|
|
12994
|
-
continue;
|
|
12995
|
-
}
|
|
12996
|
-
if (c === "|") {
|
|
12997
|
-
part.push(acc);
|
|
12998
|
-
acc = "";
|
|
12999
|
-
parts.push(part);
|
|
13000
|
-
part = new _a(null, ast);
|
|
12952
|
+
}
|
|
12953
|
+
addRun(state, run, i, top) {
|
|
12954
|
+
for (const r of state.runs) if (r.neg === run.neg && sameState(r.state, run.state)) return;
|
|
12955
|
+
state.runs.push(run);
|
|
12956
|
+
if (!run.state.match) this.add(state, run.neg.next, i, top);
|
|
12957
|
+
}
|
|
12958
|
+
step(state, c, i, top) {
|
|
12959
|
+
const next = this.state();
|
|
12960
|
+
for (const th of state.threads) switch (th.t) {
|
|
12961
|
+
case "lit":
|
|
12962
|
+
if (litMatch(th, c)) this.add(next, th.next, i + 1, top);
|
|
12963
|
+
break;
|
|
12964
|
+
case "any":
|
|
12965
|
+
if (!this.restricted(i, top)) this.add(next, th.next, i + 1, top);
|
|
12966
|
+
break;
|
|
12967
|
+
case "class":
|
|
12968
|
+
if (!this.restricted(i, top) && th.re.test(c)) this.add(next, th.next, i + 1, top);
|
|
12969
|
+
break;
|
|
12970
|
+
case "star": if (!this.restricted(i, top)) this.add(next, th, i + 1, top);
|
|
12971
|
+
}
|
|
12972
|
+
if (!this.restricted(i, top)) for (const run of state.runs) {
|
|
12973
|
+
if (run.state.dead) {
|
|
12974
|
+
this.addRun(next, run, i + 1, top);
|
|
13001
12975
|
continue;
|
|
13002
12976
|
}
|
|
13003
|
-
|
|
13004
|
-
|
|
13005
|
-
|
|
13006
|
-
|
|
13007
|
-
|
|
13008
|
-
|
|
13009
|
-
}
|
|
13010
|
-
acc += c;
|
|
13011
|
-
}
|
|
13012
|
-
ast.type = null;
|
|
13013
|
-
ast.#hasMagic = void 0;
|
|
13014
|
-
ast.#parts = [str.substring(pos - 1)];
|
|
13015
|
-
return i;
|
|
13016
|
-
}
|
|
13017
|
-
#canAdoptWithSpace(child) {
|
|
13018
|
-
return this.#canAdopt(child, adoptionWithSpaceMap);
|
|
13019
|
-
}
|
|
13020
|
-
#canAdopt(child, map = adoptionMap) {
|
|
13021
|
-
if (!child || typeof child !== "object" || child.type !== null || child.#parts.length !== 1 || this.type === null) return false;
|
|
13022
|
-
const gc = child.#parts[0];
|
|
13023
|
-
if (!gc || typeof gc !== "object" || gc.type === null) return false;
|
|
13024
|
-
return this.#canAdoptType(gc.type, map);
|
|
13025
|
-
}
|
|
13026
|
-
#canAdoptType(c, map = adoptionAnyMap) {
|
|
13027
|
-
return !!map.get(this.type)?.includes(c);
|
|
13028
|
-
}
|
|
13029
|
-
#adoptWithSpace(child, index) {
|
|
13030
|
-
const gc = child.#parts[0];
|
|
13031
|
-
const blank = new _a(null, gc, this.options);
|
|
13032
|
-
blank.#parts.push("");
|
|
13033
|
-
gc.push(blank);
|
|
13034
|
-
this.#adopt(child, index);
|
|
13035
|
-
}
|
|
13036
|
-
#adopt(child, index) {
|
|
13037
|
-
const gc = child.#parts[0];
|
|
13038
|
-
this.#parts.splice(index, 1, ...gc.#parts);
|
|
13039
|
-
for (const p of gc.#parts) if (typeof p === "object") p.#parent = this;
|
|
13040
|
-
this.#toString = void 0;
|
|
13041
|
-
}
|
|
13042
|
-
#canUsurpType(c) {
|
|
13043
|
-
return !!usurpMap.get(this.type)?.has(c);
|
|
13044
|
-
}
|
|
13045
|
-
#canUsurp(child) {
|
|
13046
|
-
if (!child || typeof child !== "object" || child.type !== null || child.#parts.length !== 1 || this.type === null || this.#parts.length !== 1) return false;
|
|
13047
|
-
const gc = child.#parts[0];
|
|
13048
|
-
if (!gc || typeof gc !== "object" || gc.type === null) return false;
|
|
13049
|
-
return this.#canUsurpType(gc.type);
|
|
13050
|
-
}
|
|
13051
|
-
#usurp(child) {
|
|
13052
|
-
const m = usurpMap.get(this.type);
|
|
13053
|
-
const gc = child.#parts[0];
|
|
13054
|
-
const nt = m?.get(gc.type);
|
|
13055
|
-
/* c8 ignore start - impossible */
|
|
13056
|
-
if (!nt) return false;
|
|
13057
|
-
/* c8 ignore stop */
|
|
13058
|
-
this.#parts = gc.#parts;
|
|
13059
|
-
for (const p of this.#parts) if (typeof p === "object") p.#parent = this;
|
|
13060
|
-
this.type = nt;
|
|
13061
|
-
this.#toString = void 0;
|
|
13062
|
-
this.#emptyExt = false;
|
|
13063
|
-
}
|
|
13064
|
-
static fromGlob(pattern, options = {}) {
|
|
13065
|
-
const ast = new _a(null, void 0, options);
|
|
13066
|
-
_a.#parseAST(pattern, ast, 0, options, 0);
|
|
13067
|
-
return ast;
|
|
13068
|
-
}
|
|
13069
|
-
toMMPattern() {
|
|
13070
|
-
/* c8 ignore start */
|
|
13071
|
-
if (this !== this.#root) return this.#root.toMMPattern();
|
|
13072
|
-
/* c8 ignore stop */
|
|
13073
|
-
const glob = this.toString();
|
|
13074
|
-
const [re, body, hasMagic, uflag] = this.toRegExpSource();
|
|
13075
|
-
if (!(hasMagic || this.#hasMagic || this.#options.nocase && !this.#options.nocaseMagicOnly && glob.toUpperCase() !== glob.toLowerCase())) return body;
|
|
13076
|
-
const flags = (this.#options.nocase ? "i" : "") + (uflag ? "u" : "");
|
|
13077
|
-
return Object.assign(new RegExp(`^${re}$`, flags), {
|
|
13078
|
-
_src: re,
|
|
13079
|
-
_glob: glob
|
|
13080
|
-
});
|
|
13081
|
-
}
|
|
13082
|
-
get options() {
|
|
13083
|
-
return this.#options;
|
|
13084
|
-
}
|
|
13085
|
-
toRegExpSource(allowDot) {
|
|
13086
|
-
const dot = allowDot ?? !!this.#options.dot;
|
|
13087
|
-
if (this.#root === this) {
|
|
13088
|
-
this.#flatten();
|
|
13089
|
-
this.#fillNegs();
|
|
13090
|
-
}
|
|
13091
|
-
if (!isExtglobAST(this)) {
|
|
13092
|
-
const noEmpty = this.isStart() && this.isEnd() && !this.#parts.some((s) => typeof s !== "string");
|
|
13093
|
-
const src = this.#parts.map((p) => {
|
|
13094
|
-
const [re, _, hasMagic, uflag] = typeof p === "string" ? _a.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot);
|
|
13095
|
-
this.#hasMagic = this.#hasMagic || hasMagic;
|
|
13096
|
-
this.#uflag = this.#uflag || uflag;
|
|
13097
|
-
return re;
|
|
13098
|
-
}).join("");
|
|
13099
|
-
let start = "";
|
|
13100
|
-
if (this.isStart()) {
|
|
13101
|
-
if (typeof this.#parts[0] === "string") {
|
|
13102
|
-
if (!(this.#parts.length === 1 && justDots.has(this.#parts[0]))) {
|
|
13103
|
-
const aps = addPatternStart;
|
|
13104
|
-
const needNoTrav = dot && aps.has(src.charAt(0)) || src.startsWith("\\.") && aps.has(src.charAt(2)) || src.startsWith("\\.\\.") && aps.has(src.charAt(4));
|
|
13105
|
-
const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
|
|
13106
|
-
start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : "";
|
|
13107
|
-
}
|
|
13108
|
-
}
|
|
13109
|
-
}
|
|
13110
|
-
let end = "";
|
|
13111
|
-
if (this.isEnd() && this.#root.#filledNegs && this.#parent?.type === "!") end = "(?:$|\\/)";
|
|
13112
|
-
return [
|
|
13113
|
-
start + src + end,
|
|
13114
|
-
unescape(src),
|
|
13115
|
-
this.#hasMagic = !!this.#hasMagic,
|
|
13116
|
-
this.#uflag
|
|
13117
|
-
];
|
|
12977
|
+
const sub = this.step(run.state, c, i, false);
|
|
12978
|
+
this.addRun(next, {
|
|
12979
|
+
t: "run",
|
|
12980
|
+
neg: run.neg,
|
|
12981
|
+
state: sub
|
|
12982
|
+
}, i + 1, top);
|
|
13118
12983
|
}
|
|
13119
|
-
|
|
13120
|
-
|
|
13121
|
-
|
|
13122
|
-
|
|
13123
|
-
|
|
13124
|
-
|
|
13125
|
-
|
|
13126
|
-
|
|
13127
|
-
|
|
13128
|
-
|
|
13129
|
-
|
|
13130
|
-
|
|
13131
|
-
|
|
13132
|
-
|
|
13133
|
-
|
|
12984
|
+
return this.done(next);
|
|
12985
|
+
}
|
|
12986
|
+
};
|
|
12987
|
+
const stateKey = (state) => {
|
|
12988
|
+
const ids = state.ids.join();
|
|
12989
|
+
if (!state.runs.length) return ids;
|
|
12990
|
+
return `${ids}|${state.runs.map((r) => `${r.neg.id}(${stateKey(r.state)})`).sort().join("|")}`;
|
|
12991
|
+
};
|
|
12992
|
+
const DFA_BUDGET = 1 << 18;
|
|
12993
|
+
var Dfa = class {
|
|
12994
|
+
#start;
|
|
12995
|
+
#states = /* @__PURE__ */ new Map();
|
|
12996
|
+
#size = 0;
|
|
12997
|
+
#plain;
|
|
12998
|
+
#dotStart;
|
|
12999
|
+
#sim;
|
|
13000
|
+
#dotSim;
|
|
13001
|
+
constructor(start, marks) {
|
|
13002
|
+
this.#start = start;
|
|
13003
|
+
this.#sim = new Sim(false, false, marks);
|
|
13004
|
+
this.#dotSim = new Sim(false, true, marks);
|
|
13005
|
+
}
|
|
13006
|
+
#make(state) {
|
|
13007
|
+
return {
|
|
13008
|
+
state,
|
|
13009
|
+
match: state.match,
|
|
13010
|
+
dead: state.dead,
|
|
13011
|
+
next: /* @__PURE__ */ new Map()
|
|
13012
|
+
};
|
|
13013
|
+
}
|
|
13014
|
+
#intern(state) {
|
|
13015
|
+
const key = stateKey(state);
|
|
13016
|
+
const found = this.#states.get(key);
|
|
13017
|
+
if (found) return found;
|
|
13018
|
+
if (this.#size > DFA_BUDGET) this.#clear();
|
|
13019
|
+
const d = this.#make(state);
|
|
13020
|
+
this.#states.set(key, d);
|
|
13021
|
+
this.#size += key.length + 1;
|
|
13022
|
+
return d;
|
|
13023
|
+
}
|
|
13024
|
+
#clear() {
|
|
13025
|
+
this.#states.clear();
|
|
13026
|
+
this.#size = 0;
|
|
13027
|
+
this.#plain = void 0;
|
|
13028
|
+
this.#dotStart = void 0;
|
|
13029
|
+
}
|
|
13030
|
+
start(dotStart) {
|
|
13031
|
+
if (dotStart) {
|
|
13032
|
+
if (this.#dotStart) return this.#dotStart;
|
|
13033
|
+
const state = this.#dotSim.state();
|
|
13034
|
+
this.#dotSim.add(state, this.#start, 0, true);
|
|
13035
|
+
return this.#dotStart = this.#make(this.#dotSim.done(state));
|
|
13036
|
+
}
|
|
13037
|
+
if (this.#plain) return this.#plain;
|
|
13038
|
+
const state = this.#sim.state();
|
|
13039
|
+
this.#sim.add(state, this.#start, 0, true);
|
|
13040
|
+
return this.#plain = this.#intern(this.#sim.done(state));
|
|
13041
|
+
}
|
|
13042
|
+
next(d, c) {
|
|
13043
|
+
const code = c.charCodeAt(0);
|
|
13044
|
+
const found = code < 128 ? void 0 : d.next.get(c);
|
|
13045
|
+
if (found) return found;
|
|
13046
|
+
const n = d === this.#dotStart ? this.#intern(this.#dotSim.step(d.state, c, 0, true)) : this.#intern(this.#sim.step(d.state, c, 1, true));
|
|
13047
|
+
if (code < 128) {
|
|
13048
|
+
if (!d.ascii) {
|
|
13049
|
+
d.ascii = new Array(128);
|
|
13050
|
+
this.#size += 128;
|
|
13051
|
+
}
|
|
13052
|
+
d.ascii[code] = n;
|
|
13053
|
+
} else d.next.set(c, n);
|
|
13054
|
+
this.#size++;
|
|
13055
|
+
return n;
|
|
13056
|
+
}
|
|
13057
|
+
};
|
|
13058
|
+
const linear = (start) => {
|
|
13059
|
+
const nodes = [];
|
|
13060
|
+
for (let n = start; n.t !== "match"; n = n.next) {
|
|
13061
|
+
if (n.t === "split" || n.t === "neg") return void 0;
|
|
13062
|
+
nodes.push(n);
|
|
13063
|
+
}
|
|
13064
|
+
return nodes;
|
|
13065
|
+
};
|
|
13066
|
+
const testLinear = (nodes, chars, start, end) => {
|
|
13067
|
+
let ni = 0;
|
|
13068
|
+
let ci = start;
|
|
13069
|
+
let starNi = -1;
|
|
13070
|
+
let starCi = 0;
|
|
13071
|
+
while (ci < end) {
|
|
13072
|
+
const n = nodes[ni];
|
|
13073
|
+
if (n?.t === "star") {
|
|
13074
|
+
starNi = ni++;
|
|
13075
|
+
starCi = ci;
|
|
13076
|
+
continue;
|
|
13134
13077
|
}
|
|
13135
|
-
|
|
13136
|
-
if (
|
|
13137
|
-
|
|
13138
|
-
|
|
13139
|
-
|
|
13140
|
-
else {
|
|
13141
|
-
const close = this.type === "!" ? "))" + (this.isStart() && !dot && !allowDot ? startNoDot : "") + "[^/]*?)" : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && bodyDotAllowed ? ")" : this.type === "*" && bodyDotAllowed ? `)?` : `)${this.type}`;
|
|
13142
|
-
final = start + body + close;
|
|
13143
|
-
}
|
|
13144
|
-
return [
|
|
13145
|
-
final,
|
|
13146
|
-
unescape(body),
|
|
13147
|
-
this.#hasMagic = !!this.#hasMagic,
|
|
13148
|
-
this.#uflag
|
|
13149
|
-
];
|
|
13150
|
-
}
|
|
13151
|
-
#flatten() {
|
|
13152
|
-
if (!isExtglobAST(this)) {
|
|
13153
|
-
for (const p of this.#parts) if (typeof p === "object") p.#flatten();
|
|
13154
|
-
} else {
|
|
13155
|
-
let iterations = 0;
|
|
13156
|
-
let done = false;
|
|
13157
|
-
do {
|
|
13158
|
-
done = true;
|
|
13159
|
-
for (let i = 0; i < this.#parts.length; i++) {
|
|
13160
|
-
const c = this.#parts[i];
|
|
13161
|
-
if (typeof c === "object") {
|
|
13162
|
-
c.#flatten();
|
|
13163
|
-
if (this.#canAdopt(c)) {
|
|
13164
|
-
done = false;
|
|
13165
|
-
this.#adopt(c, i);
|
|
13166
|
-
} else if (this.#canAdoptWithSpace(c)) {
|
|
13167
|
-
done = false;
|
|
13168
|
-
this.#adoptWithSpace(c, i);
|
|
13169
|
-
} else if (this.#canUsurp(c)) {
|
|
13170
|
-
done = false;
|
|
13171
|
-
this.#usurp(c);
|
|
13172
|
-
}
|
|
13173
|
-
}
|
|
13174
|
-
}
|
|
13175
|
-
} while (!done && ++iterations < 10);
|
|
13078
|
+
const c = chars[ci];
|
|
13079
|
+
if (n && (n.t === "any" || n.t === "lit" && litMatch(n, c) || n.t === "class" && n.re.test(c))) {
|
|
13080
|
+
ni++;
|
|
13081
|
+
ci++;
|
|
13082
|
+
continue;
|
|
13176
13083
|
}
|
|
13177
|
-
|
|
13084
|
+
if (starNi === -1) return false;
|
|
13085
|
+
ni = starNi + 1;
|
|
13086
|
+
ci = ++starCi;
|
|
13178
13087
|
}
|
|
13179
|
-
|
|
13180
|
-
|
|
13181
|
-
|
|
13182
|
-
|
|
13183
|
-
|
|
13184
|
-
|
|
13185
|
-
|
|
13186
|
-
|
|
13187
|
-
|
|
13188
|
-
|
|
13189
|
-
|
|
13190
|
-
|
|
13191
|
-
|
|
13192
|
-
|
|
13193
|
-
|
|
13194
|
-
|
|
13195
|
-
|
|
13196
|
-
|
|
13197
|
-
|
|
13198
|
-
|
|
13199
|
-
|
|
13200
|
-
|
|
13201
|
-
|
|
13202
|
-
|
|
13203
|
-
|
|
13204
|
-
|
|
13205
|
-
|
|
13206
|
-
|
|
13207
|
-
|
|
13208
|
-
|
|
13209
|
-
|
|
13210
|
-
|
|
13211
|
-
|
|
13212
|
-
|
|
13213
|
-
|
|
13214
|
-
|
|
13215
|
-
|
|
13216
|
-
|
|
13217
|
-
|
|
13218
|
-
|
|
13219
|
-
|
|
13220
|
-
|
|
13221
|
-
|
|
13222
|
-
|
|
13223
|
-
|
|
13224
|
-
|
|
13225
|
-
|
|
13226
|
-
|
|
13227
|
-
|
|
13228
|
-
|
|
13229
|
-
|
|
13230
|
-
|
|
13231
|
-
|
|
13232
|
-
|
|
13233
|
-
|
|
13234
|
-
|
|
13235
|
-
|
|
13088
|
+
while (nodes[ni]?.t === "star") ni++;
|
|
13089
|
+
return ni === nodes.length;
|
|
13090
|
+
};
|
|
13091
|
+
const lengths = (items) => {
|
|
13092
|
+
let min = 0;
|
|
13093
|
+
let max = 0;
|
|
13094
|
+
for (const it of items) {
|
|
13095
|
+
const [lo, hi] = itemLengths(it);
|
|
13096
|
+
min += lo;
|
|
13097
|
+
max += hi;
|
|
13098
|
+
}
|
|
13099
|
+
return [min, max];
|
|
13100
|
+
};
|
|
13101
|
+
const itemLengths = (it) => {
|
|
13102
|
+
if (it.t === "star") return [0, Infinity];
|
|
13103
|
+
if (it.t !== "ext") return [1, 1];
|
|
13104
|
+
if (it.type === "!") return [0, Infinity];
|
|
13105
|
+
const alts = it.alts.map(lengths);
|
|
13106
|
+
const min = Math.min(...alts.map((a) => a[0]));
|
|
13107
|
+
const max = Math.max(...alts.map((a) => a[1]));
|
|
13108
|
+
const loop = max === 0 ? 0 : Infinity;
|
|
13109
|
+
return it.type === "@" ? [min, max] : it.type === "?" ? [0, max] : it.type === "*" ? [0, loop] : [min, loop];
|
|
13110
|
+
};
|
|
13111
|
+
const hasAffix = (lits, chars, start) => {
|
|
13112
|
+
for (let j = 0; j < lits.length; j++) if (!litMatch(lits[j], chars[start + j])) return false;
|
|
13113
|
+
return true;
|
|
13114
|
+
};
|
|
13115
|
+
const slashOrSurrogate = /[/\ud800-\udfff]/;
|
|
13116
|
+
const surrogate = /[\ud800-\udfff]/;
|
|
13117
|
+
const codePoints = (s) => surrogate.test(s) ? [...s] : s;
|
|
13118
|
+
const noSlash = (s) => {
|
|
13119
|
+
if (s.includes("/")) throw new Error("can only match a single path portion, got: " + s);
|
|
13120
|
+
};
|
|
13121
|
+
var Matcher = class {
|
|
13122
|
+
pattern;
|
|
13123
|
+
options;
|
|
13124
|
+
#start;
|
|
13125
|
+
#size;
|
|
13126
|
+
#marks;
|
|
13127
|
+
#dotsSim;
|
|
13128
|
+
#literal;
|
|
13129
|
+
#literalFold = false;
|
|
13130
|
+
#literalRe;
|
|
13131
|
+
#linear;
|
|
13132
|
+
#wild = false;
|
|
13133
|
+
#min = 0;
|
|
13134
|
+
#max = Infinity;
|
|
13135
|
+
#prefix = [];
|
|
13136
|
+
#suffix = [];
|
|
13137
|
+
#prefixStr;
|
|
13138
|
+
#suffixStr;
|
|
13139
|
+
#affix = false;
|
|
13140
|
+
#dfa;
|
|
13141
|
+
#form;
|
|
13142
|
+
constructor(pattern, options = {}) {
|
|
13143
|
+
if (pattern.includes("/")) throw new Error("can only match a single path portion, got pattern: " + pattern);
|
|
13144
|
+
this.pattern = pattern;
|
|
13145
|
+
this.options = options;
|
|
13146
|
+
const { nocase = false, noext = false, normalize: n } = options;
|
|
13147
|
+
this.#form = n === true ? "NFC" : n || void 0;
|
|
13148
|
+
const literal = /^[?*+@]\(\)$/.test(pattern);
|
|
13149
|
+
const toks = tokenize(pattern, nocase, noext || literal, this.#form);
|
|
13150
|
+
let [items] = build(toks, pair(toks), 0, toks.length, true);
|
|
13151
|
+
if (this.#form) items = normalize(items, this.#form);
|
|
13152
|
+
const [start, size] = compile(items, nocase);
|
|
13153
|
+
this.#start = start;
|
|
13154
|
+
this.#size = size;
|
|
13155
|
+
if (items.every((it) => it.t === "lit")) {
|
|
13156
|
+
this.#literal = items.map((it) => it.ch).join("");
|
|
13157
|
+
this.#literalFold = nocase;
|
|
13158
|
+
} else {
|
|
13159
|
+
const lit = (it) => it.t !== "lit" ? void 0 : nocase ? {
|
|
13160
|
+
ch: it.ch,
|
|
13161
|
+
re: foldRe(it.ch)
|
|
13162
|
+
} : { ch: it.ch };
|
|
13163
|
+
for (const it of items) {
|
|
13164
|
+
const l = lit(it);
|
|
13165
|
+
if (!l) break;
|
|
13166
|
+
this.#prefix.push(l);
|
|
13167
|
+
}
|
|
13168
|
+
for (let j = items.length - 1; j >= 0; j--) {
|
|
13169
|
+
const l = lit(items[j]);
|
|
13170
|
+
if (!l) break;
|
|
13171
|
+
this.#suffix.unshift(l);
|
|
13172
|
+
}
|
|
13173
|
+
this.#affix = !!(this.#prefix.length || this.#suffix.length);
|
|
13174
|
+
if (!nocase) {
|
|
13175
|
+
this.#prefixStr = this.#prefix.map((l) => l.ch).join("");
|
|
13176
|
+
this.#suffixStr = this.#suffix.map((l) => l.ch).join("");
|
|
13177
|
+
}
|
|
13178
|
+
this.#linear = linear(this.#start)?.slice(this.#prefix.length, -this.#suffix.length || void 0);
|
|
13179
|
+
this.#wild = !!this.#linear?.every((n) => n.t === "star" || n.t === "any");
|
|
13180
|
+
const [min, max] = lengths(items);
|
|
13181
|
+
this.#min = min;
|
|
13182
|
+
this.#max = max;
|
|
13183
|
+
}
|
|
13184
|
+
}
|
|
13185
|
+
test(s) {
|
|
13186
|
+
if (this.#form) {
|
|
13187
|
+
noSlash(s);
|
|
13188
|
+
return this.#test(s.normalize(this.#form));
|
|
13189
|
+
}
|
|
13190
|
+
if (slashOrSurrogate.test(s)) {
|
|
13191
|
+
noSlash(s);
|
|
13192
|
+
return this.#test(s, [...s]);
|
|
13193
|
+
}
|
|
13194
|
+
return this.#test(s, s);
|
|
13195
|
+
}
|
|
13196
|
+
/**
|
|
13197
|
+
* The same as {@link Matcher#test}, but the string is not checked
|
|
13198
|
+
* for `/` chars, so the result for a string that has one is not
|
|
13199
|
+
* defined. Only use it for a string that is known to be one path
|
|
13200
|
+
* portion, such as a part of a path that was split on `/`. It can
|
|
13201
|
+
* be faster, because some patterns do not need to look at each char
|
|
13202
|
+
* of the string.
|
|
13203
|
+
*/
|
|
13204
|
+
testUnchecked(s) {
|
|
13205
|
+
return this.#test(this.#form ? s.normalize(this.#form) : s);
|
|
13206
|
+
}
|
|
13207
|
+
#test(s, chars) {
|
|
13208
|
+
if (this.#literal !== void 0) return this.#literalFold ? (this.#literalRe ??= newFoldRe(this.#literal)).test(s) : s === this.#literal;
|
|
13209
|
+
const min = this.#min;
|
|
13210
|
+
const max = this.#max;
|
|
13211
|
+
if (chars === void 0) {
|
|
13212
|
+
const most = s.length;
|
|
13213
|
+
const least = most + 1 >> 1;
|
|
13214
|
+
if (most < min || least > max) return false;
|
|
13215
|
+
if (least < min || most > max) chars = codePoints(s);
|
|
13216
|
+
}
|
|
13217
|
+
if (chars !== void 0 && (chars.length < min || chars.length > max)) return false;
|
|
13218
|
+
const prefix = this.#prefix.length;
|
|
13219
|
+
if (this.#affix) {
|
|
13220
|
+
if (this.#prefixStr !== void 0 && this.#suffixStr !== void 0) {
|
|
13221
|
+
if (!s.startsWith(this.#prefixStr) || !s.endsWith(this.#suffixStr)) return false;
|
|
13222
|
+
} else {
|
|
13223
|
+
chars ??= codePoints(s);
|
|
13224
|
+
const end = chars.length - this.#suffix.length;
|
|
13225
|
+
if (!hasAffix(this.#prefix, chars, 0) || !hasAffix(this.#suffix, chars, end)) return false;
|
|
13226
|
+
}
|
|
13227
|
+
}
|
|
13228
|
+
const dotStart = !this.options.dot && s.startsWith(".");
|
|
13229
|
+
if (this.#linear) {
|
|
13230
|
+
if (s === "." || s === "..") return false;
|
|
13231
|
+
if (dotStart && !prefix) return false;
|
|
13232
|
+
if (this.#wild) return true;
|
|
13233
|
+
chars ??= codePoints(s);
|
|
13234
|
+
const end = chars.length - this.#suffix.length;
|
|
13235
|
+
return testLinear(this.#linear, chars, prefix, end);
|
|
13236
|
+
}
|
|
13237
|
+
chars ??= codePoints(s);
|
|
13238
|
+
if (s === "." || s === "..") {
|
|
13239
|
+
this.#marks ??= marks(this.#size);
|
|
13240
|
+
const sim = this.#dotsSim ??= new Sim(true, false, this.#marks);
|
|
13241
|
+
const start = sim.state();
|
|
13242
|
+
sim.add(start, this.#start, 0, true);
|
|
13243
|
+
let state = sim.done(start);
|
|
13244
|
+
for (let i = 0; i < chars.length; i++) state = sim.step(state, chars[i], i, true);
|
|
13245
|
+
return state.match;
|
|
13246
|
+
}
|
|
13247
|
+
this.#marks ??= marks(this.#size);
|
|
13248
|
+
const dfa = this.#dfa ??= new Dfa(this.#start, this.#marks);
|
|
13249
|
+
let d = dfa.start(dotStart);
|
|
13250
|
+
const str = chars === s;
|
|
13251
|
+
for (let i = 0; i < chars.length; i++) {
|
|
13252
|
+
if (d.dead) return false;
|
|
13253
|
+
const code = str ? s.charCodeAt(i) : chars[i].charCodeAt(0);
|
|
13254
|
+
d = d.ascii?.[code] ?? dfa.next(d, chars[i]);
|
|
13255
|
+
}
|
|
13256
|
+
return d.match;
|
|
13257
|
+
}
|
|
13258
|
+
/** a readable listing of the state machine */
|
|
13259
|
+
toString() {
|
|
13260
|
+
return show(this.#start);
|
|
13236
13261
|
}
|
|
13237
13262
|
};
|
|
13238
|
-
_a = AST;
|
|
13239
13263
|
//#endregion
|
|
13240
|
-
//#region node_modules/.pnpm/minimatch@
|
|
13264
|
+
//#region node_modules/.pnpm/minimatch@11.0.4/node_modules/minimatch/dist/esm/assert-valid-pattern.js
|
|
13265
|
+
const MAX_PATTERN_LENGTH = 65536;
|
|
13266
|
+
const assertValidPattern = (pattern) => {
|
|
13267
|
+
if (typeof pattern !== "string") throw new TypeError("invalid pattern");
|
|
13268
|
+
if (pattern.length > MAX_PATTERN_LENGTH) throw new TypeError("pattern is too long");
|
|
13269
|
+
};
|
|
13270
|
+
//#endregion
|
|
13271
|
+
//#region node_modules/.pnpm/minimatch@11.0.4/node_modules/minimatch/dist/esm/escape.js
|
|
13241
13272
|
/**
|
|
13242
13273
|
* Escape all magic characters in a glob pattern.
|
|
13243
13274
|
*
|
|
@@ -13255,62 +13286,52 @@ const escape = (s, { windowsPathsNoEscape = false, magicalBraces = false } = {})
|
|
|
13255
13286
|
return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
|
|
13256
13287
|
};
|
|
13257
13288
|
//#endregion
|
|
13258
|
-
//#region node_modules/.pnpm/minimatch@
|
|
13289
|
+
//#region node_modules/.pnpm/minimatch@11.0.4/node_modules/minimatch/dist/esm/unescape.js
|
|
13290
|
+
/**
|
|
13291
|
+
* Un-escape a string that has been escaped with {@link escape}.
|
|
13292
|
+
*
|
|
13293
|
+
* If the {@link MinimatchOptions.windowsPathsNoEscape} option is used, then
|
|
13294
|
+
* square-bracket escapes are removed, but not backslash escapes.
|
|
13295
|
+
*
|
|
13296
|
+
* For example, it will turn the string `'[*]'` into `*`, but it will not
|
|
13297
|
+
* turn `'\\*'` into `'*'`, because `\` is a path separator in
|
|
13298
|
+
* `windowsPathsNoEscape` mode.
|
|
13299
|
+
*
|
|
13300
|
+
* When `windowsPathsNoEscape` is not set, then both square-bracket escapes and
|
|
13301
|
+
* backslash escapes are removed.
|
|
13302
|
+
*
|
|
13303
|
+
* Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
|
|
13304
|
+
* or unescaped.
|
|
13305
|
+
*
|
|
13306
|
+
* When `magicalBraces` is not set, escapes of braces (`{` and `}`) will not be
|
|
13307
|
+
* unescaped.
|
|
13308
|
+
*/
|
|
13309
|
+
const unescape = (s, { windowsPathsNoEscape = false, magicalBraces = true } = {}) => {
|
|
13310
|
+
if (magicalBraces) return windowsPathsNoEscape ? s.replace(/\[([^/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^/\\])\]/g, "$1$2").replace(/\\([^/])/g, "$1");
|
|
13311
|
+
return windowsPathsNoEscape ? s.replace(/\[([^/\\{}])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^/\\{}])\]/g, "$1$2").replace(/\\([^/{}])/g, "$1");
|
|
13312
|
+
};
|
|
13313
|
+
//#endregion
|
|
13314
|
+
//#region node_modules/.pnpm/minimatch@11.0.4/node_modules/minimatch/dist/esm/index.js
|
|
13259
13315
|
const minimatch = (p, pattern, options = {}) => {
|
|
13260
13316
|
assertValidPattern(pattern);
|
|
13261
13317
|
if (!options.nocomment && pattern.charAt(0) === "#") return false;
|
|
13262
|
-
return
|
|
13263
|
-
};
|
|
13264
|
-
const starDotExtRE = /^\*+([^+@!?*[(]*)$/;
|
|
13265
|
-
const starDotExtTest = (ext) => (f) => !f.startsWith(".") && f.endsWith(ext);
|
|
13266
|
-
const starDotExtTestDot = (ext) => (f) => f.endsWith(ext);
|
|
13267
|
-
const starDotExtTestNocase = (ext) => {
|
|
13268
|
-
ext = ext.toLowerCase();
|
|
13269
|
-
return (f) => !f.startsWith(".") && f.toLowerCase().endsWith(ext);
|
|
13270
|
-
};
|
|
13271
|
-
const starDotExtTestNocaseDot = (ext) => {
|
|
13272
|
-
ext = ext.toLowerCase();
|
|
13273
|
-
return (f) => f.toLowerCase().endsWith(ext);
|
|
13274
|
-
};
|
|
13275
|
-
const starDotStarRE = /^\*+\.\*+$/;
|
|
13276
|
-
const starDotStarTest = (f) => !f.startsWith(".") && f.includes(".");
|
|
13277
|
-
const starDotStarTestDot = (f) => f !== "." && f !== ".." && f.includes(".");
|
|
13278
|
-
const dotStarRE = /^\.\*+$/;
|
|
13279
|
-
const dotStarTest = (f) => f !== "." && f !== ".." && f.startsWith(".");
|
|
13280
|
-
const starRE = /^\*+$/;
|
|
13281
|
-
const starTest = (f) => f.length !== 0 && !f.startsWith(".");
|
|
13282
|
-
const starTestDot = (f) => f.length !== 0 && f !== "." && f !== "..";
|
|
13283
|
-
const qmarksRE = /^\?+([^+@!?*[(]*)?$/;
|
|
13284
|
-
const qmarksTestNocase = ([$0, ext = ""]) => {
|
|
13285
|
-
const noext = qmarksTestNoExt([$0]);
|
|
13286
|
-
if (!ext) return noext;
|
|
13287
|
-
ext = ext.toLowerCase();
|
|
13288
|
-
return (f) => noext(f) && f.toLowerCase().endsWith(ext);
|
|
13289
|
-
};
|
|
13290
|
-
const qmarksTestNocaseDot = ([$0, ext = ""]) => {
|
|
13291
|
-
const noext = qmarksTestNoExtDot([$0]);
|
|
13292
|
-
if (!ext) return noext;
|
|
13293
|
-
ext = ext.toLowerCase();
|
|
13294
|
-
return (f) => noext(f) && f.toLowerCase().endsWith(ext);
|
|
13295
|
-
};
|
|
13296
|
-
const qmarksTestDot = ([$0, ext = ""]) => {
|
|
13297
|
-
const noext = qmarksTestNoExtDot([$0]);
|
|
13298
|
-
return !ext ? noext : (f) => noext(f) && f.endsWith(ext);
|
|
13318
|
+
return cachedMinimatch(pattern, options).match(p);
|
|
13299
13319
|
};
|
|
13300
|
-
const
|
|
13301
|
-
|
|
13302
|
-
|
|
13303
|
-
|
|
13304
|
-
|
|
13305
|
-
|
|
13306
|
-
|
|
13307
|
-
};
|
|
13308
|
-
|
|
13309
|
-
|
|
13310
|
-
|
|
13320
|
+
const cache = /* @__PURE__ */ new Map();
|
|
13321
|
+
const cacheMax = 256;
|
|
13322
|
+
const cachedMinimatch = (pattern, options) => {
|
|
13323
|
+
const key = pattern + "\0" + JSON.stringify(options);
|
|
13324
|
+
let mm = cache.get(key);
|
|
13325
|
+
if (mm) cache.delete(key);
|
|
13326
|
+
else {
|
|
13327
|
+
mm = new Minimatch(pattern, { ...options });
|
|
13328
|
+
if (cache.size >= cacheMax) cache.delete(cache.keys().next().value);
|
|
13329
|
+
}
|
|
13330
|
+
cache.set(key, mm);
|
|
13331
|
+
return mm;
|
|
13311
13332
|
};
|
|
13312
13333
|
/* c8 ignore start */
|
|
13313
|
-
const defaultPlatform = typeof process === "object" && process ?
|
|
13334
|
+
const defaultPlatform = typeof process === "object" && process ? process.env?.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
|
|
13314
13335
|
const path$1 = {
|
|
13315
13336
|
win32: { sep: "\\" },
|
|
13316
13337
|
posix: { sep: "/" }
|
|
@@ -13318,9 +13339,6 @@ const path$1 = {
|
|
|
13318
13339
|
minimatch.sep = defaultPlatform === "win32" ? path$1.win32.sep : path$1.posix.sep;
|
|
13319
13340
|
const GLOBSTAR = Symbol("globstar **");
|
|
13320
13341
|
minimatch.GLOBSTAR = GLOBSTAR;
|
|
13321
|
-
const star = "[^/]*?";
|
|
13322
|
-
const twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
|
|
13323
|
-
const twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
|
|
13324
13342
|
const filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
|
|
13325
13343
|
minimatch.filter = filter;
|
|
13326
13344
|
const ext = (a, b = {}) => Object.assign({}, a, b);
|
|
@@ -13337,21 +13355,10 @@ const defaults = (def) => {
|
|
|
13337
13355
|
return orig.defaults(ext(def, options)).Minimatch;
|
|
13338
13356
|
}
|
|
13339
13357
|
},
|
|
13340
|
-
AST: class AST extends orig.AST {
|
|
13341
|
-
/* c8 ignore start */
|
|
13342
|
-
constructor(type, parent, options = {}) {
|
|
13343
|
-
super(type, parent, ext(def, options));
|
|
13344
|
-
}
|
|
13345
|
-
/* c8 ignore stop */
|
|
13346
|
-
static fromGlob(pattern, options = {}) {
|
|
13347
|
-
return orig.AST.fromGlob(pattern, ext(def, options));
|
|
13348
|
-
}
|
|
13349
|
-
},
|
|
13350
13358
|
unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),
|
|
13351
13359
|
escape: (s, options = {}) => orig.escape(s, ext(def, options)),
|
|
13352
13360
|
filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),
|
|
13353
13361
|
defaults: (options) => orig.defaults(ext(def, options)),
|
|
13354
|
-
makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),
|
|
13355
13362
|
braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),
|
|
13356
13363
|
match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),
|
|
13357
13364
|
sep: orig.sep,
|
|
@@ -13365,8 +13372,6 @@ const braceExpand = (pattern, options = {}) => {
|
|
|
13365
13372
|
return expand(pattern, { max: options.braceExpandMax });
|
|
13366
13373
|
};
|
|
13367
13374
|
minimatch.braceExpand = braceExpand;
|
|
13368
|
-
const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
|
|
13369
|
-
minimatch.makeRe = makeRe;
|
|
13370
13375
|
const match = (list, pattern, options = {}) => {
|
|
13371
13376
|
const mm = new Minimatch(pattern, options);
|
|
13372
13377
|
list = list.filter((f) => mm.match(f));
|
|
@@ -13375,7 +13380,98 @@ const match = (list, pattern, options = {}) => {
|
|
|
13375
13380
|
};
|
|
13376
13381
|
minimatch.match = match;
|
|
13377
13382
|
const globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
|
|
13378
|
-
const
|
|
13383
|
+
const classEnd = (pattern, start) => {
|
|
13384
|
+
let i = start + 1;
|
|
13385
|
+
if (pattern.charAt(i) === "!" || pattern.charAt(i) === "^") i++;
|
|
13386
|
+
let sawStart = false;
|
|
13387
|
+
for (; i < pattern.length; i++) {
|
|
13388
|
+
const c = pattern.charAt(i);
|
|
13389
|
+
if (c === "]" && sawStart) return i;
|
|
13390
|
+
sawStart = true;
|
|
13391
|
+
if (c === "\\") i++;
|
|
13392
|
+
}
|
|
13393
|
+
return -1;
|
|
13394
|
+
};
|
|
13395
|
+
const literal = (pattern, noext) => {
|
|
13396
|
+
if (!noext && (pattern === "+()" || pattern === "@()")) return pattern;
|
|
13397
|
+
let lit = "";
|
|
13398
|
+
for (let i = 0; i < pattern.length; i++) {
|
|
13399
|
+
const c = pattern.charAt(i);
|
|
13400
|
+
if (c === "\\") lit += pattern.charAt(++i) || c;
|
|
13401
|
+
else if (c === "*" || c === "?") return;
|
|
13402
|
+
else if (c === "[") {
|
|
13403
|
+
const close = classEnd(pattern, i);
|
|
13404
|
+
if (close === -1) {
|
|
13405
|
+
lit += c;
|
|
13406
|
+
continue;
|
|
13407
|
+
}
|
|
13408
|
+
let body = pattern.slice(i + 1, close);
|
|
13409
|
+
if (body.startsWith("\\")) body = body.slice(1);
|
|
13410
|
+
if ([...body].length !== 1 || "!^".includes(pattern.charAt(i + 1))) return;
|
|
13411
|
+
lit += body;
|
|
13412
|
+
i = close;
|
|
13413
|
+
} else if (!noext && "+@!".includes(c) && pattern.charAt(i + 1) === "(" && pattern.includes(")", i + 2)) return;
|
|
13414
|
+
else lit += c;
|
|
13415
|
+
}
|
|
13416
|
+
return lit;
|
|
13417
|
+
};
|
|
13418
|
+
const extSafe = (pattern) => {
|
|
13419
|
+
if (/^[?*+@]\(\)$/.test(pattern) || pattern.includes("[:")) return false;
|
|
13420
|
+
let depth = 0;
|
|
13421
|
+
for (let i = 0; i < pattern.length; i++) {
|
|
13422
|
+
const c = pattern.charAt(i);
|
|
13423
|
+
if (c === "\\") {
|
|
13424
|
+
if (++i === pattern.length) return false;
|
|
13425
|
+
} else if (c === "[") {
|
|
13426
|
+
const close = classEnd(pattern, i);
|
|
13427
|
+
if (close !== -1) i = close;
|
|
13428
|
+
} else if ("+@!?*".includes(c) && pattern.charAt(i + 1) === "(") {
|
|
13429
|
+
depth++;
|
|
13430
|
+
i++;
|
|
13431
|
+
} else if (c === ")") {
|
|
13432
|
+
if (!depth--) return false;
|
|
13433
|
+
} else if (c === "|" && !depth) return false;
|
|
13434
|
+
}
|
|
13435
|
+
return !depth;
|
|
13436
|
+
};
|
|
13437
|
+
let lastSplit;
|
|
13438
|
+
let lastChecked;
|
|
13439
|
+
const portionMatch = (p, f) => typeof p === "string" ? f === p : f !== "" && p.testUnchecked(f);
|
|
13440
|
+
const endIndex = (p, last, lastStart, prev, prevStart) => portionMatch(p, last) ? lastStart : prev !== void 0 && portionMatch(p, prev) ? prevStart : -1;
|
|
13441
|
+
const isDots = (p) => p === "." || p === "..";
|
|
13442
|
+
const isDrive = (p) => typeof p === "string" && /^[a-z]:$/i.test(p);
|
|
13443
|
+
const isLongUNC = (p) => typeof p === "string" && /^unc$/i.test(p);
|
|
13444
|
+
const uncHost = (p) => {
|
|
13445
|
+
if (p[0] !== "" || p[1] !== "") return -1;
|
|
13446
|
+
const h = p[2] !== "?" ? 2 : isLongUNC(p[3]) ? 4 : -1;
|
|
13447
|
+
const host = p[h];
|
|
13448
|
+
const share = p[h + 1];
|
|
13449
|
+
return h !== -1 && host !== void 0 && host !== "" && host !== GLOBSTAR && share !== void 0 && share !== "" && share !== GLOBSTAR ? h : -1;
|
|
13450
|
+
};
|
|
13451
|
+
const walkable = (p, dot) => !isDots(p) && (dot || !p.startsWith("."));
|
|
13452
|
+
const dotPortion = (f, start, end, dot, sep) => {
|
|
13453
|
+
for (let k = start; k < end;) {
|
|
13454
|
+
if (f.charCodeAt(k) === 46) {
|
|
13455
|
+
if (!dot) return true;
|
|
13456
|
+
const n = f.charCodeAt(k + 1) === 46 ? k + 2 : k + 1;
|
|
13457
|
+
if (n >= end || isSep(f.charCodeAt(n), sep)) return true;
|
|
13458
|
+
}
|
|
13459
|
+
const s = nextSep(f, k, sep);
|
|
13460
|
+
if (s === -1) return false;
|
|
13461
|
+
k = s + 1;
|
|
13462
|
+
while (k < end && isSep(f.charCodeAt(k), sep)) k++;
|
|
13463
|
+
}
|
|
13464
|
+
return false;
|
|
13465
|
+
};
|
|
13466
|
+
const isSep = (c, sep) => sep === "/" ? c === 47 : sep === "\\" ? c === 92 : c === 47 || c === 92;
|
|
13467
|
+
const nextSep = (f, from, sep) => {
|
|
13468
|
+
if (sep !== "both") return f.indexOf(sep, from);
|
|
13469
|
+
const s = f.indexOf("/", from);
|
|
13470
|
+
const b = f.indexOf("\\", from);
|
|
13471
|
+
return s === -1 ? b : b === -1 ? s : Math.min(s, b);
|
|
13472
|
+
};
|
|
13473
|
+
const lastSep = (f, from, sep) => sep !== "both" ? f.lastIndexOf(sep, from) : Math.max(f.lastIndexOf("/", from), f.lastIndexOf("\\", from));
|
|
13474
|
+
const PENDING = {};
|
|
13379
13475
|
var Minimatch = class {
|
|
13380
13476
|
options;
|
|
13381
13477
|
set;
|
|
@@ -13394,7 +13490,16 @@ var Minimatch = class {
|
|
|
13394
13490
|
platform;
|
|
13395
13491
|
windowsNoMagicRoot;
|
|
13396
13492
|
maxGlobstarRecursion;
|
|
13397
|
-
|
|
13493
|
+
#endCheck;
|
|
13494
|
+
#literalCheck;
|
|
13495
|
+
#level2;
|
|
13496
|
+
#form;
|
|
13497
|
+
#literals = [];
|
|
13498
|
+
#shapes = [];
|
|
13499
|
+
#endRows = [];
|
|
13500
|
+
#matchers = /* @__PURE__ */ new Map();
|
|
13501
|
+
#pending = false;
|
|
13502
|
+
#globstarParts = /* @__PURE__ */ new WeakMap();
|
|
13398
13503
|
constructor(pattern, options = {}) {
|
|
13399
13504
|
assertValidPattern(pattern);
|
|
13400
13505
|
options = options || {};
|
|
@@ -13407,7 +13512,6 @@ var Minimatch = class {
|
|
|
13407
13512
|
this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options[awe] === false;
|
|
13408
13513
|
if (this.windowsPathsNoEscape) this.pattern = this.pattern.replace(/\\/g, "/");
|
|
13409
13514
|
this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;
|
|
13410
|
-
this.regexp = null;
|
|
13411
13515
|
this.negate = false;
|
|
13412
13516
|
this.nonegate = !!options.nonegate;
|
|
13413
13517
|
this.comment = false;
|
|
@@ -13418,14 +13522,45 @@ var Minimatch = class {
|
|
|
13418
13522
|
this.globSet = [];
|
|
13419
13523
|
this.globParts = [];
|
|
13420
13524
|
this.set = [];
|
|
13525
|
+
this.#endCheck = !this.preserveMultipleSlashes;
|
|
13526
|
+
this.#level2 = (options.optimizationLevel ?? 1) >= 2;
|
|
13527
|
+
const n = options.normalize;
|
|
13528
|
+
this.#form = n === true ? "NFC" : n || void 0;
|
|
13421
13529
|
this.make();
|
|
13530
|
+
const drives = this.set.map((row) => this.#rootIndex(row));
|
|
13531
|
+
this.#endRows = this.set.map((row, r) => this.#endCheck && row.length - 1 > drives[r]);
|
|
13532
|
+
this.#literals = this.set.map((row, r) => {
|
|
13533
|
+
const end = this.#endRows[r] ? row.length - 1 : row.length;
|
|
13534
|
+
const lits = row.slice(drives[r] + 1, end).filter((p) => typeof p === "string" && !!p);
|
|
13535
|
+
return [...new Set(lits)];
|
|
13536
|
+
});
|
|
13537
|
+
this.#literalCheck = this.#literals.some((l) => l.length);
|
|
13538
|
+
this.#shapes = this.set.map((row, r) => {
|
|
13539
|
+
const [p0, p1, p2] = row;
|
|
13540
|
+
if (this.#endRows[r] && row.length === 2) {
|
|
13541
|
+
if (p0 === GLOBSTAR && p1 !== GLOBSTAR) return "tail";
|
|
13542
|
+
}
|
|
13543
|
+
if (this.#endRows[r] && options.matchBase && row.length === 1 && p0 !== GLOBSTAR && p0 !== "") return "base";
|
|
13544
|
+
if (!this.#endCheck || drives[r] !== -1) return void 0;
|
|
13545
|
+
if (row.length === 3 && p0 === GLOBSTAR && p2 === GLOBSTAR && p1 !== GLOBSTAR && p1 !== "" && this.maxGlobstarRecursion > 0) return "mid";
|
|
13546
|
+
if (row.length === 2 && p1 === GLOBSTAR && p0 !== GLOBSTAR && p0 !== "") return "head";
|
|
13547
|
+
});
|
|
13548
|
+
}
|
|
13549
|
+
#norm(p) {
|
|
13550
|
+
return this.#form ? p.normalize(this.#form) : p;
|
|
13551
|
+
}
|
|
13552
|
+
#rootIndex(row) {
|
|
13553
|
+
if (!this.isWindows) return -1;
|
|
13554
|
+
if (isDrive(row[0])) return 0;
|
|
13555
|
+
if (row[0] === "" && row[1] === "" && row[2] === "?" && isDrive(row[3])) return 3;
|
|
13556
|
+
const h = uncHost(row);
|
|
13557
|
+
return h === -1 ? -1 : h + 1;
|
|
13422
13558
|
}
|
|
13423
13559
|
hasMagic() {
|
|
13424
13560
|
if (this.options.magicalBraces && this.set.length > 1) return true;
|
|
13425
13561
|
for (const pattern of this.set) for (const part of pattern) if (typeof part !== "string") return true;
|
|
13426
13562
|
return false;
|
|
13427
13563
|
}
|
|
13428
|
-
debug(..._) {}
|
|
13429
13564
|
make() {
|
|
13430
13565
|
const pattern = this.pattern;
|
|
13431
13566
|
const options = this.options;
|
|
@@ -13439,27 +13574,65 @@ var Minimatch = class {
|
|
|
13439
13574
|
}
|
|
13440
13575
|
this.parseNegate();
|
|
13441
13576
|
this.globSet = [...new Set(this.braceExpand())];
|
|
13442
|
-
|
|
13443
|
-
this.debug(this.pattern, this.globSet);
|
|
13444
|
-
const rawGlobParts = this.globSet.map((s) => this.slashSplit(s));
|
|
13577
|
+
const rawGlobParts = this.globSet.map((s) => this.#slashSplit(s));
|
|
13445
13578
|
this.globParts = this.preprocess(rawGlobParts);
|
|
13446
|
-
this
|
|
13579
|
+
this.#pending = true;
|
|
13447
13580
|
let set = this.globParts.map((s, _, __) => {
|
|
13448
13581
|
if (this.isWindows && this.windowsNoMagicRoot) {
|
|
13449
|
-
const
|
|
13582
|
+
const n = s[2] === "?" && isLongUNC(s[3]) ? 6 : 4;
|
|
13583
|
+
const isUNC = s[0] === "" && s[1] === "" && (s[2] === "?" || !globMagic.test(s[2])) && s.slice(3, n).every((p) => !globMagic.test(p));
|
|
13450
13584
|
const isDrive = /^[a-z]:/i.test(s[0]);
|
|
13451
|
-
if (isUNC) return [...s.slice(0,
|
|
13452
|
-
else if (isDrive) return [s[0], ...s.slice(1).map((ss) => this.parse(ss))];
|
|
13585
|
+
if (isUNC) return [...s.slice(0, n).map((p) => this.#norm(p)), ...s.slice(n).map((ss) => this.parse(ss))];
|
|
13586
|
+
else if (isDrive) return [this.#norm(s[0]), ...s.slice(1).map((ss) => this.parse(ss))];
|
|
13453
13587
|
}
|
|
13454
13588
|
return s.map((ss) => this.parse(ss));
|
|
13455
13589
|
});
|
|
13456
|
-
this.debug(this.pattern, set);
|
|
13457
13590
|
this.set = set.filter((s) => s.indexOf(false) === -1);
|
|
13458
13591
|
if (this.isWindows) for (let i = 0; i < this.set.length; i++) {
|
|
13459
13592
|
const p = this.set[i];
|
|
13460
|
-
if (p[0] === "" && p[1] === "" && this.globParts[i][2] === "?" &&
|
|
13593
|
+
if (p[0] === "" && p[1] === "" && this.globParts[i][2] === "?" && (isDrive(p[3]) || isLongUNC(this.globParts[i][3]))) {
|
|
13594
|
+
if (isLongUNC(this.globParts[i][3])) p[3] = "UNC";
|
|
13595
|
+
p[2] = "?";
|
|
13596
|
+
}
|
|
13597
|
+
}
|
|
13598
|
+
if (!options.noext) this.mergeRows();
|
|
13599
|
+
this.#pending = false;
|
|
13600
|
+
this.set.forEach((row, i) => {
|
|
13601
|
+
for (let k = 0; k < row.length; k++) if (row[k] === PENDING) row[k] = this.parse(this.globParts[i][k]);
|
|
13602
|
+
});
|
|
13603
|
+
}
|
|
13604
|
+
mergeRows() {
|
|
13605
|
+
let merged = true;
|
|
13606
|
+
while (merged) {
|
|
13607
|
+
merged = false;
|
|
13608
|
+
const len = Math.max(0, ...this.set.map((r) => r.length));
|
|
13609
|
+
for (let k = 0; k < len; k++) {
|
|
13610
|
+
const groups = /* @__PURE__ */ new Map();
|
|
13611
|
+
this.set.forEach((row, i) => {
|
|
13612
|
+
if (!(row[k] instanceof Matcher || row[k] === PENDING) || !extSafe(this.globParts[i][k])) return;
|
|
13613
|
+
const parts = [...this.globParts[i]];
|
|
13614
|
+
parts[k] = "";
|
|
13615
|
+
const key = `${row.length}/${parts.join("/")}`;
|
|
13616
|
+
const g = groups.get(key);
|
|
13617
|
+
if (g) g.push(i);
|
|
13618
|
+
else groups.set(key, [i]);
|
|
13619
|
+
});
|
|
13620
|
+
const drop = /* @__PURE__ */ new Set();
|
|
13621
|
+
for (const g of groups.values()) {
|
|
13622
|
+
if (g.length < 2) continue;
|
|
13623
|
+
const [first, ...rest] = g;
|
|
13624
|
+
const glob = `@(${g.map((i) => this.globParts[i][k]).join("|")})`;
|
|
13625
|
+
this.globParts[first][k] = glob;
|
|
13626
|
+
this.set[first][k] = this.parse(glob);
|
|
13627
|
+
for (const i of rest) drop.add(i);
|
|
13628
|
+
}
|
|
13629
|
+
if (drop.size) {
|
|
13630
|
+
merged = true;
|
|
13631
|
+
this.set = this.set.filter((_, i) => !drop.has(i));
|
|
13632
|
+
this.globParts = this.globParts.filter((_, i) => !drop.has(i));
|
|
13633
|
+
}
|
|
13634
|
+
}
|
|
13461
13635
|
}
|
|
13462
|
-
this.debug(this.pattern, this.set);
|
|
13463
13636
|
}
|
|
13464
13637
|
preprocess(globParts) {
|
|
13465
13638
|
if (this.options.noglobstar) {
|
|
@@ -13486,11 +13659,12 @@ var Minimatch = class {
|
|
|
13486
13659
|
}
|
|
13487
13660
|
levelOneOptimize(globParts) {
|
|
13488
13661
|
return globParts.map((parts) => {
|
|
13662
|
+
const root = this.#rootIndex(parts) + 1;
|
|
13489
13663
|
parts = parts.reduce((set, part) => {
|
|
13490
13664
|
const prev = set[set.length - 1];
|
|
13491
13665
|
if (part === "**" && prev === "**") return set;
|
|
13492
13666
|
if (part === "..") {
|
|
13493
|
-
if (prev && prev !== ".." && prev !== "." && prev !== "**") {
|
|
13667
|
+
if (set.length > root && prev && prev !== ".." && prev !== "." && prev !== "**") {
|
|
13494
13668
|
set.pop();
|
|
13495
13669
|
return set;
|
|
13496
13670
|
}
|
|
@@ -13501,8 +13675,120 @@ var Minimatch = class {
|
|
|
13501
13675
|
return parts.length === 0 ? [""] : parts;
|
|
13502
13676
|
});
|
|
13503
13677
|
}
|
|
13504
|
-
|
|
13505
|
-
|
|
13678
|
+
#canMatch(f) {
|
|
13679
|
+
const sep = !this.isWindows || !f.includes("\\") ? "/" : f.includes("/") ? "both" : "\\";
|
|
13680
|
+
let ends = this.#endCheck ? 0 : -1;
|
|
13681
|
+
let last = "";
|
|
13682
|
+
let lastStart = 0;
|
|
13683
|
+
let prev;
|
|
13684
|
+
let prevStart = 0;
|
|
13685
|
+
const dot = !!this.options.dot;
|
|
13686
|
+
ROWS: for (let r = 0; r < this.set.length; r++) {
|
|
13687
|
+
const row = this.set[r];
|
|
13688
|
+
const p = row[row.length - 1];
|
|
13689
|
+
let end = ends !== -1 && this.#endRows[r] && p !== GLOBSTAR;
|
|
13690
|
+
if (end && ends === 0) {
|
|
13691
|
+
const i = lastSep(f, f.length, sep);
|
|
13692
|
+
lastStart = i + 1;
|
|
13693
|
+
last = f.slice(lastStart);
|
|
13694
|
+
if (last === "" && i >= 0) {
|
|
13695
|
+
let j = i;
|
|
13696
|
+
while (j > 0 && isSep(f.charCodeAt(j - 1), sep)) j--;
|
|
13697
|
+
prevStart = j === 0 ? 0 : lastSep(f, j - 1, sep) + 1;
|
|
13698
|
+
prev = f.slice(prevStart, j);
|
|
13699
|
+
}
|
|
13700
|
+
const resolves = this.#level2 && (isDots(last) || last === "" && prev !== void 0 && isDots(prev));
|
|
13701
|
+
ends = resolves ? -1 : 1;
|
|
13702
|
+
end = !resolves;
|
|
13703
|
+
}
|
|
13704
|
+
let tailStart = -1;
|
|
13705
|
+
if (end && typeof p === "string") {
|
|
13706
|
+
tailStart = endIndex(p, last, lastStart, prev, prevStart);
|
|
13707
|
+
if (tailStart === -1) continue;
|
|
13708
|
+
}
|
|
13709
|
+
if (this.#literalCheck) {
|
|
13710
|
+
for (const l of this.#literals[r]) if (!f.includes(l)) continue ROWS;
|
|
13711
|
+
}
|
|
13712
|
+
if (end && typeof p === "object") {
|
|
13713
|
+
tailStart = endIndex(p, last, lastStart, prev, prevStart);
|
|
13714
|
+
if (tailStart === -1) continue;
|
|
13715
|
+
}
|
|
13716
|
+
const shape = this.#shapes[r];
|
|
13717
|
+
if (shape === "base" && end) return "yes";
|
|
13718
|
+
if (shape === "tail" && end) {
|
|
13719
|
+
if (this.#level2 && dotPortion(f, 0, tailStart, true, sep)) return "maybe";
|
|
13720
|
+
if (!dotPortion(f, 0, tailStart, dot, sep)) return "yes";
|
|
13721
|
+
continue;
|
|
13722
|
+
}
|
|
13723
|
+
if (shape === "mid" || shape === "head") {
|
|
13724
|
+
const m = this.#walk(f, row, shape === "head", dot, sep);
|
|
13725
|
+
if (m !== "no") return m;
|
|
13726
|
+
continue;
|
|
13727
|
+
}
|
|
13728
|
+
return "maybe";
|
|
13729
|
+
}
|
|
13730
|
+
return "no";
|
|
13731
|
+
}
|
|
13732
|
+
#matchShape(file, row, shape) {
|
|
13733
|
+
const dot = !!this.options.dot;
|
|
13734
|
+
const n = file.length;
|
|
13735
|
+
if (shape === "head") {
|
|
13736
|
+
if (n < 2 || !portionMatch(row[0], file[0])) return false;
|
|
13737
|
+
for (let i = 1; i < n; i++) if (!walkable(file[i], dot)) return false;
|
|
13738
|
+
return true;
|
|
13739
|
+
}
|
|
13740
|
+
const x = row[1];
|
|
13741
|
+
if (shape === "tail") {
|
|
13742
|
+
let t = n - 1;
|
|
13743
|
+
if (!portionMatch(x, file[t])) {
|
|
13744
|
+
if (file[t] !== "" || n === 1 || !portionMatch(x, file[--t])) return false;
|
|
13745
|
+
}
|
|
13746
|
+
for (let i = 0; i < t; i++) if (!walkable(file[i], dot)) return false;
|
|
13747
|
+
return true;
|
|
13748
|
+
}
|
|
13749
|
+
for (let k = 0; k < n; k++) {
|
|
13750
|
+
if (portionMatch(x, file[k]) && k + 1 < n) {
|
|
13751
|
+
let i = k + 1;
|
|
13752
|
+
while (i < n && walkable(file[i], dot)) i++;
|
|
13753
|
+
if (i === n) return true;
|
|
13754
|
+
}
|
|
13755
|
+
if (!walkable(file[k], dot)) return false;
|
|
13756
|
+
}
|
|
13757
|
+
return false;
|
|
13758
|
+
}
|
|
13759
|
+
#walk(f, row, head, dot, sep) {
|
|
13760
|
+
if (this.#level2 && dotPortion(f, 0, f.length, true, sep)) return "maybe";
|
|
13761
|
+
const x = row[head ? 0 : 1];
|
|
13762
|
+
let s = 0;
|
|
13763
|
+
for (let e = nextSep(f, s, sep); e !== -1; e = nextSep(f, s, sep)) {
|
|
13764
|
+
let next = e + 1;
|
|
13765
|
+
while (next < f.length && isSep(f.charCodeAt(next), sep)) next++;
|
|
13766
|
+
if ((typeof x === "string" ? e - s === x.length && f.startsWith(x, s) : e > s && x.testUnchecked(f.slice(s, e))) && !dotPortion(f, next, f.length, dot, sep)) return "yes";
|
|
13767
|
+
if (head || dotPortion(f, s, next, dot, sep)) return "no";
|
|
13768
|
+
s = next;
|
|
13769
|
+
}
|
|
13770
|
+
return "no";
|
|
13771
|
+
}
|
|
13772
|
+
#cachedSplit(f) {
|
|
13773
|
+
const last = lastSplit;
|
|
13774
|
+
return last?.f === f && last.isWindows === this.isWindows && last.preserveMultipleSlashes === this.preserveMultipleSlashes && last.normalize === this.#form ? last : void 0;
|
|
13775
|
+
}
|
|
13776
|
+
#split(f) {
|
|
13777
|
+
const { isWindows, preserveMultipleSlashes } = this;
|
|
13778
|
+
let parts = this.#slashSplit(isWindows ? f.split("\\").join("/") : f);
|
|
13779
|
+
const normalize = this.#form;
|
|
13780
|
+
if (normalize) parts = parts.map((p) => p.normalize(normalize));
|
|
13781
|
+
lastSplit = {
|
|
13782
|
+
f,
|
|
13783
|
+
isWindows,
|
|
13784
|
+
preserveMultipleSlashes,
|
|
13785
|
+
normalize,
|
|
13786
|
+
parts
|
|
13787
|
+
};
|
|
13788
|
+
return lastSplit;
|
|
13789
|
+
}
|
|
13790
|
+
#levelTwoFileOptimize(file) {
|
|
13791
|
+
const parts = [...file];
|
|
13506
13792
|
let didSomething = false;
|
|
13507
13793
|
do {
|
|
13508
13794
|
didSomething = false;
|
|
@@ -13521,19 +13807,21 @@ var Minimatch = class {
|
|
|
13521
13807
|
parts.pop();
|
|
13522
13808
|
}
|
|
13523
13809
|
}
|
|
13524
|
-
|
|
13810
|
+
const root = this.#rootIndex(parts) + 1;
|
|
13811
|
+
let dd = root;
|
|
13525
13812
|
while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
|
|
13526
13813
|
const p = parts[dd - 1];
|
|
13527
|
-
if (p && p !== "." && p !== ".." && p !== "**"
|
|
13814
|
+
if (p && p !== "." && p !== ".." && p !== "**") {
|
|
13528
13815
|
didSomething = true;
|
|
13529
13816
|
parts.splice(dd - 1, 2);
|
|
13530
|
-
dd
|
|
13817
|
+
dd = Math.max(dd - 2, root);
|
|
13531
13818
|
}
|
|
13532
13819
|
}
|
|
13533
13820
|
} while (didSomething);
|
|
13534
13821
|
return parts.length === 0 ? [""] : parts;
|
|
13535
13822
|
}
|
|
13536
13823
|
firstPhasePreProcess(globParts) {
|
|
13824
|
+
const { braceExpandMax = 1e5 } = this.options;
|
|
13537
13825
|
let didSomething = false;
|
|
13538
13826
|
do {
|
|
13539
13827
|
didSomething = false;
|
|
@@ -13547,7 +13835,7 @@ var Minimatch = class {
|
|
|
13547
13835
|
const p = parts[gs + 2];
|
|
13548
13836
|
const p2 = parts[gs + 3];
|
|
13549
13837
|
if (next !== "..") continue;
|
|
13550
|
-
if (!p || p === "." || p === ".." || !p2 || p2 === "." || p2 === "..") continue;
|
|
13838
|
+
if (!p || p === "." || p === ".." || !p2 || p2 === "." || p2 === ".." || globParts.length >= braceExpandMax) continue;
|
|
13551
13839
|
didSomething = true;
|
|
13552
13840
|
parts.splice(gs, 1);
|
|
13553
13841
|
const other = parts.slice(0);
|
|
@@ -13570,7 +13858,8 @@ var Minimatch = class {
|
|
|
13570
13858
|
parts.pop();
|
|
13571
13859
|
}
|
|
13572
13860
|
}
|
|
13573
|
-
|
|
13861
|
+
const root = this.#rootIndex(parts) + 1;
|
|
13862
|
+
let dd = root;
|
|
13574
13863
|
while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
|
|
13575
13864
|
const p = parts[dd - 1];
|
|
13576
13865
|
if (p && p !== "." && p !== ".." && p !== "**") {
|
|
@@ -13578,7 +13867,7 @@ var Minimatch = class {
|
|
|
13578
13867
|
const splin = dd === 1 && parts[dd + 1] === "**" ? ["."] : [];
|
|
13579
13868
|
parts.splice(dd - 1, 2, ...splin);
|
|
13580
13869
|
if (parts.length === 0) parts.push("");
|
|
13581
|
-
dd
|
|
13870
|
+
dd = Math.max(dd - 2, root);
|
|
13582
13871
|
}
|
|
13583
13872
|
}
|
|
13584
13873
|
}
|
|
@@ -13586,6 +13875,7 @@ var Minimatch = class {
|
|
|
13586
13875
|
return globParts;
|
|
13587
13876
|
}
|
|
13588
13877
|
secondPhasePreProcess(globParts) {
|
|
13878
|
+
if (globParts.length > 1e3) return globParts;
|
|
13589
13879
|
for (let i = 0; i < globParts.length - 1; i++) for (let j = i + 1; j < globParts.length; j++) {
|
|
13590
13880
|
const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
|
|
13591
13881
|
if (matched) {
|
|
@@ -13638,10 +13928,22 @@ var Minimatch = class {
|
|
|
13638
13928
|
if (negateOffset) this.pattern = pattern.slice(negateOffset);
|
|
13639
13929
|
this.negate = negate;
|
|
13640
13930
|
}
|
|
13641
|
-
|
|
13931
|
+
#matchRow(file, resolved, pattern, partial) {
|
|
13642
13932
|
let fileStartIndex = 0;
|
|
13643
13933
|
let patternStartIndex = 0;
|
|
13644
|
-
|
|
13934
|
+
const fh = this.isWindows ? uncHost(resolved) : -1;
|
|
13935
|
+
const ph = fh === -1 ? -1 : uncHost(pattern);
|
|
13936
|
+
if (ph !== -1) {
|
|
13937
|
+
const host = pattern[ph];
|
|
13938
|
+
const share = pattern[ph + 1];
|
|
13939
|
+
if (typeof host !== "string" || typeof share !== "string") {
|
|
13940
|
+
fileStartIndex = fh;
|
|
13941
|
+
patternStartIndex = ph;
|
|
13942
|
+
} else if (resolved[fh].toLowerCase() === host.toLowerCase() && resolved[fh + 1].toLowerCase() === share.toLowerCase()) {
|
|
13943
|
+
fileStartIndex = fh + 2;
|
|
13944
|
+
patternStartIndex = ph + 2;
|
|
13945
|
+
}
|
|
13946
|
+
} else if (this.isWindows) {
|
|
13645
13947
|
const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
|
|
13646
13948
|
const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
|
|
13647
13949
|
const patternDrive = typeof pattern[0] === "string" && /^[a-z]:$/i.test(pattern[0]);
|
|
@@ -13651,32 +13953,20 @@ var Minimatch = class {
|
|
|
13651
13953
|
if (typeof fdi === "number" && typeof pdi === "number") {
|
|
13652
13954
|
const [fd, pd] = [file[fdi], pattern[pdi]];
|
|
13653
13955
|
if (fd.toLowerCase() === pd.toLowerCase()) {
|
|
13654
|
-
|
|
13655
|
-
|
|
13656
|
-
fileStartIndex = fdi;
|
|
13956
|
+
patternStartIndex = pdi + 1;
|
|
13957
|
+
fileStartIndex = fdi + 1;
|
|
13657
13958
|
}
|
|
13658
13959
|
}
|
|
13659
13960
|
}
|
|
13660
|
-
|
|
13661
|
-
if (optimizationLevel >= 2) file = this.levelTwoFileOptimize(file);
|
|
13961
|
+
file = resolved;
|
|
13662
13962
|
if (pattern.includes(GLOBSTAR)) return this.#matchGlobstar(file, pattern, partial, fileStartIndex, patternStartIndex);
|
|
13663
13963
|
return this.#matchOne(file, pattern, partial, fileStartIndex, patternStartIndex);
|
|
13664
13964
|
}
|
|
13665
13965
|
#matchGlobstar(file, pattern, partial, fileIndex, patternIndex) {
|
|
13666
|
-
const
|
|
13667
|
-
const lastgs = pattern.lastIndexOf(GLOBSTAR);
|
|
13668
|
-
const [head, body, tail] = partial ? [
|
|
13669
|
-
pattern.slice(patternIndex, firstgs),
|
|
13670
|
-
pattern.slice(firstgs + 1),
|
|
13671
|
-
[]
|
|
13672
|
-
] : [
|
|
13673
|
-
pattern.slice(patternIndex, firstgs),
|
|
13674
|
-
pattern.slice(firstgs + 1, lastgs),
|
|
13675
|
-
pattern.slice(lastgs + 1)
|
|
13676
|
-
];
|
|
13966
|
+
const { head, body, tail, segments } = this.#getGlobstarParts(pattern, partial, patternIndex);
|
|
13677
13967
|
if (head.length) {
|
|
13678
|
-
const
|
|
13679
|
-
if (!this.#matchOne(
|
|
13968
|
+
const headEnd = fileIndex + head.length;
|
|
13969
|
+
if (!this.#matchOne(file, head, partial, fileIndex, 0, headEnd)) return false;
|
|
13680
13970
|
fileIndex += head.length;
|
|
13681
13971
|
patternIndex += head.length;
|
|
13682
13972
|
}
|
|
@@ -13701,67 +13991,86 @@ var Minimatch = class {
|
|
|
13701
13991
|
}
|
|
13702
13992
|
return partial || sawSome;
|
|
13703
13993
|
}
|
|
13704
|
-
|
|
13705
|
-
|
|
13994
|
+
return !!this.#matchGlobStarBodySections(file, segments, file.length - fileTailMatch, fileIndex, 0, partial, 0, !!fileTailMatch, /* @__PURE__ */ new Set());
|
|
13995
|
+
}
|
|
13996
|
+
#getGlobstarParts(pattern, partial, patternIndex) {
|
|
13997
|
+
let byStart = this.#globstarParts.get(pattern);
|
|
13998
|
+
if (!byStart) {
|
|
13999
|
+
byStart = [];
|
|
14000
|
+
this.#globstarParts.set(pattern, byStart);
|
|
14001
|
+
}
|
|
14002
|
+
const key = patternIndex * 2 + (partial ? 1 : 0);
|
|
14003
|
+
const found = byStart[key];
|
|
14004
|
+
if (found) return found;
|
|
14005
|
+
const firstgs = pattern.indexOf(GLOBSTAR, patternIndex);
|
|
14006
|
+
const lastgs = pattern.lastIndexOf(GLOBSTAR);
|
|
14007
|
+
const head = pattern.slice(patternIndex, firstgs);
|
|
14008
|
+
const body = pattern.slice(firstgs + 1, partial ? void 0 : lastgs);
|
|
14009
|
+
const tail = partial ? [] : pattern.slice(lastgs + 1);
|
|
14010
|
+
const segments = [[[], 0]];
|
|
14011
|
+
let current = segments[0];
|
|
13706
14012
|
let nonGsParts = 0;
|
|
13707
14013
|
const nonGsPartsSums = [0];
|
|
13708
14014
|
for (const b of body) if (b === GLOBSTAR) {
|
|
13709
14015
|
nonGsPartsSums.push(nonGsParts);
|
|
13710
|
-
|
|
13711
|
-
|
|
14016
|
+
current = [[], 0];
|
|
14017
|
+
segments.push(current);
|
|
13712
14018
|
} else {
|
|
13713
|
-
|
|
14019
|
+
current[0].push(b);
|
|
13714
14020
|
nonGsParts++;
|
|
13715
14021
|
}
|
|
13716
|
-
|
|
13717
|
-
|
|
13718
|
-
|
|
13719
|
-
|
|
14022
|
+
segments.forEach((b, i) => {
|
|
14023
|
+
b[1] = nonGsParts - nonGsPartsSums[i];
|
|
14024
|
+
});
|
|
14025
|
+
const parts = {
|
|
14026
|
+
head,
|
|
14027
|
+
body,
|
|
14028
|
+
tail,
|
|
14029
|
+
segments
|
|
14030
|
+
};
|
|
14031
|
+
byStart[key] = parts;
|
|
14032
|
+
return parts;
|
|
13720
14033
|
}
|
|
13721
|
-
#matchGlobStarBodySections(file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {
|
|
14034
|
+
#matchGlobStarBodySections(file, bodySegments, fileLength, fileIndex, bodyIndex, partial, globStarDepth, sawTail, tried) {
|
|
13722
14035
|
const bs = bodySegments[bodyIndex];
|
|
13723
14036
|
if (!bs) {
|
|
13724
|
-
|
|
14037
|
+
if (partial) return fileIndex >= fileLength || fileIndex === fileLength - 1 && file[fileIndex] === "";
|
|
14038
|
+
for (let i = fileIndex; i < fileLength; i++) {
|
|
13725
14039
|
sawTail = true;
|
|
13726
14040
|
const f = file[i];
|
|
13727
14041
|
if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) return false;
|
|
13728
14042
|
}
|
|
13729
14043
|
return sawTail;
|
|
13730
14044
|
}
|
|
13731
|
-
const [body,
|
|
14045
|
+
const [body, need] = bs;
|
|
14046
|
+
const after = partial ? fileLength : fileLength - need;
|
|
13732
14047
|
while (fileIndex <= after) {
|
|
13733
|
-
|
|
13734
|
-
|
|
14048
|
+
const key = bodyIndex * (file.length + 1) + fileIndex;
|
|
14049
|
+
if (tried.has(key)) return false;
|
|
14050
|
+
tried.add(key);
|
|
14051
|
+
if (this.#matchOne(file, body, partial, fileIndex, 0, fileIndex + body.length) && globStarDepth < this.maxGlobstarRecursion) {
|
|
14052
|
+
const sub = this.#matchGlobStarBodySections(file, bodySegments, fileLength, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail, tried);
|
|
13735
14053
|
if (sub !== false) return sub;
|
|
13736
14054
|
}
|
|
14055
|
+
if (fileIndex === after) break;
|
|
13737
14056
|
const f = file[fileIndex];
|
|
13738
14057
|
if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) return false;
|
|
13739
14058
|
fileIndex++;
|
|
13740
14059
|
}
|
|
13741
14060
|
return partial || null;
|
|
13742
14061
|
}
|
|
13743
|
-
#matchOne(file, pattern, partial, fileIndex, patternIndex) {
|
|
14062
|
+
#matchOne(file, pattern, partial, fileIndex, patternIndex, fileEnd = file.length) {
|
|
13744
14063
|
let fi;
|
|
13745
14064
|
let pi;
|
|
13746
14065
|
let pl;
|
|
13747
14066
|
let fl;
|
|
13748
|
-
for (fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
|
|
13749
|
-
this.debug("matchOne loop");
|
|
14067
|
+
for (fi = fileIndex, pi = patternIndex, fl = Math.min(fileEnd, file.length), pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
|
|
13750
14068
|
let p = pattern[pi];
|
|
13751
14069
|
let f = file[fi];
|
|
13752
|
-
this.debug(pattern, p, f);
|
|
13753
14070
|
/* c8 ignore start */
|
|
13754
14071
|
if (p === false || p === GLOBSTAR) return false;
|
|
13755
14072
|
/* c8 ignore stop */
|
|
13756
|
-
|
|
13757
|
-
if (typeof p === "string") {
|
|
13758
|
-
hit = f === p;
|
|
13759
|
-
this.debug("string match", p, f, hit);
|
|
13760
|
-
} else {
|
|
13761
|
-
hit = p.test(f);
|
|
13762
|
-
this.debug("pattern match", p, f, hit);
|
|
13763
|
-
}
|
|
13764
|
-
if (!hit) return false;
|
|
14073
|
+
if (!portionMatch(p, f)) return false;
|
|
13765
14074
|
}
|
|
13766
14075
|
if (fi === fl && pi === pl) return true;
|
|
13767
14076
|
else if (fi === fl) return partial;
|
|
@@ -13777,87 +14086,51 @@ var Minimatch = class {
|
|
|
13777
14086
|
const options = this.options;
|
|
13778
14087
|
if (pattern === "**") return GLOBSTAR;
|
|
13779
14088
|
if (pattern === "") return "";
|
|
13780
|
-
|
|
13781
|
-
|
|
13782
|
-
if (
|
|
13783
|
-
|
|
13784
|
-
|
|
13785
|
-
|
|
13786
|
-
|
|
13787
|
-
|
|
13788
|
-
|
|
13789
|
-
|
|
13790
|
-
|
|
13791
|
-
makeRe() {
|
|
13792
|
-
if (this.regexp || this.regexp === false) return this.regexp;
|
|
13793
|
-
const set = this.set;
|
|
13794
|
-
if (!set.length) {
|
|
13795
|
-
this.regexp = false;
|
|
13796
|
-
return this.regexp;
|
|
13797
|
-
}
|
|
13798
|
-
const options = this.options;
|
|
13799
|
-
const twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot;
|
|
13800
|
-
const flags = new Set(options.nocase ? ["i"] : []);
|
|
13801
|
-
let re = set.map((pattern) => {
|
|
13802
|
-
const pp = pattern.map((p) => {
|
|
13803
|
-
if (p instanceof RegExp) for (const f of p.flags.split("")) flags.add(f);
|
|
13804
|
-
return typeof p === "string" ? regExpEscape(p) : p === GLOBSTAR ? GLOBSTAR : p._src;
|
|
13805
|
-
});
|
|
13806
|
-
pp.forEach((p, i) => {
|
|
13807
|
-
const next = pp[i + 1];
|
|
13808
|
-
const prev = pp[i - 1];
|
|
13809
|
-
if (p !== GLOBSTAR || prev === GLOBSTAR) return;
|
|
13810
|
-
if (prev === void 0) {
|
|
13811
|
-
if (next !== void 0 && next !== GLOBSTAR) pp[i + 1] = "(?:\\/|" + twoStar + "\\/)?" + next;
|
|
13812
|
-
else pp[i] = twoStar;
|
|
13813
|
-
} else if (next === void 0) pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + ")?";
|
|
13814
|
-
else if (next !== GLOBSTAR) {
|
|
13815
|
-
pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
|
|
13816
|
-
pp[i + 1] = GLOBSTAR;
|
|
13817
|
-
}
|
|
14089
|
+
const { nocase, nocaseMagicOnly, noext = false, dot, normalize } = options;
|
|
14090
|
+
const lit = literal(pattern, noext);
|
|
14091
|
+
if (lit !== void 0 && !(nocase && !nocaseMagicOnly && pattern.toUpperCase() !== pattern.toLowerCase())) return this.#norm(lit);
|
|
14092
|
+
if (this.#pending) return PENDING;
|
|
14093
|
+
let m = this.#matchers.get(pattern);
|
|
14094
|
+
if (!m) {
|
|
14095
|
+
m = new Matcher(pattern, {
|
|
14096
|
+
nocase,
|
|
14097
|
+
noext,
|
|
14098
|
+
dot,
|
|
14099
|
+
normalize
|
|
13818
14100
|
});
|
|
13819
|
-
|
|
13820
|
-
if (this.partial && filtered.length >= 1) {
|
|
13821
|
-
const prefixes = [];
|
|
13822
|
-
for (let i = 1; i <= filtered.length; i++) prefixes.push(filtered.slice(0, i).join("/"));
|
|
13823
|
-
return "(?:" + prefixes.join("|") + ")";
|
|
13824
|
-
}
|
|
13825
|
-
return filtered.join("/");
|
|
13826
|
-
}).join("|");
|
|
13827
|
-
const [open, close] = set.length > 1 ? ["(?:", ")"] : ["", ""];
|
|
13828
|
-
re = "^" + open + re + close + "$";
|
|
13829
|
-
if (this.partial) re = "^(?:\\/|" + open + re.slice(1, -1) + close + ")$";
|
|
13830
|
-
if (this.negate) re = "^(?!" + re + ").+$";
|
|
13831
|
-
try {
|
|
13832
|
-
this.regexp = new RegExp(re, [...flags].join(""));
|
|
13833
|
-
} catch {
|
|
13834
|
-
this.regexp = false;
|
|
14101
|
+
this.#matchers.set(pattern, m);
|
|
13835
14102
|
}
|
|
13836
|
-
|
|
13837
|
-
return this.regexp;
|
|
14103
|
+
return m;
|
|
13838
14104
|
}
|
|
13839
|
-
slashSplit(p) {
|
|
14105
|
+
#slashSplit(p) {
|
|
13840
14106
|
if (this.preserveMultipleSlashes) return p.split("/");
|
|
13841
14107
|
else if (this.isWindows && /^\/\/[^/]+/.test(p)) return ["", ...p.split(/\/+/)];
|
|
13842
14108
|
else return p.split(/\/+/);
|
|
13843
14109
|
}
|
|
13844
14110
|
match(f, partial = this.partial) {
|
|
13845
|
-
this.debug("match", f, this.pattern);
|
|
13846
14111
|
if (this.comment) return false;
|
|
13847
14112
|
if (this.empty) return f === "";
|
|
13848
14113
|
if (f === "/" && partial) return true;
|
|
13849
14114
|
const options = this.options;
|
|
13850
|
-
|
|
13851
|
-
|
|
13852
|
-
|
|
14115
|
+
let split = this.#cachedSplit(f);
|
|
14116
|
+
if (!split) {
|
|
14117
|
+
if (!partial && !this.#form && (this.#endCheck || this.#literalCheck) && lastChecked !== f) {
|
|
14118
|
+
lastChecked = f;
|
|
14119
|
+
const can = this.#canMatch(f);
|
|
14120
|
+
if (can === "no") return options.flipNegate ? false : this.negate;
|
|
14121
|
+
if (can === "yes") return options.flipNegate ? true : !this.negate;
|
|
14122
|
+
}
|
|
14123
|
+
split = this.#split(f);
|
|
14124
|
+
}
|
|
14125
|
+
const ff = split.parts;
|
|
14126
|
+
const resolved = this.#level2 ? split.resolved ??= this.#levelTwoFileOptimize(ff) : ff;
|
|
13853
14127
|
const set = this.set;
|
|
13854
|
-
this.debug(this.pattern, "set", set);
|
|
13855
14128
|
let filename = ff[ff.length - 1];
|
|
13856
14129
|
if (!filename) for (let i = ff.length - 2; !filename && i >= 0; i--) filename = ff[i];
|
|
13857
|
-
for (
|
|
13858
|
-
|
|
13859
|
-
|
|
13860
|
-
if (this.
|
|
14130
|
+
for (let r = 0; r < set.length; r++) {
|
|
14131
|
+
const pattern = set[r];
|
|
14132
|
+
const shape = partial ? void 0 : this.#shapes[r];
|
|
14133
|
+
if (shape === "base" ? portionMatch(pattern[0], filename) : shape ? this.#matchShape(resolved, pattern, shape) : options.matchBase && pattern.length === 1 ? this.#matchRow([filename], [filename], pattern, partial) : this.#matchRow(ff, resolved, pattern, partial)) {
|
|
13861
14134
|
if (options.flipNegate) return true;
|
|
13862
14135
|
return !this.negate;
|
|
13863
14136
|
}
|
|
@@ -13870,7 +14143,6 @@ var Minimatch = class {
|
|
|
13870
14143
|
}
|
|
13871
14144
|
};
|
|
13872
14145
|
/* c8 ignore stop */
|
|
13873
|
-
minimatch.AST = AST;
|
|
13874
14146
|
minimatch.Minimatch = Minimatch;
|
|
13875
14147
|
minimatch.escape = escape;
|
|
13876
14148
|
minimatch.unescape = unescape;
|
|
@@ -14369,7 +14641,10 @@ function resolveWithTS(containingFile, source, ts, fs) {
|
|
|
14369
14641
|
}
|
|
14370
14642
|
}
|
|
14371
14643
|
function loadTSConfig(configPath, ts, fs, visited = /* @__PURE__ */ new Set()) {
|
|
14372
|
-
const parseConfigHost =
|
|
14644
|
+
const parseConfigHost = {
|
|
14645
|
+
...ts.sys,
|
|
14646
|
+
readDirectory: () => []
|
|
14647
|
+
};
|
|
14373
14648
|
const config = ts.parseJsonConfigFileContent(ts.readConfigFile(configPath, fs.readFile).config, parseConfigHost, (0, path.dirname)(configPath), void 0, configPath, void 0, void 0, extendedConfigCache);
|
|
14374
14649
|
const res = [config];
|
|
14375
14650
|
visited.add(configPath);
|
|
@@ -15195,7 +15470,8 @@ function transformDestructuredProps(ctx, vueImportAliases) {
|
|
|
15195
15470
|
else ctx.error("registerBinding called without active scope, something is wrong.", id);
|
|
15196
15471
|
}
|
|
15197
15472
|
function walkScope(node, isRoot = false) {
|
|
15198
|
-
|
|
15473
|
+
const body = node.type === "SwitchCase" ? node.consequent : node.body;
|
|
15474
|
+
for (const stmt of body) if (stmt.type === "VariableDeclaration") walkVariableDeclaration(stmt, isRoot);
|
|
15199
15475
|
else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") {
|
|
15200
15476
|
if (stmt.declare || !stmt.id) continue;
|
|
15201
15477
|
registerLocalBinding(stmt.id);
|
|
@@ -15253,10 +15529,15 @@ function transformDestructuredProps(ctx, vueImportAliases) {
|
|
|
15253
15529
|
}
|
|
15254
15530
|
return;
|
|
15255
15531
|
}
|
|
15532
|
+
if (node.type === "StaticBlock") {
|
|
15533
|
+
pushScope(true);
|
|
15534
|
+
walkFunctionScopeVarDeclarations(node);
|
|
15535
|
+
walkScope(node);
|
|
15536
|
+
return;
|
|
15537
|
+
}
|
|
15256
15538
|
if (node.type === "CatchClause") {
|
|
15257
15539
|
pushScope();
|
|
15258
|
-
if (node.param
|
|
15259
|
-
walkScope(node.body);
|
|
15540
|
+
if (node.param) for (const id of (0, _vue_compiler_dom.extractIdentifiers)(node.param)) registerLocalBinding(id);
|
|
15260
15541
|
return;
|
|
15261
15542
|
}
|
|
15262
15543
|
if (node.type === "ForOfStatement" || node.type === "ForInStatement" || node.type === "ForStatement") {
|
|
@@ -15280,9 +15561,13 @@ function transformDestructuredProps(ctx, vueImportAliases) {
|
|
|
15280
15561
|
leave(node, parent) {
|
|
15281
15562
|
parent && parentStack.pop();
|
|
15282
15563
|
if (node === currentModelOption) currentModelOption = null;
|
|
15283
|
-
if ((0, _vue_compiler_dom.isFunctionType)(node)) popScope(true);
|
|
15564
|
+
if ((0, _vue_compiler_dom.isFunctionType)(node) || node.type === "StaticBlock") popScope(true);
|
|
15284
15565
|
else if (node.type === "BlockStatement" && !(0, _vue_compiler_dom.isFunctionType)(parent)) popScope();
|
|
15285
|
-
else if (node.type === "CatchClause" || node.type === "ForOfStatement" || node.type === "ForInStatement" || node.type === "ForStatement") popScope();
|
|
15566
|
+
else if (node.type === "CatchClause" || node.type === "SwitchStatement" || node.type === "ForOfStatement" || node.type === "ForInStatement" || node.type === "ForStatement") popScope();
|
|
15567
|
+
if (parent && parent.type === "SwitchStatement" && node === parent.discriminant) {
|
|
15568
|
+
pushScope();
|
|
15569
|
+
for (const switchCase of parent.cases) walkScope(switchCase);
|
|
15570
|
+
}
|
|
15286
15571
|
}
|
|
15287
15572
|
});
|
|
15288
15573
|
}
|
|
@@ -15838,9 +16123,6 @@ function compileScript(sfc, options) {
|
|
|
15838
16123
|
if (propsDecl) runtimeOptions += `\n props: ${propsDecl},`;
|
|
15839
16124
|
const emitsDecl = genRuntimeEmits(ctx);
|
|
15840
16125
|
if (emitsDecl) runtimeOptions += `\n emits: ${emitsDecl},`;
|
|
15841
|
-
if (vapor && !ssr && sfc.template && !sfc.template.src) {
|
|
15842
|
-
if (isMultiRoot(sfc.template.ast, options.templateOptions?.compilerOptions)) runtimeOptions += `\n __multiRoot: true,`;
|
|
15843
|
-
}
|
|
15844
16126
|
let definedOptions = "";
|
|
15845
16127
|
if (ctx.optionsRuntimeDecl) definedOptions = scriptSetup.content.slice(ctx.optionsRuntimeDecl.start, ctx.optionsRuntimeDecl.end).trim();
|
|
15846
16128
|
if (!ctx.hasDefineExposeCall && !inlineMode) setupPreambleLines.push(`__expose();`);
|
|
@@ -16000,7 +16282,7 @@ function mergeSourceMaps(scriptMap, templateMap, templateLineOffset) {
|
|
|
16000
16282
|
}
|
|
16001
16283
|
//#endregion
|
|
16002
16284
|
//#region packages/compiler-sfc/src/index.ts
|
|
16003
|
-
const version = "3.6.0-rc.
|
|
16285
|
+
const version = "3.6.0-rc.15";
|
|
16004
16286
|
const parseCache = parseCache$1;
|
|
16005
16287
|
const errorMessages = {
|
|
16006
16288
|
..._vue_compiler_dom.errorMessages,
|