image-to-pixel 3.0.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +69 -69
  3. package/dist/editor.css.map +1 -1
  4. package/dist/editor.esm.js +1 -1
  5. package/dist/editor.esm.js.map +1 -1
  6. package/dist/fonts/README.md +6 -6
  7. package/dist/fonts/geist-LICENSE.txt +93 -93
  8. package/dist/image-to-pixel.bundle.esm.js +13 -13
  9. package/dist/image-to-pixel.bundle.esm.js.map +2 -2
  10. package/dist/image-to-pixel.cjs +2 -2
  11. package/dist/image-to-pixel.cjs.map +2 -2
  12. package/dist/image-to-pixel.esm.js +2 -2
  13. package/dist/image-to-pixel.esm.js.map +2 -2
  14. package/dist/image-to-pixel.js +2 -2
  15. package/dist/image-to-pixel.js.map +2 -2
  16. package/dist/image-to-pixel.min.js +11 -11
  17. package/dist/image-to-pixel.min.js.map +2 -2
  18. package/dist/video.esm.js +1 -1
  19. package/dist/video.esm.js.map +1 -1
  20. package/lib/core/color.js +69 -69
  21. package/lib/core/cpu/pipeline.js +21 -21
  22. package/lib/core/cpu/stages.js +227 -227
  23. package/lib/core/dither/bluenoise-data.js +3 -3
  24. package/lib/core/dither/kernels.js +27 -27
  25. package/lib/core/dither/matrices.js +95 -95
  26. package/lib/core/engine.js +158 -158
  27. package/lib/core/export/canvas.js +22 -22
  28. package/lib/core/export/crc32.js +15 -15
  29. package/lib/core/export/gif.js +153 -153
  30. package/lib/core/export/png.js +94 -94
  31. package/lib/core/export/scale.js +103 -103
  32. package/lib/core/export/sheet.js +95 -95
  33. package/lib/core/export/zip.js +55 -55
  34. package/lib/core/gpu/backend.js +159 -159
  35. package/lib/core/gpu/shaders.js +258 -258
  36. package/lib/core/palette/builtin.js +36 -36
  37. package/lib/core/palette/extract.js +69 -69
  38. package/lib/core/palette/lospec.js +24 -24
  39. package/lib/core/palette/parse.js +112 -112
  40. package/lib/core/plan.js +58 -58
  41. package/lib/core/presets.js +42 -42
  42. package/lib/core/settings.js +274 -274
  43. package/lib/core/source.js +89 -89
  44. package/lib/core/video/frames.js +144 -144
  45. package/lib/core/video/mux-mp4.js +131 -131
  46. package/lib/core/video/mux-webm.js +127 -127
  47. package/lib/editor/controls.js +139 -139
  48. package/lib/editor/dom.js +65 -65
  49. package/lib/editor/exporter.js +185 -185
  50. package/lib/editor/icons.js +61 -61
  51. package/lib/editor/index.js +793 -793
  52. package/lib/editor/inspector.js +328 -328
  53. package/lib/editor/library.js +182 -182
  54. package/lib/editor/persist.js +18 -18
  55. package/lib/editor/samples.js +90 -90
  56. package/lib/editor/stage.js +239 -239
  57. package/lib/editor/store.js +80 -80
  58. package/lib/editor/styles/editor.css +385 -385
  59. package/lib/editor/styles/fonts/README.md +6 -6
  60. package/lib/editor/styles/fonts/geist-LICENSE.txt +93 -93
  61. package/lib/editor/styles/tokens.css +89 -89
  62. package/lib/editor/ui.js +97 -97
  63. package/lib/index.js +3 -1
  64. package/lib/video.js +92 -92
  65. package/package.json +92 -92
  66. package/types/editor.d.ts +34 -34
  67. package/types/index.d.ts +196 -196
  68. package/types/video.d.ts +43 -43
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2023-2026 Tezumie
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2023-2026 Tezumie
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,69 +1,69 @@
1
- # Image-to-Pixel
2
-
3
- Turn images and video into pixel art. A free, open-source editor that runs in your browser, and the engine behind it as an npm package.
4
-
5
- **[Open the editor](https://tezumie.github.io/Image-to-Pixel/editor/)** · [Docs](https://tezumie.github.io/Image-to-Pixel/docs/) · [Examples](https://tezumie.github.io/Image-to-Pixel/examples/) · [Classic 2.x editor](https://tezumie.github.io/Image-to-Pixel/classic/)
6
-
7
- - **16 dither methods**: Bayer 2–16, clustered dot, blue noise, custom matrices, and Floyd–Steinberg, Atkinson, Sierra, Burkes, Jarvis and Stucki diffusion.
8
- - **Palettes**: 24 built in, extracted from the image, picked by hand, or imported from .gpl, .hex, .pal, .txt, JSON and Lospec.
9
- - **Batches and video**: one set of settings for many files; frame-accurate video export to GIF, WebM, MP4 or PNG sequences.
10
- - **Game-ready output**: integer-scaled and indexed PNGs, sprite sheets with JSON atlases, deduplicated tilesets.
11
- - **GPU first**: every step is a WebGL 2 shader pass run by [ShaderMate](https://github.com/Tezumie/ShaderMate). The CPU path gives identical pixels when WebGL isn't there, including in Node.
12
-
13
- ## Library
14
-
15
- ```bash
16
- npm i image-to-pixel
17
- ```
18
-
19
- ```js
20
- import { createPixelator } from 'image-to-pixel';
21
-
22
- const px = await createPixelator();
23
- const result = await px.process(imageElement, {
24
- size: { width: 128 },
25
- palette: { source: 'builtin', id: 'pico-8' },
26
- dither: { method: 'floyd-steinberg', strength: 0.8 },
27
- });
28
-
29
- document.body.append(result.toCanvas(4));
30
- const png = await result.toBlob({ scale: 4 });
31
- ```
32
-
33
- Script tag (global `ImageToPixel`):
34
-
35
- ```html
36
- <script src="https://cdn.jsdelivr.net/npm/image-to-pixel@3/dist/image-to-pixel.min.js"></script>
37
- ```
38
-
39
- The 2.x call, `pixelate({ image, width, dither, strength, palette, resolution })`, still works. See [Migrating](https://tezumie.github.io/Image-to-Pixel/docs/migrating/).
40
-
41
- | Entry | |
42
- | --- | --- |
43
- | `image-to-pixel` | The engine, settings, palettes, encoders (PNG, GIF, ZIP), sprite sheets, tilesets, video stepping |
44
- | `image-to-pixel/video` | MP4 and WebM encoding with WebCodecs |
45
- | `image-to-pixel/editor` + `editor.css` | The full editor, mountable in any element |
46
-
47
- ## Development
48
-
49
- Node 22. Every script is plain Node, so it works the same in PowerShell, bash and browser IDEs.
50
-
51
- ```bash
52
- npm install
53
- npm run dev # http://localhost:8080/Image-to-Pixel/, rebuilds on change
54
- npm test # build dist/ and _site/, then node --test
55
- npm run build:site # static site in _site/ (what GitHub Pages serves)
56
- npm run preview # serve _site/
57
- ```
58
-
59
- Pushing to `main` runs the tests and deploys the site with `.github/workflows/site.yml`. Set Pages to "GitHub Actions" in the repository settings.
60
-
61
- Repository layout, tests and how to add a dither method, palette, docs page or example: [Contributing](https://tezumie.github.io/Image-to-Pixel/docs/contributing/).
62
-
63
- The classic editor (`index.html`, `image-to-pixel.js`, `css/`, `src/`) is kept unchanged at the root and published at `/classic/`.
64
-
65
- ## Licence
66
-
67
- MIT, see [LICENSE](LICENSE). This covers the new library, editor and site. The classic 2.x files keep their original licence files (`LICENSE-library.txt`, `LICENSE-app.txt`).
68
-
69
- Built-in palettes come from [Lospec](https://lospec.com/palette-list) and are credited to their authors in the editor. Geist and JetBrains Mono are under the SIL Open Font License.
1
+ # Image-to-Pixel
2
+
3
+ Turn images and video into pixel art. A free, open-source editor that runs in your browser, and the engine behind it as an npm package.
4
+
5
+ **[Open the editor](https://tezumie.github.io/Image-to-Pixel/editor/)** · [Docs](https://tezumie.github.io/Image-to-Pixel/docs/) · [Examples](https://tezumie.github.io/Image-to-Pixel/examples/) · [Classic 2.x editor](https://tezumie.github.io/Image-to-Pixel/classic/)
6
+
7
+ - **16 dither methods**: Bayer 2–16, clustered dot, blue noise, custom matrices, and Floyd–Steinberg, Atkinson, Sierra, Burkes, Jarvis and Stucki diffusion.
8
+ - **Palettes**: 24 built in, extracted from the image, picked by hand, or imported from .gpl, .hex, .pal, .txt, JSON and Lospec.
9
+ - **Batches and video**: one set of settings for many files; frame-accurate video export to GIF, WebM, MP4 or PNG sequences.
10
+ - **Game-ready output**: integer-scaled and indexed PNGs, sprite sheets with JSON atlases, deduplicated tilesets.
11
+ - **GPU first**: every step is a WebGL 2 shader pass run by [ShaderMate](https://github.com/Tezumie/ShaderMate). The CPU path gives identical pixels when WebGL isn't there, including in Node.
12
+
13
+ ## Library
14
+
15
+ ```bash
16
+ npm i image-to-pixel
17
+ ```
18
+
19
+ ```js
20
+ import { createPixelator } from 'image-to-pixel';
21
+
22
+ const px = await createPixelator();
23
+ const result = await px.process(imageElement, {
24
+ size: { width: 128 },
25
+ palette: { source: 'builtin', id: 'pico-8' },
26
+ dither: { method: 'floyd-steinberg', strength: 0.8 },
27
+ });
28
+
29
+ document.body.append(result.toCanvas(4));
30
+ const png = await result.toBlob({ scale: 4 });
31
+ ```
32
+
33
+ Script tag (global `ImageToPixel`):
34
+
35
+ ```html
36
+ <script src="https://cdn.jsdelivr.net/npm/image-to-pixel@3/dist/image-to-pixel.min.js"></script>
37
+ ```
38
+
39
+ The 2.x call, `pixelate({ image, width, dither, strength, palette, resolution })`, still works. See [Migrating](https://tezumie.github.io/Image-to-Pixel/docs/migrating/).
40
+
41
+ | Entry | |
42
+ | --- | --- |
43
+ | `image-to-pixel` | The engine, settings, palettes, encoders (PNG, GIF, ZIP), sprite sheets, tilesets, video stepping |
44
+ | `image-to-pixel/video` | MP4 and WebM encoding with WebCodecs |
45
+ | `image-to-pixel/editor` + `editor.css` | The full editor, mountable in any element |
46
+
47
+ ## Development
48
+
49
+ Node 22. Every script is plain Node, so it works the same in PowerShell, bash and browser IDEs.
50
+
51
+ ```bash
52
+ npm install
53
+ npm run dev # http://localhost:8080/Image-to-Pixel/, rebuilds on change
54
+ npm test # build dist/ and _site/, then node --test
55
+ npm run build:site # static site in _site/ (what GitHub Pages serves)
56
+ npm run preview # serve _site/
57
+ ```
58
+
59
+ Pushing to `main` runs the tests and deploys the site with `.github/workflows/site.yml`. Set Pages to "GitHub Actions" in the repository settings.
60
+
61
+ Repository layout, tests and how to add a dither method, palette, docs page or example: [Contributing](https://tezumie.github.io/Image-to-Pixel/docs/contributing/).
62
+
63
+ The classic editor (`index.html`, `image-to-pixel.js`, `css/`, `src/`) is kept unchanged at the root and published at `/classic/`.
64
+
65
+ ## Licence
66
+
67
+ MIT, see [LICENSE](LICENSE). This covers everything in the repository: the library, the editor, the site and the classic 2.x files.
68
+
69
+ Built-in palettes come from [Lospec](https://lospec.com/palette-list) and are credited to their authors in the editor. Geist and JetBrains Mono are under the SIL Open Font License.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../lib/editor/styles/tokens.css", "../lib/editor/styles/editor.css"],
4
- "sourcesContent": ["/* Design tokens shared by the editor and the site. Dark is the default; light via\n [data-theme=\"light\"] or the OS preference when no explicit theme is set. */\n\n@font-face { font-family: \"Geist\"; src: url(\"fonts/geist.woff2\") format(\"woff2\"); font-weight: 100 900; font-style: normal; font-display: swap; }\n@font-face { font-family: \"JetBrains Mono\"; src: url(\"fonts/jetbrains-mono.woff2\") format(\"woff2\"); font-weight: 100 800; font-style: normal; font-display: swap; }\n\n:root {\n --font-ui: \"Geist\", system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif;\n --font-mono: \"JetBrains Mono\", ui-monospace, \"SFMono-Regular\", Menlo, Consolas, monospace;\n\n --r-sm: 6px;\n --r-md: 8px;\n --r-lg: 10px;\n\n --fs-xs: 11px;\n --fs-sm: 12px;\n --fs-md: 13px;\n --fs-lg: 15px;\n --fs-xl: 20px;\n\n --ease: cubic-bezier(.2, .7, .2, 1);\n --dur: 140ms;\n\n /* dark */\n color-scheme: dark;\n --bg: #111214;\n --stage: #0d0e10;\n --panel: #16171a;\n --raised: #1d1e22;\n --raised-2: #24252a;\n --line: #26272c;\n --line-strong: #33343a;\n --text: #e6e6e9;\n --text-2: #b4b5bc;\n --muted: #84868f;\n --faint: #5d5f68;\n --accent: #8f80f5;\n --accent-strong: #a395ff;\n --accent-ink: #0f0d1f;\n --accent-soft: rgba(143, 128, 245, 0.16);\n --ok: #5fc48a;\n --warn: #e3b55b;\n --danger: #ec6a6a;\n --checker-a: #1a1b1f;\n --checker-b: #222328;\n --shadow-pop: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--line-strong);\n --focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);\n}\n\n:root[data-theme=\"light\"] {\n color-scheme: light;\n --bg: #f5f5f6;\n --stage: #ececee;\n --panel: #ffffff;\n --raised: #f2f2f4;\n --raised-2: #e9e9ec;\n --line: #e4e4e8;\n --line-strong: #d4d4da;\n --text: #18181b;\n --text-2: #3f4047;\n --muted: #6b6d76;\n --faint: #9a9ca4;\n --accent: #6553d6;\n --accent-strong: #5442c4;\n --accent-ink: #ffffff;\n --accent-soft: rgba(101, 83, 214, 0.11);\n --ok: #2f9a5e;\n --warn: #b7841f;\n --danger: #cf4040;\n --checker-a: #e4e4e8;\n --checker-b: #f4f4f6;\n --shadow-pop: 0 12px 32px rgba(20, 20, 40, 0.14), 0 0 0 1px var(--line-strong);\n}\n\n@media (prefers-color-scheme: light) {\n :root:not([data-theme=\"dark\"]):not([data-theme=\"light\"]) {\n color-scheme: light;\n --bg: #f5f5f6; --stage: #ececee; --panel: #ffffff; --raised: #f2f2f4; --raised-2: #e9e9ec;\n --line: #e4e4e8; --line-strong: #d4d4da; --text: #18181b; --text-2: #3f4047; --muted: #6b6d76; --faint: #9a9ca4;\n --accent: #6553d6; --accent-strong: #5442c4; --accent-ink: #ffffff; --accent-soft: rgba(101, 83, 214, 0.11);\n --ok: #2f9a5e; --warn: #b7841f; --danger: #cf4040; --checker-a: #e4e4e8; --checker-b: #f4f4f6;\n --shadow-pop: 0 12px 32px rgba(20, 20, 40, 0.14), 0 0 0 1px var(--line-strong);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n :root { --dur: 0ms; }\n *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }\n}\n", "@import \"./tokens.css\";\n\n/* ---- base -------------------------------------------------------------- */\n.itp, .itp * { box-sizing: border-box; }\n.itp [hidden], .itp[hidden] { display: none !important; }\n.itp {\n color: var(--text);\n font: 400 var(--fs-md)/1.45 var(--font-ui);\n font-feature-settings: \"ss01\", \"cv11\";\n -webkit-font-smoothing: antialiased;\n}\n.itp-app {\n position: relative;\n height: 100%;\n min-height: 0;\n display: grid;\n grid-template-rows: 48px minmax(0, 1fr);\n grid-template-columns: var(--lib-w, 268px) minmax(0, 1fr) var(--insp-w, 312px);\n grid-template-areas: \"top top top\" \"lib stage insp\";\n background: var(--bg);\n overflow: hidden;\n}\n.itp-app[data-lib=\"closed\"] { --lib-w: 0px; }\n.itp-app[data-insp=\"closed\"] { --insp-w: 0px; }\n.itp button, .itp input, .itp select, .itp textarea { font: inherit; color: inherit; }\n.itp :focus { outline: none; }\n.itp :focus-visible { box-shadow: var(--focus); border-radius: var(--r-sm); }\n.itp .num, .itp output { font-variant-numeric: tabular-nums; }\n.itp .mono { font-family: var(--font-mono); font-size: 0.92em; letter-spacing: -0.01em; }\n.itp .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }\n.itp svg.i { width: 16px; height: 16px; max-width: none; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }\n.itp .muted { color: var(--muted); }\n.itp hr { border: 0; border-top: 1px solid var(--line); margin: 0; }\n\n/* ---- buttons ----------------------------------------------------------- */\n.itp-btn {\n display: inline-flex; align-items: center; justify-content: center; gap: 6px;\n height: 30px; padding: 0 10px;\n border: 1px solid transparent; border-radius: var(--r-sm);\n background: transparent; color: var(--text-2);\n cursor: pointer; white-space: nowrap; user-select: none;\n transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);\n}\n.itp-btn:hover { background: var(--raised); color: var(--text); }\n.itp-btn[aria-pressed=\"true\"] { background: var(--raised-2); color: var(--text); }\n.itp-btn:disabled { opacity: 0.4; cursor: default; background: transparent; }\n.itp-btn.icon { width: 30px; padding: 0; }\n.itp-btn.outline { border-color: var(--line-strong); color: var(--text); }\n.itp-btn.outline:hover { border-color: var(--faint); }\n.itp-btn.primary { background: var(--accent); color: var(--accent-ink); font-weight: 550; padding: 0 12px; }\n.itp-btn.primary:hover { background: var(--accent-strong); color: var(--accent-ink); }\n.itp-btn.small { height: 26px; font-size: var(--fs-sm); padding: 0 8px; }\n.itp-btn.small.icon { width: 26px; padding: 0; }\n.itp-btn.block { width: 100%; }\n.itp-btn.danger:hover { color: var(--danger); }\n.itp-link { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font-size: var(--fs-sm); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }\n.itp-link:hover { color: var(--text); text-decoration-color: currentColor; }\n.itp kbd { font: 500 10.5px/1 var(--font-mono); padding: 3px 5px; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--muted); background: var(--raised); }\n\n/* ---- top bar ----------------------------------------------------------- */\n.itp-top {\n grid-area: top;\n display: flex; align-items: center; gap: 4px;\n padding: 0 10px 0 8px;\n border-bottom: 1px solid var(--line);\n background: var(--panel);\n min-width: 0;\n}\n.itp-brand { display: flex; align-items: center; gap: 9px; padding: 0 6px; height: 32px; border-radius: var(--r-sm); color: var(--text); text-decoration: none; font-weight: 600; letter-spacing: -0.01em; }\n.itp-brand:hover { background: var(--raised); }\n.itp-mark { width: 18px; height: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; }\n.itp-mark i { background: var(--text); border-radius: 1px; }\n.itp-mark i:nth-child(2), .itp-mark i:nth-child(4), .itp-mark i:nth-child(9) { background: var(--accent); }\n.itp-mark i:nth-child(6), .itp-mark i:nth-child(7) { opacity: 0.35; }\n.itp-top .sep { width: 1px; height: 18px; background: var(--line); margin: 0 6px; flex: none; }\n.itp-file { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--text-2); }\n.itp-file .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 28ch; }\n.itp-file .meta { color: var(--faint); white-space: nowrap; }\n.itp-top .spacer { flex: 1; }\n.itp-zoom { min-width: 64px; justify-content: space-between; }\n.itp-top .collapse-only { display: none; }\n.itp-top .contents { display: contents; }\n\n/* ---- side panels ------------------------------------------------------- */\n.itp-lib, .itp-insp {\n min-width: 0; min-height: 0;\n display: flex; flex-direction: column;\n background: var(--panel);\n overflow: hidden;\n}\n.itp-lib { grid-area: lib; border-right: 1px solid var(--line); }\n.itp-insp { grid-area: insp; border-left: 1px solid var(--line); }\n.itp-app[data-lib=\"closed\"] .itp-lib, .itp-app[data-insp=\"closed\"] .itp-insp { border: 0; visibility: hidden; }\n.itp-panel-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px; }\n.itp-panel-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }\n\n/* tabs: segmented control */\n.itp-seg {\n display: inline-flex; padding: 2px; gap: 2px;\n background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-md);\n width: 100%;\n}\n.itp-seg button {\n flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;\n height: 26px; padding: 0 8px; border: 0; border-radius: var(--r-sm);\n background: transparent; color: var(--muted); cursor: pointer; font-size: var(--fs-sm); white-space: nowrap;\n}\n.itp-seg button:hover { color: var(--text); }\n.itp-seg button[aria-selected=\"true\"], .itp-seg button[aria-pressed=\"true\"] { background: var(--panel); color: var(--text); box-shadow: 0 0 0 1px var(--line-strong); }\n:root[data-theme=\"dark\"] .itp-seg button[aria-selected=\"true\"], :root[data-theme=\"dark\"] .itp-seg button[aria-pressed=\"true\"] { background: var(--raised-2); }\n.itp-seg .count { color: var(--faint); font-variant-numeric: tabular-nums; }\n.itp-seg.compact { width: auto; }\n\n/* search field */\n.itp-search { position: relative; margin: 0 12px 8px; }\n.itp-search svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--faint); }\n.itp-input, .itp-search input, .itp-select {\n width: 100%; height: 30px; padding: 0 9px;\n border: 1px solid var(--line); border-radius: var(--r-sm);\n background: var(--bg); color: var(--text);\n transition: border-color var(--dur) var(--ease);\n}\n.itp-search input { padding-left: 30px; }\n.itp-input:hover, .itp-select:hover, .itp-search input:hover { border-color: var(--line-strong); }\n.itp-input:focus-visible, .itp-select:focus-visible, .itp-search input:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }\n.itp-select { appearance: none; padding-right: 26px; cursor: pointer;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2384868f' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E\");\n background-repeat: no-repeat; background-position: right 8px center; }\n.itp-select option, .itp-select optgroup { background: var(--panel); color: var(--text); }\n.itp textarea.itp-input { height: auto; padding: 7px 9px; resize: vertical; font-family: var(--font-mono); font-size: var(--fs-sm); line-height: 1.5; }\n\n/* group labels in lists */\n.itp-group { padding: 14px 14px 6px; font-size: var(--fs-xs); font-weight: 500; color: var(--faint); letter-spacing: 0.01em; display: flex; align-items: center; justify-content: space-between; }\n\n/* library: files */\n.itp-files { list-style: none; margin: 0; padding: 0 8px 8px; display: flex; flex-direction: column; gap: 1px; }\n.itp-file-row {\n display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px;\n padding: 6px 6px; border-radius: var(--r-md); cursor: pointer; color: var(--text-2);\n border: 1px solid transparent;\n}\n.itp-file-row:hover { background: var(--raised); color: var(--text); }\n.itp-file-row[aria-current=\"true\"] { background: var(--raised-2); color: var(--text); border-color: var(--line); }\n.itp-file-row .thumb { width: 36px; height: 36px; border-radius: 5px; object-fit: cover; image-rendering: pixelated; background: var(--raised-2); border: 1px solid var(--line); }\n.itp-file-row .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.itp-file-row .sub { font-size: var(--fs-xs); color: var(--faint); font-variant-numeric: tabular-nums; }\n.itp-file-row .actions { display: flex; gap: 0; }\n.itp-file-row .actions .itp-btn { opacity: 0; }\n.itp-file-row:hover .actions .itp-btn, .itp-file-row:focus-within .actions .itp-btn, .itp-file-row[aria-current=\"true\"] .actions .itp-btn { opacity: 1; }\n.itp-file-row .sub { display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; }\n.itp-own { display: inline-flex; align-items: center; gap: 3px; color: var(--accent); font-size: var(--fs-xs); white-space: nowrap; }\n.itp-own svg.i { width: 12px; height: 12px; }\n@media (hover: none) { .itp-file-row .actions .itp-btn { opacity: 1; } }\n.itp-badge { display: inline-flex; align-items: center; height: 18px; min-width: 18px; padding: 0 5px; border-radius: 9px; font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--raised-2); color: var(--muted); justify-content: center; }\n.itp-badge.accent { background: var(--accent); color: var(--accent-ink); }\n.itp-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }\n\n/* library: presets grid */\n.itp-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 12px 12px; }\n.itp-preset {\n display: flex; flex-direction: column; gap: 6px; padding: 0 0 8px; text-align: left;\n border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); cursor: pointer; overflow: hidden; color: var(--text-2);\n transition: border-color var(--dur) var(--ease);\n}\n.itp-preset:hover { border-color: var(--line-strong); color: var(--text); }\n.itp-preset[aria-pressed=\"true\"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }\n.itp-preset canvas, .itp-preset .ph { width: 100%; aspect-ratio: 4 / 3; image-rendering: pixelated; display: block; background: var(--raised); border-bottom: 1px solid var(--line); object-fit: cover; }\n.itp-preset .t { padding: 0 8px; font-size: var(--fs-sm); font-weight: 500; color: var(--text); }\n.itp-preset .d { padding: 0 8px; font-size: var(--fs-xs); color: var(--muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }\n\n/* palette lists */\n.itp-pal-list { list-style: none; margin: 0; padding: 0 8px 12px; display: flex; flex-direction: column; gap: 1px; }\n.itp-pal {\n display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: var(--r-md); cursor: pointer; border: 1px solid transparent; color: var(--text-2);\n}\n.itp-pal:hover { background: var(--raised); color: var(--text); }\n.itp-pal[aria-pressed=\"true\"] { background: var(--raised-2); border-color: var(--line); color: var(--text); }\n.itp-pal .row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }\n.itp-pal .row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.itp-pal .n { font-size: var(--fs-xs); color: var(--faint); font-variant-numeric: tabular-nums; }\n.itp-strip { display: flex; height: 10px; border-radius: 3px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.15); }\n.itp-strip i { flex: 1; }\n\n/* ---- stage ------------------------------------------------------------- */\n.itp-stage { grid-area: stage; position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--stage); }\n.itp-view { position: relative; flex: 1; min-height: 0; overflow: hidden; cursor: grab; touch-action: none; }\n.itp-view.panning { cursor: grabbing; }\n.itp-view.picking { cursor: crosshair; }\n.itp-view canvas.screen { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }\n.itp-split {\n position: absolute; top: 0; bottom: 0; width: 0; pointer-events: none;\n}\n.itp-split::before { content: \"\"; position: absolute; top: 0; bottom: 0; left: -0.5px; width: 1px; background: rgba(255, 255, 255, 0.85); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); }\n.itp-split button {\n pointer-events: auto; position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%);\n width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.2); background: #fff; color: #222; cursor: ew-resize;\n display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);\n}\n.itp-split .lbl { position: absolute; top: 12px; font-size: var(--fs-xs); padding: 2px 7px; border-radius: 4px; background: rgba(0, 0, 0, 0.55); color: #fff; white-space: nowrap; }\n.itp-split .lbl.l { right: 10px; } .itp-split .lbl.r { left: 10px; }\n\n/* floating view controls */\n.itp-float { position: absolute; display: flex; gap: 2px; padding: 3px; border-radius: var(--r-md); background: color-mix(in srgb, var(--panel) 88%, transparent); border: 1px solid var(--line); backdrop-filter: blur(8px); }\n.itp-float.br { right: 12px; bottom: 12px; }\n.itp-float.bl { left: 12px; bottom: 12px; align-items: center; padding: 3px 10px; gap: 10px; color: var(--muted); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; height: 32px; }\n.itp-float.bl b { color: var(--text-2); font-weight: 500; }\n.itp-busy { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); }\n\n/* empty state */\n.itp-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; }\n.itp-drop {\n width: min(520px, 100%); padding: 28px; border: 1px dashed var(--line-strong); border-radius: var(--r-lg);\n display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; background: color-mix(in srgb, var(--panel) 60%, transparent);\n}\n.itp-drop h2 { margin: 0; font-size: var(--fs-lg); font-weight: 600; letter-spacing: -0.01em; }\n.itp-drop p { margin: 0; color: var(--muted); max-width: 46ch; }\n.itp-drop .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }\n.itp-drop .samples { display: flex; gap: 8px; margin-top: 4px; }\n.itp-drop .samples button { width: 64px; height: 48px; padding: 0; border-radius: var(--r-sm); border: 1px solid var(--line); overflow: hidden; cursor: pointer; background: var(--raised); }\n.itp-drop .samples button:hover { border-color: var(--accent); }\n.itp-drop .samples img { width: 100%; height: 100%; object-fit: cover; display: block; }\n.itp-dragging .itp-view::after {\n content: \"Drop to add\"; position: absolute; inset: 12px; border: 2px dashed var(--accent); border-radius: var(--r-lg);\n display: grid; place-items: center; color: var(--text); background: var(--accent-soft); font-weight: 500; pointer-events: none;\n}\n\n/* transport (video) */\n.itp-transport { display: none; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-top: 1px solid var(--line); background: var(--panel); }\n.itp-stage[data-video=\"true\"] .itp-transport { display: flex; }\n.itp-time { font-variant-numeric: tabular-nums; color: var(--text-2); font-size: var(--fs-sm); white-space: nowrap; min-width: 108px; }\n.itp-time span { color: var(--faint); }\n.itp-scrub { flex: 1; }\n\n/* ---- inspector --------------------------------------------------------- */\n.itp-insp-head { padding: 12px 14px 0; display: flex; flex-direction: column; gap: 10px; }\n.itp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }\n.itp-stat { padding: 7px 10px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }\n.itp-stat + .itp-stat { border-left: 1px solid var(--line); }\n.itp-stat .k { font-size: var(--fs-xs); color: var(--faint); }\n.itp-stat .v { font-weight: 550; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.itp-stat .v small { font-weight: 400; color: var(--muted); font-size: var(--fs-xs); margin-left: 3px; }\n\n.itp-sec { border-bottom: 1px solid var(--line); }\n.itp-sec-head { display: flex; align-items: center; gap: 2px; padding-right: 8px; }\n.itp-sec-toggle {\n flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 12px 6px 12px 14px;\n border: 0; background: none; text-align: left; cursor: pointer; user-select: none; color: var(--text);\n}\n.itp-sec-toggle .title { font-weight: 550; white-space: nowrap; }\n.itp-sec-toggle .hint { color: var(--faint); font-weight: 400; font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }\n.itp-sec-toggle .chev { margin-left: auto; color: var(--faint); display: inline-flex; transition: transform var(--dur) var(--ease); }\n.itp-sec[data-open=\"true\"] .itp-sec-toggle .chev { transform: rotate(90deg); }\n.itp-sec-toggle:hover .chev { color: var(--text); }\n.itp-sec-toggle:focus-visible { border-radius: var(--r-sm); }\n.itp-sec-reset { color: var(--faint); }\n.itp-sec-reset:hover { color: var(--text); }\n.itp-sec .body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 12px; }\n\n.itp-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }\n.itp-field > .lab { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-2); font-size: var(--fs-sm); }\n.itp-field > .lab .val { color: var(--text); font-variant-numeric: tabular-nums; }\n.itp .help { color: var(--faint); font-size: var(--fs-xs); line-height: 1.4; }\n.itp-row { display: flex; gap: 8px; align-items: center; }\n.itp-row > * { min-width: 0; }\n.itp-row .grow { flex: 1; }\n.itp-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }\n\n/* slider with value */\n.itp-slider { display: grid; grid-template-columns: minmax(0, 1fr) 56px; gap: 8px; align-items: center; }\n.itp-slider input[type=\"number\"] { height: 26px; padding: 0 6px; text-align: right; font-size: var(--fs-sm); border-radius: 5px; }\n.itp-slider input[type=\"number\"]::-webkit-inner-spin-button { opacity: 0.4; }\n.itp input[type=\"range\"] {\n -webkit-appearance: none; appearance: none; width: 100%; height: 20px; background: transparent; cursor: pointer; margin: 0;\n --p: 50%;\n}\n.itp input[type=\"range\"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--accent) var(--p), var(--raised-2) var(--p)); }\n.itp input[type=\"range\"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--raised-2); }\n.itp input[type=\"range\"]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }\n.itp input[type=\"range\"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: var(--text); border: 3px solid var(--panel); box-shadow: 0 0 0 1px var(--line-strong); }\n.itp input[type=\"range\"]::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: var(--text); border: 3px solid var(--panel); box-shadow: 0 0 0 1px var(--line-strong); }\n.itp input[type=\"range\"]:focus-visible { box-shadow: none; }\n.itp input[type=\"range\"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--accent); }\n.itp input[type=\"range\"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 2px var(--accent); }\n\n/* switch */\n.itp-switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; color: var(--text-2); font-size: var(--fs-sm); }\n.itp-switch input { appearance: none; width: 28px; height: 16px; border-radius: 8px; background: var(--raised-2); border: 1px solid var(--line-strong); position: relative; cursor: pointer; flex: none; transition: background var(--dur) var(--ease); margin: 0; }\n.itp-switch input::after { content: \"\"; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); transition: transform var(--dur) var(--ease), background var(--dur) var(--ease); }\n.itp-switch input:checked { background: var(--accent); border-color: var(--accent); }\n.itp-switch input:checked::after { transform: translateX(12px); background: var(--accent-ink); }\n\n/* swatches */\n.itp-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(22px, 1fr)); gap: 4px; }\n.itp-swatch { aspect-ratio: 1; border-radius: 4px; border: 0; padding: 0; cursor: pointer; position: relative; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.25); }\n.itp-swatch:hover { transform: scale(1.12); z-index: 1; }\n.itp-swatch.add { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--muted); display: grid; place-items: center; }\n.itp-swatch.add:hover { color: var(--text); }\n.itp-color { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px 0 4px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); cursor: pointer; }\n.itp-color input[type=\"color\"] { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 4px; background: none; cursor: pointer; }\n.itp-color input[type=\"color\"]::-webkit-color-swatch-wrapper { padding: 0; }\n.itp-color input[type=\"color\"]::-webkit-color-swatch { border: 0; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.3); }\n.itp-color input[type=\"color\"]::-moz-color-swatch { border: 0; border-radius: 4px; }\n\n.itp-scope { display: flex; flex-direction: column; gap: 6px; }\n.itp-scope .lab { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-sm); color: var(--text-2); }\n.itp-scope-note { color: var(--faint); font-size: var(--fs-xs); }\n.itp-insp[data-scope=\"own\"] .itp-scope-note { color: var(--accent); }\n.itp-insp[data-scope=\"own\"] .itp-scope .itp-seg button[aria-pressed=\"true\"] { box-shadow: 0 0 0 1px var(--accent); color: var(--text); }\n\n.itp-aspects { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }\n.itp-aspects button {\n display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; height: 52px;\n border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); color: var(--muted); cursor: pointer; font-size: var(--fs-xs);\n}\n.itp-aspects button:hover { border-color: var(--line-strong); color: var(--text); }\n.itp-aspects button[aria-pressed=\"true\"] { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }\n.itp-aspects i { display: block; border: 1.5px solid currentColor; border-radius: 2px; }\n.itp-aspects i.orig { border-style: dashed; }\n\n.itp-insp-foot { padding: 12px 14px 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); }\n\n/* ---- popovers, dialogs, toasts ---------------------------------------- */\n.itp-menu {\n position: fixed; z-index: 50; min-width: 240px; max-width: calc(100vw - 16px); padding: 5px; border-radius: var(--r-lg);\n background: var(--panel); box-shadow: var(--shadow-pop); display: flex; flex-direction: column;\n}\n.itp-menu[hidden] { display: none; }\n.itp-menu .mi {\n display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 9px; border-radius: var(--r-sm);\n border: 0; background: none; text-align: left; cursor: pointer; color: var(--text-2);\n}\n.itp-menu .mi:hover, .itp-menu .mi:focus-visible { background: var(--raised); color: var(--text); box-shadow: none; }\n.itp-menu .mi:disabled { opacity: 0.4; cursor: default; background: none; }\n.itp-menu .mi small { display: block; color: var(--faint); font-size: var(--fs-xs); }\n.itp-menu .mlabel { padding: 8px 9px 4px; font-size: var(--fs-xs); color: var(--faint); }\n.itp-menu hr { margin: 5px 4px; }\n\n.itp-dialog { border: 0; padding: 0; border-radius: var(--r-lg); background: var(--panel); color: var(--text); box-shadow: var(--shadow-pop); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 48px); }\n.itp-dialog::backdrop { background: rgba(0, 0, 0, 0.45); }\n.itp-dialog header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }\n.itp-dialog header h2 { margin: 0; font-size: var(--fs-lg); font-weight: 600; }\n.itp-dialog .content { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 14px; overflow: auto; }\n.itp-dialog footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }\n.itp-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 24px; }\n.itp-keys div { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); color: var(--text-2); }\n.itp-keys div span:last-child { display: flex; gap: 3px; }\n\n.itp-toasts { position: fixed; z-index: 60; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }\n.itp-toast {\n pointer-events: auto; display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: min(520px, calc(100vw - 24px));\n padding: 9px 10px 9px 12px; border-radius: var(--r-md); background: var(--raised); color: var(--text); box-shadow: var(--shadow-pop); font-size: var(--fs-sm);\n animation: itp-in 160ms var(--ease);\n}\n.itp-toast .msg { flex: 1; }\n.itp-toast.error .itp-dot { background: var(--danger); }\n.itp-toast.ok .itp-dot { background: var(--ok); }\n.itp-toast.info .itp-dot { background: var(--accent); }\n.itp-progress { height: 3px; border-radius: 2px; background: var(--raised-2); overflow: hidden; margin-top: 6px; }\n.itp-progress i { display: block; height: 100%; background: var(--accent); width: 0; transition: width 120ms linear; }\n@keyframes itp-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }\n\n.itp-spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: itp-spin 700ms linear infinite; }\n@keyframes itp-spin { to { transform: rotate(360deg); } }\n\n/* ---- responsive -------------------------------------------------------- */\n@media (max-width: 1100px) {\n .itp-app { --lib-w: 232px; --insp-w: 288px; }\n}\n@media (max-width: 900px) {\n /* tablet: library becomes an overlay drawer */\n .itp-app { grid-template-columns: 0 minmax(0, 1fr) var(--insp-w, 288px); }\n .itp-lib { position: absolute; z-index: 30; top: 0; bottom: 0; left: 0; width: 280px; box-shadow: var(--shadow-pop); transform: translateX(-100%); transition: transform 180ms var(--ease); visibility: hidden; }\n .itp-app[data-lib=\"open\"] .itp-lib { transform: none; visibility: visible; }\n .itp-top .collapse-only { display: inline-flex; }\n .itp-file .meta { display: none; }\n}\n@media (max-width: 680px) {\n /* phone: stage on top, inspector as a bottom sheet */\n .itp-app { grid-template-columns: minmax(0, 1fr); grid-template-rows: 48px minmax(0, 1fr) auto; grid-template-areas: \"top\" \"stage\" \"insp\"; }\n .itp-insp { border-left: 0; border-top: 1px solid var(--line); max-height: 46vh; }\n .itp-app[data-insp=\"closed\"] .itp-insp { max-height: 0; }\n .itp-top .hide-sm { display: none; }\n .itp-file .name { max-width: 14ch; }\n .itp-float.bl { display: none; }\n}\n"],
4
+ "sourcesContent": ["/* Design tokens shared by the editor and the site. Dark is the default; light via\r\n [data-theme=\"light\"] or the OS preference when no explicit theme is set. */\r\n\r\n@font-face { font-family: \"Geist\"; src: url(\"fonts/geist.woff2\") format(\"woff2\"); font-weight: 100 900; font-style: normal; font-display: swap; }\r\n@font-face { font-family: \"JetBrains Mono\"; src: url(\"fonts/jetbrains-mono.woff2\") format(\"woff2\"); font-weight: 100 800; font-style: normal; font-display: swap; }\r\n\r\n:root {\r\n --font-ui: \"Geist\", system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif;\r\n --font-mono: \"JetBrains Mono\", ui-monospace, \"SFMono-Regular\", Menlo, Consolas, monospace;\r\n\r\n --r-sm: 6px;\r\n --r-md: 8px;\r\n --r-lg: 10px;\r\n\r\n --fs-xs: 11px;\r\n --fs-sm: 12px;\r\n --fs-md: 13px;\r\n --fs-lg: 15px;\r\n --fs-xl: 20px;\r\n\r\n --ease: cubic-bezier(.2, .7, .2, 1);\r\n --dur: 140ms;\r\n\r\n /* dark */\r\n color-scheme: dark;\r\n --bg: #111214;\r\n --stage: #0d0e10;\r\n --panel: #16171a;\r\n --raised: #1d1e22;\r\n --raised-2: #24252a;\r\n --line: #26272c;\r\n --line-strong: #33343a;\r\n --text: #e6e6e9;\r\n --text-2: #b4b5bc;\r\n --muted: #84868f;\r\n --faint: #5d5f68;\r\n --accent: #8f80f5;\r\n --accent-strong: #a395ff;\r\n --accent-ink: #0f0d1f;\r\n --accent-soft: rgba(143, 128, 245, 0.16);\r\n --ok: #5fc48a;\r\n --warn: #e3b55b;\r\n --danger: #ec6a6a;\r\n --checker-a: #1a1b1f;\r\n --checker-b: #222328;\r\n --shadow-pop: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--line-strong);\r\n --focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);\r\n}\r\n\r\n:root[data-theme=\"light\"] {\r\n color-scheme: light;\r\n --bg: #f5f5f6;\r\n --stage: #ececee;\r\n --panel: #ffffff;\r\n --raised: #f2f2f4;\r\n --raised-2: #e9e9ec;\r\n --line: #e4e4e8;\r\n --line-strong: #d4d4da;\r\n --text: #18181b;\r\n --text-2: #3f4047;\r\n --muted: #6b6d76;\r\n --faint: #9a9ca4;\r\n --accent: #6553d6;\r\n --accent-strong: #5442c4;\r\n --accent-ink: #ffffff;\r\n --accent-soft: rgba(101, 83, 214, 0.11);\r\n --ok: #2f9a5e;\r\n --warn: #b7841f;\r\n --danger: #cf4040;\r\n --checker-a: #e4e4e8;\r\n --checker-b: #f4f4f6;\r\n --shadow-pop: 0 12px 32px rgba(20, 20, 40, 0.14), 0 0 0 1px var(--line-strong);\r\n}\r\n\r\n@media (prefers-color-scheme: light) {\r\n :root:not([data-theme=\"dark\"]):not([data-theme=\"light\"]) {\r\n color-scheme: light;\r\n --bg: #f5f5f6; --stage: #ececee; --panel: #ffffff; --raised: #f2f2f4; --raised-2: #e9e9ec;\r\n --line: #e4e4e8; --line-strong: #d4d4da; --text: #18181b; --text-2: #3f4047; --muted: #6b6d76; --faint: #9a9ca4;\r\n --accent: #6553d6; --accent-strong: #5442c4; --accent-ink: #ffffff; --accent-soft: rgba(101, 83, 214, 0.11);\r\n --ok: #2f9a5e; --warn: #b7841f; --danger: #cf4040; --checker-a: #e4e4e8; --checker-b: #f4f4f6;\r\n --shadow-pop: 0 12px 32px rgba(20, 20, 40, 0.14), 0 0 0 1px var(--line-strong);\r\n }\r\n}\r\n\r\n@media (prefers-reduced-motion: reduce) {\r\n :root { --dur: 0ms; }\r\n *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }\r\n}\r\n", "@import \"./tokens.css\";\r\n\r\n/* ---- base -------------------------------------------------------------- */\r\n.itp, .itp * { box-sizing: border-box; }\r\n.itp [hidden], .itp[hidden] { display: none !important; }\r\n.itp {\r\n color: var(--text);\r\n font: 400 var(--fs-md)/1.45 var(--font-ui);\r\n font-feature-settings: \"ss01\", \"cv11\";\r\n -webkit-font-smoothing: antialiased;\r\n}\r\n.itp-app {\r\n position: relative;\r\n height: 100%;\r\n min-height: 0;\r\n display: grid;\r\n grid-template-rows: 48px minmax(0, 1fr);\r\n grid-template-columns: var(--lib-w, 268px) minmax(0, 1fr) var(--insp-w, 312px);\r\n grid-template-areas: \"top top top\" \"lib stage insp\";\r\n background: var(--bg);\r\n overflow: hidden;\r\n}\r\n.itp-app[data-lib=\"closed\"] { --lib-w: 0px; }\r\n.itp-app[data-insp=\"closed\"] { --insp-w: 0px; }\r\n.itp button, .itp input, .itp select, .itp textarea { font: inherit; color: inherit; }\r\n.itp :focus { outline: none; }\r\n.itp :focus-visible { box-shadow: var(--focus); border-radius: var(--r-sm); }\r\n.itp .num, .itp output { font-variant-numeric: tabular-nums; }\r\n.itp .mono { font-family: var(--font-mono); font-size: 0.92em; letter-spacing: -0.01em; }\r\n.itp .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }\r\n.itp svg.i { width: 16px; height: 16px; max-width: none; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }\r\n.itp .muted { color: var(--muted); }\r\n.itp hr { border: 0; border-top: 1px solid var(--line); margin: 0; }\r\n\r\n/* ---- buttons ----------------------------------------------------------- */\r\n.itp-btn {\r\n display: inline-flex; align-items: center; justify-content: center; gap: 6px;\r\n height: 30px; padding: 0 10px;\r\n border: 1px solid transparent; border-radius: var(--r-sm);\r\n background: transparent; color: var(--text-2);\r\n cursor: pointer; white-space: nowrap; user-select: none;\r\n transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);\r\n}\r\n.itp-btn:hover { background: var(--raised); color: var(--text); }\r\n.itp-btn[aria-pressed=\"true\"] { background: var(--raised-2); color: var(--text); }\r\n.itp-btn:disabled { opacity: 0.4; cursor: default; background: transparent; }\r\n.itp-btn.icon { width: 30px; padding: 0; }\r\n.itp-btn.outline { border-color: var(--line-strong); color: var(--text); }\r\n.itp-btn.outline:hover { border-color: var(--faint); }\r\n.itp-btn.primary { background: var(--accent); color: var(--accent-ink); font-weight: 550; padding: 0 12px; }\r\n.itp-btn.primary:hover { background: var(--accent-strong); color: var(--accent-ink); }\r\n.itp-btn.small { height: 26px; font-size: var(--fs-sm); padding: 0 8px; }\r\n.itp-btn.small.icon { width: 26px; padding: 0; }\r\n.itp-btn.block { width: 100%; }\r\n.itp-btn.danger:hover { color: var(--danger); }\r\n.itp-link { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font-size: var(--fs-sm); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }\r\n.itp-link:hover { color: var(--text); text-decoration-color: currentColor; }\r\n.itp kbd { font: 500 10.5px/1 var(--font-mono); padding: 3px 5px; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--muted); background: var(--raised); }\r\n\r\n/* ---- top bar ----------------------------------------------------------- */\r\n.itp-top {\r\n grid-area: top;\r\n display: flex; align-items: center; gap: 4px;\r\n padding: 0 10px 0 8px;\r\n border-bottom: 1px solid var(--line);\r\n background: var(--panel);\r\n min-width: 0;\r\n}\r\n.itp-brand { display: flex; align-items: center; gap: 9px; padding: 0 6px; height: 32px; border-radius: var(--r-sm); color: var(--text); text-decoration: none; font-weight: 600; letter-spacing: -0.01em; }\r\n.itp-brand:hover { background: var(--raised); }\r\n.itp-mark { width: 18px; height: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; }\r\n.itp-mark i { background: var(--text); border-radius: 1px; }\r\n.itp-mark i:nth-child(2), .itp-mark i:nth-child(4), .itp-mark i:nth-child(9) { background: var(--accent); }\r\n.itp-mark i:nth-child(6), .itp-mark i:nth-child(7) { opacity: 0.35; }\r\n.itp-top .sep { width: 1px; height: 18px; background: var(--line); margin: 0 6px; flex: none; }\r\n.itp-file { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--text-2); }\r\n.itp-file .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 28ch; }\r\n.itp-file .meta { color: var(--faint); white-space: nowrap; }\r\n.itp-top .spacer { flex: 1; }\r\n.itp-zoom { min-width: 64px; justify-content: space-between; }\r\n.itp-top .collapse-only { display: none; }\r\n.itp-top .contents { display: contents; }\r\n\r\n/* ---- side panels ------------------------------------------------------- */\r\n.itp-lib, .itp-insp {\r\n min-width: 0; min-height: 0;\r\n display: flex; flex-direction: column;\r\n background: var(--panel);\r\n overflow: hidden;\r\n}\r\n.itp-lib { grid-area: lib; border-right: 1px solid var(--line); }\r\n.itp-insp { grid-area: insp; border-left: 1px solid var(--line); }\r\n.itp-app[data-lib=\"closed\"] .itp-lib, .itp-app[data-insp=\"closed\"] .itp-insp { border: 0; visibility: hidden; }\r\n.itp-panel-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px; }\r\n.itp-panel-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }\r\n\r\n/* tabs: segmented control */\r\n.itp-seg {\r\n display: inline-flex; padding: 2px; gap: 2px;\r\n background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-md);\r\n width: 100%;\r\n}\r\n.itp-seg button {\r\n flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;\r\n height: 26px; padding: 0 8px; border: 0; border-radius: var(--r-sm);\r\n background: transparent; color: var(--muted); cursor: pointer; font-size: var(--fs-sm); white-space: nowrap;\r\n}\r\n.itp-seg button:hover { color: var(--text); }\r\n.itp-seg button[aria-selected=\"true\"], .itp-seg button[aria-pressed=\"true\"] { background: var(--panel); color: var(--text); box-shadow: 0 0 0 1px var(--line-strong); }\r\n:root[data-theme=\"dark\"] .itp-seg button[aria-selected=\"true\"], :root[data-theme=\"dark\"] .itp-seg button[aria-pressed=\"true\"] { background: var(--raised-2); }\r\n.itp-seg .count { color: var(--faint); font-variant-numeric: tabular-nums; }\r\n.itp-seg.compact { width: auto; }\r\n\r\n/* search field */\r\n.itp-search { position: relative; margin: 0 12px 8px; }\r\n.itp-search svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--faint); }\r\n.itp-input, .itp-search input, .itp-select {\r\n width: 100%; height: 30px; padding: 0 9px;\r\n border: 1px solid var(--line); border-radius: var(--r-sm);\r\n background: var(--bg); color: var(--text);\r\n transition: border-color var(--dur) var(--ease);\r\n}\r\n.itp-search input { padding-left: 30px; }\r\n.itp-input:hover, .itp-select:hover, .itp-search input:hover { border-color: var(--line-strong); }\r\n.itp-input:focus-visible, .itp-select:focus-visible, .itp-search input:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }\r\n.itp-select { appearance: none; padding-right: 26px; cursor: pointer;\r\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2384868f' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E\");\r\n background-repeat: no-repeat; background-position: right 8px center; }\r\n.itp-select option, .itp-select optgroup { background: var(--panel); color: var(--text); }\r\n.itp textarea.itp-input { height: auto; padding: 7px 9px; resize: vertical; font-family: var(--font-mono); font-size: var(--fs-sm); line-height: 1.5; }\r\n\r\n/* group labels in lists */\r\n.itp-group { padding: 14px 14px 6px; font-size: var(--fs-xs); font-weight: 500; color: var(--faint); letter-spacing: 0.01em; display: flex; align-items: center; justify-content: space-between; }\r\n\r\n/* library: files */\r\n.itp-files { list-style: none; margin: 0; padding: 0 8px 8px; display: flex; flex-direction: column; gap: 1px; }\r\n.itp-file-row {\r\n display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px;\r\n padding: 6px 6px; border-radius: var(--r-md); cursor: pointer; color: var(--text-2);\r\n border: 1px solid transparent;\r\n}\r\n.itp-file-row:hover { background: var(--raised); color: var(--text); }\r\n.itp-file-row[aria-current=\"true\"] { background: var(--raised-2); color: var(--text); border-color: var(--line); }\r\n.itp-file-row .thumb { width: 36px; height: 36px; border-radius: 5px; object-fit: cover; image-rendering: pixelated; background: var(--raised-2); border: 1px solid var(--line); }\r\n.itp-file-row .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\r\n.itp-file-row .sub { font-size: var(--fs-xs); color: var(--faint); font-variant-numeric: tabular-nums; }\r\n.itp-file-row .actions { display: flex; gap: 0; }\r\n.itp-file-row .actions .itp-btn { opacity: 0; }\r\n.itp-file-row:hover .actions .itp-btn, .itp-file-row:focus-within .actions .itp-btn, .itp-file-row[aria-current=\"true\"] .actions .itp-btn { opacity: 1; }\r\n.itp-file-row .sub { display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; }\r\n.itp-own { display: inline-flex; align-items: center; gap: 3px; color: var(--accent); font-size: var(--fs-xs); white-space: nowrap; }\r\n.itp-own svg.i { width: 12px; height: 12px; }\r\n@media (hover: none) { .itp-file-row .actions .itp-btn { opacity: 1; } }\r\n.itp-badge { display: inline-flex; align-items: center; height: 18px; min-width: 18px; padding: 0 5px; border-radius: 9px; font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--raised-2); color: var(--muted); justify-content: center; }\r\n.itp-badge.accent { background: var(--accent); color: var(--accent-ink); }\r\n.itp-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }\r\n\r\n/* library: presets grid */\r\n.itp-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 12px 12px; }\r\n.itp-preset {\r\n display: flex; flex-direction: column; gap: 6px; padding: 0 0 8px; text-align: left;\r\n border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); cursor: pointer; overflow: hidden; color: var(--text-2);\r\n transition: border-color var(--dur) var(--ease);\r\n}\r\n.itp-preset:hover { border-color: var(--line-strong); color: var(--text); }\r\n.itp-preset[aria-pressed=\"true\"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }\r\n.itp-preset canvas, .itp-preset .ph { width: 100%; aspect-ratio: 4 / 3; image-rendering: pixelated; display: block; background: var(--raised); border-bottom: 1px solid var(--line); object-fit: cover; }\r\n.itp-preset .t { padding: 0 8px; font-size: var(--fs-sm); font-weight: 500; color: var(--text); }\r\n.itp-preset .d { padding: 0 8px; font-size: var(--fs-xs); color: var(--muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }\r\n\r\n/* palette lists */\r\n.itp-pal-list { list-style: none; margin: 0; padding: 0 8px 12px; display: flex; flex-direction: column; gap: 1px; }\r\n.itp-pal {\r\n display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: var(--r-md); cursor: pointer; border: 1px solid transparent; color: var(--text-2);\r\n}\r\n.itp-pal:hover { background: var(--raised); color: var(--text); }\r\n.itp-pal[aria-pressed=\"true\"] { background: var(--raised-2); border-color: var(--line); color: var(--text); }\r\n.itp-pal .row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }\r\n.itp-pal .row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\r\n.itp-pal .n { font-size: var(--fs-xs); color: var(--faint); font-variant-numeric: tabular-nums; }\r\n.itp-strip { display: flex; height: 10px; border-radius: 3px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.15); }\r\n.itp-strip i { flex: 1; }\r\n\r\n/* ---- stage ------------------------------------------------------------- */\r\n.itp-stage { grid-area: stage; position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--stage); }\r\n.itp-view { position: relative; flex: 1; min-height: 0; overflow: hidden; cursor: grab; touch-action: none; }\r\n.itp-view.panning { cursor: grabbing; }\r\n.itp-view.picking { cursor: crosshair; }\r\n.itp-view canvas.screen { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }\r\n.itp-split {\r\n position: absolute; top: 0; bottom: 0; width: 0; pointer-events: none;\r\n}\r\n.itp-split::before { content: \"\"; position: absolute; top: 0; bottom: 0; left: -0.5px; width: 1px; background: rgba(255, 255, 255, 0.85); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); }\r\n.itp-split button {\r\n pointer-events: auto; position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%);\r\n width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.2); background: #fff; color: #222; cursor: ew-resize;\r\n display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);\r\n}\r\n.itp-split .lbl { position: absolute; top: 12px; font-size: var(--fs-xs); padding: 2px 7px; border-radius: 4px; background: rgba(0, 0, 0, 0.55); color: #fff; white-space: nowrap; }\r\n.itp-split .lbl.l { right: 10px; } .itp-split .lbl.r { left: 10px; }\r\n\r\n/* floating view controls */\r\n.itp-float { position: absolute; display: flex; gap: 2px; padding: 3px; border-radius: var(--r-md); background: color-mix(in srgb, var(--panel) 88%, transparent); border: 1px solid var(--line); backdrop-filter: blur(8px); }\r\n.itp-float.br { right: 12px; bottom: 12px; }\r\n.itp-float.bl { left: 12px; bottom: 12px; align-items: center; padding: 3px 10px; gap: 10px; color: var(--muted); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; height: 32px; }\r\n.itp-float.bl b { color: var(--text-2); font-weight: 500; }\r\n.itp-busy { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); }\r\n\r\n/* empty state */\r\n.itp-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; }\r\n.itp-drop {\r\n width: min(520px, 100%); padding: 28px; border: 1px dashed var(--line-strong); border-radius: var(--r-lg);\r\n display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; background: color-mix(in srgb, var(--panel) 60%, transparent);\r\n}\r\n.itp-drop h2 { margin: 0; font-size: var(--fs-lg); font-weight: 600; letter-spacing: -0.01em; }\r\n.itp-drop p { margin: 0; color: var(--muted); max-width: 46ch; }\r\n.itp-drop .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }\r\n.itp-drop .samples { display: flex; gap: 8px; margin-top: 4px; }\r\n.itp-drop .samples button { width: 64px; height: 48px; padding: 0; border-radius: var(--r-sm); border: 1px solid var(--line); overflow: hidden; cursor: pointer; background: var(--raised); }\r\n.itp-drop .samples button:hover { border-color: var(--accent); }\r\n.itp-drop .samples img { width: 100%; height: 100%; object-fit: cover; display: block; }\r\n.itp-dragging .itp-view::after {\r\n content: \"Drop to add\"; position: absolute; inset: 12px; border: 2px dashed var(--accent); border-radius: var(--r-lg);\r\n display: grid; place-items: center; color: var(--text); background: var(--accent-soft); font-weight: 500; pointer-events: none;\r\n}\r\n\r\n/* transport (video) */\r\n.itp-transport { display: none; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-top: 1px solid var(--line); background: var(--panel); }\r\n.itp-stage[data-video=\"true\"] .itp-transport { display: flex; }\r\n.itp-time { font-variant-numeric: tabular-nums; color: var(--text-2); font-size: var(--fs-sm); white-space: nowrap; min-width: 108px; }\r\n.itp-time span { color: var(--faint); }\r\n.itp-scrub { flex: 1; }\r\n\r\n/* ---- inspector --------------------------------------------------------- */\r\n.itp-insp-head { padding: 12px 14px 0; display: flex; flex-direction: column; gap: 10px; }\r\n.itp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }\r\n.itp-stat { padding: 7px 10px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }\r\n.itp-stat + .itp-stat { border-left: 1px solid var(--line); }\r\n.itp-stat .k { font-size: var(--fs-xs); color: var(--faint); }\r\n.itp-stat .v { font-weight: 550; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\r\n.itp-stat .v small { font-weight: 400; color: var(--muted); font-size: var(--fs-xs); margin-left: 3px; }\r\n\r\n.itp-sec { border-bottom: 1px solid var(--line); }\r\n.itp-sec-head { display: flex; align-items: center; gap: 2px; padding-right: 8px; }\r\n.itp-sec-toggle {\r\n flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 12px 6px 12px 14px;\r\n border: 0; background: none; text-align: left; cursor: pointer; user-select: none; color: var(--text);\r\n}\r\n.itp-sec-toggle .title { font-weight: 550; white-space: nowrap; }\r\n.itp-sec-toggle .hint { color: var(--faint); font-weight: 400; font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }\r\n.itp-sec-toggle .chev { margin-left: auto; color: var(--faint); display: inline-flex; transition: transform var(--dur) var(--ease); }\r\n.itp-sec[data-open=\"true\"] .itp-sec-toggle .chev { transform: rotate(90deg); }\r\n.itp-sec-toggle:hover .chev { color: var(--text); }\r\n.itp-sec-toggle:focus-visible { border-radius: var(--r-sm); }\r\n.itp-sec-reset { color: var(--faint); }\r\n.itp-sec-reset:hover { color: var(--text); }\r\n.itp-sec .body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 12px; }\r\n\r\n.itp-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }\r\n.itp-field > .lab { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-2); font-size: var(--fs-sm); }\r\n.itp-field > .lab .val { color: var(--text); font-variant-numeric: tabular-nums; }\r\n.itp .help { color: var(--faint); font-size: var(--fs-xs); line-height: 1.4; }\r\n.itp-row { display: flex; gap: 8px; align-items: center; }\r\n.itp-row > * { min-width: 0; }\r\n.itp-row .grow { flex: 1; }\r\n.itp-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }\r\n\r\n/* slider with value */\r\n.itp-slider { display: grid; grid-template-columns: minmax(0, 1fr) 56px; gap: 8px; align-items: center; }\r\n.itp-slider input[type=\"number\"] { height: 26px; padding: 0 6px; text-align: right; font-size: var(--fs-sm); border-radius: 5px; }\r\n.itp-slider input[type=\"number\"]::-webkit-inner-spin-button { opacity: 0.4; }\r\n.itp input[type=\"range\"] {\r\n -webkit-appearance: none; appearance: none; width: 100%; height: 20px; background: transparent; cursor: pointer; margin: 0;\r\n --p: 50%;\r\n}\r\n.itp input[type=\"range\"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--accent) var(--p), var(--raised-2) var(--p)); }\r\n.itp input[type=\"range\"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--raised-2); }\r\n.itp input[type=\"range\"]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }\r\n.itp input[type=\"range\"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: var(--text); border: 3px solid var(--panel); box-shadow: 0 0 0 1px var(--line-strong); }\r\n.itp input[type=\"range\"]::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: var(--text); border: 3px solid var(--panel); box-shadow: 0 0 0 1px var(--line-strong); }\r\n.itp input[type=\"range\"]:focus-visible { box-shadow: none; }\r\n.itp input[type=\"range\"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--accent); }\r\n.itp input[type=\"range\"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 2px var(--accent); }\r\n\r\n/* switch */\r\n.itp-switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; color: var(--text-2); font-size: var(--fs-sm); }\r\n.itp-switch input { appearance: none; width: 28px; height: 16px; border-radius: 8px; background: var(--raised-2); border: 1px solid var(--line-strong); position: relative; cursor: pointer; flex: none; transition: background var(--dur) var(--ease); margin: 0; }\r\n.itp-switch input::after { content: \"\"; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); transition: transform var(--dur) var(--ease), background var(--dur) var(--ease); }\r\n.itp-switch input:checked { background: var(--accent); border-color: var(--accent); }\r\n.itp-switch input:checked::after { transform: translateX(12px); background: var(--accent-ink); }\r\n\r\n/* swatches */\r\n.itp-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(22px, 1fr)); gap: 4px; }\r\n.itp-swatch { aspect-ratio: 1; border-radius: 4px; border: 0; padding: 0; cursor: pointer; position: relative; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.25); }\r\n.itp-swatch:hover { transform: scale(1.12); z-index: 1; }\r\n.itp-swatch.add { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--muted); display: grid; place-items: center; }\r\n.itp-swatch.add:hover { color: var(--text); }\r\n.itp-color { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px 0 4px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); cursor: pointer; }\r\n.itp-color input[type=\"color\"] { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 4px; background: none; cursor: pointer; }\r\n.itp-color input[type=\"color\"]::-webkit-color-swatch-wrapper { padding: 0; }\r\n.itp-color input[type=\"color\"]::-webkit-color-swatch { border: 0; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.3); }\r\n.itp-color input[type=\"color\"]::-moz-color-swatch { border: 0; border-radius: 4px; }\r\n\r\n.itp-scope { display: flex; flex-direction: column; gap: 6px; }\r\n.itp-scope .lab { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-sm); color: var(--text-2); }\r\n.itp-scope-note { color: var(--faint); font-size: var(--fs-xs); }\r\n.itp-insp[data-scope=\"own\"] .itp-scope-note { color: var(--accent); }\r\n.itp-insp[data-scope=\"own\"] .itp-scope .itp-seg button[aria-pressed=\"true\"] { box-shadow: 0 0 0 1px var(--accent); color: var(--text); }\r\n\r\n.itp-aspects { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }\r\n.itp-aspects button {\r\n display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; height: 52px;\r\n border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); color: var(--muted); cursor: pointer; font-size: var(--fs-xs);\r\n}\r\n.itp-aspects button:hover { border-color: var(--line-strong); color: var(--text); }\r\n.itp-aspects button[aria-pressed=\"true\"] { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }\r\n.itp-aspects i { display: block; border: 1.5px solid currentColor; border-radius: 2px; }\r\n.itp-aspects i.orig { border-style: dashed; }\r\n\r\n.itp-insp-foot { padding: 12px 14px 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); }\r\n\r\n/* ---- popovers, dialogs, toasts ---------------------------------------- */\r\n.itp-menu {\r\n position: fixed; z-index: 50; min-width: 240px; max-width: calc(100vw - 16px); padding: 5px; border-radius: var(--r-lg);\r\n background: var(--panel); box-shadow: var(--shadow-pop); display: flex; flex-direction: column;\r\n}\r\n.itp-menu[hidden] { display: none; }\r\n.itp-menu .mi {\r\n display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 9px; border-radius: var(--r-sm);\r\n border: 0; background: none; text-align: left; cursor: pointer; color: var(--text-2);\r\n}\r\n.itp-menu .mi:hover, .itp-menu .mi:focus-visible { background: var(--raised); color: var(--text); box-shadow: none; }\r\n.itp-menu .mi:disabled { opacity: 0.4; cursor: default; background: none; }\r\n.itp-menu .mi small { display: block; color: var(--faint); font-size: var(--fs-xs); }\r\n.itp-menu .mlabel { padding: 8px 9px 4px; font-size: var(--fs-xs); color: var(--faint); }\r\n.itp-menu hr { margin: 5px 4px; }\r\n\r\n.itp-dialog { border: 0; padding: 0; border-radius: var(--r-lg); background: var(--panel); color: var(--text); box-shadow: var(--shadow-pop); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 48px); }\r\n.itp-dialog::backdrop { background: rgba(0, 0, 0, 0.45); }\r\n.itp-dialog header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }\r\n.itp-dialog header h2 { margin: 0; font-size: var(--fs-lg); font-weight: 600; }\r\n.itp-dialog .content { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 14px; overflow: auto; }\r\n.itp-dialog footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }\r\n.itp-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 24px; }\r\n.itp-keys div { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); color: var(--text-2); }\r\n.itp-keys div span:last-child { display: flex; gap: 3px; }\r\n\r\n.itp-toasts { position: fixed; z-index: 60; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }\r\n.itp-toast {\r\n pointer-events: auto; display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: min(520px, calc(100vw - 24px));\r\n padding: 9px 10px 9px 12px; border-radius: var(--r-md); background: var(--raised); color: var(--text); box-shadow: var(--shadow-pop); font-size: var(--fs-sm);\r\n animation: itp-in 160ms var(--ease);\r\n}\r\n.itp-toast .msg { flex: 1; }\r\n.itp-toast.error .itp-dot { background: var(--danger); }\r\n.itp-toast.ok .itp-dot { background: var(--ok); }\r\n.itp-toast.info .itp-dot { background: var(--accent); }\r\n.itp-progress { height: 3px; border-radius: 2px; background: var(--raised-2); overflow: hidden; margin-top: 6px; }\r\n.itp-progress i { display: block; height: 100%; background: var(--accent); width: 0; transition: width 120ms linear; }\r\n@keyframes itp-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }\r\n\r\n.itp-spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: itp-spin 700ms linear infinite; }\r\n@keyframes itp-spin { to { transform: rotate(360deg); } }\r\n\r\n/* ---- responsive -------------------------------------------------------- */\r\n@media (max-width: 1100px) {\r\n .itp-app { --lib-w: 232px; --insp-w: 288px; }\r\n}\r\n@media (max-width: 900px) {\r\n /* tablet: library becomes an overlay drawer */\r\n .itp-app { grid-template-columns: 0 minmax(0, 1fr) var(--insp-w, 288px); }\r\n .itp-lib { position: absolute; z-index: 30; top: 0; bottom: 0; left: 0; width: 280px; box-shadow: var(--shadow-pop); transform: translateX(-100%); transition: transform 180ms var(--ease); visibility: hidden; }\r\n .itp-app[data-lib=\"open\"] .itp-lib { transform: none; visibility: visible; }\r\n .itp-top .collapse-only { display: inline-flex; }\r\n .itp-file .meta { display: none; }\r\n}\r\n@media (max-width: 680px) {\r\n /* phone: stage on top, inspector as a bottom sheet */\r\n .itp-app { grid-template-columns: minmax(0, 1fr); grid-template-rows: 48px minmax(0, 1fr) auto; grid-template-areas: \"top\" \"stage\" \"insp\"; }\r\n .itp-insp { border-left: 0; border-top: 1px solid var(--line); max-height: 46vh; }\r\n .itp-app[data-insp=\"closed\"] .itp-insp { max-height: 0; }\r\n .itp-top .hide-sm { display: none; }\r\n .itp-file .name { max-width: 14ch; }\r\n .itp-float.bl { display: none; }\r\n}\r\n"],
5
5
  "mappings": "AAGA,WAAa,YAAa,MAAS,IAAK,uBAAyB,OAAO,SAAU,YAAa,IAAI,IAAK,WAAY,OAAQ,aAAc,IAAM,CAChJ,WAAa,YAAa,eAAkB,IAAK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J,SAC1H,GAAK,UAAW,OAAO,OAAS,CAAE,CAGxD,OAAO,UAAY,QACjB,CAnWD,QAmWY,SAAS,MAAO,UAAU,KAAO,CAC9C,CACA,OAAO,UAAY,OAEjB,CAvWD,QAuWY,sBAAuB,EAAE,OAAO,CAAC,CAAE,KAAK,IAAI,QAAQ,EAAE,MAAQ,CACzE,CA/RD,QA+RY,SAAU,SAAU,QAAS,GAAI,IAAK,EAAG,OAAQ,EAAG,KAAM,EAAG,MAAO,MAAO,WAAY,IAAI,cAAe,UAAW,UAAW,OAAQ,WAAY,UAAU,KAAM,IAAI,QAAS,WAAY,MAAQ,CAChN,CAzWD,OAyWS,CAAC,eAAiB,CAhS3B,QAgSsC,UAAW,KAAM,WAAY,OAAS,CAC3E,CAzTD,QAyTU,CArSD,cAqSkB,QAAS,WAAa,CAChD,CA3SD,SA2SW,CAzSD,KAySS,QAAS,IAAM,CACnC,CACA,OAAO,UAAY,OAEjB,CA/WD,QA+WY,sBAAuB,OAAO,CAAC,CAAE,KAAM,mBAAoB,KAAK,OAAO,CAAC,CAAE,KAAK,KAAM,oBAAqB,MAAM,QAAQ,MAAQ,CAC3I,CAvSS,SAuSG,YAAa,EAAG,WAAY,IAAI,MAAM,IAAI,QAAS,WAAY,IAAM,CACjF,CAjXD,OAiXS,CAAC,kBAAoB,CAxSpB,SAwSgC,WAAY,CAAG,CACxD,CAjUD,QAiUU,CAAC,QAAU,QAAS,IAAM,CACnC,CAnTD,SAmTW,CAlTD,KAkTS,UAAW,IAAM,CACnC,CArLD,SAqLW,CAnLD,GAmLO,QAAS,IAAM,CACjC",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- /*! image-to-pixel v3 | MIT | https://github.com/Tezumie/Image-to-Pixel */
1
+ /*! image-to-pixel v3.0.1 | MIT | https://github.com/Tezumie/Image-to-Pixel */
2
2
  var gi=Object.defineProperty;var St=(e,t)=>()=>(e&&(t=e(e=0)),t);var bi=(e,t)=>{for(var n in t)gi(e,n,{get:t[n],enumerable:!0})};function gt(e){if(Array.isArray(e))return[e[0]|0,e[1]|0,e[2]|0];let t=String(e).trim().replace(/^#|^0x/i,"");if((t.length===3||t.length===4)&&(t=t.slice(0,3).split("").map(n=>n+n).join("")),!/^[0-9a-f]{6}([0-9a-f]{2})?$/i.test(t))throw new Error(`Invalid colour "${e}"`);return[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16)]}function mn(e){try{return gt(e),!0}catch{return!1}}function Ot(e){return"#"+e.slice(0,3).map(t=>Math.max(0,Math.min(255,Math.round(t))).toString(16).padStart(2,"0")).join("")}function Gn(e,t,n){e=Bn(e),t=Bn(t),n=Bn(n);let o=Math.cbrt(.4122214708*e+.5363325363*t+.0514459929*n),i=Math.cbrt(.2119034982*e+.6806995451*t+.1073969566*n),r=Math.cbrt(.0883024619*e+.2817188376*t+.6299787005*n);return[.2104542553*o+.793617785*i-.0040720468*r,1.9779984951*o-2.428592205*i+.4505937099*r,.0259040371*o+.7827717662*i-.808675766*r]}function ko(e){if(e.length<2)return 1;let t=0;for(let n=0;n<e.length;n++){let o=1/0;for(let i=0;i<e.length;i++){if(n===i)continue;let r=e[n][0]-e[i][0],a=e[n][1]-e[i][1],c=e[n][2]-e[i][2],l=Math.sqrt(r*r+a*a+c*c);l<o&&(o=l)}t+=o}return Math.max(.04,Math.min(1,t/e.length/255))}var Ne,Bn,gn,bt=St(()=>{Ne=e=>Ot(gt(e)),Bn=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);gn=[.2126,.7152,.0722]});function _t(e,t=1,n={}){t=Math.max(1,Math.round(t));let o=e.width*t,i=e.height*t,r=new Uint8ClampedArray(o*i*4),a=e.data,c=e.width;for(let l=0;l<i;l++){let s=l/t|0;for(let d=0;d<o;d++){let f=(s*c+(d/t|0))*4,u=(l*o+d)*4;r[u]=a[f],r[u+1]=a[f+1],r[u+2]=a[f+2],r[u+3]=a[f+3]}}if(n.grid&&t>=3){let[l,s,d]=gt(n.gridColor||"#000000"),f=n.gridAlpha??.35;for(let u=0;u<i;u++)for(let h=0;h<o;h++){if(h%t&&u%t)continue;let x=(u*o+h)*4,E=r[x+3]/255,y=f+E*(1-f);r[x]=(l*f+r[x]*E*(1-f))/y,r[x+1]=(s*f+r[x+1]*E*(1-f))/y,r[x+2]=(d*f+r[x+2]*E*(1-f))/y,r[x+3]=y*255}}return{width:o,height:i,data:r}}function Ar(e,t,n){t=Math.max(1,Math.round(t)),n=Math.max(1,Math.round(n));let o=new Uint8ClampedArray(t*n*4),i=new Int32Array(t);for(let r=0;r<t;r++)i[r]=Math.min(e.width-1,Math.floor((r+.5)*e.width/t));for(let r=0;r<n;r++){let a=Math.min(e.height-1,Math.floor((r+.5)*e.height/n));for(let c=0;c<t;c++){let l=(a*e.width+i[c])*4,s=(r*t+c)*4;o[s]=e.data[l],o[s+1]=e.data[l+1],o[s+2]=e.data[l+2],o[s+3]=e.data[l+3]}}return{width:t,height:n,data:o}}function Pr(e,t=1/0){let n=new Set,o=e.data;for(let i=0;i<o.length&&!(o[i+3]!==0&&(n.add(o[i]<<16|o[i+1]<<8|o[i+2]),n.size>t));i+=4);return[...n].map(i=>Ot([i>>16,i>>8&255,i&255]))}function Lr(e,t=8){let{width:n,height:o,data:i}=e,r=(d,f)=>Math.abs(i[d]-i[f])<=t&&Math.abs(i[d+1]-i[f+1])<=t&&Math.abs(i[d+2]-i[f+2])<=t&&Math.abs(i[d+3]-i[f+3])<=t,a=(d,f)=>f?a(f,d%f):d,c=0,l=Math.max(1,Math.floor(o/64)),s=Math.max(1,Math.floor(n/64));for(let d=0;d<o;d+=l){let f=1;for(let u=1;u<n;u++)if(r((d*n+u)*4,(d*n+u-1)*4))f++;else if(c=a(c,f),f=1,c===1)return 1}for(let d=0;d<n;d+=s){let f=1;for(let u=1;u<o;u++)if(r((u*n+d)*4,((u-1)*n+d)*4))f++;else if(c=a(c,f),f=1,c===1)return 1}return c||1}var Bt=St(()=>{bt()});function ns(e){let t=e.split(/\r?\n/);if(!/^GIMP Palette/i.test(t[0]||""))throw new Error('Not a GIMP palette (missing "GIMP Palette" header)');let n="",o=[];for(let i of t.slice(1)){let r=i.trim();if(!r||r.startsWith("#"))continue;let a=/^Name:\s*(.*)$/i.exec(r);if(a){n=a[1].trim();continue}if(/^Columns:/i.test(r))continue;let c=/^(\d{1,3})\s+(\d{1,3})\s+(\d{1,3})/.exec(r);c&&o.push(Ne([+c[1],+c[2],+c[3]]))}return{name:n,colors:o}}function Ir(e){let t=[];for(let n of e.split(/\r?\n/)){let o=n.trim();if(!o||o.startsWith(";")||o.startsWith("//"))continue;let i=/^#?([0-9a-f]{6}|[0-9a-f]{8}|[0-9a-f]{3})\b/i.exec(o);if(!i)continue;let r=i[1].length===8?i[1].slice(2):i[1];t.push(Ne(r))}return{name:"",colors:t}}function os(e){let t=e.split(/\r?\n/).map(i=>i.trim());if(t[0]!=="JASC-PAL")throw new Error("Not a JASC palette");let n=parseInt(t[2],10)||0,o=[];for(let i=3;i<3+n&&i<t.length;i++){let r=/^(\d+)\s+(\d+)\s+(\d+)/.exec(t[i]);r&&o.push(Ne([+r[1],+r[2],+r[3]]))}return{name:"",colors:o}}function io(e){let t=typeof e=="string"?JSON.parse(e):e,o=(Array.isArray(t)?t:t.colors||t.palette||[]).map(i=>typeof i=="object"&&i?i.hex||i.color:i).filter(Boolean).map(Ne);return{name:!Array.isArray(t)&&t.name||"",colors:o}}function rs(e){let t=[],n=/#?\b([0-9a-f]{6})\b/gi,o;for(;o=n.exec(e);)t.push(Ne(o[1]));return{name:"",colors:t}}function ao(e,t=""){let n=(/\.([a-z0-9]+)$/i.exec(t)||[])[1]?.toLowerCase()||"",i=String(e).replace(/^/,"").trim(),r;if(n==="gpl"||/^GIMP Palette/i.test(i)?r=ns(i):n==="pal"||i.startsWith("JASC-PAL")?r=os(i):n==="json"||i.startsWith("{")||i.startsWith("[")?r=io(i):n==="hex"||n==="txt"?r=Ir(i):(r=Ir(i),r.colors.length||(r=rs(i))),r.colors=ts(r.colors).slice(0,256),!r.name&&t&&(r.name=t.replace(/\.[^.]+$/,"").replace(/[-_]+/g," ")),!r.colors.length)throw new Error("No colours found in that palette");return r}function Fr(e,t){let n=t.map(o=>{let i=Ne(o),r=parseInt(i.slice(1,3),16),a=parseInt(i.slice(3,5),16),c=parseInt(i.slice(5,7),16);return`${String(r).padStart(3)} ${String(a).padStart(3)} ${String(c).padStart(3)} ${i.slice(1)}`});return`GIMP Palette
3
3
  Name: ${e||"Palette"}
4
4
  Columns: 8