@weapp-tailwindcss/postcss 3.1.10 → 3.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/compat/mini-program-css/cascade-layers.d.ts +7 -0
- package/dist/compat/mini-program-css/index.d.ts +2 -1
- package/dist/compat/mini-program-css/prune-generated.d.ts +5 -0
- package/dist/compat/tailwindcss-v4/declarations.d.ts +2 -0
- package/dist/compat/tailwindcss-v4/gradients.d.ts +6 -0
- package/dist/compat/tailwindcss-v4/modern-syntax.d.ts +6 -0
- package/dist/compat/tailwindcss-v4/variables.d.ts +30 -0
- package/dist/compat/tailwindcss-v4.d.ts +4 -21
- package/dist/generator-plugin/local-imports.d.ts +2 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +799 -520
- package/dist/index.mjs +781 -508
- package/dist/postcss-config.d.ts +4 -0
- package/dist/vite-css-rules/containment.d.ts +2 -0
- package/dist/vite-css-rules/coverage.d.ts +9 -0
- package/dist/vite-css-rules/mini-program.d.ts +10 -0
- package/dist/vite-css-rules/structure.d.ts +26 -0
- package/dist/vite-css-rules.d.ts +3 -17
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -10639,6 +10639,161 @@ function protectDynamicColorMixAlpha(css, options = {}) {
|
|
|
10639
10639
|
};
|
|
10640
10640
|
}
|
|
10641
10641
|
//#endregion
|
|
10642
|
+
//#region src/compat/mini-program-css/cascade-layers.ts
|
|
10643
|
+
const LAYER_PATH_SEPARATOR = "";
|
|
10644
|
+
const LAYER_INSERTION_ANCHOR = "__weapp_tailwindcss_layer_anchor__";
|
|
10645
|
+
function splitLayerNames(params) {
|
|
10646
|
+
return params.split(",").map((name) => name.trim()).filter(Boolean);
|
|
10647
|
+
}
|
|
10648
|
+
function splitLayerPath(name) {
|
|
10649
|
+
return name.split(".").map((segment) => segment.trim()).filter(Boolean);
|
|
10650
|
+
}
|
|
10651
|
+
function createLayerPath(segments) {
|
|
10652
|
+
return {
|
|
10653
|
+
key: segments.join(LAYER_PATH_SEPARATOR),
|
|
10654
|
+
segments
|
|
10655
|
+
};
|
|
10656
|
+
}
|
|
10657
|
+
function isContainer(node) {
|
|
10658
|
+
return "nodes" in node && Array.isArray(node.nodes);
|
|
10659
|
+
}
|
|
10660
|
+
function cloneWrapper(node, children) {
|
|
10661
|
+
const wrapper = node.clone({ nodes: [] });
|
|
10662
|
+
wrapper.append(...children);
|
|
10663
|
+
return wrapper;
|
|
10664
|
+
}
|
|
10665
|
+
function wrapLayerNodes(atRule, nodes, root) {
|
|
10666
|
+
let wrapped = nodes;
|
|
10667
|
+
let parent = atRule.parent;
|
|
10668
|
+
while (parent && parent !== root) {
|
|
10669
|
+
if (parent.type !== "atrule" || parent.name !== "layer") {
|
|
10670
|
+
if (isContainer(parent)) wrapped = [cloneWrapper(parent, wrapped)];
|
|
10671
|
+
}
|
|
10672
|
+
parent = parent.parent;
|
|
10673
|
+
}
|
|
10674
|
+
return wrapped;
|
|
10675
|
+
}
|
|
10676
|
+
function removeEmptyLayerAncestors(node, root) {
|
|
10677
|
+
let parent = node.parent;
|
|
10678
|
+
node.remove();
|
|
10679
|
+
while (parent && parent !== root && parent.type === "atrule" && parent.nodes?.length === 0) {
|
|
10680
|
+
const nextParent = parent.parent;
|
|
10681
|
+
parent.remove();
|
|
10682
|
+
parent = nextParent;
|
|
10683
|
+
}
|
|
10684
|
+
}
|
|
10685
|
+
function isLayerDescendant(candidate, parent) {
|
|
10686
|
+
return candidate.length > parent.length && parent.every((segment, index) => candidate[index] === segment);
|
|
10687
|
+
}
|
|
10688
|
+
function findParentLayerPath(atRule, paths) {
|
|
10689
|
+
let parent = atRule.parent;
|
|
10690
|
+
while (parent) {
|
|
10691
|
+
if (parent.type === "atrule" && parent.name === "layer") return paths.get(parent)?.segments ?? [];
|
|
10692
|
+
parent = parent.parent;
|
|
10693
|
+
}
|
|
10694
|
+
return [];
|
|
10695
|
+
}
|
|
10696
|
+
function createLayerInsertionAnchor(root, atRule) {
|
|
10697
|
+
let topLevelNode = atRule;
|
|
10698
|
+
while (topLevelNode.parent && topLevelNode.parent !== root) topLevelNode = topLevelNode.parent;
|
|
10699
|
+
const anchor = postcss.default.comment({ text: LAYER_INSERTION_ANCHOR });
|
|
10700
|
+
topLevelNode.before(anchor);
|
|
10701
|
+
return anchor;
|
|
10702
|
+
}
|
|
10703
|
+
function insertLayeredNodes(root, anchor, nodes) {
|
|
10704
|
+
if (!anchor.parent) {
|
|
10705
|
+
root.append(nodes);
|
|
10706
|
+
return;
|
|
10707
|
+
}
|
|
10708
|
+
if (nodes.length === 0) {
|
|
10709
|
+
anchor.remove();
|
|
10710
|
+
return;
|
|
10711
|
+
}
|
|
10712
|
+
anchor.replaceWith(nodes);
|
|
10713
|
+
}
|
|
10714
|
+
/**
|
|
10715
|
+
* 按 cascade layer 声明顺序重排规则并移除 `@layer` 语法。
|
|
10716
|
+
*
|
|
10717
|
+
* 该转换只模拟 layer 的顺序语义,不通过提高选择器权重模拟完整 specificity 规则。
|
|
10718
|
+
*/
|
|
10719
|
+
function consumeCascadeLayers(root) {
|
|
10720
|
+
const layerAtRules = [];
|
|
10721
|
+
const paths = /* @__PURE__ */ new WeakMap();
|
|
10722
|
+
const siblingOrders = /* @__PURE__ */ new Map();
|
|
10723
|
+
const buckets = /* @__PURE__ */ new Map();
|
|
10724
|
+
const topLayerOccurrences = /* @__PURE__ */ new Map();
|
|
10725
|
+
let anonymousLayerIndex = 0;
|
|
10726
|
+
const registerPath = (segments, occurrence) => {
|
|
10727
|
+
let parentKey = "";
|
|
10728
|
+
for (const [index, segment] of segments.entries()) {
|
|
10729
|
+
let siblings = siblingOrders.get(parentKey);
|
|
10730
|
+
if (!siblings) {
|
|
10731
|
+
siblings = /* @__PURE__ */ new Map();
|
|
10732
|
+
siblingOrders.set(parentKey, siblings);
|
|
10733
|
+
}
|
|
10734
|
+
if (!siblings.has(segment)) siblings.set(segment, siblings.size);
|
|
10735
|
+
if (index === 0 && !topLayerOccurrences.has(segment)) topLayerOccurrences.set(segment, occurrence);
|
|
10736
|
+
parentKey = parentKey ? `${parentKey}${LAYER_PATH_SEPARATOR}${segment}` : segment;
|
|
10737
|
+
}
|
|
10738
|
+
const path = createLayerPath(segments);
|
|
10739
|
+
if (!buckets.has(path.key)) buckets.set(path.key, {
|
|
10740
|
+
...path,
|
|
10741
|
+
nodes: []
|
|
10742
|
+
});
|
|
10743
|
+
return path;
|
|
10744
|
+
};
|
|
10745
|
+
root.walkAtRules("layer", (atRule) => {
|
|
10746
|
+
layerAtRules.push(atRule);
|
|
10747
|
+
const parentLayer = findParentLayerPath(atRule, paths);
|
|
10748
|
+
const names = splitLayerNames(atRule.params);
|
|
10749
|
+
if (!atRule.nodes) {
|
|
10750
|
+
for (const name of names) registerPath([...parentLayer, ...splitLayerPath(name)], atRule);
|
|
10751
|
+
return;
|
|
10752
|
+
}
|
|
10753
|
+
const ownSegments = names[0] ? splitLayerPath(names[0]) : [`\u0000anonymous-${anonymousLayerIndex++}`];
|
|
10754
|
+
paths.set(atRule, registerPath([...parentLayer, ...ownSegments], atRule));
|
|
10755
|
+
});
|
|
10756
|
+
if (layerAtRules.length === 0) return;
|
|
10757
|
+
const insertionAnchors = /* @__PURE__ */ new Map();
|
|
10758
|
+
for (const [segment, occurrence] of topLayerOccurrences) insertionAnchors.set(segment, createLayerInsertionAnchor(root, occurrence));
|
|
10759
|
+
for (const atRule of [...layerAtRules].reverse()) {
|
|
10760
|
+
if (!atRule.parent) continue;
|
|
10761
|
+
const path = paths.get(atRule);
|
|
10762
|
+
if (!path || !atRule.nodes) {
|
|
10763
|
+
removeEmptyLayerAncestors(atRule, root);
|
|
10764
|
+
continue;
|
|
10765
|
+
}
|
|
10766
|
+
const nodes = atRule.nodes.map((node) => node.clone());
|
|
10767
|
+
if (nodes.length > 0) buckets.get(path.key)?.nodes.unshift(...wrapLayerNodes(atRule, nodes, root));
|
|
10768
|
+
removeEmptyLayerAncestors(atRule, root);
|
|
10769
|
+
}
|
|
10770
|
+
const compareBuckets = (left, right) => {
|
|
10771
|
+
if (isLayerDescendant(left.segments, right.segments)) return -1;
|
|
10772
|
+
if (isLayerDescendant(right.segments, left.segments)) return 1;
|
|
10773
|
+
const size = Math.min(left.segments.length, right.segments.length);
|
|
10774
|
+
let parentKey = "";
|
|
10775
|
+
for (let index = 0; index < size; index++) {
|
|
10776
|
+
const leftSegment = left.segments[index];
|
|
10777
|
+
const rightSegment = right.segments[index];
|
|
10778
|
+
if (leftSegment !== rightSegment) {
|
|
10779
|
+
const siblings = siblingOrders.get(parentKey);
|
|
10780
|
+
return (siblings?.get(leftSegment) ?? 0) - (siblings?.get(rightSegment) ?? 0);
|
|
10781
|
+
}
|
|
10782
|
+
parentKey = parentKey ? `${parentKey}${LAYER_PATH_SEPARATOR}${leftSegment}` : leftSegment;
|
|
10783
|
+
}
|
|
10784
|
+
return left.segments.length - right.segments.length;
|
|
10785
|
+
};
|
|
10786
|
+
const bucketsByTopLayer = /* @__PURE__ */ new Map();
|
|
10787
|
+
for (const bucket of buckets.values()) {
|
|
10788
|
+
const topLayer = bucket.segments[0];
|
|
10789
|
+
if (!topLayer || bucket.nodes.length === 0) continue;
|
|
10790
|
+
const group = bucketsByTopLayer.get(topLayer) ?? [];
|
|
10791
|
+
group.push(bucket);
|
|
10792
|
+
bucketsByTopLayer.set(topLayer, group);
|
|
10793
|
+
}
|
|
10794
|
+
for (const [segment, anchor] of insertionAnchors) insertLayeredNodes(root, anchor, (bucketsByTopLayer.get(segment) ?? []).sort(compareBuckets).flatMap((bucket) => bucket.nodes));
|
|
10795
|
+
}
|
|
10796
|
+
//#endregion
|
|
10642
10797
|
//#region src/compat/mini-program-css/at-rules.ts
|
|
10643
10798
|
const MINI_PROGRAM_UNSUPPORTED_AT_RULES = /* @__PURE__ */ new Set(["property", "supports"]);
|
|
10644
10799
|
function removeAtRulesByScan(css, names) {
|
|
@@ -10696,13 +10851,7 @@ function removeUnsupportedAtSupports(css) {
|
|
|
10696
10851
|
* 移除小程序不支持的 cascade layer 语法,同时保留 layer 内的实际规则。
|
|
10697
10852
|
*/
|
|
10698
10853
|
function removeUnsupportedCascadeLayers(root) {
|
|
10699
|
-
root
|
|
10700
|
-
if (!atRule.nodes || atRule.nodes.length === 0) {
|
|
10701
|
-
atRule.remove();
|
|
10702
|
-
return;
|
|
10703
|
-
}
|
|
10704
|
-
atRule.replaceWith(...atRule.nodes);
|
|
10705
|
-
});
|
|
10854
|
+
consumeCascadeLayers(root);
|
|
10706
10855
|
}
|
|
10707
10856
|
function unwrapUnsupportedCascadeLayers(css) {
|
|
10708
10857
|
if (!css.includes("@layer")) return css;
|
|
@@ -10943,9 +11092,6 @@ function createCssVarNodes(definitions) {
|
|
|
10943
11092
|
value: def.value
|
|
10944
11093
|
}));
|
|
10945
11094
|
}
|
|
10946
|
-
//#endregion
|
|
10947
|
-
//#region src/compat/tailwindcss-v4.ts
|
|
10948
|
-
const RADIUS_THRESHOLD = 1e5;
|
|
10949
11095
|
const CLAMP_PX = 9999;
|
|
10950
11096
|
const INFINITY_CALC_VALUE_REGEXP = /^calc\(\s*infinity\s*\*\s*(?:\d+(?:\.\d*)?|\.\d+)r?px\s*\)$/i;
|
|
10951
11097
|
const MODERN_CHECK_WEBKIT_HYPHENS_RE = /-webkit-hyphens\s*:\s*none/;
|
|
@@ -11056,6 +11202,8 @@ function createMissingCssVarsV4Nodes(root, usedProps) {
|
|
|
11056
11202
|
value: def.value
|
|
11057
11203
|
}));
|
|
11058
11204
|
}
|
|
11205
|
+
//#endregion
|
|
11206
|
+
//#region src/compat/tailwindcss-v4/gradients.ts
|
|
11059
11207
|
function collectTailwindcssV4ThemeVariables(root) {
|
|
11060
11208
|
const variables = /* @__PURE__ */ new Map();
|
|
11061
11209
|
root.walkRules((rule) => {
|
|
@@ -11302,26 +11450,8 @@ function appendTailwindcssV4MiniProgramGradientRules(root) {
|
|
|
11302
11450
|
appendGradientCombinations(gradient, positionedFromVariants, positionedViaVariants, positionedToVariants);
|
|
11303
11451
|
}
|
|
11304
11452
|
}
|
|
11305
|
-
|
|
11306
|
-
|
|
11307
|
-
MODERN_CHECK_WEBKIT_HYPHENS_RE,
|
|
11308
|
-
MODERN_CHECK_MARGIN_TRIM_RE,
|
|
11309
|
-
MODERN_CHECK_MOZ_ORIENT_RE,
|
|
11310
|
-
MODERN_CHECK_COLOR_RGB_RE
|
|
11311
|
-
].every((regex) => regex.test(atRule.params));
|
|
11312
|
-
}
|
|
11313
|
-
function isTailwindcssV4LinearGradientSupports(atRule) {
|
|
11314
|
-
return atRule.name === "supports" && LINEAR_GRADIENT_LAB_RE.test(atRule.params);
|
|
11315
|
-
}
|
|
11316
|
-
function isTailwindcssV4DisplayP3Supports(atRule) {
|
|
11317
|
-
return atRule.name === "supports" && DISPLAY_P3_COLOR_RE.test(atRule.params);
|
|
11318
|
-
}
|
|
11319
|
-
function isTailwindcssV4DisplayP3Media(atRule) {
|
|
11320
|
-
return atRule.name === "media" && COLOR_GAMUT_P3_RE$1.test(atRule.params);
|
|
11321
|
-
}
|
|
11322
|
-
function isTailwindcssV4DisplayP3Declaration(decl) {
|
|
11323
|
-
return DISPLAY_P3_VALUE_RE$1.test(decl.value);
|
|
11324
|
-
}
|
|
11453
|
+
//#endregion
|
|
11454
|
+
//#region src/compat/tailwindcss-v4/declarations.ts
|
|
11325
11455
|
function normalizeTailwindcssV4EmptyVarFallback(value) {
|
|
11326
11456
|
if (!value.includes("var(") || !value.includes("--tw-")) return value;
|
|
11327
11457
|
const parsed = (0, postcss_value_parser.default)(value);
|
|
@@ -11453,7 +11583,7 @@ function normalizeTailwindcssV4Declaration(decl) {
|
|
|
11453
11583
|
const next = decl.value.replace(RADIUS_VALUE_RE, (m, num) => {
|
|
11454
11584
|
const n = Number(num);
|
|
11455
11585
|
if (!Number.isFinite(n)) return `${CLAMP_PX}px`;
|
|
11456
|
-
if (SCIENTIFIC_NOTATION_RE.test(String(num)) || n >
|
|
11586
|
+
if (SCIENTIFIC_NOTATION_RE.test(String(num)) || n > 1e5) return `${CLAMP_PX}px`;
|
|
11457
11587
|
return m;
|
|
11458
11588
|
});
|
|
11459
11589
|
if (next !== decl.value) {
|
|
@@ -11464,6 +11594,28 @@ function normalizeTailwindcssV4Declaration(decl) {
|
|
|
11464
11594
|
return changed;
|
|
11465
11595
|
}
|
|
11466
11596
|
//#endregion
|
|
11597
|
+
//#region src/compat/tailwindcss-v4/modern-syntax.ts
|
|
11598
|
+
function isTailwindcssV4ModernCheck(atRule) {
|
|
11599
|
+
return atRule.name === "supports" && [
|
|
11600
|
+
MODERN_CHECK_WEBKIT_HYPHENS_RE,
|
|
11601
|
+
MODERN_CHECK_MARGIN_TRIM_RE,
|
|
11602
|
+
MODERN_CHECK_MOZ_ORIENT_RE,
|
|
11603
|
+
MODERN_CHECK_COLOR_RGB_RE
|
|
11604
|
+
].every((regex) => regex.test(atRule.params));
|
|
11605
|
+
}
|
|
11606
|
+
function isTailwindcssV4LinearGradientSupports(atRule) {
|
|
11607
|
+
return atRule.name === "supports" && LINEAR_GRADIENT_LAB_RE.test(atRule.params);
|
|
11608
|
+
}
|
|
11609
|
+
function isTailwindcssV4DisplayP3Supports(atRule) {
|
|
11610
|
+
return atRule.name === "supports" && DISPLAY_P3_COLOR_RE.test(atRule.params);
|
|
11611
|
+
}
|
|
11612
|
+
function isTailwindcssV4DisplayP3Media(atRule) {
|
|
11613
|
+
return atRule.name === "media" && COLOR_GAMUT_P3_RE$1.test(atRule.params);
|
|
11614
|
+
}
|
|
11615
|
+
function isTailwindcssV4DisplayP3Declaration(decl) {
|
|
11616
|
+
return DISPLAY_P3_VALUE_RE$1.test(decl.value);
|
|
11617
|
+
}
|
|
11618
|
+
//#endregion
|
|
11467
11619
|
//#region src/compat/mini-program-css/directives.ts
|
|
11468
11620
|
const TAILWIND_V4_BANNER_RE = /\/\*!\s*tailwindcss v4\./;
|
|
11469
11621
|
const GENERATOR_PLACEHOLDER_COMMENT_RE = /^\s*(?:!\s*)?weapp-tailwindcss generator-placeholder\s*$/i;
|
|
@@ -11922,7 +12074,7 @@ function removeRootSpecificityPlaceholders(root) {
|
|
|
11922
12074
|
});
|
|
11923
12075
|
}
|
|
11924
12076
|
function isEffectivelyEmptyContainer(container) {
|
|
11925
|
-
return
|
|
12077
|
+
return container.nodes !== void 0 && container.nodes.every((node) => node.type === "comment");
|
|
11926
12078
|
}
|
|
11927
12079
|
function removeEmptyAtRules$2(root) {
|
|
11928
12080
|
root.walkAtRules((atRule) => {
|
|
@@ -12125,260 +12277,6 @@ function finalizeMiniProgramCss(css, options = {}) {
|
|
|
12125
12277
|
}
|
|
12126
12278
|
}
|
|
12127
12279
|
//#endregion
|
|
12128
|
-
//#region src/compat/mini-program-css/prune-generated.ts
|
|
12129
|
-
const DEFAULT_WEAPP_VARIABLE_SCOPE = "page,.tw-root,wx-root-portal-content,:host";
|
|
12130
|
-
const MINI_PROGRAM_PSEUDO_CONTENT_SCOPE_SELECTOR = "::before,\n::after";
|
|
12131
|
-
const CLASS_SELECTOR_RE = /(?:^|[^\w-])\.[_a-z\u00A0-\uFFFF\\-]/i;
|
|
12132
|
-
function isConditionalCompilationComment(text) {
|
|
12133
|
-
return /#(?:ifn?def|endif)\b/.test(text);
|
|
12134
|
-
}
|
|
12135
|
-
function hasClassSelector$1(selector) {
|
|
12136
|
-
return CLASS_SELECTOR_RE.test(selector);
|
|
12137
|
-
}
|
|
12138
|
-
function removeEmptyContentInitDeclarations(rule) {
|
|
12139
|
-
rule.walkDecls((decl) => {
|
|
12140
|
-
if (isEmptyTwContentDeclaration(decl)) decl.remove();
|
|
12141
|
-
});
|
|
12142
|
-
}
|
|
12143
|
-
function isMiniProgramElementVariableScopeRule(rule) {
|
|
12144
|
-
const selectors = getRuleSelectors(rule);
|
|
12145
|
-
return selectors.length > 0 && selectors.every((selector) => MINI_PROGRAM_ELEMENT_SCOPE_SELECTORS.has(selector));
|
|
12146
|
-
}
|
|
12147
|
-
function isMiniProgramNativeElementRule(rule) {
|
|
12148
|
-
const selectors = getRuleSelectors(rule);
|
|
12149
|
-
return selectors.length > 0 && selectors.every((selector) => isMiniProgramNativeElementSelector(selector)) && !isMiniProgramPreflightRule(rule);
|
|
12150
|
-
}
|
|
12151
|
-
function isOnlyTwContentDeclarations(rule) {
|
|
12152
|
-
let hasDeclaration = false;
|
|
12153
|
-
let onlyContentVariable = true;
|
|
12154
|
-
rule.walkDecls((decl) => {
|
|
12155
|
-
hasDeclaration = true;
|
|
12156
|
-
if (decl.prop !== "--tw-content") onlyContentVariable = false;
|
|
12157
|
-
});
|
|
12158
|
-
return hasDeclaration && onlyContentVariable;
|
|
12159
|
-
}
|
|
12160
|
-
function isMiniProgramElementContentInitRule(rule) {
|
|
12161
|
-
if (!isMiniProgramElementVariableScopeRule(rule)) return false;
|
|
12162
|
-
let hasElementSelector = false;
|
|
12163
|
-
let hasPseudoSelector = false;
|
|
12164
|
-
for (const selector of getRuleSelectors(rule)) if (selector === "view" || selector === "text") hasElementSelector = true;
|
|
12165
|
-
else if (selector === "::before" || selector === "::after") hasPseudoSelector = true;
|
|
12166
|
-
return hasElementSelector && hasPseudoSelector && isOnlyTwContentDeclarations(rule);
|
|
12167
|
-
}
|
|
12168
|
-
function hasMiniProgramElementContentInit(root) {
|
|
12169
|
-
let found = false;
|
|
12170
|
-
root.walkRules((rule) => {
|
|
12171
|
-
if (!isMiniProgramElementVariableScopeRule(rule)) return;
|
|
12172
|
-
rule.walkDecls("--tw-content", (decl) => {
|
|
12173
|
-
if (isEmptyTwContentDeclaration(decl)) found = true;
|
|
12174
|
-
});
|
|
12175
|
-
});
|
|
12176
|
-
return found;
|
|
12177
|
-
}
|
|
12178
|
-
function ensureMiniProgramElementContentInit(root) {
|
|
12179
|
-
if (hasMiniProgramElementContentInit(root)) return;
|
|
12180
|
-
let defaultScopeRule;
|
|
12181
|
-
root.walkRules((rule) => {
|
|
12182
|
-
if (rule.selector === "view,text,::after,::before") {
|
|
12183
|
-
defaultScopeRule = rule;
|
|
12184
|
-
return false;
|
|
12185
|
-
}
|
|
12186
|
-
});
|
|
12187
|
-
const declaration = postcss.default.decl({
|
|
12188
|
-
prop: "--tw-content",
|
|
12189
|
-
value: "\"\""
|
|
12190
|
-
});
|
|
12191
|
-
if (defaultScopeRule) {
|
|
12192
|
-
defaultScopeRule.append(declaration);
|
|
12193
|
-
return;
|
|
12194
|
-
}
|
|
12195
|
-
root.prepend(postcss.default.rule({
|
|
12196
|
-
selector: MINI_PROGRAM_ELEMENT_SCOPE_SELECTOR,
|
|
12197
|
-
nodes: [declaration]
|
|
12198
|
-
}));
|
|
12199
|
-
}
|
|
12200
|
-
function isTailwindV4GradientRuntimeDeclaration(decl) {
|
|
12201
|
-
return decl.prop.startsWith("--tw-gradient-");
|
|
12202
|
-
}
|
|
12203
|
-
function moveTailwindV4GradientRuntimeDeclarations(rule) {
|
|
12204
|
-
const gradientDeclarations = [];
|
|
12205
|
-
rule.walkDecls((decl) => {
|
|
12206
|
-
if (isTailwindV4GradientRuntimeDeclaration(decl)) {
|
|
12207
|
-
gradientDeclarations.push(decl.clone());
|
|
12208
|
-
decl.remove();
|
|
12209
|
-
}
|
|
12210
|
-
});
|
|
12211
|
-
if (gradientDeclarations.length > 0) rule.before(new postcss.default.Rule({
|
|
12212
|
-
selector: MINI_PROGRAM_ELEMENT_SCOPE_SELECTOR,
|
|
12213
|
-
nodes: gradientDeclarations
|
|
12214
|
-
}));
|
|
12215
|
-
if (rule.nodes.length === 0) rule.remove();
|
|
12216
|
-
}
|
|
12217
|
-
function isKeyframesRule(rule) {
|
|
12218
|
-
let parent = rule.parent;
|
|
12219
|
-
while (parent) {
|
|
12220
|
-
if (parent.type === "atrule" && parent.name.endsWith("keyframes")) return true;
|
|
12221
|
-
parent = parent.parent;
|
|
12222
|
-
}
|
|
12223
|
-
return false;
|
|
12224
|
-
}
|
|
12225
|
-
/**
|
|
12226
|
-
* 裁剪 Tailwind 生成 CSS 中面向浏览器的 classless 规则。
|
|
12227
|
-
*/
|
|
12228
|
-
function pruneMiniProgramGeneratedCss(css, options = {}) {
|
|
12229
|
-
const root = postcss.default.parse(css);
|
|
12230
|
-
const shouldPreserveContentInit = options.preservePreflight || usesTwContentVariable(root);
|
|
12231
|
-
root.walkComments((comment) => {
|
|
12232
|
-
if (options.preserveConditionalComments && isConditionalCompilationComment(comment.text)) return;
|
|
12233
|
-
comment.remove();
|
|
12234
|
-
});
|
|
12235
|
-
removeUnsupportedCascadeLayers(root);
|
|
12236
|
-
removeSpecificityPlaceholders(root);
|
|
12237
|
-
removeUnsupportedModernColorDeclarations(root);
|
|
12238
|
-
removeTailwindContainerMaxWidthMediaRules(root);
|
|
12239
|
-
removeTailwindContainerWidthRules(root);
|
|
12240
|
-
root.walkAtRules("supports", (atRule) => {
|
|
12241
|
-
atRule.remove();
|
|
12242
|
-
});
|
|
12243
|
-
root.walkAtRules((atRule) => {
|
|
12244
|
-
removeUnsupportedMiniProgramPrefixedAtRule(atRule);
|
|
12245
|
-
});
|
|
12246
|
-
root.walkDecls((decl) => {
|
|
12247
|
-
normalizeMiniProgramPrefixedDeclaration(decl);
|
|
12248
|
-
});
|
|
12249
|
-
root.walkRules((rule) => {
|
|
12250
|
-
if (isKeyframesRule(rule)) return;
|
|
12251
|
-
if (isPseudoContentInitRule(rule)) {
|
|
12252
|
-
if (!shouldPreserveContentInit) rule.remove();
|
|
12253
|
-
return;
|
|
12254
|
-
}
|
|
12255
|
-
if (isMiniProgramElementContentInitRule(rule)) {
|
|
12256
|
-
if (!shouldPreserveContentInit) {
|
|
12257
|
-
rule.remove();
|
|
12258
|
-
return;
|
|
12259
|
-
}
|
|
12260
|
-
rule.selector = MINI_PROGRAM_PSEUDO_CONTENT_SCOPE_SELECTOR;
|
|
12261
|
-
return;
|
|
12262
|
-
}
|
|
12263
|
-
if (isCustomPropertyRule(rule) && isMiniProgramElementVariableScopeRule(rule)) {
|
|
12264
|
-
rule.selector = MINI_PROGRAM_ELEMENT_SCOPE_SELECTOR;
|
|
12265
|
-
return;
|
|
12266
|
-
}
|
|
12267
|
-
if (isUnsupportedBrowserPreflightSelector(rule.selector)) {
|
|
12268
|
-
rule.remove();
|
|
12269
|
-
return;
|
|
12270
|
-
}
|
|
12271
|
-
if (isBrowserElementPreflightRule(rule)) {
|
|
12272
|
-
rule.remove();
|
|
12273
|
-
return;
|
|
12274
|
-
}
|
|
12275
|
-
if (isMiniProgramNativeElementRule(rule)) return;
|
|
12276
|
-
if (isMiniProgramThemeVariableRule(rule)) {
|
|
12277
|
-
moveTailwindV4GradientRuntimeDeclarations(rule);
|
|
12278
|
-
if (!rule.parent) return;
|
|
12279
|
-
rule.selector = DEFAULT_WEAPP_VARIABLE_SCOPE;
|
|
12280
|
-
return;
|
|
12281
|
-
}
|
|
12282
|
-
if (hasClassSelector$1(rule.selector)) return;
|
|
12283
|
-
if (!shouldPreserveContentInit) removeEmptyContentInitDeclarations(rule);
|
|
12284
|
-
if (isMiniProgramPreflightRule(rule)) {
|
|
12285
|
-
if (options.preservePreflight) return;
|
|
12286
|
-
rule.remove();
|
|
12287
|
-
return;
|
|
12288
|
-
}
|
|
12289
|
-
if (isCustomPropertyRule(rule)) {
|
|
12290
|
-
moveTailwindV4GradientRuntimeDeclarations(rule);
|
|
12291
|
-
if (!rule.parent) return;
|
|
12292
|
-
rule.selector = DEFAULT_WEAPP_VARIABLE_SCOPE;
|
|
12293
|
-
return;
|
|
12294
|
-
}
|
|
12295
|
-
rule.remove();
|
|
12296
|
-
});
|
|
12297
|
-
if (shouldPreserveContentInit) ensureMiniProgramElementContentInit(root);
|
|
12298
|
-
root.walkAtRules((atRule) => {
|
|
12299
|
-
if (!atRule.nodes || atRule.nodes.length === 0) atRule.remove();
|
|
12300
|
-
});
|
|
12301
|
-
return root.toString();
|
|
12302
|
-
}
|
|
12303
|
-
//#endregion
|
|
12304
|
-
//#region src/compat/tailwindcss-rpx.ts
|
|
12305
|
-
const LENGTH_VALUE_REGEXP = /^[+-]?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?rpx$/i;
|
|
12306
|
-
const RPX_DIMENSION_REGEXP = /^([+-]?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?)rpx$/i;
|
|
12307
|
-
const DEFAULT_RPX_TO_REM_ROOT_VALUE = 32;
|
|
12308
|
-
const DEFAULT_RPX_TO_REM_UNIT_PRECISION = 5;
|
|
12309
|
-
function formatRpxToRemValue(value, precision) {
|
|
12310
|
-
const fixed = Number(value.toFixed(precision));
|
|
12311
|
-
return Object.is(fixed, -0) ? 0 : fixed;
|
|
12312
|
-
}
|
|
12313
|
-
function convertTailwindcssRpxValueToRem(value, options) {
|
|
12314
|
-
if (!value.includes("rpx") && !value.includes("RPX")) return value;
|
|
12315
|
-
let changed = false;
|
|
12316
|
-
const rootValue = options?.rootValue ?? DEFAULT_RPX_TO_REM_ROOT_VALUE;
|
|
12317
|
-
const unitPrecision = options?.unitPrecision ?? DEFAULT_RPX_TO_REM_UNIT_PRECISION;
|
|
12318
|
-
const parsed = (0, postcss_value_parser.default)(value);
|
|
12319
|
-
parsed.walk((node) => {
|
|
12320
|
-
if (node.type !== "word") return;
|
|
12321
|
-
const match = RPX_DIMENSION_REGEXP.exec(node.value);
|
|
12322
|
-
if (!match) return;
|
|
12323
|
-
node.value = `${formatRpxToRemValue(Number(match[1]) / rootValue, unitPrecision)}rem`;
|
|
12324
|
-
changed = true;
|
|
12325
|
-
});
|
|
12326
|
-
return changed ? parsed.toString() : value;
|
|
12327
|
-
}
|
|
12328
|
-
function normalizeTailwindcssRpxDeclaration(decl, options) {
|
|
12329
|
-
const majorVersion = options?.majorVersion;
|
|
12330
|
-
const normalizedValue = decl.value.trim();
|
|
12331
|
-
if (LENGTH_VALUE_REGEXP.test(normalizedValue) && (majorVersion === void 0 || majorVersion === 4)) {
|
|
12332
|
-
const lowerProp = decl.prop.toLowerCase();
|
|
12333
|
-
if (lowerProp === "color") {
|
|
12334
|
-
decl.prop = "font-size";
|
|
12335
|
-
return true;
|
|
12336
|
-
}
|
|
12337
|
-
if (lowerProp === "background-color") {
|
|
12338
|
-
decl.prop = "background-size";
|
|
12339
|
-
return true;
|
|
12340
|
-
}
|
|
12341
|
-
if (lowerProp === "outline-color") {
|
|
12342
|
-
decl.prop = "outline-width";
|
|
12343
|
-
return true;
|
|
12344
|
-
}
|
|
12345
|
-
if (lowerProp.startsWith("border") && lowerProp.endsWith("color")) {
|
|
12346
|
-
decl.prop = `${decl.prop.slice(0, -5)}width`;
|
|
12347
|
-
return true;
|
|
12348
|
-
}
|
|
12349
|
-
if (lowerProp === "--tw-ring-color") {
|
|
12350
|
-
decl.prop = "--tw-ring-offset-width";
|
|
12351
|
-
return true;
|
|
12352
|
-
}
|
|
12353
|
-
}
|
|
12354
|
-
return false;
|
|
12355
|
-
}
|
|
12356
|
-
function normalizeTailwindcssRpxDeclarations(root, options) {
|
|
12357
|
-
let changed = false;
|
|
12358
|
-
root.walkDecls((decl) => {
|
|
12359
|
-
changed = normalizeTailwindcssRpxDeclaration(decl, options) || changed;
|
|
12360
|
-
});
|
|
12361
|
-
return changed;
|
|
12362
|
-
}
|
|
12363
|
-
function convertTailwindcssRpxDeclarationToRem(decl, options) {
|
|
12364
|
-
const value = convertTailwindcssRpxValueToRem(decl.value, options);
|
|
12365
|
-
if (value === decl.value) return false;
|
|
12366
|
-
decl.value = value;
|
|
12367
|
-
return true;
|
|
12368
|
-
}
|
|
12369
|
-
function convertTailwindcssRpxDeclarationsToRem(root, options) {
|
|
12370
|
-
let changed = false;
|
|
12371
|
-
root.walkDecls((decl) => {
|
|
12372
|
-
changed = convertTailwindcssRpxDeclarationToRem(decl, options) || changed;
|
|
12373
|
-
});
|
|
12374
|
-
return changed;
|
|
12375
|
-
}
|
|
12376
|
-
function normalizeTailwindcssWebRpxDeclarations(root, options) {
|
|
12377
|
-
const normalized = normalizeTailwindcssRpxDeclarations(root, options);
|
|
12378
|
-
const converted = convertTailwindcssRpxDeclarationsToRem(root, options);
|
|
12379
|
-
return normalized || converted;
|
|
12380
|
-
}
|
|
12381
|
-
//#endregion
|
|
12382
12280
|
//#region ../../node_modules/.pnpm/cssdb@8.9.0/node_modules/cssdb/cssdb.mjs
|
|
12383
12281
|
var cssdb_default = [
|
|
12384
12282
|
{
|
|
@@ -14647,7 +14545,7 @@ var cssdb_default = [
|
|
|
14647
14545
|
}
|
|
14648
14546
|
];
|
|
14649
14547
|
//#endregion
|
|
14650
|
-
//#region ../../node_modules/.pnpm/baseline-browser-mapping@2.10.
|
|
14548
|
+
//#region ../../node_modules/.pnpm/baseline-browser-mapping@2.10.43/node_modules/baseline-browser-mapping/dist/index.cjs
|
|
14651
14549
|
var require_dist$1 = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports) => {
|
|
14652
14550
|
const s = {
|
|
14653
14551
|
chrome: { releases: [
|
|
@@ -18271,7 +18169,7 @@ var require_dist$1 = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((ex
|
|
|
18271
18169
|
],
|
|
18272
18170
|
[
|
|
18273
18171
|
"155",
|
|
18274
|
-
"2026-09-
|
|
18172
|
+
"2026-09-01",
|
|
18275
18173
|
"p",
|
|
18276
18174
|
"g",
|
|
18277
18175
|
"155"
|
|
@@ -19267,7 +19165,7 @@ var require_dist$1 = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((ex
|
|
|
19267
19165
|
],
|
|
19268
19166
|
[
|
|
19269
19167
|
"155",
|
|
19270
|
-
"2026-09-
|
|
19168
|
+
"2026-09-01",
|
|
19271
19169
|
"p",
|
|
19272
19170
|
"g",
|
|
19273
19171
|
"155"
|
|
@@ -34534,7 +34432,7 @@ var require_dist$1 = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((ex
|
|
|
34534
34432
|
return g.suppressWarnings || ((s, a) => {
|
|
34535
34433
|
if (n || "undefined" != typeof process && process.env && (process.env.BROWSERSLIST_IGNORE_OLD_DATA || process.env.BASELINE_BROWSER_MAPPING_IGNORE_OLD_DATA)) return;
|
|
34536
34434
|
const r = /* @__PURE__ */ new Date();
|
|
34537
|
-
r.setMonth(r.getMonth() - 2), s > r && (null != a ? a :
|
|
34435
|
+
r.setMonth(r.getMonth() - 2), s > r && (null != a ? a : 1783780964428) < r.getTime() && (console.warn("[baseline-browser-mapping] The data in this module is over two months old and you are targetting a recent feature cut off date of " + s.toISOString().slice(0, 10) + ". To ensure accurate Baseline data, please update to the latest version of this module using the package manager of your choice.You can suppress these warnings using the environment variables `BROWSERSLIST_IGNORE_OLD_DATA=true` or `BASELINE_BROWSER_MAPPING_IGNORE_OLD_DATA=true` or by passing `suppressWarnings: true` when you call `getCompatibleVersions()` or `getAllVersions()`."), n = !0);
|
|
34538
34436
|
})(o, g.overrideLastUpdated), !1 === g.includeDownstreamBrowsers ? t : [...t, ...y(t, g.listAllCompatibleVersions, g.includeKaiOS)];
|
|
34539
34437
|
}
|
|
34540
34438
|
exports._resetHasWarned = function() {
|
|
@@ -34641,7 +34539,7 @@ var require_dist$1 = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((ex
|
|
|
34641
34539
|
}, exports.getCompatibleVersions = O;
|
|
34642
34540
|
}));
|
|
34643
34541
|
//#endregion
|
|
34644
|
-
//#region ../../node_modules/.pnpm/node-releases@2.0.
|
|
34542
|
+
//#region ../../node_modules/.pnpm/node-releases@2.0.51/node_modules/node-releases/data/processed/envs.json
|
|
34645
34543
|
var require_envs = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
|
|
34646
34544
|
module.exports = [
|
|
34647
34545
|
{
|
|
@@ -37603,6 +37501,14 @@ var require_envs = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((expo
|
|
|
37603
37501
|
"lts": false,
|
|
37604
37502
|
"security": false,
|
|
37605
37503
|
"v8": "14.6.202.34"
|
|
37504
|
+
},
|
|
37505
|
+
{
|
|
37506
|
+
"name": "nodejs",
|
|
37507
|
+
"version": "26.5.0",
|
|
37508
|
+
"date": "2026-07-08",
|
|
37509
|
+
"lts": false,
|
|
37510
|
+
"security": false,
|
|
37511
|
+
"v8": "14.6.202.34"
|
|
37606
37512
|
}
|
|
37607
37513
|
];
|
|
37608
37514
|
}));
|
|
@@ -42715,7 +42621,7 @@ var require_versions = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((
|
|
|
42715
42621
|
};
|
|
42716
42622
|
}));
|
|
42717
42623
|
//#endregion
|
|
42718
|
-
//#region ../../node_modules/.pnpm/node-releases@2.0.
|
|
42624
|
+
//#region ../../node_modules/.pnpm/node-releases@2.0.51/node_modules/node-releases/data/release-schedule/release-schedule.json
|
|
42719
42625
|
var require_release_schedule = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
|
|
42720
42626
|
module.exports = {
|
|
42721
42627
|
"v0.8": {
|
|
@@ -42879,7 +42785,7 @@ var require_release_schedule = /* @__PURE__ */ require_rolldown_runtime.__common
|
|
|
42879
42785
|
};
|
|
42880
42786
|
}));
|
|
42881
42787
|
//#endregion
|
|
42882
|
-
//#region ../../node_modules/.pnpm/browserslist@4.28.
|
|
42788
|
+
//#region ../../node_modules/.pnpm/browserslist@4.28.6/node_modules/browserslist/error.js
|
|
42883
42789
|
var require_error = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
|
|
42884
42790
|
function BrowserslistError(message) {
|
|
42885
42791
|
this.name = "BrowserslistError";
|
|
@@ -44347,7 +44253,7 @@ var require_region = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((ex
|
|
|
44347
44253
|
module.exports.default = unpackRegion;
|
|
44348
44254
|
}));
|
|
44349
44255
|
//#endregion
|
|
44350
|
-
//#region ../../node_modules/.pnpm/browserslist@4.28.
|
|
44256
|
+
//#region ../../node_modules/.pnpm/browserslist@4.28.6/node_modules/browserslist/node.js
|
|
44351
44257
|
var require_node$1 = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
|
|
44352
44258
|
var feature = require_feature().default;
|
|
44353
44259
|
var region = require_region().default;
|
|
@@ -44640,7 +44546,7 @@ var require_node$1 = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((ex
|
|
|
44640
44546
|
};
|
|
44641
44547
|
}));
|
|
44642
44548
|
//#endregion
|
|
44643
|
-
//#region ../../node_modules/.pnpm/browserslist@4.28.
|
|
44549
|
+
//#region ../../node_modules/.pnpm/browserslist@4.28.6/node_modules/browserslist/parse.js
|
|
44644
44550
|
var require_parse = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
|
|
44645
44551
|
var AND_REGEXP = /^\s+and\s+(.*)/i;
|
|
44646
44552
|
var OR_REGEXP = /^(?:,\s*|\s+or\s+)(.*)/i;
|
|
@@ -44706,7 +44612,7 @@ var require_parse = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exp
|
|
|
44706
44612
|
};
|
|
44707
44613
|
}));
|
|
44708
44614
|
//#endregion
|
|
44709
|
-
//#region ../../node_modules/.pnpm/browserslist@4.28.
|
|
44615
|
+
//#region ../../node_modules/.pnpm/browserslist@4.28.6/node_modules/browserslist/index.js
|
|
44710
44616
|
var require_browserslist = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
|
|
44711
44617
|
var bbm = require_dist$1();
|
|
44712
44618
|
var jsReleases = require_envs();
|
|
@@ -45496,10 +45402,7 @@ var require_browserslist = /* @__PURE__ */ require_rolldown_runtime.__commonJSMi
|
|
|
45496
45402
|
var to = parseFloat(node.to);
|
|
45497
45403
|
if (!e2c[fromToUse]) throw new BrowserslistError("Unknown version " + from + " of electron");
|
|
45498
45404
|
if (!e2c[toToUse]) throw new BrowserslistError("Unknown version " + to + " of electron");
|
|
45499
|
-
return Object.keys(e2c).filter(function(i) {
|
|
45500
|
-
var parsed = parseFloat(i);
|
|
45501
|
-
return parsed >= from && parsed <= to;
|
|
45502
|
-
}).map(function(i) {
|
|
45405
|
+
return Object.keys(e2c).filter(semverFilterLoose(">=", node.from)).filter(semverFilterLoose("<=", node.to)).map(function(i) {
|
|
45503
45406
|
return "chrome " + e2c[i];
|
|
45504
45407
|
});
|
|
45505
45408
|
}
|
|
@@ -45733,7 +45636,7 @@ var require_browserslist = /* @__PURE__ */ require_rolldown_runtime.__commonJSMi
|
|
|
45733
45636
|
module.exports = browserslist;
|
|
45734
45637
|
}));
|
|
45735
45638
|
//#endregion
|
|
45736
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-initial@3.0.0_postcss@8.5.
|
|
45639
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-initial@3.0.0_postcss@8.5.19/node_modules/@csstools/postcss-initial/dist/index.mjs
|
|
45737
45640
|
var import_browserslist = /* @__PURE__ */ require_rolldown_runtime.__toESM(require_browserslist(), 1);
|
|
45738
45641
|
const o$25 = /* @__PURE__ */ new Map([
|
|
45739
45642
|
["animation", "none 0s ease 0s 1 normal none running"],
|
|
@@ -46012,7 +45915,7 @@ const creator$52 = (a) => {
|
|
|
46012
45915
|
};
|
|
46013
45916
|
creator$52.postcss = !0;
|
|
46014
45917
|
//#endregion
|
|
46015
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-progressive-custom-properties@5.1.1_postcss@8.5.
|
|
45918
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-progressive-custom-properties@5.1.1_postcss@8.5.19/node_modules/@csstools/postcss-progressive-custom-properties/dist/index.mjs
|
|
46016
45919
|
const r$9 = [
|
|
46017
45920
|
"at",
|
|
46018
45921
|
"bottom",
|
|
@@ -49769,7 +49672,7 @@ const creator$51 = () => ({
|
|
|
49769
49672
|
});
|
|
49770
49673
|
creator$51.postcss = !0;
|
|
49771
49674
|
//#endregion
|
|
49772
|
-
//#region ../../node_modules/.pnpm/@csstools+utilities@3.0.0_postcss@8.5.
|
|
49675
|
+
//#region ../../node_modules/.pnpm/@csstools+utilities@3.0.0_postcss@8.5.19/node_modules/@csstools/utilities/dist/index.mjs
|
|
49773
49676
|
function hasFallback$1(e) {
|
|
49774
49677
|
const t = e.parent;
|
|
49775
49678
|
if (!t) return !1;
|
|
@@ -49789,7 +49692,7 @@ function hasSupportsAtRuleAncestor(e, t) {
|
|
|
49789
49692
|
return !1;
|
|
49790
49693
|
}
|
|
49791
49694
|
//#endregion
|
|
49792
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-alpha-function@2.0.7_postcss@8.5.
|
|
49695
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-alpha-function@2.0.7_postcss@8.5.19/node_modules/@csstools/postcss-alpha-function/dist/index.mjs
|
|
49793
49696
|
const b$1 = /\balpha\(/i;
|
|
49794
49697
|
const m$9 = /^alpha$/i;
|
|
49795
49698
|
const w$3 = /* @__PURE__ */ new Set([
|
|
@@ -50016,7 +49919,7 @@ const postcssPlugin$16 = (o) => {
|
|
|
50016
49919
|
};
|
|
50017
49920
|
postcssPlugin$16.postcss = !0;
|
|
50018
49921
|
//#endregion
|
|
50019
|
-
//#region ../../node_modules/.pnpm/postcss-pseudo-class-any-link@11.0.0_postcss@8.5.
|
|
49922
|
+
//#region ../../node_modules/.pnpm/postcss-pseudo-class-any-link@11.0.0_postcss@8.5.19/node_modules/postcss-pseudo-class-any-link/dist/index.mjs
|
|
50020
49923
|
const t$15 = (0, import_dist$1.default)().astSync(":link").nodes[0];
|
|
50021
49924
|
const s$15 = (0, import_dist$1.default)().astSync(":visited").nodes[0];
|
|
50022
49925
|
const n$10 = (0, import_dist$1.default)().astSync("area[href]").nodes[0];
|
|
@@ -50113,7 +50016,7 @@ const creator$50 = (e) => {
|
|
|
50113
50016
|
};
|
|
50114
50017
|
creator$50.postcss = !0;
|
|
50115
50018
|
//#endregion
|
|
50116
|
-
//#region ../../node_modules/.pnpm/css-blank-pseudo@8.0.1_postcss@8.5.
|
|
50019
|
+
//#region ../../node_modules/.pnpm/css-blank-pseudo@8.0.1_postcss@8.5.19/node_modules/css-blank-pseudo/dist/index.mjs
|
|
50117
50020
|
const s$14 = [
|
|
50118
50021
|
" ",
|
|
50119
50022
|
">",
|
|
@@ -50190,7 +50093,7 @@ const creator$49 = (s) => {
|
|
|
50190
50093
|
};
|
|
50191
50094
|
creator$49.postcss = !0;
|
|
50192
50095
|
//#endregion
|
|
50193
|
-
//#region ../../node_modules/.pnpm/postcss-page-break@3.0.4_postcss@8.5.
|
|
50096
|
+
//#region ../../node_modules/.pnpm/postcss-page-break@3.0.4_postcss@8.5.19/node_modules/postcss-page-break/index.js
|
|
50194
50097
|
var require_postcss_page_break = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
|
|
50195
50098
|
module.exports = function(options) {
|
|
50196
50099
|
return {
|
|
@@ -50352,7 +50255,7 @@ function selectorNodeContainsNothingOrOnlyUniversal$1(e) {
|
|
|
50352
50255
|
return 0 === t.length || 1 === t.length && "universal" === t[0].type;
|
|
50353
50256
|
}
|
|
50354
50257
|
//#endregion
|
|
50355
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-cascade-layers@6.0.0_postcss@8.5.
|
|
50258
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-cascade-layers@6.0.0_postcss@8.5.19/node_modules/@csstools/postcss-cascade-layers/dist/index.mjs
|
|
50356
50259
|
const t$13 = "csstools-invalid-layer";
|
|
50357
50260
|
const a$5 = "csstools-layer-with-selector-rules";
|
|
50358
50261
|
const s$13 = "6efdb677-bb05-44e5-840f-29d2175862fd";
|
|
@@ -50674,7 +50577,7 @@ const creator$48 = (a) => {
|
|
|
50674
50577
|
};
|
|
50675
50578
|
creator$48.postcss = !0;
|
|
50676
50579
|
//#endregion
|
|
50677
|
-
//#region ../../node_modules/.pnpm/postcss-attribute-case-insensitive@8.0.0_postcss@8.5.
|
|
50580
|
+
//#region ../../node_modules/.pnpm/postcss-attribute-case-insensitive@8.0.0_postcss@8.5.19/node_modules/postcss-attribute-case-insensitive/dist/index.mjs
|
|
50678
50581
|
function nodeIsInsensitiveAttribute(e) {
|
|
50679
50582
|
return "attribute" === e.type && (e.insensitive ?? !1);
|
|
50680
50583
|
}
|
|
@@ -50748,9 +50651,9 @@ const creator$47 = (t) => {
|
|
|
50748
50651
|
};
|
|
50749
50652
|
creator$47.postcss = !0;
|
|
50750
50653
|
//#endregion
|
|
50751
|
-
//#region ../../node_modules/.pnpm/postcss-clamp@4.1.0_postcss@8.5.
|
|
50654
|
+
//#region ../../node_modules/.pnpm/postcss-clamp@4.1.0_postcss@8.5.19/node_modules/postcss-clamp/index.js
|
|
50752
50655
|
var require_postcss_clamp = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
|
|
50753
|
-
let valueParser$
|
|
50656
|
+
let valueParser$4 = require("postcss-value-parser");
|
|
50754
50657
|
function parseValue(value) {
|
|
50755
50658
|
let parsed = value.match(/([\d.-]+)(.*)/);
|
|
50756
50659
|
if (!parsed || !parsed[1] || !parsed[2] || isNaN(parsed[1])) return;
|
|
@@ -50763,8 +50666,8 @@ var require_postcss_clamp = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
|
|
|
50763
50666
|
}
|
|
50764
50667
|
function updateValue(declaration, value, preserve) {
|
|
50765
50668
|
let newValue = value;
|
|
50766
|
-
let newValueAst = valueParser$
|
|
50767
|
-
let valueAST = valueParser$
|
|
50669
|
+
let newValueAst = valueParser$4(value);
|
|
50670
|
+
let valueAST = valueParser$4(declaration.value);
|
|
50768
50671
|
let foundClamp = false;
|
|
50769
50672
|
valueAST.walk((node, index, nodes) => {
|
|
50770
50673
|
if (!(node.type === "function" && node.value === "clamp") || foundClamp) return;
|
|
@@ -50783,13 +50686,13 @@ var require_postcss_clamp = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
|
|
|
50783
50686
|
postcssPlugin: "postcss-clamp",
|
|
50784
50687
|
Declaration(decl) {
|
|
50785
50688
|
if (!decl || !decl.value.includes("clamp")) return;
|
|
50786
|
-
valueParser$
|
|
50689
|
+
valueParser$4(decl.value).walk((node) => {
|
|
50787
50690
|
let nodes = node.nodes;
|
|
50788
50691
|
if (node.type !== "function" || node.value !== "clamp" || nodes.length !== 5) return;
|
|
50789
50692
|
let first = nodes[0];
|
|
50790
50693
|
let second = nodes[2];
|
|
50791
50694
|
let third = nodes[4];
|
|
50792
|
-
let naive = compose(valueParser$
|
|
50695
|
+
let naive = compose(valueParser$4.stringify(first), valueParser$4.stringify(second), valueParser$4.stringify(third));
|
|
50793
50696
|
if (!precalculate || second.type !== "word" || third.type !== "word") {
|
|
50794
50697
|
updateValue(decl, naive, preserve);
|
|
50795
50698
|
return;
|
|
@@ -50809,13 +50712,13 @@ var require_postcss_clamp = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
|
|
|
50809
50712
|
let parsedFirst = parseValue(first.value);
|
|
50810
50713
|
if (parsedFirst === void 0) {
|
|
50811
50714
|
let secondThirdValue = `${secondValue + thirdValue}${secondUnit}`;
|
|
50812
|
-
updateValue(decl, compose(valueParser$
|
|
50715
|
+
updateValue(decl, compose(valueParser$4.stringify(first), secondThirdValue), preserve);
|
|
50813
50716
|
return;
|
|
50814
50717
|
}
|
|
50815
50718
|
let [firstValue, firstUnit] = parsedFirst;
|
|
50816
50719
|
if (firstUnit !== secondUnit) {
|
|
50817
50720
|
let secondThirdValue = `${secondValue + thirdValue}${secondUnit}`;
|
|
50818
|
-
updateValue(decl, compose(valueParser$
|
|
50721
|
+
updateValue(decl, compose(valueParser$4.stringify(first), secondThirdValue), preserve);
|
|
50819
50722
|
return;
|
|
50820
50723
|
}
|
|
50821
50724
|
updateValue(decl, compose(`${firstValue + secondValue + thirdValue}${secondUnit}`), preserve);
|
|
@@ -50826,7 +50729,7 @@ var require_postcss_clamp = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
|
|
|
50826
50729
|
module.exports.postcss = true;
|
|
50827
50730
|
}));
|
|
50828
50731
|
//#endregion
|
|
50829
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-color-function@5.0.6_postcss@8.5.
|
|
50732
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-color-function@5.0.6_postcss@8.5.19/node_modules/@csstools/postcss-color-function/dist/index.mjs
|
|
50830
50733
|
var import_postcss_clamp = /* @__PURE__ */ require_rolldown_runtime.__toESM(require_postcss_clamp(), 1);
|
|
50831
50734
|
const u$7 = /\bcolor\(/i;
|
|
50832
50735
|
const m$7 = /^color$/i;
|
|
@@ -50858,7 +50761,7 @@ const postcssPlugin$15 = (o) => {
|
|
|
50858
50761
|
};
|
|
50859
50762
|
postcssPlugin$15.postcss = !0;
|
|
50860
50763
|
//#endregion
|
|
50861
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-color-function-display-p3-linear@2.0.6_postcss@8.5.
|
|
50764
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-color-function-display-p3-linear@2.0.6_postcss@8.5.19/node_modules/@csstools/postcss-color-function-display-p3-linear/dist/index.mjs
|
|
50862
50765
|
const m$6 = /\bdisplay-p3-linear\b/i;
|
|
50863
50766
|
const f$7 = /^color$/i;
|
|
50864
50767
|
const basePlugin$14 = (s) => ({
|
|
@@ -50889,7 +50792,7 @@ const postcssPlugin$14 = (o) => {
|
|
|
50889
50792
|
};
|
|
50890
50793
|
postcssPlugin$14.postcss = !0;
|
|
50891
50794
|
//#endregion
|
|
50892
|
-
//#region ../../node_modules/.pnpm/postcss-color-functional-notation@8.0.6_postcss@8.5.
|
|
50795
|
+
//#region ../../node_modules/.pnpm/postcss-color-functional-notation@8.0.6_postcss@8.5.19/node_modules/postcss-color-functional-notation/dist/index.mjs
|
|
50893
50796
|
const m$5 = /^(?:rgb|hsl)a?$/i;
|
|
50894
50797
|
const f$6 = /\b(?:rgb|hsl)a?\(/i;
|
|
50895
50798
|
const basePlugin$13 = (s) => ({
|
|
@@ -50920,7 +50823,7 @@ const postcssPlugin$13 = (o) => {
|
|
|
50920
50823
|
};
|
|
50921
50824
|
postcssPlugin$13.postcss = !0;
|
|
50922
50825
|
//#endregion
|
|
50923
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-color-mix-function@4.0.6_postcss@8.5.
|
|
50826
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-color-mix-function@4.0.6_postcss@8.5.19/node_modules/@csstools/postcss-color-mix-function/dist/index.mjs
|
|
50924
50827
|
const f$5 = /\bcolor-mix\(/i;
|
|
50925
50828
|
const g$6 = /^color-mix$/i;
|
|
50926
50829
|
const basePlugin$12 = (s) => ({
|
|
@@ -50958,7 +50861,7 @@ const postcssPlugin$12 = (e) => {
|
|
|
50958
50861
|
};
|
|
50959
50862
|
postcssPlugin$12.postcss = !0;
|
|
50960
50863
|
//#endregion
|
|
50961
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-color-mix-variadic-function-arguments@2.0.6_postcss@8.5.
|
|
50864
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-color-mix-variadic-function-arguments@2.0.6_postcss@8.5.19/node_modules/@csstools/postcss-color-mix-variadic-function-arguments/dist/index.mjs
|
|
50962
50865
|
const f$4 = /\bcolor-mix\(/i;
|
|
50963
50866
|
const g$5 = /^color-mix$/i;
|
|
50964
50867
|
const basePlugin$11 = (s) => ({
|
|
@@ -50996,7 +50899,7 @@ const postcssPlugin$11 = (e) => {
|
|
|
50996
50899
|
};
|
|
50997
50900
|
postcssPlugin$11.postcss = !0;
|
|
50998
50901
|
//#endregion
|
|
50999
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-container-rule-prelude-list@1.0.1_postcss@8.5.
|
|
50902
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-container-rule-prelude-list@1.0.1_postcss@8.5.19/node_modules/@csstools/postcss-container-rule-prelude-list/dist/index.mjs
|
|
51000
50903
|
const t$12 = /^container$/i;
|
|
51001
50904
|
const creator$46 = (o) => {
|
|
51002
50905
|
const a = Object.assign({ preserve: !1 }, o);
|
|
@@ -51014,7 +50917,7 @@ const creator$46 = (o) => {
|
|
|
51014
50917
|
};
|
|
51015
50918
|
creator$46.postcss = !0;
|
|
51016
50919
|
//#endregion
|
|
51017
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-content-alt-text@3.0.2_postcss@8.5.
|
|
50920
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-content-alt-text@3.0.2_postcss@8.5.19/node_modules/@csstools/postcss-content-alt-text/dist/index.mjs
|
|
51018
50921
|
function transform$3(s, t) {
|
|
51019
50922
|
const e = s[0];
|
|
51020
50923
|
if (!e.length) return "";
|
|
@@ -51060,7 +50963,7 @@ const creator$45 = (t) => {
|
|
|
51060
50963
|
};
|
|
51061
50964
|
creator$45.postcss = !0;
|
|
51062
50965
|
//#endregion
|
|
51063
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-contrast-color-function@3.0.6_postcss@8.5.
|
|
50966
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-contrast-color-function@3.0.6_postcss@8.5.19/node_modules/@csstools/postcss-contrast-color-function/dist/index.mjs
|
|
51064
50967
|
const u$6 = /\bcontrast-color\(/i;
|
|
51065
50968
|
const m$4 = /^contrast-color$/i;
|
|
51066
50969
|
const basePlugin$9 = (s) => ({
|
|
@@ -52996,7 +52899,7 @@ var b;
|
|
|
52996
52899
|
e.All = "all", e.Print = "print", e.Screen = "screen", e.Tty = "tty", e.Tv = "tv", e.Projection = "projection", e.Handheld = "handheld", e.Braille = "braille", e.Embossed = "embossed", e.Aural = "aural", e.Speech = "speech";
|
|
52997
52900
|
})(b || (b = {}));
|
|
52998
52901
|
//#endregion
|
|
52999
|
-
//#region ../../node_modules/.pnpm/postcss-custom-media@12.0.1_postcss@8.5.
|
|
52902
|
+
//#region ../../node_modules/.pnpm/postcss-custom-media@12.0.1_postcss@8.5.19/node_modules/postcss-custom-media/dist/index.mjs
|
|
53000
52903
|
const C$2 = parse$1("csstools-implicit-layer")[0];
|
|
53001
52904
|
function collectCascadeLayerOrder$2(t) {
|
|
53002
52905
|
const n = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = [];
|
|
@@ -53424,7 +53327,7 @@ const creator$44 = (e) => {
|
|
|
53424
53327
|
};
|
|
53425
53328
|
creator$44.postcss = !0;
|
|
53426
53329
|
//#endregion
|
|
53427
|
-
//#region ../../node_modules/.pnpm/postcss-custom-properties@15.0.1_postcss@8.5.
|
|
53330
|
+
//#region ../../node_modules/.pnpm/postcss-custom-properties@15.0.1_postcss@8.5.19/node_modules/postcss-custom-properties/dist/index.mjs
|
|
53428
53331
|
const o$21 = parse$1("csstools-implicit-layer")[0];
|
|
53429
53332
|
function collectCascadeLayerOrder$1(r) {
|
|
53430
53333
|
const n = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), a = [];
|
|
@@ -53743,7 +53646,7 @@ const creator$43 = (e) => {
|
|
|
53743
53646
|
};
|
|
53744
53647
|
creator$43.postcss = !0;
|
|
53745
53648
|
//#endregion
|
|
53746
|
-
//#region ../../node_modules/.pnpm/postcss-custom-selectors@9.0.1_postcss@8.5.
|
|
53649
|
+
//#region ../../node_modules/.pnpm/postcss-custom-selectors@9.0.1_postcss@8.5.19/node_modules/postcss-custom-selectors/dist/index.mjs
|
|
53747
53650
|
const s$11 = parse$1("csstools-implicit-layer")[0];
|
|
53748
53651
|
function collectCascadeLayerOrder(e) {
|
|
53749
53652
|
const o = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), a = [];
|
|
@@ -53879,7 +53782,7 @@ const creator$42 = (e) => {
|
|
|
53879
53782
|
};
|
|
53880
53783
|
creator$42.postcss = !0;
|
|
53881
53784
|
//#endregion
|
|
53882
|
-
//#region ../../node_modules/.pnpm/postcss-dir-pseudo-class@10.0.0_postcss@8.5.
|
|
53785
|
+
//#region ../../node_modules/.pnpm/postcss-dir-pseudo-class@10.0.0_postcss@8.5.19/node_modules/postcss-dir-pseudo-class/dist/index.mjs
|
|
53883
53786
|
const creator$41 = (t) => {
|
|
53884
53787
|
const r = Object.assign({
|
|
53885
53788
|
dir: null,
|
|
@@ -53950,7 +53853,7 @@ const creator$41 = (t) => {
|
|
|
53950
53853
|
};
|
|
53951
53854
|
creator$41.postcss = !0;
|
|
53952
53855
|
//#endregion
|
|
53953
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-normalize-display-values@5.0.1_postcss@8.5.
|
|
53856
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-normalize-display-values@5.0.1_postcss@8.5.19/node_modules/@csstools/postcss-normalize-display-values/dist/index.mjs
|
|
53954
53857
|
var l$5 = /* @__PURE__ */ new Map([
|
|
53955
53858
|
["flow", "block"],
|
|
53956
53859
|
["block,flow", "block"],
|
|
@@ -54020,7 +53923,7 @@ const creator$40 = (i) => {
|
|
|
54020
53923
|
};
|
|
54021
53924
|
creator$40.postcss = !0;
|
|
54022
53925
|
//#endregion
|
|
54023
|
-
//#region ../../node_modules/.pnpm/postcss-double-position-gradients@7.0.2_postcss@8.5.
|
|
53926
|
+
//#region ../../node_modules/.pnpm/postcss-double-position-gradients@7.0.2_postcss@8.5.19/node_modules/postcss-double-position-gradients/dist/index.mjs
|
|
54024
53927
|
const o$19 = /(?:repeating-)?(?:conic|linear|radial)-gradient\(/i;
|
|
54025
53928
|
const i$5 = /^(?:repeating-)?(?:conic|linear|radial)-gradient$/i;
|
|
54026
53929
|
const n$7 = [
|
|
@@ -54101,7 +54004,7 @@ const postcssPlugin$9 = (t) => {
|
|
|
54101
54004
|
};
|
|
54102
54005
|
postcssPlugin$9.postcss = !0;
|
|
54103
54006
|
//#endregion
|
|
54104
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-exponential-functions@3.0.3_postcss@8.5.
|
|
54007
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-exponential-functions@3.0.3_postcss@8.5.19/node_modules/@csstools/postcss-exponential-functions/dist/index.mjs
|
|
54105
54008
|
const s$10 = /(?<![-\w])(?:exp|hypot|log|pow|sqrt)\(/i;
|
|
54106
54009
|
const creator$39 = (o) => {
|
|
54107
54010
|
const t = Object.assign({ preserve: !1 }, o);
|
|
@@ -54116,7 +54019,7 @@ const creator$39 = (o) => {
|
|
|
54116
54019
|
};
|
|
54117
54020
|
creator$39.postcss = !0;
|
|
54118
54021
|
//#endregion
|
|
54119
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-logical-float-and-clear@4.0.0_postcss@8.5.
|
|
54022
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-logical-float-and-clear@4.0.0_postcss@8.5.19/node_modules/@csstools/postcss-logical-float-and-clear/dist/index.mjs
|
|
54120
54023
|
const t$9 = "inline-start";
|
|
54121
54024
|
const o$18 = "inline-end";
|
|
54122
54025
|
var e$26;
|
|
@@ -54162,7 +54065,7 @@ const creator$38 = (n) => {
|
|
|
54162
54065
|
};
|
|
54163
54066
|
creator$38.postcss = !0;
|
|
54164
54067
|
//#endregion
|
|
54165
|
-
//#region ../../node_modules/.pnpm/postcss-focus-visible@11.0.0_postcss@8.5.
|
|
54068
|
+
//#region ../../node_modules/.pnpm/postcss-focus-visible@11.0.0_postcss@8.5.19/node_modules/postcss-focus-visible/dist/index.mjs
|
|
54166
54069
|
const s$9 = "js-focus-visible";
|
|
54167
54070
|
const o$17 = ":focus-visible";
|
|
54168
54071
|
const creator$37 = (t) => {
|
|
@@ -54218,7 +54121,7 @@ const creator$37 = (t) => {
|
|
|
54218
54121
|
};
|
|
54219
54122
|
creator$37.postcss = !0;
|
|
54220
54123
|
//#endregion
|
|
54221
|
-
//#region ../../node_modules/.pnpm/postcss-focus-within@10.0.0_postcss@8.5.
|
|
54124
|
+
//#region ../../node_modules/.pnpm/postcss-focus-within@10.0.0_postcss@8.5.19/node_modules/postcss-focus-within/dist/index.mjs
|
|
54222
54125
|
const s$8 = [
|
|
54223
54126
|
" ",
|
|
54224
54127
|
">",
|
|
@@ -54295,7 +54198,7 @@ const creator$36 = (s) => {
|
|
|
54295
54198
|
};
|
|
54296
54199
|
creator$36.postcss = !0;
|
|
54297
54200
|
//#endregion
|
|
54298
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-font-format-keywords@5.0.0_postcss@8.5.
|
|
54201
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-font-format-keywords@5.0.0_postcss@8.5.19/node_modules/@csstools/postcss-font-format-keywords/dist/index.mjs
|
|
54299
54202
|
const t$7 = [
|
|
54300
54203
|
"woff",
|
|
54301
54204
|
"truetype",
|
|
@@ -54331,7 +54234,7 @@ const creator$35 = (r) => {
|
|
|
54331
54234
|
};
|
|
54332
54235
|
creator$35.postcss = !0;
|
|
54333
54236
|
//#endregion
|
|
54334
|
-
//#region ../../node_modules/.pnpm/postcss-font-variant@5.0.0_postcss@8.5.
|
|
54237
|
+
//#region ../../node_modules/.pnpm/postcss-font-variant@5.0.0_postcss@8.5.19/node_modules/postcss-font-variant/index.js
|
|
54335
54238
|
var require_postcss_font_variant = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
|
|
54336
54239
|
/**
|
|
54337
54240
|
* font variant convertion map
|
|
@@ -54426,7 +54329,7 @@ var require_postcss_font_variant = /* @__PURE__ */ require_rolldown_runtime.__co
|
|
|
54426
54329
|
module.exports.postcss = true;
|
|
54427
54330
|
}));
|
|
54428
54331
|
//#endregion
|
|
54429
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-font-width-property@1.0.0_postcss@8.5.
|
|
54332
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-font-width-property@1.0.0_postcss@8.5.19/node_modules/@csstools/postcss-font-width-property/dist/index.mjs
|
|
54430
54333
|
var import_postcss_font_variant = /* @__PURE__ */ require_rolldown_runtime.__toESM(require_postcss_font_variant(), 1);
|
|
54431
54334
|
const e$22 = /^font-width$/i;
|
|
54432
54335
|
const o$16 = /\bfont-width\b/i;
|
|
@@ -54448,7 +54351,7 @@ function hasFallback(t) {
|
|
|
54448
54351
|
}
|
|
54449
54352
|
creator$34.postcss = !0;
|
|
54450
54353
|
//#endregion
|
|
54451
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-gamut-mapping@3.0.6_postcss@8.5.
|
|
54354
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-gamut-mapping@3.0.6_postcss@8.5.19/node_modules/@csstools/postcss-gamut-mapping/dist/index.mjs
|
|
54452
54355
|
const p = /\bcolor-gamut\b/i;
|
|
54453
54356
|
function hasConditionalAncestor(e) {
|
|
54454
54357
|
let o = e.parent;
|
|
@@ -54545,7 +54448,7 @@ const creator$33 = () => ({
|
|
|
54545
54448
|
});
|
|
54546
54449
|
creator$33.postcss = !0;
|
|
54547
54450
|
//#endregion
|
|
54548
|
-
//#region ../../node_modules/.pnpm/postcss-gap-properties@7.0.0_postcss@8.5.
|
|
54451
|
+
//#region ../../node_modules/.pnpm/postcss-gap-properties@7.0.0_postcss@8.5.19/node_modules/postcss-gap-properties/dist/index.mjs
|
|
54549
54452
|
const e$21 = [
|
|
54550
54453
|
"column-gap",
|
|
54551
54454
|
"gap",
|
|
@@ -54565,7 +54468,7 @@ const creator$32 = (o) => {
|
|
|
54565
54468
|
};
|
|
54566
54469
|
creator$32.postcss = !0;
|
|
54567
54470
|
//#endregion
|
|
54568
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-gradients-interpolation-method@6.0.6_postcss@8.5.
|
|
54471
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-gradients-interpolation-method@6.0.6_postcss@8.5.19/node_modules/@csstools/postcss-gradients-interpolation-method/dist/index.mjs
|
|
54569
54472
|
const x = /(?:repeating-)?(?:linear|radial|conic)-gradient\(/i;
|
|
54570
54473
|
const W = /\bin\b/i;
|
|
54571
54474
|
const P$1 = { test: (o) => x.test(o) && W.test(o) };
|
|
@@ -54860,7 +54763,7 @@ const postcssPlugin$8 = (e) => {
|
|
|
54860
54763
|
};
|
|
54861
54764
|
postcssPlugin$8.postcss = !0;
|
|
54862
54765
|
//#endregion
|
|
54863
|
-
//#region ../../node_modules/.pnpm/css-has-pseudo@8.0.0_postcss@8.5.
|
|
54766
|
+
//#region ../../node_modules/.pnpm/css-has-pseudo@8.0.0_postcss@8.5.19/node_modules/css-has-pseudo/dist/index.mjs
|
|
54864
54767
|
function encodeCSS(e) {
|
|
54865
54768
|
if ("" === e) return "";
|
|
54866
54769
|
let t, s = "";
|
|
@@ -54971,7 +54874,7 @@ function isWithinSupportCheck(e) {
|
|
|
54971
54874
|
}
|
|
54972
54875
|
creator$31.postcss = !0;
|
|
54973
54876
|
//#endregion
|
|
54974
|
-
//#region ../../node_modules/.pnpm/postcss-color-hex-alpha@11.0.0_postcss@8.5.
|
|
54877
|
+
//#region ../../node_modules/.pnpm/postcss-color-hex-alpha@11.0.0_postcss@8.5.19/node_modules/postcss-color-hex-alpha/dist/index.mjs
|
|
54975
54878
|
const creator$30 = (a) => {
|
|
54976
54879
|
const o = Object.assign({ preserve: !1 }, a);
|
|
54977
54880
|
return {
|
|
@@ -55004,7 +54907,7 @@ function hexa2rgba(e) {
|
|
|
55004
54907
|
e.value = `rgba(${r},${l},${n},${c})`;
|
|
55005
54908
|
}
|
|
55006
54909
|
//#endregion
|
|
55007
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-hwb-function@5.0.6_postcss@8.5.
|
|
54910
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-hwb-function@5.0.6_postcss@8.5.19/node_modules/@csstools/postcss-hwb-function/dist/index.mjs
|
|
55008
54911
|
const u$3 = /\bhwb\(/i;
|
|
55009
54912
|
const m$2 = /^hwb$/i;
|
|
55010
54913
|
const basePlugin$6 = (s) => ({
|
|
@@ -55035,7 +54938,7 @@ const postcssPlugin$7 = (o) => {
|
|
|
55035
54938
|
};
|
|
55036
54939
|
postcssPlugin$7.postcss = !0;
|
|
55037
54940
|
//#endregion
|
|
55038
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-ic-unit@5.0.2_postcss@8.5.
|
|
54941
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-ic-unit@5.0.2_postcss@8.5.19/node_modules/@csstools/postcss-ic-unit/dist/index.mjs
|
|
55039
54942
|
const o$14 = /ic\b/i;
|
|
55040
54943
|
const i$4 = /\(font-size: \d+ic\)/i;
|
|
55041
54944
|
const basePlugin$5 = (s) => ({
|
|
@@ -55067,7 +54970,7 @@ const postcssPlugin$6 = (e) => {
|
|
|
55067
54970
|
};
|
|
55068
54971
|
postcssPlugin$6.postcss = !0;
|
|
55069
54972
|
//#endregion
|
|
55070
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-image-function@1.0.1_postcss@8.5.
|
|
54973
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-image-function@1.0.1_postcss@8.5.19/node_modules/@csstools/postcss-image-function/dist/index.mjs
|
|
55071
54974
|
const u$2 = /\bimage\(/i;
|
|
55072
54975
|
const g$3 = /^image$/i;
|
|
55073
54976
|
const basePlugin$4 = (e) => ({
|
|
@@ -55112,7 +55015,7 @@ const postcssPlugin$5 = (s) => {
|
|
|
55112
55015
|
};
|
|
55113
55016
|
postcssPlugin$5.postcss = !0;
|
|
55114
55017
|
//#endregion
|
|
55115
|
-
//#region ../../node_modules/.pnpm/postcss-image-set-function@8.0.0_postcss@8.5.
|
|
55018
|
+
//#region ../../node_modules/.pnpm/postcss-image-set-function@8.0.0_postcss@8.5.19/node_modules/postcss-image-set-function/dist/index.mjs
|
|
55116
55019
|
function isComma$1(e) {
|
|
55117
55020
|
return !!e && "div" === e.type && "," === e.value;
|
|
55118
55021
|
}
|
|
@@ -58301,7 +58204,7 @@ function selectorNodeContainsNothingOrOnlyUniversal(e) {
|
|
|
58301
58204
|
return 0 === t.length || 1 === t.length && "universal" === t[0].type;
|
|
58302
58205
|
}
|
|
58303
58206
|
//#endregion
|
|
58304
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-is-pseudo-class@6.0.0_postcss@8.5.
|
|
58207
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-is-pseudo-class@6.0.0_postcss@8.5.19/node_modules/@csstools/postcss-is-pseudo-class/dist/index.mjs
|
|
58305
58208
|
function alwaysValidSelector(s) {
|
|
58306
58209
|
const o = (0, import_dist.default)().astSync(s);
|
|
58307
58210
|
let n = !0;
|
|
@@ -58571,7 +58474,7 @@ const creator$28 = (e) => {
|
|
|
58571
58474
|
};
|
|
58572
58475
|
creator$28.postcss = !0;
|
|
58573
58476
|
//#endregion
|
|
58574
|
-
//#region ../../node_modules/.pnpm/postcss-lab-function@8.0.6_postcss@8.5.
|
|
58477
|
+
//#region ../../node_modules/.pnpm/postcss-lab-function@8.0.6_postcss@8.5.19/node_modules/postcss-lab-function/dist/index.mjs
|
|
58575
58478
|
const g$2 = /\b(?:lab|lch)\(/i;
|
|
58576
58479
|
const f$2 = /^(?:lab|lch)$/i;
|
|
58577
58480
|
const basePlugin$3 = (s) => ({
|
|
@@ -58609,7 +58512,7 @@ const postcssPlugin$4 = (e) => {
|
|
|
58609
58512
|
};
|
|
58610
58513
|
postcssPlugin$4.postcss = !0;
|
|
58611
58514
|
//#endregion
|
|
58612
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-light-dark-function@3.0.2_postcss@8.5.
|
|
58515
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-light-dark-function@3.0.2_postcss@8.5.19/node_modules/@csstools/postcss-light-dark-function/dist/index.mjs
|
|
58613
58516
|
const k$1 = "--csstools-color-scheme--light";
|
|
58614
58517
|
const D = "initial";
|
|
58615
58518
|
function toggleNameGenerator(e) {
|
|
@@ -58810,7 +58713,7 @@ const postcssPlugin$3 = (r) => {
|
|
|
58810
58713
|
};
|
|
58811
58714
|
postcssPlugin$3.postcss = !0;
|
|
58812
58715
|
//#endregion
|
|
58813
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-logical-overflow@3.0.0_postcss@8.5.
|
|
58716
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-logical-overflow@3.0.0_postcss@8.5.19/node_modules/@csstools/postcss-logical-overflow/dist/index.mjs
|
|
58814
58717
|
var o$11;
|
|
58815
58718
|
function transformAxes$1(o, t) {
|
|
58816
58719
|
const e = t ? "-x" : "-y", i = t ? "-y" : "-x", n = o.prop.toLowerCase().replace("-inline", e).replace("-block", i), s = o.value;
|
|
@@ -58842,7 +58745,7 @@ const creator$27 = (t) => {
|
|
|
58842
58745
|
};
|
|
58843
58746
|
creator$27.postcss = !0;
|
|
58844
58747
|
//#endregion
|
|
58845
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-logical-overscroll-behavior@3.0.0_postcss@8.5.
|
|
58748
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-logical-overscroll-behavior@3.0.0_postcss@8.5.19/node_modules/@csstools/postcss-logical-overscroll-behavior/dist/index.mjs
|
|
58846
58749
|
var o$10;
|
|
58847
58750
|
function transformAxes(o, t) {
|
|
58848
58751
|
const e = t ? "-x" : "-y", i = t ? "-y" : "-x", r = o.prop.toLowerCase().replace("-inline", e).replace("-block", i), s = o.value;
|
|
@@ -58874,7 +58777,7 @@ const creator$26 = (t) => {
|
|
|
58874
58777
|
};
|
|
58875
58778
|
creator$26.postcss = !0;
|
|
58876
58779
|
//#endregion
|
|
58877
|
-
//#region ../../node_modules/.pnpm/postcss-logical@9.0.0_postcss@8.5.
|
|
58780
|
+
//#region ../../node_modules/.pnpm/postcss-logical@9.0.0_postcss@8.5.19/node_modules/postcss-logical/dist/index.mjs
|
|
58878
58781
|
var e$14;
|
|
58879
58782
|
var n$2;
|
|
58880
58783
|
(function(r) {
|
|
@@ -59237,7 +59140,7 @@ const creator$25 = (r) => {
|
|
|
59237
59140
|
};
|
|
59238
59141
|
creator$25.postcss = !0;
|
|
59239
59142
|
//#endregion
|
|
59240
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-logical-resize@4.0.0_postcss@8.5.
|
|
59143
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-logical-resize@4.0.0_postcss@8.5.19/node_modules/@csstools/postcss-logical-resize/dist/index.mjs
|
|
59241
59144
|
var t$3;
|
|
59242
59145
|
var e$13;
|
|
59243
59146
|
var i$1;
|
|
@@ -59312,7 +59215,7 @@ const creator$24 = (o) => {
|
|
|
59312
59215
|
};
|
|
59313
59216
|
creator$24.postcss = !0;
|
|
59314
59217
|
//#endregion
|
|
59315
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-logical-viewport-units@4.0.0_postcss@8.5.
|
|
59218
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-logical-viewport-units@4.0.0_postcss@8.5.19/node_modules/@csstools/postcss-logical-viewport-units/dist/index.mjs
|
|
59316
59219
|
var s$6;
|
|
59317
59220
|
function transform$1(t, o) {
|
|
59318
59221
|
const s = tokenizer({ css: t }), c = [];
|
|
@@ -59384,7 +59287,7 @@ const creator$23 = (e) => {
|
|
|
59384
59287
|
};
|
|
59385
59288
|
creator$23.postcss = !0;
|
|
59386
59289
|
//#endregion
|
|
59387
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-media-queries-aspect-ratio-number-values@4.0.0_postcss@8.5.
|
|
59290
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-media-queries-aspect-ratio-number-values@4.0.0_postcss@8.5.19/node_modules/@csstools/postcss-media-queries-aspect-ratio-number-values/dist/index.mjs
|
|
59388
59291
|
const w = 1e5;
|
|
59389
59292
|
const h$1 = 2147483647;
|
|
59390
59293
|
function transformMediaFeatureValue(t) {
|
|
@@ -59676,7 +59579,7 @@ const creator$22 = (e) => {
|
|
|
59676
59579
|
};
|
|
59677
59580
|
creator$22.postcss = !0;
|
|
59678
59581
|
//#endregion
|
|
59679
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-media-minmax@3.0.3_postcss@8.5.
|
|
59582
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-media-minmax@3.0.3_postcss@8.5.19/node_modules/@csstools/postcss-media-minmax/dist/index.mjs
|
|
59680
59583
|
const C = {
|
|
59681
59584
|
width: "px",
|
|
59682
59585
|
height: "px",
|
|
@@ -60062,7 +59965,7 @@ const creator$21 = () => ({
|
|
|
60062
59965
|
});
|
|
60063
59966
|
creator$21.postcss = !0;
|
|
60064
59967
|
//#endregion
|
|
60065
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-mixins@1.0.0_postcss@8.5.
|
|
59968
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-mixins@1.0.0_postcss@8.5.19/node_modules/@csstools/postcss-mixins/dist/index.mjs
|
|
60066
59969
|
const o$7 = /^apply$/i;
|
|
60067
59970
|
function processableApplyRule(o) {
|
|
60068
59971
|
if (!o.params || !o.params.includes("--")) return !1;
|
|
@@ -60120,7 +60023,7 @@ const creator$20 = (e) => {
|
|
|
60120
60023
|
};
|
|
60121
60024
|
creator$20.postcss = !0;
|
|
60122
60025
|
//#endregion
|
|
60123
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-nested-calc@5.0.0_postcss@8.5.
|
|
60026
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-nested-calc@5.0.0_postcss@8.5.19/node_modules/@csstools/postcss-nested-calc/dist/index.mjs
|
|
60124
60027
|
const r$4 = /calc\(/gi;
|
|
60125
60028
|
const creator$19 = (s) => {
|
|
60126
60029
|
const o = Object.assign({ preserve: !0 }, s);
|
|
@@ -60252,7 +60155,7 @@ function isCompoundSelector$1(o) {
|
|
|
60252
60155
|
return 1 === o.length && !o[0].nodes.some((o) => "combinator" === o.type || import_dist$1.default.isPseudoElement(o));
|
|
60253
60156
|
}
|
|
60254
60157
|
//#endregion
|
|
60255
|
-
//#region ../../node_modules/.pnpm/postcss-nesting@14.0.0_postcss@8.5.
|
|
60158
|
+
//#region ../../node_modules/.pnpm/postcss-nesting@14.0.0_postcss@8.5.19/node_modules/postcss-nesting/dist/index.mjs
|
|
60256
60159
|
const r$3 = import_dist$1.default.pseudo({ value: ":is" });
|
|
60257
60160
|
function sortCompoundSelectorsInsideComplexSelector(t) {
|
|
60258
60161
|
if (!t || !t.nodes) return;
|
|
@@ -60627,7 +60530,7 @@ const creator$18 = (e) => {
|
|
|
60627
60530
|
};
|
|
60628
60531
|
creator$18.postcss = !0;
|
|
60629
60532
|
//#endregion
|
|
60630
|
-
//#region ../../node_modules/.pnpm/postcss-selector-not@9.0.0_postcss@8.5.
|
|
60533
|
+
//#region ../../node_modules/.pnpm/postcss-selector-not@9.0.0_postcss@8.5.19/node_modules/postcss-selector-not/dist/index.mjs
|
|
60631
60534
|
function cleanupWhitespace(e) {
|
|
60632
60535
|
e.spaces && (e.spaces.after = "", e.spaces.before = ""), e.nodes && e.nodes.length > 0 && (e.nodes[0] && e.nodes[0].spaces && (e.nodes[0].spaces.before = ""), e.nodes[e.nodes.length - 1] && e.nodes[e.nodes.length - 1].spaces && (e.nodes[e.nodes.length - 1].spaces.after = ""));
|
|
60633
60536
|
}
|
|
@@ -60658,7 +60561,7 @@ const creator$17 = () => ({
|
|
|
60658
60561
|
});
|
|
60659
60562
|
creator$17.postcss = !0;
|
|
60660
60563
|
//#endregion
|
|
60661
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-oklab-function@5.0.6_postcss@8.5.
|
|
60564
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-oklab-function@5.0.6_postcss@8.5.19/node_modules/@csstools/postcss-oklab-function/dist/index.mjs
|
|
60662
60565
|
const g$1 = /\b(?:oklab|oklch)\(/i;
|
|
60663
60566
|
const f$1 = /^(?:oklab|oklch)$/i;
|
|
60664
60567
|
const basePlugin$1 = (s) => ({
|
|
@@ -60696,7 +60599,7 @@ const postcssPlugin$2 = (e) => {
|
|
|
60696
60599
|
};
|
|
60697
60600
|
postcssPlugin$2.postcss = !0;
|
|
60698
60601
|
//#endregion
|
|
60699
|
-
//#region ../../node_modules/.pnpm/postcss-opacity-percentage@3.0.0_postcss@8.5.
|
|
60602
|
+
//#region ../../node_modules/.pnpm/postcss-opacity-percentage@3.0.0_postcss@8.5.19/node_modules/postcss-opacity-percentage/index.js
|
|
60700
60603
|
var require_postcss_opacity_percentage = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
|
|
60701
60604
|
const doNothingValues = /* @__PURE__ */ new Set([
|
|
60702
60605
|
"inherit",
|
|
@@ -60718,7 +60621,7 @@ var require_postcss_opacity_percentage = /* @__PURE__ */ require_rolldown_runtim
|
|
|
60718
60621
|
module.exports.postcss = true;
|
|
60719
60622
|
}));
|
|
60720
60623
|
//#endregion
|
|
60721
|
-
//#region ../../node_modules/.pnpm/postcss-overflow-shorthand@7.0.0_postcss@8.5.
|
|
60624
|
+
//#region ../../node_modules/.pnpm/postcss-overflow-shorthand@7.0.0_postcss@8.5.19/node_modules/postcss-overflow-shorthand/dist/index.mjs
|
|
60722
60625
|
var import_postcss_opacity_percentage = /* @__PURE__ */ require_rolldown_runtime.__toESM(require_postcss_opacity_percentage(), 1);
|
|
60723
60626
|
const creator$16 = (o) => {
|
|
60724
60627
|
const r = Object.assign({ preserve: !0 }, o);
|
|
@@ -60748,7 +60651,7 @@ const creator$16 = (o) => {
|
|
|
60748
60651
|
};
|
|
60749
60652
|
creator$16.postcss = !0;
|
|
60750
60653
|
//#endregion
|
|
60751
|
-
//#region ../../node_modules/.pnpm/postcss-replace-overflow-wrap@4.0.0_postcss@8.5.
|
|
60654
|
+
//#region ../../node_modules/.pnpm/postcss-replace-overflow-wrap@4.0.0_postcss@8.5.19/node_modules/postcss-replace-overflow-wrap/index.js
|
|
60752
60655
|
var require_postcss_replace_overflow_wrap = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
|
|
60753
60656
|
module.exports = function(opts) {
|
|
60754
60657
|
opts = opts || {};
|
|
@@ -60764,7 +60667,7 @@ var require_postcss_replace_overflow_wrap = /* @__PURE__ */ require_rolldown_run
|
|
|
60764
60667
|
module.exports.postcss = true;
|
|
60765
60668
|
}));
|
|
60766
60669
|
//#endregion
|
|
60767
|
-
//#region ../../node_modules/.pnpm/postcss-place@11.0.0_postcss@8.5.
|
|
60670
|
+
//#region ../../node_modules/.pnpm/postcss-place@11.0.0_postcss@8.5.19/node_modules/postcss-place/dist/index.mjs
|
|
60768
60671
|
var import_postcss_replace_overflow_wrap = /* @__PURE__ */ require_rolldown_runtime.__toESM(require_postcss_replace_overflow_wrap(), 1);
|
|
60769
60672
|
function onCSSDeclaration(o, r, s) {
|
|
60770
60673
|
const n = o.prop.match(t$2)?.[1].toLowerCase();
|
|
@@ -60797,7 +60700,7 @@ const creator$15 = (e) => {
|
|
|
60797
60700
|
};
|
|
60798
60701
|
creator$15.postcss = !0;
|
|
60799
60702
|
//#endregion
|
|
60800
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-position-area-property@2.0.0_postcss@8.5.
|
|
60703
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-position-area-property@2.0.0_postcss@8.5.19/node_modules/@csstools/postcss-position-area-property/dist/index.mjs
|
|
60801
60704
|
const o$4 = /^position-area$/i;
|
|
60802
60705
|
const creator$14 = () => ({
|
|
60803
60706
|
postcssPlugin: "postcss-position-area-property",
|
|
@@ -60810,7 +60713,7 @@ const creator$14 = () => ({
|
|
|
60810
60713
|
});
|
|
60811
60714
|
creator$14.postcss = !0;
|
|
60812
60715
|
//#endregion
|
|
60813
|
-
//#region ../../node_modules/.pnpm/css-prefers-color-scheme@11.0.0_postcss@8.5.
|
|
60716
|
+
//#region ../../node_modules/.pnpm/css-prefers-color-scheme@11.0.0_postcss@8.5.19/node_modules/css-prefers-color-scheme/dist/index.mjs
|
|
60814
60717
|
const e$6 = /\(\s*prefers-color-scheme\s*:\s*(dark|light)\s*\)/gi;
|
|
60815
60718
|
const s$4 = "(color: 48842621)";
|
|
60816
60719
|
const r$2 = "(color: 70318723)";
|
|
@@ -60834,7 +60737,7 @@ const creator$13 = (o) => {
|
|
|
60834
60737
|
};
|
|
60835
60738
|
creator$13.postcss = !0;
|
|
60836
60739
|
//#endregion
|
|
60837
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-property-rule-prelude-list@2.0.0_postcss@8.5.
|
|
60740
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-property-rule-prelude-list@2.0.0_postcss@8.5.19/node_modules/@csstools/postcss-property-rule-prelude-list/dist/index.mjs
|
|
60838
60741
|
const o$3 = /^property$/i;
|
|
60839
60742
|
const creator$12 = () => ({
|
|
60840
60743
|
postcssPlugin: "postcss-property-rule-prelude-list",
|
|
@@ -60849,7 +60752,7 @@ const creator$12 = () => ({
|
|
|
60849
60752
|
});
|
|
60850
60753
|
creator$12.postcss = !0;
|
|
60851
60754
|
//#endregion
|
|
60852
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-random-function@3.0.3_postcss@8.5.
|
|
60755
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-random-function@3.0.3_postcss@8.5.19/node_modules/@csstools/postcss-random-function/dist/index.mjs
|
|
60853
60756
|
const o$2 = String.fromCodePoint(0);
|
|
60854
60757
|
function randomCacheKeyFromPostcssDeclaration(e) {
|
|
60855
60758
|
let r = "", t = e.parent;
|
|
@@ -60887,7 +60790,7 @@ const creator$11 = (o) => {
|
|
|
60887
60790
|
};
|
|
60888
60791
|
creator$11.postcss = !0;
|
|
60889
60792
|
//#endregion
|
|
60890
|
-
//#region ../../node_modules/.pnpm/postcss-color-rebeccapurple@11.0.0_postcss@8.5.
|
|
60793
|
+
//#region ../../node_modules/.pnpm/postcss-color-rebeccapurple@11.0.0_postcss@8.5.19/node_modules/postcss-color-rebeccapurple/dist/index.mjs
|
|
60891
60794
|
const s$3 = /rebeccapurple/i;
|
|
60892
60795
|
const t$1 = /^rebeccapurple$/i;
|
|
60893
60796
|
const creator$10 = (o) => {
|
|
@@ -60908,7 +60811,7 @@ const creator$10 = (o) => {
|
|
|
60908
60811
|
};
|
|
60909
60812
|
creator$10.postcss = !0;
|
|
60910
60813
|
//#endregion
|
|
60911
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-relative-color-syntax@4.0.6_postcss@8.5.
|
|
60814
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-relative-color-syntax@4.0.6_postcss@8.5.19/node_modules/@csstools/postcss-relative-color-syntax/dist/index.mjs
|
|
60912
60815
|
const g = /\b(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklch|oklab|color)\(/i;
|
|
60913
60816
|
const h = /\b(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklch|oklab|color)\(\s*from/i;
|
|
60914
60817
|
const m$1 = /^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklch|oklab|color)$/i;
|
|
@@ -60948,7 +60851,7 @@ const postcssPlugin$1 = (e) => {
|
|
|
60948
60851
|
};
|
|
60949
60852
|
postcssPlugin$1.postcss = !0;
|
|
60950
60853
|
//#endregion
|
|
60951
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-scope-pseudo-class@5.0.0_postcss@8.5.
|
|
60854
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-scope-pseudo-class@5.0.0_postcss@8.5.19/node_modules/@csstools/postcss-scope-pseudo-class/dist/index.mjs
|
|
60952
60855
|
const creator$9 = (s) => {
|
|
60953
60856
|
const r = Object.assign({ preserve: !1 }, s);
|
|
60954
60857
|
return {
|
|
@@ -60986,7 +60889,7 @@ const creator$9 = (s) => {
|
|
|
60986
60889
|
};
|
|
60987
60890
|
creator$9.postcss = !0;
|
|
60988
60891
|
//#endregion
|
|
60989
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-sign-functions@2.0.3_postcss@8.5.
|
|
60892
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-sign-functions@2.0.3_postcss@8.5.19/node_modules/@csstools/postcss-sign-functions/dist/index.mjs
|
|
60990
60893
|
const m = /(?<![-\w])(?:sign|abs)\(/i;
|
|
60991
60894
|
const f = /(?<![-\w])(?:sign|abs)\(/i;
|
|
60992
60895
|
const creator$8 = (o) => {
|
|
@@ -61098,7 +61001,7 @@ function replacer(e) {
|
|
|
61098
61001
|
}
|
|
61099
61002
|
creator$8.postcss = !0;
|
|
61100
61003
|
//#endregion
|
|
61101
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-stepped-value-functions@5.0.3_postcss@8.5.
|
|
61004
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-stepped-value-functions@5.0.3_postcss@8.5.19/node_modules/@csstools/postcss-stepped-value-functions/dist/index.mjs
|
|
61102
61005
|
const s$2 = /(?<![-\w])(?:mod|rem|round)\(/i;
|
|
61103
61006
|
const creator$7 = (o) => {
|
|
61104
61007
|
const t = Object.assign({ preserve: !1 }, o);
|
|
@@ -61116,7 +61019,7 @@ const creator$7 = (o) => {
|
|
|
61116
61019
|
};
|
|
61117
61020
|
creator$7.postcss = !0;
|
|
61118
61021
|
//#endregion
|
|
61119
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-syntax-descriptor-syntax-production@2.0.0_postcss@8.5.
|
|
61022
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-syntax-descriptor-syntax-production@2.0.0_postcss@8.5.19/node_modules/@csstools/postcss-syntax-descriptor-syntax-production/dist/index.mjs
|
|
61120
61023
|
const o$1 = /^property$/i;
|
|
61121
61024
|
const n$1 = /^syntax$/i;
|
|
61122
61025
|
const creator$6 = (i) => {
|
|
@@ -61189,7 +61092,7 @@ const creator$6 = (i) => {
|
|
|
61189
61092
|
};
|
|
61190
61093
|
creator$6.postcss = !0;
|
|
61191
61094
|
//#endregion
|
|
61192
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-system-ui-font-family@2.0.0_postcss@8.5.
|
|
61095
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-system-ui-font-family@2.0.0_postcss@8.5.19/node_modules/@csstools/postcss-system-ui-font-family/dist/index.mjs
|
|
61193
61096
|
const a = /^font(?:-family)?$/i;
|
|
61194
61097
|
const c$2 = [
|
|
61195
61098
|
"system-ui",
|
|
@@ -61245,7 +61148,7 @@ const creator$5 = (p) => {
|
|
|
61245
61148
|
};
|
|
61246
61149
|
creator$5.postcss = !0;
|
|
61247
61150
|
//#endregion
|
|
61248
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-text-decoration-shorthand@5.0.4_postcss@8.5.
|
|
61151
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-text-decoration-shorthand@5.0.4_postcss@8.5.19/node_modules/@csstools/postcss-text-decoration-shorthand/dist/index.mjs
|
|
61249
61152
|
const o = /^text-decoration$/i;
|
|
61250
61153
|
const creator$4 = (t) => {
|
|
61251
61154
|
const c = Object.assign({ preserve: !0 }, t);
|
|
@@ -61462,7 +61365,7 @@ function genericNodeParts() {
|
|
|
61462
61365
|
};
|
|
61463
61366
|
}
|
|
61464
61367
|
//#endregion
|
|
61465
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-trigonometric-functions@5.0.3_postcss@8.5.
|
|
61368
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-trigonometric-functions@5.0.3_postcss@8.5.19/node_modules/@csstools/postcss-trigonometric-functions/dist/index.mjs
|
|
61466
61369
|
const e$2 = /(?<![-\w])(?:asin|acos|atan|atan2|sin|cos|tan)\(/i;
|
|
61467
61370
|
const creator$3 = (o) => {
|
|
61468
61371
|
const t = Object.assign({ preserve: !1 }, o);
|
|
@@ -61480,7 +61383,7 @@ const creator$3 = (o) => {
|
|
|
61480
61383
|
};
|
|
61481
61384
|
creator$3.postcss = !0;
|
|
61482
61385
|
//#endregion
|
|
61483
|
-
//#region ../../node_modules/.pnpm/@csstools+postcss-unset-value@5.0.0_postcss@8.5.
|
|
61386
|
+
//#region ../../node_modules/.pnpm/@csstools+postcss-unset-value@5.0.0_postcss@8.5.19/node_modules/@csstools/postcss-unset-value/dist/index.mjs
|
|
61484
61387
|
const e$1 = /* @__PURE__ */ new Set([
|
|
61485
61388
|
"block-ellipsis",
|
|
61486
61389
|
"border-boundary",
|
|
@@ -61920,7 +61823,7 @@ const creator$2 = (o) => {
|
|
|
61920
61823
|
};
|
|
61921
61824
|
creator$2.postcss = !0;
|
|
61922
61825
|
//#endregion
|
|
61923
|
-
//#region ../../node_modules/.pnpm/postcss-preset-env@11.3.2_postcss@8.5.
|
|
61826
|
+
//#region ../../node_modules/.pnpm/postcss-preset-env@11.3.2_postcss@8.5.19/node_modules/postcss-preset-env/dist/index.mjs
|
|
61924
61827
|
const ks = {
|
|
61925
61828
|
"blank-pseudo-class": "https://github.com/csstools/postcss-plugins/blob/main/plugins/css-blank-pseudo/README.md#browser",
|
|
61926
61829
|
"focus-visible-pseudo-class": "https://github.com/WICG/focus-visible",
|
|
@@ -62698,6 +62601,279 @@ const creator$1 = (e) => {
|
|
|
62698
62601
|
};
|
|
62699
62602
|
creator$1.postcss = !0;
|
|
62700
62603
|
//#endregion
|
|
62604
|
+
//#region src/compat/mini-program-css/prune-generated.ts
|
|
62605
|
+
const DEFAULT_WEAPP_VARIABLE_SCOPE = "page,.tw-root,wx-root-portal-content,:host";
|
|
62606
|
+
const MINI_PROGRAM_PSEUDO_CONTENT_SCOPE_SELECTOR = "::before,\n::after";
|
|
62607
|
+
const CLASS_SELECTOR_RE = /(?:^|[^\w-])\.[_a-z\u00A0-\uFFFF\\-]/i;
|
|
62608
|
+
/**
|
|
62609
|
+
* 在交给框架 PostCSS 前展开 Tailwind 生成的嵌套规则,并裁剪 Web-only 结构。
|
|
62610
|
+
*/
|
|
62611
|
+
async function normalizeMiniProgramGeneratedCssForPostcss(css, options = {}) {
|
|
62612
|
+
return pruneMiniProgramGeneratedCss((await (0, postcss.default)([creator$1({
|
|
62613
|
+
stage: false,
|
|
62614
|
+
features: { "nesting-rules": true },
|
|
62615
|
+
autoprefixer: false
|
|
62616
|
+
})]).process(css, { from: void 0 })).css, options);
|
|
62617
|
+
}
|
|
62618
|
+
function isConditionalCompilationComment(text) {
|
|
62619
|
+
return /#(?:ifn?def|endif)\b/.test(text);
|
|
62620
|
+
}
|
|
62621
|
+
function hasClassSelector$1(selector) {
|
|
62622
|
+
return CLASS_SELECTOR_RE.test(selector);
|
|
62623
|
+
}
|
|
62624
|
+
function hasClassRuleAncestor(rule) {
|
|
62625
|
+
let parent = rule.parent;
|
|
62626
|
+
while (parent) {
|
|
62627
|
+
if (parent.type === "rule" && hasClassSelector$1(parent.selector)) return true;
|
|
62628
|
+
parent = parent.parent;
|
|
62629
|
+
}
|
|
62630
|
+
return false;
|
|
62631
|
+
}
|
|
62632
|
+
function removeEmptyContentInitDeclarations(rule) {
|
|
62633
|
+
rule.walkDecls((decl) => {
|
|
62634
|
+
if (isEmptyTwContentDeclaration(decl)) decl.remove();
|
|
62635
|
+
});
|
|
62636
|
+
}
|
|
62637
|
+
function isMiniProgramElementVariableScopeRule(rule) {
|
|
62638
|
+
const selectors = getRuleSelectors(rule);
|
|
62639
|
+
return selectors.length > 0 && selectors.every((selector) => MINI_PROGRAM_ELEMENT_SCOPE_SELECTORS.has(selector));
|
|
62640
|
+
}
|
|
62641
|
+
function isMiniProgramNativeElementRule(rule) {
|
|
62642
|
+
const selectors = getRuleSelectors(rule);
|
|
62643
|
+
return selectors.length > 0 && selectors.every((selector) => isMiniProgramNativeElementSelector(selector)) && !isMiniProgramPreflightRule(rule);
|
|
62644
|
+
}
|
|
62645
|
+
function isOnlyTwContentDeclarations(rule) {
|
|
62646
|
+
let hasDeclaration = false;
|
|
62647
|
+
let onlyContentVariable = true;
|
|
62648
|
+
rule.walkDecls((decl) => {
|
|
62649
|
+
hasDeclaration = true;
|
|
62650
|
+
if (decl.prop !== "--tw-content") onlyContentVariable = false;
|
|
62651
|
+
});
|
|
62652
|
+
return hasDeclaration && onlyContentVariable;
|
|
62653
|
+
}
|
|
62654
|
+
function isMiniProgramElementContentInitRule(rule) {
|
|
62655
|
+
if (!isMiniProgramElementVariableScopeRule(rule)) return false;
|
|
62656
|
+
let hasElementSelector = false;
|
|
62657
|
+
let hasPseudoSelector = false;
|
|
62658
|
+
for (const selector of getRuleSelectors(rule)) if (selector === "view" || selector === "text") hasElementSelector = true;
|
|
62659
|
+
else if (selector === "::before" || selector === "::after") hasPseudoSelector = true;
|
|
62660
|
+
return hasElementSelector && hasPseudoSelector && isOnlyTwContentDeclarations(rule);
|
|
62661
|
+
}
|
|
62662
|
+
function hasMiniProgramElementContentInit(root) {
|
|
62663
|
+
let found = false;
|
|
62664
|
+
root.walkRules((rule) => {
|
|
62665
|
+
if (!isMiniProgramElementVariableScopeRule(rule)) return;
|
|
62666
|
+
rule.walkDecls("--tw-content", (decl) => {
|
|
62667
|
+
if (isEmptyTwContentDeclaration(decl)) found = true;
|
|
62668
|
+
});
|
|
62669
|
+
});
|
|
62670
|
+
return found;
|
|
62671
|
+
}
|
|
62672
|
+
function ensureMiniProgramElementContentInit(root) {
|
|
62673
|
+
if (hasMiniProgramElementContentInit(root)) return;
|
|
62674
|
+
let defaultScopeRule;
|
|
62675
|
+
root.walkRules((rule) => {
|
|
62676
|
+
if (rule.selector === "view,text,::after,::before") {
|
|
62677
|
+
defaultScopeRule = rule;
|
|
62678
|
+
return false;
|
|
62679
|
+
}
|
|
62680
|
+
});
|
|
62681
|
+
const declaration = postcss.default.decl({
|
|
62682
|
+
prop: "--tw-content",
|
|
62683
|
+
value: "\"\""
|
|
62684
|
+
});
|
|
62685
|
+
if (defaultScopeRule) {
|
|
62686
|
+
defaultScopeRule.append(declaration);
|
|
62687
|
+
return;
|
|
62688
|
+
}
|
|
62689
|
+
root.prepend(postcss.default.rule({
|
|
62690
|
+
selector: MINI_PROGRAM_ELEMENT_SCOPE_SELECTOR,
|
|
62691
|
+
nodes: [declaration]
|
|
62692
|
+
}));
|
|
62693
|
+
}
|
|
62694
|
+
function isTailwindV4GradientRuntimeDeclaration(decl) {
|
|
62695
|
+
return decl.prop.startsWith("--tw-gradient-");
|
|
62696
|
+
}
|
|
62697
|
+
function moveTailwindV4GradientRuntimeDeclarations(rule) {
|
|
62698
|
+
const gradientDeclarations = [];
|
|
62699
|
+
rule.walkDecls((decl) => {
|
|
62700
|
+
if (isTailwindV4GradientRuntimeDeclaration(decl)) {
|
|
62701
|
+
gradientDeclarations.push(decl.clone());
|
|
62702
|
+
decl.remove();
|
|
62703
|
+
}
|
|
62704
|
+
});
|
|
62705
|
+
if (gradientDeclarations.length > 0) rule.before(new postcss.default.Rule({
|
|
62706
|
+
selector: MINI_PROGRAM_ELEMENT_SCOPE_SELECTOR,
|
|
62707
|
+
nodes: gradientDeclarations
|
|
62708
|
+
}));
|
|
62709
|
+
if (rule.nodes.length === 0) rule.remove();
|
|
62710
|
+
}
|
|
62711
|
+
function isKeyframesRule(rule) {
|
|
62712
|
+
let parent = rule.parent;
|
|
62713
|
+
while (parent) {
|
|
62714
|
+
if (parent.type === "atrule" && parent.name.endsWith("keyframes")) return true;
|
|
62715
|
+
parent = parent.parent;
|
|
62716
|
+
}
|
|
62717
|
+
return false;
|
|
62718
|
+
}
|
|
62719
|
+
/**
|
|
62720
|
+
* 裁剪 Tailwind 生成 CSS 中面向浏览器的 classless 规则。
|
|
62721
|
+
*/
|
|
62722
|
+
function pruneMiniProgramGeneratedCss(css, options = {}) {
|
|
62723
|
+
const root = postcss.default.parse(css);
|
|
62724
|
+
const shouldPreserveContentInit = options.preservePreflight || usesTwContentVariable(root);
|
|
62725
|
+
root.walkComments((comment) => {
|
|
62726
|
+
if (options.preserveConditionalComments && isConditionalCompilationComment(comment.text)) return;
|
|
62727
|
+
comment.remove();
|
|
62728
|
+
});
|
|
62729
|
+
removeUnsupportedCascadeLayers(root);
|
|
62730
|
+
removeSpecificityPlaceholders(root);
|
|
62731
|
+
removeUnsupportedModernColorDeclarations(root);
|
|
62732
|
+
removeTailwindContainerMaxWidthMediaRules(root);
|
|
62733
|
+
removeTailwindContainerWidthRules(root);
|
|
62734
|
+
root.walkAtRules("supports", (atRule) => {
|
|
62735
|
+
atRule.remove();
|
|
62736
|
+
});
|
|
62737
|
+
root.walkAtRules((atRule) => {
|
|
62738
|
+
removeUnsupportedMiniProgramPrefixedAtRule(atRule);
|
|
62739
|
+
});
|
|
62740
|
+
root.walkDecls((decl) => {
|
|
62741
|
+
normalizeMiniProgramPrefixedDeclaration(decl);
|
|
62742
|
+
});
|
|
62743
|
+
root.walkRules((rule) => {
|
|
62744
|
+
if (isKeyframesRule(rule)) return;
|
|
62745
|
+
if (isPseudoContentInitRule(rule)) {
|
|
62746
|
+
if (!shouldPreserveContentInit) rule.remove();
|
|
62747
|
+
return;
|
|
62748
|
+
}
|
|
62749
|
+
if (isMiniProgramElementContentInitRule(rule)) {
|
|
62750
|
+
if (!shouldPreserveContentInit) {
|
|
62751
|
+
rule.remove();
|
|
62752
|
+
return;
|
|
62753
|
+
}
|
|
62754
|
+
rule.selector = MINI_PROGRAM_PSEUDO_CONTENT_SCOPE_SELECTOR;
|
|
62755
|
+
return;
|
|
62756
|
+
}
|
|
62757
|
+
if (isCustomPropertyRule(rule) && isMiniProgramElementVariableScopeRule(rule)) {
|
|
62758
|
+
rule.selector = MINI_PROGRAM_ELEMENT_SCOPE_SELECTOR;
|
|
62759
|
+
return;
|
|
62760
|
+
}
|
|
62761
|
+
if (options.preserveRawClassRules && (hasClassSelector$1(rule.selector) || hasClassRuleAncestor(rule))) return;
|
|
62762
|
+
if (isUnsupportedBrowserPreflightSelector(rule.selector)) {
|
|
62763
|
+
rule.remove();
|
|
62764
|
+
return;
|
|
62765
|
+
}
|
|
62766
|
+
if (isBrowserElementPreflightRule(rule)) {
|
|
62767
|
+
rule.remove();
|
|
62768
|
+
return;
|
|
62769
|
+
}
|
|
62770
|
+
if (isMiniProgramNativeElementRule(rule)) return;
|
|
62771
|
+
if (isMiniProgramThemeVariableRule(rule)) {
|
|
62772
|
+
moveTailwindV4GradientRuntimeDeclarations(rule);
|
|
62773
|
+
if (!rule.parent) return;
|
|
62774
|
+
rule.selector = DEFAULT_WEAPP_VARIABLE_SCOPE;
|
|
62775
|
+
return;
|
|
62776
|
+
}
|
|
62777
|
+
if (hasClassSelector$1(rule.selector)) return;
|
|
62778
|
+
if (!shouldPreserveContentInit) removeEmptyContentInitDeclarations(rule);
|
|
62779
|
+
if (isMiniProgramPreflightRule(rule)) {
|
|
62780
|
+
if (options.preservePreflight) return;
|
|
62781
|
+
rule.remove();
|
|
62782
|
+
return;
|
|
62783
|
+
}
|
|
62784
|
+
if (isCustomPropertyRule(rule)) {
|
|
62785
|
+
moveTailwindV4GradientRuntimeDeclarations(rule);
|
|
62786
|
+
if (!rule.parent) return;
|
|
62787
|
+
rule.selector = DEFAULT_WEAPP_VARIABLE_SCOPE;
|
|
62788
|
+
return;
|
|
62789
|
+
}
|
|
62790
|
+
rule.remove();
|
|
62791
|
+
});
|
|
62792
|
+
if (shouldPreserveContentInit) ensureMiniProgramElementContentInit(root);
|
|
62793
|
+
root.walkAtRules((atRule) => {
|
|
62794
|
+
if (!atRule.nodes || atRule.nodes.length === 0) atRule.remove();
|
|
62795
|
+
});
|
|
62796
|
+
return root.toString();
|
|
62797
|
+
}
|
|
62798
|
+
//#endregion
|
|
62799
|
+
//#region src/compat/tailwindcss-rpx.ts
|
|
62800
|
+
const LENGTH_VALUE_REGEXP = /^[+-]?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?rpx$/i;
|
|
62801
|
+
const RPX_DIMENSION_REGEXP = /^([+-]?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?)rpx$/i;
|
|
62802
|
+
const DEFAULT_RPX_TO_REM_ROOT_VALUE = 32;
|
|
62803
|
+
const DEFAULT_RPX_TO_REM_UNIT_PRECISION = 5;
|
|
62804
|
+
function formatRpxToRemValue(value, precision) {
|
|
62805
|
+
const fixed = Number(value.toFixed(precision));
|
|
62806
|
+
return Object.is(fixed, -0) ? 0 : fixed;
|
|
62807
|
+
}
|
|
62808
|
+
function convertTailwindcssRpxValueToRem(value, options) {
|
|
62809
|
+
if (!value.includes("rpx") && !value.includes("RPX")) return value;
|
|
62810
|
+
let changed = false;
|
|
62811
|
+
const rootValue = options?.rootValue ?? DEFAULT_RPX_TO_REM_ROOT_VALUE;
|
|
62812
|
+
const unitPrecision = options?.unitPrecision ?? DEFAULT_RPX_TO_REM_UNIT_PRECISION;
|
|
62813
|
+
const parsed = (0, postcss_value_parser.default)(value);
|
|
62814
|
+
parsed.walk((node) => {
|
|
62815
|
+
if (node.type !== "word") return;
|
|
62816
|
+
const match = RPX_DIMENSION_REGEXP.exec(node.value);
|
|
62817
|
+
if (!match) return;
|
|
62818
|
+
node.value = `${formatRpxToRemValue(Number(match[1]) / rootValue, unitPrecision)}rem`;
|
|
62819
|
+
changed = true;
|
|
62820
|
+
});
|
|
62821
|
+
return changed ? parsed.toString() : value;
|
|
62822
|
+
}
|
|
62823
|
+
function normalizeTailwindcssRpxDeclaration(decl, options) {
|
|
62824
|
+
const majorVersion = options?.majorVersion;
|
|
62825
|
+
const normalizedValue = decl.value.trim();
|
|
62826
|
+
if (LENGTH_VALUE_REGEXP.test(normalizedValue) && (majorVersion === void 0 || majorVersion === 4)) {
|
|
62827
|
+
const lowerProp = decl.prop.toLowerCase();
|
|
62828
|
+
if (lowerProp === "color") {
|
|
62829
|
+
decl.prop = "font-size";
|
|
62830
|
+
return true;
|
|
62831
|
+
}
|
|
62832
|
+
if (lowerProp === "background-color") {
|
|
62833
|
+
decl.prop = "background-size";
|
|
62834
|
+
return true;
|
|
62835
|
+
}
|
|
62836
|
+
if (lowerProp === "outline-color") {
|
|
62837
|
+
decl.prop = "outline-width";
|
|
62838
|
+
return true;
|
|
62839
|
+
}
|
|
62840
|
+
if (lowerProp.startsWith("border") && lowerProp.endsWith("color")) {
|
|
62841
|
+
decl.prop = `${decl.prop.slice(0, -5)}width`;
|
|
62842
|
+
return true;
|
|
62843
|
+
}
|
|
62844
|
+
if (lowerProp === "--tw-ring-color") {
|
|
62845
|
+
decl.prop = "--tw-ring-offset-width";
|
|
62846
|
+
return true;
|
|
62847
|
+
}
|
|
62848
|
+
}
|
|
62849
|
+
return false;
|
|
62850
|
+
}
|
|
62851
|
+
function normalizeTailwindcssRpxDeclarations(root, options) {
|
|
62852
|
+
let changed = false;
|
|
62853
|
+
root.walkDecls((decl) => {
|
|
62854
|
+
changed = normalizeTailwindcssRpxDeclaration(decl, options) || changed;
|
|
62855
|
+
});
|
|
62856
|
+
return changed;
|
|
62857
|
+
}
|
|
62858
|
+
function convertTailwindcssRpxDeclarationToRem(decl, options) {
|
|
62859
|
+
const value = convertTailwindcssRpxValueToRem(decl.value, options);
|
|
62860
|
+
if (value === decl.value) return false;
|
|
62861
|
+
decl.value = value;
|
|
62862
|
+
return true;
|
|
62863
|
+
}
|
|
62864
|
+
function convertTailwindcssRpxDeclarationsToRem(root, options) {
|
|
62865
|
+
let changed = false;
|
|
62866
|
+
root.walkDecls((decl) => {
|
|
62867
|
+
changed = convertTailwindcssRpxDeclarationToRem(decl, options) || changed;
|
|
62868
|
+
});
|
|
62869
|
+
return changed;
|
|
62870
|
+
}
|
|
62871
|
+
function normalizeTailwindcssWebRpxDeclarations(root, options) {
|
|
62872
|
+
const normalized = normalizeTailwindcssRpxDeclarations(root, options);
|
|
62873
|
+
const converted = convertTailwindcssRpxDeclarationsToRem(root, options);
|
|
62874
|
+
return normalized || converted;
|
|
62875
|
+
}
|
|
62876
|
+
//#endregion
|
|
62701
62877
|
//#region src/shared.ts
|
|
62702
62878
|
const escapeOptionsCache = /* @__PURE__ */ new WeakMap();
|
|
62703
62879
|
function getEscapeOptions(escapeMap) {
|
|
@@ -62925,7 +63101,6 @@ function transformWebCssCompat(css, options) {
|
|
|
62925
63101
|
try {
|
|
62926
63102
|
const root = postcss.default.parse(css);
|
|
62927
63103
|
if (normalized.features.theme) unwrapThemeAtRules(root);
|
|
62928
|
-
if (normalized.features.layer) removeUnsupportedCascadeLayers(root);
|
|
62929
63104
|
if (normalized.features.property) {
|
|
62930
63105
|
const registeredProperties = collectRegisteredCustomPropertyFallbacks(root);
|
|
62931
63106
|
insertRegisteredCustomPropertyFallbackRule(root, registeredProperties);
|
|
@@ -62936,6 +63111,7 @@ function transformWebCssCompat(css, options) {
|
|
|
62936
63111
|
normalizeTailwindcssV4GradientPositionDeclarations(root);
|
|
62937
63112
|
normalizeTailwindcssV4InfinityCalcDeclarations(root);
|
|
62938
63113
|
normalizeModernColorDeclarations(root, normalized.features);
|
|
63114
|
+
if (normalized.features.layer) removeUnsupportedCascadeLayers(root);
|
|
62939
63115
|
removeEmptyAtRules$1(root);
|
|
62940
63116
|
return root.toString();
|
|
62941
63117
|
} catch {
|
|
@@ -63438,7 +63614,7 @@ function resolveSourceScanPath(value) {
|
|
|
63438
63614
|
}
|
|
63439
63615
|
}
|
|
63440
63616
|
function normalizeEntryPattern(entry) {
|
|
63441
|
-
return node_path.default.isAbsolute(entry.pattern) ? toPosixPath(node_path.default.relative(resolveSourceScanPath(entry.base), entry.pattern)) : entry.pattern;
|
|
63617
|
+
return node_path.default.isAbsolute(entry.pattern) ? toPosixPath(node_path.default.relative(resolveSourceScanPath(entry.base), resolveSourceScanPath(entry.pattern))) : entry.pattern;
|
|
63442
63618
|
}
|
|
63443
63619
|
function isFileMatchedByTailwindSourceEntry(file, entry) {
|
|
63444
63620
|
const relative = toPosixPath(node_path.default.relative(resolveSourceScanPath(entry.base), file));
|
|
@@ -64090,6 +64266,27 @@ function splitLocalCssImports(source) {
|
|
|
64090
64266
|
return;
|
|
64091
64267
|
}
|
|
64092
64268
|
}
|
|
64269
|
+
function removeMatchingLocalCssImportsRoot(root, importsRoot) {
|
|
64270
|
+
const requests = collectCssImportRequestsRoot(importsRoot, { isSupportedImportRequest: isLocalCssImportRequest });
|
|
64271
|
+
if (requests.size === 0) return false;
|
|
64272
|
+
let changed = false;
|
|
64273
|
+
root.walkAtRules("import", (atRule) => {
|
|
64274
|
+
const request = parseImportRequest(atRule.params);
|
|
64275
|
+
if (!request || !requests.has(request)) return;
|
|
64276
|
+
atRule.remove();
|
|
64277
|
+
changed = true;
|
|
64278
|
+
});
|
|
64279
|
+
return changed;
|
|
64280
|
+
}
|
|
64281
|
+
function removeMatchingLocalCssImports(source, imports) {
|
|
64282
|
+
if (!imports?.includes("@import") || !source.includes("@import")) return source;
|
|
64283
|
+
try {
|
|
64284
|
+
const root = postcss.default.parse(source);
|
|
64285
|
+
return removeMatchingLocalCssImportsRoot(root, postcss.default.parse(imports)) ? root.toString() : source;
|
|
64286
|
+
} catch {
|
|
64287
|
+
return source;
|
|
64288
|
+
}
|
|
64289
|
+
}
|
|
64093
64290
|
function normalizeOutputPath(file) {
|
|
64094
64291
|
const segments = [];
|
|
64095
64292
|
for (const segment of file.replace(/\\/g, "/").replace(/^\/+/, "").split("/")) {
|
|
@@ -64217,7 +64414,6 @@ function getDefaultOptions(options) {
|
|
|
64217
64414
|
return {
|
|
64218
64415
|
cssPresetEnv: {
|
|
64219
64416
|
features: {
|
|
64220
|
-
"cascade-layers": true,
|
|
64221
64417
|
"is-pseudo-class": { specificityMatchingName: "weapp-tw-ig" },
|
|
64222
64418
|
"oklab-function": true,
|
|
64223
64419
|
"color-mix": true,
|
|
@@ -64579,16 +64775,29 @@ function createContext() {
|
|
|
64579
64775
|
}
|
|
64580
64776
|
//#endregion
|
|
64581
64777
|
//#region src/plugins/getCalcDuplicateCleaner.ts
|
|
64778
|
+
const MULTIPLICATION_GROUP_RE = /\((var\([^()]+\)(?:\s*\*\s*-?(?:\d+(?:\.\d+)?|\.\d+|[a-z_][\w-]*))+)\)/gi;
|
|
64779
|
+
function normalizeCalcValue$1(value) {
|
|
64780
|
+
if (!value.includes("calc(")) return value;
|
|
64781
|
+
let normalized = value.replace(/\s+/g, "");
|
|
64782
|
+
let previous;
|
|
64783
|
+
do {
|
|
64784
|
+
previous = normalized;
|
|
64785
|
+
normalized = normalized.replace(MULTIPLICATION_GROUP_RE, "$1");
|
|
64786
|
+
} while (normalized !== previous);
|
|
64787
|
+
return normalized;
|
|
64788
|
+
}
|
|
64582
64789
|
const calcDuplicateCleanerPlugin = {
|
|
64583
64790
|
postcssPlugin: "postcss-calc-duplicate-cleaner",
|
|
64584
|
-
|
|
64585
|
-
|
|
64586
|
-
const
|
|
64587
|
-
|
|
64588
|
-
|
|
64589
|
-
|
|
64590
|
-
|
|
64591
|
-
|
|
64791
|
+
OnceExit(root) {
|
|
64792
|
+
root.walkRules((rule) => {
|
|
64793
|
+
const declarations = /* @__PURE__ */ new Set();
|
|
64794
|
+
for (const node of [...rule.nodes]) {
|
|
64795
|
+
if (node.type !== "decl") continue;
|
|
64796
|
+
const decl = node;
|
|
64797
|
+
const key = `${decl.prop}\0${decl.important ? "1" : "0"}\0${normalizeCalcValue$1(decl.value)}`;
|
|
64798
|
+
if (declarations.has(key)) decl.remove();
|
|
64799
|
+
else declarations.add(key);
|
|
64800
|
+
}
|
|
64592
64801
|
});
|
|
64593
64802
|
}
|
|
64594
64803
|
};
|
|
@@ -66076,34 +66285,26 @@ const postcssWeappTailwindcssPrePlugin = (options) => {
|
|
|
66076
66285
|
else if (isTailwindcssV4LinearGradientSupports(atRule)) removeAtRuleAndEmptyAncestors(atRule);
|
|
66077
66286
|
else if (isTailwindcssV4DisplayP3Supports(atRule)) removeAtRuleAndEmptyAncestors(atRule);
|
|
66078
66287
|
} else if (isTailwindcssV4DisplayP3Media(atRule)) removeAtRuleAndEmptyAncestors(atRule);
|
|
66079
|
-
else if (atRule.name === "layer") {
|
|
66080
|
-
if (atRule.nodes === void 0 || Array.isArray(atRule.nodes) && atRule.nodes.length === 0) atRule.remove();
|
|
66081
|
-
}
|
|
66082
66288
|
},
|
|
66083
66289
|
Declaration(decl) {
|
|
66084
66290
|
if (isTailwindcssV4DisplayP3Declaration(decl)) removeDeclarationAndEmptyRule(decl);
|
|
66085
66291
|
}
|
|
66086
66292
|
};
|
|
66087
|
-
if (opts.isMainChunk) {
|
|
66088
|
-
|
|
66089
|
-
|
|
66090
|
-
|
|
66091
|
-
|
|
66092
|
-
if (atRule.nodes === void 0 || atRule.nodes?.length === 0) layerProperties = atRule;
|
|
66093
|
-
else if (atRule.first?.type === "atrule" && isTailwindcssV4ModernCheck(atRule.first)) if (layerProperties) {
|
|
66094
|
-
layerProperties.replaceWith(atRule.first.nodes);
|
|
66095
|
-
atRule.remove();
|
|
66096
|
-
} else atRule.replaceWith(atRule.first.nodes);
|
|
66097
|
-
} else atRule.replaceWith(atRule.nodes);
|
|
66098
|
-
else if (isTailwindcssV4ModernCheck(atRule)) {
|
|
66099
|
-
if (atRule.first?.type === "atrule" && atRule.first.name === "layer") atRule.replaceWith(atRule.first.nodes);
|
|
66293
|
+
if (opts.isMainChunk) p.Once = (root) => {
|
|
66294
|
+
root.walkAtRules((atRule) => {
|
|
66295
|
+
if (atRule.name === "layer") {
|
|
66296
|
+
if (atRule.params === "properties") {
|
|
66297
|
+
if (atRule.first?.type === "atrule" && isTailwindcssV4ModernCheck(atRule.first)) atRule.first.replaceWith(atRule.first.nodes ?? []);
|
|
66100
66298
|
}
|
|
66101
|
-
})
|
|
66102
|
-
|
|
66103
|
-
|
|
66104
|
-
|
|
66105
|
-
|
|
66106
|
-
|
|
66299
|
+
} else if (isTailwindcssV4ModernCheck(atRule)) {
|
|
66300
|
+
if (atRule.first?.type === "atrule" && atRule.first.name === "layer") atRule.replaceWith(atRule.first);
|
|
66301
|
+
}
|
|
66302
|
+
});
|
|
66303
|
+
consumeCascadeLayers(root);
|
|
66304
|
+
root.walkRules((rule) => {
|
|
66305
|
+
commonChunkPreflight(rule, opts);
|
|
66306
|
+
});
|
|
66307
|
+
};
|
|
66107
66308
|
return p;
|
|
66108
66309
|
};
|
|
66109
66310
|
postcssWeappTailwindcssPrePlugin.postcss = true;
|
|
@@ -66139,7 +66340,13 @@ function shouldUseDefaultAutoprefixer(options, userPlugins) {
|
|
|
66139
66340
|
function createPreparedNodes(options, signal) {
|
|
66140
66341
|
const preparedNodes = [];
|
|
66141
66342
|
const userPlugins = normalizeUserPlugins(options.postcssOptions?.plugins);
|
|
66142
|
-
const presetEnvOptions =
|
|
66343
|
+
const presetEnvOptions = {
|
|
66344
|
+
...options.cssPresetEnv,
|
|
66345
|
+
features: {
|
|
66346
|
+
...options.cssPresetEnv?.features,
|
|
66347
|
+
"cascade-layers": false
|
|
66348
|
+
}
|
|
66349
|
+
};
|
|
66143
66350
|
userPlugins.forEach((plugin, index) => {
|
|
66144
66351
|
preparedNodes.push(createPreparedNode(`pre:user-${index}`, "pre", () => plugin));
|
|
66145
66352
|
});
|
|
@@ -66431,24 +66638,32 @@ function removeTailwindPostcssPlugins(plugins) {
|
|
|
66431
66638
|
}
|
|
66432
66639
|
return removed;
|
|
66433
66640
|
}
|
|
66434
|
-
async function
|
|
66641
|
+
async function resolvePostcssConfig(root, ctx = {}) {
|
|
66435
66642
|
try {
|
|
66436
|
-
const loaded = await (0, postcss_load_config.default)(
|
|
66437
|
-
const plugins = Array.isArray(loaded.plugins) ? [...loaded.plugins] : [];
|
|
66438
|
-
const removed = removeTailwindPostcssPlugins(plugins);
|
|
66439
|
-
if (removed === 0) return;
|
|
66643
|
+
const loaded = await (0, postcss_load_config.default)(ctx, root);
|
|
66440
66644
|
return {
|
|
66441
66645
|
options: loaded.options,
|
|
66442
|
-
plugins
|
|
66443
|
-
removed
|
|
66646
|
+
plugins: Array.isArray(loaded.plugins) ? [...loaded.plugins] : []
|
|
66444
66647
|
};
|
|
66445
66648
|
} catch (error) {
|
|
66446
66649
|
if ((error instanceof Error ? error.message : String(error)).includes("No PostCSS Config found")) return;
|
|
66447
66650
|
throw error;
|
|
66448
66651
|
}
|
|
66449
66652
|
}
|
|
66653
|
+
async function resolveFilteredPostcssConfig(root) {
|
|
66654
|
+
const loaded = await resolvePostcssConfig(root);
|
|
66655
|
+
if (!loaded) return;
|
|
66656
|
+
const plugins = [...loaded.plugins];
|
|
66657
|
+
const removed = removeTailwindPostcssPlugins(plugins);
|
|
66658
|
+
if (removed === 0) return;
|
|
66659
|
+
return {
|
|
66660
|
+
options: loaded.options,
|
|
66661
|
+
plugins,
|
|
66662
|
+
removed
|
|
66663
|
+
};
|
|
66664
|
+
}
|
|
66450
66665
|
//#endregion
|
|
66451
|
-
//#region src/vite-css-rules.ts
|
|
66666
|
+
//#region src/vite-css-rules/structure.ts
|
|
66452
66667
|
const MINI_PROGRAM_PREFLIGHT_SELECTOR_KEY = "view,text,::after,::before";
|
|
66453
66668
|
const MINI_PROGRAM_PREFLIGHT_SELECTOR_KEYS = /* @__PURE__ */ new Set([
|
|
66454
66669
|
"view",
|
|
@@ -66527,6 +66742,12 @@ function parseVarFallbackValue(value) {
|
|
|
66527
66742
|
const fallback = body.slice(commaIndex + 1).trim();
|
|
66528
66743
|
return fallback.length > 0 ? fallback : void 0;
|
|
66529
66744
|
}
|
|
66745
|
+
function parseVarReferenceValue(value) {
|
|
66746
|
+
const trimmed = value.trim();
|
|
66747
|
+
if (!trimmed.startsWith("var(") || !trimmed.endsWith(")")) return;
|
|
66748
|
+
const body = trimmed.slice(4, -1).trim();
|
|
66749
|
+
return body.startsWith("--") && !body.includes(",") && !/\s/.test(body) ? body : void 0;
|
|
66750
|
+
}
|
|
66530
66751
|
function isEquivalentVarFallbackDeclaration(incoming, baseDeclarations) {
|
|
66531
66752
|
const fallback = parseVarFallbackValue(incoming.value);
|
|
66532
66753
|
if (!fallback) return false;
|
|
@@ -66595,6 +66816,155 @@ function collectCssRuleDeclarationRecords(root, resolveRuleKey = getCssRuleStruc
|
|
|
66595
66816
|
});
|
|
66596
66817
|
return map;
|
|
66597
66818
|
}
|
|
66819
|
+
//#endregion
|
|
66820
|
+
//#region src/vite-css-rules/coverage.ts
|
|
66821
|
+
function isCssRuleCoveredByDeclarations(rule, baseRuleDeclarationKeys) {
|
|
66822
|
+
const key = getCssRuleStructuralKey(rule);
|
|
66823
|
+
if (!key) return false;
|
|
66824
|
+
const baseDeclarations = baseRuleDeclarationKeys.get(key);
|
|
66825
|
+
if (!baseDeclarations) return false;
|
|
66826
|
+
return collectCssRuleDeclarationKeys(rule).size > 0 && collectCssRuleDeclarations(rule).every((decl) => baseDeclarations.has(normalizeCssDeclarationKey(decl)) || isEquivalentVarFallbackDeclaration(decl, baseDeclarations) || isCoveredByBaseVarFallbackDeclaration(decl, baseDeclarations));
|
|
66827
|
+
}
|
|
66828
|
+
function removeDuplicateLeadingComment(rule, targetRule) {
|
|
66829
|
+
const comment = rule.prev();
|
|
66830
|
+
const targetComment = targetRule.prev();
|
|
66831
|
+
if (comment?.type === "comment" && targetComment?.type === "comment" && normalizeCssForContainment(comment.text) === normalizeCssForContainment(targetComment.text)) comment.remove();
|
|
66832
|
+
}
|
|
66833
|
+
function dedupeCoveredCssRules(css) {
|
|
66834
|
+
try {
|
|
66835
|
+
const root = postcss.default.parse(css);
|
|
66836
|
+
const recordsByParent = /* @__PURE__ */ new WeakMap();
|
|
66837
|
+
let changed = false;
|
|
66838
|
+
root.walkRules((rule) => {
|
|
66839
|
+
const key = getCssRuleStructuralKey(rule);
|
|
66840
|
+
const incomingDeclarations = collectCssRuleDeclarations(rule);
|
|
66841
|
+
if (!key || incomingDeclarations.length === 0 || !rule.parent) return;
|
|
66842
|
+
let records = recordsByParent.get(rule.parent);
|
|
66843
|
+
if (!records) {
|
|
66844
|
+
records = /* @__PURE__ */ new Map();
|
|
66845
|
+
recordsByParent.set(rule.parent, records);
|
|
66846
|
+
}
|
|
66847
|
+
const targetRule = records.get(key);
|
|
66848
|
+
if (targetRule) {
|
|
66849
|
+
const incomingKeys = collectCssRuleDeclarationKeys(rule);
|
|
66850
|
+
if (collectCssRuleDeclarations(targetRule).every((decl) => incomingKeys.has(normalizeCssDeclarationKey(decl)) || isEquivalentVarFallbackDeclaration(decl, incomingKeys) || isCoveredByBaseVarFallbackDeclaration(decl, incomingKeys))) {
|
|
66851
|
+
removeDuplicateLeadingComment(targetRule, rule);
|
|
66852
|
+
targetRule.remove();
|
|
66853
|
+
changed = true;
|
|
66854
|
+
}
|
|
66855
|
+
}
|
|
66856
|
+
records.set(key, rule);
|
|
66857
|
+
});
|
|
66858
|
+
return changed ? root.toString() : css;
|
|
66859
|
+
} catch {
|
|
66860
|
+
return css;
|
|
66861
|
+
}
|
|
66862
|
+
}
|
|
66863
|
+
function mergeCoveredCssRuleDeclarations(baseCss, css) {
|
|
66864
|
+
try {
|
|
66865
|
+
const baseRoot = postcss.default.parse(baseCss);
|
|
66866
|
+
const root = postcss.default.parse(css);
|
|
66867
|
+
const baseRuleRecords = collectCssRuleDeclarationRecords(baseRoot);
|
|
66868
|
+
let changedBase = false;
|
|
66869
|
+
let changedCss = false;
|
|
66870
|
+
root.walkRules((rule) => {
|
|
66871
|
+
const key = getCssRuleStructuralKey(rule);
|
|
66872
|
+
const records = key ? baseRuleRecords.get(key) : void 0;
|
|
66873
|
+
if (!records || records.length === 0) return;
|
|
66874
|
+
const incomingDeclarations = collectCssRuleDeclarations(rule);
|
|
66875
|
+
if (incomingDeclarations.length === 0) return;
|
|
66876
|
+
const baseKeys = new Set(records.flatMap((record) => [...record.keys]));
|
|
66877
|
+
if (incomingDeclarations.filter((decl) => baseKeys.has(normalizeCssDeclarationKey(decl))).length === 0) return;
|
|
66878
|
+
const missingDeclarations = incomingDeclarations.filter((decl) => !baseKeys.has(normalizeCssDeclarationKey(decl)));
|
|
66879
|
+
if (missingDeclarations.length === 0) {
|
|
66880
|
+
rule.remove();
|
|
66881
|
+
changedCss = true;
|
|
66882
|
+
return;
|
|
66883
|
+
}
|
|
66884
|
+
const baseProps = new Set(records.flatMap((record) => [...record.props]));
|
|
66885
|
+
const mergeableFallbacks = /* @__PURE__ */ new Map();
|
|
66886
|
+
if (missingDeclarations.filter((decl) => {
|
|
66887
|
+
if (!baseProps.has(decl.prop.trim())) return false;
|
|
66888
|
+
const matchingVariable = incomingDeclarations.find((candidate) => candidate.prop.startsWith("--") && candidate.important === decl.important && normalizeCssForContainment(candidate.value) === normalizeCssForContainment(decl.value));
|
|
66889
|
+
if (!matchingVariable) return true;
|
|
66890
|
+
const targetDeclaration = records.flatMap((record) => collectCssRuleDeclarations(record.rule)).find((candidate) => candidate.prop.trim() === decl.prop.trim() && candidate.important === decl.important && parseVarReferenceValue(candidate.value) === matchingVariable.prop.trim());
|
|
66891
|
+
if (!targetDeclaration) return true;
|
|
66892
|
+
mergeableFallbacks.set(decl, targetDeclaration);
|
|
66893
|
+
return false;
|
|
66894
|
+
}).length > 0) return;
|
|
66895
|
+
const targetRecord = records[0];
|
|
66896
|
+
if (!targetRecord) return;
|
|
66897
|
+
for (const decl of missingDeclarations) {
|
|
66898
|
+
const fallbackTarget = mergeableFallbacks.get(decl);
|
|
66899
|
+
if (fallbackTarget) fallbackTarget.before(decl.clone());
|
|
66900
|
+
else targetRecord.rule.append(decl.clone());
|
|
66901
|
+
targetRecord.keys.add(normalizeCssDeclarationKey(decl));
|
|
66902
|
+
targetRecord.props.add(decl.prop.trim());
|
|
66903
|
+
}
|
|
66904
|
+
rule.remove();
|
|
66905
|
+
changedBase = true;
|
|
66906
|
+
changedCss = true;
|
|
66907
|
+
});
|
|
66908
|
+
if (!changedBase && !changedCss) return {
|
|
66909
|
+
baseCss,
|
|
66910
|
+
css,
|
|
66911
|
+
changed: false
|
|
66912
|
+
};
|
|
66913
|
+
removeEmptyAtRules(root);
|
|
66914
|
+
return {
|
|
66915
|
+
baseCss: changedBase ? baseRoot.toString() : baseCss,
|
|
66916
|
+
css: changedCss ? root.toString().trim() : css,
|
|
66917
|
+
changed: true
|
|
66918
|
+
};
|
|
66919
|
+
} catch {
|
|
66920
|
+
return {
|
|
66921
|
+
baseCss,
|
|
66922
|
+
css,
|
|
66923
|
+
changed: false
|
|
66924
|
+
};
|
|
66925
|
+
}
|
|
66926
|
+
}
|
|
66927
|
+
function removeEmptyAtRules(root) {
|
|
66928
|
+
root.walkAtRules((atRule) => {
|
|
66929
|
+
if (atRule.nodes && atRule.nodes.every((node) => node.type === "comment")) atRule.remove();
|
|
66930
|
+
});
|
|
66931
|
+
}
|
|
66932
|
+
//#endregion
|
|
66933
|
+
//#region src/vite-css-rules/containment.ts
|
|
66934
|
+
function filterExistingCssRules(baseCss, css) {
|
|
66935
|
+
const baseRuleKeys = collectCssRuleContentKeys(baseCss);
|
|
66936
|
+
if (baseRuleKeys.size === 0) return css;
|
|
66937
|
+
try {
|
|
66938
|
+
const root = postcss.default.parse(css);
|
|
66939
|
+
const baseRuleDeclarationKeys = collectCssRuleDeclarationKeyMap(baseCss);
|
|
66940
|
+
let changed = false;
|
|
66941
|
+
root.walkRules((rule) => {
|
|
66942
|
+
const key = getCssRuleContentKey(rule);
|
|
66943
|
+
if (key && baseRuleKeys.has(key) || isCssRuleCoveredByDeclarations(rule, baseRuleDeclarationKeys)) {
|
|
66944
|
+
rule.remove();
|
|
66945
|
+
changed = true;
|
|
66946
|
+
}
|
|
66947
|
+
});
|
|
66948
|
+
if (!changed) return css;
|
|
66949
|
+
removeEmptyAtRules(root);
|
|
66950
|
+
return root.toString().trim();
|
|
66951
|
+
} catch {
|
|
66952
|
+
return css;
|
|
66953
|
+
}
|
|
66954
|
+
}
|
|
66955
|
+
function containsCssAfterMinify(baseCss, css) {
|
|
66956
|
+
if (baseCss.includes(css)) return true;
|
|
66957
|
+
const normalizedBaseCss = normalizeCssForContainment(baseCss);
|
|
66958
|
+
const normalizedCss = normalizeCssForContainment(css);
|
|
66959
|
+
if (normalizedCss.length > 0 && normalizedBaseCss.includes(normalizedCss)) return true;
|
|
66960
|
+
const normalizedNodes = collectNormalizedCssNodes(css);
|
|
66961
|
+
if (normalizedNodes.length > 0 && normalizedNodes.every((node) => normalizedBaseCss.includes(node))) return true;
|
|
66962
|
+
const baseRuleKeys = collectCssRuleContentKeys(baseCss);
|
|
66963
|
+
const ruleKeys = collectCssRuleContentKeys(css);
|
|
66964
|
+
return ruleKeys.size > 0 && [...ruleKeys].every((key) => baseRuleKeys.has(key));
|
|
66965
|
+
}
|
|
66966
|
+
//#endregion
|
|
66967
|
+
//#region src/vite-css-rules/mini-program.ts
|
|
66598
66968
|
function normalizeSimpleMiniProgramSelectorNode(node) {
|
|
66599
66969
|
if (node.type === "tag") {
|
|
66600
66970
|
const value = node.value.toLowerCase();
|
|
@@ -66737,103 +67107,6 @@ function mergeMiniProgramThemeScopeRuleDeclarations(baseCss, css) {
|
|
|
66737
67107
|
};
|
|
66738
67108
|
}
|
|
66739
67109
|
}
|
|
66740
|
-
function isCssRuleCoveredByDeclarations(rule, baseRuleDeclarationKeys) {
|
|
66741
|
-
const key = getCssRuleStructuralKey(rule);
|
|
66742
|
-
if (!key) return false;
|
|
66743
|
-
const baseDeclarations = baseRuleDeclarationKeys.get(key);
|
|
66744
|
-
if (!baseDeclarations) return false;
|
|
66745
|
-
return collectCssRuleDeclarationKeys(rule).size > 0 && collectCssRuleDeclarations(rule).every((decl) => baseDeclarations.has(normalizeCssDeclarationKey(decl)) || isEquivalentVarFallbackDeclaration(decl, baseDeclarations) || isCoveredByBaseVarFallbackDeclaration(decl, baseDeclarations));
|
|
66746
|
-
}
|
|
66747
|
-
function mergeCoveredCssRuleDeclarations(baseCss, css) {
|
|
66748
|
-
try {
|
|
66749
|
-
const baseRoot = postcss.default.parse(baseCss);
|
|
66750
|
-
const root = postcss.default.parse(css);
|
|
66751
|
-
const baseRuleRecords = collectCssRuleDeclarationRecords(baseRoot);
|
|
66752
|
-
let changedBase = false;
|
|
66753
|
-
let changedCss = false;
|
|
66754
|
-
root.walkRules((rule) => {
|
|
66755
|
-
const key = getCssRuleStructuralKey(rule);
|
|
66756
|
-
const records = key ? baseRuleRecords.get(key) : void 0;
|
|
66757
|
-
if (!records || records.length === 0) return;
|
|
66758
|
-
const incomingDeclarations = collectCssRuleDeclarations(rule);
|
|
66759
|
-
if (incomingDeclarations.length === 0) return;
|
|
66760
|
-
const baseKeys = new Set(records.flatMap((record) => [...record.keys]));
|
|
66761
|
-
if (incomingDeclarations.filter((decl) => baseKeys.has(normalizeCssDeclarationKey(decl))).length === 0) return;
|
|
66762
|
-
const missingDeclarations = incomingDeclarations.filter((decl) => !baseKeys.has(normalizeCssDeclarationKey(decl)));
|
|
66763
|
-
if (missingDeclarations.length === 0) {
|
|
66764
|
-
rule.remove();
|
|
66765
|
-
changedCss = true;
|
|
66766
|
-
return;
|
|
66767
|
-
}
|
|
66768
|
-
const baseProps = new Set(records.flatMap((record) => [...record.props]));
|
|
66769
|
-
if (missingDeclarations.filter((decl) => baseProps.has(decl.prop.trim())).length > 0) return;
|
|
66770
|
-
const targetRecord = records[0];
|
|
66771
|
-
if (!targetRecord) return;
|
|
66772
|
-
for (const decl of missingDeclarations) {
|
|
66773
|
-
targetRecord.rule.append(decl.clone());
|
|
66774
|
-
targetRecord.keys.add(normalizeCssDeclarationKey(decl));
|
|
66775
|
-
targetRecord.props.add(decl.prop.trim());
|
|
66776
|
-
}
|
|
66777
|
-
rule.remove();
|
|
66778
|
-
changedBase = true;
|
|
66779
|
-
changedCss = true;
|
|
66780
|
-
});
|
|
66781
|
-
if (!changedBase && !changedCss) return {
|
|
66782
|
-
baseCss,
|
|
66783
|
-
css,
|
|
66784
|
-
changed: false
|
|
66785
|
-
};
|
|
66786
|
-
removeEmptyAtRules(root);
|
|
66787
|
-
return {
|
|
66788
|
-
baseCss: changedBase ? baseRoot.toString() : baseCss,
|
|
66789
|
-
css: changedCss ? root.toString().trim() : css,
|
|
66790
|
-
changed: true
|
|
66791
|
-
};
|
|
66792
|
-
} catch {
|
|
66793
|
-
return {
|
|
66794
|
-
baseCss,
|
|
66795
|
-
css,
|
|
66796
|
-
changed: false
|
|
66797
|
-
};
|
|
66798
|
-
}
|
|
66799
|
-
}
|
|
66800
|
-
function removeEmptyAtRules(root) {
|
|
66801
|
-
root.walkAtRules((atRule) => {
|
|
66802
|
-
if (atRule.nodes && atRule.nodes.every((node) => node.type === "comment")) atRule.remove();
|
|
66803
|
-
});
|
|
66804
|
-
}
|
|
66805
|
-
function filterExistingCssRules(baseCss, css) {
|
|
66806
|
-
const baseRuleKeys = collectCssRuleContentKeys(baseCss);
|
|
66807
|
-
if (baseRuleKeys.size === 0) return css;
|
|
66808
|
-
try {
|
|
66809
|
-
const root = postcss.default.parse(css);
|
|
66810
|
-
const baseRuleDeclarationKeys = collectCssRuleDeclarationKeyMap(baseCss);
|
|
66811
|
-
let changed = false;
|
|
66812
|
-
root.walkRules((rule) => {
|
|
66813
|
-
const key = getCssRuleContentKey(rule);
|
|
66814
|
-
if (key && baseRuleKeys.has(key) || isCssRuleCoveredByDeclarations(rule, baseRuleDeclarationKeys)) {
|
|
66815
|
-
rule.remove();
|
|
66816
|
-
changed = true;
|
|
66817
|
-
}
|
|
66818
|
-
});
|
|
66819
|
-
if (!changed) return css;
|
|
66820
|
-
removeEmptyAtRules(root);
|
|
66821
|
-
return root.toString().trim();
|
|
66822
|
-
} catch {
|
|
66823
|
-
return css;
|
|
66824
|
-
}
|
|
66825
|
-
}
|
|
66826
|
-
function containsCssAfterMinify(baseCss, css) {
|
|
66827
|
-
if (baseCss.includes(css)) return true;
|
|
66828
|
-
const normalizedBaseCss = normalizeCssForContainment(baseCss);
|
|
66829
|
-
const normalizedCss = normalizeCssForContainment(css);
|
|
66830
|
-
if (normalizedCss.length > 0 && normalizedBaseCss.includes(normalizedCss)) return true;
|
|
66831
|
-
const normalizedNodes = collectNormalizedCssNodes(css);
|
|
66832
|
-
if (normalizedNodes.length > 0 && normalizedNodes.every((node) => normalizedBaseCss.includes(node))) return true;
|
|
66833
|
-
const baseRuleKeys = collectCssRuleContentKeys(baseCss);
|
|
66834
|
-
const ruleKeys = collectCssRuleContentKeys(css);
|
|
66835
|
-
return ruleKeys.size > 0 && [...ruleKeys].every((key) => baseRuleKeys.has(key));
|
|
66836
|
-
}
|
|
66837
67110
|
//#endregion
|
|
66838
67111
|
exports.CSS_MACRO_POSTCSS_PLUGIN_NAME = require_postcss.CSS_MACRO_POSTCSS_PLUGIN_NAME;
|
|
66839
67112
|
exports.CSS_MACRO_STYLE_OPTIONS_MARKER = CSS_MACRO_STYLE_OPTIONS_MARKER;
|
|
@@ -66848,6 +67121,7 @@ exports.collectApplyOnlyCssSelectorsRoot = collectApplyOnlyCssSelectorsRoot;
|
|
|
66848
67121
|
exports.collectCssImportRequestsRoot = collectCssImportRequestsRoot;
|
|
66849
67122
|
exports.collectCssInlineSourceCandidates = collectCssInlineSourceCandidates;
|
|
66850
67123
|
exports.compileCssMacroConditionalComments = compileCssMacroConditionalComments;
|
|
67124
|
+
exports.consumeCascadeLayers = consumeCascadeLayers;
|
|
66851
67125
|
exports.containsCssAfterMinify = containsCssAfterMinify;
|
|
66852
67126
|
exports.convertTailwindcssRpxDeclarationToRem = convertTailwindcssRpxDeclarationToRem;
|
|
66853
67127
|
exports.convertTailwindcssRpxDeclarationsToRem = convertTailwindcssRpxDeclarationsToRem;
|
|
@@ -66862,6 +67136,7 @@ exports.createStylePipeline = createStylePipeline;
|
|
|
66862
67136
|
exports.createTailwindSourceEntryMatcher = createTailwindSourceEntryMatcher;
|
|
66863
67137
|
exports.createWeappTailwindcssPostcssPlugin = createWeappTailwindcssPostcssPlugin;
|
|
66864
67138
|
exports.cssMacroPostcssPlugin = require_postcss.creator;
|
|
67139
|
+
exports.dedupeCoveredCssRules = dedupeCoveredCssRules;
|
|
66865
67140
|
exports.expandInlineSourceCandidatePattern = expandInlineSourceCandidatePattern;
|
|
66866
67141
|
exports.expandTailwindSourceEntries = expandTailwindSourceEntries;
|
|
66867
67142
|
exports.filterApplyOnlyGeneratedCss = filterApplyOnlyGeneratedCss;
|
|
@@ -66892,6 +67167,7 @@ exports.mergeCoveredCssRuleDeclarations = mergeCoveredCssRuleDeclarations;
|
|
|
66892
67167
|
exports.mergeMiniProgramPreflightRuleDeclarations = mergeMiniProgramPreflightRuleDeclarations;
|
|
66893
67168
|
exports.mergeMiniProgramThemeScopeRuleDeclarations = mergeMiniProgramThemeScopeRuleDeclarations;
|
|
66894
67169
|
exports.normalizeLegacyContentEntries = normalizeLegacyContentEntries;
|
|
67170
|
+
exports.normalizeMiniProgramGeneratedCssForPostcss = normalizeMiniProgramGeneratedCssForPostcss;
|
|
66895
67171
|
exports.normalizeMiniProgramPrefixedDeclaration = normalizeMiniProgramPrefixedDeclaration;
|
|
66896
67172
|
exports.normalizeModernColorValue = normalizeModernColorValue;
|
|
66897
67173
|
exports.normalizeOutputImportRequest = normalizeOutputImportRequest;
|
|
@@ -66914,6 +67190,8 @@ exports.postcssHtmlTransform = require_html_transform;
|
|
|
66914
67190
|
exports.prefixLocalCssImportsWithWebpackIgnoreRoot = prefixLocalCssImportsWithWebpackIgnoreRoot;
|
|
66915
67191
|
exports.protectDynamicColorMixAlpha = protectDynamicColorMixAlpha;
|
|
66916
67192
|
exports.pruneMiniProgramGeneratedCss = pruneMiniProgramGeneratedCss;
|
|
67193
|
+
exports.removeMatchingLocalCssImports = removeMatchingLocalCssImports;
|
|
67194
|
+
exports.removeMatchingLocalCssImportsRoot = removeMatchingLocalCssImportsRoot;
|
|
66917
67195
|
exports.removeTailwindPostcssPlugins = removeTailwindPostcssPlugins;
|
|
66918
67196
|
exports.removeTailwindSourceDirectivesRoot = removeTailwindSourceDirectivesRoot;
|
|
66919
67197
|
exports.removeUnsupportedAtSupports = removeUnsupportedAtSupports;
|
|
@@ -66923,6 +67201,7 @@ exports.removeUnsupportedMiniProgramCssImportsRoot = removeUnsupportedMiniProgra
|
|
|
66923
67201
|
exports.removeUnsupportedMiniProgramPrefixedAtRule = removeUnsupportedMiniProgramPrefixedAtRule;
|
|
66924
67202
|
exports.resolveCssSourceEntries = resolveCssSourceEntries;
|
|
66925
67203
|
exports.resolveFilteredPostcssConfig = resolveFilteredPostcssConfig;
|
|
67204
|
+
exports.resolvePostcssConfig = resolvePostcssConfig;
|
|
66926
67205
|
exports.resolvePostcssFrameworkProfile = resolvePostcssFrameworkProfile;
|
|
66927
67206
|
exports.resolvePostcssFrameworkStrategy = resolvePostcssFrameworkStrategy;
|
|
66928
67207
|
exports.resolvePostcssStyleBranch = resolvePostcssStyleBranch;
|