@graphysdk/react-renderer 0.0.1-experimental.1 → 0.0.1-experimental.2
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.
- package/dist/index.cjs +2 -2
- package/dist/index.css +1 -1
- package/dist/index.d.ts +83 -16
- package/dist/index.mjs +997 -967
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import './index.css';
|
|
2
|
-
import { jsx as a, jsxs as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import { jsx as a, jsxs as m, Fragment as T } from "react/jsx-runtime";
|
|
3
|
+
import re, { clsx as ce } from "clsx";
|
|
4
|
+
import bo, { useMemo as v, useState as E, useRef as C, useEffect as L, useCallback as mt, useContext as ee, createContext as fe, useId as vt, Fragment as hn, memo as oe } from "react";
|
|
5
5
|
import { useStore as Ce } from "zustand";
|
|
6
|
-
import { isGraphConfig as
|
|
6
|
+
import { isGraphConfig as xo, createCompiler as So, convertSpecToInput as ko, isCompilerCachingEnabled as Lo, setCompilerCachingEnabled as Co, COMPILER_STAGE_KEYS as yt, RESTING_HOVER_STATE as gn, HoverEngine as To, buildTooltipContent as wo, getDifferenceArrowDimensions as Ao, createHeadlineItemRows as pn, LayoutCompiler as Eo, BORDER_PRESET_GRADIENTS as _o, isSafeUrl as fn, SetContentCaptionCommand as Po, SetContentTitleCommand as Ho, SetContentSubtitleCommand as Fo, computeDirectLabelsLayout as No, buildFontString as Bo, CachedTextMeasurer as It, HeuristicTextMeasurer as Io, getColor as z, getAlpha as W, getSize as Re, toPercent as x, toViewBoxY as ze, toViewBoxX as Ge, createAreaPathGenerators as mn, createStableKeyGenerator as We, GROUP_VARIABLES as we, prepareAreaObservations as vn, resolveStrokeWidth as $e, getDashArray as Xe, getLineType as Ve, isDefined as yn, getGroup as bn, getX as ue, getYMax as Mo, getY as he, getXMax as Do, getBarRectBounds as xn, createLinePathGenerator as Sn, prepareLineObservations as kn, getStrokeWidth as Oo, buildAverageLineSymbols as Ro, formatRuleValue as zo, getAngleExtent as Ln, getRadiusExtent as Cn, buildPolarBarArcPath as Ie, getHoverGuideRectProps as Go, getHoverGuideLineProps as Wo, buildDataLabelsContent as $o, computeDifferenceArrow as Xo, computeFreeformArrow as Vo, createSegmentYReader as Uo, buildLayerYValueFormatter as Yo, formatLegends as jo, formatHeadline as qo, resolveHeadlinePlacement as Ko } from "@graphysdk/viz-engine";
|
|
7
7
|
import { createStore as bt } from "zustand/vanilla";
|
|
8
|
-
import { useMotionValue as
|
|
9
|
-
import { useShallow as
|
|
10
|
-
import { useI18n as J, IntlProvider as
|
|
11
|
-
import { useFloating as xt, offset as St, flip as kt, shift as Lt, autoUpdate as
|
|
12
|
-
import { Extension as
|
|
13
|
-
import { Bold as
|
|
8
|
+
import { useMotionValue as Tn, animate as Jo, motion as Y, useSpring as Mt, useReducedMotion as Zo } from "motion/react";
|
|
9
|
+
import { useShallow as j } from "zustand/react/shallow";
|
|
10
|
+
import { useI18n as J, IntlProvider as Qo } from "@graphysdk/i18n/react";
|
|
11
|
+
import { useFloating as xt, offset as St, flip as kt, shift as Lt, autoUpdate as ea } from "@floating-ui/react-dom";
|
|
12
|
+
import { Extension as ta } from "@tiptap/core";
|
|
13
|
+
import { Bold as wn } from "@tiptap/extension-bold";
|
|
14
14
|
import { Document as lt } from "@tiptap/extension-document";
|
|
15
|
-
import { HardBreak as
|
|
16
|
-
import { Heading as
|
|
17
|
-
import { Italic as
|
|
18
|
-
import { Link as
|
|
19
|
-
import { Text as
|
|
20
|
-
import { TextAlign as
|
|
21
|
-
import { TextStyle as
|
|
22
|
-
import { Underline as
|
|
23
|
-
import { UndoRedo as
|
|
24
|
-
import { Paragraph as
|
|
25
|
-
import { useEditorState as
|
|
15
|
+
import { HardBreak as An } from "@tiptap/extension-hard-break";
|
|
16
|
+
import { Heading as En } from "@tiptap/extension-heading";
|
|
17
|
+
import { Italic as _n } from "@tiptap/extension-italic";
|
|
18
|
+
import { Link as Pn } from "@tiptap/extension-link";
|
|
19
|
+
import { Text as Hn } from "@tiptap/extension-text";
|
|
20
|
+
import { TextAlign as Fn } from "@tiptap/extension-text-align";
|
|
21
|
+
import { TextStyle as Nn, Color as Bn, FontFamily as In } from "@tiptap/extension-text-style";
|
|
22
|
+
import { Underline as Mn } from "@tiptap/extension-underline";
|
|
23
|
+
import { UndoRedo as Dn, Placeholder as On } from "@tiptap/extensions";
|
|
24
|
+
import { Paragraph as na } from "@tiptap/extension-paragraph";
|
|
25
|
+
import { useEditorState as ra, EditorContent as oa, useEditor as aa } from "@tiptap/react";
|
|
26
26
|
import { Toolbar as H } from "@base-ui/react/toolbar";
|
|
27
27
|
import { Tooltip as le } from "@base-ui/react/tooltip";
|
|
28
|
-
import { createPortal as
|
|
29
|
-
import { assignInlineVars as
|
|
28
|
+
import { createPortal as ia } from "react-dom";
|
|
29
|
+
import { assignInlineVars as sa } from "@vanilla-extract/dynamic";
|
|
30
30
|
import { Popover as F } from "@base-ui/react/popover";
|
|
31
|
-
import { HexColorPicker as
|
|
31
|
+
import { HexColorPicker as la, HexColorInput as ca } from "react-colorful";
|
|
32
32
|
import { Menu as M } from "@base-ui/react/menu";
|
|
33
|
-
import { Toggle as
|
|
34
|
-
import { interpolatePath as
|
|
33
|
+
import { Toggle as da } from "@base-ui/react/toggle";
|
|
34
|
+
import { interpolatePath as ua } from "d3-interpolate-path";
|
|
35
35
|
import { getContrast as ct } from "color2k";
|
|
36
|
-
typeof window < "u" && (window.__GRAPHY_SDK__ ??= {}, window.__GRAPHY_SDK__.reactRenderer = "0.0.1-experimental.
|
|
37
|
-
const
|
|
36
|
+
typeof window < "u" && (window.__GRAPHY_SDK__ ??= {}, window.__GRAPHY_SDK__.reactRenderer = "0.0.1-experimental.2");
|
|
37
|
+
const ha = 5, ga = (e) => {
|
|
38
38
|
if (process.env.NODE_ENV === "production")
|
|
39
39
|
return {
|
|
40
40
|
emit: () => {
|
|
41
41
|
},
|
|
42
|
-
subscribe: () =>
|
|
42
|
+
subscribe: () => fa,
|
|
43
43
|
getLastTrigger: () => null,
|
|
44
44
|
getLastCompile: () => null,
|
|
45
45
|
getCacheStats: () => e.getCacheStats()
|
|
@@ -61,7 +61,7 @@ const ua = 5, ha = (e) => {
|
|
|
61
61
|
getLastCompile: () => e.getLastCompile(),
|
|
62
62
|
getCacheStats: () => e.getCacheStats()
|
|
63
63
|
};
|
|
64
|
-
},
|
|
64
|
+
}, pa = () => bt((e) => ({
|
|
65
65
|
lastCompile: null,
|
|
66
66
|
history: [],
|
|
67
67
|
nextId: 1,
|
|
@@ -70,19 +70,19 @@ const ua = 5, ha = (e) => {
|
|
|
70
70
|
if (r.lastSnapshot === n) return r;
|
|
71
71
|
const o = {
|
|
72
72
|
id: r.nextId,
|
|
73
|
-
label:
|
|
73
|
+
label: ma(t),
|
|
74
74
|
stages: n.stages,
|
|
75
75
|
durationMs: n.durationMs
|
|
76
76
|
};
|
|
77
77
|
return {
|
|
78
78
|
lastCompile: o,
|
|
79
|
-
history:
|
|
79
|
+
history: va(r.history, o, ha),
|
|
80
80
|
nextId: r.nextId + 1,
|
|
81
81
|
lastSnapshot: n
|
|
82
82
|
};
|
|
83
83
|
})
|
|
84
|
-
})),
|
|
85
|
-
},
|
|
84
|
+
})), fa = () => {
|
|
85
|
+
}, ma = (e) => {
|
|
86
86
|
switch (e.kind) {
|
|
87
87
|
case "init":
|
|
88
88
|
return "init";
|
|
@@ -93,18 +93,18 @@ const ua = 5, ha = (e) => {
|
|
|
93
93
|
case "command":
|
|
94
94
|
return e.command.metadata.description;
|
|
95
95
|
}
|
|
96
|
-
},
|
|
96
|
+
}, va = (e, t, n) => {
|
|
97
97
|
const r = e.length >= n ? e.length - (n - 1) : 0;
|
|
98
98
|
return [...e.slice(r), t];
|
|
99
|
-
},
|
|
99
|
+
}, ya = (e) => bt((t) => ({
|
|
100
100
|
compiled: e,
|
|
101
101
|
setCompiled: (n) => t((r) => r.compiled === n ? r : { compiled: n })
|
|
102
102
|
}));
|
|
103
|
-
function
|
|
104
|
-
const n =
|
|
103
|
+
function ba(e, t) {
|
|
104
|
+
const n = xo(e) ? e.themeOverrides : void 0;
|
|
105
105
|
return v(() => ({ ...t, ...n }), [t, n]);
|
|
106
106
|
}
|
|
107
|
-
const
|
|
107
|
+
const Rn = fe(null), rg = ({
|
|
108
108
|
data: e,
|
|
109
109
|
input: t,
|
|
110
110
|
formattingLocale: n,
|
|
@@ -114,70 +114,70 @@ const On = fe(null), Kh = ({
|
|
|
114
114
|
themeOverrides: c,
|
|
115
115
|
children: l
|
|
116
116
|
}) => {
|
|
117
|
-
const [d] = E(() =>
|
|
117
|
+
const [d] = E(() => So()), [u] = E(() => ga(d)), h = ba(t, c), g = v(() => ({ customPalettes: o, theme: i }), [o, i]), [p] = E(() => {
|
|
118
118
|
const k = d.compile({ input: t, data: e, ctx: g });
|
|
119
|
-
return u.emit({ kind: "init" }),
|
|
120
|
-
}),
|
|
119
|
+
return u.emit({ kind: "init" }), ya(k);
|
|
120
|
+
}), f = C({ input: t, data: e, ctx: g });
|
|
121
121
|
L(() => {
|
|
122
|
-
const k = t !==
|
|
122
|
+
const k = t !== f.current.input, w = e !== f.current.data, A = g !== f.current.ctx;
|
|
123
123
|
if (!k && !w && !A) return;
|
|
124
|
-
const I =
|
|
125
|
-
|
|
126
|
-
}, [t, e, g, d,
|
|
124
|
+
const I = p.getState(), _ = k || A ? d.compile({ input: t, data: e, ctx: g }) : d.recompile({ spec: I.compiled.spec, data: e });
|
|
125
|
+
f.current = { input: t, data: e, ctx: g }, I.setCompiled(_), u.emit({ kind: k ? "input" : "data" });
|
|
126
|
+
}, [t, e, g, d, p, u]);
|
|
127
127
|
const y = mt(
|
|
128
128
|
(k) => {
|
|
129
|
-
const w =
|
|
129
|
+
const w = p.getState(), A = k.apply(w.compiled.spec);
|
|
130
130
|
if (!A) return;
|
|
131
131
|
const I = d.recompile({ spec: A.spec });
|
|
132
132
|
if (w.setCompiled(I), u.emit({ kind: "command", command: k }), !r) return;
|
|
133
|
-
const _ =
|
|
134
|
-
|
|
133
|
+
const _ = ko(A.spec);
|
|
134
|
+
f.current = { input: _, data: f.current.data, ctx: f.current.ctx }, r(_);
|
|
135
135
|
},
|
|
136
|
-
[r, d, u,
|
|
136
|
+
[r, d, u, p]
|
|
137
137
|
), S = v(
|
|
138
|
-
() => ({ store:
|
|
139
|
-
[
|
|
138
|
+
() => ({ store: p, dispatch: y, formattingLocale: n, compileBus: u, theme: i, themeOverrides: h }),
|
|
139
|
+
[p, y, n, u, i, h]
|
|
140
140
|
);
|
|
141
|
-
return /* @__PURE__ */ a(
|
|
141
|
+
return /* @__PURE__ */ a(Rn.Provider, { value: S, children: l });
|
|
142
142
|
}, me = () => {
|
|
143
|
-
const e =
|
|
143
|
+
const e = ee(Rn);
|
|
144
144
|
if (!e) throw new Error("useGraph* hooks must be used inside a <GraphProvider>");
|
|
145
145
|
return e;
|
|
146
146
|
}, B = (e) => {
|
|
147
147
|
const { store: t } = me();
|
|
148
148
|
return Ce(t, (n) => e(n.compiled));
|
|
149
|
-
},
|
|
149
|
+
}, zn = () => {
|
|
150
150
|
const { dispatch: e } = me();
|
|
151
151
|
return e;
|
|
152
152
|
};
|
|
153
|
-
var
|
|
154
|
-
const
|
|
155
|
-
const { compileBus: r } = me(), [o] = E(() =>
|
|
153
|
+
var xa = "drqe3u0", Sa = "drqe3u1", ka = "drqe3u2", La = "drqe3u3", He = "drqe3u4", Ca = "drqe3u5", Ta = "drqe3u6", wa = "drqe3u7", et = "drqe3u8", Aa = "drqe3u9", Ea = "drqe3ua", _a = "drqe3ub", Pa = "drqe3uc", Ha = "drqe3ud", Fa = "drqe3ue", Na = "drqe3uf", Ba = "drqe3ug", Ia = "drqe3uh", Ma = "drqe3ui", Dt = { enabled: "drqe3uk drqe3uj", disabled: "drqe3ul drqe3uj" }, Ot = { ran: "drqe3un drqe3um", dim: "drqe3uo drqe3um" }, Gn = { ran: "drqe3uq drqe3up", cached: "drqe3ur drqe3up", untouched: "drqe3us drqe3up" };
|
|
154
|
+
const og = ({ width: e = 380, style: t, className: n } = {}) => {
|
|
155
|
+
const { compileBus: r } = me(), [o] = E(() => pa()), [i, c] = E(!1), [l, d] = E(Lo);
|
|
156
156
|
L(() => {
|
|
157
157
|
const { recordCompile: y } = o.getState(), S = r.getLastTrigger(), k = r.getLastCompile();
|
|
158
158
|
return S && k && y(S, k), r.subscribe(y);
|
|
159
159
|
}, [o, r]);
|
|
160
|
-
const u = Ce(o, (y) => y.lastCompile), h = Ce(o, (y) => y.history), g = r.getCacheStats(),
|
|
160
|
+
const u = Ce(o, (y) => y.lastCompile), h = Ce(o, (y) => y.history), g = r.getCacheStats(), p = u === null && h.length === 0, f = () => {
|
|
161
161
|
d((y) => {
|
|
162
162
|
const S = !y;
|
|
163
|
-
return
|
|
163
|
+
return Co(S), S;
|
|
164
164
|
});
|
|
165
165
|
};
|
|
166
|
-
return /* @__PURE__ */
|
|
167
|
-
/* @__PURE__ */
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
-
/* @__PURE__ */ a("div", { className:
|
|
170
|
-
/* @__PURE__ */ a("div", { className:
|
|
166
|
+
return /* @__PURE__ */ m("div", { className: re(Ea, n), style: { width: e, ...t }, children: [
|
|
167
|
+
/* @__PURE__ */ m("div", { className: xa, children: [
|
|
168
|
+
/* @__PURE__ */ m("div", { children: [
|
|
169
|
+
/* @__PURE__ */ a("div", { className: Sa, children: "compile cache" }),
|
|
170
|
+
/* @__PURE__ */ a("div", { className: Fa, children: p ? "production: stats disabled" : u ? `last: ${u.label} · ${Wn(u.durationMs)}` : "awaiting first compile…" })
|
|
171
171
|
] }),
|
|
172
|
-
/* @__PURE__ */ a("button", { type: "button", onClick: () => c((y) => !y), className:
|
|
172
|
+
/* @__PURE__ */ a("button", { type: "button", onClick: () => c((y) => !y), className: Na, children: i ? "▾" : "▴" })
|
|
173
173
|
] }),
|
|
174
|
-
!i && /* @__PURE__ */
|
|
175
|
-
/* @__PURE__ */
|
|
174
|
+
!i && /* @__PURE__ */ m("div", { className: _a, children: [
|
|
175
|
+
/* @__PURE__ */ m(
|
|
176
176
|
"button",
|
|
177
177
|
{
|
|
178
178
|
type: "button",
|
|
179
|
-
onClick:
|
|
180
|
-
className: l ?
|
|
179
|
+
onClick: f,
|
|
180
|
+
className: l ? Dt.enabled : Dt.disabled,
|
|
181
181
|
"aria-pressed": l,
|
|
182
182
|
children: [
|
|
183
183
|
"cache ",
|
|
@@ -185,63 +185,63 @@ const Jh = ({ width: e = 380, style: t, className: n } = {}) => {
|
|
|
185
185
|
]
|
|
186
186
|
}
|
|
187
187
|
),
|
|
188
|
-
/* @__PURE__ */ a("span", { className:
|
|
188
|
+
/* @__PURE__ */ a("span", { className: Ba, children: "next compile reflects this toggle" })
|
|
189
189
|
] }),
|
|
190
|
-
!i && !
|
|
191
|
-
/* @__PURE__ */ a(
|
|
192
|
-
/* @__PURE__ */ a(
|
|
190
|
+
!i && !p && /* @__PURE__ */ m(T, { children: [
|
|
191
|
+
/* @__PURE__ */ a(Da, { delta: u?.stages, cumulative: g }),
|
|
192
|
+
/* @__PURE__ */ a(Oa, { entries: h })
|
|
193
193
|
] })
|
|
194
194
|
] });
|
|
195
|
-
},
|
|
196
|
-
/* @__PURE__ */ a("thead", { children: /* @__PURE__ */
|
|
197
|
-
/* @__PURE__ */ a("th", { className:
|
|
195
|
+
}, Da = ({ delta: e, cumulative: t }) => /* @__PURE__ */ m("table", { className: ka, children: [
|
|
196
|
+
/* @__PURE__ */ a("thead", { children: /* @__PURE__ */ m("tr", { className: Ia, children: [
|
|
197
|
+
/* @__PURE__ */ a("th", { className: La, children: "stage" }),
|
|
198
198
|
/* @__PURE__ */ a("th", { className: He, children: "Δ miss" }),
|
|
199
199
|
/* @__PURE__ */ a("th", { className: He, children: "Δ hit" }),
|
|
200
200
|
/* @__PURE__ */ a("th", { className: He, children: "total miss" }),
|
|
201
201
|
/* @__PURE__ */ a("th", { className: He, children: "total hit" })
|
|
202
202
|
] }) }),
|
|
203
203
|
/* @__PURE__ */ a("tbody", { children: yt.map((n) => {
|
|
204
|
-
const r = e?.[n], o =
|
|
205
|
-
return /* @__PURE__ */
|
|
206
|
-
/* @__PURE__ */
|
|
207
|
-
/* @__PURE__ */ a("span", { className:
|
|
204
|
+
const r = e?.[n], o = Ra(r);
|
|
205
|
+
return /* @__PURE__ */ m("tr", { className: Pa, children: [
|
|
206
|
+
/* @__PURE__ */ m("td", { className: Ca, children: [
|
|
207
|
+
/* @__PURE__ */ a("span", { className: Gn[o], "aria-hidden": !0 }),
|
|
208
208
|
" ",
|
|
209
209
|
n
|
|
210
210
|
] }),
|
|
211
|
-
/* @__PURE__ */ a("td", { className: o === "ran" ?
|
|
211
|
+
/* @__PURE__ */ a("td", { className: o === "ran" ? Ot.ran : Ot.dim, children: r?.misses ?? 0 }),
|
|
212
212
|
/* @__PURE__ */ a("td", { className: et, children: r?.hits ?? 0 }),
|
|
213
213
|
/* @__PURE__ */ a("td", { className: et, children: t[n].misses }),
|
|
214
214
|
/* @__PURE__ */ a("td", { className: et, children: t[n].hits })
|
|
215
215
|
] }, n);
|
|
216
216
|
}) })
|
|
217
|
-
] }),
|
|
218
|
-
/* @__PURE__ */ a("div", { className:
|
|
217
|
+
] }), Oa = ({ entries: e }) => e.length === 0 ? null : /* @__PURE__ */ m("div", { className: Ha, children: [
|
|
218
|
+
/* @__PURE__ */ a("div", { className: Ma, children: "recent compiles" }),
|
|
219
219
|
e.map((t) => {
|
|
220
|
-
const n =
|
|
221
|
-
return /* @__PURE__ */
|
|
222
|
-
/* @__PURE__ */ a("span", { className:
|
|
223
|
-
/* @__PURE__ */ a("span", { className:
|
|
224
|
-
/* @__PURE__ */
|
|
220
|
+
const n = za(t.stages, (i) => i.misses > 0), r = yt.length;
|
|
221
|
+
return /* @__PURE__ */ m("div", { className: Ta, children: [
|
|
222
|
+
/* @__PURE__ */ a("span", { className: Gn[n === 0 ? "cached" : "ran"], "aria-hidden": !0 }),
|
|
223
|
+
/* @__PURE__ */ a("span", { className: wa, title: t.label, children: t.label }),
|
|
224
|
+
/* @__PURE__ */ m("span", { className: Aa, children: [
|
|
225
225
|
n,
|
|
226
226
|
"/",
|
|
227
227
|
r,
|
|
228
228
|
" ran · ",
|
|
229
|
-
|
|
229
|
+
Wn(t.durationMs)
|
|
230
230
|
] })
|
|
231
231
|
] }, t.id);
|
|
232
232
|
})
|
|
233
|
-
] }),
|
|
233
|
+
] }), Ra = (e) => !e || e.hits === 0 && e.misses === 0 ? "untouched" : e.misses > 0 ? "ran" : "cached", za = (e, t) => {
|
|
234
234
|
let n = 0;
|
|
235
235
|
for (const r of yt)
|
|
236
236
|
t(e[r]) && (n += 1);
|
|
237
237
|
return n;
|
|
238
|
-
},
|
|
239
|
-
hover:
|
|
238
|
+
}, Wn = (e) => e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, Ga = () => bt((e) => ({
|
|
239
|
+
hover: gn,
|
|
240
240
|
setHoverState: (t) => e((n) => n.hover === t ? n : { hover: t })
|
|
241
|
-
})),
|
|
242
|
-
const n = v(() => ({ layers: e, coordSystem: t }), [e, t]), r =
|
|
243
|
-
r.current === null && (r.current = new
|
|
244
|
-
const o = r.current, i =
|
|
241
|
+
})), Wa = (e, t) => {
|
|
242
|
+
const n = v(() => ({ layers: e, coordSystem: t }), [e, t]), r = C(null);
|
|
243
|
+
r.current === null && (r.current = new To(n));
|
|
244
|
+
const o = r.current, i = C(!1);
|
|
245
245
|
return L(() => {
|
|
246
246
|
if (!i.current) {
|
|
247
247
|
i.current = !0;
|
|
@@ -249,37 +249,37 @@ const Jh = ({ width: e = 380, style: t, className: n } = {}) => {
|
|
|
249
249
|
}
|
|
250
250
|
o.update(n);
|
|
251
251
|
}, [o, n]), o;
|
|
252
|
-
},
|
|
252
|
+
}, $n = fe(null), $a = ({ children: e }) => {
|
|
253
253
|
const { layers: t, coordSystem: n } = B(
|
|
254
|
-
|
|
255
|
-
), r =
|
|
256
|
-
return c.current === null && (c.current = { engine: r, store: o, overlayRef: i }), /* @__PURE__ */ a(
|
|
254
|
+
j((l) => ({ layers: l.layers, coordSystem: l.coordSystem }))
|
|
255
|
+
), r = Wa(t, n), [o] = E(() => Ga()), i = C(null), c = C(null);
|
|
256
|
+
return c.current === null && (c.current = { engine: r, store: o, overlayRef: i }), /* @__PURE__ */ a($n.Provider, { value: c.current, children: e });
|
|
257
257
|
}, Ue = () => {
|
|
258
|
-
const e =
|
|
258
|
+
const e = ee($n);
|
|
259
259
|
if (e === null)
|
|
260
260
|
throw new Error("useHoverContext must be used inside a <HoverProvider>.");
|
|
261
261
|
return e;
|
|
262
262
|
};
|
|
263
|
-
var
|
|
264
|
-
const
|
|
263
|
+
var Xa = "_2qyyu60";
|
|
264
|
+
const Rt = 2, Va = 12, Ua = 12, zt = 1, Gt = 2, Ya = 4, Ye = ({
|
|
265
265
|
shape: e,
|
|
266
266
|
color: t,
|
|
267
267
|
lineType: n = "solid",
|
|
268
|
-
width: r =
|
|
269
|
-
height: o =
|
|
268
|
+
width: r = Va,
|
|
269
|
+
height: o = Ua
|
|
270
270
|
}) => /* @__PURE__ */ a(
|
|
271
271
|
"svg",
|
|
272
272
|
{
|
|
273
|
-
className:
|
|
273
|
+
className: Xa,
|
|
274
274
|
width: r,
|
|
275
275
|
height: o,
|
|
276
276
|
viewBox: `0 0 ${r} ${o}`,
|
|
277
277
|
"aria-hidden": !0,
|
|
278
278
|
"data-testid": "chart-swatch",
|
|
279
279
|
"data-shape": e,
|
|
280
|
-
children:
|
|
280
|
+
children: ja({ shape: e, color: t, lineType: n, width: r, height: o })
|
|
281
281
|
}
|
|
282
|
-
),
|
|
282
|
+
), ja = ({ shape: e, color: t, lineType: n, width: r, height: o }) => {
|
|
283
283
|
const i = qa(n, r);
|
|
284
284
|
switch (e) {
|
|
285
285
|
case "square":
|
|
@@ -293,7 +293,7 @@ const Ot = 2, Xa = 12, Va = 12, Rt = 1, zt = 2, Ua = 4, Ye = ({
|
|
|
293
293
|
x2: i.x2,
|
|
294
294
|
y2: o / 2,
|
|
295
295
|
stroke: t,
|
|
296
|
-
strokeWidth:
|
|
296
|
+
strokeWidth: Rt,
|
|
297
297
|
strokeLinecap: i.linecap,
|
|
298
298
|
strokeDasharray: i.dashArray
|
|
299
299
|
}
|
|
@@ -304,7 +304,7 @@ const Ot = 2, Xa = 12, Va = 12, Rt = 1, zt = 2, Ua = 4, Ye = ({
|
|
|
304
304
|
}
|
|
305
305
|
case "area": {
|
|
306
306
|
const c = o / 2 - 1;
|
|
307
|
-
return /* @__PURE__ */
|
|
307
|
+
return /* @__PURE__ */ m(T, { children: [
|
|
308
308
|
/* @__PURE__ */ a("rect", { x: 1, y: c, width: r - 2, height: o - c - 1, fill: t, opacity: 0.45 }),
|
|
309
309
|
/* @__PURE__ */ a(
|
|
310
310
|
"line",
|
|
@@ -314,7 +314,7 @@ const Ot = 2, Xa = 12, Va = 12, Rt = 1, zt = 2, Ua = 4, Ye = ({
|
|
|
314
314
|
x2: i.x2,
|
|
315
315
|
y2: c,
|
|
316
316
|
stroke: t,
|
|
317
|
-
strokeWidth:
|
|
317
|
+
strokeWidth: Rt,
|
|
318
318
|
strokeLinecap: i.linecap,
|
|
319
319
|
strokeDasharray: i.dashArray
|
|
320
320
|
}
|
|
@@ -328,22 +328,36 @@ const Ot = 2, Xa = 12, Va = 12, Rt = 1, zt = 2, Ua = 4, Ye = ({
|
|
|
328
328
|
if (e === "solid")
|
|
329
329
|
return { x1: 0, x2: t, dashArray: void 0, linecap: "round" };
|
|
330
330
|
if (e === "dashed") {
|
|
331
|
-
const r = (t -
|
|
332
|
-
return { x1: 0, x2: t, dashArray: `${r} ${
|
|
331
|
+
const r = (t - zt * (Gt - 1)) / Gt;
|
|
332
|
+
return { x1: 0, x2: t, dashArray: `${r} ${zt}`, linecap: "butt" };
|
|
333
333
|
}
|
|
334
|
-
const n = t / (
|
|
334
|
+
const n = t / (Ya - 1);
|
|
335
335
|
return { x1: 0, x2: t, dashArray: `1 ${n}`, linecap: "round" };
|
|
336
|
-
},
|
|
337
|
-
function
|
|
338
|
-
|
|
336
|
+
}, Xn = Object.freeze({}), Ct = fe(Xn), Ka = ({ slots: e, children: t }) => /* @__PURE__ */ a(Ct.Provider, { value: e ?? Xn, children: t });
|
|
337
|
+
function Q(e, t) {
|
|
338
|
+
const n = ee(Ct)[e];
|
|
339
|
+
return n === void 0 ? t : typeof n == "object" && Za(n) ? n.render : n;
|
|
339
340
|
}
|
|
340
|
-
function
|
|
341
|
+
function Ja() {
|
|
342
|
+
const e = ee(Ct);
|
|
343
|
+
return {
|
|
344
|
+
measureAxis: e.AxisTicks?.measure,
|
|
345
|
+
measureAxisLabel: e.AxisLabel?.measure,
|
|
346
|
+
measureLegend: e.Legend?.measure,
|
|
347
|
+
measureHeadline: e.Headline?.measure.measureHeadline,
|
|
348
|
+
measureHeadlineItemWidths: e.Headline?.measure.measureHeadlineItemWidths
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
function Za(e) {
|
|
352
|
+
return "render" in e && typeof e.render == "function";
|
|
353
|
+
}
|
|
354
|
+
function Tt(e) {
|
|
341
355
|
const { store: t } = Ue();
|
|
342
356
|
return Ce(t, e);
|
|
343
357
|
}
|
|
344
|
-
var
|
|
345
|
-
const
|
|
346
|
-
const { overlayRef: t } = Ue(), n =
|
|
358
|
+
var Qa = "_19519k80", ei = "_19519k81", ti = "_19519k82", ni = "_19519k83", ri = "_19519k85", oi = "_19519k86", ai = "_19519k87", ii = "_19519k88", si = "_19519k89";
|
|
359
|
+
const li = (e) => {
|
|
360
|
+
const { overlayRef: t } = Ue(), n = C(null), [r, o] = E(!1), i = C(e);
|
|
347
361
|
return i.current = e, L(() => {
|
|
348
362
|
const c = t.current;
|
|
349
363
|
if (!c) return;
|
|
@@ -356,7 +370,7 @@ const ai = (e) => {
|
|
|
356
370
|
c.removeEventListener("pointermove", l), c.removeEventListener("pointerleave", d);
|
|
357
371
|
};
|
|
358
372
|
}, [t]), { cursorRef: n, isInside: r };
|
|
359
|
-
},
|
|
373
|
+
}, ci = 16, di = 8, ui = {
|
|
360
374
|
x: 0,
|
|
361
375
|
y: 0,
|
|
362
376
|
top: 0,
|
|
@@ -366,49 +380,49 @@ const ai = (e) => {
|
|
|
366
380
|
width: 0,
|
|
367
381
|
height: 0,
|
|
368
382
|
toJSON: () => ({})
|
|
369
|
-
},
|
|
383
|
+
}, hi = () => {
|
|
370
384
|
const e = B(
|
|
371
|
-
|
|
372
|
-
layers:
|
|
373
|
-
coordSystem:
|
|
374
|
-
scales:
|
|
375
|
-
guides:
|
|
376
|
-
numberFormat:
|
|
377
|
-
parsingLocale:
|
|
385
|
+
j((f) => ({
|
|
386
|
+
layers: f.layers,
|
|
387
|
+
coordSystem: f.coordSystem,
|
|
388
|
+
scales: f.scales,
|
|
389
|
+
guides: f.guides,
|
|
390
|
+
numberFormat: f.config.numberFormat,
|
|
391
|
+
parsingLocale: f.config.parsingLocale
|
|
378
392
|
}))
|
|
379
|
-
), { formattingLocale: t } = me(), n =
|
|
380
|
-
}), { cursorRef: i, isInside: c } =
|
|
381
|
-
() =>
|
|
393
|
+
), { formattingLocale: t } = me(), n = Tt((f) => f.hover), r = Q("Tooltip", gi), o = C(() => {
|
|
394
|
+
}), { cursorRef: i, isInside: c } = li(() => o.current()), l = v(
|
|
395
|
+
() => wo({ ...e, hover: n, formattingLocale: t }),
|
|
382
396
|
[e, n, t]
|
|
383
397
|
), d = l !== null && c, u = v(
|
|
384
398
|
() => ({
|
|
385
399
|
getBoundingClientRect: () => {
|
|
386
|
-
const
|
|
387
|
-
return
|
|
400
|
+
const f = i.current;
|
|
401
|
+
return f === null ? ui : pi(f);
|
|
388
402
|
}
|
|
389
403
|
}),
|
|
390
404
|
[i]
|
|
391
|
-
), { refs: h, floatingStyles: g, update:
|
|
405
|
+
), { refs: h, floatingStyles: g, update: p } = xt({
|
|
392
406
|
open: d,
|
|
393
407
|
placement: "right",
|
|
394
|
-
middleware: [St(
|
|
408
|
+
middleware: [St(ci), kt(), Lt({ padding: di })],
|
|
395
409
|
elements: { reference: u }
|
|
396
410
|
});
|
|
397
|
-
return o.current =
|
|
411
|
+
return o.current = p, d ? /* @__PURE__ */ a(
|
|
398
412
|
"div",
|
|
399
413
|
{
|
|
400
414
|
ref: h.setFloating,
|
|
401
415
|
role: "tooltip",
|
|
402
|
-
className:
|
|
416
|
+
className: ii,
|
|
403
417
|
style: g,
|
|
404
418
|
"data-testid": "chart-tooltip",
|
|
405
419
|
children: /* @__PURE__ */ a(r, { content: l, isVisible: d })
|
|
406
420
|
}
|
|
407
421
|
) : null;
|
|
408
|
-
},
|
|
409
|
-
e.header !== null && /* @__PURE__ */ a("div", { className:
|
|
410
|
-
/* @__PURE__ */ a("div", { className:
|
|
411
|
-
] }) : null,
|
|
422
|
+
}, gi = ({ content: e, isVisible: t }) => t ? /* @__PURE__ */ m("div", { className: si, children: [
|
|
423
|
+
e.header !== null && /* @__PURE__ */ a("div", { className: Qa, children: e.header }),
|
|
424
|
+
/* @__PURE__ */ a("div", { className: ei, children: e.rows.map((n) => /* @__PURE__ */ a(fi, { row: n, shouldHighlight: n.isPrimary && e.rows.length > 1 }, n.key)) })
|
|
425
|
+
] }) : null, pi = (e) => ({
|
|
412
426
|
x: e.clientX,
|
|
413
427
|
y: e.clientY,
|
|
414
428
|
top: e.clientY,
|
|
@@ -418,14 +432,14 @@ const ai = (e) => {
|
|
|
418
432
|
width: 0,
|
|
419
433
|
height: 0,
|
|
420
434
|
toJSON: () => ({})
|
|
421
|
-
}),
|
|
422
|
-
e.swatchColor === null ? /* @__PURE__ */ a("span", { className:
|
|
423
|
-
/* @__PURE__ */ a("span", { className:
|
|
424
|
-
/* @__PURE__ */ a("span", { className:
|
|
435
|
+
}), fi = ({ row: e, shouldHighlight: t }) => /* @__PURE__ */ m("div", { className: re(ti, { [ni]: t }), "data-testid": "chart-tooltip-row", children: [
|
|
436
|
+
e.swatchColor === null ? /* @__PURE__ */ a("span", { className: ri, "aria-hidden": !0 }) : /* @__PURE__ */ a(Ye, { shape: e.swatchShape, color: e.swatchColor, lineType: e.swatchLineType }),
|
|
437
|
+
/* @__PURE__ */ a("span", { className: oi, children: e.label }),
|
|
438
|
+
/* @__PURE__ */ a("span", { className: ai, children: e.value })
|
|
425
439
|
] });
|
|
426
|
-
var Vn = ["canvasDefault", "canvasBlue", "canvasCyan", "canvasGreen", "canvasYellow", "canvasOrange", "canvasRed", "canvasPink", "canvasPurple", "canvasGray", "canvasInverse"], s = { white: "var(--graphy-white)", black: "var(--graphy-black)", transparent: "var(--graphy-transparent)", grey100: "var(--graphy-grey-100)", grey95: "var(--graphy-grey-95)", grey90: "var(--graphy-grey-90)", grey85: "var(--graphy-grey-85)", grey80: "var(--graphy-grey-80)", grey75: "var(--graphy-grey-75)", grey70: "var(--graphy-grey-70)", grey60: "var(--graphy-grey-60)", grey50: "var(--graphy-grey-50)", grey0: "var(--graphy-grey-0)", greyGradient80: "var(--graphy-grey-gradient-80)", green60: "var(--graphy-green-60)", green50: "var(--graphy-green-50)", red60: "var(--graphy-red-60)", red50: "var(--graphy-red-50)", amber70: "var(--graphy-amber-70)", amber50: "var(--graphy-amber-50)", amber40: "var(--graphy-amber-40)", amber30: "var(--graphy-amber-30)", blue80: "var(--graphy-blue-80)", blue60: "var(--graphy-blue-60)", purple50: "var(--graphy-purple-50)", purple30: "var(--graphy-purple-30)", brand: "var(--graphy-brand)", success: "var(--graphy-success)", warning: "var(--graphy-warning)", alert: "var(--graphy-alert)", textPrimary: "var(--graphy-text-primary)", textSecondary: "var(--graphy-text-secondary)", textDisabled: "var(--graphy-text-disabled)", iconPrimary: "var(--graphy-icon-primary)", iconSecondary: "var(--graphy-icon-secondary)", iconStickerBackground: "var(--graphy-icon-sticker-background)", border100: "var(--graphy-border-100)", border50: "var(--graphy-border-50)", border10: "var(--graphy-border-10)", sunkenBackground: "var(--graphy-sunken-background)", defaultBackground: "var(--graphy-default-background)", raisedBackground: "var(--graphy-raised-background)", overlayBackground: "var(--graphy-overlay-background)", overlayBorderGradient: "var(--graphy-overlay-border-gradient)", graphBackground: "var(--graphy-graph-background)", gridLineColor: "var(--graphy-grid-line-color)", originLineColor: "var(--graphy-origin-line-color)", targetLineColor: "var(--graphy-target-line-color)", targetLineMarkerColor: "var(--graphy-target-line-marker-color)", targetLineLabelTextColor: "var(--graphy-target-line-label-text-color)", legendBackground: "var(--graphy-legend-background)", legendBorderColor: "var(--graphy-legend-border-color)", legendFocusOutlineColor: "var(--graphy-legend-focus-outline-color)", legendTextColor: "var(--graphy-legend-text-color)", dimmedSeriesLabelTextColor: "var(--graphy-dimmed-series-label-text-color)", dimmedSeriesLabelLineColor: "var(--graphy-dimmed-series-label-line-color)", trendNegativeColor: "var(--graphy-trend-negative-color)", trendPositiveColor: "var(--graphy-trend-positive-color)", trendNeutralColor: "var(--graphy-trend-neutral-color)", defaultAnnotationArrowStroke: "var(--graphy-default-annotation-arrow-stroke)", defaultAnnotationShapeStroke: "var(--graphy-default-annotation-shape-stroke)", defaultAnnotationShapeFill: "var(--graphy-default-annotation-shape-fill)", arrowAnnotationStickerOutlineColor: "var(--graphy-arrow-annotation-sticker-outline-color)", arrowAnnotationStickerOutlineColorInverse: "var(--graphy-arrow-annotation-sticker-outline-color-inverse)", annotationFrameBorderColor: "var(--graphy-annotation-frame-border-color)", annotationMenuTriggerIconColor: "var(--graphy-annotation-menu-trigger-icon-color)", heatmapEmptyTileBackground: "var(--graphy-heatmap-empty-tile-background)", dataLabelOutsideBackground: "var(--graphy-data-label-outside-background)", gridLineWidth: "var(--graphy-grid-line-width)", gridLineDash: "var(--graphy-grid-line-dash)", tooltipBorderRadius: "var(--graphy-tooltip-border-radius)", tooltipPaddingBlock: "var(--graphy-tooltip-padding-block)", tooltipPaddingInline: "var(--graphy-tooltip-padding-inline)", tooltipShadow: "var(--graphy-tooltip-shadow)", tickLabelOffset: "var(--graphy-tick-label-offset)", legendItemGap: "var(--graphy-legend-item-gap)", legendSwatchGap: "var(--graphy-legend-swatch-gap)", legendSwatchWidth: "var(--graphy-legend-swatch-width)", legendSwatchHeight: "var(--graphy-legend-swatch-height)", legendPillPaddingInline: "var(--graphy-legend-pill-padding-inline)", legendPillPaddingBlock: "var(--graphy-legend-pill-padding-block)", legendPillBorderWidth: "var(--graphy-legend-pill-border-width)", headlineRowGap: "var(--graphy-headline-row-gap)", headlineItemGap: "var(--graphy-headline-item-gap)", canvasDefault: "var(--graphy-canvas-default)", canvasBlue: "var(--graphy-canvas-blue)", canvasCyan: "var(--graphy-canvas-cyan)", canvasGreen: "var(--graphy-canvas-green)", canvasYellow: "var(--graphy-canvas-yellow)", canvasOrange: "var(--graphy-canvas-orange)", canvasRed: "var(--graphy-canvas-red)", canvasPink: "var(--graphy-canvas-pink)", canvasPurple: "var(--graphy-canvas-purple)", canvasGray: "var(--graphy-canvas-gray)", canvasInverse: "var(--graphy-canvas-inverse)", elevationXs: "var(--graphy-elevation-xs)", elevationSm: "var(--graphy-elevation-sm)", elevationMd: "var(--graphy-elevation-md)", elevationLg: "var(--graphy-elevation-lg)", radiiXs: "var(--graphy-radii-xs)", radiiSm: "var(--graphy-radii-sm)", radiiMd: "var(--graphy-radii-md)", radiiLg: "var(--graphy-radii-lg)", spaceXxs: "var(--graphy-space-xxs)", spaceXs: "var(--graphy-space-xs)", spaceSm: "var(--graphy-space-sm)", spaceMd: "var(--graphy-space-md)", spaceLg: "var(--graphy-space-lg)", spaceXl: "var(--graphy-space-xl)", zIndexToolbar: "var(--graphy-z-index-toolbar)", zIndexToolbarTooltip: "var(--graphy-z-index-toolbar-tooltip)", zIndexToolbarPopover: "var(--graphy-z-index-toolbar-popover)", toolbarBackgroundColor: "var(--graphy-toolbar-background-color)", toolbarButtonBackgroundColor: "var(--graphy-toolbar-button-background-color)", toolbarButtonBackgroundColorHovered: "var(--graphy-toolbar-button-background-color-hovered)", toolbarButtonBackgroundColorSelected: "var(--graphy-toolbar-button-background-color-selected)", toolbarSeparatorColor: "var(--graphy-toolbar-separator-color)", tooltipBackground: "var(--graphy-tooltip-background)", tooltipBorderColor: "var(--graphy-tooltip-border-color)", tooltipHeadingTextColor: "var(--graphy-tooltip-heading-text-color)", tooltipLabelTextColor: "var(--graphy-tooltip-label-text-color)", tooltipValueTextColor: "var(--graphy-tooltip-value-text-color)", tooltipPrimaryRowColor: "var(--graphy-tooltip-primary-row-color)", hoverGuideLineColor: "var(--graphy-hover-guide-line-color)", hoverGuideFillColor: "var(--graphy-hover-guide-fill-color)", hoveredBarBorderColor: "var(--graphy-hovered-bar-border-color)", hoveredPointRingColor: "var(--graphy-hovered-point-ring-color)", pointStrokeColor: "var(--graphy-point-stroke-color)", stackedBarHoverBorderColor: "var(--graphy-stacked-bar-hover-border-color)", fontFamilyDefault: "var(--graphy-font-family-default)", fontFamilyHeading: "var(--graphy-font-family-heading)", fontWeightRegular: "var(--graphy-font-weight-regular)", fontWeightMedium: "var(--graphy-font-weight-medium)", fontWeightSemibold: "var(--graphy-font-weight-semibold)", fontWeightBold: "var(--graphy-font-weight-bold)", fontWeightExtraBold: "var(--graphy-font-weight-extra-bold)", fontWeightBlack: "var(--graphy-font-weight-black)", textScale: "var(--graphy-text-scale)", fontSizeXxs: "var(--graphy-font-size-xxs)", fontSizeXs: "var(--graphy-font-size-xs)", fontSizeSm: "var(--graphy-font-size-sm)", fontSizeMd: "var(--graphy-font-size-md)", fontSizeLg: "var(--graphy-font-size-lg)", fontSizeXl: "var(--graphy-font-size-xl)", fontLineHeightXxs: "var(--graphy-font-line-height-xxs)", fontLineHeightXs: "var(--graphy-font-line-height-xs)", fontLineHeightSm: "var(--graphy-font-line-height-sm)", fontLineHeightMd: "var(--graphy-font-line-height-md)", fontLineHeightLg: "var(--graphy-font-line-height-lg)", fontLineHeightXl: "var(--graphy-font-line-height-xl)", fontSizeEditorBody: "var(--graphy-font-size-editor-body)", fontSizeHeadingSm: "var(--graphy-font-size-heading-sm)", fontSizeHeadingMd: "var(--graphy-font-size-heading-md)", fontSizeHeadingLg: "var(--graphy-font-size-heading-lg)", fontLineHeightEditorBody: "var(--graphy-font-line-height-editor-body)", fontLineHeightHeadingSm: "var(--graphy-font-line-height-heading-sm)", fontLineHeightHeadingMd: "var(--graphy-font-line-height-heading-md)", fontLineHeightHeadingLg: "var(--graphy-font-line-height-heading-lg)", fontTickLabel: "var(--graphy-font-tick-label)", fontAxisLabel: "var(--graphy-font-axis-label)", fontDataLabel: "var(--graphy-font-data-label)", fontStackTotal: "var(--graphy-font-stack-total)", fontLegendLabel: "var(--graphy-font-legend-label)", fontSeriesLabel: "var(--graphy-font-series-label)", fontTooltipLabel: "var(--graphy-font-tooltip-label)", fontTooltipHeading: "var(--graphy-font-tooltip-heading)", fontTooltipFooter: "var(--graphy-font-tooltip-footer)", fontJumboTooltipLabel: "var(--graphy-font-jumbo-tooltip-label)", fontJumboTooltip: "var(--graphy-font-jumbo-tooltip)", fontMiniTooltipLabel: "var(--graphy-font-mini-tooltip-label)", fontMiniTooltipFooter: "var(--graphy-font-mini-tooltip-footer)", fontTooltipCaption: "var(--graphy-font-tooltip-caption)", fontTooltipCaptionSmall: "var(--graphy-font-tooltip-caption-small)", fontTrendTag: "var(--graphy-font-trend-tag)", fontTrendTagSmall: "var(--graphy-font-trend-tag-small)", fontGoalLineLabel: "var(--graphy-font-goal-line-label)", fontPieLabel: "var(--graphy-font-pie-label)", fontPieChartTotal: "var(--graphy-font-pie-chart-total)", fontDifferenceArrowSmall: "var(--graphy-font-difference-arrow-small)", fontDifferenceArrowMedium: "var(--graphy-font-difference-arrow-medium)", fontDifferenceArrowLarge: "var(--graphy-font-difference-arrow-large)", fontButton: "var(--graphy-font-button)", fontInput: "var(--graphy-font-input)", fontInputLabel: "var(--graphy-font-input-label)", fontSelectLabel: "var(--graphy-font-select-label)", fontSelectDescription: "var(--graphy-font-select-description)", fontColorSelectLabel: "var(--graphy-font-color-select-label)", fontMenuTitle: "var(--graphy-font-menu-title)", fontMenuGroupTitle: "var(--graphy-font-menu-group-title)", fontMenuItemLabel: "var(--graphy-font-menu-item-label)", fontMenuItemLabelSecondary: "var(--graphy-font-menu-item-label-secondary)", fontUITooltip: "var(--graphy-font-uitooltip)", fontUITooltipSecondary: "var(--graphy-font-uitooltip-secondary)", fontErrorBoundaryTitle: "var(--graphy-font-error-boundary-title)", fontErrorBoundaryMessage: "var(--graphy-font-error-boundary-message)", fontTableCell: "var(--graphy-font-table-cell)", fontTableHeaderCell: "var(--graphy-font-table-header-cell)", fontSourceLabel: "var(--graphy-font-source-label)", fontSourceLink: "var(--graphy-font-source-link)", fontTextEditorH1: "var(--graphy-font-text-editor-h1)", fontTextEditorH2: "var(--graphy-font-text-editor-h2)", fontTextEditorH3: "var(--graphy-font-text-editor-h3)", fontTextEditorH6: "var(--graphy-font-text-editor-h6)", fontTextEditorBody: "var(--graphy-font-text-editor-body)", fontTextEditorLink: "var(--graphy-font-text-editor-link)", fontHighlightModeTitle: "var(--graphy-font-highlight-mode-title)", fontHighlightModeSubtitle: "var(--graphy-font-highlight-mode-subtitle)" };
|
|
440
|
+
var Vn = ["canvasDefault", "canvasBlue", "canvasCyan", "canvasGreen", "canvasYellow", "canvasOrange", "canvasRed", "canvasPink", "canvasPurple", "canvasGray", "canvasInverse"], s = { white: "var(--graphy-white)", black: "var(--graphy-black)", transparent: "var(--graphy-transparent)", grey100: "var(--graphy-grey-100)", grey95: "var(--graphy-grey-95)", grey90: "var(--graphy-grey-90)", grey85: "var(--graphy-grey-85)", grey80: "var(--graphy-grey-80)", grey75: "var(--graphy-grey-75)", grey70: "var(--graphy-grey-70)", grey60: "var(--graphy-grey-60)", grey50: "var(--graphy-grey-50)", grey0: "var(--graphy-grey-0)", greyGradient80: "var(--graphy-grey-gradient-80)", green60: "var(--graphy-green-60)", green50: "var(--graphy-green-50)", red60: "var(--graphy-red-60)", red50: "var(--graphy-red-50)", amber70: "var(--graphy-amber-70)", amber50: "var(--graphy-amber-50)", amber40: "var(--graphy-amber-40)", amber30: "var(--graphy-amber-30)", blue80: "var(--graphy-blue-80)", blue60: "var(--graphy-blue-60)", purple50: "var(--graphy-purple-50)", purple30: "var(--graphy-purple-30)", brand: "var(--graphy-brand)", success: "var(--graphy-success)", warning: "var(--graphy-warning)", alert: "var(--graphy-alert)", textPrimary: "var(--graphy-text-primary)", textSecondary: "var(--graphy-text-secondary)", textDisabled: "var(--graphy-text-disabled)", iconPrimary: "var(--graphy-icon-primary)", iconSecondary: "var(--graphy-icon-secondary)", iconStickerBackground: "var(--graphy-icon-sticker-background)", border100: "var(--graphy-border-100)", border50: "var(--graphy-border-50)", border10: "var(--graphy-border-10)", sunkenBackground: "var(--graphy-sunken-background)", defaultBackground: "var(--graphy-default-background)", raisedBackground: "var(--graphy-raised-background)", overlayBackground: "var(--graphy-overlay-background)", overlayBorderGradient: "var(--graphy-overlay-border-gradient)", graphBackground: "var(--graphy-graph-background)", gridLineColor: "var(--graphy-grid-line-color)", originLineColor: "var(--graphy-origin-line-color)", targetLineColor: "var(--graphy-target-line-color)", targetLineMarkerColor: "var(--graphy-target-line-marker-color)", targetLineLabelTextColor: "var(--graphy-target-line-label-text-color)", legendBackground: "var(--graphy-legend-background)", legendBorderColor: "var(--graphy-legend-border-color)", legendFocusOutlineColor: "var(--graphy-legend-focus-outline-color)", legendTextColor: "var(--graphy-legend-text-color)", dimmedSeriesLabelTextColor: "var(--graphy-dimmed-series-label-text-color)", dimmedSeriesLabelLineColor: "var(--graphy-dimmed-series-label-line-color)", trendNegativeColor: "var(--graphy-trend-negative-color)", trendPositiveColor: "var(--graphy-trend-positive-color)", trendNeutralColor: "var(--graphy-trend-neutral-color)", defaultAnnotationArrowStroke: "var(--graphy-default-annotation-arrow-stroke)", defaultAnnotationShapeStroke: "var(--graphy-default-annotation-shape-stroke)", defaultAnnotationShapeFill: "var(--graphy-default-annotation-shape-fill)", arrowAnnotationStickerOutlineColor: "var(--graphy-arrow-annotation-sticker-outline-color)", arrowAnnotationStickerOutlineColorInverse: "var(--graphy-arrow-annotation-sticker-outline-color-inverse)", annotationFrameBorderColor: "var(--graphy-annotation-frame-border-color)", annotationMenuTriggerIconColor: "var(--graphy-annotation-menu-trigger-icon-color)", heatmapEmptyTileBackground: "var(--graphy-heatmap-empty-tile-background)", dataLabelOutsideBackground: "var(--graphy-data-label-outside-background)", gridLineWidth: "var(--graphy-grid-line-width)", gridLineDash: "var(--graphy-grid-line-dash)", tooltipBorderRadius: "var(--graphy-tooltip-border-radius)", tooltipBorderWidth: "var(--graphy-tooltip-border-width)", tooltipPaddingBlock: "var(--graphy-tooltip-padding-block)", tooltipPaddingInline: "var(--graphy-tooltip-padding-inline)", tooltipRowGap: "var(--graphy-tooltip-row-gap)", tooltipShadow: "var(--graphy-tooltip-shadow)", tickLabelOffset: "var(--graphy-tick-label-offset)", legendItemGap: "var(--graphy-legend-item-gap)", legendSwatchGap: "var(--graphy-legend-swatch-gap)", legendSwatchWidth: "var(--graphy-legend-swatch-width)", legendSwatchHeight: "var(--graphy-legend-swatch-height)", legendPillPaddingInline: "var(--graphy-legend-pill-padding-inline)", legendPillPaddingBlock: "var(--graphy-legend-pill-padding-block)", legendPillBorderWidth: "var(--graphy-legend-pill-border-width)", headlineRowGap: "var(--graphy-headline-row-gap)", headlineItemGap: "var(--graphy-headline-item-gap)", canvasDefault: "var(--graphy-canvas-default)", canvasBlue: "var(--graphy-canvas-blue)", canvasCyan: "var(--graphy-canvas-cyan)", canvasGreen: "var(--graphy-canvas-green)", canvasYellow: "var(--graphy-canvas-yellow)", canvasOrange: "var(--graphy-canvas-orange)", canvasRed: "var(--graphy-canvas-red)", canvasPink: "var(--graphy-canvas-pink)", canvasPurple: "var(--graphy-canvas-purple)", canvasGray: "var(--graphy-canvas-gray)", canvasInverse: "var(--graphy-canvas-inverse)", elevationXs: "var(--graphy-elevation-xs)", elevationSm: "var(--graphy-elevation-sm)", elevationMd: "var(--graphy-elevation-md)", elevationLg: "var(--graphy-elevation-lg)", radiiXs: "var(--graphy-radii-xs)", radiiSm: "var(--graphy-radii-sm)", radiiMd: "var(--graphy-radii-md)", radiiLg: "var(--graphy-radii-lg)", spaceXxs: "var(--graphy-space-xxs)", spaceXs: "var(--graphy-space-xs)", spaceSm: "var(--graphy-space-sm)", spaceMd: "var(--graphy-space-md)", spaceLg: "var(--graphy-space-lg)", spaceXl: "var(--graphy-space-xl)", zIndexToolbar: "var(--graphy-z-index-toolbar)", zIndexToolbarTooltip: "var(--graphy-z-index-toolbar-tooltip)", zIndexToolbarPopover: "var(--graphy-z-index-toolbar-popover)", toolbarBackgroundColor: "var(--graphy-toolbar-background-color)", toolbarButtonBackgroundColor: "var(--graphy-toolbar-button-background-color)", toolbarButtonBackgroundColorHovered: "var(--graphy-toolbar-button-background-color-hovered)", toolbarButtonBackgroundColorSelected: "var(--graphy-toolbar-button-background-color-selected)", toolbarSeparatorColor: "var(--graphy-toolbar-separator-color)", tooltipBackground: "var(--graphy-tooltip-background)", tooltipBorderColor: "var(--graphy-tooltip-border-color)", tooltipHeadingTextColor: "var(--graphy-tooltip-heading-text-color)", tooltipLabelTextColor: "var(--graphy-tooltip-label-text-color)", tooltipValueTextColor: "var(--graphy-tooltip-value-text-color)", tooltipPrimaryRowColor: "var(--graphy-tooltip-primary-row-color)", hoverGuideLineColor: "var(--graphy-hover-guide-line-color)", hoverGuideFillColor: "var(--graphy-hover-guide-fill-color)", hoveredBarBorderColor: "var(--graphy-hovered-bar-border-color)", hoveredPointRingColor: "var(--graphy-hovered-point-ring-color)", pointStrokeColor: "var(--graphy-point-stroke-color)", stackedBarHoverBorderColor: "var(--graphy-stacked-bar-hover-border-color)", fontFamilyDefault: "var(--graphy-font-family-default)", fontFamilyHeading: "var(--graphy-font-family-heading)", fontWeightRegular: "var(--graphy-font-weight-regular)", fontWeightMedium: "var(--graphy-font-weight-medium)", fontWeightSemibold: "var(--graphy-font-weight-semibold)", fontWeightBold: "var(--graphy-font-weight-bold)", fontWeightExtraBold: "var(--graphy-font-weight-extra-bold)", fontWeightBlack: "var(--graphy-font-weight-black)", textScale: "var(--graphy-text-scale)", fontSizeXxs: "var(--graphy-font-size-xxs)", fontSizeXs: "var(--graphy-font-size-xs)", fontSizeSm: "var(--graphy-font-size-sm)", fontSizeMd: "var(--graphy-font-size-md)", fontSizeLg: "var(--graphy-font-size-lg)", fontSizeXl: "var(--graphy-font-size-xl)", fontLineHeightXxs: "var(--graphy-font-line-height-xxs)", fontLineHeightXs: "var(--graphy-font-line-height-xs)", fontLineHeightSm: "var(--graphy-font-line-height-sm)", fontLineHeightMd: "var(--graphy-font-line-height-md)", fontLineHeightLg: "var(--graphy-font-line-height-lg)", fontLineHeightXl: "var(--graphy-font-line-height-xl)", fontSizeEditorBody: "var(--graphy-font-size-editor-body)", fontSizeHeadingSm: "var(--graphy-font-size-heading-sm)", fontSizeHeadingMd: "var(--graphy-font-size-heading-md)", fontSizeHeadingLg: "var(--graphy-font-size-heading-lg)", fontLineHeightEditorBody: "var(--graphy-font-line-height-editor-body)", fontLineHeightHeadingSm: "var(--graphy-font-line-height-heading-sm)", fontLineHeightHeadingMd: "var(--graphy-font-line-height-heading-md)", fontLineHeightHeadingLg: "var(--graphy-font-line-height-heading-lg)", fontTickLabel: "var(--graphy-font-tick-label)", fontAxisLabel: "var(--graphy-font-axis-label)", fontDataLabel: "var(--graphy-font-data-label)", fontStackTotal: "var(--graphy-font-stack-total)", fontLegendLabel: "var(--graphy-font-legend-label)", fontSeriesLabel: "var(--graphy-font-series-label)", fontTooltipLabel: "var(--graphy-font-tooltip-label)", fontTooltipHeading: "var(--graphy-font-tooltip-heading)", fontTooltipFooter: "var(--graphy-font-tooltip-footer)", fontJumboTooltipLabel: "var(--graphy-font-jumbo-tooltip-label)", fontJumboTooltip: "var(--graphy-font-jumbo-tooltip)", fontMiniTooltipLabel: "var(--graphy-font-mini-tooltip-label)", fontMiniTooltipFooter: "var(--graphy-font-mini-tooltip-footer)", fontTooltipCaption: "var(--graphy-font-tooltip-caption)", fontTooltipCaptionSmall: "var(--graphy-font-tooltip-caption-small)", fontTrendTag: "var(--graphy-font-trend-tag)", fontTrendTagSmall: "var(--graphy-font-trend-tag-small)", fontGoalLineLabel: "var(--graphy-font-goal-line-label)", fontPieLabel: "var(--graphy-font-pie-label)", fontPieChartTotal: "var(--graphy-font-pie-chart-total)", fontDifferenceArrowSmall: "var(--graphy-font-difference-arrow-small)", fontDifferenceArrowMedium: "var(--graphy-font-difference-arrow-medium)", fontDifferenceArrowLarge: "var(--graphy-font-difference-arrow-large)", fontButton: "var(--graphy-font-button)", fontInput: "var(--graphy-font-input)", fontInputLabel: "var(--graphy-font-input-label)", fontSelectLabel: "var(--graphy-font-select-label)", fontSelectDescription: "var(--graphy-font-select-description)", fontColorSelectLabel: "var(--graphy-font-color-select-label)", fontMenuTitle: "var(--graphy-font-menu-title)", fontMenuGroupTitle: "var(--graphy-font-menu-group-title)", fontMenuItemLabel: "var(--graphy-font-menu-item-label)", fontMenuItemLabelSecondary: "var(--graphy-font-menu-item-label-secondary)", fontUITooltip: "var(--graphy-font-uitooltip)", fontUITooltipSecondary: "var(--graphy-font-uitooltip-secondary)", fontErrorBoundaryTitle: "var(--graphy-font-error-boundary-title)", fontErrorBoundaryMessage: "var(--graphy-font-error-boundary-message)", fontTableCell: "var(--graphy-font-table-cell)", fontTableHeaderCell: "var(--graphy-font-table-header-cell)", fontSourceLabel: "var(--graphy-font-source-label)", fontSourceLink: "var(--graphy-font-source-link)", fontTextEditorH1: "var(--graphy-font-text-editor-h1)", fontTextEditorH2: "var(--graphy-font-text-editor-h2)", fontTextEditorH3: "var(--graphy-font-text-editor-h3)", fontTextEditorH6: "var(--graphy-font-text-editor-h6)", fontTextEditorBody: "var(--graphy-font-text-editor-body)", fontTextEditorLink: "var(--graphy-font-text-editor-link)", fontHighlightModeTitle: "var(--graphy-font-highlight-mode-title)", fontHighlightModeSubtitle: "var(--graphy-font-highlight-mode-subtitle)" };
|
|
427
441
|
const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI', 'Roboto', 'Oxygen-Sans', 'Ubuntu',
|
|
428
|
-
'Cantarell', 'Helvetica Neue', 'NotoSansArabic', 'NotoSansJP', 'NotoSansSC', 'NotoSansKR', 'NotoSerifKR', sans-serif, 'Apple Color Emoji', 'NotoColorEmoji'`,
|
|
442
|
+
'Cantarell', 'Helvetica Neue', 'NotoSansArabic', 'NotoSansJP', 'NotoSansSC', 'NotoSansKR', 'NotoSerifKR', sans-serif, 'Apple Color Emoji', 'NotoColorEmoji'`, mi = R, K = {
|
|
429
443
|
regular: 400,
|
|
430
444
|
medium: 500,
|
|
431
445
|
semibold: 600,
|
|
@@ -454,10 +468,10 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
454
468
|
headingSm: 1.25,
|
|
455
469
|
headingMd: 1.41,
|
|
456
470
|
headingLg: 1.29
|
|
457
|
-
},
|
|
471
|
+
}, vi = `var(--typography-chart-font-family, ${s.fontFamilyDefault})`, tt = `var(--typography-chart-heading-font-family, ${s.fontFamilyHeading})`, U = (e) => `${e}em`, Un = {
|
|
458
472
|
textScale: "1",
|
|
459
473
|
fontFamilyDefault: R,
|
|
460
|
-
fontFamilyHeading:
|
|
474
|
+
fontFamilyHeading: mi,
|
|
461
475
|
fontWeightRegular: K.regular.toString(),
|
|
462
476
|
fontWeightMedium: K.medium.toString(),
|
|
463
477
|
fontWeightSemibold: K.semibold.toString(),
|
|
@@ -485,7 +499,7 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
485
499
|
fontLineHeightHeadingSm: D.headingSm.toString(),
|
|
486
500
|
fontLineHeightHeadingMd: D.headingMd.toString(),
|
|
487
501
|
fontLineHeightHeadingLg: D.headingLg.toString()
|
|
488
|
-
}, b = (e, t, n, r =
|
|
502
|
+
}, b = (e, t, n, r = vi) => `${e} ${t}/${n} ${r}`, jn = {
|
|
489
503
|
// Axes
|
|
490
504
|
fontTickLabel: b(s.fontWeightMedium, s.fontSizeSm, s.fontLineHeightSm),
|
|
491
505
|
fontAxisLabel: b(s.fontWeightMedium, s.fontSizeSm, s.fontLineHeightSm),
|
|
@@ -557,20 +571,22 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
557
571
|
// Highlight mode
|
|
558
572
|
fontHighlightModeTitle: b(s.fontWeightBold, s.fontSizeMd, s.fontLineHeightMd),
|
|
559
573
|
fontHighlightModeSubtitle: b(s.fontWeightMedium, s.fontSizeSm, s.fontLineHeightSm)
|
|
560
|
-
},
|
|
574
|
+
}, yi = {
|
|
561
575
|
small: 1.9,
|
|
562
576
|
medium: 2.3,
|
|
563
577
|
large: 2.6
|
|
564
|
-
},
|
|
578
|
+
}, bi = {
|
|
565
579
|
small: 1,
|
|
566
580
|
medium: 1,
|
|
567
581
|
large: 1.2
|
|
568
|
-
},
|
|
582
|
+
}, xi = R, qn = D.sm, Kn = 2, Jn = 24, Zn = 12, Qn = 10, er = 8, tr = 8, nr = 8, rr = 2, or = 1, ar = 2, ir = 4, sr = N.sm, lr = D.sm, cr = R, Si = ar * ir, dr = !1, Fe = 6, ur = 10, P = (e, t) => `color-mix(in srgb, transparent, ${e} ${t * 100}%)`, je = (e, t) => `hsl(from ${e} h s calc(l * ${1 - t}))`, hr = (e, t) => `hsl(from ${e} h s calc(l * ${1 + t}))`, dt = (e, t, n) => `color-mix(in srgb, ${e}, ${t} ${n * 100}%)`, ki = (e) => /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e), Li = (e) => e.length === 0 ? !1 : typeof CSS < "u" && typeof CSS.supports == "function" ? CSS.supports("color", e) : /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(e), X = (e) => `${e}px`, gr = {
|
|
569
583
|
gridLineWidth: "1px",
|
|
570
584
|
gridLineDash: "2 3",
|
|
571
585
|
tooltipBorderRadius: "6px",
|
|
586
|
+
tooltipBorderWidth: "1px",
|
|
572
587
|
tooltipPaddingBlock: "8px",
|
|
573
588
|
tooltipPaddingInline: "10px",
|
|
589
|
+
tooltipRowGap: "4px",
|
|
574
590
|
tooltipShadow: "0 4px 12px rgba(0, 0, 0, 0.18)",
|
|
575
591
|
tickLabelOffset: X(ur),
|
|
576
592
|
legendItemGap: X(tr),
|
|
@@ -596,7 +612,7 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
596
612
|
zIndexToolbar: "10",
|
|
597
613
|
zIndexToolbarTooltip: "20",
|
|
598
614
|
zIndexToolbarPopover: "30"
|
|
599
|
-
},
|
|
615
|
+
}, Ci = 8, se = (e) => `${Ci * e}px`, vr = {
|
|
600
616
|
spaceXxs: se(0.25),
|
|
601
617
|
// space(0.25) → 2px
|
|
602
618
|
spaceXs: se(0.5),
|
|
@@ -609,7 +625,7 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
609
625
|
// space(1.5) → 12px
|
|
610
626
|
spaceXl: se(2)
|
|
611
627
|
// space(2) → 16px
|
|
612
|
-
},
|
|
628
|
+
}, Ti = {
|
|
613
629
|
transparent: "transparent",
|
|
614
630
|
white: "#FFFFFF",
|
|
615
631
|
black: "#000000",
|
|
@@ -636,7 +652,7 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
636
652
|
purple50: "#7B56EA",
|
|
637
653
|
purple30: "#E093FE",
|
|
638
654
|
greyGradient80: "linear-gradient(to top, #222429, #31353f)"
|
|
639
|
-
},
|
|
655
|
+
}, wi = {
|
|
640
656
|
textPrimary: s.grey0,
|
|
641
657
|
textSecondary: P(s.textPrimary, 0.8),
|
|
642
658
|
textDisabled: P(s.textPrimary, 0.5),
|
|
@@ -655,7 +671,7 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
655
671
|
raisedBackground: s.grey80,
|
|
656
672
|
overlayBackground: s.grey90,
|
|
657
673
|
overlayBorderGradient: s.greyGradient80
|
|
658
|
-
},
|
|
674
|
+
}, Ai = {
|
|
659
675
|
graphBackground: s.grey90,
|
|
660
676
|
gridLineColor: s.border10,
|
|
661
677
|
originLineColor: s.grey0,
|
|
@@ -700,7 +716,7 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
700
716
|
arrowAnnotationStickerOutlineColorInverse: "#1D2129",
|
|
701
717
|
annotationFrameBorderColor: s.blue60,
|
|
702
718
|
annotationMenuTriggerIconColor: s.white
|
|
703
|
-
},
|
|
719
|
+
}, Ei = {
|
|
704
720
|
canvasDefault: "#FFFFFF",
|
|
705
721
|
canvasBlue: "#60a5fa",
|
|
706
722
|
canvasCyan: "#22d3ee",
|
|
@@ -712,20 +728,20 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
712
728
|
canvasPurple: "#a78bfa",
|
|
713
729
|
canvasGray: "#a8a29e",
|
|
714
730
|
canvasInverse: "#000000"
|
|
715
|
-
},
|
|
716
|
-
...
|
|
717
|
-
...
|
|
731
|
+
}, _i = {
|
|
732
|
+
...Ti,
|
|
733
|
+
...wi,
|
|
718
734
|
...pr,
|
|
719
735
|
...fr,
|
|
720
736
|
...vr,
|
|
721
737
|
...mr,
|
|
722
|
-
...
|
|
723
|
-
...
|
|
738
|
+
...Ai,
|
|
739
|
+
...Ei,
|
|
724
740
|
...gr,
|
|
725
741
|
...Un,
|
|
726
742
|
...Yn,
|
|
727
|
-
...
|
|
728
|
-
},
|
|
743
|
+
...jn
|
|
744
|
+
}, Pi = {
|
|
729
745
|
transparent: "transparent",
|
|
730
746
|
white: "#FFFFFF",
|
|
731
747
|
black: "#000000",
|
|
@@ -752,7 +768,7 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
752
768
|
purple50: "#7B56EA",
|
|
753
769
|
purple30: "#E093FE",
|
|
754
770
|
greyGradient80: "linear-gradient(to top, #F0F0F1, #F9F9FF)"
|
|
755
|
-
},
|
|
771
|
+
}, Hi = {
|
|
756
772
|
textPrimary: s.black,
|
|
757
773
|
textSecondary: P(s.textPrimary, 0.6),
|
|
758
774
|
textDisabled: P(s.textPrimary, 0.5),
|
|
@@ -771,7 +787,7 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
771
787
|
raisedBackground: s.grey85,
|
|
772
788
|
overlayBackground: s.grey100,
|
|
773
789
|
overlayBorderGradient: s.border10
|
|
774
|
-
},
|
|
790
|
+
}, Fi = {
|
|
775
791
|
graphBackground: s.grey100,
|
|
776
792
|
gridLineColor: s.border10,
|
|
777
793
|
originLineColor: s.grey0,
|
|
@@ -816,7 +832,7 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
816
832
|
arrowAnnotationStickerOutlineColorInverse: "#FFFFFF",
|
|
817
833
|
annotationFrameBorderColor: s.blue60,
|
|
818
834
|
annotationMenuTriggerIconColor: "#3d414c"
|
|
819
|
-
},
|
|
835
|
+
}, Ni = {
|
|
820
836
|
canvasDefault: "#000000",
|
|
821
837
|
canvasBlue: "#3b82f6",
|
|
822
838
|
canvasCyan: "#06b6d4",
|
|
@@ -828,21 +844,21 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
828
844
|
canvasPurple: "#8b5cf6",
|
|
829
845
|
canvasGray: "#78716c",
|
|
830
846
|
canvasInverse: "#ffffff"
|
|
831
|
-
},
|
|
832
|
-
...
|
|
833
|
-
...
|
|
847
|
+
}, Bi = {
|
|
848
|
+
...Pi,
|
|
849
|
+
...Hi,
|
|
834
850
|
...pr,
|
|
835
851
|
...fr,
|
|
836
852
|
...vr,
|
|
837
853
|
...mr,
|
|
838
|
-
...
|
|
839
|
-
...
|
|
854
|
+
...Fi,
|
|
855
|
+
...Ni,
|
|
840
856
|
...gr,
|
|
841
857
|
...Un,
|
|
842
858
|
...Yn,
|
|
843
|
-
...
|
|
859
|
+
...jn
|
|
844
860
|
}, yr = (e, t = {}) => ({
|
|
845
|
-
...e === "dark" ?
|
|
861
|
+
...e === "dark" ? _i : Bi,
|
|
846
862
|
...t
|
|
847
863
|
}), br = (e, t) => {
|
|
848
864
|
const n = yr(e, t), r = V(n.legendPillPaddingInline, nr), o = V(n.legendPillPaddingBlock, rr), i = V(n.legendPillBorderWidth, or);
|
|
@@ -860,85 +876,83 @@ const R = `'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI',
|
|
|
860
876
|
headlineRowGap: V(n.headlineRowGap, Kn),
|
|
861
877
|
headlineItemGap: V(n.headlineItemGap, Jn)
|
|
862
878
|
};
|
|
863
|
-
},
|
|
879
|
+
}, Ii = Object.freeze(br("light"));
|
|
864
880
|
function V(e, t) {
|
|
865
881
|
const n = e.trim();
|
|
866
882
|
if (!/^-?\d*\.?\d+(px)?$/.test(n)) return t;
|
|
867
883
|
const r = Number.parseFloat(n);
|
|
868
884
|
return Number.isFinite(r) ? r : t;
|
|
869
885
|
}
|
|
870
|
-
const xr = fe(
|
|
886
|
+
const xr = fe(Ii), Mi = ({ metrics: e, children: t }) => /* @__PURE__ */ a(xr.Provider, { value: e, children: t }), wt = () => ee(xr), At = N.sm, Sr = R, kr = 10, te = (e, t) => e * kr * t, Di = (e, t, n) => {
|
|
871
887
|
const { tickLabelOffset: r } = n;
|
|
872
888
|
return (o) => {
|
|
873
|
-
if (!o.isVisible || o.ticks.length === 0) return 0;
|
|
874
889
|
const i = o.position === "top" || o.position === "bottom", c = o.ticks.map(
|
|
875
890
|
(u) => e.measureText(u.formattedLabel, {
|
|
876
891
|
family: Sr,
|
|
877
|
-
size:
|
|
892
|
+
size: te(At, t)
|
|
878
893
|
})
|
|
879
894
|
), l = o.labelMaxWidthPx ?? Number.POSITIVE_INFINITY;
|
|
880
895
|
if (i) {
|
|
881
896
|
if (o.labelRotation !== 0) {
|
|
882
897
|
const u = c.map((g) => g.width);
|
|
883
|
-
return
|
|
898
|
+
return Wt(u, l) + 2 * r;
|
|
884
899
|
}
|
|
885
900
|
return Math.max(...c.map((u) => u.height)) + r;
|
|
886
901
|
}
|
|
887
|
-
return
|
|
902
|
+
return Wt(
|
|
888
903
|
c.map((u) => u.width),
|
|
889
904
|
l
|
|
890
905
|
) + r;
|
|
891
906
|
};
|
|
892
|
-
},
|
|
893
|
-
const { labelLineHeight: o, labelFontWeight: i } =
|
|
907
|
+
}, Wt = (e, t) => Math.min(Math.max(...e), t), Oi = (e) => () => te(At, e), Ri = (e, t) => (n, r) => {
|
|
908
|
+
const { labelLineHeight: o, labelFontWeight: i } = Ao(r, t);
|
|
894
909
|
return e.measureText(n, {
|
|
895
910
|
family: R,
|
|
896
911
|
size: o,
|
|
897
912
|
weight: i
|
|
898
913
|
});
|
|
899
|
-
},
|
|
914
|
+
}, zi = (e, t, n) => (r, o) => {
|
|
900
915
|
const i = Lr(r, o, e, t, n.headlineRowGap), c = Cr(i.map((d) => d.width)), l = Math.max(0, i.length - 1) * n.headlineItemGap;
|
|
901
916
|
return {
|
|
902
917
|
width: c + l,
|
|
903
918
|
height: Math.max(0, ...i.map((d) => d.height))
|
|
904
919
|
};
|
|
905
|
-
},
|
|
920
|
+
}, Gi = (e, t, n) => (r, o) => Lr(r, o, e, t, n.headlineRowGap).map(
|
|
906
921
|
(i) => i.width
|
|
907
|
-
),
|
|
922
|
+
), Wi = (e, t) => (n, r) => {
|
|
908
923
|
const o = ut("value", r, t);
|
|
909
|
-
return { width: e.measureText(n, o).width, height: o.size *
|
|
910
|
-
},
|
|
911
|
-
const r =
|
|
924
|
+
return { width: e.measureText(n, o).width, height: o.size * qn };
|
|
925
|
+
}, $i = (e, t, n) => {
|
|
926
|
+
const r = zi(e, t, n), o = Wi(e, t);
|
|
912
927
|
return (i, c) => i.kind === "perGroup" ? r(i, c) : o(i.value, c);
|
|
913
928
|
}, Lr = (e, t, n, r, o) => {
|
|
914
929
|
const i = {
|
|
915
930
|
value: ut("value", t, r),
|
|
916
931
|
label: ut("label", t, r)
|
|
917
|
-
}, c = (l) =>
|
|
932
|
+
}, c = (l) => Xi(l, i, n);
|
|
918
933
|
return e.items.map((l) => {
|
|
919
|
-
const d =
|
|
934
|
+
const d = pn(l).map(c), u = Math.max(0, d.length - 1) * o;
|
|
920
935
|
return {
|
|
921
936
|
width: Math.max(0, ...d.map((h) => h.width)),
|
|
922
937
|
height: Cr(d.map((h) => h.height)) + u
|
|
923
938
|
};
|
|
924
939
|
});
|
|
925
|
-
},
|
|
940
|
+
}, Xi = (e, t, n) => {
|
|
926
941
|
let r = 0, o = 0;
|
|
927
942
|
for (const i of e.segments)
|
|
928
943
|
if (i.kind === "text") {
|
|
929
944
|
const c = t[i.fontRole];
|
|
930
|
-
r += n.measureText(i.text, c).width, o = Math.max(o, c.size *
|
|
945
|
+
r += n.measureText(i.text, c).width, o = Math.max(o, c.size * qn);
|
|
931
946
|
} else
|
|
932
947
|
r += i.size, o = Math.max(o, i.size);
|
|
933
948
|
return { width: r + Math.max(0, e.segments.length - 1) * e.gap, height: o };
|
|
934
949
|
}, ut = (e, t, n) => {
|
|
935
|
-
const r = e === "value" ?
|
|
936
|
-
return { family:
|
|
950
|
+
const r = e === "value" ? yi[t] : bi[t];
|
|
951
|
+
return { family: xi, size: te(r, n) };
|
|
937
952
|
}, Cr = (e) => e.reduce((t, n) => t + n, 0), Tr = (e) => {
|
|
938
|
-
const t =
|
|
953
|
+
const t = te(sr, e);
|
|
939
954
|
return { fontSizePx: t, lineBoxHeight: t * lr };
|
|
940
|
-
}, wr = (e, t) => e ? t : 0,
|
|
941
|
-
if (r.items.length === 0) return 0;
|
|
955
|
+
}, wr = (e, t) => e ? t : 0, Vi = (e, t, n) => (r) => {
|
|
942
956
|
const { fontSizePx: o, lineBoxHeight: i } = Tr(t), c = { family: cr, size: o };
|
|
943
957
|
if (r.position === "top" || r.position === "bottom")
|
|
944
958
|
return Math.max(i, n.legendSwatchHeight) + n.legendPillVerticalChrome;
|
|
@@ -947,18 +961,39 @@ const xr = fe(Fi), Ni = ({ metrics: e, children: t }) => /* @__PURE__ */ a(xr.Pr
|
|
|
947
961
|
return g + (g > 0 ? n.legendSwatchGap : 0) + h;
|
|
948
962
|
});
|
|
949
963
|
return Math.max(...d) + n.legendPillHorizontalChrome;
|
|
950
|
-
},
|
|
964
|
+
}, Ui = (e, t) => (n) => e.measureText(n, {
|
|
951
965
|
family: Sr,
|
|
952
|
-
size:
|
|
953
|
-
}),
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
966
|
+
size: te(At, t)
|
|
967
|
+
}), Yi = Object.freeze({}), ji = (e, t, n, r = Yi) => {
|
|
968
|
+
const o = C(r);
|
|
969
|
+
return o.current = r, v(() => {
|
|
970
|
+
if (!e) return null;
|
|
971
|
+
const i = Di(e, t, n), c = Oi(t), l = Vi(e, t, n), d = $i(e, t, n), u = Gi(e, t, n), h = {
|
|
972
|
+
measureText: (g, p) => e.measureText(g, p),
|
|
973
|
+
textScale: t
|
|
974
|
+
};
|
|
975
|
+
return {
|
|
976
|
+
measureAxis: (g) => {
|
|
977
|
+
if (Ki(g)) return 0;
|
|
978
|
+
const p = o.current.measureAxis;
|
|
979
|
+
return p ? p(g, h) : i(g);
|
|
980
|
+
},
|
|
981
|
+
measureAxisLabel: (g) => {
|
|
982
|
+
const p = o.current.measureAxisLabel;
|
|
983
|
+
return p ? p(g, h) : c();
|
|
984
|
+
},
|
|
985
|
+
measureLegend: (g) => {
|
|
986
|
+
if (Ji(g)) return 0;
|
|
987
|
+
const p = o.current.measureLegend;
|
|
988
|
+
return p ? p(g, h) : l(g);
|
|
989
|
+
},
|
|
990
|
+
measureHeadline: (g, p) => (o.current.measureHeadline ?? d)(g, p),
|
|
991
|
+
measureHeadlineItemWidths: (g, p) => (o.current.measureHeadlineItemWidths ?? u)(g, p),
|
|
992
|
+
measureTickLabel: Ui(e, t),
|
|
993
|
+
measureDifferenceArrowLabel: Ri(e, t)
|
|
994
|
+
};
|
|
995
|
+
}, [e, t, n]);
|
|
996
|
+
}, qi = ({
|
|
962
997
|
measurer: e,
|
|
963
998
|
axes: t,
|
|
964
999
|
numberFormat: n,
|
|
@@ -971,7 +1006,7 @@ const xr = fe(Fi), Ni = ({ metrics: e, children: t }) => /* @__PURE__ */ a(xr.Pr
|
|
|
971
1006
|
annotations: u,
|
|
972
1007
|
coordSystem: h,
|
|
973
1008
|
textScale: g
|
|
974
|
-
}) => v(() => e ? new
|
|
1009
|
+
}) => v(() => e ? new Eo(e).compile({
|
|
975
1010
|
axes: t,
|
|
976
1011
|
numberFormat: n,
|
|
977
1012
|
parsingLocale: r,
|
|
@@ -996,17 +1031,17 @@ const xr = fe(Fi), Ni = ({ metrics: e, children: t }) => /* @__PURE__ */ a(xr.Pr
|
|
|
996
1031
|
h,
|
|
997
1032
|
g,
|
|
998
1033
|
e
|
|
999
|
-
]),
|
|
1034
|
+
]), Ki = (e) => !e.isVisible || e.ticks.length === 0, Ji = (e) => e.items.length === 0, $t = "data-variant", Ar = na.extend({
|
|
1000
1035
|
addAttributes() {
|
|
1001
1036
|
return {
|
|
1002
1037
|
variant: {
|
|
1003
1038
|
default: null,
|
|
1004
|
-
parseHTML: (e) => e.getAttribute(
|
|
1005
|
-
renderHTML: (e) => e.variant ? { [
|
|
1039
|
+
parseHTML: (e) => e.getAttribute($t) ?? null,
|
|
1040
|
+
renderHTML: (e) => e.variant ? { [$t]: e.variant } : {}
|
|
1006
1041
|
}
|
|
1007
1042
|
};
|
|
1008
1043
|
}
|
|
1009
|
-
}),
|
|
1044
|
+
}), Zi = ta.create({
|
|
1010
1045
|
name: "preventBackspaceAcrossTitleBoundary",
|
|
1011
1046
|
addOptions() {
|
|
1012
1047
|
return { isTitleVisible: !0 };
|
|
@@ -1022,28 +1057,28 @@ const xr = fe(Fi), Ni = ({ metrics: e, children: t }) => /* @__PURE__ */ a(xr.Pr
|
|
|
1022
1057
|
}
|
|
1023
1058
|
};
|
|
1024
1059
|
}
|
|
1025
|
-
}),
|
|
1060
|
+
}), Qi = ({
|
|
1026
1061
|
titlePlaceholder: e,
|
|
1027
1062
|
subtitlePlaceholder: t,
|
|
1028
1063
|
isTitleVisible: n,
|
|
1029
1064
|
isSubtitleVisible: r
|
|
1030
1065
|
}) => [
|
|
1031
|
-
|
|
1066
|
+
ts({ isTitleVisible: n, isSubtitleVisible: r }),
|
|
1032
1067
|
Ar,
|
|
1033
|
-
|
|
1068
|
+
Hn,
|
|
1069
|
+
Dn,
|
|
1070
|
+
En.configure({ levels: [1, 2, 3] }),
|
|
1071
|
+
wn,
|
|
1072
|
+
_n,
|
|
1034
1073
|
Mn,
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
En,
|
|
1038
|
-
In,
|
|
1039
|
-
Hn.configure({ types: ["heading", "paragraph"] }),
|
|
1040
|
-
_n.configure({ openOnClick: !1, autolink: !0 }),
|
|
1041
|
-
Fn,
|
|
1074
|
+
Fn.configure({ types: ["heading", "paragraph"] }),
|
|
1075
|
+
Pn.configure({ openOnClick: !1, autolink: !0 }),
|
|
1042
1076
|
Nn,
|
|
1043
1077
|
Bn,
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1078
|
+
In,
|
|
1079
|
+
An,
|
|
1080
|
+
Zi.configure({ isTitleVisible: n }),
|
|
1081
|
+
On.configure({
|
|
1047
1082
|
showOnlyCurrent: !1,
|
|
1048
1083
|
placeholder: ({ pos: o, editor: i }) => {
|
|
1049
1084
|
if (n && o === 0) return e;
|
|
@@ -1051,83 +1086,83 @@ const xr = fe(Fi), Ni = ({ metrics: e, children: t }) => /* @__PURE__ */ a(xr.Pr
|
|
|
1051
1086
|
return r && o === c ? t : "";
|
|
1052
1087
|
}
|
|
1053
1088
|
})
|
|
1054
|
-
],
|
|
1089
|
+
], es = ({ placeholder: e }) => [
|
|
1055
1090
|
lt,
|
|
1056
1091
|
Ar,
|
|
1057
|
-
|
|
1092
|
+
Hn,
|
|
1093
|
+
Dn,
|
|
1094
|
+
En.configure({ levels: [1, 2, 3] }),
|
|
1095
|
+
wn,
|
|
1096
|
+
_n,
|
|
1058
1097
|
Mn,
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
En,
|
|
1062
|
-
In,
|
|
1063
|
-
Hn.configure({ types: ["heading", "paragraph"] }),
|
|
1064
|
-
_n.configure({ openOnClick: !1, autolink: !0 }),
|
|
1065
|
-
Fn,
|
|
1098
|
+
Fn.configure({ types: ["heading", "paragraph"] }),
|
|
1099
|
+
Pn.configure({ openOnClick: !1, autolink: !0 }),
|
|
1066
1100
|
Nn,
|
|
1067
1101
|
Bn,
|
|
1068
|
-
|
|
1069
|
-
|
|
1102
|
+
In,
|
|
1103
|
+
An,
|
|
1104
|
+
On.configure({
|
|
1070
1105
|
showOnlyCurrent: !1,
|
|
1071
1106
|
placeholder: ({ pos: t }) => t === 0 ? e : ""
|
|
1072
1107
|
})
|
|
1073
|
-
],
|
|
1108
|
+
], ts = ({
|
|
1074
1109
|
isTitleVisible: e,
|
|
1075
1110
|
isSubtitleVisible: t
|
|
1076
|
-
}) => e && t ? lt.extend({ content: "block{2,}" }) : lt, Me = 0.1,
|
|
1111
|
+
}) => e && t ? lt.extend({ content: "block{2,}" }) : lt, Me = 0.1, ns = { light: 0.05, dark: 0.1 }, rs = (e, t) => {
|
|
1077
1112
|
switch (e.type) {
|
|
1078
1113
|
case "none":
|
|
1079
1114
|
return null;
|
|
1080
1115
|
case "solid":
|
|
1081
1116
|
return e.color;
|
|
1082
1117
|
case "tinted":
|
|
1083
|
-
return
|
|
1118
|
+
return is(e.color, t);
|
|
1084
1119
|
case "gradient":
|
|
1085
|
-
return
|
|
1120
|
+
return ss(e.color, t);
|
|
1086
1121
|
case "preset":
|
|
1087
|
-
return
|
|
1122
|
+
return _o[e.preset];
|
|
1088
1123
|
}
|
|
1089
|
-
},
|
|
1124
|
+
}, os = (e) => e.type === "none" ? 0 : e.width, as = (e, t, n) => {
|
|
1090
1125
|
if (e.type === "solid")
|
|
1091
1126
|
return e.color;
|
|
1092
1127
|
if (e.type === "tinted")
|
|
1093
|
-
return dt(n, e.color,
|
|
1094
|
-
},
|
|
1095
|
-
const r = e, o = t === "dark" ?
|
|
1128
|
+
return dt(n, e.color, ns[t]);
|
|
1129
|
+
}, is = (e, t) => t === "dark" ? je(e, Me) : hr(e, Me), ss = (e, t, n = 90) => {
|
|
1130
|
+
const r = e, o = t === "dark" ? je(e, Me) : hr(e, Me);
|
|
1096
1131
|
return `linear-gradient(${n}deg, ${r} 0%, ${o} 100%)`;
|
|
1097
1132
|
};
|
|
1098
|
-
var
|
|
1099
|
-
const
|
|
1100
|
-
const e =
|
|
1133
|
+
var ls = "bow4tg0", cs = "bow4tg1", ds = "bow4tg2", us = "bow4tg3", hs = "_1ii3bsb0", gs = "_1ii3bsb1";
|
|
1134
|
+
const Et = fe(null), _t = () => {
|
|
1135
|
+
const e = ee(Et);
|
|
1101
1136
|
if (!e) throw new Error("useThemeContext must be used inside a <ThemeProvider>.");
|
|
1102
1137
|
return e;
|
|
1103
|
-
},
|
|
1138
|
+
}, ps = ({ theme: e, themeOverrides: t = {}, appearance: n, children: r }) => {
|
|
1104
1139
|
const o = v(() => yr(e, t), [e, t]), i = v(() => {
|
|
1105
1140
|
const l = {
|
|
1106
1141
|
[s.textScale]: String(n.textScale)
|
|
1107
1142
|
};
|
|
1108
1143
|
for (const [u, h] of Object.entries(t))
|
|
1109
1144
|
l[s[u]] = h;
|
|
1110
|
-
const d =
|
|
1111
|
-
return d !== void 0 && (l[s.graphBackground] = d),
|
|
1145
|
+
const d = as(n.background, e, o.graphBackground);
|
|
1146
|
+
return d !== void 0 && (l[s.graphBackground] = d), sa(l);
|
|
1112
1147
|
}, [n.textScale, n.background, e, o.graphBackground, t]), c = v(
|
|
1113
1148
|
() => ({
|
|
1114
1149
|
theme: e,
|
|
1115
|
-
themeClass: e === "dark" ?
|
|
1150
|
+
themeClass: e === "dark" ? gs : hs,
|
|
1116
1151
|
inlineVarsStyle: i,
|
|
1117
1152
|
themeValues: o
|
|
1118
1153
|
}),
|
|
1119
1154
|
[e, i, o]
|
|
1120
1155
|
);
|
|
1121
|
-
return /* @__PURE__ */ a(
|
|
1156
|
+
return /* @__PURE__ */ a(Et.Provider, { value: c, children: r });
|
|
1122
1157
|
}, ae = ({ children: e, className: t, style: n }) => {
|
|
1123
|
-
const r =
|
|
1124
|
-
return /* @__PURE__ */ a("div", { className:
|
|
1125
|
-
},
|
|
1126
|
-
var
|
|
1127
|
-
const
|
|
1158
|
+
const r = ee(Et), o = r ? re(r.themeClass, cs) : void 0, i = r ? { ...r.inlineVarsStyle, ...n } : n;
|
|
1159
|
+
return /* @__PURE__ */ a("div", { className: re(o, t), style: i, children: e });
|
|
1160
|
+
}, fs = "graphy_root", ie = () => typeof document > "u" ? null : document.getElementById(fs) ?? document.body;
|
|
1161
|
+
var ms = "yp3g0k0", vs = "yp3g0k1", Er = "yp3g0k3", ys = "yp3g0k4", _r = "yp3g0k5", ht = "yp3g0k6", bs = "yp3g0k7", xs = "yp3g0k8", Pr = "yp3g0k9", Ss = "yp3g0ka", ks = "yp3g0kb", Ls = "yp3g0kc", Cs = "yp3g0kd", Ts = "yp3g0ke";
|
|
1162
|
+
const ws = Vn.map((e) => s[e]), As = Object.fromEntries(
|
|
1128
1163
|
Vn.map((e) => [s[e], e])
|
|
1129
|
-
),
|
|
1130
|
-
const o = J(), i =
|
|
1164
|
+
), Es = ({ editor: e, currentColor: t, isOpen: n, onOpenChange: r }) => {
|
|
1165
|
+
const o = J(), i = Ps(), c = mt(
|
|
1131
1166
|
(d) => {
|
|
1132
1167
|
e.chain().setColor(d).run();
|
|
1133
1168
|
},
|
|
@@ -1135,29 +1170,29 @@ const xs = Vn.map((e) => s[e]), Ss = Object.fromEntries(
|
|
|
1135
1170
|
), l = (d) => {
|
|
1136
1171
|
e.chain().focus().setColor(d).run(), r(!1);
|
|
1137
1172
|
};
|
|
1138
|
-
return /* @__PURE__ */
|
|
1173
|
+
return /* @__PURE__ */ m(F.Root, { open: n, onOpenChange: r, children: [
|
|
1139
1174
|
/* @__PURE__ */ a(
|
|
1140
1175
|
F.Trigger,
|
|
1141
1176
|
{
|
|
1142
1177
|
render: /* @__PURE__ */ a(H.Button, {}),
|
|
1143
1178
|
"aria-label": o("graph.toolbar.color.label"),
|
|
1144
|
-
className:
|
|
1179
|
+
className: ms,
|
|
1145
1180
|
onMouseDown: (d) => d.preventDefault(),
|
|
1146
|
-
children: /* @__PURE__ */ a("span", { className:
|
|
1181
|
+
children: /* @__PURE__ */ a("span", { className: vs, style: { background: t ?? "transparent" } })
|
|
1147
1182
|
}
|
|
1148
1183
|
),
|
|
1149
|
-
/* @__PURE__ */ a(F.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(F.Positioner, { sideOffset: 6, align: "start", className: Er, children: /* @__PURE__ */
|
|
1184
|
+
/* @__PURE__ */ a(F.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(F.Positioner, { sideOffset: 6, align: "start", className: Er, children: /* @__PURE__ */ m(F.Popup, { className: ys, onMouseDown: (d) => d.preventDefault(), children: [
|
|
1150
1185
|
/* @__PURE__ */ a(
|
|
1151
|
-
|
|
1186
|
+
Xt,
|
|
1152
1187
|
{
|
|
1153
1188
|
title: o("graph.colorDropdown.colors"),
|
|
1154
|
-
colors:
|
|
1189
|
+
colors: ws,
|
|
1155
1190
|
currentColor: t,
|
|
1156
1191
|
onPick: l
|
|
1157
1192
|
}
|
|
1158
1193
|
),
|
|
1159
1194
|
i.length > 0 && /* @__PURE__ */ a(
|
|
1160
|
-
|
|
1195
|
+
Xt,
|
|
1161
1196
|
{
|
|
1162
1197
|
title: o("graph.colorDropdown.chartColors"),
|
|
1163
1198
|
colors: i,
|
|
@@ -1165,58 +1200,58 @@ const xs = Vn.map((e) => s[e]), Ss = Object.fromEntries(
|
|
|
1165
1200
|
onPick: l
|
|
1166
1201
|
}
|
|
1167
1202
|
),
|
|
1168
|
-
/* @__PURE__ */ a(
|
|
1203
|
+
/* @__PURE__ */ a(_s, { value: t ?? "#000000", onChange: c })
|
|
1169
1204
|
] }) }) }) })
|
|
1170
1205
|
] });
|
|
1171
|
-
},
|
|
1206
|
+
}, Xt = ({ title: e, colors: t, currentColor: n, onPick: r }) => /* @__PURE__ */ m("div", { className: _r, children: [
|
|
1172
1207
|
/* @__PURE__ */ a("div", { className: ht, children: e }),
|
|
1173
|
-
/* @__PURE__ */ a("div", { className:
|
|
1208
|
+
/* @__PURE__ */ a("div", { className: bs, children: t.map((o) => /* @__PURE__ */ a(
|
|
1174
1209
|
"button",
|
|
1175
1210
|
{
|
|
1176
1211
|
type: "button",
|
|
1177
1212
|
"aria-label": o,
|
|
1178
|
-
className:
|
|
1179
|
-
"data-active":
|
|
1213
|
+
className: xs,
|
|
1214
|
+
"data-active": Fs(o, n),
|
|
1180
1215
|
onMouseDown: (i) => i.preventDefault(),
|
|
1181
1216
|
onClick: () => r(o),
|
|
1182
1217
|
children: /* @__PURE__ */ a("span", { className: Pr, style: Hr(o) })
|
|
1183
1218
|
},
|
|
1184
1219
|
o
|
|
1185
1220
|
)) })
|
|
1186
|
-
] }),
|
|
1187
|
-
const n = J(), [r, o] = E(!1), i =
|
|
1188
|
-
return /* @__PURE__ */
|
|
1189
|
-
/* @__PURE__ */
|
|
1221
|
+
] }), _s = ({ value: e, onChange: t }) => {
|
|
1222
|
+
const n = J(), [r, o] = E(!1), i = Li(e) ? e : "#000000", c = Hs(i);
|
|
1223
|
+
return /* @__PURE__ */ m(F.Root, { open: r, onOpenChange: o, children: [
|
|
1224
|
+
/* @__PURE__ */ m("div", { className: _r, children: [
|
|
1190
1225
|
/* @__PURE__ */ a("div", { className: ht, children: n("graph.colorDropdown.custom") }),
|
|
1191
|
-
/* @__PURE__ */
|
|
1226
|
+
/* @__PURE__ */ m(
|
|
1192
1227
|
F.Trigger,
|
|
1193
1228
|
{
|
|
1194
|
-
className:
|
|
1229
|
+
className: Ss,
|
|
1195
1230
|
onMouseDown: (l) => l.preventDefault(),
|
|
1196
1231
|
"aria-label": n("graph.colorDropdown.pickCustom"),
|
|
1197
1232
|
children: [
|
|
1198
1233
|
/* @__PURE__ */ a("span", { className: Pr, style: Hr(i) }),
|
|
1199
|
-
/* @__PURE__ */ a("span", { className:
|
|
1234
|
+
/* @__PURE__ */ a("span", { className: ks, children: c })
|
|
1200
1235
|
]
|
|
1201
1236
|
}
|
|
1202
1237
|
)
|
|
1203
1238
|
] }),
|
|
1204
|
-
/* @__PURE__ */ a(F.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(F.Positioner, { side: "right", align: "start", sideOffset: 18, className: Er, children: /* @__PURE__ */
|
|
1239
|
+
/* @__PURE__ */ a(F.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(F.Positioner, { side: "right", align: "start", sideOffset: 18, className: Er, children: /* @__PURE__ */ m(F.Popup, { className: Ls, onMouseDown: (l) => l.preventDefault(), children: [
|
|
1205
1240
|
/* @__PURE__ */ a("div", { className: ht, children: n("graph.colorDropdown.pickColor") }),
|
|
1206
|
-
/* @__PURE__ */ a(
|
|
1241
|
+
/* @__PURE__ */ a(la, { color: c, onChange: t, className: Cs }),
|
|
1207
1242
|
/* @__PURE__ */ a(
|
|
1208
|
-
|
|
1243
|
+
ca,
|
|
1209
1244
|
{
|
|
1210
1245
|
color: c,
|
|
1211
1246
|
onChange: t,
|
|
1212
1247
|
prefixed: !0,
|
|
1213
|
-
className:
|
|
1248
|
+
className: Ts,
|
|
1214
1249
|
onMouseDown: (l) => l.stopPropagation()
|
|
1215
1250
|
}
|
|
1216
1251
|
)
|
|
1217
1252
|
] }) }) }) })
|
|
1218
1253
|
] });
|
|
1219
|
-
},
|
|
1254
|
+
}, Ps = () => {
|
|
1220
1255
|
const e = B((t) => t.scales.color);
|
|
1221
1256
|
return v(() => {
|
|
1222
1257
|
if (!e || e.kind !== "visual") return [];
|
|
@@ -1229,13 +1264,13 @@ const xs = Vn.map((e) => s[e]), Ss = Object.fromEntries(
|
|
|
1229
1264
|
}, [e]);
|
|
1230
1265
|
}, Hr = (e) => ({
|
|
1231
1266
|
background: e,
|
|
1232
|
-
border: `1px solid ${
|
|
1233
|
-
}),
|
|
1234
|
-
const { themeValues: t } =
|
|
1235
|
-
if (
|
|
1236
|
-
const n =
|
|
1267
|
+
border: `1px solid ${je(e, 0.1)}`
|
|
1268
|
+
}), Hs = (e) => {
|
|
1269
|
+
const { themeValues: t } = _t();
|
|
1270
|
+
if (ki(e)) return e.toUpperCase();
|
|
1271
|
+
const n = As[e];
|
|
1237
1272
|
return n ? t[n].toUpperCase() : "#000000";
|
|
1238
|
-
},
|
|
1273
|
+
}, Fs = (e, t) => t === null ? !1 : e.toLowerCase() === t.toLowerCase(), Ns = {
|
|
1239
1274
|
xxs: 8,
|
|
1240
1275
|
xs: 12,
|
|
1241
1276
|
sm: 16,
|
|
@@ -1243,13 +1278,13 @@ const xs = Vn.map((e) => s[e]), Ss = Object.fromEntries(
|
|
|
1243
1278
|
lg: 24,
|
|
1244
1279
|
xl: 36
|
|
1245
1280
|
};
|
|
1246
|
-
var
|
|
1281
|
+
var Bs = { primary: "asohov1 asohov0", secondary: "asohov2 asohov0" };
|
|
1247
1282
|
const Z = ({ children: e, title: t, variant: n = "primary", size: r = "sm", ...o }) => {
|
|
1248
|
-
const i = vt(), c =
|
|
1249
|
-
return /* @__PURE__ */
|
|
1283
|
+
const i = vt(), c = Ns[r];
|
|
1284
|
+
return /* @__PURE__ */ m(
|
|
1250
1285
|
"svg",
|
|
1251
1286
|
{
|
|
1252
|
-
className:
|
|
1287
|
+
className: Bs[n],
|
|
1253
1288
|
"aria-labelledby": t ? i : void 0,
|
|
1254
1289
|
height: c,
|
|
1255
1290
|
width: c,
|
|
@@ -1263,21 +1298,21 @@ const Z = ({ children: e, title: t, variant: n = "primary", size: r = "sm", ...o
|
|
|
1263
1298
|
]
|
|
1264
1299
|
}
|
|
1265
1300
|
);
|
|
1266
|
-
}, Fr = (e) => /* @__PURE__ */ a(Z, { ...e, children: /* @__PURE__ */ a("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ a("path", { d: "m6 9 6 6 6-6" }) }) }),
|
|
1301
|
+
}, Fr = (e) => /* @__PURE__ */ a(Z, { ...e, children: /* @__PURE__ */ a("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ a("path", { d: "m6 9 6 6 6-6" }) }) }), Is = "'Noto Serif', Georgia, 'Times New Roman', serif, 'Apple Color Emoji', 'NotoColorEmoji'", Nr = `'Aeonik', 'Aeonik Fallback', ${R}`, Ms = "'PT Mono', 'Courier New', monospace, 'Apple Color Emoji', 'NotoColorEmoji'", Ds = "'Intruding Cat', cursive, 'Apple Color Emoji', 'NotoColorEmoji'", Os = `var(--brand-font-family), ${Nr}`, gt = [
|
|
1267
1302
|
{ id: "modern", label: "Modern", preview: "Aa", fontFamily: R },
|
|
1268
1303
|
{ id: "fresh", label: "Fresh", preview: "Aa", fontFamily: Nr },
|
|
1269
|
-
{ id: "timeless", label: "Timeless", preview: "Aa", fontFamily:
|
|
1270
|
-
{ id: "technical", label: "Technical", preview: "00", fontFamily:
|
|
1271
|
-
{ id: "fineliner", label: "Fineliner", preview: "Aa", fontFamily:
|
|
1272
|
-
{ id: "brand", label: "Brand", preview: "Aa", fontFamily:
|
|
1273
|
-
],
|
|
1304
|
+
{ id: "timeless", label: "Timeless", preview: "Aa", fontFamily: Is },
|
|
1305
|
+
{ id: "technical", label: "Technical", preview: "00", fontFamily: Ms },
|
|
1306
|
+
{ id: "fineliner", label: "Fineliner", preview: "Aa", fontFamily: Ds },
|
|
1307
|
+
{ id: "brand", label: "Brand", preview: "Aa", fontFamily: Os }
|
|
1308
|
+
], Rs = (e) => e ? gt.find((t) => t.fontFamily === e) ?? null : null;
|
|
1274
1309
|
var Br = "_1qkyw7q0", Ir = "_1qkyw7q1", Mr = "_1qkyw7q3", Dr = "_1qkyw7q4", Or = "_1qkyw7q5";
|
|
1275
|
-
const
|
|
1276
|
-
const o = J(), i =
|
|
1310
|
+
const zs = ({ editor: e, currentFontFamily: t, isOpen: n, onOpenChange: r }) => {
|
|
1311
|
+
const o = J(), i = Rs(t) ?? gt[0], c = (l) => {
|
|
1277
1312
|
e.chain().focus().setFontFamily(l.fontFamily).run();
|
|
1278
1313
|
};
|
|
1279
|
-
return /* @__PURE__ */
|
|
1280
|
-
/* @__PURE__ */
|
|
1314
|
+
return /* @__PURE__ */ m(M.Root, { open: n, onOpenChange: r, children: [
|
|
1315
|
+
/* @__PURE__ */ m(
|
|
1281
1316
|
M.Trigger,
|
|
1282
1317
|
{
|
|
1283
1318
|
render: /* @__PURE__ */ a(H.Button, {}),
|
|
@@ -1305,16 +1340,16 @@ const Bs = ({ editor: e, currentFontFamily: t, isOpen: n, onOpenChange: r }) =>
|
|
|
1305
1340
|
id: "text",
|
|
1306
1341
|
translationKey: "graph.toolbar.heading.text",
|
|
1307
1342
|
previewFont: s.fontTextEditorBody
|
|
1308
|
-
},
|
|
1343
|
+
}, Vt = [
|
|
1309
1344
|
{ id: "caption", translationKey: "graph.toolbar.heading.caption", previewFont: s.fontTextEditorH6 },
|
|
1310
1345
|
Rr,
|
|
1311
1346
|
{ id: "h3", translationKey: "graph.toolbar.heading.heading3", previewFont: s.fontTextEditorH3 },
|
|
1312
1347
|
{ id: "h2", translationKey: "graph.toolbar.heading.heading2", previewFont: s.fontTextEditorH2 },
|
|
1313
1348
|
{ id: "h1", translationKey: "graph.toolbar.heading.heading1", previewFont: s.fontTextEditorH1 }
|
|
1314
|
-
],
|
|
1315
|
-
const o = J(), i =
|
|
1316
|
-
return /* @__PURE__ */
|
|
1317
|
-
/* @__PURE__ */
|
|
1349
|
+
], Gs = ({ editor: e, activeStyle: t, isOpen: n, onOpenChange: r }) => {
|
|
1350
|
+
const o = J(), i = Vt.find((c) => c.id === t) ?? Rr;
|
|
1351
|
+
return /* @__PURE__ */ m(M.Root, { open: n, onOpenChange: r, children: [
|
|
1352
|
+
/* @__PURE__ */ m(
|
|
1318
1353
|
M.Trigger,
|
|
1319
1354
|
{
|
|
1320
1355
|
render: /* @__PURE__ */ a(H.Button, {}),
|
|
@@ -1327,18 +1362,18 @@ const Bs = ({ editor: e, currentFontFamily: t, isOpen: n, onOpenChange: r }) =>
|
|
|
1327
1362
|
]
|
|
1328
1363
|
}
|
|
1329
1364
|
),
|
|
1330
|
-
/* @__PURE__ */ a(M.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(M.Positioner, { side: "bottom", align: "start", sideOffset: 6, className: Mr, children: /* @__PURE__ */ a(M.Popup, { className: Dr, onMouseDown: (c) => c.preventDefault(), children:
|
|
1365
|
+
/* @__PURE__ */ a(M.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(M.Positioner, { side: "bottom", align: "start", sideOffset: 6, className: Mr, children: /* @__PURE__ */ a(M.Popup, { className: Dr, onMouseDown: (c) => c.preventDefault(), children: Vt.map((c) => /* @__PURE__ */ a(
|
|
1331
1366
|
M.Item,
|
|
1332
1367
|
{
|
|
1333
1368
|
className: Or,
|
|
1334
1369
|
"data-selected": c.id === i.id,
|
|
1335
|
-
onClick: () =>
|
|
1336
|
-
children: /* @__PURE__ */ a(
|
|
1370
|
+
onClick: () => Ws(e, c.id),
|
|
1371
|
+
children: /* @__PURE__ */ a($s, { font: c.previewFont, children: o(c.translationKey) })
|
|
1337
1372
|
},
|
|
1338
1373
|
c.id
|
|
1339
1374
|
)) }) }) }) })
|
|
1340
1375
|
] });
|
|
1341
|
-
},
|
|
1376
|
+
}, Ws = (e, t) => {
|
|
1342
1377
|
switch (t) {
|
|
1343
1378
|
case "caption": {
|
|
1344
1379
|
e.chain().focus().setNode("paragraph", { variant: "caption" }).run();
|
|
@@ -1357,53 +1392,53 @@ const Bs = ({ editor: e, currentFontFamily: t, isOpen: n, onOpenChange: r }) =>
|
|
|
1357
1392
|
case "h3":
|
|
1358
1393
|
e.chain().focus().setHeading({ level: 3 }).run();
|
|
1359
1394
|
}
|
|
1360
|
-
},
|
|
1395
|
+
}, $s = ({ font: e, children: t }) => /* @__PURE__ */ a("span", { style: { font: e, margin: 0 }, children: t }), Xs = (e) => /* @__PURE__ */ a(Z, { ...e, children: /* @__PURE__ */ a("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ a("path", { d: "M20 6 9 17l-5-5" }) }) }), Vs = (e) => /* @__PURE__ */ a(Z, { ...e, children: /* @__PURE__ */ m("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1361
1396
|
/* @__PURE__ */ a("path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" }),
|
|
1362
1397
|
/* @__PURE__ */ a("path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" })
|
|
1363
|
-
] }) }),
|
|
1398
|
+
] }) }), Us = (e) => /* @__PURE__ */ a(Z, { ...e, children: /* @__PURE__ */ m("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1364
1399
|
/* @__PURE__ */ a("path", { d: "M18 6 6 18" }),
|
|
1365
1400
|
/* @__PURE__ */ a("path", { d: "m6 6 12 12" })
|
|
1366
|
-
] }) }),
|
|
1401
|
+
] }) }), Ys = (e) => !e.content || e.content.length === 0 ? !0 : e.content.every((t) => !t.content || t.content.length === 0), js = (e) => {
|
|
1367
1402
|
const { $from: t } = e.state.selection, n = t.parent.textContent, r = t.parentOffset, o = t.start();
|
|
1368
1403
|
let i = r;
|
|
1369
|
-
for (; i > 0 &&
|
|
1404
|
+
for (; i > 0 && Ut(n[i - 1]); ) i -= 1;
|
|
1370
1405
|
let c = r;
|
|
1371
|
-
for (; c < n.length &&
|
|
1406
|
+
for (; c < n.length && Ut(n[c]); ) c += 1;
|
|
1372
1407
|
return { from: o + i, to: o + c };
|
|
1373
|
-
},
|
|
1374
|
-
var
|
|
1375
|
-
const
|
|
1376
|
-
const i = J(), [c, l] = E(""), d =
|
|
1408
|
+
}, Ut = (e) => e !== void 0 && /\S/.test(e);
|
|
1409
|
+
var qs = "b5kquu0", Ks = "b5kquu1", Js = "b5kquu2", Zs = "b5kquu3", Yt = "b5kquu4";
|
|
1410
|
+
const Qs = ({ editor: e, currentUrl: t, isActive: n, isOpen: r, onOpenChange: o }) => {
|
|
1411
|
+
const i = J(), [c, l] = E(""), d = C(null);
|
|
1377
1412
|
L(() => {
|
|
1378
1413
|
r && l(t ?? "");
|
|
1379
1414
|
}, [r, t]);
|
|
1380
1415
|
const u = () => {
|
|
1381
|
-
|
|
1416
|
+
el(e, c), o(!1);
|
|
1382
1417
|
}, h = () => {
|
|
1383
1418
|
l(""), o(!1);
|
|
1384
|
-
}, g = (
|
|
1385
|
-
l(
|
|
1386
|
-
},
|
|
1387
|
-
|
|
1419
|
+
}, g = (f) => {
|
|
1420
|
+
l(f.target.value);
|
|
1421
|
+
}, p = (f) => {
|
|
1422
|
+
f.key === "Enter" && (f.preventDefault(), u());
|
|
1388
1423
|
};
|
|
1389
|
-
return /* @__PURE__ */
|
|
1424
|
+
return /* @__PURE__ */ m(F.Root, { open: r, onOpenChange: o, children: [
|
|
1390
1425
|
/* @__PURE__ */ a(
|
|
1391
1426
|
F.Trigger,
|
|
1392
1427
|
{
|
|
1393
1428
|
render: /* @__PURE__ */ a(H.Button, {}),
|
|
1394
1429
|
"aria-label": i("graph.toolbar.formatting.link"),
|
|
1395
1430
|
"data-active": n,
|
|
1396
|
-
className:
|
|
1397
|
-
onMouseDown: (
|
|
1398
|
-
children: /* @__PURE__ */ a(
|
|
1431
|
+
className: qs,
|
|
1432
|
+
onMouseDown: (f) => f.preventDefault(),
|
|
1433
|
+
children: /* @__PURE__ */ a(Vs, {})
|
|
1399
1434
|
}
|
|
1400
1435
|
),
|
|
1401
|
-
/* @__PURE__ */ a(F.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(F.Positioner, { sideOffset: 6, align: "end", className:
|
|
1436
|
+
/* @__PURE__ */ a(F.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(F.Positioner, { sideOffset: 6, align: "end", className: Ks, children: /* @__PURE__ */ m(
|
|
1402
1437
|
F.Popup,
|
|
1403
1438
|
{
|
|
1404
|
-
className:
|
|
1439
|
+
className: Js,
|
|
1405
1440
|
initialFocus: d,
|
|
1406
|
-
onMouseDown: (
|
|
1441
|
+
onMouseDown: (f) => f.preventDefault(),
|
|
1407
1442
|
children: [
|
|
1408
1443
|
/* @__PURE__ */ a(
|
|
1409
1444
|
"input",
|
|
@@ -1413,28 +1448,28 @@ const Ys = ({ editor: e, currentUrl: t, isActive: n, isOpen: r, onOpenChange: o
|
|
|
1413
1448
|
value: c,
|
|
1414
1449
|
placeholder: i("graph.toolbar.link.placeholder"),
|
|
1415
1450
|
"aria-label": i("graph.toolbar.link.urlLabel"),
|
|
1416
|
-
className:
|
|
1417
|
-
onMouseDown: (
|
|
1451
|
+
className: Zs,
|
|
1452
|
+
onMouseDown: (f) => f.stopPropagation(),
|
|
1418
1453
|
onChange: g,
|
|
1419
|
-
onKeyDown:
|
|
1454
|
+
onKeyDown: p
|
|
1420
1455
|
}
|
|
1421
1456
|
),
|
|
1422
|
-
/* @__PURE__ */ a("button", { type: "button", "aria-label": i("common.cancel"), className:
|
|
1457
|
+
/* @__PURE__ */ a("button", { type: "button", "aria-label": i("common.cancel"), className: Yt, onClick: h, children: /* @__PURE__ */ a(Us, {}) }),
|
|
1423
1458
|
/* @__PURE__ */ a(
|
|
1424
1459
|
"button",
|
|
1425
1460
|
{
|
|
1426
1461
|
type: "button",
|
|
1427
1462
|
"aria-label": i("graph.toolbar.link.apply"),
|
|
1428
|
-
className:
|
|
1463
|
+
className: Yt,
|
|
1429
1464
|
onClick: u,
|
|
1430
|
-
children: /* @__PURE__ */ a(
|
|
1465
|
+
children: /* @__PURE__ */ a(Xs, {})
|
|
1431
1466
|
}
|
|
1432
1467
|
)
|
|
1433
1468
|
]
|
|
1434
1469
|
}
|
|
1435
1470
|
) }) }) })
|
|
1436
1471
|
] });
|
|
1437
|
-
},
|
|
1472
|
+
}, el = (e, t) => {
|
|
1438
1473
|
const n = t.trim(), { selection: r } = e.state;
|
|
1439
1474
|
if (!n) {
|
|
1440
1475
|
e.chain().focus().extendMarkRange("link").unsetLink().run();
|
|
@@ -1448,47 +1483,47 @@ const Ys = ({ editor: e, currentUrl: t, isActive: n, isOpen: r, onOpenChange: o
|
|
|
1448
1483
|
e.chain().focus().extendMarkRange("link").setLink({ href: n }).run();
|
|
1449
1484
|
return;
|
|
1450
1485
|
}
|
|
1451
|
-
const o =
|
|
1486
|
+
const o = js(e);
|
|
1452
1487
|
e.chain().focus().setTextSelection(o).setLink({ href: n }).run();
|
|
1453
|
-
},
|
|
1488
|
+
}, tl = (e) => /* @__PURE__ */ a(Z, { ...e, children: /* @__PURE__ */ m("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1454
1489
|
/* @__PURE__ */ a("path", { d: "M21 5H3" }),
|
|
1455
1490
|
/* @__PURE__ */ a("path", { d: "M17 12H7" }),
|
|
1456
1491
|
/* @__PURE__ */ a("path", { d: "M19 19H5" })
|
|
1457
|
-
] }) }),
|
|
1492
|
+
] }) }), nl = (e) => /* @__PURE__ */ a(Z, { ...e, children: /* @__PURE__ */ m("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1458
1493
|
/* @__PURE__ */ a("path", { d: "M21 5H3" }),
|
|
1459
1494
|
/* @__PURE__ */ a("path", { d: "M21 12H9" }),
|
|
1460
1495
|
/* @__PURE__ */ a("path", { d: "M21 19H7" })
|
|
1461
|
-
] }) }),
|
|
1496
|
+
] }) }), rl = (e) => /* @__PURE__ */ a(Z, { ...e, children: /* @__PURE__ */ m("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1462
1497
|
/* @__PURE__ */ a("path", { d: "M21 5H3" }),
|
|
1463
1498
|
/* @__PURE__ */ a("path", { d: "M15 12H3" }),
|
|
1464
1499
|
/* @__PURE__ */ a("path", { d: "M17 19H3" })
|
|
1465
1500
|
] }) });
|
|
1466
|
-
var
|
|
1467
|
-
const
|
|
1501
|
+
var ol = "k91gos0", al = "k91gos1";
|
|
1502
|
+
const il = 6, de = ({ label: e, isActive: t, onToggle: n, children: r }) => {
|
|
1468
1503
|
const o = (i) => i.preventDefault();
|
|
1469
|
-
return /* @__PURE__ */
|
|
1504
|
+
return /* @__PURE__ */ m(le.Root, { children: [
|
|
1470
1505
|
/* @__PURE__ */ a(
|
|
1471
1506
|
le.Trigger,
|
|
1472
1507
|
{
|
|
1473
|
-
render: /* @__PURE__ */ a(
|
|
1508
|
+
render: /* @__PURE__ */ a(da, { render: /* @__PURE__ */ a(H.Button, {}), pressed: t, onPressedChange: () => n() }),
|
|
1474
1509
|
"aria-label": e,
|
|
1475
|
-
className:
|
|
1510
|
+
className: ol,
|
|
1476
1511
|
onMouseDown: o,
|
|
1477
1512
|
children: r
|
|
1478
1513
|
}
|
|
1479
1514
|
),
|
|
1480
|
-
/* @__PURE__ */ a(le.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(le.Positioner, { sideOffset:
|
|
1515
|
+
/* @__PURE__ */ a(le.Portal, { container: ie(), children: /* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(le.Positioner, { sideOffset: il, children: /* @__PURE__ */ a(le.Popup, { className: al, children: e }) }) }) })
|
|
1481
1516
|
] });
|
|
1482
|
-
},
|
|
1517
|
+
}, sl = ({ editor: e, activeAlignment: t = "left" }) => {
|
|
1483
1518
|
const n = J();
|
|
1484
|
-
return /* @__PURE__ */
|
|
1519
|
+
return /* @__PURE__ */ m(T, { children: [
|
|
1485
1520
|
/* @__PURE__ */ a(
|
|
1486
1521
|
de,
|
|
1487
1522
|
{
|
|
1488
1523
|
label: n("graph.toolbar.textAlign.left"),
|
|
1489
1524
|
isActive: t === "left",
|
|
1490
1525
|
onToggle: () => e.chain().focus().setTextAlign("left").run(),
|
|
1491
|
-
children: /* @__PURE__ */ a(
|
|
1526
|
+
children: /* @__PURE__ */ a(rl, {})
|
|
1492
1527
|
}
|
|
1493
1528
|
),
|
|
1494
1529
|
/* @__PURE__ */ a(
|
|
@@ -1497,7 +1532,7 @@ const el = 6, de = ({ label: e, isActive: t, onToggle: n, children: r }) => {
|
|
|
1497
1532
|
label: n("graph.toolbar.textAlign.center"),
|
|
1498
1533
|
isActive: t === "center",
|
|
1499
1534
|
onToggle: () => e.chain().focus().setTextAlign("center").run(),
|
|
1500
|
-
children: /* @__PURE__ */ a(
|
|
1535
|
+
children: /* @__PURE__ */ a(tl, {})
|
|
1501
1536
|
}
|
|
1502
1537
|
),
|
|
1503
1538
|
/* @__PURE__ */ a(
|
|
@@ -1506,13 +1541,13 @@ const el = 6, de = ({ label: e, isActive: t, onToggle: n, children: r }) => {
|
|
|
1506
1541
|
label: n("graph.toolbar.textAlign.right"),
|
|
1507
1542
|
isActive: t === "right",
|
|
1508
1543
|
onToggle: () => e.chain().focus().setTextAlign("right").run(),
|
|
1509
|
-
children: /* @__PURE__ */ a(
|
|
1544
|
+
children: /* @__PURE__ */ a(nl, {})
|
|
1510
1545
|
}
|
|
1511
1546
|
)
|
|
1512
1547
|
] });
|
|
1513
1548
|
};
|
|
1514
|
-
var
|
|
1515
|
-
const
|
|
1549
|
+
var ll = "_1bp10ig0", Se = "_1bp10ig1", Ne = "_1bp10ig2";
|
|
1550
|
+
const cl = ({ editor: e }) => ({
|
|
1516
1551
|
isBold: e?.isActive("bold") ?? !1,
|
|
1517
1552
|
isItalic: e?.isActive("italic") ?? !1,
|
|
1518
1553
|
isUnderline: e?.isActive("underline") ?? !1,
|
|
@@ -1520,20 +1555,20 @@ const rl = ({ editor: e }) => ({
|
|
|
1520
1555
|
linkUrl: e?.getAttributes("link").href ?? null,
|
|
1521
1556
|
color: e?.getAttributes("textStyle").color ?? null,
|
|
1522
1557
|
fontFamily: e?.getAttributes("textStyle").fontFamily ?? null,
|
|
1523
|
-
fontSize:
|
|
1524
|
-
textAlign:
|
|
1525
|
-
}),
|
|
1558
|
+
fontSize: dl(e),
|
|
1559
|
+
textAlign: ul(e)
|
|
1560
|
+
}), dl = (e) => e ? e.isActive("heading", { level: 1 }) ? "h1" : e.isActive("heading", { level: 2 }) ? "h2" : e.isActive("heading", { level: 3 }) ? "h3" : e.isActive("paragraph", { variant: "caption" }) ? "caption" : "text" : "text", ul = (e) => e ? e.isActive({ textAlign: "center" }) ? "center" : e.isActive({ textAlign: "right" }) ? "right" : "left" : "left", hl = 8, gl = 8, pl = ({ editor: e }) => {
|
|
1526
1561
|
const t = J(), [n, r] = E(!1), [o, i] = E(null), c = o !== null, l = (y) => (S) => {
|
|
1527
1562
|
i(S ? y : null);
|
|
1528
1563
|
}, { refs: d, floatingStyles: u } = xt({
|
|
1529
1564
|
placement: "top-start",
|
|
1530
1565
|
strategy: "fixed",
|
|
1531
|
-
middleware: [St(
|
|
1532
|
-
whileElementsMounted:
|
|
1533
|
-
}), h =
|
|
1566
|
+
middleware: [St(hl), kt(), Lt({ padding: gl })],
|
|
1567
|
+
whileElementsMounted: ea
|
|
1568
|
+
}), h = C(null), g = ra({
|
|
1534
1569
|
editor: e,
|
|
1535
|
-
selector:
|
|
1536
|
-
}),
|
|
1570
|
+
selector: cl
|
|
1571
|
+
}), p = mt(
|
|
1537
1572
|
(y) => {
|
|
1538
1573
|
h.current = y, d.setFloating(y);
|
|
1539
1574
|
},
|
|
@@ -1551,12 +1586,12 @@ const rl = ({ editor: e }) => ({
|
|
|
1551
1586
|
e.off("focus", y), e.off("blur", S);
|
|
1552
1587
|
};
|
|
1553
1588
|
}, [e]), !e || !n && !c) return null;
|
|
1554
|
-
const
|
|
1555
|
-
return
|
|
1556
|
-
/* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(le.Provider, { children: /* @__PURE__ */
|
|
1557
|
-
/* @__PURE__ */
|
|
1589
|
+
const f = ie();
|
|
1590
|
+
return f ? ia(
|
|
1591
|
+
/* @__PURE__ */ a(ae, { children: /* @__PURE__ */ a(le.Provider, { children: /* @__PURE__ */ m(H.Root, { ref: p, className: ll, style: u, children: [
|
|
1592
|
+
/* @__PURE__ */ m(H.Group, { className: Se, children: [
|
|
1558
1593
|
/* @__PURE__ */ a(
|
|
1559
|
-
|
|
1594
|
+
Es,
|
|
1560
1595
|
{
|
|
1561
1596
|
editor: e,
|
|
1562
1597
|
currentColor: g?.color ?? null,
|
|
@@ -1565,7 +1600,7 @@ const rl = ({ editor: e }) => ({
|
|
|
1565
1600
|
}
|
|
1566
1601
|
),
|
|
1567
1602
|
/* @__PURE__ */ a(
|
|
1568
|
-
|
|
1603
|
+
zs,
|
|
1569
1604
|
{
|
|
1570
1605
|
editor: e,
|
|
1571
1606
|
currentFontFamily: g?.fontFamily ?? null,
|
|
@@ -1576,7 +1611,7 @@ const rl = ({ editor: e }) => ({
|
|
|
1576
1611
|
] }),
|
|
1577
1612
|
/* @__PURE__ */ a(H.Separator, { className: Ne }),
|
|
1578
1613
|
/* @__PURE__ */ a(H.Group, { className: Se, children: /* @__PURE__ */ a(
|
|
1579
|
-
|
|
1614
|
+
Gs,
|
|
1580
1615
|
{
|
|
1581
1616
|
editor: e,
|
|
1582
1617
|
activeStyle: g?.fontSize ?? "text",
|
|
@@ -1585,7 +1620,7 @@ const rl = ({ editor: e }) => ({
|
|
|
1585
1620
|
}
|
|
1586
1621
|
) }),
|
|
1587
1622
|
/* @__PURE__ */ a(H.Separator, { className: Ne }),
|
|
1588
|
-
/* @__PURE__ */
|
|
1623
|
+
/* @__PURE__ */ m(H.Group, { className: Se, children: [
|
|
1589
1624
|
/* @__PURE__ */ a(
|
|
1590
1625
|
de,
|
|
1591
1626
|
{
|
|
@@ -1615,10 +1650,10 @@ const rl = ({ editor: e }) => ({
|
|
|
1615
1650
|
)
|
|
1616
1651
|
] }),
|
|
1617
1652
|
/* @__PURE__ */ a(H.Separator, { className: Ne }),
|
|
1618
|
-
/* @__PURE__ */ a(H.Group, { className: Se, children: /* @__PURE__ */ a(
|
|
1653
|
+
/* @__PURE__ */ a(H.Group, { className: Se, children: /* @__PURE__ */ a(sl, { editor: e, activeAlignment: g?.textAlign }) }),
|
|
1619
1654
|
/* @__PURE__ */ a(H.Separator, { className: Ne }),
|
|
1620
1655
|
/* @__PURE__ */ a(H.Group, { className: Se, children: /* @__PURE__ */ a(
|
|
1621
|
-
|
|
1656
|
+
Qs,
|
|
1622
1657
|
{
|
|
1623
1658
|
editor: e,
|
|
1624
1659
|
currentUrl: g?.linkUrl ?? null,
|
|
@@ -1628,19 +1663,19 @@ const rl = ({ editor: e }) => ({
|
|
|
1628
1663
|
}
|
|
1629
1664
|
) })
|
|
1630
1665
|
] }) }) }),
|
|
1631
|
-
|
|
1666
|
+
f
|
|
1632
1667
|
) : null;
|
|
1633
1668
|
};
|
|
1634
|
-
var
|
|
1635
|
-
const zr = ({ editor: e, ariaLabel: t }) => /* @__PURE__ */
|
|
1636
|
-
/* @__PURE__ */ a(
|
|
1637
|
-
/* @__PURE__ */ a(
|
|
1638
|
-
] }),
|
|
1639
|
-
const n =
|
|
1669
|
+
var fl = "_2ngohc0";
|
|
1670
|
+
const zr = ({ editor: e, ariaLabel: t }) => /* @__PURE__ */ m("div", { className: fl, children: [
|
|
1671
|
+
/* @__PURE__ */ a(pl, { editor: e }),
|
|
1672
|
+
/* @__PURE__ */ a(oa, { editor: e, "aria-label": t })
|
|
1673
|
+
] }), ml = (e, t) => {
|
|
1674
|
+
const n = C(e);
|
|
1640
1675
|
n.current = e;
|
|
1641
|
-
const r =
|
|
1676
|
+
const r = C(t);
|
|
1642
1677
|
r.current = t;
|
|
1643
|
-
const o =
|
|
1678
|
+
const o = C(null), i = C(null), c = v(() => {
|
|
1644
1679
|
const l = () => {
|
|
1645
1680
|
i.current !== null && (clearTimeout(i.current), i.current = null), o.current = null;
|
|
1646
1681
|
}, d = () => {
|
|
@@ -1659,16 +1694,16 @@ const zr = ({ editor: e, ariaLabel: t }) => /* @__PURE__ */ f("div", { className
|
|
|
1659
1694
|
return L(() => () => {
|
|
1660
1695
|
i.current !== null && clearTimeout(i.current);
|
|
1661
1696
|
}, []), c;
|
|
1662
|
-
},
|
|
1697
|
+
}, vl = 200, Gr = ({
|
|
1663
1698
|
content: e,
|
|
1664
1699
|
extensions: t,
|
|
1665
1700
|
isEditable: n,
|
|
1666
1701
|
onUpdate: r,
|
|
1667
|
-
updateDebounceMs: o =
|
|
1702
|
+
updateDebounceMs: o = vl
|
|
1668
1703
|
}) => {
|
|
1669
|
-
const i =
|
|
1704
|
+
const i = C(jt(e)), c = C(!1), l = ml((u) => {
|
|
1670
1705
|
c.current = !0, r?.(u);
|
|
1671
|
-
}, o), d =
|
|
1706
|
+
}, o), d = aa({
|
|
1672
1707
|
extensions: t,
|
|
1673
1708
|
content: i.current,
|
|
1674
1709
|
editable: n,
|
|
@@ -1683,12 +1718,12 @@ const zr = ({ editor: e, ariaLabel: t }) => /* @__PURE__ */ f("div", { className
|
|
|
1683
1718
|
c.current = !1;
|
|
1684
1719
|
return;
|
|
1685
1720
|
}
|
|
1686
|
-
const u =
|
|
1687
|
-
|
|
1721
|
+
const u = jt(e), h = d.getJSON();
|
|
1722
|
+
yl(h, u) || (l.cancel(), d.commands.setContent(u, { emitUpdate: !1 }));
|
|
1688
1723
|
}, [d, e, l]), L(() => () => l.flush(), [l]), d;
|
|
1689
|
-
},
|
|
1690
|
-
var
|
|
1691
|
-
const
|
|
1724
|
+
}, jt = (e) => e === null ? { type: "doc", content: [] } : typeof e == "string" ? { type: "doc", content: [{ type: "paragraph", content: e ? [{ type: "text", text: e }] : [] }] } : e, yl = (e, t) => JSON.stringify(e) === JSON.stringify(t);
|
|
1725
|
+
var bl = "_1cocly40";
|
|
1726
|
+
const xl = {
|
|
1692
1727
|
modern: "'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI', 'Roboto', 'Oxygen-Sans', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif",
|
|
1693
1728
|
timeless: "'Noto Serif', Georgia, 'Times New Roman', serif",
|
|
1694
1729
|
fresh: "'Aeonik', 'Aeonik Fallback', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif",
|
|
@@ -1696,22 +1731,22 @@ const pl = {
|
|
|
1696
1731
|
handwritten: "'Permanent Marker', cursive",
|
|
1697
1732
|
fineliner: "'Intruding Cat', cursive",
|
|
1698
1733
|
brand: "var(--brand-font-family), 'Aeonik', 'Inter', sans-serif"
|
|
1699
|
-
}, De = ({ content: e }) => /* @__PURE__ */ a(
|
|
1734
|
+
}, De = ({ content: e }) => /* @__PURE__ */ a(T, { children: Wr(e.content ?? [e]) }), Wr = (e) => e.map((t, n) => Sl(t, n)), Sl = (e, t) => {
|
|
1700
1735
|
if (e.type === "text")
|
|
1701
|
-
return
|
|
1736
|
+
return kl(e, t);
|
|
1702
1737
|
if (e.type === "hardBreak" || e.type === "hard_break")
|
|
1703
1738
|
return /* @__PURE__ */ a("br", {}, t);
|
|
1704
1739
|
const n = e.content ? Wr(e.content) : null;
|
|
1705
1740
|
switch (e.type) {
|
|
1706
1741
|
case "doc":
|
|
1707
|
-
return /* @__PURE__ */ a(
|
|
1742
|
+
return /* @__PURE__ */ a(hn, { children: n }, t);
|
|
1708
1743
|
case "heading": {
|
|
1709
|
-
const r =
|
|
1710
|
-
return
|
|
1744
|
+
const r = wl(e.attrs?.level);
|
|
1745
|
+
return Al(r, t, n, Kt(e.attrs));
|
|
1711
1746
|
}
|
|
1712
1747
|
case "paragraph": {
|
|
1713
1748
|
const r = ge(e.attrs?.variant);
|
|
1714
|
-
return /* @__PURE__ */ a("p", { "data-variant": r ?? void 0, style: $r(
|
|
1749
|
+
return /* @__PURE__ */ a("p", { "data-variant": r ?? void 0, style: $r(Kt(e.attrs)), children: n }, t);
|
|
1715
1750
|
}
|
|
1716
1751
|
case "blockquote":
|
|
1717
1752
|
return /* @__PURE__ */ a("blockquote", { children: n }, t);
|
|
@@ -1727,10 +1762,10 @@ const pl = {
|
|
|
1727
1762
|
default:
|
|
1728
1763
|
return /* @__PURE__ */ a("span", { children: n }, t);
|
|
1729
1764
|
}
|
|
1730
|
-
},
|
|
1765
|
+
}, kl = (e, t) => {
|
|
1731
1766
|
const n = e.text ?? "";
|
|
1732
|
-
return !e.marks || e.marks.length === 0 ? /* @__PURE__ */ a("span", { children: n }, t) : e.marks.reduceRight((r, o, i) =>
|
|
1733
|
-
},
|
|
1767
|
+
return !e.marks || e.marks.length === 0 ? /* @__PURE__ */ a("span", { children: n }, t) : e.marks.reduceRight((r, o, i) => Ll(o, r, `${t}-${i}`), n);
|
|
1768
|
+
}, Ll = (e, t, n) => {
|
|
1734
1769
|
switch (e.type) {
|
|
1735
1770
|
case "bold":
|
|
1736
1771
|
case "strong":
|
|
@@ -1748,10 +1783,10 @@ const pl = {
|
|
|
1748
1783
|
return /* @__PURE__ */ a("code", { children: t }, n);
|
|
1749
1784
|
case "link": {
|
|
1750
1785
|
const r = ge(e.attrs?.href);
|
|
1751
|
-
return
|
|
1786
|
+
return fn(r) ? /* @__PURE__ */ a("a", { className: bl, href: r, rel: "noopener noreferrer", target: "_blank", children: t }, n) : /* @__PURE__ */ a("span", { children: t }, n);
|
|
1752
1787
|
}
|
|
1753
1788
|
case "textStyle": {
|
|
1754
|
-
const r =
|
|
1789
|
+
const r = Cl(e.attrs);
|
|
1755
1790
|
return r ? /* @__PURE__ */ a("span", { style: r, children: t }, n) : /* @__PURE__ */ a("span", { children: t }, n);
|
|
1756
1791
|
}
|
|
1757
1792
|
default:
|
|
@@ -1760,16 +1795,16 @@ const pl = {
|
|
|
1760
1795
|
}, qt = (e) => {
|
|
1761
1796
|
const t = ge(e && typeof e == "object" ? e.fontFamily : e);
|
|
1762
1797
|
if (t)
|
|
1763
|
-
return
|
|
1764
|
-
},
|
|
1798
|
+
return xl[t] ?? t;
|
|
1799
|
+
}, Cl = (e) => {
|
|
1765
1800
|
if (!e) return null;
|
|
1766
1801
|
const t = {}, n = ge(e.color);
|
|
1767
1802
|
n && (t.color = n);
|
|
1768
1803
|
const r = qt(e.font) ?? qt(e.fontFamily);
|
|
1769
1804
|
r && (t.fontFamily = r);
|
|
1770
|
-
const o =
|
|
1805
|
+
const o = Tl(e.fontSize);
|
|
1771
1806
|
return o && (t.fontSize = o), Object.keys(t).length > 0 ? t : null;
|
|
1772
|
-
},
|
|
1807
|
+
}, Tl = (e) => typeof e == "number" && Number.isFinite(e) ? `${e / 10}em` : ge(e), ge = (e) => typeof e == "string" && e.length > 0 ? e : void 0, wl = (e) => typeof e != "number" ? 3 : e < 1 ? 1 : e > 3 ? 3 : Math.round(e), Al = (e, t, n, r) => {
|
|
1773
1808
|
const o = $r(r);
|
|
1774
1809
|
switch (e) {
|
|
1775
1810
|
case 1:
|
|
@@ -1779,12 +1814,12 @@ const pl = {
|
|
|
1779
1814
|
case 3:
|
|
1780
1815
|
return /* @__PURE__ */ a("h3", { style: o, children: n }, t);
|
|
1781
1816
|
}
|
|
1782
|
-
},
|
|
1817
|
+
}, Kt = (e) => {
|
|
1783
1818
|
const t = e?.textAlign;
|
|
1784
1819
|
if (t === "left" || t === "right" || t === "center" || t === "justify") return t;
|
|
1785
1820
|
}, $r = (e) => e ? { textAlign: e } : void 0;
|
|
1786
|
-
var
|
|
1787
|
-
const
|
|
1821
|
+
var El = "_4dlrid0", Xr = "_4dlrid1", _l = "xfz7dq0", Pl = "xfz7dq1", Hl = "xfz7dq2", Fl = "xfz7dq3", Nl = "xfz7dq4";
|
|
1822
|
+
const Bl = ({
|
|
1788
1823
|
ref: e,
|
|
1789
1824
|
footerRect: t,
|
|
1790
1825
|
mode: n = "readonly",
|
|
@@ -1793,73 +1828,73 @@ const El = ({
|
|
|
1793
1828
|
source: i,
|
|
1794
1829
|
isSourceVisible: c
|
|
1795
1830
|
}) => {
|
|
1796
|
-
const l = n === "editable", d = o && (l || r !== null), u = c && i !== null &&
|
|
1797
|
-
return !d && !u ? null : /* @__PURE__ */
|
|
1831
|
+
const l = n === "editable", d = o && (l || r !== null), u = c && i !== null && Ol(i);
|
|
1832
|
+
return !d && !u ? null : /* @__PURE__ */ m(
|
|
1798
1833
|
"div",
|
|
1799
1834
|
{
|
|
1800
1835
|
ref: e,
|
|
1801
|
-
className:
|
|
1836
|
+
className: _l,
|
|
1802
1837
|
style: {
|
|
1803
1838
|
left: t.x,
|
|
1804
1839
|
top: t.y,
|
|
1805
1840
|
width: t.width
|
|
1806
1841
|
},
|
|
1807
1842
|
children: [
|
|
1808
|
-
d ? l ? /* @__PURE__ */ a(
|
|
1809
|
-
u && /* @__PURE__ */ a(
|
|
1843
|
+
d ? l ? /* @__PURE__ */ a(Rl, { caption: r }) : /* @__PURE__ */ a(Il, { caption: r }) : null,
|
|
1844
|
+
u && /* @__PURE__ */ a(Ml, { source: i })
|
|
1810
1845
|
]
|
|
1811
1846
|
}
|
|
1812
1847
|
);
|
|
1813
|
-
},
|
|
1814
|
-
const t =
|
|
1815
|
-
return n === "" && t === void 0 ? null : /* @__PURE__ */
|
|
1816
|
-
/* @__PURE__ */ a("span", { className:
|
|
1817
|
-
t !== void 0 ? /* @__PURE__ */ a("a", { className:
|
|
1848
|
+
}, Il = ({ caption: e }) => e === null ? null : typeof e == "string" ? /* @__PURE__ */ a("p", { className: Xr, children: e }) : /* @__PURE__ */ a(De, { content: e }), Ml = ({ source: e }) => {
|
|
1849
|
+
const t = fn(e.url) ? e.url : void 0, n = e.label ?? (t !== void 0 ? Dl(t) : "");
|
|
1850
|
+
return n === "" && t === void 0 ? null : /* @__PURE__ */ m("div", { className: Pl, children: [
|
|
1851
|
+
/* @__PURE__ */ a("span", { className: Fl, children: "Source:" }),
|
|
1852
|
+
t !== void 0 ? /* @__PURE__ */ a("a", { className: Hl, href: t, target: "_blank", rel: "noopener noreferrer", children: n }) : /* @__PURE__ */ a("span", { className: Nl, children: n })
|
|
1818
1853
|
] });
|
|
1819
|
-
},
|
|
1854
|
+
}, Dl = (e) => {
|
|
1820
1855
|
try {
|
|
1821
1856
|
return new URL(e).hostname;
|
|
1822
1857
|
} catch {
|
|
1823
1858
|
return e;
|
|
1824
1859
|
}
|
|
1825
|
-
},
|
|
1826
|
-
const t =
|
|
1860
|
+
}, Ol = (e) => e.label !== void 0 && e.label !== "" || e.url !== void 0 && e.url !== "", Rl = ({ caption: e }) => {
|
|
1861
|
+
const t = zn(), n = v(() => es({ placeholder: "Add caption" }), []), r = Gr({
|
|
1827
1862
|
content: e,
|
|
1828
1863
|
extensions: n,
|
|
1829
1864
|
isEditable: !0,
|
|
1830
1865
|
onUpdate: (o) => {
|
|
1831
|
-
const i =
|
|
1832
|
-
t(new
|
|
1866
|
+
const i = Ys(o) ? null : o;
|
|
1867
|
+
t(new Po({ caption: i }));
|
|
1833
1868
|
}
|
|
1834
1869
|
});
|
|
1835
1870
|
return /* @__PURE__ */ a(zr, { editor: r, ariaLabel: "Chart caption" });
|
|
1836
1871
|
};
|
|
1837
|
-
var
|
|
1838
|
-
const
|
|
1872
|
+
var zl = "_1k4qtbg0";
|
|
1873
|
+
const Gl = 3, Wl = ({
|
|
1839
1874
|
title: e,
|
|
1840
1875
|
isTitleVisible: t,
|
|
1841
1876
|
subtitle: n,
|
|
1842
1877
|
isSubtitleVisible: r
|
|
1843
1878
|
}) => {
|
|
1844
1879
|
const o = [];
|
|
1845
|
-
return t && o.push({ type: "heading", attrs: { level:
|
|
1846
|
-
},
|
|
1880
|
+
return t && o.push({ type: "heading", attrs: { level: Gl }, content: Xl(e) }), r && o.push(...Vl(n)), { type: "doc", content: o };
|
|
1881
|
+
}, $l = (e) => {
|
|
1847
1882
|
const t = e.content ?? [], [n, ...r] = t;
|
|
1848
1883
|
return {
|
|
1849
|
-
title:
|
|
1850
|
-
subtitle:
|
|
1884
|
+
title: Ul(n?.content ?? []),
|
|
1885
|
+
subtitle: Yl(r)
|
|
1851
1886
|
};
|
|
1852
|
-
},
|
|
1887
|
+
}, Pt = (e) => ({
|
|
1853
1888
|
type: e.type ?? "text",
|
|
1854
|
-
...e.content !== void 0 ? { content: e.content.map(
|
|
1889
|
+
...e.content !== void 0 ? { content: e.content.map(Pt) } : {},
|
|
1855
1890
|
...e.text !== void 0 ? { text: e.text } : {},
|
|
1856
1891
|
...e.marks !== void 0 ? { marks: e.marks } : {},
|
|
1857
1892
|
...e.attrs !== void 0 ? { attrs: e.attrs } : {}
|
|
1858
|
-
}),
|
|
1893
|
+
}), Xl = (e) => e === null ? [] : typeof e == "string" ? e === "" ? [] : [{ type: "text", text: e }] : e.type === "doc" && e.content ? e.content.flatMap((t) => t.content ?? []) : e.type === "text" || e.type === "hardBreak" ? [e] : e.content ?? [], Vl = (e) => e === null ? [{ type: "paragraph" }] : typeof e == "string" ? e === "" ? [{ type: "paragraph" }] : [{ type: "paragraph", content: [{ type: "text", text: e }] }] : e.type === "doc" && e.content ? e.content.length === 0 ? [{ type: "paragraph" }] : e.content.map(Jt) : [Jt(e)], Jt = (e) => e.type === "paragraph" ? e : { type: "paragraph", content: e.content ?? [e] }, Ul = (e) => {
|
|
1859
1894
|
if (e.length === 0) return null;
|
|
1860
1895
|
const [t] = e;
|
|
1861
|
-
return t && e.length === 1 && t.type === "text" && (!t.marks || t.marks.length === 0) ? t.text ?? null : { type: "paragraph", content: e.map(
|
|
1862
|
-
},
|
|
1896
|
+
return t && e.length === 1 && t.type === "text" && (!t.marks || t.marks.length === 0) ? t.text ?? null : { type: "paragraph", content: e.map(Pt) };
|
|
1897
|
+
}, Yl = (e) => {
|
|
1863
1898
|
const t = e.filter((r) => (r.content ?? []).length > 0);
|
|
1864
1899
|
if (t.length === 0) return null;
|
|
1865
1900
|
const [n] = t;
|
|
@@ -1868,8 +1903,8 @@ const Il = 3, Ml = ({
|
|
|
1868
1903
|
if (o && r.length === 1 && o.type === "text" && (!o.marks || o.marks.length === 0))
|
|
1869
1904
|
return o.text ?? null;
|
|
1870
1905
|
}
|
|
1871
|
-
return { type: "doc", content: t.map(
|
|
1872
|
-
},
|
|
1906
|
+
return { type: "doc", content: t.map(Pt) };
|
|
1907
|
+
}, jl = ({
|
|
1873
1908
|
ref: e,
|
|
1874
1909
|
headerRect: t,
|
|
1875
1910
|
mode: n = "readonly",
|
|
@@ -1883,14 +1918,14 @@ const Il = 3, Ml = ({
|
|
|
1883
1918
|
"div",
|
|
1884
1919
|
{
|
|
1885
1920
|
ref: e,
|
|
1886
|
-
className:
|
|
1921
|
+
className: zl,
|
|
1887
1922
|
style: {
|
|
1888
1923
|
left: t.x,
|
|
1889
1924
|
top: t.y,
|
|
1890
1925
|
width: t.width
|
|
1891
1926
|
},
|
|
1892
1927
|
children: l ? /* @__PURE__ */ a(
|
|
1893
|
-
|
|
1928
|
+
Kl,
|
|
1894
1929
|
{
|
|
1895
1930
|
title: r,
|
|
1896
1931
|
isTitleVisible: o,
|
|
@@ -1899,7 +1934,7 @@ const Il = 3, Ml = ({
|
|
|
1899
1934
|
},
|
|
1900
1935
|
[o ? "title" : "", c ? "subtitle" : ""].join("-")
|
|
1901
1936
|
) : /* @__PURE__ */ a(
|
|
1902
|
-
|
|
1937
|
+
ql,
|
|
1903
1938
|
{
|
|
1904
1939
|
title: r,
|
|
1905
1940
|
isTitleVisible: o,
|
|
@@ -1909,22 +1944,22 @@ const Il = 3, Ml = ({
|
|
|
1909
1944
|
)
|
|
1910
1945
|
}
|
|
1911
1946
|
);
|
|
1912
|
-
},
|
|
1947
|
+
}, ql = ({
|
|
1913
1948
|
title: e,
|
|
1914
1949
|
isTitleVisible: t,
|
|
1915
1950
|
isSubtitleVisible: n,
|
|
1916
1951
|
subtitle: r
|
|
1917
|
-
}) => /* @__PURE__ */
|
|
1918
|
-
t && e !== null && (typeof e == "string" ? /* @__PURE__ */ a("h1", { className:
|
|
1952
|
+
}) => /* @__PURE__ */ m(T, { children: [
|
|
1953
|
+
t && e !== null && (typeof e == "string" ? /* @__PURE__ */ a("h1", { className: El, children: e }) : /* @__PURE__ */ a(De, { content: e })),
|
|
1919
1954
|
n && r !== null && (typeof r == "string" ? /* @__PURE__ */ a("p", { className: Xr, children: r }) : /* @__PURE__ */ a(De, { content: r }))
|
|
1920
|
-
] }),
|
|
1955
|
+
] }), Kl = ({
|
|
1921
1956
|
title: e,
|
|
1922
1957
|
isTitleVisible: t,
|
|
1923
1958
|
isSubtitleVisible: n,
|
|
1924
1959
|
subtitle: r
|
|
1925
1960
|
}) => {
|
|
1926
|
-
const o =
|
|
1927
|
-
() =>
|
|
1961
|
+
const o = zn(), i = v(
|
|
1962
|
+
() => Qi({
|
|
1928
1963
|
titlePlaceholder: "Untitled",
|
|
1929
1964
|
subtitlePlaceholder: "Untitled",
|
|
1930
1965
|
isTitleVisible: t,
|
|
@@ -1932,84 +1967,84 @@ const Il = 3, Ml = ({
|
|
|
1932
1967
|
}),
|
|
1933
1968
|
[t, n]
|
|
1934
1969
|
), c = v(
|
|
1935
|
-
() =>
|
|
1970
|
+
() => Wl({ title: e, isTitleVisible: t, subtitle: r, isSubtitleVisible: n }),
|
|
1936
1971
|
[e, t, r, n]
|
|
1937
1972
|
), l = Gr({
|
|
1938
1973
|
content: c,
|
|
1939
1974
|
extensions: i,
|
|
1940
1975
|
isEditable: !0,
|
|
1941
1976
|
onUpdate: (d) => {
|
|
1942
|
-
const u =
|
|
1943
|
-
t && o(new
|
|
1977
|
+
const u = $l(d);
|
|
1978
|
+
t && o(new Ho({ title: u.title })), n && o(new Fo({ subtitle: u.subtitle }));
|
|
1944
1979
|
}
|
|
1945
1980
|
});
|
|
1946
1981
|
return /* @__PURE__ */ a(zr, { editor: l, ariaLabel: "Chart title and subtitle" });
|
|
1947
1982
|
};
|
|
1948
|
-
var
|
|
1949
|
-
const
|
|
1983
|
+
var Jl = "_1u9qprb0", Zl = "_1u9qprb1", Ql = "_9aen060", ec = "_9aen061", tc = "_9aen062", Vr = "_9aen063";
|
|
1984
|
+
const nc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1950
1985
|
__proto__: null,
|
|
1951
|
-
groupRow:
|
|
1986
|
+
groupRow: tc,
|
|
1952
1987
|
item: Vr,
|
|
1953
|
-
trendRow:
|
|
1954
|
-
valueRow:
|
|
1955
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1988
|
+
trendRow: ec,
|
|
1989
|
+
valueRow: Ql
|
|
1990
|
+
}, Symbol.toStringTag, { value: "Module" })), rc = (e) => /* @__PURE__ */ a(Z, { ...e, children: /* @__PURE__ */ m("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1956
1991
|
/* @__PURE__ */ a("path", { d: "m5 12 7-7 7 7" }),
|
|
1957
1992
|
/* @__PURE__ */ a("path", { d: "M12 19V5" })
|
|
1958
|
-
] }) }),
|
|
1959
|
-
var Ur = "n7clvo0",
|
|
1960
|
-
const
|
|
1993
|
+
] }) }), oc = (e) => /* @__PURE__ */ a(Z, { ...e, children: /* @__PURE__ */ a("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ a("path", { d: "M5 12h14" }) }) });
|
|
1994
|
+
var Ur = "n7clvo0", ac = "n7clvo1", ic = "n7clvo2", sc = "n7clvo3", Yr = { small: "n7clvo4", medium: "n7clvo5", large: "n7clvo6" }, lc = { small: "n7clvo7", medium: "n7clvo8", large: "n7clvo9" }, cc = { up: "n7clvoa", down: "n7clvob", flat: "n7clvoc" }, dc = { up: "n7clvoe n7clvod", down: "n7clvof n7clvod", flat: "n7clvog n7clvod" };
|
|
1995
|
+
const uc = ({ segment: e, resolvedSize: t }) => {
|
|
1961
1996
|
if (e.kind === "swatch")
|
|
1962
1997
|
return /* @__PURE__ */ a(Ye, { shape: e.swatch.shape, color: e.swatch.color, width: e.size, height: e.size });
|
|
1963
1998
|
if (e.kind === "trendArrow")
|
|
1964
|
-
return /* @__PURE__ */ a("div", { className:
|
|
1965
|
-
const n = e.fontRole === "value" ? Yr[t] :
|
|
1966
|
-
return /* @__PURE__ */ a("span", { className: ce(
|
|
1967
|
-
},
|
|
1999
|
+
return /* @__PURE__ */ a("div", { className: dc[e.direction], children: e.direction === "flat" ? /* @__PURE__ */ a(oc, { size: "xs", title: "" }) : /* @__PURE__ */ a(rc, { size: "xs", title: "" }) });
|
|
2000
|
+
const n = e.fontRole === "value" ? Yr[t] : lc[t];
|
|
2001
|
+
return /* @__PURE__ */ a("span", { className: ce(hc(e), n), children: e.text });
|
|
2002
|
+
}, hc = (e) => {
|
|
1968
2003
|
switch (e.textRole) {
|
|
1969
2004
|
case "value":
|
|
1970
2005
|
return Ur;
|
|
1971
2006
|
case "observation":
|
|
1972
|
-
return
|
|
2007
|
+
return ac;
|
|
1973
2008
|
case "trendPercentage":
|
|
1974
|
-
return
|
|
2009
|
+
return cc[e.trendDirection ?? "up"];
|
|
1975
2010
|
case "trendReference":
|
|
1976
|
-
return
|
|
2011
|
+
return ic;
|
|
1977
2012
|
case "label":
|
|
1978
|
-
return
|
|
2013
|
+
return sc;
|
|
1979
2014
|
}
|
|
1980
|
-
},
|
|
2015
|
+
}, gc = ({ item: e, resolvedSize: t }) => /* @__PURE__ */ a("div", { className: Vr, children: pn(e).map((n) => /* @__PURE__ */ a(pc, { row: n, resolvedSize: t }, n.role)) }), pc = ({ row: e, resolvedSize: t }) => {
|
|
1981
2016
|
const n = e.role === "trendRow";
|
|
1982
2017
|
return /* @__PURE__ */ a(
|
|
1983
2018
|
"div",
|
|
1984
2019
|
{
|
|
1985
|
-
className:
|
|
2020
|
+
className: nc[e.role],
|
|
1986
2021
|
"data-testid": n ? "headline-trend" : void 0,
|
|
1987
|
-
"data-direction": n ?
|
|
2022
|
+
"data-direction": n ? fc(e) : void 0,
|
|
1988
2023
|
role: n ? "img" : void 0,
|
|
1989
2024
|
"aria-label": n ? e.ariaLabel : void 0,
|
|
1990
|
-
children: e.segments.map((r, o) => /* @__PURE__ */ a(
|
|
2025
|
+
children: e.segments.map((r, o) => /* @__PURE__ */ a(uc, { segment: r, resolvedSize: t }, o))
|
|
1991
2026
|
}
|
|
1992
2027
|
);
|
|
1993
|
-
},
|
|
2028
|
+
}, fc = (e) => {
|
|
1994
2029
|
const t = e.segments.find((n) => n.kind === "trendArrow");
|
|
1995
2030
|
return t?.kind === "trendArrow" ? t.direction : void 0;
|
|
1996
|
-
},
|
|
2031
|
+
}, mc = ({ headline: e, rect: t, resolvedSize: n, visibleItemCount: r }) => {
|
|
1997
2032
|
const o = {
|
|
1998
2033
|
left: t.x,
|
|
1999
2034
|
top: t.y,
|
|
2000
2035
|
width: t.width,
|
|
2001
2036
|
height: t.height
|
|
2002
2037
|
};
|
|
2003
|
-
return e.kind === "grandTotal" ? /* @__PURE__ */ a("div", { className:
|
|
2038
|
+
return e.kind === "grandTotal" ? /* @__PURE__ */ a("div", { className: Zl, style: o, children: /* @__PURE__ */ a("span", { className: ce(Ur, Yr[n]), children: e.value }) }) : /* @__PURE__ */ a("div", { className: Jl, style: o, children: e.items.slice(0, r).map((i, c) => /* @__PURE__ */ a(gc, { item: i, resolvedSize: n }, `${i.label}-${c}`)) });
|
|
2004
2039
|
};
|
|
2005
|
-
var
|
|
2006
|
-
const
|
|
2007
|
-
const { lineBoxHeight: r } = Tr(n), { placements: o, hasOverlap: i } =
|
|
2040
|
+
var vc = "_1oj6yix0", yc = "_1oj6yix1", bc = "_1oj6yix2";
|
|
2041
|
+
const xc = 8, Sc = 16, kc = 2, Lc = ({ legends: e, containerRect: t, textScale: n }) => {
|
|
2042
|
+
const { lineBoxHeight: r } = Tr(n), { placements: o, hasOverlap: i } = Cc(e, t, r);
|
|
2008
2043
|
if (o.length === 0) return null;
|
|
2009
|
-
const c = i ?
|
|
2010
|
-
return /* @__PURE__ */
|
|
2011
|
-
i && /* @__PURE__ */ a("svg", { className:
|
|
2012
|
-
|
|
2044
|
+
const c = i ? Sc : xc, l = c - kc;
|
|
2045
|
+
return /* @__PURE__ */ m("div", { className: vc, children: [
|
|
2046
|
+
i && /* @__PURE__ */ a("svg", { className: yc, width: t.width, height: t.height, children: o.map((d) => /* @__PURE__ */ a(
|
|
2047
|
+
Tc,
|
|
2013
2048
|
{
|
|
2014
2049
|
anchorY: d.anchorY,
|
|
2015
2050
|
labelY: d.y,
|
|
@@ -2021,14 +2056,14 @@ const pc = 8, fc = 16, mc = 2, vc = ({ legends: e, containerRect: t, textScale:
|
|
|
2021
2056
|
o.map((d) => /* @__PURE__ */ a(
|
|
2022
2057
|
"span",
|
|
2023
2058
|
{
|
|
2024
|
-
className:
|
|
2059
|
+
className: bc,
|
|
2025
2060
|
style: { left: c, top: d.y, color: d.payload.color },
|
|
2026
2061
|
children: d.payload.label
|
|
2027
2062
|
},
|
|
2028
2063
|
d.payload.key
|
|
2029
2064
|
))
|
|
2030
2065
|
] });
|
|
2031
|
-
},
|
|
2066
|
+
}, Cc = (e, t, n) => v(() => {
|
|
2032
2067
|
const r = [];
|
|
2033
2068
|
for (const o of e)
|
|
2034
2069
|
for (const i of o.items) {
|
|
@@ -2039,12 +2074,12 @@ const pc = 8, fc = 16, mc = 2, vc = ({ legends: e, containerRect: t, textScale:
|
|
|
2039
2074
|
payload: { key: String(r.length), label: i.formattedLabel, color: c }
|
|
2040
2075
|
});
|
|
2041
2076
|
}
|
|
2042
|
-
return r.length === 0 || t.height <= 0 ? { placements: [], hasOverlap: !1 } :
|
|
2077
|
+
return r.length === 0 || t.height <= 0 ? { placements: [], hasOverlap: !1 } : No({
|
|
2043
2078
|
items: r,
|
|
2044
2079
|
containerHeight: t.height,
|
|
2045
2080
|
labelHeight: n
|
|
2046
2081
|
});
|
|
2047
|
-
}, [e, t.height, n]),
|
|
2082
|
+
}, [e, t.height, n]), Tc = ({ anchorY: e, labelY: t, endX: n, color: r }) => {
|
|
2048
2083
|
const o = n / 2;
|
|
2049
2084
|
return /* @__PURE__ */ a(
|
|
2050
2085
|
"path",
|
|
@@ -2057,9 +2092,9 @@ const pc = 8, fc = 16, mc = 2, vc = ({ legends: e, containerRect: t, textScale:
|
|
|
2057
2092
|
}
|
|
2058
2093
|
);
|
|
2059
2094
|
};
|
|
2060
|
-
var
|
|
2061
|
-
const
|
|
2062
|
-
class
|
|
2095
|
+
var wc = "_6a636s0";
|
|
2096
|
+
const Ac = /\p{Emoji_Presentation}|\p{Emoji}\uFE0F/gu, jr = "😀";
|
|
2097
|
+
class Ht {
|
|
2063
2098
|
constructor() {
|
|
2064
2099
|
this.emojiCorrections = /* @__PURE__ */ new Map(), this.currentFont = "";
|
|
2065
2100
|
const n = new OffscreenCanvas(1, 1).getContext("2d");
|
|
@@ -2078,14 +2113,14 @@ class Pt {
|
|
|
2078
2113
|
* Note: document.fonts.ready still resolves even if some fonts fail to load.
|
|
2079
2114
|
*/
|
|
2080
2115
|
static async create() {
|
|
2081
|
-
return typeof document < "u" && "fonts" in document && await document.fonts.ready, new
|
|
2116
|
+
return typeof document < "u" && "fonts" in document && await document.fonts.ready, new Ht();
|
|
2082
2117
|
}
|
|
2083
2118
|
measureText(t, n) {
|
|
2084
|
-
const r =
|
|
2119
|
+
const r = Bo(n);
|
|
2085
2120
|
this.setFont(r);
|
|
2086
2121
|
const { width: o, fontBoundingBoxAscent: i, fontBoundingBoxDescent: c } = this.ctx.measureText(t);
|
|
2087
2122
|
let l = o;
|
|
2088
|
-
const d =
|
|
2123
|
+
const d = Ec(t);
|
|
2089
2124
|
if (d > 0) {
|
|
2090
2125
|
const u = this.getEmojiCorrection(r);
|
|
2091
2126
|
l -= u * d;
|
|
@@ -2113,7 +2148,7 @@ class Pt {
|
|
|
2113
2148
|
const n = this.emojiCorrections.get(t);
|
|
2114
2149
|
if (n !== void 0) return n;
|
|
2115
2150
|
this.setFont(t);
|
|
2116
|
-
const r = this.ctx.measureText(
|
|
2151
|
+
const r = this.ctx.measureText(jr).width, o = _c(t);
|
|
2117
2152
|
let i = 0;
|
|
2118
2153
|
if (o !== null) {
|
|
2119
2154
|
const c = r - o;
|
|
@@ -2122,20 +2157,20 @@ class Pt {
|
|
|
2122
2157
|
return this.emojiCorrections.set(t, i), i;
|
|
2123
2158
|
}
|
|
2124
2159
|
}
|
|
2125
|
-
let
|
|
2126
|
-
const
|
|
2127
|
-
const t = e.match(
|
|
2160
|
+
let q = null;
|
|
2161
|
+
const Ec = (e) => {
|
|
2162
|
+
const t = e.match(Ac);
|
|
2128
2163
|
return t ? t.length : 0;
|
|
2129
|
-
},
|
|
2130
|
-
const t =
|
|
2164
|
+
}, _c = (e) => {
|
|
2165
|
+
const t = Pc();
|
|
2131
2166
|
return t ? (t.style.font = e, t.getBoundingClientRect().width) : null;
|
|
2132
|
-
},
|
|
2167
|
+
}, Pc = () => typeof document > "u" ? null : (q || (q = document.createElement("span"), q.style.position = "absolute", q.style.visibility = "hidden", q.style.whiteSpace = "nowrap", q.style.left = "-9999px", q.textContent = jr, document.body.appendChild(q)), q), qr = fe(null), Hc = ({ children: e, measurer: t }) => {
|
|
2133
2168
|
const [n, r] = E(null);
|
|
2134
2169
|
L(() => {
|
|
2135
2170
|
if (t !== void 0) return;
|
|
2136
2171
|
let i = !1;
|
|
2137
2172
|
const c = () => {
|
|
2138
|
-
i || r(
|
|
2173
|
+
i || r(Fc());
|
|
2139
2174
|
};
|
|
2140
2175
|
return (async () => {
|
|
2141
2176
|
typeof document < "u" && "fonts" in document && await document.fonts.ready, c();
|
|
@@ -2144,21 +2179,21 @@ const kc = (e) => {
|
|
|
2144
2179
|
};
|
|
2145
2180
|
}, [t]);
|
|
2146
2181
|
const o = t ?? n;
|
|
2147
|
-
return o === null ? null : /* @__PURE__ */ a(
|
|
2182
|
+
return o === null ? null : /* @__PURE__ */ a(qr.Provider, { value: o, children: e });
|
|
2148
2183
|
}, ve = () => {
|
|
2149
|
-
const e =
|
|
2184
|
+
const e = ee(qr);
|
|
2150
2185
|
if (e === null)
|
|
2151
2186
|
throw new Error("useTextMeasurer must be used inside a <TextMeasurerProvider>.");
|
|
2152
2187
|
return e;
|
|
2153
|
-
},
|
|
2188
|
+
}, Fc = () => {
|
|
2154
2189
|
try {
|
|
2155
|
-
return new
|
|
2190
|
+
return new It(new Ht());
|
|
2156
2191
|
} catch {
|
|
2157
|
-
return new
|
|
2192
|
+
return new It(new Io());
|
|
2158
2193
|
}
|
|
2159
2194
|
};
|
|
2160
|
-
var
|
|
2161
|
-
const
|
|
2195
|
+
var Nc = "_1kjk02r0", Bc = "_1kjk02r1", Ic = "_1kjk02r2", Mc = "_1kjk02r3", Dc = "_1kjk02r4", Oc = "_1kjk02r5", Rc = "_1kjk02r6", zc = "_1kjk02r7", Gc = "_1kjk02r8", Wc = "_1kjk02r9", $c = "_1kjk02ra", Xc = "_1kjk02rb", Vc = "_1dw9dgx0";
|
|
2196
|
+
const Uc = "#9ca3af", nt = "\0", Yc = (e) => {
|
|
2162
2197
|
const t = [];
|
|
2163
2198
|
return e.forEach((n, r) => {
|
|
2164
2199
|
const o = n.aesthetics.includes("size");
|
|
@@ -2178,29 +2213,29 @@ const zc = "#9ca3af", nt = "\0", Gc = (e) => {
|
|
|
2178
2213
|
});
|
|
2179
2214
|
}
|
|
2180
2215
|
}), t;
|
|
2181
|
-
}, Kr = ({ pill: e }) => e.isBubble ? /* @__PURE__ */ a(
|
|
2182
|
-
const { legendSwatchWidth: r, legendSwatchHeight: o } =
|
|
2216
|
+
}, Kr = ({ pill: e }) => e.isBubble ? /* @__PURE__ */ a(Kc, { pill: e }) : /* @__PURE__ */ a(qc, { pill: e }), jc = ({ color: e, lineType: t, shape: n }) => {
|
|
2217
|
+
const { legendSwatchWidth: r, legendSwatchHeight: o } = wt();
|
|
2183
2218
|
return e ? /* @__PURE__ */ a(Ye, { shape: n, color: e, lineType: t, width: r, height: o }) : null;
|
|
2184
|
-
},
|
|
2185
|
-
/* @__PURE__ */ a(
|
|
2219
|
+
}, qc = ({ pill: e }) => /* @__PURE__ */ m(T, { children: [
|
|
2220
|
+
/* @__PURE__ */ a(jc, { color: e.visual.color, lineType: e.primaryLineType, shape: e.swatchShape }),
|
|
2186
2221
|
/* @__PURE__ */ a("span", { children: e.formattedLabel })
|
|
2187
|
-
] }),
|
|
2222
|
+
] }), Kc = ({ pill: e }) => {
|
|
2188
2223
|
const t = Number(e.visual.size);
|
|
2189
|
-
return /* @__PURE__ */
|
|
2224
|
+
return /* @__PURE__ */ m(T, { children: [
|
|
2190
2225
|
/* @__PURE__ */ a(
|
|
2191
2226
|
"span",
|
|
2192
2227
|
{
|
|
2193
|
-
className:
|
|
2228
|
+
className: Vc,
|
|
2194
2229
|
style: {
|
|
2195
2230
|
width: t,
|
|
2196
2231
|
height: t,
|
|
2197
|
-
backgroundColor: e.visual.color ??
|
|
2232
|
+
backgroundColor: e.visual.color ?? Uc
|
|
2198
2233
|
}
|
|
2199
2234
|
}
|
|
2200
2235
|
),
|
|
2201
2236
|
/* @__PURE__ */ a("span", { children: e.formattedLabel })
|
|
2202
2237
|
] });
|
|
2203
|
-
},
|
|
2238
|
+
}, Jc = ({ hiddenPills: e, placement: t }) => {
|
|
2204
2239
|
const n = J(), [r, o] = E(!1), { refs: i, floatingStyles: c } = xt({
|
|
2205
2240
|
open: r,
|
|
2206
2241
|
placement: t,
|
|
@@ -2208,37 +2243,37 @@ const zc = "#9ca3af", nt = "\0", Gc = (e) => {
|
|
|
2208
2243
|
});
|
|
2209
2244
|
L(() => {
|
|
2210
2245
|
if (!r) return;
|
|
2211
|
-
const h = (
|
|
2212
|
-
const
|
|
2213
|
-
if (!
|
|
2246
|
+
const h = (p) => {
|
|
2247
|
+
const f = p.target;
|
|
2248
|
+
if (!f) return;
|
|
2214
2249
|
const y = i.reference.current, S = i.floating.current;
|
|
2215
|
-
y instanceof Element && y.contains(
|
|
2216
|
-
}, g = (
|
|
2217
|
-
|
|
2250
|
+
y instanceof Element && y.contains(f) || S instanceof Element && S.contains(f) || o(!1);
|
|
2251
|
+
}, g = (p) => {
|
|
2252
|
+
p.key === "Escape" && o(!1);
|
|
2218
2253
|
};
|
|
2219
2254
|
return document.addEventListener("pointerdown", h), document.addEventListener("keydown", g), () => {
|
|
2220
2255
|
document.removeEventListener("pointerdown", h), document.removeEventListener("keydown", g);
|
|
2221
2256
|
};
|
|
2222
2257
|
}, [r, i.floating, i.reference]);
|
|
2223
2258
|
const l = t === "left" || t === "right", d = Math.min(e.length - 1, ar), u = Array.from({ length: d }, (h, g) => d - g);
|
|
2224
|
-
return /* @__PURE__ */
|
|
2225
|
-
/* @__PURE__ */
|
|
2259
|
+
return /* @__PURE__ */ m(T, { children: [
|
|
2260
|
+
/* @__PURE__ */ m(
|
|
2226
2261
|
"div",
|
|
2227
2262
|
{
|
|
2228
2263
|
ref: i.setReference,
|
|
2229
|
-
className: ce(
|
|
2230
|
-
[
|
|
2231
|
-
[
|
|
2264
|
+
className: ce(Nc, {
|
|
2265
|
+
[Ic]: l,
|
|
2266
|
+
[Bc]: !l
|
|
2232
2267
|
}),
|
|
2233
2268
|
children: [
|
|
2234
2269
|
u.map((h) => /* @__PURE__ */ a(
|
|
2235
2270
|
"span",
|
|
2236
2271
|
{
|
|
2237
|
-
className: ce(
|
|
2238
|
-
[
|
|
2239
|
-
[
|
|
2272
|
+
className: ce(Mc, {
|
|
2273
|
+
[Oc]: l,
|
|
2274
|
+
[Dc]: !l
|
|
2240
2275
|
}),
|
|
2241
|
-
style:
|
|
2276
|
+
style: Zc(h, l),
|
|
2242
2277
|
"aria-hidden": !0
|
|
2243
2278
|
},
|
|
2244
2279
|
h
|
|
@@ -2247,12 +2282,12 @@ const zc = "#9ca3af", nt = "\0", Gc = (e) => {
|
|
|
2247
2282
|
"button",
|
|
2248
2283
|
{
|
|
2249
2284
|
type: "button",
|
|
2250
|
-
className: ce(
|
|
2285
|
+
className: ce(Rc, { [zc]: r }),
|
|
2251
2286
|
onClick: () => o((h) => !h),
|
|
2252
2287
|
"aria-haspopup": "dialog",
|
|
2253
2288
|
"aria-expanded": r,
|
|
2254
2289
|
"aria-label": `Show ${e.length} hidden legend ${e.length === 1 ? "item" : "items"}`,
|
|
2255
|
-
children: /* @__PURE__ */
|
|
2290
|
+
children: /* @__PURE__ */ m("span", { className: Gc, children: [
|
|
2256
2291
|
"+",
|
|
2257
2292
|
e.length
|
|
2258
2293
|
] })
|
|
@@ -2267,43 +2302,43 @@ const zc = "#9ca3af", nt = "\0", Gc = (e) => {
|
|
|
2267
2302
|
ref: i.setFloating,
|
|
2268
2303
|
role: "dialog",
|
|
2269
2304
|
"aria-label": n("graph.legend.hiddenItems"),
|
|
2270
|
-
className:
|
|
2305
|
+
className: Wc,
|
|
2271
2306
|
style: c,
|
|
2272
|
-
children: /* @__PURE__ */ a("ul", { className:
|
|
2307
|
+
children: /* @__PURE__ */ a("ul", { className: $c, children: e.map((h) => /* @__PURE__ */ a("li", { className: Xc, children: /* @__PURE__ */ a(Kr, { pill: h }) }, h.key)) })
|
|
2273
2308
|
}
|
|
2274
2309
|
)
|
|
2275
2310
|
] });
|
|
2276
|
-
},
|
|
2311
|
+
}, Zc = (e, t) => {
|
|
2277
2312
|
const n = -e * ir;
|
|
2278
2313
|
return { transform: t ? `translateY(${n}px)` : `translateX(${n}px)` };
|
|
2279
2314
|
};
|
|
2280
|
-
var
|
|
2281
|
-
const
|
|
2315
|
+
var Qc = "_1cecisi0", ed = "_1cecisi1", td = "_1cecisi2", nd = "_1cecisi3";
|
|
2316
|
+
const rd = ({
|
|
2282
2317
|
edge: e,
|
|
2283
2318
|
formattedLegends: t,
|
|
2284
2319
|
containerWidth: n,
|
|
2285
2320
|
containerHeight: r,
|
|
2286
2321
|
textScale: o
|
|
2287
2322
|
}) => {
|
|
2288
|
-
const i = ve(), c =
|
|
2323
|
+
const i = ve(), c = wt(), l = v(() => Yc(t), [t]), d = e === "left" || e === "right", u = d ? r : n, h = v(() => {
|
|
2289
2324
|
if (l.length === 0) return { visibleCount: 0, hasOverflow: !1 };
|
|
2290
2325
|
if (u <= 0) return { visibleCount: l.length, hasOverflow: !1 };
|
|
2291
|
-
const y =
|
|
2326
|
+
const y = te(sr, o), S = { family: cr, size: y }, k = y * lr, w = ($) => d ? od($, k, c) : Zt({
|
|
2292
2327
|
label: $.formattedLabel,
|
|
2293
|
-
swatchInlineSize:
|
|
2328
|
+
swatchInlineSize: ad($, c.legendSwatchWidth),
|
|
2294
2329
|
textMeasurer: i,
|
|
2295
2330
|
font: S,
|
|
2296
2331
|
swatchGap: c.legendSwatchGap,
|
|
2297
2332
|
horizontalChrome: c.legendPillHorizontalChrome
|
|
2298
|
-
}), A = l.map(w), _ = (d ? k + c.legendPillVerticalChrome :
|
|
2333
|
+
}), A = l.map(w), _ = (d ? k + c.legendPillVerticalChrome : Zt({
|
|
2299
2334
|
label: `+${l.length}`,
|
|
2300
2335
|
swatchInlineSize: 0,
|
|
2301
2336
|
textMeasurer: i,
|
|
2302
2337
|
font: S,
|
|
2303
2338
|
swatchGap: c.legendSwatchGap,
|
|
2304
2339
|
horizontalChrome: c.legendPillHorizontalChrome
|
|
2305
|
-
})) +
|
|
2306
|
-
return
|
|
2340
|
+
})) + Si;
|
|
2341
|
+
return sd({
|
|
2307
2342
|
pillSizes: A,
|
|
2308
2343
|
overflowPillSize: _,
|
|
2309
2344
|
containerSize: u,
|
|
@@ -2311,21 +2346,21 @@ const Jc = ({
|
|
|
2311
2346
|
});
|
|
2312
2347
|
}, [l, u, d, i, o, c]);
|
|
2313
2348
|
if (l.length === 0) return null;
|
|
2314
|
-
const g = l.slice(0, h.visibleCount),
|
|
2315
|
-
return /* @__PURE__ */
|
|
2349
|
+
const g = l.slice(0, h.visibleCount), p = l.slice(h.visibleCount), f = h.hasOverflow && p.length > 0;
|
|
2350
|
+
return /* @__PURE__ */ m(
|
|
2316
2351
|
"div",
|
|
2317
2352
|
{
|
|
2318
|
-
className: ce(
|
|
2319
|
-
[
|
|
2320
|
-
[
|
|
2353
|
+
className: ce(Qc, {
|
|
2354
|
+
[td]: d,
|
|
2355
|
+
[ed]: !d
|
|
2321
2356
|
}),
|
|
2322
2357
|
children: [
|
|
2323
|
-
g.map((y) => /* @__PURE__ */ a("div", { className:
|
|
2324
|
-
|
|
2358
|
+
g.map((y) => /* @__PURE__ */ a("div", { className: nd, children: /* @__PURE__ */ a(Kr, { pill: y }) }, y.key)),
|
|
2359
|
+
f && /* @__PURE__ */ a(Jc, { hiddenPills: p, placement: ld(e) })
|
|
2325
2360
|
]
|
|
2326
2361
|
}
|
|
2327
2362
|
);
|
|
2328
|
-
},
|
|
2363
|
+
}, Zt = ({
|
|
2329
2364
|
label: e,
|
|
2330
2365
|
swatchInlineSize: t,
|
|
2331
2366
|
textMeasurer: n,
|
|
@@ -2335,10 +2370,10 @@ const Jc = ({
|
|
|
2335
2370
|
}) => {
|
|
2336
2371
|
const c = n.measureText(e, r).width, l = t > 0 ? o : 0;
|
|
2337
2372
|
return t + l + c + i;
|
|
2338
|
-
},
|
|
2339
|
-
const r =
|
|
2373
|
+
}, od = (e, t, n) => {
|
|
2374
|
+
const r = id(e, n.legendSwatchHeight);
|
|
2340
2375
|
return Math.max(t, r) + n.legendPillVerticalChrome;
|
|
2341
|
-
},
|
|
2376
|
+
}, ad = (e, t) => e.isBubble ? Number(e.visual.size) : wr(e.visual.color, t), id = (e, t) => e.isBubble ? Number(e.visual.size) : t, sd = ({
|
|
2342
2377
|
pillSizes: e,
|
|
2343
2378
|
overflowPillSize: t,
|
|
2344
2379
|
containerSize: n,
|
|
@@ -2357,7 +2392,7 @@ const Jc = ({
|
|
|
2357
2392
|
i = d, c += 1;
|
|
2358
2393
|
}
|
|
2359
2394
|
return { visibleCount: c, hasOverflow: !0 };
|
|
2360
|
-
},
|
|
2395
|
+
}, ld = (e) => {
|
|
2361
2396
|
switch (e) {
|
|
2362
2397
|
case "top":
|
|
2363
2398
|
return "bottom";
|
|
@@ -2368,7 +2403,7 @@ const Jc = ({
|
|
|
2368
2403
|
case "right":
|
|
2369
2404
|
return "left";
|
|
2370
2405
|
}
|
|
2371
|
-
},
|
|
2406
|
+
}, cd = oe(function({ formattedLegends: t, rects: n, textScale: r }) {
|
|
2372
2407
|
const o = v(() => {
|
|
2373
2408
|
const i = /* @__PURE__ */ new Map();
|
|
2374
2409
|
for (const c of t) {
|
|
@@ -2377,12 +2412,12 @@ const Jc = ({
|
|
|
2377
2412
|
}
|
|
2378
2413
|
return i;
|
|
2379
2414
|
}, [t]);
|
|
2380
|
-
return /* @__PURE__ */ a(
|
|
2415
|
+
return /* @__PURE__ */ a(T, { children: Array.from(o, ([i, c]) => {
|
|
2381
2416
|
const l = n[i];
|
|
2382
|
-
return l === void 0 ? null : /* @__PURE__ */
|
|
2417
|
+
return l === void 0 ? null : /* @__PURE__ */ m(
|
|
2383
2418
|
"div",
|
|
2384
2419
|
{
|
|
2385
|
-
className:
|
|
2420
|
+
className: wc,
|
|
2386
2421
|
style: {
|
|
2387
2422
|
left: l.x,
|
|
2388
2423
|
top: l.y,
|
|
@@ -2391,7 +2426,7 @@ const Jc = ({
|
|
|
2391
2426
|
},
|
|
2392
2427
|
children: [
|
|
2393
2428
|
/* @__PURE__ */ a(
|
|
2394
|
-
|
|
2429
|
+
rd,
|
|
2395
2430
|
{
|
|
2396
2431
|
edge: i,
|
|
2397
2432
|
formattedLegends: c.pill,
|
|
@@ -2400,17 +2435,17 @@ const Jc = ({
|
|
|
2400
2435
|
textScale: r
|
|
2401
2436
|
}
|
|
2402
2437
|
),
|
|
2403
|
-
/* @__PURE__ */ a(
|
|
2438
|
+
/* @__PURE__ */ a(Lc, { legends: c.direct, containerRect: l, textScale: r })
|
|
2404
2439
|
]
|
|
2405
2440
|
},
|
|
2406
2441
|
i
|
|
2407
2442
|
);
|
|
2408
2443
|
}) });
|
|
2409
2444
|
});
|
|
2410
|
-
const
|
|
2445
|
+
const Ft = 1, Jr = 8, dd = 12;
|
|
2411
2446
|
s.pointStrokeColor;
|
|
2412
|
-
const
|
|
2413
|
-
const t = z(e.observation), n = (W(e.observation) ??
|
|
2447
|
+
const ud = 1, hd = 2, gd = 0.7, pe = ({ hit: e }) => {
|
|
2448
|
+
const t = z(e.observation), n = (W(e.observation) ?? Ft) * gd, r = (Re(e.observation) ?? Jr) / 2;
|
|
2414
2449
|
return /* @__PURE__ */ a(
|
|
2415
2450
|
"circle",
|
|
2416
2451
|
{
|
|
@@ -2420,7 +2455,7 @@ const ad = 1, id = 2, sd = 0.7, pe = ({ hit: e }) => {
|
|
|
2420
2455
|
fill: t,
|
|
2421
2456
|
opacity: n,
|
|
2422
2457
|
stroke: s.hoveredPointRingColor,
|
|
2423
|
-
strokeWidth:
|
|
2458
|
+
strokeWidth: hd,
|
|
2424
2459
|
"data-testid": "companion-point"
|
|
2425
2460
|
}
|
|
2426
2461
|
);
|
|
@@ -2430,10 +2465,10 @@ const ad = 1, id = 2, sd = 0.7, pe = ({ hit: e }) => {
|
|
|
2430
2465
|
damping: 60,
|
|
2431
2466
|
mass: 1
|
|
2432
2467
|
}, pt = (e, t) => {
|
|
2433
|
-
const n =
|
|
2468
|
+
const n = Tn(e);
|
|
2434
2469
|
return L(() => {
|
|
2435
|
-
const r =
|
|
2436
|
-
|
|
2470
|
+
const r = ua(n.get(), e);
|
|
2471
|
+
Jo(0, 1, {
|
|
2437
2472
|
...t,
|
|
2438
2473
|
onUpdate: (o) => {
|
|
2439
2474
|
const i = r(o);
|
|
@@ -2443,26 +2478,26 @@ const ad = 1, id = 2, sd = 0.7, pe = ({ hit: e }) => {
|
|
|
2443
2478
|
}, [t, e, n]), n;
|
|
2444
2479
|
};
|
|
2445
2480
|
var ye = "_1d8mpa10";
|
|
2446
|
-
const
|
|
2481
|
+
const pd = oe(function({
|
|
2447
2482
|
layer: t,
|
|
2448
2483
|
coordSystem: n,
|
|
2449
2484
|
isAnimated: r
|
|
2450
2485
|
}) {
|
|
2451
2486
|
const { lineGenerator: o, areaGenerator: i } = v(
|
|
2452
|
-
() =>
|
|
2487
|
+
() => mn(n, t.params),
|
|
2453
2488
|
[t.params, n]
|
|
2454
2489
|
), c = v(() => {
|
|
2455
2490
|
const l = We(t.data, t.mapping, t.id), d = [];
|
|
2456
2491
|
return t.data.groupBy(we.group).forEach((u) => {
|
|
2457
|
-
const h =
|
|
2458
|
-
if (!g || !
|
|
2459
|
-
const
|
|
2460
|
-
if (!
|
|
2461
|
-
const y = z(
|
|
2492
|
+
const h = vn([...u], t.params.missingValues), g = i(h), p = o(h);
|
|
2493
|
+
if (!g || !p) return;
|
|
2494
|
+
const f = h[0];
|
|
2495
|
+
if (!f) return;
|
|
2496
|
+
const y = z(f), S = W(f), k = $e(f, t.params), w = Xe(Ve(f));
|
|
2462
2497
|
d.push({
|
|
2463
|
-
key: l(
|
|
2498
|
+
key: l(f),
|
|
2464
2499
|
areaPath: g,
|
|
2465
|
-
linePath:
|
|
2500
|
+
linePath: p,
|
|
2466
2501
|
color: y,
|
|
2467
2502
|
fillOpacity: S ?? Zr,
|
|
2468
2503
|
strokeWidth: k,
|
|
@@ -2481,7 +2516,7 @@ const ld = oe(function({
|
|
|
2481
2516
|
"data-geom": "area",
|
|
2482
2517
|
className: ye,
|
|
2483
2518
|
children: c.map((l) => /* @__PURE__ */ a(
|
|
2484
|
-
|
|
2519
|
+
fd,
|
|
2485
2520
|
{
|
|
2486
2521
|
areaPath: l.areaPath,
|
|
2487
2522
|
linePath: l.linePath,
|
|
@@ -2496,7 +2531,7 @@ const ld = oe(function({
|
|
|
2496
2531
|
))
|
|
2497
2532
|
}
|
|
2498
2533
|
);
|
|
2499
|
-
}),
|
|
2534
|
+
}), fd = ({
|
|
2500
2535
|
areaPath: e,
|
|
2501
2536
|
linePath: t,
|
|
2502
2537
|
color: n,
|
|
@@ -2506,7 +2541,7 @@ const ld = oe(function({
|
|
|
2506
2541
|
strokeDasharray: c,
|
|
2507
2542
|
isAnimated: l
|
|
2508
2543
|
}) => l ? /* @__PURE__ */ a(
|
|
2509
|
-
|
|
2544
|
+
md,
|
|
2510
2545
|
{
|
|
2511
2546
|
areaPath: e,
|
|
2512
2547
|
linePath: t,
|
|
@@ -2516,7 +2551,7 @@ const ld = oe(function({
|
|
|
2516
2551
|
strokeOpacity: i,
|
|
2517
2552
|
strokeDasharray: c
|
|
2518
2553
|
}
|
|
2519
|
-
) : /* @__PURE__ */
|
|
2554
|
+
) : /* @__PURE__ */ m("g", { children: [
|
|
2520
2555
|
/* @__PURE__ */ a("path", { d: e, fill: n, fillOpacity: r, stroke: "none" }),
|
|
2521
2556
|
/* @__PURE__ */ a(
|
|
2522
2557
|
"path",
|
|
@@ -2530,7 +2565,7 @@ const ld = oe(function({
|
|
|
2530
2565
|
vectorEffect: "non-scaling-stroke"
|
|
2531
2566
|
}
|
|
2532
2567
|
)
|
|
2533
|
-
] }),
|
|
2568
|
+
] }), md = ({
|
|
2534
2569
|
areaPath: e,
|
|
2535
2570
|
linePath: t,
|
|
2536
2571
|
color: n,
|
|
@@ -2540,7 +2575,7 @@ const ld = oe(function({
|
|
|
2540
2575
|
strokeDasharray: c
|
|
2541
2576
|
}) => {
|
|
2542
2577
|
const l = pt(e, O), d = pt(t, O);
|
|
2543
|
-
return /* @__PURE__ */
|
|
2578
|
+
return /* @__PURE__ */ m("g", { children: [
|
|
2544
2579
|
/* @__PURE__ */ a(Y.path, { d: l, fill: n, fillOpacity: r, stroke: "none" }),
|
|
2545
2580
|
/* @__PURE__ */ a(
|
|
2546
2581
|
Y.path,
|
|
@@ -2556,10 +2591,10 @@ const ld = oe(function({
|
|
|
2556
2591
|
)
|
|
2557
2592
|
] });
|
|
2558
2593
|
};
|
|
2559
|
-
var
|
|
2560
|
-
const rt = 1,
|
|
2561
|
-
const n =
|
|
2562
|
-
return /* @__PURE__ */
|
|
2594
|
+
var vd = "_46ebsf0";
|
|
2595
|
+
const rt = 1, yd = 2, bd = 1, xd = dd / 2, Sd = 2.25, Nt = ({ hit: e, ...t }) => {
|
|
2596
|
+
const n = kd(e.observation), r = z(e.observation), o = W(e.observation) ?? Ft, i = x(Ge(e.x)), c = x(ze(e.y)), d = n + rt / 2 + bd + rt / 2;
|
|
2597
|
+
return /* @__PURE__ */ m("g", { ...t, className: vd, children: [
|
|
2563
2598
|
/* @__PURE__ */ a(
|
|
2564
2599
|
"circle",
|
|
2565
2600
|
{
|
|
@@ -2568,7 +2603,7 @@ const rt = 1, hd = 2, gd = 1, pd = od / 2, fd = 2.25, Ft = ({ hit: e, ...t }) =>
|
|
|
2568
2603
|
r: d,
|
|
2569
2604
|
fill: "none",
|
|
2570
2605
|
stroke: s.hoveredPointRingColor,
|
|
2571
|
-
strokeWidth:
|
|
2606
|
+
strokeWidth: yd
|
|
2572
2607
|
}
|
|
2573
2608
|
),
|
|
2574
2609
|
/* @__PURE__ */ a(
|
|
@@ -2584,24 +2619,24 @@ const rt = 1, hd = 2, gd = 1, pd = od / 2, fd = 2.25, Ft = ({ hit: e, ...t }) =>
|
|
|
2584
2619
|
}
|
|
2585
2620
|
)
|
|
2586
2621
|
] });
|
|
2587
|
-
},
|
|
2622
|
+
}, kd = (e) => {
|
|
2588
2623
|
const t = Re(e);
|
|
2589
|
-
return
|
|
2590
|
-
},
|
|
2591
|
-
const o =
|
|
2592
|
-
const
|
|
2593
|
-
return
|
|
2624
|
+
return yn(t) ? t / Sd : xd;
|
|
2625
|
+
}, Ld = ({ layer: e, coordSystem: t, primary: n, companions: r }) => {
|
|
2626
|
+
const o = bn(n.observation), i = v(() => {
|
|
2627
|
+
const p = e.data.filter(we.group, "eq", o);
|
|
2628
|
+
return vn([...p], e.params.missingValues);
|
|
2594
2629
|
}, [e.data, e.params.missingValues, o]), { areaPath: c, linePath: l } = v(() => {
|
|
2595
|
-
const { lineGenerator:
|
|
2630
|
+
const { lineGenerator: p, areaGenerator: f } = mn(t, e.params);
|
|
2596
2631
|
return {
|
|
2597
|
-
areaPath:
|
|
2598
|
-
linePath:
|
|
2632
|
+
areaPath: f(i) ?? "",
|
|
2633
|
+
linePath: p(i) ?? ""
|
|
2599
2634
|
};
|
|
2600
2635
|
}, [t, e.params, i]);
|
|
2601
2636
|
if (!c || !l) return null;
|
|
2602
2637
|
const d = z(n.observation), u = W(n.observation) ?? Zr, h = $e(n.observation, e.params), g = Xe(Ve(n.observation));
|
|
2603
|
-
return /* @__PURE__ */
|
|
2604
|
-
/* @__PURE__ */
|
|
2638
|
+
return /* @__PURE__ */ m("g", { "data-testid": "hovered-area", children: [
|
|
2639
|
+
/* @__PURE__ */ m(
|
|
2605
2640
|
"svg",
|
|
2606
2641
|
{
|
|
2607
2642
|
viewBox: "0 0 1 1",
|
|
@@ -2628,25 +2663,25 @@ const rt = 1, hd = 2, gd = 1, pd = od / 2, fd = 2.25, Ft = ({ hit: e, ...t }) =>
|
|
|
2628
2663
|
]
|
|
2629
2664
|
}
|
|
2630
2665
|
),
|
|
2631
|
-
r.map((
|
|
2632
|
-
/* @__PURE__ */ a(
|
|
2666
|
+
r.map((p) => /* @__PURE__ */ a(pe, { hit: p }, `companion-${p.layerId}-${p.pointIndex}`)),
|
|
2667
|
+
/* @__PURE__ */ a(Nt, { hit: n, "data-testid": "hovered-area-point" })
|
|
2633
2668
|
] });
|
|
2634
|
-
},
|
|
2669
|
+
}, Cd = {
|
|
2635
2670
|
geom: "area",
|
|
2636
2671
|
coord: "cartesian",
|
|
2637
2672
|
guideMode: "continuous",
|
|
2638
|
-
render: ({ layer: e, coordSystem: t, isAnimated: n }) => /* @__PURE__ */ a(
|
|
2639
|
-
renderHover: ({ layer: e, coordSystem: t, primary: n, group: r, related: o }) => /* @__PURE__ */ a(
|
|
2640
|
-
renderHoverCompanions: ({ related: e }) => /* @__PURE__ */ a(
|
|
2673
|
+
render: ({ layer: e, coordSystem: t, isAnimated: n }) => /* @__PURE__ */ a(pd, { layer: e, coordSystem: t, isAnimated: n }),
|
|
2674
|
+
renderHover: ({ layer: e, coordSystem: t, primary: n, group: r, related: o }) => /* @__PURE__ */ a(Ld, { layer: e, coordSystem: t, primary: n, companions: [...r, ...o] }),
|
|
2675
|
+
renderHoverCompanions: ({ related: e }) => /* @__PURE__ */ a(T, { children: e.map((t) => /* @__PURE__ */ a(pe, { hit: t }, `companion-${t.layerId}-${t.pointIndex}`)) }),
|
|
2641
2676
|
getOverlayAnchor: ({ observation: e, coordSystem: t }) => {
|
|
2642
2677
|
if (t.mainAxis === "x") {
|
|
2643
|
-
const o = ue(e), i =
|
|
2678
|
+
const o = ue(e), i = Mo(e) ?? he(e);
|
|
2644
2679
|
return o === null || i === null ? null : { x: o, y: i };
|
|
2645
2680
|
}
|
|
2646
|
-
const n = he(e), r =
|
|
2681
|
+
const n = he(e), r = Do(e) ?? ue(e);
|
|
2647
2682
|
return n === null || r === null ? null : { x: r, y: n };
|
|
2648
2683
|
}
|
|
2649
|
-
}, eo = 1, Te = 4,
|
|
2684
|
+
}, eo = 1, Te = 4, Td = oe(function({
|
|
2650
2685
|
layer: t,
|
|
2651
2686
|
coordSystem: n,
|
|
2652
2687
|
isAnimated: r
|
|
@@ -2654,37 +2689,37 @@ const rt = 1, hd = 2, gd = 1, pd = od / 2, fd = 2.25, Ft = ({ hit: e, ...t }) =>
|
|
|
2654
2689
|
const o = vt(), i = v(() => {
|
|
2655
2690
|
const l = We(t.data, t.mapping, t.id), d = /* @__PURE__ */ new Map();
|
|
2656
2691
|
for (const u of t.data) {
|
|
2657
|
-
const h =
|
|
2692
|
+
const h = xn(n.mainAxis, u);
|
|
2658
2693
|
if (!h) continue;
|
|
2659
|
-
const g =
|
|
2694
|
+
const g = Ad(n.mainAxis, h), p = d.get(g), f = {
|
|
2660
2695
|
key: l(u),
|
|
2661
2696
|
...h,
|
|
2662
2697
|
fill: z(u),
|
|
2663
2698
|
opacity: W(u) ?? eo
|
|
2664
2699
|
};
|
|
2665
|
-
|
|
2700
|
+
p ? p.push(f) : d.set(g, [f]);
|
|
2666
2701
|
}
|
|
2667
2702
|
return [...d.entries()].map(([u, h]) => ({
|
|
2668
2703
|
id: `${o}${u}`,
|
|
2669
2704
|
bars: h,
|
|
2670
|
-
...
|
|
2705
|
+
...Ed(h)
|
|
2671
2706
|
}));
|
|
2672
2707
|
}, [o, n.mainAxis, t]), c = i.filter((l) => l.bars.length > 1);
|
|
2673
|
-
return /* @__PURE__ */
|
|
2674
|
-
c.length > 0 && /* @__PURE__ */ a("defs", { children: c.map((l) => /* @__PURE__ */ a("clipPath", { id: l.id, children: /* @__PURE__ */ a(
|
|
2708
|
+
return /* @__PURE__ */ m(T, { children: [
|
|
2709
|
+
c.length > 0 && /* @__PURE__ */ a("defs", { children: c.map((l) => /* @__PURE__ */ a("clipPath", { id: l.id, children: /* @__PURE__ */ a(wd, { column: l, isAnimated: r }) }, l.id)) }),
|
|
2675
2710
|
i.map((l) => {
|
|
2676
2711
|
const [d] = l.bars;
|
|
2677
2712
|
if (l.bars.length === 1 && d !== void 0) {
|
|
2678
2713
|
const { key: u, ...h } = d;
|
|
2679
|
-
return /* @__PURE__ */ a(
|
|
2714
|
+
return /* @__PURE__ */ a(Qt, { ...h, rx: Te, isAnimated: r }, u);
|
|
2680
2715
|
}
|
|
2681
2716
|
return /* @__PURE__ */ a("g", { clipPath: `url(#${l.id})`, children: l.bars.map((u) => {
|
|
2682
2717
|
const { key: h, ...g } = u;
|
|
2683
|
-
return /* @__PURE__ */ a(
|
|
2718
|
+
return /* @__PURE__ */ a(Qt, { ...g, isAnimated: r }, h);
|
|
2684
2719
|
}) }, l.id);
|
|
2685
2720
|
})
|
|
2686
2721
|
] });
|
|
2687
|
-
}),
|
|
2722
|
+
}), Qt = ({ isAnimated: e, rx: t, ...n }) => e ? /* @__PURE__ */ a(
|
|
2688
2723
|
Y.rect,
|
|
2689
2724
|
{
|
|
2690
2725
|
initial: !1,
|
|
@@ -2713,7 +2748,7 @@ const rt = 1, hd = 2, gd = 1, pd = od / 2, fd = 2.25, Ft = ({ hit: e, ...t }) =>
|
|
|
2713
2748
|
opacity: n.opacity,
|
|
2714
2749
|
rx: t
|
|
2715
2750
|
}
|
|
2716
|
-
),
|
|
2751
|
+
), wd = ({ column: e, isAnimated: t }) => t ? /* @__PURE__ */ a(
|
|
2717
2752
|
Y.rect,
|
|
2718
2753
|
{
|
|
2719
2754
|
initial: !1,
|
|
@@ -2736,18 +2771,18 @@ const rt = 1, hd = 2, gd = 1, pd = od / 2, fd = 2.25, Ft = ({ hit: e, ...t }) =>
|
|
|
2736
2771
|
height: x(e.height),
|
|
2737
2772
|
rx: Te
|
|
2738
2773
|
}
|
|
2739
|
-
),
|
|
2774
|
+
), Ad = (e, t) => e === "x" ? `${t.x}-${t.width}` : `${t.y}-${t.height}`, Ed = (e) => {
|
|
2740
2775
|
let t = 1 / 0, n = 1 / 0, r = -1 / 0, o = -1 / 0;
|
|
2741
2776
|
for (const i of e)
|
|
2742
2777
|
i.x < t && (t = i.x), i.y < n && (n = i.y), i.x + i.width > r && (r = i.x + i.width), i.y + i.height > o && (o = i.y + i.height);
|
|
2743
2778
|
return { x: t, y: n, width: r - t, height: o - n };
|
|
2744
2779
|
};
|
|
2745
|
-
var
|
|
2746
|
-
const ke = 3,
|
|
2747
|
-
const r =
|
|
2780
|
+
var _d = "_1suo8ub0";
|
|
2781
|
+
const ke = 3, Pd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
2782
|
+
const r = xn(e.mainAxis, t.observation);
|
|
2748
2783
|
if (!r) return null;
|
|
2749
|
-
const o = r.x * n.width, i = r.y * n.height, c = r.width * n.width, l = r.height * n.height, d = o - ke, u = i - ke, h = c + ke * 2, g = l + ke * 2,
|
|
2750
|
-
return /* @__PURE__ */
|
|
2784
|
+
const o = r.x * n.width, i = r.y * n.height, c = r.width * n.width, l = r.height * n.height, d = o - ke, u = i - ke, h = c + ke * 2, g = l + ke * 2, p = Te + ke, f = z(t.observation), y = W(t.observation) ?? eo;
|
|
2785
|
+
return /* @__PURE__ */ m("g", { "data-testid": "hovered-bar", children: [
|
|
2751
2786
|
/* @__PURE__ */ a(
|
|
2752
2787
|
"rect",
|
|
2753
2788
|
{
|
|
@@ -2755,9 +2790,9 @@ const ke = 3, Cd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
|
2755
2790
|
y: u,
|
|
2756
2791
|
width: h,
|
|
2757
2792
|
height: g,
|
|
2758
|
-
rx:
|
|
2793
|
+
rx: p,
|
|
2759
2794
|
fill: s.hoveredBarBorderColor,
|
|
2760
|
-
className:
|
|
2795
|
+
className: _d,
|
|
2761
2796
|
"data-testid": "hovered-bar-border"
|
|
2762
2797
|
}
|
|
2763
2798
|
),
|
|
@@ -2768,38 +2803,38 @@ const ke = 3, Cd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
|
2768
2803
|
y: x(r.y),
|
|
2769
2804
|
width: x(r.width),
|
|
2770
2805
|
height: x(r.height),
|
|
2771
|
-
fill:
|
|
2806
|
+
fill: f,
|
|
2772
2807
|
opacity: y,
|
|
2773
2808
|
rx: Te,
|
|
2774
2809
|
"data-testid": "hovered-bar-fill"
|
|
2775
2810
|
}
|
|
2776
2811
|
)
|
|
2777
2812
|
] });
|
|
2778
|
-
},
|
|
2813
|
+
}, Hd = {
|
|
2779
2814
|
geom: "bar",
|
|
2780
2815
|
coord: "cartesian",
|
|
2781
2816
|
guideMode: "bar",
|
|
2782
|
-
render: ({ layer: e, coordSystem: t, isAnimated: n }) => /* @__PURE__ */ a(
|
|
2783
|
-
renderHover: ({ coordSystem: e, primary: t, panelRect: n }) => /* @__PURE__ */ a(
|
|
2817
|
+
render: ({ layer: e, coordSystem: t, isAnimated: n }) => /* @__PURE__ */ a(Td, { layer: e, coordSystem: t, isAnimated: n }),
|
|
2818
|
+
renderHover: ({ coordSystem: e, primary: t, panelRect: n }) => /* @__PURE__ */ a(Pd, { coordSystem: e, primary: t, panelRect: n }),
|
|
2784
2819
|
renderHoverCompanions: () => null
|
|
2785
|
-
}, to = 1,
|
|
2820
|
+
}, to = 1, Fd = oe(function({
|
|
2786
2821
|
layer: t,
|
|
2787
2822
|
isAnimated: n
|
|
2788
2823
|
}) {
|
|
2789
|
-
const r = v(() =>
|
|
2824
|
+
const r = v(() => Sn(t.params), [t.params]), o = v(() => {
|
|
2790
2825
|
const i = We(t.data, t.mapping, t.id), c = [];
|
|
2791
2826
|
return t.data.groupBy(we.group).forEach((l) => {
|
|
2792
|
-
const d =
|
|
2827
|
+
const d = kn([...l], t.params.missingValues), u = r(d);
|
|
2793
2828
|
if (!u) return;
|
|
2794
2829
|
const h = d[0];
|
|
2795
2830
|
if (!h) return;
|
|
2796
|
-
const g = z(h),
|
|
2831
|
+
const g = z(h), p = W(h), f = $e(h, t.params), y = Xe(Ve(h));
|
|
2797
2832
|
c.push({
|
|
2798
2833
|
key: i(h),
|
|
2799
2834
|
pathData: u,
|
|
2800
2835
|
color: g,
|
|
2801
|
-
opacity:
|
|
2802
|
-
strokeWidth:
|
|
2836
|
+
opacity: p ?? to,
|
|
2837
|
+
strokeWidth: f,
|
|
2803
2838
|
strokeDasharray: y
|
|
2804
2839
|
});
|
|
2805
2840
|
}), c;
|
|
@@ -2814,7 +2849,7 @@ const ke = 3, Cd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
|
2814
2849
|
"data-geom": "line",
|
|
2815
2850
|
className: ye,
|
|
2816
2851
|
children: o.map((i) => /* @__PURE__ */ a(
|
|
2817
|
-
|
|
2852
|
+
Nd,
|
|
2818
2853
|
{
|
|
2819
2854
|
pathData: i.pathData,
|
|
2820
2855
|
color: i.color,
|
|
@@ -2827,8 +2862,8 @@ const ke = 3, Cd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
|
2827
2862
|
))
|
|
2828
2863
|
}
|
|
2829
2864
|
);
|
|
2830
|
-
}),
|
|
2831
|
-
|
|
2865
|
+
}), Nd = ({ pathData: e, color: t, strokeWidth: n, opacity: r, strokeDasharray: o, isAnimated: i }) => i ? /* @__PURE__ */ a(
|
|
2866
|
+
Bd,
|
|
2832
2867
|
{
|
|
2833
2868
|
pathData: e,
|
|
2834
2869
|
color: t,
|
|
@@ -2847,7 +2882,7 @@ const ke = 3, Cd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
|
2847
2882
|
strokeDasharray: o,
|
|
2848
2883
|
vectorEffect: "non-scaling-stroke"
|
|
2849
2884
|
}
|
|
2850
|
-
),
|
|
2885
|
+
), Bd = ({
|
|
2851
2886
|
pathData: e,
|
|
2852
2887
|
color: t,
|
|
2853
2888
|
strokeWidth: n,
|
|
@@ -2867,14 +2902,14 @@ const ke = 3, Cd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
|
2867
2902
|
vectorEffect: "non-scaling-stroke"
|
|
2868
2903
|
}
|
|
2869
2904
|
);
|
|
2870
|
-
},
|
|
2871
|
-
const r =
|
|
2905
|
+
}, Id = ({ layer: e, primary: t, companions: n }) => {
|
|
2906
|
+
const r = bn(t.observation), o = v(() => {
|
|
2872
2907
|
const h = e.data.filter(we.group, "eq", r);
|
|
2873
|
-
return
|
|
2874
|
-
}, [e.data, e.params.missingValues, r]), i = v(() =>
|
|
2908
|
+
return kn([...h], e.params.missingValues);
|
|
2909
|
+
}, [e.data, e.params.missingValues, r]), i = v(() => Sn(e.params)(o), [e.params, o]);
|
|
2875
2910
|
if (!i) return null;
|
|
2876
2911
|
const c = z(t.observation), l = W(t.observation) ?? to, d = $e(t.observation, e.params), u = Xe(Ve(t.observation));
|
|
2877
|
-
return /* @__PURE__ */
|
|
2912
|
+
return /* @__PURE__ */ m("g", { "data-testid": "hovered-line", children: [
|
|
2878
2913
|
/* @__PURE__ */ a(
|
|
2879
2914
|
"svg",
|
|
2880
2915
|
{
|
|
@@ -2900,20 +2935,20 @@ const ke = 3, Cd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
|
2900
2935
|
}
|
|
2901
2936
|
),
|
|
2902
2937
|
n.map((h) => /* @__PURE__ */ a(pe, { hit: h }, `companion-${h.layerId}-${h.pointIndex}`)),
|
|
2903
|
-
/* @__PURE__ */ a(
|
|
2938
|
+
/* @__PURE__ */ a(Nt, { hit: t, "data-testid": "hovered-line-point" })
|
|
2904
2939
|
] });
|
|
2905
|
-
},
|
|
2940
|
+
}, Md = {
|
|
2906
2941
|
geom: "line",
|
|
2907
2942
|
coord: "cartesian",
|
|
2908
2943
|
guideMode: "continuous",
|
|
2909
|
-
render: ({ layer: e, isAnimated: t }) => /* @__PURE__ */ a(
|
|
2910
|
-
renderHover: ({ layer: e, primary: t, group: n, related: r }) => /* @__PURE__ */ a(
|
|
2911
|
-
renderHoverCompanions: ({ related: e }) => /* @__PURE__ */ a(
|
|
2944
|
+
render: ({ layer: e, isAnimated: t }) => /* @__PURE__ */ a(Fd, { layer: e, isAnimated: t }),
|
|
2945
|
+
renderHover: ({ layer: e, primary: t, group: n, related: r }) => /* @__PURE__ */ a(Id, { layer: e, primary: t, companions: [...n, ...r] }),
|
|
2946
|
+
renderHoverCompanions: ({ related: e }) => /* @__PURE__ */ a(T, { children: e.map((t) => /* @__PURE__ */ a(pe, { hit: t }, `companion-${t.layerId}-${t.pointIndex}`)) }),
|
|
2912
2947
|
getOverlayAnchor: ({ observation: e }) => {
|
|
2913
2948
|
const t = ue(e), n = he(e);
|
|
2914
2949
|
return t === null || n === null ? null : { x: t, y: n };
|
|
2915
2950
|
}
|
|
2916
|
-
},
|
|
2951
|
+
}, Dd = oe(function({
|
|
2917
2952
|
layer: t,
|
|
2918
2953
|
isAnimated: n
|
|
2919
2954
|
}) {
|
|
@@ -2924,22 +2959,22 @@ const ke = 3, Cd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
|
2924
2959
|
const l = i++, d = ue(c), u = he(c);
|
|
2925
2960
|
if (d === null || u === null)
|
|
2926
2961
|
continue;
|
|
2927
|
-
const h = z(c), g = W(c),
|
|
2962
|
+
const h = z(c), g = W(c), p = Re(c), f = Oo(c);
|
|
2928
2963
|
o.push({
|
|
2929
2964
|
key: String(l),
|
|
2930
2965
|
// using the observation index as key for points leads to nicer transitions
|
|
2931
2966
|
cx: Ge(d),
|
|
2932
2967
|
cy: ze(u),
|
|
2933
|
-
radius: (
|
|
2968
|
+
radius: (p ?? t.params.size) / 2,
|
|
2934
2969
|
fill: h,
|
|
2935
2970
|
stroke: s.pointStrokeColor,
|
|
2936
|
-
opacity: g ??
|
|
2937
|
-
strokeWidth:
|
|
2971
|
+
opacity: g ?? Ft,
|
|
2972
|
+
strokeWidth: f ?? ud
|
|
2938
2973
|
});
|
|
2939
2974
|
}
|
|
2940
2975
|
return o;
|
|
2941
2976
|
}, [t.data, t.params.size]);
|
|
2942
|
-
return /* @__PURE__ */ a(
|
|
2977
|
+
return /* @__PURE__ */ a(T, { children: r.map((o) => n ? /* @__PURE__ */ a(
|
|
2943
2978
|
Y.circle,
|
|
2944
2979
|
{
|
|
2945
2980
|
initial: !1,
|
|
@@ -2968,43 +3003,43 @@ const ke = 3, Cd = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
|
2968
3003
|
},
|
|
2969
3004
|
o.key
|
|
2970
3005
|
)) });
|
|
2971
|
-
}),
|
|
3006
|
+
}), Od = {
|
|
2972
3007
|
geom: "point",
|
|
2973
3008
|
coord: "cartesian",
|
|
2974
3009
|
guideMode: null,
|
|
2975
|
-
render: ({ layer: e, isAnimated: t }) => /* @__PURE__ */ a(
|
|
2976
|
-
renderHover: ({ primary: e, group: t, related: n }) => /* @__PURE__ */
|
|
3010
|
+
render: ({ layer: e, isAnimated: t }) => /* @__PURE__ */ a(Dd, { layer: e, isAnimated: t }),
|
|
3011
|
+
renderHover: ({ primary: e, group: t, related: n }) => /* @__PURE__ */ m("g", { "data-testid": "hovered-point", children: [
|
|
2977
3012
|
[...t, ...n].map((r) => /* @__PURE__ */ a(pe, { hit: r }, `companion-${r.layerId}-${r.pointIndex}`)),
|
|
2978
|
-
/* @__PURE__ */ a(
|
|
3013
|
+
/* @__PURE__ */ a(Nt, { hit: e })
|
|
2979
3014
|
] }),
|
|
2980
|
-
renderHoverCompanions: ({ related: e }) => /* @__PURE__ */ a(
|
|
3015
|
+
renderHoverCompanions: ({ related: e }) => /* @__PURE__ */ a(T, { children: e.map((t) => /* @__PURE__ */ a(pe, { hit: t }, `companion-${t.layerId}-${t.pointIndex}`)) }),
|
|
2981
3016
|
getOverlayAnchor: ({ observation: e }) => {
|
|
2982
3017
|
const t = ue(e), n = he(e);
|
|
2983
3018
|
return t === null || n === null ? null : { x: t, y: n };
|
|
2984
3019
|
}
|
|
2985
|
-
},
|
|
2986
|
-
var
|
|
2987
|
-
const
|
|
3020
|
+
}, Rd = 11.7, zd = N.xs, Gd = R, Wd = K.medium, Le = 5, $d = 5, en = 10, tn = 10, Xd = 4, Oe = 13, no = 6, ot = 12, nn = 21.6, Vd = "0 0 10 18", Ud = "M2.48935 16.9323L9.07098 9.82964C9.51595 9.34944 9.51504 8.60728 9.0689 8.12818L2.48866 1.06172C1.85811 0.384586 0.974477 0 0.049217 0H0V18H0.0443689C0.972463 18 1.85854 17.6131 2.48935 16.9323Z", rn = "#FFFFFF", at = "#1A1A1A";
|
|
3021
|
+
var Yd = "_16vokpr0";
|
|
3022
|
+
const jd = (e, t) => {
|
|
2988
3023
|
const n = e.mapping.y !== void 0, r = t.mainAxis === "y";
|
|
2989
3024
|
return n !== r;
|
|
2990
|
-
},
|
|
3025
|
+
}, qd = (e, t) => {
|
|
2991
3026
|
const n = x(e ? 1 - t : t);
|
|
2992
3027
|
return e ? { x1: "0%", y1: n, x2: "100%", y2: n } : { x1: n, y1: "0%", x2: n, y2: "100%" };
|
|
2993
|
-
},
|
|
3028
|
+
}, Kd = (e, t) => e === "solid" ? {} : e === "dotted" ? { strokeDasharray: `0 ${t * 2}`, strokeLinecap: "round" } : {
|
|
2994
3029
|
strokeDasharray: `${t * 2} ${t * 3}`,
|
|
2995
3030
|
strokeLinecap: "round",
|
|
2996
3031
|
strokeMiterlimit: 16
|
|
2997
|
-
},
|
|
3032
|
+
}, Jd = (e) => {
|
|
2998
3033
|
const t = e.params.color, n = t ?? s.targetLineColor;
|
|
2999
3034
|
let r = s.targetLineLabelTextColor;
|
|
3000
3035
|
if (t !== void 0)
|
|
3001
3036
|
try {
|
|
3002
|
-
r = ct(t,
|
|
3037
|
+
r = ct(t, rn) > ct(t, at) ? rn : at;
|
|
3003
3038
|
} catch {
|
|
3004
3039
|
r = at;
|
|
3005
3040
|
}
|
|
3006
3041
|
return { lineColor: n, labelTextColor: r };
|
|
3007
|
-
},
|
|
3042
|
+
}, Zd = (e, t) => Be(e) && Be(t) ? `${e}: ${t}` : Be(e) ? e : Be(t) ? t : null, Be = (e) => e != null && e.trim() !== "", Qd = ({
|
|
3008
3043
|
labelPosition: e,
|
|
3009
3044
|
linePosition: t,
|
|
3010
3045
|
color: n,
|
|
@@ -3013,18 +3048,18 @@ const Wd = (e, t) => {
|
|
|
3013
3048
|
text: i,
|
|
3014
3049
|
isAnimated: c
|
|
3015
3050
|
}) => {
|
|
3016
|
-
const l = e === "start", d = l ? -Oe : -(r - Oe), u = l ? d + r - Le : d + Le - ot, h = l ? void 0 : `rotate(180 ${u + ot / 2} ${o / 2})`, g = l ? "0%" : "100%",
|
|
3051
|
+
const l = e === "start", d = l ? -Oe : -(r - Oe), u = l ? d + r - Le : d + Le - ot, h = l ? void 0 : `rotate(180 ${u + ot / 2} ${o / 2})`, g = l ? "0%" : "100%", p = x(1 - t), f = /* @__PURE__ */ m("g", { transform: `translate(0, ${-o / 2})`, pointerEvents: "none", children: [
|
|
3017
3052
|
/* @__PURE__ */ a("rect", { x: d, y: 0, width: r, height: o, rx: no, fill: n }),
|
|
3018
3053
|
/* @__PURE__ */ a("g", { transform: h, children: /* @__PURE__ */ a(
|
|
3019
3054
|
"svg",
|
|
3020
3055
|
{
|
|
3021
3056
|
x: u,
|
|
3022
|
-
y: (o -
|
|
3057
|
+
y: (o - nn) / 2,
|
|
3023
3058
|
width: ot,
|
|
3024
|
-
height:
|
|
3025
|
-
viewBox:
|
|
3059
|
+
height: nn,
|
|
3060
|
+
viewBox: Vd,
|
|
3026
3061
|
overflow: "visible",
|
|
3027
|
-
children: /* @__PURE__ */ a("path", { d:
|
|
3062
|
+
children: /* @__PURE__ */ a("path", { d: Ud, fill: n })
|
|
3028
3063
|
}
|
|
3029
3064
|
) }),
|
|
3030
3065
|
/* @__PURE__ */ a("g", { transform: `translate(${d + Le}, ${o / 2})`, children: i })
|
|
@@ -3035,12 +3070,12 @@ const Wd = (e, t) => {
|
|
|
3035
3070
|
initial: !1,
|
|
3036
3071
|
transition: O,
|
|
3037
3072
|
x: g,
|
|
3038
|
-
animate: { y:
|
|
3073
|
+
animate: { y: p },
|
|
3039
3074
|
overflow: "visible",
|
|
3040
|
-
children:
|
|
3075
|
+
children: f
|
|
3041
3076
|
}
|
|
3042
|
-
) : /* @__PURE__ */ a("svg", { x: g, y:
|
|
3043
|
-
},
|
|
3077
|
+
) : /* @__PURE__ */ a("svg", { x: g, y: p, overflow: "visible", children: f });
|
|
3078
|
+
}, eu = ({
|
|
3044
3079
|
labelPosition: e,
|
|
3045
3080
|
linePosition: t,
|
|
3046
3081
|
color: n,
|
|
@@ -3049,7 +3084,7 @@ const Wd = (e, t) => {
|
|
|
3049
3084
|
text: i,
|
|
3050
3085
|
isAnimated: c
|
|
3051
3086
|
}) => {
|
|
3052
|
-
const l = e === "start", d = l ? -Oe : -(o - Oe), u = x(t), h = l ? "100%" : "0%", g = /* @__PURE__ */
|
|
3087
|
+
const l = e === "start", d = l ? -Oe : -(o - Oe), u = x(t), h = l ? "100%" : "0%", g = /* @__PURE__ */ m("g", { transform: `translate(${-r / 2}, 0)`, pointerEvents: "none", children: [
|
|
3053
3088
|
/* @__PURE__ */ a("rect", { x: 0, y: d, width: r, height: o, rx: no, fill: n }),
|
|
3054
3089
|
/* @__PURE__ */ a("g", { transform: `translate(${Le}, ${d + o / 2})`, children: i })
|
|
3055
3090
|
] });
|
|
@@ -3064,7 +3099,7 @@ const Wd = (e, t) => {
|
|
|
3064
3099
|
children: g
|
|
3065
3100
|
}
|
|
3066
3101
|
) : /* @__PURE__ */ a("svg", { x: u, y: h, overflow: "visible", children: g });
|
|
3067
|
-
},
|
|
3102
|
+
}, tu = ({
|
|
3068
3103
|
label: e,
|
|
3069
3104
|
textWidth: t,
|
|
3070
3105
|
labelPosition: n,
|
|
@@ -3076,8 +3111,8 @@ const Wd = (e, t) => {
|
|
|
3076
3111
|
symbolColor: d,
|
|
3077
3112
|
isAnimated: u
|
|
3078
3113
|
}) => {
|
|
3079
|
-
const h = l === null ? 0 :
|
|
3080
|
-
l !== null && d !== null && /* @__PURE__ */ a("g", { transform: `translate(0, ${-
|
|
3114
|
+
const h = l === null ? 0 : en + Xd, g = t + h + Le * 2, p = Rd + $d * 2, f = /* @__PURE__ */ m(T, { children: [
|
|
3115
|
+
l !== null && d !== null && /* @__PURE__ */ a("g", { transform: `translate(0, ${-tn / 2})`, children: /* @__PURE__ */ a(Ye, { shape: l, color: d, width: en, height: tn }) }),
|
|
3081
3116
|
/* @__PURE__ */ a(
|
|
3082
3117
|
"text",
|
|
3083
3118
|
{
|
|
@@ -3091,30 +3126,30 @@ const Wd = (e, t) => {
|
|
|
3091
3126
|
)
|
|
3092
3127
|
] });
|
|
3093
3128
|
return r ? /* @__PURE__ */ a(
|
|
3094
|
-
|
|
3129
|
+
Qd,
|
|
3095
3130
|
{
|
|
3096
3131
|
labelPosition: n,
|
|
3097
3132
|
linePosition: o,
|
|
3098
3133
|
color: i,
|
|
3099
3134
|
pillWidth: g,
|
|
3100
|
-
pillHeight:
|
|
3101
|
-
text:
|
|
3135
|
+
pillHeight: p,
|
|
3136
|
+
text: f,
|
|
3102
3137
|
isAnimated: u
|
|
3103
3138
|
}
|
|
3104
3139
|
) : /* @__PURE__ */ a(
|
|
3105
|
-
|
|
3140
|
+
eu,
|
|
3106
3141
|
{
|
|
3107
3142
|
labelPosition: n,
|
|
3108
3143
|
linePosition: o,
|
|
3109
3144
|
color: i,
|
|
3110
3145
|
pillWidth: g,
|
|
3111
|
-
pillHeight:
|
|
3112
|
-
text:
|
|
3146
|
+
pillHeight: p,
|
|
3147
|
+
text: f,
|
|
3113
3148
|
isAnimated: u
|
|
3114
3149
|
}
|
|
3115
3150
|
);
|
|
3116
|
-
},
|
|
3117
|
-
const i =
|
|
3151
|
+
}, nu = ({ layer: e, isHorizontalLine: t, position: n, lineColor: r, isAnimated: o }) => {
|
|
3152
|
+
const i = qd(t, n), c = Kd(e.params.lineType, e.params.strokeWidth);
|
|
3118
3153
|
return o ? /* @__PURE__ */ a(
|
|
3119
3154
|
Y.line,
|
|
3120
3155
|
{
|
|
@@ -3136,14 +3171,14 @@ const Wd = (e, t) => {
|
|
|
3136
3171
|
vectorEffect: "non-scaling-stroke"
|
|
3137
3172
|
}
|
|
3138
3173
|
);
|
|
3139
|
-
},
|
|
3174
|
+
}, ru = oe(function({
|
|
3140
3175
|
layer: t,
|
|
3141
3176
|
coordSystem: n,
|
|
3142
3177
|
formattingLocale: r,
|
|
3143
3178
|
isAnimated: o
|
|
3144
3179
|
}) {
|
|
3145
3180
|
const i = ve(), { guides: c, numberFormat: l, textScale: d, layers: u, colorScale: h } = B(
|
|
3146
|
-
|
|
3181
|
+
j((_) => ({
|
|
3147
3182
|
guides: _.guides,
|
|
3148
3183
|
numberFormat: _.config.numberFormat,
|
|
3149
3184
|
textScale: _.config.appearance.textScale,
|
|
@@ -3151,27 +3186,27 @@ const Wd = (e, t) => {
|
|
|
3151
3186
|
colorScale: _.scales.color
|
|
3152
3187
|
}))
|
|
3153
3188
|
), g = v(
|
|
3154
|
-
() =>
|
|
3189
|
+
() => Ro(u, h, n).get(t.id) ?? null,
|
|
3155
3190
|
[u, h, n, t.id]
|
|
3156
|
-
), m = v(
|
|
3157
|
-
() => Ud(t.params.label, Ro({ guides: c, numberFormat: l, layer: t, locale: r })),
|
|
3158
|
-
[c, l, r, t]
|
|
3159
3191
|
), p = v(
|
|
3192
|
+
() => Zd(t.params.label, zo({ guides: c, numberFormat: l, layer: t, locale: r })),
|
|
3193
|
+
[c, l, r, t]
|
|
3194
|
+
), f = v(
|
|
3160
3195
|
() => ({
|
|
3161
|
-
family:
|
|
3162
|
-
size:
|
|
3163
|
-
weight:
|
|
3196
|
+
family: Gd,
|
|
3197
|
+
size: te(zd, d),
|
|
3198
|
+
weight: Wd
|
|
3164
3199
|
}),
|
|
3165
3200
|
[d]
|
|
3166
3201
|
), y = v(
|
|
3167
|
-
() =>
|
|
3168
|
-
[
|
|
3202
|
+
() => p === null ? 0 : i.measureText(p, f).width,
|
|
3203
|
+
[p, f, i]
|
|
3169
3204
|
), S = t.data.getFirst();
|
|
3170
3205
|
if (!S) return null;
|
|
3171
|
-
const { lineColor: k, labelTextColor: w } =
|
|
3172
|
-
return I === null ? null : /* @__PURE__ */
|
|
3206
|
+
const { lineColor: k, labelTextColor: w } = Jd(t), A = jd(t, n), I = A ? he(S) : ue(S);
|
|
3207
|
+
return I === null ? null : /* @__PURE__ */ m("g", { "data-geom": "rule", className: Yd, children: [
|
|
3173
3208
|
/* @__PURE__ */ a(
|
|
3174
|
-
|
|
3209
|
+
nu,
|
|
3175
3210
|
{
|
|
3176
3211
|
layer: t,
|
|
3177
3212
|
isHorizontalLine: A,
|
|
@@ -3180,10 +3215,10 @@ const Wd = (e, t) => {
|
|
|
3180
3215
|
isAnimated: o
|
|
3181
3216
|
}
|
|
3182
3217
|
),
|
|
3183
|
-
|
|
3184
|
-
|
|
3218
|
+
p !== null && /* @__PURE__ */ a(
|
|
3219
|
+
tu,
|
|
3185
3220
|
{
|
|
3186
|
-
label:
|
|
3221
|
+
label: p,
|
|
3187
3222
|
textWidth: y,
|
|
3188
3223
|
labelPosition: t.params.labelPosition,
|
|
3189
3224
|
isHorizontalLine: A,
|
|
@@ -3196,12 +3231,12 @@ const Wd = (e, t) => {
|
|
|
3196
3231
|
}
|
|
3197
3232
|
)
|
|
3198
3233
|
] });
|
|
3199
|
-
}),
|
|
3234
|
+
}), ou = {
|
|
3200
3235
|
geom: "rule",
|
|
3201
3236
|
coord: "cartesian",
|
|
3202
3237
|
guideMode: null,
|
|
3203
3238
|
render: ({ layer: e, coordSystem: t, formattingLocale: n, isAnimated: r }) => /* @__PURE__ */ a(
|
|
3204
|
-
|
|
3239
|
+
ru,
|
|
3205
3240
|
{
|
|
3206
3241
|
layer: e,
|
|
3207
3242
|
coordSystem: t,
|
|
@@ -3211,24 +3246,24 @@ const Wd = (e, t) => {
|
|
|
3211
3246
|
),
|
|
3212
3247
|
renderHover: () => null,
|
|
3213
3248
|
renderHoverCompanions: () => null
|
|
3214
|
-
}, ro = 1,
|
|
3249
|
+
}, ro = 1, on = Math.PI * 2, au = oe(function({
|
|
3215
3250
|
layer: t,
|
|
3216
3251
|
isAnimated: n
|
|
3217
3252
|
}) {
|
|
3218
|
-
const r =
|
|
3253
|
+
const r = C(!1);
|
|
3219
3254
|
L(() => {
|
|
3220
3255
|
r.current = !0;
|
|
3221
3256
|
}, []);
|
|
3222
3257
|
const o = v(() => {
|
|
3223
3258
|
const i = We(t.data, t.mapping, t.id), c = [];
|
|
3224
3259
|
for (const l of t.data) {
|
|
3225
|
-
const d = i(l), { startAngle: u, endAngle: h } =
|
|
3226
|
-
u === null || h === null || g === null ||
|
|
3260
|
+
const d = i(l), { startAngle: u, endAngle: h } = Ln(l), { innerRadius: g, outerRadius: p } = Cn(l);
|
|
3261
|
+
u === null || h === null || g === null || p === null || c.push({
|
|
3227
3262
|
key: d,
|
|
3228
3263
|
startAngle: u,
|
|
3229
3264
|
endAngle: h,
|
|
3230
3265
|
innerRadius: g,
|
|
3231
|
-
outerRadius:
|
|
3266
|
+
outerRadius: p,
|
|
3232
3267
|
fill: z(l),
|
|
3233
3268
|
opacity: W(l) ?? ro
|
|
3234
3269
|
});
|
|
@@ -3247,7 +3282,7 @@ const Wd = (e, t) => {
|
|
|
3247
3282
|
children: o.map((i) => {
|
|
3248
3283
|
if (n) {
|
|
3249
3284
|
const { key: c, ...l } = i;
|
|
3250
|
-
return /* @__PURE__ */ a(
|
|
3285
|
+
return /* @__PURE__ */ a(iu, { isInitialRender: !r.current, ...l }, c);
|
|
3251
3286
|
}
|
|
3252
3287
|
return /* @__PURE__ */ a(
|
|
3253
3288
|
"path",
|
|
@@ -3266,7 +3301,7 @@ const Wd = (e, t) => {
|
|
|
3266
3301
|
})
|
|
3267
3302
|
}
|
|
3268
3303
|
);
|
|
3269
|
-
}),
|
|
3304
|
+
}), iu = ({
|
|
3270
3305
|
startAngle: e,
|
|
3271
3306
|
endAngle: t,
|
|
3272
3307
|
innerRadius: n,
|
|
@@ -3275,24 +3310,24 @@ const Wd = (e, t) => {
|
|
|
3275
3310
|
opacity: i,
|
|
3276
3311
|
isInitialRender: c
|
|
3277
3312
|
}) => {
|
|
3278
|
-
const l = c ? e :
|
|
3313
|
+
const l = c ? e : on, d = c ? t : on, u = Mt(l, O), h = Mt(d, O), g = Tn(
|
|
3279
3314
|
Ie({ startAngle: l, endAngle: d, innerRadius: n, outerRadius: r }) ?? ""
|
|
3280
3315
|
);
|
|
3281
3316
|
return L(() => {
|
|
3282
3317
|
u.set(e), h.set(t);
|
|
3283
3318
|
}, [u, h, e, t]), L(() => {
|
|
3284
|
-
const
|
|
3319
|
+
const p = () => {
|
|
3285
3320
|
const S = u.get(), k = h.get();
|
|
3286
3321
|
g.set(
|
|
3287
3322
|
Ie({ startAngle: S, endAngle: k, innerRadius: n, outerRadius: r }) ?? ""
|
|
3288
3323
|
);
|
|
3289
|
-
},
|
|
3324
|
+
}, f = u.on("change", p), y = h.on("change", p);
|
|
3290
3325
|
return () => {
|
|
3291
|
-
|
|
3326
|
+
f(), y();
|
|
3292
3327
|
};
|
|
3293
3328
|
}, [u, h, n, r, g]), /* @__PURE__ */ a(Y.path, { d: g, fill: o, opacity: i, transition: O });
|
|
3294
|
-
},
|
|
3295
|
-
const { startAngle: t, endAngle: n } =
|
|
3329
|
+
}, su = ({ primary: e }) => {
|
|
3330
|
+
const { startAngle: t, endAngle: n } = Ln(e.observation), { innerRadius: r, outerRadius: o } = Cn(e.observation);
|
|
3296
3331
|
if (t === null || n === null || r === null || o === null)
|
|
3297
3332
|
return null;
|
|
3298
3333
|
const i = Ie({ startAngle: t, endAngle: n, innerRadius: r, outerRadius: o });
|
|
@@ -3311,57 +3346,57 @@ const Wd = (e, t) => {
|
|
|
3311
3346
|
children: /* @__PURE__ */ a("path", { d: i, fill: c, opacity: l })
|
|
3312
3347
|
}
|
|
3313
3348
|
);
|
|
3314
|
-
},
|
|
3349
|
+
}, lu = {
|
|
3315
3350
|
geom: "bar",
|
|
3316
3351
|
coord: "polar",
|
|
3317
3352
|
guideMode: null,
|
|
3318
|
-
render: ({ layer: e, isAnimated: t }) => /* @__PURE__ */ a(
|
|
3319
|
-
renderHover: ({ primary: e }) => /* @__PURE__ */ a(
|
|
3353
|
+
render: ({ layer: e, isAnimated: t }) => /* @__PURE__ */ a(au, { layer: e, isAnimated: t }),
|
|
3354
|
+
renderHover: ({ primary: e }) => /* @__PURE__ */ a(su, { primary: e }),
|
|
3320
3355
|
renderHoverCompanions: () => null
|
|
3321
|
-
},
|
|
3356
|
+
}, cu = {
|
|
3322
3357
|
bar: {
|
|
3323
|
-
cartesian:
|
|
3324
|
-
polar:
|
|
3358
|
+
cartesian: Hd,
|
|
3359
|
+
polar: lu
|
|
3325
3360
|
},
|
|
3326
3361
|
line: {
|
|
3327
|
-
cartesian:
|
|
3362
|
+
cartesian: Md
|
|
3328
3363
|
},
|
|
3329
3364
|
area: {
|
|
3330
|
-
cartesian:
|
|
3365
|
+
cartesian: Cd
|
|
3331
3366
|
},
|
|
3332
3367
|
point: {
|
|
3333
|
-
cartesian:
|
|
3368
|
+
cartesian: Od
|
|
3334
3369
|
},
|
|
3335
3370
|
rule: {
|
|
3336
|
-
cartesian:
|
|
3371
|
+
cartesian: ou
|
|
3337
3372
|
}
|
|
3338
|
-
},
|
|
3373
|
+
}, qe = (e, t) => cu[e.geom]?.[t.type] ?? null, du = (e, t) => {
|
|
3339
3374
|
const n = e.filter((o) => o.interactive);
|
|
3340
3375
|
if (n.length === 0) return null;
|
|
3341
|
-
const r = n.map((o) =>
|
|
3376
|
+
const r = n.map((o) => qe(o, t)).filter((o) => o !== null).map((o) => o.guideMode);
|
|
3342
3377
|
return r.length === 0 ? null : r.some((o) => o === "bar") ? "bar" : r.every((o) => o === "continuous") ? "continuous" : null;
|
|
3343
|
-
},
|
|
3378
|
+
}, uu = 1, hu = "4 3", gu = ({ panelRect: e }) => {
|
|
3344
3379
|
const { coordSystem: t, layers: n, scales: r } = B(
|
|
3345
|
-
|
|
3346
|
-
), o =
|
|
3380
|
+
j((c) => ({ coordSystem: c.coordSystem, layers: c.layers, scales: c.scales }))
|
|
3381
|
+
), o = Tt((c) => c.hover.primary);
|
|
3347
3382
|
if (t.type !== "cartesian" || n.length === 0 || o === null) return null;
|
|
3348
|
-
const i =
|
|
3349
|
-
return i === null ? null : i === "bar" ? /* @__PURE__ */ a(
|
|
3350
|
-
},
|
|
3351
|
-
const r =
|
|
3383
|
+
const i = du(n, t);
|
|
3384
|
+
return i === null ? null : i === "bar" ? /* @__PURE__ */ a(fu, { coordSystem: t, scales: r, primary: o, panelRect: e }) : /* @__PURE__ */ a(pu, { coordSystem: t, primary: o, panelRect: e });
|
|
3385
|
+
}, pu = ({ coordSystem: e, primary: t, panelRect: n }) => {
|
|
3386
|
+
const r = Wo(e, t);
|
|
3352
3387
|
return /* @__PURE__ */ a(oo, { panelRect: n, children: /* @__PURE__ */ a(
|
|
3353
3388
|
"line",
|
|
3354
3389
|
{
|
|
3355
3390
|
...r,
|
|
3356
3391
|
stroke: s.hoverGuideLineColor,
|
|
3357
|
-
strokeWidth:
|
|
3358
|
-
strokeDasharray:
|
|
3392
|
+
strokeWidth: uu,
|
|
3393
|
+
strokeDasharray: hu,
|
|
3359
3394
|
strokeLinecap: "round",
|
|
3360
3395
|
"data-testid": "hover-guide-line"
|
|
3361
3396
|
}
|
|
3362
3397
|
) });
|
|
3363
|
-
},
|
|
3364
|
-
const o =
|
|
3398
|
+
}, fu = ({ coordSystem: e, scales: t, primary: n, panelRect: r }) => {
|
|
3399
|
+
const o = Go(e, t, n);
|
|
3365
3400
|
return o === null ? null : /* @__PURE__ */ a(oo, { panelRect: r, children: /* @__PURE__ */ a("rect", { ...o, fill: s.hoverGuideFillColor, "data-testid": "hover-guide-rect" }) });
|
|
3366
3401
|
}, oo = ({ panelRect: e, children: t }) => /* @__PURE__ */ a(
|
|
3367
3402
|
"svg",
|
|
@@ -3374,16 +3409,16 @@ const Wd = (e, t) => {
|
|
|
3374
3409
|
"data-testid": "hover-guide",
|
|
3375
3410
|
children: t
|
|
3376
3411
|
}
|
|
3377
|
-
),
|
|
3412
|
+
), mu = 200, vu = ({ engine: e, store: t, overlayRef: n }) => {
|
|
3378
3413
|
L(() => {
|
|
3379
3414
|
const r = n.current;
|
|
3380
3415
|
if (!r) return;
|
|
3381
|
-
const o =
|
|
3416
|
+
const o = yu(r, e), i = bu(r, e, t);
|
|
3382
3417
|
return () => {
|
|
3383
3418
|
i(), o();
|
|
3384
3419
|
};
|
|
3385
3420
|
}, [e, t, n]);
|
|
3386
|
-
},
|
|
3421
|
+
}, yu = (e, t) => {
|
|
3387
3422
|
const n = () => {
|
|
3388
3423
|
const c = e.getBoundingClientRect();
|
|
3389
3424
|
c.width === 0 || c.height === 0 || t.setViewport({ width: c.width, height: c.height });
|
|
@@ -3392,12 +3427,12 @@ const Wd = (e, t) => {
|
|
|
3392
3427
|
const o = () => {
|
|
3393
3428
|
r !== null && clearTimeout(r), r = setTimeout(() => {
|
|
3394
3429
|
r = null, n();
|
|
3395
|
-
},
|
|
3430
|
+
}, mu);
|
|
3396
3431
|
}, i = new ResizeObserver(o);
|
|
3397
3432
|
return i.observe(e), n(), () => {
|
|
3398
3433
|
i.disconnect(), r !== null && clearTimeout(r);
|
|
3399
3434
|
};
|
|
3400
|
-
},
|
|
3435
|
+
}, bu = (e, t, n) => {
|
|
3401
3436
|
let r = null, o = null;
|
|
3402
3437
|
const i = () => {
|
|
3403
3438
|
o = null;
|
|
@@ -3415,14 +3450,14 @@ const Wd = (e, t) => {
|
|
|
3415
3450
|
}, l = () => {
|
|
3416
3451
|
r = null, o !== null && (cancelAnimationFrame(o), o = null);
|
|
3417
3452
|
const d = n.getState();
|
|
3418
|
-
d.hover.primary !== null && d.setHoverState(
|
|
3453
|
+
d.hover.primary !== null && d.setHoverState(gn);
|
|
3419
3454
|
};
|
|
3420
3455
|
return e.addEventListener("pointermove", c), e.addEventListener("pointerleave", l), () => {
|
|
3421
3456
|
e.removeEventListener("pointermove", c), e.removeEventListener("pointerleave", l), o !== null && cancelAnimationFrame(o), r = null;
|
|
3422
3457
|
};
|
|
3423
|
-
},
|
|
3458
|
+
}, xu = ({ panelRect: e }) => {
|
|
3424
3459
|
const { engine: t, store: n, overlayRef: r } = Ue();
|
|
3425
|
-
return
|
|
3460
|
+
return vu({ engine: t, store: n, overlayRef: r }), /* @__PURE__ */ a(
|
|
3426
3461
|
"rect",
|
|
3427
3462
|
{
|
|
3428
3463
|
ref: r,
|
|
@@ -3435,7 +3470,7 @@ const Wd = (e, t) => {
|
|
|
3435
3470
|
"data-testid": "pointer-capture-layer"
|
|
3436
3471
|
}
|
|
3437
3472
|
);
|
|
3438
|
-
}, it = "data-hover-active",
|
|
3473
|
+
}, it = "data-hover-active", Su = (e) => {
|
|
3439
3474
|
const { store: t } = Ue(), n = Ce(t, (r) => r.hover.primary !== null);
|
|
3440
3475
|
L(() => {
|
|
3441
3476
|
const r = e.current;
|
|
@@ -3444,11 +3479,11 @@ const Wd = (e, t) => {
|
|
|
3444
3479
|
r.removeAttribute(it);
|
|
3445
3480
|
};
|
|
3446
3481
|
}, [e, n]);
|
|
3447
|
-
}, ao = N.xs, ft = R, io = K.medium,
|
|
3448
|
-
var
|
|
3482
|
+
}, ao = N.xs, ft = R, io = K.medium, ku = K.semibold, so = 6, lo = 2, Lu = 4, Cu = 2, an = 4;
|
|
3483
|
+
var Tu = "_1agclyl0", wu = "_1agclyl1", Au = "_1agclyl2", Eu = { inside: "_1agclyl4 _1agclyl3", outside: "_1agclyl5 _1agclyl3" }, _u = "_1agclyl6 _1agclyl3";
|
|
3449
3484
|
const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c, position: l, coordType: d }) => {
|
|
3450
|
-
const u = i ? `rotate(-90 ${e} ${t})` : void 0, h = c === "aggregate" ?
|
|
3451
|
-
return /* @__PURE__ */
|
|
3485
|
+
const u = i ? `rotate(-90 ${e} ${t})` : void 0, h = c === "aggregate" ? _u : Eu[l], g = Pu(c, l, d);
|
|
3486
|
+
return /* @__PURE__ */ m("g", { transform: u, children: [
|
|
3452
3487
|
g && /* @__PURE__ */ a(
|
|
3453
3488
|
"rect",
|
|
3454
3489
|
{
|
|
@@ -3457,21 +3492,21 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3457
3492
|
y: t - r / 2,
|
|
3458
3493
|
width: n,
|
|
3459
3494
|
height: r,
|
|
3460
|
-
rx:
|
|
3461
|
-
ry:
|
|
3495
|
+
rx: an,
|
|
3496
|
+
ry: an
|
|
3462
3497
|
}
|
|
3463
3498
|
),
|
|
3464
3499
|
/* @__PURE__ */ a("text", { className: h, x: e, y: t, textAnchor: "middle", dominantBaseline: "central", children: o })
|
|
3465
3500
|
] });
|
|
3466
|
-
},
|
|
3467
|
-
if (e === "aggregate") return
|
|
3468
|
-
if (t === "outside" && n === "cartesian") return
|
|
3469
|
-
},
|
|
3501
|
+
}, Pu = (e, t, n) => {
|
|
3502
|
+
if (e === "aggregate") return Au;
|
|
3503
|
+
if (t === "outside" && n === "cartesian") return wu;
|
|
3504
|
+
}, Hu = {
|
|
3470
3505
|
dataLabel: { x: so, y: lo },
|
|
3471
|
-
stackTotal: { x:
|
|
3472
|
-
},
|
|
3506
|
+
stackTotal: { x: Lu, y: Cu }
|
|
3507
|
+
}, Fu = ({ panelRect: e, formattingLocale: t }) => {
|
|
3473
3508
|
const n = ve(), r = B(
|
|
3474
|
-
|
|
3509
|
+
j((l) => ({
|
|
3475
3510
|
layers: l.layers,
|
|
3476
3511
|
coordSystem: l.coordSystem,
|
|
3477
3512
|
axes: l.guides.axes,
|
|
@@ -3480,14 +3515,14 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3480
3515
|
textScale: l.config.appearance.textScale
|
|
3481
3516
|
}))
|
|
3482
3517
|
), o = v(() => {
|
|
3483
|
-
const l =
|
|
3518
|
+
const l = te(ao, r.textScale);
|
|
3484
3519
|
return {
|
|
3485
3520
|
dataLabel: { family: ft, size: l, weight: io },
|
|
3486
|
-
stackTotal: { family: ft, size: l, weight:
|
|
3521
|
+
stackTotal: { family: ft, size: l, weight: ku }
|
|
3487
3522
|
};
|
|
3488
3523
|
}, [r.textScale]), i = v(
|
|
3489
3524
|
() => (l, d) => {
|
|
3490
|
-
const u = n.measureText(d, o[l]), h =
|
|
3525
|
+
const u = n.measureText(d, o[l]), h = Hu[l];
|
|
3491
3526
|
return {
|
|
3492
3527
|
...u,
|
|
3493
3528
|
width: u.width + h.x * 2,
|
|
@@ -3496,10 +3531,10 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3496
3531
|
},
|
|
3497
3532
|
[n, o]
|
|
3498
3533
|
), c = v(
|
|
3499
|
-
() =>
|
|
3534
|
+
() => $o({ ...r, panelRect: e, measureDataLabel: i, formattingLocale: t }),
|
|
3500
3535
|
[r, e, i, t]
|
|
3501
3536
|
);
|
|
3502
|
-
return /* @__PURE__ */ a("g", { className:
|
|
3537
|
+
return /* @__PURE__ */ a("g", { className: Tu, transform: `translate(${e.x}, ${e.y})`, "data-testid": "data-labels", children: c.labels.map((l) => /* @__PURE__ */ a(
|
|
3503
3538
|
co,
|
|
3504
3539
|
{
|
|
3505
3540
|
x: l.x,
|
|
@@ -3514,13 +3549,13 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3514
3549
|
},
|
|
3515
3550
|
l.key
|
|
3516
3551
|
)) });
|
|
3517
|
-
},
|
|
3552
|
+
}, Nu = ({ linePath: e, arrowheadPath: t, stroke: n, strokeWidth: r }) => {
|
|
3518
3553
|
const o = { stroke: n, strokeWidth: r, strokeLinecap: "round", fill: "none" };
|
|
3519
|
-
return /* @__PURE__ */
|
|
3554
|
+
return /* @__PURE__ */ m("g", { children: [
|
|
3520
3555
|
/* @__PURE__ */ a("path", { d: e, ...o }),
|
|
3521
3556
|
/* @__PURE__ */ a("path", { d: t, ...o, strokeLinejoin: "round" })
|
|
3522
3557
|
] });
|
|
3523
|
-
},
|
|
3558
|
+
}, Bu = ({
|
|
3524
3559
|
x: e,
|
|
3525
3560
|
y: t,
|
|
3526
3561
|
text: n,
|
|
@@ -3534,15 +3569,15 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3534
3569
|
const u = ve(), g = v(
|
|
3535
3570
|
() => u.measureText(n, { family: R, size: r, weight: d }),
|
|
3536
3571
|
[u, n, r, d]
|
|
3537
|
-
).width + o * 2,
|
|
3538
|
-
return /* @__PURE__ */
|
|
3572
|
+
).width + o * 2, p = r + i * 2;
|
|
3573
|
+
return /* @__PURE__ */ m("g", { style: { pointerEvents: "none" }, children: [
|
|
3539
3574
|
/* @__PURE__ */ a(
|
|
3540
3575
|
"rect",
|
|
3541
3576
|
{
|
|
3542
3577
|
x: e - g / 2,
|
|
3543
|
-
y: t -
|
|
3578
|
+
y: t - p / 2,
|
|
3544
3579
|
width: g,
|
|
3545
|
-
height:
|
|
3580
|
+
height: p,
|
|
3546
3581
|
rx: 4,
|
|
3547
3582
|
fill: s.graphBackground,
|
|
3548
3583
|
stroke: l,
|
|
@@ -3562,16 +3597,16 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3562
3597
|
}
|
|
3563
3598
|
)
|
|
3564
3599
|
] });
|
|
3565
|
-
},
|
|
3600
|
+
}, Iu = ({ panelRect: e, formattingLocale: t }) => {
|
|
3566
3601
|
const n = B(
|
|
3567
|
-
|
|
3602
|
+
j((o) => ({
|
|
3568
3603
|
differenceArrows: o.annotations.differenceArrows,
|
|
3569
3604
|
mainAxis: o.coordSystem.type === "cartesian" ? o.coordSystem.mainAxis : "x",
|
|
3570
3605
|
textScale: o.config.appearance.textScale
|
|
3571
3606
|
}))
|
|
3572
3607
|
), r = v(
|
|
3573
3608
|
() => n.differenceArrows.map(
|
|
3574
|
-
(o) =>
|
|
3609
|
+
(o) => Xo({
|
|
3575
3610
|
arrow: o,
|
|
3576
3611
|
mainAxis: n.mainAxis,
|
|
3577
3612
|
panelWidth: e.width,
|
|
@@ -3592,15 +3627,15 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3592
3627
|
labelPosition: u,
|
|
3593
3628
|
labelText: h,
|
|
3594
3629
|
labelLineHeight: g,
|
|
3595
|
-
labelPaddingX:
|
|
3596
|
-
labelPaddingY:
|
|
3630
|
+
labelPaddingX: p,
|
|
3631
|
+
labelPaddingY: f,
|
|
3597
3632
|
labelStrokeWidth: y,
|
|
3598
3633
|
labelFontWeight: S
|
|
3599
3634
|
}) => {
|
|
3600
3635
|
const k = o ?? s.defaultAnnotationArrowStroke;
|
|
3601
|
-
return /* @__PURE__ */
|
|
3636
|
+
return /* @__PURE__ */ m(bo.Fragment, { children: [
|
|
3602
3637
|
/* @__PURE__ */ a(
|
|
3603
|
-
|
|
3638
|
+
Nu,
|
|
3604
3639
|
{
|
|
3605
3640
|
linePath: c,
|
|
3606
3641
|
arrowheadPath: l,
|
|
@@ -3609,14 +3644,14 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3609
3644
|
}
|
|
3610
3645
|
),
|
|
3611
3646
|
/* @__PURE__ */ a(
|
|
3612
|
-
|
|
3647
|
+
Bu,
|
|
3613
3648
|
{
|
|
3614
3649
|
x: u.x,
|
|
3615
3650
|
y: u.y,
|
|
3616
3651
|
text: h,
|
|
3617
3652
|
lineHeight: g,
|
|
3618
|
-
paddingX:
|
|
3619
|
-
paddingY:
|
|
3653
|
+
paddingX: p,
|
|
3654
|
+
paddingY: f,
|
|
3620
3655
|
strokeWidth: y,
|
|
3621
3656
|
strokeColor: k,
|
|
3622
3657
|
fontWeight: S
|
|
@@ -3625,35 +3660,35 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3625
3660
|
] }, i);
|
|
3626
3661
|
}
|
|
3627
3662
|
) });
|
|
3628
|
-
},
|
|
3663
|
+
}, Mu = 0, Du = 1.15, sn = 1.15, Ou = "rgba(0, 0, 0, 0.16)", ln = 2, Ru = 1.4, zu = ({
|
|
3629
3664
|
arrow: e,
|
|
3630
3665
|
fallbackColor: t,
|
|
3631
3666
|
stickerOutlineColor: n,
|
|
3632
3667
|
stickerOutlineColorInverse: r
|
|
3633
3668
|
}) => {
|
|
3634
|
-
const o = vt(), i = e.color ?? t, c =
|
|
3669
|
+
const o = vt(), i = e.color ?? t, c = Gu(e.color, n, r), l = e.dashArray ? { strokeDasharray: e.dashArray, strokeDashoffset: e.dashOffset } : {}, d = e.arrowheadExtent + e.strokeWidth + ln + sn, u = {
|
|
3635
3670
|
x: Math.min(e.startX, e.endX) - d,
|
|
3636
3671
|
y: Math.min(e.startY, e.endY) - d,
|
|
3637
3672
|
width: Math.abs(e.endX - e.startX) + 2 * d,
|
|
3638
3673
|
height: Math.abs(e.endY - e.startY) + 2 * d
|
|
3639
3674
|
}, h = [e.linePath, e.startArrowheadPath, e.endArrowheadPath].filter((g) => g.length > 0).join(" ");
|
|
3640
|
-
return /* @__PURE__ */
|
|
3675
|
+
return /* @__PURE__ */ m("g", { children: [
|
|
3641
3676
|
e.hasStickerStyle && /* @__PURE__ */ a("defs", { children: /* @__PURE__ */ a("filter", { id: o, filterUnits: "userSpaceOnUse", ...u, children: /* @__PURE__ */ a(
|
|
3642
3677
|
"feDropShadow",
|
|
3643
3678
|
{
|
|
3644
|
-
dx:
|
|
3645
|
-
dy:
|
|
3646
|
-
stdDeviation:
|
|
3647
|
-
floodColor:
|
|
3679
|
+
dx: Mu,
|
|
3680
|
+
dy: Du,
|
|
3681
|
+
stdDeviation: sn,
|
|
3682
|
+
floodColor: Ou
|
|
3648
3683
|
}
|
|
3649
3684
|
) }) }),
|
|
3650
|
-
/* @__PURE__ */
|
|
3685
|
+
/* @__PURE__ */ m("g", { filter: e.hasStickerStyle ? `url(#${o})` : void 0, children: [
|
|
3651
3686
|
e.hasStickerStyle && /* @__PURE__ */ a(
|
|
3652
3687
|
"path",
|
|
3653
3688
|
{
|
|
3654
3689
|
d: h,
|
|
3655
3690
|
stroke: c,
|
|
3656
|
-
strokeWidth: e.strokeWidth + 2 *
|
|
3691
|
+
strokeWidth: e.strokeWidth + 2 * ln,
|
|
3657
3692
|
strokeLinecap: "round",
|
|
3658
3693
|
fill: "none"
|
|
3659
3694
|
}
|
|
@@ -3691,20 +3726,20 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3691
3726
|
)
|
|
3692
3727
|
] })
|
|
3693
3728
|
] });
|
|
3694
|
-
},
|
|
3729
|
+
}, Gu = (e, t, n) => {
|
|
3695
3730
|
if (e === null) return n;
|
|
3696
3731
|
try {
|
|
3697
|
-
return ct(e, t) <
|
|
3732
|
+
return ct(e, t) < Ru ? n : t;
|
|
3698
3733
|
} catch {
|
|
3699
3734
|
return n;
|
|
3700
3735
|
}
|
|
3701
|
-
},
|
|
3702
|
-
const { themeValues: t } =
|
|
3703
|
-
() => n.map((o) =>
|
|
3736
|
+
}, Wu = ({ panelRect: e }) => {
|
|
3737
|
+
const { themeValues: t } = _t(), n = B((o) => o.annotations.freeformArrows), r = v(
|
|
3738
|
+
() => n.map((o) => Vo({ arrow: o, panelWidth: e.width, panelHeight: e.height })).filter((o) => o !== null),
|
|
3704
3739
|
[n, e.width, e.height]
|
|
3705
3740
|
);
|
|
3706
3741
|
return r.length === 0 ? null : /* @__PURE__ */ a("g", { transform: `translate(${e.x}, ${e.y})`, "data-testid": "freeform-arrows", children: r.map((o) => /* @__PURE__ */ a(
|
|
3707
|
-
|
|
3742
|
+
zu,
|
|
3708
3743
|
{
|
|
3709
3744
|
arrow: o,
|
|
3710
3745
|
fallbackColor: s.defaultAnnotationArrowStroke,
|
|
@@ -3713,10 +3748,10 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3713
3748
|
},
|
|
3714
3749
|
o.id
|
|
3715
3750
|
)) });
|
|
3716
|
-
},
|
|
3717
|
-
const { tickLabelOffset: i } =
|
|
3718
|
-
return u ? /* @__PURE__ */ a("svg", { x: c, y: h ? "100%" : 0, style: { overflow: "visible" }, children: /* @__PURE__ */ a("text", { ...
|
|
3719
|
-
},
|
|
3751
|
+
}, $u = ({ edge: e, areTicksVisible: t, position: n, labelRotation: r, label: o }) => {
|
|
3752
|
+
const { tickLabelOffset: i } = wt(), c = x(n), l = (t ? 1 : 0) * i, d = { style: { font: s.fontTickLabel }, fill: s.textSecondary }, u = r !== 0 && (e === "top" || e === "bottom"), h = e === "top";
|
|
3753
|
+
return u ? /* @__PURE__ */ a("svg", { x: c, y: h ? "100%" : 0, style: { overflow: "visible" }, children: /* @__PURE__ */ a("text", { ...Vu(h, l, r), ...d, children: o }) }) : /* @__PURE__ */ a("text", { ...Xu(e, c, l), ...d, children: o });
|
|
3754
|
+
}, Xu = (e, t, n) => {
|
|
3720
3755
|
switch (e) {
|
|
3721
3756
|
case "bottom":
|
|
3722
3757
|
return {
|
|
@@ -3749,7 +3784,7 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3749
3784
|
dominantBaseline: "central"
|
|
3750
3785
|
};
|
|
3751
3786
|
}
|
|
3752
|
-
},
|
|
3787
|
+
}, Vu = (e, t, n) => {
|
|
3753
3788
|
const r = e ? -t : t;
|
|
3754
3789
|
return {
|
|
3755
3790
|
x: 0,
|
|
@@ -3758,16 +3793,16 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3758
3793
|
dominantBaseline: "central",
|
|
3759
3794
|
transform: `rotate(${n}, 0, ${r})`
|
|
3760
3795
|
};
|
|
3761
|
-
},
|
|
3796
|
+
}, Uu = ({ formattedAxis: e, rect: t }) => {
|
|
3762
3797
|
const n = e.position === "bottom" || e.position === "top";
|
|
3763
|
-
return /* @__PURE__ */
|
|
3798
|
+
return /* @__PURE__ */ m("svg", { x: t.x, y: t.y, width: t.width, height: t.height, style: { overflow: "visible" }, children: [
|
|
3764
3799
|
dr,
|
|
3765
3800
|
e.ticks.map((r, o) => {
|
|
3766
|
-
const i = r.formattedLabel, c = n ? r.position : 1 - r.position, l =
|
|
3767
|
-
return /* @__PURE__ */
|
|
3801
|
+
const i = r.formattedLabel, c = n ? r.position : 1 - r.position, l = Yu(e.position, c, t);
|
|
3802
|
+
return /* @__PURE__ */ m("g", { children: [
|
|
3768
3803
|
e.ticksVisible && /* @__PURE__ */ a("line", { ...l, stroke: s.gridLineColor, strokeWidth: 1 }),
|
|
3769
3804
|
/* @__PURE__ */ a(
|
|
3770
|
-
|
|
3805
|
+
$u,
|
|
3771
3806
|
{
|
|
3772
3807
|
edge: e.position,
|
|
3773
3808
|
areTicksVisible: e.ticksVisible,
|
|
@@ -3779,7 +3814,7 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3779
3814
|
] }, o);
|
|
3780
3815
|
})
|
|
3781
3816
|
] });
|
|
3782
|
-
},
|
|
3817
|
+
}, Yu = (e, t, n) => {
|
|
3783
3818
|
const r = x(t);
|
|
3784
3819
|
switch (e) {
|
|
3785
3820
|
case "bottom":
|
|
@@ -3791,15 +3826,15 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3791
3826
|
case "right":
|
|
3792
3827
|
return { x1: 0, y1: r, x2: Fe, y2: r };
|
|
3793
3828
|
}
|
|
3794
|
-
},
|
|
3829
|
+
}, ju = ({ axes: e, rects: t }) => /* @__PURE__ */ a(T, { children: e.map((n) => {
|
|
3795
3830
|
const r = t[n.position];
|
|
3796
3831
|
if (!r || !n.isVisible) return null;
|
|
3797
|
-
const o =
|
|
3798
|
-
return /* @__PURE__ */
|
|
3832
|
+
const o = qu(n.position, r);
|
|
3833
|
+
return /* @__PURE__ */ m("g", { transform: `translate(${r.x}, ${r.y})`, children: [
|
|
3799
3834
|
dr,
|
|
3800
3835
|
/* @__PURE__ */ a("text", { style: { font: s.fontAxisLabel }, fill: s.textPrimary, ...o, children: n.label })
|
|
3801
3836
|
] }, `axis-label-${n.position}`);
|
|
3802
|
-
}) }),
|
|
3837
|
+
}) }), qu = (e, t) => {
|
|
3803
3838
|
const n = {
|
|
3804
3839
|
x: t.width / 2,
|
|
3805
3840
|
y: t.height / 2,
|
|
@@ -3807,18 +3842,15 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3807
3842
|
dominantBaseline: "middle"
|
|
3808
3843
|
};
|
|
3809
3844
|
return e === "left" ? (n.x = 0, n.textAnchor = "start") : e === "right" && (n.x = t.width, n.textAnchor = "end"), n;
|
|
3810
|
-
},
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
}),
|
|
3815
|
-
/* @__PURE__ */ a(Wu, { axes: e, rects: n })
|
|
3816
|
-
] }), ln = {
|
|
3845
|
+
}, Ku = ({ formattedAxes: e, tickRects: t }) => /* @__PURE__ */ a(T, { children: e.map((n) => {
|
|
3846
|
+
const r = t[n.position];
|
|
3847
|
+
return !r || !n.isVisible ? null : /* @__PURE__ */ a(Uu, { formattedAxis: n, rect: r }, n.scaleAestheticKey);
|
|
3848
|
+
}) }), Ju = ({ formattedAxes: e, labelRects: t }) => /* @__PURE__ */ a(ju, { axes: e, rects: t }), cn = {
|
|
3817
3849
|
strokeWidth: s.gridLineWidth,
|
|
3818
3850
|
strokeDashoffset: "0",
|
|
3819
3851
|
strokeDasharray: s.gridLineDash,
|
|
3820
3852
|
strokeLinecap: "round"
|
|
3821
|
-
},
|
|
3853
|
+
}, Zu = ({ axes: e, panel: t, panelRect: n }) => /* @__PURE__ */ m(
|
|
3822
3854
|
"svg",
|
|
3823
3855
|
{
|
|
3824
3856
|
x: n.x,
|
|
@@ -3838,7 +3870,7 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3838
3870
|
stroke: s.gridLineColor,
|
|
3839
3871
|
rx: 8,
|
|
3840
3872
|
ry: 8,
|
|
3841
|
-
...
|
|
3873
|
+
...cn
|
|
3842
3874
|
}
|
|
3843
3875
|
),
|
|
3844
3876
|
e.map((r) => {
|
|
@@ -3847,12 +3879,12 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3847
3879
|
return /* @__PURE__ */ a("g", { children: r.ticks.map((i, c) => {
|
|
3848
3880
|
if (i.position <= 0 || i.position >= 1) return null;
|
|
3849
3881
|
const l = o ? i.position : 1 - i.position, d = x(l);
|
|
3850
|
-
return /* @__PURE__ */ a("line", { ...o ? { x1: d, y1: 0, x2: d, y2: "100%" } : { x1: 0, y1: d, x2: "100%", y2: d }, ...
|
|
3882
|
+
return /* @__PURE__ */ a("line", { ...o ? { x1: d, y1: 0, x2: d, y2: "100%" } : { x1: 0, y1: d, x2: "100%", y2: d }, ...cn, stroke: s.gridLineColor }, c);
|
|
3851
3883
|
}) }, r.scaleAestheticKey);
|
|
3852
3884
|
})
|
|
3853
3885
|
]
|
|
3854
3886
|
}
|
|
3855
|
-
),
|
|
3887
|
+
), dn = ({ panelRect: e, zOrder: t }) => {
|
|
3856
3888
|
const r = B((o) => o.annotations.shapes).filter((o) => o.zOrder === t);
|
|
3857
3889
|
return r.length === 0 ? null : /* @__PURE__ */ a(
|
|
3858
3890
|
"svg",
|
|
@@ -3863,7 +3895,7 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3863
3895
|
height: e.height,
|
|
3864
3896
|
overflow: "visible",
|
|
3865
3897
|
"data-testid": `shapes-${t}`,
|
|
3866
|
-
children: r.map(({ id: o, x: i, y: c, width: l, height: d, fillColor: u, fillOpacity: h, strokeWidth: g, strokeColor:
|
|
3898
|
+
children: r.map(({ id: o, x: i, y: c, width: l, height: d, fillColor: u, fillOpacity: h, strokeWidth: g, strokeColor: p }) => /* @__PURE__ */ a(
|
|
3867
3899
|
"rect",
|
|
3868
3900
|
{
|
|
3869
3901
|
x: x(i),
|
|
@@ -3872,7 +3904,7 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3872
3904
|
height: x(d),
|
|
3873
3905
|
fill: u,
|
|
3874
3906
|
fillOpacity: h,
|
|
3875
|
-
stroke: g > 0 ?
|
|
3907
|
+
stroke: g > 0 ? p ?? s.defaultAnnotationShapeStroke : "none",
|
|
3876
3908
|
strokeWidth: g
|
|
3877
3909
|
},
|
|
3878
3910
|
o
|
|
@@ -3880,8 +3912,8 @@ const co = ({ x: e, y: t, width: n, height: r, text: o, isRotated: i, target: c,
|
|
|
3880
3912
|
}
|
|
3881
3913
|
);
|
|
3882
3914
|
};
|
|
3883
|
-
var
|
|
3884
|
-
const
|
|
3915
|
+
var Qu = "_120wioc0";
|
|
3916
|
+
const eh = ({ panelRect: e }) => {
|
|
3885
3917
|
const t = B((n) => n.annotations.textAnnotations);
|
|
3886
3918
|
return t.length === 0 ? null : /* @__PURE__ */ a(
|
|
3887
3919
|
"svg",
|
|
@@ -3903,8 +3935,8 @@ const Yu = ({ panelRect: e }) => {
|
|
|
3903
3935
|
children: /* @__PURE__ */ a(
|
|
3904
3936
|
"div",
|
|
3905
3937
|
{
|
|
3906
|
-
className:
|
|
3907
|
-
style:
|
|
3938
|
+
className: Qu,
|
|
3939
|
+
style: th(n.backgroundColor, n.backgroundColorStyle),
|
|
3908
3940
|
children: /* @__PURE__ */ a(De, { content: n.content })
|
|
3909
3941
|
}
|
|
3910
3942
|
)
|
|
@@ -3913,17 +3945,17 @@ const Yu = ({ panelRect: e }) => {
|
|
|
3913
3945
|
))
|
|
3914
3946
|
}
|
|
3915
3947
|
);
|
|
3916
|
-
},
|
|
3948
|
+
}, th = (e, t) => e === null || e === "transparent" ? { color: s.textPrimary } : t === "fade" ? {
|
|
3917
3949
|
color: s.textPrimary,
|
|
3918
3950
|
backgroundColor: dt(e, s.grey100, 0.5),
|
|
3919
3951
|
boxShadow: `0 0 0 1.5px ${dt(e, s.grey0, 0.2)}`
|
|
3920
3952
|
} : {
|
|
3921
3953
|
color: s.textPrimary,
|
|
3922
3954
|
backgroundColor: e,
|
|
3923
|
-
boxShadow: `0 0 0 1.5px ${
|
|
3955
|
+
boxShadow: `0 0 0 1.5px ${je(e, 0.1)}`
|
|
3924
3956
|
};
|
|
3925
|
-
var
|
|
3926
|
-
const
|
|
3957
|
+
var nh = "usd3ea0", rh = "usd3ea1";
|
|
3958
|
+
const oh = ({
|
|
3927
3959
|
layer: e,
|
|
3928
3960
|
coordSystem: t,
|
|
3929
3961
|
isAnimated: n,
|
|
@@ -3931,22 +3963,22 @@ const Ju = ({
|
|
|
3931
3963
|
highlightStyle: o,
|
|
3932
3964
|
formattingLocale: i
|
|
3933
3965
|
}) => {
|
|
3934
|
-
const c =
|
|
3935
|
-
return c === null ? /* @__PURE__ */
|
|
3966
|
+
const c = qe(e, t);
|
|
3967
|
+
return c === null ? /* @__PURE__ */ m("text", { children: [
|
|
3936
3968
|
e.geom,
|
|
3937
3969
|
" not implemented"
|
|
3938
3970
|
] }) : /* @__PURE__ */ a(
|
|
3939
3971
|
"g",
|
|
3940
3972
|
{
|
|
3941
|
-
className:
|
|
3942
|
-
[
|
|
3943
|
-
[
|
|
3973
|
+
className: re({
|
|
3974
|
+
[rh]: r && o === "desaturate",
|
|
3975
|
+
[nh]: r && o === "dim"
|
|
3944
3976
|
}),
|
|
3945
3977
|
children: c.render({ layer: e, coordSystem: t, isAnimated: n, formattingLocale: i })
|
|
3946
3978
|
}
|
|
3947
3979
|
);
|
|
3948
3980
|
};
|
|
3949
|
-
function
|
|
3981
|
+
function ah({
|
|
3950
3982
|
plugin: e,
|
|
3951
3983
|
layer: t,
|
|
3952
3984
|
coordSystem: n,
|
|
@@ -3960,7 +3992,7 @@ function Zu({
|
|
|
3960
3992
|
}
|
|
3961
3993
|
return o;
|
|
3962
3994
|
}
|
|
3963
|
-
const
|
|
3995
|
+
const ih = 4, sh = ({
|
|
3964
3996
|
plugin: e,
|
|
3965
3997
|
layer: t,
|
|
3966
3998
|
matchedLayer: n,
|
|
@@ -3971,33 +4003,33 @@ const Qu = 4, eh = ({
|
|
|
3971
4003
|
formattingLocale: l
|
|
3972
4004
|
}) => {
|
|
3973
4005
|
const { numberFormat: d, textScale: u } = B(
|
|
3974
|
-
|
|
4006
|
+
j((y) => ({
|
|
3975
4007
|
numberFormat: y.config.numberFormat,
|
|
3976
4008
|
textScale: y.config.appearance.textScale
|
|
3977
4009
|
}))
|
|
3978
4010
|
), h = v(
|
|
3979
|
-
() =>
|
|
4011
|
+
() => ah({ plugin: e, layer: t, coordSystem: o, candidates: r }),
|
|
3980
4012
|
[e, t, o, r]
|
|
3981
|
-
), g = v(() =>
|
|
3982
|
-
() =>
|
|
4013
|
+
), g = v(() => Uo(t), [t]), p = v(
|
|
4014
|
+
() => Yo({ layer: t, numberFormat: d, locale: l }),
|
|
3983
4015
|
[d, t, l]
|
|
3984
|
-
),
|
|
3985
|
-
return e === null || n === null && h.length === 0 ? null : /* @__PURE__ */
|
|
4016
|
+
), f = ao * kr * u;
|
|
4017
|
+
return e === null || n === null && h.length === 0 ? null : /* @__PURE__ */ m(T, { children: [
|
|
3986
4018
|
n ? e.render({ layer: n, coordSystem: o, isAnimated: i, formattingLocale: l }) : null,
|
|
3987
4019
|
h.map(({ observation: y, observationIndex: S, anchor: k }) => /* @__PURE__ */ a(
|
|
3988
|
-
|
|
4020
|
+
lh,
|
|
3989
4021
|
{
|
|
3990
4022
|
observation: y,
|
|
3991
4023
|
anchor: k,
|
|
3992
4024
|
panelRect: c,
|
|
3993
4025
|
readSegmentY: g,
|
|
3994
|
-
formatYValue:
|
|
3995
|
-
labelFontSizePx:
|
|
4026
|
+
formatYValue: p,
|
|
4027
|
+
labelFontSizePx: f
|
|
3996
4028
|
},
|
|
3997
|
-
|
|
4029
|
+
ch(y, S)
|
|
3998
4030
|
))
|
|
3999
4031
|
] });
|
|
4000
|
-
},
|
|
4032
|
+
}, lh = ({
|
|
4001
4033
|
observation: e,
|
|
4002
4034
|
anchor: t,
|
|
4003
4035
|
panelRect: n,
|
|
@@ -4005,19 +4037,19 @@ const Qu = 4, eh = ({
|
|
|
4005
4037
|
formatYValue: o,
|
|
4006
4038
|
labelFontSizePx: i
|
|
4007
4039
|
}) => {
|
|
4008
|
-
const c = ve(), l = Ge(t.x), d = ze(t.y), u = (Re(e) ?? Jr) / 2, h = r(e), g =
|
|
4040
|
+
const c = ve(), l = Ge(t.x), d = ze(t.y), u = (Re(e) ?? Jr) / 2, h = r(e), g = yn(h) ? o(h, e) : null, p = v(() => {
|
|
4009
4041
|
if (g === null) return null;
|
|
4010
|
-
const
|
|
4042
|
+
const f = c.measureText(g, {
|
|
4011
4043
|
family: ft,
|
|
4012
4044
|
size: i,
|
|
4013
4045
|
weight: io
|
|
4014
4046
|
});
|
|
4015
4047
|
return {
|
|
4016
|
-
width:
|
|
4017
|
-
height:
|
|
4048
|
+
width: f.width + so * 2,
|
|
4049
|
+
height: f.height + lo * 2
|
|
4018
4050
|
};
|
|
4019
4051
|
}, [g, c, i]);
|
|
4020
|
-
return /* @__PURE__ */
|
|
4052
|
+
return /* @__PURE__ */ m(T, { children: [
|
|
4021
4053
|
/* @__PURE__ */ a(
|
|
4022
4054
|
"circle",
|
|
4023
4055
|
{
|
|
@@ -4028,13 +4060,13 @@ const Qu = 4, eh = ({
|
|
|
4028
4060
|
fill: z(e)
|
|
4029
4061
|
}
|
|
4030
4062
|
),
|
|
4031
|
-
g !== null &&
|
|
4063
|
+
g !== null && p !== null && /* @__PURE__ */ a(
|
|
4032
4064
|
co,
|
|
4033
4065
|
{
|
|
4034
4066
|
x: l * n.width,
|
|
4035
|
-
y: d * n.height - u -
|
|
4036
|
-
width:
|
|
4037
|
-
height:
|
|
4067
|
+
y: d * n.height - u - ih - p.height / 2,
|
|
4068
|
+
width: p.width,
|
|
4069
|
+
height: p.height,
|
|
4038
4070
|
text: g,
|
|
4039
4071
|
isRotated: !1,
|
|
4040
4072
|
target: "observation",
|
|
@@ -4043,19 +4075,19 @@ const Qu = 4, eh = ({
|
|
|
4043
4075
|
}
|
|
4044
4076
|
)
|
|
4045
4077
|
] });
|
|
4046
|
-
},
|
|
4078
|
+
}, ch = (e, t) => {
|
|
4047
4079
|
const n = e[we.group];
|
|
4048
4080
|
return `${String(n ?? "")}\0${t}`;
|
|
4049
|
-
},
|
|
4050
|
-
const { primary: r, group: o, related: i } =
|
|
4051
|
-
|
|
4081
|
+
}, dh = ({ layer: e, coordSystem: t, panelRect: n }) => {
|
|
4082
|
+
const { primary: r, group: o, related: i } = Tt(
|
|
4083
|
+
j((d) => ({
|
|
4052
4084
|
primary: d.hover.primary,
|
|
4053
4085
|
group: d.hover.group,
|
|
4054
4086
|
related: d.hover.related
|
|
4055
4087
|
}))
|
|
4056
4088
|
);
|
|
4057
4089
|
if (r === null) return null;
|
|
4058
|
-
const c =
|
|
4090
|
+
const c = qe(e, t);
|
|
4059
4091
|
if (c === null) return null;
|
|
4060
4092
|
const l = i.get(e.id) ?? [];
|
|
4061
4093
|
return r.layerId === e.id ? c.renderHover({
|
|
@@ -4067,10 +4099,10 @@ const Qu = 4, eh = ({
|
|
|
4067
4099
|
panelRect: n
|
|
4068
4100
|
}) : l.length === 0 ? null : c.renderHoverCompanions({ layer: e, primary: r, related: l });
|
|
4069
4101
|
};
|
|
4070
|
-
var
|
|
4071
|
-
const
|
|
4102
|
+
var uh = "to1jkx0", hh = "to1jkx1";
|
|
4103
|
+
const gh = ({ shouldAnimate: e, panelRect: t, formattingLocale: n }) => {
|
|
4072
4104
|
const { layers: r, coordSystem: o, highlightStyle: i } = B(
|
|
4073
|
-
|
|
4105
|
+
j((c) => ({
|
|
4074
4106
|
layers: c.layers,
|
|
4075
4107
|
coordSystem: c.coordSystem,
|
|
4076
4108
|
highlightStyle: c.config.appearance.highlightStyle
|
|
@@ -4083,11 +4115,11 @@ const ih = ({ shouldAnimate: e, panelRect: t, formattingLocale: n }) => {
|
|
|
4083
4115
|
y: t.y,
|
|
4084
4116
|
width: t.width,
|
|
4085
4117
|
height: t.height,
|
|
4086
|
-
className:
|
|
4118
|
+
className: uh,
|
|
4087
4119
|
"data-testid": "geom-layers",
|
|
4088
|
-
children: r.map((c) => /* @__PURE__ */
|
|
4120
|
+
children: r.map((c) => /* @__PURE__ */ m(hn, { children: [
|
|
4089
4121
|
/* @__PURE__ */ a(
|
|
4090
|
-
|
|
4122
|
+
mh,
|
|
4091
4123
|
{
|
|
4092
4124
|
layer: c,
|
|
4093
4125
|
coordSystem: o,
|
|
@@ -4097,14 +4129,14 @@ const ih = ({ shouldAnimate: e, panelRect: t, formattingLocale: n }) => {
|
|
|
4097
4129
|
formattingLocale: n
|
|
4098
4130
|
}
|
|
4099
4131
|
),
|
|
4100
|
-
/* @__PURE__ */ a(
|
|
4101
|
-
] }, `${c.id}-${
|
|
4132
|
+
/* @__PURE__ */ a(dh, { layer: c, coordSystem: o, panelRect: t })
|
|
4133
|
+
] }, `${c.id}-${ph(o)}`))
|
|
4102
4134
|
}
|
|
4103
4135
|
);
|
|
4104
|
-
},
|
|
4136
|
+
}, ph = (e) => e.type === "cartesian" ? `cartesian-${e.mainAxis}` : e.type, fh = (e) => {
|
|
4105
4137
|
if (e.geom !== "rule")
|
|
4106
|
-
return
|
|
4107
|
-
},
|
|
4138
|
+
return hh;
|
|
4139
|
+
}, mh = ({
|
|
4108
4140
|
layer: e,
|
|
4109
4141
|
coordSystem: t,
|
|
4110
4142
|
highlightStyle: n,
|
|
@@ -4112,10 +4144,10 @@ const ih = ({ shouldAnimate: e, panelRect: t, formattingLocale: n }) => {
|
|
|
4112
4144
|
panelRect: o,
|
|
4113
4145
|
formattingLocale: i
|
|
4114
4146
|
}) => {
|
|
4115
|
-
const c = v(() =>
|
|
4116
|
-
return /* @__PURE__ */
|
|
4147
|
+
const c = v(() => qe(e, t), [e, t]), l = e.highlight;
|
|
4148
|
+
return /* @__PURE__ */ m("g", { className: fh(e), children: [
|
|
4117
4149
|
/* @__PURE__ */ a(
|
|
4118
|
-
|
|
4150
|
+
oh,
|
|
4119
4151
|
{
|
|
4120
4152
|
layer: e,
|
|
4121
4153
|
coordSystem: t,
|
|
@@ -4126,7 +4158,7 @@ const ih = ({ shouldAnimate: e, panelRect: t, formattingLocale: n }) => {
|
|
|
4126
4158
|
}
|
|
4127
4159
|
),
|
|
4128
4160
|
l !== null && /* @__PURE__ */ a(
|
|
4129
|
-
|
|
4161
|
+
sh,
|
|
4130
4162
|
{
|
|
4131
4163
|
plugin: c,
|
|
4132
4164
|
layer: e,
|
|
@@ -4140,8 +4172,8 @@ const ih = ({ shouldAnimate: e, panelRect: t, formattingLocale: n }) => {
|
|
|
4140
4172
|
)
|
|
4141
4173
|
] });
|
|
4142
4174
|
};
|
|
4143
|
-
var
|
|
4144
|
-
const
|
|
4175
|
+
var vh = "_17uhij30";
|
|
4176
|
+
const yh = ({
|
|
4145
4177
|
formattedAxes: e,
|
|
4146
4178
|
panelGuide: t,
|
|
4147
4179
|
plotRect: n,
|
|
@@ -4151,30 +4183,31 @@ const uh = ({
|
|
|
4151
4183
|
shouldAnimate: c,
|
|
4152
4184
|
formattingLocale: l
|
|
4153
4185
|
}) => {
|
|
4154
|
-
const d =
|
|
4155
|
-
|
|
4156
|
-
const u =
|
|
4157
|
-
return /* @__PURE__ */
|
|
4186
|
+
const d = C(null);
|
|
4187
|
+
Su(d);
|
|
4188
|
+
const u = Q("Grid", Zu), h = Q("AxisTicks", Ku), g = Q("AxisLabel", Ju), p = v(() => uo(r, n), [r, n]), f = v(() => un(o, n), [o, n]), y = v(() => un(i, n), [i, n]);
|
|
4189
|
+
return /* @__PURE__ */ m(
|
|
4158
4190
|
"svg",
|
|
4159
4191
|
{
|
|
4160
4192
|
ref: d,
|
|
4161
|
-
className:
|
|
4193
|
+
className: vh,
|
|
4162
4194
|
width: n.width,
|
|
4163
4195
|
height: n.height,
|
|
4164
4196
|
style: { transform: `translate(${n.x}px, ${n.y}px)` },
|
|
4165
4197
|
"data-testid": "plot",
|
|
4166
4198
|
children: [
|
|
4167
|
-
/* @__PURE__ */ a(u, { axes: e, panel: t, panelRect:
|
|
4168
|
-
/* @__PURE__ */ a(
|
|
4169
|
-
/* @__PURE__ */ a(h, { formattedAxes: e, tickRects:
|
|
4170
|
-
/* @__PURE__ */ a(
|
|
4171
|
-
/* @__PURE__ */ a(
|
|
4172
|
-
/* @__PURE__ */ a(
|
|
4173
|
-
/* @__PURE__ */ a(
|
|
4174
|
-
/* @__PURE__ */ a(
|
|
4175
|
-
/* @__PURE__ */ a(
|
|
4176
|
-
/* @__PURE__ */ a(
|
|
4177
|
-
/* @__PURE__ */ a(
|
|
4199
|
+
/* @__PURE__ */ a(u, { axes: e, panel: t, panelRect: p }),
|
|
4200
|
+
/* @__PURE__ */ a(gu, { panelRect: p }),
|
|
4201
|
+
/* @__PURE__ */ a(h, { formattedAxes: e, tickRects: f }),
|
|
4202
|
+
/* @__PURE__ */ a(g, { formattedAxes: e, labelRects: y }),
|
|
4203
|
+
/* @__PURE__ */ a(dn, { panelRect: p, zOrder: "background" }),
|
|
4204
|
+
/* @__PURE__ */ a(gh, { shouldAnimate: c, panelRect: p, formattingLocale: l }),
|
|
4205
|
+
/* @__PURE__ */ a(Fu, { panelRect: p, formattingLocale: l }),
|
|
4206
|
+
/* @__PURE__ */ a(Iu, { panelRect: p, formattingLocale: l }),
|
|
4207
|
+
/* @__PURE__ */ a(dn, { panelRect: p, zOrder: "foreground" }),
|
|
4208
|
+
/* @__PURE__ */ a(Wu, { panelRect: p }),
|
|
4209
|
+
/* @__PURE__ */ a(eh, { panelRect: p }),
|
|
4210
|
+
/* @__PURE__ */ a(xu, { panelRect: p })
|
|
4178
4211
|
]
|
|
4179
4212
|
}
|
|
4180
4213
|
);
|
|
@@ -4183,7 +4216,7 @@ const uh = ({
|
|
|
4183
4216
|
y: e.y - t.y,
|
|
4184
4217
|
width: e.width,
|
|
4185
4218
|
height: e.height
|
|
4186
|
-
}),
|
|
4219
|
+
}), un = (e, t) => {
|
|
4187
4220
|
const n = {};
|
|
4188
4221
|
for (const [r, o] of Object.entries(e))
|
|
4189
4222
|
n[r] = uo(o, t);
|
|
@@ -4191,41 +4224,41 @@ const uh = ({
|
|
|
4191
4224
|
}, st = {
|
|
4192
4225
|
headerSize: { width: 0, height: 0 },
|
|
4193
4226
|
footerSize: { width: 0, height: 0 }
|
|
4194
|
-
},
|
|
4227
|
+
}, bh = () => {
|
|
4195
4228
|
const [e, t] = E(null), [n, r] = E(null), [o, i] = E(st);
|
|
4196
4229
|
return L(() => {
|
|
4197
4230
|
const c = () => {
|
|
4198
4231
|
const d = e ? { width: e.offsetWidth, height: e.offsetHeight } : st.headerSize, u = n ? { width: n.offsetWidth, height: n.offsetHeight } : st.footerSize;
|
|
4199
|
-
i((h) =>
|
|
4232
|
+
i((h) => xh(h, { headerSize: d, footerSize: u }) ? { headerSize: d, footerSize: u } : h);
|
|
4200
4233
|
};
|
|
4201
4234
|
c();
|
|
4202
4235
|
const l = new ResizeObserver(c);
|
|
4203
4236
|
return e && l.observe(e), n && l.observe(n), () => l.disconnect();
|
|
4204
4237
|
}, [e, n]), { headerRef: t, footerRef: r, measurements: o };
|
|
4205
|
-
},
|
|
4206
|
-
const { theme: o, themeClass: i, inlineVarsStyle: c } =
|
|
4207
|
-
const
|
|
4208
|
-
return y !== null && (
|
|
4238
|
+
}, xh = (e, t) => e.headerSize.width !== t.headerSize.width || e.headerSize.height !== t.headerSize.height || e.footerSize.width !== t.footerSize.width || e.footerSize.height !== t.footerSize.height, Sh = ({ appearance: e, isEditable: t, style: n, children: r }) => {
|
|
4239
|
+
const { theme: o, themeClass: i, inlineVarsStyle: c } = _t(), l = os(e.border), d = Math.max(0, e.cornerRadius), u = d === 0 ? 0 : d + l, h = v(() => {
|
|
4240
|
+
const f = { ...n, borderRadius: `${u}px`, ...c }, y = rs(e.border, o);
|
|
4241
|
+
return y !== null && (f.background = y), f;
|
|
4209
4242
|
}, [n, u, c, e.border, o]), g = v(
|
|
4210
4243
|
() => ({
|
|
4211
4244
|
inset: `${l}px`,
|
|
4212
4245
|
borderRadius: `${d}px`
|
|
4213
4246
|
}),
|
|
4214
4247
|
[l, d]
|
|
4215
|
-
),
|
|
4216
|
-
return /* @__PURE__ */ a("div", { "data-testid": "graph-wrapper", className:
|
|
4248
|
+
), p = t && e.background.type === "solid" && e.background.color === "transparent";
|
|
4249
|
+
return /* @__PURE__ */ a("div", { "data-testid": "graph-wrapper", className: re(ls, i), style: h, children: /* @__PURE__ */ a(
|
|
4217
4250
|
"div",
|
|
4218
4251
|
{
|
|
4219
4252
|
"data-testid": "graph-inner",
|
|
4220
|
-
className:
|
|
4253
|
+
className: re(ds, { [us]: p }),
|
|
4221
4254
|
style: g,
|
|
4222
4255
|
children: r
|
|
4223
4256
|
}
|
|
4224
4257
|
) });
|
|
4225
|
-
},
|
|
4258
|
+
}, ag = ({ slots: e, ...t }) => {
|
|
4226
4259
|
const { formattingLocale: n } = me(), r = B((o) => o.config.parsingLocale);
|
|
4227
|
-
return /* @__PURE__ */ a(
|
|
4228
|
-
},
|
|
4260
|
+
return /* @__PURE__ */ a($a, { children: /* @__PURE__ */ a(Hc, { children: /* @__PURE__ */ a(Qo, { locale: n ?? r, children: /* @__PURE__ */ a(Ka, { slots: e, children: /* @__PURE__ */ a(kh, { ...t }) }) }) }) });
|
|
4261
|
+
}, kh = ({
|
|
4229
4262
|
width: e,
|
|
4230
4263
|
height: t,
|
|
4231
4264
|
isAnimated: n,
|
|
@@ -4239,13 +4272,13 @@ const uh = ({
|
|
|
4239
4272
|
numberFormat: u,
|
|
4240
4273
|
parsingLocale: h,
|
|
4241
4274
|
appearance: g,
|
|
4242
|
-
annotations:
|
|
4243
|
-
coordSystem:
|
|
4275
|
+
annotations: p,
|
|
4276
|
+
coordSystem: f,
|
|
4244
4277
|
headline: y,
|
|
4245
4278
|
headlineConfig: S,
|
|
4246
4279
|
content: k
|
|
4247
4280
|
} = B(
|
|
4248
|
-
|
|
4281
|
+
j((G) => ({
|
|
4249
4282
|
axes: G.guides.axes,
|
|
4250
4283
|
panel: G.guides.panel,
|
|
4251
4284
|
legends: G.guides.legends,
|
|
@@ -4258,8 +4291,8 @@ const uh = ({
|
|
|
4258
4291
|
headlineConfig: G.config.headline,
|
|
4259
4292
|
content: G.config.content
|
|
4260
4293
|
}))
|
|
4261
|
-
), w =
|
|
4262
|
-
() =>
|
|
4294
|
+
), w = Zo(), { headerRef: A, footerRef: I, measurements: _ } = bh(), { formattingLocale: $, theme: Ke, themeOverrides: Je } = me(), Ae = v(() => br(Ke, Je), [Ke, Je]), ho = Q("Header", jl), go = Q("Footer", Bl), po = Q("Legend", cd), fo = Q("Headline", mc), Bt = v(
|
|
4295
|
+
() => jo({ legends: d, numberFormat: u, parsingLocale: h, formattingLocale: $ }),
|
|
4263
4296
|
[d, u, h, $]
|
|
4264
4297
|
), be = v(
|
|
4265
4298
|
() => qo({ headline: y, show: S.show, numberFormat: u, parsingLocale: h, formattingLocale: $, t: i }),
|
|
@@ -4275,23 +4308,23 @@ const uh = ({
|
|
|
4275
4308
|
formatted: be,
|
|
4276
4309
|
size: S.size,
|
|
4277
4310
|
position: S.position,
|
|
4278
|
-
innerRadius:
|
|
4311
|
+
innerRadius: f.type === "polar" ? f.innerRadius : 0
|
|
4279
4312
|
} : void 0,
|
|
4280
|
-
[be, S.size, S.position,
|
|
4281
|
-
), _e =
|
|
4313
|
+
[be, S.size, S.position, f]
|
|
4314
|
+
), vo = Ja(), _e = ji(mo, g.textScale, Ae, vo), xe = qi({
|
|
4282
4315
|
measurer: _e,
|
|
4283
4316
|
axes: c,
|
|
4284
4317
|
numberFormat: u,
|
|
4285
4318
|
parsingLocale: h,
|
|
4286
|
-
formattedLegends:
|
|
4319
|
+
formattedLegends: Bt,
|
|
4287
4320
|
containerSize: Qe,
|
|
4288
4321
|
externalMeasurements: _,
|
|
4289
4322
|
headline: Ee,
|
|
4290
4323
|
formattingLocale: $,
|
|
4291
|
-
annotations:
|
|
4292
|
-
coordSystem:
|
|
4324
|
+
annotations: p,
|
|
4325
|
+
coordSystem: f,
|
|
4293
4326
|
textScale: g.textScale
|
|
4294
|
-
}), Pe = v(() => !xe || !Ee || !_e ? null :
|
|
4327
|
+
}), Pe = v(() => !xe || !Ee || !_e ? null : Ko({
|
|
4295
4328
|
headline: Ee,
|
|
4296
4329
|
layout: xe.layout,
|
|
4297
4330
|
containerSize: Qe,
|
|
@@ -4299,13 +4332,13 @@ const uh = ({
|
|
|
4299
4332
|
itemGap: Ae.headlineItemGap
|
|
4300
4333
|
}), [xe, Ee, Qe, _e, Ae.headlineItemGap]);
|
|
4301
4334
|
if (!xe) return null;
|
|
4302
|
-
const { layout:
|
|
4303
|
-
return /* @__PURE__ */ a(
|
|
4335
|
+
const { layout: ne, formattedAxes: yo } = xe;
|
|
4336
|
+
return /* @__PURE__ */ a(ps, { theme: Ke, themeOverrides: Je, appearance: g, children: /* @__PURE__ */ a(Mi, { metrics: Ae, children: /* @__PURE__ */ m(Sh, { appearance: g, isEditable: o === "editable", style: { width: e, height: t }, children: [
|
|
4304
4337
|
/* @__PURE__ */ a(
|
|
4305
4338
|
ho,
|
|
4306
4339
|
{
|
|
4307
4340
|
ref: A,
|
|
4308
|
-
headerRect:
|
|
4341
|
+
headerRect: ne.header,
|
|
4309
4342
|
mode: o,
|
|
4310
4343
|
title: k.title,
|
|
4311
4344
|
isTitleVisible: k.isTitleVisible,
|
|
@@ -4314,14 +4347,14 @@ const uh = ({
|
|
|
4314
4347
|
}
|
|
4315
4348
|
),
|
|
4316
4349
|
/* @__PURE__ */ a(
|
|
4317
|
-
|
|
4350
|
+
yh,
|
|
4318
4351
|
{
|
|
4319
|
-
formattedAxes:
|
|
4352
|
+
formattedAxes: yo,
|
|
4320
4353
|
panelGuide: l,
|
|
4321
|
-
plotRect:
|
|
4322
|
-
panelRect:
|
|
4323
|
-
axisRects:
|
|
4324
|
-
axisLabelRects:
|
|
4354
|
+
plotRect: ne.plot,
|
|
4355
|
+
panelRect: ne.panel,
|
|
4356
|
+
axisRects: ne.axes,
|
|
4357
|
+
axisLabelRects: ne.axisLabels,
|
|
4325
4358
|
shouldAnimate: n ?? !w,
|
|
4326
4359
|
formattingLocale: $ ?? h
|
|
4327
4360
|
}
|
|
@@ -4330,7 +4363,7 @@ const uh = ({
|
|
|
4330
4363
|
go,
|
|
4331
4364
|
{
|
|
4332
4365
|
ref: I,
|
|
4333
|
-
footerRect:
|
|
4366
|
+
footerRect: ne.footer,
|
|
4334
4367
|
mode: o,
|
|
4335
4368
|
caption: k.caption,
|
|
4336
4369
|
isCaptionVisible: k.isCaptionVisible,
|
|
@@ -4338,7 +4371,7 @@ const uh = ({
|
|
|
4338
4371
|
isSourceVisible: k.isSourceVisible
|
|
4339
4372
|
}
|
|
4340
4373
|
),
|
|
4341
|
-
/* @__PURE__ */ a(po, { formattedLegends:
|
|
4374
|
+
/* @__PURE__ */ a(po, { formattedLegends: Bt, rects: ne.legends, textScale: g.textScale }),
|
|
4342
4375
|
be && Pe && /* @__PURE__ */ a(
|
|
4343
4376
|
fo,
|
|
4344
4377
|
{
|
|
@@ -4348,29 +4381,26 @@ const uh = ({
|
|
|
4348
4381
|
visibleItemCount: Pe.visibleItemCount
|
|
4349
4382
|
}
|
|
4350
4383
|
),
|
|
4351
|
-
r && /* @__PURE__ */ a(
|
|
4384
|
+
r && /* @__PURE__ */ a(hi, {})
|
|
4352
4385
|
] }) }) });
|
|
4353
4386
|
};
|
|
4354
4387
|
export {
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
ls as ThemeProvider,
|
|
4369
|
-
ss as darkTheme,
|
|
4370
|
-
is as lightTheme,
|
|
4388
|
+
Ht as CanvasTextMeasurer,
|
|
4389
|
+
Bl as DefaultFooter,
|
|
4390
|
+
Zu as DefaultGrid,
|
|
4391
|
+
jl as DefaultHeader,
|
|
4392
|
+
gi as DefaultTooltip,
|
|
4393
|
+
og as DevToolsPanel,
|
|
4394
|
+
rg as GraphProvider,
|
|
4395
|
+
ag as GraphRenderer,
|
|
4396
|
+
$a as HoverProvider,
|
|
4397
|
+
Hc as TextMeasurerProvider,
|
|
4398
|
+
ps as ThemeProvider,
|
|
4399
|
+
gs as darkTheme,
|
|
4400
|
+
hs as lightTheme,
|
|
4371
4401
|
B as useCompiledSelector,
|
|
4372
|
-
|
|
4373
|
-
|
|
4402
|
+
zn as useGraphCommandDispatcher,
|
|
4403
|
+
Tt as useHoverState,
|
|
4374
4404
|
ve as useTextMeasurer,
|
|
4375
4405
|
s as vars
|
|
4376
4406
|
};
|