@projectwallace/css-analyzer 9.2.0 → 9.3.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.
@@ -1,22 +1,22 @@
1
- var Rr = Object.defineProperty;
2
- var yi = (r) => {
1
+ var vr = Object.defineProperty;
2
+ var Ti = (r) => {
3
3
  throw TypeError(r);
4
4
  };
5
- var vr = (r, e, t) => e in r ? Rr(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
6
- var m = (r, e, t) => vr(r, typeof e != "symbol" ? e + "" : e, t), Ci = (r, e, t) => e.has(r) || yi("Cannot " + t);
7
- var A = (r, e, t) => (Ci(r, e, "read from private field"), t ? t.call(r) : e.get(r)), Y = (r, e, t) => e.has(r) ? yi("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), q = (r, e, t, s) => (Ci(r, e, "write to private field"), s ? s.call(r, t) : e.set(r, t), t);
8
- var Zt = (r, e, t, s) => ({
5
+ var Tr = (r, e, t) => e in r ? vr(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
6
+ var k = (r, e, t) => Tr(r, typeof e != "symbol" ? e + "" : e, t), Si = (r, e, t) => e.has(r) || Ti("Cannot " + t);
7
+ var E = (r, e, t) => (Si(r, e, "read from private field"), t ? t.call(r) : e.get(r)), Y = (r, e, t) => e.has(r) ? Ti("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), z = (r, e, t, s) => (Si(r, e, "write to private field"), s ? s.call(r, t) : e.set(r, t), t);
8
+ var ss = (r, e, t, s) => ({
9
9
  set _(i) {
10
- q(r, e, i, t);
10
+ z(r, e, i, t);
11
11
  },
12
12
  get _() {
13
- return A(r, e, s);
13
+ return E(r, e, s);
14
14
  }
15
15
  });
16
- import { walk as z, SUPPORTS_QUERY as Bi, BREAK as Q, MEDIA_TYPE as Tr, MEDIA_FEATURE as Gi, str_equals as ge, DIMENSION as kt, NUMBER as xs, IDENTIFIER as _e, SELECTOR as me, NTH_SELECTOR as Sr, PSEUDO_ELEMENT_SELECTOR as Qe, TYPE_SELECTOR as ms, PSEUDO_CLASS_SELECTOR as Le, ATTRIBUTE_SELECTOR as wt, SKIP as P, str_starts_with as Wi, COMBINATOR as ls, SELECTOR_LIST as ks, NTH_OF_SELECTOR as Or, CLASS_SELECTOR as Nr, ID_SELECTOR as Lr, FUNCTION as ws, OPERATOR as Re, is_custom as As, is_vendor_prefixed as Es, parse as Ur, AT_RULE as Ir, BLOCK as Hr, DECLARATION as Jt, LAYER_NAME as Pr, CONTAINER_QUERY as Dr, STYLE_RULE as Fr, HASH as Mr, URL as zr } from "@projectwallace/css-parser";
17
- function qr(r, e) {
18
- z(r, function(t) {
19
- if (t.type === Bi) {
16
+ import { walk as G, SUPPORTS_QUERY as Wi, BREAK as Q, MEDIA_TYPE as Sr, MEDIA_FEATURE as Yi, str_equals as ge, DIMENSION as At, NUMBER as Cs, IDENTIFIER as _e, ATTRIBUTE_SELECTOR as Et, str_starts_with as Qi, PSEUDO_ELEMENT_SELECTOR as Qe, PSEUDO_CLASS_SELECTOR as Le, TYPE_SELECTOR as Ct, SELECTOR as ke, NTH_SELECTOR as Or, SKIP as D, COMBINATOR as _s, SELECTOR_LIST as ys, NTH_OF_SELECTOR as Nr, CLASS_SELECTOR as Lr, ID_SELECTOR as Ur, FUNCTION as bs, OPERATOR as Re, is_custom as Rs, is_vendor_prefixed as vs, parse as Ir, AT_RULE as Hr, BLOCK as Pr, DECLARATION as is, LAYER_NAME as Dr, CONTAINER_QUERY as Fr, STYLE_RULE as Mr, HASH as zr, URL as qr } from "@projectwallace/css-parser";
17
+ function Kr(r, e) {
18
+ G(r, function(t) {
19
+ if (t.type === Wi) {
20
20
  const i = (t.prelude || t.value || "").toString().toLowerCase().replaceAll(/\s+/g, "");
21
21
  if (i.includes("-webkit-appearance:none"))
22
22
  return e("-webkit-appearance: none"), Q;
@@ -25,16 +25,16 @@ function qr(r, e) {
25
25
  }
26
26
  });
27
27
  }
28
- function Kr(r, e) {
29
- z(r, function(t) {
30
- if (t.type === Tr) {
28
+ function $r(r, e) {
29
+ G(r, function(t) {
30
+ if (t.type === Sr) {
31
31
  const s = t.text || "";
32
32
  if (s.startsWith("\\0"))
33
33
  return e("\\0"), Q;
34
34
  if (s.includes("\\9"))
35
35
  return e("\\9"), Q;
36
36
  }
37
- if (t.type === Gi) {
37
+ if (t.type === Yi) {
38
38
  const s = t.name || "";
39
39
  if (ge("-moz-images-in-menus", s))
40
40
  return e("-moz-images-in-menus"), Q;
@@ -44,12 +44,12 @@ function Kr(r, e) {
44
44
  return e("-ms-high-contrast"), Q;
45
45
  if (ge("min-resolution", s) && t.has_children) {
46
46
  for (const i of t)
47
- if (i.type === kt && i.value === 1e-3 && ge("dpcm", i.unit || ""))
47
+ if (i.type === At && i.value === 1e-3 && ge("dpcm", i.unit || ""))
48
48
  return e("min-resolution: .001dpcm"), Q;
49
49
  }
50
50
  if (ge("-webkit-min-device-pixel-ratio", s) && t.has_children) {
51
51
  for (const i of t)
52
- if (i.type === xs && (i.value === 0 || i.value === 1e4))
52
+ if (i.type === Cs && (i.value === 0 || i.value === 1e4))
53
53
  return e("-webkit-min-device-pixel-ratio"), Q;
54
54
  }
55
55
  if (t.has_children) {
@@ -62,98 +62,88 @@ function Kr(r, e) {
62
62
  }
63
63
  class W {
64
64
  constructor(e) {
65
- m(this, "set");
65
+ k(this, "set");
66
66
  this.set = new Set(e);
67
67
  }
68
68
  has(e) {
69
69
  return this.set.has(e.toLowerCase());
70
70
  }
71
71
  }
72
- function Yi(r) {
72
+ function Vi(r) {
73
73
  return r.replaceAll(/(?:^['"])|(?:['"]$)/g, "");
74
74
  }
75
- function $r(r, e) {
75
+ function Br(r, e) {
76
76
  return e >= 65 && e <= 90 && (e = e | 32), r === e;
77
77
  }
78
- function os(r, e) {
78
+ function us(r, e) {
79
79
  if (r === e) return !0;
80
80
  let t = e.length, s = t - r.length;
81
81
  if (s < 0)
82
82
  return !1;
83
83
  for (let i = t - 1; i >= s; i--)
84
- if ($r(r.charCodeAt(i - s), e.charCodeAt(i)) === !1)
84
+ if (Br(r.charCodeAt(i - s), e.charCodeAt(i)) === !1)
85
85
  return !1;
86
86
  return !0;
87
87
  }
88
- const Br = new W(["nth-child", "where", "not", "is", "has", "nth-last-child", "matches", "-webkit-any", "-moz-any"]);
89
- function Gr(r, e) {
90
- z(r, function(t) {
91
- if ((t.type === Qe || t.type === Le || t.type === ms) && t.is_vendor_prefixed) {
88
+ const Gr = new W(["nth-child", "where", "not", "is", "has", "nth-last-child", "matches", "-webkit-any", "-moz-any"]);
89
+ function Wr(r, e) {
90
+ G(r, function(t) {
91
+ if ((t.type === Qe || t.type === Le || t.type === Ct) && t.is_vendor_prefixed) {
92
92
  let s = "";
93
93
  t.type === Le ? s = ":" : t.type === Qe && (s = "::"), e(s + (t.name || t.text));
94
94
  }
95
95
  });
96
96
  }
97
- function Wr(r, e) {
97
+ function Yr(r, e) {
98
98
  function t(s) {
99
99
  var n, l;
100
100
  let i = s.clone();
101
- return i.value ? "[" + ((n = i.name) == null ? void 0 : n.toLowerCase()) + i.attr_operator + '"' + Yi(i.value.toString()) + '"]' : "[" + ((l = i.name) == null ? void 0 : l.toLowerCase()) + "]";
101
+ return i.value ? "[" + ((n = i.name) == null ? void 0 : n.toLowerCase()) + i.attr_operator + '"' + Vi(i.value.toString()) + '"]' : "[" + ((l = i.name) == null ? void 0 : l.toLowerCase()) + "]";
102
102
  }
103
- z(r, function(s) {
104
- if (s.type === wt) {
103
+ G(r, function(s) {
104
+ if (s.type === Et) {
105
105
  const i = s.name || "";
106
- (ge("role", i) || Wi(i, "aria-")) && e(t(s));
106
+ (ge("role", i) || Qi(i, "aria-")) && e(t(s));
107
107
  }
108
108
  });
109
109
  }
110
- function Yr(r, e) {
111
- z(r, function(t) {
112
- t.type === Le && t.name && e(t.name);
113
- });
114
- }
115
- function Qr(r, e) {
116
- z(r, function(t) {
117
- t.type === Qe && t.name && e(t.name);
118
- });
119
- }
120
- function as(r) {
110
+ function fs(r) {
121
111
  let e = 0;
122
112
  function t(s, i) {
123
- z(s, function(n) {
124
- n.type === me && i.push(as(n));
113
+ G(s, function(n) {
114
+ n.type === ke && i.push(fs(n));
125
115
  });
126
116
  }
127
- return z(r, function(s) {
117
+ return G(r, function(s) {
128
118
  const i = s.type;
129
- if (i !== me) {
130
- if (i === Sr) {
119
+ if (i !== ke) {
120
+ if (i === Or) {
131
121
  s.text && s.text.trim() && e++;
132
122
  return;
133
123
  }
134
- if (e++, (i === Qe || i === ms || i === Le) && s.is_vendor_prefixed && e++, i === wt)
135
- return s.value && e++, P;
124
+ if (e++, (i === Qe || i === Ct || i === Le) && s.is_vendor_prefixed && e++, i === Et)
125
+ return s.value && e++, D;
136
126
  if (i === Le) {
137
127
  const n = s.name || "";
138
- if (Br.has(n.toLowerCase())) {
128
+ if (Gr.has(n.toLowerCase())) {
139
129
  const l = [];
140
130
  if (s.has_children)
141
131
  for (const a of s)
142
- a.type === me ? l.push(as(a)) : t(a, l);
132
+ a.type === ke ? l.push(fs(a)) : t(a, l);
143
133
  if (l.length > 0) {
144
134
  for (const a of l)
145
135
  e += a;
146
- return P;
136
+ return D;
147
137
  }
148
138
  }
149
139
  }
150
140
  }
151
141
  }), e;
152
142
  }
153
- function Vr(r, e) {
154
- z(r, function(t) {
143
+ function Qr(r, e) {
144
+ G(r, function(t) {
155
145
  var s;
156
- t.type === ls && e({
146
+ t.type === _s && e({
157
147
  name: ((s = t.name) == null ? void 0 : s.trim()) === "" ? " " : t.name,
158
148
  loc: {
159
149
  offset: t.start,
@@ -164,98 +154,106 @@ function Vr(r, e) {
164
154
  });
165
155
  });
166
156
  }
167
- let ys = 1, $ = 2, At = 4, ve = 8, ke = 16, y = new Uint8Array(128);
157
+ let yt = 1, K = 2, bt = 4, ve = 8, ie = 16, xe = 32, g = new Uint8Array(128);
168
158
  for (let r = 48; r <= 57; r++)
169
- y[r] = $;
159
+ g[r] = K;
170
160
  for (let r = 48; r <= 57; r++)
171
- y[r] |= At;
161
+ g[r] |= bt;
172
162
  for (let r = 65; r <= 70; r++)
173
- y[r] = At;
163
+ g[r] = bt;
174
164
  for (let r = 97; r <= 102; r++)
175
- y[r] = At;
165
+ g[r] = bt;
176
166
  for (let r = 65; r <= 90; r++)
177
- y[r] |= ys;
167
+ g[r] |= yt;
178
168
  for (let r = 97; r <= 122; r++)
179
- y[r] |= ys;
180
- y[32] = ve;
181
- y[9] = ve;
182
- y[10] = ke;
183
- y[13] = ke;
184
- y[12] = ke;
185
- function jr(r) {
186
- return r < 128 && (y[r] & $) !== 0;
187
- }
169
+ g[r] |= yt;
170
+ g[32] = ve;
171
+ g[9] = ve;
172
+ g[10] = ie;
173
+ g[13] = ie;
174
+ g[12] = ie;
175
+ for (let r = 0; r < 128; r++)
176
+ g[r] & (yt | K) && (g[r] |= xe);
177
+ g[45] |= xe;
178
+ g[95] |= xe;
188
179
  function pe(r) {
189
- return r < 128 && (y[r] & At) !== 0;
190
- }
191
- function Xr(r) {
192
- return r < 128 && (y[r] & ys) !== 0;
180
+ return r < 128 && (g[r] & bt) !== 0;
193
181
  }
194
- function bi(r) {
195
- return r < 128 && (y[r] & ve) !== 0;
182
+ function Vr(r) {
183
+ return r < 128 && (g[r] & yt) !== 0;
196
184
  }
197
- function ne(r) {
198
- return r < 128 && (y[r] & ke) !== 0;
199
- }
200
- function Ke(r) {
201
- return r >= 128 || r === 95 ? !0 : Xr(r);
185
+ function rs(r) {
186
+ return r < 128 && (g[r] & ve) !== 0;
202
187
  }
203
188
  function at(r) {
204
- return r === 45 ? !0 : Ke(r) || jr(r);
189
+ return r >= 128 || r === 95 ? !0 : Vr(r);
190
+ }
191
+ const ae = 1, ut = 2, jr = 3, ji = 4, Xi = 5, Oi = 6, me = 9, ft = 10, Zi = 11, Ji = 12, ps = 13, Xr = 14, Zr = 15, er = 16, Jr = 17, $e = 18, ds = 19, tr = 20, sr = 21, ir = 22, en = 23, tn = 24, gs = 26, Ni = 27;
192
+ function ye(r) {
193
+ return r < 128 && (g[r] & ie) !== 0;
205
194
  }
206
- const ae = 1, ct = 2, Zr = 3, Qi = 4, Vi = 5, Ri = 6, xe = 9, _t = 10, ji = 11, Xi = 12, hs = 13, Jr = 14, en = 15, Zi = 16, tn = 17, $e = 18, cs = 19, Ji = 20, er = 21, tr = 22, sn = 23, rn = 24, _s = 26, vi = 27, nn = 123, ln = 125, on = 58, an = 59, hn = 44, cn = 91, _n = 93, Ti = 40, un = 41, Si = 47, Oi = 42, fn = 34, pn = 39, es = 46, dn = 60, gn = 33, K = 45, xn = 62, mn = 64, kn = 35, ts = 92, Me = 43, wn = 37, An = 101, En = 69, yn = 117, Cn = 85, bn = 63, Ni = 13, Li = 10;
207
- class sr {
195
+ const sn = 123, rn = 125, nn = 58, ln = 59, on = 44, an = 91, hn = 93, Li = 40, cn = 41, ht = 47, ct = 42, _n = 34, un = 39, ns = 46, fn = 60, pn = 33, q = 45, dn = 62, gn = 64, xn = 35, ls = 92, Me = 43, mn = 37, kn = 101, wn = 69, An = 117, En = 85, Cn = 63, Ui = 13, Ii = 10;
196
+ class xs {
208
197
  constructor(e, t) {
209
- m(this, "source");
210
- m(this, "pos");
211
- m(this, "line");
212
- m(this, "column");
213
- m(this, "on_comment");
198
+ k(this, "source");
199
+ k(this, "pos");
200
+ k(this, "_line");
201
+ k(this, "_line_offset");
202
+ k(this, "on_comment");
214
203
  // Current token properties (avoiding object allocation)
215
- m(this, "token_type");
216
- m(this, "token_start");
217
- m(this, "token_end");
218
- m(this, "token_line");
219
- m(this, "token_column");
220
- this.source = e, this.pos = 0, this.line = 1, this.column = 1, this.on_comment = t, this.token_type = _s, this.token_start = 0, this.token_end = 0, this.token_line = 1, this.token_column = 1;
204
+ k(this, "token_type");
205
+ k(this, "token_start");
206
+ k(this, "token_end");
207
+ k(this, "token_line");
208
+ k(this, "token_column");
209
+ this.source = e, this.pos = 0, this._line = 1, this._line_offset = 0, this.on_comment = t, this.token_type = gs, this.token_start = 0, this.token_end = 0, this.token_line = 1, this.token_column = 1;
210
+ }
211
+ get line() {
212
+ return this._line;
213
+ }
214
+ get column() {
215
+ return this.pos - this._line_offset + 1;
216
+ }
217
+ seek(e, t, s = 1) {
218
+ this.pos = e, this._line = t, this._line_offset = e - s + 1;
221
219
  }
222
220
  // Fast token advancing without object allocation (for internal parser use)
223
221
  next_token_fast(e = !1) {
224
222
  if (e)
225
223
  for (; this.pos < this.source.length; ) {
226
224
  let l = this.source.charCodeAt(this.pos);
227
- if (l >= 128 || (y[l] & (ve | ke)) === 0) break;
225
+ if (l >= 128 || (g[l] & (ve | ie)) === 0) break;
228
226
  this.advance();
229
227
  }
230
228
  if (this.pos >= this.source.length)
231
- return this.make_token(_s, this.pos, this.pos);
229
+ return this.make_token(gs, this.pos, this.pos);
232
230
  let t = this.source.charCodeAt(this.pos), s = this.pos, i = this.line, n = this.column;
233
231
  switch (t) {
232
+ case sn:
233
+ return this.advance(), this.make_token(en, s, this.pos, i, n);
234
+ case rn:
235
+ return this.advance(), this.make_token(tn, s, this.pos, i, n);
234
236
  case nn:
235
- return this.advance(), this.make_token(sn, s, this.pos, i, n);
237
+ return this.advance(), this.make_token(er, s, this.pos, i, n);
236
238
  case ln:
237
- return this.advance(), this.make_token(rn, s, this.pos, i, n);
239
+ return this.advance(), this.make_token(Jr, s, this.pos, i, n);
238
240
  case on:
239
- return this.advance(), this.make_token(Zi, s, this.pos, i, n);
241
+ return this.advance(), this.make_token($e, s, this.pos, i, n);
240
242
  case an:
241
- return this.advance(), this.make_token(tn, s, this.pos, i, n);
243
+ return this.advance(), this.make_token(ds, s, this.pos, i, n);
242
244
  case hn:
243
- return this.advance(), this.make_token($e, s, this.pos, i, n);
244
- case cn:
245
- return this.advance(), this.make_token(cs, s, this.pos, i, n);
246
- case _n:
247
- return this.advance(), this.make_token(Ji, s, this.pos, i, n);
248
- case Ti:
249
- return this.advance(), this.make_token(er, s, this.pos, i, n);
250
- case un:
251
245
  return this.advance(), this.make_token(tr, s, this.pos, i, n);
246
+ case Li:
247
+ return this.advance(), this.make_token(sr, s, this.pos, i, n);
248
+ case cn:
249
+ return this.advance(), this.make_token(ir, s, this.pos, i, n);
252
250
  }
253
- if (t < 128 && (y[t] & (ve | ke)) !== 0)
251
+ if (t < 128 && (g[t] & (ve | ie)) !== 0)
254
252
  return this.consume_whitespace(i, n);
255
- if (t === Si && this.peek() === Oi) {
253
+ if (t === ht && this.peek() === ct) {
256
254
  let l = s, a = i, h = n;
257
255
  for (this.advance(2); this.pos < this.source.length - 1; ) {
258
- if (this.source.charCodeAt(this.pos) === Oi && this.peek() === Si) {
256
+ if (this.source.charCodeAt(this.pos) === ct && this.peek() === ht) {
259
257
  this.advance(2);
260
258
  break;
261
259
  }
@@ -270,74 +268,74 @@ class sr {
270
268
  column: h
271
269
  }), this.next_token_fast(e);
272
270
  }
273
- if (t === fn || t === pn)
271
+ if (t === _n || t === un)
274
272
  return this.consume_string(t, i, n);
275
- if (t < 128 && (y[t] & $) !== 0)
273
+ if (t < 128 && (g[t] & K) !== 0)
276
274
  return this.consume_number(i, n);
277
- if (t === es) {
275
+ if (t === ns) {
278
276
  let l = this.peek();
279
- if (l < 128 && (y[l] & $) !== 0)
277
+ if (l < 128 && (g[l] & K) !== 0)
280
278
  return this.consume_number(i, n);
281
279
  }
282
- if (t === dn && this.pos + 3 < this.source.length && this.peek() === gn && this.peek(2) === K && this.peek(3) === K)
283
- return this.advance(4), this.make_token(Jr, s, this.pos, i, n);
284
- if (t === K && this.pos + 2 < this.source.length && this.peek() === K && this.peek(2) === xn)
285
- return this.advance(3), this.make_token(en, s, this.pos, i, n);
286
- if (t === mn)
280
+ if (t === fn && this.pos + 3 < this.source.length && this.peek() === pn && this.peek(2) === q && this.peek(3) === q)
281
+ return this.advance(4), this.make_token(Xr, s, this.pos, i, n);
282
+ if (t === q && this.pos + 2 < this.source.length && this.peek() === q && this.peek(2) === dn)
283
+ return this.advance(3), this.make_token(Zr, s, this.pos, i, n);
284
+ if (t === gn)
287
285
  return this.consume_at_keyword(i, n);
288
- if (t === kn)
286
+ if (t === xn)
289
287
  return this.consume_hash(i, n);
290
- if (Ke(t))
288
+ if (at(t))
291
289
  return this.consume_ident_or_function(i, n);
292
- if (t === K) {
290
+ if (t === q) {
293
291
  let l = this.peek();
294
- if (Ke(l) || l === K)
292
+ if (at(l) || l === q)
295
293
  return this.consume_ident_or_function(i, n);
296
294
  }
297
- if (t === ts) {
295
+ if (t === ls) {
298
296
  let l = this.peek();
299
- if (l !== 0 && !ne(l))
297
+ if (l !== 0 && !ye(l))
300
298
  return this.consume_ident_or_function(i, n);
301
299
  }
302
- if (t === K || t === Me) {
300
+ if (t === q || t === Me) {
303
301
  let l = this.peek();
304
- if (l < 128 && (y[l] & $) !== 0)
302
+ if (l < 128 && (g[l] & K) !== 0)
305
303
  return this.consume_number(i, n);
306
- if (l === es) {
304
+ if (l === ns) {
307
305
  let h = this.peek(2);
308
- if (h < 128 && (y[h] & $) !== 0)
306
+ if (h < 128 && (g[h] & K) !== 0)
309
307
  return this.consume_number(i, n);
310
308
  }
311
309
  }
312
- return this.advance(), this.make_token(xe, s, this.pos, i, n);
310
+ return this.advance(), this.make_token(me, s, this.pos, i, n);
313
311
  }
314
312
  consume_whitespace(e, t) {
315
313
  let s = this.pos;
316
314
  for (; this.pos < this.source.length; ) {
317
315
  let i = this.source.charCodeAt(this.pos);
318
- if (i >= 128 || (y[i] & (ve | ke)) === 0) break;
316
+ if (i >= 128 || (g[i] & (ve | ie)) === 0) break;
319
317
  this.advance();
320
318
  }
321
- return this.make_token(hs, s, this.pos, e, t);
319
+ return this.make_token(ps, s, this.pos, e, t);
322
320
  }
323
321
  consume_string(e, t, s) {
324
322
  let i = this.pos;
325
323
  for (this.advance(); this.pos < this.source.length; ) {
326
324
  let n = this.source.charCodeAt(this.pos);
327
325
  if (n === e)
328
- return this.advance(), this.make_token(Vi, i, this.pos, t, s);
329
- if (ne(n))
330
- return this.make_token(Ri, i, this.pos, t, s);
331
- if (n === ts) {
326
+ return this.advance(), this.make_token(Xi, i, this.pos, t, s);
327
+ if (ye(n))
328
+ return this.make_token(Oi, i, this.pos, t, s);
329
+ if (n === ls) {
332
330
  if (this.advance(), this.pos < this.source.length) {
333
331
  let l = this.source.charCodeAt(this.pos);
334
- pe(l) ? this.consume_hex_escape() : ne(l) ? this.advance() : this.advance();
332
+ pe(l) ? this.consume_hex_escape() : ye(l) ? this.advance() : this.advance();
335
333
  }
336
334
  continue;
337
335
  }
338
336
  this.advance();
339
337
  }
340
- return this.make_token(Ri, i, this.pos, t, s);
338
+ return this.make_token(Oi, i, this.pos, t, s);
341
339
  }
342
340
  consume_hex_escape() {
343
341
  let e = 0;
@@ -348,37 +346,37 @@ class sr {
348
346
  }
349
347
  if (this.pos < this.source.length) {
350
348
  let t = this.source.charCodeAt(this.pos);
351
- (bi(t) || ne(t)) && this.advance();
349
+ (rs(t) || ye(t)) && this.advance();
352
350
  }
353
351
  }
354
352
  consume_number(e, t) {
355
353
  let s = this.pos, i = this.source.charCodeAt(this.pos);
356
- for ((i === Me || i === K) && this.advance(); this.pos < this.source.length; ) {
354
+ for ((i === Me || i === q) && this.advance(); this.pos < this.source.length; ) {
357
355
  let n = this.source.charCodeAt(this.pos);
358
- if (n >= 128 || (y[n] & $) === 0) break;
356
+ if (n >= 128 || (g[n] & K) === 0) break;
359
357
  this.advance();
360
358
  }
361
- if (this.pos < this.source.length && this.source.charCodeAt(this.pos) === es && this.pos + 1 < this.source.length) {
359
+ if (this.pos < this.source.length && this.source.charCodeAt(this.pos) === ns && this.pos + 1 < this.source.length) {
362
360
  let n = this.peek();
363
- if (n < 128 && (y[n] & $) !== 0)
361
+ if (n < 128 && (g[n] & K) !== 0)
364
362
  for (this.advance(); this.pos < this.source.length; ) {
365
363
  let l = this.source.charCodeAt(this.pos);
366
- if (l >= 128 || (y[l] & $) === 0) break;
364
+ if (l >= 128 || (g[l] & K) === 0) break;
367
365
  this.advance();
368
366
  }
369
367
  }
370
368
  if (this.pos < this.source.length) {
371
369
  let n = this.source.charCodeAt(this.pos);
372
- if (n === An || n === En) {
373
- let l = this.peek(), a = l < 128 && (y[l] & $) !== 0, h = this.peek(2), o = h < 128 && (y[h] & $) !== 0;
374
- if (a || (l === Me || l === K) && o) {
370
+ if (n === kn || n === wn) {
371
+ let l = this.peek(), a = l < 128 && (g[l] & K) !== 0, h = this.peek(2), o = h < 128 && (g[h] & K) !== 0;
372
+ if (a || (l === Me || l === q) && o) {
375
373
  if (this.advance(), this.pos < this.source.length) {
376
374
  let u = this.source.charCodeAt(this.pos);
377
- (u === Me || u === K) && this.advance();
375
+ (u === Me || u === q) && this.advance();
378
376
  }
379
377
  for (; this.pos < this.source.length; ) {
380
378
  let u = this.source.charCodeAt(this.pos);
381
- if (u >= 128 || (y[u] & $) === 0) break;
379
+ if (u >= 128 || (g[u] & K) === 0) break;
382
380
  this.advance();
383
381
  }
384
382
  }
@@ -386,45 +384,48 @@ class sr {
386
384
  }
387
385
  if (this.pos < this.source.length) {
388
386
  let n = this.source.charCodeAt(this.pos);
389
- if (n === wn)
390
- return this.advance(), this.make_token(ji, s, this.pos, e, t);
391
- if (Ke(n) || n === K && Ke(this.peek())) {
392
- for (; this.pos < this.source.length && at(this.source.charCodeAt(this.pos)); )
387
+ if (n === mn)
388
+ return this.advance(), this.make_token(Zi, s, this.pos, e, t);
389
+ if (at(n) || n === q && at(this.peek())) {
390
+ for (; this.pos < this.source.length; ) {
391
+ let l = this.source.charCodeAt(this.pos);
392
+ if (l < 128 && (g[l] & xe) === 0) break;
393
393
  this.advance();
394
- return this.make_token(Xi, s, this.pos, e, t);
394
+ }
395
+ return this.make_token(Ji, s, this.pos, e, t);
395
396
  }
396
397
  }
397
- return this.make_token(_t, s, this.pos, e, t);
398
+ return this.make_token(ft, s, this.pos, e, t);
398
399
  }
399
400
  consume_ident_or_function(e, t) {
400
401
  let s = this.pos;
401
402
  for (; this.pos < this.source.length; ) {
402
403
  let i = this.source.charCodeAt(this.pos);
403
- if (i === ts) {
404
+ if (i === ls) {
404
405
  if (this.pos + 1 >= this.source.length) break;
405
406
  let n = this.peek();
406
- if (ne(n)) break;
407
+ if (ye(n)) break;
407
408
  if (this.advance(), pe(n)) {
408
409
  this.advance();
409
410
  for (let l = 0; l < 5 && this.pos < this.source.length && pe(this.source.charCodeAt(this.pos)); l++)
410
411
  this.advance();
411
412
  if (this.pos < this.source.length) {
412
413
  let l = this.source.charCodeAt(this.pos);
413
- (bi(l) || ne(l)) && this.advance();
414
+ (rs(l) || ye(l)) && this.advance();
414
415
  }
415
416
  } else
416
417
  this.advance();
417
- } else if (at(i))
418
+ } else if (i >= 128 || (g[i] & xe) !== 0)
418
419
  this.advance();
419
420
  else
420
421
  break;
421
422
  }
422
423
  if (this.pos - s === 1) {
423
424
  let i = this.source.charCodeAt(s);
424
- if ((i === yn || i === Cn) && this.pos < this.source.length && this.source.charCodeAt(this.pos) === Me)
425
+ if ((i === An || i === En) && this.pos < this.source.length && this.source.charCodeAt(this.pos) === Me)
425
426
  return this.consume_unicode_range(s, e, t);
426
427
  }
427
- return this.pos < this.source.length && this.source.charCodeAt(this.pos) === Ti ? (this.advance(), this.make_token(ct, s, this.pos, e, t)) : this.make_token(ae, s, this.pos, e, t);
428
+ return this.pos < this.source.length && this.source.charCodeAt(this.pos) === Li ? (this.advance(), this.make_token(ut, s, this.pos, e, t)) : this.make_token(ae, s, this.pos, e, t);
428
429
  }
429
430
  consume_unicode_range(e, t, s) {
430
431
  this.advance();
@@ -435,14 +436,14 @@ class sr {
435
436
  if (n)
436
437
  break;
437
438
  this.advance(), i++;
438
- } else if (l === bn)
439
+ } else if (l === Cn)
439
440
  this.advance(), i++, n = !0;
440
441
  else
441
442
  break;
442
443
  }
443
444
  if (n)
444
- return this.make_token(vi, e, this.pos, t, s);
445
- if (this.pos < this.source.length && this.source.charCodeAt(this.pos) === K && this.pos + 1 < this.source.length && pe(this.source.charCodeAt(this.pos + 1))) {
445
+ return this.make_token(Ni, e, this.pos, t, s);
446
+ if (this.pos < this.source.length && this.source.charCodeAt(this.pos) === q && this.pos + 1 < this.source.length && pe(this.source.charCodeAt(this.pos + 1))) {
446
447
  this.advance();
447
448
  let l = 0;
448
449
  for (; this.pos < this.source.length && l < 6; ) {
@@ -453,30 +454,36 @@ class sr {
453
454
  break;
454
455
  }
455
456
  }
456
- return this.make_token(vi, e, this.pos, t, s);
457
+ return this.make_token(Ni, e, this.pos, t, s);
457
458
  }
458
459
  consume_at_keyword(e, t) {
459
460
  let s = this.pos;
460
- for (this.advance(); this.pos < this.source.length && at(this.source.charCodeAt(this.pos)); )
461
+ for (this.advance(); this.pos < this.source.length; ) {
462
+ let i = this.source.charCodeAt(this.pos);
463
+ if (i < 128 && (g[i] & xe) === 0) break;
461
464
  this.advance();
462
- return this.make_token(Zr, s, this.pos, e, t);
465
+ }
466
+ return this.make_token(jr, s, this.pos, e, t);
463
467
  }
464
468
  consume_hash(e, t) {
465
469
  let s = this.pos;
466
- for (this.advance(); this.pos < this.source.length && at(this.source.charCodeAt(this.pos)); )
470
+ for (this.advance(); this.pos < this.source.length; ) {
471
+ let i = this.source.charCodeAt(this.pos);
472
+ if (i < 128 && (g[i] & xe) === 0) break;
467
473
  this.advance();
468
- return this.make_token(Qi, s, this.pos, e, t);
474
+ }
475
+ return this.make_token(ji, s, this.pos, e, t);
469
476
  }
470
477
  advance(e = 1) {
471
478
  if (e === 1) {
472
479
  if (this.pos >= this.source.length) return;
473
480
  let t = this.source.charCodeAt(this.pos);
474
- this.pos++, ne(t) ? (t === Ni && this.pos < this.source.length && this.source.charCodeAt(this.pos) === Li && this.pos++, this.line++, this.column = 1) : this.column++;
481
+ this.pos++, t < 128 && (g[t] & ie) !== 0 && (t === Ui && this.pos < this.source.length && this.source.charCodeAt(this.pos) === Ii && this.pos++, this._line++, this._line_offset = this.pos);
475
482
  return;
476
483
  }
477
484
  for (let t = 0; t < e && !(this.pos >= this.source.length); t++) {
478
485
  let s = this.source.charCodeAt(this.pos);
479
- this.pos++, ne(s) ? (s === Ni && this.pos < this.source.length && this.source.charCodeAt(this.pos) === Li && (this.pos++, t++), this.line++, this.column = 1) : this.column++;
486
+ this.pos++, s < 128 && (g[s] & ie) !== 0 && (s === Ui && this.pos < this.source.length && this.source.charCodeAt(this.pos) === Ii && (this.pos++, t++), this._line++, this._line_offset = this.pos);
480
487
  }
481
488
  }
482
489
  peek(e = 1) {
@@ -503,8 +510,9 @@ class sr {
503
510
  save_position() {
504
511
  return {
505
512
  pos: this.pos,
506
- line: this.line,
513
+ line: this._line,
507
514
  column: this.column,
515
+ _line_offset: this._line_offset,
508
516
  token_type: this.token_type,
509
517
  token_start: this.token_start,
510
518
  token_end: this.token_end,
@@ -517,22 +525,46 @@ class sr {
517
525
  * @param saved The saved position to restore
518
526
  */
519
527
  restore_position(e) {
520
- this.pos = e.pos, this.line = e.line, this.column = e.column, this.token_type = e.token_type, this.token_start = e.token_start, this.token_end = e.token_end, this.token_line = e.token_line, this.token_column = e.token_column;
528
+ this.pos = e.pos, this._line = e.line, this._line_offset = e._line_offset, this.token_type = e.token_type, this.token_start = e.token_start, this.token_end = e.token_end, this.token_line = e.token_line, this.token_column = e.token_column;
529
+ }
530
+ /**
531
+ * Skip whitespace and comments within a range, maintaining line/column tracking
532
+ * @param end The end boundary (exclusive)
533
+ */
534
+ skip_whitespace_in_range(e) {
535
+ for (; this.pos < e; ) {
536
+ let t = this.source.charCodeAt(this.pos);
537
+ if (rs(t)) {
538
+ this.advance();
539
+ continue;
540
+ }
541
+ if (t === ht && this.pos + 1 < e && this.source.charCodeAt(this.pos + 1) === ct) {
542
+ for (this.advance(), this.advance(); this.pos < e; ) {
543
+ if (this.source.charCodeAt(this.pos) === ct && this.pos + 1 < e && this.source.charCodeAt(this.pos + 1) === ht) {
544
+ this.advance(), this.advance();
545
+ break;
546
+ }
547
+ this.advance();
548
+ }
549
+ continue;
550
+ }
551
+ break;
552
+ }
521
553
  }
522
554
  }
523
- let ht = 36;
524
- const Rn = 1, ut = 2, Be = 3, J = 4, Cs = 5, ir = 6, ft = 7, rr = 10, us = 11, Ge = 12, nr = 13, vn = 14, lr = 15, fs = 16, Tn = 17, or = 18, Sn = 19, Et = 20, ps = 21, ar = 22, hr = 23, We = 24, Te = 25, Ve = 26, pt = 27, ds = 28, cr = 29, Ye = 30, le = 31, _r = 56, On = 32, ur = 33, Nn = 34, Ln = 35, Un = 36, In = 37, Hn = 38, Pn = 39, fr = 40, Dn = 50, Fn = 1, Mn = 2, Ui = 4, zn = 8, qn = 32, pr = 64, Kn = 128, gs = 0, dr = 1, gr = 2, xr = 3, mr = 4, kr = 5, wr = 6, Ce = 0, Ar = 1, Er = 2, oe = class oe {
555
+ let _t = 36;
556
+ const yn = 1, pt = 2, Be = 3, J = 4, Ts = 5, rr = 6, dt = 7, nr = 10, ms = 11, Ge = 12, lr = 13, bn = 14, or = 15, ks = 16, Rn = 17, ar = 18, vn = 19, Rt = 20, ws = 21, hr = 22, cr = 23, We = 24, Te = 25, Ve = 26, gt = 27, As = 28, _r = 29, Ye = 30, le = 31, ur = 56, Tn = 32, fr = 33, Sn = 34, On = 35, Nn = 36, Ln = 37, Un = 38, In = 39, pr = 40, Hn = 50, Pn = 1, Dn = 2, Hi = 4, Fn = 8, Mn = 32, dr = 64, zn = 128, Es = 0, gr = 1, xr = 2, mr = 3, kr = 4, wr = 5, Ar = 6, be = 0, Er = 1, Cr = 2, oe = class oe {
525
557
  constructor(e = 1024) {
526
- m(this, "buffer");
527
- m(this, "view");
528
- m(this, "capacity");
558
+ k(this, "buffer");
559
+ k(this, "view");
560
+ k(this, "capacity");
529
561
  // Number of nodes that can fit
530
- m(this, "count");
562
+ k(this, "count");
531
563
  // Number of nodes currently allocated
532
- m(this, "growth_count");
564
+ k(this, "growth_count");
533
565
  // Number of times the arena has grown
534
- m(this, "overflow_lengths");
535
- this.capacity = e, this.count = 1, this.growth_count = 0, this.buffer = new ArrayBuffer(e * ht), this.view = new DataView(this.buffer), this.overflow_lengths = /* @__PURE__ */ new Map();
566
+ k(this, "overflow_lengths");
567
+ this.capacity = e, this.count = 1, this.growth_count = 0, this.buffer = new ArrayBuffer(e * _t), this.view = new DataView(this.buffer), this.overflow_lengths = /* @__PURE__ */ new Map();
536
568
  }
537
569
  // Calculate recommended initial capacity based on CSS source size
538
570
  static capacity_for_source(e) {
@@ -553,7 +585,7 @@ const Rn = 1, ut = 2, Be = 3, J = 4, Cs = 5, ir = 6, ft = 7, rr = 10, us = 11, G
553
585
  }
554
586
  // Calculate byte offset for a node
555
587
  node_offset(e) {
556
- return e * ht;
588
+ return e * _t;
557
589
  }
558
590
  // Read node type
559
591
  get_type(e) {
@@ -569,7 +601,7 @@ const Rn = 1, ut = 2, Be = 3, J = 4, Cs = 5, ir = 6, ft = 7, rr = 10, us = 11, G
569
601
  }
570
602
  // Read length in source
571
603
  get_length(e) {
572
- if (this.has_flag(e, Ui)) {
604
+ if (this.has_flag(e, Hi)) {
573
605
  const t = this.overflow_lengths.get(e);
574
606
  if (t !== void 0)
575
607
  return t;
@@ -629,7 +661,7 @@ const Rn = 1, ut = 2, Be = 3, J = 4, Cs = 5, ir = 6, ft = 7, rr = 10, us = 11, G
629
661
  }
630
662
  // Write length in source
631
663
  set_length(e, t) {
632
- t > 65535 ? (this.view.setUint16(this.node_offset(e) + 2, 65535, !0), this.set_flag(e, Ui), this.overflow_lengths.set(e, t)) : this.view.setUint16(this.node_offset(e) + 2, t, !0);
664
+ t > 65535 ? (this.view.setUint16(this.node_offset(e) + 2, 65535, !0), this.set_flag(e, Hi), this.overflow_lengths.set(e, t)) : this.view.setUint16(this.node_offset(e) + 2, t, !0);
633
665
  }
634
666
  // Write content start delta (offset from startOffset)
635
667
  set_content_start_delta(e, t) {
@@ -667,7 +699,7 @@ const Rn = 1, ut = 2, Be = 3, J = 4, Cs = 5, ir = 6, ft = 7, rr = 10, us = 11, G
667
699
  // Grow the arena by 1.3x when capacity is exceeded
668
700
  grow() {
669
701
  this.growth_count++;
670
- let e = Math.ceil(this.capacity * oe.GROWTH_FACTOR), t = new ArrayBuffer(e * ht);
702
+ let e = Math.ceil(this.capacity * oe.GROWTH_FACTOR), t = new ArrayBuffer(e * _t);
671
703
  new Uint8Array(t).set(new Uint8Array(this.buffer)), this.buffer = t, this.view = new DataView(t), this.capacity = e;
672
704
  }
673
705
  // Allocate and initialize a new node with core properties
@@ -676,7 +708,7 @@ const Rn = 1, ut = 2, Be = 3, J = 4, Cs = 5, ir = 6, ft = 7, rr = 10, us = 11, G
676
708
  this.count >= this.capacity && this.grow();
677
709
  const l = this.count;
678
710
  this.count++;
679
- const a = l * ht;
711
+ const a = l * _t;
680
712
  return this.view.setUint8(a, e), this.view.setUint32(a + 12, t, !0), this.view.setUint32(a + 24, i, !0), this.view.setUint32(a + 28, n, !0), this.set_length(l, s), l;
681
713
  }
682
714
  // --- Tree Building Helpers ---
@@ -715,20 +747,20 @@ const Rn = 1, ut = 2, Be = 3, J = 4, Cs = 5, ir = 6, ft = 7, rr = 10, us = 11, G
715
747
  };
716
748
  // Stores actual lengths for nodes > 65535 chars
717
749
  // Growth multiplier when capacity is exceeded
718
- m(oe, "GROWTH_FACTOR", 1.3), // Estimated nodes per KB of CSS (based on real-world data)
750
+ k(oe, "GROWTH_FACTOR", 1.3), // Estimated nodes per KB of CSS (based on real-world data)
719
751
  // Increased from 270 to 325 to account for VALUE wrapper nodes
720
752
  // (~20% of nodes are declarations, +1 VALUE node per declaration = +20% nodes)
721
- m(oe, "NODES_PER_KB", 325), // Buffer to avoid frequent growth (15%)
722
- m(oe, "CAPACITY_BUFFER", 1.2);
723
- let gt = oe;
724
- const $n = 32, Bn = 9, Gn = 10, Wn = 13, Yn = 12, Ue = 47, j = 42, M = 45, Qn = 39, Vn = 34, ie = 43, yr = 46, dt = 126, Cr = 62, jn = 38, de = 61, ze = 124, Ii = 36, Hi = 94, Xn = 58;
725
- function re(r) {
726
- return r === $n || r === Bn || r === Gn || r === Wn || r === Yn;
753
+ k(oe, "NODES_PER_KB", 325), // Buffer to avoid frequent growth (15%)
754
+ k(oe, "CAPACITY_BUFFER", 1.2);
755
+ let mt = oe;
756
+ const qn = 32, Kn = 9, $n = 10, Bn = 13, Gn = 12, Ue = 47, j = 42, M = 45, Wn = 39, Yn = 34, re = 43, yr = 46, xt = 126, br = 62, Qn = 38, de = 61, ze = 124, Pi = 36, Di = 94, Vn = 58;
757
+ function ne(r) {
758
+ return r === qn || r === Kn || r === $n || r === Bn || r === Gn;
727
759
  }
728
- function Zn(r) {
729
- return r === Cr || r === ie || r === dt;
760
+ function jn(r) {
761
+ return r === br || r === re || r === xt;
730
762
  }
731
- function ss(r) {
763
+ function os(r) {
732
764
  return r >= 48 && r <= 57;
733
765
  }
734
766
  function V(r, e) {
@@ -741,7 +773,7 @@ function V(r, e) {
741
773
  }
742
774
  return !0;
743
775
  }
744
- function Jn(r, e) {
776
+ function Xn(r, e) {
745
777
  if (r.length < e.length)
746
778
  return !1;
747
779
  for (let t = 0; t < e.length; t++) {
@@ -751,7 +783,7 @@ function Jn(r, e) {
751
783
  }
752
784
  return !0;
753
785
  }
754
- function el(r, e) {
786
+ function Zn(r, e) {
755
787
  if (e.length === 0)
756
788
  return -1;
757
789
  if (e.length === 1) {
@@ -785,15 +817,15 @@ function qe(r, e, t) {
785
817
  return !0;
786
818
  return !1;
787
819
  }
788
- function tl(r, e, t) {
789
- for (; e < t && re(r.charCodeAt(e)); )
820
+ function Jn(r, e, t) {
821
+ for (; e < t && ne(r.charCodeAt(e)); )
790
822
  e++;
791
823
  return e;
792
824
  }
793
- function be(r, e, t) {
825
+ function Ke(r, e, t) {
794
826
  for (; e < t; ) {
795
827
  let s = r.charCodeAt(e);
796
- if (re(s)) {
828
+ if (ne(s)) {
797
829
  e++;
798
830
  continue;
799
831
  }
@@ -811,10 +843,10 @@ function be(r, e, t) {
811
843
  }
812
844
  return e;
813
845
  }
814
- function sl(r, e, t) {
846
+ function el(r, e, t) {
815
847
  for (; e > t; ) {
816
848
  let s = r.charCodeAt(e - 1);
817
- if (re(s)) {
849
+ if (ne(s)) {
818
850
  e--;
819
851
  continue;
820
852
  }
@@ -832,20 +864,20 @@ function sl(r, e, t) {
832
864
  }
833
865
  return e;
834
866
  }
835
- function is(r) {
867
+ function as(r) {
836
868
  let e = 0;
837
869
  for (let n = 0; n < r.length; n++) {
838
870
  let l = r.charCodeAt(n);
839
871
  if (l === 101 || l === 69) {
840
872
  if (n + 1 < r.length) {
841
873
  let a = r.charCodeAt(n + 1);
842
- if (ss(a)) {
874
+ if (os(a)) {
843
875
  e = n + 1;
844
876
  continue;
845
877
  }
846
878
  if ((a === 43 || a === 45) && n + 2 < r.length) {
847
879
  let h = r.charCodeAt(n + 2);
848
- if (ss(h)) {
880
+ if (os(h)) {
849
881
  e = n + 1;
850
882
  continue;
851
883
  }
@@ -853,7 +885,7 @@ function is(r) {
853
885
  }
854
886
  break;
855
887
  }
856
- if (ss(l) || l === yr || l === M || l === ie)
888
+ if (os(l) || l === yr || l === M || l === re)
857
889
  e = n + 1;
858
890
  else
859
891
  break;
@@ -861,65 +893,65 @@ function is(r) {
861
893
  let t = r.substring(0, e), s = r.substring(e);
862
894
  return { value: t ? parseFloat(t) : 0, unit: s };
863
895
  }
864
- const il = {
865
- [Rn]: "StyleSheet",
866
- [ut]: "Rule",
896
+ const tl = {
897
+ [yn]: "StyleSheet",
898
+ [pt]: "Rule",
867
899
  [Be]: "Atrule",
868
900
  [J]: "Declaration",
869
- [Cs]: "Selector",
870
- [ir]: "Comment",
871
- [ft]: "Block",
872
- [rr]: "Identifier",
873
- [us]: "Number",
901
+ [Ts]: "Selector",
902
+ [rr]: "Comment",
903
+ [dt]: "Block",
904
+ [nr]: "Identifier",
905
+ [ms]: "Number",
874
906
  [Ge]: "Dimension",
875
- [nr]: "String",
876
- [vn]: "Hash",
877
- [lr]: "Function",
878
- [fs]: "Operator",
879
- [Tn]: "Parentheses",
880
- [or]: "Url",
881
- [Sn]: "UnicodeRange",
882
- [Dn]: "Value",
883
- [Et]: "SelectorList",
884
- [ps]: "TypeSelector",
885
- [ar]: "ClassSelector",
886
- [hr]: "IdSelector",
907
+ [lr]: "String",
908
+ [bn]: "Hash",
909
+ [or]: "Function",
910
+ [ks]: "Operator",
911
+ [Rn]: "Parentheses",
912
+ [ar]: "Url",
913
+ [vn]: "UnicodeRange",
914
+ [Hn]: "Value",
915
+ [Rt]: "SelectorList",
916
+ [ws]: "TypeSelector",
917
+ [hr]: "ClassSelector",
918
+ [cr]: "IdSelector",
887
919
  [We]: "AttributeSelector",
888
920
  [Te]: "PseudoClassSelector",
889
921
  [Ve]: "PseudoElementSelector",
890
- [pt]: "Combinator",
891
- [ds]: "UniversalSelector",
892
- [cr]: "NestingSelector",
922
+ [gt]: "Combinator",
923
+ [As]: "UniversalSelector",
924
+ [_r]: "NestingSelector",
893
925
  [Ye]: "Nth",
894
926
  [le]: "NthOf",
895
- [_r]: "Lang",
896
- [On]: "MediaQuery",
897
- [ur]: "Feature",
898
- [Nn]: "MediaType",
899
- [Ln]: "ContainerQuery",
900
- [Un]: "SupportsQuery",
901
- [In]: "Layer",
902
- [Hn]: "Operator",
903
- [Pn]: "MediaFeatureRange",
904
- [fr]: "AtrulePrelude"
905
- }, rl = {
906
- [gs]: null,
907
- [dr]: "=",
908
- [gr]: "~=",
909
- [xr]: "|=",
910
- [mr]: "^=",
911
- [kr]: "$=",
912
- [wr]: "*="
913
- }, nl = {
914
- [Ce]: null,
915
- [Ar]: "i",
916
- [Er]: "s"
927
+ [ur]: "Lang",
928
+ [Tn]: "MediaQuery",
929
+ [fr]: "Feature",
930
+ [Sn]: "MediaType",
931
+ [On]: "ContainerQuery",
932
+ [Nn]: "SupportsQuery",
933
+ [Ln]: "Layer",
934
+ [Un]: "Operator",
935
+ [In]: "MediaFeatureRange",
936
+ [pr]: "AtrulePrelude"
937
+ }, sl = {
938
+ [Es]: null,
939
+ [gr]: "=",
940
+ [xr]: "~=",
941
+ [mr]: "|=",
942
+ [kr]: "^=",
943
+ [wr]: "$=",
944
+ [Ar]: "*="
945
+ }, il = {
946
+ [be]: null,
947
+ [Er]: "i",
948
+ [Cr]: "s"
917
949
  };
918
950
  class je {
919
951
  constructor(e, t, s) {
920
- m(this, "arena");
921
- m(this, "source");
922
- m(this, "index");
952
+ k(this, "arena");
953
+ k(this, "source");
954
+ k(this, "index");
923
955
  this.arena = e, this.source = t, this.index = s;
924
956
  }
925
957
  /**
@@ -939,7 +971,7 @@ class je {
939
971
  }
940
972
  /** Get node type as human-readable string */
941
973
  get type_name() {
942
- return il[this.type] || "unknown";
974
+ return tl[this.type] || "unknown";
943
975
  }
944
976
  /** Get the full text of this node from source */
945
977
  get text() {
@@ -949,7 +981,7 @@ class je {
949
981
  /** Get the "content" text (at-rule name for at-rules, layer name for import layers) */
950
982
  get name() {
951
983
  let { type: e } = this;
952
- if (!(e === J || e === fs || e === Cs))
984
+ if (!(e === J || e === ks || e === Ts))
953
985
  return this.get_content();
954
986
  }
955
987
  /**
@@ -958,7 +990,7 @@ class je {
958
990
  */
959
991
  get property() {
960
992
  let { type: e } = this;
961
- if (!(e !== J && e !== ur))
993
+ if (!(e !== J && e !== fr))
962
994
  return this.get_content();
963
995
  }
964
996
  /**
@@ -973,20 +1005,20 @@ class je {
973
1005
  if (e === J && s)
974
1006
  return s;
975
1007
  if (e === Ge)
976
- return is(t).value;
977
- if (e === us)
1008
+ return as(t).value;
1009
+ if (e === ms)
978
1010
  return Number.parseFloat(t);
979
- if (e === or) {
980
- if ((s == null ? void 0 : s.type) === nr)
1011
+ if (e === ar) {
1012
+ if ((s == null ? void 0 : s.type) === lr)
981
1013
  return s.text;
982
- if (Jn(t, "url(")) {
1014
+ if (Xn(t, "url(")) {
983
1015
  let l = t.indexOf("("), a = t.lastIndexOf(")");
984
1016
  if (l !== -1 && a !== -1 && a > l)
985
1017
  return t.substring(l + 1, a).trim();
986
1018
  } else if (t.startsWith('"') || t.startsWith("'"))
987
1019
  return t;
988
1020
  }
989
- if (e === fs)
1021
+ if (e === ks)
990
1022
  return this.get_content();
991
1023
  let i = this.arena.get_value_start(this.index), n = this.arena.get_value_length(this.index);
992
1024
  return n === 0 ? null : this.source.substring(i, i + n);
@@ -994,7 +1026,7 @@ class je {
994
1026
  /** Get the numeric value for NUMBER and DIMENSION nodes, or null for other node types */
995
1027
  get value_as_number() {
996
1028
  let { text: e, type: t } = this;
997
- return t === us ? Number.parseFloat(e) : t === Ge ? is(e).value : null;
1029
+ return t === ms ? Number.parseFloat(e) : t === Ge ? as(e).value : null;
998
1030
  }
999
1031
  /**
1000
1032
  * Get the prelude node:
@@ -1005,9 +1037,9 @@ class je {
1005
1037
  get prelude() {
1006
1038
  if (this.type === Be) {
1007
1039
  let e = this.first_child;
1008
- return e && e.type === fr ? e : null;
1040
+ return e && e.type === pr ? e : null;
1009
1041
  }
1010
- if (this.type === ut)
1042
+ if (this.type === pt)
1011
1043
  return this.first_child;
1012
1044
  }
1013
1045
  /**
@@ -1029,17 +1061,17 @@ class je {
1029
1061
  /** Get the unit for dimension nodes (e.g., "px" from "100px", "%" from "50%") */
1030
1062
  get unit() {
1031
1063
  if (this.type === Ge)
1032
- return is(this.text).unit;
1064
+ return as(this.text).unit;
1033
1065
  }
1034
1066
  /** Check if this declaration has !important */
1035
1067
  get is_important() {
1036
1068
  if (this.type === J)
1037
- return this.arena.has_flag(this.index, Fn);
1069
+ return this.arena.has_flag(this.index, Pn);
1038
1070
  }
1039
1071
  /** Check if this declaration has a browser hack prefix */
1040
1072
  get is_browserhack() {
1041
1073
  if (this.type === J)
1042
- return this.arena.has_flag(this.index, Kn);
1074
+ return this.arena.has_flag(this.index, zn);
1043
1075
  }
1044
1076
  /** Check if this has a vendor prefix (computed on-demand) */
1045
1077
  get is_vendor_prefixed() {
@@ -1051,9 +1083,9 @@ class je {
1051
1083
  return qe(this.get_content());
1052
1084
  case Be:
1053
1085
  return qe(this.get_content());
1054
- case lr:
1086
+ case or:
1055
1087
  return qe(this.get_content());
1056
- case rr:
1088
+ case nr:
1057
1089
  return qe(this.text);
1058
1090
  default:
1059
1091
  return !1;
@@ -1061,34 +1093,34 @@ class je {
1061
1093
  }
1062
1094
  /** Check if this node has an error */
1063
1095
  get has_error() {
1064
- return this.arena.has_flag(this.index, Mn);
1096
+ return this.arena.has_flag(this.index, Dn);
1065
1097
  }
1066
1098
  /** Check if this node has a prelude (at-rules and style rules) */
1067
1099
  get has_prelude() {
1068
1100
  let { type: e } = this;
1069
- return e === Be ? this.arena.get_value_length(this.index) > 0 : e === ut ? this.first_child !== null : !1;
1101
+ return e === Be ? this.arena.get_value_length(this.index) > 0 : e === pt ? this.first_child !== null : !1;
1070
1102
  }
1071
1103
  /** Check if this rule has a block { } */
1072
1104
  get has_block() {
1073
- return this.arena.has_flag(this.index, zn);
1105
+ return this.arena.has_flag(this.index, Fn);
1074
1106
  }
1075
1107
  /** Check if this style rule has declarations */
1076
1108
  get has_declarations() {
1077
- return this.arena.has_flag(this.index, qn);
1109
+ return this.arena.has_flag(this.index, Mn);
1078
1110
  }
1079
1111
  /** Get the block node (for style rules and at-rules with blocks) */
1080
1112
  get block() {
1081
1113
  let { type: e } = this;
1082
- if (e === ut) {
1114
+ if (e === pt) {
1083
1115
  let t = this.first_child;
1084
1116
  if (!t) return null;
1085
1117
  let s = t.next_sibling;
1086
- return (s == null ? void 0 : s.type) === ft ? s : null;
1118
+ return (s == null ? void 0 : s.type) === dt ? s : null;
1087
1119
  }
1088
1120
  if (e === Be) {
1089
1121
  let t = this.first_child;
1090
1122
  for (; t; ) {
1091
- if (t.type === ft && !t.next_sibling)
1123
+ if (t.type === dt && !t.next_sibling)
1092
1124
  return t;
1093
1125
  t = t.next_sibling;
1094
1126
  }
@@ -1098,10 +1130,10 @@ class je {
1098
1130
  }
1099
1131
  /** Check if this block is empty (no declarations or rules, only comments allowed) */
1100
1132
  get is_empty() {
1101
- if (this.type !== ft) return;
1133
+ if (this.type !== dt) return;
1102
1134
  let e = this.first_child;
1103
1135
  for (; e; ) {
1104
- if (e.type !== ir)
1136
+ if (e.type !== rr)
1105
1137
  return !1;
1106
1138
  e = e.next_sibling;
1107
1139
  }
@@ -1152,7 +1184,7 @@ class je {
1152
1184
  */
1153
1185
  get has_children() {
1154
1186
  let { type: e } = this;
1155
- return (e === Te || e === Ve) && this.arena.has_flag(this.index, pr) ? !0 : this.arena.has_children(this.index);
1187
+ return (e === Te || e === Ve) && this.arena.has_flag(this.index, dr) ? !0 : this.arena.has_children(this.index);
1156
1188
  }
1157
1189
  /** Get all children as an array */
1158
1190
  get children() {
@@ -1186,11 +1218,11 @@ class je {
1186
1218
  let l = t.get_value_start(s), a = i.substring(l, l + n), h = l - 1;
1187
1219
  for (; h >= 0; ) {
1188
1220
  let o = i.charCodeAt(h);
1189
- if (re(o)) {
1221
+ if (ne(o)) {
1190
1222
  h--;
1191
1223
  continue;
1192
1224
  }
1193
- o === M ? a = "-" + a : o === ie && (a = "+" + a);
1225
+ o === M ? a = "-" + a : o === re && (a = "+" + a);
1194
1226
  break;
1195
1227
  }
1196
1228
  return a;
@@ -1216,7 +1248,7 @@ class je {
1216
1248
  if (this.type !== Te) return;
1217
1249
  let e = this.first_child;
1218
1250
  if (e) {
1219
- if (e.type === Et)
1251
+ if (e.type === Rt)
1220
1252
  return e;
1221
1253
  if (e.type === le)
1222
1254
  return e.selector;
@@ -1243,7 +1275,7 @@ class je {
1243
1275
  d && (o.is_important = !0), f && (o.is_browserhack = !0);
1244
1276
  }
1245
1277
  let { is_vendor_prefixed: u, has_error: p } = this;
1246
- if (u && (o.is_vendor_prefixed = !0), p && (o.has_error = !0), i === We && (o.attr_operator = rl[this.attr_operator], o.attr_flags = nl[this.attr_flags]), (i === Ye || i === le) && (o.nth_a = this.nth_a, o.nth_b = this.nth_b), s && (o.line = this.line, o.column = this.column, o.start = this.start, o.length = this.length, o.end = this.end), t && i !== J) {
1278
+ if (u && (o.is_vendor_prefixed = !0), p && (o.has_error = !0), i === We && (o.attr_operator = sl[this.attr_operator], o.attr_flags = il[this.attr_flags]), (i === Ye || i === le) && (o.nth_a = this.nth_a, o.nth_b = this.nth_b), s && (o.line = this.line, o.column = this.column, o.start = this.start, o.length = this.length, o.end = this.end), t && i !== J) {
1247
1279
  o.children = [];
1248
1280
  for (let d of this.children)
1249
1281
  o.children.push(d.clone({ deep: !0, locations: s }));
@@ -1251,20 +1283,20 @@ class je {
1251
1283
  return o;
1252
1284
  }
1253
1285
  }
1254
- class Pi {
1286
+ class Fi {
1255
1287
  constructor(e, t) {
1256
- m(this, "lexer");
1257
- m(this, "arena");
1258
- m(this, "source");
1259
- m(this, "expr_end");
1260
- this.arena = e, this.source = t, this.lexer = new sr(t), this.expr_end = 0;
1288
+ k(this, "lexer");
1289
+ k(this, "arena");
1290
+ k(this, "source");
1291
+ k(this, "expr_end");
1292
+ this.arena = e, this.source = t, this.lexer = new xs(t), this.expr_end = 0;
1261
1293
  }
1262
1294
  /**
1263
1295
  * Parse An+B expression
1264
1296
  * Examples: odd, even, 3, n, -n, 2n, 2n+1, -3n-5
1265
1297
  */
1266
1298
  parse_anplusb(e, t, s = 1) {
1267
- this.expr_end = t, this.lexer.pos = e, this.lexer.line = s;
1299
+ this.expr_end = t, this.lexer.seek(e, s);
1268
1300
  let i = null, n = e, l = e, a = e, h = e;
1269
1301
  const o = e;
1270
1302
  if (this.skip_whitespace(), this.lexer.pos >= this.expr_end)
@@ -1276,14 +1308,14 @@ class Pi {
1276
1308
  const p = this.source.charCodeAt(this.lexer.token_start), d = this.lexer.token_end > this.lexer.token_start + 1 ? this.source.charCodeAt(this.lexer.token_start + 1) : 0;
1277
1309
  return p === M && d === 110 ? this.lexer.token_end > this.lexer.token_start + 2 && this.source.charCodeAt(this.lexer.token_start + 2) === M ? (n = this.lexer.token_start, l = this.lexer.token_start + 2, i = this.source.substring(this.lexer.token_start + 2, this.lexer.token_end), a = this.lexer.token_start + 2, h = this.lexer.token_end, this.create_anplusb_node(o, n, l, a, h)) : (n = this.lexer.token_start, l = this.lexer.token_start + 2, i = this.parse_b_part(), i !== null && (a = this.lexer.token_start, h = this.lexer.token_end), this.create_anplusb_node(o, n, l, i !== null ? a : 0, i !== null ? h : 0)) : p === 110 ? this.lexer.token_end > this.lexer.token_start + 1 && this.source.charCodeAt(this.lexer.token_start + 1) === M ? (n = this.lexer.token_start, l = this.lexer.token_start + 1, i = this.source.substring(this.lexer.token_start + 1, this.lexer.token_end), a = this.lexer.token_start + 1, h = this.lexer.token_end, this.create_anplusb_node(o, n, l, a, h)) : (n = this.lexer.token_start, l = this.lexer.token_start + 1, i = this.parse_b_part(), i !== null && (a = this.lexer.token_start, h = this.lexer.token_end), this.create_anplusb_node(o, n, l, i !== null ? a : 0, i !== null ? h : 0)) : null;
1278
1310
  }
1279
- if (this.lexer.token_type === xe && this.source.charCodeAt(this.lexer.token_start) === ie) {
1311
+ if (this.lexer.token_type === me && this.source.charCodeAt(this.lexer.token_start) === re) {
1280
1312
  const u = this.lexer.save_position();
1281
1313
  if (this.lexer.next_token_fast(!0), this.lexer.token_type === ae && this.source.substring(this.lexer.token_start, this.lexer.token_end).charCodeAt(0) === 110)
1282
1314
  return n = u.pos - 1, l = this.lexer.token_start + 1, this.lexer.token_end > this.lexer.token_start + 1 && this.source.charCodeAt(this.lexer.token_start + 1) === M ? (i = this.source.substring(this.lexer.token_start + 1, this.lexer.token_end), a = this.lexer.token_start + 1, h = this.lexer.token_end, this.create_anplusb_node(o, n, l, a, h)) : (i = this.parse_b_part(), i !== null && (a = this.lexer.token_start, h = this.lexer.token_end), this.create_anplusb_node(o, n, l, i !== null ? a : 0, i !== null ? h : 0));
1283
1315
  this.lexer.restore_position(u);
1284
1316
  }
1285
- if (this.lexer.token_type === Xi) {
1286
- const u = this.source.substring(this.lexer.token_start, this.lexer.token_end), p = el(u, "n");
1317
+ if (this.lexer.token_type === Ji) {
1318
+ const u = this.source.substring(this.lexer.token_start, this.lexer.token_end), p = Zn(u, "n");
1287
1319
  if (p !== -1) {
1288
1320
  if (n = this.lexer.token_start, l = this.lexer.token_start + p + 1, p + 1 < u.length) {
1289
1321
  const d = u.substring(p + 1);
@@ -1293,7 +1325,7 @@ class Pi {
1293
1325
  return i = this.parse_b_part(), i !== null && (a = this.lexer.token_start, h = this.lexer.token_end), this.create_anplusb_node(o, n, l, a, h);
1294
1326
  }
1295
1327
  }
1296
- return this.lexer.token_type === _t ? (i = this.source.substring(this.lexer.token_start, this.lexer.token_end), a = this.lexer.token_start, h = this.lexer.token_end, this.create_anplusb_node(o, 0, 0, a, h)) : null;
1328
+ return this.lexer.token_type === ft ? (i = this.source.substring(this.lexer.token_start, this.lexer.token_end), a = this.lexer.token_start, h = this.lexer.token_end, this.create_anplusb_node(o, 0, 0, a, h)) : null;
1297
1329
  }
1298
1330
  /**
1299
1331
  * Parse the b part after 'n'
@@ -1302,44 +1334,44 @@ class Pi {
1302
1334
  parse_b_part() {
1303
1335
  if (this.skip_whitespace(), this.lexer.pos >= this.expr_end)
1304
1336
  return null;
1305
- if (this.lexer.next_token_fast(!0), this.lexer.token_type === xe) {
1337
+ if (this.lexer.next_token_fast(!0), this.lexer.token_type === me) {
1306
1338
  const e = this.source.charCodeAt(this.lexer.token_start);
1307
- if (e === ie || e === M) {
1339
+ if (e === re || e === M) {
1308
1340
  const t = e === M ? "-" : "";
1309
- if (this.skip_whitespace(), this.lexer.next_token_fast(!0), this.lexer.token_type === _t) {
1341
+ if (this.skip_whitespace(), this.lexer.next_token_fast(!0), this.lexer.token_type === ft) {
1310
1342
  let s = this.source.substring(this.lexer.token_start, this.lexer.token_end);
1311
- return s.charCodeAt(0) === ie && (s = s.substring(1)), t === "-" ? t + s : s;
1343
+ return s.charCodeAt(0) === re && (s = s.substring(1)), t === "-" ? t + s : s;
1312
1344
  }
1313
1345
  }
1314
1346
  }
1315
- if (this.lexer.token_type === _t) {
1347
+ if (this.lexer.token_type === ft) {
1316
1348
  let e = this.source.substring(this.lexer.token_start, this.lexer.token_end);
1317
1349
  const t = e.charCodeAt(0);
1318
- if (t === ie || t === M)
1319
- return t === ie && (e = e.substring(1)), e;
1350
+ if (t === re || t === M)
1351
+ return t === re && (e = e.substring(1)), e;
1320
1352
  }
1321
1353
  return null;
1322
1354
  }
1323
1355
  skip_whitespace() {
1324
- this.lexer.pos = be(this.source, this.lexer.pos, this.expr_end);
1356
+ this.lexer.skip_whitespace_in_range(this.expr_end);
1325
1357
  }
1326
1358
  create_anplusb_node(e, t, s, i, n) {
1327
1359
  const l = this.arena.create_node(Ye, e, this.lexer.pos - e, this.lexer.line, 1);
1328
1360
  return s > t && (this.arena.set_content_start_delta(l, t - e), this.arena.set_content_length(l, s - t)), n > i && (this.arena.set_value_start_delta(l, i - e), this.arena.set_value_length(l, n - i)), l;
1329
1361
  }
1330
1362
  }
1331
- class ll {
1363
+ class rl {
1332
1364
  constructor(e, t) {
1333
- m(this, "lexer");
1334
- m(this, "arena");
1335
- m(this, "source");
1336
- m(this, "selector_end");
1337
- this.arena = e, this.source = t, this.lexer = new sr(t), this.selector_end = 0;
1365
+ k(this, "lexer");
1366
+ k(this, "arena");
1367
+ k(this, "source");
1368
+ k(this, "selector_end");
1369
+ this.arena = e, this.source = t, this.lexer = new xs(t), this.selector_end = 0;
1338
1370
  }
1339
1371
  // Parse a selector range into selector nodes (standalone use)
1340
1372
  // Always returns a NODE_SELECTOR_LIST with selector components as children
1341
1373
  parse_selector(e, t, s = 1, i = 1, n = !0) {
1342
- return this.selector_end = t, this.lexer.pos = e, this.lexer.line = s, this.lexer.column = i, this.parse_selector_list(n);
1374
+ return this.selector_end = t, this.lexer.seek(e, s, i), this.parse_selector_list(n);
1343
1375
  }
1344
1376
  // Parse comma-separated selectors
1345
1377
  parse_selector_list(e = !0) {
@@ -1348,7 +1380,7 @@ class ll {
1348
1380
  let l = this.lexer.pos, a = this.lexer.line, h = this.lexer.column, o = this.parse_complex_selector(e);
1349
1381
  if (o !== null) {
1350
1382
  let p = this.arena.create_node(
1351
- Cs,
1383
+ Ts,
1352
1384
  l,
1353
1385
  this.lexer.pos - l,
1354
1386
  a,
@@ -1368,7 +1400,7 @@ class ll {
1368
1400
  break;
1369
1401
  }
1370
1402
  if (t.length >= 1) {
1371
- let l = this.arena.create_node(Et, s, this.lexer.pos - s, i, n);
1403
+ let l = this.arena.create_node(Rt, s, this.lexer.pos - s, i, n);
1372
1404
  return this.arena.append_children(l, t), l;
1373
1405
  }
1374
1406
  return null;
@@ -1380,11 +1412,11 @@ class ll {
1380
1412
  let t = [];
1381
1413
  if (this.skip_whitespace(), e && this.lexer.pos < this.selector_end) {
1382
1414
  const s = this.lexer.save_position();
1383
- if (this.lexer.next_token_fast(!1), this.lexer.token_type === xe) {
1415
+ if (this.lexer.next_token_fast(!1), this.lexer.token_type === me) {
1384
1416
  let n = this.source.charCodeAt(this.lexer.token_start);
1385
- if (n === Cr || n === ie || n === dt) {
1417
+ if (n === br || n === re || n === xt) {
1386
1418
  let l = this.create_node_at(
1387
- pt,
1419
+ gt,
1388
1420
  this.lexer.token_start,
1389
1421
  this.lexer.token_end,
1390
1422
  this.lexer.token_line,
@@ -1434,7 +1466,7 @@ class ll {
1434
1466
  let e = [];
1435
1467
  for (; this.lexer.pos < this.selector_end; ) {
1436
1468
  const t = this.lexer.save_position();
1437
- if (this.lexer.next_token_fast(!1), this.lexer.token_start >= this.selector_end || this.lexer.token_type === _s) break;
1469
+ if (this.lexer.next_token_fast(!1), this.lexer.token_start >= this.selector_end || this.lexer.token_type === gs) break;
1438
1470
  let i = this.parse_simple_selector();
1439
1471
  if (i !== null)
1440
1472
  e.push(i);
@@ -1454,20 +1486,20 @@ class ll {
1454
1486
  switch (e) {
1455
1487
  case ae:
1456
1488
  return this.parse_type_or_namespace_selector(t, s);
1457
- case Qi:
1458
- return this.create_node(hr, t, s);
1459
- case xe:
1489
+ case ji:
1490
+ return this.create_node(cr, t, s);
1491
+ case me:
1460
1492
  let i = this.source.charCodeAt(t);
1461
- return i === yr ? this.parse_class_selector(t) : i === j ? this.parse_universal_or_namespace_selector(t, s) : i === jn ? this.create_node(cr, t, s) : i === ze ? this.parse_empty_namespace_selector(t) : null;
1462
- case cs:
1493
+ return i === yr ? this.parse_class_selector(t) : i === j ? this.parse_universal_or_namespace_selector(t, s) : i === Qn ? this.create_node(_r, t, s) : i === ze ? this.parse_empty_namespace_selector(t) : null;
1494
+ case ds:
1463
1495
  return this.parse_attribute_selector(t);
1464
- case Zi:
1496
+ case er:
1465
1497
  return this.parse_pseudo(t);
1466
- case ct:
1498
+ case ut:
1467
1499
  return this.parse_pseudo_function(t, s);
1468
- case ji:
1500
+ case Zi:
1469
1501
  return this.create_node(Ge, t, s);
1470
- case hs:
1502
+ case ps:
1471
1503
  case $e:
1472
1504
  return null;
1473
1505
  default:
@@ -1481,9 +1513,9 @@ class ll {
1481
1513
  this.lexer.next_token_fast(!1);
1482
1514
  let n;
1483
1515
  if (this.lexer.token_type === ae)
1484
- n = ps;
1485
- else if (this.lexer.token_type === xe && this.source.charCodeAt(this.lexer.token_start) === j)
1486
- n = ds;
1516
+ n = ws;
1517
+ else if (this.lexer.token_type === me && this.source.charCodeAt(this.lexer.token_start) === j)
1518
+ n = As;
1487
1519
  else
1488
1520
  return this.lexer.restore_position(i), null;
1489
1521
  let l = this.create_node(n, e, this.lexer.token_end);
@@ -1497,10 +1529,10 @@ class ll {
1497
1529
  this.lexer.pos++;
1498
1530
  let i = this.parse_namespace_local_part(e, e, t - e);
1499
1531
  if (i !== null) return i;
1500
- this.lexer.pos = t;
1532
+ this.lexer.restore_position(s);
1501
1533
  } else
1502
1534
  this.lexer.restore_position(s);
1503
- return this.create_node(ps, e, t);
1535
+ return this.create_node(ws, e, t);
1504
1536
  }
1505
1537
  // Parse universal selector or namespace selector (*|E or *|*)
1506
1538
  // Called when we've seen a * DELIM token
@@ -1510,10 +1542,10 @@ class ll {
1510
1542
  this.lexer.pos++;
1511
1543
  let i = this.parse_namespace_local_part(e, e, t - e);
1512
1544
  if (i !== null) return i;
1513
- this.lexer.pos = t;
1545
+ this.lexer.restore_position(s);
1514
1546
  } else
1515
1547
  this.lexer.restore_position(s);
1516
- return this.create_node(ds, e, t);
1548
+ return this.create_node(As, e, t);
1517
1549
  }
1518
1550
  // Parse empty namespace selector (|E or |*)
1519
1551
  // Called when we've seen a | DELIM token at the start
@@ -1522,20 +1554,21 @@ class ll {
1522
1554
  }
1523
1555
  // Parse combinator (>, +, ~, or descendant space)
1524
1556
  try_parse_combinator() {
1525
- let e = this.lexer.pos, t = this.lexer.line, s = this.lexer.column, i = this.lexer.pos < this.selector_end;
1526
- if (this.skip_whitespace(), i = i && this.lexer.pos > e, this.lexer.pos >= this.selector_end)
1527
- return this.lexer.pos = e, this.lexer.line = t, this.lexer.column = s, null;
1528
- if (this.lexer.next_token_fast(!1), this.lexer.token_type === xe) {
1529
- let n = this.source.charCodeAt(this.lexer.token_start);
1530
- if (Zn(n))
1531
- return this.create_node_at(pt, this.lexer.token_start, this.lexer.token_end, this.lexer.token_line, this.lexer.token_column);
1557
+ const e = this.lexer.save_position();
1558
+ let t = this.lexer.pos < this.selector_end;
1559
+ if (this.skip_whitespace(), t = t && this.lexer.pos > e.pos, this.lexer.pos >= this.selector_end)
1560
+ return this.lexer.restore_position(e), null;
1561
+ if (this.lexer.next_token_fast(!1), this.lexer.token_type === me) {
1562
+ let s = this.source.charCodeAt(this.lexer.token_start);
1563
+ if (jn(s))
1564
+ return this.create_node_at(gt, this.lexer.token_start, this.lexer.token_end, this.lexer.token_line, this.lexer.token_column);
1532
1565
  }
1533
- return i ? (this.lexer.pos = e, this.lexer.line = t, this.lexer.column = s, this.skip_whitespace(), this.create_node_at(pt, e, this.lexer.pos, t, s)) : (this.lexer.pos = e, this.lexer.line = t, this.lexer.column = s, null);
1566
+ return t ? (this.lexer.restore_position(e), this.skip_whitespace(), this.create_node_at(gt, e.pos, this.lexer.pos, e.line, e.column)) : (this.lexer.restore_position(e), null);
1534
1567
  }
1535
1568
  // Parse class selector (.classname)
1536
1569
  parse_class_selector(e) {
1537
1570
  const t = this.lexer.save_position();
1538
- return this.lexer.next_token_fast(!1), this.lexer.token_type !== ae ? (this.lexer.restore_position(t), null) : this.create_node(ar, e, this.lexer.token_end);
1571
+ return this.lexer.next_token_fast(!1), this.lexer.token_type !== ae ? (this.lexer.restore_position(t), null) : this.create_node(hr, e, this.lexer.token_end);
1539
1572
  }
1540
1573
  // Parse attribute selector ([attr], [attr=value], etc.)
1541
1574
  parse_attribute_selector(e) {
@@ -1543,9 +1576,9 @@ class ll {
1543
1576
  for (; this.lexer.pos < this.selector_end && t > 0; ) {
1544
1577
  this.lexer.next_token_fast(!1);
1545
1578
  let a = this.lexer.token_type;
1546
- if (a === cs)
1579
+ if (a === ds)
1547
1580
  t++;
1548
- else if (a === Ji && (t--, t === 0)) {
1581
+ else if (a === tr && (t--, t === 0)) {
1549
1582
  n = this.lexer.token_start, s = this.lexer.token_end;
1550
1583
  break;
1551
1584
  }
@@ -1555,80 +1588,80 @@ class ll {
1555
1588
  }
1556
1589
  // Parse attribute content to extract name, operator, and value
1557
1590
  parse_attribute_content(e, t, s) {
1558
- if (t = be(this.source, t, s), s = sl(this.source, s, t), t >= s) return;
1591
+ if (t = Ke(this.source, t, s), s = el(this.source, s, t), t >= s) return;
1559
1592
  let i = t, n = t, l = -1, a = -1, h = -1;
1560
1593
  for (; n < s; ) {
1561
1594
  let f = this.source.charCodeAt(n);
1562
- if (re(f) || f === de || f === dt || f === ze || f === Hi || f === Ii || f === j)
1595
+ if (ne(f) || f === de || f === xt || f === ze || f === Di || f === Pi || f === j)
1563
1596
  break;
1564
1597
  n++;
1565
1598
  }
1566
1599
  n > i && (this.arena.set_content_start_delta(e, i - this.arena.get_start_offset(e)), this.arena.set_content_length(e, n - i));
1567
- let o = be(this.source, n, s);
1600
+ let o = Ke(this.source, n, s);
1568
1601
  if (o >= s) {
1569
- this.arena.set_attr_operator(e, gs), this.arena.set_attr_flags(e, Ce);
1602
+ this.arena.set_attr_operator(e, Es), this.arena.set_attr_flags(e, be);
1570
1603
  return;
1571
1604
  }
1572
1605
  let u = this.source.charCodeAt(o), p = o + 1 < s ? this.source.charCodeAt(o + 1) : 0;
1573
1606
  if (u === de)
1574
- l = o + 1, this.arena.set_attr_operator(e, dr);
1575
- else if (u === dt && p === de)
1576
- l = o + 2, this.arena.set_attr_operator(e, gr);
1577
- else if (u === ze && p === de)
1607
+ l = o + 1, this.arena.set_attr_operator(e, gr);
1608
+ else if (u === xt && p === de)
1578
1609
  l = o + 2, this.arena.set_attr_operator(e, xr);
1579
- else if (u === Hi && p === de)
1610
+ else if (u === ze && p === de)
1580
1611
  l = o + 2, this.arena.set_attr_operator(e, mr);
1581
- else if (u === Ii && p === de)
1612
+ else if (u === Di && p === de)
1582
1613
  l = o + 2, this.arena.set_attr_operator(e, kr);
1583
- else if (u === j && p === de)
1614
+ else if (u === Pi && p === de)
1584
1615
  l = o + 2, this.arena.set_attr_operator(e, wr);
1616
+ else if (u === j && p === de)
1617
+ l = o + 2, this.arena.set_attr_operator(e, Ar);
1585
1618
  else {
1586
- this.arena.set_attr_operator(e, gs), this.arena.set_attr_flags(e, Ce);
1619
+ this.arena.set_attr_operator(e, Es), this.arena.set_attr_flags(e, be);
1587
1620
  return;
1588
1621
  }
1589
- if (o = be(this.source, l, s), o >= s) {
1590
- this.arena.set_attr_flags(e, Ce);
1622
+ if (o = Ke(this.source, l, s), o >= s) {
1623
+ this.arena.set_attr_flags(e, be);
1591
1624
  return;
1592
1625
  }
1593
1626
  a = o;
1594
1627
  let d = this.source.charCodeAt(o);
1595
- if (d === Qn || d === Vn) {
1628
+ if (d === Wn || d === Yn) {
1596
1629
  let f = d;
1597
1630
  for (a = o, o++; o < s; ) {
1598
- let L = this.source.charCodeAt(o);
1599
- if (L === f) {
1631
+ let U = this.source.charCodeAt(o);
1632
+ if (U === f) {
1600
1633
  o++;
1601
1634
  break;
1602
1635
  }
1603
- L === 92 ? o += 2 : o++;
1636
+ U === 92 ? o += 2 : o++;
1604
1637
  }
1605
1638
  h = o;
1606
1639
  } else {
1607
1640
  for (; o < s; ) {
1608
1641
  let f = this.source.charCodeAt(o);
1609
- if (re(f))
1642
+ if (ne(f))
1610
1643
  break;
1611
1644
  o++;
1612
1645
  }
1613
1646
  h = o;
1614
1647
  }
1615
- if (h > a && (this.arena.set_value_start_delta(e, a - this.arena.get_start_offset(e)), this.arena.set_value_length(e, h - a)), o = be(this.source, h, s), o < s) {
1648
+ if (h > a && (this.arena.set_value_start_delta(e, a - this.arena.get_start_offset(e)), this.arena.set_value_length(e, h - a)), o = Ke(this.source, h, s), o < s) {
1616
1649
  let f = this.source.charCodeAt(o);
1617
- f === 105 || f === 73 ? this.arena.set_attr_flags(e, Ar) : f === 115 || f === 83 ? this.arena.set_attr_flags(e, Er) : this.arena.set_attr_flags(e, Ce);
1650
+ f === 105 || f === 73 ? this.arena.set_attr_flags(e, Er) : f === 115 || f === 83 ? this.arena.set_attr_flags(e, Cr) : this.arena.set_attr_flags(e, be);
1618
1651
  } else
1619
- this.arena.set_attr_flags(e, Ce);
1652
+ this.arena.set_attr_flags(e, be);
1620
1653
  }
1621
1654
  // Parse pseudo-class or pseudo-element (:hover, ::before)
1622
1655
  parse_pseudo(e) {
1623
1656
  const t = this.lexer.save_position(), s = this.lexer.save_position();
1624
1657
  this.skip_whitespace();
1625
1658
  let i = !1;
1626
- this.lexer.pos < this.selector_end && this.source.charCodeAt(this.lexer.pos) === Xn ? (i = !0, this.lexer.pos++) : this.lexer.restore_position(s), this.lexer.next_token_fast(!1);
1659
+ this.lexer.pos < this.selector_end && this.source.charCodeAt(this.lexer.pos) === Vn ? (i = !0, this.lexer.pos++) : this.lexer.restore_position(s), this.lexer.next_token_fast(!1);
1627
1660
  let n = this.lexer.token_type;
1628
1661
  if (n === ae) {
1629
1662
  let l = this.create_node(i ? Ve : Te, e, this.lexer.token_end);
1630
1663
  return this.arena.set_content_start_delta(l, this.lexer.token_start - e), this.arena.set_content_length(l, this.lexer.token_end - this.lexer.token_start), l;
1631
- } else if (n === ct)
1664
+ } else if (n === ut)
1632
1665
  return this.parse_pseudo_function_after_colon(e, i);
1633
1666
  return this.lexer.restore_position(t), null;
1634
1667
  }
@@ -1642,15 +1675,15 @@ class ll {
1642
1675
  for (; this.lexer.pos < this.selector_end && a > 0; ) {
1643
1676
  this.lexer.next_token_fast(!1);
1644
1677
  let u = this.lexer.token_type;
1645
- if (u === er || u === ct)
1678
+ if (u === sr || u === ut)
1646
1679
  a++;
1647
- else if (u === tr && (a--, a === 0)) {
1680
+ else if (u === ir && (a--, a === 0)) {
1648
1681
  l = this.lexer.token_start, h = this.lexer.token_end;
1649
1682
  break;
1650
1683
  }
1651
1684
  }
1652
1685
  let o = this.create_node(t ? Ve : Te, e, h);
1653
- if (this.arena.set_content_start_delta(o, s - e), this.arena.set_content_length(o, i - s), this.arena.set_flag(o, pr), l > n) {
1686
+ if (this.arena.set_content_start_delta(o, s - e), this.arena.set_content_length(o, i - s), this.arena.set_flag(o, dr), l > n) {
1654
1687
  let u = this.source.substring(s, i);
1655
1688
  if (this.is_nth_pseudo(u)) {
1656
1689
  let p = this.parse_nth_expression(n, l);
@@ -1660,8 +1693,8 @@ class ll {
1660
1693
  else {
1661
1694
  let p = this.selector_end;
1662
1695
  const d = this.lexer.save_position();
1663
- let f = V("has", u), L = this.parse_selector(n, l, this.lexer.line, this.lexer.column, f);
1664
- this.selector_end = p, this.lexer.restore_position(d), L !== null && this.arena.set_first_child(o, L);
1696
+ let f = V("has", u), U = this.parse_selector(n, l, this.lexer.line, this.lexer.column, f);
1697
+ this.selector_end = p, this.lexer.restore_position(d), U !== null && this.arena.set_first_child(o, U);
1665
1698
  }
1666
1699
  }
1667
1700
  return o;
@@ -1673,31 +1706,32 @@ class ll {
1673
1706
  // Parse :lang() content - comma-separated language identifiers
1674
1707
  // Accepts both quoted strings: :lang("en", "fr") and unquoted: :lang(en, fr)
1675
1708
  parse_lang_identifiers(e, t, s) {
1676
- let i = this.selector_end;
1677
- const n = this.lexer.save_position();
1678
- this.lexer.pos = e, this.selector_end = t;
1679
- let l = null, a = null;
1709
+ let i = new xs(this.source);
1710
+ i.seek(e, this.lexer.line, this.lexer.column);
1711
+ let n = this.selector_end, l = this.lexer;
1712
+ this.lexer = i, this.selector_end = t;
1713
+ let a = null, h = null;
1680
1714
  for (; this.lexer.pos < t; ) {
1681
1715
  this.lexer.next_token_fast(!1);
1682
- let h = this.lexer.token_type, o = this.lexer.token_start, u = this.lexer.token_end;
1683
- if (h !== hs && h !== $e) {
1684
- if (h === Vi || h === ae) {
1685
- let p = this.create_node(_r, o, u);
1686
- l === null && (l = p), a !== null && this.arena.set_next_sibling(a, p), a = p;
1716
+ let o = this.lexer.token_type, u = this.lexer.token_start, p = this.lexer.token_end;
1717
+ if (o !== ps && o !== $e) {
1718
+ if (o === Xi || o === ae) {
1719
+ let d = this.create_node(ur, u, p);
1720
+ a === null && (a = d), h !== null && this.arena.set_next_sibling(h, d), h = d;
1687
1721
  }
1688
1722
  if (this.lexer.pos >= t)
1689
1723
  break;
1690
1724
  }
1691
1725
  }
1692
- l !== null && this.arena.set_first_child(s, l), this.selector_end = i, this.lexer.restore_position(n);
1726
+ a !== null && this.arena.set_first_child(s, a), this.selector_end = n, this.lexer = l;
1693
1727
  }
1694
1728
  // Parse An+B expression for nth-* pseudo-classes
1695
1729
  // Handles both simple An+B and "An+B of S" syntax
1696
1730
  parse_nth_expression(e, t) {
1697
1731
  let s = this.find_of_keyword(e, t);
1698
1732
  if (s !== -1) {
1699
- let n = new Pi(this.arena, this.source).parse_anplusb(e, s, this.lexer.line), l = s + 2;
1700
- l = tl(this.source, l, t);
1733
+ let n = new Fi(this.arena, this.source).parse_anplusb(e, s, this.lexer.line), l = s + 2;
1734
+ l = Jn(this.source, l, t);
1701
1735
  let a = this.selector_end;
1702
1736
  const h = this.lexer.save_position();
1703
1737
  this.selector_end = t, this.lexer.pos = l;
@@ -1706,15 +1740,15 @@ class ll {
1706
1740
  let u = this.arena.create_node(le, e, t - e, this.lexer.line, 1);
1707
1741
  return n !== null && o !== null ? (this.arena.set_first_child(u, n), this.arena.set_next_sibling(n, o)) : n !== null && this.arena.set_first_child(u, n), u;
1708
1742
  } else
1709
- return new Pi(this.arena, this.source).parse_anplusb(e, t, this.lexer.line);
1743
+ return new Fi(this.arena, this.source).parse_anplusb(e, t, this.lexer.line);
1710
1744
  }
1711
1745
  // Find the position of standalone "of" keyword (case-insensitive)
1712
1746
  find_of_keyword(e, t) {
1713
1747
  let s = e;
1714
- for (; s < t - 1 && (s = be(this.source, s, t), !(s >= t - 1)); ) {
1748
+ for (; s < t - 1 && (s = Ke(this.source, s, t), !(s >= t - 1)); ) {
1715
1749
  let i = this.source.charCodeAt(s), n = this.source.charCodeAt(s + 1);
1716
1750
  if ((i === 111 || i === 79) && (n === 102 || n === 70)) {
1717
- let l = s === e || re(this.source.charCodeAt(s - 1)), a = s + 2 >= t || re(this.source.charCodeAt(s + 2));
1751
+ let l = s === e || ne(this.source.charCodeAt(s - 1)), a = s + 2 >= t || ne(this.source.charCodeAt(s + 2));
1718
1752
  if (l && a)
1719
1753
  return s;
1720
1754
  }
@@ -1734,7 +1768,7 @@ class ll {
1734
1768
  skip_whitespace() {
1735
1769
  for (; this.lexer.pos < this.selector_end; ) {
1736
1770
  let e = this.source.charCodeAt(this.lexer.pos);
1737
- if (re(e)) {
1771
+ if (ne(e)) {
1738
1772
  this.lexer.advance();
1739
1773
  continue;
1740
1774
  }
@@ -1752,30 +1786,30 @@ class ll {
1752
1786
  }
1753
1787
  }
1754
1788
  }
1755
- function ol(r) {
1756
- const e = new gt(gt.capacity_for_source(r.length)), s = new ll(e, r).parse_selector(0, r.length);
1789
+ function nl(r) {
1790
+ const e = new mt(mt.capacity_for_source(r.length)), s = new rl(e, r).parse_selector(0, r.length);
1757
1791
  if (s === null) {
1758
- const i = e.create_node(Et, 0, 0, 1, 1);
1792
+ const i = e.create_node(Rt, 0, 0, 1, 1);
1759
1793
  return new je(e, r, i);
1760
1794
  }
1761
1795
  return new je(e, r, s);
1762
1796
  }
1763
- function al(r, e) {
1797
+ function ll(r, e) {
1764
1798
  return r[0] === e[0] ? r[1] === e[1] ? r[2] - e[2] : r[1] - e[1] : r[0] - e[0];
1765
1799
  }
1766
- function Di(r) {
1767
- return r.sort(al).at(-1);
1800
+ function Mi(r) {
1801
+ return r.sort(ll).at(-1);
1768
1802
  }
1769
- const xt = (r) => {
1803
+ const kt = (r) => {
1770
1804
  var n, l, a, h, o;
1771
1805
  let e = 0, t = 0, s = 0, i = r.first_child;
1772
1806
  for (; i; ) {
1773
1807
  switch (i.type) {
1774
- case Lr:
1808
+ case Ur:
1775
1809
  e += 1;
1776
1810
  break;
1777
- case wt:
1778
- case Nr:
1811
+ case Et:
1812
+ case Lr:
1779
1813
  t += 1;
1780
1814
  break;
1781
1815
  case Le:
@@ -1795,9 +1829,9 @@ const xt = (r) => {
1795
1829
  case "has":
1796
1830
  if (i.has_children) {
1797
1831
  const f = i.first_child;
1798
- if ((f == null ? void 0 : f.type) === ks) {
1799
- const L = Di(Fi(f));
1800
- e += L[0], t += L[1], s += L[2];
1832
+ if ((f == null ? void 0 : f.type) === ys) {
1833
+ const U = Mi(zi(f));
1834
+ e += U[0], t += U[1], s += U[2];
1801
1835
  }
1802
1836
  }
1803
1837
  break;
@@ -1806,8 +1840,8 @@ const xt = (r) => {
1806
1840
  case "nth-last-child":
1807
1841
  t += 1;
1808
1842
  const p = i.first_child;
1809
- if ((p == null ? void 0 : p.type) === Or && p.selector) {
1810
- const f = Di(Fi(p.selector));
1843
+ if ((p == null ? void 0 : p.type) === Nr && p.selector) {
1844
+ const f = Mi(zi(p.selector));
1811
1845
  e += f[0], t += f[1], s += f[2];
1812
1846
  }
1813
1847
  break;
@@ -1817,13 +1851,13 @@ const xt = (r) => {
1817
1851
  case "host":
1818
1852
  t += 1;
1819
1853
  const d = (l = i.first_child) == null ? void 0 : l.first_child;
1820
- if ((d == null ? void 0 : d.type) === me) {
1854
+ if ((d == null ? void 0 : d.type) === ke) {
1821
1855
  let f = d.first_child;
1822
- for (; f && f.type !== ls; ) {
1823
- const L = xt({
1856
+ for (; f && f.type !== _s; ) {
1857
+ const U = kt({
1824
1858
  first_child: f
1825
1859
  });
1826
- e += L[0] ?? 0, t += L[1] ?? 0, s += L[2] ?? 0, f = f.next_sibling;
1860
+ e += U[0] ?? 0, t += U[1] ?? 0, s += U[2] ?? 0, f = f.next_sibling;
1827
1861
  }
1828
1862
  }
1829
1863
  break;
@@ -1846,10 +1880,10 @@ const xt = (r) => {
1846
1880
  case "slotted":
1847
1881
  s += 1;
1848
1882
  const p = (h = i.first_child) == null ? void 0 : h.first_child;
1849
- if ((p == null ? void 0 : p.type) === me) {
1883
+ if ((p == null ? void 0 : p.type) === ke) {
1850
1884
  let d = p.first_child;
1851
- for (; d && d.type !== ls; ) {
1852
- const f = xt({
1885
+ for (; d && d.type !== _s; ) {
1886
+ const f = kt({
1853
1887
  first_child: d
1854
1888
  });
1855
1889
  e += f[0] ?? 0, t += f[1] ?? 0, s += f[2] ?? 0, d = d.next_sibling;
@@ -1869,7 +1903,7 @@ const xt = (r) => {
1869
1903
  break;
1870
1904
  }
1871
1905
  break;
1872
- case ms:
1906
+ case Ct:
1873
1907
  let u = i.name ?? "";
1874
1908
  u.includes("|") && (u = u.split("|")[1] ?? ""), u !== "*" && (s += 1);
1875
1909
  break;
@@ -1877,29 +1911,29 @@ const xt = (r) => {
1877
1911
  i = i.next_sibling;
1878
1912
  }
1879
1913
  return [e, t, s];
1880
- }, hl = (r) => {
1914
+ }, ol = (r) => {
1881
1915
  if (typeof r == "string")
1882
1916
  try {
1883
- return ol(r);
1917
+ return nl(r);
1884
1918
  } catch (e) {
1885
1919
  const t = e instanceof Error ? e.message : String(e);
1886
1920
  throw new TypeError(`Could not convert passed in source '${r}' to SelectorList: ${t}`);
1887
1921
  }
1888
1922
  if (r instanceof Object) {
1889
- if (r.type === ks)
1923
+ if (r.type === ys)
1890
1924
  return r;
1891
1925
  throw new TypeError("Passed in source is an Object but no AST / AST of the type SelectorList");
1892
1926
  }
1893
1927
  throw new TypeError("Passed in source is not a String nor an Object. I don't know what to do with it.");
1894
- }, Fi = (r) => {
1928
+ }, zi = (r) => {
1895
1929
  if (!r)
1896
1930
  return [];
1897
- const e = hl(r), t = [];
1931
+ const e = ol(r), t = [];
1898
1932
  let s = e.first_child;
1899
1933
  for (; s; )
1900
- t.push(xt(s)), s = s.next_sibling;
1934
+ t.push(kt(s)), s = s.next_sibling;
1901
1935
  return t;
1902
- }, cl = new W([
1936
+ }, al = new W([
1903
1937
  // CSS Named Colors
1904
1938
  // Spec: https://drafts.csswg.org/css-color/#named-colors
1905
1939
  // Heuristic: popular names first for quick finding in set.has()
@@ -2052,7 +2086,7 @@ const xt = (r) => {
2052
2086
  "mediumorchid",
2053
2087
  "darksalmon",
2054
2088
  "mediumspringgreen"
2055
- ]), _l = new W([
2089
+ ]), hl = new W([
2056
2090
  // CSS System Colors
2057
2091
  // Spec: https://drafts.csswg.org/css-color/#css-system-colors
2058
2092
  "accentcolor",
@@ -2074,7 +2108,7 @@ const xt = (r) => {
2074
2108
  "selecteditem",
2075
2109
  "selecteditemtext",
2076
2110
  "visitedtext"
2077
- ]), ul = new W(["rgba", "rgb", "hsla", "hsl", "oklch", "color", "hwb", "lch", "lab", "oklab"]), fl = new W(["transparent", "currentcolor"]), mt = new W([
2111
+ ]), cl = new W(["rgba", "rgb", "hsla", "hsl", "oklch", "color", "hwb", "lch", "lab", "oklab"]), _l = new W(["transparent", "currentcolor"]), wt = new W([
2078
2112
  "auto",
2079
2113
  "none",
2080
2114
  // for `text-shadow`, `box-shadow` and `background`
@@ -2084,13 +2118,13 @@ const xt = (r) => {
2084
2118
  "revert",
2085
2119
  "revert-layer"
2086
2120
  ]);
2087
- function pl(r) {
2121
+ function ul(r) {
2088
2122
  for (let e of r.children)
2089
- if (!(e.type === xs && e.value === 0) && !(e.type === kt && e.value === 0))
2123
+ if (!(e.type === Cs && e.value === 0) && !(e.type === At && e.value === 0))
2090
2124
  return !1;
2091
2125
  return !0;
2092
2126
  }
2093
- const rs = new W(["caption", "icon", "menu", "message-box", "small-caption", "status-bar"]), dl = new W([
2127
+ const hs = new W(["caption", "icon", "menu", "message-box", "small-caption", "status-bar"]), fl = new W([
2094
2128
  /* <absolute-size> values */
2095
2129
  "xx-small",
2096
2130
  "x-small",
@@ -2103,27 +2137,27 @@ const rs = new W(["caption", "icon", "menu", "message-box", "small-caption", "st
2103
2137
  /* <relative-size> values */
2104
2138
  "smaller",
2105
2139
  "larger"
2106
- ]), gl = 44, Mi = 47;
2107
- function xl(r, e) {
2140
+ ]), pl = 44, qi = 47;
2141
+ function dl(r, e) {
2108
2142
  var a;
2109
2143
  let t = [void 0, void 0], s, i;
2110
- if (r.first_child.type === ws && ((a = r.first_child.name) == null ? void 0 : a.toLowerCase()) === "var")
2144
+ if (r.first_child.type === bs && ((a = r.first_child.name) == null ? void 0 : a.toLowerCase()) === "var")
2111
2145
  return null;
2112
2146
  let n;
2113
2147
  for (let h of r.children) {
2114
2148
  let o = h.next_sibling;
2115
- if (h.type === _e && mt.has(h.name) && e({
2149
+ if (h.type === _e && wt.has(h.name) && e({
2116
2150
  type: "keyword",
2117
2151
  value: h.name
2118
- }), o && o.type === Re && o.text.charCodeAt(0) === Mi) {
2152
+ }), o && o.type === Re && o.text.charCodeAt(0) === qi) {
2119
2153
  s = h.text, n = h;
2120
2154
  continue;
2121
2155
  }
2122
- if ((n == null ? void 0 : n.type) === Re && n.text.charCodeAt(0) === Mi) {
2156
+ if ((n == null ? void 0 : n.type) === Re && n.text.charCodeAt(0) === qi) {
2123
2157
  i = h.text, n = h;
2124
2158
  continue;
2125
2159
  }
2126
- if ((o == null ? void 0 : o.type) === Re && o.text.charCodeAt(0) === gl && !t[0]) {
2160
+ if ((o == null ? void 0 : o.type) === Re && o.text.charCodeAt(0) === pl && !t[0]) {
2127
2161
  t[0] = h, !s && n && (s = n.text), n = h;
2128
2162
  continue;
2129
2163
  }
@@ -2131,13 +2165,13 @@ function xl(r, e) {
2131
2165
  t[1] = h, !s && !t[0] && n && (s = n.text), n = h;
2132
2166
  continue;
2133
2167
  }
2134
- if (h.type === xs) {
2168
+ if (h.type === Cs) {
2135
2169
  n = h;
2136
2170
  continue;
2137
2171
  }
2138
2172
  if (h.type === _e) {
2139
2173
  let u = h.name;
2140
- if (u && dl.has(u)) {
2174
+ if (u && fl.has(u)) {
2141
2175
  s = u, n = h;
2142
2176
  continue;
2143
2177
  }
@@ -2156,28 +2190,28 @@ function xl(r, e) {
2156
2190
  font_family: l
2157
2191
  };
2158
2192
  }
2159
- const ml = new W(["linear", "ease", "ease-in", "ease-out", "ease-in-out", "step-start", "step-end"]), kl = new W(["cubic-bezier", "steps"]);
2160
- function wl(r, e) {
2193
+ const gl = new W(["linear", "ease", "ease-in", "ease-out", "ease-in-out", "step-start", "step-end"]), xl = new W(["cubic-bezier", "steps"]);
2194
+ function ml(r, e) {
2161
2195
  let t = !1;
2162
2196
  for (let s of r) {
2163
2197
  let i = s.type, n = s.name;
2164
- i === Re ? t = !1 : i === kt && t === !1 ? (t = !0, e({
2198
+ i === Re ? t = !1 : i === At && t === !1 ? (t = !0, e({
2165
2199
  type: "duration",
2166
2200
  value: s
2167
- })) : i === _e && n ? ml.has(n) ? e({
2201
+ })) : i === _e && n ? gl.has(n) ? e({
2168
2202
  type: "fn",
2169
2203
  value: s
2170
- }) : mt.has(n) && e({
2204
+ }) : wt.has(n) && e({
2171
2205
  type: "keyword",
2172
2206
  value: s
2173
- }) : i === ws && n && kl.has(n) && e({
2207
+ }) : i === bs && n && xl.has(n) && e({
2174
2208
  type: "fn",
2175
2209
  value: s
2176
2210
  });
2177
2211
  }
2178
2212
  }
2179
- function Al(r, e) {
2180
- z(r, function(t) {
2213
+ function kl(r, e) {
2214
+ G(r, function(t) {
2181
2215
  t.is_vendor_prefixed && e(t.name || t.text);
2182
2216
  });
2183
2217
  }
@@ -2188,25 +2222,25 @@ class _ {
2188
2222
  Y(this, ee);
2189
2223
  Y(this, te, []);
2190
2224
  Y(this, Se);
2191
- q(this, he, /* @__PURE__ */ new Map()), q(this, ee, 0), e && q(this, te, []), q(this, Se, e);
2225
+ z(this, he, /* @__PURE__ */ new Map()), z(this, ee, 0), e && z(this, te, []), z(this, Se, e);
2192
2226
  }
2193
2227
  p(e, t) {
2194
- let s = A(this, ee);
2195
- if (A(this, Se)) {
2228
+ let s = E(this, ee);
2229
+ if (E(this, Se)) {
2196
2230
  let i = s * 4;
2197
- A(this, te)[i] = t.line, A(this, te)[i + 1] = t.column, A(this, te)[i + 2] = t.offset, A(this, te)[i + 3] = t.length;
2231
+ E(this, te)[i] = t.line, E(this, te)[i + 1] = t.column, E(this, te)[i + 2] = t.offset, E(this, te)[i + 3] = t.length;
2198
2232
  }
2199
- if (A(this, he).has(e)) {
2200
- A(this, he).get(e).push(s), Zt(this, ee)._++;
2233
+ if (E(this, he).has(e)) {
2234
+ E(this, he).get(e).push(s), ss(this, ee)._++;
2201
2235
  return;
2202
2236
  }
2203
- A(this, he).set(e, [s]), Zt(this, ee)._++;
2237
+ E(this, he).set(e, [s]), ss(this, ee)._++;
2204
2238
  }
2205
2239
  size() {
2206
- return A(this, ee);
2240
+ return E(this, ee);
2207
2241
  }
2208
2242
  c() {
2209
- let e = /* @__PURE__ */ new Map(), t = {}, s = A(this, Se), i = A(this, he), n = A(this, te), l = i.size;
2243
+ let e = /* @__PURE__ */ new Map(), t = {}, s = E(this, Se), i = E(this, he), n = E(this, te), l = i.size;
2210
2244
  i.forEach((h, o) => {
2211
2245
  if (s) {
2212
2246
  let u = h.map(function(p) {
@@ -2222,7 +2256,7 @@ class _ {
2222
2256
  } else
2223
2257
  t[o] = h.length;
2224
2258
  });
2225
- let a = A(this, ee);
2259
+ let a = E(this, ee);
2226
2260
  return s ? {
2227
2261
  total: a,
2228
2262
  totalUnique: l,
@@ -2240,12 +2274,12 @@ class _ {
2240
2274
  }
2241
2275
  he = new WeakMap(), ee = new WeakMap(), te = new WeakMap(), Se = new WeakMap();
2242
2276
  var Oe, ce, Xe;
2243
- class ns {
2277
+ class cs {
2244
2278
  constructor(e) {
2245
2279
  Y(this, Oe);
2246
2280
  Y(this, ce);
2247
2281
  Y(this, Xe);
2248
- q(this, Oe, new _(e)), q(this, ce, /* @__PURE__ */ new Map()), q(this, Xe, e);
2282
+ z(this, Oe, new _(e)), z(this, ce, /* @__PURE__ */ new Map()), z(this, Xe, e);
2249
2283
  }
2250
2284
  /**
2251
2285
  * Add an item to this #list's context
@@ -2254,19 +2288,19 @@ class ns {
2254
2288
  * @param node_location
2255
2289
  */
2256
2290
  push(e, t, s) {
2257
- A(this, Oe).p(e, s), A(this, ce).has(t) || A(this, ce).set(t, new _(A(this, Xe))), A(this, ce).get(t).p(e, s);
2291
+ E(this, Oe).p(e, s), E(this, ce).has(t) || E(this, ce).set(t, new _(E(this, Xe))), E(this, ce).get(t).p(e, s);
2258
2292
  }
2259
2293
  count() {
2260
2294
  let e = /* @__PURE__ */ new Map();
2261
- for (let [t, s] of A(this, ce).entries())
2295
+ for (let [t, s] of E(this, ce).entries())
2262
2296
  e.set(t, s.c());
2263
- return Object.assign(A(this, Oe).c(), {
2297
+ return Object.assign(E(this, Oe).c(), {
2264
2298
  itemsPerContext: Object.fromEntries(e)
2265
2299
  });
2266
2300
  }
2267
2301
  }
2268
2302
  Oe = new WeakMap(), ce = new WeakMap(), Xe = new WeakMap();
2269
- function El(r) {
2303
+ function wl(r) {
2270
2304
  let e = /* @__PURE__ */ new Map(), t = -1, s = 0, i = 0, n = r.length;
2271
2305
  for (let l = 0; l < n; l++) {
2272
2306
  let a = r[l], h = (e.get(a) || 0) + 1;
@@ -2275,24 +2309,24 @@ function El(r) {
2275
2309
  return i / s;
2276
2310
  }
2277
2311
  var se, Ne;
2278
- class I {
2312
+ class H {
2279
2313
  constructor() {
2280
2314
  Y(this, se);
2281
2315
  Y(this, Ne);
2282
- q(this, se, []), q(this, Ne, 0);
2316
+ z(this, se, []), z(this, Ne, 0);
2283
2317
  }
2284
2318
  /**
2285
2319
  * Add a new Integer at the end of this AggregateCollection
2286
2320
  * @param item - The item to add
2287
2321
  */
2288
2322
  push(e) {
2289
- A(this, se).push(e), q(this, Ne, A(this, Ne) + e);
2323
+ E(this, se).push(e), z(this, Ne, E(this, Ne) + e);
2290
2324
  }
2291
2325
  size() {
2292
- return A(this, se).length;
2326
+ return E(this, se).length;
2293
2327
  }
2294
2328
  aggregate() {
2295
- let e = A(this, se).length;
2329
+ let e = E(this, se).length;
2296
2330
  if (e === 0)
2297
2331
  return {
2298
2332
  min: 0,
@@ -2302,7 +2336,7 @@ class I {
2302
2336
  range: 0,
2303
2337
  sum: 0
2304
2338
  };
2305
- let t = A(this, se).slice().sort((a, h) => a - h), s = t[0], i = t[e - 1], n = El(t), l = A(this, Ne);
2339
+ let t = E(this, se).slice().sort((a, h) => a - h), s = t[0], i = t[e - 1], n = wl(t), l = E(this, Ne);
2306
2340
  return {
2307
2341
  min: s,
2308
2342
  max: i,
@@ -2313,23 +2347,23 @@ class I {
2313
2347
  };
2314
2348
  }
2315
2349
  toArray() {
2316
- return A(this, se);
2350
+ return E(this, se);
2317
2351
  }
2318
2352
  }
2319
2353
  se = new WeakMap(), Ne = new WeakMap();
2320
- function yl(r) {
2354
+ function Al(r) {
2321
2355
  let e = 5, t = r.indexOf(";"), s = r.indexOf(",");
2322
2356
  return t === -1 || s !== -1 && s < t ? r.substring(e, s) : r.substring(e, t);
2323
2357
  }
2324
- function zi(r) {
2358
+ function Ki(r) {
2325
2359
  let e = r.children;
2326
2360
  if (e) {
2327
2361
  let t = e.at(-1);
2328
- return !!(t && t.type === _e && os("\\9", t.text));
2362
+ return !!(t && t.type === _e && us("\\9", t.text));
2329
2363
  }
2330
2364
  return !1;
2331
2365
  }
2332
- const Cl = /* @__PURE__ */ new Set([
2366
+ const El = /* @__PURE__ */ new Set([
2333
2367
  "margin",
2334
2368
  "margin-block",
2335
2369
  "margin-inline",
@@ -2352,7 +2386,7 @@ const Cl = /* @__PURE__ */ new Set([
2352
2386
  "padding-block-end",
2353
2387
  "padding-inline-start",
2354
2388
  "padding-inline-end"
2355
- ]), bl = new W([
2389
+ ]), Cl = new W([
2356
2390
  "border-radius",
2357
2391
  "border-top-left-radius",
2358
2392
  "border-top-right-radius",
@@ -2363,8 +2397,8 @@ const Cl = /* @__PURE__ */ new Set([
2363
2397
  "border-end-end-radius",
2364
2398
  "border-end-start-radius"
2365
2399
  ]);
2366
- function Rl(r) {
2367
- if (As(r) || Es(r)) return !1;
2400
+ function yl(r) {
2401
+ if (Rs(r) || vs(r)) return !1;
2368
2402
  let e = r.charCodeAt(0);
2369
2403
  return e === 47 || // /
2370
2404
  e === 42 || // *
@@ -2374,28 +2408,28 @@ function Rl(r) {
2374
2408
  e === 36 || // $
2375
2409
  e === 35;
2376
2410
  }
2377
- function qi(r) {
2378
- return As(r) ? r : Es(r) ? r.slice(r.indexOf("-", 2) + 1).toLowerCase() : Rl(r) ? r.slice(1).toLowerCase() : r.toLowerCase();
2411
+ function $i(r) {
2412
+ return Rs(r) ? r : vs(r) ? r.slice(r.indexOf("-", 2) + 1).toLowerCase() : yl(r) ? r.slice(1).toLowerCase() : r.toLowerCase();
2379
2413
  }
2380
- function Sl(r) {
2381
- return Es(r);
2414
+ function vl(r) {
2415
+ return vs(r);
2382
2416
  }
2383
- function H(r, e) {
2417
+ function P(r, e) {
2384
2418
  return e === 0 ? 0 : r / e;
2385
2419
  }
2386
- function Ol(r, e = {}) {
2387
- return e.useLocations === !0 ? Ki(r, e, !0) : Ki(r, e, !1);
2420
+ function Tl(r, e = {}) {
2421
+ return e.useLocations === !0 ? Bi(r, e, !0) : Bi(r, e, !1);
2388
2422
  }
2389
- function Ki(r, e, t) {
2423
+ function Bi(r, e, t) {
2390
2424
  let s = Date.now(), i = (r.match(/\n/g) || []).length + 1, n = 0, l = 0, a = 0, h = {
2391
2425
  total: 0,
2392
2426
  unique: /* @__PURE__ */ new Map()
2393
- }, o = Date.now(), u = Ur(r, {
2427
+ }, o = Date.now(), u = Ir(r, {
2394
2428
  on_comment({ length: c }) {
2395
2429
  n++, l += c;
2396
2430
  }
2397
- }), p = Date.now(), d = new _(t), f = new I(), L = [], bs = new _(t), Ze = new _(t), Rs = new _(t), vs = new _(t), Ts = new _(t), Ss = new _(t), Os = new _(t), yt = new _(t), Ns = new _(t), Ct = new _(t), bt = new _(t), Ls = new _(t), Je = new _(t), Us = new _(t), Is = new _(t), Rt = new I(), Hs = new _(t), vt = 0, Tt = 0, St = new I(), Ot = new I(), Nt = new I(), Ps = new _(t), Ds = new _(t), Fs = new _(t), Lt = new I(), Ms = new _(t), Ut = new _(t), zs = /* @__PURE__ */ new Set(), It = new _(t), ue, fe, qs = new I(), Ks = new I(), $s = new I(), Bs = new _(t), et = new I(), Gs = new _(t), Ws = [], Ht = new _(t), Pt = new _(t), Ys = new _(t), Qs = new _(t), Vs = new _(t), js = new _(t), Dt = new I(), Xs = new _(t), Zs = /* @__PURE__ */ new Set(), Ie = 0, Js = new I(), tt = 0, Ft = 0, Mt = new _(t), zt = new I(), ei = new _(t), He = new _(t), qt = new _(t), Kt = new _(t), st = new _(t), Pe = new I(), $t = new I(), ti = new _(t), Bt = new _(t), it = new _(t), si = new _(t), ii = new _(t), ri = new _(t), Gt = new _(t), rt = new _(t), nt = new _(t), Wt = new _(t), lt = new _(t), we = new ns(t), Ae = new _(t), ni = new ns(t), li = new _(t), De = new _(t), oi = new ns(t), ai = new _(t);
2398
- function k(c) {
2431
+ }), p = Date.now(), d = new _(t), f = new H(), U = [], Ss = new _(t), Ze = new _(t), Os = new _(t), Ns = new _(t), Ls = new _(t), Us = new _(t), Is = new _(t), vt = new _(t), Hs = new _(t), Tt = new _(t), St = new _(t), Ps = new _(t), Je = new _(t), Ds = new _(t), Fs = new _(t), Ot = new H(), Ms = new _(t), Nt = 0, Lt = 0, Ut = new H(), It = new H(), Ht = new H(), zs = new _(t), qs = new _(t), Ks = new _(t), Pt = new H(), $s = new _(t), Dt = new _(t), Bs = /* @__PURE__ */ new Set(), Ft = new _(t), ue, fe, Gs = new H(), Ws = new H(), Ys = new H(), Qs = new _(t), et = new H(), Vs = new _(t), js = [], Mt = new _(t), zt = new _(t), Xs = new _(t), Zs = new _(t), Js = new _(t), ei = new _(t), ti = new _(t), qt = new H(), si = new _(t), ii = /* @__PURE__ */ new Set(), Ie = 0, ri = new H(), tt = 0, Kt = 0, $t = new _(t), Bt = new H(), ni = new _(t), He = new _(t), Gt = new _(t), Wt = new _(t), st = new _(t), Pe = new H(), Yt = new H(), li = new _(t), Qt = new _(t), it = new _(t), oi = new _(t), ai = new _(t), hi = new _(t), Vt = new _(t), rt = new _(t), nt = new _(t), jt = new _(t), lt = new _(t), we = new cs(t), Ae = new _(t), ci = new cs(t), _i = new _(t), De = new _(t), ui = new cs(t), fi = new _(t);
2432
+ function w(c) {
2399
2433
  return {
2400
2434
  line: c.line,
2401
2435
  column: c.column,
@@ -2404,241 +2438,237 @@ function Ki(r, e, t) {
2404
2438
  };
2405
2439
  }
2406
2440
  let Ee = -1;
2407
- z(u, (c, F) => {
2408
- var mi, ki, wi, Ai, Ei;
2441
+ G(u, (c, F) => {
2442
+ var Ci, yi, bi, Ri, vi;
2409
2443
  Ee >= 0 && F <= Ee && (Ee = -1);
2410
- let Xt = Ee >= 0 && F > Ee;
2411
- if (c.type === Ir) {
2412
- let v = k(c);
2413
- Rt.push(F), Hs.p(F, v);
2414
- let C = qi(c.name ?? "");
2415
- if (d.p(C, v), C === "font-face") {
2416
- let w = /* @__PURE__ */ Object.create(null);
2417
- t && bs.p(c.start, k(c));
2418
- let g = c.children.find((E) => E.type === Hr);
2419
- for (let E of (g == null ? void 0 : g.children) || [])
2420
- E.type === Jt && E.value && (w[E.property] = E.value.text);
2421
- f.push(1), L.push(w);
2444
+ let ts = Ee >= 0 && F > Ee;
2445
+ if (c.type === Hr) {
2446
+ let R = w(c);
2447
+ Ot.push(F), Ms.p(F, R);
2448
+ let y = $i(c.name ?? "");
2449
+ if (d.p(y, R), y === "font-face") {
2450
+ let A = /* @__PURE__ */ Object.create(null);
2451
+ t && Ss.p(c.start, w(c));
2452
+ let x = c.children.find((C) => C.type === Pr);
2453
+ for (let C of (x == null ? void 0 : x.children) || [])
2454
+ C.type === is && C.value && (A[C.property] = C.value.text);
2455
+ f.push(1), U.push(A);
2422
2456
  }
2423
2457
  if (c.prelude === null || c.prelude === void 0)
2424
- C === "layer" && (Ze.p("<anonymous>", k(c)), f.push(2));
2458
+ y === "layer" && (Ze.p("<anonymous>", w(c)), f.push(2));
2425
2459
  else {
2426
- let w = 1;
2427
- if (C === "media")
2428
- vs.p(c.prelude.text, k(c)), Kr(c.prelude, (g) => {
2429
- Ts.p(g, k(c)), w++;
2460
+ let A = 1;
2461
+ if (y === "media")
2462
+ Ns.p(c.prelude.text, w(c)), $r(c.prelude, (x) => {
2463
+ Ls.p(x, w(c)), A++;
2430
2464
  });
2431
- else if (C === "supports")
2432
- yt.p(c.prelude.text, k(c)), qr(c.prelude, (g) => {
2433
- Ns.p(g, k(c)), w++;
2465
+ else if (y === "supports")
2466
+ vt.p(c.prelude.text, w(c)), Kr(c.prelude, (x) => {
2467
+ Hs.p(x, w(c)), A++;
2434
2468
  });
2435
- else if (C.endsWith("keyframes")) {
2436
- let g = c.prelude.text;
2437
- Ct.p(g, k(c)), c.is_vendor_prefixed && (bt.p(`@${(mi = c.name) == null ? void 0 : mi.toLowerCase()} ${c.prelude.text}`, k(c)), w++), Ee = F;
2438
- } else if (C === "layer")
2439
- for (let g of c.prelude.text.split(",").map((E) => E.trim()))
2440
- Ze.p(g, k(c));
2441
- else if (C === "import") {
2442
- if (Rs.p(c.prelude.text, k(c)), c.prelude.has_children)
2443
- for (let g of c.prelude)
2444
- g.type === Bi && typeof g.value == "string" ? yt.p(g.value, k(g)) : g.type === Pr && typeof g.value == "string" && Ze.p(g.value, k(g));
2445
- } else C === "container" ? (Ls.p(c.prelude.text, k(c)), ((ki = c.prelude.first_child) == null ? void 0 : ki.type) === Dr && ((wi = c.prelude.first_child.first_child) == null ? void 0 : wi.type) === _e && Je.p(c.prelude.first_child.first_child.text, k(c))) : C === "property" ? Us.p(c.prelude.text, k(c)) : C === "charset" ? Os.p(c.prelude.text.toLowerCase(), k(c)) : C === "scope" && Is.p(c.prelude.text, k(c));
2446
- f.push(w);
2469
+ else if (y.endsWith("keyframes")) {
2470
+ let x = c.prelude.text;
2471
+ Tt.p(x, w(c)), c.is_vendor_prefixed && (St.p(`@${(Ci = c.name) == null ? void 0 : Ci.toLowerCase()} ${c.prelude.text}`, w(c)), A++), Ee = F;
2472
+ } else if (y === "layer")
2473
+ for (let x of c.prelude.text.split(",").map((C) => C.trim()))
2474
+ Ze.p(x, w(c));
2475
+ else if (y === "import") {
2476
+ if (Os.p(c.prelude.text, w(c)), c.prelude.has_children)
2477
+ for (let x of c.prelude)
2478
+ x.type === Wi && typeof x.value == "string" ? vt.p(x.value, w(x)) : x.type === Dr && typeof x.value == "string" && Ze.p(x.value, w(x));
2479
+ } else y === "container" ? (Ps.p(c.prelude.text, w(c)), ((yi = c.prelude.first_child) == null ? void 0 : yi.type) === Fr && ((bi = c.prelude.first_child.first_child) == null ? void 0 : bi.type) === _e && Je.p(c.prelude.first_child.first_child.text, w(c))) : y === "property" ? Ds.p(c.prelude.text, w(c)) : y === "charset" ? Is.p(c.prelude.text.toLowerCase(), w(c)) : y === "scope" && Fs.p(c.prelude.text, w(c));
2480
+ f.push(A);
2447
2481
  }
2448
- } else if (c.type === Fr)
2449
- if (Xt && c.prelude) {
2450
- if (c.prelude.type === ks && c.prelude.children.length > 0)
2451
- for (let v of c.prelude.children)
2452
- Ut.p(v.text, k(v));
2482
+ } else if (c.type === Mr)
2483
+ if (ts && c.prelude) {
2484
+ if (c.prelude.type === ys && c.prelude.children.length > 0)
2485
+ for (let R of c.prelude.children)
2486
+ Dt.p(R.text, w(R));
2453
2487
  } else {
2454
- vt++, (Ai = c.block) != null && Ai.is_empty && Tt++;
2455
- let v = 0, C = 0, w = k(c);
2488
+ Nt++, (Ri = c.block) != null && Ri.is_empty && Lt++;
2489
+ let R = 0, y = 0, A = w(c);
2456
2490
  if (c.prelude)
2457
- for (const g of c.prelude.children)
2458
- g.type === me && v++;
2491
+ for (const x of c.prelude.children)
2492
+ x.type === ke && R++;
2459
2493
  if (c.block)
2460
- for (const g of c.block.children)
2461
- g.type === Jt && C++;
2462
- St.push(v + C), Ps.p(v + C, w), Ot.push(v), Ds.p(v, w), Nt.push(C), Fs.p(C, w), Lt.push(F), Ms.p(F, w);
2494
+ for (const x of c.block.children)
2495
+ x.type === is && y++;
2496
+ Ut.push(R + y), zs.p(R + y, A), It.push(R), qs.p(R, A), Ht.push(y), Ks.p(y, A), Pt.push(F), $s.p(F, A);
2463
2497
  }
2464
- else if (c.type === me) {
2465
- if (Xt)
2466
- return P;
2467
- let v = k(c);
2468
- Dt.push(F > 0 ? F - 1 : 0), Xs.p(F > 0 ? F - 1 : 0, v), zs.add(c.text);
2469
- let C = as(c);
2470
- et.push(C), Gs.p(C, v), Gr(c, (U) => {
2471
- It.p(U.toLowerCase(), v);
2472
- }), Wr(c, (U) => {
2473
- Pt.p(U, v);
2474
- }), Yr(c, (U) => {
2475
- Ys.p(U.toLowerCase(), v);
2476
- }), Qr(c, (U) => {
2477
- Qs.p(U.toLowerCase(), v);
2478
- }), z(c, (U) => {
2479
- var G;
2480
- U.type === wt && Vs.p(((G = U.name) == null ? void 0 : G.toLowerCase()) ?? "", v);
2481
- }), Vr(c, (U) => {
2482
- let G = U.name.trim() === "" ? " " : U.name;
2483
- js.p(G, U.loc);
2498
+ else if (c.type === ke) {
2499
+ if (ts)
2500
+ return D;
2501
+ let R = w(c);
2502
+ qt.push(F > 0 ? F - 1 : 0), si.p(F > 0 ? F - 1 : 0, R), Bs.add(c.text);
2503
+ let y = fs(c);
2504
+ et.push(y), Vs.p(y, R), Wr(c, (L) => {
2505
+ Ft.p(L.toLowerCase(), R);
2506
+ }), Yr(c, (L) => {
2507
+ zt.p(L, R);
2508
+ }), G(c, (L) => {
2509
+ var B, v, I, S;
2510
+ L.type === Et ? Js.p(((B = L.name) == null ? void 0 : B.toLowerCase()) ?? "", R) : L.type === Ct && ((v = L.name) != null && v.includes("-")) ? ei.p(L.name.toLowerCase(), R) : L.type === Le ? Xs.p(((I = L.name) == null ? void 0 : I.toLowerCase()) ?? "", R) : L.type === Qe && Zs.p(((S = L.name) == null ? void 0 : S.toLowerCase()) ?? "", R);
2511
+ }), Qr(c, (L) => {
2512
+ let B = L.name.trim() === "" ? " " : L.name;
2513
+ ti.p(B, L.loc);
2484
2514
  });
2485
- let w = xt(c), [g, E, B] = w;
2486
- return Bs.p(w.toString(), v), qs.push(g), Ks.push(E), $s.push(B), ue === void 0 && (ue = w), fe === void 0 && (fe = w), fe !== void 0 && $i(fe, w) < 0 && (fe = w), ue !== void 0 && $i(ue, w) > 0 && (ue = w), Ws.push(w), g > 0 && Ht.p(c.text, v), P;
2487
- } else if (c.type === Jt) {
2488
- Ie++, Zs.add(c.text);
2489
- let v = k(c), C = F > 0 ? F - 1 : 0;
2490
- zt.push(C), ei.p(C, v);
2491
- let w = 1;
2492
- c.is_important && (w++, c.text.toLowerCase().includes("!important") || Bt.p("!ie", k(c.value)), Xt && (Ft++, w++)), Js.push(w);
2493
- let { is_important: g, property: E, is_browserhack: B, is_vendor_prefixed: U } = c;
2494
- if (!E) return;
2495
- let G = k(c);
2496
- G.length = E.length;
2497
- let T = qi(E);
2498
- He.p(T, G), g && tt++, U ? (Pe.push(2), Kt.p(E, G)) : As(E) ? (st.p(E, G), Pe.push(g ? 3 : 2), g && Mt.p(E, G)) : B ? (qt.p(E.charAt(0), G), Pe.push(2)) : Pe.push(1);
2515
+ let A = kt(c), [x, C, $] = A;
2516
+ return Qs.p(A.toString(), R), Gs.push(x), Ws.push(C), Ys.push($), ue === void 0 && (ue = A), fe === void 0 && (fe = A), fe !== void 0 && Gi(fe, A) < 0 && (fe = A), ue !== void 0 && Gi(ue, A) > 0 && (ue = A), js.push(A), x > 0 && Mt.p(c.text, R), D;
2517
+ } else if (c.type === is) {
2518
+ Ie++, ii.add(c.text);
2519
+ let R = w(c), y = F > 0 ? F - 1 : 0;
2520
+ Bt.push(y), ni.p(y, R);
2521
+ let A = 1;
2522
+ c.is_important && (A++, c.text.toLowerCase().includes("!important") || Qt.p("!ie", w(c.value)), ts && (Kt++, A++)), ri.push(A);
2523
+ let { is_important: x, property: C, is_browserhack: $, is_vendor_prefixed: L } = c;
2524
+ if (!C) return;
2525
+ let B = w(c);
2526
+ B.length = C.length;
2527
+ let v = $i(C);
2528
+ He.p(v, B), x && tt++, L ? (Pe.push(2), Wt.p(C, B)) : Rs(C) ? (st.p(C, B), Pe.push(x ? 3 : 2), x && $t.p(C, B)) : $ ? (Gt.p(C.charAt(0), B), Pe.push(2)) : Pe.push(1);
2499
2529
  {
2500
- let D = c.value, { text: N } = D, b = k(D), ot = 1;
2501
- if (mt.has(N)) {
2502
- De.p(N.toLowerCase(), b), $t.push(ot), T === "display" && it.p(N.toLowerCase(), b);
2530
+ let I = c.value, { text: S } = I, b = w(I), ot = 1;
2531
+ if (wt.has(S)) {
2532
+ De.p(S.toLowerCase(), b), Yt.push(ot), v === "display" && it.p(S.toLowerCase(), b);
2503
2533
  return;
2504
2534
  }
2505
- if (Al(D, (x) => {
2506
- ti.p(x.toLowerCase(), b), ot++;
2507
- }), zi(D) && (Bt.p("\\9", b), N = N.slice(0, -2), ot++), $t.push(ot), Cl.has(T))
2508
- pl(D) && ai.p(T, b);
2509
- else if (T === "display")
2510
- /var\(/i.test(N) ? it.p(N, b) : it.p(N.toLowerCase(), b);
2535
+ if (kl(I, (m) => {
2536
+ li.p(m.toLowerCase(), b), ot++;
2537
+ }), Ki(I) && (Qt.p("\\9", b), S = S.slice(0, -2), ot++), Yt.push(ot), El.has(v))
2538
+ ul(I) && fi.p(v, b);
2539
+ else if (v === "display")
2540
+ /var\(/i.test(S) ? it.p(S, b) : it.p(S.toLowerCase(), b);
2511
2541
  else {
2512
- if (T === "z-index")
2513
- return si.p(N, b), P;
2514
- if (T === "font") {
2515
- if (!rs.has(N)) {
2516
- let x = xl(D, function(Z) {
2542
+ if (v === "z-index")
2543
+ return oi.p(S, b), D;
2544
+ if (v === "font") {
2545
+ if (!hs.has(S)) {
2546
+ let m = dl(I, function(Z) {
2517
2547
  Z.type === "keyword" && De.p(Z.value.toLowerCase(), b);
2518
2548
  });
2519
- if (!x)
2520
- return P;
2521
- let { font_size: X, line_height: O, font_family: S } = x;
2522
- S && Gt.p(S, b), X && rt.p(X.toLowerCase(), b), O && nt.p(O.toLowerCase(), b);
2549
+ if (!m)
2550
+ return D;
2551
+ let { font_size: X, line_height: N, font_family: O } = m;
2552
+ O && Vt.p(O, b), X && rt.p(X.toLowerCase(), b), N && nt.p(N.toLowerCase(), b);
2523
2553
  }
2524
- } else if (T === "font-size") {
2525
- if (!rs.has(N)) {
2526
- let x = N.toLowerCase();
2527
- x.includes("var(") ? rt.p(N, b) : rt.p(x, b);
2554
+ } else if (v === "font-size") {
2555
+ if (!hs.has(S)) {
2556
+ let m = S.toLowerCase();
2557
+ m.includes("var(") ? rt.p(S, b) : rt.p(m, b);
2528
2558
  }
2529
2559
  } else {
2530
- if (T === "font-family")
2531
- return rs.has(N) || Gt.p(N, b), P;
2532
- if (T === "line-height") {
2533
- let x = N.toLowerCase();
2534
- x.includes("var(") ? nt.p(N, b) : nt.p(x, b);
2560
+ if (v === "font-family")
2561
+ return hs.has(S) || Vt.p(S, b), D;
2562
+ if (v === "line-height") {
2563
+ let m = S.toLowerCase();
2564
+ m.includes("var(") ? nt.p(S, b) : nt.p(m, b);
2535
2565
  } else {
2536
- if (T === "transition" || T === "animation")
2537
- return wl(D.children, function(x) {
2538
- x.type === "fn" ? Wt.p(x.value.text.toLowerCase(), b) : x.type === "duration" ? lt.p(x.value.text.toLowerCase(), b) : x.type === "keyword" && De.p(x.value.text.toLowerCase(), b);
2539
- }), P;
2540
- if (T === "animation-duration" || T === "transition-duration") {
2541
- for (let x of D.children)
2542
- if (x.type !== Re) {
2543
- let X = x.text;
2566
+ if (v === "transition" || v === "animation")
2567
+ return ml(I.children, function(m) {
2568
+ m.type === "fn" ? jt.p(m.value.text.toLowerCase(), b) : m.type === "duration" ? lt.p(m.value.text.toLowerCase(), b) : m.type === "keyword" && De.p(m.value.text.toLowerCase(), b);
2569
+ }), D;
2570
+ if (v === "animation-duration" || v === "transition-duration") {
2571
+ for (let m of I.children)
2572
+ if (m.type !== Re) {
2573
+ let X = m.text;
2544
2574
  /var\(/i.test(X) ? lt.p(X, b) : lt.p(X.toLowerCase(), b);
2545
2575
  }
2546
- } else if (T === "transition-timing-function" || T === "animation-timing-function")
2547
- for (let x of D.children)
2548
- x.type !== Re && Wt.p(x.text, b);
2549
- else T === "container-name" ? Je.p(N, b) : T === "container" ? ((Ei = D.first_child) == null ? void 0 : Ei.type) === _e && Je.p(D.first_child.text, b) : bl.has(T) ? oi.push(N, E, b) : T === "text-shadow" ? ii.p(N, b) : T === "box-shadow" && ri.p(N, b);
2576
+ } else if (v === "transition-timing-function" || v === "animation-timing-function")
2577
+ for (let m of I.children)
2578
+ m.type !== Re && jt.p(m.text, b);
2579
+ else v === "container-name" ? Je.p(S, b) : v === "container" ? ((vi = I.first_child) == null ? void 0 : vi.type) === _e && Je.p(I.first_child.text, b) : Cl.has(v) ? ui.push(S, C, b) : v === "text-shadow" ? ai.p(S, b) : v === "box-shadow" && hi.p(S, b);
2550
2580
  }
2551
2581
  }
2552
2582
  }
2553
- let br = zi(D);
2554
- z(D, (x) => {
2583
+ let Rr = Ki(I);
2584
+ G(I, (m) => {
2555
2585
  var X;
2556
- switch (x.type) {
2557
- case kt: {
2558
- let O = ((X = x.unit) == null ? void 0 : X.toLowerCase()) ?? "", S = k(x);
2559
- return ni.push(O, E, S), P;
2586
+ switch (m.type) {
2587
+ case At: {
2588
+ let N = ((X = m.unit) == null ? void 0 : X.toLowerCase()) ?? "", O = w(m);
2589
+ return ci.push(N, C, O), D;
2560
2590
  }
2561
- case Mr: {
2562
- let O = x.text;
2563
- if (!O || !O.startsWith("#"))
2564
- return P;
2565
- let S = O.toLowerCase();
2566
- br && !S.endsWith("\\9") && (S = S + "\\9");
2567
- let Z = S.length - 1;
2568
- os("\\9", S) && (Z = Z - 2);
2569
- let Fe = k(x);
2570
- return we.push(S, E, Fe), Ae.p("hex" + Z, Fe), P;
2591
+ case zr: {
2592
+ let N = m.text;
2593
+ if (!N || !N.startsWith("#"))
2594
+ return D;
2595
+ let O = N.toLowerCase();
2596
+ Rr && !O.endsWith("\\9") && (O = O + "\\9");
2597
+ let Z = O.length - 1;
2598
+ us("\\9", O) && (Z = Z - 2);
2599
+ let Fe = w(m);
2600
+ return we.push(O, C, Fe), Ae.p("hex" + Z, Fe), D;
2571
2601
  }
2572
2602
  case _e: {
2573
- let O = x.text, S = k(x);
2574
- if (T === "font" || T === "font-family")
2575
- return P;
2576
- mt.has(O) && De.p(O.toLowerCase(), S);
2577
- let Z = O.length;
2603
+ let N = m.text, O = w(m);
2604
+ if (v === "font" || v === "font-family")
2605
+ return D;
2606
+ wt.has(N) && De.p(N.toLowerCase(), O);
2607
+ let Z = N.length;
2578
2608
  if (Z > 20 || Z < 3)
2579
- return P;
2580
- if (fl.has(O)) {
2581
- let Fe = O.toLowerCase();
2582
- we.push(Fe, E, S), Ae.p(Fe, S);
2609
+ return D;
2610
+ if (_l.has(N)) {
2611
+ let Fe = N.toLowerCase();
2612
+ we.push(Fe, C, O), Ae.p(Fe, O);
2583
2613
  return;
2584
2614
  }
2585
- if (cl.has(O)) {
2586
- we.push(O.toLowerCase(), E, S), Ae.p("named", S);
2615
+ if (al.has(N)) {
2616
+ we.push(N.toLowerCase(), C, O), Ae.p("named", O);
2587
2617
  return;
2588
2618
  }
2589
- if (_l.has(O)) {
2590
- we.push(O.toLowerCase(), E, S), Ae.p("system", S);
2619
+ if (hl.has(N)) {
2620
+ we.push(N.toLowerCase(), C, O), Ae.p("system", O);
2591
2621
  return;
2592
2622
  }
2593
- return P;
2623
+ return D;
2594
2624
  }
2595
- case ws: {
2596
- let O = x.name, S = k(x);
2597
- if (ul.has(O)) {
2598
- we.push(x.text, E, S), Ae.p(O.toLowerCase(), S);
2625
+ case bs: {
2626
+ let N = m.name, O = w(m);
2627
+ if (cl.has(N)) {
2628
+ we.push(m.text, C, O), Ae.p(N.toLowerCase(), O);
2599
2629
  return;
2600
2630
  }
2601
- if (os("gradient", O)) {
2602
- li.p(x.text, S);
2631
+ if (us("gradient", N)) {
2632
+ _i.p(m.text, O);
2603
2633
  return;
2604
2634
  }
2605
2635
  }
2606
2636
  }
2607
2637
  });
2608
2638
  }
2609
- } else if (c.type === zr) {
2610
- let { value: v } = c, C = Yi(v || "");
2611
- if (Wi(C, "data:")) {
2612
- let w = C.length, g = yl(C);
2613
- h.total++, a += w;
2614
- let E = {
2639
+ } else if (c.type === qr) {
2640
+ let { value: R } = c, y = Vi(R || "");
2641
+ if (Qi(y, "data:")) {
2642
+ let A = y.length, x = Al(y);
2643
+ h.total++, a += A;
2644
+ let C = {
2615
2645
  line: c.line,
2616
2646
  column: c.column,
2617
2647
  offset: c.start,
2618
2648
  length: c.length
2619
2649
  };
2620
- if (h.unique.has(g)) {
2621
- let B = h.unique.get(g);
2622
- B.count++, B.size += w, h.unique.set(g, B), t && B.uniqueWithLocations && B.uniqueWithLocations.push(E);
2650
+ if (h.unique.has(x)) {
2651
+ let $ = h.unique.get(x);
2652
+ $.count++, $.size += A, h.unique.set(x, $), t && $.uniqueWithLocations && $.uniqueWithLocations.push(C);
2623
2653
  } else {
2624
- let B = {
2654
+ let $ = {
2625
2655
  count: 1,
2626
- size: w,
2627
- uniqueWithLocations: t ? [E] : void 0
2656
+ size: A,
2657
+ uniqueWithLocations: t ? [C] : void 0
2628
2658
  };
2629
- h.unique.set(g, B);
2659
+ h.unique.set(x, $);
2630
2660
  }
2631
2661
  }
2632
- } else if (c.type === Gi)
2633
- return c.name && Ss.p(c.name.toLowerCase(), k(c)), P;
2662
+ } else if (c.type === Yi)
2663
+ return c.name && Us.p(c.name.toLowerCase(), w(c)), D;
2634
2664
  });
2635
- let hi = Zs.size, ye = et.size(), Yt = qs.aggregate(), Qt = Ks.aggregate(), Vt = $s.aggregate(), ci = zs.size, R = Object.assign, _i = r.length, jt = L.length, ui = f.aggregate(), fi = et.aggregate(), pi = Js.aggregate(), di = Pe.aggregate(), gi = $t.aggregate(), xi = d.c();
2665
+ let pi = ii.size, Ce = et.size(), Xt = Gs.aggregate(), Zt = Ws.aggregate(), Jt = Ys.aggregate(), di = Bs.size, T = Object.assign, gi = r.length, es = U.length, xi = f.aggregate(), mi = et.aggregate(), ki = ri.aggregate(), wi = Pe.aggregate(), Ai = Yt.aggregate(), Ei = d.c();
2636
2666
  return {
2637
2667
  stylesheet: {
2638
- sourceLinesOfCode: xi.total + ye + Ie + Ut.size(),
2668
+ sourceLinesOfCode: Ei.total + Ce + Ie + Dt.size(),
2639
2669
  linesOfCode: i,
2640
- size: _i,
2641
- complexity: ui.sum + fi.sum + pi.sum + di.sum + gi.sum,
2670
+ size: gi,
2671
+ complexity: xi.sum + mi.sum + ki.sum + wi.sum + Ai.sum,
2642
2672
  comments: {
2643
2673
  total: n,
2644
2674
  size: l
@@ -2646,196 +2676,197 @@ function Ki(r, e, t) {
2646
2676
  embeddedContent: {
2647
2677
  size: {
2648
2678
  total: a,
2649
- ratio: H(a, _i)
2679
+ ratio: P(a, gi)
2650
2680
  },
2651
2681
  types: {
2652
2682
  total: h.total,
2653
2683
  totalUnique: h.unique.size,
2654
- uniquenessRatio: H(h.unique.size, h.total),
2684
+ uniquenessRatio: P(h.unique.size, h.total),
2655
2685
  unique: Object.fromEntries(h.unique)
2656
2686
  }
2657
2687
  }
2658
2688
  },
2659
- atrules: R(xi, {
2660
- fontface: R(
2689
+ atrules: T(Ei, {
2690
+ fontface: T(
2661
2691
  {
2662
- total: jt,
2663
- totalUnique: jt,
2664
- unique: L,
2665
- uniquenessRatio: jt === 0 ? 0 : 1
2692
+ total: es,
2693
+ totalUnique: es,
2694
+ unique: U,
2695
+ uniquenessRatio: es === 0 ? 0 : 1
2666
2696
  },
2667
2697
  t ? {
2668
- uniqueWithLocations: bs.c().uniqueWithLocations
2698
+ uniqueWithLocations: Ss.c().uniqueWithLocations
2669
2699
  } : {}
2670
2700
  ),
2671
- import: Rs.c(),
2672
- media: R(vs.c(), {
2673
- browserhacks: Ts.c(),
2674
- features: Ss.c()
2701
+ import: Os.c(),
2702
+ media: T(Ns.c(), {
2703
+ browserhacks: Ls.c(),
2704
+ features: Us.c()
2675
2705
  }),
2676
- charset: Os.c(),
2677
- supports: R(yt.c(), {
2678
- browserhacks: Ns.c()
2706
+ charset: Is.c(),
2707
+ supports: T(vt.c(), {
2708
+ browserhacks: Hs.c()
2679
2709
  }),
2680
- keyframes: R(Ct.c(), {
2681
- prefixed: R(bt.c(), {
2682
- ratio: H(bt.size(), Ct.size())
2710
+ keyframes: T(Tt.c(), {
2711
+ prefixed: T(St.c(), {
2712
+ ratio: P(St.size(), Tt.size())
2683
2713
  })
2684
2714
  }),
2685
- container: R(Ls.c(), {
2715
+ container: T(Ps.c(), {
2686
2716
  names: Je.c()
2687
2717
  }),
2688
2718
  layer: Ze.c(),
2689
- property: Us.c(),
2690
- scope: Is.c(),
2691
- complexity: ui,
2692
- nesting: R(
2693
- Rt.aggregate(),
2719
+ property: Ds.c(),
2720
+ scope: Fs.c(),
2721
+ complexity: xi,
2722
+ nesting: T(
2723
+ Ot.aggregate(),
2694
2724
  {
2695
- items: Rt.toArray()
2725
+ items: Ot.toArray()
2696
2726
  },
2697
- Hs.c()
2727
+ Ms.c()
2698
2728
  )
2699
2729
  }),
2700
2730
  rules: {
2701
- total: vt,
2731
+ total: Nt,
2702
2732
  empty: {
2703
- total: Tt,
2704
- ratio: H(Tt, vt)
2733
+ total: Lt,
2734
+ ratio: P(Lt, Nt)
2705
2735
  },
2706
- sizes: R(
2707
- St.aggregate(),
2736
+ sizes: T(
2737
+ Ut.aggregate(),
2708
2738
  {
2709
- items: St.toArray()
2739
+ items: Ut.toArray()
2710
2740
  },
2711
- Ps.c()
2741
+ zs.c()
2712
2742
  ),
2713
- nesting: R(
2714
- Lt.aggregate(),
2743
+ nesting: T(
2744
+ Pt.aggregate(),
2715
2745
  {
2716
- items: Lt.toArray()
2746
+ items: Pt.toArray()
2717
2747
  },
2718
- Ms.c()
2748
+ $s.c()
2719
2749
  ),
2720
- selectors: R(
2721
- Ot.aggregate(),
2750
+ selectors: T(
2751
+ It.aggregate(),
2722
2752
  {
2723
- items: Ot.toArray()
2753
+ items: It.toArray()
2724
2754
  },
2725
- Ds.c()
2755
+ qs.c()
2726
2756
  ),
2727
- declarations: R(
2728
- Nt.aggregate(),
2757
+ declarations: T(
2758
+ Ht.aggregate(),
2729
2759
  {
2730
- items: Nt.toArray()
2760
+ items: Ht.toArray()
2731
2761
  },
2732
- Fs.c()
2762
+ Ks.c()
2733
2763
  )
2734
2764
  },
2735
2765
  selectors: {
2736
- total: ye,
2737
- totalUnique: ci,
2738
- uniquenessRatio: H(ci, ye),
2739
- specificity: R(
2766
+ total: Ce,
2767
+ totalUnique: di,
2768
+ uniquenessRatio: P(di, Ce),
2769
+ specificity: T(
2740
2770
  {
2741
2771
  /** @type Specificity */
2742
2772
  min: fe === void 0 ? [0, 0, 0] : fe,
2743
2773
  /** @type Specificity */
2744
2774
  max: ue === void 0 ? [0, 0, 0] : ue,
2745
2775
  /** @type Specificity */
2746
- sum: [Yt.sum, Qt.sum, Vt.sum],
2776
+ sum: [Xt.sum, Zt.sum, Jt.sum],
2747
2777
  /** @type Specificity */
2748
- mean: [Yt.mean, Qt.mean, Vt.mean],
2778
+ mean: [Xt.mean, Zt.mean, Jt.mean],
2749
2779
  /** @type Specificity */
2750
- mode: [Yt.mode, Qt.mode, Vt.mode],
2780
+ mode: [Xt.mode, Zt.mode, Jt.mode],
2751
2781
  /** @type Specificity */
2752
- items: Ws
2782
+ items: js
2753
2783
  },
2754
- Bs.c()
2784
+ Qs.c()
2755
2785
  ),
2756
- complexity: R(fi, Gs.c(), {
2786
+ complexity: T(mi, Vs.c(), {
2757
2787
  items: et.toArray()
2758
2788
  }),
2759
- nesting: R(
2760
- Dt.aggregate(),
2789
+ nesting: T(
2790
+ qt.aggregate(),
2761
2791
  {
2762
- items: Dt.toArray()
2792
+ items: qt.toArray()
2763
2793
  },
2764
- Xs.c()
2794
+ si.c()
2765
2795
  ),
2766
- id: R(Ht.c(), {
2767
- ratio: H(Ht.size(), ye)
2796
+ id: T(Mt.c(), {
2797
+ ratio: P(Mt.size(), Ce)
2768
2798
  }),
2769
- pseudoClasses: Ys.c(),
2770
- pseudoElements: Qs.c(),
2771
- accessibility: R(Pt.c(), {
2772
- ratio: H(Pt.size(), ye)
2799
+ pseudoClasses: Xs.c(),
2800
+ pseudoElements: Zs.c(),
2801
+ accessibility: T(zt.c(), {
2802
+ ratio: P(zt.size(), Ce)
2773
2803
  }),
2774
- attributes: Vs.c(),
2775
- keyframes: Ut.c(),
2776
- prefixed: R(It.c(), {
2777
- ratio: H(It.size(), ye)
2804
+ attributes: Js.c(),
2805
+ customElements: ei.c(),
2806
+ keyframes: Dt.c(),
2807
+ prefixed: T(Ft.c(), {
2808
+ ratio: P(Ft.size(), Ce)
2778
2809
  }),
2779
- combinators: js.c()
2810
+ combinators: ti.c()
2780
2811
  },
2781
2812
  declarations: {
2782
2813
  total: Ie,
2783
- totalUnique: hi,
2784
- uniquenessRatio: H(hi, Ie),
2814
+ totalUnique: pi,
2815
+ uniquenessRatio: P(pi, Ie),
2785
2816
  importants: {
2786
2817
  total: tt,
2787
- ratio: H(tt, Ie),
2818
+ ratio: P(tt, Ie),
2788
2819
  inKeyframes: {
2789
- total: Ft,
2790
- ratio: H(Ft, tt)
2820
+ total: Kt,
2821
+ ratio: P(Kt, tt)
2791
2822
  }
2792
2823
  },
2793
- complexity: pi,
2794
- nesting: R(
2795
- zt.aggregate(),
2824
+ complexity: ki,
2825
+ nesting: T(
2826
+ Bt.aggregate(),
2796
2827
  {
2797
- items: zt.toArray()
2828
+ items: Bt.toArray()
2798
2829
  },
2799
- ei.c()
2830
+ ni.c()
2800
2831
  )
2801
2832
  },
2802
- properties: R(He.c(), {
2803
- prefixed: R(Kt.c(), {
2804
- ratio: H(Kt.size(), He.size())
2833
+ properties: T(He.c(), {
2834
+ prefixed: T(Wt.c(), {
2835
+ ratio: P(Wt.size(), He.size())
2805
2836
  }),
2806
- custom: R(st.c(), {
2807
- ratio: H(st.size(), He.size()),
2808
- importants: R(Mt.c(), {
2809
- ratio: H(Mt.size(), st.size())
2837
+ custom: T(st.c(), {
2838
+ ratio: P(st.size(), He.size()),
2839
+ importants: T($t.c(), {
2840
+ ratio: P($t.size(), st.size())
2810
2841
  })
2811
2842
  }),
2812
- browserhacks: R(qt.c(), {
2813
- ratio: H(qt.size(), He.size())
2843
+ browserhacks: T(Gt.c(), {
2844
+ ratio: P(Gt.size(), He.size())
2814
2845
  }),
2815
- complexity: di
2846
+ complexity: wi
2816
2847
  }),
2817
2848
  values: {
2818
- colors: R(we.count(), {
2849
+ colors: T(we.count(), {
2819
2850
  formats: Ae.c()
2820
2851
  }),
2821
- gradients: li.c(),
2822
- fontFamilies: Gt.c(),
2852
+ gradients: _i.c(),
2853
+ fontFamilies: Vt.c(),
2823
2854
  fontSizes: rt.c(),
2824
2855
  lineHeights: nt.c(),
2825
- zindexes: si.c(),
2826
- textShadows: ii.c(),
2827
- boxShadows: ri.c(),
2828
- borderRadiuses: oi.count(),
2856
+ zindexes: oi.c(),
2857
+ textShadows: ai.c(),
2858
+ boxShadows: hi.c(),
2859
+ borderRadiuses: ui.count(),
2829
2860
  animations: {
2830
2861
  durations: lt.c(),
2831
- timingFunctions: Wt.c()
2862
+ timingFunctions: jt.c()
2832
2863
  },
2833
- prefixes: ti.c(),
2834
- browserhacks: Bt.c(),
2835
- units: ni.count(),
2836
- complexity: gi,
2864
+ prefixes: li.c(),
2865
+ browserhacks: Qt.c(),
2866
+ units: ci.count(),
2867
+ complexity: Ai,
2837
2868
  keywords: De.c(),
2838
- resets: ai.c(),
2869
+ resets: fi.c(),
2839
2870
  displays: it.c()
2840
2871
  },
2841
2872
  __meta__: {
@@ -2845,25 +2876,25 @@ function Ki(r, e, t) {
2845
2876
  }
2846
2877
  };
2847
2878
  }
2848
- function $i(r, e) {
2879
+ function Gi(r, e) {
2849
2880
  return r[0] === e[0] ? r[1] === e[1] ? e[2] - r[2] : e[1] - r[1] : e[0] - r[0];
2850
2881
  }
2851
2882
  export {
2852
2883
  W as KeywordSet,
2853
- Ol as analyze,
2854
- Fi as calculateSpecificity,
2855
- ul as colorFunctions,
2856
- fl as colorKeywords,
2857
- $i as compareSpecificity,
2858
- mt as cssKeywords,
2859
- Sl as hasVendorPrefix,
2860
- Wr as isAccessibilitySelector,
2861
- Kr as isMediaBrowserhack,
2862
- Rl as isPropertyHack,
2863
- Gr as isSelectorPrefixed,
2864
- qr as isSupportsBrowserhack,
2865
- Al as isValuePrefixed,
2866
- cl as namedColors,
2867
- as as selectorComplexity,
2868
- _l as systemColors
2884
+ Tl as analyze,
2885
+ zi as calculateSpecificity,
2886
+ cl as colorFunctions,
2887
+ _l as colorKeywords,
2888
+ Gi as compareSpecificity,
2889
+ wt as cssKeywords,
2890
+ vl as hasVendorPrefix,
2891
+ Yr as isAccessibilitySelector,
2892
+ $r as isMediaBrowserhack,
2893
+ yl as isPropertyHack,
2894
+ Wr as isSelectorPrefixed,
2895
+ Kr as isSupportsBrowserhack,
2896
+ kl as isValuePrefixed,
2897
+ al as namedColors,
2898
+ fs as selectorComplexity,
2899
+ hl as systemColors
2869
2900
  };