@fumadocs/tailwind 0.0.3 → 0.0.5
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.
|
@@ -0,0 +1,3551 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
import plugin from "tailwindcss/plugin";
|
|
3
|
+
//#region \0rolldown/runtime.js
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
13
|
+
key = keys[i];
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
|
+
get: ((k) => from[k]).bind(null, key),
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
22
|
+
value: mod,
|
|
23
|
+
enumerable: true
|
|
24
|
+
}) : target, mod));
|
|
25
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/typography/styles.ts
|
|
28
|
+
function round(num) {
|
|
29
|
+
return num.toFixed(7).replace(/(\.[0-9]+?)0+$/, "$1").replace(/\.0$/, "");
|
|
30
|
+
}
|
|
31
|
+
function rem(px) {
|
|
32
|
+
return `${round(px / 16)}rem`;
|
|
33
|
+
}
|
|
34
|
+
function em(px, base) {
|
|
35
|
+
return `${round(px / base)}em`;
|
|
36
|
+
}
|
|
37
|
+
const colors = {
|
|
38
|
+
"--tw-prose-body": "color-mix(in oklab, var(--color-fd-foreground) 90%, transparent)",
|
|
39
|
+
"--tw-prose-headings": "var(--color-fd-foreground)",
|
|
40
|
+
"--tw-prose-lead": `var(--color-fd-foreground)`,
|
|
41
|
+
"--tw-prose-links": `var(--color-fd-foreground)`,
|
|
42
|
+
"--tw-prose-bold": `var(--color-fd-foreground)`,
|
|
43
|
+
"--tw-prose-counters": `var(--color-fd-muted-foreground)`,
|
|
44
|
+
"--tw-prose-bullets": `var(--color-fd-muted-foreground)`,
|
|
45
|
+
"--tw-prose-hr": `var(--color-fd-border)`,
|
|
46
|
+
"--tw-prose-quotes": `var(--color-fd-foreground)`,
|
|
47
|
+
"--tw-prose-quote-borders": `var(--color-fd-border)`,
|
|
48
|
+
"--tw-prose-captions": `var(--color-fd-foreground)`,
|
|
49
|
+
"--tw-prose-code": `var(--color-fd-foreground)`,
|
|
50
|
+
"--tw-prose-th-borders": `var(--color-fd-border)`,
|
|
51
|
+
"--tw-prose-td-borders": `var(--color-fd-border)`,
|
|
52
|
+
"--tw-prose-kbd": `var(--color-fd-foreground)`,
|
|
53
|
+
"--tw-prose-kbd-shadows": `color-mix(in oklab, var(--color-fd-primary) 50%, transparent)`
|
|
54
|
+
};
|
|
55
|
+
const roundedTable = {
|
|
56
|
+
table: {
|
|
57
|
+
borderCollapse: "separate",
|
|
58
|
+
borderSpacing: "0",
|
|
59
|
+
background: "var(--color-fd-card)",
|
|
60
|
+
borderRadius: "var(--radius-lg)",
|
|
61
|
+
border: "1px solid var(--color-fd-border)",
|
|
62
|
+
overflow: "hidden"
|
|
63
|
+
},
|
|
64
|
+
th: {
|
|
65
|
+
textAlign: "start",
|
|
66
|
+
padding: "calc(var(--spacing) * 2.5)",
|
|
67
|
+
"border-inline-start": "1px solid var(--color-fd-border)",
|
|
68
|
+
background: "var(--color-fd-muted)"
|
|
69
|
+
},
|
|
70
|
+
"th:first-child": { "border-inline-start": "none" },
|
|
71
|
+
"th:not(tr:last-child *), td:not(tr:last-child *)": { "border-bottom": "1px solid var(--color-fd-border)" },
|
|
72
|
+
td: {
|
|
73
|
+
textAlign: "start",
|
|
74
|
+
"border-inline-start": "1px solid var(--color-fd-border)",
|
|
75
|
+
padding: "calc(var(--spacing) * 2.5)"
|
|
76
|
+
},
|
|
77
|
+
"td:first-child": { "border-inline-start": "none" },
|
|
78
|
+
"tfoot th, tfoot td": {
|
|
79
|
+
borderTopWidth: "1px",
|
|
80
|
+
borderTopColor: "var(--tw-prose-th-borders)"
|
|
81
|
+
},
|
|
82
|
+
"thead th, thead td": {
|
|
83
|
+
borderBottomWidth: "1px",
|
|
84
|
+
borderBottomColor: "var(--tw-prose-th-borders)"
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
const normalTable = {
|
|
88
|
+
thead: {
|
|
89
|
+
borderBottomWidth: "1px",
|
|
90
|
+
borderBottomColor: "var(--tw-prose-th-borders)"
|
|
91
|
+
},
|
|
92
|
+
"thead th": {
|
|
93
|
+
verticalAlign: "bottom",
|
|
94
|
+
paddingInlineEnd: em(8, 14),
|
|
95
|
+
paddingBottom: em(8, 14),
|
|
96
|
+
paddingInlineStart: em(8, 14)
|
|
97
|
+
},
|
|
98
|
+
"thead th:first-child": { paddingInlineStart: "0" },
|
|
99
|
+
"thead th:last-child": { paddingInlineEnd: "0" },
|
|
100
|
+
"tbody td, tfoot td": {
|
|
101
|
+
paddingTop: em(8, 14),
|
|
102
|
+
paddingInlineEnd: em(8, 14),
|
|
103
|
+
paddingBottom: em(8, 14),
|
|
104
|
+
paddingInlineStart: em(8, 14)
|
|
105
|
+
},
|
|
106
|
+
"tbody td:first-child, tfoot td:first-child": { paddingInlineStart: "0" },
|
|
107
|
+
"tbody td:last-child, tfoot td:last-child": { paddingInlineEnd: "0" },
|
|
108
|
+
"tbody tr": {
|
|
109
|
+
borderBottomWidth: "1px",
|
|
110
|
+
borderBottomColor: "var(--tw-prose-td-borders)"
|
|
111
|
+
},
|
|
112
|
+
"tbody tr:last-child": { borderBottomWidth: "0" },
|
|
113
|
+
"tbody td": { verticalAlign: "baseline" },
|
|
114
|
+
tfoot: {
|
|
115
|
+
borderTopWidth: "1px",
|
|
116
|
+
borderTopColor: "var(--tw-prose-th-borders)"
|
|
117
|
+
},
|
|
118
|
+
"tfoot td": { verticalAlign: "top" },
|
|
119
|
+
"th, td": { textAlign: "start" }
|
|
120
|
+
};
|
|
121
|
+
const DEFAULT = { css: [
|
|
122
|
+
{
|
|
123
|
+
color: "var(--tw-prose-body)",
|
|
124
|
+
maxWidth: "none",
|
|
125
|
+
fontSize: rem(16),
|
|
126
|
+
lineHeight: "1.75rem",
|
|
127
|
+
"[class~=\"lead\"]": {
|
|
128
|
+
fontSize: em(20, 16),
|
|
129
|
+
lineHeight: round(32 / 20),
|
|
130
|
+
marginTop: em(24, 20),
|
|
131
|
+
marginBottom: em(24, 20),
|
|
132
|
+
color: "var(--tw-prose-lead)"
|
|
133
|
+
},
|
|
134
|
+
ul: {
|
|
135
|
+
paddingInlineStart: "1rem",
|
|
136
|
+
listStyleType: "disc",
|
|
137
|
+
marginTop: em(20, 16),
|
|
138
|
+
marginBottom: em(20, 16)
|
|
139
|
+
},
|
|
140
|
+
li: {
|
|
141
|
+
marginTop: em(8, 16),
|
|
142
|
+
marginBottom: em(8, 16)
|
|
143
|
+
},
|
|
144
|
+
"ol > li": { paddingInlineStart: em(6, 16) },
|
|
145
|
+
"ul > li": { paddingInlineStart: "0" },
|
|
146
|
+
"> ul > li p": {
|
|
147
|
+
marginTop: em(12, 16),
|
|
148
|
+
marginBottom: em(12, 16)
|
|
149
|
+
},
|
|
150
|
+
"> ul > li > p:first-child": { marginTop: em(20, 16) },
|
|
151
|
+
"> ul > li > p:last-child": { marginBottom: em(20, 16) },
|
|
152
|
+
"> ol > li > p:first-child": { marginTop: em(20, 16) },
|
|
153
|
+
"> ol > li > p:last-child": { marginBottom: em(20, 16) },
|
|
154
|
+
"ul ul, ul ol, ol ul, ol ol": {
|
|
155
|
+
marginTop: em(12, 16),
|
|
156
|
+
marginBottom: em(12, 16)
|
|
157
|
+
},
|
|
158
|
+
dl: {
|
|
159
|
+
marginTop: em(20, 16),
|
|
160
|
+
marginBottom: em(20, 16)
|
|
161
|
+
},
|
|
162
|
+
dt: {
|
|
163
|
+
color: "var(--tw-prose-headings)",
|
|
164
|
+
fontWeight: "600",
|
|
165
|
+
marginTop: em(20, 16)
|
|
166
|
+
},
|
|
167
|
+
dd: {
|
|
168
|
+
marginTop: em(8, 16),
|
|
169
|
+
paddingInlineStart: em(26, 16)
|
|
170
|
+
},
|
|
171
|
+
hr: {
|
|
172
|
+
borderColor: "var(--tw-prose-hr)",
|
|
173
|
+
borderTopWidth: "1px",
|
|
174
|
+
marginTop: em(48, 16),
|
|
175
|
+
marginBottom: em(48, 16)
|
|
176
|
+
},
|
|
177
|
+
p: {
|
|
178
|
+
marginTop: em(20, 16),
|
|
179
|
+
marginBottom: em(20, 16)
|
|
180
|
+
},
|
|
181
|
+
strong: {
|
|
182
|
+
color: "var(--tw-prose-bold)",
|
|
183
|
+
fontWeight: "500"
|
|
184
|
+
},
|
|
185
|
+
"a strong": { color: "inherit" },
|
|
186
|
+
"blockquote strong": { color: "inherit" },
|
|
187
|
+
"thead th strong": { color: "inherit" },
|
|
188
|
+
ol: {
|
|
189
|
+
listStyleType: "decimal",
|
|
190
|
+
marginTop: em(20, 16),
|
|
191
|
+
marginBottom: em(20, 16),
|
|
192
|
+
paddingInlineStart: em(26, 16)
|
|
193
|
+
},
|
|
194
|
+
"ol[type=\"A\"]": { listStyleType: "upper-alpha" },
|
|
195
|
+
"ol[type=\"a\"]": { listStyleType: "lower-alpha" },
|
|
196
|
+
"ol[type=\"A\" s]": { listStyleType: "upper-alpha" },
|
|
197
|
+
"ol[type=\"a\" s]": { listStyleType: "lower-alpha" },
|
|
198
|
+
"ol[type=\"I\"]": { listStyleType: "upper-roman" },
|
|
199
|
+
"ol[type=\"i\"]": { listStyleType: "lower-roman" },
|
|
200
|
+
"ol[type=\"I\" s]": { listStyleType: "upper-roman" },
|
|
201
|
+
"ol[type=\"i\" s]": { listStyleType: "lower-roman" },
|
|
202
|
+
"ol[type=\"1\"]": { listStyleType: "decimal" },
|
|
203
|
+
"ol > li::marker": {
|
|
204
|
+
fontWeight: "400",
|
|
205
|
+
color: "var(--tw-prose-counters)"
|
|
206
|
+
},
|
|
207
|
+
"ul > li::marker": { color: "var(--tw-prose-bullets)" },
|
|
208
|
+
blockquote: {
|
|
209
|
+
marginTop: em(32, 20),
|
|
210
|
+
marginBottom: em(32, 20),
|
|
211
|
+
paddingInlineStart: em(20, 20),
|
|
212
|
+
fontWeight: "500",
|
|
213
|
+
fontStyle: "italic",
|
|
214
|
+
color: "var(--tw-prose-quotes)",
|
|
215
|
+
borderInlineStartWidth: "0.25rem",
|
|
216
|
+
borderInlineStartColor: "var(--tw-prose-quote-borders)",
|
|
217
|
+
quotes: "\"\\201C\"\"\\201D\"\"\\2018\"\"\\2019\""
|
|
218
|
+
},
|
|
219
|
+
"blockquote p:first-of-type::before": { content: "open-quote" },
|
|
220
|
+
"blockquote p:last-of-type::after": { content: "close-quote" },
|
|
221
|
+
h1: {
|
|
222
|
+
color: "var(--tw-prose-headings)",
|
|
223
|
+
fontWeight: "800",
|
|
224
|
+
fontSize: "var(--text-3xl)",
|
|
225
|
+
marginTop: "0",
|
|
226
|
+
marginBottom: em(32, 36),
|
|
227
|
+
lineHeight: round(40 / 36)
|
|
228
|
+
},
|
|
229
|
+
"h1 strong": {
|
|
230
|
+
fontWeight: "900",
|
|
231
|
+
color: "inherit"
|
|
232
|
+
},
|
|
233
|
+
h2: {
|
|
234
|
+
color: "var(--tw-prose-headings)",
|
|
235
|
+
fontSize: em(24, 16),
|
|
236
|
+
marginTop: em(48, 24),
|
|
237
|
+
marginBottom: em(24, 24),
|
|
238
|
+
lineHeight: round(32 / 24),
|
|
239
|
+
fontWeight: "600"
|
|
240
|
+
},
|
|
241
|
+
"h2 strong": {
|
|
242
|
+
fontWeight: "800",
|
|
243
|
+
color: "inherit"
|
|
244
|
+
},
|
|
245
|
+
h3: {
|
|
246
|
+
color: "var(--tw-prose-headings)",
|
|
247
|
+
fontWeight: "600",
|
|
248
|
+
fontSize: em(20, 16),
|
|
249
|
+
marginTop: em(32, 20),
|
|
250
|
+
marginBottom: em(12, 20),
|
|
251
|
+
lineHeight: round(32 / 20)
|
|
252
|
+
},
|
|
253
|
+
"h3 strong": {
|
|
254
|
+
fontWeight: "700",
|
|
255
|
+
color: "inherit"
|
|
256
|
+
},
|
|
257
|
+
h4: {
|
|
258
|
+
color: "var(--tw-prose-headings)",
|
|
259
|
+
fontWeight: "600",
|
|
260
|
+
marginTop: em(24, 16),
|
|
261
|
+
marginBottom: em(8, 16),
|
|
262
|
+
lineHeight: round(24 / 16)
|
|
263
|
+
},
|
|
264
|
+
"h4 strong": {
|
|
265
|
+
fontWeight: "700",
|
|
266
|
+
color: "inherit"
|
|
267
|
+
},
|
|
268
|
+
"hr + *": { marginTop: "0" },
|
|
269
|
+
"h2 + *": { marginTop: "0" },
|
|
270
|
+
"h3 + *": { marginTop: "0" },
|
|
271
|
+
"h4 + *": { marginTop: "0" },
|
|
272
|
+
img: {
|
|
273
|
+
marginTop: em(32, 16),
|
|
274
|
+
marginBottom: em(32, 16)
|
|
275
|
+
},
|
|
276
|
+
picture: {
|
|
277
|
+
display: "block",
|
|
278
|
+
marginTop: em(32, 16),
|
|
279
|
+
marginBottom: em(32, 16)
|
|
280
|
+
},
|
|
281
|
+
"picture > img": {
|
|
282
|
+
marginTop: "0",
|
|
283
|
+
marginBottom: "0"
|
|
284
|
+
},
|
|
285
|
+
video: {
|
|
286
|
+
marginTop: em(32, 16),
|
|
287
|
+
marginBottom: em(32, 16)
|
|
288
|
+
},
|
|
289
|
+
kbd: {
|
|
290
|
+
fontSize: em(14, 16),
|
|
291
|
+
borderRadius: rem(5),
|
|
292
|
+
paddingTop: em(3, 16),
|
|
293
|
+
paddingInlineEnd: em(6, 16),
|
|
294
|
+
paddingBottom: em(3, 16),
|
|
295
|
+
paddingInlineStart: em(6, 16),
|
|
296
|
+
fontWeight: "500",
|
|
297
|
+
fontFamily: "inherit",
|
|
298
|
+
color: "var(--tw-prose-kbd)",
|
|
299
|
+
boxShadow: "0 0 0 1px var(--tw-prose-kbd-shadows),0 3px 0 var(--tw-prose-kbd-shadows)"
|
|
300
|
+
},
|
|
301
|
+
code: {
|
|
302
|
+
padding: "3px",
|
|
303
|
+
border: "solid 1px",
|
|
304
|
+
fontSize: "13px",
|
|
305
|
+
borderColor: `var(--color-fd-border)`,
|
|
306
|
+
borderRadius: "5px",
|
|
307
|
+
fontWeight: "400",
|
|
308
|
+
background: `var(--color-fd-muted)`,
|
|
309
|
+
color: "var(--tw-prose-code)"
|
|
310
|
+
},
|
|
311
|
+
"a code": { color: "inherit" },
|
|
312
|
+
"h1 code": {
|
|
313
|
+
color: "inherit",
|
|
314
|
+
fontSize: "var(--text-2xl)"
|
|
315
|
+
},
|
|
316
|
+
"h2 code": {
|
|
317
|
+
color: "inherit",
|
|
318
|
+
fontSize: em(21, 24)
|
|
319
|
+
},
|
|
320
|
+
"h3 code": {
|
|
321
|
+
color: "inherit",
|
|
322
|
+
fontSize: em(18, 20)
|
|
323
|
+
},
|
|
324
|
+
"h4 code": { color: "inherit" },
|
|
325
|
+
"blockquote code": { color: "inherit" },
|
|
326
|
+
"thead th code": { color: "inherit" },
|
|
327
|
+
table: {
|
|
328
|
+
fontSize: em(14, 16),
|
|
329
|
+
lineHeight: round(24 / 14),
|
|
330
|
+
width: "100%",
|
|
331
|
+
tableLayout: "auto",
|
|
332
|
+
marginTop: em(32, 16),
|
|
333
|
+
marginBottom: em(32, 16)
|
|
334
|
+
},
|
|
335
|
+
"thead th": {
|
|
336
|
+
color: "var(--tw-prose-headings)",
|
|
337
|
+
fontWeight: "600"
|
|
338
|
+
},
|
|
339
|
+
figure: {
|
|
340
|
+
marginTop: em(32, 16),
|
|
341
|
+
marginBottom: em(32, 16)
|
|
342
|
+
},
|
|
343
|
+
"figure > *": {
|
|
344
|
+
marginTop: "0",
|
|
345
|
+
marginBottom: "0"
|
|
346
|
+
},
|
|
347
|
+
figcaption: {
|
|
348
|
+
color: "var(--tw-prose-captions)",
|
|
349
|
+
fontSize: em(14, 16),
|
|
350
|
+
lineHeight: round(20 / 14),
|
|
351
|
+
marginTop: em(12, 14)
|
|
352
|
+
},
|
|
353
|
+
"a:not([data-card])": {
|
|
354
|
+
color: "var(--tw-prose-links)",
|
|
355
|
+
transition: "opacity .2s",
|
|
356
|
+
fontWeight: "500",
|
|
357
|
+
textDecoration: "underline",
|
|
358
|
+
textUnderlineOffset: "3.5px",
|
|
359
|
+
textDecorationColor: "var(--color-fd-primary)",
|
|
360
|
+
textDecorationThickness: "1.5px"
|
|
361
|
+
},
|
|
362
|
+
"a:not([data-card]):hover": { opacity: "80%" }
|
|
363
|
+
},
|
|
364
|
+
colors,
|
|
365
|
+
{
|
|
366
|
+
"> :first-child": { marginTop: "0" },
|
|
367
|
+
"> :last-child": { marginBottom: "0" }
|
|
368
|
+
}
|
|
369
|
+
] };
|
|
370
|
+
//#endregion
|
|
371
|
+
//#region ../../node_modules/.pnpm/@fastify+deepmerge@3.2.1/node_modules/@fastify/deepmerge/index.js
|
|
372
|
+
var require_deepmerge = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
373
|
+
const JSON_PROTO = Object.getPrototypeOf({});
|
|
374
|
+
function defaultIsMergeableObjectFactory() {
|
|
375
|
+
return function defaultIsMergeableObject(value) {
|
|
376
|
+
return typeof value === "object" && value !== null && !(value instanceof RegExp) && !(value instanceof Date);
|
|
377
|
+
};
|
|
378
|
+
}
|
|
379
|
+
function deepmergeConstructor(options) {
|
|
380
|
+
function isNotPrototypeKey(value) {
|
|
381
|
+
return value !== "constructor" && value !== "prototype" && value !== "__proto__";
|
|
382
|
+
}
|
|
383
|
+
function cloneArray(value) {
|
|
384
|
+
let i = 0;
|
|
385
|
+
const il = value.length;
|
|
386
|
+
const result = new Array(il);
|
|
387
|
+
for (; i < il; ++i) result[i] = clone(value[i]);
|
|
388
|
+
return result;
|
|
389
|
+
}
|
|
390
|
+
function cloneObject(target) {
|
|
391
|
+
const result = {};
|
|
392
|
+
if (cloneProtoObject && Object.getPrototypeOf(target) !== JSON_PROTO) return cloneProtoObject(target);
|
|
393
|
+
const targetKeys = getKeys(target);
|
|
394
|
+
let i, il, key;
|
|
395
|
+
for (i = 0, il = targetKeys.length; i < il; ++i) isNotPrototypeKey(key = targetKeys[i]) && (result[key] = clone(target[key]));
|
|
396
|
+
return result;
|
|
397
|
+
}
|
|
398
|
+
function concatArrays(target, source) {
|
|
399
|
+
const tl = target.length;
|
|
400
|
+
const sl = source.length;
|
|
401
|
+
let i = 0;
|
|
402
|
+
const result = new Array(tl + sl);
|
|
403
|
+
for (; i < tl; ++i) result[i] = clone(target[i]);
|
|
404
|
+
for (i = 0; i < sl; ++i) result[i + tl] = clone(source[i]);
|
|
405
|
+
return result;
|
|
406
|
+
}
|
|
407
|
+
const propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
408
|
+
function getSymbolsAndKeys(value) {
|
|
409
|
+
const result = Object.keys(value);
|
|
410
|
+
const keys = Object.getOwnPropertySymbols(value);
|
|
411
|
+
for (let i = 0, il = keys.length; i < il; ++i) propertyIsEnumerable.call(value, keys[i]) && result.push(keys[i]);
|
|
412
|
+
return result;
|
|
413
|
+
}
|
|
414
|
+
const getKeys = options?.symbols ? getSymbolsAndKeys : Object.keys;
|
|
415
|
+
const cloneProtoObject = typeof options?.cloneProtoObject === "function" ? options.cloneProtoObject : void 0;
|
|
416
|
+
const isMergeableObject = typeof options?.isMergeableObject === "function" ? options.isMergeableObject : defaultIsMergeableObjectFactory();
|
|
417
|
+
const onlyDefinedProperties = options?.onlyDefinedProperties === true;
|
|
418
|
+
function isPrimitive(value) {
|
|
419
|
+
return typeof value !== "object" || value === null;
|
|
420
|
+
}
|
|
421
|
+
const mergeArray = options && typeof options.mergeArray === "function" ? options.mergeArray({
|
|
422
|
+
clone,
|
|
423
|
+
deepmerge: _deepmerge,
|
|
424
|
+
getKeys,
|
|
425
|
+
isMergeableObject
|
|
426
|
+
}) : concatArrays;
|
|
427
|
+
function clone(entry) {
|
|
428
|
+
return isMergeableObject(entry) ? Array.isArray(entry) ? cloneArray(entry) : cloneObject(entry) : entry;
|
|
429
|
+
}
|
|
430
|
+
function mergeObject(target, source) {
|
|
431
|
+
const result = {};
|
|
432
|
+
const targetKeys = getKeys(target);
|
|
433
|
+
const sourceKeys = getKeys(source);
|
|
434
|
+
let i, il, key;
|
|
435
|
+
for (i = 0, il = targetKeys.length; i < il; ++i) isNotPrototypeKey(key = targetKeys[i]) && sourceKeys.indexOf(key) === -1 && (result[key] = clone(target[key]));
|
|
436
|
+
for (i = 0, il = sourceKeys.length; i < il; ++i) {
|
|
437
|
+
if (!isNotPrototypeKey(key = sourceKeys[i])) continue;
|
|
438
|
+
if (key in target) {
|
|
439
|
+
if (targetKeys.indexOf(key) !== -1) if (cloneProtoObject && isMergeableObject(source[key]) && Object.getPrototypeOf(source[key]) !== JSON_PROTO) result[key] = cloneProtoObject(source[key]);
|
|
440
|
+
else result[key] = _deepmerge(target[key], source[key]);
|
|
441
|
+
} else {
|
|
442
|
+
if (onlyDefinedProperties && typeof source[key] === "undefined") continue;
|
|
443
|
+
result[key] = clone(source[key]);
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
return result;
|
|
447
|
+
}
|
|
448
|
+
function _deepmerge(target, source) {
|
|
449
|
+
if (onlyDefinedProperties && typeof source === "undefined") return clone(target);
|
|
450
|
+
const sourceIsArray = Array.isArray(source);
|
|
451
|
+
const targetIsArray = Array.isArray(target);
|
|
452
|
+
if (isPrimitive(source)) return source;
|
|
453
|
+
else if (!isMergeableObject(target)) return clone(source);
|
|
454
|
+
else if (sourceIsArray && targetIsArray) return mergeArray(target, source);
|
|
455
|
+
else if (sourceIsArray !== targetIsArray) return clone(source);
|
|
456
|
+
else return mergeObject(target, source);
|
|
457
|
+
}
|
|
458
|
+
function _deepmergeAll() {
|
|
459
|
+
switch (arguments.length) {
|
|
460
|
+
case 0: return {};
|
|
461
|
+
case 1: return clone(arguments[0]);
|
|
462
|
+
case 2: return _deepmerge(arguments[0], arguments[1]);
|
|
463
|
+
}
|
|
464
|
+
let result;
|
|
465
|
+
for (let i = 0, il = arguments.length; i < il; ++i) result = _deepmerge(result, arguments[i]);
|
|
466
|
+
return result;
|
|
467
|
+
}
|
|
468
|
+
return options?.all ? _deepmergeAll : _deepmerge;
|
|
469
|
+
}
|
|
470
|
+
module.exports = deepmergeConstructor;
|
|
471
|
+
module.exports.default = deepmergeConstructor;
|
|
472
|
+
module.exports.deepmerge = deepmergeConstructor;
|
|
473
|
+
Object.defineProperty(module.exports, "isMergeableObject", { get: defaultIsMergeableObjectFactory });
|
|
474
|
+
}));
|
|
475
|
+
//#endregion
|
|
476
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/util/unesc.js
|
|
477
|
+
var require_unesc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
478
|
+
exports.__esModule = true;
|
|
479
|
+
exports["default"] = unesc;
|
|
480
|
+
/**
|
|
481
|
+
*
|
|
482
|
+
* @param {string} str
|
|
483
|
+
* @returns {[string, number]|undefined}
|
|
484
|
+
*/
|
|
485
|
+
function gobbleHex(str) {
|
|
486
|
+
var lower = str.toLowerCase();
|
|
487
|
+
var hex = "";
|
|
488
|
+
var spaceTerminated = false;
|
|
489
|
+
for (var i = 0; i < 6 && lower[i] !== void 0; i++) {
|
|
490
|
+
var code = lower.charCodeAt(i);
|
|
491
|
+
var valid = code >= 97 && code <= 102 || code >= 48 && code <= 57;
|
|
492
|
+
spaceTerminated = code === 32;
|
|
493
|
+
if (!valid) break;
|
|
494
|
+
hex += lower[i];
|
|
495
|
+
}
|
|
496
|
+
if (hex.length === 0) return;
|
|
497
|
+
var codePoint = parseInt(hex, 16);
|
|
498
|
+
if (codePoint >= 55296 && codePoint <= 57343 || codePoint === 0 || codePoint > 1114111) return ["�", hex.length + (spaceTerminated ? 1 : 0)];
|
|
499
|
+
return [String.fromCodePoint(codePoint), hex.length + (spaceTerminated ? 1 : 0)];
|
|
500
|
+
}
|
|
501
|
+
var CONTAINS_ESCAPE = /\\/;
|
|
502
|
+
function unesc(str) {
|
|
503
|
+
if (!CONTAINS_ESCAPE.test(str)) return str;
|
|
504
|
+
var ret = "";
|
|
505
|
+
for (var i = 0; i < str.length; i++) {
|
|
506
|
+
if (str[i] === "\\") {
|
|
507
|
+
var gobbled = gobbleHex(str.slice(i + 1, i + 7));
|
|
508
|
+
if (gobbled !== void 0) {
|
|
509
|
+
ret += gobbled[0];
|
|
510
|
+
i += gobbled[1];
|
|
511
|
+
continue;
|
|
512
|
+
}
|
|
513
|
+
if (str[i + 1] === "\\") {
|
|
514
|
+
ret += "\\";
|
|
515
|
+
i++;
|
|
516
|
+
continue;
|
|
517
|
+
}
|
|
518
|
+
if (str.length === i + 1) ret += str[i];
|
|
519
|
+
continue;
|
|
520
|
+
}
|
|
521
|
+
ret += str[i];
|
|
522
|
+
}
|
|
523
|
+
return ret;
|
|
524
|
+
}
|
|
525
|
+
module.exports = exports.default;
|
|
526
|
+
}));
|
|
527
|
+
//#endregion
|
|
528
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/util/getProp.js
|
|
529
|
+
var require_getProp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
530
|
+
exports.__esModule = true;
|
|
531
|
+
exports["default"] = getProp;
|
|
532
|
+
function getProp(obj) {
|
|
533
|
+
for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) props[_key - 1] = arguments[_key];
|
|
534
|
+
while (props.length > 0) {
|
|
535
|
+
var prop = props.shift();
|
|
536
|
+
if (!obj[prop]) return;
|
|
537
|
+
obj = obj[prop];
|
|
538
|
+
}
|
|
539
|
+
return obj;
|
|
540
|
+
}
|
|
541
|
+
module.exports = exports.default;
|
|
542
|
+
}));
|
|
543
|
+
//#endregion
|
|
544
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/util/ensureObject.js
|
|
545
|
+
var require_ensureObject = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
546
|
+
exports.__esModule = true;
|
|
547
|
+
exports["default"] = ensureObject;
|
|
548
|
+
function ensureObject(obj) {
|
|
549
|
+
for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) props[_key - 1] = arguments[_key];
|
|
550
|
+
while (props.length > 0) {
|
|
551
|
+
var prop = props.shift();
|
|
552
|
+
if (!obj[prop]) obj[prop] = {};
|
|
553
|
+
obj = obj[prop];
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
module.exports = exports.default;
|
|
557
|
+
}));
|
|
558
|
+
//#endregion
|
|
559
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/util/stripComments.js
|
|
560
|
+
var require_stripComments = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
561
|
+
exports.__esModule = true;
|
|
562
|
+
exports["default"] = stripComments;
|
|
563
|
+
function stripComments(str) {
|
|
564
|
+
var s = "";
|
|
565
|
+
var commentStart = str.indexOf("/*");
|
|
566
|
+
var lastEnd = 0;
|
|
567
|
+
while (commentStart >= 0) {
|
|
568
|
+
s = s + str.slice(lastEnd, commentStart);
|
|
569
|
+
var commentEnd = str.indexOf("*/", commentStart + 2);
|
|
570
|
+
if (commentEnd < 0) return s;
|
|
571
|
+
lastEnd = commentEnd + 2;
|
|
572
|
+
commentStart = str.indexOf("/*", lastEnd);
|
|
573
|
+
}
|
|
574
|
+
s = s + str.slice(lastEnd);
|
|
575
|
+
return s;
|
|
576
|
+
}
|
|
577
|
+
module.exports = exports.default;
|
|
578
|
+
}));
|
|
579
|
+
//#endregion
|
|
580
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/util/index.js
|
|
581
|
+
var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
582
|
+
exports.__esModule = true;
|
|
583
|
+
exports.unesc = exports.stripComments = exports.getProp = exports.ensureObject = void 0;
|
|
584
|
+
exports.unesc = _interopRequireDefault(require_unesc())["default"];
|
|
585
|
+
exports.getProp = _interopRequireDefault(require_getProp())["default"];
|
|
586
|
+
exports.ensureObject = _interopRequireDefault(require_ensureObject())["default"];
|
|
587
|
+
exports.stripComments = _interopRequireDefault(require_stripComments())["default"];
|
|
588
|
+
function _interopRequireDefault(obj) {
|
|
589
|
+
return obj && obj.__esModule ? obj : { "default": obj };
|
|
590
|
+
}
|
|
591
|
+
}));
|
|
592
|
+
//#endregion
|
|
593
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/node.js
|
|
594
|
+
var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
595
|
+
exports.__esModule = true;
|
|
596
|
+
exports["default"] = void 0;
|
|
597
|
+
var _util = require_util();
|
|
598
|
+
function _defineProperties(target, props) {
|
|
599
|
+
for (var i = 0; i < props.length; i++) {
|
|
600
|
+
var descriptor = props[i];
|
|
601
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
602
|
+
descriptor.configurable = true;
|
|
603
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
604
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
608
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
609
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
610
|
+
Object.defineProperty(Constructor, "prototype", { writable: false });
|
|
611
|
+
return Constructor;
|
|
612
|
+
}
|
|
613
|
+
var cloneNode = function cloneNode(obj, parent) {
|
|
614
|
+
if (typeof obj !== "object" || obj === null) return obj;
|
|
615
|
+
var cloned = new obj.constructor();
|
|
616
|
+
for (var i in obj) {
|
|
617
|
+
if (!obj.hasOwnProperty(i)) continue;
|
|
618
|
+
var value = obj[i];
|
|
619
|
+
if (i === "parent" && typeof value === "object") {
|
|
620
|
+
if (parent) cloned[i] = parent;
|
|
621
|
+
} else if (value instanceof Array) cloned[i] = value.map(function(j) {
|
|
622
|
+
return cloneNode(j, cloned);
|
|
623
|
+
});
|
|
624
|
+
else cloned[i] = cloneNode(value, cloned);
|
|
625
|
+
}
|
|
626
|
+
return cloned;
|
|
627
|
+
};
|
|
628
|
+
exports["default"] = /* @__PURE__ */ function() {
|
|
629
|
+
function Node(opts) {
|
|
630
|
+
if (opts === void 0) opts = {};
|
|
631
|
+
Object.assign(this, opts);
|
|
632
|
+
this.spaces = this.spaces || {};
|
|
633
|
+
this.spaces.before = this.spaces.before || "";
|
|
634
|
+
this.spaces.after = this.spaces.after || "";
|
|
635
|
+
}
|
|
636
|
+
var _proto = Node.prototype;
|
|
637
|
+
_proto.remove = function remove() {
|
|
638
|
+
if (this.parent) this.parent.removeChild(this);
|
|
639
|
+
this.parent = void 0;
|
|
640
|
+
return this;
|
|
641
|
+
};
|
|
642
|
+
_proto.replaceWith = function replaceWith() {
|
|
643
|
+
if (this.parent) {
|
|
644
|
+
for (var index in arguments) this.parent.insertBefore(this, arguments[index]);
|
|
645
|
+
this.remove();
|
|
646
|
+
}
|
|
647
|
+
return this;
|
|
648
|
+
};
|
|
649
|
+
_proto.next = function next() {
|
|
650
|
+
return this.parent.at(this.parent.index(this) + 1);
|
|
651
|
+
};
|
|
652
|
+
_proto.prev = function prev() {
|
|
653
|
+
return this.parent.at(this.parent.index(this) - 1);
|
|
654
|
+
};
|
|
655
|
+
_proto.clone = function clone(overrides) {
|
|
656
|
+
if (overrides === void 0) overrides = {};
|
|
657
|
+
var cloned = cloneNode(this);
|
|
658
|
+
for (var name in overrides) cloned[name] = overrides[name];
|
|
659
|
+
return cloned;
|
|
660
|
+
};
|
|
661
|
+
_proto.appendToPropertyAndEscape = function appendToPropertyAndEscape(name, value, valueEscaped) {
|
|
662
|
+
if (!this.raws) this.raws = {};
|
|
663
|
+
var originalValue = this[name];
|
|
664
|
+
var originalEscaped = this.raws[name];
|
|
665
|
+
this[name] = originalValue + value;
|
|
666
|
+
if (originalEscaped || valueEscaped !== value) this.raws[name] = (originalEscaped || originalValue) + valueEscaped;
|
|
667
|
+
else delete this.raws[name];
|
|
668
|
+
};
|
|
669
|
+
_proto.setPropertyAndEscape = function setPropertyAndEscape(name, value, valueEscaped) {
|
|
670
|
+
if (!this.raws) this.raws = {};
|
|
671
|
+
this[name] = value;
|
|
672
|
+
this.raws[name] = valueEscaped;
|
|
673
|
+
};
|
|
674
|
+
_proto.setPropertyWithoutEscape = function setPropertyWithoutEscape(name, value) {
|
|
675
|
+
this[name] = value;
|
|
676
|
+
if (this.raws) delete this.raws[name];
|
|
677
|
+
};
|
|
678
|
+
_proto.isAtPosition = function isAtPosition(line, column) {
|
|
679
|
+
if (this.source && this.source.start && this.source.end) {
|
|
680
|
+
if (this.source.start.line > line) return false;
|
|
681
|
+
if (this.source.end.line < line) return false;
|
|
682
|
+
if (this.source.start.line === line && this.source.start.column > column) return false;
|
|
683
|
+
if (this.source.end.line === line && this.source.end.column < column) return false;
|
|
684
|
+
return true;
|
|
685
|
+
}
|
|
686
|
+
};
|
|
687
|
+
_proto.stringifyProperty = function stringifyProperty(name) {
|
|
688
|
+
return this.raws && this.raws[name] || this[name];
|
|
689
|
+
};
|
|
690
|
+
_proto.valueToString = function valueToString() {
|
|
691
|
+
return String(this.stringifyProperty("value"));
|
|
692
|
+
};
|
|
693
|
+
_proto.toString = function toString() {
|
|
694
|
+
return [
|
|
695
|
+
this.rawSpaceBefore,
|
|
696
|
+
this.valueToString(),
|
|
697
|
+
this.rawSpaceAfter
|
|
698
|
+
].join("");
|
|
699
|
+
};
|
|
700
|
+
_createClass(Node, [{
|
|
701
|
+
key: "rawSpaceBefore",
|
|
702
|
+
get: function get() {
|
|
703
|
+
var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.before;
|
|
704
|
+
if (rawSpace === void 0) rawSpace = this.spaces && this.spaces.before;
|
|
705
|
+
return rawSpace || "";
|
|
706
|
+
},
|
|
707
|
+
set: function set(raw) {
|
|
708
|
+
(0, _util.ensureObject)(this, "raws", "spaces");
|
|
709
|
+
this.raws.spaces.before = raw;
|
|
710
|
+
}
|
|
711
|
+
}, {
|
|
712
|
+
key: "rawSpaceAfter",
|
|
713
|
+
get: function get() {
|
|
714
|
+
var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.after;
|
|
715
|
+
if (rawSpace === void 0) rawSpace = this.spaces.after;
|
|
716
|
+
return rawSpace || "";
|
|
717
|
+
},
|
|
718
|
+
set: function set(raw) {
|
|
719
|
+
(0, _util.ensureObject)(this, "raws", "spaces");
|
|
720
|
+
this.raws.spaces.after = raw;
|
|
721
|
+
}
|
|
722
|
+
}]);
|
|
723
|
+
return Node;
|
|
724
|
+
}();
|
|
725
|
+
module.exports = exports.default;
|
|
726
|
+
}));
|
|
727
|
+
//#endregion
|
|
728
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/types.js
|
|
729
|
+
var require_types = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
730
|
+
exports.__esModule = true;
|
|
731
|
+
exports.UNIVERSAL = exports.TAG = exports.STRING = exports.SELECTOR = exports.ROOT = exports.PSEUDO = exports.NESTING = exports.ID = exports.COMMENT = exports.COMBINATOR = exports.CLASS = exports.ATTRIBUTE = void 0;
|
|
732
|
+
exports.TAG = "tag";
|
|
733
|
+
exports.STRING = "string";
|
|
734
|
+
exports.SELECTOR = "selector";
|
|
735
|
+
exports.ROOT = "root";
|
|
736
|
+
exports.PSEUDO = "pseudo";
|
|
737
|
+
exports.NESTING = "nesting";
|
|
738
|
+
exports.ID = "id";
|
|
739
|
+
exports.COMMENT = "comment";
|
|
740
|
+
exports.COMBINATOR = "combinator";
|
|
741
|
+
exports.CLASS = "class";
|
|
742
|
+
exports.ATTRIBUTE = "attribute";
|
|
743
|
+
exports.UNIVERSAL = "universal";
|
|
744
|
+
}));
|
|
745
|
+
//#endregion
|
|
746
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/container.js
|
|
747
|
+
var require_container = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
748
|
+
exports.__esModule = true;
|
|
749
|
+
exports["default"] = void 0;
|
|
750
|
+
var _node = _interopRequireDefault(require_node$1());
|
|
751
|
+
var types = _interopRequireWildcard(require_types());
|
|
752
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
753
|
+
if (typeof WeakMap !== "function") return null;
|
|
754
|
+
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
755
|
+
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
756
|
+
return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
|
|
757
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
758
|
+
})(nodeInterop);
|
|
759
|
+
}
|
|
760
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
761
|
+
if (!nodeInterop && obj && obj.__esModule) return obj;
|
|
762
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { "default": obj };
|
|
763
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
764
|
+
if (cache && cache.has(obj)) return cache.get(obj);
|
|
765
|
+
var newObj = {};
|
|
766
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
767
|
+
for (var key in obj) if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
768
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
769
|
+
if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
|
|
770
|
+
else newObj[key] = obj[key];
|
|
771
|
+
}
|
|
772
|
+
newObj["default"] = obj;
|
|
773
|
+
if (cache) cache.set(obj, newObj);
|
|
774
|
+
return newObj;
|
|
775
|
+
}
|
|
776
|
+
function _interopRequireDefault(obj) {
|
|
777
|
+
return obj && obj.__esModule ? obj : { "default": obj };
|
|
778
|
+
}
|
|
779
|
+
function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
|
780
|
+
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
781
|
+
if (it) return (it = it.call(o)).next.bind(it);
|
|
782
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
783
|
+
if (it) o = it;
|
|
784
|
+
var i = 0;
|
|
785
|
+
return function() {
|
|
786
|
+
if (i >= o.length) return { done: true };
|
|
787
|
+
return {
|
|
788
|
+
done: false,
|
|
789
|
+
value: o[i++]
|
|
790
|
+
};
|
|
791
|
+
};
|
|
792
|
+
}
|
|
793
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
794
|
+
}
|
|
795
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
796
|
+
if (!o) return;
|
|
797
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
798
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
799
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
800
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
801
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
802
|
+
}
|
|
803
|
+
function _arrayLikeToArray(arr, len) {
|
|
804
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
805
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
806
|
+
return arr2;
|
|
807
|
+
}
|
|
808
|
+
function _defineProperties(target, props) {
|
|
809
|
+
for (var i = 0; i < props.length; i++) {
|
|
810
|
+
var descriptor = props[i];
|
|
811
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
812
|
+
descriptor.configurable = true;
|
|
813
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
814
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
818
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
819
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
820
|
+
Object.defineProperty(Constructor, "prototype", { writable: false });
|
|
821
|
+
return Constructor;
|
|
822
|
+
}
|
|
823
|
+
function _inheritsLoose(subClass, superClass) {
|
|
824
|
+
subClass.prototype = Object.create(superClass.prototype);
|
|
825
|
+
subClass.prototype.constructor = subClass;
|
|
826
|
+
_setPrototypeOf(subClass, superClass);
|
|
827
|
+
}
|
|
828
|
+
function _setPrototypeOf(o, p) {
|
|
829
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
830
|
+
o.__proto__ = p;
|
|
831
|
+
return o;
|
|
832
|
+
};
|
|
833
|
+
return _setPrototypeOf(o, p);
|
|
834
|
+
}
|
|
835
|
+
exports["default"] = /* @__PURE__ */ function(_Node) {
|
|
836
|
+
_inheritsLoose(Container, _Node);
|
|
837
|
+
function Container(opts) {
|
|
838
|
+
var _this = _Node.call(this, opts) || this;
|
|
839
|
+
if (!_this.nodes) _this.nodes = [];
|
|
840
|
+
return _this;
|
|
841
|
+
}
|
|
842
|
+
var _proto = Container.prototype;
|
|
843
|
+
_proto.append = function append(selector) {
|
|
844
|
+
selector.parent = this;
|
|
845
|
+
this.nodes.push(selector);
|
|
846
|
+
return this;
|
|
847
|
+
};
|
|
848
|
+
_proto.prepend = function prepend(selector) {
|
|
849
|
+
selector.parent = this;
|
|
850
|
+
this.nodes.unshift(selector);
|
|
851
|
+
for (var id in this.indexes) this.indexes[id]++;
|
|
852
|
+
return this;
|
|
853
|
+
};
|
|
854
|
+
_proto.at = function at(index) {
|
|
855
|
+
return this.nodes[index];
|
|
856
|
+
};
|
|
857
|
+
_proto.index = function index(child) {
|
|
858
|
+
if (typeof child === "number") return child;
|
|
859
|
+
return this.nodes.indexOf(child);
|
|
860
|
+
};
|
|
861
|
+
_proto.removeChild = function removeChild(child) {
|
|
862
|
+
child = this.index(child);
|
|
863
|
+
this.at(child).parent = void 0;
|
|
864
|
+
this.nodes.splice(child, 1);
|
|
865
|
+
var index;
|
|
866
|
+
for (var id in this.indexes) {
|
|
867
|
+
index = this.indexes[id];
|
|
868
|
+
if (index >= child) this.indexes[id] = index - 1;
|
|
869
|
+
}
|
|
870
|
+
return this;
|
|
871
|
+
};
|
|
872
|
+
_proto.removeAll = function removeAll() {
|
|
873
|
+
for (var _iterator = _createForOfIteratorHelperLoose(this.nodes), _step; !(_step = _iterator()).done;) {
|
|
874
|
+
var node = _step.value;
|
|
875
|
+
node.parent = void 0;
|
|
876
|
+
}
|
|
877
|
+
this.nodes = [];
|
|
878
|
+
return this;
|
|
879
|
+
};
|
|
880
|
+
_proto.empty = function empty() {
|
|
881
|
+
return this.removeAll();
|
|
882
|
+
};
|
|
883
|
+
_proto.insertAfter = function insertAfter(oldNode, newNode) {
|
|
884
|
+
var _this$nodes;
|
|
885
|
+
newNode.parent = this;
|
|
886
|
+
var oldIndex = this.index(oldNode);
|
|
887
|
+
var resetNode = [];
|
|
888
|
+
for (var i = 2; i < arguments.length; i++) resetNode.push(arguments[i]);
|
|
889
|
+
(_this$nodes = this.nodes).splice.apply(_this$nodes, [
|
|
890
|
+
oldIndex + 1,
|
|
891
|
+
0,
|
|
892
|
+
newNode
|
|
893
|
+
].concat(resetNode));
|
|
894
|
+
newNode.parent = this;
|
|
895
|
+
var index;
|
|
896
|
+
for (var id in this.indexes) {
|
|
897
|
+
index = this.indexes[id];
|
|
898
|
+
if (oldIndex < index) this.indexes[id] = index + arguments.length - 1;
|
|
899
|
+
}
|
|
900
|
+
return this;
|
|
901
|
+
};
|
|
902
|
+
_proto.insertBefore = function insertBefore(oldNode, newNode) {
|
|
903
|
+
var _this$nodes2;
|
|
904
|
+
newNode.parent = this;
|
|
905
|
+
var oldIndex = this.index(oldNode);
|
|
906
|
+
var resetNode = [];
|
|
907
|
+
for (var i = 2; i < arguments.length; i++) resetNode.push(arguments[i]);
|
|
908
|
+
(_this$nodes2 = this.nodes).splice.apply(_this$nodes2, [
|
|
909
|
+
oldIndex,
|
|
910
|
+
0,
|
|
911
|
+
newNode
|
|
912
|
+
].concat(resetNode));
|
|
913
|
+
newNode.parent = this;
|
|
914
|
+
var index;
|
|
915
|
+
for (var id in this.indexes) {
|
|
916
|
+
index = this.indexes[id];
|
|
917
|
+
if (index >= oldIndex) this.indexes[id] = index + arguments.length - 1;
|
|
918
|
+
}
|
|
919
|
+
return this;
|
|
920
|
+
};
|
|
921
|
+
_proto._findChildAtPosition = function _findChildAtPosition(line, col) {
|
|
922
|
+
var found = void 0;
|
|
923
|
+
this.each(function(node) {
|
|
924
|
+
if (node.atPosition) {
|
|
925
|
+
var foundChild = node.atPosition(line, col);
|
|
926
|
+
if (foundChild) {
|
|
927
|
+
found = foundChild;
|
|
928
|
+
return false;
|
|
929
|
+
}
|
|
930
|
+
} else if (node.isAtPosition(line, col)) {
|
|
931
|
+
found = node;
|
|
932
|
+
return false;
|
|
933
|
+
}
|
|
934
|
+
});
|
|
935
|
+
return found;
|
|
936
|
+
};
|
|
937
|
+
_proto.atPosition = function atPosition(line, col) {
|
|
938
|
+
if (this.isAtPosition(line, col)) return this._findChildAtPosition(line, col) || this;
|
|
939
|
+
else return;
|
|
940
|
+
};
|
|
941
|
+
_proto._inferEndPosition = function _inferEndPosition() {
|
|
942
|
+
if (this.last && this.last.source && this.last.source.end) {
|
|
943
|
+
this.source = this.source || {};
|
|
944
|
+
this.source.end = this.source.end || {};
|
|
945
|
+
Object.assign(this.source.end, this.last.source.end);
|
|
946
|
+
}
|
|
947
|
+
};
|
|
948
|
+
_proto.each = function each(callback) {
|
|
949
|
+
if (!this.lastEach) this.lastEach = 0;
|
|
950
|
+
if (!this.indexes) this.indexes = {};
|
|
951
|
+
this.lastEach++;
|
|
952
|
+
var id = this.lastEach;
|
|
953
|
+
this.indexes[id] = 0;
|
|
954
|
+
if (!this.length) return;
|
|
955
|
+
var index, result;
|
|
956
|
+
while (this.indexes[id] < this.length) {
|
|
957
|
+
index = this.indexes[id];
|
|
958
|
+
result = callback(this.at(index), index);
|
|
959
|
+
if (result === false) break;
|
|
960
|
+
this.indexes[id] += 1;
|
|
961
|
+
}
|
|
962
|
+
delete this.indexes[id];
|
|
963
|
+
if (result === false) return false;
|
|
964
|
+
};
|
|
965
|
+
_proto.walk = function walk(callback) {
|
|
966
|
+
return this.each(function(node, i) {
|
|
967
|
+
var result = callback(node, i);
|
|
968
|
+
if (result !== false && node.length) result = node.walk(callback);
|
|
969
|
+
if (result === false) return false;
|
|
970
|
+
});
|
|
971
|
+
};
|
|
972
|
+
_proto.walkAttributes = function walkAttributes(callback) {
|
|
973
|
+
var _this2 = this;
|
|
974
|
+
return this.walk(function(selector) {
|
|
975
|
+
if (selector.type === types.ATTRIBUTE) return callback.call(_this2, selector);
|
|
976
|
+
});
|
|
977
|
+
};
|
|
978
|
+
_proto.walkClasses = function walkClasses(callback) {
|
|
979
|
+
var _this3 = this;
|
|
980
|
+
return this.walk(function(selector) {
|
|
981
|
+
if (selector.type === types.CLASS) return callback.call(_this3, selector);
|
|
982
|
+
});
|
|
983
|
+
};
|
|
984
|
+
_proto.walkCombinators = function walkCombinators(callback) {
|
|
985
|
+
var _this4 = this;
|
|
986
|
+
return this.walk(function(selector) {
|
|
987
|
+
if (selector.type === types.COMBINATOR) return callback.call(_this4, selector);
|
|
988
|
+
});
|
|
989
|
+
};
|
|
990
|
+
_proto.walkComments = function walkComments(callback) {
|
|
991
|
+
var _this5 = this;
|
|
992
|
+
return this.walk(function(selector) {
|
|
993
|
+
if (selector.type === types.COMMENT) return callback.call(_this5, selector);
|
|
994
|
+
});
|
|
995
|
+
};
|
|
996
|
+
_proto.walkIds = function walkIds(callback) {
|
|
997
|
+
var _this6 = this;
|
|
998
|
+
return this.walk(function(selector) {
|
|
999
|
+
if (selector.type === types.ID) return callback.call(_this6, selector);
|
|
1000
|
+
});
|
|
1001
|
+
};
|
|
1002
|
+
_proto.walkNesting = function walkNesting(callback) {
|
|
1003
|
+
var _this7 = this;
|
|
1004
|
+
return this.walk(function(selector) {
|
|
1005
|
+
if (selector.type === types.NESTING) return callback.call(_this7, selector);
|
|
1006
|
+
});
|
|
1007
|
+
};
|
|
1008
|
+
_proto.walkPseudos = function walkPseudos(callback) {
|
|
1009
|
+
var _this8 = this;
|
|
1010
|
+
return this.walk(function(selector) {
|
|
1011
|
+
if (selector.type === types.PSEUDO) return callback.call(_this8, selector);
|
|
1012
|
+
});
|
|
1013
|
+
};
|
|
1014
|
+
_proto.walkTags = function walkTags(callback) {
|
|
1015
|
+
var _this9 = this;
|
|
1016
|
+
return this.walk(function(selector) {
|
|
1017
|
+
if (selector.type === types.TAG) return callback.call(_this9, selector);
|
|
1018
|
+
});
|
|
1019
|
+
};
|
|
1020
|
+
_proto.walkUniversals = function walkUniversals(callback) {
|
|
1021
|
+
var _this10 = this;
|
|
1022
|
+
return this.walk(function(selector) {
|
|
1023
|
+
if (selector.type === types.UNIVERSAL) return callback.call(_this10, selector);
|
|
1024
|
+
});
|
|
1025
|
+
};
|
|
1026
|
+
_proto.split = function split(callback) {
|
|
1027
|
+
var _this11 = this;
|
|
1028
|
+
var current = [];
|
|
1029
|
+
return this.reduce(function(memo, node, index) {
|
|
1030
|
+
var split = callback.call(_this11, node);
|
|
1031
|
+
current.push(node);
|
|
1032
|
+
if (split) {
|
|
1033
|
+
memo.push(current);
|
|
1034
|
+
current = [];
|
|
1035
|
+
} else if (index === _this11.length - 1) memo.push(current);
|
|
1036
|
+
return memo;
|
|
1037
|
+
}, []);
|
|
1038
|
+
};
|
|
1039
|
+
_proto.map = function map(callback) {
|
|
1040
|
+
return this.nodes.map(callback);
|
|
1041
|
+
};
|
|
1042
|
+
_proto.reduce = function reduce(callback, memo) {
|
|
1043
|
+
return this.nodes.reduce(callback, memo);
|
|
1044
|
+
};
|
|
1045
|
+
_proto.every = function every(callback) {
|
|
1046
|
+
return this.nodes.every(callback);
|
|
1047
|
+
};
|
|
1048
|
+
_proto.some = function some(callback) {
|
|
1049
|
+
return this.nodes.some(callback);
|
|
1050
|
+
};
|
|
1051
|
+
_proto.filter = function filter(callback) {
|
|
1052
|
+
return this.nodes.filter(callback);
|
|
1053
|
+
};
|
|
1054
|
+
_proto.sort = function sort(callback) {
|
|
1055
|
+
return this.nodes.sort(callback);
|
|
1056
|
+
};
|
|
1057
|
+
_proto.toString = function toString() {
|
|
1058
|
+
return this.map(String).join("");
|
|
1059
|
+
};
|
|
1060
|
+
_createClass(Container, [
|
|
1061
|
+
{
|
|
1062
|
+
key: "first",
|
|
1063
|
+
get: function get() {
|
|
1064
|
+
return this.at(0);
|
|
1065
|
+
}
|
|
1066
|
+
},
|
|
1067
|
+
{
|
|
1068
|
+
key: "last",
|
|
1069
|
+
get: function get() {
|
|
1070
|
+
return this.at(this.length - 1);
|
|
1071
|
+
}
|
|
1072
|
+
},
|
|
1073
|
+
{
|
|
1074
|
+
key: "length",
|
|
1075
|
+
get: function get() {
|
|
1076
|
+
return this.nodes.length;
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
]);
|
|
1080
|
+
return Container;
|
|
1081
|
+
}(_node["default"]);
|
|
1082
|
+
module.exports = exports.default;
|
|
1083
|
+
}));
|
|
1084
|
+
//#endregion
|
|
1085
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/root.js
|
|
1086
|
+
var require_root = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1087
|
+
exports.__esModule = true;
|
|
1088
|
+
exports["default"] = void 0;
|
|
1089
|
+
var _container = _interopRequireDefault(require_container());
|
|
1090
|
+
var _types = require_types();
|
|
1091
|
+
function _interopRequireDefault(obj) {
|
|
1092
|
+
return obj && obj.__esModule ? obj : { "default": obj };
|
|
1093
|
+
}
|
|
1094
|
+
function _defineProperties(target, props) {
|
|
1095
|
+
for (var i = 0; i < props.length; i++) {
|
|
1096
|
+
var descriptor = props[i];
|
|
1097
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
1098
|
+
descriptor.configurable = true;
|
|
1099
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
1100
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
1104
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
1105
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
1106
|
+
Object.defineProperty(Constructor, "prototype", { writable: false });
|
|
1107
|
+
return Constructor;
|
|
1108
|
+
}
|
|
1109
|
+
function _inheritsLoose(subClass, superClass) {
|
|
1110
|
+
subClass.prototype = Object.create(superClass.prototype);
|
|
1111
|
+
subClass.prototype.constructor = subClass;
|
|
1112
|
+
_setPrototypeOf(subClass, superClass);
|
|
1113
|
+
}
|
|
1114
|
+
function _setPrototypeOf(o, p) {
|
|
1115
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1116
|
+
o.__proto__ = p;
|
|
1117
|
+
return o;
|
|
1118
|
+
};
|
|
1119
|
+
return _setPrototypeOf(o, p);
|
|
1120
|
+
}
|
|
1121
|
+
exports["default"] = /* @__PURE__ */ function(_Container) {
|
|
1122
|
+
_inheritsLoose(Root, _Container);
|
|
1123
|
+
function Root(opts) {
|
|
1124
|
+
var _this = _Container.call(this, opts) || this;
|
|
1125
|
+
_this.type = _types.ROOT;
|
|
1126
|
+
return _this;
|
|
1127
|
+
}
|
|
1128
|
+
var _proto = Root.prototype;
|
|
1129
|
+
_proto.toString = function toString() {
|
|
1130
|
+
var str = this.reduce(function(memo, selector) {
|
|
1131
|
+
memo.push(String(selector));
|
|
1132
|
+
return memo;
|
|
1133
|
+
}, []).join(",");
|
|
1134
|
+
return this.trailingComma ? str + "," : str;
|
|
1135
|
+
};
|
|
1136
|
+
_proto.error = function error(message, options) {
|
|
1137
|
+
if (this._error) return this._error(message, options);
|
|
1138
|
+
else return new Error(message);
|
|
1139
|
+
};
|
|
1140
|
+
_createClass(Root, [{
|
|
1141
|
+
key: "errorGenerator",
|
|
1142
|
+
set: function set(handler) {
|
|
1143
|
+
this._error = handler;
|
|
1144
|
+
}
|
|
1145
|
+
}]);
|
|
1146
|
+
return Root;
|
|
1147
|
+
}(_container["default"]);
|
|
1148
|
+
module.exports = exports.default;
|
|
1149
|
+
}));
|
|
1150
|
+
//#endregion
|
|
1151
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/selector.js
|
|
1152
|
+
var require_selector = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1153
|
+
exports.__esModule = true;
|
|
1154
|
+
exports["default"] = void 0;
|
|
1155
|
+
var _container = _interopRequireDefault(require_container());
|
|
1156
|
+
var _types = require_types();
|
|
1157
|
+
function _interopRequireDefault(obj) {
|
|
1158
|
+
return obj && obj.__esModule ? obj : { "default": obj };
|
|
1159
|
+
}
|
|
1160
|
+
function _inheritsLoose(subClass, superClass) {
|
|
1161
|
+
subClass.prototype = Object.create(superClass.prototype);
|
|
1162
|
+
subClass.prototype.constructor = subClass;
|
|
1163
|
+
_setPrototypeOf(subClass, superClass);
|
|
1164
|
+
}
|
|
1165
|
+
function _setPrototypeOf(o, p) {
|
|
1166
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1167
|
+
o.__proto__ = p;
|
|
1168
|
+
return o;
|
|
1169
|
+
};
|
|
1170
|
+
return _setPrototypeOf(o, p);
|
|
1171
|
+
}
|
|
1172
|
+
exports["default"] = /* @__PURE__ */ function(_Container) {
|
|
1173
|
+
_inheritsLoose(Selector, _Container);
|
|
1174
|
+
function Selector(opts) {
|
|
1175
|
+
var _this = _Container.call(this, opts) || this;
|
|
1176
|
+
_this.type = _types.SELECTOR;
|
|
1177
|
+
return _this;
|
|
1178
|
+
}
|
|
1179
|
+
return Selector;
|
|
1180
|
+
}(_container["default"]);
|
|
1181
|
+
module.exports = exports.default;
|
|
1182
|
+
}));
|
|
1183
|
+
//#endregion
|
|
1184
|
+
//#region ../../node_modules/.pnpm/cssesc@3.0.0/node_modules/cssesc/cssesc.js
|
|
1185
|
+
/*! https://mths.be/cssesc v3.0.0 by @mathias */
|
|
1186
|
+
var require_cssesc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1187
|
+
var hasOwnProperty = {}.hasOwnProperty;
|
|
1188
|
+
var merge = function merge(options, defaults) {
|
|
1189
|
+
if (!options) return defaults;
|
|
1190
|
+
var result = {};
|
|
1191
|
+
for (var key in defaults) result[key] = hasOwnProperty.call(options, key) ? options[key] : defaults[key];
|
|
1192
|
+
return result;
|
|
1193
|
+
};
|
|
1194
|
+
var regexAnySingleEscape = /[ -,\.\/:-@\[-\^`\{-~]/;
|
|
1195
|
+
var regexSingleEscape = /[ -,\.\/:-@\[\]\^`\{-~]/;
|
|
1196
|
+
var regexExcessiveSpaces = /(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g;
|
|
1197
|
+
var cssesc = function cssesc(string, options) {
|
|
1198
|
+
options = merge(options, cssesc.options);
|
|
1199
|
+
if (options.quotes != "single" && options.quotes != "double") options.quotes = "single";
|
|
1200
|
+
var quote = options.quotes == "double" ? "\"" : "'";
|
|
1201
|
+
var isIdentifier = options.isIdentifier;
|
|
1202
|
+
var firstChar = string.charAt(0);
|
|
1203
|
+
var output = "";
|
|
1204
|
+
var counter = 0;
|
|
1205
|
+
var length = string.length;
|
|
1206
|
+
while (counter < length) {
|
|
1207
|
+
var character = string.charAt(counter++);
|
|
1208
|
+
var codePoint = character.charCodeAt();
|
|
1209
|
+
var value = void 0;
|
|
1210
|
+
if (codePoint < 32 || codePoint > 126) {
|
|
1211
|
+
if (codePoint >= 55296 && codePoint <= 56319 && counter < length) {
|
|
1212
|
+
var extra = string.charCodeAt(counter++);
|
|
1213
|
+
if ((extra & 64512) == 56320) codePoint = ((codePoint & 1023) << 10) + (extra & 1023) + 65536;
|
|
1214
|
+
else counter--;
|
|
1215
|
+
}
|
|
1216
|
+
value = "\\" + codePoint.toString(16).toUpperCase() + " ";
|
|
1217
|
+
} else if (options.escapeEverything) if (regexAnySingleEscape.test(character)) value = "\\" + character;
|
|
1218
|
+
else value = "\\" + codePoint.toString(16).toUpperCase() + " ";
|
|
1219
|
+
else if (/[\t\n\f\r\x0B]/.test(character)) value = "\\" + codePoint.toString(16).toUpperCase() + " ";
|
|
1220
|
+
else if (character == "\\" || !isIdentifier && (character == "\"" && quote == character || character == "'" && quote == character) || isIdentifier && regexSingleEscape.test(character)) value = "\\" + character;
|
|
1221
|
+
else value = character;
|
|
1222
|
+
output += value;
|
|
1223
|
+
}
|
|
1224
|
+
if (isIdentifier) {
|
|
1225
|
+
if (/^-[-\d]/.test(output)) output = "\\-" + output.slice(1);
|
|
1226
|
+
else if (/\d/.test(firstChar)) output = "\\3" + firstChar + " " + output.slice(1);
|
|
1227
|
+
}
|
|
1228
|
+
output = output.replace(regexExcessiveSpaces, function($0, $1, $2) {
|
|
1229
|
+
if ($1 && $1.length % 2) return $0;
|
|
1230
|
+
return ($1 || "") + $2;
|
|
1231
|
+
});
|
|
1232
|
+
if (!isIdentifier && options.wrap) return quote + output + quote;
|
|
1233
|
+
return output;
|
|
1234
|
+
};
|
|
1235
|
+
cssesc.options = {
|
|
1236
|
+
"escapeEverything": false,
|
|
1237
|
+
"isIdentifier": false,
|
|
1238
|
+
"quotes": "single",
|
|
1239
|
+
"wrap": false
|
|
1240
|
+
};
|
|
1241
|
+
cssesc.version = "3.0.0";
|
|
1242
|
+
module.exports = cssesc;
|
|
1243
|
+
}));
|
|
1244
|
+
//#endregion
|
|
1245
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/className.js
|
|
1246
|
+
var require_className = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1247
|
+
exports.__esModule = true;
|
|
1248
|
+
exports["default"] = void 0;
|
|
1249
|
+
var _cssesc = _interopRequireDefault(require_cssesc());
|
|
1250
|
+
var _util = require_util();
|
|
1251
|
+
var _node = _interopRequireDefault(require_node$1());
|
|
1252
|
+
var _types = require_types();
|
|
1253
|
+
function _interopRequireDefault(obj) {
|
|
1254
|
+
return obj && obj.__esModule ? obj : { "default": obj };
|
|
1255
|
+
}
|
|
1256
|
+
function _defineProperties(target, props) {
|
|
1257
|
+
for (var i = 0; i < props.length; i++) {
|
|
1258
|
+
var descriptor = props[i];
|
|
1259
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
1260
|
+
descriptor.configurable = true;
|
|
1261
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
1262
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
1266
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
1267
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
1268
|
+
Object.defineProperty(Constructor, "prototype", { writable: false });
|
|
1269
|
+
return Constructor;
|
|
1270
|
+
}
|
|
1271
|
+
function _inheritsLoose(subClass, superClass) {
|
|
1272
|
+
subClass.prototype = Object.create(superClass.prototype);
|
|
1273
|
+
subClass.prototype.constructor = subClass;
|
|
1274
|
+
_setPrototypeOf(subClass, superClass);
|
|
1275
|
+
}
|
|
1276
|
+
function _setPrototypeOf(o, p) {
|
|
1277
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1278
|
+
o.__proto__ = p;
|
|
1279
|
+
return o;
|
|
1280
|
+
};
|
|
1281
|
+
return _setPrototypeOf(o, p);
|
|
1282
|
+
}
|
|
1283
|
+
exports["default"] = /* @__PURE__ */ function(_Node) {
|
|
1284
|
+
_inheritsLoose(ClassName, _Node);
|
|
1285
|
+
function ClassName(opts) {
|
|
1286
|
+
var _this = _Node.call(this, opts) || this;
|
|
1287
|
+
_this.type = _types.CLASS;
|
|
1288
|
+
_this._constructed = true;
|
|
1289
|
+
return _this;
|
|
1290
|
+
}
|
|
1291
|
+
var _proto = ClassName.prototype;
|
|
1292
|
+
_proto.valueToString = function valueToString() {
|
|
1293
|
+
return "." + _Node.prototype.valueToString.call(this);
|
|
1294
|
+
};
|
|
1295
|
+
_createClass(ClassName, [{
|
|
1296
|
+
key: "value",
|
|
1297
|
+
get: function get() {
|
|
1298
|
+
return this._value;
|
|
1299
|
+
},
|
|
1300
|
+
set: function set(v) {
|
|
1301
|
+
if (this._constructed) {
|
|
1302
|
+
var escaped = (0, _cssesc["default"])(v, { isIdentifier: true });
|
|
1303
|
+
if (escaped !== v) {
|
|
1304
|
+
(0, _util.ensureObject)(this, "raws");
|
|
1305
|
+
this.raws.value = escaped;
|
|
1306
|
+
} else if (this.raws) delete this.raws.value;
|
|
1307
|
+
}
|
|
1308
|
+
this._value = v;
|
|
1309
|
+
}
|
|
1310
|
+
}]);
|
|
1311
|
+
return ClassName;
|
|
1312
|
+
}(_node["default"]);
|
|
1313
|
+
module.exports = exports.default;
|
|
1314
|
+
}));
|
|
1315
|
+
//#endregion
|
|
1316
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/comment.js
|
|
1317
|
+
var require_comment = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1318
|
+
exports.__esModule = true;
|
|
1319
|
+
exports["default"] = void 0;
|
|
1320
|
+
var _node = _interopRequireDefault(require_node$1());
|
|
1321
|
+
var _types = require_types();
|
|
1322
|
+
function _interopRequireDefault(obj) {
|
|
1323
|
+
return obj && obj.__esModule ? obj : { "default": obj };
|
|
1324
|
+
}
|
|
1325
|
+
function _inheritsLoose(subClass, superClass) {
|
|
1326
|
+
subClass.prototype = Object.create(superClass.prototype);
|
|
1327
|
+
subClass.prototype.constructor = subClass;
|
|
1328
|
+
_setPrototypeOf(subClass, superClass);
|
|
1329
|
+
}
|
|
1330
|
+
function _setPrototypeOf(o, p) {
|
|
1331
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1332
|
+
o.__proto__ = p;
|
|
1333
|
+
return o;
|
|
1334
|
+
};
|
|
1335
|
+
return _setPrototypeOf(o, p);
|
|
1336
|
+
}
|
|
1337
|
+
exports["default"] = /* @__PURE__ */ function(_Node) {
|
|
1338
|
+
_inheritsLoose(Comment, _Node);
|
|
1339
|
+
function Comment(opts) {
|
|
1340
|
+
var _this = _Node.call(this, opts) || this;
|
|
1341
|
+
_this.type = _types.COMMENT;
|
|
1342
|
+
return _this;
|
|
1343
|
+
}
|
|
1344
|
+
return Comment;
|
|
1345
|
+
}(_node["default"]);
|
|
1346
|
+
module.exports = exports.default;
|
|
1347
|
+
}));
|
|
1348
|
+
//#endregion
|
|
1349
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/id.js
|
|
1350
|
+
var require_id = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1351
|
+
exports.__esModule = true;
|
|
1352
|
+
exports["default"] = void 0;
|
|
1353
|
+
var _node = _interopRequireDefault(require_node$1());
|
|
1354
|
+
var _types = require_types();
|
|
1355
|
+
function _interopRequireDefault(obj) {
|
|
1356
|
+
return obj && obj.__esModule ? obj : { "default": obj };
|
|
1357
|
+
}
|
|
1358
|
+
function _inheritsLoose(subClass, superClass) {
|
|
1359
|
+
subClass.prototype = Object.create(superClass.prototype);
|
|
1360
|
+
subClass.prototype.constructor = subClass;
|
|
1361
|
+
_setPrototypeOf(subClass, superClass);
|
|
1362
|
+
}
|
|
1363
|
+
function _setPrototypeOf(o, p) {
|
|
1364
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1365
|
+
o.__proto__ = p;
|
|
1366
|
+
return o;
|
|
1367
|
+
};
|
|
1368
|
+
return _setPrototypeOf(o, p);
|
|
1369
|
+
}
|
|
1370
|
+
exports["default"] = /* @__PURE__ */ function(_Node) {
|
|
1371
|
+
_inheritsLoose(ID, _Node);
|
|
1372
|
+
function ID(opts) {
|
|
1373
|
+
var _this = _Node.call(this, opts) || this;
|
|
1374
|
+
_this.type = _types.ID;
|
|
1375
|
+
return _this;
|
|
1376
|
+
}
|
|
1377
|
+
var _proto = ID.prototype;
|
|
1378
|
+
_proto.valueToString = function valueToString() {
|
|
1379
|
+
return "#" + _Node.prototype.valueToString.call(this);
|
|
1380
|
+
};
|
|
1381
|
+
return ID;
|
|
1382
|
+
}(_node["default"]);
|
|
1383
|
+
module.exports = exports.default;
|
|
1384
|
+
}));
|
|
1385
|
+
//#endregion
|
|
1386
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/namespace.js
|
|
1387
|
+
var require_namespace = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1388
|
+
exports.__esModule = true;
|
|
1389
|
+
exports["default"] = void 0;
|
|
1390
|
+
var _cssesc = _interopRequireDefault(require_cssesc());
|
|
1391
|
+
var _util = require_util();
|
|
1392
|
+
var _node = _interopRequireDefault(require_node$1());
|
|
1393
|
+
function _interopRequireDefault(obj) {
|
|
1394
|
+
return obj && obj.__esModule ? obj : { "default": obj };
|
|
1395
|
+
}
|
|
1396
|
+
function _defineProperties(target, props) {
|
|
1397
|
+
for (var i = 0; i < props.length; i++) {
|
|
1398
|
+
var descriptor = props[i];
|
|
1399
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
1400
|
+
descriptor.configurable = true;
|
|
1401
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
1402
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
1403
|
+
}
|
|
1404
|
+
}
|
|
1405
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
1406
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
1407
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
1408
|
+
Object.defineProperty(Constructor, "prototype", { writable: false });
|
|
1409
|
+
return Constructor;
|
|
1410
|
+
}
|
|
1411
|
+
function _inheritsLoose(subClass, superClass) {
|
|
1412
|
+
subClass.prototype = Object.create(superClass.prototype);
|
|
1413
|
+
subClass.prototype.constructor = subClass;
|
|
1414
|
+
_setPrototypeOf(subClass, superClass);
|
|
1415
|
+
}
|
|
1416
|
+
function _setPrototypeOf(o, p) {
|
|
1417
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1418
|
+
o.__proto__ = p;
|
|
1419
|
+
return o;
|
|
1420
|
+
};
|
|
1421
|
+
return _setPrototypeOf(o, p);
|
|
1422
|
+
}
|
|
1423
|
+
exports["default"] = /* @__PURE__ */ function(_Node) {
|
|
1424
|
+
_inheritsLoose(Namespace, _Node);
|
|
1425
|
+
function Namespace() {
|
|
1426
|
+
return _Node.apply(this, arguments) || this;
|
|
1427
|
+
}
|
|
1428
|
+
var _proto = Namespace.prototype;
|
|
1429
|
+
_proto.qualifiedName = function qualifiedName(value) {
|
|
1430
|
+
if (this.namespace) return this.namespaceString + "|" + value;
|
|
1431
|
+
else return value;
|
|
1432
|
+
};
|
|
1433
|
+
_proto.valueToString = function valueToString() {
|
|
1434
|
+
return this.qualifiedName(_Node.prototype.valueToString.call(this));
|
|
1435
|
+
};
|
|
1436
|
+
_createClass(Namespace, [
|
|
1437
|
+
{
|
|
1438
|
+
key: "namespace",
|
|
1439
|
+
get: function get() {
|
|
1440
|
+
return this._namespace;
|
|
1441
|
+
},
|
|
1442
|
+
set: function set(namespace) {
|
|
1443
|
+
if (namespace === true || namespace === "*" || namespace === "&") {
|
|
1444
|
+
this._namespace = namespace;
|
|
1445
|
+
if (this.raws) delete this.raws.namespace;
|
|
1446
|
+
return;
|
|
1447
|
+
}
|
|
1448
|
+
var escaped = (0, _cssesc["default"])(namespace, { isIdentifier: true });
|
|
1449
|
+
this._namespace = namespace;
|
|
1450
|
+
if (escaped !== namespace) {
|
|
1451
|
+
(0, _util.ensureObject)(this, "raws");
|
|
1452
|
+
this.raws.namespace = escaped;
|
|
1453
|
+
} else if (this.raws) delete this.raws.namespace;
|
|
1454
|
+
}
|
|
1455
|
+
},
|
|
1456
|
+
{
|
|
1457
|
+
key: "ns",
|
|
1458
|
+
get: function get() {
|
|
1459
|
+
return this._namespace;
|
|
1460
|
+
},
|
|
1461
|
+
set: function set(namespace) {
|
|
1462
|
+
this.namespace = namespace;
|
|
1463
|
+
}
|
|
1464
|
+
},
|
|
1465
|
+
{
|
|
1466
|
+
key: "namespaceString",
|
|
1467
|
+
get: function get() {
|
|
1468
|
+
if (this.namespace) {
|
|
1469
|
+
var ns = this.stringifyProperty("namespace");
|
|
1470
|
+
if (ns === true) return "";
|
|
1471
|
+
else return ns;
|
|
1472
|
+
} else return "";
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
]);
|
|
1476
|
+
return Namespace;
|
|
1477
|
+
}(_node["default"]);
|
|
1478
|
+
module.exports = exports.default;
|
|
1479
|
+
}));
|
|
1480
|
+
//#endregion
|
|
1481
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/tag.js
|
|
1482
|
+
var require_tag = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1483
|
+
exports.__esModule = true;
|
|
1484
|
+
exports["default"] = void 0;
|
|
1485
|
+
var _namespace = _interopRequireDefault(require_namespace());
|
|
1486
|
+
var _types = require_types();
|
|
1487
|
+
function _interopRequireDefault(obj) {
|
|
1488
|
+
return obj && obj.__esModule ? obj : { "default": obj };
|
|
1489
|
+
}
|
|
1490
|
+
function _inheritsLoose(subClass, superClass) {
|
|
1491
|
+
subClass.prototype = Object.create(superClass.prototype);
|
|
1492
|
+
subClass.prototype.constructor = subClass;
|
|
1493
|
+
_setPrototypeOf(subClass, superClass);
|
|
1494
|
+
}
|
|
1495
|
+
function _setPrototypeOf(o, p) {
|
|
1496
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1497
|
+
o.__proto__ = p;
|
|
1498
|
+
return o;
|
|
1499
|
+
};
|
|
1500
|
+
return _setPrototypeOf(o, p);
|
|
1501
|
+
}
|
|
1502
|
+
exports["default"] = /* @__PURE__ */ function(_Namespace) {
|
|
1503
|
+
_inheritsLoose(Tag, _Namespace);
|
|
1504
|
+
function Tag(opts) {
|
|
1505
|
+
var _this = _Namespace.call(this, opts) || this;
|
|
1506
|
+
_this.type = _types.TAG;
|
|
1507
|
+
return _this;
|
|
1508
|
+
}
|
|
1509
|
+
return Tag;
|
|
1510
|
+
}(_namespace["default"]);
|
|
1511
|
+
module.exports = exports.default;
|
|
1512
|
+
}));
|
|
1513
|
+
//#endregion
|
|
1514
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/string.js
|
|
1515
|
+
var require_string = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1516
|
+
exports.__esModule = true;
|
|
1517
|
+
exports["default"] = void 0;
|
|
1518
|
+
var _node = _interopRequireDefault(require_node$1());
|
|
1519
|
+
var _types = require_types();
|
|
1520
|
+
function _interopRequireDefault(obj) {
|
|
1521
|
+
return obj && obj.__esModule ? obj : { "default": obj };
|
|
1522
|
+
}
|
|
1523
|
+
function _inheritsLoose(subClass, superClass) {
|
|
1524
|
+
subClass.prototype = Object.create(superClass.prototype);
|
|
1525
|
+
subClass.prototype.constructor = subClass;
|
|
1526
|
+
_setPrototypeOf(subClass, superClass);
|
|
1527
|
+
}
|
|
1528
|
+
function _setPrototypeOf(o, p) {
|
|
1529
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1530
|
+
o.__proto__ = p;
|
|
1531
|
+
return o;
|
|
1532
|
+
};
|
|
1533
|
+
return _setPrototypeOf(o, p);
|
|
1534
|
+
}
|
|
1535
|
+
exports["default"] = /* @__PURE__ */ function(_Node) {
|
|
1536
|
+
_inheritsLoose(String, _Node);
|
|
1537
|
+
function String(opts) {
|
|
1538
|
+
var _this = _Node.call(this, opts) || this;
|
|
1539
|
+
_this.type = _types.STRING;
|
|
1540
|
+
return _this;
|
|
1541
|
+
}
|
|
1542
|
+
return String;
|
|
1543
|
+
}(_node["default"]);
|
|
1544
|
+
module.exports = exports.default;
|
|
1545
|
+
}));
|
|
1546
|
+
//#endregion
|
|
1547
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/pseudo.js
|
|
1548
|
+
var require_pseudo = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1549
|
+
exports.__esModule = true;
|
|
1550
|
+
exports["default"] = void 0;
|
|
1551
|
+
var _container = _interopRequireDefault(require_container());
|
|
1552
|
+
var _types = require_types();
|
|
1553
|
+
function _interopRequireDefault(obj) {
|
|
1554
|
+
return obj && obj.__esModule ? obj : { "default": obj };
|
|
1555
|
+
}
|
|
1556
|
+
function _inheritsLoose(subClass, superClass) {
|
|
1557
|
+
subClass.prototype = Object.create(superClass.prototype);
|
|
1558
|
+
subClass.prototype.constructor = subClass;
|
|
1559
|
+
_setPrototypeOf(subClass, superClass);
|
|
1560
|
+
}
|
|
1561
|
+
function _setPrototypeOf(o, p) {
|
|
1562
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1563
|
+
o.__proto__ = p;
|
|
1564
|
+
return o;
|
|
1565
|
+
};
|
|
1566
|
+
return _setPrototypeOf(o, p);
|
|
1567
|
+
}
|
|
1568
|
+
exports["default"] = /* @__PURE__ */ function(_Container) {
|
|
1569
|
+
_inheritsLoose(Pseudo, _Container);
|
|
1570
|
+
function Pseudo(opts) {
|
|
1571
|
+
var _this = _Container.call(this, opts) || this;
|
|
1572
|
+
_this.type = _types.PSEUDO;
|
|
1573
|
+
return _this;
|
|
1574
|
+
}
|
|
1575
|
+
var _proto = Pseudo.prototype;
|
|
1576
|
+
_proto.toString = function toString() {
|
|
1577
|
+
var params = this.length ? "(" + this.map(String).join(",") + ")" : "";
|
|
1578
|
+
return [
|
|
1579
|
+
this.rawSpaceBefore,
|
|
1580
|
+
this.stringifyProperty("value"),
|
|
1581
|
+
params,
|
|
1582
|
+
this.rawSpaceAfter
|
|
1583
|
+
].join("");
|
|
1584
|
+
};
|
|
1585
|
+
return Pseudo;
|
|
1586
|
+
}(_container["default"]);
|
|
1587
|
+
module.exports = exports.default;
|
|
1588
|
+
}));
|
|
1589
|
+
//#endregion
|
|
1590
|
+
//#region ../../node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/node.js
|
|
1591
|
+
var require_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1592
|
+
/**
|
|
1593
|
+
* For Node.js, simply re-export the core `util.deprecate` function.
|
|
1594
|
+
*/
|
|
1595
|
+
module.exports = __require("util").deprecate;
|
|
1596
|
+
}));
|
|
1597
|
+
//#endregion
|
|
1598
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/attribute.js
|
|
1599
|
+
var require_attribute = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1600
|
+
exports.__esModule = true;
|
|
1601
|
+
exports["default"] = void 0;
|
|
1602
|
+
exports.unescapeValue = unescapeValue;
|
|
1603
|
+
var _cssesc = _interopRequireDefault(require_cssesc());
|
|
1604
|
+
var _unesc = _interopRequireDefault(require_unesc());
|
|
1605
|
+
var _namespace = _interopRequireDefault(require_namespace());
|
|
1606
|
+
var _types = require_types();
|
|
1607
|
+
var _CSSESC_QUOTE_OPTIONS;
|
|
1608
|
+
function _interopRequireDefault(obj) {
|
|
1609
|
+
return obj && obj.__esModule ? obj : { "default": obj };
|
|
1610
|
+
}
|
|
1611
|
+
function _defineProperties(target, props) {
|
|
1612
|
+
for (var i = 0; i < props.length; i++) {
|
|
1613
|
+
var descriptor = props[i];
|
|
1614
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
1615
|
+
descriptor.configurable = true;
|
|
1616
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
1617
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
1618
|
+
}
|
|
1619
|
+
}
|
|
1620
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
1621
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
1622
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
1623
|
+
Object.defineProperty(Constructor, "prototype", { writable: false });
|
|
1624
|
+
return Constructor;
|
|
1625
|
+
}
|
|
1626
|
+
function _inheritsLoose(subClass, superClass) {
|
|
1627
|
+
subClass.prototype = Object.create(superClass.prototype);
|
|
1628
|
+
subClass.prototype.constructor = subClass;
|
|
1629
|
+
_setPrototypeOf(subClass, superClass);
|
|
1630
|
+
}
|
|
1631
|
+
function _setPrototypeOf(o, p) {
|
|
1632
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1633
|
+
o.__proto__ = p;
|
|
1634
|
+
return o;
|
|
1635
|
+
};
|
|
1636
|
+
return _setPrototypeOf(o, p);
|
|
1637
|
+
}
|
|
1638
|
+
var deprecate = require_node();
|
|
1639
|
+
var WRAPPED_IN_QUOTES = /^('|")([^]*)\1$/;
|
|
1640
|
+
var warnOfDeprecatedValueAssignment = deprecate(function() {}, "Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead.");
|
|
1641
|
+
var warnOfDeprecatedQuotedAssignment = deprecate(function() {}, "Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead.");
|
|
1642
|
+
var warnOfDeprecatedConstructor = deprecate(function() {}, "Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");
|
|
1643
|
+
function unescapeValue(value) {
|
|
1644
|
+
var deprecatedUsage = false;
|
|
1645
|
+
var quoteMark = null;
|
|
1646
|
+
var unescaped = value;
|
|
1647
|
+
var m = unescaped.match(WRAPPED_IN_QUOTES);
|
|
1648
|
+
if (m) {
|
|
1649
|
+
quoteMark = m[1];
|
|
1650
|
+
unescaped = m[2];
|
|
1651
|
+
}
|
|
1652
|
+
unescaped = (0, _unesc["default"])(unescaped);
|
|
1653
|
+
if (unescaped !== value) deprecatedUsage = true;
|
|
1654
|
+
return {
|
|
1655
|
+
deprecatedUsage,
|
|
1656
|
+
unescaped,
|
|
1657
|
+
quoteMark
|
|
1658
|
+
};
|
|
1659
|
+
}
|
|
1660
|
+
function handleDeprecatedContructorOpts(opts) {
|
|
1661
|
+
if (opts.quoteMark !== void 0) return opts;
|
|
1662
|
+
if (opts.value === void 0) return opts;
|
|
1663
|
+
warnOfDeprecatedConstructor();
|
|
1664
|
+
var _unescapeValue = unescapeValue(opts.value), quoteMark = _unescapeValue.quoteMark, unescaped = _unescapeValue.unescaped;
|
|
1665
|
+
if (!opts.raws) opts.raws = {};
|
|
1666
|
+
if (opts.raws.value === void 0) opts.raws.value = opts.value;
|
|
1667
|
+
opts.value = unescaped;
|
|
1668
|
+
opts.quoteMark = quoteMark;
|
|
1669
|
+
return opts;
|
|
1670
|
+
}
|
|
1671
|
+
var Attribute = /* @__PURE__ */ function(_Namespace) {
|
|
1672
|
+
_inheritsLoose(Attribute, _Namespace);
|
|
1673
|
+
function Attribute(opts) {
|
|
1674
|
+
var _this;
|
|
1675
|
+
if (opts === void 0) opts = {};
|
|
1676
|
+
_this = _Namespace.call(this, handleDeprecatedContructorOpts(opts)) || this;
|
|
1677
|
+
_this.type = _types.ATTRIBUTE;
|
|
1678
|
+
_this.raws = _this.raws || {};
|
|
1679
|
+
Object.defineProperty(_this.raws, "unquoted", {
|
|
1680
|
+
get: deprecate(function() {
|
|
1681
|
+
return _this.value;
|
|
1682
|
+
}, "attr.raws.unquoted is deprecated. Call attr.value instead."),
|
|
1683
|
+
set: deprecate(function() {
|
|
1684
|
+
return _this.value;
|
|
1685
|
+
}, "Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")
|
|
1686
|
+
});
|
|
1687
|
+
_this._constructed = true;
|
|
1688
|
+
return _this;
|
|
1689
|
+
}
|
|
1690
|
+
/**
|
|
1691
|
+
* Returns the Attribute's value quoted such that it would be legal to use
|
|
1692
|
+
* in the value of a css file. The original value's quotation setting
|
|
1693
|
+
* used for stringification is left unchanged. See `setValue(value, options)`
|
|
1694
|
+
* if you want to control the quote settings of a new value for the attribute.
|
|
1695
|
+
*
|
|
1696
|
+
* You can also change the quotation used for the current value by setting quoteMark.
|
|
1697
|
+
*
|
|
1698
|
+
* Options:
|
|
1699
|
+
* * quoteMark {'"' | "'" | null} - Use this value to quote the value. If this
|
|
1700
|
+
* option is not set, the original value for quoteMark will be used. If
|
|
1701
|
+
* indeterminate, a double quote is used. The legal values are:
|
|
1702
|
+
* * `null` - the value will be unquoted and characters will be escaped as necessary.
|
|
1703
|
+
* * `'` - the value will be quoted with a single quote and single quotes are escaped.
|
|
1704
|
+
* * `"` - the value will be quoted with a double quote and double quotes are escaped.
|
|
1705
|
+
* * preferCurrentQuoteMark {boolean} - if true, prefer the source quote mark
|
|
1706
|
+
* over the quoteMark option value.
|
|
1707
|
+
* * smart {boolean} - if true, will select a quote mark based on the value
|
|
1708
|
+
* and the other options specified here. See the `smartQuoteMark()`
|
|
1709
|
+
* method.
|
|
1710
|
+
**/
|
|
1711
|
+
var _proto = Attribute.prototype;
|
|
1712
|
+
_proto.getQuotedValue = function getQuotedValue(options) {
|
|
1713
|
+
if (options === void 0) options = {};
|
|
1714
|
+
var cssescopts = CSSESC_QUOTE_OPTIONS[this._determineQuoteMark(options)];
|
|
1715
|
+
return (0, _cssesc["default"])(this._value, cssescopts);
|
|
1716
|
+
};
|
|
1717
|
+
_proto._determineQuoteMark = function _determineQuoteMark(options) {
|
|
1718
|
+
return options.smart ? this.smartQuoteMark(options) : this.preferredQuoteMark(options);
|
|
1719
|
+
};
|
|
1720
|
+
_proto.setValue = function setValue(value, options) {
|
|
1721
|
+
if (options === void 0) options = {};
|
|
1722
|
+
this._value = value;
|
|
1723
|
+
this._quoteMark = this._determineQuoteMark(options);
|
|
1724
|
+
this._syncRawValue();
|
|
1725
|
+
};
|
|
1726
|
+
_proto.smartQuoteMark = function smartQuoteMark(options) {
|
|
1727
|
+
var v = this.value;
|
|
1728
|
+
var numSingleQuotes = v.replace(/[^']/g, "").length;
|
|
1729
|
+
var numDoubleQuotes = v.replace(/[^"]/g, "").length;
|
|
1730
|
+
if (numSingleQuotes + numDoubleQuotes === 0) {
|
|
1731
|
+
var escaped = (0, _cssesc["default"])(v, { isIdentifier: true });
|
|
1732
|
+
if (escaped === v) return Attribute.NO_QUOTE;
|
|
1733
|
+
else {
|
|
1734
|
+
var pref = this.preferredQuoteMark(options);
|
|
1735
|
+
if (pref === Attribute.NO_QUOTE) {
|
|
1736
|
+
var quote = this.quoteMark || options.quoteMark || Attribute.DOUBLE_QUOTE;
|
|
1737
|
+
var opts = CSSESC_QUOTE_OPTIONS[quote];
|
|
1738
|
+
if ((0, _cssesc["default"])(v, opts).length < escaped.length) return quote;
|
|
1739
|
+
}
|
|
1740
|
+
return pref;
|
|
1741
|
+
}
|
|
1742
|
+
} else if (numDoubleQuotes === numSingleQuotes) return this.preferredQuoteMark(options);
|
|
1743
|
+
else if (numDoubleQuotes < numSingleQuotes) return Attribute.DOUBLE_QUOTE;
|
|
1744
|
+
else return Attribute.SINGLE_QUOTE;
|
|
1745
|
+
};
|
|
1746
|
+
_proto.preferredQuoteMark = function preferredQuoteMark(options) {
|
|
1747
|
+
var quoteMark = options.preferCurrentQuoteMark ? this.quoteMark : options.quoteMark;
|
|
1748
|
+
if (quoteMark === void 0) quoteMark = options.preferCurrentQuoteMark ? options.quoteMark : this.quoteMark;
|
|
1749
|
+
if (quoteMark === void 0) quoteMark = Attribute.DOUBLE_QUOTE;
|
|
1750
|
+
return quoteMark;
|
|
1751
|
+
};
|
|
1752
|
+
_proto._syncRawValue = function _syncRawValue() {
|
|
1753
|
+
var rawValue = (0, _cssesc["default"])(this._value, CSSESC_QUOTE_OPTIONS[this.quoteMark]);
|
|
1754
|
+
if (rawValue === this._value) {
|
|
1755
|
+
if (this.raws) delete this.raws.value;
|
|
1756
|
+
} else this.raws.value = rawValue;
|
|
1757
|
+
};
|
|
1758
|
+
_proto._handleEscapes = function _handleEscapes(prop, value) {
|
|
1759
|
+
if (this._constructed) {
|
|
1760
|
+
var escaped = (0, _cssesc["default"])(value, { isIdentifier: true });
|
|
1761
|
+
if (escaped !== value) this.raws[prop] = escaped;
|
|
1762
|
+
else delete this.raws[prop];
|
|
1763
|
+
}
|
|
1764
|
+
};
|
|
1765
|
+
_proto._spacesFor = function _spacesFor(name) {
|
|
1766
|
+
var attrSpaces = {
|
|
1767
|
+
before: "",
|
|
1768
|
+
after: ""
|
|
1769
|
+
};
|
|
1770
|
+
var spaces = this.spaces[name] || {};
|
|
1771
|
+
var rawSpaces = this.raws.spaces && this.raws.spaces[name] || {};
|
|
1772
|
+
return Object.assign(attrSpaces, spaces, rawSpaces);
|
|
1773
|
+
};
|
|
1774
|
+
_proto._stringFor = function _stringFor(name, spaceName, concat) {
|
|
1775
|
+
if (spaceName === void 0) spaceName = name;
|
|
1776
|
+
if (concat === void 0) concat = defaultAttrConcat;
|
|
1777
|
+
var attrSpaces = this._spacesFor(spaceName);
|
|
1778
|
+
return concat(this.stringifyProperty(name), attrSpaces);
|
|
1779
|
+
};
|
|
1780
|
+
_proto.offsetOf = function offsetOf(name) {
|
|
1781
|
+
var count = 1;
|
|
1782
|
+
var attributeSpaces = this._spacesFor("attribute");
|
|
1783
|
+
count += attributeSpaces.before.length;
|
|
1784
|
+
if (name === "namespace" || name === "ns") return this.namespace ? count : -1;
|
|
1785
|
+
if (name === "attributeNS") return count;
|
|
1786
|
+
count += this.namespaceString.length;
|
|
1787
|
+
if (this.namespace) count += 1;
|
|
1788
|
+
if (name === "attribute") return count;
|
|
1789
|
+
count += this.stringifyProperty("attribute").length;
|
|
1790
|
+
count += attributeSpaces.after.length;
|
|
1791
|
+
var operatorSpaces = this._spacesFor("operator");
|
|
1792
|
+
count += operatorSpaces.before.length;
|
|
1793
|
+
var operator = this.stringifyProperty("operator");
|
|
1794
|
+
if (name === "operator") return operator ? count : -1;
|
|
1795
|
+
count += operator.length;
|
|
1796
|
+
count += operatorSpaces.after.length;
|
|
1797
|
+
var valueSpaces = this._spacesFor("value");
|
|
1798
|
+
count += valueSpaces.before.length;
|
|
1799
|
+
var value = this.stringifyProperty("value");
|
|
1800
|
+
if (name === "value") return value ? count : -1;
|
|
1801
|
+
count += value.length;
|
|
1802
|
+
count += valueSpaces.after.length;
|
|
1803
|
+
var insensitiveSpaces = this._spacesFor("insensitive");
|
|
1804
|
+
count += insensitiveSpaces.before.length;
|
|
1805
|
+
if (name === "insensitive") return this.insensitive ? count : -1;
|
|
1806
|
+
return -1;
|
|
1807
|
+
};
|
|
1808
|
+
_proto.toString = function toString() {
|
|
1809
|
+
var _this2 = this;
|
|
1810
|
+
var selector = [this.rawSpaceBefore, "["];
|
|
1811
|
+
selector.push(this._stringFor("qualifiedAttribute", "attribute"));
|
|
1812
|
+
if (this.operator && (this.value || this.value === "")) {
|
|
1813
|
+
selector.push(this._stringFor("operator"));
|
|
1814
|
+
selector.push(this._stringFor("value"));
|
|
1815
|
+
selector.push(this._stringFor("insensitiveFlag", "insensitive", function(attrValue, attrSpaces) {
|
|
1816
|
+
if (attrValue.length > 0 && !_this2.quoted && attrSpaces.before.length === 0 && !(_this2.spaces.value && _this2.spaces.value.after)) attrSpaces.before = " ";
|
|
1817
|
+
return defaultAttrConcat(attrValue, attrSpaces);
|
|
1818
|
+
}));
|
|
1819
|
+
}
|
|
1820
|
+
selector.push("]");
|
|
1821
|
+
selector.push(this.rawSpaceAfter);
|
|
1822
|
+
return selector.join("");
|
|
1823
|
+
};
|
|
1824
|
+
_createClass(Attribute, [
|
|
1825
|
+
{
|
|
1826
|
+
key: "quoted",
|
|
1827
|
+
get: function get() {
|
|
1828
|
+
var qm = this.quoteMark;
|
|
1829
|
+
return qm === "'" || qm === "\"";
|
|
1830
|
+
},
|
|
1831
|
+
set: function set(value) {
|
|
1832
|
+
warnOfDeprecatedQuotedAssignment();
|
|
1833
|
+
}
|
|
1834
|
+
},
|
|
1835
|
+
{
|
|
1836
|
+
key: "quoteMark",
|
|
1837
|
+
get: function get() {
|
|
1838
|
+
return this._quoteMark;
|
|
1839
|
+
},
|
|
1840
|
+
set: function set(quoteMark) {
|
|
1841
|
+
if (!this._constructed) {
|
|
1842
|
+
this._quoteMark = quoteMark;
|
|
1843
|
+
return;
|
|
1844
|
+
}
|
|
1845
|
+
if (this._quoteMark !== quoteMark) {
|
|
1846
|
+
this._quoteMark = quoteMark;
|
|
1847
|
+
this._syncRawValue();
|
|
1848
|
+
}
|
|
1849
|
+
}
|
|
1850
|
+
},
|
|
1851
|
+
{
|
|
1852
|
+
key: "qualifiedAttribute",
|
|
1853
|
+
get: function get() {
|
|
1854
|
+
return this.qualifiedName(this.raws.attribute || this.attribute);
|
|
1855
|
+
}
|
|
1856
|
+
},
|
|
1857
|
+
{
|
|
1858
|
+
key: "insensitiveFlag",
|
|
1859
|
+
get: function get() {
|
|
1860
|
+
return this.insensitive ? "i" : "";
|
|
1861
|
+
}
|
|
1862
|
+
},
|
|
1863
|
+
{
|
|
1864
|
+
key: "value",
|
|
1865
|
+
get: function get() {
|
|
1866
|
+
return this._value;
|
|
1867
|
+
},
|
|
1868
|
+
set: function set(v) {
|
|
1869
|
+
if (this._constructed) {
|
|
1870
|
+
var _unescapeValue2 = unescapeValue(v), deprecatedUsage = _unescapeValue2.deprecatedUsage, unescaped = _unescapeValue2.unescaped, quoteMark = _unescapeValue2.quoteMark;
|
|
1871
|
+
if (deprecatedUsage) warnOfDeprecatedValueAssignment();
|
|
1872
|
+
if (unescaped === this._value && quoteMark === this._quoteMark) return;
|
|
1873
|
+
this._value = unescaped;
|
|
1874
|
+
this._quoteMark = quoteMark;
|
|
1875
|
+
this._syncRawValue();
|
|
1876
|
+
} else this._value = v;
|
|
1877
|
+
}
|
|
1878
|
+
},
|
|
1879
|
+
{
|
|
1880
|
+
key: "insensitive",
|
|
1881
|
+
get: function get() {
|
|
1882
|
+
return this._insensitive;
|
|
1883
|
+
},
|
|
1884
|
+
set: function set(insensitive) {
|
|
1885
|
+
if (!insensitive) {
|
|
1886
|
+
this._insensitive = false;
|
|
1887
|
+
if (this.raws && (this.raws.insensitiveFlag === "I" || this.raws.insensitiveFlag === "i")) this.raws.insensitiveFlag = void 0;
|
|
1888
|
+
}
|
|
1889
|
+
this._insensitive = insensitive;
|
|
1890
|
+
}
|
|
1891
|
+
},
|
|
1892
|
+
{
|
|
1893
|
+
key: "attribute",
|
|
1894
|
+
get: function get() {
|
|
1895
|
+
return this._attribute;
|
|
1896
|
+
},
|
|
1897
|
+
set: function set(name) {
|
|
1898
|
+
this._handleEscapes("attribute", name);
|
|
1899
|
+
this._attribute = name;
|
|
1900
|
+
}
|
|
1901
|
+
}
|
|
1902
|
+
]);
|
|
1903
|
+
return Attribute;
|
|
1904
|
+
}(_namespace["default"]);
|
|
1905
|
+
exports["default"] = Attribute;
|
|
1906
|
+
Attribute.NO_QUOTE = null;
|
|
1907
|
+
Attribute.SINGLE_QUOTE = "'";
|
|
1908
|
+
Attribute.DOUBLE_QUOTE = "\"";
|
|
1909
|
+
var CSSESC_QUOTE_OPTIONS = (_CSSESC_QUOTE_OPTIONS = {
|
|
1910
|
+
"'": {
|
|
1911
|
+
quotes: "single",
|
|
1912
|
+
wrap: true
|
|
1913
|
+
},
|
|
1914
|
+
"\"": {
|
|
1915
|
+
quotes: "double",
|
|
1916
|
+
wrap: true
|
|
1917
|
+
}
|
|
1918
|
+
}, _CSSESC_QUOTE_OPTIONS[null] = { isIdentifier: true }, _CSSESC_QUOTE_OPTIONS);
|
|
1919
|
+
function defaultAttrConcat(attrValue, attrSpaces) {
|
|
1920
|
+
return "" + attrSpaces.before + attrValue + attrSpaces.after;
|
|
1921
|
+
}
|
|
1922
|
+
}));
|
|
1923
|
+
//#endregion
|
|
1924
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/universal.js
|
|
1925
|
+
var require_universal = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1926
|
+
exports.__esModule = true;
|
|
1927
|
+
exports["default"] = void 0;
|
|
1928
|
+
var _namespace = _interopRequireDefault(require_namespace());
|
|
1929
|
+
var _types = require_types();
|
|
1930
|
+
function _interopRequireDefault(obj) {
|
|
1931
|
+
return obj && obj.__esModule ? obj : { "default": obj };
|
|
1932
|
+
}
|
|
1933
|
+
function _inheritsLoose(subClass, superClass) {
|
|
1934
|
+
subClass.prototype = Object.create(superClass.prototype);
|
|
1935
|
+
subClass.prototype.constructor = subClass;
|
|
1936
|
+
_setPrototypeOf(subClass, superClass);
|
|
1937
|
+
}
|
|
1938
|
+
function _setPrototypeOf(o, p) {
|
|
1939
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1940
|
+
o.__proto__ = p;
|
|
1941
|
+
return o;
|
|
1942
|
+
};
|
|
1943
|
+
return _setPrototypeOf(o, p);
|
|
1944
|
+
}
|
|
1945
|
+
exports["default"] = /* @__PURE__ */ function(_Namespace) {
|
|
1946
|
+
_inheritsLoose(Universal, _Namespace);
|
|
1947
|
+
function Universal(opts) {
|
|
1948
|
+
var _this = _Namespace.call(this, opts) || this;
|
|
1949
|
+
_this.type = _types.UNIVERSAL;
|
|
1950
|
+
_this.value = "*";
|
|
1951
|
+
return _this;
|
|
1952
|
+
}
|
|
1953
|
+
return Universal;
|
|
1954
|
+
}(_namespace["default"]);
|
|
1955
|
+
module.exports = exports.default;
|
|
1956
|
+
}));
|
|
1957
|
+
//#endregion
|
|
1958
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/combinator.js
|
|
1959
|
+
var require_combinator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1960
|
+
exports.__esModule = true;
|
|
1961
|
+
exports["default"] = void 0;
|
|
1962
|
+
var _node = _interopRequireDefault(require_node$1());
|
|
1963
|
+
var _types = require_types();
|
|
1964
|
+
function _interopRequireDefault(obj) {
|
|
1965
|
+
return obj && obj.__esModule ? obj : { "default": obj };
|
|
1966
|
+
}
|
|
1967
|
+
function _inheritsLoose(subClass, superClass) {
|
|
1968
|
+
subClass.prototype = Object.create(superClass.prototype);
|
|
1969
|
+
subClass.prototype.constructor = subClass;
|
|
1970
|
+
_setPrototypeOf(subClass, superClass);
|
|
1971
|
+
}
|
|
1972
|
+
function _setPrototypeOf(o, p) {
|
|
1973
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1974
|
+
o.__proto__ = p;
|
|
1975
|
+
return o;
|
|
1976
|
+
};
|
|
1977
|
+
return _setPrototypeOf(o, p);
|
|
1978
|
+
}
|
|
1979
|
+
exports["default"] = /* @__PURE__ */ function(_Node) {
|
|
1980
|
+
_inheritsLoose(Combinator, _Node);
|
|
1981
|
+
function Combinator(opts) {
|
|
1982
|
+
var _this = _Node.call(this, opts) || this;
|
|
1983
|
+
_this.type = _types.COMBINATOR;
|
|
1984
|
+
return _this;
|
|
1985
|
+
}
|
|
1986
|
+
return Combinator;
|
|
1987
|
+
}(_node["default"]);
|
|
1988
|
+
module.exports = exports.default;
|
|
1989
|
+
}));
|
|
1990
|
+
//#endregion
|
|
1991
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/nesting.js
|
|
1992
|
+
var require_nesting = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1993
|
+
exports.__esModule = true;
|
|
1994
|
+
exports["default"] = void 0;
|
|
1995
|
+
var _node = _interopRequireDefault(require_node$1());
|
|
1996
|
+
var _types = require_types();
|
|
1997
|
+
function _interopRequireDefault(obj) {
|
|
1998
|
+
return obj && obj.__esModule ? obj : { "default": obj };
|
|
1999
|
+
}
|
|
2000
|
+
function _inheritsLoose(subClass, superClass) {
|
|
2001
|
+
subClass.prototype = Object.create(superClass.prototype);
|
|
2002
|
+
subClass.prototype.constructor = subClass;
|
|
2003
|
+
_setPrototypeOf(subClass, superClass);
|
|
2004
|
+
}
|
|
2005
|
+
function _setPrototypeOf(o, p) {
|
|
2006
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
2007
|
+
o.__proto__ = p;
|
|
2008
|
+
return o;
|
|
2009
|
+
};
|
|
2010
|
+
return _setPrototypeOf(o, p);
|
|
2011
|
+
}
|
|
2012
|
+
exports["default"] = /* @__PURE__ */ function(_Node) {
|
|
2013
|
+
_inheritsLoose(Nesting, _Node);
|
|
2014
|
+
function Nesting(opts) {
|
|
2015
|
+
var _this = _Node.call(this, opts) || this;
|
|
2016
|
+
_this.type = _types.NESTING;
|
|
2017
|
+
_this.value = "&";
|
|
2018
|
+
return _this;
|
|
2019
|
+
}
|
|
2020
|
+
return Nesting;
|
|
2021
|
+
}(_node["default"]);
|
|
2022
|
+
module.exports = exports.default;
|
|
2023
|
+
}));
|
|
2024
|
+
//#endregion
|
|
2025
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/sortAscending.js
|
|
2026
|
+
var require_sortAscending = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2027
|
+
exports.__esModule = true;
|
|
2028
|
+
exports["default"] = sortAscending;
|
|
2029
|
+
function sortAscending(list) {
|
|
2030
|
+
return list.sort(function(a, b) {
|
|
2031
|
+
return a - b;
|
|
2032
|
+
});
|
|
2033
|
+
}
|
|
2034
|
+
module.exports = exports.default;
|
|
2035
|
+
}));
|
|
2036
|
+
//#endregion
|
|
2037
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/tokenTypes.js
|
|
2038
|
+
var require_tokenTypes = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
2039
|
+
exports.__esModule = true;
|
|
2040
|
+
exports.word = exports.tilde = exports.tab = exports.str = exports.space = exports.slash = exports.singleQuote = exports.semicolon = exports.plus = exports.pipe = exports.openSquare = exports.openParenthesis = exports.newline = exports.greaterThan = exports.feed = exports.equals = exports.doubleQuote = exports.dollar = exports.cr = exports.comment = exports.comma = exports.combinator = exports.colon = exports.closeSquare = exports.closeParenthesis = exports.caret = exports.bang = exports.backslash = exports.at = exports.asterisk = exports.ampersand = void 0;
|
|
2041
|
+
exports.ampersand = 38;
|
|
2042
|
+
exports.asterisk = 42;
|
|
2043
|
+
exports.at = 64;
|
|
2044
|
+
exports.comma = 44;
|
|
2045
|
+
exports.colon = 58;
|
|
2046
|
+
exports.semicolon = 59;
|
|
2047
|
+
exports.openParenthesis = 40;
|
|
2048
|
+
exports.closeParenthesis = 41;
|
|
2049
|
+
exports.openSquare = 91;
|
|
2050
|
+
exports.closeSquare = 93;
|
|
2051
|
+
exports.dollar = 36;
|
|
2052
|
+
exports.tilde = 126;
|
|
2053
|
+
exports.caret = 94;
|
|
2054
|
+
exports.plus = 43;
|
|
2055
|
+
exports.equals = 61;
|
|
2056
|
+
exports.pipe = 124;
|
|
2057
|
+
exports.greaterThan = 62;
|
|
2058
|
+
exports.space = 32;
|
|
2059
|
+
var singleQuote = 39;
|
|
2060
|
+
exports.singleQuote = singleQuote;
|
|
2061
|
+
exports.doubleQuote = 34;
|
|
2062
|
+
exports.slash = 47;
|
|
2063
|
+
exports.bang = 33;
|
|
2064
|
+
exports.backslash = 92;
|
|
2065
|
+
exports.cr = 13;
|
|
2066
|
+
exports.feed = 12;
|
|
2067
|
+
exports.newline = 10;
|
|
2068
|
+
exports.tab = 9;
|
|
2069
|
+
exports.str = singleQuote;
|
|
2070
|
+
exports.comment = -1;
|
|
2071
|
+
exports.word = -2;
|
|
2072
|
+
exports.combinator = -3;
|
|
2073
|
+
}));
|
|
2074
|
+
//#endregion
|
|
2075
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/tokenize.js
|
|
2076
|
+
var require_tokenize = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
2077
|
+
exports.__esModule = true;
|
|
2078
|
+
exports.FIELDS = void 0;
|
|
2079
|
+
exports["default"] = tokenize;
|
|
2080
|
+
var t = _interopRequireWildcard(require_tokenTypes());
|
|
2081
|
+
var _unescapable, _wordDelimiters;
|
|
2082
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
2083
|
+
if (typeof WeakMap !== "function") return null;
|
|
2084
|
+
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
2085
|
+
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
2086
|
+
return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
|
|
2087
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
2088
|
+
})(nodeInterop);
|
|
2089
|
+
}
|
|
2090
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
2091
|
+
if (!nodeInterop && obj && obj.__esModule) return obj;
|
|
2092
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { "default": obj };
|
|
2093
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
2094
|
+
if (cache && cache.has(obj)) return cache.get(obj);
|
|
2095
|
+
var newObj = {};
|
|
2096
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
2097
|
+
for (var key in obj) if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
2098
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
2099
|
+
if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
|
|
2100
|
+
else newObj[key] = obj[key];
|
|
2101
|
+
}
|
|
2102
|
+
newObj["default"] = obj;
|
|
2103
|
+
if (cache) cache.set(obj, newObj);
|
|
2104
|
+
return newObj;
|
|
2105
|
+
}
|
|
2106
|
+
var unescapable = (_unescapable = {}, _unescapable[t.tab] = true, _unescapable[t.newline] = true, _unescapable[t.cr] = true, _unescapable[t.feed] = true, _unescapable);
|
|
2107
|
+
var wordDelimiters = (_wordDelimiters = {}, _wordDelimiters[t.space] = true, _wordDelimiters[t.tab] = true, _wordDelimiters[t.newline] = true, _wordDelimiters[t.cr] = true, _wordDelimiters[t.feed] = true, _wordDelimiters[t.ampersand] = true, _wordDelimiters[t.asterisk] = true, _wordDelimiters[t.bang] = true, _wordDelimiters[t.comma] = true, _wordDelimiters[t.colon] = true, _wordDelimiters[t.semicolon] = true, _wordDelimiters[t.openParenthesis] = true, _wordDelimiters[t.closeParenthesis] = true, _wordDelimiters[t.openSquare] = true, _wordDelimiters[t.closeSquare] = true, _wordDelimiters[t.singleQuote] = true, _wordDelimiters[t.doubleQuote] = true, _wordDelimiters[t.plus] = true, _wordDelimiters[t.pipe] = true, _wordDelimiters[t.tilde] = true, _wordDelimiters[t.greaterThan] = true, _wordDelimiters[t.equals] = true, _wordDelimiters[t.dollar] = true, _wordDelimiters[t.caret] = true, _wordDelimiters[t.slash] = true, _wordDelimiters);
|
|
2108
|
+
var hex = {};
|
|
2109
|
+
var hexChars = "0123456789abcdefABCDEF";
|
|
2110
|
+
for (var i = 0; i < hexChars.length; i++) hex[hexChars.charCodeAt(i)] = true;
|
|
2111
|
+
/**
|
|
2112
|
+
* Returns the last index of the bar css word
|
|
2113
|
+
* @param {string} css The string in which the word begins
|
|
2114
|
+
* @param {number} start The index into the string where word's first letter occurs
|
|
2115
|
+
*/
|
|
2116
|
+
function consumeWord(css, start) {
|
|
2117
|
+
var next = start;
|
|
2118
|
+
var code;
|
|
2119
|
+
do {
|
|
2120
|
+
code = css.charCodeAt(next);
|
|
2121
|
+
if (wordDelimiters[code]) return next - 1;
|
|
2122
|
+
else if (code === t.backslash) next = consumeEscape(css, next) + 1;
|
|
2123
|
+
else next++;
|
|
2124
|
+
} while (next < css.length);
|
|
2125
|
+
return next - 1;
|
|
2126
|
+
}
|
|
2127
|
+
/**
|
|
2128
|
+
* Returns the last index of the escape sequence
|
|
2129
|
+
* @param {string} css The string in which the sequence begins
|
|
2130
|
+
* @param {number} start The index into the string where escape character (`\`) occurs.
|
|
2131
|
+
*/
|
|
2132
|
+
function consumeEscape(css, start) {
|
|
2133
|
+
var next = start;
|
|
2134
|
+
var code = css.charCodeAt(next + 1);
|
|
2135
|
+
if (unescapable[code]) {} else if (hex[code]) {
|
|
2136
|
+
var hexDigits = 0;
|
|
2137
|
+
do {
|
|
2138
|
+
next++;
|
|
2139
|
+
hexDigits++;
|
|
2140
|
+
code = css.charCodeAt(next + 1);
|
|
2141
|
+
} while (hex[code] && hexDigits < 6);
|
|
2142
|
+
if (hexDigits < 6 && code === t.space) next++;
|
|
2143
|
+
} else next++;
|
|
2144
|
+
return next;
|
|
2145
|
+
}
|
|
2146
|
+
exports.FIELDS = {
|
|
2147
|
+
TYPE: 0,
|
|
2148
|
+
START_LINE: 1,
|
|
2149
|
+
START_COL: 2,
|
|
2150
|
+
END_LINE: 3,
|
|
2151
|
+
END_COL: 4,
|
|
2152
|
+
START_POS: 5,
|
|
2153
|
+
END_POS: 6
|
|
2154
|
+
};
|
|
2155
|
+
function tokenize(input) {
|
|
2156
|
+
var tokens = [];
|
|
2157
|
+
var css = input.css.valueOf();
|
|
2158
|
+
var length = css.length;
|
|
2159
|
+
var offset = -1;
|
|
2160
|
+
var line = 1;
|
|
2161
|
+
var start = 0;
|
|
2162
|
+
var end = 0;
|
|
2163
|
+
var code, content, endColumn, endLine, escaped, escapePos, last, lines, next, nextLine, nextOffset, quote, tokenType;
|
|
2164
|
+
function unclosed(what, fix) {
|
|
2165
|
+
if (input.safe) {
|
|
2166
|
+
css += fix;
|
|
2167
|
+
next = css.length - 1;
|
|
2168
|
+
} else throw input.error("Unclosed " + what, line, start - offset, start);
|
|
2169
|
+
}
|
|
2170
|
+
while (start < length) {
|
|
2171
|
+
code = css.charCodeAt(start);
|
|
2172
|
+
if (code === t.newline) {
|
|
2173
|
+
offset = start;
|
|
2174
|
+
line += 1;
|
|
2175
|
+
}
|
|
2176
|
+
switch (code) {
|
|
2177
|
+
case t.space:
|
|
2178
|
+
case t.tab:
|
|
2179
|
+
case t.newline:
|
|
2180
|
+
case t.cr:
|
|
2181
|
+
case t.feed:
|
|
2182
|
+
next = start;
|
|
2183
|
+
do {
|
|
2184
|
+
next += 1;
|
|
2185
|
+
code = css.charCodeAt(next);
|
|
2186
|
+
if (code === t.newline) {
|
|
2187
|
+
offset = next;
|
|
2188
|
+
line += 1;
|
|
2189
|
+
}
|
|
2190
|
+
} while (code === t.space || code === t.newline || code === t.tab || code === t.cr || code === t.feed);
|
|
2191
|
+
tokenType = t.space;
|
|
2192
|
+
endLine = line;
|
|
2193
|
+
endColumn = next - offset - 1;
|
|
2194
|
+
end = next;
|
|
2195
|
+
break;
|
|
2196
|
+
case t.plus:
|
|
2197
|
+
case t.greaterThan:
|
|
2198
|
+
case t.tilde:
|
|
2199
|
+
case t.pipe:
|
|
2200
|
+
next = start;
|
|
2201
|
+
do {
|
|
2202
|
+
next += 1;
|
|
2203
|
+
code = css.charCodeAt(next);
|
|
2204
|
+
} while (code === t.plus || code === t.greaterThan || code === t.tilde || code === t.pipe);
|
|
2205
|
+
tokenType = t.combinator;
|
|
2206
|
+
endLine = line;
|
|
2207
|
+
endColumn = start - offset;
|
|
2208
|
+
end = next;
|
|
2209
|
+
break;
|
|
2210
|
+
case t.asterisk:
|
|
2211
|
+
case t.ampersand:
|
|
2212
|
+
case t.bang:
|
|
2213
|
+
case t.comma:
|
|
2214
|
+
case t.equals:
|
|
2215
|
+
case t.dollar:
|
|
2216
|
+
case t.caret:
|
|
2217
|
+
case t.openSquare:
|
|
2218
|
+
case t.closeSquare:
|
|
2219
|
+
case t.colon:
|
|
2220
|
+
case t.semicolon:
|
|
2221
|
+
case t.openParenthesis:
|
|
2222
|
+
case t.closeParenthesis:
|
|
2223
|
+
next = start;
|
|
2224
|
+
tokenType = code;
|
|
2225
|
+
endLine = line;
|
|
2226
|
+
endColumn = start - offset;
|
|
2227
|
+
end = next + 1;
|
|
2228
|
+
break;
|
|
2229
|
+
case t.singleQuote:
|
|
2230
|
+
case t.doubleQuote:
|
|
2231
|
+
quote = code === t.singleQuote ? "'" : "\"";
|
|
2232
|
+
next = start;
|
|
2233
|
+
do {
|
|
2234
|
+
escaped = false;
|
|
2235
|
+
next = css.indexOf(quote, next + 1);
|
|
2236
|
+
if (next === -1) unclosed("quote", quote);
|
|
2237
|
+
escapePos = next;
|
|
2238
|
+
while (css.charCodeAt(escapePos - 1) === t.backslash) {
|
|
2239
|
+
escapePos -= 1;
|
|
2240
|
+
escaped = !escaped;
|
|
2241
|
+
}
|
|
2242
|
+
} while (escaped);
|
|
2243
|
+
tokenType = t.str;
|
|
2244
|
+
endLine = line;
|
|
2245
|
+
endColumn = start - offset;
|
|
2246
|
+
end = next + 1;
|
|
2247
|
+
break;
|
|
2248
|
+
default:
|
|
2249
|
+
if (code === t.slash && css.charCodeAt(start + 1) === t.asterisk) {
|
|
2250
|
+
next = css.indexOf("*/", start + 2) + 1;
|
|
2251
|
+
if (next === 0) unclosed("comment", "*/");
|
|
2252
|
+
content = css.slice(start, next + 1);
|
|
2253
|
+
lines = content.split("\n");
|
|
2254
|
+
last = lines.length - 1;
|
|
2255
|
+
if (last > 0) {
|
|
2256
|
+
nextLine = line + last;
|
|
2257
|
+
nextOffset = next - lines[last].length;
|
|
2258
|
+
} else {
|
|
2259
|
+
nextLine = line;
|
|
2260
|
+
nextOffset = offset;
|
|
2261
|
+
}
|
|
2262
|
+
tokenType = t.comment;
|
|
2263
|
+
line = nextLine;
|
|
2264
|
+
endLine = nextLine;
|
|
2265
|
+
endColumn = next - nextOffset;
|
|
2266
|
+
} else if (code === t.slash) {
|
|
2267
|
+
next = start;
|
|
2268
|
+
tokenType = code;
|
|
2269
|
+
endLine = line;
|
|
2270
|
+
endColumn = start - offset;
|
|
2271
|
+
end = next + 1;
|
|
2272
|
+
} else {
|
|
2273
|
+
next = consumeWord(css, start);
|
|
2274
|
+
tokenType = t.word;
|
|
2275
|
+
endLine = line;
|
|
2276
|
+
endColumn = next - offset;
|
|
2277
|
+
}
|
|
2278
|
+
end = next + 1;
|
|
2279
|
+
break;
|
|
2280
|
+
}
|
|
2281
|
+
tokens.push([
|
|
2282
|
+
tokenType,
|
|
2283
|
+
line,
|
|
2284
|
+
start - offset,
|
|
2285
|
+
endLine,
|
|
2286
|
+
endColumn,
|
|
2287
|
+
start,
|
|
2288
|
+
end
|
|
2289
|
+
]);
|
|
2290
|
+
if (nextOffset) {
|
|
2291
|
+
offset = nextOffset;
|
|
2292
|
+
nextOffset = null;
|
|
2293
|
+
}
|
|
2294
|
+
start = end;
|
|
2295
|
+
}
|
|
2296
|
+
return tokens;
|
|
2297
|
+
}
|
|
2298
|
+
}));
|
|
2299
|
+
//#endregion
|
|
2300
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/parser.js
|
|
2301
|
+
var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2302
|
+
exports.__esModule = true;
|
|
2303
|
+
exports["default"] = void 0;
|
|
2304
|
+
var _root = _interopRequireDefault(require_root());
|
|
2305
|
+
var _selector = _interopRequireDefault(require_selector());
|
|
2306
|
+
var _className = _interopRequireDefault(require_className());
|
|
2307
|
+
var _comment = _interopRequireDefault(require_comment());
|
|
2308
|
+
var _id = _interopRequireDefault(require_id());
|
|
2309
|
+
var _tag = _interopRequireDefault(require_tag());
|
|
2310
|
+
var _string = _interopRequireDefault(require_string());
|
|
2311
|
+
var _pseudo = _interopRequireDefault(require_pseudo());
|
|
2312
|
+
var _attribute = _interopRequireWildcard(require_attribute());
|
|
2313
|
+
var _universal = _interopRequireDefault(require_universal());
|
|
2314
|
+
var _combinator = _interopRequireDefault(require_combinator());
|
|
2315
|
+
var _nesting = _interopRequireDefault(require_nesting());
|
|
2316
|
+
var _sortAscending = _interopRequireDefault(require_sortAscending());
|
|
2317
|
+
var _tokenize = _interopRequireWildcard(require_tokenize());
|
|
2318
|
+
var tokens = _interopRequireWildcard(require_tokenTypes());
|
|
2319
|
+
var types = _interopRequireWildcard(require_types());
|
|
2320
|
+
var _util = require_util();
|
|
2321
|
+
var _WHITESPACE_TOKENS, _Object$assign;
|
|
2322
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
2323
|
+
if (typeof WeakMap !== "function") return null;
|
|
2324
|
+
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
2325
|
+
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
2326
|
+
return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
|
|
2327
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
2328
|
+
})(nodeInterop);
|
|
2329
|
+
}
|
|
2330
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
2331
|
+
if (!nodeInterop && obj && obj.__esModule) return obj;
|
|
2332
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { "default": obj };
|
|
2333
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
2334
|
+
if (cache && cache.has(obj)) return cache.get(obj);
|
|
2335
|
+
var newObj = {};
|
|
2336
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
2337
|
+
for (var key in obj) if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
2338
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
2339
|
+
if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
|
|
2340
|
+
else newObj[key] = obj[key];
|
|
2341
|
+
}
|
|
2342
|
+
newObj["default"] = obj;
|
|
2343
|
+
if (cache) cache.set(obj, newObj);
|
|
2344
|
+
return newObj;
|
|
2345
|
+
}
|
|
2346
|
+
function _interopRequireDefault(obj) {
|
|
2347
|
+
return obj && obj.__esModule ? obj : { "default": obj };
|
|
2348
|
+
}
|
|
2349
|
+
function _defineProperties(target, props) {
|
|
2350
|
+
for (var i = 0; i < props.length; i++) {
|
|
2351
|
+
var descriptor = props[i];
|
|
2352
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
2353
|
+
descriptor.configurable = true;
|
|
2354
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
2355
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
2356
|
+
}
|
|
2357
|
+
}
|
|
2358
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
2359
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
2360
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
2361
|
+
Object.defineProperty(Constructor, "prototype", { writable: false });
|
|
2362
|
+
return Constructor;
|
|
2363
|
+
}
|
|
2364
|
+
var WHITESPACE_TOKENS = (_WHITESPACE_TOKENS = {}, _WHITESPACE_TOKENS[tokens.space] = true, _WHITESPACE_TOKENS[tokens.cr] = true, _WHITESPACE_TOKENS[tokens.feed] = true, _WHITESPACE_TOKENS[tokens.newline] = true, _WHITESPACE_TOKENS[tokens.tab] = true, _WHITESPACE_TOKENS);
|
|
2365
|
+
var WHITESPACE_EQUIV_TOKENS = Object.assign({}, WHITESPACE_TOKENS, (_Object$assign = {}, _Object$assign[tokens.comment] = true, _Object$assign));
|
|
2366
|
+
function tokenStart(token) {
|
|
2367
|
+
return {
|
|
2368
|
+
line: token[_tokenize.FIELDS.START_LINE],
|
|
2369
|
+
column: token[_tokenize.FIELDS.START_COL]
|
|
2370
|
+
};
|
|
2371
|
+
}
|
|
2372
|
+
function tokenEnd(token) {
|
|
2373
|
+
return {
|
|
2374
|
+
line: token[_tokenize.FIELDS.END_LINE],
|
|
2375
|
+
column: token[_tokenize.FIELDS.END_COL]
|
|
2376
|
+
};
|
|
2377
|
+
}
|
|
2378
|
+
function getSource(startLine, startColumn, endLine, endColumn) {
|
|
2379
|
+
return {
|
|
2380
|
+
start: {
|
|
2381
|
+
line: startLine,
|
|
2382
|
+
column: startColumn
|
|
2383
|
+
},
|
|
2384
|
+
end: {
|
|
2385
|
+
line: endLine,
|
|
2386
|
+
column: endColumn
|
|
2387
|
+
}
|
|
2388
|
+
};
|
|
2389
|
+
}
|
|
2390
|
+
function getTokenSource(token) {
|
|
2391
|
+
return getSource(token[_tokenize.FIELDS.START_LINE], token[_tokenize.FIELDS.START_COL], token[_tokenize.FIELDS.END_LINE], token[_tokenize.FIELDS.END_COL]);
|
|
2392
|
+
}
|
|
2393
|
+
function getTokenSourceSpan(startToken, endToken) {
|
|
2394
|
+
if (!startToken) return;
|
|
2395
|
+
return getSource(startToken[_tokenize.FIELDS.START_LINE], startToken[_tokenize.FIELDS.START_COL], endToken[_tokenize.FIELDS.END_LINE], endToken[_tokenize.FIELDS.END_COL]);
|
|
2396
|
+
}
|
|
2397
|
+
function unescapeProp(node, prop) {
|
|
2398
|
+
var value = node[prop];
|
|
2399
|
+
if (typeof value !== "string") return;
|
|
2400
|
+
if (value.indexOf("\\") !== -1) {
|
|
2401
|
+
(0, _util.ensureObject)(node, "raws");
|
|
2402
|
+
node[prop] = (0, _util.unesc)(value);
|
|
2403
|
+
if (node.raws[prop] === void 0) node.raws[prop] = value;
|
|
2404
|
+
}
|
|
2405
|
+
return node;
|
|
2406
|
+
}
|
|
2407
|
+
function indexesOf(array, item) {
|
|
2408
|
+
var i = -1;
|
|
2409
|
+
var indexes = [];
|
|
2410
|
+
while ((i = array.indexOf(item, i + 1)) !== -1) indexes.push(i);
|
|
2411
|
+
return indexes;
|
|
2412
|
+
}
|
|
2413
|
+
function uniqs() {
|
|
2414
|
+
var list = Array.prototype.concat.apply([], arguments);
|
|
2415
|
+
return list.filter(function(item, i) {
|
|
2416
|
+
return i === list.indexOf(item);
|
|
2417
|
+
});
|
|
2418
|
+
}
|
|
2419
|
+
exports["default"] = /* @__PURE__ */ function() {
|
|
2420
|
+
function Parser(rule, options) {
|
|
2421
|
+
if (options === void 0) options = {};
|
|
2422
|
+
this.rule = rule;
|
|
2423
|
+
this.options = Object.assign({
|
|
2424
|
+
lossy: false,
|
|
2425
|
+
safe: false
|
|
2426
|
+
}, options);
|
|
2427
|
+
this.position = 0;
|
|
2428
|
+
this.css = typeof this.rule === "string" ? this.rule : this.rule.selector;
|
|
2429
|
+
this.tokens = (0, _tokenize["default"])({
|
|
2430
|
+
css: this.css,
|
|
2431
|
+
error: this._errorGenerator(),
|
|
2432
|
+
safe: this.options.safe
|
|
2433
|
+
});
|
|
2434
|
+
var rootSource = getTokenSourceSpan(this.tokens[0], this.tokens[this.tokens.length - 1]);
|
|
2435
|
+
this.root = new _root["default"]({ source: rootSource });
|
|
2436
|
+
this.root.errorGenerator = this._errorGenerator();
|
|
2437
|
+
var selector = new _selector["default"]({
|
|
2438
|
+
source: { start: {
|
|
2439
|
+
line: 1,
|
|
2440
|
+
column: 1
|
|
2441
|
+
} },
|
|
2442
|
+
sourceIndex: 0
|
|
2443
|
+
});
|
|
2444
|
+
this.root.append(selector);
|
|
2445
|
+
this.current = selector;
|
|
2446
|
+
this.loop();
|
|
2447
|
+
}
|
|
2448
|
+
var _proto = Parser.prototype;
|
|
2449
|
+
_proto._errorGenerator = function _errorGenerator() {
|
|
2450
|
+
var _this = this;
|
|
2451
|
+
return function(message, errorOptions) {
|
|
2452
|
+
if (typeof _this.rule === "string") return new Error(message);
|
|
2453
|
+
return _this.rule.error(message, errorOptions);
|
|
2454
|
+
};
|
|
2455
|
+
};
|
|
2456
|
+
_proto.attribute = function attribute() {
|
|
2457
|
+
var attr = [];
|
|
2458
|
+
var startingToken = this.currToken;
|
|
2459
|
+
this.position++;
|
|
2460
|
+
while (this.position < this.tokens.length && this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) {
|
|
2461
|
+
attr.push(this.currToken);
|
|
2462
|
+
this.position++;
|
|
2463
|
+
}
|
|
2464
|
+
if (this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) return this.expected("closing square bracket", this.currToken[_tokenize.FIELDS.START_POS]);
|
|
2465
|
+
var len = attr.length;
|
|
2466
|
+
var node = {
|
|
2467
|
+
source: getSource(startingToken[1], startingToken[2], this.currToken[3], this.currToken[4]),
|
|
2468
|
+
sourceIndex: startingToken[_tokenize.FIELDS.START_POS]
|
|
2469
|
+
};
|
|
2470
|
+
if (len === 1 && !~[tokens.word].indexOf(attr[0][_tokenize.FIELDS.TYPE])) return this.expected("attribute", attr[0][_tokenize.FIELDS.START_POS]);
|
|
2471
|
+
var pos = 0;
|
|
2472
|
+
var spaceBefore = "";
|
|
2473
|
+
var commentBefore = "";
|
|
2474
|
+
var lastAdded = null;
|
|
2475
|
+
var spaceAfterMeaningfulToken = false;
|
|
2476
|
+
while (pos < len) {
|
|
2477
|
+
var token = attr[pos];
|
|
2478
|
+
var content = this.content(token);
|
|
2479
|
+
var next = attr[pos + 1];
|
|
2480
|
+
switch (token[_tokenize.FIELDS.TYPE]) {
|
|
2481
|
+
case tokens.space:
|
|
2482
|
+
spaceAfterMeaningfulToken = true;
|
|
2483
|
+
if (this.options.lossy) break;
|
|
2484
|
+
if (lastAdded) {
|
|
2485
|
+
(0, _util.ensureObject)(node, "spaces", lastAdded);
|
|
2486
|
+
var prevContent = node.spaces[lastAdded].after || "";
|
|
2487
|
+
node.spaces[lastAdded].after = prevContent + content;
|
|
2488
|
+
var existingComment = (0, _util.getProp)(node, "raws", "spaces", lastAdded, "after") || null;
|
|
2489
|
+
if (existingComment) node.raws.spaces[lastAdded].after = existingComment + content;
|
|
2490
|
+
} else {
|
|
2491
|
+
spaceBefore = spaceBefore + content;
|
|
2492
|
+
commentBefore = commentBefore + content;
|
|
2493
|
+
}
|
|
2494
|
+
break;
|
|
2495
|
+
case tokens.asterisk:
|
|
2496
|
+
if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {
|
|
2497
|
+
node.operator = content;
|
|
2498
|
+
lastAdded = "operator";
|
|
2499
|
+
} else if ((!node.namespace || lastAdded === "namespace" && !spaceAfterMeaningfulToken) && next) {
|
|
2500
|
+
if (spaceBefore) {
|
|
2501
|
+
(0, _util.ensureObject)(node, "spaces", "attribute");
|
|
2502
|
+
node.spaces.attribute.before = spaceBefore;
|
|
2503
|
+
spaceBefore = "";
|
|
2504
|
+
}
|
|
2505
|
+
if (commentBefore) {
|
|
2506
|
+
(0, _util.ensureObject)(node, "raws", "spaces", "attribute");
|
|
2507
|
+
node.raws.spaces.attribute.before = spaceBefore;
|
|
2508
|
+
commentBefore = "";
|
|
2509
|
+
}
|
|
2510
|
+
node.namespace = (node.namespace || "") + content;
|
|
2511
|
+
if ((0, _util.getProp)(node, "raws", "namespace") || null) node.raws.namespace += content;
|
|
2512
|
+
lastAdded = "namespace";
|
|
2513
|
+
}
|
|
2514
|
+
spaceAfterMeaningfulToken = false;
|
|
2515
|
+
break;
|
|
2516
|
+
case tokens.dollar: if (lastAdded === "value") {
|
|
2517
|
+
var oldRawValue = (0, _util.getProp)(node, "raws", "value");
|
|
2518
|
+
node.value += "$";
|
|
2519
|
+
if (oldRawValue) node.raws.value = oldRawValue + "$";
|
|
2520
|
+
break;
|
|
2521
|
+
}
|
|
2522
|
+
case tokens.caret:
|
|
2523
|
+
if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {
|
|
2524
|
+
node.operator = content;
|
|
2525
|
+
lastAdded = "operator";
|
|
2526
|
+
}
|
|
2527
|
+
spaceAfterMeaningfulToken = false;
|
|
2528
|
+
break;
|
|
2529
|
+
case tokens.combinator:
|
|
2530
|
+
if (content === "~" && next[_tokenize.FIELDS.TYPE] === tokens.equals) {
|
|
2531
|
+
node.operator = content;
|
|
2532
|
+
lastAdded = "operator";
|
|
2533
|
+
}
|
|
2534
|
+
if (content !== "|") {
|
|
2535
|
+
spaceAfterMeaningfulToken = false;
|
|
2536
|
+
break;
|
|
2537
|
+
}
|
|
2538
|
+
if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {
|
|
2539
|
+
node.operator = content;
|
|
2540
|
+
lastAdded = "operator";
|
|
2541
|
+
} else if (!node.namespace && !node.attribute) node.namespace = true;
|
|
2542
|
+
spaceAfterMeaningfulToken = false;
|
|
2543
|
+
break;
|
|
2544
|
+
case tokens.word:
|
|
2545
|
+
if (next && this.content(next) === "|" && attr[pos + 2] && attr[pos + 2][_tokenize.FIELDS.TYPE] !== tokens.equals && !node.operator && !node.namespace) {
|
|
2546
|
+
node.namespace = content;
|
|
2547
|
+
lastAdded = "namespace";
|
|
2548
|
+
} else if (!node.attribute || lastAdded === "attribute" && !spaceAfterMeaningfulToken) {
|
|
2549
|
+
if (spaceBefore) {
|
|
2550
|
+
(0, _util.ensureObject)(node, "spaces", "attribute");
|
|
2551
|
+
node.spaces.attribute.before = spaceBefore;
|
|
2552
|
+
spaceBefore = "";
|
|
2553
|
+
}
|
|
2554
|
+
if (commentBefore) {
|
|
2555
|
+
(0, _util.ensureObject)(node, "raws", "spaces", "attribute");
|
|
2556
|
+
node.raws.spaces.attribute.before = commentBefore;
|
|
2557
|
+
commentBefore = "";
|
|
2558
|
+
}
|
|
2559
|
+
node.attribute = (node.attribute || "") + content;
|
|
2560
|
+
if ((0, _util.getProp)(node, "raws", "attribute") || null) node.raws.attribute += content;
|
|
2561
|
+
lastAdded = "attribute";
|
|
2562
|
+
} else if (!node.value && node.value !== "" || lastAdded === "value" && !(spaceAfterMeaningfulToken || node.quoteMark)) {
|
|
2563
|
+
var _unescaped = (0, _util.unesc)(content);
|
|
2564
|
+
var _oldRawValue = (0, _util.getProp)(node, "raws", "value") || "";
|
|
2565
|
+
var oldValue = node.value || "";
|
|
2566
|
+
node.value = oldValue + _unescaped;
|
|
2567
|
+
node.quoteMark = null;
|
|
2568
|
+
if (_unescaped !== content || _oldRawValue) {
|
|
2569
|
+
(0, _util.ensureObject)(node, "raws");
|
|
2570
|
+
node.raws.value = (_oldRawValue || oldValue) + content;
|
|
2571
|
+
}
|
|
2572
|
+
lastAdded = "value";
|
|
2573
|
+
} else {
|
|
2574
|
+
var insensitive = content === "i" || content === "I";
|
|
2575
|
+
if ((node.value || node.value === "") && (node.quoteMark || spaceAfterMeaningfulToken)) {
|
|
2576
|
+
node.insensitive = insensitive;
|
|
2577
|
+
if (!insensitive || content === "I") {
|
|
2578
|
+
(0, _util.ensureObject)(node, "raws");
|
|
2579
|
+
node.raws.insensitiveFlag = content;
|
|
2580
|
+
}
|
|
2581
|
+
lastAdded = "insensitive";
|
|
2582
|
+
if (spaceBefore) {
|
|
2583
|
+
(0, _util.ensureObject)(node, "spaces", "insensitive");
|
|
2584
|
+
node.spaces.insensitive.before = spaceBefore;
|
|
2585
|
+
spaceBefore = "";
|
|
2586
|
+
}
|
|
2587
|
+
if (commentBefore) {
|
|
2588
|
+
(0, _util.ensureObject)(node, "raws", "spaces", "insensitive");
|
|
2589
|
+
node.raws.spaces.insensitive.before = commentBefore;
|
|
2590
|
+
commentBefore = "";
|
|
2591
|
+
}
|
|
2592
|
+
} else if (node.value || node.value === "") {
|
|
2593
|
+
lastAdded = "value";
|
|
2594
|
+
node.value += content;
|
|
2595
|
+
if (node.raws.value) node.raws.value += content;
|
|
2596
|
+
}
|
|
2597
|
+
}
|
|
2598
|
+
spaceAfterMeaningfulToken = false;
|
|
2599
|
+
break;
|
|
2600
|
+
case tokens.str:
|
|
2601
|
+
if (!node.attribute || !node.operator) return this.error("Expected an attribute followed by an operator preceding the string.", { index: token[_tokenize.FIELDS.START_POS] });
|
|
2602
|
+
var _unescapeValue = (0, _attribute.unescapeValue)(content), unescaped = _unescapeValue.unescaped, quoteMark = _unescapeValue.quoteMark;
|
|
2603
|
+
node.value = unescaped;
|
|
2604
|
+
node.quoteMark = quoteMark;
|
|
2605
|
+
lastAdded = "value";
|
|
2606
|
+
(0, _util.ensureObject)(node, "raws");
|
|
2607
|
+
node.raws.value = content;
|
|
2608
|
+
spaceAfterMeaningfulToken = false;
|
|
2609
|
+
break;
|
|
2610
|
+
case tokens.equals:
|
|
2611
|
+
if (!node.attribute) return this.expected("attribute", token[_tokenize.FIELDS.START_POS], content);
|
|
2612
|
+
if (node.value) return this.error("Unexpected \"=\" found; an operator was already defined.", { index: token[_tokenize.FIELDS.START_POS] });
|
|
2613
|
+
node.operator = node.operator ? node.operator + content : content;
|
|
2614
|
+
lastAdded = "operator";
|
|
2615
|
+
spaceAfterMeaningfulToken = false;
|
|
2616
|
+
break;
|
|
2617
|
+
case tokens.comment:
|
|
2618
|
+
if (lastAdded) if (spaceAfterMeaningfulToken || next && next[_tokenize.FIELDS.TYPE] === tokens.space || lastAdded === "insensitive") {
|
|
2619
|
+
var lastComment = (0, _util.getProp)(node, "spaces", lastAdded, "after") || "";
|
|
2620
|
+
var rawLastComment = (0, _util.getProp)(node, "raws", "spaces", lastAdded, "after") || lastComment;
|
|
2621
|
+
(0, _util.ensureObject)(node, "raws", "spaces", lastAdded);
|
|
2622
|
+
node.raws.spaces[lastAdded].after = rawLastComment + content;
|
|
2623
|
+
} else {
|
|
2624
|
+
var lastValue = node[lastAdded] || "";
|
|
2625
|
+
var rawLastValue = (0, _util.getProp)(node, "raws", lastAdded) || lastValue;
|
|
2626
|
+
(0, _util.ensureObject)(node, "raws");
|
|
2627
|
+
node.raws[lastAdded] = rawLastValue + content;
|
|
2628
|
+
}
|
|
2629
|
+
else commentBefore = commentBefore + content;
|
|
2630
|
+
break;
|
|
2631
|
+
default: return this.error("Unexpected \"" + content + "\" found.", { index: token[_tokenize.FIELDS.START_POS] });
|
|
2632
|
+
}
|
|
2633
|
+
pos++;
|
|
2634
|
+
}
|
|
2635
|
+
unescapeProp(node, "attribute");
|
|
2636
|
+
unescapeProp(node, "namespace");
|
|
2637
|
+
this.newNode(new _attribute["default"](node));
|
|
2638
|
+
this.position++;
|
|
2639
|
+
};
|
|
2640
|
+
_proto.parseWhitespaceEquivalentTokens = function parseWhitespaceEquivalentTokens(stopPosition) {
|
|
2641
|
+
if (stopPosition < 0) stopPosition = this.tokens.length;
|
|
2642
|
+
var startPosition = this.position;
|
|
2643
|
+
var nodes = [];
|
|
2644
|
+
var space = "";
|
|
2645
|
+
var lastComment = void 0;
|
|
2646
|
+
do
|
|
2647
|
+
if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) {
|
|
2648
|
+
if (!this.options.lossy) space += this.content();
|
|
2649
|
+
} else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.comment) {
|
|
2650
|
+
var spaces = {};
|
|
2651
|
+
if (space) {
|
|
2652
|
+
spaces.before = space;
|
|
2653
|
+
space = "";
|
|
2654
|
+
}
|
|
2655
|
+
lastComment = new _comment["default"]({
|
|
2656
|
+
value: this.content(),
|
|
2657
|
+
source: getTokenSource(this.currToken),
|
|
2658
|
+
sourceIndex: this.currToken[_tokenize.FIELDS.START_POS],
|
|
2659
|
+
spaces
|
|
2660
|
+
});
|
|
2661
|
+
nodes.push(lastComment);
|
|
2662
|
+
}
|
|
2663
|
+
while (++this.position < stopPosition);
|
|
2664
|
+
if (space) {
|
|
2665
|
+
if (lastComment) lastComment.spaces.after = space;
|
|
2666
|
+
else if (!this.options.lossy) {
|
|
2667
|
+
var firstToken = this.tokens[startPosition];
|
|
2668
|
+
var lastToken = this.tokens[this.position - 1];
|
|
2669
|
+
nodes.push(new _string["default"]({
|
|
2670
|
+
value: "",
|
|
2671
|
+
source: getSource(firstToken[_tokenize.FIELDS.START_LINE], firstToken[_tokenize.FIELDS.START_COL], lastToken[_tokenize.FIELDS.END_LINE], lastToken[_tokenize.FIELDS.END_COL]),
|
|
2672
|
+
sourceIndex: firstToken[_tokenize.FIELDS.START_POS],
|
|
2673
|
+
spaces: {
|
|
2674
|
+
before: space,
|
|
2675
|
+
after: ""
|
|
2676
|
+
}
|
|
2677
|
+
}));
|
|
2678
|
+
}
|
|
2679
|
+
}
|
|
2680
|
+
return nodes;
|
|
2681
|
+
};
|
|
2682
|
+
_proto.convertWhitespaceNodesToSpace = function convertWhitespaceNodesToSpace(nodes, requiredSpace) {
|
|
2683
|
+
var _this2 = this;
|
|
2684
|
+
if (requiredSpace === void 0) requiredSpace = false;
|
|
2685
|
+
var space = "";
|
|
2686
|
+
var rawSpace = "";
|
|
2687
|
+
nodes.forEach(function(n) {
|
|
2688
|
+
var spaceBefore = _this2.lossySpace(n.spaces.before, requiredSpace);
|
|
2689
|
+
var rawSpaceBefore = _this2.lossySpace(n.rawSpaceBefore, requiredSpace);
|
|
2690
|
+
space += spaceBefore + _this2.lossySpace(n.spaces.after, requiredSpace && spaceBefore.length === 0);
|
|
2691
|
+
rawSpace += spaceBefore + n.value + _this2.lossySpace(n.rawSpaceAfter, requiredSpace && rawSpaceBefore.length === 0);
|
|
2692
|
+
});
|
|
2693
|
+
if (rawSpace === space) rawSpace = void 0;
|
|
2694
|
+
return {
|
|
2695
|
+
space,
|
|
2696
|
+
rawSpace
|
|
2697
|
+
};
|
|
2698
|
+
};
|
|
2699
|
+
_proto.isNamedCombinator = function isNamedCombinator(position) {
|
|
2700
|
+
if (position === void 0) position = this.position;
|
|
2701
|
+
return this.tokens[position + 0] && this.tokens[position + 0][_tokenize.FIELDS.TYPE] === tokens.slash && this.tokens[position + 1] && this.tokens[position + 1][_tokenize.FIELDS.TYPE] === tokens.word && this.tokens[position + 2] && this.tokens[position + 2][_tokenize.FIELDS.TYPE] === tokens.slash;
|
|
2702
|
+
};
|
|
2703
|
+
_proto.namedCombinator = function namedCombinator() {
|
|
2704
|
+
if (this.isNamedCombinator()) {
|
|
2705
|
+
var nameRaw = this.content(this.tokens[this.position + 1]);
|
|
2706
|
+
var name = (0, _util.unesc)(nameRaw).toLowerCase();
|
|
2707
|
+
var raws = {};
|
|
2708
|
+
if (name !== nameRaw) raws.value = "/" + nameRaw + "/";
|
|
2709
|
+
var node = new _combinator["default"]({
|
|
2710
|
+
value: "/" + name + "/",
|
|
2711
|
+
source: getSource(this.currToken[_tokenize.FIELDS.START_LINE], this.currToken[_tokenize.FIELDS.START_COL], this.tokens[this.position + 2][_tokenize.FIELDS.END_LINE], this.tokens[this.position + 2][_tokenize.FIELDS.END_COL]),
|
|
2712
|
+
sourceIndex: this.currToken[_tokenize.FIELDS.START_POS],
|
|
2713
|
+
raws
|
|
2714
|
+
});
|
|
2715
|
+
this.position = this.position + 3;
|
|
2716
|
+
return node;
|
|
2717
|
+
} else this.unexpected();
|
|
2718
|
+
};
|
|
2719
|
+
_proto.combinator = function combinator() {
|
|
2720
|
+
var _this3 = this;
|
|
2721
|
+
if (this.content() === "|") return this.namespace();
|
|
2722
|
+
var nextSigTokenPos = this.locateNextMeaningfulToken(this.position);
|
|
2723
|
+
if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) {
|
|
2724
|
+
var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos);
|
|
2725
|
+
if (nodes.length > 0) {
|
|
2726
|
+
var last = this.current.last;
|
|
2727
|
+
if (last) {
|
|
2728
|
+
var _this$convertWhitespa = this.convertWhitespaceNodesToSpace(nodes), space = _this$convertWhitespa.space, rawSpace = _this$convertWhitespa.rawSpace;
|
|
2729
|
+
if (rawSpace !== void 0) last.rawSpaceAfter += rawSpace;
|
|
2730
|
+
last.spaces.after += space;
|
|
2731
|
+
} else nodes.forEach(function(n) {
|
|
2732
|
+
return _this3.newNode(n);
|
|
2733
|
+
});
|
|
2734
|
+
}
|
|
2735
|
+
return;
|
|
2736
|
+
}
|
|
2737
|
+
var firstToken = this.currToken;
|
|
2738
|
+
var spaceOrDescendantSelectorNodes = void 0;
|
|
2739
|
+
if (nextSigTokenPos > this.position) spaceOrDescendantSelectorNodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos);
|
|
2740
|
+
var node;
|
|
2741
|
+
if (this.isNamedCombinator()) node = this.namedCombinator();
|
|
2742
|
+
else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.combinator) {
|
|
2743
|
+
node = new _combinator["default"]({
|
|
2744
|
+
value: this.content(),
|
|
2745
|
+
source: getTokenSource(this.currToken),
|
|
2746
|
+
sourceIndex: this.currToken[_tokenize.FIELDS.START_POS]
|
|
2747
|
+
});
|
|
2748
|
+
this.position++;
|
|
2749
|
+
} else if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) {} else if (!spaceOrDescendantSelectorNodes) this.unexpected();
|
|
2750
|
+
if (node) {
|
|
2751
|
+
if (spaceOrDescendantSelectorNodes) {
|
|
2752
|
+
var _this$convertWhitespa2 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes), _space = _this$convertWhitespa2.space, _rawSpace = _this$convertWhitespa2.rawSpace;
|
|
2753
|
+
node.spaces.before = _space;
|
|
2754
|
+
node.rawSpaceBefore = _rawSpace;
|
|
2755
|
+
}
|
|
2756
|
+
} else {
|
|
2757
|
+
var _this$convertWhitespa3 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes, true), _space2 = _this$convertWhitespa3.space, _rawSpace2 = _this$convertWhitespa3.rawSpace;
|
|
2758
|
+
if (!_rawSpace2) _rawSpace2 = _space2;
|
|
2759
|
+
var spaces = {};
|
|
2760
|
+
var raws = { spaces: {} };
|
|
2761
|
+
if (_space2.endsWith(" ") && _rawSpace2.endsWith(" ")) {
|
|
2762
|
+
spaces.before = _space2.slice(0, _space2.length - 1);
|
|
2763
|
+
raws.spaces.before = _rawSpace2.slice(0, _rawSpace2.length - 1);
|
|
2764
|
+
} else if (_space2[0] === " " && _rawSpace2[0] === " ") {
|
|
2765
|
+
spaces.after = _space2.slice(1);
|
|
2766
|
+
raws.spaces.after = _rawSpace2.slice(1);
|
|
2767
|
+
} else raws.value = _rawSpace2;
|
|
2768
|
+
node = new _combinator["default"]({
|
|
2769
|
+
value: " ",
|
|
2770
|
+
source: getTokenSourceSpan(firstToken, this.tokens[this.position - 1]),
|
|
2771
|
+
sourceIndex: firstToken[_tokenize.FIELDS.START_POS],
|
|
2772
|
+
spaces,
|
|
2773
|
+
raws
|
|
2774
|
+
});
|
|
2775
|
+
}
|
|
2776
|
+
if (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.space) {
|
|
2777
|
+
node.spaces.after = this.optionalSpace(this.content());
|
|
2778
|
+
this.position++;
|
|
2779
|
+
}
|
|
2780
|
+
return this.newNode(node);
|
|
2781
|
+
};
|
|
2782
|
+
_proto.comma = function comma() {
|
|
2783
|
+
if (this.position === this.tokens.length - 1) {
|
|
2784
|
+
this.root.trailingComma = true;
|
|
2785
|
+
this.position++;
|
|
2786
|
+
return;
|
|
2787
|
+
}
|
|
2788
|
+
this.current._inferEndPosition();
|
|
2789
|
+
var selector = new _selector["default"]({
|
|
2790
|
+
source: { start: tokenStart(this.tokens[this.position + 1]) },
|
|
2791
|
+
sourceIndex: this.tokens[this.position + 1][_tokenize.FIELDS.START_POS]
|
|
2792
|
+
});
|
|
2793
|
+
this.current.parent.append(selector);
|
|
2794
|
+
this.current = selector;
|
|
2795
|
+
this.position++;
|
|
2796
|
+
};
|
|
2797
|
+
_proto.comment = function comment() {
|
|
2798
|
+
var current = this.currToken;
|
|
2799
|
+
this.newNode(new _comment["default"]({
|
|
2800
|
+
value: this.content(),
|
|
2801
|
+
source: getTokenSource(current),
|
|
2802
|
+
sourceIndex: current[_tokenize.FIELDS.START_POS]
|
|
2803
|
+
}));
|
|
2804
|
+
this.position++;
|
|
2805
|
+
};
|
|
2806
|
+
_proto.error = function error(message, opts) {
|
|
2807
|
+
throw this.root.error(message, opts);
|
|
2808
|
+
};
|
|
2809
|
+
_proto.missingBackslash = function missingBackslash() {
|
|
2810
|
+
return this.error("Expected a backslash preceding the semicolon.", { index: this.currToken[_tokenize.FIELDS.START_POS] });
|
|
2811
|
+
};
|
|
2812
|
+
_proto.missingParenthesis = function missingParenthesis() {
|
|
2813
|
+
return this.expected("opening parenthesis", this.currToken[_tokenize.FIELDS.START_POS]);
|
|
2814
|
+
};
|
|
2815
|
+
_proto.missingSquareBracket = function missingSquareBracket() {
|
|
2816
|
+
return this.expected("opening square bracket", this.currToken[_tokenize.FIELDS.START_POS]);
|
|
2817
|
+
};
|
|
2818
|
+
_proto.unexpected = function unexpected() {
|
|
2819
|
+
return this.error("Unexpected '" + this.content() + "'. Escaping special characters with \\ may help.", this.currToken[_tokenize.FIELDS.START_POS]);
|
|
2820
|
+
};
|
|
2821
|
+
_proto.unexpectedPipe = function unexpectedPipe() {
|
|
2822
|
+
return this.error("Unexpected '|'.", this.currToken[_tokenize.FIELDS.START_POS]);
|
|
2823
|
+
};
|
|
2824
|
+
_proto.namespace = function namespace() {
|
|
2825
|
+
var before = this.prevToken && this.content(this.prevToken) || true;
|
|
2826
|
+
if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.word) {
|
|
2827
|
+
this.position++;
|
|
2828
|
+
return this.word(before);
|
|
2829
|
+
} else if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.asterisk) {
|
|
2830
|
+
this.position++;
|
|
2831
|
+
return this.universal(before);
|
|
2832
|
+
}
|
|
2833
|
+
this.unexpectedPipe();
|
|
2834
|
+
};
|
|
2835
|
+
_proto.nesting = function nesting() {
|
|
2836
|
+
if (this.nextToken) {
|
|
2837
|
+
if (this.content(this.nextToken) === "|") {
|
|
2838
|
+
this.position++;
|
|
2839
|
+
return;
|
|
2840
|
+
}
|
|
2841
|
+
}
|
|
2842
|
+
var current = this.currToken;
|
|
2843
|
+
this.newNode(new _nesting["default"]({
|
|
2844
|
+
value: this.content(),
|
|
2845
|
+
source: getTokenSource(current),
|
|
2846
|
+
sourceIndex: current[_tokenize.FIELDS.START_POS]
|
|
2847
|
+
}));
|
|
2848
|
+
this.position++;
|
|
2849
|
+
};
|
|
2850
|
+
_proto.parentheses = function parentheses() {
|
|
2851
|
+
var last = this.current.last;
|
|
2852
|
+
var unbalanced = 1;
|
|
2853
|
+
this.position++;
|
|
2854
|
+
if (last && last.type === types.PSEUDO) {
|
|
2855
|
+
var selector = new _selector["default"]({
|
|
2856
|
+
source: { start: tokenStart(this.tokens[this.position]) },
|
|
2857
|
+
sourceIndex: this.tokens[this.position][_tokenize.FIELDS.START_POS]
|
|
2858
|
+
});
|
|
2859
|
+
var cache = this.current;
|
|
2860
|
+
last.append(selector);
|
|
2861
|
+
this.current = selector;
|
|
2862
|
+
while (this.position < this.tokens.length && unbalanced) {
|
|
2863
|
+
if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) unbalanced++;
|
|
2864
|
+
if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) unbalanced--;
|
|
2865
|
+
if (unbalanced) this.parse();
|
|
2866
|
+
else {
|
|
2867
|
+
this.current.source.end = tokenEnd(this.currToken);
|
|
2868
|
+
this.current.parent.source.end = tokenEnd(this.currToken);
|
|
2869
|
+
this.position++;
|
|
2870
|
+
}
|
|
2871
|
+
}
|
|
2872
|
+
this.current = cache;
|
|
2873
|
+
} else {
|
|
2874
|
+
var parenStart = this.currToken;
|
|
2875
|
+
var parenValue = "(";
|
|
2876
|
+
var parenEnd;
|
|
2877
|
+
while (this.position < this.tokens.length && unbalanced) {
|
|
2878
|
+
if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) unbalanced++;
|
|
2879
|
+
if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) unbalanced--;
|
|
2880
|
+
parenEnd = this.currToken;
|
|
2881
|
+
parenValue += this.parseParenthesisToken(this.currToken);
|
|
2882
|
+
this.position++;
|
|
2883
|
+
}
|
|
2884
|
+
if (last) last.appendToPropertyAndEscape("value", parenValue, parenValue);
|
|
2885
|
+
else this.newNode(new _string["default"]({
|
|
2886
|
+
value: parenValue,
|
|
2887
|
+
source: getSource(parenStart[_tokenize.FIELDS.START_LINE], parenStart[_tokenize.FIELDS.START_COL], parenEnd[_tokenize.FIELDS.END_LINE], parenEnd[_tokenize.FIELDS.END_COL]),
|
|
2888
|
+
sourceIndex: parenStart[_tokenize.FIELDS.START_POS]
|
|
2889
|
+
}));
|
|
2890
|
+
}
|
|
2891
|
+
if (unbalanced) return this.expected("closing parenthesis", this.currToken[_tokenize.FIELDS.START_POS]);
|
|
2892
|
+
};
|
|
2893
|
+
_proto.pseudo = function pseudo() {
|
|
2894
|
+
var _this4 = this;
|
|
2895
|
+
var pseudoStr = "";
|
|
2896
|
+
var startingToken = this.currToken;
|
|
2897
|
+
while (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.colon) {
|
|
2898
|
+
pseudoStr += this.content();
|
|
2899
|
+
this.position++;
|
|
2900
|
+
}
|
|
2901
|
+
if (!this.currToken) return this.expected(["pseudo-class", "pseudo-element"], this.position - 1);
|
|
2902
|
+
if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.word) this.splitWord(false, function(first, length) {
|
|
2903
|
+
pseudoStr += first;
|
|
2904
|
+
_this4.newNode(new _pseudo["default"]({
|
|
2905
|
+
value: pseudoStr,
|
|
2906
|
+
source: getTokenSourceSpan(startingToken, _this4.currToken),
|
|
2907
|
+
sourceIndex: startingToken[_tokenize.FIELDS.START_POS]
|
|
2908
|
+
}));
|
|
2909
|
+
if (length > 1 && _this4.nextToken && _this4.nextToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) _this4.error("Misplaced parenthesis.", { index: _this4.nextToken[_tokenize.FIELDS.START_POS] });
|
|
2910
|
+
});
|
|
2911
|
+
else return this.expected(["pseudo-class", "pseudo-element"], this.currToken[_tokenize.FIELDS.START_POS]);
|
|
2912
|
+
};
|
|
2913
|
+
_proto.space = function space() {
|
|
2914
|
+
var content = this.content();
|
|
2915
|
+
if (this.position === 0 || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis || this.current.nodes.every(function(node) {
|
|
2916
|
+
return node.type === "comment";
|
|
2917
|
+
})) {
|
|
2918
|
+
this.spaces = this.optionalSpace(content);
|
|
2919
|
+
this.position++;
|
|
2920
|
+
} else if (this.position === this.tokens.length - 1 || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) {
|
|
2921
|
+
this.current.last.spaces.after = this.optionalSpace(content);
|
|
2922
|
+
this.position++;
|
|
2923
|
+
} else this.combinator();
|
|
2924
|
+
};
|
|
2925
|
+
_proto.string = function string() {
|
|
2926
|
+
var current = this.currToken;
|
|
2927
|
+
this.newNode(new _string["default"]({
|
|
2928
|
+
value: this.content(),
|
|
2929
|
+
source: getTokenSource(current),
|
|
2930
|
+
sourceIndex: current[_tokenize.FIELDS.START_POS]
|
|
2931
|
+
}));
|
|
2932
|
+
this.position++;
|
|
2933
|
+
};
|
|
2934
|
+
_proto.universal = function universal(namespace) {
|
|
2935
|
+
var nextToken = this.nextToken;
|
|
2936
|
+
if (nextToken && this.content(nextToken) === "|") {
|
|
2937
|
+
this.position++;
|
|
2938
|
+
return this.namespace();
|
|
2939
|
+
}
|
|
2940
|
+
var current = this.currToken;
|
|
2941
|
+
this.newNode(new _universal["default"]({
|
|
2942
|
+
value: this.content(),
|
|
2943
|
+
source: getTokenSource(current),
|
|
2944
|
+
sourceIndex: current[_tokenize.FIELDS.START_POS]
|
|
2945
|
+
}), namespace);
|
|
2946
|
+
this.position++;
|
|
2947
|
+
};
|
|
2948
|
+
_proto.splitWord = function splitWord(namespace, firstCallback) {
|
|
2949
|
+
var _this5 = this;
|
|
2950
|
+
var nextToken = this.nextToken;
|
|
2951
|
+
var word = this.content();
|
|
2952
|
+
while (nextToken && ~[
|
|
2953
|
+
tokens.dollar,
|
|
2954
|
+
tokens.caret,
|
|
2955
|
+
tokens.equals,
|
|
2956
|
+
tokens.word
|
|
2957
|
+
].indexOf(nextToken[_tokenize.FIELDS.TYPE])) {
|
|
2958
|
+
this.position++;
|
|
2959
|
+
var current = this.content();
|
|
2960
|
+
word += current;
|
|
2961
|
+
if (current.lastIndexOf("\\") === current.length - 1) {
|
|
2962
|
+
var next = this.nextToken;
|
|
2963
|
+
if (next && next[_tokenize.FIELDS.TYPE] === tokens.space) {
|
|
2964
|
+
word += this.requiredSpace(this.content(next));
|
|
2965
|
+
this.position++;
|
|
2966
|
+
}
|
|
2967
|
+
}
|
|
2968
|
+
nextToken = this.nextToken;
|
|
2969
|
+
}
|
|
2970
|
+
var hasClass = indexesOf(word, ".").filter(function(i) {
|
|
2971
|
+
var escapedDot = word[i - 1] === "\\";
|
|
2972
|
+
var isKeyframesPercent = /^\d+\.\d+%$/.test(word);
|
|
2973
|
+
return !escapedDot && !isKeyframesPercent;
|
|
2974
|
+
});
|
|
2975
|
+
var hasId = indexesOf(word, "#").filter(function(i) {
|
|
2976
|
+
return word[i - 1] !== "\\";
|
|
2977
|
+
});
|
|
2978
|
+
var interpolations = indexesOf(word, "#{");
|
|
2979
|
+
if (interpolations.length) hasId = hasId.filter(function(hashIndex) {
|
|
2980
|
+
return !~interpolations.indexOf(hashIndex);
|
|
2981
|
+
});
|
|
2982
|
+
var indices = (0, _sortAscending["default"])(uniqs([0].concat(hasClass, hasId)));
|
|
2983
|
+
indices.forEach(function(ind, i) {
|
|
2984
|
+
var index = indices[i + 1] || word.length;
|
|
2985
|
+
var value = word.slice(ind, index);
|
|
2986
|
+
if (i === 0 && firstCallback) return firstCallback.call(_this5, value, indices.length);
|
|
2987
|
+
var node;
|
|
2988
|
+
var current = _this5.currToken;
|
|
2989
|
+
var sourceIndex = current[_tokenize.FIELDS.START_POS] + indices[i];
|
|
2990
|
+
var source = getSource(current[1], current[2] + ind, current[3], current[2] + (index - 1));
|
|
2991
|
+
if (~hasClass.indexOf(ind)) {
|
|
2992
|
+
var classNameOpts = {
|
|
2993
|
+
value: value.slice(1),
|
|
2994
|
+
source,
|
|
2995
|
+
sourceIndex
|
|
2996
|
+
};
|
|
2997
|
+
node = new _className["default"](unescapeProp(classNameOpts, "value"));
|
|
2998
|
+
} else if (~hasId.indexOf(ind)) {
|
|
2999
|
+
var idOpts = {
|
|
3000
|
+
value: value.slice(1),
|
|
3001
|
+
source,
|
|
3002
|
+
sourceIndex
|
|
3003
|
+
};
|
|
3004
|
+
node = new _id["default"](unescapeProp(idOpts, "value"));
|
|
3005
|
+
} else {
|
|
3006
|
+
var tagOpts = {
|
|
3007
|
+
value,
|
|
3008
|
+
source,
|
|
3009
|
+
sourceIndex
|
|
3010
|
+
};
|
|
3011
|
+
unescapeProp(tagOpts, "value");
|
|
3012
|
+
node = new _tag["default"](tagOpts);
|
|
3013
|
+
}
|
|
3014
|
+
_this5.newNode(node, namespace);
|
|
3015
|
+
namespace = null;
|
|
3016
|
+
});
|
|
3017
|
+
this.position++;
|
|
3018
|
+
};
|
|
3019
|
+
_proto.word = function word(namespace) {
|
|
3020
|
+
var nextToken = this.nextToken;
|
|
3021
|
+
if (nextToken && this.content(nextToken) === "|") {
|
|
3022
|
+
this.position++;
|
|
3023
|
+
return this.namespace();
|
|
3024
|
+
}
|
|
3025
|
+
return this.splitWord(namespace);
|
|
3026
|
+
};
|
|
3027
|
+
_proto.loop = function loop() {
|
|
3028
|
+
while (this.position < this.tokens.length) this.parse(true);
|
|
3029
|
+
this.current._inferEndPosition();
|
|
3030
|
+
return this.root;
|
|
3031
|
+
};
|
|
3032
|
+
_proto.parse = function parse(throwOnParenthesis) {
|
|
3033
|
+
switch (this.currToken[_tokenize.FIELDS.TYPE]) {
|
|
3034
|
+
case tokens.space:
|
|
3035
|
+
this.space();
|
|
3036
|
+
break;
|
|
3037
|
+
case tokens.comment:
|
|
3038
|
+
this.comment();
|
|
3039
|
+
break;
|
|
3040
|
+
case tokens.openParenthesis:
|
|
3041
|
+
this.parentheses();
|
|
3042
|
+
break;
|
|
3043
|
+
case tokens.closeParenthesis:
|
|
3044
|
+
if (throwOnParenthesis) this.missingParenthesis();
|
|
3045
|
+
break;
|
|
3046
|
+
case tokens.openSquare:
|
|
3047
|
+
this.attribute();
|
|
3048
|
+
break;
|
|
3049
|
+
case tokens.dollar:
|
|
3050
|
+
case tokens.caret:
|
|
3051
|
+
case tokens.equals:
|
|
3052
|
+
case tokens.word:
|
|
3053
|
+
this.word();
|
|
3054
|
+
break;
|
|
3055
|
+
case tokens.colon:
|
|
3056
|
+
this.pseudo();
|
|
3057
|
+
break;
|
|
3058
|
+
case tokens.comma:
|
|
3059
|
+
this.comma();
|
|
3060
|
+
break;
|
|
3061
|
+
case tokens.asterisk:
|
|
3062
|
+
this.universal();
|
|
3063
|
+
break;
|
|
3064
|
+
case tokens.ampersand:
|
|
3065
|
+
this.nesting();
|
|
3066
|
+
break;
|
|
3067
|
+
case tokens.slash:
|
|
3068
|
+
case tokens.combinator:
|
|
3069
|
+
this.combinator();
|
|
3070
|
+
break;
|
|
3071
|
+
case tokens.str:
|
|
3072
|
+
this.string();
|
|
3073
|
+
break;
|
|
3074
|
+
case tokens.closeSquare: this.missingSquareBracket();
|
|
3075
|
+
case tokens.semicolon: this.missingBackslash();
|
|
3076
|
+
default: this.unexpected();
|
|
3077
|
+
}
|
|
3078
|
+
};
|
|
3079
|
+
_proto.expected = function expected(description, index, found) {
|
|
3080
|
+
if (Array.isArray(description)) {
|
|
3081
|
+
var last = description.pop();
|
|
3082
|
+
description = description.join(", ") + " or " + last;
|
|
3083
|
+
}
|
|
3084
|
+
var an = /^[aeiou]/.test(description[0]) ? "an" : "a";
|
|
3085
|
+
if (!found) return this.error("Expected " + an + " " + description + ".", { index });
|
|
3086
|
+
return this.error("Expected " + an + " " + description + ", found \"" + found + "\" instead.", { index });
|
|
3087
|
+
};
|
|
3088
|
+
_proto.requiredSpace = function requiredSpace(space) {
|
|
3089
|
+
return this.options.lossy ? " " : space;
|
|
3090
|
+
};
|
|
3091
|
+
_proto.optionalSpace = function optionalSpace(space) {
|
|
3092
|
+
return this.options.lossy ? "" : space;
|
|
3093
|
+
};
|
|
3094
|
+
_proto.lossySpace = function lossySpace(space, required) {
|
|
3095
|
+
if (this.options.lossy) return required ? " " : "";
|
|
3096
|
+
else return space;
|
|
3097
|
+
};
|
|
3098
|
+
_proto.parseParenthesisToken = function parseParenthesisToken(token) {
|
|
3099
|
+
var content = this.content(token);
|
|
3100
|
+
if (token[_tokenize.FIELDS.TYPE] === tokens.space) return this.requiredSpace(content);
|
|
3101
|
+
else return content;
|
|
3102
|
+
};
|
|
3103
|
+
_proto.newNode = function newNode(node, namespace) {
|
|
3104
|
+
if (namespace) {
|
|
3105
|
+
if (/^ +$/.test(namespace)) {
|
|
3106
|
+
if (!this.options.lossy) this.spaces = (this.spaces || "") + namespace;
|
|
3107
|
+
namespace = true;
|
|
3108
|
+
}
|
|
3109
|
+
node.namespace = namespace;
|
|
3110
|
+
unescapeProp(node, "namespace");
|
|
3111
|
+
}
|
|
3112
|
+
if (this.spaces) {
|
|
3113
|
+
node.spaces.before = this.spaces;
|
|
3114
|
+
this.spaces = "";
|
|
3115
|
+
}
|
|
3116
|
+
return this.current.append(node);
|
|
3117
|
+
};
|
|
3118
|
+
_proto.content = function content(token) {
|
|
3119
|
+
if (token === void 0) token = this.currToken;
|
|
3120
|
+
return this.css.slice(token[_tokenize.FIELDS.START_POS], token[_tokenize.FIELDS.END_POS]);
|
|
3121
|
+
};
|
|
3122
|
+
/**
|
|
3123
|
+
* returns the index of the next non-whitespace, non-comment token.
|
|
3124
|
+
* returns -1 if no meaningful token is found.
|
|
3125
|
+
*/
|
|
3126
|
+
_proto.locateNextMeaningfulToken = function locateNextMeaningfulToken(startPosition) {
|
|
3127
|
+
if (startPosition === void 0) startPosition = this.position + 1;
|
|
3128
|
+
var searchPosition = startPosition;
|
|
3129
|
+
while (searchPosition < this.tokens.length) if (WHITESPACE_EQUIV_TOKENS[this.tokens[searchPosition][_tokenize.FIELDS.TYPE]]) {
|
|
3130
|
+
searchPosition++;
|
|
3131
|
+
continue;
|
|
3132
|
+
} else return searchPosition;
|
|
3133
|
+
return -1;
|
|
3134
|
+
};
|
|
3135
|
+
_createClass(Parser, [
|
|
3136
|
+
{
|
|
3137
|
+
key: "currToken",
|
|
3138
|
+
get: function get() {
|
|
3139
|
+
return this.tokens[this.position];
|
|
3140
|
+
}
|
|
3141
|
+
},
|
|
3142
|
+
{
|
|
3143
|
+
key: "nextToken",
|
|
3144
|
+
get: function get() {
|
|
3145
|
+
return this.tokens[this.position + 1];
|
|
3146
|
+
}
|
|
3147
|
+
},
|
|
3148
|
+
{
|
|
3149
|
+
key: "prevToken",
|
|
3150
|
+
get: function get() {
|
|
3151
|
+
return this.tokens[this.position - 1];
|
|
3152
|
+
}
|
|
3153
|
+
}
|
|
3154
|
+
]);
|
|
3155
|
+
return Parser;
|
|
3156
|
+
}();
|
|
3157
|
+
module.exports = exports.default;
|
|
3158
|
+
}));
|
|
3159
|
+
//#endregion
|
|
3160
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/processor.js
|
|
3161
|
+
var require_processor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3162
|
+
exports.__esModule = true;
|
|
3163
|
+
exports["default"] = void 0;
|
|
3164
|
+
var _parser = _interopRequireDefault(require_parser());
|
|
3165
|
+
function _interopRequireDefault(obj) {
|
|
3166
|
+
return obj && obj.__esModule ? obj : { "default": obj };
|
|
3167
|
+
}
|
|
3168
|
+
exports["default"] = /* @__PURE__ */ function() {
|
|
3169
|
+
function Processor(func, options) {
|
|
3170
|
+
this.func = func || function noop() {};
|
|
3171
|
+
this.funcRes = null;
|
|
3172
|
+
this.options = options;
|
|
3173
|
+
}
|
|
3174
|
+
var _proto = Processor.prototype;
|
|
3175
|
+
_proto._shouldUpdateSelector = function _shouldUpdateSelector(rule, options) {
|
|
3176
|
+
if (options === void 0) options = {};
|
|
3177
|
+
if (Object.assign({}, this.options, options).updateSelector === false) return false;
|
|
3178
|
+
else return typeof rule !== "string";
|
|
3179
|
+
};
|
|
3180
|
+
_proto._isLossy = function _isLossy(options) {
|
|
3181
|
+
if (options === void 0) options = {};
|
|
3182
|
+
if (Object.assign({}, this.options, options).lossless === false) return true;
|
|
3183
|
+
else return false;
|
|
3184
|
+
};
|
|
3185
|
+
_proto._root = function _root(rule, options) {
|
|
3186
|
+
if (options === void 0) options = {};
|
|
3187
|
+
return new _parser["default"](rule, this._parseOptions(options)).root;
|
|
3188
|
+
};
|
|
3189
|
+
_proto._parseOptions = function _parseOptions(options) {
|
|
3190
|
+
return { lossy: this._isLossy(options) };
|
|
3191
|
+
};
|
|
3192
|
+
_proto._run = function _run(rule, options) {
|
|
3193
|
+
var _this = this;
|
|
3194
|
+
if (options === void 0) options = {};
|
|
3195
|
+
return new Promise(function(resolve, reject) {
|
|
3196
|
+
try {
|
|
3197
|
+
var root = _this._root(rule, options);
|
|
3198
|
+
Promise.resolve(_this.func(root)).then(function(transform) {
|
|
3199
|
+
var string = void 0;
|
|
3200
|
+
if (_this._shouldUpdateSelector(rule, options)) {
|
|
3201
|
+
string = root.toString();
|
|
3202
|
+
rule.selector = string;
|
|
3203
|
+
}
|
|
3204
|
+
return {
|
|
3205
|
+
transform,
|
|
3206
|
+
root,
|
|
3207
|
+
string
|
|
3208
|
+
};
|
|
3209
|
+
}).then(resolve, reject);
|
|
3210
|
+
} catch (e) {
|
|
3211
|
+
reject(e);
|
|
3212
|
+
return;
|
|
3213
|
+
}
|
|
3214
|
+
});
|
|
3215
|
+
};
|
|
3216
|
+
_proto._runSync = function _runSync(rule, options) {
|
|
3217
|
+
if (options === void 0) options = {};
|
|
3218
|
+
var root = this._root(rule, options);
|
|
3219
|
+
var transform = this.func(root);
|
|
3220
|
+
if (transform && typeof transform.then === "function") throw new Error("Selector processor returned a promise to a synchronous call.");
|
|
3221
|
+
var string = void 0;
|
|
3222
|
+
if (options.updateSelector && typeof rule !== "string") {
|
|
3223
|
+
string = root.toString();
|
|
3224
|
+
rule.selector = string;
|
|
3225
|
+
}
|
|
3226
|
+
return {
|
|
3227
|
+
transform,
|
|
3228
|
+
root,
|
|
3229
|
+
string
|
|
3230
|
+
};
|
|
3231
|
+
};
|
|
3232
|
+
_proto.ast = function ast(rule, options) {
|
|
3233
|
+
return this._run(rule, options).then(function(result) {
|
|
3234
|
+
return result.root;
|
|
3235
|
+
});
|
|
3236
|
+
};
|
|
3237
|
+
_proto.astSync = function astSync(rule, options) {
|
|
3238
|
+
return this._runSync(rule, options).root;
|
|
3239
|
+
};
|
|
3240
|
+
_proto.transform = function transform(rule, options) {
|
|
3241
|
+
return this._run(rule, options).then(function(result) {
|
|
3242
|
+
return result.transform;
|
|
3243
|
+
});
|
|
3244
|
+
};
|
|
3245
|
+
_proto.transformSync = function transformSync(rule, options) {
|
|
3246
|
+
return this._runSync(rule, options).transform;
|
|
3247
|
+
};
|
|
3248
|
+
_proto.process = function process(rule, options) {
|
|
3249
|
+
return this._run(rule, options).then(function(result) {
|
|
3250
|
+
return result.string || result.root.toString();
|
|
3251
|
+
});
|
|
3252
|
+
};
|
|
3253
|
+
_proto.processSync = function processSync(rule, options) {
|
|
3254
|
+
var result = this._runSync(rule, options);
|
|
3255
|
+
return result.string || result.root.toString();
|
|
3256
|
+
};
|
|
3257
|
+
return Processor;
|
|
3258
|
+
}();
|
|
3259
|
+
module.exports = exports.default;
|
|
3260
|
+
}));
|
|
3261
|
+
//#endregion
|
|
3262
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/constructors.js
|
|
3263
|
+
var require_constructors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3264
|
+
exports.__esModule = true;
|
|
3265
|
+
exports.universal = exports.tag = exports.string = exports.selector = exports.root = exports.pseudo = exports.nesting = exports.id = exports.comment = exports.combinator = exports.className = exports.attribute = void 0;
|
|
3266
|
+
var _attribute = _interopRequireDefault(require_attribute());
|
|
3267
|
+
var _className = _interopRequireDefault(require_className());
|
|
3268
|
+
var _combinator = _interopRequireDefault(require_combinator());
|
|
3269
|
+
var _comment = _interopRequireDefault(require_comment());
|
|
3270
|
+
var _id = _interopRequireDefault(require_id());
|
|
3271
|
+
var _nesting = _interopRequireDefault(require_nesting());
|
|
3272
|
+
var _pseudo = _interopRequireDefault(require_pseudo());
|
|
3273
|
+
var _root = _interopRequireDefault(require_root());
|
|
3274
|
+
var _selector = _interopRequireDefault(require_selector());
|
|
3275
|
+
var _string = _interopRequireDefault(require_string());
|
|
3276
|
+
var _tag = _interopRequireDefault(require_tag());
|
|
3277
|
+
var _universal = _interopRequireDefault(require_universal());
|
|
3278
|
+
function _interopRequireDefault(obj) {
|
|
3279
|
+
return obj && obj.__esModule ? obj : { "default": obj };
|
|
3280
|
+
}
|
|
3281
|
+
exports.attribute = function attribute(opts) {
|
|
3282
|
+
return new _attribute["default"](opts);
|
|
3283
|
+
};
|
|
3284
|
+
exports.className = function className(opts) {
|
|
3285
|
+
return new _className["default"](opts);
|
|
3286
|
+
};
|
|
3287
|
+
exports.combinator = function combinator(opts) {
|
|
3288
|
+
return new _combinator["default"](opts);
|
|
3289
|
+
};
|
|
3290
|
+
exports.comment = function comment(opts) {
|
|
3291
|
+
return new _comment["default"](opts);
|
|
3292
|
+
};
|
|
3293
|
+
exports.id = function id(opts) {
|
|
3294
|
+
return new _id["default"](opts);
|
|
3295
|
+
};
|
|
3296
|
+
exports.nesting = function nesting(opts) {
|
|
3297
|
+
return new _nesting["default"](opts);
|
|
3298
|
+
};
|
|
3299
|
+
exports.pseudo = function pseudo(opts) {
|
|
3300
|
+
return new _pseudo["default"](opts);
|
|
3301
|
+
};
|
|
3302
|
+
exports.root = function root(opts) {
|
|
3303
|
+
return new _root["default"](opts);
|
|
3304
|
+
};
|
|
3305
|
+
exports.selector = function selector(opts) {
|
|
3306
|
+
return new _selector["default"](opts);
|
|
3307
|
+
};
|
|
3308
|
+
exports.string = function string(opts) {
|
|
3309
|
+
return new _string["default"](opts);
|
|
3310
|
+
};
|
|
3311
|
+
exports.tag = function tag(opts) {
|
|
3312
|
+
return new _tag["default"](opts);
|
|
3313
|
+
};
|
|
3314
|
+
exports.universal = function universal(opts) {
|
|
3315
|
+
return new _universal["default"](opts);
|
|
3316
|
+
};
|
|
3317
|
+
}));
|
|
3318
|
+
//#endregion
|
|
3319
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/guards.js
|
|
3320
|
+
var require_guards = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3321
|
+
exports.__esModule = true;
|
|
3322
|
+
exports.isComment = exports.isCombinator = exports.isClassName = exports.isAttribute = void 0;
|
|
3323
|
+
exports.isContainer = isContainer;
|
|
3324
|
+
exports.isIdentifier = void 0;
|
|
3325
|
+
exports.isNamespace = isNamespace;
|
|
3326
|
+
exports.isNesting = void 0;
|
|
3327
|
+
exports.isNode = isNode;
|
|
3328
|
+
exports.isPseudo = void 0;
|
|
3329
|
+
exports.isPseudoClass = isPseudoClass;
|
|
3330
|
+
exports.isPseudoElement = isPseudoElement;
|
|
3331
|
+
exports.isUniversal = exports.isTag = exports.isString = exports.isSelector = exports.isRoot = void 0;
|
|
3332
|
+
var _types = require_types();
|
|
3333
|
+
var _IS_TYPE;
|
|
3334
|
+
var IS_TYPE = (_IS_TYPE = {}, _IS_TYPE[_types.ATTRIBUTE] = true, _IS_TYPE[_types.CLASS] = true, _IS_TYPE[_types.COMBINATOR] = true, _IS_TYPE[_types.COMMENT] = true, _IS_TYPE[_types.ID] = true, _IS_TYPE[_types.NESTING] = true, _IS_TYPE[_types.PSEUDO] = true, _IS_TYPE[_types.ROOT] = true, _IS_TYPE[_types.SELECTOR] = true, _IS_TYPE[_types.STRING] = true, _IS_TYPE[_types.TAG] = true, _IS_TYPE[_types.UNIVERSAL] = true, _IS_TYPE);
|
|
3335
|
+
function isNode(node) {
|
|
3336
|
+
return typeof node === "object" && IS_TYPE[node.type];
|
|
3337
|
+
}
|
|
3338
|
+
function isNodeType(type, node) {
|
|
3339
|
+
return isNode(node) && node.type === type;
|
|
3340
|
+
}
|
|
3341
|
+
var isAttribute = isNodeType.bind(null, _types.ATTRIBUTE);
|
|
3342
|
+
exports.isAttribute = isAttribute;
|
|
3343
|
+
exports.isClassName = isNodeType.bind(null, _types.CLASS);
|
|
3344
|
+
exports.isCombinator = isNodeType.bind(null, _types.COMBINATOR);
|
|
3345
|
+
exports.isComment = isNodeType.bind(null, _types.COMMENT);
|
|
3346
|
+
exports.isIdentifier = isNodeType.bind(null, _types.ID);
|
|
3347
|
+
exports.isNesting = isNodeType.bind(null, _types.NESTING);
|
|
3348
|
+
var isPseudo = isNodeType.bind(null, _types.PSEUDO);
|
|
3349
|
+
exports.isPseudo = isPseudo;
|
|
3350
|
+
exports.isRoot = isNodeType.bind(null, _types.ROOT);
|
|
3351
|
+
exports.isSelector = isNodeType.bind(null, _types.SELECTOR);
|
|
3352
|
+
exports.isString = isNodeType.bind(null, _types.STRING);
|
|
3353
|
+
var isTag = isNodeType.bind(null, _types.TAG);
|
|
3354
|
+
exports.isTag = isTag;
|
|
3355
|
+
exports.isUniversal = isNodeType.bind(null, _types.UNIVERSAL);
|
|
3356
|
+
function isPseudoElement(node) {
|
|
3357
|
+
return isPseudo(node) && node.value && (node.value.startsWith("::") || node.value.toLowerCase() === ":before" || node.value.toLowerCase() === ":after" || node.value.toLowerCase() === ":first-letter" || node.value.toLowerCase() === ":first-line");
|
|
3358
|
+
}
|
|
3359
|
+
function isPseudoClass(node) {
|
|
3360
|
+
return isPseudo(node) && !isPseudoElement(node);
|
|
3361
|
+
}
|
|
3362
|
+
function isContainer(node) {
|
|
3363
|
+
return !!(isNode(node) && node.walk);
|
|
3364
|
+
}
|
|
3365
|
+
function isNamespace(node) {
|
|
3366
|
+
return isAttribute(node) || isTag(node);
|
|
3367
|
+
}
|
|
3368
|
+
}));
|
|
3369
|
+
//#endregion
|
|
3370
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/index.js
|
|
3371
|
+
var require_selectors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3372
|
+
exports.__esModule = true;
|
|
3373
|
+
var _types = require_types();
|
|
3374
|
+
Object.keys(_types).forEach(function(key) {
|
|
3375
|
+
if (key === "default" || key === "__esModule") return;
|
|
3376
|
+
if (key in exports && exports[key] === _types[key]) return;
|
|
3377
|
+
exports[key] = _types[key];
|
|
3378
|
+
});
|
|
3379
|
+
var _constructors = require_constructors();
|
|
3380
|
+
Object.keys(_constructors).forEach(function(key) {
|
|
3381
|
+
if (key === "default" || key === "__esModule") return;
|
|
3382
|
+
if (key in exports && exports[key] === _constructors[key]) return;
|
|
3383
|
+
exports[key] = _constructors[key];
|
|
3384
|
+
});
|
|
3385
|
+
var _guards = require_guards();
|
|
3386
|
+
Object.keys(_guards).forEach(function(key) {
|
|
3387
|
+
if (key === "default" || key === "__esModule") return;
|
|
3388
|
+
if (key in exports && exports[key] === _guards[key]) return;
|
|
3389
|
+
exports[key] = _guards[key];
|
|
3390
|
+
});
|
|
3391
|
+
}));
|
|
3392
|
+
//#endregion
|
|
3393
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/index.js
|
|
3394
|
+
var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3395
|
+
exports.__esModule = true;
|
|
3396
|
+
exports["default"] = void 0;
|
|
3397
|
+
var _processor = _interopRequireDefault(require_processor());
|
|
3398
|
+
var selectors = _interopRequireWildcard(require_selectors());
|
|
3399
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
3400
|
+
if (typeof WeakMap !== "function") return null;
|
|
3401
|
+
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
3402
|
+
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
3403
|
+
return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
|
|
3404
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
3405
|
+
})(nodeInterop);
|
|
3406
|
+
}
|
|
3407
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
3408
|
+
if (!nodeInterop && obj && obj.__esModule) return obj;
|
|
3409
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { "default": obj };
|
|
3410
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
3411
|
+
if (cache && cache.has(obj)) return cache.get(obj);
|
|
3412
|
+
var newObj = {};
|
|
3413
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
3414
|
+
for (var key in obj) if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
3415
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
3416
|
+
if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
|
|
3417
|
+
else newObj[key] = obj[key];
|
|
3418
|
+
}
|
|
3419
|
+
newObj["default"] = obj;
|
|
3420
|
+
if (cache) cache.set(obj, newObj);
|
|
3421
|
+
return newObj;
|
|
3422
|
+
}
|
|
3423
|
+
function _interopRequireDefault(obj) {
|
|
3424
|
+
return obj && obj.__esModule ? obj : { "default": obj };
|
|
3425
|
+
}
|
|
3426
|
+
var parser = function parser(processor) {
|
|
3427
|
+
return new _processor["default"](processor);
|
|
3428
|
+
};
|
|
3429
|
+
Object.assign(parser, selectors);
|
|
3430
|
+
delete parser.__esModule;
|
|
3431
|
+
exports["default"] = parser;
|
|
3432
|
+
module.exports = exports.default;
|
|
3433
|
+
}));
|
|
3434
|
+
//#endregion
|
|
3435
|
+
//#region src/typography/index.ts
|
|
3436
|
+
var import_deepmerge = require_deepmerge();
|
|
3437
|
+
var import_dist = /* @__PURE__ */ __toESM(require_dist(), 1);
|
|
3438
|
+
function inWhere(selector, { className, prefix, modifier }) {
|
|
3439
|
+
const prefixedNot = prefix(`.not-${className}`).slice(1);
|
|
3440
|
+
const selectorPrefix = selector.startsWith(">") ? `${modifier === "DEFAULT" ? `.${className}` : `.${className}-${modifier}`} ` : "";
|
|
3441
|
+
const [trailingPseudo, rebuiltSelector] = commonTrailingPseudos(selector);
|
|
3442
|
+
if (trailingPseudo) return `:where(${selectorPrefix}${rebuiltSelector}):not(:where([class~="${prefixedNot}"],[class~="${prefixedNot}"] *))${trailingPseudo}`;
|
|
3443
|
+
return `:where(${selectorPrefix}${selector}):not(:where([class~="${prefixedNot}"],[class~="${prefixedNot}"] *))`;
|
|
3444
|
+
}
|
|
3445
|
+
function configToCss(config = {}, { className, modifier, prefix }) {
|
|
3446
|
+
function updateSelector(k, v) {
|
|
3447
|
+
if (Array.isArray(v)) return [k, v];
|
|
3448
|
+
if (typeof v === "object" && v !== null) {
|
|
3449
|
+
if (Object.values(v).some((prop) => typeof prop === "object")) return [
|
|
3450
|
+
inWhere(k, {
|
|
3451
|
+
className,
|
|
3452
|
+
modifier,
|
|
3453
|
+
prefix
|
|
3454
|
+
}),
|
|
3455
|
+
v,
|
|
3456
|
+
Object.fromEntries(Object.entries(v).map(([k, v]) => updateSelector(k, v)))
|
|
3457
|
+
];
|
|
3458
|
+
return [inWhere(k, {
|
|
3459
|
+
className,
|
|
3460
|
+
modifier,
|
|
3461
|
+
prefix
|
|
3462
|
+
}), v];
|
|
3463
|
+
}
|
|
3464
|
+
return [k, v];
|
|
3465
|
+
}
|
|
3466
|
+
const css = config.css ?? [];
|
|
3467
|
+
const mergedCss = Array.isArray(css) ? dm(...css) : css;
|
|
3468
|
+
return Object.fromEntries(Object.entries(mergedCss).map(([k, v]) => updateSelector(k, v)));
|
|
3469
|
+
}
|
|
3470
|
+
const dm = (0, import_deepmerge.deepmerge)({ all: true });
|
|
3471
|
+
const parseSelector = (0, import_dist.default)();
|
|
3472
|
+
function commonTrailingPseudos(selector) {
|
|
3473
|
+
const ast = parseSelector.astSync(selector);
|
|
3474
|
+
const matrix = [];
|
|
3475
|
+
for (const [i, sel] of ast.nodes.entries()) for (const [j, child] of [...sel.nodes].reverse().entries()) {
|
|
3476
|
+
if (child.type !== "pseudo" || !child.value.startsWith("::")) break;
|
|
3477
|
+
matrix[j] = matrix[j] || [];
|
|
3478
|
+
matrix[j][i] = child;
|
|
3479
|
+
}
|
|
3480
|
+
const trailingPseudos = import_dist.default.selector({ value: "" });
|
|
3481
|
+
for (const pseudos of matrix) {
|
|
3482
|
+
if (!pseudos) continue;
|
|
3483
|
+
if (new Set(pseudos.map((p) => p.value)).size > 1) break;
|
|
3484
|
+
pseudos.forEach((pseudo) => pseudo.remove());
|
|
3485
|
+
trailingPseudos.prepend(pseudos[0]);
|
|
3486
|
+
}
|
|
3487
|
+
if (trailingPseudos.nodes.length) return [trailingPseudos.toString(), ast.toString()];
|
|
3488
|
+
return [null, selector];
|
|
3489
|
+
}
|
|
3490
|
+
const SELECTORS = [
|
|
3491
|
+
[
|
|
3492
|
+
"headings",
|
|
3493
|
+
"h1",
|
|
3494
|
+
"h2",
|
|
3495
|
+
"h3",
|
|
3496
|
+
"h4",
|
|
3497
|
+
"h5",
|
|
3498
|
+
"h6",
|
|
3499
|
+
"th"
|
|
3500
|
+
],
|
|
3501
|
+
["h1"],
|
|
3502
|
+
["h2"],
|
|
3503
|
+
["h3"],
|
|
3504
|
+
["h4"],
|
|
3505
|
+
["h5"],
|
|
3506
|
+
["h6"],
|
|
3507
|
+
["p"],
|
|
3508
|
+
["a"],
|
|
3509
|
+
["blockquote"],
|
|
3510
|
+
["figure"],
|
|
3511
|
+
["figcaption"],
|
|
3512
|
+
["strong"],
|
|
3513
|
+
["em"],
|
|
3514
|
+
["kbd"],
|
|
3515
|
+
["code"],
|
|
3516
|
+
["pre"],
|
|
3517
|
+
["ol"],
|
|
3518
|
+
["ul"],
|
|
3519
|
+
["li"],
|
|
3520
|
+
["table"],
|
|
3521
|
+
["thead"],
|
|
3522
|
+
["tr"],
|
|
3523
|
+
["th"],
|
|
3524
|
+
["td"],
|
|
3525
|
+
["img"],
|
|
3526
|
+
["video"],
|
|
3527
|
+
["hr"],
|
|
3528
|
+
["lead", "[class~=\"lead\"]"]
|
|
3529
|
+
];
|
|
3530
|
+
const typography = plugin.withOptions(({ className = "prose", ...styleOptions } = {}) => {
|
|
3531
|
+
return ({ addVariant, addComponents, ...rest }) => {
|
|
3532
|
+
const prefix = rest.prefix;
|
|
3533
|
+
for (const [name, ...values] of SELECTORS) {
|
|
3534
|
+
const selector = (values.length === 0 ? [name] : values).join(", ");
|
|
3535
|
+
addVariant(`${className}-${name}`, `& :is(${inWhere(selector, {
|
|
3536
|
+
prefix,
|
|
3537
|
+
className
|
|
3538
|
+
})})`);
|
|
3539
|
+
}
|
|
3540
|
+
addComponents({ [`.${className}`]: configToCss({
|
|
3541
|
+
...DEFAULT,
|
|
3542
|
+
css: [...DEFAULT.css ?? [], styleOptions.disableRoundedTable ? normalTable : roundedTable]
|
|
3543
|
+
}, {
|
|
3544
|
+
className,
|
|
3545
|
+
modifier: "DEFAULT",
|
|
3546
|
+
prefix
|
|
3547
|
+
}) });
|
|
3548
|
+
};
|
|
3549
|
+
});
|
|
3550
|
+
//#endregion
|
|
3551
|
+
export { typography as default, typography };
|