ipx 4.0.0-alpha.2 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +505 -77
- package/dist/THIRD-PARTY-LICENSES.md.gz +0 -0
- package/dist/_chunks/libs/@fastify/accept-negotiator.mjs +23 -24
- package/dist/_chunks/libs/crossws.d.mts +1 -0
- package/dist/_chunks/libs/css-select.mjs +1078 -938
- package/dist/_chunks/libs/css-tree.mjs +175 -297
- package/dist/_chunks/libs/csso.mjs +65 -110
- package/dist/_chunks/libs/etag.mjs +1 -1
- package/dist/_chunks/libs/h3.d.mts +3 -0
- package/dist/_chunks/libs/h3.mjs +138 -95
- package/dist/_chunks/libs/image-meta.d.mts +2 -6
- package/dist/_chunks/libs/image-meta.mjs +465 -306
- package/dist/_chunks/libs/sax.mjs +82 -80
- package/dist/_chunks/libs/svgo.mjs +970 -1013
- package/dist/_chunks/libs/ufo.mjs +17 -24
- package/dist/_chunks/node-fs.mjs +1100 -200
- package/dist/_chunks/rolldown-runtime.mjs +2 -11
- package/dist/cli.d.mts +1 -1
- package/dist/cli.mjs +4 -3
- package/dist/index.d.mts +242 -21
- package/dist/index.mjs +2 -2
- package/package.json +32 -28
- package/dist/THIRD-PARTY-LICENSES.md +0 -539
|
@@ -39,7 +39,7 @@ var t = e(((e) => {
|
|
|
39
39
|
return !(e !== 92 || u(t) || t === 0);
|
|
40
40
|
}
|
|
41
41
|
function p(e, t, n) {
|
|
42
|
-
return e === 45 ? s(t) || t === 45 || f(t, n) : s(e) ? !0 : e === 92
|
|
42
|
+
return e === 45 ? s(t) || t === 45 || f(t, n) : s(e) ? !0 : e === 92 && f(e, t);
|
|
43
43
|
}
|
|
44
44
|
function m(e, n, r) {
|
|
45
45
|
return e === 43 || e === 45 ? t(n) ? 2 : n === 46 && t(r) ? 3 : 0 : e === 46 ? t(n) ? 2 : 0 : +!!t(e);
|
|
@@ -97,11 +97,8 @@ var t = e(((e) => {
|
|
|
97
97
|
for (; n < e.length; n++) {
|
|
98
98
|
let i = e.charCodeAt(n);
|
|
99
99
|
if (!t.isName(i)) {
|
|
100
|
-
if (t.isValidEscape(i, r(e, n + 1)))
|
|
101
|
-
|
|
102
|
-
continue;
|
|
103
|
-
}
|
|
104
|
-
break;
|
|
100
|
+
if (t.isValidEscape(i, r(e, n + 1))) n = u(e, n) - 1;
|
|
101
|
+
else break;
|
|
105
102
|
}
|
|
106
103
|
}
|
|
107
104
|
return n;
|
|
@@ -234,7 +231,7 @@ var t = e(((e) => {
|
|
|
234
231
|
return c.EOF;
|
|
235
232
|
}
|
|
236
233
|
lookupValue(e, t) {
|
|
237
|
-
return e += this.tokenIndex, e < this.tokenCount
|
|
234
|
+
return e += this.tokenIndex, e < this.tokenCount && o.cmpStr(this.source, this.offsetAndType[e - 1] & l, this.offsetAndType[e] & l, t);
|
|
238
235
|
}
|
|
239
236
|
getTokenStart(e) {
|
|
240
237
|
return e === this.tokenIndex ? this.tokenStart : e > 0 ? e < this.tokenCount ? this.offsetAndType[e - 1] & l : this.offsetAndType[this.tokenCount] & l : this.firstCharOffset;
|
|
@@ -259,9 +256,10 @@ var t = e(((e) => {
|
|
|
259
256
|
if (d[t] === 1) {
|
|
260
257
|
let n = this.balance[e], r = this.getTokenType(n);
|
|
261
258
|
return u[t] === r ? n : -1;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
|
|
259
|
+
}
|
|
260
|
+
if (d[t] === 2) {
|
|
261
|
+
let n = this.balance[e], r = this.getTokenType(n);
|
|
262
|
+
return u[r] === t ? n : -1;
|
|
265
263
|
}
|
|
266
264
|
return -1;
|
|
267
265
|
}
|
|
@@ -321,15 +319,7 @@ var t = e(((e) => {
|
|
|
321
319
|
return t < u ? e.charCodeAt(t) : 0;
|
|
322
320
|
}
|
|
323
321
|
function r() {
|
|
324
|
-
|
|
325
|
-
p = a.Dimension, f = l.consumeName(e, f);
|
|
326
|
-
return;
|
|
327
|
-
}
|
|
328
|
-
if (n(f) === 37) {
|
|
329
|
-
p = a.Percentage, f++;
|
|
330
|
-
return;
|
|
331
|
-
}
|
|
332
|
-
p = a.Number;
|
|
322
|
+
f = l.consumeNumber(e, f), c.isIdentifierStart(n(f), n(f + 1), n(f + 2)) ? (p = a.Dimension, f = l.consumeName(e, f)) : n(f) === 37 ? (p = a.Percentage, f++) : p = a.Number;
|
|
333
323
|
}
|
|
334
324
|
function i() {
|
|
335
325
|
let t = f;
|
|
@@ -339,13 +329,7 @@ var t = e(((e) => {
|
|
|
339
329
|
return;
|
|
340
330
|
}
|
|
341
331
|
s();
|
|
342
|
-
|
|
343
|
-
}
|
|
344
|
-
if (n(f) === 40) {
|
|
345
|
-
p = a.Function, f++;
|
|
346
|
-
return;
|
|
347
|
-
}
|
|
348
|
-
p = a.Ident;
|
|
332
|
+
} else n(f) === 40 ? (p = a.Function, f++) : p = a.Ident;
|
|
349
333
|
}
|
|
350
334
|
function o(t) {
|
|
351
335
|
for (t ||= n(f++), p = a.String; f < e.length; f++) {
|
|
@@ -364,7 +348,6 @@ var t = e(((e) => {
|
|
|
364
348
|
if (f === e.length - 1) break;
|
|
365
349
|
let i = n(f + 1);
|
|
366
350
|
c.isNewline(i) ? f += l.getNewlineLength(e, f + 1, i) : c.isValidEscape(r, i) && (f = l.consumeEscaped(e, f) - 1);
|
|
367
|
-
break;
|
|
368
351
|
}
|
|
369
352
|
}
|
|
370
353
|
}
|
|
@@ -618,11 +601,12 @@ var t = e(((e) => {
|
|
|
618
601
|
return this.insert(e.createItem(t));
|
|
619
602
|
}
|
|
620
603
|
insert(e, t = null) {
|
|
621
|
-
if (t !== null)
|
|
622
|
-
if (this.
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
604
|
+
if (t !== null) {
|
|
605
|
+
if (this.updateCursors(t.prev, e, t, e), t.prev === null) {
|
|
606
|
+
if (this.head !== t) throw Error(`before doesn't belong to list`);
|
|
607
|
+
this.head = e, t.prev = e, e.next = t, this.updateCursors(null, e);
|
|
608
|
+
} else t.prev.next = e, e.prev = t.prev, t.prev = e, e.next = t;
|
|
609
|
+
} else this.updateCursors(this.tail, e, null, e), this.tail === null ? this.head = e : (this.tail.next = e, e.prev = this.tail), this.tail = e;
|
|
626
610
|
return this;
|
|
627
611
|
}
|
|
628
612
|
insertData(t, n) {
|
|
@@ -660,7 +644,7 @@ var t = e(((e) => {
|
|
|
660
644
|
return this.insertList(e);
|
|
661
645
|
}
|
|
662
646
|
insertList(e, t) {
|
|
663
|
-
return e.head === null
|
|
647
|
+
return e.head === null || (t == null ? (this.updateCursors(this.tail, e.tail, null, e.head), this.tail === null ? this.head = e.head : (this.tail.next = e.head, e.head.prev = this.tail), this.tail = e.tail) : (this.updateCursors(t.prev, e.tail, t, e.head), t.prev === null ? this.head = e.head : (t.prev.next = e.head, e.head.prev = t.prev), t.prev = e.tail, e.tail.next = t), e.head = null, e.tail = null), this;
|
|
664
648
|
}
|
|
665
649
|
replace(e, t) {
|
|
666
650
|
`head` in t ? this.insertList(t, e) : this.insert(t, e), this.remove(e);
|
|
@@ -797,9 +781,7 @@ var t = e(((e) => {
|
|
|
797
781
|
case `function`:
|
|
798
782
|
t.context[n] = r;
|
|
799
783
|
break;
|
|
800
|
-
case `string`:
|
|
801
|
-
t.context[n] = S(r);
|
|
802
|
-
break;
|
|
784
|
+
case `string`: t.context[n] = S(r);
|
|
803
785
|
}
|
|
804
786
|
return {
|
|
805
787
|
config: t,
|
|
@@ -886,9 +868,7 @@ var t = e(((e) => {
|
|
|
886
868
|
case _.Hash:
|
|
887
869
|
this.isDelim(35) && (this.next(), r++, n = `Name is expected`);
|
|
888
870
|
break;
|
|
889
|
-
case _.Percentage:
|
|
890
|
-
this.tokenType === _.Number && (r = this.tokenEnd, n = `Percent sign is expected`);
|
|
891
|
-
break;
|
|
871
|
+
case _.Percentage: this.tokenType === _.Number && (r = this.tokenEnd, n = `Percent sign is expected`);
|
|
892
872
|
}
|
|
893
873
|
this.error(n, r);
|
|
894
874
|
}
|
|
@@ -932,7 +912,7 @@ var t = e(((e) => {
|
|
|
932
912
|
getRangeLocation: (e, t) => s.getLocationRange(e, t, n)
|
|
933
913
|
});
|
|
934
914
|
return Object.assign(function(e, a) {
|
|
935
|
-
t = e, a ||= {}, c.setSource(t, u.tokenize), s.setSource(t, a.offset, a.line, a.column), n = a.filename || `<unknown>`, r = !!a.positions, i = typeof a.onParseError == `function` ? a.onParseError : y, o = !1, c.parseAtrulePrelude = `parseAtrulePrelude` in a ? !!a.parseAtrulePrelude : !0, c.parseRulePrelude = `parseRulePrelude` in a ? !!a.parseRulePrelude : !0, c.parseValue = `parseValue` in a ? !!a.parseValue : !0, c.parseCustomProperty = `parseCustomProperty` in a
|
|
915
|
+
t = e, a ||= {}, c.setSource(t, u.tokenize), s.setSource(t, a.offset, a.line, a.column), n = a.filename || `<unknown>`, r = !!a.positions, i = typeof a.onParseError == `function` ? a.onParseError : y, o = !1, c.parseAtrulePrelude = `parseAtrulePrelude` in a ? !!a.parseAtrulePrelude : !0, c.parseRulePrelude = `parseRulePrelude` in a ? !!a.parseRulePrelude : !0, c.parseValue = `parseValue` in a ? !!a.parseValue : !0, c.parseCustomProperty = `parseCustomProperty` in a && !!a.parseCustomProperty;
|
|
936
916
|
let { context: d = `default`, list: f = !0, onComment: p, onToken: m } = a;
|
|
937
917
|
if (!(d in c.context)) throw Error("Unknown context `" + d + "`");
|
|
938
918
|
Object.assign(c, f ? x : b), Array.isArray(m) ? c.forEachToken((e, t, n) => {
|
|
@@ -943,8 +923,8 @@ var t = e(((e) => {
|
|
|
943
923
|
});
|
|
944
924
|
}) : typeof m == `function` && c.forEachToken(m.bind(l())), typeof p == `function` && c.forEachToken((e, n, r) => {
|
|
945
925
|
if (e === _.Comment) {
|
|
946
|
-
let e = c.getLocation(n, r);
|
|
947
|
-
p(
|
|
926
|
+
let e = c.getLocation(n, r), i = g.cmpStr(t, r - 2, r, `*/`) ? t.slice(n + 2, r - 2) : t.slice(n + 2, r);
|
|
927
|
+
p(i, e);
|
|
948
928
|
}
|
|
949
929
|
});
|
|
950
930
|
let h = c.context[d].call(c, a);
|
|
@@ -1033,10 +1013,13 @@ var t = e(((e) => {
|
|
|
1033
1013
|
if (!r.path) return t;
|
|
1034
1014
|
n = r.path;
|
|
1035
1015
|
}
|
|
1036
|
-
for (var o = e.isAbsolute(n), s = [], c = 0, l = 0;;)
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1016
|
+
for (var o = e.isAbsolute(n), s = [], c = 0, l = 0;;) {
|
|
1017
|
+
if (c = l, l = n.indexOf(`/`, c), l === -1) {
|
|
1018
|
+
s.push(n.slice(c));
|
|
1019
|
+
break;
|
|
1020
|
+
}
|
|
1021
|
+
for (s.push(n.slice(c, l)); l < n.length && n[l] === `/`;) l++;
|
|
1022
|
+
}
|
|
1040
1023
|
for (var u, d = 0, l = s.length - 1; l >= 0; l--) u = s[l], u === `.` ? s.splice(l, 1) : u === `..` ? d++ : d > 0 && (u === `` ? (s.splice(l + 1, d), d = 0) : (s.splice(l, 2), d--));
|
|
1041
1024
|
return n = s.join(`/`), n === `` && (n = o ? `/` : `.`), r ? (r.path = n, a(r)) : n;
|
|
1042
1025
|
});
|
|
@@ -1207,7 +1190,7 @@ var t = e(((e) => {
|
|
|
1207
1190
|
}), i;
|
|
1208
1191
|
}, a.prototype.addMapping = function(e) {
|
|
1209
1192
|
var t = n.getArg(e, `generated`), r = n.getArg(e, `original`, null), i = n.getArg(e, `source`, null), a = n.getArg(e, `name`, null);
|
|
1210
|
-
|
|
1193
|
+
(this._skipValidation || this._validateMapping(t, r, i, a) !== !1) && (i != null && (i = String(i), this._sources.has(i) || this._sources.add(i)), a != null && (a = String(a), this._names.has(a) || this._names.add(a)), this._mappings.add({
|
|
1211
1194
|
generatedLine: t.line,
|
|
1212
1195
|
generatedColumn: t.column,
|
|
1213
1196
|
originalLine: r != null && r.line,
|
|
@@ -1443,9 +1426,7 @@ var t = e(((e) => {
|
|
|
1443
1426
|
e.children.forEach((e) => {
|
|
1444
1427
|
n !== null && t.call(this, n), this.node(e), n = e;
|
|
1445
1428
|
});
|
|
1446
|
-
|
|
1447
|
-
}
|
|
1448
|
-
e.children.forEach(this.node, this);
|
|
1429
|
+
} else e.children.forEach(this.node, this);
|
|
1449
1430
|
}
|
|
1450
1431
|
function s(e) {
|
|
1451
1432
|
let t = /* @__PURE__ */ new Map();
|
|
@@ -1580,7 +1561,7 @@ var t = e(((e) => {
|
|
|
1580
1561
|
let p = c(l), m = c(u), h = function(e, t) {
|
|
1581
1562
|
function o(e, t, n) {
|
|
1582
1563
|
let r = s.call(_, e, t, n);
|
|
1583
|
-
return r === d
|
|
1564
|
+
return r === d || r !== f && !!(h.hasOwnProperty(e.type) && h[e.type](e, _, o, g) || c.call(_, e, t, n) === d);
|
|
1584
1565
|
}
|
|
1585
1566
|
let s = n, c = n, h = l, g = (e, t, n, r) => e || o(t, n, r), _ = {
|
|
1586
1567
|
break: d,
|
|
@@ -1811,9 +1792,11 @@ var t = e(((e) => {
|
|
|
1811
1792
|
function d(e, t, n) {
|
|
1812
1793
|
let r = !1, i = l(e, t, n);
|
|
1813
1794
|
if (e = n(i), e === null) return t;
|
|
1814
|
-
if (e.type !== o.Number)
|
|
1815
|
-
if (
|
|
1816
|
-
|
|
1795
|
+
if (e.type !== o.Number) {
|
|
1796
|
+
if (c(e, 43) || c(e, 45)) {
|
|
1797
|
+
if (r = !0, i = l(n(++i), i, n), e = n(i), e === null || e.type !== o.Number) return 0;
|
|
1798
|
+
} else return t;
|
|
1799
|
+
}
|
|
1817
1800
|
if (!r) {
|
|
1818
1801
|
let t = e.value.charCodeAt(0);
|
|
1819
1802
|
if (t !== 43 && t !== 45) return 0;
|
|
@@ -1948,7 +1931,7 @@ var t = e(((e) => {
|
|
|
1948
1931
|
return !1;
|
|
1949
1932
|
}
|
|
1950
1933
|
function T(e, t) {
|
|
1951
|
-
return t === e.length - 2
|
|
1934
|
+
return t === e.length - 2 && S(e, t) === 92 && s.isDigit(S(e, t + 1));
|
|
1952
1935
|
}
|
|
1953
1936
|
function E(e, t, n) {
|
|
1954
1937
|
if (e && e.type === `Range`) {
|
|
@@ -1973,9 +1956,7 @@ var t = e(((e) => {
|
|
|
1973
1956
|
case c.Function:
|
|
1974
1957
|
case c.LeftParenthesis:
|
|
1975
1958
|
case c.LeftSquareBracket:
|
|
1976
|
-
case c.LeftCurlyBracket:
|
|
1977
|
-
r.push(n), n = x.get(e.type);
|
|
1978
|
-
break;
|
|
1959
|
+
case c.LeftCurlyBracket: r.push(n), n = x.get(e.type);
|
|
1979
1960
|
}
|
|
1980
1961
|
i++;
|
|
1981
1962
|
} while (e = t(i));
|
|
@@ -2034,9 +2015,7 @@ var t = e(((e) => {
|
|
|
2034
2015
|
case c.Function:
|
|
2035
2016
|
case c.LeftParenthesis:
|
|
2036
2017
|
case c.LeftSquareBracket:
|
|
2037
|
-
case c.LeftCurlyBracket:
|
|
2038
|
-
r.push(n), n = x.get(e.type);
|
|
2039
|
-
break;
|
|
2018
|
+
case c.LeftCurlyBracket: r.push(n), n = x.get(e.type);
|
|
2040
2019
|
}
|
|
2041
2020
|
i++;
|
|
2042
2021
|
} while (e = t(i));
|
|
@@ -2058,9 +2037,7 @@ var t = e(((e) => {
|
|
|
2058
2037
|
case c.Function:
|
|
2059
2038
|
case c.LeftParenthesis:
|
|
2060
2039
|
case c.LeftSquareBracket:
|
|
2061
|
-
case c.LeftCurlyBracket:
|
|
2062
|
-
r.push(n), n = x.get(e.type);
|
|
2063
|
-
break;
|
|
2040
|
+
case c.LeftCurlyBracket: r.push(n), n = x.get(e.type);
|
|
2064
2041
|
}
|
|
2065
2042
|
i++;
|
|
2066
2043
|
} while (e = t(i));
|
|
@@ -2772,13 +2749,13 @@ var t = e(((e) => {
|
|
|
2772
2749
|
return !0;
|
|
2773
2750
|
}
|
|
2774
2751
|
function c(e) {
|
|
2775
|
-
return e.type === r.Delim
|
|
2752
|
+
return e.type === r.Delim && e.value !== `?`;
|
|
2776
2753
|
}
|
|
2777
2754
|
function l(e) {
|
|
2778
|
-
return e === null
|
|
2755
|
+
return e === null || e.type === r.Comma || e.type === r.Function || e.type === r.LeftParenthesis || e.type === r.LeftSquareBracket || e.type === r.LeftCurlyBracket || c(e);
|
|
2779
2756
|
}
|
|
2780
2757
|
function u(e) {
|
|
2781
|
-
return e === null
|
|
2758
|
+
return e === null || e.type === r.RightParenthesis || e.type === r.RightSquareBracket || e.type === r.RightCurlyBracket || e.type === r.Delim && e.value === `/`;
|
|
2782
2759
|
}
|
|
2783
2760
|
function d(e, t, o) {
|
|
2784
2761
|
function c() {
|
|
@@ -2855,10 +2832,13 @@ var t = e(((e) => {
|
|
|
2855
2832
|
C = a;
|
|
2856
2833
|
break;
|
|
2857
2834
|
}
|
|
2858
|
-
if (t = y.nextState, t === n.DISALLOW_EMPTY)
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2835
|
+
if (t = y.nextState, t === n.DISALLOW_EMPTY) {
|
|
2836
|
+
if (y.matchStack === D) {
|
|
2837
|
+
t = n.MISMATCH;
|
|
2838
|
+
break;
|
|
2839
|
+
}
|
|
2840
|
+
t = n.MATCH;
|
|
2841
|
+
}
|
|
2862
2842
|
for (; y.syntaxStack !== v;) _();
|
|
2863
2843
|
y = y.prev;
|
|
2864
2844
|
break;
|
|
@@ -3018,12 +2998,10 @@ var t = e(((e) => {
|
|
|
3018
2998
|
syntax: e.syntax
|
|
3019
2999
|
});
|
|
3020
3000
|
break;
|
|
3021
|
-
default:
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
});
|
|
3026
|
-
break;
|
|
3001
|
+
default: r.match.push({
|
|
3002
|
+
token: e.token.value,
|
|
3003
|
+
node: e.token.node
|
|
3004
|
+
});
|
|
3027
3005
|
}
|
|
3028
3006
|
e = e.prev;
|
|
3029
3007
|
}
|
|
@@ -3084,7 +3062,7 @@ var t = e(((e) => {
|
|
|
3084
3062
|
}
|
|
3085
3063
|
function a(e, n, r) {
|
|
3086
3064
|
let i = t.call(e, n);
|
|
3087
|
-
return i
|
|
3065
|
+
return i !== null && i.some(r);
|
|
3088
3066
|
}
|
|
3089
3067
|
e.getTrace = t, e.isKeyword = i, e.isProperty = r, e.isType = n;
|
|
3090
3068
|
})), B = e(((e) => {
|
|
@@ -3136,10 +3114,12 @@ var t = e(((e) => {
|
|
|
3136
3114
|
if (s === `type`) a.type !== e && o(a, "Wrong node type `" + a.type + "`, expected `" + e + "`");
|
|
3137
3115
|
else if (s === `loc`) {
|
|
3138
3116
|
if (a.loc === null) continue;
|
|
3139
|
-
if (a.loc && a.loc.constructor === Object)
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3117
|
+
if (a.loc && a.loc.constructor === Object) {
|
|
3118
|
+
if (typeof a.loc.source != `string`) s += `.source`;
|
|
3119
|
+
else if (!i(a.loc.start)) s += `.start`;
|
|
3120
|
+
else if (!i(a.loc.end)) s += `.end`;
|
|
3121
|
+
else continue;
|
|
3122
|
+
}
|
|
3143
3123
|
c = !1;
|
|
3144
3124
|
} else if (r.hasOwnProperty(s)) {
|
|
3145
3125
|
c = !1;
|
|
@@ -3511,15 +3491,13 @@ var t = e(((e) => {
|
|
|
3511
3491
|
case `pseudo`:
|
|
3512
3492
|
r[a] = i(e[a], o, [`parse`]);
|
|
3513
3493
|
break;
|
|
3514
|
-
case `node`:
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
]);
|
|
3522
|
-
break;
|
|
3494
|
+
case `node`: r[a] = i(e[a], o, [
|
|
3495
|
+
`name`,
|
|
3496
|
+
`structure`,
|
|
3497
|
+
`parse`,
|
|
3498
|
+
`generate`,
|
|
3499
|
+
`walkContext`
|
|
3500
|
+
]);
|
|
3523
3501
|
}
|
|
3524
3502
|
return r;
|
|
3525
3503
|
}
|
|
@@ -15270,9 +15248,7 @@ var t = e(((e) => {
|
|
|
15270
15248
|
case 110:
|
|
15271
15249
|
n = `N is expected`;
|
|
15272
15250
|
break;
|
|
15273
|
-
case 45:
|
|
15274
|
-
n = `HyphenMinus is expected`;
|
|
15275
|
-
break;
|
|
15251
|
+
case 45: n = `HyphenMinus is expected`;
|
|
15276
15252
|
}
|
|
15277
15253
|
this.error(n, this.tokenStart + e);
|
|
15278
15254
|
}
|
|
@@ -15280,13 +15256,15 @@ var t = e(((e) => {
|
|
|
15280
15256
|
function c() {
|
|
15281
15257
|
let e = 0, t = 0, n = this.tokenType;
|
|
15282
15258
|
for (; n === r.WhiteSpace || n === r.Comment;) n = this.lookupType(++e);
|
|
15283
|
-
if (n !== r.Number)
|
|
15284
|
-
|
|
15285
|
-
|
|
15286
|
-
|
|
15287
|
-
|
|
15288
|
-
|
|
15289
|
-
|
|
15259
|
+
if (n !== r.Number) {
|
|
15260
|
+
if (this.isDelim(43, e) || this.isDelim(45, e)) {
|
|
15261
|
+
t = this.isDelim(43, e) ? 43 : 45;
|
|
15262
|
+
do
|
|
15263
|
+
n = this.lookupType(++e);
|
|
15264
|
+
while (n === r.WhiteSpace || n === r.Comment);
|
|
15265
|
+
n !== r.Number && (this.skip(e), o.call(this, !0));
|
|
15266
|
+
} else return null;
|
|
15267
|
+
}
|
|
15290
15268
|
return e > 0 && this.skip(e), t === 0 && (n = this.charCodeAt(this.tokenStart), n !== 43 && n !== 45 && this.error(`Number sign is expected`)), o.call(this, t !== 0), t === 45 ? `-` + this.consume(r.Number) : this.consume(r.Number);
|
|
15291
15269
|
}
|
|
15292
15270
|
let l = {
|
|
@@ -15365,9 +15343,7 @@ var t = e(((e) => {
|
|
|
15365
15343
|
case n.Semicolon:
|
|
15366
15344
|
this.next();
|
|
15367
15345
|
break;
|
|
15368
|
-
case n.LeftCurlyBracket:
|
|
15369
|
-
c = hasOwnProperty.call(this.atrule, o) && typeof this.atrule[o].block == `function` ? this.atrule[o].block.call(this, e) : this.Block(i.call(this));
|
|
15370
|
-
break;
|
|
15346
|
+
case n.LeftCurlyBracket: c = hasOwnProperty.call(this.atrule, o) && typeof this.atrule[o].block == `function` ? this.atrule[o].block.call(this, e) : this.Block(i.call(this));
|
|
15371
15347
|
}
|
|
15372
15348
|
return {
|
|
15373
15349
|
type: `Atrule`,
|
|
@@ -15556,7 +15532,6 @@ var t = e(((e) => {
|
|
|
15556
15532
|
default: this.error(`Combinator is expected`);
|
|
15557
15533
|
}
|
|
15558
15534
|
t = this.substrToCursor(e);
|
|
15559
|
-
break;
|
|
15560
15535
|
}
|
|
15561
15536
|
return {
|
|
15562
15537
|
type: `Combinator`,
|
|
@@ -15698,16 +15673,14 @@ var t = e(((e) => {
|
|
|
15698
15673
|
case 38:
|
|
15699
15674
|
this.next();
|
|
15700
15675
|
break;
|
|
15701
|
-
case 47:
|
|
15702
|
-
this.next(), this.isDelim(47) && this.next();
|
|
15703
|
-
break;
|
|
15676
|
+
case 47: this.next(), this.isDelim(47) && this.next();
|
|
15704
15677
|
}
|
|
15705
15678
|
return this.tokenType === r.Hash ? this.eat(r.Hash) : this.eat(r.Ident), this.substrToCursor(e);
|
|
15706
15679
|
}
|
|
15707
15680
|
function d() {
|
|
15708
15681
|
this.eat(r.Delim), this.skipSC();
|
|
15709
15682
|
let e = this.consume(r.Ident);
|
|
15710
|
-
return e === `important`
|
|
15683
|
+
return e === `important` || e;
|
|
15711
15684
|
}
|
|
15712
15685
|
e.generate = l, e.name = `Declaration`, e.parse = c, e.structure = s, e.walkContext = `declaration`;
|
|
15713
15686
|
})), _e = e(((e) => {
|
|
@@ -16329,13 +16302,7 @@ var t = e(((e) => {
|
|
|
16329
16302
|
let n = t(), r = { children: [[`Selector`, `Raw`]] };
|
|
16330
16303
|
function i() {
|
|
16331
16304
|
let e = this.createList();
|
|
16332
|
-
for (; !this.eof;)
|
|
16333
|
-
if (e.push(this.Selector()), this.tokenType === n.Comma) {
|
|
16334
|
-
this.next();
|
|
16335
|
-
continue;
|
|
16336
|
-
}
|
|
16337
|
-
break;
|
|
16338
|
-
}
|
|
16305
|
+
for (; !this.eof && (e.push(this.Selector()), this.tokenType === n.Comma);) this.next();
|
|
16339
16306
|
return {
|
|
16340
16307
|
type: `SelectorList`,
|
|
16341
16308
|
loc: this.getLocationFromList(e),
|
|
@@ -16369,15 +16336,7 @@ var t = e(((e) => {
|
|
|
16369
16336
|
let r = n ? `'` : `"`, i = n ? 39 : 34, a = ``, o = !1;
|
|
16370
16337
|
for (let n = 0; n < e.length; n++) {
|
|
16371
16338
|
let r = e.charCodeAt(n);
|
|
16372
|
-
|
|
16373
|
-
a += `�`;
|
|
16374
|
-
continue;
|
|
16375
|
-
}
|
|
16376
|
-
if (r <= 31 || r === 127) {
|
|
16377
|
-
a += `\\` + r.toString(16), o = !0;
|
|
16378
|
-
continue;
|
|
16379
|
-
}
|
|
16380
|
-
r === i || r === 92 ? (a += `\\` + e.charAt(n), o = !1) : (o && (t.isHexDigit(r) || t.isWhiteSpace(r)) && (a += ` `), a += e.charAt(n), o = !1);
|
|
16339
|
+
r === 0 ? a += `�` : r <= 31 || r === 127 ? (a += `\\` + r.toString(16), o = !0) : r === i || r === 92 ? (a += `\\` + e.charAt(n), o = !1) : (o && (t.isHexDigit(r) || t.isWhiteSpace(r)) && (a += ` `), a += e.charAt(n), o = !1);
|
|
16381
16340
|
}
|
|
16382
16341
|
return r + a + r;
|
|
16383
16342
|
}
|
|
@@ -16563,15 +16522,7 @@ var t = e(((e) => {
|
|
|
16563
16522
|
let n = ``, r = !1;
|
|
16564
16523
|
for (let i = 0; i < e.length; i++) {
|
|
16565
16524
|
let a = e.charCodeAt(i);
|
|
16566
|
-
|
|
16567
|
-
n += `�`;
|
|
16568
|
-
continue;
|
|
16569
|
-
}
|
|
16570
|
-
if (a <= 31 || a === 127) {
|
|
16571
|
-
n += `\\` + a.toString(16), r = !0;
|
|
16572
|
-
continue;
|
|
16573
|
-
}
|
|
16574
|
-
a === 32 || a === 92 || a === 34 || a === 39 || a === 40 || a === 41 ? (n += `\\` + e.charAt(i), r = !1) : (r && t.isHexDigit(a) && (n += ` `), n += e.charAt(i), r = !1);
|
|
16525
|
+
a === 0 ? n += `�` : a <= 31 || a === 127 ? (n += `\\` + a.toString(16), r = !0) : a === 32 || a === 92 || a === 34 || a === 39 || a === 40 || a === 41 ? (n += `\\` + e.charAt(i), r = !1) : (r && t.isHexDigit(a) && (n += ` `), n += e.charAt(i), r = !1);
|
|
16575
16526
|
}
|
|
16576
16527
|
return `url(` + n + `)`;
|
|
16577
16528
|
}
|
|
@@ -16683,19 +16634,17 @@ var t = e(((e) => {
|
|
|
16683
16634
|
case r.Dimension:
|
|
16684
16635
|
this.charCodeAt(this.tokenStart) === 46 && this.error(`Identifier is expected`, this.tokenStart + 1);
|
|
16685
16636
|
break;
|
|
16686
|
-
case r.Delim:
|
|
16687
|
-
|
|
16688
|
-
|
|
16689
|
-
|
|
16690
|
-
|
|
16691
|
-
|
|
16692
|
-
|
|
16693
|
-
|
|
16694
|
-
|
|
16695
|
-
|
|
16696
|
-
|
|
16697
|
-
}
|
|
16698
|
-
break;
|
|
16637
|
+
case r.Delim: switch (this.charCodeAt(this.tokenStart)) {
|
|
16638
|
+
case 43:
|
|
16639
|
+
case 62:
|
|
16640
|
+
case 126:
|
|
16641
|
+
case 47: return this.Combinator();
|
|
16642
|
+
case 46: return this.ClassSelector();
|
|
16643
|
+
case 42:
|
|
16644
|
+
case 124: return this.TypeSelector();
|
|
16645
|
+
case 35: return this.IdSelector();
|
|
16646
|
+
case 38: return this.NestingSelector();
|
|
16647
|
+
}
|
|
16699
16648
|
}
|
|
16700
16649
|
}
|
|
16701
16650
|
n.exports = {
|
|
@@ -17150,15 +17099,7 @@ var t = e(((e) => {
|
|
|
17150
17099
|
if (e.length === 1 && e.charCodeAt(0) === 45) return `\\-`;
|
|
17151
17100
|
for (let r = 0; r < e.length; r++) {
|
|
17152
17101
|
let i = e.charCodeAt(r);
|
|
17153
|
-
|
|
17154
|
-
n += `�`;
|
|
17155
|
-
continue;
|
|
17156
|
-
}
|
|
17157
|
-
if (i <= 31 || i === 127 || i >= 48 && i <= 57 && (r === 0 || r === 1 && e.charCodeAt(0) === 45)) {
|
|
17158
|
-
n += `\\` + i.toString(16) + ` `;
|
|
17159
|
-
continue;
|
|
17160
|
-
}
|
|
17161
|
-
t.isName(i) ? n += e.charAt(r) : n += `\\` + e.charAt(r);
|
|
17102
|
+
i === 0 ? n += `�` : i <= 31 || i === 127 || i >= 48 && i <= 57 && (r === 0 || r === 1 && e.charCodeAt(0) === 45) ? n += `\\` + i.toString(16) + ` ` : t.isName(i) ? n += e.charAt(r) : n += `\\` + e.charAt(r);
|
|
17162
17103
|
}
|
|
17163
17104
|
return n;
|
|
17164
17105
|
}
|
|
@@ -17206,7 +17147,7 @@ var t = e(((e) => {
|
|
|
17206
17147
|
return !(e !== 92 || u(t) || t === 0);
|
|
17207
17148
|
}
|
|
17208
17149
|
function p(e, t, n) {
|
|
17209
|
-
return e === 45 ? s(t) || t === 45 || f(t, n) : s(e) ? !0 : e === 92
|
|
17150
|
+
return e === 45 ? s(t) || t === 45 || f(t, n) : s(e) ? !0 : e === 92 && f(e, t);
|
|
17210
17151
|
}
|
|
17211
17152
|
function m(e, n, r) {
|
|
17212
17153
|
return e === 43 || e === 45 ? t(n) ? 2 : n === 46 && t(r) ? 3 : 0 : e === 46 ? t(n) ? 2 : 0 : +!!t(e);
|
|
@@ -17264,11 +17205,8 @@ var t = e(((e) => {
|
|
|
17264
17205
|
for (; r < e.length; r++) {
|
|
17265
17206
|
let i = e.charCodeAt(r);
|
|
17266
17207
|
if (!t.isName(i)) {
|
|
17267
|
-
if (t.isValidEscape(i, n(e, r + 1)))
|
|
17268
|
-
|
|
17269
|
-
continue;
|
|
17270
|
-
}
|
|
17271
|
-
break;
|
|
17208
|
+
if (t.isValidEscape(i, n(e, r + 1))) r = l(e, r) - 1;
|
|
17209
|
+
else break;
|
|
17272
17210
|
}
|
|
17273
17211
|
}
|
|
17274
17212
|
return r;
|
|
@@ -17402,9 +17340,7 @@ var t = e(((e) => {
|
|
|
17402
17340
|
case i.LeftParenthesis:
|
|
17403
17341
|
case i.Function:
|
|
17404
17342
|
case i.LeftSquareBracket:
|
|
17405
|
-
case i.LeftCurlyBracket:
|
|
17406
|
-
c[l] = d, u = o.get(e), d = u << 24 | l;
|
|
17407
|
-
break;
|
|
17343
|
+
case i.LeftCurlyBracket: c[l] = d, u = o.get(e), d = u << 24 | l;
|
|
17408
17344
|
}
|
|
17409
17345
|
s[l++] = e << 24 | n, f === -1 && (f = t);
|
|
17410
17346
|
}), s[l] = i.EOF << 24 | r, c[l] = r, c[r] = r; d !== 0;) {
|
|
@@ -17420,7 +17356,7 @@ var t = e(((e) => {
|
|
|
17420
17356
|
return e += this.tokenIndex, e < this.tokenCount ? this.offsetAndType[e - 1] & a : this.source.length;
|
|
17421
17357
|
}
|
|
17422
17358
|
lookupValue(e, t) {
|
|
17423
|
-
return e += this.tokenIndex, e < this.tokenCount
|
|
17359
|
+
return e += this.tokenIndex, e < this.tokenCount && n.cmpStr(this.source, this.offsetAndType[e - 1] & a, this.offsetAndType[e] & a, t);
|
|
17424
17360
|
}
|
|
17425
17361
|
getTokenStart(e) {
|
|
17426
17362
|
return e === this.tokenIndex ? this.tokenStart : e > 0 ? e < this.tokenCount ? this.offsetAndType[e - 1] & a : this.offsetAndType[this.tokenCount] & a : this.firstCharOffset;
|
|
@@ -17484,15 +17420,7 @@ var t = e(((e) => {
|
|
|
17484
17420
|
return t < u ? e.charCodeAt(t) : 0;
|
|
17485
17421
|
}
|
|
17486
17422
|
function o() {
|
|
17487
|
-
|
|
17488
|
-
p = t.Dimension, f = r.consumeName(e, f);
|
|
17489
|
-
return;
|
|
17490
|
-
}
|
|
17491
|
-
if (a(f) === 37) {
|
|
17492
|
-
p = t.Percentage, f++;
|
|
17493
|
-
return;
|
|
17494
|
-
}
|
|
17495
|
-
p = t.Number;
|
|
17423
|
+
f = r.consumeNumber(e, f), n.isIdentifierStart(a(f), a(f + 1), a(f + 2)) ? (p = t.Dimension, f = r.consumeName(e, f)) : a(f) === 37 ? (p = t.Percentage, f++) : p = t.Number;
|
|
17496
17424
|
}
|
|
17497
17425
|
function s() {
|
|
17498
17426
|
let n = f;
|
|
@@ -17502,13 +17430,7 @@ var t = e(((e) => {
|
|
|
17502
17430
|
return;
|
|
17503
17431
|
}
|
|
17504
17432
|
l();
|
|
17505
|
-
|
|
17506
|
-
}
|
|
17507
|
-
if (a(f) === 40) {
|
|
17508
|
-
p = t.Function, f++;
|
|
17509
|
-
return;
|
|
17510
|
-
}
|
|
17511
|
-
p = t.Ident;
|
|
17433
|
+
} else a(f) === 40 ? (p = t.Function, f++) : p = t.Ident;
|
|
17512
17434
|
}
|
|
17513
17435
|
function c(i) {
|
|
17514
17436
|
for (i ||= a(f++), p = t.String; f < e.length; f++) {
|
|
@@ -17527,7 +17449,6 @@ var t = e(((e) => {
|
|
|
17527
17449
|
if (f === e.length - 1) break;
|
|
17528
17450
|
let s = a(f + 1);
|
|
17529
17451
|
n.isNewline(s) ? f += r.getNewlineLength(e, f + 1, s) : n.isValidEscape(o, s) && (f = r.consumeEscaped(e, f) - 1);
|
|
17530
|
-
break;
|
|
17531
17452
|
}
|
|
17532
17453
|
}
|
|
17533
17454
|
}
|
|
@@ -17781,11 +17702,12 @@ var t = e(((e) => {
|
|
|
17781
17702
|
return this.insert(e.createItem(t));
|
|
17782
17703
|
}
|
|
17783
17704
|
insert(e, t = null) {
|
|
17784
|
-
if (t !== null)
|
|
17785
|
-
if (this.
|
|
17786
|
-
|
|
17787
|
-
|
|
17788
|
-
|
|
17705
|
+
if (t !== null) {
|
|
17706
|
+
if (this.updateCursors(t.prev, e, t, e), t.prev === null) {
|
|
17707
|
+
if (this.head !== t) throw Error(`before doesn't belong to list`);
|
|
17708
|
+
this.head = e, t.prev = e, e.next = t, this.updateCursors(null, e);
|
|
17709
|
+
} else t.prev.next = e, e.prev = t.prev, t.prev = e, e.next = t;
|
|
17710
|
+
} else this.updateCursors(this.tail, e, null, e), this.tail === null ? this.head = e : (this.tail.next = e, e.prev = this.tail), this.tail = e;
|
|
17789
17711
|
return this;
|
|
17790
17712
|
}
|
|
17791
17713
|
insertData(t, n) {
|
|
@@ -17823,7 +17745,7 @@ var t = e(((e) => {
|
|
|
17823
17745
|
return this.insertList(e);
|
|
17824
17746
|
}
|
|
17825
17747
|
insertList(e, t) {
|
|
17826
|
-
return e.head === null
|
|
17748
|
+
return e.head === null || (t == null ? (this.updateCursors(this.tail, e.tail, null, e.head), this.tail === null ? this.head = e.head : (this.tail.next = e.head, e.head.prev = this.tail), this.tail = e.tail) : (this.updateCursors(t.prev, e.tail, t, e.head), t.prev === null ? this.head = e.head : (t.prev.next = e.head, e.head.prev = t.prev), t.prev = e.tail, e.tail.next = t), e.head = null, e.tail = null), this;
|
|
17827
17749
|
}
|
|
17828
17750
|
replace(e, t) {
|
|
17829
17751
|
`head` in t ? this.insertList(t, e) : this.insert(t, e), this.remove(e);
|
|
@@ -17928,9 +17850,7 @@ var t = e(((e) => {
|
|
|
17928
17850
|
case `function`:
|
|
17929
17851
|
t.context[n] = e.parseContext[n];
|
|
17930
17852
|
break;
|
|
17931
|
-
case `string`:
|
|
17932
|
-
t.context[n] = d(e.parseContext[n]);
|
|
17933
|
-
break;
|
|
17853
|
+
case `string`: t.context[n] = d(e.parseContext[n]);
|
|
17934
17854
|
}
|
|
17935
17855
|
return {
|
|
17936
17856
|
config: t,
|
|
@@ -18024,9 +17944,7 @@ var t = e(((e) => {
|
|
|
18024
17944
|
case c.Hash:
|
|
18025
17945
|
this.isDelim(35) && (this.next(), r++, n = `Name is expected`);
|
|
18026
17946
|
break;
|
|
18027
|
-
case c.Percentage:
|
|
18028
|
-
this.tokenType === c.Number && (r = this.tokenEnd, n = `Percent sign is expected`);
|
|
18029
|
-
break;
|
|
17947
|
+
case c.Percentage: this.tokenType === c.Number && (r = this.tokenEnd, n = `Percent sign is expected`);
|
|
18030
17948
|
}
|
|
18031
17949
|
this.error(n, r);
|
|
18032
17950
|
}
|
|
@@ -18054,13 +17972,13 @@ var t = e(((e) => {
|
|
|
18054
17972
|
}
|
|
18055
17973
|
});
|
|
18056
17974
|
return Object.assign(function(e, t) {
|
|
18057
|
-
d = e, t ||= {}, v.setSource(d, r.tokenize), _.setSource(d, t.offset, t.line, t.column), f = t.filename || `<unknown>`, m = !!t.positions, h = typeof t.onParseError == `function` ? t.onParseError : u, g = !1, v.parseAtrulePrelude = `parseAtrulePrelude` in t ? !!t.parseAtrulePrelude : !0, v.parseRulePrelude = `parseRulePrelude` in t ? !!t.parseRulePrelude : !0, v.parseValue = `parseValue` in t ? !!t.parseValue : !0, v.parseCustomProperty = `parseCustomProperty` in t
|
|
17975
|
+
d = e, t ||= {}, v.setSource(d, r.tokenize), _.setSource(d, t.offset, t.line, t.column), f = t.filename || `<unknown>`, m = !!t.positions, h = typeof t.onParseError == `function` ? t.onParseError : u, g = !1, v.parseAtrulePrelude = `parseAtrulePrelude` in t ? !!t.parseAtrulePrelude : !0, v.parseRulePrelude = `parseRulePrelude` in t ? !!t.parseRulePrelude : !0, v.parseValue = `parseValue` in t ? !!t.parseValue : !0, v.parseCustomProperty = `parseCustomProperty` in t && !!t.parseCustomProperty;
|
|
18058
17976
|
let { context: n = `default`, onComment: i } = t;
|
|
18059
17977
|
if (!(n in v.context)) throw Error("Unknown context `" + n + "`");
|
|
18060
17978
|
typeof i == `function` && v.forEachToken((e, t, n) => {
|
|
18061
17979
|
if (e === c.Comment) {
|
|
18062
|
-
let e = v.getLocation(t, n);
|
|
18063
|
-
i(
|
|
17980
|
+
let e = v.getLocation(t, n), r = s.cmpStr(d, n - 2, n, `*/`) ? d.slice(t + 2, n - 2) : d.slice(t + 2, n);
|
|
17981
|
+
i(r, e);
|
|
18064
17982
|
}
|
|
18065
17983
|
});
|
|
18066
17984
|
let a = v.context[n].call(v, t);
|
|
@@ -18233,9 +18151,7 @@ var t = e(((e) => {
|
|
|
18233
18151
|
e.children.forEach((e) => {
|
|
18234
18152
|
n !== null && t.call(this, n), this.node(e), n = e;
|
|
18235
18153
|
});
|
|
18236
|
-
|
|
18237
|
-
}
|
|
18238
|
-
e.children.forEach(this.node, this);
|
|
18154
|
+
} else e.children.forEach(this.node, this);
|
|
18239
18155
|
}
|
|
18240
18156
|
function o(e) {
|
|
18241
18157
|
t.tokenize(e, (t, n, r) => {
|
|
@@ -18376,7 +18292,7 @@ var t = e(((e) => {
|
|
|
18376
18292
|
let p = c(l), m = c(u), h = function(e, t) {
|
|
18377
18293
|
function o(e, t, n) {
|
|
18378
18294
|
let r = s.call(_, e, t, n);
|
|
18379
|
-
return r === d
|
|
18295
|
+
return r === d || r !== f && !!(h.hasOwnProperty(e.type) && h[e.type](e, _, o, g) || c.call(_, e, t, n) === d);
|
|
18380
18296
|
}
|
|
18381
18297
|
let s = n, c = n, h = l, g = (e, t, n, r) => e || o(t, n, r), _ = {
|
|
18382
18298
|
break: d,
|
|
@@ -18604,9 +18520,11 @@ var t = e(((e) => {
|
|
|
18604
18520
|
function c(e, t, n) {
|
|
18605
18521
|
let i = !1, c = o(e, t, n);
|
|
18606
18522
|
if (e = n(c), e === null) return t;
|
|
18607
|
-
if (e.type !== r.Number)
|
|
18608
|
-
if (
|
|
18609
|
-
|
|
18523
|
+
if (e.type !== r.Number) {
|
|
18524
|
+
if (a(e, 43) || a(e, 45)) {
|
|
18525
|
+
if (i = !0, c = o(n(++c), c, n), e = n(c), e === null || e.type !== r.Number) return 0;
|
|
18526
|
+
} else return t;
|
|
18527
|
+
}
|
|
18610
18528
|
if (!i) {
|
|
18611
18529
|
let t = e.value.charCodeAt(0);
|
|
18612
18530
|
if (t !== 43 && t !== 45) return 0;
|
|
@@ -18707,7 +18625,7 @@ var t = e(((e) => {
|
|
|
18707
18625
|
return !1;
|
|
18708
18626
|
}
|
|
18709
18627
|
function x(e, t) {
|
|
18710
|
-
return t === e.length - 2
|
|
18628
|
+
return t === e.length - 2 && v(e, t) === 92 && o.isDigit(v(e, t + 1));
|
|
18711
18629
|
}
|
|
18712
18630
|
function S(e, t, n) {
|
|
18713
18631
|
if (e && e.type === `Range`) {
|
|
@@ -18732,9 +18650,7 @@ var t = e(((e) => {
|
|
|
18732
18650
|
case a.Function:
|
|
18733
18651
|
case a.LeftParenthesis:
|
|
18734
18652
|
case a.LeftSquareBracket:
|
|
18735
|
-
case a.LeftCurlyBracket:
|
|
18736
|
-
r.push(n), n = l.get(e.type);
|
|
18737
|
-
break;
|
|
18653
|
+
case a.LeftCurlyBracket: r.push(n), n = l.get(e.type);
|
|
18738
18654
|
}
|
|
18739
18655
|
i++;
|
|
18740
18656
|
} while (e = t(i));
|
|
@@ -18790,9 +18706,7 @@ var t = e(((e) => {
|
|
|
18790
18706
|
case a.Function:
|
|
18791
18707
|
case a.LeftParenthesis:
|
|
18792
18708
|
case a.LeftSquareBracket:
|
|
18793
|
-
case a.LeftCurlyBracket:
|
|
18794
|
-
r.push(n), n = l.get(e.type);
|
|
18795
|
-
break;
|
|
18709
|
+
case a.LeftCurlyBracket: r.push(n), n = l.get(e.type);
|
|
18796
18710
|
}
|
|
18797
18711
|
i++;
|
|
18798
18712
|
} while (e = t(i));
|
|
@@ -18814,9 +18728,7 @@ var t = e(((e) => {
|
|
|
18814
18728
|
case a.Function:
|
|
18815
18729
|
case a.LeftParenthesis:
|
|
18816
18730
|
case a.LeftSquareBracket:
|
|
18817
|
-
case a.LeftCurlyBracket:
|
|
18818
|
-
r.push(n), n = l.get(e.type);
|
|
18819
|
-
break;
|
|
18731
|
+
case a.LeftCurlyBracket: r.push(n), n = l.get(e.type);
|
|
18820
18732
|
}
|
|
18821
18733
|
i++;
|
|
18822
18734
|
} while (e = t(i));
|
|
@@ -19370,13 +19282,13 @@ var t = e(((e) => {
|
|
|
19370
19282
|
return !0;
|
|
19371
19283
|
}
|
|
19372
19284
|
function s(e) {
|
|
19373
|
-
return e.type === n.Delim
|
|
19285
|
+
return e.type === n.Delim && e.value !== `?`;
|
|
19374
19286
|
}
|
|
19375
19287
|
function c(e) {
|
|
19376
|
-
return e === null
|
|
19288
|
+
return e === null || e.type === n.Comma || e.type === n.Function || e.type === n.LeftParenthesis || e.type === n.LeftSquareBracket || e.type === n.LeftCurlyBracket || s(e);
|
|
19377
19289
|
}
|
|
19378
19290
|
function l(e) {
|
|
19379
|
-
return e === null
|
|
19291
|
+
return e === null || e.type === n.RightParenthesis || e.type === n.RightSquareBracket || e.type === n.RightCurlyBracket || e.type === n.Delim && e.value === `/`;
|
|
19380
19292
|
}
|
|
19381
19293
|
function u(e, a, s) {
|
|
19382
19294
|
function u() {
|
|
@@ -19453,10 +19365,13 @@ var t = e(((e) => {
|
|
|
19453
19365
|
C = i;
|
|
19454
19366
|
break;
|
|
19455
19367
|
}
|
|
19456
|
-
if (a = y.nextState, a === t.DISALLOW_EMPTY)
|
|
19457
|
-
|
|
19458
|
-
|
|
19459
|
-
|
|
19368
|
+
if (a = y.nextState, a === t.DISALLOW_EMPTY) {
|
|
19369
|
+
if (y.matchStack === D) {
|
|
19370
|
+
a = t.MISMATCH;
|
|
19371
|
+
break;
|
|
19372
|
+
}
|
|
19373
|
+
a = t.MATCH;
|
|
19374
|
+
}
|
|
19460
19375
|
for (; y.syntaxStack !== v;) _();
|
|
19461
19376
|
y = y.prev;
|
|
19462
19377
|
break;
|
|
@@ -19616,12 +19531,10 @@ var t = e(((e) => {
|
|
|
19616
19531
|
syntax: e.syntax
|
|
19617
19532
|
});
|
|
19618
19533
|
break;
|
|
19619
|
-
default:
|
|
19620
|
-
|
|
19621
|
-
|
|
19622
|
-
|
|
19623
|
-
});
|
|
19624
|
-
break;
|
|
19534
|
+
default: r.match.push({
|
|
19535
|
+
token: e.token.value,
|
|
19536
|
+
node: e.token.node
|
|
19537
|
+
});
|
|
19625
19538
|
}
|
|
19626
19539
|
e = e.prev;
|
|
19627
19540
|
}
|
|
@@ -19682,7 +19595,7 @@ var t = e(((e) => {
|
|
|
19682
19595
|
}
|
|
19683
19596
|
function a(e, n, r) {
|
|
19684
19597
|
let i = t.call(e, n);
|
|
19685
|
-
return i
|
|
19598
|
+
return i !== null && i.some(r);
|
|
19686
19599
|
}
|
|
19687
19600
|
e.getTrace = t, e.isKeyword = i, e.isProperty = r, e.isType = n;
|
|
19688
19601
|
})), on = e(((e) => {
|
|
@@ -19734,10 +19647,12 @@ var t = e(((e) => {
|
|
|
19734
19647
|
if (s === `type`) a.type !== e && o(a, "Wrong node type `" + a.type + "`, expected `" + e + "`");
|
|
19735
19648
|
else if (s === `loc`) {
|
|
19736
19649
|
if (a.loc === null) continue;
|
|
19737
|
-
if (a.loc && a.loc.constructor === Object)
|
|
19738
|
-
|
|
19739
|
-
|
|
19740
|
-
|
|
19650
|
+
if (a.loc && a.loc.constructor === Object) {
|
|
19651
|
+
if (typeof a.loc.source != `string`) s += `.source`;
|
|
19652
|
+
else if (!i(a.loc.start)) s += `.start`;
|
|
19653
|
+
else if (!i(a.loc.end)) s += `.end`;
|
|
19654
|
+
else continue;
|
|
19655
|
+
}
|
|
19741
19656
|
c = !1;
|
|
19742
19657
|
} else if (r.hasOwnProperty(s)) {
|
|
19743
19658
|
c = !1;
|
|
@@ -29639,9 +29554,7 @@ var t = e(((e) => {
|
|
|
29639
29554
|
case 110:
|
|
29640
29555
|
n = `N is expected`;
|
|
29641
29556
|
break;
|
|
29642
|
-
case 45:
|
|
29643
|
-
n = `HyphenMinus is expected`;
|
|
29644
|
-
break;
|
|
29557
|
+
case 45: n = `HyphenMinus is expected`;
|
|
29645
29558
|
}
|
|
29646
29559
|
this.error(n, this.tokenStart + e);
|
|
29647
29560
|
}
|
|
@@ -29649,13 +29562,15 @@ var t = e(((e) => {
|
|
|
29649
29562
|
function o() {
|
|
29650
29563
|
let e = 0, n = 0, r = this.tokenType;
|
|
29651
29564
|
for (; r === t.WhiteSpace || r === t.Comment;) r = this.lookupType(++e);
|
|
29652
|
-
if (r !== t.Number)
|
|
29653
|
-
|
|
29654
|
-
|
|
29655
|
-
|
|
29656
|
-
|
|
29657
|
-
|
|
29658
|
-
|
|
29565
|
+
if (r !== t.Number) {
|
|
29566
|
+
if (this.isDelim(43, e) || this.isDelim(45, e)) {
|
|
29567
|
+
n = this.isDelim(43, e) ? 43 : 45;
|
|
29568
|
+
do
|
|
29569
|
+
r = this.lookupType(++e);
|
|
29570
|
+
while (r === t.WhiteSpace || r === t.Comment);
|
|
29571
|
+
r !== t.Number && (this.skip(e), i.call(this, !0));
|
|
29572
|
+
} else return null;
|
|
29573
|
+
}
|
|
29659
29574
|
return e > 0 && this.skip(e), n === 0 && (r = this.charCodeAt(this.tokenStart), r !== 43 && r !== 45 && this.error(`Number sign is expected`)), i.call(this, n !== 0), n === 45 ? `-` + this.consume(t.Number) : this.consume(t.Number);
|
|
29660
29575
|
}
|
|
29661
29576
|
let s = {
|
|
@@ -29734,9 +29649,7 @@ var t = e(((e) => {
|
|
|
29734
29649
|
case t.Semicolon:
|
|
29735
29650
|
this.next();
|
|
29736
29651
|
break;
|
|
29737
|
-
case t.LeftCurlyBracket:
|
|
29738
|
-
s = hasOwnProperty.call(this.atrule, a) && typeof this.atrule[a].block == `function` ? this.atrule[a].block.call(this) : this.Block(r.call(this));
|
|
29739
|
-
break;
|
|
29652
|
+
case t.LeftCurlyBracket: s = hasOwnProperty.call(this.atrule, a) && typeof this.atrule[a].block == `function` ? this.atrule[a].block.call(this) : this.Block(r.call(this));
|
|
29740
29653
|
}
|
|
29741
29654
|
return {
|
|
29742
29655
|
type: `Atrule`,
|
|
@@ -29925,7 +29838,6 @@ var t = e(((e) => {
|
|
|
29925
29838
|
default: this.error(`Combinator is expected`);
|
|
29926
29839
|
}
|
|
29927
29840
|
n = this.substrToCursor(e);
|
|
29928
|
-
break;
|
|
29929
29841
|
}
|
|
29930
29842
|
return {
|
|
29931
29843
|
type: `Combinator`,
|
|
@@ -30003,16 +29915,14 @@ var t = e(((e) => {
|
|
|
30003
29915
|
case 38:
|
|
30004
29916
|
this.next();
|
|
30005
29917
|
break;
|
|
30006
|
-
case 47:
|
|
30007
|
-
this.next(), this.isDelim(47) && this.next();
|
|
30008
|
-
break;
|
|
29918
|
+
case 47: this.next(), this.isDelim(47) && this.next();
|
|
30009
29919
|
}
|
|
30010
29920
|
return this.tokenType === n.Hash ? this.eat(n.Hash) : this.eat(n.Ident), this.substrToCursor(e);
|
|
30011
29921
|
}
|
|
30012
29922
|
function u() {
|
|
30013
29923
|
this.eat(n.Delim), this.skipSC();
|
|
30014
29924
|
let e = this.consume(n.Ident);
|
|
30015
|
-
return e === `important`
|
|
29925
|
+
return e === `important` || e;
|
|
30016
29926
|
}
|
|
30017
29927
|
e.generate = c, e.name = `Declaration`, e.parse = s, e.structure = o, e.walkContext = `declaration`;
|
|
30018
29928
|
})), An = e(((e) => {
|
|
@@ -30417,13 +30327,7 @@ var t = e(((e) => {
|
|
|
30417
30327
|
let t = J(), n = { children: [[`Selector`, `Raw`]] };
|
|
30418
30328
|
function r() {
|
|
30419
30329
|
let e = this.createList();
|
|
30420
|
-
for (; !this.eof;)
|
|
30421
|
-
if (e.push(this.Selector()), this.tokenType === t.Comma) {
|
|
30422
|
-
this.next();
|
|
30423
|
-
continue;
|
|
30424
|
-
}
|
|
30425
|
-
break;
|
|
30426
|
-
}
|
|
30330
|
+
for (; !this.eof && (e.push(this.Selector()), this.tokenType === t.Comma);) this.next();
|
|
30427
30331
|
return {
|
|
30428
30332
|
type: `SelectorList`,
|
|
30429
30333
|
loc: this.getLocationFromList(e),
|
|
@@ -30457,15 +30361,7 @@ var t = e(((e) => {
|
|
|
30457
30361
|
let r = n ? `'` : `"`, i = n ? 39 : 34, a = ``, o = !1;
|
|
30458
30362
|
for (let n = 0; n < e.length; n++) {
|
|
30459
30363
|
let r = e.charCodeAt(n);
|
|
30460
|
-
|
|
30461
|
-
a += `�`;
|
|
30462
|
-
continue;
|
|
30463
|
-
}
|
|
30464
|
-
if (r <= 31 || r === 127) {
|
|
30465
|
-
a += `\\` + r.toString(16), o = !0;
|
|
30466
|
-
continue;
|
|
30467
|
-
}
|
|
30468
|
-
r === i || r === 92 ? (a += `\\` + e.charAt(n), o = !1) : (o && (t.isHexDigit(r) || t.isWhiteSpace(r)) && (a += ` `), a += e.charAt(n), o = !1);
|
|
30364
|
+
r === 0 ? a += `�` : r <= 31 || r === 127 ? (a += `\\` + r.toString(16), o = !0) : r === i || r === 92 ? (a += `\\` + e.charAt(n), o = !1) : (o && (t.isHexDigit(r) || t.isWhiteSpace(r)) && (a += ` `), a += e.charAt(n), o = !1);
|
|
30469
30365
|
}
|
|
30470
30366
|
return r + a + r;
|
|
30471
30367
|
}
|
|
@@ -30635,15 +30531,7 @@ var t = e(((e) => {
|
|
|
30635
30531
|
let n = ``, r = !1;
|
|
30636
30532
|
for (let i = 0; i < e.length; i++) {
|
|
30637
30533
|
let a = e.charCodeAt(i);
|
|
30638
|
-
|
|
30639
|
-
n += `�`;
|
|
30640
|
-
continue;
|
|
30641
|
-
}
|
|
30642
|
-
if (a <= 31 || a === 127) {
|
|
30643
|
-
n += `\\` + a.toString(16), r = !0;
|
|
30644
|
-
continue;
|
|
30645
|
-
}
|
|
30646
|
-
a === 32 || a === 92 || a === 34 || a === 39 || a === 40 || a === 41 ? (n += `\\` + e.charAt(i), r = !1) : (r && t.isHexDigit(a) && (n += ` `), n += e.charAt(i), r = !1);
|
|
30534
|
+
a === 0 ? n += `�` : a <= 31 || a === 127 ? (n += `\\` + a.toString(16), r = !0) : a === 32 || a === 92 || a === 34 || a === 39 || a === 40 || a === 41 ? (n += `\\` + e.charAt(i), r = !1) : (r && t.isHexDigit(a) && (n += ` `), n += e.charAt(i), r = !1);
|
|
30647
30535
|
}
|
|
30648
30536
|
return `url(` + n + `)`;
|
|
30649
30537
|
}
|
|
@@ -30754,18 +30642,16 @@ var t = e(((e) => {
|
|
|
30754
30642
|
case n.Dimension:
|
|
30755
30643
|
this.charCodeAt(this.tokenStart) === 46 && this.error(`Identifier is expected`, this.tokenStart + 1);
|
|
30756
30644
|
break;
|
|
30757
|
-
case n.Delim:
|
|
30758
|
-
|
|
30759
|
-
|
|
30760
|
-
|
|
30761
|
-
|
|
30762
|
-
|
|
30763
|
-
|
|
30764
|
-
|
|
30765
|
-
|
|
30766
|
-
|
|
30767
|
-
}
|
|
30768
|
-
break;
|
|
30645
|
+
case n.Delim: switch (this.charCodeAt(this.tokenStart)) {
|
|
30646
|
+
case 43:
|
|
30647
|
+
case 62:
|
|
30648
|
+
case 126:
|
|
30649
|
+
case 47: return this.Combinator();
|
|
30650
|
+
case 46: return this.ClassSelector();
|
|
30651
|
+
case 42:
|
|
30652
|
+
case 124: return this.TypeSelector();
|
|
30653
|
+
case 35: return this.IdSelector();
|
|
30654
|
+
}
|
|
30769
30655
|
}
|
|
30770
30656
|
}
|
|
30771
30657
|
t.exports = {
|
|
@@ -31138,15 +31024,7 @@ var t = e(((e) => {
|
|
|
31138
31024
|
if (e.length === 1 && e.charCodeAt(0) === 45) return `\\-`;
|
|
31139
31025
|
for (let r = 0; r < e.length; r++) {
|
|
31140
31026
|
let i = e.charCodeAt(r);
|
|
31141
|
-
|
|
31142
|
-
n += `�`;
|
|
31143
|
-
continue;
|
|
31144
|
-
}
|
|
31145
|
-
if (i <= 31 || i === 127 || i >= 48 && i <= 57 && (r === 0 || r === 1 && e.charCodeAt(0) === 45)) {
|
|
31146
|
-
n += `\\` + i.toString(16) + ` `;
|
|
31147
|
-
continue;
|
|
31148
|
-
}
|
|
31149
|
-
t.isName(i) ? n += e.charAt(r) : n += `\\` + e.charAt(r);
|
|
31027
|
+
i === 0 ? n += `�` : i <= 31 || i === 127 || i >= 48 && i <= 57 && (r === 0 || r === 1 && e.charCodeAt(0) === 45) ? n += `\\` + i.toString(16) + ` ` : t.isName(i) ? n += e.charAt(r) : n += `\\` + e.charAt(r);
|
|
31150
31028
|
}
|
|
31151
31029
|
return n;
|
|
31152
31030
|
}
|