@genome-spy/app 0.85.0 → 0.86.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +28 -0
  2. package/dist/{agentApi-Cz0hCnVp.js → agentApi-DgopQbMV.js} +5019 -6824
  3. package/dist/agentApi.es.js +2757 -2852
  4. package/dist/agentShared.es.js +15 -14
  5. package/dist/canvas2d-8uxuN_vx.js +619 -0
  6. package/dist/canvas2d-BtQC7Xr8.js +619 -0
  7. package/dist/{arrayUtils-LJpQOu-U.js → clipOptions-BQfNhxgP.js} +625 -561
  8. package/dist/{paramUtils-BYI4rwyL.js → clipOptions-taFzEljc.js} +192 -128
  9. package/dist/{debug-BvCZWumf.js → debug-Bzc3SoRg.js} +8 -8
  10. package/dist/{debug-CgDtmspT.js → debug-D_VtWQ6l.js} +8 -8
  11. package/dist/index.es.js +2992 -2915
  12. package/dist/index.js +2006 -2004
  13. package/dist/indexer-qiFctgR3.js +72 -0
  14. package/dist/indexer-qy_dq5l5.js +72 -0
  15. package/dist/layoutResult-D50MSHXR.js +97 -0
  16. package/dist/{nativeText-m5AUINMq.js → nativeText-DFV5XIx8.js} +247 -193
  17. package/dist/{nativeText-DMO8gLt7.js → nativeText-vT3AWE14.js} +244 -190
  18. package/dist/performanceProfiler-CPLEjApa.js +20 -0
  19. package/dist/rasterExport-B8pVoOsj.js +44 -0
  20. package/dist/rasterExport-C4r4xjQT.js +44 -0
  21. package/dist/rasterImage-B4rPLaW9.js +18 -0
  22. package/dist/rasterization-CFogVB3B.js +50 -0
  23. package/dist/rectangle-DKnrAmKs.js +142 -0
  24. package/dist/renderCanvas2D-BQrRWp2Z.js +271 -0
  25. package/dist/renderCanvas2D-CHVNfIUz.js +271 -0
  26. package/dist/schema.json +71 -131
  27. package/dist/{svg-CCu8kYy2.js → svg-C-Sw6E6G.js} +286 -277
  28. package/dist/{svg-yFj875aX.js → svg-CKHwwKRt.js} +278 -269
  29. package/dist/svgRasterizer-BgD72AmG.js +40 -0
  30. package/dist/svgRasterizer-BgSNqI3L.js +40 -0
  31. package/dist/vega-scale-CK0_al6O.js +2700 -0
  32. package/dist/vega-scale-D46-iCaL.js +2700 -0
  33. package/dist/viewError-BiR9VCgL.js +29 -0
  34. package/dist/{viewIdentityRegistry-D3oPbN4O.js → viewIdentityRegistry-B-VGlez1.js} +1 -1
  35. package/dist/{viewIdentityRegistry-BUdkK9zT.js → viewIdentityRegistry-CDtVktJD.js} +1 -1
  36. package/dist/viewSelectors-CKfxF_LM.js +1817 -0
  37. package/dist/viewSelectors-D_imtq5Z.js +1817 -0
  38. package/dist/viewUtils-nCJ7AoaI.js +5782 -0
  39. package/dist/webgl-BaA3jSa2.js +4128 -0
  40. package/dist/webgl-FP-4EsBL.js +4128 -0
  41. package/package.json +7 -6
  42. package/dist/bmFontMetrics-CuNB-kNN.js +0 -31
  43. package/dist/canvas2d-DoAXEiF9.js +0 -309
  44. package/dist/canvas2d-f5jl4A5D.js +0 -310
  45. package/dist/clipOptions-gqdb3fvW.js +0 -43
  46. package/dist/color-W5zffv-z.js +0 -335
  47. package/dist/framebufferReadback-CCLOjStu.js +0 -148
  48. package/dist/framebufferReadback-THWwFqs8.js +0 -1994
  49. package/dist/twgl-full.module-DB2UdP1k.js +0 -1849
  50. package/dist/viewRenderingContext-HtpqwS_x.js +0 -120
  51. package/dist/viewSelectors-DGCspRN3.js +0 -4198
  52. package/dist/viewSelectors-U5oLCLHV.js +0 -4195
  53. package/dist/viewUtils-Dg4RA40Q.js +0 -7503
  54. package/dist/warning-DRGdb6BF.js +0 -59
  55. package/dist/webgl-Ci6ZhCCf.js +0 -54
  56. package/dist/webgl-Dpz8a3TI.js +0 -53
@@ -1,310 +0,0 @@
1
- import { r as e } from "./arrayUtils-LJpQOu-U.js";
2
- import { a as t, o as n } from "./clipOptions-gqdb3fvW.js";
3
- import { t as r } from "./canvasSizeHelper-7h_8rOcx.js";
4
- import { n as i, t as a } from "./viewRenderingContext-HtpqwS_x.js";
5
- import { t as o } from "./warning-CpIIpk8e.js";
6
- import { C as s, E as c, S as l, _ as u, a as d, b as f, c as p, d as m, f as h, g, h as _, i as v, l as y, m as b, n as x, o as S, p as C, r as w, s as T, t as E, u as D, w as O, x as k } from "./nativeText-m5AUINMq.js";
7
- //#region ../core/src/rendering/canvas2d/renderers/arrow.js
8
- function A(e, t) {
9
- let n = e, r = t.context, i = n.encoders, a = _(n);
10
- r.lineJoin = "miter";
11
- let o, s;
12
- return g(n, a, t, (e) => {
13
- e.headShapeFallback && t.warn(`Canvas2D rendered unsupported arrow headShape "${a.headShape}" as a triangle.`), r.beginPath();
14
- for (let t of e.boundaryLoops) {
15
- let e = t[0];
16
- r.moveTo(e.x, e.y);
17
- for (let e = 1; e < t.length; e++) r.lineTo(t[e].x, t[e].y);
18
- r.closePath();
19
- }
20
- let n = k(i.fill(e.datum)), c = u(i.fillOpacity, e.datum) * t.viewOpacity;
21
- n != "none" && c > 0 && (o != n && (r.fillStyle = n, o = n), r.globalAlpha = c, r.fill());
22
- let l = k(i.stroke(e.datum)), d = u(i.strokeOpacity, e.datum) * t.viewOpacity;
23
- l != "none" && d > 0 && e.strokeWidth > 0 && (s != l && (r.strokeStyle = l, s = l), r.globalAlpha = d, r.lineWidth = e.strokeWidth, r.stroke());
24
- });
25
- }
26
- //#endregion
27
- //#region ../core/src/rendering/canvas2d/renderers/link.js
28
- function j(e, t) {
29
- let n = e, r = t.context, i = n.encoders, a = f(n, n.properties.arcFadingDistance), o = C(n);
30
- o.shape == "arc" && a !== !1 && a[0] > 0 && a[1] > 0 && t.warn("Canvas2D ignored unsupported link arc fading."), r.lineCap = "butt";
31
- let s;
32
- return b(n, o, t, (e) => {
33
- let n = k(i.color(e.datum)), a = u(i.opacity, e.datum) * t.viewOpacity;
34
- if (n == "none" || a <= 0 || e.strokeWidth <= 0) return;
35
- s != n && (r.strokeStyle = n, s = n), r.globalAlpha = a, r.lineWidth = e.strokeWidth;
36
- let [o, c, l, d] = e.points;
37
- r.beginPath(), r.moveTo(o[0], o[1]), r.bezierCurveTo(c[0], c[1], l[0], l[1], d[0], d[1]), r.stroke();
38
- });
39
- }
40
- //#endregion
41
- //#region ../core/src/rendering/canvas2d/renderers/point.js
42
- function M(e, t) {
43
- let n = e;
44
- f(n, n.properties.fillGradientStrength) && t.warn("Canvas2D ignored unsupported point property fillGradientStrength."), n.properties.geometricZoomBound && t.warn("Canvas2D ignored unsupported point property geometricZoomBound.");
45
- let r = m(n), i = t.context, a = n.encoders, o, s;
46
- return h(n, r, t, (e) => {
47
- let n = e.datum, r = e.lineShape, c = k(a.fill(n)), l = u(a.fillOpacity, n) * t.viewOpacity, d = k(a.stroke(n)), f = u(a.strokeOpacity, n) * t.viewOpacity;
48
- r && (d == "none" || f <= 0) && (d = c, f = l), i.beginPath();
49
- let p = e.angle != 0 && e.shape != "circle";
50
- p && (i.save(), i.translate(e.x, e.y), i.rotate(e.angle * Math.PI / 180));
51
- let m = p ? 0 : e.x, h = p ? 0 : e.y, g = !0;
52
- if (e.shape == "circle") i.arc(m, h, e.geometryRadius, 0, Math.PI * 2);
53
- else if (e.shape == "square") {
54
- let t = e.geometryRadius * 2;
55
- i.rect(m - e.geometryRadius, h - e.geometryRadius, t, t);
56
- } else g = D(e.shape, m, h, e.geometryRadius, i);
57
- p && i.restore(), g || (t.warn(`Canvas2D rendered unsupported point shape "${e.shape}" as a circle.`), i.arc(e.x, e.y, e.geometryRadius, 0, Math.PI * 2)), !r && c != "none" && l > 0 && (o != c && (i.fillStyle = c, o = c), N(i, l), i.fill()), d != "none" && f > 0 && e.strokeWidth > 0 && (r && i.lineCap != "butt" && (i.lineCap = "butt"), s != d && (i.strokeStyle = d, s = d), N(i, f), P(i, e.strokeWidth), i.stroke());
58
- });
59
- }
60
- function N(e, t) {
61
- e.globalAlpha != t && (e.globalAlpha = t);
62
- }
63
- function P(e, t) {
64
- e.lineWidth != t && (e.lineWidth = t);
65
- }
66
- //#endregion
67
- //#region ../core/src/rendering/canvas2d/renderers/rect.js
68
- function F(e, t) {
69
- let n = e, r = p(n);
70
- r.hatch != "none" && t.warn("Canvas2D ignored unsupported rect hatch."), r.shadow.opacity > 0 && t.warn("Canvas2D ignored unsupported rect shadow.");
71
- let i = t.context, a = n.encoders, o, s, c = [
72
- 0,
73
- 0,
74
- 0,
75
- 0
76
- ];
77
- return y(n, r, t, (e) => {
78
- let n = e.opacityFactor, r = e.fill != "none" && e.fillOpacity > 0, l = k(a.stroke(e.datum)), d = u(a.strokeOpacity, e.datum) * t.viewOpacity * n, f = l != "none" && d > 0 && e.strokeWidth > 0, p = e.radii.topLeft != 0 || e.radii.topRight != 0 || e.radii.bottomRight != 0 || e.radii.bottomLeft != 0;
79
- p && (r || f) && (c[0] = e.radii.topLeft, c[1] = e.radii.topRight, c[2] = e.radii.bottomRight, c[3] = e.radii.bottomLeft, i.beginPath(), i.roundRect(e.x, e.y, e.width, e.height, c)), r && (o != e.fill && (i.fillStyle = e.fill, o = e.fill), I(i, e.fillOpacity * n), p ? i.fill() : i.fillRect(e.x, e.y, e.width, e.height)), f && (s != l && (i.strokeStyle = l, s = l), I(i, d), L(i, e.strokeWidth), p ? i.stroke() : i.strokeRect(e.x, e.y, e.width, e.height));
80
- });
81
- }
82
- function I(e, t) {
83
- e.globalAlpha != t && (e.globalAlpha = t);
84
- }
85
- function L(e, t) {
86
- e.lineWidth != t && (e.lineWidth = t);
87
- }
88
- //#endregion
89
- //#region ../core/src/rendering/canvas2d/renderers/rule.js
90
- function R(e, t) {
91
- let n = e, r = t.context, i = n.encoders;
92
- r.lineCap = f(n, n.properties.strokeCap), r.setLineDash(f(n, n.properties.strokeDash) ?? []), r.lineDashOffset = f(n, n.properties.strokeDashOffset);
93
- let a;
94
- return T(n, S(n), t, (e) => {
95
- let n = k(i.color(e.datum)), o = u(i.opacity, e.datum) * t.viewOpacity;
96
- n == "none" || o <= 0 || e.strokeWidth <= 0 || (a != n && (r.strokeStyle = n, a = n), r.globalAlpha = o, r.lineWidth = e.strokeWidth, r.beginPath(), r.moveTo(e.x1, e.y1), r.lineTo(e.x2, e.y2), r.stroke());
97
- });
98
- }
99
- //#endregion
100
- //#region ../core/src/rendering/canvas2d/renderers/text.js
101
- function z(e, t) {
102
- let n = e, r = n.properties, i = v(n), a = t.context, o = n.encoders, s = E(r.font), c = `${r.fontStyle ?? "normal"} ${w(r.fontWeight ?? "normal")} `, l = i.baseline == "baseline" ? "alphabetic" : i.baseline;
103
- [
104
- r.viewportEdgeFadeWidthTop,
105
- r.viewportEdgeFadeWidthRight,
106
- r.viewportEdgeFadeWidthBottom,
107
- r.viewportEdgeFadeWidthLeft
108
- ].some((e) => f(n, e) > 0) && t.warn("Canvas2D ignored unsupported text viewport edge fading.");
109
- let p, m;
110
- return i.logoLetters || (a.textAlign = i.align, a.textBaseline = l), d(n, i, t, (e) => {
111
- e.multiCharacterLogo && t.warn("Canvas2D stretches multi-character logo text as a single glyph cell.");
112
- let n = k(o.color(e.datum)), r = u(o.opacity, e.datum) * t.viewOpacity * e.fadeOpacity;
113
- if (!(n == "none" || r <= 0)) if (p != n && (a.fillStyle = n, p = n), a.globalAlpha = r, m != e.size && (a.font = `${c}${e.size}px ${s}`, m = e.size), e.logoScale) {
114
- a.save(), a.translate(e.x, e.y), a.rotate(e.angle * Math.PI / 180), a.translate(e.dx, e.dy);
115
- let t = a.measureText(e.text).width;
116
- a.scale(e.logoScale.width / t, e.logoScale.heightScale), a.textAlign = "center", a.textBaseline = "alphabetic", a.fillText(e.text, 0, x("middle", 1)), a.restore();
117
- } else e.angle ? (a.save(), a.translate(e.x, e.y), a.rotate(e.angle * Math.PI / 180), a.fillText(e.text, e.dx, e.dy, e.width), a.restore()) : a.fillText(e.text, e.x + e.dx, e.y + e.dy, e.width);
118
- });
119
- }
120
- //#endregion
121
- //#region ../core/src/rendering/canvas2d/renderers/index.js
122
- function B(e, t) {
123
- return e.getType() == "arrow" ? A(e, t) : e.getType() == "link" ? j(e, t) : e.getType() == "rect" ? F(e, t) : e.getType() == "point" ? M(e, t) : e.getType() == "rule" || e.getType() == "tick" ? R(e, t) : e.getType() == "text" ? z(e, t) : (t.warn(`Canvas2D rendering is not implemented for mark type "${e.getType()}".`), 0);
124
- }
125
- //#endregion
126
- //#region ../core/src/rendering/canvas2d/canvas2DViewRenderingContext.js
127
- var V = class extends a {
128
- #e = [];
129
- #t = /* @__PURE__ */ new Set();
130
- constructor(e, t) {
131
- if (super(e), this.context = t.context, this.width = t.width, this.height = t.height, this.devicePixelRatio = t.devicePixelRatio, this.paint = t.paint, this.paint) {
132
- let e = this.context;
133
- e.resetTransform(), e.clearRect(0, 0, e.canvas.width, e.canvas.height), e.setTransform(this.devicePixelRatio, 0, 0, this.devicePixelRatio, 0, 0), e.globalAlpha = 1, e.globalCompositeOperation = "source-over", t.background != null && (e.fillStyle = t.background, e.fillRect(0, 0, this.width, this.height));
134
- }
135
- }
136
- getDevicePixelRatio() {
137
- return this.devicePixelRatio;
138
- }
139
- pushView(e, t) {
140
- this.paint && !this.#t.has(e) && (e.onBeforeRender(), this.#t.add(e)), this.#e.push({
141
- view: e,
142
- coords: t
143
- });
144
- }
145
- popView(e) {
146
- if (this.#e.pop()?.view !== e) throw Error("Unbalanced Canvas2D view rendering context stack.");
147
- }
148
- renderMark(e, r) {
149
- if (!this.paint || e.unitView.getEffectiveOpacity() <= 0) return;
150
- let i = this.currentCoords, a = t(r), u = n(a, e.properties.clip, i), d = s(this.width, this.height, u);
151
- if (!O(d)) return;
152
- let f = l(i, a, e.properties.cullByVisibleRange), p = this.context;
153
- if (p.save(), u) {
154
- let e = u.rect.flatten(), t = u.clipX ? e.x : 0, n = u.clipY ? e.y : 0, r = u.clipX ? e.width : this.width, i = u.clipY ? e.height : this.height;
155
- p.beginPath(), p.rect(t, n, r, i), p.clip();
156
- }
157
- try {
158
- c(e, r, i, (t, n) => B(e, {
159
- context: p,
160
- coords: t,
161
- data: n,
162
- visibleBounds: d,
163
- anchorCullBounds: f,
164
- viewOpacity: e.unitView.getEffectiveOpacity(),
165
- warn: (t) => o(`${t} View: ${e.unitView.getPathString()}`)
166
- }), (t) => o(`Canvas2D could not resolve sample facet index ${t}. View: ${e.unitView.getPathString()}`));
167
- } finally {
168
- p.restore();
169
- }
170
- }
171
- get currentCoords() {
172
- let t = e(this.#e);
173
- if (!t) throw Error("No current view in Canvas2D rendering context.");
174
- return t.coords;
175
- }
176
- };
177
- //#endregion
178
- //#region ../core/src/rendering/canvas2d/renderCanvas2D.js
179
- function H(e) {
180
- let t = new V({ picking: !1 }, e);
181
- e.viewRoot.render(t, i.create(0, 0, e.width, e.height), { firstFacet: !0 });
182
- }
183
- //#endregion
184
- //#region ../core/src/rendering/canvas2d/canvas2DRenderCoordinator.js
185
- var U = class {
186
- constructor(e) {
187
- this.viewRoot = e.viewRoot, this.context = e.context, this.surface = e.surface, this.getBackground = e.getBackground, this.broadcast = e.broadcast, this.onLayoutComputed = e.onLayoutComputed;
188
- }
189
- computeLayout() {
190
- this.broadcast("layout"), this.surface.invalidateSize();
191
- let e = 5;
192
- for (;;) {
193
- if (this.#e(!1), !this.surface.invalidateSize()) {
194
- this.onLayoutComputed(), this.broadcast("layoutComputed");
195
- return;
196
- }
197
- if (e--, e == 0) throw Error("Layout did not settle: canvas size kept changing.");
198
- }
199
- }
200
- renderAll() {
201
- this.#e(!0);
202
- }
203
- #e(e) {
204
- let t = this.surface.getLogicalCanvasSize();
205
- isNaN(t.width) || isNaN(t.height) || H({
206
- viewRoot: this.viewRoot,
207
- context: this.context,
208
- width: t.width,
209
- height: t.height,
210
- devicePixelRatio: this.surface.getDevicePixelRatio(),
211
- background: this.getBackground(),
212
- paint: e
213
- });
214
- }
215
- }, W = class {
216
- #e;
217
- #t;
218
- constructor(e) {
219
- let t = document.createElement("canvas"), n = t.getContext("2d");
220
- if (!n) throw Error("Unable to initialize a Canvas2D rendering context.");
221
- this.canvas = t, this.context = n, e.container.appendChild(t);
222
- try {
223
- this.#e = new r(e.container, t, e.sizeSource, () => {
224
- this.#n() && e.onCanvasResize();
225
- }), this.#n();
226
- } catch (e) {
227
- throw this.#e?.finalize(), t.remove(), e;
228
- }
229
- }
230
- invalidateSize() {
231
- return this.#e.invalidate(), this.#n();
232
- }
233
- #n() {
234
- let e = this.getLogicalCanvasSize(), t = this.#e.getPhysicalCanvasSize(e);
235
- return this.#t?.logicalWidth == e.width && this.#t.logicalHeight == e.height && this.#t.physicalWidth == t.width && this.#t.physicalHeight == t.height ? !1 : (this.canvas.style.width = `${e.width}px`, this.canvas.style.height = `${e.height}px`, this.canvas.width = t.width, this.canvas.height = t.height, this.#t = {
236
- logicalWidth: e.width,
237
- logicalHeight: e.height,
238
- physicalWidth: t.width,
239
- physicalHeight: t.height
240
- }, !0);
241
- }
242
- getLogicalCanvasSize() {
243
- return this.#e.getLogicalCanvasSize();
244
- }
245
- getDevicePixelRatio() {
246
- return this.#e.getDevicePixelRatio();
247
- }
248
- finalize() {
249
- this.#e.finalize(), this.canvas.remove();
250
- }
251
- };
252
- //#endregion
253
- //#region ../core/src/rendering/canvas2d/rasterExport.js
254
- async function G(e) {
255
- let t = e.mimeType ?? "image/png";
256
- if (t != "image/png") throw Error(`Unsupported raster export MIME type: ${t}`);
257
- let n = q(e);
258
- return new Promise((e, r) => {
259
- n.toBlob((t) => {
260
- t ? e(t) : r(/* @__PURE__ */ Error("Canvas2D could not encode the raster export."));
261
- }, t);
262
- });
263
- }
264
- function K(e) {
265
- return q({
266
- ...e,
267
- pixelRatio: e.devicePixelRatio ?? e.pixelRatio
268
- }).toDataURL("image/png");
269
- }
270
- function q(e) {
271
- let t = e.logicalWidth ?? e.liveSize.width, n = e.logicalHeight ?? e.liveSize.height, r = e.pixelRatio ?? e.liveDevicePixelRatio, i = document.createElement("canvas");
272
- i.width = Math.floor(t * r), i.height = Math.floor(n * r);
273
- let a = i.getContext("2d");
274
- if (!a) throw Error("Unable to initialize a Canvas2D export context.");
275
- return H({
276
- viewRoot: e.viewRoot,
277
- context: a,
278
- width: t,
279
- height: n,
280
- devicePixelRatio: r,
281
- background: e.clearColor ?? null,
282
- paint: !0
283
- }), i;
284
- }
285
- //#endregion
286
- //#region ../core/src/rendering/canvas2d/index.js
287
- function J(e) {
288
- let t = new W(e);
289
- return {
290
- surface: t,
291
- glHelper: void 0,
292
- createRenderCoordinator: (e) => new U({
293
- ...e,
294
- surface: t,
295
- context: t.context
296
- }),
297
- exportCanvas: (e) => K({
298
- ...e,
299
- liveSize: t.getLogicalCanvasSize(),
300
- liveDevicePixelRatio: t.getDevicePixelRatio()
301
- }),
302
- exportRaster: (e) => G({
303
- ...e,
304
- liveSize: t.getLogicalCanvasSize(),
305
- liveDevicePixelRatio: t.getDevicePixelRatio()
306
- })
307
- };
308
- }
309
- //#endregion
310
- export { J as createCanvas2DRenderingBackend };
@@ -1,43 +0,0 @@
1
- //#region ../core/src/view/renderingContext/clipOptions.js
2
- function e(e) {
3
- if (e.clip) return e.clip;
4
- if (e.clipRect) return {
5
- rect: e.clipRect,
6
- clipX: !0,
7
- clipY: !0
8
- };
9
- }
10
- function t(e, t) {
11
- return e === t ? !0 : !e || !t ? !1 : e.clipX === t.clipX && e.clipY === t.clipY && e.rect.equals(t.rect);
12
- }
13
- function n(e, t, n) {
14
- return t || n ? {
15
- rect: e,
16
- clipX: t,
17
- clipY: n
18
- } : void 0;
19
- }
20
- function r(e, t) {
21
- return t ? t.clipX && t.clipY ? e.intersect(t.rect) : t.clipX ? e.intersectX(t.rect) : t.clipY ? e.intersectY(t.rect) : e : e;
22
- }
23
- function i(e, t) {
24
- if (!e) return t;
25
- if (!t) return e;
26
- let r = e.clipX || t.clipX, i = e.clipY || t.clipY, a = e.clipX && t.clipX ? e.rect.intersectX(t.rect) : t.clipX ? t.rect : e.rect, o = e.clipY && t.clipY ? e.rect.intersectY(t.rect) : t.clipY ? t.rect : e.rect;
27
- return n(e.rect.modify({
28
- x: () => a.x,
29
- y: () => o.y,
30
- width: () => a.width,
31
- height: () => o.height
32
- }), r, i);
33
- }
34
- function a(e, t) {
35
- if (e === !0) return n(t, !0, !0);
36
- if (e === "x") return n(t, !0, !1);
37
- if (e === "y") return n(t, !1, !0);
38
- }
39
- function o(e, t, n) {
40
- if (t !== "never") return i(e, a(t, n));
41
- }
42
- //#endregion
43
- export { e as a, n as i, t as n, o, i as r, r as t };
@@ -1,335 +0,0 @@
1
- //#region ../../node_modules/internmap/src/index.js
2
- var e = class extends Map {
3
- constructor(e, t = i) {
4
- if (super(), Object.defineProperties(this, {
5
- _intern: { value: /* @__PURE__ */ new Map() },
6
- _key: { value: t }
7
- }), e != null) for (let [t, n] of e) this.set(t, n);
8
- }
9
- get(e) {
10
- return super.get(t(this, e));
11
- }
12
- has(e) {
13
- return super.has(t(this, e));
14
- }
15
- set(e, t) {
16
- return super.set(n(this, e), t);
17
- }
18
- delete(e) {
19
- return super.delete(r(this, e));
20
- }
21
- };
22
- function t({ _intern: e, _key: t }, n) {
23
- let r = t(n);
24
- return e.has(r) ? e.get(r) : n;
25
- }
26
- function n({ _intern: e, _key: t }, n) {
27
- let r = t(n);
28
- return e.has(r) ? e.get(r) : (e.set(r, n), n);
29
- }
30
- function r({ _intern: e, _key: t }, n) {
31
- let r = t(n);
32
- return e.has(r) && (n = e.get(r), e.delete(r)), n;
33
- }
34
- function i(e) {
35
- return typeof e == "object" && e ? e.valueOf() : e;
36
- }
37
- //#endregion
38
- //#region ../../node_modules/d3-color/src/define.js
39
- function a(e, t, n) {
40
- e.prototype = t.prototype = n, n.constructor = e;
41
- }
42
- function o(e, t) {
43
- var n = Object.create(e.prototype);
44
- for (var r in t) n[r] = t[r];
45
- return n;
46
- }
47
- //#endregion
48
- //#region ../../node_modules/d3-color/src/color.js
49
- function s() {}
50
- var c = .7, l = 1 / c, u = "\\s*([+-]?\\d+)\\s*", d = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", f = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", p = /^#([0-9a-f]{3,8})$/, m = RegExp(`^rgb\\(${u},${u},${u}\\)$`), h = RegExp(`^rgb\\(${f},${f},${f}\\)$`), g = RegExp(`^rgba\\(${u},${u},${u},${d}\\)$`), _ = RegExp(`^rgba\\(${f},${f},${f},${d}\\)$`), v = RegExp(`^hsl\\(${d},${f},${f}\\)$`), y = RegExp(`^hsla\\(${d},${f},${f},${d}\\)$`), b = {
51
- aliceblue: 15792383,
52
- antiquewhite: 16444375,
53
- aqua: 65535,
54
- aquamarine: 8388564,
55
- azure: 15794175,
56
- beige: 16119260,
57
- bisque: 16770244,
58
- black: 0,
59
- blanchedalmond: 16772045,
60
- blue: 255,
61
- blueviolet: 9055202,
62
- brown: 10824234,
63
- burlywood: 14596231,
64
- cadetblue: 6266528,
65
- chartreuse: 8388352,
66
- chocolate: 13789470,
67
- coral: 16744272,
68
- cornflowerblue: 6591981,
69
- cornsilk: 16775388,
70
- crimson: 14423100,
71
- cyan: 65535,
72
- darkblue: 139,
73
- darkcyan: 35723,
74
- darkgoldenrod: 12092939,
75
- darkgray: 11119017,
76
- darkgreen: 25600,
77
- darkgrey: 11119017,
78
- darkkhaki: 12433259,
79
- darkmagenta: 9109643,
80
- darkolivegreen: 5597999,
81
- darkorange: 16747520,
82
- darkorchid: 10040012,
83
- darkred: 9109504,
84
- darksalmon: 15308410,
85
- darkseagreen: 9419919,
86
- darkslateblue: 4734347,
87
- darkslategray: 3100495,
88
- darkslategrey: 3100495,
89
- darkturquoise: 52945,
90
- darkviolet: 9699539,
91
- deeppink: 16716947,
92
- deepskyblue: 49151,
93
- dimgray: 6908265,
94
- dimgrey: 6908265,
95
- dodgerblue: 2003199,
96
- firebrick: 11674146,
97
- floralwhite: 16775920,
98
- forestgreen: 2263842,
99
- fuchsia: 16711935,
100
- gainsboro: 14474460,
101
- ghostwhite: 16316671,
102
- gold: 16766720,
103
- goldenrod: 14329120,
104
- gray: 8421504,
105
- green: 32768,
106
- greenyellow: 11403055,
107
- grey: 8421504,
108
- honeydew: 15794160,
109
- hotpink: 16738740,
110
- indianred: 13458524,
111
- indigo: 4915330,
112
- ivory: 16777200,
113
- khaki: 15787660,
114
- lavender: 15132410,
115
- lavenderblush: 16773365,
116
- lawngreen: 8190976,
117
- lemonchiffon: 16775885,
118
- lightblue: 11393254,
119
- lightcoral: 15761536,
120
- lightcyan: 14745599,
121
- lightgoldenrodyellow: 16448210,
122
- lightgray: 13882323,
123
- lightgreen: 9498256,
124
- lightgrey: 13882323,
125
- lightpink: 16758465,
126
- lightsalmon: 16752762,
127
- lightseagreen: 2142890,
128
- lightskyblue: 8900346,
129
- lightslategray: 7833753,
130
- lightslategrey: 7833753,
131
- lightsteelblue: 11584734,
132
- lightyellow: 16777184,
133
- lime: 65280,
134
- limegreen: 3329330,
135
- linen: 16445670,
136
- magenta: 16711935,
137
- maroon: 8388608,
138
- mediumaquamarine: 6737322,
139
- mediumblue: 205,
140
- mediumorchid: 12211667,
141
- mediumpurple: 9662683,
142
- mediumseagreen: 3978097,
143
- mediumslateblue: 8087790,
144
- mediumspringgreen: 64154,
145
- mediumturquoise: 4772300,
146
- mediumvioletred: 13047173,
147
- midnightblue: 1644912,
148
- mintcream: 16121850,
149
- mistyrose: 16770273,
150
- moccasin: 16770229,
151
- navajowhite: 16768685,
152
- navy: 128,
153
- oldlace: 16643558,
154
- olive: 8421376,
155
- olivedrab: 7048739,
156
- orange: 16753920,
157
- orangered: 16729344,
158
- orchid: 14315734,
159
- palegoldenrod: 15657130,
160
- palegreen: 10025880,
161
- paleturquoise: 11529966,
162
- palevioletred: 14381203,
163
- papayawhip: 16773077,
164
- peachpuff: 16767673,
165
- peru: 13468991,
166
- pink: 16761035,
167
- plum: 14524637,
168
- powderblue: 11591910,
169
- purple: 8388736,
170
- rebeccapurple: 6697881,
171
- red: 16711680,
172
- rosybrown: 12357519,
173
- royalblue: 4286945,
174
- saddlebrown: 9127187,
175
- salmon: 16416882,
176
- sandybrown: 16032864,
177
- seagreen: 3050327,
178
- seashell: 16774638,
179
- sienna: 10506797,
180
- silver: 12632256,
181
- skyblue: 8900331,
182
- slateblue: 6970061,
183
- slategray: 7372944,
184
- slategrey: 7372944,
185
- snow: 16775930,
186
- springgreen: 65407,
187
- steelblue: 4620980,
188
- tan: 13808780,
189
- teal: 32896,
190
- thistle: 14204888,
191
- tomato: 16737095,
192
- turquoise: 4251856,
193
- violet: 15631086,
194
- wheat: 16113331,
195
- white: 16777215,
196
- whitesmoke: 16119285,
197
- yellow: 16776960,
198
- yellowgreen: 10145074
199
- };
200
- a(s, T, {
201
- copy(e) {
202
- return Object.assign(new this.constructor(), this, e);
203
- },
204
- displayable() {
205
- return this.rgb().displayable();
206
- },
207
- hex: x,
208
- formatHex: x,
209
- formatHex8: S,
210
- formatHsl: C,
211
- formatRgb: w,
212
- toString: w
213
- });
214
- function x() {
215
- return this.rgb().formatHex();
216
- }
217
- function S() {
218
- return this.rgb().formatHex8();
219
- }
220
- function C() {
221
- return R(this).formatHsl();
222
- }
223
- function w() {
224
- return this.rgb().formatRgb();
225
- }
226
- function T(e) {
227
- var t, n;
228
- return e = (e + "").trim().toLowerCase(), (t = p.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? E(t) : n === 3 ? new A(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? D(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? D(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = m.exec(e)) ? new A(t[1], t[2], t[3], 1) : (t = h.exec(e)) ? new A(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = g.exec(e)) ? D(t[1], t[2], t[3], t[4]) : (t = _.exec(e)) ? D(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = v.exec(e)) ? L(t[1], t[2] / 100, t[3] / 100, 1) : (t = y.exec(e)) ? L(t[1], t[2] / 100, t[3] / 100, t[4]) : b.hasOwnProperty(e) ? E(b[e]) : e === "transparent" ? new A(NaN, NaN, NaN, 0) : null;
229
- }
230
- function E(e) {
231
- return new A(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
232
- }
233
- function D(e, t, n, r) {
234
- return r <= 0 && (e = t = n = NaN), new A(e, t, n, r);
235
- }
236
- function O(e) {
237
- return e instanceof s || (e = T(e)), e ? (e = e.rgb(), new A(e.r, e.g, e.b, e.opacity)) : new A();
238
- }
239
- function k(e, t, n, r) {
240
- return arguments.length === 1 ? O(e) : new A(e, t, n, r ?? 1);
241
- }
242
- function A(e, t, n, r) {
243
- this.r = +e, this.g = +t, this.b = +n, this.opacity = +r;
244
- }
245
- a(A, k, o(s, {
246
- brighter(e) {
247
- return e = e == null ? l : l ** +e, new A(this.r * e, this.g * e, this.b * e, this.opacity);
248
- },
249
- darker(e) {
250
- return e = e == null ? c : c ** +e, new A(this.r * e, this.g * e, this.b * e, this.opacity);
251
- },
252
- rgb() {
253
- return this;
254
- },
255
- clamp() {
256
- return new A(F(this.r), F(this.g), F(this.b), P(this.opacity));
257
- },
258
- displayable() {
259
- return -.5 <= this.r && this.r < 255.5 && -.5 <= this.g && this.g < 255.5 && -.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
260
- },
261
- hex: j,
262
- formatHex: j,
263
- formatHex8: M,
264
- formatRgb: N,
265
- toString: N
266
- }));
267
- function j() {
268
- return `#${I(this.r)}${I(this.g)}${I(this.b)}`;
269
- }
270
- function M() {
271
- return `#${I(this.r)}${I(this.g)}${I(this.b)}${I((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
272
- }
273
- function N() {
274
- let e = P(this.opacity);
275
- return `${e === 1 ? "rgb(" : "rgba("}${F(this.r)}, ${F(this.g)}, ${F(this.b)}${e === 1 ? ")" : `, ${e})`}`;
276
- }
277
- function P(e) {
278
- return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));
279
- }
280
- function F(e) {
281
- return Math.max(0, Math.min(255, Math.round(e) || 0));
282
- }
283
- function I(e) {
284
- return e = F(e), (e < 16 ? "0" : "") + e.toString(16);
285
- }
286
- function L(e, t, n, r) {
287
- return r <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new B(e, t, n, r);
288
- }
289
- function R(e) {
290
- if (e instanceof B) return new B(e.h, e.s, e.l, e.opacity);
291
- if (e instanceof s || (e = T(e)), !e) return new B();
292
- if (e instanceof B) return e;
293
- e = e.rgb();
294
- var t = e.r / 255, n = e.g / 255, r = e.b / 255, i = Math.min(t, n, r), a = Math.max(t, n, r), o = NaN, c = a - i, l = (a + i) / 2;
295
- return c ? (o = t === a ? (n - r) / c + (n < r) * 6 : n === a ? (r - t) / c + 2 : (t - n) / c + 4, c /= l < .5 ? a + i : 2 - a - i, o *= 60) : c = l > 0 && l < 1 ? 0 : o, new B(o, c, l, e.opacity);
296
- }
297
- function z(e, t, n, r) {
298
- return arguments.length === 1 ? R(e) : new B(e, t, n, r ?? 1);
299
- }
300
- function B(e, t, n, r) {
301
- this.h = +e, this.s = +t, this.l = +n, this.opacity = +r;
302
- }
303
- a(B, z, o(s, {
304
- brighter(e) {
305
- return e = e == null ? l : l ** +e, new B(this.h, this.s, this.l * e, this.opacity);
306
- },
307
- darker(e) {
308
- return e = e == null ? c : c ** +e, new B(this.h, this.s, this.l * e, this.opacity);
309
- },
310
- rgb() {
311
- var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, r = n + (n < .5 ? n : 1 - n) * t, i = 2 * n - r;
312
- return new A(U(e >= 240 ? e - 240 : e + 120, i, r), U(e, i, r), U(e < 120 ? e + 240 : e - 120, i, r), this.opacity);
313
- },
314
- clamp() {
315
- return new B(V(this.h), H(this.s), H(this.l), P(this.opacity));
316
- },
317
- displayable() {
318
- return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
319
- },
320
- formatHsl() {
321
- let e = P(this.opacity);
322
- return `${e === 1 ? "hsl(" : "hsla("}${V(this.h)}, ${H(this.s) * 100}%, ${H(this.l) * 100}%${e === 1 ? ")" : `, ${e})`}`;
323
- }
324
- }));
325
- function V(e) {
326
- return e = (e || 0) % 360, e < 0 ? e + 360 : e;
327
- }
328
- function H(e) {
329
- return Math.max(0, Math.min(1, e || 0));
330
- }
331
- function U(e, t, n) {
332
- return (e < 60 ? t + (n - t) * e / 60 : e < 180 ? n : e < 240 ? t + (n - t) * (240 - e) / 60 : t) * 255;
333
- }
334
- //#endregion
335
- export { c as a, O as c, e as d, T as i, a as l, A as n, z as o, l as r, k as s, s as t, o as u };