turbo-themes 0.12.33 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 49d1eef10e48aca82f61c97cc96c04c2b31bc0197d3ec31ff73a0f7133682e6b
4
- data.tar.gz: 60434a1c6fd9bdf15be82b3e61ffd0f6a990821f474e8fe9b0b1586b7a08b830
3
+ metadata.gz: ef6a0e634abfe048c02a8f84e01a91fab470e7bc00ebd88a3bc3cd9677398c25
4
+ data.tar.gz: eb1d26f522c410595830de8decb8cbd550b73fbf575692454a8aa7f99638b234
5
5
  SHA512:
6
- metadata.gz: c22beedf4b8f0b50169ebf26142517a7592f3e30f5afbbfae4c3362d9725a815949a37acbe90b312460db78236a41001c2db296c661cf7cf4289f103dd61ba78
7
- data.tar.gz: 13a69af768db883a26dbdc63baed96cd0e35c2b23bc58dbf220c771a004401b6f22ecd83775a2e9a87f14c39f80d8003fe546ef39c93bb6a94d24a475cffe41a
6
+ metadata.gz: 41e6ef06e963ea9124de54c8db7102ab0ad8fa24b73bce66a8bf1c3cad07f2114a73d6166a276fb6ed9f67cf5ff2619bcbadbf85699ebdce3d93a58447226f2c
7
+ data.tar.gz: dc8f6353d37af9a6ca6d164f4e344101ef100dedeaa8fe7e6c1261cee8b33eefe0bbe1e76d9ccd91158ecc44e4bb285b3061e3df21264a81006976354ca13556
data/CHANGELOG.md CHANGED
@@ -10,6 +10,16 @@ The format is based on Keep a Changelog and this project adheres to SemVer.
10
10
 
11
11
  - TBD
12
12
 
13
+ ## [0.13.0] - 2026-02-05
14
+
15
+ ### ✨ Added
16
+
17
+ - add Rosé Pine theme pack with auto-sync (#328)
18
+
19
+ ### 🔧 Changed
20
+
21
+ - switch from Blacksmith to GitHub runners (#317)
22
+
13
23
  ## [0.12.33] - 2026-02-02
14
24
 
15
25
  ### 🐛 Fixed
@@ -0,0 +1,58 @@
1
+ /* Generated from rose-pine-dawn.css */
2
+
3
+ [data-theme="rose-pine-dawn"] {
4
+ --turbo-spacing-xs: 0.25rem; /* dimension */
5
+ --turbo-spacing-sm: 0.5rem; /* dimension */
6
+ --turbo-spacing-md: 1rem; /* dimension */
7
+ --turbo-spacing-lg: 1.5rem; /* dimension */
8
+ --turbo-spacing-xl: 2rem; /* dimension */
9
+ --turbo-elevation-none: none; /* shadow */
10
+ --turbo-elevation-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* shadow */
11
+ --turbo-elevation-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* shadow */
12
+ --turbo-elevation-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow */
13
+ --turbo-elevation-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); /* shadow */
14
+ --turbo-animation-duration-fast: 150ms; /* duration */
15
+ --turbo-animation-duration-normal: 300ms; /* duration */
16
+ --turbo-animation-duration-slow: 500ms; /* duration */
17
+ --turbo-animation-easing-default: cubic-bezier(0.4, 0, 0.2, 1); /* cubicBezier */
18
+ --turbo-animation-easing-emphasized: cubic-bezier(0.05, 0.7, 0.1, 1); /* cubicBezier */
19
+ --turbo-opacity-disabled: 0.5; /* number */
20
+ --turbo-opacity-hover: 0.8; /* number */
21
+ --turbo-opacity-pressed: 0.6; /* number */
22
+ --turbo-bg-base: #faf4ed; /* color */
23
+ --turbo-bg-surface: #fffaf3; /* color */
24
+ --turbo-bg-overlay: #f2e9e1; /* color */
25
+ --turbo-text-primary: #575279; /* color */
26
+ --turbo-text-secondary: #797593; /* color */
27
+ --turbo-text-inverse: #faf4ed; /* color */
28
+ --turbo-brand-primary: #907aa9; /* color */
29
+ --turbo-state-info: #56949f; /* color */
30
+ --turbo-state-success: #286983; /* color */
31
+ --turbo-state-warning: #ea9d34; /* color */
32
+ --turbo-state-danger: #b4637a; /* color */
33
+ --turbo-border-default: #dfdad9; /* color */
34
+ --turbo-accent-link: #907aa9; /* color */
35
+ --turbo-font-sans: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji"; /* fontFamily */
36
+ --turbo-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* fontFamily */
37
+ --turbo-heading-h1: #286983; /* color */
38
+ --turbo-heading-h2: #907aa9; /* color */
39
+ --turbo-heading-h3: #56949f; /* color */
40
+ --turbo-heading-h4: #ea9d34; /* color */
41
+ --turbo-heading-h5: #d7827e; /* color */
42
+ --turbo-heading-h6: #b4637a; /* color */
43
+ --turbo-body-primary: #575279; /* color */
44
+ --turbo-body-secondary: #797593; /* color */
45
+ --turbo-link-default: #907aa9; /* color */
46
+ --turbo-selection-fg: #575279; /* color */
47
+ --turbo-selection-bg: #cecacd; /* color */
48
+ --turbo-blockquote-border: #cecacd; /* color */
49
+ --turbo-blockquote-fg: #575279; /* color */
50
+ --turbo-blockquote-bg: #fffaf3; /* color */
51
+ --turbo-code-inline-fg: #575279; /* color */
52
+ --turbo-code-inline-bg: #f2e9e1; /* color */
53
+ --turbo-code-block-fg: #575279; /* color */
54
+ --turbo-code-block-bg: #f2e9e1; /* color */
55
+ --turbo-table-border: #cecacd; /* color */
56
+ --turbo-table-stripe: #f2e9e1; /* color */
57
+ --turbo-table-thead-bg: #dfdad9; /* color */
58
+ }
@@ -0,0 +1,58 @@
1
+ /* Generated from rose-pine-moon.css */
2
+
3
+ [data-theme="rose-pine-moon"] {
4
+ --turbo-spacing-xs: 0.25rem; /* dimension */
5
+ --turbo-spacing-sm: 0.5rem; /* dimension */
6
+ --turbo-spacing-md: 1rem; /* dimension */
7
+ --turbo-spacing-lg: 1.5rem; /* dimension */
8
+ --turbo-spacing-xl: 2rem; /* dimension */
9
+ --turbo-elevation-none: none; /* shadow */
10
+ --turbo-elevation-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* shadow */
11
+ --turbo-elevation-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* shadow */
12
+ --turbo-elevation-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow */
13
+ --turbo-elevation-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); /* shadow */
14
+ --turbo-animation-duration-fast: 150ms; /* duration */
15
+ --turbo-animation-duration-normal: 300ms; /* duration */
16
+ --turbo-animation-duration-slow: 500ms; /* duration */
17
+ --turbo-animation-easing-default: cubic-bezier(0.4, 0, 0.2, 1); /* cubicBezier */
18
+ --turbo-animation-easing-emphasized: cubic-bezier(0.05, 0.7, 0.1, 1); /* cubicBezier */
19
+ --turbo-opacity-disabled: 0.5; /* number */
20
+ --turbo-opacity-hover: 0.8; /* number */
21
+ --turbo-opacity-pressed: 0.6; /* number */
22
+ --turbo-bg-base: #232136; /* color */
23
+ --turbo-bg-surface: #2a273f; /* color */
24
+ --turbo-bg-overlay: #393552; /* color */
25
+ --turbo-text-primary: #e0def4; /* color */
26
+ --turbo-text-secondary: #908caa; /* color */
27
+ --turbo-text-inverse: #232136; /* color */
28
+ --turbo-brand-primary: #c4a7e7; /* color */
29
+ --turbo-state-info: #9ccfd8; /* color */
30
+ --turbo-state-success: #3e8fb0; /* color */
31
+ --turbo-state-warning: #f6c177; /* color */
32
+ --turbo-state-danger: #eb6f92; /* color */
33
+ --turbo-border-default: #44415a; /* color */
34
+ --turbo-accent-link: #c4a7e7; /* color */
35
+ --turbo-font-sans: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji"; /* fontFamily */
36
+ --turbo-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* fontFamily */
37
+ --turbo-heading-h1: #3e8fb0; /* color */
38
+ --turbo-heading-h2: #c4a7e7; /* color */
39
+ --turbo-heading-h3: #9ccfd8; /* color */
40
+ --turbo-heading-h4: #f6c177; /* color */
41
+ --turbo-heading-h5: #ea9a97; /* color */
42
+ --turbo-heading-h6: #eb6f92; /* color */
43
+ --turbo-body-primary: #e0def4; /* color */
44
+ --turbo-body-secondary: #908caa; /* color */
45
+ --turbo-link-default: #c4a7e7; /* color */
46
+ --turbo-selection-fg: #e0def4; /* color */
47
+ --turbo-selection-bg: #56526e; /* color */
48
+ --turbo-blockquote-border: #56526e; /* color */
49
+ --turbo-blockquote-fg: #e0def4; /* color */
50
+ --turbo-blockquote-bg: #2a273f; /* color */
51
+ --turbo-code-inline-fg: #e0def4; /* color */
52
+ --turbo-code-inline-bg: #393552; /* color */
53
+ --turbo-code-block-fg: #e0def4; /* color */
54
+ --turbo-code-block-bg: #393552; /* color */
55
+ --turbo-table-border: #56526e; /* color */
56
+ --turbo-table-stripe: #393552; /* color */
57
+ --turbo-table-thead-bg: #44415a; /* color */
58
+ }
@@ -0,0 +1,58 @@
1
+ /* Generated from rose-pine.css */
2
+
3
+ [data-theme="rose-pine"] {
4
+ --turbo-spacing-xs: 0.25rem; /* dimension */
5
+ --turbo-spacing-sm: 0.5rem; /* dimension */
6
+ --turbo-spacing-md: 1rem; /* dimension */
7
+ --turbo-spacing-lg: 1.5rem; /* dimension */
8
+ --turbo-spacing-xl: 2rem; /* dimension */
9
+ --turbo-elevation-none: none; /* shadow */
10
+ --turbo-elevation-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* shadow */
11
+ --turbo-elevation-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* shadow */
12
+ --turbo-elevation-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow */
13
+ --turbo-elevation-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); /* shadow */
14
+ --turbo-animation-duration-fast: 150ms; /* duration */
15
+ --turbo-animation-duration-normal: 300ms; /* duration */
16
+ --turbo-animation-duration-slow: 500ms; /* duration */
17
+ --turbo-animation-easing-default: cubic-bezier(0.4, 0, 0.2, 1); /* cubicBezier */
18
+ --turbo-animation-easing-emphasized: cubic-bezier(0.05, 0.7, 0.1, 1); /* cubicBezier */
19
+ --turbo-opacity-disabled: 0.5; /* number */
20
+ --turbo-opacity-hover: 0.8; /* number */
21
+ --turbo-opacity-pressed: 0.6; /* number */
22
+ --turbo-bg-base: #191724; /* color */
23
+ --turbo-bg-surface: #1f1d2e; /* color */
24
+ --turbo-bg-overlay: #26233a; /* color */
25
+ --turbo-text-primary: #e0def4; /* color */
26
+ --turbo-text-secondary: #908caa; /* color */
27
+ --turbo-text-inverse: #191724; /* color */
28
+ --turbo-brand-primary: #c4a7e7; /* color */
29
+ --turbo-state-info: #9ccfd8; /* color */
30
+ --turbo-state-success: #31748f; /* color */
31
+ --turbo-state-warning: #f6c177; /* color */
32
+ --turbo-state-danger: #eb6f92; /* color */
33
+ --turbo-border-default: #403d52; /* color */
34
+ --turbo-accent-link: #c4a7e7; /* color */
35
+ --turbo-font-sans: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji"; /* fontFamily */
36
+ --turbo-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* fontFamily */
37
+ --turbo-heading-h1: #31748f; /* color */
38
+ --turbo-heading-h2: #c4a7e7; /* color */
39
+ --turbo-heading-h3: #9ccfd8; /* color */
40
+ --turbo-heading-h4: #f6c177; /* color */
41
+ --turbo-heading-h5: #ebbcba; /* color */
42
+ --turbo-heading-h6: #eb6f92; /* color */
43
+ --turbo-body-primary: #e0def4; /* color */
44
+ --turbo-body-secondary: #908caa; /* color */
45
+ --turbo-link-default: #c4a7e7; /* color */
46
+ --turbo-selection-fg: #e0def4; /* color */
47
+ --turbo-selection-bg: #524f67; /* color */
48
+ --turbo-blockquote-border: #524f67; /* color */
49
+ --turbo-blockquote-fg: #e0def4; /* color */
50
+ --turbo-blockquote-bg: #1f1d2e; /* color */
51
+ --turbo-code-inline-fg: #e0def4; /* color */
52
+ --turbo-code-inline-bg: #26233a; /* color */
53
+ --turbo-code-block-fg: #e0def4; /* color */
54
+ --turbo-code-block-bg: #26233a; /* color */
55
+ --turbo-table-border: #524f67; /* color */
56
+ --turbo-table-stripe: #26233a; /* color */
57
+ --turbo-table-thead-bg: #403d52; /* color */
58
+ }
@@ -0,0 +1,61 @@
1
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');
2
+ @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&display=swap');
3
+
4
+ [data-theme="rose-pine-dawn"] {
5
+ --turbo-bg-base: #faf4ed;
6
+ --turbo-bg-surface: #fffaf3;
7
+ --turbo-bg-overlay: #f2e9e1;
8
+ --turbo-text-primary: #575279;
9
+ --turbo-text-secondary: #797593;
10
+ --turbo-text-inverse: #faf4ed;
11
+ --turbo-brand-primary: #907aa9;
12
+ --turbo-state-info: #56949f;
13
+ --turbo-state-success: #286983;
14
+ --turbo-state-warning: #ea9d34;
15
+ --turbo-state-danger: #b4637a;
16
+ --turbo-border-default: #dfdad9;
17
+ --turbo-accent-link: #907aa9;
18
+ --turbo-font-sans: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
19
+ --turbo-font-mono: JetBrains Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
20
+ --turbo-heading-h1: #286983;
21
+ --turbo-heading-h2: #907aa9;
22
+ --turbo-heading-h3: #56949f;
23
+ --turbo-heading-h4: #ea9d34;
24
+ --turbo-heading-h5: #d7827e;
25
+ --turbo-heading-h6: #b4637a;
26
+ --turbo-body-primary: #575279;
27
+ --turbo-body-secondary: #797593;
28
+ --turbo-link-default: #907aa9;
29
+ --turbo-selection-fg: #575279;
30
+ --turbo-selection-bg: #cecacd;
31
+ --turbo-blockquote-border: #cecacd;
32
+ --turbo-blockquote-fg: #575279;
33
+ --turbo-blockquote-bg: #fffaf3;
34
+ --turbo-code-inline-fg: #575279;
35
+ --turbo-code-inline-bg: #f2e9e1;
36
+ --turbo-code-block-fg: #575279;
37
+ --turbo-code-block-bg: #f2e9e1;
38
+ --turbo-table-border: #cecacd;
39
+ --turbo-table-stripe: #f2e9e1;
40
+ --turbo-table-thead-bg: #dfdad9;
41
+ --turbo-table-cell-bg: #faf4ed;
42
+ --turbo-table-header-fg: #575279;
43
+ --turbo-syntax-fg: #575279;
44
+ --turbo-syntax-bg: #f2e9e1;
45
+ --turbo-syntax-comment: #797593;
46
+ --turbo-syntax-keyword: #907aa9;
47
+ --turbo-syntax-string: #286983;
48
+ --turbo-syntax-number: #ea9d34;
49
+ --turbo-syntax-function: #56949f;
50
+ --turbo-syntax-type: #907aa9;
51
+ --turbo-syntax-variable: #575279;
52
+ --turbo-syntax-operator: #797593;
53
+ --turbo-syntax-punctuation: #797593;
54
+ --turbo-syntax-tag: #b4637a;
55
+ --turbo-syntax-attribute: #56949f;
56
+ --turbo-syntax-value: #286983;
57
+ --turbo-syntax-error: #b4637a;
58
+ --turbo-syntax-deleted: #b4637a;
59
+ --turbo-syntax-inserted: #286983;
60
+ color-scheme: light;
61
+ }
@@ -0,0 +1,61 @@
1
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');
2
+ @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&display=swap');
3
+
4
+ [data-theme="rose-pine-moon"] {
5
+ --turbo-bg-base: #232136;
6
+ --turbo-bg-surface: #2a273f;
7
+ --turbo-bg-overlay: #393552;
8
+ --turbo-text-primary: #e0def4;
9
+ --turbo-text-secondary: #908caa;
10
+ --turbo-text-inverse: #232136;
11
+ --turbo-brand-primary: #c4a7e7;
12
+ --turbo-state-info: #9ccfd8;
13
+ --turbo-state-success: #3e8fb0;
14
+ --turbo-state-warning: #f6c177;
15
+ --turbo-state-danger: #eb6f92;
16
+ --turbo-border-default: #44415a;
17
+ --turbo-accent-link: #c4a7e7;
18
+ --turbo-font-sans: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
19
+ --turbo-font-mono: JetBrains Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
20
+ --turbo-heading-h1: #3e8fb0;
21
+ --turbo-heading-h2: #c4a7e7;
22
+ --turbo-heading-h3: #9ccfd8;
23
+ --turbo-heading-h4: #f6c177;
24
+ --turbo-heading-h5: #ea9a97;
25
+ --turbo-heading-h6: #eb6f92;
26
+ --turbo-body-primary: #e0def4;
27
+ --turbo-body-secondary: #908caa;
28
+ --turbo-link-default: #c4a7e7;
29
+ --turbo-selection-fg: #e0def4;
30
+ --turbo-selection-bg: #56526e;
31
+ --turbo-blockquote-border: #56526e;
32
+ --turbo-blockquote-fg: #e0def4;
33
+ --turbo-blockquote-bg: #2a273f;
34
+ --turbo-code-inline-fg: #e0def4;
35
+ --turbo-code-inline-bg: #393552;
36
+ --turbo-code-block-fg: #e0def4;
37
+ --turbo-code-block-bg: #393552;
38
+ --turbo-table-border: #56526e;
39
+ --turbo-table-stripe: #393552;
40
+ --turbo-table-thead-bg: #44415a;
41
+ --turbo-table-cell-bg: #232136;
42
+ --turbo-table-header-fg: #e0def4;
43
+ --turbo-syntax-fg: #e0def4;
44
+ --turbo-syntax-bg: #393552;
45
+ --turbo-syntax-comment: #908caa;
46
+ --turbo-syntax-keyword: #c4a7e7;
47
+ --turbo-syntax-string: #3e8fb0;
48
+ --turbo-syntax-number: #f6c177;
49
+ --turbo-syntax-function: #9ccfd8;
50
+ --turbo-syntax-type: #c4a7e7;
51
+ --turbo-syntax-variable: #e0def4;
52
+ --turbo-syntax-operator: #908caa;
53
+ --turbo-syntax-punctuation: #908caa;
54
+ --turbo-syntax-tag: #eb6f92;
55
+ --turbo-syntax-attribute: #9ccfd8;
56
+ --turbo-syntax-value: #3e8fb0;
57
+ --turbo-syntax-error: #eb6f92;
58
+ --turbo-syntax-deleted: #eb6f92;
59
+ --turbo-syntax-inserted: #3e8fb0;
60
+ color-scheme: dark;
61
+ }
@@ -0,0 +1,61 @@
1
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');
2
+ @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&display=swap');
3
+
4
+ [data-theme="rose-pine"] {
5
+ --turbo-bg-base: #191724;
6
+ --turbo-bg-surface: #1f1d2e;
7
+ --turbo-bg-overlay: #26233a;
8
+ --turbo-text-primary: #e0def4;
9
+ --turbo-text-secondary: #908caa;
10
+ --turbo-text-inverse: #191724;
11
+ --turbo-brand-primary: #c4a7e7;
12
+ --turbo-state-info: #9ccfd8;
13
+ --turbo-state-success: #31748f;
14
+ --turbo-state-warning: #f6c177;
15
+ --turbo-state-danger: #eb6f92;
16
+ --turbo-border-default: #403d52;
17
+ --turbo-accent-link: #c4a7e7;
18
+ --turbo-font-sans: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
19
+ --turbo-font-mono: JetBrains Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
20
+ --turbo-heading-h1: #31748f;
21
+ --turbo-heading-h2: #c4a7e7;
22
+ --turbo-heading-h3: #9ccfd8;
23
+ --turbo-heading-h4: #f6c177;
24
+ --turbo-heading-h5: #ebbcba;
25
+ --turbo-heading-h6: #eb6f92;
26
+ --turbo-body-primary: #e0def4;
27
+ --turbo-body-secondary: #908caa;
28
+ --turbo-link-default: #c4a7e7;
29
+ --turbo-selection-fg: #e0def4;
30
+ --turbo-selection-bg: #524f67;
31
+ --turbo-blockquote-border: #524f67;
32
+ --turbo-blockquote-fg: #e0def4;
33
+ --turbo-blockquote-bg: #1f1d2e;
34
+ --turbo-code-inline-fg: #e0def4;
35
+ --turbo-code-inline-bg: #26233a;
36
+ --turbo-code-block-fg: #e0def4;
37
+ --turbo-code-block-bg: #26233a;
38
+ --turbo-table-border: #524f67;
39
+ --turbo-table-stripe: #26233a;
40
+ --turbo-table-thead-bg: #403d52;
41
+ --turbo-table-cell-bg: #191724;
42
+ --turbo-table-header-fg: #e0def4;
43
+ --turbo-syntax-fg: #e0def4;
44
+ --turbo-syntax-bg: #26233a;
45
+ --turbo-syntax-comment: #908caa;
46
+ --turbo-syntax-keyword: #c4a7e7;
47
+ --turbo-syntax-string: #31748f;
48
+ --turbo-syntax-number: #f6c177;
49
+ --turbo-syntax-function: #9ccfd8;
50
+ --turbo-syntax-type: #c4a7e7;
51
+ --turbo-syntax-variable: #e0def4;
52
+ --turbo-syntax-operator: #908caa;
53
+ --turbo-syntax-punctuation: #908caa;
54
+ --turbo-syntax-tag: #eb6f92;
55
+ --turbo-syntax-attribute: #9ccfd8;
56
+ --turbo-syntax-value: #31748f;
57
+ --turbo-syntax-error: #eb6f92;
58
+ --turbo-syntax-deleted: #eb6f92;
59
+ --turbo-syntax-inserted: #31748f;
60
+ color-scheme: dark;
61
+ }
Binary file
Binary file
Binary file
@@ -1 +1 @@
1
- {"version":3,"file":"theme-selector.js","sources":["../../packages/theme-selector/dist/constants.js","../../packages/theme-selector/dist/errors.js","../../packages/theme-selector/dist/storage.js","../../packages/theme-selector/dist/theme-loader.js","../../packages/theme-selector/dist/dropdown/helpers.js","../../packages/core/dist/tokens/index.js","../../packages/theme-selector/dist/theme-mapper.js","../../packages/theme-selector/dist/theme-resolver.js","../../packages/theme-selector/dist/apply-theme.js","../../packages/theme-selector/dist/dropdown/state.js","../../packages/theme-selector/dist/dropdown/events.js","../../packages/theme-selector/dist/dropdown/ui.js","../../packages/theme-selector/dist/navbar.js","../../packages/theme-selector/dist/accessibility.js","../../packages/theme-selector/dist/index.js"],"sourcesContent":["// SPDX-License-Identifier: MIT\n/**\n * Constants for theme selector component\n */\nexport const STORAGE_KEY = 'turbo-theme';\nexport const LEGACY_STORAGE_KEYS = ['bulma-theme-flavor'];\nexport const DEFAULT_THEME = 'catppuccin-mocha';\n// DOM element IDs and selectors - centralized to avoid magic strings\nexport const DOM_IDS = {\n THEME_FLAVOR_TRIGGER: 'theme-flavor-trigger',\n THEME_FLAVOR_TRIGGER_ICON: 'theme-flavor-trigger-icon',\n THEME_FLAVOR_MENU: 'theme-flavor-menu',\n THEME_FLAVOR_SELECT: 'theme-flavor-select',\n};\nexport const DOM_SELECTORS = {\n DROPDOWN_ITEMS: `#${DOM_IDS.THEME_FLAVOR_MENU} .dropdown-item.theme-item`,\n NAVBAR_DROPDOWN: '.navbar-item.has-dropdown',\n NAV_REPORTS: '[data-testid=\"nav-reports\"]',\n NAVBAR_ITEM: '.navbar-item',\n HIGHLIGHT_PRE: '.highlight > pre',\n THEME_CSS_LINKS: 'link[id^=\"theme-\"][id$=\"-css\"]',\n};\nexport const THEME_FAMILIES = {\n bulma: { name: 'Bulma', description: 'Classic Bulma themes' },\n catppuccin: { name: 'Catppuccin', description: 'Soothing pastel themes' },\n github: { name: 'GitHub', description: 'GitHub-inspired themes' },\n dracula: { name: 'Dracula', description: 'Dark vampire aesthetic' },\n};\n//# sourceMappingURL=constants.js.map","// SPDX-License-Identifier: MIT\n/**\n * Centralized error handling for Turbo Themes.\n *\n * Provides a consistent error logging strategy with standardized message\n * formatting, error levels, and optional context for debugging.\n */\n/** Log prefix for all theme-related messages */\nexport const LOG_PREFIX = '[turbo-themes]';\n/** Error severity levels */\nexport var ErrorLevel;\n(function (ErrorLevel) {\n ErrorLevel[\"WARN\"] = \"warn\";\n ErrorLevel[\"ERROR\"] = \"error\";\n})(ErrorLevel || (ErrorLevel = {}));\n/**\n * Factory functions for creating structured theme errors.\n * Each function returns a ThemeError with appropriate code, message, and level.\n */\nexport const ThemeErrors = {\n /** Invalid theme ID provided */\n INVALID_THEME_ID: (themeId) => ({\n code: 'INVALID_THEME_ID',\n message: `Invalid theme ID \"${themeId}\" not saved to storage`,\n level: ErrorLevel.WARN,\n context: { themeId },\n }),\n /** No themes available in registry */\n NO_THEMES_AVAILABLE: () => ({\n code: 'NO_THEMES_AVAILABLE',\n message: 'No themes available',\n level: ErrorLevel.ERROR,\n }),\n /** Invalid theme icon path */\n INVALID_ICON_PATH: (themeId) => ({\n code: 'INVALID_ICON_PATH',\n message: `Invalid theme icon path for ${themeId}`,\n level: ErrorLevel.WARN,\n context: { themeId },\n }),\n /** Theme initialization failed */\n INIT_FAILED: (error) => ({\n code: 'INIT_FAILED',\n message: 'Theme switcher initialization failed',\n level: ErrorLevel.ERROR,\n context: { error: error instanceof Error ? error.message : String(error) },\n }),\n /** Protocol-relative URL rejected for security */\n PROTOCOL_REJECTED: () => ({\n code: 'PROTOCOL_REJECTED',\n message: 'Protocol-relative base URL rejected for security',\n level: ErrorLevel.WARN,\n }),\n /** Insecure HTTP URL rejected */\n INSECURE_HTTP_REJECTED: () => ({\n code: 'INSECURE_HTTP_REJECTED',\n message: 'Insecure HTTP base URL rejected',\n level: ErrorLevel.WARN,\n }),\n /** Cross-origin URL rejected */\n CROSS_ORIGIN_REJECTED: (origin) => ({\n code: 'CROSS_ORIGIN_REJECTED',\n message: `Cross-origin base URL rejected: ${origin}`,\n level: ErrorLevel.WARN,\n context: { origin },\n }),\n /** Invalid CSS path for theme */\n INVALID_CSS_PATH: (themeId) => ({\n code: 'INVALID_CSS_PATH',\n message: `Invalid theme CSS path for ${themeId}`,\n level: ErrorLevel.WARN,\n context: { themeId },\n }),\n /** CSS failed to load */\n CSS_LOAD_FAILED: (themeId, error) => ({\n code: 'CSS_LOAD_FAILED',\n message: `Theme CSS failed to load for ${themeId}`,\n level: ErrorLevel.WARN,\n context: {\n themeId,\n error: error instanceof Error ? error.message : String(error),\n },\n }),\n /** Storage unavailable (private browsing or disabled) */\n STORAGE_UNAVAILABLE: (operation, error) => ({\n code: 'STORAGE_UNAVAILABLE',\n message: `localStorage ${operation} failed - storage may be unavailable`,\n level: ErrorLevel.WARN,\n context: {\n operation,\n error: error instanceof Error ? error.message : String(error),\n },\n }),\n};\n/**\n * Log a theme error to the console with consistent formatting.\n *\n * @param themeError - The structured error to log\n */\nexport function logThemeError(themeError) {\n const prefixedMessage = `${LOG_PREFIX} ${themeError.message}`;\n if (themeError.level === ErrorLevel.ERROR) {\n if (themeError.context) {\n console.error(prefixedMessage, themeError.context);\n }\n else {\n console.error(prefixedMessage);\n }\n }\n else {\n if (themeError.context) {\n console.warn(prefixedMessage, themeError.context);\n }\n else {\n console.warn(prefixedMessage);\n }\n }\n}\n/**\n * Convenience function to log a ThemeError.\n *\n * @param error - The ThemeError instance to log\n */\nexport function logError(error) {\n logThemeError(error);\n}\n//# sourceMappingURL=errors.js.map","// SPDX-License-Identifier: MIT\n/**\n * Storage utilities for theme persistence\n */\nimport { STORAGE_KEY, LEGACY_STORAGE_KEYS, DEFAULT_THEME } from './constants.js';\nimport { ThemeErrors, logThemeError } from './errors.js';\n// Re-export DEFAULT_THEME for convenience\nexport { DEFAULT_THEME } from './constants.js';\n/**\n * Safely get an item from localStorage.\n * Returns null if storage is unavailable (e.g., private browsing mode).\n */\nfunction safeGetItem(windowObj, key) {\n try {\n return windowObj.localStorage.getItem(key);\n }\n catch (error) {\n logThemeError(ThemeErrors.STORAGE_UNAVAILABLE('getItem', error));\n return null;\n }\n}\n/**\n * Safely set an item in localStorage.\n * Returns false if storage is unavailable.\n */\nfunction safeSetItem(windowObj, key, value) {\n try {\n windowObj.localStorage.setItem(key, value);\n return true;\n }\n catch (error) {\n logThemeError(ThemeErrors.STORAGE_UNAVAILABLE('setItem', error));\n return false;\n }\n}\n/**\n * Safely remove an item from localStorage.\n * Silently fails if storage is unavailable.\n */\nfunction safeRemoveItem(windowObj, key) {\n try {\n windowObj.localStorage.removeItem(key);\n }\n catch (error) {\n logThemeError(ThemeErrors.STORAGE_UNAVAILABLE('removeItem', error));\n }\n}\n/**\n * Validates a theme ID against a set of valid IDs.\n * Returns the theme ID if valid, otherwise returns the default theme.\n */\nexport function validateThemeId(themeId, validIds) {\n if (themeId && validIds.has(themeId)) {\n return themeId;\n }\n return DEFAULT_THEME;\n}\n/**\n * Migrates legacy storage keys to the current format.\n * Safely handles unavailable localStorage (e.g., private browsing).\n */\nexport function migrateLegacyStorage(windowObj) {\n for (const legacyKey of LEGACY_STORAGE_KEYS) {\n const legacy = safeGetItem(windowObj, legacyKey);\n if (legacy && !safeGetItem(windowObj, STORAGE_KEY)) {\n safeSetItem(windowObj, STORAGE_KEY, legacy);\n safeRemoveItem(windowObj, legacyKey);\n }\n }\n}\n/**\n * Gets the saved theme from localStorage, or returns default.\n * Optionally validates against a set of valid theme IDs.\n * Safely handles unavailable localStorage (e.g., private browsing).\n */\nexport function getSavedTheme(windowObj, validIds) {\n const stored = safeGetItem(windowObj, STORAGE_KEY);\n if (validIds) {\n return validateThemeId(stored, validIds);\n }\n return stored || DEFAULT_THEME;\n}\n/**\n * Saves a theme to localStorage.\n * Optionally validates the theme ID against a set of valid IDs before saving.\n * Safely handles unavailable localStorage (e.g., private browsing).\n *\n * @param windowObj - Window object with localStorage\n * @param themeId - Theme ID to save\n * @param validIds - Optional set of valid theme IDs for validation\n * @returns true if saved successfully, false otherwise\n */\nexport function saveTheme(windowObj, themeId, validIds) {\n if (validIds && !validIds.has(themeId)) {\n logThemeError(ThemeErrors.INVALID_THEME_ID(themeId));\n return false;\n }\n return safeSetItem(windowObj, STORAGE_KEY, themeId);\n}\n//# sourceMappingURL=storage.js.map","// SPDX-License-Identifier: MIT\n/**\n * Theme CSS loading utilities\n */\nimport { DOM_SELECTORS } from './constants.js';\nimport { ThemeErrors, logThemeError } from './errors.js';\n/**\n * Resolves an asset path relative to the site's base URL.\n */\nexport function resolveAssetPath(assetPath, baseUrl) {\n // Normalize baseUrl - remove trailing slash if present, then add one\n const normalizedBase = baseUrl.replace(/\\/$/, '');\n const base = normalizedBase ? `${window.location.origin}${normalizedBase}/` : `${window.location.origin}/`;\n return new URL(assetPath, base).pathname;\n}\n/**\n * Gets the base URL from the document's data-baseurl attribute.\n * Validates the URL to prevent injection attacks:\n * - Rejects protocol-relative URLs (//example.com)\n * - Rejects non-HTTPS absolute URLs (except localhost)\n * - Only allows same-origin or relative paths\n */\nexport function getBaseUrl(doc) {\n const baseElement = doc.documentElement;\n const raw = baseElement?.getAttribute('data-baseurl') || '';\n // Empty base URL is valid (use site root)\n if (!raw)\n return '';\n // Reject protocol-relative URLs (security risk)\n if (raw.startsWith('//')) {\n logThemeError(ThemeErrors.PROTOCOL_REJECTED());\n return '';\n }\n // Reject non-HTTPS absolute URLs (except localhost for development)\n if (raw.startsWith('http://') && !raw.startsWith('http://localhost')) {\n logThemeError(ThemeErrors.INSECURE_HTTP_REJECTED());\n return '';\n }\n try {\n // Parse relative to current origin to validate\n const currentOrigin = typeof window !== 'undefined' ? window.location.origin : 'http://localhost';\n const u = new URL(raw, currentOrigin);\n // Only allow same-origin URLs or relative paths\n if (u.origin !== currentOrigin) {\n logThemeError(ThemeErrors.CROSS_ORIGIN_REJECTED(u.origin));\n return '';\n }\n return u.pathname.replace(/\\/$/, '');\n }\n catch {\n return '';\n }\n}\n/**\n * Clears onload/onerror handlers from a link element to prevent memory leaks.\n */\nfunction clearLinkHandlers(link) {\n link.onload = null;\n link.onerror = null;\n}\n/**\n * Loads a CSS file with a timeout, returning a promise that resolves when loaded.\n */\nexport function loadCSSWithTimeout(link, themeId, timeoutMs = 10000) {\n return new Promise((resolve, reject) => {\n const timeoutId = setTimeout(() => {\n clearLinkHandlers(link);\n reject(new Error(`Theme ${themeId} load timeout`));\n }, timeoutMs);\n link.onload = () => {\n clearTimeout(timeoutId);\n clearLinkHandlers(link);\n resolve();\n };\n link.onerror = () => {\n clearTimeout(timeoutId);\n clearLinkHandlers(link);\n reject(new Error(`Failed to load theme ${themeId}`));\n };\n });\n}\n/**\n * Gets the current theme from document element classes\n */\nexport function getCurrentThemeFromClasses(element) {\n const classList = Array.from(element.classList);\n for (const className of classList) {\n if (className.startsWith('theme-')) {\n return className.substring(6); // Remove 'theme-' prefix\n }\n }\n return null;\n}\n/**\n * Applies theme class to document element\n */\nexport function applyThemeClass(doc, themeId) {\n // Remove existing theme classes in a single batch operation\n const themeClasses = Array.from(doc.documentElement.classList).filter((className) => className.startsWith('theme-'));\n if (themeClasses.length > 0) {\n doc.documentElement.classList.remove(...themeClasses);\n }\n // Add the new theme class\n doc.documentElement.classList.add(`theme-${themeId}`);\n}\n/**\n * Loads theme CSS file if not already loaded\n */\nexport async function loadThemeCSS(doc, theme, baseUrl) {\n const themeLinkId = `theme-${theme.id}-css`;\n let themeLink = doc.getElementById(themeLinkId);\n if (!themeLink) {\n themeLink = doc.createElement('link');\n themeLink.id = themeLinkId;\n themeLink.rel = 'stylesheet';\n themeLink.type = 'text/css';\n themeLink.setAttribute('data-theme-id', theme.id);\n try {\n themeLink.href = resolveAssetPath(theme.cssFile, baseUrl);\n }\n catch {\n logThemeError(ThemeErrors.INVALID_CSS_PATH(theme.id));\n return;\n }\n doc.head.appendChild(themeLink);\n // Wait for CSS to load (but don't fail if it doesn't load)\n try {\n await loadCSSWithTimeout(themeLink, theme.id);\n }\n catch (error) {\n logThemeError(ThemeErrors.CSS_LOAD_FAILED(theme.id, error));\n }\n }\n // Clean up old theme CSS links (keep current and base themes)\n doc.querySelectorAll(DOM_SELECTORS.THEME_CSS_LINKS).forEach((link) => {\n const linkThemeId = link.id.replace('theme-', '').replace('-css', '');\n if (linkThemeId !== theme.id && linkThemeId !== 'base') {\n link.remove();\n }\n });\n}\n//# sourceMappingURL=theme-loader.js.map","// SPDX-License-Identifier: MIT\n/**\n * Dropdown helper functions\n */\n/**\n * Sets the active state (is-active class and aria-checked) on a theme item element.\n */\nexport function setItemActiveState(item, isActive) {\n if (isActive) {\n item.classList.add('is-active');\n }\n else {\n item.classList.remove('is-active');\n }\n item.setAttribute('aria-checked', String(isActive));\n}\n/**\n * Sets tabindex attribute on all items in a collection.\n */\nexport function setTabindexBatch(items, value) {\n for (const item of items) {\n item.setAttribute('tabindex', value);\n }\n}\n//# sourceMappingURL=helpers.js.map","// SPDX-License-Identifier: MIT\n/**\n * Platform-agnostic design tokens export\n *\n * This module exports pure theme data (colors, typography, etc.) without\n * any DOM, CSS, or platform-specific code. Use this for:\n *\n * - React Native apps\n * - Flutter apps (via JSON export)\n * - iOS/Android native apps\n * - Any platform that needs theme colors\n *\n * For web apps, you can also import the CSS files directly:\n * import '@lgtm-hq/turbo-themes/css/catppuccin-mocha.css'\n */\n// Import tokens data (copied from dist/tokens.json during build)\nimport tokensData from '../themes/tokens.json' with { type: 'json' };\nconst tokens = tokensData;\n/**\n * All available theme flavors as a flat array\n */\nexport const flavors = Object.values(tokens.themes).map((theme) => ({\n id: theme.id,\n label: theme.label,\n vendor: theme.vendor,\n appearance: theme.appearance,\n ...(theme.iconUrl !== undefined && { iconUrl: theme.iconUrl }),\n tokens: theme.tokens,\n}));\n/**\n * Theme flavors indexed by ID for quick lookup\n */\nexport const themesById = Object.fromEntries(flavors.map((flavor) => [flavor.id, flavor]));\n/**\n * All available theme packages (grouped by vendor)\n */\nexport const packages = Object.fromEntries(Object.entries(tokens.byVendor).map(([vendorId, vendor]) => [\n vendorId,\n {\n id: vendorId,\n name: vendor.name,\n homepage: vendor.homepage,\n flavors: vendor.themes.map((themeId) => themesById[themeId]).filter(Boolean),\n },\n]));\n/**\n * Get a theme by ID\n * @param id - Theme identifier (e.g., 'catppuccin-mocha')\n * @returns The theme flavor or undefined if not found\n */\nexport function getTheme(id) {\n return themesById[id];\n}\n/**\n * Get theme tokens by ID (convenience function)\n * @param id - Theme identifier (e.g., 'catppuccin-mocha')\n * @returns The theme tokens or undefined if not found\n */\nexport function getTokens(id) {\n return themesById[id]?.tokens;\n}\n/**\n * Get all themes matching an appearance (light/dark)\n * @param appearance - 'light' or 'dark'\n * @returns Array of matching theme flavors\n */\nexport function getThemesByAppearance(appearance) {\n return flavors.filter((f) => f.appearance === appearance);\n}\n/**\n * Get all themes from a specific vendor\n * @param vendor - Vendor name (e.g., 'catppuccin', 'github')\n * @returns Array of matching theme flavors\n */\nexport function getThemesByVendor(vendor) {\n return flavors.filter((f) => f.vendor === vendor);\n}\n/**\n * List of all available theme IDs\n */\nexport const themeIds = flavors.map((f) => f.id);\n/**\n * List of all available vendors\n */\nexport const vendors = [...new Set(flavors.map((f) => f.vendor))];\n//# sourceMappingURL=index.js.map","// SPDX-License-Identifier: MIT\n/**\n * Maps core theme flavors to UI-specific format\n */\n// ============================================================================\n// Lookup Tables\n// ============================================================================\n/** Vendor to family mapping */\nconst VENDOR_FAMILY_MAP = {\n bulma: 'bulma',\n catppuccin: 'catppuccin',\n github: 'github',\n dracula: 'dracula',\n};\nconst DEFAULT_FAMILY = 'bulma';\nconst VENDOR_ICON_MAP = {\n bulma: 'assets/img/turbo-themes-logo.png',\n catppuccin: {\n light: 'assets/img/catppuccin-logo-latte.png',\n dark: 'assets/img/catppuccin-logo-macchiato.png',\n },\n github: {\n light: 'assets/img/github-logo-light.png',\n dark: 'assets/img/github-logo-dark.png',\n },\n dracula: 'assets/img/dracula-logo.png',\n};\n/** Predefined flavor descriptions */\nconst FLAVOR_DESCRIPTIONS = {\n 'bulma-light': 'Classic Bulma look with a bright, neutral palette.',\n 'bulma-dark': 'Dark Bulma theme tuned for low-light reading.',\n 'catppuccin-latte': 'Light, soft Catppuccin palette for daytime use.',\n 'catppuccin-frappe': 'Balanced dark Catppuccin theme for focused work.',\n 'catppuccin-macchiato': 'Deep, atmospheric Catppuccin variant with rich contrast.',\n 'catppuccin-mocha': 'Cozy, high-contrast Catppuccin theme for late-night sessions.',\n dracula: 'Iconic Dracula dark theme with vibrant accents.',\n 'github-light': 'GitHub-inspired light theme suited for documentation and UI heavy pages.',\n 'github-dark': 'GitHub dark theme optimized for code-heavy views.',\n};\n// ============================================================================\n// Helper Functions\n// ============================================================================\n/**\n * Gets the theme family from vendor name\n */\nfunction getFamily(vendor) {\n return VENDOR_FAMILY_MAP[vendor] ?? DEFAULT_FAMILY;\n}\n/**\n * Gets icon path for a vendor\n */\nfunction getIconForVendor(vendor, appearance) {\n const iconConfig = VENDOR_ICON_MAP[vendor];\n if (!iconConfig) {\n return undefined;\n }\n if (typeof iconConfig === 'string') {\n return iconConfig;\n }\n return iconConfig[appearance];\n}\n/**\n * Gets description for a flavor\n */\nfunction getDescriptionForFlavor(id, label) {\n return FLAVOR_DESCRIPTIONS[id] ?? `${label} theme`;\n}\n/**\n * Extracts preview colors from theme tokens\n */\nfunction extractPreviewColors(tokens) {\n return {\n bg: tokens.background.base,\n surface: tokens.background.surface,\n accent: tokens.brand.primary,\n text: tokens.text.primary,\n };\n}\n// ============================================================================\n// Public API\n// ============================================================================\n/**\n * Maps a canonical theme flavor to UI-specific format\n */\nexport function mapFlavorToUI(flavor) {\n const family = getFamily(flavor.vendor);\n return {\n id: flavor.id,\n name: flavor.label,\n description: getDescriptionForFlavor(flavor.id, flavor.label),\n cssFile: `packages/css/dist/themes/${flavor.id}.css`,\n icon: getIconForVendor(flavor.vendor, flavor.appearance),\n family,\n vendor: flavor.vendor,\n appearance: flavor.appearance,\n colors: extractPreviewColors(flavor.tokens),\n };\n}\n//# sourceMappingURL=theme-mapper.js.map","// SPDX-License-Identifier: MIT\n/**\n * Theme resolution utilities - centralized theme lookup and validation.\n *\n * Provides cached access to theme data and validation to avoid\n * repeated mapping and set creation across the codebase.\n */\nimport { flavors } from '@lgtm-hq/turbo-themes-core';\nimport { mapFlavorToUI } from './theme-mapper.js';\nimport { DEFAULT_THEME } from './constants.js';\n// Cache mapped themes and valid IDs\nlet mappedThemes = null;\nlet validThemeIds = null;\n/**\n * Gets all themes mapped to UI format.\n * Results are cached for performance.\n */\nexport function getThemes() {\n if (!mappedThemes) {\n mappedThemes = flavors.map(mapFlavorToUI);\n }\n return mappedThemes || [];\n}\n/**\n * Gets a Set of all valid theme IDs.\n * Results are cached for performance.\n */\nexport function getValidThemeIds() {\n if (!validThemeIds) {\n validThemeIds = new Set(flavors.map((f) => f.id));\n }\n return validThemeIds;\n}\n/**\n * Resolves a theme by ID, falling back to default if not found.\n *\n * @param themeId - The theme ID to resolve\n * @returns The matching theme, default theme, or first available theme\n */\nexport function resolveTheme(themeId) {\n const themes = getThemes();\n return (themes.find((t) => t.id === themeId) ||\n themes.find((t) => t.id === DEFAULT_THEME) ||\n themes[0]);\n}\n/**\n * Validates a theme ID for safety and format correctness.\n *\n * Accepts only alphanumeric characters, hyphens, and underscores.\n * Rejects special characters, unicode, and excessively long IDs.\n *\n * @param id - The value to validate as a theme ID\n * @returns True if the ID is valid, false otherwise\n */\nexport function isValidThemeId(id) {\n if (typeof id !== 'string')\n return false;\n if (id.length === 0)\n return false;\n if (id.length > 100)\n return false;\n return /^[a-zA-Z0-9_-]+$/.test(id);\n}\n/**\n * Sanitizes a theme ID by removing unsafe characters.\n *\n * Removes any characters that could cause DOM/CSS/XSS issues.\n * Used as a fallback when displaying potentially untrusted input.\n *\n * @param id - The theme ID to sanitize\n * @returns The sanitized ID containing only safe characters\n */\nexport function sanitizeThemeId(id) {\n return id.replace(/[^a-zA-Z0-9_-]/g, '');\n}\n/**\n * Resets the cached themes. Used for testing.\n * @internal\n */\nexport function _resetThemeCache() {\n mappedThemes = null;\n validThemeIds = null;\n}\n//# sourceMappingURL=theme-resolver.js.map","// SPDX-License-Identifier: MIT\n/**\n * Theme application logic\n */\nimport { DOM_IDS, DOM_SELECTORS, THEME_FAMILIES } from './constants.js';\nimport { getBaseUrl, applyThemeClass, loadThemeCSS, resolveAssetPath, getCurrentThemeFromClasses } from './theme-loader.js';\nimport { setItemActiveState } from './dropdown/helpers.js';\nimport { ThemeErrors, logThemeError } from './errors.js';\nimport { resolveTheme } from './theme-resolver.js';\n/**\n * Applies a theme to the document\n */\nexport async function applyTheme(doc, themeId) {\n const theme = resolveTheme(themeId);\n if (!theme) {\n logThemeError(ThemeErrors.NO_THEMES_AVAILABLE());\n return;\n }\n const baseUrl = getBaseUrl(doc);\n // Add loading state to trigger button\n const trigger = doc.getElementById(DOM_IDS.THEME_FLAVOR_TRIGGER);\n if (trigger) {\n trigger.classList.add('is-loading');\n }\n try {\n // Apply theme class immediately (before CSS loading)\n applyThemeClass(doc, theme.id);\n // Load theme CSS\n await loadThemeCSS(doc, theme, baseUrl);\n // Update trigger button icon\n const triggerIcon = doc.getElementById(DOM_IDS.THEME_FLAVOR_TRIGGER_ICON);\n if (triggerIcon && theme.icon) {\n try {\n triggerIcon.src = resolveAssetPath(theme.icon, baseUrl);\n const familyName = THEME_FAMILIES[theme.family].name;\n triggerIcon.alt = `${familyName} ${theme.name}`;\n triggerIcon.title = `${familyName} ${theme.name}`;\n }\n catch {\n logThemeError(ThemeErrors.INVALID_ICON_PATH(theme.id));\n }\n }\n // Update active state in dropdown\n doc.querySelectorAll(DOM_SELECTORS.DROPDOWN_ITEMS).forEach((item) => {\n setItemActiveState(item, item.getAttribute('data-theme-id') === theme.id);\n });\n }\n finally {\n if (trigger) {\n trigger.classList.remove('is-loading');\n }\n }\n}\n/**\n * Gets the current theme from classes or returns default\n */\nexport function getCurrentTheme(doc, defaultTheme) {\n return getCurrentThemeFromClasses(doc.documentElement) || defaultTheme;\n}\n//# sourceMappingURL=apply-theme.js.map","// SPDX-License-Identifier: MIT\n/**\n * Dropdown state management\n */\nimport { setItemActiveState, setTabindexBatch } from './helpers.js';\n/**\n * Creates dropdown state management functions.\n */\nexport function createDropdownStateManager(elements, state) {\n const { trigger, dropdown } = elements;\n const updateAriaExpanded = (expanded) => {\n trigger.setAttribute('aria-expanded', String(expanded));\n };\n const focusMenuItem = (index) => {\n if (index < 0 || index >= state.menuItems.length)\n return;\n const item = state.menuItems[index];\n setTabindexBatch(state.menuItems, '-1');\n item.setAttribute('tabindex', '0');\n item.focus();\n state.currentIndex = index;\n };\n const closeDropdown = (options = {}) => {\n const { restoreFocus = true } = options;\n dropdown.classList.remove('is-active');\n updateAriaExpanded(false);\n setTabindexBatch(state.menuItems, '-1');\n state.currentIndex = -1;\n if (restoreFocus) {\n trigger.focus();\n }\n };\n const toggleDropdown = (focusFirst = false) => {\n const isActive = dropdown.classList.toggle('is-active');\n updateAriaExpanded(isActive);\n if (!isActive) {\n state.currentIndex = -1;\n setTabindexBatch(state.menuItems, '-1');\n for (const menuItem of state.menuItems) {\n const isActiveItem = menuItem.classList.contains('is-active');\n setItemActiveState(menuItem, isActiveItem);\n }\n }\n else if (focusFirst && state.menuItems.length > 0) {\n focusMenuItem(0);\n }\n };\n return { updateAriaExpanded, focusMenuItem, closeDropdown, toggleDropdown };\n}\n//# sourceMappingURL=state.js.map","// SPDX-License-Identifier: MIT\n/**\n * Dropdown event handlers\n */\n/**\n * Calculates the next index when navigating down through menu items.\n */\nfunction getNextIndex(currentIndex, totalItems) {\n return currentIndex < totalItems - 1 ? currentIndex + 1 : 0;\n}\n/**\n * Calculates the previous index when navigating up through menu items.\n */\nfunction getPrevIndex(currentIndex, totalItems) {\n return currentIndex > 0 ? currentIndex - 1 : totalItems - 1;\n}\n/**\n * Handles keyboard navigation on the trigger button.\n */\nfunction handleTriggerKeydown(e, dropdown, state, stateManager) {\n const { focusMenuItem, toggleDropdown, updateAriaExpanded } = stateManager;\n const totalItems = state.menuItems.length;\n switch (e.key) {\n case 'Enter':\n case ' ':\n e.preventDefault();\n toggleDropdown(!dropdown.classList.contains('is-active'));\n break;\n case 'ArrowDown':\n e.preventDefault();\n if (!dropdown.classList.contains('is-active')) {\n dropdown.classList.add('is-active');\n updateAriaExpanded(true);\n focusMenuItem(0);\n }\n else {\n const nextIndex = state.currentIndex < 0 ? 0 : getNextIndex(state.currentIndex, totalItems);\n focusMenuItem(nextIndex);\n }\n break;\n case 'ArrowUp':\n e.preventDefault();\n if (!dropdown.classList.contains('is-active')) {\n dropdown.classList.add('is-active');\n updateAriaExpanded(true);\n focusMenuItem(totalItems - 1);\n }\n else {\n const startIndex = state.currentIndex < 0 ? totalItems - 1 : state.currentIndex;\n focusMenuItem(getPrevIndex(startIndex, totalItems));\n }\n break;\n }\n}\n/**\n * Handles keyboard navigation on menu items.\n */\nfunction handleMenuItemKeydown(e, index, item, state, stateManager) {\n const { focusMenuItem, closeDropdown } = stateManager;\n const totalItems = state.menuItems.length;\n switch (e.key) {\n case 'ArrowDown':\n e.preventDefault();\n focusMenuItem(getNextIndex(index, totalItems));\n break;\n case 'ArrowUp':\n e.preventDefault();\n focusMenuItem(getPrevIndex(index, totalItems));\n break;\n case 'Escape':\n e.preventDefault();\n closeDropdown();\n break;\n case 'Enter':\n case ' ':\n e.preventDefault();\n item.click();\n break;\n case 'Home':\n e.preventDefault();\n focusMenuItem(0);\n break;\n case 'End':\n e.preventDefault();\n focusMenuItem(totalItems - 1);\n break;\n }\n}\n/**\n * Wires up all event handlers for the dropdown.\n */\nexport function wireDropdownEventHandlers(documentObj, elements, state, stateManager, abortController) {\n const { trigger, dropdown } = elements;\n const { closeDropdown, toggleDropdown } = stateManager;\n const signal = abortController.signal;\n // Trigger click\n trigger.addEventListener('click', (e) => {\n e.preventDefault();\n toggleDropdown();\n }, { signal });\n // Outside click\n documentObj.addEventListener('click', (e) => {\n if (!dropdown.contains(e.target)) {\n closeDropdown({ restoreFocus: false });\n }\n }, { signal });\n // Escape key (document-level)\n documentObj.addEventListener('keydown', (e) => {\n if (e.key === 'Escape' && dropdown.classList.contains('is-active')) {\n closeDropdown({ restoreFocus: true });\n }\n }, { signal });\n // Trigger keyboard navigation\n trigger.addEventListener('keydown', (e) => handleTriggerKeydown(e, dropdown, state, stateManager), { signal });\n // Menu item keyboard navigation\n for (const [index, item] of state.menuItems.entries()) {\n item.addEventListener('keydown', (e) => handleMenuItemKeydown(e, index, item, state, stateManager), { signal });\n }\n}\n//# sourceMappingURL=events.js.map","// SPDX-License-Identifier: MIT\n/**\n * Dropdown UI element creation\n */\nimport { setItemActiveState } from './helpers.js';\nimport { DOM_IDS, DOM_SELECTORS } from '../constants.js';\n/**\n * Creates a checkmark SVG icon for the active theme indicator.\n */\nexport function createCheckmarkIcon(doc) {\n const svg = doc.createElementNS('http://www.w3.org/2000/svg', 'svg');\n svg.setAttribute('width', '16');\n svg.setAttribute('height', '16');\n svg.setAttribute('viewBox', '0 0 24 24');\n svg.setAttribute('fill', 'none');\n svg.setAttribute('stroke', 'currentColor');\n svg.setAttribute('stroke-width', '3');\n svg.setAttribute('stroke-linecap', 'round');\n svg.setAttribute('stroke-linejoin', 'round');\n const polyline = doc.createElementNS('http://www.w3.org/2000/svg', 'polyline');\n polyline.setAttribute('points', '20 6 9 17 4 12');\n svg.appendChild(polyline);\n return svg;\n}\n/**\n * Creates a single theme item button element.\n */\nexport function createThemeItemElement(ctx, theme, familyMeta) {\n const { documentObj, baseUrl, currentThemeId, selectEl, windowObj, closeDropdown, onThemeSelect } = ctx;\n const item = documentObj.createElement('button');\n item.type = 'button';\n item.className = 'dropdown-item theme-item';\n item.setAttribute('data-theme-id', theme.id);\n item.setAttribute('data-appearance', theme.appearance);\n item.setAttribute('role', 'menuitemradio');\n item.setAttribute('aria-label', `${familyMeta.name} ${theme.name} (${theme.appearance}). ${theme.description}`);\n item.setAttribute('tabindex', '-1');\n const isActive = theme.id === currentThemeId;\n setItemActiveState(item, isActive);\n // Icon (only render if theme has an icon)\n if (theme.icon) {\n const icon = documentObj.createElement('img');\n icon.className = 'theme-icon';\n icon.src = baseUrl ? `${baseUrl}/${theme.icon}` : theme.icon;\n icon.alt = `${familyMeta.name} ${theme.name}`;\n icon.width = 24;\n icon.height = 24;\n item.appendChild(icon);\n }\n else {\n // Add placeholder for consistent spacing\n const placeholder = documentObj.createElement('span');\n placeholder.className = 'theme-icon theme-icon-placeholder';\n placeholder.setAttribute('aria-hidden', 'true');\n item.appendChild(placeholder);\n }\n // Text content\n const copy = documentObj.createElement('div');\n copy.className = 'theme-copy';\n const titleEl = documentObj.createElement('span');\n titleEl.className = 'theme-title';\n titleEl.textContent = `${familyMeta.name} · ${theme.name}`;\n copy.appendChild(titleEl);\n const descriptionEl = documentObj.createElement('span');\n descriptionEl.className = 'theme-description';\n descriptionEl.textContent = theme.description;\n copy.appendChild(descriptionEl);\n item.appendChild(copy);\n // Checkmark for active state\n const check = documentObj.createElement('span');\n check.className = 'theme-check';\n check.appendChild(createCheckmarkIcon(documentObj));\n item.appendChild(check);\n // Click handler\n item.addEventListener('click', (e) => {\n e.preventDefault();\n onThemeSelect(theme.id);\n if (selectEl) {\n selectEl.value = theme.id;\n selectEl.dispatchEvent(new Event('change', { bubbles: true }));\n }\n closeDropdown({ restoreFocus: true });\n });\n return item;\n}\n/**\n * Creates a family group container with header and theme items.\n */\nexport function createFamilyGroup(ctx, familyKey, themes, familyMeta, animationDelay) {\n const { documentObj } = ctx;\n if (themes.length === 0)\n return null;\n const items = [];\n // Create family group container\n const group = documentObj.createElement('div');\n group.className = 'theme-family-group';\n group.setAttribute('role', 'group');\n group.setAttribute('aria-labelledby', `theme-family-${familyKey}`);\n if (group.style && typeof group.style.setProperty === 'function') {\n group.style.setProperty('--animation-delay', `${animationDelay}ms`);\n }\n // Create family header\n const header = documentObj.createElement('div');\n header.className = 'theme-family-header';\n header.id = `theme-family-${familyKey}`;\n const headerTitle = documentObj.createElement('span');\n headerTitle.className = 'theme-family-name';\n headerTitle.textContent = familyMeta.name;\n header.appendChild(headerTitle);\n group.appendChild(header);\n // Create themes container\n const themesContainer = documentObj.createElement('div');\n themesContainer.className = 'theme-family-items';\n themes.forEach((theme) => {\n const item = createThemeItemElement(ctx, theme, familyMeta);\n items.push(item);\n themesContainer.appendChild(item);\n });\n group.appendChild(themesContainer);\n return { group, items };\n}\n/**\n * Populates the dropdown menu with all theme family groups.\n */\nexport function populateDropdownMenu(ctx, dropdownMenu, themes, themeFamilies) {\n const families = Object.keys(themeFamilies);\n let animationDelay = 0;\n families.forEach((familyKey) => {\n const familyThemes = themes.filter((t) => t.family === familyKey);\n const familyMeta = themeFamilies[familyKey];\n if (!familyMeta)\n return;\n const result = createFamilyGroup(ctx, familyKey, familyThemes, familyMeta, animationDelay);\n if (result) {\n ctx.menuItems.push(...result.items);\n dropdownMenu.appendChild(result.group);\n animationDelay += 30;\n }\n });\n}\n/**\n * Wires up the native select element for theme selection.\n */\nexport function wireNativeSelect(ctx, selectEl, themes, defaultTheme) {\n const { documentObj, windowObj, onThemeSelect } = ctx;\n // Clear existing options\n while (selectEl.firstChild) {\n selectEl.removeChild(selectEl.firstChild);\n }\n // Populate options\n themes.forEach((theme) => {\n const option = documentObj.createElement('option');\n option.value = theme.id;\n option.textContent = theme.name;\n option.selected = theme.id === ctx.currentThemeId;\n selectEl.appendChild(option);\n });\n selectEl.disabled = false;\n // Change handler\n selectEl.addEventListener('change', (event) => {\n const target = event.target;\n const selectedThemeId = target?.value || defaultTheme;\n onThemeSelect(selectedThemeId);\n });\n}\n/**\n * Gets DOM elements required for the dropdown, returning null if any are missing.\n */\nexport function getDropdownElements(documentObj) {\n const dropdownMenu = documentObj.getElementById(DOM_IDS.THEME_FLAVOR_MENU);\n const trigger = documentObj.getElementById(DOM_IDS.THEME_FLAVOR_TRIGGER);\n const dropdown = trigger?.closest(DOM_SELECTORS.NAVBAR_DROPDOWN);\n const selectEl = documentObj.getElementById(DOM_IDS.THEME_FLAVOR_SELECT);\n if (!dropdownMenu || !trigger || !dropdown) {\n return null;\n }\n return { dropdownMenu, trigger, dropdown, selectEl };\n}\n//# sourceMappingURL=ui.js.map","// SPDX-License-Identifier: MIT\n/**\n * Navbar active state management\n */\nimport { DOM_SELECTORS } from './constants.js';\n/**\n * Normalizes a path by removing trailing slashes, defaulting to '/' if empty.\n */\nfunction normalizePath(path) {\n return path.replace(/\\/$/, '') || '/';\n}\n/**\n * Initializes navbar active state based on current path\n */\nexport function initNavbar(documentObj) {\n const currentPath = documentObj.location.pathname;\n const normalizedCurrentPath = normalizePath(currentPath);\n const navbarItems = documentObj.querySelectorAll(DOM_SELECTORS.NAVBAR_ITEM);\n // Single pass: find matching item and collect items to deactivate\n let matchingItem = null;\n const itemsToDeactivate = [];\n navbarItems.forEach((item) => {\n const link = item;\n if (!link.href)\n return;\n try {\n const normalizedLinkPath = normalizePath(new URL(link.href).pathname);\n if (normalizedCurrentPath === normalizedLinkPath) {\n matchingItem = item;\n }\n else {\n // Collect non-matching items with valid URLs for deactivation\n itemsToDeactivate.push(item);\n }\n }\n catch {\n // Ignore invalid URLs\n }\n });\n // Apply deactivation after finding match (single DOM batch)\n for (const item of itemsToDeactivate) {\n item.classList.remove('is-active');\n item.removeAttribute('aria-current');\n }\n // Set active state for the matching link\n if (matchingItem) {\n matchingItem.classList.add('is-active');\n matchingItem.setAttribute('aria-current', 'page');\n }\n // Handle Reports dropdown highlighting\n const reportsLink = documentObj.querySelector(DOM_SELECTORS.NAV_REPORTS);\n if (reportsLink) {\n const reportPaths = [\n '/coverage',\n '/coverage-python',\n '/coverage-swift',\n '/coverage-ruby',\n '/playwright',\n '/playwright-examples',\n '/lighthouse',\n ];\n const isOnReportsPage = reportPaths.some((path) => normalizedCurrentPath === path || normalizedCurrentPath.startsWith(path + '/'));\n if (isOnReportsPage) {\n reportsLink.classList.add('is-active');\n }\n else {\n reportsLink.classList.remove('is-active');\n }\n }\n}\n// Only assign to window in browser context\nif (typeof window !== 'undefined') {\n window.initNavbar = initNavbar;\n}\n//# sourceMappingURL=navbar.js.map","// SPDX-License-Identifier: MIT\n/**\n * Accessibility enhancements\n */\nimport { DOM_SELECTORS } from './constants.js';\n/**\n * Enhances accessibility for code blocks\n */\nexport function enhanceAccessibility(documentObj) {\n documentObj.querySelectorAll(DOM_SELECTORS.HIGHLIGHT_PRE).forEach((pre) => {\n if (!pre.hasAttribute('tabindex'))\n pre.setAttribute('tabindex', '0');\n if (!pre.hasAttribute('role'))\n pre.setAttribute('role', 'region');\n if (!pre.hasAttribute('aria-label'))\n pre.setAttribute('aria-label', 'Code block');\n });\n}\n//# sourceMappingURL=accessibility.js.map","// SPDX-License-Identifier: MIT\n/**\n * Theme selector package - main entry point\n */\nimport { migrateLegacyStorage, getSavedTheme, saveTheme, DEFAULT_THEME } from './storage.js';\nimport { getBaseUrl, getCurrentThemeFromClasses } from './theme-loader.js';\nimport { applyTheme, getCurrentTheme } from './apply-theme.js';\nimport { THEME_FAMILIES } from './constants.js';\nimport { getThemes, getValidThemeIds } from './theme-resolver.js';\nimport { createDropdownStateManager } from './dropdown/state.js';\nimport { wireDropdownEventHandlers } from './dropdown/events.js';\nimport { populateDropdownMenu, wireNativeSelect, getDropdownElements } from './dropdown/ui.js';\nimport { initNavbar } from './navbar.js';\nimport { enhanceAccessibility } from './accessibility.js';\nimport { ThemeErrors, logThemeError } from './errors.js';\n/**\n * Initializes theme system\n */\nexport async function initTheme(documentObj, windowObj) {\n // Migrate legacy storage keys\n migrateLegacyStorage(windowObj);\n // Check if theme was already applied by blocking script\n const initialTheme = windowObj.__INITIAL_THEME__;\n const savedTheme = getSavedTheme(windowObj, getValidThemeIds());\n // If blocking script already applied theme and it matches saved, just load CSS if needed\n if (initialTheme && initialTheme === savedTheme) {\n const currentTheme = getCurrentThemeFromClasses(documentObj.documentElement);\n if (currentTheme === savedTheme) {\n // Theme class already applied by blocking script, just ensure CSS is loaded\n const themeLinkId = `theme-${savedTheme}-css`;\n const themeLink = documentObj.getElementById(themeLinkId);\n if (!themeLink) {\n // CSS not loaded yet, load it now\n await applyTheme(documentObj, savedTheme);\n }\n return;\n }\n }\n // Otherwise, apply theme normally\n await applyTheme(documentObj, savedTheme);\n}\n/**\n * Initializes and wires up the theme flavor selector dropdown.\n * Returns a Promise for API consistency with initTheme.\n */\nexport async function wireFlavorSelector(documentObj, windowObj) {\n const abortController = new AbortController();\n // Get required DOM elements\n const elements = getDropdownElements(documentObj);\n if (!elements) {\n return { cleanup: () => abortController.abort() };\n }\n const { dropdownMenu, selectEl } = elements;\n const baseUrl = getBaseUrl(documentObj);\n const themes = getThemes();\n // Initialize state\n const state = {\n currentIndex: -1,\n menuItems: [],\n };\n // Get current theme (validated against available themes)\n const currentThemeId = getSavedTheme(windowObj, getValidThemeIds()) ||\n getCurrentTheme(documentObj, DEFAULT_THEME);\n // Create state manager (needs elements and state)\n const stateManager = createDropdownStateManager(elements, state);\n // Create context for UI creation\n const ctx = {\n documentObj,\n windowObj,\n baseUrl,\n currentThemeId,\n selectEl,\n menuItems: state.menuItems,\n closeDropdown: stateManager.closeDropdown,\n onThemeSelect: async (themeId) => {\n saveTheme(windowObj, themeId, getValidThemeIds());\n await applyTheme(documentObj, themeId);\n },\n };\n // Wire native select if present\n if (selectEl) {\n wireNativeSelect(ctx, selectEl, themes, DEFAULT_THEME);\n }\n // Populate dropdown menu\n populateDropdownMenu(ctx, dropdownMenu, themes, THEME_FAMILIES);\n // Wire event handlers\n wireDropdownEventHandlers(documentObj, elements, state, stateManager, abortController);\n // Initialize state\n stateManager.updateAriaExpanded(false);\n elements.dropdown.classList.remove('is-active');\n return { cleanup: () => abortController.abort() };\n}\n// Re-export navbar and accessibility functions\nexport { initNavbar, enhanceAccessibility };\n// Auto-initialize on DOMContentLoaded\nif (typeof document !== 'undefined' && typeof window !== 'undefined') {\n document.addEventListener('DOMContentLoaded', async () => {\n try {\n await initTheme(document, window);\n const { cleanup } = await wireFlavorSelector(document, window);\n enhanceAccessibility(document);\n // Register cleanup to run on teardown\n const pagehideHandler = () => {\n cleanup();\n window.removeEventListener('pagehide', pagehideHandler);\n };\n window.addEventListener('pagehide', pagehideHandler);\n }\n catch (error) {\n logThemeError(ThemeErrors.INIT_FAILED(error));\n }\n });\n}\n//# sourceMappingURL=index.js.map"],"names":["ErrorLevel","tokens","themes"],"mappings":";;AAIO,QAAM,cAAc;AACpB,QAAM,sBAAsB,CAAC,oBAAo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BAA2B,UAAU,KAAK;AAE/D,UAAM,MAAM;AAAA,MACR;AAAA,MAEA;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAW,MAAM;AAAA,MACjB,eAAe,aAAa;AAAA,MAC5B,eAAe,OAAO,YAAY;AAC9B,kBAAU,WAAW,SAAS,kBAAkB;AAChD,cAAM,WAAW,aAAa,OAAO;AAAA,MACzC;AAAA,IACR;AAEI,QAAI,UAAU;AACV,uBAAiB,KAAK,UAAUA,SAAQ,aAAa;AAAA,IACzD;AAEA,yBAAqB,KAAK,cAAcA,SAAQ,cAAc;AAE9D,8BAA0B,aAAa,UAAU,OAAO,cAAc,eAAe;AAErF,iBAAa,mBAAmB,KAAK;AACrC,aAAS,SAAS,UAAU,OAAO,WAAW;AAC9C,WAAO,EAAE,SAAS,MAAM,gBAAgB,MAAK,EAAE;AAAA,EACnD;AAIA,MAAI,OAAO,aAAa,eAAe,OAAO,WAAW,aAAa;AAClE,aAAS,iBAAiB,oBAAoB,YAAY;AACtD,UAAI;AACA,cAAM,UAAU,UAAU,MAAM;AAChC,cAAM,EAAE,QAAO,IAAK,MAAM,mBAAmB,UAAU,MAAM;AAC7D,6BAAqB,QAAQ;AAE7B,cAAM,kBAAkB,MAAM;AAC1B,kBAAO;AACP,iBAAO,oBAAoB,YAAY,eAAe;AAAA,QAC1D;AACA,eAAO,iBAAiB,YAAY,eAAe;AAAA,MACvD,SACO,OAAO;AACV,sBAAc,YAAY,YAAY,KAAK,CAAC;AAAA,MAChD;AAAA,IACJ,CAAC;AAAA,EACL;;;;;;;;"}
1
+ {"version":3,"file":"theme-selector.js","sources":["../../packages/theme-selector/dist/index.js"],"sourcesContent":["const STORAGE_KEY = \"turbo-theme\";\nconst LEGACY_STORAGE_KEYS = [\"bulma-theme-flavor\"];\nconst DEFAULT_THEME = \"catppuccin-mocha\";\nconst DOM_IDS = {\n THEME_FLAVOR_TRIGGER: \"theme-flavor-trigger\",\n THEME_FLAVOR_TRIGGER_ICON: \"theme-flavor-trigger-icon\",\n THEME_FLAVOR_TRIGGER_LABEL: \"theme-flavor-trigger-label\",\n THEME_FLAVOR_MENU: \"theme-flavor-menu\",\n THEME_FLAVOR_SELECT: \"theme-flavor-select\"\n};\nconst DOM_SELECTORS = {\n DROPDOWN_ITEMS: `#${DOM_IDS.THEME_FLAVOR_MENU} .dropdown-item.theme-item`,\n NAVBAR_DROPDOWN: \".navbar-item.has-dropdown\",\n NAV_REPORTS: '[data-testid=\"nav-reports\"]',\n NAVBAR_ITEM: \".navbar-item\",\n HIGHLIGHT_PRE: \".highlight > pre\",\n THEME_CSS_LINKS: 'link[id^=\"theme-\"][id$=\"-css\"]'\n};\nconst THEME_FAMILIES = {\n bulma: { name: \"Bulma\", description: \"Classic Bulma themes\" },\n catppuccin: { name: \"Catppuccin\", description: \"Soothing pastel themes\" },\n github: { name: \"GitHub\", description: \"GitHub-inspired themes\" },\n dracula: { name: \"Dracula\", description: \"Dark vampire aesthetic\" },\n \"rose-pine\": { name: \"Rosé Pine\", description: \"All natural pine, faux fur and a bit of soho vibes\" }\n};\nconst LOG_PREFIX = \"[turbo-themes]\";\nconst ThemeErrors = {\n /** Invalid theme ID provided */\n INVALID_THEME_ID: (themeId) => ({\n code: \"INVALID_THEME_ID\",\n message: `Invalid theme ID \"${themeId}\" not saved to storage`,\n level: \"warn\",\n context: { themeId }\n }),\n /** No themes available in registry */\n NO_THEMES_AVAILABLE: () => ({\n code: \"NO_THEMES_AVAILABLE\",\n message: \"No themes available\",\n level: \"error\"\n /* ERROR */\n }),\n /** Invalid theme icon path */\n INVALID_ICON_PATH: (themeId) => ({\n code: \"INVALID_ICON_PATH\",\n message: `Invalid theme icon path for ${themeId}`,\n level: \"warn\",\n context: { themeId }\n }),\n /** Theme initialization failed */\n INIT_FAILED: (error) => ({\n code: \"INIT_FAILED\",\n message: \"Theme switcher initialization failed\",\n level: \"error\",\n context: { error: error instanceof Error ? error.message : String(error) }\n }),\n /** Protocol-relative URL rejected for security */\n PROTOCOL_REJECTED: () => ({\n code: \"PROTOCOL_REJECTED\",\n message: \"Protocol-relative base URL rejected for security\",\n level: \"warn\"\n /* WARN */\n }),\n /** Insecure HTTP URL rejected */\n INSECURE_HTTP_REJECTED: () => ({\n code: \"INSECURE_HTTP_REJECTED\",\n message: \"Insecure HTTP base URL rejected\",\n level: \"warn\"\n /* WARN */\n }),\n /** Cross-origin URL rejected */\n CROSS_ORIGIN_REJECTED: (origin) => ({\n code: \"CROSS_ORIGIN_REJECTED\",\n message: `Cross-origin base URL rejected: ${origin}`,\n level: \"warn\",\n context: { origin }\n }),\n /** Invalid CSS path for theme */\n INVALID_CSS_PATH: (themeId) => ({\n code: \"INVALID_CSS_PATH\",\n message: `Invalid theme CSS path for ${themeId}`,\n level: \"warn\",\n context: { themeId }\n }),\n /** CSS failed to load */\n CSS_LOAD_FAILED: (themeId, error) => ({\n code: \"CSS_LOAD_FAILED\",\n message: `Theme CSS failed to load for ${themeId}`,\n level: \"warn\",\n context: {\n themeId,\n error: error instanceof Error ? error.message : String(error)\n }\n }),\n /** Storage unavailable (private browsing or disabled) */\n STORAGE_UNAVAILABLE: (operation, error) => ({\n code: \"STORAGE_UNAVAILABLE\",\n message: `localStorage ${operation} failed - storage may be unavailable`,\n level: \"warn\",\n context: {\n operation,\n error: error instanceof Error ? error.message : String(error)\n }\n })\n};\nfunction logThemeError(themeError) {\n const prefixedMessage = `${LOG_PREFIX} ${themeError.message}`;\n if (themeError.level === \"error\") {\n if (themeError.context) {\n console.error(prefixedMessage, themeError.context);\n } else {\n console.error(prefixedMessage);\n }\n } else {\n if (themeError.context) {\n console.warn(prefixedMessage, themeError.context);\n } else {\n console.warn(prefixedMessage);\n }\n }\n}\nfunction safeGetItem(windowObj, key) {\n try {\n return windowObj.localStorage.getItem(key);\n } catch (error) {\n logThemeError(ThemeErrors.STORAGE_UNAVAILABLE(\"getItem\", error));\n return null;\n }\n}\nfunction safeSetItem(windowObj, key, value) {\n try {\n windowObj.localStorage.setItem(key, value);\n return true;\n } catch (error) {\n logThemeError(ThemeErrors.STORAGE_UNAVAILABLE(\"setItem\", error));\n return false;\n }\n}\nfunction safeRemoveItem(windowObj, key) {\n try {\n windowObj.localStorage.removeItem(key);\n } catch (error) {\n logThemeError(ThemeErrors.STORAGE_UNAVAILABLE(\"removeItem\", error));\n }\n}\nfunction validateThemeId(themeId, validIds) {\n if (themeId && validIds.has(themeId)) {\n return themeId;\n }\n return DEFAULT_THEME;\n}\nfunction migrateLegacyStorage(windowObj) {\n for (const legacyKey of LEGACY_STORAGE_KEYS) {\n const legacy = safeGetItem(windowObj, legacyKey);\n if (legacy && !safeGetItem(windowObj, STORAGE_KEY)) {\n safeSetItem(windowObj, STORAGE_KEY, legacy);\n safeRemoveItem(windowObj, legacyKey);\n }\n }\n}\nfunction getSavedTheme(windowObj, validIds) {\n const stored = safeGetItem(windowObj, STORAGE_KEY);\n if (validIds) {\n return validateThemeId(stored, validIds);\n }\n return stored || DEFAULT_THEME;\n}\nfunction saveTheme(windowObj, themeId, validIds) {\n if (validIds && !validIds.has(themeId)) {\n logThemeError(ThemeErrors.INVALID_THEME_ID(themeId));\n return false;\n }\n return safeSetItem(windowObj, STORAGE_KEY, themeId);\n}\nfunction resolveAssetPath(assetPath, baseUrl) {\n const normalizedBase = baseUrl.replace(/\\/$/, \"\");\n const base = normalizedBase ? `${window.location.origin}${normalizedBase}/` : `${window.location.origin}/`;\n return new URL(assetPath, base).pathname;\n}\nfunction getBaseUrl(doc) {\n const baseElement = doc.documentElement;\n const raw = baseElement?.getAttribute(\"data-baseurl\") || \"\";\n if (!raw) return \"\";\n if (raw.startsWith(\"//\")) {\n logThemeError(ThemeErrors.PROTOCOL_REJECTED());\n return \"\";\n }\n if (raw.startsWith(\"http://\") && !raw.startsWith(\"http://localhost\")) {\n logThemeError(ThemeErrors.INSECURE_HTTP_REJECTED());\n return \"\";\n }\n try {\n const currentOrigin = typeof window !== \"undefined\" ? window.location.origin : \"http://localhost\";\n const u = new URL(raw, currentOrigin);\n if (u.origin !== currentOrigin) {\n logThemeError(ThemeErrors.CROSS_ORIGIN_REJECTED(u.origin));\n return \"\";\n }\n return u.pathname.replace(/\\/$/, \"\");\n } catch {\n return \"\";\n }\n}\nfunction clearLinkHandlers(link) {\n link.onload = null;\n link.onerror = null;\n}\nfunction loadCSSWithTimeout(link, themeId, timeoutMs = 1e4) {\n return new Promise((resolve, reject) => {\n const timeoutId = setTimeout(() => {\n clearLinkHandlers(link);\n reject(new Error(`Theme ${themeId} load timeout`));\n }, timeoutMs);\n link.onload = () => {\n clearTimeout(timeoutId);\n clearLinkHandlers(link);\n resolve();\n };\n link.onerror = () => {\n clearTimeout(timeoutId);\n clearLinkHandlers(link);\n reject(new Error(`Failed to load theme ${themeId}`));\n };\n });\n}\nfunction getCurrentThemeFromClasses(element) {\n const classList = Array.from(element.classList);\n for (const className of classList) {\n if (className.startsWith(\"theme-\")) {\n return className.substring(6);\n }\n }\n return null;\n}\nfunction applyThemeClass(doc, themeId) {\n const themeClasses = Array.from(doc.documentElement.classList).filter(\n (className) => className.startsWith(\"theme-\")\n );\n if (themeClasses.length > 0) {\n doc.documentElement.classList.remove(...themeClasses);\n }\n doc.documentElement.classList.add(`theme-${themeId}`);\n}\nasync function loadThemeCSS(doc, theme, baseUrl) {\n const themeLinkId = `theme-${theme.id}-css`;\n let themeLink = doc.getElementById(themeLinkId);\n if (!themeLink) {\n themeLink = doc.createElement(\"link\");\n themeLink.id = themeLinkId;\n themeLink.rel = \"stylesheet\";\n themeLink.type = \"text/css\";\n themeLink.setAttribute(\"data-theme-id\", theme.id);\n try {\n themeLink.href = resolveAssetPath(theme.cssFile, baseUrl);\n } catch {\n logThemeError(ThemeErrors.INVALID_CSS_PATH(theme.id));\n return;\n }\n doc.head.appendChild(themeLink);\n try {\n await loadCSSWithTimeout(themeLink, theme.id);\n } catch (error) {\n logThemeError(ThemeErrors.CSS_LOAD_FAILED(theme.id, error));\n }\n }\n doc.querySelectorAll(DOM_SELECTORS.THEME_CSS_LINKS).forEach((link) => {\n const linkThemeId = link.id.replace(\"theme-\", \"\").replace(\"-css\", \"\");\n if (linkThemeId !== theme.id && linkThemeId !== \"base\") {\n link.remove();\n }\n });\n}\nfunction setItemActiveState(item, isActive) {\n if (isActive) {\n item.classList.add(\"is-active\");\n } else {\n item.classList.remove(\"is-active\");\n }\n item.setAttribute(\"aria-checked\", String(isActive));\n}\nfunction setTabindexBatch(items, value) {\n for (const item of items) {\n item.setAttribute(\"tabindex\", value);\n }\n}\nconst themes = /* @__PURE__ */ JSON.parse('{\"bulma-dark\":{\"id\":\"bulma-dark\",\"label\":\"Bulma Dark\",\"vendor\":\"bulma\",\"appearance\":\"dark\",\"tokens\":{\"background\":{\"base\":\"#141414\",\"surface\":\"#1f1f1f\",\"overlay\":\"#2b2b2b\"},\"text\":{\"primary\":\"#f5f5f5\",\"secondary\":\"#dbdbdb\",\"inverse\":\"#141414\"},\"brand\":{\"primary\":\"#00d1b2\"},\"state\":{\"info\":\"#3e8ed0\",\"success\":\"#48c78e\",\"warning\":\"#ffe08a\",\"danger\":\"#f14668\"},\"border\":{\"default\":\"#363636\"},\"accent\":{\"link\":\"#485fc7\"},\"typography\":{\"fonts\":{\"sans\":\"\\\\\"Nunito Sans\\\\\", BlinkMacSystemFont, -apple-system, \\\\\"Segoe UI\\\\\", Roboto, Oxygen, Ubuntu, Cantarell, \\\\\"Fira Sans\\\\\", \\\\\"Droid Sans\\\\\", \\\\\"Helvetica Neue\\\\\", Helvetica, Arial, sans-serif\",\"mono\":\"\\\\\"JetBrains Mono\\\\\", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\\\\"Liberation Mono\\\\\", \\\\\"Courier New\\\\\", monospace\"},\"webFonts\":[\"https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,400;0,6..12,600;0,6..12,700;1,6..12,400&display=swap\",\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&display=swap\"]},\"content\":{\"heading\":{\"h1\":\"#00d1b2\",\"h2\":\"#7289da\",\"h3\":\"#5dade2\",\"h4\":\"#58d68d\",\"h5\":\"#f7dc6f\",\"h6\":\"#f1948a\"},\"body\":{\"primary\":\"#dbdbdb\",\"secondary\":\"#b5b5b5\"},\"link\":{\"default\":\"#485fc7\"},\"selection\":{\"fg\":\"#f5f5f5\",\"bg\":\"#3273dc\"},\"blockquote\":{\"border\":\"#363636\",\"fg\":\"#dbdbdb\",\"bg\":\"#1f1f1f\"},\"codeInline\":{\"fg\":\"#f14668\",\"bg\":\"#2b2b2b\"},\"codeBlock\":{\"fg\":\"#f5f5f5\",\"bg\":\"#2b2b2b\"},\"table\":{\"border\":\"#404040\",\"stripe\":\"#1c1c1c\",\"theadBg\":\"#2d2d2d\",\"cellBg\":\"#1a1a1a\",\"headerFg\":\"#f5f5f5\"}},\"spacing\":{\"xs\":\"0.25rem\",\"sm\":\"0.5rem\",\"md\":\"1rem\",\"lg\":\"1.5rem\",\"xl\":\"2rem\"},\"elevation\":{\"none\":\"none\",\"sm\":\"0 1px 2px 0 rgba(0, 0, 0, 0.05)\",\"md\":\"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)\",\"lg\":\"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)\",\"xl\":\"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)\"},\"animation\":{\"durationFast\":\"150ms\",\"durationNormal\":\"300ms\",\"durationSlow\":\"500ms\",\"easingDefault\":\"cubic-bezier(0.4, 0, 0.2, 1)\",\"easingEmphasized\":\"cubic-bezier(0.05, 0.7, 0.1, 1)\"},\"opacity\":{\"disabled\":0.5,\"hover\":0.8,\"pressed\":0.6},\"components\":{\"card\":{\"bg\":\"#1c1c1c\",\"border\":\"#3a3a3a\",\"headerBg\":\"#252525\",\"footerBg\":\"#1f1f1f\"},\"message\":{\"bg\":\"#1f1f1f\",\"headerBg\":\"#2a2a2a\",\"border\":\"#404040\",\"bodyFg\":\"#e0e0e0\"},\"panel\":{\"bg\":\"#1c1c1c\",\"headerBg\":\"#2a2a2a\",\"headerFg\":\"#f5f5f5\",\"border\":\"#3a3a3a\",\"blockBg\":\"#1f1f1f\",\"blockHoverBg\":\"#262626\",\"blockActiveBg\":\"#2d3748\"},\"box\":{\"bg\":\"#1c1c1c\",\"border\":\"#3a3a3a\"},\"notification\":{\"bg\":\"#252525\",\"border\":\"#404040\"},\"modal\":{\"bg\":\"rgba(0, 0, 0, 0.86)\",\"cardBg\":\"#1c1c1c\",\"headerBg\":\"#252525\",\"footerBg\":\"#1f1f1f\"},\"dropdown\":{\"bg\":\"#1c1c1c\",\"itemHoverBg\":\"#2a2a2a\",\"border\":\"#404040\"},\"tabs\":{\"border\":\"#404040\",\"linkBg\":\"#252525\",\"linkActiveBg\":\"#1c1c1c\",\"linkHoverBg\":\"#2a2a2a\"}}}},\"bulma-light\":{\"id\":\"bulma-light\",\"label\":\"Bulma Light\",\"vendor\":\"bulma\",\"appearance\":\"light\",\"tokens\":{\"background\":{\"base\":\"#ffffff\",\"surface\":\"#f5f5f5\",\"overlay\":\"#eeeeee\"},\"text\":{\"primary\":\"#363636\",\"secondary\":\"#4a4a4a\",\"inverse\":\"#ffffff\"},\"brand\":{\"primary\":\"#00d1b2\"},\"state\":{\"info\":\"#3e8ed0\",\"success\":\"#48c78e\",\"warning\":\"#ffe08a\",\"danger\":\"#f14668\"},\"border\":{\"default\":\"#dbdbdb\"},\"accent\":{\"link\":\"#485fc7\"},\"typography\":{\"fonts\":{\"sans\":\"\\\\\"Nunito Sans\\\\\", BlinkMacSystemFont, -apple-system, \\\\\"Segoe UI\\\\\", Roboto, Oxygen, Ubuntu, Cantarell, \\\\\"Fira Sans\\\\\", \\\\\"Droid Sans\\\\\", \\\\\"Helvetica Neue\\\\\", Helvetica, Arial, sans-serif\",\"mono\":\"\\\\\"JetBrains Mono\\\\\", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\\\\"Liberation Mono\\\\\", \\\\\"Courier New\\\\\", monospace\"},\"webFonts\":[\"https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,400;0,6..12,600;0,6..12,700;1,6..12,400&display=swap\",\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&display=swap\"]},\"content\":{\"heading\":{\"h1\":\"#00d1b2\",\"h2\":\"#485fc7\",\"h3\":\"#3e8ed0\",\"h4\":\"#48c78e\",\"h5\":\"#ffe08a\",\"h6\":\"#f14668\"},\"body\":{\"primary\":\"#4a4a4a\",\"secondary\":\"#6b6b6b\"},\"link\":{\"default\":\"#485fc7\"},\"selection\":{\"fg\":\"#363636\",\"bg\":\"#b5d5ff\"},\"blockquote\":{\"border\":\"#dbdbdb\",\"fg\":\"#4a4a4a\",\"bg\":\"#f5f5f5\"},\"codeInline\":{\"fg\":\"#f14668\",\"bg\":\"#f5f5f5\"},\"codeBlock\":{\"fg\":\"#363636\",\"bg\":\"#f5f5f5\"},\"table\":{\"border\":\"#dbdbdb\",\"stripe\":\"#fafafa\",\"theadBg\":\"#f0f0f0\",\"cellBg\":\"#ffffff\",\"headerFg\":\"#363636\"}},\"spacing\":{\"xs\":\"0.25rem\",\"sm\":\"0.5rem\",\"md\":\"1rem\",\"lg\":\"1.5rem\",\"xl\":\"2rem\"},\"elevation\":{\"none\":\"none\",\"sm\":\"0 1px 2px 0 rgba(0, 0, 0, 0.05)\",\"md\":\"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)\",\"lg\":\"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)\",\"xl\":\"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)\"},\"animation\":{\"durationFast\":\"150ms\",\"durationNormal\":\"300ms\",\"durationSlow\":\"500ms\",\"easingDefault\":\"cubic-bezier(0.4, 0, 0.2, 1)\",\"easingEmphasized\":\"cubic-bezier(0.05, 0.7, 0.1, 1)\"},\"opacity\":{\"disabled\":0.5,\"hover\":0.8,\"pressed\":0.6},\"components\":{\"card\":{\"bg\":\"#ffffff\",\"border\":\"#d5d5d5\",\"headerBg\":\"#f5f5f5\",\"footerBg\":\"#fafafa\"},\"message\":{\"bg\":\"#f8f9fa\",\"headerBg\":\"#eef1f4\",\"border\":\"#d5dbe1\",\"bodyFg\":\"#4a4a4a\"},\"panel\":{\"bg\":\"#ffffff\",\"headerBg\":\"#f0f0f0\",\"headerFg\":\"#363636\",\"border\":\"#d5d5d5\",\"blockBg\":\"#fafafa\",\"blockHoverBg\":\"#f5f5f5\",\"blockActiveBg\":\"#eef6fc\"},\"box\":{\"bg\":\"#ffffff\",\"border\":\"#e0e0e0\"},\"notification\":{\"bg\":\"#f5f5f5\",\"border\":\"#e0e0e0\"},\"modal\":{\"bg\":\"rgba(10, 10, 10, 0.86)\",\"cardBg\":\"#ffffff\",\"headerBg\":\"#f5f5f5\",\"footerBg\":\"#fafafa\"},\"dropdown\":{\"bg\":\"#ffffff\",\"itemHoverBg\":\"#f5f5f5\",\"border\":\"#dbdbdb\"},\"tabs\":{\"border\":\"#dbdbdb\",\"linkBg\":\"#f5f5f5\",\"linkActiveBg\":\"#ffffff\",\"linkHoverBg\":\"#eeeeee\"}}}},\"catppuccin-frappe\":{\"id\":\"catppuccin-frappe\",\"label\":\"Catppuccin Frappé\",\"vendor\":\"catppuccin\",\"appearance\":\"dark\",\"tokens\":{\"background\":{\"base\":\"#303446\",\"surface\":\"#292c3c\",\"overlay\":\"#232634\"},\"text\":{\"primary\":\"#c6d0f5\",\"secondary\":\"#a5adce\",\"inverse\":\"#303446\"},\"brand\":{\"primary\":\"#8caaee\"},\"state\":{\"info\":\"#99d1db\",\"success\":\"#a6d189\",\"warning\":\"#e5c890\",\"danger\":\"#e78284\"},\"border\":{\"default\":\"#737994\"},\"accent\":{\"link\":\"#8caaee\"},\"typography\":{\"fonts\":{\"sans\":\"Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, \\\\\"Apple Color Emoji\\\\\", \\\\\"Segoe UI Emoji\\\\\"\",\"mono\":\"JetBrains Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\\\\"Liberation Mono\\\\\", \\\\\"Courier New\\\\\", monospace\"},\"webFonts\":[\"https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap\",\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&display=swap\"]},\"content\":{\"heading\":{\"h1\":\"#a6d189\",\"h2\":\"#8caaee\",\"h3\":\"#85c1dc\",\"h4\":\"#e5c890\",\"h5\":\"#ca9ee6\",\"h6\":\"#e78284\"},\"body\":{\"primary\":\"#c6d0f5\",\"secondary\":\"#a5adce\"},\"link\":{\"default\":\"#8caaee\"},\"selection\":{\"fg\":\"#c6d0f5\",\"bg\":\"#838ba7\"},\"blockquote\":{\"border\":\"#838ba7\",\"fg\":\"#c6d0f5\",\"bg\":\"#292c3c\"},\"codeInline\":{\"fg\":\"#c6d0f5\",\"bg\":\"#414559\"},\"codeBlock\":{\"fg\":\"#c6d0f5\",\"bg\":\"#414559\"},\"table\":{\"border\":\"#838ba7\",\"stripe\":\"#414559\",\"theadBg\":\"#51576d\"}}}},\"catppuccin-latte\":{\"id\":\"catppuccin-latte\",\"label\":\"Catppuccin Latte\",\"vendor\":\"catppuccin\",\"appearance\":\"light\",\"tokens\":{\"background\":{\"base\":\"#eff1f5\",\"surface\":\"#e6e9ef\",\"overlay\":\"#dce0e8\"},\"text\":{\"primary\":\"#4c4f69\",\"secondary\":\"#6c6f85\",\"inverse\":\"#eff1f5\"},\"brand\":{\"primary\":\"#1e66f5\"},\"state\":{\"info\":\"#04a5e5\",\"success\":\"#40a02b\",\"warning\":\"#df8e1d\",\"danger\":\"#d20f39\"},\"border\":{\"default\":\"#9ca0b0\"},\"accent\":{\"link\":\"#1e66f5\"},\"typography\":{\"fonts\":{\"sans\":\"Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, \\\\\"Apple Color Emoji\\\\\", \\\\\"Segoe UI Emoji\\\\\"\",\"mono\":\"JetBrains Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\\\\"Liberation Mono\\\\\", \\\\\"Courier New\\\\\", monospace\"},\"webFonts\":[\"https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap\",\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&display=swap\"]},\"content\":{\"heading\":{\"h1\":\"#40a02b\",\"h2\":\"#1e66f5\",\"h3\":\"#209fb5\",\"h4\":\"#df8e1d\",\"h5\":\"#8839ef\",\"h6\":\"#d20f39\"},\"body\":{\"primary\":\"#4c4f69\",\"secondary\":\"#6c6f85\"},\"link\":{\"default\":\"#1e66f5\"},\"selection\":{\"fg\":\"#4c4f69\",\"bg\":\"#8c8fa1\"},\"blockquote\":{\"border\":\"#8c8fa1\",\"fg\":\"#4c4f69\",\"bg\":\"#e6e9ef\"},\"codeInline\":{\"fg\":\"#4c4f69\",\"bg\":\"#ccd0da\"},\"codeBlock\":{\"fg\":\"#4c4f69\",\"bg\":\"#ccd0da\"},\"table\":{\"border\":\"#8c8fa1\",\"stripe\":\"#ccd0da\",\"theadBg\":\"#bcc0cc\"}}}},\"catppuccin-macchiato\":{\"id\":\"catppuccin-macchiato\",\"label\":\"Catppuccin Macchiato\",\"vendor\":\"catppuccin\",\"appearance\":\"dark\",\"tokens\":{\"background\":{\"base\":\"#24273a\",\"surface\":\"#1e2030\",\"overlay\":\"#181926\"},\"text\":{\"primary\":\"#cad3f5\",\"secondary\":\"#a5adcb\",\"inverse\":\"#24273a\"},\"brand\":{\"primary\":\"#8aadf4\"},\"state\":{\"info\":\"#91d7e3\",\"success\":\"#a6da95\",\"warning\":\"#eed49f\",\"danger\":\"#ed8796\"},\"border\":{\"default\":\"#6e738d\"},\"accent\":{\"link\":\"#8aadf4\"},\"typography\":{\"fonts\":{\"sans\":\"Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, \\\\\"Apple Color Emoji\\\\\", \\\\\"Segoe UI Emoji\\\\\"\",\"mono\":\"JetBrains Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\\\\"Liberation Mono\\\\\", \\\\\"Courier New\\\\\", monospace\"},\"webFonts\":[\"https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap\",\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&display=swap\"]},\"content\":{\"heading\":{\"h1\":\"#a6da95\",\"h2\":\"#8aadf4\",\"h3\":\"#7dc4e4\",\"h4\":\"#eed49f\",\"h5\":\"#c6a0f6\",\"h6\":\"#ed8796\"},\"body\":{\"primary\":\"#cad3f5\",\"secondary\":\"#a5adcb\"},\"link\":{\"default\":\"#8aadf4\"},\"selection\":{\"fg\":\"#cad3f5\",\"bg\":\"#8087a2\"},\"blockquote\":{\"border\":\"#8087a2\",\"fg\":\"#cad3f5\",\"bg\":\"#1e2030\"},\"codeInline\":{\"fg\":\"#cad3f5\",\"bg\":\"#363a4f\"},\"codeBlock\":{\"fg\":\"#cad3f5\",\"bg\":\"#363a4f\"},\"table\":{\"border\":\"#8087a2\",\"stripe\":\"#363a4f\",\"theadBg\":\"#494d64\"}}}},\"catppuccin-mocha\":{\"id\":\"catppuccin-mocha\",\"label\":\"Catppuccin Mocha\",\"vendor\":\"catppuccin\",\"appearance\":\"dark\",\"tokens\":{\"background\":{\"base\":\"#1e1e2e\",\"surface\":\"#181825\",\"overlay\":\"#11111b\"},\"text\":{\"primary\":\"#cdd6f4\",\"secondary\":\"#a6adc8\",\"inverse\":\"#1e1e2e\"},\"brand\":{\"primary\":\"#89b4fa\"},\"state\":{\"info\":\"#89dceb\",\"success\":\"#a6e3a1\",\"warning\":\"#f9e2af\",\"danger\":\"#f38ba8\"},\"border\":{\"default\":\"#6c7086\"},\"accent\":{\"link\":\"#89b4fa\"},\"typography\":{\"fonts\":{\"sans\":\"Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, \\\\\"Apple Color Emoji\\\\\", \\\\\"Segoe UI Emoji\\\\\"\",\"mono\":\"JetBrains Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\\\\"Liberation Mono\\\\\", \\\\\"Courier New\\\\\", monospace\"},\"webFonts\":[\"https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap\",\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&display=swap\"]},\"content\":{\"heading\":{\"h1\":\"#a6e3a1\",\"h2\":\"#89b4fa\",\"h3\":\"#74c7ec\",\"h4\":\"#f9e2af\",\"h5\":\"#cba6f7\",\"h6\":\"#f38ba8\"},\"body\":{\"primary\":\"#cdd6f4\",\"secondary\":\"#a6adc8\"},\"link\":{\"default\":\"#89b4fa\"},\"selection\":{\"fg\":\"#cdd6f4\",\"bg\":\"#7f849c\"},\"blockquote\":{\"border\":\"#7f849c\",\"fg\":\"#cdd6f4\",\"bg\":\"#181825\"},\"codeInline\":{\"fg\":\"#cdd6f4\",\"bg\":\"#313244\"},\"codeBlock\":{\"fg\":\"#cdd6f4\",\"bg\":\"#313244\"},\"table\":{\"border\":\"#7f849c\",\"stripe\":\"#313244\",\"theadBg\":\"#45475a\"}}}},\"dracula\":{\"id\":\"dracula\",\"label\":\"Dracula\",\"vendor\":\"dracula\",\"appearance\":\"dark\",\"tokens\":{\"background\":{\"base\":\"#282a36\",\"surface\":\"#21222c\",\"overlay\":\"#44475a\"},\"text\":{\"primary\":\"#f8f8f2\",\"secondary\":\"#6272a4\",\"inverse\":\"#282a36\"},\"brand\":{\"primary\":\"#bd93f9\"},\"state\":{\"info\":\"#8be9fd\",\"success\":\"#50fa7b\",\"warning\":\"#f1fa8c\",\"danger\":\"#ff5555\"},\"border\":{\"default\":\"#44475a\"},\"accent\":{\"link\":\"#8be9fd\"},\"typography\":{\"fonts\":{\"sans\":\"ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \\\\\"Segoe UI\\\\\", Roboto, \\\\\"Helvetica Neue\\\\\", Arial, sans-serif\",\"mono\":\"\\\\\"Fira Code\\\\\", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\\\\"Liberation Mono\\\\\", \\\\\"Courier New\\\\\", monospace\"},\"webFonts\":[\"https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;600&display=swap\"]},\"content\":{\"heading\":{\"h1\":\"#ff79c6\",\"h2\":\"#bd93f9\",\"h3\":\"#8be9fd\",\"h4\":\"#50fa7b\",\"h5\":\"#ffb86c\",\"h6\":\"#f1fa8c\"},\"body\":{\"primary\":\"#f8f8f2\",\"secondary\":\"#6272a4\"},\"link\":{\"default\":\"#8be9fd\"},\"selection\":{\"fg\":\"#f8f8f2\",\"bg\":\"#44475a\"},\"blockquote\":{\"border\":\"#bd93f9\",\"fg\":\"#6272a4\",\"bg\":\"#21222c\"},\"codeInline\":{\"fg\":\"#50fa7b\",\"bg\":\"#21222c\"},\"codeBlock\":{\"fg\":\"#f8f8f2\",\"bg\":\"#21222c\"},\"table\":{\"border\":\"#44475a\",\"stripe\":\"#21222c\",\"theadBg\":\"#44475a\",\"cellBg\":\"#282a36\",\"headerFg\":\"#f8f8f2\"}},\"spacing\":{\"xs\":\"0.25rem\",\"sm\":\"0.5rem\",\"md\":\"1rem\",\"lg\":\"1.5rem\",\"xl\":\"2rem\"},\"elevation\":{\"none\":\"none\",\"sm\":\"0 1px 2px 0 rgba(0, 0, 0, 0.05)\",\"md\":\"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)\",\"lg\":\"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)\",\"xl\":\"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)\"},\"animation\":{\"durationFast\":\"150ms\",\"durationNormal\":\"300ms\",\"durationSlow\":\"500ms\",\"easingDefault\":\"cubic-bezier(0.4, 0, 0.2, 1)\",\"easingEmphasized\":\"cubic-bezier(0.05, 0.7, 0.1, 1)\"},\"opacity\":{\"disabled\":0.5,\"hover\":0.8,\"pressed\":0.6},\"components\":{\"card\":{\"bg\":\"#21222c\",\"border\":\"#6272a4\",\"headerBg\":\"#282a36\",\"footerBg\":\"#21222c\"},\"message\":{\"bg\":\"#282a36\",\"headerBg\":\"#44475a\",\"border\":\"#6272a4\",\"bodyFg\":\"#f8f8f2\"},\"panel\":{\"bg\":\"#21222c\",\"headerBg\":\"#44475a\",\"headerFg\":\"#f8f8f2\",\"border\":\"#6272a4\",\"blockBg\":\"#282a36\",\"blockHoverBg\":\"#2e303e\",\"blockActiveBg\":\"#44475a\"},\"box\":{\"bg\":\"#21222c\",\"border\":\"#6272a4\"},\"notification\":{\"bg\":\"#282a36\",\"border\":\"#6272a4\"},\"modal\":{\"bg\":\"rgba(40, 42, 54, 0.9)\",\"cardBg\":\"#21222c\",\"headerBg\":\"#282a36\",\"footerBg\":\"#21222c\"},\"dropdown\":{\"bg\":\"#21222c\",\"itemHoverBg\":\"#2e303e\",\"border\":\"#6272a4\"},\"tabs\":{\"border\":\"#6272a4\",\"linkBg\":\"#2e303e\",\"linkActiveBg\":\"#21222c\",\"linkHoverBg\":\"#44475a\"}}}},\"github-dark\":{\"id\":\"github-dark\",\"label\":\"GitHub Dark\",\"vendor\":\"github\",\"appearance\":\"dark\",\"tokens\":{\"background\":{\"base\":\"#0d1117\",\"surface\":\"#151b23\",\"overlay\":\"#010409\"},\"text\":{\"primary\":\"#f0f6fc\",\"secondary\":\"#9198a1\",\"inverse\":\"#ffffff\"},\"brand\":{\"primary\":\"#1f6feb\"},\"state\":{\"info\":\"#4493f8\",\"success\":\"#3fb950\",\"warning\":\"#d29922\",\"danger\":\"#f85149\"},\"border\":{\"default\":\"#3d444d\"},\"accent\":{\"link\":\"#4493f8\"},\"typography\":{\"fonts\":{\"sans\":\"\\\\\"Mona Sans\\\\\", -apple-system, BlinkMacSystemFont, \\\\\"Segoe UI\\\\\", \\\\\"Noto Sans\\\\\", Helvetica, Arial, sans-serif, \\\\\"Apple Color Emoji\\\\\", \\\\\"Segoe UI Emoji\\\\\"\",\"mono\":\"\\\\\"Hubot Sans\\\\\", ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, \\\\\"Liberation Mono\\\\\", monospace\"},\"webFonts\":[\"https://github.githubassets.com/assets/mona-sans-webfont.woff2\",\"https://github.githubassets.com/assets/hubot-sans-webfont.woff2\"]},\"content\":{\"heading\":{\"h1\":\"#3fb950\",\"h2\":\"#4493f8\",\"h3\":\"#1f6feb\",\"h4\":\"#d29922\",\"h5\":\"#3fb950\",\"h6\":\"#f85149\"},\"body\":{\"primary\":\"#f0f6fc\",\"secondary\":\"#9198a1\"},\"link\":{\"default\":\"#4493f8\"},\"selection\":{\"fg\":\"#f0f6fc\",\"bg\":\"#264f78\"},\"blockquote\":{\"border\":\"#3d444d\",\"fg\":\"#9198a1\",\"bg\":\"#151b23\"},\"codeInline\":{\"fg\":\"#f0f6fc\",\"bg\":\"#151b23\"},\"codeBlock\":{\"fg\":\"#f0f6fc\",\"bg\":\"#151b23\"},\"table\":{\"border\":\"#3d444d\",\"stripe\":\"#151b23\",\"theadBg\":\"#151b23\"}}}},\"github-light\":{\"id\":\"github-light\",\"label\":\"GitHub Light\",\"vendor\":\"github\",\"appearance\":\"light\",\"tokens\":{\"background\":{\"base\":\"#ffffff\",\"surface\":\"#f6f8fa\",\"overlay\":\"#f6f8fa\"},\"text\":{\"primary\":\"#1f2328\",\"secondary\":\"#59636e\",\"inverse\":\"#ffffff\"},\"brand\":{\"primary\":\"#0969da\"},\"state\":{\"info\":\"#0969da\",\"success\":\"#1a7f37\",\"warning\":\"#9a6700\",\"danger\":\"#d1242f\"},\"border\":{\"default\":\"#d1d9e0\"},\"accent\":{\"link\":\"#0969da\"},\"typography\":{\"fonts\":{\"sans\":\"\\\\\"Mona Sans\\\\\", -apple-system, BlinkMacSystemFont, \\\\\"Segoe UI\\\\\", \\\\\"Noto Sans\\\\\", Helvetica, Arial, sans-serif, \\\\\"Apple Color Emoji\\\\\", \\\\\"Segoe UI Emoji\\\\\"\",\"mono\":\"\\\\\"Hubot Sans\\\\\", ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, \\\\\"Liberation Mono\\\\\", monospace\"},\"webFonts\":[\"https://github.githubassets.com/assets/mona-sans-webfont.woff2\",\"https://github.githubassets.com/assets/hubot-sans-webfont.woff2\"]},\"content\":{\"heading\":{\"h1\":\"#1a7f37\",\"h2\":\"#0969da\",\"h3\":\"#0969da\",\"h4\":\"#9a6700\",\"h5\":\"#1a7f37\",\"h6\":\"#d1242f\"},\"body\":{\"primary\":\"#1f2328\",\"secondary\":\"#59636e\"},\"link\":{\"default\":\"#0969da\"},\"selection\":{\"fg\":\"#1f2328\",\"bg\":\"#b6e3ff\"},\"blockquote\":{\"border\":\"#d1d9e0\",\"fg\":\"#59636e\",\"bg\":\"#f6f8fa\"},\"codeInline\":{\"fg\":\"#1f2328\",\"bg\":\"#f6f8fa\"},\"codeBlock\":{\"fg\":\"#1f2328\",\"bg\":\"#f6f8fa\"},\"table\":{\"border\":\"#d1d9e0\",\"stripe\":\"#f6f8fa\",\"theadBg\":\"#f6f8fa\"}}}},\"rose-pine-dawn\":{\"id\":\"rose-pine-dawn\",\"label\":\"Rosé Pine Dawn\",\"vendor\":\"rose-pine\",\"appearance\":\"light\",\"iconUrl\":\"/assets/img/rose-pine-dawn.png\",\"tokens\":{\"background\":{\"base\":\"#faf4ed\",\"surface\":\"#fffaf3\",\"overlay\":\"#f2e9e1\"},\"text\":{\"primary\":\"#575279\",\"secondary\":\"#797593\",\"inverse\":\"#faf4ed\"},\"brand\":{\"primary\":\"#907aa9\"},\"state\":{\"info\":\"#56949f\",\"success\":\"#286983\",\"warning\":\"#ea9d34\",\"danger\":\"#b4637a\"},\"border\":{\"default\":\"#dfdad9\"},\"accent\":{\"link\":\"#907aa9\"},\"typography\":{\"fonts\":{\"sans\":\"Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, \\\\\"Apple Color Emoji\\\\\", \\\\\"Segoe UI Emoji\\\\\"\",\"mono\":\"JetBrains Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\\\\"Liberation Mono\\\\\", \\\\\"Courier New\\\\\", monospace\"},\"webFonts\":[\"https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap\",\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&display=swap\"]},\"content\":{\"heading\":{\"h1\":\"#286983\",\"h2\":\"#907aa9\",\"h3\":\"#56949f\",\"h4\":\"#ea9d34\",\"h5\":\"#d7827e\",\"h6\":\"#b4637a\"},\"body\":{\"primary\":\"#575279\",\"secondary\":\"#797593\"},\"link\":{\"default\":\"#907aa9\"},\"selection\":{\"fg\":\"#575279\",\"bg\":\"#cecacd\"},\"blockquote\":{\"border\":\"#cecacd\",\"fg\":\"#575279\",\"bg\":\"#fffaf3\"},\"codeInline\":{\"fg\":\"#575279\",\"bg\":\"#f2e9e1\"},\"codeBlock\":{\"fg\":\"#575279\",\"bg\":\"#f2e9e1\"},\"table\":{\"border\":\"#cecacd\",\"stripe\":\"#f2e9e1\",\"theadBg\":\"#dfdad9\"}}}},\"rose-pine-moon\":{\"id\":\"rose-pine-moon\",\"label\":\"Rosé Pine Moon\",\"vendor\":\"rose-pine\",\"appearance\":\"dark\",\"iconUrl\":\"/assets/img/rose-pine-moon.png\",\"tokens\":{\"background\":{\"base\":\"#232136\",\"surface\":\"#2a273f\",\"overlay\":\"#393552\"},\"text\":{\"primary\":\"#e0def4\",\"secondary\":\"#908caa\",\"inverse\":\"#232136\"},\"brand\":{\"primary\":\"#c4a7e7\"},\"state\":{\"info\":\"#9ccfd8\",\"success\":\"#3e8fb0\",\"warning\":\"#f6c177\",\"danger\":\"#eb6f92\"},\"border\":{\"default\":\"#44415a\"},\"accent\":{\"link\":\"#c4a7e7\"},\"typography\":{\"fonts\":{\"sans\":\"Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, \\\\\"Apple Color Emoji\\\\\", \\\\\"Segoe UI Emoji\\\\\"\",\"mono\":\"JetBrains Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\\\\"Liberation Mono\\\\\", \\\\\"Courier New\\\\\", monospace\"},\"webFonts\":[\"https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap\",\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&display=swap\"]},\"content\":{\"heading\":{\"h1\":\"#3e8fb0\",\"h2\":\"#c4a7e7\",\"h3\":\"#9ccfd8\",\"h4\":\"#f6c177\",\"h5\":\"#ea9a97\",\"h6\":\"#eb6f92\"},\"body\":{\"primary\":\"#e0def4\",\"secondary\":\"#908caa\"},\"link\":{\"default\":\"#c4a7e7\"},\"selection\":{\"fg\":\"#e0def4\",\"bg\":\"#56526e\"},\"blockquote\":{\"border\":\"#56526e\",\"fg\":\"#e0def4\",\"bg\":\"#2a273f\"},\"codeInline\":{\"fg\":\"#e0def4\",\"bg\":\"#393552\"},\"codeBlock\":{\"fg\":\"#e0def4\",\"bg\":\"#393552\"},\"table\":{\"border\":\"#56526e\",\"stripe\":\"#393552\",\"theadBg\":\"#44415a\"}}}},\"rose-pine\":{\"id\":\"rose-pine\",\"label\":\"Rosé Pine\",\"vendor\":\"rose-pine\",\"appearance\":\"dark\",\"iconUrl\":\"/assets/img/rose-pine.png\",\"tokens\":{\"background\":{\"base\":\"#191724\",\"surface\":\"#1f1d2e\",\"overlay\":\"#26233a\"},\"text\":{\"primary\":\"#e0def4\",\"secondary\":\"#908caa\",\"inverse\":\"#191724\"},\"brand\":{\"primary\":\"#c4a7e7\"},\"state\":{\"info\":\"#9ccfd8\",\"success\":\"#31748f\",\"warning\":\"#f6c177\",\"danger\":\"#eb6f92\"},\"border\":{\"default\":\"#403d52\"},\"accent\":{\"link\":\"#c4a7e7\"},\"typography\":{\"fonts\":{\"sans\":\"Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, \\\\\"Apple Color Emoji\\\\\", \\\\\"Segoe UI Emoji\\\\\"\",\"mono\":\"JetBrains Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\\\\"Liberation Mono\\\\\", \\\\\"Courier New\\\\\", monospace\"},\"webFonts\":[\"https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap\",\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&display=swap\"]},\"content\":{\"heading\":{\"h1\":\"#31748f\",\"h2\":\"#c4a7e7\",\"h3\":\"#9ccfd8\",\"h4\":\"#f6c177\",\"h5\":\"#ebbcba\",\"h6\":\"#eb6f92\"},\"body\":{\"primary\":\"#e0def4\",\"secondary\":\"#908caa\"},\"link\":{\"default\":\"#c4a7e7\"},\"selection\":{\"fg\":\"#e0def4\",\"bg\":\"#524f67\"},\"blockquote\":{\"border\":\"#524f67\",\"fg\":\"#e0def4\",\"bg\":\"#1f1d2e\"},\"codeInline\":{\"fg\":\"#e0def4\",\"bg\":\"#26233a\"},\"codeBlock\":{\"fg\":\"#e0def4\",\"bg\":\"#26233a\"},\"table\":{\"border\":\"#524f67\",\"stripe\":\"#26233a\",\"theadBg\":\"#403d52\"}}}}}');\nconst byVendor = { \"bulma\": { \"name\": \"Bulma\", \"homepage\": \"https://bulma.io/\", \"themes\": [\"bulma-dark\", \"bulma-light\"] }, \"catppuccin\": { \"name\": \"Catppuccin (synced)\", \"homepage\": \"https://catppuccin.com/palette/\", \"themes\": [\"catppuccin-frappe\", \"catppuccin-latte\", \"catppuccin-macchiato\", \"catppuccin-mocha\"] }, \"dracula\": { \"name\": \"Dracula\", \"homepage\": \"https://draculatheme.com/\", \"themes\": [\"dracula\"] }, \"github\": { \"name\": \"GitHub (synced)\", \"homepage\": \"https://primer.style/\", \"themes\": [\"github-dark\", \"github-light\"] }, \"rose-pine\": { \"name\": \"Rosé Pine (synced)\", \"homepage\": \"https://rosepinetheme.com/\", \"themes\": [\"rose-pine-dawn\", \"rose-pine-moon\", \"rose-pine\"] } };\nconst tokensData = {\n themes,\n byVendor\n};\nconst tokens = tokensData;\nconst flavors = Object.values(tokens.themes).map((theme) => ({\n id: theme.id,\n label: theme.label,\n vendor: theme.vendor,\n appearance: theme.appearance,\n ...theme.iconUrl !== void 0 && { iconUrl: theme.iconUrl },\n tokens: theme.tokens\n}));\nconst themesById = /* @__PURE__ */ Object.fromEntries(flavors.map((flavor) => [flavor.id, flavor]));\n/* @__PURE__ */ Object.fromEntries(Object.entries(tokens.byVendor).map(([vendorId, vendor]) => [\n vendorId,\n {\n id: vendorId,\n name: vendor.name,\n homepage: vendor.homepage,\n flavors: vendor.themes.map((themeId) => themesById[themeId]).filter(Boolean)\n }\n]));\n[...new Set(flavors.map((f) => f.vendor))];\nconst VENDOR_FAMILY_MAP = {\n bulma: \"bulma\",\n catppuccin: \"catppuccin\",\n github: \"github\",\n dracula: \"dracula\",\n \"rose-pine\": \"rose-pine\"\n};\nconst DEFAULT_FAMILY = \"bulma\";\nconst VENDOR_ICON_MAP = {\n bulma: \"assets/img/turbo-themes-logo.png\",\n catppuccin: {\n light: \"assets/img/catppuccin-logo-latte.png\",\n dark: \"assets/img/catppuccin-logo-macchiato.png\"\n },\n github: {\n light: \"assets/img/github-logo-light.png\",\n dark: \"assets/img/github-logo-dark.png\"\n },\n dracula: \"assets/img/dracula-logo.png\",\n \"rose-pine\": {\n light: \"assets/img/rose-pine-dawn.png\",\n dark: \"assets/img/rose-pine.png\"\n }\n};\nconst FLAVOR_DESCRIPTIONS = {\n \"bulma-light\": \"Classic Bulma look with a bright, neutral palette.\",\n \"bulma-dark\": \"Dark Bulma theme tuned for low-light reading.\",\n \"catppuccin-latte\": \"Light, soft Catppuccin palette for daytime use.\",\n \"catppuccin-frappe\": \"Balanced dark Catppuccin theme for focused work.\",\n \"catppuccin-macchiato\": \"Deep, atmospheric Catppuccin variant with rich contrast.\",\n \"catppuccin-mocha\": \"Cozy, high-contrast Catppuccin theme for late-night sessions.\",\n dracula: \"Iconic Dracula dark theme with vibrant accents.\",\n \"github-light\": \"GitHub-inspired light theme suited for documentation and UI heavy pages.\",\n \"github-dark\": \"GitHub dark theme optimized for code-heavy views.\",\n \"rose-pine\": \"Elegant dark theme with natural pine and soho vibes.\",\n \"rose-pine-moon\": \"Deeper variant of Rosé Pine with enhanced contrast.\",\n \"rose-pine-dawn\": \"Light Rosé Pine variant for daytime use.\"\n};\nfunction getFamily(vendor) {\n return VENDOR_FAMILY_MAP[vendor] ?? DEFAULT_FAMILY;\n}\nfunction getIconForVendor(vendor, appearance) {\n const iconConfig = VENDOR_ICON_MAP[vendor];\n if (!iconConfig) {\n return void 0;\n }\n if (typeof iconConfig === \"string\") {\n return iconConfig;\n }\n return iconConfig[appearance];\n}\nfunction getDescriptionForFlavor(id, label) {\n return FLAVOR_DESCRIPTIONS[id] ?? `${label} theme`;\n}\nfunction extractPreviewColors(tokens2) {\n return {\n bg: tokens2.background.base,\n surface: tokens2.background.surface,\n accent: tokens2.brand.primary,\n text: tokens2.text.primary\n };\n}\nfunction mapFlavorToUI(flavor) {\n const family = getFamily(flavor.vendor);\n return {\n id: flavor.id,\n name: flavor.label,\n description: getDescriptionForFlavor(flavor.id, flavor.label),\n cssFile: `packages/css/dist/themes/${flavor.id}.css`,\n icon: getIconForVendor(flavor.vendor, flavor.appearance),\n family,\n vendor: flavor.vendor,\n appearance: flavor.appearance,\n colors: extractPreviewColors(flavor.tokens)\n };\n}\nlet mappedThemes = null;\nlet validThemeIds = null;\nfunction getThemes() {\n if (!mappedThemes) {\n mappedThemes = flavors.map(mapFlavorToUI);\n }\n return mappedThemes || [];\n}\nfunction getValidThemeIds() {\n if (!validThemeIds) {\n validThemeIds = new Set(flavors.map((f) => f.id));\n }\n return validThemeIds;\n}\nfunction resolveTheme(themeId) {\n const themes2 = getThemes();\n return themes2.find((t) => t.id === themeId) || themes2.find((t) => t.id === DEFAULT_THEME) || themes2[0];\n}\nasync function applyTheme(doc, themeId) {\n const theme = resolveTheme(themeId);\n if (!theme) {\n logThemeError(ThemeErrors.NO_THEMES_AVAILABLE());\n return;\n }\n const baseUrl = getBaseUrl(doc);\n const trigger = doc.getElementById(DOM_IDS.THEME_FLAVOR_TRIGGER);\n if (trigger) {\n trigger.classList.add(\"is-loading\");\n }\n try {\n applyThemeClass(doc, theme.id);\n await loadThemeCSS(doc, theme, baseUrl);\n const triggerIcon = doc.getElementById(\n DOM_IDS.THEME_FLAVOR_TRIGGER_ICON\n );\n if (triggerIcon && theme.icon) {\n try {\n triggerIcon.src = resolveAssetPath(theme.icon, baseUrl);\n const familyMeta = THEME_FAMILIES[theme.family];\n const familyName = familyMeta?.name ?? theme.family;\n triggerIcon.alt = `${familyName} ${theme.name}`;\n triggerIcon.title = `${familyName} ${theme.name}`;\n } catch {\n logThemeError(ThemeErrors.INVALID_ICON_PATH(theme.id));\n }\n }\n const triggerLabel = doc.getElementById(\n DOM_IDS.THEME_FLAVOR_TRIGGER_LABEL\n );\n if (triggerLabel) {\n triggerLabel.textContent = theme.name;\n }\n doc.querySelectorAll(DOM_SELECTORS.DROPDOWN_ITEMS).forEach((item) => {\n setItemActiveState(item, item.getAttribute(\"data-theme-id\") === theme.id);\n });\n } finally {\n if (trigger) {\n trigger.classList.remove(\"is-loading\");\n }\n }\n}\nfunction getCurrentTheme(doc, defaultTheme) {\n return getCurrentThemeFromClasses(doc.documentElement) || defaultTheme;\n}\nfunction createDropdownStateManager(elements, state) {\n const { trigger, dropdown } = elements;\n const updateAriaExpanded = (expanded) => {\n trigger.setAttribute(\"aria-expanded\", String(expanded));\n };\n const focusMenuItem = (index) => {\n if (index < 0 || index >= state.menuItems.length) return;\n const item = state.menuItems[index];\n setTabindexBatch(state.menuItems, \"-1\");\n item.setAttribute(\"tabindex\", \"0\");\n item.focus();\n state.currentIndex = index;\n };\n const closeDropdown = (options = {}) => {\n const { restoreFocus = true } = options;\n dropdown.classList.remove(\"is-active\");\n updateAriaExpanded(false);\n setTabindexBatch(state.menuItems, \"-1\");\n state.currentIndex = -1;\n if (restoreFocus) {\n trigger.focus();\n }\n };\n const toggleDropdown = (focusFirst = false) => {\n const isActive = dropdown.classList.toggle(\"is-active\");\n updateAriaExpanded(isActive);\n if (!isActive) {\n state.currentIndex = -1;\n setTabindexBatch(state.menuItems, \"-1\");\n for (const menuItem of state.menuItems) {\n const isActiveItem = menuItem.classList.contains(\"is-active\");\n setItemActiveState(menuItem, isActiveItem);\n }\n } else if (focusFirst && state.menuItems.length > 0) {\n focusMenuItem(0);\n }\n };\n return { updateAriaExpanded, focusMenuItem, closeDropdown, toggleDropdown };\n}\nfunction getNextIndex(currentIndex, totalItems) {\n return currentIndex < totalItems - 1 ? currentIndex + 1 : 0;\n}\nfunction getPrevIndex(currentIndex, totalItems) {\n return currentIndex > 0 ? currentIndex - 1 : totalItems - 1;\n}\nfunction handleTriggerKeydown(e, dropdown, state, stateManager) {\n const { focusMenuItem, toggleDropdown, updateAriaExpanded } = stateManager;\n const totalItems = state.menuItems.length;\n switch (e.key) {\n case \"Enter\":\n case \" \":\n e.preventDefault();\n toggleDropdown(!dropdown.classList.contains(\"is-active\"));\n break;\n case \"ArrowDown\":\n e.preventDefault();\n if (!dropdown.classList.contains(\"is-active\")) {\n dropdown.classList.add(\"is-active\");\n updateAriaExpanded(true);\n focusMenuItem(0);\n } else {\n const nextIndex = state.currentIndex < 0 ? 0 : getNextIndex(state.currentIndex, totalItems);\n focusMenuItem(nextIndex);\n }\n break;\n case \"ArrowUp\":\n e.preventDefault();\n if (!dropdown.classList.contains(\"is-active\")) {\n dropdown.classList.add(\"is-active\");\n updateAriaExpanded(true);\n focusMenuItem(totalItems - 1);\n } else {\n const startIndex = state.currentIndex < 0 ? totalItems - 1 : state.currentIndex;\n focusMenuItem(getPrevIndex(startIndex, totalItems));\n }\n break;\n }\n}\nfunction handleMenuItemKeydown(e, index, item, state, stateManager) {\n const { focusMenuItem, closeDropdown } = stateManager;\n const totalItems = state.menuItems.length;\n switch (e.key) {\n case \"ArrowDown\":\n e.preventDefault();\n focusMenuItem(getNextIndex(index, totalItems));\n break;\n case \"ArrowUp\":\n e.preventDefault();\n focusMenuItem(getPrevIndex(index, totalItems));\n break;\n case \"Escape\":\n e.preventDefault();\n closeDropdown();\n break;\n case \"Enter\":\n case \" \":\n e.preventDefault();\n item.click();\n break;\n case \"Home\":\n e.preventDefault();\n focusMenuItem(0);\n break;\n case \"End\":\n e.preventDefault();\n focusMenuItem(totalItems - 1);\n break;\n }\n}\nfunction wireDropdownEventHandlers(documentObj, elements, state, stateManager, abortController) {\n const { trigger, dropdown } = elements;\n const { closeDropdown, toggleDropdown } = stateManager;\n const signal = abortController.signal;\n trigger.addEventListener(\n \"click\",\n (e) => {\n e.preventDefault();\n toggleDropdown();\n },\n { signal }\n );\n documentObj.addEventListener(\n \"click\",\n (e) => {\n if (!dropdown.contains(e.target)) {\n closeDropdown({ restoreFocus: false });\n }\n },\n { signal }\n );\n documentObj.addEventListener(\n \"keydown\",\n (e) => {\n if (e.key === \"Escape\" && dropdown.classList.contains(\"is-active\")) {\n closeDropdown({ restoreFocus: true });\n }\n },\n { signal }\n );\n trigger.addEventListener(\n \"keydown\",\n (e) => handleTriggerKeydown(e, dropdown, state, stateManager),\n { signal }\n );\n for (const [index, item] of state.menuItems.entries()) {\n item.addEventListener(\n \"keydown\",\n (e) => handleMenuItemKeydown(e, index, item, state, stateManager),\n { signal }\n );\n }\n}\nfunction createCheckmarkIcon(doc) {\n const svg = doc.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\n svg.setAttribute(\"width\", \"16\");\n svg.setAttribute(\"height\", \"16\");\n svg.setAttribute(\"viewBox\", \"0 0 24 24\");\n svg.setAttribute(\"fill\", \"none\");\n svg.setAttribute(\"stroke\", \"currentColor\");\n svg.setAttribute(\"stroke-width\", \"3\");\n svg.setAttribute(\"stroke-linecap\", \"round\");\n svg.setAttribute(\"stroke-linejoin\", \"round\");\n const polyline = doc.createElementNS(\"http://www.w3.org/2000/svg\", \"polyline\");\n polyline.setAttribute(\"points\", \"20 6 9 17 4 12\");\n svg.appendChild(polyline);\n return svg;\n}\nfunction createThemeItemElement(ctx, theme, familyMeta) {\n const { documentObj, baseUrl, currentThemeId, selectEl, closeDropdown, onThemeSelect } = ctx;\n const item = documentObj.createElement(\"button\");\n item.type = \"button\";\n item.className = \"dropdown-item theme-item\";\n item.setAttribute(\"data-theme-id\", theme.id);\n item.setAttribute(\"data-appearance\", theme.appearance);\n item.setAttribute(\"role\", \"menuitemradio\");\n item.setAttribute(\n \"aria-label\",\n `${familyMeta.name} ${theme.name} (${theme.appearance}). ${theme.description}`\n );\n item.setAttribute(\"tabindex\", \"-1\");\n const isActive = theme.id === currentThemeId;\n setItemActiveState(item, isActive);\n if (theme.icon) {\n const icon = documentObj.createElement(\"img\");\n icon.className = \"theme-icon\";\n icon.src = baseUrl ? `${baseUrl}/${theme.icon}` : theme.icon;\n icon.alt = `${familyMeta.name} ${theme.name}`;\n icon.width = 24;\n icon.height = 24;\n item.appendChild(icon);\n } else {\n const placeholder = documentObj.createElement(\"span\");\n placeholder.className = \"theme-icon theme-icon-placeholder\";\n placeholder.setAttribute(\"aria-hidden\", \"true\");\n item.appendChild(placeholder);\n }\n const copy = documentObj.createElement(\"div\");\n copy.className = \"theme-copy\";\n const titleEl = documentObj.createElement(\"span\");\n titleEl.className = \"theme-title\";\n titleEl.textContent = `${familyMeta.name} · ${theme.name}`;\n copy.appendChild(titleEl);\n const descriptionEl = documentObj.createElement(\"span\");\n descriptionEl.className = \"theme-description\";\n descriptionEl.textContent = theme.description;\n copy.appendChild(descriptionEl);\n item.appendChild(copy);\n const check = documentObj.createElement(\"span\");\n check.className = \"theme-check\";\n check.appendChild(createCheckmarkIcon(documentObj));\n item.appendChild(check);\n item.addEventListener(\"click\", (e) => {\n e.preventDefault();\n onThemeSelect(theme.id);\n if (selectEl) {\n selectEl.value = theme.id;\n selectEl.dispatchEvent(new Event(\"change\", { bubbles: true }));\n }\n closeDropdown({ restoreFocus: true });\n });\n return item;\n}\nfunction createFamilyGroup(ctx, familyKey, themes2, familyMeta, animationDelay) {\n const { documentObj } = ctx;\n if (themes2.length === 0) return null;\n const items = [];\n const group = documentObj.createElement(\"div\");\n group.className = \"theme-family-group\";\n group.setAttribute(\"role\", \"group\");\n group.setAttribute(\"aria-labelledby\", `theme-family-${familyKey}`);\n if (group.style && typeof group.style.setProperty === \"function\") {\n group.style.setProperty(\"--animation-delay\", `${animationDelay}ms`);\n }\n const header = documentObj.createElement(\"div\");\n header.className = \"theme-family-header\";\n header.id = `theme-family-${familyKey}`;\n const headerTitle = documentObj.createElement(\"span\");\n headerTitle.className = \"theme-family-name\";\n headerTitle.textContent = familyMeta.name;\n header.appendChild(headerTitle);\n group.appendChild(header);\n const themesContainer = documentObj.createElement(\"div\");\n themesContainer.className = \"theme-family-items\";\n themes2.forEach((theme) => {\n const item = createThemeItemElement(ctx, theme, familyMeta);\n items.push(item);\n themesContainer.appendChild(item);\n });\n group.appendChild(themesContainer);\n return { group, items };\n}\nfunction populateDropdownMenu(ctx, dropdownMenu, themes2, themeFamilies) {\n const families = Object.keys(themeFamilies);\n let animationDelay = 0;\n families.forEach((familyKey) => {\n const familyThemes = themes2.filter((t) => t.family === familyKey);\n const familyMeta = themeFamilies[familyKey];\n if (!familyMeta) return;\n const result = createFamilyGroup(ctx, familyKey, familyThemes, familyMeta, animationDelay);\n if (result) {\n ctx.menuItems.push(...result.items);\n dropdownMenu.appendChild(result.group);\n animationDelay += 30;\n }\n });\n}\nfunction wireNativeSelect(ctx, selectEl, themes2, defaultTheme) {\n const { documentObj, onThemeSelect } = ctx;\n while (selectEl.firstChild) {\n selectEl.removeChild(selectEl.firstChild);\n }\n themes2.forEach((theme) => {\n const option = documentObj.createElement(\"option\");\n option.value = theme.id;\n option.textContent = theme.name;\n option.selected = theme.id === ctx.currentThemeId;\n selectEl.appendChild(option);\n });\n selectEl.disabled = false;\n selectEl.addEventListener(\"change\", (event) => {\n const target = event.target;\n const selectedThemeId = target?.value || defaultTheme;\n onThemeSelect(selectedThemeId);\n });\n}\nfunction getDropdownElements(documentObj) {\n const dropdownMenu = documentObj.getElementById(DOM_IDS.THEME_FLAVOR_MENU);\n const trigger = documentObj.getElementById(\n DOM_IDS.THEME_FLAVOR_TRIGGER\n );\n const dropdown = trigger?.closest(DOM_SELECTORS.NAVBAR_DROPDOWN);\n const selectEl = documentObj.getElementById(\n DOM_IDS.THEME_FLAVOR_SELECT\n );\n if (!dropdownMenu || !trigger || !dropdown) {\n return null;\n }\n return { dropdownMenu, trigger, dropdown, selectEl };\n}\nfunction normalizePath(path) {\n return path.replace(/\\/$/, \"\") || \"/\";\n}\nfunction initNavbar(documentObj) {\n const currentPath = documentObj.location.pathname;\n const normalizedCurrentPath = normalizePath(currentPath);\n const navbarItems = documentObj.querySelectorAll(DOM_SELECTORS.NAVBAR_ITEM);\n let matchingItem = null;\n const itemsToDeactivate = [];\n navbarItems.forEach((item) => {\n const link = item;\n if (!link.href) return;\n try {\n const normalizedLinkPath = normalizePath(new URL(link.href).pathname);\n if (normalizedCurrentPath === normalizedLinkPath) {\n matchingItem = item;\n } else {\n itemsToDeactivate.push(item);\n }\n } catch {\n }\n });\n for (const item of itemsToDeactivate) {\n item.classList.remove(\"is-active\");\n item.removeAttribute(\"aria-current\");\n }\n if (matchingItem) {\n matchingItem.classList.add(\"is-active\");\n matchingItem.setAttribute(\"aria-current\", \"page\");\n }\n const reportsLink = documentObj.querySelector(DOM_SELECTORS.NAV_REPORTS);\n if (reportsLink) {\n const reportPaths = [\n \"/coverage\",\n \"/coverage-python\",\n \"/coverage-swift\",\n \"/coverage-ruby\",\n \"/playwright\",\n \"/playwright-examples\",\n \"/lighthouse\"\n ];\n const isOnReportsPage = reportPaths.some(\n (path) => normalizedCurrentPath === path || normalizedCurrentPath.startsWith(path + \"/\")\n );\n if (isOnReportsPage) {\n reportsLink.classList.add(\"is-active\");\n } else {\n reportsLink.classList.remove(\"is-active\");\n }\n }\n}\nif (typeof window !== \"undefined\") {\n window.initNavbar = initNavbar;\n}\nfunction enhanceAccessibility(documentObj) {\n documentObj.querySelectorAll(DOM_SELECTORS.HIGHLIGHT_PRE).forEach((pre) => {\n if (!pre.hasAttribute(\"tabindex\")) pre.setAttribute(\"tabindex\", \"0\");\n if (!pre.hasAttribute(\"role\")) pre.setAttribute(\"role\", \"region\");\n if (!pre.hasAttribute(\"aria-label\")) pre.setAttribute(\"aria-label\", \"Code block\");\n });\n}\nasync function initTheme(documentObj, windowObj) {\n migrateLegacyStorage(windowObj);\n const initialTheme = windowObj.__INITIAL_THEME__;\n const savedTheme = getSavedTheme(windowObj, getValidThemeIds());\n if (initialTheme && initialTheme === savedTheme) {\n const currentTheme = getCurrentThemeFromClasses(documentObj.documentElement);\n if (currentTheme === savedTheme) {\n const themeLinkId = `theme-${savedTheme}-css`;\n const themeLink = documentObj.getElementById(themeLinkId);\n if (!themeLink) {\n await applyTheme(documentObj, savedTheme);\n }\n return;\n }\n }\n await applyTheme(documentObj, savedTheme);\n}\nasync function wireFlavorSelector(documentObj, windowObj) {\n const abortController = new AbortController();\n const elements = getDropdownElements(documentObj);\n if (!elements) {\n return { cleanup: () => abortController.abort() };\n }\n const { dropdownMenu, selectEl } = elements;\n const baseUrl = getBaseUrl(documentObj);\n const themes2 = getThemes();\n const state = {\n currentIndex: -1,\n menuItems: []\n };\n const currentThemeId = getSavedTheme(windowObj, getValidThemeIds()) || getCurrentTheme(documentObj, DEFAULT_THEME);\n const stateManager = createDropdownStateManager(elements, state);\n const ctx = {\n documentObj,\n baseUrl,\n currentThemeId,\n selectEl,\n menuItems: state.menuItems,\n closeDropdown: stateManager.closeDropdown,\n onThemeSelect: async (themeId) => {\n saveTheme(windowObj, themeId, getValidThemeIds());\n await applyTheme(documentObj, themeId);\n }\n };\n if (selectEl) {\n wireNativeSelect(ctx, selectEl, themes2, DEFAULT_THEME);\n }\n populateDropdownMenu(ctx, dropdownMenu, themes2, THEME_FAMILIES);\n wireDropdownEventHandlers(documentObj, elements, state, stateManager, abortController);\n stateManager.updateAriaExpanded(false);\n elements.dropdown.classList.remove(\"is-active\");\n return { cleanup: () => abortController.abort() };\n}\nif (typeof document !== \"undefined\" && typeof window !== \"undefined\") {\n document.addEventListener(\"DOMContentLoaded\", async () => {\n try {\n await initTheme(document, window);\n const { cleanup } = await wireFlavorSelector(document, window);\n enhanceAccessibility(document);\n const pagehideHandler = () => {\n cleanup();\n window.removeEventListener(\"pagehide\", pagehideHandler);\n };\n window.addEventListener(\"pagehide\", pagehideHandler);\n } catch (error) {\n logThemeError(ThemeErrors.INIT_FAILED(error));\n }\n });\n}\nexport {\n enhanceAccessibility,\n initNavbar,\n initTheme,\n wireFlavorSelector\n};\n//# sourceMappingURL=index.js.map\n"],"names":[],"mappings":";;AAAA,QAAM,cAAc;AACpB,QAAM,sBAAsB,CAAC,oBAAoB;AACjD,QAAM,gBAAgB;AACtB,QAAM,UAAU;AAAA,IACd,sBAAsB;AAAA,IACtB,2BAA2B;AAAA,IAC3B,4BAA4B;AAAA,IAC5B,mBAAmB;AAAA,IACnB,qBAAqB;AAAA,EACvB;AACA,QAAM,gBAAgB;AAAA,IACpB,gBAAgB,IAAI,QAAQ,iBAAiB;AAAA,IAC7C,iBAAiB;AAAA,IACjB,aAAa;AAAA,IACb,aAAa;AAAA,IACb,eAAe;AAAA,IACf,iBAAiB;AAAA,EACnB;AACA,QAAM,iBAAiB;AAAA,IACrB,OAAO,EAAE,MAAM,SAAS,aAAa,uBAAsB;AAAA,IAC3D,YAAY,EAAE,MAAM,cAAc,aAAa,yBAAwB;AAAA,IACvE,QAAQ,EAAE,MAAM,UAAU,aAAa,yBAAwB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GGER:"theme-flavor-trigger",THEME_FLAVOR_TRIGGER_ICON:"theme-flavor-trigger-icon",THEME_FLAVOR_MENU:"theme-flavor-menu",THEME_FLAVOR_SELECT:"theme-flavor-select"},E={DROPDOWN_ITEMS:`#${y.THEME_FLAVOR_MENU} .dropdown-item.theme-item`,NAVBAR_DROPDOWN:".navbar-item.has-dropdown",NAV_REPORTS:'[data-testid="nav-reports"]',NAVBAR_ITEM:".navbar-item",HIGHLIGHT_PRE:".highlight > pre",THEME_CSS_LINKS:'link[id^="theme-"][id$="-css"]'},N={bulma:{name:"Bulma",description:"Classic Bulma themes"},catppuccin:{name:"Catppuccin",description:"Soothing pastel themes"},github:{name:"GitHub",description:"GitHub-inspired themes"},dracula:{name:"Dracula",description:"Dark vampire aesthetic"}},Y="[turbo-themes]";var p;(function(e){e.WARN="warn",e.ERROR="error"})(p||(p={}));const g={INVALID_THEME_ID:e=>({code:"INVALID_THEME_ID",message:`Invalid theme ID "${e}" not saved to storage`,level:p.WARN,context:{themeId:e}}),NO_THEMES_AVAILABLE:()=>({code:"NO_THEMES_AVAILABLE",message:"No themes available",level:p.ERROR}),INVALID_ICON_PATH:e=>({code:"INVALID_ICON_PATH",message:`Invalid theme icon path for ${e}`,level:p.WARN,context:{themeId:e}}),INIT_FAILED:e=>({code:"INIT_FAILED",message:"Theme switcher initialization failed",level:p.ERROR,context:{error:e instanceof Error?e.message:String(e)}}),PROTOCOL_REJECTED:()=>({code:"PROTOCOL_REJECTED",message:"Protocol-relative base URL rejected for security",level:p.WARN}),INSECURE_HTTP_REJECTED:()=>({code:"INSECURE_HTTP_REJECTED",message:"Insecure HTTP base URL rejected",level:p.WARN}),CROSS_ORIGIN_REJECTED:e=>({code:"CROSS_ORIGIN_REJECTED",message:`Cross-origin base URL rejected: ${e}`,level:p.WARN,context:{origin:e}}),INVALID_CSS_PATH:e=>({code:"INVALID_CSS_PATH",message:`Invalid theme CSS path for ${e}`,level:p.WARN,context:{themeId:e}}),CSS_LOAD_FAILED:(e,t)=>({code:"CSS_LOAD_FAILED",message:`Theme CSS failed to load for ${e}`,level:p.WARN,context:{themeId:e,error:t instanceof Error?t.message:String(t)}}),STORAGE_UNAVAILABLE:(e,t)=>({code:"STORAGE_UNAVAILABLE",message:`localStorage ${e} failed - storage may be unavailable`,level:p.WARN,context:{operation:e,error:t instanceof Error?t.message:String(t)}})};function u(e){const t=`${Y} ${e.message}`;e.level===p.ERROR?e.context?console.error(t,e.context):console.error(t):e.context?console.warn(t,e.context):console.warn(t)}function w(e,t){try{return e.localStorage.getItem(t)}catch(a){return u(g.STORAGE_UNAVAILABLE("getItem",a)),null}}function M(e,t,a){try{return e.localStorage.setItem(t,a),!0}catch(n){return u(g.STORAGE_UNAVAILABLE("setItem",n)),!1}}function K(e,t){try{e.localStorage.removeItem(t)}catch(a){u(g.STORAGE_UNAVAILABLE("removeItem",a))}}function X(e,t){return e&&t.has(e)?e:v}function Q(e){for(const t of j){const a=w(e,t);a&&!w(e,A)&&(M(e,A,a),K(e,t))}}function D(e,t){const a=w(e,A);return t?X(a,t):a||v}function Z(e,t,a){return a&&!a.has(t)?(u(g.INVALID_THEME_ID(t)),!1):M(e,A,t)}function F(e,t){const a=t.replace(/\/$/,""),n=a?`${window.location.origin}${a}/`:`${window.location.origin}/`;return new URL(e,n).pathname}function H(e){const a=e.documentElement?.getAttribute("data-baseurl")||"";if(!a)return"";if(a.startsWith("//"))return u(g.PROTOCOL_REJECTED()),"";if(a.startsWith("http://")&&!a.startsWith("http://localhost"))return u(g.INSECURE_HTTP_REJECTED()),"";try{const n=typeof window<"u"?window.location.origin:"http://localhost",o=new URL(a,n);return o.origin!==n?(u(g.CROSS_ORIGIN_REJECTED(o.origin)),""):o.pathname.replace(/\/$/,"")}catch{return""}}function k(e){e.onload=null,e.onerror=null}function ee(e,t,a=1e4){return new Promise((n,o)=>{const r=setTimeout(()=>{k(e),o(new Error(`Theme ${t} load timeout`))},a);e.onload=()=>{clearTimeout(r),k(e),n()},e.onerror=()=>{clearTimeout(r),k(e),o(new Error(`Failed to load theme ${t}`))}})}function O(e){const t=Array.from(e.classList);for(const a of t)if(a.startsWith("theme-"))return a.substring(6);return null}function te(e,t){const a=Array.from(e.documentElement.classList).filter(n=>n.startsWith("theme-"));a.length>0&&e.documentElement.classList.remove(...a),e.documentElement.classList.add(`theme-${t}`)}async function ae(e,t,a){const n=`theme-${t.id}-css`;let o=e.getElementById(n);if(!o){o=e.createElement("link"),o.id=n,o.rel="stylesheet",o.type="text/css",o.setAttribute("data-theme-id",t.id);try{o.href=F(t.cssFile,a)}catch{u(g.INVALID_CSS_PATH(t.id));return}e.head.appendChild(o);try{await ee(o,t.id)}catch(r){u(g.CSS_LOAD_FAILED(t.id,r))}}e.querySelectorAll(E.THEME_CSS_LINKS).forEach(r=>{const i=r.id.replace("theme-","").replace("-css","");i!==t.id&&i!=="base"&&r.remove()})}function S(e,t){t?e.classList.add("is-active"):e.classList.remove("is-active"),e.setAttribute("aria-checked",String(t))}function L(e,t){for(const a of e)a.setAttribute("tabindex",t)}const U={themes:JSON.parse('{"bulma-dark":{"id":"bulma-dark","label":"Bulma Dark","vendor":"bulma","appearance":"dark","tokens":{"background":{"base":"#141414","surface":"#1f1f1f","overlay":"#2b2b2b"},"text":{"primary":"#f5f5f5","secondary":"#dbdbdb","inverse":"#141414"},"brand":{"primary":"#00d1b2"},"state":{"info":"#3e8ed0","success":"#48c78e","warning":"#ffe08a","danger":"#f14668"},"border":{"default":"#363636"},"accent":{"link":"#485fc7"},"typography":{"fonts":{"sans":"\\"Nunito Sans\\", BlinkMacSystemFont, -apple-system, \\"Segoe UI\\", Roboto, Oxygen, Ubuntu, Cantarell, \\"Fira Sans\\", \\"Droid Sans\\", \\"Helvetica Neue\\", Helvetica, Arial, sans-serif","mono":"\\"JetBrains Mono\\", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\"Liberation Mono\\", \\"Courier New\\", monospace"},"webFonts":["https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,400;0,6..12,600;0,6..12,700;1,6..12,400&display=swap","https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&display=swap"]},"content":{"heading":{"h1":"#00d1b2","h2":"#7289da","h3":"#5dade2","h4":"#58d68d","h5":"#f7dc6f","h6":"#f1948a"},"body":{"primary":"#dbdbdb","secondary":"#b5b5b5"},"link":{"default":"#485fc7"},"selection":{"fg":"#f5f5f5","bg":"#3273dc"},"blockquote":{"border":"#363636","fg":"#dbdbdb","bg":"#1f1f1f"},"codeInline":{"fg":"#f14668","bg":"#2b2b2b"},"codeBlock":{"fg":"#f5f5f5","bg":"#2b2b2b"},"table":{"border":"#404040","stripe":"#1c1c1c","theadBg":"#2d2d2d","cellBg":"#1a1a1a","headerFg":"#f5f5f5"}},"spacing":{"xs":"0.25rem","sm":"0.5rem","md":"1rem","lg":"1.5rem","xl":"2rem"},"elevation":{"none":"none","sm":"0 1px 2px 0 rgba(0, 0, 0, 0.05)","md":"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)","lg":"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)","xl":"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)"},"animation":{"durationFast":"150ms","durationNormal":"300ms","durationSlow":"500ms","easingDefault":"cubic-bezier(0.4, 0, 0.2, 1)","easingEmphasized":"cubic-bezier(0.05, 0.7, 0.1, 1)"},"opacity":{"disabled":0.5,"hover":0.8,"pressed":0.6},"components":{"card":{"bg":"#1c1c1c","border":"#3a3a3a","headerBg":"#252525","footerBg":"#1f1f1f"},"message":{"bg":"#1f1f1f","headerBg":"#2a2a2a","border":"#404040","bodyFg":"#e0e0e0"},"panel":{"bg":"#1c1c1c","headerBg":"#2a2a2a","headerFg":"#f5f5f5","border":"#3a3a3a","blockBg":"#1f1f1f","blockHoverBg":"#262626","blockActiveBg":"#2d3748"},"box":{"bg":"#1c1c1c","border":"#3a3a3a"},"notification":{"bg":"#252525","border":"#404040"},"modal":{"bg":"rgba(0, 0, 0, 0.86)","cardBg":"#1c1c1c","headerBg":"#252525","footerBg":"#1f1f1f"},"dropdown":{"bg":"#1c1c1c","itemHoverBg":"#2a2a2a","border":"#404040"},"tabs":{"border":"#404040","linkBg":"#252525","linkActiveBg":"#1c1c1c","linkHoverBg":"#2a2a2a"}}}},"bulma-light":{"id":"bulma-light","label":"Bulma Light","vendor":"bulma","appearance":"light","tokens":{"background":{"base":"#ffffff","surface":"#f5f5f5","overlay":"#eeeeee"},"text":{"primary":"#363636","secondary":"#4a4a4a","inverse":"#ffffff"},"brand":{"primary":"#00d1b2"},"state":{"info":"#3e8ed0","success":"#48c78e","warning":"#ffe08a","danger":"#f14668"},"border":{"default":"#dbdbdb"},"accent":{"link":"#485fc7"},"typography":{"fonts":{"sans":"\\"Nunito Sans\\", BlinkMacSystemFont, -apple-system, \\"Segoe UI\\", Roboto, Oxygen, Ubuntu, Cantarell, \\"Fira Sans\\", \\"Droid Sans\\", \\"Helvetica Neue\\", Helvetica, Arial, sans-serif","mono":"\\"JetBrains Mono\\", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\"Liberation Mono\\", \\"Courier New\\", monospace"},"webFonts":["https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,400;0,6..12,600;0,6..12,700;1,6..12,400&display=swap","https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&display=swap"]},"content":{"heading":{"h1":"#00d1b2","h2":"#485fc7","h3":"#3e8ed0","h4":"#48c78e","h5":"#ffe08a","h6":"#f14668"},"body":{"primary":"#4a4a4a","secondary":"#6b6b6b"},"link":{"default":"#485fc7"},"selection":{"fg":"#363636","bg":"#b5d5ff"},"blockquote":{"border":"#dbdbdb","fg":"#4a4a4a","bg":"#f5f5f5"},"codeInline":{"fg":"#f14668","bg":"#f5f5f5"},"codeBlock":{"fg":"#363636","bg":"#f5f5f5"},"table":{"border":"#dbdbdb","stripe":"#fafafa","theadBg":"#f0f0f0","cellBg":"#ffffff","headerFg":"#363636"}},"spacing":{"xs":"0.25rem","sm":"0.5rem","md":"1rem","lg":"1.5rem","xl":"2rem"},"elevation":{"none":"none","sm":"0 1px 2px 0 rgba(0, 0, 0, 0.05)","md":"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)","lg":"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)","xl":"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)"},"animation":{"durationFast":"150ms","durationNormal":"300ms","durationSlow":"500ms","easingDefault":"cubic-bezier(0.4, 0, 0.2, 1)","easingEmphasized":"cubic-bezier(0.05, 0.7, 0.1, 1)"},"opacity":{"disabled":0.5,"hover":0.8,"pressed":0.6},"components":{"card":{"bg":"#ffffff","border":"#d5d5d5","headerBg":"#f5f5f5","footerBg":"#fafafa"},"message":{"bg":"#f8f9fa","headerBg":"#eef1f4","border":"#d5dbe1","bodyFg":"#4a4a4a"},"panel":{"bg":"#ffffff","headerBg":"#f0f0f0","headerFg":"#363636","border":"#d5d5d5","blockBg":"#fafafa","blockHoverBg":"#f5f5f5","blockActiveBg":"#eef6fc"},"box":{"bg":"#ffffff","border":"#e0e0e0"},"notification":{"bg":"#f5f5f5","border":"#e0e0e0"},"modal":{"bg":"rgba(10, 10, 10, 0.86)","cardBg":"#ffffff","headerBg":"#f5f5f5","footerBg":"#fafafa"},"dropdown":{"bg":"#ffffff","itemHoverBg":"#f5f5f5","border":"#dbdbdb"},"tabs":{"border":"#dbdbdb","linkBg":"#f5f5f5","linkActiveBg":"#ffffff","linkHoverBg":"#eeeeee"}}}},"catppuccin-frappe":{"id":"catppuccin-frappe","label":"Catppuccin Frappé","vendor":"catppuccin","appearance":"dark","tokens":{"background":{"base":"#303446","surface":"#292c3c","overlay":"#232634"},"text":{"primary":"#c6d0f5","secondary":"#a5adce","inverse":"#303446"},"brand":{"primary":"#8caaee"},"state":{"info":"#99d1db","success":"#a6d189","warning":"#e5c890","danger":"#e78284"},"border":{"default":"#737994"},"accent":{"link":"#8caaee"},"typography":{"fonts":{"sans":"Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, \\"Apple Color Emoji\\", \\"Segoe UI Emoji\\"","mono":"JetBrains Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\"Liberation Mono\\", \\"Courier New\\", monospace"},"webFonts":["https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap","https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&display=swap"]},"content":{"heading":{"h1":"#a6d189","h2":"#8caaee","h3":"#85c1dc","h4":"#e5c890","h5":"#ca9ee6","h6":"#e78284"},"body":{"primary":"#c6d0f5","secondary":"#a5adce"},"link":{"default":"#8caaee"},"selection":{"fg":"#c6d0f5","bg":"#838ba7"},"blockquote":{"border":"#838ba7","fg":"#c6d0f5","bg":"#292c3c"},"codeInline":{"fg":"#c6d0f5","bg":"#414559"},"codeBlock":{"fg":"#c6d0f5","bg":"#414559"},"table":{"border":"#838ba7","stripe":"#414559","theadBg":"#51576d"}}}},"catppuccin-latte":{"id":"catppuccin-latte","label":"Catppuccin Latte","vendor":"catppuccin","appearance":"light","tokens":{"background":{"base":"#eff1f5","surface":"#e6e9ef","overlay":"#dce0e8"},"text":{"primary":"#4c4f69","secondary":"#6c6f85","inverse":"#eff1f5"},"brand":{"primary":"#1e66f5"},"state":{"info":"#04a5e5","success":"#40a02b","warning":"#df8e1d","danger":"#d20f39"},"border":{"default":"#9ca0b0"},"accent":{"link":"#1e66f5"},"typography":{"fonts":{"sans":"Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, \\"Apple Color Emoji\\", \\"Segoe UI Emoji\\"","mono":"JetBrains Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\"Liberation Mono\\", \\"Courier New\\", monospace"},"webFonts":["https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap","https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&display=swap"]},"content":{"heading":{"h1":"#40a02b","h2":"#1e66f5","h3":"#209fb5","h4":"#df8e1d","h5":"#8839ef","h6":"#d20f39"},"body":{"primary":"#4c4f69","secondary":"#6c6f85"},"link":{"default":"#1e66f5"},"selection":{"fg":"#4c4f69","bg":"#8c8fa1"},"blockquote":{"border":"#8c8fa1","fg":"#4c4f69","bg":"#e6e9ef"},"codeInline":{"fg":"#4c4f69","bg":"#ccd0da"},"codeBlock":{"fg":"#4c4f69","bg":"#ccd0da"},"table":{"border":"#8c8fa1","stripe":"#ccd0da","theadBg":"#bcc0cc"}}}},"catppuccin-macchiato":{"id":"catppuccin-macchiato","label":"Catppuccin Macchiato","vendor":"catppuccin","appearance":"dark","tokens":{"background":{"base":"#24273a","surface":"#1e2030","overlay":"#181926"},"text":{"primary":"#cad3f5","secondary":"#a5adcb","inverse":"#24273a"},"brand":{"primary":"#8aadf4"},"state":{"info":"#91d7e3","success":"#a6da95","warning":"#eed49f","danger":"#ed8796"},"border":{"default":"#6e738d"},"accent":{"link":"#8aadf4"},"typography":{"fonts":{"sans":"Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, \\"Apple Color Emoji\\", \\"Segoe UI Emoji\\"","mono":"JetBrains Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\"Liberation Mono\\", \\"Courier New\\", monospace"},"webFonts":["https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap","https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&display=swap"]},"content":{"heading":{"h1":"#a6da95","h2":"#8aadf4","h3":"#7dc4e4","h4":"#eed49f","h5":"#c6a0f6","h6":"#ed8796"},"body":{"primary":"#cad3f5","secondary":"#a5adcb"},"link":{"default":"#8aadf4"},"selection":{"fg":"#cad3f5","bg":"#8087a2"},"blockquote":{"border":"#8087a2","fg":"#cad3f5","bg":"#1e2030"},"codeInline":{"fg":"#cad3f5","bg":"#363a4f"},"codeBlock":{"fg":"#cad3f5","bg":"#363a4f"},"table":{"border":"#8087a2","stripe":"#363a4f","theadBg":"#494d64"}}}},"catppuccin-mocha":{"id":"catppuccin-mocha","label":"Catppuccin Mocha","vendor":"catppuccin","appearance":"dark","tokens":{"background":{"base":"#1e1e2e","surface":"#181825","overlay":"#11111b"},"text":{"primary":"#cdd6f4","secondary":"#a6adc8","inverse":"#1e1e2e"},"brand":{"primary":"#89b4fa"},"state":{"info":"#89dceb","success":"#a6e3a1","warning":"#f9e2af","danger":"#f38ba8"},"border":{"default":"#6c7086"},"accent":{"link":"#89b4fa"},"typography":{"fonts":{"sans":"Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, \\"Apple Color Emoji\\", \\"Segoe UI Emoji\\"","mono":"JetBrains Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\"Liberation Mono\\", \\"Courier New\\", monospace"},"webFonts":["https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap","https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&display=swap"]},"content":{"heading":{"h1":"#a6e3a1","h2":"#89b4fa","h3":"#74c7ec","h4":"#f9e2af","h5":"#cba6f7","h6":"#f38ba8"},"body":{"primary":"#cdd6f4","secondary":"#a6adc8"},"link":{"default":"#89b4fa"},"selection":{"fg":"#cdd6f4","bg":"#7f849c"},"blockquote":{"border":"#7f849c","fg":"#cdd6f4","bg":"#181825"},"codeInline":{"fg":"#cdd6f4","bg":"#313244"},"codeBlock":{"fg":"#cdd6f4","bg":"#313244"},"table":{"border":"#7f849c","stripe":"#313244","theadBg":"#45475a"}}}},"dracula":{"id":"dracula","label":"Dracula","vendor":"dracula","appearance":"dark","tokens":{"background":{"base":"#282a36","surface":"#21222c","overlay":"#44475a"},"text":{"primary":"#f8f8f2","secondary":"#6272a4","inverse":"#282a36"},"brand":{"primary":"#bd93f9"},"state":{"info":"#8be9fd","success":"#50fa7b","warning":"#f1fa8c","danger":"#ff5555"},"border":{"default":"#44475a"},"accent":{"link":"#8be9fd"},"typography":{"fonts":{"sans":"ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \\"Segoe UI\\", Roboto, \\"Helvetica Neue\\", Arial, sans-serif","mono":"\\"Fira Code\\", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\"Liberation Mono\\", \\"Courier New\\", monospace"},"webFonts":["https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;600&display=swap"]},"content":{"heading":{"h1":"#ff79c6","h2":"#bd93f9","h3":"#8be9fd","h4":"#50fa7b","h5":"#ffb86c","h6":"#f1fa8c"},"body":{"primary":"#f8f8f2","secondary":"#6272a4"},"link":{"default":"#8be9fd"},"selection":{"fg":"#f8f8f2","bg":"#44475a"},"blockquote":{"border":"#bd93f9","fg":"#6272a4","bg":"#21222c"},"codeInline":{"fg":"#50fa7b","bg":"#21222c"},"codeBlock":{"fg":"#f8f8f2","bg":"#21222c"},"table":{"border":"#44475a","stripe":"#21222c","theadBg":"#44475a","cellBg":"#282a36","headerFg":"#f8f8f2"}},"spacing":{"xs":"0.25rem","sm":"0.5rem","md":"1rem","lg":"1.5rem","xl":"2rem"},"elevation":{"none":"none","sm":"0 1px 2px 0 rgba(0, 0, 0, 0.05)","md":"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)","lg":"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)","xl":"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)"},"animation":{"durationFast":"150ms","durationNormal":"300ms","durationSlow":"500ms","easingDefault":"cubic-bezier(0.4, 0, 0.2, 1)","easingEmphasized":"cubic-bezier(0.05, 0.7, 0.1, 1)"},"opacity":{"disabled":0.5,"hover":0.8,"pressed":0.6},"components":{"card":{"bg":"#21222c","border":"#6272a4","headerBg":"#282a36","footerBg":"#21222c"},"message":{"bg":"#282a36","headerBg":"#44475a","border":"#6272a4","bodyFg":"#f8f8f2"},"panel":{"bg":"#21222c","headerBg":"#44475a","headerFg":"#f8f8f2","border":"#6272a4","blockBg":"#282a36","blockHoverBg":"#2e303e","blockActiveBg":"#44475a"},"box":{"bg":"#21222c","border":"#6272a4"},"notification":{"bg":"#282a36","border":"#6272a4"},"modal":{"bg":"rgba(40, 42, 54, 0.9)","cardBg":"#21222c","headerBg":"#282a36","footerBg":"#21222c"},"dropdown":{"bg":"#21222c","itemHoverBg":"#2e303e","border":"#6272a4"},"tabs":{"border":"#6272a4","linkBg":"#2e303e","linkActiveBg":"#21222c","linkHoverBg":"#44475a"}}}},"github-dark":{"id":"github-dark","label":"GitHub Dark","vendor":"github","appearance":"dark","tokens":{"background":{"base":"#0d1117","surface":"#151b23","overlay":"#010409"},"text":{"primary":"#f0f6fc","secondary":"#9198a1","inverse":"#ffffff"},"brand":{"primary":"#1f6feb"},"state":{"info":"#4493f8","success":"#3fb950","warning":"#d29922","danger":"#f85149"},"border":{"default":"#3d444d"},"accent":{"link":"#4493f8"},"typography":{"fonts":{"sans":"\\"Mona Sans\\", -apple-system, BlinkMacSystemFont, \\"Segoe UI\\", \\"Noto Sans\\", Helvetica, Arial, sans-serif, \\"Apple Color Emoji\\", \\"Segoe UI Emoji\\"","mono":"\\"Hubot Sans\\", ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, \\"Liberation Mono\\", monospace"},"webFonts":["https://github.githubassets.com/assets/mona-sans-webfont.woff2","https://github.githubassets.com/assets/hubot-sans-webfont.woff2"]},"content":{"heading":{"h1":"#3fb950","h2":"#4493f8","h3":"#1f6feb","h4":"#d29922","h5":"#3fb950","h6":"#f85149"},"body":{"primary":"#f0f6fc","secondary":"#9198a1"},"link":{"default":"#4493f8"},"selection":{"fg":"#f0f6fc","bg":"#264f78"},"blockquote":{"border":"#3d444d","fg":"#9198a1","bg":"#151b23"},"codeInline":{"fg":"#f0f6fc","bg":"#151b23"},"codeBlock":{"fg":"#f0f6fc","bg":"#151b23"},"table":{"border":"#3d444d","stripe":"#151b23","theadBg":"#151b23"}}}},"github-light":{"id":"github-light","label":"GitHub Light","vendor":"github","appearance":"light","tokens":{"background":{"base":"#ffffff","surface":"#f6f8fa","overlay":"#f6f8fa"},"text":{"primary":"#1f2328","secondary":"#59636e","inverse":"#ffffff"},"brand":{"primary":"#0969da"},"state":{"info":"#0969da","success":"#1a7f37","warning":"#9a6700","danger":"#d1242f"},"border":{"default":"#d1d9e0"},"accent":{"link":"#0969da"},"typography":{"fonts":{"sans":"\\"Mona Sans\\", -apple-system, BlinkMacSystemFont, \\"Segoe UI\\", \\"Noto Sans\\", Helvetica, Arial, sans-serif, \\"Apple Color Emoji\\", \\"Segoe UI Emoji\\"","mono":"\\"Hubot Sans\\", ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, \\"Liberation Mono\\", monospace"},"webFonts":["https://github.githubassets.com/assets/mona-sans-webfont.woff2","https://github.githubassets.com/assets/hubot-sans-webfont.woff2"]},"content":{"heading":{"h1":"#1a7f37","h2":"#0969da","h3":"#0969da","h4":"#9a6700","h5":"#1a7f37","h6":"#d1242f"},"body":{"primary":"#1f2328","secondary":"#59636e"},"link":{"default":"#0969da"},"selection":{"fg":"#1f2328","bg":"#b6e3ff"},"blockquote":{"border":"#d1d9e0","fg":"#59636e","bg":"#f6f8fa"},"codeInline":{"fg":"#1f2328","bg":"#f6f8fa"},"codeBlock":{"fg":"#1f2328","bg":"#f6f8fa"},"table":{"border":"#d1d9e0","stripe":"#f6f8fa","theadBg":"#f6f8fa"}}}}}'),byVendor:{bulma:{name:"Bulma",homepage:"https://bulma.io/",themes:["bulma-dark","bulma-light"]},catppuccin:{name:"Catppuccin (synced)",homepage:"https://catppuccin.com/palette/",themes:["catppuccin-frappe","catppuccin-latte","catppuccin-macchiato","catppuccin-mocha"]},dracula:{name:"Dracula",homepage:"https://draculatheme.com/",themes:["dracula"]},github:{name:"GitHub (synced)",homepage:"https://primer.style/",themes:["github-dark","github-light"]}}},I=Object.values(U.themes).map(e=>({id:e.id,label:e.label,vendor:e.vendor,appearance:e.appearance,...e.iconUrl!==void 0&&{iconUrl:e.iconUrl},tokens:e.tokens})),ne=Object.fromEntries(I.map(e=>[e.id,e]));Object.fromEntries(Object.entries(U.byVendor).map(([e,t])=>[e,{id:e,name:t.name,homepage:t.homepage,flavors:t.themes.map(a=>ne[a]).filter(Boolean)}])),I.map(e=>e.id),[...new Set(I.map(e=>e.vendor))];const oe={bulma:"bulma",catppuccin:"catppuccin",github:"github",dracula:"dracula"},re="bulma",se={bulma:"assets/img/turbo-themes-logo.png",catppuccin:{light:"assets/img/catppuccin-logo-latte.png",dark:"assets/img/catppuccin-logo-macchiato.png"},github:{light:"assets/img/github-logo-light.png",dark:"assets/img/github-logo-dark.png"},dracula:"assets/img/dracula-logo.png"},ce={"bulma-light":"Classic Bulma look with a bright, neutral palette.","bulma-dark":"Dark Bulma theme tuned for low-light reading.","catppuccin-latte":"Light, soft Catppuccin palette for daytime use.","catppuccin-frappe":"Balanced dark Catppuccin theme for focused work.","catppuccin-macchiato":"Deep, atmospheric Catppuccin variant with rich contrast.","catppuccin-mocha":"Cozy, high-contrast Catppuccin theme for late-night sessions.",dracula:"Iconic Dracula dark theme with vibrant accents.","github-light":"GitHub-inspired light theme suited for documentation and UI heavy pages.","github-dark":"GitHub dark theme optimized for code-heavy views."};function ie(e){return oe[e]??re}function le(e,t){const a=se[e];if(a)return typeof a=="string"?a:a[t]}function de(e,t){return ce[e]??`${t} theme`}function fe(e){return{bg:e.background.base,surface:e.background.surface,accent:e.brand.primary,text:e.text.primary}}function pe(e){const t=ie(e.vendor);return{id:e.id,name:e.label,description:de(e.id,e.label),cssFile:`packages/css/dist/themes/${e.id}.css`,icon:le(e.vendor,e.appearance),family:t,vendor:e.vendor,appearance:e.appearance,colors:fe(e.tokens)}}let T=null,C=null;function P(){return T||(T=I.map(pe)),T||[]}function x(){return C||(C=new Set(I.map(e=>e.id))),C}function ge(e){const t=P();return t.find(a=>a.id===e)||t.find(a=>a.id===v)||t[0]}async function R(e,t){const a=ge(t);if(!a){u(g.NO_THEMES_AVAILABLE());return}const n=H(e),o=e.getElementById(y.THEME_FLAVOR_TRIGGER);o&&o.classList.add("is-loading");try{te(e,a.id),await ae(e,a,n);const r=e.getElementById(y.THEME_FLAVOR_TRIGGER_ICON);if(r&&a.icon)try{r.src=F(a.icon,n);const i=N[a.family].name;r.alt=`${i} ${a.name}`,r.title=`${i} ${a.name}`}catch{u(g.INVALID_ICON_PATH(a.id))}e.querySelectorAll(E.DROPDOWN_ITEMS).forEach(i=>{S(i,i.getAttribute("data-theme-id")===a.id)})}finally{o&&o.classList.remove("is-loading")}}function ue(e,t){return O(e.documentElement)||t}function me(e,t){const{trigger:a,dropdown:n}=e,o=l=>{a.setAttribute("aria-expanded",String(l))},r=l=>{if(l<0||l>=t.menuItems.length)return;const c=t.menuItems[l];L(t.menuItems,"-1"),c.setAttribute("tabindex","0"),c.focus(),t.currentIndex=l};return{updateAriaExpanded:o,focusMenuItem:r,closeDropdown:(l={})=>{const{restoreFocus:c=!0}=l;n.classList.remove("is-active"),o(!1),L(t.menuItems,"-1"),t.currentIndex=-1,c&&a.focus()},toggleDropdown:(l=!1)=>{const c=n.classList.toggle("is-active");if(o(c),c)l&&t.menuItems.length>0&&r(0);else{t.currentIndex=-1,L(t.menuItems,"-1");for(const d of t.menuItems){const f=d.classList.contains("is-active");S(d,f)}}}}}function V(e,t){return e<t-1?e+1:0}function $(e,t){return e>0?e-1:t-1}function be(e,t,a,n){const{focusMenuItem:o,toggleDropdown:r,updateAriaExpanded:i}=n,s=a.menuItems.length;switch(e.key){case"Enter":case" ":e.preventDefault(),r(!t.classList.contains("is-active"));break;case"ArrowDown":if(e.preventDefault(),!t.classList.contains("is-active"))t.classList.add("is-active"),i(!0),o(0);else{const l=a.currentIndex<0?0:V(a.currentIndex,s);o(l)}break;case"ArrowUp":if(e.preventDefault(),!t.classList.contains("is-active"))t.classList.add("is-active"),i(!0),o(s-1);else{const l=a.currentIndex<0?s-1:a.currentIndex;o($(l,s))}break}}function he(e,t,a,n,o){const{focusMenuItem:r,closeDropdown:i}=o,s=n.menuItems.length;switch(e.key){case"ArrowDown":e.preventDefault(),r(V(t,s));break;case"ArrowUp":e.preventDefault(),r($(t,s));break;case"Escape":e.preventDefault(),i();break;case"Enter":case" ":e.preventDefault(),a.click();break;case"Home":e.preventDefault(),r(0);break;case"End":e.preventDefault(),r(s-1);break}}function ye(e,t,a,n,o){const{trigger:r,dropdown:i}=t,{closeDropdown:s,toggleDropdown:l}=n,c=o.signal;r.addEventListener("click",d=>{d.preventDefault(),l()},{signal:c}),e.addEventListener("click",d=>{i.contains(d.target)||s({restoreFocus:!1})},{signal:c}),e.addEventListener("keydown",d=>{d.key==="Escape"&&i.classList.contains("is-active")&&s({restoreFocus:!0})},{signal:c}),r.addEventListener("keydown",d=>be(d,i,a,n),{signal:c});for(const[d,f]of a.menuItems.entries())f.addEventListener("keydown",b=>he(b,d,f,a,n),{signal:c})}function Ee(e){const t=e.createElementNS("http://www.w3.org/2000/svg","svg");t.setAttribute("width","16"),t.setAttribute("height","16"),t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","3"),t.setAttribute("stroke-linecap","round"),t.setAttribute("stroke-linejoin","round");const a=e.createElementNS("http://www.w3.org/2000/svg","polyline");return a.setAttribute("points","20 6 9 17 4 12"),t.appendChild(a),t}function ve(e,t,a){const{documentObj:n,baseUrl:o,currentThemeId:r,selectEl:i,closeDropdown:s,onThemeSelect:l}=e,c=n.createElement("button");c.type="button",c.className="dropdown-item theme-item",c.setAttribute("data-theme-id",t.id),c.setAttribute("data-appearance",t.appearance),c.setAttribute("role","menuitemradio"),c.setAttribute("aria-label",`${a.name} ${t.name} (${t.appearance}). ${t.description}`),c.setAttribute("tabindex","-1");const d=t.id===r;if(S(c,d),t.icon){const m=n.createElement("img");m.className="theme-icon",m.src=o?`${o}/${t.icon}`:t.icon,m.alt=`${a.name} ${t.name}`,m.width=24,m.height=24,c.appendChild(m)}else{const m=n.createElement("span");m.className="theme-icon theme-icon-placeholder",m.setAttribute("aria-hidden","true"),c.appendChild(m)}const f=n.createElement("div");f.className="theme-copy";const b=n.createElement("span");b.className="theme-title",b.textContent=`${a.name} · ${t.name}`,f.appendChild(b);const B=n.createElement("span");B.className="theme-description",B.textContent=t.description,f.appendChild(B),c.appendChild(f);const _=n.createElement("span");return _.className="theme-check",_.appendChild(Ee(n)),c.appendChild(_),c.addEventListener("click",m=>{m.preventDefault(),l(t.id),i&&(i.value=t.id,i.dispatchEvent(new Event("change",{bubbles:!0}))),s({restoreFocus:!0})}),c}function Ie(e,t,a,n,o){const{documentObj:r}=e;if(a.length===0)return null;const i=[],s=r.createElement("div");s.className="theme-family-group",s.setAttribute("role","group"),s.setAttribute("aria-labelledby",`theme-family-${t}`),s.style&&typeof s.style.setProperty=="function"&&s.style.setProperty("--animation-delay",`${o}ms`);const l=r.createElement("div");l.className="theme-family-header",l.id=`theme-family-${t}`;const c=r.createElement("span");c.className="theme-family-name",c.textContent=n.name,l.appendChild(c),s.appendChild(l);const d=r.createElement("div");return d.className="theme-family-items",a.forEach(f=>{const b=ve(e,f,n);i.push(b),d.appendChild(b)}),s.appendChild(d),{group:s,items:i}}function Ae(e,t,a,n){const o=Object.keys(n);let r=0;o.forEach(i=>{const s=a.filter(d=>d.family===i),l=n[i];if(!l)return;const c=Ie(e,i,s,l,r);c&&(e.menuItems.push(...c.items),t.appendChild(c.group),r+=30)})}function we(e,t,a,n){const{documentObj:o,onThemeSelect:r}=e;for(;t.firstChild;)t.removeChild(t.firstChild);a.forEach(i=>{const s=o.createElement("option");s.value=i.id,s.textContent=i.name,s.selected=i.id===e.currentThemeId,t.appendChild(s)}),t.disabled=!1,t.addEventListener("change",i=>{const l=i.target?.value||n;r(l)})}function ke(e){const t=e.getElementById(y.THEME_FLAVOR_MENU),a=e.getElementById(y.THEME_FLAVOR_TRIGGER),n=a?.closest(E.NAVBAR_DROPDOWN),o=e.getElementById(y.THEME_FLAVOR_SELECT);return!t||!a||!n?null:{dropdownMenu:t,trigger:a,dropdown:n,selectEl:o}}function G(e){return e.replace(/\/$/,"")||"/"}function J(e){const t=e.location.pathname,a=G(t),n=e.querySelectorAll(E.NAVBAR_ITEM);let o=null;const r=[];n.forEach(s=>{const l=s;if(l.href)try{const c=G(new URL(l.href).pathname);a===c?o=s:r.push(s)}catch{}});for(const s of r)s.classList.remove("is-active"),s.removeAttribute("aria-current");o&&(o.classList.add("is-active"),o.setAttribute("aria-current","page"));const i=e.querySelector(E.NAV_REPORTS);i&&(["/coverage","/coverage-python","/coverage-swift","/coverage-ruby","/playwright","/playwright-examples","/lighthouse"].some(c=>a===c||a.startsWith(c+"/"))?i.classList.add("is-active"):i.classList.remove("is-active"))}typeof window<"u"&&(window.initNavbar=J);function W(e){e.querySelectorAll(E.HIGHLIGHT_PRE).forEach(t=>{t.hasAttribute("tabindex")||t.setAttribute("tabindex","0"),t.hasAttribute("role")||t.setAttribute("role","region"),t.hasAttribute("aria-label")||t.setAttribute("aria-label","Code block")})}async function z(e,t){Q(t);const a=t.__INITIAL_THEME__,n=D(t,x());if(a&&a===n&&O(e.documentElement)===n){const r=`theme-${n}-css`;e.getElementById(r)||await R(e,n);return}await R(e,n)}async function q(e,t){const a=new AbortController,n=ke(e);if(!n)return{cleanup:()=>a.abort()};const{dropdownMenu:o,selectEl:r}=n,i=H(e),s=P(),l={currentIndex:-1,menuItems:[]},c=D(t,x())||ue(e,v),d=me(n,l),f={documentObj:e,baseUrl:i,currentThemeId:c,selectEl:r,menuItems:l.menuItems,closeDropdown:d.closeDropdown,onThemeSelect:async b=>{Z(t,b,x()),await R(e,b)}};return r&&we(f,r,s,v),Ae(f,o,s,N),ye(e,n,l,d,a),d.updateAriaExpanded(!1),n.dropdown.classList.remove("is-active"),{cleanup:()=>a.abort()}}return typeof document<"u"&&typeof window<"u"&&document.addEventListener("DOMContentLoaded",async()=>{try{await z(document,window);const{cleanup:e}=await q(document,window);W(document);const t=()=>{e(),window.removeEventListener("pagehide",t)};window.addEventListener("pagehide",t)}catch(e){u(g.INIT_FAILED(e))}}),h.enhanceAccessibility=W,h.initNavbar=J,h.initTheme=z,h.wireFlavorSelector=q,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"}),h})({});
1
+ var TurboThemeSelector=(function(h){"use strict";const v="turbo-theme",j=["bulma-theme-flavor"],E="catppuccin-mocha",u={THEME_FLAVOR_TRIGGER:"theme-flavor-trigger",THEME_FLAVOR_TRIGGER_ICON:"theme-flavor-trigger-icon",THEME_FLAVOR_TRIGGER_LABEL:"theme-flavor-trigger-label",THEME_FLAVOR_MENU:"theme-flavor-menu",THEME_FLAVOR_SELECT:"theme-flavor-select"},y={DROPDOWN_ITEMS:`#${u.THEME_FLAVOR_MENU} .dropdown-item.theme-item`,NAVBAR_DROPDOWN:".navbar-item.has-dropdown",NAV_REPORTS:'[data-testid="nav-reports"]',NAVBAR_ITEM:".navbar-item",HIGHLIGHT_PRE:".highlight > pre",THEME_CSS_LINKS:'link[id^="theme-"][id$="-css"]'},_={bulma:{name:"Bulma",description:"Classic Bulma themes"},catppuccin:{name:"Catppuccin",description:"Soothing pastel themes"},github:{name:"GitHub",description:"GitHub-inspired themes"},dracula:{name:"Dracula",description:"Dark vampire aesthetic"},"rose-pine":{name:"Rosé Pine",description:"All natural pine, faux fur and a bit of soho vibes"}},W="[turbo-themes]",p={INVALID_THEME_ID:e=>({code:"INVALID_THEME_ID",message:`Invalid theme ID "${e}" not saved to storage`,level:"warn",context:{themeId:e}}),NO_THEMES_AVAILABLE:()=>({code:"NO_THEMES_AVAILABLE",message:"No themes available",level:"error"}),INVALID_ICON_PATH:e=>({code:"INVALID_ICON_PATH",message:`Invalid theme icon path for ${e}`,level:"warn",context:{themeId:e}}),INIT_FAILED:e=>({code:"INIT_FAILED",message:"Theme switcher initialization failed",level:"error",context:{error:e instanceof Error?e.message:String(e)}}),PROTOCOL_REJECTED:()=>({code:"PROTOCOL_REJECTED",message:"Protocol-relative base URL rejected for security",level:"warn"}),INSECURE_HTTP_REJECTED:()=>({code:"INSECURE_HTTP_REJECTED",message:"Insecure HTTP base URL rejected",level:"warn"}),CROSS_ORIGIN_REJECTED:e=>({code:"CROSS_ORIGIN_REJECTED",message:`Cross-origin base URL rejected: ${e}`,level:"warn",context:{origin:e}}),INVALID_CSS_PATH:e=>({code:"INVALID_CSS_PATH",message:`Invalid theme CSS path for ${e}`,level:"warn",context:{themeId:e}}),CSS_LOAD_FAILED:(e,a)=>({code:"CSS_LOAD_FAILED",message:`Theme CSS failed to load for ${e}`,level:"warn",context:{themeId:e,error:a instanceof Error?a.message:String(a)}}),STORAGE_UNAVAILABLE:(e,a)=>({code:"STORAGE_UNAVAILABLE",message:`localStorage ${e} failed - storage may be unavailable`,level:"warn",context:{operation:e,error:a instanceof Error?a.message:String(a)}})};function g(e){const a=`${W} ${e.message}`;e.level==="error"?e.context?console.error(a,e.context):console.error(a):e.context?console.warn(a,e.context):console.warn(a)}function I(e,a){try{return e.localStorage.getItem(a)}catch(t){return g(p.STORAGE_UNAVAILABLE("getItem",t)),null}}function R(e,a,t){try{return e.localStorage.setItem(a,t),!0}catch(o){return g(p.STORAGE_UNAVAILABLE("setItem",o)),!1}}function Y(e,a){try{e.localStorage.removeItem(a)}catch(t){g(p.STORAGE_UNAVAILABLE("removeItem",t))}}function K(e,a){return e&&a.has(e)?e:E}function X(e){for(const a of j){const t=I(e,a);t&&!I(e,v)&&(R(e,v,t),Y(e,a))}}function D(e,a){const t=I(e,v);return a?K(t,a):t||E}function Q(e,a,t){return t&&!t.has(a)?(g(p.INVALID_THEME_ID(a)),!1):R(e,v,a)}function N(e,a){const t=a.replace(/\/$/,""),o=t?`${window.location.origin}${t}/`:`${window.location.origin}/`;return new URL(e,o).pathname}function F(e){const t=e.documentElement?.getAttribute("data-baseurl")||"";if(!t)return"";if(t.startsWith("//"))return g(p.PROTOCOL_REJECTED()),"";if(t.startsWith("http://")&&!t.startsWith("http://localhost"))return g(p.INSECURE_HTTP_REJECTED()),"";try{const o=typeof window<"u"?window.location.origin:"http://localhost",n=new URL(t,o);return n.origin!==o?(g(p.CROSS_ORIGIN_REJECTED(n.origin)),""):n.pathname.replace(/\/$/,"")}catch{return""}}function A(e){e.onload=null,e.onerror=null}function Z(e,a,t=1e4){return new Promise((o,n)=>{const s=setTimeout(()=>{A(e),n(new Error(`Theme ${a} load timeout`))},t);e.onload=()=>{clearTimeout(s),A(e),o()},e.onerror=()=>{clearTimeout(s),A(e),n(new Error(`Failed to load theme ${a}`))}})}function H(e){const a=Array.from(e.classList);for(const t of a)if(t.startsWith("theme-"))return t.substring(6);return null}function ee(e,a){const t=Array.from(e.documentElement.classList).filter(o=>o.startsWith("theme-"));t.length>0&&e.documentElement.classList.remove(...t),e.documentElement.classList.add(`theme-${a}`)}async function ae(e,a,t){const o=`theme-${a.id}-css`;let n=e.getElementById(o);if(!n){n=e.createElement("link"),n.id=o,n.rel="stylesheet",n.type="text/css",n.setAttribute("data-theme-id",a.id);try{n.href=N(a.cssFile,t)}catch{g(p.INVALID_CSS_PATH(a.id));return}e.head.appendChild(n);try{await Z(n,a.id)}catch(s){g(p.CSS_LOAD_FAILED(a.id,s))}}e.querySelectorAll(y.THEME_CSS_LINKS).forEach(s=>{const c=s.id.replace("theme-","").replace("-css","");c!==a.id&&c!=="base"&&s.remove()})}function k(e,a){a?e.classList.add("is-active"):e.classList.remove("is-active"),e.setAttribute("aria-checked",String(a))}function S(e,a){for(const t of e)t.setAttribute("tabindex",a)}const O={themes:JSON.parse('{"bulma-dark":{"id":"bulma-dark","label":"Bulma Dark","vendor":"bulma","appearance":"dark","tokens":{"background":{"base":"#141414","surface":"#1f1f1f","overlay":"#2b2b2b"},"text":{"primary":"#f5f5f5","secondary":"#dbdbdb","inverse":"#141414"},"brand":{"primary":"#00d1b2"},"state":{"info":"#3e8ed0","success":"#48c78e","warning":"#ffe08a","danger":"#f14668"},"border":{"default":"#363636"},"accent":{"link":"#485fc7"},"typography":{"fonts":{"sans":"\\"Nunito Sans\\", BlinkMacSystemFont, -apple-system, \\"Segoe UI\\", Roboto, Oxygen, Ubuntu, Cantarell, \\"Fira Sans\\", \\"Droid Sans\\", \\"Helvetica Neue\\", Helvetica, Arial, sans-serif","mono":"\\"JetBrains Mono\\", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\"Liberation Mono\\", \\"Courier New\\", monospace"},"webFonts":["https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,400;0,6..12,600;0,6..12,700;1,6..12,400&display=swap","https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&display=swap"]},"content":{"heading":{"h1":"#00d1b2","h2":"#7289da","h3":"#5dade2","h4":"#58d68d","h5":"#f7dc6f","h6":"#f1948a"},"body":{"primary":"#dbdbdb","secondary":"#b5b5b5"},"link":{"default":"#485fc7"},"selection":{"fg":"#f5f5f5","bg":"#3273dc"},"blockquote":{"border":"#363636","fg":"#dbdbdb","bg":"#1f1f1f"},"codeInline":{"fg":"#f14668","bg":"#2b2b2b"},"codeBlock":{"fg":"#f5f5f5","bg":"#2b2b2b"},"table":{"border":"#404040","stripe":"#1c1c1c","theadBg":"#2d2d2d","cellBg":"#1a1a1a","headerFg":"#f5f5f5"}},"spacing":{"xs":"0.25rem","sm":"0.5rem","md":"1rem","lg":"1.5rem","xl":"2rem"},"elevation":{"none":"none","sm":"0 1px 2px 0 rgba(0, 0, 0, 0.05)","md":"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)","lg":"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)","xl":"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)"},"animation":{"durationFast":"150ms","durationNormal":"300ms","durationSlow":"500ms","easingDefault":"cubic-bezier(0.4, 0, 0.2, 1)","easingEmphasized":"cubic-bezier(0.05, 0.7, 0.1, 1)"},"opacity":{"disabled":0.5,"hover":0.8,"pressed":0.6},"components":{"card":{"bg":"#1c1c1c","border":"#3a3a3a","headerBg":"#252525","footerBg":"#1f1f1f"},"message":{"bg":"#1f1f1f","headerBg":"#2a2a2a","border":"#404040","bodyFg":"#e0e0e0"},"panel":{"bg":"#1c1c1c","headerBg":"#2a2a2a","headerFg":"#f5f5f5","border":"#3a3a3a","blockBg":"#1f1f1f","blockHoverBg":"#262626","blockActiveBg":"#2d3748"},"box":{"bg":"#1c1c1c","border":"#3a3a3a"},"notification":{"bg":"#252525","border":"#404040"},"modal":{"bg":"rgba(0, 0, 0, 0.86)","cardBg":"#1c1c1c","headerBg":"#252525","footerBg":"#1f1f1f"},"dropdown":{"bg":"#1c1c1c","itemHoverBg":"#2a2a2a","border":"#404040"},"tabs":{"border":"#404040","linkBg":"#252525","linkActiveBg":"#1c1c1c","linkHoverBg":"#2a2a2a"}}}},"bulma-light":{"id":"bulma-light","label":"Bulma Light","vendor":"bulma","appearance":"light","tokens":{"background":{"base":"#ffffff","surface":"#f5f5f5","overlay":"#eeeeee"},"text":{"primary":"#363636","secondary":"#4a4a4a","inverse":"#ffffff"},"brand":{"primary":"#00d1b2"},"state":{"info":"#3e8ed0","success":"#48c78e","warning":"#ffe08a","danger":"#f14668"},"border":{"default":"#dbdbdb"},"accent":{"link":"#485fc7"},"typography":{"fonts":{"sans":"\\"Nunito Sans\\", BlinkMacSystemFont, -apple-system, \\"Segoe UI\\", Roboto, Oxygen, Ubuntu, Cantarell, \\"Fira Sans\\", \\"Droid Sans\\", \\"Helvetica Neue\\", Helvetica, Arial, sans-serif","mono":"\\"JetBrains Mono\\", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\"Liberation Mono\\", \\"Courier New\\", monospace"},"webFonts":["https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,400;0,6..12,600;0,6..12,700;1,6..12,400&display=swap","https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&display=swap"]},"content":{"heading":{"h1":"#00d1b2","h2":"#485fc7","h3":"#3e8ed0","h4":"#48c78e","h5":"#ffe08a","h6":"#f14668"},"body":{"primary":"#4a4a4a","secondary":"#6b6b6b"},"link":{"default":"#485fc7"},"selection":{"fg":"#363636","bg":"#b5d5ff"},"blockquote":{"border":"#dbdbdb","fg":"#4a4a4a","bg":"#f5f5f5"},"codeInline":{"fg":"#f14668","bg":"#f5f5f5"},"codeBlock":{"fg":"#363636","bg":"#f5f5f5"},"table":{"border":"#dbdbdb","stripe":"#fafafa","theadBg":"#f0f0f0","cellBg":"#ffffff","headerFg":"#363636"}},"spacing":{"xs":"0.25rem","sm":"0.5rem","md":"1rem","lg":"1.5rem","xl":"2rem"},"elevation":{"none":"none","sm":"0 1px 2px 0 rgba(0, 0, 0, 0.05)","md":"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)","lg":"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)","xl":"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)"},"animation":{"durationFast":"150ms","durationNormal":"300ms","durationSlow":"500ms","easingDefault":"cubic-bezier(0.4, 0, 0.2, 1)","easingEmphasized":"cubic-bezier(0.05, 0.7, 0.1, 1)"},"opacity":{"disabled":0.5,"hover":0.8,"pressed":0.6},"components":{"card":{"bg":"#ffffff","border":"#d5d5d5","headerBg":"#f5f5f5","footerBg":"#fafafa"},"message":{"bg":"#f8f9fa","headerBg":"#eef1f4","border":"#d5dbe1","bodyFg":"#4a4a4a"},"panel":{"bg":"#ffffff","headerBg":"#f0f0f0","headerFg":"#363636","border":"#d5d5d5","blockBg":"#fafafa","blockHoverBg":"#f5f5f5","blockActiveBg":"#eef6fc"},"box":{"bg":"#ffffff","border":"#e0e0e0"},"notification":{"bg":"#f5f5f5","border":"#e0e0e0"},"modal":{"bg":"rgba(10, 10, 10, 0.86)","cardBg":"#ffffff","headerBg":"#f5f5f5","footerBg":"#fafafa"},"dropdown":{"bg":"#ffffff","itemHoverBg":"#f5f5f5","border":"#dbdbdb"},"tabs":{"border":"#dbdbdb","linkBg":"#f5f5f5","linkActiveBg":"#ffffff","linkHoverBg":"#eeeeee"}}}},"catppuccin-frappe":{"id":"catppuccin-frappe","label":"Catppuccin Frappé","vendor":"catppuccin","appearance":"dark","tokens":{"background":{"base":"#303446","surface":"#292c3c","overlay":"#232634"},"text":{"primary":"#c6d0f5","secondary":"#a5adce","inverse":"#303446"},"brand":{"primary":"#8caaee"},"state":{"info":"#99d1db","success":"#a6d189","warning":"#e5c890","danger":"#e78284"},"border":{"default":"#737994"},"accent":{"link":"#8caaee"},"typography":{"fonts":{"sans":"Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, \\"Apple Color Emoji\\", \\"Segoe UI Emoji\\"","mono":"JetBrains Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\"Liberation Mono\\", \\"Courier New\\", monospace"},"webFonts":["https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap","https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&display=swap"]},"content":{"heading":{"h1":"#a6d189","h2":"#8caaee","h3":"#85c1dc","h4":"#e5c890","h5":"#ca9ee6","h6":"#e78284"},"body":{"primary":"#c6d0f5","secondary":"#a5adce"},"link":{"default":"#8caaee"},"selection":{"fg":"#c6d0f5","bg":"#838ba7"},"blockquote":{"border":"#838ba7","fg":"#c6d0f5","bg":"#292c3c"},"codeInline":{"fg":"#c6d0f5","bg":"#414559"},"codeBlock":{"fg":"#c6d0f5","bg":"#414559"},"table":{"border":"#838ba7","stripe":"#414559","theadBg":"#51576d"}}}},"catppuccin-latte":{"id":"catppuccin-latte","label":"Catppuccin Latte","vendor":"catppuccin","appearance":"light","tokens":{"background":{"base":"#eff1f5","surface":"#e6e9ef","overlay":"#dce0e8"},"text":{"primary":"#4c4f69","secondary":"#6c6f85","inverse":"#eff1f5"},"brand":{"primary":"#1e66f5"},"state":{"info":"#04a5e5","success":"#40a02b","warning":"#df8e1d","danger":"#d20f39"},"border":{"default":"#9ca0b0"},"accent":{"link":"#1e66f5"},"typography":{"fonts":{"sans":"Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, \\"Apple Color Emoji\\", \\"Segoe UI Emoji\\"","mono":"JetBrains Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\"Liberation Mono\\", \\"Courier New\\", monospace"},"webFonts":["https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap","https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&display=swap"]},"content":{"heading":{"h1":"#40a02b","h2":"#1e66f5","h3":"#209fb5","h4":"#df8e1d","h5":"#8839ef","h6":"#d20f39"},"body":{"primary":"#4c4f69","secondary":"#6c6f85"},"link":{"default":"#1e66f5"},"selection":{"fg":"#4c4f69","bg":"#8c8fa1"},"blockquote":{"border":"#8c8fa1","fg":"#4c4f69","bg":"#e6e9ef"},"codeInline":{"fg":"#4c4f69","bg":"#ccd0da"},"codeBlock":{"fg":"#4c4f69","bg":"#ccd0da"},"table":{"border":"#8c8fa1","stripe":"#ccd0da","theadBg":"#bcc0cc"}}}},"catppuccin-macchiato":{"id":"catppuccin-macchiato","label":"Catppuccin Macchiato","vendor":"catppuccin","appearance":"dark","tokens":{"background":{"base":"#24273a","surface":"#1e2030","overlay":"#181926"},"text":{"primary":"#cad3f5","secondary":"#a5adcb","inverse":"#24273a"},"brand":{"primary":"#8aadf4"},"state":{"info":"#91d7e3","success":"#a6da95","warning":"#eed49f","danger":"#ed8796"},"border":{"default":"#6e738d"},"accent":{"link":"#8aadf4"},"typography":{"fonts":{"sans":"Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, \\"Apple Color Emoji\\", \\"Segoe UI Emoji\\"","mono":"JetBrains Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\"Liberation Mono\\", \\"Courier New\\", monospace"},"webFonts":["https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap","https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&display=swap"]},"content":{"heading":{"h1":"#a6da95","h2":"#8aadf4","h3":"#7dc4e4","h4":"#eed49f","h5":"#c6a0f6","h6":"#ed8796"},"body":{"primary":"#cad3f5","secondary":"#a5adcb"},"link":{"default":"#8aadf4"},"selection":{"fg":"#cad3f5","bg":"#8087a2"},"blockquote":{"border":"#8087a2","fg":"#cad3f5","bg":"#1e2030"},"codeInline":{"fg":"#cad3f5","bg":"#363a4f"},"codeBlock":{"fg":"#cad3f5","bg":"#363a4f"},"table":{"border":"#8087a2","stripe":"#363a4f","theadBg":"#494d64"}}}},"catppuccin-mocha":{"id":"catppuccin-mocha","label":"Catppuccin Mocha","vendor":"catppuccin","appearance":"dark","tokens":{"background":{"base":"#1e1e2e","surface":"#181825","overlay":"#11111b"},"text":{"primary":"#cdd6f4","secondary":"#a6adc8","inverse":"#1e1e2e"},"brand":{"primary":"#89b4fa"},"state":{"info":"#89dceb","success":"#a6e3a1","warning":"#f9e2af","danger":"#f38ba8"},"border":{"default":"#6c7086"},"accent":{"link":"#89b4fa"},"typography":{"fonts":{"sans":"Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, \\"Apple Color Emoji\\", \\"Segoe UI Emoji\\"","mono":"JetBrains Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\"Liberation Mono\\", \\"Courier New\\", monospace"},"webFonts":["https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap","https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&display=swap"]},"content":{"heading":{"h1":"#a6e3a1","h2":"#89b4fa","h3":"#74c7ec","h4":"#f9e2af","h5":"#cba6f7","h6":"#f38ba8"},"body":{"primary":"#cdd6f4","secondary":"#a6adc8"},"link":{"default":"#89b4fa"},"selection":{"fg":"#cdd6f4","bg":"#7f849c"},"blockquote":{"border":"#7f849c","fg":"#cdd6f4","bg":"#181825"},"codeInline":{"fg":"#cdd6f4","bg":"#313244"},"codeBlock":{"fg":"#cdd6f4","bg":"#313244"},"table":{"border":"#7f849c","stripe":"#313244","theadBg":"#45475a"}}}},"dracula":{"id":"dracula","label":"Dracula","vendor":"dracula","appearance":"dark","tokens":{"background":{"base":"#282a36","surface":"#21222c","overlay":"#44475a"},"text":{"primary":"#f8f8f2","secondary":"#6272a4","inverse":"#282a36"},"brand":{"primary":"#bd93f9"},"state":{"info":"#8be9fd","success":"#50fa7b","warning":"#f1fa8c","danger":"#ff5555"},"border":{"default":"#44475a"},"accent":{"link":"#8be9fd"},"typography":{"fonts":{"sans":"ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \\"Segoe UI\\", Roboto, \\"Helvetica Neue\\", Arial, sans-serif","mono":"\\"Fira Code\\", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\"Liberation Mono\\", \\"Courier New\\", monospace"},"webFonts":["https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;600&display=swap"]},"content":{"heading":{"h1":"#ff79c6","h2":"#bd93f9","h3":"#8be9fd","h4":"#50fa7b","h5":"#ffb86c","h6":"#f1fa8c"},"body":{"primary":"#f8f8f2","secondary":"#6272a4"},"link":{"default":"#8be9fd"},"selection":{"fg":"#f8f8f2","bg":"#44475a"},"blockquote":{"border":"#bd93f9","fg":"#6272a4","bg":"#21222c"},"codeInline":{"fg":"#50fa7b","bg":"#21222c"},"codeBlock":{"fg":"#f8f8f2","bg":"#21222c"},"table":{"border":"#44475a","stripe":"#21222c","theadBg":"#44475a","cellBg":"#282a36","headerFg":"#f8f8f2"}},"spacing":{"xs":"0.25rem","sm":"0.5rem","md":"1rem","lg":"1.5rem","xl":"2rem"},"elevation":{"none":"none","sm":"0 1px 2px 0 rgba(0, 0, 0, 0.05)","md":"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)","lg":"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)","xl":"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)"},"animation":{"durationFast":"150ms","durationNormal":"300ms","durationSlow":"500ms","easingDefault":"cubic-bezier(0.4, 0, 0.2, 1)","easingEmphasized":"cubic-bezier(0.05, 0.7, 0.1, 1)"},"opacity":{"disabled":0.5,"hover":0.8,"pressed":0.6},"components":{"card":{"bg":"#21222c","border":"#6272a4","headerBg":"#282a36","footerBg":"#21222c"},"message":{"bg":"#282a36","headerBg":"#44475a","border":"#6272a4","bodyFg":"#f8f8f2"},"panel":{"bg":"#21222c","headerBg":"#44475a","headerFg":"#f8f8f2","border":"#6272a4","blockBg":"#282a36","blockHoverBg":"#2e303e","blockActiveBg":"#44475a"},"box":{"bg":"#21222c","border":"#6272a4"},"notification":{"bg":"#282a36","border":"#6272a4"},"modal":{"bg":"rgba(40, 42, 54, 0.9)","cardBg":"#21222c","headerBg":"#282a36","footerBg":"#21222c"},"dropdown":{"bg":"#21222c","itemHoverBg":"#2e303e","border":"#6272a4"},"tabs":{"border":"#6272a4","linkBg":"#2e303e","linkActiveBg":"#21222c","linkHoverBg":"#44475a"}}}},"github-dark":{"id":"github-dark","label":"GitHub Dark","vendor":"github","appearance":"dark","tokens":{"background":{"base":"#0d1117","surface":"#151b23","overlay":"#010409"},"text":{"primary":"#f0f6fc","secondary":"#9198a1","inverse":"#ffffff"},"brand":{"primary":"#1f6feb"},"state":{"info":"#4493f8","success":"#3fb950","warning":"#d29922","danger":"#f85149"},"border":{"default":"#3d444d"},"accent":{"link":"#4493f8"},"typography":{"fonts":{"sans":"\\"Mona Sans\\", -apple-system, BlinkMacSystemFont, \\"Segoe UI\\", \\"Noto Sans\\", Helvetica, Arial, sans-serif, \\"Apple Color Emoji\\", \\"Segoe UI Emoji\\"","mono":"\\"Hubot Sans\\", ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, \\"Liberation Mono\\", monospace"},"webFonts":["https://github.githubassets.com/assets/mona-sans-webfont.woff2","https://github.githubassets.com/assets/hubot-sans-webfont.woff2"]},"content":{"heading":{"h1":"#3fb950","h2":"#4493f8","h3":"#1f6feb","h4":"#d29922","h5":"#3fb950","h6":"#f85149"},"body":{"primary":"#f0f6fc","secondary":"#9198a1"},"link":{"default":"#4493f8"},"selection":{"fg":"#f0f6fc","bg":"#264f78"},"blockquote":{"border":"#3d444d","fg":"#9198a1","bg":"#151b23"},"codeInline":{"fg":"#f0f6fc","bg":"#151b23"},"codeBlock":{"fg":"#f0f6fc","bg":"#151b23"},"table":{"border":"#3d444d","stripe":"#151b23","theadBg":"#151b23"}}}},"github-light":{"id":"github-light","label":"GitHub Light","vendor":"github","appearance":"light","tokens":{"background":{"base":"#ffffff","surface":"#f6f8fa","overlay":"#f6f8fa"},"text":{"primary":"#1f2328","secondary":"#59636e","inverse":"#ffffff"},"brand":{"primary":"#0969da"},"state":{"info":"#0969da","success":"#1a7f37","warning":"#9a6700","danger":"#d1242f"},"border":{"default":"#d1d9e0"},"accent":{"link":"#0969da"},"typography":{"fonts":{"sans":"\\"Mona Sans\\", -apple-system, BlinkMacSystemFont, \\"Segoe UI\\", \\"Noto Sans\\", Helvetica, Arial, sans-serif, \\"Apple Color Emoji\\", \\"Segoe UI Emoji\\"","mono":"\\"Hubot Sans\\", ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, \\"Liberation Mono\\", monospace"},"webFonts":["https://github.githubassets.com/assets/mona-sans-webfont.woff2","https://github.githubassets.com/assets/hubot-sans-webfont.woff2"]},"content":{"heading":{"h1":"#1a7f37","h2":"#0969da","h3":"#0969da","h4":"#9a6700","h5":"#1a7f37","h6":"#d1242f"},"body":{"primary":"#1f2328","secondary":"#59636e"},"link":{"default":"#0969da"},"selection":{"fg":"#1f2328","bg":"#b6e3ff"},"blockquote":{"border":"#d1d9e0","fg":"#59636e","bg":"#f6f8fa"},"codeInline":{"fg":"#1f2328","bg":"#f6f8fa"},"codeBlock":{"fg":"#1f2328","bg":"#f6f8fa"},"table":{"border":"#d1d9e0","stripe":"#f6f8fa","theadBg":"#f6f8fa"}}}},"rose-pine-dawn":{"id":"rose-pine-dawn","label":"Rosé Pine Dawn","vendor":"rose-pine","appearance":"light","iconUrl":"/assets/img/rose-pine-dawn.png","tokens":{"background":{"base":"#faf4ed","surface":"#fffaf3","overlay":"#f2e9e1"},"text":{"primary":"#575279","secondary":"#797593","inverse":"#faf4ed"},"brand":{"primary":"#907aa9"},"state":{"info":"#56949f","success":"#286983","warning":"#ea9d34","danger":"#b4637a"},"border":{"default":"#dfdad9"},"accent":{"link":"#907aa9"},"typography":{"fonts":{"sans":"Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, \\"Apple Color Emoji\\", \\"Segoe UI Emoji\\"","mono":"JetBrains Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\"Liberation Mono\\", \\"Courier New\\", monospace"},"webFonts":["https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap","https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&display=swap"]},"content":{"heading":{"h1":"#286983","h2":"#907aa9","h3":"#56949f","h4":"#ea9d34","h5":"#d7827e","h6":"#b4637a"},"body":{"primary":"#575279","secondary":"#797593"},"link":{"default":"#907aa9"},"selection":{"fg":"#575279","bg":"#cecacd"},"blockquote":{"border":"#cecacd","fg":"#575279","bg":"#fffaf3"},"codeInline":{"fg":"#575279","bg":"#f2e9e1"},"codeBlock":{"fg":"#575279","bg":"#f2e9e1"},"table":{"border":"#cecacd","stripe":"#f2e9e1","theadBg":"#dfdad9"}}}},"rose-pine-moon":{"id":"rose-pine-moon","label":"Rosé Pine Moon","vendor":"rose-pine","appearance":"dark","iconUrl":"/assets/img/rose-pine-moon.png","tokens":{"background":{"base":"#232136","surface":"#2a273f","overlay":"#393552"},"text":{"primary":"#e0def4","secondary":"#908caa","inverse":"#232136"},"brand":{"primary":"#c4a7e7"},"state":{"info":"#9ccfd8","success":"#3e8fb0","warning":"#f6c177","danger":"#eb6f92"},"border":{"default":"#44415a"},"accent":{"link":"#c4a7e7"},"typography":{"fonts":{"sans":"Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, \\"Apple Color Emoji\\", \\"Segoe UI Emoji\\"","mono":"JetBrains Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\"Liberation Mono\\", \\"Courier New\\", monospace"},"webFonts":["https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap","https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&display=swap"]},"content":{"heading":{"h1":"#3e8fb0","h2":"#c4a7e7","h3":"#9ccfd8","h4":"#f6c177","h5":"#ea9a97","h6":"#eb6f92"},"body":{"primary":"#e0def4","secondary":"#908caa"},"link":{"default":"#c4a7e7"},"selection":{"fg":"#e0def4","bg":"#56526e"},"blockquote":{"border":"#56526e","fg":"#e0def4","bg":"#2a273f"},"codeInline":{"fg":"#e0def4","bg":"#393552"},"codeBlock":{"fg":"#e0def4","bg":"#393552"},"table":{"border":"#56526e","stripe":"#393552","theadBg":"#44415a"}}}},"rose-pine":{"id":"rose-pine","label":"Rosé Pine","vendor":"rose-pine","appearance":"dark","iconUrl":"/assets/img/rose-pine.png","tokens":{"background":{"base":"#191724","surface":"#1f1d2e","overlay":"#26233a"},"text":{"primary":"#e0def4","secondary":"#908caa","inverse":"#191724"},"brand":{"primary":"#c4a7e7"},"state":{"info":"#9ccfd8","success":"#31748f","warning":"#f6c177","danger":"#eb6f92"},"border":{"default":"#403d52"},"accent":{"link":"#c4a7e7"},"typography":{"fonts":{"sans":"Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, \\"Apple Color Emoji\\", \\"Segoe UI Emoji\\"","mono":"JetBrains Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\"Liberation Mono\\", \\"Courier New\\", monospace"},"webFonts":["https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap","https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&display=swap"]},"content":{"heading":{"h1":"#31748f","h2":"#c4a7e7","h3":"#9ccfd8","h4":"#f6c177","h5":"#ebbcba","h6":"#eb6f92"},"body":{"primary":"#e0def4","secondary":"#908caa"},"link":{"default":"#c4a7e7"},"selection":{"fg":"#e0def4","bg":"#524f67"},"blockquote":{"border":"#524f67","fg":"#e0def4","bg":"#1f1d2e"},"codeInline":{"fg":"#e0def4","bg":"#26233a"},"codeBlock":{"fg":"#e0def4","bg":"#26233a"},"table":{"border":"#524f67","stripe":"#26233a","theadBg":"#403d52"}}}}}'),byVendor:{bulma:{name:"Bulma",homepage:"https://bulma.io/",themes:["bulma-dark","bulma-light"]},catppuccin:{name:"Catppuccin (synced)",homepage:"https://catppuccin.com/palette/",themes:["catppuccin-frappe","catppuccin-latte","catppuccin-macchiato","catppuccin-mocha"]},dracula:{name:"Dracula",homepage:"https://draculatheme.com/",themes:["dracula"]},github:{name:"GitHub (synced)",homepage:"https://primer.style/",themes:["github-dark","github-light"]},"rose-pine":{name:"Rosé Pine (synced)",homepage:"https://rosepinetheme.com/",themes:["rose-pine-dawn","rose-pine-moon","rose-pine"]}}},w=Object.values(O.themes).map(e=>({id:e.id,label:e.label,vendor:e.vendor,appearance:e.appearance,...e.iconUrl!==void 0&&{iconUrl:e.iconUrl},tokens:e.tokens})),te=Object.fromEntries(w.map(e=>[e.id,e]));Object.entries(O.byVendor).map(([e,a])=>[e,{id:e,name:a.name,homepage:a.homepage,flavors:a.themes.map(t=>te[t]).filter(Boolean)}]),[...new Set(w.map(e=>e.vendor))];const oe={bulma:"bulma",catppuccin:"catppuccin",github:"github",dracula:"dracula","rose-pine":"rose-pine"},ne="bulma",re={bulma:"assets/img/turbo-themes-logo.png",catppuccin:{light:"assets/img/catppuccin-logo-latte.png",dark:"assets/img/catppuccin-logo-macchiato.png"},github:{light:"assets/img/github-logo-light.png",dark:"assets/img/github-logo-dark.png"},dracula:"assets/img/dracula-logo.png","rose-pine":{light:"assets/img/rose-pine-dawn.png",dark:"assets/img/rose-pine.png"}},se={"bulma-light":"Classic Bulma look with a bright, neutral palette.","bulma-dark":"Dark Bulma theme tuned for low-light reading.","catppuccin-latte":"Light, soft Catppuccin palette for daytime use.","catppuccin-frappe":"Balanced dark Catppuccin theme for focused work.","catppuccin-macchiato":"Deep, atmospheric Catppuccin variant with rich contrast.","catppuccin-mocha":"Cozy, high-contrast Catppuccin theme for late-night sessions.",dracula:"Iconic Dracula dark theme with vibrant accents.","github-light":"GitHub-inspired light theme suited for documentation and UI heavy pages.","github-dark":"GitHub dark theme optimized for code-heavy views.","rose-pine":"Elegant dark theme with natural pine and soho vibes.","rose-pine-moon":"Deeper variant of Rosé Pine with enhanced contrast.","rose-pine-dawn":"Light Rosé Pine variant for daytime use."};function ie(e){return oe[e]??ne}function ce(e,a){const t=re[e];if(t)return typeof t=="string"?t:t[a]}function le(e,a){return se[e]??`${a} theme`}function de(e){return{bg:e.background.base,surface:e.background.surface,accent:e.brand.primary,text:e.text.primary}}function fe(e){const a=ie(e.vendor);return{id:e.id,name:e.label,description:le(e.id,e.label),cssFile:`packages/css/dist/themes/${e.id}.css`,icon:ce(e.vendor,e.appearance),family:a,vendor:e.vendor,appearance:e.appearance,colors:de(e.tokens)}}let L=null,B=null;function U(){return L||(L=w.map(fe)),L||[]}function C(){return B||(B=new Set(w.map(e=>e.id))),B}function pe(e){const a=U();return a.find(t=>t.id===e)||a.find(t=>t.id===E)||a[0]}async function T(e,a){const t=pe(a);if(!t){g(p.NO_THEMES_AVAILABLE());return}const o=F(e),n=e.getElementById(u.THEME_FLAVOR_TRIGGER);n&&n.classList.add("is-loading");try{ee(e,t.id),await ae(e,t,o);const s=e.getElementById(u.THEME_FLAVOR_TRIGGER_ICON);if(s&&t.icon)try{s.src=N(t.icon,o);const l=_[t.family]?.name??t.family;s.alt=`${l} ${t.name}`,s.title=`${l} ${t.name}`}catch{g(p.INVALID_ICON_PATH(t.id))}const c=e.getElementById(u.THEME_FLAVOR_TRIGGER_LABEL);c&&(c.textContent=t.name),e.querySelectorAll(y.DROPDOWN_ITEMS).forEach(r=>{k(r,r.getAttribute("data-theme-id")===t.id)})}finally{n&&n.classList.remove("is-loading")}}function ge(e,a){return H(e.documentElement)||a}function me(e,a){const{trigger:t,dropdown:o}=e,n=l=>{t.setAttribute("aria-expanded",String(l))},s=l=>{if(l<0||l>=a.menuItems.length)return;const i=a.menuItems[l];S(a.menuItems,"-1"),i.setAttribute("tabindex","0"),i.focus(),a.currentIndex=l};return{updateAriaExpanded:n,focusMenuItem:s,closeDropdown:(l={})=>{const{restoreFocus:i=!0}=l;o.classList.remove("is-active"),n(!1),S(a.menuItems,"-1"),a.currentIndex=-1,i&&t.focus()},toggleDropdown:(l=!1)=>{const i=o.classList.toggle("is-active");if(n(i),i)l&&a.menuItems.length>0&&s(0);else{a.currentIndex=-1,S(a.menuItems,"-1");for(const d of a.menuItems){const f=d.classList.contains("is-active");k(d,f)}}}}}function P(e,a){return e<a-1?e+1:0}function V(e,a){return e>0?e-1:a-1}function be(e,a,t,o){const{focusMenuItem:n,toggleDropdown:s,updateAriaExpanded:c}=o,r=t.menuItems.length;switch(e.key){case"Enter":case" ":e.preventDefault(),s(!a.classList.contains("is-active"));break;case"ArrowDown":if(e.preventDefault(),!a.classList.contains("is-active"))a.classList.add("is-active"),c(!0),n(0);else{const l=t.currentIndex<0?0:P(t.currentIndex,r);n(l)}break;case"ArrowUp":if(e.preventDefault(),!a.classList.contains("is-active"))a.classList.add("is-active"),c(!0),n(r-1);else{const l=t.currentIndex<0?r-1:t.currentIndex;n(V(l,r))}break}}function ue(e,a,t,o,n){const{focusMenuItem:s,closeDropdown:c}=n,r=o.menuItems.length;switch(e.key){case"ArrowDown":e.preventDefault(),s(P(a,r));break;case"ArrowUp":e.preventDefault(),s(V(a,r));break;case"Escape":e.preventDefault(),c();break;case"Enter":case" ":e.preventDefault(),t.click();break;case"Home":e.preventDefault(),s(0);break;case"End":e.preventDefault(),s(r-1);break}}function he(e,a,t,o,n){const{trigger:s,dropdown:c}=a,{closeDropdown:r,toggleDropdown:l}=o,i=n.signal;s.addEventListener("click",d=>{d.preventDefault(),l()},{signal:i}),e.addEventListener("click",d=>{c.contains(d.target)||r({restoreFocus:!1})},{signal:i}),e.addEventListener("keydown",d=>{d.key==="Escape"&&c.classList.contains("is-active")&&r({restoreFocus:!0})},{signal:i}),s.addEventListener("keydown",d=>be(d,c,t,o),{signal:i});for(const[d,f]of t.menuItems.entries())f.addEventListener("keydown",b=>ue(b,d,f,t,o),{signal:i})}function ye(e){const a=e.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("width","16"),a.setAttribute("height","16"),a.setAttribute("viewBox","0 0 24 24"),a.setAttribute("fill","none"),a.setAttribute("stroke","currentColor"),a.setAttribute("stroke-width","3"),a.setAttribute("stroke-linecap","round"),a.setAttribute("stroke-linejoin","round");const t=e.createElementNS("http://www.w3.org/2000/svg","polyline");return t.setAttribute("points","20 6 9 17 4 12"),a.appendChild(t),a}function Ee(e,a,t){const{documentObj:o,baseUrl:n,currentThemeId:s,selectEl:c,closeDropdown:r,onThemeSelect:l}=e,i=o.createElement("button");i.type="button",i.className="dropdown-item theme-item",i.setAttribute("data-theme-id",a.id),i.setAttribute("data-appearance",a.appearance),i.setAttribute("role","menuitemradio"),i.setAttribute("aria-label",`${t.name} ${a.name} (${a.appearance}). ${a.description}`),i.setAttribute("tabindex","-1");const d=a.id===s;if(k(i,d),a.icon){const m=o.createElement("img");m.className="theme-icon",m.src=n?`${n}/${a.icon}`:a.icon,m.alt=`${t.name} ${a.name}`,m.width=24,m.height=24,i.appendChild(m)}else{const m=o.createElement("span");m.className="theme-icon theme-icon-placeholder",m.setAttribute("aria-hidden","true"),i.appendChild(m)}const f=o.createElement("div");f.className="theme-copy";const b=o.createElement("span");b.className="theme-title",b.textContent=`${t.name} · ${a.name}`,f.appendChild(b);const M=o.createElement("span");M.className="theme-description",M.textContent=a.description,f.appendChild(M),i.appendChild(f);const x=o.createElement("span");return x.className="theme-check",x.appendChild(ye(o)),i.appendChild(x),i.addEventListener("click",m=>{m.preventDefault(),l(a.id),c&&(c.value=a.id,c.dispatchEvent(new Event("change",{bubbles:!0}))),r({restoreFocus:!0})}),i}function ve(e,a,t,o,n){const{documentObj:s}=e;if(t.length===0)return null;const c=[],r=s.createElement("div");r.className="theme-family-group",r.setAttribute("role","group"),r.setAttribute("aria-labelledby",`theme-family-${a}`),r.style&&typeof r.style.setProperty=="function"&&r.style.setProperty("--animation-delay",`${n}ms`);const l=s.createElement("div");l.className="theme-family-header",l.id=`theme-family-${a}`;const i=s.createElement("span");i.className="theme-family-name",i.textContent=o.name,l.appendChild(i),r.appendChild(l);const d=s.createElement("div");return d.className="theme-family-items",t.forEach(f=>{const b=Ee(e,f,o);c.push(b),d.appendChild(b)}),r.appendChild(d),{group:r,items:c}}function we(e,a,t,o){const n=Object.keys(o);let s=0;n.forEach(c=>{const r=t.filter(d=>d.family===c),l=o[c];if(!l)return;const i=ve(e,c,r,l,s);i&&(e.menuItems.push(...i.items),a.appendChild(i.group),s+=30)})}function Ie(e,a,t,o){const{documentObj:n,onThemeSelect:s}=e;for(;a.firstChild;)a.removeChild(a.firstChild);t.forEach(c=>{const r=n.createElement("option");r.value=c.id,r.textContent=c.name,r.selected=c.id===e.currentThemeId,a.appendChild(r)}),a.disabled=!1,a.addEventListener("change",c=>{const l=c.target?.value||o;s(l)})}function Ae(e){const a=e.getElementById(u.THEME_FLAVOR_MENU),t=e.getElementById(u.THEME_FLAVOR_TRIGGER),o=t?.closest(y.NAVBAR_DROPDOWN),n=e.getElementById(u.THEME_FLAVOR_SELECT);return!a||!t||!o?null:{dropdownMenu:a,trigger:t,dropdown:o,selectEl:n}}function $(e){return e.replace(/\/$/,"")||"/"}function G(e){const a=e.location.pathname,t=$(a),o=e.querySelectorAll(y.NAVBAR_ITEM);let n=null;const s=[];o.forEach(r=>{const l=r;if(l.href)try{const i=$(new URL(l.href).pathname);t===i?n=r:s.push(r)}catch{}});for(const r of s)r.classList.remove("is-active"),r.removeAttribute("aria-current");n&&(n.classList.add("is-active"),n.setAttribute("aria-current","page"));const c=e.querySelector(y.NAV_REPORTS);c&&(["/coverage","/coverage-python","/coverage-swift","/coverage-ruby","/playwright","/playwright-examples","/lighthouse"].some(i=>t===i||t.startsWith(i+"/"))?c.classList.add("is-active"):c.classList.remove("is-active"))}typeof window<"u"&&(window.initNavbar=G);function J(e){e.querySelectorAll(y.HIGHLIGHT_PRE).forEach(a=>{a.hasAttribute("tabindex")||a.setAttribute("tabindex","0"),a.hasAttribute("role")||a.setAttribute("role","region"),a.hasAttribute("aria-label")||a.setAttribute("aria-label","Code block")})}async function z(e,a){X(a);const t=a.__INITIAL_THEME__,o=D(a,C());if(t&&t===o&&H(e.documentElement)===o){const s=`theme-${o}-css`;e.getElementById(s)||await T(e,o);return}await T(e,o)}async function q(e,a){const t=new AbortController,o=Ae(e);if(!o)return{cleanup:()=>t.abort()};const{dropdownMenu:n,selectEl:s}=o,c=F(e),r=U(),l={currentIndex:-1,menuItems:[]},i=D(a,C())||ge(e,E),d=me(o,l),f={documentObj:e,baseUrl:c,currentThemeId:i,selectEl:s,menuItems:l.menuItems,closeDropdown:d.closeDropdown,onThemeSelect:async b=>{Q(a,b,C()),await T(e,b)}};return s&&Ie(f,s,r,E),we(f,n,r,_),he(e,o,l,d,t),d.updateAriaExpanded(!1),o.dropdown.classList.remove("is-active"),{cleanup:()=>t.abort()}}return typeof document<"u"&&typeof window<"u"&&document.addEventListener("DOMContentLoaded",async()=>{try{await z(document,window);const{cleanup:e}=await q(document,window);J(document);const a=()=>{e(),window.removeEventListener("pagehide",a)};window.addEventListener("pagehide",a)}catch(e){g(p.INIT_FAILED(e))}}),h.enhanceAccessibility=J,h.initNavbar=G,h.initTheme=z,h.wireFlavorSelector=q,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"}),h})({});
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TurboThemes
4
- VERSION = "0.12.33"
4
+ VERSION = "0.13.0"
5
5
  end
6
6
 
7
7
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turbo-themes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.33
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Turbo Coder
@@ -108,6 +108,9 @@ files:
108
108
  - assets/css/themes/dracula.css
109
109
  - assets/css/themes/github-dark.css
110
110
  - assets/css/themes/github-light.css
111
+ - assets/css/themes/rose-pine-dawn.css
112
+ - assets/css/themes/rose-pine-moon.css
113
+ - assets/css/themes/rose-pine.css
111
114
  - assets/css/themes/turbo/bulma-dark.css
112
115
  - assets/css/themes/turbo/bulma-light.css
113
116
  - assets/css/themes/turbo/catppuccin-frappe.css
@@ -117,6 +120,9 @@ files:
117
120
  - assets/css/themes/turbo/dracula.css
118
121
  - assets/css/themes/turbo/github-dark.css
119
122
  - assets/css/themes/turbo/github-light.css
123
+ - assets/css/themes/turbo/rose-pine-dawn.css
124
+ - assets/css/themes/turbo/rose-pine-moon.css
125
+ - assets/css/themes/turbo/rose-pine.css
120
126
  - assets/css/turbo-base.css
121
127
  - assets/css/turbo-core.css
122
128
  - assets/css/turbo-syntax.css
@@ -134,6 +140,9 @@ files:
134
140
  - assets/img/github-logo-dark.webp
135
141
  - assets/img/github-logo-light.png
136
142
  - assets/img/github-logo-light.webp
143
+ - assets/img/rose-pine-dawn.png
144
+ - assets/img/rose-pine-moon.png
145
+ - assets/img/rose-pine.png
137
146
  - assets/img/turbo-themes-logo-dark.png
138
147
  - assets/img/turbo-themes-logo-dark.webp
139
148
  - assets/img/turbo-themes-logo.png