tailwind-clamp 4.0.4 → 4.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,17 +1,17 @@
1
- var it = Object.defineProperty;
2
- var at = (t, e, n) => e in t ? it(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var y = (t, e, n) => at(t, typeof e != "symbol" ? e + "" : e, n);
4
- function je(t, e) {
1
+ var ut = Object.defineProperty;
2
+ var ct = (t, e, n) => e in t ? ut(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var E = (t, e, n) => ct(t, typeof e != "symbol" ? e + "" : e, n);
4
+ function Je(t, e) {
5
5
  return { handler: t, config: e };
6
6
  }
7
- je.withOptions = function(t, e = () => ({})) {
7
+ Je.withOptions = function(t, e = () => ({})) {
8
8
  function n(r) {
9
9
  return { handler: t(r), config: e(r) };
10
10
  }
11
11
  return n.__isOptionsFunction = !0, n;
12
12
  };
13
- var st = je;
14
- const ut = (t) => {
13
+ var lt = Je;
14
+ const pt = (t) => {
15
15
  switch (t) {
16
16
  // Sizing & Spacing
17
17
  case "p":
@@ -242,6 +242,108 @@ const ut = (t) => {
242
242
  key: "scrollMargin",
243
243
  props: ["scrollMargin"]
244
244
  };
245
+ case "scroll-mx":
246
+ return {
247
+ type: "spacing",
248
+ key: "scrollMargin",
249
+ props: ["scrollMarginInline"]
250
+ };
251
+ case "scroll-my":
252
+ return {
253
+ type: "spacing",
254
+ key: "scrollMargin",
255
+ props: ["scrollMarginBlock"]
256
+ };
257
+ case "scroll-ms":
258
+ return {
259
+ type: "spacing",
260
+ key: "scrollMargin",
261
+ props: ["scrollMarginInlineStart"]
262
+ };
263
+ case "scroll-me":
264
+ return {
265
+ type: "spacing",
266
+ key: "scrollMargin",
267
+ props: ["scrollMarginInlineEnd"]
268
+ };
269
+ case "scroll-mt":
270
+ return {
271
+ type: "spacing",
272
+ key: "scrollMargin",
273
+ props: ["scrollMarginTop"]
274
+ };
275
+ case "scroll-mb":
276
+ return {
277
+ type: "spacing",
278
+ key: "scrollMargin",
279
+ props: ["scrollMarginBottom"]
280
+ };
281
+ case "scroll-ml":
282
+ return {
283
+ type: "spacing",
284
+ key: "scrollMargin",
285
+ props: ["scrollMarginLeft"]
286
+ };
287
+ case "scroll-mr":
288
+ return {
289
+ type: "spacing",
290
+ key: "scrollMargin",
291
+ props: ["scrollMarginRight"]
292
+ };
293
+ case "scroll-p":
294
+ return {
295
+ type: "spacing",
296
+ key: "scrollPadding",
297
+ props: ["scrollPadding"]
298
+ };
299
+ case "scroll-px":
300
+ return {
301
+ type: "spacing",
302
+ key: "scrollPadding",
303
+ props: ["scrollPaddingInline"]
304
+ };
305
+ case "scroll-py":
306
+ return {
307
+ type: "spacing",
308
+ key: "scrollPadding",
309
+ props: ["scrollPaddingBlock"]
310
+ };
311
+ case "scroll-ps":
312
+ return {
313
+ type: "spacing",
314
+ key: "scrollPadding",
315
+ props: ["scrollPaddingInlineStart"]
316
+ };
317
+ case "scroll-pe":
318
+ return {
319
+ type: "spacing",
320
+ key: "scrollPadding",
321
+ props: ["scrollPaddingInlineEnd"]
322
+ };
323
+ case "scroll-pt":
324
+ return {
325
+ type: "spacing",
326
+ key: "scrollPadding",
327
+ props: ["scrollPaddingTop"]
328
+ };
329
+ case "scroll-pb":
330
+ return {
331
+ type: "spacing",
332
+ key: "scrollPadding",
333
+ props: ["scrollPaddingBottom"]
334
+ };
335
+ case "scroll-pl":
336
+ return {
337
+ type: "spacing",
338
+ key: "scrollPadding",
339
+ props: ["scrollPaddingLeft"]
340
+ };
341
+ case "scroll-pr":
342
+ return {
343
+ type: "spacing",
344
+ key: "scrollPadding",
345
+ props: ["scrollPaddingRight"]
346
+ };
245
347
  case "translate":
246
348
  return {
247
349
  type: "spacing",
@@ -444,7 +546,7 @@ const ut = (t) => {
444
546
  default:
445
547
  return null;
446
548
  }
447
- }, le = {
549
+ }, de = {
448
550
  error() {
449
551
  console.log("\x1B[31m", ...arguments, "\x1B[0m");
450
552
  },
@@ -458,211 +560,211 @@ const ut = (t) => {
458
560
  console.log("\x1B[90m", ...arguments, "\x1B[0m");
459
561
  }
460
562
  };
461
- class ke extends Error {
563
+ class be extends Error {
462
564
  constructor(n, r, o, i) {
463
565
  super(n);
464
- y(this, "sourceStart");
465
- y(this, "sourceEnd");
466
- y(this, "parserState");
566
+ E(this, "sourceStart");
567
+ E(this, "sourceEnd");
568
+ E(this, "parserState");
467
569
  this.name = "ParseError", this.sourceStart = r, this.sourceEnd = o, this.parserState = i;
468
570
  }
469
571
  }
470
- class j extends ke {
471
- constructor(n, r, o, i, s) {
572
+ class J extends be {
573
+ constructor(n, r, o, i, a) {
472
574
  super(n, r, o, i);
473
- y(this, "token");
474
- this.token = s;
575
+ E(this, "token");
576
+ this.token = a;
475
577
  }
476
578
  }
477
- const z = { UnexpectedNewLineInString: "Unexpected newline while consuming a string token.", UnexpectedEOFInString: "Unexpected EOF while consuming a string token.", UnexpectedEOFInComment: "Unexpected EOF while consuming a comment.", UnexpectedEOFInURL: "Unexpected EOF while consuming a url token.", UnexpectedEOFInEscapedCodePoint: "Unexpected EOF while consuming an escaped code point.", UnexpectedCharacterInURL: "Unexpected character while consuming a url token.", InvalidEscapeSequenceInURL: "Invalid escape sequence while consuming a url token.", InvalidEscapeSequenceAfterBackslash: 'Invalid escape sequence after "\\"' };
579
+ const H = { UnexpectedNewLineInString: "Unexpected newline while consuming a string token.", UnexpectedEOFInString: "Unexpected EOF while consuming a string token.", UnexpectedEOFInComment: "Unexpected EOF while consuming a comment.", UnexpectedEOFInURL: "Unexpected EOF while consuming a url token.", UnexpectedEOFInEscapedCodePoint: "Unexpected EOF while consuming an escaped code point.", UnexpectedCharacterInURL: "Unexpected character while consuming a url token.", InvalidEscapeSequenceInURL: "Invalid escape sequence while consuming a url token.", InvalidEscapeSequenceAfterBackslash: 'Invalid escape sequence after "\\"' };
478
580
  function W(...t) {
479
581
  let e = "";
480
582
  for (let n = 0; n < t.length; n++) e += t[n][1];
481
583
  return e;
482
584
  }
483
- const ee = 13, B = 45, te = 10, ne = 43, _ = 65533;
484
- function ct(t) {
585
+ const ne = 13, B = 45, re = 10, oe = 43, te = 65533;
586
+ function dt(t) {
485
587
  return t.source.codePointAt(t.cursor) === 60 && t.source.codePointAt(t.cursor + 1) === 33 && t.source.codePointAt(t.cursor + 2) === B && t.source.codePointAt(t.cursor + 3) === B;
486
588
  }
487
589
  function R(t) {
488
590
  return t >= 48 && t <= 57;
489
591
  }
490
- function lt(t) {
592
+ function ft(t) {
491
593
  return t >= 65 && t <= 90;
492
594
  }
493
- function dt(t) {
595
+ function vt(t) {
494
596
  return t >= 97 && t <= 122;
495
597
  }
496
- function Z(t) {
598
+ function Q(t) {
497
599
  return t >= 48 && t <= 57 || t >= 97 && t <= 102 || t >= 65 && t <= 70;
498
600
  }
499
- function pt(t) {
500
- return dt(t) || lt(t);
601
+ function gt(t) {
602
+ return vt(t) || ft(t);
501
603
  }
502
- function re(t) {
503
- return pt(t) || ft(t) || t === 95;
604
+ function ie(t) {
605
+ return gt(t) || mt(t) || t === 95;
504
606
  }
505
- function Oe(t) {
506
- return re(t) || R(t) || t === B;
607
+ function Me(t) {
608
+ return ie(t) || R(t) || t === B;
507
609
  }
508
- function ft(t) {
509
- return t === 183 || t === 8204 || t === 8205 || t === 8255 || t === 8256 || t === 8204 || 192 <= t && t <= 214 || 216 <= t && t <= 246 || 248 <= t && t <= 893 || 895 <= t && t <= 8191 || 8304 <= t && t <= 8591 || 11264 <= t && t <= 12271 || 12289 <= t && t <= 55295 || 63744 <= t && t <= 64975 || 65008 <= t && t <= 65533 || t === 0 || !!oe(t) || t >= 65536;
610
+ function mt(t) {
611
+ return t === 183 || t === 8204 || t === 8205 || t === 8255 || t === 8256 || t === 8204 || 192 <= t && t <= 214 || 216 <= t && t <= 246 || 248 <= t && t <= 893 || 895 <= t && t <= 8191 || 8304 <= t && t <= 8591 || 11264 <= t && t <= 12271 || 12289 <= t && t <= 55295 || 63744 <= t && t <= 64975 || 65008 <= t && t <= 65533 || t === 0 || !!se(t) || t >= 65536;
510
612
  }
511
613
  function Ee(t) {
512
- return t === te || t === ee || t === 12;
614
+ return t === re || t === ne || t === 12;
513
615
  }
514
- function K(t) {
515
- return t === 32 || t === te || t === 9 || t === ee || t === 12;
616
+ function X(t) {
617
+ return t === 32 || t === re || t === 9 || t === ne || t === 12;
516
618
  }
517
- function oe(t) {
619
+ function se(t) {
518
620
  return t >= 55296 && t <= 57343;
519
621
  }
520
- function ue(t) {
622
+ function le(t) {
521
623
  return t.source.codePointAt(t.cursor) === 92 && !Ee(t.source.codePointAt(t.cursor + 1) ?? -1);
522
624
  }
523
- function ye(t, e) {
524
- return e.source.codePointAt(e.cursor) === B ? e.source.codePointAt(e.cursor + 1) === B || !!re(e.source.codePointAt(e.cursor + 1) ?? -1) || e.source.codePointAt(e.cursor + 1) === 92 && !Ee(e.source.codePointAt(e.cursor + 2) ?? -1) : !!re(e.source.codePointAt(e.cursor) ?? -1) || ue(e);
625
+ function Pe(t, e) {
626
+ return e.source.codePointAt(e.cursor) === B ? e.source.codePointAt(e.cursor + 1) === B || !!ie(e.source.codePointAt(e.cursor + 1) ?? -1) || e.source.codePointAt(e.cursor + 1) === 92 && !Ee(e.source.codePointAt(e.cursor + 2) ?? -1) : !!ie(e.source.codePointAt(e.cursor) ?? -1) || le(e);
525
627
  }
526
- function We(t) {
527
- return t.source.codePointAt(t.cursor) === ne || t.source.codePointAt(t.cursor) === B ? !!R(t.source.codePointAt(t.cursor + 1) ?? -1) || t.source.codePointAt(t.cursor + 1) === 46 && R(t.source.codePointAt(t.cursor + 2) ?? -1) : t.source.codePointAt(t.cursor) === 46 ? R(t.source.codePointAt(t.cursor + 1) ?? -1) : R(t.source.codePointAt(t.cursor) ?? -1);
628
+ function qe(t) {
629
+ return t.source.codePointAt(t.cursor) === oe || t.source.codePointAt(t.cursor) === B ? !!R(t.source.codePointAt(t.cursor + 1) ?? -1) || t.source.codePointAt(t.cursor + 1) === 46 && R(t.source.codePointAt(t.cursor + 2) ?? -1) : t.source.codePointAt(t.cursor) === 46 ? R(t.source.codePointAt(t.cursor + 1) ?? -1) : R(t.source.codePointAt(t.cursor) ?? -1);
528
630
  }
529
- function vt(t) {
631
+ function ht(t) {
530
632
  return t.source.codePointAt(t.cursor) === 47 && t.source.codePointAt(t.cursor + 1) === 42;
531
633
  }
532
- function mt(t) {
634
+ function Ct(t) {
533
635
  return t.source.codePointAt(t.cursor) === B && t.source.codePointAt(t.cursor + 1) === B && t.source.codePointAt(t.cursor + 2) === 62;
534
636
  }
535
- var a, l, Pe;
536
- function gt(t) {
637
+ var s, l, ke;
638
+ function yt(t) {
537
639
  switch (t) {
538
- case a.OpenParen:
539
- return a.CloseParen;
540
- case a.CloseParen:
541
- return a.OpenParen;
542
- case a.OpenCurly:
543
- return a.CloseCurly;
544
- case a.CloseCurly:
545
- return a.OpenCurly;
546
- case a.OpenSquare:
547
- return a.CloseSquare;
548
- case a.CloseSquare:
549
- return a.OpenSquare;
640
+ case s.OpenParen:
641
+ return s.CloseParen;
642
+ case s.CloseParen:
643
+ return s.OpenParen;
644
+ case s.OpenCurly:
645
+ return s.CloseCurly;
646
+ case s.CloseCurly:
647
+ return s.OpenCurly;
648
+ case s.OpenSquare:
649
+ return s.CloseSquare;
650
+ case s.CloseSquare:
651
+ return s.OpenSquare;
550
652
  default:
551
653
  return null;
552
654
  }
553
655
  }
554
- function ht(t) {
656
+ function Et(t) {
555
657
  switch (t[0]) {
556
- case a.OpenParen:
557
- return [a.CloseParen, ")", -1, -1, void 0];
558
- case a.CloseParen:
559
- return [a.OpenParen, "(", -1, -1, void 0];
560
- case a.OpenCurly:
561
- return [a.CloseCurly, "}", -1, -1, void 0];
562
- case a.CloseCurly:
563
- return [a.OpenCurly, "{", -1, -1, void 0];
564
- case a.OpenSquare:
565
- return [a.CloseSquare, "]", -1, -1, void 0];
566
- case a.CloseSquare:
567
- return [a.OpenSquare, "[", -1, -1, void 0];
658
+ case s.OpenParen:
659
+ return [s.CloseParen, ")", -1, -1, void 0];
660
+ case s.CloseParen:
661
+ return [s.OpenParen, "(", -1, -1, void 0];
662
+ case s.OpenCurly:
663
+ return [s.CloseCurly, "}", -1, -1, void 0];
664
+ case s.CloseCurly:
665
+ return [s.OpenCurly, "{", -1, -1, void 0];
666
+ case s.OpenSquare:
667
+ return [s.CloseSquare, "]", -1, -1, void 0];
668
+ case s.CloseSquare:
669
+ return [s.OpenSquare, "[", -1, -1, void 0];
568
670
  default:
569
671
  return null;
570
672
  }
571
673
  }
572
- function Ct(t, e) {
674
+ function Pt(t, e) {
573
675
  for (e.advanceCodePoint(2); ; ) {
574
676
  const n = e.readCodePoint();
575
677
  if (n === void 0) {
576
- const r = [a.Comment, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, void 0];
577
- return t.onParseError(new j(z.UnexpectedEOFInComment, e.representationStart, e.representationEnd, ["4.3.2. Consume comments", "Unexpected EOF"], r)), r;
678
+ const r = [s.Comment, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, void 0];
679
+ return t.onParseError(new J(H.UnexpectedEOFInComment, e.representationStart, e.representationEnd, ["4.3.2. Consume comments", "Unexpected EOF"], r)), r;
578
680
  }
579
681
  if (n === 42 && e.source.codePointAt(e.cursor) !== void 0 && e.source.codePointAt(e.cursor) === 47) {
580
682
  e.advanceCodePoint();
581
683
  break;
582
684
  }
583
685
  }
584
- return [a.Comment, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, void 0];
686
+ return [s.Comment, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, void 0];
585
687
  }
586
- function be(t, e) {
688
+ function Se(t, e) {
587
689
  const n = e.readCodePoint();
588
- if (n === void 0) return t.onParseError(new ke(z.UnexpectedEOFInEscapedCodePoint, e.representationStart, e.representationEnd, ["4.3.7. Consume an escaped code point", "Unexpected EOF"])), _;
589
- if (Z(n)) {
690
+ if (n === void 0) return t.onParseError(new be(H.UnexpectedEOFInEscapedCodePoint, e.representationStart, e.representationEnd, ["4.3.7. Consume an escaped code point", "Unexpected EOF"])), te;
691
+ if (Q(n)) {
590
692
  const r = [n];
591
693
  let o;
592
- for (; (o = e.source.codePointAt(e.cursor)) !== void 0 && Z(o) && r.length < 6; ) r.push(o), e.advanceCodePoint();
593
- K(e.source.codePointAt(e.cursor) ?? -1) && (e.source.codePointAt(e.cursor) === ee && e.source.codePointAt(e.cursor + 1) === te && e.advanceCodePoint(), e.advanceCodePoint());
694
+ for (; (o = e.source.codePointAt(e.cursor)) !== void 0 && Q(o) && r.length < 6; ) r.push(o), e.advanceCodePoint();
695
+ X(e.source.codePointAt(e.cursor) ?? -1) && (e.source.codePointAt(e.cursor) === ne && e.source.codePointAt(e.cursor + 1) === re && e.advanceCodePoint(), e.advanceCodePoint());
594
696
  const i = parseInt(String.fromCodePoint(...r), 16);
595
- return i === 0 || oe(i) || i > 1114111 ? _ : i;
697
+ return i === 0 || se(i) || i > 1114111 ? te : i;
596
698
  }
597
- return n === 0 || oe(n) ? _ : n;
699
+ return n === 0 || se(n) ? te : n;
598
700
  }
599
- function Se(t, e) {
701
+ function Ae(t, e) {
600
702
  const n = [];
601
703
  for (; ; ) {
602
704
  const r = e.source.codePointAt(e.cursor) ?? -1;
603
- if (r === 0 || oe(r)) n.push(_), e.advanceCodePoint(+(r > 65535) + 1);
604
- else if (Oe(r)) n.push(r), e.advanceCodePoint(+(r > 65535) + 1);
705
+ if (r === 0 || se(r)) n.push(te), e.advanceCodePoint(+(r > 65535) + 1);
706
+ else if (Me(r)) n.push(r), e.advanceCodePoint(+(r > 65535) + 1);
605
707
  else {
606
- if (!ue(e)) return n;
607
- e.advanceCodePoint(), n.push(be(t, e));
708
+ if (!le(e)) return n;
709
+ e.advanceCodePoint(), n.push(Se(t, e));
608
710
  }
609
711
  }
610
712
  }
611
- function Et(t, e) {
713
+ function kt(t, e) {
612
714
  e.advanceCodePoint();
613
715
  const n = e.source.codePointAt(e.cursor);
614
- if (n !== void 0 && (Oe(n) || ue(e))) {
615
- let r = Pe.Unrestricted;
616
- ye(0, e) && (r = Pe.ID);
617
- const o = Se(t, e);
618
- return [a.Hash, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: String.fromCodePoint(...o), type: r }];
716
+ if (n !== void 0 && (Me(n) || le(e))) {
717
+ let r = ke.Unrestricted;
718
+ Pe(0, e) && (r = ke.ID);
719
+ const o = Ae(t, e);
720
+ return [s.Hash, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: String.fromCodePoint(...o), type: r }];
619
721
  }
620
- return [a.Delim, "#", e.representationStart, e.representationEnd, { value: "#" }];
722
+ return [s.Delim, "#", e.representationStart, e.representationEnd, { value: "#" }];
621
723
  }
622
- function yt(t, e) {
724
+ function bt(t, e) {
623
725
  let n = l.Integer;
624
- for (e.source.codePointAt(e.cursor) !== ne && e.source.codePointAt(e.cursor) !== B || e.advanceCodePoint(); R(e.source.codePointAt(e.cursor) ?? -1); ) e.advanceCodePoint();
726
+ for (e.source.codePointAt(e.cursor) !== oe && e.source.codePointAt(e.cursor) !== B || e.advanceCodePoint(); R(e.source.codePointAt(e.cursor) ?? -1); ) e.advanceCodePoint();
625
727
  if (e.source.codePointAt(e.cursor) === 46 && R(e.source.codePointAt(e.cursor + 1) ?? -1)) for (e.advanceCodePoint(2), n = l.Number; R(e.source.codePointAt(e.cursor) ?? -1); ) e.advanceCodePoint();
626
728
  if (e.source.codePointAt(e.cursor) === 101 || e.source.codePointAt(e.cursor) === 69) {
627
729
  if (R(e.source.codePointAt(e.cursor + 1) ?? -1)) e.advanceCodePoint(2);
628
730
  else {
629
- if (e.source.codePointAt(e.cursor + 1) !== B && e.source.codePointAt(e.cursor + 1) !== ne || !R(e.source.codePointAt(e.cursor + 2) ?? -1)) return n;
731
+ if (e.source.codePointAt(e.cursor + 1) !== B && e.source.codePointAt(e.cursor + 1) !== oe || !R(e.source.codePointAt(e.cursor + 2) ?? -1)) return n;
630
732
  e.advanceCodePoint(3);
631
733
  }
632
734
  for (n = l.Number; R(e.source.codePointAt(e.cursor) ?? -1); ) e.advanceCodePoint();
633
735
  }
634
736
  return n;
635
737
  }
636
- function we(t, e) {
738
+ function Ne(t, e) {
637
739
  let n;
638
740
  {
639
741
  const i = e.source.codePointAt(e.cursor);
640
- i === B ? n = "-" : i === ne && (n = "+");
742
+ i === B ? n = "-" : i === oe && (n = "+");
641
743
  }
642
- const r = yt(0, e), o = parseFloat(e.source.slice(e.representationStart, e.representationEnd + 1));
643
- if (ye(0, e)) {
644
- const i = Se(t, e);
645
- return [a.Dimension, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: o, signCharacter: n, type: r, unit: String.fromCodePoint(...i) }];
744
+ const r = bt(0, e), o = parseFloat(e.source.slice(e.representationStart, e.representationEnd + 1));
745
+ if (Pe(0, e)) {
746
+ const i = Ae(t, e);
747
+ return [s.Dimension, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: o, signCharacter: n, type: r, unit: String.fromCodePoint(...i) }];
646
748
  }
647
- return e.source.codePointAt(e.cursor) === 37 ? (e.advanceCodePoint(), [a.Percentage, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: o, signCharacter: n }]) : [a.Number, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: o, signCharacter: n, type: r }];
749
+ return e.source.codePointAt(e.cursor) === 37 ? (e.advanceCodePoint(), [s.Percentage, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: o, signCharacter: n }]) : [s.Number, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: o, signCharacter: n, type: r }];
648
750
  }
649
- function Pt(t) {
650
- for (; K(t.source.codePointAt(t.cursor) ?? -1); ) t.advanceCodePoint();
651
- return [a.Whitespace, t.source.slice(t.representationStart, t.representationEnd + 1), t.representationStart, t.representationEnd, void 0];
751
+ function St(t) {
752
+ for (; X(t.source.codePointAt(t.cursor) ?? -1); ) t.advanceCodePoint();
753
+ return [s.Whitespace, t.source.slice(t.representationStart, t.representationEnd + 1), t.representationStart, t.representationEnd, void 0];
652
754
  }
653
755
  (function(t) {
654
756
  t.Comment = "comment", t.AtKeyword = "at-keyword-token", t.BadString = "bad-string-token", t.BadURL = "bad-url-token", t.CDC = "CDC-token", t.CDO = "CDO-token", t.Colon = "colon-token", t.Comma = "comma-token", t.Delim = "delim-token", t.Dimension = "dimension-token", t.EOF = "EOF-token", t.Function = "function-token", t.Hash = "hash-token", t.Ident = "ident-token", t.Number = "number-token", t.Percentage = "percentage-token", t.Semicolon = "semicolon-token", t.String = "string-token", t.URL = "url-token", t.Whitespace = "whitespace-token", t.OpenParen = "(-token", t.CloseParen = ")-token", t.OpenSquare = "[-token", t.CloseSquare = "]-token", t.OpenCurly = "{-token", t.CloseCurly = "}-token", t.UnicodeRange = "unicode-range-token";
655
- })(a || (a = {})), function(t) {
757
+ })(s || (s = {})), function(t) {
656
758
  t.Integer = "integer", t.Number = "number";
657
759
  }(l || (l = {})), function(t) {
658
760
  t.Unrestricted = "unrestricted", t.ID = "id";
659
- }(Pe || (Pe = {}));
660
- class kt {
761
+ }(ke || (ke = {}));
762
+ class At {
661
763
  constructor(e) {
662
- y(this, "cursor", 0);
663
- y(this, "source", "");
664
- y(this, "representationStart", 0);
665
- y(this, "representationEnd", -1);
764
+ E(this, "cursor", 0);
765
+ E(this, "source", "");
766
+ E(this, "representationStart", 0);
767
+ E(this, "representationEnd", -1);
666
768
  this.source = e;
667
769
  }
668
770
  advanceCodePoint(e = 1) {
@@ -679,310 +781,310 @@ class kt {
679
781
  this.representationStart = this.cursor, this.representationEnd = -1;
680
782
  }
681
783
  }
682
- function bt(t, e) {
784
+ function Dt(t, e) {
683
785
  let n = "";
684
786
  const r = e.readCodePoint();
685
787
  for (; ; ) {
686
788
  const o = e.readCodePoint();
687
789
  if (o === void 0) {
688
- const i = [a.String, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: n }];
689
- return t.onParseError(new j(z.UnexpectedEOFInString, e.representationStart, e.representationEnd, ["4.3.5. Consume a string token", "Unexpected EOF"], i)), i;
790
+ const i = [s.String, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: n }];
791
+ return t.onParseError(new J(H.UnexpectedEOFInString, e.representationStart, e.representationEnd, ["4.3.5. Consume a string token", "Unexpected EOF"], i)), i;
690
792
  }
691
793
  if (Ee(o)) {
692
794
  e.unreadCodePoint();
693
- const i = [a.BadString, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, void 0];
694
- return t.onParseError(new j(z.UnexpectedNewLineInString, e.representationStart, e.source.codePointAt(e.cursor) === ee && e.source.codePointAt(e.cursor + 1) === te ? e.representationEnd + 2 : e.representationEnd + 1, ["4.3.5. Consume a string token", "Unexpected newline"], i)), i;
795
+ const i = [s.BadString, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, void 0];
796
+ return t.onParseError(new J(H.UnexpectedNewLineInString, e.representationStart, e.source.codePointAt(e.cursor) === ne && e.source.codePointAt(e.cursor + 1) === re ? e.representationEnd + 2 : e.representationEnd + 1, ["4.3.5. Consume a string token", "Unexpected newline"], i)), i;
695
797
  }
696
- if (o === r) return [a.String, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: n }];
697
- if (o !== 92) o === 0 || oe(o) ? n += String.fromCodePoint(_) : n += String.fromCodePoint(o);
798
+ if (o === r) return [s.String, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: n }];
799
+ if (o !== 92) o === 0 || se(o) ? n += String.fromCodePoint(te) : n += String.fromCodePoint(o);
698
800
  else {
699
801
  if (e.source.codePointAt(e.cursor) === void 0) continue;
700
802
  if (Ee(e.source.codePointAt(e.cursor) ?? -1)) {
701
- e.source.codePointAt(e.cursor) === ee && e.source.codePointAt(e.cursor + 1) === te && e.advanceCodePoint(), e.advanceCodePoint();
803
+ e.source.codePointAt(e.cursor) === ne && e.source.codePointAt(e.cursor + 1) === re && e.advanceCodePoint(), e.advanceCodePoint();
702
804
  continue;
703
805
  }
704
- n += String.fromCodePoint(be(t, e));
806
+ n += String.fromCodePoint(Se(t, e));
705
807
  }
706
808
  }
707
809
  }
708
- function St(t) {
810
+ function Bt(t) {
709
811
  return !(t.length !== 3 || t[0] !== 117 && t[0] !== 85 || t[1] !== 114 && t[1] !== 82 || t[2] !== 108 && t[2] !== 76);
710
812
  }
711
- function Ne(t, e) {
813
+ function Ie(t, e) {
712
814
  for (; ; ) {
713
815
  const n = e.source.codePointAt(e.cursor);
714
816
  if (n === void 0) return;
715
817
  if (n === 41) return void e.advanceCodePoint();
716
- ue(e) ? (e.advanceCodePoint(), be(t, e)) : e.advanceCodePoint();
818
+ le(e) ? (e.advanceCodePoint(), Se(t, e)) : e.advanceCodePoint();
717
819
  }
718
820
  }
719
- function At(t, e) {
720
- for (; K(e.source.codePointAt(e.cursor) ?? -1); ) e.advanceCodePoint();
821
+ function Ft(t, e) {
822
+ for (; X(e.source.codePointAt(e.cursor) ?? -1); ) e.advanceCodePoint();
721
823
  let n = "";
722
824
  for (; ; ) {
723
825
  if (e.source.codePointAt(e.cursor) === void 0) {
724
- const i = [a.URL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: n }];
725
- return t.onParseError(new j(z.UnexpectedEOFInURL, e.representationStart, e.representationEnd, ["4.3.6. Consume a url token", "Unexpected EOF"], i)), i;
826
+ const i = [s.URL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: n }];
827
+ return t.onParseError(new J(H.UnexpectedEOFInURL, e.representationStart, e.representationEnd, ["4.3.6. Consume a url token", "Unexpected EOF"], i)), i;
726
828
  }
727
- if (e.source.codePointAt(e.cursor) === 41) return e.advanceCodePoint(), [a.URL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: n }];
728
- if (K(e.source.codePointAt(e.cursor) ?? -1)) {
729
- for (e.advanceCodePoint(); K(e.source.codePointAt(e.cursor) ?? -1); ) e.advanceCodePoint();
829
+ if (e.source.codePointAt(e.cursor) === 41) return e.advanceCodePoint(), [s.URL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: n }];
830
+ if (X(e.source.codePointAt(e.cursor) ?? -1)) {
831
+ for (e.advanceCodePoint(); X(e.source.codePointAt(e.cursor) ?? -1); ) e.advanceCodePoint();
730
832
  if (e.source.codePointAt(e.cursor) === void 0) {
731
- const i = [a.URL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: n }];
732
- return t.onParseError(new j(z.UnexpectedEOFInURL, e.representationStart, e.representationEnd, ["4.3.6. Consume a url token", "Consume as much whitespace as possible", "Unexpected EOF"], i)), i;
833
+ const i = [s.URL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: n }];
834
+ return t.onParseError(new J(H.UnexpectedEOFInURL, e.representationStart, e.representationEnd, ["4.3.6. Consume a url token", "Consume as much whitespace as possible", "Unexpected EOF"], i)), i;
733
835
  }
734
- return e.source.codePointAt(e.cursor) === 41 ? (e.advanceCodePoint(), [a.URL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: n }]) : (Ne(t, e), [a.BadURL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, void 0]);
836
+ return e.source.codePointAt(e.cursor) === 41 ? (e.advanceCodePoint(), [s.URL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: n }]) : (Ie(t, e), [s.BadURL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, void 0]);
735
837
  }
736
838
  const o = e.source.codePointAt(e.cursor);
737
839
  if (o === 34 || o === 39 || o === 40 || (r = o ?? -1) === 11 || r === 127 || 0 <= r && r <= 8 || 14 <= r && r <= 31) {
738
- Ne(t, e);
739
- const i = [a.BadURL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, void 0];
740
- return t.onParseError(new j(z.UnexpectedCharacterInURL, e.representationStart, e.representationEnd, ["4.3.6. Consume a url token", `Unexpected U+0022 QUOTATION MARK ("), U+0027 APOSTROPHE ('), U+0028 LEFT PARENTHESIS (() or non-printable code point`], i)), i;
840
+ Ie(t, e);
841
+ const i = [s.BadURL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, void 0];
842
+ return t.onParseError(new J(H.UnexpectedCharacterInURL, e.representationStart, e.representationEnd, ["4.3.6. Consume a url token", `Unexpected U+0022 QUOTATION MARK ("), U+0027 APOSTROPHE ('), U+0028 LEFT PARENTHESIS (() or non-printable code point`], i)), i;
741
843
  }
742
844
  if (o === 92) {
743
- if (ue(e)) {
744
- e.advanceCodePoint(), n += String.fromCodePoint(be(t, e));
845
+ if (le(e)) {
846
+ e.advanceCodePoint(), n += String.fromCodePoint(Se(t, e));
745
847
  continue;
746
848
  }
747
- Ne(t, e);
748
- const i = [a.BadURL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, void 0];
749
- return t.onParseError(new j(z.InvalidEscapeSequenceInURL, e.representationStart, e.representationEnd, ["4.3.6. Consume a url token", "U+005C REVERSE SOLIDUS (\\)", "The input stream does not start with a valid escape sequence"], i)), i;
849
+ Ie(t, e);
850
+ const i = [s.BadURL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, void 0];
851
+ return t.onParseError(new J(H.InvalidEscapeSequenceInURL, e.representationStart, e.representationEnd, ["4.3.6. Consume a url token", "U+005C REVERSE SOLIDUS (\\)", "The input stream does not start with a valid escape sequence"], i)), i;
750
852
  }
751
- e.source.codePointAt(e.cursor) === 0 || oe(e.source.codePointAt(e.cursor) ?? -1) ? (n += String.fromCodePoint(_), e.advanceCodePoint()) : (n += e.source[e.cursor], e.advanceCodePoint());
853
+ e.source.codePointAt(e.cursor) === 0 || se(e.source.codePointAt(e.cursor) ?? -1) ? (n += String.fromCodePoint(te), e.advanceCodePoint()) : (n += e.source[e.cursor], e.advanceCodePoint());
752
854
  }
753
855
  var r;
754
856
  }
755
- function Ie(t, e) {
756
- const n = Se(t, e);
757
- if (e.source.codePointAt(e.cursor) !== 40) return [a.Ident, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: String.fromCodePoint(...n) }];
758
- if (St(n)) {
857
+ function xe(t, e) {
858
+ const n = Ae(t, e);
859
+ if (e.source.codePointAt(e.cursor) !== 40) return [s.Ident, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: String.fromCodePoint(...n) }];
860
+ if (Bt(n)) {
759
861
  e.advanceCodePoint();
760
862
  let r = 0;
761
863
  for (; ; ) {
762
- const o = K(e.source.codePointAt(e.cursor) ?? -1), i = K(e.source.codePointAt(e.cursor + 1) ?? -1);
864
+ const o = X(e.source.codePointAt(e.cursor) ?? -1), i = X(e.source.codePointAt(e.cursor + 1) ?? -1);
763
865
  if (o && i) {
764
866
  r += 1, e.advanceCodePoint(1);
765
867
  continue;
766
868
  }
767
- const s = o ? e.source.codePointAt(e.cursor + 1) : e.source.codePointAt(e.cursor);
768
- if (s === 34 || s === 39) return r > 0 && e.unreadCodePoint(r), [a.Function, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: String.fromCodePoint(...n) }];
869
+ const a = o ? e.source.codePointAt(e.cursor + 1) : e.source.codePointAt(e.cursor);
870
+ if (a === 34 || a === 39) return r > 0 && e.unreadCodePoint(r), [s.Function, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: String.fromCodePoint(...n) }];
769
871
  break;
770
872
  }
771
- return At(t, e);
873
+ return Ft(t, e);
772
874
  }
773
- return e.advanceCodePoint(), [a.Function, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: String.fromCodePoint(...n) }];
875
+ return e.advanceCodePoint(), [s.Function, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: String.fromCodePoint(...n) }];
774
876
  }
775
- function Dt(t) {
776
- return !(t.source.codePointAt(t.cursor) !== 117 && t.source.codePointAt(t.cursor) !== 85 || t.source.codePointAt(t.cursor + 1) !== ne || t.source.codePointAt(t.cursor + 2) !== 63 && !Z(t.source.codePointAt(t.cursor + 2) ?? -1));
877
+ function wt(t) {
878
+ return !(t.source.codePointAt(t.cursor) !== 117 && t.source.codePointAt(t.cursor) !== 85 || t.source.codePointAt(t.cursor + 1) !== oe || t.source.codePointAt(t.cursor + 2) !== 63 && !Q(t.source.codePointAt(t.cursor + 2) ?? -1));
777
879
  }
778
- function Bt(t, e) {
880
+ function Nt(t, e) {
779
881
  e.advanceCodePoint(2);
780
882
  const n = [], r = [];
781
883
  let o;
782
- for (; (o = e.source.codePointAt(e.cursor)) !== void 0 && n.length < 6 && Z(o); ) n.push(o), e.advanceCodePoint();
884
+ for (; (o = e.source.codePointAt(e.cursor)) !== void 0 && n.length < 6 && Q(o); ) n.push(o), e.advanceCodePoint();
783
885
  for (; (o = e.source.codePointAt(e.cursor)) !== void 0 && n.length < 6 && o === 63; ) r.length === 0 && r.push(...n), n.push(48), r.push(70), e.advanceCodePoint();
784
- if (!r.length && e.source.codePointAt(e.cursor) === B && Z(e.source.codePointAt(e.cursor + 1) ?? -1)) for (e.advanceCodePoint(); (o = e.source.codePointAt(e.cursor)) !== void 0 && r.length < 6 && Z(o); ) r.push(o), e.advanceCodePoint();
886
+ if (!r.length && e.source.codePointAt(e.cursor) === B && Q(e.source.codePointAt(e.cursor + 1) ?? -1)) for (e.advanceCodePoint(); (o = e.source.codePointAt(e.cursor)) !== void 0 && r.length < 6 && Q(o); ) r.push(o), e.advanceCodePoint();
785
887
  if (!r.length) {
786
888
  const u = parseInt(String.fromCodePoint(...n), 16);
787
- return [a.UnicodeRange, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { startOfRange: u, endOfRange: u }];
889
+ return [s.UnicodeRange, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { startOfRange: u, endOfRange: u }];
788
890
  }
789
- const i = parseInt(String.fromCodePoint(...n), 16), s = parseInt(String.fromCodePoint(...r), 16);
790
- return [a.UnicodeRange, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { startOfRange: i, endOfRange: s }];
891
+ const i = parseInt(String.fromCodePoint(...n), 16), a = parseInt(String.fromCodePoint(...r), 16);
892
+ return [s.UnicodeRange, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { startOfRange: i, endOfRange: a }];
791
893
  }
792
- function Ft(t, e) {
793
- const n = wt(t), r = [];
894
+ function It(t, e) {
895
+ const n = xt(t), r = [];
794
896
  for (; !n.endOfFile(); ) r.push(n.nextToken());
795
897
  return r.push(n.nextToken()), r;
796
898
  }
797
- function wt(t, e) {
798
- const n = t.css.valueOf(), r = t.unicodeRangesAllowed ?? !1, o = new kt(n), i = { onParseError: Nt };
899
+ function xt(t, e) {
900
+ const n = t.css.valueOf(), r = t.unicodeRangesAllowed ?? !1, o = new At(n), i = { onParseError: Tt };
799
901
  return { nextToken: function() {
800
902
  o.resetRepresentation();
801
903
  const u = o.source.codePointAt(o.cursor);
802
- if (u === void 0) return [a.EOF, "", -1, -1, void 0];
803
- if (u === 47 && vt(o)) return Ct(i, o);
804
- if (r && (u === 117 || u === 85) && Dt(o)) return Bt(0, o);
805
- if (re(u)) return Ie(i, o);
806
- if (R(u)) return we(i, o);
904
+ if (u === void 0) return [s.EOF, "", -1, -1, void 0];
905
+ if (u === 47 && ht(o)) return Pt(i, o);
906
+ if (r && (u === 117 || u === 85) && wt(o)) return Nt(0, o);
907
+ if (ie(u)) return xe(i, o);
908
+ if (R(u)) return Ne(i, o);
807
909
  switch (u) {
808
910
  case 44:
809
- return o.advanceCodePoint(), [a.Comma, ",", o.representationStart, o.representationEnd, void 0];
911
+ return o.advanceCodePoint(), [s.Comma, ",", o.representationStart, o.representationEnd, void 0];
810
912
  case 58:
811
- return o.advanceCodePoint(), [a.Colon, ":", o.representationStart, o.representationEnd, void 0];
913
+ return o.advanceCodePoint(), [s.Colon, ":", o.representationStart, o.representationEnd, void 0];
812
914
  case 59:
813
- return o.advanceCodePoint(), [a.Semicolon, ";", o.representationStart, o.representationEnd, void 0];
915
+ return o.advanceCodePoint(), [s.Semicolon, ";", o.representationStart, o.representationEnd, void 0];
814
916
  case 40:
815
- return o.advanceCodePoint(), [a.OpenParen, "(", o.representationStart, o.representationEnd, void 0];
917
+ return o.advanceCodePoint(), [s.OpenParen, "(", o.representationStart, o.representationEnd, void 0];
816
918
  case 41:
817
- return o.advanceCodePoint(), [a.CloseParen, ")", o.representationStart, o.representationEnd, void 0];
919
+ return o.advanceCodePoint(), [s.CloseParen, ")", o.representationStart, o.representationEnd, void 0];
818
920
  case 91:
819
- return o.advanceCodePoint(), [a.OpenSquare, "[", o.representationStart, o.representationEnd, void 0];
921
+ return o.advanceCodePoint(), [s.OpenSquare, "[", o.representationStart, o.representationEnd, void 0];
820
922
  case 93:
821
- return o.advanceCodePoint(), [a.CloseSquare, "]", o.representationStart, o.representationEnd, void 0];
923
+ return o.advanceCodePoint(), [s.CloseSquare, "]", o.representationStart, o.representationEnd, void 0];
822
924
  case 123:
823
- return o.advanceCodePoint(), [a.OpenCurly, "{", o.representationStart, o.representationEnd, void 0];
925
+ return o.advanceCodePoint(), [s.OpenCurly, "{", o.representationStart, o.representationEnd, void 0];
824
926
  case 125:
825
- return o.advanceCodePoint(), [a.CloseCurly, "}", o.representationStart, o.representationEnd, void 0];
927
+ return o.advanceCodePoint(), [s.CloseCurly, "}", o.representationStart, o.representationEnd, void 0];
826
928
  case 39:
827
929
  case 34:
828
- return bt(i, o);
930
+ return Dt(i, o);
829
931
  case 35:
830
- return Et(i, o);
831
- case ne:
932
+ return kt(i, o);
933
+ case oe:
832
934
  case 46:
833
- return We(o) ? we(i, o) : (o.advanceCodePoint(), [a.Delim, o.source[o.representationStart], o.representationStart, o.representationEnd, { value: o.source[o.representationStart] }]);
834
- case te:
835
- case ee:
935
+ return qe(o) ? Ne(i, o) : (o.advanceCodePoint(), [s.Delim, o.source[o.representationStart], o.representationStart, o.representationEnd, { value: o.source[o.representationStart] }]);
936
+ case re:
937
+ case ne:
836
938
  case 12:
837
939
  case 9:
838
940
  case 32:
839
- return Pt(o);
941
+ return St(o);
840
942
  case B:
841
- return We(o) ? we(i, o) : mt(o) ? (o.advanceCodePoint(3), [a.CDC, "-->", o.representationStart, o.representationEnd, void 0]) : ye(0, o) ? Ie(i, o) : (o.advanceCodePoint(), [a.Delim, "-", o.representationStart, o.representationEnd, { value: "-" }]);
943
+ return qe(o) ? Ne(i, o) : Ct(o) ? (o.advanceCodePoint(3), [s.CDC, "-->", o.representationStart, o.representationEnd, void 0]) : Pe(0, o) ? xe(i, o) : (o.advanceCodePoint(), [s.Delim, "-", o.representationStart, o.representationEnd, { value: "-" }]);
842
944
  case 60:
843
- return ct(o) ? (o.advanceCodePoint(4), [a.CDO, "<!--", o.representationStart, o.representationEnd, void 0]) : (o.advanceCodePoint(), [a.Delim, "<", o.representationStart, o.representationEnd, { value: "<" }]);
945
+ return dt(o) ? (o.advanceCodePoint(4), [s.CDO, "<!--", o.representationStart, o.representationEnd, void 0]) : (o.advanceCodePoint(), [s.Delim, "<", o.representationStart, o.representationEnd, { value: "<" }]);
844
946
  case 64:
845
- if (o.advanceCodePoint(), ye(0, o)) {
846
- const c = Se(i, o);
847
- return [a.AtKeyword, o.source.slice(o.representationStart, o.representationEnd + 1), o.representationStart, o.representationEnd, { value: String.fromCodePoint(...c) }];
947
+ if (o.advanceCodePoint(), Pe(0, o)) {
948
+ const c = Ae(i, o);
949
+ return [s.AtKeyword, o.source.slice(o.representationStart, o.representationEnd + 1), o.representationStart, o.representationEnd, { value: String.fromCodePoint(...c) }];
848
950
  }
849
- return [a.Delim, "@", o.representationStart, o.representationEnd, { value: "@" }];
951
+ return [s.Delim, "@", o.representationStart, o.representationEnd, { value: "@" }];
850
952
  case 92: {
851
- if (ue(o)) return Ie(i, o);
953
+ if (le(o)) return xe(i, o);
852
954
  o.advanceCodePoint();
853
- const c = [a.Delim, "\\", o.representationStart, o.representationEnd, { value: "\\" }];
854
- return i.onParseError(new j(z.InvalidEscapeSequenceAfterBackslash, o.representationStart, o.representationEnd, ["4.3.1. Consume a token", "U+005C REVERSE SOLIDUS (\\)", "The input stream does not start with a valid escape sequence"], c)), c;
955
+ const c = [s.Delim, "\\", o.representationStart, o.representationEnd, { value: "\\" }];
956
+ return i.onParseError(new J(H.InvalidEscapeSequenceAfterBackslash, o.representationStart, o.representationEnd, ["4.3.1. Consume a token", "U+005C REVERSE SOLIDUS (\\)", "The input stream does not start with a valid escape sequence"], c)), c;
855
957
  }
856
958
  }
857
- return o.advanceCodePoint(), [a.Delim, o.source[o.representationStart], o.representationStart, o.representationEnd, { value: o.source[o.representationStart] }];
959
+ return o.advanceCodePoint(), [s.Delim, o.source[o.representationStart], o.representationStart, o.representationEnd, { value: o.source[o.representationStart] }];
858
960
  }, endOfFile: function() {
859
961
  return o.source.codePointAt(o.cursor) === void 0;
860
962
  } };
861
963
  }
862
- function Nt() {
964
+ function Tt() {
863
965
  }
864
- function It(t, e) {
966
+ function Ot(t, e) {
865
967
  const n = [];
866
968
  for (const u of e) n.push(u.codePointAt(0));
867
- const r = xt(n);
868
- r[0] === 101 && Ce(r, 0, r[0]);
869
- const o = String.fromCodePoint(...r), i = t[4].signCharacter === "+" ? t[4].signCharacter : "", s = t[4].value.toString();
870
- t[1] = `${i}${s}${o}`, t[4].unit = e;
969
+ const r = Mt(n);
970
+ r[0] === 101 && ye(r, 0, r[0]);
971
+ const o = String.fromCodePoint(...r), i = t[4].signCharacter === "+" ? t[4].signCharacter : "", a = t[4].value.toString();
972
+ t[1] = `${i}${a}${o}`, t[4].unit = e;
871
973
  }
872
- function xt(t) {
974
+ function Mt(t) {
873
975
  let e = 0;
874
- t[0] === B && t[1] === B ? e = 2 : t[0] === B && t[1] ? (e = 2, re(t[1]) || (e += Ce(t, 1, t[1]))) : re(t[0]) ? e = 1 : (e = 1, e += Ce(t, 0, t[0]));
875
- for (let n = e; n < t.length; n++) Oe(t[n]) || (n += Ce(t, n, t[n]));
976
+ t[0] === B && t[1] === B ? e = 2 : t[0] === B && t[1] ? (e = 2, ie(t[1]) || (e += ye(t, 1, t[1]))) : ie(t[0]) ? e = 1 : (e = 1, e += ye(t, 0, t[0]));
977
+ for (let n = e; n < t.length; n++) Me(t[n]) || (n += ye(t, n, t[n]));
876
978
  return t;
877
979
  }
878
- function Ce(t, e, n) {
980
+ function ye(t, e, n) {
879
981
  const r = n.toString(16), o = [];
880
- for (const s of r) o.push(s.codePointAt(0));
982
+ for (const a of r) o.push(a.codePointAt(0));
881
983
  const i = t[e + 1];
882
- return e === t.length - 1 || i && Z(i) ? (t.splice(e, 1, 92, ...o, 32), 1 + o.length) : (t.splice(e, 1, 92, ...o), o.length);
984
+ return e === t.length - 1 || i && Q(i) ? (t.splice(e, 1, 92, ...o, 32), 1 + o.length) : (t.splice(e, 1, 92, ...o), o.length);
883
985
  }
884
- const Ot = Object.values(a);
885
- function Ge(t) {
886
- return !!Array.isArray(t) && !(t.length < 4) && !!Ot.includes(t[0]) && typeof t[1] == "string" && typeof t[2] == "number" && typeof t[3] == "number";
986
+ const Rt = Object.values(s);
987
+ function Ye(t) {
988
+ return !!Array.isArray(t) && !(t.length < 4) && !!Rt.includes(t[0]) && typeof t[1] == "string" && typeof t[2] == "number" && typeof t[3] == "number";
887
989
  }
888
990
  function D(t) {
889
991
  if (!t) return !1;
890
992
  switch (t[0]) {
891
- case a.Dimension:
892
- case a.Number:
893
- case a.Percentage:
993
+ case s.Dimension:
994
+ case s.Number:
995
+ case s.Percentage:
894
996
  return !0;
895
997
  default:
896
998
  return !1;
897
999
  }
898
1000
  }
899
- function Je(t) {
1001
+ function Ze(t) {
900
1002
  if (!t) return !1;
901
1003
  switch (t[0]) {
902
- case a.Whitespace:
903
- case a.Comment:
1004
+ case s.Whitespace:
1005
+ case s.Comment:
904
1006
  return !0;
905
1007
  default:
906
1008
  return !1;
907
1009
  }
908
1010
  }
909
- function Y(t) {
910
- return !!t && t[0] === a.Comma;
1011
+ function K(t) {
1012
+ return !!t && t[0] === s.Comma;
911
1013
  }
912
- function Ye(t) {
913
- return !!t && t[0] === a.Comment;
1014
+ function Ke(t) {
1015
+ return !!t && t[0] === s.Comment;
914
1016
  }
915
- function Le(t) {
916
- return !!t && t[0] === a.Delim;
1017
+ function $e(t) {
1018
+ return !!t && t[0] === s.Delim;
917
1019
  }
918
1020
  function k(t) {
919
- return !!t && t[0] === a.Dimension;
1021
+ return !!t && t[0] === s.Dimension;
920
1022
  }
921
- function G(t) {
922
- return !!t && t[0] === a.EOF;
1023
+ function Y(t) {
1024
+ return !!t && t[0] === s.EOF;
923
1025
  }
924
- function Tt(t) {
925
- return !!t && t[0] === a.Function;
1026
+ function Ut(t) {
1027
+ return !!t && t[0] === s.Function;
926
1028
  }
927
- function de(t) {
928
- return !!t && t[0] === a.Ident;
1029
+ function fe(t) {
1030
+ return !!t && t[0] === s.Ident;
929
1031
  }
930
1032
  function h(t) {
931
- return !!t && t[0] === a.Number;
1033
+ return !!t && t[0] === s.Number;
932
1034
  }
933
- function A(t) {
934
- return !!t && t[0] === a.Percentage;
1035
+ function S(t) {
1036
+ return !!t && t[0] === s.Percentage;
935
1037
  }
936
- function Te(t) {
937
- return !!t && t[0] === a.Whitespace;
1038
+ function Re(t) {
1039
+ return !!t && t[0] === s.Whitespace;
938
1040
  }
939
- function Ze(t) {
940
- return !!t && t[0] === a.OpenParen;
1041
+ function Qe(t) {
1042
+ return !!t && t[0] === s.OpenParen;
941
1043
  }
942
- function Rt(t) {
943
- return !!t && t[0] === a.CloseParen;
1044
+ function Wt(t) {
1045
+ return !!t && t[0] === s.CloseParen;
944
1046
  }
945
- function Mt(t) {
946
- return !!t && t[0] === a.OpenSquare;
1047
+ function Lt(t) {
1048
+ return !!t && t[0] === s.OpenSquare;
947
1049
  }
948
- function Ut(t) {
949
- return !!t && t[0] === a.OpenCurly;
1050
+ function qt(t) {
1051
+ return !!t && t[0] === s.OpenCurly;
950
1052
  }
951
- var M;
952
- function Ke(t) {
1053
+ var U;
1054
+ function Xe(t) {
953
1055
  let e = t.slice();
954
1056
  return (n, r, o) => {
955
1057
  let i = -1;
956
- for (let s = e.indexOf(r); s < e.length && (i = n.indexOf(e[s]), i === -1 || i < o); s++) ;
1058
+ for (let a = e.indexOf(r); a < e.length && (i = n.indexOf(e[a]), i === -1 || i < o); a++) ;
957
1059
  return i === -1 || i === o && r === n[o] && (i++, i >= n.length) ? -1 : (e = n.slice(), i);
958
1060
  };
959
1061
  }
960
- function Re(t, e) {
1062
+ function Ue(t, e) {
961
1063
  const n = e[0];
962
- if (Ze(n) || Ut(n) || Mt(n)) {
963
- const r = Lt(t, e);
1064
+ if (Qe(n) || qt(n) || Lt(n)) {
1065
+ const r = zt(t, e);
964
1066
  return { advance: r.advance, node: r.node };
965
1067
  }
966
- if (Tt(n)) {
967
- const r = Wt(t, e);
1068
+ if (Ut(n)) {
1069
+ const r = $t(t, e);
968
1070
  return { advance: r.advance, node: r.node };
969
1071
  }
970
- if (Te(n)) {
971
- const r = Xe(t, e);
1072
+ if (Re(n)) {
1073
+ const r = et(t, e);
972
1074
  return { advance: r.advance, node: r.node };
973
1075
  }
974
- if (Ye(n)) {
975
- const r = qt(t, e);
1076
+ if (Ke(n)) {
1077
+ const r = Vt(t, e);
976
1078
  return { advance: r.advance, node: r.node };
977
1079
  }
978
- return { advance: 1, node: new d(n) };
1080
+ return { advance: 1, node: new p(n) };
979
1081
  }
980
1082
  (function(t) {
981
1083
  t.Function = "function", t.SimpleBlock = "simple-block", t.Whitespace = "whitespace", t.Comment = "comment", t.Token = "token";
982
- })(M || (M = {}));
983
- class Qe {
1084
+ })(U || (U = {}));
1085
+ class _e {
984
1086
  constructor() {
985
- y(this, "value", []);
1087
+ E(this, "value", []);
986
1088
  }
987
1089
  indexOf(e) {
988
1090
  return this.value.indexOf(e);
@@ -992,12 +1094,12 @@ class Qe {
992
1094
  }
993
1095
  forEach(e, n) {
994
1096
  if (this.value.length === 0) return;
995
- const r = Ke(this.value);
1097
+ const r = Xe(this.value);
996
1098
  let o = 0;
997
1099
  for (; o < this.value.length; ) {
998
1100
  const i = this.value[o];
999
- let s;
1000
- if (n && (s = { ...n }), e({ node: i, parent: this, state: s }, o) === !1) return !1;
1101
+ let a;
1102
+ if (n && (a = { ...n }), e({ node: i, parent: this, state: a }, o) === !1) return !1;
1001
1103
  if (o = r(this.value, i, o), o === -1) break;
1002
1104
  }
1003
1105
  }
@@ -1005,25 +1107,25 @@ class Qe {
1005
1107
  this.value.length !== 0 && this.forEach((r, o) => e(r, o) !== !1 && (!("walk" in r.node) || !this.value.includes(r.node) || r.node.walk(e, r.state) !== !1) && void 0, n);
1006
1108
  }
1007
1109
  }
1008
- class F extends Qe {
1110
+ class F extends _e {
1009
1111
  constructor(n, r, o) {
1010
1112
  super();
1011
- y(this, "type", M.Function);
1012
- y(this, "name");
1013
- y(this, "endToken");
1113
+ E(this, "type", U.Function);
1114
+ E(this, "name");
1115
+ E(this, "endToken");
1014
1116
  this.name = n, this.endToken = r, this.value = o;
1015
1117
  }
1016
1118
  getName() {
1017
1119
  return this.name[4].value;
1018
1120
  }
1019
1121
  normalize() {
1020
- G(this.endToken) && (this.endToken = [a.CloseParen, ")", -1, -1, void 0]);
1122
+ Y(this.endToken) && (this.endToken = [s.CloseParen, ")", -1, -1, void 0]);
1021
1123
  }
1022
1124
  tokens() {
1023
- return G(this.endToken) ? [this.name, ...this.value.flatMap((n) => n.tokens())] : [this.name, ...this.value.flatMap((n) => n.tokens()), this.endToken];
1125
+ return Y(this.endToken) ? [this.name, ...this.value.flatMap((n) => n.tokens())] : [this.name, ...this.value.flatMap((n) => n.tokens()), this.endToken];
1024
1126
  }
1025
1127
  toString() {
1026
- const n = this.value.map((r) => Ge(r) ? W(r) : r.toString()).join("");
1128
+ const n = this.value.map((r) => Ye(r) ? W(r) : r.toString()).join("");
1027
1129
  return W(this.name) + n + W(this.endToken);
1028
1130
  }
1029
1131
  toJSON() {
@@ -1033,78 +1135,78 @@ class F extends Qe {
1033
1135
  return F.isFunctionNode(this);
1034
1136
  }
1035
1137
  static isFunctionNode(n) {
1036
- return !!n && n instanceof F && n.type === M.Function;
1138
+ return !!n && n instanceof F && n.type === U.Function;
1037
1139
  }
1038
1140
  }
1039
- function Wt(t, e) {
1141
+ function $t(t, e) {
1040
1142
  const n = [];
1041
1143
  let r = 1;
1042
1144
  for (; ; ) {
1043
1145
  const o = e[r];
1044
- if (!o || G(o)) return t.onParseError(new ke("Unexpected EOF while consuming a function.", e[0][2], e[e.length - 1][3], ["5.4.9. Consume a function", "Unexpected EOF"])), { advance: e.length, node: new F(e[0], o, n) };
1045
- if (Rt(o)) return { advance: r + 1, node: new F(e[0], o, n) };
1046
- if (Je(o)) {
1047
- const s = _e(t, e.slice(r));
1048
- r += s.advance, n.push(...s.nodes);
1146
+ if (!o || Y(o)) return t.onParseError(new be("Unexpected EOF while consuming a function.", e[0][2], e[e.length - 1][3], ["5.4.9. Consume a function", "Unexpected EOF"])), { advance: e.length, node: new F(e[0], o, n) };
1147
+ if (Wt(o)) return { advance: r + 1, node: new F(e[0], o, n) };
1148
+ if (Ze(o)) {
1149
+ const a = tt(t, e.slice(r));
1150
+ r += a.advance, n.push(...a.nodes);
1049
1151
  continue;
1050
1152
  }
1051
- const i = Re(t, e.slice(r));
1153
+ const i = Ue(t, e.slice(r));
1052
1154
  r += i.advance, n.push(i.node);
1053
1155
  }
1054
1156
  }
1055
- class ie extends Qe {
1157
+ class ae extends _e {
1056
1158
  constructor(n, r, o) {
1057
1159
  super();
1058
- y(this, "type", M.SimpleBlock);
1059
- y(this, "startToken");
1060
- y(this, "endToken");
1160
+ E(this, "type", U.SimpleBlock);
1161
+ E(this, "startToken");
1162
+ E(this, "endToken");
1061
1163
  this.startToken = n, this.endToken = r, this.value = o;
1062
1164
  }
1063
1165
  normalize() {
1064
- if (G(this.endToken)) {
1065
- const n = ht(this.startToken);
1166
+ if (Y(this.endToken)) {
1167
+ const n = Et(this.startToken);
1066
1168
  n && (this.endToken = n);
1067
1169
  }
1068
1170
  }
1069
1171
  tokens() {
1070
- return G(this.endToken) ? [this.startToken, ...this.value.flatMap((n) => n.tokens())] : [this.startToken, ...this.value.flatMap((n) => n.tokens()), this.endToken];
1172
+ return Y(this.endToken) ? [this.startToken, ...this.value.flatMap((n) => n.tokens())] : [this.startToken, ...this.value.flatMap((n) => n.tokens()), this.endToken];
1071
1173
  }
1072
1174
  toString() {
1073
- const n = this.value.map((r) => Ge(r) ? W(r) : r.toString()).join("");
1175
+ const n = this.value.map((r) => Ye(r) ? W(r) : r.toString()).join("");
1074
1176
  return W(this.startToken) + n + W(this.endToken);
1075
1177
  }
1076
1178
  toJSON() {
1077
1179
  return { type: this.type, startToken: this.startToken, tokens: this.tokens(), value: this.value.map((n) => n.toJSON()) };
1078
1180
  }
1079
1181
  isSimpleBlockNode() {
1080
- return ie.isSimpleBlockNode(this);
1182
+ return ae.isSimpleBlockNode(this);
1081
1183
  }
1082
1184
  static isSimpleBlockNode(n) {
1083
- return !!n && n instanceof ie && n.type === M.SimpleBlock;
1185
+ return !!n && n instanceof ae && n.type === U.SimpleBlock;
1084
1186
  }
1085
1187
  }
1086
- function Lt(t, e) {
1087
- const n = gt(e[0][0]);
1188
+ function zt(t, e) {
1189
+ const n = yt(e[0][0]);
1088
1190
  if (!n) throw new Error("Failed to parse, a mirror variant must exist for all block open tokens.");
1089
1191
  const r = [];
1090
1192
  let o = 1;
1091
1193
  for (; ; ) {
1092
1194
  const i = e[o];
1093
- if (!i || G(i)) return t.onParseError(new ke("Unexpected EOF while consuming a simple block.", e[0][2], e[e.length - 1][3], ["5.4.8. Consume a simple block", "Unexpected EOF"])), { advance: e.length, node: new ie(e[0], i, r) };
1094
- if (i[0] === n) return { advance: o + 1, node: new ie(e[0], i, r) };
1095
- if (Je(i)) {
1096
- const u = _e(t, e.slice(o));
1195
+ if (!i || Y(i)) return t.onParseError(new be("Unexpected EOF while consuming a simple block.", e[0][2], e[e.length - 1][3], ["5.4.8. Consume a simple block", "Unexpected EOF"])), { advance: e.length, node: new ae(e[0], i, r) };
1196
+ if (i[0] === n) return { advance: o + 1, node: new ae(e[0], i, r) };
1197
+ if (Ze(i)) {
1198
+ const u = tt(t, e.slice(o));
1097
1199
  o += u.advance, r.push(...u.nodes);
1098
1200
  continue;
1099
1201
  }
1100
- const s = Re(t, e.slice(o));
1101
- o += s.advance, r.push(s.node);
1202
+ const a = Ue(t, e.slice(o));
1203
+ o += a.advance, r.push(a.node);
1102
1204
  }
1103
1205
  }
1104
1206
  class I {
1105
1207
  constructor(e) {
1106
- y(this, "type", M.Whitespace);
1107
- y(this, "value");
1208
+ E(this, "type", U.Whitespace);
1209
+ E(this, "value");
1108
1210
  this.value = e;
1109
1211
  }
1110
1212
  tokens() {
@@ -1120,21 +1222,21 @@ class I {
1120
1222
  return I.isWhitespaceNode(this);
1121
1223
  }
1122
1224
  static isWhitespaceNode(e) {
1123
- return !!e && e instanceof I && e.type === M.Whitespace;
1225
+ return !!e && e instanceof I && e.type === U.Whitespace;
1124
1226
  }
1125
1227
  }
1126
- function Xe(t, e) {
1228
+ function et(t, e) {
1127
1229
  let n = 0;
1128
1230
  for (; ; ) {
1129
1231
  const r = e[n];
1130
- if (!Te(r)) return { advance: n, node: new I(e.slice(0, n)) };
1232
+ if (!Re(r)) return { advance: n, node: new I(e.slice(0, n)) };
1131
1233
  n++;
1132
1234
  }
1133
1235
  }
1134
- class ae {
1236
+ class ue {
1135
1237
  constructor(e) {
1136
- y(this, "type", M.Comment);
1137
- y(this, "value");
1238
+ E(this, "type", U.Comment);
1239
+ E(this, "value");
1138
1240
  this.value = e;
1139
1241
  }
1140
1242
  tokens() {
@@ -1147,30 +1249,30 @@ class ae {
1147
1249
  return { type: this.type, tokens: this.tokens() };
1148
1250
  }
1149
1251
  isCommentNode() {
1150
- return ae.isCommentNode(this);
1252
+ return ue.isCommentNode(this);
1151
1253
  }
1152
1254
  static isCommentNode(e) {
1153
- return !!e && e instanceof ae && e.type === M.Comment;
1255
+ return !!e && e instanceof ue && e.type === U.Comment;
1154
1256
  }
1155
1257
  }
1156
- function qt(t, e) {
1157
- return { advance: 1, node: new ae(e[0]) };
1258
+ function Vt(t, e) {
1259
+ return { advance: 1, node: new ue(e[0]) };
1158
1260
  }
1159
- function _e(t, e) {
1261
+ function tt(t, e) {
1160
1262
  const n = [];
1161
1263
  let r = 0;
1162
- for (; ; ) if (Te(e[r])) {
1163
- const o = Xe(0, e.slice(r));
1264
+ for (; ; ) if (Re(e[r])) {
1265
+ const o = et(0, e.slice(r));
1164
1266
  r += o.advance, n.push(o.node);
1165
1267
  } else {
1166
- if (!Ye(e[r])) return { advance: r, nodes: n };
1167
- n.push(new ae(e[r])), r++;
1268
+ if (!Ke(e[r])) return { advance: r, nodes: n };
1269
+ n.push(new ue(e[r])), r++;
1168
1270
  }
1169
1271
  }
1170
- class d {
1272
+ class p {
1171
1273
  constructor(e) {
1172
- y(this, "type", M.Token);
1173
- y(this, "value");
1274
+ E(this, "type", U.Token);
1275
+ E(this, "value");
1174
1276
  this.value = e;
1175
1277
  }
1176
1278
  tokens() {
@@ -1183,32 +1285,32 @@ class d {
1183
1285
  return { type: this.type, tokens: this.tokens() };
1184
1286
  }
1185
1287
  isTokenNode() {
1186
- return d.isTokenNode(this);
1288
+ return p.isTokenNode(this);
1187
1289
  }
1188
1290
  static isTokenNode(e) {
1189
- return !!e && e instanceof d && e.type === M.Token;
1291
+ return !!e && e instanceof p && e.type === U.Token;
1190
1292
  }
1191
1293
  }
1192
- function $t(t, e) {
1294
+ function Ht(t, e) {
1193
1295
  const n = { onParseError: (e == null ? void 0 : e.onParseError) ?? (() => {
1194
1296
  }) }, r = [...t];
1195
1297
  if (t.length === 0) return [];
1196
- G(r[r.length - 1]) && r.push([a.EOF, "", r[r.length - 1][2], r[r.length - 1][3], void 0]);
1298
+ Y(r[r.length - 1]) && r.push([s.EOF, "", r[r.length - 1][2], r[r.length - 1][3], void 0]);
1197
1299
  const o = [];
1198
- let i = [], s = 0;
1300
+ let i = [], a = 0;
1199
1301
  for (; ; ) {
1200
- if (!r[s] || G(r[s])) return i.length && o.push(i), o;
1201
- if (Y(r[s])) {
1202
- o.push(i), i = [], s++;
1302
+ if (!r[a] || Y(r[a])) return i.length && o.push(i), o;
1303
+ if (K(r[a])) {
1304
+ o.push(i), i = [], a++;
1203
1305
  continue;
1204
1306
  }
1205
- const u = Re(n, t.slice(s));
1206
- i.push(u.node), s += u.advance;
1307
+ const u = Ue(n, t.slice(a));
1308
+ i.push(u.node), a += u.advance;
1207
1309
  }
1208
1310
  }
1209
- function zt(t, e, n) {
1311
+ function jt(t, e, n) {
1210
1312
  if (t.length === 0) return;
1211
- const r = Ke(t);
1313
+ const r = Xe(t);
1212
1314
  let o = 0;
1213
1315
  for (; o < t.length; ) {
1214
1316
  const i = t[o];
@@ -1216,88 +1318,88 @@ function zt(t, e, n) {
1216
1318
  if (o = r(t, i, o), o === -1) break;
1217
1319
  }
1218
1320
  }
1219
- function Vt(t, e, n) {
1220
- t.length !== 0 && zt(t, (r, o) => e(r, o) !== !1 && (!("walk" in r.node) || !t.includes(r.node) || r.node.walk(e, r.state) !== !1) && void 0);
1321
+ function Gt(t, e, n) {
1322
+ t.length !== 0 && jt(t, (r, o) => e(r, o) !== !1 && (!("walk" in r.node) || !t.includes(r.node) || r.node.walk(e, r.state) !== !1) && void 0);
1221
1323
  }
1222
- function Ht(t, e) {
1324
+ function Jt(t, e) {
1223
1325
  for (let n = 0; n < t.length; n++)
1224
- Vt(t[n], (r, o) => {
1326
+ Gt(t[n], (r, o) => {
1225
1327
  if (typeof o != "number") return;
1226
1328
  const i = e(r.node);
1227
1329
  i && (Array.isArray(i) ? r.parent.value.splice(o, 1, ...i) : r.parent.value.splice(o, 1, i));
1228
1330
  });
1229
1331
  return t;
1230
1332
  }
1231
- function jt(t) {
1232
- return ie.isSimpleBlockNode(t);
1333
+ function Yt(t) {
1334
+ return ae.isSimpleBlockNode(t);
1233
1335
  }
1234
- function ce(t) {
1336
+ function pe(t) {
1235
1337
  return F.isFunctionNode(t);
1236
1338
  }
1237
- function et(t) {
1339
+ function nt(t) {
1238
1340
  return I.isWhitespaceNode(t);
1239
1341
  }
1240
- function tt(t) {
1241
- return ae.isCommentNode(t);
1342
+ function rt(t) {
1343
+ return ue.isCommentNode(t);
1242
1344
  }
1243
- function Q(t) {
1244
- return et(t) || tt(t);
1345
+ function _(t) {
1346
+ return nt(t) || rt(t);
1245
1347
  }
1246
- function g(t) {
1247
- return d.isTokenNode(t);
1348
+ function m(t) {
1349
+ return p.isTokenNode(t);
1248
1350
  }
1249
- const Gt = /[A-Z]/g;
1351
+ const Zt = /[A-Z]/g;
1250
1352
  function x(t) {
1251
- return t.replace(Gt, (e) => String.fromCharCode(e.charCodeAt(0) + 32));
1353
+ return t.replace(Zt, (e) => String.fromCharCode(e.charCodeAt(0) + 32));
1252
1354
  }
1253
- const Jt = /* @__PURE__ */ new Map([["cm", (t) => t], ["mm", (t) => 10 * t], ["q", (t) => 40 * t], ["in", (t) => t / 2.54], ["pc", (t) => t / 2.54 * 6], ["pt", (t) => t / 2.54 * 72], ["px", (t) => t / 2.54 * 96]]), Ae = /* @__PURE__ */ new Map([["deg", (t) => t], ["grad", (t) => t / 0.9], ["rad", (t) => t / 180 * Math.PI], ["turn", (t) => t / 360]]), pe = /* @__PURE__ */ new Map([["deg", (t) => 0.9 * t], ["grad", (t) => t], ["rad", (t) => 0.9 * t / 180 * Math.PI], ["turn", (t) => 0.9 * t / 360]]), Yt = /* @__PURE__ */ new Map([["hz", (t) => t], ["khz", (t) => t / 1e3]]), Zt = /* @__PURE__ */ new Map([["cm", (t) => 2.54 * t], ["mm", (t) => 25.4 * t], ["q", (t) => 25.4 * t * 4], ["in", (t) => t], ["pc", (t) => 6 * t], ["pt", (t) => 72 * t], ["px", (t) => 96 * t]]), Kt = /* @__PURE__ */ new Map([["hz", (t) => 1e3 * t], ["khz", (t) => t]]), Qt = /* @__PURE__ */ new Map([["cm", (t) => t / 10], ["mm", (t) => t], ["q", (t) => 4 * t], ["in", (t) => t / 25.4], ["pc", (t) => t / 25.4 * 6], ["pt", (t) => t / 25.4 * 72], ["px", (t) => t / 25.4 * 96]]), Xt = /* @__PURE__ */ new Map([["ms", (t) => t], ["s", (t) => t / 1e3]]), _t = /* @__PURE__ */ new Map([["cm", (t) => t / 6 * 2.54], ["mm", (t) => t / 6 * 25.4], ["q", (t) => t / 6 * 25.4 * 4], ["in", (t) => t / 6], ["pc", (t) => t], ["pt", (t) => t / 6 * 72], ["px", (t) => t / 6 * 96]]), en = /* @__PURE__ */ new Map([["cm", (t) => t / 72 * 2.54], ["mm", (t) => t / 72 * 25.4], ["q", (t) => t / 72 * 25.4 * 4], ["in", (t) => t / 72], ["pc", (t) => t / 72 * 6], ["pt", (t) => t], ["px", (t) => t / 72 * 96]]), tn = /* @__PURE__ */ new Map([["cm", (t) => t / 96 * 2.54], ["mm", (t) => t / 96 * 25.4], ["q", (t) => t / 96 * 25.4 * 4], ["in", (t) => t / 96], ["pc", (t) => t / 96 * 6], ["pt", (t) => t / 96 * 72], ["px", (t) => t]]), nn = /* @__PURE__ */ new Map([["cm", (t) => t / 4 / 10], ["mm", (t) => t / 4], ["q", (t) => t], ["in", (t) => t / 4 / 25.4], ["pc", (t) => t / 4 / 25.4 * 6], ["pt", (t) => t / 4 / 25.4 * 72], ["px", (t) => t / 4 / 25.4 * 96]]), nt = /* @__PURE__ */ new Map([["deg", (t) => 180 * t / Math.PI], ["grad", (t) => 180 * t / Math.PI / 0.9], ["rad", (t) => t], ["turn", (t) => 180 * t / Math.PI / 360]]), rn = /* @__PURE__ */ new Map([["ms", (t) => 1e3 * t], ["s", (t) => t]]), fe = /* @__PURE__ */ new Map([["deg", (t) => 360 * t], ["grad", (t) => 360 * t / 0.9], ["rad", (t) => 360 * t / 180 * Math.PI], ["turn", (t) => t]]), on = /* @__PURE__ */ new Map([["cm", Jt], ["mm", Qt], ["q", nn], ["in", Zt], ["pc", _t], ["pt", en], ["px", tn], ["ms", Xt], ["s", rn], ["deg", Ae], ["grad", pe], ["rad", nt], ["turn", fe], ["hz", Yt], ["khz", Kt]]);
1254
- function O(t, e) {
1355
+ const Kt = /* @__PURE__ */ new Map([["cm", (t) => t], ["mm", (t) => 10 * t], ["q", (t) => 40 * t], ["in", (t) => t / 2.54], ["pc", (t) => t / 2.54 * 6], ["pt", (t) => t / 2.54 * 72], ["px", (t) => t / 2.54 * 96]]), De = /* @__PURE__ */ new Map([["deg", (t) => t], ["grad", (t) => t / 0.9], ["rad", (t) => t / 180 * Math.PI], ["turn", (t) => t / 360]]), ve = /* @__PURE__ */ new Map([["deg", (t) => 0.9 * t], ["grad", (t) => t], ["rad", (t) => 0.9 * t / 180 * Math.PI], ["turn", (t) => 0.9 * t / 360]]), Qt = /* @__PURE__ */ new Map([["hz", (t) => t], ["khz", (t) => t / 1e3]]), Xt = /* @__PURE__ */ new Map([["cm", (t) => 2.54 * t], ["mm", (t) => 25.4 * t], ["q", (t) => 25.4 * t * 4], ["in", (t) => t], ["pc", (t) => 6 * t], ["pt", (t) => 72 * t], ["px", (t) => 96 * t]]), _t = /* @__PURE__ */ new Map([["hz", (t) => 1e3 * t], ["khz", (t) => t]]), en = /* @__PURE__ */ new Map([["cm", (t) => t / 10], ["mm", (t) => t], ["q", (t) => 4 * t], ["in", (t) => t / 25.4], ["pc", (t) => t / 25.4 * 6], ["pt", (t) => t / 25.4 * 72], ["px", (t) => t / 25.4 * 96]]), tn = /* @__PURE__ */ new Map([["ms", (t) => t], ["s", (t) => t / 1e3]]), nn = /* @__PURE__ */ new Map([["cm", (t) => t / 6 * 2.54], ["mm", (t) => t / 6 * 25.4], ["q", (t) => t / 6 * 25.4 * 4], ["in", (t) => t / 6], ["pc", (t) => t], ["pt", (t) => t / 6 * 72], ["px", (t) => t / 6 * 96]]), rn = /* @__PURE__ */ new Map([["cm", (t) => t / 72 * 2.54], ["mm", (t) => t / 72 * 25.4], ["q", (t) => t / 72 * 25.4 * 4], ["in", (t) => t / 72], ["pc", (t) => t / 72 * 6], ["pt", (t) => t], ["px", (t) => t / 72 * 96]]), on = /* @__PURE__ */ new Map([["cm", (t) => t / 96 * 2.54], ["mm", (t) => t / 96 * 25.4], ["q", (t) => t / 96 * 25.4 * 4], ["in", (t) => t / 96], ["pc", (t) => t / 96 * 6], ["pt", (t) => t / 96 * 72], ["px", (t) => t]]), sn = /* @__PURE__ */ new Map([["cm", (t) => t / 4 / 10], ["mm", (t) => t / 4], ["q", (t) => t], ["in", (t) => t / 4 / 25.4], ["pc", (t) => t / 4 / 25.4 * 6], ["pt", (t) => t / 4 / 25.4 * 72], ["px", (t) => t / 4 / 25.4 * 96]]), ot = /* @__PURE__ */ new Map([["deg", (t) => 180 * t / Math.PI], ["grad", (t) => 180 * t / Math.PI / 0.9], ["rad", (t) => t], ["turn", (t) => 180 * t / Math.PI / 360]]), an = /* @__PURE__ */ new Map([["ms", (t) => 1e3 * t], ["s", (t) => t]]), ge = /* @__PURE__ */ new Map([["deg", (t) => 360 * t], ["grad", (t) => 360 * t / 0.9], ["rad", (t) => 360 * t / 180 * Math.PI], ["turn", (t) => t]]), un = /* @__PURE__ */ new Map([["cm", Kt], ["mm", en], ["q", sn], ["in", Xt], ["pc", nn], ["pt", rn], ["px", on], ["ms", tn], ["s", an], ["deg", De], ["grad", ve], ["rad", ot], ["turn", ge], ["hz", Qt], ["khz", _t]]);
1356
+ function T(t, e) {
1255
1357
  if (!k(t) || !k(e)) return e;
1256
1358
  const n = x(t[4].unit), r = x(e[4].unit);
1257
1359
  if (n === r) return e;
1258
- const o = on.get(r);
1360
+ const o = un.get(r);
1259
1361
  if (!o) return e;
1260
1362
  const i = o.get(n);
1261
1363
  if (!i) return e;
1262
- const s = i(e[4].value), u = [a.Dimension, "", e[2], e[3], { ...e[4], signCharacter: s < 0 ? "-" : void 0, type: Number.isInteger(s) ? l.Integer : l.Number, value: s }];
1263
- return It(u, t[4].unit), u;
1364
+ const a = i(e[4].value), u = [s.Dimension, "", e[2], e[3], { ...e[4], signCharacter: a < 0 ? "-" : void 0, type: Number.isInteger(a) ? l.Integer : l.Number, value: a }];
1365
+ return Ot(u, t[4].unit), u;
1264
1366
  }
1265
- function an(t) {
1367
+ function cn(t) {
1266
1368
  if (t.length !== 2) return -1;
1267
1369
  const e = t[0].value;
1268
1370
  let n = t[1].value;
1269
1371
  if (h(e) && h(n)) {
1270
1372
  const r = e[4].value + n[4].value;
1271
- return new d([a.Number, r.toString(), e[2], n[3], { value: r, type: e[4].type === l.Integer && n[4].type === l.Integer ? l.Integer : l.Number }]);
1373
+ return new p([s.Number, r.toString(), e[2], n[3], { value: r, type: e[4].type === l.Integer && n[4].type === l.Integer ? l.Integer : l.Number }]);
1272
1374
  }
1273
- if (A(e) && A(n)) {
1375
+ if (S(e) && S(n)) {
1274
1376
  const r = e[4].value + n[4].value;
1275
- return new d([a.Percentage, r.toString() + "%", e[2], n[3], { value: r }]);
1377
+ return new p([s.Percentage, r.toString() + "%", e[2], n[3], { value: r }]);
1276
1378
  }
1277
- if (k(e) && k(n) && (n = O(e, n), x(e[4].unit) === x(n[4].unit))) {
1379
+ if (k(e) && k(n) && (n = T(e, n), x(e[4].unit) === x(n[4].unit))) {
1278
1380
  const r = e[4].value + n[4].value;
1279
- return new d([a.Dimension, r.toString() + e[4].unit, e[2], n[3], { value: r, type: e[4].type === l.Integer && n[4].type === l.Integer ? l.Integer : l.Number, unit: e[4].unit }]);
1381
+ return new p([s.Dimension, r.toString() + e[4].unit, e[2], n[3], { value: r, type: e[4].type === l.Integer && n[4].type === l.Integer ? l.Integer : l.Number, unit: e[4].unit }]);
1280
1382
  }
1281
1383
  return -1;
1282
1384
  }
1283
- function sn(t) {
1385
+ function ln(t) {
1284
1386
  if (t.length !== 2) return -1;
1285
1387
  const e = t[0].value, n = t[1].value;
1286
1388
  if (h(e) && h(n)) {
1287
1389
  const r = e[4].value / n[4].value;
1288
- return new d([a.Number, r.toString(), e[2], n[3], { value: r, type: Number.isInteger(r) ? l.Integer : l.Number }]);
1390
+ return new p([s.Number, r.toString(), e[2], n[3], { value: r, type: Number.isInteger(r) ? l.Integer : l.Number }]);
1289
1391
  }
1290
- if (A(e) && h(n)) {
1392
+ if (S(e) && h(n)) {
1291
1393
  const r = e[4].value / n[4].value;
1292
- return new d([a.Percentage, r.toString() + "%", e[2], n[3], { value: r }]);
1394
+ return new p([s.Percentage, r.toString() + "%", e[2], n[3], { value: r }]);
1293
1395
  }
1294
1396
  if (k(e) && h(n)) {
1295
1397
  const r = e[4].value / n[4].value;
1296
- return new d([a.Dimension, r.toString() + e[4].unit, e[2], n[3], { value: r, type: Number.isInteger(r) ? l.Integer : l.Number, unit: e[4].unit }]);
1398
+ return new p([s.Dimension, r.toString() + e[4].unit, e[2], n[3], { value: r, type: Number.isInteger(r) ? l.Integer : l.Number, unit: e[4].unit }]);
1297
1399
  }
1298
1400
  return -1;
1299
1401
  }
1300
- function J(t) {
1402
+ function Z(t) {
1301
1403
  return !!t && typeof t == "object" && "inputs" in t && Array.isArray(t.inputs) && "operation" in t;
1302
1404
  }
1303
1405
  function N(t) {
@@ -1305,7 +1407,7 @@ function N(t) {
1305
1407
  const e = [];
1306
1408
  for (let n = 0; n < t.inputs.length; n++) {
1307
1409
  const r = t.inputs[n];
1308
- if (g(r)) {
1410
+ if (m(r)) {
1309
1411
  e.push(r);
1310
1412
  continue;
1311
1413
  }
@@ -1315,99 +1417,99 @@ function N(t) {
1315
1417
  }
1316
1418
  return t.operation(e);
1317
1419
  }
1318
- function un(t) {
1420
+ function pn(t) {
1319
1421
  if (t.length !== 2) return -1;
1320
1422
  const e = t[0].value, n = t[1].value;
1321
1423
  if (h(e) && h(n)) {
1322
1424
  const r = e[4].value * n[4].value;
1323
- return new d([a.Number, r.toString(), e[2], n[3], { value: r, type: e[4].type === l.Integer && n[4].type === l.Integer ? l.Integer : l.Number }]);
1425
+ return new p([s.Number, r.toString(), e[2], n[3], { value: r, type: e[4].type === l.Integer && n[4].type === l.Integer ? l.Integer : l.Number }]);
1324
1426
  }
1325
- if (A(e) && h(n)) {
1427
+ if (S(e) && h(n)) {
1326
1428
  const r = e[4].value * n[4].value;
1327
- return new d([a.Percentage, r.toString() + "%", e[2], n[3], { value: r }]);
1429
+ return new p([s.Percentage, r.toString() + "%", e[2], n[3], { value: r }]);
1328
1430
  }
1329
- if (h(e) && A(n)) {
1431
+ if (h(e) && S(n)) {
1330
1432
  const r = e[4].value * n[4].value;
1331
- return new d([a.Percentage, r.toString() + "%", e[2], n[3], { value: r }]);
1433
+ return new p([s.Percentage, r.toString() + "%", e[2], n[3], { value: r }]);
1332
1434
  }
1333
1435
  if (k(e) && h(n)) {
1334
1436
  const r = e[4].value * n[4].value;
1335
- return new d([a.Dimension, r.toString() + e[4].unit, e[2], n[3], { value: r, type: e[4].type === l.Integer && n[4].type === l.Integer ? l.Integer : l.Number, unit: e[4].unit }]);
1437
+ return new p([s.Dimension, r.toString() + e[4].unit, e[2], n[3], { value: r, type: e[4].type === l.Integer && n[4].type === l.Integer ? l.Integer : l.Number, unit: e[4].unit }]);
1336
1438
  }
1337
1439
  if (h(e) && k(n)) {
1338
1440
  const r = e[4].value * n[4].value;
1339
- return new d([a.Dimension, r.toString() + n[4].unit, e[2], n[3], { value: r, type: e[4].type === l.Integer && n[4].type === l.Integer ? l.Integer : l.Number, unit: n[4].unit }]);
1441
+ return new p([s.Dimension, r.toString() + n[4].unit, e[2], n[3], { value: r, type: e[4].type === l.Integer && n[4].type === l.Integer ? l.Integer : l.Number, unit: n[4].unit }]);
1340
1442
  }
1341
1443
  return -1;
1342
1444
  }
1343
- function se(t, e) {
1445
+ function ce(t, e) {
1344
1446
  for (let n = 0; n < t.length; n++) {
1345
1447
  const r = t[n];
1346
- if (!g(r)) continue;
1448
+ if (!m(r)) continue;
1347
1449
  const o = r.value;
1348
- if (!de(o)) continue;
1450
+ if (!fe(o)) continue;
1349
1451
  const i = x(o[4].value);
1350
1452
  switch (i) {
1351
1453
  case "e":
1352
- t.splice(n, 1, new d([a.Number, Math.E.toString(), o[2], o[3], { value: Math.E, type: l.Number }]));
1454
+ t.splice(n, 1, new p([s.Number, Math.E.toString(), o[2], o[3], { value: Math.E, type: l.Number }]));
1353
1455
  break;
1354
1456
  case "pi":
1355
- t.splice(n, 1, new d([a.Number, Math.PI.toString(), o[2], o[3], { value: Math.PI, type: l.Number }]));
1457
+ t.splice(n, 1, new p([s.Number, Math.PI.toString(), o[2], o[3], { value: Math.PI, type: l.Number }]));
1356
1458
  break;
1357
1459
  case "infinity":
1358
- t.splice(n, 1, new d([a.Number, "infinity", o[2], o[3], { value: 1 / 0, type: l.Number }]));
1460
+ t.splice(n, 1, new p([s.Number, "infinity", o[2], o[3], { value: 1 / 0, type: l.Number }]));
1359
1461
  break;
1360
1462
  case "-infinity":
1361
- t.splice(n, 1, new d([a.Number, "-infinity", o[2], o[3], { value: -1 / 0, type: l.Number }]));
1463
+ t.splice(n, 1, new p([s.Number, "-infinity", o[2], o[3], { value: -1 / 0, type: l.Number }]));
1362
1464
  break;
1363
1465
  case "nan":
1364
- t.splice(n, 1, new d([a.Number, "NaN", o[2], o[3], { value: Number.NaN, type: l.Number }]));
1466
+ t.splice(n, 1, new p([s.Number, "NaN", o[2], o[3], { value: Number.NaN, type: l.Number }]));
1365
1467
  break;
1366
1468
  default:
1367
1469
  if (e.has(i)) {
1368
- const s = e.get(i);
1369
- t.splice(n, 1, new d(s));
1470
+ const a = e.get(i);
1471
+ t.splice(n, 1, new p(a));
1370
1472
  }
1371
1473
  }
1372
1474
  }
1373
1475
  return t;
1374
1476
  }
1375
- function De(t) {
1477
+ function Be(t) {
1376
1478
  if (t.length !== 1) return -1;
1377
1479
  const e = t[0].value;
1378
1480
  return D(e) ? t[0] : -1;
1379
1481
  }
1380
- function H(t, e, n) {
1381
- return k(e) ? ve(t, e[4].unit, n) : A(e) ? cn(t, n) : h(e) ? $(t, n) : -1;
1482
+ function G(t, e, n) {
1483
+ return k(e) ? me(t, e[4].unit, n) : S(e) ? dn(t, n) : h(e) ? $(t, n) : -1;
1382
1484
  }
1383
- function ve(t, e, n) {
1485
+ function me(t, e, n) {
1384
1486
  const r = t.tokens();
1385
- return { inputs: [new d([a.Dimension, n.toString() + e, r[0][2], r[r.length - 1][3], { value: n, type: Number.isInteger(n) ? l.Integer : l.Number, unit: e }])], operation: De };
1487
+ return { inputs: [new p([s.Dimension, n.toString() + e, r[0][2], r[r.length - 1][3], { value: n, type: Number.isInteger(n) ? l.Integer : l.Number, unit: e }])], operation: Be };
1386
1488
  }
1387
- function cn(t, e) {
1489
+ function dn(t, e) {
1388
1490
  const n = t.tokens();
1389
- return { inputs: [new d([a.Percentage, e.toString() + "%", n[0][2], n[n.length - 1][3], { value: e }])], operation: De };
1491
+ return { inputs: [new p([s.Percentage, e.toString() + "%", n[0][2], n[n.length - 1][3], { value: e }])], operation: Be };
1390
1492
  }
1391
1493
  function $(t, e) {
1392
1494
  const n = t.tokens();
1393
- return { inputs: [new d([a.Number, e.toString(), n[0][2], n[n.length - 1][3], { value: e, type: Number.isInteger(e) ? l.Integer : l.Number }])], operation: De };
1495
+ return { inputs: [new p([s.Number, e.toString(), n[0][2], n[n.length - 1][3], { value: e, type: Number.isInteger(e) ? l.Integer : l.Number }])], operation: Be };
1394
1496
  }
1395
- function ln(t, e) {
1497
+ function fn(t, e) {
1396
1498
  const n = e.value;
1397
- return h(n) ? ve(t, "rad", Math.acos(n[4].value)) : -1;
1499
+ return h(n) ? me(t, "rad", Math.acos(n[4].value)) : -1;
1398
1500
  }
1399
- function dn(t, e) {
1501
+ function vn(t, e) {
1400
1502
  const n = e.value;
1401
- return h(n) ? ve(t, "rad", Math.asin(n[4].value)) : -1;
1503
+ return h(n) ? me(t, "rad", Math.asin(n[4].value)) : -1;
1402
1504
  }
1403
- function pn(t, e) {
1505
+ function gn(t, e) {
1404
1506
  const n = e.value;
1405
- return h(n) ? ve(t, "rad", Math.atan(n[4].value)) : -1;
1507
+ return h(n) ? me(t, "rad", Math.atan(n[4].value)) : -1;
1406
1508
  }
1407
- function Be(t) {
1509
+ function Fe(t) {
1408
1510
  return k(t) || h(t);
1409
1511
  }
1410
- function Me(t) {
1512
+ function We(t) {
1411
1513
  if (t.length === 0) return !0;
1412
1514
  const e = t[0];
1413
1515
  if (!D(e)) return !1;
@@ -1426,109 +1528,109 @@ function Me(t) {
1426
1528
  }
1427
1529
  return !0;
1428
1530
  }
1429
- function V(t, e) {
1531
+ function j(t, e) {
1430
1532
  return !!D(t) && (k(t) ? t[0] === e[0] && x(t[4].unit) === x(e[4].unit) : t[0] === e[0]);
1431
1533
  }
1432
- function fn(t, e, n) {
1534
+ function mn(t, e, n) {
1433
1535
  const r = e.value;
1434
- if (!Be(r)) return -1;
1435
- const o = O(r, n.value);
1436
- return V(r, o) ? ve(t, "rad", Math.atan2(r[4].value, o[4].value)) : -1;
1536
+ if (!Fe(r)) return -1;
1537
+ const o = T(r, n.value);
1538
+ return j(r, o) ? me(t, "rad", Math.atan2(r[4].value, o[4].value)) : -1;
1437
1539
  }
1438
- function vn(t, e, n) {
1540
+ function hn(t, e, n) {
1439
1541
  const r = e.value;
1440
- return !D(r) || !n.rawPercentages && A(r) ? -1 : H(t, r, Math.abs(r[4].value));
1542
+ return !D(r) || !n.rawPercentages && S(r) ? -1 : G(t, r, Math.abs(r[4].value));
1441
1543
  }
1442
- function mn(t, e, n, r, o) {
1443
- if (!g(e) || !g(n) || !g(r)) return -1;
1544
+ function Cn(t, e, n, r, o) {
1545
+ if (!m(e) || !m(n) || !m(r)) return -1;
1444
1546
  const i = e.value;
1445
- if (!D(i) || !o.rawPercentages && A(i)) return -1;
1446
- const s = O(i, n.value);
1447
- if (!V(i, s)) return -1;
1448
- const u = O(i, r.value);
1449
- return V(i, u) ? H(t, i, Math.max(i[4].value, Math.min(s[4].value, u[4].value))) : -1;
1547
+ if (!D(i) || !o.rawPercentages && S(i)) return -1;
1548
+ const a = T(i, n.value);
1549
+ if (!j(i, a)) return -1;
1550
+ const u = T(i, r.value);
1551
+ return j(i, u) ? G(t, i, Math.max(i[4].value, Math.min(a[4].value, u[4].value))) : -1;
1450
1552
  }
1451
- function gn(t, e) {
1553
+ function yn(t, e) {
1452
1554
  const n = e.value;
1453
- if (!Be(n)) return -1;
1555
+ if (!Fe(n)) return -1;
1454
1556
  let r = n[4].value;
1455
1557
  if (k(n)) switch (n[4].unit.toLowerCase()) {
1456
1558
  case "rad":
1457
1559
  break;
1458
1560
  case "deg":
1459
- r = Ae.get("rad")(n[4].value);
1561
+ r = De.get("rad")(n[4].value);
1460
1562
  break;
1461
1563
  case "grad":
1462
- r = pe.get("rad")(n[4].value);
1564
+ r = ve.get("rad")(n[4].value);
1463
1565
  break;
1464
1566
  case "turn":
1465
- r = fe.get("rad")(n[4].value);
1567
+ r = ge.get("rad")(n[4].value);
1466
1568
  break;
1467
1569
  default:
1468
1570
  return -1;
1469
1571
  }
1470
1572
  return r = Math.cos(r), $(t, r);
1471
1573
  }
1472
- function hn(t, e) {
1574
+ function En(t, e) {
1473
1575
  const n = e.value;
1474
1576
  return h(n) ? $(t, Math.exp(n[4].value)) : -1;
1475
1577
  }
1476
- function Cn(t, e, n) {
1477
- if (!e.every(g)) return -1;
1578
+ function Pn(t, e, n) {
1579
+ if (!e.every(m)) return -1;
1478
1580
  const r = e[0].value;
1479
- if (!D(r) || !n.rawPercentages && A(r)) return -1;
1480
- const o = e.map((u) => O(r, u.value));
1481
- if (!Me(o)) return -1;
1482
- const i = o.map((u) => u[4].value), s = Math.hypot(...i);
1483
- return H(t, r, s);
1484
- }
1485
- function qe(t, e, n) {
1486
- if (!e.every(g)) return -1;
1581
+ if (!D(r) || !n.rawPercentages && S(r)) return -1;
1582
+ const o = e.map((u) => T(r, u.value));
1583
+ if (!We(o)) return -1;
1584
+ const i = o.map((u) => u[4].value), a = Math.hypot(...i);
1585
+ return G(t, r, a);
1586
+ }
1587
+ function ze(t, e, n) {
1588
+ if (!e.every(m)) return -1;
1487
1589
  const r = e[0].value;
1488
- if (!D(r) || !n.rawPercentages && A(r)) return -1;
1489
- const o = e.map((u) => O(r, u.value));
1490
- if (!Me(o)) return -1;
1491
- const i = o.map((u) => u[4].value), s = Math.max(...i);
1492
- return H(t, r, s);
1493
- }
1494
- function $e(t, e, n) {
1495
- if (!e.every(g)) return -1;
1590
+ if (!D(r) || !n.rawPercentages && S(r)) return -1;
1591
+ const o = e.map((u) => T(r, u.value));
1592
+ if (!We(o)) return -1;
1593
+ const i = o.map((u) => u[4].value), a = Math.max(...i);
1594
+ return G(t, r, a);
1595
+ }
1596
+ function Ve(t, e, n) {
1597
+ if (!e.every(m)) return -1;
1496
1598
  const r = e[0].value;
1497
- if (!D(r) || !n.rawPercentages && A(r)) return -1;
1498
- const o = e.map((u) => O(r, u.value));
1499
- if (!Me(o)) return -1;
1500
- const i = o.map((u) => u[4].value), s = Math.min(...i);
1501
- return H(t, r, s);
1599
+ if (!D(r) || !n.rawPercentages && S(r)) return -1;
1600
+ const o = e.map((u) => T(r, u.value));
1601
+ if (!We(o)) return -1;
1602
+ const i = o.map((u) => u[4].value), a = Math.min(...i);
1603
+ return G(t, r, a);
1502
1604
  }
1503
- function En(t, e, n) {
1605
+ function kn(t, e, n) {
1504
1606
  const r = e.value;
1505
1607
  if (!D(r)) return -1;
1506
- const o = O(r, n.value);
1507
- if (!V(r, o)) return -1;
1608
+ const o = T(r, n.value);
1609
+ if (!j(r, o)) return -1;
1508
1610
  let i;
1509
- return i = o[4].value === 0 ? Number.NaN : Number.isFinite(r[4].value) && (Number.isFinite(o[4].value) || (o[4].value !== Number.POSITIVE_INFINITY || r[4].value !== Number.NEGATIVE_INFINITY && !Object.is(0 * r[4].value, -0)) && (o[4].value !== Number.NEGATIVE_INFINITY || r[4].value !== Number.POSITIVE_INFINITY && !Object.is(0 * r[4].value, 0))) ? Number.isFinite(o[4].value) ? (r[4].value % o[4].value + o[4].value) % o[4].value : r[4].value : Number.NaN, H(t, r, i);
1611
+ return i = o[4].value === 0 ? Number.NaN : Number.isFinite(r[4].value) && (Number.isFinite(o[4].value) || (o[4].value !== Number.POSITIVE_INFINITY || r[4].value !== Number.NEGATIVE_INFINITY && !Object.is(0 * r[4].value, -0)) && (o[4].value !== Number.NEGATIVE_INFINITY || r[4].value !== Number.POSITIVE_INFINITY && !Object.is(0 * r[4].value, 0))) ? Number.isFinite(o[4].value) ? (r[4].value % o[4].value + o[4].value) % o[4].value : r[4].value : Number.NaN, G(t, r, i);
1510
1612
  }
1511
- function yn(t, e, n) {
1613
+ function bn(t, e, n) {
1512
1614
  const r = e.value, o = n.value;
1513
- return !h(r) || !V(r, o) ? -1 : $(t, Math.pow(r[4].value, o[4].value));
1615
+ return !h(r) || !j(r, o) ? -1 : $(t, Math.pow(r[4].value, o[4].value));
1514
1616
  }
1515
- function Pn(t, e, n) {
1617
+ function Sn(t, e, n) {
1516
1618
  const r = e.value;
1517
1619
  if (!D(r)) return -1;
1518
- const o = O(r, n.value);
1519
- if (!V(r, o)) return -1;
1620
+ const o = T(r, n.value);
1621
+ if (!j(r, o)) return -1;
1520
1622
  let i;
1521
- return i = o[4].value === 0 ? Number.NaN : Number.isFinite(r[4].value) ? Number.isFinite(o[4].value) ? r[4].value % o[4].value : r[4].value : Number.NaN, H(t, r, i);
1623
+ return i = o[4].value === 0 ? Number.NaN : Number.isFinite(r[4].value) ? Number.isFinite(o[4].value) ? r[4].value % o[4].value : r[4].value : Number.NaN, G(t, r, i);
1522
1624
  }
1523
- function kn(t, e, n, r, o) {
1625
+ function An(t, e, n, r, o) {
1524
1626
  const i = n.value;
1525
- if (!D(i) || !o.rawPercentages && A(i)) return -1;
1526
- const s = O(i, r.value);
1527
- if (!V(i, s)) return -1;
1627
+ if (!D(i) || !o.rawPercentages && S(i)) return -1;
1628
+ const a = T(i, r.value);
1629
+ if (!j(i, a)) return -1;
1528
1630
  let u;
1529
- if (s[4].value === 0) u = Number.NaN;
1530
- else if (Number.isFinite(i[4].value) || Number.isFinite(s[4].value)) if (!Number.isFinite(i[4].value) && Number.isFinite(s[4].value)) u = i[4].value;
1531
- else if (Number.isFinite(i[4].value) && !Number.isFinite(s[4].value)) switch (e) {
1631
+ if (a[4].value === 0) u = Number.NaN;
1632
+ else if (Number.isFinite(i[4].value) || Number.isFinite(a[4].value)) if (!Number.isFinite(i[4].value) && Number.isFinite(a[4].value)) u = i[4].value;
1633
+ else if (Number.isFinite(i[4].value) && !Number.isFinite(a[4].value)) switch (e) {
1532
1634
  case "down":
1533
1635
  u = i[4].value < 0 ? -1 / 0 : Object.is(-0, 0 * i[4].value) ? -0 : 0;
1534
1636
  break;
@@ -1538,286 +1640,286 @@ function kn(t, e, n, r, o) {
1538
1640
  default:
1539
1641
  u = Object.is(0, 0 * i[4].value) ? 0 : -0;
1540
1642
  }
1541
- else if (Number.isFinite(s[4].value)) switch (e) {
1643
+ else if (Number.isFinite(a[4].value)) switch (e) {
1542
1644
  case "down":
1543
- u = Math.floor(i[4].value / s[4].value) * s[4].value;
1645
+ u = Math.floor(i[4].value / a[4].value) * a[4].value;
1544
1646
  break;
1545
1647
  case "up":
1546
- u = Math.ceil(i[4].value / s[4].value) * s[4].value;
1648
+ u = Math.ceil(i[4].value / a[4].value) * a[4].value;
1547
1649
  break;
1548
1650
  case "to-zero":
1549
- u = Math.trunc(i[4].value / s[4].value) * s[4].value;
1651
+ u = Math.trunc(i[4].value / a[4].value) * a[4].value;
1550
1652
  break;
1551
1653
  default: {
1552
- let c = Math.floor(i[4].value / s[4].value) * s[4].value, p = Math.ceil(i[4].value / s[4].value) * s[4].value;
1553
- if (c > p) {
1554
- const m = c;
1555
- c = p, p = m;
1654
+ let c = Math.floor(i[4].value / a[4].value) * a[4].value, d = Math.ceil(i[4].value / a[4].value) * a[4].value;
1655
+ if (c > d) {
1656
+ const v = c;
1657
+ c = d, d = v;
1556
1658
  }
1557
- const v = Math.abs(i[4].value - c), f = Math.abs(i[4].value - p);
1558
- u = v === f ? p : v < f ? c : p;
1659
+ const g = Math.abs(i[4].value - c), f = Math.abs(i[4].value - d);
1660
+ u = g === f ? d : g < f ? c : d;
1559
1661
  break;
1560
1662
  }
1561
1663
  }
1562
1664
  else u = i[4].value;
1563
1665
  else u = Number.NaN;
1564
- return H(t, i, u);
1666
+ return G(t, i, u);
1565
1667
  }
1566
- function bn(t, e, n) {
1668
+ function Dn(t, e, n) {
1567
1669
  const r = e.value;
1568
- return !D(r) || !n.rawPercentages && A(r) ? -1 : $(t, Math.sign(r[4].value));
1670
+ return !D(r) || !n.rawPercentages && S(r) ? -1 : $(t, Math.sign(r[4].value));
1569
1671
  }
1570
- function Sn(t, e) {
1672
+ function Bn(t, e) {
1571
1673
  const n = e.value;
1572
- if (!Be(n)) return -1;
1674
+ if (!Fe(n)) return -1;
1573
1675
  let r = n[4].value;
1574
1676
  if (k(n)) switch (x(n[4].unit)) {
1575
1677
  case "rad":
1576
1678
  break;
1577
1679
  case "deg":
1578
- r = Ae.get("rad")(n[4].value);
1680
+ r = De.get("rad")(n[4].value);
1579
1681
  break;
1580
1682
  case "grad":
1581
- r = pe.get("rad")(n[4].value);
1683
+ r = ve.get("rad")(n[4].value);
1582
1684
  break;
1583
1685
  case "turn":
1584
- r = fe.get("rad")(n[4].value);
1686
+ r = ge.get("rad")(n[4].value);
1585
1687
  break;
1586
1688
  default:
1587
1689
  return -1;
1588
1690
  }
1589
1691
  return r = Math.sin(r), $(t, r);
1590
1692
  }
1591
- function An(t, e) {
1693
+ function Fn(t, e) {
1592
1694
  const n = e.value;
1593
1695
  return h(n) ? $(t, Math.sqrt(n[4].value)) : -1;
1594
1696
  }
1595
- function Dn(t, e) {
1697
+ function wn(t, e) {
1596
1698
  const n = e.value;
1597
- if (!Be(n)) return -1;
1699
+ if (!Fe(n)) return -1;
1598
1700
  const r = n[4].value;
1599
1701
  let o = 0, i = n[4].value;
1600
1702
  if (k(n)) switch (x(n[4].unit)) {
1601
1703
  case "rad":
1602
- o = nt.get("deg")(r);
1704
+ o = ot.get("deg")(r);
1603
1705
  break;
1604
1706
  case "deg":
1605
- o = r, i = Ae.get("rad")(r);
1707
+ o = r, i = De.get("rad")(r);
1606
1708
  break;
1607
1709
  case "grad":
1608
- o = pe.get("deg")(r), i = pe.get("rad")(r);
1710
+ o = ve.get("deg")(r), i = ve.get("rad")(r);
1609
1711
  break;
1610
1712
  case "turn":
1611
- o = fe.get("deg")(r), i = fe.get("rad")(r);
1713
+ o = ge.get("deg")(r), i = ge.get("rad")(r);
1612
1714
  break;
1613
1715
  default:
1614
1716
  return -1;
1615
1717
  }
1616
- const s = o / 90;
1617
- return i = o % 90 == 0 && s % 2 != 0 ? s > 0 ? 1 / 0 : -1 / 0 : Math.tan(i), $(t, i);
1718
+ const a = o / 90;
1719
+ return i = o % 90 == 0 && a % 2 != 0 ? a > 0 ? 1 / 0 : -1 / 0 : Math.tan(i), $(t, i);
1618
1720
  }
1619
- function Bn(t) {
1721
+ function Nn(t) {
1620
1722
  if (t.length !== 2) return -1;
1621
1723
  const e = t[0].value;
1622
1724
  let n = t[1].value;
1623
1725
  if (h(e) && h(n)) {
1624
1726
  const r = e[4].value - n[4].value;
1625
- return new d([a.Number, r.toString(), e[2], n[3], { value: r, type: e[4].type === l.Integer && n[4].type === l.Integer ? l.Integer : l.Number }]);
1727
+ return new p([s.Number, r.toString(), e[2], n[3], { value: r, type: e[4].type === l.Integer && n[4].type === l.Integer ? l.Integer : l.Number }]);
1626
1728
  }
1627
- if (A(e) && A(n)) {
1729
+ if (S(e) && S(n)) {
1628
1730
  const r = e[4].value - n[4].value;
1629
- return new d([a.Percentage, r.toString() + "%", e[2], n[3], { value: r }]);
1731
+ return new p([s.Percentage, r.toString() + "%", e[2], n[3], { value: r }]);
1630
1732
  }
1631
- if (k(e) && k(n) && (n = O(e, n), x(e[4].unit) === x(n[4].unit))) {
1733
+ if (k(e) && k(n) && (n = T(e, n), x(e[4].unit) === x(n[4].unit))) {
1632
1734
  const r = e[4].value - n[4].value;
1633
- return new d([a.Dimension, r.toString() + e[4].unit, e[2], n[3], { value: r, type: e[4].type === l.Integer && n[4].type === l.Integer ? l.Integer : l.Number, unit: e[4].unit }]);
1735
+ return new p([s.Dimension, r.toString() + e[4].unit, e[2], n[3], { value: r, type: e[4].type === l.Integer && n[4].type === l.Integer ? l.Integer : l.Number, unit: e[4].unit }]);
1634
1736
  }
1635
1737
  return -1;
1636
1738
  }
1637
- function Fn(t, e) {
1739
+ function In(t, e) {
1638
1740
  if (e.length === 1) {
1639
1741
  const n = e[0];
1640
- if (!n || !g(n)) return -1;
1742
+ if (!n || !m(n)) return -1;
1641
1743
  const r = n.value;
1642
1744
  return h(r) ? $(t, Math.log(r[4].value)) : -1;
1643
1745
  }
1644
1746
  if (e.length === 2) {
1645
1747
  const n = e[0];
1646
- if (!n || !g(n)) return -1;
1748
+ if (!n || !m(n)) return -1;
1647
1749
  const r = n.value;
1648
1750
  if (!h(r)) return -1;
1649
1751
  const o = e[1];
1650
- if (!o || !g(o)) return -1;
1752
+ if (!o || !m(o)) return -1;
1651
1753
  const i = o.value;
1652
1754
  return h(i) ? $(t, Math.log(r[4].value) / Math.log(i[4].value)) : -1;
1653
1755
  }
1654
1756
  return -1;
1655
1757
  }
1656
- const wn = /^none$/i;
1657
- function xe(t) {
1758
+ const xn = /^none$/i;
1759
+ function Oe(t) {
1658
1760
  if (Array.isArray(t)) {
1659
- const n = t.filter((r) => !(et(r) && tt(r)));
1660
- return n.length === 1 && xe(n[0]);
1761
+ const n = t.filter((r) => !(nt(r) && rt(r)));
1762
+ return n.length === 1 && Oe(n[0]);
1661
1763
  }
1662
- if (!g(t)) return !1;
1764
+ if (!m(t)) return !1;
1663
1765
  const e = t.value;
1664
- return !!de(e) && wn.test(e[4].value);
1665
- }
1666
- function Nn(t, e, n, r, o, i) {
1667
- const s = n.value;
1668
- if (!D(s)) return -1;
1669
- const u = O(s, r.value);
1670
- if (!V(s, u)) return -1;
1671
- let c, p = null;
1672
- if (o && (p = O(s, o.value), !V(s, p))) return -1;
1673
- if (Number.isFinite(s[4].value)) if (Number.isFinite(u[4].value)) if (Number.isFinite(u[4].value - s[4].value)) if (p && !Number.isFinite(p[4].value)) c = s[4].value;
1766
+ return !!fe(e) && xn.test(e[4].value);
1767
+ }
1768
+ function Tn(t, e, n, r, o, i) {
1769
+ const a = n.value;
1770
+ if (!D(a)) return -1;
1771
+ const u = T(a, r.value);
1772
+ if (!j(a, u)) return -1;
1773
+ let c, d = null;
1774
+ if (o && (d = T(a, o.value), !j(a, d))) return -1;
1775
+ if (Number.isFinite(a[4].value)) if (Number.isFinite(u[4].value)) if (Number.isFinite(u[4].value - a[4].value)) if (d && !Number.isFinite(d[4].value)) c = a[4].value;
1674
1776
  else {
1675
- const v = In(xn([e, W(s), W(u), o ? `by ${o.toString()}` : ""].join(",")), i.randomSeed);
1676
- let f = s[4].value, m = u[4].value;
1677
- if (f > m && ([f, m] = [m, f]), p && (p[4].value <= 0 || Math.abs(f - m) / p[4].value > 1e10) && (p = null), p) {
1678
- const C = Math.abs(f - m), b = v();
1679
- c = f + Math.floor(C / p[4].value * b) * p[4].value;
1777
+ const g = On(Mn([e, W(a), W(u), o ? `by ${o.toString()}` : ""].join(",")), i.randomSeed);
1778
+ let f = a[4].value, v = u[4].value;
1779
+ if (f > v && ([f, v] = [v, f]), d && (d[4].value <= 0 || Math.abs(f - v) / d[4].value > 1e10) && (d = null), d) {
1780
+ const C = Math.abs(f - v), P = g();
1781
+ c = f + Math.floor(C / d[4].value * P) * d[4].value;
1680
1782
  } else {
1681
- const C = v();
1682
- c = Number((C * (m - f) + f).toFixed(5));
1783
+ const C = g();
1784
+ c = Number((C * (v - f) + f).toFixed(5));
1683
1785
  }
1684
1786
  }
1685
1787
  else c = Number.NaN;
1686
1788
  else c = Number.NaN;
1687
1789
  else c = Number.NaN;
1688
- return H(t, s, c);
1790
+ return G(t, a, c);
1689
1791
  }
1690
- function In(t = 0.34944106645296036, e = 0.19228640875738723, n = 0.8784393832007205, r = 0.04850964319275053) {
1792
+ function On(t = 0.34944106645296036, e = 0.19228640875738723, n = 0.8784393832007205, r = 0.04850964319275053) {
1691
1793
  return () => {
1692
1794
  const o = ((t |= 0) + (e |= 0) | 0) + (r |= 0) | 0;
1693
1795
  return r = r + 1 | 0, t = e ^ e >>> 9, e = (n |= 0) + (n << 3) | 0, n = (n = n << 21 | n >>> 11) + o | 0, (o >>> 0) / 4294967296;
1694
1796
  };
1695
1797
  }
1696
- function xn(t) {
1798
+ function Mn(t) {
1697
1799
  let e = 0, n = 0, r = 0;
1698
1800
  e = ~e;
1699
1801
  for (let o = 0, i = t.length; o < i; o++) r = 255 & (e ^ t.charCodeAt(o)), n = +("0x" + "00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D".substring(9 * r, 9 * r + 8)), e = e >>> 8 ^ n;
1700
1802
  return ~e >>> 0;
1701
1803
  }
1702
- const Ue = /* @__PURE__ */ new Map([["abs", function(e, n, r) {
1703
- return L(e, n, r, vn);
1804
+ const Le = /* @__PURE__ */ new Map([["abs", function(e, n, r) {
1805
+ return L(e, n, r, hn);
1704
1806
  }], ["acos", function(e, n, r) {
1705
- return L(e, n, r, ln);
1807
+ return L(e, n, r, fn);
1706
1808
  }], ["asin", function(e, n, r) {
1707
- return L(e, n, r, dn);
1809
+ return L(e, n, r, vn);
1708
1810
  }], ["atan", function(e, n, r) {
1709
- return L(e, n, r, pn);
1811
+ return L(e, n, r, gn);
1710
1812
  }], ["atan2", function(e, n, r) {
1711
- return ge(e, n, r, fn);
1813
+ return he(e, n, r, mn);
1712
1814
  }], ["calc", w], ["clamp", function(e, n, r) {
1713
- const o = se([...e.value.filter((E) => !Q(E))], n), i = [], s = [], u = [];
1815
+ const o = ce([...e.value.filter((y) => !_(y))], n), i = [], a = [], u = [];
1714
1816
  {
1715
- let E = i;
1716
- for (let me = 0; me < o.length; me++) {
1717
- const P = o[me];
1718
- if (g(P) && Y(P.value)) {
1719
- if (E === u) return -1;
1720
- if (E === s) {
1721
- E = u;
1817
+ let y = i;
1818
+ for (let z = 0; z < o.length; z++) {
1819
+ const V = o[z];
1820
+ if (m(V) && K(V.value)) {
1821
+ if (y === u) return -1;
1822
+ if (y === a) {
1823
+ y = u;
1722
1824
  continue;
1723
1825
  }
1724
- if (E === i) {
1725
- E = s;
1826
+ if (y === i) {
1827
+ y = a;
1726
1828
  continue;
1727
1829
  }
1728
1830
  return -1;
1729
1831
  }
1730
- E.push(P);
1832
+ y.push(V);
1731
1833
  }
1732
1834
  }
1733
- const c = xe(i), p = xe(u);
1734
- if (c && p) return w(T(s), n, r);
1735
- const v = N(w(T(s), n, r));
1736
- if (v === -1) return -1;
1835
+ const c = Oe(i), d = Oe(u);
1836
+ if (c && d) return w(M(a), n, r);
1837
+ const g = N(w(M(a), n, r));
1838
+ if (g === -1) return -1;
1737
1839
  if (c) {
1738
- const E = N(w(T(u), n, r));
1739
- return E === -1 ? -1 : $e((f = v, m = E, new F([a.Function, "min(", -1, -1, { value: "min" }], [a.CloseParen, ")", -1, -1, void 0], [f, new d([a.Comma, ",", -1, -1, void 0]), m])), [v, E], r);
1840
+ const y = N(w(M(u), n, r));
1841
+ return y === -1 ? -1 : Ve((f = g, v = y, new F([s.Function, "min(", -1, -1, { value: "min" }], [s.CloseParen, ")", -1, -1, void 0], [f, new p([s.Comma, ",", -1, -1, void 0]), v])), [g, y], r);
1740
1842
  }
1741
- if (p) {
1742
- const E = N(w(T(i), n, r));
1743
- return E === -1 ? -1 : qe(Rn(E, v), [E, v], r);
1843
+ if (d) {
1844
+ const y = N(w(M(i), n, r));
1845
+ return y === -1 ? -1 : ze(Wn(y, g), [y, g], r);
1744
1846
  }
1745
- var f, m;
1746
- const C = N(w(T(i), n, r));
1847
+ var f, v;
1848
+ const C = N(w(M(i), n, r));
1747
1849
  if (C === -1) return -1;
1748
- const b = N(w(T(u), n, r));
1749
- return b === -1 ? -1 : mn(e, C, v, b, r);
1850
+ const P = N(w(M(u), n, r));
1851
+ return P === -1 ? -1 : Cn(e, C, g, P, r);
1750
1852
  }], ["cos", function(e, n, r) {
1751
- return L(e, n, r, gn);
1853
+ return L(e, n, r, yn);
1752
1854
  }], ["exp", function(e, n, r) {
1753
- return L(e, n, r, hn);
1855
+ return L(e, n, r, En);
1754
1856
  }], ["hypot", function(e, n, r) {
1755
- return he(e, e.value, n, r, Cn);
1857
+ return Ce(e, e.value, n, r, Pn);
1756
1858
  }], ["log", function(e, n, r) {
1757
- return he(e, e.value, n, r, Fn);
1859
+ return Ce(e, e.value, n, r, In);
1758
1860
  }], ["max", function(e, n, r) {
1759
- return he(e, e.value, n, r, qe);
1861
+ return Ce(e, e.value, n, r, ze);
1760
1862
  }], ["min", function(e, n, r) {
1761
- return he(e, e.value, n, r, $e);
1863
+ return Ce(e, e.value, n, r, Ve);
1762
1864
  }], ["mod", function(e, n, r) {
1763
- return ge(e, n, r, En);
1865
+ return he(e, n, r, kn);
1764
1866
  }], ["pow", function(e, n, r) {
1765
- return ge(e, n, r, yn);
1867
+ return he(e, n, r, bn);
1766
1868
  }], ["random", function(e, n, r) {
1767
- const o = e.value.filter((m) => !Q(m));
1869
+ const o = e.value.filter((v) => !_(v));
1768
1870
  let i = "";
1769
- const s = [], u = [];
1770
- for (let m = 0; m < o.length; m++) {
1771
- const C = o[m];
1772
- if (!i && u.length === 0 && g(C) && de(C.value)) {
1773
- const b = C.value[4].value.toLowerCase();
1774
- if (b === "per-element" || b.startsWith("--")) {
1775
- i = b;
1776
- const E = o[m + 1];
1777
- if (!g(E) || !Y(E.value)) return -1;
1778
- m++;
1871
+ const a = [], u = [];
1872
+ for (let v = 0; v < o.length; v++) {
1873
+ const C = o[v];
1874
+ if (!i && u.length === 0 && m(C) && fe(C.value)) {
1875
+ const P = C.value[4].value.toLowerCase();
1876
+ if (P === "per-element" || P.startsWith("--")) {
1877
+ i = P;
1878
+ const y = o[v + 1];
1879
+ if (!m(y) || !K(y.value)) return -1;
1880
+ v++;
1779
1881
  continue;
1780
1882
  }
1781
1883
  }
1782
- if (g(C) && Y(C.value)) {
1783
- const b = o[m + 1];
1784
- if (u.length > 0 && g(b) && de(b.value)) {
1785
- const E = b.value[4].value.toLowerCase();
1786
- if (E === "by" || E.startsWith("--")) {
1787
- s.push(...o.slice(m + 2));
1884
+ if (m(C) && K(C.value)) {
1885
+ const P = o[v + 1];
1886
+ if (u.length > 0 && m(P) && fe(P.value)) {
1887
+ const y = P.value[4].value.toLowerCase();
1888
+ if (y === "by" || y.startsWith("--")) {
1889
+ a.push(...o.slice(v + 2));
1788
1890
  break;
1789
1891
  }
1790
1892
  }
1791
1893
  }
1792
1894
  u.push(C);
1793
1895
  }
1794
- const c = ot(u, n, r);
1896
+ const c = st(u, n, r);
1795
1897
  if (c === -1) return -1;
1796
- const [p, v] = c;
1898
+ const [d, g] = c;
1797
1899
  let f = null;
1798
- return s.length && (f = rt(s, n, r), f === -1) ? -1 : Nn(e, i, p, v, f, r);
1900
+ return a.length && (f = it(a, n, r), f === -1) ? -1 : Tn(e, i, d, g, f, r);
1799
1901
  }], ["rem", function(e, n, r) {
1800
- return ge(e, n, r, Pn);
1902
+ return he(e, n, r, Sn);
1801
1903
  }], ["round", function(e, n, r) {
1802
- const o = se([...e.value.filter((f) => !Q(f))], n);
1803
- let i = "", s = !1;
1904
+ const o = ce([...e.value.filter((f) => !_(f))], n);
1905
+ let i = "", a = !1;
1804
1906
  const u = [], c = [];
1805
1907
  {
1806
1908
  let f = u;
1807
- for (let m = 0; m < o.length; m++) {
1808
- const C = o[m];
1809
- if (!i && u.length === 0 && c.length === 0 && g(C) && de(C.value)) {
1810
- const b = C.value[4].value.toLowerCase();
1811
- if (Tn.has(b)) {
1812
- i = b;
1909
+ for (let v = 0; v < o.length; v++) {
1910
+ const C = o[v];
1911
+ if (!i && u.length === 0 && c.length === 0 && m(C) && fe(C.value)) {
1912
+ const P = C.value[4].value.toLowerCase();
1913
+ if (Un.has(P)) {
1914
+ i = P;
1813
1915
  continue;
1814
1916
  }
1815
1917
  }
1816
- if (g(C) && Y(C.value)) {
1918
+ if (m(C) && K(C.value)) {
1817
1919
  if (f === c) return -1;
1818
1920
  if (f === u && i && u.length === 0) continue;
1819
1921
  if (f === u) {
1820
- s = !0, f = c;
1922
+ a = !0, f = c;
1821
1923
  continue;
1822
1924
  }
1823
1925
  return -1;
@@ -1825,103 +1927,103 @@ const Ue = /* @__PURE__ */ new Map([["abs", function(e, n, r) {
1825
1927
  f.push(C);
1826
1928
  }
1827
1929
  }
1828
- const p = N(w(T(u), n, r));
1829
- if (p === -1) return -1;
1830
- s || c.length !== 0 || c.push(new d([a.Number, "1", -1, -1, { value: 1, type: l.Integer }]));
1831
- const v = N(w(T(c), n, r));
1832
- return v === -1 ? -1 : (i || (i = "nearest"), kn(e, i, p, v, r));
1930
+ const d = N(w(M(u), n, r));
1931
+ if (d === -1) return -1;
1932
+ a || c.length !== 0 || c.push(new p([s.Number, "1", -1, -1, { value: 1, type: l.Integer }]));
1933
+ const g = N(w(M(c), n, r));
1934
+ return g === -1 ? -1 : (i || (i = "nearest"), An(e, i, d, g, r));
1833
1935
  }], ["sign", function(e, n, r) {
1834
- return L(e, n, r, bn);
1936
+ return L(e, n, r, Dn);
1835
1937
  }], ["sin", function(e, n, r) {
1836
- return L(e, n, r, Sn);
1938
+ return L(e, n, r, Bn);
1837
1939
  }], ["sqrt", function(e, n, r) {
1838
- return L(e, n, r, An);
1940
+ return L(e, n, r, Fn);
1839
1941
  }], ["tan", function(e, n, r) {
1840
- return L(e, n, r, Dn);
1942
+ return L(e, n, r, wn);
1841
1943
  }]]);
1842
1944
  function w(t, e, n) {
1843
- const r = se([...t.value.filter((i) => !Q(i))], e);
1844
- if (r.length === 1 && g(r[0])) return { inputs: [r[0]], operation: De };
1945
+ const r = ce([...t.value.filter((i) => !_(i))], e);
1946
+ if (r.length === 1 && m(r[0])) return { inputs: [r[0]], operation: Be };
1845
1947
  let o = 0;
1846
1948
  for (; o < r.length; ) {
1847
1949
  const i = r[o];
1848
- if (jt(i) && Ze(i.startToken)) {
1849
- const s = w(i, e, n);
1850
- if (s === -1) return -1;
1851
- r.splice(o, 1, s);
1852
- } else if (ce(i)) {
1853
- const s = Ue.get(i.getName().toLowerCase());
1854
- if (!s) return -1;
1855
- const u = s(i, e, n);
1950
+ if (Yt(i) && Qe(i.startToken)) {
1951
+ const a = w(i, e, n);
1952
+ if (a === -1) return -1;
1953
+ r.splice(o, 1, a);
1954
+ } else if (pe(i)) {
1955
+ const a = Le.get(i.getName().toLowerCase());
1956
+ if (!a) return -1;
1957
+ const u = a(i, e, n);
1856
1958
  if (u === -1) return -1;
1857
1959
  r.splice(o, 1, u);
1858
1960
  } else o++;
1859
1961
  }
1860
- if (o = 0, r.length === 1 && J(r[0])) return r[0];
1962
+ if (o = 0, r.length === 1 && Z(r[0])) return r[0];
1861
1963
  for (; o < r.length; ) {
1862
1964
  const i = r[o];
1863
- if (!i || !g(i) && !J(i)) {
1965
+ if (!i || !m(i) && !Z(i)) {
1864
1966
  o++;
1865
1967
  continue;
1866
1968
  }
1867
- const s = r[o + 1];
1868
- if (!s || !g(s)) {
1969
+ const a = r[o + 1];
1970
+ if (!a || !m(a)) {
1869
1971
  o++;
1870
1972
  continue;
1871
1973
  }
1872
- const u = s.value;
1873
- if (!Le(u) || u[4].value !== "*" && u[4].value !== "/") {
1974
+ const u = a.value;
1975
+ if (!$e(u) || u[4].value !== "*" && u[4].value !== "/") {
1874
1976
  o++;
1875
1977
  continue;
1876
1978
  }
1877
1979
  const c = r[o + 2];
1878
- if (!c || !g(c) && !J(c)) return -1;
1879
- u[4].value !== "*" ? u[4].value !== "/" ? o++ : r.splice(o, 3, { inputs: [i, c], operation: sn }) : r.splice(o, 3, { inputs: [i, c], operation: un });
1980
+ if (!c || !m(c) && !Z(c)) return -1;
1981
+ u[4].value !== "*" ? u[4].value !== "/" ? o++ : r.splice(o, 3, { inputs: [i, c], operation: ln }) : r.splice(o, 3, { inputs: [i, c], operation: pn });
1880
1982
  }
1881
- if (o = 0, r.length === 1 && J(r[0])) return r[0];
1983
+ if (o = 0, r.length === 1 && Z(r[0])) return r[0];
1882
1984
  for (; o < r.length; ) {
1883
1985
  const i = r[o];
1884
- if (!i || !g(i) && !J(i)) {
1986
+ if (!i || !m(i) && !Z(i)) {
1885
1987
  o++;
1886
1988
  continue;
1887
1989
  }
1888
- const s = r[o + 1];
1889
- if (!s || !g(s)) {
1990
+ const a = r[o + 1];
1991
+ if (!a || !m(a)) {
1890
1992
  o++;
1891
1993
  continue;
1892
1994
  }
1893
- const u = s.value;
1894
- if (!Le(u) || u[4].value !== "+" && u[4].value !== "-") {
1995
+ const u = a.value;
1996
+ if (!$e(u) || u[4].value !== "+" && u[4].value !== "-") {
1895
1997
  o++;
1896
1998
  continue;
1897
1999
  }
1898
2000
  const c = r[o + 2];
1899
- if (!c || !g(c) && !J(c)) return -1;
1900
- u[4].value !== "+" ? u[4].value !== "-" ? o++ : r.splice(o, 3, { inputs: [i, c], operation: Bn }) : r.splice(o, 3, { inputs: [i, c], operation: an });
2001
+ if (!c || !m(c) && !Z(c)) return -1;
2002
+ u[4].value !== "+" ? u[4].value !== "-" ? o++ : r.splice(o, 3, { inputs: [i, c], operation: Nn }) : r.splice(o, 3, { inputs: [i, c], operation: cn });
1901
2003
  }
1902
- return r.length === 1 && J(r[0]) ? r[0] : -1;
2004
+ return r.length === 1 && Z(r[0]) ? r[0] : -1;
1903
2005
  }
1904
2006
  function L(t, e, n, r) {
1905
- const o = rt(t.value, e, n);
2007
+ const o = it(t.value, e, n);
1906
2008
  return o === -1 ? -1 : r(t, o, n);
1907
2009
  }
1908
- function rt(t, e, n) {
1909
- const r = N(w(T(se([...t.filter((o) => !Q(o))], e)), e, n));
2010
+ function it(t, e, n) {
2011
+ const r = N(w(M(ce([...t.filter((o) => !_(o))], e)), e, n));
1910
2012
  return r === -1 ? -1 : r;
1911
2013
  }
1912
- function ge(t, e, n, r) {
1913
- const o = ot(t.value, e, n);
2014
+ function he(t, e, n, r) {
2015
+ const o = st(t.value, e, n);
1914
2016
  if (o === -1) return -1;
1915
- const [i, s] = o;
1916
- return r(t, i, s, n);
2017
+ const [i, a] = o;
2018
+ return r(t, i, a, n);
1917
2019
  }
1918
- function ot(t, e, n) {
1919
- const r = se([...t.filter((c) => !Q(c))], e), o = [], i = [];
2020
+ function st(t, e, n) {
2021
+ const r = ce([...t.filter((c) => !_(c))], e), o = [], i = [];
1920
2022
  {
1921
2023
  let c = o;
1922
- for (let p = 0; p < r.length; p++) {
1923
- const v = r[p];
1924
- if (g(v) && Y(v.value)) {
2024
+ for (let d = 0; d < r.length; d++) {
2025
+ const g = r[d];
2026
+ if (m(g) && K(g.value)) {
1925
2027
  if (c === i) return -1;
1926
2028
  if (c === o) {
1927
2029
  c = i;
@@ -1929,99 +2031,99 @@ function ot(t, e, n) {
1929
2031
  }
1930
2032
  return -1;
1931
2033
  }
1932
- c.push(v);
2034
+ c.push(g);
1933
2035
  }
1934
2036
  }
1935
- const s = N(w(T(o), e, n));
1936
- if (s === -1) return -1;
1937
- const u = N(w(T(i), e, n));
1938
- return u === -1 ? -1 : [s, u];
2037
+ const a = N(w(M(o), e, n));
2038
+ if (a === -1) return -1;
2039
+ const u = N(w(M(i), e, n));
2040
+ return u === -1 ? -1 : [a, u];
1939
2041
  }
1940
- function he(t, e, n, r, o) {
1941
- const i = On(t.value, n, r);
2042
+ function Ce(t, e, n, r, o) {
2043
+ const i = Rn(t.value, n, r);
1942
2044
  return i === -1 ? -1 : o(t, i, r);
1943
2045
  }
1944
- function On(t, e, n) {
1945
- const r = se([...t.filter((i) => !Q(i))], e), o = [];
2046
+ function Rn(t, e, n) {
2047
+ const r = ce([...t.filter((i) => !_(i))], e), o = [];
1946
2048
  {
1947
2049
  const i = [];
1948
- let s = [];
2050
+ let a = [];
1949
2051
  for (let u = 0; u < r.length; u++) {
1950
2052
  const c = r[u];
1951
- g(c) && Y(c.value) ? (i.push(s), s = []) : s.push(c);
2053
+ m(c) && K(c.value) ? (i.push(a), a = []) : a.push(c);
1952
2054
  }
1953
- i.push(s);
2055
+ i.push(a);
1954
2056
  for (let u = 0; u < i.length; u++) {
1955
2057
  if (i[u].length === 0) return -1;
1956
- const c = N(w(T(i[u]), e, n));
2058
+ const c = N(w(M(i[u]), e, n));
1957
2059
  if (c === -1) return -1;
1958
2060
  o.push(c);
1959
2061
  }
1960
2062
  }
1961
2063
  return o;
1962
2064
  }
1963
- const Tn = /* @__PURE__ */ new Set(["nearest", "up", "down", "to-zero"]);
1964
- function T(t) {
1965
- return new F([a.Function, "calc(", -1, -1, { value: "calc" }], [a.CloseParen, ")", -1, -1, void 0], t);
2065
+ const Un = /* @__PURE__ */ new Set(["nearest", "up", "down", "to-zero"]);
2066
+ function M(t) {
2067
+ return new F([s.Function, "calc(", -1, -1, { value: "calc" }], [s.CloseParen, ")", -1, -1, void 0], t);
1966
2068
  }
1967
- function Rn(t, e) {
1968
- return new F([a.Function, "max(", -1, -1, { value: "max" }], [a.CloseParen, ")", -1, -1, void 0], [t, new d([a.Comma, ",", -1, -1, void 0]), e]);
2069
+ function Wn(t, e) {
2070
+ return new F([s.Function, "max(", -1, -1, { value: "max" }], [s.CloseParen, ")", -1, -1, void 0], [t, new p([s.Comma, ",", -1, -1, void 0]), e]);
1969
2071
  }
1970
- function Mn(t) {
2072
+ function Ln(t) {
1971
2073
  if (t === -1) return -1;
1972
- if (ce(t)) return t;
2074
+ if (pe(t)) return t;
1973
2075
  const e = t.value;
1974
- return D(e) && Number.isNaN(e[4].value) ? h(e) ? new F([a.Function, "calc(", e[2], e[3], { value: "calc" }], [a.CloseParen, ")", e[2], e[3], void 0], [new d([a.Ident, "NaN", e[2], e[3], { value: "NaN" }])]) : k(e) ? new F([a.Function, "calc(", e[2], e[3], { value: "calc" }], [a.CloseParen, ")", e[2], e[3], void 0], [new d([a.Ident, "NaN", e[2], e[3], { value: "NaN" }]), new I([[a.Whitespace, " ", e[2], e[3], void 0]]), new d([a.Delim, "*", e[2], e[3], { value: "*" }]), new I([[a.Whitespace, " ", e[2], e[3], void 0]]), new d([a.Dimension, "1" + e[4].unit, e[2], e[3], { value: 1, type: l.Integer, unit: e[4].unit }])]) : A(e) ? new F([a.Function, "calc(", e[2], e[3], { value: "calc" }], [a.CloseParen, ")", e[2], e[3], void 0], [new d([a.Ident, "NaN", e[2], e[3], { value: "NaN" }]), new I([[a.Whitespace, " ", e[2], e[3], void 0]]), new d([a.Delim, "*", e[2], e[3], { value: "*" }]), new I([[a.Whitespace, " ", e[2], e[3], void 0]]), new d([a.Percentage, "1%", e[2], e[3], { value: 1 }])]) : -1 : t;
2076
+ return D(e) && Number.isNaN(e[4].value) ? h(e) ? new F([s.Function, "calc(", e[2], e[3], { value: "calc" }], [s.CloseParen, ")", e[2], e[3], void 0], [new p([s.Ident, "NaN", e[2], e[3], { value: "NaN" }])]) : k(e) ? new F([s.Function, "calc(", e[2], e[3], { value: "calc" }], [s.CloseParen, ")", e[2], e[3], void 0], [new p([s.Ident, "NaN", e[2], e[3], { value: "NaN" }]), new I([[s.Whitespace, " ", e[2], e[3], void 0]]), new p([s.Delim, "*", e[2], e[3], { value: "*" }]), new I([[s.Whitespace, " ", e[2], e[3], void 0]]), new p([s.Dimension, "1" + e[4].unit, e[2], e[3], { value: 1, type: l.Integer, unit: e[4].unit }])]) : S(e) ? new F([s.Function, "calc(", e[2], e[3], { value: "calc" }], [s.CloseParen, ")", e[2], e[3], void 0], [new p([s.Ident, "NaN", e[2], e[3], { value: "NaN" }]), new I([[s.Whitespace, " ", e[2], e[3], void 0]]), new p([s.Delim, "*", e[2], e[3], { value: "*" }]), new I([[s.Whitespace, " ", e[2], e[3], void 0]]), new p([s.Percentage, "1%", e[2], e[3], { value: 1 }])]) : -1 : t;
1975
2077
  }
1976
- function Un(t) {
2078
+ function qn(t) {
1977
2079
  if (t === -1) return -1;
1978
- if (ce(t)) return t;
2080
+ if (pe(t)) return t;
1979
2081
  const e = t.value;
1980
2082
  if (!D(e) || Number.isFinite(e[4].value) || Number.isNaN(e[4].value)) return t;
1981
2083
  let n = "";
1982
- return Number.NEGATIVE_INFINITY === e[4].value && (n = "-"), h(e) ? new F([a.Function, "calc(", e[2], e[3], { value: "calc" }], [a.CloseParen, ")", e[2], e[3], void 0], [new d([a.Ident, n + "infinity", e[2], e[3], { value: n + "infinity" }])]) : k(e) ? new F([a.Function, "calc(", e[2], e[3], { value: "calc" }], [a.CloseParen, ")", e[2], e[3], void 0], [new d([a.Ident, n + "infinity", e[2], e[3], { value: n + "infinity" }]), new I([[a.Whitespace, " ", e[2], e[3], void 0]]), new d([a.Delim, "*", e[2], e[3], { value: "*" }]), new I([[a.Whitespace, " ", e[2], e[3], void 0]]), new d([a.Dimension, "1" + e[4].unit, e[2], e[3], { value: 1, type: l.Integer, unit: e[4].unit }])]) : new F([a.Function, "calc(", e[2], e[3], { value: "calc" }], [a.CloseParen, ")", e[2], e[3], void 0], [new d([a.Ident, n + "infinity", e[2], e[3], { value: n + "infinity" }]), new I([[a.Whitespace, " ", e[2], e[3], void 0]]), new d([a.Delim, "*", e[2], e[3], { value: "*" }]), new I([[a.Whitespace, " ", e[2], e[3], void 0]]), new d([a.Percentage, "1%", e[2], e[3], { value: 1 }])]);
2084
+ return Number.NEGATIVE_INFINITY === e[4].value && (n = "-"), h(e) ? new F([s.Function, "calc(", e[2], e[3], { value: "calc" }], [s.CloseParen, ")", e[2], e[3], void 0], [new p([s.Ident, n + "infinity", e[2], e[3], { value: n + "infinity" }])]) : k(e) ? new F([s.Function, "calc(", e[2], e[3], { value: "calc" }], [s.CloseParen, ")", e[2], e[3], void 0], [new p([s.Ident, n + "infinity", e[2], e[3], { value: n + "infinity" }]), new I([[s.Whitespace, " ", e[2], e[3], void 0]]), new p([s.Delim, "*", e[2], e[3], { value: "*" }]), new I([[s.Whitespace, " ", e[2], e[3], void 0]]), new p([s.Dimension, "1" + e[4].unit, e[2], e[3], { value: 1, type: l.Integer, unit: e[4].unit }])]) : new F([s.Function, "calc(", e[2], e[3], { value: "calc" }], [s.CloseParen, ")", e[2], e[3], void 0], [new p([s.Ident, n + "infinity", e[2], e[3], { value: n + "infinity" }]), new I([[s.Whitespace, " ", e[2], e[3], void 0]]), new p([s.Delim, "*", e[2], e[3], { value: "*" }]), new I([[s.Whitespace, " ", e[2], e[3], void 0]]), new p([s.Percentage, "1%", e[2], e[3], { value: 1 }])]);
1983
2085
  }
1984
- function Wn(t) {
2086
+ function $n(t) {
1985
2087
  if (t === -1) return -1;
1986
- if (ce(t)) return t;
2088
+ if (pe(t)) return t;
1987
2089
  const e = t.value;
1988
- return D(e) && Object.is(-0, e[4].value) && (e[1] === "-0" || (A(e) ? e[1] = "-0%" : k(e) ? e[1] = "-0" + e[4].unit : e[1] = "-0")), t;
2090
+ return D(e) && Object.is(-0, e[4].value) && (e[1] === "-0" || (S(e) ? e[1] = "-0%" : k(e) ? e[1] = "-0" + e[4].unit : e[1] = "-0")), t;
1989
2091
  }
1990
- function Ln(t, e = 13) {
2092
+ function zn(t, e = 13) {
1991
2093
  if (t === -1) return -1;
1992
- if (e <= 0 || ce(t)) return t;
2094
+ if (e <= 0 || pe(t)) return t;
1993
2095
  const n = t.value;
1994
2096
  if (!D(n) || Number.isInteger(n[4].value)) return t;
1995
2097
  const r = Number(n[4].value.toFixed(e)).toString();
1996
- return h(n) ? n[1] = r : A(n) ? n[1] = r + "%" : k(n) && (n[1] = r + n[4].unit), t;
2098
+ return h(n) ? n[1] = r : S(n) ? n[1] = r + "%" : k(n) && (n[1] = r + n[4].unit), t;
1997
2099
  }
1998
- function qn(t, e) {
2100
+ function Vn(t, e) {
1999
2101
  let n = t;
2000
- return n = Ln(n, e == null ? void 0 : e.precision), n = Wn(n), n = Mn(n), n = Un(n), n;
2102
+ return n = zn(n, e == null ? void 0 : e.precision), n = $n(n), n = Ln(n), n = qn(n), n;
2001
2103
  }
2002
- function $n(t) {
2104
+ function Hn(t) {
2003
2105
  return /* @__PURE__ */ new Map();
2004
2106
  }
2005
- function zn(t, e) {
2006
- return Vn($t(Ft({ css: t }), {}), e).map((n) => n.map((r) => W(...r.tokens())).join("")).join(",");
2107
+ function jn(t, e) {
2108
+ return Gn(Ht(It({ css: t }), {}), e).map((n) => n.map((r) => W(...r.tokens())).join("")).join(",");
2007
2109
  }
2008
- function Vn(t, e) {
2009
- const n = $n();
2010
- return Ht(t, (r) => {
2011
- if (!ce(r)) return;
2012
- const o = Ue.get(r.getName().toLowerCase());
2110
+ function Gn(t, e) {
2111
+ const n = Hn();
2112
+ return Jt(t, (r) => {
2113
+ if (!pe(r)) return;
2114
+ const o = Le.get(r.getName().toLowerCase());
2013
2115
  if (!o) return;
2014
- const i = qn(N(o(r, n, {})), e);
2116
+ const i = Vn(N(o(r, n, {})), e);
2015
2117
  return i !== -1 ? i : void 0;
2016
2118
  });
2017
2119
  }
2018
- new Set(Ue.keys());
2019
- const q = (t, e) => {
2020
- const n = `${t || e}`, r = parseFloat(n);
2021
- let o = "unsupported";
2022
- const i = n.match(/px|rem|em/);
2023
- return i && (o = i[0]), r === 0 && o === "unsupported" && (o = "zero"), { number: r, unit: o };
2024
- }, ze = (t) => {
2120
+ new Set(Le.keys());
2121
+ const q = (t) => {
2122
+ const e = `${t}`, n = parseFloat(e);
2123
+ let r = "unsupported";
2124
+ const o = e.match(/px|rem|em/);
2125
+ return o && (r = o[0]), n === 0 && r === "unsupported" && (r = "zero"), { number: n, unit: r };
2126
+ }, He = (t) => {
2025
2127
  const e = {};
2026
2128
  if (typeof t == "string")
2027
2129
  e.fontSize = q(t);
@@ -2031,7 +2133,7 @@ const q = (t, e) => {
2031
2133
  else if (typeof t[1] == "object") {
2032
2134
  if ("lineHeight" in t[1]) {
2033
2135
  let n = t[1].lineHeight;
2034
- typeof n == "string" && n.includes("calc") && (n = zn(n));
2136
+ typeof n == "string" && n.includes("calc") && (n = jn(n));
2035
2137
  const r = q(n);
2036
2138
  r.unit === "unsupported" ? e.lineHeight = {
2037
2139
  number: n * e.fontSize.number,
@@ -2042,83 +2144,116 @@ const q = (t, e) => {
2042
2144
  }
2043
2145
  }
2044
2146
  return e;
2045
- }, Ve = (t, e, n, r = null) => t.number === e.number ? (le.error(
2147
+ }, Te = (t, e, n, r = null) => t.number === e.number ? (de.error(
2046
2148
  `Same value for start an end${r ? ` (${r})` : ""}: "clamp-[${n}]".`
2047
- ), null) : t.unit !== e.unit && t.unit !== "zero" && e.unit !== "zero" ? (le.error(
2149
+ ), null) : t.unit !== e.unit && t.unit !== "zero" && e.unit !== "zero" ? (de.error(
2048
2150
  `Units need to match${r ? ` (${r})` : ""}: "clamp-[${n}]" ${t.unit} !== ${e.unit}.`
2049
- ), null) : t.unit === "unsupported" || e.unit === "unsupported" ? (le.error(
2151
+ ), null) : t.unit === "unsupported" || e.unit === "unsupported" ? (de.error(
2050
2152
  `Only px, rem and em units are supported${r ? ` (${r})` : ""}: "clamp-[${n}]".`
2051
- ), null) : !0, He = (t, e, n = { number: 23.4375, unit: "rem" }, r = { number: 90, unit: "rem" }) => {
2052
- const o = t.unit === "zero" ? e.unit : t.unit, i = o === "px";
2053
- let s = t.number, u = e.number, c = !1, p = n.number, v = r.number;
2054
- n.unit !== "px" && i && (p = n.number * 16), n.unit === "px" && !i && (p = n.number / 16), r.unit !== "px" && i && (v = r.number * 16), r.unit === "px" && !i && (v = r.number / 16), u < s && s < 0 && u < 0 ? (s = Math.abs(s), u = Math.abs(u), c = !0) : u < s && s > 0 && u > 0 ? (s = s * -1, u = u * -1, c = !0) : u < s && (s = Math.abs(s) * -1, u = Math.abs(u), c = !0);
2055
- const f = (u - s) / (v - p), m = `${(s - p * f).toFixed(6)}${o} + ${(100 * f).toFixed(6)}vw`, C = `clamp(${s}${o}, ${m}, ${u}${o})`;
2056
- return c ? `calc(${C} * -1)` : C;
2057
- }, Hn = {
2058
- minViewportWidth: "23.4375rem",
2059
- maxViewportWidth: "90rem"
2060
- }, Gn = st.withOptions(function(t = {}) {
2061
- const e = { ...Hn, ...t };
2153
+ ), null) : !0, je = (t, e, n = { number: 23.4375, unit: "rem" }, r = { number: 90, unit: "rem" }, o = !1) => {
2154
+ const i = t.unit === "zero" ? e.unit : t.unit, a = i === "px";
2155
+ let u = t.number, c = e.number, d = !1, g = n.number, f = r.number;
2156
+ n.unit !== "px" && a && (g = n.number * 16), n.unit === "px" && !a && (g = n.number / 16), r.unit !== "px" && a && (f = r.number * 16), r.unit === "px" && !a && (f = r.number / 16), c < u && u < 0 && c < 0 ? (u = Math.abs(u), c = Math.abs(c), d = !0) : c < u && u > 0 && c > 0 ? (u = u * -1, c = c * -1, d = !0) : c < u && (u = Math.abs(u) * -1, c = Math.abs(c), d = !0);
2157
+ const v = (c - u) / (f - g), C = `${(u - g * v).toFixed(6)}${i} + ${(100 * v).toFixed(6)}${o ? "cqw" : "vw"}`, P = `clamp(${u}${i}, ${C}, ${c}${i})`;
2158
+ return d ? `calc(${P} * -1)` : P;
2159
+ }, Jn = {
2160
+ minSize: "23.4375rem",
2161
+ maxSize: "90rem"
2162
+ };
2163
+ function Ge(t, e, n, r) {
2164
+ if (!t)
2165
+ return {
2166
+ ...q(e),
2167
+ isContainer: !1
2168
+ };
2169
+ const o = t.startsWith("@"), i = o ? t.slice(1) : t, a = o ? r[i] || i : n[i] || i;
2170
+ return {
2171
+ ...q(a),
2172
+ isContainer: o
2173
+ };
2174
+ }
2175
+ const Kn = lt.withOptions(function(t = {}) {
2176
+ const e = { ...Jn, ...t };
2062
2177
  return function({ matchUtilities: n, theme: r, config: o }) {
2063
2178
  n(
2064
2179
  {
2065
2180
  clamp: (i) => {
2066
- const s = i.split(",");
2067
- if (s.length < 3)
2068
- return le.error(
2181
+ const a = i.split(",");
2182
+ if (a.length < 3)
2183
+ return de.error(
2069
2184
  `The clamp utility requires at least 3 arguments: "clamp-[${i}]".`
2070
2185
  ), {};
2071
- const u = q(
2072
- o().theme.screens[s[3]] || s[3],
2073
- e.minViewportWidth
2074
- ), c = q(
2075
- o().theme.screens[s[4]] || s[4],
2076
- e.maxViewportWidth
2077
- ), p = ut(s[0]);
2078
- if (!p)
2079
- return le.error(
2080
- `Property "${s[0]}" is not supported: "clamp-[${i}]".`
2186
+ const u = r("screens"), c = r("containers"), d = Ge(
2187
+ a[3],
2188
+ e.minSize,
2189
+ u,
2190
+ c
2191
+ ), g = Ge(
2192
+ a[4],
2193
+ e.maxSize,
2194
+ u,
2195
+ c
2196
+ );
2197
+ if (!Te(d, g, i))
2198
+ return {};
2199
+ const f = d.isContainer, v = pt(a[0]);
2200
+ if (!v)
2201
+ return de.error(
2202
+ `Property "${a[0]}" is not supported: "clamp-[${i}]".`
2081
2203
  ), {};
2082
- const { key: v, props: f, type: m } = p;
2083
- if (m === "fontSize") {
2084
- const P = ze(
2085
- o().theme[v][s[1]] || s[1]
2086
- ), U = ze(
2087
- o().theme[v][s[2]] || s[2]
2088
- ), X = {};
2089
- return Object.keys(P).forEach((S) => {
2090
- if (S in U) {
2091
- if ((S === "letterSpacing" || S === "lineHeight") && P[S].number === U[S].number && P[S].unit === U[S].unit)
2092
- X[S] = `${P[S].number}${P[S].unit}`;
2093
- else if (Ve(P[S], U[S], i, S)) {
2094
- const Fe = He(P[S], U[S], u, c);
2095
- X[S] = Fe;
2204
+ const { key: C, props: P, type: y } = v;
2205
+ if (y === "fontSize") {
2206
+ const A = He(
2207
+ o().theme[C][a[1]] || a[1]
2208
+ ), O = He(
2209
+ o().theme[C][a[2]] || a[2]
2210
+ ), ee = {};
2211
+ return Object.keys(A).forEach((b) => {
2212
+ if (b in O) {
2213
+ if ((b === "letterSpacing" || b === "lineHeight") && A[b].number === O[b].number && A[b].unit === O[b].unit)
2214
+ ee[b] = `${A[b].number}${A[b].unit}`;
2215
+ else if (Te(A[b], O[b], i, b)) {
2216
+ const we = je(
2217
+ A[b],
2218
+ O[b],
2219
+ d,
2220
+ g,
2221
+ f
2222
+ );
2223
+ ee[b] = we;
2096
2224
  }
2097
2225
  }
2098
- }), Object.keys(X).length > 0 ? X : {};
2226
+ }), ee;
2099
2227
  }
2100
- let C = q(o().theme[v][s[1]] || s[1]), b = q(o().theme[v][s[2]] || s[2]);
2101
- if (m === "spacing") {
2102
- const P = q(r("spacing.1")), U = s[1].startsWith("-"), X = s[2].startsWith("-"), S = U ? s[1].slice(1) : s[1], Fe = X ? s[2].slice(1) : s[2];
2103
- C = {
2104
- number: P.number * S,
2105
- unit: P.unit
2106
- }, b = {
2107
- number: P.number * Fe,
2108
- unit: P.unit
2109
- };
2228
+ let z = q(o().theme[C][a[1]] || a[1]), V = q(o().theme[C][a[2]] || a[2]);
2229
+ if (y === "spacing") {
2230
+ const A = q(r("spacing.1")), O = a[1].startsWith("-"), ee = a[2].startsWith("-"), b = O ? a[1].slice(1) : a[1], we = ee ? a[2].slice(1) : a[2];
2231
+ z = {
2232
+ number: A.number * b,
2233
+ unit: A.unit
2234
+ }, V = {
2235
+ number: A.number * we,
2236
+ unit: A.unit
2237
+ }, O && (z.number = z.number * -1), ee && (V.number = V.number * -1);
2110
2238
  }
2111
- if (!Ve(C, b, i))
2239
+ if (!Te(z, V, i))
2112
2240
  return {};
2113
- const E = He(C, b, u, c);
2114
- return f.reduce((P, U) => (typeof U == "string" ? P[U] = E : P = { ...P, ...U }, P), {});
2241
+ const at = je(z, V, d, g, f);
2242
+ return P.reduce((A, O) => (typeof O == "string" ? A[O] = at : A = { ...A, ...O }, A), {});
2115
2243
  }
2116
2244
  },
2117
- { values: r("clamp") }
2245
+ { values: r("clamp") },
2246
+ {
2247
+ supportsNegativeValues: !1,
2248
+ modifiers: {
2249
+ pattern: /[\w-]+(?:,[\w-]+){2}/
2250
+ // Matches "text,lg,3xl" format
2251
+ }
2252
+ }
2118
2253
  );
2119
2254
  };
2120
2255
  });
2121
2256
  export {
2122
- Gn as default
2257
+ Kn as default
2123
2258
  };
2124
2259
  //# sourceMappingURL=index.js.map