@flux-ui/dashboard 3.0.0-next.7 → 3.0.0-next.70

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 (44) hide show
  1. package/README.md +26 -35
  2. package/dist/component/FluxDashboard.vue.d.ts +11 -23
  3. package/dist/component/FluxDashboardContent.vue.d.ts +8 -12
  4. package/dist/component/FluxDashboardHeader.vue.d.ts +10 -13
  5. package/dist/component/FluxDashboardMenu.vue.d.ts +13 -15
  6. package/dist/component/FluxDashboardNavigation.vue.d.ts +8 -16
  7. package/dist/component/FluxDashboardSide.vue.d.ts +12 -14
  8. package/dist/component/FluxDashboardTopBar.vue.d.ts +8 -12
  9. package/dist/component/index.d.ts +0 -1
  10. package/dist/composable/index.d.ts +0 -1
  11. package/dist/composable/useDashboardInjection.d.ts +0 -1
  12. package/dist/data/index.d.ts +0 -1
  13. package/dist/index.css +427 -1
  14. package/dist/index.d.ts +0 -1
  15. package/dist/index.js +3894 -219
  16. package/dist/index.js.map +1 -1
  17. package/dist/types.d.ts +13 -0
  18. package/package.json +19 -17
  19. package/src/component/FluxDashboard.vue +4 -4
  20. package/src/component/FluxDashboardContent.vue +2 -2
  21. package/src/component/FluxDashboardHeader.vue +1 -1
  22. package/src/component/FluxDashboardMenu.vue +6 -4
  23. package/src/component/FluxDashboardNavigation.vue +2 -2
  24. package/src/component/FluxDashboardSide.vue +1 -1
  25. package/src/component/FluxDashboardTopBar.vue +2 -2
  26. package/src/composable/useDashboardInjection.ts +1 -1
  27. package/src/css/component/Dashboard.module.scss +5 -4
  28. package/src/css/component/DashboardContent.module.scss +9 -9
  29. package/src/css/component/DashboardNavigation.module.scss +13 -11
  30. package/src/css/component/DashboardPane.module.scss +7 -7
  31. package/src/css/component/DashboardTopBar.module.scss +7 -7
  32. package/dist/component/FluxDashboard.vue.d.ts.map +0 -1
  33. package/dist/component/FluxDashboardContent.vue.d.ts.map +0 -1
  34. package/dist/component/FluxDashboardHeader.vue.d.ts.map +0 -1
  35. package/dist/component/FluxDashboardMenu.vue.d.ts.map +0 -1
  36. package/dist/component/FluxDashboardNavigation.vue.d.ts.map +0 -1
  37. package/dist/component/FluxDashboardSide.vue.d.ts.map +0 -1
  38. package/dist/component/FluxDashboardTopBar.vue.d.ts.map +0 -1
  39. package/dist/component/index.d.ts.map +0 -1
  40. package/dist/composable/index.d.ts.map +0 -1
  41. package/dist/composable/useDashboardInjection.d.ts.map +0 -1
  42. package/dist/data/index.d.ts.map +0 -1
  43. package/dist/index.d.ts.map +0 -1
  44. package/tsconfig.json +0 -45
package/dist/index.js CHANGED
@@ -1,221 +1,3896 @@
1
- import { ref as g, watch as y, unref as a, defineComponent as m, provide as E, createElementBlock as u, openBlock as l, normalizeClass as i, renderSlot as r, createElementVNode as h, inject as x, createBlock as $, withCtx as N, createCommentVNode as _, createVNode as b, toDisplayString as S, useSlots as R, resolveComponent as A, mergeProps as j, normalizeProps as O, guardReactiveProps as P, Fragment as V, renderList as J } from "vue";
2
- import { DateTime as k } from "luxon";
3
- import { FluxIcon as w, FluxSpacer as M, FluxMenuItem as L } from "@flux-ui/components";
4
- function K(n, s, o, e = { passive: !0 }) {
5
- y(n, (t, d, c) => {
6
- t && (t.addEventListener(s, o, e), c(() => t.removeEventListener(s, o)));
7
- }, { immediate: !0 });
8
- }
9
- function B(n, s) {
10
- let o = `flux/${n}`, e = g(t() ?? s);
11
- function t() {
12
- if (o in localStorage) {
13
- let d = JSON.parse(localStorage.getItem(o));
14
- return Array.isArray(d) && d[0] === "DateTime" && (d = k.fromISO(d[1])), d;
15
- }
16
- return null;
17
- }
18
- return y(e, (d) => {
19
- let c = d;
20
- k.isDateTime(d) && (c = ["DateTime", d.toISO({ includeOffset: !0, extendedZone: !0 })]), localStorage.setItem(o, JSON.stringify(c));
21
- }), e;
22
- }
23
- function Z(n) {
24
- let s = g(0), o = g(0);
25
- return n || (n = g(document)), K(n, "scroll", () => {
26
- let e = a(n);
27
- e instanceof Document && (e = e.scrollingElement), s.value = (e == null ? void 0 : e.scrollLeft) ?? 0, o.value = (e == null ? void 0 : e.scrollTop) ?? 0;
28
- }), { x: s, y: o };
29
- }
30
- const z = Symbol(), q = "root", G = "dashboard", Q = "dashboard-mount", U = "is-resizing", W = "dashboard-navigation", X = "dashboard-navigation-collapsed", Y = "dashboard-menu", aa = "dashboard-side", F = { root: q, dashboard: G, dashboardMount: Q, isResizing: U, dashboardNavigation: W, dashboardNavigationCollapsed: X, dashboardMenu: Y, dashboardSide: aa }, Wa = /* @__PURE__ */ m({
31
- __name: "FluxDashboard",
32
- setup(n) {
33
- const s = B("dashboard-menu-collapsed", !0), o = B("dashboard-navigation-collapsed", !0), e = g(!1);
34
- return E(z, {
35
- isMenuCollapsed: s,
36
- isNavigationCollapsed: o
37
- }), y(o, (t, d, c) => {
38
- let p;
39
- function T() {
40
- clearTimeout(p), e.value = !0, p = setTimeout(() => e.value = !1, 10);
41
- }
42
- window.addEventListener("resize", T, { passive: !0 }), c(() => window.removeEventListener("resize", T));
43
- }, { immediate: !0 }), (t, d) => (l(), u("div", {
44
- class: i([a(F).dashboard, e.value && a(F).isResizing])
45
- }, [
46
- r(t.$slots, "navigation"),
47
- r(t.$slots, "menu"),
48
- h("div", {
49
- class: i(a(F).dashboardMount)
50
- }, [
51
- r(t.$slots, "header"),
52
- r(t.$slots, "default")
53
- ], 2),
54
- r(t.$slots, "side")
55
- ], 2));
56
- }
1
+ import { Fragment, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, customRef, defineComponent, guardReactiveProps, inject, markRaw, mergeProps, normalizeClass, normalizeProps, openBlock, provide, ref, renderList, renderSlot, resolveComponent, toDisplayString, unref, useSlots, watch, withCtx } from "vue";
2
+ import { DateTime } from "luxon";
3
+ import { FluxIcon, FluxMenuItem, FluxSpacer } from "@flux-ui/components";
4
+ //#region ../../node_modules/.bun/@basmilius+utils@3.35.0+f2ed1ec6a4c7f7fd/node_modules/@basmilius/utils/dist/index.mjs
5
+ function x(e) {
6
+ let t = {};
7
+ do {
8
+ if (e.name === ``) break;
9
+ for (let [n, r] of Object.entries(Object.getOwnPropertyDescriptors(e.prototype))) [
10
+ `constructor`,
11
+ `clone`,
12
+ `toJSON`
13
+ ].includes(n) || !r.get && !r.set || (t[n] = r);
14
+ } while (e = Object.getPrototypeOf(e));
15
+ return t;
16
+ }
17
+ function G(e, t, n) {
18
+ e.prototype[t] = n;
19
+ }
20
+ function K(e, t, n) {
21
+ Object.defineProperty(e, t, { value: n });
22
+ }
23
+ //#endregion
24
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rgb/parseNumber.js
25
+ var parseNumber = (color, len) => {
26
+ if (typeof color !== "number") return;
27
+ if (len === 3) return {
28
+ mode: "rgb",
29
+ r: (color >> 8 & 15 | color >> 4 & 240) / 255,
30
+ g: (color >> 4 & 15 | color & 240) / 255,
31
+ b: (color & 15 | color << 4 & 240) / 255
32
+ };
33
+ if (len === 4) return {
34
+ mode: "rgb",
35
+ r: (color >> 12 & 15 | color >> 8 & 240) / 255,
36
+ g: (color >> 8 & 15 | color >> 4 & 240) / 255,
37
+ b: (color >> 4 & 15 | color & 240) / 255,
38
+ alpha: (color & 15 | color << 4 & 240) / 255
39
+ };
40
+ if (len === 6) return {
41
+ mode: "rgb",
42
+ r: (color >> 16 & 255) / 255,
43
+ g: (color >> 8 & 255) / 255,
44
+ b: (color & 255) / 255
45
+ };
46
+ if (len === 8) return {
47
+ mode: "rgb",
48
+ r: (color >> 24 & 255) / 255,
49
+ g: (color >> 16 & 255) / 255,
50
+ b: (color >> 8 & 255) / 255,
51
+ alpha: (color & 255) / 255
52
+ };
53
+ };
54
+ //#endregion
55
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/colors/named.js
56
+ var named = {
57
+ aliceblue: 15792383,
58
+ antiquewhite: 16444375,
59
+ aqua: 65535,
60
+ aquamarine: 8388564,
61
+ azure: 15794175,
62
+ beige: 16119260,
63
+ bisque: 16770244,
64
+ black: 0,
65
+ blanchedalmond: 16772045,
66
+ blue: 255,
67
+ blueviolet: 9055202,
68
+ brown: 10824234,
69
+ burlywood: 14596231,
70
+ cadetblue: 6266528,
71
+ chartreuse: 8388352,
72
+ chocolate: 13789470,
73
+ coral: 16744272,
74
+ cornflowerblue: 6591981,
75
+ cornsilk: 16775388,
76
+ crimson: 14423100,
77
+ cyan: 65535,
78
+ darkblue: 139,
79
+ darkcyan: 35723,
80
+ darkgoldenrod: 12092939,
81
+ darkgray: 11119017,
82
+ darkgreen: 25600,
83
+ darkgrey: 11119017,
84
+ darkkhaki: 12433259,
85
+ darkmagenta: 9109643,
86
+ darkolivegreen: 5597999,
87
+ darkorange: 16747520,
88
+ darkorchid: 10040012,
89
+ darkred: 9109504,
90
+ darksalmon: 15308410,
91
+ darkseagreen: 9419919,
92
+ darkslateblue: 4734347,
93
+ darkslategray: 3100495,
94
+ darkslategrey: 3100495,
95
+ darkturquoise: 52945,
96
+ darkviolet: 9699539,
97
+ deeppink: 16716947,
98
+ deepskyblue: 49151,
99
+ dimgray: 6908265,
100
+ dimgrey: 6908265,
101
+ dodgerblue: 2003199,
102
+ firebrick: 11674146,
103
+ floralwhite: 16775920,
104
+ forestgreen: 2263842,
105
+ fuchsia: 16711935,
106
+ gainsboro: 14474460,
107
+ ghostwhite: 16316671,
108
+ gold: 16766720,
109
+ goldenrod: 14329120,
110
+ gray: 8421504,
111
+ green: 32768,
112
+ greenyellow: 11403055,
113
+ grey: 8421504,
114
+ honeydew: 15794160,
115
+ hotpink: 16738740,
116
+ indianred: 13458524,
117
+ indigo: 4915330,
118
+ ivory: 16777200,
119
+ khaki: 15787660,
120
+ lavender: 15132410,
121
+ lavenderblush: 16773365,
122
+ lawngreen: 8190976,
123
+ lemonchiffon: 16775885,
124
+ lightblue: 11393254,
125
+ lightcoral: 15761536,
126
+ lightcyan: 14745599,
127
+ lightgoldenrodyellow: 16448210,
128
+ lightgray: 13882323,
129
+ lightgreen: 9498256,
130
+ lightgrey: 13882323,
131
+ lightpink: 16758465,
132
+ lightsalmon: 16752762,
133
+ lightseagreen: 2142890,
134
+ lightskyblue: 8900346,
135
+ lightslategray: 7833753,
136
+ lightslategrey: 7833753,
137
+ lightsteelblue: 11584734,
138
+ lightyellow: 16777184,
139
+ lime: 65280,
140
+ limegreen: 3329330,
141
+ linen: 16445670,
142
+ magenta: 16711935,
143
+ maroon: 8388608,
144
+ mediumaquamarine: 6737322,
145
+ mediumblue: 205,
146
+ mediumorchid: 12211667,
147
+ mediumpurple: 9662683,
148
+ mediumseagreen: 3978097,
149
+ mediumslateblue: 8087790,
150
+ mediumspringgreen: 64154,
151
+ mediumturquoise: 4772300,
152
+ mediumvioletred: 13047173,
153
+ midnightblue: 1644912,
154
+ mintcream: 16121850,
155
+ mistyrose: 16770273,
156
+ moccasin: 16770229,
157
+ navajowhite: 16768685,
158
+ navy: 128,
159
+ oldlace: 16643558,
160
+ olive: 8421376,
161
+ olivedrab: 7048739,
162
+ orange: 16753920,
163
+ orangered: 16729344,
164
+ orchid: 14315734,
165
+ palegoldenrod: 15657130,
166
+ palegreen: 10025880,
167
+ paleturquoise: 11529966,
168
+ palevioletred: 14381203,
169
+ papayawhip: 16773077,
170
+ peachpuff: 16767673,
171
+ peru: 13468991,
172
+ pink: 16761035,
173
+ plum: 14524637,
174
+ powderblue: 11591910,
175
+ purple: 8388736,
176
+ rebeccapurple: 6697881,
177
+ red: 16711680,
178
+ rosybrown: 12357519,
179
+ royalblue: 4286945,
180
+ saddlebrown: 9127187,
181
+ salmon: 16416882,
182
+ sandybrown: 16032864,
183
+ seagreen: 3050327,
184
+ seashell: 16774638,
185
+ sienna: 10506797,
186
+ silver: 12632256,
187
+ skyblue: 8900331,
188
+ slateblue: 6970061,
189
+ slategray: 7372944,
190
+ slategrey: 7372944,
191
+ snow: 16775930,
192
+ springgreen: 65407,
193
+ steelblue: 4620980,
194
+ tan: 13808780,
195
+ teal: 32896,
196
+ thistle: 14204888,
197
+ tomato: 16737095,
198
+ turquoise: 4251856,
199
+ violet: 15631086,
200
+ wheat: 16113331,
201
+ white: 16777215,
202
+ whitesmoke: 16119285,
203
+ yellow: 16776960,
204
+ yellowgreen: 10145074
205
+ };
206
+ //#endregion
207
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rgb/parseNamed.js
208
+ var parseNamed = (color) => {
209
+ return parseNumber(named[color.toLowerCase()], 6);
210
+ };
211
+ //#endregion
212
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rgb/parseHex.js
213
+ var hex = /^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i;
214
+ var parseHex = (color) => {
215
+ let match;
216
+ return (match = color.match(hex)) ? parseNumber(parseInt(match[1], 16), match[1].length) : void 0;
217
+ };
218
+ //#endregion
219
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/util/regex.js
220
+ var num$1 = "([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)";
221
+ `${num$1}`;
222
+ var per = `${num$1}%`;
223
+ `${num$1}`;
224
+ var num_per = `(?:${num$1}%|${num$1})`;
225
+ var num_per_none = `(?:${num$1}%|${num$1}|none)`;
226
+ var hue$1 = `(?:${num$1}(deg|grad|rad|turn)|${num$1})`;
227
+ `${num$1}${num$1}`;
228
+ var c = `\\s*,\\s*`;
229
+ new RegExp("^" + num_per_none + "$");
230
+ //#endregion
231
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rgb/parseRgbLegacy.js
232
+ var rgb_num_old = new RegExp(`^rgba?\\(\\s*${num$1}${c}${num$1}${c}${num$1}\\s*(?:,\\s*${num_per}\\s*)?\\)$`);
233
+ var rgb_per_old = new RegExp(`^rgba?\\(\\s*${per}${c}${per}${c}${per}\\s*(?:,\\s*${num_per}\\s*)?\\)$`);
234
+ var parseRgbLegacy = (color) => {
235
+ let res = { mode: "rgb" };
236
+ let match;
237
+ if (match = color.match(rgb_num_old)) {
238
+ if (match[1] !== void 0) res.r = match[1] / 255;
239
+ if (match[2] !== void 0) res.g = match[2] / 255;
240
+ if (match[3] !== void 0) res.b = match[3] / 255;
241
+ } else if (match = color.match(rgb_per_old)) {
242
+ if (match[1] !== void 0) res.r = match[1] / 100;
243
+ if (match[2] !== void 0) res.g = match[2] / 100;
244
+ if (match[3] !== void 0) res.b = match[3] / 100;
245
+ } else return;
246
+ if (match[4] !== void 0) res.alpha = Math.max(0, Math.min(1, match[4] / 100));
247
+ else if (match[5] !== void 0) res.alpha = Math.max(0, Math.min(1, +match[5]));
248
+ return res;
249
+ };
250
+ //#endregion
251
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/_prepare.js
252
+ var prepare = (color, mode) => color === void 0 ? void 0 : typeof color !== "object" ? parse(color) : color.mode !== void 0 ? color : mode ? {
253
+ ...color,
254
+ mode
255
+ } : void 0;
256
+ //#endregion
257
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/converter.js
258
+ var converter = (target_mode = "rgb") => (color) => (color = prepare(color, target_mode)) !== void 0 ? color.mode === target_mode ? color : converters[color.mode][target_mode] ? converters[color.mode][target_mode](color) : target_mode === "rgb" ? converters[color.mode].rgb(color) : converters.rgb[target_mode](converters[color.mode].rgb(color)) : void 0;
259
+ //#endregion
260
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/modes.js
261
+ var converters = {};
262
+ var modes = {};
263
+ var parsers = [];
264
+ var colorProfiles = {};
265
+ var identity = (v) => v;
266
+ var useMode = (definition) => {
267
+ converters[definition.mode] = {
268
+ ...converters[definition.mode],
269
+ ...definition.toMode
270
+ };
271
+ Object.keys(definition.fromMode || {}).forEach((k) => {
272
+ if (!converters[k]) converters[k] = {};
273
+ converters[k][definition.mode] = definition.fromMode[k];
274
+ });
275
+ if (!definition.ranges) definition.ranges = {};
276
+ if (!definition.difference) definition.difference = {};
277
+ definition.channels.forEach((channel) => {
278
+ if (definition.ranges[channel] === void 0) definition.ranges[channel] = [0, 1];
279
+ if (!definition.interpolate[channel]) throw new Error(`Missing interpolator for: ${channel}`);
280
+ if (typeof definition.interpolate[channel] === "function") definition.interpolate[channel] = { use: definition.interpolate[channel] };
281
+ if (!definition.interpolate[channel].fixup) definition.interpolate[channel].fixup = identity;
282
+ });
283
+ modes[definition.mode] = definition;
284
+ (definition.parse || []).forEach((parser) => {
285
+ useParser(parser, definition.mode);
286
+ });
287
+ return converter(definition.mode);
288
+ };
289
+ var getMode = (mode) => modes[mode];
290
+ var useParser = (parser, mode) => {
291
+ if (typeof parser === "string") {
292
+ if (!mode) throw new Error(`'mode' required when 'parser' is a string`);
293
+ colorProfiles[parser] = mode;
294
+ } else if (typeof parser === "function") {
295
+ if (parsers.indexOf(parser) < 0) parsers.push(parser);
296
+ }
297
+ };
298
+ //#endregion
299
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/parse.js
300
+ var IdentStartCodePoint = /[^\x00-\x7F]|[a-zA-Z_]/;
301
+ var IdentCodePoint = /[^\x00-\x7F]|[-\w]/;
302
+ var Tok = {
303
+ Function: "function",
304
+ Ident: "ident",
305
+ Number: "number",
306
+ Percentage: "percentage",
307
+ ParenClose: ")",
308
+ None: "none",
309
+ Hue: "hue",
310
+ Alpha: "alpha"
311
+ };
312
+ var _i = 0;
313
+ function is_num(chars) {
314
+ let ch = chars[_i];
315
+ let ch1 = chars[_i + 1];
316
+ if (ch === "-" || ch === "+") return /\d/.test(ch1) || ch1 === "." && /\d/.test(chars[_i + 2]);
317
+ if (ch === ".") return /\d/.test(ch1);
318
+ return /\d/.test(ch);
319
+ }
320
+ function is_ident(chars) {
321
+ if (_i >= chars.length) return false;
322
+ let ch = chars[_i];
323
+ if (IdentStartCodePoint.test(ch)) return true;
324
+ if (ch === "-") {
325
+ if (chars.length - _i < 2) return false;
326
+ let ch1 = chars[_i + 1];
327
+ if (ch1 === "-" || IdentStartCodePoint.test(ch1)) return true;
328
+ return false;
329
+ }
330
+ return false;
331
+ }
332
+ var huenits = {
333
+ deg: 1,
334
+ rad: 180 / Math.PI,
335
+ grad: 9 / 10,
336
+ turn: 360
337
+ };
338
+ function num(chars) {
339
+ let value = "";
340
+ if (chars[_i] === "-" || chars[_i] === "+") value += chars[_i++];
341
+ value += digits(chars);
342
+ if (chars[_i] === "." && /\d/.test(chars[_i + 1])) value += chars[_i++] + digits(chars);
343
+ if (chars[_i] === "e" || chars[_i] === "E") {
344
+ if ((chars[_i + 1] === "-" || chars[_i + 1] === "+") && /\d/.test(chars[_i + 2])) value += chars[_i++] + chars[_i++] + digits(chars);
345
+ else if (/\d/.test(chars[_i + 1])) value += chars[_i++] + digits(chars);
346
+ }
347
+ if (is_ident(chars)) {
348
+ let id = ident(chars);
349
+ if (id === "deg" || id === "rad" || id === "turn" || id === "grad") return {
350
+ type: Tok.Hue,
351
+ value: value * huenits[id]
352
+ };
353
+ return;
354
+ }
355
+ if (chars[_i] === "%") {
356
+ _i++;
357
+ return {
358
+ type: Tok.Percentage,
359
+ value: +value
360
+ };
361
+ }
362
+ return {
363
+ type: Tok.Number,
364
+ value: +value
365
+ };
366
+ }
367
+ function digits(chars) {
368
+ let v = "";
369
+ while (/\d/.test(chars[_i])) v += chars[_i++];
370
+ return v;
371
+ }
372
+ function ident(chars) {
373
+ let v = "";
374
+ while (_i < chars.length && IdentCodePoint.test(chars[_i])) v += chars[_i++];
375
+ return v;
376
+ }
377
+ function identlike(chars) {
378
+ let v = ident(chars);
379
+ if (chars[_i] === "(") {
380
+ _i++;
381
+ return {
382
+ type: Tok.Function,
383
+ value: v
384
+ };
385
+ }
386
+ if (v === "none") return {
387
+ type: Tok.None,
388
+ value: void 0
389
+ };
390
+ return {
391
+ type: Tok.Ident,
392
+ value: v
393
+ };
394
+ }
395
+ function tokenize(str = "") {
396
+ let chars = str.trim();
397
+ let tokens = [];
398
+ let ch;
399
+ _i = 0;
400
+ while (_i < chars.length) {
401
+ ch = chars[_i++];
402
+ if (ch === "\n" || ch === " " || ch === " ") {
403
+ while (_i < chars.length && (chars[_i] === "\n" || chars[_i] === " " || chars[_i] === " ")) _i++;
404
+ continue;
405
+ }
406
+ if (ch === ",") return;
407
+ if (ch === ")") {
408
+ tokens.push({ type: Tok.ParenClose });
409
+ continue;
410
+ }
411
+ if (ch === "+") {
412
+ _i--;
413
+ if (is_num(chars)) {
414
+ tokens.push(num(chars));
415
+ continue;
416
+ }
417
+ return;
418
+ }
419
+ if (ch === "-") {
420
+ _i--;
421
+ if (is_num(chars)) {
422
+ tokens.push(num(chars));
423
+ continue;
424
+ }
425
+ if (is_ident(chars)) {
426
+ tokens.push({
427
+ type: Tok.Ident,
428
+ value: ident(chars)
429
+ });
430
+ continue;
431
+ }
432
+ return;
433
+ }
434
+ if (ch === ".") {
435
+ _i--;
436
+ if (is_num(chars)) {
437
+ tokens.push(num(chars));
438
+ continue;
439
+ }
440
+ return;
441
+ }
442
+ if (ch === "/") {
443
+ while (_i < chars.length && (chars[_i] === "\n" || chars[_i] === " " || chars[_i] === " ")) _i++;
444
+ let alpha;
445
+ if (is_num(chars)) {
446
+ alpha = num(chars);
447
+ if (alpha.type !== Tok.Hue) {
448
+ tokens.push({
449
+ type: Tok.Alpha,
450
+ value: alpha
451
+ });
452
+ continue;
453
+ }
454
+ }
455
+ if (is_ident(chars)) {
456
+ if (ident(chars) === "none") {
457
+ tokens.push({
458
+ type: Tok.Alpha,
459
+ value: {
460
+ type: Tok.None,
461
+ value: void 0
462
+ }
463
+ });
464
+ continue;
465
+ }
466
+ }
467
+ return;
468
+ }
469
+ if (/\d/.test(ch)) {
470
+ _i--;
471
+ tokens.push(num(chars));
472
+ continue;
473
+ }
474
+ if (IdentStartCodePoint.test(ch)) {
475
+ _i--;
476
+ tokens.push(identlike(chars));
477
+ continue;
478
+ }
479
+ return;
480
+ }
481
+ return tokens;
482
+ }
483
+ function parseColorSyntax(tokens) {
484
+ tokens._i = 0;
485
+ let token = tokens[tokens._i++];
486
+ if (!token || token.type !== Tok.Function || token.value !== "color") return;
487
+ token = tokens[tokens._i++];
488
+ if (token.type !== Tok.Ident) return;
489
+ const mode = colorProfiles[token.value];
490
+ if (!mode) return;
491
+ const res = { mode };
492
+ const coords = consumeCoords(tokens, false);
493
+ if (!coords) return;
494
+ const channels = getMode(mode).channels;
495
+ for (let ii = 0, c, ch; ii < channels.length; ii++) {
496
+ c = coords[ii];
497
+ ch = channels[ii];
498
+ if (c.type !== Tok.None) {
499
+ res[ch] = c.type === Tok.Number ? c.value : c.value / 100;
500
+ if (ch === "alpha") res[ch] = Math.max(0, Math.min(1, res[ch]));
501
+ }
502
+ }
503
+ return res;
504
+ }
505
+ function consumeCoords(tokens, includeHue) {
506
+ const coords = [];
507
+ let token;
508
+ while (tokens._i < tokens.length) {
509
+ token = tokens[tokens._i++];
510
+ if (token.type === Tok.None || token.type === Tok.Number || token.type === Tok.Alpha || token.type === Tok.Percentage || includeHue && token.type === Tok.Hue) {
511
+ coords.push(token);
512
+ continue;
513
+ }
514
+ if (token.type === Tok.ParenClose) {
515
+ if (tokens._i < tokens.length) return;
516
+ continue;
517
+ }
518
+ return;
519
+ }
520
+ if (coords.length < 3 || coords.length > 4) return;
521
+ if (coords.length === 4) {
522
+ if (coords[3].type !== Tok.Alpha) return;
523
+ coords[3] = coords[3].value;
524
+ }
525
+ if (coords.length === 3) coords.push({
526
+ type: Tok.None,
527
+ value: void 0
528
+ });
529
+ return coords.every((c) => c.type !== Tok.Alpha) ? coords : void 0;
530
+ }
531
+ function parseModernSyntax(tokens, includeHue) {
532
+ tokens._i = 0;
533
+ let token = tokens[tokens._i++];
534
+ if (!token || token.type !== Tok.Function) return;
535
+ let coords = consumeCoords(tokens, includeHue);
536
+ if (!coords) return;
537
+ coords.unshift(token.value);
538
+ return coords;
539
+ }
540
+ var parse = (color) => {
541
+ if (typeof color !== "string") return;
542
+ const tokens = tokenize(color);
543
+ const parsed = tokens ? parseModernSyntax(tokens, true) : void 0;
544
+ let result = void 0;
545
+ let i = 0;
546
+ let len = parsers.length;
547
+ while (i < len) if ((result = parsers[i++](color, parsed)) !== void 0) return result;
548
+ return tokens ? parseColorSyntax(tokens) : void 0;
549
+ };
550
+ //#endregion
551
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rgb/parseRgb.js
552
+ function parseRgb(color, parsed) {
553
+ if (!parsed || parsed[0] !== "rgb" && parsed[0] !== "rgba") return;
554
+ const res = { mode: "rgb" };
555
+ const [, r, g, b, alpha] = parsed;
556
+ if (r.type === Tok.Hue || g.type === Tok.Hue || b.type === Tok.Hue) return;
557
+ if (r.type !== Tok.None) res.r = r.type === Tok.Number ? r.value / 255 : r.value / 100;
558
+ if (g.type !== Tok.None) res.g = g.type === Tok.Number ? g.value / 255 : g.value / 100;
559
+ if (b.type !== Tok.None) res.b = b.type === Tok.Number ? b.value / 255 : b.value / 100;
560
+ if (alpha.type !== Tok.None) res.alpha = Math.min(1, Math.max(0, alpha.type === Tok.Number ? alpha.value : alpha.value / 100));
561
+ return res;
562
+ }
563
+ //#endregion
564
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rgb/parseTransparent.js
565
+ var parseTransparent = (c) => c === "transparent" ? {
566
+ mode: "rgb",
567
+ r: 0,
568
+ g: 0,
569
+ b: 0,
570
+ alpha: 0
571
+ } : void 0;
572
+ //#endregion
573
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/interpolate/lerp.js
574
+ var lerp = (a, b, t) => a + t * (b - a);
575
+ //#endregion
576
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/interpolate/piecewise.js
577
+ var get_classes = (arr) => {
578
+ let classes = [];
579
+ for (let i = 0; i < arr.length - 1; i++) {
580
+ let a = arr[i];
581
+ let b = arr[i + 1];
582
+ if (a === void 0 && b === void 0) classes.push(void 0);
583
+ else if (a !== void 0 && b !== void 0) classes.push([a, b]);
584
+ else classes.push(a !== void 0 ? [a, a] : [b, b]);
585
+ }
586
+ return classes;
587
+ };
588
+ var interpolatorPiecewise = (interpolator) => (arr) => {
589
+ let classes = get_classes(arr);
590
+ return (t) => {
591
+ let cls = t * classes.length;
592
+ let idx = t >= 1 ? classes.length - 1 : Math.max(Math.floor(cls), 0);
593
+ let pair = classes[idx];
594
+ return pair === void 0 ? void 0 : interpolator(pair[0], pair[1], cls - idx);
595
+ };
596
+ };
597
+ //#endregion
598
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/interpolate/linear.js
599
+ var interpolatorLinear = interpolatorPiecewise(lerp);
600
+ //#endregion
601
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/fixup/alpha.js
602
+ var fixupAlpha = (arr) => {
603
+ let some_defined = false;
604
+ let res = arr.map((v) => {
605
+ if (v !== void 0) {
606
+ some_defined = true;
607
+ return v;
608
+ }
609
+ return 1;
610
+ });
611
+ return some_defined ? res : arr;
612
+ };
613
+ //#endregion
614
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rgb/definition.js
615
+ var definition$27 = {
616
+ mode: "rgb",
617
+ channels: [
618
+ "r",
619
+ "g",
620
+ "b",
621
+ "alpha"
622
+ ],
623
+ parse: [
624
+ parseRgb,
625
+ parseHex,
626
+ parseRgbLegacy,
627
+ parseNamed,
628
+ parseTransparent,
629
+ "srgb"
630
+ ],
631
+ serialize: "srgb",
632
+ interpolate: {
633
+ r: interpolatorLinear,
634
+ g: interpolatorLinear,
635
+ b: interpolatorLinear,
636
+ alpha: {
637
+ use: interpolatorLinear,
638
+ fixup: fixupAlpha
639
+ }
640
+ },
641
+ gamut: true,
642
+ white: {
643
+ r: 1,
644
+ g: 1,
645
+ b: 1
646
+ },
647
+ black: {
648
+ r: 0,
649
+ g: 0,
650
+ b: 0
651
+ }
652
+ };
653
+ //#endregion
654
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/a98/convertA98ToXyz65.js
655
+ var linearize$2 = (v = 0) => Math.pow(Math.abs(v), 563 / 256) * Math.sign(v);
656
+ var convertA98ToXyz65 = (a98) => {
657
+ let r = linearize$2(a98.r);
658
+ let g = linearize$2(a98.g);
659
+ let b = linearize$2(a98.b);
660
+ let res = {
661
+ mode: "xyz65",
662
+ x: .5766690429101305 * r + .1855582379065463 * g + .1882286462349947 * b,
663
+ y: .297344975250536 * r + .6273635662554661 * g + .0752914584939979 * b,
664
+ z: .0270313613864123 * r + .0706888525358272 * g + .9913375368376386 * b
665
+ };
666
+ if (a98.alpha !== void 0) res.alpha = a98.alpha;
667
+ return res;
668
+ };
669
+ //#endregion
670
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/a98/convertXyz65ToA98.js
671
+ var gamma$2 = (v) => Math.pow(Math.abs(v), 256 / 563) * Math.sign(v);
672
+ var convertXyz65ToA98 = ({ x, y, z, alpha }) => {
673
+ if (x === void 0) x = 0;
674
+ if (y === void 0) y = 0;
675
+ if (z === void 0) z = 0;
676
+ let res = {
677
+ mode: "a98",
678
+ r: gamma$2(x * 2.0415879038107465 - y * .5650069742788597 - .3447313507783297 * z),
679
+ g: gamma$2(x * -.9692436362808798 + y * 1.8759675015077206 + .0415550574071756 * z),
680
+ b: gamma$2(x * .0134442806320312 - y * .1183623922310184 + 1.0151749943912058 * z)
681
+ };
682
+ if (alpha !== void 0) res.alpha = alpha;
683
+ return res;
684
+ };
685
+ //#endregion
686
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lrgb/convertRgbToLrgb.js
687
+ var fn$3 = (c = 0) => {
688
+ const abs = Math.abs(c);
689
+ if (abs <= .04045) return c / 12.92;
690
+ return (Math.sign(c) || 1) * Math.pow((abs + .055) / 1.055, 2.4);
691
+ };
692
+ var convertRgbToLrgb = ({ r, g, b, alpha }) => {
693
+ let res = {
694
+ mode: "lrgb",
695
+ r: fn$3(r),
696
+ g: fn$3(g),
697
+ b: fn$3(b)
698
+ };
699
+ if (alpha !== void 0) res.alpha = alpha;
700
+ return res;
701
+ };
702
+ //#endregion
703
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz65/convertRgbToXyz65.js
704
+ var convertRgbToXyz65 = (rgb) => {
705
+ let { r, g, b, alpha } = convertRgbToLrgb(rgb);
706
+ let res = {
707
+ mode: "xyz65",
708
+ x: .4123907992659593 * r + .357584339383878 * g + .1804807884018343 * b,
709
+ y: .2126390058715102 * r + .715168678767756 * g + .0721923153607337 * b,
710
+ z: .0193308187155918 * r + .119194779794626 * g + .9505321522496607 * b
711
+ };
712
+ if (alpha !== void 0) res.alpha = alpha;
713
+ return res;
714
+ };
715
+ //#endregion
716
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lrgb/convertLrgbToRgb.js
717
+ var fn$2 = (c = 0) => {
718
+ const abs = Math.abs(c);
719
+ if (abs > .0031308) return (Math.sign(c) || 1) * (1.055 * Math.pow(abs, 1 / 2.4) - .055);
720
+ return c * 12.92;
721
+ };
722
+ var convertLrgbToRgb = ({ r, g, b, alpha }, mode = "rgb") => {
723
+ let res = {
724
+ mode,
725
+ r: fn$2(r),
726
+ g: fn$2(g),
727
+ b: fn$2(b)
728
+ };
729
+ if (alpha !== void 0) res.alpha = alpha;
730
+ return res;
731
+ };
732
+ //#endregion
733
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz65/convertXyz65ToRgb.js
734
+ var convertXyz65ToRgb = ({ x, y, z, alpha }) => {
735
+ if (x === void 0) x = 0;
736
+ if (y === void 0) y = 0;
737
+ if (z === void 0) z = 0;
738
+ let res = convertLrgbToRgb({
739
+ r: x * 3.2409699419045226 - y * 1.537383177570094 - .4986107602930034 * z,
740
+ g: x * -.9692436362808796 + y * 1.8759675015077204 + .0415550574071756 * z,
741
+ b: x * .0556300796969936 - y * .2039769588889765 + 1.0569715142428784 * z
742
+ });
743
+ if (alpha !== void 0) res.alpha = alpha;
744
+ return res;
745
+ };
746
+ //#endregion
747
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/a98/definition.js
748
+ var definition$26 = {
749
+ ...definition$27,
750
+ mode: "a98",
751
+ parse: ["a98-rgb"],
752
+ serialize: "a98-rgb",
753
+ fromMode: {
754
+ rgb: (color) => convertXyz65ToA98(convertRgbToXyz65(color)),
755
+ xyz65: convertXyz65ToA98
756
+ },
757
+ toMode: {
758
+ rgb: (color) => convertXyz65ToRgb(convertA98ToXyz65(color)),
759
+ xyz65: convertA98ToXyz65
760
+ }
761
+ };
762
+ //#endregion
763
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/util/normalizeHue.js
764
+ var normalizeHue = (hue) => (hue = hue % 360) < 0 ? hue + 360 : hue;
765
+ //#endregion
766
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/fixup/hue.js
767
+ var hue = (hues, fn) => {
768
+ return hues.map((hue, idx, arr) => {
769
+ if (hue === void 0) return hue;
770
+ let normalized = normalizeHue(hue);
771
+ if (idx === 0 || hues[idx - 1] === void 0) return normalized;
772
+ return fn(normalized - normalizeHue(arr[idx - 1]));
773
+ }).reduce((acc, curr) => {
774
+ if (!acc.length || curr === void 0 || acc[acc.length - 1] === void 0) {
775
+ acc.push(curr);
776
+ return acc;
777
+ }
778
+ acc.push(curr + acc[acc.length - 1]);
779
+ return acc;
780
+ }, []);
781
+ };
782
+ var fixupHueShorter = (arr) => hue(arr, (d) => Math.abs(d) <= 180 ? d : d - 360 * Math.sign(d));
783
+ //#endregion
784
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/cubehelix/constants.js
785
+ var M = [
786
+ -.14861,
787
+ 1.78277,
788
+ -.29227,
789
+ -.90649,
790
+ 1.97294,
791
+ 0
792
+ ];
793
+ var degToRad = Math.PI / 180;
794
+ var radToDeg = 180 / Math.PI;
795
+ //#endregion
796
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/cubehelix/convertRgbToCubehelix.js
797
+ var DE = M[3] * M[4];
798
+ var BE = M[1] * M[4];
799
+ var BCAD = M[1] * M[2] - M[0] * M[3];
800
+ var convertRgbToCubehelix = ({ r, g, b, alpha }) => {
801
+ if (r === void 0) r = 0;
802
+ if (g === void 0) g = 0;
803
+ if (b === void 0) b = 0;
804
+ let l = (BCAD * b + r * DE - g * BE) / (BCAD + DE - BE);
805
+ let x = b - l;
806
+ let y = (M[4] * (g - l) - M[2] * x) / M[3];
807
+ let res = {
808
+ mode: "cubehelix",
809
+ l,
810
+ s: l === 0 || l === 1 ? void 0 : Math.sqrt(x * x + y * y) / (M[4] * l * (1 - l))
811
+ };
812
+ if (res.s) res.h = Math.atan2(y, x) * radToDeg - 120;
813
+ if (alpha !== void 0) res.alpha = alpha;
814
+ return res;
815
+ };
816
+ //#endregion
817
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/cubehelix/convertCubehelixToRgb.js
818
+ var convertCubehelixToRgb = ({ h, s, l, alpha }) => {
819
+ let res = { mode: "rgb" };
820
+ h = (h === void 0 ? 0 : h + 120) * degToRad;
821
+ if (l === void 0) l = 0;
822
+ let amp = s === void 0 ? 0 : s * l * (1 - l);
823
+ let cosh = Math.cos(h);
824
+ let sinh = Math.sin(h);
825
+ res.r = l + amp * (M[0] * cosh + M[1] * sinh);
826
+ res.g = l + amp * (M[2] * cosh + M[3] * sinh);
827
+ res.b = l + amp * (M[4] * cosh + M[5] * sinh);
828
+ if (alpha !== void 0) res.alpha = alpha;
829
+ return res;
830
+ };
831
+ //#endregion
832
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/difference.js
833
+ var differenceHueSaturation = (std, smp) => {
834
+ if (std.h === void 0 || smp.h === void 0 || !std.s || !smp.s) return 0;
835
+ let std_h = normalizeHue(std.h);
836
+ let smp_h = normalizeHue(smp.h);
837
+ let dH = Math.sin((smp_h - std_h + 360) / 2 * Math.PI / 180);
838
+ return 2 * Math.sqrt(std.s * smp.s) * dH;
839
+ };
840
+ var differenceHueNaive = (std, smp) => {
841
+ if (std.h === void 0 || smp.h === void 0) return 0;
842
+ let std_h = normalizeHue(std.h);
843
+ let smp_h = normalizeHue(smp.h);
844
+ if (Math.abs(smp_h - std_h) > 180) return std_h - (smp_h - 360 * Math.sign(smp_h - std_h));
845
+ return smp_h - std_h;
846
+ };
847
+ var differenceHueChroma = (std, smp) => {
848
+ if (std.h === void 0 || smp.h === void 0 || !std.c || !smp.c) return 0;
849
+ let std_h = normalizeHue(std.h);
850
+ let smp_h = normalizeHue(smp.h);
851
+ let dH = Math.sin((smp_h - std_h + 360) / 2 * Math.PI / 180);
852
+ return 2 * Math.sqrt(std.c * smp.c) * dH;
853
+ };
854
+ //#endregion
855
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/average.js
856
+ var averageAngle = (val) => {
857
+ let sum = val.reduce((sum, val) => {
858
+ if (val !== void 0) {
859
+ let rad = val * Math.PI / 180;
860
+ sum.sin += Math.sin(rad);
861
+ sum.cos += Math.cos(rad);
862
+ }
863
+ return sum;
864
+ }, {
865
+ sin: 0,
866
+ cos: 0
867
+ });
868
+ let angle = Math.atan2(sum.sin, sum.cos) * 180 / Math.PI;
869
+ return angle < 0 ? 360 + angle : angle;
870
+ };
871
+ //#endregion
872
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/cubehelix/definition.js
873
+ var definition$25 = {
874
+ mode: "cubehelix",
875
+ channels: [
876
+ "h",
877
+ "s",
878
+ "l",
879
+ "alpha"
880
+ ],
881
+ parse: ["--cubehelix"],
882
+ serialize: "--cubehelix",
883
+ ranges: {
884
+ h: [0, 360],
885
+ s: [0, 4.614],
886
+ l: [0, 1]
887
+ },
888
+ fromMode: { rgb: convertRgbToCubehelix },
889
+ toMode: { rgb: convertCubehelixToRgb },
890
+ interpolate: {
891
+ h: {
892
+ use: interpolatorLinear,
893
+ fixup: fixupHueShorter
894
+ },
895
+ s: interpolatorLinear,
896
+ l: interpolatorLinear,
897
+ alpha: {
898
+ use: interpolatorLinear,
899
+ fixup: fixupAlpha
900
+ }
901
+ },
902
+ difference: { h: differenceHueSaturation },
903
+ average: { h: averageAngle }
904
+ };
905
+ //#endregion
906
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lch/convertLabToLch.js
907
+ var convertLabToLch = ({ l, a, b, alpha }, mode = "lch") => {
908
+ if (a === void 0) a = 0;
909
+ if (b === void 0) b = 0;
910
+ let c = Math.sqrt(a * a + b * b);
911
+ let res = {
912
+ mode,
913
+ l,
914
+ c
915
+ };
916
+ if (c) res.h = normalizeHue(Math.atan2(b, a) * 180 / Math.PI);
917
+ if (alpha !== void 0) res.alpha = alpha;
918
+ return res;
919
+ };
920
+ //#endregion
921
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lch/convertLchToLab.js
922
+ var convertLchToLab = ({ l, c, h, alpha }, mode = "lab") => {
923
+ if (h === void 0) h = 0;
924
+ let res = {
925
+ mode,
926
+ l,
927
+ a: c ? c * Math.cos(h / 180 * Math.PI) : 0,
928
+ b: c ? c * Math.sin(h / 180 * Math.PI) : 0
929
+ };
930
+ if (alpha !== void 0) res.alpha = alpha;
931
+ return res;
932
+ };
933
+ //#endregion
934
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz65/constants.js
935
+ var k$4 = Math.pow(29, 3) / Math.pow(3, 3);
936
+ var e$2 = Math.pow(6, 3) / Math.pow(29, 3);
937
+ //#endregion
938
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/constants.js
939
+ var D50 = {
940
+ X: .3457 / .3585,
941
+ Y: 1,
942
+ Z: .2958 / .3585
943
+ };
944
+ var D65 = {
945
+ X: .3127 / .329,
946
+ Y: 1,
947
+ Z: .3583 / .329
948
+ };
949
+ Math.pow(29, 3) / Math.pow(3, 3);
950
+ Math.pow(6, 3) / Math.pow(29, 3);
951
+ //#endregion
952
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab65/convertLab65ToXyz65.js
953
+ var fn$1 = (v) => Math.pow(v, 3) > e$2 ? Math.pow(v, 3) : (116 * v - 16) / k$4;
954
+ var convertLab65ToXyz65 = ({ l, a, b, alpha }) => {
955
+ if (l === void 0) l = 0;
956
+ if (a === void 0) a = 0;
957
+ if (b === void 0) b = 0;
958
+ let fy = (l + 16) / 116;
959
+ let fx = a / 500 + fy;
960
+ let fz = fy - b / 200;
961
+ let res = {
962
+ mode: "xyz65",
963
+ x: fn$1(fx) * D65.X,
964
+ y: fn$1(fy) * D65.Y,
965
+ z: fn$1(fz) * D65.Z
966
+ };
967
+ if (alpha !== void 0) res.alpha = alpha;
968
+ return res;
969
+ };
970
+ //#endregion
971
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab65/convertLab65ToRgb.js
972
+ var convertLab65ToRgb = (lab) => convertXyz65ToRgb(convertLab65ToXyz65(lab));
973
+ //#endregion
974
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab65/convertXyz65ToLab65.js
975
+ var f$1 = (value) => value > e$2 ? Math.cbrt(value) : (k$4 * value + 16) / 116;
976
+ var convertXyz65ToLab65 = ({ x, y, z, alpha }) => {
977
+ if (x === void 0) x = 0;
978
+ if (y === void 0) y = 0;
979
+ if (z === void 0) z = 0;
980
+ let f0 = f$1(x / D65.X);
981
+ let f1 = f$1(y / D65.Y);
982
+ let f2 = f$1(z / D65.Z);
983
+ let res = {
984
+ mode: "lab65",
985
+ l: 116 * f1 - 16,
986
+ a: 500 * (f0 - f1),
987
+ b: 200 * (f1 - f2)
988
+ };
989
+ if (alpha !== void 0) res.alpha = alpha;
990
+ return res;
991
+ };
992
+ //#endregion
993
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab65/convertRgbToLab65.js
994
+ var convertRgbToLab65 = (rgb) => {
995
+ let res = convertXyz65ToLab65(convertRgbToXyz65(rgb));
996
+ if (rgb.r === rgb.b && rgb.b === rgb.g) res.a = res.b = 0;
997
+ return res;
998
+ };
999
+ //#endregion
1000
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/dlch/constants.js
1001
+ var θ = 26 / 180 * Math.PI;
1002
+ var cosθ = Math.cos(θ);
1003
+ var sinθ = Math.sin(θ);
1004
+ var factor = 100 / Math.log(139 / 100);
1005
+ //#endregion
1006
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/dlch/convertDlchToLab65.js
1007
+ var convertDlchToLab65 = ({ l, c, h, alpha }) => {
1008
+ if (l === void 0) l = 0;
1009
+ if (c === void 0) c = 0;
1010
+ if (h === void 0) h = 0;
1011
+ let res = {
1012
+ mode: "lab65",
1013
+ l: (Math.exp(l * 1 / factor) - 1) / .0039
1014
+ };
1015
+ let G = (Math.exp(.0435 * c * 1 * 1) - 1) / .075;
1016
+ let e = G * Math.cos(h / 180 * Math.PI - θ);
1017
+ let f = G * Math.sin(h / 180 * Math.PI - θ);
1018
+ res.a = e * cosθ - f / .83 * sinθ;
1019
+ res.b = e * sinθ + f / .83 * cosθ;
1020
+ if (alpha !== void 0) res.alpha = alpha;
1021
+ return res;
1022
+ };
1023
+ //#endregion
1024
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/dlch/convertLab65ToDlch.js
1025
+ var convertLab65ToDlch = ({ l, a, b, alpha }) => {
1026
+ if (l === void 0) l = 0;
1027
+ if (a === void 0) a = 0;
1028
+ if (b === void 0) b = 0;
1029
+ let e = a * cosθ + b * sinθ;
1030
+ let f = .83 * (b * cosθ - a * sinθ);
1031
+ let G = Math.sqrt(e * e + f * f);
1032
+ let res = {
1033
+ mode: "dlch",
1034
+ l: factor / 1 * Math.log(1 + .0039 * l),
1035
+ c: Math.log(1 + .075 * G) / (.0435 * 1 * 1)
1036
+ };
1037
+ if (res.c) res.h = normalizeHue((Math.atan2(f, e) + θ) / Math.PI * 180);
1038
+ if (alpha !== void 0) res.alpha = alpha;
1039
+ return res;
1040
+ };
1041
+ //#endregion
1042
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/dlab/definition.js
1043
+ var convertDlabToLab65 = (c) => convertDlchToLab65(convertLabToLch(c, "dlch"));
1044
+ var convertLab65ToDlab = (c) => convertLchToLab(convertLab65ToDlch(c), "dlab");
1045
+ var definition$24 = {
1046
+ mode: "dlab",
1047
+ parse: ["--din99o-lab"],
1048
+ serialize: "--din99o-lab",
1049
+ toMode: {
1050
+ lab65: convertDlabToLab65,
1051
+ rgb: (c) => convertLab65ToRgb(convertDlabToLab65(c))
1052
+ },
1053
+ fromMode: {
1054
+ lab65: convertLab65ToDlab,
1055
+ rgb: (c) => convertLab65ToDlab(convertRgbToLab65(c))
1056
+ },
1057
+ channels: [
1058
+ "l",
1059
+ "a",
1060
+ "b",
1061
+ "alpha"
1062
+ ],
1063
+ ranges: {
1064
+ l: [0, 100],
1065
+ a: [-40.09, 45.501],
1066
+ b: [-40.469, 44.344]
1067
+ },
1068
+ interpolate: {
1069
+ l: interpolatorLinear,
1070
+ a: interpolatorLinear,
1071
+ b: interpolatorLinear,
1072
+ alpha: {
1073
+ use: interpolatorLinear,
1074
+ fixup: fixupAlpha
1075
+ }
1076
+ }
1077
+ };
1078
+ //#endregion
1079
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/dlch/definition.js
1080
+ var definition$23 = {
1081
+ mode: "dlch",
1082
+ parse: ["--din99o-lch"],
1083
+ serialize: "--din99o-lch",
1084
+ toMode: {
1085
+ lab65: convertDlchToLab65,
1086
+ dlab: (c) => convertLchToLab(c, "dlab"),
1087
+ rgb: (c) => convertLab65ToRgb(convertDlchToLab65(c))
1088
+ },
1089
+ fromMode: {
1090
+ lab65: convertLab65ToDlch,
1091
+ dlab: (c) => convertLabToLch(c, "dlch"),
1092
+ rgb: (c) => convertLab65ToDlch(convertRgbToLab65(c))
1093
+ },
1094
+ channels: [
1095
+ "l",
1096
+ "c",
1097
+ "h",
1098
+ "alpha"
1099
+ ],
1100
+ ranges: {
1101
+ l: [0, 100],
1102
+ c: [0, 51.484],
1103
+ h: [0, 360]
1104
+ },
1105
+ interpolate: {
1106
+ l: interpolatorLinear,
1107
+ c: interpolatorLinear,
1108
+ h: {
1109
+ use: interpolatorLinear,
1110
+ fixup: fixupHueShorter
1111
+ },
1112
+ alpha: {
1113
+ use: interpolatorLinear,
1114
+ fixup: fixupAlpha
1115
+ }
1116
+ },
1117
+ difference: { h: differenceHueChroma },
1118
+ average: { h: averageAngle }
1119
+ };
1120
+ //#endregion
1121
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsi/convertHsiToRgb.js
1122
+ function convertHsiToRgb({ h, s, i, alpha }) {
1123
+ h = normalizeHue(h !== void 0 ? h : 0);
1124
+ if (s === void 0) s = 0;
1125
+ if (i === void 0) i = 0;
1126
+ let f = Math.abs(h / 60 % 2 - 1);
1127
+ let res;
1128
+ switch (Math.floor(h / 60)) {
1129
+ case 0:
1130
+ res = {
1131
+ r: i * (1 + s * (3 / (2 - f) - 1)),
1132
+ g: i * (1 + s * (3 * (1 - f) / (2 - f) - 1)),
1133
+ b: i * (1 - s)
1134
+ };
1135
+ break;
1136
+ case 1:
1137
+ res = {
1138
+ r: i * (1 + s * (3 * (1 - f) / (2 - f) - 1)),
1139
+ g: i * (1 + s * (3 / (2 - f) - 1)),
1140
+ b: i * (1 - s)
1141
+ };
1142
+ break;
1143
+ case 2:
1144
+ res = {
1145
+ r: i * (1 - s),
1146
+ g: i * (1 + s * (3 / (2 - f) - 1)),
1147
+ b: i * (1 + s * (3 * (1 - f) / (2 - f) - 1))
1148
+ };
1149
+ break;
1150
+ case 3:
1151
+ res = {
1152
+ r: i * (1 - s),
1153
+ g: i * (1 + s * (3 * (1 - f) / (2 - f) - 1)),
1154
+ b: i * (1 + s * (3 / (2 - f) - 1))
1155
+ };
1156
+ break;
1157
+ case 4:
1158
+ res = {
1159
+ r: i * (1 + s * (3 * (1 - f) / (2 - f) - 1)),
1160
+ g: i * (1 - s),
1161
+ b: i * (1 + s * (3 / (2 - f) - 1))
1162
+ };
1163
+ break;
1164
+ case 5:
1165
+ res = {
1166
+ r: i * (1 + s * (3 / (2 - f) - 1)),
1167
+ g: i * (1 - s),
1168
+ b: i * (1 + s * (3 * (1 - f) / (2 - f) - 1))
1169
+ };
1170
+ break;
1171
+ default: res = {
1172
+ r: i * (1 - s),
1173
+ g: i * (1 - s),
1174
+ b: i * (1 - s)
1175
+ };
1176
+ }
1177
+ res.mode = "rgb";
1178
+ if (alpha !== void 0) res.alpha = alpha;
1179
+ return res;
1180
+ }
1181
+ //#endregion
1182
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsi/convertRgbToHsi.js
1183
+ function convertRgbToHsi({ r, g, b, alpha }) {
1184
+ if (r === void 0) r = 0;
1185
+ if (g === void 0) g = 0;
1186
+ if (b === void 0) b = 0;
1187
+ let M = Math.max(r, g, b), m = Math.min(r, g, b);
1188
+ let res = {
1189
+ mode: "hsi",
1190
+ s: r + g + b === 0 ? 0 : 1 - 3 * m / (r + g + b),
1191
+ i: (r + g + b) / 3
1192
+ };
1193
+ if (M - m !== 0) res.h = (M === r ? (g - b) / (M - m) + (g < b) * 6 : M === g ? (b - r) / (M - m) + 2 : (r - g) / (M - m) + 4) * 60;
1194
+ if (alpha !== void 0) res.alpha = alpha;
1195
+ return res;
1196
+ }
1197
+ //#endregion
1198
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsi/definition.js
1199
+ var definition$22 = {
1200
+ mode: "hsi",
1201
+ toMode: { rgb: convertHsiToRgb },
1202
+ parse: ["--hsi"],
1203
+ serialize: "--hsi",
1204
+ fromMode: { rgb: convertRgbToHsi },
1205
+ channels: [
1206
+ "h",
1207
+ "s",
1208
+ "i",
1209
+ "alpha"
1210
+ ],
1211
+ ranges: { h: [0, 360] },
1212
+ gamut: "rgb",
1213
+ interpolate: {
1214
+ h: {
1215
+ use: interpolatorLinear,
1216
+ fixup: fixupHueShorter
1217
+ },
1218
+ s: interpolatorLinear,
1219
+ i: interpolatorLinear,
1220
+ alpha: {
1221
+ use: interpolatorLinear,
1222
+ fixup: fixupAlpha
1223
+ }
1224
+ },
1225
+ difference: { h: differenceHueSaturation },
1226
+ average: { h: averageAngle }
1227
+ };
1228
+ //#endregion
1229
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsl/convertHslToRgb.js
1230
+ function convertHslToRgb({ h, s, l, alpha }) {
1231
+ h = normalizeHue(h !== void 0 ? h : 0);
1232
+ if (s === void 0) s = 0;
1233
+ if (l === void 0) l = 0;
1234
+ let m1 = l + s * (l < .5 ? l : 1 - l);
1235
+ let m2 = m1 - (m1 - l) * 2 * Math.abs(h / 60 % 2 - 1);
1236
+ let res;
1237
+ switch (Math.floor(h / 60)) {
1238
+ case 0:
1239
+ res = {
1240
+ r: m1,
1241
+ g: m2,
1242
+ b: 2 * l - m1
1243
+ };
1244
+ break;
1245
+ case 1:
1246
+ res = {
1247
+ r: m2,
1248
+ g: m1,
1249
+ b: 2 * l - m1
1250
+ };
1251
+ break;
1252
+ case 2:
1253
+ res = {
1254
+ r: 2 * l - m1,
1255
+ g: m1,
1256
+ b: m2
1257
+ };
1258
+ break;
1259
+ case 3:
1260
+ res = {
1261
+ r: 2 * l - m1,
1262
+ g: m2,
1263
+ b: m1
1264
+ };
1265
+ break;
1266
+ case 4:
1267
+ res = {
1268
+ r: m2,
1269
+ g: 2 * l - m1,
1270
+ b: m1
1271
+ };
1272
+ break;
1273
+ case 5:
1274
+ res = {
1275
+ r: m1,
1276
+ g: 2 * l - m1,
1277
+ b: m2
1278
+ };
1279
+ break;
1280
+ default: res = {
1281
+ r: 2 * l - m1,
1282
+ g: 2 * l - m1,
1283
+ b: 2 * l - m1
1284
+ };
1285
+ }
1286
+ res.mode = "rgb";
1287
+ if (alpha !== void 0) res.alpha = alpha;
1288
+ return res;
1289
+ }
1290
+ //#endregion
1291
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsl/convertRgbToHsl.js
1292
+ function convertRgbToHsl({ r, g, b, alpha }) {
1293
+ if (r === void 0) r = 0;
1294
+ if (g === void 0) g = 0;
1295
+ if (b === void 0) b = 0;
1296
+ let M = Math.max(r, g, b), m = Math.min(r, g, b);
1297
+ let res = {
1298
+ mode: "hsl",
1299
+ s: M === m ? 0 : (M - m) / (1 - Math.abs(M + m - 1)),
1300
+ l: .5 * (M + m)
1301
+ };
1302
+ if (M - m !== 0) res.h = (M === r ? (g - b) / (M - m) + (g < b) * 6 : M === g ? (b - r) / (M - m) + 2 : (r - g) / (M - m) + 4) * 60;
1303
+ if (alpha !== void 0) res.alpha = alpha;
1304
+ return res;
1305
+ }
1306
+ //#endregion
1307
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/util/hue.js
1308
+ var hueToDeg = (val, unit) => {
1309
+ switch (unit) {
1310
+ case "deg": return +val;
1311
+ case "rad": return val / Math.PI * 180;
1312
+ case "grad": return val / 10 * 9;
1313
+ case "turn": return val * 360;
1314
+ }
1315
+ };
1316
+ //#endregion
1317
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsl/parseHslLegacy.js
1318
+ var hsl_old = new RegExp(`^hsla?\\(\\s*${hue$1}${c}${per}${c}${per}\\s*(?:,\\s*${num_per}\\s*)?\\)$`);
1319
+ var parseHslLegacy = (color) => {
1320
+ let match = color.match(hsl_old);
1321
+ if (!match) return;
1322
+ let res = { mode: "hsl" };
1323
+ if (match[3] !== void 0) res.h = +match[3];
1324
+ else if (match[1] !== void 0 && match[2] !== void 0) res.h = hueToDeg(match[1], match[2]);
1325
+ if (match[4] !== void 0) res.s = Math.min(Math.max(0, match[4] / 100), 1);
1326
+ if (match[5] !== void 0) res.l = Math.min(Math.max(0, match[5] / 100), 1);
1327
+ if (match[6] !== void 0) res.alpha = Math.max(0, Math.min(1, match[6] / 100));
1328
+ else if (match[7] !== void 0) res.alpha = Math.max(0, Math.min(1, +match[7]));
1329
+ return res;
1330
+ };
1331
+ //#endregion
1332
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsl/parseHsl.js
1333
+ function parseHsl(color, parsed) {
1334
+ if (!parsed || parsed[0] !== "hsl" && parsed[0] !== "hsla") return;
1335
+ const res = { mode: "hsl" };
1336
+ const [, h, s, l, alpha] = parsed;
1337
+ if (h.type !== Tok.None) {
1338
+ if (h.type === Tok.Percentage) return;
1339
+ res.h = h.value;
1340
+ }
1341
+ if (s.type !== Tok.None) {
1342
+ if (s.type === Tok.Hue) return;
1343
+ res.s = s.value / 100;
1344
+ }
1345
+ if (l.type !== Tok.None) {
1346
+ if (l.type === Tok.Hue) return;
1347
+ res.l = l.value / 100;
1348
+ }
1349
+ if (alpha.type !== Tok.None) res.alpha = Math.min(1, Math.max(0, alpha.type === Tok.Number ? alpha.value : alpha.value / 100));
1350
+ return res;
1351
+ }
1352
+ //#endregion
1353
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsl/definition.js
1354
+ var definition$21 = {
1355
+ mode: "hsl",
1356
+ toMode: { rgb: convertHslToRgb },
1357
+ fromMode: { rgb: convertRgbToHsl },
1358
+ channels: [
1359
+ "h",
1360
+ "s",
1361
+ "l",
1362
+ "alpha"
1363
+ ],
1364
+ ranges: { h: [0, 360] },
1365
+ gamut: "rgb",
1366
+ parse: [parseHsl, parseHslLegacy],
1367
+ serialize: (c) => `hsl(${c.h !== void 0 ? c.h : "none"} ${c.s !== void 0 ? c.s * 100 + "%" : "none"} ${c.l !== void 0 ? c.l * 100 + "%" : "none"}${c.alpha < 1 ? ` / ${c.alpha}` : ""})`,
1368
+ interpolate: {
1369
+ h: {
1370
+ use: interpolatorLinear,
1371
+ fixup: fixupHueShorter
1372
+ },
1373
+ s: interpolatorLinear,
1374
+ l: interpolatorLinear,
1375
+ alpha: {
1376
+ use: interpolatorLinear,
1377
+ fixup: fixupAlpha
1378
+ }
1379
+ },
1380
+ difference: { h: differenceHueSaturation },
1381
+ average: { h: averageAngle }
1382
+ };
1383
+ //#endregion
1384
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsv/convertHsvToRgb.js
1385
+ function convertHsvToRgb({ h, s, v, alpha }) {
1386
+ h = normalizeHue(h !== void 0 ? h : 0);
1387
+ if (s === void 0) s = 0;
1388
+ if (v === void 0) v = 0;
1389
+ let f = Math.abs(h / 60 % 2 - 1);
1390
+ let res;
1391
+ switch (Math.floor(h / 60)) {
1392
+ case 0:
1393
+ res = {
1394
+ r: v,
1395
+ g: v * (1 - s * f),
1396
+ b: v * (1 - s)
1397
+ };
1398
+ break;
1399
+ case 1:
1400
+ res = {
1401
+ r: v * (1 - s * f),
1402
+ g: v,
1403
+ b: v * (1 - s)
1404
+ };
1405
+ break;
1406
+ case 2:
1407
+ res = {
1408
+ r: v * (1 - s),
1409
+ g: v,
1410
+ b: v * (1 - s * f)
1411
+ };
1412
+ break;
1413
+ case 3:
1414
+ res = {
1415
+ r: v * (1 - s),
1416
+ g: v * (1 - s * f),
1417
+ b: v
1418
+ };
1419
+ break;
1420
+ case 4:
1421
+ res = {
1422
+ r: v * (1 - s * f),
1423
+ g: v * (1 - s),
1424
+ b: v
1425
+ };
1426
+ break;
1427
+ case 5:
1428
+ res = {
1429
+ r: v,
1430
+ g: v * (1 - s),
1431
+ b: v * (1 - s * f)
1432
+ };
1433
+ break;
1434
+ default: res = {
1435
+ r: v * (1 - s),
1436
+ g: v * (1 - s),
1437
+ b: v * (1 - s)
1438
+ };
1439
+ }
1440
+ res.mode = "rgb";
1441
+ if (alpha !== void 0) res.alpha = alpha;
1442
+ return res;
1443
+ }
1444
+ //#endregion
1445
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsv/convertRgbToHsv.js
1446
+ function convertRgbToHsv({ r, g, b, alpha }) {
1447
+ if (r === void 0) r = 0;
1448
+ if (g === void 0) g = 0;
1449
+ if (b === void 0) b = 0;
1450
+ let M = Math.max(r, g, b), m = Math.min(r, g, b);
1451
+ let res = {
1452
+ mode: "hsv",
1453
+ s: M === 0 ? 0 : 1 - m / M,
1454
+ v: M
1455
+ };
1456
+ if (M - m !== 0) res.h = (M === r ? (g - b) / (M - m) + (g < b) * 6 : M === g ? (b - r) / (M - m) + 2 : (r - g) / (M - m) + 4) * 60;
1457
+ if (alpha !== void 0) res.alpha = alpha;
1458
+ return res;
1459
+ }
1460
+ //#endregion
1461
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hsv/definition.js
1462
+ var definition$20 = {
1463
+ mode: "hsv",
1464
+ toMode: { rgb: convertHsvToRgb },
1465
+ parse: ["--hsv"],
1466
+ serialize: "--hsv",
1467
+ fromMode: { rgb: convertRgbToHsv },
1468
+ channels: [
1469
+ "h",
1470
+ "s",
1471
+ "v",
1472
+ "alpha"
1473
+ ],
1474
+ ranges: { h: [0, 360] },
1475
+ gamut: "rgb",
1476
+ interpolate: {
1477
+ h: {
1478
+ use: interpolatorLinear,
1479
+ fixup: fixupHueShorter
1480
+ },
1481
+ s: interpolatorLinear,
1482
+ v: interpolatorLinear,
1483
+ alpha: {
1484
+ use: interpolatorLinear,
1485
+ fixup: fixupAlpha
1486
+ }
1487
+ },
1488
+ difference: { h: differenceHueSaturation },
1489
+ average: { h: averageAngle }
1490
+ };
1491
+ //#endregion
1492
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hwb/convertHwbToRgb.js
1493
+ function convertHwbToRgb({ h, w, b, alpha }) {
1494
+ if (w === void 0) w = 0;
1495
+ if (b === void 0) b = 0;
1496
+ if (w + b > 1) {
1497
+ let s = w + b;
1498
+ w /= s;
1499
+ b /= s;
1500
+ }
1501
+ return convertHsvToRgb({
1502
+ h,
1503
+ s: b === 1 ? 1 : 1 - w / (1 - b),
1504
+ v: 1 - b,
1505
+ alpha
1506
+ });
1507
+ }
1508
+ //#endregion
1509
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hwb/convertRgbToHwb.js
1510
+ function convertRgbToHwb(rgba) {
1511
+ let hsv = convertRgbToHsv(rgba);
1512
+ if (hsv === void 0) return void 0;
1513
+ let s = hsv.s !== void 0 ? hsv.s : 0;
1514
+ let v = hsv.v !== void 0 ? hsv.v : 0;
1515
+ let res = {
1516
+ mode: "hwb",
1517
+ w: (1 - s) * v,
1518
+ b: 1 - v
1519
+ };
1520
+ if (hsv.h !== void 0) res.h = hsv.h;
1521
+ if (hsv.alpha !== void 0) res.alpha = hsv.alpha;
1522
+ return res;
1523
+ }
1524
+ //#endregion
1525
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hwb/parseHwb.js
1526
+ function ParseHwb(color, parsed) {
1527
+ if (!parsed || parsed[0] !== "hwb") return;
1528
+ const res = { mode: "hwb" };
1529
+ const [, h, w, b, alpha] = parsed;
1530
+ if (h.type !== Tok.None) {
1531
+ if (h.type === Tok.Percentage) return;
1532
+ res.h = h.value;
1533
+ }
1534
+ if (w.type !== Tok.None) {
1535
+ if (w.type === Tok.Hue) return;
1536
+ res.w = w.value / 100;
1537
+ }
1538
+ if (b.type !== Tok.None) {
1539
+ if (b.type === Tok.Hue) return;
1540
+ res.b = b.value / 100;
1541
+ }
1542
+ if (alpha.type !== Tok.None) res.alpha = Math.min(1, Math.max(0, alpha.type === Tok.Number ? alpha.value : alpha.value / 100));
1543
+ return res;
1544
+ }
1545
+ //#endregion
1546
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hwb/definition.js
1547
+ var definition$19 = {
1548
+ mode: "hwb",
1549
+ toMode: { rgb: convertHwbToRgb },
1550
+ fromMode: { rgb: convertRgbToHwb },
1551
+ channels: [
1552
+ "h",
1553
+ "w",
1554
+ "b",
1555
+ "alpha"
1556
+ ],
1557
+ ranges: { h: [0, 360] },
1558
+ gamut: "rgb",
1559
+ parse: [ParseHwb],
1560
+ serialize: (c) => `hwb(${c.h !== void 0 ? c.h : "none"} ${c.w !== void 0 ? c.w * 100 + "%" : "none"} ${c.b !== void 0 ? c.b * 100 + "%" : "none"}${c.alpha < 1 ? ` / ${c.alpha}` : ""})`,
1561
+ interpolate: {
1562
+ h: {
1563
+ use: interpolatorLinear,
1564
+ fixup: fixupHueShorter
1565
+ },
1566
+ w: interpolatorLinear,
1567
+ b: interpolatorLinear,
1568
+ alpha: {
1569
+ use: interpolatorLinear,
1570
+ fixup: fixupAlpha
1571
+ }
1572
+ },
1573
+ difference: { h: differenceHueNaive },
1574
+ average: { h: averageAngle }
1575
+ };
1576
+ //#endregion
1577
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/hdr/transfer.js
1578
+ var M1 = .1593017578125;
1579
+ var M2 = 78.84375;
1580
+ var C1 = .8359375;
1581
+ var C2 = 18.8515625;
1582
+ var C3 = 18.6875;
1583
+ function transferPqDecode(v) {
1584
+ if (v < 0) return 0;
1585
+ const c = Math.pow(v, 1 / M2);
1586
+ return 1e4 * Math.pow(Math.max(0, c - C1) / (C2 - C3 * c), 1 / M1);
1587
+ }
1588
+ function transferPqEncode(v) {
1589
+ if (v < 0) return 0;
1590
+ const c = Math.pow(v / 1e4, M1);
1591
+ return Math.pow((C1 + C2 * c) / (1 + C3 * c), M2);
1592
+ }
1593
+ //#endregion
1594
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/itp/convertItpToXyz65.js
1595
+ var toRel = (c) => Math.max(c / 203, 0);
1596
+ var convertItpToXyz65 = ({ i, t, p, alpha }) => {
1597
+ if (i === void 0) i = 0;
1598
+ if (t === void 0) t = 0;
1599
+ if (p === void 0) p = 0;
1600
+ const l = transferPqDecode(i + .008609037037932761 * t + .11102962500302593 * p);
1601
+ const m = transferPqDecode(i - .00860903703793275 * t - .11102962500302599 * p);
1602
+ const s = transferPqDecode(i + .5600313357106791 * t - .32062717498731885 * p);
1603
+ const res = {
1604
+ mode: "xyz65",
1605
+ x: toRel(2.070152218389422 * l - 1.3263473389671556 * m + .2066510476294051 * s),
1606
+ y: toRel(.3647385209748074 * l + .680566024947227 * m - .0453045459220346 * s),
1607
+ z: toRel(-.049747207535812 * l - .0492609666966138 * m + 1.1880659249923042 * s)
1608
+ };
1609
+ if (alpha !== void 0) res.alpha = alpha;
1610
+ return res;
1611
+ };
1612
+ //#endregion
1613
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/itp/convertXyz65ToItp.js
1614
+ var toAbs = (c = 0) => Math.max(c * 203, 0);
1615
+ var convertXyz65ToItp = ({ x, y, z, alpha }) => {
1616
+ const absX = toAbs(x);
1617
+ const absY = toAbs(y);
1618
+ const absZ = toAbs(z);
1619
+ const l = transferPqEncode(.3592832590121217 * absX + .6976051147779502 * absY - .0358915932320289 * absZ);
1620
+ const m = transferPqEncode(-.1920808463704995 * absX + 1.1004767970374323 * absY + .0753748658519118 * absZ);
1621
+ const s = transferPqEncode(.0070797844607477 * absX + .0748396662186366 * absY + .8433265453898765 * absZ);
1622
+ const res = {
1623
+ mode: "itp",
1624
+ i: .5 * l + .5 * m,
1625
+ t: 1.61376953125 * l - 3.323486328125 * m + 1.709716796875 * s,
1626
+ p: 4.378173828125 * l - 4.24560546875 * m - .132568359375 * s
1627
+ };
1628
+ if (alpha !== void 0) res.alpha = alpha;
1629
+ return res;
1630
+ };
1631
+ //#endregion
1632
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/itp/definition.js
1633
+ var definition$18 = {
1634
+ mode: "itp",
1635
+ channels: [
1636
+ "i",
1637
+ "t",
1638
+ "p",
1639
+ "alpha"
1640
+ ],
1641
+ parse: ["--ictcp"],
1642
+ serialize: "--ictcp",
1643
+ toMode: {
1644
+ xyz65: convertItpToXyz65,
1645
+ rgb: (color) => convertXyz65ToRgb(convertItpToXyz65(color))
1646
+ },
1647
+ fromMode: {
1648
+ xyz65: convertXyz65ToItp,
1649
+ rgb: (color) => convertXyz65ToItp(convertRgbToXyz65(color))
1650
+ },
1651
+ ranges: {
1652
+ i: [0, .581],
1653
+ t: [-.369, .272],
1654
+ p: [-.164, .331]
1655
+ },
1656
+ interpolate: {
1657
+ i: interpolatorLinear,
1658
+ t: interpolatorLinear,
1659
+ p: interpolatorLinear,
1660
+ alpha: {
1661
+ use: interpolatorLinear,
1662
+ fixup: fixupAlpha
1663
+ }
1664
+ }
1665
+ };
1666
+ //#endregion
1667
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/jab/convertXyz65ToJab.js
1668
+ var p$1 = 134.03437499999998;
1669
+ var d0$1 = 16295499532821565e-27;
1670
+ var jabPqEncode = (v) => {
1671
+ if (v < 0) return 0;
1672
+ let vn = Math.pow(v / 1e4, M1);
1673
+ return Math.pow((C1 + C2 * vn) / (1 + C3 * vn), p$1);
1674
+ };
1675
+ var abs = (v = 0) => Math.max(v * 203, 0);
1676
+ var convertXyz65ToJab = ({ x, y, z, alpha }) => {
1677
+ x = abs(x);
1678
+ y = abs(y);
1679
+ z = abs(z);
1680
+ let xp = 1.15 * x - .15 * z;
1681
+ let yp = .66 * y + .34 * x;
1682
+ let l = jabPqEncode(.41478972 * xp + .579999 * yp + .014648 * z);
1683
+ let m = jabPqEncode(-.20151 * xp + 1.120649 * yp + .0531008 * z);
1684
+ let s = jabPqEncode(-.0166008 * xp + .2648 * yp + .6684799 * z);
1685
+ let i = (l + m) / 2;
1686
+ let res = {
1687
+ mode: "jab",
1688
+ j: .44 * i / (1 - .56 * i) - d0$1,
1689
+ a: 3.524 * l - 4.066708 * m + .542708 * s,
1690
+ b: .199076 * l + 1.096799 * m - 1.295875 * s
1691
+ };
1692
+ if (alpha !== void 0) res.alpha = alpha;
1693
+ return res;
1694
+ };
1695
+ //#endregion
1696
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/jab/convertJabToXyz65.js
1697
+ var p = 134.03437499999998;
1698
+ var d0 = 16295499532821565e-27;
1699
+ var jabPqDecode = (v) => {
1700
+ if (v < 0) return 0;
1701
+ let vp = Math.pow(v, 1 / p);
1702
+ return 1e4 * Math.pow((C1 - vp) / (C3 * vp - C2), 1 / M1);
1703
+ };
1704
+ var rel = (v) => v / 203;
1705
+ var convertJabToXyz65 = ({ j, a, b, alpha }) => {
1706
+ if (j === void 0) j = 0;
1707
+ if (a === void 0) a = 0;
1708
+ if (b === void 0) b = 0;
1709
+ let i = (j + d0) / (.44 + .56 * (j + d0));
1710
+ let l = jabPqDecode(i + .13860504 * a + .058047316 * b);
1711
+ let m = jabPqDecode(i - .13860504 * a - .058047316 * b);
1712
+ let s = jabPqDecode(i - .096019242 * a - .8118919 * b);
1713
+ let res = {
1714
+ mode: "xyz65",
1715
+ x: rel(1.661373024652174 * l - .914523081304348 * m + .23136208173913045 * s),
1716
+ y: rel(-.3250758611844533 * l + 1.571847026732543 * m - .21825383453227928 * s),
1717
+ z: rel(-.090982811 * l - .31272829 * m + 1.5227666 * s)
1718
+ };
1719
+ if (alpha !== void 0) res.alpha = alpha;
1720
+ return res;
1721
+ };
1722
+ //#endregion
1723
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/jab/convertRgbToJab.js
1724
+ var convertRgbToJab = (rgb) => {
1725
+ let res = convertXyz65ToJab(convertRgbToXyz65(rgb));
1726
+ if (rgb.r === rgb.b && rgb.b === rgb.g) res.a = res.b = 0;
1727
+ return res;
1728
+ };
1729
+ //#endregion
1730
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/jab/convertJabToRgb.js
1731
+ var convertJabToRgb = (color) => convertXyz65ToRgb(convertJabToXyz65(color));
1732
+ //#endregion
1733
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/jab/definition.js
1734
+ var definition$17 = {
1735
+ mode: "jab",
1736
+ channels: [
1737
+ "j",
1738
+ "a",
1739
+ "b",
1740
+ "alpha"
1741
+ ],
1742
+ parse: ["--jzazbz"],
1743
+ serialize: "--jzazbz",
1744
+ fromMode: {
1745
+ rgb: convertRgbToJab,
1746
+ xyz65: convertXyz65ToJab
1747
+ },
1748
+ toMode: {
1749
+ rgb: convertJabToRgb,
1750
+ xyz65: convertJabToXyz65
1751
+ },
1752
+ ranges: {
1753
+ j: [0, .222],
1754
+ a: [-.109, .129],
1755
+ b: [-.185, .134]
1756
+ },
1757
+ interpolate: {
1758
+ j: interpolatorLinear,
1759
+ a: interpolatorLinear,
1760
+ b: interpolatorLinear,
1761
+ alpha: {
1762
+ use: interpolatorLinear,
1763
+ fixup: fixupAlpha
1764
+ }
1765
+ }
1766
+ };
1767
+ //#endregion
1768
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/jch/convertJabToJch.js
1769
+ var convertJabToJch = ({ j, a, b, alpha }) => {
1770
+ if (a === void 0) a = 0;
1771
+ if (b === void 0) b = 0;
1772
+ let c = Math.sqrt(a * a + b * b);
1773
+ let res = {
1774
+ mode: "jch",
1775
+ j,
1776
+ c
1777
+ };
1778
+ if (c) res.h = normalizeHue(Math.atan2(b, a) * 180 / Math.PI);
1779
+ if (alpha !== void 0) res.alpha = alpha;
1780
+ return res;
1781
+ };
1782
+ //#endregion
1783
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/jch/convertJchToJab.js
1784
+ var convertJchToJab = ({ j, c, h, alpha }) => {
1785
+ if (h === void 0) h = 0;
1786
+ let res = {
1787
+ mode: "jab",
1788
+ j,
1789
+ a: c ? c * Math.cos(h / 180 * Math.PI) : 0,
1790
+ b: c ? c * Math.sin(h / 180 * Math.PI) : 0
1791
+ };
1792
+ if (alpha !== void 0) res.alpha = alpha;
1793
+ return res;
1794
+ };
1795
+ //#endregion
1796
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/jch/definition.js
1797
+ var definition$16 = {
1798
+ mode: "jch",
1799
+ parse: ["--jzczhz"],
1800
+ serialize: "--jzczhz",
1801
+ toMode: {
1802
+ jab: convertJchToJab,
1803
+ rgb: (c) => convertJabToRgb(convertJchToJab(c))
1804
+ },
1805
+ fromMode: {
1806
+ rgb: (c) => convertJabToJch(convertRgbToJab(c)),
1807
+ jab: convertJabToJch
1808
+ },
1809
+ channels: [
1810
+ "j",
1811
+ "c",
1812
+ "h",
1813
+ "alpha"
1814
+ ],
1815
+ ranges: {
1816
+ j: [0, .221],
1817
+ c: [0, .19],
1818
+ h: [0, 360]
1819
+ },
1820
+ interpolate: {
1821
+ h: {
1822
+ use: interpolatorLinear,
1823
+ fixup: fixupHueShorter
1824
+ },
1825
+ c: interpolatorLinear,
1826
+ j: interpolatorLinear,
1827
+ alpha: {
1828
+ use: interpolatorLinear,
1829
+ fixup: fixupAlpha
1830
+ }
1831
+ },
1832
+ difference: { h: differenceHueChroma },
1833
+ average: { h: averageAngle }
1834
+ };
1835
+ //#endregion
1836
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz50/constants.js
1837
+ var k$2 = Math.pow(29, 3) / Math.pow(3, 3);
1838
+ var e = Math.pow(6, 3) / Math.pow(29, 3);
1839
+ //#endregion
1840
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab/convertLabToXyz50.js
1841
+ var fn = (v) => Math.pow(v, 3) > e ? Math.pow(v, 3) : (116 * v - 16) / k$2;
1842
+ var convertLabToXyz50 = ({ l, a, b, alpha }) => {
1843
+ if (l === void 0) l = 0;
1844
+ if (a === void 0) a = 0;
1845
+ if (b === void 0) b = 0;
1846
+ let fy = (l + 16) / 116;
1847
+ let fx = a / 500 + fy;
1848
+ let fz = fy - b / 200;
1849
+ let res = {
1850
+ mode: "xyz50",
1851
+ x: fn(fx) * D50.X,
1852
+ y: fn(fy) * D50.Y,
1853
+ z: fn(fz) * D50.Z
1854
+ };
1855
+ if (alpha !== void 0) res.alpha = alpha;
1856
+ return res;
1857
+ };
1858
+ //#endregion
1859
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz50/convertXyz50ToRgb.js
1860
+ var convertXyz50ToRgb = ({ x, y, z, alpha }) => {
1861
+ if (x === void 0) x = 0;
1862
+ if (y === void 0) y = 0;
1863
+ if (z === void 0) z = 0;
1864
+ let res = convertLrgbToRgb({
1865
+ r: x * 3.1341359569958707 - y * 1.6173863321612538 - .4906619460083532 * z,
1866
+ g: x * -.978795502912089 + y * 1.916254567259524 + .03344273116131949 * z,
1867
+ b: x * .07195537988411677 - y * .2289768264158322 + 1.405386058324125 * z
1868
+ });
1869
+ if (alpha !== void 0) res.alpha = alpha;
1870
+ return res;
1871
+ };
1872
+ //#endregion
1873
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab/convertLabToRgb.js
1874
+ var convertLabToRgb = (lab) => convertXyz50ToRgb(convertLabToXyz50(lab));
1875
+ //#endregion
1876
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz50/convertRgbToXyz50.js
1877
+ var convertRgbToXyz50 = (rgb) => {
1878
+ let { r, g, b, alpha } = convertRgbToLrgb(rgb);
1879
+ let res = {
1880
+ mode: "xyz50",
1881
+ x: .436065742824811 * r + .3851514688337912 * g + .14307845442264197 * b,
1882
+ y: .22249319175623702 * r + .7168870538238823 * g + .06061979053616537 * b,
1883
+ z: .013923904500943465 * r + .09708128566574634 * g + .7140993584005155 * b
1884
+ };
1885
+ if (alpha !== void 0) res.alpha = alpha;
1886
+ return res;
1887
+ };
1888
+ //#endregion
1889
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab/convertXyz50ToLab.js
1890
+ var f = (value) => value > e ? Math.cbrt(value) : (k$2 * value + 16) / 116;
1891
+ var convertXyz50ToLab = ({ x, y, z, alpha }) => {
1892
+ if (x === void 0) x = 0;
1893
+ if (y === void 0) y = 0;
1894
+ if (z === void 0) z = 0;
1895
+ let f0 = f(x / D50.X);
1896
+ let f1 = f(y / D50.Y);
1897
+ let f2 = f(z / D50.Z);
1898
+ let res = {
1899
+ mode: "lab",
1900
+ l: 116 * f1 - 16,
1901
+ a: 500 * (f0 - f1),
1902
+ b: 200 * (f1 - f2)
1903
+ };
1904
+ if (alpha !== void 0) res.alpha = alpha;
1905
+ return res;
1906
+ };
1907
+ //#endregion
1908
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab/convertRgbToLab.js
1909
+ var convertRgbToLab = (rgb) => {
1910
+ let res = convertXyz50ToLab(convertRgbToXyz50(rgb));
1911
+ if (rgb.r === rgb.b && rgb.b === rgb.g) res.a = res.b = 0;
1912
+ return res;
1913
+ };
1914
+ //#endregion
1915
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab/parseLab.js
1916
+ function parseLab(color, parsed) {
1917
+ if (!parsed || parsed[0] !== "lab") return;
1918
+ const res = { mode: "lab" };
1919
+ const [, l, a, b, alpha] = parsed;
1920
+ if (l.type === Tok.Hue || a.type === Tok.Hue || b.type === Tok.Hue) return;
1921
+ if (l.type !== Tok.None) res.l = Math.min(Math.max(0, l.value), 100);
1922
+ if (a.type !== Tok.None) res.a = a.type === Tok.Number ? a.value : a.value * 125 / 100;
1923
+ if (b.type !== Tok.None) res.b = b.type === Tok.Number ? b.value : b.value * 125 / 100;
1924
+ if (alpha.type !== Tok.None) res.alpha = Math.min(1, Math.max(0, alpha.type === Tok.Number ? alpha.value : alpha.value / 100));
1925
+ return res;
1926
+ }
1927
+ //#endregion
1928
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab/definition.js
1929
+ var definition$15 = {
1930
+ mode: "lab",
1931
+ toMode: {
1932
+ xyz50: convertLabToXyz50,
1933
+ rgb: convertLabToRgb
1934
+ },
1935
+ fromMode: {
1936
+ xyz50: convertXyz50ToLab,
1937
+ rgb: convertRgbToLab
1938
+ },
1939
+ channels: [
1940
+ "l",
1941
+ "a",
1942
+ "b",
1943
+ "alpha"
1944
+ ],
1945
+ ranges: {
1946
+ l: [0, 100],
1947
+ a: [-125, 125],
1948
+ b: [-125, 125]
1949
+ },
1950
+ parse: [parseLab],
1951
+ serialize: (c) => `lab(${c.l !== void 0 ? c.l : "none"} ${c.a !== void 0 ? c.a : "none"} ${c.b !== void 0 ? c.b : "none"}${c.alpha < 1 ? ` / ${c.alpha}` : ""})`,
1952
+ interpolate: {
1953
+ l: interpolatorLinear,
1954
+ a: interpolatorLinear,
1955
+ b: interpolatorLinear,
1956
+ alpha: {
1957
+ use: interpolatorLinear,
1958
+ fixup: fixupAlpha
1959
+ }
1960
+ }
1961
+ };
1962
+ //#endregion
1963
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab65/definition.js
1964
+ var definition$14 = {
1965
+ ...definition$15,
1966
+ mode: "lab65",
1967
+ parse: ["--lab-d65"],
1968
+ serialize: "--lab-d65",
1969
+ toMode: {
1970
+ xyz65: convertLab65ToXyz65,
1971
+ rgb: convertLab65ToRgb
1972
+ },
1973
+ fromMode: {
1974
+ xyz65: convertXyz65ToLab65,
1975
+ rgb: convertRgbToLab65
1976
+ },
1977
+ ranges: {
1978
+ l: [0, 100],
1979
+ a: [-125, 125],
1980
+ b: [-125, 125]
1981
+ }
1982
+ };
1983
+ //#endregion
1984
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lch/parseLch.js
1985
+ function parseLch(color, parsed) {
1986
+ if (!parsed || parsed[0] !== "lch") return;
1987
+ const res = { mode: "lch" };
1988
+ const [, l, c, h, alpha] = parsed;
1989
+ if (l.type !== Tok.None) {
1990
+ if (l.type === Tok.Hue) return;
1991
+ res.l = Math.min(Math.max(0, l.value), 100);
1992
+ }
1993
+ if (c.type !== Tok.None) res.c = Math.max(0, c.type === Tok.Number ? c.value : c.value * 150 / 100);
1994
+ if (h.type !== Tok.None) {
1995
+ if (h.type === Tok.Percentage) return;
1996
+ res.h = h.value;
1997
+ }
1998
+ if (alpha.type !== Tok.None) res.alpha = Math.min(1, Math.max(0, alpha.type === Tok.Number ? alpha.value : alpha.value / 100));
1999
+ return res;
2000
+ }
2001
+ //#endregion
2002
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lch/definition.js
2003
+ var definition$13 = {
2004
+ mode: "lch",
2005
+ toMode: {
2006
+ lab: convertLchToLab,
2007
+ rgb: (c) => convertLabToRgb(convertLchToLab(c))
2008
+ },
2009
+ fromMode: {
2010
+ rgb: (c) => convertLabToLch(convertRgbToLab(c)),
2011
+ lab: convertLabToLch
2012
+ },
2013
+ channels: [
2014
+ "l",
2015
+ "c",
2016
+ "h",
2017
+ "alpha"
2018
+ ],
2019
+ ranges: {
2020
+ l: [0, 100],
2021
+ c: [0, 150],
2022
+ h: [0, 360]
2023
+ },
2024
+ parse: [parseLch],
2025
+ serialize: (c) => `lch(${c.l !== void 0 ? c.l : "none"} ${c.c !== void 0 ? c.c : "none"} ${c.h !== void 0 ? c.h : "none"}${c.alpha < 1 ? ` / ${c.alpha}` : ""})`,
2026
+ interpolate: {
2027
+ h: {
2028
+ use: interpolatorLinear,
2029
+ fixup: fixupHueShorter
2030
+ },
2031
+ c: interpolatorLinear,
2032
+ l: interpolatorLinear,
2033
+ alpha: {
2034
+ use: interpolatorLinear,
2035
+ fixup: fixupAlpha
2036
+ }
2037
+ },
2038
+ difference: { h: differenceHueChroma },
2039
+ average: { h: averageAngle }
2040
+ };
2041
+ //#endregion
2042
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lch65/definition.js
2043
+ var definition$12 = {
2044
+ ...definition$13,
2045
+ mode: "lch65",
2046
+ parse: ["--lch-d65"],
2047
+ serialize: "--lch-d65",
2048
+ toMode: {
2049
+ lab65: (c) => convertLchToLab(c, "lab65"),
2050
+ rgb: (c) => convertLab65ToRgb(convertLchToLab(c, "lab65"))
2051
+ },
2052
+ fromMode: {
2053
+ rgb: (c) => convertLabToLch(convertRgbToLab65(c), "lch65"),
2054
+ lab65: (c) => convertLabToLch(c, "lch65")
2055
+ },
2056
+ ranges: {
2057
+ l: [0, 100],
2058
+ c: [0, 150],
2059
+ h: [0, 360]
2060
+ }
2061
+ };
2062
+ //#endregion
2063
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lchuv/convertLuvToLchuv.js
2064
+ var convertLuvToLchuv = ({ l, u, v, alpha }) => {
2065
+ if (u === void 0) u = 0;
2066
+ if (v === void 0) v = 0;
2067
+ let c = Math.sqrt(u * u + v * v);
2068
+ let res = {
2069
+ mode: "lchuv",
2070
+ l,
2071
+ c
2072
+ };
2073
+ if (c) res.h = normalizeHue(Math.atan2(v, u) * 180 / Math.PI);
2074
+ if (alpha !== void 0) res.alpha = alpha;
2075
+ return res;
2076
+ };
2077
+ //#endregion
2078
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lchuv/convertLchuvToLuv.js
2079
+ var convertLchuvToLuv = ({ l, c, h, alpha }) => {
2080
+ if (h === void 0) h = 0;
2081
+ let res = {
2082
+ mode: "luv",
2083
+ l,
2084
+ u: c ? c * Math.cos(h / 180 * Math.PI) : 0,
2085
+ v: c ? c * Math.sin(h / 180 * Math.PI) : 0
2086
+ };
2087
+ if (alpha !== void 0) res.alpha = alpha;
2088
+ return res;
2089
+ };
2090
+ //#endregion
2091
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/luv/convertXyz50ToLuv.js
2092
+ var u_fn$1 = (x, y, z) => 4 * x / (x + 15 * y + 3 * z);
2093
+ var v_fn$1 = (x, y, z) => 9 * y / (x + 15 * y + 3 * z);
2094
+ var un$1 = u_fn$1(D50.X, D50.Y, D50.Z);
2095
+ var vn$1 = v_fn$1(D50.X, D50.Y, D50.Z);
2096
+ var l_fn = (value) => value <= e ? k$2 * value : 116 * Math.cbrt(value) - 16;
2097
+ var convertXyz50ToLuv = ({ x, y, z, alpha }) => {
2098
+ if (x === void 0) x = 0;
2099
+ if (y === void 0) y = 0;
2100
+ if (z === void 0) z = 0;
2101
+ let l = l_fn(y / D50.Y);
2102
+ let u = u_fn$1(x, y, z);
2103
+ let v = v_fn$1(x, y, z);
2104
+ if (!isFinite(u) || !isFinite(v)) l = u = v = 0;
2105
+ else {
2106
+ u = 13 * l * (u - un$1);
2107
+ v = 13 * l * (v - vn$1);
2108
+ }
2109
+ let res = {
2110
+ mode: "luv",
2111
+ l,
2112
+ u,
2113
+ v
2114
+ };
2115
+ if (alpha !== void 0) res.alpha = alpha;
2116
+ return res;
2117
+ };
2118
+ //#endregion
2119
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/luv/convertLuvToXyz50.js
2120
+ var u_fn = (x, y, z) => 4 * x / (x + 15 * y + 3 * z);
2121
+ var v_fn = (x, y, z) => 9 * y / (x + 15 * y + 3 * z);
2122
+ var un = u_fn(D50.X, D50.Y, D50.Z);
2123
+ var vn = v_fn(D50.X, D50.Y, D50.Z);
2124
+ var convertLuvToXyz50 = ({ l, u, v, alpha }) => {
2125
+ if (l === void 0) l = 0;
2126
+ if (l === 0) return {
2127
+ mode: "xyz50",
2128
+ x: 0,
2129
+ y: 0,
2130
+ z: 0
2131
+ };
2132
+ if (u === void 0) u = 0;
2133
+ if (v === void 0) v = 0;
2134
+ let up = u / (13 * l) + un;
2135
+ let vp = v / (13 * l) + vn;
2136
+ let y = D50.Y * (l <= 8 ? l / k$2 : Math.pow((l + 16) / 116, 3));
2137
+ let res = {
2138
+ mode: "xyz50",
2139
+ x: y * (9 * up) / (4 * vp),
2140
+ y,
2141
+ z: y * (12 - 3 * up - 20 * vp) / (4 * vp)
2142
+ };
2143
+ if (alpha !== void 0) res.alpha = alpha;
2144
+ return res;
2145
+ };
2146
+ //#endregion
2147
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lchuv/definition.js
2148
+ var convertRgbToLchuv = (rgb) => convertLuvToLchuv(convertXyz50ToLuv(convertRgbToXyz50(rgb)));
2149
+ var convertLchuvToRgb = (lchuv) => convertXyz50ToRgb(convertLuvToXyz50(convertLchuvToLuv(lchuv)));
2150
+ var definition$11 = {
2151
+ mode: "lchuv",
2152
+ toMode: {
2153
+ luv: convertLchuvToLuv,
2154
+ rgb: convertLchuvToRgb
2155
+ },
2156
+ fromMode: {
2157
+ rgb: convertRgbToLchuv,
2158
+ luv: convertLuvToLchuv
2159
+ },
2160
+ channels: [
2161
+ "l",
2162
+ "c",
2163
+ "h",
2164
+ "alpha"
2165
+ ],
2166
+ parse: ["--lchuv"],
2167
+ serialize: "--lchuv",
2168
+ ranges: {
2169
+ l: [0, 100],
2170
+ c: [0, 176.956],
2171
+ h: [0, 360]
2172
+ },
2173
+ interpolate: {
2174
+ h: {
2175
+ use: interpolatorLinear,
2176
+ fixup: fixupHueShorter
2177
+ },
2178
+ c: interpolatorLinear,
2179
+ l: interpolatorLinear,
2180
+ alpha: {
2181
+ use: interpolatorLinear,
2182
+ fixup: fixupAlpha
2183
+ }
2184
+ },
2185
+ difference: { h: differenceHueChroma },
2186
+ average: { h: averageAngle }
2187
+ };
2188
+ //#endregion
2189
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lrgb/definition.js
2190
+ var definition$10 = {
2191
+ ...definition$27,
2192
+ mode: "lrgb",
2193
+ toMode: { rgb: convertLrgbToRgb },
2194
+ fromMode: { rgb: convertRgbToLrgb },
2195
+ parse: ["srgb-linear"],
2196
+ serialize: "srgb-linear"
2197
+ };
2198
+ //#endregion
2199
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/luv/definition.js
2200
+ var definition$9 = {
2201
+ mode: "luv",
2202
+ toMode: {
2203
+ xyz50: convertLuvToXyz50,
2204
+ rgb: (luv) => convertXyz50ToRgb(convertLuvToXyz50(luv))
2205
+ },
2206
+ fromMode: {
2207
+ xyz50: convertXyz50ToLuv,
2208
+ rgb: (rgb) => convertXyz50ToLuv(convertRgbToXyz50(rgb))
2209
+ },
2210
+ channels: [
2211
+ "l",
2212
+ "u",
2213
+ "v",
2214
+ "alpha"
2215
+ ],
2216
+ parse: ["--luv"],
2217
+ serialize: "--luv",
2218
+ ranges: {
2219
+ l: [0, 100],
2220
+ u: [-84.936, 175.042],
2221
+ v: [-125.882, 87.243]
2222
+ },
2223
+ interpolate: {
2224
+ l: interpolatorLinear,
2225
+ u: interpolatorLinear,
2226
+ v: interpolatorLinear,
2227
+ alpha: {
2228
+ use: interpolatorLinear,
2229
+ fixup: fixupAlpha
2230
+ }
2231
+ }
2232
+ };
2233
+ //#endregion
2234
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/oklab/convertLrgbToOklab.js
2235
+ var convertLrgbToOklab = ({ r, g, b, alpha }) => {
2236
+ if (r === void 0) r = 0;
2237
+ if (g === void 0) g = 0;
2238
+ if (b === void 0) b = 0;
2239
+ let L = Math.cbrt(.412221469470763 * r + .5363325372617348 * g + .0514459932675022 * b);
2240
+ let M = Math.cbrt(.2119034958178252 * r + .6806995506452344 * g + .1073969535369406 * b);
2241
+ let S = Math.cbrt(.0883024591900564 * r + .2817188391361215 * g + .6299787016738222 * b);
2242
+ let res = {
2243
+ mode: "oklab",
2244
+ l: .210454268309314 * L + .7936177747023054 * M - .0040720430116193 * S,
2245
+ a: 1.9779985324311684 * L - 2.42859224204858 * M + .450593709617411 * S,
2246
+ b: .0259040424655478 * L + .7827717124575296 * M - .8086757549230774 * S
2247
+ };
2248
+ if (alpha !== void 0) res.alpha = alpha;
2249
+ return res;
2250
+ };
2251
+ //#endregion
2252
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/oklab/convertRgbToOklab.js
2253
+ var convertRgbToOklab = (rgb) => {
2254
+ let res = convertLrgbToOklab(convertRgbToLrgb(rgb));
2255
+ if (rgb.r === rgb.b && rgb.b === rgb.g) res.a = res.b = 0;
2256
+ return res;
2257
+ };
2258
+ //#endregion
2259
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/oklab/convertOklabToLrgb.js
2260
+ var convertOklabToLrgb = ({ l, a, b, alpha }) => {
2261
+ if (l === void 0) l = 0;
2262
+ if (a === void 0) a = 0;
2263
+ if (b === void 0) b = 0;
2264
+ let L = Math.pow(l + .3963377773761749 * a + .2158037573099136 * b, 3);
2265
+ let M = Math.pow(l - .1055613458156586 * a - .0638541728258133 * b, 3);
2266
+ let S = Math.pow(l - .0894841775298119 * a - 1.2914855480194092 * b, 3);
2267
+ let res = {
2268
+ mode: "lrgb",
2269
+ r: 4.076741636075957 * L - 3.3077115392580616 * M + .2309699031821044 * S,
2270
+ g: -1.2684379732850317 * L + 2.6097573492876887 * M - .3413193760026573 * S,
2271
+ b: -.0041960761386756 * L - .7034186179359362 * M + 1.7076146940746117 * S
2272
+ };
2273
+ if (alpha !== void 0) res.alpha = alpha;
2274
+ return res;
2275
+ };
2276
+ //#endregion
2277
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/oklab/convertOklabToRgb.js
2278
+ var convertOklabToRgb = (c) => convertLrgbToRgb(convertOklabToLrgb(c));
2279
+ //#endregion
2280
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/okhsl/helpers.js
2281
+ function toe(x) {
2282
+ const k_1 = .206;
2283
+ const k_2 = .03;
2284
+ const k_3 = 1.206 / 1.03;
2285
+ return .5 * (k_3 * x - k_1 + Math.sqrt((k_3 * x - k_1) * (k_3 * x - k_1) + 4 * k_2 * k_3 * x));
2286
+ }
2287
+ function toe_inv(x) {
2288
+ return (x * x + .206 * x) / (1.206 / 1.03 * (x + .03));
2289
+ }
2290
+ function compute_max_saturation(a, b) {
2291
+ let k0, k1, k2, k3, k4, wl, wm, ws;
2292
+ if (-1.88170328 * a - .80936493 * b > 1) {
2293
+ k0 = 1.19086277;
2294
+ k1 = 1.76576728;
2295
+ k2 = .59662641;
2296
+ k3 = .75515197;
2297
+ k4 = .56771245;
2298
+ wl = 4.0767416621;
2299
+ wm = -3.3077115913;
2300
+ ws = .2309699292;
2301
+ } else if (1.81444104 * a - 1.19445276 * b > 1) {
2302
+ k0 = .73956515;
2303
+ k1 = -.45954404;
2304
+ k2 = .08285427;
2305
+ k3 = .1254107;
2306
+ k4 = .14503204;
2307
+ wl = -1.2684380046;
2308
+ wm = 2.6097574011;
2309
+ ws = -.3413193965;
2310
+ } else {
2311
+ k0 = 1.35733652;
2312
+ k1 = -.00915799;
2313
+ k2 = -1.1513021;
2314
+ k3 = -.50559606;
2315
+ k4 = .00692167;
2316
+ wl = -.0041960863;
2317
+ wm = -.7034186147;
2318
+ ws = 1.707614701;
2319
+ }
2320
+ let S = k0 + k1 * a + k2 * b + k3 * a * a + k4 * a * b;
2321
+ let k_l = .3963377774 * a + .2158037573 * b;
2322
+ let k_m = -.1055613458 * a - .0638541728 * b;
2323
+ let k_s = -.0894841775 * a - 1.291485548 * b;
2324
+ {
2325
+ let l_ = 1 + S * k_l;
2326
+ let m_ = 1 + S * k_m;
2327
+ let s_ = 1 + S * k_s;
2328
+ let l = l_ * l_ * l_;
2329
+ let m = m_ * m_ * m_;
2330
+ let s = s_ * s_ * s_;
2331
+ let l_dS = 3 * k_l * l_ * l_;
2332
+ let m_dS = 3 * k_m * m_ * m_;
2333
+ let s_dS = 3 * k_s * s_ * s_;
2334
+ let l_dS2 = 6 * k_l * k_l * l_;
2335
+ let m_dS2 = 6 * k_m * k_m * m_;
2336
+ let s_dS2 = 6 * k_s * k_s * s_;
2337
+ let f = wl * l + wm * m + ws * s;
2338
+ let f1 = wl * l_dS + wm * m_dS + ws * s_dS;
2339
+ let f2 = wl * l_dS2 + wm * m_dS2 + ws * s_dS2;
2340
+ S = S - f * f1 / (f1 * f1 - .5 * f * f2);
2341
+ }
2342
+ return S;
2343
+ }
2344
+ function find_cusp(a, b) {
2345
+ let S_cusp = compute_max_saturation(a, b);
2346
+ let rgb = convertOklabToLrgb({
2347
+ l: 1,
2348
+ a: S_cusp * a,
2349
+ b: S_cusp * b
2350
+ });
2351
+ let L_cusp = Math.cbrt(1 / Math.max(rgb.r, rgb.g, rgb.b));
2352
+ return [L_cusp, L_cusp * S_cusp];
2353
+ }
2354
+ function find_gamut_intersection(a, b, L1, C1, L0, cusp = null) {
2355
+ if (!cusp) cusp = find_cusp(a, b);
2356
+ let t;
2357
+ if ((L1 - L0) * cusp[1] - (cusp[0] - L0) * C1 <= 0) t = cusp[1] * L0 / (C1 * cusp[0] + cusp[1] * (L0 - L1));
2358
+ else {
2359
+ t = cusp[1] * (L0 - 1) / (C1 * (cusp[0] - 1) + cusp[1] * (L0 - L1));
2360
+ {
2361
+ let dL = L1 - L0;
2362
+ let dC = C1;
2363
+ let k_l = .3963377774 * a + .2158037573 * b;
2364
+ let k_m = -.1055613458 * a - .0638541728 * b;
2365
+ let k_s = -.0894841775 * a - 1.291485548 * b;
2366
+ let l_dt = dL + dC * k_l;
2367
+ let m_dt = dL + dC * k_m;
2368
+ let s_dt = dL + dC * k_s;
2369
+ {
2370
+ let L = L0 * (1 - t) + t * L1;
2371
+ let C = t * C1;
2372
+ let l_ = L + C * k_l;
2373
+ let m_ = L + C * k_m;
2374
+ let s_ = L + C * k_s;
2375
+ let l = l_ * l_ * l_;
2376
+ let m = m_ * m_ * m_;
2377
+ let s = s_ * s_ * s_;
2378
+ let ldt = 3 * l_dt * l_ * l_;
2379
+ let mdt = 3 * m_dt * m_ * m_;
2380
+ let sdt = 3 * s_dt * s_ * s_;
2381
+ let ldt2 = 6 * l_dt * l_dt * l_;
2382
+ let mdt2 = 6 * m_dt * m_dt * m_;
2383
+ let sdt2 = 6 * s_dt * s_dt * s_;
2384
+ let r = 4.0767416621 * l - 3.3077115913 * m + .2309699292 * s - 1;
2385
+ let r1 = 4.0767416621 * ldt - 3.3077115913 * mdt + .2309699292 * sdt;
2386
+ let r2 = 4.0767416621 * ldt2 - 3.3077115913 * mdt2 + .2309699292 * sdt2;
2387
+ let u_r = r1 / (r1 * r1 - .5 * r * r2);
2388
+ let t_r = -r * u_r;
2389
+ let g = -1.2684380046 * l + 2.6097574011 * m - .3413193965 * s - 1;
2390
+ let g1 = -1.2684380046 * ldt + 2.6097574011 * mdt - .3413193965 * sdt;
2391
+ let g2 = -1.2684380046 * ldt2 + 2.6097574011 * mdt2 - .3413193965 * sdt2;
2392
+ let u_g = g1 / (g1 * g1 - .5 * g * g2);
2393
+ let t_g = -g * u_g;
2394
+ let b = -.0041960863 * l - .7034186147 * m + 1.707614701 * s - 1;
2395
+ let b1 = -.0041960863 * ldt - .7034186147 * mdt + 1.707614701 * sdt;
2396
+ let b2 = -.0041960863 * ldt2 - .7034186147 * mdt2 + 1.707614701 * sdt2;
2397
+ let u_b = b1 / (b1 * b1 - .5 * b * b2);
2398
+ let t_b = -b * u_b;
2399
+ t_r = u_r >= 0 ? t_r : 1e6;
2400
+ t_g = u_g >= 0 ? t_g : 1e6;
2401
+ t_b = u_b >= 0 ? t_b : 1e6;
2402
+ t += Math.min(t_r, Math.min(t_g, t_b));
2403
+ }
2404
+ }
2405
+ }
2406
+ return t;
2407
+ }
2408
+ function get_ST_max(a_, b_, cusp = null) {
2409
+ if (!cusp) cusp = find_cusp(a_, b_);
2410
+ let L = cusp[0];
2411
+ let C = cusp[1];
2412
+ return [C / L, C / (1 - L)];
2413
+ }
2414
+ function get_Cs(L, a_, b_) {
2415
+ let cusp = find_cusp(a_, b_);
2416
+ let C_max = find_gamut_intersection(a_, b_, L, 1, L, cusp);
2417
+ let ST_max = get_ST_max(a_, b_, cusp);
2418
+ let S_mid = .11516993 + 1 / (7.4477897 + 4.1590124 * b_ + a_ * (-2.19557347 + 1.75198401 * b_ + a_ * (-2.13704948 - 10.02301043 * b_ + a_ * (-4.24894561 + 5.38770819 * b_ + 4.69891013 * a_))));
2419
+ let T_mid = .11239642 + 1 / (1.6132032 - .68124379 * b_ + a_ * (.40370612 + .90148123 * b_ + a_ * (-.27087943 + .6122399 * b_ + a_ * (.00299215 - .45399568 * b_ - .14661872 * a_))));
2420
+ let k = C_max / Math.min(L * ST_max[0], (1 - L) * ST_max[1]);
2421
+ let C_a = L * S_mid;
2422
+ let C_b = (1 - L) * T_mid;
2423
+ let C_mid = .9 * k * Math.sqrt(Math.sqrt(1 / (1 / (C_a * C_a * C_a * C_a) + 1 / (C_b * C_b * C_b * C_b))));
2424
+ C_a = L * .4;
2425
+ C_b = (1 - L) * .8;
2426
+ return [
2427
+ Math.sqrt(1 / (1 / (C_a * C_a) + 1 / (C_b * C_b))),
2428
+ C_mid,
2429
+ C_max
2430
+ ];
2431
+ }
2432
+ //#endregion
2433
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/okhsl/convertOklabToOkhsl.js
2434
+ function convertOklabToOkhsl(lab) {
2435
+ const l = lab.l !== void 0 ? lab.l : 0;
2436
+ const a = lab.a !== void 0 ? lab.a : 0;
2437
+ const b = lab.b !== void 0 ? lab.b : 0;
2438
+ const ret = {
2439
+ mode: "okhsl",
2440
+ l: toe(l)
2441
+ };
2442
+ if (lab.alpha !== void 0) ret.alpha = lab.alpha;
2443
+ let c = Math.sqrt(a * a + b * b);
2444
+ if (!c) {
2445
+ ret.s = 0;
2446
+ return ret;
2447
+ }
2448
+ let [C_0, C_mid, C_max] = get_Cs(l, a / c, b / c);
2449
+ let s;
2450
+ if (c < C_mid) {
2451
+ let k_0 = 0;
2452
+ let k_1 = .8 * C_0;
2453
+ let k_2 = 1 - k_1 / C_mid;
2454
+ s = (c - k_0) / (k_1 + k_2 * (c - k_0)) * .8;
2455
+ } else {
2456
+ let k_0 = C_mid;
2457
+ let k_1 = .2 * C_mid * C_mid * 1.25 * 1.25 / C_0;
2458
+ let k_2 = 1 - k_1 / (C_max - C_mid);
2459
+ s = .8 + .2 * ((c - k_0) / (k_1 + k_2 * (c - k_0)));
2460
+ }
2461
+ if (s) {
2462
+ ret.s = s;
2463
+ ret.h = normalizeHue(Math.atan2(b, a) * 180 / Math.PI);
2464
+ }
2465
+ return ret;
2466
+ }
2467
+ //#endregion
2468
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/okhsl/convertOkhslToOklab.js
2469
+ function convertOkhslToOklab(hsl) {
2470
+ let h = hsl.h !== void 0 ? hsl.h : 0;
2471
+ let s = hsl.s !== void 0 ? hsl.s : 0;
2472
+ let l = hsl.l !== void 0 ? hsl.l : 0;
2473
+ const ret = {
2474
+ mode: "oklab",
2475
+ l: toe_inv(l)
2476
+ };
2477
+ if (hsl.alpha !== void 0) ret.alpha = hsl.alpha;
2478
+ if (!s || l === 1) {
2479
+ ret.a = ret.b = 0;
2480
+ return ret;
2481
+ }
2482
+ let a_ = Math.cos(h / 180 * Math.PI);
2483
+ let b_ = Math.sin(h / 180 * Math.PI);
2484
+ let [C_0, C_mid, C_max] = get_Cs(ret.l, a_, b_);
2485
+ let t, k_0, k_1, k_2;
2486
+ if (s < .8) {
2487
+ t = 1.25 * s;
2488
+ k_0 = 0;
2489
+ k_1 = .8 * C_0;
2490
+ k_2 = 1 - k_1 / C_mid;
2491
+ } else {
2492
+ t = 5 * (s - .8);
2493
+ k_0 = C_mid;
2494
+ k_1 = .2 * C_mid * C_mid * 1.25 * 1.25 / C_0;
2495
+ k_2 = 1 - k_1 / (C_max - C_mid);
2496
+ }
2497
+ let C = k_0 + t * k_1 / (1 - k_2 * t);
2498
+ ret.a = C * a_;
2499
+ ret.b = C * b_;
2500
+ return ret;
2501
+ }
2502
+ //#endregion
2503
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/okhsl/modeOkhsl.js
2504
+ var modeOkhsl = {
2505
+ ...definition$21,
2506
+ mode: "okhsl",
2507
+ channels: [
2508
+ "h",
2509
+ "s",
2510
+ "l",
2511
+ "alpha"
2512
+ ],
2513
+ parse: ["--okhsl"],
2514
+ serialize: "--okhsl",
2515
+ fromMode: {
2516
+ oklab: convertOklabToOkhsl,
2517
+ rgb: (c) => convertOklabToOkhsl(convertRgbToOklab(c))
2518
+ },
2519
+ toMode: {
2520
+ oklab: convertOkhslToOklab,
2521
+ rgb: (c) => convertOklabToRgb(convertOkhslToOklab(c))
2522
+ }
2523
+ };
2524
+ //#endregion
2525
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/okhsv/convertOklabToOkhsv.js
2526
+ function convertOklabToOkhsv(lab) {
2527
+ let l = lab.l !== void 0 ? lab.l : 0;
2528
+ let a = lab.a !== void 0 ? lab.a : 0;
2529
+ let b = lab.b !== void 0 ? lab.b : 0;
2530
+ let c = Math.sqrt(a * a + b * b);
2531
+ let a_ = c ? a / c : 1;
2532
+ let b_ = c ? b / c : 1;
2533
+ let [S_max, T] = get_ST_max(a_, b_);
2534
+ let S_0 = .5;
2535
+ let k = 1 - S_0 / S_max;
2536
+ let t = T / (c + l * T);
2537
+ let L_v = t * l;
2538
+ let C_v = t * c;
2539
+ let L_vt = toe_inv(L_v);
2540
+ let C_vt = C_v * L_vt / L_v;
2541
+ let rgb_scale = convertOklabToLrgb({
2542
+ l: L_vt,
2543
+ a: a_ * C_vt,
2544
+ b: b_ * C_vt
2545
+ });
2546
+ let scale_L = Math.cbrt(1 / Math.max(rgb_scale.r, rgb_scale.g, rgb_scale.b, 0));
2547
+ l = l / scale_L;
2548
+ c = c / scale_L * toe(l) / l;
2549
+ l = toe(l);
2550
+ const ret = {
2551
+ mode: "okhsv",
2552
+ s: c ? (S_0 + T) * C_v / (T * S_0 + T * k * C_v) : 0,
2553
+ v: l ? l / L_v : 0
2554
+ };
2555
+ if (ret.s) ret.h = normalizeHue(Math.atan2(b, a) * 180 / Math.PI);
2556
+ if (lab.alpha !== void 0) ret.alpha = lab.alpha;
2557
+ return ret;
2558
+ }
2559
+ //#endregion
2560
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/okhsv/convertOkhsvToOklab.js
2561
+ function convertOkhsvToOklab(hsv) {
2562
+ const ret = { mode: "oklab" };
2563
+ if (hsv.alpha !== void 0) ret.alpha = hsv.alpha;
2564
+ const h = hsv.h !== void 0 ? hsv.h : 0;
2565
+ const s = hsv.s !== void 0 ? hsv.s : 0;
2566
+ const v = hsv.v !== void 0 ? hsv.v : 0;
2567
+ const a_ = Math.cos(h / 180 * Math.PI);
2568
+ const b_ = Math.sin(h / 180 * Math.PI);
2569
+ const [S_max, T] = get_ST_max(a_, b_);
2570
+ const S_0 = .5;
2571
+ const k = 1 - S_0 / S_max;
2572
+ const L_v = 1 - s * S_0 / (S_0 + T - T * k * s);
2573
+ const C_v = s * T * S_0 / (S_0 + T - T * k * s);
2574
+ const L_vt = toe_inv(L_v);
2575
+ const C_vt = C_v * L_vt / L_v;
2576
+ const rgb_scale = convertOklabToLrgb({
2577
+ l: L_vt,
2578
+ a: a_ * C_vt,
2579
+ b: b_ * C_vt
2580
+ });
2581
+ const scale_L = Math.cbrt(1 / Math.max(rgb_scale.r, rgb_scale.g, rgb_scale.b, 0));
2582
+ const L_new = toe_inv(v * L_v);
2583
+ const C = C_v * L_new / L_v;
2584
+ ret.l = L_new * scale_L;
2585
+ ret.a = C * a_ * scale_L;
2586
+ ret.b = C * b_ * scale_L;
2587
+ return ret;
2588
+ }
2589
+ //#endregion
2590
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/okhsv/modeOkhsv.js
2591
+ var modeOkhsv = {
2592
+ ...definition$20,
2593
+ mode: "okhsv",
2594
+ channels: [
2595
+ "h",
2596
+ "s",
2597
+ "v",
2598
+ "alpha"
2599
+ ],
2600
+ parse: ["--okhsv"],
2601
+ serialize: "--okhsv",
2602
+ fromMode: {
2603
+ oklab: convertOklabToOkhsv,
2604
+ rgb: (c) => convertOklabToOkhsv(convertRgbToOklab(c))
2605
+ },
2606
+ toMode: {
2607
+ oklab: convertOkhsvToOklab,
2608
+ rgb: (c) => convertOklabToRgb(convertOkhsvToOklab(c))
2609
+ }
2610
+ };
2611
+ //#endregion
2612
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/oklab/parseOklab.js
2613
+ function parseOklab(color, parsed) {
2614
+ if (!parsed || parsed[0] !== "oklab") return;
2615
+ const res = { mode: "oklab" };
2616
+ const [, l, a, b, alpha] = parsed;
2617
+ if (l.type === Tok.Hue || a.type === Tok.Hue || b.type === Tok.Hue) return;
2618
+ if (l.type !== Tok.None) res.l = Math.min(Math.max(0, l.type === Tok.Number ? l.value : l.value / 100), 1);
2619
+ if (a.type !== Tok.None) res.a = a.type === Tok.Number ? a.value : a.value * .4 / 100;
2620
+ if (b.type !== Tok.None) res.b = b.type === Tok.Number ? b.value : b.value * .4 / 100;
2621
+ if (alpha.type !== Tok.None) res.alpha = Math.min(1, Math.max(0, alpha.type === Tok.Number ? alpha.value : alpha.value / 100));
2622
+ return res;
2623
+ }
2624
+ //#endregion
2625
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/oklab/definition.js
2626
+ var definition$8 = {
2627
+ ...definition$15,
2628
+ mode: "oklab",
2629
+ toMode: {
2630
+ lrgb: convertOklabToLrgb,
2631
+ rgb: convertOklabToRgb
2632
+ },
2633
+ fromMode: {
2634
+ lrgb: convertLrgbToOklab,
2635
+ rgb: convertRgbToOklab
2636
+ },
2637
+ ranges: {
2638
+ l: [0, 1],
2639
+ a: [-.4, .4],
2640
+ b: [-.4, .4]
2641
+ },
2642
+ parse: [parseOklab],
2643
+ serialize: (c) => `oklab(${c.l !== void 0 ? c.l : "none"} ${c.a !== void 0 ? c.a : "none"} ${c.b !== void 0 ? c.b : "none"}${c.alpha < 1 ? ` / ${c.alpha}` : ""})`
2644
+ };
2645
+ //#endregion
2646
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/oklch/parseOklch.js
2647
+ function parseOklch(color, parsed) {
2648
+ if (!parsed || parsed[0] !== "oklch") return;
2649
+ const res = { mode: "oklch" };
2650
+ const [, l, c, h, alpha] = parsed;
2651
+ if (l.type !== Tok.None) {
2652
+ if (l.type === Tok.Hue) return;
2653
+ res.l = Math.min(Math.max(0, l.type === Tok.Number ? l.value : l.value / 100), 1);
2654
+ }
2655
+ if (c.type !== Tok.None) res.c = Math.max(0, c.type === Tok.Number ? c.value : c.value * .4 / 100);
2656
+ if (h.type !== Tok.None) {
2657
+ if (h.type === Tok.Percentage) return;
2658
+ res.h = h.value;
2659
+ }
2660
+ if (alpha.type !== Tok.None) res.alpha = Math.min(1, Math.max(0, alpha.type === Tok.Number ? alpha.value : alpha.value / 100));
2661
+ return res;
2662
+ }
2663
+ //#endregion
2664
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/oklch/definition.js
2665
+ var definition$7 = {
2666
+ ...definition$13,
2667
+ mode: "oklch",
2668
+ toMode: {
2669
+ oklab: (c) => convertLchToLab(c, "oklab"),
2670
+ rgb: (c) => convertOklabToRgb(convertLchToLab(c, "oklab"))
2671
+ },
2672
+ fromMode: {
2673
+ rgb: (c) => convertLabToLch(convertRgbToOklab(c), "oklch"),
2674
+ oklab: (c) => convertLabToLch(c, "oklch")
2675
+ },
2676
+ parse: [parseOklch],
2677
+ serialize: (c) => `oklch(${c.l !== void 0 ? c.l : "none"} ${c.c !== void 0 ? c.c : "none"} ${c.h !== void 0 ? c.h : "none"}${c.alpha < 1 ? ` / ${c.alpha}` : ""})`,
2678
+ ranges: {
2679
+ l: [0, 1],
2680
+ c: [0, .4],
2681
+ h: [0, 360]
2682
+ }
2683
+ };
2684
+ //#endregion
2685
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/p3/convertP3ToXyz65.js
2686
+ var convertP3ToXyz65 = (rgb) => {
2687
+ let { r, g, b, alpha } = convertRgbToLrgb(rgb);
2688
+ let res = {
2689
+ mode: "xyz65",
2690
+ x: .486570948648216 * r + .265667693169093 * g + .1982172852343625 * b,
2691
+ y: .2289745640697487 * r + .6917385218365062 * g + .079286914093745 * b,
2692
+ z: 0 * r + .0451133818589026 * g + 1.043944368900976 * b
2693
+ };
2694
+ if (alpha !== void 0) res.alpha = alpha;
2695
+ return res;
2696
+ };
2697
+ //#endregion
2698
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/p3/convertXyz65ToP3.js
2699
+ var convertXyz65ToP3 = ({ x, y, z, alpha }) => {
2700
+ if (x === void 0) x = 0;
2701
+ if (y === void 0) y = 0;
2702
+ if (z === void 0) z = 0;
2703
+ let res = convertLrgbToRgb({
2704
+ r: x * 2.4934969119414263 - y * .9313836179191242 - .402710784450717 * z,
2705
+ g: x * -.8294889695615749 + y * 1.7626640603183465 + .0236246858419436 * z,
2706
+ b: x * .0358458302437845 - y * .0761723892680418 + .9568845240076871 * z
2707
+ }, "p3");
2708
+ if (alpha !== void 0) res.alpha = alpha;
2709
+ return res;
2710
+ };
2711
+ //#endregion
2712
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/p3/definition.js
2713
+ var definition$6 = {
2714
+ ...definition$27,
2715
+ mode: "p3",
2716
+ parse: ["display-p3"],
2717
+ serialize: "display-p3",
2718
+ fromMode: {
2719
+ rgb: (color) => convertXyz65ToP3(convertRgbToXyz65(color)),
2720
+ xyz65: convertXyz65ToP3
2721
+ },
2722
+ toMode: {
2723
+ rgb: (color) => convertXyz65ToRgb(convertP3ToXyz65(color)),
2724
+ xyz65: convertP3ToXyz65
2725
+ }
2726
+ };
2727
+ //#endregion
2728
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/prophoto/convertXyz50ToProphoto.js
2729
+ var gamma$1 = (v) => {
2730
+ let abs = Math.abs(v);
2731
+ if (abs >= 1 / 512) return Math.sign(v) * Math.pow(abs, 1 / 1.8);
2732
+ return 16 * v;
2733
+ };
2734
+ var convertXyz50ToProphoto = ({ x, y, z, alpha }) => {
2735
+ if (x === void 0) x = 0;
2736
+ if (y === void 0) y = 0;
2737
+ if (z === void 0) z = 0;
2738
+ let res = {
2739
+ mode: "prophoto",
2740
+ r: gamma$1(x * 1.3457868816471585 - y * .2555720873797946 - .0511018649755453 * z),
2741
+ g: gamma$1(x * -.5446307051249019 + y * 1.5082477428451466 + .0205274474364214 * z),
2742
+ b: gamma$1(x * 0 + y * 0 + 1.2119675456389452 * z)
2743
+ };
2744
+ if (alpha !== void 0) res.alpha = alpha;
2745
+ return res;
2746
+ };
2747
+ //#endregion
2748
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/prophoto/convertProphotoToXyz50.js
2749
+ var linearize$1 = (v = 0) => {
2750
+ let abs = Math.abs(v);
2751
+ if (abs >= 16 / 512) return Math.sign(v) * Math.pow(abs, 1.8);
2752
+ return v / 16;
2753
+ };
2754
+ var convertProphotoToXyz50 = (prophoto) => {
2755
+ let r = linearize$1(prophoto.r);
2756
+ let g = linearize$1(prophoto.g);
2757
+ let b = linearize$1(prophoto.b);
2758
+ let res = {
2759
+ mode: "xyz50",
2760
+ x: .7977666449006423 * r + .1351812974005331 * g + .0313477341283922 * b,
2761
+ y: .2880748288194013 * r + .7118352342418731 * g + 899369387256e-16 * b,
2762
+ z: 0 * r + 0 * g + .8251046025104602 * b
2763
+ };
2764
+ if (prophoto.alpha !== void 0) res.alpha = prophoto.alpha;
2765
+ return res;
2766
+ };
2767
+ //#endregion
2768
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/prophoto/definition.js
2769
+ var definition$5 = {
2770
+ ...definition$27,
2771
+ mode: "prophoto",
2772
+ parse: ["prophoto-rgb"],
2773
+ serialize: "prophoto-rgb",
2774
+ fromMode: {
2775
+ xyz50: convertXyz50ToProphoto,
2776
+ rgb: (color) => convertXyz50ToProphoto(convertRgbToXyz50(color))
2777
+ },
2778
+ toMode: {
2779
+ xyz50: convertProphotoToXyz50,
2780
+ rgb: (color) => convertXyz50ToRgb(convertProphotoToXyz50(color))
2781
+ }
2782
+ };
2783
+ //#endregion
2784
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rec2020/convertXyz65ToRec2020.js
2785
+ var α$1 = 1.09929682680944;
2786
+ var β$1 = .018053968510807;
2787
+ var gamma = (v) => {
2788
+ const abs = Math.abs(v);
2789
+ if (abs > β$1) return (Math.sign(v) || 1) * (α$1 * Math.pow(abs, .45) - (α$1 - 1));
2790
+ return 4.5 * v;
2791
+ };
2792
+ var convertXyz65ToRec2020 = ({ x, y, z, alpha }) => {
2793
+ if (x === void 0) x = 0;
2794
+ if (y === void 0) y = 0;
2795
+ if (z === void 0) z = 0;
2796
+ let res = {
2797
+ mode: "rec2020",
2798
+ r: gamma(x * 1.7166511879712683 - y * .3556707837763925 - .2533662813736599 * z),
2799
+ g: gamma(x * -.6666843518324893 + y * 1.6164812366349395 + .0157685458139111 * z),
2800
+ b: gamma(x * .0176398574453108 - y * .0427706132578085 + .9421031212354739 * z)
2801
+ };
2802
+ if (alpha !== void 0) res.alpha = alpha;
2803
+ return res;
2804
+ };
2805
+ //#endregion
2806
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rec2020/convertRec2020ToXyz65.js
2807
+ var α = 1.09929682680944;
2808
+ var β = .018053968510807;
2809
+ var linearize = (v = 0) => {
2810
+ let abs = Math.abs(v);
2811
+ if (abs < β * 4.5) return v / 4.5;
2812
+ return (Math.sign(v) || 1) * Math.pow((abs + α - 1) / α, 1 / .45);
2813
+ };
2814
+ var convertRec2020ToXyz65 = (rec2020) => {
2815
+ let r = linearize(rec2020.r);
2816
+ let g = linearize(rec2020.g);
2817
+ let b = linearize(rec2020.b);
2818
+ let res = {
2819
+ mode: "xyz65",
2820
+ x: .6369580483012911 * r + .1446169035862083 * g + .1688809751641721 * b,
2821
+ y: .262700212011267 * r + .6779980715188708 * g + .059301716469862 * b,
2822
+ z: 0 * r + .0280726930490874 * g + 1.0609850577107909 * b
2823
+ };
2824
+ if (rec2020.alpha !== void 0) res.alpha = rec2020.alpha;
2825
+ return res;
2826
+ };
2827
+ //#endregion
2828
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rec2020/definition.js
2829
+ var definition$4 = {
2830
+ ...definition$27,
2831
+ mode: "rec2020",
2832
+ fromMode: {
2833
+ xyz65: convertXyz65ToRec2020,
2834
+ rgb: (color) => convertXyz65ToRec2020(convertRgbToXyz65(color))
2835
+ },
2836
+ toMode: {
2837
+ xyz65: convertRec2020ToXyz65,
2838
+ rgb: (color) => convertXyz65ToRgb(convertRec2020ToXyz65(color))
2839
+ },
2840
+ parse: ["rec2020"],
2841
+ serialize: "rec2020"
2842
+ };
2843
+ //#endregion
2844
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyb/constants.js
2845
+ var bias = .0037930732552754493;
2846
+ var bias_cbrt = Math.cbrt(bias);
2847
+ //#endregion
2848
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyb/convertRgbToXyb.js
2849
+ var transfer$1 = (v) => Math.cbrt(v) - bias_cbrt;
2850
+ var convertRgbToXyb = (color) => {
2851
+ const { r, g, b, alpha } = convertRgbToLrgb(color);
2852
+ const l = transfer$1(.3 * r + .622 * g + .078 * b + bias);
2853
+ const m = transfer$1(.23 * r + .692 * g + .078 * b + bias);
2854
+ const s = transfer$1(.2434226892454782 * r + .2047674442449682 * g + .5518098665095535 * b + bias);
2855
+ const res = {
2856
+ mode: "xyb",
2857
+ x: (l - m) / 2,
2858
+ y: (l + m) / 2,
2859
+ b: s - (l + m) / 2
2860
+ };
2861
+ if (alpha !== void 0) res.alpha = alpha;
2862
+ return res;
2863
+ };
2864
+ //#endregion
2865
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyb/convertXybToRgb.js
2866
+ var transfer = (v) => Math.pow(v + bias_cbrt, 3);
2867
+ var convertXybToRgb = ({ x, y, b, alpha }) => {
2868
+ if (x === void 0) x = 0;
2869
+ if (y === void 0) y = 0;
2870
+ if (b === void 0) b = 0;
2871
+ const l = transfer(x + y) - bias;
2872
+ const m = transfer(y - x) - bias;
2873
+ const s = transfer(b + y) - bias;
2874
+ const res = convertLrgbToRgb({
2875
+ r: 11.031566904639861 * l - 9.866943908131562 * m - .16462299650829934 * s,
2876
+ g: -3.2541473810744237 * l + 4.418770377582723 * m - .16462299650829934 * s,
2877
+ b: -3.6588512867136815 * l + 2.7129230459360922 * m + 1.9459282407775895 * s
2878
+ });
2879
+ if (alpha !== void 0) res.alpha = alpha;
2880
+ return res;
2881
+ };
2882
+ //#endregion
2883
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyb/definition.js
2884
+ var definition$3 = {
2885
+ mode: "xyb",
2886
+ channels: [
2887
+ "x",
2888
+ "y",
2889
+ "b",
2890
+ "alpha"
2891
+ ],
2892
+ parse: ["--xyb"],
2893
+ serialize: "--xyb",
2894
+ toMode: { rgb: convertXybToRgb },
2895
+ fromMode: { rgb: convertRgbToXyb },
2896
+ ranges: {
2897
+ x: [-.0154, .0281],
2898
+ y: [0, .8453],
2899
+ b: [-.2778, .388]
2900
+ },
2901
+ interpolate: {
2902
+ x: interpolatorLinear,
2903
+ y: interpolatorLinear,
2904
+ b: interpolatorLinear,
2905
+ alpha: {
2906
+ use: interpolatorLinear,
2907
+ fixup: fixupAlpha
2908
+ }
2909
+ }
2910
+ };
2911
+ //#endregion
2912
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz50/definition.js
2913
+ var definition$2 = {
2914
+ mode: "xyz50",
2915
+ parse: ["xyz-d50"],
2916
+ serialize: "xyz-d50",
2917
+ toMode: {
2918
+ rgb: convertXyz50ToRgb,
2919
+ lab: convertXyz50ToLab
2920
+ },
2921
+ fromMode: {
2922
+ rgb: convertRgbToXyz50,
2923
+ lab: convertLabToXyz50
2924
+ },
2925
+ channels: [
2926
+ "x",
2927
+ "y",
2928
+ "z",
2929
+ "alpha"
2930
+ ],
2931
+ ranges: {
2932
+ x: [0, .964],
2933
+ y: [0, .999],
2934
+ z: [0, .825]
2935
+ },
2936
+ interpolate: {
2937
+ x: interpolatorLinear,
2938
+ y: interpolatorLinear,
2939
+ z: interpolatorLinear,
2940
+ alpha: {
2941
+ use: interpolatorLinear,
2942
+ fixup: fixupAlpha
2943
+ }
2944
+ }
2945
+ };
2946
+ //#endregion
2947
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz65/convertXyz65ToXyz50.js
2948
+ var convertXyz65ToXyz50 = (xyz65) => {
2949
+ let { x, y, z, alpha } = xyz65;
2950
+ if (x === void 0) x = 0;
2951
+ if (y === void 0) y = 0;
2952
+ if (z === void 0) z = 0;
2953
+ let res = {
2954
+ mode: "xyz50",
2955
+ x: 1.0479298208405488 * x + .0229467933410191 * y - .0501922295431356 * z,
2956
+ y: .0296278156881593 * x + .990434484573249 * y - .0170738250293851 * z,
2957
+ z: -.0092430581525912 * x + .0150551448965779 * y + .7518742899580008 * z
2958
+ };
2959
+ if (alpha !== void 0) res.alpha = alpha;
2960
+ return res;
2961
+ };
2962
+ //#endregion
2963
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz65/convertXyz50ToXyz65.js
2964
+ var convertXyz50ToXyz65 = (xyz50) => {
2965
+ let { x, y, z, alpha } = xyz50;
2966
+ if (x === void 0) x = 0;
2967
+ if (y === void 0) y = 0;
2968
+ if (z === void 0) z = 0;
2969
+ let res = {
2970
+ mode: "xyz65",
2971
+ x: .9554734527042182 * x - .0230985368742614 * y + .0632593086610217 * z,
2972
+ y: -.0283697069632081 * x + 1.0099954580058226 * y + .021041398966943 * z,
2973
+ z: .0123140016883199 * x - .0205076964334779 * y + 1.3303659366080753 * z
2974
+ };
2975
+ if (alpha !== void 0) res.alpha = alpha;
2976
+ return res;
2977
+ };
2978
+ //#endregion
2979
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz65/definition.js
2980
+ var definition$1 = {
2981
+ mode: "xyz65",
2982
+ toMode: {
2983
+ rgb: convertXyz65ToRgb,
2984
+ xyz50: convertXyz65ToXyz50
2985
+ },
2986
+ fromMode: {
2987
+ rgb: convertRgbToXyz65,
2988
+ xyz50: convertXyz50ToXyz65
2989
+ },
2990
+ ranges: {
2991
+ x: [0, .95],
2992
+ y: [0, 1],
2993
+ z: [0, 1.088]
2994
+ },
2995
+ channels: [
2996
+ "x",
2997
+ "y",
2998
+ "z",
2999
+ "alpha"
3000
+ ],
3001
+ parse: ["xyz", "xyz-d65"],
3002
+ serialize: "xyz-d65",
3003
+ interpolate: {
3004
+ x: interpolatorLinear,
3005
+ y: interpolatorLinear,
3006
+ z: interpolatorLinear,
3007
+ alpha: {
3008
+ use: interpolatorLinear,
3009
+ fixup: fixupAlpha
3010
+ }
3011
+ }
3012
+ };
3013
+ //#endregion
3014
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/yiq/convertRgbToYiq.js
3015
+ var convertRgbToYiq = ({ r, g, b, alpha }) => {
3016
+ if (r === void 0) r = 0;
3017
+ if (g === void 0) g = 0;
3018
+ if (b === void 0) b = 0;
3019
+ const res = {
3020
+ mode: "yiq",
3021
+ y: .29889531 * r + .58662247 * g + .11448223 * b,
3022
+ i: .59597799 * r - .2741761 * g - .32180189 * b,
3023
+ q: .21147017 * r - .52261711 * g + .31114694 * b
3024
+ };
3025
+ if (alpha !== void 0) res.alpha = alpha;
3026
+ return res;
3027
+ };
3028
+ //#endregion
3029
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/yiq/convertYiqToRgb.js
3030
+ var convertYiqToRgb = ({ y, i, q, alpha }) => {
3031
+ if (y === void 0) y = 0;
3032
+ if (i === void 0) i = 0;
3033
+ if (q === void 0) q = 0;
3034
+ const res = {
3035
+ mode: "rgb",
3036
+ r: y + .95608445 * i + .6208885 * q,
3037
+ g: y - .27137664 * i - .6486059 * q,
3038
+ b: y - 1.10561724 * i + 1.70250126 * q
3039
+ };
3040
+ if (alpha !== void 0) res.alpha = alpha;
3041
+ return res;
3042
+ };
3043
+ //#endregion
3044
+ //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/yiq/definition.js
3045
+ var definition = {
3046
+ mode: "yiq",
3047
+ toMode: { rgb: convertYiqToRgb },
3048
+ fromMode: { rgb: convertRgbToYiq },
3049
+ channels: [
3050
+ "y",
3051
+ "i",
3052
+ "q",
3053
+ "alpha"
3054
+ ],
3055
+ parse: ["--yiq"],
3056
+ serialize: "--yiq",
3057
+ ranges: {
3058
+ i: [-.595, .595],
3059
+ q: [-.522, .522]
3060
+ },
3061
+ interpolate: {
3062
+ y: interpolatorLinear,
3063
+ i: interpolatorLinear,
3064
+ q: interpolatorLinear,
3065
+ alpha: {
3066
+ use: interpolatorLinear,
3067
+ fixup: fixupAlpha
3068
+ }
3069
+ }
3070
+ };
3071
+ useMode(definition$26);
3072
+ useMode(definition$25);
3073
+ useMode(definition$24);
3074
+ useMode(definition$23);
3075
+ useMode(definition$22);
3076
+ useMode(definition$21);
3077
+ useMode(definition$20);
3078
+ useMode(definition$19);
3079
+ useMode(definition$18);
3080
+ useMode(definition$17);
3081
+ useMode(definition$16);
3082
+ useMode(definition$15);
3083
+ useMode(definition$14);
3084
+ useMode(definition$13);
3085
+ useMode(definition$12);
3086
+ useMode(definition$11);
3087
+ useMode(definition$10);
3088
+ useMode(definition$9);
3089
+ useMode(modeOkhsl);
3090
+ useMode(modeOkhsv);
3091
+ useMode(definition$8);
3092
+ useMode(definition$7);
3093
+ useMode(definition$6);
3094
+ useMode(definition$5);
3095
+ useMode(definition$4);
3096
+ useMode(definition$27);
3097
+ useMode(definition$3);
3098
+ useMode(definition$2);
3099
+ useMode(definition$1);
3100
+ useMode(definition);
3101
+ //#endregion
3102
+ //#region ../../node_modules/.bun/@basmilius+http-client@3.35.0+f97c77f67c914c00/node_modules/@basmilius/http-client/dist/index.mjs
3103
+ function adapter_default(Parent) {
3104
+ return class extends Parent {
3105
+ constructor(...args) {
3106
+ throw new Error("@adapter: cannot create instance of class.");
3107
+ }
3108
+ };
3109
+ }
3110
+ /**
3111
+ * Checks if the two given values are equal. When both values are a
3112
+ * dto, the check is done by firstly converthing them to JSON.
3113
+ */
3114
+ function areEqual_default(a, b) {
3115
+ if (a === b) return true;
3116
+ return a === b;
3117
+ }
3118
+ var ARGS = Symbol();
3119
+ var CHILDREN = Symbol();
3120
+ var DESCRIPTORS = Symbol();
3121
+ var DIRTY = Symbol();
3122
+ var NAME = Symbol();
3123
+ var PARENT = Symbol();
3124
+ var PARENT_KEY = Symbol();
3125
+ var PROPERTIES = Symbol();
3126
+ var PROXY = Symbol();
3127
+ var TRACK = Symbol();
3128
+ var TRIGGER = Symbol();
3129
+ /**
3130
+ * Checks if the given object is a dto.
3131
+ */
3132
+ function isDto_default(obj) {
3133
+ return obj && typeof obj === "object" && !!obj[NAME];
3134
+ }
3135
+ /**
3136
+ * Asserts that the given object is a dto.
3137
+ */
3138
+ function assertDto_default(obj) {
3139
+ if (!isDto_default(obj)) throw new Error("@dto assert given object is not a class decorated with @Dto.");
3140
+ }
3141
+ var CIRCULAR_MAP = Symbol();
3142
+ function circularProtect_default(fn, arg1 = 0, arg2) {
3143
+ return function(...args) {
3144
+ const map = fn[CIRCULAR_MAP] ??= /* @__PURE__ */ new WeakMap();
3145
+ const primary = args[arg1];
3146
+ const secondary = arg2 !== void 0 ? args[arg2] : "self";
3147
+ if (typeof primary !== "object" || primary === null) return fn.call(this, ...args);
3148
+ if (!map.has(primary)) map.set(primary, []);
3149
+ const visited = map.get(primary);
3150
+ if (visited.includes(secondary)) return;
3151
+ visited.push(secondary);
3152
+ try {
3153
+ return fn.call(this, ...args);
3154
+ } finally {
3155
+ const index = visited.lastIndexOf(secondary);
3156
+ if (index !== -1) visited.splice(index, 1);
3157
+ if (visited.length === 0) map.delete(primary);
3158
+ }
3159
+ };
3160
+ }
3161
+ /**
3162
+ * Checks if the given dto is dirty.
3163
+ */
3164
+ function isDtoDirty_default(obj) {
3165
+ assertDto_default(obj);
3166
+ return obj[DIRTY];
3167
+ }
3168
+ /**
3169
+ * Trigger for when a dto property is being updated.
3170
+ */
3171
+ var triggerDto = circularProtect_default(function(dto, key, value, oldValue) {
3172
+ const trigger = dto[TRIGGER];
3173
+ trigger(dto, key, value, oldValue);
3174
+ dto[PARENT] && triggerDto(dto[PARENT], dto[PARENT_KEY], dto[PARENT][dto[PARENT_KEY]]);
3175
+ }, 0, 1);
3176
+ /**
3177
+ * Marks the given dto clean.
3178
+ */
3179
+ var markDtoClean = circularProtect_default(function(obj) {
3180
+ assertDto_default(obj);
3181
+ if (obj[DIRTY]) {
3182
+ obj[DIRTY] = false;
3183
+ triggerDto(obj, DIRTY, false, true);
3184
+ }
3185
+ if (!obj[CHILDREN] || obj[CHILDREN].length === 0) return;
3186
+ obj[CHILDREN].filter(isDtoDirty_default).forEach(markDtoClean);
3187
+ });
3188
+ /**
3189
+ * Marks the given dto dirty.
3190
+ */
3191
+ var markDtoDirty = circularProtect_default(function(obj, key) {
3192
+ assertDto_default(obj);
3193
+ if (!obj[DIRTY]) {
3194
+ obj[DIRTY] = true;
3195
+ triggerDto(obj, DIRTY, true, false);
3196
+ }
3197
+ if (!obj[PARENT]) return;
3198
+ markDtoDirty(obj[PARENT], obj[PARENT_KEY]);
3199
+ });
3200
+ /**
3201
+ * Creates a parent-child relationship between the given two dtos.
3202
+ */
3203
+ function relateDtoTo_default(dto, parent, key) {
3204
+ parent[CHILDREN] ??= [];
3205
+ !parent[CHILDREN].includes(dto) && parent[CHILDREN].push(dto);
3206
+ dto[PARENT] !== parent && (dto[PARENT] = parent);
3207
+ dto[PARENT_KEY] !== key && (dto[PARENT_KEY] = key);
3208
+ }
3209
+ /**
3210
+ * Creates relationships between the given value and dto.
3211
+ */
3212
+ function relateValueTo_default(dto, key, value) {
3213
+ if (isDto_default(value)) relateDtoTo_default(value, dto, key);
3214
+ else if (Array.isArray(value)) {
3215
+ for (const item of value) {
3216
+ if (!isDto_default(item)) continue;
3217
+ relateDtoTo_default(item, dto, key);
3218
+ }
3219
+ value[PARENT] = dto;
3220
+ value[PARENT_KEY] = key;
3221
+ }
3222
+ }
3223
+ /**
3224
+ * Tracking for when a dto property is being accessed.
3225
+ */
3226
+ function trackDto(dto, key) {
3227
+ const track = dto[TRACK];
3228
+ track(dto, key);
3229
+ }
3230
+ /**
3231
+ * Removes a parent-child relationship between the given two dtos.
3232
+ */
3233
+ function unrelateDtoFrom_default(dto, parent) {
3234
+ if (CHILDREN in parent) {
3235
+ const index = parent[CHILDREN].indexOf(dto);
3236
+ if (index !== -1) parent[CHILDREN].splice(index, 1);
3237
+ }
3238
+ dto[PARENT] = void 0;
3239
+ dto[PARENT_KEY] = void 0;
3240
+ }
3241
+ /**
3242
+ * Removes relationships between the given value and dto.
3243
+ */
3244
+ function unrelateValueFrom_default(dto, value) {
3245
+ if (isDto_default(value)) unrelateDtoFrom_default(value, dto);
3246
+ else if (Array.isArray(value)) {
3247
+ for (const item of value) if (isDto_default(item)) unrelateDtoFrom_default(item, dto);
3248
+ value[PARENT] = void 0;
3249
+ value[PARENT_KEY] = void 0;
3250
+ }
3251
+ }
3252
+ var DTO_CLASS_MAP = {};
3253
+ var arrayProxy_default = {
3254
+ /**
3255
+ * Trap for when a property is deleted from the target. This
3256
+ * will mark the parent dto as dirty and trigger an update.
3257
+ */
3258
+ deleteProperty(target, key) {
3259
+ Reflect.deleteProperty(target, key);
3260
+ if (ignored(target, key)) return true;
3261
+ const dto = target[PARENT];
3262
+ dto && triggerDto(dto, target[PARENT_KEY], dto[target[PARENT_KEY]]);
3263
+ dto && markDtoDirty(dto, target[PARENT_KEY]);
3264
+ return true;
3265
+ },
3266
+ /**
3267
+ * Trap for when a property of the target is being accessed. The
3268
+ * property access is being tracked for further updates.
3269
+ */
3270
+ get(target, key, receiver) {
3271
+ if (key === PROXY) return true;
3272
+ if (ignored(target, key)) return Reflect.get(target, key, receiver);
3273
+ const dto = target[PARENT];
3274
+ dto && trackDto(dto, target[PARENT_KEY]);
3275
+ return Reflect.get(target, key);
3276
+ },
3277
+ /**
3278
+ * Trap for when a property of the target is being updated. This
3279
+ * will mark the parent dto as dirty and trigger an update.
3280
+ */
3281
+ set(target, key, value, receiver) {
3282
+ if (ignored(target, key)) return Reflect.set(target, key, value, receiver);
3283
+ const dto = target[PARENT];
3284
+ dto && triggerDto(dto, target[PARENT_KEY], dto[target[PARENT_KEY]]);
3285
+ dto && markDtoDirty(dto, target[PARENT_KEY]);
3286
+ return Reflect.set(target, key, value);
3287
+ }
3288
+ };
3289
+ /**
3290
+ * Checks if the given key should be ignored by the proxy.
3291
+ */
3292
+ function ignored(target, key) {
3293
+ return typeof key === "symbol" || typeof target[key] === "function" || key === "length";
3294
+ }
3295
+ var instanceProxy_default = {
3296
+ /**
3297
+ * Trap for when a dto property is being accessed. The property
3298
+ * access is being tracked for further updates. If the dto has
3299
+ * any child dtos, a relationship will be added between them.
3300
+ */
3301
+ get(target, key, receiver) {
3302
+ if (key === PROXY) return true;
3303
+ if (typeof key === "symbol") return Reflect.get(target, key, receiver);
3304
+ const descriptor = target[DESCRIPTORS][key];
3305
+ if (!descriptor || !descriptor.get) return Reflect.get(target, key, receiver);
3306
+ const value = descriptor.get.call(target);
3307
+ trackDto(target, key);
3308
+ relateValueTo_default(target, key, value);
3309
+ return value;
3310
+ },
3311
+ /**
3312
+ * Trap for when a descriptor of a dto property is requested.
3313
+ */
3314
+ getOwnPropertyDescriptor(target, key) {
3315
+ return target[DESCRIPTORS][key];
3316
+ },
3317
+ /**
3318
+ * Trap for when the keys of a dto are requested.
3319
+ */
3320
+ ownKeys(target) {
3321
+ return target[PROPERTIES];
3322
+ },
3323
+ /**
3324
+ * Trap for when a dto property is being updated. This will
3325
+ * mark the dto dirty and trigger an update. If an array is
3326
+ * passed, that array will be made reactive as well.
3327
+ */
3328
+ set(target, key, value, receiver) {
3329
+ if (typeof key === "symbol") return Reflect.set(target, key, value, receiver);
3330
+ const descriptor = target[DESCRIPTORS][key];
3331
+ if (!descriptor || !descriptor.set) return Reflect.set(target, key, value, receiver);
3332
+ const oldValue = descriptor.get?.call(target) ?? void 0;
3333
+ if (areEqual_default(value, oldValue)) return true;
3334
+ unrelateValueFrom_default(target, oldValue);
3335
+ if (Array.isArray(value) && !value[PROXY]) value = new Proxy(value, arrayProxy_default);
3336
+ descriptor.set.call(target, value);
3337
+ relateValueTo_default(target, key, value);
3338
+ markDtoDirty(target, key);
3339
+ triggerDto(target, key, value, oldValue);
3340
+ return true;
3341
+ }
3342
+ };
3343
+ var refProxy_default = {
3344
+ /**
3345
+ * Trap for when a ref property is being accessed. The property
3346
+ * access is being tracked for further updates. If the requested
3347
+ * property is not a part of {Ref}, the get is proxied to the
3348
+ * underlying dto instance.
3349
+ *
3350
+ * A little trick with __v_isRef is done here, all the features
3351
+ * of refs are used by our dto, but we don't want Vue to treat
3352
+ * it as a ref. We return false here to trick Vue.
3353
+ */
3354
+ get(target, key, receiver) {
3355
+ if (key === "__v_isRef") return false;
3356
+ if (key === PROXY) return true;
3357
+ if (key in target) return Reflect.get(target, key, receiver);
3358
+ return Reflect.get(target.value, key);
3359
+ },
3360
+ /**
3361
+ * Trap for when a descriptor of a property is requested, that
3362
+ * request is proxied to the underlying dto.
3363
+ */
3364
+ getOwnPropertyDescriptor(target, key) {
3365
+ return Reflect.getOwnPropertyDescriptor(target.value, key);
3366
+ },
3367
+ /**
3368
+ * Trap for when the keys of the ref are requested, that request
3369
+ * is proxied to the underlying dto.
3370
+ */
3371
+ ownKeys(target) {
3372
+ return Reflect.ownKeys(target.value);
3373
+ },
3374
+ /**
3375
+ * Trap for when a ref property is being updated. If the property
3376
+ * is not part of {Ref}, the set is proxied to the underlying dto
3377
+ * instance. In that proxy, the dto will be marked dirty and an
3378
+ * update is triggered.
3379
+ */
3380
+ set(target, key, value, receiver) {
3381
+ if (key in target) return Reflect.set(target, key, value, receiver);
3382
+ return Reflect.set(target.value, key, value);
3383
+ }
3384
+ };
3385
+ var classProxy_default = {
3386
+ /**
3387
+ * Trap for when a dto is being constructed. Reactivity is provided
3388
+ * to all arguments and a proxied custom ref is returned that references
3389
+ * the actual dto instance.
3390
+ */
3391
+ construct(target, argsArray, newTarget) {
3392
+ argsArray = argsArray.map((arg) => {
3393
+ if (!Array.isArray(arg)) return arg;
3394
+ return new Proxy(arg, arrayProxy_default);
3395
+ });
3396
+ const ref = customRef((track, trigger) => {
3397
+ const instance = markRaw(Reflect.construct(target, argsArray, newTarget));
3398
+ instance[ARGS] = argsArray;
3399
+ instance[DIRTY] = false;
3400
+ instance[TRACK] = track;
3401
+ instance[TRIGGER] = trigger;
3402
+ const proxied = new Proxy(instance, instanceProxy_default);
3403
+ return {
3404
+ get: () => {
3405
+ track();
3406
+ return proxied;
3407
+ },
3408
+ set: () => void 0
3409
+ };
3410
+ });
3411
+ return new Proxy(ref, refProxy_default);
3412
+ } };
3413
+ /**
3414
+ * Returns a clone of the dto.
3415
+ */
3416
+ function clone_default() {
3417
+ const instance = this;
3418
+ assertDto_default(instance);
3419
+ const clazz = DTO_CLASS_MAP[instance[NAME]];
3420
+ const clone = new clazz(...instance[ARGS]);
3421
+ for (const [key, descriptor] of Object.entries(this[DESCRIPTORS])) {
3422
+ if (!descriptor.set) continue;
3423
+ clone[key] = isDto_default(this[key]) ? this[key].clone() : this[key];
3424
+ }
3425
+ return clone;
3426
+ }
3427
+ /**
3428
+ * Fills the dto with the given data.
3429
+ */
3430
+ function fill_default(data) {
3431
+ for (let key in data) {
3432
+ const descriptor = this[DESCRIPTORS][key];
3433
+ if (isDto_default(this[key]) && typeof data[key] === "object") this[key].fill(data[key]);
3434
+ else if (descriptor && descriptor.set) this[key] = data[key];
3435
+ }
3436
+ }
3437
+ /**
3438
+ * Returns the json object representation of the dto.
3439
+ */
3440
+ function toJSON_default() {
3441
+ const result = {};
3442
+ for (const property of this[PROPERTIES]) {
3443
+ let value = this[property];
3444
+ if (isDto_default(value)) value = value.toJSON();
3445
+ result[property] = value;
3446
+ }
3447
+ return result;
3448
+ }
3449
+ /**
3450
+ * Provides reactivity to the decorated class.
3451
+ */
3452
+ function dto_default(clazz) {
3453
+ validate(clazz);
3454
+ const descriptors = Object.freeze(x(clazz));
3455
+ const properties = Object.keys(descriptors);
3456
+ K(clazz.prototype, DESCRIPTORS, descriptors);
3457
+ K(clazz.prototype, NAME, clazz.name);
3458
+ K(clazz.prototype, PROPERTIES, properties);
3459
+ K(clazz, Symbol.hasInstance, (instance) => typeof instance === "object" && instance?.[NAME] === clazz.name);
3460
+ G(clazz, "clone", clone_default);
3461
+ G(clazz, "fill", fill_default);
3462
+ G(clazz, "toJSON", toJSON_default);
3463
+ return proxy(clazz);
3464
+ }
3465
+ function proxy(clazz) {
3466
+ const proxied = new Proxy(clazz, classProxy_default);
3467
+ DTO_CLASS_MAP[clazz.name] = proxied;
3468
+ return proxied;
3469
+ }
3470
+ function validate(clazz) {
3471
+ const parent = Object.getPrototypeOf(clazz.prototype);
3472
+ if (NAME in parent) throw new Error(`⛔️ @dto ${clazz.name} cannot extend parent class which is also decorated with @dto ${parent[NAME]}.`);
3473
+ }
3474
+ function __decorate(decorators, target, key, desc) {
3475
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3476
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3477
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
3478
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
3479
+ }
3480
+ var BlobResponse = class BlobResponse {
3481
+ get blob() {
3482
+ return this.#blob;
3483
+ }
3484
+ get name() {
3485
+ return this.#name;
3486
+ }
3487
+ #blob;
3488
+ #name;
3489
+ constructor(blob, name) {
3490
+ this.#blob = blob;
3491
+ this.#name = name;
3492
+ }
3493
+ };
3494
+ BlobResponse = __decorate([dto_default], BlobResponse);
3495
+ var Paginated = class Paginated {
3496
+ get items() {
3497
+ return this.#items;
3498
+ }
3499
+ get page() {
3500
+ return this.#page;
3501
+ }
3502
+ get pageSize() {
3503
+ return this.#pageSize;
3504
+ }
3505
+ get pages() {
3506
+ return this.#pages;
3507
+ }
3508
+ get total() {
3509
+ return this.#total;
3510
+ }
3511
+ #items;
3512
+ #page;
3513
+ #pageSize;
3514
+ #pages;
3515
+ #total;
3516
+ constructor(items, page, pageSize, pages, total) {
3517
+ this.#items = items;
3518
+ this.#page = page;
3519
+ this.#pageSize = pageSize;
3520
+ this.#pages = pages;
3521
+ this.#total = total;
3522
+ }
3523
+ };
3524
+ Paginated = __decorate([dto_default], Paginated);
3525
+ var Paginated_default = Paginated;
3526
+ var RequestError = class RequestError {
3527
+ get code() {
3528
+ return this.#code;
3529
+ }
3530
+ get error() {
3531
+ return this.#error;
3532
+ }
3533
+ get errorDescription() {
3534
+ return this.#errorDescription;
3535
+ }
3536
+ get statusCode() {
3537
+ return this.#statusCode;
3538
+ }
3539
+ #code;
3540
+ #error;
3541
+ #errorDescription;
3542
+ #statusCode;
3543
+ constructor(code, error, errorDescription, statusCode) {
3544
+ this.#code = code;
3545
+ this.#error = error;
3546
+ this.#errorDescription = errorDescription;
3547
+ this.#statusCode = statusCode;
3548
+ }
3549
+ };
3550
+ RequestError = __decorate([dto_default], RequestError);
3551
+ var RequestError_default = RequestError;
3552
+ var ValidationError = class ValidationError {
3553
+ get code() {
3554
+ return this.#code;
3555
+ }
3556
+ get error() {
3557
+ return this.#error;
3558
+ }
3559
+ get errorDescription() {
3560
+ return this.#errorDescription;
3561
+ }
3562
+ get errors() {
3563
+ return this.#errors;
3564
+ }
3565
+ get params() {
3566
+ return this.#params;
3567
+ }
3568
+ #code;
3569
+ #error;
3570
+ #errorDescription;
3571
+ #errors;
3572
+ #params;
3573
+ constructor(code, error, errorDescription, errors, params) {
3574
+ this.#code = code;
3575
+ this.#error = error;
3576
+ this.#errorDescription = errorDescription;
3577
+ this.#errors = errors;
3578
+ this.#params = params;
3579
+ }
3580
+ };
3581
+ ValidationError = __decorate([dto_default], ValidationError);
3582
+ var ValidationError_default = ValidationError;
3583
+ var _HttpAdapter;
3584
+ var HttpAdapter = _HttpAdapter = class HttpAdapter {
3585
+ static parsePaginatedAdapter(data, adapterMethod) {
3586
+ return new Paginated_default(data.items.map(adapterMethod), data.page, data.page_size, data.pages, data.total);
3587
+ }
3588
+ static parseFileNameFromContentDispositionHeader(header) {
3589
+ const defaultFilename = `download-${DateTime.now().toFormat("yyyy-MM-dd HH-mm-ss")}`;
3590
+ if (!header.startsWith("attachment")) return defaultFilename;
3591
+ const matches = /filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/.exec(header);
3592
+ if ((matches?.length || 0) < 2) return defaultFilename;
3593
+ return matches[1].replaceAll("'", "").replaceAll("\"", "").replaceAll("/", "-").replaceAll(":", "-");
3594
+ }
3595
+ static parseRequestError(data, statusCode) {
3596
+ return new RequestError_default(data.code, data.error, data.error_description, statusCode);
3597
+ }
3598
+ static parseValidationError(data) {
3599
+ let errors;
3600
+ if (data.errors) {
3601
+ errors = {};
3602
+ Object.entries(data.errors).forEach(([key, value]) => {
3603
+ errors[key] = _HttpAdapter.parseValidationError(value);
3604
+ });
3605
+ }
3606
+ return new ValidationError_default(data.code, data.error, data.error_description, errors, data.params);
3607
+ }
3608
+ };
3609
+ HttpAdapter = _HttpAdapter = __decorate([adapter_default], HttpAdapter);
3610
+ RegExp(`[a-z]`), RegExp(`[A-Z]`), RegExp(`[0-9]`), RegExp(`[!"#$%&'()*+,-./:;<=>?@[\\\\\\]^_\`{|}~]`);
3611
+ //#endregion
3612
+ //#region ../internals/dist/composable-5ooZTjm_.js
3613
+ function D(e, t, n, r = { passive: !0 }) {
3614
+ watch(e, (e, i, a) => {
3615
+ e && (e.addEventListener(t, n, r), a(() => e.removeEventListener(t, n)));
3616
+ }, { immediate: !0 });
3617
+ }
3618
+ function k(e, t) {
3619
+ let n = `flux/${e}`, r = ref(i() ?? t);
3620
+ function i() {
3621
+ if (n in localStorage) {
3622
+ let e = JSON.parse(localStorage.getItem(n));
3623
+ return Array.isArray(e) && e[0] === `DateTime` && (e = DateTime.fromISO(e[1])), e;
3624
+ }
3625
+ return null;
3626
+ }
3627
+ return watch(r, (e) => {
3628
+ let t = e;
3629
+ DateTime.isDateTime(e) && (t = [`DateTime`, e.toISO({
3630
+ includeOffset: !0,
3631
+ extendedZone: !0
3632
+ })]), localStorage.setItem(n, JSON.stringify(t));
3633
+ }), r;
3634
+ }
3635
+ function j(e) {
3636
+ let t = ref(0), n = ref(0);
3637
+ return e ||= ref(document), D(e, `scroll`, () => {
3638
+ let r = unref(e);
3639
+ r instanceof Document && (r = r.scrollingElement), t.value = r?.scrollLeft ?? 0, n.value = r?.scrollTop ?? 0;
3640
+ }), {
3641
+ x: t,
3642
+ y: n
3643
+ };
3644
+ }
3645
+ //#endregion
3646
+ //#region src/data/index.ts
3647
+ var FluxDashboardInjectionKey = Symbol();
3648
+ var Dashboard_module_default = {
3649
+ root: `root`,
3650
+ dashboard: `dashboard`,
3651
+ dashboardMount: `dashboard-mount`,
3652
+ isResizing: `is-resizing`,
3653
+ dashboardNavigation: `dashboard-navigation`,
3654
+ dashboardNavigationCollapsed: `dashboard-navigation-collapsed`,
3655
+ dashboardMenu: `dashboard-menu`,
3656
+ dashboardSide: `dashboard-side`
3657
+ };
3658
+ //#endregion
3659
+ //#region src/component/FluxDashboard.vue
3660
+ var FluxDashboard_default = /* @__PURE__ */ defineComponent({
3661
+ __name: "FluxDashboard",
3662
+ setup(__props) {
3663
+ const isMenuCollapsed = k("dashboard-menu-collapsed", true);
3664
+ const isNavigationCollapsed = k("dashboard-navigation-collapsed", true);
3665
+ const isResizing = ref(false);
3666
+ provide(FluxDashboardInjectionKey, {
3667
+ isMenuCollapsed,
3668
+ isNavigationCollapsed
3669
+ });
3670
+ watch(isNavigationCollapsed, (_, __, onCleanup) => {
3671
+ let timeout;
3672
+ function onResize() {
3673
+ clearTimeout(timeout);
3674
+ isResizing.value = true;
3675
+ timeout = setTimeout(() => isResizing.value = false, 10);
3676
+ }
3677
+ window.addEventListener("resize", onResize, { passive: true });
3678
+ onCleanup(() => window.removeEventListener("resize", onResize));
3679
+ }, { immediate: true });
3680
+ return (_ctx, _cache) => {
3681
+ return openBlock(), createElementBlock("div", { class: normalizeClass([unref(Dashboard_module_default).dashboard, isResizing.value && unref(Dashboard_module_default).isResizing]) }, [
3682
+ renderSlot(_ctx.$slots, "navigation"),
3683
+ renderSlot(_ctx.$slots, "menu"),
3684
+ createElementVNode("div", { class: normalizeClass(unref(Dashboard_module_default).dashboardMount) }, [renderSlot(_ctx.$slots, "header"), renderSlot(_ctx.$slots, "default")], 2),
3685
+ renderSlot(_ctx.$slots, "side")
3686
+ ], 2);
3687
+ };
3688
+ }
3689
+ });
3690
+ //#endregion
3691
+ //#region src/composable/useDashboardInjection.ts
3692
+ function useDashboardInjection_default() {
3693
+ const injection = inject(FluxDashboardInjectionKey);
3694
+ if (!injection) throw new Error("[Flux] useDashboardInjection() was used outside a FluxDashboard component.");
3695
+ return injection;
3696
+ }
3697
+ var DashboardContent_module_default = {
3698
+ notice: `notice`,
3699
+ dashboardContent: `dashboard-content`,
3700
+ calendar: `calendar`,
3701
+ table: `table`,
3702
+ calendarActions: `calendar-actions`,
3703
+ tableCell: `table-cell`,
3704
+ tableCellContent: `table-cell-content`,
3705
+ dashboardContentCollapsed: `dashboard-content-collapsed`
3706
+ };
3707
+ //#endregion
3708
+ //#region src/component/FluxDashboardContent.vue
3709
+ var FluxDashboardContent_default = /* @__PURE__ */ defineComponent({
3710
+ __name: "FluxDashboardContent",
3711
+ setup(__props) {
3712
+ const { isMenuCollapsed } = useDashboardInjection_default();
3713
+ return (_ctx, _cache) => {
3714
+ return openBlock(), createElementBlock("main", { class: normalizeClass([unref(DashboardContent_module_default).dashboardContent, !unref(isMenuCollapsed) && unref(DashboardContent_module_default).dashboardContentCollapsed]) }, [renderSlot(_ctx.$slots, "default")], 2);
3715
+ };
3716
+ }
3717
+ });
3718
+ var DashboardTopBar_module_default = {
3719
+ dashboardTopBar: `dashboard-top-bar`,
3720
+ icon: `icon`,
3721
+ separator: `separator`,
3722
+ dashboardHeader: `dashboard-header`,
3723
+ routeTransitionEnterActive: `route-transition-enter-active`,
3724
+ routeTransitionLeaveActive: `route-transition-leave-active`,
3725
+ dashboardHeaderScrolled: `dashboard-header-scrolled dashboard-header`,
3726
+ dashboard: `dashboard`,
3727
+ dashboardTopBarCollapsed: `dashboard-top-bar-collapsed`
3728
+ };
3729
+ //#endregion
3730
+ //#region src/component/FluxDashboardTopBar.vue
3731
+ var FluxDashboardTopBar_default = /* @__PURE__ */ defineComponent({
3732
+ __name: "FluxDashboardTopBar",
3733
+ setup(__props) {
3734
+ const { isMenuCollapsed } = useDashboardInjection_default();
3735
+ return (_ctx, _cache) => {
3736
+ return openBlock(), createElementBlock("header", { class: normalizeClass([unref(DashboardTopBar_module_default).dashboardTopBar, !unref(isMenuCollapsed) && unref(DashboardTopBar_module_default).dashboardTopBarCollapsed]) }, [renderSlot(_ctx.$slots, "default")], 2);
3737
+ };
3738
+ }
3739
+ });
3740
+ //#endregion
3741
+ //#region src/component/FluxDashboardHeader.vue?vue&type=script&setup=true&lang.ts
3742
+ var _hoisted_1$1 = { key: 1 };
3743
+ //#endregion
3744
+ //#region src/component/FluxDashboardHeader.vue
3745
+ var FluxDashboardHeader_default = /* @__PURE__ */ defineComponent({
3746
+ __name: "FluxDashboardHeader",
3747
+ props: {
3748
+ icon: {},
3749
+ title: {}
3750
+ },
3751
+ setup(__props) {
3752
+ const { y } = j();
3753
+ return (_ctx, _cache) => {
3754
+ return openBlock(), createBlock(FluxDashboardTopBar_default, { class: normalizeClass(unref(y) > 0 ? unref(DashboardTopBar_module_default).dashboardHeaderScrolled : unref(DashboardTopBar_module_default).dashboardHeader) }, {
3755
+ default: withCtx(() => [
3756
+ renderSlot(_ctx.$slots, "start"),
3757
+ __props.icon ? (openBlock(), createBlock(unref(FluxIcon), {
3758
+ key: 0,
3759
+ name: __props.icon
3760
+ }, null, 8, ["name"])) : createCommentVNode("", true),
3761
+ __props.title ? (openBlock(), createElementBlock("h1", _hoisted_1$1, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
3762
+ createVNode(unref(FluxSpacer)),
3763
+ renderSlot(_ctx.$slots, "end")
3764
+ ]),
3765
+ _: 3
3766
+ }, 8, ["class"]);
3767
+ };
3768
+ }
3769
+ });
3770
+ var DashboardPane_module_default = {
3771
+ dashboardPane: `dashboard-pane`,
3772
+ menuSubHeader: `menu-sub-header`,
3773
+ dashboardTopBar: `dashboard-top-bar`,
3774
+ filter: `filter`,
3775
+ filterHeader: `filter-header`,
3776
+ menu: `menu`,
3777
+ menuItemCommand: `menu-item-command`,
3778
+ menuItemIcon: `menu-item-icon`,
3779
+ divider: `divider`,
3780
+ separator: `separator`,
3781
+ dashboardMenu: `dashboard-menu dashboard-pane`,
3782
+ dashboardMenuBody: `dashboard-menu-body`,
3783
+ dashboardSide: `dashboard-side dashboard-pane`,
3784
+ dashboardMenuCollapsed: `dashboard-menu-collapsed`
3785
+ };
3786
+ //#endregion
3787
+ //#region src/component/FluxDashboardMenu.vue?vue&type=script&setup=true&lang.ts
3788
+ var _hoisted_1 = { key: 1 };
3789
+ //#endregion
3790
+ //#region src/component/FluxDashboardMenu.vue
3791
+ var FluxDashboardMenu_default = /* @__PURE__ */ defineComponent({
3792
+ __name: "FluxDashboardMenu",
3793
+ props: {
3794
+ icon: {},
3795
+ title: {}
3796
+ },
3797
+ setup(__props) {
3798
+ const { isMenuCollapsed } = useDashboardInjection_default();
3799
+ return (_ctx, _cache) => {
3800
+ return openBlock(), createElementBlock("aside", { class: normalizeClass([unref(DashboardPane_module_default).dashboardMenu, unref(isMenuCollapsed) && unref(DashboardPane_module_default).dashboardMenuCollapsed]) }, [createVNode(FluxDashboardTopBar_default, null, {
3801
+ default: withCtx(() => [
3802
+ renderSlot(_ctx.$slots, "top-bar-start"),
3803
+ __props.icon ? (openBlock(), createBlock(unref(FluxIcon), {
3804
+ key: 0,
3805
+ name: __props.icon
3806
+ }, null, 8, ["name"])) : createCommentVNode("", true),
3807
+ __props.title ? (openBlock(), createElementBlock("h1", _hoisted_1, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
3808
+ createVNode(unref(FluxSpacer)),
3809
+ renderSlot(_ctx.$slots, "top-bar-end")
3810
+ ]),
3811
+ _: 3
3812
+ }), createElementVNode("div", { class: normalizeClass(unref(DashboardPane_module_default).dashboardMenuBody) }, [renderSlot(_ctx.$slots, "default")], 2)], 2);
3813
+ };
3814
+ }
3815
+ });
3816
+ var DashboardNavigation_module_default = {
3817
+ dashboardNavigation: `dashboard-navigation`,
3818
+ divider: `divider`,
3819
+ dividerLine: `divider-line`,
3820
+ menu: `menu`,
3821
+ menuItem: `menu-item`,
3822
+ menuItemHighlighted: `menu-item-highlighted`,
3823
+ menuItemIcon: `menu-item-icon`,
3824
+ menuItemLabel: `menu-item-label`,
3825
+ dashboardNavigationCollapsed: `dashboard-navigation-collapsed dashboard-navigation`,
3826
+ dashboardNavigationLogo: `dashboard-navigation-logo`,
3827
+ dashboardNavigationRoundingFix: `dashboard-navigation-rounding-fix`,
3828
+ dashboard: `dashboard`,
3829
+ dashboardMenu: `dashboard-menu`,
3830
+ dashboardNavigationHeader: `dashboard-navigation-header`,
3831
+ dashboardNavigationNav: `dashboard-navigation-nav`
3832
+ };
3833
+ //#endregion
3834
+ //#region src/component/FluxDashboardNavigation.vue
3835
+ var FluxDashboardNavigation_default = /* @__PURE__ */ defineComponent({
3836
+ inheritAttrs: false,
3837
+ __name: "FluxDashboardNavigation",
3838
+ props: { logoLocation: {} },
3839
+ setup(__props, { attrs: $attrs }) {
3840
+ const slots = useSlots();
3841
+ const { isMenuCollapsed, isNavigationCollapsed } = useDashboardInjection_default();
3842
+ return (_ctx, _cache) => {
3843
+ const _component_router_link = resolveComponent("router-link");
3844
+ return openBlock(), createElementBlock("nav", mergeProps($attrs, { class: unref(isNavigationCollapsed) ? unref(DashboardNavigation_module_default).dashboardNavigationCollapsed : unref(DashboardNavigation_module_default).dashboardNavigation }), [
3845
+ createElementVNode("header", { class: normalizeClass(unref(DashboardNavigation_module_default).dashboardNavigationHeader) }, [
3846
+ createVNode(unref(FluxMenuItem), {
3847
+ "icon-leading": "bars",
3848
+ onClick: _cache[0] || (_cache[0] = ($event) => isNavigationCollapsed.value = !unref(isNavigationCollapsed))
3849
+ }),
3850
+ slots.logo ? (openBlock(), createBlock(_component_router_link, {
3851
+ key: 0,
3852
+ class: normalizeClass(unref(DashboardNavigation_module_default).dashboardNavigationLogo),
3853
+ to: __props.logoLocation || "/"
3854
+ }, {
3855
+ default: withCtx(() => [renderSlot(_ctx.$slots, "logo", normalizeProps(guardReactiveProps({ isNavigationCollapsed: unref(isNavigationCollapsed) })))]),
3856
+ _: 3
3857
+ }, 8, ["class", "to"])) : createCommentVNode("", true),
3858
+ createVNode(unref(FluxMenuItem), {
3859
+ "icon-leading": "ellipsis-h",
3860
+ onClick: _cache[1] || (_cache[1] = ($event) => isMenuCollapsed.value = !unref(isMenuCollapsed))
3861
+ })
3862
+ ], 2),
3863
+ (openBlock(), createElementBlock(Fragment, null, renderList(2, (index) => {
3864
+ return createElementVNode("div", {
3865
+ key: index,
3866
+ class: normalizeClass(unref(DashboardNavigation_module_default).dashboardNavigationRoundingFix)
3867
+ }, null, 2);
3868
+ }), 64)),
3869
+ createElementVNode("main", { class: normalizeClass(unref(DashboardNavigation_module_default).dashboardNavigationNav) }, [renderSlot(_ctx.$slots, "default")], 2)
3870
+ ], 16);
3871
+ };
3872
+ }
57
3873
  });
58
- function D() {
59
- const n = x(z);
60
- if (!n)
61
- throw new Error("[Flux] useDashboardInjection() was used outside a FluxDashboard component.");
62
- return n;
63
- }
64
- const oa = "notice", ea = "dashboard-content", sa = "calendar", na = "table", ta = "calendar-actions", da = "table-cell", ra = "table-cell-content", ia = "dashboard-content-collapsed", H = { notice: oa, dashboardContent: ea, calendar: sa, table: na, calendarActions: ta, tableCell: da, tableCellContent: ra, dashboardContentCollapsed: ia }, Xa = /* @__PURE__ */ m({
65
- __name: "FluxDashboardContent",
66
- setup(n) {
67
- const { isMenuCollapsed: s } = D();
68
- return (o, e) => (l(), u("main", {
69
- class: i([a(H).dashboardContent, !a(s) && a(H).dashboardContentCollapsed])
70
- }, [
71
- r(o.$slots, "default")
72
- ], 2));
73
- }
74
- }), la = "dashboard-top-bar", ca = "icon", ua = "separator", ha = "dashboard-header", ba = "route-transition-enter-active", ma = "route-transition-leave-active", pa = "dashboard", va = "dashboard-top-bar-collapsed", ga = "dashboard-header-scrolled dashboard-header", C = { dashboardTopBar: la, icon: ca, separator: ua, dashboardHeader: ha, routeTransitionEnterActive: ba, routeTransitionLeaveActive: ma, dashboard: pa, dashboardTopBarCollapsed: va, dashboardHeaderScrolled: ga }, I = /* @__PURE__ */ m({
75
- __name: "FluxDashboardTopBar",
76
- setup(n) {
77
- const { isMenuCollapsed: s } = D();
78
- return (o, e) => (l(), u("header", {
79
- class: i([a(C).dashboardTopBar, !a(s) && a(C).dashboardTopBarCollapsed])
80
- }, [
81
- r(o.$slots, "default")
82
- ], 2));
83
- }
84
- }), fa = { key: 1 }, Ya = /* @__PURE__ */ m({
85
- __name: "FluxDashboardHeader",
86
- props: {
87
- icon: {},
88
- title: {}
89
- },
90
- setup(n) {
91
- const { y: s } = Z();
92
- return (o, e) => (l(), $(I, {
93
- class: i(a(s) > 0 ? a(C).dashboardHeaderScrolled : a(C).dashboardHeader)
94
- }, {
95
- default: N(() => [
96
- r(o.$slots, "start"),
97
- o.icon ? (l(), $(a(w), {
98
- key: 0,
99
- name: o.icon
100
- }, null, 8, ["name"])) : _("", !0),
101
- o.title ? (l(), u("h1", fa, S(o.title), 1)) : _("", !0),
102
- b(a(M)),
103
- r(o.$slots, "end")
104
- ]),
105
- _: 3
106
- }, 8, ["class"]));
107
- }
108
- }), $a = "dashboard-pane", _a = "menu-sub-header", Ca = "dashboard-top-bar", Na = "filter", Da = "filter-header", Fa = "menu", ya = "menu-item-command", Sa = "menu-item-icon", Ma = "divider", Ia = "separator", Ta = "dashboard-menu-body", ka = "dashboard-menu-collapsed", La = "dashboard-menu dashboard-pane", Ba = "dashboard-side dashboard-pane", f = { dashboardPane: $a, menuSubHeader: _a, dashboardTopBar: Ca, filter: Na, filterHeader: Da, menu: Fa, menuItemCommand: ya, menuItemIcon: Sa, divider: Ma, separator: Ia, dashboardMenuBody: Ta, dashboardMenuCollapsed: ka, dashboardMenu: La, dashboardSide: Ba }, ao = /* @__PURE__ */ m({
109
- __name: "FluxDashboardMenu",
110
- props: {
111
- icon: {},
112
- title: {}
113
- },
114
- setup(n) {
115
- const { isMenuCollapsed: s } = D();
116
- return (o, e) => (l(), u("aside", {
117
- class: i([a(f).dashboardMenu, a(s) && a(f).dashboardMenuCollapsed])
118
- }, [
119
- b(I, null, {
120
- default: N(() => [
121
- r(o.$slots, "top-bar-start"),
122
- o.icon ? (l(), $(a(w), {
123
- key: 0,
124
- name: o.icon
125
- }, null, 8, ["name"])) : _("", !0),
126
- h("h1", null, S(o.title), 1),
127
- b(a(M)),
128
- r(o.$slots, "top-bar-end")
129
- ]),
130
- _: 3
131
- }),
132
- h("div", {
133
- class: i(a(f).dashboardMenuBody)
134
- }, [
135
- r(o.$slots, "default")
136
- ], 2)
137
- ], 2));
138
- }
139
- }), Ha = "dashboard-navigation", wa = "divider", za = "divider-line", Ea = "menu", xa = "menu-item", Ra = "menu-item-highlighted", Aa = "menu-item-icon", ja = "menu-item-label", Oa = "dashboard-navigation-logo", Pa = "dashboard-navigation-rounding-fix", Va = "dashboard", Ja = "dashboard-menu", Ka = "dashboard-navigation-header", Za = "dashboard-navigation-nav", qa = "dashboard-navigation-collapsed dashboard-navigation", v = { dashboardNavigation: Ha, divider: wa, dividerLine: za, menu: Ea, menuItem: xa, menuItemHighlighted: Ra, menuItemIcon: Aa, menuItemLabel: ja, dashboardNavigationLogo: Oa, dashboardNavigationRoundingFix: Pa, dashboard: Va, dashboardMenu: Ja, dashboardNavigationHeader: Ka, dashboardNavigationNav: Za, dashboardNavigationCollapsed: qa }, oo = /* @__PURE__ */ m({
140
- inheritAttrs: !1,
141
- __name: "FluxDashboardNavigation",
142
- props: {
143
- logoLocation: {}
144
- },
145
- setup(n) {
146
- const s = R(), {
147
- isMenuCollapsed: o,
148
- isNavigationCollapsed: e
149
- } = D();
150
- return (t, d) => {
151
- const c = A("router-link");
152
- return l(), u("nav", j(t.$attrs, {
153
- class: a(e) ? a(v).dashboardNavigationCollapsed : a(v).dashboardNavigation
154
- }), [
155
- h("header", {
156
- class: i(a(v).dashboardNavigationHeader)
157
- }, [
158
- b(a(L), {
159
- "icon-leading": "bars",
160
- onClick: d[0] || (d[0] = (p) => e.value = !a(e))
161
- }),
162
- s.logo ? (l(), $(c, {
163
- key: 0,
164
- class: i(a(v).dashboardNavigationLogo),
165
- to: t.logoLocation || "/"
166
- }, {
167
- default: N(() => [
168
- r(t.$slots, "logo", O(P({ isNavigationCollapsed: a(e) })))
169
- ]),
170
- _: 3
171
- }, 8, ["class", "to"])) : _("", !0),
172
- b(a(L), {
173
- "icon-leading": "ellipsis-h",
174
- onClick: d[1] || (d[1] = (p) => o.value = !a(o))
175
- })
176
- ], 2),
177
- (l(), u(V, null, J(2, (p) => h("div", {
178
- key: p,
179
- class: i(a(v).dashboardNavigationRoundingFix)
180
- }, null, 2)), 64)),
181
- h("main", {
182
- class: i(a(v).dashboardNavigationNav)
183
- }, [
184
- r(t.$slots, "default")
185
- ], 2)
186
- ], 16);
187
- };
188
- }
189
- }), eo = /* @__PURE__ */ m({
190
- __name: "FluxDashboardSide",
191
- props: {
192
- title: {}
193
- },
194
- setup(n) {
195
- return (s, o) => (l(), u("aside", {
196
- class: i(a(f).dashboardSide)
197
- }, [
198
- b(I, null, {
199
- default: N(() => [
200
- r(s.$slots, "top-bar-start"),
201
- h("h1", null, S(s.title), 1),
202
- b(a(M)),
203
- r(s.$slots, "top-bar-end")
204
- ]),
205
- _: 3
206
- }),
207
- r(s.$slots, "default")
208
- ], 2));
209
- }
3874
+ //#endregion
3875
+ //#region src/component/FluxDashboardSide.vue
3876
+ var FluxDashboardSide_default = /* @__PURE__ */ defineComponent({
3877
+ __name: "FluxDashboardSide",
3878
+ props: { title: {} },
3879
+ setup(__props) {
3880
+ return (_ctx, _cache) => {
3881
+ return openBlock(), createElementBlock("aside", { class: normalizeClass(unref(DashboardPane_module_default).dashboardSide) }, [createVNode(FluxDashboardTopBar_default, null, {
3882
+ default: withCtx(() => [
3883
+ renderSlot(_ctx.$slots, "top-bar-start"),
3884
+ createElementVNode("h1", null, toDisplayString(__props.title), 1),
3885
+ createVNode(unref(FluxSpacer)),
3886
+ renderSlot(_ctx.$slots, "top-bar-end")
3887
+ ]),
3888
+ _: 3
3889
+ }), renderSlot(_ctx.$slots, "default")], 2);
3890
+ };
3891
+ }
210
3892
  });
211
- export {
212
- Wa as FluxDashboard,
213
- Xa as FluxDashboardContent,
214
- Ya as FluxDashboardHeader,
215
- z as FluxDashboardInjectionKey,
216
- ao as FluxDashboardMenu,
217
- oo as FluxDashboardNavigation,
218
- eo as FluxDashboardSide,
219
- D as useDashboardInjection
220
- };
221
- //# sourceMappingURL=index.js.map
3893
+ //#endregion
3894
+ export { FluxDashboard_default as FluxDashboard, FluxDashboardContent_default as FluxDashboardContent, FluxDashboardHeader_default as FluxDashboardHeader, FluxDashboardInjectionKey, FluxDashboardMenu_default as FluxDashboardMenu, FluxDashboardNavigation_default as FluxDashboardNavigation, FluxDashboardSide_default as FluxDashboardSide, useDashboardInjection_default as useDashboardInjection };
3895
+
3896
+ //# sourceMappingURL=index.js.map