bejamas 0.4.0 → 0.5.0
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/README.md +8 -1
- package/dist/{generate-mdx-oWy6Hzgd.js → generate-mdx-Bd_qGcMg.js} +94 -46
- package/dist/generate-mdx-Bd_qGcMg.js.map +1 -0
- package/dist/index.js +598 -249
- package/dist/index.js.map +1 -1
- package/dist/{utils-otwzm7kH.js → utils-BEqgES6q.js} +1490 -1079
- package/dist/utils-BEqgES6q.js.map +1 -0
- package/package.json +16 -16
- package/src/tailwind.css +535 -3
- package/dist/generate-mdx-oWy6Hzgd.js.map +0 -1
- package/dist/utils-otwzm7kH.js.map +0 -1
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
2
|
import { createRequire as createRequire$1 } from "module";
|
|
3
|
-
import path from "node:path";
|
|
4
3
|
import { z } from "zod";
|
|
5
|
-
import path
|
|
4
|
+
import path, { dirname, extname, join, posix } from "path";
|
|
6
5
|
import { existsSync } from "fs";
|
|
7
|
-
import { readFileSync } from "node:fs";
|
|
8
|
-
import { fileURLToPath } from "node:url";
|
|
9
6
|
import fs from "fs-extra";
|
|
10
7
|
import fg from "fast-glob";
|
|
11
8
|
import { cyan, green, red, yellow } from "kleur/colors";
|
|
@@ -15,31 +12,33 @@ import ora from "ora";
|
|
|
15
12
|
import { readdir } from "fs/promises";
|
|
16
13
|
import { Project, SyntaxKind } from "ts-morph";
|
|
17
14
|
|
|
18
|
-
//#region
|
|
15
|
+
//#region \0rolldown/runtime.js
|
|
19
16
|
var __create = Object.create;
|
|
20
17
|
var __defProp = Object.defineProperty;
|
|
21
18
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
22
19
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
23
20
|
var __getProtoOf = Object.getPrototypeOf;
|
|
24
21
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
25
|
-
var
|
|
26
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
27
|
-
};
|
|
22
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
28
23
|
var __copyProps = (to, from, except, desc) => {
|
|
29
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
25
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
26
|
+
key = keys[i];
|
|
27
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
28
|
+
__defProp(to, key, {
|
|
29
|
+
get: ((k) => from[k]).bind(null, key),
|
|
30
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
35
34
|
}
|
|
36
35
|
return to;
|
|
37
36
|
};
|
|
38
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
37
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
39
38
|
value: mod,
|
|
40
39
|
enumerable: true
|
|
41
40
|
}) : target, mod));
|
|
42
|
-
var __require = /*
|
|
41
|
+
var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
43
42
|
|
|
44
43
|
//#endregion
|
|
45
44
|
//#region ../registry/src/catalog/themes.ts
|
|
@@ -1991,7 +1990,7 @@ const PRESET_ENCODERS = [
|
|
|
1991
1990
|
PRESET_VERSION_B_LEGACY,
|
|
1992
1991
|
PRESET_VERSION_C
|
|
1993
1992
|
];
|
|
1994
|
-
const PRESET_VERSION_MAP = new Map([["a", PRESET_VERSION_A], ["c", PRESET_VERSION_C]]);
|
|
1993
|
+
const PRESET_VERSION_MAP = /* @__PURE__ */ new Map([["a", PRESET_VERSION_A], ["c", PRESET_VERSION_C]]);
|
|
1995
1994
|
const VALID_VERSIONS = [
|
|
1996
1995
|
"a",
|
|
1997
1996
|
"b",
|
|
@@ -2107,8 +2106,8 @@ function decodePreset(code) {
|
|
|
2107
2106
|
const version = code[0];
|
|
2108
2107
|
if (!VALID_VERSIONS.includes(version)) return null;
|
|
2109
2108
|
if (version === "b") {
|
|
2110
|
-
const decoded
|
|
2111
|
-
return decoded
|
|
2109
|
+
const decoded = decodePresetWithVersion(code, shouldDecodeLegacyBejamasB(code) ? PRESET_VERSION_B_LEGACY : PRESET_VERSION_B_SHARED);
|
|
2110
|
+
return decoded ? normalizeDecodedPreset(decoded) : null;
|
|
2112
2111
|
}
|
|
2113
2112
|
const presetVersion = PRESET_VERSION_MAP.get(version);
|
|
2114
2113
|
if (!presetVersion) return null;
|
|
@@ -2240,7 +2239,7 @@ function getFontPackageName(name) {
|
|
|
2240
2239
|
return `@fontsource-variable/${name}`;
|
|
2241
2240
|
}
|
|
2242
2241
|
function getDocumentLanguage(config) {
|
|
2243
|
-
return config.rtl ? config.rtlLanguage :
|
|
2242
|
+
return config.rtl ? config.rtlLanguage : "en";
|
|
2244
2243
|
}
|
|
2245
2244
|
function getDocumentDirection(config) {
|
|
2246
2245
|
return config.rtl ? "rtl" : "ltr";
|
|
@@ -2290,7 +2289,9 @@ const SEMANTIC_ICON_NAMES = [
|
|
|
2290
2289
|
"globe",
|
|
2291
2290
|
"credit-card",
|
|
2292
2291
|
"x",
|
|
2293
|
-
"loader-circle"
|
|
2292
|
+
"loader-circle",
|
|
2293
|
+
"sun",
|
|
2294
|
+
"moon"
|
|
2294
2295
|
];
|
|
2295
2296
|
const ICON_DATA = {
|
|
2296
2297
|
lucide: {
|
|
@@ -2433,6 +2434,16 @@ const ICON_DATA = {
|
|
|
2433
2434
|
body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M21 12a9 9 0 1 1-6.219-8.56\"/>",
|
|
2434
2435
|
width: 24,
|
|
2435
2436
|
height: 24
|
|
2437
|
+
},
|
|
2438
|
+
"sun": {
|
|
2439
|
+
body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><circle cx=\"12\" cy=\"12\" r=\"4\"/><path d=\"M12 2v2m0 16v2M4.93 4.93l1.41 1.41m11.32 11.32l1.41 1.41M2 12h2m16 0h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41\"/></g>",
|
|
2440
|
+
width: 24,
|
|
2441
|
+
height: 24
|
|
2442
|
+
},
|
|
2443
|
+
"moon": {
|
|
2444
|
+
body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401\"/>",
|
|
2445
|
+
width: 24,
|
|
2446
|
+
height: 24
|
|
2436
2447
|
}
|
|
2437
2448
|
},
|
|
2438
2449
|
hugeicons: {
|
|
@@ -2575,6 +2586,16 @@ const ICON_DATA = {
|
|
|
2575
2586
|
body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\" d=\"M12 3v3m0 12v3m9-9h-3M6 12H3m15.364-6.363l-2.122 2.121m-8.484 8.484l-2.121 2.121m12.727.001l-2.122-2.122M7.758 7.758L5.637 5.637\"/>",
|
|
2576
2587
|
width: 24,
|
|
2577
2588
|
height: 24
|
|
2589
|
+
},
|
|
2590
|
+
"sun": {
|
|
2591
|
+
body: "<g fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"><path d=\"M17 12a5 5 0 1 1-10 0a5 5 0 0 1 10 0Z\"/><path stroke-linecap=\"round\" d=\"M12 2v1.5m0 17V22m7.07-2.929l-1.06-1.06M5.99 5.989L4.928 4.93M22 12h-1.5m-17 0H2m17.071-7.071l-1.06 1.06M5.99 18.011l-1.06 1.06\"/></g>",
|
|
2592
|
+
width: 24,
|
|
2593
|
+
height: 24
|
|
2594
|
+
},
|
|
2595
|
+
"moon": {
|
|
2596
|
+
body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M21.5 14.078A8.557 8.557 0 0 1 9.922 2.5C5.668 3.497 2.5 7.315 2.5 11.873a9.627 9.627 0 0 0 9.627 9.627c4.558 0 8.376-3.168 9.373-7.422\"/>",
|
|
2597
|
+
width: 24,
|
|
2598
|
+
height: 24
|
|
2578
2599
|
}
|
|
2579
2600
|
},
|
|
2580
2601
|
tabler: {
|
|
@@ -2717,6 +2738,16 @@ const ICON_DATA = {
|
|
|
2717
2738
|
body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M12 3a9 9 0 1 0 9 9\"/>",
|
|
2718
2739
|
width: 24,
|
|
2719
2740
|
height: 24
|
|
2741
|
+
},
|
|
2742
|
+
"sun": {
|
|
2743
|
+
body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M8 12a4 4 0 1 0 8 0a4 4 0 1 0-8 0m-5 0h1m8-9v1m8 8h1m-9 8v1M5.6 5.6l.7.7m12.1-.7l-.7.7m0 11.4l.7.7m-12.1-.7l-.7.7\"/>",
|
|
2744
|
+
width: 24,
|
|
2745
|
+
height: 24
|
|
2746
|
+
},
|
|
2747
|
+
"moon": {
|
|
2748
|
+
body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M12 3h.393a7.5 7.5 0 0 0 7.92 12.446A9 9 0 1 1 12 2.992z\"/>",
|
|
2749
|
+
width: 24,
|
|
2750
|
+
height: 24
|
|
2720
2751
|
}
|
|
2721
2752
|
},
|
|
2722
2753
|
phosphor: {
|
|
@@ -2859,6 +2890,16 @@ const ICON_DATA = {
|
|
|
2859
2890
|
body: "<path fill=\"currentColor\" d=\"M136 32v32a8 8 0 0 1-16 0V32a8 8 0 0 1 16 0m37.25 58.75a8 8 0 0 0 5.66-2.35l22.63-22.62a8 8 0 0 0-11.32-11.32L167.6 77.09a8 8 0 0 0 5.65 13.66M224 120h-32a8 8 0 0 0 0 16h32a8 8 0 0 0 0-16m-45.09 47.6a8 8 0 0 0-11.31 11.31l22.62 22.63a8 8 0 0 0 11.32-11.32ZM128 184a8 8 0 0 0-8 8v32a8 8 0 0 0 16 0v-32a8 8 0 0 0-8-8m-50.91-16.4l-22.63 22.62a8 8 0 0 0 11.32 11.32l22.62-22.63a8 8 0 0 0-11.31-11.31M72 128a8 8 0 0 0-8-8H32a8 8 0 0 0 0 16h32a8 8 0 0 0 8-8m-6.22-73.54a8 8 0 0 0-11.32 11.32L77.09 88.4A8 8 0 0 0 88.4 77.09Z\"/>",
|
|
2860
2891
|
width: 256,
|
|
2861
2892
|
height: 256
|
|
2893
|
+
},
|
|
2894
|
+
"sun": {
|
|
2895
|
+
body: "<path fill=\"currentColor\" d=\"M120 40V16a8 8 0 0 1 16 0v24a8 8 0 0 1-16 0m72 88a64 64 0 1 1-64-64a64.07 64.07 0 0 1 64 64m-16 0a48 48 0 1 0-48 48a48.05 48.05 0 0 0 48-48M58.34 69.66a8 8 0 0 0 11.32-11.32l-16-16a8 8 0 0 0-11.32 11.32Zm0 116.68l-16 16a8 8 0 0 0 11.32 11.32l16-16a8 8 0 0 0-11.32-11.32M192 72a8 8 0 0 0 5.66-2.34l16-16a8 8 0 0 0-11.32-11.32l-16 16A8 8 0 0 0 192 72m5.66 114.34a8 8 0 0 0-11.32 11.32l16 16a8 8 0 0 0 11.32-11.32ZM48 128a8 8 0 0 0-8-8H16a8 8 0 0 0 0 16h24a8 8 0 0 0 8-8m80 80a8 8 0 0 0-8 8v24a8 8 0 0 0 16 0v-24a8 8 0 0 0-8-8m112-88h-24a8 8 0 0 0 0 16h24a8 8 0 0 0 0-16\"/>",
|
|
2896
|
+
width: 256,
|
|
2897
|
+
height: 256
|
|
2898
|
+
},
|
|
2899
|
+
"moon": {
|
|
2900
|
+
body: "<path fill=\"currentColor\" d=\"M233.54 142.23a8 8 0 0 0-8-2a88.08 88.08 0 0 1-109.8-109.8a8 8 0 0 0-10-10a104.84 104.84 0 0 0-52.91 37A104 104 0 0 0 136 224a103.1 103.1 0 0 0 62.52-20.88a104.84 104.84 0 0 0 37-52.91a8 8 0 0 0-1.98-7.98m-44.64 48.11A88 88 0 0 1 65.66 67.11a89 89 0 0 1 31.4-26A106 106 0 0 0 96 56a104.11 104.11 0 0 0 104 104a106 106 0 0 0 14.92-1.06a89 89 0 0 1-26.02 31.4\"/>",
|
|
2901
|
+
width: 256,
|
|
2902
|
+
height: 256
|
|
2862
2903
|
}
|
|
2863
2904
|
},
|
|
2864
2905
|
remixicon: {
|
|
@@ -3001,6 +3042,16 @@ const ICON_DATA = {
|
|
|
3001
3042
|
body: "<path fill=\"currentColor\" d=\"M12 2a1 1 0 0 1 1 1v3a1 1 0 1 1-2 0V3a1 1 0 0 1 1-1m0 15a1 1 0 0 1 1 1v3a1 1 0 1 1-2 0v-3a1 1 0 0 1 1-1m10-5a1 1 0 0 1-1 1h-3a1 1 0 1 1 0-2h3a1 1 0 0 1 1 1M7 12a1 1 0 0 1-1 1H3a1 1 0 1 1 0-2h3a1 1 0 0 1 1 1m12.071 7.071a1 1 0 0 1-1.414 0l-2.121-2.121a1 1 0 0 1 1.414-1.414l2.121 2.12a1 1 0 0 1 0 1.415M8.464 8.464a1 1 0 0 1-1.414 0l-2.12-2.12a1 1 0 0 1 1.414-1.415l2.12 2.121a1 1 0 0 1 0 1.414M4.93 19.071a1 1 0 0 1 0-1.414l2.121-2.121a1 1 0 0 1 1.414 1.414l-2.12 2.121a1 1 0 0 1-1.415 0M15.536 8.464a1 1 0 0 1 0-1.414l2.12-2.121a1 1 0 1 1 1.415 1.414L16.95 8.464a1 1 0 0 1-1.414 0\"/>",
|
|
3002
3043
|
width: 24,
|
|
3003
3044
|
height: 24
|
|
3045
|
+
},
|
|
3046
|
+
"sun": {
|
|
3047
|
+
body: "<path fill=\"currentColor\" d=\"M12 18a6 6 0 1 1 0-12a6 6 0 0 1 0 12m0-2a4 4 0 1 0 0-8a4 4 0 0 0 0 8M11 1h2v3h-2zm0 19h2v3h-2zM3.515 4.929l1.414-1.414L7.05 5.636L5.636 7.05zM16.95 18.364l1.414-1.414l2.121 2.121l-1.414 1.414zm2.121-14.85l1.414 1.415l-2.121 2.121l-1.414-1.414zM5.636 16.95l1.414 1.414l-2.121 2.121l-1.414-1.414zM23 11v2h-3v-2zM4 11v2H1v-2z\"/>",
|
|
3048
|
+
width: 24,
|
|
3049
|
+
height: 24
|
|
3050
|
+
},
|
|
3051
|
+
"moon": {
|
|
3052
|
+
body: "<path fill=\"currentColor\" d=\"M10 7a7 7 0 0 0 12 4.9v.1c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2h.1A6.98 6.98 0 0 0 10 7m-6 5a8 8 0 0 0 15.062 3.762A9 9 0 0 1 8.238 4.938A8 8 0 0 0 4 12\"/>",
|
|
3053
|
+
width: 24,
|
|
3054
|
+
height: 24
|
|
3004
3055
|
}
|
|
3005
3056
|
}
|
|
3006
3057
|
};
|
|
@@ -3062,7 +3113,11 @@ const LUCIDE_EXPORT_TO_SEMANTIC_ICON = {
|
|
|
3062
3113
|
LoaderCircle: "loader-circle",
|
|
3063
3114
|
Loader2: "loader-circle",
|
|
3064
3115
|
Loader2Icon: "loader-circle",
|
|
3065
|
-
LoaderIcon: "loader-circle"
|
|
3116
|
+
LoaderIcon: "loader-circle",
|
|
3117
|
+
Sun: "sun",
|
|
3118
|
+
SunIcon: "sun",
|
|
3119
|
+
Moon: "moon",
|
|
3120
|
+
MoonIcon: "moon"
|
|
3066
3121
|
};
|
|
3067
3122
|
const LUCIDE_PATH_TO_SEMANTIC_ICON = {
|
|
3068
3123
|
check: "check",
|
|
@@ -3092,10 +3147,12 @@ const LUCIDE_PATH_TO_SEMANTIC_ICON = {
|
|
|
3092
3147
|
menu: "menu",
|
|
3093
3148
|
shuffle: "shuffle",
|
|
3094
3149
|
x: "x",
|
|
3095
|
-
"loader-circle": "loader-circle"
|
|
3150
|
+
"loader-circle": "loader-circle",
|
|
3151
|
+
sun: "sun",
|
|
3152
|
+
moon: "moon"
|
|
3096
3153
|
};
|
|
3097
|
-
function getSemanticIconNameFromLucidePath(path
|
|
3098
|
-
return LUCIDE_PATH_TO_SEMANTIC_ICON[path
|
|
3154
|
+
function getSemanticIconNameFromLucidePath(path) {
|
|
3155
|
+
return LUCIDE_PATH_TO_SEMANTIC_ICON[path];
|
|
3099
3156
|
}
|
|
3100
3157
|
function getSemanticIconNameFromLucideExport(name) {
|
|
3101
3158
|
return LUCIDE_EXPORT_TO_SEMANTIC_ICON[name];
|
|
@@ -3191,8 +3248,10 @@ function buildRegistryTheme(config) {
|
|
|
3191
3248
|
|
|
3192
3249
|
//#endregion
|
|
3193
3250
|
//#region ../../node_modules/picocolors/picocolors.js
|
|
3194
|
-
var require_picocolors = /* @__PURE__ */
|
|
3195
|
-
let p = process || {}
|
|
3251
|
+
var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3252
|
+
let p = process || {};
|
|
3253
|
+
let argv = p.argv || [];
|
|
3254
|
+
let env = p.env || {};
|
|
3196
3255
|
let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
3197
3256
|
let formatter = (open, close, replace = open) => (input) => {
|
|
3198
3257
|
let string = "" + input, index = string.indexOf(close, open.length);
|
|
@@ -3256,11 +3315,11 @@ var require_picocolors = /* @__PURE__ */ __commonJS({ "../../node_modules/picoco
|
|
|
3256
3315
|
};
|
|
3257
3316
|
module.exports = createColors();
|
|
3258
3317
|
module.exports.createColors = createColors;
|
|
3259
|
-
})
|
|
3318
|
+
}));
|
|
3260
3319
|
|
|
3261
3320
|
//#endregion
|
|
3262
3321
|
//#region ../../node_modules/postcss/lib/tokenize.js
|
|
3263
|
-
var require_tokenize = /* @__PURE__ */
|
|
3322
|
+
var require_tokenize = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3264
3323
|
const SINGLE_QUOTE = "'".charCodeAt(0);
|
|
3265
3324
|
const DOUBLE_QUOTE = "\"".charCodeAt(0);
|
|
3266
3325
|
const BACKSLASH = "\\".charCodeAt(0);
|
|
@@ -3284,7 +3343,7 @@ var require_tokenize = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/
|
|
|
3284
3343
|
const RE_WORD_END = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g;
|
|
3285
3344
|
const RE_BAD_BRACKET = /.[\r\n"'(/\\]/;
|
|
3286
3345
|
const RE_HEX_ESCAPE = /[\da-f]/i;
|
|
3287
|
-
module.exports = function tokenizer
|
|
3346
|
+
module.exports = function tokenizer(input, options = {}) {
|
|
3288
3347
|
let css = input.css.valueOf();
|
|
3289
3348
|
let ignore = options.ignoreErrors;
|
|
3290
3349
|
let code, content, escape, next, quote;
|
|
@@ -3293,6 +3352,7 @@ var require_tokenize = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/
|
|
|
3293
3352
|
let pos = 0;
|
|
3294
3353
|
let buffer = [];
|
|
3295
3354
|
let returned = [];
|
|
3355
|
+
let lastBadParen = -1;
|
|
3296
3356
|
function position() {
|
|
3297
3357
|
return pos;
|
|
3298
3358
|
}
|
|
@@ -3344,10 +3404,12 @@ var require_tokenize = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/
|
|
|
3344
3404
|
do {
|
|
3345
3405
|
escaped = false;
|
|
3346
3406
|
next = css.indexOf(")", next + 1);
|
|
3347
|
-
if (next === -1)
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3407
|
+
if (next === -1) {
|
|
3408
|
+
if (ignore || ignoreUnclosed) {
|
|
3409
|
+
next = pos;
|
|
3410
|
+
break;
|
|
3411
|
+
} else unclosed("bracket");
|
|
3412
|
+
}
|
|
3351
3413
|
escapePos = next;
|
|
3352
3414
|
while (css.charCodeAt(escapePos - 1) === BACKSLASH) {
|
|
3353
3415
|
escapePos -= 1;
|
|
@@ -3361,15 +3423,22 @@ var require_tokenize = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/
|
|
|
3361
3423
|
next
|
|
3362
3424
|
];
|
|
3363
3425
|
pos = next;
|
|
3364
|
-
} else
|
|
3426
|
+
} else if (pos <= lastBadParen) currentToken = [
|
|
3427
|
+
"(",
|
|
3428
|
+
"(",
|
|
3429
|
+
pos
|
|
3430
|
+
];
|
|
3431
|
+
else {
|
|
3365
3432
|
next = css.indexOf(")", pos + 1);
|
|
3366
3433
|
content = css.slice(pos, next + 1);
|
|
3367
|
-
if (next === -1 || RE_BAD_BRACKET.test(content))
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3434
|
+
if (next === -1 || RE_BAD_BRACKET.test(content)) {
|
|
3435
|
+
lastBadParen = next === -1 ? length : next;
|
|
3436
|
+
currentToken = [
|
|
3437
|
+
"(",
|
|
3438
|
+
"(",
|
|
3439
|
+
pos
|
|
3440
|
+
];
|
|
3441
|
+
} else {
|
|
3373
3442
|
currentToken = [
|
|
3374
3443
|
"brackets",
|
|
3375
3444
|
content,
|
|
@@ -3387,10 +3456,12 @@ var require_tokenize = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/
|
|
|
3387
3456
|
do {
|
|
3388
3457
|
escaped = false;
|
|
3389
3458
|
next = css.indexOf(quote, next + 1);
|
|
3390
|
-
if (next === -1)
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3459
|
+
if (next === -1) {
|
|
3460
|
+
if (ignore || ignoreUnclosed) {
|
|
3461
|
+
next = pos + 1;
|
|
3462
|
+
break;
|
|
3463
|
+
} else unclosed("string");
|
|
3464
|
+
}
|
|
3394
3465
|
escapePos = next;
|
|
3395
3466
|
while (css.charCodeAt(escapePos - 1) === BACKSLASH) {
|
|
3396
3467
|
escapePos -= 1;
|
|
@@ -3441,33 +3512,33 @@ var require_tokenize = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/
|
|
|
3441
3512
|
];
|
|
3442
3513
|
pos = next;
|
|
3443
3514
|
break;
|
|
3444
|
-
default:
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
if (
|
|
3515
|
+
default: if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) {
|
|
3516
|
+
next = css.indexOf("*/", pos + 2) + 1;
|
|
3517
|
+
if (next === 0) {
|
|
3518
|
+
if (ignore || ignoreUnclosed) next = css.length;
|
|
3448
3519
|
else unclosed("comment");
|
|
3449
|
-
currentToken = [
|
|
3450
|
-
"comment",
|
|
3451
|
-
css.slice(pos, next + 1),
|
|
3452
|
-
pos,
|
|
3453
|
-
next
|
|
3454
|
-
];
|
|
3455
|
-
pos = next;
|
|
3456
|
-
} else {
|
|
3457
|
-
RE_WORD_END.lastIndex = pos + 1;
|
|
3458
|
-
RE_WORD_END.test(css);
|
|
3459
|
-
if (RE_WORD_END.lastIndex === 0) next = css.length - 1;
|
|
3460
|
-
else next = RE_WORD_END.lastIndex - 2;
|
|
3461
|
-
currentToken = [
|
|
3462
|
-
"word",
|
|
3463
|
-
css.slice(pos, next + 1),
|
|
3464
|
-
pos,
|
|
3465
|
-
next
|
|
3466
|
-
];
|
|
3467
|
-
buffer.push(currentToken);
|
|
3468
|
-
pos = next;
|
|
3469
3520
|
}
|
|
3470
|
-
|
|
3521
|
+
currentToken = [
|
|
3522
|
+
"comment",
|
|
3523
|
+
css.slice(pos, next + 1),
|
|
3524
|
+
pos,
|
|
3525
|
+
next
|
|
3526
|
+
];
|
|
3527
|
+
pos = next;
|
|
3528
|
+
} else {
|
|
3529
|
+
RE_WORD_END.lastIndex = pos + 1;
|
|
3530
|
+
RE_WORD_END.test(css);
|
|
3531
|
+
if (RE_WORD_END.lastIndex === 0) next = css.length - 1;
|
|
3532
|
+
else next = RE_WORD_END.lastIndex - 2;
|
|
3533
|
+
currentToken = [
|
|
3534
|
+
"word",
|
|
3535
|
+
css.slice(pos, next + 1),
|
|
3536
|
+
pos,
|
|
3537
|
+
next
|
|
3538
|
+
];
|
|
3539
|
+
buffer.push(currentToken);
|
|
3540
|
+
pos = next;
|
|
3541
|
+
}
|
|
3471
3542
|
}
|
|
3472
3543
|
pos++;
|
|
3473
3544
|
return currentToken;
|
|
@@ -3482,33 +3553,33 @@ var require_tokenize = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/
|
|
|
3482
3553
|
position
|
|
3483
3554
|
};
|
|
3484
3555
|
};
|
|
3485
|
-
})
|
|
3556
|
+
}));
|
|
3486
3557
|
|
|
3487
3558
|
//#endregion
|
|
3488
3559
|
//#region ../../node_modules/postcss/lib/terminal-highlight.js
|
|
3489
|
-
var require_terminal_highlight = /* @__PURE__ */
|
|
3490
|
-
let pico
|
|
3491
|
-
let tokenizer
|
|
3492
|
-
let Input
|
|
3560
|
+
var require_terminal_highlight = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3561
|
+
let pico = require_picocolors();
|
|
3562
|
+
let tokenizer = require_tokenize();
|
|
3563
|
+
let Input;
|
|
3493
3564
|
function registerInput(dependant) {
|
|
3494
|
-
Input
|
|
3565
|
+
Input = dependant;
|
|
3495
3566
|
}
|
|
3496
3567
|
const HIGHLIGHT_THEME = {
|
|
3497
|
-
";": pico
|
|
3498
|
-
":": pico
|
|
3499
|
-
"(": pico
|
|
3500
|
-
")": pico
|
|
3501
|
-
"[": pico
|
|
3502
|
-
"]": pico
|
|
3503
|
-
"{": pico
|
|
3504
|
-
"}": pico
|
|
3505
|
-
"at-word": pico
|
|
3506
|
-
"brackets": pico
|
|
3507
|
-
"call": pico
|
|
3508
|
-
"class": pico
|
|
3509
|
-
"comment": pico
|
|
3510
|
-
"hash": pico
|
|
3511
|
-
"string": pico
|
|
3568
|
+
";": pico.yellow,
|
|
3569
|
+
":": pico.yellow,
|
|
3570
|
+
"(": pico.cyan,
|
|
3571
|
+
")": pico.cyan,
|
|
3572
|
+
"[": pico.yellow,
|
|
3573
|
+
"]": pico.yellow,
|
|
3574
|
+
"{": pico.yellow,
|
|
3575
|
+
"}": pico.yellow,
|
|
3576
|
+
"at-word": pico.cyan,
|
|
3577
|
+
"brackets": pico.cyan,
|
|
3578
|
+
"call": pico.cyan,
|
|
3579
|
+
"class": pico.yellow,
|
|
3580
|
+
"comment": pico.gray,
|
|
3581
|
+
"hash": pico.magenta,
|
|
3582
|
+
"string": pico.green
|
|
3512
3583
|
};
|
|
3513
3584
|
function getTokenType([type, value], processor) {
|
|
3514
3585
|
if (type === "word") {
|
|
@@ -3522,8 +3593,8 @@ var require_terminal_highlight = /* @__PURE__ */ __commonJS({ "../../node_module
|
|
|
3522
3593
|
}
|
|
3523
3594
|
return type;
|
|
3524
3595
|
}
|
|
3525
|
-
function terminalHighlight
|
|
3526
|
-
let processor = tokenizer
|
|
3596
|
+
function terminalHighlight(css) {
|
|
3597
|
+
let processor = tokenizer(new Input(css), { ignoreErrors: true });
|
|
3527
3598
|
let result = "";
|
|
3528
3599
|
while (!processor.endOfFile()) {
|
|
3529
3600
|
let token = processor.nextToken();
|
|
@@ -3533,34 +3604,36 @@ var require_terminal_highlight = /* @__PURE__ */ __commonJS({ "../../node_module
|
|
|
3533
3604
|
}
|
|
3534
3605
|
return result;
|
|
3535
3606
|
}
|
|
3536
|
-
terminalHighlight
|
|
3537
|
-
module.exports = terminalHighlight
|
|
3538
|
-
})
|
|
3607
|
+
terminalHighlight.registerInput = registerInput;
|
|
3608
|
+
module.exports = terminalHighlight;
|
|
3609
|
+
}));
|
|
3539
3610
|
|
|
3540
3611
|
//#endregion
|
|
3541
3612
|
//#region ../../node_modules/postcss/lib/css-syntax-error.js
|
|
3542
|
-
var require_css_syntax_error = /* @__PURE__ */
|
|
3613
|
+
var require_css_syntax_error = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3543
3614
|
let pico = require_picocolors();
|
|
3544
|
-
let terminalHighlight
|
|
3545
|
-
var CssSyntaxError
|
|
3546
|
-
constructor(message, line, column, source, file, plugin
|
|
3615
|
+
let terminalHighlight = require_terminal_highlight();
|
|
3616
|
+
var CssSyntaxError = class CssSyntaxError extends Error {
|
|
3617
|
+
constructor(message, line, column, source, file, plugin) {
|
|
3547
3618
|
super(message);
|
|
3548
3619
|
this.name = "CssSyntaxError";
|
|
3549
3620
|
this.reason = message;
|
|
3550
3621
|
if (file) this.file = file;
|
|
3551
3622
|
if (source) this.source = source;
|
|
3552
|
-
if (plugin
|
|
3553
|
-
if (typeof line !== "undefined" && typeof column !== "undefined")
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3623
|
+
if (plugin) this.plugin = plugin;
|
|
3624
|
+
if (typeof line !== "undefined" && typeof column !== "undefined") {
|
|
3625
|
+
if (typeof line === "number") {
|
|
3626
|
+
this.line = line;
|
|
3627
|
+
this.column = column;
|
|
3628
|
+
} else {
|
|
3629
|
+
this.line = line.line;
|
|
3630
|
+
this.column = line.column;
|
|
3631
|
+
this.endLine = column.line;
|
|
3632
|
+
this.endColumn = column.column;
|
|
3633
|
+
}
|
|
3561
3634
|
}
|
|
3562
3635
|
this.setMessage();
|
|
3563
|
-
if (Error.captureStackTrace) Error.captureStackTrace(this, CssSyntaxError
|
|
3636
|
+
if (Error.captureStackTrace) Error.captureStackTrace(this, CssSyntaxError);
|
|
3564
3637
|
}
|
|
3565
3638
|
setMessage() {
|
|
3566
3639
|
this.message = this.plugin ? this.plugin + ": " : "";
|
|
@@ -3576,10 +3649,10 @@ var require_css_syntax_error = /* @__PURE__ */ __commonJS({ "../../node_modules/
|
|
|
3576
3649
|
let mark = (text) => text;
|
|
3577
3650
|
let highlight = (text) => text;
|
|
3578
3651
|
if (color) {
|
|
3579
|
-
let { bold
|
|
3580
|
-
mark = (text) => bold
|
|
3652
|
+
let { bold, gray, red } = pico.createColors(true);
|
|
3653
|
+
mark = (text) => bold(red(text));
|
|
3581
3654
|
aside = (text) => gray(text);
|
|
3582
|
-
if (terminalHighlight
|
|
3655
|
+
if (terminalHighlight) highlight = (text) => terminalHighlight(text);
|
|
3583
3656
|
}
|
|
3584
3657
|
let lines = css.split(/\r?\n/);
|
|
3585
3658
|
let start = Math.max(this.line - 3, 0);
|
|
@@ -3594,8 +3667,8 @@ var require_css_syntax_error = /* @__PURE__ */ __commonJS({ "../../node_modules/
|
|
|
3594
3667
|
let subLineStart = Math.max(0, this.column - padding);
|
|
3595
3668
|
let subLineEnd = Math.max(this.column + padding, this.endColumn + padding);
|
|
3596
3669
|
let subLine = line.slice(subLineStart, subLineEnd);
|
|
3597
|
-
let spacing
|
|
3598
|
-
return mark(">") + aside(gutter) + highlight(subLine) + "\n " + spacing
|
|
3670
|
+
let spacing = aside(gutter.replace(/\d/g, " ")) + line.slice(0, Math.min(this.column - 1, 19)).replace(/[^\t]/g, " ");
|
|
3671
|
+
return mark(">") + aside(gutter) + highlight(subLine) + "\n " + spacing + mark("^");
|
|
3599
3672
|
}
|
|
3600
3673
|
let spacing = aside(gutter.replace(/\d/g, " ")) + line.slice(0, this.column - 1).replace(/[^\t]/g, " ");
|
|
3601
3674
|
return mark(">") + aside(gutter) + highlight(line) + "\n " + spacing + mark("^");
|
|
@@ -3609,13 +3682,21 @@ var require_css_syntax_error = /* @__PURE__ */ __commonJS({ "../../node_modules/
|
|
|
3609
3682
|
return this.name + ": " + this.message + code;
|
|
3610
3683
|
}
|
|
3611
3684
|
};
|
|
3612
|
-
module.exports = CssSyntaxError
|
|
3613
|
-
CssSyntaxError
|
|
3614
|
-
})
|
|
3685
|
+
module.exports = CssSyntaxError;
|
|
3686
|
+
CssSyntaxError.default = CssSyntaxError;
|
|
3687
|
+
}));
|
|
3615
3688
|
|
|
3616
3689
|
//#endregion
|
|
3617
3690
|
//#region ../../node_modules/postcss/lib/stringifier.js
|
|
3618
|
-
var require_stringifier = /* @__PURE__ */
|
|
3691
|
+
var require_stringifier = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3692
|
+
const STYLE_TAG = /(<)(\/?style\b)/gi;
|
|
3693
|
+
const COMMENT_OPEN = /(<)(!--)/g;
|
|
3694
|
+
const AT_NAME_END = /[\t\n\f\r "#'()/;[\\\]{}]/;
|
|
3695
|
+
function escapeHTMLInCSS(str) {
|
|
3696
|
+
if (typeof str !== "string") return str;
|
|
3697
|
+
if (!str.includes("<")) return str;
|
|
3698
|
+
return str.replace(STYLE_TAG, "\\3c $2").replace(COMMENT_OPEN, "\\3c $2");
|
|
3699
|
+
}
|
|
3619
3700
|
const DEFAULT_RAW = {
|
|
3620
3701
|
after: "\n",
|
|
3621
3702
|
beforeClose: "\n",
|
|
@@ -3633,19 +3714,64 @@ var require_stringifier = /* @__PURE__ */ __commonJS({ "../../node_modules/postc
|
|
|
3633
3714
|
function capitalize(str) {
|
|
3634
3715
|
return str[0].toUpperCase() + str.slice(1);
|
|
3635
3716
|
}
|
|
3636
|
-
|
|
3717
|
+
function atruleStart(str, node) {
|
|
3718
|
+
let name = "@" + node.name;
|
|
3719
|
+
let params = node.params ? str.rawValue(node, "params") : "";
|
|
3720
|
+
let afterName = node.raws.afterName;
|
|
3721
|
+
if (typeof afterName === "undefined") afterName = params ? " " : "";
|
|
3722
|
+
else if (afterName === "" && params && !AT_NAME_END.test(params[0])) afterName = " ";
|
|
3723
|
+
return name + afterName + params;
|
|
3724
|
+
}
|
|
3725
|
+
function isCustomProperty(node) {
|
|
3726
|
+
if (!node.prop.startsWith("--")) return false;
|
|
3727
|
+
let before = node.raws.before;
|
|
3728
|
+
return typeof before === "undefined" || !/\S$/.test(before);
|
|
3729
|
+
}
|
|
3730
|
+
function pushBody(str, stack, node) {
|
|
3731
|
+
let nodes = node.nodes;
|
|
3732
|
+
let last = nodes.length - 1;
|
|
3733
|
+
while (last > 0) {
|
|
3734
|
+
if (nodes[last].type !== "comment") break;
|
|
3735
|
+
last -= 1;
|
|
3736
|
+
}
|
|
3737
|
+
let semicolon = str.raw(node, "semicolon");
|
|
3738
|
+
let isDocument = node.type === "document";
|
|
3739
|
+
for (let i = nodes.length - 1; i >= 0; i--) {
|
|
3740
|
+
let child = nodes[i];
|
|
3741
|
+
let childSemicolon = last !== i || semicolon;
|
|
3742
|
+
if (!childSemicolon && i < nodes.length - 1 && (child.type === "atrule" && !child.nodes || child.type === "decl" && isCustomProperty(child))) childSemicolon = true;
|
|
3743
|
+
stack.push({
|
|
3744
|
+
document: isDocument,
|
|
3745
|
+
node: child,
|
|
3746
|
+
semicolon: childSemicolon
|
|
3747
|
+
});
|
|
3748
|
+
}
|
|
3749
|
+
}
|
|
3750
|
+
function pushBlock(str, stack, node, start) {
|
|
3751
|
+
let between = str.raw(node, "between", "beforeOpen");
|
|
3752
|
+
str.builder(escapeHTMLInCSS(start + between) + "{", node, "start");
|
|
3753
|
+
let hasNodes = node.nodes && node.nodes.length;
|
|
3754
|
+
let close = () => {
|
|
3755
|
+
let after = hasNodes ? str.raw(node, "after") : str.raw(node, "after", "emptyBody");
|
|
3756
|
+
if (after) str.builder(escapeHTMLInCSS(after));
|
|
3757
|
+
str.builder("}", node, "end");
|
|
3758
|
+
if (node.type === "rule" && node.raws.ownSemicolon) str.builder(escapeHTMLInCSS(node.raws.ownSemicolon), node, "end");
|
|
3759
|
+
};
|
|
3760
|
+
if (hasNodes) {
|
|
3761
|
+
stack.push(close);
|
|
3762
|
+
pushBody(str, stack, node);
|
|
3763
|
+
} else close();
|
|
3764
|
+
}
|
|
3765
|
+
var Stringifier = class Stringifier {
|
|
3637
3766
|
constructor(builder) {
|
|
3638
3767
|
this.builder = builder;
|
|
3639
3768
|
}
|
|
3640
3769
|
atrule(node, semicolon) {
|
|
3641
|
-
let
|
|
3642
|
-
|
|
3643
|
-
if (typeof node.raws.afterName !== "undefined") name += node.raws.afterName;
|
|
3644
|
-
else if (params) name += " ";
|
|
3645
|
-
if (node.nodes) this.block(node, name + params);
|
|
3770
|
+
let start = atruleStart(this, node);
|
|
3771
|
+
if (node.nodes) this.block(node, start);
|
|
3646
3772
|
else {
|
|
3647
3773
|
let end = (node.raws.between || "") + (semicolon ? ";" : "");
|
|
3648
|
-
this.builder(
|
|
3774
|
+
this.builder(escapeHTMLInCSS(start + end), node);
|
|
3649
3775
|
}
|
|
3650
3776
|
}
|
|
3651
3777
|
beforeAfter(node, detect) {
|
|
@@ -3668,40 +3794,52 @@ var require_stringifier = /* @__PURE__ */ __commonJS({ "../../node_modules/postc
|
|
|
3668
3794
|
}
|
|
3669
3795
|
block(node, start) {
|
|
3670
3796
|
let between = this.raw(node, "between", "beforeOpen");
|
|
3671
|
-
this.builder(start + between + "{", node, "start");
|
|
3797
|
+
this.builder(escapeHTMLInCSS(start + between) + "{", node, "start");
|
|
3672
3798
|
let after;
|
|
3673
3799
|
if (node.nodes && node.nodes.length) {
|
|
3674
3800
|
this.body(node);
|
|
3675
3801
|
after = this.raw(node, "after");
|
|
3676
3802
|
} else after = this.raw(node, "after", "emptyBody");
|
|
3677
|
-
if (after) this.builder(after);
|
|
3803
|
+
if (after) this.builder(escapeHTMLInCSS(after));
|
|
3678
3804
|
this.builder("}", node, "end");
|
|
3679
3805
|
}
|
|
3680
3806
|
body(node) {
|
|
3681
|
-
let
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3807
|
+
let proto = Stringifier.prototype;
|
|
3808
|
+
let expandable = [
|
|
3809
|
+
"atrule",
|
|
3810
|
+
"block",
|
|
3811
|
+
"body",
|
|
3812
|
+
"rule",
|
|
3813
|
+
"stringify"
|
|
3814
|
+
].every((method) => this[method] === proto[method]);
|
|
3815
|
+
let stack = [];
|
|
3816
|
+
pushBody(this, stack, node);
|
|
3817
|
+
while (stack.length > 0) {
|
|
3818
|
+
let entry = stack.pop();
|
|
3819
|
+
if (typeof entry === "function") {
|
|
3820
|
+
entry();
|
|
3821
|
+
continue;
|
|
3822
|
+
}
|
|
3823
|
+
let child = entry.node;
|
|
3689
3824
|
let before = this.raw(child, "before");
|
|
3690
|
-
if (before) this.builder(before);
|
|
3691
|
-
|
|
3825
|
+
if (before) this.builder(entry.document ? before : escapeHTMLInCSS(before));
|
|
3826
|
+
if (expandable && child.type === "rule") pushBlock(this, stack, child, this.rawValue(child, "selector"));
|
|
3827
|
+
else if (expandable && child.type === "atrule" && child.nodes) pushBlock(this, stack, child, atruleStart(this, child));
|
|
3828
|
+
else this.stringify(child, entry.semicolon);
|
|
3692
3829
|
}
|
|
3693
3830
|
}
|
|
3694
3831
|
comment(node) {
|
|
3695
3832
|
let left = this.raw(node, "left", "commentLeft");
|
|
3696
3833
|
let right = this.raw(node, "right", "commentRight");
|
|
3697
|
-
this.builder("/*" + left + node.text + right + "*/", node);
|
|
3834
|
+
this.builder(escapeHTMLInCSS("/*" + left + node.text + right + "*/"), node);
|
|
3698
3835
|
}
|
|
3699
3836
|
decl(node, semicolon) {
|
|
3837
|
+
let raws = node.raws;
|
|
3700
3838
|
let between = this.raw(node, "between", "colon");
|
|
3701
3839
|
let string = node.prop + between + this.rawValue(node, "value");
|
|
3702
|
-
if (node.important) string +=
|
|
3840
|
+
if (node.important) string += raws.important || " !important";
|
|
3703
3841
|
if (semicolon) string += ";";
|
|
3704
|
-
this.builder(string, node);
|
|
3842
|
+
this.builder(escapeHTMLInCSS(string), node);
|
|
3705
3843
|
}
|
|
3706
3844
|
document(node) {
|
|
3707
3845
|
this.body(node);
|
|
@@ -3719,25 +3857,25 @@ var require_stringifier = /* @__PURE__ */ __commonJS({ "../../node_modules/postc
|
|
|
3719
3857
|
if (parent && parent.type === "document") return "";
|
|
3720
3858
|
}
|
|
3721
3859
|
if (!parent) return DEFAULT_RAW[detect];
|
|
3722
|
-
let root
|
|
3723
|
-
|
|
3724
|
-
if (typeof
|
|
3860
|
+
let root = node.root();
|
|
3861
|
+
let cache = root.rawCache || (root.rawCache = {});
|
|
3862
|
+
if (typeof cache[detect] !== "undefined") return cache[detect];
|
|
3725
3863
|
if (detect === "before" || detect === "after") return this.beforeAfter(node, detect);
|
|
3726
3864
|
else {
|
|
3727
3865
|
let method = "raw" + capitalize(detect);
|
|
3728
|
-
if (this[method]) value = this[method](root
|
|
3729
|
-
else root
|
|
3866
|
+
if (this[method]) value = this[method](root, node);
|
|
3867
|
+
else root.walk((i) => {
|
|
3730
3868
|
value = i.raws[own];
|
|
3731
3869
|
if (typeof value !== "undefined") return false;
|
|
3732
3870
|
});
|
|
3733
3871
|
}
|
|
3734
3872
|
if (typeof value === "undefined") value = DEFAULT_RAW[detect];
|
|
3735
|
-
|
|
3873
|
+
cache[detect] = value;
|
|
3736
3874
|
return value;
|
|
3737
3875
|
}
|
|
3738
|
-
rawBeforeClose(root
|
|
3876
|
+
rawBeforeClose(root) {
|
|
3739
3877
|
let value;
|
|
3740
|
-
root
|
|
3878
|
+
root.walk((i) => {
|
|
3741
3879
|
if (i.nodes && i.nodes.length > 0) {
|
|
3742
3880
|
if (typeof i.raws.after !== "undefined") {
|
|
3743
3881
|
value = i.raws.after;
|
|
@@ -3749,9 +3887,9 @@ var require_stringifier = /* @__PURE__ */ __commonJS({ "../../node_modules/postc
|
|
|
3749
3887
|
if (value) value = value.replace(/\S/g, "");
|
|
3750
3888
|
return value;
|
|
3751
3889
|
}
|
|
3752
|
-
rawBeforeComment(root
|
|
3890
|
+
rawBeforeComment(root, node) {
|
|
3753
3891
|
let value;
|
|
3754
|
-
root
|
|
3892
|
+
root.walkComments((i) => {
|
|
3755
3893
|
if (typeof i.raws.before !== "undefined") {
|
|
3756
3894
|
value = i.raws.before;
|
|
3757
3895
|
if (value.includes("\n")) value = value.replace(/[^\n]+$/, "");
|
|
@@ -3762,9 +3900,9 @@ var require_stringifier = /* @__PURE__ */ __commonJS({ "../../node_modules/postc
|
|
|
3762
3900
|
else if (value) value = value.replace(/\S/g, "");
|
|
3763
3901
|
return value;
|
|
3764
3902
|
}
|
|
3765
|
-
rawBeforeDecl(root
|
|
3903
|
+
rawBeforeDecl(root, node) {
|
|
3766
3904
|
let value;
|
|
3767
|
-
root
|
|
3905
|
+
root.walkDecls((i) => {
|
|
3768
3906
|
if (typeof i.raws.before !== "undefined") {
|
|
3769
3907
|
value = i.raws.before;
|
|
3770
3908
|
if (value.includes("\n")) value = value.replace(/[^\n]+$/, "");
|
|
@@ -3775,9 +3913,9 @@ var require_stringifier = /* @__PURE__ */ __commonJS({ "../../node_modules/postc
|
|
|
3775
3913
|
else if (value) value = value.replace(/\S/g, "");
|
|
3776
3914
|
return value;
|
|
3777
3915
|
}
|
|
3778
|
-
rawBeforeOpen(root
|
|
3916
|
+
rawBeforeOpen(root) {
|
|
3779
3917
|
let value;
|
|
3780
|
-
root
|
|
3918
|
+
root.walk((i) => {
|
|
3781
3919
|
if (i.type !== "decl") {
|
|
3782
3920
|
value = i.raws.between;
|
|
3783
3921
|
if (typeof value !== "undefined") return false;
|
|
@@ -3785,10 +3923,10 @@ var require_stringifier = /* @__PURE__ */ __commonJS({ "../../node_modules/postc
|
|
|
3785
3923
|
});
|
|
3786
3924
|
return value;
|
|
3787
3925
|
}
|
|
3788
|
-
rawBeforeRule(root
|
|
3926
|
+
rawBeforeRule(root) {
|
|
3789
3927
|
let value;
|
|
3790
|
-
root
|
|
3791
|
-
if (i.nodes && (i.parent !== root
|
|
3928
|
+
root.walk((i) => {
|
|
3929
|
+
if (i.nodes && (i.parent !== root || root.first !== i)) {
|
|
3792
3930
|
if (typeof i.raws.before !== "undefined") {
|
|
3793
3931
|
value = i.raws.before;
|
|
3794
3932
|
if (value.includes("\n")) value = value.replace(/[^\n]+$/, "");
|
|
@@ -3799,9 +3937,9 @@ var require_stringifier = /* @__PURE__ */ __commonJS({ "../../node_modules/postc
|
|
|
3799
3937
|
if (value) value = value.replace(/\S/g, "");
|
|
3800
3938
|
return value;
|
|
3801
3939
|
}
|
|
3802
|
-
rawColon(root
|
|
3940
|
+
rawColon(root) {
|
|
3803
3941
|
let value;
|
|
3804
|
-
root
|
|
3942
|
+
root.walkDecls((i) => {
|
|
3805
3943
|
if (typeof i.raws.between !== "undefined") {
|
|
3806
3944
|
value = i.raws.between.replace(/[^\s:]/g, "");
|
|
3807
3945
|
return false;
|
|
@@ -3809,9 +3947,9 @@ var require_stringifier = /* @__PURE__ */ __commonJS({ "../../node_modules/postc
|
|
|
3809
3947
|
});
|
|
3810
3948
|
return value;
|
|
3811
3949
|
}
|
|
3812
|
-
rawEmptyBody(root
|
|
3950
|
+
rawEmptyBody(root) {
|
|
3813
3951
|
let value;
|
|
3814
|
-
root
|
|
3952
|
+
root.walk((i) => {
|
|
3815
3953
|
if (i.nodes && i.nodes.length === 0) {
|
|
3816
3954
|
value = i.raws.after;
|
|
3817
3955
|
if (typeof value !== "undefined") return false;
|
|
@@ -3819,12 +3957,12 @@ var require_stringifier = /* @__PURE__ */ __commonJS({ "../../node_modules/postc
|
|
|
3819
3957
|
});
|
|
3820
3958
|
return value;
|
|
3821
3959
|
}
|
|
3822
|
-
rawIndent(root
|
|
3823
|
-
if (root
|
|
3960
|
+
rawIndent(root) {
|
|
3961
|
+
if (root.raws.indent) return root.raws.indent;
|
|
3824
3962
|
let value;
|
|
3825
|
-
root
|
|
3826
|
-
let p
|
|
3827
|
-
if (p
|
|
3963
|
+
root.walk((i) => {
|
|
3964
|
+
let p = i.parent;
|
|
3965
|
+
if (p && p !== root && p.parent && p.parent === root) {
|
|
3828
3966
|
if (typeof i.raws.before !== "undefined") {
|
|
3829
3967
|
let parts = i.raws.before.split("\n");
|
|
3830
3968
|
value = parts[parts.length - 1];
|
|
@@ -3835,9 +3973,9 @@ var require_stringifier = /* @__PURE__ */ __commonJS({ "../../node_modules/postc
|
|
|
3835
3973
|
});
|
|
3836
3974
|
return value;
|
|
3837
3975
|
}
|
|
3838
|
-
rawSemicolon(root
|
|
3976
|
+
rawSemicolon(root) {
|
|
3839
3977
|
let value;
|
|
3840
|
-
root
|
|
3978
|
+
root.walk((i) => {
|
|
3841
3979
|
if (i.nodes && i.nodes.length && i.last.type === "decl") {
|
|
3842
3980
|
value = i.raws.semicolon;
|
|
3843
3981
|
if (typeof value !== "undefined") return false;
|
|
@@ -3852,12 +3990,17 @@ var require_stringifier = /* @__PURE__ */ __commonJS({ "../../node_modules/postc
|
|
|
3852
3990
|
return value;
|
|
3853
3991
|
}
|
|
3854
3992
|
root(node) {
|
|
3993
|
+
if (node.source && node.source.input.hasBOM) this.builder("", node, "start");
|
|
3855
3994
|
this.body(node);
|
|
3856
|
-
if (node.raws.after)
|
|
3995
|
+
if (node.raws.after) {
|
|
3996
|
+
let after = node.raws.after;
|
|
3997
|
+
let isDocument = node.parent && node.parent.type === "document";
|
|
3998
|
+
this.builder(isDocument ? after : escapeHTMLInCSS(after));
|
|
3999
|
+
}
|
|
3857
4000
|
}
|
|
3858
4001
|
rule(node) {
|
|
3859
4002
|
this.block(node, this.rawValue(node, "selector"));
|
|
3860
|
-
if (node.raws.ownSemicolon) this.builder(node.raws.ownSemicolon, node, "end");
|
|
4003
|
+
if (node.raws.ownSemicolon) this.builder(escapeHTMLInCSS(node.raws.ownSemicolon), node, "end");
|
|
3861
4004
|
}
|
|
3862
4005
|
stringify(node, semicolon) {
|
|
3863
4006
|
/* c8 ignore start */
|
|
@@ -3866,51 +4009,78 @@ var require_stringifier = /* @__PURE__ */ __commonJS({ "../../node_modules/postc
|
|
|
3866
4009
|
this[node.type](node, semicolon);
|
|
3867
4010
|
}
|
|
3868
4011
|
};
|
|
3869
|
-
module.exports = Stringifier
|
|
3870
|
-
Stringifier
|
|
3871
|
-
})
|
|
4012
|
+
module.exports = Stringifier;
|
|
4013
|
+
Stringifier.default = Stringifier;
|
|
4014
|
+
}));
|
|
3872
4015
|
|
|
3873
4016
|
//#endregion
|
|
3874
4017
|
//#region ../../node_modules/postcss/lib/stringify.js
|
|
3875
|
-
var require_stringify = /* @__PURE__ */
|
|
3876
|
-
let Stringifier
|
|
3877
|
-
function stringify
|
|
3878
|
-
new Stringifier
|
|
4018
|
+
var require_stringify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4019
|
+
let Stringifier = require_stringifier();
|
|
4020
|
+
function stringify(node, builder) {
|
|
4021
|
+
new Stringifier(builder).stringify(node);
|
|
3879
4022
|
}
|
|
3880
|
-
module.exports = stringify
|
|
3881
|
-
stringify
|
|
3882
|
-
})
|
|
4023
|
+
module.exports = stringify;
|
|
4024
|
+
stringify.default = stringify;
|
|
4025
|
+
}));
|
|
3883
4026
|
|
|
3884
4027
|
//#endregion
|
|
3885
4028
|
//#region ../../node_modules/postcss/lib/symbols.js
|
|
3886
|
-
var require_symbols = /* @__PURE__ */
|
|
4029
|
+
var require_symbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3887
4030
|
module.exports.isClean = Symbol("isClean");
|
|
3888
4031
|
module.exports.my = Symbol("my");
|
|
3889
|
-
})
|
|
4032
|
+
}));
|
|
3890
4033
|
|
|
3891
4034
|
//#endregion
|
|
3892
4035
|
//#region ../../node_modules/postcss/lib/node.js
|
|
3893
|
-
var require_node = /* @__PURE__ */
|
|
3894
|
-
let CssSyntaxError
|
|
4036
|
+
var require_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4037
|
+
let CssSyntaxError = require_css_syntax_error();
|
|
3895
4038
|
let Stringifier = require_stringifier();
|
|
3896
|
-
let stringify
|
|
3897
|
-
let { isClean
|
|
4039
|
+
let stringify = require_stringify();
|
|
4040
|
+
let { isClean, my } = require_symbols();
|
|
3898
4041
|
function cloneNode(obj, parent) {
|
|
3899
4042
|
let cloned = new obj.constructor();
|
|
3900
|
-
|
|
3901
|
-
|
|
4043
|
+
let stack = [[
|
|
4044
|
+
obj,
|
|
4045
|
+
cloned,
|
|
4046
|
+
parent
|
|
4047
|
+
]];
|
|
4048
|
+
while (stack.length > 0) {
|
|
4049
|
+
let [source, target, targetParent] = stack.pop();
|
|
4050
|
+
for (let i in source) {
|
|
4051
|
+
if (!Object.prototype.hasOwnProperty.call(source, i))
|
|
3902
4052
|
/* c8 ignore next 2 */
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
4053
|
+
continue;
|
|
4054
|
+
if (i === "proxyCache") continue;
|
|
4055
|
+
let value = source[i];
|
|
4056
|
+
let type = typeof value;
|
|
4057
|
+
if (i === "parent" && type === "object") {
|
|
4058
|
+
if (targetParent) target[i] = targetParent;
|
|
4059
|
+
} else if (i === "source") target[i] = value;
|
|
4060
|
+
else if (Array.isArray(value)) {
|
|
4061
|
+
let children = [];
|
|
4062
|
+
target[i] = children;
|
|
4063
|
+
for (let j of value) {
|
|
4064
|
+
let childClone = new j.constructor();
|
|
4065
|
+
children.push(childClone);
|
|
4066
|
+
stack.push([
|
|
4067
|
+
j,
|
|
4068
|
+
childClone,
|
|
4069
|
+
target
|
|
4070
|
+
]);
|
|
4071
|
+
}
|
|
4072
|
+
} else {
|
|
4073
|
+
if (type === "object" && value !== null) {
|
|
4074
|
+
let valueClone = new value.constructor();
|
|
4075
|
+
stack.push([
|
|
4076
|
+
value,
|
|
4077
|
+
valueClone,
|
|
4078
|
+
void 0
|
|
4079
|
+
]);
|
|
4080
|
+
value = valueClone;
|
|
4081
|
+
}
|
|
4082
|
+
target[i] = value;
|
|
4083
|
+
}
|
|
3914
4084
|
}
|
|
3915
4085
|
}
|
|
3916
4086
|
return cloned;
|
|
@@ -3932,19 +4102,22 @@ var require_node = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/lib/
|
|
|
3932
4102
|
}
|
|
3933
4103
|
return offset;
|
|
3934
4104
|
}
|
|
3935
|
-
var Node
|
|
4105
|
+
var Node = class Node {
|
|
3936
4106
|
get proxyOf() {
|
|
3937
4107
|
return this;
|
|
3938
4108
|
}
|
|
3939
4109
|
constructor(defaults = {}) {
|
|
3940
4110
|
this.raws = {};
|
|
3941
|
-
this[isClean
|
|
3942
|
-
this[my
|
|
3943
|
-
for (let name
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
4111
|
+
this[isClean] = false;
|
|
4112
|
+
this[my] = true;
|
|
4113
|
+
for (let name of Object.keys(defaults)) {
|
|
4114
|
+
if (name === "__proto__") continue;
|
|
4115
|
+
if (name === "nodes") {
|
|
4116
|
+
this.nodes = [];
|
|
4117
|
+
for (let node of defaults[name]) if (typeof node.clone === "function" && node.parent) this.append(node.clone());
|
|
4118
|
+
else this.append(node);
|
|
4119
|
+
} else this[name] = defaults[name];
|
|
4120
|
+
}
|
|
3948
4121
|
}
|
|
3949
4122
|
addToError(error) {
|
|
3950
4123
|
error.postcssNode = this;
|
|
@@ -3997,7 +4170,7 @@ var require_node = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/lib/
|
|
|
3997
4170
|
line: end.line
|
|
3998
4171
|
}, opts);
|
|
3999
4172
|
}
|
|
4000
|
-
return new CssSyntaxError
|
|
4173
|
+
return new CssSyntaxError(message);
|
|
4001
4174
|
}
|
|
4002
4175
|
getProxyProcessor() {
|
|
4003
4176
|
return {
|
|
@@ -4009,20 +4182,22 @@ var require_node = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/lib/
|
|
|
4009
4182
|
set(node, prop, value) {
|
|
4010
4183
|
if (node[prop] === value) return true;
|
|
4011
4184
|
node[prop] = value;
|
|
4012
|
-
if (prop === "prop" || prop === "value" || prop === "name" || prop === "params" || prop === "important" ||
|
|
4185
|
+
if (prop === "prop" || prop === "value" || prop === "name" || prop === "params" || prop === "important" ||
|
|
4186
|
+
/* c8 ignore next */
|
|
4187
|
+
prop === "text") node.markDirty();
|
|
4013
4188
|
return true;
|
|
4014
4189
|
}
|
|
4015
4190
|
};
|
|
4016
4191
|
}
|
|
4017
4192
|
/* c8 ignore next 3 */
|
|
4018
4193
|
markClean() {
|
|
4019
|
-
this[isClean
|
|
4194
|
+
this[isClean] = true;
|
|
4020
4195
|
}
|
|
4021
4196
|
markDirty() {
|
|
4022
|
-
if (this[isClean
|
|
4023
|
-
this[isClean
|
|
4197
|
+
if (this[isClean]) {
|
|
4198
|
+
this[isClean] = false;
|
|
4024
4199
|
let next = this;
|
|
4025
|
-
while (next = next.parent) next[isClean
|
|
4200
|
+
while (next = next.parent) next[isClean] = false;
|
|
4026
4201
|
}
|
|
4027
4202
|
}
|
|
4028
4203
|
next() {
|
|
@@ -4031,10 +4206,14 @@ var require_node = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/lib/
|
|
|
4031
4206
|
return this.parent.nodes[index + 1];
|
|
4032
4207
|
}
|
|
4033
4208
|
positionBy(opts = {}) {
|
|
4034
|
-
let
|
|
4209
|
+
let inputString = "document" in this.source.input ? this.source.input.document : this.source.input.css;
|
|
4210
|
+
let pos = {
|
|
4211
|
+
column: this.source.start.column,
|
|
4212
|
+
line: this.source.start.line,
|
|
4213
|
+
offset: sourceOffset(inputString, this.source.start)
|
|
4214
|
+
};
|
|
4035
4215
|
if (opts.index) pos = this.positionInside(opts.index);
|
|
4036
4216
|
else if (opts.word) {
|
|
4037
|
-
let inputString = "document" in this.source.input ? this.source.input.document : this.source.input.css;
|
|
4038
4217
|
let index = inputString.slice(sourceOffset(inputString, this.source.start), sourceOffset(inputString, this.source.end)).indexOf(opts.word);
|
|
4039
4218
|
if (index !== -1) pos = this.positionInside(index);
|
|
4040
4219
|
}
|
|
@@ -4089,14 +4268,14 @@ var require_node = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/lib/
|
|
|
4089
4268
|
line: opts.start.line,
|
|
4090
4269
|
offset: sourceOffset(inputString, opts.start)
|
|
4091
4270
|
};
|
|
4092
|
-
else if (opts.index) start = this.positionInside(opts.index);
|
|
4271
|
+
else if (typeof opts.index === "number") start = this.positionInside(opts.index);
|
|
4093
4272
|
if (opts.end) end = {
|
|
4094
4273
|
column: opts.end.column,
|
|
4095
4274
|
line: opts.end.line,
|
|
4096
4275
|
offset: sourceOffset(inputString, opts.end)
|
|
4097
4276
|
};
|
|
4098
4277
|
else if (typeof opts.endIndex === "number") end = this.positionInside(opts.endIndex);
|
|
4099
|
-
else if (opts.index) end = this.positionInside(opts.index + 1);
|
|
4278
|
+
else if (typeof opts.index === "number") end = this.positionInside(opts.index + 1);
|
|
4100
4279
|
}
|
|
4101
4280
|
if (end.line < start.line || end.line === start.line && end.column <= start.column) end = {
|
|
4102
4281
|
column: start.column + 1,
|
|
@@ -4135,36 +4314,61 @@ var require_node = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/lib/
|
|
|
4135
4314
|
return result;
|
|
4136
4315
|
}
|
|
4137
4316
|
toJSON(_, inputs) {
|
|
4138
|
-
let fixed = {};
|
|
4139
4317
|
let emitInputs = inputs == null;
|
|
4140
4318
|
inputs = inputs || /* @__PURE__ */ new Map();
|
|
4141
|
-
let
|
|
4142
|
-
|
|
4143
|
-
|
|
4319
|
+
let holderOfRoot = [];
|
|
4320
|
+
let queue = [[
|
|
4321
|
+
this,
|
|
4322
|
+
holderOfRoot,
|
|
4323
|
+
0
|
|
4324
|
+
]];
|
|
4325
|
+
for (let step = 0; step < queue.length; step++) {
|
|
4326
|
+
let [node, holder, key] = queue[step];
|
|
4327
|
+
let fixed = {};
|
|
4328
|
+
holder[key] = fixed;
|
|
4329
|
+
for (let name in node) {
|
|
4330
|
+
if (!Object.prototype.hasOwnProperty.call(node, name))
|
|
4144
4331
|
/* c8 ignore next 2 */
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4332
|
+
continue;
|
|
4333
|
+
if (name === "parent" || name === "proxyCache") continue;
|
|
4334
|
+
let value = node[name];
|
|
4335
|
+
if (Array.isArray(value)) {
|
|
4336
|
+
let fixedArray = [];
|
|
4337
|
+
fixed[name] = fixedArray;
|
|
4338
|
+
for (let i = 0; i < value.length; i++) {
|
|
4339
|
+
let item = value[i];
|
|
4340
|
+
if (typeof item === "object" && item.toJSON) {
|
|
4341
|
+
if (item.toJSON === Node.prototype.toJSON) queue.push([
|
|
4342
|
+
item,
|
|
4343
|
+
fixedArray,
|
|
4344
|
+
i
|
|
4345
|
+
]);
|
|
4346
|
+
else fixedArray[i] = item.toJSON(null, inputs);
|
|
4347
|
+
} else fixedArray[i] = item;
|
|
4348
|
+
}
|
|
4349
|
+
} else if (typeof value === "object" && value.toJSON) {
|
|
4350
|
+
if (value.toJSON === Node.prototype.toJSON) queue.push([
|
|
4351
|
+
value,
|
|
4352
|
+
fixed,
|
|
4353
|
+
name
|
|
4354
|
+
]);
|
|
4355
|
+
else fixed[name] = value.toJSON(null, inputs);
|
|
4356
|
+
} else if (name === "source") {
|
|
4357
|
+
if (value == null) continue;
|
|
4358
|
+
let inputId = inputs.get(value.input);
|
|
4359
|
+
if (inputId == null) {
|
|
4360
|
+
inputId = inputs.size;
|
|
4361
|
+
inputs.set(value.input, inputId);
|
|
4362
|
+
}
|
|
4363
|
+
fixed[name] = {
|
|
4364
|
+
end: value.end,
|
|
4365
|
+
inputId,
|
|
4366
|
+
start: value.start
|
|
4367
|
+
};
|
|
4368
|
+
} else fixed[name] = value;
|
|
4369
|
+
}
|
|
4167
4370
|
}
|
|
4371
|
+
let fixed = holderOfRoot[0];
|
|
4168
4372
|
if (emitInputs) fixed.inputs = [...inputs.keys()].map((input) => input.toJSON());
|
|
4169
4373
|
return fixed;
|
|
4170
4374
|
}
|
|
@@ -4172,7 +4376,7 @@ var require_node = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/lib/
|
|
|
4172
4376
|
if (!this.proxyCache) this.proxyCache = new Proxy(this, this.getProxyProcessor());
|
|
4173
4377
|
return this.proxyCache;
|
|
4174
4378
|
}
|
|
4175
|
-
toString(stringifier = stringify
|
|
4379
|
+
toString(stringifier = stringify) {
|
|
4176
4380
|
if (stringifier.stringify) stringifier = stringifier.stringify;
|
|
4177
4381
|
let result = "";
|
|
4178
4382
|
stringifier(this, (i) => {
|
|
@@ -4186,29 +4390,29 @@ var require_node = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/lib/
|
|
|
4186
4390
|
return result.warn(text, data);
|
|
4187
4391
|
}
|
|
4188
4392
|
};
|
|
4189
|
-
module.exports = Node
|
|
4190
|
-
Node
|
|
4191
|
-
})
|
|
4393
|
+
module.exports = Node;
|
|
4394
|
+
Node.default = Node;
|
|
4395
|
+
}));
|
|
4192
4396
|
|
|
4193
4397
|
//#endregion
|
|
4194
4398
|
//#region ../../node_modules/postcss/lib/comment.js
|
|
4195
|
-
var require_comment = /* @__PURE__ */
|
|
4196
|
-
let Node
|
|
4197
|
-
var Comment
|
|
4399
|
+
var require_comment = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4400
|
+
let Node = require_node();
|
|
4401
|
+
var Comment = class extends Node {
|
|
4198
4402
|
constructor(defaults) {
|
|
4199
4403
|
super(defaults);
|
|
4200
4404
|
this.type = "comment";
|
|
4201
4405
|
}
|
|
4202
4406
|
};
|
|
4203
|
-
module.exports = Comment
|
|
4204
|
-
Comment
|
|
4205
|
-
})
|
|
4407
|
+
module.exports = Comment;
|
|
4408
|
+
Comment.default = Comment;
|
|
4409
|
+
}));
|
|
4206
4410
|
|
|
4207
4411
|
//#endregion
|
|
4208
4412
|
//#region ../../node_modules/postcss/lib/declaration.js
|
|
4209
|
-
var require_declaration = /* @__PURE__ */
|
|
4210
|
-
let Node
|
|
4211
|
-
var Declaration
|
|
4413
|
+
var require_declaration = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4414
|
+
let Node = require_node();
|
|
4415
|
+
var Declaration = class extends Node {
|
|
4212
4416
|
get variable() {
|
|
4213
4417
|
return this.prop.startsWith("--") || this.prop[0] === "$";
|
|
4214
4418
|
}
|
|
@@ -4221,30 +4425,42 @@ var require_declaration = /* @__PURE__ */ __commonJS({ "../../node_modules/postc
|
|
|
4221
4425
|
this.type = "decl";
|
|
4222
4426
|
}
|
|
4223
4427
|
};
|
|
4224
|
-
module.exports = Declaration
|
|
4225
|
-
Declaration
|
|
4226
|
-
})
|
|
4428
|
+
module.exports = Declaration;
|
|
4429
|
+
Declaration.default = Declaration;
|
|
4430
|
+
}));
|
|
4227
4431
|
|
|
4228
4432
|
//#endregion
|
|
4229
4433
|
//#region ../../node_modules/postcss/lib/container.js
|
|
4230
|
-
var require_container = /* @__PURE__ */
|
|
4231
|
-
let Comment
|
|
4232
|
-
let Declaration
|
|
4233
|
-
let Node
|
|
4234
|
-
let { isClean
|
|
4235
|
-
let AtRule
|
|
4434
|
+
var require_container = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4435
|
+
let Comment = require_comment();
|
|
4436
|
+
let Declaration = require_declaration();
|
|
4437
|
+
let Node = require_node();
|
|
4438
|
+
let { isClean, my } = require_symbols();
|
|
4439
|
+
let AtRule;
|
|
4440
|
+
let parse;
|
|
4441
|
+
let Root;
|
|
4442
|
+
let Rule;
|
|
4236
4443
|
function cleanSource(nodes) {
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4444
|
+
let stack = nodes.slice();
|
|
4445
|
+
while (stack.length > 0) {
|
|
4446
|
+
let node = stack.pop();
|
|
4447
|
+
delete node.source;
|
|
4448
|
+
if (node.nodes) {
|
|
4449
|
+
node.nodes = node.nodes.slice();
|
|
4450
|
+
for (let i of node.nodes) stack.push(i);
|
|
4451
|
+
}
|
|
4452
|
+
}
|
|
4453
|
+
return nodes.slice();
|
|
4242
4454
|
}
|
|
4243
4455
|
function markTreeDirty(node) {
|
|
4244
|
-
|
|
4245
|
-
|
|
4456
|
+
let stack = [node];
|
|
4457
|
+
while (stack.length > 0) {
|
|
4458
|
+
let next = stack.pop();
|
|
4459
|
+
next[isClean] = false;
|
|
4460
|
+
if (next.proxyOf.nodes) for (let i of next.proxyOf.nodes) stack.push(i);
|
|
4461
|
+
}
|
|
4246
4462
|
}
|
|
4247
|
-
var Container
|
|
4463
|
+
var Container = class Container extends Node {
|
|
4248
4464
|
get first() {
|
|
4249
4465
|
if (!this.proxyOf.nodes) return void 0;
|
|
4250
4466
|
return this.proxyOf.nodes[0];
|
|
@@ -4262,8 +4478,16 @@ var require_container = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss
|
|
|
4262
4478
|
return this;
|
|
4263
4479
|
}
|
|
4264
4480
|
cleanRaws(keepBetween) {
|
|
4265
|
-
|
|
4266
|
-
|
|
4481
|
+
let stack = [this];
|
|
4482
|
+
while (stack.length > 0) {
|
|
4483
|
+
let node = stack.pop();
|
|
4484
|
+
if (node !== this && node.cleanRaws !== Container.prototype.cleanRaws) {
|
|
4485
|
+
node.cleanRaws(keepBetween);
|
|
4486
|
+
continue;
|
|
4487
|
+
}
|
|
4488
|
+
Node.prototype.cleanRaws.call(node, keepBetween);
|
|
4489
|
+
if (node.nodes) for (let child of node.nodes) stack.push(child);
|
|
4490
|
+
}
|
|
4267
4491
|
}
|
|
4268
4492
|
each(callback) {
|
|
4269
4493
|
if (!this.proxyOf.nodes) return void 0;
|
|
@@ -4349,7 +4573,7 @@ var require_container = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss
|
|
|
4349
4573
|
return this;
|
|
4350
4574
|
}
|
|
4351
4575
|
normalize(nodes, sample) {
|
|
4352
|
-
if (typeof nodes === "string") nodes = cleanSource(parse
|
|
4576
|
+
if (typeof nodes === "string") nodes = cleanSource(parse(nodes).nodes);
|
|
4353
4577
|
else if (typeof nodes === "undefined") nodes = [];
|
|
4354
4578
|
else if (Array.isArray(nodes)) {
|
|
4355
4579
|
nodes = nodes.slice(0);
|
|
@@ -4361,17 +4585,17 @@ var require_container = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss
|
|
|
4361
4585
|
else if (nodes.prop) {
|
|
4362
4586
|
if (typeof nodes.value === "undefined") throw new Error("Value field is missed in node creation");
|
|
4363
4587
|
else if (typeof nodes.value !== "string") nodes.value = String(nodes.value);
|
|
4364
|
-
nodes = [new Declaration
|
|
4365
|
-
} else if (nodes.selector || nodes.selectors) nodes = [new Rule
|
|
4366
|
-
else if (nodes.name) nodes = [new AtRule
|
|
4367
|
-
else if (nodes.text) nodes = [new Comment
|
|
4588
|
+
nodes = [new Declaration(nodes)];
|
|
4589
|
+
} else if (nodes.selector || nodes.selectors) nodes = [new Rule(nodes)];
|
|
4590
|
+
else if (nodes.name) nodes = [new AtRule(nodes)];
|
|
4591
|
+
else if (nodes.text) nodes = [new Comment(nodes)];
|
|
4368
4592
|
else throw new Error("Unknown node type in node creation");
|
|
4369
4593
|
return nodes.map((i) => {
|
|
4370
4594
|
/* c8 ignore next */
|
|
4371
|
-
if (!i[my
|
|
4595
|
+
if (!i[my]) Container.rebuild(i);
|
|
4372
4596
|
i = i.proxyOf;
|
|
4373
4597
|
if (i.parent) i.parent.removeChild(i);
|
|
4374
|
-
if (i[isClean
|
|
4598
|
+
if (i[isClean]) markTreeDirty(i);
|
|
4375
4599
|
if (!i.raws) i.raws = {};
|
|
4376
4600
|
if (typeof i.raws.before === "undefined") {
|
|
4377
4601
|
if (sample && typeof sample.raws.before !== "undefined") i.raws.before = sample.raws.before.replace(/\S/g, "");
|
|
@@ -4418,10 +4642,10 @@ var require_container = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss
|
|
|
4418
4642
|
callback = opts;
|
|
4419
4643
|
opts = {};
|
|
4420
4644
|
}
|
|
4421
|
-
this.walkDecls((decl
|
|
4422
|
-
if (opts.props && !opts.props.includes(decl
|
|
4423
|
-
if (opts.fast && !decl
|
|
4424
|
-
decl
|
|
4645
|
+
this.walkDecls((decl) => {
|
|
4646
|
+
if (opts.props && !opts.props.includes(decl.prop)) return;
|
|
4647
|
+
if (opts.fast && !decl.value.includes(opts.fast)) return;
|
|
4648
|
+
decl.value = decl.value.replace(pattern, callback);
|
|
4425
4649
|
});
|
|
4426
4650
|
this.markDirty();
|
|
4427
4651
|
return this;
|
|
@@ -4430,16 +4654,38 @@ var require_container = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss
|
|
|
4430
4654
|
return this.nodes.some(condition);
|
|
4431
4655
|
}
|
|
4432
4656
|
walk(callback) {
|
|
4433
|
-
|
|
4657
|
+
if (!this.proxyOf.nodes) return void 0;
|
|
4658
|
+
let stack = [{
|
|
4659
|
+
iterator: this.getIterator(),
|
|
4660
|
+
node: this.proxyOf
|
|
4661
|
+
}];
|
|
4662
|
+
while (stack.length > 0) {
|
|
4663
|
+
let { iterator, node } = stack[stack.length - 1];
|
|
4664
|
+
let index = node.indexes[iterator];
|
|
4665
|
+
if (index >= node.proxyOf.nodes.length) {
|
|
4666
|
+
delete node.indexes[iterator];
|
|
4667
|
+
stack.pop();
|
|
4668
|
+
let parent = stack[stack.length - 1];
|
|
4669
|
+
if (parent) parent.node.indexes[parent.iterator] += 1;
|
|
4670
|
+
continue;
|
|
4671
|
+
}
|
|
4672
|
+
let child = node.proxyOf.nodes[index];
|
|
4434
4673
|
let result;
|
|
4435
4674
|
try {
|
|
4436
|
-
result = callback(child,
|
|
4675
|
+
result = callback(child, index);
|
|
4437
4676
|
} catch (e) {
|
|
4438
4677
|
throw child.addToError(e);
|
|
4439
4678
|
}
|
|
4440
|
-
if (result
|
|
4441
|
-
|
|
4442
|
-
|
|
4679
|
+
if (result === false) {
|
|
4680
|
+
for (let opened of stack) delete opened.node.indexes[opened.iterator];
|
|
4681
|
+
return false;
|
|
4682
|
+
}
|
|
4683
|
+
if (child.walk && child.proxyOf.nodes) stack.push({
|
|
4684
|
+
iterator: child.getIterator(),
|
|
4685
|
+
node: child
|
|
4686
|
+
});
|
|
4687
|
+
else node.indexes[iterator] += 1;
|
|
4688
|
+
}
|
|
4443
4689
|
}
|
|
4444
4690
|
walkAtRules(name, callback) {
|
|
4445
4691
|
if (!callback) {
|
|
@@ -4489,40 +4735,42 @@ var require_container = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss
|
|
|
4489
4735
|
});
|
|
4490
4736
|
}
|
|
4491
4737
|
};
|
|
4492
|
-
Container
|
|
4493
|
-
parse
|
|
4738
|
+
Container.registerParse = (dependant) => {
|
|
4739
|
+
parse = dependant;
|
|
4494
4740
|
};
|
|
4495
|
-
Container
|
|
4496
|
-
Rule
|
|
4741
|
+
Container.registerRule = (dependant) => {
|
|
4742
|
+
Rule = dependant;
|
|
4497
4743
|
};
|
|
4498
|
-
Container
|
|
4499
|
-
AtRule
|
|
4744
|
+
Container.registerAtRule = (dependant) => {
|
|
4745
|
+
AtRule = dependant;
|
|
4500
4746
|
};
|
|
4501
|
-
Container
|
|
4502
|
-
Root
|
|
4747
|
+
Container.registerRoot = (dependant) => {
|
|
4748
|
+
Root = dependant;
|
|
4503
4749
|
};
|
|
4504
|
-
module.exports = Container
|
|
4505
|
-
Container
|
|
4750
|
+
module.exports = Container;
|
|
4751
|
+
Container.default = Container;
|
|
4506
4752
|
/* c8 ignore start */
|
|
4507
|
-
Container
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4753
|
+
Container.rebuild = (node) => {
|
|
4754
|
+
let stack = [node];
|
|
4755
|
+
while (stack.length > 0) {
|
|
4756
|
+
let next = stack.pop();
|
|
4757
|
+
if (next.type === "atrule") Object.setPrototypeOf(next, AtRule.prototype);
|
|
4758
|
+
else if (next.type === "rule") Object.setPrototypeOf(next, Rule.prototype);
|
|
4759
|
+
else if (next.type === "decl") Object.setPrototypeOf(next, Declaration.prototype);
|
|
4760
|
+
else if (next.type === "comment") Object.setPrototypeOf(next, Comment.prototype);
|
|
4761
|
+
else if (next.type === "root") Object.setPrototypeOf(next, Root.prototype);
|
|
4762
|
+
next[my] = true;
|
|
4763
|
+
if (next.nodes) for (let child of next.nodes) stack.push(child);
|
|
4764
|
+
}
|
|
4517
4765
|
};
|
|
4518
|
-
})
|
|
4766
|
+
}));
|
|
4519
4767
|
/* c8 ignore stop */
|
|
4520
4768
|
|
|
4521
4769
|
//#endregion
|
|
4522
4770
|
//#region ../../node_modules/postcss/lib/at-rule.js
|
|
4523
|
-
var require_at_rule = /* @__PURE__ */
|
|
4524
|
-
let Container
|
|
4525
|
-
var AtRule
|
|
4771
|
+
var require_at_rule = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4772
|
+
let Container = require_container();
|
|
4773
|
+
var AtRule = class extends Container {
|
|
4526
4774
|
constructor(defaults) {
|
|
4527
4775
|
super(defaults);
|
|
4528
4776
|
this.type = "atrule";
|
|
@@ -4536,17 +4784,18 @@ var require_at_rule = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/l
|
|
|
4536
4784
|
return super.prepend(...children);
|
|
4537
4785
|
}
|
|
4538
4786
|
};
|
|
4539
|
-
module.exports = AtRule
|
|
4540
|
-
AtRule
|
|
4541
|
-
Container
|
|
4542
|
-
})
|
|
4787
|
+
module.exports = AtRule;
|
|
4788
|
+
AtRule.default = AtRule;
|
|
4789
|
+
Container.registerAtRule(AtRule);
|
|
4790
|
+
}));
|
|
4543
4791
|
|
|
4544
4792
|
//#endregion
|
|
4545
4793
|
//#region ../../node_modules/postcss/lib/document.js
|
|
4546
|
-
var require_document = /* @__PURE__ */
|
|
4547
|
-
let Container
|
|
4548
|
-
let LazyResult
|
|
4549
|
-
|
|
4794
|
+
var require_document = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4795
|
+
let Container = require_container();
|
|
4796
|
+
let LazyResult;
|
|
4797
|
+
let Processor;
|
|
4798
|
+
var Document = class extends Container {
|
|
4550
4799
|
constructor(defaults) {
|
|
4551
4800
|
super({
|
|
4552
4801
|
type: "document",
|
|
@@ -4555,46 +4804,46 @@ var require_document = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/
|
|
|
4555
4804
|
if (!this.nodes) this.nodes = [];
|
|
4556
4805
|
}
|
|
4557
4806
|
toResult(opts = {}) {
|
|
4558
|
-
return new LazyResult
|
|
4807
|
+
return new LazyResult(new Processor(), this, opts).stringify();
|
|
4559
4808
|
}
|
|
4560
4809
|
};
|
|
4561
|
-
Document
|
|
4562
|
-
LazyResult
|
|
4810
|
+
Document.registerLazyResult = (dependant) => {
|
|
4811
|
+
LazyResult = dependant;
|
|
4563
4812
|
};
|
|
4564
|
-
Document
|
|
4565
|
-
Processor
|
|
4813
|
+
Document.registerProcessor = (dependant) => {
|
|
4814
|
+
Processor = dependant;
|
|
4566
4815
|
};
|
|
4567
|
-
module.exports = Document
|
|
4568
|
-
Document
|
|
4569
|
-
})
|
|
4816
|
+
module.exports = Document;
|
|
4817
|
+
Document.default = Document;
|
|
4818
|
+
}));
|
|
4570
4819
|
|
|
4571
4820
|
//#endregion
|
|
4572
4821
|
//#region ../../node_modules/postcss/node_modules/nanoid/non-secure/index.cjs
|
|
4573
|
-
var require_non_secure = /* @__PURE__ */
|
|
4822
|
+
var require_non_secure = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4574
4823
|
let urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
4575
4824
|
let customAlphabet = (alphabet, defaultSize = 21) => {
|
|
4576
4825
|
return (size = defaultSize) => {
|
|
4577
4826
|
let id = "";
|
|
4578
4827
|
let i = size | 0;
|
|
4579
|
-
while (i--) id += alphabet[Math.random() * alphabet.length | 0];
|
|
4828
|
+
while (i-- > 0) id += alphabet[Math.random() * alphabet.length | 0];
|
|
4580
4829
|
return id;
|
|
4581
4830
|
};
|
|
4582
4831
|
};
|
|
4583
|
-
let nanoid
|
|
4832
|
+
let nanoid = (size = 21) => {
|
|
4584
4833
|
let id = "";
|
|
4585
4834
|
let i = size | 0;
|
|
4586
|
-
while (i--) id += urlAlphabet[Math.random() * 64 | 0];
|
|
4835
|
+
while (i-- > 0) id += urlAlphabet[Math.random() * 64 | 0];
|
|
4587
4836
|
return id;
|
|
4588
4837
|
};
|
|
4589
4838
|
module.exports = {
|
|
4590
|
-
nanoid
|
|
4839
|
+
nanoid,
|
|
4591
4840
|
customAlphabet
|
|
4592
4841
|
};
|
|
4593
|
-
})
|
|
4842
|
+
}));
|
|
4594
4843
|
|
|
4595
4844
|
//#endregion
|
|
4596
4845
|
//#region ../../node_modules/source-map-js/lib/base64.js
|
|
4597
|
-
var require_base64 = /* @__PURE__ */
|
|
4846
|
+
var require_base64 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4598
4847
|
var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
|
|
4599
4848
|
/**
|
|
4600
4849
|
* Encode an integer in the range of 0 to 63 to a single base 64 digit.
|
|
@@ -4625,11 +4874,11 @@ var require_base64 = /* @__PURE__ */ __commonJS({ "../../node_modules/source-map
|
|
|
4625
4874
|
if (charCode == slash) return 63;
|
|
4626
4875
|
return -1;
|
|
4627
4876
|
};
|
|
4628
|
-
})
|
|
4877
|
+
}));
|
|
4629
4878
|
|
|
4630
4879
|
//#endregion
|
|
4631
4880
|
//#region ../../node_modules/source-map-js/lib/base64-vlq.js
|
|
4632
|
-
var require_base64_vlq = /* @__PURE__ */
|
|
4881
|
+
var require_base64_vlq = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4633
4882
|
var base64 = require_base64();
|
|
4634
4883
|
var VLQ_BASE_SHIFT = 5;
|
|
4635
4884
|
var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
|
|
@@ -4691,11 +4940,11 @@ var require_base64_vlq = /* @__PURE__ */ __commonJS({ "../../node_modules/source
|
|
|
4691
4940
|
aOutParam.value = fromVLQSigned(result);
|
|
4692
4941
|
aOutParam.rest = aIndex;
|
|
4693
4942
|
};
|
|
4694
|
-
})
|
|
4943
|
+
}));
|
|
4695
4944
|
|
|
4696
4945
|
//#endregion
|
|
4697
4946
|
//#region ../../node_modules/source-map-js/lib/util.js
|
|
4698
|
-
var require_util = /* @__PURE__ */
|
|
4947
|
+
var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4699
4948
|
/**
|
|
4700
4949
|
* This is a helper function for getting values from parameter/options
|
|
4701
4950
|
* objects.
|
|
@@ -4774,47 +5023,49 @@ var require_util = /* @__PURE__ */ __commonJS({ "../../node_modules/source-map-j
|
|
|
4774
5023
|
*
|
|
4775
5024
|
* @param aPath The path or url to normalize.
|
|
4776
5025
|
*/
|
|
4777
|
-
var normalize = lruMemoize(function normalize
|
|
4778
|
-
var path
|
|
5026
|
+
var normalize = lruMemoize(function normalize(aPath) {
|
|
5027
|
+
var path = aPath;
|
|
4779
5028
|
var url = urlParse(aPath);
|
|
4780
5029
|
if (url) {
|
|
4781
5030
|
if (!url.path) return aPath;
|
|
4782
|
-
path
|
|
5031
|
+
path = url.path;
|
|
4783
5032
|
}
|
|
4784
|
-
var isAbsolute
|
|
5033
|
+
var isAbsolute = exports.isAbsolute(path);
|
|
4785
5034
|
var parts = [];
|
|
4786
5035
|
var start = 0;
|
|
4787
5036
|
var i = 0;
|
|
4788
5037
|
while (true) {
|
|
4789
5038
|
start = i;
|
|
4790
|
-
i = path
|
|
5039
|
+
i = path.indexOf("/", start);
|
|
4791
5040
|
if (i === -1) {
|
|
4792
|
-
parts.push(path
|
|
5041
|
+
parts.push(path.slice(start));
|
|
4793
5042
|
break;
|
|
4794
5043
|
} else {
|
|
4795
|
-
parts.push(path
|
|
4796
|
-
while (i < path
|
|
5044
|
+
parts.push(path.slice(start, i));
|
|
5045
|
+
while (i < path.length && path[i] === "/") i++;
|
|
4797
5046
|
}
|
|
4798
5047
|
}
|
|
4799
5048
|
for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
|
|
4800
5049
|
part = parts[i];
|
|
4801
5050
|
if (part === ".") parts.splice(i, 1);
|
|
4802
5051
|
else if (part === "..") up++;
|
|
4803
|
-
else if (up > 0)
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
5052
|
+
else if (up > 0) {
|
|
5053
|
+
if (part === "") {
|
|
5054
|
+
parts.splice(i + 1, up);
|
|
5055
|
+
up = 0;
|
|
5056
|
+
} else {
|
|
5057
|
+
parts.splice(i, 2);
|
|
5058
|
+
up--;
|
|
5059
|
+
}
|
|
4809
5060
|
}
|
|
4810
5061
|
}
|
|
4811
|
-
path
|
|
4812
|
-
if (path
|
|
5062
|
+
path = parts.join("/");
|
|
5063
|
+
if (path === "") path = isAbsolute ? "/" : ".";
|
|
4813
5064
|
if (url) {
|
|
4814
|
-
url.path = path
|
|
5065
|
+
url.path = path;
|
|
4815
5066
|
return urlGenerate(url);
|
|
4816
5067
|
}
|
|
4817
|
-
return path
|
|
5068
|
+
return path;
|
|
4818
5069
|
});
|
|
4819
5070
|
exports.normalize = normalize;
|
|
4820
5071
|
/**
|
|
@@ -4833,7 +5084,7 @@ var require_util = /* @__PURE__ */ __commonJS({ "../../node_modules/source-map-j
|
|
|
4833
5084
|
* - Otherwise the two paths are joined with a slash.
|
|
4834
5085
|
* - Joining for example 'http://' and 'www.example.com' is also supported.
|
|
4835
5086
|
*/
|
|
4836
|
-
function join
|
|
5087
|
+
function join(aRoot, aPath) {
|
|
4837
5088
|
if (aRoot === "") aRoot = ".";
|
|
4838
5089
|
if (aPath === "") aPath = ".";
|
|
4839
5090
|
var aPathUrl = urlParse(aPath);
|
|
@@ -4855,7 +5106,7 @@ var require_util = /* @__PURE__ */ __commonJS({ "../../node_modules/source-map-j
|
|
|
4855
5106
|
}
|
|
4856
5107
|
return joined;
|
|
4857
5108
|
}
|
|
4858
|
-
exports.join = join
|
|
5109
|
+
exports.join = join;
|
|
4859
5110
|
exports.isAbsolute = function(aPath) {
|
|
4860
5111
|
return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
|
|
4861
5112
|
};
|
|
@@ -4865,7 +5116,7 @@ var require_util = /* @__PURE__ */ __commonJS({ "../../node_modules/source-map-j
|
|
|
4865
5116
|
* @param aRoot The root path or URL.
|
|
4866
5117
|
* @param aPath The path or URL to be made relative to aRoot.
|
|
4867
5118
|
*/
|
|
4868
|
-
function relative
|
|
5119
|
+
function relative(aRoot, aPath) {
|
|
4869
5120
|
if (aRoot === "") aRoot = ".";
|
|
4870
5121
|
aRoot = aRoot.replace(/\/$/, "");
|
|
4871
5122
|
var level = 0;
|
|
@@ -4878,7 +5129,7 @@ var require_util = /* @__PURE__ */ __commonJS({ "../../node_modules/source-map-j
|
|
|
4878
5129
|
}
|
|
4879
5130
|
return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
|
|
4880
5131
|
}
|
|
4881
|
-
exports.relative = relative
|
|
5132
|
+
exports.relative = relative;
|
|
4882
5133
|
var supportsNullProto = function() {
|
|
4883
5134
|
return !("__proto__" in Object.create(null));
|
|
4884
5135
|
}();
|
|
@@ -5032,17 +5283,17 @@ var require_util = /* @__PURE__ */ __commonJS({ "../../node_modules/source-map-j
|
|
|
5032
5283
|
var index = parsed.path.lastIndexOf("/");
|
|
5033
5284
|
if (index >= 0) parsed.path = parsed.path.substring(0, index + 1);
|
|
5034
5285
|
}
|
|
5035
|
-
sourceURL = join
|
|
5286
|
+
sourceURL = join(urlGenerate(parsed), sourceURL);
|
|
5036
5287
|
}
|
|
5037
5288
|
return normalize(sourceURL);
|
|
5038
5289
|
}
|
|
5039
5290
|
exports.computeSourceURL = computeSourceURL;
|
|
5040
|
-
})
|
|
5291
|
+
}));
|
|
5041
5292
|
|
|
5042
5293
|
//#endregion
|
|
5043
5294
|
//#region ../../node_modules/source-map-js/lib/array-set.js
|
|
5044
|
-
var require_array_set = /* @__PURE__ */
|
|
5045
|
-
var util
|
|
5295
|
+
var require_array_set = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5296
|
+
var util = require_util();
|
|
5046
5297
|
var has = Object.prototype.hasOwnProperty;
|
|
5047
5298
|
var hasNativeMap = typeof Map !== "undefined";
|
|
5048
5299
|
/**
|
|
@@ -5051,15 +5302,15 @@ var require_array_set = /* @__PURE__ */ __commonJS({ "../../node_modules/source-
|
|
|
5051
5302
|
* element is O(1). Removing elements from the set is not supported. Only
|
|
5052
5303
|
* strings are supported for membership.
|
|
5053
5304
|
*/
|
|
5054
|
-
function ArraySet
|
|
5305
|
+
function ArraySet() {
|
|
5055
5306
|
this._array = [];
|
|
5056
5307
|
this._set = hasNativeMap ? /* @__PURE__ */ new Map() : Object.create(null);
|
|
5057
5308
|
}
|
|
5058
5309
|
/**
|
|
5059
5310
|
* Static method for creating ArraySet instances from an existing array.
|
|
5060
5311
|
*/
|
|
5061
|
-
ArraySet
|
|
5062
|
-
var set = new ArraySet
|
|
5312
|
+
ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
|
|
5313
|
+
var set = new ArraySet();
|
|
5063
5314
|
for (var i = 0, len = aArray.length; i < len; i++) set.add(aArray[i], aAllowDuplicates);
|
|
5064
5315
|
return set;
|
|
5065
5316
|
};
|
|
@@ -5069,7 +5320,7 @@ var require_array_set = /* @__PURE__ */ __commonJS({ "../../node_modules/source-
|
|
|
5069
5320
|
*
|
|
5070
5321
|
* @returns Number
|
|
5071
5322
|
*/
|
|
5072
|
-
ArraySet
|
|
5323
|
+
ArraySet.prototype.size = function ArraySet_size() {
|
|
5073
5324
|
return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
|
|
5074
5325
|
};
|
|
5075
5326
|
/**
|
|
@@ -5077,23 +5328,25 @@ var require_array_set = /* @__PURE__ */ __commonJS({ "../../node_modules/source-
|
|
|
5077
5328
|
*
|
|
5078
5329
|
* @param String aStr
|
|
5079
5330
|
*/
|
|
5080
|
-
ArraySet
|
|
5081
|
-
var sStr = hasNativeMap ? aStr : util
|
|
5331
|
+
ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
|
|
5332
|
+
var sStr = hasNativeMap ? aStr : util.toSetString(aStr);
|
|
5082
5333
|
var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
|
|
5083
5334
|
var idx = this._array.length;
|
|
5084
5335
|
if (!isDuplicate || aAllowDuplicates) this._array.push(aStr);
|
|
5085
|
-
if (!isDuplicate)
|
|
5086
|
-
|
|
5336
|
+
if (!isDuplicate) {
|
|
5337
|
+
if (hasNativeMap) this._set.set(aStr, idx);
|
|
5338
|
+
else this._set[sStr] = idx;
|
|
5339
|
+
}
|
|
5087
5340
|
};
|
|
5088
5341
|
/**
|
|
5089
5342
|
* Is the given string a member of this set?
|
|
5090
5343
|
*
|
|
5091
5344
|
* @param String aStr
|
|
5092
5345
|
*/
|
|
5093
|
-
ArraySet
|
|
5346
|
+
ArraySet.prototype.has = function ArraySet_has(aStr) {
|
|
5094
5347
|
if (hasNativeMap) return this._set.has(aStr);
|
|
5095
5348
|
else {
|
|
5096
|
-
var sStr = util
|
|
5349
|
+
var sStr = util.toSetString(aStr);
|
|
5097
5350
|
return has.call(this._set, sStr);
|
|
5098
5351
|
}
|
|
5099
5352
|
};
|
|
@@ -5102,12 +5355,12 @@ var require_array_set = /* @__PURE__ */ __commonJS({ "../../node_modules/source-
|
|
|
5102
5355
|
*
|
|
5103
5356
|
* @param String aStr
|
|
5104
5357
|
*/
|
|
5105
|
-
ArraySet
|
|
5358
|
+
ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
|
|
5106
5359
|
if (hasNativeMap) {
|
|
5107
5360
|
var idx = this._set.get(aStr);
|
|
5108
5361
|
if (idx >= 0) return idx;
|
|
5109
5362
|
} else {
|
|
5110
|
-
var sStr = util
|
|
5363
|
+
var sStr = util.toSetString(aStr);
|
|
5111
5364
|
if (has.call(this._set, sStr)) return this._set[sStr];
|
|
5112
5365
|
}
|
|
5113
5366
|
throw new Error("\"" + aStr + "\" is not in the set.");
|
|
@@ -5117,7 +5370,7 @@ var require_array_set = /* @__PURE__ */ __commonJS({ "../../node_modules/source-
|
|
|
5117
5370
|
*
|
|
5118
5371
|
* @param Number aIdx
|
|
5119
5372
|
*/
|
|
5120
|
-
ArraySet
|
|
5373
|
+
ArraySet.prototype.at = function ArraySet_at(aIdx) {
|
|
5121
5374
|
if (aIdx >= 0 && aIdx < this._array.length) return this._array[aIdx];
|
|
5122
5375
|
throw new Error("No element indexed by " + aIdx);
|
|
5123
5376
|
};
|
|
@@ -5126,16 +5379,16 @@ var require_array_set = /* @__PURE__ */ __commonJS({ "../../node_modules/source-
|
|
|
5126
5379
|
* indicated by indexOf). Note that this is a copy of the internal array used
|
|
5127
5380
|
* for storing the members so that no one can mess with internal state.
|
|
5128
5381
|
*/
|
|
5129
|
-
ArraySet
|
|
5382
|
+
ArraySet.prototype.toArray = function ArraySet_toArray() {
|
|
5130
5383
|
return this._array.slice();
|
|
5131
5384
|
};
|
|
5132
|
-
exports.ArraySet = ArraySet
|
|
5133
|
-
})
|
|
5385
|
+
exports.ArraySet = ArraySet;
|
|
5386
|
+
}));
|
|
5134
5387
|
|
|
5135
5388
|
//#endregion
|
|
5136
5389
|
//#region ../../node_modules/source-map-js/lib/mapping-list.js
|
|
5137
|
-
var require_mapping_list = /* @__PURE__ */
|
|
5138
|
-
var util
|
|
5390
|
+
var require_mapping_list = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5391
|
+
var util = require_util();
|
|
5139
5392
|
/**
|
|
5140
5393
|
* Determine whether mappingB is after mappingA with respect to generated
|
|
5141
5394
|
* position.
|
|
@@ -5145,14 +5398,14 @@ var require_mapping_list = /* @__PURE__ */ __commonJS({ "../../node_modules/sour
|
|
|
5145
5398
|
var lineB = mappingB.generatedLine;
|
|
5146
5399
|
var columnA = mappingA.generatedColumn;
|
|
5147
5400
|
var columnB = mappingB.generatedColumn;
|
|
5148
|
-
return lineB > lineA || lineB == lineA && columnB >= columnA || util
|
|
5401
|
+
return lineB > lineA || lineB == lineA && columnB >= columnA || util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
|
|
5149
5402
|
}
|
|
5150
5403
|
/**
|
|
5151
5404
|
* A data structure to provide a sorted view of accumulated mappings in a
|
|
5152
5405
|
* performance conscious manner. It trades a neglibable overhead in general
|
|
5153
5406
|
* case for a large speedup in case of mappings being added in order.
|
|
5154
5407
|
*/
|
|
5155
|
-
function MappingList
|
|
5408
|
+
function MappingList() {
|
|
5156
5409
|
this._array = [];
|
|
5157
5410
|
this._sorted = true;
|
|
5158
5411
|
this._last = {
|
|
@@ -5166,7 +5419,7 @@ var require_mapping_list = /* @__PURE__ */ __commonJS({ "../../node_modules/sour
|
|
|
5166
5419
|
*
|
|
5167
5420
|
* NOTE: The order of the mappings is NOT guaranteed.
|
|
5168
5421
|
*/
|
|
5169
|
-
MappingList
|
|
5422
|
+
MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) {
|
|
5170
5423
|
this._array.forEach(aCallback, aThisArg);
|
|
5171
5424
|
};
|
|
5172
5425
|
/**
|
|
@@ -5174,7 +5427,7 @@ var require_mapping_list = /* @__PURE__ */ __commonJS({ "../../node_modules/sour
|
|
|
5174
5427
|
*
|
|
5175
5428
|
* @param Object aMapping
|
|
5176
5429
|
*/
|
|
5177
|
-
MappingList
|
|
5430
|
+
MappingList.prototype.add = function MappingList_add(aMapping) {
|
|
5178
5431
|
if (generatedPositionAfter(this._last, aMapping)) {
|
|
5179
5432
|
this._last = aMapping;
|
|
5180
5433
|
this._array.push(aMapping);
|
|
@@ -5192,22 +5445,22 @@ var require_mapping_list = /* @__PURE__ */ __commonJS({ "../../node_modules/sour
|
|
|
5192
5445
|
* an immutable borrow. If you want to take ownership, you must make your own
|
|
5193
5446
|
* copy.
|
|
5194
5447
|
*/
|
|
5195
|
-
MappingList
|
|
5448
|
+
MappingList.prototype.toArray = function MappingList_toArray() {
|
|
5196
5449
|
if (!this._sorted) {
|
|
5197
|
-
this._array.sort(util
|
|
5450
|
+
this._array.sort(util.compareByGeneratedPositionsInflated);
|
|
5198
5451
|
this._sorted = true;
|
|
5199
5452
|
}
|
|
5200
5453
|
return this._array;
|
|
5201
5454
|
};
|
|
5202
|
-
exports.MappingList = MappingList
|
|
5203
|
-
})
|
|
5455
|
+
exports.MappingList = MappingList;
|
|
5456
|
+
}));
|
|
5204
5457
|
|
|
5205
5458
|
//#endregion
|
|
5206
5459
|
//#region ../../node_modules/source-map-js/lib/source-map-generator.js
|
|
5207
|
-
var require_source_map_generator = /* @__PURE__ */
|
|
5208
|
-
var base64VLQ
|
|
5209
|
-
var util
|
|
5210
|
-
var ArraySet
|
|
5460
|
+
var require_source_map_generator = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5461
|
+
var base64VLQ = require_base64_vlq();
|
|
5462
|
+
var util = require_util();
|
|
5463
|
+
var ArraySet = require_array_set().ArraySet;
|
|
5211
5464
|
var MappingList = require_mapping_list().MappingList;
|
|
5212
5465
|
/**
|
|
5213
5466
|
* An instance of the SourceMapGenerator represents a source map which is
|
|
@@ -5217,26 +5470,26 @@ var require_source_map_generator = /* @__PURE__ */ __commonJS({ "../../node_modu
|
|
|
5217
5470
|
* - file: The filename of the generated source.
|
|
5218
5471
|
* - sourceRoot: A root for all relative URLs in this source map.
|
|
5219
5472
|
*/
|
|
5220
|
-
function SourceMapGenerator
|
|
5473
|
+
function SourceMapGenerator(aArgs) {
|
|
5221
5474
|
if (!aArgs) aArgs = {};
|
|
5222
|
-
this._file = util
|
|
5223
|
-
this._sourceRoot = util
|
|
5224
|
-
this._skipValidation = util
|
|
5225
|
-
this._ignoreInvalidMapping = util
|
|
5226
|
-
this._sources = new ArraySet
|
|
5227
|
-
this._names = new ArraySet
|
|
5475
|
+
this._file = util.getArg(aArgs, "file", null);
|
|
5476
|
+
this._sourceRoot = util.getArg(aArgs, "sourceRoot", null);
|
|
5477
|
+
this._skipValidation = util.getArg(aArgs, "skipValidation", false);
|
|
5478
|
+
this._ignoreInvalidMapping = util.getArg(aArgs, "ignoreInvalidMapping", false);
|
|
5479
|
+
this._sources = new ArraySet();
|
|
5480
|
+
this._names = new ArraySet();
|
|
5228
5481
|
this._mappings = new MappingList();
|
|
5229
5482
|
this._sourcesContents = null;
|
|
5230
5483
|
}
|
|
5231
|
-
SourceMapGenerator
|
|
5484
|
+
SourceMapGenerator.prototype._version = 3;
|
|
5232
5485
|
/**
|
|
5233
5486
|
* Creates a new SourceMapGenerator based on a SourceMapConsumer
|
|
5234
5487
|
*
|
|
5235
5488
|
* @param aSourceMapConsumer The SourceMap.
|
|
5236
5489
|
*/
|
|
5237
|
-
SourceMapGenerator
|
|
5490
|
+
SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer, generatorOps) {
|
|
5238
5491
|
var sourceRoot = aSourceMapConsumer.sourceRoot;
|
|
5239
|
-
var generator = new SourceMapGenerator
|
|
5492
|
+
var generator = new SourceMapGenerator(Object.assign(generatorOps || {}, {
|
|
5240
5493
|
file: aSourceMapConsumer.file,
|
|
5241
5494
|
sourceRoot
|
|
5242
5495
|
}));
|
|
@@ -5247,7 +5500,7 @@ var require_source_map_generator = /* @__PURE__ */ __commonJS({ "../../node_modu
|
|
|
5247
5500
|
} };
|
|
5248
5501
|
if (mapping.source != null) {
|
|
5249
5502
|
newMapping.source = mapping.source;
|
|
5250
|
-
if (sourceRoot != null) newMapping.source = util
|
|
5503
|
+
if (sourceRoot != null) newMapping.source = util.relative(sourceRoot, newMapping.source);
|
|
5251
5504
|
newMapping.original = {
|
|
5252
5505
|
line: mapping.originalLine,
|
|
5253
5506
|
column: mapping.originalColumn
|
|
@@ -5258,7 +5511,7 @@ var require_source_map_generator = /* @__PURE__ */ __commonJS({ "../../node_modu
|
|
|
5258
5511
|
});
|
|
5259
5512
|
aSourceMapConsumer.sources.forEach(function(sourceFile) {
|
|
5260
5513
|
var sourceRelative = sourceFile;
|
|
5261
|
-
if (sourceRoot !== null) sourceRelative = util
|
|
5514
|
+
if (sourceRoot !== null) sourceRelative = util.relative(sourceRoot, sourceFile);
|
|
5262
5515
|
if (!generator._sources.has(sourceRelative)) generator._sources.add(sourceRelative);
|
|
5263
5516
|
var content = aSourceMapConsumer.sourceContentFor(sourceFile);
|
|
5264
5517
|
if (content != null) generator.setSourceContent(sourceFile, content);
|
|
@@ -5275,11 +5528,11 @@ var require_source_map_generator = /* @__PURE__ */ __commonJS({ "../../node_modu
|
|
|
5275
5528
|
* - source: The original source file (relative to the sourceRoot).
|
|
5276
5529
|
* - name: An optional original token name for this mapping.
|
|
5277
5530
|
*/
|
|
5278
|
-
SourceMapGenerator
|
|
5279
|
-
var generated = util
|
|
5280
|
-
var original = util
|
|
5281
|
-
var source = util
|
|
5282
|
-
var name = util
|
|
5531
|
+
SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) {
|
|
5532
|
+
var generated = util.getArg(aArgs, "generated");
|
|
5533
|
+
var original = util.getArg(aArgs, "original", null);
|
|
5534
|
+
var source = util.getArg(aArgs, "source", null);
|
|
5535
|
+
var name = util.getArg(aArgs, "name", null);
|
|
5283
5536
|
if (!this._skipValidation) {
|
|
5284
5537
|
if (this._validateMapping(generated, original, source, name) === false) return;
|
|
5285
5538
|
}
|
|
@@ -5303,14 +5556,14 @@ var require_source_map_generator = /* @__PURE__ */ __commonJS({ "../../node_modu
|
|
|
5303
5556
|
/**
|
|
5304
5557
|
* Set the source content for a source file.
|
|
5305
5558
|
*/
|
|
5306
|
-
SourceMapGenerator
|
|
5559
|
+
SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
|
|
5307
5560
|
var source = aSourceFile;
|
|
5308
|
-
if (this._sourceRoot != null) source = util
|
|
5561
|
+
if (this._sourceRoot != null) source = util.relative(this._sourceRoot, source);
|
|
5309
5562
|
if (aSourceContent != null) {
|
|
5310
5563
|
if (!this._sourcesContents) this._sourcesContents = Object.create(null);
|
|
5311
|
-
this._sourcesContents[util
|
|
5564
|
+
this._sourcesContents[util.toSetString(source)] = aSourceContent;
|
|
5312
5565
|
} else if (this._sourcesContents) {
|
|
5313
|
-
delete this._sourcesContents[util
|
|
5566
|
+
delete this._sourcesContents[util.toSetString(source)];
|
|
5314
5567
|
if (Object.keys(this._sourcesContents).length === 0) this._sourcesContents = null;
|
|
5315
5568
|
}
|
|
5316
5569
|
};
|
|
@@ -5330,16 +5583,16 @@ var require_source_map_generator = /* @__PURE__ */ __commonJS({ "../../node_modu
|
|
|
5330
5583
|
* paths. If so, those relative source paths need to be rewritten
|
|
5331
5584
|
* relative to the SourceMapGenerator.
|
|
5332
5585
|
*/
|
|
5333
|
-
SourceMapGenerator
|
|
5586
|
+
SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
|
|
5334
5587
|
var sourceFile = aSourceFile;
|
|
5335
5588
|
if (aSourceFile == null) {
|
|
5336
5589
|
if (aSourceMapConsumer.file == null) throw new Error("SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's \"file\" property. Both were omitted.");
|
|
5337
5590
|
sourceFile = aSourceMapConsumer.file;
|
|
5338
5591
|
}
|
|
5339
5592
|
var sourceRoot = this._sourceRoot;
|
|
5340
|
-
if (sourceRoot != null) sourceFile = util
|
|
5341
|
-
var newSources = new ArraySet
|
|
5342
|
-
var newNames = new ArraySet
|
|
5593
|
+
if (sourceRoot != null) sourceFile = util.relative(sourceRoot, sourceFile);
|
|
5594
|
+
var newSources = new ArraySet();
|
|
5595
|
+
var newNames = new ArraySet();
|
|
5343
5596
|
this._mappings.unsortedForEach(function(mapping) {
|
|
5344
5597
|
if (mapping.source === sourceFile && mapping.originalLine != null) {
|
|
5345
5598
|
var original = aSourceMapConsumer.originalPositionFor({
|
|
@@ -5348,8 +5601,8 @@ var require_source_map_generator = /* @__PURE__ */ __commonJS({ "../../node_modu
|
|
|
5348
5601
|
});
|
|
5349
5602
|
if (original.source != null) {
|
|
5350
5603
|
mapping.source = original.source;
|
|
5351
|
-
if (aSourceMapPath != null) mapping.source = util
|
|
5352
|
-
if (sourceRoot != null) mapping.source = util
|
|
5604
|
+
if (aSourceMapPath != null) mapping.source = util.join(aSourceMapPath, mapping.source);
|
|
5605
|
+
if (sourceRoot != null) mapping.source = util.relative(sourceRoot, mapping.source);
|
|
5353
5606
|
mapping.originalLine = original.line;
|
|
5354
5607
|
mapping.originalColumn = original.column;
|
|
5355
5608
|
if (original.name != null) mapping.name = original.name;
|
|
@@ -5362,12 +5615,12 @@ var require_source_map_generator = /* @__PURE__ */ __commonJS({ "../../node_modu
|
|
|
5362
5615
|
}, this);
|
|
5363
5616
|
this._sources = newSources;
|
|
5364
5617
|
this._names = newNames;
|
|
5365
|
-
aSourceMapConsumer.sources.forEach(function(sourceFile
|
|
5366
|
-
var content = aSourceMapConsumer.sourceContentFor(sourceFile
|
|
5618
|
+
aSourceMapConsumer.sources.forEach(function(sourceFile) {
|
|
5619
|
+
var content = aSourceMapConsumer.sourceContentFor(sourceFile);
|
|
5367
5620
|
if (content != null) {
|
|
5368
|
-
if (aSourceMapPath != null) sourceFile
|
|
5369
|
-
if (sourceRoot != null) sourceFile
|
|
5370
|
-
this.setSourceContent(sourceFile
|
|
5621
|
+
if (aSourceMapPath != null) sourceFile = util.join(aSourceMapPath, sourceFile);
|
|
5622
|
+
if (sourceRoot != null) sourceFile = util.relative(sourceRoot, sourceFile);
|
|
5623
|
+
this.setSourceContent(sourceFile, content);
|
|
5371
5624
|
}
|
|
5372
5625
|
}, this);
|
|
5373
5626
|
};
|
|
@@ -5382,7 +5635,7 @@ var require_source_map_generator = /* @__PURE__ */ __commonJS({ "../../node_modu
|
|
|
5382
5635
|
* To maintain consistency, we validate that any new mapping being added falls
|
|
5383
5636
|
* in to one of these categories.
|
|
5384
5637
|
*/
|
|
5385
|
-
SourceMapGenerator
|
|
5638
|
+
SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) {
|
|
5386
5639
|
if (aOriginal && typeof aOriginal.line !== "number" && typeof aOriginal.column !== "number") {
|
|
5387
5640
|
var message = "original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";
|
|
5388
5641
|
if (this._ignoreInvalidMapping) {
|
|
@@ -5409,7 +5662,7 @@ var require_source_map_generator = /* @__PURE__ */ __commonJS({ "../../node_modu
|
|
|
5409
5662
|
* Serialize the accumulated mappings in to the stream of base 64 VLQs
|
|
5410
5663
|
* specified by the source map format.
|
|
5411
5664
|
*/
|
|
5412
|
-
SourceMapGenerator
|
|
5665
|
+
SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {
|
|
5413
5666
|
var previousGeneratedColumn = 0;
|
|
5414
5667
|
var previousGeneratedLine = 1;
|
|
5415
5668
|
var previousOriginalColumn = 0;
|
|
@@ -5432,22 +5685,22 @@ var require_source_map_generator = /* @__PURE__ */ __commonJS({ "../../node_modu
|
|
|
5432
5685
|
previousGeneratedLine++;
|
|
5433
5686
|
}
|
|
5434
5687
|
} else if (i > 0) {
|
|
5435
|
-
if (!util
|
|
5688
|
+
if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) continue;
|
|
5436
5689
|
next += ",";
|
|
5437
5690
|
}
|
|
5438
|
-
next += base64VLQ
|
|
5691
|
+
next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn);
|
|
5439
5692
|
previousGeneratedColumn = mapping.generatedColumn;
|
|
5440
5693
|
if (mapping.source != null) {
|
|
5441
5694
|
sourceIdx = this._sources.indexOf(mapping.source);
|
|
5442
|
-
next += base64VLQ
|
|
5695
|
+
next += base64VLQ.encode(sourceIdx - previousSource);
|
|
5443
5696
|
previousSource = sourceIdx;
|
|
5444
|
-
next += base64VLQ
|
|
5697
|
+
next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine);
|
|
5445
5698
|
previousOriginalLine = mapping.originalLine - 1;
|
|
5446
|
-
next += base64VLQ
|
|
5699
|
+
next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn);
|
|
5447
5700
|
previousOriginalColumn = mapping.originalColumn;
|
|
5448
5701
|
if (mapping.name != null) {
|
|
5449
5702
|
nameIdx = this._names.indexOf(mapping.name);
|
|
5450
|
-
next += base64VLQ
|
|
5703
|
+
next += base64VLQ.encode(nameIdx - previousName);
|
|
5451
5704
|
previousName = nameIdx;
|
|
5452
5705
|
}
|
|
5453
5706
|
}
|
|
@@ -5455,18 +5708,18 @@ var require_source_map_generator = /* @__PURE__ */ __commonJS({ "../../node_modu
|
|
|
5455
5708
|
}
|
|
5456
5709
|
return result;
|
|
5457
5710
|
};
|
|
5458
|
-
SourceMapGenerator
|
|
5711
|
+
SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
|
|
5459
5712
|
return aSources.map(function(source) {
|
|
5460
5713
|
if (!this._sourcesContents) return null;
|
|
5461
|
-
if (aSourceRoot != null) source = util
|
|
5462
|
-
var key = util
|
|
5714
|
+
if (aSourceRoot != null) source = util.relative(aSourceRoot, source);
|
|
5715
|
+
var key = util.toSetString(source);
|
|
5463
5716
|
return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null;
|
|
5464
5717
|
}, this);
|
|
5465
5718
|
};
|
|
5466
5719
|
/**
|
|
5467
5720
|
* Externalize the source map.
|
|
5468
5721
|
*/
|
|
5469
|
-
SourceMapGenerator
|
|
5722
|
+
SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() {
|
|
5470
5723
|
var map = {
|
|
5471
5724
|
version: this._version,
|
|
5472
5725
|
sources: this._sources.toArray(),
|
|
@@ -5481,15 +5734,15 @@ var require_source_map_generator = /* @__PURE__ */ __commonJS({ "../../node_modu
|
|
|
5481
5734
|
/**
|
|
5482
5735
|
* Render the source map being generated to a string.
|
|
5483
5736
|
*/
|
|
5484
|
-
SourceMapGenerator
|
|
5737
|
+
SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
|
|
5485
5738
|
return JSON.stringify(this.toJSON());
|
|
5486
5739
|
};
|
|
5487
|
-
exports.SourceMapGenerator = SourceMapGenerator
|
|
5488
|
-
})
|
|
5740
|
+
exports.SourceMapGenerator = SourceMapGenerator;
|
|
5741
|
+
}));
|
|
5489
5742
|
|
|
5490
5743
|
//#endregion
|
|
5491
5744
|
//#region ../../node_modules/source-map-js/lib/binary-search.js
|
|
5492
|
-
var require_binary_search = /* @__PURE__ */
|
|
5745
|
+
var require_binary_search = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5493
5746
|
exports.GREATEST_LOWER_BOUND = 1;
|
|
5494
5747
|
exports.LEAST_UPPER_BOUND = 2;
|
|
5495
5748
|
/**
|
|
@@ -5547,11 +5800,11 @@ var require_binary_search = /* @__PURE__ */ __commonJS({ "../../node_modules/sou
|
|
|
5547
5800
|
}
|
|
5548
5801
|
return index;
|
|
5549
5802
|
};
|
|
5550
|
-
})
|
|
5803
|
+
}));
|
|
5551
5804
|
|
|
5552
5805
|
//#endregion
|
|
5553
5806
|
//#region ../../node_modules/source-map-js/lib/quick-sort.js
|
|
5554
|
-
var require_quick_sort = /* @__PURE__ */
|
|
5807
|
+
var require_quick_sort = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5555
5808
|
function SortTemplate(comparator) {
|
|
5556
5809
|
/**
|
|
5557
5810
|
* Swap the elements indexed by `x` and `y` in the array `ary`.
|
|
@@ -5591,20 +5844,20 @@ var require_quick_sort = /* @__PURE__ */ __commonJS({ "../../node_modules/source
|
|
|
5591
5844
|
* @param {Number} r
|
|
5592
5845
|
* End index of the array
|
|
5593
5846
|
*/
|
|
5594
|
-
function doQuickSort(ary, comparator
|
|
5595
|
-
if (p
|
|
5596
|
-
var pivotIndex = randomIntInRange(p
|
|
5597
|
-
var i = p
|
|
5847
|
+
function doQuickSort(ary, comparator, p, r) {
|
|
5848
|
+
if (p < r) {
|
|
5849
|
+
var pivotIndex = randomIntInRange(p, r);
|
|
5850
|
+
var i = p - 1;
|
|
5598
5851
|
swap(ary, pivotIndex, r);
|
|
5599
5852
|
var pivot = ary[r];
|
|
5600
|
-
for (var j = p
|
|
5853
|
+
for (var j = p; j < r; j++) if (comparator(ary[j], pivot, false) <= 0) {
|
|
5601
5854
|
i += 1;
|
|
5602
5855
|
swap(ary, i, j);
|
|
5603
5856
|
}
|
|
5604
5857
|
swap(ary, i + 1, j);
|
|
5605
5858
|
var q = i + 1;
|
|
5606
|
-
doQuickSort(ary, comparator
|
|
5607
|
-
doQuickSort(ary, comparator
|
|
5859
|
+
doQuickSort(ary, comparator, p, q - 1);
|
|
5860
|
+
doQuickSort(ary, comparator, q + 1, r);
|
|
5608
5861
|
}
|
|
5609
5862
|
}
|
|
5610
5863
|
return doQuickSort;
|
|
@@ -5630,30 +5883,30 @@ var require_quick_sort = /* @__PURE__ */ __commonJS({ "../../node_modules/source
|
|
|
5630
5883
|
}
|
|
5631
5884
|
doQuickSort(ary, comparator, start, ary.length - 1);
|
|
5632
5885
|
};
|
|
5633
|
-
})
|
|
5886
|
+
}));
|
|
5634
5887
|
|
|
5635
5888
|
//#endregion
|
|
5636
5889
|
//#region ../../node_modules/source-map-js/lib/source-map-consumer.js
|
|
5637
|
-
var require_source_map_consumer = /* @__PURE__ */
|
|
5638
|
-
var util
|
|
5890
|
+
var require_source_map_consumer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5891
|
+
var util = require_util();
|
|
5639
5892
|
var binarySearch = require_binary_search();
|
|
5640
5893
|
var ArraySet = require_array_set().ArraySet;
|
|
5641
5894
|
var base64VLQ = require_base64_vlq();
|
|
5642
5895
|
var quickSort = require_quick_sort().quickSort;
|
|
5643
|
-
function SourceMapConsumer
|
|
5896
|
+
function SourceMapConsumer(aSourceMap, aSourceMapURL) {
|
|
5644
5897
|
var sourceMap = aSourceMap;
|
|
5645
|
-
if (typeof aSourceMap === "string") sourceMap = util
|
|
5898
|
+
if (typeof aSourceMap === "string") sourceMap = util.parseSourceMapInput(aSourceMap);
|
|
5646
5899
|
return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);
|
|
5647
5900
|
}
|
|
5648
|
-
SourceMapConsumer
|
|
5901
|
+
SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {
|
|
5649
5902
|
return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);
|
|
5650
5903
|
};
|
|
5651
5904
|
/**
|
|
5652
5905
|
* The version of the source mapping spec that we are consuming.
|
|
5653
5906
|
*/
|
|
5654
|
-
SourceMapConsumer
|
|
5655
|
-
SourceMapConsumer
|
|
5656
|
-
Object.defineProperty(SourceMapConsumer
|
|
5907
|
+
SourceMapConsumer.prototype._version = 3;
|
|
5908
|
+
SourceMapConsumer.prototype.__generatedMappings = null;
|
|
5909
|
+
Object.defineProperty(SourceMapConsumer.prototype, "_generatedMappings", {
|
|
5657
5910
|
configurable: true,
|
|
5658
5911
|
enumerable: true,
|
|
5659
5912
|
get: function() {
|
|
@@ -5661,8 +5914,8 @@ var require_source_map_consumer = /* @__PURE__ */ __commonJS({ "../../node_modul
|
|
|
5661
5914
|
return this.__generatedMappings;
|
|
5662
5915
|
}
|
|
5663
5916
|
});
|
|
5664
|
-
SourceMapConsumer
|
|
5665
|
-
Object.defineProperty(SourceMapConsumer
|
|
5917
|
+
SourceMapConsumer.prototype.__originalMappings = null;
|
|
5918
|
+
Object.defineProperty(SourceMapConsumer.prototype, "_originalMappings", {
|
|
5666
5919
|
configurable: true,
|
|
5667
5920
|
enumerable: true,
|
|
5668
5921
|
get: function() {
|
|
@@ -5670,7 +5923,7 @@ var require_source_map_consumer = /* @__PURE__ */ __commonJS({ "../../node_modul
|
|
|
5670
5923
|
return this.__originalMappings;
|
|
5671
5924
|
}
|
|
5672
5925
|
});
|
|
5673
|
-
SourceMapConsumer
|
|
5926
|
+
SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
|
|
5674
5927
|
var c = aStr.charAt(index);
|
|
5675
5928
|
return c === ";" || c === ",";
|
|
5676
5929
|
};
|
|
@@ -5679,13 +5932,13 @@ var require_source_map_consumer = /* @__PURE__ */ __commonJS({ "../../node_modul
|
|
|
5679
5932
|
* query (the ordered arrays in the `this.__generatedMappings` and
|
|
5680
5933
|
* `this.__originalMappings` properties).
|
|
5681
5934
|
*/
|
|
5682
|
-
SourceMapConsumer
|
|
5935
|
+
SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
|
|
5683
5936
|
throw new Error("Subclasses must implement _parseMappings");
|
|
5684
5937
|
};
|
|
5685
|
-
SourceMapConsumer
|
|
5686
|
-
SourceMapConsumer
|
|
5687
|
-
SourceMapConsumer
|
|
5688
|
-
SourceMapConsumer
|
|
5938
|
+
SourceMapConsumer.GENERATED_ORDER = 1;
|
|
5939
|
+
SourceMapConsumer.ORIGINAL_ORDER = 2;
|
|
5940
|
+
SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
|
|
5941
|
+
SourceMapConsumer.LEAST_UPPER_BOUND = 2;
|
|
5689
5942
|
/**
|
|
5690
5943
|
* Iterate over each mapping between an original source/line/column and a
|
|
5691
5944
|
* generated line/column in this source map.
|
|
@@ -5702,15 +5955,15 @@ var require_source_map_consumer = /* @__PURE__ */ __commonJS({ "../../node_modul
|
|
|
5702
5955
|
* order or the original's source/line/column order, respectively. Defaults to
|
|
5703
5956
|
* `SourceMapConsumer.GENERATED_ORDER`.
|
|
5704
5957
|
*/
|
|
5705
|
-
SourceMapConsumer
|
|
5958
|
+
SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
|
|
5706
5959
|
var context = aContext || null;
|
|
5707
|
-
var order = aOrder || SourceMapConsumer
|
|
5960
|
+
var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
|
|
5708
5961
|
var mappings;
|
|
5709
5962
|
switch (order) {
|
|
5710
|
-
case SourceMapConsumer
|
|
5963
|
+
case SourceMapConsumer.GENERATED_ORDER:
|
|
5711
5964
|
mappings = this._generatedMappings;
|
|
5712
5965
|
break;
|
|
5713
|
-
case SourceMapConsumer
|
|
5966
|
+
case SourceMapConsumer.ORIGINAL_ORDER:
|
|
5714
5967
|
mappings = this._originalMappings;
|
|
5715
5968
|
break;
|
|
5716
5969
|
default: throw new Error("Unknown order of iteration.");
|
|
@@ -5723,7 +5976,7 @@ var require_source_map_consumer = /* @__PURE__ */ __commonJS({ "../../node_modul
|
|
|
5723
5976
|
for (var i = 0, n = mappings.length; i < n; i++) {
|
|
5724
5977
|
var mapping = mappings[i];
|
|
5725
5978
|
var source = mapping.source === null ? null : sources.at(mapping.source);
|
|
5726
|
-
if (source !== null) source = util
|
|
5979
|
+
if (source !== null) source = util.computeSourceURL(sourceRoot, source, sourceMapURL);
|
|
5727
5980
|
boundCallback({
|
|
5728
5981
|
source,
|
|
5729
5982
|
generatedLine: mapping.generatedLine,
|
|
@@ -5756,26 +6009,26 @@ var require_source_map_consumer = /* @__PURE__ */ __commonJS({ "../../node_modul
|
|
|
5756
6009
|
* - column: The column number in the generated source, or null.
|
|
5757
6010
|
* The column number is 0-based.
|
|
5758
6011
|
*/
|
|
5759
|
-
SourceMapConsumer
|
|
5760
|
-
var line = util
|
|
6012
|
+
SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
|
|
6013
|
+
var line = util.getArg(aArgs, "line");
|
|
5761
6014
|
var needle = {
|
|
5762
|
-
source: util
|
|
6015
|
+
source: util.getArg(aArgs, "source"),
|
|
5763
6016
|
originalLine: line,
|
|
5764
|
-
originalColumn: util
|
|
6017
|
+
originalColumn: util.getArg(aArgs, "column", 0)
|
|
5765
6018
|
};
|
|
5766
6019
|
needle.source = this._findSourceIndex(needle.source);
|
|
5767
6020
|
if (needle.source < 0) return [];
|
|
5768
6021
|
var mappings = [];
|
|
5769
|
-
var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util
|
|
6022
|
+
var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, binarySearch.LEAST_UPPER_BOUND);
|
|
5770
6023
|
if (index >= 0) {
|
|
5771
6024
|
var mapping = this._originalMappings[index];
|
|
5772
6025
|
if (aArgs.column === void 0) {
|
|
5773
6026
|
var originalLine = mapping.originalLine;
|
|
5774
6027
|
while (mapping && mapping.originalLine === originalLine) {
|
|
5775
6028
|
mappings.push({
|
|
5776
|
-
line: util
|
|
5777
|
-
column: util
|
|
5778
|
-
lastColumn: util
|
|
6029
|
+
line: util.getArg(mapping, "generatedLine", null),
|
|
6030
|
+
column: util.getArg(mapping, "generatedColumn", null),
|
|
6031
|
+
lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
|
|
5779
6032
|
});
|
|
5780
6033
|
mapping = this._originalMappings[++index];
|
|
5781
6034
|
}
|
|
@@ -5783,9 +6036,9 @@ var require_source_map_consumer = /* @__PURE__ */ __commonJS({ "../../node_modul
|
|
|
5783
6036
|
var originalColumn = mapping.originalColumn;
|
|
5784
6037
|
while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) {
|
|
5785
6038
|
mappings.push({
|
|
5786
|
-
line: util
|
|
5787
|
-
column: util
|
|
5788
|
-
lastColumn: util
|
|
6039
|
+
line: util.getArg(mapping, "generatedLine", null),
|
|
6040
|
+
column: util.getArg(mapping, "generatedColumn", null),
|
|
6041
|
+
lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
|
|
5789
6042
|
});
|
|
5790
6043
|
mapping = this._originalMappings[++index];
|
|
5791
6044
|
}
|
|
@@ -5793,7 +6046,7 @@ var require_source_map_consumer = /* @__PURE__ */ __commonJS({ "../../node_modul
|
|
|
5793
6046
|
}
|
|
5794
6047
|
return mappings;
|
|
5795
6048
|
};
|
|
5796
|
-
exports.SourceMapConsumer = SourceMapConsumer
|
|
6049
|
+
exports.SourceMapConsumer = SourceMapConsumer;
|
|
5797
6050
|
/**
|
|
5798
6051
|
* A BasicSourceMapConsumer instance represents a parsed source map which we can
|
|
5799
6052
|
* query for information about the original file positions by giving it a file
|
|
@@ -5830,23 +6083,23 @@ var require_source_map_consumer = /* @__PURE__ */ __commonJS({ "../../node_modul
|
|
|
5830
6083
|
*/
|
|
5831
6084
|
function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {
|
|
5832
6085
|
var sourceMap = aSourceMap;
|
|
5833
|
-
if (typeof aSourceMap === "string") sourceMap = util
|
|
5834
|
-
var version = util
|
|
5835
|
-
var sources = util
|
|
5836
|
-
var names = util
|
|
5837
|
-
var sourceRoot = util
|
|
5838
|
-
var sourcesContent = util
|
|
5839
|
-
var mappings = util
|
|
5840
|
-
var file = util
|
|
6086
|
+
if (typeof aSourceMap === "string") sourceMap = util.parseSourceMapInput(aSourceMap);
|
|
6087
|
+
var version = util.getArg(sourceMap, "version");
|
|
6088
|
+
var sources = util.getArg(sourceMap, "sources");
|
|
6089
|
+
var names = util.getArg(sourceMap, "names", []);
|
|
6090
|
+
var sourceRoot = util.getArg(sourceMap, "sourceRoot", null);
|
|
6091
|
+
var sourcesContent = util.getArg(sourceMap, "sourcesContent", null);
|
|
6092
|
+
var mappings = util.getArg(sourceMap, "mappings");
|
|
6093
|
+
var file = util.getArg(sourceMap, "file", null);
|
|
5841
6094
|
if (version != this._version) throw new Error("Unsupported version: " + version);
|
|
5842
|
-
if (sourceRoot) sourceRoot = util
|
|
5843
|
-
sources = sources.map(String).map(util
|
|
5844
|
-
return sourceRoot && util
|
|
6095
|
+
if (sourceRoot) sourceRoot = util.normalize(sourceRoot);
|
|
6096
|
+
sources = sources.map(String).map(util.normalize).map(function(source) {
|
|
6097
|
+
return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) ? util.relative(sourceRoot, source) : source;
|
|
5845
6098
|
});
|
|
5846
6099
|
this._names = ArraySet.fromArray(names.map(String), true);
|
|
5847
6100
|
this._sources = ArraySet.fromArray(sources, true);
|
|
5848
6101
|
this._absoluteSources = this._sources.toArray().map(function(s) {
|
|
5849
|
-
return util
|
|
6102
|
+
return util.computeSourceURL(sourceRoot, s, aSourceMapURL);
|
|
5850
6103
|
});
|
|
5851
6104
|
this.sourceRoot = sourceRoot;
|
|
5852
6105
|
this.sourcesContent = sourcesContent;
|
|
@@ -5854,18 +6107,18 @@ var require_source_map_consumer = /* @__PURE__ */ __commonJS({ "../../node_modul
|
|
|
5854
6107
|
this._sourceMapURL = aSourceMapURL;
|
|
5855
6108
|
this.file = file;
|
|
5856
6109
|
}
|
|
5857
|
-
BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer
|
|
5858
|
-
BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer
|
|
6110
|
+
BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
|
|
6111
|
+
BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
|
|
5859
6112
|
/**
|
|
5860
6113
|
* Utility function to find the index of a source. Returns -1 if not
|
|
5861
6114
|
* found.
|
|
5862
6115
|
*/
|
|
5863
6116
|
BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {
|
|
5864
6117
|
var relativeSource = aSource;
|
|
5865
|
-
if (this.sourceRoot != null) relativeSource = util
|
|
6118
|
+
if (this.sourceRoot != null) relativeSource = util.relative(this.sourceRoot, relativeSource);
|
|
5866
6119
|
if (this._sources.has(relativeSource)) return this._sources.indexOf(relativeSource);
|
|
5867
|
-
var i;
|
|
5868
|
-
for (
|
|
6120
|
+
var i = 0;
|
|
6121
|
+
for (; i < this._absoluteSources.length; ++i) if (this._absoluteSources[i] == aSource) return i;
|
|
5869
6122
|
return -1;
|
|
5870
6123
|
};
|
|
5871
6124
|
/**
|
|
@@ -5886,7 +6139,7 @@ var require_source_map_consumer = /* @__PURE__ */ __commonJS({ "../../node_modul
|
|
|
5886
6139
|
smc.file = aSourceMap._file;
|
|
5887
6140
|
smc._sourceMapURL = aSourceMapURL;
|
|
5888
6141
|
smc._absoluteSources = smc._sources.toArray().map(function(s) {
|
|
5889
|
-
return util
|
|
6142
|
+
return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);
|
|
5890
6143
|
});
|
|
5891
6144
|
var generatedMappings = aSourceMap._mappings.toArray().slice();
|
|
5892
6145
|
var destGeneratedMappings = smc.__generatedMappings = [];
|
|
@@ -5905,7 +6158,7 @@ var require_source_map_consumer = /* @__PURE__ */ __commonJS({ "../../node_modul
|
|
|
5905
6158
|
}
|
|
5906
6159
|
destGeneratedMappings.push(destMapping);
|
|
5907
6160
|
}
|
|
5908
|
-
quickSort(smc.__originalMappings, util
|
|
6161
|
+
quickSort(smc.__originalMappings, util.compareByOriginalPositions);
|
|
5909
6162
|
return smc;
|
|
5910
6163
|
};
|
|
5911
6164
|
/**
|
|
@@ -5934,7 +6187,7 @@ var require_source_map_consumer = /* @__PURE__ */ __commonJS({ "../../node_modul
|
|
|
5934
6187
|
* query (the ordered arrays in the `this.__generatedMappings` and
|
|
5935
6188
|
* `this.__originalMappings` properties).
|
|
5936
6189
|
*/
|
|
5937
|
-
const compareGenerated = util
|
|
6190
|
+
const compareGenerated = util.compareByGeneratedPositionsDeflatedNoLine;
|
|
5938
6191
|
function sortGenerated(array, start) {
|
|
5939
6192
|
let l = array.length;
|
|
5940
6193
|
let n = array.length - start;
|
|
@@ -6014,7 +6267,7 @@ var require_source_map_consumer = /* @__PURE__ */ __commonJS({ "../../node_modul
|
|
|
6014
6267
|
}
|
|
6015
6268
|
sortGenerated(generatedMappings, subarrayStart);
|
|
6016
6269
|
this.__generatedMappings = generatedMappings;
|
|
6017
|
-
for (var i = 0; i < originalMappings.length; i++) if (originalMappings[i] != null) quickSort(originalMappings[i], util
|
|
6270
|
+
for (var i = 0; i < originalMappings.length; i++) if (originalMappings[i] != null) quickSort(originalMappings[i], util.compareByOriginalPositionsNoSource);
|
|
6018
6271
|
this.__originalMappings = [].concat(...originalMappings);
|
|
6019
6272
|
};
|
|
6020
6273
|
/**
|
|
@@ -6069,24 +6322,24 @@ var require_source_map_consumer = /* @__PURE__ */ __commonJS({ "../../node_modul
|
|
|
6069
6322
|
*/
|
|
6070
6323
|
BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) {
|
|
6071
6324
|
var needle = {
|
|
6072
|
-
generatedLine: util
|
|
6073
|
-
generatedColumn: util
|
|
6325
|
+
generatedLine: util.getArg(aArgs, "line"),
|
|
6326
|
+
generatedColumn: util.getArg(aArgs, "column")
|
|
6074
6327
|
};
|
|
6075
|
-
var index = this._findMapping(needle, this._generatedMappings, "generatedLine", "generatedColumn", util
|
|
6328
|
+
var index = this._findMapping(needle, this._generatedMappings, "generatedLine", "generatedColumn", util.compareByGeneratedPositionsDeflated, util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND));
|
|
6076
6329
|
if (index >= 0) {
|
|
6077
6330
|
var mapping = this._generatedMappings[index];
|
|
6078
6331
|
if (mapping.generatedLine === needle.generatedLine) {
|
|
6079
|
-
var source = util
|
|
6332
|
+
var source = util.getArg(mapping, "source", null);
|
|
6080
6333
|
if (source !== null) {
|
|
6081
6334
|
source = this._sources.at(source);
|
|
6082
|
-
source = util
|
|
6335
|
+
source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);
|
|
6083
6336
|
}
|
|
6084
|
-
var name = util
|
|
6337
|
+
var name = util.getArg(mapping, "name", null);
|
|
6085
6338
|
if (name !== null) name = this._names.at(name);
|
|
6086
6339
|
return {
|
|
6087
6340
|
source,
|
|
6088
|
-
line: util
|
|
6089
|
-
column: util
|
|
6341
|
+
line: util.getArg(mapping, "originalLine", null),
|
|
6342
|
+
column: util.getArg(mapping, "originalColumn", null),
|
|
6090
6343
|
name
|
|
6091
6344
|
};
|
|
6092
6345
|
}
|
|
@@ -6118,9 +6371,9 @@ var require_source_map_consumer = /* @__PURE__ */ __commonJS({ "../../node_modul
|
|
|
6118
6371
|
var index = this._findSourceIndex(aSource);
|
|
6119
6372
|
if (index >= 0) return this.sourcesContent[index];
|
|
6120
6373
|
var relativeSource = aSource;
|
|
6121
|
-
if (this.sourceRoot != null) relativeSource = util
|
|
6374
|
+
if (this.sourceRoot != null) relativeSource = util.relative(this.sourceRoot, relativeSource);
|
|
6122
6375
|
var url;
|
|
6123
|
-
if (this.sourceRoot != null && (url = util
|
|
6376
|
+
if (this.sourceRoot != null && (url = util.urlParse(this.sourceRoot))) {
|
|
6124
6377
|
var fileUriAbsPath = relativeSource.replace(/^file:\/\//, "");
|
|
6125
6378
|
if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];
|
|
6126
6379
|
if ((!url.path || url.path == "/") && this._sources.has("/" + relativeSource)) return this.sourcesContent[this._sources.indexOf("/" + relativeSource)];
|
|
@@ -6152,7 +6405,7 @@ var require_source_map_consumer = /* @__PURE__ */ __commonJS({ "../../node_modul
|
|
|
6152
6405
|
* The column number is 0-based.
|
|
6153
6406
|
*/
|
|
6154
6407
|
BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) {
|
|
6155
|
-
var source = util
|
|
6408
|
+
var source = util.getArg(aArgs, "source");
|
|
6156
6409
|
source = this._findSourceIndex(source);
|
|
6157
6410
|
if (source < 0) return {
|
|
6158
6411
|
line: null,
|
|
@@ -6161,16 +6414,16 @@ var require_source_map_consumer = /* @__PURE__ */ __commonJS({ "../../node_modul
|
|
|
6161
6414
|
};
|
|
6162
6415
|
var needle = {
|
|
6163
6416
|
source,
|
|
6164
|
-
originalLine: util
|
|
6165
|
-
originalColumn: util
|
|
6417
|
+
originalLine: util.getArg(aArgs, "line"),
|
|
6418
|
+
originalColumn: util.getArg(aArgs, "column")
|
|
6166
6419
|
};
|
|
6167
|
-
var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util
|
|
6420
|
+
var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND));
|
|
6168
6421
|
if (index >= 0) {
|
|
6169
6422
|
var mapping = this._originalMappings[index];
|
|
6170
6423
|
if (mapping.source === needle.source) return {
|
|
6171
|
-
line: util
|
|
6172
|
-
column: util
|
|
6173
|
-
lastColumn: util
|
|
6424
|
+
line: util.getArg(mapping, "generatedLine", null),
|
|
6425
|
+
column: util.getArg(mapping, "generatedColumn", null),
|
|
6426
|
+
lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
|
|
6174
6427
|
};
|
|
6175
6428
|
}
|
|
6176
6429
|
return {
|
|
@@ -6231,9 +6484,9 @@ var require_source_map_consumer = /* @__PURE__ */ __commonJS({ "../../node_modul
|
|
|
6231
6484
|
*/
|
|
6232
6485
|
function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {
|
|
6233
6486
|
var sourceMap = aSourceMap;
|
|
6234
|
-
if (typeof aSourceMap === "string") sourceMap = util
|
|
6235
|
-
var version = util
|
|
6236
|
-
var sections = util
|
|
6487
|
+
if (typeof aSourceMap === "string") sourceMap = util.parseSourceMapInput(aSourceMap);
|
|
6488
|
+
var version = util.getArg(sourceMap, "version");
|
|
6489
|
+
var sections = util.getArg(sourceMap, "sections");
|
|
6237
6490
|
if (version != this._version) throw new Error("Unsupported version: " + version);
|
|
6238
6491
|
this._sources = new ArraySet();
|
|
6239
6492
|
this._names = new ArraySet();
|
|
@@ -6243,9 +6496,9 @@ var require_source_map_consumer = /* @__PURE__ */ __commonJS({ "../../node_modul
|
|
|
6243
6496
|
};
|
|
6244
6497
|
this._sections = sections.map(function(s) {
|
|
6245
6498
|
if (s.url) throw new Error("Support for url field in sections not implemented.");
|
|
6246
|
-
var offset = util
|
|
6247
|
-
var offsetLine = util
|
|
6248
|
-
var offsetColumn = util
|
|
6499
|
+
var offset = util.getArg(s, "offset");
|
|
6500
|
+
var offsetLine = util.getArg(offset, "line");
|
|
6501
|
+
var offsetColumn = util.getArg(offset, "column");
|
|
6249
6502
|
if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) throw new Error("Section offsets must be ordered and non-overlapping.");
|
|
6250
6503
|
lastOffset = offset;
|
|
6251
6504
|
return {
|
|
@@ -6253,12 +6506,12 @@ var require_source_map_consumer = /* @__PURE__ */ __commonJS({ "../../node_modul
|
|
|
6253
6506
|
generatedLine: offsetLine + 1,
|
|
6254
6507
|
generatedColumn: offsetColumn + 1
|
|
6255
6508
|
},
|
|
6256
|
-
consumer: new SourceMapConsumer
|
|
6509
|
+
consumer: new SourceMapConsumer(util.getArg(s, "map"), aSourceMapURL)
|
|
6257
6510
|
};
|
|
6258
6511
|
});
|
|
6259
6512
|
}
|
|
6260
|
-
IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer
|
|
6261
|
-
IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer
|
|
6513
|
+
IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
|
|
6514
|
+
IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
|
|
6262
6515
|
/**
|
|
6263
6516
|
* The version of the source mapping spec that we are consuming.
|
|
6264
6517
|
*/
|
|
@@ -6292,13 +6545,13 @@ var require_source_map_consumer = /* @__PURE__ */ __commonJS({ "../../node_modul
|
|
|
6292
6545
|
*/
|
|
6293
6546
|
IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
|
|
6294
6547
|
var needle = {
|
|
6295
|
-
generatedLine: util
|
|
6296
|
-
generatedColumn: util
|
|
6548
|
+
generatedLine: util.getArg(aArgs, "line"),
|
|
6549
|
+
generatedColumn: util.getArg(aArgs, "column")
|
|
6297
6550
|
};
|
|
6298
|
-
var sectionIndex = binarySearch.search(needle, this._sections, function(needle
|
|
6299
|
-
var cmp = needle
|
|
6551
|
+
var sectionIndex = binarySearch.search(needle, this._sections, function(needle, section) {
|
|
6552
|
+
var cmp = needle.generatedLine - section.generatedOffset.generatedLine;
|
|
6300
6553
|
if (cmp) return cmp;
|
|
6301
|
-
return needle
|
|
6554
|
+
return needle.generatedColumn - section.generatedOffset.generatedColumn;
|
|
6302
6555
|
});
|
|
6303
6556
|
var section = this._sections[sectionIndex];
|
|
6304
6557
|
if (!section) return {
|
|
@@ -6356,7 +6609,7 @@ var require_source_map_consumer = /* @__PURE__ */ __commonJS({ "../../node_modul
|
|
|
6356
6609
|
IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
|
|
6357
6610
|
for (var i = 0; i < this._sections.length; i++) {
|
|
6358
6611
|
var section = this._sections[i];
|
|
6359
|
-
if (section.consumer._findSourceIndex(util
|
|
6612
|
+
if (section.consumer._findSourceIndex(util.getArg(aArgs, "source")) === -1) continue;
|
|
6360
6613
|
var generatedPosition = section.consumer.generatedPositionFor(aArgs);
|
|
6361
6614
|
if (generatedPosition) return {
|
|
6362
6615
|
line: generatedPosition.line + (section.generatedOffset.generatedLine - 1),
|
|
@@ -6382,7 +6635,7 @@ var require_source_map_consumer = /* @__PURE__ */ __commonJS({ "../../node_modul
|
|
|
6382
6635
|
for (var j = 0; j < sectionMappings.length; j++) {
|
|
6383
6636
|
var mapping = sectionMappings[j];
|
|
6384
6637
|
var source = section.consumer._sources.at(mapping.source);
|
|
6385
|
-
if (source !== null) source = util
|
|
6638
|
+
if (source !== null) source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);
|
|
6386
6639
|
this._sources.add(source);
|
|
6387
6640
|
source = this._sources.indexOf(source);
|
|
6388
6641
|
var name = null;
|
|
@@ -6403,16 +6656,16 @@ var require_source_map_consumer = /* @__PURE__ */ __commonJS({ "../../node_modul
|
|
|
6403
6656
|
if (typeof adjustedMapping.originalLine === "number") this.__originalMappings.push(adjustedMapping);
|
|
6404
6657
|
}
|
|
6405
6658
|
}
|
|
6406
|
-
quickSort(this.__generatedMappings, util
|
|
6407
|
-
quickSort(this.__originalMappings, util
|
|
6659
|
+
quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
|
|
6660
|
+
quickSort(this.__originalMappings, util.compareByOriginalPositions);
|
|
6408
6661
|
};
|
|
6409
6662
|
exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
|
|
6410
|
-
})
|
|
6663
|
+
}));
|
|
6411
6664
|
|
|
6412
6665
|
//#endregion
|
|
6413
6666
|
//#region ../../node_modules/source-map-js/lib/source-node.js
|
|
6414
|
-
var require_source_node = /* @__PURE__ */
|
|
6415
|
-
var SourceMapGenerator
|
|
6667
|
+
var require_source_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6668
|
+
var SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
|
|
6416
6669
|
var util = require_util();
|
|
6417
6670
|
var REGEX_NEWLINE = /(\r?\n)/;
|
|
6418
6671
|
var NEWLINE_CODE = 10;
|
|
@@ -6460,18 +6713,20 @@ var require_source_node = /* @__PURE__ */ __commonJS({ "../../node_modules/sourc
|
|
|
6460
6713
|
var lastGeneratedLine = 1, lastGeneratedColumn = 0;
|
|
6461
6714
|
var lastMapping = null;
|
|
6462
6715
|
aSourceMapConsumer.eachMapping(function(mapping) {
|
|
6463
|
-
if (lastMapping !== null)
|
|
6464
|
-
|
|
6465
|
-
|
|
6466
|
-
|
|
6467
|
-
|
|
6468
|
-
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
|
|
6716
|
+
if (lastMapping !== null) {
|
|
6717
|
+
if (lastGeneratedLine < mapping.generatedLine) {
|
|
6718
|
+
addMappingWithCode(lastMapping, shiftNextLine());
|
|
6719
|
+
lastGeneratedLine++;
|
|
6720
|
+
lastGeneratedColumn = 0;
|
|
6721
|
+
} else {
|
|
6722
|
+
var nextLine = remainingLines[remainingLinesIndex] || "";
|
|
6723
|
+
var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn);
|
|
6724
|
+
remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn);
|
|
6725
|
+
lastGeneratedColumn = mapping.generatedColumn;
|
|
6726
|
+
addMappingWithCode(lastMapping, code);
|
|
6727
|
+
lastMapping = mapping;
|
|
6728
|
+
return;
|
|
6729
|
+
}
|
|
6475
6730
|
}
|
|
6476
6731
|
while (lastGeneratedLine < mapping.generatedLine) {
|
|
6477
6732
|
node.add(shiftNextLine());
|
|
@@ -6629,7 +6884,7 @@ var require_source_node = /* @__PURE__ */ __commonJS({ "../../node_modules/sourc
|
|
|
6629
6884
|
line: 1,
|
|
6630
6885
|
column: 0
|
|
6631
6886
|
};
|
|
6632
|
-
var map = new SourceMapGenerator
|
|
6887
|
+
var map = new SourceMapGenerator(aArgs);
|
|
6633
6888
|
var sourceMappingActive = false;
|
|
6634
6889
|
var lastOriginalSource = null;
|
|
6635
6890
|
var lastOriginalLine = null;
|
|
@@ -6692,31 +6947,39 @@ var require_source_node = /* @__PURE__ */ __commonJS({ "../../node_modules/sourc
|
|
|
6692
6947
|
};
|
|
6693
6948
|
};
|
|
6694
6949
|
exports.SourceNode = SourceNode;
|
|
6695
|
-
})
|
|
6950
|
+
}));
|
|
6696
6951
|
|
|
6697
6952
|
//#endregion
|
|
6698
6953
|
//#region ../../node_modules/source-map-js/source-map.js
|
|
6699
|
-
var require_source_map = /* @__PURE__ */
|
|
6954
|
+
var require_source_map = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6700
6955
|
exports.SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
|
|
6701
6956
|
exports.SourceMapConsumer = require_source_map_consumer().SourceMapConsumer;
|
|
6702
6957
|
exports.SourceNode = require_source_node().SourceNode;
|
|
6703
|
-
})
|
|
6958
|
+
}));
|
|
6704
6959
|
|
|
6705
6960
|
//#endregion
|
|
6706
6961
|
//#region ../../node_modules/postcss/lib/previous-map.js
|
|
6707
|
-
var require_previous_map = /* @__PURE__ */
|
|
6708
|
-
let { existsSync: existsSync$
|
|
6709
|
-
let { dirname: dirname$2, join: join$2 } = __require("path");
|
|
6710
|
-
let { SourceMapConsumer
|
|
6962
|
+
var require_previous_map = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6963
|
+
let { existsSync: existsSync$1, readFileSync, realpathSync } = __require("fs");
|
|
6964
|
+
let { dirname: dirname$2, isAbsolute: isAbsolute$1, join: join$1, relative: relative$2, sep: sep$1 } = __require("path");
|
|
6965
|
+
let { SourceMapConsumer, SourceMapGenerator } = require_source_map();
|
|
6966
|
+
function realPath(path) {
|
|
6967
|
+
try {
|
|
6968
|
+
return realpathSync(path);
|
|
6969
|
+
} catch {
|
|
6970
|
+
return path;
|
|
6971
|
+
}
|
|
6972
|
+
}
|
|
6711
6973
|
function fromBase64(str) {
|
|
6712
6974
|
if (Buffer) return Buffer.from(str, "base64").toString();
|
|
6713
6975
|
else
|
|
6714
6976
|
/* c8 ignore next 2 */
|
|
6715
6977
|
return window.atob(str);
|
|
6716
6978
|
}
|
|
6717
|
-
var PreviousMap
|
|
6979
|
+
var PreviousMap = class {
|
|
6718
6980
|
constructor(css, opts) {
|
|
6719
6981
|
if (opts.map === false) return;
|
|
6982
|
+
if (opts.unsafeMap) this.unsafeMap = true;
|
|
6720
6983
|
this.loadAnnotation(css);
|
|
6721
6984
|
this.inline = this.startWith(this.annotation, "data:");
|
|
6722
6985
|
let prev = opts.map ? opts.map.prev : void 0;
|
|
@@ -6726,7 +6989,7 @@ var require_previous_map = /* @__PURE__ */ __commonJS({ "../../node_modules/post
|
|
|
6726
6989
|
if (text) this.text = text;
|
|
6727
6990
|
}
|
|
6728
6991
|
consumer() {
|
|
6729
|
-
if (!this.consumerCache) this.consumerCache = new SourceMapConsumer
|
|
6992
|
+
if (!this.consumerCache) this.consumerCache = new SourceMapConsumer(this.json || this.text);
|
|
6730
6993
|
return this.consumerCache;
|
|
6731
6994
|
}
|
|
6732
6995
|
decodeInline(text) {
|
|
@@ -6736,7 +6999,8 @@ var require_previous_map = /* @__PURE__ */ __commonJS({ "../../node_modules/post
|
|
|
6736
6999
|
if (uriMatch) return decodeURIComponent(text.substr(uriMatch[0].length));
|
|
6737
7000
|
let baseUriMatch = text.match(baseCharsetUri) || text.match(baseUri);
|
|
6738
7001
|
if (baseUriMatch) return fromBase64(text.substr(baseUriMatch[0].length));
|
|
6739
|
-
let encoding = text.
|
|
7002
|
+
let encoding = text.slice(22);
|
|
7003
|
+
encoding = encoding.slice(0, encoding.indexOf(","));
|
|
6740
7004
|
throw new Error("Unsupported source map encoding " + encoding);
|
|
6741
7005
|
}
|
|
6742
7006
|
getAnnotationURL(sourceMapString) {
|
|
@@ -6753,32 +7017,46 @@ var require_previous_map = /* @__PURE__ */ __commonJS({ "../../node_modules/post
|
|
|
6753
7017
|
let end = css.indexOf("*/", start);
|
|
6754
7018
|
if (start > -1 && end > -1) this.annotation = this.getAnnotationURL(css.substring(start, end));
|
|
6755
7019
|
}
|
|
6756
|
-
loadFile(path
|
|
6757
|
-
this.
|
|
6758
|
-
|
|
6759
|
-
|
|
6760
|
-
|
|
7020
|
+
loadFile(path, cssFile, trusted) {
|
|
7021
|
+
if (!trusted && !this.unsafeMap) {
|
|
7022
|
+
if (!/\.map$/i.test(path)) return void 0;
|
|
7023
|
+
if (!cssFile) return void 0;
|
|
7024
|
+
let rel = relative$2(realPath(dirname$2(cssFile)), realPath(path));
|
|
7025
|
+
if (rel === ".." || rel.startsWith(".." + sep$1) || isAbsolute$1(rel)) return;
|
|
7026
|
+
}
|
|
7027
|
+
this.root = dirname$2(path);
|
|
7028
|
+
if (existsSync$1(path)) {
|
|
7029
|
+
this.mapFile = path;
|
|
7030
|
+
return readFileSync(path, "utf-8").toString().trim();
|
|
6761
7031
|
}
|
|
6762
7032
|
}
|
|
6763
7033
|
loadMap(file, prev) {
|
|
6764
7034
|
if (prev === false) return false;
|
|
6765
|
-
if (prev)
|
|
6766
|
-
|
|
6767
|
-
|
|
6768
|
-
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
|
|
6773
|
-
|
|
6774
|
-
|
|
6775
|
-
|
|
6776
|
-
|
|
6777
|
-
|
|
7035
|
+
if (prev) {
|
|
7036
|
+
if (typeof prev === "string") return prev;
|
|
7037
|
+
else if (typeof prev === "function") {
|
|
7038
|
+
let prevPath = prev(file);
|
|
7039
|
+
if (prevPath) {
|
|
7040
|
+
let map = this.loadFile(prevPath, file, true);
|
|
7041
|
+
if (!map) throw new Error("Unable to load previous source map: " + prevPath.toString());
|
|
7042
|
+
return map;
|
|
7043
|
+
}
|
|
7044
|
+
} else if (prev instanceof SourceMapConsumer) return SourceMapGenerator.fromSourceMap(prev).toString();
|
|
7045
|
+
else if (prev instanceof SourceMapGenerator) return prev.toString();
|
|
7046
|
+
else if (this.isMap(prev)) return JSON.stringify(prev);
|
|
7047
|
+
else throw new Error("Unsupported previous source map format: " + prev.toString());
|
|
7048
|
+
} else if (this.inline) return this.decodeInline(this.annotation);
|
|
6778
7049
|
else if (this.annotation) {
|
|
6779
7050
|
let map = this.annotation;
|
|
6780
|
-
if (file) map = join$
|
|
6781
|
-
|
|
7051
|
+
if (file) map = join$1(dirname$2(file), map);
|
|
7052
|
+
let unknown = this.loadFile(map, file, false);
|
|
7053
|
+
if (unknown) try {
|
|
7054
|
+
/* c8 ignore next 4 */
|
|
7055
|
+
this.json = JSON.parse(unknown.replace(/^\)]}'[^\n]*\n/, ""));
|
|
7056
|
+
} catch {
|
|
7057
|
+
return;
|
|
7058
|
+
}
|
|
7059
|
+
return unknown;
|
|
6782
7060
|
}
|
|
6783
7061
|
}
|
|
6784
7062
|
startWith(string, start) {
|
|
@@ -6789,23 +7067,23 @@ var require_previous_map = /* @__PURE__ */ __commonJS({ "../../node_modules/post
|
|
|
6789
7067
|
return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);
|
|
6790
7068
|
}
|
|
6791
7069
|
};
|
|
6792
|
-
module.exports = PreviousMap
|
|
6793
|
-
PreviousMap
|
|
6794
|
-
})
|
|
7070
|
+
module.exports = PreviousMap;
|
|
7071
|
+
PreviousMap.default = PreviousMap;
|
|
7072
|
+
}));
|
|
6795
7073
|
|
|
6796
7074
|
//#endregion
|
|
6797
7075
|
//#region ../../node_modules/postcss/lib/input.js
|
|
6798
|
-
var require_input = /* @__PURE__ */
|
|
7076
|
+
var require_input = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6799
7077
|
let { nanoid } = require_non_secure();
|
|
6800
|
-
let { isAbsolute
|
|
6801
|
-
let { SourceMapConsumer
|
|
6802
|
-
let { fileURLToPath
|
|
6803
|
-
let CssSyntaxError
|
|
6804
|
-
let PreviousMap
|
|
7078
|
+
let { isAbsolute, resolve: resolve$1 } = __require("path");
|
|
7079
|
+
let { SourceMapConsumer, SourceMapGenerator } = require_source_map();
|
|
7080
|
+
let { fileURLToPath, pathToFileURL: pathToFileURL$1 } = __require("url");
|
|
7081
|
+
let CssSyntaxError = require_css_syntax_error();
|
|
7082
|
+
let PreviousMap = require_previous_map();
|
|
6805
7083
|
let terminalHighlight = require_terminal_highlight();
|
|
6806
7084
|
let lineToIndexCache = Symbol("lineToIndexCache");
|
|
6807
|
-
let sourceMapAvailable
|
|
6808
|
-
let pathAvailable
|
|
7085
|
+
let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
|
|
7086
|
+
let pathAvailable = Boolean(resolve$1 && isAbsolute);
|
|
6809
7087
|
function getLineToIndex(input) {
|
|
6810
7088
|
if (input[lineToIndexCache]) return input[lineToIndexCache];
|
|
6811
7089
|
let lines = input.css.split("\n");
|
|
@@ -6818,7 +7096,7 @@ var require_input = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/lib
|
|
|
6818
7096
|
input[lineToIndexCache] = lineToIndex;
|
|
6819
7097
|
return lineToIndex;
|
|
6820
7098
|
}
|
|
6821
|
-
var Input
|
|
7099
|
+
var Input = class {
|
|
6822
7100
|
get from() {
|
|
6823
7101
|
return this.file || this.id;
|
|
6824
7102
|
}
|
|
@@ -6831,10 +7109,12 @@ var require_input = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/lib
|
|
|
6831
7109
|
} else this.hasBOM = false;
|
|
6832
7110
|
this.document = this.css;
|
|
6833
7111
|
if (opts.document) this.document = opts.document.toString();
|
|
6834
|
-
if (opts.from)
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
|
|
7112
|
+
if (opts.from) {
|
|
7113
|
+
if (!pathAvailable || /^\w+:\/\//.test(opts.from) || isAbsolute(opts.from)) this.file = opts.from;
|
|
7114
|
+
else this.file = resolve$1(opts.from);
|
|
7115
|
+
}
|
|
7116
|
+
if (pathAvailable && sourceMapAvailable) {
|
|
7117
|
+
let map = new PreviousMap(this.css, opts);
|
|
6838
7118
|
if (map.text) {
|
|
6839
7119
|
this.map = map;
|
|
6840
7120
|
let file = map.consumer().file;
|
|
@@ -6876,14 +7156,14 @@ var require_input = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/lib
|
|
|
6876
7156
|
column = pos.col;
|
|
6877
7157
|
} else offset = this.fromLineAndColumn(line, column);
|
|
6878
7158
|
let origin = this.origin(line, column, endLine, endColumn);
|
|
6879
|
-
if (origin) result = new CssSyntaxError
|
|
7159
|
+
if (origin) result = new CssSyntaxError(message, origin.endLine === void 0 ? origin.line : {
|
|
6880
7160
|
column: origin.column,
|
|
6881
7161
|
line: origin.line
|
|
6882
7162
|
}, origin.endLine === void 0 ? origin.column : {
|
|
6883
7163
|
column: origin.endColumn,
|
|
6884
7164
|
line: origin.endLine
|
|
6885
7165
|
}, origin.source, origin.file, opts.plugin);
|
|
6886
|
-
else result = new CssSyntaxError
|
|
7166
|
+
else result = new CssSyntaxError(message, endLine === void 0 ? line : {
|
|
6887
7167
|
column,
|
|
6888
7168
|
line
|
|
6889
7169
|
}, endLine === void 0 ? column : {
|
|
@@ -6933,35 +7213,40 @@ var require_input = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/lib
|
|
|
6933
7213
|
}
|
|
6934
7214
|
mapResolve(file) {
|
|
6935
7215
|
if (/^\w+:\/\//.test(file)) return file;
|
|
6936
|
-
return resolve$
|
|
7216
|
+
return resolve$1(this.map.consumer().sourceRoot || this.map.root || ".", file);
|
|
6937
7217
|
}
|
|
6938
7218
|
origin(line, column, endLine, endColumn) {
|
|
6939
7219
|
if (!this.map) return false;
|
|
6940
7220
|
let consumer = this.map.consumer();
|
|
6941
7221
|
let from = consumer.originalPositionFor({
|
|
6942
|
-
column,
|
|
7222
|
+
column: column - 1,
|
|
6943
7223
|
line
|
|
6944
7224
|
});
|
|
6945
7225
|
if (!from.source) return false;
|
|
6946
7226
|
let to;
|
|
6947
|
-
if (typeof endLine === "number")
|
|
6948
|
-
|
|
6949
|
-
|
|
6950
|
-
|
|
7227
|
+
if (typeof endLine === "number") {
|
|
7228
|
+
let toPosition = consumer.originalPositionFor({
|
|
7229
|
+
column: endColumn - 1,
|
|
7230
|
+
line: endLine
|
|
7231
|
+
});
|
|
7232
|
+
if (toPosition.source) to = toPosition;
|
|
7233
|
+
}
|
|
6951
7234
|
let fromUrl;
|
|
6952
|
-
if (isAbsolute
|
|
7235
|
+
if (isAbsolute(from.source)) fromUrl = pathToFileURL$1(from.source);
|
|
6953
7236
|
else fromUrl = new URL(from.source, this.map.consumer().sourceRoot || pathToFileURL$1(this.map.mapFile));
|
|
6954
7237
|
let result = {
|
|
6955
|
-
column: from.column,
|
|
6956
|
-
endColumn: to && to.column,
|
|
7238
|
+
column: from.column + 1,
|
|
7239
|
+
endColumn: to && to.column + 1,
|
|
6957
7240
|
endLine: to && to.line,
|
|
6958
7241
|
line: from.line,
|
|
6959
7242
|
url: fromUrl.toString()
|
|
6960
7243
|
};
|
|
6961
|
-
if (fromUrl.protocol === "file:")
|
|
6962
|
-
|
|
7244
|
+
if (fromUrl.protocol === "file:") {
|
|
7245
|
+
if (fileURLToPath) result.file = fileURLToPath(fromUrl);
|
|
7246
|
+
else
|
|
6963
7247
|
/* c8 ignore next 2 */
|
|
6964
|
-
|
|
7248
|
+
throw new Error(`file: protocol is not available in this PostCSS build`);
|
|
7249
|
+
}
|
|
6965
7250
|
let source = consumer.sourceContentFor(from.source);
|
|
6966
7251
|
if (source) result.source = source;
|
|
6967
7252
|
return result;
|
|
@@ -6981,28 +7266,34 @@ var require_input = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/lib
|
|
|
6981
7266
|
return json;
|
|
6982
7267
|
}
|
|
6983
7268
|
};
|
|
6984
|
-
module.exports = Input
|
|
6985
|
-
Input
|
|
6986
|
-
if (terminalHighlight && terminalHighlight.registerInput) terminalHighlight.registerInput(Input
|
|
6987
|
-
})
|
|
7269
|
+
module.exports = Input;
|
|
7270
|
+
Input.default = Input;
|
|
7271
|
+
if (terminalHighlight && terminalHighlight.registerInput) terminalHighlight.registerInput(Input);
|
|
7272
|
+
}));
|
|
6988
7273
|
|
|
6989
7274
|
//#endregion
|
|
6990
7275
|
//#region ../../node_modules/postcss/lib/root.js
|
|
6991
|
-
var require_root = /* @__PURE__ */
|
|
6992
|
-
let Container
|
|
6993
|
-
let LazyResult
|
|
6994
|
-
|
|
7276
|
+
var require_root = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
7277
|
+
let Container = require_container();
|
|
7278
|
+
let LazyResult;
|
|
7279
|
+
let Processor;
|
|
7280
|
+
var Root = class extends Container {
|
|
6995
7281
|
constructor(defaults) {
|
|
6996
7282
|
super(defaults);
|
|
6997
7283
|
this.type = "root";
|
|
6998
7284
|
if (!this.nodes) this.nodes = [];
|
|
6999
7285
|
}
|
|
7000
7286
|
normalize(child, sample, type) {
|
|
7287
|
+
let keepBefore = /* @__PURE__ */ new Set();
|
|
7288
|
+
for (let node of Array.isArray(child) ? child : [child]) if (node && typeof node === "object" && !node.parent && node.raws && typeof node.raws.before !== "undefined") keepBefore.add(node.raws);
|
|
7001
7289
|
let nodes = super.normalize(child);
|
|
7002
7290
|
if (sample) {
|
|
7003
|
-
if (type === "prepend")
|
|
7004
|
-
|
|
7005
|
-
|
|
7291
|
+
if (type === "prepend") {
|
|
7292
|
+
if (this.nodes.length > 1) sample.raws.before = this.nodes[1].raws.before;
|
|
7293
|
+
else delete sample.raws.before;
|
|
7294
|
+
} else if (this.first !== sample) {
|
|
7295
|
+
for (let node of nodes) if (!keepBefore.has(node.raws)) node.raws.before = sample.raws.before;
|
|
7296
|
+
}
|
|
7006
7297
|
}
|
|
7007
7298
|
return nodes;
|
|
7008
7299
|
}
|
|
@@ -7012,35 +7303,36 @@ var require_root = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/lib/
|
|
|
7012
7303
|
return super.removeChild(child);
|
|
7013
7304
|
}
|
|
7014
7305
|
toResult(opts = {}) {
|
|
7015
|
-
return new LazyResult
|
|
7306
|
+
return new LazyResult(new Processor(), this, opts).stringify();
|
|
7016
7307
|
}
|
|
7017
7308
|
};
|
|
7018
|
-
Root
|
|
7019
|
-
LazyResult
|
|
7309
|
+
Root.registerLazyResult = (dependant) => {
|
|
7310
|
+
LazyResult = dependant;
|
|
7020
7311
|
};
|
|
7021
|
-
Root
|
|
7022
|
-
Processor
|
|
7312
|
+
Root.registerProcessor = (dependant) => {
|
|
7313
|
+
Processor = dependant;
|
|
7023
7314
|
};
|
|
7024
|
-
module.exports = Root
|
|
7025
|
-
Root
|
|
7026
|
-
Container
|
|
7027
|
-
})
|
|
7315
|
+
module.exports = Root;
|
|
7316
|
+
Root.default = Root;
|
|
7317
|
+
Container.registerRoot(Root);
|
|
7318
|
+
}));
|
|
7028
7319
|
|
|
7029
7320
|
//#endregion
|
|
7030
7321
|
//#region ../../node_modules/postcss/lib/list.js
|
|
7031
|
-
var require_list = /* @__PURE__ */
|
|
7032
|
-
let list
|
|
7322
|
+
var require_list = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
7323
|
+
let list = {
|
|
7033
7324
|
comma(string) {
|
|
7034
|
-
return list
|
|
7325
|
+
return list.split(string, [","], true);
|
|
7035
7326
|
},
|
|
7036
7327
|
space(string) {
|
|
7037
|
-
return list
|
|
7328
|
+
return list.split(string, [
|
|
7038
7329
|
" ",
|
|
7039
7330
|
"\n",
|
|
7040
7331
|
" "
|
|
7041
7332
|
]);
|
|
7042
7333
|
},
|
|
7043
7334
|
split(string, separators, last) {
|
|
7335
|
+
if (typeof string !== "string") return [];
|
|
7044
7336
|
let array = [];
|
|
7045
7337
|
let current = "";
|
|
7046
7338
|
let split = false;
|
|
@@ -7063,32 +7355,34 @@ var require_list = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/lib/
|
|
|
7063
7355
|
if (separators.includes(letter)) split = true;
|
|
7064
7356
|
}
|
|
7065
7357
|
if (split) {
|
|
7066
|
-
|
|
7358
|
+
let value = current.trim();
|
|
7359
|
+
if (last || value !== "") array.push(value);
|
|
7067
7360
|
current = "";
|
|
7068
7361
|
split = false;
|
|
7069
7362
|
} else current += letter;
|
|
7070
7363
|
}
|
|
7071
|
-
|
|
7364
|
+
let value = current.trim();
|
|
7365
|
+
if (last || value !== "") array.push(value);
|
|
7072
7366
|
return array;
|
|
7073
7367
|
}
|
|
7074
7368
|
};
|
|
7075
|
-
module.exports = list
|
|
7076
|
-
list
|
|
7077
|
-
})
|
|
7369
|
+
module.exports = list;
|
|
7370
|
+
list.default = list;
|
|
7371
|
+
}));
|
|
7078
7372
|
|
|
7079
7373
|
//#endregion
|
|
7080
7374
|
//#region ../../node_modules/postcss/lib/rule.js
|
|
7081
|
-
var require_rule = /* @__PURE__ */
|
|
7082
|
-
let Container
|
|
7083
|
-
let list
|
|
7084
|
-
var Rule
|
|
7375
|
+
var require_rule = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
7376
|
+
let Container = require_container();
|
|
7377
|
+
let list = require_list();
|
|
7378
|
+
var Rule = class extends Container {
|
|
7085
7379
|
get selectors() {
|
|
7086
|
-
return list
|
|
7380
|
+
return list.comma(this.selector);
|
|
7087
7381
|
}
|
|
7088
7382
|
set selectors(values) {
|
|
7089
7383
|
let match = this.selector ? this.selector.match(/,\s*/) : null;
|
|
7090
|
-
let sep
|
|
7091
|
-
this.selector = values.join(sep
|
|
7384
|
+
let sep = match ? match[0] : "," + this.raw("between", "beforeOpen");
|
|
7385
|
+
this.selector = values.join(sep);
|
|
7092
7386
|
}
|
|
7093
7387
|
constructor(defaults) {
|
|
7094
7388
|
super(defaults);
|
|
@@ -7096,69 +7390,105 @@ var require_rule = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/lib/
|
|
|
7096
7390
|
if (!this.nodes) this.nodes = [];
|
|
7097
7391
|
}
|
|
7098
7392
|
};
|
|
7099
|
-
module.exports = Rule
|
|
7100
|
-
Rule
|
|
7101
|
-
Container
|
|
7102
|
-
})
|
|
7393
|
+
module.exports = Rule;
|
|
7394
|
+
Rule.default = Rule;
|
|
7395
|
+
Container.registerRule(Rule);
|
|
7396
|
+
}));
|
|
7103
7397
|
|
|
7104
7398
|
//#endregion
|
|
7105
7399
|
//#region ../../node_modules/postcss/lib/fromJSON.js
|
|
7106
|
-
var require_fromJSON = /* @__PURE__ */
|
|
7107
|
-
let AtRule
|
|
7108
|
-
let Comment
|
|
7109
|
-
let Declaration
|
|
7110
|
-
let Input
|
|
7400
|
+
var require_fromJSON = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
7401
|
+
let AtRule = require_at_rule();
|
|
7402
|
+
let Comment = require_comment();
|
|
7403
|
+
let Declaration = require_declaration();
|
|
7404
|
+
let Input = require_input();
|
|
7111
7405
|
let PreviousMap = require_previous_map();
|
|
7112
|
-
let Root
|
|
7113
|
-
let Rule
|
|
7114
|
-
function
|
|
7115
|
-
if (
|
|
7116
|
-
|
|
7117
|
-
|
|
7118
|
-
|
|
7119
|
-
|
|
7120
|
-
|
|
7121
|
-
|
|
7122
|
-
|
|
7123
|
-
|
|
7124
|
-
|
|
7125
|
-
|
|
7126
|
-
|
|
7127
|
-
|
|
7128
|
-
|
|
7129
|
-
|
|
7130
|
-
|
|
7131
|
-
|
|
7406
|
+
let Root = require_root();
|
|
7407
|
+
let Rule = require_rule();
|
|
7408
|
+
function hydrateInputs(json, inputs) {
|
|
7409
|
+
if (!json.inputs) return inputs;
|
|
7410
|
+
return json.inputs.map((input) => {
|
|
7411
|
+
let inputHydrated = {
|
|
7412
|
+
...input,
|
|
7413
|
+
__proto__: Input.prototype
|
|
7414
|
+
};
|
|
7415
|
+
if (inputHydrated.map) inputHydrated.map = {
|
|
7416
|
+
...inputHydrated.map,
|
|
7417
|
+
__proto__: PreviousMap.prototype
|
|
7418
|
+
};
|
|
7419
|
+
return inputHydrated;
|
|
7420
|
+
});
|
|
7421
|
+
}
|
|
7422
|
+
function constructNode(json, inputs, children) {
|
|
7423
|
+
let defaults = { ...json };
|
|
7424
|
+
delete defaults.inputs;
|
|
7425
|
+
delete defaults.nodes;
|
|
7132
7426
|
if (defaults.source) {
|
|
7133
|
-
let { inputId
|
|
7427
|
+
let { inputId, ...source } = defaults.source;
|
|
7134
7428
|
defaults.source = source;
|
|
7135
7429
|
if (inputId != null) defaults.source.input = inputs[inputId];
|
|
7136
7430
|
}
|
|
7137
|
-
|
|
7138
|
-
|
|
7139
|
-
else if (defaults.type === "
|
|
7140
|
-
else if (defaults.type === "
|
|
7141
|
-
else if (defaults.type === "
|
|
7431
|
+
let node;
|
|
7432
|
+
if (defaults.type === "root") node = new Root(defaults);
|
|
7433
|
+
else if (defaults.type === "decl") node = new Declaration(defaults);
|
|
7434
|
+
else if (defaults.type === "rule") node = new Rule(defaults);
|
|
7435
|
+
else if (defaults.type === "comment") node = new Comment(defaults);
|
|
7436
|
+
else if (defaults.type === "atrule") node = new AtRule(defaults);
|
|
7142
7437
|
else throw new Error("Unknown node type: " + json.type);
|
|
7438
|
+
if (children) {
|
|
7439
|
+
node.nodes = children;
|
|
7440
|
+
for (let child of children) child.parent = node;
|
|
7441
|
+
}
|
|
7442
|
+
return node;
|
|
7143
7443
|
}
|
|
7144
|
-
|
|
7145
|
-
|
|
7146
|
-
|
|
7444
|
+
function fromJSON(json, inputs) {
|
|
7445
|
+
if (Array.isArray(json)) return json.map((n) => fromJSON(n));
|
|
7446
|
+
let result;
|
|
7447
|
+
let stack = [{
|
|
7448
|
+
childIndex: 0,
|
|
7449
|
+
children: [],
|
|
7450
|
+
inputs: hydrateInputs(json, inputs),
|
|
7451
|
+
json
|
|
7452
|
+
}];
|
|
7453
|
+
while (stack.length > 0) {
|
|
7454
|
+
let frame = stack[stack.length - 1];
|
|
7455
|
+
let jsonNodes = frame.json.nodes;
|
|
7456
|
+
if (jsonNodes && frame.childIndex < jsonNodes.length) {
|
|
7457
|
+
let childJson = jsonNodes[frame.childIndex];
|
|
7458
|
+
frame.childIndex += 1;
|
|
7459
|
+
stack.push({
|
|
7460
|
+
childIndex: 0,
|
|
7461
|
+
children: [],
|
|
7462
|
+
inputs: hydrateInputs(childJson, frame.inputs),
|
|
7463
|
+
json: childJson
|
|
7464
|
+
});
|
|
7465
|
+
continue;
|
|
7466
|
+
}
|
|
7467
|
+
stack.pop();
|
|
7468
|
+
let node = constructNode(frame.json, frame.inputs, jsonNodes ? frame.children : void 0);
|
|
7469
|
+
if (stack.length > 0) stack[stack.length - 1].children.push(node);
|
|
7470
|
+
else result = node;
|
|
7471
|
+
}
|
|
7472
|
+
return result;
|
|
7473
|
+
}
|
|
7474
|
+
module.exports = fromJSON;
|
|
7475
|
+
fromJSON.default = fromJSON;
|
|
7476
|
+
}));
|
|
7147
7477
|
|
|
7148
7478
|
//#endregion
|
|
7149
7479
|
//#region ../../node_modules/postcss/lib/map-generator.js
|
|
7150
|
-
var require_map_generator = /* @__PURE__ */
|
|
7151
|
-
let { dirname: dirname$1, relative: relative$
|
|
7480
|
+
var require_map_generator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
7481
|
+
let { dirname: dirname$1, relative: relative$1, resolve, sep } = __require("path");
|
|
7152
7482
|
let { SourceMapConsumer, SourceMapGenerator } = require_source_map();
|
|
7153
7483
|
let { pathToFileURL } = __require("url");
|
|
7154
|
-
let Input
|
|
7484
|
+
let Input = require_input();
|
|
7155
7485
|
let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
|
|
7156
|
-
let pathAvailable = Boolean(dirname$1 && resolve
|
|
7157
|
-
var MapGenerator
|
|
7158
|
-
constructor(stringify
|
|
7159
|
-
this.stringify = stringify
|
|
7486
|
+
let pathAvailable = Boolean(dirname$1 && resolve && relative$1 && sep);
|
|
7487
|
+
var MapGenerator = class {
|
|
7488
|
+
constructor(stringify, root, opts, cssString) {
|
|
7489
|
+
this.stringify = stringify;
|
|
7160
7490
|
this.mapOpts = opts.map || {};
|
|
7161
|
-
this.root = root
|
|
7491
|
+
this.root = root;
|
|
7162
7492
|
this.opts = opts;
|
|
7163
7493
|
this.css = cssString;
|
|
7164
7494
|
this.originalCSS = cssString;
|
|
@@ -7180,13 +7510,13 @@ var require_map_generator = /* @__PURE__ */ __commonJS({ "../../node_modules/pos
|
|
|
7180
7510
|
applyPrevMaps() {
|
|
7181
7511
|
for (let prev of this.previous()) {
|
|
7182
7512
|
let from = this.toUrl(this.path(prev.file));
|
|
7183
|
-
let root
|
|
7513
|
+
let root = prev.root || dirname$1(prev.file);
|
|
7184
7514
|
let map;
|
|
7185
7515
|
if (this.mapOpts.sourcesContent === false) {
|
|
7186
7516
|
map = new SourceMapConsumer(prev.text);
|
|
7187
7517
|
if (map.sourcesContent) map.sourcesContent = null;
|
|
7188
7518
|
} else map = prev.consumer();
|
|
7189
|
-
this.map.applySourceMap(map, from, this.toUrl(this.path(root
|
|
7519
|
+
this.map.applySourceMap(map, from, this.toUrl(this.path(root)));
|
|
7190
7520
|
}
|
|
7191
7521
|
}
|
|
7192
7522
|
clearAnnotation() {
|
|
@@ -7199,9 +7529,10 @@ var require_map_generator = /* @__PURE__ */ __commonJS({ "../../node_modules/pos
|
|
|
7199
7529
|
if (node.text.startsWith("# sourceMappingURL=")) this.root.removeChild(i);
|
|
7200
7530
|
}
|
|
7201
7531
|
} else if (this.css) {
|
|
7532
|
+
let annotation = "/*# sourceMappingURL=";
|
|
7202
7533
|
let startIndex;
|
|
7203
|
-
while ((startIndex = this.css.lastIndexOf(
|
|
7204
|
-
let endIndex = this.css.indexOf("*/", startIndex +
|
|
7534
|
+
while ((startIndex = this.css.lastIndexOf(annotation)) !== -1) {
|
|
7535
|
+
let endIndex = this.css.indexOf("*/", startIndex + 21);
|
|
7205
7536
|
if (endIndex === -1) break;
|
|
7206
7537
|
while (startIndex > 0 && this.css[startIndex - 1] === "\n") startIndex--;
|
|
7207
7538
|
this.css = this.css.slice(0, startIndex) + this.css.slice(endIndex + 2);
|
|
@@ -7293,21 +7624,23 @@ var require_map_generator = /* @__PURE__ */ __commonJS({ "../../node_modules/pos
|
|
|
7293
7624
|
column = str.length - last;
|
|
7294
7625
|
} else column += str.length;
|
|
7295
7626
|
if (node && type !== "start") {
|
|
7296
|
-
let p
|
|
7297
|
-
if (!(node.type === "decl" || node.type === "atrule" && !node.nodes) || node !== p
|
|
7298
|
-
|
|
7299
|
-
|
|
7300
|
-
|
|
7301
|
-
|
|
7302
|
-
|
|
7303
|
-
|
|
7304
|
-
|
|
7305
|
-
|
|
7306
|
-
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
|
|
7627
|
+
let p = node.parent || { raws: {} };
|
|
7628
|
+
if (!(node.type === "decl" || node.type === "atrule" && !node.nodes) || node !== p.last || p.raws.semicolon) {
|
|
7629
|
+
if (node.source && node.source.end) {
|
|
7630
|
+
mapping.source = this.sourcePath(node);
|
|
7631
|
+
mapping.original.line = node.source.end.line;
|
|
7632
|
+
mapping.original.column = node.source.end.column - 1;
|
|
7633
|
+
mapping.generated.line = line;
|
|
7634
|
+
mapping.generated.column = column - 2;
|
|
7635
|
+
this.map.addMapping(mapping);
|
|
7636
|
+
} else {
|
|
7637
|
+
mapping.source = noSource;
|
|
7638
|
+
mapping.original.line = 1;
|
|
7639
|
+
mapping.original.column = 0;
|
|
7640
|
+
mapping.generated.line = line;
|
|
7641
|
+
mapping.generated.column = column - 1;
|
|
7642
|
+
this.map.addMapping(mapping);
|
|
7643
|
+
}
|
|
7311
7644
|
}
|
|
7312
7645
|
}
|
|
7313
7646
|
});
|
|
@@ -7346,10 +7679,10 @@ var require_map_generator = /* @__PURE__ */ __commonJS({ "../../node_modules/pos
|
|
|
7346
7679
|
let cached = this.memoizedPaths.get(file);
|
|
7347
7680
|
if (cached) return cached;
|
|
7348
7681
|
let from = this.opts.to ? dirname$1(this.opts.to) : ".";
|
|
7349
|
-
if (typeof this.mapOpts.annotation === "string") from = dirname$1(resolve
|
|
7350
|
-
let path
|
|
7351
|
-
this.memoizedPaths.set(file, path
|
|
7352
|
-
return path
|
|
7682
|
+
if (typeof this.mapOpts.annotation === "string") from = dirname$1(resolve(from, this.mapOpts.annotation));
|
|
7683
|
+
let path = relative$1(from, file);
|
|
7684
|
+
this.memoizedPaths.set(file, path);
|
|
7685
|
+
return path;
|
|
7353
7686
|
}
|
|
7354
7687
|
previous() {
|
|
7355
7688
|
if (!this.previousMaps) {
|
|
@@ -7361,7 +7694,7 @@ var require_map_generator = /* @__PURE__ */ __commonJS({ "../../node_modules/pos
|
|
|
7361
7694
|
}
|
|
7362
7695
|
});
|
|
7363
7696
|
else {
|
|
7364
|
-
let input = new Input
|
|
7697
|
+
let input = new Input(this.originalCSS, this.opts);
|
|
7365
7698
|
if (input.map) this.previousMaps.push(input.map);
|
|
7366
7699
|
}
|
|
7367
7700
|
}
|
|
@@ -7393,35 +7726,35 @@ var require_map_generator = /* @__PURE__ */ __commonJS({ "../../node_modules/pos
|
|
|
7393
7726
|
if (Buffer) return Buffer.from(str).toString("base64");
|
|
7394
7727
|
else return window.btoa(unescape(encodeURIComponent(str)));
|
|
7395
7728
|
}
|
|
7396
|
-
toFileUrl(path
|
|
7397
|
-
let cached = this.memoizedFileURLs.get(path
|
|
7729
|
+
toFileUrl(path) {
|
|
7730
|
+
let cached = this.memoizedFileURLs.get(path);
|
|
7398
7731
|
if (cached) return cached;
|
|
7399
7732
|
if (pathToFileURL) {
|
|
7400
|
-
let fileURL = pathToFileURL(path
|
|
7401
|
-
this.memoizedFileURLs.set(path
|
|
7733
|
+
let fileURL = pathToFileURL(path).toString();
|
|
7734
|
+
this.memoizedFileURLs.set(path, fileURL);
|
|
7402
7735
|
return fileURL;
|
|
7403
7736
|
} else throw new Error("`map.absolute` option is not available in this PostCSS build");
|
|
7404
7737
|
}
|
|
7405
|
-
toUrl(path
|
|
7406
|
-
let cached = this.memoizedURLs.get(path
|
|
7738
|
+
toUrl(path) {
|
|
7739
|
+
let cached = this.memoizedURLs.get(path);
|
|
7407
7740
|
if (cached) return cached;
|
|
7408
|
-
if (sep === "\\") path
|
|
7409
|
-
let url = encodeURI(path
|
|
7410
|
-
this.memoizedURLs.set(path
|
|
7741
|
+
if (sep === "\\") path = path.replace(/\\/g, "/");
|
|
7742
|
+
let url = encodeURI(path).replace(/[#?]/g, encodeURIComponent);
|
|
7743
|
+
this.memoizedURLs.set(path, url);
|
|
7411
7744
|
return url;
|
|
7412
7745
|
}
|
|
7413
7746
|
};
|
|
7414
|
-
module.exports = MapGenerator
|
|
7415
|
-
})
|
|
7747
|
+
module.exports = MapGenerator;
|
|
7748
|
+
}));
|
|
7416
7749
|
|
|
7417
7750
|
//#endregion
|
|
7418
7751
|
//#region ../../node_modules/postcss/lib/parser.js
|
|
7419
|
-
var require_parser = /* @__PURE__ */
|
|
7420
|
-
let AtRule
|
|
7421
|
-
let Comment
|
|
7422
|
-
let Declaration
|
|
7423
|
-
let Root
|
|
7424
|
-
let Rule
|
|
7752
|
+
var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
7753
|
+
let AtRule = require_at_rule();
|
|
7754
|
+
let Comment = require_comment();
|
|
7755
|
+
let Declaration = require_declaration();
|
|
7756
|
+
let Root = require_root();
|
|
7757
|
+
let Rule = require_rule();
|
|
7425
7758
|
let tokenizer = require_tokenize();
|
|
7426
7759
|
const SAFE_COMMENT_NEIGHBOR = {
|
|
7427
7760
|
empty: true,
|
|
@@ -7434,10 +7767,15 @@ var require_parser = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/li
|
|
|
7434
7767
|
if (pos) return pos;
|
|
7435
7768
|
}
|
|
7436
7769
|
}
|
|
7437
|
-
|
|
7770
|
+
function tokensToString(tokens, from, to) {
|
|
7771
|
+
let result = "";
|
|
7772
|
+
for (let i = from; i < to; i++) result += tokens[i][1];
|
|
7773
|
+
return result;
|
|
7774
|
+
}
|
|
7775
|
+
var Parser = class {
|
|
7438
7776
|
constructor(input) {
|
|
7439
7777
|
this.input = input;
|
|
7440
|
-
this.root = new Root
|
|
7778
|
+
this.root = new Root();
|
|
7441
7779
|
this.current = this.root;
|
|
7442
7780
|
this.spaces = "";
|
|
7443
7781
|
this.semicolon = false;
|
|
@@ -7452,7 +7790,7 @@ var require_parser = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/li
|
|
|
7452
7790
|
};
|
|
7453
7791
|
}
|
|
7454
7792
|
atrule(token) {
|
|
7455
|
-
let node = new AtRule
|
|
7793
|
+
let node = new AtRule();
|
|
7456
7794
|
node.name = token[1].slice(1);
|
|
7457
7795
|
if (node.name === "") this.unnamedAtrule(node, token);
|
|
7458
7796
|
this.init(node, token[2]);
|
|
@@ -7469,28 +7807,29 @@ var require_parser = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/li
|
|
|
7469
7807
|
if (type === "(" || type === "[") brackets.push(type === "(" ? ")" : "]");
|
|
7470
7808
|
else if (type === "{" && brackets.length > 0) brackets.push("}");
|
|
7471
7809
|
else if (type === brackets[brackets.length - 1]) brackets.pop();
|
|
7472
|
-
if (brackets.length === 0)
|
|
7473
|
-
|
|
7474
|
-
|
|
7475
|
-
|
|
7476
|
-
|
|
7477
|
-
|
|
7478
|
-
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
if (
|
|
7482
|
-
|
|
7483
|
-
|
|
7484
|
-
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
|
|
7810
|
+
if (brackets.length === 0) {
|
|
7811
|
+
if (type === ";") {
|
|
7812
|
+
node.source.end = this.getPosition(token[2]);
|
|
7813
|
+
node.source.end.offset++;
|
|
7814
|
+
this.semicolon = true;
|
|
7815
|
+
break;
|
|
7816
|
+
} else if (type === "{") {
|
|
7817
|
+
open = true;
|
|
7818
|
+
break;
|
|
7819
|
+
} else if (type === "}") {
|
|
7820
|
+
if (params.length > 0) {
|
|
7821
|
+
shift = params.length - 1;
|
|
7822
|
+
prev = params[shift];
|
|
7823
|
+
while (prev && prev[0] === "space") prev = params[--shift];
|
|
7824
|
+
if (prev) {
|
|
7825
|
+
node.source.end = this.getPosition(prev[3] || prev[2]);
|
|
7826
|
+
node.source.end.offset++;
|
|
7827
|
+
}
|
|
7488
7828
|
}
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
|
|
7829
|
+
this.end(token);
|
|
7830
|
+
break;
|
|
7831
|
+
} else params.push(token);
|
|
7492
7832
|
} else params.push(token);
|
|
7493
|
-
else params.push(token);
|
|
7494
7833
|
if (this.tokenizer.endOfFile()) {
|
|
7495
7834
|
last = true;
|
|
7496
7835
|
break;
|
|
@@ -7538,15 +7877,17 @@ var require_parser = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/li
|
|
|
7538
7877
|
type = token[0];
|
|
7539
7878
|
if (type === "(") brackets += 1;
|
|
7540
7879
|
if (type === ")") brackets -= 1;
|
|
7541
|
-
if (brackets === 0 && type === ":")
|
|
7542
|
-
|
|
7543
|
-
|
|
7880
|
+
if (brackets === 0 && type === ":") {
|
|
7881
|
+
if (!prev) this.doubleColon(token);
|
|
7882
|
+
else if (prev[0] === "word" && prev[1] === "progid") continue;
|
|
7883
|
+
else return i;
|
|
7884
|
+
}
|
|
7544
7885
|
prev = token;
|
|
7545
7886
|
}
|
|
7546
7887
|
return false;
|
|
7547
7888
|
}
|
|
7548
7889
|
comment(token) {
|
|
7549
|
-
let node = new Comment
|
|
7890
|
+
let node = new Comment();
|
|
7550
7891
|
this.init(node, token[2]);
|
|
7551
7892
|
node.source.end = this.getPosition(token[3] || token[2]);
|
|
7552
7893
|
node.source.end.offset++;
|
|
@@ -7566,7 +7907,7 @@ var require_parser = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/li
|
|
|
7566
7907
|
this.tokenizer = tokenizer(this.input);
|
|
7567
7908
|
}
|
|
7568
7909
|
decl(tokens, customProperty) {
|
|
7569
|
-
let node = new Declaration
|
|
7910
|
+
let node = new Declaration();
|
|
7570
7911
|
this.init(node, tokens[0][2]);
|
|
7571
7912
|
let last = tokens[tokens.length - 1];
|
|
7572
7913
|
if (last[0] === ";") {
|
|
@@ -7575,40 +7916,41 @@ var require_parser = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/li
|
|
|
7575
7916
|
}
|
|
7576
7917
|
node.source.end = this.getPosition(last[3] || last[2] || findLastWithPosition(tokens));
|
|
7577
7918
|
node.source.end.offset++;
|
|
7578
|
-
|
|
7579
|
-
|
|
7580
|
-
|
|
7581
|
-
|
|
7582
|
-
|
|
7583
|
-
node.
|
|
7584
|
-
|
|
7585
|
-
|
|
7919
|
+
let start = 0;
|
|
7920
|
+
while (tokens[start][0] !== "word") {
|
|
7921
|
+
if (start === tokens.length - 1) this.unknownWord([tokens[start]]);
|
|
7922
|
+
start++;
|
|
7923
|
+
}
|
|
7924
|
+
node.raws.before += tokensToString(tokens, 0, start);
|
|
7925
|
+
node.source.start = this.getPosition(tokens[start][2]);
|
|
7926
|
+
let propStart = start;
|
|
7927
|
+
while (start < tokens.length) {
|
|
7928
|
+
let type = tokens[start][0];
|
|
7586
7929
|
if (type === ":" || type === "space" || type === "comment") break;
|
|
7587
|
-
|
|
7930
|
+
start++;
|
|
7588
7931
|
}
|
|
7589
|
-
node.
|
|
7932
|
+
node.prop = tokensToString(tokens, propStart, start);
|
|
7933
|
+
let betweenStart = start;
|
|
7590
7934
|
let token;
|
|
7591
|
-
while (tokens.length) {
|
|
7592
|
-
token = tokens
|
|
7593
|
-
|
|
7594
|
-
|
|
7595
|
-
|
|
7596
|
-
} else {
|
|
7597
|
-
if (token[0] === "word" && /\w/.test(token[1])) this.unknownWord([token]);
|
|
7598
|
-
node.raws.between += token[1];
|
|
7599
|
-
}
|
|
7935
|
+
while (start < tokens.length) {
|
|
7936
|
+
token = tokens[start];
|
|
7937
|
+
start++;
|
|
7938
|
+
if (token[0] === ":") break;
|
|
7939
|
+
if (token[0] === "word" && /\w/.test(token[1])) this.unknownWord([token]);
|
|
7600
7940
|
}
|
|
7941
|
+
node.raws.between = tokensToString(tokens, betweenStart, start);
|
|
7601
7942
|
if (node.prop[0] === "_" || node.prop[0] === "*") {
|
|
7602
7943
|
node.raws.before += node.prop[0];
|
|
7603
7944
|
node.prop = node.prop.slice(1);
|
|
7604
7945
|
}
|
|
7605
|
-
let
|
|
7606
|
-
|
|
7607
|
-
|
|
7608
|
-
next = tokens[0][0];
|
|
7946
|
+
let firstSpacesStart = start;
|
|
7947
|
+
while (start < tokens.length) {
|
|
7948
|
+
let next = tokens[start][0];
|
|
7609
7949
|
if (next !== "space" && next !== "comment") break;
|
|
7610
|
-
|
|
7950
|
+
start++;
|
|
7611
7951
|
}
|
|
7952
|
+
let firstSpaces = tokens.slice(firstSpacesStart, start);
|
|
7953
|
+
tokens = tokens.slice(start);
|
|
7612
7954
|
this.precheckMissedSemicolon(tokens);
|
|
7613
7955
|
for (let i = tokens.length - 1; i >= 0; i--) {
|
|
7614
7956
|
token = tokens[i];
|
|
@@ -7645,7 +7987,7 @@ var require_parser = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/li
|
|
|
7645
7987
|
throw this.input.error("Double colon", { offset: token[2] }, { offset: token[2] + token[1].length });
|
|
7646
7988
|
}
|
|
7647
7989
|
emptyRule(token) {
|
|
7648
|
-
let node = new Rule
|
|
7990
|
+
let node = new Rule();
|
|
7649
7991
|
this.init(node, token[2]);
|
|
7650
7992
|
node.selector = "";
|
|
7651
7993
|
node.raws.between = "";
|
|
@@ -7676,7 +8018,7 @@ var require_parser = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/li
|
|
|
7676
8018
|
prev.raws.ownSemicolon = this.spaces;
|
|
7677
8019
|
this.spaces = "";
|
|
7678
8020
|
prev.source.end = this.getPosition(token[2]);
|
|
7679
|
-
prev.source.end.offset
|
|
8021
|
+
prev.source.end.offset++;
|
|
7680
8022
|
}
|
|
7681
8023
|
}
|
|
7682
8024
|
}
|
|
@@ -7717,11 +8059,12 @@ var require_parser = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/li
|
|
|
7717
8059
|
if (!bracket) bracket = token;
|
|
7718
8060
|
brackets.push("}");
|
|
7719
8061
|
} else if (brackets.length === 0) {
|
|
7720
|
-
if (type === ";")
|
|
7721
|
-
|
|
7722
|
-
|
|
7723
|
-
|
|
7724
|
-
|
|
8062
|
+
if (type === ";") {
|
|
8063
|
+
if (colon) {
|
|
8064
|
+
this.decl(tokens, customProperty);
|
|
8065
|
+
return;
|
|
8066
|
+
} else break;
|
|
8067
|
+
} else if (type === "{") {
|
|
7725
8068
|
this.rule(tokens);
|
|
7726
8069
|
return;
|
|
7727
8070
|
} else if (type === "}") {
|
|
@@ -7769,9 +8112,7 @@ var require_parser = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/li
|
|
|
7769
8112
|
case "{":
|
|
7770
8113
|
this.emptyRule(token);
|
|
7771
8114
|
break;
|
|
7772
|
-
default:
|
|
7773
|
-
this.other(token);
|
|
7774
|
-
break;
|
|
8115
|
+
default: this.other(token);
|
|
7775
8116
|
}
|
|
7776
8117
|
}
|
|
7777
8118
|
this.endFile();
|
|
@@ -7790,9 +8131,10 @@ var require_parser = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/li
|
|
|
7790
8131
|
else if (type === "comment") {
|
|
7791
8132
|
prev = tokens[i - 1] ? tokens[i - 1][0] : "empty";
|
|
7792
8133
|
next = tokens[i + 1] ? tokens[i + 1][0] : "empty";
|
|
7793
|
-
if (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next])
|
|
7794
|
-
|
|
7795
|
-
|
|
8134
|
+
if (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next]) {
|
|
8135
|
+
if (value.slice(-1) === ",") clean = false;
|
|
8136
|
+
else value += token[1];
|
|
8137
|
+
} else clean = false;
|
|
7796
8138
|
} else value += token[1];
|
|
7797
8139
|
}
|
|
7798
8140
|
if (!clean) {
|
|
@@ -7806,7 +8148,7 @@ var require_parser = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/li
|
|
|
7806
8148
|
}
|
|
7807
8149
|
rule(tokens) {
|
|
7808
8150
|
tokens.pop();
|
|
7809
|
-
let node = new Rule
|
|
8151
|
+
let node = new Rule();
|
|
7810
8152
|
this.init(node, tokens[0][2]);
|
|
7811
8153
|
node.raws.between = this.spacesAndCommentsFromEnd(tokens);
|
|
7812
8154
|
this.raw(node, "selector", tokens);
|
|
@@ -7865,17 +8207,18 @@ var require_parser = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/li
|
|
|
7865
8207
|
throw this.input.error("At-rule without name", { offset: token[2] }, { offset: token[2] + token[1].length });
|
|
7866
8208
|
}
|
|
7867
8209
|
};
|
|
7868
|
-
module.exports = Parser
|
|
7869
|
-
})
|
|
8210
|
+
module.exports = Parser;
|
|
8211
|
+
}));
|
|
7870
8212
|
|
|
7871
8213
|
//#endregion
|
|
7872
8214
|
//#region ../../node_modules/postcss/lib/parse.js
|
|
7873
|
-
var require_parse = /* @__PURE__ */
|
|
7874
|
-
let Container
|
|
7875
|
-
let Input
|
|
8215
|
+
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8216
|
+
let Container = require_container();
|
|
8217
|
+
let Input = require_input();
|
|
7876
8218
|
let Parser = require_parser();
|
|
7877
|
-
function parse
|
|
7878
|
-
let
|
|
8219
|
+
function parse(css, opts) {
|
|
8220
|
+
let input = new Input(css, opts);
|
|
8221
|
+
let parser = new Parser(input);
|
|
7879
8222
|
try {
|
|
7880
8223
|
parser.parse();
|
|
7881
8224
|
} catch (e) {
|
|
@@ -7890,19 +8233,22 @@ var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/lib
|
|
|
7890
8233
|
}
|
|
7891
8234
|
return parser.root;
|
|
7892
8235
|
}
|
|
7893
|
-
module.exports = parse
|
|
7894
|
-
parse
|
|
7895
|
-
Container
|
|
7896
|
-
})
|
|
8236
|
+
module.exports = parse;
|
|
8237
|
+
parse.default = parse;
|
|
8238
|
+
Container.registerParse(parse);
|
|
8239
|
+
}));
|
|
7897
8240
|
|
|
7898
8241
|
//#endregion
|
|
7899
8242
|
//#region ../../node_modules/postcss/lib/warning.js
|
|
7900
|
-
var require_warning = /* @__PURE__ */
|
|
7901
|
-
|
|
8243
|
+
var require_warning = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8244
|
+
let Container = require_container();
|
|
8245
|
+
let { my } = require_symbols();
|
|
8246
|
+
var Warning = class {
|
|
7902
8247
|
constructor(text, opts = {}) {
|
|
7903
8248
|
this.type = "warning";
|
|
7904
8249
|
this.text = text;
|
|
7905
8250
|
if (opts.node && opts.node.source) {
|
|
8251
|
+
if (!opts.node[my]) Container.rebuild(opts.node);
|
|
7906
8252
|
let range = opts.node.rangeBy(opts);
|
|
7907
8253
|
this.line = range.start.line;
|
|
7908
8254
|
this.column = range.start.column;
|
|
@@ -7921,22 +8267,22 @@ var require_warning = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/l
|
|
|
7921
8267
|
return this.text;
|
|
7922
8268
|
}
|
|
7923
8269
|
};
|
|
7924
|
-
module.exports = Warning
|
|
7925
|
-
Warning
|
|
7926
|
-
})
|
|
8270
|
+
module.exports = Warning;
|
|
8271
|
+
Warning.default = Warning;
|
|
8272
|
+
}));
|
|
7927
8273
|
|
|
7928
8274
|
//#endregion
|
|
7929
8275
|
//#region ../../node_modules/postcss/lib/result.js
|
|
7930
|
-
var require_result = /* @__PURE__ */
|
|
7931
|
-
let Warning
|
|
7932
|
-
var Result
|
|
8276
|
+
var require_result = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8277
|
+
let Warning = require_warning();
|
|
8278
|
+
var Result = class {
|
|
7933
8279
|
get content() {
|
|
7934
8280
|
return this.css;
|
|
7935
8281
|
}
|
|
7936
|
-
constructor(processor, root
|
|
8282
|
+
constructor(processor, root, opts) {
|
|
7937
8283
|
this.processor = processor;
|
|
7938
8284
|
this.messages = [];
|
|
7939
|
-
this.root = root
|
|
8285
|
+
this.root = root;
|
|
7940
8286
|
this.opts = opts;
|
|
7941
8287
|
this.css = "";
|
|
7942
8288
|
this.map = void 0;
|
|
@@ -7948,7 +8294,7 @@ var require_result = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/li
|
|
|
7948
8294
|
if (!opts.plugin) {
|
|
7949
8295
|
if (this.lastPlugin && this.lastPlugin.postcssPlugin) opts.plugin = this.lastPlugin.postcssPlugin;
|
|
7950
8296
|
}
|
|
7951
|
-
let warning = new Warning
|
|
8297
|
+
let warning = new Warning(text, opts);
|
|
7952
8298
|
this.messages.push(warning);
|
|
7953
8299
|
return warning;
|
|
7954
8300
|
}
|
|
@@ -7956,33 +8302,33 @@ var require_result = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/li
|
|
|
7956
8302
|
return this.messages.filter((i) => i.type === "warning");
|
|
7957
8303
|
}
|
|
7958
8304
|
};
|
|
7959
|
-
module.exports = Result
|
|
7960
|
-
Result
|
|
7961
|
-
})
|
|
8305
|
+
module.exports = Result;
|
|
8306
|
+
Result.default = Result;
|
|
8307
|
+
}));
|
|
7962
8308
|
|
|
7963
8309
|
//#endregion
|
|
7964
8310
|
//#region ../../node_modules/postcss/lib/warn-once.js
|
|
7965
|
-
var require_warn_once = /* @__PURE__ */
|
|
8311
|
+
var require_warn_once = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
7966
8312
|
let printed = {};
|
|
7967
|
-
module.exports = function warnOnce
|
|
8313
|
+
module.exports = function warnOnce(message) {
|
|
7968
8314
|
if (printed[message]) return;
|
|
7969
8315
|
printed[message] = true;
|
|
7970
8316
|
if (typeof console !== "undefined" && console.warn) console.warn(message);
|
|
7971
8317
|
};
|
|
7972
|
-
})
|
|
8318
|
+
}));
|
|
7973
8319
|
|
|
7974
8320
|
//#endregion
|
|
7975
8321
|
//#region ../../node_modules/postcss/lib/lazy-result.js
|
|
7976
|
-
var require_lazy_result = /* @__PURE__ */
|
|
7977
|
-
let Container
|
|
7978
|
-
let Document
|
|
7979
|
-
let MapGenerator
|
|
7980
|
-
let parse
|
|
7981
|
-
let Result
|
|
7982
|
-
let Root
|
|
7983
|
-
let stringify
|
|
8322
|
+
var require_lazy_result = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8323
|
+
let Container = require_container();
|
|
8324
|
+
let Document = require_document();
|
|
8325
|
+
let MapGenerator = require_map_generator();
|
|
8326
|
+
let parse = require_parse();
|
|
8327
|
+
let Result = require_result();
|
|
8328
|
+
let Root = require_root();
|
|
8329
|
+
let stringify = require_stringify();
|
|
7984
8330
|
let { isClean, my } = require_symbols();
|
|
7985
|
-
let warnOnce
|
|
8331
|
+
let warnOnce = require_warn_once();
|
|
7986
8332
|
const TYPE_TO_CLASS_NAME = {
|
|
7987
8333
|
atrule: "AtRule",
|
|
7988
8334
|
comment: "Comment",
|
|
@@ -8066,12 +8412,16 @@ var require_lazy_result = /* @__PURE__ */ __commonJS({ "../../node_modules/postc
|
|
|
8066
8412
|
};
|
|
8067
8413
|
}
|
|
8068
8414
|
function cleanMarks(node) {
|
|
8069
|
-
|
|
8070
|
-
|
|
8415
|
+
let stack = [node];
|
|
8416
|
+
while (stack.length > 0) {
|
|
8417
|
+
let next = stack.pop();
|
|
8418
|
+
next[isClean] = false;
|
|
8419
|
+
if (next.nodes) for (let i of next.nodes) stack.push(i);
|
|
8420
|
+
}
|
|
8071
8421
|
return node;
|
|
8072
8422
|
}
|
|
8073
|
-
let postcss
|
|
8074
|
-
var LazyResult
|
|
8423
|
+
let postcss = {};
|
|
8424
|
+
var LazyResult = class LazyResult {
|
|
8075
8425
|
get content() {
|
|
8076
8426
|
return this.stringify().content;
|
|
8077
8427
|
}
|
|
@@ -8099,42 +8449,42 @@ var require_lazy_result = /* @__PURE__ */ __commonJS({ "../../node_modules/postc
|
|
|
8099
8449
|
constructor(processor, css, opts) {
|
|
8100
8450
|
this.stringified = false;
|
|
8101
8451
|
this.processed = false;
|
|
8102
|
-
let root
|
|
8103
|
-
if (typeof css === "object" && css !== null && (css.type === "root" || css.type === "document")) root
|
|
8104
|
-
else if (css instanceof LazyResult
|
|
8105
|
-
root
|
|
8452
|
+
let root;
|
|
8453
|
+
if (typeof css === "object" && css !== null && (css.type === "root" || css.type === "document")) root = cleanMarks(css);
|
|
8454
|
+
else if (css instanceof LazyResult || css instanceof Result) {
|
|
8455
|
+
root = cleanMarks(css.root);
|
|
8106
8456
|
if (css.map) {
|
|
8107
8457
|
if (typeof opts.map === "undefined") opts.map = {};
|
|
8108
8458
|
if (!opts.map.inline) opts.map.inline = false;
|
|
8109
8459
|
opts.map.prev = css.map;
|
|
8110
8460
|
}
|
|
8111
8461
|
} else {
|
|
8112
|
-
let parser = parse
|
|
8462
|
+
let parser = parse;
|
|
8113
8463
|
if (opts.syntax) parser = opts.syntax.parse;
|
|
8114
8464
|
if (opts.parser) parser = opts.parser;
|
|
8115
8465
|
if (parser.parse) parser = parser.parse;
|
|
8116
8466
|
try {
|
|
8117
|
-
root
|
|
8467
|
+
root = parser(css, opts);
|
|
8118
8468
|
} catch (error) {
|
|
8119
8469
|
this.processed = true;
|
|
8120
8470
|
this.error = error;
|
|
8121
8471
|
}
|
|
8122
|
-
if (root
|
|
8472
|
+
if (root && !root[my])
|
|
8123
8473
|
/* c8 ignore next 2 */
|
|
8124
|
-
Container
|
|
8474
|
+
Container.rebuild(root);
|
|
8125
8475
|
}
|
|
8126
|
-
this.result = new Result
|
|
8476
|
+
this.result = new Result(processor, root, opts);
|
|
8127
8477
|
this.helpers = {
|
|
8128
|
-
...postcss
|
|
8129
|
-
postcss
|
|
8478
|
+
...postcss,
|
|
8479
|
+
postcss,
|
|
8130
8480
|
result: this.result
|
|
8131
8481
|
};
|
|
8132
|
-
this.plugins = this.processor.plugins.map((plugin
|
|
8133
|
-
if (typeof plugin
|
|
8134
|
-
...plugin
|
|
8135
|
-
...plugin
|
|
8482
|
+
this.plugins = this.processor.plugins.map((plugin) => {
|
|
8483
|
+
if (typeof plugin === "object" && plugin.prepare) return {
|
|
8484
|
+
...plugin,
|
|
8485
|
+
...plugin.prepare(this.result)
|
|
8136
8486
|
};
|
|
8137
|
-
else return plugin
|
|
8487
|
+
else return plugin;
|
|
8138
8488
|
});
|
|
8139
8489
|
}
|
|
8140
8490
|
async() {
|
|
@@ -8153,17 +8503,17 @@ var require_lazy_result = /* @__PURE__ */ __commonJS({ "../../node_modules/postc
|
|
|
8153
8503
|
throw new Error("Use process(css).then(cb) to work with async plugins");
|
|
8154
8504
|
}
|
|
8155
8505
|
handleError(error, node) {
|
|
8156
|
-
let plugin
|
|
8506
|
+
let plugin = this.result.lastPlugin;
|
|
8157
8507
|
try {
|
|
8158
8508
|
if (node) node.addToError(error);
|
|
8159
8509
|
this.error = error;
|
|
8160
8510
|
if (error.name === "CssSyntaxError" && !error.plugin) {
|
|
8161
|
-
error.plugin = plugin
|
|
8511
|
+
error.plugin = plugin.postcssPlugin;
|
|
8162
8512
|
error.setMessage();
|
|
8163
|
-
} else if (plugin
|
|
8513
|
+
} else if (plugin.postcssVersion) {
|
|
8164
8514
|
if (process.env.NODE_ENV !== "production") {
|
|
8165
|
-
let pluginName = plugin
|
|
8166
|
-
let pluginVer = plugin
|
|
8515
|
+
let pluginName = plugin.postcssPlugin;
|
|
8516
|
+
let pluginVer = plugin.postcssVersion;
|
|
8167
8517
|
let runtimeVer = this.result.processor.version;
|
|
8168
8518
|
let a = pluginVer.split(".");
|
|
8169
8519
|
let b = runtimeVer.split(".");
|
|
@@ -8178,16 +8528,16 @@ var require_lazy_result = /* @__PURE__ */ __commonJS({ "../../node_modules/postc
|
|
|
8178
8528
|
}
|
|
8179
8529
|
prepareVisitors() {
|
|
8180
8530
|
this.listeners = {};
|
|
8181
|
-
let add = (plugin
|
|
8531
|
+
let add = (plugin, type, cb) => {
|
|
8182
8532
|
if (!this.listeners[type]) this.listeners[type] = [];
|
|
8183
|
-
this.listeners[type].push([plugin
|
|
8533
|
+
this.listeners[type].push([plugin, cb]);
|
|
8184
8534
|
};
|
|
8185
|
-
for (let plugin
|
|
8186
|
-
if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) throw new Error(`Unknown event ${event} in ${plugin
|
|
8535
|
+
for (let plugin of this.plugins) if (typeof plugin === "object") for (let event in plugin) {
|
|
8536
|
+
if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) throw new Error(`Unknown event ${event} in ${plugin.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);
|
|
8187
8537
|
if (!NOT_VISITORS[event]) {
|
|
8188
|
-
if (typeof plugin
|
|
8189
|
-
else add(plugin
|
|
8190
|
-
else if (typeof plugin
|
|
8538
|
+
if (typeof plugin[event] === "object") for (let filter in plugin[event]) if (filter === "*") add(plugin, event, plugin[event][filter]);
|
|
8539
|
+
else add(plugin, event + "-" + filter.toLowerCase(), plugin[event][filter]);
|
|
8540
|
+
else if (typeof plugin[event] === "function") add(plugin, event, plugin[event]);
|
|
8191
8541
|
}
|
|
8192
8542
|
}
|
|
8193
8543
|
this.hasListener = Object.keys(this.listeners).length > 0;
|
|
@@ -8195,8 +8545,8 @@ var require_lazy_result = /* @__PURE__ */ __commonJS({ "../../node_modules/postc
|
|
|
8195
8545
|
async runAsync() {
|
|
8196
8546
|
this.plugin = 0;
|
|
8197
8547
|
for (let i = 0; i < this.plugins.length; i++) {
|
|
8198
|
-
let plugin
|
|
8199
|
-
let promise = this.runOnRoot(plugin
|
|
8548
|
+
let plugin = this.plugins[i];
|
|
8549
|
+
let promise = this.runOnRoot(plugin);
|
|
8200
8550
|
if (isPromise(promise)) try {
|
|
8201
8551
|
await promise;
|
|
8202
8552
|
} catch (error) {
|
|
@@ -8205,10 +8555,10 @@ var require_lazy_result = /* @__PURE__ */ __commonJS({ "../../node_modules/postc
|
|
|
8205
8555
|
}
|
|
8206
8556
|
this.prepareVisitors();
|
|
8207
8557
|
if (this.hasListener) {
|
|
8208
|
-
let root
|
|
8209
|
-
while (!root
|
|
8210
|
-
root
|
|
8211
|
-
let stack = [toStack(root
|
|
8558
|
+
let root = this.result.root;
|
|
8559
|
+
while (!root[isClean]) {
|
|
8560
|
+
root[isClean] = true;
|
|
8561
|
+
let stack = [toStack(root)];
|
|
8212
8562
|
while (stack.length > 0) {
|
|
8213
8563
|
let promise = this.visitTick(stack);
|
|
8214
8564
|
if (isPromise(promise)) try {
|
|
@@ -8219,13 +8569,13 @@ var require_lazy_result = /* @__PURE__ */ __commonJS({ "../../node_modules/postc
|
|
|
8219
8569
|
}
|
|
8220
8570
|
}
|
|
8221
8571
|
}
|
|
8222
|
-
if (this.listeners.OnceExit) for (let [plugin
|
|
8223
|
-
this.result.lastPlugin = plugin
|
|
8572
|
+
if (this.listeners.OnceExit) for (let [plugin, visitor] of this.listeners.OnceExit) {
|
|
8573
|
+
this.result.lastPlugin = plugin;
|
|
8224
8574
|
try {
|
|
8225
|
-
if (root
|
|
8226
|
-
let roots = root
|
|
8575
|
+
if (root.type === "document") {
|
|
8576
|
+
let roots = root.nodes.map((subRoot) => visitor(subRoot, this.helpers));
|
|
8227
8577
|
await Promise.all(roots);
|
|
8228
|
-
} else await visitor(root
|
|
8578
|
+
} else await visitor(root, this.helpers);
|
|
8229
8579
|
} catch (e) {
|
|
8230
8580
|
throw this.handleError(e);
|
|
8231
8581
|
}
|
|
@@ -8234,17 +8584,17 @@ var require_lazy_result = /* @__PURE__ */ __commonJS({ "../../node_modules/postc
|
|
|
8234
8584
|
this.processed = true;
|
|
8235
8585
|
return this.stringify();
|
|
8236
8586
|
}
|
|
8237
|
-
runOnRoot(plugin
|
|
8238
|
-
this.result.lastPlugin = plugin
|
|
8587
|
+
runOnRoot(plugin) {
|
|
8588
|
+
this.result.lastPlugin = plugin;
|
|
8239
8589
|
try {
|
|
8240
|
-
if (typeof plugin
|
|
8590
|
+
if (typeof plugin === "object" && plugin.Once) {
|
|
8241
8591
|
if (this.result.root.type === "document") {
|
|
8242
|
-
let roots = this.result.root.nodes.map((root
|
|
8592
|
+
let roots = this.result.root.nodes.map((root) => plugin.Once(root, this.helpers));
|
|
8243
8593
|
if (isPromise(roots[0])) return Promise.all(roots);
|
|
8244
8594
|
return roots;
|
|
8245
8595
|
}
|
|
8246
|
-
return plugin
|
|
8247
|
-
} else if (typeof plugin
|
|
8596
|
+
return plugin.Once(this.result.root, this.helpers);
|
|
8597
|
+
} else if (typeof plugin === "function") return plugin(this.result.root, this.result);
|
|
8248
8598
|
} catch (error) {
|
|
8249
8599
|
throw this.handleError(error);
|
|
8250
8600
|
}
|
|
@@ -8255,11 +8605,20 @@ var require_lazy_result = /* @__PURE__ */ __commonJS({ "../../node_modules/postc
|
|
|
8255
8605
|
this.stringified = true;
|
|
8256
8606
|
this.sync();
|
|
8257
8607
|
let opts = this.result.opts;
|
|
8258
|
-
let str = stringify
|
|
8608
|
+
let str = stringify;
|
|
8259
8609
|
if (opts.syntax) str = opts.syntax.stringify;
|
|
8260
8610
|
if (opts.stringifier) str = opts.stringifier;
|
|
8261
8611
|
if (str.stringify) str = str.stringify;
|
|
8262
|
-
let
|
|
8612
|
+
let rootSource = this.result.root.source;
|
|
8613
|
+
if (opts.map === void 0 && !(rootSource && rootSource.input && rootSource.input.map)) {
|
|
8614
|
+
let result = "";
|
|
8615
|
+
str(this.result.root, (i) => {
|
|
8616
|
+
result += i;
|
|
8617
|
+
});
|
|
8618
|
+
this.result.css = result;
|
|
8619
|
+
return this.result;
|
|
8620
|
+
}
|
|
8621
|
+
let data = new MapGenerator(str, this.result.root, this.result.opts).generate();
|
|
8263
8622
|
this.result.css = data[0];
|
|
8264
8623
|
this.result.map = data[1];
|
|
8265
8624
|
return this.result;
|
|
@@ -8269,22 +8628,24 @@ var require_lazy_result = /* @__PURE__ */ __commonJS({ "../../node_modules/postc
|
|
|
8269
8628
|
if (this.processed) return this.result;
|
|
8270
8629
|
this.processed = true;
|
|
8271
8630
|
if (this.processing) throw this.getAsyncError();
|
|
8272
|
-
for (let plugin
|
|
8631
|
+
for (let plugin of this.plugins) if (isPromise(this.runOnRoot(plugin))) throw this.getAsyncError();
|
|
8273
8632
|
this.prepareVisitors();
|
|
8274
8633
|
if (this.hasListener) {
|
|
8275
|
-
let root
|
|
8276
|
-
while (!root
|
|
8277
|
-
root
|
|
8278
|
-
this.walkSync(root
|
|
8634
|
+
let root = this.result.root;
|
|
8635
|
+
while (!root[isClean]) {
|
|
8636
|
+
root[isClean] = true;
|
|
8637
|
+
this.walkSync(root);
|
|
8638
|
+
}
|
|
8639
|
+
if (this.listeners.OnceExit) {
|
|
8640
|
+
if (root.type === "document") for (let subRoot of root.nodes) this.visitSync(this.listeners.OnceExit, subRoot);
|
|
8641
|
+
else this.visitSync(this.listeners.OnceExit, root);
|
|
8279
8642
|
}
|
|
8280
|
-
if (this.listeners.OnceExit) if (root$1.type === "document") for (let subRoot of root$1.nodes) this.visitSync(this.listeners.OnceExit, subRoot);
|
|
8281
|
-
else this.visitSync(this.listeners.OnceExit, root$1);
|
|
8282
8643
|
}
|
|
8283
8644
|
return this.result;
|
|
8284
8645
|
}
|
|
8285
8646
|
then(onFulfilled, onRejected) {
|
|
8286
8647
|
if (process.env.NODE_ENV !== "production") {
|
|
8287
|
-
if (!("from" in this.opts)) warnOnce
|
|
8648
|
+
if (!("from" in this.opts)) warnOnce("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.");
|
|
8288
8649
|
}
|
|
8289
8650
|
return this.async().then(onFulfilled, onRejected);
|
|
8290
8651
|
}
|
|
@@ -8292,8 +8653,8 @@ var require_lazy_result = /* @__PURE__ */ __commonJS({ "../../node_modules/postc
|
|
|
8292
8653
|
return this.css;
|
|
8293
8654
|
}
|
|
8294
8655
|
visitSync(visitors, node) {
|
|
8295
|
-
for (let [plugin
|
|
8296
|
-
this.result.lastPlugin = plugin
|
|
8656
|
+
for (let [plugin, visitor] of visitors) {
|
|
8657
|
+
this.result.lastPlugin = plugin;
|
|
8297
8658
|
let promise;
|
|
8298
8659
|
try {
|
|
8299
8660
|
promise = visitor(node, this.helpers);
|
|
@@ -8312,13 +8673,13 @@ var require_lazy_result = /* @__PURE__ */ __commonJS({ "../../node_modules/postc
|
|
|
8312
8673
|
return;
|
|
8313
8674
|
}
|
|
8314
8675
|
if (visitors.length > 0 && visit.visitorIndex < visitors.length) {
|
|
8315
|
-
let [plugin
|
|
8676
|
+
let [plugin, visitor] = visitors[visit.visitorIndex];
|
|
8316
8677
|
visit.visitorIndex += 1;
|
|
8317
8678
|
if (visit.visitorIndex === visitors.length) {
|
|
8318
8679
|
visit.visitors = [];
|
|
8319
8680
|
visit.visitorIndex = 0;
|
|
8320
8681
|
}
|
|
8321
|
-
this.result.lastPlugin = plugin
|
|
8682
|
+
this.result.lastPlugin = plugin;
|
|
8322
8683
|
try {
|
|
8323
8684
|
return visitor(node.toProxy(), this.helpers);
|
|
8324
8685
|
} catch (e) {
|
|
@@ -8327,14 +8688,19 @@ var require_lazy_result = /* @__PURE__ */ __commonJS({ "../../node_modules/postc
|
|
|
8327
8688
|
}
|
|
8328
8689
|
if (visit.iterator !== 0) {
|
|
8329
8690
|
let iterator = visit.iterator;
|
|
8691
|
+
if (visit.descending) {
|
|
8692
|
+
visit.descending = false;
|
|
8693
|
+
node.indexes[iterator] += 1;
|
|
8694
|
+
}
|
|
8330
8695
|
let child;
|
|
8331
8696
|
while (child = node.nodes[node.indexes[iterator]]) {
|
|
8332
|
-
node.indexes[iterator] += 1;
|
|
8333
8697
|
if (!child[isClean]) {
|
|
8334
8698
|
child[isClean] = true;
|
|
8699
|
+
visit.descending = true;
|
|
8335
8700
|
stack.push(toStack(child));
|
|
8336
8701
|
return;
|
|
8337
8702
|
}
|
|
8703
|
+
node.indexes[iterator] += 1;
|
|
8338
8704
|
}
|
|
8339
8705
|
visit.iterator = 0;
|
|
8340
8706
|
delete node.indexes[iterator];
|
|
@@ -8358,40 +8724,80 @@ var require_lazy_result = /* @__PURE__ */ __commonJS({ "../../node_modules/postc
|
|
|
8358
8724
|
}
|
|
8359
8725
|
walkSync(node) {
|
|
8360
8726
|
node[isClean] = true;
|
|
8361
|
-
let
|
|
8362
|
-
|
|
8363
|
-
|
|
8364
|
-
|
|
8365
|
-
|
|
8366
|
-
}
|
|
8367
|
-
|
|
8368
|
-
|
|
8369
|
-
|
|
8727
|
+
let stack = [{
|
|
8728
|
+
eventIndex: 0,
|
|
8729
|
+
events: getEvents(node),
|
|
8730
|
+
iterator: 0,
|
|
8731
|
+
node
|
|
8732
|
+
}];
|
|
8733
|
+
while (stack.length > 0) {
|
|
8734
|
+
let visit = stack[stack.length - 1];
|
|
8735
|
+
let visitNode = visit.node;
|
|
8736
|
+
if (visit.iterator !== 0) {
|
|
8737
|
+
let iterator = visit.iterator;
|
|
8738
|
+
if (visit.descending) {
|
|
8739
|
+
visit.descending = false;
|
|
8740
|
+
visitNode.indexes[iterator] += 1;
|
|
8741
|
+
}
|
|
8742
|
+
let child;
|
|
8743
|
+
let descended = false;
|
|
8744
|
+
while (child = visitNode.nodes[visitNode.indexes[iterator]]) {
|
|
8745
|
+
if (!child[isClean]) {
|
|
8746
|
+
child[isClean] = true;
|
|
8747
|
+
visit.descending = true;
|
|
8748
|
+
stack.push({
|
|
8749
|
+
eventIndex: 0,
|
|
8750
|
+
events: getEvents(child),
|
|
8751
|
+
iterator: 0,
|
|
8752
|
+
node: child
|
|
8753
|
+
});
|
|
8754
|
+
descended = true;
|
|
8755
|
+
break;
|
|
8756
|
+
}
|
|
8757
|
+
visitNode.indexes[iterator] += 1;
|
|
8758
|
+
}
|
|
8759
|
+
if (descended) continue;
|
|
8760
|
+
visit.iterator = 0;
|
|
8761
|
+
delete visitNode.indexes[iterator];
|
|
8762
|
+
}
|
|
8763
|
+
if (visit.eventIndex < visit.events.length) {
|
|
8764
|
+
let event = visit.events[visit.eventIndex];
|
|
8765
|
+
visit.eventIndex += 1;
|
|
8766
|
+
if (event === CHILDREN) {
|
|
8767
|
+
if (visitNode.nodes && visitNode.nodes.length) visit.iterator = visitNode.getIterator();
|
|
8768
|
+
} else {
|
|
8769
|
+
let visitors = this.listeners[event];
|
|
8770
|
+
if (visitors) {
|
|
8771
|
+
if (this.visitSync(visitors, visitNode.toProxy())) stack.pop();
|
|
8772
|
+
}
|
|
8773
|
+
}
|
|
8774
|
+
continue;
|
|
8370
8775
|
}
|
|
8776
|
+
stack.pop();
|
|
8371
8777
|
}
|
|
8372
8778
|
}
|
|
8373
8779
|
warnings() {
|
|
8374
8780
|
return this.sync().warnings();
|
|
8375
8781
|
}
|
|
8376
8782
|
};
|
|
8377
|
-
LazyResult
|
|
8378
|
-
postcss
|
|
8783
|
+
LazyResult.registerPostcss = (dependant) => {
|
|
8784
|
+
postcss = dependant;
|
|
8379
8785
|
};
|
|
8380
|
-
module.exports = LazyResult
|
|
8381
|
-
LazyResult
|
|
8382
|
-
Root
|
|
8383
|
-
Document
|
|
8384
|
-
})
|
|
8786
|
+
module.exports = LazyResult;
|
|
8787
|
+
LazyResult.default = LazyResult;
|
|
8788
|
+
Root.registerLazyResult(LazyResult);
|
|
8789
|
+
Document.registerLazyResult(LazyResult);
|
|
8790
|
+
}));
|
|
8385
8791
|
|
|
8386
8792
|
//#endregion
|
|
8387
8793
|
//#region ../../node_modules/postcss/lib/no-work-result.js
|
|
8388
|
-
var require_no_work_result = /* @__PURE__ */
|
|
8794
|
+
var require_no_work_result = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8389
8795
|
let MapGenerator = require_map_generator();
|
|
8390
|
-
let parse
|
|
8391
|
-
|
|
8392
|
-
let stringify
|
|
8796
|
+
let parse = require_parse();
|
|
8797
|
+
let Result = require_result();
|
|
8798
|
+
let stringify = require_stringify();
|
|
8393
8799
|
let warnOnce = require_warn_once();
|
|
8394
|
-
var NoWorkResult
|
|
8800
|
+
var NoWorkResult = class {
|
|
8395
8801
|
get content() {
|
|
8396
8802
|
return this.result.css;
|
|
8397
8803
|
}
|
|
@@ -8412,17 +8818,17 @@ var require_no_work_result = /* @__PURE__ */ __commonJS({ "../../node_modules/po
|
|
|
8412
8818
|
}
|
|
8413
8819
|
get root() {
|
|
8414
8820
|
if (this._root) return this._root;
|
|
8415
|
-
let root
|
|
8416
|
-
let parser = parse
|
|
8821
|
+
let root;
|
|
8822
|
+
let parser = parse;
|
|
8417
8823
|
try {
|
|
8418
|
-
root
|
|
8824
|
+
root = parser(this._css, this._opts);
|
|
8419
8825
|
} catch (error) {
|
|
8420
8826
|
this.error = error;
|
|
8421
8827
|
}
|
|
8422
8828
|
if (this.error) throw this.error;
|
|
8423
8829
|
else {
|
|
8424
|
-
this._root = root
|
|
8425
|
-
return root
|
|
8830
|
+
this._root = root;
|
|
8831
|
+
return root;
|
|
8426
8832
|
}
|
|
8427
8833
|
}
|
|
8428
8834
|
get [Symbol.toStringTag]() {
|
|
@@ -8435,8 +8841,8 @@ var require_no_work_result = /* @__PURE__ */ __commonJS({ "../../node_modules/po
|
|
|
8435
8841
|
this._css = css;
|
|
8436
8842
|
this._opts = opts;
|
|
8437
8843
|
this._map = void 0;
|
|
8438
|
-
let str = stringify
|
|
8439
|
-
this.result = new Result
|
|
8844
|
+
let str = stringify;
|
|
8845
|
+
this.result = new Result(this._processor, void 0, this._opts);
|
|
8440
8846
|
this.result.css = css;
|
|
8441
8847
|
let self = this;
|
|
8442
8848
|
Object.defineProperty(this.result, "root", { get() {
|
|
@@ -8479,20 +8885,20 @@ var require_no_work_result = /* @__PURE__ */ __commonJS({ "../../node_modules/po
|
|
|
8479
8885
|
return [];
|
|
8480
8886
|
}
|
|
8481
8887
|
};
|
|
8482
|
-
module.exports = NoWorkResult
|
|
8483
|
-
NoWorkResult
|
|
8484
|
-
})
|
|
8888
|
+
module.exports = NoWorkResult;
|
|
8889
|
+
NoWorkResult.default = NoWorkResult;
|
|
8890
|
+
}));
|
|
8485
8891
|
|
|
8486
8892
|
//#endregion
|
|
8487
8893
|
//#region ../../node_modules/postcss/lib/processor.js
|
|
8488
|
-
var require_processor = /* @__PURE__ */
|
|
8489
|
-
let Document
|
|
8490
|
-
let LazyResult
|
|
8894
|
+
var require_processor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8895
|
+
let Document = require_document();
|
|
8896
|
+
let LazyResult = require_lazy_result();
|
|
8491
8897
|
let NoWorkResult = require_no_work_result();
|
|
8492
|
-
let Root
|
|
8493
|
-
var Processor
|
|
8898
|
+
let Root = require_root();
|
|
8899
|
+
var Processor = class {
|
|
8494
8900
|
constructor(plugins = []) {
|
|
8495
|
-
this.version = "8.5.
|
|
8901
|
+
this.version = "8.5.28";
|
|
8496
8902
|
this.plugins = this.normalize(plugins);
|
|
8497
8903
|
}
|
|
8498
8904
|
normalize(plugins) {
|
|
@@ -8511,57 +8917,57 @@ var require_processor = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss
|
|
|
8511
8917
|
}
|
|
8512
8918
|
process(css, opts = {}) {
|
|
8513
8919
|
if (!this.plugins.length && !opts.parser && !opts.stringifier && !opts.syntax) return new NoWorkResult(this, css, opts);
|
|
8514
|
-
else return new LazyResult
|
|
8920
|
+
else return new LazyResult(this, css, opts);
|
|
8515
8921
|
}
|
|
8516
|
-
use(plugin
|
|
8517
|
-
this.plugins = this.plugins.concat(this.normalize([plugin
|
|
8922
|
+
use(plugin) {
|
|
8923
|
+
this.plugins = this.plugins.concat(this.normalize([plugin]));
|
|
8518
8924
|
return this;
|
|
8519
8925
|
}
|
|
8520
8926
|
};
|
|
8521
|
-
module.exports = Processor
|
|
8522
|
-
Processor
|
|
8523
|
-
Root
|
|
8524
|
-
Document
|
|
8525
|
-
})
|
|
8927
|
+
module.exports = Processor;
|
|
8928
|
+
Processor.default = Processor;
|
|
8929
|
+
Root.registerProcessor(Processor);
|
|
8930
|
+
Document.registerProcessor(Processor);
|
|
8931
|
+
}));
|
|
8526
8932
|
|
|
8527
8933
|
//#endregion
|
|
8528
8934
|
//#region ../../node_modules/postcss/lib/postcss.js
|
|
8529
|
-
var require_postcss = /* @__PURE__ */
|
|
8530
|
-
let AtRule
|
|
8531
|
-
let Comment
|
|
8532
|
-
let Container
|
|
8533
|
-
let CssSyntaxError
|
|
8534
|
-
let Declaration
|
|
8535
|
-
let Document
|
|
8536
|
-
let fromJSON
|
|
8537
|
-
let Input
|
|
8935
|
+
var require_postcss = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8936
|
+
let AtRule = require_at_rule();
|
|
8937
|
+
let Comment = require_comment();
|
|
8938
|
+
let Container = require_container();
|
|
8939
|
+
let CssSyntaxError = require_css_syntax_error();
|
|
8940
|
+
let Declaration = require_declaration();
|
|
8941
|
+
let Document = require_document();
|
|
8942
|
+
let fromJSON = require_fromJSON();
|
|
8943
|
+
let Input = require_input();
|
|
8538
8944
|
let LazyResult = require_lazy_result();
|
|
8539
|
-
let list
|
|
8540
|
-
let Node
|
|
8541
|
-
let parse
|
|
8542
|
-
let Processor
|
|
8543
|
-
let Result
|
|
8544
|
-
let Root
|
|
8545
|
-
let Rule
|
|
8546
|
-
let stringify
|
|
8547
|
-
let Warning
|
|
8548
|
-
function postcss
|
|
8945
|
+
let list = require_list();
|
|
8946
|
+
let Node = require_node();
|
|
8947
|
+
let parse = require_parse();
|
|
8948
|
+
let Processor = require_processor();
|
|
8949
|
+
let Result = require_result();
|
|
8950
|
+
let Root = require_root();
|
|
8951
|
+
let Rule = require_rule();
|
|
8952
|
+
let stringify = require_stringify();
|
|
8953
|
+
let Warning = require_warning();
|
|
8954
|
+
function postcss(...plugins) {
|
|
8549
8955
|
if (plugins.length === 1 && Array.isArray(plugins[0])) plugins = plugins[0];
|
|
8550
|
-
return new Processor
|
|
8956
|
+
return new Processor(plugins);
|
|
8551
8957
|
}
|
|
8552
|
-
postcss
|
|
8958
|
+
postcss.plugin = function plugin(name, initializer) {
|
|
8553
8959
|
let warningPrinted = false;
|
|
8554
8960
|
function creator(...args) {
|
|
8555
8961
|
if (console && console.warn && !warningPrinted) {
|
|
8556
8962
|
warningPrinted = true;
|
|
8557
8963
|
console.warn(name + ": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration");
|
|
8558
|
-
if (process.env.LANG && process.env.LANG.startsWith("
|
|
8964
|
+
if (process.env.LANG && process.env.LANG.startsWith("zh"))
|
|
8559
8965
|
/* c8 ignore next 7 */
|
|
8560
8966
|
console.warn(name + ": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226");
|
|
8561
8967
|
}
|
|
8562
8968
|
let transformer = initializer(...args);
|
|
8563
8969
|
transformer.postcssPlugin = name;
|
|
8564
|
-
transformer.postcssVersion = new Processor
|
|
8970
|
+
transformer.postcssVersion = new Processor().version;
|
|
8565
8971
|
return transformer;
|
|
8566
8972
|
}
|
|
8567
8973
|
let cache;
|
|
@@ -8570,37 +8976,37 @@ var require_postcss = /* @__PURE__ */ __commonJS({ "../../node_modules/postcss/l
|
|
|
8570
8976
|
return cache;
|
|
8571
8977
|
} });
|
|
8572
8978
|
creator.process = function(css, processOpts, pluginOpts) {
|
|
8573
|
-
return postcss
|
|
8979
|
+
return postcss([creator(pluginOpts)]).process(css, processOpts);
|
|
8574
8980
|
};
|
|
8575
8981
|
return creator;
|
|
8576
8982
|
};
|
|
8577
|
-
postcss
|
|
8578
|
-
postcss
|
|
8579
|
-
postcss
|
|
8580
|
-
postcss
|
|
8581
|
-
postcss
|
|
8582
|
-
postcss
|
|
8583
|
-
postcss
|
|
8584
|
-
postcss
|
|
8585
|
-
postcss
|
|
8586
|
-
postcss
|
|
8587
|
-
postcss
|
|
8588
|
-
postcss
|
|
8589
|
-
postcss
|
|
8590
|
-
postcss
|
|
8591
|
-
postcss
|
|
8592
|
-
postcss
|
|
8593
|
-
postcss
|
|
8594
|
-
postcss
|
|
8595
|
-
postcss
|
|
8596
|
-
postcss
|
|
8597
|
-
postcss
|
|
8598
|
-
postcss
|
|
8599
|
-
postcss
|
|
8600
|
-
LazyResult.registerPostcss(postcss
|
|
8601
|
-
module.exports = postcss
|
|
8602
|
-
postcss
|
|
8603
|
-
})
|
|
8983
|
+
postcss.stringify = stringify;
|
|
8984
|
+
postcss.parse = parse;
|
|
8985
|
+
postcss.fromJSON = fromJSON;
|
|
8986
|
+
postcss.list = list;
|
|
8987
|
+
postcss.comment = (defaults) => new Comment(defaults);
|
|
8988
|
+
postcss.atRule = (defaults) => new AtRule(defaults);
|
|
8989
|
+
postcss.decl = (defaults) => new Declaration(defaults);
|
|
8990
|
+
postcss.rule = (defaults) => new Rule(defaults);
|
|
8991
|
+
postcss.root = (defaults) => new Root(defaults);
|
|
8992
|
+
postcss.document = (defaults) => new Document(defaults);
|
|
8993
|
+
postcss.CssSyntaxError = CssSyntaxError;
|
|
8994
|
+
postcss.Declaration = Declaration;
|
|
8995
|
+
postcss.Container = Container;
|
|
8996
|
+
postcss.Processor = Processor;
|
|
8997
|
+
postcss.Document = Document;
|
|
8998
|
+
postcss.Comment = Comment;
|
|
8999
|
+
postcss.Warning = Warning;
|
|
9000
|
+
postcss.AtRule = AtRule;
|
|
9001
|
+
postcss.Result = Result;
|
|
9002
|
+
postcss.Input = Input;
|
|
9003
|
+
postcss.Rule = Rule;
|
|
9004
|
+
postcss.Root = Root;
|
|
9005
|
+
postcss.Node = Node;
|
|
9006
|
+
LazyResult.registerPostcss(postcss);
|
|
9007
|
+
module.exports = postcss;
|
|
9008
|
+
postcss.default = postcss;
|
|
9009
|
+
}));
|
|
8604
9010
|
|
|
8605
9011
|
//#endregion
|
|
8606
9012
|
//#region ../../node_modules/postcss/lib/postcss.mjs
|
|
@@ -8630,11 +9036,6 @@ const Rule = import_postcss.default.Rule;
|
|
|
8630
9036
|
const Root = import_postcss.default.Root;
|
|
8631
9037
|
const Node = import_postcss.default.Node;
|
|
8632
9038
|
|
|
8633
|
-
//#endregion
|
|
8634
|
-
//#region ../registry/src/style-source.ts
|
|
8635
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
8636
|
-
const __dirname = path.dirname(__filename);
|
|
8637
|
-
|
|
8638
9039
|
//#endregion
|
|
8639
9040
|
//#region ../create-config/src/style-css.ts
|
|
8640
9041
|
const STYLE_IDS = STYLES.map((style) => style.id);
|
|
@@ -8650,19 +9051,19 @@ function deriveUiBaseUrlFromRegistryUrl(registryUrl) {
|
|
|
8650
9051
|
const normalizedRegistryUrl = normalizeUrl(registryUrl);
|
|
8651
9052
|
return normalizedRegistryUrl.endsWith("/r") ? normalizedRegistryUrl.slice(0, -2) : DEFAULT_UI_BASE_URL;
|
|
8652
9053
|
}
|
|
8653
|
-
function resolveUiBaseUrl(env
|
|
8654
|
-
if (env
|
|
8655
|
-
if (env
|
|
9054
|
+
function resolveUiBaseUrl(env = process.env) {
|
|
9055
|
+
if (env.BEJAMAS_UI_URL?.trim()) return normalizeUrl(env.BEJAMAS_UI_URL);
|
|
9056
|
+
if (env.REGISTRY_URL?.trim()) return deriveUiBaseUrlFromRegistryUrl(env.REGISTRY_URL);
|
|
8656
9057
|
return DEFAULT_UI_BASE_URL;
|
|
8657
9058
|
}
|
|
8658
|
-
function resolveRegistryUrl(env
|
|
8659
|
-
if (env
|
|
8660
|
-
if (env
|
|
9059
|
+
function resolveRegistryUrl(env = process.env) {
|
|
9060
|
+
if (env.REGISTRY_URL?.trim()) return normalizeUrl(env.REGISTRY_URL);
|
|
9061
|
+
if (env.BEJAMAS_UI_URL?.trim()) return `${normalizeUrl(env.BEJAMAS_UI_URL)}/r`;
|
|
8661
9062
|
return DEFAULT_REGISTRY_URL;
|
|
8662
9063
|
}
|
|
8663
|
-
function buildUiUrl(pathname, env
|
|
9064
|
+
function buildUiUrl(pathname, env = process.env) {
|
|
8664
9065
|
const normalizedPathname = pathname.startsWith("/") ? pathname : `/${pathname}`;
|
|
8665
|
-
return `${resolveUiBaseUrl(env
|
|
9066
|
+
return `${resolveUiBaseUrl(env)}${normalizedPathname}`;
|
|
8666
9067
|
}
|
|
8667
9068
|
|
|
8668
9069
|
//#endregion
|
|
@@ -8765,7 +9166,7 @@ const compatibleRawConfigSchema = rawConfigSchema.extend({
|
|
|
8765
9166
|
function parseRawConfigWithCompatibility(input) {
|
|
8766
9167
|
const parsed = compatibleRawConfigSchema.parse(input);
|
|
8767
9168
|
const deprecatedKeys = DEPRECATED_CONFIG_KEYS.filter((key) => parsed[key] !== void 0);
|
|
8768
|
-
const { rsc: _rsc, tsx: _tsx
|
|
9169
|
+
const { rsc: _rsc, tsx: _tsx, ...normalized } = parsed;
|
|
8769
9170
|
return {
|
|
8770
9171
|
config: rawConfigSchema.parse(normalized),
|
|
8771
9172
|
deprecatedKeys
|
|
@@ -8942,7 +9343,7 @@ const logger = {
|
|
|
8942
9343
|
//#endregion
|
|
8943
9344
|
//#region src/utils/get-package-info.ts
|
|
8944
9345
|
function getPackageInfo(cwd = "", shouldThrow = true) {
|
|
8945
|
-
const packageJsonPath = path
|
|
9346
|
+
const packageJsonPath = path.join(cwd, "package.json");
|
|
8946
9347
|
return fs.readJSONSync(packageJsonPath, { throws: shouldThrow });
|
|
8947
9348
|
}
|
|
8948
9349
|
|
|
@@ -8997,7 +9398,7 @@ async function getTailwindCssFile(cwd) {
|
|
|
8997
9398
|
}), getTailwindVersion(cwd)]);
|
|
8998
9399
|
if (!files.length) return null;
|
|
8999
9400
|
for (const file of files) {
|
|
9000
|
-
const contents = await fs.readFile(path
|
|
9401
|
+
const contents = await fs.readFile(path.resolve(cwd, file), "utf8");
|
|
9001
9402
|
if (contents.includes(`@import "tailwindcss"`) || contents.includes(`@import 'tailwindcss'`) || contents.includes(`@tailwind base`)) return file;
|
|
9002
9403
|
}
|
|
9003
9404
|
return null;
|
|
@@ -9056,13 +9457,13 @@ async function resolveConfigPaths(cwd, config) {
|
|
|
9056
9457
|
...config,
|
|
9057
9458
|
resolvedPaths: {
|
|
9058
9459
|
cwd,
|
|
9059
|
-
tailwindConfig: config.tailwind.config ? path
|
|
9060
|
-
tailwindCss: path
|
|
9460
|
+
tailwindConfig: config.tailwind.config ? path.resolve(cwd, config.tailwind.config) : "",
|
|
9461
|
+
tailwindCss: path.resolve(cwd, config.tailwind.css),
|
|
9061
9462
|
utils: await resolveImport(config.aliases["utils"], tsConfig),
|
|
9062
9463
|
components: await resolveImport(config.aliases["components"], tsConfig),
|
|
9063
|
-
ui: config.aliases["ui"] ? await resolveImport(config.aliases["ui"], tsConfig) : path
|
|
9064
|
-
lib: config.aliases["lib"] ? await resolveImport(config.aliases["lib"], tsConfig) : path
|
|
9065
|
-
hooks: config.aliases["hooks"] ? await resolveImport(config.aliases["hooks"], tsConfig) : path
|
|
9464
|
+
ui: config.aliases["ui"] ? await resolveImport(config.aliases["ui"], tsConfig) : path.resolve(await resolveImport(config.aliases["components"], tsConfig) ?? cwd, "ui"),
|
|
9465
|
+
lib: config.aliases["lib"] ? await resolveImport(config.aliases["lib"], tsConfig) : path.resolve(await resolveImport(config.aliases["utils"], tsConfig) ?? cwd, ".."),
|
|
9466
|
+
hooks: config.aliases["hooks"] ? await resolveImport(config.aliases["hooks"], tsConfig) : path.resolve(await resolveImport(config.aliases["components"], tsConfig) ?? cwd, "..", "hooks")
|
|
9066
9467
|
}
|
|
9067
9468
|
});
|
|
9068
9469
|
}
|
|
@@ -9100,7 +9501,7 @@ async function getWorkspaceConfig(config) {
|
|
|
9100
9501
|
}
|
|
9101
9502
|
async function findPackageRoot(cwd, resolvedPath) {
|
|
9102
9503
|
const commonRoot = findCommonRoot(cwd, resolvedPath);
|
|
9103
|
-
const relativePath = path
|
|
9504
|
+
const relativePath = path.relative(commonRoot, resolvedPath);
|
|
9104
9505
|
const matchingPackageRoot = (await fg.glob("**/package.json", {
|
|
9105
9506
|
cwd: commonRoot,
|
|
9106
9507
|
deep: 3,
|
|
@@ -9110,21 +9511,21 @@ async function findPackageRoot(cwd, resolvedPath) {
|
|
|
9110
9511
|
"**/build/**",
|
|
9111
9512
|
"**/public/**"
|
|
9112
9513
|
]
|
|
9113
|
-
})).map((pkgPath) => path
|
|
9114
|
-
return matchingPackageRoot ? path
|
|
9514
|
+
})).map((pkgPath) => path.dirname(pkgPath)).find((pkgDir) => relativePath.startsWith(pkgDir));
|
|
9515
|
+
return matchingPackageRoot ? path.join(commonRoot, matchingPackageRoot) : null;
|
|
9115
9516
|
}
|
|
9116
9517
|
function isAliasKey(key, config) {
|
|
9117
|
-
return Object.keys(config.resolvedPaths).filter((key
|
|
9518
|
+
return Object.keys(config.resolvedPaths).filter((key) => key !== "utils").includes(key);
|
|
9118
9519
|
}
|
|
9119
9520
|
function findCommonRoot(cwd, resolvedPath) {
|
|
9120
|
-
const parts1 = cwd.split(path
|
|
9121
|
-
const parts2 = resolvedPath.split(path
|
|
9521
|
+
const parts1 = cwd.split(path.sep);
|
|
9522
|
+
const parts2 = resolvedPath.split(path.sep);
|
|
9122
9523
|
const commonParts = [];
|
|
9123
9524
|
for (let i = 0; i < Math.min(parts1.length, parts2.length); i++) {
|
|
9124
9525
|
if (parts1[i] !== parts2[i]) break;
|
|
9125
9526
|
commonParts.push(parts1[i]);
|
|
9126
9527
|
}
|
|
9127
|
-
return commonParts.join(path
|
|
9528
|
+
return commonParts.join(path.sep);
|
|
9128
9529
|
}
|
|
9129
9530
|
|
|
9130
9531
|
//#endregion
|
|
@@ -9138,7 +9539,7 @@ function spinner(text, options) {
|
|
|
9138
9539
|
|
|
9139
9540
|
//#endregion
|
|
9140
9541
|
//#region src/docs/generate-mdx/utils.ts
|
|
9141
|
-
const RESERVED_COMPONENTS = new Set([
|
|
9542
|
+
const RESERVED_COMPONENTS = /* @__PURE__ */ new Set([
|
|
9142
9543
|
"Fragment",
|
|
9143
9544
|
"CodePackageManagers",
|
|
9144
9545
|
"DocsTabs",
|
|
@@ -9175,30 +9576,40 @@ function parseJsDocMetadata(frontmatterCode) {
|
|
|
9175
9576
|
const descriptionBodyLines = [];
|
|
9176
9577
|
for (const rawLine of lines) {
|
|
9177
9578
|
const line = rawLine;
|
|
9178
|
-
if (inUsage)
|
|
9179
|
-
|
|
9180
|
-
|
|
9181
|
-
|
|
9579
|
+
if (inUsage) {
|
|
9580
|
+
if (line.trim().startsWith("@")) inUsage = false;
|
|
9581
|
+
else {
|
|
9582
|
+
usageLines.push(line);
|
|
9583
|
+
continue;
|
|
9584
|
+
}
|
|
9182
9585
|
}
|
|
9183
|
-
if (inPrimaryExample)
|
|
9184
|
-
|
|
9185
|
-
|
|
9186
|
-
|
|
9586
|
+
if (inPrimaryExample) {
|
|
9587
|
+
if (line.trim().startsWith("@")) inPrimaryExample = false;
|
|
9588
|
+
else {
|
|
9589
|
+
primaryExampleLines.push(line);
|
|
9590
|
+
continue;
|
|
9591
|
+
}
|
|
9187
9592
|
}
|
|
9188
|
-
if (inExamples)
|
|
9189
|
-
|
|
9190
|
-
|
|
9191
|
-
|
|
9593
|
+
if (inExamples) {
|
|
9594
|
+
if (line.trim().startsWith("@")) inExamples = false;
|
|
9595
|
+
else {
|
|
9596
|
+
examplesLines.push(line);
|
|
9597
|
+
continue;
|
|
9598
|
+
}
|
|
9192
9599
|
}
|
|
9193
|
-
if (inApi)
|
|
9194
|
-
|
|
9195
|
-
|
|
9196
|
-
|
|
9600
|
+
if (inApi) {
|
|
9601
|
+
if (line.trim().startsWith("@")) inApi = false;
|
|
9602
|
+
else {
|
|
9603
|
+
apiLines.push(line);
|
|
9604
|
+
continue;
|
|
9605
|
+
}
|
|
9197
9606
|
}
|
|
9198
|
-
if (captureDescriptionBody)
|
|
9199
|
-
|
|
9200
|
-
|
|
9201
|
-
|
|
9607
|
+
if (captureDescriptionBody) {
|
|
9608
|
+
if (line.trim().startsWith("@")) captureDescriptionBody = false;
|
|
9609
|
+
else {
|
|
9610
|
+
descriptionBodyLines.push(line);
|
|
9611
|
+
continue;
|
|
9612
|
+
}
|
|
9202
9613
|
}
|
|
9203
9614
|
if (line.trim().startsWith("@component")) meta.name = line.replace("@component", "").trim();
|
|
9204
9615
|
else if (line.trim().startsWith("@title")) meta.title = line.replace("@title", "").trim();
|
|
@@ -9252,8 +9663,8 @@ function extractPropsFromAstroProps(sourceFile) {
|
|
|
9252
9663
|
}
|
|
9253
9664
|
return null;
|
|
9254
9665
|
}
|
|
9255
|
-
const target = sourceFile.getDescendantsOfKind(SyntaxKind.VariableDeclaration).find((decl
|
|
9256
|
-
const init = decl
|
|
9666
|
+
const target = sourceFile.getDescendantsOfKind(SyntaxKind.VariableDeclaration).find((decl) => {
|
|
9667
|
+
const init = decl.getInitializer();
|
|
9257
9668
|
if (!init) return false;
|
|
9258
9669
|
return !!unwrapAstroProps(init);
|
|
9259
9670
|
});
|
|
@@ -9310,36 +9721,36 @@ function extractPropsFromDeclaredProps(sourceFile) {
|
|
|
9310
9721
|
return [];
|
|
9311
9722
|
}
|
|
9312
9723
|
function resolveUiRoot(cwd) {
|
|
9313
|
-
const require
|
|
9724
|
+
const require = createRequire$1(import.meta.url);
|
|
9314
9725
|
const envRoot = process.env.BEJAMAS_UI_ROOT;
|
|
9315
|
-
if (envRoot && existsSync(path
|
|
9726
|
+
if (envRoot && existsSync(path.join(envRoot, "package.json"))) return envRoot;
|
|
9316
9727
|
try {
|
|
9317
|
-
const pkgPath = require
|
|
9318
|
-
return path
|
|
9728
|
+
const pkgPath = require.resolve("@bejamas/ui/package.json", { paths: [cwd] });
|
|
9729
|
+
return path.dirname(pkgPath);
|
|
9319
9730
|
} catch {}
|
|
9320
9731
|
let current = cwd;
|
|
9321
9732
|
for (let i = 0; i < 6; i += 1) {
|
|
9322
|
-
const candidate = path
|
|
9323
|
-
if (existsSync(candidate)) return path
|
|
9324
|
-
const parent = path
|
|
9733
|
+
const candidate = path.join(current, "packages", "ui", "package.json");
|
|
9734
|
+
if (existsSync(candidate)) return path.dirname(candidate);
|
|
9735
|
+
const parent = path.dirname(current);
|
|
9325
9736
|
if (parent === current) break;
|
|
9326
9737
|
current = parent;
|
|
9327
9738
|
}
|
|
9328
9739
|
try {
|
|
9329
|
-
const anyEntry = require
|
|
9330
|
-
return path
|
|
9740
|
+
const anyEntry = require.resolve("@bejamas/ui/*", { paths: [cwd] });
|
|
9741
|
+
return path.resolve(anyEntry, "..", "..");
|
|
9331
9742
|
} catch {}
|
|
9332
9743
|
throw new Error("Unable to locate @bejamas/ui in the workspace");
|
|
9333
9744
|
}
|
|
9334
9745
|
function resolveOutDir(cwd) {
|
|
9335
9746
|
const envOut = process.env.BEJAMAS_DOCS_OUT_DIR;
|
|
9336
|
-
if (envOut && envOut.length) return path
|
|
9337
|
-
return path
|
|
9747
|
+
if (envOut && envOut.length) return path.isAbsolute(envOut) ? envOut : path.resolve(cwd, envOut);
|
|
9748
|
+
return path.resolve(cwd, "../../apps/web/src/content/docs/components");
|
|
9338
9749
|
}
|
|
9339
9750
|
function detectHasImportTopLevel(block, pascalName) {
|
|
9340
9751
|
if (!block) return false;
|
|
9341
9752
|
let inFence = false;
|
|
9342
|
-
const importLineRegex =
|
|
9753
|
+
const importLineRegex = new RegExp(`^\\s*import\\s+.*\\bfrom\\s+['"][^'"]+\\b${pascalName}\\.astro['"]`);
|
|
9343
9754
|
for (const line of block.split("\n")) {
|
|
9344
9755
|
if (line.trim().startsWith("```")) {
|
|
9345
9756
|
inFence = !inFence;
|
|
@@ -9381,24 +9792,24 @@ function extractComponentTagsFromMDX(block) {
|
|
|
9381
9792
|
return Array.from(found);
|
|
9382
9793
|
}
|
|
9383
9794
|
async function discoverExamples(componentFilePath, componentsDir) {
|
|
9384
|
-
const fileBase = path
|
|
9795
|
+
const fileBase = path.basename(componentFilePath, path.extname(componentFilePath));
|
|
9385
9796
|
const kebabBase = slugify(fileBase);
|
|
9386
|
-
const candidates = [join
|
|
9797
|
+
const candidates = [join(dirname(componentFilePath), `${fileBase}.examples`), join(dirname(componentFilePath), `${kebabBase}.examples`)];
|
|
9387
9798
|
const found = [];
|
|
9388
9799
|
for (const dir of candidates) try {
|
|
9389
9800
|
const items = await readdir(dir, { withFileTypes: true });
|
|
9390
|
-
for (const it of items) if (it.isFile() && extname
|
|
9391
|
-
const abs = join
|
|
9392
|
-
const relFromComponents = path
|
|
9801
|
+
for (const it of items) if (it.isFile() && extname(it.name).toLowerCase() === ".astro") {
|
|
9802
|
+
const abs = join(dir, it.name);
|
|
9803
|
+
const relFromComponents = path.relative(componentsDir, abs).split(path.sep).join(posix.sep);
|
|
9393
9804
|
found.push(relFromComponents);
|
|
9394
9805
|
}
|
|
9395
9806
|
} catch {}
|
|
9396
|
-
return found;
|
|
9807
|
+
return [...new Set(found)].sort();
|
|
9397
9808
|
}
|
|
9398
9809
|
function createSourceFileFromFrontmatter(frontmatterCode) {
|
|
9399
9810
|
return new Project({ useInMemoryFileSystem: true }).createSourceFile("Component.ts", frontmatterCode, { overwrite: true });
|
|
9400
9811
|
}
|
|
9401
9812
|
|
|
9402
9813
|
//#endregion
|
|
9403
|
-
export {
|
|
9404
|
-
//# sourceMappingURL=utils-
|
|
9814
|
+
export { PRESET_MENU_COLORS as $, SEMANTIC_ICON_NAMES as A, getFontValue as B, BEJAMAS_COMPONENTS_SCHEMA_URL as C, ICON_LIBRARIES as D, resolveRegistryUrl as E, RTL_LANGUAGE_VALUES as F, normalizeDesignSystemConfig as G, getRadiusValue as H, designSystemConfigSchema as I, PRESET_CHART_COLORS as J, DEFAULT_PRESET_CONFIG as K, getDocumentDirection as L, getSemanticIconNameFromLucidePath as M, renderSemanticIconSvgWithAttributeString as N, buildRegistryTheme as O, DEFAULT_DESIGN_SYSTEM_CONFIG as P, PRESET_MENU_ACCENTS as Q, getDocumentLanguage as R, highlighter as S, buildUiUrl as T, getStyleDefaultRadius as U, getHeadingFontValue as V, getStyleId as W, PRESET_FONT_HEADINGS as X, PRESET_FONTS as Y, PRESET_ICON_LIBRARIES as Z, findCommonRoot as _, extractComponentTagsFromMDX as a, encodePreset as at, getProjectInfo as b, extractPropsFromDeclaredProps as c, __require as ct, parseJsDocMetadata as d, PRESET_RADII as et, resolveOutDir as f, spinner as g, toIdentifier as h, discoverExamples as i, decodePreset as it, getSemanticIconNameFromLucideExport as j, ICON_LIBRARY_COLLECTIONS as k, normalizeBlockMDX as l, slugify as m, createSourceFileFromFrontmatter as n, PRESET_THEMES as nt, extractFrontmatter as o, isPresetCode as ot, resolveUiRoot as p, PRESET_BASE_COLORS as q, detectHasImportTopLevel as r, V1_CHART_COLOR_MAP as rt, extractPropsFromAstroProps as s, fonts as st, RESERVED_COMPONENTS as t, PRESET_STYLES as tt, normalizeUsageMDX as u, getConfig as v, BASE_COLORS as w, logger as x, getWorkspaceConfig as y, getFontPackageName as z };
|
|
9815
|
+
//# sourceMappingURL=utils-BEqgES6q.js.map
|