@graphysdk/react-renderer 1.8.1-beta.1786627078336 → 1.8.1-beta.1786950787742

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.mjs CHANGED
@@ -1,36 +1,36 @@
1
- import { A as Je, B as Ve, D as W, E as te, F as Gt, J as ze, K as Kt, L as Ut, M as Nn, O as J, P as Wt, Q as ne, R as ge, T as Zt, U as Bc, W as I, Z as Fe, _ as qt, b as X, c as $t, ct as Xt, d as jt, dt as Yt, f as En, ft as K, i as Jt, j as Qt, k as Ee, l as er, lt as nr, m as tr, mt as U, n as R, o as rr, p as ar, q as or, r as ir, s as lr, t as sr, u as kn, v as xe, w as cr, x as re, y as L } from "./history-chords-VYEKgFOb.js";
2
- import { g as dr } from "./font-values-CPxYeqns.js";
3
- import { ARROW_DEFAULTS as hr, AddAnnotationCommand as j, AddHighlightCommand as ur, BORDER_RADIUS_TOKENS as Qe, CONSTANT_VARIABLES as mr, DEFAULT_BAR_BORDER_RADIUS as pr, DEFAULT_POINT_SIZE as gr, DEFAULT_STROKE_WIDTH as vr, DIFFERENCE_ARROW_DEFAULTS as _n, MAX_BAR_WIDTH as Cr, MIN_BAR_WIDTH as fr, MoveAnnotationCommand as br, RESTING_HOVER_STATE as Rn, RemoveAnnotationCommand as Be, RemoveHighlightCommand as yr, SHAPE_DEFAULTS as Sr, SetAppearanceCornerRadiusCommand as wr, SetAppearanceTextScaleCommand as xr, SetAxisLabelCommand as Tr, SetAxisPositionCommand as Lr, SetAxisTickModeCommand as Pr, SetAxisTicksVisibilityCommand as Ir, SetAxisVisibilityCommand as Ar, SetBarBorderRadiusCommand as Or, SetBarWidthCommand as Mr, SetChartTypeCommand as Nr, SetContentCaptionCommand as Er, SetContentSourceCommand as kr, SetContentSubtitleCommand as _r, SetContentTitleCommand as Rr, SetDataLabelsFormatCommand as Dr, SetGridLineStyleCommand as Hr, SetGridLineWidthCommand as Vr, SetGridVisibilityCommand as zr, SetHeadlineCompareWithCommand as Fr, SetHeadlinePositionCommand as Br, SetHeadlineShowCommand as en, SetHeadlineSizeCommand as Gr, SetHighlightDimStyleCommand as Kr, SetLegendAlignCommand as Ur, SetLegendDisplayCommand as Wr, SetLegendPositionCommand as Zr, SetLineInterpolationCommand as qr, SetLineMissingValuesCommand as $r, SetLineWidthCommand as nn, SetNumberFormatAbbreviationCommand as Xr, SetNumberFormatDecimalsCommand as tn, SetPointSizeCommand as jr, SetPolarInnerRadiusCommand as Yr, SetPolarStartAngleCommand as Jr, SetRuleLabelCommand as Qr, SetRuleValueCommand as ea, SetScaleDomainCommand as fe, SetScaleReverseCommand as na, SetScaleTransformCommand as ta, SetScaleZeroCommand as rn, SetStatLineCommand as ra, TEXT_ANNOTATION_DEFAULTS as aa, ToggleCategoryLabelsCommand as oa, ToggleContentVisibilityCommand as Te, ToggleDataLabelsCommand as ia, ToggleGoalLineCommand as la, ToggleLineFillCommand as sa, ToggleLinePointsVisibilityCommand as ca, ToggleStackTotalsCommand as da, UpdateAnnotationCommand as Dn, areAnchorsEqual as Hn, areEndpointsComparable as ha, buildEditMenuTriggerRegion as ua, buildLayerStyleAddress as ma, buildObservationAnchor as pa, buildObservationPredicate as ga, canAnchorDirectLabels as va, canPlaceDataLabels as Ca, clampAnnotationTranslation as fa, computeArrow as ba, createObservationAnchorParser as ya, createStyleResolver as Sa, createValueFormatter as wa, extractConstantValue as xa, extractVariableName as Ta, filterLayersByGeoms as ke, findAnnotation as La, findAverageLineLayer as Pa, findGoalLineLayer as Ia, findHighlightsAtObservation as Aa, findLayerByGeom as Vn, findObservationAttachment as Oa, findStyleRule as Ma, findTrendLineLayer as Na, formatDifferenceLabel as Ea, getColor as ka, hasMultipleGroups as _a, inferDefaultDifferenceArrowEndpoints as Ra, inferDifferenceArrowEndpoints as Da, isCompanionLayer as zn, isObservationAttachmentKind as Ha, isPointWithinEditMenuTrigger as Fn, isSafeUrl as Va, projectAnchorToPanel as za, readChartType as Fa, readHighlightDimStyle as Ba, resolveComparisonBasis as Ga, resolveObservationPoint as _e, stepDifferenceArrowEndpoint as Ka, toPanelCursor as Ge } from "@graphysdk/viz-engine";
4
- import { createContext as ve, useCallback as ye, useContext as ce, useEffect as H, useId as le, useMemo as k, useRef as pe, useState as q } from "react";
5
- import { Fragment as G, jsx as n, jsxs as p } from "react/jsx-runtime";
6
- import { useShallow as Ke } from "zustand/react/shallow";
7
- import { createPortal as Ua } from "react-dom";
1
+ import { A as Kt, B as He, D as W, E as ne, F as Ut, J as Ve, K as Wt, L as Zt, M as On, O as ie, P as qt, Q as ee, R as ge, T as $t, U as Uc, W as I, Z as ze, _ as Xt, b as X, c as Yt, ct as jt, d as Jt, f as Mn, ft as K, i as Qt, j as er, k as Nn, l as nr, lt as tr, m as rr, mt as U, n as R, o as ar, p as or, q as ir, r as lr, s as sr, t as cr, u as kn, ut as dr, v as xe, w as hr, x as te, y as L } from "./history-chords-Dd1uLlYw.js";
2
+ import { p as ur } from "./typography-CiDZDGza.js";
3
+ import { ARROW_DEFAULTS as mr, AddAnnotationCommand as Y, AddHighlightCommand as pr, BORDER_RADIUS_TOKENS as je, CONSTANT_VARIABLES as gr, DEFAULT_BAR_BORDER_RADIUS as vr, DEFAULT_POINT_SIZE as fr, DEFAULT_STROKE_WIDTH as Cr, DIFFERENCE_ARROW_DEFAULTS as _n, MAX_BAR_WIDTH as br, MIN_BAR_WIDTH as yr, MoveAnnotationCommand as Sr, RESTING_HOVER_STATE as En, RemoveAnnotationCommand as Fe, RemoveHighlightCommand as wr, SHAPE_DEFAULTS as xr, SetAppearanceTextScaleCommand as Tr, SetAxisLabelCommand as Lr, SetAxisPositionCommand as Pr, SetAxisTickModeCommand as Ir, SetAxisTicksVisibilityCommand as Ar, SetAxisVisibilityCommand as Or, SetBarBorderRadiusCommand as Mr, SetBarWidthCommand as Nr, SetChartTypeCommand as kr, SetContentCaptionCommand as _r, SetContentSourceCommand as Er, SetContentSubtitleCommand as Rr, SetContentTitleCommand as Dr, SetDataLabelsFormatCommand as Hr, SetGridLineStyleCommand as Vr, SetGridLineWidthCommand as zr, SetGridVisibilityCommand as Fr, SetHeadlineCompareWithCommand as Gr, SetHeadlinePositionCommand as Br, SetHeadlineShowCommand as Je, SetHeadlineSizeCommand as Kr, SetHighlightDimStyleCommand as Ur, SetLegendAlignCommand as Wr, SetLegendDisplayCommand as Zr, SetLegendPositionCommand as qr, SetLineInterpolationCommand as $r, SetLineMissingValuesCommand as Xr, SetLineWidthCommand as Qe, SetNumberFormatAbbreviationCommand as Yr, SetNumberFormatDecimalsCommand as en, SetPointSizeCommand as jr, SetPolarInnerRadiusCommand as Jr, SetPolarStartAngleCommand as Qr, SetRuleLabelCommand as ea, SetRuleValueCommand as na, SetScaleDomainCommand as Ce, SetScaleReverseCommand as ta, SetScaleTransformCommand as ra, SetScaleZeroCommand as nn, SetStatLineCommand as aa, SetStyleRuleCommand as oa, TEXT_ANNOTATION_DEFAULTS as ia, ToggleCategoryLabelsCommand as la, ToggleContentVisibilityCommand as Te, ToggleDataLabelsCommand as sa, ToggleGoalLineCommand as ca, ToggleLineFillCommand as da, ToggleLinePointsVisibilityCommand as ha, ToggleStackTotalsCommand as ua, UpdateAnnotationCommand as Rn, areAnchorsEqual as Dn, areEndpointsComparable as ma, buildEditMenuTriggerRegion as pa, buildLayerStyleAddress as ga, buildObservationAnchor as va, buildObservationPredicate as fa, canAnchorDirectLabels as Ca, canPlaceDataLabels as ba, clampAnnotationTranslation as ya, computeArrow as Sa, createObservationAnchorParser as wa, createStyleResolver as Hn, createValueFormatter as xa, extractConstantValue as Ta, extractVariableName as La, filterLayersByGeoms as ke, findAnnotation as Pa, findAverageLineLayer as Ia, findGoalLineLayer as Aa, findHighlightsAtObservation as Oa, findKindStyleDeclarations as Ma, findLayerByGeom as Vn, findObservationAttachment as Na, findStyleRule as ka, findTrendLineLayer as _a, formatDifferenceLabel as Ea, getColor as Ra, hasMultipleGroups as Da, inferDefaultDifferenceArrowEndpoints as Ha, inferDifferenceArrowEndpoints as Va, isCompanionLayer as zn, isObservationAttachmentKind as za, isPointWithinEditMenuTrigger as Fn, isSafeUrl as Fa, projectAnchorToPanel as Ga, readChartType as Ba, readHighlightDimStyle as Ka, resolveComparisonBasis as Ua, resolveObservationPoint as _e, stepDifferenceArrowEndpoint as Wa, toPanelCursor as Ge } from "@graphysdk/viz-engine";
4
+ import { createContext as ve, useCallback as ye, useContext as ce, useEffect as H, useId as le, useMemo as _, useRef as pe, useState as q } from "react";
5
+ import { Fragment as B, jsx as n, jsxs as p } from "react/jsx-runtime";
6
+ import { useShallow as Be } from "zustand/react/shallow";
7
+ import { createPortal as Za } from "react-dom";
8
8
  import se from "clsx";
9
- import { assignInlineVars as Bn } from "@vanilla-extract/dynamic";
9
+ import { assignInlineVars as Gn } from "@vanilla-extract/dynamic";
10
10
  import { Menu as z } from "@base-ui/react/menu";
11
- import { Menu as Y } from "@base-ui/react";
11
+ import { Menu as j } from "@base-ui/react";
12
12
  import { Accordion as ue } from "@base-ui/react/accordion";
13
- import { NumberField as an } from "@base-ui/react/number-field";
14
- import { Radio as Gn } from "@base-ui/react/radio";
13
+ import { NumberField as tn } from "@base-ui/react/number-field";
14
+ import { Radio as Bn } from "@base-ui/react/radio";
15
15
  import { RadioGroup as Kn } from "@base-ui/react/radio-group";
16
16
  import { Select as Z } from "@base-ui/react/select";
17
17
  import { Slider as de } from "@base-ui/react/slider";
18
- import { Switch as on } from "@base-ui/react/switch";
19
- import { Input as Wa } from "@base-ui/react/input";
20
- import './editable.css';var Za = "data-graphy-chart-chrome", qa = "data-graphy-chart-menu", Un = { [qa]: "" }, Se = (e) => ({ [Za]: e }), Wn = (e, t) => e instanceof Element && e.closest(`[data-graphy-chart-chrome="${CSS.escape(t)}"]`) !== null, $a = (e) => e instanceof Element && e.closest("[data-graphy-chart-menu]") !== null, Zn = (e) => e instanceof Element && e.closest("[data-graphy-chart-chrome]") !== null, qn = (e, t, r) => r !== null && Fn({
18
+ import { Switch as rn } from "@base-ui/react/switch";
19
+ import { Input as qa } from "@base-ui/react/input";
20
+ import './editable.css';var $a = "data-graphy-chart-chrome", Xa = "data-graphy-chart-menu", Un = { [Xa]: "" }, Se = (e) => ({ [$a]: e }), Wn = (e, t) => e instanceof Element && e.closest(`[data-graphy-chart-chrome="${CSS.escape(t)}"]`) !== null, Ya = (e) => e instanceof Element && e.closest("[data-graphy-chart-menu]") !== null, Zn = (e) => e instanceof Element && e.closest("[data-graphy-chart-chrome]") !== null, qn = (e, t, r) => r !== null && Fn({
21
21
  x: e.clientX - t.x,
22
22
  y: e.clientY - t.y
23
- }, r), me = (e, t, r) => e instanceof Node && (t.contains(e) || Wn(e, r)), Xa = "cml7ha0", $n = ve(null), ja = ({ children: e }) => {
24
- const { chartId: t } = U(), [r] = q(ze), [a, o] = q(null);
25
- return r === null ? null : /* @__PURE__ */ p(G, { children: [Ua(/* @__PURE__ */ n("div", {
23
+ }, r), me = (e, t, r) => e instanceof Node && (t.contains(e) || Wn(e, r)), ja = "cml7ha0", $n = ve(null), Ja = ({ children: e }) => {
24
+ const { chartId: t } = U(), [r] = q(Ve), [a, o] = q(null);
25
+ return r === null ? null : /* @__PURE__ */ p(B, { children: [Za(/* @__PURE__ */ n("div", {
26
26
  ref: o,
27
- className: Xa,
27
+ className: ja,
28
28
  ...Se(t)
29
29
  }), r), /* @__PURE__ */ n($n.Provider, {
30
30
  value: a,
31
31
  children: e
32
32
  })] });
33
- }, Ue = () => ce($n), Xn = (e) => /* @__PURE__ */ p(L, {
33
+ }, Ke = () => ce($n), Xn = (e) => /* @__PURE__ */ p(L, {
34
34
  viewBox: "0 0 16 16",
35
35
  ...e,
36
36
  children: [
@@ -56,73 +56,73 @@ import './editable.css';var Za = "data-graphy-chart-chrome", qa = "data-graphy-c
56
56
  })
57
57
  ]
58
58
  });
59
- var jn = "efjmb40", Yn = "efjmb41", ae = "efjmb42", oe = "efjmb43", Ya = "efjmb44", Ja = "efjmb45", Qa = /* @__PURE__ */ new Set([
59
+ var Yn = "efjmb40", jn = "efjmb41", re = "efjmb42", ae = "efjmb43", Qa = "efjmb44", eo = "efjmb45", no = /* @__PURE__ */ new Set([
60
60
  "item-press",
61
61
  "escape-key",
62
62
  "outside-press",
63
63
  "close-press",
64
64
  "sibling-open",
65
65
  "trigger-press"
66
- ]), We = ({ label: e, icon: t, onOpened: r, children: a }) => {
67
- const o = Ue(), [i, l] = q(!1), c = (s, h) => {
68
- s ? (l(!0), r?.()) : Qa.has(h.reason) && l(!1);
66
+ ]), Ue = ({ label: e, icon: t, onOpened: r, children: a }) => {
67
+ const o = Ke(), [i, l] = q(!1), c = (s, h) => {
68
+ s ? (l(!0), r?.()) : no.has(h.reason) && l(!1);
69
69
  };
70
- return /* @__PURE__ */ p(Y.SubmenuRoot, {
70
+ return /* @__PURE__ */ p(j.SubmenuRoot, {
71
71
  open: i,
72
72
  onOpenChange: c,
73
- children: [/* @__PURE__ */ n(eo, {
73
+ children: [/* @__PURE__ */ n(to, {
74
74
  label: e,
75
75
  icon: t
76
- }), /* @__PURE__ */ n(Y.Portal, {
76
+ }), /* @__PURE__ */ n(j.Portal, {
77
77
  container: o,
78
- children: /* @__PURE__ */ n(ge, { children: /* @__PURE__ */ n(Y.Positioner, {
78
+ children: /* @__PURE__ */ n(ge, { children: /* @__PURE__ */ n(j.Positioner, {
79
79
  side: "right",
80
80
  align: "start",
81
81
  sideOffset: 4,
82
- className: jn,
82
+ className: Yn,
83
83
  ...Un,
84
- children: /* @__PURE__ */ n(Y.Popup, {
85
- className: Yn,
84
+ children: /* @__PURE__ */ n(j.Popup, {
85
+ className: jn,
86
86
  children: a
87
87
  })
88
88
  }) })
89
89
  })]
90
90
  });
91
- }, eo = ({ label: e, icon: t }) => /* @__PURE__ */ p(Y.SubmenuTrigger, {
92
- className: ae,
91
+ }, to = ({ label: e, icon: t }) => /* @__PURE__ */ p(j.SubmenuTrigger, {
92
+ className: re,
93
93
  openOnHover: !1,
94
94
  children: [
95
95
  t,
96
96
  /* @__PURE__ */ n("span", {
97
- className: oe,
97
+ className: ae,
98
98
  children: e
99
99
  }),
100
100
  /* @__PURE__ */ n("span", {
101
- className: Ja,
101
+ className: eo,
102
102
  children: /* @__PURE__ */ n(xe, { size: "sm" })
103
103
  })
104
104
  ]
105
- }), no = "_1qe7q450", to = "_1qe7q451", ro = "_1qe7q452", ao = ({ label: e, placeholder: t, addLabel: r, at: a, onRequestClose: o }) => {
106
- const i = pe(null), [l, c] = q(""), { dispatch: s } = re(), h = l.trim(), d = () => {
107
- h.length !== 0 && (s(new j({
105
+ }), ro = "_1qe7q450", ao = "_1qe7q451", oo = "_1qe7q452", io = ({ label: e, placeholder: t, addLabel: r, at: a, onRequestClose: o }) => {
106
+ const i = pe(null), [l, c] = q(""), { dispatch: s } = te(), h = l.trim(), d = () => {
107
+ h.length !== 0 && (s(new Y({
108
108
  kind: "comment",
109
109
  annotation: {
110
110
  at: a,
111
- content: oo(h)
111
+ content: lo(h)
112
112
  }
113
113
  })), o());
114
114
  };
115
- return /* @__PURE__ */ n(We, {
115
+ return /* @__PURE__ */ n(Ue, {
116
116
  label: e,
117
117
  icon: /* @__PURE__ */ n(Xn, {}),
118
118
  onOpened: () => {
119
119
  requestAnimationFrame(() => i.current?.focus());
120
120
  },
121
121
  children: /* @__PURE__ */ p("div", {
122
- className: no,
122
+ className: ro,
123
123
  children: [/* @__PURE__ */ n("input", {
124
124
  ref: i,
125
- className: to,
125
+ className: ao,
126
126
  value: l,
127
127
  placeholder: t,
128
128
  onChange: (g) => {
@@ -133,14 +133,14 @@ var jn = "efjmb40", Yn = "efjmb41", ae = "efjmb42", oe = "efjmb43", Ya = "efjmb4
133
133
  }
134
134
  }), /* @__PURE__ */ n("button", {
135
135
  type: "button",
136
- className: ro,
136
+ className: oo,
137
137
  disabled: h.length === 0,
138
138
  onClick: d,
139
139
  children: r
140
140
  })]
141
141
  })
142
142
  });
143
- }, oo = (e) => ({
143
+ }, lo = (e) => ({
144
144
  type: "doc",
145
145
  content: [{
146
146
  type: "paragraph",
@@ -149,7 +149,7 @@ var jn = "efjmb40", Yn = "efjmb41", ae = "efjmb42", oe = "efjmb43", Ya = "efjmb4
149
149
  text: e
150
150
  }]
151
151
  }]
152
- }), io = (e) => /* @__PURE__ */ n(L, {
152
+ }), so = (e) => /* @__PURE__ */ n(L, {
153
153
  viewBox: "0 0 15 14",
154
154
  ...e,
155
155
  children: /* @__PURE__ */ n("path", {
@@ -157,8 +157,8 @@ var jn = "efjmb40", Yn = "efjmb41", ae = "efjmb42", oe = "efjmb43", Ya = "efjmb4
157
157
  fill: "currentColor",
158
158
  fillOpacity: "0.8"
159
159
  })
160
- }), lo = "relative-difference", so = ({ label: e, layer: t, at: r, onRequestClose: a }) => {
161
- const { dispatch: o } = re(), i = K((s) => s.coordSystem), l = k(() => Da({
160
+ }), co = "relative-difference", ho = ({ label: e, layer: t, at: r, onRequestClose: a }) => {
161
+ const { dispatch: o } = te(), i = K((s) => s.coordSystem), l = _(() => Va({
162
162
  layer: t,
163
163
  at: r,
164
164
  coordSystem: i
@@ -169,30 +169,30 @@ var jn = "efjmb40", Yn = "efjmb41", ae = "efjmb42", oe = "efjmb43", Ya = "efjmb4
169
169
  ]);
170
170
  if (l === null) return null;
171
171
  const c = () => {
172
- o(new j({
172
+ o(new Y({
173
173
  kind: "differenceArrow",
174
174
  annotation: {
175
175
  ..._n,
176
176
  ...l,
177
- label: lo
177
+ label: co
178
178
  }
179
179
  })), a();
180
180
  };
181
181
  return /* @__PURE__ */ p(z.Item, {
182
- className: ae,
182
+ className: re,
183
183
  onClick: c,
184
- children: [/* @__PURE__ */ n(io, {}), /* @__PURE__ */ n("span", {
185
- className: oe,
184
+ children: [/* @__PURE__ */ n(so, {}), /* @__PURE__ */ n("span", {
185
+ className: ae,
186
186
  children: e
187
187
  })]
188
188
  });
189
189
  };
190
- function co(e, t) {
191
- if (e.type === "polar" && !ho(t)) return [{
190
+ function uo(e, t) {
191
+ if (e.type === "polar" && !mo(t)) return [{
192
192
  scope: "series",
193
193
  labelKey: "pieSlice"
194
194
  }];
195
- const r = _a(t.data, t.mapping);
195
+ const r = Da(t.data, t.mapping);
196
196
  switch (t.geom) {
197
197
  case "bar": {
198
198
  const a = [{
@@ -236,10 +236,10 @@ function co(e, t) {
236
236
  return [];
237
237
  }
238
238
  }
239
- var ho = (e) => {
240
- const t = Ta(e.mapping.x);
241
- return t !== null && t !== mr.x;
242
- }, uo = (e) => /* @__PURE__ */ p(L, {
239
+ var mo = (e) => {
240
+ const t = La(e.mapping.x);
241
+ return t !== null && t !== gr.x;
242
+ }, po = (e) => /* @__PURE__ */ p(L, {
243
243
  viewBox: "0 0 16 16",
244
244
  ...e,
245
245
  children: [
@@ -278,7 +278,7 @@ var ho = (e) => {
278
278
  rx: ".533"
279
279
  })
280
280
  ]
281
- }), mo = (e) => /* @__PURE__ */ p(L, {
281
+ }), go = (e) => /* @__PURE__ */ p(L, {
282
282
  viewBox: "0 0 16 16",
283
283
  ...e,
284
284
  children: [
@@ -317,7 +317,7 @@ var ho = (e) => {
317
317
  rx: ".533"
318
318
  })
319
319
  ]
320
- }), po = (e) => /* @__PURE__ */ p(L, {
320
+ }), vo = (e) => /* @__PURE__ */ p(L, {
321
321
  viewBox: "0 0 16 16",
322
322
  ...e,
323
323
  children: [
@@ -356,7 +356,7 @@ var ho = (e) => {
356
356
  rx: ".533"
357
357
  })
358
358
  ]
359
- }), go = (e) => /* @__PURE__ */ p(L, {
359
+ }), fo = (e) => /* @__PURE__ */ p(L, {
360
360
  viewBox: "0 0 16 16",
361
361
  ...e,
362
362
  children: [
@@ -376,7 +376,7 @@ var ho = (e) => {
376
376
  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"
377
377
  })
378
378
  ]
379
- }), vo = (e) => /* @__PURE__ */ p(L, {
379
+ }), Co = (e) => /* @__PURE__ */ p(L, {
380
380
  viewBox: "0 0 16 16",
381
381
  ...e,
382
382
  children: [
@@ -410,7 +410,7 @@ var ho = (e) => {
410
410
  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"
411
411
  })
412
412
  ]
413
- }), Co = (e) => /* @__PURE__ */ p(L, {
413
+ }), bo = (e) => /* @__PURE__ */ p(L, {
414
414
  viewBox: "0 0 16 16",
415
415
  ...e,
416
416
  children: [
@@ -451,7 +451,7 @@ var ho = (e) => {
451
451
  fillOpacity: "0.8"
452
452
  })
453
453
  ]
454
- }), fo = (e) => /* @__PURE__ */ p(L, {
454
+ }), yo = (e) => /* @__PURE__ */ p(L, {
455
455
  viewBox: "0 0 16 16",
456
456
  ...e,
457
457
  children: [
@@ -473,7 +473,7 @@ var ho = (e) => {
473
473
  d: "M15.999 8a8 8 0 0 1-7.588 7.989l-.412.01V8z"
474
474
  })
475
475
  ]
476
- }), bo = (e) => /* @__PURE__ */ p(L, {
476
+ }), So = (e) => /* @__PURE__ */ p(L, {
477
477
  viewBox: "0 0 16 16",
478
478
  ...e,
479
479
  children: [
@@ -534,7 +534,7 @@ var ho = (e) => {
534
534
  transform: "matrix(-1 0 0 1 15.933 .533)"
535
535
  })
536
536
  ]
537
- }), yo = (e) => /* @__PURE__ */ p(L, {
537
+ }), wo = (e) => /* @__PURE__ */ p(L, {
538
538
  viewBox: "0 0 16 16",
539
539
  ...e,
540
540
  children: [
@@ -595,18 +595,18 @@ var ho = (e) => {
595
595
  transform: "matrix(-1 0 0 1 15.933 .533)"
596
596
  })
597
597
  ]
598
- }), So = {
599
- bar: uo,
600
- barGroup: mo,
601
- barStack: go,
602
- barSeries: po,
603
- linePoint: vo,
604
- lineSeries: Co,
605
- scatterPoint: bo,
606
- scatterSeries: yo,
607
- pieSlice: fo
598
+ }), xo = {
599
+ bar: po,
600
+ barGroup: go,
601
+ barStack: fo,
602
+ barSeries: vo,
603
+ linePoint: Co,
604
+ lineSeries: bo,
605
+ scatterPoint: So,
606
+ scatterSeries: wo,
607
+ pieSlice: yo
608
608
  }, Jn = ({ labelKey: e }) => {
609
- const t = So[e];
609
+ const t = xo[e];
610
610
  return /* @__PURE__ */ n(t, {});
611
611
  }, Qn = (e) => /* @__PURE__ */ p(L, {
612
612
  viewBox: "0 0 16 16",
@@ -621,28 +621,28 @@ var ho = (e) => {
621
621
  fill: "currentColor",
622
622
  fillOpacity: "0.8"
623
623
  })]
624
- }), wo = ({ label: e, options: t, onSelect: r }) => {
624
+ }), To = ({ label: e, options: t, onSelect: r }) => {
625
625
  const a = I();
626
- return /* @__PURE__ */ n(We, {
626
+ return /* @__PURE__ */ n(Ue, {
627
627
  label: e,
628
628
  icon: /* @__PURE__ */ n(Qn, {}),
629
- children: t.map((o) => /* @__PURE__ */ p(Y.Item, {
630
- className: ae,
629
+ children: t.map((o) => /* @__PURE__ */ p(j.Item, {
630
+ className: re,
631
631
  onClick: () => r(o.scope),
632
632
  children: [/* @__PURE__ */ n(Jn, { labelKey: o.labelKey }), /* @__PURE__ */ n("span", {
633
- className: oe,
633
+ className: ae,
634
634
  children: a(`graph.annotations.highlights.labels.${o.labelKey}`)
635
635
  })]
636
636
  }, o.scope))
637
637
  });
638
- }, xo = ({ label: e, layer: t, observation: r, highlights: a, onRequestClose: o }) => {
639
- const i = I(), { dispatch: l } = re(), c = K((m) => m.coordSystem), s = k(() => ga(t, r), [t, r]), h = k(() => co(c, t), [c, t]), d = k(() => {
638
+ }, Lo = ({ label: e, layer: t, observation: r, highlights: a, onRequestClose: o }) => {
639
+ const i = I(), { dispatch: l } = te(), c = K((m) => m.coordSystem), s = _(() => fa(t, r), [t, r]), h = _(() => uo(c, t), [c, t]), d = _(() => {
640
640
  const m = new Set(a.map((g) => g.scope));
641
641
  return h.filter((g) => !m.has(g.scope));
642
642
  }, [h, a]), [u] = d;
643
643
  if (s === null || u === void 0) return null;
644
644
  const v = (m) => {
645
- l(new ur({
645
+ l(new pr({
646
646
  predicate: s,
647
647
  scope: m,
648
648
  layerId: t.id
@@ -650,41 +650,41 @@ var ho = (e) => {
650
650
  };
651
651
  if (d.length === 1) {
652
652
  const m = h.length === 1 ? e : i("graph.annotations.baseMenu.highlightWithLabel", { label: i(`graph.annotations.highlights.labels.${u.labelKey}`) });
653
- return /* @__PURE__ */ p(Y.Item, {
654
- className: ae,
653
+ return /* @__PURE__ */ p(j.Item, {
654
+ className: re,
655
655
  onClick: () => v(u.scope),
656
656
  children: [/* @__PURE__ */ n(Jn, { labelKey: u.labelKey }), /* @__PURE__ */ n("span", {
657
- className: oe,
657
+ className: ae,
658
658
  children: m
659
659
  })]
660
660
  });
661
661
  }
662
- return /* @__PURE__ */ n(wo, {
662
+ return /* @__PURE__ */ n(To, {
663
663
  label: e,
664
664
  options: d,
665
665
  onSelect: v
666
666
  });
667
- }, To = "_1aafi1g0", Lo = "_1aafi1g1", et = ({ children: e }) => /* @__PURE__ */ p("span", {
668
- className: To,
667
+ }, Po = "_1aafi1g0", Io = "_1aafi1g1", et = ({ children: e }) => /* @__PURE__ */ p("span", {
668
+ className: Po,
669
669
  "aria-hidden": "true",
670
- children: [e, /* @__PURE__ */ n("span", { className: Lo })]
671
- }), Po = ({ label: e, highlights: t, onRequestClose: r }) => {
672
- const { dispatch: a } = re(), o = t.at(-1);
670
+ children: [e, /* @__PURE__ */ n("span", { className: Io })]
671
+ }), Ao = ({ label: e, highlights: t, onRequestClose: r }) => {
672
+ const { dispatch: a } = te(), o = t.at(-1);
673
673
  if (o === void 0) return null;
674
674
  const i = () => {
675
- a(new yr({ id: o.id })), r();
675
+ a(new wr({ id: o.id })), r();
676
676
  };
677
677
  return /* @__PURE__ */ p(z.Item, {
678
- className: ae,
678
+ className: re,
679
679
  onClick: i,
680
680
  children: [/* @__PURE__ */ n(et, { children: /* @__PURE__ */ n(Qn, {}) }), /* @__PURE__ */ n("span", {
681
- className: oe,
681
+ className: ae,
682
682
  children: e
683
683
  })]
684
684
  });
685
- }, Io = (e, t) => {
685
+ }, Oo = (e, t) => {
686
686
  const r = K((o) => o.spec.highlights), a = K((o) => o.config.parsingLocale);
687
- return k(() => Aa({
687
+ return _(() => Oa({
688
688
  layer: e,
689
689
  highlights: r,
690
690
  observation: t,
@@ -718,18 +718,18 @@ var ho = (e) => {
718
718
  fillOpacity: "0.8"
719
719
  })
720
720
  ]
721
- }), Ao = ({ label: e, at: t, onRequestClose: r }) => {
722
- const { dispatch: a } = re(), o = () => {
723
- a(new j({
721
+ }), Mo = ({ label: e, at: t, onRequestClose: r }) => {
722
+ const { dispatch: a } = te(), o = () => {
723
+ a(new Y({
724
724
  kind: "pinnedNumber",
725
725
  annotation: { at: t }
726
726
  })), r();
727
727
  };
728
728
  return /* @__PURE__ */ p(z.Item, {
729
- className: ae,
729
+ className: re,
730
730
  onClick: o,
731
731
  children: [/* @__PURE__ */ n(nt, {}), /* @__PURE__ */ n("span", {
732
- className: oe,
732
+ className: ae,
733
733
  children: e
734
734
  })]
735
735
  });
@@ -780,21 +780,21 @@ var ho = (e) => {
780
780
  labelKey: "graph.annotations.baseMenu.removeSticker"
781
781
  },
782
782
  image: null
783
- }, Oo = (e) => Ha(e.kind) && rt[e.kind] !== null, Mo = ({ attachment: e, onRequestClose: t }) => {
784
- const r = I(), { dispatch: a } = re(), { icon: o, labelKey: i } = rt[e.kind], l = () => {
785
- a(new Be({ id: e.annotation.id })), t();
783
+ }, No = (e) => za(e.kind) && rt[e.kind] !== null, ko = ({ attachment: e, onRequestClose: t }) => {
784
+ const r = I(), { dispatch: a } = te(), { icon: o, labelKey: i } = rt[e.kind], l = () => {
785
+ a(new Fe({ id: e.annotation.id })), t();
786
786
  };
787
787
  return /* @__PURE__ */ p(z.Item, {
788
- className: ae,
788
+ className: re,
789
789
  onClick: l,
790
790
  children: [/* @__PURE__ */ n(et, { children: /* @__PURE__ */ n(o, {}) }), /* @__PURE__ */ n("span", {
791
- className: oe,
791
+ className: ae,
792
792
  children: r(i)
793
793
  })]
794
794
  });
795
- }, No = "ceeojg0", Eo = "ceeojg1", ko = "ceeojg2", _o = ({ label: e, at: t, onRequestClose: r }) => {
796
- const { dispatch: a } = re(), o = (i) => {
797
- a(new j({
795
+ }, _o = "ceeojg0", Eo = "ceeojg1", Ro = "ceeojg2", Do = ({ label: e, at: t, onRequestClose: r }) => {
796
+ const { dispatch: a } = te(), o = (i) => {
797
+ a(new Y({
798
798
  kind: "sticker",
799
799
  annotation: {
800
800
  at: {
@@ -805,30 +805,30 @@ var ho = (e) => {
805
805
  }
806
806
  })), r();
807
807
  };
808
- return /* @__PURE__ */ n(We, {
808
+ return /* @__PURE__ */ n(Ue, {
809
809
  label: e,
810
810
  icon: /* @__PURE__ */ n(tt, {}),
811
811
  children: /* @__PURE__ */ n("div", {
812
- className: No,
813
- children: Object.entries(rr).map(([i, l]) => /* @__PURE__ */ n(Y.Item, {
812
+ className: _o,
813
+ children: Object.entries(ar).map(([i, l]) => /* @__PURE__ */ n(j.Item, {
814
814
  className: Eo,
815
815
  "aria-label": i,
816
816
  onClick: () => o(i),
817
817
  children: /* @__PURE__ */ n("img", {
818
- className: ko,
818
+ className: Ro,
819
819
  src: l.src,
820
820
  alt: i
821
821
  })
822
822
  }, i))
823
823
  })
824
824
  });
825
- }, Ro = ({ interaction: e, panelOrigin: t }) => {
826
- const r = W(), a = te((i) => i.menuTrigger);
825
+ }, Ho = ({ interaction: e, panelOrigin: t }) => {
826
+ const r = W(), a = ne((i) => i.menuTrigger);
827
827
  if (e.kind !== "menu" || a === null) return null;
828
828
  const o = () => {
829
829
  r.getState().releaseInteraction("menu");
830
830
  };
831
- return /* @__PURE__ */ n(Do, {
831
+ return /* @__PURE__ */ n(Vo, {
832
832
  trigger: {
833
833
  x: t.x + a.center.x,
834
834
  y: t.y + a.center.y,
@@ -839,13 +839,13 @@ var ho = (e) => {
839
839
  observation: e.anchor.observation,
840
840
  onClose: o
841
841
  });
842
- }, Do = ({ trigger: e, layer: t, at: r, observation: a, onClose: o }) => {
843
- const i = I(), l = Ue(), c = K((b) => b.spec.annotations), s = K((b) => b.config.parsingLocale), h = Vo(), { x: d, y: u, radius: v } = e, m = k(() => Ho(d, u, v), [
842
+ }, Vo = ({ trigger: e, layer: t, at: r, observation: a, onClose: o }) => {
843
+ const i = I(), l = Ke(), c = K((b) => b.spec.annotations), s = K((b) => b.config.parsingLocale), h = Fo(), { x: d, y: u, radius: v } = e, m = _(() => zo(d, u, v), [
844
844
  d,
845
845
  u,
846
846
  v
847
- ]), g = Oa(c, r, k(() => ya(t, s), [t, s])), C = g !== null && Oo(g) ? g : null, P = Io(t, a), w = (b, T) => {
848
- !b && zo(T.reason) && o();
847
+ ]), g = Na(c, r, _(() => wa(t, s), [t, s])), f = g !== null && No(g) ? g : null, P = Oo(t, a), w = (b, T) => {
848
+ !b && Go(T.reason) && o();
849
849
  };
850
850
  return /* @__PURE__ */ n(z.Root, {
851
851
  open: h,
@@ -858,49 +858,49 @@ var ho = (e) => {
858
858
  side: "right",
859
859
  align: "start",
860
860
  sideOffset: 8,
861
- className: jn,
861
+ className: Yn,
862
862
  ...Un,
863
863
  children: /* @__PURE__ */ p(z.Popup, {
864
- className: Yn,
864
+ className: jn,
865
865
  "data-testid": "observation-menu",
866
866
  children: [
867
- C !== null && /* @__PURE__ */ n(Mo, {
868
- attachment: C,
867
+ f !== null && /* @__PURE__ */ n(ko, {
868
+ attachment: f,
869
869
  onRequestClose: o
870
870
  }),
871
- /* @__PURE__ */ n(Po, {
871
+ /* @__PURE__ */ n(Ao, {
872
872
  label: i("graph.annotations.baseMenu.removeHighlight"),
873
873
  highlights: P,
874
874
  onRequestClose: o
875
875
  }),
876
- /* @__PURE__ */ n(z.Separator, { className: Ya }),
877
- C === null && /* @__PURE__ */ p(G, { children: [
878
- /* @__PURE__ */ n(Ao, {
876
+ /* @__PURE__ */ n(z.Separator, { className: Qa }),
877
+ f === null && /* @__PURE__ */ p(B, { children: [
878
+ /* @__PURE__ */ n(Mo, {
879
879
  label: i("graph.annotations.baseMenu.pinNumber"),
880
880
  at: r,
881
881
  onRequestClose: o
882
882
  }),
883
- /* @__PURE__ */ n(ao, {
883
+ /* @__PURE__ */ n(io, {
884
884
  label: i("graph.annotations.baseMenu.annotate"),
885
885
  placeholder: i("graph.annotations.textMenu.placeholder"),
886
886
  addLabel: i("graph.annotations.textMenu.addButton"),
887
887
  at: r,
888
888
  onRequestClose: o
889
889
  }),
890
- /* @__PURE__ */ n(_o, {
890
+ /* @__PURE__ */ n(Do, {
891
891
  label: i("graph.annotations.baseMenu.addSticker"),
892
892
  at: r,
893
893
  onRequestClose: o
894
894
  })
895
895
  ] }),
896
- t.highlight !== null && /* @__PURE__ */ n(xo, {
896
+ t.highlight !== null && /* @__PURE__ */ n(Lo, {
897
897
  label: i("graph.annotations.baseMenu.highlight"),
898
898
  layer: t,
899
899
  observation: a,
900
900
  highlights: P,
901
901
  onRequestClose: o
902
902
  }),
903
- /* @__PURE__ */ n(so, {
903
+ /* @__PURE__ */ n(ho, {
904
904
  label: i("graph.annotations.baseMenu.differenceArrow"),
905
905
  layer: t,
906
906
  at: r,
@@ -911,19 +911,19 @@ var ho = (e) => {
911
911
  }) })
912
912
  })
913
913
  });
914
- }, Ho = (e, t, r) => ({ getBoundingClientRect: () => new DOMRect(e - r, t - r, r * 2, r * 2) }), Vo = () => {
914
+ }, zo = (e, t, r) => ({ getBoundingClientRect: () => new DOMRect(e - r, t - r, r * 2, r * 2) }), Fo = () => {
915
915
  const [e, t] = q(!1);
916
916
  return H(() => {
917
917
  t(!0);
918
918
  }, []), e;
919
- }, zo = (e) => e === "outside-press" || e === "escape-key" || e === "item-press", at = () => {
919
+ }, Go = (e) => e === "outside-press" || e === "escape-key" || e === "item-press", at = () => {
920
920
  const e = kn();
921
921
  return ot(e);
922
922
  }, ot = (e) => {
923
923
  if (e.length !== 1) return null;
924
924
  const [t] = e;
925
925
  return t?.kind === "annotation" ? t.id : null;
926
- }, Fo = (e) => /* @__PURE__ */ n(L, {
926
+ }, Bo = (e) => /* @__PURE__ */ n(L, {
927
927
  ...e,
928
928
  children: /* @__PURE__ */ p("g", {
929
929
  stroke: "currentColor",
@@ -932,7 +932,7 @@ var ho = (e) => {
932
932
  strokeLinejoin: "round",
933
933
  children: [/* @__PURE__ */ n("path", { d: "M4 9h16m-4-4 4 4" }), /* @__PURE__ */ n("path", { d: "M20 15H4m4 4-4-4" })]
934
934
  })
935
- }), Bo = (e) => /* @__PURE__ */ n(L, {
935
+ }), Ko = (e) => /* @__PURE__ */ n(L, {
936
936
  ...e,
937
937
  children: /* @__PURE__ */ p("g", {
938
938
  stroke: "currentColor",
@@ -946,23 +946,23 @@ var ho = (e) => {
946
946
  /* @__PURE__ */ n("path", { d: "M9 7V5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2" })
947
947
  ]
948
948
  })
949
- }), Go = { kind: "chrome-popup" }, Ko = "var(--q7gcrz0)", Uo = "var(--q7gcrz1)", Wo = "q7gcrz2", Zo = "q7gcrz3";
950
- var qo = "q7gcrz5", $o = "q7gcrz6", Xo = "q7gcrz7", jo = "q7gcrz8", it = "q7gcrz9", Yo = "q7gcrza";
951
- var ln = "q7gcrzd q7gcrzc", lt = "q7gcrze q7gcrzc", Jo = [
949
+ }), Uo = { kind: "chrome-popup" }, Wo = "var(--q7gcrz0)", Zo = "var(--q7gcrz1)", qo = "q7gcrz2", $o = "q7gcrz3";
950
+ var Xo = "q7gcrz5", Yo = "q7gcrz6", jo = "q7gcrz7", Jo = "q7gcrz8", it = "q7gcrz9", Qo = "q7gcrza";
951
+ var an = "q7gcrzd q7gcrzc", lt = "q7gcrze q7gcrzc", ei = [
952
952
  "absolute-difference",
953
953
  "relative-difference",
954
954
  "proportion"
955
- ], sn = ["absolute-difference", "relative-difference"], Qo = ["relative-difference", "proportion"], ei = {
955
+ ], on = ["absolute-difference", "relative-difference"], ni = ["relative-difference", "proportion"], ti = {
956
956
  "absolute-difference": "graph.annotations.differenceArrowToolbar.labelKind.absoluteDifference",
957
957
  "relative-difference": "graph.annotations.differenceArrowToolbar.labelKind.relativeDifference",
958
958
  proportion: "graph.annotations.differenceArrowToolbar.labelKind.proportion"
959
- }, ni = (e) => {
959
+ }, ri = (e) => {
960
960
  const { formattingLocale: t } = U(), r = K((o) => o.config.parsingLocale), a = t ?? r;
961
- return k(() => {
962
- const o = ha(e.start, e.end);
963
- return Jo.filter((i) => o || !sn.includes(i) || i === e.label).map((i) => ({
961
+ return _(() => {
962
+ const o = ma(e.start, e.end);
963
+ return ei.filter((i) => o || !on.includes(i) || i === e.label).map((i) => ({
964
964
  kind: i,
965
- nameKey: ei[i],
965
+ nameKey: ti[i],
966
966
  preview: Ea({
967
967
  locale: a,
968
968
  kind: i,
@@ -970,19 +970,19 @@ var ln = "q7gcrzd q7gcrzc", lt = "q7gcrze q7gcrzc", Jo = [
970
970
  endValue: e.end.measurementValue,
971
971
  valueFormat: e.start.valueFormat
972
972
  }),
973
- isPickable: o || !sn.includes(i),
974
- isSuspect: Qo.includes(i) && e.start.measurementValue === 0
973
+ isPickable: o || !on.includes(i),
974
+ isSuspect: ni.includes(i) && e.start.measurementValue === 0
975
975
  }));
976
976
  }, [e, a]);
977
- }, he = 8, ti = ({ labelBox: e, panelRect: t, frameWidth: r, frameHeight: a }) => {
978
- const o = t.y + e.y, i = o + e.height, l = o - 8 - 36, c = i + 8, s = ri(he, l >= he ? l : c, a - he - 36), h = he;
977
+ }, he = 8, ai = ({ labelBox: e, panelRect: t, frameWidth: r, frameHeight: a }) => {
978
+ const o = t.y + e.y, i = o + e.height, l = o - 8 - 36, c = i + 8, s = oi(he, l >= he ? l : c, a - he - 36), h = he;
979
979
  return {
980
980
  top: s,
981
981
  left: h,
982
982
  available: Math.max(0, r - he * 2),
983
983
  centre: t.x + e.x + e.width / 2 - h
984
984
  };
985
- }, ri = (e, t, r) => Math.max(e, Math.min(t, r)), Oe = [
985
+ }, oi = (e, t, r) => Math.max(e, Math.min(t, r)), Oe = [
986
986
  {
987
987
  id: "small",
988
988
  nameKey: "graph.annotations.differenceArrowToolbar.size.small"
@@ -995,14 +995,14 @@ var ln = "q7gcrzd q7gcrzc", lt = "q7gcrze q7gcrzc", Jo = [
995
995
  id: "large",
996
996
  nameKey: "graph.annotations.differenceArrowToolbar.size.large"
997
997
  }
998
- ], ai = ({ arrow: e, labelBox: t, panelRect: r, frameWidth: a, frameHeight: o, frameElement: i }) => {
999
- const l = I(), { chartId: c, commands: s } = U(), h = W(), [d, u] = q(null), v = ni(e), m = ti({
998
+ ], ii = ({ arrow: e, labelBox: t, panelRect: r, frameWidth: a, frameHeight: o, frameElement: i }) => {
999
+ const l = I(), { chartId: c, commands: s } = U(), h = W(), [d, u] = q(null), v = ri(e), m = ai({
1000
1000
  labelBox: t,
1001
1001
  panelRect: r,
1002
1002
  frameWidth: a,
1003
1003
  frameHeight: o
1004
1004
  }), g = (w, b) => {
1005
- s.dispatch(new Dn({
1005
+ s.dispatch(new Rn({
1006
1006
  kind: "differenceArrow",
1007
1007
  id: e.id,
1008
1008
  patch: w
@@ -1010,15 +1010,15 @@ var ln = "q7gcrzd q7gcrzc", lt = "q7gcrze q7gcrzc", Jo = [
1010
1010
  };
1011
1011
  H(() => () => s.seal(), [s]), H(() => {
1012
1012
  const { claimInteraction: w, releaseInteraction: b } = h.getState();
1013
- return d === null ? b("chrome-popup") : w(Go), () => b("chrome-popup");
1013
+ return d === null ? b("chrome-popup") : w(Uo), () => b("chrome-popup");
1014
1014
  }, [h, d]);
1015
- const C = (w) => {
1015
+ const f = (w) => {
1016
1016
  u(w ? "color" : null), w || s.seal();
1017
1017
  }, P = () => {
1018
- s.dispatch(new Be({ id: e.id })), i.focus({ preventScroll: !0 });
1018
+ s.dispatch(new Fe({ id: e.id })), i.focus({ preventScroll: !0 });
1019
1019
  };
1020
1020
  return /* @__PURE__ */ n("div", {
1021
- className: Wo,
1021
+ className: qo,
1022
1022
  style: {
1023
1023
  top: m.top,
1024
1024
  left: m.left,
@@ -1026,15 +1026,15 @@ var ln = "q7gcrzd q7gcrzc", lt = "q7gcrze q7gcrzc", Jo = [
1026
1026
  },
1027
1027
  children: /* @__PURE__ */ p(X.Root, {
1028
1028
  "aria-label": l("graph.annotations.differenceArrowToolbar.label"),
1029
- className: Zo,
1029
+ className: $o,
1030
1030
  "data-testid": "difference-arrow-toolbar",
1031
1031
  ...Se(c),
1032
- style: Bn({
1033
- [Ko]: `${m.centre}px`,
1034
- [Uo]: `${m.available}px`
1032
+ style: Gn({
1033
+ [Wo]: `${m.centre}px`,
1034
+ [Zo]: `${m.available}px`
1035
1035
  }),
1036
1036
  children: [
1037
- /* @__PURE__ */ n(oi, {
1037
+ /* @__PURE__ */ n(li, {
1038
1038
  options: v,
1039
1039
  current: e.label,
1040
1040
  isOpen: d === "labelKind",
@@ -1049,14 +1049,14 @@ var ln = "q7gcrzd q7gcrzc", lt = "q7gcrze q7gcrzc", Jo = [
1049
1049
  label: l("graph.annotations.differenceArrowToolbar.color"),
1050
1050
  onChange: (w) => g({ color: w }, { transient: !0 }),
1051
1051
  isOpen: d === "color",
1052
- onOpenChange: C,
1052
+ onOpenChange: f,
1053
1053
  popupAttributes: Se(c),
1054
1054
  children: /* @__PURE__ */ n("span", {
1055
- className: $o,
1055
+ className: Yo,
1056
1056
  style: { background: e.color ?? "transparent" }
1057
1057
  })
1058
1058
  }),
1059
- /* @__PURE__ */ n(ii, {
1059
+ /* @__PURE__ */ n(si, {
1060
1060
  current: e.size,
1061
1061
  isOpen: d === "size",
1062
1062
  onOpenChange: (w) => u(w ? "size" : null),
@@ -1067,21 +1067,21 @@ var ln = "q7gcrzd q7gcrzc", lt = "q7gcrze q7gcrzc", Jo = [
1067
1067
  /* @__PURE__ */ n(X.Separator, {}),
1068
1068
  /* @__PURE__ */ n(X.Button, {
1069
1069
  "aria-label": l("graph.annotations.differenceArrowToolbar.swap"),
1070
- className: ln,
1070
+ className: an,
1071
1071
  onClick: () => g({
1072
1072
  start: e.end.anchor,
1073
1073
  end: e.start.anchor
1074
1074
  }),
1075
- children: /* @__PURE__ */ n(Fo, {
1075
+ children: /* @__PURE__ */ n(Bo, {
1076
1076
  size: "sm",
1077
1077
  title: ""
1078
1078
  })
1079
1079
  }),
1080
1080
  /* @__PURE__ */ n(X.Button, {
1081
1081
  "aria-label": l("graph.annotations.differenceArrowToolbar.remove"),
1082
- className: ln,
1082
+ className: an,
1083
1083
  onClick: P,
1084
- children: /* @__PURE__ */ n(Bo, {
1084
+ children: /* @__PURE__ */ n(Ko, {
1085
1085
  size: "sm",
1086
1086
  title: ""
1087
1087
  })
@@ -1089,7 +1089,7 @@ var ln = "q7gcrzd q7gcrzc", lt = "q7gcrze q7gcrzc", Jo = [
1089
1089
  ]
1090
1090
  })
1091
1091
  });
1092
- }, oi = ({ options: e, current: t, isOpen: r, onOpenChange: a, onPick: o }) => {
1092
+ }, li = ({ options: e, current: t, isOpen: r, onOpenChange: a, onPick: o }) => {
1093
1093
  const i = I(), l = e.find((s) => s.kind === t), c = e.some((s) => s.isPickable && s.kind !== t);
1094
1094
  return /* @__PURE__ */ p(z.Root, {
1095
1095
  open: r,
@@ -1103,7 +1103,7 @@ var ln = "q7gcrzd q7gcrzc", lt = "q7gcrze q7gcrzc", Jo = [
1103
1103
  onMouseDown: (s) => s.preventDefault(),
1104
1104
  children: [
1105
1105
  /* @__PURE__ */ n("span", {
1106
- className: qo,
1106
+ className: Xo,
1107
1107
  children: l === void 0 ? "" : i(l.nameKey)
1108
1108
  }),
1109
1109
  l !== void 0 && /* @__PURE__ */ p("span", {
@@ -1130,13 +1130,13 @@ var ln = "q7gcrzd q7gcrzc", lt = "q7gcrze q7gcrzc", Jo = [
1130
1130
  children: "⚠"
1131
1131
  }),
1132
1132
  /* @__PURE__ */ n("span", {
1133
- className: Yo,
1133
+ className: Qo,
1134
1134
  children: s.preview
1135
1135
  })
1136
1136
  ]
1137
1137
  }, s.kind)) })]
1138
1138
  });
1139
- }, ii = ({ current: e, isOpen: t, onOpenChange: r, onPick: a }) => {
1139
+ }, si = ({ current: e, isOpen: t, onOpenChange: r, onPick: a }) => {
1140
1140
  const o = I(), i = Oe.find((l) => l.id === e) ?? Oe[0];
1141
1141
  return /* @__PURE__ */ p(z.Root, {
1142
1142
  open: t,
@@ -1158,14 +1158,14 @@ var ln = "q7gcrzd q7gcrzc", lt = "q7gcrze q7gcrzc", Jo = [
1158
1158
  }, st = ({ children: e }) => {
1159
1159
  const { chartId: t } = U();
1160
1160
  return /* @__PURE__ */ n(z.Portal, {
1161
- container: ze(),
1161
+ container: Ve(),
1162
1162
  children: /* @__PURE__ */ n(ge, { children: /* @__PURE__ */ n(z.Positioner, {
1163
1163
  side: "bottom",
1164
1164
  align: "start",
1165
1165
  sideOffset: 6,
1166
- className: Xo,
1166
+ className: jo,
1167
1167
  children: /* @__PURE__ */ n(z.Popup, {
1168
- className: jo,
1168
+ className: Jo,
1169
1169
  onMouseDown: (r) => r.preventDefault(),
1170
1170
  ...Se(t),
1171
1171
  children: e
@@ -1173,32 +1173,8 @@ var ln = "q7gcrzd q7gcrzc", lt = "q7gcrze q7gcrzc", Jo = [
1173
1173
  }) })
1174
1174
  });
1175
1175
  };
1176
- var li = "ydgo3h0", si = "ydgo3h1", ci = "ydgo3h2", ct = (e) => e === "start" ? "end" : "start", dt = ({ dispatch: e, arrow: t, endpoint: r, anchor: a }) => {
1177
- Hn(a, t[r].anchor) || e(new Dn({
1178
- kind: "differenceArrow",
1179
- id: t.id,
1180
- patch: { [r]: a }
1181
- }));
1182
- }, di = ({ clientPoint: e, panelOrigin: t, panelRect: r, engine: a, layers: o, coordSystem: i, resolver: l, fixedAnchor: c, align: s }) => {
1183
- const h = hi({
1184
- x: e.x - t.x,
1185
- y: e.y - t.y
1186
- }, r), { primary: d } = a.query(Ge(h, r));
1187
- if (d === null) return null;
1188
- const u = o.find((m) => m.id === d.layerId);
1189
- if (u === void 0) return null;
1190
- const v = _e({
1191
- resolver: l,
1192
- layer: u,
1193
- observation: d.observation,
1194
- coordSystem: i,
1195
- align: s
1196
- });
1197
- return v === null || Hn(v.anchor, c) ? null : v;
1198
- }, hi = (e, t) => ({
1199
- x: Math.max(0, Math.min(e.x, t.width)),
1200
- y: Math.max(0, Math.min(e.y, t.height))
1201
- }), ui = class {
1176
+ var ci = "ydgo3h0", di = "ydgo3h1", hi = "ydgo3h2";
1177
+ var ui = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, ct = class {
1202
1178
  constructor(e) {
1203
1179
  this.params = e, this.listeners = new AbortController(), this.pendingEvent = null, this.scheduledFrame = null, this.hasMoved = !1, this.hasPublished = !1, this.handleMove = (t) => {
1204
1180
  t.pointerId === this.params.pointerId && (this.pendingEvent = t, this.hasMoved = !0, this.scheduledFrame === null && (this.scheduledFrame = requestAnimationFrame(this.runFrame)));
@@ -1210,23 +1186,15 @@ var li = "ydgo3h0", si = "ydgo3h1", ci = "ydgo3h2", ct = (e) => e === "start" ?
1210
1186
  this.scheduledFrame = null;
1211
1187
  const t = this.pendingEvent;
1212
1188
  if (this.pendingEvent = null, t === null) return;
1213
- const { editorStore: r, engine: a, anchorResolver: o, endpoint: i, readInputs: l } = this.params, { arrow: c, panelOrigin: s, panelRect: h, layers: d, coordSystem: u } = l(), v = r.getState();
1214
- if (this.hasPublished && Ee(J(v, "endpoint-drag"), c.id, i) === null) return;
1215
- const m = di({
1216
- clientPoint: {
1217
- x: t.clientX,
1218
- y: t.clientY
1219
- },
1220
- panelOrigin: s,
1221
- panelRect: h,
1222
- engine: a,
1223
- layers: d,
1224
- coordSystem: u,
1225
- resolver: o,
1226
- fixedAnchor: c[ct(i)].anchor,
1227
- align: c[i].anchor.align
1228
- });
1229
- m !== null && this.publish(m);
1189
+ const r = this.params.editorStore.getState();
1190
+ if (this.hasPublished && this.readOwn(r) === null) return;
1191
+ const a = {
1192
+ x: t.clientX,
1193
+ y: t.clientY
1194
+ };
1195
+ if (!this.hasPublished && !this.isDragConfirmed(this.params.press, a)) return;
1196
+ const o = this.resolvePreview(a);
1197
+ o !== null && (r.claimInteraction(o), this.hasPublished = !0);
1230
1198
  };
1231
1199
  }
1232
1200
  start() {
@@ -1234,33 +1202,94 @@ var li = "ydgo3h0", si = "ydgo3h1", ci = "ydgo3h2", ct = (e) => e === "start" ?
1234
1202
  e.addEventListener("pointermove", this.handleMove, { signal: t }), e.addEventListener("pointerup", this.handleUp, { signal: t }), e.addEventListener("lostpointercapture", this.handleLost, { signal: t });
1235
1203
  }
1236
1204
  finish(e) {
1237
- this.params.onSettled(), this.listeners.abort(), this.cancelFrame(), e && this.hasMoved && this.runFrame(), this.pendingEvent = null;
1238
- const { editorStore: t, endpoint: r, readInputs: a, dispatch: o } = this.params, { arrow: i } = a(), l = t.getState(), c = Ee(J(l, "endpoint-drag"), i.id, r);
1239
- c !== null && (l.releaseInteraction("endpoint-drag"), e && dt({
1240
- dispatch: o,
1241
- arrow: i,
1242
- endpoint: r,
1243
- anchor: c.point.anchor
1244
- }));
1205
+ this.params.onSettled(), this.listeners.abort(), this.cancelFrame();
1206
+ try {
1207
+ e && this.hasMoved && this.runFrame();
1208
+ } finally {
1209
+ this.settle(e);
1210
+ }
1211
+ }
1212
+ isDragConfirmed(e, t) {
1213
+ return ui(e, t);
1245
1214
  }
1246
- publish(e) {
1247
- const { editorStore: t, readInputs: r, endpoint: a } = this.params;
1248
- t.getState().claimInteraction({
1249
- kind: "endpoint-drag",
1250
- annotationId: r().arrow.id,
1251
- endpoint: a,
1252
- point: e
1253
- }), this.hasPublished = !0;
1215
+ settle(e) {
1216
+ this.pendingEvent = null;
1217
+ const t = this.params.editorStore.getState(), r = this.readOwn(t);
1218
+ r !== null && t.releaseInteraction(this.kind), !(!e || r === null) && this.commit(r);
1254
1219
  }
1255
1220
  cancelFrame() {
1256
1221
  this.scheduledFrame !== null && (cancelAnimationFrame(this.scheduledFrame), this.scheduledFrame = null);
1257
1222
  }
1258
- }, mi = ({ arrow: e, panelOrigin: t, panelRect: r }) => {
1259
- const { commands: a, anchorResolver: o } = U(), { engine: i } = Fe(), l = W(), c = ne({
1223
+ }, mi = ({ clientPoint: e, panelOrigin: t, panelRect: r, engine: a, layers: o, coordSystem: i, resolver: l, fixedAnchor: c, align: s }) => {
1224
+ const h = pi({
1225
+ x: e.x - t.x,
1226
+ y: e.y - t.y
1227
+ }, r), { primary: d } = a.query(Ge(h, r));
1228
+ if (d === null) return null;
1229
+ const u = o.find((m) => m.id === d.layerId);
1230
+ if (u === void 0) return null;
1231
+ const v = _e({
1232
+ resolver: l,
1233
+ layer: u,
1234
+ observation: d.observation,
1235
+ coordSystem: i,
1236
+ align: s
1237
+ });
1238
+ return v === null || Dn(v.anchor, c) ? null : v;
1239
+ }, pi = (e, t) => ({
1240
+ x: Math.max(0, Math.min(e.x, t.width)),
1241
+ y: Math.max(0, Math.min(e.y, t.height))
1242
+ }), dt = (e) => e === "start" ? "end" : "start", ht = ({ dispatch: e, arrow: t, endpoint: r, anchor: a }) => {
1243
+ Dn(a, t[r].anchor) || e(new Rn({
1244
+ kind: "differenceArrow",
1245
+ id: t.id,
1246
+ patch: { [r]: a }
1247
+ }));
1248
+ }, gi = class extends ct {
1249
+ constructor(...e) {
1250
+ super(...e), this.kind = "difference-arrow-endpoint-drag";
1251
+ }
1252
+ isDragConfirmed() {
1253
+ return !0;
1254
+ }
1255
+ readOwn(e) {
1256
+ const { endpoint: t, readInputs: r } = this.params;
1257
+ return Nn(ie(e, "difference-arrow-endpoint-drag"), r().arrow.id, t);
1258
+ }
1259
+ resolvePreview(e) {
1260
+ const { endpoint: t, readInputs: r, engine: a, anchorResolver: o } = this.params, { arrow: i, panelOrigin: l, panelRect: c, layers: s, coordSystem: h } = r(), d = mi({
1261
+ clientPoint: e,
1262
+ panelOrigin: l,
1263
+ panelRect: c,
1264
+ engine: a,
1265
+ layers: s,
1266
+ coordSystem: h,
1267
+ resolver: o,
1268
+ fixedAnchor: i[dt(t)].anchor,
1269
+ align: i[t].anchor.align
1270
+ });
1271
+ return d === null ? null : {
1272
+ kind: "difference-arrow-endpoint-drag",
1273
+ annotationId: i.id,
1274
+ endpoint: t,
1275
+ point: d
1276
+ };
1277
+ }
1278
+ commit({ point: e, endpoint: t }) {
1279
+ const { dispatch: r, readInputs: a } = this.params;
1280
+ ht({
1281
+ dispatch: r,
1282
+ arrow: a().arrow,
1283
+ endpoint: t,
1284
+ anchor: e.anchor
1285
+ });
1286
+ }
1287
+ }, vi = ({ arrow: e, panelOrigin: t, panelRect: r }) => {
1288
+ const { commands: a, anchorResolver: o } = U(), { engine: i } = ze(), l = W(), c = ee({
1260
1289
  arrow: e,
1261
1290
  panelOrigin: t,
1262
1291
  panelRect: r,
1263
- ...K(Ke((h) => ({
1292
+ ...K(Be((h) => ({
1264
1293
  layers: h.layers,
1265
1294
  coordSystem: h.coordSystem
1266
1295
  })))
@@ -1273,9 +1302,13 @@ var li = "ydgo3h0", si = "ydgo3h1", ci = "ydgo3h2", ct = (e) => e === "start" ?
1273
1302
  return;
1274
1303
  }
1275
1304
  d.currentTarget.focus({ preventScroll: !0 }), d.preventDefault();
1276
- const u = new ui({
1305
+ const u = new gi({
1277
1306
  handle: d.currentTarget,
1278
1307
  pointerId: d.pointerId,
1308
+ press: {
1309
+ x: d.clientX,
1310
+ y: d.clientY
1311
+ },
1279
1312
  endpoint: h,
1280
1313
  readInputs: () => c.current,
1281
1314
  editorStore: l,
@@ -1294,27 +1327,27 @@ var li = "ydgo3h0", si = "ydgo3h1", ci = "ydgo3h2", ct = (e) => e === "start" ?
1294
1327
  o,
1295
1328
  a
1296
1329
  ]);
1297
- }, pi = [" ", "Enter"], gi = ({ arrow: e }) => {
1298
- const { commands: t, anchorResolver: r } = U(), a = W(), { layers: o, coordSystem: i, mainAxis: l } = K(Ke((s) => ({
1330
+ }, fi = [" ", "Enter"], Ci = ({ arrow: e }) => {
1331
+ const { commands: t, anchorResolver: r } = U(), a = W(), { layers: o, coordSystem: i, mainAxis: l } = K(Be((s) => ({
1299
1332
  layers: s.layers,
1300
1333
  coordSystem: s.coordSystem,
1301
1334
  mainAxis: s.coordSystem.type === "cartesian" ? s.coordSystem.mainAxis : "x"
1302
1335
  }))), c = e.id;
1303
1336
  return H(() => () => {
1304
1337
  const s = a.getState();
1305
- J(s, "endpoint-drag")?.annotationId === c && s.releaseInteraction("endpoint-drag");
1338
+ ie(s, "difference-arrow-endpoint-drag")?.annotationId === c && s.releaseInteraction("difference-arrow-endpoint-drag");
1306
1339
  }, [a, c]), ye((s) => ({ onKeyDown: (h) => {
1307
1340
  if (h.altKey || h.ctrlKey || h.metaKey || h.shiftKey) return;
1308
- const d = a.getState(), u = Ee(J(d, "endpoint-drag"), e.id, s);
1309
- if (pi.includes(h.key)) {
1341
+ const d = a.getState(), u = Nn(ie(d, "difference-arrow-endpoint-drag"), e.id, s);
1342
+ if (fi.includes(h.key)) {
1310
1343
  if (h.preventDefault(), h.repeat) return;
1311
1344
  if (u === null) return d.claimInteraction({
1312
- kind: "endpoint-drag",
1345
+ kind: "difference-arrow-endpoint-drag",
1313
1346
  annotationId: e.id,
1314
1347
  endpoint: s,
1315
1348
  point: e[s]
1316
1349
  });
1317
- d.releaseInteraction("endpoint-drag"), dt({
1350
+ d.releaseInteraction("difference-arrow-endpoint-drag"), ht({
1318
1351
  dispatch: t.dispatch,
1319
1352
  arrow: e,
1320
1353
  endpoint: s,
@@ -1323,10 +1356,10 @@ var li = "ydgo3h0", si = "ydgo3h1", ci = "ydgo3h2", ct = (e) => e === "start" ?
1323
1356
  return;
1324
1357
  }
1325
1358
  if (u === null) return;
1326
- const v = vi(h.key, l);
1359
+ const v = bi(h.key, l);
1327
1360
  if (v === null) return;
1328
1361
  h.preventDefault();
1329
- const m = Ci({
1362
+ const m = yi({
1330
1363
  arrow: e,
1331
1364
  endpoint: s,
1332
1365
  from: u.point.anchor,
@@ -1336,7 +1369,7 @@ var li = "ydgo3h0", si = "ydgo3h1", ci = "ydgo3h2", ct = (e) => e === "start" ?
1336
1369
  resolver: r
1337
1370
  });
1338
1371
  m !== null && d.claimInteraction({
1339
- kind: "endpoint-drag",
1372
+ kind: "difference-arrow-endpoint-drag",
1340
1373
  annotationId: e.id,
1341
1374
  endpoint: s,
1342
1375
  point: m
@@ -1350,19 +1383,19 @@ var li = "ydgo3h0", si = "ydgo3h1", ci = "ydgo3h2", ct = (e) => e === "start" ?
1350
1383
  i,
1351
1384
  l
1352
1385
  ]);
1353
- }, vi = (e, t) => {
1386
+ }, bi = (e, t) => {
1354
1387
  const r = e === "ArrowUp" || e === "ArrowDown";
1355
1388
  return !r && !(e === "ArrowLeft" || e === "ArrowRight") ? null : {
1356
1389
  axis: t === "x" === r ? "cross" : "main",
1357
1390
  step: e === "ArrowDown" || e === "ArrowRight" ? 1 : -1
1358
1391
  };
1359
- }, Ci = ({ arrow: e, endpoint: t, from: r, move: a, layers: o, coordSystem: i, resolver: l }) => {
1392
+ }, yi = ({ arrow: e, endpoint: t, from: r, move: a, layers: o, coordSystem: i, resolver: l }) => {
1360
1393
  const c = o.find((h) => h.id === r.layerId);
1361
1394
  if (c === void 0) return null;
1362
- const s = Ka({
1395
+ const s = Wa({
1363
1396
  layer: c,
1364
1397
  from: r,
1365
- partner: e[ct(t)].anchor,
1398
+ partner: e[dt(t)].anchor,
1366
1399
  axis: a.axis,
1367
1400
  step: a.step,
1368
1401
  canLandOn: (h) => _e({
@@ -1380,15 +1413,15 @@ var li = "ydgo3h0", si = "ydgo3h1", ci = "ydgo3h2", ct = (e) => e === "start" ?
1380
1413
  coordSystem: i,
1381
1414
  align: e[t].anchor.align
1382
1415
  });
1383
- }, fi = (e) => {
1416
+ }, Si = (e) => {
1384
1417
  const t = at();
1385
- return t === null ? null : /* @__PURE__ */ n(bi, {
1418
+ return t === null ? null : /* @__PURE__ */ n(wi, {
1386
1419
  annotationId: t,
1387
1420
  ...e
1388
1421
  });
1389
- }, bi = ({ annotationId: e, ...t }) => {
1390
- const r = cr(), a = k(() => r.find((o) => o.id === e), [r, e]);
1391
- return a === void 0 ? null : /* @__PURE__ */ n(yi, {
1422
+ }, wi = ({ annotationId: e, ...t }) => {
1423
+ const r = hr(), a = _(() => r.find((o) => o.id === e), [r, e]);
1424
+ return a === void 0 ? null : /* @__PURE__ */ n(xi, {
1392
1425
  committedArrow: a.committedArrow,
1393
1426
  committedLabelBox: a.committedLabelBox,
1394
1427
  labelBox: a.labelBox,
@@ -1397,16 +1430,16 @@ var li = "ydgo3h0", si = "ydgo3h1", ci = "ydgo3h2", ct = (e) => e === "start" ?
1397
1430
  isDragged: a.isDragged,
1398
1431
  ...t
1399
1432
  });
1400
- }, yi = ({ committedArrow: e, committedLabelBox: t, labelBox: r, start: a, end: o, panelRect: i, panelOrigin: l, frameRect: c, frameElement: s, isDragged: h }) => {
1401
- const d = mi({
1433
+ }, xi = ({ committedArrow: e, committedLabelBox: t, labelBox: r, start: a, end: o, panelRect: i, panelOrigin: l, frameRect: c, frameElement: s, isDragged: h }) => {
1434
+ const d = vi({
1402
1435
  arrow: e,
1403
1436
  panelOrigin: l,
1404
1437
  panelRect: i
1405
- }), u = gi({ arrow: e });
1438
+ }), u = Ci({ arrow: e });
1406
1439
  return /* @__PURE__ */ p("div", {
1407
1440
  "data-testid": "difference-arrow-selection",
1408
1441
  children: [
1409
- !h && /* @__PURE__ */ n(ai, {
1442
+ !h && /* @__PURE__ */ n(ii, {
1410
1443
  arrow: e,
1411
1444
  labelBox: t,
1412
1445
  panelRect: i,
@@ -1416,7 +1449,7 @@ var li = "ydgo3h0", si = "ydgo3h1", ci = "ydgo3h2", ct = (e) => e === "start" ?
1416
1449
  }),
1417
1450
  /* @__PURE__ */ n("div", {
1418
1451
  "aria-hidden": "true",
1419
- className: ci,
1452
+ className: hi,
1420
1453
  "data-testid": "difference-arrow-selection-label",
1421
1454
  style: {
1422
1455
  left: i.x + r.x - 2,
@@ -1425,14 +1458,14 @@ var li = "ydgo3h0", si = "ydgo3h1", ci = "ydgo3h2", ct = (e) => e === "start" ?
1425
1458
  height: r.height + 4
1426
1459
  }
1427
1460
  }),
1428
- /* @__PURE__ */ n(cn, {
1461
+ /* @__PURE__ */ n(ln, {
1429
1462
  endpoint: "start",
1430
1463
  point: a,
1431
1464
  panelRect: i,
1432
1465
  dragHandlers: d("start"),
1433
1466
  keyboardHandlers: u("start")
1434
1467
  }),
1435
- /* @__PURE__ */ n(cn, {
1468
+ /* @__PURE__ */ n(ln, {
1436
1469
  endpoint: "end",
1437
1470
  point: o,
1438
1471
  panelRect: i,
@@ -1441,8 +1474,8 @@ var li = "ydgo3h0", si = "ydgo3h1", ci = "ydgo3h2", ct = (e) => e === "start" ?
1441
1474
  })
1442
1475
  ]
1443
1476
  });
1444
- }, cn = ({ endpoint: e, point: t, panelRect: r, dragHandlers: a, keyboardHandlers: o }) => /* @__PURE__ */ n("div", {
1445
- className: li,
1477
+ }, ln = ({ endpoint: e, point: t, panelRect: r, dragHandlers: a, keyboardHandlers: o }) => /* @__PURE__ */ n("div", {
1478
+ className: ci,
1446
1479
  "data-testid": "difference-arrow-selection-handle",
1447
1480
  "data-endpoint": e,
1448
1481
  role: "button",
@@ -1455,27 +1488,26 @@ var li = "ydgo3h0", si = "ydgo3h1", ci = "ydgo3h2", ct = (e) => e === "start" ?
1455
1488
  ...o,
1456
1489
  children: /* @__PURE__ */ n("span", {
1457
1490
  "aria-hidden": "true",
1458
- className: si
1491
+ className: di
1459
1492
  })
1460
1493
  });
1461
- var Si = {
1494
+ var Ti = {
1462
1495
  hovered: "_1ee8fau1 _1ee8fau0",
1463
1496
  selected: "_1ee8fau2 _1ee8fau0"
1464
- }, wi = {
1497
+ }, Li = {
1465
1498
  hovered: "_1ee8fau4 _1ee8fau3",
1466
1499
  selected: "_1ee8fau5 _1ee8fau3"
1467
- };
1468
- var xi = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Ti = (e, t, r) => ({
1469
- x: dn(t.x - e.x, r.width),
1470
- y: dn(t.y - e.y, r.height)
1471
- }), Li = (e) => e.x !== 0 || e.y !== 0, ht = (e, t) => ({
1500
+ }, sn = (e, t) => t > 0 ? e / t : 0, Pi = (e, t, r) => ({
1501
+ x: sn(t.x - e.x, r.width),
1502
+ y: sn(t.y - e.y, r.height)
1503
+ }), Ii = (e) => e.x !== 0 || e.y !== 0, ut = (e, t) => ({
1472
1504
  x: e.x * t.width,
1473
1505
  y: e.y * t.height
1474
- }), dn = (e, t) => t > 0 ? e / t : 0, Pi = ({ panelRect: e }) => {
1475
- const t = En(e), r = Gt(), a = at(), o = te((d) => J(d, "move-drag")), i = te((d) => {
1506
+ }), Ai = ({ panelRect: e }) => {
1507
+ const t = Mn(e), r = Ut(), a = at(), o = ne((d) => ie(d, "move-drag")), i = ne((d) => {
1476
1508
  const u = d.editTargetUnderPointer;
1477
1509
  return u?.kind === "annotation" ? u.id : null;
1478
- }), l = k(() => ({
1510
+ }), l = _(() => ({
1479
1511
  panelWidth: e.width,
1480
1512
  panelHeight: e.height,
1481
1513
  measuredBoxes: r
@@ -1483,49 +1515,49 @@ var xi = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Ti = (e, t, r) => ({
1483
1515
  e.width,
1484
1516
  e.height,
1485
1517
  r
1486
- ]), c = hn(t, a, l), s = hn(t, i === a ? null : i, l), h = (d) => {
1518
+ ]), c = cn(t, a, l), s = cn(t, i === a ? null : i, l), h = (d) => {
1487
1519
  if (o?.annotationId !== d) return e;
1488
- const u = ht(o.translation, e);
1520
+ const u = ut(o.translation, e);
1489
1521
  return {
1490
1522
  x: e.x + u.x,
1491
1523
  y: e.y + u.y
1492
1524
  };
1493
1525
  };
1494
- return /* @__PURE__ */ p(G, { children: [s !== null && /* @__PURE__ */ n(un, {
1526
+ return /* @__PURE__ */ p(B, { children: [s !== null && /* @__PURE__ */ n(dn, {
1495
1527
  annotationId: s.id,
1496
1528
  geometry: s.geometry,
1497
1529
  state: "hovered",
1498
1530
  origin: h(s.id)
1499
- }), c !== null && /* @__PURE__ */ n(un, {
1531
+ }), c !== null && /* @__PURE__ */ n(dn, {
1500
1532
  annotationId: c.id,
1501
1533
  geometry: c.geometry,
1502
1534
  state: "selected",
1503
1535
  origin: h(c.id)
1504
1536
  })] });
1505
- }, hn = (e, t, r) => {
1537
+ }, cn = (e, t, r) => {
1506
1538
  if (t === null) return null;
1507
- const a = tr(e, t, r);
1539
+ const a = rr(e, t, r);
1508
1540
  return a === null ? null : {
1509
1541
  id: t,
1510
1542
  geometry: a
1511
1543
  };
1512
- }, un = ({ annotationId: e, geometry: t, state: r, origin: a }) => t.shape === "segment" ? /* @__PURE__ */ p("div", {
1544
+ }, dn = ({ annotationId: e, geometry: t, state: r, origin: a }) => t.shape === "segment" ? /* @__PURE__ */ p("div", {
1513
1545
  "aria-hidden": "true",
1514
1546
  "data-testid": "annotation-chrome",
1515
1547
  "data-annotation-id": e,
1516
1548
  "data-state": r,
1517
- children: [/* @__PURE__ */ n(mn, {
1549
+ children: [/* @__PURE__ */ n(hn, {
1518
1550
  point: t.start,
1519
1551
  state: r,
1520
1552
  origin: a
1521
- }), /* @__PURE__ */ n(mn, {
1553
+ }), /* @__PURE__ */ n(hn, {
1522
1554
  point: t.end,
1523
1555
  state: r,
1524
1556
  origin: a
1525
1557
  })]
1526
1558
  }) : /* @__PURE__ */ n("div", {
1527
1559
  "aria-hidden": "true",
1528
- className: Si[r],
1560
+ className: Ti[r],
1529
1561
  "data-testid": "annotation-chrome",
1530
1562
  "data-annotation-id": e,
1531
1563
  "data-state": r,
@@ -1535,19 +1567,19 @@ var xi = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Ti = (e, t, r) => ({
1535
1567
  width: t.rect.width + 4,
1536
1568
  height: t.rect.height + 4
1537
1569
  }
1538
- }), mn = ({ point: e, state: t, origin: r }) => /* @__PURE__ */ n("span", {
1539
- className: wi[t],
1570
+ }), hn = ({ point: e, state: t, origin: r }) => /* @__PURE__ */ n("span", {
1571
+ className: Li[t],
1540
1572
  style: {
1541
1573
  left: r.x + e.x,
1542
1574
  top: r.y + e.y
1543
1575
  }
1544
- }), Ii = "_1uwdwh60", Ai = ({ panelRect: e }) => {
1545
- const t = te((o) => J(o, "move-drag")), r = En(e);
1576
+ }), Oi = "_1uwdwh60", Mi = ({ panelRect: e }) => {
1577
+ const t = ne((o) => ie(o, "move-drag")), r = Mn(e);
1546
1578
  if (t === null) return null;
1547
- const a = ht(t.translation, e);
1579
+ const a = ut(t.translation, e);
1548
1580
  return /* @__PURE__ */ n("svg", {
1549
1581
  "aria-hidden": "true",
1550
- className: Ii,
1582
+ className: Oi,
1551
1583
  width: e.width,
1552
1584
  height: e.height,
1553
1585
  style: {
@@ -1556,31 +1588,31 @@ var xi = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Ti = (e, t, r) => ({
1556
1588
  },
1557
1589
  "data-testid": "annotation-ghost",
1558
1590
  "data-annotation-id": t.annotationId,
1559
- children: Ni(r, t.annotationId, e)
1591
+ children: _i(r, t.annotationId, e)
1560
1592
  });
1561
- }, Oi = ({ annotation: e }) => /* @__PURE__ */ n(lr, {
1593
+ }, Ni = ({ annotation: e }) => /* @__PURE__ */ n(sr, {
1562
1594
  annotation: e,
1563
- blockRef: Wt(e.id)
1595
+ blockRef: qt(e.id)
1564
1596
  }), be = (e, t, r) => {
1565
1597
  const a = e.find((o) => o.id === t);
1566
1598
  return a === void 0 ? null : r(a);
1567
- }, Mi = {
1568
- text: (e, t) => be(e.textAnnotations, t, (r) => /* @__PURE__ */ n(Oi, { annotation: r })),
1569
- shape: (e, t) => be(e.shapes, t, (r) => /* @__PURE__ */ n($t, { shape: r })),
1570
- image: (e, t) => be(e.images, t, (r) => /* @__PURE__ */ n(er, { image: r })),
1599
+ }, ki = {
1600
+ text: (e, t) => be(e.textAnnotations, t, (r) => /* @__PURE__ */ n(Ni, { annotation: r })),
1601
+ shape: (e, t) => be(e.shapes, t, (r) => /* @__PURE__ */ n(Yt, { shape: r })),
1602
+ image: (e, t) => be(e.images, t, (r) => /* @__PURE__ */ n(nr, { image: r })),
1571
1603
  arrow: (e, t, r) => be(e.arrows, t, (a) => {
1572
- const o = ba({
1604
+ const o = Sa({
1573
1605
  arrow: a,
1574
1606
  panelWidth: r.width,
1575
1607
  panelHeight: r.height
1576
1608
  });
1577
- return o === null ? null : /* @__PURE__ */ n(jt, {
1609
+ return o === null ? null : /* @__PURE__ */ n(Jt, {
1578
1610
  computed: o,
1579
1611
  isAddressable: !1
1580
1612
  });
1581
1613
  })
1582
- }, Ni = (e, t, r) => {
1583
- for (const a of Object.values(Mi)) {
1614
+ }, _i = (e, t, r) => {
1615
+ for (const a of Object.values(ki)) {
1584
1616
  const o = a(e, t, r);
1585
1617
  if (o !== null) return o;
1586
1618
  }
@@ -1594,25 +1626,25 @@ var xi = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Ti = (e, t, r) => ({
1594
1626
  strokeLinejoin: "round",
1595
1627
  children: [/* @__PURE__ */ n("path", { d: "M12 5v14" }), /* @__PURE__ */ n("path", { d: "M5 12h14" })]
1596
1628
  })
1597
- }), ki = "var(--_1tyillx0)", _i = {
1629
+ }), Ri = "var(--_1tyillx0)", Di = {
1598
1630
  rest: 0.5,
1599
1631
  hovered: 0.75,
1600
1632
  open: 1
1601
1633
  };
1602
- var Ri = "_1tyillx1", Di = {
1634
+ var Hi = "_1tyillx1", Vi = {
1603
1635
  rest: "_1tyillx2",
1604
1636
  hovered: "_1tyillx3",
1605
1637
  open: "_1tyillx4"
1606
- }, Hi = "_1tyillx5", Vi = {
1638
+ }, zi = "_1tyillx5", Fi = {
1607
1639
  closed: "_1tyillx6",
1608
1640
  open: "_1tyillx7"
1609
- }, zi = ({ interaction: e, panelRect: t }) => {
1610
- const r = W(), a = K((c) => c.coordSystem), o = e.kind === "trigger" || e.kind === "menu" ? e.anchor : null, i = Fi(e), l = k(() => {
1641
+ }, Gi = ({ interaction: e, panelRect: t }) => {
1642
+ const r = W(), a = K((c) => c.coordSystem), o = e.kind === "trigger" || e.kind === "menu" ? e.anchor : null, i = Bi(e), l = _(() => {
1611
1643
  if (o === null) return null;
1612
- const c = za(o.position, t, a);
1644
+ const c = Ga(o.position, t, a);
1613
1645
  return {
1614
1646
  center: c,
1615
- radius: 19 * _i[i],
1647
+ radius: 19 * Di[i],
1616
1648
  target: {
1617
1649
  kind: "observation",
1618
1650
  cursor: Ge(c, t)
@@ -1630,24 +1662,24 @@ var Ri = "_1tyillx1", Di = {
1630
1662
  "aria-hidden": "true",
1631
1663
  "data-testid": "observation-menu-trigger",
1632
1664
  "data-state": i,
1633
- className: se(Ri, Di[i]),
1665
+ className: se(Hi, Vi[i]),
1634
1666
  style: {
1635
1667
  left: t.x + l.center.x,
1636
1668
  top: t.y + l.center.y,
1637
- ...Bn({ [ki]: o.color ?? dr.border50 })
1669
+ ...Gn({ [Ri]: o.color ?? ur.border50 })
1638
1670
  },
1639
1671
  children: /* @__PURE__ */ n("span", {
1640
- className: se(Hi, Vi[i === "open" ? "open" : "closed"]),
1672
+ className: se(zi, Fi[i === "open" ? "open" : "closed"]),
1641
1673
  children: /* @__PURE__ */ n(Ei, { size: "lg" })
1642
1674
  })
1643
1675
  });
1644
- }, Fi = (e) => e.kind === "menu" ? "open" : e.kind === "trigger" && e.isEngaged ? "hovered" : "rest", Bi = 'button:not([disabled]):not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])', Gi = (e, t) => {
1676
+ }, Bi = (e) => e.kind === "menu" ? "open" : e.kind === "trigger" && e.isEngaged ? "hovered" : "rest", Ki = 'button:not([disabled]):not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])', Ui = (e, t) => {
1645
1677
  const { chartId: r } = U(), a = W();
1646
1678
  H(() => {
1647
1679
  if (t === null) return;
1648
1680
  const o = (i) => {
1649
1681
  if (i.key !== "Tab" || i.defaultPrevented || !me(i.target, e, r) || a.getState().standingInteraction?.kind === "chrome-popup") return;
1650
- const l = [...t.querySelectorAll(Bi)];
1682
+ const l = [...t.querySelectorAll(Ki)];
1651
1683
  if (l.length === 0) return;
1652
1684
  i.preventDefault();
1653
1685
  const c = l.findIndex((s) => s === document.activeElement);
@@ -1660,7 +1692,7 @@ var Ri = "_1tyillx1", Di = {
1660
1692
  r,
1661
1693
  a
1662
1694
  ]);
1663
- }, Ki = (e) => {
1695
+ }, Wi = (e) => {
1664
1696
  const { selectionStore: t, chartId: r } = U();
1665
1697
  H(() => {
1666
1698
  let a = null;
@@ -1682,99 +1714,67 @@ var Ri = "_1tyillx1", Di = {
1682
1714
  t,
1683
1715
  r
1684
1716
  ]);
1685
- }, Ui = `[${Nn}]`, ut = (e, t, r) => {
1717
+ }, Zi = `[${On}]`, mt = (e, t, r) => {
1686
1718
  if (typeof document.elementsFromPoint != "function") return null;
1687
1719
  const a = document.elementsFromPoint(e, t);
1688
- return Wi(a, r);
1689
- }, Wi = (e, t) => {
1720
+ return qi(a, r);
1721
+ }, qi = (e, t) => {
1690
1722
  for (const r of e) {
1691
- const a = r.closest(Ui);
1692
- if (!(a === null || !t.contains(a)) && !Zi(a, r))
1693
- return qi(a);
1723
+ const a = r.closest(Zi);
1724
+ if (!(a === null || !t.contains(a)) && !$i(a, r))
1725
+ return Xi(a);
1694
1726
  }
1695
1727
  return null;
1696
- }, Zi = (e, t) => e === t && e.getAttribute("data-edit-kind") === "observation", qi = (e) => {
1697
- const t = e.getAttribute(Nn);
1728
+ }, $i = (e, t) => e === t && e.getAttribute("data-edit-kind") === "observation", Xi = (e) => {
1729
+ const t = e.getAttribute(On);
1698
1730
  if (t !== "annotation") return null;
1699
- const r = e.getAttribute(Qt);
1731
+ const r = e.getAttribute(er);
1700
1732
  return r === null || r === "" ? null : {
1701
1733
  kind: t,
1702
1734
  id: r
1703
1735
  };
1704
- }, $i = class {
1705
- constructor(e) {
1706
- this.params = e, this.listeners = new AbortController(), this.pendingEvent = null, this.scheduledFrame = null, this.hasPublished = !1, this.handleMove = (t) => {
1707
- t.pointerId === this.params.pointerId && (this.pendingEvent = t, this.scheduledFrame === null && (this.scheduledFrame = requestAnimationFrame(this.runFrame)));
1708
- }, this.handleUp = (t) => {
1709
- t.pointerId === this.params.pointerId && (this.pendingEvent = t, this.finish(!0));
1710
- }, this.handleLost = (t) => {
1711
- t.pointerId === this.params.pointerId && this.finish(!1);
1712
- }, this.runFrame = () => {
1713
- this.scheduledFrame = null;
1714
- const t = this.pendingEvent;
1715
- if (this.pendingEvent = null, t === null) return;
1716
- const { editorStore: r, annotationId: a, press: o, readInputs: i } = this.params, l = r.getState(), c = J(l, "move-drag");
1717
- if (this.hasPublished && Je(c, a) === null) return;
1718
- const s = {
1719
- x: t.clientX,
1720
- y: t.clientY
1721
- };
1722
- if (!this.hasPublished && !xi(o, s)) return;
1723
- const { annotations: h, panelRect: d } = i(), u = La(h, a);
1724
- if (u === null) return;
1725
- const v = fa(u, Ti(o, s, d));
1726
- v !== null && (l.claimInteraction({
1727
- kind: "move-drag",
1728
- annotationId: a,
1729
- translation: v
1730
- }), this.hasPublished = !0);
1731
- };
1732
- }
1733
- start() {
1734
- const { handle: e } = this.params, { signal: t } = this.listeners;
1735
- e.addEventListener("pointermove", this.handleMove, { signal: t }), e.addEventListener("pointerup", this.handleUp, { signal: t }), e.addEventListener("lostpointercapture", this.handleLost, { signal: t });
1736
+ }, Yi = class extends ct {
1737
+ constructor(...e) {
1738
+ super(...e), this.kind = "move-drag";
1736
1739
  }
1737
- finish(e) {
1738
- this.params.onSettled(), this.listeners.abort(), this.cancelFrame();
1739
- try {
1740
- e && this.runFrame();
1741
- } finally {
1742
- this.settle(e);
1743
- }
1740
+ readOwn(e) {
1741
+ return Kt(ie(e, "move-drag"), this.params.annotationId);
1744
1742
  }
1745
- settle(e) {
1746
- this.pendingEvent = null;
1747
- const { editorStore: t, annotationId: r } = this.params, a = t.getState(), o = Je(J(a, "move-drag"), r);
1748
- o !== null && a.releaseInteraction("move-drag"), !(!e || o === null) && this.commit(o.translation);
1743
+ resolvePreview(e) {
1744
+ const { annotationId: t, press: r, readInputs: a } = this.params, { annotations: o, panelRect: i } = a(), l = Pa(o, t);
1745
+ if (l === null) return null;
1746
+ const c = ya(l, Pi(r, e, i));
1747
+ return c === null ? null : {
1748
+ kind: "move-drag",
1749
+ annotationId: t,
1750
+ translation: c
1751
+ };
1749
1752
  }
1750
- commit(e) {
1753
+ commit({ translation: e }) {
1751
1754
  const { annotationId: t, dispatch: r } = this.params;
1752
- Li(e) && r(new br({
1755
+ Ii(e) && r(new Sr({
1753
1756
  id: t,
1754
1757
  translation: e
1755
1758
  }));
1756
1759
  }
1757
- cancelFrame() {
1758
- this.scheduledFrame !== null && (cancelAnimationFrame(this.scheduledFrame), this.scheduledFrame = null);
1759
- }
1760
- }, Xi = (e, t, r) => {
1761
- const { commands: a, selectionStore: o } = U(), i = W(), l = ne({
1760
+ }, ji = (e, t, r) => {
1761
+ const { commands: a, selectionStore: o } = U(), i = W(), l = ee({
1762
1762
  annotations: K((h) => h.spec.annotations),
1763
1763
  panelRect: r
1764
- }), c = ne(t), s = pe(null);
1764
+ }), c = ee(t), s = pe(null);
1765
1765
  H(() => () => s.current?.finish(!1), []), H(() => {
1766
1766
  const h = (v) => {
1767
1767
  const { editTargetUnderPointer: m, standingInteraction: g } = i.getState();
1768
- return m !== null && g === null && v.pointerType === "mouse" && ji(v.target, e) ? m : ut(v.clientX, v.clientY, e);
1768
+ return m !== null && g === null && v.pointerType === "mouse" && Ji(v.target, e) ? m : mt(v.clientX, v.clientY, e);
1769
1769
  }, d = (v, m) => {
1770
- if (s.current !== null || !ar(l.current.annotations, m.id)) return;
1770
+ if (s.current !== null || !or(l.current.annotations, m.id)) return;
1771
1771
  try {
1772
1772
  e.setPointerCapture(v.pointerId);
1773
1773
  } catch {
1774
1774
  return;
1775
1775
  }
1776
1776
  v.preventDefault();
1777
- const g = new $i({
1777
+ const g = new Yi({
1778
1778
  handle: e,
1779
1779
  pointerId: v.pointerId,
1780
1780
  annotationId: m.id,
@@ -1808,10 +1808,10 @@ var Ri = "_1tyillx1", Di = {
1808
1808
  l,
1809
1809
  c
1810
1810
  ]);
1811
- }, ji = (e, t) => e instanceof Node && t.contains(e), Yi = (e) => {
1811
+ }, Ji = (e, t) => e instanceof Node && t.contains(e), Qi = (e) => {
1812
1812
  const { selectionStore: t, commands: r, chartId: a } = U(), o = W(), i = ye((c) => {
1813
1813
  const { selection: s } = t.getState(), h = ot(s);
1814
- h !== null && (c.preventDefault(), r.dispatch(new Be({ id: h })), e.focus({ preventScroll: !0 }));
1814
+ h !== null && (c.preventDefault(), r.dispatch(new Fe({ id: h })), e.focus({ preventScroll: !0 }));
1815
1815
  }, [
1816
1816
  e,
1817
1817
  r,
@@ -1819,8 +1819,8 @@ var Ri = "_1tyillx1", Di = {
1819
1819
  ]), l = ye((c) => {
1820
1820
  const s = o.getState();
1821
1821
  switch (s.standingInteraction?.kind) {
1822
- case "endpoint-drag":
1823
- s.releaseInteraction("endpoint-drag");
1822
+ case "difference-arrow-endpoint-drag":
1823
+ s.releaseInteraction("difference-arrow-endpoint-drag");
1824
1824
  return;
1825
1825
  case "move-drag":
1826
1826
  s.releaseInteraction("move-drag");
@@ -1846,7 +1846,7 @@ var Ri = "_1tyillx1", Di = {
1846
1846
  ]);
1847
1847
  H(() => {
1848
1848
  const c = (s) => {
1849
- if (me(s.target, e, a) && !Ji(s.target) && !$a(s.target))
1849
+ if (me(s.target, e, a) && !el(s.target) && !Ya(s.target))
1850
1850
  switch (s.key) {
1851
1851
  case "Escape":
1852
1852
  return l(s);
@@ -1864,12 +1864,12 @@ var Ri = "_1tyillx1", Di = {
1864
1864
  l,
1865
1865
  a
1866
1866
  ]);
1867
- }, Ji = (e) => e instanceof HTMLElement && (e.isContentEditable || e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement), Qi = () => {
1868
- const e = Ut((o) => o.hover.primary), { layers: t, coordSystem: r } = K(Ke((o) => ({
1867
+ }, el = (e) => e instanceof HTMLElement && (e.isContentEditable || e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement), nl = () => {
1868
+ const e = Zt((o) => o.hover.primary), { layers: t, coordSystem: r } = K(Be((o) => ({
1869
1869
  layers: o.layers,
1870
1870
  coordSystem: o.coordSystem
1871
1871
  }))), { anchorResolver: a } = U();
1872
- return k(() => {
1872
+ return _(() => {
1873
1873
  if (e === null) return null;
1874
1874
  const o = t.find((c) => c.id === e.layerId);
1875
1875
  if (o === void 0) return null;
@@ -1879,10 +1879,10 @@ var Ri = "_1tyillx1", Di = {
1879
1879
  purpose: "pin"
1880
1880
  });
1881
1881
  if (i === null) return null;
1882
- const l = pa(o, e.observation);
1882
+ const l = va(o, e.observation);
1883
1883
  return l === null ? null : {
1884
1884
  position: i,
1885
- color: ka(e.observation),
1885
+ color: Ra(e.observation),
1886
1886
  layer: o,
1887
1887
  at: l,
1888
1888
  observation: e.observation
@@ -1893,9 +1893,9 @@ var Ri = "_1tyillx1", Di = {
1893
1893
  r,
1894
1894
  a
1895
1895
  ]);
1896
- }, el = { kind: "idle" }, mt = () => {
1897
- const e = te((a) => a.standingInteraction), t = te((a) => a.chromeUnderPointer), r = Qi();
1898
- return k(() => e !== null ? e : r === null ? el : {
1896
+ }, tl = { kind: "idle" }, pt = () => {
1897
+ const e = ne((a) => a.standingInteraction), t = ne((a) => a.chromeUnderPointer), r = nl();
1898
+ return _(() => e !== null ? e : r === null ? tl : {
1899
1899
  kind: "trigger",
1900
1900
  anchor: r,
1901
1901
  isEngaged: t === "menu-trigger"
@@ -1904,25 +1904,25 @@ var Ri = "_1tyillx1", Di = {
1904
1904
  r,
1905
1905
  t
1906
1906
  ]);
1907
- }, nl = (e, t, r) => {
1908
- const a = W(), { selectionStore: o } = U(), { store: i, engine: l } = Fe(), c = ne(e), s = ne(t), h = ne(r);
1907
+ }, rl = (e, t, r) => {
1908
+ const a = W(), { selectionStore: o } = U(), { store: i, engine: l } = ze(), c = ee(e), s = ee(t), h = ee(r);
1909
1909
  H(() => {
1910
- const d = (C) => qn(C, s.current, a.getState().menuTrigger), u = (C) => {
1911
- if (d(C) || o.getState().selection.length > 0) return;
1910
+ const d = (f) => qn(f, s.current, a.getState().menuTrigger), u = (f) => {
1911
+ if (d(f) || o.getState().selection.length > 0) return;
1912
1912
  const P = h.current, w = s.current, b = {
1913
- x: C.clientX - w.x,
1914
- y: C.clientY - w.y
1915
- }, T = tl(b, P) ? l.query(Ge(b, P)) : Rn;
1913
+ x: f.clientX - w.x,
1914
+ y: f.clientY - w.y
1915
+ }, T = al(b, P) ? l.query(Ge(b, P)) : En;
1916
1916
  i.getState().setHoverState(T);
1917
1917
  };
1918
1918
  let v = !1;
1919
1919
  const m = () => {
1920
1920
  v = c.current.kind === "menu";
1921
- }, g = (C) => {
1922
- if (Zn(C.target)) return;
1921
+ }, g = (f) => {
1922
+ if (Zn(f.target)) return;
1923
1923
  const { claimInteraction: P, releaseInteraction: w } = a.getState();
1924
- if (!d(C) || v) {
1925
- w("menu"), v && u(C);
1924
+ if (!d(f) || v) {
1925
+ w("menu"), v && u(f);
1926
1926
  return;
1927
1927
  }
1928
1928
  const b = c.current;
@@ -1943,8 +1943,8 @@ var Ri = "_1tyillx1", Di = {
1943
1943
  s,
1944
1944
  h
1945
1945
  ]);
1946
- }, tl = (e, t) => e.x >= 0 && e.x <= t.width && e.y >= 0 && e.y <= t.height, rl = (e, t) => {
1947
- const r = W(), a = ne(t);
1946
+ }, al = (e, t) => e.x >= 0 && e.x <= t.width && e.y >= 0 && e.y <= t.height, ol = (e, t) => {
1947
+ const r = W(), a = ee(t);
1948
1948
  H(() => {
1949
1949
  let o = null, i = null;
1950
1950
  const l = (m) => {
@@ -1954,13 +1954,13 @@ var Ri = "_1tyillx1", Di = {
1954
1954
  o = null;
1955
1955
  const m = i;
1956
1956
  if (m === null) return;
1957
- const g = a.current, C = r.getState();
1958
- if (C.setChromeUnderPointer(l({
1957
+ const g = a.current, f = r.getState();
1958
+ if (f.setChromeUnderPointer(l({
1959
1959
  x: m.x - g.x,
1960
1960
  y: m.y - g.y
1961
- })), Me(C.standingInteraction)) return;
1962
- const P = ut(m.x, m.y, e);
1963
- C.setEditTargetUnderPointer(P);
1961
+ })), Me(f.standingInteraction)) return;
1962
+ const P = mt(m.x, m.y, e);
1963
+ f.setEditTargetUnderPointer(P);
1964
1964
  }, s = () => {
1965
1965
  o === null && (o = requestAnimationFrame(c));
1966
1966
  }, h = () => {
@@ -1984,26 +1984,26 @@ var Ri = "_1tyillx1", Di = {
1984
1984
  r,
1985
1985
  a
1986
1986
  ]);
1987
- }, Me = (e) => e?.kind === "menu" || e?.kind === "move-drag", pn = "editor", gn = [], al = (e, t, r, a) => {
1988
- const o = mt(), { store: i } = Fe(), l = kn().length > 0, c = te((d) => d.menuTrigger), s = o.kind === "menu", h = k(() => c === null ? gn : [ua(c)], [c]);
1989
- rl(e, t), Xi(e, t, r), nl(o, t, r), Ki(e), Yi(e), Gi(e, a), H(() => (i.getState().publishPointerRegions(pn, h), () => i.getState().publishPointerRegions(pn, gn)), [i, h]), H(() => (i.getState().setPointerSuspended(s || l), () => i.getState().setPointerSuspended(!1)), [
1987
+ }, Me = (e) => e?.kind === "menu" || e?.kind === "move-drag", un = "editor", mn = [], il = (e, t, r, a) => {
1988
+ const o = pt(), { store: i } = ze(), l = kn().length > 0, c = ne((d) => d.menuTrigger), s = o.kind === "menu", h = _(() => c === null ? mn : [pa(c)], [c]);
1989
+ ol(e, t), ji(e, t, r), rl(o, t, r), Wi(e), Qi(e), Ui(e, a), H(() => (i.getState().publishPointerRegions(un, h), () => i.getState().publishPointerRegions(un, mn)), [i, h]), H(() => (i.getState().setPointerSuspended(s || l), () => i.getState().setPointerSuspended(!1)), [
1990
1990
  i,
1991
1991
  s,
1992
1992
  l
1993
1993
  ]), H(() => {
1994
1994
  if (!l) return;
1995
1995
  const d = i.getState();
1996
- d.setHoverState(Rn), d.setTooltipAnchor(null);
1996
+ d.setHoverState(En), d.setTooltipAnchor(null);
1997
1997
  }, [i, l]);
1998
- }, ol = ({ frameElement: e, panelRect: t }) => {
1999
- const { measureRef: r, screenRect: a } = Kt(), o = W();
2000
- return H(() => (r(e), () => r(null)), [r, e]), H(() => () => o.getState().releaseInteraction("menu"), [o]), a === null ? null : /* @__PURE__ */ n(ja, { children: /* @__PURE__ */ n(il, {
1998
+ }, ll = ({ frameElement: e, panelRect: t }) => {
1999
+ const { measureRef: r, screenRect: a } = Wt(), o = W();
2000
+ return H(() => (r(e), () => r(null)), [r, e]), H(() => () => o.getState().releaseInteraction("menu"), [o]), a === null ? null : /* @__PURE__ */ n(Ja, { children: /* @__PURE__ */ n(sl, {
2001
2001
  frameElement: e,
2002
2002
  frameRect: a,
2003
2003
  panelRect: t
2004
2004
  }) });
2005
- }, il = ({ frameElement: e, frameRect: t, panelRect: r }) => {
2006
- const a = k(() => ({
2005
+ }, sl = ({ frameElement: e, frameRect: t, panelRect: r }) => {
2006
+ const a = _(() => ({
2007
2007
  x: t.left + r.x,
2008
2008
  y: t.top + r.y
2009
2009
  }), [
@@ -2012,48 +2012,48 @@ var Ri = "_1tyillx1", Di = {
2012
2012
  r.x,
2013
2013
  r.y
2014
2014
  ]), [o, i] = q(null);
2015
- return al(e, a, r, o), /* @__PURE__ */ n(ll, {
2015
+ return il(e, a, r, o), /* @__PURE__ */ n(cl, {
2016
2016
  frameElement: e,
2017
2017
  frameRect: t,
2018
2018
  panelOrigin: a,
2019
2019
  panelRect: r,
2020
2020
  boxRef: i
2021
2021
  });
2022
- }, ll = ({ frameElement: e, frameRect: t, panelOrigin: r, panelRect: a, boxRef: o }) => {
2023
- const i = Ue(), l = mt();
2024
- return /* @__PURE__ */ n(or, {
2022
+ }, cl = ({ frameElement: e, frameRect: t, panelOrigin: r, panelRect: a, boxRef: o }) => {
2023
+ const i = Ke(), l = pt();
2024
+ return /* @__PURE__ */ n(ir, {
2025
2025
  rect: t,
2026
- zIndex: nr.editorOverlay,
2026
+ zIndex: tr.editorOverlay,
2027
2027
  container: i,
2028
2028
  "data-testid": "editor-overlay",
2029
2029
  boxRef: o,
2030
2030
  children: /* @__PURE__ */ p(ge, { children: [
2031
- /* @__PURE__ */ n(fi, {
2031
+ /* @__PURE__ */ n(Si, {
2032
2032
  panelRect: a,
2033
2033
  panelOrigin: r,
2034
2034
  frameRect: t,
2035
2035
  frameElement: e
2036
2036
  }),
2037
+ /* @__PURE__ */ n(Mi, { panelRect: a }),
2037
2038
  /* @__PURE__ */ n(Ai, { panelRect: a }),
2038
- /* @__PURE__ */ n(Pi, { panelRect: a }),
2039
- /* @__PURE__ */ n(zi, {
2039
+ /* @__PURE__ */ n(Gi, {
2040
2040
  interaction: l,
2041
2041
  panelRect: a
2042
2042
  }),
2043
- /* @__PURE__ */ n(Ro, {
2043
+ /* @__PURE__ */ n(Ho, {
2044
2044
  interaction: l,
2045
2045
  panelOrigin: r
2046
2046
  })
2047
2047
  ] })
2048
2048
  });
2049
- }, l1 = ({ slots: e, ...t }) => /* @__PURE__ */ n(Zt, { children: /* @__PURE__ */ n(Jt, {
2050
- slots: k(() => ({
2051
- EditorSurface: ol,
2049
+ }, d1 = ({ slots: e, ...t }) => /* @__PURE__ */ n($t, { children: /* @__PURE__ */ n(Qt, {
2050
+ slots: _(() => ({
2051
+ EditorSurface: ll,
2052
2052
  ...e
2053
2053
  }), [e]),
2054
2054
  ...t
2055
- }) }), pt = ve(null), gt = ({ labelId: e, controlId: t, children: r }) => {
2056
- const a = k(() => {
2055
+ }) }), gt = ve(null), vt = ({ labelId: e, controlId: t, children: r }) => {
2056
+ const a = _(() => {
2057
2057
  let o = null;
2058
2058
  return {
2059
2059
  labelId: e,
@@ -2061,30 +2061,30 @@ var Ri = "_1tyillx1", Di = {
2061
2061
  claimControlId: (i) => (o ??= i, o === i)
2062
2062
  };
2063
2063
  }, [e, t]);
2064
- return /* @__PURE__ */ n(pt.Provider, {
2064
+ return /* @__PURE__ */ n(gt.Provider, {
2065
2065
  value: a,
2066
2066
  children: r
2067
2067
  });
2068
- }, Q = ({ id: e, ariaLabel: t, ariaLabelledBy: r }, a = !0) => {
2069
- const o = ce(pt), i = le(), [l] = q(() => a ? o?.claimControlId(i) ?? !1 : !1), c = e ?? (l ? o?.controlId : void 0), s = r ?? (t === void 0 ? o?.labelId : void 0);
2068
+ }, J = ({ id: e, ariaLabel: t, ariaLabelledBy: r }, a = !0) => {
2069
+ const o = ce(gt), i = le(), [l] = q(() => a ? o?.claimControlId(i) ?? !1 : !1), c = e ?? (l ? o?.controlId : void 0), s = r ?? (t === void 0 ? o?.labelId : void 0);
2070
2070
  return {
2071
2071
  ...c !== void 0 && { id: c },
2072
2072
  ...t !== void 0 && { "aria-label": t },
2073
2073
  ...s !== void 0 && { "aria-labelledby": s }
2074
2074
  };
2075
2075
  };
2076
- var sl = {
2076
+ var dl = {
2077
2077
  default: "woi4bh4 woi4bh3",
2078
2078
  tile: "woi4bh5 woi4bh3"
2079
- }, cl = ({ label: e, icon: t, onClick: r, variant: a = "default", isDisabled: o, ariaLabel: i, ariaLabelledBy: l, id: c }) => {
2080
- const s = Q({
2079
+ }, hl = ({ label: e, icon: t, onClick: r, variant: a = "default", isDisabled: o, ariaLabel: i, ariaLabelledBy: l, id: c }) => {
2080
+ const s = J({
2081
2081
  id: c,
2082
2082
  ariaLabel: i,
2083
2083
  ariaLabelledBy: l
2084
2084
  }), h = a === "tile";
2085
2085
  return /* @__PURE__ */ p("button", {
2086
2086
  type: "button",
2087
- className: sl[a],
2087
+ className: dl[a],
2088
2088
  disabled: o,
2089
2089
  onClick: r,
2090
2090
  ...s,
@@ -2096,16 +2096,16 @@ var sl = {
2096
2096
  children: e
2097
2097
  })]
2098
2098
  });
2099
- }, Ze = ve(null), O = () => {
2100
- const e = ce(Ze);
2099
+ }, We = ve(null), O = () => {
2100
+ const e = ce(We);
2101
2101
  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>.");
2102
2102
  return e;
2103
- }, vt = ({ children: e, onKeyDown: t, ...r }) => {
2104
- const a = ce(Ze);
2103
+ }, ft = ({ children: e, onKeyDown: t, ...r }) => {
2104
+ const a = ce(We);
2105
2105
  return /* @__PURE__ */ n("div", {
2106
2106
  onKeyDown: (i) => {
2107
2107
  if (t?.(i), !a || i.defaultPrevented) return;
2108
- const l = sr(i.nativeEvent);
2108
+ const l = cr(i.nativeEvent);
2109
2109
  l && (i.preventDefault(), l === "undo" ? a.undo() : a.redo());
2110
2110
  },
2111
2111
  ...r,
@@ -2140,26 +2140,26 @@ var sl = {
2140
2140
  }
2141
2141
  }
2142
2142
  };
2143
- }, dl = "eh8dvc0", hl = "eh8dvc1 uz3g760", ul = "eh8dvc2 uz3g761";
2144
- var ml = ({ value: e, onChange: t, onCommit: r, min: a, max: o, step: i, placeholder: l, prefix: c, suffix: s, isDisabled: h, hasError: d, ariaLabel: u, ariaLabelledBy: v, id: m }) => {
2145
- const g = Q({
2143
+ }, ul = "eh8dvc0", ml = "eh8dvc1 uz3g760", pl = "eh8dvc2 uz3g761";
2144
+ var gl = ({ value: e, onChange: t, onCommit: r, min: a, max: o, step: i, placeholder: l, prefix: c, suffix: s, isDisabled: h, hasError: d, ariaLabel: u, ariaLabelledBy: v, id: m }) => {
2145
+ const g = J({
2146
2146
  id: m,
2147
2147
  ariaLabel: u,
2148
2148
  ariaLabelledBy: v
2149
- }), { commitUnlessHeldKey: C, gestureHandlers: P } = Le(r);
2150
- return /* @__PURE__ */ n(an.Root, {
2151
- className: dl,
2149
+ }), { commitUnlessHeldKey: f, gestureHandlers: P } = Le(r);
2150
+ return /* @__PURE__ */ n(tn.Root, {
2151
+ className: ul,
2152
2152
  value: e,
2153
2153
  onValueChange: (w) => t(w),
2154
2154
  onValueCommitted: (w, b) => {
2155
- C(b.reason === Ct);
2155
+ f(b.reason === Ct);
2156
2156
  },
2157
2157
  min: a,
2158
2158
  max: o,
2159
2159
  step: i,
2160
2160
  disabled: h,
2161
- children: /* @__PURE__ */ p(vt, {
2162
- className: hl,
2161
+ children: /* @__PURE__ */ p(ft, {
2162
+ className: ml,
2163
2163
  "data-error": d === !0,
2164
2164
  "data-disabled": h === !0 ? "" : void 0,
2165
2165
  children: [
@@ -2167,8 +2167,8 @@ var ml = ({ value: e, onChange: t, onCommit: r, min: a, max: o, step: i, placeho
2167
2167
  className: "eh8dvc3",
2168
2168
  children: c
2169
2169
  }),
2170
- /* @__PURE__ */ n(an.Input, {
2171
- className: ul,
2170
+ /* @__PURE__ */ n(tn.Input, {
2171
+ className: pl,
2172
2172
  placeholder: l,
2173
2173
  ...P,
2174
2174
  "aria-invalid": d === !0 ? !0 : void 0,
@@ -2181,22 +2181,22 @@ var ml = ({ value: e, onChange: t, onCommit: r, min: a, max: o, step: i, placeho
2181
2181
  ]
2182
2182
  })
2183
2183
  });
2184
- }, pl = "_1b7s5f0", ie = {
2184
+ }, vl = "_1b7s5f0", oe = {
2185
2185
  1: "_1b7s5f1",
2186
2186
  2: "_1b7s5f2",
2187
2187
  3: "_1b7s5f3",
2188
2188
  4: "_1b7s5f4",
2189
2189
  5: "_1b7s5f5",
2190
2190
  6: "_1b7s5f6"
2191
- }, gl = "_1b7s5f7";
2192
- var vl = 6, Cl = ({ options: e, value: t, onChange: r, onCommit: a, columns: o, itemLayout: i = "tile", isDisabled: l, ariaLabel: c, ariaLabelledBy: s, id: h }) => {
2193
- const d = Q({
2191
+ }, fl = "_1b7s5f7";
2192
+ var Cl = 6, bl = ({ options: e, value: t, onChange: r, onCommit: a, columns: o, itemLayout: i = "tile", isDisabled: l, ariaLabel: c, ariaLabelledBy: s, id: h }) => {
2193
+ const d = J({
2194
2194
  id: h,
2195
2195
  ariaLabel: c,
2196
2196
  ariaLabelledBy: s
2197
2197
  }), u = i === "swatch", { commitAfterChange: v, gestureHandlers: m } = Le(a);
2198
2198
  return /* @__PURE__ */ n(Kn, {
2199
- className: se(pl, fl(o ?? e.length)),
2199
+ className: se(vl, yl(o ?? e.length)),
2200
2200
  value: t,
2201
2201
  onValueChange: (g) => {
2202
2202
  r(g), v();
@@ -2204,10 +2204,10 @@ var vl = 6, Cl = ({ options: e, value: t, onChange: r, onCommit: a, columns: o,
2204
2204
  ...m,
2205
2205
  disabled: l,
2206
2206
  ...d,
2207
- children: e.map((g) => /* @__PURE__ */ p(Gn.Root, {
2207
+ children: e.map((g) => /* @__PURE__ */ p(Bn.Root, {
2208
2208
  value: g.value,
2209
2209
  disabled: g.isDisabled,
2210
- className: se(gl, u && "_1b7s5f8"),
2210
+ className: se(fl, u && "_1b7s5f8"),
2211
2211
  "aria-label": u ? g.label : void 0,
2212
2212
  children: [g.icon, !u && /* @__PURE__ */ n("span", {
2213
2213
  className: "_1b7s5f9",
@@ -2215,24 +2215,24 @@ var vl = 6, Cl = ({ options: e, value: t, onChange: r, onCommit: a, columns: o,
2215
2215
  })]
2216
2216
  }, g.value))
2217
2217
  });
2218
- }, fl = (e) => {
2219
- switch (Math.min(Math.max(Math.round(e), 1), vl)) {
2218
+ }, yl = (e) => {
2219
+ switch (Math.min(Math.max(Math.round(e), 1), Cl)) {
2220
2220
  case 1:
2221
- return ie[1];
2221
+ return oe[1];
2222
2222
  case 2:
2223
- return ie[2];
2223
+ return oe[2];
2224
2224
  case 3:
2225
- return ie[3];
2225
+ return oe[3];
2226
2226
  case 4:
2227
- return ie[4];
2227
+ return oe[4];
2228
2228
  case 5:
2229
- return ie[5];
2229
+ return oe[5];
2230
2230
  default:
2231
- return ie[6];
2231
+ return oe[6];
2232
2232
  }
2233
- }, bl = "_1g5x15w0 uz3g760", yl = "_1g5x15w1", Sl = "_1g5x15w2", vn = "_1g5x15w3", wl = "_1g5x15w4", xl = "_1g5x15w5", Tl = "_1g5x15w6", Ll = "_1g5x15w7";
2234
- var Pl = ({ options: e, value: t, onChange: r, placeholder: a, isDisabled: o, hasError: i, ariaLabel: l, ariaLabelledBy: c, id: s }) => {
2235
- const h = Q({
2233
+ }, Sl = "_1g5x15w0 uz3g760", wl = "_1g5x15w1", xl = "_1g5x15w2", pn = "_1g5x15w3", Tl = "_1g5x15w4", Ll = "_1g5x15w5", Pl = "_1g5x15w6", Il = "_1g5x15w7";
2234
+ var Al = ({ options: e, value: t, onChange: r, placeholder: a, isDisabled: o, hasError: i, ariaLabel: l, ariaLabelledBy: c, id: s }) => {
2235
+ const h = J({
2236
2236
  id: s,
2237
2237
  ariaLabel: l,
2238
2238
  ariaLabelledBy: c
@@ -2246,40 +2246,40 @@ var Pl = ({ options: e, value: t, onChange: r, placeholder: a, isDisabled: o, ha
2246
2246
  label: d.label
2247
2247
  })),
2248
2248
  children: [/* @__PURE__ */ p(Z.Trigger, {
2249
- className: bl,
2249
+ className: Sl,
2250
2250
  "data-error": i === !0,
2251
2251
  ...h,
2252
2252
  children: [/* @__PURE__ */ n(Z.Value, {
2253
- className: yl,
2254
- children: (d) => Il(e, d, a)
2253
+ className: wl,
2254
+ children: (d) => Ol(e, d, a)
2255
2255
  }), /* @__PURE__ */ n(Z.Icon, {
2256
- className: vn,
2256
+ className: pn,
2257
2257
  children: /* @__PURE__ */ n(xe, { size: "sm" })
2258
2258
  })]
2259
2259
  }), /* @__PURE__ */ n(Z.Portal, {
2260
- container: ze(),
2260
+ container: Ve(),
2261
2261
  children: /* @__PURE__ */ n(ge, { children: /* @__PURE__ */ n(Z.Positioner, {
2262
- className: wl,
2262
+ className: Tl,
2263
2263
  sideOffset: 4,
2264
2264
  alignItemWithTrigger: !1,
2265
2265
  children: /* @__PURE__ */ n(Z.Popup, {
2266
- className: xl,
2266
+ className: Ll,
2267
2267
  children: e.map((d) => /* @__PURE__ */ p(Z.Item, {
2268
2268
  value: d.value,
2269
2269
  disabled: d.isDisabled,
2270
- className: Tl,
2270
+ className: Pl,
2271
2271
  children: [
2272
2272
  d.icon,
2273
2273
  /* @__PURE__ */ p("span", {
2274
- className: Ll,
2274
+ className: Il,
2275
2275
  children: [/* @__PURE__ */ n(Z.ItemText, { children: d.label }), d.description !== void 0 && /* @__PURE__ */ n("span", {
2276
2276
  className: "_1g5x15w8",
2277
2277
  children: d.description
2278
2278
  })]
2279
2279
  }),
2280
2280
  /* @__PURE__ */ n(Z.ItemIndicator, {
2281
- className: vn,
2282
- children: /* @__PURE__ */ n(qt, { size: "sm" })
2281
+ className: pn,
2282
+ children: /* @__PURE__ */ n(Xt, { size: "sm" })
2283
2283
  })
2284
2284
  ]
2285
2285
  }, d.value))
@@ -2287,22 +2287,22 @@ var Pl = ({ options: e, value: t, onChange: r, placeholder: a, isDisabled: o, ha
2287
2287
  }) })
2288
2288
  })]
2289
2289
  });
2290
- }, Il = (e, t, r) => t === null ? /* @__PURE__ */ n("span", {
2291
- className: Sl,
2290
+ }, Ol = (e, t, r) => t === null ? /* @__PURE__ */ n("span", {
2291
+ className: xl,
2292
2292
  children: r
2293
- }) : Al(e, t), Al = (e, t) => e.find((r) => r.value === t)?.label ?? t, Ol = "vod76w0", Ml = "vod76w1", Nl = "vod76w2", El = "vod76w3", kl = "vod76w4", _l = "vod76w5";
2294
- var Rl = ({ value: e, onChange: t, onCommit: r, min: a, max: o, step: i, suffix: l, formatValue: c, isDisabled: s, ariaLabel: h, ariaLabelledBy: d }) => {
2295
- const u = Q({
2293
+ }) : Ml(e, t), Ml = (e, t) => e.find((r) => r.value === t)?.label ?? t, Nl = "vod76w0", kl = "vod76w1", _l = "vod76w2", El = "vod76w3", Rl = "vod76w4", Dl = "vod76w5";
2294
+ var Hl = ({ value: e, onChange: t, onCommit: r, min: a, max: o, step: i, suffix: l, formatValue: c, isDisabled: s, ariaLabel: h, ariaLabelledBy: d }) => {
2295
+ const u = J({
2296
2296
  ariaLabel: h,
2297
2297
  ariaLabelledBy: d
2298
- }, !1), v = Dl(e, l, c), { commitUnlessHeldKey: m, gestureHandlers: g } = Le(r);
2298
+ }, !1), v = Vl(e, l, c), { commitUnlessHeldKey: m, gestureHandlers: g } = Le(r);
2299
2299
  return /* @__PURE__ */ p("div", {
2300
- className: Ol,
2300
+ className: Nl,
2301
2301
  children: [/* @__PURE__ */ n(de.Root, {
2302
- className: Ml,
2302
+ className: kl,
2303
2303
  value: e,
2304
- onValueChange: (C) => t(C),
2305
- onValueCommitted: (C, P) => {
2304
+ onValueChange: (f) => t(f),
2305
+ onValueCommitted: (f, P) => {
2306
2306
  m(P.reason === Ct);
2307
2307
  },
2308
2308
  min: a,
@@ -2310,11 +2310,11 @@ var Rl = ({ value: e, onChange: t, onCommit: r, min: a, max: o, step: i, suffix:
2310
2310
  step: i,
2311
2311
  disabled: s,
2312
2312
  children: /* @__PURE__ */ n(de.Control, {
2313
- className: Nl,
2313
+ className: _l,
2314
2314
  children: /* @__PURE__ */ p(de.Track, {
2315
2315
  className: El,
2316
- children: [/* @__PURE__ */ n(de.Indicator, { className: kl }), /* @__PURE__ */ n(de.Thumb, {
2317
- className: _l,
2316
+ children: [/* @__PURE__ */ n(de.Indicator, { className: Rl }), /* @__PURE__ */ n(de.Thumb, {
2317
+ className: Dl,
2318
2318
  ...g,
2319
2319
  ...u
2320
2320
  })]
@@ -2325,31 +2325,31 @@ var Rl = ({ value: e, onChange: t, onCommit: r, min: a, max: o, step: i, suffix:
2325
2325
  children: v
2326
2326
  })]
2327
2327
  });
2328
- }, Dl = (e, t, r) => r !== void 0 ? r(e) : t !== void 0 ? `${e}${t}` : null, Hl = "_1hyrlw60", Vl = "_1hyrlw61", zl = ({ isChecked: e, onChange: t, isDisabled: r, ariaLabel: a, ariaLabelledBy: o, id: i }) => {
2329
- const l = Q({
2328
+ }, Vl = (e, t, r) => r !== void 0 ? r(e) : t !== void 0 ? `${e}${t}` : null, zl = "_1hyrlw60", Fl = "_1hyrlw61", Gl = ({ isChecked: e, onChange: t, isDisabled: r, ariaLabel: a, ariaLabelledBy: o, id: i }) => {
2329
+ const l = J({
2330
2330
  id: i,
2331
2331
  ariaLabel: a,
2332
2332
  ariaLabelledBy: o
2333
2333
  });
2334
- return /* @__PURE__ */ n(on.Root, {
2334
+ return /* @__PURE__ */ n(rn.Root, {
2335
2335
  checked: e,
2336
2336
  onCheckedChange: (c) => t(c),
2337
2337
  disabled: r,
2338
- className: Hl,
2338
+ className: zl,
2339
2339
  ...l,
2340
- children: /* @__PURE__ */ n(on.Thumb, { className: Vl })
2340
+ children: /* @__PURE__ */ n(rn.Thumb, { className: Fl })
2341
2341
  });
2342
- }, Fl = "uz3g761", Bl = "tpcnun0 uz3g760", Gl = ({ value: e, onChange: t, onCommit: r, placeholder: a, isDisabled: o, hasError: i, ariaLabel: l, ariaLabelledBy: c, id: s }) => {
2343
- const h = Q({
2342
+ }, Bl = "uz3g761", Kl = "tpcnun0 uz3g760", Ul = ({ value: e, onChange: t, onCommit: r, placeholder: a, isDisabled: o, hasError: i, ariaLabel: l, ariaLabelledBy: c, id: s }) => {
2343
+ const h = J({
2344
2344
  id: s,
2345
2345
  ariaLabel: l,
2346
2346
  ariaLabelledBy: c
2347
2347
  });
2348
- return /* @__PURE__ */ n(vt, {
2349
- className: Bl,
2348
+ return /* @__PURE__ */ n(ft, {
2349
+ className: Kl,
2350
2350
  "data-error": i === !0,
2351
- children: /* @__PURE__ */ n(Wa, {
2352
- className: Fl,
2351
+ children: /* @__PURE__ */ n(qa, {
2352
+ className: Bl,
2353
2353
  value: e,
2354
2354
  onValueChange: (d) => t(d),
2355
2355
  onBlur: r,
@@ -2359,15 +2359,15 @@ var Rl = ({ value: e, onChange: t, onCommit: r, min: a, max: o, step: i, suffix:
2359
2359
  ...h
2360
2360
  })
2361
2361
  });
2362
- }, Kl = "cnu9yl0", Ul = "cnu9yl1";
2363
- var Wl = ({ options: e, value: t, onChange: r, onCommit: a, itemLayout: o = "inline", isDisabled: i, ariaLabel: l, ariaLabelledBy: c, id: s }) => {
2364
- const h = Q({
2362
+ }, Wl = "cnu9yl0", Zl = "cnu9yl1";
2363
+ var ql = ({ options: e, value: t, onChange: r, onCommit: a, itemLayout: o = "inline", isDisabled: i, ariaLabel: l, ariaLabelledBy: c, id: s }) => {
2364
+ const h = J({
2365
2365
  id: s,
2366
2366
  ariaLabel: l,
2367
2367
  ariaLabelledBy: c
2368
2368
  }), d = o === "stacked", { commitAfterChange: u, gestureHandlers: v } = Le(a);
2369
2369
  return /* @__PURE__ */ n(Kn, {
2370
- className: Kl,
2370
+ className: Wl,
2371
2371
  value: t,
2372
2372
  onValueChange: (m) => {
2373
2373
  r(m), u();
@@ -2375,71 +2375,71 @@ var Wl = ({ options: e, value: t, onChange: r, onCommit: a, itemLayout: o = "inl
2375
2375
  ...v,
2376
2376
  disabled: i,
2377
2377
  ...h,
2378
- children: e.map((m) => /* @__PURE__ */ p(Gn.Root, {
2378
+ children: e.map((m) => /* @__PURE__ */ p(Bn.Root, {
2379
2379
  value: m.value,
2380
2380
  disabled: m.isDisabled,
2381
- className: se(Ul, d && "cnu9yl2"),
2382
- "aria-label": Zl(m, d),
2383
- children: [m.icon, ft(m, d) && /* @__PURE__ */ n("span", {
2381
+ className: se(Zl, d && "cnu9yl2"),
2382
+ "aria-label": $l(m, d),
2383
+ children: [m.icon, bt(m, d) && /* @__PURE__ */ n("span", {
2384
2384
  className: "cnu9yl3",
2385
2385
  children: m.label
2386
2386
  })]
2387
2387
  }, m.value))
2388
2388
  });
2389
- }, ft = (e, t) => e.icon === void 0 || t, Zl = (e, t) => {
2390
- if (!ft(e, t))
2389
+ }, bt = (e, t) => e.icon === void 0 || t, $l = (e, t) => {
2390
+ if (!bt(e, t))
2391
2391
  return e.label;
2392
- }, bt = {
2393
- ToggleGroup: Wl,
2394
- Switch: zl,
2395
- Slider: Rl,
2396
- RadioGrid: Cl,
2397
- Button: cl,
2398
- TextField: Gl,
2399
- NumberField: ml,
2400
- Select: Pl
2401
- }, yt = ve(bt), ql = ({ controls: e, children: t }) => {
2402
- const r = k(() => ({
2403
- ...bt,
2392
+ }, yt = {
2393
+ ToggleGroup: ql,
2394
+ Switch: Gl,
2395
+ Slider: Hl,
2396
+ RadioGrid: bl,
2397
+ Button: hl,
2398
+ TextField: Ul,
2399
+ NumberField: gl,
2400
+ Select: Al
2401
+ }, St = ve(yt), Xl = ({ controls: e, children: t }) => {
2402
+ const r = _(() => ({
2403
+ ...yt,
2404
2404
  ...e
2405
2405
  }), [e]);
2406
- return /* @__PURE__ */ n(yt.Provider, {
2406
+ return /* @__PURE__ */ n(St.Provider, {
2407
2407
  value: r,
2408
2408
  children: t
2409
2409
  });
2410
- }, M = () => ce(yt), $l = "_12lhx9e0", St = ({ children: e }) => /* @__PURE__ */ n("div", {
2411
- className: $l,
2410
+ }, M = () => ce(St), Yl = "_12lhx9e0", wt = ({ children: e }) => /* @__PURE__ */ n("div", {
2411
+ className: Yl,
2412
2412
  children: e
2413
- }), Xl = "_139ohwv0", F = ({ children: e }) => /* @__PURE__ */ n("div", {
2414
- className: Xl,
2413
+ }), jl = "_139ohwv0", F = ({ children: e }) => /* @__PURE__ */ n("div", {
2414
+ className: jl,
2415
2415
  children: e
2416
- }), wt = ve(null), jl = wt.Provider, Yl = () => {
2417
- const e = ce(wt);
2416
+ }), xt = ve(null), Jl = xt.Provider, Ql = () => {
2417
+ const e = ce(xt);
2418
2418
  if (!e) throw new Error("A section must be rendered inside <EditorPanel.Root>.");
2419
2419
  return e;
2420
- }, Jl = "_1jlczkt0", Ql = "data-graphy-editor-panel", es = {
2420
+ }, es = "_1jlczkt0", ns = "data-graphy-editor-panel", ts = {
2421
2421
  List: F,
2422
- Grid: St
2422
+ Grid: wt
2423
2423
  };
2424
- function ns(e) {
2424
+ function rs(e) {
2425
2425
  if (e === void 0) return !1;
2426
2426
  const t = e.split(/\s+/);
2427
2427
  return t.includes("_1ii3bsb0") || t.includes("_1ii3bsb1");
2428
2428
  }
2429
- var ts = ({ handle: e, children: t, controls: r, defaultExpandedSection: a = void 0, className: o }) => {
2430
- const i = ir(e), { themeClass: l, inlineVarsStyle: c } = Ve(), [s, h] = q(() => a ? [a] : []), d = k(() => ({
2429
+ var as = ({ handle: e, children: t, controls: r, defaultExpandedSection: a = void 0, className: o }) => {
2430
+ const i = lr(e), { themeClass: l, inlineVarsStyle: c } = He(), [s, h] = q(() => a ? [a] : []), d = _(() => ({
2431
2431
  expandSection: (u) => h([u]),
2432
2432
  collapseAllSections: () => h([])
2433
2433
  }), []);
2434
- return /* @__PURE__ */ n(Ze.Provider, {
2434
+ return /* @__PURE__ */ n(We.Provider, {
2435
2435
  value: i,
2436
- children: /* @__PURE__ */ n(ql, {
2436
+ children: /* @__PURE__ */ n(Xl, {
2437
2437
  controls: r,
2438
- children: /* @__PURE__ */ n(jl, {
2438
+ children: /* @__PURE__ */ n(Jl, {
2439
2439
  value: d,
2440
2440
  children: /* @__PURE__ */ n(ue.Root, {
2441
- [Ql]: "",
2442
- className: se(Jl, o, { [l]: !ns(o) }),
2441
+ [ns]: "",
2442
+ className: se(es, o, { [l]: !rs(o) }),
2443
2443
  style: c,
2444
2444
  value: s,
2445
2445
  onValueChange: (u) => h(u),
@@ -2448,43 +2448,43 @@ var ts = ({ handle: e, children: t, controls: r, defaultExpandedSection: a = voi
2448
2448
  })
2449
2449
  })
2450
2450
  });
2451
- }, xt = {
2452
- Root: ts,
2453
- Controls: es
2454
- }, Cn = {
2451
+ }, Tt = {
2452
+ Root: as,
2453
+ Controls: ts
2454
+ }, gn = {
2455
2455
  stack: "pr583x0",
2456
2456
  grid: "pr583x1"
2457
- }, fn = "pr583x2", rs = {
2457
+ }, vn = "pr583x2", os = {
2458
2458
  plain: "pr583x4 pr583x3",
2459
2459
  withIcon: "pr583x5 pr583x3"
2460
- }, f = ({ label: e, layout: t = "grid", icon: r, children: a }) => {
2460
+ }, C = ({ label: e, layout: t = "grid", icon: r, children: a }) => {
2461
2461
  const o = le(), i = le();
2462
2462
  return e === void 0 ? /* @__PURE__ */ n("div", {
2463
- className: Cn[t],
2463
+ className: gn[t],
2464
2464
  children: /* @__PURE__ */ n("div", {
2465
- className: fn,
2465
+ className: vn,
2466
2466
  children: a
2467
2467
  })
2468
2468
  }) : /* @__PURE__ */ p("div", {
2469
- className: Cn[t],
2469
+ className: gn[t],
2470
2470
  children: [/* @__PURE__ */ p("label", {
2471
2471
  id: o,
2472
2472
  htmlFor: i,
2473
- className: rs[r === void 0 ? "plain" : "withIcon"],
2473
+ className: os[r === void 0 ? "plain" : "withIcon"],
2474
2474
  children: [r !== void 0 && /* @__PURE__ */ n("span", {
2475
2475
  "aria-hidden": "true",
2476
2476
  children: r
2477
2477
  }), e]
2478
2478
  }), /* @__PURE__ */ n("div", {
2479
- className: fn,
2480
- children: /* @__PURE__ */ n(gt, {
2479
+ className: vn,
2480
+ children: /* @__PURE__ */ n(vt, {
2481
2481
  labelId: o,
2482
2482
  controlId: i,
2483
2483
  children: a
2484
2484
  })
2485
2485
  })]
2486
2486
  });
2487
- }, as = (e) => /* @__PURE__ */ n(L, {
2487
+ }, is = (e) => /* @__PURE__ */ n(L, {
2488
2488
  ...e,
2489
2489
  children: /* @__PURE__ */ n("g", {
2490
2490
  stroke: "currentColor",
@@ -2493,25 +2493,25 @@ var ts = ({ handle: e, children: t, controls: r, defaultExpandedSection: a = voi
2493
2493
  strokeLinejoin: "round",
2494
2494
  children: /* @__PURE__ */ n("path", { d: "m9 6 6 6-6 6" })
2495
2495
  })
2496
- }), qe = "_40zvwv0", $e = "_40zvwv1", os = "_40zvwv2", Tt = "_40zvwv3", is = "_40zvwv4 _40zvwv3";
2497
- var ls = "_40zvwv6";
2498
- var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory: a, onOpenChange: o, children: i }) => t === "collapsible" ? /* @__PURE__ */ n(ds, {
2496
+ }), Ze = "_40zvwv0", qe = "_40zvwv1", ls = "_40zvwv2", Lt = "_40zvwv3", ss = "_40zvwv4 _40zvwv3";
2497
+ var cs = "_40zvwv6";
2498
+ var ds = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory: a, onOpenChange: o, children: i }) => t === "collapsible" ? /* @__PURE__ */ n(us, {
2499
2499
  title: e,
2500
2500
  preview: r,
2501
2501
  accessory: a,
2502
2502
  onOpenChange: o,
2503
2503
  children: i
2504
- }) : t === "inline" && r === void 0 ? /* @__PURE__ */ n(cs, {
2504
+ }) : t === "inline" && r === void 0 ? /* @__PURE__ */ n(hs, {
2505
2505
  title: e,
2506
2506
  accessory: a,
2507
2507
  children: i
2508
2508
  }) : /* @__PURE__ */ p("div", {
2509
- className: qe,
2509
+ className: Ze,
2510
2510
  children: [/* @__PURE__ */ p("div", {
2511
- className: $e,
2511
+ className: qe,
2512
2512
  children: [
2513
2513
  /* @__PURE__ */ n("span", {
2514
- className: Tt,
2514
+ className: Lt,
2515
2515
  children: e
2516
2516
  }),
2517
2517
  r !== void 0 && /* @__PURE__ */ n("span", {
@@ -2524,22 +2524,22 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
2524
2524
  })
2525
2525
  ]
2526
2526
  }), /* @__PURE__ */ n("div", { children: i })]
2527
- }), cs = ({ title: e, accessory: t, children: r }) => {
2527
+ }), hs = ({ title: e, accessory: t, children: r }) => {
2528
2528
  const a = le(), o = le();
2529
2529
  return /* @__PURE__ */ n("div", {
2530
- className: qe,
2530
+ className: Ze,
2531
2531
  children: /* @__PURE__ */ p("div", {
2532
- className: $e,
2532
+ className: qe,
2533
2533
  children: [
2534
2534
  /* @__PURE__ */ n("label", {
2535
2535
  id: a,
2536
2536
  htmlFor: o,
2537
- className: is,
2537
+ className: ss,
2538
2538
  children: e
2539
2539
  }),
2540
2540
  /* @__PURE__ */ n("span", {
2541
- className: ls,
2542
- children: /* @__PURE__ */ n(gt, {
2541
+ className: cs,
2542
+ children: /* @__PURE__ */ n(vt, {
2543
2543
  labelId: a,
2544
2544
  controlId: o,
2545
2545
  children: r
@@ -2552,22 +2552,22 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
2552
2552
  ]
2553
2553
  })
2554
2554
  });
2555
- }, ds = ({ title: e, preview: t, accessory: r, onOpenChange: a, children: o }) => {
2555
+ }, us = ({ title: e, preview: t, accessory: r, onOpenChange: a, children: o }) => {
2556
2556
  const i = I();
2557
2557
  return /* @__PURE__ */ p(ue.Item, {
2558
2558
  value: e,
2559
- className: qe,
2559
+ className: Ze,
2560
2560
  onOpenChange: a,
2561
2561
  children: [/* @__PURE__ */ p(ue.Header, {
2562
- className: $e,
2562
+ className: qe,
2563
2563
  render: /* @__PURE__ */ n("div", {}),
2564
2564
  children: [
2565
2565
  /* @__PURE__ */ n(ue.Trigger, {
2566
- className: os,
2566
+ className: ls,
2567
2567
  "aria-label": i("editor.accessibility.toggleSection", { title: e })
2568
2568
  }),
2569
2569
  /* @__PURE__ */ n("span", {
2570
- className: Tt,
2570
+ className: Lt,
2571
2571
  children: e
2572
2572
  }),
2573
2573
  t !== void 0 && /* @__PURE__ */ n("span", {
@@ -2579,14 +2579,14 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
2579
2579
  children: r
2580
2580
  }),
2581
2581
  /* @__PURE__ */ n("span", {
2582
- className: ss,
2583
- children: /* @__PURE__ */ n(as, { size: "sm" })
2582
+ className: ds,
2583
+ children: /* @__PURE__ */ n(is, { size: "sm" })
2584
2584
  })
2585
2585
  ]
2586
2586
  }), /* @__PURE__ */ n(ue.Panel, { children: /* @__PURE__ */ n("div", { children: o }) })]
2587
2587
  });
2588
- }, hs = ({ title: e, isChecked: t, onToggle: r, isDisabled: a, preview: o, children: i }) => {
2589
- const { expandSection: l, collapseAllSections: c } = Yl(), { Switch: s } = M();
2588
+ }, ms = ({ title: e, isChecked: t, onToggle: r, isDisabled: a, preview: o, children: i }) => {
2589
+ const { expandSection: l, collapseAllSections: c } = Ql(), { Switch: s } = M();
2590
2590
  return /* @__PURE__ */ n(D, {
2591
2591
  title: e,
2592
2592
  layout: "collapsible",
@@ -2604,203 +2604,203 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
2604
2604
  }),
2605
2605
  children: i
2606
2606
  });
2607
- }, us = {
2607
+ }, ps = {
2608
2608
  horizontal: ["bottom", "top"],
2609
2609
  vertical: ["left", "right"]
2610
- }, ms = {
2610
+ }, gs = {
2611
2611
  left: "editor.axesPanel.position.left",
2612
2612
  right: "editor.axesPanel.position.right",
2613
2613
  top: "editor.axesPanel.position.top",
2614
2614
  bottom: "editor.axesPanel.position.bottom"
2615
- }, ps = {
2615
+ }, vs = {
2616
2616
  x: "editor.axesPanel.mainAxisSection.xAxis",
2617
2617
  y: "editor.axesPanel.mainAxisSection.yAxis"
2618
- }, bn = ({ axis: e, title: t, layout: r = "collapsible", preview: a }) => {
2618
+ }, fn = ({ axis: e, title: t, layout: r = "collapsible", preview: a }) => {
2619
2619
  const o = O(), i = R(o), l = I(), { NumberField: c, Switch: s, TextField: h, ToggleGroup: d } = M();
2620
2620
  if (!i) return null;
2621
- const u = i.coordSystem.type === "polar" ? i.coordSystem.axisMapping[e].geometry : "linear", v = i.config.axes[e], m = i.scales[e], g = m?.spec, C = g?.scaleType === "continuous" ? g : void 0;
2622
- if (u === "circular" || u === "radial" && C === void 0) return null;
2623
- const P = g !== void 0 && "reverse" in g ? g : void 0, w = g?.scaleType === "continuous" || g?.scaleType === "datetime", b = e === "y" && C !== void 0 && i.layers.some((y) => y.yScaleType === "primary" && y.geom === "bar"), T = C?.transform === "log", x = C?.domainMax ?? null, N = gs(C), V = (y, $) => y.map((Ce) => ({
2624
- value: Ce,
2625
- label: $(Ce)
2626
- })), E = i.guides.axes.find((y) => y.scaleAestheticKey === e)?.position, B = us[E === "bottom" || E === "top" || E === void 0 && e === "x" ? "horizontal" : "vertical"], A = i.guides.legends.drawn.some((y) => B.some(($) => $ === y.position)), S = B.map((y) => ({
2621
+ const u = i.coordSystem.type === "polar" ? i.coordSystem.axisMapping[e].geometry : "linear", v = i.config.axes[e], m = i.scales[e], g = m?.spec, f = g?.scaleType === "continuous" ? g : void 0;
2622
+ if (u === "circular" || u === "radial" && f === void 0) return null;
2623
+ const P = g !== void 0 && "reverse" in g ? g : void 0, w = g?.scaleType === "continuous" || g?.scaleType === "datetime", b = e === "y" && f !== void 0 && i.layers.some((y) => y.yScaleType === "primary" && y.geom === "bar"), T = f?.transform === "log", x = f?.domainMax ?? null, N = fs(f), V = (y, $) => y.map((fe) => ({
2624
+ value: fe,
2625
+ label: $(fe)
2626
+ })), k = i.guides.axes.find((y) => y.scaleAestheticKey === e)?.position, G = ps[k === "bottom" || k === "top" || k === void 0 && e === "x" ? "horizontal" : "vertical"], A = i.guides.legends.drawn.some((y) => G.some(($) => $ === y.position)), S = G.map((y) => ({
2627
2627
  value: y,
2628
- label: l(ms[y])
2629
- })), _ = V(["auto", "edges"], (y) => l(y === "edges" ? "editor.axesPanel.labelMode.edges" : "editor.axesPanel.labelMode.auto")), ee = V(["linear", "log"], (y) => l(y === "log" ? "editor.axesPanel.scale.log" : "editor.axesPanel.scale.auto")), At = V([
2628
+ label: l(gs[y])
2629
+ })), E = V(["auto", "edges"], (y) => l(y === "edges" ? "editor.axesPanel.labelMode.edges" : "editor.axesPanel.labelMode.auto")), Q = V(["linear", "log"], (y) => l(y === "log" ? "editor.axesPanel.scale.log" : "editor.axesPanel.scale.auto")), Ot = V([
2630
2630
  "auto",
2631
2631
  "zero",
2632
2632
  "custom"
2633
- ], (y) => l(y === "zero" ? "editor.axesPanel.startFrom.zero" : y === "custom" ? "editor.axesPanel.startFrom.custom" : "editor.axesPanel.startFrom.auto")), Ot = V(["auto", "custom"], (y) => l(y === "custom" ? "editor.axesPanel.endAt.custom" : "editor.axesPanel.endAt.auto")), Mt = V(["no", "yes"], (y) => l(y === "yes" ? "editor.axesPanel.yesNo.yes" : "editor.axesPanel.yesNo.no")), Nt = (y) => {
2634
- o.commands.dispatch(new Ar({
2633
+ ], (y) => l(y === "zero" ? "editor.axesPanel.startFrom.zero" : y === "custom" ? "editor.axesPanel.startFrom.custom" : "editor.axesPanel.startFrom.auto")), Mt = V(["auto", "custom"], (y) => l(y === "custom" ? "editor.axesPanel.endAt.custom" : "editor.axesPanel.endAt.auto")), Nt = V(["no", "yes"], (y) => l(y === "yes" ? "editor.axesPanel.yesNo.yes" : "editor.axesPanel.yesNo.no")), kt = (y) => {
2634
+ o.commands.dispatch(new Or({
2635
2635
  axis: e,
2636
2636
  isVisible: y
2637
2637
  }));
2638
- }, Et = (y) => {
2639
- o.commands.dispatch(new Tr({
2638
+ }, _t = (y) => {
2639
+ o.commands.dispatch(new Lr({
2640
2640
  axis: e,
2641
2641
  label: y === "" ? null : y
2642
2642
  }), { transient: !0 });
2643
- }, kt = (y) => {
2644
- o.commands.dispatch(new Ir({
2643
+ }, Et = (y) => {
2644
+ o.commands.dispatch(new Ar({
2645
2645
  axis: e,
2646
2646
  isVisible: y
2647
2647
  }));
2648
- }, _t = (y) => {
2649
- o.commands.dispatch(new Pr({
2648
+ }, Rt = (y) => {
2649
+ o.commands.dispatch(new Ir({
2650
2650
  axis: e,
2651
2651
  tickMode: y === "edges" ? "edges" : "auto"
2652
2652
  }));
2653
- }, Rt = (y) => {
2654
- o.commands.dispatch(new na({
2653
+ }, Dt = (y) => {
2654
+ o.commands.dispatch(new ta({
2655
2655
  scaledAesthetic: e,
2656
2656
  reverse: y === "yes"
2657
2657
  }));
2658
- }, Dt = (y) => {
2659
- o.commands.dispatch(new ta({
2658
+ }, Ht = (y) => {
2659
+ o.commands.dispatch(new ra({
2660
2660
  scaledAesthetic: e,
2661
2661
  transform: y === "log" ? "log" : "linear"
2662
2662
  }));
2663
2663
  }, Ye = (y) => {
2664
- o.commands.dispatch(new fe({
2664
+ o.commands.dispatch(new Ce({
2665
2665
  scaledAesthetic: e,
2666
2666
  ...y
2667
2667
  }), { transient: !0 });
2668
- }, Ht = (y) => {
2669
- y !== null && Ye({ domainMin: y });
2670
2668
  }, Vt = (y) => {
2671
- y !== null && Ye({ domainMax: y });
2669
+ y !== null && Ye({ domainMin: y });
2672
2670
  }, zt = (y) => {
2673
- if (C) {
2671
+ y !== null && Ye({ domainMax: y });
2672
+ }, Ft = (y) => {
2673
+ if (f) {
2674
2674
  if (y === "custom") {
2675
- C.zero && o.commands.dispatch(new rn({
2675
+ f.zero && o.commands.dispatch(new nn({
2676
2676
  scaledAesthetic: e,
2677
2677
  zero: !1
2678
- })), o.commands.dispatch(new fe({
2678
+ })), o.commands.dispatch(new Ce({
2679
2679
  scaledAesthetic: e,
2680
- domainMin: yn(m?.domain, "start")
2680
+ domainMin: Cn(m?.domain, "start")
2681
2681
  }));
2682
2682
  return;
2683
2683
  }
2684
- C.domainMin !== null && o.commands.dispatch(new fe({
2684
+ f.domainMin !== null && o.commands.dispatch(new Ce({
2685
2685
  scaledAesthetic: e,
2686
2686
  domainMin: null
2687
- })), o.commands.dispatch(new rn({
2687
+ })), o.commands.dispatch(new nn({
2688
2688
  scaledAesthetic: e,
2689
2689
  zero: y === "zero"
2690
2690
  }));
2691
2691
  }
2692
- }, Ft = (y) => {
2693
- const $ = y === "custom" ? yn(m?.domain, "end") : null;
2694
- o.commands.dispatch(new fe({
2692
+ }, Gt = (y) => {
2693
+ const $ = y === "custom" ? Cn(m?.domain, "end") : null;
2694
+ o.commands.dispatch(new Ce({
2695
2695
  scaledAesthetic: e,
2696
2696
  domainMax: $
2697
2697
  }));
2698
2698
  }, Bt = (y) => {
2699
- const $ = B.find((Ce) => Ce === y);
2700
- $ && o.commands.dispatch(new Lr({
2699
+ const $ = G.find((fe) => fe === y);
2700
+ $ && o.commands.dispatch(new Pr({
2701
2701
  axis: e,
2702
2702
  position: $
2703
2703
  }));
2704
2704
  };
2705
2705
  return /* @__PURE__ */ n(D, {
2706
- title: t ?? l(ps[e]),
2706
+ title: t ?? l(vs[e]),
2707
2707
  layout: r,
2708
2708
  preview: a,
2709
2709
  children: /* @__PURE__ */ p(F, { children: [
2710
- /* @__PURE__ */ n(f, {
2710
+ /* @__PURE__ */ n(C, {
2711
2711
  label: l("editor.axesPanel.controls.visible"),
2712
2712
  children: /* @__PURE__ */ n(s, {
2713
2713
  isChecked: v.isVisible,
2714
- onChange: Nt
2714
+ onChange: kt
2715
2715
  })
2716
2716
  }),
2717
- u === "linear" && /* @__PURE__ */ p(G, { children: [/* @__PURE__ */ n(f, {
2717
+ u === "linear" && /* @__PURE__ */ p(B, { children: [/* @__PURE__ */ n(C, {
2718
2718
  label: l("editor.axesPanel.controls.title"),
2719
2719
  children: /* @__PURE__ */ n(h, {
2720
2720
  value: v.label ?? "",
2721
- onChange: Et,
2721
+ onChange: _t,
2722
2722
  onCommit: o.commands.seal
2723
2723
  })
2724
- }), /* @__PURE__ */ n(f, {
2724
+ }), /* @__PURE__ */ n(C, {
2725
2725
  label: l("editor.axesPanel.controls.ticks"),
2726
2726
  children: /* @__PURE__ */ n(s, {
2727
2727
  isChecked: v.ticks.isVisible,
2728
- onChange: kt
2728
+ onChange: Et
2729
2729
  })
2730
2730
  })] }),
2731
- w && /* @__PURE__ */ n(f, {
2731
+ w && /* @__PURE__ */ n(C, {
2732
2732
  label: l("editor.axesPanel.controls.labels"),
2733
2733
  children: /* @__PURE__ */ n(d, {
2734
2734
  value: v.ticks.mode,
2735
- options: _,
2736
- onChange: _t
2735
+ options: E,
2736
+ onChange: Rt
2737
2737
  })
2738
2738
  }),
2739
- C && u === "linear" && !A && /* @__PURE__ */ n(f, {
2739
+ f && u === "linear" && !A && /* @__PURE__ */ n(C, {
2740
2740
  label: l("editor.axesPanel.controls.position"),
2741
2741
  children: /* @__PURE__ */ n(d, {
2742
- value: E ?? v.position,
2742
+ value: k ?? v.position,
2743
2743
  options: S,
2744
2744
  onChange: Bt
2745
2745
  })
2746
2746
  }),
2747
- P !== void 0 && /* @__PURE__ */ n(f, {
2747
+ P !== void 0 && /* @__PURE__ */ n(C, {
2748
2748
  label: l("editor.axesPanel.controls.reverse"),
2749
2749
  children: /* @__PURE__ */ n(d, {
2750
2750
  value: P.reverse === !0 ? "yes" : "no",
2751
- options: Mt,
2752
- onChange: Rt
2751
+ options: Nt,
2752
+ onChange: Dt
2753
2753
  })
2754
2754
  }),
2755
- C && !b && /* @__PURE__ */ n(f, {
2755
+ f && !b && /* @__PURE__ */ n(C, {
2756
2756
  label: l("editor.axesPanel.controls.scale"),
2757
2757
  children: /* @__PURE__ */ n(d, {
2758
2758
  value: T ? "log" : "linear",
2759
- options: ee,
2760
- onChange: Dt
2759
+ options: Q,
2760
+ onChange: Ht
2761
2761
  })
2762
2762
  }),
2763
- C && !T && /* @__PURE__ */ p(G, { children: [
2764
- !b && /* @__PURE__ */ p(G, { children: [/* @__PURE__ */ n(f, {
2763
+ f && !T && /* @__PURE__ */ p(B, { children: [
2764
+ !b && /* @__PURE__ */ p(B, { children: [/* @__PURE__ */ n(C, {
2765
2765
  label: l("editor.axesPanel.controls.startFrom"),
2766
2766
  children: /* @__PURE__ */ n(d, {
2767
2767
  value: N,
2768
- options: At,
2769
- onChange: zt
2768
+ options: Ot,
2769
+ onChange: Ft
2770
2770
  })
2771
- }), N === "custom" && /* @__PURE__ */ n(f, {
2771
+ }), N === "custom" && /* @__PURE__ */ n(C, {
2772
2772
  label: l("editor.axesPanel.controls.value"),
2773
2773
  children: /* @__PURE__ */ n(c, {
2774
- value: C.domainMin ?? null,
2775
- onChange: Ht,
2774
+ value: f.domainMin ?? null,
2775
+ onChange: Vt,
2776
2776
  onCommit: o.commands.seal
2777
2777
  })
2778
2778
  })] }),
2779
- /* @__PURE__ */ n(f, {
2779
+ /* @__PURE__ */ n(C, {
2780
2780
  label: l("editor.axesPanel.controls.endAt"),
2781
2781
  children: /* @__PURE__ */ n(d, {
2782
2782
  value: x === null ? "auto" : "custom",
2783
- options: Ot,
2784
- onChange: Ft
2783
+ options: Mt,
2784
+ onChange: Gt
2785
2785
  })
2786
2786
  }),
2787
- x !== null && /* @__PURE__ */ n(f, {
2787
+ x !== null && /* @__PURE__ */ n(C, {
2788
2788
  label: l("editor.axesPanel.controls.value"),
2789
2789
  children: /* @__PURE__ */ n(c, {
2790
2790
  value: x,
2791
- onChange: Vt,
2791
+ onChange: zt,
2792
2792
  onCommit: o.commands.seal
2793
2793
  })
2794
2794
  })
2795
2795
  ] })
2796
2796
  ] })
2797
2797
  });
2798
- }, gs = (e) => e === void 0 ? "auto" : e.domainMin !== null && e.domainMin !== void 0 ? "custom" : e.zero === !0 ? "zero" : "auto", yn = (e, t) => {
2798
+ }, fs = (e) => e === void 0 ? "auto" : e.domainMin !== null && e.domainMin !== void 0 ? "custom" : e.zero === !0 ? "zero" : "auto", Cn = (e, t) => {
2799
2799
  const r = t === "start" ? e?.[0] : e?.[e.length - 1];
2800
2800
  return typeof r == "number" ? r : 0;
2801
- }, Xe = ({ value: e, onChange: t }) => {
2801
+ }, $e = ({ value: e, onChange: t }) => {
2802
2802
  const r = O(), a = I(), { TextField: o } = M(), i = e !== null && typeof e != "string", l = (c) => t(c === "" ? null : c);
2803
- return /* @__PURE__ */ n(f, {
2803
+ return /* @__PURE__ */ n(C, {
2804
2804
  label: a("editor.elementsPanel.contentValue"),
2805
2805
  children: /* @__PURE__ */ n(o, {
2806
2806
  value: typeof e == "string" ? e : "",
@@ -2809,7 +2809,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
2809
2809
  isDisabled: i
2810
2810
  })
2811
2811
  });
2812
- }, vs = ({ title: e, layout: t = "collapsible", preview: r }) => {
2812
+ }, Cs = ({ title: e, layout: t = "collapsible", preview: r }) => {
2813
2813
  const a = O(), o = R(a), i = I(), { Switch: l } = M();
2814
2814
  if (!o) return null;
2815
2815
  const c = o.config.content, s = (d) => {
@@ -2818,24 +2818,24 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
2818
2818
  isVisible: d
2819
2819
  }));
2820
2820
  }, h = (d) => {
2821
- a.commands.dispatch(new Er({ caption: d }), { transient: !0 });
2821
+ a.commands.dispatch(new _r({ caption: d }), { transient: !0 });
2822
2822
  };
2823
2823
  return /* @__PURE__ */ n(D, {
2824
2824
  title: e ?? i("editor.elementsPanel.footerSection.caption"),
2825
2825
  layout: t,
2826
2826
  preview: r,
2827
- children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(f, {
2827
+ children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(C, {
2828
2828
  label: i("editor.elementsPanel.contentVisible"),
2829
2829
  children: /* @__PURE__ */ n(l, {
2830
2830
  isChecked: c.isCaptionVisible,
2831
2831
  onChange: s
2832
2832
  })
2833
- }), /* @__PURE__ */ n(Xe, {
2833
+ }), /* @__PURE__ */ n($e, {
2834
2834
  value: c.caption,
2835
2835
  onChange: h
2836
2836
  })] })
2837
2837
  });
2838
- }, Sn = /^[a-z][a-z\d+.-]*:/i, Cs = {}, fs = ({ title: e, layout: t = "collapsible", preview: r }) => {
2838
+ }, bn = /^[a-z][a-z\d+.-]*:/i, bs = {}, ys = ({ title: e, layout: t = "collapsible", preview: r }) => {
2839
2839
  const a = O(), o = R(a), i = I(), { Switch: l } = M();
2840
2840
  if (!o) return null;
2841
2841
  const c = o.config.content, s = (h) => {
@@ -2848,21 +2848,21 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
2848
2848
  title: e ?? i("editor.elementsPanel.sourceSection.title"),
2849
2849
  layout: t,
2850
2850
  preview: r,
2851
- children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(f, {
2851
+ children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(C, {
2852
2852
  label: i("editor.elementsPanel.contentVisible"),
2853
2853
  children: /* @__PURE__ */ n(l, {
2854
2854
  isChecked: c.isSourceVisible,
2855
2855
  onChange: s
2856
2856
  })
2857
- }), /* @__PURE__ */ n(bs, { source: c.source ?? Cs })] })
2857
+ }), /* @__PURE__ */ n(Ss, { source: c.source ?? bs })] })
2858
2858
  });
2859
- }, bs = ({ source: e }) => {
2859
+ }, Ss = ({ source: e }) => {
2860
2860
  const t = O(), r = I(), { TextField: a } = M(), o = (s) => {
2861
2861
  const h = (s.label ?? "") !== "" || (s.url ?? "") !== "";
2862
- t.commands.dispatch(new kr({ source: h ? s : null }), { transient: !0 });
2862
+ t.commands.dispatch(new Er({ source: h ? s : null }), { transient: !0 });
2863
2863
  }, i = () => {
2864
2864
  const s = e.url ?? "";
2865
- s !== "" && !Sn.test(s) && o({
2865
+ s !== "" && !bn.test(s) && o({
2866
2866
  ...e,
2867
2867
  url: `https://${s}`
2868
2868
  }), t.commands.seal();
@@ -2873,15 +2873,15 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
2873
2873
  ...e,
2874
2874
  label: s
2875
2875
  });
2876
- return /* @__PURE__ */ p(G, { children: [/* @__PURE__ */ n(f, {
2876
+ return /* @__PURE__ */ p(B, { children: [/* @__PURE__ */ n(C, {
2877
2877
  label: r("editor.elementsPanel.sourceSection.url"),
2878
2878
  children: /* @__PURE__ */ n(a, {
2879
2879
  value: e.url ?? "",
2880
2880
  onChange: l,
2881
2881
  onCommit: i,
2882
- hasError: Sn.test(e.url ?? "") && !Va(e.url)
2882
+ hasError: bn.test(e.url ?? "") && !Fa(e.url)
2883
2883
  })
2884
- }), /* @__PURE__ */ n(f, {
2884
+ }), /* @__PURE__ */ n(C, {
2885
2885
  label: r("editor.elementsPanel.sourceSection.name"),
2886
2886
  children: /* @__PURE__ */ n(a, {
2887
2887
  value: e.label ?? "",
@@ -2889,7 +2889,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
2889
2889
  onCommit: t.commands.seal
2890
2890
  })
2891
2891
  })] });
2892
- }, ys = ({ title: e, layout: t = "collapsible", preview: r }) => {
2892
+ }, ws = ({ title: e, layout: t = "collapsible", preview: r }) => {
2893
2893
  const a = O(), o = R(a), i = I(), { Switch: l } = M();
2894
2894
  if (!o) return null;
2895
2895
  const c = o.config.content, s = (d) => {
@@ -2898,24 +2898,24 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
2898
2898
  isVisible: d
2899
2899
  }));
2900
2900
  }, h = (d) => {
2901
- a.commands.dispatch(new _r({ subtitle: d }), { transient: !0 });
2901
+ a.commands.dispatch(new Rr({ subtitle: d }), { transient: !0 });
2902
2902
  };
2903
2903
  return /* @__PURE__ */ n(D, {
2904
2904
  title: e ?? i("editor.elementsPanel.headerSection.subtitle"),
2905
2905
  layout: t,
2906
2906
  preview: r,
2907
- children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(f, {
2907
+ children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(C, {
2908
2908
  label: i("editor.elementsPanel.contentVisible"),
2909
2909
  children: /* @__PURE__ */ n(l, {
2910
2910
  isChecked: c.isSubtitleVisible,
2911
2911
  onChange: s
2912
2912
  })
2913
- }), /* @__PURE__ */ n(Xe, {
2913
+ }), /* @__PURE__ */ n($e, {
2914
2914
  value: c.subtitle,
2915
2915
  onChange: h
2916
2916
  })] })
2917
2917
  });
2918
- }, Re = [
2918
+ }, Ee = [
2919
2919
  0.8,
2920
2920
  1,
2921
2921
  1.2,
@@ -2926,15 +2926,15 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
2926
2926
  2.5,
2927
2927
  3,
2928
2928
  4
2929
- ], Ss = Re.length / 2, ws = ({ title: e, layout: t = "collapsible", preview: r }) => {
2929
+ ], xs = Ee.length / 2, Ts = ({ title: e, layout: t = "collapsible", preview: r }) => {
2930
2930
  const a = O(), o = R(a), i = I(), { RadioGrid: l } = M();
2931
2931
  if (!o) return null;
2932
- const { textScale: c } = o.config.appearance, s = (u) => i("editor.elementsPanel.textSizeSection.scaleFormat", { value: `${u}` }), h = Re.map((u) => ({
2932
+ const { textScale: c } = o.config.appearance, s = (u) => i("editor.elementsPanel.textSizeSection.scaleFormat", { value: `${u}` }), h = Ee.map((u) => ({
2933
2933
  value: `${u}`,
2934
2934
  label: s(u)
2935
2935
  })), d = (u) => {
2936
- const v = Re.find((m) => `${m}` === u);
2937
- v !== void 0 && a.commands.dispatch(new xr({ textScale: v }));
2936
+ const v = Ee.find((m) => `${m}` === u);
2937
+ v !== void 0 && a.commands.dispatch(new Tr({ textScale: v }));
2938
2938
  };
2939
2939
  return /* @__PURE__ */ n(D, {
2940
2940
  title: e ?? i("editor.elementsPanel.textSizeSection.title"),
@@ -2943,12 +2943,12 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
2943
2943
  children: /* @__PURE__ */ n(l, {
2944
2944
  value: `${c}`,
2945
2945
  options: h,
2946
- columns: Ss,
2946
+ columns: xs,
2947
2947
  onChange: d,
2948
2948
  ariaLabel: i("editor.elementsPanel.textSizeSection.title")
2949
2949
  })
2950
2950
  });
2951
- }, xs = ({ title: e, layout: t = "collapsible", preview: r }) => {
2951
+ }, Ls = ({ title: e, layout: t = "collapsible", preview: r }) => {
2952
2952
  const a = O(), o = R(a), i = I(), { Switch: l } = M();
2953
2953
  if (!o) return null;
2954
2954
  const c = o.config.content, s = (d) => {
@@ -2957,63 +2957,73 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
2957
2957
  isVisible: d
2958
2958
  }));
2959
2959
  }, h = (d) => {
2960
- a.commands.dispatch(new Rr({ title: d }), { transient: !0 });
2960
+ a.commands.dispatch(new Dr({ title: d }), { transient: !0 });
2961
2961
  };
2962
2962
  return /* @__PURE__ */ n(D, {
2963
2963
  title: e ?? i("editor.elementsPanel.headerSection.toggleTitle"),
2964
2964
  layout: t,
2965
2965
  preview: r,
2966
- children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(f, {
2966
+ children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(C, {
2967
2967
  label: i("editor.elementsPanel.contentVisible"),
2968
2968
  children: /* @__PURE__ */ n(l, {
2969
2969
  isChecked: c.isTitleVisible,
2970
2970
  onChange: s
2971
2971
  })
2972
- }), /* @__PURE__ */ n(Xe, {
2972
+ }), /* @__PURE__ */ n($e, {
2973
2973
  value: c.title,
2974
2974
  onChange: h
2975
2975
  })] })
2976
2976
  });
2977
- }, s1 = ({ children: e, ...t }) => /* @__PURE__ */ n(xt.Root, {
2977
+ }, h1 = ({ children: e, ...t }) => /* @__PURE__ */ n(Tt.Root, {
2978
2978
  ...t,
2979
- children: e ?? /* @__PURE__ */ p(G, { children: [
2980
- /* @__PURE__ */ n(xs, {}),
2979
+ children: e ?? /* @__PURE__ */ p(B, { children: [
2980
+ /* @__PURE__ */ n(Ls, {}),
2981
+ /* @__PURE__ */ n(ws, {}),
2982
+ /* @__PURE__ */ n(Cs, {}),
2981
2983
  /* @__PURE__ */ n(ys, {}),
2982
- /* @__PURE__ */ n(vs, {}),
2983
- /* @__PURE__ */ n(fs, {}),
2984
- /* @__PURE__ */ n(ws, {})
2984
+ /* @__PURE__ */ n(Ts, {})
2985
2985
  ] })
2986
- }), c1 = ({ children: e, ...t }) => /* @__PURE__ */ n(xt.Root, {
2986
+ }), u1 = ({ children: e, ...t }) => /* @__PURE__ */ n(Tt.Root, {
2987
2987
  ...t,
2988
- children: e ?? /* @__PURE__ */ p(G, { children: [/* @__PURE__ */ n(bn, { axis: "x" }), /* @__PURE__ */ n(bn, { axis: "y" })] })
2989
- }), Pe = (e) => `${e}px`, Lt = (e) => `${Math.round(e * 100)}%`, Ts = (e) => `${e}°`, Ls = 24, wn = ["dim", "desaturate"], d1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
2988
+ children: e ?? /* @__PURE__ */ p(B, { children: [/* @__PURE__ */ n(fn, { axis: "x" }), /* @__PURE__ */ n(fn, { axis: "y" })] })
2989
+ }), Pe = (e) => `${e}px`, Pt = (e) => `${Math.round(e * 100)}%`, Ps = (e) => `${e}°`, Is = 24, As = { select: { target: "graph" } }, yn = ["dim", "desaturate"], m1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
2990
2990
  const a = O(), o = R(a), i = I(), { Slider: l, ToggleGroup: c } = M();
2991
2991
  if (!o) return null;
2992
- const { cornerRadius: s } = o.config.appearance, h = Ba(o.spec), d = wn.map((m) => ({
2992
+ const s = Hn().chromeReaders(o.chrome).graph.get("borderRadius"), h = Ka(o.spec), d = yn.map((m) => ({
2993
2993
  value: m,
2994
2994
  label: i(m === "dim" ? "editor.highlighting.highlightStyle.tint" : "editor.highlighting.highlightStyle.grey")
2995
2995
  })), u = (m) => {
2996
- a.commands.dispatch(new wr({ cornerRadius: m }), { transient: !0 });
2996
+ const g = ka(o.spec.styles.overrides, As)?.declarations ?? {};
2997
+ a.commands.dispatch(new oa({
2998
+ list: "overrides",
2999
+ rule: {
3000
+ select: { target: "graph" },
3001
+ declarations: {
3002
+ ...g,
3003
+ borderRadius: m
3004
+ }
3005
+ }
3006
+ }), { transient: !0 });
2997
3007
  }, v = (m) => {
2998
- const g = wn.find((C) => C === m);
2999
- g && a.commands.dispatch(new Kr({ dimStyle: g }));
3008
+ const g = yn.find((f) => f === m);
3009
+ g && a.commands.dispatch(new Ur({ dimStyle: g }));
3000
3010
  };
3001
3011
  return /* @__PURE__ */ n(D, {
3002
3012
  title: e ?? i("editor.colorPanel.appearanceSection.title"),
3003
3013
  layout: t,
3004
3014
  preview: r,
3005
- children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(f, {
3015
+ children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(C, {
3006
3016
  label: i("editor.colorPanel.borderSection.cornerRadius"),
3007
3017
  children: /* @__PURE__ */ n(l, {
3008
3018
  value: s,
3009
3019
  min: 0,
3010
- max: Ls,
3020
+ max: Is,
3011
3021
  step: 1,
3012
3022
  formatValue: Pe,
3013
3023
  onChange: u,
3014
3024
  onCommit: a.commands.seal
3015
3025
  })
3016
- }), /* @__PURE__ */ n(f, {
3026
+ }), /* @__PURE__ */ n(C, {
3017
3027
  label: i("editor.colorPanel.appearanceSection.highlightStyle"),
3018
3028
  children: /* @__PURE__ */ n(c, {
3019
3029
  value: h,
@@ -3022,31 +3032,31 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3022
3032
  })
3023
3033
  })] })
3024
3034
  });
3025
- }, je = (e, t) => {
3026
- const { colorScheme: r } = Ve();
3027
- return k(() => {
3035
+ }, Xe = (e, t) => {
3036
+ const { colorScheme: r } = He();
3037
+ return _(() => {
3028
3038
  const a = e?.layers.find((o) => o.id === t);
3029
- return a === void 0 ? null : Sa({ colorScheme: r }).geomReaders(a);
3039
+ return a === void 0 ? null : Hn({ colorScheme: r }).geomReaders(a);
3030
3040
  }, [
3031
3041
  e,
3032
3042
  t,
3033
3043
  r
3034
3044
  ]);
3035
- }, Ps = 0.05, h1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
3036
- const a = O(), o = R(a), i = I(), { Slider: l, ToggleGroup: c } = M(), s = o ? Vn(o.spec.layers, "bar") : void 0, h = je(o, s?.id ?? null);
3045
+ }, Os = 0.05, p1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
3046
+ const a = O(), o = R(a), i = I(), { Slider: l, ToggleGroup: c } = M(), s = o ? Vn(o.spec.layers, "bar") : void 0, h = Xe(o, s?.id ?? null);
3037
3047
  if (!o || !s || o.coordSystem.type === "polar" && o.coordSystem.bandAxis === null) return null;
3038
3048
  const d = (m) => {
3039
- a.commands.dispatch(new Mr({
3049
+ a.commands.dispatch(new Nr({
3040
3050
  layerId: s.id,
3041
3051
  width: m
3042
3052
  }), { transient: !0 });
3043
3053
  }, u = (m) => {
3044
- const g = Qe.find((C) => C === m);
3045
- g && a.commands.dispatch(new Or({
3054
+ const g = je.find((f) => f === m);
3055
+ g && a.commands.dispatch(new Mr({
3046
3056
  layerId: s.id,
3047
3057
  borderRadius: g
3048
3058
  }));
3049
- }, v = Qe.map((m) => ({
3059
+ }, v = je.map((m) => ({
3050
3060
  value: m,
3051
3061
  label: i(`editor.graphPanel.barSection.roundingOptions.${m}`)
3052
3062
  }));
@@ -3054,22 +3064,22 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3054
3064
  title: e ?? i("editor.graphPanel.barSection.title"),
3055
3065
  layout: t,
3056
3066
  preview: r,
3057
- children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(f, {
3067
+ children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(C, {
3058
3068
  label: i("editor.graphPanel.barSection.thickness"),
3059
3069
  children: /* @__PURE__ */ n(l, {
3060
3070
  value: s.params.width,
3061
- min: fr,
3062
- max: Cr,
3063
- step: Ps,
3064
- formatValue: Lt,
3071
+ min: yr,
3072
+ max: br,
3073
+ step: Os,
3074
+ formatValue: Pt,
3065
3075
  onChange: d,
3066
3076
  onCommit: a.commands.seal
3067
3077
  })
3068
- }), /* @__PURE__ */ n(f, {
3078
+ }), /* @__PURE__ */ n(C, {
3069
3079
  label: i("editor.graphPanel.barSection.rounding"),
3070
3080
  layout: "stack",
3071
3081
  children: /* @__PURE__ */ n(c, {
3072
- value: h?.get("borderRadius") ?? pr,
3082
+ value: h?.get("borderRadius") ?? vr,
3073
3083
  options: v,
3074
3084
  onChange: u
3075
3085
  })
@@ -3077,7 +3087,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3077
3087
  });
3078
3088
  }, Ie = ({ children: e }) => {
3079
3089
  const t = le();
3080
- return /* @__PURE__ */ p(G, { children: [/* @__PURE__ */ n("g", {
3090
+ return /* @__PURE__ */ p(B, { children: [/* @__PURE__ */ n("g", {
3081
3091
  filter: `url(#${t})`,
3082
3092
  children: e
3083
3093
  }), /* @__PURE__ */ n("defs", { children: /* @__PURE__ */ p("filter", {
@@ -3100,7 +3110,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3100
3110
  floodOpacity: "0.16"
3101
3111
  })]
3102
3112
  }) })] });
3103
- }, Ae = "qdaoth0", Is = (e) => /* @__PURE__ */ p(L, {
3113
+ }, Ae = "qdaoth0", Ms = (e) => /* @__PURE__ */ p(L, {
3104
3114
  viewBox: "0 0 31 33",
3105
3115
  ...e,
3106
3116
  children: [/* @__PURE__ */ n(Ie, { children: /* @__PURE__ */ n("path", {
@@ -3112,7 +3122,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3112
3122
  fill: "currentColor",
3113
3123
  d: "M12.0591 7.11C11.5767 7.11 11.1857 6.71899 11.1857 6.23664C11.1857 5.7543 11.5767 5.36328 12.0591 5.36328H24.8684C25.3507 5.36328 25.7417 5.7543 25.7417 6.23664V19.0459C25.7417 19.5283 25.3507 19.9193 24.8684 19.9193C24.386 19.9193 23.995 19.5283 23.995 19.0459V8.34512L6.8542 25.4859C6.51313 25.827 5.96015 25.827 5.61908 25.4859C5.27801 25.1448 5.27801 24.5919 5.61908 24.2508L22.7599 7.11H12.0591Z"
3114
3124
  })]
3115
- }), As = (e) => /* @__PURE__ */ n(L, {
3125
+ }), Ns = (e) => /* @__PURE__ */ n(L, {
3116
3126
  viewBox: "0 0 32 32",
3117
3127
  ...e,
3118
3128
  children: /* @__PURE__ */ p(Ie, { children: [/* @__PURE__ */ n("path", {
@@ -3122,7 +3132,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3122
3132
  fill: "currentColor",
3123
3133
  d: "M24.25 9C24.25 8.30964 23.6904 7.75 23 7.75H9C8.30964 7.75 7.75 8.30964 7.75 9V23C7.75 23.6904 8.30964 24.25 9 24.25H23C23.6904 24.25 24.25 23.6904 24.25 23V9ZM25.75 23C25.75 24.5188 24.5188 25.75 23 25.75H9C7.48122 25.75 6.25 24.5188 6.25 23V9C6.25 7.48122 7.48122 6.25 9 6.25H23C24.5188 6.25 25.75 7.48122 25.75 9V23Z"
3124
3134
  })] })
3125
- }), Os = (e) => /* @__PURE__ */ p(L, {
3135
+ }), ks = (e) => /* @__PURE__ */ p(L, {
3126
3136
  viewBox: "0 0 32 33",
3127
3137
  ...e,
3128
3138
  children: [/* @__PURE__ */ n(Ie, { children: /* @__PURE__ */ n("path", {
@@ -3136,7 +3146,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3136
3146
  clipRule: "evenodd",
3137
3147
  d: "M25.25 22C25.25 20.7574 24.2426 19.75 23 19.75C21.7574 19.75 20.75 20.7574 20.75 22C20.75 23.2426 21.7574 24.25 23 24.25C24.2426 24.25 25.25 23.2426 25.25 22ZM23 18.25C25.0711 18.25 26.75 19.9289 26.75 22C26.75 24.0711 25.0711 25.75 23 25.75C20.9289 25.75 19.25 24.0711 19.25 22C19.25 19.9289 20.9289 18.25 23 18.25ZM11.25 9C11.25 7.75736 10.2426 6.75 9 6.75C7.75736 6.75 6.75 7.75736 6.75 9C6.75 10.2426 7.75736 11.25 9 11.25C10.2426 11.25 11.25 10.2426 11.25 9ZM9.75 12.675C11.4617 12.3275 12.75 10.8142 12.75 9C12.75 6.92893 11.0711 5.25 9 5.25C6.92893 5.25 5.25 6.92893 5.25 9C5.25 10.8142 6.53832 12.3275 8.25 12.675L8.25 24C8.25 24.4142 8.58579 24.75 9 24.75L16 24.75C16.4142 24.75 16.75 24.4142 16.75 24L16.75 7.75L22.25 7.75L22.25 14.1893L21.0303 12.9697C20.7374 12.6768 20.2626 12.6768 19.9697 12.9697C19.6768 13.2626 19.6768 13.7374 19.9697 14.0303L22.4697 16.5303C22.7626 16.8232 23.2374 16.8232 23.5303 16.5303L26.0303 14.0303C26.3232 13.7374 26.3232 13.2626 26.0303 12.9697C25.7374 12.6768 25.2626 12.6768 24.9697 12.9697L23.75 14.1893L23.75 7C23.75 6.58579 23.4142 6.25 23 6.25L16 6.25C15.5858 6.25 15.25 6.58579 15.25 7L15.25 23.25L9.75 23.25L9.75 12.675Z"
3138
3148
  })]
3139
- }), Ms = (e) => /* @__PURE__ */ p(L, {
3149
+ }), _s = (e) => /* @__PURE__ */ p(L, {
3140
3150
  viewBox: "0 0 32 33",
3141
3151
  ...e,
3142
3152
  children: [/* @__PURE__ */ n(Ie, { children: /* @__PURE__ */ n("path", {
@@ -3146,76 +3156,76 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3146
3156
  fill: "currentColor",
3147
3157
  d: "M8.41371 5H20.7271C21.1595 5 21.5325 5 21.8398 5.02507C22.1641 5.05157 22.4867 5.11007 22.7971 5.26822C23.2601 5.50416 23.6366 5.88064 23.8726 6.3437C24.0307 6.65409 24.0892 6.97666 24.1157 7.30097C24.1408 7.60823 24.1408 7.98127 24.1408 8.41369V9.10155C24.1408 9.55465 23.7735 9.92195 23.3205 9.92195C22.8674 9.92195 22.5001 9.55465 22.5001 9.10155V8.44533C22.5001 7.97237 22.4995 7.66699 22.4805 7.43457C22.4623 7.21172 22.4314 7.12909 22.4107 7.08853C22.3321 6.93418 22.2066 6.80869 22.0522 6.73004C22.0117 6.70938 21.9291 6.67847 21.7062 6.66026C21.4738 6.64127 21.1684 6.64063 20.6954 6.64063H15.3907V24.6877H20.0392C20.4922 24.6877 20.8595 25.0549 20.8595 25.508C20.8595 25.961 20.4922 26.3283 20.0392 26.3283H9.10159C8.64854 26.3283 8.28127 25.961 8.28127 25.508C8.28127 25.0549 8.64854 24.6877 9.10159 24.6877H13.7501V6.64063H8.44533C7.97238 6.64063 7.66699 6.64127 7.43457 6.66026C7.21172 6.67847 7.1291 6.70938 7.08854 6.73004C6.93418 6.80869 6.80869 6.93418 6.73004 7.08853C6.70938 7.12909 6.67847 7.21172 6.66026 7.43457C6.64127 7.66699 6.64063 7.97237 6.64063 8.44533V9.10155C6.64063 9.55465 6.27337 9.92195 5.82032 9.92195C5.36727 9.92195 5 9.55465 5 9.10155V8.41371C5 7.98128 5 7.60823 5.02508 7.30097C5.05157 6.97666 5.11007 6.65409 5.26823 6.3437C5.50417 5.88064 5.88064 5.50416 6.3437 5.26822C6.65409 5.11007 6.97666 5.05157 7.30097 5.02507C7.60824 5 7.98129 5 8.41371 5Z"
3148
3158
  })]
3149
- }), Ns = {
3159
+ }), Es = {
3150
3160
  x: 0.5,
3151
3161
  y: 0.5
3152
- }, Es = 0.2, ks = {
3162
+ }, Rs = 0.2, Ds = {
3153
3163
  x: 0.375,
3154
3164
  y: 0.25,
3155
3165
  width: 0.25,
3156
3166
  height: 0.5
3157
- }, _s = {
3167
+ }, Hs = {
3158
3168
  fillColor: null,
3159
3169
  fillOpacity: 0.25,
3160
3170
  strokeWidth: 0,
3161
3171
  zOrder: "background"
3162
- }, Rs = {
3172
+ }, Vs = {
3163
3173
  x: 0.4,
3164
3174
  y: 0.6
3165
- }, Ds = {
3175
+ }, zs = {
3166
3176
  x: 0.6,
3167
3177
  y: 0.4
3168
- }, Hs = "relative-difference", u1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
3178
+ }, Fs = "relative-difference", g1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
3169
3179
  const a = O(), o = R(a), i = I(), { Button: l } = M();
3170
3180
  if (!o) return null;
3171
3181
  const c = () => {
3172
- a.commands.dispatch(new j({
3182
+ a.commands.dispatch(new Y({
3173
3183
  kind: "text",
3174
3184
  annotation: {
3175
- ...aa,
3176
- content: Vs(i("editor.annotatePanel.callOutSection.text")),
3185
+ ...ia,
3186
+ content: Gs(i("editor.annotatePanel.callOutSection.text")),
3177
3187
  at: {
3178
3188
  anchorType: "panel",
3179
- ...Ns
3189
+ ...Es
3180
3190
  },
3181
- width: Es
3191
+ width: Rs
3182
3192
  }
3183
3193
  }));
3184
3194
  }, s = () => {
3185
- a.commands.dispatch(new j({
3195
+ a.commands.dispatch(new Y({
3186
3196
  kind: "arrow",
3187
3197
  annotation: {
3188
- ...hr,
3198
+ ...mr,
3189
3199
  start: {
3190
3200
  anchorType: "panel",
3191
- ...Rs
3201
+ ...Vs
3192
3202
  },
3193
3203
  end: {
3194
3204
  anchorType: "panel",
3195
- ...Ds
3205
+ ...zs
3196
3206
  }
3197
3207
  }
3198
3208
  }));
3199
3209
  }, h = () => {
3200
- a.commands.dispatch(new j({
3210
+ a.commands.dispatch(new Y({
3201
3211
  kind: "shape",
3202
3212
  annotation: {
3203
- ...Sr,
3204
- ..._s,
3213
+ ...xr,
3214
+ ...Hs,
3205
3215
  region: {
3206
3216
  anchorType: "panel",
3207
- ...ks
3217
+ ...Ds
3208
3218
  }
3209
3219
  }
3210
3220
  }));
3211
3221
  }, d = () => {
3212
- const v = Ra(o);
3213
- v !== null && a.commands.dispatch(new j({
3222
+ const v = Ha(o);
3223
+ v !== null && a.commands.dispatch(new Y({
3214
3224
  kind: "differenceArrow",
3215
3225
  annotation: {
3216
3226
  ..._n,
3217
3227
  ...v,
3218
- label: Hs
3228
+ label: Fs
3219
3229
  }
3220
3230
  }));
3221
3231
  }, u = o.coordSystem.type === "cartesian";
@@ -3223,34 +3233,34 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3223
3233
  title: e ?? i("editor.annotatePanel.callOutSection.title"),
3224
3234
  layout: t,
3225
3235
  preview: r,
3226
- children: /* @__PURE__ */ p(St, { children: [
3236
+ children: /* @__PURE__ */ p(wt, { children: [
3227
3237
  /* @__PURE__ */ n(l, {
3228
3238
  variant: "tile",
3229
- icon: /* @__PURE__ */ n(Ms, { size: "xl" }),
3239
+ icon: /* @__PURE__ */ n(_s, { size: "xl" }),
3230
3240
  label: i("editor.annotatePanel.callOutSection.text"),
3231
3241
  onClick: c
3232
3242
  }),
3233
3243
  /* @__PURE__ */ n(l, {
3234
3244
  variant: "tile",
3235
- icon: /* @__PURE__ */ n(Is, { size: "xl" }),
3245
+ icon: /* @__PURE__ */ n(Ms, { size: "xl" }),
3236
3246
  label: i("editor.annotatePanel.callOutSection.arrow"),
3237
3247
  onClick: s
3238
3248
  }),
3239
3249
  /* @__PURE__ */ n(l, {
3240
3250
  variant: "tile",
3241
- icon: /* @__PURE__ */ n(As, { size: "xl" }),
3251
+ icon: /* @__PURE__ */ n(Ns, { size: "xl" }),
3242
3252
  label: i("editor.annotatePanel.callOutSection.box"),
3243
3253
  onClick: h
3244
3254
  }),
3245
3255
  u && /* @__PURE__ */ n(l, {
3246
3256
  variant: "tile",
3247
- icon: /* @__PURE__ */ n(Os, { size: "xl" }),
3257
+ icon: /* @__PURE__ */ n(ks, { size: "xl" }),
3248
3258
  label: i("editor.annotatePanel.callOutSection.difference"),
3249
3259
  onClick: d
3250
3260
  })
3251
3261
  ] })
3252
3262
  });
3253
- }, Vs = (e) => ({
3263
+ }, Gs = (e) => ({
3254
3264
  type: "doc",
3255
3265
  content: [{
3256
3266
  type: "paragraph",
@@ -3259,37 +3269,37 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3259
3269
  text: e
3260
3270
  }]
3261
3271
  }]
3262
- }), zs = 0.1, Fs = 20, m1 = ({ title: e, preview: t }) => {
3272
+ }), Bs = 0.1, Ks = 20, v1 = ({ title: e, preview: t }) => {
3263
3273
  const r = O(), a = R(r), o = I(), { NumberField: i, TextField: l } = M();
3264
3274
  if (!a || a.coordSystem.type === "polar") return null;
3265
- const c = Ia(a.spec.layers), s = e ?? o("editor.annotationsPanel.goalSection.title"), h = xa(c?.mapping.y), d = typeof h == "number" ? h : null, u = (g) => {
3266
- const C = new la({
3275
+ const c = Aa(a.spec.layers), s = e ?? o("editor.annotationsPanel.goalSection.title"), h = Ta(c?.mapping.y), d = typeof h == "number" ? h : null, u = (g) => {
3276
+ const f = new ca({
3267
3277
  showGoalLine: g,
3268
- value: Bs(a),
3278
+ value: Us(a),
3269
3279
  ...c !== void 0 && { layerId: c.id }
3270
3280
  });
3271
- r.commands.dispatch(C);
3281
+ r.commands.dispatch(f);
3272
3282
  }, v = (g) => {
3273
3283
  if (c === void 0) return;
3274
- const C = new Qr({
3284
+ const f = new ea({
3275
3285
  layerId: c.id,
3276
3286
  label: g === "" ? null : g
3277
3287
  });
3278
- r.commands.dispatch(C, { transient: !0 });
3288
+ r.commands.dispatch(f, { transient: !0 });
3279
3289
  }, m = (g) => {
3280
3290
  if (c === void 0 || g === null) return;
3281
- const C = new ea({
3291
+ const f = new na({
3282
3292
  layerId: c.id,
3283
3293
  value: g
3284
3294
  });
3285
- r.commands.dispatch(C, { transient: !0 });
3295
+ r.commands.dispatch(f, { transient: !0 });
3286
3296
  };
3287
- return /* @__PURE__ */ n(hs, {
3297
+ return /* @__PURE__ */ n(ms, {
3288
3298
  title: s,
3289
3299
  preview: t,
3290
3300
  isChecked: c !== void 0,
3291
3301
  onToggle: u,
3292
- children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(f, {
3302
+ children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(C, {
3293
3303
  label: o("editor.annotationsPanel.goalSection.labelControl"),
3294
3304
  children: /* @__PURE__ */ n(l, {
3295
3305
  value: c?.params.label ?? "",
@@ -3298,7 +3308,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3298
3308
  onCommit: r.commands.seal,
3299
3309
  ariaLabel: o("editor.annotationsPanel.goalSection.labelAriaLabel")
3300
3310
  })
3301
- }), /* @__PURE__ */ n(f, {
3311
+ }), /* @__PURE__ */ n(C, {
3302
3312
  label: o("editor.annotationsPanel.goalSection.valueControl"),
3303
3313
  children: /* @__PURE__ */ n(i, {
3304
3314
  value: d,
@@ -3309,72 +3319,72 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3309
3319
  })
3310
3320
  })] })
3311
3321
  });
3312
- }, Bs = (e) => {
3322
+ }, Us = (e) => {
3313
3323
  const t = (e.scales.y?.domain ?? []).filter((l) => typeof l == "number");
3314
3324
  if (t.length === 0) return 0;
3315
3325
  const r = Math.max(...t), a = r - Math.min(...t), o = a > 0 ? a : Math.abs(r);
3316
3326
  if (o === 0) return 0;
3317
- const i = Math.min(Fs, Math.max(0, 1 - Math.floor(Math.log10(o))));
3318
- return Number((r + o * zs).toFixed(i));
3319
- }, p1 = ({ layerId: e, title: t, layout: r = "collapsible", preview: a }) => {
3327
+ const i = Math.min(Ks, Math.max(0, 1 - Math.floor(Math.log10(o))));
3328
+ return Number((r + o * Bs).toFixed(i));
3329
+ }, f1 = ({ layerId: e, title: t, layout: r = "collapsible", preview: a }) => {
3320
3330
  const o = O(), i = R(o), l = I(), { Switch: c } = M();
3321
3331
  if (!i) return null;
3322
- const s = e === void 0 ? i.spec.layers[0] : i.spec.layers.find((E) => E.id === e);
3332
+ const s = e === void 0 ? i.spec.layers[0] : i.spec.layers.find((k) => k.id === e);
3323
3333
  if (!s) return null;
3324
- const { showDataLabels: h, format: d, showStackTotals: u, showCategoryLabels: v } = s.dataLabels, m = i.coordSystem.type === "polar", g = s.geom === "bar", C = s.position === "stack" || s.position === "fill", P = g && !m && s.position === "stack", w = g && (!m || h), b = g || s.geom === "area" && C;
3325
- if (!Ca(s.geom, i.coordSystem.type)) return null;
3326
- const T = (E) => {
3327
- const B = new ia({
3334
+ const { showDataLabels: h, format: d, showStackTotals: u, showCategoryLabels: v } = s.dataLabels, m = i.coordSystem.type === "polar", g = s.geom === "bar", f = s.position === "stack" || s.position === "fill", P = g && !m && s.position === "stack", w = g && (!m || h), b = g || s.geom === "area" && f;
3335
+ if (!ba(s.geom, i.coordSystem.type)) return null;
3336
+ const T = (k) => {
3337
+ const G = new sa({
3328
3338
  layerId: s.id,
3329
- showDataLabels: E
3339
+ showDataLabels: k
3330
3340
  });
3331
- o.commands.dispatch(B);
3332
- }, x = (E) => {
3333
- const B = new Dr({
3341
+ o.commands.dispatch(G);
3342
+ }, x = (k) => {
3343
+ const G = new Hr({
3334
3344
  layerId: s.id,
3335
- format: E ? "percentage" : "absolute"
3345
+ format: k ? "percentage" : "absolute"
3336
3346
  });
3337
- o.commands.dispatch(B);
3338
- }, N = (E) => {
3339
- const B = new da({
3347
+ o.commands.dispatch(G);
3348
+ }, N = (k) => {
3349
+ const G = new ua({
3340
3350
  layerId: s.id,
3341
- showStackTotals: E
3351
+ showStackTotals: k
3342
3352
  });
3343
- o.commands.dispatch(B);
3344
- }, V = (E) => {
3345
- const B = new oa({
3353
+ o.commands.dispatch(G);
3354
+ }, V = (k) => {
3355
+ const G = new la({
3346
3356
  layerId: s.id,
3347
- showCategoryLabels: E
3357
+ showCategoryLabels: k
3348
3358
  });
3349
- o.commands.dispatch(B);
3359
+ o.commands.dispatch(G);
3350
3360
  };
3351
3361
  return /* @__PURE__ */ n(D, {
3352
3362
  title: t ?? l("editor.graphPanel.graphOptionsSection.title"),
3353
3363
  layout: r,
3354
3364
  preview: a,
3355
3365
  children: /* @__PURE__ */ p(F, { children: [
3356
- /* @__PURE__ */ n(f, {
3366
+ /* @__PURE__ */ n(C, {
3357
3367
  label: l("editor.graphPanel.graphOptions.dataLabels"),
3358
3368
  children: /* @__PURE__ */ n(c, {
3359
3369
  isChecked: h,
3360
3370
  onChange: T
3361
3371
  })
3362
3372
  }),
3363
- h && b && /* @__PURE__ */ n(f, {
3373
+ h && b && /* @__PURE__ */ n(C, {
3364
3374
  label: l("editor.graphPanel.graphOptions.showPercentages"),
3365
3375
  children: /* @__PURE__ */ n(c, {
3366
3376
  isChecked: d === "percentage",
3367
3377
  onChange: x
3368
3378
  })
3369
3379
  }),
3370
- P && /* @__PURE__ */ n(f, {
3380
+ P && /* @__PURE__ */ n(C, {
3371
3381
  label: l("editor.graphPanel.graphOptions.stackTotals"),
3372
3382
  children: /* @__PURE__ */ n(c, {
3373
3383
  isChecked: u,
3374
3384
  onChange: N
3375
3385
  })
3376
3386
  }),
3377
- w && /* @__PURE__ */ n(f, {
3387
+ w && /* @__PURE__ */ n(C, {
3378
3388
  label: l("editor.graphPanel.graphOptions.categoryLabels"),
3379
3389
  children: /* @__PURE__ */ n(c, {
3380
3390
  isChecked: v,
@@ -3383,7 +3393,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3383
3393
  })
3384
3394
  ] })
3385
3395
  });
3386
- }, Gs = (e) => /* @__PURE__ */ p(L, {
3396
+ }, Ws = (e) => /* @__PURE__ */ p(L, {
3387
3397
  viewBox: "0 0 16 16",
3388
3398
  ...e,
3389
3399
  children: [/* @__PURE__ */ n("path", {
@@ -3395,7 +3405,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3395
3405
  fillOpacity: "0.3",
3396
3406
  d: "M5.744 5.565 0 11.826V8l5.744-6.957 4.718 2.087L16 0v6.957l-5.538 4z"
3397
3407
  })]
3398
- }), Ks = (e) => /* @__PURE__ */ n(L, {
3408
+ }), Zs = (e) => /* @__PURE__ */ n(L, {
3399
3409
  viewBox: "0 0 16 16",
3400
3410
  ...e,
3401
3411
  children: /* @__PURE__ */ p("g", {
@@ -3437,7 +3447,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3437
3447
  })
3438
3448
  ]
3439
3449
  })
3440
- }), Us = (e) => /* @__PURE__ */ n(L, {
3450
+ }), qs = (e) => /* @__PURE__ */ n(L, {
3441
3451
  viewBox: "0 0 16 16",
3442
3452
  ...e,
3443
3453
  children: /* @__PURE__ */ p("g", {
@@ -3452,7 +3462,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3452
3462
  d: "M0 12.445h4.267V.52A.52.52 0 0 0 3.748 0H.518A.52.52 0 0 0 0 .519zM5.867 7.111h4.266V.52A.52.52 0 0 0 9.615 0h-3.23a.52.52 0 0 0-.518.519zM11.733 9.481H16V.52A.52.52 0 0 0 15.482 0h-3.23a.52.52 0 0 0-.519.519z"
3453
3463
  })]
3454
3464
  })
3455
- }), Ws = (e) => /* @__PURE__ */ n(L, {
3465
+ }), $s = (e) => /* @__PURE__ */ n(L, {
3456
3466
  viewBox: "0 0 16 16",
3457
3467
  ...e,
3458
3468
  children: /* @__PURE__ */ p("g", {
@@ -3467,7 +3477,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3467
3477
  d: "M0 7.037c0-.286.232-.518.519-.518h3.23c.286 0 .518.232.518.518v5.408H0zM5.867 7.111h4.266V4.074a.52.52 0 0 0-.518-.518h-3.23a.52.52 0 0 0-.518.518zM11.733 9.481H16V.52A.52.52 0 0 0 15.482 0h-3.23a.52.52 0 0 0-.519.519z"
3468
3478
  })]
3469
3479
  })
3470
- }), Zs = (e) => /* @__PURE__ */ p(L, {
3480
+ }), Xs = (e) => /* @__PURE__ */ p(L, {
3471
3481
  viewBox: "0 0 16 16",
3472
3482
  ...e,
3473
3483
  children: [
@@ -3506,7 +3516,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3506
3516
  rx: ".533"
3507
3517
  })
3508
3518
  ]
3509
- }), qs = (e) => /* @__PURE__ */ p(L, {
3519
+ }), Ys = (e) => /* @__PURE__ */ p(L, {
3510
3520
  viewBox: "0 0 16 16",
3511
3521
  ...e,
3512
3522
  children: [/* @__PURE__ */ n("path", {
@@ -3518,7 +3528,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3518
3528
  fillOpacity: "0.3",
3519
3529
  d: "M0 12.445h4.267V.52A.52.52 0 0 0 3.748 0H.518A.52.52 0 0 0 0 .519zM5.867 7.111h4.266V.52A.52.52 0 0 0 9.615 0h-3.23a.52.52 0 0 0-.518.519zM11.733 9.481H16V.52A.52.52 0 0 0 15.482 0h-3.23a.52.52 0 0 0-.519.519z"
3520
3530
  })]
3521
- }), $s = (e) => /* @__PURE__ */ p(L, {
3531
+ }), js = (e) => /* @__PURE__ */ p(L, {
3522
3532
  viewBox: "0 0 16 16",
3523
3533
  ...e,
3524
3534
  children: [/* @__PURE__ */ n("path", {
@@ -3530,7 +3540,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3530
3540
  fillOpacity: "0.3",
3531
3541
  d: "M0 7.037c0-.286.232-.518.519-.518h3.23c.286 0 .518.232.518.518v5.408H0zM5.867 7.111h4.266V4.074a.52.52 0 0 0-.518-.518h-3.23a.52.52 0 0 0-.518.518zM11.733 9.481H16V.52A.52.52 0 0 0 15.482 0h-3.23a.52.52 0 0 0-.519.519z"
3532
3542
  })]
3533
- }), Xs = (e) => /* @__PURE__ */ n(L, {
3543
+ }), Js = (e) => /* @__PURE__ */ n(L, {
3534
3544
  viewBox: "0 0 16 16",
3535
3545
  ...e,
3536
3546
  children: /* @__PURE__ */ p("g", {
@@ -3565,7 +3575,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3565
3575
  })
3566
3576
  ]
3567
3577
  })
3568
- }), js = (e) => /* @__PURE__ */ n(L, {
3578
+ }), Qs = (e) => /* @__PURE__ */ n(L, {
3569
3579
  viewBox: "0 0 16 16",
3570
3580
  ...e,
3571
3581
  children: /* @__PURE__ */ p("g", {
@@ -3642,7 +3652,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3642
3652
  ]
3643
3653
  })]
3644
3654
  })
3645
- }), Ys = (e) => /* @__PURE__ */ p(L, {
3655
+ }), ec = (e) => /* @__PURE__ */ p(L, {
3646
3656
  viewBox: "0 0 16 16",
3647
3657
  ...e,
3648
3658
  children: [
@@ -3664,7 +3674,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3664
3674
  d: "M15.999 8a8 8 0 0 1-7.588 7.989l-.412.01V8z"
3665
3675
  })
3666
3676
  ]
3667
- }), Js = (e) => /* @__PURE__ */ n(L, {
3677
+ }), nc = (e) => /* @__PURE__ */ n(L, {
3668
3678
  viewBox: "0 0 16 16",
3669
3679
  ...e,
3670
3680
  children: /* @__PURE__ */ p("g", {
@@ -3708,10 +3718,10 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3708
3718
  })
3709
3719
  ]
3710
3720
  })
3711
- }), Qs = 0.55, De = [
3721
+ }), tc = 0.55, Re = [
3712
3722
  {
3713
3723
  name: "column",
3714
- icon: Zs,
3724
+ icon: Xs,
3715
3725
  summary: {
3716
3726
  coordType: "cartesian",
3717
3727
  geom: "bar",
@@ -3720,7 +3730,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3720
3730
  },
3721
3731
  {
3722
3732
  name: "columnStacked",
3723
- icon: $s,
3733
+ icon: js,
3724
3734
  summary: {
3725
3735
  coordType: "cartesian",
3726
3736
  geom: "bar",
@@ -3729,7 +3739,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3729
3739
  },
3730
3740
  {
3731
3741
  name: "columnStackedFill",
3732
- icon: qs,
3742
+ icon: Ys,
3733
3743
  summary: {
3734
3744
  coordType: "cartesian",
3735
3745
  geom: "bar",
@@ -3738,7 +3748,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3738
3748
  },
3739
3749
  {
3740
3750
  name: "bar",
3741
- icon: Ks,
3751
+ icon: Zs,
3742
3752
  summary: {
3743
3753
  coordType: "flip",
3744
3754
  geom: "bar",
@@ -3747,7 +3757,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3747
3757
  },
3748
3758
  {
3749
3759
  name: "barStacked",
3750
- icon: Ws,
3760
+ icon: $s,
3751
3761
  summary: {
3752
3762
  coordType: "flip",
3753
3763
  geom: "bar",
@@ -3756,7 +3766,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3756
3766
  },
3757
3767
  {
3758
3768
  name: "barStackedFill",
3759
- icon: Us,
3769
+ icon: qs,
3760
3770
  summary: {
3761
3771
  coordType: "flip",
3762
3772
  geom: "bar",
@@ -3765,7 +3775,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3765
3775
  },
3766
3776
  {
3767
3777
  name: "line",
3768
- icon: js,
3778
+ icon: Qs,
3769
3779
  summary: {
3770
3780
  coordType: "cartesian",
3771
3781
  geom: "line",
@@ -3774,7 +3784,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3774
3784
  },
3775
3785
  {
3776
3786
  name: "areaStacked",
3777
- icon: Gs,
3787
+ icon: Ws,
3778
3788
  summary: {
3779
3789
  coordType: "cartesian",
3780
3790
  geom: "area",
@@ -3783,7 +3793,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3783
3793
  },
3784
3794
  {
3785
3795
  name: "scatter",
3786
- icon: Js,
3796
+ icon: nc,
3787
3797
  summary: {
3788
3798
  coordType: "cartesian",
3789
3799
  geom: "point",
@@ -3792,7 +3802,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3792
3802
  },
3793
3803
  {
3794
3804
  name: "pie",
3795
- icon: Ys,
3805
+ icon: ec,
3796
3806
  summary: {
3797
3807
  coordType: "polar",
3798
3808
  geom: "bar",
@@ -3803,31 +3813,31 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3803
3813
  },
3804
3814
  {
3805
3815
  name: "donut",
3806
- icon: Xs,
3816
+ icon: Js,
3807
3817
  summary: {
3808
3818
  coordType: "polar",
3809
3819
  geom: "bar",
3810
3820
  position: "fill",
3811
3821
  theta: "y",
3812
- innerRadius: Qs
3822
+ innerRadius: tc
3813
3823
  }
3814
3824
  }
3815
- ], ec = 0.05, nc = (e) => e === null ? null : De.find((t) => rc(t.summary, e)) ?? null, tc = (e, t) => {
3825
+ ], rc = 0.05, ac = (e) => e === null ? null : Re.find((t) => ic(t.summary, e)) ?? null, oc = (e, t) => {
3816
3826
  const { summary: r } = e;
3817
3827
  return r.coordType !== "polar" || !we(r.innerRadius) || t === null || t.coordType !== "polar" || !we(t.innerRadius) ? r : {
3818
3828
  ...r,
3819
3829
  innerRadius: t.innerRadius
3820
3830
  };
3821
- }, rc = (e, t) => e.coordType !== t.coordType || e.geom !== t.geom || e.position !== t.position ? !1 : e.coordType !== "polar" || t.coordType !== "polar" ? !0 : e.theta === t.theta && we(e.innerRadius) === we(t.innerRadius), we = (e) => e >= ec, ac = 3, g1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
3822
- const a = O(), o = R(a), i = I(), { RadioGrid: l } = M(), c = k(() => De.map(({ name: u, icon: v }) => ({
3831
+ }, ic = (e, t) => e.coordType !== t.coordType || e.geom !== t.geom || e.position !== t.position ? !1 : e.coordType !== "polar" || t.coordType !== "polar" ? !0 : e.theta === t.theta && we(e.innerRadius) === we(t.innerRadius), we = (e) => e >= rc, lc = 3, C1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
3832
+ const a = O(), o = R(a), i = I(), { RadioGrid: l } = M(), c = _(() => Re.map(({ name: u, icon: v }) => ({
3823
3833
  value: u,
3824
3834
  label: i(`editor.graphTypes.${u}`),
3825
3835
  icon: /* @__PURE__ */ n(v, { size: "md" })
3826
3836
  })), [i]);
3827
3837
  if (!o) return null;
3828
- const s = Fa(o.spec), h = nc(s), d = (u) => {
3829
- const v = De.find((m) => m.name === u);
3830
- v && a.commands.dispatch(new Nr(tc(v, s)));
3838
+ const s = Ba(o.spec), h = ac(s), d = (u) => {
3839
+ const v = Re.find((m) => m.name === u);
3840
+ v && a.commands.dispatch(new kr(oc(v, s)));
3831
3841
  };
3832
3842
  return /* @__PURE__ */ n(D, {
3833
3843
  title: e ?? i("editor.graphPanel.graphTypeSection.title"),
@@ -3836,36 +3846,36 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3836
3846
  children: /* @__PURE__ */ n(l, {
3837
3847
  value: h?.name ?? "",
3838
3848
  options: c,
3839
- columns: ac,
3849
+ columns: lc,
3840
3850
  onChange: d,
3841
3851
  ariaLabel: i("editor.graphPanel.graphTypeSection.title")
3842
3852
  })
3843
3853
  });
3844
- }, xn = [
3854
+ }, Sn = [
3845
3855
  "solid",
3846
3856
  "dashed",
3847
3857
  "dotted"
3848
- ], oc = Number.parseFloat(Yt.gridLineWidth), ic = 8, lc = 0, v1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
3849
- const a = O(), o = R(a), i = I(), { Slider: l, Switch: c, ToggleGroup: s } = M(), { themeValues: h } = Ve();
3858
+ ], sc = Number.parseFloat(dr.gridLineWidth), cc = 8, dc = 0, b1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
3859
+ const a = O(), o = R(a), i = I(), { Slider: l, Switch: c, ToggleGroup: s } = M(), { themeValues: h } = He();
3850
3860
  if (!o) return null;
3851
- const d = o.guides.axes.filter(sc);
3861
+ const d = o.guides.axes.filter(hc);
3852
3862
  if (d.length === 0) return null;
3853
- const u = o.coordSystem.type !== "polar", v = d.some((b) => b.gridVisible), m = o.config.axes.y.grid, g = xn.map((b) => ({
3863
+ const u = o.coordSystem.type !== "polar", v = d.some((b) => b.gridVisible), m = o.config.axes.y.grid, g = Sn.map((b) => ({
3854
3864
  value: b,
3855
3865
  label: i(`editor.graphPanel.gridSection.lineStyles.${b}`)
3856
- })), C = (b) => (T) => {
3857
- a.commands.dispatch(new zr({
3866
+ })), f = (b) => (T) => {
3867
+ a.commands.dispatch(new Fr({
3858
3868
  axis: b,
3859
3869
  isVisible: T
3860
3870
  }));
3861
3871
  }, P = (b) => {
3862
- const T = xn.find((x) => x === b);
3863
- T && a.commands.dispatch(new Hr({
3872
+ const T = Sn.find((x) => x === b);
3873
+ T && a.commands.dispatch(new Vr({
3864
3874
  axis: "both",
3865
3875
  lineStyle: T
3866
3876
  }));
3867
3877
  }, w = (b) => {
3868
- a.commands.dispatch(new Vr({
3878
+ a.commands.dispatch(new zr({
3869
3879
  axis: "both",
3870
3880
  lineWidth: b
3871
3881
  }), { transient: !0 });
@@ -3874,25 +3884,25 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3874
3884
  title: e ?? i("editor.graphPanel.gridSection.title"),
3875
3885
  layout: t,
3876
3886
  preview: r,
3877
- children: /* @__PURE__ */ p(F, { children: [d.map((b) => /* @__PURE__ */ n(f, {
3878
- label: i(cc(b)),
3887
+ children: /* @__PURE__ */ p(F, { children: [d.map((b) => /* @__PURE__ */ n(C, {
3888
+ label: i(uc(b)),
3879
3889
  children: /* @__PURE__ */ n(c, {
3880
3890
  isChecked: b.gridVisible,
3881
- onChange: C(b.scaleAestheticKey)
3891
+ onChange: f(b.scaleAestheticKey)
3882
3892
  })
3883
- }, b.scaleAestheticKey)), u && v && /* @__PURE__ */ p(G, { children: [/* @__PURE__ */ n(f, {
3893
+ }, b.scaleAestheticKey)), u && v && /* @__PURE__ */ p(B, { children: [/* @__PURE__ */ n(C, {
3884
3894
  label: i("editor.graphPanel.gridSection.gridStyle"),
3885
3895
  children: /* @__PURE__ */ n(s, {
3886
3896
  value: m.lineStyle,
3887
3897
  options: g,
3888
3898
  onChange: P
3889
3899
  })
3890
- }), /* @__PURE__ */ n(f, {
3900
+ }), /* @__PURE__ */ n(C, {
3891
3901
  label: i("editor.graphPanel.gridSection.gridThickness"),
3892
3902
  children: /* @__PURE__ */ n(l, {
3893
- value: m.lineWidth ?? Xt(h.gridLineWidth, oc),
3894
- min: lc,
3895
- max: ic,
3903
+ value: m.lineWidth ?? jt(h.gridLineWidth, sc),
3904
+ min: dc,
3905
+ max: cc,
3896
3906
  step: 0.5,
3897
3907
  formatValue: Pe,
3898
3908
  onChange: w,
@@ -3900,27 +3910,27 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3900
3910
  })
3901
3911
  })] })] })
3902
3912
  });
3903
- }, sc = (e) => e.scaleAestheticKey === "x" || e.scaleAestheticKey === "y", cc = (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", dc = "total", Pt = [
3913
+ }, hc = (e) => e.scaleAestheticKey === "x" || e.scaleAestheticKey === "y", uc = (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", mc = "total", It = [
3904
3914
  "total",
3905
3915
  "average",
3906
3916
  "current"
3907
- ], hc = ["total"], Tn = ["previous", "first"], Ln = [
3917
+ ], pc = ["total"], wn = ["previous", "first"], xn = [
3908
3918
  "auto",
3909
3919
  "small",
3910
3920
  "medium",
3911
3921
  "large"
3912
- ], C1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
3922
+ ], y1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
3913
3923
  const a = O(), o = R(a), i = I(), { Switch: l, ToggleGroup: c } = M();
3914
3924
  if (!o) return null;
3915
3925
  const s = o.config.headline, h = s.show !== "none", d = o.coordSystem, u = d.type === "polar", v = d.type === "polar" && d.innerRadius > 0, m = o.layers.some((S) => S.summary.grandTotal !== void 0);
3916
3926
  if (u && !m) return null;
3917
- const g = u ? hc : Pt, C = o.guides.headline, P = C?.kind === "perGroup" && C.items.some((S) => S.comparison !== null), w = g.map((S) => ({
3927
+ const g = u ? pc : It, f = o.guides.headline, P = f?.kind === "perGroup" && f.items.some((S) => S.comparison !== null), w = g.map((S) => ({
3918
3928
  value: S,
3919
3929
  label: i(`editor.graphPanel.headlineNumberSection.metrics.${S}`)
3920
- })), b = Tn.map((S) => ({
3930
+ })), b = wn.map((S) => ({
3921
3931
  value: S,
3922
3932
  label: i(`editor.graphPanel.headlineNumberSection.comparison.${S}`)
3923
- })), T = Ln.map((S) => ({
3933
+ })), T = xn.map((S) => ({
3924
3934
  value: S,
3925
3935
  label: i(S === "auto" ? "editor.graphPanel.numberFormat.options.auto" : `editor.graphPanel.headlineNumberSize.sizes.${S}`)
3926
3936
  })), x = [{
@@ -3930,31 +3940,31 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3930
3940
  value: "center",
3931
3941
  label: i("editor.graphPanel.headlineNumberSection.position.center")
3932
3942
  }], N = (S) => {
3933
- a.commands.dispatch(new en({ show: S ? dc : "none" }));
3943
+ a.commands.dispatch(new Je({ show: S ? mc : "none" }));
3934
3944
  }, V = (S) => {
3935
- const _ = g.find((ee) => ee === S);
3936
- _ && a.commands.dispatch(new en({ show: _ }));
3937
- }, E = (S) => {
3938
- const _ = Tn.find((ee) => ee === S);
3939
- _ && a.commands.dispatch(new Fr({ compareWith: _ }));
3940
- }, B = (S) => {
3941
- const _ = Ln.find((ee) => ee === S);
3942
- _ && a.commands.dispatch(new Gr({ size: _ }));
3945
+ const E = g.find((Q) => Q === S);
3946
+ E && a.commands.dispatch(new Je({ show: E }));
3947
+ }, k = (S) => {
3948
+ const E = wn.find((Q) => Q === S);
3949
+ E && a.commands.dispatch(new Gr({ compareWith: E }));
3950
+ }, G = (S) => {
3951
+ const E = xn.find((Q) => Q === S);
3952
+ E && a.commands.dispatch(new Kr({ size: E }));
3943
3953
  }, A = (S) => {
3944
3954
  a.commands.dispatch(new Br({ position: S === "center" ? "center" : "above" }));
3945
3955
  };
3946
3956
  return /* @__PURE__ */ n(D, {
3947
3957
  title: e ?? i("editor.graphPanel.headlineNumberSection.title"),
3948
3958
  layout: t,
3949
- preview: r ?? uc(i, s.show),
3950
- children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(f, {
3959
+ preview: r ?? gc(i, s.show),
3960
+ children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(C, {
3951
3961
  label: i("editor.graphPanel.headlineNumberSection.toggle"),
3952
3962
  children: /* @__PURE__ */ n(l, {
3953
3963
  isChecked: h,
3954
3964
  onChange: N
3955
3965
  })
3956
- }), h && /* @__PURE__ */ p(G, { children: [
3957
- w.length > 1 && /* @__PURE__ */ n(f, {
3966
+ }), h && /* @__PURE__ */ p(B, { children: [
3967
+ w.length > 1 && /* @__PURE__ */ n(C, {
3958
3968
  label: i("editor.graphPanel.headlineNumberSection.metricLabel"),
3959
3969
  layout: "stack",
3960
3970
  children: /* @__PURE__ */ n(c, {
@@ -3963,24 +3973,24 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3963
3973
  onChange: V
3964
3974
  })
3965
3975
  }),
3966
- P && /* @__PURE__ */ n(f, {
3976
+ P && /* @__PURE__ */ n(C, {
3967
3977
  label: i("editor.graphPanel.headlineNumberSection.compareWithLabel"),
3968
3978
  layout: "stack",
3969
3979
  children: /* @__PURE__ */ n(c, {
3970
- value: Ga(s.compareWith),
3980
+ value: Ua(s.compareWith),
3971
3981
  options: b,
3972
- onChange: E
3982
+ onChange: k
3973
3983
  })
3974
3984
  }),
3975
- /* @__PURE__ */ n(f, {
3985
+ /* @__PURE__ */ n(C, {
3976
3986
  label: i("editor.graphPanel.headlineNumberSize.sizeLabel"),
3977
3987
  children: /* @__PURE__ */ n(c, {
3978
3988
  value: s.size,
3979
3989
  options: T,
3980
- onChange: B
3990
+ onChange: G
3981
3991
  })
3982
3992
  }),
3983
- v && /* @__PURE__ */ n(f, {
3993
+ v && /* @__PURE__ */ n(C, {
3984
3994
  label: i("editor.axesPanel.controls.position"),
3985
3995
  children: /* @__PURE__ */ n(c, {
3986
3996
  value: s.position,
@@ -3990,8 +4000,8 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3990
4000
  })
3991
4001
  ] })] })
3992
4002
  });
3993
- }, uc = (e, t) => {
3994
- const r = Pt.find((a) => a === t);
4003
+ }, gc = (e, t) => {
4004
+ const r = It.find((a) => a === t);
3995
4005
  return r && e(`editor.graphPanel.headlineNumberSection.metrics.${r}`);
3996
4006
  }, Ne = [
3997
4007
  "top",
@@ -3999,58 +4009,58 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
3999
4009
  "left",
4000
4010
  "right",
4001
4011
  "none"
4002
- ], Pn = [
4012
+ ], Tn = [
4003
4013
  "auto",
4004
4014
  "start",
4005
4015
  "center",
4006
4016
  "end"
4007
- ], In = [
4017
+ ], Ln = [
4008
4018
  "auto",
4009
4019
  "pill",
4010
4020
  "direct"
4011
- ], f1 = ({ positions: e, title: t, layout: r = "collapsible", preview: a }) => {
4021
+ ], S1 = ({ positions: e, title: t, layout: r = "collapsible", preview: a }) => {
4012
4022
  const o = O(), i = R(o), l = I(), { ToggleGroup: c } = M();
4013
4023
  if (!i) return null;
4014
- const s = i.config.legend.position, h = e ?? Ne, d = i.guides.legends.drawn[0], u = va({
4024
+ const s = i.config.legend.position, h = e ?? Ne, d = i.guides.legends.drawn[0], u = Ca({
4015
4025
  legendPosition: i.guides.legends.position,
4016
4026
  coordSystem: i.coordSystem,
4017
4027
  layers: i.layers
4018
4028
  }), v = i.guides.headline?.kind === "perGroup", m = i.guides.colorGroups.length > 0;
4019
4029
  if (s === "auto" && d === void 0 && !u && (v || !m)) return null;
4020
- const g = d?.position ?? "none", C = s === "auto" ? g : s, P = Ne.filter((A) => A === C || h.includes(A)).map((A) => ({
4030
+ const g = d?.position ?? "none", f = s === "auto" ? g : s, P = Ne.filter((A) => A === f || h.includes(A)).map((A) => ({
4021
4031
  value: A,
4022
4032
  label: l(`editor.graphPanel.legendSection.${A}`)
4023
4033
  })), w = (A) => {
4024
- const S = Ne.find((_) => _ === A);
4025
- S && o.commands.dispatch(new Zr({ position: S }));
4034
+ const S = Ne.find((E) => E === A);
4035
+ S && o.commands.dispatch(new qr({ position: S }));
4026
4036
  }, b = (A) => {
4027
- const S = Pn.find((_) => _ === A);
4028
- S && o.commands.dispatch(new Ur({ align: S }));
4037
+ const S = Tn.find((E) => E === A);
4038
+ S && o.commands.dispatch(new Wr({ align: S }));
4029
4039
  }, T = (A) => {
4030
- const S = In.find((_) => _ === A);
4031
- S && o.commands.dispatch(new Wr({ display: S }));
4032
- }, x = Pn.map((A) => ({
4040
+ const S = Ln.find((E) => E === A);
4041
+ S && o.commands.dispatch(new Zr({ display: S }));
4042
+ }, x = Tn.map((A) => ({
4033
4043
  value: A,
4034
4044
  label: l(`editor.graphPanel.legendSection.align.${A}`)
4035
- })), N = In.map((A) => ({
4045
+ })), N = Ln.map((A) => ({
4036
4046
  value: A,
4037
4047
  label: l(`editor.graphPanel.legendSection.display.${A}`)
4038
- })), V = t ?? l("editor.graphPanel.legendSection.title"), E = P.find((A) => A.value === C)?.label, B = d !== void 0;
4048
+ })), V = t ?? l("editor.graphPanel.legendSection.title"), k = P.find((A) => A.value === f)?.label, G = d !== void 0;
4039
4049
  return /* @__PURE__ */ n(D, {
4040
4050
  title: V,
4041
4051
  layout: r,
4042
- preview: a ?? E,
4052
+ preview: a ?? k,
4043
4053
  children: /* @__PURE__ */ p(F, { children: [
4044
- /* @__PURE__ */ n(f, {
4054
+ /* @__PURE__ */ n(C, {
4045
4055
  label: l("editor.axesPanel.controls.position"),
4046
4056
  layout: "stack",
4047
4057
  children: /* @__PURE__ */ n(c, {
4048
- value: C,
4058
+ value: f,
4049
4059
  options: P,
4050
4060
  onChange: w
4051
4061
  })
4052
4062
  }),
4053
- B && /* @__PURE__ */ n(f, {
4063
+ G && /* @__PURE__ */ n(C, {
4054
4064
  label: l("editor.graphPanel.legendSection.alignLabel"),
4055
4065
  layout: "stack",
4056
4066
  children: /* @__PURE__ */ n(c, {
@@ -4059,7 +4069,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4059
4069
  onChange: b
4060
4070
  })
4061
4071
  }),
4062
- u && /* @__PURE__ */ n(f, {
4072
+ u && /* @__PURE__ */ n(C, {
4063
4073
  label: l("editor.graphPanel.legendSection.displayLabel"),
4064
4074
  layout: "stack",
4065
4075
  children: /* @__PURE__ */ n(c, {
@@ -4070,8 +4080,8 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4070
4080
  })
4071
4081
  ] })
4072
4082
  });
4073
- }, mc = 1, pc = 20, gc = 0.5, It = ({ layerId: e }) => {
4074
- const t = O(), r = R(t), { Slider: a } = M(), o = je(r, e);
4083
+ }, vc = 1, fc = 20, Cc = 0.5, At = ({ layerId: e }) => {
4084
+ const t = O(), r = R(t), { Slider: a } = M(), o = Xe(r, e);
4075
4085
  if (!r) return null;
4076
4086
  const i = (l) => {
4077
4087
  const c = new jr({
@@ -4081,58 +4091,58 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4081
4091
  t.commands.dispatch(c, { transient: !0 });
4082
4092
  };
4083
4093
  return /* @__PURE__ */ n(a, {
4084
- value: o?.get("size") ?? gr,
4085
- min: mc,
4086
- max: pc,
4087
- step: gc,
4094
+ value: o?.get("size") ?? fr,
4095
+ min: vc,
4096
+ max: fc,
4097
+ step: Cc,
4088
4098
  formatValue: Pe,
4089
4099
  onChange: i,
4090
4100
  onCommit: t.commands.seal
4091
4101
  });
4092
- }, vc = 1, Cc = 10, fc = 0.1, bc = [
4102
+ }, bc = 1, yc = 10, Sc = 0.1, wc = [
4093
4103
  "gap",
4094
4104
  "zero",
4095
4105
  "connect"
4096
- ], b1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
4097
- const a = O(), o = R(a), i = I(), { Select: l, Slider: c, Switch: s, ToggleGroup: h } = M(), d = o?.spec.layers ?? [], u = Vn(d, "line", "area"), v = je(o, u?.id ?? null);
4106
+ ], w1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
4107
+ const a = O(), o = R(a), i = I(), { Select: l, Slider: c, Switch: s, ToggleGroup: h } = M(), d = o?.spec.layers ?? [], u = Vn(d, "line", "area"), v = Xe(o, u?.id ?? null);
4098
4108
  if (!o || !u) return null;
4099
- const m = o.coordSystem.type === "polar", g = wc(i, u), C = Sc(u, d), P = An(o.spec, u.geom, "strokeWidth", u.id), w = typeof P == "number", b = u.geom === "line" ? u : void 0, T = [{
4109
+ const m = o.coordSystem.type === "polar", g = Lc(i, u), f = Tc(u, d), P = Pn(o.spec, u.geom, "strokeWidth", u.id), w = typeof P == "number", b = u.geom === "line" ? u : void 0, T = [{
4100
4110
  value: "auto",
4101
4111
  label: i("editor.graphPanel.numberFormat.options.auto")
4102
4112
  }, {
4103
4113
  value: "custom",
4104
4114
  label: i("editor.graphPanel.numberFormat.options.custom")
4105
4115
  }], x = (S) => {
4106
- a.commands.dispatch(new ca({
4116
+ a.commands.dispatch(new ha({
4107
4117
  layerId: u.id,
4108
4118
  showPoints: S
4109
4119
  }));
4110
4120
  }, N = (S) => {
4111
- b && a.commands.dispatch(new sa({
4121
+ b && a.commands.dispatch(new da({
4112
4122
  layerId: b.id,
4113
4123
  showFill: S
4114
4124
  }));
4115
4125
  }, V = (S) => {
4116
- a.commands.dispatch(new qr({
4126
+ a.commands.dispatch(new $r({
4117
4127
  layerId: u.id,
4118
4128
  interpolate: S ? "catmull-rom" : "linear"
4119
4129
  }));
4120
- }, E = (S) => {
4121
- const _ = v?.get("strokeWidth") ?? vr;
4122
- a.commands.dispatch(new nn({
4130
+ }, k = (S) => {
4131
+ const E = v?.get("strokeWidth") ?? Cr;
4132
+ a.commands.dispatch(new Qe({
4123
4133
  layerId: u.id,
4124
- lineWidth: S === "custom" ? _ : null
4134
+ lineWidth: S === "custom" ? E : null
4125
4135
  }));
4126
- }, B = (S) => {
4127
- a.commands.dispatch(new nn({
4136
+ }, G = (S) => {
4137
+ a.commands.dispatch(new Qe({
4128
4138
  layerId: u.id,
4129
4139
  lineWidth: S
4130
4140
  }), { transient: !0 });
4131
4141
  }, A = (S) => {
4132
- const _ = yc(S);
4133
- _ && a.commands.dispatch(new $r({
4142
+ const E = xc(S);
4143
+ E && a.commands.dispatch(new Xr({
4134
4144
  layerId: u.id,
4135
- missingValues: _
4145
+ missingValues: E
4136
4146
  }));
4137
4147
  };
4138
4148
  return /* @__PURE__ */ n(D, {
@@ -4140,52 +4150,52 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4140
4150
  layout: t,
4141
4151
  preview: r,
4142
4152
  children: /* @__PURE__ */ p(F, { children: [
4143
- /* @__PURE__ */ n(f, {
4153
+ /* @__PURE__ */ n(C, {
4144
4154
  label: i("editor.graphPanel.graphOptions.showPoints"),
4145
4155
  children: /* @__PURE__ */ n(s, {
4146
- isChecked: C !== void 0,
4156
+ isChecked: f !== void 0,
4147
4157
  onChange: x
4148
4158
  })
4149
4159
  }),
4150
- C && /* @__PURE__ */ n(f, {
4160
+ f && /* @__PURE__ */ n(C, {
4151
4161
  label: i("editor.graphPanel.pointSize.label"),
4152
- children: /* @__PURE__ */ n(It, { layerId: C.id })
4162
+ children: /* @__PURE__ */ n(At, { layerId: f.id })
4153
4163
  }),
4154
- b && !m && /* @__PURE__ */ n(f, {
4164
+ b && !m && /* @__PURE__ */ n(C, {
4155
4165
  label: i("editor.graphPanel.graphOptions.lineFill"),
4156
4166
  children: /* @__PURE__ */ n(s, {
4157
- isChecked: An(o.spec, "line", "fillAlpha", b.id) !== void 0,
4167
+ isChecked: Pn(o.spec, "line", "fillAlpha", b.id) !== void 0,
4158
4168
  onChange: N
4159
4169
  })
4160
4170
  }),
4161
- !m && /* @__PURE__ */ n(f, {
4171
+ !m && /* @__PURE__ */ n(C, {
4162
4172
  label: i("editor.graphPanel.graphOptions.smoothLines"),
4163
4173
  children: /* @__PURE__ */ n(s, {
4164
4174
  isChecked: u.params.interpolate === "catmull-rom",
4165
4175
  onChange: V
4166
4176
  })
4167
4177
  }),
4168
- /* @__PURE__ */ n(f, {
4178
+ /* @__PURE__ */ n(C, {
4169
4179
  label: i("editor.graphPanel.lineThickness.label"),
4170
4180
  children: /* @__PURE__ */ n(h, {
4171
4181
  value: w ? "custom" : "auto",
4172
4182
  options: T,
4173
- onChange: E
4183
+ onChange: k
4174
4184
  })
4175
4185
  }),
4176
- w && /* @__PURE__ */ n(f, {
4186
+ w && /* @__PURE__ */ n(C, {
4177
4187
  label: i("editor.graphPanel.numberFormat.valueLabel"),
4178
4188
  children: /* @__PURE__ */ n(c, {
4179
4189
  value: P,
4180
- min: vc,
4181
- max: Cc,
4182
- step: fc,
4190
+ min: bc,
4191
+ max: yc,
4192
+ step: Sc,
4183
4193
  formatValue: Pe,
4184
- onChange: B,
4194
+ onChange: G,
4185
4195
  onCommit: a.commands.seal
4186
4196
  })
4187
4197
  }),
4188
- !m && g.length > 1 && /* @__PURE__ */ n(f, {
4198
+ !m && g.length > 1 && /* @__PURE__ */ n(C, {
4189
4199
  label: i("editor.fineTunePanel.detailSection.missingValues"),
4190
4200
  children: /* @__PURE__ */ n(l, {
4191
4201
  value: u.params.missingValues,
@@ -4195,7 +4205,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4195
4205
  })
4196
4206
  ] })
4197
4207
  });
4198
- }, yc = (e) => bc.find((t) => t === e), An = (e, t, r, a) => Ma(e.styles.overrides, ma(t, a))?.declarations?.[r], Sc = (e, t) => ke(t, "point").find((r) => zn(r, [e])), wc = (e, t) => {
4208
+ }, xc = (e) => wc.find((t) => t === e), Pn = (e, t, r, a) => Ma(e.styles.overrides, ga(t, a))?.[r], Tc = (e, t) => ke(t, "point").find((r) => zn(r, [e])), Lc = (e, t) => {
4199
4209
  const r = [{
4200
4210
  value: "gap",
4201
4211
  label: e("editor.graphPanel.treatEmptyValues.leaveGap.label")
@@ -4207,7 +4217,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4207
4217
  value: "connect",
4208
4218
  label: e("editor.graphPanel.treatEmptyValues.connectGaps.label")
4209
4219
  }), t.geom === "area" ? r.filter((a) => a.value !== "gap") : r;
4210
- }, xc = "k", Tc = 2, Lc = 0, Pc = 5, He = [
4220
+ }, Pc = "k", Ic = 2, Ac = 0, Oc = 5, De = [
4211
4221
  {
4212
4222
  value: "k",
4213
4223
  labelKey: "thousands"
@@ -4220,34 +4230,34 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4220
4230
  value: "b",
4221
4231
  labelKey: "billions"
4222
4232
  }
4223
- ], Ic = ["auto", "none"], y1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
4233
+ ], Mc = ["auto", "none"], x1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
4224
4234
  const a = O(), o = R(a), i = I(), { NumberField: l, ToggleGroup: c } = M();
4225
4235
  if (!o) return null;
4226
- const { abbreviation: s, decimals: h } = o.config.numberFormat, d = Ac(s) !== void 0, u = h !== "auto", v = (T) => T.map((x) => ({
4236
+ const { abbreviation: s, decimals: h } = o.config.numberFormat, d = Nc(s) !== void 0, u = h !== "auto", v = (T) => T.map((x) => ({
4227
4237
  value: x,
4228
4238
  label: i(`editor.graphPanel.numberFormat.options.${x}`)
4229
- })), m = He.map(({ value: T, labelKey: x }) => ({
4239
+ })), m = De.map(({ value: T, labelKey: x }) => ({
4230
4240
  value: T,
4231
4241
  label: i(`common.abbreviations.${x}`)
4232
4242
  })), g = (T) => {
4233
- a.commands.dispatch(new Xr({ abbreviation: T }));
4234
- }, C = (T) => {
4235
- const x = Ic.find((N) => N === T);
4236
- g(x ?? xc);
4243
+ a.commands.dispatch(new Yr({ abbreviation: T }));
4244
+ }, f = (T) => {
4245
+ const x = Mc.find((N) => N === T);
4246
+ g(x ?? Pc);
4237
4247
  }, P = (T) => {
4238
- const x = He.find((N) => N.value === T);
4248
+ const x = De.find((N) => N.value === T);
4239
4249
  x && g(x.value);
4240
4250
  }, w = (T) => {
4241
- a.commands.dispatch(new tn({ decimals: T === "custom" ? Tc : "auto" }));
4251
+ a.commands.dispatch(new en({ decimals: T === "custom" ? Ic : "auto" }));
4242
4252
  }, b = (T) => {
4243
- T !== null && a.commands.dispatch(new tn({ decimals: T }), { transient: !0 });
4253
+ T !== null && a.commands.dispatch(new en({ decimals: T }), { transient: !0 });
4244
4254
  };
4245
4255
  return /* @__PURE__ */ n(D, {
4246
4256
  title: e ?? i("editor.graphPanel.numberFormatSection.title"),
4247
4257
  layout: t,
4248
4258
  preview: r,
4249
4259
  children: /* @__PURE__ */ p(F, { children: [
4250
- /* @__PURE__ */ n(f, {
4260
+ /* @__PURE__ */ n(C, {
4251
4261
  label: i("editor.graphPanel.numberFormat.abbreviationLabel"),
4252
4262
  children: /* @__PURE__ */ n(c, {
4253
4263
  value: d ? "custom" : s,
@@ -4256,10 +4266,10 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4256
4266
  "none",
4257
4267
  "custom"
4258
4268
  ]),
4259
- onChange: C
4269
+ onChange: f
4260
4270
  })
4261
4271
  }),
4262
- d && /* @__PURE__ */ n(f, {
4272
+ d && /* @__PURE__ */ n(C, {
4263
4273
  label: i("editor.graphPanel.numberFormat.valueLabel"),
4264
4274
  children: /* @__PURE__ */ n(c, {
4265
4275
  value: s,
@@ -4267,7 +4277,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4267
4277
  onChange: P
4268
4278
  })
4269
4279
  }),
4270
- /* @__PURE__ */ n(f, {
4280
+ /* @__PURE__ */ n(C, {
4271
4281
  label: i("editor.graphPanel.numberFormat.decimalPlacesLabel"),
4272
4282
  children: /* @__PURE__ */ n(c, {
4273
4283
  value: u ? "custom" : "auto",
@@ -4275,71 +4285,71 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4275
4285
  onChange: w
4276
4286
  })
4277
4287
  }),
4278
- u && /* @__PURE__ */ n(f, {
4288
+ u && /* @__PURE__ */ n(C, {
4279
4289
  label: i("editor.graphPanel.numberFormat.valueLabel"),
4280
4290
  children: /* @__PURE__ */ n(l, {
4281
4291
  value: h,
4282
- min: Lc,
4283
- max: Pc,
4292
+ min: Ac,
4293
+ max: Oc,
4284
4294
  onChange: b,
4285
4295
  onCommit: a.commands.seal
4286
4296
  })
4287
4297
  })
4288
4298
  ] })
4289
4299
  });
4290
- }, Ac = (e) => He.find((t) => t.value === e), S1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
4300
+ }, Nc = (e) => De.find((t) => t.value === e), T1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
4291
4301
  const a = R(O()), o = I();
4292
4302
  if (!a) return null;
4293
- const i = Oc(a.spec.layers);
4303
+ const i = kc(a.spec.layers);
4294
4304
  return i ? /* @__PURE__ */ n(D, {
4295
4305
  title: e ?? o("editor.graphPanel.pointSize.label"),
4296
4306
  layout: t,
4297
4307
  preview: r,
4298
- children: /* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(f, {
4308
+ children: /* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(C, {
4299
4309
  label: o("editor.graphPanel.numberFormat.valueLabel"),
4300
- children: /* @__PURE__ */ n(It, { layerId: i.id })
4310
+ children: /* @__PURE__ */ n(At, { layerId: i.id })
4301
4311
  }) })
4302
4312
  }) : null;
4303
- }, Oc = (e) => {
4313
+ }, kc = (e) => {
4304
4314
  const t = ke(e, "line", "area");
4305
4315
  return ke(e, "point").find((r) => !zn(r, t));
4306
- }, Mc = 0.9, Nc = 360, Ec = 0.05, kc = 15, w1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
4316
+ }, _c = 0.9, Ec = 360, Rc = 0.05, Dc = 15, L1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
4307
4317
  const a = O(), o = R(a), i = I(), { Slider: l } = M();
4308
4318
  if (!o || o.spec.coords.coordType !== "polar") return null;
4309
4319
  const { innerRadius: c, startAngle: s } = o.spec.coords.params, h = (u) => {
4310
- a.commands.dispatch(new Yr({ innerRadius: u }), { transient: !0 });
4320
+ a.commands.dispatch(new Jr({ innerRadius: u }), { transient: !0 });
4311
4321
  }, d = (u) => {
4312
- a.commands.dispatch(new Jr({ startAngle: u }), { transient: !0 });
4322
+ a.commands.dispatch(new Qr({ startAngle: u }), { transient: !0 });
4313
4323
  };
4314
4324
  return /* @__PURE__ */ n(D, {
4315
4325
  title: e ?? i("editor.graphPanel.polarSection.title"),
4316
4326
  layout: t,
4317
4327
  preview: r,
4318
- children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(f, {
4328
+ children: /* @__PURE__ */ p(F, { children: [/* @__PURE__ */ n(C, {
4319
4329
  label: i("editor.graphPanel.polarSection.innerRadius"),
4320
4330
  children: /* @__PURE__ */ n(l, {
4321
4331
  value: c,
4322
4332
  min: 0,
4323
- max: Mc,
4324
- step: Ec,
4325
- formatValue: Lt,
4333
+ max: _c,
4334
+ step: Rc,
4335
+ formatValue: Pt,
4326
4336
  onChange: h,
4327
4337
  onCommit: a.commands.seal
4328
4338
  })
4329
- }), /* @__PURE__ */ n(f, {
4339
+ }), /* @__PURE__ */ n(C, {
4330
4340
  label: i("editor.graphPanel.polarSection.startAngle"),
4331
4341
  children: /* @__PURE__ */ n(l, {
4332
4342
  value: s,
4333
4343
  min: 0,
4334
- max: Nc - 1,
4335
- step: kc,
4336
- formatValue: Ts,
4344
+ max: Ec - 1,
4345
+ step: Dc,
4346
+ formatValue: Ps,
4337
4347
  onChange: d,
4338
4348
  onCommit: a.commands.seal
4339
4349
  })
4340
4350
  })] })
4341
4351
  });
4342
- }, _c = (e) => /* @__PURE__ */ p(L, {
4352
+ }, Hc = (e) => /* @__PURE__ */ p(L, {
4343
4353
  ...e,
4344
4354
  children: [
4345
4355
  /* @__PURE__ */ n("path", {
@@ -4362,7 +4372,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4362
4372
  fill: "currentColor"
4363
4373
  })
4364
4374
  ]
4365
- }), On = (e) => /* @__PURE__ */ p(L, {
4375
+ }), In = (e) => /* @__PURE__ */ p(L, {
4366
4376
  ...e,
4367
4377
  children: [
4368
4378
  /* @__PURE__ */ n("path", {
@@ -4385,14 +4395,14 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4385
4395
  fill: "currentColor"
4386
4396
  })
4387
4397
  ]
4388
- }), Rc = (e) => k(() => {
4398
+ }), Vc = (e) => _(() => {
4389
4399
  if (e === null) return {
4390
4400
  options: [],
4391
4401
  findValue: () => {
4392
4402
  }
4393
4403
  };
4394
4404
  const { parsingLocale: t, numberFormat: r } = e.config, a = e.guides.colorGroups.map((o) => {
4395
- const i = wa({
4405
+ const i = xa({
4396
4406
  valueFormat: o.valueFormat,
4397
4407
  locale: t,
4398
4408
  numberFormat: r
@@ -4409,7 +4419,7 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4409
4419
  options: a.map(({ option: o }) => o),
4410
4420
  findValue: (o) => a.find((i) => i.option.value === o)?.value
4411
4421
  };
4412
- }, [e]), Mn = [
4422
+ }, [e]), An = [
4413
4423
  "linear",
4414
4424
  "exponential",
4415
4425
  "quadratic",
@@ -4417,41 +4427,41 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4417
4427
  "logarithmic",
4418
4428
  "power",
4419
4429
  "loess"
4420
- ], Dc = "linear", x1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
4421
- const a = O(), o = R(a), i = I(), { Select: l, Switch: c } = M(), { options: s, findValue: h } = Rc(o);
4430
+ ], zc = "linear", P1 = ({ title: e, layout: t = "collapsible", preview: r }) => {
4431
+ const a = O(), o = R(a), i = I(), { Select: l, Switch: c } = M(), { options: s, findValue: h } = Vc(o);
4422
4432
  if (!o || o.coordSystem.type === "polar") return null;
4423
- const d = Na(o.spec.layers), u = Pa(o.spec.layers), v = d?.stat.type === "smooth" ? d.stat.method : Dc, m = Hc(u), g = Mn.map((x) => ({
4433
+ const d = _a(o.spec.layers), u = Ia(o.spec.layers), v = d?.stat.type === "smooth" ? d.stat.method : zc, m = Fc(u), g = An.map((x) => ({
4424
4434
  value: x,
4425
4435
  label: i(`editor.annotationsPanel.trendType.options.${x}`)
4426
- })), C = (x, N = {}) => {
4427
- const V = d ?? u, E = new ra({
4436
+ })), f = (x, N = {}) => {
4437
+ const V = d ?? u, k = new aa({
4428
4438
  line: x,
4429
4439
  ...N,
4430
4440
  ...V !== void 0 && { layerId: V.id },
4431
4441
  label: i("editor.annotationsPanel.trendsAndAveragesSection.average")
4432
4442
  });
4433
- a.commands.dispatch(E);
4434
- }, P = (x) => C(x ? "trend" : "none", { method: v }), w = (x) => C(x ? "average" : "none", { group: m ?? h(s[0]?.value ?? "") }), b = (x) => {
4435
- const N = Mn.find((V) => V === x);
4436
- N !== void 0 && C("trend", { method: N });
4443
+ a.commands.dispatch(k);
4444
+ }, P = (x) => f(x ? "trend" : "none", { method: v }), w = (x) => f(x ? "average" : "none", { group: m ?? h(s[0]?.value ?? "") }), b = (x) => {
4445
+ const N = An.find((V) => V === x);
4446
+ N !== void 0 && f("trend", { method: N });
4437
4447
  }, T = (x) => {
4438
4448
  const N = x === null ? void 0 : h(x);
4439
- N !== void 0 && C("average", { group: N });
4449
+ N !== void 0 && f("average", { group: N });
4440
4450
  };
4441
4451
  return /* @__PURE__ */ n(D, {
4442
4452
  title: e ?? i("editor.annotationsPanel.trendsAndAveragesSection.title"),
4443
4453
  layout: t,
4444
- preview: r ?? /* @__PURE__ */ n(On, { size: "lg" }),
4454
+ preview: r ?? /* @__PURE__ */ n(In, { size: "lg" }),
4445
4455
  children: /* @__PURE__ */ p(F, { children: [
4446
- /* @__PURE__ */ n(f, {
4456
+ /* @__PURE__ */ n(C, {
4447
4457
  label: i("editor.annotationsPanel.trendsAndAveragesSection.trend"),
4448
- icon: /* @__PURE__ */ n(On, { size: "lg" }),
4458
+ icon: /* @__PURE__ */ n(In, { size: "lg" }),
4449
4459
  children: /* @__PURE__ */ n(c, {
4450
4460
  isChecked: d !== void 0,
4451
4461
  onChange: P
4452
4462
  })
4453
4463
  }),
4454
- d !== void 0 && /* @__PURE__ */ n(f, {
4464
+ d !== void 0 && /* @__PURE__ */ n(C, {
4455
4465
  label: i("editor.annotationsPanel.trendType.label"),
4456
4466
  children: /* @__PURE__ */ n(l, {
4457
4467
  value: v,
@@ -4460,15 +4470,15 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4460
4470
  placeholder: i("editor.annotationsPanel.trendType.placeholder")
4461
4471
  })
4462
4472
  }),
4463
- /* @__PURE__ */ n(f, {
4473
+ /* @__PURE__ */ n(C, {
4464
4474
  label: i("editor.annotationsPanel.trendsAndAveragesSection.average"),
4465
- icon: /* @__PURE__ */ n(_c, { size: "lg" }),
4475
+ icon: /* @__PURE__ */ n(Hc, { size: "lg" }),
4466
4476
  children: /* @__PURE__ */ n(c, {
4467
4477
  isChecked: u !== void 0,
4468
4478
  onChange: w
4469
4479
  })
4470
4480
  }),
4471
- u !== void 0 && s.length > 0 && /* @__PURE__ */ n(f, {
4481
+ u !== void 0 && s.length > 0 && /* @__PURE__ */ n(C, {
4472
4482
  label: i("editor.annotationsPanel.averageLineSeries.label"),
4473
4483
  children: /* @__PURE__ */ n(l, {
4474
4484
  value: m === void 0 ? null : String(m),
@@ -4480,49 +4490,49 @@ var ss = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: r, accessory
4480
4490
  })
4481
4491
  ] })
4482
4492
  });
4483
- }, Hc = (e) => {
4493
+ }, Fc = (e) => {
4484
4494
  const t = e?.transforms.find((r) => r.transformType === "filter")?.options.value;
4485
4495
  return t instanceof Date ? t.getTime() : t;
4486
4496
  };
4487
4497
  export {
4488
- d1 as AppearanceSection,
4489
- c1 as AxesPanel,
4490
- bn as AxisSection,
4491
- h1 as BarSection,
4492
- cl as Button,
4493
- u1 as CalloutsSection,
4494
- vs as CaptionSection,
4495
- l1 as EditableGraphRenderer,
4496
- xt as EditorPanel,
4497
- s1 as ElementsPanel,
4498
- m1 as GoalSection,
4499
- p1 as GraphOptionsSection,
4500
- g1 as GraphTypeSection,
4501
- v1 as GridSection,
4502
- C1 as HeadlineSection,
4503
- Bc as IntlProvider,
4504
- f1 as LegendSection,
4505
- b1 as LineSection,
4506
- ml as NumberField,
4507
- y1 as NumberFormatSection,
4508
- Ql as PANEL_ROOT_ATTRIBUTE,
4509
- S1 as PointSection,
4510
- w1 as PolarSection,
4511
- Cl as RadioGrid,
4512
- f as Row,
4498
+ m1 as AppearanceSection,
4499
+ u1 as AxesPanel,
4500
+ fn as AxisSection,
4501
+ p1 as BarSection,
4502
+ hl as Button,
4503
+ g1 as CalloutsSection,
4504
+ Cs as CaptionSection,
4505
+ d1 as EditableGraphRenderer,
4506
+ Tt as EditorPanel,
4507
+ h1 as ElementsPanel,
4508
+ v1 as GoalSection,
4509
+ f1 as GraphOptionsSection,
4510
+ C1 as GraphTypeSection,
4511
+ b1 as GridSection,
4512
+ y1 as HeadlineSection,
4513
+ Uc as IntlProvider,
4514
+ S1 as LegendSection,
4515
+ w1 as LineSection,
4516
+ gl as NumberField,
4517
+ x1 as NumberFormatSection,
4518
+ ns as PANEL_ROOT_ATTRIBUTE,
4519
+ T1 as PointSection,
4520
+ L1 as PolarSection,
4521
+ bl as RadioGrid,
4522
+ C as Row,
4513
4523
  D as Section,
4514
- Pl as Select,
4515
- Rl as Slider,
4516
- fs as SourceSection,
4517
- ys as SubtitleSection,
4518
- zl as Switch,
4519
- Gl as TextField,
4520
- ws as TextSizeSection,
4521
- xs as TitleSection,
4522
- Wl as ToggleGroup,
4523
- hs as ToggledSection,
4524
- x1 as TrendsAndAveragesSection,
4524
+ Al as Select,
4525
+ Hl as Slider,
4526
+ ys as SourceSection,
4527
+ ws as SubtitleSection,
4528
+ Gl as Switch,
4529
+ Ul as TextField,
4530
+ Ts as TextSizeSection,
4531
+ Ls as TitleSection,
4532
+ ql as ToggleGroup,
4533
+ ms as ToggledSection,
4534
+ P1 as TrendsAndAveragesSection,
4525
4535
  M as useControls,
4526
- Yl as usePanelExpansion,
4536
+ Ql as usePanelExpansion,
4527
4537
  O as usePanelGraph
4528
4538
  };