@graphysdk/react-renderer 1.9.0-beta.1794237678854 → 1.9.0-beta.1794240399587

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,26 +1,26 @@
1
- import { $ as Er, $n as Or, A as Jn, An as xc, At as R, Bt as Re, C as kc, Ct as bn, E as Tc, Et as Ac, F as Pc, Ft as Lc, G as Ic, Gn as ei, Gt as ue, Hn as Mc, I as Ec, J as Oc, K as Y, Kt as Rc, L as Nc, Ln as Dc, Lt as ye, Mt as _c, Nn as Fc, Nt as zc, O as Qn, Ot as Bc, Pt as Hc, Q as J, R as M, Rt as ti, S as Gc, St as $c, T as Vc, U as Wc, Vn as Uc, W as ni, Wt as nt, X as Kc, Xn as jc, Y as ya, Yn as F, Z as Xc, Zn as W, _ as rt, _n as Rr, _t as Sa, an as ri, at as qc, b as ai, bt as Ne, c as oi, ct as yn, d as Yc, dn as ii, dt as Sn, et as Nr, f as Zc, fn as Jc, g as li, gn as ve, gt as Qc, h as at, hn as si, ht as ci, i as Et, it as ed, j as Cn, jt as di, k as ui, kn as td, kt as hi, l as er, ln as nd, lt as rd, m as ad, mn as pi, mt as od, n as Se, nn as id, nt as ld, o as sd, ot as gi, p as mi, q as ae, qn as ee, qt as cd, r as Q, rt as dd, st as Dr, t as ud, tn as Ca, tt as hd, u as pd, un as gd, ut as vi, v as md, vn as dt, vt as vd, x as fd, xt as bd, y as yd, yt as Pe, zt as tr } from "./history-chords-C9ZSLbBz.js";
2
- import { ARROW_DEFAULTS as fi, ARROW_STICKER_DECLARATIONS as Sd, ARROW_STROKE_WIDTHS_PX as Bn, AddAnnotationCommand as we, AddHighlightCommand as Cd, COMBO_TYPES as wa, CONSTANT_VARIABLES as _r, DASH_PRESETS as wd, DEFAULT_BAR_CORNER_RADII as xd, DEFAULT_GEOM_COLOR as kd, DEFAULT_POINT_SIZE_PX as bi, DEFAULT_STROKE_WIDTH_PX as Td, DIFFERENCE_ARROW_DEFAULTS as yi, DIFFERENCE_ARROW_SIZE_DECLARATIONS as xa, InternalError as Ad, MAX_BAR_WIDTH_FRACTION as Pd, MIN_BAR_WIDTH_FRACTION as Ld, MoveAnnotationCommand as Id, PANEL_FRACTION_BOUNDS as Si, POSITION_VARIABLES as je, RESTING_HOVER_STATE as Ot, RemoveAnnotationCommand as ze, RemoveHighlightCommand as Md, SHAPE_DEFAULTS as Ci, SequenceCommand as st, SetAxisLabelCommand as wi, SetAxisPositionCommand as xi, SetAxisTickModeCommand as ki, SetAxisTicksVisibilityCommand as Ed, SetAxisVisibilityCommand as nr, SetBarCornerRadiusCommand as Od, SetBarWidthCommand as Ti, SetContentCaptionCommand as Ai, SetContentSourceCommand as Rd, SetContentSubtitleCommand as Pi, SetContentTitleCommand as Li, SetDataLabelsFormatCommand as Ii, SetDifferenceArrowStyleCommand as Nd, SetGraphTypeCommand as Fr, SetGridLineStyleCommand as Mi, SetGridVisibilityCommand as rr, SetHeadlineCompareWithCommand as Dd, SetHeadlinePositionCommand as _d, SetHeadlineShowCommand as ka, SetHeadlineSizeCommand as Fd, SetHighlightDimStyleCommand as zd, SetLayerYScaleTypeCommand as Bd, SetLegendAlignCommand as Hd, SetLegendDisplayCommand as Gd, SetLegendPlacementCommand as $d, SetLegendPositionCommand as ar, SetLineCurveCommand as Ei, SetLineMissingValuesCommand as Oi, SetLineStyleCommand as Fe, SetMappingCommand as Vd, SetNumberFormatAbbreviationCommand as Wd, SetNumberFormatDecimalsCommand as Ta, SetObservationsColorCommand as Ud, SetPointSizeCommand as wn, SetPointSymbolCommand as zr, SetPolarInnerRadiusCommand as Kd, SetPolarStartAngleCommand as jd, SetRuleLabelCommand as Xd, SetRuleValueCommand as qd, SetScaleDomainCommand as Pt, SetScaleRangeCommand as Ri, SetScaleTransformCommand as Ni, SetStatLineCommand as Yd, SetStyleRuleCommand as Xe, TEXT_ANNOTATION_DEFAULTS as Di, TEXT_ANNOTATION_FADE_ALPHA as Zd, ToggleCategoryLabelsCommand as _i, ToggleContentVisibilityCommand as Qe, ToggleDataLabelsCommand as Fi, ToggleGoalLineCommand as Jd, ToggleLinePointsCommand as Br, ToggleStackTotalsCommand as zi, UpdateAnnotationCommand as fe, alignUnitFractions as Qd, areAnchorsEqual as Hr, areEditTargetsEqual as Gr, areEndpointsComparable as eu, buildColormapRange as tu, buildDivergingRange as Aa, buildLayerStyleAddress as pt, buildObservationPredicate as nu, buildObservationsTarget as $e, buildObservationsTargetAtValue as Bi, buildPointSymbolInBox as ru, canAnchorDirectLabels as au, canBecomeCombo as ou, canBecomeHeatmap as iu, clampAnnotationTranslation as lu, combineKindStyleDeclarations as Pa, computeArrow as Hi, createObservationAnchorBuilder as su, createObservationAnchorParser as cu, createStyleResolver as du, createStyleRuleMatcher as uu, createValueFormatter as $r, createXValueReader as hu, filterLayersByGeoms as or, findAnnotation as pu, findAverageLineLayer as gu, findAxisGuide as Gi, findCompanionLayers as $i, findGoalLineLayer as mu, findHighlightsAtObservation as vu, findHostLayer as xn, findKindStyleDeclarations as rn, findLayerByGeom as Vi, findLayerById as q, findObservationAttachment as fu, findPointerRegion as bu, findStyleRule as qe, findTrendLineLayer as yu, formatDifferenceLabel as Su, getBoundingRect as ir, getGroupVariables as Vr, getScaledAesthetic as Cu, getXBand as wu, getYBand as xu, hasMainAxisBand as ku, hasMultipleGroups as kn, inferDefaultDifferenceArrowEndpoints as Tu, inferDifferenceArrowEndpoints as Au, isComboGraphType as be, isCompanionLayer as Wi, isGeomStyleRule as Pu, isGeometricSymbol as Tt, isImageSymbol as lr, isLayerSpecOf as ft, isObservationAttachmentKind as Lu, isSafeUrl as Iu, isZeroAnchoredAxis as Ui, measureObservationsBoxes as Ki, polarToUnit as Mu, projectAnchorToPanel as sr, readBroadestObservationsScope as Eu, readColorChoices as ji, readColorPart as Ou, readColormapColor as Ru, readComboLineLayerId as Nu, readCompanionRowsAtScopeKey as Du, readConstantValue as _u, readDivergingColor as La, readEditTargetKey as Rt, readGeomColor as Fu, readGraphType as Tn, readHighlightDimStyle as zu, readMainAxis as Bu, readMappableAesthetics as Hu, readMappedVariable as Gu, readObservationIndex as bt, readObservationsColor as $u, readObservationsColorPart as Vu, readObservationsColorRoute as An, readReachableLevels as Wu, readRowScopeKey as Uu, readRowsAtScopeKey as Ku, readScopeXVariable as ju, readStyleCoord as xe, readStyleRulesBeneath as Xu, readVariableName as Oe, resolveArrowAnnotationStyle as Wr, resolveBarBandFraction as Xi, resolveComparisonBasis as qu, resolveDifferenceArrowAnnotationStyle as Yu, resolveEditOutlineStyle as Zu, resolveLayerAxisValueFormat as Ju, resolveObservationPoint as qi, resolveObservationsTarget as et, stepDifferenceArrowEndpoint as Qu, toDashPreset as tt, toPaintColor as an, toPanelCursor as Nt, toStrokeDasharray as Yi } from "@graphysdk/viz-engine";
3
- import { Fragment as Zi, createContext as Je, memo as Ji, useCallback as ce, useContext as Ce, useEffect as B, useId as Be, useLayoutEffect as Ye, useMemo as _, useRef as X, useState as Z, useSyncExternalStore as eh } from "react";
1
+ import { $ as Or, $n as Rr, A as Jn, An as xc, At as R, Bt as Re, C as kc, Ct as bn, E as Tc, Et as Ac, F as Pc, Ft as Lc, G as Ic, Gn as ti, Gt as ue, Hn as Mc, I as Ec, J as Oc, K as Y, Kt as Rc, L as Nc, Ln as Dc, Lt as ye, Mt as _c, Nn as Fc, Nt as zc, O as Qn, Ot as Bc, Pt as Hc, Q as J, R as M, Rt as ni, S as Gc, St as $c, T as Vc, U as Wc, Vn as Uc, W as ri, Wt as nt, X as Kc, Xn as jc, Y as Ca, Yn as F, Z as Xc, Zn as W, _ as rt, _n as Nr, _t as wa, an as ai, at as qc, b as oi, bt as Ne, c as ii, ct as yn, d as Yc, dn as li, dt as Sn, et as Dr, f as Zc, fn as Jc, g as si, gn as ve, gt as Qc, h as at, hn as ci, ht as di, i as Et, it as ed, j as Cn, jt as ui, k as hi, kn as td, kt as pi, l as er, ln as nd, lt as rd, m as ad, mn as gi, mt as od, n as Se, nn as id, nt as ld, o as sd, ot as mi, p as vi, q as ae, qn as ee, qt as cd, r as Q, rt as dd, st as _r, t as ud, tn as xa, tt as hd, u as pd, un as gd, ut as fi, v as md, vn as ut, vt as vd, x as fd, xt as bd, y as yd, yt as Pe, zt as tr } from "./history-chords-JeHduCIv.js";
2
+ import { ARROW_DEFAULTS as bi, ARROW_STICKER_DECLARATIONS as Sd, ARROW_STROKE_WIDTHS_PX as Bn, AddAnnotationCommand as we, AddHighlightCommand as Cd, COMBO_TYPES as ka, CONSTANT_VARIABLES as Fr, DASH_PRESETS as wd, DEFAULT_BAR_CORNER_RADII as xd, DEFAULT_GEOM_COLOR as kd, DEFAULT_POINT_SIZE_PX as yi, DEFAULT_STROKE_WIDTH_PX as Td, DIFFERENCE_ARROW_DEFAULTS as Si, DIFFERENCE_ARROW_SIZE_DECLARATIONS as Ta, InternalError as Ad, MAX_BAR_WIDTH_FRACTION as Pd, MIN_BAR_WIDTH_FRACTION as Ld, MoveAnnotationCommand as Id, PANEL_FRACTION_BOUNDS as Ci, POSITION_VARIABLES as je, RESTING_HOVER_STATE as Ot, RemoveAnnotationCommand as ze, RemoveHighlightCommand as Md, SHAPE_DEFAULTS as wi, SequenceCommand as ct, SetAxisLabelCommand as xi, SetAxisPositionCommand as ki, SetAxisTickModeCommand as Ti, SetAxisTicksVisibilityCommand as Ed, SetAxisVisibilityCommand as nr, SetBarCornerRadiusCommand as Od, SetBarWidthCommand as Ai, SetContentCaptionCommand as Pi, SetContentSourceCommand as Rd, SetContentSubtitleCommand as Li, SetContentTitleCommand as Ii, SetDataLabelsFormatCommand as Mi, SetDifferenceArrowStyleCommand as Nd, SetGraphTypeCommand as zr, SetGridLineStyleCommand as Ei, SetGridVisibilityCommand as rr, SetHeadlineCompareWithCommand as Dd, SetHeadlinePositionCommand as _d, SetHeadlineShowCommand as Aa, SetHeadlineSizeCommand as Fd, SetHighlightDimStyleCommand as zd, SetLayerYScaleTypeCommand as Bd, SetLegendAlignCommand as Hd, SetLegendDisplayCommand as Gd, SetLegendPlacementCommand as $d, SetLegendPositionCommand as ar, SetLineCurveCommand as Oi, SetLineMissingValuesCommand as Ri, SetLineStyleCommand as Fe, SetMappingCommand as Vd, SetNumberFormatAbbreviationCommand as Wd, SetNumberFormatDecimalsCommand as Pa, SetObservationsColorCommand as Ud, SetPointSizeCommand as wn, SetPointSymbolCommand as Br, SetPolarInnerRadiusCommand as Kd, SetPolarStartAngleCommand as jd, SetRuleLabelCommand as Xd, SetRuleValueCommand as qd, SetScaleDomainCommand as Pt, SetScaleRangeCommand as Ni, SetScaleTransformCommand as Di, SetStatLineCommand as Yd, SetStyleRuleCommand as Xe, TEXT_ANNOTATION_DEFAULTS as _i, TEXT_ANNOTATION_FADE_ALPHA as Zd, ToggleCategoryLabelsCommand as Fi, ToggleContentVisibilityCommand as Qe, ToggleDataLabelsCommand as zi, ToggleGoalLineCommand as Jd, ToggleLinePointsCommand as Hr, ToggleStackTotalsCommand as Bi, UpdateAnnotationCommand as fe, alignUnitFractions as Qd, areAnchorsEqual as Gr, areEditTargetsEqual as $r, areEndpointsComparable as eu, buildColormapRange as tu, buildDivergingRange as La, buildLayerStyleAddress as gt, buildObservationPredicate as nu, buildObservationsTarget as $e, buildObservationsTargetAtValue as Hi, buildPointSymbolInBox as ru, canAnchorDirectLabels as au, canBecomeCombo as ou, canBecomeHeatmap as iu, clampAnnotationTranslation as lu, combineKindStyleDeclarations as Ia, computeArrow as Gi, createObservationAnchorBuilder as su, createObservationAnchorParser as cu, createStyleResolver as du, createStyleRuleMatcher as uu, createValueFormatter as Vr, createXValueReader as hu, filterLayersByGeoms as or, findAnnotation as pu, findAverageLineLayer as gu, findAxisGuide as $i, findCompanionLayers as Vi, findGoalLineLayer as mu, findHighlightsAtObservation as vu, findHostLayer as xn, findKindStyleDeclarations as rn, findLayerByGeom as Wi, findLayerById as q, findObservationAttachment as fu, findPointerRegion as bu, findStyleRule as qe, findTrendLineLayer as yu, formatDifferenceLabel as Su, getBoundingRect as ir, getGroupVariables as Wr, getScaledAesthetic as Cu, getXBand as wu, getYBand as xu, hasMainAxisBand as ku, hasMultipleGroups as kn, inferDefaultDifferenceArrowEndpoints as Tu, inferDifferenceArrowEndpoints as Au, isComboGraphType as be, isCompanionLayer as Ui, isGeomStyleRule as Pu, isGeometricSymbol as Tt, isImageSymbol as lr, isLayerSpecOf as bt, isObservationAttachmentKind as Lu, isSafeUrl as Iu, isZeroAnchoredAxis as Ki, measureObservationsBoxes as ji, polarToUnit as Mu, projectAnchorToPanel as sr, readBroadestObservationsScope as Eu, readColorChoices as Xi, readColorPart as Ou, readColormapColor as Ru, readComboLineLayerId as Nu, readCompanionRowsAtScopeKey as Du, readConstantValue as _u, readDivergingColor as Ma, readEditTargetKey as Rt, readGeomColor as Fu, readGraphType as Tn, readHighlightDimStyle as zu, readMainAxis as Bu, readMappableAesthetics as Hu, readMappedVariable as Gu, readObservationIndex as yt, readObservationsColor as $u, readObservationsColorPart as Vu, readObservationsColorRoute as An, readReachableLevels as Wu, readRowScopeKey as Uu, readRowsAtScopeKey as Ku, readScopeXVariable as ju, readStyleCoord as xe, readStyleRulesBeneath as Xu, readVariableName as Oe, resolveArrowAnnotationStyle as Ur, resolveBarBandFraction as qi, resolveComparisonBasis as qu, resolveDifferenceArrowAnnotationStyle as Yu, resolveEditOutlineStyle as Zu, resolveLayerAxisValueFormat as Ju, resolveObservationPoint as Yi, resolveObservationsTarget as et, stepDifferenceArrowEndpoint as Qu, toDashPreset as tt, toPaintColor as an, toPanelCursor as Nt, toStrokeDasharray as Zi } from "@graphysdk/viz-engine";
3
+ import { Fragment as Ji, createContext as Je, memo as Qi, useCallback as ce, useContext as Ce, useEffect as B, useId as Be, useLayoutEffect as Ye, useMemo as _, useRef as X, useState as Z, useSyncExternalStore as eh } from "react";
4
4
  import { Fragment as K, jsx as a, jsxs as v } from "react/jsx-runtime";
5
5
  import { motion as th } from "motion/react";
6
6
  import { useShallow as Le } from "zustand/react/shallow";
7
7
  import { assignInlineVars as De } from "@vanilla-extract/dynamic";
8
8
  import Ze from "clsx";
9
- import { clamp as gt, isEqual as nh } from "lodash-es";
9
+ import { clamp as mt, isEqual as nh } from "lodash-es";
10
10
  import { autoUpdate as rh, flip as ah, offset as oh, shift as ih, useFloating as lh } from "@floating-ui/react-dom";
11
- import { createPortal as Ur } from "react-dom";
11
+ import { createPortal as Kr } from "react-dom";
12
12
  import { Tooltip as Te } from "@base-ui/react/tooltip";
13
13
  import { Popover as le } from "@base-ui/react/popover";
14
14
  import { HexColorInput as sh, HexColorPicker as ch } from "react-colorful";
15
- import { NumberField as Ia } from "@base-ui/react/number-field";
16
- import { Radio as Qi } from "@base-ui/react/radio";
17
- import { RadioGroup as el } from "@base-ui/react/radio-group";
15
+ import { NumberField as Ea } from "@base-ui/react/number-field";
16
+ import { Radio as el } from "@base-ui/react/radio";
17
+ import { RadioGroup as tl } from "@base-ui/react/radio-group";
18
18
  import { Select as Ee } from "@base-ui/react/select";
19
- import { Slider as Ct } from "@base-ui/react/slider";
20
- import { Switch as Ma } from "@base-ui/react/switch";
19
+ import { Slider as wt } from "@base-ui/react/slider";
20
+ import { Switch as Oa } from "@base-ui/react/switch";
21
21
  import { Input as dh } from "@base-ui/react/input";
22
- import { DirectionProvider as Kr } from "@base-ui/react/direction-provider";
23
- import { Extension as tl } from "@tiptap/core";
22
+ import { DirectionProvider as jr } from "@base-ui/react/direction-provider";
23
+ import { Extension as nl } from "@tiptap/core";
24
24
  import { Bold as uh } from "@tiptap/extension-bold";
25
25
  import { Document as on } from "@tiptap/extension-document";
26
26
  import { HardBreak as hh } from "@tiptap/extension-hard-break";
@@ -29,17 +29,17 @@ import { Italic as gh } from "@tiptap/extension-italic";
29
29
  import { Link as mh } from "@tiptap/extension-link";
30
30
  import { Text as vh } from "@tiptap/extension-text";
31
31
  import { TextAlign as fh } from "@tiptap/extension-text-align";
32
- import { Color as bh, FontFamily as nl, TextStyle as yh } from "@tiptap/extension-text-style";
32
+ import { Color as bh, FontFamily as rl, TextStyle as yh } from "@tiptap/extension-text-style";
33
33
  import { Underline as Sh } from "@tiptap/extension-underline";
34
- import { Placeholder as jr, UndoRedo as Ch } from "@tiptap/extensions";
35
- import { Paragraph as rl } from "@tiptap/extension-paragraph";
36
- import { EditorContent as al, useEditor as wh, useEditorState as xh } from "@tiptap/react";
34
+ import { Placeholder as Xr, UndoRedo as Ch } from "@tiptap/extensions";
35
+ import { Paragraph as al } from "@tiptap/extension-paragraph";
36
+ import { EditorContent as ol, useEditor as wh, useEditorState as xh } from "@tiptap/react";
37
37
  import { Toolbar as Ve } from "@base-ui/react/toolbar";
38
38
  import { Menu as pe } from "@base-ui/react/menu";
39
39
  import { Toggle as kh } from "@base-ui/react/toggle";
40
40
  import { Accordion as At } from "@base-ui/react/accordion";
41
41
  import { Separator as Th } from "@base-ui/react/separator";
42
- import './editable.css';var ol = (e, t) => {
42
+ import './editable.css';var il = (e, t) => {
43
43
  if (e.scope !== "observation") return null;
44
44
  const n = q(t.layers, e.layerId);
45
45
  if (n === void 0) return null;
@@ -60,7 +60,7 @@ import './editable.css';var ol = (e, t) => {
60
60
  layers: n.layers,
61
61
  config: n.config
62
62
  })));
63
- return _(() => ol(e, t), [e, t]);
63
+ return _(() => il(e, t), [e, t]);
64
64
  }, Ph = (e) => /* @__PURE__ */ a(M, {
65
65
  viewBox: "0 0 18 18",
66
66
  ...e,
@@ -124,7 +124,7 @@ import './editable.css';var ol = (e, t) => {
124
124
  strokeLinejoin: "round",
125
125
  children: /* @__PURE__ */ a("path", { d: "m6 9 6 6 6-6" })
126
126
  })
127
- }), il = Je(null), ll = ({ labelId: e, controlId: t, children: n }) => {
127
+ }), ll = Je(null), sl = ({ labelId: e, controlId: t, children: n }) => {
128
128
  const r = _(() => {
129
129
  let o = null;
130
130
  return {
@@ -133,18 +133,18 @@ import './editable.css';var ol = (e, t) => {
133
133
  claimControlId: (i) => (o ??= i, o === i)
134
134
  };
135
135
  }, [e, t]);
136
- return /* @__PURE__ */ a(il.Provider, {
136
+ return /* @__PURE__ */ a(ll.Provider, {
137
137
  value: r,
138
138
  children: n
139
139
  });
140
140
  }, We = ({ id: e, ariaLabel: t, ariaLabelledBy: n }, r = !0) => {
141
- const o = Ce(il), i = Be(), [l] = Z(() => r ? o?.claimControlId(i) ?? !1 : !1), s = e ?? (l ? o?.controlId : void 0), c = n ?? (t === void 0 ? o?.labelId : void 0);
141
+ const o = Ce(ll), i = Be(), [l] = Z(() => r ? o?.claimControlId(i) ?? !1 : !1), s = e ?? (l ? o?.controlId : void 0), c = n ?? (t === void 0 ? o?.labelId : void 0);
142
142
  return {
143
143
  ...s !== void 0 && { id: s },
144
144
  ...t !== void 0 && { "aria-label": t },
145
145
  ...c !== void 0 && { "aria-labelledby": c }
146
146
  };
147
- }, _e = "_18ja6qr0", Xr = ({ children: e }) => {
147
+ }, _e = "_18ja6qr0", qr = ({ children: e }) => {
148
148
  const { themeValues: t } = bn();
149
149
  return /* @__PURE__ */ a(Ne, {
150
150
  style: _(() => De({
@@ -154,11 +154,11 @@ import './editable.css';var ol = (e, t) => {
154
154
  children: e
155
155
  });
156
156
  };
157
- var sl = "srewh00", Rh = "srewh01", Nh = {
157
+ var cl = "srewh00", Rh = "srewh01", Nh = {
158
158
  pointer: null,
159
159
  focus: null,
160
160
  last: "pointer"
161
- }, cl = Je({
161
+ }, dl = Je({
162
162
  hovered: !1,
163
163
  dismissed: !1,
164
164
  reachedTooltipId: null,
@@ -201,13 +201,13 @@ var sl = "srewh00", Rh = "srewh01", Nh = {
201
201
  m.pointerType !== "touch" && (r(!0), i(!1));
202
202
  },
203
203
  onPointerLeave: () => r(!1),
204
- children: /* @__PURE__ */ a(cl.Provider, {
204
+ children: /* @__PURE__ */ a(dl.Provider, {
205
205
  value: p,
206
206
  children: t
207
207
  })
208
208
  });
209
- }, mt = ({ label: e, checked: t = !1, side: n, delay: r, nameTrigger: o = !0, children: i }) => {
210
- const { hovered: l, dismissed: s, reachedTooltipId: c, reach: d, release: u, dismiss: h } = Ce(cl), p = Be(), [g, m] = Z(!1), f = l ? !s && (c === p || t && c === null) : g;
209
+ }, vt = ({ label: e, checked: t = !1, side: n, delay: r, nameTrigger: o = !0, children: i }) => {
210
+ const { hovered: l, dismissed: s, reachedTooltipId: c, reach: d, release: u, dismiss: h } = Ce(dl), p = Be(), [g, m] = Z(!1), f = l ? !s && (c === p || t && c === null) : g;
211
211
  B(() => () => {
212
212
  u(p, "pointer"), u(p, "focus");
213
213
  }, [p, u]);
@@ -229,12 +229,12 @@ var sl = "srewh00", Rh = "srewh01", Nh = {
229
229
  }), /* @__PURE__ */ a(Te.Portal, {
230
230
  container: Pe(),
231
231
  className: _e,
232
- children: /* @__PURE__ */ a(Xr, { children: /* @__PURE__ */ a(Te.Positioner, {
232
+ children: /* @__PURE__ */ a(qr, { children: /* @__PURE__ */ a(Te.Positioner, {
233
233
  side: n,
234
234
  sideOffset: 6,
235
235
  className: Rh,
236
236
  children: /* @__PURE__ */ a(Te.Popup, {
237
- className: sl,
237
+ className: cl,
238
238
  children: e
239
239
  })
240
240
  }) })
@@ -275,13 +275,13 @@ var zh = {
275
275
  })
276
276
  ]
277
277
  });
278
- return c !== void 0 ? /* @__PURE__ */ a(mt, {
278
+ return c !== void 0 ? /* @__PURE__ */ a(vt, {
279
279
  label: c,
280
280
  side: l,
281
281
  delay: s,
282
282
  nameTrigger: !1,
283
283
  children: y
284
- }) : r === "icon" && h !== void 0 && (l !== void 0 || s !== void 0) ? /* @__PURE__ */ a(mt, {
284
+ }) : r === "icon" && h !== void 0 && (l !== void 0 || s !== void 0) ? /* @__PURE__ */ a(vt, {
285
285
  label: h,
286
286
  side: l,
287
287
  delay: s,
@@ -301,7 +301,7 @@ var zh = {
301
301
  focus: "color-mix(in srgb, transparent, var(--graphy-editor-text, var(--graphy-editor-default-text)) 55.00000000000001%)",
302
302
  focusWidth: "2px",
303
303
  shadow: "var(--graphy-editor-default-shadow)"
304
- }, Gh = "linear-gradient(to top right, transparent calc(50% - 1px), var(--graphy-alert) calc(50% - 1px), var(--graphy-alert) calc(50% + 1px), transparent calc(50% + 1px))", dl = "_14ty2ng0", Ea = "_14ty2ng1", $h = "_14ty2ng2", Vh = "_14ty2ng3", ul = "_14ty2ng4", Wh = "_14ty2ng5", Uh = "_14ty2ng6", hl = "transparent", pl = (e) => e === "transparent" ? {
304
+ }, Gh = "linear-gradient(to top right, transparent calc(50% - 1px), var(--graphy-alert) calc(50% - 1px), var(--graphy-alert) calc(50% + 1px), transparent calc(50% + 1px))", ul = "_14ty2ng0", Ra = "_14ty2ng1", $h = "_14ty2ng2", Vh = "_14ty2ng3", hl = "_14ty2ng4", Wh = "_14ty2ng5", Uh = "_14ty2ng6", pl = "transparent", gl = (e) => e === "transparent" ? {
305
305
  background: Gh,
306
306
  border: `1px solid ${ve.border100}`
307
307
  } : {
@@ -316,17 +316,17 @@ var zh = {
316
316
  type: "button",
317
317
  "aria-label": m === "transparent" ? u("graph.colorDropdown.transparent") : m,
318
318
  className: Vh,
319
- "data-active": gl(m, n),
319
+ "data-active": ml(m, n),
320
320
  disabled: l,
321
321
  onMouseDown: (f) => f.preventDefault(),
322
322
  onClick: () => r(m),
323
323
  children: /* @__PURE__ */ a("span", {
324
- className: ul,
325
- style: pl(m)
324
+ className: hl,
325
+ style: gl(m)
326
326
  })
327
327
  }, m);
328
328
  return /* @__PURE__ */ v("div", {
329
- className: dl,
329
+ className: ul,
330
330
  children: [e !== void 0 && /* @__PURE__ */ a("div", {
331
331
  className: "_14ty2ng1",
332
332
  children: e
@@ -346,24 +346,24 @@ var zh = {
346
346
  })]
347
347
  })]
348
348
  });
349
- }, gl = (e, t) => t !== null && e.toLowerCase() === t.toLowerCase(), jh = "data-graphy-chart-chrome", Xh = "data-graphy-chart-menu", qh = { [Xh]: "" }, Pn = (e) => ({ [jh]: e }), Lt = (e, t) => e instanceof Element && e.closest(`[data-graphy-chart-chrome="${CSS.escape(t)}"]`) !== null, ln = (e) => e instanceof Element && e.closest("[data-graphy-chart-menu]") !== null, dr = (e) => e instanceof Element && e.closest("[data-graphy-chart-chrome]") !== null, ut = (e, t, n) => e instanceof Node && (t.contains(e) || Lt(e, n)), Yh = "cml7ha0", ml = Je(null), Zh = ({ children: e }) => {
349
+ }, ml = (e, t) => t !== null && e.toLowerCase() === t.toLowerCase(), jh = "data-graphy-chart-chrome", Xh = "data-graphy-chart-menu", qh = { [Xh]: "" }, Pn = (e) => ({ [jh]: e }), Lt = (e, t) => e instanceof Element && e.closest(`[data-graphy-chart-chrome="${CSS.escape(t)}"]`) !== null, ln = (e) => e instanceof Element && e.closest("[data-graphy-chart-menu]") !== null, dr = (e) => e instanceof Element && e.closest("[data-graphy-chart-chrome]") !== null, ht = (e, t, n) => e instanceof Node && (t.contains(e) || Lt(e, n)), Yh = "cml7ha0", vl = Je(null), Zh = ({ children: e }) => {
350
350
  const { chartId: t } = W(), [n] = Z(Pe), [r, o] = Z(null);
351
- return n === null ? null : /* @__PURE__ */ v(K, { children: [Ur(/* @__PURE__ */ a("div", {
351
+ return n === null ? null : /* @__PURE__ */ v(K, { children: [Kr(/* @__PURE__ */ a("div", {
352
352
  ref: o,
353
353
  className: Yh,
354
354
  ...Pn(t)
355
- }), n), /* @__PURE__ */ a(ml.Provider, {
355
+ }), n), /* @__PURE__ */ a(vl.Provider, {
356
356
  value: r,
357
357
  children: e
358
358
  })] });
359
- }, Ln = () => Ce(ml), Jh = "_178jeit0", Qh = "_178jeit1 _14ty2ng3", ep = "_178jeit2 _14ty2ng4", tp = "_178jeit3", np = "_178jeit4", rp = "_178jeit5", ap = "_178jeit6", op = "_178jeit7", ip = {
359
+ }, Ln = () => Ce(vl), Jh = "_178jeit0", Qh = "_178jeit1 _14ty2ng3", ep = "_178jeit2 _14ty2ng4", tp = "_178jeit3", np = "_178jeit4", rp = "_178jeit5", ap = "_178jeit6", op = "_178jeit7", ip = {
360
360
  side: "flip",
361
361
  align: "shift",
362
362
  fallbackAxisSide: "end"
363
363
  }, lp = ({ value: e, onChange: t, onCommit: n, popupAttributes: r, variant: o = "default" }) => {
364
364
  const i = R(), l = Ln(), [s, c] = Z(!1), d = (p) => {
365
365
  c(p), p || n?.();
366
- }, u = e !== null && Jc(e) ? e : "#000000", h = ii(u) ? u.toUpperCase() : "#000000";
366
+ }, u = e !== null && Jc(e) ? e : "#000000", h = li(u) ? u.toUpperCase() : "#000000";
367
367
  return /* @__PURE__ */ v(le.Root, {
368
368
  open: s,
369
369
  onOpenChange: d,
@@ -373,17 +373,17 @@ var zh = {
373
373
  "aria-label": i("graph.colorDropdown.pickCustom"),
374
374
  children: /* @__PURE__ */ a("span", { className: ep })
375
375
  }) : /* @__PURE__ */ v("div", {
376
- className: dl,
376
+ className: ul,
377
377
  children: [/* @__PURE__ */ a("div", {
378
- className: Ea,
378
+ className: Ra,
379
379
  children: i("graph.colorDropdown.custom")
380
380
  }), /* @__PURE__ */ v(le.Trigger, {
381
381
  className: tp,
382
382
  onMouseDown: (p) => p.preventDefault(),
383
383
  "aria-label": i("graph.colorDropdown.pickCustom"),
384
384
  children: [/* @__PURE__ */ a("span", {
385
- className: ul,
386
- style: pl(u)
385
+ className: hl,
386
+ style: gl(u)
387
387
  }), /* @__PURE__ */ a("span", {
388
388
  className: np,
389
389
  children: h
@@ -406,7 +406,7 @@ var zh = {
406
406
  ...r,
407
407
  children: [
408
408
  /* @__PURE__ */ a("div", {
409
- className: Ea,
409
+ className: Ra,
410
410
  children: i("graph.colorDropdown.pickColor")
411
411
  }),
412
412
  /* @__PURE__ */ a(ch, {
@@ -426,7 +426,7 @@ var zh = {
426
426
  }) })
427
427
  })]
428
428
  });
429
- }, Oa = (e) => /* @__PURE__ */ a(M, {
429
+ }, Na = (e) => /* @__PURE__ */ a(M, {
430
430
  ...e,
431
431
  children: /* @__PURE__ */ v("g", {
432
432
  stroke: "currentColor",
@@ -452,12 +452,12 @@ var zh = {
452
452
  u.target.value = "", h !== void 0 && n(h);
453
453
  }
454
454
  });
455
- return c ? /* @__PURE__ */ a(mt, {
455
+ return c ? /* @__PURE__ */ a(vt, {
456
456
  label: e,
457
457
  children: /* @__PURE__ */ v("label", {
458
458
  htmlFor: s,
459
459
  className: cp,
460
- children: [/* @__PURE__ */ a(Oa, { size: "xs" }), d]
460
+ children: [/* @__PURE__ */ a(Na, { size: "xs" }), d]
461
461
  })
462
462
  }) : /* @__PURE__ */ v("label", {
463
463
  htmlFor: s,
@@ -465,7 +465,7 @@ var zh = {
465
465
  children: [
466
466
  /* @__PURE__ */ a("span", {
467
467
  className: _h,
468
- children: /* @__PURE__ */ a(Oa, {})
468
+ children: /* @__PURE__ */ a(Na, {})
469
469
  }),
470
470
  /* @__PURE__ */ a("span", {
471
471
  className: Fh,
@@ -478,7 +478,7 @@ var zh = {
478
478
  const e = Ce(In);
479
479
  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>.");
480
480
  return e;
481
- }, vl = ({ children: e, onKeyDown: t, ...n }) => {
481
+ }, fl = ({ children: e, onKeyDown: t, ...n }) => {
482
482
  const r = Ce(In);
483
483
  return /* @__PURE__ */ a("div", {
484
484
  onKeyDown: (i) => {
@@ -489,7 +489,7 @@ var zh = {
489
489
  ...n,
490
490
  children: e
491
491
  });
492
- }, fl = "keyboard", Mn = (e) => {
492
+ }, bl = "keyboard", Mn = (e) => {
493
493
  const t = X(!1), n = X(!1), r = () => {
494
494
  t.current = !1, n.current && (n.current = !1, e?.());
495
495
  };
@@ -525,18 +525,18 @@ var mp = ({ value: e, onChange: t, onCommit: n, min: r, max: o, step: i, placeho
525
525
  ariaLabel: h,
526
526
  ariaLabelledBy: p
527
527
  }), { commitUnlessHeldKey: f, gestureHandlers: y } = Mn(n);
528
- return /* @__PURE__ */ a(Ia.Root, {
528
+ return /* @__PURE__ */ a(Ea.Root, {
529
529
  className: hp,
530
530
  value: e,
531
531
  onValueChange: (k) => t(k),
532
532
  onValueCommitted: (k, C) => {
533
- f(C.reason === fl);
533
+ f(C.reason === bl);
534
534
  },
535
535
  min: r,
536
536
  max: o,
537
537
  step: i,
538
538
  disabled: d,
539
- children: /* @__PURE__ */ v(vl, {
539
+ children: /* @__PURE__ */ v(fl, {
540
540
  className: pp,
541
541
  "data-error": u === !0,
542
542
  "data-disabled": d === !0 ? "" : void 0,
@@ -545,7 +545,7 @@ var mp = ({ value: e, onChange: t, onCommit: n, min: r, max: o, step: i, placeho
545
545
  className: "eh8dvc3",
546
546
  children: s
547
547
  }),
548
- /* @__PURE__ */ a(Ia.Input, {
548
+ /* @__PURE__ */ a(Ea.Input, {
549
549
  className: gp,
550
550
  placeholder: l,
551
551
  ...y,
@@ -573,7 +573,7 @@ var bp = 6, yp = ({ options: e, value: t, onChange: n, onCommit: r, columns: o,
573
573
  ariaLabel: s,
574
574
  ariaLabelledBy: c
575
575
  }), h = i === "tile", p = i === "swatch", g = i === "icon", m = i === "track", f = i === "chip", { commitAfterChange: y, gestureHandlers: k } = Mn(r);
576
- return /* @__PURE__ */ a(el, {
576
+ return /* @__PURE__ */ a(tl, {
577
577
  className: Ze(vp, Sp(o ?? e.length), g && "_1b7s5f9", m && "_1b7s5fb", f && "_1b7s5fd"),
578
578
  value: t,
579
579
  onValueChange: (C) => {
@@ -583,7 +583,7 @@ var bp = 6, yp = ({ options: e, value: t, onChange: n, onCommit: r, columns: o,
583
583
  disabled: l,
584
584
  ...u,
585
585
  children: e.map((C) => {
586
- const w = /* @__PURE__ */ v(Qi.Root, {
586
+ const w = /* @__PURE__ */ v(el.Root, {
587
587
  value: C.value,
588
588
  disabled: C.disabled,
589
589
  className: Ze(fp, p && "_1b7s5f8", g && "_1b7s5fa", m && "_1b7s5fc", f && "_1b7s5fe"),
@@ -599,7 +599,7 @@ var bp = 6, yp = ({ options: e, value: t, onChange: n, onCommit: r, columns: o,
599
599
  }, C.value);
600
600
  if (!p && !g && !f) return w;
601
601
  const P = (g || f) && C.value === t;
602
- return /* @__PURE__ */ a(mt, {
602
+ return /* @__PURE__ */ a(vt, {
603
603
  label: C.label,
604
604
  checked: P,
605
605
  children: w
@@ -621,7 +621,7 @@ var bp = 6, yp = ({ options: e, value: t, onChange: n, onCommit: r, columns: o,
621
621
  default:
622
622
  return it[6];
623
623
  }
624
- }, bl = (e) => /* @__PURE__ */ a(M, {
624
+ }, yl = (e) => /* @__PURE__ */ a(M, {
625
625
  ...e,
626
626
  children: /* @__PURE__ */ a("g", {
627
627
  stroke: "currentColor",
@@ -630,7 +630,7 @@ var bp = 6, yp = ({ options: e, value: t, onChange: n, onCommit: r, columns: o,
630
630
  strokeLinejoin: "round",
631
631
  children: /* @__PURE__ */ a("path", { d: "M20 6 9 17l-5-5" })
632
632
  })
633
- }), Cp = "_1g5x15w0 uz3g760", wp = "_1g5x15w1", xp = "_1g5x15w2", Ra = "_1g5x15w3", kp = "_1g5x15w4", Tp = "_1g5x15w5", Ap = "_1g5x15w6", Pp = "_1g5x15w7";
633
+ }), Cp = "_1g5x15w0 uz3g760", wp = "_1g5x15w1", xp = "_1g5x15w2", Da = "_1g5x15w3", kp = "_1g5x15w4", Tp = "_1g5x15w5", Ap = "_1g5x15w6", Pp = "_1g5x15w7";
634
634
  var Lp = ({ options: e, value: t, onChange: n, placeholder: r, disabled: o, hasError: i, ariaLabel: l, ariaLabelledBy: s, id: c }) => {
635
635
  const d = We({
636
636
  id: c,
@@ -653,7 +653,7 @@ var Lp = ({ options: e, value: t, onChange: n, placeholder: r, disabled: o, hasE
653
653
  className: wp,
654
654
  children: (h) => Ip(e, h, r)
655
655
  }), /* @__PURE__ */ a(Ee.Icon, {
656
- className: Ra,
656
+ className: Da,
657
657
  children: /* @__PURE__ */ a(Dt, { size: "sm" })
658
658
  })]
659
659
  }), /* @__PURE__ */ a(Ee.Portal, {
@@ -679,8 +679,8 @@ var Lp = ({ options: e, value: t, onChange: n, placeholder: r, disabled: o, hasE
679
679
  })]
680
680
  }),
681
681
  /* @__PURE__ */ a(Ee.ItemIndicator, {
682
- className: Ra,
683
- children: /* @__PURE__ */ a(bl, { size: "sm" })
682
+ className: Da,
683
+ children: /* @__PURE__ */ a(yl, { size: "sm" })
684
684
  })
685
685
  ]
686
686
  }, h.value))
@@ -699,22 +699,22 @@ var Fp = ({ value: e, onChange: t, onCommit: n, min: r, max: o, step: i, suffix:
699
699
  }, !1), g = zp(e, l, s), { commitUnlessHeldKey: m, gestureHandlers: f } = Mn(n);
700
700
  return /* @__PURE__ */ v("div", {
701
701
  className: Ep,
702
- children: [/* @__PURE__ */ a(Ct.Root, {
702
+ children: [/* @__PURE__ */ a(wt.Root, {
703
703
  className: Op,
704
704
  value: e,
705
705
  onValueChange: (y) => t(y),
706
706
  onValueCommitted: (y, k) => {
707
- m(k.reason === fl);
707
+ m(k.reason === bl);
708
708
  },
709
709
  min: r,
710
710
  max: o,
711
711
  step: i,
712
712
  disabled: d,
713
- children: /* @__PURE__ */ a(Ct.Control, {
713
+ children: /* @__PURE__ */ a(wt.Control, {
714
714
  className: Rp,
715
- children: /* @__PURE__ */ v(Ct.Track, {
715
+ children: /* @__PURE__ */ v(wt.Track, {
716
716
  className: Np,
717
- children: [/* @__PURE__ */ a(Ct.Indicator, { className: Dp }), /* @__PURE__ */ a(Ct.Thumb, {
717
+ children: [/* @__PURE__ */ a(wt.Indicator, { className: Dp }), /* @__PURE__ */ a(wt.Thumb, {
718
718
  className: _p,
719
719
  ...f,
720
720
  ...p
@@ -732,13 +732,13 @@ var Fp = ({ value: e, onChange: t, onCommit: n, min: r, max: o, step: i, suffix:
732
732
  ariaLabel: r,
733
733
  ariaLabelledBy: o
734
734
  });
735
- return /* @__PURE__ */ a(Ma.Root, {
735
+ return /* @__PURE__ */ a(Oa.Root, {
736
736
  checked: e,
737
737
  onCheckedChange: (s) => t(s),
738
738
  disabled: n,
739
739
  className: Bp,
740
740
  ...l,
741
- children: /* @__PURE__ */ a(Ma.Thumb, { className: Hp })
741
+ children: /* @__PURE__ */ a(Oa.Thumb, { className: Hp })
742
742
  });
743
743
  }, $p = "uz3g761", Vp = "tpcnun0 uz3g760", Wp = ({ value: e, onChange: t, onCommit: n, placeholder: r, disabled: o, hasError: i, ariaLabel: l, ariaLabelledBy: s, id: c }) => {
744
744
  const d = We({
@@ -746,7 +746,7 @@ var Fp = ({ value: e, onChange: t, onCommit: n, min: r, max: o, step: i, suffix:
746
746
  ariaLabel: l,
747
747
  ariaLabelledBy: s
748
748
  });
749
- return /* @__PURE__ */ a(vl, {
749
+ return /* @__PURE__ */ a(fl, {
750
750
  className: Vp,
751
751
  "data-error": i === !0,
752
752
  children: /* @__PURE__ */ a(dh, {
@@ -761,13 +761,13 @@ var Fp = ({ value: e, onChange: t, onCommit: n, min: r, max: o, step: i, suffix:
761
761
  })
762
762
  });
763
763
  }, Up = "cnu9yl0", Kp = "cnu9yl1";
764
- var yl = ({ options: e, value: t, onChange: n, onCommit: r, itemLayout: o = "inline", hasEqualWidths: i = !1, disabled: l, ariaLabel: s, ariaLabelledBy: c, id: d }) => {
764
+ var Sl = ({ options: e, value: t, onChange: n, onCommit: r, itemLayout: o = "inline", hasEqualWidths: i = !1, disabled: l, ariaLabel: s, ariaLabelledBy: c, id: d }) => {
765
765
  const u = We({
766
766
  id: d,
767
767
  ariaLabel: s,
768
768
  ariaLabelledBy: c
769
769
  }), h = o === "stacked", { commitAfterChange: p, gestureHandlers: g } = Mn(r);
770
- return /* @__PURE__ */ a(el, {
770
+ return /* @__PURE__ */ a(tl, {
771
771
  className: Up,
772
772
  value: t,
773
773
  onValueChange: (m) => {
@@ -777,28 +777,28 @@ var yl = ({ options: e, value: t, onChange: n, onCommit: r, itemLayout: o = "inl
777
777
  disabled: l,
778
778
  ...u,
779
779
  children: e.map((m) => {
780
- const f = jp(m, h), y = /* @__PURE__ */ v(Qi.Root, {
780
+ const f = jp(m, h), y = /* @__PURE__ */ v(el.Root, {
781
781
  value: m.value,
782
782
  disabled: m.disabled,
783
783
  className: Ze(Kp, h && "cnu9yl3", i && "cnu9yl2"),
784
784
  "aria-label": f,
785
- children: [m.icon, Sl(m, h) && /* @__PURE__ */ a("span", {
785
+ children: [m.icon, Cl(m, h) && /* @__PURE__ */ a("span", {
786
786
  className: "cnu9yl4",
787
787
  children: m.label
788
788
  })]
789
789
  }, m.value);
790
- return f === void 0 ? y : /* @__PURE__ */ a(mt, {
790
+ return f === void 0 ? y : /* @__PURE__ */ a(vt, {
791
791
  label: f,
792
792
  checked: m.value === t,
793
793
  children: y
794
794
  }, m.value);
795
795
  })
796
796
  });
797
- }, Sl = (e, t) => e.icon === void 0 || t, jp = (e, t) => {
798
- if (!Sl(e, t))
797
+ }, Cl = (e, t) => e.icon === void 0 || t, jp = (e, t) => {
798
+ if (!Cl(e, t))
799
799
  return e.label;
800
800
  }, Xp = {
801
- ToggleGroup: yl,
801
+ ToggleGroup: Sl,
802
802
  Switch: Gp,
803
803
  Slider: Fp,
804
804
  RadioGrid: yp,
@@ -840,22 +840,22 @@ var yl = ({ options: e, value: t, onChange: n, onCommit: r, itemLayout: o = "inl
840
840
  value: r,
841
841
  children: t
842
842
  });
843
- }, H = () => Ce(ur), Na = {
843
+ }, H = () => Ce(ur), _a = {
844
844
  stack: "pr583x0",
845
845
  grid: "pr583x1"
846
- }, Da = "pr583x2", Yp = {
846
+ }, Fa = "pr583x2", Yp = {
847
847
  plain: "pr583x4 pr583x3",
848
848
  withIcon: "pr583x5 pr583x3"
849
849
  }, L = ({ label: e, layout: t = "grid", icon: n, children: r }) => {
850
850
  const o = Be(), i = Be();
851
851
  return e === void 0 ? /* @__PURE__ */ a(cr, {
852
- className: Na[t],
852
+ className: _a[t],
853
853
  children: /* @__PURE__ */ a("div", {
854
- className: Da,
854
+ className: Fa,
855
855
  children: r
856
856
  })
857
857
  }) : /* @__PURE__ */ v(cr, {
858
- className: Na[t],
858
+ className: _a[t],
859
859
  children: [/* @__PURE__ */ v("label", {
860
860
  id: o,
861
861
  htmlFor: i,
@@ -865,26 +865,26 @@ var yl = ({ options: e, value: t, onChange: n, onCommit: r, itemLayout: o = "inl
865
865
  children: n
866
866
  }), e]
867
867
  }), /* @__PURE__ */ a("div", {
868
- className: Da,
869
- children: /* @__PURE__ */ a(ll, {
868
+ className: Fa,
869
+ children: /* @__PURE__ */ a(sl, {
870
870
  labelId: o,
871
871
  controlId: i,
872
872
  children: r
873
873
  })
874
874
  })]
875
875
  });
876
- }, Cl = ({ target: e }) => {
876
+ }, wl = ({ target: e }) => {
877
877
  const t = Et();
878
878
  return t === null ? null : /* @__PURE__ */ a(Zp, {
879
879
  graph: t,
880
880
  axis: e.axis
881
881
  });
882
882
  };
883
- Cl.hasRows = (e, { scene: t }) => t.coordSystem.type !== "polar";
883
+ wl.hasRows = (e, { scene: t }) => t.coordSystem.type !== "polar";
884
884
  var Zp = ({ graph: e, axis: t }) => {
885
885
  const n = Q(e), r = R(), { NumberField: o, TextField: i, ToggleGroup: l } = H(), s = n?.guides.axes.find((x) => x.scaledAesthetic === t);
886
886
  if (B(() => () => e.commands.commit(), [e.commands]), n === null || s?.geometry !== "linear") return null;
887
- const c = !s.visible, d = s.visible || s.showGrid, u = n.scales[t]?.spec.scaleType, h = u === "continuous" || u === "datetime", p = n.guides.legends.drawn.some((x) => x.position === "left" || x.position === "right"), g = t !== "x" && u === "continuous" && (s.position === "left" || s.position === "right") && !p, m = t === "x" ? void 0 : n.scales[t]?.spec, f = m?.scaleType === "continuous" ? m : void 0, y = f !== void 0 && (s.position === "left" || s.position === "right") && !Ui(n, t), k = f?.transform === "log" ? "log" : "linear", C = y && f.transform !== "log", w = f?.domainMin ?? null, P = f !== void 0 && (s.position === "left" || s.position === "right") && f.transform !== "log", T = f?.domainMax ?? null, I = n.config.axes[t]?.label ?? s.label ?? "", N = (x) => {
887
+ const c = !s.visible, d = s.visible || s.showGrid, u = n.scales[t]?.spec.scaleType, h = u === "continuous" || u === "datetime", p = n.guides.legends.drawn.some((x) => x.position === "left" || x.position === "right"), g = t !== "x" && u === "continuous" && (s.position === "left" || s.position === "right") && !p, m = t === "x" ? void 0 : n.scales[t]?.spec, f = m?.scaleType === "continuous" ? m : void 0, y = f !== void 0 && (s.position === "left" || s.position === "right") && !Ki(n, t), k = f?.transform === "log" ? "log" : "linear", C = y && f.transform !== "log", w = f?.domainMin ?? null, P = f !== void 0 && (s.position === "left" || s.position === "right") && f.transform !== "log", T = f?.domainMax ?? null, I = n.config.axes[t]?.label ?? s.label ?? "", N = (x) => {
888
888
  const O = t === "ySecondary" ? {
889
889
  axis: t,
890
890
  label: x
@@ -892,7 +892,7 @@ var Zp = ({ graph: e, axis: t }) => {
892
892
  axis: t,
893
893
  label: x
894
894
  };
895
- e.commands.dispatch(new wi(O), { transient: !0 });
895
+ e.commands.dispatch(new xi(O), { transient: !0 });
896
896
  };
897
897
  return /* @__PURE__ */ v(K, { children: [
898
898
  /* @__PURE__ */ a(L, {
@@ -921,7 +921,7 @@ var Zp = ({ graph: e, axis: t }) => {
921
921
  }],
922
922
  onChange: (x) => {
923
923
  const O = x === "edges" ? "edges" : "auto";
924
- e.commands.dispatch(new ki({
924
+ e.commands.dispatch(new Ti({
925
925
  axis: t,
926
926
  tickMode: O,
927
927
  keepSecondaryAxis: !0
@@ -946,7 +946,7 @@ var Zp = ({ graph: e, axis: t }) => {
946
946
  onChange: (x) => {
947
947
  if (x !== "left" && x !== "right") return;
948
948
  const O = t === "y" ? x : x === "left" ? "right" : "left";
949
- e.commands.dispatch(new xi({
949
+ e.commands.dispatch(new ki({
950
950
  axis: "y",
951
951
  position: O
952
952
  }));
@@ -967,7 +967,7 @@ var Zp = ({ graph: e, axis: t }) => {
967
967
  icon: /* @__PURE__ */ a(Mh, {})
968
968
  }],
969
969
  onChange: (x) => {
970
- e.commands.dispatch(new Ni({
970
+ e.commands.dispatch(new Di({
971
971
  scaledAesthetic: t,
972
972
  transform: x === "log" ? "log" : "linear"
973
973
  }));
@@ -1021,7 +1021,7 @@ var Zp = ({ graph: e, axis: t }) => {
1021
1021
  })
1022
1022
  });
1023
1023
  }, eg = 6, He = ({ target: e }) => {
1024
- const { commands: t, findGeom: n } = W(), r = R(), o = ee(), i = F((u) => u), l = xl(e, i, n);
1024
+ const { commands: t, findGeom: n } = W(), r = R(), o = ee(), i = F((u) => u), l = kl(e, i, n);
1025
1025
  B(() => () => t.commit(), [t]);
1026
1026
  const s = _(() => $u({
1027
1027
  readers: o,
@@ -1043,14 +1043,14 @@ var Zp = ({ graph: e, axis: t }) => {
1043
1043
  ...p === void 0 ? {} : { part: p }
1044
1044
  }), h ? { transient: !0 } : void 0);
1045
1045
  }, d = l[0]?.property === "stroke" ? r("editor.overlayMenu.lineColor") : r("editor.overlayMenu.fillColor");
1046
- return /* @__PURE__ */ a(wl, {
1046
+ return /* @__PURE__ */ a(xl, {
1047
1047
  label: d,
1048
- palette: ji(i.scales.color),
1048
+ palette: Xi(i.scales.color),
1049
1049
  selectedColor: s,
1050
1050
  paint: c,
1051
1051
  commit: () => t.commit()
1052
1052
  });
1053
- }, wl = ({ label: e, palette: t, selectedColor: n, paint: r, commit: o }) => {
1053
+ }, xl = ({ label: e, palette: t, selectedColor: n, paint: r, commit: o }) => {
1054
1054
  const { ColorSwatches: i, CustomColor: l } = H();
1055
1055
  return /* @__PURE__ */ a(L, {
1056
1056
  label: e,
@@ -1068,15 +1068,15 @@ var Zp = ({ graph: e, axis: t }) => {
1068
1068
  })
1069
1069
  });
1070
1070
  };
1071
- He.hasRows = (e, { scene: t, findGeom: n }) => xl(e, t, n) !== null;
1072
- var xl = (e, t, n) => {
1071
+ He.hasRows = (e, { scene: t, findGeom: n }) => kl(e, t, n) !== null;
1072
+ var kl = (e, t, n) => {
1073
1073
  if (q(t.layers, e.layerId) === void 0) return null;
1074
1074
  const r = Vu({
1075
1075
  layers: t.layers,
1076
1076
  target: e
1077
1077
  });
1078
1078
  return An(t.spec, e, n, r);
1079
- }, tg = (e, t) => t === null || e.some((n) => gl(n, t)) ? e : [...e, t], Hn = [
1079
+ }, tg = (e, t) => t === null || e.some((n) => ml(n, t)) ? e : [...e, t], Hn = [
1080
1080
  {
1081
1081
  name: "narrow",
1082
1082
  width: 0.4
@@ -1089,10 +1089,10 @@ var xl = (e, t, n) => {
1089
1089
  name: "wide",
1090
1090
  width: 0.95
1091
1091
  }
1092
- ], kl = ({ target: e }) => {
1093
- const t = F((p) => p), n = Se(), r = R(), { ToggleGroup: o } = H(), i = q(t.spec.layers, e.layerId), l = ft(i, "bar") ? i : null, s = t.coordSystem.type === "polar" && t.coordSystem.bandAxis === null, c = (p) => {
1092
+ ], Tl = ({ target: e }) => {
1093
+ const t = F((p) => p), n = Se(), r = R(), { ToggleGroup: o } = H(), i = q(t.spec.layers, e.layerId), l = bt(i, "bar") ? i : null, s = t.coordSystem.type === "polar" && t.coordSystem.bandAxis === null, c = (p) => {
1094
1094
  const g = Hn.find(({ name: m }) => m === p);
1095
- g !== void 0 && n.dispatch(new Ti({
1095
+ g !== void 0 && n.dispatch(new Ai({
1096
1096
  layerId: e.layerId,
1097
1097
  width: g.width
1098
1098
  }));
@@ -1100,7 +1100,7 @@ var xl = (e, t, n) => {
1100
1100
  value: p,
1101
1101
  label: r(`editor.graphPanel.barSection.widths.${p}`),
1102
1102
  icon: /* @__PURE__ */ a(Qp, { barWidth: p })
1103
- })), u = l === null ? null : Xi(l.params, t.coordSystem.type), h = Hn.find(({ width: p }) => p === u)?.name ?? "";
1103
+ })), u = l === null ? null : qi(l.params, t.coordSystem.type), h = Hn.find(({ width: p }) => p === u)?.name ?? "";
1104
1104
  return /* @__PURE__ */ v(K, { children: [/* @__PURE__ */ a(He, { target: e }), l !== null && !s ? /* @__PURE__ */ a(L, {
1105
1105
  label: r("editor.graphPanel.barSection.thickness"),
1106
1106
  children: /* @__PURE__ */ a(o, {
@@ -1110,7 +1110,7 @@ var xl = (e, t, n) => {
1110
1110
  })
1111
1111
  }) : null] });
1112
1112
  };
1113
- kl.hasRows = He.hasRows;
1113
+ Tl.hasRows = He.hasRows;
1114
1114
  var ng = {
1115
1115
  smooth: "M2 13C6 13 7 5 10 5s4 6 6 6",
1116
1116
  linear: "M2 13l5-8 4 6 5-4"
@@ -1138,13 +1138,13 @@ var ng = {
1138
1138
  strokeLinecap: "round",
1139
1139
  strokeLinejoin: "round"
1140
1140
  })
1141
- }), _a = {
1141
+ }), za = {
1142
1142
  supportsDataLabels: !1,
1143
1143
  supportsPercentages: !1,
1144
1144
  supportsStackTotals: !1,
1145
1145
  supportsCategoryLabels: !1
1146
- }, Tl = (e, t, n) => {
1147
- if (!n.hasCapability(e.geom, t) || ig(e)) return _a;
1146
+ }, Al = (e, t, n) => {
1147
+ if (!n.hasCapability(e.geom, t) || ig(e)) return za;
1148
1148
  const { showDataLabels: r } = e.dataLabels, o = e.geom === "bar", i = t === "polar";
1149
1149
  return {
1150
1150
  supportsDataLabels: !0,
@@ -1155,7 +1155,7 @@ var ng = {
1155
1155
  }, ig = (e) => {
1156
1156
  const t = Oe(e.mapping.color);
1157
1157
  return e.geom === "tile" && t !== null && e.data.getType(t) === "categorical";
1158
- }, Al = (e, t) => {
1158
+ }, Pl = (e, t) => {
1159
1159
  switch (t) {
1160
1160
  case "gap":
1161
1161
  return e("editor.graphPanel.treatEmptyValues.leaveGap.label");
@@ -1171,10 +1171,10 @@ var hr = [
1171
1171
  "gap",
1172
1172
  "zero",
1173
1173
  "connect"
1174
- ], qr = (e, t, n) => {
1174
+ ], Yr = (e, t, n) => {
1175
1175
  const r = q(e.spec.layers, n);
1176
- if (!ft(r, "line", "area")) return null;
1177
- const o = e.coordSystem.type === "polar", i = pt(r.geom, r.id), l = xe(e.spec), s = e.spec.styles.overrides, c = Pa(s, i, l), d = Pa(Xu(s, i, l), i, l), u = typeof c?.strokeWidth == "number" ? c.strokeWidth : null, h = lg(r, e.spec.layers), p = o ? [] : cg(r), g = p.length > 1, m = r.geom === "line" && !o, f = m ? ug(e, t, r) : 0;
1176
+ if (!bt(r, "line", "area")) return null;
1177
+ const o = e.coordSystem.type === "polar", i = gt(r.geom, r.id), l = xe(e.spec), s = e.spec.styles.overrides, c = Ia(s, i, l), d = Ia(Xu(s, i, l), i, l), u = typeof c?.strokeWidth == "number" ? c.strokeWidth : null, h = lg(r, e.spec.layers), p = o ? [] : cg(r), g = p.length > 1, m = r.geom === "line" && !o, f = m ? ug(e, t, r) : 0;
1178
1178
  return {
1179
1179
  layerId: r.id,
1180
1180
  showPoints: h !== void 0 && sg(e, t, h.id),
@@ -1188,7 +1188,7 @@ var hr = [
1188
1188
  missingValues: g ? r.params.missingValues : null,
1189
1189
  missingValueOptions: g ? p : []
1190
1190
  };
1191
- }, lg = (e, t) => or(t, "point").find((n) => Wi(n, [e])), sg = (e, t, n) => {
1191
+ }, lg = (e, t) => or(t, "point").find((n) => Ui(n, [e])), sg = (e, t, n) => {
1192
1192
  const r = q(e.layers, n);
1193
1193
  if (r?.geom !== "point") return !1;
1194
1194
  const o = t.geom.point(r);
@@ -1316,7 +1316,7 @@ var hr = [
1316
1316
  })
1317
1317
  ]
1318
1318
  })]
1319
- }), Pl = (e) => /* @__PURE__ */ a(M, {
1319
+ }), Ll = (e) => /* @__PURE__ */ a(M, {
1320
1320
  viewBox: "0 0 16 16",
1321
1321
  ...e,
1322
1322
  children: /* @__PURE__ */ v("g", {
@@ -1957,7 +1957,7 @@ var hr = [
1957
1957
  },
1958
1958
  {
1959
1959
  name: "line",
1960
- icon: Pl,
1960
+ icon: Ll,
1961
1961
  summary: {
1962
1962
  coordType: "cartesian",
1963
1963
  geom: "line",
@@ -2076,15 +2076,15 @@ var hr = [
2076
2076
  position: "identity"
2077
2077
  }
2078
2078
  }
2079
- ], Rg = 0.05, Ll = (e, t) => be(e) ? ou(t) : e.geom === "tile" ? iu(t) : !0, sn = (e) => e === null ? null : It.find((t) => Ng(t.summary, e)) ?? null, Il = (e, t) => t === null || be(e) ? e : e.position === "dodge" && Ml(t) ? {
2079
+ ], Rg = 0.05, Il = (e, t) => be(e) ? ou(t) : e.geom === "tile" ? iu(t) : !0, sn = (e) => e === null ? null : It.find((t) => Ng(t.summary, e)) ?? null, Ml = (e, t) => t === null || be(e) ? e : e.position === "dodge" && El(t) ? {
2080
2080
  ...e,
2081
2081
  position: "identity"
2082
2082
  } : e.coordType !== "polar" || !cn(e.innerRadius) || t.coordType !== "polar" || !cn(t.innerRadius) ? e : {
2083
2083
  ...e,
2084
2084
  innerRadius: t.innerRadius
2085
- }, Ml = (e) => !be(e) && e.geom === "bar" && e.position === "identity", Ng = (e, t) => {
2085
+ }, El = (e) => !be(e) && e.geom === "bar" && e.position === "identity", Ng = (e, t) => {
2086
2086
  if (be(e) || be(t)) return be(e) && be(t);
2087
- const n = e.position === t.position || e.position === "dodge" && Ml(t);
2087
+ const n = e.position === t.position || e.position === "dodge" && El(t);
2088
2088
  return e.coordType !== t.coordType || e.geom !== t.geom || !n ? !1 : e.coordType !== "polar" || t.coordType !== "polar" ? !0 : e.theta === t.theta && cn(e.innerRadius) === cn(t.innerRadius);
2089
2089
  }, cn = (e) => e >= Rg;
2090
2090
  var Dg = "_1a90obs1", _g = [
@@ -2108,7 +2108,7 @@ var Dg = "_1a90obs1", _g = [
2108
2108
  coordType: "cartesian",
2109
2109
  comboType: "lines"
2110
2110
  },
2111
- icon: Pl
2111
+ icon: Ll
2112
2112
  }
2113
2113
  ], Fg = [
2114
2114
  ["column", "column"],
@@ -2140,16 +2140,16 @@ var Dg = "_1a90obs1", _g = [
2140
2140
  }, [l]);
2141
2141
  const d = Tn(e);
2142
2142
  if (d === null) return null;
2143
- const u = Wg(d), h = dn(d), p = sn(d), g = u ?? p, m = r(g === null ? "editor.overlayMenu.customChartType" : `editor.graphTypes.${g.name}`), f = (u === void 0 ? p : za(u, h))?.icon, y = u !== void 0 && u.arrangements.length > 1, k = y && (t || u.name === "combo"), C = () => s(!l), w = ({ summary: I }) => {
2144
- n.dispatch(new Fr(Il(I, d)), { transient: !0 });
2143
+ const u = Wg(d), h = dn(d), p = sn(d), g = u ?? p, m = r(g === null ? "editor.overlayMenu.customChartType" : `editor.graphTypes.${g.name}`), f = (u === void 0 ? p : Ha(u, h))?.icon, y = u !== void 0 && u.arrangements.length > 1, k = y && (t || u.name === "combo"), C = () => s(!l), w = ({ summary: I }) => {
2144
+ n.dispatch(new zr(Ml(I, d)), { transient: !0 });
2145
2145
  }, P = (I) => {
2146
- const N = Fa.find((x) => x.name === I);
2147
- N !== void 0 && w(za(N, y ? h : null));
2148
- }, T = Fa.map(({ name: I, arrangements: [N] }) => ({
2146
+ const N = Ba.find((x) => x.name === I);
2147
+ N !== void 0 && w(Ha(N, y ? h : null));
2148
+ }, T = Ba.map(({ name: I, arrangements: [N] }) => ({
2149
2149
  value: I,
2150
2150
  label: r(`editor.graphTypes.${I}`),
2151
2151
  icon: /* @__PURE__ */ a(N.icon, { size: "md" }),
2152
- disabled: !Ll(N.summary, e)
2152
+ disabled: !Il(N.summary, e)
2153
2153
  }));
2154
2154
  return /* @__PURE__ */ v(K, { children: [
2155
2155
  /* @__PURE__ */ a(L, {
@@ -2189,13 +2189,13 @@ var Dg = "_1a90obs1", _g = [
2189
2189
  onCommit: n.commit
2190
2190
  })
2191
2191
  ] });
2192
- }, El = (e, t) => be(e) || be(t) ? be(e) && be(t) : e.coordType === "polar" ? sn(e) === sn(t) : e.coordType === t.coordType && e.geom === t.geom, Ol = Fg.flatMap(([e, t]) => {
2192
+ }, Ol = (e, t) => be(e) || be(t) ? be(e) && be(t) : e.coordType === "polar" ? sn(e) === sn(t) : e.coordType === t.coordType && e.geom === t.geom, Rl = Fg.flatMap(([e, t]) => {
2193
2193
  const n = It.find((r) => r.name === t);
2194
2194
  return n === void 0 ? [] : [{
2195
2195
  name: e,
2196
- arrangements: [n, ...[...It, ..._g].filter((r) => r !== n && El(n.summary, r.summary))]
2196
+ arrangements: [n, ...[...It, ..._g].filter((r) => r !== n && Ol(n.summary, r.summary))]
2197
2197
  }];
2198
- }), Fa = Ol.filter(({ name: e }) => e !== "combo"), $g = ({ type: e, arrangement: t, onPick: n, onCommit: r }) => {
2198
+ }), Ba = Rl.filter(({ name: e }) => e !== "combo"), $g = ({ type: e, arrangement: t, onPick: n, onCommit: r }) => {
2199
2199
  const o = R(), { ToggleGroup: i } = H(), l = e.arrangements.map(({ summary: c, icon: d }) => {
2200
2200
  const u = dn(c);
2201
2201
  return {
@@ -2219,36 +2219,36 @@ var Dg = "_1a90obs1", _g = [
2219
2219
  })
2220
2220
  })
2221
2221
  });
2222
- }, Vg = (e) => e instanceof Element && e.closest('[role="radio"]:not([aria-disabled="true"])') !== null, dn = (e) => be(e) ? Hg[e.comboType] : Bg[e.position], za = (e, t) => e.arrangements.find(({ summary: n }) => dn(n) === t) ?? e.arrangements[0], Wg = (e) => Ol.find(({ arrangements: [t] }) => El(t.summary, e)), Ug = () => {
2222
+ }, Vg = (e) => e instanceof Element && e.closest('[role="radio"]:not([aria-disabled="true"])') !== null, dn = (e) => be(e) ? Hg[e.comboType] : Bg[e.position], Ha = (e, t) => e.arrangements.find(({ summary: n }) => dn(n) === t) ?? e.arrangements[0], Wg = (e) => Rl.find(({ arrangements: [t] }) => Ol(t.summary, e)), Ug = () => {
2223
2223
  const e = F((s) => s.scales.color), t = Se(), n = R(), [r, o] = Z(null);
2224
2224
  B(() => () => t.commit(), [t]);
2225
- const i = ji(e), l = Ru(e, r === null ? i : [r, ...i]);
2225
+ const i = Xi(e), l = Ru(e, r === null ? i : [r, ...i]);
2226
2226
  return (l === null ? [{
2227
2227
  label: n("editor.overlayMenu.lowColor"),
2228
- color: La(e, "low"),
2229
- buildRange: (s) => Aa(e, "low", s)
2228
+ color: Ma(e, "low"),
2229
+ buildRange: (s) => La(e, "low", s)
2230
2230
  }, {
2231
2231
  label: n("editor.overlayMenu.highColor"),
2232
- color: La(e, "high"),
2233
- buildRange: (s) => Aa(e, "high", s)
2232
+ color: Ma(e, "high"),
2233
+ buildRange: (s) => La(e, "high", s)
2234
2234
  }] : [{
2235
2235
  label: n("editor.overlayMenu.fillColor"),
2236
2236
  color: l,
2237
2237
  buildRange: (s) => tu(e, s)
2238
- }]).map(({ label: s, color: c, buildRange: d }) => c === null ? null : /* @__PURE__ */ a(wl, {
2238
+ }]).map(({ label: s, color: c, buildRange: d }) => c === null ? null : /* @__PURE__ */ a(xl, {
2239
2239
  label: s,
2240
2240
  palette: i,
2241
2241
  selectedColor: c,
2242
2242
  paint: (h, p) => {
2243
2243
  const g = d(h);
2244
- g !== null && (o(h), t.dispatch(new Ri({
2244
+ g !== null && (o(h), t.dispatch(new Ni({
2245
2245
  scaledAesthetic: "color",
2246
2246
  range: g
2247
2247
  }), p ? { transient: !0 } : void 0));
2248
2248
  },
2249
2249
  commit: () => t.commit()
2250
2250
  }, s));
2251
- }, Rl = ({ lineStyle: e, ...t }) => /* @__PURE__ */ v(M, {
2251
+ }, Nl = ({ lineStyle: e, ...t }) => /* @__PURE__ */ v(M, {
2252
2252
  viewBox: "0 0 18 18",
2253
2253
  ...t,
2254
2254
  children: [
@@ -2283,7 +2283,7 @@ var Dg = "_1a90obs1", _g = [
2283
2283
  ]
2284
2284
  })
2285
2285
  ]
2286
- }), Nl = ({ lineWidth: e, ...t }) => /* @__PURE__ */ a(M, {
2286
+ }), Dl = ({ lineWidth: e, ...t }) => /* @__PURE__ */ a(M, {
2287
2287
  viewBox: "0 0 18 18",
2288
2288
  ...t,
2289
2289
  children: /* @__PURE__ */ a("path", {
@@ -2336,7 +2336,7 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
2336
2336
  const o = new Image();
2337
2337
  o.onload = () => t({ image: r }), o.onerror = () => t({ rejection: "undecodable" }), o.src = r;
2338
2338
  }, n.readAsDataURL(e);
2339
- }), Ba = [
2339
+ }), Ga = [
2340
2340
  "solid",
2341
2341
  "dashed",
2342
2342
  "dotted"
@@ -2373,7 +2373,7 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
2373
2373
  "triangle",
2374
2374
  "cross",
2375
2375
  "star"
2376
- ], Dl = ({ widthPx: e, onChange: t }) => {
2376
+ ], _l = ({ widthPx: e, onChange: t }) => {
2377
2377
  const n = R(), { ToggleGroup: r } = H(), o = (i) => {
2378
2378
  const l = Gn.find(({ name: s }) => s === i);
2379
2379
  l !== void 0 && t(l.widthPx);
@@ -2385,30 +2385,30 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
2385
2385
  options: Gn.map(({ name: i, widthPx: l }) => ({
2386
2386
  value: i,
2387
2387
  label: n(`editor.graphPanel.gridSection.lineWidths.${i}`),
2388
- icon: /* @__PURE__ */ a(Nl, { lineWidth: l })
2388
+ icon: /* @__PURE__ */ a(Dl, { lineWidth: l })
2389
2389
  })),
2390
2390
  onChange: o
2391
2391
  })
2392
2392
  });
2393
- }, _l = ({ lineStyle: e, onChange: t }) => {
2393
+ }, Fl = ({ lineStyle: e, onChange: t }) => {
2394
2394
  const n = R(), { ToggleGroup: r } = H(), o = (i) => {
2395
- const l = Ba.find((s) => s === i);
2395
+ const l = Ga.find((s) => s === i);
2396
2396
  l !== void 0 && t(l);
2397
2397
  };
2398
2398
  return /* @__PURE__ */ a(L, {
2399
2399
  label: n("editor.fineTunePanel.lineStyleSection.title"),
2400
2400
  children: /* @__PURE__ */ a(r, {
2401
2401
  value: e ?? "",
2402
- options: Ba.map((i) => ({
2402
+ options: Ga.map((i) => ({
2403
2403
  value: i,
2404
2404
  label: n(`editor.graphPanel.gridSection.lineStyles.${i}`),
2405
- icon: /* @__PURE__ */ a(Rl, { lineStyle: i })
2405
+ icon: /* @__PURE__ */ a(Nl, { lineStyle: i })
2406
2406
  })),
2407
2407
  onChange: o
2408
2408
  })
2409
2409
  });
2410
- }, Yr = ({ symbol: e, coordType: t, onChange: n }) => {
2411
- const r = R(), { RadioGrid: o } = H(), [i, l] = Z(null), s = Ce(In), c = Mc(), d = ri(), u = s ? s.getPointSymbols(t) : d("point", t)?.symbols, h = s ? new Map(s.getGlyphs().map(({ name: T, definition: I }) => [T, I])) : c;
2410
+ }, Zr = ({ symbol: e, coordType: t, onChange: n }) => {
2411
+ const r = R(), { RadioGrid: o } = H(), [i, l] = Z(null), s = Ce(In), c = Mc(), d = ai(), u = s ? s.getPointSymbols(t) : d("point", t)?.symbols, h = s ? new Map(s.getGlyphs().map(({ name: T, definition: I }) => [T, I])) : c;
2412
2412
  if (u === void 0 || u.length === 0) return null;
2413
2413
  const p = (T) => typeof T == "string" && u.includes(T), g = (T) => p(T) || lr(T) || !Tt(T) && h.has(T), m = (T) => !Tt(T) || em.some((I) => I === T), f = [...h.keys()].filter((T) => !Tt(T) && !p(T)), y = [...u.filter(m), ...f], k = e === null ? "" : Vt(e), C = e === null || y.some((T) => Vt(T) === k) || !g(e) ? y : [...y, e], w = (T) => Tt(T) ? r(`editor.graphPanel.pointSymbol.symbols.${T}`) : lr(T) ? r("editor.graphPanel.pointSymbol.custom") : T, P = (T) => {
2414
2414
  l(null);
@@ -2454,7 +2454,7 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
2454
2454
  })]
2455
2455
  })
2456
2456
  });
2457
- }, Zr = ({ sizePx: e, onChange: t }) => {
2457
+ }, Jr = ({ sizePx: e, onChange: t }) => {
2458
2458
  const n = R(), { ToggleGroup: r } = H(), o = (i) => {
2459
2459
  const l = $n.find(({ name: s }) => s === i);
2460
2460
  l !== void 0 && t(l.sizePx);
@@ -2512,22 +2512,22 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
2512
2512
  if (lr(e)) return e.image;
2513
2513
  const n = t.get(e);
2514
2514
  return n !== void 0 && typeof n != "function" && "image" in n ? n.image : null;
2515
- }, Fl = Je({}), am = Fl.Provider, om = () => Ce(Fl), im = "_1qh3fon0", pr = "theme", lm = 3, Wt = 14, Ha = 9, sm = () => {
2515
+ }, zl = Je({}), am = zl.Provider, om = () => Ce(zl), im = "_1qh3fon0", pr = "theme", lm = 3, Wt = 14, $a = 9, sm = () => {
2516
2516
  const e = F((u) => u.scales.color), t = om(), n = Se(), r = R(), { RadioGrid: o } = H();
2517
2517
  if (Object.keys(t).length === 0 || e?.kind !== "visual" || e.spec.scaleType !== "discrete" || e.defaultPalette === void 0) return null;
2518
2518
  const { defaultPalette: i, spec: l } = e, s = Object.entries(t), c = [{
2519
2519
  value: pr,
2520
2520
  label: r("editor.overlayMenu.themePalette"),
2521
- icon: /* @__PURE__ */ a(Ga, { colors: i })
2521
+ icon: /* @__PURE__ */ a(Va, { colors: i })
2522
2522
  }, ...s.map(([u, h]) => ({
2523
2523
  value: gr(u),
2524
2524
  label: u,
2525
- icon: /* @__PURE__ */ a(Ga, { colors: h })
2525
+ icon: /* @__PURE__ */ a(Va, { colors: h })
2526
2526
  }))], d = (u) => {
2527
2527
  const h = s.find(([g]) => gr(g) === u);
2528
2528
  if (u !== pr && h === void 0) return;
2529
2529
  const p = h === void 0 ? null : [...h[1]];
2530
- n.dispatch(new Ri({
2530
+ n.dispatch(new Ni({
2531
2531
  scaledAesthetic: "color",
2532
2532
  range: p
2533
2533
  }), { transient: !0 });
@@ -2548,8 +2548,8 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
2548
2548
  if (e === null) return pr;
2549
2549
  const n = t.find(([, r]) => nh(r, e));
2550
2550
  return n === void 0 ? "" : gr(n[0]);
2551
- }, Ga = ({ colors: e }) => {
2552
- const t = e.slice(0, lm), n = Wt / 2, r = Wt + (t.length - 1) * Ha;
2551
+ }, Va = ({ colors: e }) => {
2552
+ const t = e.slice(0, lm), n = Wt / 2, r = Wt + (t.length - 1) * $a;
2553
2553
  return /* @__PURE__ */ a("svg", {
2554
2554
  width: r,
2555
2555
  height: Wt,
@@ -2557,34 +2557,34 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
2557
2557
  "aria-hidden": "true",
2558
2558
  children: t.map((o, i) => /* @__PURE__ */ a("circle", {
2559
2559
  className: im,
2560
- cx: n + i * Ha,
2560
+ cx: n + i * $a,
2561
2561
  cy: n,
2562
2562
  r: n - 0.5,
2563
2563
  fill: o
2564
2564
  }, i)).reverse()
2565
2565
  });
2566
- }, $a = ["smooth", "linear"], zl = () => {
2567
- const e = F((S) => S), t = ee(), n = Or(), r = Se(), o = R(), { Switch: i, ToggleGroup: l } = H(), s = Bl(e.layers, e.coordSystem.type, n), c = (S) => s.filter(({ support: b }) => S(b)).map(({ layer: b }) => b), d = dm(e, t), u = d.filter((S) => S.smooth !== null), h = d.filter((S) => S.missingValues !== null && S.missingValueOptions.length > 1), p = hr.filter((S) => h.some((b) => b.missingValueOptions.includes(S))), g = gm(u), m = mm(h), f = (S) => {
2568
- r.dispatch(new st({ commands: d.map((b) => new Br({
2566
+ }, Wa = ["smooth", "linear"], Bl = () => {
2567
+ const e = F((S) => S), t = ee(), n = Rr(), r = Se(), o = R(), { Switch: i, ToggleGroup: l } = H(), s = Hl(e.layers, e.coordSystem.type, n), c = (S) => s.filter(({ support: b }) => S(b)).map(({ layer: b }) => b), d = dm(e, t), u = d.filter((S) => S.smooth !== null), h = d.filter((S) => S.missingValues !== null && S.missingValueOptions.length > 1), p = hr.filter((S) => h.some((b) => b.missingValueOptions.includes(S))), g = gm(u), m = mm(h), f = (S) => {
2568
+ r.dispatch(new ct({ commands: d.map((b) => new Hr({
2569
2569
  layerId: b.layerId,
2570
2570
  showPoints: S
2571
2571
  })) }));
2572
2572
  }, y = (S) => {
2573
- const b = $a.find((E) => E === S);
2574
- b !== void 0 && r.dispatch(new st({ commands: u.map((E) => new Ei({
2573
+ const b = Wa.find((E) => E === S);
2574
+ b !== void 0 && r.dispatch(new ct({ commands: u.map((E) => new Oi({
2575
2575
  layerId: E.layerId,
2576
2576
  curve: b
2577
2577
  })) }));
2578
2578
  }, k = (S) => {
2579
2579
  const b = hr.find((z) => z === S);
2580
2580
  if (b === void 0) return;
2581
- const E = h.filter((z) => z.missingValueOptions.includes(b)).map((z) => new Oi({
2581
+ const E = h.filter((z) => z.missingValueOptions.includes(b)).map((z) => new Ri({
2582
2582
  layerId: z.layerId,
2583
2583
  missingValues: b
2584
2584
  }));
2585
- E.length !== 0 && r.dispatch(new st({ commands: E }));
2585
+ E.length !== 0 && r.dispatch(new ct({ commands: E }));
2586
2586
  }, C = d.filter((S) => S.showFill !== null), w = d.filter((S) => S.showPoints), P = um(e, t, d), T = C.some((S) => hm(e, S)), I = (S) => {
2587
- S.length > 0 && r.dispatch(new st({ commands: S }));
2587
+ S.length > 0 && r.dispatch(new ct({ commands: S }));
2588
2588
  }, N = (S) => {
2589
2589
  I(d.map((b) => new Fe({
2590
2590
  layerId: b.layerId,
@@ -2613,7 +2613,7 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
2613
2613
  label: o("editor.graphPanel.graphOptions.dataLabels"),
2614
2614
  layers: c((S) => S.supportsDataLabels),
2615
2615
  isOn: (S) => S.showDataLabels,
2616
- buildCommand: (S, b) => new Fi({
2616
+ buildCommand: (S, b) => new zi({
2617
2617
  layerId: S,
2618
2618
  showDataLabels: b
2619
2619
  })
@@ -2622,7 +2622,7 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
2622
2622
  label: o("editor.graphPanel.graphOptions.showPercentages"),
2623
2623
  layers: c((S) => S.supportsPercentages),
2624
2624
  isOn: (S) => S.format === "percentage",
2625
- buildCommand: (S, b) => new Ii({
2625
+ buildCommand: (S, b) => new Mi({
2626
2626
  layerId: S,
2627
2627
  format: b ? "percentage" : "absolute"
2628
2628
  })
@@ -2631,7 +2631,7 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
2631
2631
  label: o("editor.graphPanel.graphOptions.stackTotals"),
2632
2632
  layers: c((S) => S.supportsStackTotals),
2633
2633
  isOn: (S) => S.showStackTotals,
2634
- buildCommand: (S, b) => new zi({
2634
+ buildCommand: (S, b) => new Bi({
2635
2635
  layerId: S,
2636
2636
  showStackTotals: b
2637
2637
  })
@@ -2640,7 +2640,7 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
2640
2640
  label: o("editor.graphPanel.graphOptions.categoryLabels"),
2641
2641
  layers: c((S) => S.supportsCategoryLabels),
2642
2642
  isOn: (S) => S.showCategoryLabels,
2643
- buildCommand: (S, b) => new _i({
2643
+ buildCommand: (S, b) => new Fi({
2644
2644
  layerId: S,
2645
2645
  showCategoryLabels: b
2646
2646
  })
@@ -2679,7 +2679,7 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
2679
2679
  label: o("editor.graphPanel.graphOptions.smoothLines"),
2680
2680
  children: /* @__PURE__ */ a(l, {
2681
2681
  value: g,
2682
- options: $a.map((S) => ({
2682
+ options: Wa.map((S) => ({
2683
2683
  value: S,
2684
2684
  label: o(`editor.graphPanel.graphOptions.curves.${S}`),
2685
2685
  icon: /* @__PURE__ */ a(rg, { curve: S })
@@ -2693,16 +2693,16 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
2693
2693
  value: m,
2694
2694
  options: p.map((S) => ({
2695
2695
  value: S,
2696
- label: Al(o, S),
2696
+ label: Pl(o, S),
2697
2697
  icon: /* @__PURE__ */ a(og, { missingValues: S })
2698
2698
  })),
2699
2699
  onChange: k
2700
2700
  })
2701
2701
  }),
2702
- d.length > 0 && /* @__PURE__ */ v(K, { children: [/* @__PURE__ */ a(Dl, {
2702
+ d.length > 0 && /* @__PURE__ */ v(K, { children: [/* @__PURE__ */ a(_l, {
2703
2703
  widthPx: Vn(P.map((S) => S.strokeWidth)),
2704
2704
  onChange: N
2705
- }), /* @__PURE__ */ a(_l, {
2705
+ }), /* @__PURE__ */ a(Fl, {
2706
2706
  lineStyle: Vn(P.map((S) => S.lineStyle)),
2707
2707
  onChange: x
2708
2708
  })] }),
@@ -2720,7 +2720,7 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
2720
2720
  onChange: f
2721
2721
  })
2722
2722
  }),
2723
- w.length > 0 && /* @__PURE__ */ a(Zr, {
2723
+ w.length > 0 && /* @__PURE__ */ a(Jr, {
2724
2724
  sizePx: Vn(pm(e, t, w)),
2725
2725
  onChange: A
2726
2726
  }),
@@ -2728,15 +2728,15 @@ var XS = 512 * 1024, Qg = (e) => new Promise((t) => {
2728
2728
  /* @__PURE__ */ a(Ug, {})
2729
2729
  ] });
2730
2730
  };
2731
- zl.hasRows = (e, { scene: t, dataLabelPlacement: n }) => Tn(t.spec) !== null || Bl(t.layers, t.coordSystem.type, n).some(({ support: r }) => r.supportsDataLabels) || t.spec.layers.some((r) => r.interactive && ft(r, "line", "area"));
2732
- var Bl = (e, t, n) => e.filter((r) => r.interactive).map((r) => ({
2731
+ Bl.hasRows = (e, { scene: t, dataLabelPlacement: n }) => Tn(t.spec) !== null || Hl(t.layers, t.coordSystem.type, n).some(({ support: r }) => r.supportsDataLabels) || t.spec.layers.some((r) => r.interactive && bt(r, "line", "area"));
2732
+ var Hl = (e, t, n) => e.filter((r) => r.interactive).map((r) => ({
2733
2733
  layer: r,
2734
- support: Tl(r, t, n)
2734
+ support: Al(r, t, n)
2735
2735
  })), dm = (e, t) => {
2736
2736
  const n = [];
2737
2737
  for (const r of e.spec.layers) {
2738
2738
  if (!r.interactive) continue;
2739
- const o = qr(e, t, r.id);
2739
+ const o = Yr(e, t, r.id);
2740
2740
  o !== null && n.push(o);
2741
2741
  }
2742
2742
  return n;
@@ -2757,7 +2757,7 @@ var Bl = (e, t, n) => e.filter((r) => r.interactive).map((r) => ({
2757
2757
  }));
2758
2758
  }), hm = (e, t) => {
2759
2759
  if (t.showFill === !0) return !0;
2760
- const n = pt("line", t.layerId), r = xe(e.spec);
2760
+ const n = gt("line", t.layerId), r = xe(e.spec);
2761
2761
  return e.spec.styles.overrides.some((o) => !Pu(o) || o.when?.where === void 0 ? !1 : uu({
2762
2762
  ...n,
2763
2763
  when: o.when
@@ -2777,7 +2777,7 @@ var Bl = (e, t, n) => e.filter((r) => r.interactive).map((r) => ({
2777
2777
  const o = Se(), { Switch: i } = H();
2778
2778
  if (t.length === 0) return null;
2779
2779
  const l = (s) => {
2780
- o.dispatch(new st({ commands: t.map((c) => r(c.id, s)) }));
2780
+ o.dispatch(new ct({ commands: t.map((c) => r(c.id, s)) }));
2781
2781
  };
2782
2782
  return /* @__PURE__ */ a(L, {
2783
2783
  label: e,
@@ -2803,18 +2803,18 @@ var Bl = (e, t, n) => e.filter((r) => r.interactive).map((r) => ({
2803
2803
  return null;
2804
2804
  }, fm = ({ geom: e, coord: t, position: n }, r, o = "style", i = null) => {
2805
2805
  for (const l of r) {
2806
- const s = Va(Wa(l.layers, e)?.[t]?.[n], o), c = s !== void 0 ? s : Va(Wa(l.geoms, e), o);
2806
+ const s = Ua(Ka(l.layers, e)?.[t]?.[n], o), c = s !== void 0 ? s : Ua(Ka(l.geoms, e), o);
2807
2807
  if (c === null) return null;
2808
2808
  if (c !== void 0) return c;
2809
2809
  }
2810
2810
  return i;
2811
- }, bm = (e) => typeof e == "object" && ("style" in e || "annotate" in e), Va = (e, t) => e == null ? e : bm(e) ? e[t] : t === "style" ? e : void 0, Wa = (e, t) => e !== void 0 && Object.hasOwn(e, t) ? e[t] : void 0, un = [
2811
+ }, bm = (e) => typeof e == "object" && ("style" in e || "annotate" in e), Ua = (e, t) => e == null ? e : bm(e) ? e[t] : t === "style" ? e : void 0, Ka = (e, t) => e !== void 0 && Object.hasOwn(e, t) ? e[t] : void 0, un = [
2812
2812
  "solid",
2813
2813
  "dashed",
2814
2814
  "dotted"
2815
2815
  ];
2816
- var Hl = (e) => e.scaledAesthetic === "x" || e.scaledAesthetic === "y", Gl = (e, t) => {
2817
- const n = e.guides.axes.filter(Hl);
2816
+ var Gl = (e) => e.scaledAesthetic === "x" || e.scaledAesthetic === "y", $l = (e, t) => {
2817
+ const n = e.guides.axes.filter(Gl);
2818
2818
  if (n.length === 0) return null;
2819
2819
  const r = t.gridLine.y().resolve();
2820
2820
  return {
@@ -2827,10 +2827,10 @@ var Hl = (e) => e.scaledAesthetic === "x" || e.scaledAesthetic === "y", Gl = (e,
2827
2827
  if (e === "both") return t.axes.every((r) => !r.showGrid);
2828
2828
  const n = t.axes.find((r) => r.scaledAesthetic === e);
2829
2829
  return n === void 0 || !n.showGrid;
2830
- }, $l = (e, t = "both") => new Mi({
2830
+ }, Vl = (e, t = "both") => new Ei({
2831
2831
  axis: t,
2832
2832
  lineStyle: e
2833
- }), Vl = (e, t = "both") => new Mi({
2833
+ }), Wl = (e, t = "both") => new Ei({
2834
2834
  axis: t,
2835
2835
  strokeWidth: e
2836
2836
  }), Wn = [
@@ -2846,23 +2846,23 @@ var Hl = (e) => e.scaledAesthetic === "x" || e.scaledAesthetic === "y", Gl = (e,
2846
2846
  name: "thick",
2847
2847
  widthPx: 4
2848
2848
  }
2849
- ], Wl = ({ target: e }) => {
2850
- const t = F((y) => y), n = ee(), r = Gl(t, n), o = R(), i = Se(), { ToggleGroup: l } = H();
2849
+ ], Ul = ({ target: e }) => {
2850
+ const t = F((y) => y), n = ee(), r = $l(t, n), o = R(), i = Se(), { ToggleGroup: l } = H();
2851
2851
  if (r === null || !r.stylable) return null;
2852
2852
  const s = e.axis === "both" ? "y" : e.axis, c = n.gridLine[s]().resolve(), d = tt(c.dashArray), u = ym(e.axis, r), h = un.map((y) => ({
2853
2853
  value: y,
2854
2854
  label: o(`editor.graphPanel.gridSection.lineStyles.${y}`),
2855
- icon: /* @__PURE__ */ a(Rl, { lineStyle: y })
2855
+ icon: /* @__PURE__ */ a(Nl, { lineStyle: y })
2856
2856
  })), p = Wn.map(({ name: y, widthPx: k }) => ({
2857
2857
  value: y,
2858
2858
  label: o(`editor.graphPanel.gridSection.lineWidths.${y}`),
2859
- icon: /* @__PURE__ */ a(Nl, { lineWidth: k })
2859
+ icon: /* @__PURE__ */ a(Dl, { lineWidth: k })
2860
2860
  })), g = Wn.find(({ widthPx: y }) => y === c.strokeWidth)?.name ?? "", m = (y) => {
2861
2861
  const k = un.find((C) => C === y);
2862
- k !== void 0 && i.dispatch($l(k, e.axis));
2862
+ k !== void 0 && i.dispatch(Vl(k, e.axis));
2863
2863
  }, f = (y) => {
2864
2864
  const k = Wn.find(({ name: C }) => C === y);
2865
- k !== void 0 && i.dispatch(Vl(k.widthPx, e.axis));
2865
+ k !== void 0 && i.dispatch(Wl(k.widthPx, e.axis));
2866
2866
  };
2867
2867
  return /* @__PURE__ */ v(K, { children: [/* @__PURE__ */ a(L, {
2868
2868
  label: o("editor.graphPanel.gridSection.gridStyle"),
@@ -2882,12 +2882,12 @@ var Hl = (e) => e.scaledAesthetic === "x" || e.scaledAesthetic === "y", Gl = (e,
2882
2882
  })
2883
2883
  })] });
2884
2884
  };
2885
- Wl.hasRows = (e, { scene: t }) => {
2885
+ Ul.hasRows = (e, { scene: t }) => {
2886
2886
  if (t.coordSystem.type === "polar") return !1;
2887
- const n = t.guides.axes.filter(Hl);
2887
+ const n = t.guides.axes.filter(Gl);
2888
2888
  return n.length === 0 ? !1 : e.axis === "both" ? !0 : n.some((r) => r.scaledAesthetic === e.axis);
2889
2889
  };
2890
- var Ua = [
2890
+ var ja = [
2891
2891
  {
2892
2892
  position: "top",
2893
2893
  align: "start",
@@ -2941,7 +2941,7 @@ var Ua = [
2941
2941
  center: "Center",
2942
2942
  end: "End"
2943
2943
  }, Cm = () => {
2944
- const e = F((c) => c.guides.legends.drawn[0]), t = Se(), n = R(), { RadioGrid: r } = H(), o = e === void 0, i = o ? "" : Un(e), l = Ua.map((c) => {
2944
+ const e = F((c) => c.guides.legends.drawn[0]), t = Se(), n = R(), { RadioGrid: r } = H(), o = e === void 0, i = o ? "" : Un(e), l = ja.map((c) => {
2945
2945
  const d = Un(c);
2946
2946
  return {
2947
2947
  value: d,
@@ -2955,7 +2955,7 @@ var Ua = [
2955
2955
  gridColumn: c.gridColumn
2956
2956
  };
2957
2957
  }), s = (c) => {
2958
- const d = Ua.find((u) => Un(u) === c);
2958
+ const d = ja.find((u) => Un(u) === c);
2959
2959
  d !== void 0 && t.dispatch(new $d({
2960
2960
  position: d.position,
2961
2961
  align: d.align
@@ -2963,7 +2963,7 @@ var Ua = [
2963
2963
  };
2964
2964
  return /* @__PURE__ */ a(L, {
2965
2965
  label: n("editor.axesPanel.controls.position"),
2966
- children: /* @__PURE__ */ a(Kr, {
2966
+ children: /* @__PURE__ */ a(jr, {
2967
2967
  direction: "ltr",
2968
2968
  children: /* @__PURE__ */ a("div", {
2969
2969
  dir: "ltr",
@@ -2979,18 +2979,18 @@ var Ua = [
2979
2979
  })
2980
2980
  })
2981
2981
  });
2982
- }, Un = ({ position: e, align: t }) => e === "left" || e === "right" ? e : `${e}${Sm[t]}`, wm = ({ gridRow: e, gridColumn: t }) => Math.atan2(t - 2, 2 - e) * 180 / Math.PI, Ul = (e, t, n, r) => {
2983
- const o = jl(e, n, r)?.size;
2982
+ }, Un = ({ position: e, align: t }) => e === "left" || e === "right" ? e : `${e}${Sm[t]}`, wm = ({ gridRow: e, gridColumn: t }) => Math.atan2(t - 2, 2 - e) * 180 / Math.PI, Kl = (e, t, n, r) => {
2983
+ const o = Xl(e, n, r)?.size;
2984
2984
  if (typeof o == "number") return o;
2985
2985
  const i = q(e.layers, n);
2986
- return i?.geom === "point" ? t.geom.point(i).get("size") : bi;
2987
- }, Kl = (e, t, n, r) => {
2988
- const o = jl(e, n, r)?.symbol;
2986
+ return i?.geom === "point" ? t.geom.point(i).get("size") : yi;
2987
+ }, jl = (e, t, n, r) => {
2988
+ const o = Xl(e, n, r)?.symbol;
2989
2989
  if (o !== void 0) return o;
2990
2990
  const i = q(e.layers, n);
2991
2991
  return i?.geom === "point" ? t.geom.point(i).get("symbol") : "circle";
2992
- }, jl = (e, t, n) => n === void 0 ? void 0 : rn(e.spec.styles.overrides, {
2993
- ...pt("point", t),
2992
+ }, Xl = (e, t, n) => n === void 0 ? void 0 : rn(e.spec.styles.overrides, {
2993
+ ...gt("point", t),
2994
2994
  when: { where: n }
2995
2995
  }, xe(e.spec)), mr = ({ target: e }) => {
2996
2996
  const t = Et();
@@ -2999,12 +2999,12 @@ var Ua = [
2999
2999
  target: e
3000
3000
  });
3001
3001
  };
3002
- mr.hasRows = (e, { scene: t }) => e.scope === "group" && Xl(t, e.layerId) !== null;
3002
+ mr.hasRows = (e, { scene: t }) => e.scope === "group" && ql(t, e.layerId) !== null;
3003
3003
  var xm = ({ graph: e, target: t }) => {
3004
- const n = Q(e), r = ee(), o = R(), { Switch: i } = H(), l = n === null ? null : Xl(n, t.layerId), s = n === null || l === null ? null : qr(n, r, l.id);
3004
+ const n = Q(e), r = ee(), o = R(), { Switch: i } = H(), l = n === null ? null : ql(n, t.layerId), s = n === null || l === null ? null : Yr(n, r, l.id);
3005
3005
  if (n === null || l === null || s === null) return null;
3006
- const c = Pm(n, t), d = c === void 0 ? {} : { where: c }, u = c === void 0 || l.geom !== "line" ? void 0 : Am(n, s.layerId, c), h = u === void 0 ? s.showFill : u > 0, p = c === void 0 ? null : km(n, l.geom, s.layerId, c), g = c === void 0 ? s.strokeWidth : p ?? Tm(n, r, t) ?? s.strokeWidth, m = s.pointLayerId === null ? null : Ul(n, r, s.pointLayerId, c), f = s.pointLayerId === null ? null : Kl(n, r, s.pointLayerId, c), y = m !== null && m > 0, k = (x) => {
3007
- e.commands.dispatch(new Br({
3006
+ const c = Pm(n, t), d = c === void 0 ? {} : { where: c }, u = c === void 0 || l.geom !== "line" ? void 0 : Am(n, s.layerId, c), h = u === void 0 ? s.showFill : u > 0, p = c === void 0 ? null : km(n, l.geom, s.layerId, c), g = c === void 0 ? s.strokeWidth : p ?? Tm(n, r, t) ?? s.strokeWidth, m = s.pointLayerId === null ? null : Kl(n, r, s.pointLayerId, c), f = s.pointLayerId === null ? null : jl(n, r, s.pointLayerId, c), y = m !== null && m > 0, k = (x) => {
3007
+ e.commands.dispatch(new Hr({
3008
3008
  layerId: s.layerId,
3009
3009
  showPoints: x,
3010
3010
  ...d
@@ -3029,7 +3029,7 @@ var xm = ({ graph: e, target: t }) => {
3029
3029
  ...d
3030
3030
  }));
3031
3031
  }, T = (x) => {
3032
- s.pointLayerId !== null && e.commands.dispatch(new zr({
3032
+ s.pointLayerId !== null && e.commands.dispatch(new Br({
3033
3033
  layerId: s.pointLayerId,
3034
3034
  symbol: x,
3035
3035
  ...d
@@ -3043,11 +3043,11 @@ var xm = ({ graph: e, target: t }) => {
3043
3043
  }, N = An(n.spec, t)?.some((x) => x.geomKind === "line" || x.geomKind === "area") === !0;
3044
3044
  return /* @__PURE__ */ v(K, { children: [
3045
3045
  /* @__PURE__ */ a(He, { target: t }),
3046
- /* @__PURE__ */ a(Dl, {
3046
+ /* @__PURE__ */ a(_l, {
3047
3047
  widthPx: g,
3048
3048
  onChange: w
3049
3049
  }),
3050
- N && /* @__PURE__ */ a(_l, {
3050
+ N && /* @__PURE__ */ a(Fl, {
3051
3051
  lineStyle: Lm(n, r, t),
3052
3052
  onChange: I
3053
3053
  }),
@@ -3065,11 +3065,11 @@ var xm = ({ graph: e, target: t }) => {
3065
3065
  onChange: k
3066
3066
  })
3067
3067
  }),
3068
- y && /* @__PURE__ */ a(Zr, {
3068
+ y && /* @__PURE__ */ a(Jr, {
3069
3069
  sizePx: m,
3070
3070
  onChange: P
3071
3071
  }),
3072
- y && /* @__PURE__ */ a(Yr, {
3072
+ y && /* @__PURE__ */ a(Zr, {
3073
3073
  symbol: f,
3074
3074
  coordType: n.coordSystem.type,
3075
3075
  onChange: T
@@ -3077,10 +3077,10 @@ var xm = ({ graph: e, target: t }) => {
3077
3077
  ] });
3078
3078
  }, km = (e, t, n, r) => {
3079
3079
  const o = (t === "line" ? rn(e.spec.styles.overrides, {
3080
- ...pt("line", n),
3080
+ ...gt("line", n),
3081
3081
  when: { where: r }
3082
3082
  }, xe(e.spec)) : rn(e.spec.styles.overrides, {
3083
- ...pt("area", n),
3083
+ ...gt("area", n),
3084
3084
  when: { where: r }
3085
3085
  }, xe(e.spec)))?.strokeWidth;
3086
3086
  return typeof o == "number" ? o : null;
@@ -3095,7 +3095,7 @@ var xm = ({ graph: e, target: t }) => {
3095
3095
  return typeof s == "number" ? s : null;
3096
3096
  }, Am = (e, t, n) => {
3097
3097
  const r = rn(e.spec.styles.overrides, {
3098
- ...pt("line", t),
3098
+ ...gt("line", t),
3099
3099
  when: { where: n }
3100
3100
  }, xe(e.spec))?.fillAlpha;
3101
3101
  return typeof r == "number" ? r : void 0;
@@ -3108,12 +3108,12 @@ var xm = ({ graph: e, target: t }) => {
3108
3108
  parsingLocale: e.config.parsingLocale
3109
3109
  }), l = i === void 0 ? null : o.data.getAt(i);
3110
3110
  return tt(o.geom === "line" ? t.geom.line(o).get("dashArray", l ?? void 0) : t.geom.area(o).get("dashArray", l ?? void 0));
3111
- }, Xl = (e, t) => {
3111
+ }, ql = (e, t) => {
3112
3112
  const n = q(e.spec.layers, t);
3113
3113
  if (n === void 0) return null;
3114
3114
  const r = xn(n, e.spec.layers);
3115
- return ft(r, "line", "area") ? r : null;
3116
- }, ql = (e) => /* @__PURE__ */ v(M, {
3115
+ return bt(r, "line", "area") ? r : null;
3116
+ }, Yl = (e) => /* @__PURE__ */ v(M, {
3117
3117
  viewBox: "0 0 16 16",
3118
3118
  ...e,
3119
3119
  children: [
@@ -3138,7 +3138,7 @@ var xm = ({ graph: e, target: t }) => {
3138
3138
  clipRule: "evenodd"
3139
3139
  })
3140
3140
  ]
3141
- }), Im = "_1aafi1g0", Mm = "_1aafi1g1", Ka = ({ children: e }) => /* @__PURE__ */ v("span", {
3141
+ }), Im = "_1aafi1g0", Mm = "_1aafi1g1", vr = ({ children: e }) => /* @__PURE__ */ v("span", {
3142
3142
  className: Im,
3143
3143
  "aria-hidden": "true",
3144
3144
  children: [e, /* @__PURE__ */ a("span", { className: Mm })]
@@ -3150,7 +3150,7 @@ var xm = ({ graph: e, target: t }) => {
3150
3150
  fill: "currentColor",
3151
3151
  fillOpacity: "0.8"
3152
3152
  })
3153
- }), ja = (e) => /* @__PURE__ */ v(M, {
3153
+ }), Xa = (e) => /* @__PURE__ */ v(M, {
3154
3154
  viewBox: "0 0 16 16",
3155
3155
  ...e,
3156
3156
  children: [/* @__PURE__ */ a("path", {
@@ -3163,7 +3163,7 @@ var xm = ({ graph: e, target: t }) => {
3163
3163
  fill: "currentColor",
3164
3164
  fillOpacity: "0.8"
3165
3165
  })]
3166
- }), Yl = (e) => /* @__PURE__ */ v(M, {
3166
+ }), Zl = (e) => /* @__PURE__ */ v(M, {
3167
3167
  viewBox: "0 0 16 16",
3168
3168
  ...e,
3169
3169
  children: [
@@ -3186,7 +3186,7 @@ var xm = ({ graph: e, target: t }) => {
3186
3186
  fillOpacity: "0.8"
3187
3187
  })
3188
3188
  ]
3189
- }), Zl = (e) => /* @__PURE__ */ v(M, {
3189
+ }), Qr = (e) => /* @__PURE__ */ v(M, {
3190
3190
  viewBox: "0 0 16 16",
3191
3191
  ...e,
3192
3192
  children: [
@@ -3271,7 +3271,7 @@ function Rm(e, t) {
3271
3271
  }
3272
3272
  var Nm = (e) => {
3273
3273
  const t = Oe(e.mapping.x);
3274
- return t !== null && t !== _r.x;
3274
+ return t !== null && t !== Fr.x;
3275
3275
  }, Dm = (e, t, n, r) => {
3276
3276
  const o = [], i = _m(e, t, n, r);
3277
3277
  i !== null && o.push({
@@ -3289,11 +3289,11 @@ var Nm = (e) => {
3289
3289
  predicate: l.predicate
3290
3290
  }), o;
3291
3291
  }, es = (e, t) => {
3292
- const n = t.find((r) => Jr(e.predicate, r.predicate));
3292
+ const n = t.find((r) => ea(e.predicate, r.predicate));
3293
3293
  return n === void 0 ? e.scope : n.id;
3294
3294
  }, _m = (e, t, n, r) => {
3295
3295
  const o = Oe(e.mapping.y), i = Oe(e.mapping.x);
3296
- if (o === null || i === null || i === _r.x || !e.data.hasVariable(o) || e.data.getType(o) !== "numeric") return null;
3296
+ if (o === null || i === null || i === Fr.x || !e.data.hasVariable(o) || e.data.getType(o) !== "numeric") return null;
3297
3297
  const l = ts(t, o);
3298
3298
  return l === null || !Gm(e, o, l) ? null : {
3299
3299
  variable: o,
@@ -3302,7 +3302,7 @@ var Nm = (e) => {
3302
3302
  };
3303
3303
  }, Fm = (e, t, n, r) => {
3304
3304
  const o = Oe(e.mapping.x);
3305
- if (o === null || o === _r.x || !e.data.hasVariable(o) || e.data.getType(o) === "numeric") return null;
3305
+ if (o === null || o === Fr.x || !e.data.hasVariable(o) || e.data.getType(o) === "numeric") return null;
3306
3306
  const i = t[o] ?? null;
3307
3307
  if (i === null) return null;
3308
3308
  const l = zm(e, t);
@@ -3319,7 +3319,7 @@ var Nm = (e) => {
3319
3319
  };
3320
3320
  }, zm = (e, t) => {
3321
3321
  const n = [];
3322
- for (const r of Vr(e.data, e.mapping)) {
3322
+ for (const r of Wr(e.data, e.mapping)) {
3323
3323
  const o = t[r] ?? null;
3324
3324
  if (o === null) return null;
3325
3325
  n.push({
@@ -3354,19 +3354,19 @@ var Nm = (e) => {
3354
3354
  const n = e[je.yRaw], r = typeof n == "number" ? n : e[t];
3355
3355
  return typeof r == "number" && Number.isFinite(r) ? r : null;
3356
3356
  }, ns = (e, t, n, r, o) => {
3357
- const i = $r({
3357
+ const i = Vr({
3358
3358
  valueFormat: e.data.getValueFormat(t),
3359
3359
  locale: r,
3360
3360
  numberFormat: o
3361
3361
  })(n);
3362
3362
  return i.length > 0 ? i : String(n);
3363
- }, Mt = (e) => e instanceof Date ? String(e.getTime()) : String(e), Jr = (e, t) => "and" in e || "and" in t ? "and" in e && "and" in t && Xa(e.and, t.and) : "or" in e || "or" in t ? "or" in e && "or" in t && Xa(e.or, t.or) : "not" in e || "not" in t ? "not" in e && "not" in t && Jr(e.not, t.not) : e.variable !== t.variable ? !1 : "eq" in e || "eq" in t ? "eq" in e && "eq" in t && lt(e.eq, t.eq) : "oneOf" in e || "oneOf" in t ? "oneOf" in e && "oneOf" in t && qa(e.oneOf, t.oneOf) : "lt" in e || "lt" in t ? "lt" in e && "lt" in t && lt(e.lt, t.lt) : "lte" in e || "lte" in t ? "lte" in e && "lte" in t && lt(e.lte, t.lte) : "gt" in e || "gt" in t ? "gt" in e && "gt" in t && lt(e.gt, t.gt) : "gte" in e || "gte" in t ? "gte" in e && "gte" in t && lt(e.gte, t.gte) : "range" in e && "range" in t && qa(e.range, t.range), Xa = (e, t) => e.length === t.length && e.every((n, r) => {
3363
+ }, Mt = (e) => e instanceof Date ? String(e.getTime()) : String(e), ea = (e, t) => "and" in e || "and" in t ? "and" in e && "and" in t && qa(e.and, t.and) : "or" in e || "or" in t ? "or" in e && "or" in t && qa(e.or, t.or) : "not" in e || "not" in t ? "not" in e && "not" in t && ea(e.not, t.not) : e.variable !== t.variable ? !1 : "eq" in e || "eq" in t ? "eq" in e && "eq" in t && st(e.eq, t.eq) : "oneOf" in e || "oneOf" in t ? "oneOf" in e && "oneOf" in t && Ya(e.oneOf, t.oneOf) : "lt" in e || "lt" in t ? "lt" in e && "lt" in t && st(e.lt, t.lt) : "lte" in e || "lte" in t ? "lte" in e && "lte" in t && st(e.lte, t.lte) : "gt" in e || "gt" in t ? "gt" in e && "gt" in t && st(e.gt, t.gt) : "gte" in e || "gte" in t ? "gte" in e && "gte" in t && st(e.gte, t.gte) : "range" in e && "range" in t && Ya(e.range, t.range), qa = (e, t) => e.length === t.length && e.every((n, r) => {
3364
3364
  const o = t[r];
3365
- return o !== void 0 && Jr(n, o);
3366
- }), qa = (e, t) => e.length === t.length && e.every((n, r) => {
3365
+ return o !== void 0 && ea(n, o);
3366
+ }), Ya = (e, t) => e.length === t.length && e.every((n, r) => {
3367
3367
  const o = t[r];
3368
- return o !== void 0 && lt(n, o);
3369
- }), lt = (e, t) => e instanceof Date || t instanceof Date ? e instanceof Date && t instanceof Date && e.getTime() === t.getTime() : e === t, $m = (e, t) => {
3368
+ return o !== void 0 && st(n, o);
3369
+ }), st = (e, t) => e instanceof Date || t instanceof Date ? e instanceof Date && t instanceof Date && e.getTime() === t.getTime() : e === t, $m = (e, t) => {
3370
3370
  const n = F((o) => o.spec.highlights), r = F((o) => o.config.parsingLocale);
3371
3371
  return _(() => vu({
3372
3372
  layer: e,
@@ -3391,7 +3391,7 @@ var Nm = (e) => {
3391
3391
  }
3392
3392
  };
3393
3393
  const { parsingLocale: n, numberFormat: r } = e.config, o = t ?? n, i = e.guides.colorGroups.map((l) => {
3394
- const s = $r({
3394
+ const s = Vr({
3395
3395
  valueFormat: l.valueFormat,
3396
3396
  locale: o,
3397
3397
  numberFormat: r
@@ -3409,27 +3409,27 @@ var Nm = (e) => {
3409
3409
  findValue: (l) => i.find((s) => s.option.value === l)?.value
3410
3410
  };
3411
3411
  }, [e, t]), rs = ({ scene: e, layer: t, observation: n, groupOptions: r, locale: o, t: i }) => {
3412
- const l = fr(e, t, n, r);
3412
+ const l = br(e, t, n, r);
3413
3413
  return {
3414
3414
  observation: i(jm(e, t)),
3415
3415
  xValue: i("editor.overlayMenu.allOf", { name: as(e, t, n, o) }),
3416
3416
  group: l === null ? i("editor.overlayMenu.all") : i("editor.overlayMenu.allOf", { name: l })
3417
3417
  };
3418
- }, vr = ({ scene: e, layer: t, observation: n, groupOptions: r, locale: o, t: i }, l) => {
3419
- const s = Vr(t.data, t.mapping), c = as(e, t, n, o);
3418
+ }, fr = ({ scene: e, layer: t, observation: n, groupOptions: r, locale: o, t: i }, l) => {
3419
+ const s = Wr(t.data, t.mapping), c = as(e, t, n, o);
3420
3420
  switch (l) {
3421
3421
  case "observation": {
3422
- const d = s.length === 0 ? null : fr(e, t, n, r), u = Um(d, c, i);
3422
+ const d = s.length === 0 ? null : br(e, t, n, r), u = Um(d, c, i);
3423
3423
  return {
3424
3424
  whole: u,
3425
3425
  value: u
3426
3426
  };
3427
3427
  }
3428
3428
  case "xValue":
3429
- return Ya(Gi(e.guides, "x")?.label ?? null, c, i);
3429
+ return Za($i(e.guides, "x")?.label ?? null, c, i);
3430
3430
  case "group": {
3431
- const d = fr(e, t, n, r) ?? i("editor.overlayMenu.all");
3432
- return Ya(Km(e, s), d, i);
3431
+ const d = br(e, t, n, r) ?? i("editor.overlayMenu.all");
3432
+ return Za(Km(e, s), d, i);
3433
3433
  }
3434
3434
  default:
3435
3435
  return l;
@@ -3437,7 +3437,7 @@ var Nm = (e) => {
3437
3437
  }, Um = (e, t, n) => e === null ? t : t === "" ? e : n("editor.overlayMenu.groupAtBand", {
3438
3438
  group: e,
3439
3439
  band: t
3440
- }), Ya = (e, t, n) => ({
3440
+ }), Za = (e, t, n) => ({
3441
3441
  whole: e === null || e === "" ? t : n("editor.overlayMenu.titledValue", {
3442
3442
  title: e,
3443
3443
  value: t
@@ -3456,14 +3456,14 @@ var Nm = (e) => {
3456
3456
  return "editor.overlayMenu.thisPoint";
3457
3457
  }
3458
3458
  }, as = (e, t, n, r) => {
3459
- const o = Gi(e.guides, "x");
3460
- return $r({
3459
+ const o = $i(e.guides, "x");
3460
+ return Vr({
3461
3461
  valueFormat: o === null ? { type: "text" } : Ju(o, t.id),
3462
3462
  locale: r,
3463
3463
  numberFormat: e.config.numberFormat
3464
3464
  })(hu(t.data, t.mapping)(n), n);
3465
- }, fr = (e, t, n, r) => {
3466
- const o = Vr(t.data, t.mapping);
3465
+ }, br = (e, t, n, r) => {
3466
+ const o = Wr(t.data, t.mapping);
3467
3467
  return o.length === 0 ? Xm(t, n) ?? qm(e, t) : o.map((i) => Ym(n[i] ?? null, r)).join(", ");
3468
3468
  }, Xm = (e, t) => {
3469
3469
  const n = Ou(e, t);
@@ -3505,15 +3505,15 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
3505
3505
  }, us = {
3506
3506
  pinnedNumber: {
3507
3507
  phrase: "graph.annotations.baseMenu.unpinNumber",
3508
- Icon: Yl
3508
+ Icon: Zl
3509
3509
  },
3510
3510
  comment: {
3511
3511
  phrase: "graph.annotations.baseMenu.removeAnnotation",
3512
- Icon: ql
3512
+ Icon: Yl
3513
3513
  },
3514
3514
  sticker: {
3515
3515
  phrase: "graph.annotations.baseMenu.removeSticker",
3516
- Icon: Zl
3516
+ Icon: Qr
3517
3517
  }
3518
3518
  }, hs = /* @__PURE__ */ new Set([
3519
3519
  "barSeries",
@@ -3524,7 +3524,7 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
3524
3524
  "linePoint",
3525
3525
  "scatterPoint",
3526
3526
  "pieSlice"
3527
- ]), Qr = (e) => {
3527
+ ]), ta = (e) => {
3528
3528
  const t = ({ target: n }) => {
3529
3529
  const r = Ah(n);
3530
3530
  return r === null ? null : /* @__PURE__ */ a(l1, {
@@ -3532,8 +3532,8 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
3532
3532
  readHighlightOptions: e
3533
3533
  });
3534
3534
  };
3535
- return t.hasRows = (n, { scene: r }) => ol(n, r) !== null, t;
3536
- }, tn = Qr((e, t) => Rm(t, e)), Za = Qr(Jl), i1 = Qr(Ql), l1 = ({ anchor: e, readHighlightOptions: t }) => {
3535
+ return t.hasRows = (n, { scene: r }) => il(n, r) !== null, t;
3536
+ }, tn = ta((e, t) => Rm(t, e)), Ja = ta(Jl), i1 = ta(Ql), l1 = ({ anchor: e, readHighlightOptions: t }) => {
3537
3537
  const { layer: n, observation: r, at: o } = e, i = R(), { dispatch: l, paintPreview: s, clearPreview: c } = Se(), { selectionStore: d } = W(), u = X(null), h = X(c);
3538
3538
  h.current = c;
3539
3539
  const { Button: p } = H(), g = F(($) => $), m = g.spec.annotations, f = g.config.parsingLocale, y = g.config.numberFormat, k = Sn(), C = {
@@ -3543,7 +3543,7 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
3543
3543
  groupOptions: En(g, k),
3544
3544
  locale: k,
3545
3545
  t: i
3546
- }, w = vr(C, "xValue").value, P = vr(C, "group").value, T = rs(C).observation, I = fu(m, o, _(() => cu(n, f), [n, f])), N = I !== null && Wm(I) ? I : null, x = u.current, O = N !== null && x?.key.startsWith("sticker:") === !0 && N.kind === "sticker" ? null : N, A = O?.kind === "comment" ? O.annotation.content : null, S = A === null ? "" : C1(A) ?? void 0, [b, E] = Z(() => y1(N?.kind)), z = $m(n, r), U = g.coordSystem, j = t(n, U), se = j.length === 0 ? [] : Dm(n, r, k, y), ge = (x?.choiceId === void 0 ? z : z.filter(($) => es($, se) !== x.choiceId)).at(-1), de = _(() => Au({
3546
+ }, w = fr(C, "xValue").value, P = fr(C, "group").value, T = rs(C).observation, I = fu(m, o, _(() => cu(n, f), [n, f])), N = I !== null && Wm(I) ? I : null, x = u.current, O = N !== null && x?.key.startsWith("sticker:") === !0 && N.kind === "sticker" ? null : N, A = O?.kind === "comment" ? O.annotation.content : null, S = A === null ? "" : C1(A) ?? void 0, [b, E] = Z(() => y1(N?.kind)), z = $m(n, r), U = g.coordSystem, j = t(n, U), se = j.length === 0 ? [] : Dm(n, r, k, y), ge = (x?.choiceId === void 0 ? z : z.filter(($) => es($, se) !== x.choiceId)).at(-1), de = _(() => Au({
3547
3547
  layer: n,
3548
3548
  at: o,
3549
3549
  coordSystem: U
@@ -3559,10 +3559,10 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
3559
3559
  reaches: se,
3560
3560
  previewedChoiceId: u.current?.choiceId,
3561
3561
  scopeLabel: ($) => f1(i, $, w, P, T),
3562
- scopeDescription: ($) => b1(i, $, Ja(i, n, j), w, P, j.some((me) => hs.has(me.labelKey))),
3562
+ scopeDescription: ($) => b1(i, $, Qa(i, n, j), w, P, j.some((me) => hs.has(me.labelKey))),
3563
3563
  atLeastLabel: ($) => i("graph.annotations.highlights.atLeast", { value: $ }),
3564
3564
  atLeastDescription: ($) => i("graph.annotations.highlights.atLeastDescription", {
3565
- noun: Ja(i, n, j),
3565
+ noun: Qa(i, n, j),
3566
3566
  value: $
3567
3567
  }),
3568
3568
  onwardLabel: ($) => i("graph.annotations.highlights.onward", { label: $ }),
@@ -3590,13 +3590,13 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
3590
3590
  onClick: () => ke($, me)
3591
3591
  }), ot = ($) => {
3592
3592
  G(), E((me) => me === $ ? null : $);
3593
- }, St = ($) => {
3593
+ }, Ct = ($) => {
3594
3594
  if (de === null) return;
3595
3595
  G();
3596
- const me = Hr(de.start, o) ? de.end : de.start, Ue = new we({
3596
+ const me = Gr(de.start, o) ? de.end : de.start, Ue = new we({
3597
3597
  kind: "differenceArrow",
3598
3598
  annotation: {
3599
- ...yi,
3599
+ ...Si,
3600
3600
  start: o,
3601
3601
  end: me,
3602
3602
  label: $
@@ -3626,7 +3626,7 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
3626
3626
  variant: "icon",
3627
3627
  ...Ke,
3628
3628
  ariaLabel: i("graph.annotations.baseMenu.highlight"),
3629
- icon: /* @__PURE__ */ a(ja, {}),
3629
+ icon: /* @__PURE__ */ a(Xa, {}),
3630
3630
  expanded: b === "highlight",
3631
3631
  onClick: () => ot("highlight")
3632
3632
  }),
@@ -3634,21 +3634,21 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
3634
3634
  variant: "icon",
3635
3635
  ...Ke,
3636
3636
  ariaLabel: i("graph.annotations.baseMenu.removeHighlight"),
3637
- icon: /* @__PURE__ */ a(Ka, { children: /* @__PURE__ */ a(ja, {}) }),
3637
+ icon: /* @__PURE__ */ a(vr, { children: /* @__PURE__ */ a(Xa, {}) }),
3638
3638
  onClick: () => re(new Md({ id: ge.id }))
3639
3639
  }),
3640
3640
  O !== null && /* @__PURE__ */ a(p, {
3641
3641
  variant: "icon",
3642
3642
  ...Ke,
3643
3643
  ariaLabel: i(us[O.kind].phrase),
3644
- icon: /* @__PURE__ */ a(Ka, { children: s1(O.kind) }),
3644
+ icon: /* @__PURE__ */ a(vr, { children: s1(O.kind) }),
3645
3645
  onClick: () => re(new ze({ id: O.annotation.id }))
3646
3646
  }),
3647
3647
  O === null && /* @__PURE__ */ v(K, { children: [/* @__PURE__ */ a(p, {
3648
3648
  variant: "icon",
3649
3649
  ...Ke,
3650
3650
  ariaLabel: i("graph.annotations.baseMenu.pinNumber"),
3651
- icon: /* @__PURE__ */ a(Yl, {}),
3651
+ icon: /* @__PURE__ */ a(Zl, {}),
3652
3652
  onClick: () => re(new we({
3653
3653
  kind: "pinnedNumber",
3654
3654
  annotation: { at: o }
@@ -3657,7 +3657,7 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
3657
3657
  variant: "icon",
3658
3658
  ...Ke,
3659
3659
  ariaLabel: i("graph.annotations.baseMenu.addNote"),
3660
- icon: /* @__PURE__ */ a(ql, {}),
3660
+ icon: /* @__PURE__ */ a(Yl, {}),
3661
3661
  expanded: b === "comment",
3662
3662
  onClick: () => ot("comment")
3663
3663
  })] }),
@@ -3673,7 +3673,7 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
3673
3673
  variant: "icon",
3674
3674
  ...Ke,
3675
3675
  ariaLabel: i("graph.annotations.baseMenu.addSticker"),
3676
- icon: /* @__PURE__ */ a(Zl, {}),
3676
+ icon: /* @__PURE__ */ a(Qr, {}),
3677
3677
  expanded: b === "sticker",
3678
3678
  onClick: () => ot("sticker")
3679
3679
  })
@@ -3708,7 +3708,7 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
3708
3708
  "aria-hidden": "true",
3709
3709
  children: "%"
3710
3710
  })] }),
3711
- onClick: () => St("relativeDifference")
3711
+ onClick: () => Ct("relativeDifference")
3712
3712
  }), /* @__PURE__ */ a(p, {
3713
3713
  variant: "icon",
3714
3714
  ariaLabel: i("graph.annotations.differenceArrowToolbar.labelKind.asNumber"),
@@ -3717,7 +3717,7 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
3717
3717
  "aria-hidden": "true",
3718
3718
  children: "+n"
3719
3719
  })] }),
3720
- onClick: () => St("absoluteDifference")
3720
+ onClick: () => Ct("absoluteDifference")
3721
3721
  })]
3722
3722
  }),
3723
3723
  b === "highlight" && Ie !== null && /* @__PURE__ */ a("div", {
@@ -3737,7 +3737,8 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
3737
3737
  }, c1 = ({ at: e, onRun: t, annotationId: n, initialText: r = "" }) => {
3738
3738
  const o = R(), { Button: i, TextField: l } = H(), [s, c] = Z(r), d = X(null), u = s.trim();
3739
3739
  B(() => {
3740
- d.current?.querySelector("input")?.focus();
3740
+ const p = d.current?.querySelector("input");
3741
+ p instanceof HTMLInputElement && p.focus({ preventScroll: !0 });
3741
3742
  }, []);
3742
3743
  const h = () => {
3743
3744
  if (u.length === 0) return;
@@ -3862,7 +3863,7 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
3862
3863
  if (!hs.has(t)) return i;
3863
3864
  const l = e("editor.overlayMenu.all");
3864
3865
  return r === "" || r === l ? i : e("editor.overlayMenu.allOf", { name: r });
3865
- }, Ja = (e, t, n) => {
3866
+ }, Qa = (e, t, n) => {
3866
3867
  if (t.geom === "point" && Oe(t.mapping.size) !== null) return e("graph.annotations.highlights.nouns.bubble");
3867
3868
  const r = n.find((o) => o.scope === "observation") ?? n[0];
3868
3869
  return e(r === void 0 ? "graph.annotations.highlights.labels.pointOrBar" : `graph.annotations.highlights.labels.${r.labelKey}`);
@@ -3900,10 +3901,10 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
3900
3901
  }, C1 = (e) => {
3901
3902
  if (e.type !== "doc" || e.content?.length !== 1) return null;
3902
3903
  const t = e.content[0];
3903
- if (t?.type !== "paragraph" || Qa(t) || eo(t) || t.content?.length !== 1) return null;
3904
+ if (t?.type !== "paragraph" || eo(t) || to(t) || t.content?.length !== 1) return null;
3904
3905
  const n = t.content[0];
3905
- return n?.type !== "text" || n.text === void 0 || n.content !== void 0 || Qa(n) || eo(n) ? null : n.text;
3906
- }, Qa = (e) => e.marks !== void 0 && e.marks.length > 0, eo = (e) => e.attrs !== void 0 && Object.keys(e.attrs).length > 0, w1 = (e) => ({
3906
+ return n?.type !== "text" || n.text === void 0 || n.content !== void 0 || eo(n) || to(n) ? null : n.text;
3907
+ }, eo = (e) => e.marks !== void 0 && e.marks.length > 0, to = (e) => e.attrs !== void 0 && Object.keys(e.attrs).length > 0, w1 = (e) => ({
3907
3908
  type: "doc",
3908
3909
  content: [{
3909
3910
  type: "paragraph",
@@ -3919,15 +3920,15 @@ var e1 = "vez73g7", t1 = "vez73g8", n1 = "vez73g9", ls = "vez73ga", ss = "vez73g
3919
3920
  target: e
3920
3921
  });
3921
3922
  };
3922
- ps.hasRows = (e, t) => ft(q(t.scene.spec.layers, e.layerId), "point") ? !0 : He.hasRows(e, t);
3923
+ ps.hasRows = (e, t) => bt(q(t.scene.spec.layers, e.layerId), "point") ? !0 : He.hasRows(e, t);
3923
3924
  var x1 = ({ graph: e, target: t }) => {
3924
3925
  const n = Q(e), r = ee(), o = n === null ? void 0 : q(n.spec.layers, t.layerId);
3925
- if (n === null || !ft(o, "point")) return /* @__PURE__ */ a(He, { target: t });
3926
+ if (n === null || !bt(o, "point")) return /* @__PURE__ */ a(He, { target: t });
3926
3927
  const i = An(n.spec, t)?.find((c) => c.geomKind === "point")?.where, l = i === void 0 ? {} : { where: i }, s = Oe(q(n.layers, o.id)?.mapping.size) !== null;
3927
3928
  return /* @__PURE__ */ v(K, { children: [
3928
3929
  /* @__PURE__ */ a(He, { target: t }),
3929
- !s && /* @__PURE__ */ a(Zr, {
3930
- sizePx: Ul(n, r, o.id, i),
3930
+ !s && /* @__PURE__ */ a(Jr, {
3931
+ sizePx: Kl(n, r, o.id, i),
3931
3932
  onChange: (c) => {
3932
3933
  e.commands.dispatch(new wn({
3933
3934
  layerId: o.id,
@@ -3936,11 +3937,11 @@ var x1 = ({ graph: e, target: t }) => {
3936
3937
  }));
3937
3938
  }
3938
3939
  }),
3939
- /* @__PURE__ */ a(Yr, {
3940
- symbol: Kl(n, r, o.id, i),
3940
+ /* @__PURE__ */ a(Zr, {
3941
+ symbol: jl(n, r, o.id, i),
3941
3942
  coordType: n.coordSystem.type,
3942
3943
  onChange: (c) => {
3943
- e.commands.dispatch(new zr({
3944
+ e.commands.dispatch(new Br({
3944
3945
  layerId: o.id,
3945
3946
  symbol: c,
3946
3947
  ...l
@@ -3956,14 +3957,14 @@ var x1 = ({ graph: e, target: t }) => {
3956
3957
  },
3957
3958
  line: {
3958
3959
  style: mr,
3959
- annotate: Za
3960
+ annotate: Ja
3960
3961
  },
3961
3962
  area: {
3962
3963
  style: mr,
3963
- annotate: Za
3964
+ annotate: Ja
3964
3965
  },
3965
3966
  bar: {
3966
- style: kl,
3967
+ style: Tl,
3967
3968
  annotate: tn
3968
3969
  },
3969
3970
  rule: {
@@ -3976,17 +3977,17 @@ var x1 = ({ graph: e, target: t }) => {
3976
3977
  }
3977
3978
  },
3978
3979
  legend: Cm,
3979
- axis: Cl,
3980
- grid: Wl,
3981
- graph: zl
3982
- }, ea = Je([gs]), k1 = ({ editMenus: e, children: t }) => {
3980
+ axis: wl,
3981
+ grid: Ul,
3982
+ graph: Bl
3983
+ }, na = Je([gs]), k1 = ({ editMenus: e, children: t }) => {
3983
3984
  const n = _(() => [e ?? {}, gs], [e]);
3984
- return /* @__PURE__ */ a(ea.Provider, {
3985
+ return /* @__PURE__ */ a(na.Provider, {
3985
3986
  value: n,
3986
3987
  children: t
3987
3988
  });
3988
3989
  }, T1 = (e) => {
3989
- const t = Ce(ea), n = F((l) => l), { findGeom: r } = W(), o = Or(), i = ms(ye());
3990
+ const t = Ce(na), n = F((l) => l), { findGeom: r } = W(), o = Rr(), i = ms(ye());
3990
3991
  return _(() => e === null ? null : vs(e, t, {
3991
3992
  scene: n,
3992
3993
  dataLabelPlacement: o,
@@ -4000,7 +4001,7 @@ var x1 = ({ graph: e, target: t }) => {
4000
4001
  i
4001
4002
  ]);
4002
4003
  }, A1 = () => {
4003
- const e = Ce(ea), { store: t, findGeom: n } = W(), r = Or(), o = ms(ye());
4004
+ const e = Ce(na), { store: t, findGeom: n } = W(), r = Rr(), o = ms(ye());
4004
4005
  return ce((i) => vs(i, e, {
4005
4006
  scene: t.getState().scene,
4006
4007
  dataLabelPlacement: r,
@@ -6580,16 +6581,16 @@ var x1 = ({ graph: e, target: t }) => {
6580
6581
  dictionaries: $1,
6581
6582
  ...t,
6582
6583
  children: /* @__PURE__ */ a(V1, { children: e })
6583
- }), V1 = ({ children: e }) => /* @__PURE__ */ a(Kr, {
6584
- direction: di(),
6584
+ }), V1 = ({ children: e }) => /* @__PURE__ */ a(jr, {
6585
+ direction: ui(),
6585
6586
  children: e
6586
- }), W1 = "data-variant", bs = rl.extend({ addAttributes() {
6587
+ }), W1 = "data-variant", bs = al.extend({ addAttributes() {
6587
6588
  return { variant: {
6588
6589
  default: null,
6589
6590
  parseHTML: (e) => e.getAttribute("data-variant") ?? null,
6590
6591
  renderHTML: (e) => e.variant ? { [W1]: e.variant } : {}
6591
6592
  } };
6592
- } }), U1 = tl.create({
6593
+ } }), U1 = nl.create({
6593
6594
  name: "preventBackspaceAcrossTitleBoundary",
6594
6595
  addOptions() {
6595
6596
  return { showTitle: !0 };
@@ -6603,7 +6604,7 @@ var x1 = ({ graph: e, target: t }) => {
6603
6604
  return n.depth !== 1 || n.parentOffset !== 0 ? !1 : n.index(0) === 1;
6604
6605
  } };
6605
6606
  }
6606
- }), ta = () => [
6607
+ }), ra = () => [
6607
6608
  vh,
6608
6609
  Ch,
6609
6610
  ph.configure({ levels: [
@@ -6628,10 +6629,10 @@ var x1 = ({ graph: e, target: t }) => {
6628
6629
  showSubtitle: r
6629
6630
  }),
6630
6631
  bs,
6631
- ...ta(),
6632
- nl,
6632
+ ...ra(),
6633
+ rl,
6633
6634
  U1.configure({ showTitle: n }),
6634
- jr.configure({
6635
+ Xr.configure({
6635
6636
  showOnlyCurrent: !1,
6636
6637
  placeholder: ({ pos: o, editor: i }) => {
6637
6638
  if (n && o === 0) return e;
@@ -6642,16 +6643,16 @@ var x1 = ({ graph: e, target: t }) => {
6642
6643
  ], j1 = ({ placeholder: e }) => [
6643
6644
  on,
6644
6645
  bs,
6645
- ...ta(),
6646
- nl,
6647
- jr.configure({
6646
+ ...ra(),
6647
+ rl,
6648
+ Xr.configure({
6648
6649
  showOnlyCurrent: !1,
6649
6650
  placeholder: ({ pos: t }) => t === 0 ? e : ""
6650
6651
  })
6651
6652
  ], X1 = ({ showTitle: e, showSubtitle: t }) => e && t ? on.extend({ content: "block{2,}" }) : on;
6652
6653
  var q1 = "linear-gradient(to top right, transparent calc(50% - 1px), var(--graphy-alert) calc(50% - 1px), var(--graphy-alert) calc(50% + 1px), transparent calc(50% + 1px))", Y1 = "d0bl00";
6653
- var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Object.fromEntries(si.map((e) => [ve[e], e])), tv = (e) => br.some((t) => t.toLowerCase() === e.toLowerCase()), nv = ({ color: e, onChange: t, open: n, onOpenChange: r, children: o, label: i, popupAttributes: l, opacity: s, onOpacityChange: c, hasTransparentOption: d = !1 }) => {
6654
- const u = R(), { ColorSwatches: h, Slider: p } = H(), g = ov(), m = d ? [hl, ...br] : br, f = (y) => {
6654
+ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, yr = ci.map((e) => ve[e]), ev = Object.fromEntries(ci.map((e) => [ve[e], e])), tv = (e) => yr.some((t) => t.toLowerCase() === e.toLowerCase()), nv = ({ color: e, onChange: t, open: n, onOpenChange: r, children: o, label: i, popupAttributes: l, opacity: s, onOpacityChange: c, hasTransparentOption: d = !1 }) => {
6655
+ const u = R(), { ColorSwatches: h, Slider: p } = H(), g = ov(), m = d ? [pl, ...yr] : yr, f = (y) => {
6655
6656
  t(y), r(!1);
6656
6657
  };
6657
6658
  return /* @__PURE__ */ v(le.Root, {
@@ -6716,7 +6717,7 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
6716
6717
  })]
6717
6718
  });
6718
6719
  }, rv = (e, t) => {
6719
- if (ii(e)) return e;
6720
+ if (li(e)) return e;
6720
6721
  const n = ev[e];
6721
6722
  return n === void 0 ? e : t[n];
6722
6723
  }, av = ({ value: e, onChange: t, popupAttributes: n }) => {
@@ -6769,7 +6770,7 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
6769
6770
  className: Ze(sv, e)
6770
6771
  }), fv = ({ children: e }) => {
6771
6772
  const t = Pe();
6772
- return t === null ? null : Ur(/* @__PURE__ */ a(Ne, { children: e }), t);
6773
+ return t === null ? null : Kr(/* @__PURE__ */ a(Ne, { children: e }), t);
6773
6774
  }, ie = {
6774
6775
  Portal: fv,
6775
6776
  Root: gv,
@@ -6779,12 +6780,12 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
6779
6780
  ColorPicker: nv,
6780
6781
  MenuPopup: hv,
6781
6782
  MenuItem: pv
6782
- }, bv = "'Noto Serif', Georgia, 'Times New Roman', serif, 'Apple Color Emoji', 'NotoColorEmoji'", yv = `'Aeonik', 'Aeonik Fallback', ${pi}`, Sv = "'PT Mono', 'Courier New', monospace, 'Apple Color Emoji', 'NotoColorEmoji'", Cv = "'Intruding Cat', cursive, 'Apple Color Emoji', 'NotoColorEmoji'", yr = [
6783
+ }, bv = "'Noto Serif', Georgia, 'Times New Roman', serif, 'Apple Color Emoji', 'NotoColorEmoji'", yv = `'Aeonik', 'Aeonik Fallback', ${gi}`, Sv = "'PT Mono', 'Courier New', monospace, 'Apple Color Emoji', 'NotoColorEmoji'", Cv = "'Intruding Cat', cursive, 'Apple Color Emoji', 'NotoColorEmoji'", Sr = [
6783
6784
  {
6784
6785
  id: "modern",
6785
6786
  label: "Modern",
6786
6787
  preview: "Aa",
6787
- fontFamily: pi
6788
+ fontFamily: gi
6788
6789
  },
6789
6790
  {
6790
6791
  id: "fresh",
@@ -6810,8 +6811,8 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
6810
6811
  preview: "Aa",
6811
6812
  fontFamily: Cv
6812
6813
  }
6813
- ], wv = (e) => e ? yr.find((t) => t.fontFamily === e) ?? null : null, ys = "_70l3rt0", Ss = "_70l3rt1", Cs = "_70l3rt3", ws = "_70l3rt4", xs = "_70l3rt5", xv = ({ editor: e, currentFontFamily: t, open: n, onOpenChange: r }) => {
6814
- const o = R(), i = wv(t) ?? yr[0], l = (s) => {
6814
+ ], wv = (e) => e ? Sr.find((t) => t.fontFamily === e) ?? null : null, ys = "_70l3rt0", Ss = "_70l3rt1", Cs = "_70l3rt3", ws = "_70l3rt4", xs = "_70l3rt5", xv = ({ editor: e, currentFontFamily: t, open: n, onOpenChange: r }) => {
6815
+ const o = R(), i = wv(t) ?? Sr[0], l = (s) => {
6815
6816
  e.chain().focus().setFontFamily(s.fontFamily).run();
6816
6817
  };
6817
6818
  return /* @__PURE__ */ v(pe.Root, {
@@ -6838,7 +6839,7 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
6838
6839
  children: /* @__PURE__ */ a(pe.Popup, {
6839
6840
  className: ws,
6840
6841
  onMouseDown: (s) => s.preventDefault(),
6841
- children: yr.map((s) => /* @__PURE__ */ a(pe.Item, {
6842
+ children: Sr.map((s) => /* @__PURE__ */ a(pe.Item, {
6842
6843
  className: xs,
6843
6844
  "data-selected": s.id === i?.id,
6844
6845
  onClick: () => l(s),
@@ -6855,7 +6856,7 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
6855
6856
  id: "text",
6856
6857
  translationKey: "graph.toolbar.heading.text",
6857
6858
  previewFont: ve.fontTextEditorBody
6858
- }, to = [
6859
+ }, no = [
6859
6860
  {
6860
6861
  id: "caption",
6861
6862
  translationKey: "graph.toolbar.heading.caption",
@@ -6878,7 +6879,7 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
6878
6879
  previewFont: ve.fontTextEditorH1
6879
6880
  }
6880
6881
  ], kv = ({ editor: e, activeStyle: t, open: n, onOpenChange: r }) => {
6881
- const o = R(), i = to.find((l) => l.id === t) ?? ks;
6882
+ const o = R(), i = no.find((l) => l.id === t) ?? ks;
6882
6883
  return /* @__PURE__ */ v(pe.Root, {
6883
6884
  open: n,
6884
6885
  onOpenChange: r,
@@ -6902,7 +6903,7 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
6902
6903
  children: /* @__PURE__ */ a(pe.Popup, {
6903
6904
  className: ws,
6904
6905
  onMouseDown: (l) => l.preventDefault(),
6905
- children: to.map((l) => /* @__PURE__ */ a(pe.Item, {
6906
+ children: no.map((l) => /* @__PURE__ */ a(pe.Item, {
6906
6907
  className: xs,
6907
6908
  "data-selected": l.id === i.id,
6908
6909
  onClick: () => Tv(e, l.id),
@@ -6959,14 +6960,14 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
6959
6960
  }), Iv = (e) => !e.content || e.content.length === 0 ? !0 : e.content.every((t) => !t.content || t.content.length === 0), Mv = (e) => {
6960
6961
  const { $from: t } = e.state.selection, n = t.parent.textContent, r = t.parentOffset, o = t.start();
6961
6962
  let i = r;
6962
- for (; i > 0 && no(n[i - 1]); ) i -= 1;
6963
+ for (; i > 0 && ro(n[i - 1]); ) i -= 1;
6963
6964
  let l = r;
6964
- for (; l < n.length && no(n[l]); ) l += 1;
6965
+ for (; l < n.length && ro(n[l]); ) l += 1;
6965
6966
  return {
6966
6967
  from: o + i,
6967
6968
  to: o + l
6968
6969
  };
6969
- }, no = (e) => e !== void 0 && /\S/.test(e), Ev = "fop13s0", Ov = "fop13s1", Rv = "fop13s2", Nv = "fop13s3", ro = "fop13s4", Dv = ({ editor: e, currentUrl: t, active: n, open: r, onOpenChange: o }) => {
6970
+ }, ro = (e) => e !== void 0 && /\S/.test(e), Ev = "fop13s0", Ov = "fop13s1", Rv = "fop13s2", Nv = "fop13s3", ao = "fop13s4", Dv = ({ editor: e, currentUrl: t, active: n, open: r, onOpenChange: o }) => {
6970
6971
  const i = R(), [l, s] = Z(""), c = X(null);
6971
6972
  B(() => {
6972
6973
  r && s(t ?? "");
@@ -7016,16 +7017,16 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
7016
7017
  /* @__PURE__ */ a("button", {
7017
7018
  type: "button",
7018
7019
  "aria-label": i("common.cancel"),
7019
- className: ro,
7020
+ className: ao,
7020
7021
  onClick: u,
7021
7022
  children: /* @__PURE__ */ a(Lv, {})
7022
7023
  }),
7023
7024
  /* @__PURE__ */ a("button", {
7024
7025
  type: "button",
7025
7026
  "aria-label": i("graph.toolbar.link.apply"),
7026
- className: ro,
7027
+ className: ao,
7027
7028
  onClick: d,
7028
- children: /* @__PURE__ */ a(bl, {})
7029
+ children: /* @__PURE__ */ a(yl, {})
7029
7030
  })
7030
7031
  ]
7031
7032
  })
@@ -7087,7 +7088,7 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
7087
7088
  /* @__PURE__ */ a("path", { d: "M17 19H3" })
7088
7089
  ]
7089
7090
  })
7090
- }), Fv = "_1d66w570", zv = "_1d66w571", ht = ({ label: e, active: t, onToggle: n, children: r }) => {
7091
+ }), Fv = "_1d66w570", zv = "_1d66w571", pt = ({ label: e, active: t, onToggle: n, children: r }) => {
7091
7092
  const o = (i) => i.preventDefault();
7092
7093
  return /* @__PURE__ */ v(Te.Root, { children: [/* @__PURE__ */ a(Te.Trigger, {
7093
7094
  render: /* @__PURE__ */ a(kh, {
@@ -7102,11 +7103,11 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
7102
7103
  }), /* @__PURE__ */ a(Te.Portal, {
7103
7104
  container: Pe(),
7104
7105
  className: _e,
7105
- children: /* @__PURE__ */ a(Xr, { children: /* @__PURE__ */ a(Te.Positioner, {
7106
+ children: /* @__PURE__ */ a(qr, { children: /* @__PURE__ */ a(Te.Positioner, {
7106
7107
  sideOffset: 6,
7107
7108
  className: zv,
7108
7109
  children: /* @__PURE__ */ a(Te.Popup, {
7109
- className: sl,
7110
+ className: cl,
7110
7111
  children: e
7111
7112
  })
7112
7113
  }) })
@@ -7114,19 +7115,19 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
7114
7115
  }, Bv = ({ editor: e, activeAlignment: t = "left" }) => {
7115
7116
  const n = R();
7116
7117
  return /* @__PURE__ */ v(K, { children: [
7117
- /* @__PURE__ */ a(ht, {
7118
+ /* @__PURE__ */ a(pt, {
7118
7119
  label: n("graph.toolbar.textAlign.left"),
7119
7120
  active: t === "left",
7120
7121
  onToggle: () => e.chain().focus().setTextAlign("left").run(),
7121
7122
  children: /* @__PURE__ */ a(Ps, {})
7122
7123
  }),
7123
- /* @__PURE__ */ a(ht, {
7124
+ /* @__PURE__ */ a(pt, {
7124
7125
  label: n("graph.toolbar.textAlign.center"),
7125
7126
  active: t === "center",
7126
7127
  onToggle: () => e.chain().focus().setTextAlign("center").run(),
7127
7128
  children: /* @__PURE__ */ a(Ts, {})
7128
7129
  }),
7129
- /* @__PURE__ */ a(ht, {
7130
+ /* @__PURE__ */ a(pt, {
7130
7131
  label: n("graph.toolbar.textAlign.right"),
7131
7132
  active: t === "right",
7132
7133
  onToggle: () => e.chain().focus().setTextAlign("right").run(),
@@ -7197,19 +7198,19 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
7197
7198
  }) }),
7198
7199
  /* @__PURE__ */ a(ie.Separator, {}),
7199
7200
  /* @__PURE__ */ v(ie.Group, { children: [
7200
- /* @__PURE__ */ a(ht, {
7201
+ /* @__PURE__ */ a(pt, {
7201
7202
  label: t("graph.toolbar.formatting.bold"),
7202
7203
  active: h?.bold ?? !1,
7203
7204
  onToggle: () => e.chain().focus().toggleBold().run(),
7204
7205
  children: /* @__PURE__ */ a("strong", { children: "B" })
7205
7206
  }),
7206
- /* @__PURE__ */ a(ht, {
7207
+ /* @__PURE__ */ a(pt, {
7207
7208
  label: t("graph.toolbar.formatting.italic"),
7208
7209
  active: h?.italic ?? !1,
7209
7210
  onToggle: () => e.chain().focus().toggleItalic().run(),
7210
7211
  children: /* @__PURE__ */ a("em", { children: "I" })
7211
7212
  }),
7212
- /* @__PURE__ */ a(ht, {
7213
+ /* @__PURE__ */ a(pt, {
7213
7214
  label: t("graph.toolbar.formatting.underline"),
7214
7215
  active: h?.underlined ?? !1,
7215
7216
  onToggle: () => e.chain().focus().toggleUnderline().run(),
@@ -7233,12 +7234,12 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
7233
7234
  }) });
7234
7235
  }, jv = "_1uy50v30", Ls = ({ editor: e, ariaLabel: t }) => /* @__PURE__ */ v("div", {
7235
7236
  className: jv,
7236
- children: [/* @__PURE__ */ a(Kv, { editor: e }), /* @__PURE__ */ a(al, {
7237
+ children: [/* @__PURE__ */ a(Kv, { editor: e }), /* @__PURE__ */ a(ol, {
7237
7238
  editor: e,
7238
7239
  "aria-label": t
7239
7240
  })]
7240
- }), Xv = 200, na = ({ content: e, extensions: t, editable: n, onUpdate: r, updateDebounceMs: o = Xv }) => {
7241
- const i = X(ao(e)), l = X(i.current), s = Lc((d) => {
7241
+ }), Xv = 200, aa = ({ content: e, extensions: t, editable: n, onUpdate: r, updateDebounceMs: o = Xv }) => {
7242
+ const i = X(oo(e)), l = X(i.current), s = Lc((d) => {
7242
7243
  l.current = d, r?.(d);
7243
7244
  }, o), c = wh({
7244
7245
  extensions: t,
@@ -7255,14 +7256,14 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
7255
7256
  c?.setEditable(n);
7256
7257
  }, [c, n]), B(() => {
7257
7258
  if (!c) return;
7258
- const d = ao(e);
7259
+ const d = oo(e);
7259
7260
  jn(l.current, d) || (l.current = d, !jn(c.getJSON(), d) && (s.cancel(), qv(c, d)));
7260
7261
  }, [
7261
7262
  c,
7262
7263
  e,
7263
7264
  s
7264
7265
  ]), B(() => () => s.flush(), [s]), c;
7265
- }, ao = (e) => e === null ? {
7266
+ }, oo = (e) => e === null ? {
7266
7267
  type: "doc",
7267
7268
  content: []
7268
7269
  } : typeof e == "string" ? {
@@ -7283,13 +7284,13 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
7283
7284
  to: Math.min(r, o)
7284
7285
  });
7285
7286
  }, jn = (e, t) => JSON.stringify(pn(e)) === JSON.stringify(pn(t)), pn = (e) => Array.isArray(e) ? e.map(pn) : e === null || typeof e != "object" ? e : Object.fromEntries(Object.entries(e).map(([t, n]) => [t, pn(n)]).filter(([, t]) => !Yv(t)).sort(([t], [n]) => String(t).localeCompare(String(n)))), Yv = (e) => e == null || typeof e == "object" && Object.keys(e).length === 0, Zv = ({ caption: e, captionStyle: t }) => {
7286
- const { dispatch: n } = Se(), r = na({
7287
+ const { dispatch: n } = Se(), r = aa({
7287
7288
  content: e,
7288
7289
  extensions: _(() => j1({ placeholder: "Add caption" }), []),
7289
7290
  editable: !0,
7290
7291
  onUpdate: (o) => {
7291
7292
  const i = Iv(o) ? null : o;
7292
- n(new Ai({ caption: i }));
7293
+ n(new Pi({ caption: i }));
7293
7294
  }
7294
7295
  });
7295
7296
  return /* @__PURE__ */ a("div", {
@@ -7302,15 +7303,15 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
7302
7303
  });
7303
7304
  }, Jv = (e) => [
7304
7305
  on,
7305
- rl,
7306
- ...ta(),
7306
+ al,
7307
+ ...ra(),
7307
7308
  e2,
7308
- jr.configure({
7309
+ Xr.configure({
7309
7310
  showOnlyCurrent: !1,
7310
7311
  placeholder: ({ pos: t }) => t === 0 ? e : ""
7311
7312
  })
7312
7313
  ], Qv = ({ annotation: e }) => {
7313
- const t = R(), { dispatch: n } = Se(), r = ae(), o = _(() => Jv(t("graph.annotations.text.placeholder")), [t]), i = na({
7314
+ const t = R(), { dispatch: n } = Se(), r = ae(), o = _(() => Jv(t("graph.annotations.text.placeholder")), [t]), i = aa({
7314
7315
  content: e.content,
7315
7316
  extensions: o,
7316
7317
  editable: !0,
@@ -7327,16 +7328,16 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
7327
7328
  return l(i), () => l(null);
7328
7329
  }, [i, r]), B(() => {
7329
7330
  i?.commands.focus("end", { scrollIntoView: !1 });
7330
- }, [i]), /* @__PURE__ */ a(al, {
7331
+ }, [i]), /* @__PURE__ */ a(ol, {
7331
7332
  "aria-label": t("graph.annotations.text.editLabel"),
7332
7333
  className: Zc,
7333
7334
  editor: i,
7334
7335
  "data-testid": "text-annotation-editor"
7335
7336
  });
7336
- }, oo = (e) => {
7337
+ }, io = (e) => {
7337
7338
  const t = vd(e);
7338
7339
  return t === void 0 ? {} : { style: `font-family: ${t}` };
7339
- }, e2 = tl.create({
7340
+ }, e2 = nl.create({
7340
7341
  name: "annotationTextStyleAttributes",
7341
7342
  addGlobalAttributes() {
7342
7343
  return [{
@@ -7344,11 +7345,11 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
7344
7345
  attributes: {
7345
7346
  fontFamily: {
7346
7347
  default: null,
7347
- renderHTML: (e) => oo(e.fontFamily)
7348
+ renderHTML: (e) => io(e.fontFamily)
7348
7349
  },
7349
7350
  font: {
7350
7351
  default: null,
7351
- renderHTML: (e) => oo(e.font)
7352
+ renderHTML: (e) => io(e.font)
7352
7353
  },
7353
7354
  fontSize: {
7354
7355
  default: null,
@@ -7373,9 +7374,9 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
7373
7374
  title: i2(t?.content ?? []),
7374
7375
  subtitle: l2(n)
7375
7376
  };
7376
- }, ra = (e) => ({
7377
+ }, oa = (e) => ({
7377
7378
  type: e.type ?? "text",
7378
- ...e.content !== void 0 ? { content: e.content.map(ra) } : {},
7379
+ ...e.content !== void 0 ? { content: e.content.map(oa) } : {},
7379
7380
  ...e.text !== void 0 ? { text: e.text } : {},
7380
7381
  ...e.marks !== void 0 ? { marks: e.marks } : {},
7381
7382
  ...e.attrs !== void 0 ? { attrs: e.attrs } : {}
@@ -7388,7 +7389,7 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
7388
7389
  type: "text",
7389
7390
  text: e
7390
7391
  }]
7391
- }] : e.type === "doc" && e.content ? e.content.length === 0 ? [{ type: "paragraph" }] : e.content.map(io) : [io(e)], io = (e) => e.type === "paragraph" ? e : {
7392
+ }] : e.type === "doc" && e.content ? e.content.length === 0 ? [{ type: "paragraph" }] : e.content.map(lo) : [lo(e)], lo = (e) => e.type === "paragraph" ? e : {
7392
7393
  type: "paragraph",
7393
7394
  content: e.content ?? [e]
7394
7395
  }, i2 = (e) => {
@@ -7396,7 +7397,7 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
7396
7397
  const [t] = e;
7397
7398
  return t && e.length === 1 && t.type === "text" && (!t.marks || t.marks.length === 0) ? t.text ?? null : {
7398
7399
  type: "paragraph",
7399
- content: e.map(ra)
7400
+ content: e.map(oa)
7400
7401
  };
7401
7402
  }, l2 = (e) => {
7402
7403
  const t = e.filter((r) => (r.content ?? []).length > 0);
@@ -7408,7 +7409,7 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
7408
7409
  }
7409
7410
  return {
7410
7411
  type: "doc",
7411
- content: t.map(ra)
7412
+ content: t.map(oa)
7412
7413
  };
7413
7414
  }, s2 = "uwf6lt0", c2 = {
7414
7415
  fontFamily: "var(--uwf6lt1)",
@@ -7440,7 +7441,7 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
7440
7441
  subtitlePlaceholder: "Untitled",
7441
7442
  showTitle: t,
7442
7443
  showSubtitle: n
7443
- }), [t, n]), c = na({
7444
+ }), [t, n]), c = aa({
7444
7445
  content: _(() => n2({
7445
7446
  title: e,
7446
7447
  showTitle: t,
@@ -7456,15 +7457,15 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
7456
7457
  editable: !0,
7457
7458
  onUpdate: (d) => {
7458
7459
  const u = r2(d);
7459
- t && l(new Li({ title: u.title })), n && l(new Pi({ subtitle: u.subtitle }));
7460
+ t && l(new Ii({ title: u.title })), n && l(new Li({ subtitle: u.subtitle }));
7460
7461
  }
7461
7462
  });
7462
7463
  return /* @__PURE__ */ a("div", {
7463
7464
  className: s2,
7464
7465
  "data-testid": "title-editor",
7465
7466
  style: {
7466
- ...Ca(c2, o),
7467
- ...Ca(d2, i)
7467
+ ...xa(c2, o),
7468
+ ...xa(d2, i)
7468
7469
  },
7469
7470
  children: /* @__PURE__ */ a(Ls, {
7470
7471
  editor: c,
@@ -7475,7 +7476,7 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
7475
7476
  Title: u2,
7476
7477
  Caption: Zv,
7477
7478
  TextAnnotation: Qv
7478
- }, p2 = "_10igzta0", g2 = ({ rect: e, zIndex: t, container: n, boxRef: r, children: o, ...i }) => n === null ? null : Ur(/* @__PURE__ */ a("div", {
7479
+ }, p2 = "_10igzta0", g2 = ({ rect: e, zIndex: t, container: n, boxRef: r, children: o, ...i }) => n === null ? null : Kr(/* @__PURE__ */ a("div", {
7479
7480
  ...i,
7480
7481
  ref: r,
7481
7482
  className: p2,
@@ -7486,10 +7487,10 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
7486
7487
  zIndex: t
7487
7488
  },
7488
7489
  children: o
7489
- }), n), m2 = "kwvn4c0", v2 = "kwvn4c1", aa = (e, t) => {
7490
+ }), n), m2 = "kwvn4c0", v2 = "kwvn4c1", ia = (e, t) => {
7490
7491
  const { offsetWidth: n } = e;
7491
7492
  return n <= 0 || t <= 0 ? 1 : t / n;
7492
- }, Is = (e) => aa(e, e.getBoundingClientRect().width), Sr = (e, t) => {
7493
+ }, Is = (e) => ia(e, e.getBoundingClientRect().width), Cr = (e, t) => {
7493
7494
  const { offsetWidth: n, offsetHeight: r } = e;
7494
7495
  return n <= 0 || r <= 0 ? t : {
7495
7496
  width: n,
@@ -7498,28 +7499,28 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
7498
7499
  }, f2 = (e, t) => ({
7499
7500
  contextElement: e,
7500
7501
  getBoundingClientRect: () => {
7501
- const n = e.getBoundingClientRect(), r = aa(e, n.width);
7502
+ const n = e.getBoundingClientRect(), r = ia(e, n.width);
7502
7503
  return new DOMRect(n.left + t.x * r, n.top + t.y * r, t.width * r, t.height * r);
7503
7504
  }
7504
7505
  }), b2 = ({ side: e, boundary: t, spans: n, anchor: r, rightToLeft: o }) => {
7505
7506
  if (!S2(e)) return 0;
7506
7507
  const i = n[e];
7507
- if (e === "left" || e === "right") return lo(i.from - t.y, r.height, t.height);
7508
+ if (e === "left" || e === "right") return so(i.from - t.y, r.height, t.height);
7508
7509
  const l = o ? t.x + t.width - i.to : i.from - t.x;
7509
- return lo(l, r.width, t.width);
7510
+ return so(l, r.width, t.width);
7510
7511
  }, y2 = () => {
7511
7512
  const [e, t] = Z(!1);
7512
7513
  return B(() => {
7513
7514
  t(!0);
7514
7515
  }, []), e;
7515
- }, S2 = (e) => Rc.some((t) => t === e), lo = (e, t, n) => n === 0 ? 0 : e * t / n, C2 = {
7516
+ }, S2 = (e) => Rc.some((t) => t === e), so = (e, t, n) => n === 0 ? 0 : e * t / n, C2 = {
7516
7517
  x: 8,
7517
7518
  y: 8
7518
7519
  }, w2 = {
7519
7520
  side: "flip",
7520
7521
  align: "shift",
7521
7522
  fallbackAxisSide: "end"
7522
- }, Cr = ({ frameElement: e, boundary: t, spans: n, clearance: r = C2, onEscape: o, children: i }) => {
7523
+ }, wr = ({ frameElement: e, boundary: t, spans: n, clearance: r = C2, onEscape: o, children: i }) => {
7523
7524
  const l = Ln(), s = y2(), [c, d] = Z(null), u = X(null), h = ce((P) => {
7524
7525
  u.current = P, d(P);
7525
7526
  }, []), p = X(null);
@@ -7550,7 +7551,7 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
7550
7551
  children: /* @__PURE__ */ a(le.Portal, {
7551
7552
  container: l,
7552
7553
  className: _e,
7553
- children: /* @__PURE__ */ a(Xr, { children: /* @__PURE__ */ a(le.Positioner, {
7554
+ children: /* @__PURE__ */ a(qr, { children: /* @__PURE__ */ a(le.Positioner, {
7554
7555
  ref: p,
7555
7556
  anchor: C,
7556
7557
  side: "right",
@@ -7627,7 +7628,7 @@ var Z1 = "d0bl03", J1 = "d0bl04", Q1 = 0.01, br = si.map((e) => ve[e]), ev = Obj
7627
7628
  default:
7628
7629
  return e;
7629
7630
  }
7630
- }, yt = () => {
7631
+ }, St = () => {
7631
7632
  const e = A1(), { store: t } = W();
7632
7633
  return ce((n) => e(n) || Ms(n, t.getState().scene) !== null, [e, t]);
7633
7634
  };
@@ -7639,15 +7640,15 @@ var gn = "textStyle", Es = /* @__PURE__ */ new Set(["paragraph", "heading"]), k2
7639
7640
  fontSize: jt(t.map((r) => E2(Xn(r)?.fontSize))),
7640
7641
  alignment: jt(n.map((r) => O2(r.attrs?.textAlign)))
7641
7642
  };
7642
- }, T2 = (e, t) => oa(e, (n) => n.type === "text" ? P2(n, t) : n), Os = (e) => Rs(e).length > 0, A2 = (e, t) => oa(e, (n) => Es.has(n.type ?? "") ? {
7643
+ }, T2 = (e, t) => la(e, (n) => n.type === "text" ? P2(n, t) : n), Os = (e) => Rs(e).length > 0, A2 = (e, t) => la(e, (n) => Es.has(n.type ?? "") ? {
7643
7644
  ...n,
7644
7645
  attrs: {
7645
7646
  ...n.attrs,
7646
7647
  textAlign: t
7647
7648
  }
7648
- } : n), oa = (e, t) => t(e.content === void 0 ? e : {
7649
+ } : n), la = (e, t) => t(e.content === void 0 ? e : {
7649
7650
  ...e,
7650
- content: e.content.map((n) => oa(n, t))
7651
+ content: e.content.map((n) => la(n, t))
7651
7652
  }), P2 = (e, t) => {
7652
7653
  const n = e.marks ?? [], r = n.find((i) => i.type === gn), o = {
7653
7654
  type: gn,
@@ -7660,13 +7661,13 @@ var gn = "textStyle", Es = /* @__PURE__ */ new Set(["paragraph", "heading"]), k2
7660
7661
  ...e,
7661
7662
  marks: r === void 0 ? [...n, o] : n.map((i) => i === r ? o : i)
7662
7663
  };
7663
- }, Xn = (e) => e.marks?.find((t) => t.type === gn)?.attrs, L2 = (e) => Sa(e?.font) ?? Sa(e?.fontFamily), Rs = (e) => ia(e, (t) => t.type === "text"), I2 = (e) => ia(e, (t) => Es.has(t.type ?? "")), ia = (e, t) => [...t(e) ? [e] : [], ...(e.content ?? []).flatMap((n) => ia(n, t))], jt = (e) => {
7664
+ }, Xn = (e) => e.marks?.find((t) => t.type === gn)?.attrs, L2 = (e) => wa(e?.font) ?? wa(e?.fontFamily), Rs = (e) => sa(e, (t) => t.type === "text"), I2 = (e) => sa(e, (t) => Es.has(t.type ?? "")), sa = (e, t) => [...t(e) ? [e] : [], ...(e.content ?? []).flatMap((n) => sa(n, t))], jt = (e) => {
7664
7665
  const [t, ...n] = e;
7665
7666
  return t === void 0 ? null : n.every((r) => r === t) ? t : null;
7666
- }, M2 = (e) => typeof e == "string" && e.length > 0 ? e : void 0, E2 = (e) => typeof e == "number" && Number.isFinite(e) ? e : void 0, O2 = (e) => e === "left" || e === "center" || e === "right" ? e : void 0, la = (e) => ({
7667
+ }, M2 = (e) => typeof e == "string" && e.length > 0 ? e : void 0, E2 = (e) => typeof e == "number" && Number.isFinite(e) ? e : void 0, O2 = (e) => e === "left" || e === "center" || e === "right" ? e : void 0, ca = (e) => ({
7667
7668
  readTopCommandId: () => e.stack.getSnapshot().undoStack.at(-1)?.id ?? null,
7668
7669
  undo: () => e.undo()
7669
- }), sa = (e, t, n, r = null) => {
7670
+ }), da = (e, t, n, r = null) => {
7670
7671
  const o = e.getState().caret;
7671
7672
  if (o === null) return;
7672
7673
  const i = o.editor?.getText().trim();
@@ -7685,9 +7686,9 @@ var gn = "textStyle", Es = /* @__PURE__ */ new Set(["paragraph", "heading"]), k2
7685
7686
  i === void 0 || !i.interactive || i.attachment !== null || r.push(...N2(i, e, t, n));
7686
7687
  }
7687
7688
  return r;
7688
- }, so = (e, t) => {
7689
+ }, co = (e, t) => {
7689
7690
  if (t === null) return -1;
7690
- const n = bt(t);
7691
+ const n = yt(t);
7691
7692
  return e.findIndex((r) => r.target.layerId === t.layerId && r.target.observationIndex === n);
7692
7693
  }, N2 = (e, t, n, r) => {
7693
7694
  const o = [];
@@ -7731,14 +7732,14 @@ var gn = "textStyle", Es = /* @__PURE__ */ new Set(["paragraph", "heading"]), k2
7731
7732
  };
7732
7733
  }, Ft = () => {
7733
7734
  const e = at();
7734
- return wr(e);
7735
- }, wr = (e) => {
7735
+ return xr(e);
7736
+ }, xr = (e) => {
7736
7737
  if (e.length !== 1) return null;
7737
7738
  const [t] = e;
7738
7739
  return t?.kind === "annotation" ? t.id : null;
7739
7740
  }, _2 = (e) => {
7740
- const { selectionStore: t, commands: n, chartId: r, history: o, store: i, anchorResolver: l } = W(), { store: s, engine: c, overlayRef: d } = nt(), u = yt(), h = ae(), p = ue(F((I) => I.spec.annotations.textAnnotations)), g = X(null), m = X(null), f = X(!0), y = X(/* @__PURE__ */ new WeakSet()), { showAnnotations: k, showMenuTriggerOnHover: C } = Re[ye()], w = ce((I) => {
7741
- const { selection: N } = t.getState(), x = k ? wr(N) : null;
7741
+ const { selectionStore: t, commands: n, chartId: r, history: o, store: i, anchorResolver: l } = W(), { store: s, engine: c, overlayRef: d } = nt(), u = St(), h = ae(), p = ue(F((I) => I.spec.annotations.textAnnotations)), g = X(null), m = X(null), f = X(!0), y = X(/* @__PURE__ */ new WeakSet()), { showAnnotations: k, showMenuTriggerOnHover: C } = Re[ye()], w = ce((I) => {
7742
+ const { selection: N } = t.getState(), x = k ? xr(N) : null;
7742
7743
  x !== null && (I.preventDefault(), n.dispatch(new ze({ id: x })), e.focus({ preventScroll: !0 }));
7743
7744
  }, [
7744
7745
  e,
@@ -7747,7 +7748,7 @@ var gn = "textStyle", Es = /* @__PURE__ */ new Set(["paragraph", "heading"]), k2
7747
7748
  k
7748
7749
  ]), P = ce((I) => {
7749
7750
  if (Lt(I.target, r)) return;
7750
- const N = k ? wr(t.getState().selection) : null;
7751
+ const N = k ? xr(t.getState().selection) : null;
7751
7752
  N !== null && p.current.some((x) => x.id === N) && (I.preventDefault(), h.getState().setCaret(N));
7752
7753
  }, [
7753
7754
  h,
@@ -7762,7 +7763,7 @@ var gn = "textStyle", Es = /* @__PURE__ */ new Set(["paragraph", "heading"]), k2
7762
7763
  return;
7763
7764
  }
7764
7765
  if (N.caret !== null) {
7765
- sa(h, i.getState().scene.annotations, n.dispatch, la(o)), N.setCaret(null), e.focus({ preventScroll: !0 });
7766
+ da(h, i.getState().scene.annotations, n.dispatch, ca(o)), N.setCaret(null), e.focus({ preventScroll: !0 });
7766
7767
  return;
7767
7768
  }
7768
7769
  return Lt(I.target, r) ? e.focus({ preventScroll: !0 }) : t.getState().clearSelection();
@@ -7777,18 +7778,18 @@ var gn = "textStyle", Es = /* @__PURE__ */ new Set(["paragraph", "heading"]), k2
7777
7778
  ]);
7778
7779
  B(() => {
7779
7780
  const I = (b) => {
7780
- if (!ut(b.target, e, r) || ln(b.target)) return;
7781
- const E = vt(b.target), z = h.getState(), U = z.caret !== null && !Lt(b.target, r);
7781
+ if (!ht(b.target, e, r) || ln(b.target)) return;
7782
+ const E = ft(b.target), z = h.getState(), U = z.caret !== null && !Lt(b.target, r);
7782
7783
  if (E && !U) return;
7783
7784
  const j = () => C && b.target === e && !E && !b.metaKey && !b.ctrlKey && !b.altKey && !b.shiftKey && z.standingInteraction === null && t.getState().selection.length === 0, se = () => {
7784
7785
  if (!j()) return;
7785
7786
  const de = R2(i.getState().scene, l, u);
7786
7787
  if (de.length === 0) return;
7787
- const Ie = s.getState().hover.primary, G = b.key === "ArrowRight" || b.key === "ArrowDown" ? 1 : -1, ne = g.current === null ? so(de, Ie) : so(de, g.current.primary), re = de[ne < 0 ? G > 0 ? 0 : de.length - 1 : Math.min(de.length - 1, Math.max(0, ne + G))];
7788
+ const Ie = s.getState().hover.primary, G = b.key === "ArrowRight" || b.key === "ArrowDown" ? 1 : -1, ne = g.current === null ? co(de, Ie) : co(de, g.current.primary), re = de[ne < 0 ? G > 0 ? 0 : de.length - 1 : Math.min(de.length - 1, Math.max(0, ne + G))];
7788
7789
  if (re !== void 0) {
7789
7790
  if (m.current === null) {
7790
- const ke = ct(Ie);
7791
- ke !== null && !nn(ke, ct(re.primary)) && (m.current = ke);
7791
+ const ke = dt(Ie);
7792
+ ke !== null && !nn(ke, dt(re.primary)) && (m.current = ke);
7792
7793
  }
7793
7794
  g.current = re, b.preventDefault(), N(re);
7794
7795
  }
@@ -7836,8 +7837,8 @@ var gn = "textStyle", Es = /* @__PURE__ */ new Set(["paragraph", "heading"]), k2
7836
7837
  g.current = null, m.current = null;
7837
7838
  return;
7838
7839
  }
7839
- const U = ct(z);
7840
- if (nn(U, ct(E.primary))) {
7840
+ const U = dt(z);
7841
+ if (nn(U, dt(E.primary))) {
7841
7842
  m.current = U;
7842
7843
  return;
7843
7844
  }
@@ -7870,7 +7871,7 @@ var gn = "textStyle", Es = /* @__PURE__ */ new Set(["paragraph", "heading"]), k2
7870
7871
  c,
7871
7872
  d
7872
7873
  ]);
7873
- }, vt = (e) => e instanceof HTMLElement && (e.isContentEditable || e.closest('[contenteditable="true"]') !== null || e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement), F2 = (e, t, n) => {
7874
+ }, ft = (e) => e instanceof HTMLElement && (e.isContentEditable || e.closest('[contenteditable="true"]') !== null || e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement), F2 = (e, t, n) => {
7874
7875
  if (t === null) return !1;
7875
7876
  const r = n.getState().pointerRegions;
7876
7877
  if (r.length === 0) return !1;
@@ -7879,14 +7880,14 @@ var gn = "textStyle", Es = /* @__PURE__ */ new Set(["paragraph", "heading"]), k2
7879
7880
  x: e.clientX - o.left,
7880
7881
  y: e.clientY - o.top
7881
7882
  }, r) !== null;
7882
- }, ct = (e) => e === null ? null : {
7883
+ }, dt = (e) => e === null ? null : {
7883
7884
  layerId: e.layerId,
7884
- observationIndex: bt(e)
7885
+ observationIndex: yt(e)
7885
7886
  }, z2 = (e, t, n, r) => {
7886
7887
  const o = B2(t.primary, n, r);
7887
7888
  if (o !== null) {
7888
- const i = e.query(o, { tolerance: ti });
7889
- if (nn(ct(i.primary), ct(t.primary))) return {
7889
+ const i = e.query(o, { tolerance: ni });
7890
+ if (nn(dt(i.primary), dt(t.primary))) return {
7890
7891
  primary: i.primary,
7891
7892
  group: [...i.group],
7892
7893
  related: new Map(i.related),
@@ -7982,7 +7983,7 @@ var V2 = "_1vbfegu3", zt = {
7982
7983
  d: "M12 3a9 9 0 1 0 0 18 9 9 0 1 0 0-18zM8.5 14.5s1.3 2 3.5 2 3.5-2 3.5-2M9 9.5h.01M15 9.5h.01",
7983
7984
  ...zt
7984
7985
  })
7985
- }), ca = {
7986
+ }), ua = {
7986
7987
  fill: "none",
7987
7988
  stroke: "currentColor",
7988
7989
  strokeWidth: 1.8,
@@ -7993,23 +7994,23 @@ var V2 = "_1vbfegu3", zt = {
7993
7994
  ...e,
7994
7995
  children: /* @__PURE__ */ a("path", {
7995
7996
  d: "M5 19L19 5M10 5h9v9",
7996
- ...ca
7997
+ ...ua
7997
7998
  })
7998
7999
  }), Y2 = (e) => /* @__PURE__ */ a(M, {
7999
8000
  viewBox: "0 0 24 24",
8000
8001
  ...e,
8001
8002
  children: /* @__PURE__ */ a("path", {
8002
8003
  d: "M6 18L18 6M6 18v-6M6 18h6M18 6h-6M18 6v6",
8003
- ...ca
8004
+ ...ua
8004
8005
  })
8005
8006
  }), Z2 = (e) => /* @__PURE__ */ a(M, {
8006
8007
  viewBox: "0 0 24 24",
8007
8008
  ...e,
8008
8009
  children: /* @__PURE__ */ a("path", {
8009
8010
  d: "M5 19L19 5",
8010
- ...ca
8011
+ ...ua
8011
8012
  })
8012
- }), wt = {
8013
+ }), lt = {
8013
8014
  side: "top",
8014
8015
  delay: 200
8015
8016
  }, J2 = 0.2, Q2 = {
@@ -8040,8 +8041,8 @@ var V2 = "_1vbfegu3", zt = {
8040
8041
  B(() => () => xt(o), [o]), B(() => {
8041
8042
  if (!p && !g) return;
8042
8043
  const A = (S) => {
8043
- if (S.key !== "Escape" || !ut(S.target, e, l) || ln(S.target)) return;
8044
- const b = vt(S.target), E = o.getState().caret !== null && !Lt(S.target, l);
8044
+ if (S.key !== "Escape" || !ht(S.target, e, l) || ln(S.target)) return;
8045
+ const b = ft(S.target), E = o.getState().caret !== null && !Lt(S.target, l);
8045
8046
  if (b && !E) return;
8046
8047
  const z = o.getState().standingInteraction?.kind;
8047
8048
  z !== "arrow-draw" && z !== "box-draw" || (S.preventDefault(), o.getState().releaseInteraction(z));
@@ -8083,7 +8084,7 @@ var V2 = "_1vbfegu3", zt = {
8083
8084
  kind: "arrow-draw",
8084
8085
  heads: A,
8085
8086
  start: n,
8086
- ...co(S[0])
8087
+ ...uo(S[0])
8087
8088
  });
8088
8089
  }, P = (...A) => {
8089
8090
  if (o.getState().standingInteraction?.kind === "box-draw") {
@@ -8093,7 +8094,7 @@ var V2 = "_1vbfegu3", zt = {
8093
8094
  xt(o), h({ kind: "choose" }), o.getState().claimInteraction({
8094
8095
  kind: "box-draw",
8095
8096
  start: n,
8096
- ...co(A[0])
8097
+ ...uo(A[0])
8097
8098
  });
8098
8099
  }, T = () => {
8099
8100
  const A = o.getState().standingInteraction?.kind;
@@ -8107,7 +8108,7 @@ var V2 = "_1vbfegu3", zt = {
8107
8108
  const S = new we({
8108
8109
  kind: "text",
8109
8110
  annotation: {
8110
- ...Di,
8111
+ ..._i,
8111
8112
  content: Q2,
8112
8113
  at: {
8113
8114
  anchorType: "panel",
@@ -8117,7 +8118,7 @@ var V2 = "_1vbfegu3", zt = {
8117
8118
  width: J2
8118
8119
  }
8119
8120
  }), b = S.params.annotation.id;
8120
- A === null ? i.dispatch(S) : i.dispatch(new st({ commands: [S, new Xe({
8121
+ A === null ? i.dispatch(S) : i.dispatch(new ct({ commands: [S, new Xe({
8121
8122
  list: "overrides",
8122
8123
  rule: {
8123
8124
  select: {
@@ -8155,7 +8156,7 @@ var V2 = "_1vbfegu3", zt = {
8155
8156
  patch: { sticker: A }
8156
8157
  })), f());
8157
8158
  };
8158
- return n.stickerId !== void 0 ? /* @__PURE__ */ a(Cr, {
8159
+ return n.stickerId !== void 0 ? /* @__PURE__ */ a(wr, {
8159
8160
  frameElement: e,
8160
8161
  boundary: y,
8161
8162
  spans: k,
@@ -8167,7 +8168,10 @@ var V2 = "_1vbfegu3", zt = {
8167
8168
  children: [/* @__PURE__ */ a("div", {
8168
8169
  className: hn,
8169
8170
  children: /* @__PURE__ */ a(d, {
8170
- label: r("graph.annotations.baseMenu.removeSticker"),
8171
+ variant: "icon",
8172
+ ...lt,
8173
+ ariaLabel: r("graph.annotations.baseMenu.removeSticker"),
8174
+ icon: /* @__PURE__ */ a(vr, { children: /* @__PURE__ */ a(Qr, {}) }),
8171
8175
  onClick: x
8172
8176
  })
8173
8177
  }), /* @__PURE__ */ a("div", {
@@ -8193,7 +8197,7 @@ var V2 = "_1vbfegu3", zt = {
8193
8197
  },
8194
8198
  "data-testid": "empty-plot-dot",
8195
8199
  "aria-hidden": !0
8196
- }), m && /* @__PURE__ */ a(Cr, {
8200
+ }), m && /* @__PURE__ */ a(wr, {
8197
8201
  frameElement: e,
8198
8202
  boundary: y,
8199
8203
  spans: k,
@@ -8209,14 +8213,14 @@ var V2 = "_1vbfegu3", zt = {
8209
8213
  children: [
8210
8214
  /* @__PURE__ */ a(d, {
8211
8215
  variant: "icon",
8212
- ...wt,
8216
+ ...lt,
8213
8217
  ariaLabel: r("graph.annotations.baseMenu.text"),
8214
8218
  icon: /* @__PURE__ */ a(W2, {}),
8215
8219
  onClick: () => I(null)
8216
8220
  }),
8217
8221
  /* @__PURE__ */ a(d, {
8218
8222
  variant: "icon",
8219
- ...wt,
8223
+ ...lt,
8220
8224
  ariaLabel: r("graph.annotations.baseMenu.stickyNote"),
8221
8225
  icon: /* @__PURE__ */ a(U2, {}),
8222
8226
  expanded: u.kind === "sticky",
@@ -8224,7 +8228,7 @@ var V2 = "_1vbfegu3", zt = {
8224
8228
  }),
8225
8229
  /* @__PURE__ */ a(d, {
8226
8230
  variant: "icon",
8227
- ...wt,
8231
+ ...lt,
8228
8232
  ariaLabel: r("graph.annotations.baseMenu.arrow"),
8229
8233
  icon: /* @__PURE__ */ a(K2, {}),
8230
8234
  expanded: u.kind === "arrow",
@@ -8232,7 +8236,7 @@ var V2 = "_1vbfegu3", zt = {
8232
8236
  }),
8233
8237
  /* @__PURE__ */ a(d, {
8234
8238
  variant: "icon",
8235
- ...wt,
8239
+ ...lt,
8236
8240
  ariaLabel: r("graph.annotations.baseMenu.box"),
8237
8241
  icon: /* @__PURE__ */ a(j2, {}),
8238
8242
  expanded: p,
@@ -8240,7 +8244,7 @@ var V2 = "_1vbfegu3", zt = {
8240
8244
  }),
8241
8245
  /* @__PURE__ */ a(d, {
8242
8246
  variant: "icon",
8243
- ...wt,
8247
+ ...lt,
8244
8248
  ariaLabel: r("graph.annotations.baseMenu.addSticker"),
8245
8249
  icon: /* @__PURE__ */ a(X2, {}),
8246
8250
  expanded: u.kind === "sticker",
@@ -8307,7 +8311,7 @@ var V2 = "_1vbfegu3", zt = {
8307
8311
  }, xt = (e) => {
8308
8312
  const t = e.getState().standingInteraction?.kind;
8309
8313
  (t === "arrow-draw" || t === "box-draw") && e.getState().releaseInteraction(t);
8310
- }, co = (e) => {
8314
+ }, uo = (e) => {
8311
8315
  if (typeof e != "object" || e === null) return {};
8312
8316
  if ("detail" in e && e.detail === 0) return {};
8313
8317
  if (!("clientX" in e) || !("clientY" in e)) return {};
@@ -8316,7 +8320,7 @@ var V2 = "_1vbfegu3", zt = {
8316
8320
  x: t,
8317
8321
  y: n
8318
8322
  } };
8319
- }, Bt = (e) => e.offset + e.strokeWidth, uo = "http://www.w3.org/2000/svg", ho = /* @__PURE__ */ new WeakMap(), af = (e, t) => {
8323
+ }, Bt = (e) => e.offset + e.strokeWidth, ho = "http://www.w3.org/2000/svg", po = /* @__PURE__ */ new WeakMap(), af = (e, t) => {
8320
8324
  const n = of(e);
8321
8325
  n.setAttribute("d", t);
8322
8326
  const { x: r, y: o, width: i, height: l } = n.getBBox();
@@ -8327,12 +8331,12 @@ var V2 = "_1vbfegu3", zt = {
8327
8331
  height: l
8328
8332
  };
8329
8333
  }, of = (e) => {
8330
- const t = ho.get(e);
8334
+ const t = po.get(e);
8331
8335
  if (t?.isConnected) return t;
8332
- const n = e.createElementNS(uo, "svg");
8336
+ const n = e.createElementNS(ho, "svg");
8333
8337
  n.setAttribute("aria-hidden", "true"), n.style.cssText = "position:absolute;width:0;height:0;overflow:hidden;visibility:hidden;pointer-events:none";
8334
- const r = e.createElementNS(uo, "path");
8335
- return n.append(r), e.body.append(n), ho.set(e, r), r;
8338
+ const r = e.createElementNS(ho, "path");
8339
+ return n.append(r), e.body.append(n), po.set(e, r), r;
8336
8340
  }, lf = (e, t) => {
8337
8341
  const { panelRect: n, look: r, readGridLineWidth: o, measurePathBox: i } = t, l = Bt(r);
8338
8342
  switch (e.kind) {
@@ -8343,7 +8347,7 @@ var V2 = "_1vbfegu3", zt = {
8343
8347
  y: s.y + n.y
8344
8348
  })), l);
8345
8349
  case "guide":
8346
- return qn(e.shapes.map((s) => s.kind === "box" ? s.rect : dt(df(s), o(s.axis) / 2)), l);
8350
+ return qn(e.shapes.map((s) => s.kind === "box" ? s.rect : ut(df(s), o(s.axis) / 2)), l);
8347
8351
  case "graph":
8348
8352
  return qn([{
8349
8353
  x: 0,
@@ -8357,7 +8361,7 @@ var V2 = "_1vbfegu3", zt = {
8357
8361
  const n = [], r = /* @__PURE__ */ new Map();
8358
8362
  for (const o of e) {
8359
8363
  if (o.kind === "dots") {
8360
- n.push(...o.centers.map((s) => dt({
8364
+ n.push(...o.centers.map((s) => ut({
8361
8365
  ...s,
8362
8366
  width: 0,
8363
8367
  height: 0
@@ -8367,13 +8371,13 @@ var V2 = "_1vbfegu3", zt = {
8367
8371
  if (o.pathData === "") continue;
8368
8372
  const i = o.kind === "stroke" ? o.width / 2 : 0;
8369
8373
  if (!o.pathData.trimStart().startsWith("M")) {
8370
- n.push(dt(t(o.pathData), i));
8374
+ n.push(ut(t(o.pathData), i));
8371
8375
  continue;
8372
8376
  }
8373
8377
  const l = r.get(i) ?? [];
8374
8378
  l.push(o.pathData), r.set(i, l);
8375
8379
  }
8376
- for (const [o, i] of r) n.push(dt(t(i.join("")), o));
8380
+ for (const [o, i] of r) n.push(ut(t(i.join("")), o));
8377
8381
  return n;
8378
8382
  }, df = (e) => {
8379
8383
  switch (e.kind) {
@@ -8394,7 +8398,7 @@ var V2 = "_1vbfegu3", zt = {
8394
8398
  }
8395
8399
  }, qn = (e, t) => {
8396
8400
  const n = e.filter(({ width: r, height: o }) => r > 0 || o > 0);
8397
- return n.length === 0 ? null : dt(ir(n), t);
8401
+ return n.length === 0 ? null : ut(ir(n), t);
8398
8402
  };
8399
8403
  var uf = (e, { coordSystem: t, panelRect: n }) => {
8400
8404
  if (e.kind !== "observations") return null;
@@ -8404,7 +8408,7 @@ var uf = (e, { coordSystem: t, panelRect: n }) => {
8404
8408
  x: s.x + n.x,
8405
8409
  y: s.y + n.y
8406
8410
  })));
8407
- }, hf = (e, t, n) => Ki({
8411
+ }, hf = (e, t, n) => ji({
8408
8412
  layer: {
8409
8413
  ...e.layer,
8410
8414
  data: e.layer.data.take(e.rows)
@@ -8418,10 +8422,10 @@ var uf = (e, { coordSystem: t, panelRect: n }) => {
8418
8422
  bottom: (e) => e.y + e.height,
8419
8423
  left: (e) => -e.x
8420
8424
  }, mf = (e, t, n) => e === null || !vf(e) ? {
8421
- top: xr(t),
8422
- right: kr(t),
8423
- bottom: xr(t),
8424
- left: kr(t)
8425
+ top: kr(t),
8426
+ right: Tr(t),
8427
+ bottom: kr(t),
8428
+ left: Tr(t)
8425
8429
  } : {
8426
8430
  top: qt(e, t, "top", n),
8427
8431
  right: qt(e, t, "right", n),
@@ -8435,18 +8439,18 @@ var uf = (e, { coordSystem: t, panelRect: n }) => {
8435
8439
  let u = 1 / 0, h = -1 / 0;
8436
8440
  for (const m of e)
8437
8441
  o(m) < d || (u = Math.min(u, l(m)), h = Math.max(h, s(m)));
8438
- const p = i ? kr(t) : xr(t), g = {
8439
- from: gt(u - r, p.from, p.to),
8440
- to: gt(h + r, p.from, p.to)
8442
+ const p = i ? Tr(t) : kr(t), g = {
8443
+ from: mt(u - r, p.from, p.to),
8444
+ to: mt(h + r, p.from, p.to)
8441
8445
  };
8442
8446
  return g.from < g.to ? g : p;
8443
8447
  }, vf = (e) => {
8444
8448
  const [t] = e;
8445
8449
  return t !== void 0 && e.some((n) => !cd(n, t));
8446
- }, xr = (e) => ({
8450
+ }, kr = (e) => ({
8447
8451
  from: e.x,
8448
8452
  to: e.x + e.width
8449
- }), kr = (e) => ({
8453
+ }), Tr = (e) => ({
8450
8454
  from: e.y,
8451
8455
  to: e.y + e.height
8452
8456
  }), ff = (e, { frameElement: t, panelRect: n, look: r }) => {
@@ -8456,7 +8460,7 @@ var uf = (e, { coordSystem: t, panelRect: n }) => {
8456
8460
  const h = s.current, p = /* @__PURE__ */ new Map(), m = lf(d, {
8457
8461
  panelRect: n,
8458
8462
  look: r,
8459
- readGridLineWidth: (k) => oi(i, k).strokeWidth,
8463
+ readGridLineWidth: (k) => ii(i, k).strokeWidth,
8460
8464
  measurePathBox: (k) => {
8461
8465
  const C = h.get(k) ?? af(t.ownerDocument, k);
8462
8466
  return p.set(k, C), C;
@@ -8488,7 +8492,7 @@ var uf = (e, { coordSystem: t, panelRect: n }) => {
8488
8492
  ]);
8489
8493
  const u = e !== null;
8490
8494
  Ye(() => u ? () => o.getState().setSelectedOutline(null) : void 0, [o, u]);
8491
- }, da = "var(--_1qfw3e00)", po = "_1qfw3e01", bf = "_1qfw3e02", go = ({ pathData: e, animateTransitions: t, source: n, ...r }) => t ? /* @__PURE__ */ a(yf, {
8495
+ }, ha = "var(--_1qfw3e00)", go = "_1qfw3e01", bf = "_1qfw3e02", mo = ({ pathData: e, animateTransitions: t, source: n, ...r }) => t ? /* @__PURE__ */ a(yf, {
8492
8496
  pathData: e,
8493
8497
  source: n,
8494
8498
  ...r
@@ -8505,14 +8509,14 @@ var uf = (e, { coordSystem: t, panelRect: n }) => {
8505
8509
  [Cf]: "",
8506
8510
  style: De({ [Sf]: `${e}px` })
8507
8511
  }), wf = () => {
8508
- const { showMenuTriggerOnHover: e, layers: t, coordSystem: n, parsingLocale: r, anchorResolver: o, geom: i, hasOverlayMenu: l } = Ds(), s = ci((c) => e ? c.hover.primary : null);
8512
+ const { showMenuTriggerOnHover: e, layers: t, coordSystem: n, parsingLocale: r, anchorResolver: o, geom: i, hasOverlayMenu: l } = Ds(), s = di((c) => e ? c.hover.primary : null);
8509
8513
  return _(() => {
8510
8514
  if (s === null) return null;
8511
8515
  const c = t.find((u) => u.id === s.layerId);
8512
8516
  if (c === void 0 || _t(c, s.observation)) return null;
8513
8517
  const d = $e({
8514
8518
  layer: c,
8515
- observationIndex: bt(s),
8519
+ observationIndex: yt(s),
8516
8520
  scope: "observation",
8517
8521
  parsingLocale: r
8518
8522
  });
@@ -8570,7 +8574,7 @@ var uf = (e, { coordSystem: t, panelRect: n }) => {
8570
8574
  layers: i.layers,
8571
8575
  coordSystem: i.coordSystem,
8572
8576
  parsingLocale: i.config.parsingLocale
8573
- }))), { anchorResolver: n } = W(), r = ei(), o = yt();
8577
+ }))), { anchorResolver: n } = W(), r = ti(), o = St();
8574
8578
  return {
8575
8579
  showMenuTriggerOnHover: e,
8576
8580
  ...t,
@@ -8612,7 +8616,7 @@ var uf = (e, { coordSystem: t, panelRect: n }) => {
8612
8616
  layer: r,
8613
8617
  rows: o
8614
8618
  }];
8615
- for (const l of $i(r, t)) {
8619
+ for (const l of Vi(r, t)) {
8616
8620
  const s = et({
8617
8621
  layer: l,
8618
8622
  host: r,
@@ -8664,7 +8668,7 @@ var uf = (e, { coordSystem: t, panelRect: n }) => {
8664
8668
  return null;
8665
8669
  }
8666
8670
  }, Pf = () => {
8667
- const e = wf(), t = ci((s) => s.hover.intersection?.intersects === !0), n = at()[0] ?? null, r = Y((s) => s.standingInteraction), o = Y((s) => s.plotMenu), { layers: i, parsingLocale: l } = F(Le((s) => ({
8671
+ const e = wf(), t = di((s) => s.hover.intersection?.intersects === !0), n = at()[0] ?? null, r = Y((s) => s.standingInteraction), o = Y((s) => s.plotMenu), { layers: i, parsingLocale: l } = F(Le((s) => ({
8668
8672
  layers: s.layers,
8669
8673
  parsingLocale: s.config.parsingLocale
8670
8674
  })));
@@ -8678,13 +8682,13 @@ var uf = (e, { coordSystem: t, panelRect: n }) => {
8678
8682
  l
8679
8683
  ]);
8680
8684
  };
8681
- var mo = (e, t) => {
8685
+ var vo = (e, t) => {
8682
8686
  if (e.kind === "observations" && t.kind === "observations") {
8683
8687
  if (e.layerId !== t.layerId || e.scope !== t.scope) return !1;
8684
8688
  const n = e.parts[0]?.rows[0];
8685
8689
  return n !== void 0 && (t.parts[0]?.rows.includes(n) ?? !1);
8686
8690
  }
8687
- return e.kind === "guide" && t.kind === "guide" ? Gr(e.target, t.target) : e.kind === "graph" && t.kind === "graph";
8691
+ return e.kind === "guide" && t.kind === "guide" ? $r(e.target, t.target) : e.kind === "graph" && t.kind === "graph";
8688
8692
  }, Lf = (e, t) => {
8689
8693
  const n = Math.max(e.width, 8), r = Math.max(e.height, 8), o = Math.max(0, e.x + e.width / 2 - n / 2), i = Math.max(0, e.y + e.height / 2 - r / 2), l = Math.min(t.width, e.x + e.width / 2 + n / 2), s = Math.min(t.height, e.y + e.height / 2 + r / 2);
8690
8694
  return {
@@ -8702,7 +8706,7 @@ var mo = (e, t) => {
8702
8706
  i,
8703
8707
  l,
8704
8708
  s
8705
- ]), d = _(() => c !== null && e !== null && mo(c, e), [c, e]), u = yt(), h = o !== null && i !== void 0 && Of(o, i, n, u) ? o.observationIndex : null;
8709
+ ]), d = _(() => c !== null && e !== null && vo(c, e), [c, e]), u = St(), h = o !== null && i !== void 0 && Of(o, i, n, u) ? o.observationIndex : null;
8706
8710
  return _(() => {
8707
8711
  switch (r?.kind) {
8708
8712
  case "observations": {
@@ -8729,7 +8733,7 @@ var mo = (e, t) => {
8729
8733
  key: Rt(r.target),
8730
8734
  target: r.target
8731
8735
  };
8732
- return e !== null && mo(p, e) ? null : p;
8736
+ return e !== null && vo(p, e) ? null : p;
8733
8737
  }
8734
8738
  default:
8735
8739
  return null;
@@ -8746,7 +8750,7 @@ var mo = (e, t) => {
8746
8750
  layer: t,
8747
8751
  rows: Ku(t, n, r)
8748
8752
  }];
8749
- for (const i of $i(t, e)) {
8753
+ for (const i of Vi(t, e)) {
8750
8754
  const l = Du(i, t, n, r);
8751
8755
  l.length > 0 && o.push({
8752
8756
  layer: i,
@@ -8809,7 +8813,7 @@ var mo = (e, t) => {
8809
8813
  r !== null && t.set(r.legendIndex, [...t.get(r.legendIndex) ?? [], n]);
8810
8814
  }
8811
8815
  return t;
8812
- }, _f = (e) => e.closest(ui) !== null, Yn = (e) => e.map((t) => ({
8816
+ }, _f = (e) => e.closest(hi) !== null, Yn = (e) => e.map((t) => ({
8813
8817
  kind: "box",
8814
8818
  rect: t
8815
8819
  })), Ff = (e, { x: t, y: n, width: r, height: o }, i) => e.querySelector("circle") !== null ? {
@@ -8868,7 +8872,7 @@ var mo = (e, t) => {
8868
8872
  const t = (n) => Number(e?.getAttribute(n) ?? 0);
8869
8873
  return (t("x2") - t("x1")) * (t("y2") - t("y1")) >= 0;
8870
8874
  }, Bf = [], Hf = (e, { frameElement: t, frameSize: n, panelRect: r, animateTransitions: o }) => {
8871
- const i = F((f) => f.coordSystem), l = ri(), s = ei(), c = $f(e.kind === "guide" ? e.target : null, {
8875
+ const i = F((f) => f.coordSystem), l = ai(), s = ti(), c = $f(e.kind === "guide" ? e.target : null, {
8872
8876
  frameElement: t,
8873
8877
  frameSize: n
8874
8878
  }), d = Gf(t, n), u = _(() => ({
@@ -8881,11 +8885,11 @@ var mo = (e, t) => {
8881
8885
  r,
8882
8886
  l,
8883
8887
  s
8884
- ]), h = e.kind === "observations" ? e.parts : null, p = e.kind === "observations" ? e.vertex : null, g = _(() => h?.map((f) => vo(f, u, o)) ?? Bf, [
8888
+ ]), h = e.kind === "observations" ? e.parts : null, p = e.kind === "observations" ? e.vertex : null, g = _(() => h?.map((f) => fo(f, u, o)) ?? Bf, [
8885
8889
  h,
8886
8890
  u,
8887
8891
  o
8888
- ]), m = _(() => p === null ? null : vo(p, u, !1), [p, u]);
8892
+ ]), m = _(() => p === null ? null : fo(p, u, !1), [p, u]);
8889
8893
  return _(() => {
8890
8894
  switch (e.kind) {
8891
8895
  case "observations":
@@ -8914,10 +8918,10 @@ var mo = (e, t) => {
8914
8918
  d
8915
8919
  ]);
8916
8920
  }, Gf = (e, t) => {
8917
- const [n, r] = Z(() => Sr(e, t));
8921
+ const [n, r] = Z(() => Cr(e, t));
8918
8922
  return Ye(() => {
8919
8923
  r((o) => {
8920
- const i = Sr(e, {
8924
+ const i = Cr(e, {
8921
8925
  width: t.width,
8922
8926
  height: t.height
8923
8927
  });
@@ -8928,7 +8932,7 @@ var mo = (e, t) => {
8928
8932
  t.width,
8929
8933
  t.height
8930
8934
  ]), n;
8931
- }, vo = ({ layer: e, rows: t }, { coordSystem: n, panelRect: r, resolveRenderer: o, geomReaders: i }, l) => {
8935
+ }, fo = ({ layer: e, rows: t }, { coordSystem: n, panelRect: r, resolveRenderer: o, geomReaders: i }, l) => {
8932
8936
  const s = {
8933
8937
  ...e,
8934
8938
  data: e.data.take(t)
@@ -8937,7 +8941,7 @@ var mo = (e, t) => {
8937
8941
  kind: "boxes",
8938
8942
  layer: e,
8939
8943
  rows: t,
8940
- boxes: Ki({
8944
+ boxes: ji({
8941
8945
  layer: s,
8942
8946
  coordSystem: n,
8943
8947
  panelSize: r
@@ -9020,7 +9024,7 @@ var mo = (e, t) => {
9020
9024
  radius: e.radius * t
9021
9025
  };
9022
9026
  }
9023
- }, Wf = ["x", "y"], Uf = Ji(function({ frameElement: t, frameSize: n, panelRect: r, animateTransitions: o }) {
9027
+ }, Wf = ["x", "y"], Uf = Qi(function({ frameElement: t, frameSize: n, panelRect: r, animateTransitions: o }) {
9024
9028
  const i = nd(Zu, ee()), l = Tf(), s = Mf(l?.outlined ?? null), { selectObservationsOnPress: c, selectGraphOnPress: d, selectGuidesOnPress: u } = Re[ye()], h = Pf(), p = c || d || u;
9025
9029
  if (l === null && h === null && (s === null || !p)) return null;
9026
9030
  const g = {
@@ -9040,7 +9044,7 @@ var mo = (e, t) => {
9040
9044
  });
9041
9045
  const m = l?.target.kind === "observations" ? l.outlined : h;
9042
9046
  return m === null ? null : /* @__PURE__ */ a("svg", {
9043
- className: po,
9047
+ className: go,
9044
9048
  width: n.width,
9045
9049
  height: n.height,
9046
9050
  "aria-hidden": !0,
@@ -9056,7 +9060,7 @@ var mo = (e, t) => {
9056
9060
  });
9057
9061
  }
9058
9062
  return /* @__PURE__ */ v("svg", {
9059
- className: po,
9063
+ className: go,
9060
9064
  width: n.width,
9061
9065
  height: n.height,
9062
9066
  "aria-hidden": !0,
@@ -9142,25 +9146,25 @@ var mo = (e, t) => {
9142
9146
  fill: "black",
9143
9147
  stroke: "black",
9144
9148
  strokeLinecap: "round",
9145
- ...De({ [da]: `${2 * e}px` })
9149
+ ...De({ [ha]: `${2 * e}px` })
9146
9150
  }), jf = (e) => ({
9147
9151
  fill: "none",
9148
9152
  stroke: e.backingColor ?? ve.graphBackground,
9149
9153
  strokeLinecap: "round",
9150
9154
  opacity: e.backingAlpha,
9151
- ...De({ [da]: `${2 * Bt(e)}px` })
9155
+ ...De({ [ha]: `${2 * Bt(e)}px` })
9152
9156
  }), Xf = (e) => {
9153
- const t = Yi(e.dashArray, e.strokeWidth);
9157
+ const t = Zi(e.dashArray, e.strokeWidth);
9154
9158
  return {
9155
9159
  fill: "none",
9156
9160
  stroke: e.stroke,
9157
9161
  strokeDasharray: t,
9158
9162
  strokeLinecap: t === void 0 ? "round" : "butt",
9159
9163
  opacity: e.strokeAlpha,
9160
- ...De({ [da]: `${2 * Bt(e)}px` })
9164
+ ...De({ [ha]: `${2 * Bt(e)}px` })
9161
9165
  };
9162
9166
  }, qf = ({ dashArray: e, strokeWidth: t }) => {
9163
- if (Yi(e, t) === void 0) return;
9167
+ if (Zi(e, t) === void 0) return;
9164
9168
  const n = (e.length % 2 === 0 ? 1 : 2) * e.reduce((r, o) => r + o * t, 0);
9165
9169
  return n > 0 ? n : void 0;
9166
9170
  }, zs = (e, t, n = 1) => {
@@ -9168,7 +9172,7 @@ var mo = (e, t) => {
9168
9172
  return n * Math.max(1, Math.round(2 * Math.PI * e / t)) * t;
9169
9173
  }, Yf = (e, t, n) => {
9170
9174
  const r = n.offset + Bt(n);
9171
- return Rr(dt({
9175
+ return Nr(ut({
9172
9176
  x: 0,
9173
9177
  y: 0,
9174
9178
  ...e
@@ -9179,11 +9183,11 @@ var mo = (e, t) => {
9179
9183
  case "observations":
9180
9184
  return /* @__PURE__ */ v("g", {
9181
9185
  transform: `translate(${n.x} ${n.y})`,
9182
- children: [e.parts.map((l) => /* @__PURE__ */ a(fo, {
9186
+ children: [e.parts.map((l) => /* @__PURE__ */ a(bo, {
9183
9187
  part: l,
9184
9188
  borderRadius: o,
9185
9189
  dashPeriod: i
9186
- }, l.layer.id)), e.vertex !== null && /* @__PURE__ */ a(fo, {
9190
+ }, l.layer.id)), e.vertex !== null && /* @__PURE__ */ a(bo, {
9187
9191
  part: e.vertex,
9188
9192
  borderRadius: o,
9189
9193
  dashPeriod: i
@@ -9199,7 +9203,7 @@ var mo = (e, t) => {
9199
9203
  case "graph":
9200
9204
  return /* @__PURE__ */ a("path", { d: Yf(e.frameSize, r, t) });
9201
9205
  }
9202
- }, fo = Ji(function({ part: t, borderRadius: n, dashPeriod: r }) {
9206
+ }, bo = Qi(function({ part: t, borderRadius: n, dashPeriod: r }) {
9203
9207
  return t.kind === "boxes" ? /* @__PURE__ */ a(Qf, {
9204
9208
  boxes: t.boxes,
9205
9209
  borderRadius: n
@@ -9212,7 +9216,7 @@ var mo = (e, t) => {
9212
9216
  const i = r.kind === "dots" || r.key === void 0 ? String(o) : `${r.kind}:${r.key}`;
9213
9217
  switch (r.kind) {
9214
9218
  case "region":
9215
- return r.pathData === "" ? null : /* @__PURE__ */ a(go, {
9219
+ return r.pathData === "" ? null : /* @__PURE__ */ a(mo, {
9216
9220
  pathData: r.pathData,
9217
9221
  fillRule: r.fillRule,
9218
9222
  animateTransitions: r.animateTransitions ?? !1,
@@ -9220,7 +9224,7 @@ var mo = (e, t) => {
9220
9224
  "data-geom": t.geom
9221
9225
  }, i);
9222
9226
  case "stroke":
9223
- return r.pathData === "" ? null : /* @__PURE__ */ a(go, {
9227
+ return r.pathData === "" ? null : /* @__PURE__ */ a(mo, {
9224
9228
  pathData: r.pathData,
9225
9229
  animateTransitions: r.animateTransitions ?? !1,
9226
9230
  source: t,
@@ -9235,7 +9239,7 @@ var mo = (e, t) => {
9235
9239
  }, i);
9236
9240
  }
9237
9241
  }), Qf = ({ boxes: e, borderRadius: t }) => {
9238
- const n = e.map((r) => Rr(r, t)).join("");
9242
+ const n = e.map((r) => Nr(r, t)).join("");
9239
9243
  return n === "" ? null : /* @__PURE__ */ a("path", {
9240
9244
  d: n,
9241
9245
  "data-testid": "edit-outline-boxes"
@@ -9243,8 +9247,8 @@ var mo = (e, t) => {
9243
9247
  }, e0 = ({ target: e, shapes: t, borderRadius: n, dashPeriod: r }) => {
9244
9248
  const o = ee();
9245
9249
  if (e.kind === "grid") return Wf.map((l) => {
9246
- const s = Ns(oi(o, l).strokeWidth), c = t.map((u) => t0(u, l)).join(""), d = t.filter((u) => u.kind === "ring" && u.axis === l);
9247
- return /* @__PURE__ */ v(Zi, { children: [c !== "" && /* @__PURE__ */ a("path", {
9250
+ const s = Ns(ii(o, l).strokeWidth), c = t.map((u) => t0(u, l)).join(""), d = t.filter((u) => u.kind === "ring" && u.axis === l);
9251
+ return /* @__PURE__ */ v(Ji, { children: [c !== "" && /* @__PURE__ */ a("path", {
9248
9252
  d: c,
9249
9253
  ...s
9250
9254
  }), d.map((u, h) => /* @__PURE__ */ a("path", {
@@ -9253,7 +9257,7 @@ var mo = (e, t) => {
9253
9257
  ...s
9254
9258
  }, h))] }, l);
9255
9259
  });
9256
- const i = t.map((l) => l.kind === "box" ? Rr(l.rect, n) : "").join("");
9260
+ const i = t.map((l) => l.kind === "box" ? Nr(l.rect, n) : "").join("");
9257
9261
  return i === "" ? null : /* @__PURE__ */ a("path", { d: i });
9258
9262
  }, t0 = (e, t) => e.kind === "line" && e.axis === t ? `M${e.from.x},${e.from.y}L${e.to.x},${e.to.y}` : "", n0 = ({ center: e, radius: t }) => {
9259
9263
  const n = `${e.x},${e.y - t}`;
@@ -9409,7 +9413,7 @@ var mo = (e, t) => {
9409
9413
  xValue: i0,
9410
9414
  group: l0
9411
9415
  }, c0 = () => {
9412
- const { selectionStore: e } = W(), t = ae(), n = R(), r = Sn(), o = F((y) => y), i = En(o, r), l = Y((y) => y.pressedObservation), s = yt(), c = _(() => d0({
9416
+ const { selectionStore: e } = W(), t = ae(), n = R(), r = Sn(), o = F((y) => y), i = En(o, r), l = Y((y) => y.pressedObservation), s = St(), c = _(() => d0({
9413
9417
  scene: o,
9414
9418
  pressed: l,
9415
9419
  groupOptions: i,
@@ -9444,7 +9448,7 @@ var mo = (e, t) => {
9444
9448
  selectedFor: w
9445
9449
  }), e.getState().setSelection([w]));
9446
9450
  };
9447
- return /* @__PURE__ */ a(yl, {
9451
+ return /* @__PURE__ */ a(Sl, {
9448
9452
  value: g.scope,
9449
9453
  options: m,
9450
9454
  onChange: f,
@@ -9517,7 +9521,7 @@ var mo = (e, t) => {
9517
9521
  }
9518
9522
  i(d), n.dispatch(c);
9519
9523
  }, h = t(s ? "editor.overlayMenu.show" : "editor.overlayMenu.hide");
9520
- return /* @__PURE__ */ a(mt, {
9524
+ return /* @__PURE__ */ a(vt, {
9521
9525
  label: h,
9522
9526
  children: /* @__PURE__ */ a("button", {
9523
9527
  type: "button",
@@ -9634,7 +9638,7 @@ var mo = (e, t) => {
9634
9638
  target: e,
9635
9639
  parsingLocale: t.config.parsingLocale
9636
9640
  }), d = c === void 0 ? null : s.data.getAt(c);
9637
- return d === null ? l : vr({
9641
+ return d === null ? l : fr({
9638
9642
  scene: t,
9639
9643
  layer: s,
9640
9644
  observation: d,
@@ -9643,7 +9647,7 @@ var mo = (e, t) => {
9643
9647
  t: o
9644
9648
  }, e.scope);
9645
9649
  }, P0 = ({ frameElement: e }) => {
9646
- const { selectionStore: t } = W(), n = L0(Y((u) => u.selectedOutline)), r = Y((u) => u.annotatePress), o = Re[ye()].showMenuTriggerOnHover, i = T1(n?.target ?? null), l = yt(), s = n === null ? null : Rt(n.target), c = _(() => o && s !== null ? v0(r, s) : null, [
9650
+ const { selectionStore: t } = W(), n = L0(Y((u) => u.selectedOutline)), r = Y((u) => u.annotatePress), o = Re[ye()].showMenuTriggerOnHover, i = T1(n?.target ?? null), l = St(), s = n === null ? null : Rt(n.target), c = _(() => o && s !== null ? v0(r, s) : null, [
9647
9651
  o,
9648
9652
  r,
9649
9653
  s
@@ -9652,7 +9656,7 @@ var mo = (e, t) => {
9652
9656
  const d = () => {
9653
9657
  t.getState().clearSelection();
9654
9658
  };
9655
- return /* @__PURE__ */ v(Cr, {
9659
+ return /* @__PURE__ */ v(wr, {
9656
9660
  frameElement: e,
9657
9661
  boundary: c?.boundary ?? n.frame,
9658
9662
  spans: c?.spans ?? n.frameSpans,
@@ -9663,10 +9667,10 @@ var mo = (e, t) => {
9663
9667
  className: b0,
9664
9668
  children: [/* @__PURE__ */ a(k0, { target: n.target }), /* @__PURE__ */ a(g0, { target: n.target }, s)]
9665
9669
  }), n.target.kind === "observations" && /* @__PURE__ */ a(c0, {})]
9666
- }), /* @__PURE__ */ a(Zi, { children: i }, s)]
9670
+ }), /* @__PURE__ */ a(Ji, { children: i }, s)]
9667
9671
  });
9668
9672
  }, L0 = (e) => {
9669
- const t = at(), [n, r] = Z(e), o = n !== null && Gr(t[0] ?? null, n.target), i = e ?? (o ? n : null);
9673
+ const t = at(), [n, r] = Z(e), o = n !== null && $r(t[0] ?? null, n.target), i = e ?? (o ? n : null);
9670
9674
  return i !== n && r(i), i;
9671
9675
  }, I0 = ({ frameRect: e }) => {
9672
9676
  const { targetBoundaryStore: t } = W(), n = Y((l) => l.selectedOutline), { left: r, top: o } = e, i = _(() => {
@@ -9699,10 +9703,10 @@ var mo = (e, t) => {
9699
9703
  }, Zt = (e, t, n) => ({
9700
9704
  from: t + e.from * n,
9701
9705
  to: t + e.to * n
9702
- }), ua = "l8tsqe0", Bs = ["start", "end"], Hs = ({ anchor: e, point: t, delta: n, bounds: r = Si }) => {
9706
+ }), pa = "l8tsqe0", Bs = ["start", "end"], Hs = ({ anchor: e, point: t, delta: n, bounds: r = Ci }) => {
9703
9707
  const o = {
9704
- x: bo(t.x, n.x, r.minX, r.maxX),
9705
- y: bo(1 - t.y, n.y, r.minY, r.maxY)
9708
+ x: yo(t.x, n.x, r.minX, r.maxX),
9709
+ y: yo(1 - t.y, n.y, r.minY, r.maxY)
9706
9710
  };
9707
9711
  return {
9708
9712
  anchor: {
@@ -9715,7 +9719,7 @@ var mo = (e, t) => {
9715
9719
  y: t.y - o.y
9716
9720
  }
9717
9721
  };
9718
- }, ha = (e, t) => ({
9722
+ }, ga = (e, t) => ({
9719
9723
  ...e,
9720
9724
  [t.endpoint]: {
9721
9725
  ...e[t.endpoint],
@@ -9735,20 +9739,20 @@ var mo = (e, t) => {
9735
9739
  width: Math.abs(o.x - r.x),
9736
9740
  height: Math.abs(o.y - r.y)
9737
9741
  };
9738
- }, bo = (e, t, n, r) => !Number.isFinite(t) || !Number.isFinite(e) ? 0 : gt(t, Math.min(n - e, 0), Math.max(r - e, 0)), O0 = ({ panelRect: e }) => {
9742
+ }, yo = (e, t, n, r) => !Number.isFinite(t) || !Number.isFinite(e) ? 0 : mt(t, Math.min(n - e, 0), Math.max(r - e, 0)), O0 = ({ panelRect: e }) => {
9739
9743
  const t = Y((s) => J(s, "arrow-endpoint-drag")), n = rt(e).arrows, r = ee();
9740
9744
  if (t === null) return null;
9741
9745
  const o = n.find((s) => s.id === t.annotationId);
9742
9746
  if (o === void 0) return null;
9743
- const i = Wr(r, o.id), l = Hi({
9744
- arrow: ha(o, t),
9747
+ const i = Ur(r, o.id), l = Gi({
9748
+ arrow: ga(o, t),
9745
9749
  style: i,
9746
9750
  panelWidth: e.width,
9747
9751
  panelHeight: e.height
9748
9752
  });
9749
9753
  return l === null ? null : /* @__PURE__ */ a("svg", {
9750
9754
  "aria-hidden": "true",
9751
- className: ua,
9755
+ className: pa,
9752
9756
  width: e.width,
9753
9757
  height: e.height,
9754
9758
  style: {
@@ -9757,7 +9761,7 @@ var mo = (e, t) => {
9757
9761
  },
9758
9762
  "data-testid": "arrow-endpoint-preview",
9759
9763
  "data-annotation-id": t.annotationId,
9760
- children: /* @__PURE__ */ a(li, {
9764
+ children: /* @__PURE__ */ a(si, {
9761
9765
  computed: l,
9762
9766
  style: i,
9763
9767
  addressable: !1
@@ -9833,7 +9837,7 @@ var mo = (e, t) => {
9833
9837
  ]
9834
9838
  })
9835
9839
  }), D0 = "var(--pvjfpx0)", _0 = "var(--pvjfpx1)", F0 = "pvjfpx2", z0 = "pvjfpx3", B0 = "pvjfpx4", H0 = "pvjfpx6 pvjfpx5", G0 = "pvjfpx7 pvjfpx6 pvjfpx5", $0 = "pvjfpx8 pvjfpx5", kt = 8, V0 = ({ anchorBox: e, panelRect: t, frameWidth: n, frameHeight: r }) => {
9836
- const o = t.y + e.y, i = o + e.height, l = o - 8 - 36, s = i + 8, c = gt(l >= kt ? l : s, kt, r - kt - 36), d = kt;
9840
+ const o = t.y + e.y, i = o + e.height, l = o - 8 - 36, s = i + 8, c = mt(l >= kt ? l : s, kt, r - kt - 36), d = kt;
9837
9841
  return {
9838
9842
  top: c,
9839
9843
  left: d,
@@ -9980,7 +9984,7 @@ var mo = (e, t) => {
9980
9984
  value: Bn.thick,
9981
9985
  key: "graph.annotations.arrowToolbar.thickness.thick"
9982
9986
  }
9983
- ], yo = [{
9987
+ ], So = [{
9984
9988
  value: "lineArrow",
9985
9989
  key: "graph.annotations.arrowToolbar.arrowhead.lineArrow",
9986
9990
  Icon: $s
@@ -9988,7 +9992,7 @@ var mo = (e, t) => {
9988
9992
  value: "none",
9989
9993
  key: "graph.annotations.arrowToolbar.arrowhead.none",
9990
9994
  Icon: Ec
9991
- }], So = [
9995
+ }], Co = [
9992
9996
  {
9993
9997
  value: "solid",
9994
9998
  key: "graph.annotations.arrowToolbar.lineStyle.solid",
@@ -10006,7 +10010,7 @@ var mo = (e, t) => {
10006
10010
  }
10007
10011
  ], tb = (e, t) => e.find((n) => n.value === t) ?? e[0];
10008
10012
  var nb = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: r, frameHeight: o, frameElement: i }) => {
10009
- const l = R(), { commands: s } = W(), c = F((S) => S.spec.styles.overrides), d = F((S) => xe(S.spec)), u = Rn(), h = Wr(ee(), e.id), p = tb(So, tt(h.dashArray)), g = h.outline.strokeWidth > 0 || h.outline.shadow !== "none", m = _(() => ({
10013
+ const l = R(), { commands: s } = W(), c = F((S) => S.spec.styles.overrides), d = F((S) => xe(S.spec)), u = Rn(), h = Ur(ee(), e.id), p = tb(Co, tt(h.dashArray)), g = h.outline.strokeWidth > 0 || h.outline.shadow !== "none", m = _(() => ({
10010
10014
  target: "annotation",
10011
10015
  kind: "arrow",
10012
10016
  annotation: e.id
@@ -10087,7 +10091,7 @@ var nb = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: r, frameHeight: o,
10087
10091
  }),
10088
10092
  ...u.bind("startArrowhead"),
10089
10093
  children: /* @__PURE__ */ a(Jt, {
10090
- options: yo,
10094
+ options: So,
10091
10095
  current: e.startArrowheadStyle,
10092
10096
  onPick: N
10093
10097
  })
@@ -10100,7 +10104,7 @@ var nb = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: r, frameHeight: o,
10100
10104
  }),
10101
10105
  ...u.bind("lineStyle"),
10102
10106
  children: /* @__PURE__ */ a(Jt, {
10103
- options: So,
10107
+ options: Co,
10104
10108
  current: tt(h.dashArray),
10105
10109
  onPick: x
10106
10110
  })
@@ -10113,7 +10117,7 @@ var nb = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: r, frameHeight: o,
10113
10117
  }),
10114
10118
  ...u.bind("endArrowhead"),
10115
10119
  children: /* @__PURE__ */ a(Jt, {
10116
- options: yo,
10120
+ options: So,
10117
10121
  current: e.endArrowheadStyle,
10118
10122
  onPick: O
10119
10123
  })
@@ -10151,13 +10155,13 @@ var nb = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: r, frameHeight: o,
10151
10155
  })
10152
10156
  })]
10153
10157
  }, String(i.value))) });
10154
- }, rb = "_1me29t10", Ae = (e, t) => t > 0 ? e / t : 0, Ws = (e, t) => e.width <= 0 || e.height <= 0 || t.width <= 0 || t.height <= 0 ? Si : {
10158
+ }, rb = "_1me29t10", Ae = (e, t) => t > 0 ? e / t : 0, Ws = (e, t) => e.width <= 0 || e.height <= 0 || t.width <= 0 || t.height <= 0 ? Ci : {
10155
10159
  minX: Math.min(0, -e.x / e.width),
10156
10160
  minY: Math.min(0, -e.y / e.height),
10157
10161
  maxX: Math.max(1, (t.width - e.x) / e.width),
10158
10162
  maxY: Math.max(1, (t.height - e.y) / e.height)
10159
10163
  }, Ge = (e, t) => {
10160
- const n = t.getBoundingClientRect(), r = Sr(t, n), o = r.width + 0.5 >= e.x + e.width && r.height + 0.5 >= e.y + e.height ? r : n;
10164
+ const n = t.getBoundingClientRect(), r = Cr(t, n), o = r.width + 0.5 >= e.x + e.width && r.height + 0.5 >= e.y + e.height ? r : n;
10161
10165
  return Ws(e, o);
10162
10166
  }, Nn = (e, t, n) => ({
10163
10167
  x: Ae(t.x - e.x, n.width),
@@ -10227,7 +10231,7 @@ var ob = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Ht = class {
10227
10231
  }
10228
10232
  readOwn(e) {
10229
10233
  const { annotationId: t, endpoint: n } = this.params;
10230
- return Dr(J(e, "arrow-endpoint-drag"), t, n);
10234
+ return _r(J(e, "arrow-endpoint-drag"), t, n);
10231
10235
  }
10232
10236
  resolvePreview(e) {
10233
10237
  const { annotationId: t, endpoint: n, press: r, readInputs: o } = this.params, { annotations: i, arrow: l, panelRect: s, frameElement: c } = o(), d = mn(i, t, n);
@@ -10288,10 +10292,10 @@ var ob = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Ht = class {
10288
10292
  i,
10289
10293
  o
10290
10294
  ]);
10291
- }, sb = [" ", "Enter"], Co = 4, cb = ({ annotationId: e, arrow: t, panelRect: n, frameElement: r }) => {
10295
+ }, sb = [" ", "Enter"], wo = 4, cb = ({ annotationId: e, arrow: t, panelRect: n, frameElement: r }) => {
10292
10296
  const { commands: o } = W(), i = ae(), l = F((d) => d.spec.annotations), s = ue(l), c = ue(o.dispatch);
10293
10297
  return B(() => () => {
10294
- for (const d of Bs) wo({
10298
+ for (const d of Bs) xo({
10295
10299
  editorStore: i,
10296
10300
  annotationId: e,
10297
10301
  endpoint: d,
@@ -10305,11 +10309,11 @@ var ob = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Ht = class {
10305
10309
  c
10306
10310
  ]), ce((d) => ({ onKeyDown: (u) => {
10307
10311
  if (u.altKey || u.ctrlKey || u.metaKey || u.shiftKey) return;
10308
- const h = i.getState(), p = Dr(J(h, "arrow-endpoint-drag"), e, d);
10312
+ const h = i.getState(), p = _r(J(h, "arrow-endpoint-drag"), e, d);
10309
10313
  if (sb.includes(u.key)) {
10310
10314
  if (u.preventDefault(), u.repeat) return;
10311
10315
  if (p !== null) {
10312
- wo({
10316
+ xo({
10313
10317
  editorStore: i,
10314
10318
  annotationId: e,
10315
10319
  endpoint: d,
@@ -10351,8 +10355,8 @@ var ob = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Ht = class {
10351
10355
  i,
10352
10356
  o
10353
10357
  ]);
10354
- }, wo = ({ editorStore: e, annotationId: t, endpoint: n, annotations: r, dispatch: o }) => {
10355
- const i = e.getState(), l = Dr(J(i, "arrow-endpoint-drag"), t, n);
10358
+ }, xo = ({ editorStore: e, annotationId: t, endpoint: n, annotations: r, dispatch: o }) => {
10359
+ const i = e.getState(), l = _r(J(i, "arrow-endpoint-drag"), t, n);
10356
10360
  if (l === null) return;
10357
10361
  i.releaseInteraction("arrow-endpoint-drag");
10358
10362
  const s = mn(r, t, n);
@@ -10362,7 +10366,7 @@ var ob = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Ht = class {
10362
10366
  patch: Ks(n, l.anchor)
10363
10367
  }));
10364
10368
  }, db = (e, t) => {
10365
- const n = Ae(Co, t.width), r = Ae(Co, t.height);
10369
+ const n = Ae(wo, t.width), r = Ae(wo, t.height);
10366
10370
  switch (e) {
10367
10371
  case "ArrowLeft":
10368
10372
  return {
@@ -10390,7 +10394,7 @@ var ob = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Ht = class {
10390
10394
  }, ub = (e) => {
10391
10395
  const t = Ft(), n = gb(t), r = mb(e.panelRect, t), o = vb(t);
10392
10396
  if (n === null || r === null) return null;
10393
- const i = o.dragged === null ? r : ha(r, o.dragged);
10397
+ const i = o.dragged === null ? r : ga(r, o.dragged);
10394
10398
  return /* @__PURE__ */ a(hb, {
10395
10399
  arrow: n,
10396
10400
  committed: r,
@@ -10472,7 +10476,7 @@ var Cb = [
10472
10476
  "absoluteDifference",
10473
10477
  "relativeDifference",
10474
10478
  "proportion"
10475
- ], xo = ["absoluteDifference", "relativeDifference"], wb = ["relativeDifference", "proportion"], xb = {
10479
+ ], ko = ["absoluteDifference", "relativeDifference"], wb = ["relativeDifference", "proportion"], xb = {
10476
10480
  absoluteDifference: "graph.annotations.differenceArrowToolbar.labelKind.absoluteDifference",
10477
10481
  relativeDifference: "graph.annotations.differenceArrowToolbar.labelKind.relativeDifference",
10478
10482
  proportion: "graph.annotations.differenceArrowToolbar.labelKind.proportion"
@@ -10480,7 +10484,7 @@ var Cb = [
10480
10484
  const { formattingLocale: t } = W(), n = F((o) => o.config.parsingLocale), r = t ?? n;
10481
10485
  return _(() => {
10482
10486
  const o = eu(e.start, e.end);
10483
- return Cb.filter((i) => o || !xo.includes(i) || i === e.label).map((i) => ({
10487
+ return Cb.filter((i) => o || !ko.includes(i) || i === e.label).map((i) => ({
10484
10488
  kind: i,
10485
10489
  key: xb[i],
10486
10490
  preview: Su({
@@ -10490,11 +10494,11 @@ var Cb = [
10490
10494
  endValue: e.end.measurementValue,
10491
10495
  valueFormat: e.start.valueFormat
10492
10496
  }),
10493
- pickable: o || !xo.includes(i),
10497
+ pickable: o || !ko.includes(i),
10494
10498
  suspect: wb.includes(i) && e.start.measurementValue === 0
10495
10499
  }));
10496
10500
  }, [e, r]);
10497
- }, ko = [
10501
+ }, To = [
10498
10502
  {
10499
10503
  id: "small",
10500
10504
  key: "graph.annotations.differenceArrowToolbar.size.small"
@@ -10515,7 +10519,7 @@ var Cb = [
10515
10519
  }), [e.id]), f = _(() => ({
10516
10520
  ...m,
10517
10521
  part: "label"
10518
- }), [m]), y = p.find((b) => b.kind === e.label), k = p.some((b) => b.pickable && b.kind !== e.label), C = ko.find((b) => xa[b.id].arrow.strokeWidth === g.strokeWidth), w = (b, E) => {
10522
+ }), [m]), y = p.find((b) => b.kind === e.label), k = p.some((b) => b.pickable && b.kind !== e.label), C = To.find((b) => Ta[b.id].arrow.strokeWidth === g.strokeWidth), w = (b, E) => {
10519
10523
  c.dispatch(new fe({
10520
10524
  kind: "differenceArrow",
10521
10525
  id: e.id,
@@ -10541,7 +10545,7 @@ var Cb = [
10541
10545
  start: e.end.anchor,
10542
10546
  end: e.start.anchor
10543
10547
  }), A = (b) => () => I({ label: b }), S = (b) => () => {
10544
- const E = xa[b];
10548
+ const E = Ta[b];
10545
10549
  c.dispatch(new Nd({
10546
10550
  annotationId: e.id,
10547
10551
  arrow: P(E.arrow),
@@ -10592,7 +10596,7 @@ var Cb = [
10592
10596
  label: s("graph.annotations.differenceArrowToolbar.size.ariaLabel"),
10593
10597
  trigger: C === void 0 ? "" : s(C.key),
10594
10598
  ...h.bind("size"),
10595
- children: ko.map((b) => /* @__PURE__ */ a(V.MenuItem, {
10599
+ children: To.map((b) => /* @__PURE__ */ a(V.MenuItem, {
10596
10600
  selected: b.id === C?.id,
10597
10601
  onClick: S(b.id),
10598
10602
  children: s(b.key)
@@ -10639,20 +10643,20 @@ var Pb = "ydgo3h1", Lb = "ydgo3h2", Ib = "ydgo3h3", Mb = ({ clientPoint: e, pane
10639
10643
  if (u === null) return null;
10640
10644
  const h = o.find((g) => g.id === u.layerId);
10641
10645
  if (h === void 0) return null;
10642
- const p = qi({
10646
+ const p = Yi({
10643
10647
  resolver: l,
10644
10648
  layer: h,
10645
10649
  observation: u.observation,
10646
- observationIndex: bt(u),
10650
+ observationIndex: yt(u),
10647
10651
  coordSystem: i,
10648
10652
  align: c
10649
10653
  });
10650
- return p === null || Hr(p.anchor, s) ? null : p;
10654
+ return p === null || Gr(p.anchor, s) ? null : p;
10651
10655
  }, Eb = (e, t) => ({
10652
10656
  x: Math.max(0, Math.min(e.x, t.width)),
10653
10657
  y: Math.max(0, Math.min(e.y, t.height))
10654
10658
  }), Xs = (e) => e === "start" ? "end" : "start", qs = ({ dispatch: e, arrow: t, endpoint: n, anchor: r }) => {
10655
- Hr(r, t[n].anchor) || e(new fe({
10659
+ Gr(r, t[n].anchor) || e(new fe({
10656
10660
  kind: "differenceArrow",
10657
10661
  id: t.id,
10658
10662
  patch: { [n]: r }
@@ -10663,7 +10667,7 @@ var Pb = "ydgo3h1", Lb = "ydgo3h2", Ib = "ydgo3h3", Mb = ({ clientPoint: e, pane
10663
10667
  }
10664
10668
  readOwn(e) {
10665
10669
  const { endpoint: t, readInputs: n } = this.params;
10666
- return gi(J(e, "difference-arrow-endpoint-drag"), n().arrow.id, t);
10670
+ return mi(J(e, "difference-arrow-endpoint-drag"), n().arrow.id, t);
10667
10671
  }
10668
10672
  resolvePreview(e) {
10669
10673
  const { endpoint: t, readInputs: n, engine: r, anchorResolver: o } = this.params, { arrow: i, panelOrigin: l, panelRect: s, layers: c, coordSystem: d } = n(), u = Mb({
@@ -10748,7 +10752,7 @@ var Pb = "ydgo3h1", Lb = "ydgo3h2", Ib = "ydgo3h3", Mb = ({ clientPoint: e, pane
10748
10752
  J(c, "difference-arrow-endpoint-drag")?.annotationId === s && c.releaseInteraction("difference-arrow-endpoint-drag");
10749
10753
  }, [r, s]), ce((c) => ({ onKeyDown: (d) => {
10750
10754
  if (d.altKey || d.ctrlKey || d.metaKey || d.shiftKey) return;
10751
- const u = r.getState(), h = gi(J(u, "difference-arrow-endpoint-drag"), e.id, c);
10755
+ const u = r.getState(), h = mi(J(u, "difference-arrow-endpoint-drag"), e.id, c);
10752
10756
  if (Nb.includes(d.key)) {
10753
10757
  if (d.preventDefault(), d.repeat) return;
10754
10758
  if (h === null) return u.claimInteraction({
@@ -10811,7 +10815,7 @@ var Pb = "ydgo3h1", Lb = "ydgo3h2", Ib = "ydgo3h3", Mb = ({ clientPoint: e, pane
10811
10815
  partner: e[Xs(t)].anchor,
10812
10816
  axis: r.axis,
10813
10817
  step: r.step,
10814
- getObservationPoint: (u, h) => qi({
10818
+ getObservationPoint: (u, h) => Yi({
10815
10819
  resolver: l,
10816
10820
  layer: s,
10817
10821
  observation: u,
@@ -10822,7 +10826,7 @@ var Pb = "ydgo3h1", Lb = "ydgo3h2", Ib = "ydgo3h3", Mb = ({ clientPoint: e, pane
10822
10826
  })
10823
10827
  })?.point ?? null;
10824
10828
  }, zb = (e) => {
10825
- const t = Ft(), n = ni(), r = ce((o) => {
10829
+ const t = Ft(), n = ri(), r = ce((o) => {
10826
10830
  const i = e.frameElement.querySelector('[data-testid="pointer-capture-layer"]');
10827
10831
  i !== null && i.dispatchEvent(new PointerEvent("pointerdown", {
10828
10832
  bubbles: !0,
@@ -10846,7 +10850,7 @@ var Pb = "ydgo3h1", Lb = "ydgo3h2", Ib = "ydgo3h3", Mb = ({ clientPoint: e, pane
10846
10850
  onClick: r
10847
10851
  }, o.id))] });
10848
10852
  }, Bb = ({ annotationId: e, panelOrigin: t, ...n }) => {
10849
- const r = ni(), o = _(() => r.find((i) => i.id === e), [r, e]);
10853
+ const r = ri(), o = _(() => r.find((i) => i.id === e), [r, e]);
10850
10854
  return o === void 0 ? null : /* @__PURE__ */ a(Hb, {
10851
10855
  committedArrow: o.committedArrow,
10852
10856
  color: o.color,
@@ -10903,7 +10907,7 @@ var Pb = "ydgo3h1", Lb = "ydgo3h2", Ib = "ydgo3h3", Mb = ({ clientPoint: e, pane
10903
10907
  }), u = Db({ arrow: e.committedArrow }), h = ee().editOutline.selected().resolve().stroke;
10904
10908
  return /* @__PURE__ */ v("div", {
10905
10909
  style: De({ [js]: h }),
10906
- children: [/* @__PURE__ */ a(To, {
10910
+ children: [/* @__PURE__ */ a(Ao, {
10907
10911
  endpoint: "start",
10908
10912
  point: e.start,
10909
10913
  panelRect: r,
@@ -10911,7 +10915,7 @@ var Pb = "ydgo3h1", Lb = "ydgo3h2", Ib = "ydgo3h3", Mb = ({ clientPoint: e, pane
10911
10915
  keyboard: n,
10912
10916
  dragHandlers: d("start"),
10913
10917
  keyboardHandlers: u("start")
10914
- }), /* @__PURE__ */ a(To, {
10918
+ }), /* @__PURE__ */ a(Ao, {
10915
10919
  endpoint: "end",
10916
10920
  point: e.end,
10917
10921
  panelRect: r,
@@ -10921,7 +10925,7 @@ var Pb = "ydgo3h1", Lb = "ydgo3h2", Ib = "ydgo3h3", Mb = ({ clientPoint: e, pane
10921
10925
  keyboardHandlers: u("end")
10922
10926
  })]
10923
10927
  });
10924
- }, To = ({ endpoint: e, point: t, panelRect: n, shown: r, keyboard: o, dragHandlers: i, keyboardHandlers: l }) => /* @__PURE__ */ a("div", {
10928
+ }, Ao = ({ endpoint: e, point: t, panelRect: n, shown: r, keyboard: o, dragHandlers: i, keyboardHandlers: l }) => /* @__PURE__ */ a("div", {
10925
10929
  className: Pb,
10926
10930
  "data-testid": "difference-arrow-selection-handle",
10927
10931
  "data-endpoint": e,
@@ -10938,14 +10942,14 @@ var Pb = "ydgo3h1", Lb = "ydgo3h2", Ib = "ydgo3h3", Mb = ({ clientPoint: e, pane
10938
10942
  "aria-hidden": "true",
10939
10943
  className: Lb
10940
10944
  })
10941
- }), Tr = ({ start: e, extent: t, moveStartEdge: n, delta: r, minExtent: o, bounds: i }) => {
10945
+ }), Ar = ({ start: e, extent: t, moveStartEdge: n, delta: r, minExtent: o, bounds: i }) => {
10942
10946
  if (!Number.isFinite(r)) return {
10943
10947
  start: e,
10944
10948
  extent: t
10945
10949
  };
10946
10950
  const l = i?.min ?? 0, s = i?.max ?? 1, c = e + t, d = Math.min(o, t);
10947
10951
  if (n) {
10948
- const p = Math.min(l, e), g = Math.min(Math.max(s, e), c - d), m = gt(e + r, p, g);
10952
+ const p = Math.min(l, e), g = Math.min(Math.max(s, e), c - d), m = mt(e + r, p, g);
10949
10953
  return {
10950
10954
  start: m,
10951
10955
  extent: c - m
@@ -10954,7 +10958,7 @@ var Pb = "ydgo3h1", Lb = "ydgo3h2", Ib = "ydgo3h3", Mb = ({ clientPoint: e, pane
10954
10958
  const u = Math.max(Math.min(l, c), e + d), h = Math.max(s, c);
10955
10959
  return {
10956
10960
  start: e,
10957
- extent: gt(c + r, u, h) - e
10961
+ extent: mt(c + r, u, h) - e
10958
10962
  };
10959
10963
  }, $b = [
10960
10964
  "top-left",
@@ -10968,13 +10972,13 @@ var Ys = ({ width: e, height: t }) => ({
10968
10972
  }), Vb = (e, t) => ({
10969
10973
  x: Qs(t) ? e.x : e.x + e.width,
10970
10974
  y: ec(t) ? e.y : e.y + e.height
10971
- }), pa = (e) => ({
10975
+ }), ma = (e) => ({
10972
10976
  x: e.x,
10973
10977
  y: 1 - e.y - e.height,
10974
10978
  width: e.width,
10975
10979
  height: e.height
10976
10980
  }), Zs = ({ region: e, corner: t, delta: n, minSize: r, bounds: o }) => {
10977
- const i = Tr({
10981
+ const i = Ar({
10978
10982
  start: e.x,
10979
10983
  extent: e.width,
10980
10984
  moveStartEdge: Qs(t),
@@ -10984,7 +10988,7 @@ var Ys = ({ width: e, height: t }) => ({
10984
10988
  min: o.minX,
10985
10989
  max: o.maxX
10986
10990
  } }
10987
- }), l = Tr({
10991
+ }), l = Ar({
10988
10992
  start: e.y,
10989
10993
  extent: e.height,
10990
10994
  moveStartEdge: ec(t),
@@ -11013,7 +11017,7 @@ var Ub = {
11013
11017
  hovered: "_1ee8fau5 _1ee8fau4",
11014
11018
  selected: "_1ee8fau6 _1ee8fau4"
11015
11019
  }, jb = ({ panelRect: e }) => {
11016
- const t = rt(e), n = vi(), r = ee(), o = Ft(), i = Y((f) => J(f, "move-drag")), l = Y((f) => J(f, "shape-resize-drag")), s = Y((f) => J(f, "arrow-endpoint-drag")), c = Y((f) => J(f, "text-resize-drag")), d = Y(Oc), u = _(() => ({
11020
+ const t = rt(e), n = fi(), r = ee(), o = Ft(), i = Y((f) => J(f, "move-drag")), l = Y((f) => J(f, "shape-resize-drag")), s = Y((f) => J(f, "arrow-endpoint-drag")), c = Y((f) => J(f, "text-resize-drag")), d = Y(Oc), u = _(() => ({
11017
11021
  panel: {
11018
11022
  width: e.width,
11019
11023
  height: e.height
@@ -11025,14 +11029,14 @@ var Ub = {
11025
11029
  e.height,
11026
11030
  n,
11027
11031
  r
11028
- ]), h = Ao(t, o, u), p = Ao(t, d === o ? null : d, u), g = (f) => {
11032
+ ]), h = Po(t, o, u), p = Po(t, d === o ? null : d, u), g = (f) => {
11029
11033
  if (l?.annotationId === f.id) {
11030
11034
  const y = t.shapes.find((k) => k.id === f.id);
11031
- return y === void 0 ? f.geometry : ai(pa(l.region), r.annotation.shape(y.id).get("strokeWidth"), u.panel);
11035
+ return y === void 0 ? f.geometry : oi(ma(l.region), r.annotation.shape(y.id).get("strokeWidth"), u.panel);
11032
11036
  }
11033
11037
  if (s?.annotationId === f.id) {
11034
11038
  const y = t.arrows.find((k) => k.id === f.id);
11035
- return y === void 0 ? f.geometry : yd(ha(y, s), u.panel) ?? f.geometry;
11039
+ return y === void 0 ? f.geometry : yd(ga(y, s), u.panel) ?? f.geometry;
11036
11040
  }
11037
11041
  return c?.annotationId === f.id ? tc(t, f.id, c, u) ?? f.geometry : f.geometry;
11038
11042
  }, m = (f) => {
@@ -11043,25 +11047,25 @@ var Ub = {
11043
11047
  y: e.y + y.y
11044
11048
  };
11045
11049
  };
11046
- return /* @__PURE__ */ v(K, { children: [p !== null && /* @__PURE__ */ a(Po, {
11050
+ return /* @__PURE__ */ v(K, { children: [p !== null && /* @__PURE__ */ a(Lo, {
11047
11051
  annotationId: p.id,
11048
11052
  geometry: g(p),
11049
11053
  state: "hovered",
11050
11054
  origin: m(p.id)
11051
- }), h !== null && /* @__PURE__ */ a(Po, {
11055
+ }), h !== null && /* @__PURE__ */ a(Lo, {
11052
11056
  annotationId: h.id,
11053
11057
  geometry: g(h),
11054
11058
  state: "selected",
11055
11059
  origin: m(h.id)
11056
11060
  })] });
11057
- }, Ao = (e, t, n) => {
11061
+ }, Po = (e, t, n) => {
11058
11062
  if (t === null) return null;
11059
11063
  const r = Gc(e, t, n);
11060
11064
  return r === null ? null : {
11061
11065
  id: t,
11062
11066
  geometry: r
11063
11067
  };
11064
- }, Po = ({ annotationId: e, geometry: t, state: n, origin: r }) => {
11068
+ }, Lo = ({ annotationId: e, geometry: t, state: n, origin: r }) => {
11065
11069
  const o = ee().editOutline.selected().resolve().stroke, i = De({ [Wb]: o });
11066
11070
  return t.shape === "segment" ? /* @__PURE__ */ v("div", {
11067
11071
  "aria-hidden": "true",
@@ -11069,11 +11073,11 @@ var Ub = {
11069
11073
  "data-annotation-id": e,
11070
11074
  "data-state": n,
11071
11075
  style: i,
11072
- children: [/* @__PURE__ */ a(Lo, {
11076
+ children: [/* @__PURE__ */ a(Io, {
11073
11077
  point: t.start,
11074
11078
  state: n,
11075
11079
  origin: r
11076
- }), /* @__PURE__ */ a(Lo, {
11080
+ }), /* @__PURE__ */ a(Io, {
11077
11081
  point: t.end,
11078
11082
  state: n,
11079
11083
  origin: r
@@ -11092,7 +11096,7 @@ var Ub = {
11092
11096
  height: t.rect.height + 4
11093
11097
  }
11094
11098
  });
11095
- }, Lo = ({ point: e, state: t, origin: n }) => /* @__PURE__ */ a("span", {
11099
+ }, Io = ({ point: e, state: t, origin: n }) => /* @__PURE__ */ a("span", {
11096
11100
  className: Kb[t],
11097
11101
  style: {
11098
11102
  left: n.x + e.x,
@@ -11104,7 +11108,7 @@ var Ub = {
11104
11108
  const r = Us(t.translation, e);
11105
11109
  return /* @__PURE__ */ a("svg", {
11106
11110
  "aria-hidden": "true",
11107
- className: ua,
11111
+ className: pa,
11108
11112
  width: e.width,
11109
11113
  height: e.height,
11110
11114
  style: {
@@ -11150,18 +11154,18 @@ var Ub = {
11150
11154
  }
11151
11155
  return null;
11152
11156
  }, Jb = ({ arrow: e, panelSize: t }) => {
11153
- const n = Wr(ee(), e.id), r = Hi({
11157
+ const n = Ur(ee(), e.id), r = Gi({
11154
11158
  arrow: e,
11155
11159
  style: n,
11156
11160
  panelWidth: t.width,
11157
11161
  panelHeight: t.height
11158
11162
  });
11159
- return r === null ? null : /* @__PURE__ */ a(li, {
11163
+ return r === null ? null : /* @__PURE__ */ a(si, {
11160
11164
  computed: r,
11161
11165
  style: n,
11162
11166
  addressable: !1
11163
11167
  });
11164
- }, Qb = ({ shape: e, panelSize: t }) => /* @__PURE__ */ a(mi, {
11168
+ }, Qb = ({ shape: e, panelSize: t }) => /* @__PURE__ */ a(vi, {
11165
11169
  shape: e,
11166
11170
  style: ee().annotation.shape(e.id).resolve(),
11167
11171
  panel: t
@@ -11169,15 +11173,15 @@ var Ub = {
11169
11173
  image: e,
11170
11174
  panel: t,
11171
11175
  style: ee().annotation.image(e.id).resolve()
11172
- }), t5 = "s8eewu0", Io = "s8eewu1", n5 = ({ frameElement: e, panelRect: t }) => {
11176
+ }), t5 = "s8eewu0", Mo = "s8eewu1", n5 = ({ frameElement: e, panelRect: t }) => {
11173
11177
  const n = Y((d) => J(d, "arrow-draw")), r = Y((d) => J(d, "box-draw")), o = n?.start ?? r?.start ?? null, [i, l] = Z(null);
11174
11178
  if (B(() => {
11175
11179
  if (n === null && r === null) return;
11176
11180
  const d = (p, g) => {
11177
11181
  const m = e.getBoundingClientRect();
11178
11182
  l({
11179
- x: Mo(p - m.left, 0, m.width),
11180
- y: Mo(g - m.top, 0, m.height)
11183
+ x: Eo(p - m.left, 0, m.width),
11184
+ y: Eo(g - m.top, 0, m.height)
11181
11185
  });
11182
11186
  }, u = n?.pointer ?? r?.pointer;
11183
11187
  u !== void 0 && d(u.x, u.y);
@@ -11196,13 +11200,13 @@ var Ub = {
11196
11200
  return /* @__PURE__ */ a("svg", {
11197
11201
  className: t5,
11198
11202
  children: r === null ? /* @__PURE__ */ a("line", {
11199
- className: Io,
11203
+ className: Mo,
11200
11204
  x1: s,
11201
11205
  y1: c,
11202
11206
  x2: i.x,
11203
11207
  y2: i.y
11204
11208
  }) : /* @__PURE__ */ a("rect", {
11205
- className: Io,
11209
+ className: Mo,
11206
11210
  fill: "none",
11207
11211
  x: Math.min(s, i.x),
11208
11212
  y: Math.min(c, i.y),
@@ -11210,13 +11214,13 @@ var Ub = {
11210
11214
  height: Math.abs(i.y - c)
11211
11215
  })
11212
11216
  });
11213
- }, Mo = (e, t, n) => Math.min(Math.max(e, t), n), r5 = ({ panelRect: e }) => {
11217
+ }, Eo = (e, t, n) => Math.min(Math.max(e, t), n), r5 = ({ panelRect: e }) => {
11214
11218
  const t = Y((i) => J(i, "shape-resize-drag")), n = rt(e).shapes, r = ee();
11215
11219
  if (t === null) return null;
11216
11220
  const o = n.find((i) => i.id === t.annotationId);
11217
11221
  return o === void 0 ? null : /* @__PURE__ */ a("svg", {
11218
11222
  "aria-hidden": "true",
11219
- className: ua,
11223
+ className: pa,
11220
11224
  width: e.width,
11221
11225
  height: e.height,
11222
11226
  style: {
@@ -11225,10 +11229,10 @@ var Ub = {
11225
11229
  },
11226
11230
  "data-testid": "shape-resize-preview",
11227
11231
  "data-annotation-id": t.annotationId,
11228
- children: /* @__PURE__ */ a(mi, {
11232
+ children: /* @__PURE__ */ a(vi, {
11229
11233
  shape: {
11230
11234
  ...o,
11231
- region: pa(t.region)
11235
+ region: ma(t.region)
11232
11236
  },
11233
11237
  style: r.annotation.shape(o.id).resolve(),
11234
11238
  panel: e
@@ -11261,7 +11265,7 @@ var Ub = {
11261
11265
  className: o5[r]
11262
11266
  })
11263
11267
  });
11264
- }, Ar = [
11268
+ }, Pr = [
11265
11269
  {
11266
11270
  width: 0,
11267
11271
  key: "graph.annotations.shapeToolbar.border.none"
@@ -11278,7 +11282,7 @@ var Ub = {
11278
11282
  width: 16,
11279
11283
  key: "graph.annotations.shapeToolbar.border.thick"
11280
11284
  }
11281
- ], l5 = (e) => [...Ar].reverse().find((t) => t.width <= e) ?? Ar[0], s5 = ({ shape: e, shapeBox: t, panelRect: n, frameWidth: r, frameHeight: o, frameElement: i }) => {
11285
+ ], l5 = (e) => [...Pr].reverse().find((t) => t.width <= e) ?? Pr[0], s5 = ({ shape: e, shapeBox: t, panelRect: n, frameWidth: r, frameHeight: o, frameElement: i }) => {
11282
11286
  const l = R(), { commands: s } = W(), c = F((w) => w.spec.styles.overrides), d = F((w) => xe(w.spec)), u = Rn(), h = ee().annotation.shape(e.id).resolve(), p = l5(h.strokeWidth), g = _(() => ({
11283
11287
  target: "annotation",
11284
11288
  kind: "shape",
@@ -11327,7 +11331,7 @@ var Ub = {
11327
11331
  title: ""
11328
11332
  }),
11329
11333
  ...u.bind("border"),
11330
- children: Ar.map((w) => /* @__PURE__ */ a(V.MenuItem, {
11334
+ children: Pr.map((w) => /* @__PURE__ */ a(V.MenuItem, {
11331
11335
  selected: w.width === p?.width,
11332
11336
  onClick: C(w.width),
11333
11337
  children: l(w.key)
@@ -11375,7 +11379,7 @@ var Ub = {
11375
11379
  super(...e), this.kind = "shape-resize-drag";
11376
11380
  }
11377
11381
  readOwn(e) {
11378
- return Nr(J(e, "shape-resize-drag"), this.params.annotationId);
11382
+ return Dr(J(e, "shape-resize-drag"), this.params.annotationId);
11379
11383
  }
11380
11384
  resolvePreview(e) {
11381
11385
  const { annotationId: t, corner: n, press: r, readInputs: o } = this.params, { annotations: i, panelRect: l, frameElement: s } = o(), c = vn(i, t);
@@ -11415,13 +11419,13 @@ var Ub = {
11415
11419
  }));
11416
11420
  }, u5 = [" ", "Enter"], ac = (e) => {
11417
11421
  const t = ae(), n = ue(e);
11418
- return B(() => () => Eo(t, n.current), [t, n]), ce((r) => ({ onKeyDown: (o) => {
11422
+ return B(() => () => Oo(t, n.current), [t, n]), ce((r) => ({ onKeyDown: (o) => {
11419
11423
  if (o.altKey || o.ctrlKey || o.metaKey || o.shiftKey) return;
11420
11424
  const i = t.getState(), l = n.current.readHeld();
11421
11425
  if (u5.includes(o.key)) {
11422
11426
  if (o.preventDefault(), o.repeat) return;
11423
11427
  if (l !== null) {
11424
- Eo(t, n.current);
11428
+ Oo(t, n.current);
11425
11429
  return;
11426
11430
  }
11427
11431
  const c = n.current.claim(r);
@@ -11433,13 +11437,13 @@ var Ub = {
11433
11437
  const s = n.current.step(l, r, o.key);
11434
11438
  s !== null && (o.preventDefault(), i.claimInteraction(s));
11435
11439
  } }), [t, n]);
11436
- }, Eo = (e, t) => {
11440
+ }, Oo = (e, t) => {
11437
11441
  const n = t.readHeld();
11438
11442
  n !== null && (e.getState().releaseInteraction(n.kind), t.commit(n));
11439
- }, Oo = 4, h5 = ({ annotationId: e, panelRect: t, frameElement: n }) => {
11443
+ }, Ro = 4, h5 = ({ annotationId: e, panelRect: t, frameElement: n }) => {
11440
11444
  const { commands: r } = W(), o = ae(), i = F((l) => l.spec.annotations);
11441
11445
  return ac({
11442
- readHeld: () => Nr(J(o.getState(), "shape-resize-drag"), e),
11446
+ readHeld: () => Dr(J(o.getState(), "shape-resize-drag"), e),
11443
11447
  claim: () => {
11444
11448
  const l = vn(i, e);
11445
11449
  return l === null ? null : {
@@ -11472,7 +11476,7 @@ var Ub = {
11472
11476
  }
11473
11477
  });
11474
11478
  }, p5 = (e, t) => {
11475
- const n = Ae(Oo, t.width), r = Ae(Oo, t.height);
11479
+ const n = Ae(Ro, t.width), r = Ae(Ro, t.height);
11476
11480
  switch (e) {
11477
11481
  case "ArrowLeft":
11478
11482
  return {
@@ -11522,7 +11526,7 @@ var Ub = {
11522
11526
  annotationId: e.id,
11523
11527
  panelRect: o,
11524
11528
  frameElement: l
11525
- }), u = ee().annotation.shape(e.id).resolve(), { rect: h } = ai(pa(t), u.strokeWidth, o);
11529
+ }), u = ee().annotation.shape(e.id).resolve(), { rect: h } = oi(ma(t), u.strokeWidth, o);
11526
11530
  return /* @__PURE__ */ v("div", {
11527
11531
  "data-testid": "shape-selection",
11528
11532
  "data-annotation-id": e.id,
@@ -11559,7 +11563,7 @@ var Ub = {
11559
11563
  resizedRegion: null,
11560
11564
  moving: !1
11561
11565
  } : {
11562
- resizedRegion: Nr(J(t, "shape-resize-drag"), e)?.region ?? null,
11566
+ resizedRegion: Dr(J(t, "shape-resize-drag"), e)?.region ?? null,
11563
11567
  moving: yn(J(t, "move-drag"), e) !== null
11564
11568
  })), y5 = ({ textColor: e, ...t }) => /* @__PURE__ */ v(M, {
11565
11569
  ...t,
@@ -11748,7 +11752,7 @@ var ic = [
11748
11752
  })
11749
11753
  ]
11750
11754
  });
11751
- }, T5 = (e) => e === "transparent" ? { fill: hl } : {
11755
+ }, T5 = (e) => e === "transparent" ? { fill: pl } : {
11752
11756
  fill: e,
11753
11757
  fillAlpha: tv(e) ? Zd : 1
11754
11758
  }, A5 = ({ current: e, onPick: t }) => {
@@ -11772,7 +11776,7 @@ var lc = ({ width: e }) => Ae(60, e), L5 = (e, t) => ({
11772
11776
  width: t,
11773
11777
  shift: 0
11774
11778
  };
11775
- const c = Qd(n).x, d = I5(e.offset, l), u = Tr({
11779
+ const c = Qd(n).x, d = I5(e.offset, l), u = Ar({
11776
11780
  start: e.x + d - c * t,
11777
11781
  extent: t,
11778
11782
  moveStartEdge: r === "left",
@@ -11803,7 +11807,7 @@ var lc = ({ width: e }) => Ae(60, e), L5 = (e, t) => ({
11803
11807
  super(...e), this.kind = "text-resize-drag";
11804
11808
  }
11805
11809
  readOwn(e) {
11806
- return Er(J(e, "text-resize-drag"), this.params.annotationId);
11810
+ return Or(J(e, "text-resize-drag"), this.params.annotationId);
11807
11811
  }
11808
11812
  resolvePreview(e) {
11809
11813
  const { annotationId: t, edge: n, press: r, readInputs: o } = this.params, { annotations: i, panelRect: l, frameElement: s } = o(), c = fn(i, t);
@@ -11866,7 +11870,7 @@ var lc = ({ width: e }) => Ae(60, e), L5 = (e, t) => ({
11866
11870
  };
11867
11871
  };
11868
11872
  return ac({
11869
- readHeld: () => Er(J(o.getState(), "text-resize-drag"), e),
11873
+ readHeld: () => Or(J(o.getState(), "text-resize-drag"), e),
11870
11874
  claim: (s) => l(s, 0),
11871
11875
  step: (s, c, d) => {
11872
11876
  const u = N5(d, t);
@@ -11951,10 +11955,10 @@ var lc = ({ width: e }) => Ae(60, e), L5 = (e, t) => ({
11951
11955
  resized: null,
11952
11956
  moving: !1
11953
11957
  } : {
11954
- resized: Er(J(t, "text-resize-drag"), e),
11958
+ resized: Or(J(t, "text-resize-drag"), e),
11955
11959
  moving: yn(J(t, "move-drag"), e) !== null
11956
11960
  })), B5 = (e, t, n) => {
11957
- const r = rt(e), o = vi(), i = ee(), l = _(() => ({
11961
+ const r = rt(e), o = fi(), i = ee(), l = _(() => ({
11958
11962
  panel: {
11959
11963
  width: e.width,
11960
11964
  height: e.height
@@ -11968,8 +11972,8 @@ var lc = ({ width: e }) => Ae(60, e), L5 = (e, t) => ({
11968
11972
  i
11969
11973
  ]);
11970
11974
  return t === null ? null : tc(r, t, n, l)?.rect ?? null;
11971
- }, ga = (e, t) => typeof document.elementsFromPoint == "function" ? document.elementsFromPoint(e, t) : [], H5 = (e, t, n) => Cn(ga(e, t), n), G5 = "_1rpuha50";
11972
- var Ro = [
11975
+ }, va = (e, t) => typeof document.elementsFromPoint == "function" ? document.elementsFromPoint(e, t) : [], H5 = (e, t, n) => Cn(va(e, t), n), G5 = "_1rpuha50";
11976
+ var No = [
11973
11977
  "pointerdown",
11974
11978
  "mousedown",
11975
11979
  "pointerup",
@@ -11989,9 +11993,9 @@ var Ro = [
11989
11993
  const u = V5(d.clientX, d.clientY);
11990
11994
  u !== null && (d.stopPropagation(), u.dispatchEvent(W5(d)));
11991
11995
  };
11992
- for (const d of Ro) s.addEventListener(d, c);
11996
+ for (const d of No) s.addEventListener(d, c);
11993
11997
  return () => {
11994
- for (const d of Ro) s.removeEventListener(d, c);
11998
+ for (const d of No) s.removeEventListener(d, c);
11995
11999
  };
11996
12000
  }, [i]), i ? /* @__PURE__ */ a("div", {
11997
12001
  ref: l,
@@ -11999,7 +12003,7 @@ var Ro = [
11999
12003
  "data-menu-shield": "",
12000
12004
  "data-testid": "menu-shield"
12001
12005
  }) : null;
12002
- }, V5 = (e, t) => ga(e, t).find((n) => !dc(n)) ?? null, W5 = (e) => new MouseEvent(e.type, {
12006
+ }, V5 = (e, t) => va(e, t).find((n) => !dc(n)) ?? null, W5 = (e) => new MouseEvent(e.type, {
12003
12007
  bubbles: !0,
12004
12008
  cancelable: !0,
12005
12009
  clientX: e.clientX,
@@ -12011,7 +12015,7 @@ var Ro = [
12011
12015
  B(() => {
12012
12016
  if (t === null) return;
12013
12017
  const o = (i) => {
12014
- if (i.key !== "Tab" || i.defaultPrevented || !ut(i.target, e, n) || ln(i.target) || r.getState().standingInteraction?.kind === "chrome-popup") return;
12018
+ if (i.key !== "Tab" || i.defaultPrevented || !ht(i.target, e, n) || ln(i.target) || r.getState().standingInteraction?.kind === "chrome-popup") return;
12015
12019
  const l = [...t.querySelectorAll(K5)];
12016
12020
  if (l.length === 0) return;
12017
12021
  i.preventDefault();
@@ -12030,15 +12034,15 @@ var Ro = [
12030
12034
  B(() => {
12031
12035
  let o = null;
12032
12036
  const i = (c) => {
12033
- if (vt(c.target)) return;
12037
+ if (ft(c.target)) return;
12034
12038
  const { caret: d } = r.getState(), u = d === null ? null : H5(c.clientX, c.clientY, e);
12035
12039
  u?.kind === "annotation" && u.target.id === d?.annotationId || e.focus({ preventScroll: !0 });
12036
12040
  }, l = (c) => {
12037
12041
  const { selection: d, clearSelection: u } = t.getState();
12038
- d.length !== 0 && (ut(c.target, e, n) || u());
12042
+ d.length !== 0 && (ht(c.target, e, n) || u());
12039
12043
  }, s = (c) => {
12040
- t.getState().selection.length !== 0 && ut(c.target, e, n) && c.relatedTarget === null && (o !== null && cancelAnimationFrame(o), o = requestAnimationFrame(() => {
12041
- o = null, document.hasFocus() && (ut(document.activeElement, e, n) || t.getState().clearSelection());
12044
+ t.getState().selection.length !== 0 && ht(c.target, e, n) && c.relatedTarget === null && (o !== null && cancelAnimationFrame(o), o = requestAnimationFrame(() => {
12045
+ o = null, document.hasFocus() && (ht(document.activeElement, e, n) || t.getState().clearSelection());
12042
12046
  }));
12043
12047
  };
12044
12048
  return e.addEventListener("pointerdown", i), document.addEventListener("focusin", l), document.addEventListener("focusout", s), () => {
@@ -12056,7 +12060,7 @@ var Ro = [
12056
12060
  const n = t.legends[e.part.legendIndex], r = n?.items[e.part.itemIndex];
12057
12061
  if (n === void 0 || r === void 0) return null;
12058
12062
  const o = Y5(n, r.layerId, t.layers);
12059
- return o === null ? null : Bi({
12063
+ return o === null ? null : Hi({
12060
12064
  layer: o.layer,
12061
12065
  scope: "group",
12062
12066
  variable: o.variable,
@@ -12098,7 +12102,7 @@ var Ro = [
12098
12102
  if (!o.interactive) continue;
12099
12103
  const i = ju(o.mapping);
12100
12104
  if (i === null) continue;
12101
- const l = Bi({
12105
+ const l = Hi({
12102
12106
  layer: o,
12103
12107
  scope: "xValue",
12104
12108
  variable: i,
@@ -12116,7 +12120,7 @@ var Ro = [
12116
12120
  if (o === null) return null;
12117
12121
  const l = q(t, o.layerId);
12118
12122
  if (l === void 0) return null;
12119
- const s = bt(o), c = i?.intersects !== !1, d = Eu(l), u = c || !ku(n) ? [d] : ["xValue", d];
12123
+ const s = yt(o), c = i?.intersects !== !1, d = Eu(l), u = c || !ku(n) ? [d] : ["xValue", d];
12120
12124
  for (const h of u) {
12121
12125
  const p = $e({
12122
12126
  layer: l,
@@ -12141,12 +12145,12 @@ var Ro = [
12141
12145
  scope: "observation",
12142
12146
  parsingLocale: n
12143
12147
  });
12144
- }, Pr = (e, t) => {
12148
+ }, Lr = (e, t) => {
12145
12149
  const { target: n } = e, { frameElement: r, captureRect: o, resolvesObservations: i, scene: l } = t;
12146
12150
  if (!(n instanceof Element && r.contains(n))) {
12147
- const m = No(!1, !1, e, t);
12151
+ const m = Do(!1, !1, e, t);
12148
12152
  return {
12149
- targetAtPoint: ya({
12153
+ targetAtPoint: Ca({
12150
12154
  stamped: m.stamped,
12151
12155
  observations: null
12152
12156
  }),
@@ -12159,7 +12163,7 @@ var Ro = [
12159
12163
  layers: l.layers,
12160
12164
  scales: l.scales,
12161
12165
  parsingLocale: l.config.parsingLocale
12162
- }), h = u !== null && t.hasOverlayMenu(u.target) ? u : null, p = No(s, h !== null, e, t), g = ya({
12166
+ }), h = u !== null && t.hasOverlayMenu(u.target) ? u : null, p = Do(s, h !== null, e, t), g = Ca({
12163
12167
  stamped: p.stamped,
12164
12168
  observations: h
12165
12169
  });
@@ -12171,12 +12175,12 @@ var Ro = [
12171
12175
  }, ny = (e) => {
12172
12176
  const t = e.getBoundingClientRect();
12173
12177
  return t.width > 0 && t.height > 0 ? t : null;
12174
- }, No = (e, t, n, { showAnnotations: r, selectGuidesOnPress: o, frameElement: i, scene: l, hasOverlayMenu: s }) => {
12178
+ }, Do = (e, t, n, { showAnnotations: r, selectGuidesOnPress: o, frameElement: i, scene: l, hasOverlayMenu: s }) => {
12175
12179
  if (!r && l.coordSystem.type === "cartesian" && e && t) return {
12176
12180
  stamped: null,
12177
12181
  elements: []
12178
12182
  };
12179
- const c = e || r ? ga(n.clientX, n.clientY) : n.target instanceof Element ? [n.target] : [], d = Cn(c, i);
12183
+ const c = e || r ? va(n.clientX, n.clientY) : n.target instanceof Element ? [n.target] : [], d = Cn(c, i);
12180
12184
  return d === null ? {
12181
12185
  stamped: null,
12182
12186
  elements: c
@@ -12225,7 +12229,7 @@ var Ro = [
12225
12229
  x: e.x - t.left,
12226
12230
  y: e.y - t.top
12227
12231
  }, { primary: s, intersection: c } = n.query(Nt(l, t), {
12228
- tolerance: ti,
12232
+ tolerance: ni,
12229
12233
  viewport: {
12230
12234
  width: t.width,
12231
12235
  height: t.height
@@ -12234,7 +12238,7 @@ var Ro = [
12234
12238
  if (s === null || c?.intersects !== !0) return null;
12235
12239
  const d = r.find((p) => p.id === s.layerId);
12236
12240
  if (d === void 0 || _t(d, s.observation) || !iy(d.spatialKind)) return null;
12237
- const u = bt(s), h = $e({
12241
+ const u = yt(s), h = $e({
12238
12242
  layer: d,
12239
12243
  observationIndex: u,
12240
12244
  scope: "observation",
@@ -12260,22 +12264,22 @@ var Ro = [
12260
12264
  default:
12261
12265
  return e;
12262
12266
  }
12263
- }, Do = "data-annotation-id", ly = '[data-testid="pinnedNumber"], [data-testid="comment"], [data-testid="stickers"]', _o = (e, t, n) => {
12267
+ }, _o = "data-annotation-id", ly = '[data-testid="pinnedNumber"], [data-testid="comment"], [data-testid="stickers"]', Fo = (e, t, n) => {
12264
12268
  if (e.target instanceof Element) {
12265
- const r = Fo(e.target, t);
12269
+ const r = zo(e.target, t);
12266
12270
  if (r !== null) return r;
12267
12271
  }
12268
12272
  for (const r of n) {
12269
12273
  if (r === e.target) continue;
12270
- const o = Fo(r, t);
12274
+ const o = zo(r, t);
12271
12275
  if (o !== null) return o;
12272
12276
  }
12273
12277
  return null;
12274
12278
  }, sy = (e, t) => {
12275
12279
  const n = e.annotations.pinnedNumbers.find((i) => i.id === t) ?? e.annotations.comments.find((i) => i.id === t);
12276
- if (n !== void 0) return zo(e, n.at.anchor.layerId, n.at.observationIndex);
12280
+ if (n !== void 0) return Bo(e, n.at.anchor.layerId, n.at.observationIndex);
12277
12281
  const r = e.annotations.stickers.find((i) => i.id === t), o = e.spec.annotations.stickers.find((i) => i.id === t);
12278
- return r?.at.observationIndex === void 0 || o?.at.anchorType !== "observation" ? null : zo(e, dy(r.at) ?? o.at.layerId, r.at.observationIndex);
12282
+ return r?.at.observationIndex === void 0 || o?.at.anchorType !== "observation" ? null : Bo(e, dy(r.at) ?? o.at.layerId, r.at.observationIndex);
12279
12283
  }, cy = (e, t) => {
12280
12284
  const n = e.spec.annotations.stickers.find((r) => r.id === t);
12281
12285
  return n?.at.anchorType !== "panel" ? null : {
@@ -12283,20 +12287,20 @@ var Ro = [
12283
12287
  y: n.at.y,
12284
12288
  stickerId: n.id
12285
12289
  };
12286
- }, Fo = (e, t) => {
12290
+ }, zo = (e, t) => {
12287
12291
  if (!t.contains(e)) return null;
12288
12292
  const n = e.closest(ly);
12289
12293
  if (n === null || !t.contains(n)) return null;
12290
- const r = e.closest(`[${Do}]`);
12294
+ const r = e.closest(`[${_o}]`);
12291
12295
  if (r === null || !n.contains(r)) return null;
12292
- const o = r.getAttribute(Do);
12296
+ const o = r.getAttribute(_o);
12293
12297
  return o === null || o.length === 0 ? null : o;
12294
12298
  }, dy = (e) => {
12295
12299
  if (!("anchor" in e)) return;
12296
12300
  const t = e.anchor;
12297
12301
  if (!(typeof t != "object" || t === null || !("layerId" in t)))
12298
12302
  return typeof t.layerId == "string" ? t.layerId : void 0;
12299
- }, zo = (e, t, n) => {
12303
+ }, Bo = (e, t, n) => {
12300
12304
  const r = t === void 0 ? void 0 : e.layers.find((o) => o.id === t);
12301
12305
  return r === void 0 ? null : $e({
12302
12306
  layer: r,
@@ -12315,12 +12319,12 @@ var Ro = [
12315
12319
  cross: 0
12316
12320
  }
12317
12321
  }, hy = ({ client: e, capture: t, frame: n, engine: r, layers: o }) => {
12318
- if (t === null || t.width === 0 || t.height === 0 || n === null || !Ho(n, e)) return null;
12322
+ if (t === null || t.width === 0 || t.height === 0 || n === null || !Go(n, e)) return null;
12319
12323
  const i = {
12320
12324
  x: e.x - t.left,
12321
12325
  y: e.y - t.top
12322
12326
  };
12323
- if (Ho(t, e)) {
12327
+ if (Go(t, e)) {
12324
12328
  const { primary: s, intersection: c } = r.query(Nt(i, t), {
12325
12329
  tolerance: uy,
12326
12330
  viewport: {
@@ -12337,10 +12341,10 @@ var Ro = [
12337
12341
  height: t.height
12338
12342
  }, n);
12339
12343
  return {
12340
- x: Bo(i.x / t.width, l.minX, l.maxX),
12341
- y: Bo(i.y / t.height, l.minY, l.maxY)
12344
+ x: Ho(i.x / t.width, l.minX, l.maxX),
12345
+ y: Ho(i.y / t.height, l.minY, l.maxY)
12342
12346
  };
12343
- }, Bo = (e, t, n) => Math.min(Math.max(e, t), n), Ho = (e, t) => t.x >= e.left && t.x <= e.right && t.y >= e.top && t.y <= e.bottom, py = (e, { canSelectGraph: t, withinFrame: n, caretAnnotationId: r }) => {
12347
+ }, Ho = (e, t, n) => Math.min(Math.max(e, t), n), Go = (e, t) => t.x >= e.left && t.x <= e.right && t.y >= e.top && t.y <= e.bottom, py = (e, { canSelectGraph: t, withinFrame: n, caretAnnotationId: r }) => {
12344
12348
  switch (e?.kind) {
12345
12349
  case "annotation":
12346
12350
  return e.target.id === r ? { kind: "keep-caret" } : {
@@ -12377,16 +12381,16 @@ var Ro = [
12377
12381
  frameElement: e
12378
12382
  }), y = ue(r), k = X(null);
12379
12383
  B(() => () => k.current?.finish(!1), []), B(() => l.subscribe(({ selection: C }) => {
12380
- const w = c.getState().pressedObservation, [P, ...T] = C, I = P !== void 0 && T.length === 0 && w !== null && Gr(P, w.selectedFor);
12384
+ const w = c.getState().pressedObservation, [P, ...T] = C, I = P !== void 0 && T.length === 0 && w !== null && $r(P, w.selectedFor);
12381
12385
  w !== null && !I && c.getState().setPressedObservation(null);
12382
12386
  }), [c, l]), B(() => {
12383
- const C = (x) => Pr({
12387
+ const C = (x) => Lr({
12384
12388
  target: x.target,
12385
12389
  clientX: x.clientX,
12386
12390
  clientY: x.clientY
12387
12391
  }, n()).targetAtPoint, w = (x) => {
12388
12392
  if (!(x.target instanceof Element)) return !1;
12389
- const O = x.target.closest(ui);
12393
+ const O = x.target.closest(hi);
12390
12394
  return O !== null && e.contains(O) && Cn([x.target], e) === null;
12391
12395
  }, P = (x, O) => {
12392
12396
  if (k.current !== null || !md(f.current.annotations, O.id)) return;
@@ -12417,7 +12421,7 @@ var Ro = [
12417
12421
  if (c.getState().setPressedObservation(z), g.current && (O.kind === "select-observations" || O.kind === "select-band")) {
12418
12422
  const U = q(S, O.target.layerId);
12419
12423
  if (U !== void 0 && m0(U.geom, E.type)) {
12420
- const j = e.getBoundingClientRect(), se = aa(e, j.width);
12424
+ const j = e.getBoundingClientRect(), se = ia(e, j.width);
12421
12425
  c.getState().setAnnotatePress({
12422
12426
  key: Rt(O.target),
12423
12427
  x: (x.clientX - j.left) / se,
@@ -12449,7 +12453,7 @@ var Ro = [
12449
12453
  }
12450
12454
  if (dr(x.target)) return;
12451
12455
  const O = c.getState().caret?.annotationId ?? null, A = x.target instanceof Element ? x.target.closest("[data-edit-id]")?.getAttribute("data-edit-id") ?? null : null;
12452
- !vt(x.target) && A !== O && sa(c, s.getState().scene.annotations, o.dispatch, la(i));
12456
+ !ft(x.target) && A !== O && da(c, s.getState().scene.annotations, o.dispatch, ca(i));
12453
12457
  const S = c.getState().standingInteraction, b = (G) => {
12454
12458
  c.getState().releaseInteraction(G), c.getState().setPlotMenu(null), l.getState().clearSelection();
12455
12459
  }, E = Ge(f.current.panelRect, f.current.frameElement), z = (G) => {
@@ -12477,7 +12481,7 @@ var Ro = [
12477
12481
  o.dispatch(new we({
12478
12482
  kind: "arrow",
12479
12483
  annotation: {
12480
- ...fi,
12484
+ ...bi,
12481
12485
  ...hd(S.heads),
12482
12486
  start: {
12483
12487
  anchorType: "panel",
@@ -12503,20 +12507,20 @@ var Ro = [
12503
12507
  o.dispatch(new we({
12504
12508
  kind: "shape",
12505
12509
  annotation: {
12506
- ...Ci,
12510
+ ...wi,
12507
12511
  region: dd(S.start, re)
12508
12512
  }
12509
12513
  })), c.getState().releaseInteraction("box-draw"), c.getState().setPlotMenu(null);
12510
12514
  return;
12511
12515
  }
12512
12516
  if (c.getState().setPlotMenu(null), w(x) || Jn(x.target, e)) return;
12513
- const U = n(), j = Pr({
12517
+ const U = n(), j = Lr({
12514
12518
  target: x.target,
12515
12519
  clientX: x.clientX,
12516
12520
  clientY: x.clientY
12517
12521
  }, U);
12518
12522
  if (m.current) {
12519
- const G = _o(x, e, j.elements), ne = G === null ? null : sy(s.getState().scene, G);
12523
+ const G = Fo(x, e, j.elements), ne = G === null ? null : sy(s.getState().scene, G);
12520
12524
  if (ne?.observationIndex !== void 0) {
12521
12525
  c.getState().setCaret(null), T(x, {
12522
12526
  kind: "select-observations",
@@ -12532,7 +12536,7 @@ var Ro = [
12532
12536
  }
12533
12537
  }
12534
12538
  const se = x.target instanceof Node && e.contains(x.target), ge = py(j.targetAtPoint, {
12535
- canSelectGraph: p.current && !vt(x.target) && n().hasOverlayMenu({ kind: "graph" }),
12539
+ canSelectGraph: p.current && !ft(x.target) && n().hasOverlayMenu({ kind: "graph" }),
12536
12540
  withinFrame: se,
12537
12541
  caretAnnotationId: c.getState().caret?.annotationId ?? null
12538
12542
  });
@@ -12563,7 +12567,7 @@ var Ro = [
12563
12567
  }
12564
12568
  }
12565
12569
  const Ie = U.scene.coordSystem.type === "polar" && ge.kind === "select-observations";
12566
- if (se && (ge.kind === "clear" || Ie) && m.current && _o(x, e, j.elements) === null && !fy(x.target, j.elements)) {
12570
+ if (se && (ge.kind === "clear" || Ie) && m.current && Fo(x, e, j.elements) === null && !fy(x.target, j.elements)) {
12567
12571
  const G = hy({
12568
12572
  client: {
12569
12573
  x: x.clientX,
@@ -12635,8 +12639,8 @@ var Ro = [
12635
12639
  m,
12636
12640
  n
12637
12641
  ]);
12638
- }, fy = (e, t) => vt(e) || Go(e) || t.some(Go), Go = (e) => e instanceof Element && e.closest(my) !== null, by = (e) => {
12639
- const { store: t } = W(), { engine: n, overlayRef: r } = nt(), { showAnnotations: o, selectObservationsOnPress: i, selectGuidesOnPress: l, hoverTolerance: s } = Re[ye()], c = od(), d = yt(), u = i && !c;
12642
+ }, fy = (e, t) => ft(e) || $o(e) || t.some($o), $o = (e) => e instanceof Element && e.closest(my) !== null, by = (e) => {
12643
+ const { store: t } = W(), { engine: n, overlayRef: r } = nt(), { showAnnotations: o, selectObservationsOnPress: i, selectGuidesOnPress: l, hoverTolerance: s } = Re[ye()], c = od(), d = St(), u = i && !c;
12640
12644
  return ce(() => ({
12641
12645
  frameElement: e,
12642
12646
  captureRect: r.current,
@@ -12713,7 +12717,7 @@ var Ro = [
12713
12717
  C.setEditTargetUnderPointer(null);
12714
12718
  return;
12715
12719
  }
12716
- const { targetAtPoint: w, hover: P } = Pr(s, t());
12720
+ const { targetAtPoint: w, hover: P } = Lr(s, t());
12717
12721
  C.setEditTargetUnderPointer(w), d(P);
12718
12722
  }, h = () => {
12719
12723
  l === null && (l = requestAnimationFrame(u));
@@ -12777,7 +12781,7 @@ var Ro = [
12777
12781
  });
12778
12782
  B(() => {
12779
12783
  h.current = () => {
12780
- sa(u, c.getState().scene.annotations, s.dispatch, la(d));
12784
+ da(u, c.getState().scene.annotations, s.dispatch, ca(d));
12781
12785
  };
12782
12786
  }, [
12783
12787
  s,
@@ -12912,7 +12916,7 @@ var Ro = [
12912
12916
  })
12913
12917
  ] });
12914
12918
  }, My = {}, qS = ({ slots: e, mode: t, palettePresets: n = My, editMenus: r, ...o }) => {
12915
- const i = hi(Sn()), l = _(() => ({
12919
+ const i = pi(Sn()), l = _(() => ({
12916
12920
  EditorSurface: Ay,
12917
12921
  ...e
12918
12922
  }), [e]);
@@ -12957,7 +12961,7 @@ var By = () => () => {
12957
12961
  const t = eh(e?.subscribe ?? By, () => e?.getScene()?.config.parsingLocale);
12958
12962
  return e?.formattingLocale ?? t;
12959
12963
  }, Gy = (e) => {
12960
- const t = Ce(jc), n = hi(Hy(Et(e.handle))), r = $c();
12964
+ const t = Ce(jc), n = pi(Hy(Et(e.handle))), r = $c();
12961
12965
  let o = /* @__PURE__ */ a($y, { ...e });
12962
12966
  return !r && t && (o = /* @__PURE__ */ a(bd, {
12963
12967
  colorScheme: t.colorScheme,
@@ -13000,7 +13004,7 @@ var By = () => () => {
13000
13004
  strokeLinejoin: "round",
13001
13005
  children: /* @__PURE__ */ a("path", { d: "m9 6 6 6-6 6" })
13002
13006
  })
13003
- }), ma = "_40zvwv0", va = "_40zvwv1", Uy = "_40zvwv2", gc = "_40zvwv3", Ky = "_40zvwv4 _40zvwv3";
13007
+ }), fa = "_40zvwv0", ba = "_40zvwv1", Uy = "_40zvwv2", gc = "_40zvwv3", Ky = "_40zvwv4 _40zvwv3";
13004
13008
  var jy = "_40zvwv6";
13005
13009
  var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessory: r, onOpenChange: o, children: i }) => t === "collapsible" ? /* @__PURE__ */ a(Yy, {
13006
13010
  title: e,
@@ -13013,9 +13017,9 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13013
13017
  accessory: r,
13014
13018
  children: i
13015
13019
  }) : /* @__PURE__ */ v("div", {
13016
- className: ma,
13020
+ className: fa,
13017
13021
  children: [/* @__PURE__ */ v("div", {
13018
- className: va,
13022
+ className: ba,
13019
13023
  children: [
13020
13024
  /* @__PURE__ */ a("span", {
13021
13025
  className: gc,
@@ -13034,9 +13038,9 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13034
13038
  }), qy = ({ title: e, accessory: t, children: n }) => {
13035
13039
  const r = Be(), o = Be();
13036
13040
  return /* @__PURE__ */ a("div", {
13037
- className: ma,
13041
+ className: fa,
13038
13042
  children: /* @__PURE__ */ v("div", {
13039
- className: va,
13043
+ className: ba,
13040
13044
  children: [
13041
13045
  /* @__PURE__ */ a("label", {
13042
13046
  id: r,
@@ -13046,7 +13050,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13046
13050
  }),
13047
13051
  /* @__PURE__ */ a("span", {
13048
13052
  className: jy,
13049
- children: /* @__PURE__ */ a(ll, {
13053
+ children: /* @__PURE__ */ a(sl, {
13050
13054
  labelId: r,
13051
13055
  controlId: o,
13052
13056
  children: n
@@ -13063,10 +13067,10 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13063
13067
  const i = R();
13064
13068
  return /* @__PURE__ */ v(At.Item, {
13065
13069
  value: e,
13066
- className: ma,
13070
+ className: fa,
13067
13071
  onOpenChange: r,
13068
13072
  children: [/* @__PURE__ */ v(At.Header, {
13069
- className: va,
13073
+ className: ba,
13070
13074
  render: /* @__PURE__ */ a("div", {}),
13071
13075
  children: [
13072
13076
  /* @__PURE__ */ a(At.Trigger, {
@@ -13122,12 +13126,12 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13122
13126
  }, e3 = {
13123
13127
  x: "editor.axesPanel.mainAxisSection.xAxis",
13124
13128
  y: "editor.axesPanel.mainAxisSection.yAxis"
13125
- }, $o = ({ axis: e, title: t, layout: n = "collapsible", preview: r }) => {
13129
+ }, Vo = ({ axis: e, title: t, layout: n = "collapsible", preview: r }) => {
13126
13130
  const o = te(), i = Q(o), l = R(), { NumberField: s, Switch: c, TextField: d, ToggleGroup: u } = H();
13127
13131
  if (!i) return null;
13128
13132
  const h = i.coordSystem.type === "polar" ? i.coordSystem.axisMapping[e].geometry : "linear", p = i.config.axes[e], g = i.scales[e], m = g?.spec, f = m?.scaleType === "continuous" ? m : void 0;
13129
13133
  if (h === "circular" || h === "radial" && f === void 0) return null;
13130
- const y = m?.scaleType === "continuous" || m?.scaleType === "datetime", k = f !== void 0 && Ui(i, e), C = f?.transform === "log", w = f?.domainMax ?? null, P = t3(f), T = (D, Me) => D.map(($t) => ({
13134
+ const y = m?.scaleType === "continuous" || m?.scaleType === "datetime", k = f !== void 0 && Ki(i, e), C = f?.transform === "log", w = f?.domainMax ?? null, P = t3(f), T = (D, Me) => D.map(($t) => ({
13131
13135
  value: $t,
13132
13136
  label: Me($t)
13133
13137
  })), I = i.guides.axes.find((D) => D.scaledAesthetic === e), N = I?.position, x = i.guides.axes.filter((D) => D.scaledAesthetic === e || e === "y" && D.scaledAesthetic === "ySecondary"), O = x.some((D) => D.visible), A = x.some((D) => D.visible || D.showGrid), S = p.label ?? I?.label ?? "", b = Jy[N === "bottom" || N === "top" || N === void 0 && e === "x" ? "horizontal" : "vertical"], E = e === "y" ? Nu(i.spec) : null, z = E === null ? void 0 : q(i.spec.layers, E), U = i.guides.legends.drawn.some((D) => b.some((Me) => Me === D.position)), j = b.map((D) => ({
@@ -13143,7 +13147,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13143
13147
  visible: D
13144
13148
  }));
13145
13149
  }, re = (D) => {
13146
- o.commands.dispatch(new wi({
13150
+ o.commands.dispatch(new xi({
13147
13151
  axis: e,
13148
13152
  label: D
13149
13153
  }), { transient: !0 });
@@ -13153,32 +13157,32 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13153
13157
  visible: D
13154
13158
  }));
13155
13159
  }, zn = (D) => {
13156
- o.commands.dispatch(new ki({
13160
+ o.commands.dispatch(new Ti({
13157
13161
  axis: e,
13158
13162
  tickMode: D === "edges" ? "edges" : "auto"
13159
13163
  }));
13160
13164
  }, ot = (D) => {
13161
- o.commands.dispatch(new Ni({
13165
+ o.commands.dispatch(new Di({
13162
13166
  scaledAesthetic: e,
13163
13167
  transform: D === "log" ? "log" : "linear"
13164
13168
  }));
13165
- }, St = (D) => {
13169
+ }, Ct = (D) => {
13166
13170
  o.commands.dispatch(new Pt({
13167
13171
  scaledAesthetic: e,
13168
13172
  ...D
13169
13173
  }), { transient: !0 });
13170
13174
  }, $ = (D) => {
13171
- D !== null && St({ domainMin: D });
13175
+ D !== null && Ct({ domainMin: D });
13172
13176
  }, me = (D) => {
13173
- D !== null && St({ domainMax: D });
13177
+ D !== null && Ct({ domainMax: D });
13174
13178
  }, Ue = (D) => {
13175
- const Me = D === "auto" ? null : D === "zero" ? 0 : Vo(g?.domain, "start");
13179
+ const Me = D === "auto" ? null : D === "zero" ? 0 : Wo(g?.domain, "start");
13176
13180
  o.commands.dispatch(new Pt({
13177
13181
  scaledAesthetic: e,
13178
13182
  domainMin: Me
13179
13183
  }));
13180
13184
  }, Sc = (D) => {
13181
- const Me = D === "custom" ? Vo(g?.domain, "end") : null;
13185
+ const Me = D === "custom" ? Wo(g?.domain, "end") : null;
13182
13186
  o.commands.dispatch(new Pt({
13183
13187
  scaledAesthetic: e,
13184
13188
  domainMax: Me
@@ -13190,7 +13194,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13190
13194
  }));
13191
13195
  }, wc = (D) => {
13192
13196
  const Me = b.find(($t) => $t === D);
13193
- Me && o.commands.dispatch(new xi({
13197
+ Me && o.commands.dispatch(new ki({
13194
13198
  axis: e,
13195
13199
  position: Me
13196
13200
  }));
@@ -13292,10 +13296,10 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13292
13296
  }, t3 = (e) => {
13293
13297
  const t = e?.domainMin ?? null;
13294
13298
  return t === null ? "auto" : t === 0 ? "zero" : "custom";
13295
- }, Vo = (e, t) => {
13299
+ }, Wo = (e, t) => {
13296
13300
  const n = t === "start" ? e?.[0] : e?.[e.length - 1];
13297
13301
  return typeof n == "number" ? n : 0;
13298
- }, fa = ({ value: e, onChange: t }) => {
13302
+ }, ya = ({ value: e, onChange: t }) => {
13299
13303
  const n = te(), r = R(), { TextField: o } = H(), i = e !== null && typeof e != "string", l = (s) => t(s === "" ? null : s);
13300
13304
  return /* @__PURE__ */ a(L, {
13301
13305
  label: r("editor.elementsPanel.contentValue"),
@@ -13315,7 +13319,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13315
13319
  visible: u
13316
13320
  }));
13317
13321
  }, d = (u) => {
13318
- r.commands.dispatch(new Ai({ caption: u }), { transient: !0 });
13322
+ r.commands.dispatch(new Pi({ caption: u }), { transient: !0 });
13319
13323
  };
13320
13324
  return /* @__PURE__ */ a(oe, {
13321
13325
  title: e ?? i("editor.elementsPanel.footerSection.caption"),
@@ -13327,12 +13331,12 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13327
13331
  checked: s.showCaption,
13328
13332
  onChange: c
13329
13333
  })
13330
- }), /* @__PURE__ */ a(fa, {
13334
+ }), /* @__PURE__ */ a(ya, {
13331
13335
  value: s.caption,
13332
13336
  onChange: d
13333
13337
  })] })
13334
13338
  });
13335
- }, Wo = /^[a-z][a-z\d+.-]*:/i, r3 = {}, a3 = ({ title: e, layout: t = "collapsible", preview: n }) => {
13339
+ }, Uo = /^[a-z][a-z\d+.-]*:/i, r3 = {}, a3 = ({ title: e, layout: t = "collapsible", preview: n }) => {
13336
13340
  const r = te(), o = Q(r), i = R(), { Switch: l } = H();
13337
13341
  if (!o) return null;
13338
13342
  const s = o.config.content, c = (d) => {
@@ -13359,7 +13363,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13359
13363
  t.commands.dispatch(new Rd({ source: d ? c : null }), { transient: !0 });
13360
13364
  }, i = () => {
13361
13365
  const c = e.url ?? "";
13362
- c !== "" && !Wo.test(c) && o({
13366
+ c !== "" && !Uo.test(c) && o({
13363
13367
  ...e,
13364
13368
  url: `https://${c}`
13365
13369
  }), t.commands.commit();
@@ -13376,7 +13380,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13376
13380
  value: e.url ?? "",
13377
13381
  onChange: l,
13378
13382
  onCommit: i,
13379
- hasError: Wo.test(e.url ?? "") && !Iu(e.url)
13383
+ hasError: Uo.test(e.url ?? "") && !Iu(e.url)
13380
13384
  })
13381
13385
  }), /* @__PURE__ */ a(L, {
13382
13386
  label: n("editor.elementsPanel.sourceSection.name"),
@@ -13395,7 +13399,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13395
13399
  visible: u
13396
13400
  }));
13397
13401
  }, d = (u) => {
13398
- r.commands.dispatch(new Pi({ subtitle: u }), { transient: !0 });
13402
+ r.commands.dispatch(new Li({ subtitle: u }), { transient: !0 });
13399
13403
  };
13400
13404
  return /* @__PURE__ */ a(oe, {
13401
13405
  title: e ?? i("editor.elementsPanel.headerSection.subtitle"),
@@ -13407,7 +13411,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13407
13411
  checked: s.showSubtitle,
13408
13412
  onChange: c
13409
13413
  })
13410
- }), /* @__PURE__ */ a(fa, {
13414
+ }), /* @__PURE__ */ a(ya, {
13411
13415
  value: s.subtitle,
13412
13416
  onChange: d
13413
13417
  })] })
@@ -13415,7 +13419,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13415
13419
  }, Gt = (e) => {
13416
13420
  const { colorScheme: t } = bn(), n = _(() => du({ colorScheme: t }), [t]);
13417
13421
  return _(() => e === null ? null : n.readers(e), [e, n]);
13418
- }, ba = (e, t, n) => {
13422
+ }, Sa = (e, t, n) => {
13419
13423
  const r = Gt(e);
13420
13424
  return _(() => {
13421
13425
  if (r === null || e === null || t === null) return null;
@@ -13427,7 +13431,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13427
13431
  t,
13428
13432
  n
13429
13433
  ]);
13430
- }, Lr = [
13434
+ }, Ir = [
13431
13435
  0.8,
13432
13436
  1,
13433
13437
  1.2,
@@ -13438,14 +13442,14 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13438
13442
  2.5,
13439
13443
  3,
13440
13444
  4
13441
- ], l3 = Lr.length / 2, s3 = { select: { target: "graph" } }, c3 = ({ title: e, layout: t = "collapsible", preview: n }) => {
13445
+ ], l3 = Ir.length / 2, s3 = { select: { target: "graph" } }, c3 = ({ title: e, layout: t = "collapsible", preview: n }) => {
13442
13446
  const r = te(), o = Q(r), i = R(), { RadioGrid: l } = H(), s = Gt(o);
13443
13447
  if (!o || !s) return null;
13444
- const c = s.graph().get("textScale"), d = (p) => i("editor.elementsPanel.textSizeSection.scaleFormat", { value: `${p}` }), u = Lr.map((p) => ({
13448
+ const c = s.graph().get("textScale"), d = (p) => i("editor.elementsPanel.textSizeSection.scaleFormat", { value: `${p}` }), u = Ir.map((p) => ({
13445
13449
  value: `${p}`,
13446
13450
  label: d(p)
13447
13451
  })), h = (p) => {
13448
- const g = Lr.find((f) => `${f}` === p);
13452
+ const g = Ir.find((f) => `${f}` === p);
13449
13453
  if (g === void 0) return;
13450
13454
  const m = qe(o.spec.styles.overrides, s3, xe(o.spec))?.declarations ?? {};
13451
13455
  r.commands.dispatch(new Xe({
@@ -13480,7 +13484,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13480
13484
  visible: u
13481
13485
  }));
13482
13486
  }, d = (u) => {
13483
- r.commands.dispatch(new Li({ title: u }), { transient: !0 });
13487
+ r.commands.dispatch(new Ii({ title: u }), { transient: !0 });
13484
13488
  };
13485
13489
  return /* @__PURE__ */ a(oe, {
13486
13490
  title: e ?? i("editor.elementsPanel.headerSection.toggleTitle"),
@@ -13492,7 +13496,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13492
13496
  checked: s.showTitle,
13493
13497
  onChange: c
13494
13498
  })
13495
- }), /* @__PURE__ */ a(fa, {
13499
+ }), /* @__PURE__ */ a(ya, {
13496
13500
  value: s.title,
13497
13501
  onChange: d
13498
13502
  })] })
@@ -13508,11 +13512,11 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13508
13512
  ] })
13509
13513
  }), JS = ({ children: e, ...t }) => /* @__PURE__ */ a(pc.Root, {
13510
13514
  ...t,
13511
- children: e ?? /* @__PURE__ */ v(K, { children: [/* @__PURE__ */ a($o, { axis: "x" }), /* @__PURE__ */ a($o, { axis: "y" })] })
13512
- }), Dn = (e) => `${e}px`, mc = (e) => `${Math.round(e * 100)}%`, u3 = (e) => `${e}°`, h3 = 24, p3 = { select: { target: "graph" } }, Uo = ["dim", "desaturate"], QS = ({ title: e, layout: t = "collapsible", preview: n }) => {
13515
+ children: e ?? /* @__PURE__ */ v(K, { children: [/* @__PURE__ */ a(Vo, { axis: "x" }), /* @__PURE__ */ a(Vo, { axis: "y" })] })
13516
+ }), Dn = (e) => `${e}px`, mc = (e) => `${Math.round(e * 100)}%`, u3 = (e) => `${e}°`, h3 = 24, p3 = { select: { target: "graph" } }, Ko = ["dim", "desaturate"], QS = ({ title: e, layout: t = "collapsible", preview: n }) => {
13513
13517
  const r = te(), o = Q(r), i = R(), { Slider: l, ToggleGroup: s } = H(), c = Gt(o);
13514
13518
  if (!o || !c) return null;
13515
- const d = c.graph().get("cornerRadius"), u = zu(o.spec), h = Uo.map((m) => ({
13519
+ const d = c.graph().get("cornerRadius"), u = zu(o.spec), h = Ko.map((m) => ({
13516
13520
  value: m,
13517
13521
  label: i(m === "dim" ? "editor.highlighting.highlightStyle.tint" : "editor.highlighting.highlightStyle.gray")
13518
13522
  })), p = (m) => {
@@ -13528,7 +13532,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13528
13532
  }
13529
13533
  }), { transient: !0 });
13530
13534
  }, g = (m) => {
13531
- const f = Uo.find((y) => y === m);
13535
+ const f = Ko.find((y) => y === m);
13532
13536
  f && r.commands.dispatch(new zd({ dimStyle: f }));
13533
13537
  };
13534
13538
  return /* @__PURE__ */ a(oe, {
@@ -13571,7 +13575,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13571
13575
  stroke: "currentColor",
13572
13576
  strokeWidth: 1.5
13573
13577
  })
13574
- }), v3 = 0.05, Ko = [
13578
+ }), v3 = 0.05, jo = [
13575
13579
  "none",
13576
13580
  "md",
13577
13581
  "full"
@@ -13579,15 +13583,15 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13579
13583
  base: ["baseStart", "baseEnd"],
13580
13584
  tip: ["tipStart", "tipEnd"]
13581
13585
  }, e6 = ({ title: e, layout: t = "collapsible", preview: n }) => {
13582
- const r = te(), o = Q(r), i = R(), { Slider: l, ToggleGroup: s } = H(), c = o ? Vi(o.spec.layers, "bar") : void 0, d = ba(o, c?.id ?? null, "bar");
13586
+ const r = te(), o = Q(r), i = R(), { Slider: l, ToggleGroup: s } = H(), c = o ? Wi(o.spec.layers, "bar") : void 0, d = Sa(o, c?.id ?? null, "bar");
13583
13587
  if (!o || !c || o.coordSystem.type === "polar" && o.coordSystem.bandAxis === null) return null;
13584
13588
  const u = (f) => {
13585
- r.commands.dispatch(new Ti({
13589
+ r.commands.dispatch(new Ai({
13586
13590
  layerId: c.id,
13587
13591
  width: f
13588
13592
  }), { transient: !0 });
13589
13593
  }, h = d?.get("cornerRadius") ?? xd, p = (f, y) => {
13590
- const k = Ko.find((P) => P === y);
13594
+ const k = jo.find((P) => P === y);
13591
13595
  if (!k) return;
13592
13596
  const [C, w] = vc[f];
13593
13597
  r.commands.dispatch(new Od({
@@ -13598,11 +13602,11 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13598
13602
  [w]: k
13599
13603
  }
13600
13604
  }));
13601
- }, g = Ko.map((f) => ({
13605
+ }, g = jo.map((f) => ({
13602
13606
  value: f,
13603
13607
  label: i(`editor.graphPanel.barSection.radiusOptions.${f}`),
13604
13608
  icon: /* @__PURE__ */ a(m3, { cornerRadius: f })
13605
- })), m = Xi(c.params, o.coordSystem.type);
13609
+ })), m = qi(c.params, o.coordSystem.type);
13606
13610
  return /* @__PURE__ */ a(oe, {
13607
13611
  title: e ?? i("editor.graphPanel.barSection.title"),
13608
13612
  layout: t,
@@ -13623,7 +13627,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13623
13627
  /* @__PURE__ */ a(L, {
13624
13628
  label: i("editor.graphPanel.barSection.tipRadius"),
13625
13629
  children: /* @__PURE__ */ a(s, {
13626
- value: jo(h, "tip"),
13630
+ value: Xo(h, "tip"),
13627
13631
  options: g,
13628
13632
  onChange: (f) => p("tip", f)
13629
13633
  })
@@ -13631,14 +13635,14 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13631
13635
  /* @__PURE__ */ a(L, {
13632
13636
  label: i("editor.graphPanel.barSection.baseRadius"),
13633
13637
  children: /* @__PURE__ */ a(s, {
13634
- value: jo(h, "base"),
13638
+ value: Xo(h, "base"),
13635
13639
  options: g,
13636
13640
  onChange: (f) => p("base", f)
13637
13641
  })
13638
13642
  })
13639
13643
  ] })
13640
13644
  });
13641
- }, jo = (e, t) => {
13645
+ }, Xo = (e, t) => {
13642
13646
  const [n, r] = vc[t], o = e[n];
13643
13647
  return typeof o != "string" || o !== e[r] ? "" : o === "none" || o === "full" ? o : "md";
13644
13648
  }, _n = ({ children: e }) => {
@@ -13733,7 +13737,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13733
13737
  r.commands.dispatch(new we({
13734
13738
  kind: "text",
13735
13739
  annotation: {
13736
- ...Di,
13740
+ ..._i,
13737
13741
  content: L3(i("editor.annotatePanel.callOutSection.text")),
13738
13742
  at: {
13739
13743
  anchorType: "panel",
@@ -13746,7 +13750,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13746
13750
  r.commands.dispatch(new we({
13747
13751
  kind: "arrow",
13748
13752
  annotation: {
13749
- ...fi,
13753
+ ...bi,
13750
13754
  start: {
13751
13755
  anchorType: "panel",
13752
13756
  ...T3
@@ -13761,7 +13765,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13761
13765
  r.commands.dispatch(new we({
13762
13766
  kind: "shape",
13763
13767
  annotation: {
13764
- ...Ci,
13768
+ ...wi,
13765
13769
  ...k3,
13766
13770
  region: {
13767
13771
  anchorType: "panel",
@@ -13774,7 +13778,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13774
13778
  p !== null && r.commands.dispatch(new we({
13775
13779
  kind: "differenceArrow",
13776
13780
  annotation: {
13777
- ...yi,
13781
+ ...Si,
13778
13782
  ...p,
13779
13783
  label: P3
13780
13784
  }
@@ -13825,12 +13829,12 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13825
13829
  if (!o) return null;
13826
13830
  const s = Tn(o.spec);
13827
13831
  if (s === null || !be(s)) return null;
13828
- const c = wa.map((u) => ({
13832
+ const c = ka.map((u) => ({
13829
13833
  value: u,
13830
13834
  label: i(`editor.graphPanel.comboSection.types.${u}`)
13831
13835
  })), d = (u) => {
13832
- const h = wa.find((p) => p === u);
13833
- h && r.commands.dispatch(new Fr({
13836
+ const h = ka.find((p) => p === u);
13837
+ h && r.commands.dispatch(new zr({
13834
13838
  coordType: "cartesian",
13835
13839
  comboType: h
13836
13840
  }));
@@ -13908,31 +13912,31 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13908
13912
  if (!i) return null;
13909
13913
  const c = e === void 0 ? i.layers[0] : q(i.layers, e);
13910
13914
  if (!c) return null;
13911
- const { showDataLabels: d, format: u, showStackTotals: h, showCategoryLabels: p } = c.dataLabels, g = Tl(c, i.coordSystem.type, {
13915
+ const { showDataLabels: d, format: u, showStackTotals: h, showCategoryLabels: p } = c.dataLabels, g = Al(c, i.coordSystem.type, {
13912
13916
  hasCapability: o.canPlaceDataLabels,
13913
13917
  hasPercentageFormat: o.canFormatDataLabelsAsPercentages
13914
13918
  });
13915
13919
  if (!g.supportsDataLabels) return null;
13916
13920
  const m = (C) => {
13917
- const w = new Fi({
13921
+ const w = new zi({
13918
13922
  layerId: c.id,
13919
13923
  showDataLabels: C
13920
13924
  });
13921
13925
  o.commands.dispatch(w);
13922
13926
  }, f = (C) => {
13923
- const w = new Ii({
13927
+ const w = new Mi({
13924
13928
  layerId: c.id,
13925
13929
  format: C ? "percentage" : "absolute"
13926
13930
  });
13927
13931
  o.commands.dispatch(w);
13928
13932
  }, y = (C) => {
13929
- const w = new zi({
13933
+ const w = new Bi({
13930
13934
  layerId: c.id,
13931
13935
  showStackTotals: C
13932
13936
  });
13933
13937
  o.commands.dispatch(w);
13934
13938
  }, k = (C) => {
13935
- const w = new _i({
13939
+ const w = new Fi({
13936
13940
  layerId: c.id,
13937
13941
  showCategoryLabels: C
13938
13942
  });
@@ -13978,12 +13982,12 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13978
13982
  value: h,
13979
13983
  label: i(`editor.graphTypes.${h}`),
13980
13984
  icon: /* @__PURE__ */ a(p, { size: "md" }),
13981
- disabled: !Ll(g, o?.spec)
13985
+ disabled: !Il(g, o?.spec)
13982
13986
  })), [i, o]);
13983
13987
  if (!o) return null;
13984
13988
  const c = Tn(o.spec), d = sn(c), u = (h) => {
13985
13989
  const p = It.find((g) => g.name === h);
13986
- p && r.commands.dispatch(new Fr(Il(p.summary, c)));
13990
+ p && r.commands.dispatch(new zr(Ml(p.summary, c)));
13987
13991
  };
13988
13992
  return /* @__PURE__ */ a(oe, {
13989
13993
  title: e ?? i("editor.graphPanel.graphTypeSection.title"),
@@ -13998,7 +14002,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
13998
14002
  })
13999
14003
  });
14000
14004
  }, i6 = ({ title: e, layout: t = "collapsible", preview: n }) => {
14001
- const r = te(), o = Q(r), i = R(), { Slider: l, Switch: s, ToggleGroup: c } = H(), d = Gt(o), u = o !== null && d !== null ? Gl(o, d) : null;
14005
+ const r = te(), o = Q(r), i = R(), { Slider: l, Switch: s, ToggleGroup: c } = H(), d = Gt(o), u = o !== null && d !== null ? $l(o, d) : null;
14002
14006
  if (u === null) return null;
14003
14007
  const h = u.axes.filter((k) => k.supportsGrid);
14004
14008
  if (h.length === 0) return null;
@@ -14012,9 +14016,9 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
14012
14016
  }));
14013
14017
  }, f = (k) => {
14014
14018
  const C = un.find((w) => w === k);
14015
- C !== void 0 && r.commands.dispatch($l(C));
14019
+ C !== void 0 && r.commands.dispatch(Vl(C));
14016
14020
  }, y = (k) => {
14017
- r.commands.dispatch(Vl(k), { transient: !0 });
14021
+ r.commands.dispatch(Wl(k), { transient: !0 });
14018
14022
  };
14019
14023
  return /* @__PURE__ */ a(oe, {
14020
14024
  title: e ?? i("editor.graphPanel.gridSection.title"),
@@ -14050,7 +14054,7 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
14050
14054
  "total",
14051
14055
  "average",
14052
14056
  "current"
14053
- ], D3 = ["total"], Xo = ["previous", "first"], qo = [
14057
+ ], D3 = ["total"], qo = ["previous", "first"], Yo = [
14054
14058
  "auto",
14055
14059
  "small",
14056
14060
  "medium",
@@ -14063,10 +14067,10 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
14063
14067
  const m = h ? D3 : fc, f = o.guides.headline, y = f?.kind === "perGroup" && f.items.some((A) => A.comparison !== null), k = m.map((A) => ({
14064
14068
  value: A,
14065
14069
  label: i(`editor.graphPanel.headlineNumberSection.metrics.${A}`)
14066
- })), C = Xo.map((A) => ({
14070
+ })), C = qo.map((A) => ({
14067
14071
  value: A,
14068
14072
  label: i(`editor.graphPanel.headlineNumberSection.comparison.${A}`)
14069
- })), w = qo.map((A) => ({
14073
+ })), w = Yo.map((A) => ({
14070
14074
  value: A,
14071
14075
  label: i(A === "auto" ? "editor.graphPanel.numberFormat.options.auto" : `editor.graphPanel.headlineNumberSize.sizes.${A}`)
14072
14076
  })), P = [{
@@ -14076,15 +14080,15 @@ var Xy = "_40zvwv8", oe = ({ title: e, layout: t = "fixed", preview: n, accessor
14076
14080
  value: "center",
14077
14081
  label: i("editor.graphPanel.headlineNumberSection.position.center")
14078
14082
  }], T = (A) => {
14079
- r.commands.dispatch(new ka({ show: A ? N3 : "none" }));
14083
+ r.commands.dispatch(new Aa({ show: A ? N3 : "none" }));
14080
14084
  }, I = (A) => {
14081
14085
  const S = m.find((b) => b === A);
14082
- S && r.commands.dispatch(new ka({ show: S }));
14086
+ S && r.commands.dispatch(new Aa({ show: S }));
14083
14087
  }, N = (A) => {
14084
- const S = Xo.find((b) => b === A);
14088
+ const S = qo.find((b) => b === A);
14085
14089
  S && r.commands.dispatch(new Dd({ compareWith: S }));
14086
14090
  }, x = (A) => {
14087
- const S = qo.find((b) => b === A);
14091
+ const S = Yo.find((b) => b === A);
14088
14092
  S && r.commands.dispatch(new Fd({ size: S }));
14089
14093
  }, O = (A) => {
14090
14094
  r.commands.dispatch(new _d({ position: A === "center" ? "center" : "above" }));
@@ -14146,7 +14150,7 @@ var Zn = [
14146
14150
  "left",
14147
14151
  "right",
14148
14152
  "none"
14149
- ], Yo = [
14153
+ ], Zo = [
14150
14154
  "auto",
14151
14155
  "start",
14152
14156
  "center",
@@ -14160,12 +14164,12 @@ var Zn = [
14160
14164
  start: "top",
14161
14165
  end: "bottom"
14162
14166
  }
14163
- }, Zo = [
14167
+ }, Jo = [
14164
14168
  "auto",
14165
14169
  "pill",
14166
14170
  "direct"
14167
14171
  ], s6 = ({ positions: e, title: t, layout: n = "collapsible", preview: r }) => {
14168
- const o = te(), i = Q(o), l = R(), { ToggleGroup: s } = H(), c = di();
14172
+ const o = te(), i = Q(o), l = R(), { ToggleGroup: s } = H(), c = ui();
14169
14173
  if (!i) return null;
14170
14174
  const d = i.config.legend.position, u = e ?? Zn, h = i.guides.legends.drawn[0], p = au({
14171
14175
  legendPosition: i.guides.legends.position,
@@ -14180,15 +14184,15 @@ var Zn = [
14180
14184
  const z = Zn.find((U) => U === E);
14181
14185
  z && o.commands.dispatch(new ar({ position: z }));
14182
14186
  }, w = (E) => {
14183
- const z = Yo.find((U) => U === E);
14187
+ const z = Zo.find((U) => U === E);
14184
14188
  z && o.commands.dispatch(new Hd({ align: z }));
14185
14189
  }, P = (E) => {
14186
- const z = Zo.find((U) => U === E);
14190
+ const z = Jo.find((U) => U === E);
14187
14191
  z && o.commands.dispatch(new Gd({ display: z }));
14188
- }, T = h?.position === "left" || h?.position === "right" ? "column" : "row", I = T === "row" ? "ltr" : c, N = (E) => l(E === "start" || E === "end" ? `editor.graphPanel.legendSection.${F3[T][E]}` : `editor.graphPanel.legendSection.align.${E}`), x = Yo.map((E) => ({
14192
+ }, T = h?.position === "left" || h?.position === "right" ? "column" : "row", I = T === "row" ? "ltr" : c, N = (E) => l(E === "start" || E === "end" ? `editor.graphPanel.legendSection.${F3[T][E]}` : `editor.graphPanel.legendSection.align.${E}`), x = Zo.map((E) => ({
14189
14193
  value: E,
14190
14194
  label: N(E)
14191
- })), O = Zo.map((E) => ({
14195
+ })), O = Jo.map((E) => ({
14192
14196
  value: E,
14193
14197
  label: l(`editor.graphPanel.legendSection.display.${E}`)
14194
14198
  })), A = t ?? l("editor.graphPanel.legendSection.title"), S = k.find((E) => E.value === y)?.label, b = h !== void 0;
@@ -14209,7 +14213,7 @@ var Zn = [
14209
14213
  b && /* @__PURE__ */ a(L, {
14210
14214
  label: l("editor.graphPanel.legendSection.alignLabel"),
14211
14215
  layout: "stack",
14212
- children: /* @__PURE__ */ a(Kr, {
14216
+ children: /* @__PURE__ */ a(jr, {
14213
14217
  direction: I,
14214
14218
  children: /* @__PURE__ */ a("div", {
14215
14219
  dir: I,
@@ -14234,9 +14238,9 @@ var Zn = [
14234
14238
  ] })
14235
14239
  });
14236
14240
  }, z3 = 1, B3 = 20, H3 = 0.5, bc = ({ layerId: e }) => {
14237
- const t = te(), n = Q(t), { Slider: r } = H(), o = ba(n, e, "point");
14241
+ const t = te(), n = Q(t), { Slider: r } = H(), o = Sa(n, e, "point");
14238
14242
  if (!n) return null;
14239
- const i = q(n.layers, e)?.data?.findFirst((c) => (o?.get("size", c) ?? 0) > 0) ?? void 0, l = o?.get("size", i) ?? bi;
14243
+ const i = q(n.layers, e)?.data?.findFirst((c) => (o?.get("size", c) ?? 0) > 0) ?? void 0, l = o?.get("size", i) ?? yi;
14240
14244
  return /* @__PURE__ */ a(r, {
14241
14245
  value: l,
14242
14246
  min: z3,
@@ -14253,23 +14257,23 @@ var Zn = [
14253
14257
  onCommit: t.commands.commit
14254
14258
  });
14255
14259
  }, yc = ({ layerId: e }) => {
14256
- const t = te(), n = Q(t), r = ba(n, e, "point");
14257
- return n ? /* @__PURE__ */ a(Yr, {
14260
+ const t = te(), n = Q(t), r = Sa(n, e, "point");
14261
+ return n ? /* @__PURE__ */ a(Zr, {
14258
14262
  symbol: r?.get("symbol") ?? "circle",
14259
14263
  coordType: n.coordSystem.type,
14260
14264
  onChange: (o) => {
14261
- t.commands.dispatch(new zr({
14265
+ t.commands.dispatch(new Br({
14262
14266
  layerId: e,
14263
14267
  symbol: o
14264
14268
  }));
14265
14269
  }
14266
14270
  }) : null;
14267
14271
  }, c6 = ({ title: e, layout: t = "collapsible", preview: n }) => {
14268
- const r = te(), o = Q(r), i = R(), { Select: l, Slider: s, Switch: c, ToggleGroup: d } = H(), u = Gt(o), h = Vi(o?.spec.layers ?? [], "line", "area"), p = o && u && h ? qr(o, u, h.id) : null;
14272
+ const r = te(), o = Q(r), i = R(), { Select: l, Slider: s, Switch: c, ToggleGroup: d } = H(), u = Gt(o), h = Wi(o?.spec.layers ?? [], "line", "area"), p = o && u && h ? Yr(o, u, h.id) : null;
14269
14273
  if (!o || !p) return null;
14270
14274
  const g = p.missingValueOptions.map((T) => ({
14271
14275
  value: T,
14272
- label: Al(i, T)
14276
+ label: Pl(i, T)
14273
14277
  })), m = [{
14274
14278
  value: "auto",
14275
14279
  label: i("editor.graphPanel.numberFormat.options.auto"),
@@ -14278,7 +14282,7 @@ var Zn = [
14278
14282
  value: "custom",
14279
14283
  label: i("editor.graphPanel.numberFormat.options.custom")
14280
14284
  }], f = (T) => {
14281
- r.commands.dispatch(new Br({
14285
+ r.commands.dispatch(new Hr({
14282
14286
  layerId: p.layerId,
14283
14287
  showPoints: T
14284
14288
  }));
@@ -14289,7 +14293,7 @@ var Zn = [
14289
14293
  drawnFillAlpha: p.drawnFillAlpha
14290
14294
  }));
14291
14295
  }, k = (T) => {
14292
- r.commands.dispatch(new Ei({
14296
+ r.commands.dispatch(new Oi({
14293
14297
  layerId: p.layerId,
14294
14298
  curve: T ? "smooth" : "linear"
14295
14299
  }));
@@ -14305,7 +14309,7 @@ var Zn = [
14305
14309
  }), { transient: !0 });
14306
14310
  }, P = (T) => {
14307
14311
  const I = hr.find((N) => N === T);
14308
- I && r.commands.dispatch(new Oi({
14312
+ I && r.commands.dispatch(new Ri({
14309
14313
  layerId: p.layerId,
14310
14314
  missingValues: I
14311
14315
  }));
@@ -14371,7 +14375,7 @@ var Zn = [
14371
14375
  })
14372
14376
  ] })
14373
14377
  });
14374
- }, Ir = "\0none", G3 = [
14378
+ }, Mr = "\0none", G3 = [
14375
14379
  "x",
14376
14380
  "y",
14377
14381
  "color",
@@ -14389,12 +14393,12 @@ var Zn = [
14389
14393
  return {
14390
14394
  aesthetic: d,
14391
14395
  label: o($3[d]),
14392
- value: p ?? (h ? null : Ir),
14396
+ value: p ?? (h ? null : Mr),
14393
14397
  options: V3(u, p, h ? null : l),
14394
14398
  chooseColumn: (g) => {
14395
14399
  n.commands.dispatch(new Vd({
14396
14400
  aesthetic: d,
14397
- variable: g === Ir ? null : g
14401
+ variable: g === Mr ? null : g
14398
14402
  }));
14399
14403
  }
14400
14404
  };
@@ -14420,13 +14424,13 @@ var Zn = [
14420
14424
  }, V3 = (e, t, n) => {
14421
14425
  const r = t !== null && !e.includes(t) ? [t, ...e] : e;
14422
14426
  return [...n === null ? [] : [{
14423
- value: Ir,
14427
+ value: Mr,
14424
14428
  label: n
14425
14429
  }], ...r.map((o) => ({
14426
14430
  value: o,
14427
14431
  label: o
14428
14432
  }))];
14429
- }, W3 = "k", U3 = 2, K3 = 0, j3 = 5, Mr = [
14433
+ }, W3 = "k", U3 = 2, K3 = 0, j3 = 5, Er = [
14430
14434
  {
14431
14435
  value: "k",
14432
14436
  labelKey: "thousands"
@@ -14445,7 +14449,7 @@ var Zn = [
14445
14449
  const { abbreviation: c, decimals: d } = o.config.numberFormat, u = q3(c) !== void 0, h = d !== "auto", p = (w) => w.map((P) => ({
14446
14450
  value: P,
14447
14451
  label: i(`editor.graphPanel.numberFormat.options.${P}`)
14448
- })), g = Mr.map(({ value: w, labelKey: P }) => ({
14452
+ })), g = Er.map(({ value: w, labelKey: P }) => ({
14449
14453
  value: w,
14450
14454
  label: i(`common.abbreviations.${P}`)
14451
14455
  })), m = (w) => {
@@ -14454,12 +14458,12 @@ var Zn = [
14454
14458
  const P = X3.find((T) => T === w);
14455
14459
  m(P ?? W3);
14456
14460
  }, y = (w) => {
14457
- const P = Mr.find((T) => T.value === w);
14461
+ const P = Er.find((T) => T.value === w);
14458
14462
  P && m(P.value);
14459
14463
  }, k = (w) => {
14460
- r.commands.dispatch(new Ta({ decimals: w === "custom" ? U3 : "auto" }));
14464
+ r.commands.dispatch(new Pa({ decimals: w === "custom" ? U3 : "auto" }));
14461
14465
  }, C = (w) => {
14462
- w !== null && r.commands.dispatch(new Ta({ decimals: w }), { transient: !0 });
14466
+ w !== null && r.commands.dispatch(new Pa({ decimals: w }), { transient: !0 });
14463
14467
  };
14464
14468
  return /* @__PURE__ */ a(oe, {
14465
14469
  title: e ?? i("editor.graphPanel.numberFormatSection.title"),
@@ -14506,7 +14510,7 @@ var Zn = [
14506
14510
  })
14507
14511
  ] })
14508
14512
  });
14509
- }, q3 = (e) => Mr.find((t) => t.value === e), h6 = ({ title: e, layout: t = "collapsible", preview: n }) => {
14513
+ }, q3 = (e) => Er.find((t) => t.value === e), h6 = ({ title: e, layout: t = "collapsible", preview: n }) => {
14510
14514
  const r = Q(te()), o = R();
14511
14515
  if (!r) return null;
14512
14516
  const i = Y3(r.spec.layers);
@@ -14521,7 +14525,7 @@ var Zn = [
14521
14525
  }) : null;
14522
14526
  }, Y3 = (e) => {
14523
14527
  const t = or(e, "line", "area");
14524
- return or(e, "point").find((n) => !Wi(n, t));
14528
+ return or(e, "point").find((n) => !Ui(n, t));
14525
14529
  }, Z3 = 0.9, J3 = 360, Q3 = 0.05, eS = 15, p6 = ({ title: e, layout: t = "collapsible", preview: n }) => {
14526
14530
  const r = te(), o = Q(r), i = R(), { Slider: l } = H();
14527
14531
  if (!o || o.spec.coords.coordType !== "polar") return null;
@@ -14581,7 +14585,7 @@ var Zn = [
14581
14585
  fill: "currentColor"
14582
14586
  })
14583
14587
  ]
14584
- }), Jo = (e) => /* @__PURE__ */ v(M, {
14588
+ }), Qo = (e) => /* @__PURE__ */ v(M, {
14585
14589
  ...e,
14586
14590
  children: [
14587
14591
  /* @__PURE__ */ a("path", {
@@ -14604,7 +14608,7 @@ var Zn = [
14604
14608
  fill: "currentColor"
14605
14609
  })
14606
14610
  ]
14607
- }), Qo = [
14611
+ }), ei = [
14608
14612
  "linear",
14609
14613
  "exponential",
14610
14614
  "quadratic",
@@ -14615,7 +14619,7 @@ var Zn = [
14615
14619
  ], nS = "linear", g6 = ({ title: e, layout: t = "collapsible", preview: n }) => {
14616
14620
  const r = te(), o = Q(r), i = R(), { Select: l, Switch: s } = H(), { options: c, findValue: d } = En(o, r.formattingLocale);
14617
14621
  if (!o || o.coordSystem.type === "polar") return null;
14618
- const u = yu(o.spec.layers), h = gu(o.spec.layers), p = u?.stat.type === "smooth" ? u.stat.method : nS, g = rS(h), m = Qo.map((P) => ({
14622
+ const u = yu(o.spec.layers), h = gu(o.spec.layers), p = u?.stat.type === "smooth" ? u.stat.method : nS, g = rS(h), m = ei.map((P) => ({
14619
14623
  value: P,
14620
14624
  label: i(`editor.annotationsPanel.trendType.options.${P}`)
14621
14625
  })), f = (P, T = {}) => {
@@ -14627,7 +14631,7 @@ var Zn = [
14627
14631
  });
14628
14632
  r.commands.dispatch(N);
14629
14633
  }, y = (P) => f(P ? "trend" : "none", { method: p }), k = (P) => f(P ? "average" : "none", { group: g ?? d(c[0]?.value ?? "") }), C = (P) => {
14630
- const T = Qo.find((I) => I === P);
14634
+ const T = ei.find((I) => I === P);
14631
14635
  T !== void 0 && f("trend", { method: T });
14632
14636
  }, w = (P) => {
14633
14637
  const T = P === null ? void 0 : d(P);
@@ -14636,11 +14640,11 @@ var Zn = [
14636
14640
  return /* @__PURE__ */ a(oe, {
14637
14641
  title: e ?? i("editor.annotationsPanel.trendsAndAveragesSection.title"),
14638
14642
  layout: t,
14639
- preview: n ?? /* @__PURE__ */ a(Jo, { size: "lg" }),
14643
+ preview: n ?? /* @__PURE__ */ a(Qo, { size: "lg" }),
14640
14644
  children: /* @__PURE__ */ v(he, { children: [
14641
14645
  /* @__PURE__ */ a(L, {
14642
14646
  label: i("editor.annotationsPanel.trendsAndAveragesSection.trend"),
14643
- icon: /* @__PURE__ */ a(Jo, { size: "lg" }),
14647
+ icon: /* @__PURE__ */ a(Qo, { size: "lg" }),
14644
14648
  children: /* @__PURE__ */ a(s, {
14645
14649
  checked: u !== void 0,
14646
14650
  onChange: y
@@ -14682,19 +14686,19 @@ var Zn = [
14682
14686
  export {
14683
14687
  QS as AppearanceSection,
14684
14688
  JS as AxesPanel,
14685
- Cl as AxisEditMenu,
14686
- $o as AxisSection,
14687
- kl as BarEditMenu,
14689
+ wl as AxisEditMenu,
14690
+ Vo as AxisSection,
14691
+ Tl as BarEditMenu,
14688
14692
  e6 as BarSection,
14689
14693
  Bh as Button,
14690
14694
  t6 as CalloutsSection,
14691
14695
  n3 as CaptionSection,
14692
- zl as ChartEditMenu,
14696
+ Bl as ChartEditMenu,
14693
14697
  He as ColorRow,
14694
14698
  Kh as ColorSwatches,
14695
14699
  n6 as ComboSection,
14696
14700
  qp as ControlRegistryProvider,
14697
- mt as ControlTooltip,
14701
+ vt as ControlTooltip,
14698
14702
  lp as CustomColor,
14699
14703
  qS as EditableGraphRenderer,
14700
14704
  fs as EditorIntlProvider,
@@ -14704,7 +14708,7 @@ export {
14704
14708
  r6 as GoalSection,
14705
14709
  a6 as GraphOptionsSection,
14706
14710
  o6 as GraphTypeSection,
14707
- Wl as GridEditMenu,
14711
+ Ul as GridEditMenu,
14708
14712
  i6 as GridSection,
14709
14713
  l6 as HeadlineSection,
14710
14714
  Cm as LegendEditMenu,
@@ -14731,7 +14735,7 @@ export {
14731
14735
  Wp as TextField,
14732
14736
  c3 as TextSizeSection,
14733
14737
  d3 as TitleSection,
14734
- yl as ToggleGroup,
14738
+ Sl as ToggleGroup,
14735
14739
  Zy as ToggledSection,
14736
14740
  g6 as TrendsAndAveragesSection,
14737
14741
  Ah as useAnnotateAnchor,