@graphysdk/react-renderer 1.8.1-beta.1786025839240 → 1.8.1-beta.1786352280463
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/editable.cjs +1 -1
- package/dist/editable.css +1 -1
- package/dist/editable.d.ts +285 -43
- package/dist/editable.mjs +2032 -1421
- package/dist/{font-values-gPf-gY2d.js → font-values-CPxYeqns.js} +1 -0
- package/dist/{font-values-F2fq9P-M.cjs → font-values-CStAZ2d1.cjs} +1 -1
- package/dist/graph-config.cjs +1 -1
- package/dist/graph-config.d.ts +1 -0
- package/dist/graph-config.mjs +1 -1
- package/dist/history-chords-Bfvf75tz.cjs +1 -0
- package/dist/{history-chords-CNYK3SiJ.js → history-chords-V6t-FaHD.js} +1784 -1609
- package/dist/history-chords.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.mjs +96 -96
- package/package.json +2 -2
- package/dist/history-chords-C81ObHa3.cjs +0 -1
package/dist/editable.mjs
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { B as
|
|
2
|
-
import { g as
|
|
3
|
-
import { AddAnnotationCommand as
|
|
4
|
-
import { createContext as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { useShallow as
|
|
7
|
-
import { createPortal as
|
|
8
|
-
import
|
|
9
|
-
import { assignInlineVars as
|
|
10
|
-
import { Menu as
|
|
11
|
-
import { Menu as
|
|
12
|
-
import { Accordion as
|
|
13
|
-
import { NumberField as
|
|
14
|
-
import { Radio as
|
|
15
|
-
import { RadioGroup as
|
|
16
|
-
import { Select as
|
|
17
|
-
import { Slider as
|
|
18
|
-
import { Switch as
|
|
19
|
-
import { Input as
|
|
20
|
-
import './editable.css';var
|
|
21
|
-
const { chartId:
|
|
22
|
-
return
|
|
1
|
+
import { B as _e, D as he, E as Pt, F as It, I as xt, L as ke, M as es, N as T, Q as Tt, S as J, V as se, Z as At, b as M, c as Lt, d as W, et as Nt, f as ge, h as Cn, i as Ot, k as Me, l as Et, m as _t, n as F, o as Sn, p as Ae, r as kt, rt as B, s as Mt, t as Rt, tt as G, u as ve, v as Dt, x as X, y as Se } from "./history-chords-V6t-FaHD.js";
|
|
2
|
+
import { g as zt } from "./font-values-CPxYeqns.js";
|
|
3
|
+
import { AddAnnotationCommand as ye, AddHighlightCommand as Ft, BORDER_RADIUS_TOKENS as We, CONSTANT_VARIABLES as Ht, DEFAULT_BAR_BORDER_RADIUS as Vt, DEFAULT_POINT_SIZE as Kt, DEFAULT_STROKE_WIDTH as Gt, DIFFERENCE_ARROW_DEFAULTS as Bt, MAX_BAR_WIDTH as Ut, MIN_BAR_WIDTH as qt, RESTING_HOVER_STATE as yn, RemoveAnnotationCommand as Re, RemoveHighlightCommand as Wt, SetAppearanceCornerRadiusCommand as $t, SetAppearanceTextScaleCommand as Zt, SetAxisLabelCommand as Xt, SetAxisPositionCommand as jt, SetAxisTickModeCommand as Yt, SetAxisTicksVisibilityCommand as Qt, SetAxisVisibilityCommand as Jt, SetBarBorderRadiusCommand as er, SetBarWidthCommand as nr, SetContentCaptionCommand as tr, SetContentSourceCommand as rr, SetContentSubtitleCommand as ar, SetContentTitleCommand as or, SetDataLabelsFormatCommand as ir, SetGridLineStyleCommand as lr, SetGridLineWidthCommand as sr, SetGridVisibilityCommand as cr, SetHeadlineCompareWithCommand as dr, SetHeadlinePositionCommand as hr, SetHeadlineShowCommand as $e, SetHeadlineSizeCommand as ur, SetHighlightDimStyleCommand as mr, SetLegendAlignCommand as pr, SetLegendDisplayCommand as gr, SetLegendPositionCommand as vr, SetLineInterpolationCommand as fr, SetLineMissingValuesCommand as br, SetLineWidthCommand as Ze, SetNumberFormatAbbreviationCommand as Cr, SetNumberFormatDecimalsCommand as Xe, SetPointSizeCommand as Sr, SetPolarInnerRadiusCommand as yr, SetPolarStartAngleCommand as wr, SetScaleDomainCommand as pe, SetScaleReverseCommand as Pr, SetScaleTransformCommand as Ir, SetScaleZeroCommand as je, ToggleCategoryLabelsCommand as xr, ToggleContentVisibilityCommand as we, ToggleDataLabelsCommand as Tr, ToggleLineFillCommand as Ar, ToggleLinePointsVisibilityCommand as Lr, ToggleStackTotalsCommand as Nr, UpdateAnnotationCommand as wn, areAnchorsEqual as Pn, areEndpointsComparable as Or, buildEditMenuTriggerRegion as Er, buildLayerStyleAddress as _r, buildObservationAnchor as kr, buildObservationPredicate as Mr, canAnchorDirectLabels as Rr, canPlaceDataLabels as Dr, createObservationAnchorParser as zr, createStyleResolver as Fr, extractVariableName as Hr, filterLayersByGeoms as Le, findHighlightsAtObservation as Vr, findLayerByGeom as In, findObservationAttachment as Kr, findStyleRule as Gr, formatDifferenceLabel as Br, getColor as Ur, hasMultipleGroups as qr, inferDifferenceArrowEndpoints as Wr, isCompanionLayer as xn, isObservationAttachmentKind as $r, isPointWithinEditMenuTrigger as Tn, isSafeUrl as Zr, projectAnchorToPanel as Xr, readHighlightDimStyle as jr, resolveComparisonBasis as Yr, resolveObservationPoint as Ne, stepDifferenceArrowEndpoint as Qr, toPanelCursor as De } from "@graphysdk/viz-engine";
|
|
4
|
+
import { createContext as ue, useCallback as fe, useContext as ae, useEffect as z, useId as de, useMemo as O, useRef as be, useState as $ } from "react";
|
|
5
|
+
import { Fragment as q, jsx as n, jsxs as p } from "react/jsx-runtime";
|
|
6
|
+
import { useShallow as ze } from "zustand/react/shallow";
|
|
7
|
+
import { createPortal as Jr } from "react-dom";
|
|
8
|
+
import re from "clsx";
|
|
9
|
+
import { assignInlineVars as An } from "@vanilla-extract/dynamic";
|
|
10
|
+
import { Menu as k } from "@base-ui/react/menu";
|
|
11
|
+
import { Menu as j } from "@base-ui/react";
|
|
12
|
+
import { Accordion as le } from "@base-ui/react/accordion";
|
|
13
|
+
import { NumberField as Ye } from "@base-ui/react/number-field";
|
|
14
|
+
import { Radio as Ln } from "@base-ui/react/radio";
|
|
15
|
+
import { RadioGroup as Nn } from "@base-ui/react/radio-group";
|
|
16
|
+
import { Select as U } from "@base-ui/react/select";
|
|
17
|
+
import { Slider as oe } from "@base-ui/react/slider";
|
|
18
|
+
import { Switch as Qe } from "@base-ui/react/switch";
|
|
19
|
+
import { Input as ea } from "@base-ui/react/input";
|
|
20
|
+
import './editable.css';var na = "data-graphy-chart-chrome", ta = "data-graphy-chart-menu", On = { [ta]: "" }, Ce = (e) => ({ [na]: e }), En = (e, t) => e instanceof Element && e.closest(`[data-graphy-chart-chrome="${CSS.escape(t)}"]`) !== null, ra = (e) => e instanceof Element && e.closest("[data-graphy-chart-menu]") !== null, aa = (e) => e instanceof Element && e.closest("[data-graphy-chart-chrome]") !== null, ce = (e, t, i) => e instanceof Node && (t.contains(e) || En(e, i)), oa = "cml7ha0", _n = ue(null), ia = ({ children: e }) => {
|
|
21
|
+
const { chartId: t } = B(), [i] = $(ke), [r, a] = $(null);
|
|
22
|
+
return i === null ? null : /* @__PURE__ */ p(q, { children: [Jr(/* @__PURE__ */ n("div", {
|
|
23
23
|
ref: a,
|
|
24
|
-
className:
|
|
25
|
-
...
|
|
26
|
-
}),
|
|
27
|
-
value:
|
|
24
|
+
className: oa,
|
|
25
|
+
...Ce(t)
|
|
26
|
+
}), i), /* @__PURE__ */ n(_n.Provider, {
|
|
27
|
+
value: r,
|
|
28
28
|
children: e
|
|
29
29
|
})] });
|
|
30
|
-
},
|
|
30
|
+
}, Fe = () => ae(_n), kn = (e) => /* @__PURE__ */ p(M, {
|
|
31
31
|
viewBox: "0 0 16 16",
|
|
32
32
|
...e,
|
|
33
33
|
children: [
|
|
34
|
-
/* @__PURE__ */
|
|
34
|
+
/* @__PURE__ */ n("path", {
|
|
35
35
|
fill: "currentColor",
|
|
36
36
|
fillOpacity: ".8",
|
|
37
37
|
d: "M2.333 3h11.334v8.667c-2 0-4 .333-5.667 2.333-2-2-3.667-2.333-5.667-2.333z",
|
|
38
38
|
opacity: ".12"
|
|
39
39
|
}),
|
|
40
|
-
/* @__PURE__ */
|
|
40
|
+
/* @__PURE__ */ n("path", {
|
|
41
41
|
fill: "currentColor",
|
|
42
42
|
fillOpacity: ".8",
|
|
43
43
|
fillRule: "evenodd",
|
|
44
44
|
d: "M3.325 3.156a.836.836 0 0 0-.836.836v6.832c0 .462.375.836.836.836h2.131a.5.5 0 0 1 .352.145L8 13.975l2.193-2.17a.5.5 0 0 1 .352-.145h2.13a.84.84 0 0 0 .836-.836V3.992a.84.84 0 0 0-.836-.836zm-1.836.836c0-1.014.822-1.836 1.836-1.836h9.35c1.015 0 1.836.825 1.836 1.836v6.832a1.84 1.84 0 0 1-1.836 1.836H10.75l-2.398 2.374a.5.5 0 0 1-.704 0L5.25 12.66H3.325a1.836 1.836 0 0 1-1.836-1.836z",
|
|
45
45
|
clipRule: "evenodd"
|
|
46
46
|
}),
|
|
47
|
-
/* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ n("path", {
|
|
48
48
|
fill: "currentColor",
|
|
49
49
|
fillOpacity: ".8",
|
|
50
50
|
fillRule: "evenodd",
|
|
@@ -53,91 +53,91 @@ import './editable.css';var Kn = "data-graphy-chart-chrome", Hn = "data-graphy-c
|
|
|
53
53
|
})
|
|
54
54
|
]
|
|
55
55
|
});
|
|
56
|
-
var
|
|
56
|
+
var Mn = "efjmb40", Rn = "efjmb41", ee = "efjmb42", ne = "efjmb43", la = "efjmb44", sa = "efjmb45", ca = /* @__PURE__ */ new Set([
|
|
57
57
|
"item-press",
|
|
58
58
|
"escape-key",
|
|
59
59
|
"outside-press",
|
|
60
60
|
"close-press",
|
|
61
61
|
"sibling-open",
|
|
62
62
|
"trigger-press"
|
|
63
|
-
]),
|
|
64
|
-
const a =
|
|
65
|
-
s ? (l(!0),
|
|
63
|
+
]), He = ({ label: e, icon: t, onOpened: i, children: r }) => {
|
|
64
|
+
const a = Fe(), [o, l] = $(!1), c = (s, u) => {
|
|
65
|
+
s ? (l(!0), i?.()) : ca.has(u.reason) && l(!1);
|
|
66
66
|
};
|
|
67
|
-
return /* @__PURE__ */ p(
|
|
68
|
-
open:
|
|
67
|
+
return /* @__PURE__ */ p(j.SubmenuRoot, {
|
|
68
|
+
open: o,
|
|
69
69
|
onOpenChange: c,
|
|
70
|
-
children: [/* @__PURE__ */
|
|
70
|
+
children: [/* @__PURE__ */ n(da, {
|
|
71
71
|
label: e,
|
|
72
|
-
icon:
|
|
73
|
-
}), /* @__PURE__ */
|
|
72
|
+
icon: t
|
|
73
|
+
}), /* @__PURE__ */ n(j.Portal, {
|
|
74
74
|
container: a,
|
|
75
|
-
children: /* @__PURE__ */
|
|
75
|
+
children: /* @__PURE__ */ n(he, { children: /* @__PURE__ */ n(j.Positioner, {
|
|
76
76
|
side: "right",
|
|
77
77
|
align: "start",
|
|
78
78
|
sideOffset: 4,
|
|
79
|
-
className:
|
|
80
|
-
...
|
|
81
|
-
children: /* @__PURE__ */
|
|
82
|
-
className:
|
|
83
|
-
children:
|
|
79
|
+
className: Mn,
|
|
80
|
+
...On,
|
|
81
|
+
children: /* @__PURE__ */ n(j.Popup, {
|
|
82
|
+
className: Rn,
|
|
83
|
+
children: r
|
|
84
84
|
})
|
|
85
85
|
}) })
|
|
86
86
|
})]
|
|
87
87
|
});
|
|
88
|
-
},
|
|
89
|
-
className:
|
|
88
|
+
}, da = ({ label: e, icon: t }) => /* @__PURE__ */ p(j.SubmenuTrigger, {
|
|
89
|
+
className: ee,
|
|
90
90
|
openOnHover: !1,
|
|
91
91
|
children: [
|
|
92
|
-
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
className:
|
|
92
|
+
t,
|
|
93
|
+
/* @__PURE__ */ n("span", {
|
|
94
|
+
className: ne,
|
|
95
95
|
children: e
|
|
96
96
|
}),
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
className:
|
|
99
|
-
children: /* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ n("span", {
|
|
98
|
+
className: sa,
|
|
99
|
+
children: /* @__PURE__ */ n(Se, { size: "sm" })
|
|
100
100
|
})
|
|
101
101
|
]
|
|
102
|
-
}),
|
|
103
|
-
const
|
|
104
|
-
|
|
102
|
+
}), ha = "_1qe7q450", ua = "_1qe7q451", ma = "_1qe7q452", pa = ({ label: e, placeholder: t, addLabel: i, at: r, onRequestClose: a }) => {
|
|
103
|
+
const o = be(null), [l, c] = $(""), { dispatch: s } = J(), u = l.trim(), d = () => {
|
|
104
|
+
u.length !== 0 && (s(new ye({
|
|
105
105
|
kind: "comment",
|
|
106
106
|
annotation: {
|
|
107
|
-
at:
|
|
108
|
-
content:
|
|
107
|
+
at: r,
|
|
108
|
+
content: ga(u)
|
|
109
109
|
}
|
|
110
110
|
})), a());
|
|
111
111
|
};
|
|
112
|
-
return /* @__PURE__ */
|
|
112
|
+
return /* @__PURE__ */ n(He, {
|
|
113
113
|
label: e,
|
|
114
|
-
icon: /* @__PURE__ */
|
|
114
|
+
icon: /* @__PURE__ */ n(kn, {}),
|
|
115
115
|
onOpened: () => {
|
|
116
|
-
requestAnimationFrame(() =>
|
|
116
|
+
requestAnimationFrame(() => o.current?.focus());
|
|
117
117
|
},
|
|
118
118
|
children: /* @__PURE__ */ p("div", {
|
|
119
|
-
className:
|
|
120
|
-
children: [/* @__PURE__ */
|
|
121
|
-
ref:
|
|
122
|
-
className:
|
|
119
|
+
className: ha,
|
|
120
|
+
children: [/* @__PURE__ */ n("input", {
|
|
121
|
+
ref: o,
|
|
122
|
+
className: ua,
|
|
123
123
|
value: l,
|
|
124
|
-
placeholder:
|
|
124
|
+
placeholder: t,
|
|
125
125
|
onChange: (g) => {
|
|
126
126
|
c(g.target.value);
|
|
127
127
|
},
|
|
128
128
|
onKeyDown: (g) => {
|
|
129
|
-
g.key === "Enter" && (g.preventDefault(),
|
|
129
|
+
g.key === "Enter" && (g.preventDefault(), d()), g.key !== "Escape" && g.stopPropagation();
|
|
130
130
|
}
|
|
131
|
-
}), /* @__PURE__ */
|
|
131
|
+
}), /* @__PURE__ */ n("button", {
|
|
132
132
|
type: "button",
|
|
133
|
-
className:
|
|
134
|
-
disabled:
|
|
135
|
-
onClick:
|
|
136
|
-
children:
|
|
133
|
+
className: ma,
|
|
134
|
+
disabled: u.length === 0,
|
|
135
|
+
onClick: d,
|
|
136
|
+
children: i
|
|
137
137
|
})]
|
|
138
138
|
})
|
|
139
139
|
});
|
|
140
|
-
},
|
|
140
|
+
}, ga = (e) => ({
|
|
141
141
|
type: "doc",
|
|
142
142
|
content: [{
|
|
143
143
|
type: "paragraph",
|
|
@@ -146,101 +146,101 @@ var ut = "efjmb40", ht = "efjmb41", U = "efjmb42", $ = "efjmb43", Un = "efjmb44"
|
|
|
146
146
|
text: e
|
|
147
147
|
}]
|
|
148
148
|
}]
|
|
149
|
-
}),
|
|
149
|
+
}), va = (e) => /* @__PURE__ */ n(M, {
|
|
150
150
|
viewBox: "0 0 15 14",
|
|
151
151
|
...e,
|
|
152
|
-
children: /* @__PURE__ */
|
|
152
|
+
children: /* @__PURE__ */ n("path", {
|
|
153
153
|
d: "M14.0146 5.20703C14.2118 5.40459 14.2121 5.72447 14.0146 5.92187L12.3291 7.6084C12.2343 7.70313 12.1047 7.75579 11.9707 7.75586C11.8369 7.75573 11.708 7.70291 11.6133 7.6084L9.92773 5.92187C9.73024 5.72438 9.73031 5.40457 9.92773 5.20703C10.1253 5.0095 10.445 5.0095 10.6426 5.20703L11.4658 6.03027L11.4658 1.68652L7.75586 1.68652L7.75586 12.6455C7.75563 12.9246 7.5291 13.1512 7.25 13.1514L2.5293 13.1514C2.2501 13.1514 2.02367 12.9247 2.02344 12.6455L2.02344 5.00781C0.868958 4.77348 0.000106647 3.7528 -1.10559e-07 2.5293C-4.95071e-08 1.13259 1.13261 9.74645e-05 2.5293 -5.23256e-07C3.92588 0.000220668 5.05859 1.13267 5.05859 2.5293C5.05849 3.75251 4.1892 4.77219 3.03516 5.00684L3.03516 12.1396L6.74414 12.1396L6.74414 1.18066C6.74414 0.901394 6.97076 0.674939 7.25 0.674804L11.9707 0.674805C12.2499 0.674939 12.4766 0.901394 12.4766 1.18066L12.4766 6.03027L13.2998 5.20703C13.4973 5.0095 13.8171 5.0095 14.0146 5.20703ZM4.04687 2.5293C4.04687 1.69137 3.36717 1.01194 2.5293 1.01172C1.69132 1.01182 1.01172 1.6913 1.01172 2.5293C1.01184 3.36719 1.6914 4.04678 2.5293 4.04687C3.36709 4.04665 4.04675 3.36712 4.04687 2.5293ZM14.5 11.2969C14.4998 12.6935 13.3673 13.8262 11.9707 13.8262C10.5742 13.826 9.4416 12.6934 9.44141 11.2969C9.44141 9.90018 10.574 8.7677 11.9707 8.76758C13.3675 8.76758 14.5 9.90011 14.5 11.2969ZM13.4883 11.2969C13.4883 10.4588 12.8088 9.7793 11.9707 9.7793C11.1327 9.77942 10.4531 10.4589 10.4531 11.2969C10.4533 12.1347 11.1329 12.8143 11.9707 12.8145C12.8086 12.8145 13.4881 12.1348 13.4883 11.2969Z",
|
|
154
154
|
fill: "currentColor",
|
|
155
155
|
fillOpacity: "0.8"
|
|
156
156
|
})
|
|
157
|
-
}),
|
|
158
|
-
const { dispatch: a } =
|
|
159
|
-
layer:
|
|
160
|
-
at:
|
|
161
|
-
coordSystem:
|
|
157
|
+
}), fa = "relative-difference", ba = ({ label: e, layer: t, at: i, onRequestClose: r }) => {
|
|
158
|
+
const { dispatch: a } = J(), o = G((s) => s.coordSystem), l = O(() => Wr({
|
|
159
|
+
layer: t,
|
|
160
|
+
at: i,
|
|
161
|
+
coordSystem: o
|
|
162
162
|
}), [
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
163
|
+
t,
|
|
164
|
+
i,
|
|
165
|
+
o
|
|
166
166
|
]);
|
|
167
167
|
if (l === null) return null;
|
|
168
168
|
const c = () => {
|
|
169
|
-
a(new
|
|
169
|
+
a(new ye({
|
|
170
170
|
kind: "differenceArrow",
|
|
171
171
|
annotation: {
|
|
172
|
-
...
|
|
172
|
+
...Bt,
|
|
173
173
|
...l,
|
|
174
|
-
label:
|
|
174
|
+
label: fa
|
|
175
175
|
}
|
|
176
|
-
})),
|
|
176
|
+
})), r();
|
|
177
177
|
};
|
|
178
|
-
return /* @__PURE__ */ p(
|
|
179
|
-
className:
|
|
178
|
+
return /* @__PURE__ */ p(k.Item, {
|
|
179
|
+
className: ee,
|
|
180
180
|
onClick: c,
|
|
181
|
-
children: [/* @__PURE__ */
|
|
182
|
-
className:
|
|
181
|
+
children: [/* @__PURE__ */ n(va, {}), /* @__PURE__ */ n("span", {
|
|
182
|
+
className: ne,
|
|
183
183
|
children: e
|
|
184
184
|
})]
|
|
185
185
|
});
|
|
186
186
|
};
|
|
187
|
-
function
|
|
188
|
-
if (e.type === "polar" && !
|
|
187
|
+
function Ca(e, t) {
|
|
188
|
+
if (e.type === "polar" && !Sa(t)) return [{
|
|
189
189
|
scope: "series",
|
|
190
190
|
labelKey: "pieSlice"
|
|
191
191
|
}];
|
|
192
|
-
const
|
|
193
|
-
switch (
|
|
192
|
+
const i = qr(t.data, t.mapping);
|
|
193
|
+
switch (t.geom) {
|
|
194
194
|
case "bar": {
|
|
195
|
-
const
|
|
195
|
+
const r = [{
|
|
196
196
|
scope: "data-point",
|
|
197
197
|
labelKey: "bar"
|
|
198
198
|
}];
|
|
199
|
-
if (
|
|
200
|
-
const a =
|
|
201
|
-
|
|
199
|
+
if (i) {
|
|
200
|
+
const a = t.position === "stack" || t.position === "fill";
|
|
201
|
+
r.push({
|
|
202
202
|
scope: "x-value",
|
|
203
203
|
labelKey: a ? "barStack" : "barGroup"
|
|
204
|
-
}),
|
|
204
|
+
}), r.push({
|
|
205
205
|
scope: "series",
|
|
206
206
|
labelKey: "barSeries"
|
|
207
207
|
});
|
|
208
208
|
}
|
|
209
|
-
return
|
|
209
|
+
return r;
|
|
210
210
|
}
|
|
211
211
|
case "line":
|
|
212
212
|
case "area": {
|
|
213
|
-
const
|
|
213
|
+
const r = [{
|
|
214
214
|
scope: "data-point",
|
|
215
215
|
labelKey: "linePoint"
|
|
216
216
|
}];
|
|
217
|
-
return
|
|
217
|
+
return i && r.push({
|
|
218
218
|
scope: "series",
|
|
219
219
|
labelKey: "lineSeries"
|
|
220
|
-
}),
|
|
220
|
+
}), r;
|
|
221
221
|
}
|
|
222
222
|
case "point": {
|
|
223
|
-
const
|
|
223
|
+
const r = [{
|
|
224
224
|
scope: "data-point",
|
|
225
225
|
labelKey: "scatterPoint"
|
|
226
226
|
}];
|
|
227
|
-
return
|
|
227
|
+
return i && r.push({
|
|
228
228
|
scope: "series",
|
|
229
229
|
labelKey: "scatterSeries"
|
|
230
|
-
}),
|
|
230
|
+
}), r;
|
|
231
231
|
}
|
|
232
232
|
default:
|
|
233
233
|
return [];
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
|
-
var
|
|
237
|
-
const
|
|
238
|
-
return
|
|
239
|
-
},
|
|
236
|
+
var Sa = (e) => {
|
|
237
|
+
const t = Hr(e.mapping.x);
|
|
238
|
+
return t !== null && t !== Ht.x;
|
|
239
|
+
}, ya = (e) => /* @__PURE__ */ p(M, {
|
|
240
240
|
viewBox: "0 0 16 16",
|
|
241
241
|
...e,
|
|
242
242
|
children: [
|
|
243
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ n("rect", {
|
|
244
244
|
width: "3.2",
|
|
245
245
|
height: "7.704",
|
|
246
246
|
y: "8.296",
|
|
@@ -248,7 +248,7 @@ var ar = (e) => {
|
|
|
248
248
|
fillOpacity: "0.3",
|
|
249
249
|
rx: ".533"
|
|
250
250
|
}),
|
|
251
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ n("rect", {
|
|
252
252
|
width: "3.2",
|
|
253
253
|
height: "4.741",
|
|
254
254
|
x: "8.533",
|
|
@@ -257,7 +257,7 @@ var ar = (e) => {
|
|
|
257
257
|
fillOpacity: "0.3",
|
|
258
258
|
rx: ".533"
|
|
259
259
|
}),
|
|
260
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ n("rect", {
|
|
261
261
|
width: "3.2",
|
|
262
262
|
height: "11.259",
|
|
263
263
|
x: "4.267",
|
|
@@ -266,7 +266,7 @@ var ar = (e) => {
|
|
|
266
266
|
fillOpacity: "0.8",
|
|
267
267
|
rx: ".533"
|
|
268
268
|
}),
|
|
269
|
-
/* @__PURE__ */
|
|
269
|
+
/* @__PURE__ */ n("rect", {
|
|
270
270
|
width: "3.2",
|
|
271
271
|
height: "16",
|
|
272
272
|
x: "12.8",
|
|
@@ -275,11 +275,11 @@ var ar = (e) => {
|
|
|
275
275
|
rx: ".533"
|
|
276
276
|
})
|
|
277
277
|
]
|
|
278
|
-
}),
|
|
278
|
+
}), wa = (e) => /* @__PURE__ */ p(M, {
|
|
279
279
|
viewBox: "0 0 16 16",
|
|
280
280
|
...e,
|
|
281
281
|
children: [
|
|
282
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ n("rect", {
|
|
283
283
|
width: "3.2",
|
|
284
284
|
height: "7.704",
|
|
285
285
|
y: "8.296",
|
|
@@ -287,7 +287,7 @@ var ar = (e) => {
|
|
|
287
287
|
fillOpacity: "0.8",
|
|
288
288
|
rx: ".533"
|
|
289
289
|
}),
|
|
290
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ n("rect", {
|
|
291
291
|
width: "3.2",
|
|
292
292
|
height: "4.741",
|
|
293
293
|
x: "8.533",
|
|
@@ -296,7 +296,7 @@ var ar = (e) => {
|
|
|
296
296
|
fillOpacity: "0.3",
|
|
297
297
|
rx: ".533"
|
|
298
298
|
}),
|
|
299
|
-
/* @__PURE__ */
|
|
299
|
+
/* @__PURE__ */ n("rect", {
|
|
300
300
|
width: "3.2",
|
|
301
301
|
height: "11.259",
|
|
302
302
|
x: "4.267",
|
|
@@ -305,7 +305,7 @@ var ar = (e) => {
|
|
|
305
305
|
fillOpacity: "0.8",
|
|
306
306
|
rx: ".533"
|
|
307
307
|
}),
|
|
308
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ n("rect", {
|
|
309
309
|
width: "3.2",
|
|
310
310
|
height: "16",
|
|
311
311
|
x: "12.8",
|
|
@@ -314,11 +314,11 @@ var ar = (e) => {
|
|
|
314
314
|
rx: ".533"
|
|
315
315
|
})
|
|
316
316
|
]
|
|
317
|
-
}),
|
|
317
|
+
}), Pa = (e) => /* @__PURE__ */ p(M, {
|
|
318
318
|
viewBox: "0 0 16 16",
|
|
319
319
|
...e,
|
|
320
320
|
children: [
|
|
321
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ n("rect", {
|
|
322
322
|
width: "3.2",
|
|
323
323
|
height: "7.704",
|
|
324
324
|
y: "8.296",
|
|
@@ -326,7 +326,7 @@ var ar = (e) => {
|
|
|
326
326
|
fillOpacity: "0.3",
|
|
327
327
|
rx: ".533"
|
|
328
328
|
}),
|
|
329
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ n("rect", {
|
|
330
330
|
width: "3.2",
|
|
331
331
|
height: "4.741",
|
|
332
332
|
x: "8.533",
|
|
@@ -335,7 +335,7 @@ var ar = (e) => {
|
|
|
335
335
|
fillOpacity: "0.3",
|
|
336
336
|
rx: ".533"
|
|
337
337
|
}),
|
|
338
|
-
/* @__PURE__ */
|
|
338
|
+
/* @__PURE__ */ n("rect", {
|
|
339
339
|
width: "3.2",
|
|
340
340
|
height: "11.259",
|
|
341
341
|
x: "4.267",
|
|
@@ -344,7 +344,7 @@ var ar = (e) => {
|
|
|
344
344
|
fillOpacity: "0.8",
|
|
345
345
|
rx: ".533"
|
|
346
346
|
}),
|
|
347
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ n("rect", {
|
|
348
348
|
width: "3.2",
|
|
349
349
|
height: "16",
|
|
350
350
|
x: "12.8",
|
|
@@ -353,31 +353,31 @@ var ar = (e) => {
|
|
|
353
353
|
rx: ".533"
|
|
354
354
|
})
|
|
355
355
|
]
|
|
356
|
-
}),
|
|
356
|
+
}), Ia = (e) => /* @__PURE__ */ p(M, {
|
|
357
357
|
viewBox: "0 0 16 16",
|
|
358
358
|
...e,
|
|
359
359
|
children: [
|
|
360
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ n("path", {
|
|
361
361
|
fill: "currentColor",
|
|
362
362
|
fillOpacity: "0.3",
|
|
363
363
|
d: "M0 13.037h4.267v2.445a.52.52 0 0 1-.519.518H.518A.52.52 0 0 1 0 15.482zM0 7.037c0-.286.232-.518.519-.518h3.23c.286 0 .518.232.518.518v5.408H0z"
|
|
364
364
|
}),
|
|
365
|
-
/* @__PURE__ */
|
|
365
|
+
/* @__PURE__ */ n("path", {
|
|
366
366
|
fill: "currentColor",
|
|
367
367
|
fillOpacity: ".8",
|
|
368
368
|
d: "M5.867 7.704h4.266v7.778a.52.52 0 0 1-.518.518h-3.23a.52.52 0 0 1-.518-.518zM5.867 7.111h4.266V4.074a.52.52 0 0 0-.518-.518h-3.23a.52.52 0 0 0-.518.518z"
|
|
369
369
|
}),
|
|
370
|
-
/* @__PURE__ */
|
|
370
|
+
/* @__PURE__ */ n("path", {
|
|
371
371
|
fill: "currentColor",
|
|
372
372
|
fillOpacity: "0.3",
|
|
373
373
|
d: "M11.733 10.074H16v5.408a.52.52 0 0 1-.518.518h-3.23a.52.52 0 0 1-.519-.518zM11.733 9.481H16V.52A.52.52 0 0 0 15.482 0h-3.23a.52.52 0 0 0-.519.519z"
|
|
374
374
|
})
|
|
375
375
|
]
|
|
376
|
-
}),
|
|
376
|
+
}), xa = (e) => /* @__PURE__ */ p(M, {
|
|
377
377
|
viewBox: "0 0 16 16",
|
|
378
378
|
...e,
|
|
379
379
|
children: [
|
|
380
|
-
/* @__PURE__ */
|
|
380
|
+
/* @__PURE__ */ n("path", {
|
|
381
381
|
stroke: "currentColor",
|
|
382
382
|
strokeLinecap: "round",
|
|
383
383
|
strokeLinejoin: "round",
|
|
@@ -385,14 +385,14 @@ var ar = (e) => {
|
|
|
385
385
|
strokeWidth: "1.163",
|
|
386
386
|
d: "m-1.618 15.96 9.118-5.3 11 2.34"
|
|
387
387
|
}),
|
|
388
|
-
/* @__PURE__ */
|
|
388
|
+
/* @__PURE__ */ n("path", {
|
|
389
389
|
fill: "currentColor",
|
|
390
390
|
fillOpacity: "0.6",
|
|
391
391
|
stroke: "currentColor",
|
|
392
392
|
strokeOpacity: "0.3",
|
|
393
393
|
d: "M8 13a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"
|
|
394
394
|
}),
|
|
395
|
-
/* @__PURE__ */
|
|
395
|
+
/* @__PURE__ */ n("rect", {
|
|
396
396
|
width: "9.795",
|
|
397
397
|
height: "6",
|
|
398
398
|
x: "3",
|
|
@@ -401,17 +401,17 @@ var ar = (e) => {
|
|
|
401
401
|
fillOpacity: "0.3",
|
|
402
402
|
rx: "1.513"
|
|
403
403
|
}),
|
|
404
|
-
/* @__PURE__ */
|
|
404
|
+
/* @__PURE__ */ n("path", {
|
|
405
405
|
fill: "currentColor",
|
|
406
406
|
fillOpacity: ".8",
|
|
407
407
|
d: "M5.29 6.62a1.3 1.3 0 0 1-.424-.075 1 1 0 0 1-.373-.244 1.2 1.2 0 0 1-.262-.45 2.1 2.1 0 0 1-.096-.699q0-.389.082-.693.083-.304.238-.514a1.05 1.05 0 0 1 .374-.322q.22-.11.492-.11.285 0 .505.112a.973.973 0 0 1 .526.744h-.54a.5.5 0 0 0-.17-.277.5.5 0 0 0-.321-.105.54.54 0 0 0-.485.273q-.168.273-.17.75h.021a.8.8 0 0 1 .188-.223.92.92 0 0 1 .569-.195.91.91 0 0 1 .813.477q.125.222.123.509 0 .297-.136.536a1 1 0 0 1-.383.372 1.15 1.15 0 0 1-.571.134m-.003-.443a.54.54 0 0 0 .288-.078.57.57 0 0 0 .2-.211.6.6 0 0 0 .073-.299.6.6 0 0 0-.07-.294.54.54 0 0 0-.484-.285.55.55 0 0 0-.403.173.596.596 0 0 0 .108.914.53.53 0 0 0 .288.08M6.88 6.579v-.396l1.05-1.03q.15-.15.25-.27a1 1 0 0 0 .151-.229.6.6 0 0 0 .05-.236.432.432 0 0 0-.244-.405.6.6 0 0 0-.258-.056q-.15 0-.261.062a.43.43 0 0 0-.175.173.56.56 0 0 0-.06.267H6.86q0-.288.132-.5a.9.9 0 0 1 .362-.33q.231-.117.532-.117.303 0 .534.114.23.114.358.312a.8.8 0 0 1 .128.452.9.9 0 0 1-.065.334q-.065.164-.229.363-.162.2-.456.483l-.522.53v.021h1.318v.458zM10.57 6.62a1.3 1.3 0 0 1-.423-.075 1 1 0 0 1-.373-.244 1.2 1.2 0 0 1-.263-.45 2.1 2.1 0 0 1-.096-.699q0-.389.083-.693t.238-.514a1.05 1.05 0 0 1 .374-.322q.219-.11.492-.11.285 0 .505.112a.973.973 0 0 1 .526.744h-.54a.5.5 0 0 0-.17-.277.5.5 0 0 0-.322-.105.54.54 0 0 0-.484.273q-.168.273-.17.75h.02a.8.8 0 0 1 .188-.223.92.92 0 0 1 .569-.195.91.91 0 0 1 .814.477q.125.222.123.509 0 .297-.136.536a1 1 0 0 1-.383.372 1.15 1.15 0 0 1-.572.134m-.002-.443a.54.54 0 0 0 .288-.078.57.57 0 0 0 .2-.211.6.6 0 0 0 .073-.299.6.6 0 0 0-.071-.294.54.54 0 0 0-.483-.285.54.54 0 0 0-.403.173.597.597 0 0 0 .107.914.53.53 0 0 0 .289.08"
|
|
408
408
|
})
|
|
409
409
|
]
|
|
410
|
-
}),
|
|
410
|
+
}), Ta = (e) => /* @__PURE__ */ p(M, {
|
|
411
411
|
viewBox: "0 0 16 16",
|
|
412
412
|
...e,
|
|
413
413
|
children: [
|
|
414
|
-
/* @__PURE__ */
|
|
414
|
+
/* @__PURE__ */ n("path", {
|
|
415
415
|
stroke: "currentColor",
|
|
416
416
|
strokeOpacity: "0.8",
|
|
417
417
|
strokeLinecap: "round",
|
|
@@ -419,28 +419,28 @@ var ar = (e) => {
|
|
|
419
419
|
strokeWidth: ".993",
|
|
420
420
|
d: "M1.5 12 6 6.5l4 3.5 4-5.5"
|
|
421
421
|
}),
|
|
422
|
-
/* @__PURE__ */
|
|
422
|
+
/* @__PURE__ */ n("circle", {
|
|
423
423
|
cx: "1.493",
|
|
424
424
|
cy: "11.993",
|
|
425
425
|
r: ".993",
|
|
426
426
|
fill: "currentColor",
|
|
427
427
|
fillOpacity: "0.8"
|
|
428
428
|
}),
|
|
429
|
-
/* @__PURE__ */
|
|
429
|
+
/* @__PURE__ */ n("circle", {
|
|
430
430
|
cx: "5.993",
|
|
431
431
|
cy: "6.493",
|
|
432
432
|
r: ".993",
|
|
433
433
|
fill: "currentColor",
|
|
434
434
|
fillOpacity: "0.8"
|
|
435
435
|
}),
|
|
436
|
-
/* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ n("circle", {
|
|
437
437
|
cx: "9.993",
|
|
438
438
|
cy: "9.993",
|
|
439
439
|
r: ".993",
|
|
440
440
|
fill: "currentColor",
|
|
441
441
|
fillOpacity: "0.8"
|
|
442
442
|
}),
|
|
443
|
-
/* @__PURE__ */
|
|
443
|
+
/* @__PURE__ */ n("circle", {
|
|
444
444
|
cx: "13.993",
|
|
445
445
|
cy: "4.493",
|
|
446
446
|
r: ".993",
|
|
@@ -448,33 +448,33 @@ var ar = (e) => {
|
|
|
448
448
|
fillOpacity: "0.8"
|
|
449
449
|
})
|
|
450
450
|
]
|
|
451
|
-
}),
|
|
451
|
+
}), Aa = (e) => /* @__PURE__ */ p(M, {
|
|
452
452
|
viewBox: "0 0 16 16",
|
|
453
453
|
...e,
|
|
454
454
|
children: [
|
|
455
|
-
/* @__PURE__ */
|
|
455
|
+
/* @__PURE__ */ n("rect", {
|
|
456
456
|
width: "16",
|
|
457
457
|
height: "16",
|
|
458
458
|
fill: "currentColor",
|
|
459
459
|
fillOpacity: "0.3",
|
|
460
460
|
rx: "8"
|
|
461
461
|
}),
|
|
462
|
-
/* @__PURE__ */
|
|
462
|
+
/* @__PURE__ */ n("path", {
|
|
463
463
|
fill: "currentColor",
|
|
464
464
|
fillOpacity: "0.8",
|
|
465
465
|
d: "m7.999 16 .412-.01A8 8 0 0 0 8 0z"
|
|
466
466
|
}),
|
|
467
|
-
/* @__PURE__ */
|
|
467
|
+
/* @__PURE__ */ n("path", {
|
|
468
468
|
fill: "currentColor",
|
|
469
469
|
fillOpacity: "0.6",
|
|
470
470
|
d: "M15.999 8a8 8 0 0 1-7.588 7.989l-.412.01V8z"
|
|
471
471
|
})
|
|
472
472
|
]
|
|
473
|
-
}),
|
|
473
|
+
}), La = (e) => /* @__PURE__ */ p(M, {
|
|
474
474
|
viewBox: "0 0 16 16",
|
|
475
475
|
...e,
|
|
476
476
|
children: [
|
|
477
|
-
/* @__PURE__ */
|
|
477
|
+
/* @__PURE__ */ n("rect", {
|
|
478
478
|
width: "2.056",
|
|
479
479
|
height: "2.056",
|
|
480
480
|
fill: "currentColor",
|
|
@@ -482,7 +482,7 @@ var ar = (e) => {
|
|
|
482
482
|
rx: "1.028",
|
|
483
483
|
transform: "matrix(-1 0 0 1 3.598 7.215)"
|
|
484
484
|
}),
|
|
485
|
-
/* @__PURE__ */
|
|
485
|
+
/* @__PURE__ */ n("rect", {
|
|
486
486
|
width: "2.056",
|
|
487
487
|
height: "2.056",
|
|
488
488
|
fill: "currentColor",
|
|
@@ -490,7 +490,7 @@ var ar = (e) => {
|
|
|
490
490
|
rx: "1.028",
|
|
491
491
|
transform: "matrix(-1 0 0 1 6.681 11.327)"
|
|
492
492
|
}),
|
|
493
|
-
/* @__PURE__ */
|
|
493
|
+
/* @__PURE__ */ n("rect", {
|
|
494
494
|
width: "2.056",
|
|
495
495
|
height: "2.056",
|
|
496
496
|
fill: "currentColor",
|
|
@@ -498,7 +498,7 @@ var ar = (e) => {
|
|
|
498
498
|
rx: "1.028",
|
|
499
499
|
transform: "matrix(-1 0 0 1 9.251 7.215)"
|
|
500
500
|
}),
|
|
501
|
-
/* @__PURE__ */
|
|
501
|
+
/* @__PURE__ */ n("rect", {
|
|
502
502
|
width: "2.056",
|
|
503
503
|
height: "2.056",
|
|
504
504
|
fill: "currentColor",
|
|
@@ -506,7 +506,7 @@ var ar = (e) => {
|
|
|
506
506
|
rx: "1.028",
|
|
507
507
|
transform: "matrix(-1 0 0 1 10.28 2.59)"
|
|
508
508
|
}),
|
|
509
|
-
/* @__PURE__ */
|
|
509
|
+
/* @__PURE__ */ n("rect", {
|
|
510
510
|
width: "2.056",
|
|
511
511
|
height: "2.056",
|
|
512
512
|
fill: "currentColor",
|
|
@@ -514,7 +514,7 @@ var ar = (e) => {
|
|
|
514
514
|
rx: "1.028",
|
|
515
515
|
transform: "matrix(-1 0 0 1 13.877 6.187)"
|
|
516
516
|
}),
|
|
517
|
-
/* @__PURE__ */
|
|
517
|
+
/* @__PURE__ */ n("rect", {
|
|
518
518
|
width: "2.056",
|
|
519
519
|
height: "2.056",
|
|
520
520
|
fill: "currentColor",
|
|
@@ -522,7 +522,7 @@ var ar = (e) => {
|
|
|
522
522
|
rx: "1.028",
|
|
523
523
|
transform: "matrix(-1 0 0 1 2.056 12.869)"
|
|
524
524
|
}),
|
|
525
|
-
/* @__PURE__ */
|
|
525
|
+
/* @__PURE__ */ n("rect", {
|
|
526
526
|
width: "2.056",
|
|
527
527
|
height: "2.056",
|
|
528
528
|
fill: "currentColor",
|
|
@@ -531,11 +531,11 @@ var ar = (e) => {
|
|
|
531
531
|
transform: "matrix(-1 0 0 1 15.933 .533)"
|
|
532
532
|
})
|
|
533
533
|
]
|
|
534
|
-
}),
|
|
534
|
+
}), Na = (e) => /* @__PURE__ */ p(M, {
|
|
535
535
|
viewBox: "0 0 16 16",
|
|
536
536
|
...e,
|
|
537
537
|
children: [
|
|
538
|
-
/* @__PURE__ */
|
|
538
|
+
/* @__PURE__ */ n("rect", {
|
|
539
539
|
width: "2.056",
|
|
540
540
|
height: "2.056",
|
|
541
541
|
fill: "currentColor",
|
|
@@ -543,7 +543,7 @@ var ar = (e) => {
|
|
|
543
543
|
rx: "1.028",
|
|
544
544
|
transform: "matrix(-1 0 0 1 3.598 7.215)"
|
|
545
545
|
}),
|
|
546
|
-
/* @__PURE__ */
|
|
546
|
+
/* @__PURE__ */ n("rect", {
|
|
547
547
|
width: "2.056",
|
|
548
548
|
height: "2.056",
|
|
549
549
|
fill: "currentColor",
|
|
@@ -551,7 +551,7 @@ var ar = (e) => {
|
|
|
551
551
|
rx: "1.028",
|
|
552
552
|
transform: "matrix(-1 0 0 1 6.681 11.327)"
|
|
553
553
|
}),
|
|
554
|
-
/* @__PURE__ */
|
|
554
|
+
/* @__PURE__ */ n("rect", {
|
|
555
555
|
width: "2.056",
|
|
556
556
|
height: "2.056",
|
|
557
557
|
fill: "currentColor",
|
|
@@ -559,7 +559,7 @@ var ar = (e) => {
|
|
|
559
559
|
rx: "1.028",
|
|
560
560
|
transform: "matrix(-1 0 0 1 9.251 7.215)"
|
|
561
561
|
}),
|
|
562
|
-
/* @__PURE__ */
|
|
562
|
+
/* @__PURE__ */ n("rect", {
|
|
563
563
|
width: "2.056",
|
|
564
564
|
height: "2.056",
|
|
565
565
|
fill: "currentColor",
|
|
@@ -567,7 +567,7 @@ var ar = (e) => {
|
|
|
567
567
|
rx: "1.028",
|
|
568
568
|
transform: "matrix(-1 0 0 1 10.28 2.59)"
|
|
569
569
|
}),
|
|
570
|
-
/* @__PURE__ */
|
|
570
|
+
/* @__PURE__ */ n("rect", {
|
|
571
571
|
width: "2.056",
|
|
572
572
|
height: "2.056",
|
|
573
573
|
fill: "currentColor",
|
|
@@ -575,7 +575,7 @@ var ar = (e) => {
|
|
|
575
575
|
rx: "1.028",
|
|
576
576
|
transform: "matrix(-1 0 0 1 13.877 6.187)"
|
|
577
577
|
}),
|
|
578
|
-
/* @__PURE__ */
|
|
578
|
+
/* @__PURE__ */ n("rect", {
|
|
579
579
|
width: "2.056",
|
|
580
580
|
height: "2.056",
|
|
581
581
|
fill: "currentColor",
|
|
@@ -583,7 +583,7 @@ var ar = (e) => {
|
|
|
583
583
|
rx: "1.028",
|
|
584
584
|
transform: "matrix(-1 0 0 1 2.056 12.869)"
|
|
585
585
|
}),
|
|
586
|
-
/* @__PURE__ */
|
|
586
|
+
/* @__PURE__ */ n("rect", {
|
|
587
587
|
width: "2.056",
|
|
588
588
|
height: "2.056",
|
|
589
589
|
fill: "currentColor",
|
|
@@ -592,170 +592,170 @@ var ar = (e) => {
|
|
|
592
592
|
transform: "matrix(-1 0 0 1 15.933 .533)"
|
|
593
593
|
})
|
|
594
594
|
]
|
|
595
|
-
}),
|
|
596
|
-
bar:
|
|
597
|
-
barGroup:
|
|
598
|
-
barStack:
|
|
599
|
-
barSeries:
|
|
600
|
-
linePoint:
|
|
601
|
-
lineSeries:
|
|
602
|
-
scatterPoint:
|
|
603
|
-
scatterSeries:
|
|
604
|
-
pieSlice:
|
|
605
|
-
},
|
|
606
|
-
const
|
|
607
|
-
return /* @__PURE__ */ t
|
|
608
|
-
},
|
|
595
|
+
}), Oa = {
|
|
596
|
+
bar: ya,
|
|
597
|
+
barGroup: wa,
|
|
598
|
+
barStack: Ia,
|
|
599
|
+
barSeries: Pa,
|
|
600
|
+
linePoint: xa,
|
|
601
|
+
lineSeries: Ta,
|
|
602
|
+
scatterPoint: La,
|
|
603
|
+
scatterSeries: Na,
|
|
604
|
+
pieSlice: Aa
|
|
605
|
+
}, Dn = ({ labelKey: e }) => {
|
|
606
|
+
const t = Oa[e];
|
|
607
|
+
return /* @__PURE__ */ n(t, {});
|
|
608
|
+
}, zn = (e) => /* @__PURE__ */ p(M, {
|
|
609
609
|
viewBox: "0 0 16 16",
|
|
610
610
|
...e,
|
|
611
|
-
children: [/* @__PURE__ */
|
|
611
|
+
children: [/* @__PURE__ */ n("path", {
|
|
612
612
|
opacity: "0.12",
|
|
613
613
|
d: "M15 4.66667L12.3333 2L2.33334 12L5.00001 14.6667L15 4.66667Z",
|
|
614
614
|
fill: "currentColor",
|
|
615
615
|
fillOpacity: "0.8"
|
|
616
|
-
}), /* @__PURE__ */
|
|
616
|
+
}), /* @__PURE__ */ n("path", {
|
|
617
617
|
d: "M5.01683 15.3331C4.84407 15.3343 4.67292 15.2997 4.51421 15.2314C4.3555 15.1632 4.21268 15.0627 4.09476 14.9365L3.88656 14.7283L3.62877 14.8968L3.19253 15.3331H0L2.24072 13.0923L2.03251 12.8445C1.89423 12.7191 1.78392 12.566 1.70875 12.3952C1.63359 12.2244 1.59526 12.0396 1.59626 11.853C1.59579 11.6818 1.63078 11.5124 1.69904 11.3554C1.76729 11.1984 1.86733 11.0573 1.99285 10.9409L11.2036 1.73012C11.3215 1.60384 11.4643 1.5034 11.623 1.43514C11.7817 1.36688 11.9529 1.33228 12.1257 1.33353C12.2969 1.33245 12.4665 1.36716 12.6236 1.43546C12.7807 1.50375 12.9218 1.60412 13.0378 1.73012L15.1496 3.92126C15.2748 4.03899 15.3745 4.1811 15.4427 4.33882C15.5108 4.49654 15.546 4.66655 15.546 4.83837C15.546 5.01019 15.5108 5.1802 15.4427 5.33792C15.3745 5.49564 15.2748 5.63774 15.1496 5.75548L5.93889 14.9662C5.81806 15.0866 5.67403 15.1812 5.51552 15.2443C5.35702 15.3074 5.18736 15.3376 5.01683 15.3331ZM2.48858 11.9125L5.01683 14.4407L9.47843 9.97913L6.95019 7.4608L2.48858 11.9125ZM7.68388 6.72712L10.2022 9.24544L14.644 4.80367L12.1257 2.28534L7.68388 6.72712Z",
|
|
618
618
|
fill: "currentColor",
|
|
619
619
|
fillOpacity: "0.8"
|
|
620
620
|
})]
|
|
621
|
-
}),
|
|
622
|
-
const
|
|
623
|
-
return /* @__PURE__ */
|
|
621
|
+
}), Ea = ({ label: e, options: t, onSelect: i }) => {
|
|
622
|
+
const r = T();
|
|
623
|
+
return /* @__PURE__ */ n(He, {
|
|
624
624
|
label: e,
|
|
625
|
-
icon: /* @__PURE__ */
|
|
626
|
-
children:
|
|
627
|
-
className:
|
|
628
|
-
onClick: () =>
|
|
629
|
-
children: [/* @__PURE__ */
|
|
630
|
-
className:
|
|
631
|
-
children:
|
|
625
|
+
icon: /* @__PURE__ */ n(zn, {}),
|
|
626
|
+
children: t.map((a) => /* @__PURE__ */ p(j.Item, {
|
|
627
|
+
className: ee,
|
|
628
|
+
onClick: () => i(a.scope),
|
|
629
|
+
children: [/* @__PURE__ */ n(Dn, { labelKey: a.labelKey }), /* @__PURE__ */ n("span", {
|
|
630
|
+
className: ne,
|
|
631
|
+
children: r(`graph.annotations.highlights.labels.${a.labelKey}`)
|
|
632
632
|
})]
|
|
633
633
|
}, a.scope))
|
|
634
634
|
});
|
|
635
|
-
},
|
|
636
|
-
const
|
|
637
|
-
const m = new Set(
|
|
638
|
-
return
|
|
639
|
-
}, [
|
|
635
|
+
}, _a = ({ label: e, layer: t, observation: i, highlights: r, onRequestClose: a }) => {
|
|
636
|
+
const o = T(), { dispatch: l } = J(), c = G((m) => m.coordSystem), s = O(() => Mr(t, i), [t, i]), u = O(() => Ca(c, t), [c, t]), d = O(() => {
|
|
637
|
+
const m = new Set(r.map((g) => g.scope));
|
|
638
|
+
return u.filter((g) => !m.has(g.scope));
|
|
639
|
+
}, [u, r]), [h] = d;
|
|
640
640
|
if (s === null || h === void 0) return null;
|
|
641
641
|
const v = (m) => {
|
|
642
|
-
l(new
|
|
642
|
+
l(new Ft({
|
|
643
643
|
predicate: s,
|
|
644
644
|
scope: m,
|
|
645
|
-
layerId:
|
|
645
|
+
layerId: t.id
|
|
646
646
|
})), a();
|
|
647
647
|
};
|
|
648
|
-
if (
|
|
649
|
-
const m =
|
|
650
|
-
return /* @__PURE__ */ p(
|
|
651
|
-
className:
|
|
648
|
+
if (d.length === 1) {
|
|
649
|
+
const m = u.length === 1 ? e : o("graph.annotations.baseMenu.highlightWithLabel", { label: o(`graph.annotations.highlights.labels.${h.labelKey}`) });
|
|
650
|
+
return /* @__PURE__ */ p(j.Item, {
|
|
651
|
+
className: ee,
|
|
652
652
|
onClick: () => v(h.scope),
|
|
653
|
-
children: [/* @__PURE__ */
|
|
654
|
-
className:
|
|
653
|
+
children: [/* @__PURE__ */ n(Dn, { labelKey: h.labelKey }), /* @__PURE__ */ n("span", {
|
|
654
|
+
className: ne,
|
|
655
655
|
children: m
|
|
656
656
|
})]
|
|
657
657
|
});
|
|
658
658
|
}
|
|
659
|
-
return /* @__PURE__ */
|
|
659
|
+
return /* @__PURE__ */ n(Ea, {
|
|
660
660
|
label: e,
|
|
661
|
-
options:
|
|
661
|
+
options: d,
|
|
662
662
|
onSelect: v
|
|
663
663
|
});
|
|
664
|
-
},
|
|
665
|
-
className:
|
|
664
|
+
}, ka = "_1aafi1g0", Ma = "_1aafi1g1", Fn = ({ children: e }) => /* @__PURE__ */ p("span", {
|
|
665
|
+
className: ka,
|
|
666
666
|
"aria-hidden": "true",
|
|
667
|
-
children: [e, /* @__PURE__ */
|
|
668
|
-
}),
|
|
669
|
-
const { dispatch:
|
|
667
|
+
children: [e, /* @__PURE__ */ n("span", { className: Ma })]
|
|
668
|
+
}), Ra = ({ label: e, highlights: t, onRequestClose: i }) => {
|
|
669
|
+
const { dispatch: r } = J(), a = t.at(-1);
|
|
670
670
|
if (a === void 0) return null;
|
|
671
|
-
const
|
|
672
|
-
|
|
671
|
+
const o = () => {
|
|
672
|
+
r(new Wt({ id: a.id })), i();
|
|
673
673
|
};
|
|
674
|
-
return /* @__PURE__ */ p(
|
|
675
|
-
className:
|
|
676
|
-
onClick:
|
|
677
|
-
children: [/* @__PURE__ */
|
|
678
|
-
className:
|
|
674
|
+
return /* @__PURE__ */ p(k.Item, {
|
|
675
|
+
className: ee,
|
|
676
|
+
onClick: o,
|
|
677
|
+
children: [/* @__PURE__ */ n(Fn, { children: /* @__PURE__ */ n(zn, {}) }), /* @__PURE__ */ n("span", {
|
|
678
|
+
className: ne,
|
|
679
679
|
children: e
|
|
680
680
|
})]
|
|
681
681
|
});
|
|
682
|
-
},
|
|
683
|
-
const
|
|
684
|
-
return
|
|
682
|
+
}, Da = (e, t) => {
|
|
683
|
+
const i = G((a) => a.spec.highlights), r = G((a) => a.config.parsingLocale);
|
|
684
|
+
return O(() => Vr({
|
|
685
685
|
layer: e,
|
|
686
|
-
highlights:
|
|
687
|
-
observation:
|
|
688
|
-
parsingLocale:
|
|
686
|
+
highlights: i,
|
|
687
|
+
observation: t,
|
|
688
|
+
parsingLocale: r
|
|
689
689
|
}), [
|
|
690
690
|
e,
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
691
|
+
i,
|
|
692
|
+
t,
|
|
693
|
+
r
|
|
694
694
|
]);
|
|
695
|
-
},
|
|
695
|
+
}, Hn = (e) => /* @__PURE__ */ p(M, {
|
|
696
696
|
viewBox: "0 0 16 16",
|
|
697
697
|
...e,
|
|
698
698
|
children: [
|
|
699
|
-
/* @__PURE__ */
|
|
699
|
+
/* @__PURE__ */ n("path", {
|
|
700
700
|
opacity: "0.12",
|
|
701
701
|
d: "M13.5948 4.29016C13.8724 6.22367 12.5301 8.01618 10.5966 8.29384C8.66309 8.57151 6.87058 7.22918 6.59292 5.29567C6.31525 3.36216 7.65758 1.56965 9.59109 1.29198C11.5246 1.01432 13.3171 2.35665 13.5948 4.29016Z",
|
|
702
702
|
fill: "currentColor",
|
|
703
703
|
fillOpacity: "0.8"
|
|
704
704
|
}),
|
|
705
|
-
/* @__PURE__ */
|
|
705
|
+
/* @__PURE__ */ n("path", {
|
|
706
706
|
fillRule: "evenodd",
|
|
707
707
|
clipRule: "evenodd",
|
|
708
708
|
d: "M5.71886 3.51052C6.25611 1.3626 8.43287 0.0568985 10.5808 0.594151C12.7287 1.1314 14.0344 3.30817 13.4972 5.45609C13.0316 7.31748 11.3347 8.54637 9.49237 8.49145L7.50898 12.492C7.46485 12.581 7.40179 12.6548 7.32702 12.7108C7.20005 12.8073 7.03703 12.8532 6.87248 12.8303C6.80957 12.822 6.74697 12.8038 6.68687 12.7749C6.39369 12.6342 6.26689 12.2915 6.3923 11.9963L7.63393 7.97371C6.10249 7.10872 5.27136 5.29962 5.71886 3.51052ZM10.2785 1.80253C8.79799 1.4322 7.29756 2.33222 6.92723 3.81277C6.55691 5.29332 7.45692 6.79375 8.93747 7.16408C10.418 7.5344 11.9185 6.63439 12.2888 5.15384C12.6591 3.67329 11.7591 2.17285 10.2785 1.80253Z",
|
|
709
709
|
fill: "currentColor",
|
|
710
710
|
fillOpacity: "0.8"
|
|
711
711
|
}),
|
|
712
|
-
/* @__PURE__ */
|
|
712
|
+
/* @__PURE__ */ n("path", {
|
|
713
713
|
d: "M5.42977 11.1572C5.70072 11.104 5.8772 10.8411 5.82393 10.5702C5.77067 10.2992 5.50784 10.1227 5.23688 10.176C4.31848 10.3565 3.57421 10.6423 3.04695 11.0266C2.51409 11.4149 2.16666 11.936 2.16666 12.557C2.16666 13.0322 2.41215 13.4327 2.74425 13.7433C3.07553 14.0531 3.52776 14.3091 4.04484 14.5137C5.08193 14.9239 6.48048 15.1666 7.99999 15.1666C9.5195 15.1666 10.9181 14.9239 11.9551 14.5137C12.4722 14.3091 12.9244 14.0531 13.2557 13.7433C13.5878 13.4327 13.8333 13.0322 13.8333 12.557C13.8333 11.936 13.4859 11.4149 12.953 11.0266C12.4258 10.6423 11.6815 10.3565 10.7631 10.176C10.4921 10.1227 10.2293 10.2992 10.176 10.5702C10.1228 10.8411 10.2993 11.104 10.5702 11.1572C11.4079 11.3219 11.997 11.5672 12.364 11.8347C12.7255 12.0981 12.8333 12.3496 12.8333 12.557C12.8333 12.6643 12.7803 12.8187 12.5727 13.013C12.3642 13.2079 12.0354 13.4065 11.5873 13.5838C10.6941 13.9371 9.426 14.1666 7.99999 14.1666C6.57398 14.1666 5.30586 13.9371 4.41267 13.5838C3.9646 13.4065 3.63578 13.2079 3.4273 13.013C3.21964 12.8187 3.16666 12.6643 3.16666 12.557C3.16666 12.3496 3.2745 12.0981 3.63595 11.8347C4.00299 11.5672 4.59206 11.3219 5.42977 11.1572Z",
|
|
714
714
|
fill: "currentColor",
|
|
715
715
|
fillOpacity: "0.8"
|
|
716
716
|
})
|
|
717
717
|
]
|
|
718
|
-
}),
|
|
719
|
-
const { dispatch:
|
|
720
|
-
|
|
718
|
+
}), za = ({ label: e, at: t, onRequestClose: i }) => {
|
|
719
|
+
const { dispatch: r } = J(), a = () => {
|
|
720
|
+
r(new ye({
|
|
721
721
|
kind: "pinnedNumber",
|
|
722
|
-
annotation: { at:
|
|
723
|
-
})),
|
|
722
|
+
annotation: { at: t }
|
|
723
|
+
})), i();
|
|
724
724
|
};
|
|
725
|
-
return /* @__PURE__ */ p(
|
|
726
|
-
className:
|
|
725
|
+
return /* @__PURE__ */ p(k.Item, {
|
|
726
|
+
className: ee,
|
|
727
727
|
onClick: a,
|
|
728
|
-
children: [/* @__PURE__ */
|
|
729
|
-
className:
|
|
728
|
+
children: [/* @__PURE__ */ n(Hn, {}), /* @__PURE__ */ n("span", {
|
|
729
|
+
className: ne,
|
|
730
730
|
children: e
|
|
731
731
|
})]
|
|
732
732
|
});
|
|
733
|
-
},
|
|
733
|
+
}, Vn = (e) => /* @__PURE__ */ p(M, {
|
|
734
734
|
viewBox: "0 0 16 16",
|
|
735
735
|
...e,
|
|
736
736
|
children: [
|
|
737
|
-
/* @__PURE__ */
|
|
737
|
+
/* @__PURE__ */ n("path", {
|
|
738
738
|
opacity: "0.12",
|
|
739
739
|
d: "M1.33334 8.00016C1.33334 4.31826 4.31811 1.3335 8.00001 1.3335C11.6819 1.3335 14.6667 4.31826 14.6667 8.00016C14.6667 11.6821 11.6819 14.6668 8.00001 14.6668C4.31811 14.6668 1.33334 11.6821 1.33334 8.00016Z",
|
|
740
740
|
fill: "currentColor",
|
|
741
741
|
fillOpacity: "0.8"
|
|
742
742
|
}),
|
|
743
|
-
/* @__PURE__ */
|
|
743
|
+
/* @__PURE__ */ n("path", {
|
|
744
744
|
d: "M5.7328 9.69963C5.56696 9.47884 5.25352 9.43429 5.03273 9.60013C4.81193 9.76598 4.76739 10.0794 4.93323 10.3002C5.63175 11.2302 6.74548 11.8333 7.99993 11.8333C9.25438 11.8333 10.3681 11.2302 11.0666 10.3002C11.2325 10.0794 11.1879 9.76598 10.9671 9.60013C10.7463 9.43429 10.4329 9.47884 10.2671 9.69963C9.74929 10.3889 8.92657 10.8333 7.99993 10.8333C7.07329 10.8333 6.25057 10.3889 5.7328 9.69963Z",
|
|
745
745
|
fill: "currentColor",
|
|
746
746
|
fillOpacity: "0.8"
|
|
747
747
|
}),
|
|
748
|
-
/* @__PURE__ */
|
|
748
|
+
/* @__PURE__ */ n("path", {
|
|
749
749
|
d: "M6.66668 6.66658C6.66668 7.03478 6.3682 7.33325 6.00001 7.33325C5.63182 7.33325 5.33334 7.03478 5.33334 6.66658C5.33334 6.29839 5.63182 5.99992 6.00001 5.99992C6.3682 5.99992 6.66668 6.29839 6.66668 6.66658Z",
|
|
750
750
|
fill: "currentColor",
|
|
751
751
|
fillOpacity: "0.8"
|
|
752
752
|
}),
|
|
753
|
-
/* @__PURE__ */
|
|
753
|
+
/* @__PURE__ */ n("path", {
|
|
754
754
|
d: "M10 7.33325C10.3682 7.33325 10.6667 7.03478 10.6667 6.66658C10.6667 6.29839 10.3682 5.99992 10 5.99992C9.63182 5.99992 9.33334 6.29839 9.33334 6.66658C9.33334 7.03478 9.63182 7.33325 10 7.33325Z",
|
|
755
755
|
fill: "currentColor",
|
|
756
756
|
fillOpacity: "0.8"
|
|
757
757
|
}),
|
|
758
|
-
/* @__PURE__ */
|
|
758
|
+
/* @__PURE__ */ n("path", {
|
|
759
759
|
fillRule: "evenodd",
|
|
760
760
|
clipRule: "evenodd",
|
|
761
761
|
d: "M8.00001 0.833252C4.04197 0.833252 0.833344 4.04188 0.833344 7.99992C0.833344 11.958 4.04197 15.1666 8.00001 15.1666C11.9581 15.1666 15.1667 11.958 15.1667 7.99992C15.1667 4.04188 11.9581 0.833252 8.00001 0.833252ZM14.1667 7.99992C14.1667 11.4057 11.4058 14.1666 8.00001 14.1666C4.59425 14.1666 1.83334 11.4057 1.83334 7.99992C1.83334 4.59416 4.59425 1.83325 8.00001 1.83325C11.4058 1.83325 14.1667 4.59416 14.1667 7.99992Z",
|
|
@@ -763,144 +763,144 @@ var ar = (e) => {
|
|
|
763
763
|
fillOpacity: "0.8"
|
|
764
764
|
})
|
|
765
765
|
]
|
|
766
|
-
}),
|
|
766
|
+
}), Kn = {
|
|
767
767
|
pinnedNumber: {
|
|
768
|
-
icon:
|
|
768
|
+
icon: Hn,
|
|
769
769
|
labelKey: "graph.annotations.baseMenu.unpinNumber"
|
|
770
770
|
},
|
|
771
771
|
comment: {
|
|
772
|
-
icon:
|
|
772
|
+
icon: kn,
|
|
773
773
|
labelKey: "graph.annotations.baseMenu.removeAnnotation"
|
|
774
774
|
},
|
|
775
775
|
sticker: {
|
|
776
|
-
icon:
|
|
776
|
+
icon: Vn,
|
|
777
777
|
labelKey: "graph.annotations.baseMenu.removeSticker"
|
|
778
778
|
},
|
|
779
779
|
image: null
|
|
780
|
-
},
|
|
781
|
-
const
|
|
782
|
-
|
|
780
|
+
}, Fa = (e) => $r(e.kind) && Kn[e.kind] !== null, Ha = ({ attachment: e, onRequestClose: t }) => {
|
|
781
|
+
const i = T(), { dispatch: r } = J(), { icon: a, labelKey: o } = Kn[e.kind], l = () => {
|
|
782
|
+
r(new Re({ id: e.annotation.id })), t();
|
|
783
783
|
};
|
|
784
|
-
return /* @__PURE__ */ p(
|
|
785
|
-
className:
|
|
784
|
+
return /* @__PURE__ */ p(k.Item, {
|
|
785
|
+
className: ee,
|
|
786
786
|
onClick: l,
|
|
787
|
-
children: [/* @__PURE__ */
|
|
788
|
-
className:
|
|
789
|
-
children:
|
|
787
|
+
children: [/* @__PURE__ */ n(Fn, { children: /* @__PURE__ */ n(a, {}) }), /* @__PURE__ */ n("span", {
|
|
788
|
+
className: ne,
|
|
789
|
+
children: i(o)
|
|
790
790
|
})]
|
|
791
791
|
});
|
|
792
|
-
},
|
|
793
|
-
const { dispatch:
|
|
794
|
-
|
|
792
|
+
}, Va = "ceeojg0", Ka = "ceeojg1", Ga = "ceeojg2", Ba = ({ label: e, at: t, onRequestClose: i }) => {
|
|
793
|
+
const { dispatch: r } = J(), a = (o) => {
|
|
794
|
+
r(new ye({
|
|
795
795
|
kind: "sticker",
|
|
796
796
|
annotation: {
|
|
797
797
|
at: {
|
|
798
798
|
anchorType: "observation",
|
|
799
|
-
...
|
|
799
|
+
...t
|
|
800
800
|
},
|
|
801
|
-
sticker:
|
|
801
|
+
sticker: o
|
|
802
802
|
}
|
|
803
|
-
})),
|
|
803
|
+
})), i();
|
|
804
804
|
};
|
|
805
|
-
return /* @__PURE__ */
|
|
805
|
+
return /* @__PURE__ */ n(He, {
|
|
806
806
|
label: e,
|
|
807
|
-
icon: /* @__PURE__ */
|
|
808
|
-
children: /* @__PURE__ */
|
|
809
|
-
className:
|
|
810
|
-
children: Object.entries(
|
|
811
|
-
className:
|
|
812
|
-
"aria-label":
|
|
813
|
-
onClick: () => a(
|
|
814
|
-
children: /* @__PURE__ */
|
|
815
|
-
className:
|
|
807
|
+
icon: /* @__PURE__ */ n(Vn, {}),
|
|
808
|
+
children: /* @__PURE__ */ n("div", {
|
|
809
|
+
className: Va,
|
|
810
|
+
children: Object.entries(Mt).map(([o, l]) => /* @__PURE__ */ n(j.Item, {
|
|
811
|
+
className: Ka,
|
|
812
|
+
"aria-label": o,
|
|
813
|
+
onClick: () => a(o),
|
|
814
|
+
children: /* @__PURE__ */ n("img", {
|
|
815
|
+
className: Ga,
|
|
816
816
|
src: l.src,
|
|
817
|
-
alt:
|
|
817
|
+
alt: o
|
|
818
818
|
})
|
|
819
|
-
},
|
|
819
|
+
}, o))
|
|
820
820
|
})
|
|
821
821
|
});
|
|
822
|
-
},
|
|
823
|
-
const
|
|
824
|
-
if (e.kind !== "menu" ||
|
|
822
|
+
}, Ua = ({ interaction: e, panelOrigin: t }) => {
|
|
823
|
+
const i = W(), r = ve((o) => o.menuTrigger);
|
|
824
|
+
if (e.kind !== "menu" || r === null) return null;
|
|
825
825
|
const a = () => {
|
|
826
|
-
|
|
826
|
+
i.getState().releaseInteraction("menu");
|
|
827
827
|
};
|
|
828
|
-
return /* @__PURE__ */
|
|
828
|
+
return /* @__PURE__ */ n(qa, {
|
|
829
829
|
trigger: {
|
|
830
|
-
x:
|
|
831
|
-
y:
|
|
832
|
-
radius:
|
|
830
|
+
x: t.x + r.center.x,
|
|
831
|
+
y: t.y + r.center.y,
|
|
832
|
+
radius: r.radius
|
|
833
833
|
},
|
|
834
834
|
layer: e.anchor.layer,
|
|
835
835
|
at: e.anchor.at,
|
|
836
836
|
observation: e.anchor.observation,
|
|
837
837
|
onClose: a
|
|
838
838
|
});
|
|
839
|
-
},
|
|
840
|
-
const
|
|
841
|
-
|
|
839
|
+
}, qa = ({ trigger: e, layer: t, at: i, observation: r, onClose: a }) => {
|
|
840
|
+
const o = T(), l = Fe(), c = G((f) => f.spec.annotations), s = G((f) => f.config.parsingLocale), u = $a(), { x: d, y: h, radius: v } = e, m = O(() => Wa(d, h, v), [
|
|
841
|
+
d,
|
|
842
842
|
h,
|
|
843
843
|
v
|
|
844
|
-
]), g =
|
|
845
|
-
!f &&
|
|
844
|
+
]), g = Kr(c, i, O(() => zr(t, s), [t, s])), y = g !== null && Fa(g) ? g : null, I = Da(t, r), S = (f, P) => {
|
|
845
|
+
!f && Za(P.reason) && a();
|
|
846
846
|
};
|
|
847
|
-
return /* @__PURE__ */
|
|
848
|
-
open:
|
|
847
|
+
return /* @__PURE__ */ n(k.Root, {
|
|
848
|
+
open: u,
|
|
849
849
|
modal: !1,
|
|
850
|
-
onOpenChange:
|
|
851
|
-
children: /* @__PURE__ */
|
|
850
|
+
onOpenChange: S,
|
|
851
|
+
children: /* @__PURE__ */ n(k.Portal, {
|
|
852
852
|
container: l,
|
|
853
|
-
children: /* @__PURE__ */
|
|
853
|
+
children: /* @__PURE__ */ n(he, { children: /* @__PURE__ */ n(k.Positioner, {
|
|
854
854
|
anchor: m,
|
|
855
855
|
side: "right",
|
|
856
856
|
align: "start",
|
|
857
857
|
sideOffset: 8,
|
|
858
|
-
className:
|
|
859
|
-
...
|
|
860
|
-
children: /* @__PURE__ */ p(
|
|
861
|
-
className:
|
|
858
|
+
className: Mn,
|
|
859
|
+
...On,
|
|
860
|
+
children: /* @__PURE__ */ p(k.Popup, {
|
|
861
|
+
className: Rn,
|
|
862
862
|
"data-testid": "observation-menu",
|
|
863
863
|
children: [
|
|
864
|
-
|
|
865
|
-
attachment:
|
|
864
|
+
y !== null && /* @__PURE__ */ n(Ha, {
|
|
865
|
+
attachment: y,
|
|
866
866
|
onRequestClose: a
|
|
867
867
|
}),
|
|
868
|
-
/* @__PURE__ */
|
|
869
|
-
label:
|
|
870
|
-
highlights:
|
|
868
|
+
/* @__PURE__ */ n(Ra, {
|
|
869
|
+
label: o("graph.annotations.baseMenu.removeHighlight"),
|
|
870
|
+
highlights: I,
|
|
871
871
|
onRequestClose: a
|
|
872
872
|
}),
|
|
873
|
-
/* @__PURE__ */
|
|
874
|
-
|
|
875
|
-
/* @__PURE__ */
|
|
876
|
-
label:
|
|
877
|
-
at:
|
|
873
|
+
/* @__PURE__ */ n(k.Separator, { className: la }),
|
|
874
|
+
y === null && /* @__PURE__ */ p(q, { children: [
|
|
875
|
+
/* @__PURE__ */ n(za, {
|
|
876
|
+
label: o("graph.annotations.baseMenu.pinNumber"),
|
|
877
|
+
at: i,
|
|
878
878
|
onRequestClose: a
|
|
879
879
|
}),
|
|
880
|
-
/* @__PURE__ */
|
|
881
|
-
label:
|
|
882
|
-
placeholder:
|
|
883
|
-
addLabel:
|
|
884
|
-
at:
|
|
880
|
+
/* @__PURE__ */ n(pa, {
|
|
881
|
+
label: o("graph.annotations.baseMenu.annotate"),
|
|
882
|
+
placeholder: o("graph.annotations.textMenu.placeholder"),
|
|
883
|
+
addLabel: o("graph.annotations.textMenu.addButton"),
|
|
884
|
+
at: i,
|
|
885
885
|
onRequestClose: a
|
|
886
886
|
}),
|
|
887
|
-
/* @__PURE__ */
|
|
888
|
-
label:
|
|
889
|
-
at:
|
|
887
|
+
/* @__PURE__ */ n(Ba, {
|
|
888
|
+
label: o("graph.annotations.baseMenu.addSticker"),
|
|
889
|
+
at: i,
|
|
890
890
|
onRequestClose: a
|
|
891
891
|
})
|
|
892
892
|
] }),
|
|
893
|
-
|
|
894
|
-
label:
|
|
895
|
-
layer:
|
|
896
|
-
observation:
|
|
897
|
-
highlights:
|
|
893
|
+
t.highlight !== null && /* @__PURE__ */ n(_a, {
|
|
894
|
+
label: o("graph.annotations.baseMenu.highlight"),
|
|
895
|
+
layer: t,
|
|
896
|
+
observation: r,
|
|
897
|
+
highlights: I,
|
|
898
898
|
onRequestClose: a
|
|
899
899
|
}),
|
|
900
|
-
/* @__PURE__ */
|
|
901
|
-
label:
|
|
902
|
-
layer:
|
|
903
|
-
at:
|
|
900
|
+
/* @__PURE__ */ n(ba, {
|
|
901
|
+
label: o("graph.annotations.baseMenu.differenceArrow"),
|
|
902
|
+
layer: t,
|
|
903
|
+
at: i,
|
|
904
904
|
onRequestClose: a
|
|
905
905
|
})
|
|
906
906
|
]
|
|
@@ -908,28 +908,28 @@ var ar = (e) => {
|
|
|
908
908
|
}) })
|
|
909
909
|
})
|
|
910
910
|
});
|
|
911
|
-
},
|
|
912
|
-
const [e,
|
|
913
|
-
return
|
|
914
|
-
|
|
911
|
+
}, Wa = (e, t, i) => ({ getBoundingClientRect: () => new DOMRect(e - i, t - i, i * 2, i * 2) }), $a = () => {
|
|
912
|
+
const [e, t] = $(!1);
|
|
913
|
+
return z(() => {
|
|
914
|
+
t(!0);
|
|
915
915
|
}, []), e;
|
|
916
|
-
},
|
|
917
|
-
const e =
|
|
918
|
-
return
|
|
919
|
-
},
|
|
916
|
+
}, Za = (e) => e === "outside-press" || e === "escape-key" || e === "item-press", Xa = () => {
|
|
917
|
+
const e = Sn();
|
|
918
|
+
return Gn(e);
|
|
919
|
+
}, Gn = (e) => {
|
|
920
920
|
if (e.length !== 1) return null;
|
|
921
|
-
const [
|
|
922
|
-
return
|
|
923
|
-
},
|
|
921
|
+
const [t] = e;
|
|
922
|
+
return t?.kind === "annotation" ? t.id : null;
|
|
923
|
+
}, ja = (e) => /* @__PURE__ */ n(M, {
|
|
924
924
|
...e,
|
|
925
925
|
children: /* @__PURE__ */ p("g", {
|
|
926
926
|
stroke: "currentColor",
|
|
927
927
|
strokeWidth: 2,
|
|
928
928
|
strokeLinecap: "round",
|
|
929
929
|
strokeLinejoin: "round",
|
|
930
|
-
children: [/* @__PURE__ */
|
|
930
|
+
children: [/* @__PURE__ */ n("path", { d: "M4 9h16m-4-4 4 4" }), /* @__PURE__ */ n("path", { d: "M20 15H4m4 4-4-4" })]
|
|
931
931
|
})
|
|
932
|
-
}),
|
|
932
|
+
}), Ya = (e) => /* @__PURE__ */ n(M, {
|
|
933
933
|
...e,
|
|
934
934
|
children: /* @__PURE__ */ p("g", {
|
|
935
935
|
stroke: "currentColor",
|
|
@@ -937,49 +937,49 @@ var ar = (e) => {
|
|
|
937
937
|
strokeLinecap: "round",
|
|
938
938
|
strokeLinejoin: "round",
|
|
939
939
|
children: [
|
|
940
|
-
/* @__PURE__ */
|
|
941
|
-
/* @__PURE__ */
|
|
942
|
-
/* @__PURE__ */
|
|
943
|
-
/* @__PURE__ */
|
|
940
|
+
/* @__PURE__ */ n("path", { d: "M4 7h16" }),
|
|
941
|
+
/* @__PURE__ */ n("path", { d: "M10 11v6M14 11v6" }),
|
|
942
|
+
/* @__PURE__ */ n("path", { d: "M6 7l1 12a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-12" }),
|
|
943
|
+
/* @__PURE__ */ n("path", { d: "M9 7V5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2" })
|
|
944
944
|
]
|
|
945
945
|
})
|
|
946
|
-
}),
|
|
947
|
-
var
|
|
948
|
-
var
|
|
946
|
+
}), Qa = { kind: "chrome-popup" }, Ja = "var(--q7gcrz0)", eo = "var(--q7gcrz1)", no = "q7gcrz2", to = "q7gcrz3";
|
|
947
|
+
var ro = "q7gcrz5", ao = "q7gcrz6", oo = "q7gcrz7", io = "q7gcrz8", Bn = "q7gcrz9", lo = "q7gcrza";
|
|
948
|
+
var Je = "q7gcrzd q7gcrzc", Un = "q7gcrze q7gcrzc", so = [
|
|
949
949
|
"absolute-difference",
|
|
950
950
|
"relative-difference",
|
|
951
951
|
"proportion"
|
|
952
|
-
],
|
|
952
|
+
], en = ["absolute-difference", "relative-difference"], co = ["relative-difference", "proportion"], ho = {
|
|
953
953
|
"absolute-difference": "graph.annotations.differenceArrowToolbar.labelKind.absoluteDifference",
|
|
954
954
|
"relative-difference": "graph.annotations.differenceArrowToolbar.labelKind.relativeDifference",
|
|
955
955
|
proportion: "graph.annotations.differenceArrowToolbar.labelKind.proportion"
|
|
956
|
-
},
|
|
957
|
-
const { formattingLocale:
|
|
958
|
-
return
|
|
959
|
-
const a =
|
|
960
|
-
return
|
|
961
|
-
kind:
|
|
962
|
-
nameKey:
|
|
963
|
-
preview:
|
|
964
|
-
locale:
|
|
965
|
-
kind:
|
|
956
|
+
}, uo = (e) => {
|
|
957
|
+
const { formattingLocale: t } = B(), i = G((a) => a.config.parsingLocale), r = t ?? i;
|
|
958
|
+
return O(() => {
|
|
959
|
+
const a = Or(e.start, e.end);
|
|
960
|
+
return so.filter((o) => a || !en.includes(o) || o === e.label).map((o) => ({
|
|
961
|
+
kind: o,
|
|
962
|
+
nameKey: ho[o],
|
|
963
|
+
preview: Br({
|
|
964
|
+
locale: r,
|
|
965
|
+
kind: o,
|
|
966
966
|
startValue: e.start.measurementValue,
|
|
967
967
|
endValue: e.end.measurementValue,
|
|
968
968
|
valueFormat: e.start.valueFormat
|
|
969
969
|
}),
|
|
970
|
-
isPickable: a || !
|
|
971
|
-
isSuspect:
|
|
970
|
+
isPickable: a || !en.includes(o),
|
|
971
|
+
isSuspect: co.includes(o) && e.start.measurementValue === 0
|
|
972
972
|
}));
|
|
973
|
-
}, [e,
|
|
974
|
-
},
|
|
975
|
-
const a =
|
|
973
|
+
}, [e, r]);
|
|
974
|
+
}, ie = 8, mo = ({ labelBox: e, panelRect: t, frameWidth: i, frameHeight: r }) => {
|
|
975
|
+
const a = t.y + e.y, o = a + e.height, l = a - 8 - 36, c = o + 8, s = po(ie, l >= ie ? l : c, r - ie - 36), u = ie;
|
|
976
976
|
return {
|
|
977
977
|
top: s,
|
|
978
|
-
left:
|
|
979
|
-
available: Math.max(0,
|
|
980
|
-
centre:
|
|
978
|
+
left: u,
|
|
979
|
+
available: Math.max(0, i - ie * 2),
|
|
980
|
+
centre: t.x + e.x + e.width / 2 - u
|
|
981
981
|
};
|
|
982
|
-
},
|
|
982
|
+
}, po = (e, t, i) => Math.max(e, Math.min(t, i)), xe = [
|
|
983
983
|
{
|
|
984
984
|
id: "small",
|
|
985
985
|
nameKey: "graph.annotations.differenceArrowToolbar.size.small"
|
|
@@ -992,93 +992,93 @@ var Ke = "q7gcrzd q7gcrzc", yt = "q7gcrze q7gcrzc", $r = [
|
|
|
992
992
|
id: "large",
|
|
993
993
|
nameKey: "graph.annotations.differenceArrowToolbar.size.large"
|
|
994
994
|
}
|
|
995
|
-
],
|
|
996
|
-
const l =
|
|
997
|
-
labelBox:
|
|
998
|
-
panelRect:
|
|
999
|
-
frameWidth:
|
|
995
|
+
], go = ({ arrow: e, labelBox: t, panelRect: i, frameWidth: r, frameHeight: a, frameElement: o }) => {
|
|
996
|
+
const l = T(), { chartId: c, commands: s } = B(), u = W(), [d, h] = $(null), v = uo(e), m = mo({
|
|
997
|
+
labelBox: t,
|
|
998
|
+
panelRect: i,
|
|
999
|
+
frameWidth: r,
|
|
1000
1000
|
frameHeight: a
|
|
1001
|
-
}), g = (
|
|
1002
|
-
s.dispatch(new
|
|
1001
|
+
}), g = (S, f) => {
|
|
1002
|
+
s.dispatch(new wn({
|
|
1003
1003
|
kind: "differenceArrow",
|
|
1004
1004
|
id: e.id,
|
|
1005
|
-
patch:
|
|
1005
|
+
patch: S
|
|
1006
1006
|
}), f);
|
|
1007
1007
|
};
|
|
1008
|
-
|
|
1009
|
-
const { claimInteraction:
|
|
1010
|
-
return
|
|
1011
|
-
}, [
|
|
1012
|
-
const
|
|
1013
|
-
h(
|
|
1014
|
-
},
|
|
1015
|
-
s.dispatch(new
|
|
1008
|
+
z(() => () => s.seal(), [s]), z(() => {
|
|
1009
|
+
const { claimInteraction: S, releaseInteraction: f } = u.getState();
|
|
1010
|
+
return d === null ? f("chrome-popup") : S(Qa), () => f("chrome-popup");
|
|
1011
|
+
}, [u, d]);
|
|
1012
|
+
const y = (S) => {
|
|
1013
|
+
h(S ? "color" : null), S || s.seal();
|
|
1014
|
+
}, I = () => {
|
|
1015
|
+
s.dispatch(new Re({ id: e.id })), o.focus({ preventScroll: !0 });
|
|
1016
1016
|
};
|
|
1017
|
-
return /* @__PURE__ */
|
|
1018
|
-
className:
|
|
1017
|
+
return /* @__PURE__ */ n("div", {
|
|
1018
|
+
className: no,
|
|
1019
1019
|
style: {
|
|
1020
1020
|
top: m.top,
|
|
1021
1021
|
left: m.left,
|
|
1022
1022
|
width: m.available
|
|
1023
1023
|
},
|
|
1024
|
-
children: /* @__PURE__ */ p(
|
|
1024
|
+
children: /* @__PURE__ */ p(X.Root, {
|
|
1025
1025
|
"aria-label": l("graph.annotations.differenceArrowToolbar.label"),
|
|
1026
|
-
className:
|
|
1026
|
+
className: to,
|
|
1027
1027
|
"data-testid": "difference-arrow-toolbar",
|
|
1028
|
-
...
|
|
1029
|
-
style:
|
|
1030
|
-
[
|
|
1031
|
-
[
|
|
1028
|
+
...Ce(c),
|
|
1029
|
+
style: An({
|
|
1030
|
+
[Ja]: `${m.centre}px`,
|
|
1031
|
+
[eo]: `${m.available}px`
|
|
1032
1032
|
}),
|
|
1033
1033
|
children: [
|
|
1034
|
-
/* @__PURE__ */
|
|
1034
|
+
/* @__PURE__ */ n(vo, {
|
|
1035
1035
|
options: v,
|
|
1036
1036
|
current: e.label,
|
|
1037
|
-
isOpen:
|
|
1038
|
-
onOpenChange: (
|
|
1039
|
-
onPick: (
|
|
1040
|
-
g({ label:
|
|
1037
|
+
isOpen: d === "labelKind",
|
|
1038
|
+
onOpenChange: (S) => h(S ? "labelKind" : null),
|
|
1039
|
+
onPick: (S) => {
|
|
1040
|
+
g({ label: S }), h(null);
|
|
1041
1041
|
}
|
|
1042
1042
|
}),
|
|
1043
|
-
/* @__PURE__ */
|
|
1044
|
-
/* @__PURE__ */
|
|
1043
|
+
/* @__PURE__ */ n(X.Separator, {}),
|
|
1044
|
+
/* @__PURE__ */ n(X.ColorPicker, {
|
|
1045
1045
|
color: e.color,
|
|
1046
1046
|
label: l("graph.annotations.differenceArrowToolbar.color"),
|
|
1047
|
-
onChange: (
|
|
1048
|
-
isOpen:
|
|
1049
|
-
onOpenChange:
|
|
1050
|
-
popupAttributes:
|
|
1051
|
-
children: /* @__PURE__ */
|
|
1052
|
-
className:
|
|
1047
|
+
onChange: (S) => g({ color: S }, { transient: !0 }),
|
|
1048
|
+
isOpen: d === "color",
|
|
1049
|
+
onOpenChange: y,
|
|
1050
|
+
popupAttributes: Ce(c),
|
|
1051
|
+
children: /* @__PURE__ */ n("span", {
|
|
1052
|
+
className: ao,
|
|
1053
1053
|
style: { background: e.color ?? "transparent" }
|
|
1054
1054
|
})
|
|
1055
1055
|
}),
|
|
1056
|
-
/* @__PURE__ */
|
|
1056
|
+
/* @__PURE__ */ n(fo, {
|
|
1057
1057
|
current: e.size,
|
|
1058
|
-
isOpen:
|
|
1059
|
-
onOpenChange: (
|
|
1060
|
-
onPick: (
|
|
1061
|
-
g({ size:
|
|
1058
|
+
isOpen: d === "size",
|
|
1059
|
+
onOpenChange: (S) => h(S ? "size" : null),
|
|
1060
|
+
onPick: (S) => {
|
|
1061
|
+
g({ size: S }), h(null);
|
|
1062
1062
|
}
|
|
1063
1063
|
}),
|
|
1064
|
-
/* @__PURE__ */
|
|
1065
|
-
/* @__PURE__ */
|
|
1064
|
+
/* @__PURE__ */ n(X.Separator, {}),
|
|
1065
|
+
/* @__PURE__ */ n(X.Button, {
|
|
1066
1066
|
"aria-label": l("graph.annotations.differenceArrowToolbar.swap"),
|
|
1067
|
-
className:
|
|
1067
|
+
className: Je,
|
|
1068
1068
|
onClick: () => g({
|
|
1069
1069
|
start: e.end.anchor,
|
|
1070
1070
|
end: e.start.anchor
|
|
1071
1071
|
}),
|
|
1072
|
-
children: /* @__PURE__ */
|
|
1072
|
+
children: /* @__PURE__ */ n(ja, {
|
|
1073
1073
|
size: "sm",
|
|
1074
1074
|
title: ""
|
|
1075
1075
|
})
|
|
1076
1076
|
}),
|
|
1077
|
-
/* @__PURE__ */
|
|
1077
|
+
/* @__PURE__ */ n(X.Button, {
|
|
1078
1078
|
"aria-label": l("graph.annotations.differenceArrowToolbar.remove"),
|
|
1079
|
-
className:
|
|
1080
|
-
onClick:
|
|
1081
|
-
children: /* @__PURE__ */
|
|
1079
|
+
className: Je,
|
|
1080
|
+
onClick: I,
|
|
1081
|
+
children: /* @__PURE__ */ n(Ya, {
|
|
1082
1082
|
size: "sm",
|
|
1083
1083
|
title: ""
|
|
1084
1084
|
})
|
|
@@ -1086,22 +1086,22 @@ var Ke = "q7gcrzd q7gcrzc", yt = "q7gcrze q7gcrzc", $r = [
|
|
|
1086
1086
|
]
|
|
1087
1087
|
})
|
|
1088
1088
|
});
|
|
1089
|
-
},
|
|
1090
|
-
const
|
|
1091
|
-
return /* @__PURE__ */ p(
|
|
1092
|
-
open:
|
|
1089
|
+
}, vo = ({ options: e, current: t, isOpen: i, onOpenChange: r, onPick: a }) => {
|
|
1090
|
+
const o = T(), l = e.find((s) => s.kind === t), c = e.some((s) => s.isPickable && s.kind !== t);
|
|
1091
|
+
return /* @__PURE__ */ p(k.Root, {
|
|
1092
|
+
open: i,
|
|
1093
1093
|
modal: !1,
|
|
1094
|
-
onOpenChange:
|
|
1095
|
-
children: [/* @__PURE__ */ p(
|
|
1096
|
-
render: /* @__PURE__ */
|
|
1097
|
-
"aria-label":
|
|
1098
|
-
className:
|
|
1094
|
+
onOpenChange: r,
|
|
1095
|
+
children: [/* @__PURE__ */ p(k.Trigger, {
|
|
1096
|
+
render: /* @__PURE__ */ n(X.Button, {}),
|
|
1097
|
+
"aria-label": o("graph.annotations.differenceArrowToolbar.labelKind.ariaLabel"),
|
|
1098
|
+
className: Un,
|
|
1099
1099
|
disabled: !c,
|
|
1100
1100
|
onMouseDown: (s) => s.preventDefault(),
|
|
1101
1101
|
children: [
|
|
1102
|
-
/* @__PURE__ */
|
|
1103
|
-
className:
|
|
1104
|
-
children: l === void 0 ? "" :
|
|
1102
|
+
/* @__PURE__ */ n("span", {
|
|
1103
|
+
className: ro,
|
|
1104
|
+
children: l === void 0 ? "" : o(l.nameKey)
|
|
1105
1105
|
}),
|
|
1106
1106
|
l !== void 0 && /* @__PURE__ */ p("span", {
|
|
1107
1107
|
className: "q7gcrz4",
|
|
@@ -1111,176 +1111,176 @@ var Ke = "q7gcrzd q7gcrzc", yt = "q7gcrze q7gcrzc", $r = [
|
|
|
1111
1111
|
")"
|
|
1112
1112
|
]
|
|
1113
1113
|
}),
|
|
1114
|
-
/* @__PURE__ */
|
|
1114
|
+
/* @__PURE__ */ n(Se, { size: "sm" })
|
|
1115
1115
|
]
|
|
1116
|
-
}), /* @__PURE__ */
|
|
1117
|
-
className:
|
|
1118
|
-
"data-selected": s.kind ===
|
|
1116
|
+
}), /* @__PURE__ */ n(qn, { children: e.map((s) => /* @__PURE__ */ p(k.Item, {
|
|
1117
|
+
className: Bn,
|
|
1118
|
+
"data-selected": s.kind === t,
|
|
1119
1119
|
disabled: !s.isPickable,
|
|
1120
1120
|
onClick: () => a(s.kind),
|
|
1121
1121
|
children: [
|
|
1122
|
-
/* @__PURE__ */
|
|
1123
|
-
(s.isSuspect || !s.isPickable) && /* @__PURE__ */
|
|
1124
|
-
"aria-label":
|
|
1122
|
+
/* @__PURE__ */ n("span", { children: o(s.nameKey) }),
|
|
1123
|
+
(s.isSuspect || !s.isPickable) && /* @__PURE__ */ n("span", {
|
|
1124
|
+
"aria-label": o(s.isPickable ? "graph.annotations.differenceArrowToolbar.labelKind.suspectValue" : "graph.annotations.differenceArrowToolbar.labelKind.incomparableEnds"),
|
|
1125
1125
|
className: "q7gcrzb",
|
|
1126
1126
|
role: "img",
|
|
1127
1127
|
children: "⚠"
|
|
1128
1128
|
}),
|
|
1129
|
-
/* @__PURE__ */
|
|
1130
|
-
className:
|
|
1129
|
+
/* @__PURE__ */ n("span", {
|
|
1130
|
+
className: lo,
|
|
1131
1131
|
children: s.preview
|
|
1132
1132
|
})
|
|
1133
1133
|
]
|
|
1134
1134
|
}, s.kind)) })]
|
|
1135
1135
|
});
|
|
1136
|
-
},
|
|
1137
|
-
const a =
|
|
1138
|
-
return /* @__PURE__ */ p(
|
|
1139
|
-
open:
|
|
1136
|
+
}, fo = ({ current: e, isOpen: t, onOpenChange: i, onPick: r }) => {
|
|
1137
|
+
const a = T(), o = xe.find((l) => l.id === e) ?? xe[0];
|
|
1138
|
+
return /* @__PURE__ */ p(k.Root, {
|
|
1139
|
+
open: t,
|
|
1140
1140
|
modal: !1,
|
|
1141
|
-
onOpenChange:
|
|
1142
|
-
children: [/* @__PURE__ */ p(
|
|
1143
|
-
render: /* @__PURE__ */
|
|
1141
|
+
onOpenChange: i,
|
|
1142
|
+
children: [/* @__PURE__ */ p(k.Trigger, {
|
|
1143
|
+
render: /* @__PURE__ */ n(X.Button, {}),
|
|
1144
1144
|
"aria-label": a("graph.annotations.differenceArrowToolbar.size.ariaLabel"),
|
|
1145
|
-
className:
|
|
1145
|
+
className: Un,
|
|
1146
1146
|
onMouseDown: (l) => l.preventDefault(),
|
|
1147
|
-
children: [/* @__PURE__ */
|
|
1148
|
-
}), /* @__PURE__ */
|
|
1149
|
-
className:
|
|
1147
|
+
children: [/* @__PURE__ */ n("span", { children: o === void 0 ? "" : a(o.nameKey) }), /* @__PURE__ */ n(Se, { size: "sm" })]
|
|
1148
|
+
}), /* @__PURE__ */ n(qn, { children: xe.map((l) => /* @__PURE__ */ n(k.Item, {
|
|
1149
|
+
className: Bn,
|
|
1150
1150
|
"data-selected": l.id === e,
|
|
1151
|
-
onClick: () =>
|
|
1151
|
+
onClick: () => r(l.id),
|
|
1152
1152
|
children: a(l.nameKey)
|
|
1153
1153
|
}, l.id)) })]
|
|
1154
1154
|
});
|
|
1155
|
-
},
|
|
1156
|
-
const { chartId:
|
|
1157
|
-
return /* @__PURE__ */
|
|
1158
|
-
container:
|
|
1159
|
-
children: /* @__PURE__ */
|
|
1155
|
+
}, qn = ({ children: e }) => {
|
|
1156
|
+
const { chartId: t } = B();
|
|
1157
|
+
return /* @__PURE__ */ n(k.Portal, {
|
|
1158
|
+
container: ke(),
|
|
1159
|
+
children: /* @__PURE__ */ n(he, { children: /* @__PURE__ */ n(k.Positioner, {
|
|
1160
1160
|
side: "bottom",
|
|
1161
1161
|
align: "start",
|
|
1162
1162
|
sideOffset: 6,
|
|
1163
|
-
className:
|
|
1164
|
-
children: /* @__PURE__ */
|
|
1165
|
-
className:
|
|
1166
|
-
onMouseDown: (
|
|
1167
|
-
...
|
|
1163
|
+
className: oo,
|
|
1164
|
+
children: /* @__PURE__ */ n(k.Popup, {
|
|
1165
|
+
className: io,
|
|
1166
|
+
onMouseDown: (i) => i.preventDefault(),
|
|
1167
|
+
...Ce(t),
|
|
1168
1168
|
children: e
|
|
1169
1169
|
})
|
|
1170
1170
|
}) })
|
|
1171
1171
|
});
|
|
1172
1172
|
};
|
|
1173
|
-
var
|
|
1174
|
-
|
|
1173
|
+
var bo = "ydgo3h0", Co = "ydgo3h1", So = "ydgo3h2", Wn = (e) => e === "start" ? "end" : "start", $n = ({ dispatch: e, arrow: t, endpoint: i, anchor: r }) => {
|
|
1174
|
+
Pn(r, t[i].anchor) || e(new wn({
|
|
1175
1175
|
kind: "differenceArrow",
|
|
1176
|
-
id:
|
|
1177
|
-
patch: { [
|
|
1176
|
+
id: t.id,
|
|
1177
|
+
patch: { [i]: r }
|
|
1178
1178
|
}));
|
|
1179
|
-
},
|
|
1180
|
-
const
|
|
1181
|
-
x: e.x -
|
|
1182
|
-
y: e.y -
|
|
1183
|
-
},
|
|
1184
|
-
if (
|
|
1185
|
-
const h = a.find((m) => m.id ===
|
|
1179
|
+
}, yo = ({ clientPoint: e, panelOrigin: t, panelRect: i, engine: r, layers: a, coordSystem: o, resolver: l, fixedAnchor: c, align: s }) => {
|
|
1180
|
+
const u = wo({
|
|
1181
|
+
x: e.x - t.x,
|
|
1182
|
+
y: e.y - t.y
|
|
1183
|
+
}, i), { primary: d } = r.query(De(u, i));
|
|
1184
|
+
if (d === null) return null;
|
|
1185
|
+
const h = a.find((m) => m.id === d.layerId);
|
|
1186
1186
|
if (h === void 0) return null;
|
|
1187
|
-
const v =
|
|
1187
|
+
const v = Ne({
|
|
1188
1188
|
resolver: l,
|
|
1189
1189
|
layer: h,
|
|
1190
|
-
observation:
|
|
1191
|
-
coordSystem:
|
|
1190
|
+
observation: d.observation,
|
|
1191
|
+
coordSystem: o,
|
|
1192
1192
|
align: s
|
|
1193
1193
|
});
|
|
1194
|
-
return v === null ||
|
|
1195
|
-
},
|
|
1196
|
-
x: Math.max(0, Math.min(e.x,
|
|
1197
|
-
y: Math.max(0, Math.min(e.y,
|
|
1198
|
-
}),
|
|
1194
|
+
return v === null || Pn(v.anchor, c) ? null : v;
|
|
1195
|
+
}, wo = (e, t) => ({
|
|
1196
|
+
x: Math.max(0, Math.min(e.x, t.width)),
|
|
1197
|
+
y: Math.max(0, Math.min(e.y, t.height))
|
|
1198
|
+
}), Po = class {
|
|
1199
1199
|
constructor(e) {
|
|
1200
|
-
this.params = e, this.listeners = new AbortController(), this.pendingEvent = null, this.scheduledFrame = null, this.hasMoved = !1, this.hasPublished = !1, this.handleMove = (
|
|
1201
|
-
|
|
1202
|
-
}, this.handleUp = (
|
|
1203
|
-
|
|
1204
|
-
}, this.handleLost = (
|
|
1205
|
-
|
|
1200
|
+
this.params = e, this.listeners = new AbortController(), this.pendingEvent = null, this.scheduledFrame = null, this.hasMoved = !1, this.hasPublished = !1, this.handleMove = (t) => {
|
|
1201
|
+
t.pointerId === this.params.pointerId && (this.pendingEvent = t, this.hasMoved = !0, this.scheduledFrame === null && (this.scheduledFrame = requestAnimationFrame(this.runFrame)));
|
|
1202
|
+
}, this.handleUp = (t) => {
|
|
1203
|
+
t.pointerId === this.params.pointerId && (this.pendingEvent = t, this.finish(!0));
|
|
1204
|
+
}, this.handleLost = (t) => {
|
|
1205
|
+
t.pointerId === this.params.pointerId && this.finish(!1);
|
|
1206
1206
|
}, this.runFrame = () => {
|
|
1207
1207
|
this.scheduledFrame = null;
|
|
1208
|
-
const
|
|
1209
|
-
if (this.pendingEvent = null,
|
|
1210
|
-
const { editorStore:
|
|
1211
|
-
if (this.hasPublished &&
|
|
1212
|
-
const m =
|
|
1208
|
+
const t = this.pendingEvent;
|
|
1209
|
+
if (this.pendingEvent = null, t === null) return;
|
|
1210
|
+
const { editorStore: i, engine: r, anchorResolver: a, endpoint: o, readInputs: l } = this.params, { arrow: c, panelOrigin: s, panelRect: u, layers: d, coordSystem: h } = l(), v = i.getState();
|
|
1211
|
+
if (this.hasPublished && Ae(ge(v, "endpoint-drag"), c.id, o) === null) return;
|
|
1212
|
+
const m = yo({
|
|
1213
1213
|
clientPoint: {
|
|
1214
|
-
x:
|
|
1215
|
-
y:
|
|
1214
|
+
x: t.clientX,
|
|
1215
|
+
y: t.clientY
|
|
1216
1216
|
},
|
|
1217
1217
|
panelOrigin: s,
|
|
1218
|
-
panelRect:
|
|
1219
|
-
engine:
|
|
1220
|
-
layers:
|
|
1218
|
+
panelRect: u,
|
|
1219
|
+
engine: r,
|
|
1220
|
+
layers: d,
|
|
1221
1221
|
coordSystem: h,
|
|
1222
1222
|
resolver: a,
|
|
1223
|
-
fixedAnchor: c[
|
|
1224
|
-
align: c[
|
|
1223
|
+
fixedAnchor: c[Wn(o)].anchor,
|
|
1224
|
+
align: c[o].anchor.align
|
|
1225
1225
|
});
|
|
1226
1226
|
m !== null && this.publish(m);
|
|
1227
1227
|
};
|
|
1228
1228
|
}
|
|
1229
1229
|
start() {
|
|
1230
|
-
const { handle: e } = this.params, { signal:
|
|
1231
|
-
e.addEventListener("pointermove", this.handleMove, { signal:
|
|
1230
|
+
const { handle: e } = this.params, { signal: t } = this.listeners;
|
|
1231
|
+
e.addEventListener("pointermove", this.handleMove, { signal: t }), e.addEventListener("pointerup", this.handleUp, { signal: t }), e.addEventListener("lostpointercapture", this.handleLost, { signal: t });
|
|
1232
1232
|
}
|
|
1233
1233
|
finish(e) {
|
|
1234
1234
|
this.params.onSettled(), this.listeners.abort(), this.cancelFrame(), e && this.hasMoved && this.runFrame(), this.pendingEvent = null;
|
|
1235
|
-
const { editorStore:
|
|
1236
|
-
c !== null && (l.releaseInteraction("endpoint-drag"), e &&
|
|
1235
|
+
const { editorStore: t, endpoint: i, readInputs: r, dispatch: a } = this.params, { arrow: o } = r(), l = t.getState(), c = Ae(ge(l, "endpoint-drag"), o.id, i);
|
|
1236
|
+
c !== null && (l.releaseInteraction("endpoint-drag"), e && $n({
|
|
1237
1237
|
dispatch: a,
|
|
1238
|
-
arrow:
|
|
1239
|
-
endpoint:
|
|
1238
|
+
arrow: o,
|
|
1239
|
+
endpoint: i,
|
|
1240
1240
|
anchor: c.point.anchor
|
|
1241
1241
|
}));
|
|
1242
1242
|
}
|
|
1243
1243
|
publish(e) {
|
|
1244
|
-
const { editorStore:
|
|
1245
|
-
|
|
1244
|
+
const { editorStore: t, readInputs: i, endpoint: r } = this.params;
|
|
1245
|
+
t.getState().claimInteraction({
|
|
1246
1246
|
kind: "endpoint-drag",
|
|
1247
|
-
annotationId:
|
|
1248
|
-
endpoint:
|
|
1247
|
+
annotationId: i().arrow.id,
|
|
1248
|
+
endpoint: r,
|
|
1249
1249
|
point: e
|
|
1250
1250
|
}), this.hasPublished = !0;
|
|
1251
1251
|
}
|
|
1252
1252
|
cancelFrame() {
|
|
1253
1253
|
this.scheduledFrame !== null && (cancelAnimationFrame(this.scheduledFrame), this.scheduledFrame = null);
|
|
1254
1254
|
}
|
|
1255
|
-
},
|
|
1256
|
-
const { commands:
|
|
1255
|
+
}, Io = ({ arrow: e, panelOrigin: t, panelRect: i }) => {
|
|
1256
|
+
const { commands: r, anchorResolver: a } = B(), { engine: o } = _e(), l = W(), c = se({
|
|
1257
1257
|
arrow: e,
|
|
1258
|
-
panelOrigin:
|
|
1259
|
-
panelRect:
|
|
1260
|
-
...
|
|
1261
|
-
layers:
|
|
1262
|
-
coordSystem:
|
|
1258
|
+
panelOrigin: t,
|
|
1259
|
+
panelRect: i,
|
|
1260
|
+
...G(ze((u) => ({
|
|
1261
|
+
layers: u.layers,
|
|
1262
|
+
coordSystem: u.coordSystem
|
|
1263
1263
|
})))
|
|
1264
|
-
}), s =
|
|
1265
|
-
return
|
|
1266
|
-
onClick: (
|
|
1267
|
-
onPointerDown: (
|
|
1268
|
-
if (
|
|
1264
|
+
}), s = be(null);
|
|
1265
|
+
return z(() => () => s.current?.finish(!1), []), fe((u) => ({
|
|
1266
|
+
onClick: (d) => d.stopPropagation(),
|
|
1267
|
+
onPointerDown: (d) => {
|
|
1268
|
+
if (d.button !== 0 || s.current !== null) return;
|
|
1269
1269
|
try {
|
|
1270
|
-
|
|
1270
|
+
d.currentTarget.setPointerCapture(d.pointerId);
|
|
1271
1271
|
} catch {
|
|
1272
1272
|
return;
|
|
1273
1273
|
}
|
|
1274
|
-
|
|
1275
|
-
const h = new
|
|
1276
|
-
handle:
|
|
1277
|
-
pointerId:
|
|
1278
|
-
endpoint:
|
|
1274
|
+
d.currentTarget.focus({ preventScroll: !0 }), d.preventDefault();
|
|
1275
|
+
const h = new Po({
|
|
1276
|
+
handle: d.currentTarget,
|
|
1277
|
+
pointerId: d.pointerId,
|
|
1278
|
+
endpoint: u,
|
|
1279
1279
|
readInputs: () => c.current,
|
|
1280
1280
|
editorStore: l,
|
|
1281
|
-
engine:
|
|
1281
|
+
engine: o,
|
|
1282
1282
|
anchorResolver: a,
|
|
1283
|
-
dispatch:
|
|
1283
|
+
dispatch: r.dispatch,
|
|
1284
1284
|
onSettled: () => {
|
|
1285
1285
|
s.current = null;
|
|
1286
1286
|
}
|
|
@@ -1290,32 +1290,32 @@ var ta = "ydgo3h0", na = "ydgo3h1", ra = "ydgo3h2", xt = (e) => e === "start" ?
|
|
|
1290
1290
|
}), [
|
|
1291
1291
|
c,
|
|
1292
1292
|
l,
|
|
1293
|
-
|
|
1293
|
+
o,
|
|
1294
1294
|
a,
|
|
1295
|
-
|
|
1295
|
+
r
|
|
1296
1296
|
]);
|
|
1297
|
-
},
|
|
1298
|
-
const { commands:
|
|
1297
|
+
}, xo = [" ", "Enter"], To = ({ arrow: e }) => {
|
|
1298
|
+
const { commands: t, anchorResolver: i } = B(), r = W(), { layers: a, coordSystem: o, mainAxis: l } = G(ze((s) => ({
|
|
1299
1299
|
layers: s.layers,
|
|
1300
1300
|
coordSystem: s.coordSystem,
|
|
1301
1301
|
mainAxis: s.coordSystem.type === "cartesian" ? s.coordSystem.mainAxis : "x"
|
|
1302
1302
|
}))), c = e.id;
|
|
1303
|
-
return
|
|
1304
|
-
const s =
|
|
1305
|
-
|
|
1306
|
-
}, [
|
|
1307
|
-
if (
|
|
1308
|
-
const
|
|
1309
|
-
if (
|
|
1310
|
-
if (
|
|
1311
|
-
if (h === null) return
|
|
1303
|
+
return z(() => () => {
|
|
1304
|
+
const s = r.getState();
|
|
1305
|
+
ge(s, "endpoint-drag")?.annotationId === c && s.releaseInteraction("endpoint-drag");
|
|
1306
|
+
}, [r, c]), fe((s) => ({ onKeyDown: (u) => {
|
|
1307
|
+
if (u.altKey || u.ctrlKey || u.metaKey || u.shiftKey) return;
|
|
1308
|
+
const d = r.getState(), h = Ae(ge(d, "endpoint-drag"), e.id, s);
|
|
1309
|
+
if (xo.includes(u.key)) {
|
|
1310
|
+
if (u.preventDefault(), u.repeat) return;
|
|
1311
|
+
if (h === null) return d.claimInteraction({
|
|
1312
1312
|
kind: "endpoint-drag",
|
|
1313
1313
|
annotationId: e.id,
|
|
1314
1314
|
endpoint: s,
|
|
1315
1315
|
point: e[s]
|
|
1316
1316
|
});
|
|
1317
|
-
|
|
1318
|
-
dispatch:
|
|
1317
|
+
d.releaseInteraction("endpoint-drag"), $n({
|
|
1318
|
+
dispatch: t.dispatch,
|
|
1319
1319
|
arrow: e,
|
|
1320
1320
|
endpoint: s,
|
|
1321
1321
|
anchor: h.point.anchor
|
|
@@ -1323,19 +1323,19 @@ var ta = "ydgo3h0", na = "ydgo3h1", ra = "ydgo3h2", xt = (e) => e === "start" ?
|
|
|
1323
1323
|
return;
|
|
1324
1324
|
}
|
|
1325
1325
|
if (h === null) return;
|
|
1326
|
-
const v =
|
|
1326
|
+
const v = Ao(u.key, l);
|
|
1327
1327
|
if (v === null) return;
|
|
1328
|
-
|
|
1329
|
-
const m =
|
|
1328
|
+
u.preventDefault();
|
|
1329
|
+
const m = Lo({
|
|
1330
1330
|
arrow: e,
|
|
1331
1331
|
endpoint: s,
|
|
1332
1332
|
from: h.point.anchor,
|
|
1333
1333
|
move: v,
|
|
1334
1334
|
layers: a,
|
|
1335
|
-
coordSystem:
|
|
1336
|
-
resolver:
|
|
1335
|
+
coordSystem: o,
|
|
1336
|
+
resolver: i
|
|
1337
1337
|
});
|
|
1338
|
-
m !== null &&
|
|
1338
|
+
m !== null && d.claimInteraction({
|
|
1339
1339
|
kind: "endpoint-drag",
|
|
1340
1340
|
annotationId: e.id,
|
|
1341
1341
|
endpoint: s,
|
|
@@ -1343,226 +1343,226 @@ var ta = "ydgo3h0", na = "ydgo3h1", ra = "ydgo3h2", xt = (e) => e === "start" ?
|
|
|
1343
1343
|
});
|
|
1344
1344
|
} }), [
|
|
1345
1345
|
e,
|
|
1346
|
-
o,
|
|
1347
|
-
n,
|
|
1348
1346
|
r,
|
|
1349
|
-
|
|
1347
|
+
t,
|
|
1350
1348
|
i,
|
|
1349
|
+
a,
|
|
1350
|
+
o,
|
|
1351
1351
|
l
|
|
1352
1352
|
]);
|
|
1353
|
-
},
|
|
1354
|
-
const
|
|
1355
|
-
return !
|
|
1356
|
-
axis:
|
|
1353
|
+
}, Ao = (e, t) => {
|
|
1354
|
+
const i = e === "ArrowUp" || e === "ArrowDown";
|
|
1355
|
+
return !i && !(e === "ArrowLeft" || e === "ArrowRight") ? null : {
|
|
1356
|
+
axis: t === "x" === i ? "cross" : "main",
|
|
1357
1357
|
step: e === "ArrowDown" || e === "ArrowRight" ? 1 : -1
|
|
1358
1358
|
};
|
|
1359
|
-
},
|
|
1360
|
-
const c = a.find((
|
|
1359
|
+
}, Lo = ({ arrow: e, endpoint: t, from: i, move: r, layers: a, coordSystem: o, resolver: l }) => {
|
|
1360
|
+
const c = a.find((u) => u.id === i.layerId);
|
|
1361
1361
|
if (c === void 0) return null;
|
|
1362
|
-
const s =
|
|
1362
|
+
const s = Qr({
|
|
1363
1363
|
layer: c,
|
|
1364
|
-
from:
|
|
1365
|
-
partner: e[
|
|
1366
|
-
axis:
|
|
1367
|
-
step:
|
|
1368
|
-
canLandOn: (
|
|
1364
|
+
from: i,
|
|
1365
|
+
partner: e[Wn(t)].anchor,
|
|
1366
|
+
axis: r.axis,
|
|
1367
|
+
step: r.step,
|
|
1368
|
+
canLandOn: (u) => Ne({
|
|
1369
1369
|
resolver: l,
|
|
1370
1370
|
layer: c,
|
|
1371
|
-
observation:
|
|
1372
|
-
coordSystem:
|
|
1373
|
-
align: e[
|
|
1371
|
+
observation: u,
|
|
1372
|
+
coordSystem: o,
|
|
1373
|
+
align: e[t].anchor.align
|
|
1374
1374
|
}) !== null
|
|
1375
1375
|
});
|
|
1376
|
-
return s === null ? null :
|
|
1376
|
+
return s === null ? null : Ne({
|
|
1377
1377
|
resolver: l,
|
|
1378
1378
|
layer: c,
|
|
1379
1379
|
observation: s.observation,
|
|
1380
|
-
coordSystem:
|
|
1381
|
-
align: e[
|
|
1380
|
+
coordSystem: o,
|
|
1381
|
+
align: e[t].anchor.align
|
|
1382
1382
|
});
|
|
1383
|
-
},
|
|
1384
|
-
const
|
|
1385
|
-
return
|
|
1386
|
-
annotationId:
|
|
1383
|
+
}, No = (e) => {
|
|
1384
|
+
const t = Xa();
|
|
1385
|
+
return t === null ? null : /* @__PURE__ */ n(Oo, {
|
|
1386
|
+
annotationId: t,
|
|
1387
1387
|
...e
|
|
1388
1388
|
});
|
|
1389
|
-
},
|
|
1390
|
-
const
|
|
1391
|
-
return
|
|
1392
|
-
committedArrow:
|
|
1393
|
-
committedLabelBox:
|
|
1394
|
-
labelBox:
|
|
1395
|
-
start:
|
|
1396
|
-
end:
|
|
1397
|
-
isDragged:
|
|
1398
|
-
...
|
|
1389
|
+
}, Oo = ({ annotationId: e, ...t }) => {
|
|
1390
|
+
const i = Lt(), r = O(() => i.find((a) => a.id === e), [i, e]);
|
|
1391
|
+
return r === void 0 ? null : /* @__PURE__ */ n(Eo, {
|
|
1392
|
+
committedArrow: r.committedArrow,
|
|
1393
|
+
committedLabelBox: r.committedLabelBox,
|
|
1394
|
+
labelBox: r.labelBox,
|
|
1395
|
+
start: r.start,
|
|
1396
|
+
end: r.end,
|
|
1397
|
+
isDragged: r.isDragged,
|
|
1398
|
+
...t
|
|
1399
1399
|
});
|
|
1400
|
-
},
|
|
1401
|
-
const
|
|
1400
|
+
}, Eo = ({ committedArrow: e, committedLabelBox: t, labelBox: i, start: r, end: a, panelRect: o, panelOrigin: l, frameRect: c, frameElement: s, isDragged: u }) => {
|
|
1401
|
+
const d = Io({
|
|
1402
1402
|
arrow: e,
|
|
1403
1403
|
panelOrigin: l,
|
|
1404
|
-
panelRect:
|
|
1405
|
-
}), h =
|
|
1404
|
+
panelRect: o
|
|
1405
|
+
}), h = To({ arrow: e });
|
|
1406
1406
|
return /* @__PURE__ */ p("div", {
|
|
1407
1407
|
"data-testid": "difference-arrow-selection",
|
|
1408
1408
|
children: [
|
|
1409
|
-
!
|
|
1409
|
+
!u && /* @__PURE__ */ n(go, {
|
|
1410
1410
|
arrow: e,
|
|
1411
|
-
labelBox:
|
|
1412
|
-
panelRect:
|
|
1411
|
+
labelBox: t,
|
|
1412
|
+
panelRect: o,
|
|
1413
1413
|
frameWidth: c.width,
|
|
1414
1414
|
frameHeight: c.height,
|
|
1415
1415
|
frameElement: s
|
|
1416
1416
|
}),
|
|
1417
|
-
/* @__PURE__ */
|
|
1417
|
+
/* @__PURE__ */ n("div", {
|
|
1418
1418
|
"aria-hidden": "true",
|
|
1419
|
-
className:
|
|
1419
|
+
className: So,
|
|
1420
1420
|
"data-testid": "difference-arrow-selection-label",
|
|
1421
1421
|
style: {
|
|
1422
|
-
left:
|
|
1423
|
-
top:
|
|
1424
|
-
width:
|
|
1425
|
-
height:
|
|
1422
|
+
left: o.x + i.x - 2,
|
|
1423
|
+
top: o.y + i.y - 2,
|
|
1424
|
+
width: i.width + 4,
|
|
1425
|
+
height: i.height + 4
|
|
1426
1426
|
}
|
|
1427
1427
|
}),
|
|
1428
|
-
/* @__PURE__ */
|
|
1428
|
+
/* @__PURE__ */ n(nn, {
|
|
1429
1429
|
endpoint: "start",
|
|
1430
|
-
point:
|
|
1431
|
-
panelRect:
|
|
1432
|
-
dragHandlers:
|
|
1430
|
+
point: r,
|
|
1431
|
+
panelRect: o,
|
|
1432
|
+
dragHandlers: d("start"),
|
|
1433
1433
|
keyboardHandlers: h("start")
|
|
1434
1434
|
}),
|
|
1435
|
-
/* @__PURE__ */
|
|
1435
|
+
/* @__PURE__ */ n(nn, {
|
|
1436
1436
|
endpoint: "end",
|
|
1437
1437
|
point: a,
|
|
1438
|
-
panelRect:
|
|
1439
|
-
dragHandlers:
|
|
1438
|
+
panelRect: o,
|
|
1439
|
+
dragHandlers: d("end"),
|
|
1440
1440
|
keyboardHandlers: h("end")
|
|
1441
1441
|
})
|
|
1442
1442
|
]
|
|
1443
1443
|
});
|
|
1444
|
-
},
|
|
1445
|
-
className:
|
|
1444
|
+
}, nn = ({ endpoint: e, point: t, panelRect: i, dragHandlers: r, keyboardHandlers: a }) => /* @__PURE__ */ n("div", {
|
|
1445
|
+
className: bo,
|
|
1446
1446
|
"data-testid": "difference-arrow-selection-handle",
|
|
1447
1447
|
"data-endpoint": e,
|
|
1448
1448
|
role: "button",
|
|
1449
1449
|
style: {
|
|
1450
|
-
left:
|
|
1451
|
-
top:
|
|
1450
|
+
left: i.x + t.x,
|
|
1451
|
+
top: i.y + t.y
|
|
1452
1452
|
},
|
|
1453
1453
|
tabIndex: 0,
|
|
1454
|
-
...
|
|
1454
|
+
...r,
|
|
1455
1455
|
...a,
|
|
1456
|
-
children: /* @__PURE__ */
|
|
1456
|
+
children: /* @__PURE__ */ n("span", {
|
|
1457
1457
|
"aria-hidden": "true",
|
|
1458
|
-
className:
|
|
1458
|
+
className: Co
|
|
1459
1459
|
})
|
|
1460
|
-
}),
|
|
1460
|
+
}), _o = (e) => /* @__PURE__ */ n(M, {
|
|
1461
1461
|
...e,
|
|
1462
1462
|
children: /* @__PURE__ */ p("g", {
|
|
1463
1463
|
stroke: "currentColor",
|
|
1464
1464
|
strokeWidth: 2,
|
|
1465
1465
|
strokeLinecap: "round",
|
|
1466
1466
|
strokeLinejoin: "round",
|
|
1467
|
-
children: [/* @__PURE__ */
|
|
1467
|
+
children: [/* @__PURE__ */ n("path", { d: "M12 5v14" }), /* @__PURE__ */ n("path", { d: "M5 12h14" })]
|
|
1468
1468
|
})
|
|
1469
|
-
}),
|
|
1469
|
+
}), ko = "var(--_1tyillx0)", Mo = {
|
|
1470
1470
|
rest: 0.5,
|
|
1471
1471
|
hovered: 0.75,
|
|
1472
1472
|
open: 1
|
|
1473
1473
|
};
|
|
1474
|
-
var
|
|
1474
|
+
var Ro = "_1tyillx1", Do = {
|
|
1475
1475
|
rest: "_1tyillx2",
|
|
1476
1476
|
hovered: "_1tyillx3",
|
|
1477
1477
|
open: "_1tyillx4"
|
|
1478
|
-
},
|
|
1478
|
+
}, zo = "_1tyillx5", Fo = {
|
|
1479
1479
|
closed: "_1tyillx6",
|
|
1480
1480
|
open: "_1tyillx7"
|
|
1481
|
-
},
|
|
1482
|
-
const
|
|
1481
|
+
}, Ho = ({ interaction: e, panelRect: t }) => {
|
|
1482
|
+
const i = W(), r = G((c) => c.coordSystem), a = e.kind === "trigger" || e.kind === "menu" ? e.anchor : null, o = Vo(e), l = O(() => {
|
|
1483
1483
|
if (a === null) return null;
|
|
1484
|
-
const c =
|
|
1484
|
+
const c = Xr(a.position, t, r);
|
|
1485
1485
|
return {
|
|
1486
1486
|
center: c,
|
|
1487
|
-
radius: 19 *
|
|
1487
|
+
radius: 19 * Mo[o],
|
|
1488
1488
|
target: {
|
|
1489
1489
|
kind: "observation",
|
|
1490
|
-
cursor:
|
|
1490
|
+
cursor: De(c, t)
|
|
1491
1491
|
}
|
|
1492
1492
|
};
|
|
1493
1493
|
}, [
|
|
1494
1494
|
a,
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1495
|
+
t,
|
|
1496
|
+
r,
|
|
1497
|
+
o
|
|
1498
1498
|
]);
|
|
1499
|
-
return
|
|
1500
|
-
|
|
1501
|
-
}, [
|
|
1499
|
+
return z(() => {
|
|
1500
|
+
i.getState().setMenuTrigger(l);
|
|
1501
|
+
}, [i, l]), z(() => () => i.getState().setMenuTrigger(null), [i]), a === null || l === null ? null : /* @__PURE__ */ n("div", {
|
|
1502
1502
|
"aria-hidden": "true",
|
|
1503
1503
|
"data-testid": "observation-menu-trigger",
|
|
1504
|
-
"data-state":
|
|
1505
|
-
className:
|
|
1504
|
+
"data-state": o,
|
|
1505
|
+
className: re(Ro, Do[o]),
|
|
1506
1506
|
style: {
|
|
1507
|
-
left:
|
|
1508
|
-
top:
|
|
1509
|
-
...
|
|
1507
|
+
left: t.x + l.center.x,
|
|
1508
|
+
top: t.y + l.center.y,
|
|
1509
|
+
...An({ [ko]: a.color ?? zt.border50 })
|
|
1510
1510
|
},
|
|
1511
|
-
children: /* @__PURE__ */
|
|
1512
|
-
className:
|
|
1513
|
-
children: /* @__PURE__ */
|
|
1511
|
+
children: /* @__PURE__ */ n("span", {
|
|
1512
|
+
className: re(zo, Fo[o === "open" ? "open" : "closed"]),
|
|
1513
|
+
children: /* @__PURE__ */ n(_o, { size: "lg" })
|
|
1514
1514
|
})
|
|
1515
1515
|
});
|
|
1516
|
-
},
|
|
1517
|
-
const { chartId:
|
|
1518
|
-
|
|
1519
|
-
if (
|
|
1520
|
-
const a = (
|
|
1521
|
-
if (
|
|
1522
|
-
const l = [...
|
|
1516
|
+
}, Vo = (e) => e.kind === "menu" ? "open" : e.kind === "trigger" && e.isEngaged ? "hovered" : "rest", Ko = 'button:not([disabled]):not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])', Go = (e, t) => {
|
|
1517
|
+
const { chartId: i } = B(), r = W();
|
|
1518
|
+
z(() => {
|
|
1519
|
+
if (t === null) return;
|
|
1520
|
+
const a = (o) => {
|
|
1521
|
+
if (o.key !== "Tab" || o.defaultPrevented || !ce(o.target, e, i) || r.getState().standingInteraction?.kind === "chrome-popup") return;
|
|
1522
|
+
const l = [...t.querySelectorAll(Ko)];
|
|
1523
1523
|
if (l.length === 0) return;
|
|
1524
|
-
|
|
1524
|
+
o.preventDefault();
|
|
1525
1525
|
const c = l.findIndex((s) => s === document.activeElement);
|
|
1526
|
-
l[c === -1 ?
|
|
1526
|
+
l[c === -1 ? o.shiftKey ? l.length - 1 : 0 : (c + (o.shiftKey ? -1 : 1) + l.length) % l.length]?.focus();
|
|
1527
1527
|
};
|
|
1528
1528
|
return document.addEventListener("keydown", a), () => document.removeEventListener("keydown", a);
|
|
1529
1529
|
}, [
|
|
1530
1530
|
e,
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1531
|
+
t,
|
|
1532
|
+
i,
|
|
1533
|
+
r
|
|
1534
1534
|
]);
|
|
1535
|
-
},
|
|
1536
|
-
const { selectionStore:
|
|
1537
|
-
|
|
1538
|
-
let
|
|
1535
|
+
}, Bo = (e) => {
|
|
1536
|
+
const { selectionStore: t, chartId: i } = B();
|
|
1537
|
+
z(() => {
|
|
1538
|
+
let r = null;
|
|
1539
1539
|
const a = () => {
|
|
1540
1540
|
e.focus({ preventScroll: !0 });
|
|
1541
|
-
},
|
|
1542
|
-
const { selection: s, clearSelection:
|
|
1543
|
-
s.length !== 0 && (
|
|
1541
|
+
}, o = (c) => {
|
|
1542
|
+
const { selection: s, clearSelection: u } = t.getState();
|
|
1543
|
+
s.length !== 0 && (ce(c.target, e, i) || u());
|
|
1544
1544
|
}, l = (c) => {
|
|
1545
|
-
|
|
1546
|
-
|
|
1545
|
+
t.getState().selection.length !== 0 && ce(c.target, e, i) && c.relatedTarget === null && (r !== null && cancelAnimationFrame(r), r = requestAnimationFrame(() => {
|
|
1546
|
+
r = null, document.hasFocus() && (ce(document.activeElement, e, i) || t.getState().clearSelection());
|
|
1547
1547
|
}));
|
|
1548
1548
|
};
|
|
1549
|
-
return e.addEventListener("pointerdown", a), document.addEventListener("focusin",
|
|
1550
|
-
|
|
1549
|
+
return e.addEventListener("pointerdown", a), document.addEventListener("focusin", o), document.addEventListener("focusout", l), () => {
|
|
1550
|
+
r !== null && cancelAnimationFrame(r), e.removeEventListener("pointerdown", a), document.removeEventListener("focusin", o), document.removeEventListener("focusout", l);
|
|
1551
1551
|
};
|
|
1552
1552
|
}, [
|
|
1553
1553
|
e,
|
|
1554
|
-
|
|
1555
|
-
|
|
1554
|
+
t,
|
|
1555
|
+
i
|
|
1556
1556
|
]);
|
|
1557
|
-
},
|
|
1558
|
-
const { selectionStore:
|
|
1559
|
-
const { selection: s } =
|
|
1560
|
-
|
|
1557
|
+
}, Uo = (e) => {
|
|
1558
|
+
const { selectionStore: t, commands: i, chartId: r } = B(), a = W(), o = fe((c) => {
|
|
1559
|
+
const { selection: s } = t.getState(), u = Gn(s);
|
|
1560
|
+
u !== null && (c.preventDefault(), i.dispatch(new Re({ id: u })), e.focus({ preventScroll: !0 }));
|
|
1561
1561
|
}, [
|
|
1562
1562
|
e,
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
]), l =
|
|
1563
|
+
i,
|
|
1564
|
+
t
|
|
1565
|
+
]), l = fe((c) => {
|
|
1566
1566
|
const s = a.getState();
|
|
1567
1567
|
switch (s.standingInteraction?.kind) {
|
|
1568
1568
|
case "endpoint-drag":
|
|
@@ -1574,28 +1574,28 @@ var ba = "_1tyillx1", Ca = {
|
|
|
1574
1574
|
s.releaseInteraction("menu");
|
|
1575
1575
|
return;
|
|
1576
1576
|
default:
|
|
1577
|
-
if (
|
|
1577
|
+
if (En(c.target, r)) {
|
|
1578
1578
|
e.focus({ preventScroll: !0 });
|
|
1579
1579
|
return;
|
|
1580
1580
|
}
|
|
1581
|
-
|
|
1581
|
+
t.getState().clearSelection();
|
|
1582
1582
|
return;
|
|
1583
1583
|
}
|
|
1584
1584
|
}, [
|
|
1585
1585
|
a,
|
|
1586
|
-
|
|
1586
|
+
t,
|
|
1587
1587
|
e,
|
|
1588
|
-
|
|
1588
|
+
r
|
|
1589
1589
|
]);
|
|
1590
|
-
|
|
1590
|
+
z(() => {
|
|
1591
1591
|
const c = (s) => {
|
|
1592
|
-
if (
|
|
1592
|
+
if (ce(s.target, e, r) && !qo(s.target) && !ra(s.target))
|
|
1593
1593
|
switch (s.key) {
|
|
1594
1594
|
case "Escape":
|
|
1595
1595
|
return l(s);
|
|
1596
1596
|
case "Delete":
|
|
1597
1597
|
case "Backspace":
|
|
1598
|
-
return
|
|
1598
|
+
return o(s);
|
|
1599
1599
|
default:
|
|
1600
1600
|
return;
|
|
1601
1601
|
}
|
|
@@ -1603,1023 +1603,1078 @@ var ba = "_1tyillx1", Ca = {
|
|
|
1603
1603
|
return document.addEventListener("keydown", c), () => document.removeEventListener("keydown", c);
|
|
1604
1604
|
}, [
|
|
1605
1605
|
e,
|
|
1606
|
-
|
|
1606
|
+
o,
|
|
1607
1607
|
l,
|
|
1608
|
-
|
|
1608
|
+
r
|
|
1609
1609
|
]);
|
|
1610
|
-
},
|
|
1610
|
+
}, qo = (e) => e instanceof HTMLElement && (e.isContentEditable || e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement), Wo = `[${Cn}]`, Zn = (e, t, i) => {
|
|
1611
1611
|
if (typeof document.elementsFromPoint != "function") return null;
|
|
1612
|
-
const
|
|
1613
|
-
return
|
|
1614
|
-
},
|
|
1615
|
-
for (const
|
|
1616
|
-
const
|
|
1617
|
-
if (
|
|
1618
|
-
const a =
|
|
1612
|
+
const r = document.elementsFromPoint(e, t);
|
|
1613
|
+
return $o(r, i);
|
|
1614
|
+
}, $o = (e, t) => {
|
|
1615
|
+
for (const i of e) {
|
|
1616
|
+
const r = i.closest(Wo);
|
|
1617
|
+
if (r === null || !t.contains(r)) continue;
|
|
1618
|
+
const a = Zo(r);
|
|
1619
1619
|
if (a !== null) return a;
|
|
1620
1620
|
}
|
|
1621
1621
|
return null;
|
|
1622
|
-
},
|
|
1623
|
-
const
|
|
1624
|
-
if (
|
|
1625
|
-
const
|
|
1626
|
-
return
|
|
1627
|
-
kind:
|
|
1628
|
-
id:
|
|
1622
|
+
}, Zo = (e) => {
|
|
1623
|
+
const t = e.getAttribute(Cn);
|
|
1624
|
+
if (t !== "annotation") return null;
|
|
1625
|
+
const i = e.getAttribute(_t);
|
|
1626
|
+
return i === null || i === "" ? null : {
|
|
1627
|
+
kind: t,
|
|
1628
|
+
id: i
|
|
1629
1629
|
};
|
|
1630
|
-
},
|
|
1631
|
-
const e =
|
|
1630
|
+
}, Xo = () => {
|
|
1631
|
+
const e = Pt((a) => a.hover.primary), { layers: t, coordSystem: i } = G(ze((a) => ({
|
|
1632
1632
|
layers: a.layers,
|
|
1633
1633
|
coordSystem: a.coordSystem
|
|
1634
|
-
}))), { anchorResolver:
|
|
1635
|
-
return
|
|
1634
|
+
}))), { anchorResolver: r } = B();
|
|
1635
|
+
return O(() => {
|
|
1636
1636
|
if (e === null) return null;
|
|
1637
|
-
const a =
|
|
1637
|
+
const a = t.find((c) => c.id === e.layerId);
|
|
1638
1638
|
if (a === void 0) return null;
|
|
1639
|
-
const
|
|
1640
|
-
coordSystem:
|
|
1639
|
+
const o = r.resolve(a.geom, e.observation, {
|
|
1640
|
+
coordSystem: i,
|
|
1641
1641
|
position: a.position,
|
|
1642
1642
|
purpose: "pin"
|
|
1643
1643
|
});
|
|
1644
|
-
if (
|
|
1645
|
-
const l =
|
|
1644
|
+
if (o === null) return null;
|
|
1645
|
+
const l = kr(a, e.observation);
|
|
1646
1646
|
return l === null ? null : {
|
|
1647
|
-
position:
|
|
1648
|
-
color:
|
|
1647
|
+
position: o,
|
|
1648
|
+
color: Ur(e.observation),
|
|
1649
1649
|
layer: a,
|
|
1650
1650
|
at: l,
|
|
1651
1651
|
observation: e.observation
|
|
1652
1652
|
};
|
|
1653
1653
|
}, [
|
|
1654
1654
|
e,
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1655
|
+
t,
|
|
1656
|
+
i,
|
|
1657
|
+
r
|
|
1658
1658
|
]);
|
|
1659
|
-
},
|
|
1660
|
-
const e =
|
|
1661
|
-
return
|
|
1659
|
+
}, jo = { kind: "idle" }, Xn = () => {
|
|
1660
|
+
const e = ve((r) => r.standingInteraction), t = ve((r) => r.chromeUnderPointer), i = Xo();
|
|
1661
|
+
return O(() => e !== null ? e : i === null ? jo : {
|
|
1662
1662
|
kind: "trigger",
|
|
1663
|
-
anchor:
|
|
1664
|
-
isEngaged:
|
|
1663
|
+
anchor: i,
|
|
1664
|
+
isEngaged: t === "menu-trigger"
|
|
1665
1665
|
}, [
|
|
1666
1666
|
e,
|
|
1667
|
-
|
|
1668
|
-
|
|
1667
|
+
i,
|
|
1668
|
+
t
|
|
1669
1669
|
]);
|
|
1670
|
-
},
|
|
1671
|
-
const
|
|
1672
|
-
|
|
1673
|
-
let a = null,
|
|
1670
|
+
}, Yo = (e, t) => {
|
|
1671
|
+
const i = W(), r = se(t);
|
|
1672
|
+
z(() => {
|
|
1673
|
+
let a = null, o = null;
|
|
1674
1674
|
const l = (h) => {
|
|
1675
|
-
const { menuTrigger: v } =
|
|
1676
|
-
return v === null ? null :
|
|
1675
|
+
const { menuTrigger: v } = i.getState();
|
|
1676
|
+
return v === null ? null : Tn(h, v) ? "menu-trigger" : null;
|
|
1677
1677
|
}, c = () => {
|
|
1678
1678
|
a = null;
|
|
1679
|
-
const h =
|
|
1680
|
-
if (
|
|
1681
|
-
const v =
|
|
1679
|
+
const h = o;
|
|
1680
|
+
if (o = null, h === null) return;
|
|
1681
|
+
const v = r.current, m = i.getState();
|
|
1682
1682
|
m.setChromeUnderPointer(l({
|
|
1683
1683
|
x: h.x - v.x,
|
|
1684
1684
|
y: h.y - v.y
|
|
1685
|
-
})), m.standingInteraction?.kind !== "menu" && m.setEditTargetUnderPointer(
|
|
1685
|
+
})), m.standingInteraction?.kind !== "menu" && m.setEditTargetUnderPointer(Zn(h.x, h.y, e));
|
|
1686
1686
|
}, s = () => {
|
|
1687
|
-
const h =
|
|
1687
|
+
const h = i.getState();
|
|
1688
1688
|
h.setChromeUnderPointer(null), h.setEditTargetUnderPointer(null);
|
|
1689
|
-
},
|
|
1690
|
-
|
|
1689
|
+
}, u = (h) => {
|
|
1690
|
+
o = {
|
|
1691
1691
|
x: h.clientX,
|
|
1692
1692
|
y: h.clientY
|
|
1693
1693
|
}, a === null && (a = requestAnimationFrame(c));
|
|
1694
|
-
},
|
|
1695
|
-
|
|
1694
|
+
}, d = () => {
|
|
1695
|
+
o = null, a !== null && (cancelAnimationFrame(a), a = null), s();
|
|
1696
1696
|
};
|
|
1697
|
-
return e.addEventListener("pointermove",
|
|
1698
|
-
a !== null && cancelAnimationFrame(a), e.removeEventListener("pointermove",
|
|
1697
|
+
return e.addEventListener("pointermove", u), e.addEventListener("pointerleave", d), () => {
|
|
1698
|
+
a !== null && cancelAnimationFrame(a), e.removeEventListener("pointermove", u), e.removeEventListener("pointerleave", d), s();
|
|
1699
1699
|
};
|
|
1700
1700
|
}, [
|
|
1701
1701
|
e,
|
|
1702
|
-
r,
|
|
1703
|
-
o
|
|
1704
|
-
]);
|
|
1705
|
-
}, qe = "editor", Ve = [], Ra = (e, n, r, o) => {
|
|
1706
|
-
const a = At(), { store: i } = Ie(), l = Je().length > 0, c = ce((u) => u.menuTrigger), s = a.kind === "menu", d = P(() => c === null ? Ve : [wn(c)], [c]);
|
|
1707
|
-
_a(e, n), Da(a, e, n, r), Aa(e), Na(e), Pa(e, o), T(() => (i.getState().publishPointerRegions(qe, d), () => i.getState().publishPointerRegions(qe, Ve)), [i, d]), T(() => (i.getState().setPointerSuspended(s || l), () => i.getState().setPointerSuspended(!1)), [
|
|
1708
1702
|
i,
|
|
1703
|
+
r
|
|
1704
|
+
]);
|
|
1705
|
+
}, tn = "editor", rn = [], Qo = (e, t, i, r) => {
|
|
1706
|
+
const a = Xn(), { store: o } = _e(), l = Sn().length > 0, c = ve((d) => d.menuTrigger), s = a.kind === "menu", u = O(() => c === null ? rn : [Er(c)], [c]);
|
|
1707
|
+
Yo(e, t), Jo(a, e, t, i), Bo(e), Uo(e), Go(e, r), z(() => (o.getState().publishPointerRegions(tn, u), () => o.getState().publishPointerRegions(tn, rn)), [o, u]), z(() => (o.getState().setPointerSuspended(s || l), () => o.getState().setPointerSuspended(!1)), [
|
|
1708
|
+
o,
|
|
1709
1709
|
s,
|
|
1710
1710
|
l
|
|
1711
|
-
]),
|
|
1711
|
+
]), z(() => {
|
|
1712
1712
|
if (!l) return;
|
|
1713
|
-
const
|
|
1714
|
-
|
|
1715
|
-
}, [
|
|
1716
|
-
},
|
|
1717
|
-
const a =
|
|
1718
|
-
|
|
1719
|
-
const h = (
|
|
1713
|
+
const d = o.getState();
|
|
1714
|
+
d.setHoverState(yn), d.setTooltipAnchor(null);
|
|
1715
|
+
}, [o, l]);
|
|
1716
|
+
}, Jo = (e, t, i, r) => {
|
|
1717
|
+
const a = W(), { selectionStore: o } = B(), { store: l, engine: c } = _e(), s = se(e), u = se(i), d = se(r);
|
|
1718
|
+
z(() => {
|
|
1719
|
+
const h = (S) => {
|
|
1720
1720
|
const { menuTrigger: f } = a.getState();
|
|
1721
|
-
return f === null ? !1 :
|
|
1722
|
-
}, v = (
|
|
1723
|
-
if (h(
|
|
1724
|
-
const f =
|
|
1725
|
-
l.getState().setHoverState(
|
|
1721
|
+
return f === null ? !1 : Tn(an(S, u.current), f);
|
|
1722
|
+
}, v = (S) => {
|
|
1723
|
+
if (h(S) || o.getState().selection.length > 0) return;
|
|
1724
|
+
const f = d.current, P = an(S, u.current), x = ei(P, f) ? c.query(De(P, f)) : yn;
|
|
1725
|
+
l.getState().setHoverState(x);
|
|
1726
1726
|
};
|
|
1727
1727
|
let m = !1;
|
|
1728
1728
|
const g = () => {
|
|
1729
1729
|
m = s.current.kind === "menu";
|
|
1730
|
-
},
|
|
1731
|
-
const f =
|
|
1730
|
+
}, y = (S) => {
|
|
1731
|
+
const f = Zn(S.clientX, S.clientY, t), P = o.getState();
|
|
1732
1732
|
if (f === null) {
|
|
1733
|
-
|
|
1733
|
+
P.clearSelection();
|
|
1734
1734
|
return;
|
|
1735
1735
|
}
|
|
1736
|
-
|
|
1737
|
-
},
|
|
1738
|
-
if (
|
|
1739
|
-
const { claimInteraction: f, releaseInteraction:
|
|
1740
|
-
if (!
|
|
1741
|
-
|
|
1736
|
+
P.setSelection([f]);
|
|
1737
|
+
}, I = (S) => {
|
|
1738
|
+
if (aa(S.target)) return;
|
|
1739
|
+
const { claimInteraction: f, releaseInteraction: P } = a.getState(), x = h(S);
|
|
1740
|
+
if (!x || m) {
|
|
1741
|
+
P("menu"), x || y(S), m && v(S);
|
|
1742
1742
|
return;
|
|
1743
1743
|
}
|
|
1744
|
-
const
|
|
1745
|
-
|
|
1744
|
+
const R = s.current;
|
|
1745
|
+
R.kind === "trigger" && f({
|
|
1746
1746
|
kind: "menu",
|
|
1747
|
-
anchor:
|
|
1747
|
+
anchor: R.anchor
|
|
1748
1748
|
});
|
|
1749
1749
|
};
|
|
1750
|
-
return document.addEventListener("pointerdown", g, !0), document.addEventListener("click",
|
|
1751
|
-
document.removeEventListener("pointerdown", g, !0), document.removeEventListener("click",
|
|
1750
|
+
return document.addEventListener("pointerdown", g, !0), document.addEventListener("click", I), () => {
|
|
1751
|
+
document.removeEventListener("pointerdown", g, !0), document.removeEventListener("click", I);
|
|
1752
1752
|
};
|
|
1753
1753
|
}, [
|
|
1754
1754
|
a,
|
|
1755
|
-
|
|
1756
|
-
|
|
1755
|
+
o,
|
|
1756
|
+
t,
|
|
1757
1757
|
s,
|
|
1758
1758
|
l,
|
|
1759
1759
|
c,
|
|
1760
|
-
|
|
1761
|
-
|
|
1760
|
+
u,
|
|
1761
|
+
d
|
|
1762
1762
|
]);
|
|
1763
|
-
},
|
|
1764
|
-
x: e.clientX -
|
|
1765
|
-
y: e.clientY -
|
|
1766
|
-
}),
|
|
1767
|
-
const { measureRef:
|
|
1768
|
-
return
|
|
1763
|
+
}, an = (e, t) => ({
|
|
1764
|
+
x: e.clientX - t.x,
|
|
1765
|
+
y: e.clientY - t.y
|
|
1766
|
+
}), ei = (e, t) => e.x >= 0 && e.x <= t.width && e.y >= 0 && e.y <= t.height, ni = ({ frameElement: e, panelRect: t }) => {
|
|
1767
|
+
const { measureRef: i, screenRect: r } = It(), a = W();
|
|
1768
|
+
return z(() => (i(e), () => i(null)), [i, e]), z(() => () => a.getState().releaseInteraction("menu"), [a]), r === null ? null : /* @__PURE__ */ n(ia, { children: /* @__PURE__ */ n(ti, {
|
|
1769
1769
|
frameElement: e,
|
|
1770
|
-
frameRect:
|
|
1771
|
-
panelRect:
|
|
1770
|
+
frameRect: r,
|
|
1771
|
+
panelRect: t
|
|
1772
1772
|
}) });
|
|
1773
|
-
},
|
|
1774
|
-
const
|
|
1775
|
-
x:
|
|
1776
|
-
y:
|
|
1773
|
+
}, ti = ({ frameElement: e, frameRect: t, panelRect: i }) => {
|
|
1774
|
+
const r = O(() => ({
|
|
1775
|
+
x: t.left + i.x,
|
|
1776
|
+
y: t.top + i.y
|
|
1777
1777
|
}), [
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
]), [a,
|
|
1783
|
-
return
|
|
1778
|
+
t.left,
|
|
1779
|
+
t.top,
|
|
1780
|
+
i.x,
|
|
1781
|
+
i.y
|
|
1782
|
+
]), [a, o] = $(null);
|
|
1783
|
+
return Qo(e, r, i, a), /* @__PURE__ */ n(ri, {
|
|
1784
1784
|
frameElement: e,
|
|
1785
|
-
frameRect:
|
|
1786
|
-
panelOrigin:
|
|
1787
|
-
panelRect:
|
|
1788
|
-
boxRef:
|
|
1785
|
+
frameRect: t,
|
|
1786
|
+
panelOrigin: r,
|
|
1787
|
+
panelRect: i,
|
|
1788
|
+
boxRef: o
|
|
1789
1789
|
});
|
|
1790
|
-
},
|
|
1791
|
-
const
|
|
1792
|
-
return /* @__PURE__ */
|
|
1793
|
-
rect:
|
|
1794
|
-
zIndex:
|
|
1795
|
-
container:
|
|
1790
|
+
}, ri = ({ frameElement: e, frameRect: t, panelOrigin: i, panelRect: r, boxRef: a }) => {
|
|
1791
|
+
const o = Fe(), l = Xn();
|
|
1792
|
+
return /* @__PURE__ */ n(xt, {
|
|
1793
|
+
rect: t,
|
|
1794
|
+
zIndex: Tt.editorOverlay,
|
|
1795
|
+
container: o,
|
|
1796
1796
|
"data-testid": "editor-overlay",
|
|
1797
1797
|
boxRef: a,
|
|
1798
|
-
children: /* @__PURE__ */ p(
|
|
1799
|
-
/* @__PURE__ */
|
|
1800
|
-
panelRect:
|
|
1801
|
-
panelOrigin:
|
|
1802
|
-
frameRect:
|
|
1798
|
+
children: /* @__PURE__ */ p(he, { children: [
|
|
1799
|
+
/* @__PURE__ */ n(No, {
|
|
1800
|
+
panelRect: r,
|
|
1801
|
+
panelOrigin: i,
|
|
1802
|
+
frameRect: t,
|
|
1803
1803
|
frameElement: e
|
|
1804
1804
|
}),
|
|
1805
|
-
/* @__PURE__ */
|
|
1805
|
+
/* @__PURE__ */ n(Ho, {
|
|
1806
1806
|
interaction: l,
|
|
1807
|
-
panelRect:
|
|
1807
|
+
panelRect: r
|
|
1808
1808
|
}),
|
|
1809
|
-
/* @__PURE__ */
|
|
1809
|
+
/* @__PURE__ */ n(Ua, {
|
|
1810
1810
|
interaction: l,
|
|
1811
|
-
panelOrigin:
|
|
1811
|
+
panelOrigin: i
|
|
1812
1812
|
})
|
|
1813
1813
|
] })
|
|
1814
1814
|
});
|
|
1815
|
-
},
|
|
1816
|
-
slots:
|
|
1817
|
-
EditorSurface:
|
|
1815
|
+
}, Ss = ({ slots: e, ...t }) => /* @__PURE__ */ n(Et, { children: /* @__PURE__ */ n(Ot, {
|
|
1816
|
+
slots: O(() => ({
|
|
1817
|
+
EditorSurface: ni,
|
|
1818
1818
|
...e
|
|
1819
1819
|
}), [e]),
|
|
1820
|
-
...
|
|
1821
|
-
}) }),
|
|
1822
|
-
const
|
|
1820
|
+
...t
|
|
1821
|
+
}) }), jn = ue(null), Yn = ({ labelId: e, controlId: t, children: i }) => {
|
|
1822
|
+
const r = O(() => {
|
|
1823
1823
|
let a = null;
|
|
1824
1824
|
return {
|
|
1825
1825
|
labelId: e,
|
|
1826
|
-
controlId:
|
|
1827
|
-
claimControlId: (
|
|
1826
|
+
controlId: t,
|
|
1827
|
+
claimControlId: (o) => (a ??= o, a === o)
|
|
1828
1828
|
};
|
|
1829
|
-
}, [e,
|
|
1830
|
-
return /* @__PURE__ */
|
|
1831
|
-
value:
|
|
1832
|
-
children:
|
|
1829
|
+
}, [e, t]);
|
|
1830
|
+
return /* @__PURE__ */ n(jn.Provider, {
|
|
1831
|
+
value: r,
|
|
1832
|
+
children: i
|
|
1833
1833
|
});
|
|
1834
|
-
},
|
|
1835
|
-
const a =
|
|
1834
|
+
}, Y = ({ id: e, ariaLabel: t, ariaLabelledBy: i }, r = !0) => {
|
|
1835
|
+
const a = ae(jn), o = de(), [l] = $(() => r ? a?.claimControlId(o) ?? !1 : !1), c = e ?? (l ? a?.controlId : void 0), s = i ?? (t === void 0 ? a?.labelId : void 0);
|
|
1836
1836
|
return {
|
|
1837
1837
|
...c !== void 0 && { id: c },
|
|
1838
|
-
...
|
|
1838
|
+
...t !== void 0 && { "aria-label": t },
|
|
1839
1839
|
...s !== void 0 && { "aria-labelledby": s }
|
|
1840
1840
|
};
|
|
1841
1841
|
};
|
|
1842
|
-
var
|
|
1842
|
+
var ai = {
|
|
1843
1843
|
default: "woi4bh4 woi4bh3",
|
|
1844
1844
|
tile: "woi4bh5 woi4bh3"
|
|
1845
|
-
},
|
|
1846
|
-
const s =
|
|
1845
|
+
}, oi = ({ label: e, icon: t, onClick: i, variant: r = "default", isDisabled: a, ariaLabel: o, ariaLabelledBy: l, id: c }) => {
|
|
1846
|
+
const s = Y({
|
|
1847
1847
|
id: c,
|
|
1848
|
-
ariaLabel:
|
|
1848
|
+
ariaLabel: o,
|
|
1849
1849
|
ariaLabelledBy: l
|
|
1850
|
-
}),
|
|
1850
|
+
}), u = r === "tile";
|
|
1851
1851
|
return /* @__PURE__ */ p("button", {
|
|
1852
1852
|
type: "button",
|
|
1853
|
-
className:
|
|
1853
|
+
className: ai[r],
|
|
1854
1854
|
disabled: a,
|
|
1855
|
-
onClick:
|
|
1855
|
+
onClick: i,
|
|
1856
1856
|
...s,
|
|
1857
|
-
children: [
|
|
1857
|
+
children: [t !== void 0 && /* @__PURE__ */ n("span", {
|
|
1858
1858
|
className: "woi4bh0",
|
|
1859
|
-
children:
|
|
1860
|
-
}), e !== void 0 && /* @__PURE__ */
|
|
1861
|
-
className:
|
|
1859
|
+
children: t
|
|
1860
|
+
}), e !== void 0 && /* @__PURE__ */ n("span", {
|
|
1861
|
+
className: u ? "woi4bh2" : "woi4bh1",
|
|
1862
1862
|
children: e
|
|
1863
1863
|
})]
|
|
1864
1864
|
});
|
|
1865
|
-
},
|
|
1866
|
-
const e =
|
|
1865
|
+
}, Ve = ue(null), E = () => {
|
|
1866
|
+
const e = ae(Ve);
|
|
1867
1867
|
if (!e) throw new Error("An editing section must sit inside an <EditorPanel.Root> bound to a graph — pass it a `handle`, or render the panel inside a <GraphProvider>.");
|
|
1868
1868
|
return e;
|
|
1869
|
-
},
|
|
1870
|
-
const
|
|
1871
|
-
return /* @__PURE__ */
|
|
1872
|
-
onKeyDown: (
|
|
1873
|
-
if (
|
|
1874
|
-
const l =
|
|
1875
|
-
l && (
|
|
1869
|
+
}, Qn = ({ children: e, onKeyDown: t, ...i }) => {
|
|
1870
|
+
const r = ae(Ve);
|
|
1871
|
+
return /* @__PURE__ */ n("div", {
|
|
1872
|
+
onKeyDown: (o) => {
|
|
1873
|
+
if (t?.(o), !r || o.defaultPrevented) return;
|
|
1874
|
+
const l = Rt(o.nativeEvent);
|
|
1875
|
+
l && (o.preventDefault(), l === "undo" ? r.undo() : r.redo());
|
|
1876
1876
|
},
|
|
1877
|
-
...
|
|
1877
|
+
...i,
|
|
1878
1878
|
children: e
|
|
1879
1879
|
});
|
|
1880
|
-
},
|
|
1881
|
-
const
|
|
1882
|
-
|
|
1880
|
+
}, Jn = "keyboard", Pe = (e) => {
|
|
1881
|
+
const t = be(!1), i = be(!1), r = () => {
|
|
1882
|
+
t.current = !1, i.current && (i.current = !1, e?.());
|
|
1883
1883
|
};
|
|
1884
1884
|
return {
|
|
1885
1885
|
commitAfterChange: () => {
|
|
1886
|
-
if (
|
|
1887
|
-
|
|
1886
|
+
if (t.current) {
|
|
1887
|
+
i.current = !0;
|
|
1888
1888
|
return;
|
|
1889
1889
|
}
|
|
1890
1890
|
e?.();
|
|
1891
1891
|
},
|
|
1892
1892
|
commitUnlessHeldKey: (a) => {
|
|
1893
1893
|
if (a) {
|
|
1894
|
-
|
|
1894
|
+
i.current = !0;
|
|
1895
1895
|
return;
|
|
1896
1896
|
}
|
|
1897
1897
|
e?.();
|
|
1898
1898
|
},
|
|
1899
1899
|
gestureHandlers: {
|
|
1900
1900
|
onKeyDown: () => {
|
|
1901
|
-
|
|
1901
|
+
t.current = !0;
|
|
1902
1902
|
},
|
|
1903
|
-
onKeyUp:
|
|
1903
|
+
onKeyUp: r,
|
|
1904
1904
|
onBlur: (a) => {
|
|
1905
|
-
a.relatedTarget instanceof Node && a.currentTarget.contains(a.relatedTarget) ||
|
|
1905
|
+
a.relatedTarget instanceof Node && a.currentTarget.contains(a.relatedTarget) || r();
|
|
1906
1906
|
}
|
|
1907
1907
|
}
|
|
1908
1908
|
};
|
|
1909
|
-
},
|
|
1910
|
-
var
|
|
1911
|
-
const m =
|
|
1909
|
+
}, ii = "eh8dvc0", li = "eh8dvc1 uz3g760", si = "eh8dvc2 uz3g761";
|
|
1910
|
+
var ci = ({ value: e, onChange: t, onCommit: i, min: r, max: a, step: o, prefix: l, suffix: c, isDisabled: s, hasError: u, ariaLabel: d, ariaLabelledBy: h, id: v }) => {
|
|
1911
|
+
const m = Y({
|
|
1912
1912
|
id: v,
|
|
1913
|
-
ariaLabel:
|
|
1913
|
+
ariaLabel: d,
|
|
1914
1914
|
ariaLabelledBy: h
|
|
1915
|
-
}), { commitUnlessHeldKey: g, gestureHandlers:
|
|
1916
|
-
return /* @__PURE__ */
|
|
1917
|
-
className:
|
|
1915
|
+
}), { commitUnlessHeldKey: g, gestureHandlers: y } = Pe(i);
|
|
1916
|
+
return /* @__PURE__ */ n(Ye.Root, {
|
|
1917
|
+
className: ii,
|
|
1918
1918
|
value: e,
|
|
1919
|
-
onValueChange: (
|
|
1920
|
-
onValueCommitted: (
|
|
1921
|
-
g(
|
|
1919
|
+
onValueChange: (I) => t(I),
|
|
1920
|
+
onValueCommitted: (I, S) => {
|
|
1921
|
+
g(S.reason === Jn);
|
|
1922
1922
|
},
|
|
1923
|
-
min:
|
|
1923
|
+
min: r,
|
|
1924
1924
|
max: a,
|
|
1925
|
-
step:
|
|
1925
|
+
step: o,
|
|
1926
1926
|
disabled: s,
|
|
1927
|
-
children: /* @__PURE__ */ p(
|
|
1928
|
-
className:
|
|
1929
|
-
"data-error":
|
|
1927
|
+
children: /* @__PURE__ */ p(Qn, {
|
|
1928
|
+
className: li,
|
|
1929
|
+
"data-error": u === !0,
|
|
1930
1930
|
"data-disabled": s === !0 ? "" : void 0,
|
|
1931
1931
|
children: [
|
|
1932
|
-
l !== void 0 && /* @__PURE__ */
|
|
1932
|
+
l !== void 0 && /* @__PURE__ */ n("span", {
|
|
1933
1933
|
className: "eh8dvc3",
|
|
1934
1934
|
children: l
|
|
1935
1935
|
}),
|
|
1936
|
-
/* @__PURE__ */
|
|
1937
|
-
className:
|
|
1938
|
-
...
|
|
1939
|
-
"aria-invalid":
|
|
1936
|
+
/* @__PURE__ */ n(Ye.Input, {
|
|
1937
|
+
className: si,
|
|
1938
|
+
...y,
|
|
1939
|
+
"aria-invalid": u === !0 ? !0 : void 0,
|
|
1940
1940
|
...m
|
|
1941
1941
|
}),
|
|
1942
|
-
c !== void 0 && /* @__PURE__ */
|
|
1942
|
+
c !== void 0 && /* @__PURE__ */ n("span", {
|
|
1943
1943
|
className: "eh8dvc3",
|
|
1944
1944
|
children: c
|
|
1945
1945
|
})
|
|
1946
1946
|
]
|
|
1947
1947
|
})
|
|
1948
1948
|
});
|
|
1949
|
-
},
|
|
1949
|
+
}, di = "_1b7s5f0", te = {
|
|
1950
1950
|
1: "_1b7s5f1",
|
|
1951
1951
|
2: "_1b7s5f2",
|
|
1952
1952
|
3: "_1b7s5f3",
|
|
1953
1953
|
4: "_1b7s5f4",
|
|
1954
1954
|
5: "_1b7s5f5",
|
|
1955
1955
|
6: "_1b7s5f6"
|
|
1956
|
-
},
|
|
1957
|
-
var
|
|
1958
|
-
const
|
|
1959
|
-
id:
|
|
1956
|
+
}, hi = "_1b7s5f7";
|
|
1957
|
+
var ui = 6, mi = ({ options: e, value: t, onChange: i, onCommit: r, columns: a, itemLayout: o = "tile", isDisabled: l, ariaLabel: c, ariaLabelledBy: s, id: u }) => {
|
|
1958
|
+
const d = Y({
|
|
1959
|
+
id: u,
|
|
1960
1960
|
ariaLabel: c,
|
|
1961
1961
|
ariaLabelledBy: s
|
|
1962
|
-
}), h =
|
|
1963
|
-
return /* @__PURE__ */
|
|
1964
|
-
className:
|
|
1965
|
-
value:
|
|
1962
|
+
}), h = o === "swatch", { commitAfterChange: v, gestureHandlers: m } = Pe(r);
|
|
1963
|
+
return /* @__PURE__ */ n(Nn, {
|
|
1964
|
+
className: re(di, pi(a ?? e.length)),
|
|
1965
|
+
value: t,
|
|
1966
1966
|
onValueChange: (g) => {
|
|
1967
|
-
|
|
1967
|
+
i(g), v();
|
|
1968
1968
|
},
|
|
1969
1969
|
...m,
|
|
1970
1970
|
disabled: l,
|
|
1971
|
-
...
|
|
1972
|
-
children: e.map((g) => /* @__PURE__ */ p(
|
|
1971
|
+
...d,
|
|
1972
|
+
children: e.map((g) => /* @__PURE__ */ p(Ln.Root, {
|
|
1973
1973
|
value: g.value,
|
|
1974
1974
|
disabled: g.isDisabled,
|
|
1975
|
-
className:
|
|
1975
|
+
className: re(hi, h && "_1b7s5f8"),
|
|
1976
1976
|
"aria-label": h ? g.label : void 0,
|
|
1977
|
-
children: [g.icon, !h && /* @__PURE__ */
|
|
1977
|
+
children: [g.icon, !h && /* @__PURE__ */ n("span", {
|
|
1978
1978
|
className: "_1b7s5f9",
|
|
1979
1979
|
children: g.label
|
|
1980
1980
|
})]
|
|
1981
1981
|
}, g.value))
|
|
1982
1982
|
});
|
|
1983
|
-
},
|
|
1984
|
-
switch (Math.min(Math.max(Math.round(e), 1),
|
|
1983
|
+
}, pi = (e) => {
|
|
1984
|
+
switch (Math.min(Math.max(Math.round(e), 1), ui)) {
|
|
1985
1985
|
case 1:
|
|
1986
|
-
return
|
|
1986
|
+
return te[1];
|
|
1987
1987
|
case 2:
|
|
1988
|
-
return
|
|
1988
|
+
return te[2];
|
|
1989
1989
|
case 3:
|
|
1990
|
-
return
|
|
1990
|
+
return te[3];
|
|
1991
1991
|
case 4:
|
|
1992
|
-
return
|
|
1992
|
+
return te[4];
|
|
1993
1993
|
case 5:
|
|
1994
|
-
return
|
|
1994
|
+
return te[5];
|
|
1995
1995
|
default:
|
|
1996
|
-
return
|
|
1996
|
+
return te[6];
|
|
1997
1997
|
}
|
|
1998
|
-
},
|
|
1999
|
-
var
|
|
2000
|
-
const
|
|
1998
|
+
}, gi = "_1g5x15w0 uz3g760", vi = "_1g5x15w1", fi = "_1g5x15w2", on = "_1g5x15w3", bi = "_1g5x15w4", Ci = "_1g5x15w5", Si = "_1g5x15w6", yi = "_1g5x15w7";
|
|
1999
|
+
var wi = ({ options: e, value: t, onChange: i, placeholder: r, isDisabled: a, hasError: o, ariaLabel: l, ariaLabelledBy: c, id: s }) => {
|
|
2000
|
+
const u = Y({
|
|
2001
2001
|
id: s,
|
|
2002
2002
|
ariaLabel: l,
|
|
2003
2003
|
ariaLabelledBy: c
|
|
2004
2004
|
});
|
|
2005
|
-
return /* @__PURE__ */ p(
|
|
2006
|
-
value:
|
|
2007
|
-
onValueChange: (
|
|
2005
|
+
return /* @__PURE__ */ p(U.Root, {
|
|
2006
|
+
value: t,
|
|
2007
|
+
onValueChange: (d) => d !== null && i(d),
|
|
2008
2008
|
disabled: a,
|
|
2009
|
-
items: e.map((
|
|
2010
|
-
value:
|
|
2011
|
-
label:
|
|
2009
|
+
items: e.map((d) => ({
|
|
2010
|
+
value: d.value,
|
|
2011
|
+
label: d.label
|
|
2012
2012
|
})),
|
|
2013
|
-
children: [/* @__PURE__ */ p(
|
|
2014
|
-
className:
|
|
2015
|
-
"data-error":
|
|
2016
|
-
...
|
|
2017
|
-
children: [/* @__PURE__ */
|
|
2018
|
-
className:
|
|
2019
|
-
children: (
|
|
2020
|
-
}), /* @__PURE__ */
|
|
2021
|
-
className:
|
|
2022
|
-
children: /* @__PURE__ */
|
|
2013
|
+
children: [/* @__PURE__ */ p(U.Trigger, {
|
|
2014
|
+
className: gi,
|
|
2015
|
+
"data-error": o === !0,
|
|
2016
|
+
...u,
|
|
2017
|
+
children: [/* @__PURE__ */ n(U.Value, {
|
|
2018
|
+
className: vi,
|
|
2019
|
+
children: (d) => Pi(e, d, r)
|
|
2020
|
+
}), /* @__PURE__ */ n(U.Icon, {
|
|
2021
|
+
className: on,
|
|
2022
|
+
children: /* @__PURE__ */ n(Se, { size: "sm" })
|
|
2023
2023
|
})]
|
|
2024
|
-
}), /* @__PURE__ */
|
|
2025
|
-
container:
|
|
2026
|
-
children: /* @__PURE__ */
|
|
2027
|
-
className:
|
|
2024
|
+
}), /* @__PURE__ */ n(U.Portal, {
|
|
2025
|
+
container: ke(),
|
|
2026
|
+
children: /* @__PURE__ */ n(he, { children: /* @__PURE__ */ n(U.Positioner, {
|
|
2027
|
+
className: bi,
|
|
2028
2028
|
sideOffset: 4,
|
|
2029
2029
|
alignItemWithTrigger: !1,
|
|
2030
|
-
children: /* @__PURE__ */
|
|
2031
|
-
className:
|
|
2032
|
-
children: e.map((
|
|
2033
|
-
value:
|
|
2034
|
-
disabled:
|
|
2035
|
-
className:
|
|
2030
|
+
children: /* @__PURE__ */ n(U.Popup, {
|
|
2031
|
+
className: Ci,
|
|
2032
|
+
children: e.map((d) => /* @__PURE__ */ p(U.Item, {
|
|
2033
|
+
value: d.value,
|
|
2034
|
+
disabled: d.isDisabled,
|
|
2035
|
+
className: Si,
|
|
2036
2036
|
children: [
|
|
2037
|
-
|
|
2037
|
+
d.icon,
|
|
2038
2038
|
/* @__PURE__ */ p("span", {
|
|
2039
|
-
className:
|
|
2040
|
-
children: [/* @__PURE__ */
|
|
2039
|
+
className: yi,
|
|
2040
|
+
children: [/* @__PURE__ */ n(U.ItemText, { children: d.label }), d.description !== void 0 && /* @__PURE__ */ n("span", {
|
|
2041
2041
|
className: "_1g5x15w8",
|
|
2042
|
-
children:
|
|
2042
|
+
children: d.description
|
|
2043
2043
|
})]
|
|
2044
2044
|
}),
|
|
2045
|
-
/* @__PURE__ */
|
|
2046
|
-
className:
|
|
2047
|
-
children: /* @__PURE__ */
|
|
2045
|
+
/* @__PURE__ */ n(U.ItemIndicator, {
|
|
2046
|
+
className: on,
|
|
2047
|
+
children: /* @__PURE__ */ n(Dt, { size: "sm" })
|
|
2048
2048
|
})
|
|
2049
2049
|
]
|
|
2050
|
-
},
|
|
2050
|
+
}, d.value))
|
|
2051
2051
|
})
|
|
2052
2052
|
}) })
|
|
2053
2053
|
})]
|
|
2054
2054
|
});
|
|
2055
|
-
},
|
|
2056
|
-
className:
|
|
2057
|
-
children:
|
|
2058
|
-
}) :
|
|
2059
|
-
var
|
|
2060
|
-
const h =
|
|
2061
|
-
ariaLabel:
|
|
2062
|
-
ariaLabelledBy:
|
|
2063
|
-
}, !1), v =
|
|
2055
|
+
}, Pi = (e, t, i) => t === null ? /* @__PURE__ */ n("span", {
|
|
2056
|
+
className: fi,
|
|
2057
|
+
children: i
|
|
2058
|
+
}) : Ii(e, t), Ii = (e, t) => e.find((i) => i.value === t)?.label ?? t, xi = "vod76w0", Ti = "vod76w1", Ai = "vod76w2", Li = "vod76w3", Ni = "vod76w4", Oi = "vod76w5";
|
|
2059
|
+
var Ei = ({ value: e, onChange: t, onCommit: i, min: r, max: a, step: o, suffix: l, formatValue: c, isDisabled: s, ariaLabel: u, ariaLabelledBy: d }) => {
|
|
2060
|
+
const h = Y({
|
|
2061
|
+
ariaLabel: u,
|
|
2062
|
+
ariaLabelledBy: d
|
|
2063
|
+
}, !1), v = _i(e, l, c), { commitUnlessHeldKey: m, gestureHandlers: g } = Pe(i);
|
|
2064
2064
|
return /* @__PURE__ */ p("div", {
|
|
2065
|
-
className:
|
|
2066
|
-
children: [/* @__PURE__ */
|
|
2067
|
-
className:
|
|
2065
|
+
className: xi,
|
|
2066
|
+
children: [/* @__PURE__ */ n(oe.Root, {
|
|
2067
|
+
className: Ti,
|
|
2068
2068
|
value: e,
|
|
2069
|
-
onValueChange: (
|
|
2070
|
-
onValueCommitted: (
|
|
2071
|
-
m(
|
|
2069
|
+
onValueChange: (y) => t(y),
|
|
2070
|
+
onValueCommitted: (y, I) => {
|
|
2071
|
+
m(I.reason === Jn);
|
|
2072
2072
|
},
|
|
2073
|
-
min:
|
|
2073
|
+
min: r,
|
|
2074
2074
|
max: a,
|
|
2075
|
-
step:
|
|
2075
|
+
step: o,
|
|
2076
2076
|
disabled: s,
|
|
2077
|
-
children: /* @__PURE__ */
|
|
2078
|
-
className:
|
|
2079
|
-
children: /* @__PURE__ */ p(
|
|
2080
|
-
className:
|
|
2081
|
-
children: [/* @__PURE__ */
|
|
2082
|
-
className:
|
|
2077
|
+
children: /* @__PURE__ */ n(oe.Control, {
|
|
2078
|
+
className: Ai,
|
|
2079
|
+
children: /* @__PURE__ */ p(oe.Track, {
|
|
2080
|
+
className: Li,
|
|
2081
|
+
children: [/* @__PURE__ */ n(oe.Indicator, { className: Ni }), /* @__PURE__ */ n(oe.Thumb, {
|
|
2082
|
+
className: Oi,
|
|
2083
2083
|
...g,
|
|
2084
2084
|
...h
|
|
2085
2085
|
})]
|
|
2086
2086
|
})
|
|
2087
2087
|
})
|
|
2088
|
-
}), v !== null && /* @__PURE__ */
|
|
2088
|
+
}), v !== null && /* @__PURE__ */ n("span", {
|
|
2089
2089
|
className: "vod76w6",
|
|
2090
2090
|
children: v
|
|
2091
2091
|
})]
|
|
2092
2092
|
});
|
|
2093
|
-
},
|
|
2094
|
-
const l =
|
|
2095
|
-
id:
|
|
2096
|
-
ariaLabel:
|
|
2093
|
+
}, _i = (e, t, i) => i !== void 0 ? i(e) : t !== void 0 ? `${e}${t}` : null, ki = "_1hyrlw60", Mi = "_1hyrlw61", Ri = ({ isChecked: e, onChange: t, isDisabled: i, ariaLabel: r, ariaLabelledBy: a, id: o }) => {
|
|
2094
|
+
const l = Y({
|
|
2095
|
+
id: o,
|
|
2096
|
+
ariaLabel: r,
|
|
2097
2097
|
ariaLabelledBy: a
|
|
2098
2098
|
});
|
|
2099
|
-
return /* @__PURE__ */
|
|
2099
|
+
return /* @__PURE__ */ n(Qe.Root, {
|
|
2100
2100
|
checked: e,
|
|
2101
|
-
onCheckedChange: (c) =>
|
|
2102
|
-
disabled:
|
|
2103
|
-
className:
|
|
2101
|
+
onCheckedChange: (c) => t(c),
|
|
2102
|
+
disabled: i,
|
|
2103
|
+
className: ki,
|
|
2104
2104
|
...l,
|
|
2105
|
-
children: /* @__PURE__ */
|
|
2105
|
+
children: /* @__PURE__ */ n(Qe.Thumb, { className: Mi })
|
|
2106
2106
|
});
|
|
2107
|
-
},
|
|
2108
|
-
const
|
|
2107
|
+
}, Di = "uz3g761", zi = "tpcnun0 uz3g760", Fi = ({ value: e, onChange: t, onCommit: i, placeholder: r, isDisabled: a, hasError: o, ariaLabel: l, ariaLabelledBy: c, id: s }) => {
|
|
2108
|
+
const u = Y({
|
|
2109
2109
|
id: s,
|
|
2110
2110
|
ariaLabel: l,
|
|
2111
2111
|
ariaLabelledBy: c
|
|
2112
2112
|
});
|
|
2113
|
-
return /* @__PURE__ */
|
|
2114
|
-
className:
|
|
2115
|
-
"data-error":
|
|
2116
|
-
children: /* @__PURE__ */
|
|
2117
|
-
className:
|
|
2113
|
+
return /* @__PURE__ */ n(Qn, {
|
|
2114
|
+
className: zi,
|
|
2115
|
+
"data-error": o === !0,
|
|
2116
|
+
children: /* @__PURE__ */ n(ea, {
|
|
2117
|
+
className: Di,
|
|
2118
2118
|
value: e,
|
|
2119
|
-
onValueChange: (
|
|
2120
|
-
onBlur:
|
|
2121
|
-
placeholder:
|
|
2119
|
+
onValueChange: (d) => t(d),
|
|
2120
|
+
onBlur: i,
|
|
2121
|
+
placeholder: r,
|
|
2122
2122
|
disabled: a,
|
|
2123
|
-
"aria-invalid":
|
|
2124
|
-
...
|
|
2123
|
+
"aria-invalid": o === !0 ? !0 : void 0,
|
|
2124
|
+
...u
|
|
2125
2125
|
})
|
|
2126
2126
|
});
|
|
2127
|
-
},
|
|
2128
|
-
var
|
|
2129
|
-
const
|
|
2127
|
+
}, Hi = "cnu9yl0", Vi = "cnu9yl1";
|
|
2128
|
+
var Ki = ({ options: e, value: t, onChange: i, onCommit: r, itemLayout: a = "inline", isDisabled: o, ariaLabel: l, ariaLabelledBy: c, id: s }) => {
|
|
2129
|
+
const u = Y({
|
|
2130
2130
|
id: s,
|
|
2131
2131
|
ariaLabel: l,
|
|
2132
2132
|
ariaLabelledBy: c
|
|
2133
|
-
}),
|
|
2134
|
-
return /* @__PURE__ */
|
|
2135
|
-
className:
|
|
2136
|
-
value:
|
|
2133
|
+
}), d = a === "stacked", { commitAfterChange: h, gestureHandlers: v } = Pe(r);
|
|
2134
|
+
return /* @__PURE__ */ n(Nn, {
|
|
2135
|
+
className: Hi,
|
|
2136
|
+
value: t,
|
|
2137
2137
|
onValueChange: (m) => {
|
|
2138
|
-
|
|
2138
|
+
i(m), h();
|
|
2139
2139
|
},
|
|
2140
2140
|
...v,
|
|
2141
|
-
disabled:
|
|
2142
|
-
...
|
|
2143
|
-
children: e.map((m) => /* @__PURE__ */ p(
|
|
2141
|
+
disabled: o,
|
|
2142
|
+
...u,
|
|
2143
|
+
children: e.map((m) => /* @__PURE__ */ p(Ln.Root, {
|
|
2144
2144
|
value: m.value,
|
|
2145
2145
|
disabled: m.isDisabled,
|
|
2146
|
-
className:
|
|
2147
|
-
"aria-label":
|
|
2148
|
-
children: [m.icon,
|
|
2146
|
+
className: re(Vi, d && "cnu9yl2"),
|
|
2147
|
+
"aria-label": Gi(m, d),
|
|
2148
|
+
children: [m.icon, et(m, d) && /* @__PURE__ */ n("span", {
|
|
2149
2149
|
className: "cnu9yl3",
|
|
2150
2150
|
children: m.label
|
|
2151
2151
|
})]
|
|
2152
2152
|
}, m.value))
|
|
2153
2153
|
});
|
|
2154
|
-
},
|
|
2155
|
-
if (!
|
|
2154
|
+
}, et = (e, t) => e.icon === void 0 || t, Gi = (e, t) => {
|
|
2155
|
+
if (!et(e, t))
|
|
2156
2156
|
return e.label;
|
|
2157
|
-
},
|
|
2158
|
-
ToggleGroup:
|
|
2159
|
-
Switch:
|
|
2160
|
-
Slider:
|
|
2161
|
-
RadioGrid:
|
|
2162
|
-
Button:
|
|
2163
|
-
TextField:
|
|
2164
|
-
NumberField:
|
|
2165
|
-
Select:
|
|
2166
|
-
},
|
|
2167
|
-
const
|
|
2168
|
-
...
|
|
2157
|
+
}, nt = {
|
|
2158
|
+
ToggleGroup: Ki,
|
|
2159
|
+
Switch: Ri,
|
|
2160
|
+
Slider: Ei,
|
|
2161
|
+
RadioGrid: mi,
|
|
2162
|
+
Button: oi,
|
|
2163
|
+
TextField: Fi,
|
|
2164
|
+
NumberField: ci,
|
|
2165
|
+
Select: wi
|
|
2166
|
+
}, tt = ue(nt), Bi = ({ controls: e, children: t }) => {
|
|
2167
|
+
const i = O(() => ({
|
|
2168
|
+
...nt,
|
|
2169
2169
|
...e
|
|
2170
2170
|
}), [e]);
|
|
2171
|
-
return /* @__PURE__ */
|
|
2172
|
-
value:
|
|
2173
|
-
children:
|
|
2171
|
+
return /* @__PURE__ */ n(tt.Provider, {
|
|
2172
|
+
value: i,
|
|
2173
|
+
children: t
|
|
2174
2174
|
});
|
|
2175
|
-
},
|
|
2176
|
-
className:
|
|
2175
|
+
}, _ = () => ae(tt), Ui = "_12lhx9e0", qi = ({ children: e }) => /* @__PURE__ */ n("div", {
|
|
2176
|
+
className: Ui,
|
|
2177
2177
|
children: e
|
|
2178
|
-
}),
|
|
2179
|
-
className:
|
|
2178
|
+
}), Wi = "_139ohwv0", V = ({ children: e }) => /* @__PURE__ */ n("div", {
|
|
2179
|
+
className: Wi,
|
|
2180
2180
|
children: e
|
|
2181
|
-
}),
|
|
2182
|
-
const e =
|
|
2181
|
+
}), rt = ue(null), $i = rt.Provider, Zi = () => {
|
|
2182
|
+
const e = ae(rt);
|
|
2183
2183
|
if (!e) throw new Error("A section must be rendered inside <EditorPanel.Root>.");
|
|
2184
2184
|
return e;
|
|
2185
|
-
},
|
|
2186
|
-
List:
|
|
2187
|
-
Grid:
|
|
2188
|
-
}
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2185
|
+
}, Xi = "_1jlczkt0", ji = "data-graphy-editor-panel", Yi = {
|
|
2186
|
+
List: V,
|
|
2187
|
+
Grid: qi
|
|
2188
|
+
};
|
|
2189
|
+
function Qi(e) {
|
|
2190
|
+
if (e === void 0) return !1;
|
|
2191
|
+
const t = e.split(/\s+/);
|
|
2192
|
+
return t.includes("_1ii3bsb0") || t.includes("_1ii3bsb1");
|
|
2193
|
+
}
|
|
2194
|
+
var Ji = ({ handle: e, children: t, controls: i, defaultExpandedSection: r = void 0, className: a }) => {
|
|
2195
|
+
const o = kt(e), { themeClass: l, inlineVarsStyle: c } = Me(), [s, u] = $(() => r ? [r] : []), d = O(() => ({
|
|
2196
|
+
expandSection: (h) => u([h]),
|
|
2197
|
+
collapseAllSections: () => u([])
|
|
2192
2198
|
}), []);
|
|
2193
|
-
return /* @__PURE__ */
|
|
2194
|
-
value:
|
|
2195
|
-
children: /* @__PURE__ */
|
|
2196
|
-
controls:
|
|
2197
|
-
children: /* @__PURE__ */
|
|
2198
|
-
value:
|
|
2199
|
-
children: /* @__PURE__ */
|
|
2200
|
-
[
|
|
2201
|
-
className:
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2199
|
+
return /* @__PURE__ */ n(Ve.Provider, {
|
|
2200
|
+
value: o,
|
|
2201
|
+
children: /* @__PURE__ */ n(Bi, {
|
|
2202
|
+
controls: i,
|
|
2203
|
+
children: /* @__PURE__ */ n($i, {
|
|
2204
|
+
value: d,
|
|
2205
|
+
children: /* @__PURE__ */ n(le.Root, {
|
|
2206
|
+
[ji]: "",
|
|
2207
|
+
className: re(Xi, a, { [l]: !Qi(a) }),
|
|
2208
|
+
style: c,
|
|
2209
|
+
value: s,
|
|
2210
|
+
onValueChange: (h) => u(h),
|
|
2211
|
+
children: t
|
|
2205
2212
|
})
|
|
2206
2213
|
})
|
|
2207
2214
|
})
|
|
2208
2215
|
});
|
|
2209
|
-
},
|
|
2210
|
-
Root:
|
|
2211
|
-
Controls:
|
|
2212
|
-
},
|
|
2216
|
+
}, at = {
|
|
2217
|
+
Root: Ji,
|
|
2218
|
+
Controls: Yi
|
|
2219
|
+
}, ln = {
|
|
2213
2220
|
stack: "pr583x0",
|
|
2214
2221
|
grid: "pr583x1"
|
|
2215
|
-
},
|
|
2216
|
-
const
|
|
2217
|
-
return e === void 0 ? /* @__PURE__ */
|
|
2218
|
-
className:
|
|
2219
|
-
children: /* @__PURE__ */
|
|
2220
|
-
className:
|
|
2221
|
-
children:
|
|
2222
|
+
}, sn = "pr583x2", el = "pr583x3", b = ({ label: e, layout: t = "grid", children: i }) => {
|
|
2223
|
+
const r = de(), a = de();
|
|
2224
|
+
return e === void 0 ? /* @__PURE__ */ n("div", {
|
|
2225
|
+
className: ln[t],
|
|
2226
|
+
children: /* @__PURE__ */ n("div", {
|
|
2227
|
+
className: sn,
|
|
2228
|
+
children: i
|
|
2222
2229
|
})
|
|
2223
2230
|
}) : /* @__PURE__ */ p("div", {
|
|
2224
|
-
className:
|
|
2225
|
-
children: [/* @__PURE__ */
|
|
2226
|
-
id:
|
|
2231
|
+
className: ln[t],
|
|
2232
|
+
children: [/* @__PURE__ */ n("label", {
|
|
2233
|
+
id: r,
|
|
2227
2234
|
htmlFor: a,
|
|
2228
|
-
className:
|
|
2235
|
+
className: el,
|
|
2229
2236
|
children: e
|
|
2230
|
-
}), /* @__PURE__ */
|
|
2231
|
-
className:
|
|
2232
|
-
children: /* @__PURE__ */
|
|
2233
|
-
labelId:
|
|
2237
|
+
}), /* @__PURE__ */ n("div", {
|
|
2238
|
+
className: sn,
|
|
2239
|
+
children: /* @__PURE__ */ n(Yn, {
|
|
2240
|
+
labelId: r,
|
|
2234
2241
|
controlId: a,
|
|
2235
|
-
children:
|
|
2242
|
+
children: i
|
|
2236
2243
|
})
|
|
2237
2244
|
})]
|
|
2238
2245
|
});
|
|
2239
|
-
},
|
|
2246
|
+
}, nl = (e) => /* @__PURE__ */ n(M, {
|
|
2240
2247
|
...e,
|
|
2241
|
-
children: /* @__PURE__ */
|
|
2248
|
+
children: /* @__PURE__ */ n("g", {
|
|
2242
2249
|
stroke: "currentColor",
|
|
2243
2250
|
strokeWidth: 2,
|
|
2244
2251
|
strokeLinecap: "round",
|
|
2245
2252
|
strokeLinejoin: "round",
|
|
2246
|
-
children: /* @__PURE__ */
|
|
2253
|
+
children: /* @__PURE__ */ n("path", { d: "m9 6 6 6-6 6" })
|
|
2247
2254
|
})
|
|
2248
|
-
}),
|
|
2249
|
-
var
|
|
2250
|
-
var
|
|
2255
|
+
}), Ke = "_40zvwv0", Ge = "_40zvwv1", tl = "_40zvwv2", ot = "_40zvwv3", rl = "_40zvwv4 _40zvwv3";
|
|
2256
|
+
var al = "_40zvwv6";
|
|
2257
|
+
var ol = "_40zvwv8", H = ({ title: e, layout: t = "fixed", preview: i, accessory: r, onOpenChange: a, children: o }) => t === "collapsible" ? /* @__PURE__ */ n(ll, {
|
|
2251
2258
|
title: e,
|
|
2252
|
-
preview:
|
|
2253
|
-
accessory:
|
|
2259
|
+
preview: i,
|
|
2260
|
+
accessory: r,
|
|
2254
2261
|
onOpenChange: a,
|
|
2255
|
-
children:
|
|
2256
|
-
}) :
|
|
2262
|
+
children: o
|
|
2263
|
+
}) : t === "inline" && i === void 0 ? /* @__PURE__ */ n(il, {
|
|
2257
2264
|
title: e,
|
|
2258
|
-
accessory:
|
|
2259
|
-
children:
|
|
2265
|
+
accessory: r,
|
|
2266
|
+
children: o
|
|
2260
2267
|
}) : /* @__PURE__ */ p("div", {
|
|
2261
|
-
className:
|
|
2268
|
+
className: Ke,
|
|
2262
2269
|
children: [/* @__PURE__ */ p("div", {
|
|
2263
|
-
className:
|
|
2270
|
+
className: Ge,
|
|
2264
2271
|
children: [
|
|
2265
|
-
/* @__PURE__ */
|
|
2266
|
-
className:
|
|
2272
|
+
/* @__PURE__ */ n("span", {
|
|
2273
|
+
className: ot,
|
|
2267
2274
|
children: e
|
|
2268
2275
|
}),
|
|
2269
|
-
|
|
2276
|
+
i !== void 0 && /* @__PURE__ */ n("span", {
|
|
2270
2277
|
className: "_40zvwv5",
|
|
2271
|
-
children:
|
|
2278
|
+
children: i
|
|
2272
2279
|
}),
|
|
2273
|
-
|
|
2280
|
+
r !== void 0 && /* @__PURE__ */ n("span", {
|
|
2274
2281
|
className: "_40zvwv7",
|
|
2275
|
-
children:
|
|
2282
|
+
children: r
|
|
2276
2283
|
})
|
|
2277
2284
|
]
|
|
2278
|
-
}), /* @__PURE__ */
|
|
2279
|
-
}),
|
|
2280
|
-
const
|
|
2281
|
-
return /* @__PURE__ */
|
|
2282
|
-
className:
|
|
2285
|
+
}), /* @__PURE__ */ n("div", { children: o })]
|
|
2286
|
+
}), il = ({ title: e, accessory: t, children: i }) => {
|
|
2287
|
+
const r = de(), a = de();
|
|
2288
|
+
return /* @__PURE__ */ n("div", {
|
|
2289
|
+
className: Ke,
|
|
2283
2290
|
children: /* @__PURE__ */ p("div", {
|
|
2284
|
-
className:
|
|
2291
|
+
className: Ge,
|
|
2285
2292
|
children: [
|
|
2286
|
-
/* @__PURE__ */
|
|
2287
|
-
id:
|
|
2293
|
+
/* @__PURE__ */ n("label", {
|
|
2294
|
+
id: r,
|
|
2288
2295
|
htmlFor: a,
|
|
2289
|
-
className:
|
|
2296
|
+
className: rl,
|
|
2290
2297
|
children: e
|
|
2291
2298
|
}),
|
|
2292
|
-
/* @__PURE__ */
|
|
2293
|
-
className:
|
|
2294
|
-
children: /* @__PURE__ */
|
|
2295
|
-
labelId:
|
|
2299
|
+
/* @__PURE__ */ n("span", {
|
|
2300
|
+
className: al,
|
|
2301
|
+
children: /* @__PURE__ */ n(Yn, {
|
|
2302
|
+
labelId: r,
|
|
2296
2303
|
controlId: a,
|
|
2297
|
-
children:
|
|
2304
|
+
children: i
|
|
2298
2305
|
})
|
|
2299
2306
|
}),
|
|
2300
|
-
|
|
2307
|
+
t !== void 0 && /* @__PURE__ */ n("span", {
|
|
2301
2308
|
className: "_40zvwv7",
|
|
2302
|
-
children:
|
|
2309
|
+
children: t
|
|
2303
2310
|
})
|
|
2304
2311
|
]
|
|
2305
2312
|
})
|
|
2306
2313
|
});
|
|
2307
|
-
},
|
|
2308
|
-
const
|
|
2309
|
-
return /* @__PURE__ */ p(
|
|
2314
|
+
}, ll = ({ title: e, preview: t, accessory: i, onOpenChange: r, children: a }) => {
|
|
2315
|
+
const o = T();
|
|
2316
|
+
return /* @__PURE__ */ p(le.Item, {
|
|
2310
2317
|
value: e,
|
|
2311
|
-
className:
|
|
2312
|
-
onOpenChange:
|
|
2313
|
-
children: [/* @__PURE__ */ p(
|
|
2314
|
-
className:
|
|
2315
|
-
render: /* @__PURE__ */
|
|
2318
|
+
className: Ke,
|
|
2319
|
+
onOpenChange: r,
|
|
2320
|
+
children: [/* @__PURE__ */ p(le.Header, {
|
|
2321
|
+
className: Ge,
|
|
2322
|
+
render: /* @__PURE__ */ n("div", {}),
|
|
2316
2323
|
children: [
|
|
2317
|
-
/* @__PURE__ */
|
|
2318
|
-
className:
|
|
2319
|
-
"aria-label":
|
|
2324
|
+
/* @__PURE__ */ n(le.Trigger, {
|
|
2325
|
+
className: tl,
|
|
2326
|
+
"aria-label": o("editor.accessibility.toggleSection", { title: e })
|
|
2320
2327
|
}),
|
|
2321
|
-
/* @__PURE__ */
|
|
2322
|
-
className:
|
|
2328
|
+
/* @__PURE__ */ n("span", {
|
|
2329
|
+
className: ot,
|
|
2323
2330
|
children: e
|
|
2324
2331
|
}),
|
|
2325
|
-
|
|
2332
|
+
t !== void 0 && /* @__PURE__ */ n("span", {
|
|
2326
2333
|
className: "_40zvwv5",
|
|
2327
|
-
children:
|
|
2334
|
+
children: t
|
|
2328
2335
|
}),
|
|
2329
|
-
|
|
2336
|
+
i !== void 0 && /* @__PURE__ */ n("span", {
|
|
2330
2337
|
className: "_40zvwv7",
|
|
2331
|
-
children:
|
|
2338
|
+
children: i
|
|
2332
2339
|
}),
|
|
2333
|
-
/* @__PURE__ */
|
|
2334
|
-
className:
|
|
2335
|
-
children: /* @__PURE__ */
|
|
2340
|
+
/* @__PURE__ */ n("span", {
|
|
2341
|
+
className: ol,
|
|
2342
|
+
children: /* @__PURE__ */ n(nl, { size: "sm" })
|
|
2336
2343
|
})
|
|
2337
2344
|
]
|
|
2338
|
-
}), /* @__PURE__ */
|
|
2345
|
+
}), /* @__PURE__ */ n(le.Panel, { children: /* @__PURE__ */ n("div", { children: a }) })]
|
|
2339
2346
|
});
|
|
2340
|
-
},
|
|
2341
|
-
const { expandSection: l, collapseAllSections: c } =
|
|
2342
|
-
return /* @__PURE__ */
|
|
2347
|
+
}, ys = ({ title: e, isChecked: t, onToggle: i, isDisabled: r, preview: a, children: o }) => {
|
|
2348
|
+
const { expandSection: l, collapseAllSections: c } = Zi(), { Switch: s } = _();
|
|
2349
|
+
return /* @__PURE__ */ n(H, {
|
|
2343
2350
|
title: e,
|
|
2344
2351
|
layout: "collapsible",
|
|
2345
2352
|
preview: a,
|
|
2346
2353
|
onOpenChange: (h) => {
|
|
2347
|
-
h && !
|
|
2354
|
+
h && !t && r !== !0 && i(!0);
|
|
2348
2355
|
},
|
|
2349
|
-
accessory: /* @__PURE__ */
|
|
2350
|
-
isChecked:
|
|
2356
|
+
accessory: /* @__PURE__ */ n(s, {
|
|
2357
|
+
isChecked: t,
|
|
2351
2358
|
onChange: (h) => {
|
|
2352
|
-
|
|
2359
|
+
i(h), h ? l(e) : c();
|
|
2353
2360
|
},
|
|
2354
|
-
isDisabled:
|
|
2361
|
+
isDisabled: r,
|
|
2355
2362
|
ariaLabel: e
|
|
2356
2363
|
}),
|
|
2357
|
-
children:
|
|
2364
|
+
children: o
|
|
2358
2365
|
});
|
|
2359
|
-
},
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
},
|
|
2366
|
+
}, sl = {
|
|
2367
|
+
horizontal: ["bottom", "top"],
|
|
2368
|
+
vertical: ["left", "right"]
|
|
2369
|
+
}, cl = {
|
|
2363
2370
|
left: "editor.axesPanel.position.left",
|
|
2364
2371
|
right: "editor.axesPanel.position.right",
|
|
2365
2372
|
top: "editor.axesPanel.position.top",
|
|
2366
2373
|
bottom: "editor.axesPanel.position.bottom"
|
|
2367
|
-
},
|
|
2374
|
+
}, dl = {
|
|
2368
2375
|
x: "editor.axesPanel.mainAxisSection.xAxis",
|
|
2369
2376
|
y: "editor.axesPanel.mainAxisSection.yAxis"
|
|
2370
|
-
},
|
|
2371
|
-
const a =
|
|
2372
|
-
if (!
|
|
2373
|
-
const
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
+
}, cn = ({ axis: e, title: t, layout: i = "collapsible", preview: r }) => {
|
|
2378
|
+
const a = E(), o = F(a), l = T(), { NumberField: c, Switch: s, TextField: u, ToggleGroup: d } = _();
|
|
2379
|
+
if (!o) return null;
|
|
2380
|
+
const h = o.coordSystem.type === "polar" ? o.coordSystem.axisMapping[e].geometry : "linear", v = o.config.axes[e], m = o.scales[e], g = m?.spec, y = g?.scaleType === "continuous" ? g : void 0;
|
|
2381
|
+
if (h === "circular" || h === "radial" && y === void 0) return null;
|
|
2382
|
+
const I = g !== void 0 && "reverse" in g ? g : void 0, S = g?.scaleType === "continuous" || g?.scaleType === "datetime", f = e === "y" && y !== void 0 && o.layers.some((C) => C.yScaleType === "primary" && C.geom === "bar"), P = y?.transform === "log", x = y?.domainMax ?? null, R = hl(y), K = (C, Z) => C.map((me) => ({
|
|
2383
|
+
value: me,
|
|
2384
|
+
label: Z(me)
|
|
2385
|
+
})), N = o.guides.axes.find((C) => C.scaleAestheticKey === e)?.position, D = sl[N === "bottom" || N === "top" || N === void 0 && e === "x" ? "horizontal" : "vertical"], A = o.guides.legends.drawn.some((C) => D.some((Z) => Z === C.position)), w = D.map((C) => ({
|
|
2377
2386
|
value: C,
|
|
2378
|
-
label: l(
|
|
2379
|
-
})),
|
|
2387
|
+
label: l(cl[C])
|
|
2388
|
+
})), L = K(["auto", "edges"], (C) => l(C === "edges" ? "editor.axesPanel.labelMode.edges" : "editor.axesPanel.labelMode.auto")), Q = K(["linear", "log"], (C) => l(C === "log" ? "editor.axesPanel.scale.log" : "editor.axesPanel.scale.auto")), ct = K([
|
|
2380
2389
|
"auto",
|
|
2381
2390
|
"zero",
|
|
2382
2391
|
"custom"
|
|
2383
|
-
], (C) => l(C === "zero" ? "editor.axesPanel.startFrom.zero" : C === "custom" ? "editor.axesPanel.startFrom.custom" : "editor.axesPanel.startFrom.auto")),
|
|
2384
|
-
a.commands.dispatch(new
|
|
2392
|
+
], (C) => l(C === "zero" ? "editor.axesPanel.startFrom.zero" : C === "custom" ? "editor.axesPanel.startFrom.custom" : "editor.axesPanel.startFrom.auto")), dt = K(["auto", "custom"], (C) => l(C === "custom" ? "editor.axesPanel.endAt.custom" : "editor.axesPanel.endAt.auto")), ht = K(["no", "yes"], (C) => l(C === "yes" ? "editor.axesPanel.yesNo.yes" : "editor.axesPanel.yesNo.no")), ut = (C) => {
|
|
2393
|
+
a.commands.dispatch(new Jt({
|
|
2394
|
+
axis: e,
|
|
2395
|
+
isVisible: C
|
|
2396
|
+
}));
|
|
2397
|
+
}, mt = (C) => {
|
|
2398
|
+
a.commands.dispatch(new Xt({
|
|
2399
|
+
axis: e,
|
|
2400
|
+
label: C === "" ? null : C
|
|
2401
|
+
}), { transient: !0 });
|
|
2402
|
+
}, pt = (C) => {
|
|
2403
|
+
a.commands.dispatch(new Qt({
|
|
2404
|
+
axis: e,
|
|
2405
|
+
isVisible: C
|
|
2406
|
+
}));
|
|
2407
|
+
}, gt = (C) => {
|
|
2408
|
+
a.commands.dispatch(new Yt({
|
|
2409
|
+
axis: e,
|
|
2410
|
+
tickMode: C === "edges" ? "edges" : "auto"
|
|
2411
|
+
}));
|
|
2412
|
+
}, vt = (C) => {
|
|
2413
|
+
a.commands.dispatch(new Pr({
|
|
2414
|
+
scaledAesthetic: e,
|
|
2415
|
+
reverse: C === "yes"
|
|
2416
|
+
}));
|
|
2417
|
+
}, ft = (C) => {
|
|
2418
|
+
a.commands.dispatch(new Ir({
|
|
2419
|
+
scaledAesthetic: e,
|
|
2420
|
+
transform: C === "log" ? "log" : "linear"
|
|
2421
|
+
}));
|
|
2422
|
+
}, qe = (C) => {
|
|
2423
|
+
a.commands.dispatch(new pe({
|
|
2385
2424
|
scaledAesthetic: e,
|
|
2386
2425
|
...C
|
|
2387
2426
|
}), { transient: !0 });
|
|
2388
|
-
},
|
|
2389
|
-
|
|
2427
|
+
}, bt = (C) => {
|
|
2428
|
+
C !== null && qe({ domainMin: C });
|
|
2429
|
+
}, Ct = (C) => {
|
|
2430
|
+
C !== null && qe({ domainMax: C });
|
|
2431
|
+
}, St = (C) => {
|
|
2432
|
+
if (y) {
|
|
2390
2433
|
if (C === "custom") {
|
|
2391
|
-
|
|
2434
|
+
y.zero && a.commands.dispatch(new je({
|
|
2392
2435
|
scaledAesthetic: e,
|
|
2393
2436
|
zero: !1
|
|
2394
|
-
})), a.commands.dispatch(new
|
|
2437
|
+
})), a.commands.dispatch(new pe({
|
|
2395
2438
|
scaledAesthetic: e,
|
|
2396
|
-
domainMin:
|
|
2439
|
+
domainMin: dn(m?.domain, "start")
|
|
2397
2440
|
}));
|
|
2398
2441
|
return;
|
|
2399
2442
|
}
|
|
2400
|
-
|
|
2443
|
+
y.domainMin !== null && a.commands.dispatch(new pe({
|
|
2401
2444
|
scaledAesthetic: e,
|
|
2402
2445
|
domainMin: null
|
|
2403
|
-
})), a.commands.dispatch(new
|
|
2446
|
+
})), a.commands.dispatch(new je({
|
|
2404
2447
|
scaledAesthetic: e,
|
|
2405
2448
|
zero: C === "zero"
|
|
2406
2449
|
}));
|
|
2407
2450
|
}
|
|
2408
|
-
},
|
|
2409
|
-
const Z = C === "custom" ?
|
|
2410
|
-
a.commands.dispatch(new
|
|
2451
|
+
}, yt = (C) => {
|
|
2452
|
+
const Z = C === "custom" ? dn(m?.domain, "end") : null;
|
|
2453
|
+
a.commands.dispatch(new pe({
|
|
2411
2454
|
scaledAesthetic: e,
|
|
2412
2455
|
domainMax: Z
|
|
2413
2456
|
}));
|
|
2414
|
-
},
|
|
2415
|
-
const Z =
|
|
2416
|
-
Z && a.commands.dispatch(new
|
|
2457
|
+
}, wt = (C) => {
|
|
2458
|
+
const Z = D.find((me) => me === C);
|
|
2459
|
+
Z && a.commands.dispatch(new jt({
|
|
2417
2460
|
axis: e,
|
|
2418
2461
|
position: Z
|
|
2419
2462
|
}));
|
|
2420
2463
|
};
|
|
2421
|
-
return /* @__PURE__ */
|
|
2422
|
-
title:
|
|
2423
|
-
layout:
|
|
2424
|
-
preview:
|
|
2425
|
-
children: /* @__PURE__ */ p(
|
|
2426
|
-
/* @__PURE__ */
|
|
2464
|
+
return /* @__PURE__ */ n(H, {
|
|
2465
|
+
title: t ?? l(dl[e]),
|
|
2466
|
+
layout: i,
|
|
2467
|
+
preview: r,
|
|
2468
|
+
children: /* @__PURE__ */ p(V, { children: [
|
|
2469
|
+
/* @__PURE__ */ n(b, {
|
|
2427
2470
|
label: l("editor.axesPanel.controls.visible"),
|
|
2428
|
-
children: /* @__PURE__ */
|
|
2429
|
-
isChecked:
|
|
2430
|
-
onChange:
|
|
2431
|
-
axis: e,
|
|
2432
|
-
isVisible: C
|
|
2433
|
-
}))
|
|
2471
|
+
children: /* @__PURE__ */ n(s, {
|
|
2472
|
+
isChecked: v.isVisible,
|
|
2473
|
+
onChange: ut
|
|
2434
2474
|
})
|
|
2435
2475
|
}),
|
|
2436
|
-
|
|
2476
|
+
h === "linear" && /* @__PURE__ */ p(q, { children: [/* @__PURE__ */ n(b, {
|
|
2477
|
+
label: l("editor.axesPanel.controls.title"),
|
|
2478
|
+
children: /* @__PURE__ */ n(u, {
|
|
2479
|
+
value: v.label ?? "",
|
|
2480
|
+
onChange: mt,
|
|
2481
|
+
onCommit: a.commands.seal
|
|
2482
|
+
})
|
|
2483
|
+
}), /* @__PURE__ */ n(b, {
|
|
2484
|
+
label: l("editor.axesPanel.controls.ticks"),
|
|
2485
|
+
children: /* @__PURE__ */ n(s, {
|
|
2486
|
+
isChecked: v.ticks.isVisible,
|
|
2487
|
+
onChange: pt
|
|
2488
|
+
})
|
|
2489
|
+
})] }),
|
|
2490
|
+
S && /* @__PURE__ */ n(b, {
|
|
2437
2491
|
label: l("editor.axesPanel.controls.labels"),
|
|
2438
|
-
children: /* @__PURE__ */
|
|
2439
|
-
value:
|
|
2440
|
-
options:
|
|
2441
|
-
onChange:
|
|
2442
|
-
axis: e,
|
|
2443
|
-
tickMode: C === "edges" ? "edges" : "auto"
|
|
2444
|
-
}))
|
|
2492
|
+
children: /* @__PURE__ */ n(d, {
|
|
2493
|
+
value: v.ticks.mode,
|
|
2494
|
+
options: L,
|
|
2495
|
+
onChange: gt
|
|
2445
2496
|
})
|
|
2446
2497
|
}),
|
|
2447
|
-
|
|
2498
|
+
y && h === "linear" && !A && /* @__PURE__ */ n(b, {
|
|
2448
2499
|
label: l("editor.axesPanel.controls.position"),
|
|
2449
|
-
children: /* @__PURE__ */
|
|
2450
|
-
value:
|
|
2451
|
-
options:
|
|
2452
|
-
onChange:
|
|
2500
|
+
children: /* @__PURE__ */ n(d, {
|
|
2501
|
+
value: N ?? v.position,
|
|
2502
|
+
options: w,
|
|
2503
|
+
onChange: wt
|
|
2453
2504
|
})
|
|
2454
2505
|
}),
|
|
2455
|
-
|
|
2506
|
+
I !== void 0 && /* @__PURE__ */ n(b, {
|
|
2456
2507
|
label: l("editor.axesPanel.controls.reverse"),
|
|
2457
|
-
children: /* @__PURE__ */
|
|
2458
|
-
value:
|
|
2459
|
-
options:
|
|
2460
|
-
onChange:
|
|
2461
|
-
scaledAesthetic: e,
|
|
2462
|
-
reverse: C === "yes"
|
|
2463
|
-
}))
|
|
2508
|
+
children: /* @__PURE__ */ n(d, {
|
|
2509
|
+
value: I.reverse === !0 ? "yes" : "no",
|
|
2510
|
+
options: ht,
|
|
2511
|
+
onChange: vt
|
|
2464
2512
|
})
|
|
2465
2513
|
}),
|
|
2466
|
-
|
|
2514
|
+
y && !f && /* @__PURE__ */ n(b, {
|
|
2467
2515
|
label: l("editor.axesPanel.controls.scale"),
|
|
2468
|
-
children: /* @__PURE__ */
|
|
2469
|
-
value:
|
|
2470
|
-
options:
|
|
2471
|
-
onChange:
|
|
2472
|
-
scaledAesthetic: e,
|
|
2473
|
-
transform: C === "log" ? "log" : "linear"
|
|
2474
|
-
}))
|
|
2516
|
+
children: /* @__PURE__ */ n(d, {
|
|
2517
|
+
value: P ? "log" : "linear",
|
|
2518
|
+
options: Q,
|
|
2519
|
+
onChange: ft
|
|
2475
2520
|
})
|
|
2476
2521
|
}),
|
|
2477
|
-
|
|
2478
|
-
!
|
|
2522
|
+
y && !P && /* @__PURE__ */ p(q, { children: [
|
|
2523
|
+
!f && /* @__PURE__ */ p(q, { children: [/* @__PURE__ */ n(b, {
|
|
2479
2524
|
label: l("editor.axesPanel.controls.startFrom"),
|
|
2480
|
-
children: /* @__PURE__ */
|
|
2481
|
-
value:
|
|
2482
|
-
options:
|
|
2483
|
-
onChange:
|
|
2525
|
+
children: /* @__PURE__ */ n(d, {
|
|
2526
|
+
value: R,
|
|
2527
|
+
options: ct,
|
|
2528
|
+
onChange: St
|
|
2484
2529
|
})
|
|
2485
|
-
}),
|
|
2530
|
+
}), R === "custom" && /* @__PURE__ */ n(b, {
|
|
2486
2531
|
label: l("editor.axesPanel.controls.value"),
|
|
2487
|
-
children: /* @__PURE__ */
|
|
2488
|
-
value:
|
|
2489
|
-
onChange:
|
|
2532
|
+
children: /* @__PURE__ */ n(c, {
|
|
2533
|
+
value: y.domainMin ?? null,
|
|
2534
|
+
onChange: bt,
|
|
2490
2535
|
onCommit: a.commands.seal
|
|
2491
2536
|
})
|
|
2492
2537
|
})] }),
|
|
2493
|
-
/* @__PURE__ */
|
|
2538
|
+
/* @__PURE__ */ n(b, {
|
|
2494
2539
|
label: l("editor.axesPanel.controls.endAt"),
|
|
2495
|
-
children: /* @__PURE__ */
|
|
2496
|
-
value:
|
|
2497
|
-
options:
|
|
2498
|
-
onChange:
|
|
2540
|
+
children: /* @__PURE__ */ n(d, {
|
|
2541
|
+
value: x === null ? "auto" : "custom",
|
|
2542
|
+
options: dt,
|
|
2543
|
+
onChange: yt
|
|
2499
2544
|
})
|
|
2500
2545
|
}),
|
|
2501
|
-
|
|
2546
|
+
x !== null && /* @__PURE__ */ n(b, {
|
|
2502
2547
|
label: l("editor.axesPanel.controls.value"),
|
|
2503
|
-
children: /* @__PURE__ */
|
|
2504
|
-
value:
|
|
2505
|
-
onChange:
|
|
2548
|
+
children: /* @__PURE__ */ n(c, {
|
|
2549
|
+
value: x,
|
|
2550
|
+
onChange: Ct,
|
|
2506
2551
|
onCommit: a.commands.seal
|
|
2507
2552
|
})
|
|
2508
2553
|
})
|
|
2509
2554
|
] })
|
|
2510
2555
|
] })
|
|
2511
2556
|
});
|
|
2512
|
-
},
|
|
2513
|
-
const
|
|
2514
|
-
return typeof
|
|
2515
|
-
},
|
|
2516
|
-
const
|
|
2517
|
-
return /* @__PURE__ */
|
|
2518
|
-
label:
|
|
2519
|
-
children: /* @__PURE__ */
|
|
2557
|
+
}, hl = (e) => e === void 0 ? "auto" : e.domainMin !== null && e.domainMin !== void 0 ? "custom" : e.zero === !0 ? "zero" : "auto", dn = (e, t) => {
|
|
2558
|
+
const i = t === "start" ? e?.[0] : e?.[e.length - 1];
|
|
2559
|
+
return typeof i == "number" ? i : 0;
|
|
2560
|
+
}, Be = ({ value: e, onChange: t }) => {
|
|
2561
|
+
const i = E(), r = T(), { TextField: a } = _(), o = e !== null && typeof e != "string", l = (c) => t(c === "" ? null : c);
|
|
2562
|
+
return /* @__PURE__ */ n(b, {
|
|
2563
|
+
label: r("editor.elementsPanel.contentValue"),
|
|
2564
|
+
children: /* @__PURE__ */ n(a, {
|
|
2520
2565
|
value: typeof e == "string" ? e : "",
|
|
2521
2566
|
onChange: l,
|
|
2522
|
-
onCommit:
|
|
2523
|
-
isDisabled:
|
|
2567
|
+
onCommit: i.commands.seal,
|
|
2568
|
+
isDisabled: o
|
|
2524
2569
|
})
|
|
2525
2570
|
});
|
|
2526
|
-
},
|
|
2527
|
-
const
|
|
2571
|
+
}, ul = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
2572
|
+
const r = E(), a = F(r), o = T(), { Switch: l } = _();
|
|
2528
2573
|
if (!a) return null;
|
|
2529
|
-
const c = a.config.content
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2574
|
+
const c = a.config.content, s = (d) => {
|
|
2575
|
+
r.commands.dispatch(new we({
|
|
2576
|
+
slot: "caption",
|
|
2577
|
+
isVisible: d
|
|
2578
|
+
}));
|
|
2579
|
+
}, u = (d) => {
|
|
2580
|
+
r.commands.dispatch(new tr({ caption: d }), { transient: !0 });
|
|
2581
|
+
};
|
|
2582
|
+
return /* @__PURE__ */ n(H, {
|
|
2583
|
+
title: e ?? o("editor.elementsPanel.footerSection.caption"),
|
|
2584
|
+
layout: t,
|
|
2585
|
+
preview: i,
|
|
2586
|
+
children: /* @__PURE__ */ p(V, { children: [/* @__PURE__ */ n(b, {
|
|
2587
|
+
label: o("editor.elementsPanel.contentVisible"),
|
|
2588
|
+
children: /* @__PURE__ */ n(l, {
|
|
2537
2589
|
isChecked: c.isCaptionVisible,
|
|
2538
|
-
onChange:
|
|
2539
|
-
slot: "caption",
|
|
2540
|
-
isVisible: s
|
|
2541
|
-
}))
|
|
2590
|
+
onChange: s
|
|
2542
2591
|
})
|
|
2543
|
-
}), /* @__PURE__ */
|
|
2592
|
+
}), /* @__PURE__ */ n(Be, {
|
|
2544
2593
|
value: c.caption,
|
|
2545
|
-
onChange:
|
|
2594
|
+
onChange: u
|
|
2546
2595
|
})] })
|
|
2547
2596
|
});
|
|
2548
|
-
},
|
|
2549
|
-
const
|
|
2597
|
+
}, hn = /^[a-z][a-z\d+.-]*:/i, ml = {}, pl = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
2598
|
+
const r = E(), a = F(r), o = T(), { Switch: l } = _();
|
|
2550
2599
|
if (!a) return null;
|
|
2551
|
-
const c = a.config.content
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2600
|
+
const c = a.config.content, s = (u) => {
|
|
2601
|
+
r.commands.dispatch(new we({
|
|
2602
|
+
slot: "source",
|
|
2603
|
+
isVisible: u
|
|
2604
|
+
}));
|
|
2605
|
+
};
|
|
2606
|
+
return /* @__PURE__ */ n(H, {
|
|
2607
|
+
title: e ?? o("editor.elementsPanel.sourceSection.title"),
|
|
2608
|
+
layout: t,
|
|
2609
|
+
preview: i,
|
|
2610
|
+
children: /* @__PURE__ */ p(V, { children: [/* @__PURE__ */ n(b, {
|
|
2611
|
+
label: o("editor.elementsPanel.contentVisible"),
|
|
2612
|
+
children: /* @__PURE__ */ n(l, {
|
|
2559
2613
|
isChecked: c.isSourceVisible,
|
|
2560
|
-
onChange:
|
|
2561
|
-
slot: "source",
|
|
2562
|
-
isVisible: s
|
|
2563
|
-
}))
|
|
2614
|
+
onChange: s
|
|
2564
2615
|
})
|
|
2565
|
-
}), /* @__PURE__ */
|
|
2616
|
+
}), /* @__PURE__ */ n(gl, { source: c.source ?? ml })] })
|
|
2566
2617
|
});
|
|
2567
|
-
},
|
|
2568
|
-
const
|
|
2569
|
-
const
|
|
2570
|
-
|
|
2571
|
-
},
|
|
2572
|
-
const
|
|
2573
|
-
|
|
2618
|
+
}, gl = ({ source: e }) => {
|
|
2619
|
+
const t = E(), i = T(), { TextField: r } = _(), a = (s) => {
|
|
2620
|
+
const u = (s.label ?? "") !== "" || (s.url ?? "") !== "";
|
|
2621
|
+
t.commands.dispatch(new rr({ source: u ? s : null }), { transient: !0 });
|
|
2622
|
+
}, o = () => {
|
|
2623
|
+
const s = e.url ?? "";
|
|
2624
|
+
s !== "" && !hn.test(s) && a({
|
|
2574
2625
|
...e,
|
|
2575
|
-
url: `https://${
|
|
2576
|
-
}),
|
|
2577
|
-
}
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2626
|
+
url: `https://${s}`
|
|
2627
|
+
}), t.commands.seal();
|
|
2628
|
+
}, l = (s) => a({
|
|
2629
|
+
...e,
|
|
2630
|
+
url: s
|
|
2631
|
+
}), c = (s) => a({
|
|
2632
|
+
...e,
|
|
2633
|
+
label: s
|
|
2634
|
+
});
|
|
2635
|
+
return /* @__PURE__ */ p(q, { children: [/* @__PURE__ */ n(b, {
|
|
2636
|
+
label: i("editor.elementsPanel.sourceSection.url"),
|
|
2637
|
+
children: /* @__PURE__ */ n(r, {
|
|
2581
2638
|
value: e.url ?? "",
|
|
2582
|
-
onChange:
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
}),
|
|
2586
|
-
onCommit: i,
|
|
2587
|
-
hasError: Ye.test(e.url ?? "") && !_n(e.url)
|
|
2639
|
+
onChange: l,
|
|
2640
|
+
onCommit: o,
|
|
2641
|
+
hasError: hn.test(e.url ?? "") && !Zr(e.url)
|
|
2588
2642
|
})
|
|
2589
|
-
}), /* @__PURE__ */
|
|
2590
|
-
label:
|
|
2591
|
-
children: /* @__PURE__ */
|
|
2643
|
+
}), /* @__PURE__ */ n(b, {
|
|
2644
|
+
label: i("editor.elementsPanel.sourceSection.name"),
|
|
2645
|
+
children: /* @__PURE__ */ n(r, {
|
|
2592
2646
|
value: e.label ?? "",
|
|
2593
|
-
onChange:
|
|
2594
|
-
|
|
2595
|
-
label: l
|
|
2596
|
-
}),
|
|
2597
|
-
onCommit: n.commands.seal
|
|
2647
|
+
onChange: c,
|
|
2648
|
+
onCommit: t.commands.seal
|
|
2598
2649
|
})
|
|
2599
2650
|
})] });
|
|
2600
|
-
},
|
|
2601
|
-
const
|
|
2651
|
+
}, vl = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
2652
|
+
const r = E(), a = F(r), o = T(), { Switch: l } = _();
|
|
2602
2653
|
if (!a) return null;
|
|
2603
|
-
const c = a.config.content
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2654
|
+
const c = a.config.content, s = (d) => {
|
|
2655
|
+
r.commands.dispatch(new we({
|
|
2656
|
+
slot: "subtitle",
|
|
2657
|
+
isVisible: d
|
|
2658
|
+
}));
|
|
2659
|
+
}, u = (d) => {
|
|
2660
|
+
r.commands.dispatch(new ar({ subtitle: d }), { transient: !0 });
|
|
2661
|
+
};
|
|
2662
|
+
return /* @__PURE__ */ n(H, {
|
|
2663
|
+
title: e ?? o("editor.elementsPanel.headerSection.subtitle"),
|
|
2664
|
+
layout: t,
|
|
2665
|
+
preview: i,
|
|
2666
|
+
children: /* @__PURE__ */ p(V, { children: [/* @__PURE__ */ n(b, {
|
|
2667
|
+
label: o("editor.elementsPanel.contentVisible"),
|
|
2668
|
+
children: /* @__PURE__ */ n(l, {
|
|
2611
2669
|
isChecked: c.isSubtitleVisible,
|
|
2612
|
-
onChange:
|
|
2613
|
-
slot: "subtitle",
|
|
2614
|
-
isVisible: s
|
|
2615
|
-
}))
|
|
2670
|
+
onChange: s
|
|
2616
2671
|
})
|
|
2617
|
-
}), /* @__PURE__ */
|
|
2672
|
+
}), /* @__PURE__ */ n(Be, {
|
|
2618
2673
|
value: c.subtitle,
|
|
2619
|
-
onChange:
|
|
2674
|
+
onChange: u
|
|
2620
2675
|
})] })
|
|
2621
2676
|
});
|
|
2622
|
-
},
|
|
2677
|
+
}, Oe = [
|
|
2623
2678
|
0.8,
|
|
2624
2679
|
1,
|
|
2625
2680
|
1.2,
|
|
@@ -2630,93 +2685,589 @@ var qo = "_40zvwv8", z = ({ title: e, layout: n = "fixed", preview: r, accessory
|
|
|
2630
2685
|
2.5,
|
|
2631
2686
|
3,
|
|
2632
2687
|
4
|
|
2633
|
-
],
|
|
2634
|
-
const
|
|
2688
|
+
], fl = Oe.length / 2, bl = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
2689
|
+
const r = E(), a = F(r), o = T(), { RadioGrid: l } = _();
|
|
2635
2690
|
if (!a) return null;
|
|
2636
|
-
const { textScale: c } = a.config.appearance, s = (h) =>
|
|
2691
|
+
const { textScale: c } = a.config.appearance, s = (h) => o("editor.elementsPanel.textSizeSection.scaleFormat", { value: `${h}` }), u = Oe.map((h) => ({
|
|
2637
2692
|
value: `${h}`,
|
|
2638
2693
|
label: s(h)
|
|
2639
|
-
})),
|
|
2640
|
-
const v =
|
|
2641
|
-
v !== void 0 &&
|
|
2694
|
+
})), d = (h) => {
|
|
2695
|
+
const v = Oe.find((m) => `${m}` === h);
|
|
2696
|
+
v !== void 0 && r.commands.dispatch(new Zt({ textScale: v }));
|
|
2642
2697
|
};
|
|
2643
|
-
return /* @__PURE__ */
|
|
2644
|
-
title: e ??
|
|
2645
|
-
layout:
|
|
2646
|
-
preview:
|
|
2647
|
-
children: /* @__PURE__ */
|
|
2698
|
+
return /* @__PURE__ */ n(H, {
|
|
2699
|
+
title: e ?? o("editor.elementsPanel.textSizeSection.title"),
|
|
2700
|
+
layout: t,
|
|
2701
|
+
preview: i ?? s(c),
|
|
2702
|
+
children: /* @__PURE__ */ n(l, {
|
|
2648
2703
|
value: `${c}`,
|
|
2649
|
-
options:
|
|
2650
|
-
columns:
|
|
2651
|
-
onChange:
|
|
2652
|
-
ariaLabel:
|
|
2704
|
+
options: u,
|
|
2705
|
+
columns: fl,
|
|
2706
|
+
onChange: d,
|
|
2707
|
+
ariaLabel: o("editor.elementsPanel.textSizeSection.title")
|
|
2653
2708
|
})
|
|
2654
2709
|
});
|
|
2655
|
-
},
|
|
2656
|
-
const
|
|
2710
|
+
}, Cl = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
2711
|
+
const r = E(), a = F(r), o = T(), { Switch: l } = _();
|
|
2657
2712
|
if (!a) return null;
|
|
2658
|
-
const c = a.config.content
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2713
|
+
const c = a.config.content, s = (d) => {
|
|
2714
|
+
r.commands.dispatch(new we({
|
|
2715
|
+
slot: "title",
|
|
2716
|
+
isVisible: d
|
|
2717
|
+
}));
|
|
2718
|
+
}, u = (d) => {
|
|
2719
|
+
r.commands.dispatch(new or({ title: d }), { transient: !0 });
|
|
2720
|
+
};
|
|
2721
|
+
return /* @__PURE__ */ n(H, {
|
|
2722
|
+
title: e ?? o("editor.elementsPanel.headerSection.toggleTitle"),
|
|
2723
|
+
layout: t,
|
|
2724
|
+
preview: i,
|
|
2725
|
+
children: /* @__PURE__ */ p(V, { children: [/* @__PURE__ */ n(b, {
|
|
2726
|
+
label: o("editor.elementsPanel.contentVisible"),
|
|
2727
|
+
children: /* @__PURE__ */ n(l, {
|
|
2666
2728
|
isChecked: c.isTitleVisible,
|
|
2667
|
-
onChange:
|
|
2668
|
-
slot: "title",
|
|
2669
|
-
isVisible: s
|
|
2670
|
-
}))
|
|
2729
|
+
onChange: s
|
|
2671
2730
|
})
|
|
2672
|
-
}), /* @__PURE__ */
|
|
2731
|
+
}), /* @__PURE__ */ n(Be, {
|
|
2673
2732
|
value: c.title,
|
|
2674
|
-
onChange:
|
|
2733
|
+
onChange: u
|
|
2675
2734
|
})] })
|
|
2676
2735
|
});
|
|
2677
|
-
},
|
|
2678
|
-
...
|
|
2679
|
-
children: e ?? /* @__PURE__ */ p(
|
|
2680
|
-
/* @__PURE__ */
|
|
2681
|
-
/* @__PURE__ */
|
|
2682
|
-
/* @__PURE__ */
|
|
2683
|
-
/* @__PURE__ */
|
|
2684
|
-
/* @__PURE__ */
|
|
2736
|
+
}, ws = ({ children: e, ...t }) => /* @__PURE__ */ n(at.Root, {
|
|
2737
|
+
...t,
|
|
2738
|
+
children: e ?? /* @__PURE__ */ p(q, { children: [
|
|
2739
|
+
/* @__PURE__ */ n(Cl, {}),
|
|
2740
|
+
/* @__PURE__ */ n(vl, {}),
|
|
2741
|
+
/* @__PURE__ */ n(ul, {}),
|
|
2742
|
+
/* @__PURE__ */ n(pl, {}),
|
|
2743
|
+
/* @__PURE__ */ n(bl, {})
|
|
2685
2744
|
] })
|
|
2686
|
-
}),
|
|
2687
|
-
...
|
|
2688
|
-
children: e ?? /* @__PURE__ */ p(
|
|
2689
|
-
}),
|
|
2745
|
+
}), Ps = ({ children: e, ...t }) => /* @__PURE__ */ n(at.Root, {
|
|
2746
|
+
...t,
|
|
2747
|
+
children: e ?? /* @__PURE__ */ p(q, { children: [/* @__PURE__ */ n(cn, { axis: "x" }), /* @__PURE__ */ n(cn, { axis: "y" })] })
|
|
2748
|
+
}), Ie = (e) => `${e}px`, it = (e) => `${Math.round(e * 100)}%`, Sl = (e) => `${e}°`, yl = 24, un = ["dim", "desaturate"], Is = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
2749
|
+
const r = E(), a = F(r), o = T(), { Slider: l, ToggleGroup: c } = _();
|
|
2750
|
+
if (!a) return null;
|
|
2751
|
+
const { cornerRadius: s } = a.config.appearance, u = jr(a.spec), d = un.map((m) => ({
|
|
2752
|
+
value: m,
|
|
2753
|
+
label: o(m === "dim" ? "editor.highlighting.highlightStyle.tint" : "editor.highlighting.highlightStyle.grey")
|
|
2754
|
+
})), h = (m) => {
|
|
2755
|
+
r.commands.dispatch(new $t({ cornerRadius: m }), { transient: !0 });
|
|
2756
|
+
}, v = (m) => {
|
|
2757
|
+
const g = un.find((y) => y === m);
|
|
2758
|
+
g && r.commands.dispatch(new mr({ dimStyle: g }));
|
|
2759
|
+
};
|
|
2760
|
+
return /* @__PURE__ */ n(H, {
|
|
2761
|
+
title: e ?? o("editor.colorPanel.appearanceSection.title"),
|
|
2762
|
+
layout: t,
|
|
2763
|
+
preview: i,
|
|
2764
|
+
children: /* @__PURE__ */ p(V, { children: [/* @__PURE__ */ n(b, {
|
|
2765
|
+
label: o("editor.colorPanel.borderSection.cornerRadius"),
|
|
2766
|
+
children: /* @__PURE__ */ n(l, {
|
|
2767
|
+
value: s,
|
|
2768
|
+
min: 0,
|
|
2769
|
+
max: yl,
|
|
2770
|
+
step: 1,
|
|
2771
|
+
formatValue: Ie,
|
|
2772
|
+
onChange: h,
|
|
2773
|
+
onCommit: r.commands.seal
|
|
2774
|
+
})
|
|
2775
|
+
}), /* @__PURE__ */ n(b, {
|
|
2776
|
+
label: o("editor.colorPanel.appearanceSection.highlightStyle"),
|
|
2777
|
+
children: /* @__PURE__ */ n(c, {
|
|
2778
|
+
value: u,
|
|
2779
|
+
options: d,
|
|
2780
|
+
onChange: v
|
|
2781
|
+
})
|
|
2782
|
+
})] })
|
|
2783
|
+
});
|
|
2784
|
+
}, Ue = (e, t) => {
|
|
2785
|
+
const { colorScheme: i } = Me();
|
|
2786
|
+
return O(() => {
|
|
2787
|
+
const r = e?.layers.find((a) => a.id === t);
|
|
2788
|
+
return r === void 0 ? null : Fr({ colorScheme: i }).geomReaders(r);
|
|
2789
|
+
}, [
|
|
2790
|
+
e,
|
|
2791
|
+
t,
|
|
2792
|
+
i
|
|
2793
|
+
]);
|
|
2794
|
+
}, wl = 0.05, xs = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
2795
|
+
const r = E(), a = F(r), o = T(), { Slider: l, ToggleGroup: c } = _(), s = a ? In(a.spec.layers, "bar") : void 0, u = Ue(a, s?.id ?? null);
|
|
2796
|
+
if (!a || !s || a.coordSystem.type === "polar" && a.coordSystem.bandAxis === null) return null;
|
|
2797
|
+
const d = (m) => {
|
|
2798
|
+
r.commands.dispatch(new nr({
|
|
2799
|
+
layerId: s.id,
|
|
2800
|
+
width: m
|
|
2801
|
+
}), { transient: !0 });
|
|
2802
|
+
}, h = (m) => {
|
|
2803
|
+
const g = We.find((y) => y === m);
|
|
2804
|
+
g && r.commands.dispatch(new er({
|
|
2805
|
+
layerId: s.id,
|
|
2806
|
+
borderRadius: g
|
|
2807
|
+
}));
|
|
2808
|
+
}, v = We.map((m) => ({
|
|
2809
|
+
value: m,
|
|
2810
|
+
label: o(`editor.graphPanel.barSection.roundingOptions.${m}`)
|
|
2811
|
+
}));
|
|
2812
|
+
return /* @__PURE__ */ n(H, {
|
|
2813
|
+
title: e ?? o("editor.graphPanel.barSection.title"),
|
|
2814
|
+
layout: t,
|
|
2815
|
+
preview: i,
|
|
2816
|
+
children: /* @__PURE__ */ p(V, { children: [/* @__PURE__ */ n(b, {
|
|
2817
|
+
label: o("editor.graphPanel.barSection.thickness"),
|
|
2818
|
+
children: /* @__PURE__ */ n(l, {
|
|
2819
|
+
value: s.params.width,
|
|
2820
|
+
min: qt,
|
|
2821
|
+
max: Ut,
|
|
2822
|
+
step: wl,
|
|
2823
|
+
formatValue: it,
|
|
2824
|
+
onChange: d,
|
|
2825
|
+
onCommit: r.commands.seal
|
|
2826
|
+
})
|
|
2827
|
+
}), /* @__PURE__ */ n(b, {
|
|
2828
|
+
label: o("editor.graphPanel.barSection.rounding"),
|
|
2829
|
+
layout: "stack",
|
|
2830
|
+
children: /* @__PURE__ */ n(c, {
|
|
2831
|
+
value: u?.get("borderRadius") ?? Vt,
|
|
2832
|
+
options: v,
|
|
2833
|
+
onChange: h
|
|
2834
|
+
})
|
|
2835
|
+
})] })
|
|
2836
|
+
});
|
|
2837
|
+
}, Ts = ({ layerId: e, title: t, layout: i = "collapsible", preview: r }) => {
|
|
2838
|
+
const a = E(), o = F(a), l = T(), { Switch: c } = _();
|
|
2839
|
+
if (!o) return null;
|
|
2840
|
+
const s = e === void 0 ? o.spec.layers[0] : o.spec.layers.find((N) => N.id === e);
|
|
2841
|
+
if (!s) return null;
|
|
2842
|
+
const { showDataLabels: u, format: d, showStackTotals: h, showCategoryLabels: v } = s.dataLabels, m = o.coordSystem.type === "polar", g = s.geom === "bar", y = s.position === "stack" || s.position === "fill", I = g && !m && s.position === "stack", S = g && (!m || u), f = g || s.geom === "area" && y;
|
|
2843
|
+
if (!Dr(s.geom, o.coordSystem.type)) return null;
|
|
2844
|
+
const P = (N) => {
|
|
2845
|
+
const D = new Tr({
|
|
2846
|
+
layerId: s.id,
|
|
2847
|
+
showDataLabels: N
|
|
2848
|
+
});
|
|
2849
|
+
a.commands.dispatch(D);
|
|
2850
|
+
}, x = (N) => {
|
|
2851
|
+
const D = new ir({
|
|
2852
|
+
layerId: s.id,
|
|
2853
|
+
format: N ? "percentage" : "absolute"
|
|
2854
|
+
});
|
|
2855
|
+
a.commands.dispatch(D);
|
|
2856
|
+
}, R = (N) => {
|
|
2857
|
+
const D = new Nr({
|
|
2858
|
+
layerId: s.id,
|
|
2859
|
+
showStackTotals: N
|
|
2860
|
+
});
|
|
2861
|
+
a.commands.dispatch(D);
|
|
2862
|
+
}, K = (N) => {
|
|
2863
|
+
const D = new xr({
|
|
2864
|
+
layerId: s.id,
|
|
2865
|
+
showCategoryLabels: N
|
|
2866
|
+
});
|
|
2867
|
+
a.commands.dispatch(D);
|
|
2868
|
+
};
|
|
2869
|
+
return /* @__PURE__ */ n(H, {
|
|
2870
|
+
title: t ?? l("editor.graphPanel.graphOptionsSection.title"),
|
|
2871
|
+
layout: i,
|
|
2872
|
+
preview: r,
|
|
2873
|
+
children: /* @__PURE__ */ p(V, { children: [
|
|
2874
|
+
/* @__PURE__ */ n(b, {
|
|
2875
|
+
label: l("editor.graphPanel.graphOptions.dataLabels"),
|
|
2876
|
+
children: /* @__PURE__ */ n(c, {
|
|
2877
|
+
isChecked: u,
|
|
2878
|
+
onChange: P
|
|
2879
|
+
})
|
|
2880
|
+
}),
|
|
2881
|
+
u && f && /* @__PURE__ */ n(b, {
|
|
2882
|
+
label: l("editor.graphPanel.graphOptions.showPercentages"),
|
|
2883
|
+
children: /* @__PURE__ */ n(c, {
|
|
2884
|
+
isChecked: d === "percentage",
|
|
2885
|
+
onChange: x
|
|
2886
|
+
})
|
|
2887
|
+
}),
|
|
2888
|
+
I && /* @__PURE__ */ n(b, {
|
|
2889
|
+
label: l("editor.graphPanel.graphOptions.stackTotals"),
|
|
2890
|
+
children: /* @__PURE__ */ n(c, {
|
|
2891
|
+
isChecked: h,
|
|
2892
|
+
onChange: R
|
|
2893
|
+
})
|
|
2894
|
+
}),
|
|
2895
|
+
S && /* @__PURE__ */ n(b, {
|
|
2896
|
+
label: l("editor.graphPanel.graphOptions.categoryLabels"),
|
|
2897
|
+
children: /* @__PURE__ */ n(c, {
|
|
2898
|
+
isChecked: v,
|
|
2899
|
+
onChange: K
|
|
2900
|
+
})
|
|
2901
|
+
})
|
|
2902
|
+
] })
|
|
2903
|
+
});
|
|
2904
|
+
}, mn = [
|
|
2905
|
+
"solid",
|
|
2906
|
+
"dashed",
|
|
2907
|
+
"dotted"
|
|
2908
|
+
], Pl = Number.parseFloat(Nt.gridLineWidth), Il = 8, xl = 0, As = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
2909
|
+
const r = E(), a = F(r), o = T(), { Slider: l, Switch: c, ToggleGroup: s } = _(), { themeValues: u } = Me();
|
|
2910
|
+
if (!a) return null;
|
|
2911
|
+
const d = a.guides.axes.filter(Tl);
|
|
2912
|
+
if (d.length === 0) return null;
|
|
2913
|
+
const h = a.coordSystem.type !== "polar", v = d.some((f) => f.gridVisible), m = a.config.axes.y.grid, g = mn.map((f) => ({
|
|
2914
|
+
value: f,
|
|
2915
|
+
label: o(`editor.graphPanel.gridSection.lineStyles.${f}`)
|
|
2916
|
+
})), y = (f) => (P) => {
|
|
2917
|
+
r.commands.dispatch(new cr({
|
|
2918
|
+
axis: f,
|
|
2919
|
+
isVisible: P
|
|
2920
|
+
}));
|
|
2921
|
+
}, I = (f) => {
|
|
2922
|
+
const P = mn.find((x) => x === f);
|
|
2923
|
+
P && r.commands.dispatch(new lr({
|
|
2924
|
+
axis: "both",
|
|
2925
|
+
lineStyle: P
|
|
2926
|
+
}));
|
|
2927
|
+
}, S = (f) => {
|
|
2928
|
+
r.commands.dispatch(new sr({
|
|
2929
|
+
axis: "both",
|
|
2930
|
+
lineWidth: f
|
|
2931
|
+
}), { transient: !0 });
|
|
2932
|
+
};
|
|
2933
|
+
return /* @__PURE__ */ n(H, {
|
|
2934
|
+
title: e ?? o("editor.graphPanel.gridSection.title"),
|
|
2935
|
+
layout: t,
|
|
2936
|
+
preview: i,
|
|
2937
|
+
children: /* @__PURE__ */ p(V, { children: [d.map((f) => /* @__PURE__ */ n(b, {
|
|
2938
|
+
label: o(Al(f)),
|
|
2939
|
+
children: /* @__PURE__ */ n(c, {
|
|
2940
|
+
isChecked: f.gridVisible,
|
|
2941
|
+
onChange: y(f.scaleAestheticKey)
|
|
2942
|
+
})
|
|
2943
|
+
}, f.scaleAestheticKey)), h && v && /* @__PURE__ */ p(q, { children: [/* @__PURE__ */ n(b, {
|
|
2944
|
+
label: o("editor.graphPanel.gridSection.gridStyle"),
|
|
2945
|
+
children: /* @__PURE__ */ n(s, {
|
|
2946
|
+
value: m.lineStyle,
|
|
2947
|
+
options: g,
|
|
2948
|
+
onChange: I
|
|
2949
|
+
})
|
|
2950
|
+
}), /* @__PURE__ */ n(b, {
|
|
2951
|
+
label: o("editor.graphPanel.gridSection.gridThickness"),
|
|
2952
|
+
children: /* @__PURE__ */ n(l, {
|
|
2953
|
+
value: m.lineWidth ?? At(u.gridLineWidth, Pl),
|
|
2954
|
+
min: xl,
|
|
2955
|
+
max: Il,
|
|
2956
|
+
step: 0.5,
|
|
2957
|
+
formatValue: Ie,
|
|
2958
|
+
onChange: S,
|
|
2959
|
+
onCommit: r.commands.seal
|
|
2960
|
+
})
|
|
2961
|
+
})] })] })
|
|
2962
|
+
});
|
|
2963
|
+
}, Tl = (e) => e.scaleAestheticKey === "x" || e.scaleAestheticKey === "y", Al = (e) => e.geometry === "radial" ? "editor.graphPanel.gridSection.rings" : e.geometry === "circular" ? "editor.graphPanel.gridSection.spokes" : e.scaleAestheticKey === "x" ? "editor.graphPanel.gridSection.verticalGridLines" : "editor.graphPanel.gridSection.horizontalGridLines", Ll = "total", lt = [
|
|
2964
|
+
"total",
|
|
2965
|
+
"average",
|
|
2966
|
+
"current"
|
|
2967
|
+
], Nl = ["total"], pn = ["previous", "first"], gn = [
|
|
2968
|
+
"auto",
|
|
2969
|
+
"small",
|
|
2970
|
+
"medium",
|
|
2971
|
+
"large"
|
|
2972
|
+
], Ls = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
2973
|
+
const r = E(), a = F(r), o = T(), { Switch: l, ToggleGroup: c } = _();
|
|
2974
|
+
if (!a) return null;
|
|
2975
|
+
const s = a.config.headline, u = s.show !== "none", d = a.coordSystem, h = d.type === "polar", v = d.type === "polar" && d.innerRadius > 0, m = a.layers.some((w) => w.summary.grandTotal !== void 0);
|
|
2976
|
+
if (h && !m) return null;
|
|
2977
|
+
const g = h ? Nl : lt, y = a.guides.headline, I = y?.kind === "perGroup" && y.items.some((w) => w.comparison !== null), S = g.map((w) => ({
|
|
2978
|
+
value: w,
|
|
2979
|
+
label: o(`editor.graphPanel.headlineNumberSection.metrics.${w}`)
|
|
2980
|
+
})), f = pn.map((w) => ({
|
|
2981
|
+
value: w,
|
|
2982
|
+
label: o(`editor.graphPanel.headlineNumberSection.comparison.${w}`)
|
|
2983
|
+
})), P = gn.map((w) => ({
|
|
2984
|
+
value: w,
|
|
2985
|
+
label: o(w === "auto" ? "editor.graphPanel.numberFormat.options.auto" : `editor.graphPanel.headlineNumberSize.sizes.${w}`)
|
|
2986
|
+
})), x = [{
|
|
2987
|
+
value: "above",
|
|
2988
|
+
label: o("editor.graphPanel.headlineNumberSection.position.above")
|
|
2989
|
+
}, {
|
|
2990
|
+
value: "center",
|
|
2991
|
+
label: o("editor.graphPanel.headlineNumberSection.position.center")
|
|
2992
|
+
}], R = (w) => {
|
|
2993
|
+
r.commands.dispatch(new $e({ show: w ? Ll : "none" }));
|
|
2994
|
+
}, K = (w) => {
|
|
2995
|
+
const L = g.find((Q) => Q === w);
|
|
2996
|
+
L && r.commands.dispatch(new $e({ show: L }));
|
|
2997
|
+
}, N = (w) => {
|
|
2998
|
+
const L = pn.find((Q) => Q === w);
|
|
2999
|
+
L && r.commands.dispatch(new dr({ compareWith: L }));
|
|
3000
|
+
}, D = (w) => {
|
|
3001
|
+
const L = gn.find((Q) => Q === w);
|
|
3002
|
+
L && r.commands.dispatch(new ur({ size: L }));
|
|
3003
|
+
}, A = (w) => {
|
|
3004
|
+
r.commands.dispatch(new hr({ position: w === "center" ? "center" : "above" }));
|
|
3005
|
+
};
|
|
3006
|
+
return /* @__PURE__ */ n(H, {
|
|
3007
|
+
title: e ?? o("editor.graphPanel.headlineNumberSection.title"),
|
|
3008
|
+
layout: t,
|
|
3009
|
+
preview: i ?? Ol(o, s.show),
|
|
3010
|
+
children: /* @__PURE__ */ p(V, { children: [/* @__PURE__ */ n(b, {
|
|
3011
|
+
label: o("editor.graphPanel.headlineNumberSection.toggle"),
|
|
3012
|
+
children: /* @__PURE__ */ n(l, {
|
|
3013
|
+
isChecked: u,
|
|
3014
|
+
onChange: R
|
|
3015
|
+
})
|
|
3016
|
+
}), u && /* @__PURE__ */ p(q, { children: [
|
|
3017
|
+
S.length > 1 && /* @__PURE__ */ n(b, {
|
|
3018
|
+
label: o("editor.graphPanel.headlineNumberSection.metricLabel"),
|
|
3019
|
+
layout: "stack",
|
|
3020
|
+
children: /* @__PURE__ */ n(c, {
|
|
3021
|
+
value: s.show,
|
|
3022
|
+
options: S,
|
|
3023
|
+
onChange: K
|
|
3024
|
+
})
|
|
3025
|
+
}),
|
|
3026
|
+
I && /* @__PURE__ */ n(b, {
|
|
3027
|
+
label: o("editor.graphPanel.headlineNumberSection.compareWithLabel"),
|
|
3028
|
+
layout: "stack",
|
|
3029
|
+
children: /* @__PURE__ */ n(c, {
|
|
3030
|
+
value: Yr(s.compareWith),
|
|
3031
|
+
options: f,
|
|
3032
|
+
onChange: N
|
|
3033
|
+
})
|
|
3034
|
+
}),
|
|
3035
|
+
/* @__PURE__ */ n(b, {
|
|
3036
|
+
label: o("editor.graphPanel.headlineNumberSize.sizeLabel"),
|
|
3037
|
+
children: /* @__PURE__ */ n(c, {
|
|
3038
|
+
value: s.size,
|
|
3039
|
+
options: P,
|
|
3040
|
+
onChange: D
|
|
3041
|
+
})
|
|
3042
|
+
}),
|
|
3043
|
+
v && /* @__PURE__ */ n(b, {
|
|
3044
|
+
label: o("editor.axesPanel.controls.position"),
|
|
3045
|
+
children: /* @__PURE__ */ n(c, {
|
|
3046
|
+
value: s.position,
|
|
3047
|
+
options: x,
|
|
3048
|
+
onChange: A
|
|
3049
|
+
})
|
|
3050
|
+
})
|
|
3051
|
+
] })] })
|
|
3052
|
+
});
|
|
3053
|
+
}, Ol = (e, t) => {
|
|
3054
|
+
const i = lt.find((r) => r === t);
|
|
3055
|
+
return i && e(`editor.graphPanel.headlineNumberSection.metrics.${i}`);
|
|
3056
|
+
}, Te = [
|
|
2690
3057
|
"top",
|
|
2691
3058
|
"bottom",
|
|
2692
3059
|
"left",
|
|
2693
3060
|
"right",
|
|
2694
3061
|
"none"
|
|
2695
|
-
],
|
|
2696
|
-
|
|
3062
|
+
], vn = [
|
|
3063
|
+
"auto",
|
|
3064
|
+
"start",
|
|
3065
|
+
"center",
|
|
3066
|
+
"end"
|
|
3067
|
+
], fn = [
|
|
3068
|
+
"auto",
|
|
3069
|
+
"pill",
|
|
3070
|
+
"direct"
|
|
3071
|
+
], Ns = ({ positions: e, title: t, layout: i = "collapsible", preview: r }) => {
|
|
3072
|
+
const a = E(), o = F(a), l = T(), { ToggleGroup: c } = _();
|
|
3073
|
+
if (!o) return null;
|
|
3074
|
+
const s = o.config.legend.position, u = e ?? Te, d = o.guides.legends.drawn[0], h = Rr({
|
|
3075
|
+
legendPosition: o.guides.legends.position,
|
|
3076
|
+
coordSystem: o.coordSystem,
|
|
3077
|
+
layers: o.layers
|
|
3078
|
+
}), v = o.guides.headline?.kind === "perGroup", m = o.guides.colorGroups.length > 0;
|
|
3079
|
+
if (s === "auto" && d === void 0 && !h && (v || !m)) return null;
|
|
3080
|
+
const g = d?.position ?? "none", y = s === "auto" ? g : s, I = Te.filter((A) => A === y || u.includes(A)).map((A) => ({
|
|
3081
|
+
value: A,
|
|
3082
|
+
label: l(`editor.graphPanel.legendSection.${A}`)
|
|
3083
|
+
})), S = (A) => {
|
|
3084
|
+
const w = Te.find((L) => L === A);
|
|
3085
|
+
w && a.commands.dispatch(new vr({ position: w }));
|
|
3086
|
+
}, f = (A) => {
|
|
3087
|
+
const w = vn.find((L) => L === A);
|
|
3088
|
+
w && a.commands.dispatch(new pr({ align: w }));
|
|
3089
|
+
}, P = (A) => {
|
|
3090
|
+
const w = fn.find((L) => L === A);
|
|
3091
|
+
w && a.commands.dispatch(new gr({ display: w }));
|
|
3092
|
+
}, x = vn.map((A) => ({
|
|
3093
|
+
value: A,
|
|
3094
|
+
label: l(`editor.graphPanel.legendSection.align.${A}`)
|
|
3095
|
+
})), R = fn.map((A) => ({
|
|
3096
|
+
value: A,
|
|
3097
|
+
label: l(`editor.graphPanel.legendSection.display.${A}`)
|
|
3098
|
+
})), K = t ?? l("editor.graphPanel.legendSection.title"), N = I.find((A) => A.value === y)?.label, D = d !== void 0;
|
|
3099
|
+
return /* @__PURE__ */ n(H, {
|
|
3100
|
+
title: K,
|
|
3101
|
+
layout: i,
|
|
3102
|
+
preview: r ?? N,
|
|
3103
|
+
children: /* @__PURE__ */ p(V, { children: [
|
|
3104
|
+
/* @__PURE__ */ n(b, {
|
|
3105
|
+
label: l("editor.axesPanel.controls.position"),
|
|
3106
|
+
layout: "stack",
|
|
3107
|
+
children: /* @__PURE__ */ n(c, {
|
|
3108
|
+
value: y,
|
|
3109
|
+
options: I,
|
|
3110
|
+
onChange: S
|
|
3111
|
+
})
|
|
3112
|
+
}),
|
|
3113
|
+
D && /* @__PURE__ */ n(b, {
|
|
3114
|
+
label: l("editor.graphPanel.legendSection.alignLabel"),
|
|
3115
|
+
layout: "stack",
|
|
3116
|
+
children: /* @__PURE__ */ n(c, {
|
|
3117
|
+
value: o.config.legend.align,
|
|
3118
|
+
options: x,
|
|
3119
|
+
onChange: f
|
|
3120
|
+
})
|
|
3121
|
+
}),
|
|
3122
|
+
h && /* @__PURE__ */ n(b, {
|
|
3123
|
+
label: l("editor.graphPanel.legendSection.displayLabel"),
|
|
3124
|
+
layout: "stack",
|
|
3125
|
+
children: /* @__PURE__ */ n(c, {
|
|
3126
|
+
value: o.config.legend.display,
|
|
3127
|
+
options: R,
|
|
3128
|
+
onChange: P
|
|
3129
|
+
})
|
|
3130
|
+
})
|
|
3131
|
+
] })
|
|
3132
|
+
});
|
|
3133
|
+
}, El = 1, _l = 20, kl = 0.5, st = ({ layerId: e }) => {
|
|
3134
|
+
const t = E(), i = F(t), { Slider: r } = _(), a = Ue(i, e);
|
|
2697
3135
|
if (!i) return null;
|
|
2698
|
-
const
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
}
|
|
2705
|
-
return /* @__PURE__ */
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
3136
|
+
const o = (l) => {
|
|
3137
|
+
const c = new Sr({
|
|
3138
|
+
layerId: e,
|
|
3139
|
+
size: l
|
|
3140
|
+
});
|
|
3141
|
+
t.commands.dispatch(c, { transient: !0 });
|
|
3142
|
+
};
|
|
3143
|
+
return /* @__PURE__ */ n(r, {
|
|
3144
|
+
value: a?.get("size") ?? Kt,
|
|
3145
|
+
min: El,
|
|
3146
|
+
max: _l,
|
|
3147
|
+
step: kl,
|
|
3148
|
+
formatValue: Ie,
|
|
3149
|
+
onChange: o,
|
|
3150
|
+
onCommit: t.commands.seal
|
|
3151
|
+
});
|
|
3152
|
+
}, Ml = 1, Rl = 10, Dl = 0.1, zl = [
|
|
3153
|
+
"gap",
|
|
3154
|
+
"zero",
|
|
3155
|
+
"connect"
|
|
3156
|
+
], Os = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
3157
|
+
const r = E(), a = F(r), o = T(), { Select: l, Slider: c, Switch: s, ToggleGroup: u } = _(), d = a?.spec.layers ?? [], h = In(d, "line", "area"), v = Ue(a, h?.id ?? null);
|
|
3158
|
+
if (!a || !h) return null;
|
|
3159
|
+
const m = a.coordSystem.type === "polar", g = Vl(o, h), y = Hl(h, d), I = bn(a.spec, h.geom, "strokeWidth", h.id), S = typeof I == "number", f = h.geom === "line" ? h : void 0, P = [{
|
|
3160
|
+
value: "auto",
|
|
3161
|
+
label: o("editor.graphPanel.numberFormat.options.auto")
|
|
3162
|
+
}, {
|
|
3163
|
+
value: "custom",
|
|
3164
|
+
label: o("editor.graphPanel.numberFormat.options.custom")
|
|
3165
|
+
}], x = (w) => {
|
|
3166
|
+
r.commands.dispatch(new Lr({
|
|
3167
|
+
layerId: h.id,
|
|
3168
|
+
showPoints: w
|
|
3169
|
+
}));
|
|
3170
|
+
}, R = (w) => {
|
|
3171
|
+
f && r.commands.dispatch(new Ar({
|
|
3172
|
+
layerId: f.id,
|
|
3173
|
+
showFill: w
|
|
3174
|
+
}));
|
|
3175
|
+
}, K = (w) => {
|
|
3176
|
+
r.commands.dispatch(new fr({
|
|
3177
|
+
layerId: h.id,
|
|
3178
|
+
interpolate: w ? "catmull-rom" : "linear"
|
|
3179
|
+
}));
|
|
3180
|
+
}, N = (w) => {
|
|
3181
|
+
const L = v?.get("strokeWidth") ?? Gt;
|
|
3182
|
+
r.commands.dispatch(new Ze({
|
|
3183
|
+
layerId: h.id,
|
|
3184
|
+
lineWidth: w === "custom" ? L : null
|
|
3185
|
+
}));
|
|
3186
|
+
}, D = (w) => {
|
|
3187
|
+
r.commands.dispatch(new Ze({
|
|
3188
|
+
layerId: h.id,
|
|
3189
|
+
lineWidth: w
|
|
3190
|
+
}), { transient: !0 });
|
|
3191
|
+
}, A = (w) => {
|
|
3192
|
+
const L = Fl(w);
|
|
3193
|
+
L && r.commands.dispatch(new br({
|
|
3194
|
+
layerId: h.id,
|
|
3195
|
+
missingValues: L
|
|
3196
|
+
}));
|
|
3197
|
+
};
|
|
3198
|
+
return /* @__PURE__ */ n(H, {
|
|
3199
|
+
title: e ?? o("editor.fineTunePanel.lineStyleSection.title"),
|
|
3200
|
+
layout: t,
|
|
3201
|
+
preview: i,
|
|
3202
|
+
children: /* @__PURE__ */ p(V, { children: [
|
|
3203
|
+
/* @__PURE__ */ n(b, {
|
|
3204
|
+
label: o("editor.graphPanel.graphOptions.showPoints"),
|
|
3205
|
+
children: /* @__PURE__ */ n(s, {
|
|
3206
|
+
isChecked: y !== void 0,
|
|
3207
|
+
onChange: x
|
|
3208
|
+
})
|
|
3209
|
+
}),
|
|
3210
|
+
y && /* @__PURE__ */ n(b, {
|
|
3211
|
+
label: o("editor.graphPanel.pointSize.label"),
|
|
3212
|
+
children: /* @__PURE__ */ n(st, { layerId: y.id })
|
|
3213
|
+
}),
|
|
3214
|
+
f && !m && /* @__PURE__ */ n(b, {
|
|
3215
|
+
label: o("editor.graphPanel.graphOptions.lineFill"),
|
|
3216
|
+
children: /* @__PURE__ */ n(s, {
|
|
3217
|
+
isChecked: bn(a.spec, "line", "fillAlpha", f.id) !== void 0,
|
|
3218
|
+
onChange: R
|
|
3219
|
+
})
|
|
3220
|
+
}),
|
|
3221
|
+
!m && /* @__PURE__ */ n(b, {
|
|
3222
|
+
label: o("editor.graphPanel.graphOptions.smoothLines"),
|
|
3223
|
+
children: /* @__PURE__ */ n(s, {
|
|
3224
|
+
isChecked: h.params.interpolate === "catmull-rom",
|
|
3225
|
+
onChange: K
|
|
3226
|
+
})
|
|
3227
|
+
}),
|
|
3228
|
+
/* @__PURE__ */ n(b, {
|
|
3229
|
+
label: o("editor.graphPanel.lineThickness.label"),
|
|
3230
|
+
children: /* @__PURE__ */ n(u, {
|
|
3231
|
+
value: S ? "custom" : "auto",
|
|
3232
|
+
options: P,
|
|
3233
|
+
onChange: N
|
|
3234
|
+
})
|
|
3235
|
+
}),
|
|
3236
|
+
S && /* @__PURE__ */ n(b, {
|
|
3237
|
+
label: o("editor.graphPanel.numberFormat.valueLabel"),
|
|
3238
|
+
children: /* @__PURE__ */ n(c, {
|
|
3239
|
+
value: I,
|
|
3240
|
+
min: Ml,
|
|
3241
|
+
max: Rl,
|
|
3242
|
+
step: Dl,
|
|
3243
|
+
formatValue: Ie,
|
|
3244
|
+
onChange: D,
|
|
3245
|
+
onCommit: r.commands.seal
|
|
3246
|
+
})
|
|
3247
|
+
}),
|
|
3248
|
+
!m && g.length > 1 && /* @__PURE__ */ n(b, {
|
|
3249
|
+
label: o("editor.fineTunePanel.detailSection.missingValues"),
|
|
3250
|
+
children: /* @__PURE__ */ n(l, {
|
|
3251
|
+
value: h.params.missingValues,
|
|
3252
|
+
options: g,
|
|
3253
|
+
onChange: A
|
|
3254
|
+
})
|
|
2716
3255
|
})
|
|
2717
|
-
|
|
3256
|
+
] })
|
|
2718
3257
|
});
|
|
2719
|
-
},
|
|
3258
|
+
}, Fl = (e) => zl.find((t) => t === e), bn = (e, t, i, r) => Gr(e.styles.overrides, _r(t, r))?.declarations?.[i], Hl = (e, t) => Le(t, "point").find((i) => xn(i, [e])), Vl = (e, t) => {
|
|
3259
|
+
const i = [{
|
|
3260
|
+
value: "gap",
|
|
3261
|
+
label: e("editor.graphPanel.treatEmptyValues.leaveGap.label")
|
|
3262
|
+
}, {
|
|
3263
|
+
value: "zero",
|
|
3264
|
+
label: e("editor.graphPanel.treatEmptyValues.fillZero.label")
|
|
3265
|
+
}];
|
|
3266
|
+
return t.position !== "stack" && t.position !== "fill" && i.push({
|
|
3267
|
+
value: "connect",
|
|
3268
|
+
label: e("editor.graphPanel.treatEmptyValues.connectGaps.label")
|
|
3269
|
+
}), t.geom === "area" ? i.filter((r) => r.value !== "gap") : i;
|
|
3270
|
+
}, Kl = "k", Gl = 2, Bl = 0, Ul = 5, Ee = [
|
|
2720
3271
|
{
|
|
2721
3272
|
value: "k",
|
|
2722
3273
|
labelKey: "thousands"
|
|
@@ -2729,101 +3280,161 @@ var qo = "_40zvwv8", z = ({ title: e, layout: n = "fixed", preview: r, accessory
|
|
|
2729
3280
|
value: "b",
|
|
2730
3281
|
labelKey: "billions"
|
|
2731
3282
|
}
|
|
2732
|
-
],
|
|
2733
|
-
const
|
|
3283
|
+
], ql = ["auto", "none"], Es = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
3284
|
+
const r = E(), a = F(r), o = T(), { NumberField: l, ToggleGroup: c } = _();
|
|
2734
3285
|
if (!a) return null;
|
|
2735
|
-
const { abbreviation: s, decimals:
|
|
2736
|
-
value:
|
|
2737
|
-
label:
|
|
2738
|
-
})), m =
|
|
2739
|
-
value:
|
|
2740
|
-
label:
|
|
2741
|
-
})), g = (
|
|
2742
|
-
|
|
2743
|
-
},
|
|
2744
|
-
const
|
|
2745
|
-
g(
|
|
2746
|
-
},
|
|
2747
|
-
const
|
|
2748
|
-
|
|
2749
|
-
},
|
|
2750
|
-
|
|
3286
|
+
const { abbreviation: s, decimals: u } = a.config.numberFormat, d = Wl(s) !== void 0, h = u !== "auto", v = (P) => P.map((x) => ({
|
|
3287
|
+
value: x,
|
|
3288
|
+
label: o(`editor.graphPanel.numberFormat.options.${x}`)
|
|
3289
|
+
})), m = Ee.map(({ value: P, labelKey: x }) => ({
|
|
3290
|
+
value: P,
|
|
3291
|
+
label: o(`common.abbreviations.${x}`)
|
|
3292
|
+
})), g = (P) => {
|
|
3293
|
+
r.commands.dispatch(new Cr({ abbreviation: P }));
|
|
3294
|
+
}, y = (P) => {
|
|
3295
|
+
const x = ql.find((R) => R === P);
|
|
3296
|
+
g(x ?? Kl);
|
|
3297
|
+
}, I = (P) => {
|
|
3298
|
+
const x = Ee.find((R) => R.value === P);
|
|
3299
|
+
x && g(x.value);
|
|
3300
|
+
}, S = (P) => {
|
|
3301
|
+
r.commands.dispatch(new Xe({ decimals: P === "custom" ? Gl : "auto" }));
|
|
3302
|
+
}, f = (P) => {
|
|
3303
|
+
P !== null && r.commands.dispatch(new Xe({ decimals: P }), { transient: !0 });
|
|
2751
3304
|
};
|
|
2752
|
-
return /* @__PURE__ */
|
|
2753
|
-
title: e ??
|
|
2754
|
-
layout:
|
|
2755
|
-
preview:
|
|
2756
|
-
children: /* @__PURE__ */ p(
|
|
2757
|
-
/* @__PURE__ */
|
|
2758
|
-
label:
|
|
2759
|
-
children: /* @__PURE__ */
|
|
2760
|
-
value:
|
|
3305
|
+
return /* @__PURE__ */ n(H, {
|
|
3306
|
+
title: e ?? o("editor.graphPanel.numberFormatSection.title"),
|
|
3307
|
+
layout: t,
|
|
3308
|
+
preview: i,
|
|
3309
|
+
children: /* @__PURE__ */ p(V, { children: [
|
|
3310
|
+
/* @__PURE__ */ n(b, {
|
|
3311
|
+
label: o("editor.graphPanel.numberFormat.abbreviationLabel"),
|
|
3312
|
+
children: /* @__PURE__ */ n(c, {
|
|
3313
|
+
value: d ? "custom" : s,
|
|
2761
3314
|
options: v([
|
|
2762
3315
|
"auto",
|
|
2763
3316
|
"none",
|
|
2764
3317
|
"custom"
|
|
2765
3318
|
]),
|
|
2766
|
-
onChange:
|
|
3319
|
+
onChange: y
|
|
2767
3320
|
})
|
|
2768
3321
|
}),
|
|
2769
|
-
|
|
2770
|
-
label:
|
|
2771
|
-
children: /* @__PURE__ */
|
|
3322
|
+
d && /* @__PURE__ */ n(b, {
|
|
3323
|
+
label: o("editor.graphPanel.numberFormat.valueLabel"),
|
|
3324
|
+
children: /* @__PURE__ */ n(c, {
|
|
2772
3325
|
value: s,
|
|
2773
3326
|
options: m,
|
|
2774
|
-
onChange:
|
|
3327
|
+
onChange: I
|
|
2775
3328
|
})
|
|
2776
3329
|
}),
|
|
2777
|
-
/* @__PURE__ */
|
|
2778
|
-
label:
|
|
2779
|
-
children: /* @__PURE__ */
|
|
3330
|
+
/* @__PURE__ */ n(b, {
|
|
3331
|
+
label: o("editor.graphPanel.numberFormat.decimalPlacesLabel"),
|
|
3332
|
+
children: /* @__PURE__ */ n(c, {
|
|
2780
3333
|
value: h ? "custom" : "auto",
|
|
2781
3334
|
options: v(["auto", "custom"]),
|
|
2782
|
-
onChange:
|
|
3335
|
+
onChange: S
|
|
2783
3336
|
})
|
|
2784
3337
|
}),
|
|
2785
|
-
h && /* @__PURE__ */
|
|
2786
|
-
label:
|
|
2787
|
-
children: /* @__PURE__ */
|
|
2788
|
-
value:
|
|
2789
|
-
min:
|
|
2790
|
-
max:
|
|
2791
|
-
onChange:
|
|
2792
|
-
|
|
2793
|
-
},
|
|
2794
|
-
onCommit: o.commands.seal
|
|
3338
|
+
h && /* @__PURE__ */ n(b, {
|
|
3339
|
+
label: o("editor.graphPanel.numberFormat.valueLabel"),
|
|
3340
|
+
children: /* @__PURE__ */ n(l, {
|
|
3341
|
+
value: u,
|
|
3342
|
+
min: Bl,
|
|
3343
|
+
max: Ul,
|
|
3344
|
+
onChange: f,
|
|
3345
|
+
onCommit: r.commands.seal
|
|
2795
3346
|
})
|
|
2796
3347
|
})
|
|
2797
3348
|
] })
|
|
2798
3349
|
});
|
|
2799
|
-
},
|
|
3350
|
+
}, Wl = (e) => Ee.find((t) => t.value === e), _s = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
3351
|
+
const r = F(E()), a = T();
|
|
3352
|
+
if (!r) return null;
|
|
3353
|
+
const o = $l(r.spec.layers);
|
|
3354
|
+
return o ? /* @__PURE__ */ n(H, {
|
|
3355
|
+
title: e ?? a("editor.graphPanel.pointSize.label"),
|
|
3356
|
+
layout: t,
|
|
3357
|
+
preview: i,
|
|
3358
|
+
children: /* @__PURE__ */ n(V, { children: /* @__PURE__ */ n(b, {
|
|
3359
|
+
label: a("editor.graphPanel.numberFormat.valueLabel"),
|
|
3360
|
+
children: /* @__PURE__ */ n(st, { layerId: o.id })
|
|
3361
|
+
}) })
|
|
3362
|
+
}) : null;
|
|
3363
|
+
}, $l = (e) => {
|
|
3364
|
+
const t = Le(e, "line", "area");
|
|
3365
|
+
return Le(e, "point").find((i) => !xn(i, t));
|
|
3366
|
+
}, Zl = 0.9, Xl = 360, jl = 0.05, Yl = 15, ks = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
3367
|
+
const r = E(), a = F(r), o = T(), { Slider: l } = _();
|
|
3368
|
+
if (!a || a.spec.coords.coordType !== "polar") return null;
|
|
3369
|
+
const { innerRadius: c, startAngle: s } = a.spec.coords.params, u = (h) => {
|
|
3370
|
+
r.commands.dispatch(new yr({ innerRadius: h }), { transient: !0 });
|
|
3371
|
+
}, d = (h) => {
|
|
3372
|
+
r.commands.dispatch(new wr({ startAngle: h }), { transient: !0 });
|
|
3373
|
+
};
|
|
3374
|
+
return /* @__PURE__ */ n(H, {
|
|
3375
|
+
title: e ?? o("editor.graphPanel.polarSection.title"),
|
|
3376
|
+
layout: t,
|
|
3377
|
+
preview: i,
|
|
3378
|
+
children: /* @__PURE__ */ p(V, { children: [/* @__PURE__ */ n(b, {
|
|
3379
|
+
label: o("editor.graphPanel.polarSection.innerRadius"),
|
|
3380
|
+
children: /* @__PURE__ */ n(l, {
|
|
3381
|
+
value: c,
|
|
3382
|
+
min: 0,
|
|
3383
|
+
max: Zl,
|
|
3384
|
+
step: jl,
|
|
3385
|
+
formatValue: it,
|
|
3386
|
+
onChange: u,
|
|
3387
|
+
onCommit: r.commands.seal
|
|
3388
|
+
})
|
|
3389
|
+
}), /* @__PURE__ */ n(b, {
|
|
3390
|
+
label: o("editor.graphPanel.polarSection.startAngle"),
|
|
3391
|
+
children: /* @__PURE__ */ n(l, {
|
|
3392
|
+
value: s,
|
|
3393
|
+
min: 0,
|
|
3394
|
+
max: Xl - 1,
|
|
3395
|
+
step: Yl,
|
|
3396
|
+
formatValue: Sl,
|
|
3397
|
+
onChange: d,
|
|
3398
|
+
onCommit: r.commands.seal
|
|
3399
|
+
})
|
|
3400
|
+
})] })
|
|
3401
|
+
});
|
|
3402
|
+
};
|
|
2800
3403
|
export {
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
3404
|
+
Is as AppearanceSection,
|
|
3405
|
+
Ps as AxesPanel,
|
|
3406
|
+
cn as AxisSection,
|
|
3407
|
+
xs as BarSection,
|
|
3408
|
+
oi as Button,
|
|
3409
|
+
ul as CaptionSection,
|
|
3410
|
+
Ss as EditableGraphRenderer,
|
|
3411
|
+
at as EditorPanel,
|
|
3412
|
+
ws as ElementsPanel,
|
|
3413
|
+
Ts as GraphOptionsSection,
|
|
3414
|
+
As as GridSection,
|
|
3415
|
+
Ls as HeadlineSection,
|
|
3416
|
+
es as IntlProvider,
|
|
3417
|
+
Ns as LegendSection,
|
|
3418
|
+
Os as LineSection,
|
|
3419
|
+
ci as NumberField,
|
|
3420
|
+
Es as NumberFormatSection,
|
|
3421
|
+
ji as PANEL_ROOT_ATTRIBUTE,
|
|
3422
|
+
_s as PointSection,
|
|
3423
|
+
ks as PolarSection,
|
|
3424
|
+
mi as RadioGrid,
|
|
3425
|
+
b as Row,
|
|
3426
|
+
H as Section,
|
|
3427
|
+
wi as Select,
|
|
3428
|
+
Ei as Slider,
|
|
3429
|
+
pl as SourceSection,
|
|
3430
|
+
vl as SubtitleSection,
|
|
3431
|
+
Ri as Switch,
|
|
3432
|
+
Fi as TextField,
|
|
3433
|
+
bl as TextSizeSection,
|
|
3434
|
+
Cl as TitleSection,
|
|
3435
|
+
Ki as ToggleGroup,
|
|
3436
|
+
ys as ToggledSection,
|
|
3437
|
+
_ as useControls,
|
|
3438
|
+
Zi as usePanelExpansion,
|
|
3439
|
+
E as usePanelGraph
|
|
2829
3440
|
};
|