@jasonshimmy/custom-elements-runtime 2.1.2 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,21 +1,140 @@
1
- import { anchorBlock as be } from "./custom-elements-runtime.directives.es.js";
2
- function xe(e, ...r) {
1
+ import { anchorBlock as ve } from "./custom-elements-runtime.directives.es.js";
2
+ const we = `/*
3
+ * Custom Elements Variables CSS
4
+ * CSS variables for colors and fonts
5
+ */
6
+
7
+ :root,
8
+ :host {
9
+ /* Font families (match runtime defaults in src/lib/runtime/style.ts) */
10
+ --cer-font-sans:
11
+ ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto,
12
+ 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
13
+ --cer-font-serif: ui-serif, Georgia, 'Times New Roman', Times, serif;
14
+ --cer-font-mono:
15
+ ui-monospace, 'SFMono-Regular', Menlo, Monaco, 'Roboto Mono', 'Courier New',
16
+ monospace;
17
+
18
+ /* Default outline style */
19
+ --cer-outline-style: solid;
20
+
21
+ /* Colors */
22
+ --cer-color-transparent: transparent;
23
+ --cer-color-current: currentColor;
24
+ --cer-color-black: #000000;
25
+ --cer-color-white: #ffffff;
26
+ --cer-color-inherit: inherit;
27
+
28
+ /* neutral */
29
+ --cer-color-neutral-50: #fafafa;
30
+ --cer-color-neutral-100: #f4f4f5;
31
+ --cer-color-neutral-200: #e4e4e7;
32
+ --cer-color-neutral-300: #d4d4d8;
33
+ --cer-color-neutral-400: #9f9fa9;
34
+ --cer-color-neutral-500: #71717b;
35
+ --cer-color-neutral-600: #52525c;
36
+ --cer-color-neutral-700: #3f3f46;
37
+ --cer-color-neutral-800: #27272a;
38
+ --cer-color-neutral-900: #18181b;
39
+ --cer-color-neutral-950: #09090b;
40
+
41
+ /* primary */
42
+ --cer-color-primary-50: #eff6ff;
43
+ --cer-color-primary-100: #dbeafe;
44
+ --cer-color-primary-200: #bfdbfe;
45
+ --cer-color-primary-300: #93c5fd;
46
+ --cer-color-primary-400: #60a5fa;
47
+ --cer-color-primary-500: #3b82f6;
48
+ --cer-color-primary-600: #2563eb;
49
+ --cer-color-primary-700: #1d4ed8;
50
+ --cer-color-primary-800: #1e40af;
51
+ --cer-color-primary-900: #1e3a8a;
52
+ --cer-color-primary-950: #172554;
53
+
54
+ /* secondary */
55
+ --cer-color-secondary-50: #eef2ff;
56
+ --cer-color-secondary-100: #e0e7ff;
57
+ --cer-color-secondary-200: #c7d2fe;
58
+ --cer-color-secondary-300: #a5b4fc;
59
+ --cer-color-secondary-400: #818cf8;
60
+ --cer-color-secondary-500: #6366f1;
61
+ --cer-color-secondary-600: #4f46e5;
62
+ --cer-color-secondary-700: #4338ca;
63
+ --cer-color-secondary-800: #3730a3;
64
+ --cer-color-secondary-900: #312e81;
65
+ --cer-color-secondary-950: #1e1b4b;
66
+
67
+ /* success */
68
+ --cer-color-success-50: #f0fdf4;
69
+ --cer-color-success-100: #dcfce7;
70
+ --cer-color-success-200: #bbf7d0;
71
+ --cer-color-success-300: #86efac;
72
+ --cer-color-success-400: #4ade80;
73
+ --cer-color-success-500: #22c55e;
74
+ --cer-color-success-600: #16a34a;
75
+ --cer-color-success-700: #15803d;
76
+ --cer-color-success-800: #166534;
77
+ --cer-color-success-900: #14532d;
78
+ --cer-color-success-950: #052e16;
79
+
80
+ /* info */
81
+ --cer-color-info-50: #f0f9ff;
82
+ --cer-color-info-100: #e0f2fe;
83
+ --cer-color-info-200: #bae6fd;
84
+ --cer-color-info-300: #7dd3fc;
85
+ --cer-color-info-400: #38bdf8;
86
+ --cer-color-info-500: #0ea5e9;
87
+ --cer-color-info-600: #0284c7;
88
+ --cer-color-info-700: #0369a1;
89
+ --cer-color-info-800: #075985;
90
+ --cer-color-info-900: #0c4a6e;
91
+ --cer-color-info-950: #082f49;
92
+
93
+ /* warning */
94
+ --cer-color-warning-50: #fffbeb;
95
+ --cer-color-warning-100: #fef3c7;
96
+ --cer-color-warning-200: #fde68a;
97
+ --cer-color-warning-300: #fcd34d;
98
+ --cer-color-warning-400: #fbbf24;
99
+ --cer-color-warning-500: #f59e0b;
100
+ --cer-color-warning-600: #d97706;
101
+ --cer-color-warning-700: #b45309;
102
+ --cer-color-warning-800: #92400e;
103
+ --cer-color-warning-900: #78350f;
104
+ --cer-color-warning-950: #451a03;
105
+
106
+ /* error */
107
+ --cer-color-error-50: #fef2f2;
108
+ --cer-color-error-100: #fee2e2;
109
+ --cer-color-error-200: #fecaca;
110
+ --cer-color-error-300: #fca5a5;
111
+ --cer-color-error-400: #f87171;
112
+ --cer-color-error-500: #ef4444;
113
+ --cer-color-error-600: #dc2626;
114
+ --cer-color-error-700: #b91c1c;
115
+ --cer-color-error-800: #991b1b;
116
+ --cer-color-error-900: #7f1d1d;
117
+ --cer-color-error-950: #450a0a;
118
+ }
119
+ `;
120
+ function $e(e, ...r) {
3
121
  let o = "";
4
- for (let i = 0; i < e.length; i++)
5
- o += e[i], i < r.length && (o += r[i]);
122
+ for (let n = 0; n < e.length; n++)
123
+ o += e[n], n < r.length && (o += r[n]);
6
124
  return o;
7
125
  }
8
- function ve(e) {
126
+ function ye(e) {
9
127
  return e.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\s+/g, " ").replace(/\s*([{}:;,>+~])\s*/g, "$1").replace(/;}/g, "}").trim();
10
128
  }
11
- let J = null;
12
- function We() {
13
- return J || (J = new CSSStyleSheet(), J.replaceSync(ve(we))), J;
129
+ let X = null;
130
+ function Ie() {
131
+ return X || (X = new CSSStyleSheet(), X.replaceSync(ye(ke))), X;
14
132
  }
15
- function _e(e) {
133
+ function De(e) {
16
134
  return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi, "").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi, "").replace(/expression\s*\([^)]*\)/gi, "");
17
135
  }
18
- const we = xe`
136
+ const ke = $e`
137
+ ${we}
19
138
  :host,
20
139
  *,
21
140
  ::before,
@@ -47,6 +166,8 @@ const we = xe`
47
166
  --cer-gradient-from: rgba(255, 255, 255, 0);
48
167
  --cer-gradient-to: rgba(255, 255, 255, 0);
49
168
  --cer-gradient-stops: var(--cer-gradient-from), var(--cer-gradient-to);
169
+ /* Default outline style variable */
170
+ --cer-outline-style: solid;
50
171
  }
51
172
  button,
52
173
  input,
@@ -130,7 +251,7 @@ const we = xe`
130
251
  [hidden] {
131
252
  display: none;
132
253
  }
133
- `, $e = {
254
+ `, je = {
134
255
  // Existing semantic colors
135
256
  neutral: {
136
257
  50: "#fafafa",
@@ -228,17 +349,17 @@ const we = xe`
228
349
  black: { DEFAULT: "#000000" },
229
350
  transparent: { DEFAULT: "transparent" },
230
351
  current: { DEFAULT: "currentColor" }
231
- }, he = Object.fromEntries(
232
- Object.entries($e).map(([e, r]) => [
352
+ }, be = Object.fromEntries(
353
+ Object.entries(je).map(([e, r]) => [
233
354
  e,
234
355
  Object.fromEntries(
235
- Object.entries(r).map(([o, i]) => [
356
+ Object.entries(r).map(([o, n]) => [
236
357
  o,
237
- `var(--cer-color-${e}${o === "DEFAULT" ? "" : `-${o}`}, ${i})`
358
+ `var(--cer-color-${e}${o === "DEFAULT" ? "" : `-${o}`}, ${n})`
238
359
  ])
239
360
  )
240
361
  ])
241
- ), B = "0.25rem", ye = {
362
+ ), I = "0.25rem", Se = {
242
363
  "3xs": 64,
243
364
  "2xs": 72,
244
365
  xs: 80,
@@ -283,7 +404,7 @@ const we = xe`
283
404
  gap: ["gap"],
284
405
  "gap-x": ["column-gap"],
285
406
  "gap-y": ["row-gap"]
286
- }, ke = () => {
407
+ }, Te = () => {
287
408
  const e = {};
288
409
  e["@container"] = "container-type:inline-size;", [
289
410
  "block",
@@ -407,8 +528,8 @@ const we = xe`
407
528
  ["text-7xl", "4.5rem", "1"],
408
529
  ["text-8xl", "6rem", "1"],
409
530
  ["text-9xl", "8rem", "1"]
410
- ].forEach(([t, a, g]) => {
411
- e[t] = `font-size:${a};line-height:var(--cer-line-height,${g});`;
531
+ ].forEach(([t, a, d]) => {
532
+ e[t] = `font-size:${a};line-height:var(--cer-line-height,${d});`;
412
533
  }), [
413
534
  ["tracking-tighter", "-0.05em"],
414
535
  ["tracking-tight", "-0.025em"],
@@ -436,15 +557,22 @@ const we = xe`
436
557
  ].forEach(([t, a]) => {
437
558
  e[t] = `line-height:${a};--cer-line-height:${a};line-height:var(--cer-line-height,${a});`;
438
559
  });
439
- const c = [0, 1, 2, 4, 6, 8];
440
- for (const t of c) {
560
+ const s = [0, 1, 2, 4, 6, 8];
561
+ for (const t of s) {
441
562
  const a = `${t}px`;
442
- e[`border-${t}`] = `border-width:${a};`, e[`border-t-${t}`] = `border-top-width:${a};`, e[`border-r-${t}`] = `border-right-width:${a};`, e[`border-b-${t}`] = `border-bottom-width:${a};`, e[`border-l-${t}`] = `border-left-width:${a};`, e[`border-x-${t}`] = `border-left-width:${a};border-right-width:${a};`, e[`border-y-${t}`] = `border-top-width:${a};border-bottom-width:${a};`;
563
+ e[`outline-${t}`] = `outline-style:var(--cer-outline-style);outline-width:${a};`, e[`outline-offset-${t}`] = `outline-offset:${a};`, e[`border-${t}`] = `border-width:${a};`, e[`border-t-${t}`] = `border-top-width:${a};`, e[`border-r-${t}`] = `border-right-width:${a};`, e[`border-b-${t}`] = `border-bottom-width:${a};`, e[`border-l-${t}`] = `border-left-width:${a};`, e[`border-x-${t}`] = `border-left-width:${a};border-right-width:${a};`, e[`border-y-${t}`] = `border-top-width:${a};border-bottom-width:${a};`;
443
564
  }
444
565
  Object.assign(e, {
445
566
  "font-sans": "font-family:var(--cer-font-sans, ui-sans-serif,system-ui,sans-serif);",
446
567
  "font-serif": "font-family:var(--cer-font-serif, ui-serif,Georgia,serif);",
447
568
  "font-mono": "font-family:var(--cer-font-mono, ui-monospace,SFMono-Regular,monospace);",
569
+ outline: "outline-style:var(--cer-outline-style);outline-width:1px;",
570
+ "outline-solid": "--cer-outline-style:solid;outline-style:solid;",
571
+ "outline-dashed": "--cer-outline-style:dashed;outline-style:dashed;",
572
+ "outline-dotted": "--cer-outline-style:dotted;outline-style:dotted;",
573
+ "outline-double": "--cer-outline-style:double;outline-style:double;",
574
+ "outline-none": "--cer-outline-style:none;outline-style:none;",
575
+ "outline-hidden": "--cer-outline-style:none;outline:2px solid transparent;outline-offset:2px;",
448
576
  border: "border-width:1px;",
449
577
  "border-t": "border-top-width:1px;",
450
578
  "border-r": "border-right-width:1px;",
@@ -471,8 +599,8 @@ const we = xe`
471
599
  full: 9999
472
600
  };
473
601
  for (const [t, a] of Object.entries(u)) {
474
- const g = a === 9999 ? "9999px" : `${a / 16}rem`;
475
- e[`rounded-${t}`] = `border-radius:${g};`, e[`rounded-t-${t}`] = `border-top-left-radius:${g};border-top-right-radius:${g};`, e[`rounded-r-${t}`] = `border-top-right-radius:${g};border-bottom-right-radius:${g};`, e[`rounded-b-${t}`] = `border-bottom-left-radius:${g};border-bottom-right-radius:${g};`, e[`rounded-l-${t}`] = `border-top-left-radius:${g};border-bottom-left-radius:${g};`, e[`rounded-tl-${t}`] = `border-top-left-radius:${g};`, e[`rounded-tr-${t}`] = `border-top-right-radius:${g};`, e[`rounded-br-${t}`] = `border-bottom-right-radius:${g};`, e[`rounded-bl-${t}`] = `border-bottom-left-radius:${g};`;
602
+ const d = a === 9999 ? "9999px" : `${a / 16}rem`;
603
+ e[`rounded-${t}`] = `border-radius:${d};`, e[`rounded-t-${t}`] = `border-top-left-radius:${d};border-top-right-radius:${d};`, e[`rounded-r-${t}`] = `border-top-right-radius:${d};border-bottom-right-radius:${d};`, e[`rounded-b-${t}`] = `border-bottom-left-radius:${d};border-bottom-right-radius:${d};`, e[`rounded-l-${t}`] = `border-top-left-radius:${d};border-bottom-left-radius:${d};`, e[`rounded-tl-${t}`] = `border-top-left-radius:${d};`, e[`rounded-tr-${t}`] = `border-top-right-radius:${d};`, e[`rounded-br-${t}`] = `border-bottom-right-radius:${d};`, e[`rounded-bl-${t}`] = `border-bottom-left-radius:${d};`;
476
604
  }
477
605
  Object.assign(e, {
478
606
  "shadow-none": "--cer-shadow-color:rgb(0 0 0 / 0);box-shadow:0 0 var(--cer-shadow-color, #0000);",
@@ -500,7 +628,7 @@ const we = xe`
500
628
  "overflow-y-visible": "overflow-y:visible;",
501
629
  "overflow-y-scroll": "overflow-y:scroll;"
502
630
  });
503
- const j = [
631
+ const m = [
504
632
  "auto",
505
633
  "default",
506
634
  "pointer",
@@ -512,7 +640,7 @@ const we = xe`
512
640
  "grab",
513
641
  "grabbing"
514
642
  ];
515
- for (const t of j) e[`cursor-${t}`] = `cursor:${t};`;
643
+ for (const t of m) e[`cursor-${t}`] = `cursor:${t};`;
516
644
  for (const t of [0, 10, 20, 30, 40, 50]) e[`z-${t}`] = `z-index:${t};`;
517
645
  Object.assign(e, {
518
646
  "sr-only": "position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;",
@@ -548,8 +676,8 @@ const we = xe`
548
676
  "mx-auto": "margin-inline:auto;",
549
677
  "my-auto": "margin-block:auto;"
550
678
  });
551
- for (const [t, a] of Object.entries(ye))
552
- e[`max-w-${t}`] = `max-width:calc(${B} * ${a});`, e[`min-w-${t}`] = `min-width:calc(${B} * ${a});`, e[`w-${t}`] = `width:calc(${B} * ${a});`, e[`max-h-${t}`] = `max-height:calc(${B} * ${a});`, e[`min-h-${t}`] = `min-height:calc(${B} * ${a});`, e[`h-${t}`] = `height:calc(${B} * ${a});`;
679
+ for (const [t, a] of Object.entries(Se))
680
+ e[`max-w-${t}`] = `max-width:calc(${I} * ${a});`, e[`min-w-${t}`] = `min-width:calc(${I} * ${a});`, e[`w-${t}`] = `width:calc(${I} * ${a});`, e[`max-h-${t}`] = `max-height:calc(${I} * ${a});`, e[`min-h-${t}`] = `min-height:calc(${I} * ${a});`, e[`h-${t}`] = `height:calc(${I} * ${a});`;
553
681
  Object.assign(e, {
554
682
  transition: "transition-property:all;transition-duration:150ms;transition-timing-function:ease-in-out;",
555
683
  "transition-none": "transition-property:none;",
@@ -666,33 +794,33 @@ const we = xe`
666
794
  "bg-conic-at-l": "background-image:conic-gradient(from 0deg at left, var(--cer-gradient-stops));",
667
795
  "bg-conic-at-tl": "background-image:conic-gradient(from 0deg at top left, var(--cer-gradient-stops));"
668
796
  }), e;
669
- }, re = ke();
670
- function L(e, r) {
797
+ }, re = Te();
798
+ function M(e, r) {
671
799
  let o = 0;
672
- for (let i = 0; i < e.length; i++) {
673
- const s = e[i];
674
- if (s === "[" || s === "(") o++;
675
- else if ((s === "]" || s === ")") && o > 0) o--;
676
- else if (o === 0 && (s === ">" || s === "+" || s === "~" || s === " "))
677
- return e.slice(0, i) + r + e.slice(i);
800
+ for (let n = 0; n < e.length; n++) {
801
+ const c = e[n];
802
+ if (c === "[" || c === "(") o++;
803
+ else if ((c === "]" || c === ")") && o > 0) o--;
804
+ else if (o === 0 && (c === ">" || c === "+" || c === "~" || c === " "))
805
+ return e.slice(0, n) + r + e.slice(n);
678
806
  }
679
807
  return e + r;
680
808
  }
681
- const je = {
809
+ const Ae = {
682
810
  before: (e, r) => `${e}::before{${r}}`,
683
811
  after: (e, r) => `${e}::after{${r}}`,
684
- hover: (e, r) => `${L(e, ":hover")}{${r}}`,
685
- focus: (e, r) => `${L(e, ":focus")}{${r}}`,
686
- active: (e, r) => `${L(e, ":active")}{${r}}`,
687
- disabled: (e, r) => `${L(e, ":disabled")}{${r}}`,
688
- visited: (e, r) => `${L(e, ":visited")}{${r}}`,
689
- checked: (e, r) => `${L(e, ":checked")}{${r}}`,
690
- first: (e, r) => `${L(e, ":first-child")}{${r}}`,
691
- last: (e, r) => `${L(e, ":last-child")}{${r}}`,
692
- odd: (e, r) => `${L(e, ":nth-child(odd)")}{${r}}`,
693
- even: (e, r) => `${L(e, ":nth-child(even)")}{${r}}`,
694
- "focus-within": (e, r) => `${L(e, ":focus-within")}{${r}}`,
695
- "focus-visible": (e, r) => `${L(e, ":focus-visible")}{${r}}`,
812
+ hover: (e, r) => `${M(e, ":hover")}{${r}}`,
813
+ focus: (e, r) => `${M(e, ":focus")}{${r}}`,
814
+ active: (e, r) => `${M(e, ":active")}{${r}}`,
815
+ disabled: (e, r) => `${M(e, ":disabled")}{${r}}`,
816
+ visited: (e, r) => `${M(e, ":visited")}{${r}}`,
817
+ checked: (e, r) => `${M(e, ":checked")}{${r}}`,
818
+ first: (e, r) => `${M(e, ":first-child")}{${r}}`,
819
+ last: (e, r) => `${M(e, ":last-child")}{${r}}`,
820
+ odd: (e, r) => `${M(e, ":nth-child(odd)")}{${r}}`,
821
+ even: (e, r) => `${M(e, ":nth-child(even)")}{${r}}`,
822
+ "focus-within": (e, r) => `${M(e, ":focus-within")}{${r}}`,
823
+ "focus-visible": (e, r) => `${M(e, ":focus-visible")}{${r}}`,
696
824
  "group-hover": (e, r) => `.group:hover ${e}{${r}}`,
697
825
  "group-focus": (e, r) => `.group:focus ${e}{${r}}`,
698
826
  "group-active": (e, r) => `.group:active ${e}{${r}}`,
@@ -720,7 +848,7 @@ const je = {
720
848
  "5xl": "(min-width:64rem)",
721
849
  "6xl": "(min-width:72rem)",
722
850
  "7xl": "(min-width:80rem)"
723
- }, ie = ["sm", "md", "lg", "xl", "2xl"], ne = [
851
+ }, ne = ["sm", "md", "lg", "xl", "2xl"], ie = [
724
852
  "xs",
725
853
  "sm",
726
854
  "md",
@@ -734,45 +862,47 @@ const je = {
734
862
  "7xl"
735
863
  ];
736
864
  function ae(e) {
737
- const r = e.startsWith("-"), o = r ? e.slice(1) : e, i = o.lastIndexOf("-");
738
- if (i === -1) return null;
739
- const s = o.slice(0, i), c = o.slice(i + 1);
740
- if (!te[s]) return null;
741
- if (c.includes("/")) {
742
- const [t, a] = c.split("/").map((T) => parseFloat(T));
865
+ const r = e.startsWith("-"), o = r ? e.slice(1) : e, n = o.lastIndexOf("-");
866
+ if (n === -1) return null;
867
+ const c = o.slice(0, n), s = o.slice(n + 1);
868
+ if (!te[c]) return null;
869
+ if (s.includes("/")) {
870
+ const [t, a] = s.split("/").map((y) => parseFloat(y));
743
871
  if (Number.isNaN(t) || Number.isNaN(a) || a === 0)
744
872
  return null;
745
- const g = t / a * 100;
746
- return te[s].map((T) => `${T}:${g}%;`).join("");
873
+ const d = t / a * 100;
874
+ return te[c].map((y) => `${y}:${d}%;`).join("");
747
875
  }
748
- const u = parseFloat(c);
876
+ const u = parseFloat(s);
749
877
  if (Number.isNaN(u)) return null;
750
- const j = r ? "-" : "";
751
- return te[s].map((t) => `${t}:calc(${j}${B} * ${u});`).join("");
878
+ const m = r ? "-" : "";
879
+ return te[c].map((t) => `${t}:calc(${m}${I} * ${u});`).join("");
752
880
  }
753
- function se(e) {
754
- const r = e.startsWith("-"), i = (r ? e.slice(1) : e).match(/^space-(x|y)-(.+)$/);
755
- if (!i) return null;
756
- const [, s, c] = i, u = s === "x";
757
- if (c === "reverse")
881
+ function ce(e) {
882
+ const r = e.startsWith("-"), n = (r ? e.slice(1) : e).match(/^space-(x|y)-(.+)$/);
883
+ if (!n) return null;
884
+ const [, c, s] = n, u = c === "x";
885
+ if (s === "reverse")
758
886
  return u ? "--cer-space-x-reverse:1;" : "--cer-space-y-reverse:1;";
759
- if (c.includes("/")) {
760
- const [g, T] = c.split("/").map((z) => parseFloat(z));
761
- if (Number.isNaN(g) || Number.isNaN(T) || T === 0)
887
+ if (s.includes("/")) {
888
+ const [d, y] = s.split("/").map((C) => parseFloat(C));
889
+ if (Number.isNaN(d) || Number.isNaN(y) || y === 0)
762
890
  return null;
763
- const A = g / T * 100, S = r ? "-" : "";
764
- return u ? `--cer-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${S}${A}% * calc(1 - var(--cer-space-x-reverse)));margin-inline-end:calc(${S}${A}% * var(--cer-space-x-reverse));}` : `--cer-space-y-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-top:calc(${S}${A}% * calc(1 - var(--cer-space-y-reverse)));margin-bottom:calc(${S}${A}% * var(--cer-space-y-reverse));}`;
891
+ const v = d / y * 100, A = r ? "-" : "";
892
+ return u ? `--cer-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${A}${v}% * calc(1 - var(--cer-space-x-reverse)));margin-inline-end:calc(${A}${v}% * var(--cer-space-x-reverse));}` : `--cer-space-y-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-top:calc(${A}${v}% * calc(1 - var(--cer-space-y-reverse)));margin-bottom:calc(${A}${v}% * var(--cer-space-y-reverse));}`;
765
893
  }
766
- const j = parseFloat(c);
767
- if (Number.isNaN(j)) return null;
768
- const a = `calc(${r ? "-" : ""}${B} * ${j})`;
894
+ const m = parseFloat(s);
895
+ if (Number.isNaN(m)) return null;
896
+ const a = `calc(${r ? "-" : ""}${I} * ${m})`;
769
897
  return u ? `--cer-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${a} * calc(1 - var(--cer-space-x-reverse)));margin-inline-end:calc(${a} * var(--cer-space-x-reverse));}` : `--cer-space-y-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-top:calc(${a} * calc(1 - var(--cer-space-y-reverse)));margin-bottom:calc(${a} * var(--cer-space-y-reverse));}`;
770
898
  }
771
- function ue(e) {
772
- const r = e.replace("#", ""), o = parseInt(r, 16);
899
+ function q(e) {
900
+ let r = e.replace("#", "");
901
+ r.length === 3 && (r = r.split("").map((n) => n + n).join(""));
902
+ const o = parseInt(r, 16);
773
903
  return `${o >> 16 & 255} ${o >> 8 & 255} ${o & 255}`;
774
904
  }
775
- const Te = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/, Ae = {
905
+ const Ce = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/, Fe = {
776
906
  bg: "background-color",
777
907
  decoration: "text-decoration-color",
778
908
  text: "color",
@@ -783,56 +913,89 @@ const Te = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)
783
913
  fill: "fill",
784
914
  stroke: "stroke"
785
915
  };
786
- function Se(e) {
787
- const r = Te.exec(e);
916
+ function Oe(e) {
917
+ const r = Ce.exec(e);
788
918
  if (!r) return null;
789
- const [, o, i, s = "DEFAULT"] = r, c = he[i]?.[s];
790
- if (!c) return null;
791
- if (o === "shadow") return `--cer-shadow-color:${c};`;
792
- const u = Ae[o];
793
- return u ? `${u}:${c};` : null;
919
+ const [, o, n, c = "DEFAULT"] = r, s = be[n]?.[c];
920
+ if (!s) return null;
921
+ if (o === "shadow") return `--cer-shadow-color:${s};`;
922
+ const u = Fe[o];
923
+ return u ? `${u}:${s};` : null;
794
924
  }
795
- function Fe(e) {
925
+ function Ee(e) {
796
926
  const r = e.indexOf("/");
797
927
  if (r === -1) return { base: e };
798
- const o = e.slice(0, r), i = e.slice(r + 1), s = parseInt(i, 10);
799
- return isNaN(s) || s < 0 || s > 100 ? { base: o } : { base: o, opacity: s / 100 };
928
+ const o = e.slice(0, r), n = e.slice(r + 1), c = parseInt(n, 10);
929
+ return isNaN(c) || c < 0 || c > 100 ? { base: o } : { base: o, opacity: c / 100 };
800
930
  }
801
- function ce(e) {
802
- const { base: r, opacity: o } = Fe(e), i = Se(r);
803
- if (i && o !== void 0) {
804
- const c = /#([0-9a-f]{6})/i.exec(i);
805
- if (c) {
806
- const u = ue(c[0]);
807
- return i.replace(/#([0-9a-f]{6})/i, `rgb(${u} / ${o})`);
931
+ function se(e) {
932
+ const { base: r, opacity: o } = Ee(e), n = Oe(r);
933
+ if (n) {
934
+ if (o !== void 0) {
935
+ if (n.includes("var(")) {
936
+ const u = /var\([^)]*\)/.exec(n);
937
+ if (u) {
938
+ const m = u[0], t = o * 100, a = `color-mix(in srgb, ${m} ${t}%, rgba(0 0 0 / 0) ${100 - t}%)`, d = /#([0-9a-f]{6}|[0-9a-f]{3})/i.exec(m), y = /^([a-z-]+):/.exec(n), v = y ? y[1] : "background-color";
939
+ if (d) {
940
+ const C = `rgb(${q(d[0])} / ${o})`, f = m.replace(
941
+ /#([0-9a-f]{6}|[0-9a-f]{3})/i,
942
+ C
943
+ );
944
+ return `${v}:${f};__CE_COLOR_MIX_SPLIT__${v}:${a};`;
945
+ }
946
+ return `${v}:${a};`;
947
+ }
948
+ }
949
+ const s = /#([0-9a-f]{6}|[0-9a-f]{3})/i.exec(n);
950
+ if (s) {
951
+ const u = q(s[0]);
952
+ return n.replace(
953
+ /#([0-9a-f]{6}|[0-9a-f]{3})/i,
954
+ `rgb(${u} / ${o})`
955
+ );
956
+ }
808
957
  }
958
+ return n;
809
959
  }
810
- if (i) return i;
811
- const s = Q(r);
812
- if (s && o !== void 0) {
813
- const c = /#([0-9a-f]{6})/i.exec(s);
814
- if (c) {
815
- const u = ue(c[0]);
816
- return s.replace(
817
- /#([0-9a-f]{6})/i,
960
+ const c = Z(r);
961
+ if (c && o !== void 0) {
962
+ if (c.includes("var(")) {
963
+ const u = /var\([^)]*\)/.exec(c);
964
+ if (u) {
965
+ const m = u[0], t = o * 100, a = `color-mix(in srgb, ${m} ${t}%, rgba(0 0 0 / 0) ${100 - t}%)`, d = /#([0-9a-f]{6}|[0-9a-f]{3})/i.exec(m), y = /^([a-z-]+):/.exec(c), v = y ? y[1] : null;
966
+ if (d && v) {
967
+ const C = `rgb(${q(d[0])} / ${o})`, f = m.replace(
968
+ /#([0-9a-f]{6}|[0-9a-f]{3})/i,
969
+ C
970
+ );
971
+ return `${v}:${f};__CE_COLOR_MIX_SPLIT__${v}:${a};`;
972
+ }
973
+ return c.replace(m, a);
974
+ }
975
+ }
976
+ const s = /#([0-9a-f]{6}|[0-9a-f]{3})/i.exec(c);
977
+ if (s) {
978
+ const u = q(s[0]);
979
+ return c.replace(
980
+ /#([0-9a-f]{6}|[0-9a-f]{3})/i,
818
981
  `rgb(${u} / ${o})`
819
982
  );
820
983
  }
821
984
  }
822
- return s;
985
+ return c;
823
986
  }
824
987
  function le(e) {
825
988
  const r = /^(from|to|via)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);
826
989
  if (!r) return null;
827
- const [, o, i, s = "DEFAULT"] = r, c = he[i]?.[s];
828
- if (!c) return null;
990
+ const [, o, n, c = "DEFAULT"] = r, s = be[n]?.[c];
991
+ if (!s) return null;
829
992
  switch (o) {
830
993
  case "from":
831
- return `--cer-gradient-from:${c} var(--cer-gradient-from-position);--cer-gradient-to:rgb(255 255 255 / 0) var(--cer-gradient-to-position);--cer-gradient-stops:var(--cer-gradient-from), var(--cer-gradient-to);`;
994
+ return `--cer-gradient-from:${s} var(--cer-gradient-from-position);--cer-gradient-to:rgb(255 255 255 / 0) var(--cer-gradient-to-position);--cer-gradient-stops:var(--cer-gradient-from), var(--cer-gradient-to);`;
832
995
  case "to":
833
- return `--cer-gradient-to:${c} var(--cer-gradient-to-position);`;
996
+ return `--cer-gradient-to:${s} var(--cer-gradient-to-position);`;
834
997
  case "via":
835
- return `--cer-gradient-to:rgb(255 255 255 / 0) var(--cer-gradient-to-position);--cer-gradient-stops:var(--cer-gradient-from), ${c} var(--cer-gradient-via-position), var(--cer-gradient-to);`;
998
+ return `--cer-gradient-to:rgb(255 255 255 / 0) var(--cer-gradient-to-position);--cer-gradient-stops:var(--cer-gradient-from), ${s} var(--cer-gradient-via-position), var(--cer-gradient-to);`;
836
999
  default:
837
1000
  return null;
838
1001
  }
@@ -843,17 +1006,17 @@ function de(e) {
843
1006
  const o = parseInt(r[1], 10);
844
1007
  return o < 0 || o > 100 ? null : `opacity:${o / 100};`;
845
1008
  }
846
- function Q(e) {
1009
+ function Z(e) {
847
1010
  if (e.startsWith("[") && e.endsWith("]") && !e.includes("-[")) {
848
- const u = e.slice(1, -1).trim(), j = u.indexOf(":");
849
- if (j === -1) return null;
850
- const t = u.slice(0, j).trim();
851
- let a = u.slice(j + 1).trim();
1011
+ const u = e.slice(1, -1).trim(), m = u.indexOf(":");
1012
+ if (m === -1) return null;
1013
+ const t = u.slice(0, m).trim();
1014
+ let a = u.slice(m + 1).trim();
852
1015
  return /^[a-zA-Z][a-zA-Z0-9-]*$/.test(t) ? (a = a.replace(/_/g, " "), a = a.replace(/url\('\s*([^']*?)\s*'\)/g, 'url("$1")'), a = a.replace(/^'([^']*)'$/g, '"$1"'), `${t}:${a};`) : null;
853
1016
  }
854
1017
  const r = e.indexOf("-[");
855
1018
  if (r <= 0 || !e.endsWith("]")) return null;
856
- const o = e.slice(0, r), i = e.slice(r + 2, -1).replace(/_/g, " "), s = {
1019
+ const o = e.slice(0, r), n = e.slice(r + 2, -1).replace(/_/g, " "), c = {
857
1020
  bg: "background-color",
858
1021
  shadow: "box-shadow",
859
1022
  p: "padding",
@@ -894,15 +1057,15 @@ function Q(e) {
894
1057
  opacity: "opacity"
895
1058
  };
896
1059
  if (o === "text")
897
- return /^\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex)$/.test(i) ? `font-size:${i};` : `color:${i};`;
898
- if (o === "rotate") return `transform:rotate(${i});`;
899
- if (o === "scale") return `transform:scale(${i});`;
900
- if (o === "translate-x") return `transform:translateX(${i});`;
901
- if (o === "translate-y") return `transform:translateY(${i});`;
902
- const c = s[o] ?? o.replace(/_/g, "-");
903
- return c && i ? `${c}:${i};` : null;
1060
+ return /^\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex)$/.test(n) ? `font-size:${n};` : `color:${n};`;
1061
+ if (o === "rotate") return `transform:rotate(${n});`;
1062
+ if (o === "scale") return `transform:scale(${n});`;
1063
+ if (o === "translate-x") return `transform:translateX(${n});`;
1064
+ if (o === "translate-y") return `transform:translateY(${n});`;
1065
+ const s = c[o] ?? o.replace(/_/g, "-");
1066
+ return s && n ? `${s}:${n};` : null;
904
1067
  }
905
- function Ce(e) {
1068
+ function _e(e) {
906
1069
  if (e.startsWith("[") && e.endsWith("]")) {
907
1070
  const o = e.slice(1, -1);
908
1071
  return o.includes("&") ? o : e;
@@ -917,41 +1080,41 @@ function Ce(e) {
917
1080
  function pe(e) {
918
1081
  return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, "\\$1");
919
1082
  }
920
- function Oe(e) {
1083
+ function ze(e) {
921
1084
  const r = /class\s*=\s*(['"])([\s\S]*?)\1/g, o = [];
922
- let i;
923
- for (; i = r.exec(e); ) {
924
- const s = i[2].split(/\s+/).filter(Boolean);
925
- s.length && o.push(...s);
1085
+ let n;
1086
+ for (; n = r.exec(e); ) {
1087
+ const c = n[2].split(/\s+/).filter(Boolean);
1088
+ c.length && o.push(...c);
926
1089
  }
927
1090
  return o;
928
1091
  }
929
- const K = /* @__PURE__ */ new Map(), Ee = 16, me = 1e3;
930
- function ze(e) {
931
- const r = Date.now(), o = K.get(e);
932
- if (o && r - o.timestamp < Ee)
1092
+ const H = /* @__PURE__ */ new Map(), Re = 16, me = 1e3;
1093
+ function Le(e) {
1094
+ const r = Date.now(), o = H.get(e);
1095
+ if (o && r - o.timestamp < Re)
933
1096
  return o.css;
934
- const i = Oe(e);
935
- if (!i.length) return "";
936
- const s = new Set(i), c = [[], [], [], []], u = {}, j = (f, p = !1) => {
937
- const d = p ? `dark|${f}` : f;
938
- if (d in u) return u[d];
939
- const m = T(f, p);
940
- return u[d] = m, m;
1097
+ const n = ze(e);
1098
+ if (!n.length) return "";
1099
+ const c = new Set(n), s = [[], [], [], []], u = {}, m = (f, p = !1) => {
1100
+ const g = p ? `dark|${f}` : f;
1101
+ if (g in u) return u[g];
1102
+ const b = y(f, p);
1103
+ return u[g] = b, b;
941
1104
  }, t = (f) => {
942
- const p = f.some((w) => ie.includes(w)), d = f.some(
943
- (w) => w.startsWith("@") && (ne.includes(w.slice(1)) || w.match(/^@\[.+\]$/))
944
- ), m = f.includes("dark");
945
- return f.length ? !p && !m && !d ? 1 : m && (p || d) ? 3 : 2 : 0;
1105
+ const p = f.some((k) => ne.includes(k)), g = f.some(
1106
+ (k) => k.startsWith("@") && (ie.includes(k.slice(1)) || k.match(/^@\[.+\]$/))
1107
+ ), b = f.includes("dark");
1108
+ return f.length ? !p && !b && !g ? 1 : b && (p || g) ? 3 : 2 : 0;
946
1109
  }, a = (f) => {
947
1110
  const p = [];
948
- let d = "", m = 0;
949
- for (let w = 0; w < f.length; w++) {
950
- const b = f[w];
951
- b === "[" || b === "(" ? m++ : (b === "]" || b === ")") && m--, b === ":" && m === 0 ? (p.push(d), d = "") : d += b;
1111
+ let g = "", b = 0;
1112
+ for (let k = 0; k < f.length; k++) {
1113
+ const x = f[k];
1114
+ x === "[" || x === "(" ? b++ : (x === "]" || x === ")") && b--, x === ":" && b === 0 ? (p.push(g), g = "") : g += x;
952
1115
  }
953
- return d && p.push(d), p;
954
- }, g = {
1116
+ return g && p.push(g), p;
1117
+ }, d = {
955
1118
  hover: ":hover",
956
1119
  focus: ":focus",
957
1120
  active: ":active",
@@ -964,144 +1127,144 @@ function ze(e) {
964
1127
  even: ":nth-child(even)",
965
1128
  "focus-within": ":focus-within",
966
1129
  "focus-visible": ":focus-visible"
967
- }, T = (f, p = !1) => {
968
- const d = a(f);
969
- let m = "", w = !1;
970
- for (const n of d) {
971
- let v = n;
972
- if (v.startsWith("!") && (w = !0, v = v.slice(1)), re[v] || ae(v) || se(v) || de(v) || ce(v) || le(v) || Q(v)) {
973
- m = n;
1130
+ }, y = (f, p = !1) => {
1131
+ const g = a(f);
1132
+ let b = "", k = !1;
1133
+ for (const i of g) {
1134
+ let $ = i;
1135
+ if ($.startsWith("!") && (k = !0, $ = $.slice(1)), re[$] || ae($) || ce($) || de($) || se($) || le($) || Z($)) {
1136
+ b = i;
974
1137
  break;
975
1138
  }
976
1139
  }
977
- if (!m) return null;
978
- const b = m.replace(/^!/, ""), C = re[b] ?? ae(b) ?? se(b) ?? de(b) ?? ce(b) ?? le(b) ?? Q(b);
979
- if (!C) return null;
980
- const k = d.indexOf(m);
981
- let h = k >= 0 ? d.slice(0, k) : [];
982
- p && (h = h.filter((n) => n !== "dark"));
983
- const P = `.${pe(f)}`, W = w ? C.replace(/;/g, " !important;") : C, x = "__SUBJECT__";
984
- let l = x;
985
- const _ = [];
986
- for (const n of h)
987
- n.startsWith("group-") ? (l = `.group:${n.slice(6)} ${l}`, _.push(n)) : n.startsWith("peer-") && (l = l.replace(
988
- x,
989
- `.peer:${n.slice(5)}~${x}`
990
- ), _.push(n));
991
- h = h.filter((n) => !_.includes(n));
992
- const D = [], V = [];
993
- let y = null;
994
- for (const n of h) {
995
- if (n === "dark" || ie.includes(n) || n.startsWith("@") && (ne.includes(n.slice(1)) || n.match(/^@\[.+\]$/)))
1140
+ if (!b) return null;
1141
+ const x = b.replace(/^!/, ""), O = re[x] ?? ae(x) ?? ce(x) ?? de(x) ?? se(x) ?? le(x) ?? Z(x);
1142
+ if (!O) return null;
1143
+ const T = g.indexOf(b);
1144
+ let h = T >= 0 ? g.slice(0, T) : [];
1145
+ p && (h = h.filter((i) => i !== "dark"));
1146
+ const R = `.${pe(f)}`, _ = k ? O.replace(/;/g, " !important;") : O, w = "__SUBJECT__";
1147
+ let l = w;
1148
+ const P = [];
1149
+ for (const i of h)
1150
+ i.startsWith("group-") ? (l = `.group:${i.slice(6)} ${l}`, P.push(i)) : i.startsWith("peer-") && (l = l.replace(
1151
+ w,
1152
+ `.peer:${i.slice(5)}~${w}`
1153
+ ), P.push(i));
1154
+ h = h.filter((i) => !P.includes(i));
1155
+ const W = [], U = [];
1156
+ let S = null;
1157
+ for (const i of h) {
1158
+ if (i === "dark" || ne.includes(i) || i.startsWith("@") && (ie.includes(i.slice(1)) || i.match(/^@\[.+\]$/)))
996
1159
  continue;
997
- const v = Ce(n);
998
- if (v) {
999
- y = v;
1160
+ const $ = _e(i);
1161
+ if ($) {
1162
+ S = $;
1000
1163
  continue;
1001
1164
  }
1002
- const F = g[n];
1165
+ const F = d[i];
1003
1166
  if (F) {
1004
- y ? V.push(F) : D.push(F);
1167
+ S ? U.push(F) : W.push(F);
1005
1168
  continue;
1006
1169
  }
1007
- const O = je[n];
1008
- typeof O == "function" && (l = O(l, W).split("{")[0]);
1170
+ const E = Ae[i];
1171
+ typeof E == "function" && (l = E(l, _).split("{")[0]);
1009
1172
  }
1010
- const I = D.join(""), R = V.join("");
1011
- function X(n, v) {
1012
- if (!v) return n;
1013
- let F = 0, O = 0;
1014
- if (n.length && (n[0] === ">" || n[0] === "+" || n[0] === "~" || n[0] === " ")) {
1015
- let $ = 1;
1016
- for (; $ < n.length && n[$] === " "; ) $++;
1017
- for (; $ < n.length; $++) {
1018
- const E = n[$];
1019
- if (E === "[" ? F++ : E === "]" && F > 0 ? F-- : E === "(" ? O++ : E === ")" && O > 0 && O--, F === 0 && O === 0 && (n[$] === ">" || n[$] === "+" || n[$] === "~" || n[$] === " "))
1020
- return n.slice(0, $) + v + n.slice($);
1173
+ const D = W.join(""), L = U.join("");
1174
+ function Q(i, $) {
1175
+ if (!$) return i;
1176
+ let F = 0, E = 0;
1177
+ if (i.length && (i[0] === ">" || i[0] === "+" || i[0] === "~" || i[0] === " ")) {
1178
+ let j = 1;
1179
+ for (; j < i.length && i[j] === " "; ) j++;
1180
+ for (; j < i.length; j++) {
1181
+ const z = i[j];
1182
+ if (z === "[" ? F++ : z === "]" && F > 0 ? F-- : z === "(" ? E++ : z === ")" && E > 0 && E--, F === 0 && E === 0 && (i[j] === ">" || i[j] === "+" || i[j] === "~" || i[j] === " "))
1183
+ return i.slice(0, j) + $ + i.slice(j);
1021
1184
  }
1022
- return n + v;
1185
+ return i + $;
1023
1186
  }
1024
- for (let $ = 0; $ < n.length; $++) {
1025
- const E = n[$];
1026
- if (E === "[" ? F++ : E === "]" && F > 0 ? F-- : E === "(" ? O++ : E === ")" && O > 0 && O--, F === 0 && O === 0 && (E === ">" || E === "+" || E === "~" || E === " "))
1027
- return n.slice(0, $) + v + n.slice($);
1187
+ for (let j = 0; j < i.length; j++) {
1188
+ const z = i[j];
1189
+ if (z === "[" ? F++ : z === "]" && F > 0 ? F-- : z === "(" ? E++ : z === ")" && E > 0 && E--, F === 0 && E === 0 && (z === ">" || z === "+" || z === "~" || z === " "))
1190
+ return i.slice(0, j) + $ + i.slice(j);
1028
1191
  }
1029
- return n + v;
1192
+ return i + $;
1030
1193
  }
1031
- if (y)
1032
- if (y.includes("&")) {
1033
- const n = y.indexOf("&"), v = y.slice(0, n), F = y.slice(n + 1), O = x + I;
1034
- if (D.length === 0)
1194
+ if (S)
1195
+ if (S.includes("&")) {
1196
+ const i = S.indexOf("&"), $ = S.slice(0, i), F = S.slice(i + 1), E = w + D;
1197
+ if (W.length === 0)
1035
1198
  l = l.replace(
1036
- x,
1037
- v + O + R + F
1199
+ w,
1200
+ $ + E + L + F
1038
1201
  );
1039
1202
  else {
1040
- const $ = X(F, R);
1203
+ const j = Q(F, L);
1041
1204
  l = l.replace(
1042
- x,
1043
- v + O + $
1205
+ w,
1206
+ $ + E + j
1044
1207
  );
1045
1208
  }
1046
1209
  } else
1047
1210
  l = l.replace(
1048
- x,
1049
- `${y}${x + I}`
1050
- ), R && (l = l.replace(x, `${x}${R}`));
1211
+ w,
1212
+ `${S}${w + D}`
1213
+ ), L && (l = l.replace(w, `${w}${L}`));
1051
1214
  else
1052
1215
  l = l.replace(
1053
- x,
1054
- x + I + R
1216
+ w,
1217
+ w + D + L
1055
1218
  );
1056
- l = l.replace(new RegExp(x, "g"), P);
1057
- let U = `${l}{${W}}`;
1058
- const Y = h.filter(
1059
- (n) => ie.includes(n)
1219
+ l = l.replace(new RegExp(w, "g"), R);
1220
+ const fe = "__CE_COLOR_MIX_SPLIT__", he = _.includes(fe) ? _.split(fe).map((i) => `${l}{${i}}`) : [`${l}{${_}}`], Y = h.filter(
1221
+ (i) => ne.includes(i)
1060
1222
  ), ee = h.filter(
1061
- (n) => n.startsWith("@") && (ne.includes(n.slice(1)) || n.match(/^@\[.+\]$/))
1062
- ), G = Y.length ? Y[Y.length - 1] : null, H = ee.length ? ee[ee.length - 1] : null, fe = h.includes("dark");
1063
- let M = "", N = "";
1064
- if (fe && G ? M = `@media (prefers-color-scheme: dark) and ${oe[G]}` : fe ? M = "@media (prefers-color-scheme: dark)" : G && (M = `@media ${oe[G]}`), H)
1065
- if (H.startsWith("@[") && H.endsWith("]")) {
1066
- const n = H.slice(2, -1);
1067
- if (!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(n))
1223
+ (i) => i.startsWith("@") && (ie.includes(i.slice(1)) || i.match(/^@\[.+\]$/))
1224
+ ), G = Y.length ? Y[Y.length - 1] : null, V = ee.length ? ee[ee.length - 1] : null, ue = h.includes("dark");
1225
+ let N = "", B = "";
1226
+ if (ue && G ? N = `@media (prefers-color-scheme: dark) and ${oe[G]}` : ue ? N = "@media (prefers-color-scheme: dark)" : G && (N = `@media ${oe[G]}`), V)
1227
+ if (V.startsWith("@[") && V.endsWith("]")) {
1228
+ const i = V.slice(2, -1);
1229
+ if (!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(i))
1068
1230
  return null;
1069
- N = `@container (min-width:${n})`;
1231
+ B = `@container (min-width:${i})`;
1070
1232
  } else {
1071
- const n = H.slice(1);
1072
- N = `@container ${ge[n] || `(min-width:${n})`}`;
1233
+ const i = V.slice(1);
1234
+ B = `@container ${ge[i] || `(min-width:${i})`}`;
1073
1235
  }
1074
- return M && N ? U = `${M}${N}{${U}}` : M ? U = `${M}{${U}}` : N && (U = `${N}{${U}}`), U;
1236
+ const xe = (i) => N && B ? `${N}${B}{${i}}` : N ? `${N}{${i}}` : B ? `${B}{${i}}` : i;
1237
+ return he.map(xe).join("");
1075
1238
  };
1076
- for (const f of s) {
1077
- const p = a(f), d = p.find(
1078
- (k) => re[k.replace(/^!/, "")] || ae(k.replace(/^!/, "")) || se(k.replace(/^!/, "")) || de(k.replace(/^!/, "")) || ce(k.replace(/^!/, "")) || le(k.replace(/^!/, "")) || Q(k.replace(/^!/, ""))
1239
+ for (const f of c) {
1240
+ const p = a(f), g = p.find(
1241
+ (T) => re[T.replace(/^!/, "")] || ae(T.replace(/^!/, "")) || ce(T.replace(/^!/, "")) || de(T.replace(/^!/, "")) || se(T.replace(/^!/, "")) || le(T.replace(/^!/, "")) || Z(T.replace(/^!/, ""))
1079
1242
  );
1080
- if (!d) continue;
1081
- const m = p.indexOf(d), w = m >= 0 ? p.slice(0, m) : [], b = t(w), C = j(f);
1082
- C && c[b].push(C);
1243
+ if (!g) continue;
1244
+ const b = p.indexOf(g), k = b >= 0 ? p.slice(0, b) : [], x = t(k), O = m(f);
1245
+ O && s[x].push(O);
1083
1246
  }
1084
- const A = /^(from|via|to)-[a-z]+-?\d{2,3}?$/;
1085
- for (const f of s)
1086
- if (A.test(f)) {
1087
- if (c.flat().join("").includes(`.${pe(f)}`)) continue;
1088
- const d = j(f);
1089
- d && c[0].push(d);
1247
+ const v = /^(from|via|to)-[a-z]+-?\d{2,3}?$/;
1248
+ for (const f of c)
1249
+ if (v.test(f)) {
1250
+ if (s.flat().join("").includes(`.${pe(f)}`)) continue;
1251
+ const g = m(f);
1252
+ g && s[0].push(g);
1090
1253
  }
1091
- const S = (f) => f.sort((p, d) => {
1092
- const m = (P) => {
1093
- const W = {
1254
+ const A = (f) => f.sort((p, g) => {
1255
+ const b = (R) => {
1256
+ const _ = {
1094
1257
  sm: 640,
1095
1258
  md: 768,
1096
1259
  lg: 1024,
1097
1260
  xl: 1280,
1098
1261
  "2xl": 1536
1099
1262
  };
1100
- for (const [x, l] of Object.entries(W))
1101
- if (P.includes(`@media ${oe[x]}`)) return l;
1263
+ for (const [w, l] of Object.entries(_))
1264
+ if (R.includes(`@media ${oe[w]}`)) return l;
1102
1265
  return -1;
1103
- }, w = (P) => {
1104
- const W = {
1266
+ }, k = (R) => {
1267
+ const _ = {
1105
1268
  xs: 320,
1106
1269
  // 20rem
1107
1270
  sm: 384,
@@ -1125,27 +1288,27 @@ function ze(e) {
1125
1288
  "7xl": 1280
1126
1289
  // 80rem
1127
1290
  };
1128
- for (const [x, l] of Object.entries(W))
1129
- if (P.includes(`@container ${ge[x]}`)) return l;
1130
- if (P.includes("@container (min-width:")) {
1131
- const x = /@container \(min-width:(\d+(?:\.\d+)?)(px|rem|em)/.exec(P);
1132
- if (x) {
1133
- const l = parseFloat(x[1]), _ = x[2];
1134
- return _ === "rem" || _ === "em" ? l * 16 : l;
1291
+ for (const [w, l] of Object.entries(_))
1292
+ if (R.includes(`@container ${ge[w]}`)) return l;
1293
+ if (R.includes("@container (min-width:")) {
1294
+ const w = /@container \(min-width:(\d+(?:\.\d+)?)(px|rem|em)/.exec(R);
1295
+ if (w) {
1296
+ const l = parseFloat(w[1]), P = w[2];
1297
+ return P === "rem" || P === "em" ? l * 16 : l;
1135
1298
  }
1136
1299
  }
1137
1300
  return -1;
1138
- }, b = m(p), C = m(d), k = w(p), h = w(d);
1139
- return b >= 0 && C >= 0 && b !== C ? b - C : k >= 0 && h >= 0 && k !== h ? k - h : 0;
1301
+ }, x = b(p), O = b(g), T = k(p), h = k(g);
1302
+ return x >= 0 && O >= 0 && x !== O ? x - O : T >= 0 && h >= 0 && T !== h ? T - h : 0;
1140
1303
  });
1141
- c[2] = S(c[2]), c[3] = S(c[3]);
1142
- const z = c.flat().join("");
1143
- return K.size >= me && Array.from(K.keys()).slice(
1304
+ s[2] = A(s[2]), s[3] = A(s[3]);
1305
+ const C = s.flat().join("");
1306
+ return H.size >= me && Array.from(H.keys()).slice(
1144
1307
  0,
1145
1308
  Math.floor(me / 2)
1146
- ).forEach((p) => K.delete(p)), K.set(e, { css: z, timestamp: r }), z;
1309
+ ).forEach((p) => H.delete(p)), H.set(e, { css: C, timestamp: r }), C;
1147
1310
  }
1148
- const q = {
1311
+ const K = {
1149
1312
  /** Simple fade in/out */
1150
1313
  fade: {
1151
1314
  enterFrom: "opacity-0",
@@ -1237,181 +1400,181 @@ const q = {
1237
1400
  leaveTo: "rotate-[90deg] opacity-0"
1238
1401
  }
1239
1402
  };
1240
- function De(e, r) {
1403
+ function Ne(e, r) {
1241
1404
  const {
1242
1405
  preset: o,
1243
- show: i,
1244
- mode: s = "default",
1245
- duration: c,
1406
+ show: n,
1407
+ mode: c = "default",
1408
+ duration: s,
1246
1409
  appear: u = !1,
1247
- css: j = !0,
1410
+ css: m = !0,
1248
1411
  name: t,
1249
1412
  enterFrom: a,
1250
- enterActive: g,
1251
- enterTo: T,
1252
- leaveFrom: A,
1253
- leaveActive: S,
1254
- leaveTo: z,
1413
+ enterActive: d,
1414
+ enterTo: y,
1415
+ leaveFrom: v,
1416
+ leaveActive: A,
1417
+ leaveTo: C,
1255
1418
  onBeforeEnter: f,
1256
1419
  onEnter: p,
1257
- onAfterEnter: d,
1258
- onEnterCancelled: m,
1259
- onBeforeLeave: w,
1260
- onLeave: b,
1261
- onAfterLeave: C,
1262
- onLeaveCancelled: k
1420
+ onAfterEnter: g,
1421
+ onEnterCancelled: b,
1422
+ onBeforeLeave: k,
1423
+ onLeave: x,
1424
+ onAfterLeave: O,
1425
+ onLeaveCancelled: T
1263
1426
  } = e;
1264
1427
  let h;
1265
- o && q[o] ? (h = { ...q[o] }, a && (h.enterFrom = a), g && (h.enterActive = g), T && (h.enterTo = T), A && (h.leaveFrom = A), S && (h.leaveActive = S), z && (h.leaveTo = z)) : h = {
1428
+ o && K[o] ? (h = { ...K[o] }, a && (h.enterFrom = a), d && (h.enterActive = d), y && (h.enterTo = y), v && (h.leaveFrom = v), A && (h.leaveActive = A), C && (h.leaveTo = C)) : h = {
1266
1429
  enterFrom: a,
1267
- enterActive: g,
1268
- enterTo: T,
1269
- leaveFrom: A,
1270
- leaveActive: S,
1271
- leaveTo: z
1430
+ enterActive: d,
1431
+ enterTo: y,
1432
+ leaveFrom: v,
1433
+ leaveActive: A,
1434
+ leaveTo: C
1272
1435
  };
1273
- const P = t || (o ? `transition-${o}` : "transition"), W = be(i ? r : [], P);
1274
- return W._transition = {
1275
- name: P,
1436
+ const R = t || (o ? `transition-${o}` : "transition"), _ = ve(n ? r : [], R);
1437
+ return _._transition = {
1438
+ name: R,
1276
1439
  classes: h,
1277
- mode: s,
1278
- duration: c,
1440
+ mode: c,
1441
+ duration: s,
1279
1442
  appear: u,
1280
- css: j,
1281
- state: i ? "visible" : "hidden",
1443
+ css: m,
1444
+ state: n ? "visible" : "hidden",
1282
1445
  hooks: {
1283
1446
  onBeforeEnter: f,
1284
1447
  onEnter: p,
1285
- onAfterEnter: d,
1286
- onEnterCancelled: m,
1287
- onBeforeLeave: w,
1288
- onLeave: b,
1289
- onAfterLeave: C,
1290
- onLeaveCancelled: k
1448
+ onAfterEnter: g,
1449
+ onEnterCancelled: b,
1450
+ onBeforeLeave: k,
1451
+ onLeave: x,
1452
+ onAfterLeave: O,
1453
+ onLeaveCancelled: T
1291
1454
  }
1292
- }, W;
1455
+ }, _;
1293
1456
  }
1294
1457
  function Be(e, r) {
1295
1458
  const {
1296
1459
  tag: o = "div",
1297
- moveClass: i = "transition-transform duration-300",
1298
- preset: s,
1299
- show: c = !0,
1460
+ moveClass: n = "transition-transform duration-300",
1461
+ preset: c,
1462
+ show: s = !0,
1300
1463
  mode: u = "default",
1301
- duration: j,
1464
+ duration: m,
1302
1465
  appear: t = !1,
1303
1466
  css: a = !0,
1304
- name: g,
1305
- class: T,
1306
- style: A,
1307
- enterFrom: S,
1308
- enterActive: z,
1467
+ name: d,
1468
+ class: y,
1469
+ style: v,
1470
+ enterFrom: A,
1471
+ enterActive: C,
1309
1472
  enterTo: f,
1310
1473
  leaveFrom: p,
1311
- leaveActive: d,
1312
- leaveTo: m,
1313
- onBeforeEnter: w,
1314
- onEnter: b,
1315
- onAfterEnter: C,
1316
- onEnterCancelled: k,
1474
+ leaveActive: g,
1475
+ leaveTo: b,
1476
+ onBeforeEnter: k,
1477
+ onEnter: x,
1478
+ onAfterEnter: O,
1479
+ onEnterCancelled: T,
1317
1480
  onBeforeLeave: h,
1318
- onLeave: P,
1319
- onAfterLeave: W,
1320
- onLeaveCancelled: x
1481
+ onLeave: R,
1482
+ onAfterLeave: _,
1483
+ onLeaveCancelled: w
1321
1484
  } = e;
1322
1485
  let l;
1323
- s && q[s] ? (l = { ...q[s] }, S && (l.enterFrom = S), z && (l.enterActive = z), f && (l.enterTo = f), p && (l.leaveFrom = p), d && (l.leaveActive = d), m && (l.leaveTo = m)) : l = {
1324
- enterFrom: S,
1325
- enterActive: z,
1486
+ c && K[c] ? (l = { ...K[c] }, A && (l.enterFrom = A), C && (l.enterActive = C), f && (l.enterTo = f), p && (l.leaveFrom = p), g && (l.leaveActive = g), b && (l.leaveTo = b)) : l = {
1487
+ enterFrom: A,
1488
+ enterActive: C,
1326
1489
  enterTo: f,
1327
1490
  leaveFrom: p,
1328
- leaveActive: d,
1329
- leaveTo: m
1491
+ leaveActive: g,
1492
+ leaveTo: b
1330
1493
  };
1331
- const _ = g || (s ? `transition-group-${s}` : "transition-group"), D = [];
1332
- for (const y of c ? r : [])
1333
- if (y && typeof y == "object" && y.tag === "#anchor") {
1334
- const I = Array.isArray(y.children) ? y.children : [];
1335
- for (const R of I)
1336
- if (R && typeof R == "object") {
1337
- const X = {
1338
- ...R,
1339
- key: y.key || R.key,
1494
+ const P = d || (c ? `transition-group-${c}` : "transition-group"), W = [];
1495
+ for (const S of s ? r : [])
1496
+ if (S && typeof S == "object" && S.tag === "#anchor") {
1497
+ const D = Array.isArray(S.children) ? S.children : [];
1498
+ for (const L of D)
1499
+ if (L && typeof L == "object") {
1500
+ const Q = {
1501
+ ...L,
1502
+ key: S.key || L.key,
1340
1503
  props: {
1341
- ...R.props,
1342
- _anchorKey: y.key
1504
+ ...L.props,
1505
+ _anchorKey: S.key
1343
1506
  // Preserve original anchor key
1344
1507
  }
1345
1508
  };
1346
- D.push(X);
1509
+ W.push(Q);
1347
1510
  } else
1348
- D.push(R);
1511
+ W.push(L);
1349
1512
  } else
1350
- D.push(y);
1351
- const V = (() => {
1352
- if (A)
1353
- return typeof A == "string" ? A : Object.entries(A).map(([y, I]) => `${y}: ${I}`).join("; ");
1513
+ W.push(S);
1514
+ const U = (() => {
1515
+ if (v)
1516
+ return typeof v == "string" ? v : Object.entries(v).map(([S, D]) => `${S}: ${D}`).join("; ");
1354
1517
  })();
1355
1518
  return {
1356
1519
  tag: o,
1357
- children: D,
1358
- key: _,
1520
+ children: W,
1521
+ key: P,
1359
1522
  props: {
1360
1523
  attrs: {
1361
- ...T ? { class: T } : {},
1362
- ...V ? { style: V } : {}
1524
+ ...y ? { class: y } : {},
1525
+ ...U ? { style: U } : {}
1363
1526
  },
1364
1527
  _transitionGroup: {
1365
- name: _,
1528
+ name: P,
1366
1529
  classes: l,
1367
- moveClass: i,
1530
+ moveClass: n,
1368
1531
  mode: u,
1369
- duration: j,
1532
+ duration: m,
1370
1533
  appear: t,
1371
1534
  css: a,
1372
1535
  hooks: {
1373
- onBeforeEnter: w,
1374
- onEnter: b,
1375
- onAfterEnter: C,
1376
- onEnterCancelled: k,
1536
+ onBeforeEnter: k,
1537
+ onEnter: x,
1538
+ onAfterEnter: O,
1539
+ onEnterCancelled: T,
1377
1540
  onBeforeLeave: h,
1378
- onLeave: P,
1379
- onAfterLeave: W,
1380
- onLeaveCancelled: x
1541
+ onLeave: R,
1542
+ onAfterLeave: _,
1543
+ onLeaveCancelled: w
1381
1544
  }
1382
1545
  }
1383
1546
  }
1384
1547
  };
1385
1548
  }
1386
- function Ie(e) {
1549
+ function Ue(e) {
1387
1550
  return { ...e };
1388
1551
  }
1389
- let Z = null;
1390
- function Pe() {
1391
- if (!Z) {
1552
+ let J = null;
1553
+ function Me() {
1554
+ if (!J) {
1392
1555
  const e = [];
1393
- Object.values(q).forEach((i) => {
1394
- i.enterFrom && e.push(i.enterFrom), i.enterActive && e.push(i.enterActive), i.enterTo && e.push(i.enterTo), i.leaveFrom && e.push(i.leaveFrom), i.leaveActive && e.push(i.leaveActive), i.leaveTo && e.push(i.leaveTo);
1556
+ Object.values(K).forEach((n) => {
1557
+ n.enterFrom && e.push(n.enterFrom), n.enterActive && e.push(n.enterActive), n.enterTo && e.push(n.enterTo), n.leaveFrom && e.push(n.leaveFrom), n.leaveActive && e.push(n.leaveActive), n.leaveTo && e.push(n.leaveTo);
1395
1558
  });
1396
- const r = `<div class="${e.join(" ")}"></div>`, o = ze(r);
1397
- Z = new CSSStyleSheet(), Z.replaceSync(o);
1559
+ const r = `<div class="${e.join(" ")}"></div>`, o = Le(r);
1560
+ J = new CSSStyleSheet(), J.replaceSync(o);
1398
1561
  }
1399
- return Z;
1562
+ return J;
1400
1563
  }
1401
- function Re() {
1402
- Pe();
1564
+ function Pe() {
1565
+ Me();
1403
1566
  }
1404
- Re();
1567
+ Pe();
1405
1568
  export {
1406
- De as T,
1407
- Pe as a,
1569
+ Ne as T,
1570
+ Me as a,
1408
1571
  Be as b,
1409
- xe as c,
1410
- Ie as d,
1411
- We as g,
1412
- ze as j,
1413
- ve as m,
1414
- _e as s,
1415
- q as t
1572
+ $e as c,
1573
+ Ue as d,
1574
+ Ie as g,
1575
+ Le as j,
1576
+ ye as m,
1577
+ De as s,
1578
+ K as t
1416
1579
  };
1417
- //# sourceMappingURL=transitions-PEmFOapF.js.map
1580
+ //# sourceMappingURL=transitions-Cctsmip5.js.map