@graphysdk/react-renderer 1.9.0-beta.1791471985655 → 1.9.0-beta.1791474469645

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,15 +1,15 @@
1
- import { $ as $r, $t as Wr, At as ee, Bt as Ur, C as Ai, Ct as ki, D as Li, E as Pi, Et as ue, F as Ii, G as $, H as Ei, I as L, J as Oi, Jt as Mi, K as Ni, Mt as Ri, N as Di, O as Kr, P as _i, Q as dn, Qt as qr, S as Fi, T as Le, Tt as zi, U as Bi, Ut as Hi, W as J, X as U, Xt as Gi, Y as Vi, Yt as Xr, Z as un, _ as Ne, _n as z, _t as $i, an as Wi, b as jr, c as Zr, cn as Ui, ct as Ki, d as qi, dn as Yr, dt as ie, en as ce, et as hn, f as Xi, g as Jr, gt as ji, h as pn, hn as R, i as Qr, it as ea, jt as Zi, k as yt, kt as je, l as Yi, lt as _n, m as Ji, n as le, nn as Ge, nt as Qi, o as el, on as tl, ot as nl, p as ta, pn as X, pt as St, q as Fn, qt as rl, r as K, rt as na, st as al, t as ol, tn as mn, tt as Ct, u as il, ut as ll, v as sl, vt as P, wt as cl, x as dl, xt as Re, y as ul, yn as hl, yt as pl, z as ml, zt as gl } from "./history-chords-Db33Un6K.js";
2
- import { ARROW_DEFAULTS as vl, ARROW_STICKER_DECLARATIONS as fl, ARROW_STROKE_WIDTHS_PX as Ft, AddAnnotationCommand as we, AddHighlightCommand as bl, BORDER_RADIUS_TOKENS as zn, COMBO_TYPES as Bn, CONSTANT_VARIABLES as yl, DASH_PRESETS as Sl, DEFAULT_BAR_CORNER_RADIUS as Cl, DEFAULT_GEOM_COLOR as xl, DEFAULT_POINT_SIZE_PX as wl, DEFAULT_STROKE_WIDTH_PX as Tl, DIFFERENCE_ARROW_DEFAULTS as ra, DIFFERENCE_ARROW_SIZE_DECLARATIONS as Hn, InternalError as Al, MAX_BAR_WIDTH_FRACTION as kl, MIN_BAR_WIDTH_FRACTION as Ll, MoveAnnotationCommand as Pl, RESTING_HOVER_STATE as gn, RemoveAnnotationCommand as We, RemoveHighlightCommand as Il, SHAPE_DEFAULTS as El, SequenceCommand as Ol, SetAxisLabelCommand as aa, SetAxisPositionCommand as oa, SetAxisTickModeCommand as ia, SetAxisTicksVisibilityCommand as Ml, SetAxisVisibilityCommand as Nl, SetBarCornerRadiusCommand as Rl, SetBarWidthCommand as Dl, SetChartTypeCommand as la, SetContentCaptionCommand as sa, SetContentSourceCommand as _l, SetContentSubtitleCommand as ca, SetContentTitleCommand as da, SetDataLabelsFormatCommand as ua, SetDifferenceArrowStyleCommand as Fl, SetGridLineStyleCommand as zl, SetGridLineWidthCommand as Bl, SetGridVisibilityCommand as Hl, SetHeadlineCompareWithCommand as Gl, SetHeadlinePositionCommand as Vl, SetHeadlineShowCommand as Gn, SetHeadlineSizeCommand as $l, SetHighlightDimStyleCommand as Wl, SetLayerYScaleTypeCommand as Ul, SetLegendAlignCommand as Kl, SetLegendDisplayCommand as ql, SetLegendPlacementCommand as Xl, SetLegendPositionCommand as jl, SetLineCurveCommand as Zl, SetLineMissingValuesCommand as Yl, SetLineWidthCommand as Vn, SetMappingCommand as Jl, SetNumberFormatAbbreviationCommand as Ql, SetNumberFormatDecimalsCommand as $n, SetObservationsColorCommand as es, SetPointSizeCommand as ts, SetPolarInnerRadiusCommand as ns, SetPolarStartAngleCommand as rs, SetRuleLabelCommand as as, SetRuleValueCommand as os, SetScaleDomainCommand as Ie, SetScaleReverseCommand as is, SetScaleTransformCommand as ls, SetStatLineCommand as ss, SetStyleRuleCommand as Oe, TEXT_ANNOTATION_DEFAULTS as cs, TEXT_ANNOTATION_FADE_ALPHA as ds, ToggleCategoryLabelsCommand as ha, ToggleContentVisibilityCommand as xt, ToggleDataLabelsCommand as pa, ToggleGoalLineCommand as us, ToggleLineFillCommand as hs, ToggleLinePointsCommand as ps, ToggleStackTotalsCommand as ma, UpdateAnnotationCommand as he, alignUnitFractions as ms, areAnchorsEqual as ga, areEditTargetsEqual as va, areEndpointsComparable as gs, buildEditMenuTriggerRegion as vs, buildLayerStyleAddress as fs, buildObservationPredicate as bs, buildObservationsTarget as wt, buildObservationsTargetAtValue as fa, canAnchorDirectLabels as ys, canBecomeCombo as Ss, canBecomeHeatmap as Cs, clampAnnotationTranslation as xs, combineKindStyleDeclarations as Wn, computeArrow as ba, createObservationAnchorBuilder as ws, createObservationAnchorParser as Ts, createStyleResolver as As, createValueFormatter as ya, createXValueReader as ks, filterLayersByGeoms as Ut, findAnnotation as Ls, findAverageLineLayer as Ps, findAxisGuide as Is, findCompanionLayers as Sa, findGoalLineLayer as Es, findHighlightsAtObservation as Os, findHostLayer as Ms, findLayerByGeom as Ca, findLayerById as ve, findObservationAttachment as Ns, findStyleRule as Ae, findTrendLineLayer as Rs, formatDifferenceLabel as Ds, getBoundingRect as Kt, getGroupVariables as _s, getXBand as Fs, getYBand as zs, hasMainAxisBand as Bs, hasMultipleGroups as Hs, inferDefaultDifferenceArrowEndpoints as Gs, inferDifferenceArrowEndpoints as Vs, isComboChartType as Ee, isCompanionLayer as xa, isObservationAttachmentKind as $s, isPointWithinEditMenuTrigger as vn, isSafeUrl as Ws, isZeroAnchoredAxis as wa, measureObservationsBoxes as Ta, projectAnchorToPanel as dt, readBroadestObservationsScope as Us, readChartType as Aa, readComboLineLayerId as Ks, readCompanionRowsAtScopeKey as qs, readConstantValue as Xs, readEditTargetKey as Tt, readGeomColor as js, readHighlightDimStyle as Zs, readMainAxis as Ys, readMappableAesthetics as Js, readMappedVariable as Qs, readObservationIndex as ka, readObservationsColorRoute as ec, readPaletteChoices as tc, readPresentedObservationsColor as nc, readReachableLevels as rc, readRowScopeKey as ac, readRowsAtScopeKey as oc, readScopeXVariable as ic, readStyleCoord as De, readStyleRulesBeneath as lc, readVariableName as At, resolveArrowAnnotationStyle as fn, resolveBarBandFraction as sc, resolveComparisonBasis as cc, resolveDifferenceArrowAnnotationStyle as dc, resolveEditOutlineStyle as uc, resolveObservationPoint as La, resolveObservationsTarget as Un, stepDifferenceArrowEndpoint as hc, toDashPreset as qt, toPaintColor as ut, toPanelCursor as kt } from "@graphysdk/viz-engine";
3
- import { Fragment as pc, createContext as _e, memo as Pa, useCallback as ae, useContext as ye, useEffect as _, useId as ke, useLayoutEffect as Me, useMemo as I, useRef as ne, useState as Q } from "react";
1
+ import { $ as $r, $t as Wr, At as ee, Bt as Ur, C as ki, Ct as Li, D as Pi, E as Ii, Et as ue, F as Ei, G as $, H as Oi, I as L, J as Mi, Jt as Ni, K as Ri, Mt as Di, N as _i, O as Kr, P as Fi, Q as dn, Qt as qr, S as zi, T as Le, Tt as Bi, U as Hi, Ut as Gi, W as J, X as U, Xt as Vi, Y as $i, Yt as Xr, Z as un, _ as Ne, _n as B, _t as Wi, an as Ui, b as jr, c as Zr, cn as Ki, ct as qi, d as Xi, dn as Yr, dt as ie, en as ce, et as hn, f as ji, g as Jr, gt as Zi, h as pn, hn as R, i as Qr, it as ea, jt as Yi, k as yt, kt as je, l as Ji, lt as _n, m as Qi, n as le, nn as Ge, nt as el, o as tl, on as nl, ot as rl, p as ta, pn as X, pt as St, q as Fn, qt as al, r as K, rt as na, st as ol, t as il, tn as mn, tt as Ct, u as ll, ut as sl, v as cl, vt as I, wt as dl, x as ul, xt as Re, y as hl, yn as pl, yt as ml, z as gl, zt as vl } from "./history-chords-BJe5GL-a.js";
2
+ import { ARROW_DEFAULTS as fl, ARROW_STICKER_DECLARATIONS as bl, ARROW_STROKE_WIDTHS_PX as Ft, AddAnnotationCommand as we, AddHighlightCommand as yl, BORDER_RADIUS_TOKENS as zn, COMBO_TYPES as Bn, CONSTANT_VARIABLES as Sl, DASH_PRESETS as Cl, DEFAULT_BAR_CORNER_RADIUS as xl, DEFAULT_GEOM_COLOR as wl, DEFAULT_POINT_SIZE_PX as Tl, DEFAULT_STROKE_WIDTH_PX as Al, DIFFERENCE_ARROW_DEFAULTS as ra, DIFFERENCE_ARROW_SIZE_DECLARATIONS as Hn, InternalError as kl, MAX_BAR_WIDTH_FRACTION as Ll, MIN_BAR_WIDTH_FRACTION as Pl, MoveAnnotationCommand as Il, RESTING_HOVER_STATE as gn, RemoveAnnotationCommand as We, RemoveHighlightCommand as El, SHAPE_DEFAULTS as Ol, SequenceCommand as Ml, SetAxisLabelCommand as aa, SetAxisPositionCommand as oa, SetAxisTickModeCommand as ia, SetAxisTicksVisibilityCommand as Nl, SetAxisVisibilityCommand as Rl, SetBarCornerRadiusCommand as Dl, SetBarWidthCommand as _l, SetChartTypeCommand as la, SetContentCaptionCommand as sa, SetContentSourceCommand as Fl, SetContentSubtitleCommand as ca, SetContentTitleCommand as da, SetDataLabelsFormatCommand as ua, SetDifferenceArrowStyleCommand as zl, SetGridLineStyleCommand as Bl, SetGridLineWidthCommand as Hl, SetGridVisibilityCommand as Gl, SetHeadlineCompareWithCommand as Vl, SetHeadlinePositionCommand as $l, SetHeadlineShowCommand as Gn, SetHeadlineSizeCommand as Wl, SetHighlightDimStyleCommand as Ul, SetLayerYScaleTypeCommand as Kl, SetLegendAlignCommand as ql, SetLegendDisplayCommand as Xl, SetLegendPlacementCommand as jl, SetLegendPositionCommand as Zl, SetLineCurveCommand as Yl, SetLineMissingValuesCommand as Jl, SetLineWidthCommand as Vn, SetMappingCommand as Ql, SetNumberFormatAbbreviationCommand as es, SetNumberFormatDecimalsCommand as $n, SetObservationsColorCommand as ts, SetPointSizeCommand as ns, SetPolarInnerRadiusCommand as rs, SetPolarStartAngleCommand as as, SetRuleLabelCommand as os, SetRuleValueCommand as is, SetScaleDomainCommand as Ie, SetScaleReverseCommand as ls, SetScaleTransformCommand as ha, SetStatLineCommand as ss, SetStyleRuleCommand as Oe, TEXT_ANNOTATION_DEFAULTS as cs, TEXT_ANNOTATION_FADE_ALPHA as ds, ToggleCategoryLabelsCommand as pa, ToggleContentVisibilityCommand as xt, ToggleDataLabelsCommand as ma, ToggleGoalLineCommand as us, ToggleLineFillCommand as hs, ToggleLinePointsCommand as ps, ToggleStackTotalsCommand as ga, UpdateAnnotationCommand as he, alignUnitFractions as ms, areAnchorsEqual as va, areEditTargetsEqual as fa, areEndpointsComparable as gs, buildEditMenuTriggerRegion as vs, buildLayerStyleAddress as fs, buildObservationPredicate as bs, buildObservationsTarget as wt, buildObservationsTargetAtValue as ba, canAnchorDirectLabels as ys, canBecomeCombo as Ss, canBecomeHeatmap as Cs, clampAnnotationTranslation as xs, combineKindStyleDeclarations as Wn, computeArrow as ya, createObservationAnchorBuilder as ws, createObservationAnchorParser as Ts, createStyleResolver as As, createValueFormatter as Sa, createXValueReader as ks, filterLayersByGeoms as Ut, findAnnotation as Ls, findAverageLineLayer as Ps, findAxisGuide as Is, findCompanionLayers as Ca, findGoalLineLayer as Es, findHighlightsAtObservation as Os, findHostLayer as Ms, findLayerByGeom as xa, findLayerById as ve, findObservationAttachment as Ns, findStyleRule as Ae, findTrendLineLayer as Rs, formatDifferenceLabel as Ds, getBoundingRect as Kt, getGroupVariables as _s, getXBand as Fs, getYBand as zs, hasMainAxisBand as Bs, hasMultipleGroups as Hs, inferDefaultDifferenceArrowEndpoints as Gs, inferDifferenceArrowEndpoints as Vs, isComboChartType as Ee, isCompanionLayer as wa, isObservationAttachmentKind as $s, isPointWithinEditMenuTrigger as vn, isSafeUrl as Ws, isZeroAnchoredAxis as Ta, measureObservationsBoxes as Aa, projectAnchorToPanel as dt, readBroadestObservationsScope as Us, readChartType as ka, readComboLineLayerId as Ks, readCompanionRowsAtScopeKey as qs, readConstantValue as Xs, readEditTargetKey as Tt, readGeomColor as js, readHighlightDimStyle as Zs, readMainAxis as Ys, readMappableAesthetics as Js, readMappedVariable as Qs, readObservationIndex as La, readObservationsColorRoute as ec, readPaletteChoices as tc, readPresentedObservationsColor as nc, readReachableLevels as rc, readRowScopeKey as ac, readRowsAtScopeKey as oc, readScopeXVariable as ic, readStyleCoord as De, readStyleRulesBeneath as lc, readVariableName as At, resolveArrowAnnotationStyle as fn, resolveBarBandFraction as sc, resolveComparisonBasis as cc, resolveDifferenceArrowAnnotationStyle as dc, resolveEditOutlineStyle as uc, resolveObservationPoint as Pa, resolveObservationsTarget as Un, stepDifferenceArrowEndpoint as hc, toDashPreset as qt, toPaintColor as ut, toPanelCursor as kt } from "@graphysdk/viz-engine";
3
+ import { Fragment as pc, createContext as _e, memo as Ia, useCallback as ae, useContext as ye, useEffect as z, useId as ke, useLayoutEffect as Me, useMemo as E, useRef as ne, useState as Q } from "react";
4
4
  import { Fragment as q, jsx as r, jsxs as g } from "react/jsx-runtime";
5
5
  import { motion as mc } from "motion/react";
6
6
  import { useShallow as fe } from "zustand/react/shallow";
7
7
  import { assignInlineVars as Pe } from "@vanilla-extract/dynamic";
8
- import { createPortal as Ia } from "react-dom";
8
+ import { createPortal as Ea } from "react-dom";
9
9
  import be from "clsx";
10
10
  import { clamp as $e } from "lodash-es";
11
11
  import { autoUpdate as gc, flip as vc, offset as fc, shift as bc, useFloating as yc } from "@floating-ui/react-dom";
12
- import { Extension as Ea } from "@tiptap/core";
12
+ import { Extension as Oa } from "@tiptap/core";
13
13
  import { Bold as Sc } from "@tiptap/extension-bold";
14
14
  import { Document as ht } from "@tiptap/extension-document";
15
15
  import { HardBreak as Cc } from "@tiptap/extension-hard-break";
@@ -18,18 +18,18 @@ import { Italic as wc } from "@tiptap/extension-italic";
18
18
  import { Link as Tc } from "@tiptap/extension-link";
19
19
  import { Text as Ac } from "@tiptap/extension-text";
20
20
  import { TextAlign as kc } from "@tiptap/extension-text-align";
21
- import { Color as Lc, FontFamily as Oa, TextStyle as Pc } from "@tiptap/extension-text-style";
21
+ import { Color as Lc, FontFamily as Ma, TextStyle as Pc } from "@tiptap/extension-text-style";
22
22
  import { Underline as Ic } from "@tiptap/extension-underline";
23
23
  import { Placeholder as bn, UndoRedo as Ec } from "@tiptap/extensions";
24
- import { Paragraph as Ma } from "@tiptap/extension-paragraph";
25
- import { EditorContent as Na, useEditor as Oc, useEditorState as Mc } from "@tiptap/react";
24
+ import { Paragraph as Na } from "@tiptap/extension-paragraph";
25
+ import { EditorContent as Ra, useEditor as Oc, useEditorState as Mc } from "@tiptap/react";
26
26
  import { Toolbar as Se } from "@base-ui/react/toolbar";
27
27
  import { Tooltip as se } from "@base-ui/react/tooltip";
28
28
  import { Popover as Y } from "@base-ui/react/popover";
29
29
  import { HexColorInput as Nc, HexColorPicker as Rc } from "react-colorful";
30
30
  import { NumberField as Kn } from "@base-ui/react/number-field";
31
- import { Radio as Ra } from "@base-ui/react/radio";
32
- import { RadioGroup as Da } from "@base-ui/react/radio-group";
31
+ import { Radio as Da } from "@base-ui/react/radio";
32
+ import { RadioGroup as _a } from "@base-ui/react/radio-group";
33
33
  import { Select as me } from "@base-ui/react/select";
34
34
  import { Slider as ge } from "@base-ui/react/slider";
35
35
  import { Switch as qn } from "@base-ui/react/switch";
@@ -2444,17 +2444,17 @@ import './editable.css';var zc = {
2444
2444
  "en-US": qc,
2445
2445
  ar: Gc,
2446
2446
  "pt-PT": Yc
2447
- }, Qc = [Jc, pl], ed = ({ children: e, ...t }) => /* @__PURE__ */ r($i, {
2447
+ }, Qc = [Jc, ml], ed = ({ children: e, ...t }) => /* @__PURE__ */ r(Wi, {
2448
2448
  dictionaries: Qc,
2449
2449
  ...t,
2450
2450
  children: e
2451
- }), td = "data-variant", _a = Ma.extend({ addAttributes() {
2451
+ }), td = "data-variant", Fa = Na.extend({ addAttributes() {
2452
2452
  return { variant: {
2453
2453
  default: null,
2454
2454
  parseHTML: (e) => e.getAttribute("data-variant") ?? null,
2455
2455
  renderHTML: (e) => e.variant ? { [td]: e.variant } : {}
2456
2456
  } };
2457
- } }), nd = Ea.create({
2457
+ } }), nd = Oa.create({
2458
2458
  name: "preventBackspaceAcrossTitleBoundary",
2459
2459
  addOptions() {
2460
2460
  return { isTitleVisible: !0 };
@@ -2492,9 +2492,9 @@ import './editable.css';var zc = {
2492
2492
  isTitleVisible: n,
2493
2493
  isSubtitleVisible: a
2494
2494
  }),
2495
- _a,
2495
+ Fa,
2496
2496
  ...yn(),
2497
- Oa,
2497
+ Ma,
2498
2498
  nd.configure({ isTitleVisible: n }),
2499
2499
  bn.configure({
2500
2500
  showOnlyCurrent: !1,
@@ -2506,9 +2506,9 @@ import './editable.css';var zc = {
2506
2506
  })
2507
2507
  ], ad = ({ placeholder: e }) => [
2508
2508
  ht,
2509
- _a,
2509
+ Fa,
2510
2510
  ...yn(),
2511
- Oa,
2511
+ Ma,
2512
2512
  bn.configure({
2513
2513
  showOnlyCurrent: !1,
2514
2514
  placeholder: ({ pos: t }) => t === 0 ? e : ""
@@ -2527,8 +2527,8 @@ import './editable.css';var zc = {
2527
2527
  focus: "color-mix(in srgb, transparent, var(--graphy-editor-text, var(--graphy-editor-default-text)) 55.00000000000001%)",
2528
2528
  focusWidth: "2px",
2529
2529
  shadow: "var(--graphy-editor-default-shadow)"
2530
- }, Fa = _e(null), za = ({ labelId: e, controlId: t, children: n }) => {
2531
- const a = I(() => {
2530
+ }, za = _e(null), Ba = ({ labelId: e, controlId: t, children: n }) => {
2531
+ const a = E(() => {
2532
2532
  let o = null;
2533
2533
  return {
2534
2534
  labelId: e,
@@ -2536,26 +2536,26 @@ import './editable.css';var zc = {
2536
2536
  claimControlId: (i) => (o ??= i, o === i)
2537
2537
  };
2538
2538
  }, [e, t]);
2539
- return /* @__PURE__ */ r(Fa.Provider, {
2539
+ return /* @__PURE__ */ r(za.Provider, {
2540
2540
  value: a,
2541
2541
  children: n
2542
2542
  });
2543
2543
  }, Ce = ({ id: e, ariaLabel: t, ariaLabelledBy: n }, a = !0) => {
2544
- const o = ye(Fa), i = ke(), [l] = Q(() => a ? o?.claimControlId(i) ?? !1 : !1), s = e ?? (l ? o?.controlId : void 0), c = n ?? (t === void 0 ? o?.labelId : void 0);
2544
+ const o = ye(za), i = ke(), [l] = Q(() => a ? o?.claimControlId(i) ?? !1 : !1), s = e ?? (l ? o?.controlId : void 0), c = n ?? (t === void 0 ? o?.labelId : void 0);
2545
2545
  return {
2546
2546
  ...s !== void 0 && { id: s },
2547
2547
  ...t !== void 0 && { "aria-label": t },
2548
2548
  ...c !== void 0 && { "aria-labelledby": c }
2549
2549
  };
2550
- }, ld = "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))", Ba = "_14ty2ng0", Xn = "_14ty2ng1", sd = "_14ty2ng2", cd = "_14ty2ng3", Ha = "_14ty2ng4";
2551
- var Ga = "transparent", Va = (e) => e === "transparent" ? {
2550
+ }, ld = "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))", Ha = "_14ty2ng0", Xn = "_14ty2ng1", sd = "_14ty2ng2", cd = "_14ty2ng3", Ga = "_14ty2ng4";
2551
+ var Va = "transparent", $a = (e) => e === "transparent" ? {
2552
2552
  background: ld,
2553
2553
  border: `1px solid ${ce.border100}`
2554
2554
  } : {
2555
2555
  background: e,
2556
2556
  border: `1px solid ${id.border}`
2557
2557
  }, dd = ({ title: e, colors: t, value: n, onChange: a, trailing: o, isClearable: i = !1, isDisabled: l, id: s, ariaLabel: c, ariaLabelledBy: h }) => {
2558
- const d = P(), u = Ce({
2558
+ const d = I(), u = Ce({
2559
2559
  id: s,
2560
2560
  ariaLabel: c,
2561
2561
  ariaLabelledBy: h
@@ -2563,17 +2563,17 @@ var Ga = "transparent", Va = (e) => e === "transparent" ? {
2563
2563
  type: "button",
2564
2564
  "aria-label": m === "transparent" ? d("graph.colorDropdown.transparent") : m,
2565
2565
  className: cd,
2566
- "data-active": $a(m, n),
2566
+ "data-active": Wa(m, n),
2567
2567
  disabled: l,
2568
2568
  onMouseDown: (f) => f.preventDefault(),
2569
2569
  onClick: () => a(m),
2570
2570
  children: /* @__PURE__ */ r("span", {
2571
- className: Ha,
2572
- style: Va(m)
2571
+ className: Ga,
2572
+ style: $a(m)
2573
2573
  })
2574
2574
  }, m);
2575
2575
  return /* @__PURE__ */ g("div", {
2576
- className: Ba,
2576
+ className: Ha,
2577
2577
  children: [e !== void 0 && /* @__PURE__ */ r("div", {
2578
2578
  className: "_14ty2ng1",
2579
2579
  children: e
@@ -2593,7 +2593,7 @@ var Ga = "transparent", Va = (e) => e === "transparent" ? {
2593
2593
  })]
2594
2594
  })]
2595
2595
  });
2596
- }, $a = (e, t) => t !== null && e.toLowerCase() === t.toLowerCase();
2596
+ }, Wa = (e, t) => t !== null && e.toLowerCase() === t.toLowerCase();
2597
2597
  var ud = {
2598
2598
  default: "woi4bh4 woi4bh3",
2599
2599
  tile: "woi4bh5 woi4bh3"
@@ -2617,27 +2617,27 @@ var ud = {
2617
2617
  children: e
2618
2618
  })]
2619
2619
  });
2620
- }, pd = "data-graphy-chart-chrome", md = "data-graphy-chart-menu", Sn = { [md]: "" }, Lt = (e) => ({ [pd]: e }), ct = (e, t) => e instanceof Element && e.closest(`[data-graphy-chart-chrome="${CSS.escape(t)}"]`) !== null, Wa = (e) => e instanceof Element && e.closest("[data-graphy-chart-menu]") !== null, Xt = (e) => e instanceof Element && e.closest("[data-graphy-chart-chrome]") !== null, Ua = (e, t, n) => n !== null && vn({
2620
+ }, pd = "data-graphy-chart-chrome", md = "data-graphy-chart-menu", Sn = { [md]: "" }, Lt = (e) => ({ [pd]: e }), ct = (e, t) => e instanceof Element && e.closest(`[data-graphy-chart-chrome="${CSS.escape(t)}"]`) !== null, Ua = (e) => e instanceof Element && e.closest("[data-graphy-chart-menu]") !== null, Xt = (e) => e instanceof Element && e.closest("[data-graphy-chart-chrome]") !== null, Ka = (e, t, n) => n !== null && vn({
2621
2621
  x: e.clientX - t.x,
2622
2622
  y: e.clientY - t.y
2623
- }, n), Xe = (e, t, n) => e instanceof Node && (t.contains(e) || ct(e, n)), gd = "cml7ha0", Ka = _e(null), vd = ({ children: e }) => {
2624
- const { chartId: t } = z(), [n] = Q(ue), [a, o] = Q(null);
2625
- return n === null ? null : /* @__PURE__ */ g(q, { children: [Ia(/* @__PURE__ */ r("div", {
2623
+ }, n), Xe = (e, t, n) => e instanceof Node && (t.contains(e) || ct(e, n)), gd = "cml7ha0", qa = _e(null), vd = ({ children: e }) => {
2624
+ const { chartId: t } = B(), [n] = Q(ue), [a, o] = Q(null);
2625
+ return n === null ? null : /* @__PURE__ */ g(q, { children: [Ea(/* @__PURE__ */ r("div", {
2626
2626
  ref: o,
2627
2627
  className: gd,
2628
2628
  ...Lt(t)
2629
- }), n), /* @__PURE__ */ r(Ka.Provider, {
2629
+ }), n), /* @__PURE__ */ r(qa.Provider, {
2630
2630
  value: a,
2631
2631
  children: e
2632
2632
  })] });
2633
- }, Ze = () => ye(Ka), fd = "_178jeit0", bd = "_178jeit1 _14ty2ng3", yd = "_178jeit2 _14ty2ng4", Sd = "_178jeit3", Cd = "_178jeit4", xd = "_178jeit5", wd = "_178jeit6", Td = "_178jeit7", Ad = {
2633
+ }, Ze = () => ye(qa), fd = "_178jeit0", bd = "_178jeit1 _14ty2ng3", yd = "_178jeit2 _14ty2ng4", Sd = "_178jeit3", Cd = "_178jeit4", xd = "_178jeit5", wd = "_178jeit6", Td = "_178jeit7", Ad = {
2634
2634
  side: "flip",
2635
2635
  align: "shift",
2636
2636
  fallbackAxisSide: "end"
2637
2637
  }, kd = ({ value: e, onChange: t, onCommit: n, popupAttributes: a, variant: o = "default" }) => {
2638
- const i = P(), l = Ze(), [s, c] = Q(!1), h = (p) => {
2638
+ const i = I(), l = Ze(), [s, c] = Q(!1), h = (p) => {
2639
2639
  c(p), p || n?.();
2640
- }, d = e !== null && Gi(e) ? e : "#000000", u = Xr(d) ? d.toUpperCase() : "#000000";
2640
+ }, d = e !== null && Vi(e) ? e : "#000000", u = Xr(d) ? d.toUpperCase() : "#000000";
2641
2641
  return /* @__PURE__ */ g(Y.Root, {
2642
2642
  open: s,
2643
2643
  onOpenChange: h,
@@ -2647,7 +2647,7 @@ var ud = {
2647
2647
  "aria-label": i("graph.colorDropdown.pickCustom"),
2648
2648
  children: /* @__PURE__ */ r("span", { className: yd })
2649
2649
  }) : /* @__PURE__ */ g("div", {
2650
- className: Ba,
2650
+ className: Ha,
2651
2651
  children: [/* @__PURE__ */ r("div", {
2652
2652
  className: Xn,
2653
2653
  children: i("graph.colorDropdown.custom")
@@ -2656,8 +2656,8 @@ var ud = {
2656
2656
  onMouseDown: (p) => p.preventDefault(),
2657
2657
  "aria-label": i("graph.colorDropdown.pickCustom"),
2658
2658
  children: [/* @__PURE__ */ r("span", {
2659
- className: Ha,
2660
- style: Va(d)
2659
+ className: Ga,
2660
+ style: $a(d)
2661
2661
  }), /* @__PURE__ */ r("span", {
2662
2662
  className: Cd,
2663
2663
  children: u
@@ -2703,18 +2703,18 @@ var ud = {
2703
2703
  const e = ye(Cn);
2704
2704
  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>.");
2705
2705
  return e;
2706
- }, qa = ({ children: e, onKeyDown: t, ...n }) => {
2706
+ }, Xa = ({ children: e, onKeyDown: t, ...n }) => {
2707
2707
  const a = ye(Cn);
2708
2708
  return /* @__PURE__ */ r("div", {
2709
2709
  onKeyDown: (i) => {
2710
2710
  if (t?.(i), !a || i.defaultPrevented) return;
2711
- const l = ol(i.nativeEvent);
2711
+ const l = il(i.nativeEvent);
2712
2712
  l && (i.preventDefault(), l === "undo" ? a.undo() : a.redo());
2713
2713
  },
2714
2714
  ...n,
2715
2715
  children: e
2716
2716
  });
2717
- }, Xa = "keyboard", Pt = (e) => {
2717
+ }, ja = "keyboard", Pt = (e) => {
2718
2718
  const t = ne(!1), n = ne(!1), a = () => {
2719
2719
  t.current = !1, n.current && (n.current = !1, e?.());
2720
2720
  };
@@ -2753,15 +2753,15 @@ var Ed = ({ value: e, onChange: t, onCommit: n, min: a, max: o, step: i, placeho
2753
2753
  return /* @__PURE__ */ r(Kn.Root, {
2754
2754
  className: Ld,
2755
2755
  value: e,
2756
- onValueChange: (w) => t(w),
2757
- onValueCommitted: (w, x) => {
2758
- f(x.reason === Xa);
2756
+ onValueChange: (x) => t(x),
2757
+ onValueCommitted: (x, w) => {
2758
+ f(w.reason === ja);
2759
2759
  },
2760
2760
  min: a,
2761
2761
  max: o,
2762
2762
  step: i,
2763
2763
  disabled: h,
2764
- children: /* @__PURE__ */ g(qa, {
2764
+ children: /* @__PURE__ */ g(Xa, {
2765
2765
  className: Pd,
2766
2766
  "data-error": d === !0,
2767
2767
  "data-disabled": h === !0 ? "" : void 0,
@@ -2787,18 +2787,18 @@ var Ed = ({ value: e, onChange: t, onCommit: n, min: a, max: o, step: i, placeho
2787
2787
  }, xn = ({ children: e }) => {
2788
2788
  const { themeValues: t } = St();
2789
2789
  return /* @__PURE__ */ r(ie, {
2790
- style: I(() => Pe({
2790
+ style: E(() => Pe({
2791
2791
  [ce.fontFamily]: t.fontFamily,
2792
2792
  [ce.textScale]: t.textScale
2793
2793
  }), [t]),
2794
2794
  children: e
2795
2795
  });
2796
2796
  };
2797
- var ja = "srewh00", Od = "srewh01", Md = {
2797
+ var Za = "srewh00", Od = "srewh01", Md = {
2798
2798
  pointer: null,
2799
2799
  focus: null,
2800
2800
  last: "pointer"
2801
- }, Za = _e({
2801
+ }, Ya = _e({
2802
2802
  isHovered: !1,
2803
2803
  isDismissed: !1,
2804
2804
  reachedTooltipId: null,
@@ -2820,7 +2820,7 @@ var ja = "srewh00", Od = "srewh01", Md = {
2820
2820
  ...b,
2821
2821
  [f]: null
2822
2822
  } : b);
2823
- }, []), d = ae(() => i(!0), []), u = Nd(l), p = I(() => ({
2823
+ }, []), d = ae(() => i(!0), []), u = Nd(l), p = E(() => ({
2824
2824
  isHovered: n,
2825
2825
  isDismissed: o,
2826
2826
  reachedTooltipId: u,
@@ -2841,14 +2841,14 @@ var ja = "srewh00", Od = "srewh01", Md = {
2841
2841
  m.pointerType !== "touch" && (a(!0), i(!1));
2842
2842
  },
2843
2843
  onPointerLeave: () => a(!1),
2844
- children: /* @__PURE__ */ r(Za.Provider, {
2844
+ children: /* @__PURE__ */ r(Ya.Provider, {
2845
2845
  value: p,
2846
2846
  children: t
2847
2847
  })
2848
2848
  });
2849
- }, Ya = ({ label: e, isChecked: t = !1, children: n }) => {
2850
- const { isHovered: a, isDismissed: o, reachedTooltipId: i, reach: l, release: s, dismiss: c } = ye(Za), h = ke(), [d, u] = Q(!1), p = a ? !o && (i === h || t && i === null) : d;
2851
- _(() => () => {
2849
+ }, Ja = ({ label: e, isChecked: t = !1, children: n }) => {
2850
+ const { isHovered: a, isDismissed: o, reachedTooltipId: i, reach: l, release: s, dismiss: c } = ye(Ya), h = ke(), [d, u] = Q(!1), p = a ? !o && (i === h || t && i === null) : d;
2851
+ z(() => () => {
2852
2852
  s(h, "pointer"), s(h, "focus");
2853
2853
  }, [h, s]);
2854
2854
  const v = (m, f) => {
@@ -2871,7 +2871,7 @@ var ja = "srewh00", Od = "srewh01", Md = {
2871
2871
  sideOffset: 6,
2872
2872
  className: Od,
2873
2873
  children: /* @__PURE__ */ r(se.Popup, {
2874
- className: ja,
2874
+ className: Za,
2875
2875
  children: e
2876
2876
  })
2877
2877
  }) })
@@ -2891,7 +2891,7 @@ var _d = 6, Fd = ({ options: e, value: t, onChange: n, onCommit: a, columns: o,
2891
2891
  ariaLabel: s,
2892
2892
  ariaLabelledBy: c
2893
2893
  }), u = i === "tile", p = i === "swatch", v = i === "icon", { commitAfterChange: m, gestureHandlers: f } = Pt(a);
2894
- return /* @__PURE__ */ r(Da, {
2894
+ return /* @__PURE__ */ r(_a, {
2895
2895
  className: be(Rd, zd(o ?? e.length), v && "_1b7s5f9"),
2896
2896
  value: t,
2897
2897
  onValueChange: (b) => {
@@ -2901,7 +2901,7 @@ var _d = 6, Fd = ({ options: e, value: t, onChange: n, onCommit: a, columns: o,
2901
2901
  disabled: l,
2902
2902
  ...d,
2903
2903
  children: e.map((b) => {
2904
- const w = /* @__PURE__ */ g(Ra.Root, {
2904
+ const x = /* @__PURE__ */ g(Da.Root, {
2905
2905
  value: b.value,
2906
2906
  disabled: b.isDisabled,
2907
2907
  className: be(Dd, p && "_1b7s5f8", v && "_1b7s5fa"),
@@ -2915,11 +2915,11 @@ var _d = 6, Fd = ({ options: e, value: t, onChange: n, onCommit: a, columns: o,
2915
2915
  children: b.label
2916
2916
  })]
2917
2917
  }, b.value);
2918
- return v ? /* @__PURE__ */ r(Ya, {
2918
+ return v ? /* @__PURE__ */ r(Ja, {
2919
2919
  label: b.label,
2920
2920
  isChecked: b.value === t,
2921
- children: w
2922
- }, b.value) : w;
2921
+ children: x
2922
+ }, b.value) : x;
2923
2923
  })
2924
2924
  });
2925
2925
  }, zd = (e) => {
@@ -2937,7 +2937,7 @@ var _d = 6, Fd = ({ options: e, value: t, onChange: n, onCommit: a, columns: o,
2937
2937
  default:
2938
2938
  return He[6];
2939
2939
  }
2940
- }, Ja = (e) => /* @__PURE__ */ r(L, {
2940
+ }, Qa = (e) => /* @__PURE__ */ r(L, {
2941
2941
  ...e,
2942
2942
  children: /* @__PURE__ */ r("g", {
2943
2943
  stroke: "currentColor",
@@ -3004,7 +3004,7 @@ var Kd = ({ options: e, value: t, onChange: n, placeholder: a, isDisabled: o, ha
3004
3004
  }),
3005
3005
  /* @__PURE__ */ r(me.ItemIndicator, {
3006
3006
  className: jn,
3007
- children: /* @__PURE__ */ r(Ja, { size: "sm" })
3007
+ children: /* @__PURE__ */ r(Qa, { size: "sm" })
3008
3008
  })
3009
3009
  ]
3010
3010
  }, d.value))
@@ -3027,8 +3027,8 @@ var tu = ({ value: e, onChange: t, onCommit: n, min: a, max: o, step: i, suffix:
3027
3027
  className: Zd,
3028
3028
  value: e,
3029
3029
  onValueChange: (b) => t(b),
3030
- onValueCommitted: (b, w) => {
3031
- m(w.reason === Xa);
3030
+ onValueCommitted: (b, x) => {
3031
+ m(x.reason === ja);
3032
3032
  },
3033
3033
  min: a,
3034
3034
  max: o,
@@ -3070,7 +3070,7 @@ var tu = ({ value: e, onChange: t, onCommit: n, min: a, max: o, step: i, suffix:
3070
3070
  ariaLabel: l,
3071
3071
  ariaLabelledBy: s
3072
3072
  });
3073
- return /* @__PURE__ */ r(qa, {
3073
+ return /* @__PURE__ */ r(Xa, {
3074
3074
  className: lu,
3075
3075
  "data-error": i === !0,
3076
3076
  children: /* @__PURE__ */ r(Dc, {
@@ -3085,13 +3085,13 @@ var tu = ({ value: e, onChange: t, onCommit: n, min: a, max: o, step: i, suffix:
3085
3085
  })
3086
3086
  });
3087
3087
  }, cu = "cnu9yl0", du = "cnu9yl1";
3088
- var Qa = ({ options: e, value: t, onChange: n, onCommit: a, itemLayout: o = "inline", hasEqualWidths: i = !1, isDisabled: l, ariaLabel: s, ariaLabelledBy: c, id: h }) => {
3088
+ var eo = ({ options: e, value: t, onChange: n, onCommit: a, itemLayout: o = "inline", hasEqualWidths: i = !1, isDisabled: l, ariaLabel: s, ariaLabelledBy: c, id: h }) => {
3089
3089
  const d = Ce({
3090
3090
  id: h,
3091
3091
  ariaLabel: s,
3092
3092
  ariaLabelledBy: c
3093
3093
  }), u = o === "stacked", { commitAfterChange: p, gestureHandlers: v } = Pt(a);
3094
- return /* @__PURE__ */ r(Da, {
3094
+ return /* @__PURE__ */ r(_a, {
3095
3095
  className: cu,
3096
3096
  value: t,
3097
3097
  onValueChange: (m) => {
@@ -3101,28 +3101,28 @@ var Qa = ({ options: e, value: t, onChange: n, onCommit: a, itemLayout: o = "inl
3101
3101
  disabled: l,
3102
3102
  ...d,
3103
3103
  children: e.map((m) => {
3104
- const f = uu(m, u), b = /* @__PURE__ */ g(Ra.Root, {
3104
+ const f = uu(m, u), b = /* @__PURE__ */ g(Da.Root, {
3105
3105
  value: m.value,
3106
3106
  disabled: m.isDisabled,
3107
3107
  className: be(du, u && "cnu9yl3", i && "cnu9yl2"),
3108
3108
  "aria-label": f,
3109
- children: [m.icon, eo(m, u) && /* @__PURE__ */ r("span", {
3109
+ children: [m.icon, to(m, u) && /* @__PURE__ */ r("span", {
3110
3110
  className: "cnu9yl4",
3111
3111
  children: m.label
3112
3112
  })]
3113
3113
  }, m.value);
3114
- return f === void 0 ? b : /* @__PURE__ */ r(Ya, {
3114
+ return f === void 0 ? b : /* @__PURE__ */ r(Ja, {
3115
3115
  label: f,
3116
3116
  isChecked: m.value === t,
3117
3117
  children: b
3118
3118
  }, m.value);
3119
3119
  })
3120
3120
  });
3121
- }, eo = (e, t) => e.icon === void 0 || t, uu = (e, t) => {
3122
- if (!eo(e, t))
3121
+ }, to = (e, t) => e.icon === void 0 || t, uu = (e, t) => {
3122
+ if (!to(e, t))
3123
3123
  return e.label;
3124
3124
  }, hu = {
3125
- ToggleGroup: Qa,
3125
+ ToggleGroup: eo,
3126
3126
  Switch: ou,
3127
3127
  Slider: tu,
3128
3128
  RadioGrid: Fd,
@@ -3133,7 +3133,7 @@ var Qa = ({ options: e, value: t, onChange: n, onCommit: a, itemLayout: o = "inl
3133
3133
  ColorSwatches: dd,
3134
3134
  CustomColor: kd
3135
3135
  }, Zt = _e(hu), pu = ({ controls: e, children: t }) => {
3136
- const n = ye(Zt), a = I(() => ({
3136
+ const n = ye(Zt), a = E(() => ({
3137
3137
  ToggleGroup: e?.ToggleGroup ?? n.ToggleGroup,
3138
3138
  Switch: e?.Switch ?? n.Switch,
3139
3139
  Slider: e?.Slider ?? n.Slider,
@@ -3161,7 +3161,7 @@ var Qa = ({ options: e, value: t, onChange: n, onCommit: a, itemLayout: o = "inl
3161
3161
  value: a,
3162
3162
  children: t
3163
3163
  });
3164
- }, B = () => ye(Zt);
3164
+ }, H = () => ye(Zt);
3165
3165
  var mu = "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))", gu = "d0bl00";
3166
3166
  var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2", Cu = "owf1yg3", xu = "owf1yg4", wu = 0.01, Tu = ({ value: e, onChange: t, label: n }) => /* @__PURE__ */ r(ge.Root, {
3167
3167
  className: bu,
@@ -3181,7 +3181,7 @@ var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2"
3181
3181
  })
3182
3182
  })
3183
3183
  }), Yt = Wr.map((e) => ce[e]), Au = Object.fromEntries(Wr.map((e) => [ce[e], e])), ku = (e) => Yt.some((t) => t.toLowerCase() === e.toLowerCase()), Lu = ({ color: e, onChange: t, isOpen: n, onOpenChange: a, children: o, label: i, popupAttributes: l, opacity: s, onOpacityChange: c, hasTransparentOption: h = !1 }) => {
3184
- const d = P(), { ColorSwatches: u } = B(), p = Eu(), v = h ? [Ga, ...Yt] : Yt, m = (f) => {
3184
+ const d = I(), { ColorSwatches: u } = H(), p = Eu(), v = h ? [Va, ...Yt] : Yt, m = (f) => {
3185
3185
  t(f), a(!1);
3186
3186
  };
3187
3187
  return /* @__PURE__ */ g(Y.Root, {
@@ -3245,7 +3245,7 @@ var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2"
3245
3245
  const n = Au[e];
3246
3246
  return n === void 0 ? e : t[n];
3247
3247
  }, Iu = ({ value: e, onChange: t, popupAttributes: n }) => {
3248
- const { CustomColor: a } = B(), { themeValues: o } = St();
3248
+ const { CustomColor: a } = H(), { themeValues: o } = St();
3249
3249
  return /* @__PURE__ */ r(a, {
3250
3250
  value: e === null ? null : Pu(e, o),
3251
3251
  onChange: t,
@@ -3253,7 +3253,7 @@ var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2"
3253
3253
  });
3254
3254
  }, Eu = () => {
3255
3255
  const e = R((t) => t.scales.color);
3256
- return I(() => {
3256
+ return E(() => {
3257
3257
  if (!e || e.kind !== "visual") return [];
3258
3258
  const t = /* @__PURE__ */ new Set();
3259
3259
  for (const n of e.domain) {
@@ -3293,7 +3293,7 @@ var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2"
3293
3293
  className: be(Nu, e)
3294
3294
  }), Vu = ({ children: e }) => {
3295
3295
  const t = ue();
3296
- return t === null ? null : Ia(/* @__PURE__ */ r(ie, { children: e }), t);
3296
+ return t === null ? null : Ea(/* @__PURE__ */ r(ie, { children: e }), t);
3297
3297
  }, Z = {
3298
3298
  Portal: Vu,
3299
3299
  Root: Bu,
@@ -3334,8 +3334,8 @@ var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2"
3334
3334
  preview: "Aa",
3335
3335
  fontFamily: Ku
3336
3336
  }
3337
- ], qu = (e) => e ? Jt.find((t) => t.fontFamily === e) ?? null : null, to = "_70l3rt0", no = "_70l3rt1", ro = "_70l3rt3", ao = "_70l3rt4", oo = "_70l3rt5", Xu = ({ editor: e, currentFontFamily: t, isOpen: n, onOpenChange: a }) => {
3338
- const o = P(), i = qu(t) ?? Jt[0], l = (s) => {
3337
+ ], qu = (e) => e ? Jt.find((t) => t.fontFamily === e) ?? null : null, no = "_70l3rt0", ro = "_70l3rt1", ao = "_70l3rt3", oo = "_70l3rt4", io = "_70l3rt5", Xu = ({ editor: e, currentFontFamily: t, isOpen: n, onOpenChange: a }) => {
3338
+ const o = I(), i = qu(t) ?? Jt[0], l = (s) => {
3339
3339
  e.chain().focus().setFontFamily(s.fontFamily).run();
3340
3340
  };
3341
3341
  return /* @__PURE__ */ g(G.Root, {
@@ -3344,10 +3344,10 @@ var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2"
3344
3344
  children: [/* @__PURE__ */ g(G.Trigger, {
3345
3345
  render: /* @__PURE__ */ r(Se.Button, {}),
3346
3346
  "aria-label": o("graph.toolbar.font.ariaLabel"),
3347
- className: to,
3347
+ className: no,
3348
3348
  onMouseDown: (s) => s.preventDefault(),
3349
3349
  children: [/* @__PURE__ */ r("span", {
3350
- className: no,
3350
+ className: ro,
3351
3351
  style: { fontFamily: i?.fontFamily },
3352
3352
  children: i?.preview
3353
3353
  }), /* @__PURE__ */ r(Ye, { size: "sm" })]
@@ -3357,12 +3357,12 @@ var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2"
3357
3357
  side: "bottom",
3358
3358
  align: "start",
3359
3359
  sideOffset: 6,
3360
- className: ro,
3360
+ className: ao,
3361
3361
  children: /* @__PURE__ */ r(G.Popup, {
3362
- className: ao,
3362
+ className: oo,
3363
3363
  onMouseDown: (s) => s.preventDefault(),
3364
3364
  children: Jt.map((s) => /* @__PURE__ */ r(G.Item, {
3365
- className: oo,
3365
+ className: io,
3366
3366
  "data-selected": s.id === i?.id,
3367
3367
  onClick: () => l(s),
3368
3368
  children: /* @__PURE__ */ r("span", {
@@ -3374,7 +3374,7 @@ var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2"
3374
3374
  }) })
3375
3375
  })]
3376
3376
  });
3377
- }, io = {
3377
+ }, lo = {
3378
3378
  id: "text",
3379
3379
  translationKey: "graph.toolbar.heading.text",
3380
3380
  previewFont: ce.fontTextEditorBody
@@ -3384,7 +3384,7 @@ var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2"
3384
3384
  translationKey: "graph.toolbar.heading.caption",
3385
3385
  previewFont: ce.fontTextEditorH6
3386
3386
  },
3387
- io,
3387
+ lo,
3388
3388
  {
3389
3389
  id: "h3",
3390
3390
  translationKey: "graph.toolbar.heading.heading3",
@@ -3401,17 +3401,17 @@ var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2"
3401
3401
  previewFont: ce.fontTextEditorH1
3402
3402
  }
3403
3403
  ], ju = ({ editor: e, activeStyle: t, isOpen: n, onOpenChange: a }) => {
3404
- const o = P(), i = Zn.find((l) => l.id === t) ?? io;
3404
+ const o = I(), i = Zn.find((l) => l.id === t) ?? lo;
3405
3405
  return /* @__PURE__ */ g(G.Root, {
3406
3406
  open: n,
3407
3407
  onOpenChange: a,
3408
3408
  children: [/* @__PURE__ */ g(G.Trigger, {
3409
3409
  render: /* @__PURE__ */ r(Se.Button, {}),
3410
3410
  "aria-label": o("graph.toolbar.heading.ariaLabel"),
3411
- className: to,
3411
+ className: no,
3412
3412
  onMouseDown: (l) => l.preventDefault(),
3413
3413
  children: [/* @__PURE__ */ r("span", {
3414
- className: no,
3414
+ className: ro,
3415
3415
  children: o(i.translationKey)
3416
3416
  }), /* @__PURE__ */ r(Ye, { size: "sm" })]
3417
3417
  }), /* @__PURE__ */ r(G.Portal, {
@@ -3420,12 +3420,12 @@ var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2"
3420
3420
  side: "bottom",
3421
3421
  align: "start",
3422
3422
  sideOffset: 6,
3423
- className: ro,
3423
+ className: ao,
3424
3424
  children: /* @__PURE__ */ r(G.Popup, {
3425
- className: ao,
3425
+ className: oo,
3426
3426
  onMouseDown: (l) => l.preventDefault(),
3427
3427
  children: Zn.map((l) => /* @__PURE__ */ r(G.Item, {
3428
- className: oo,
3428
+ className: io,
3429
3429
  "data-selected": l.id === i.id,
3430
3430
  onClick: () => Zu(e, l.id),
3431
3431
  children: /* @__PURE__ */ r(Yu, {
@@ -3489,8 +3489,8 @@ var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2"
3489
3489
  to: o + l
3490
3490
  };
3491
3491
  }, Yn = (e) => e !== void 0 && /\S/.test(e), nh = "fop13s0", rh = "fop13s1", ah = "fop13s2", oh = "fop13s3", Jn = "fop13s4", ih = ({ editor: e, currentUrl: t, isActive: n, isOpen: a, onOpenChange: o }) => {
3492
- const i = P(), [l, s] = Q(""), c = ne(null);
3493
- _(() => {
3492
+ const i = I(), [l, s] = Q(""), c = ne(null);
3493
+ z(() => {
3494
3494
  a && s(t ?? "");
3495
3495
  }, [a, t]);
3496
3496
  const h = () => {
@@ -3546,7 +3546,7 @@ var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2"
3546
3546
  "aria-label": i("graph.toolbar.link.apply"),
3547
3547
  className: Jn,
3548
3548
  onClick: h,
3549
- children: /* @__PURE__ */ r(Ja, {})
3549
+ children: /* @__PURE__ */ r(Qa, {})
3550
3550
  })
3551
3551
  ]
3552
3552
  })
@@ -3569,7 +3569,7 @@ var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2"
3569
3569
  }
3570
3570
  const o = th(e);
3571
3571
  e.chain().focus().setTextSelection(o).setLink({ href: n }).run();
3572
- }, lo = (e) => /* @__PURE__ */ r(L, {
3572
+ }, so = (e) => /* @__PURE__ */ r(L, {
3573
3573
  ...e,
3574
3574
  children: /* @__PURE__ */ g("g", {
3575
3575
  stroke: "currentColor",
@@ -3582,7 +3582,7 @@ var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2"
3582
3582
  /* @__PURE__ */ r("path", { d: "M19 19H5" })
3583
3583
  ]
3584
3584
  })
3585
- }), so = (e) => /* @__PURE__ */ r(L, {
3585
+ }), co = (e) => /* @__PURE__ */ r(L, {
3586
3586
  ...e,
3587
3587
  children: /* @__PURE__ */ g("g", {
3588
3588
  stroke: "currentColor",
@@ -3595,7 +3595,7 @@ var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2"
3595
3595
  /* @__PURE__ */ r("path", { d: "M21 19H7" })
3596
3596
  ]
3597
3597
  })
3598
- }), co = (e) => /* @__PURE__ */ r(L, {
3598
+ }), uo = (e) => /* @__PURE__ */ r(L, {
3599
3599
  ...e,
3600
3600
  children: /* @__PURE__ */ g("g", {
3601
3601
  stroke: "currentColor",
@@ -3626,31 +3626,31 @@ var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2"
3626
3626
  sideOffset: 6,
3627
3627
  className: ch,
3628
3628
  children: /* @__PURE__ */ r(se.Popup, {
3629
- className: ja,
3629
+ className: Za,
3630
3630
  children: e
3631
3631
  })
3632
3632
  }) })
3633
3633
  })] });
3634
3634
  }, dh = ({ editor: e, activeAlignment: t = "left" }) => {
3635
- const n = P();
3635
+ const n = I();
3636
3636
  return /* @__PURE__ */ g(q, { children: [
3637
3637
  /* @__PURE__ */ r(Ve, {
3638
3638
  label: n("graph.toolbar.textAlign.left"),
3639
3639
  isActive: t === "left",
3640
3640
  onToggle: () => e.chain().focus().setTextAlign("left").run(),
3641
- children: /* @__PURE__ */ r(co, {})
3641
+ children: /* @__PURE__ */ r(uo, {})
3642
3642
  }),
3643
3643
  /* @__PURE__ */ r(Ve, {
3644
3644
  label: n("graph.toolbar.textAlign.center"),
3645
3645
  isActive: t === "center",
3646
3646
  onToggle: () => e.chain().focus().setTextAlign("center").run(),
3647
- children: /* @__PURE__ */ r(lo, {})
3647
+ children: /* @__PURE__ */ r(so, {})
3648
3648
  }),
3649
3649
  /* @__PURE__ */ r(Ve, {
3650
3650
  label: n("graph.toolbar.textAlign.right"),
3651
3651
  isActive: t === "right",
3652
3652
  onToggle: () => e.chain().focus().setTextAlign("right").run(),
3653
- children: /* @__PURE__ */ r(so, {})
3653
+ children: /* @__PURE__ */ r(co, {})
3654
3654
  })
3655
3655
  ] });
3656
3656
  }, uh = "_1u34vl40", hh = ({ editor: e }) => ({
@@ -3664,7 +3664,7 @@ var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2"
3664
3664
  fontSize: ph(e),
3665
3665
  textAlign: mh(e)
3666
3666
  }), ph = (e) => e ? e.isActive("heading", { level: 1 }) ? "h1" : e.isActive("heading", { level: 2 }) ? "h2" : e.isActive("heading", { level: 3 }) ? "h3" : e.isActive("paragraph", { variant: "caption" }) ? "caption" : "text" : "text", mh = (e) => e ? e.isActive({ textAlign: "center" }) ? "center" : e.isActive({ textAlign: "right" }) ? "right" : "left" : "left", gh = 8, vh = 8, fh = ({ editor: e }) => {
3667
- const t = P(), [n, a] = Q(!1), [o, i] = Q(null), l = o !== null, s = (v) => (m) => {
3667
+ const t = I(), [n, a] = Q(!1), [o, i] = Q(null), l = o !== null, s = (v) => (m) => {
3668
3668
  i(m ? v : null);
3669
3669
  }, { refs: c, floatingStyles: h } = yc({
3670
3670
  placement: "top-start",
@@ -3681,13 +3681,13 @@ var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2"
3681
3681
  }), p = ae((v) => {
3682
3682
  d.current = v, c.setFloating(v);
3683
3683
  }, [c]);
3684
- return _(() => {
3684
+ return z(() => {
3685
3685
  e && c.setReference(e.view.dom);
3686
- }, [e, c]), _(() => {
3686
+ }, [e, c]), z(() => {
3687
3687
  if (!e) return;
3688
3688
  const v = () => a(!0), m = ({ event: f }) => {
3689
- const { relatedTarget: b, currentTarget: w } = f, x = b instanceof Node && d.current?.contains(b), C = b instanceof Node && w instanceof Node && w.contains(b);
3690
- !x && !C && a(!1);
3689
+ const { relatedTarget: b, currentTarget: x } = f, w = b instanceof Node && d.current?.contains(b), C = b instanceof Node && x instanceof Node && x.contains(b);
3690
+ !w && !C && a(!1);
3691
3691
  };
3692
3692
  return e.on("focus", v), e.on("blur", m), () => {
3693
3693
  e.off("focus", v), e.off("blur", m);
@@ -3751,14 +3751,14 @@ var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2"
3751
3751
  }) })
3752
3752
  ]
3753
3753
  }) });
3754
- }, bh = "_1uy50v30", uo = ({ editor: e, ariaLabel: t }) => /* @__PURE__ */ g("div", {
3754
+ }, bh = "_1uy50v30", ho = ({ editor: e, ariaLabel: t }) => /* @__PURE__ */ g("div", {
3755
3755
  className: bh,
3756
- children: [/* @__PURE__ */ r(fh, { editor: e }), /* @__PURE__ */ r(Na, {
3756
+ children: [/* @__PURE__ */ r(fh, { editor: e }), /* @__PURE__ */ r(Ra, {
3757
3757
  editor: e,
3758
3758
  "aria-label": t
3759
3759
  })]
3760
3760
  }), yh = 200, wn = ({ content: e, extensions: t, isEditable: n, onUpdate: a, updateDebounceMs: o = yh }) => {
3761
- const i = ne(Qn(e)), l = ne(i.current), s = cl((h) => {
3761
+ const i = ne(Qn(e)), l = ne(i.current), s = dl((h) => {
3762
3762
  l.current = h, a?.(h);
3763
3763
  }, o), c = Oc({
3764
3764
  extensions: t,
@@ -3771,9 +3771,9 @@ var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2"
3771
3771
  s.run(d);
3772
3772
  }
3773
3773
  });
3774
- return _(() => {
3774
+ return z(() => {
3775
3775
  c?.setEditable(n);
3776
- }, [c, n]), _(() => {
3776
+ }, [c, n]), z(() => {
3777
3777
  if (!c) return;
3778
3778
  const h = Qn(e);
3779
3779
  zt(l.current, h) || (l.current = h, !zt(c.getJSON(), h) && (s.cancel(), Sh(c, h)));
@@ -3781,7 +3781,7 @@ var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2"
3781
3781
  c,
3782
3782
  e,
3783
3783
  s
3784
- ]), _(() => () => s.flush(), [s]), c;
3784
+ ]), z(() => () => s.flush(), [s]), c;
3785
3785
  }, Qn = (e) => e === null ? {
3786
3786
  type: "doc",
3787
3787
  content: []
@@ -3805,7 +3805,7 @@ var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2"
3805
3805
  }, zt = (e, t) => JSON.stringify(pt(e)) === JSON.stringify(pt(t)), pt = (e) => Array.isArray(e) ? e.map(pt) : e === null || typeof e != "object" ? e : Object.fromEntries(Object.entries(e).map(([t, n]) => [t, pt(n)]).filter(([, t]) => !Ch(t)).sort(([t], [n]) => String(t).localeCompare(String(n)))), Ch = (e) => e == null || typeof e == "object" && Object.keys(e).length === 0, xh = ({ caption: e, captionStyle: t }) => {
3806
3806
  const { dispatch: n } = le(), a = wn({
3807
3807
  content: e,
3808
- extensions: I(() => ad({ placeholder: "Add caption" }), []),
3808
+ extensions: E(() => ad({ placeholder: "Add caption" }), []),
3809
3809
  isEditable: !0,
3810
3810
  onUpdate: (o) => {
3811
3811
  const i = eh(o) ? null : o;
@@ -3815,14 +3815,14 @@ var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2"
3815
3815
  return /* @__PURE__ */ r("div", {
3816
3816
  "data-testid": "caption-editor",
3817
3817
  style: Ur(t),
3818
- children: /* @__PURE__ */ r(uo, {
3818
+ children: /* @__PURE__ */ r(ho, {
3819
3819
  editor: a,
3820
3820
  ariaLabel: "Chart caption"
3821
3821
  })
3822
3822
  });
3823
3823
  }, wh = (e) => [
3824
3824
  ht,
3825
- Ma,
3825
+ Na,
3826
3826
  ...yn(),
3827
3827
  Ah,
3828
3828
  bn.configure({
@@ -3830,7 +3830,7 @@ var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2"
3830
3830
  placeholder: ({ pos: t }) => t === 0 ? e : ""
3831
3831
  })
3832
3832
  ], Th = ({ annotation: e }) => {
3833
- const t = P(), { dispatch: n } = le(), a = $(), o = I(() => wh(t("graph.annotations.text.placeholder")), [t]), i = wn({
3833
+ const t = I(), { dispatch: n } = le(), a = $(), o = E(() => wh(t("graph.annotations.text.placeholder")), [t]), i = wn({
3834
3834
  content: e.content,
3835
3835
  extensions: o,
3836
3836
  isEditable: !0,
@@ -3842,21 +3842,21 @@ var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2"
3842
3842
  }));
3843
3843
  }
3844
3844
  });
3845
- return _(() => {
3845
+ return z(() => {
3846
3846
  const { setCaretEditor: l } = a.getState();
3847
3847
  return l(i), () => l(null);
3848
- }, [i, a]), _(() => {
3848
+ }, [i, a]), z(() => {
3849
3849
  i?.commands.focus("end", { scrollIntoView: !1 });
3850
- }, [i]), /* @__PURE__ */ r(Na, {
3850
+ }, [i]), /* @__PURE__ */ r(Ra, {
3851
3851
  "aria-label": t("graph.annotations.text.editLabel"),
3852
- className: Xi,
3852
+ className: ji,
3853
3853
  editor: i,
3854
3854
  "data-testid": "text-annotation-editor"
3855
3855
  });
3856
3856
  }, er = (e) => {
3857
- const t = ll(e);
3857
+ const t = sl(e);
3858
3858
  return t === void 0 ? {} : { style: `font-family: ${t}` };
3859
- }, Ah = Ea.create({
3859
+ }, Ah = Oa.create({
3860
3860
  name: "annotationTextStyleAttributes",
3861
3861
  addGlobalAttributes() {
3862
3862
  return [{
@@ -3937,13 +3937,13 @@ var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2"
3937
3937
  lineHeight: "var(--uwf6lt3)",
3938
3938
  textColor: "var(--uwf6lt4)"
3939
3939
  }, Rh = "uwf6lt5", Dh = ({ title: e, isTitleVisible: t, isSubtitleVisible: n, subtitle: a, headingStyle: o, subtitleStyle: i }) => {
3940
- const { dispatch: l } = le(), s = I(() => rd({
3940
+ const { dispatch: l } = le(), s = E(() => rd({
3941
3941
  titlePlaceholder: "Untitled",
3942
3942
  subtitlePlaceholder: "Untitled",
3943
3943
  isTitleVisible: t,
3944
3944
  isSubtitleVisible: n
3945
3945
  }), [t, n]), c = wn({
3946
- content: I(() => Lh({
3946
+ content: E(() => Lh({
3947
3947
  title: e,
3948
3948
  isTitleVisible: t,
3949
3949
  subtitle: a,
@@ -3966,9 +3966,9 @@ var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2"
3966
3966
  "data-testid": "title-editor",
3967
3967
  style: {
3968
3968
  ...Ur(o),
3969
- ...gl(Nh, i)
3969
+ ...vl(Nh, i)
3970
3970
  },
3971
- children: /* @__PURE__ */ r(uo, {
3971
+ children: /* @__PURE__ */ r(ho, {
3972
3972
  editor: c,
3973
3973
  ariaLabel: "Chart title and subtitle"
3974
3974
  })
@@ -3977,10 +3977,10 @@ var vu = "d0bl03", fu = "d0bl04", bu = "owf1yg0", yu = "owf1yg1", Su = "owf1yg2"
3977
3977
  Title: Dh,
3978
3978
  Caption: xh,
3979
3979
  TextAnnotation: Th
3980
- }, ho = (e, t) => {
3980
+ }, po = (e, t) => {
3981
3981
  const { offsetWidth: n } = e;
3982
3982
  return n <= 0 || t <= 0 ? 1 : t / n;
3983
- }, po = (e) => ho(e, e.getBoundingClientRect().width), nr = (e, t) => {
3983
+ }, mo = (e) => po(e, e.getBoundingClientRect().width), nr = (e, t) => {
3984
3984
  const { offsetWidth: n, offsetHeight: a } = e;
3985
3985
  return n <= 0 || a <= 0 ? t : {
3986
3986
  width: n,
@@ -4074,7 +4074,7 @@ var $h = (e, { coordSystem: t, panelRect: n }) => {
4074
4074
  x: s.x + n.x,
4075
4075
  y: s.y + n.y
4076
4076
  })));
4077
- }, Wh = (e, t, n) => Ta({
4077
+ }, Wh = (e, t, n) => Aa({
4078
4078
  layer: {
4079
4079
  ...e.layer,
4080
4080
  data: e.layer.data.take(e.rows)
@@ -4112,7 +4112,7 @@ var $h = (e, { coordSystem: t, panelRect: n }) => {
4112
4112
  return v.from < v.to ? v : p;
4113
4113
  }, Xh = (e) => {
4114
4114
  const [t] = e;
4115
- return t !== void 0 && e.some((n) => !Ri(n, t));
4115
+ return t !== void 0 && e.some((n) => !Di(n, t));
4116
4116
  }, Qt = (e) => ({
4117
4117
  from: e.x,
4118
4118
  to: e.x + e.width
@@ -4126,10 +4126,10 @@ var $h = (e, { coordSystem: t, panelRect: n }) => {
4126
4126
  const u = s.current, p = /* @__PURE__ */ new Map(), m = Bh(h, {
4127
4127
  panelRect: n,
4128
4128
  look: a,
4129
- readGridLineWidth: (w) => Zr(i, w).strokeWidth,
4130
- measurePathBox: (w) => {
4131
- const x = u.get(w) ?? Fh(t.ownerDocument, w);
4132
- return p.set(w, x), x;
4129
+ readGridLineWidth: (x) => Zr(i, x).strokeWidth,
4130
+ measurePathBox: (x) => {
4131
+ const w = u.get(x) ?? Fh(t.ownerDocument, x);
4132
+ return p.set(x, w), w;
4133
4133
  }
4134
4134
  });
4135
4135
  if (s.current = p, m === null) {
@@ -4139,7 +4139,7 @@ var $h = (e, { coordSystem: t, panelRect: n }) => {
4139
4139
  const f = qh($h(h, {
4140
4140
  coordSystem: l,
4141
4141
  panelRect: n
4142
- }), m, It(a)), b = po(t);
4142
+ }), m, It(a)), b = mo(t);
4143
4143
  o.getState().setSelectedOutline({
4144
4144
  target: c,
4145
4145
  frame: m,
@@ -4166,7 +4166,7 @@ var $h = (e, { coordSystem: t, panelRect: n }) => {
4166
4166
  d: e,
4167
4167
  ...a
4168
4168
  }), Qh = ({ pathData: e, source: t, ...n }) => {
4169
- const a = Wi(e, tl, t);
4169
+ const a = Ui(e, nl, t);
4170
4170
  return /* @__PURE__ */ r(mc.path, {
4171
4171
  d: a,
4172
4172
  ...n
@@ -4181,7 +4181,7 @@ var ir = (e, t) => {
4181
4181
  const n = e.parts[0]?.rows[0];
4182
4182
  return n !== void 0 && (t.parts[0]?.rows.includes(n) ?? !1);
4183
4183
  }
4184
- return e.kind === "guide" && t.kind === "guide" ? va(e.target, t.target) : e.kind === "graph" && t.kind === "graph";
4184
+ return e.kind === "guide" && t.kind === "guide" ? fa(e.target, t.target) : e.kind === "graph" && t.kind === "graph";
4185
4185
  }, np = (e, t) => {
4186
4186
  const n = Math.max(e.width, 8), a = 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 - a / 2), l = Math.min(t.width, e.x + e.width / 2 + n / 2), s = Math.min(t.height, e.y + e.height / 2 + a / 2);
4187
4187
  return {
@@ -4194,13 +4194,13 @@ var ir = (e, t) => {
4194
4194
  const { layers: t, parsingLocale: n } = R(fe((u) => ({
4195
4195
  layers: u.layers,
4196
4196
  parsingLocale: u.config.parsingLocale
4197
- }))), a = J((u) => u.editTargetUnderPointer), o = a?.kind === "observations" ? a.observations : null, i = o === null ? void 0 : ve(t, o.layerId), l = o?.target.scope ?? null, s = o === null || i === void 0 ? null : ac(i, o.target.scope, o.observationIndex), c = I(() => i === void 0 || l === null || s === null ? null : op(t, i, l, s), [
4197
+ }))), a = J((u) => u.editTargetUnderPointer), o = a?.kind === "observations" ? a.observations : null, i = o === null ? void 0 : ve(t, o.layerId), l = o?.target.scope ?? null, s = o === null || i === void 0 ? null : ac(i, o.target.scope, o.observationIndex), c = E(() => i === void 0 || l === null || s === null ? null : op(t, i, l, s), [
4198
4198
  t,
4199
4199
  i,
4200
4200
  l,
4201
4201
  s
4202
- ]), h = I(() => c !== null && e !== null && ir(c, e), [c, e]), d = o !== null && i !== void 0 && ip(o, i, n) ? o.observationIndex : null;
4203
- return I(() => {
4202
+ ]), h = E(() => c !== null && e !== null && ir(c, e), [c, e]), d = o !== null && i !== void 0 && ip(o, i, n) ? o.observationIndex : null;
4203
+ return E(() => {
4204
4204
  switch (a?.kind) {
4205
4205
  case "observations": {
4206
4206
  const u = c?.parts[0];
@@ -4243,7 +4243,7 @@ var ir = (e, t) => {
4243
4243
  layer: t,
4244
4244
  rows: oc(t, n, a)
4245
4245
  }];
4246
- for (const i of Sa(t, e)) {
4246
+ for (const i of Ca(t, e)) {
4247
4247
  const l = qs(i, t, n, a);
4248
4248
  l.length > 0 && o.push({
4249
4249
  layer: i,
@@ -4293,12 +4293,12 @@ var ir = (e, t) => {
4293
4293
  });
4294
4294
  }
4295
4295
  }, sp = (e) => {
4296
- const t = `[${Li}="${e.kind}"]`;
4297
- return e.kind !== "axis" ? t : `${t}[${Pi}="${e.axis}"]`;
4296
+ const t = `[${Pi}="${e.kind}"]`;
4297
+ return e.kind !== "axis" ? t : `${t}[${Ii}="${e.axis}"]`;
4298
4298
  }, cp = (e) => {
4299
4299
  const t = /* @__PURE__ */ new Map();
4300
4300
  for (const n of e) {
4301
- const a = Di(n);
4301
+ const a = _i(n);
4302
4302
  a !== null && t.set(a.legendIndex, [...t.get(a.legendIndex) ?? [], n]);
4303
4303
  }
4304
4304
  return t;
@@ -4361,10 +4361,10 @@ var ir = (e, t) => {
4361
4361
  const t = (n) => Number(e?.getAttribute(n) ?? 0);
4362
4362
  return (t("x2") - t("x1")) * (t("y2") - t("y1")) >= 0;
4363
4363
  }, pp = [], mp = (e, { frameElement: t, frameSize: n, panelRect: a, shouldAnimateTransitions: o }) => {
4364
- const i = R((f) => f.coordSystem), l = Hi(), s = Yr(), c = vp(e.kind === "guide" ? e.target : null, {
4364
+ const i = R((f) => f.coordSystem), l = Gi(), s = Yr(), c = vp(e.kind === "guide" ? e.target : null, {
4365
4365
  frameElement: t,
4366
4366
  frameSize: n
4367
- }), h = gp(t, n), d = I(() => ({
4367
+ }), h = gp(t, n), d = E(() => ({
4368
4368
  coordSystem: i,
4369
4369
  panelRect: a,
4370
4370
  resolveRenderer: l,
@@ -4374,12 +4374,12 @@ var ir = (e, t) => {
4374
4374
  a,
4375
4375
  l,
4376
4376
  s
4377
- ]), u = e.kind === "observations" ? e.parts : null, p = e.kind === "observations" ? e.vertex : null, v = I(() => u?.map((f) => lr(f, d, o)) ?? pp, [
4377
+ ]), u = e.kind === "observations" ? e.parts : null, p = e.kind === "observations" ? e.vertex : null, v = E(() => u?.map((f) => lr(f, d, o)) ?? pp, [
4378
4378
  u,
4379
4379
  d,
4380
4380
  o
4381
- ]), m = I(() => p === null ? null : lr(p, d, !1), [p, d]);
4382
- return I(() => {
4381
+ ]), m = E(() => p === null ? null : lr(p, d, !1), [p, d]);
4382
+ return E(() => {
4383
4383
  switch (e.kind) {
4384
4384
  case "observations":
4385
4385
  return {
@@ -4430,7 +4430,7 @@ var ir = (e, t) => {
4430
4430
  kind: "boxes",
4431
4431
  layer: e,
4432
4432
  rows: t,
4433
- boxes: Ta({
4433
+ boxes: Aa({
4434
4434
  layer: s,
4435
4435
  coordSystem: n,
4436
4436
  panelSize: a
@@ -4459,7 +4459,7 @@ var ir = (e, t) => {
4459
4459
  target: d,
4460
4460
  coordType: a,
4461
4461
  legendDisplays: o
4462
- }), v = po(t);
4462
+ }), v = mo(t);
4463
4463
  s(p.map((m) => fp(m, 1 / v)));
4464
4464
  };
4465
4465
  if (h.current) {
@@ -4517,7 +4517,7 @@ var ir = (e, t) => {
4517
4517
  layers: a.layers,
4518
4518
  parsingLocale: a.config.parsingLocale
4519
4519
  })));
4520
- return I(() => e === null ? null : yp(e, t, n), [
4520
+ return E(() => e === null ? null : yp(e, t, n), [
4521
4521
  e,
4522
4522
  t,
4523
4523
  n
@@ -4566,7 +4566,7 @@ var ir = (e, t) => {
4566
4566
  layer: a,
4567
4567
  rows: o
4568
4568
  }];
4569
- for (const l of Sa(a, t)) {
4569
+ for (const l of Ca(a, t)) {
4570
4570
  const s = Un({
4571
4571
  layer: l,
4572
4572
  host: a,
@@ -4586,8 +4586,8 @@ var ir = (e, t) => {
4586
4586
  parts: i,
4587
4587
  vertex: null
4588
4588
  };
4589
- }, Cp = ["x", "y"], xp = Pa(function({ frameElement: t, frameSize: n, panelRect: a, shouldAnimateTransitions: o }) {
4590
- const i = rl(uc, X()), l = bp(), s = ap(l?.outlined ?? null);
4589
+ }, Cp = ["x", "y"], xp = Ia(function({ frameElement: t, frameSize: n, panelRect: a, shouldAnimateTransitions: o }) {
4590
+ const i = al(uc, X()), l = bp(), s = ap(l?.outlined ?? null);
4591
4591
  if (l === null && s === null) return null;
4592
4592
  const c = {
4593
4593
  frameElement: t,
@@ -4705,7 +4705,7 @@ var ir = (e, t) => {
4705
4705
  case "graph":
4706
4706
  return /* @__PURE__ */ r("path", { d: wp(e.frameSize, a, t) });
4707
4707
  }
4708
- }, dr = Pa(function({ part: t, borderRadius: n }) {
4708
+ }, dr = Ia(function({ part: t, borderRadius: n }) {
4709
4709
  return t.kind === "boxes" ? /* @__PURE__ */ r(kp, {
4710
4710
  boxes: t.boxes,
4711
4711
  borderRadius: n
@@ -4734,7 +4734,7 @@ var ir = (e, t) => {
4734
4734
  }, o);
4735
4735
  case "dots":
4736
4736
  return n.centers.length === 0 ? null : /* @__PURE__ */ r("path", {
4737
- d: Ui(n.centers),
4737
+ d: Ki(n.centers),
4738
4738
  "data-geom": t.geom,
4739
4739
  ...tn(n.size)
4740
4740
  }, o);
@@ -4777,7 +4777,7 @@ var ir = (e, t) => {
4777
4777
  height: n.height,
4778
4778
  overflow: "visible",
4779
4779
  children: /* @__PURE__ */ r("line", {
4780
- ...Ai(a, i, n),
4780
+ ...ki(a, i, n),
4781
4781
  stroke: t.stroke,
4782
4782
  strokeWidth: t.strokeWidth,
4783
4783
  strokeDasharray: "4 3",
@@ -4794,10 +4794,10 @@ var ir = (e, t) => {
4794
4794
  };
4795
4795
  }
4796
4796
  return null;
4797
- }, Op = "kwvn4c0", Mp = "kwvn4c1", mo = (e, t) => ({
4797
+ }, Op = "kwvn4c0", Mp = "kwvn4c1", go = (e, t) => ({
4798
4798
  contextElement: e,
4799
4799
  getBoundingClientRect: () => {
4800
- const n = e.getBoundingClientRect(), a = ho(e, n.width);
4800
+ const n = e.getBoundingClientRect(), a = po(e, n.width);
4801
4801
  return new DOMRect(n.left + t.x * a, n.top + t.y * a, t.width * a, t.height * a);
4802
4802
  }
4803
4803
  }), Np = ({ side: e, boundary: t, spans: n, anchor: a, isRightToLeft: o }) => {
@@ -4806,12 +4806,12 @@ var ir = (e, t) => {
4806
4806
  if (e === "left" || e === "right") return ur(i.from - t.y, a.height, t.height);
4807
4807
  const l = o ? t.x + t.width - i.to : i.from - t.x;
4808
4808
  return ur(l, a.width, t.width);
4809
- }, go = () => {
4809
+ }, vo = () => {
4810
4810
  const [e, t] = Q(!1);
4811
- return _(() => {
4811
+ return z(() => {
4812
4812
  t(!0);
4813
4813
  }, []), e;
4814
- }, Rp = (e) => Zi.some((t) => t === e), ur = (e, t, n) => n === 0 ? 0 : e * t / n, Dp = {
4814
+ }, Rp = (e) => Yi.some((t) => t === e), ur = (e, t, n) => n === 0 ? 0 : e * t / n, Dp = {
4815
4815
  x: 8,
4816
4816
  y: 8
4817
4817
  }, _p = {
@@ -4819,13 +4819,13 @@ var ir = (e, t) => {
4819
4819
  align: "shift",
4820
4820
  fallbackAxisSide: "end"
4821
4821
  }, Fp = ({ frameElement: e, boundary: t, spans: n, clearance: a = Dp, onEscape: o, children: i }) => {
4822
- const l = Ze(), s = go(), [c, h] = Q(null), d = ne(null), u = ae((S) => {
4822
+ const l = Ze(), s = vo(), [c, h] = Q(null), d = ne(null), u = ae((S) => {
4823
4823
  d.current = S, h(S);
4824
4824
  }, []), p = ne(null);
4825
4825
  Me(() => () => {
4826
4826
  c?.contains(document.activeElement) && e.focus({ preventScroll: !0 });
4827
4827
  }, [c, e]);
4828
- const { x: v, y: m, width: f, height: b } = t, w = I(() => ({
4828
+ const { x: v, y: m, width: f, height: b } = t, x = E(() => ({
4829
4829
  box: {
4830
4830
  x: v,
4831
4831
  y: m,
@@ -4839,8 +4839,8 @@ var ir = (e, t) => {
4839
4839
  f,
4840
4840
  b,
4841
4841
  n
4842
- ]), x = I(() => mo(e, w.box), [e, w]), C = (S, T) => {
4843
- S || (T.cancel(), T.reason === "escape-key" && o());
4842
+ ]), w = E(() => go(e, x.box), [e, x]), C = (S, P) => {
4843
+ S || (P.cancel(), P.reason === "escape-key" && o());
4844
4844
  };
4845
4845
  return /* @__PURE__ */ r(Y.Root, {
4846
4846
  open: s,
@@ -4850,15 +4850,15 @@ var ir = (e, t) => {
4850
4850
  container: l,
4851
4851
  children: /* @__PURE__ */ r(xn, { children: /* @__PURE__ */ r(Y.Positioner, {
4852
4852
  ref: p,
4853
- anchor: x,
4853
+ anchor: w,
4854
4854
  side: "right",
4855
4855
  align: "start",
4856
4856
  sideOffset: ({ side: S }) => S === "top" || S === "bottom" ? a.y : a.x,
4857
- alignOffset: ({ side: S, anchor: T }) => Np({
4857
+ alignOffset: ({ side: S, anchor: P }) => Np({
4858
4858
  side: S,
4859
- boundary: w.box,
4860
- spans: w.spans,
4861
- anchor: T,
4859
+ boundary: x.box,
4860
+ spans: x.spans,
4861
+ anchor: P,
4862
4862
  isRightToLeft: zp(p.current)
4863
4863
  }),
4864
4864
  collisionAvoidance: _p,
@@ -4902,7 +4902,7 @@ var ir = (e, t) => {
4902
4902
  }), e]
4903
4903
  }), /* @__PURE__ */ r("div", {
4904
4904
  className: pr,
4905
- children: /* @__PURE__ */ r(za, {
4905
+ children: /* @__PURE__ */ r(Ba, {
4906
4906
  labelId: o,
4907
4907
  controlId: i,
4908
4908
  children: a
@@ -4916,24 +4916,24 @@ var ir = (e, t) => {
4916
4916
  axis: e.axis
4917
4917
  });
4918
4918
  }, Gp = (e, t) => e === "ySecondary" || t !== "continuous" && t !== "datetime" ? null : e, Vp = ({ graph: e, axis: t }) => {
4919
- const n = K(e), a = P(), { NumberField: o, TextField: i, ToggleGroup: l } = B(), s = n?.guides.axes.find((T) => T.scaleAestheticKey === t);
4920
- if (_(() => () => e.commands.commit(), [e.commands]), n === null || s?.geometry !== "linear") return null;
4921
- const c = n.scales[t]?.spec.scaleType, h = Gp(t, c), d = n.guides.legends.drawn.some((T) => T.position === "left" || T.position === "right"), u = t === "y" && c === "continuous" && (s.position === "left" || s.position === "right") && !d, p = t === "y" ? n.scales.y?.spec : void 0, v = p?.scaleType === "continuous" ? p : void 0, m = v !== void 0 && (s.position === "left" || s.position === "right") && v.transform !== "log" && !wa(n, "y"), f = v?.domainMin ?? null, b = f === null ? "auto" : f === 0 ? "zero" : "custom", w = v !== void 0 && (s.position === "left" || s.position === "right") && v.transform !== "log", x = v?.domainMax ?? null, C = x === null ? "auto" : "custom", S = (T) => {
4922
- const k = T === "" ? null : T, O = t === "ySecondary" ? {
4919
+ const n = K(e), a = I(), { NumberField: o, TextField: i, ToggleGroup: l } = H(), s = n?.guides.axes.find((T) => T.scaleAestheticKey === t);
4920
+ if (z(() => () => e.commands.commit(), [e.commands]), n === null || s?.geometry !== "linear") return null;
4921
+ const c = n.scales[t]?.spec.scaleType, h = Gp(t, c), d = n.guides.legends.drawn.some((T) => T.position === "left" || T.position === "right"), u = t === "y" && c === "continuous" && (s.position === "left" || s.position === "right") && !d, p = t === "y" ? n.scales.y?.spec : void 0, v = p?.scaleType === "continuous" ? p : void 0, m = v !== void 0 && (s.position === "left" || s.position === "right") && !Ta(n, "y"), f = v?.transform === "log" ? "log" : "linear", b = m && v.transform !== "log", x = v?.domainMin ?? null, w = x === null ? "auto" : x === 0 ? "zero" : "custom", C = v !== void 0 && (s.position === "left" || s.position === "right") && v.transform !== "log", S = v?.domainMax ?? null, P = S === null ? "auto" : "custom", k = (T) => {
4922
+ const F = T === "" ? null : T, D = t === "ySecondary" ? {
4923
4923
  axis: t,
4924
- label: k
4924
+ label: F
4925
4925
  } : {
4926
4926
  axis: t,
4927
- label: k
4927
+ label: F
4928
4928
  };
4929
- e.commands.dispatch(new aa(O), { transient: !0 });
4929
+ e.commands.dispatch(new aa(D), { transient: !0 });
4930
4930
  };
4931
4931
  return /* @__PURE__ */ g(q, { children: [
4932
4932
  /* @__PURE__ */ r(A, {
4933
4933
  label: a("editor.axesPanel.controls.title"),
4934
4934
  children: /* @__PURE__ */ r(i, {
4935
4935
  value: n.config.axes[t]?.label ?? "",
4936
- onChange: S,
4936
+ onChange: k,
4937
4937
  onCommit: e.commands.commit
4938
4938
  })
4939
4939
  }),
@@ -4975,10 +4975,29 @@ var ir = (e, t) => {
4975
4975
  }
4976
4976
  })
4977
4977
  }),
4978
- m && /* @__PURE__ */ g(q, { children: [/* @__PURE__ */ r(A, {
4978
+ m && /* @__PURE__ */ r(A, {
4979
+ label: a("editor.axesPanel.controls.scale"),
4980
+ children: /* @__PURE__ */ r(l, {
4981
+ value: f,
4982
+ options: [{
4983
+ value: "linear",
4984
+ label: a("editor.axesPanel.scale.auto")
4985
+ }, {
4986
+ value: "log",
4987
+ label: a("editor.axesPanel.scale.log")
4988
+ }],
4989
+ onChange: (T) => {
4990
+ e.commands.dispatch(new ha({
4991
+ scaledAesthetic: "y",
4992
+ transform: T === "log" ? "log" : "linear"
4993
+ }));
4994
+ }
4995
+ })
4996
+ }),
4997
+ b && /* @__PURE__ */ g(q, { children: [/* @__PURE__ */ r(A, {
4979
4998
  label: a("editor.axesPanel.controls.startFrom"),
4980
4999
  children: /* @__PURE__ */ r(l, {
4981
- value: b,
5000
+ value: w,
4982
5001
  options: [
4983
5002
  {
4984
5003
  value: "auto",
@@ -4994,17 +5013,17 @@ var ir = (e, t) => {
4994
5013
  }
4995
5014
  ],
4996
5015
  onChange: (T) => {
4997
- const k = n.scales.y?.domain[0], O = T === "auto" ? null : T === "zero" ? 0 : typeof k == "number" ? k : 0;
5016
+ const F = n.scales.y?.domain[0], D = T === "auto" ? null : T === "zero" ? 0 : typeof F == "number" ? F : 0;
4998
5017
  e.commands.dispatch(new Ie({
4999
5018
  scaledAesthetic: "y",
5000
- domainMin: O
5019
+ domainMin: D
5001
5020
  }));
5002
5021
  }
5003
5022
  })
5004
- }), b !== "auto" && /* @__PURE__ */ r(A, {
5023
+ }), w !== "auto" && /* @__PURE__ */ r(A, {
5005
5024
  label: a("editor.axesPanel.controls.value"),
5006
5025
  children: /* @__PURE__ */ r(o, {
5007
- value: f,
5026
+ value: x,
5008
5027
  onChange: (T) => {
5009
5028
  T !== null && e.commands.dispatch(new Ie({
5010
5029
  scaledAesthetic: "y",
@@ -5014,10 +5033,10 @@ var ir = (e, t) => {
5014
5033
  onCommit: e.commands.commit
5015
5034
  })
5016
5035
  })] }),
5017
- w && /* @__PURE__ */ g(q, { children: [/* @__PURE__ */ r(A, {
5036
+ C && /* @__PURE__ */ g(q, { children: [/* @__PURE__ */ r(A, {
5018
5037
  label: a("editor.axesPanel.controls.endAt"),
5019
5038
  children: /* @__PURE__ */ r(l, {
5020
- value: C,
5039
+ value: P,
5021
5040
  options: [{
5022
5041
  value: "auto",
5023
5042
  label: a("editor.axesPanel.endAt.auto")
@@ -5026,17 +5045,17 @@ var ir = (e, t) => {
5026
5045
  label: a("editor.axesPanel.endAt.custom")
5027
5046
  }],
5028
5047
  onChange: (T) => {
5029
- const k = n.scales.y?.domain.at(-1), O = typeof k == "number" ? k : 0;
5048
+ const F = n.scales.y?.domain.at(-1), D = typeof F == "number" ? F : 0;
5030
5049
  e.commands.dispatch(new Ie({
5031
5050
  scaledAesthetic: "y",
5032
- domainMax: T === "custom" ? O : null
5051
+ domainMax: T === "custom" ? D : null
5033
5052
  }));
5034
5053
  }
5035
5054
  })
5036
- }), C === "custom" && /* @__PURE__ */ r(A, {
5055
+ }), P === "custom" && /* @__PURE__ */ r(A, {
5037
5056
  label: a("editor.axesPanel.controls.value"),
5038
5057
  children: /* @__PURE__ */ r(o, {
5039
- value: x,
5058
+ value: S,
5040
5059
  onChange: (T) => {
5041
5060
  T !== null && e.commands.dispatch(new Ie({
5042
5061
  scaledAesthetic: "y",
@@ -5052,7 +5071,7 @@ var ir = (e, t) => {
5052
5071
  supportsPercentages: !1,
5053
5072
  supportsStackTotals: !1,
5054
5073
  supportsCategoryLabels: !1
5055
- }, vo = (e, t, n) => {
5074
+ }, fo = (e, t, n) => {
5056
5075
  if (!n.hasCapability(e.geom, t)) return $p;
5057
5076
  const { showDataLabels: a } = e.dataLabels, o = e.geom === "bar", i = t === "polar";
5058
5077
  return {
@@ -5062,16 +5081,16 @@ var ir = (e, t) => {
5062
5081
  supportsCategoryLabels: o && i && e.position === "fill" && a
5063
5082
  };
5064
5083
  }, Wp = () => {
5065
- const e = R((l) => l.layers), t = R((l) => l.coordSystem.type), n = hl(), a = P(), o = e.filter((l) => l.interactive).map((l) => ({
5084
+ const e = R((l) => l.layers), t = R((l) => l.coordSystem.type), n = pl(), a = I(), o = e.filter((l) => l.interactive).map((l) => ({
5066
5085
  layer: l,
5067
- support: vo(l, t, n)
5086
+ support: fo(l, t, n)
5068
5087
  })), i = (l) => o.filter(({ support: s }) => l(s)).map(({ layer: s }) => s);
5069
5088
  return /* @__PURE__ */ g(q, { children: [
5070
5089
  /* @__PURE__ */ r(nt, {
5071
5090
  label: a("editor.graphPanel.graphOptions.dataLabels"),
5072
5091
  layers: i((l) => l.supportsDataLabels),
5073
5092
  isOn: (l) => l.showDataLabels,
5074
- buildCommand: (l, s) => new pa({
5093
+ buildCommand: (l, s) => new ma({
5075
5094
  layerId: l,
5076
5095
  showDataLabels: s
5077
5096
  })
@@ -5089,7 +5108,7 @@ var ir = (e, t) => {
5089
5108
  label: a("editor.graphPanel.graphOptions.stackTotals"),
5090
5109
  layers: i((l) => l.supportsStackTotals),
5091
5110
  isOn: (l) => l.showStackTotals,
5092
- buildCommand: (l, s) => new ma({
5111
+ buildCommand: (l, s) => new ga({
5093
5112
  layerId: l,
5094
5113
  showStackTotals: s
5095
5114
  })
@@ -5098,17 +5117,17 @@ var ir = (e, t) => {
5098
5117
  label: a("editor.graphPanel.graphOptions.categoryLabels"),
5099
5118
  layers: i((l) => l.supportsCategoryLabels),
5100
5119
  isOn: (l) => l.showCategoryLabels,
5101
- buildCommand: (l, s) => new ha({
5120
+ buildCommand: (l, s) => new pa({
5102
5121
  layerId: l,
5103
5122
  showCategoryLabels: s
5104
5123
  })
5105
5124
  })
5106
5125
  ] });
5107
5126
  }, nt = ({ label: e, layers: t, isOn: n, buildCommand: a }) => {
5108
- const o = le(), { Switch: i } = B();
5127
+ const o = le(), { Switch: i } = H();
5109
5128
  if (t.length === 0) return null;
5110
5129
  const l = (s) => {
5111
- o.dispatch(new Ol({ commands: t.map((c) => a(c.id, s)) }));
5130
+ o.dispatch(new Ml({ commands: t.map((c) => a(c.id, s)) }));
5112
5131
  };
5113
5132
  return /* @__PURE__ */ r(A, {
5114
5133
  label: e,
@@ -5118,9 +5137,9 @@ var ir = (e, t) => {
5118
5137
  })
5119
5138
  });
5120
5139
  }, Up = 6, rt = ({ target: e }) => {
5121
- const { commands: t } = z(), { ColorSwatches: n, CustomColor: a } = B(), o = P(), i = X(), l = R((p) => p), s = ve(l.layers, e.layerId), c = ec(l.spec, e), h = tc(l.scales.color).slice(0, Up);
5122
- _(() => () => t.commit(), [t]);
5123
- const d = I(() => nc({
5140
+ const { commands: t } = B(), { ColorSwatches: n, CustomColor: a } = H(), o = I(), i = X(), l = R((p) => p), s = ve(l.layers, e.layerId), c = ec(l.spec, e), h = tc(l.scales.color).slice(0, Up);
5141
+ z(() => () => t.commit(), [t]);
5142
+ const d = E(() => nc({
5124
5143
  readers: i,
5125
5144
  layers: l.layers,
5126
5145
  target: e,
@@ -5133,7 +5152,7 @@ var ir = (e, t) => {
5133
5152
  ]);
5134
5153
  if (c === null || s === void 0) return null;
5135
5154
  const u = (p, v) => {
5136
- t.dispatch(new es({
5155
+ t.dispatch(new ts({
5137
5156
  target: e,
5138
5157
  color: p
5139
5158
  }), v ? { transient: !0 } : void 0);
@@ -5153,7 +5172,7 @@ var ir = (e, t) => {
5153
5172
  })
5154
5173
  })
5155
5174
  });
5156
- }, Kp = (e, t) => t === null || e.some((n) => $a(n, t)) ? e : [...e, t], qp = (e, t) => {
5175
+ }, Kp = (e, t) => t === null || e.some((n) => Wa(n, t)) ? e : [...e, t], qp = (e, t) => {
5157
5176
  const n = ve(t.layers, e);
5158
5177
  if (n === void 0) return null;
5159
5178
  const a = ve(t.spec.layers, e), o = a === void 0 ? null : Ms(a, t.spec.layers), i = o !== null && o.id !== n.id ? o : n;
@@ -5225,14 +5244,14 @@ var ir = (e, t) => {
5225
5244
  center: "Center",
5226
5245
  end: "End"
5227
5246
  }, Zp = () => {
5228
- const e = R((l) => l.guides.legends.drawn[0]), t = le(), n = P(), { RadioGrid: a } = B();
5247
+ const e = R((l) => l.guides.legends.drawn[0]), t = le(), n = I(), { RadioGrid: a } = H();
5229
5248
  if (e === void 0) return null;
5230
5249
  const o = gr.map((l) => {
5231
5250
  const s = Gt(l);
5232
5251
  return {
5233
5252
  value: s,
5234
5253
  label: n(`editor.overlayMenu.legendPlaces.${s}`),
5235
- icon: /* @__PURE__ */ r(Ii, {
5254
+ icon: /* @__PURE__ */ r(Ei, {
5236
5255
  title: "",
5237
5256
  size: "xs",
5238
5257
  style: { transform: `rotate(${Yp(l)}deg)` }
@@ -5242,7 +5261,7 @@ var ir = (e, t) => {
5242
5261
  };
5243
5262
  }), i = (l) => {
5244
5263
  const s = gr.find((c) => Gt(c) === l);
5245
- s !== void 0 && t.dispatch(new Xl({
5264
+ s !== void 0 && t.dispatch(new jl({
5246
5265
  position: s.position,
5247
5266
  align: s.align
5248
5267
  }), { transient: !0 });
@@ -5301,7 +5320,7 @@ var ir = (e, t) => {
5301
5320
  axis: Hp,
5302
5321
  grid: Vt,
5303
5322
  graph: Wp
5304
- }, e1 = _e([Qp]), fo = (e) => /* @__PURE__ */ g(L, {
5323
+ }, e1 = _e([Qp]), bo = (e) => /* @__PURE__ */ g(L, {
5305
5324
  viewBox: "0 0 16 16",
5306
5325
  ...e,
5307
5326
  children: [
@@ -5340,7 +5359,7 @@ var ir = (e, t) => {
5340
5359
  rx: ".533"
5341
5360
  })
5342
5361
  ]
5343
- }), bo = (e) => /* @__PURE__ */ g(L, {
5362
+ }), yo = (e) => /* @__PURE__ */ g(L, {
5344
5363
  viewBox: "0 0 16 16",
5345
5364
  ...e,
5346
5365
  children: [
@@ -5379,7 +5398,7 @@ var ir = (e, t) => {
5379
5398
  rx: ".533"
5380
5399
  })
5381
5400
  ]
5382
- }), yo = (e) => /* @__PURE__ */ g(L, {
5401
+ }), So = (e) => /* @__PURE__ */ g(L, {
5383
5402
  viewBox: "0 0 16 16",
5384
5403
  ...e,
5385
5404
  children: [
@@ -5418,14 +5437,14 @@ var ir = (e, t) => {
5418
5437
  rx: ".533"
5419
5438
  })
5420
5439
  ]
5421
- }), So = (e) => I(() => {
5440
+ }), Co = (e) => E(() => {
5422
5441
  if (e === null) return {
5423
5442
  options: [],
5424
5443
  findValue: () => {
5425
5444
  }
5426
5445
  };
5427
5446
  const { parsingLocale: t, numberFormat: n } = e.config, a = e.guides.colorGroups.map((o) => {
5428
- const i = ya({
5447
+ const i = Sa({
5429
5448
  valueFormat: o.valueFormat,
5430
5449
  locale: t,
5431
5450
  numberFormat: n
@@ -5458,7 +5477,7 @@ var ir = (e, t) => {
5458
5477
  default:
5459
5478
  return "editor.overlayMenu.thisPoint";
5460
5479
  }
5461
- }, r1 = (e, t, n, a) => ya({
5480
+ }, r1 = (e, t, n, a) => Sa({
5462
5481
  valueFormat: Is(e.guides, "x")?.valueFormat ?? { type: "text" },
5463
5482
  locale: a,
5464
5483
  numberFormat: e.config.numberFormat
@@ -5472,11 +5491,11 @@ var ir = (e, t) => {
5472
5491
  const n = String(e instanceof Date ? e.getTime() : e);
5473
5492
  return t.options.find((a) => a.value === n)?.label ?? n;
5474
5493
  }, l1 = {
5475
- "data-point": fo,
5476
- "x-value": bo,
5477
- series: yo
5494
+ "data-point": bo,
5495
+ "x-value": yo,
5496
+ series: So
5478
5497
  }, s1 = () => {
5479
- const { selectionStore: e } = z(), t = $(), n = P(), a = ea(), o = R((f) => f), i = So(o), l = J((f) => f.pressedObservation), s = I(() => c1({
5498
+ const { selectionStore: e } = B(), t = $(), n = I(), a = ea(), o = R((f) => f), i = Co(o), l = J((f) => f.pressedObservation), s = E(() => c1({
5480
5499
  scene: o,
5481
5500
  pressed: l,
5482
5501
  groupOptions: i,
@@ -5498,25 +5517,25 @@ var ir = (e, t) => {
5498
5517
  icon: /* @__PURE__ */ r(b, {})
5499
5518
  };
5500
5519
  }), m = (f) => {
5501
- const b = h.find((C) => C === f), { parsingLocale: w } = o.config, x = b === void 0 ? null : wt({
5520
+ const b = h.find((C) => C === f), { parsingLocale: x } = o.config, w = b === void 0 ? null : wt({
5502
5521
  layer: c,
5503
5522
  observationIndex: u,
5504
5523
  scope: b,
5505
- parsingLocale: w
5524
+ parsingLocale: x
5506
5525
  });
5507
- x !== null && (t.getState().setPressedObservation({
5526
+ w !== null && (t.getState().setPressedObservation({
5508
5527
  ...s.pressed,
5509
- selectedFor: x
5510
- }), e.getState().setSelection([x]));
5528
+ selectedFor: w
5529
+ }), e.getState().setSelection([w]));
5511
5530
  };
5512
- return /* @__PURE__ */ r(Qa, {
5531
+ return /* @__PURE__ */ r(eo, {
5513
5532
  value: p.scope,
5514
5533
  options: v,
5515
5534
  onChange: m,
5516
5535
  ariaLabel: n("editor.overlayMenu.selection")
5517
5536
  });
5518
5537
  }, c1 = ({ scene: e, pressed: t, groupOptions: n, locale: a, t: o }) => {
5519
- const i = t === null ? null : Oi(t, e.layers, e.config.parsingLocale);
5538
+ const i = t === null ? null : Mi(t, e.layers, e.config.parsingLocale);
5520
5539
  if (t === null || i === null) return null;
5521
5540
  const { layer: l, observation: s } = i, c = rc({
5522
5541
  layer: l,
@@ -5573,7 +5592,7 @@ var ir = (e, t) => {
5573
5592
  return e;
5574
5593
  }
5575
5594
  }, g1 = ({ frameElement: e }) => {
5576
- const t = P(), { selectionStore: n } = z(), a = J((l) => l.selectedOutline), o = Jp(a?.target ?? null);
5595
+ const t = I(), { selectionStore: n } = B(), a = J((l) => l.selectedOutline), o = Jp(a?.target ?? null);
5577
5596
  if (a === null || o === null) return null;
5578
5597
  const i = () => {
5579
5598
  n.getState().clearSelection();
@@ -5593,7 +5612,7 @@ var ir = (e, t) => {
5593
5612
  }), /* @__PURE__ */ r(pc, { children: o }, Tt(a.target))]
5594
5613
  });
5595
5614
  }, v1 = ({ frameRect: e }) => {
5596
- const { targetBoundaryStore: t } = z(), n = J((l) => l.selectedOutline), { left: a, top: o } = e, i = I(() => {
5615
+ const { targetBoundaryStore: t } = B(), n = J((l) => l.selectedOutline), { left: a, top: o } = e, i = E(() => {
5597
5616
  if (n === null) return null;
5598
5617
  const { frame: l, frameSpans: s, frameScale: c } = n;
5599
5618
  return {
@@ -5623,7 +5642,7 @@ var ir = (e, t) => {
5623
5642
  }, at = (e, t, n) => ({
5624
5643
  from: t + e.from * n,
5625
5644
  to: t + e.to * n
5626
- }), Co = (e) => /* @__PURE__ */ g(L, {
5645
+ }), xo = (e) => /* @__PURE__ */ g(L, {
5627
5646
  viewBox: "0 0 16 16",
5628
5647
  ...e,
5629
5648
  children: [
@@ -5649,7 +5668,7 @@ var ir = (e, t) => {
5649
5668
  })
5650
5669
  ]
5651
5670
  });
5652
- var xo = "efjmb40", wo = "efjmb41", Fe = "efjmb42", ze = "efjmb43", f1 = "efjmb44", b1 = "efjmb45", y1 = /* @__PURE__ */ new Set([
5671
+ var wo = "efjmb40", To = "efjmb41", Fe = "efjmb42", ze = "efjmb43", f1 = "efjmb44", b1 = "efjmb45", y1 = /* @__PURE__ */ new Set([
5653
5672
  "item-press",
5654
5673
  "escape-key",
5655
5674
  "outside-press",
@@ -5672,10 +5691,10 @@ var xo = "efjmb40", wo = "efjmb41", Fe = "efjmb42", ze = "efjmb43", f1 = "efjmb4
5672
5691
  side: "right",
5673
5692
  align: "start",
5674
5693
  sideOffset: 4,
5675
- className: xo,
5694
+ className: wo,
5676
5695
  ...Sn,
5677
5696
  children: /* @__PURE__ */ r(Te.Popup, {
5678
- className: wo,
5697
+ className: To,
5679
5698
  children: a
5680
5699
  })
5681
5700
  }) })
@@ -5707,7 +5726,7 @@ var xo = "efjmb40", wo = "efjmb41", Fe = "efjmb42", ze = "efjmb43", f1 = "efjmb4
5707
5726
  };
5708
5727
  return /* @__PURE__ */ r(An, {
5709
5728
  label: e,
5710
- icon: /* @__PURE__ */ r(Co, {}),
5729
+ icon: /* @__PURE__ */ r(xo, {}),
5711
5730
  onOpened: () => {
5712
5731
  requestAnimationFrame(() => i.current?.focus());
5713
5732
  },
@@ -5751,7 +5770,7 @@ var xo = "efjmb40", wo = "efjmb41", Fe = "efjmb42", ze = "efjmb43", f1 = "efjmb4
5751
5770
  fillOpacity: "0.8"
5752
5771
  })
5753
5772
  }), L1 = "relative-difference", P1 = ({ label: e, layer: t, at: n, onRequestClose: a }) => {
5754
- const { dispatch: o } = le(), i = R((c) => c.coordSystem), l = I(() => Vs({
5773
+ const { dispatch: o } = le(), i = R((c) => c.coordSystem), l = E(() => Vs({
5755
5774
  layer: t,
5756
5775
  at: n,
5757
5776
  coordSystem: i
@@ -5831,7 +5850,7 @@ function I1(e, t) {
5831
5850
  }
5832
5851
  var E1 = (e) => {
5833
5852
  const t = At(e.mapping.x);
5834
- return t !== null && t !== yl.x;
5853
+ return t !== null && t !== Sl.x;
5835
5854
  }, O1 = (e) => /* @__PURE__ */ g(L, {
5836
5855
  viewBox: "0 0 16 16",
5837
5856
  ...e,
@@ -6072,19 +6091,19 @@ var E1 = (e) => {
6072
6091
  })
6073
6092
  ]
6074
6093
  }), F1 = {
6075
- bar: fo,
6076
- barGroup: bo,
6094
+ bar: bo,
6095
+ barGroup: yo,
6077
6096
  barStack: O1,
6078
- barSeries: yo,
6097
+ barSeries: So,
6079
6098
  linePoint: M1,
6080
6099
  lineSeries: N1,
6081
6100
  scatterPoint: D1,
6082
6101
  scatterSeries: _1,
6083
6102
  pieSlice: R1
6084
- }, To = ({ labelKey: e }) => {
6103
+ }, Ao = ({ labelKey: e }) => {
6085
6104
  const t = F1[e];
6086
6105
  return /* @__PURE__ */ r(t, {});
6087
- }, Ao = (e) => /* @__PURE__ */ g(L, {
6106
+ }, ko = (e) => /* @__PURE__ */ g(L, {
6088
6107
  viewBox: "0 0 16 16",
6089
6108
  ...e,
6090
6109
  children: [/* @__PURE__ */ r("path", {
@@ -6098,27 +6117,27 @@ var E1 = (e) => {
6098
6117
  fillOpacity: "0.8"
6099
6118
  })]
6100
6119
  }), z1 = ({ label: e, options: t, onSelect: n }) => {
6101
- const a = P();
6120
+ const a = I();
6102
6121
  return /* @__PURE__ */ r(An, {
6103
6122
  label: e,
6104
- icon: /* @__PURE__ */ r(Ao, {}),
6123
+ icon: /* @__PURE__ */ r(ko, {}),
6105
6124
  children: t.map((o) => /* @__PURE__ */ g(Te.Item, {
6106
6125
  className: Fe,
6107
6126
  onClick: () => n(o.scope),
6108
- children: [/* @__PURE__ */ r(To, { labelKey: o.labelKey }), /* @__PURE__ */ r("span", {
6127
+ children: [/* @__PURE__ */ r(Ao, { labelKey: o.labelKey }), /* @__PURE__ */ r("span", {
6109
6128
  className: ze,
6110
6129
  children: a(`graph.annotations.highlights.labels.${o.labelKey}`)
6111
6130
  })]
6112
6131
  }, o.scope))
6113
6132
  });
6114
6133
  }, B1 = ({ label: e, layer: t, observation: n, highlights: a, onRequestClose: o }) => {
6115
- const i = P(), { dispatch: l } = le(), s = R((v) => v.coordSystem), c = I(() => bs(t, n), [t, n]), h = I(() => I1(s, t), [s, t]), d = I(() => {
6134
+ const i = I(), { dispatch: l } = le(), s = R((v) => v.coordSystem), c = E(() => bs(t, n), [t, n]), h = E(() => I1(s, t), [s, t]), d = E(() => {
6116
6135
  const v = new Set(a.map((m) => m.scope));
6117
6136
  return h.filter((m) => !v.has(m.scope));
6118
6137
  }, [h, a]), [u] = d;
6119
6138
  if (c === null || u === void 0) return null;
6120
6139
  const p = (v) => {
6121
- l(new bl({
6140
+ l(new yl({
6122
6141
  predicate: c,
6123
6142
  scope: v,
6124
6143
  layerId: t.id
@@ -6129,7 +6148,7 @@ var E1 = (e) => {
6129
6148
  return /* @__PURE__ */ g(Te.Item, {
6130
6149
  className: Fe,
6131
6150
  onClick: () => p(u.scope),
6132
- children: [/* @__PURE__ */ r(To, { labelKey: u.labelKey }), /* @__PURE__ */ r("span", {
6151
+ children: [/* @__PURE__ */ r(Ao, { labelKey: u.labelKey }), /* @__PURE__ */ r("span", {
6133
6152
  className: ze,
6134
6153
  children: v
6135
6154
  })]
@@ -6140,7 +6159,7 @@ var E1 = (e) => {
6140
6159
  options: d,
6141
6160
  onSelect: p
6142
6161
  });
6143
- }, H1 = "_1aafi1g0", G1 = "_1aafi1g1", ko = ({ children: e }) => /* @__PURE__ */ g("span", {
6162
+ }, H1 = "_1aafi1g0", G1 = "_1aafi1g1", Lo = ({ children: e }) => /* @__PURE__ */ g("span", {
6144
6163
  className: H1,
6145
6164
  "aria-hidden": "true",
6146
6165
  children: [e, /* @__PURE__ */ r("span", { className: G1 })]
@@ -6148,19 +6167,19 @@ var E1 = (e) => {
6148
6167
  const { dispatch: a } = le(), o = t.at(-1);
6149
6168
  if (o === void 0) return null;
6150
6169
  const i = () => {
6151
- a(new Il({ id: o.id })), n();
6170
+ a(new El({ id: o.id })), n();
6152
6171
  };
6153
6172
  return /* @__PURE__ */ g(G.Item, {
6154
6173
  className: Fe,
6155
6174
  onClick: i,
6156
- children: [/* @__PURE__ */ r(ko, { children: /* @__PURE__ */ r(Ao, {}) }), /* @__PURE__ */ r("span", {
6175
+ children: [/* @__PURE__ */ r(Lo, { children: /* @__PURE__ */ r(ko, {}) }), /* @__PURE__ */ r("span", {
6157
6176
  className: ze,
6158
6177
  children: e
6159
6178
  })]
6160
6179
  });
6161
6180
  }, $1 = (e, t) => {
6162
6181
  const n = R((o) => o.spec.highlights), a = R((o) => o.config.parsingLocale);
6163
- return I(() => Os({
6182
+ return E(() => Os({
6164
6183
  layer: e,
6165
6184
  highlights: n,
6166
6185
  observation: t,
@@ -6171,7 +6190,7 @@ var E1 = (e) => {
6171
6190
  t,
6172
6191
  a
6173
6192
  ]);
6174
- }, Lo = (e) => /* @__PURE__ */ g(L, {
6193
+ }, Po = (e) => /* @__PURE__ */ g(L, {
6175
6194
  viewBox: "0 0 16 16",
6176
6195
  ...e,
6177
6196
  children: [
@@ -6204,12 +6223,12 @@ var E1 = (e) => {
6204
6223
  return /* @__PURE__ */ g(G.Item, {
6205
6224
  className: Fe,
6206
6225
  onClick: o,
6207
- children: [/* @__PURE__ */ r(Lo, {}), /* @__PURE__ */ r("span", {
6226
+ children: [/* @__PURE__ */ r(Po, {}), /* @__PURE__ */ r("span", {
6208
6227
  className: ze,
6209
6228
  children: e
6210
6229
  })]
6211
6230
  });
6212
- }, Po = (e) => /* @__PURE__ */ g(L, {
6231
+ }, Io = (e) => /* @__PURE__ */ g(L, {
6213
6232
  viewBox: "0 0 16 16",
6214
6233
  ...e,
6215
6234
  children: [
@@ -6242,28 +6261,28 @@ var E1 = (e) => {
6242
6261
  fillOpacity: "0.8"
6243
6262
  })
6244
6263
  ]
6245
- }), Io = {
6264
+ }), Eo = {
6246
6265
  pinnedNumber: {
6247
- icon: Lo,
6266
+ icon: Po,
6248
6267
  labelKey: "graph.annotations.baseMenu.unpinNumber"
6249
6268
  },
6250
6269
  comment: {
6251
- icon: Co,
6270
+ icon: xo,
6252
6271
  labelKey: "graph.annotations.baseMenu.removeAnnotation"
6253
6272
  },
6254
6273
  sticker: {
6255
- icon: Po,
6274
+ icon: Io,
6256
6275
  labelKey: "graph.annotations.baseMenu.removeSticker"
6257
6276
  },
6258
6277
  image: null
6259
- }, U1 = (e) => $s(e.kind) && Io[e.kind] !== null, K1 = ({ attachment: e, onRequestClose: t }) => {
6260
- const n = P(), { dispatch: a } = le(), { icon: o, labelKey: i } = Io[e.kind], l = () => {
6278
+ }, U1 = (e) => $s(e.kind) && Eo[e.kind] !== null, K1 = ({ attachment: e, onRequestClose: t }) => {
6279
+ const n = I(), { dispatch: a } = le(), { icon: o, labelKey: i } = Eo[e.kind], l = () => {
6261
6280
  a(new We({ id: e.annotation.id })), t();
6262
6281
  };
6263
6282
  return /* @__PURE__ */ g(G.Item, {
6264
6283
  className: Fe,
6265
6284
  onClick: l,
6266
- children: [/* @__PURE__ */ r(ko, { children: /* @__PURE__ */ r(o, {}) }), /* @__PURE__ */ r("span", {
6285
+ children: [/* @__PURE__ */ r(Lo, { children: /* @__PURE__ */ r(o, {}) }), /* @__PURE__ */ r("span", {
6267
6286
  className: ze,
6268
6287
  children: n(i)
6269
6288
  })]
@@ -6283,10 +6302,10 @@ var E1 = (e) => {
6283
6302
  };
6284
6303
  return /* @__PURE__ */ r(An, {
6285
6304
  label: e,
6286
- icon: /* @__PURE__ */ r(Po, {}),
6305
+ icon: /* @__PURE__ */ r(Io, {}),
6287
6306
  children: /* @__PURE__ */ r("div", {
6288
6307
  className: q1,
6289
- children: Object.entries(Yi).map(([i, l]) => /* @__PURE__ */ r(Te.Item, {
6308
+ children: Object.entries(Ji).map(([i, l]) => /* @__PURE__ */ r(Te.Item, {
6290
6309
  className: X1,
6291
6310
  "aria-label": i,
6292
6311
  onClick: () => o(i),
@@ -6318,7 +6337,7 @@ var E1 = (e) => {
6318
6337
  onClose: i
6319
6338
  });
6320
6339
  }, J1 = ({ frameElement: e, trigger: t, layer: n, at: a, observation: o, onClose: i }) => {
6321
- const l = P(), s = Ze(), c = R((S) => S.spec.annotations), h = R((S) => S.config.parsingLocale), d = go(), { x: u, y: p, width: v, height: m } = t, f = I(() => mo(e, {
6340
+ const l = I(), s = Ze(), c = R((S) => S.spec.annotations), h = R((S) => S.config.parsingLocale), d = vo(), { x: u, y: p, width: v, height: m } = t, f = E(() => go(e, {
6322
6341
  x: u,
6323
6342
  y: p,
6324
6343
  width: v,
@@ -6329,8 +6348,8 @@ var E1 = (e) => {
6329
6348
  p,
6330
6349
  v,
6331
6350
  m
6332
- ]), b = Ns(c, a, I(() => Ts(n, h), [n, h])), w = b !== null && U1(b) ? b : null, x = $1(n, o), C = (S, T) => {
6333
- !S && Q1(T.reason) && i();
6351
+ ]), b = Ns(c, a, E(() => Ts(n, h), [n, h])), x = b !== null && U1(b) ? b : null, w = $1(n, o), C = (S, P) => {
6352
+ !S && Q1(P.reason) && i();
6334
6353
  };
6335
6354
  return /* @__PURE__ */ r(G.Root, {
6336
6355
  open: d,
@@ -6343,23 +6362,23 @@ var E1 = (e) => {
6343
6362
  side: "right",
6344
6363
  align: "start",
6345
6364
  sideOffset: 8,
6346
- className: xo,
6365
+ className: wo,
6347
6366
  ...Sn,
6348
6367
  children: /* @__PURE__ */ g(G.Popup, {
6349
- className: wo,
6368
+ className: To,
6350
6369
  "data-testid": "observation-menu",
6351
6370
  children: [
6352
- w !== null && /* @__PURE__ */ r(K1, {
6353
- attachment: w,
6371
+ x !== null && /* @__PURE__ */ r(K1, {
6372
+ attachment: x,
6354
6373
  onRequestClose: i
6355
6374
  }),
6356
6375
  /* @__PURE__ */ r(V1, {
6357
6376
  label: l("graph.annotations.baseMenu.removeHighlight"),
6358
- highlights: x,
6377
+ highlights: w,
6359
6378
  onRequestClose: i
6360
6379
  }),
6361
6380
  /* @__PURE__ */ r(G.Separator, { className: f1 }),
6362
- w === null && /* @__PURE__ */ g(q, { children: [
6381
+ x === null && /* @__PURE__ */ g(q, { children: [
6363
6382
  /* @__PURE__ */ r(W1, {
6364
6383
  label: l("graph.annotations.baseMenu.pinNumber"),
6365
6384
  at: a,
@@ -6382,7 +6401,7 @@ var E1 = (e) => {
6382
6401
  label: l("graph.annotations.baseMenu.highlight"),
6383
6402
  layer: n,
6384
6403
  observation: o,
6385
- highlights: x,
6404
+ highlights: w,
6386
6405
  onRequestClose: i
6387
6406
  }),
6388
6407
  /* @__PURE__ */ r(P1, {
@@ -6396,7 +6415,7 @@ var E1 = (e) => {
6396
6415
  }) })
6397
6416
  })
6398
6417
  });
6399
- }, Q1 = (e) => e === "outside-press" || e === "escape-key" || e === "item-press", kn = "l8tsqe0", Eo = ["start", "end"], Oo = ({ anchor: e, point: t, delta: n }) => {
6418
+ }, Q1 = (e) => e === "outside-press" || e === "escape-key" || e === "item-press", kn = "l8tsqe0", Oo = ["start", "end"], Mo = ({ anchor: e, point: t, delta: n }) => {
6400
6419
  const a = {
6401
6420
  x: vr(t.x, n.x),
6402
6421
  y: vr(1 - t.y, n.y)
@@ -6418,7 +6437,7 @@ var E1 = (e) => {
6418
6437
  ...e[t.endpoint],
6419
6438
  ...t.point
6420
6439
  }
6421
- }), Mo = (e, t) => e.x === t.x && e.y === t.y, e2 = (e, t) => {
6440
+ }), No = (e, t) => e.x === t.x && e.y === t.y, e2 = (e, t) => {
6422
6441
  const n = dt(e, t);
6423
6442
  return {
6424
6443
  x: t.x + n.x,
@@ -6437,7 +6456,7 @@ var E1 = (e) => {
6437
6456
  if (t === null) return null;
6438
6457
  const o = n.find((s) => s.id === t.annotationId);
6439
6458
  if (o === void 0) return null;
6440
- const i = fn(a, o.id), l = ba({
6459
+ const i = fn(a, o.id), l = ya({
6441
6460
  arrow: Ln(o, t),
6442
6461
  style: i,
6443
6462
  panelWidth: e.width,
@@ -6476,7 +6495,7 @@ var E1 = (e) => {
6476
6495
  strokeLinejoin: "round",
6477
6496
  children: [/* @__PURE__ */ r("path", { d: "m12 19-7-7 7-7" }), /* @__PURE__ */ r("path", { d: "M19 12H5" })]
6478
6497
  })
6479
- }), No = (e) => /* @__PURE__ */ r(L, {
6498
+ }), Ro = (e) => /* @__PURE__ */ r(L, {
6480
6499
  ...e,
6481
6500
  children: /* @__PURE__ */ g("g", {
6482
6501
  stroke: "currentColor",
@@ -6494,7 +6513,7 @@ var E1 = (e) => {
6494
6513
  strokeLinejoin: "round",
6495
6514
  children: [/* @__PURE__ */ r("path", { d: "M7 17 17 7" }), /* @__PURE__ */ r("path", { d: "M7 7h10v10" })]
6496
6515
  })
6497
- }), Ro = (e) => /* @__PURE__ */ r(L, {
6516
+ }), Do = (e) => /* @__PURE__ */ r(L, {
6498
6517
  ...e,
6499
6518
  children: /* @__PURE__ */ g("g", {
6500
6519
  fill: "currentColor",
@@ -6545,7 +6564,7 @@ var E1 = (e) => {
6545
6564
  centre: t.x + e.x + e.width / 2 - h
6546
6565
  };
6547
6566
  }, m2 = ({ anchorBox: e, panelRect: t, frameWidth: n, frameHeight: a, label: o, testId: i, children: l }) => {
6548
- const { chartId: s } = z(), c = p2({
6567
+ const { chartId: s } = B(), c = p2({
6549
6568
  anchorBox: e,
6550
6569
  panelRect: t,
6551
6570
  frameWidth: n,
@@ -6571,7 +6590,7 @@ var E1 = (e) => {
6571
6590
  })
6572
6591
  });
6573
6592
  }, g2 = ({ label: e, trigger: t, isOpen: n, onOpenChange: a, isDisabled: o = !1, children: i }) => {
6574
- const { chartId: l } = z();
6593
+ const { chartId: l } = B();
6575
6594
  return /* @__PURE__ */ g(G.Root, {
6576
6595
  open: n,
6577
6596
  modal: !1,
@@ -6589,7 +6608,7 @@ var E1 = (e) => {
6589
6608
  })]
6590
6609
  });
6591
6610
  }, v2 = (e) => {
6592
- const { chartId: t } = z();
6611
+ const { chartId: t } = B();
6593
6612
  return /* @__PURE__ */ r(Z.ColorPicker, {
6594
6613
  ...e,
6595
6614
  popupAttributes: Lt(t)
@@ -6611,7 +6630,7 @@ var E1 = (e) => {
6611
6630
  className: u2,
6612
6631
  onClick: n,
6613
6632
  children: a
6614
- }), D = {
6633
+ }), _ = {
6615
6634
  Root: m2,
6616
6635
  Dropdown: g2,
6617
6636
  MenuItem: Z.MenuItem,
@@ -6622,8 +6641,8 @@ var E1 = (e) => {
6622
6641
  Button: Z.Button,
6623
6642
  Separator: Z.Separator
6624
6643
  }, S2 = { kind: "chrome-popup" }, Ot = () => {
6625
- const { commands: e } = z(), t = $(), [n, a] = Q(null);
6626
- _(() => () => e.commit(), [e]), _(() => {
6644
+ const { commands: e } = B(), t = $(), [n, a] = Q(null);
6645
+ z(() => () => e.commit(), [e]), z(() => {
6627
6646
  const { claimInteraction: i, releaseInteraction: l } = t.getState();
6628
6647
  return n === null ? l("chrome-popup") : i(S2), () => l("chrome-popup");
6629
6648
  }, [t, n]);
@@ -6687,11 +6706,11 @@ var E1 = (e) => {
6687
6706
  ], fr = [{
6688
6707
  value: "line-arrow",
6689
6708
  key: "graph.annotations.arrowToolbar.arrowhead.lineArrow",
6690
- Icon: No
6709
+ Icon: Ro
6691
6710
  }, {
6692
6711
  value: "none",
6693
6712
  key: "graph.annotations.arrowToolbar.arrowhead.none",
6694
- Icon: _i
6713
+ Icon: Fi
6695
6714
  }], br = [
6696
6715
  {
6697
6716
  value: "solid",
@@ -6710,11 +6729,11 @@ var E1 = (e) => {
6710
6729
  }
6711
6730
  ], A2 = (e, t) => e.find((n) => n.value === t) ?? e[0];
6712
6731
  var k2 = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o, frameElement: i }) => {
6713
- const l = P(), { commands: s } = z(), c = R((N) => N.spec.styles.overrides), h = R((N) => De(N.spec)), d = Ot(), u = fn(X(), e.id), p = A2(br, qt(u.dashArray)), v = u.outline.strokeWidth > 0 || u.outline.shadow !== "none", m = I(() => ({
6732
+ const l = I(), { commands: s } = B(), c = R((N) => N.spec.styles.overrides), h = R((N) => De(N.spec)), d = Ot(), u = fn(X(), e.id), p = A2(br, qt(u.dashArray)), v = u.outline.strokeWidth > 0 || u.outline.shadow !== "none", m = E(() => ({
6714
6733
  target: "annotation",
6715
6734
  kind: "arrow",
6716
6735
  annotation: e.id
6717
- }), [e.id]), f = I(() => ({
6736
+ }), [e.id]), f = E(() => ({
6718
6737
  ...m,
6719
6738
  part: "outline"
6720
6739
  }), [m]), b = (N, y) => {
@@ -6729,7 +6748,7 @@ var k2 = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
6729
6748
  }
6730
6749
  }
6731
6750
  }), y);
6732
- }, w = (N) => {
6751
+ }, x = (N) => {
6733
6752
  const y = Ae(c, { select: f }, h)?.declarations ?? {};
6734
6753
  s.dispatch(new Oe({
6735
6754
  list: "overrides",
@@ -6741,7 +6760,7 @@ var k2 = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
6741
6760
  }
6742
6761
  }
6743
6762
  }));
6744
- }, x = (N) => {
6763
+ }, w = (N) => {
6745
6764
  b(N), d.close();
6746
6765
  }, C = (N) => {
6747
6766
  s.dispatch(new he({
@@ -6751,11 +6770,11 @@ var k2 = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
6751
6770
  })), d.close();
6752
6771
  }, S = () => {
6753
6772
  s.dispatch(new We({ id: e.id })), i.focus({ preventScroll: !0 });
6754
- }, T = (N) => b({ stroke: N }, { transient: !0 }), k = (N) => x({ strokeWidth: N }), O = (N) => C({ startArrowheadStyle: N }), H = (N) => x({ dashArray: Sl.arrow[N] }), F = (N) => C({ endArrowheadStyle: N }), M = () => w(v ? {
6773
+ }, P = (N) => b({ stroke: N }, { transient: !0 }), k = (N) => w({ strokeWidth: N }), T = (N) => C({ startArrowheadStyle: N }), F = (N) => w({ dashArray: Cl.arrow[N] }), D = (N) => C({ endArrowheadStyle: N }), M = () => x(v ? {
6755
6774
  strokeWidth: 0,
6756
6775
  shadow: "none"
6757
- } : fl);
6758
- return /* @__PURE__ */ g(D.Root, {
6776
+ } : bl);
6777
+ return /* @__PURE__ */ g(_.Root, {
6759
6778
  anchorBox: t,
6760
6779
  panelRect: n,
6761
6780
  frameWidth: a,
@@ -6763,16 +6782,16 @@ var k2 = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
6763
6782
  label: l("graph.annotations.arrowToolbar.label"),
6764
6783
  testId: "arrow-toolbar",
6765
6784
  children: [
6766
- /* @__PURE__ */ r(D.ColorPicker, {
6785
+ /* @__PURE__ */ r(_.ColorPicker, {
6767
6786
  color: u.stroke,
6768
6787
  label: l("graph.annotations.arrowToolbar.color"),
6769
- onChange: T,
6788
+ onChange: P,
6770
6789
  ...d.bind("color"),
6771
- children: /* @__PURE__ */ r(D.Swatch, { color: u.stroke })
6790
+ children: /* @__PURE__ */ r(_.Swatch, { color: u.stroke })
6772
6791
  }),
6773
- /* @__PURE__ */ r(D.Dropdown, {
6792
+ /* @__PURE__ */ r(_.Dropdown, {
6774
6793
  label: l("graph.annotations.arrowToolbar.thickness.ariaLabel"),
6775
- trigger: /* @__PURE__ */ r(Ro, {
6794
+ trigger: /* @__PURE__ */ r(Do, {
6776
6795
  size: "sm",
6777
6796
  title: ""
6778
6797
  }),
@@ -6783,7 +6802,7 @@ var k2 = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
6783
6802
  onPick: k
6784
6803
  })
6785
6804
  }),
6786
- /* @__PURE__ */ r(D.Dropdown, {
6805
+ /* @__PURE__ */ r(_.Dropdown, {
6787
6806
  label: l("graph.annotations.arrowToolbar.startArrowhead"),
6788
6807
  trigger: /* @__PURE__ */ r(r2, {
6789
6808
  size: "sm",
@@ -6793,10 +6812,10 @@ var k2 = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
6793
6812
  children: /* @__PURE__ */ r(ot, {
6794
6813
  options: fr,
6795
6814
  current: e.startArrowheadStyle,
6796
- onPick: O
6815
+ onPick: T
6797
6816
  })
6798
6817
  }),
6799
- /* @__PURE__ */ r(D.Dropdown, {
6818
+ /* @__PURE__ */ r(_.Dropdown, {
6800
6819
  label: l("graph.annotations.arrowToolbar.lineStyle.ariaLabel"),
6801
6820
  trigger: p?.Icon !== void 0 && /* @__PURE__ */ r(p.Icon, {
6802
6821
  size: "sm",
@@ -6806,12 +6825,12 @@ var k2 = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
6806
6825
  children: /* @__PURE__ */ r(ot, {
6807
6826
  options: br,
6808
6827
  current: qt(u.dashArray),
6809
- onPick: H
6828
+ onPick: F
6810
6829
  })
6811
6830
  }),
6812
- /* @__PURE__ */ r(D.Dropdown, {
6831
+ /* @__PURE__ */ r(_.Dropdown, {
6813
6832
  label: l("graph.annotations.arrowToolbar.endArrowhead"),
6814
- trigger: /* @__PURE__ */ r(No, {
6833
+ trigger: /* @__PURE__ */ r(Ro, {
6815
6834
  size: "sm",
6816
6835
  title: ""
6817
6836
  }),
@@ -6819,10 +6838,10 @@ var k2 = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
6819
6838
  children: /* @__PURE__ */ r(ot, {
6820
6839
  options: fr,
6821
6840
  current: e.endArrowheadStyle,
6822
- onPick: F
6841
+ onPick: D
6823
6842
  })
6824
6843
  }),
6825
- /* @__PURE__ */ r(D.ToggleButton, {
6844
+ /* @__PURE__ */ r(_.ToggleButton, {
6826
6845
  label: l("graph.annotations.arrowToolbar.sticker"),
6827
6846
  isPressed: v,
6828
6847
  onClick: M,
@@ -6831,8 +6850,8 @@ var k2 = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
6831
6850
  title: ""
6832
6851
  })
6833
6852
  }),
6834
- /* @__PURE__ */ r(D.Separator, {}),
6835
- /* @__PURE__ */ r(D.IconButton, {
6853
+ /* @__PURE__ */ r(_.Separator, {}),
6854
+ /* @__PURE__ */ r(_.IconButton, {
6836
6855
  label: l("graph.annotations.arrowToolbar.remove"),
6837
6856
  onClick: S,
6838
6857
  children: /* @__PURE__ */ r(Et, {
@@ -6843,8 +6862,8 @@ var k2 = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
6843
6862
  ]
6844
6863
  });
6845
6864
  }, ot = ({ options: e, current: t, onPick: n }) => {
6846
- const a = P(), o = (i) => () => n(i);
6847
- return /* @__PURE__ */ r(q, { children: e.map((i) => /* @__PURE__ */ g(D.MenuItem, {
6865
+ const a = I(), o = (i) => () => n(i);
6866
+ return /* @__PURE__ */ r(q, { children: e.map((i) => /* @__PURE__ */ g(_.MenuItem, {
6848
6867
  isSelected: i.value === t,
6849
6868
  onClick: o(i.value),
6850
6869
  children: [/* @__PURE__ */ r("span", { children: a(i.key) }), i.Icon !== void 0 && /* @__PURE__ */ r("span", {
@@ -6858,7 +6877,7 @@ var k2 = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
6858
6877
  }, L2 = "_1me29t10", de = (e, t) => t > 0 ? e / t : 0, Mt = (e, t, n) => ({
6859
6878
  x: de(t.x - e.x, n.width),
6860
6879
  y: de(t.y - e.y, n.height)
6861
- }), P2 = (e) => e.x !== 0 || e.y !== 0, Do = (e, t) => ({
6880
+ }), P2 = (e) => e.x !== 0 || e.y !== 0, _o = (e, t) => ({
6862
6881
  x: e.x * t.width,
6863
6882
  y: e.y * t.height
6864
6883
  });
@@ -6913,7 +6932,7 @@ var I2 = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Qe = class {
6913
6932
  if (a === void 0) return null;
6914
6933
  const o = a[n];
6915
6934
  return o.anchorType === "panel" ? o : null;
6916
- }, _o = (e, t) => e === "start" ? { start: t } : { end: t }, E2 = class extends Qe {
6935
+ }, Fo = (e, t) => e === "start" ? { start: t } : { end: t }, E2 = class extends Qe {
6917
6936
  constructor(...e) {
6918
6937
  super(...e), this.kind = "arrow-endpoint-drag";
6919
6938
  }
@@ -6927,7 +6946,7 @@ var I2 = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Qe = class {
6927
6946
  kind: "arrow-endpoint-drag",
6928
6947
  annotationId: t,
6929
6948
  endpoint: n,
6930
- ...Oo({
6949
+ ...Mo({
6931
6950
  anchor: c,
6932
6951
  point: l[n],
6933
6952
  delta: Mt(a, e, s)
@@ -6936,19 +6955,19 @@ var I2 = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Qe = class {
6936
6955
  }
6937
6956
  commit({ anchor: e }) {
6938
6957
  const { annotationId: t, endpoint: n, dispatch: a, readInputs: o } = this.params, i = mt(o().annotations, t, n);
6939
- i === null || Mo(i, e) || a(new he({
6958
+ i === null || No(i, e) || a(new he({
6940
6959
  kind: "arrow",
6941
6960
  id: t,
6942
- patch: _o(n, e)
6961
+ patch: Fo(n, e)
6943
6962
  }));
6944
6963
  }
6945
6964
  }, O2 = ({ annotationId: e, arrow: t, panelRect: n }) => {
6946
- const { commands: a } = z(), o = $(), i = ee({
6965
+ const { commands: a } = B(), o = $(), i = ee({
6947
6966
  annotations: R((s) => s.spec.annotations),
6948
6967
  arrow: t,
6949
6968
  panelRect: n
6950
6969
  }), l = ne(null);
6951
- return _(() => () => l.current?.finish(!1), []), ae((s) => ({ onPointerDown: (c) => {
6970
+ return z(() => () => l.current?.finish(!1), []), ae((s) => ({ onPointerDown: (c) => {
6952
6971
  if (c.button === 0 && l.current === null) {
6953
6972
  try {
6954
6973
  c.currentTarget.setPointerCapture(c.pointerId);
@@ -6979,9 +6998,9 @@ var I2 = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Qe = class {
6979
6998
  a
6980
6999
  ]);
6981
7000
  }, M2 = [" ", "Enter"], yr = 4, N2 = ({ annotationId: e, arrow: t, panelRect: n }) => {
6982
- const { commands: a } = z(), o = $(), i = R((c) => c.spec.annotations), l = ee(i), s = ee(a.dispatch);
6983
- return _(() => () => {
6984
- for (const c of Eo) Sr({
7001
+ const { commands: a } = B(), o = $(), i = R((c) => c.spec.annotations), l = ee(i), s = ee(a.dispatch);
7002
+ return z(() => () => {
7003
+ for (const c of Oo) Sr({
6985
7004
  editorStore: o,
6986
7005
  annotationId: e,
6987
7006
  endpoint: c,
@@ -7025,7 +7044,7 @@ var I2 = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Qe = class {
7025
7044
  kind: "arrow-endpoint-drag",
7026
7045
  annotationId: e,
7027
7046
  endpoint: c,
7028
- ...Oo({
7047
+ ...Mo({
7029
7048
  anchor: u.anchor,
7030
7049
  point: u.point,
7031
7050
  delta: p
@@ -7044,10 +7063,10 @@ var I2 = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Qe = class {
7044
7063
  if (l === null) return;
7045
7064
  i.releaseInteraction("arrow-endpoint-drag");
7046
7065
  const s = mt(a, t, n);
7047
- s === null || Mo(s, l.anchor) || o(new he({
7066
+ s === null || No(s, l.anchor) || o(new he({
7048
7067
  kind: "arrow",
7049
7068
  id: t,
7050
- patch: _o(n, l.anchor)
7069
+ patch: Fo(n, l.anchor)
7051
7070
  }));
7052
7071
  }, R2 = (e, t) => {
7053
7072
  const n = de(yr, t.width), a = de(yr, t.height);
@@ -7088,7 +7107,7 @@ var I2 = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Qe = class {
7088
7107
  ...e
7089
7108
  });
7090
7109
  }, _2 = ({ arrow: e, committed: t, painted: n, isSettled: a, isMoved: o, panelRect: i, frameRect: l, frameElement: s }) => {
7091
- const c = P(), h = O2({
7110
+ const c = I(), h = O2({
7092
7111
  annotationId: e.id,
7093
7112
  arrow: t,
7094
7113
  panelRect: i
@@ -7107,7 +7126,7 @@ var I2 = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Qe = class {
7107
7126
  frameWidth: l.width,
7108
7127
  frameHeight: l.height,
7109
7128
  frameElement: s
7110
- }), !o && Eo.filter((u) => e[u].anchorType === "panel").map((u) => /* @__PURE__ */ r(F2, {
7129
+ }), !o && Oo.filter((u) => e[u].anchorType === "panel").map((u) => /* @__PURE__ */ r(F2, {
7111
7130
  endpoint: u,
7112
7131
  point: e2(n[u], i),
7113
7132
  label: c(`graph.annotations.arrowToolbar.moveEndpoint.${u}`),
@@ -7163,8 +7182,8 @@ var U2 = [
7163
7182
  "relative-difference": "graph.annotations.differenceArrowToolbar.labelKind.relativeDifference",
7164
7183
  proportion: "graph.annotations.differenceArrowToolbar.labelKind.proportion"
7165
7184
  }, X2 = (e) => {
7166
- const { formattingLocale: t } = z(), n = R((o) => o.config.parsingLocale), a = t ?? n;
7167
- return I(() => {
7185
+ const { formattingLocale: t } = B(), n = R((o) => o.config.parsingLocale), a = t ?? n;
7186
+ return E(() => {
7168
7187
  const o = gs(e.start, e.end);
7169
7188
  return U2.filter((i) => o || !Cr.includes(i) || i === e.label).map((i) => ({
7170
7189
  kind: i,
@@ -7194,14 +7213,14 @@ var U2 = [
7194
7213
  key: "graph.annotations.differenceArrowToolbar.size.large"
7195
7214
  }
7196
7215
  ], j2 = ({ arrow: e, color: t, labelBox: n, panelRect: a, frameWidth: o, frameHeight: i, frameElement: l }) => {
7197
- const s = P(), { commands: c } = z(), h = R((y) => y.spec.styles.overrides), d = R((y) => De(y.spec)), u = Ot(), p = X2(e), v = dc(X(), e.id), m = I(() => ({
7216
+ const s = I(), { commands: c } = B(), h = R((y) => y.spec.styles.overrides), d = R((y) => De(y.spec)), u = Ot(), p = X2(e), v = dc(X(), e.id), m = E(() => ({
7198
7217
  target: "annotation",
7199
7218
  kind: "differenceArrow",
7200
7219
  annotation: e.id
7201
- }), [e.id]), f = I(() => ({
7220
+ }), [e.id]), f = E(() => ({
7202
7221
  ...m,
7203
7222
  part: "label"
7204
- }), [m]), b = p.find((y) => y.kind === e.label), w = p.some((y) => y.isPickable && y.kind !== e.label), x = xr.find((y) => Hn[y.id].arrow.strokeWidth === v.strokeWidth), C = (y, V) => {
7223
+ }), [m]), b = p.find((y) => y.kind === e.label), x = p.some((y) => y.isPickable && y.kind !== e.label), w = xr.find((y) => Hn[y.id].arrow.strokeWidth === v.strokeWidth), C = (y, V) => {
7205
7224
  c.dispatch(new he({
7206
7225
  kind: "differenceArrow",
7207
7226
  id: e.id,
@@ -7210,31 +7229,31 @@ var U2 = [
7210
7229
  }, S = (y) => ({
7211
7230
  ...Ae(h, { select: m }, d)?.declarations,
7212
7231
  ...y
7213
- }), T = (y) => ({
7232
+ }), P = (y) => ({
7214
7233
  ...Ae(h, { select: f }, d)?.declarations,
7215
7234
  ...y
7216
7235
  }), k = (y) => {
7217
7236
  C(y), u.close();
7218
- }, O = () => {
7237
+ }, T = () => {
7219
7238
  c.dispatch(new We({ id: e.id })), l.focus({ preventScroll: !0 });
7220
- }, H = (y) => c.dispatch(new Oe({
7239
+ }, F = (y) => c.dispatch(new Oe({
7221
7240
  list: "overrides",
7222
7241
  rule: {
7223
7242
  select: m,
7224
7243
  declarations: S({ stroke: y })
7225
7244
  }
7226
- }), { transient: !0 }), F = () => C({
7245
+ }), { transient: !0 }), D = () => C({
7227
7246
  start: e.end.anchor,
7228
7247
  end: e.start.anchor
7229
7248
  }), M = (y) => () => k({ label: y }), N = (y) => () => {
7230
7249
  const V = Hn[y];
7231
- c.dispatch(new Fl({
7250
+ c.dispatch(new zl({
7232
7251
  annotationId: e.id,
7233
7252
  arrow: S(V.arrow),
7234
- label: T(V.label)
7253
+ label: P(V.label)
7235
7254
  })), u.close();
7236
7255
  };
7237
- return /* @__PURE__ */ g(D.Root, {
7256
+ return /* @__PURE__ */ g(_.Root, {
7238
7257
  anchorBox: n,
7239
7258
  panelRect: a,
7240
7259
  frameWidth: o,
@@ -7242,12 +7261,12 @@ var U2 = [
7242
7261
  label: s("graph.annotations.differenceArrowToolbar.label"),
7243
7262
  testId: "difference-arrow-toolbar",
7244
7263
  children: [
7245
- /* @__PURE__ */ r(D.Dropdown, {
7264
+ /* @__PURE__ */ r(_.Dropdown, {
7246
7265
  label: s("graph.annotations.differenceArrowToolbar.labelKind.ariaLabel"),
7247
7266
  trigger: /* @__PURE__ */ r(Z2, { option: b }),
7248
- isDisabled: !w,
7267
+ isDisabled: !x,
7249
7268
  ...u.bind("labelKind"),
7250
- children: p.map((y) => /* @__PURE__ */ g(D.MenuItem, {
7269
+ children: p.map((y) => /* @__PURE__ */ g(_.MenuItem, {
7251
7270
  isSelected: y.kind === e.label,
7252
7271
  isDisabled: !y.isPickable,
7253
7272
  onClick: M(y.kind),
@@ -7266,36 +7285,36 @@ var U2 = [
7266
7285
  ]
7267
7286
  }, y.kind))
7268
7287
  }),
7269
- /* @__PURE__ */ r(D.Separator, {}),
7270
- /* @__PURE__ */ r(D.ColorPicker, {
7288
+ /* @__PURE__ */ r(_.Separator, {}),
7289
+ /* @__PURE__ */ r(_.ColorPicker, {
7271
7290
  color: t,
7272
7291
  label: s("graph.annotations.differenceArrowToolbar.color"),
7273
- onChange: H,
7292
+ onChange: F,
7274
7293
  ...u.bind("color"),
7275
- children: /* @__PURE__ */ r(D.Swatch, { color: t })
7294
+ children: /* @__PURE__ */ r(_.Swatch, { color: t })
7276
7295
  }),
7277
- /* @__PURE__ */ r(D.Dropdown, {
7296
+ /* @__PURE__ */ r(_.Dropdown, {
7278
7297
  label: s("graph.annotations.differenceArrowToolbar.size.ariaLabel"),
7279
- trigger: x === void 0 ? "" : s(x.key),
7298
+ trigger: w === void 0 ? "" : s(w.key),
7280
7299
  ...u.bind("size"),
7281
- children: xr.map((y) => /* @__PURE__ */ r(D.MenuItem, {
7282
- isSelected: y.id === x?.id,
7300
+ children: xr.map((y) => /* @__PURE__ */ r(_.MenuItem, {
7301
+ isSelected: y.id === w?.id,
7283
7302
  onClick: N(y.id),
7284
7303
  children: s(y.key)
7285
7304
  }, y.id))
7286
7305
  }),
7287
- /* @__PURE__ */ r(D.Separator, {}),
7288
- /* @__PURE__ */ r(D.IconButton, {
7306
+ /* @__PURE__ */ r(_.Separator, {}),
7307
+ /* @__PURE__ */ r(_.IconButton, {
7289
7308
  label: s("graph.annotations.differenceArrowToolbar.swap"),
7290
- onClick: F,
7309
+ onClick: D,
7291
7310
  children: /* @__PURE__ */ r(G2, {
7292
7311
  size: "sm",
7293
7312
  title: ""
7294
7313
  })
7295
7314
  }),
7296
- /* @__PURE__ */ r(D.IconButton, {
7315
+ /* @__PURE__ */ r(_.IconButton, {
7297
7316
  label: s("graph.annotations.differenceArrowToolbar.remove"),
7298
- onClick: O,
7317
+ onClick: T,
7299
7318
  children: /* @__PURE__ */ r(Et, {
7300
7319
  size: "sm",
7301
7320
  title: ""
@@ -7304,7 +7323,7 @@ var U2 = [
7304
7323
  ]
7305
7324
  });
7306
7325
  }, Z2 = ({ option: e }) => {
7307
- const t = P();
7326
+ const t = I();
7308
7327
  return e === void 0 ? null : /* @__PURE__ */ g(q, { children: [/* @__PURE__ */ r("span", {
7309
7328
  className: $2,
7310
7329
  children: t(e.key)
@@ -7325,20 +7344,20 @@ var J2 = "ydgo3h1", Q2 = "ydgo3h2", em = "ydgo3h3", tm = ({ clientPoint: e, pane
7325
7344
  if (d === null) return null;
7326
7345
  const u = o.find((v) => v.id === d.layerId);
7327
7346
  if (u === void 0) return null;
7328
- const p = La({
7347
+ const p = Pa({
7329
7348
  resolver: l,
7330
7349
  layer: u,
7331
7350
  observation: d.observation,
7332
- observationIndex: ka(d),
7351
+ observationIndex: La(d),
7333
7352
  coordSystem: i,
7334
7353
  align: c
7335
7354
  });
7336
- return p === null || ga(p.anchor, s) ? null : p;
7355
+ return p === null || va(p.anchor, s) ? null : p;
7337
7356
  }, nm = (e, t) => ({
7338
7357
  x: Math.max(0, Math.min(e.x, t.width)),
7339
7358
  y: Math.max(0, Math.min(e.y, t.height))
7340
- }), Fo = (e) => e === "start" ? "end" : "start", zo = ({ dispatch: e, arrow: t, endpoint: n, anchor: a }) => {
7341
- ga(a, t[n].anchor) || e(new he({
7359
+ }), zo = (e) => e === "start" ? "end" : "start", Bo = ({ dispatch: e, arrow: t, endpoint: n, anchor: a }) => {
7360
+ va(a, t[n].anchor) || e(new he({
7342
7361
  kind: "differenceArrow",
7343
7362
  id: t.id,
7344
7363
  patch: { [n]: a }
@@ -7363,7 +7382,7 @@ var J2 = "ydgo3h1", Q2 = "ydgo3h2", em = "ydgo3h3", tm = ({ clientPoint: e, pane
7363
7382
  layers: c,
7364
7383
  coordSystem: h,
7365
7384
  resolver: o,
7366
- fixedAnchor: i[Fo(t)].anchor,
7385
+ fixedAnchor: i[zo(t)].anchor,
7367
7386
  align: i[t].anchor.align
7368
7387
  });
7369
7388
  return d === null ? null : {
@@ -7375,7 +7394,7 @@ var J2 = "ydgo3h1", Q2 = "ydgo3h2", em = "ydgo3h3", tm = ({ clientPoint: e, pane
7375
7394
  }
7376
7395
  commit({ point: e, endpoint: t }) {
7377
7396
  const { dispatch: n, readInputs: a } = this.params;
7378
- zo({
7397
+ Bo({
7379
7398
  dispatch: n,
7380
7399
  arrow: a().arrow,
7381
7400
  endpoint: t,
@@ -7383,7 +7402,7 @@ var J2 = "ydgo3h1", Q2 = "ydgo3h2", em = "ydgo3h3", tm = ({ clientPoint: e, pane
7383
7402
  });
7384
7403
  }
7385
7404
  }, am = ({ arrow: e, panelOrigin: t, panelRect: n }) => {
7386
- const { commands: a, anchorResolver: o } = z(), { engine: i } = je(), l = $(), s = ee({
7405
+ const { commands: a, anchorResolver: o } = B(), { engine: i } = je(), l = $(), s = ee({
7387
7406
  arrow: e,
7388
7407
  panelOrigin: t,
7389
7408
  panelRect: n,
@@ -7392,7 +7411,7 @@ var J2 = "ydgo3h1", Q2 = "ydgo3h2", em = "ydgo3h3", tm = ({ clientPoint: e, pane
7392
7411
  coordSystem: h.coordSystem
7393
7412
  })))
7394
7413
  }), c = ne(null);
7395
- return _(() => () => c.current?.finish(!1), []), ae((h) => ({ onPointerDown: (d) => {
7414
+ return z(() => () => c.current?.finish(!1), []), ae((h) => ({ onPointerDown: (d) => {
7396
7415
  if (d.button === 0 && c.current === null) {
7397
7416
  try {
7398
7417
  d.currentTarget.setPointerCapture(d.pointerId);
@@ -7425,12 +7444,12 @@ var J2 = "ydgo3h1", Q2 = "ydgo3h2", em = "ydgo3h3", tm = ({ clientPoint: e, pane
7425
7444
  a
7426
7445
  ]);
7427
7446
  }, om = [" ", "Enter"], im = ({ arrow: e }) => {
7428
- const { commands: t, anchorResolver: n } = z(), a = $(), { layers: o, coordSystem: i, mainAxis: l } = R(fe((c) => ({
7447
+ const { commands: t, anchorResolver: n } = B(), a = $(), { layers: o, coordSystem: i, mainAxis: l } = R(fe((c) => ({
7429
7448
  layers: c.layers,
7430
7449
  coordSystem: c.coordSystem,
7431
7450
  mainAxis: Ys(c.coordSystem)
7432
7451
  }))), s = e.id;
7433
- return _(() => () => {
7452
+ return z(() => () => {
7434
7453
  const c = a.getState();
7435
7454
  U(c, "difference-arrow-endpoint-drag")?.annotationId === s && c.releaseInteraction("difference-arrow-endpoint-drag");
7436
7455
  }, [a, s]), ae((c) => ({ onKeyDown: (h) => {
@@ -7444,7 +7463,7 @@ var J2 = "ydgo3h1", Q2 = "ydgo3h2", em = "ydgo3h3", tm = ({ clientPoint: e, pane
7444
7463
  endpoint: c,
7445
7464
  point: e[c]
7446
7465
  });
7447
- d.releaseInteraction("difference-arrow-endpoint-drag"), zo({
7466
+ d.releaseInteraction("difference-arrow-endpoint-drag"), Bo({
7448
7467
  dispatch: t.dispatch,
7449
7468
  arrow: e,
7450
7469
  endpoint: c,
@@ -7495,10 +7514,10 @@ var J2 = "ydgo3h1", Q2 = "ydgo3h2", em = "ydgo3h3", tm = ({ clientPoint: e, pane
7495
7514
  return hc({
7496
7515
  layer: s,
7497
7516
  from: n,
7498
- partner: e[Fo(t)].anchor,
7517
+ partner: e[zo(t)].anchor,
7499
7518
  axis: a.axis,
7500
7519
  step: a.step,
7501
- getObservationPoint: (d, u) => La({
7520
+ getObservationPoint: (d, u) => Pa({
7502
7521
  resolver: l,
7503
7522
  layer: s,
7504
7523
  observation: d,
@@ -7515,7 +7534,7 @@ var J2 = "ydgo3h1", Q2 = "ydgo3h2", em = "ydgo3h3", tm = ({ clientPoint: e, pane
7515
7534
  ...e
7516
7535
  });
7517
7536
  }, dm = ({ annotationId: e, ...t }) => {
7518
- const n = Ei(), a = I(() => n.find((o) => o.id === e), [n, e]);
7537
+ const n = Oi(), a = E(() => n.find((o) => o.id === e), [n, e]);
7519
7538
  return a === void 0 ? null : /* @__PURE__ */ r(um, {
7520
7539
  committedArrow: a.committedArrow,
7521
7540
  color: a.color,
@@ -7555,7 +7574,7 @@ var J2 = "ydgo3h1", Q2 = "ydgo3h2", em = "ydgo3h3", tm = ({ clientPoint: e, pane
7555
7574
  top: s.y + o.y - 2,
7556
7575
  width: o.width + 4,
7557
7576
  height: o.height + 4,
7558
- borderRadius: ji(n, 2)
7577
+ borderRadius: Zi(n, 2)
7559
7578
  }
7560
7579
  }),
7561
7580
  /* @__PURE__ */ r(wr, {
@@ -7614,28 +7633,28 @@ var J2 = "ydgo3h1", Q2 = "ydgo3h2", em = "ydgo3h3", tm = ({ clientPoint: e, pane
7614
7633
  "bottom-right",
7615
7634
  "bottom-left"
7616
7635
  ];
7617
- var Bo = ({ width: e, height: t }) => ({
7636
+ var Ho = ({ width: e, height: t }) => ({
7618
7637
  x: de(16, e),
7619
7638
  y: de(16, t)
7620
7639
  }), pm = (e, t) => ({
7621
- x: Vo(t) ? e.x : e.x + e.width,
7622
- y: $o(t) ? e.y : e.y + e.height
7640
+ x: $o(t) ? e.x : e.x + e.width,
7641
+ y: Wo(t) ? e.y : e.y + e.height
7623
7642
  }), Pn = (e) => ({
7624
7643
  x: e.x,
7625
7644
  y: 1 - e.y - e.height,
7626
7645
  width: e.width,
7627
7646
  height: e.height
7628
- }), Ho = ({ region: e, corner: t, delta: n, minSize: a }) => {
7647
+ }), Go = ({ region: e, corner: t, delta: n, minSize: a }) => {
7629
7648
  const o = rn({
7630
7649
  start: e.x,
7631
7650
  extent: e.width,
7632
- isStartMoving: Vo(t),
7651
+ isStartMoving: $o(t),
7633
7652
  delta: n.x,
7634
7653
  minExtent: a.x
7635
7654
  }), i = rn({
7636
7655
  start: e.y,
7637
7656
  extent: e.height,
7638
- isStartMoving: $o(t),
7657
+ isStartMoving: Wo(t),
7639
7658
  delta: n.y,
7640
7659
  minExtent: a.y
7641
7660
  });
@@ -7646,9 +7665,9 @@ var Bo = ({ width: e, height: t }) => ({
7646
7665
  width: o.extent,
7647
7666
  height: i.extent
7648
7667
  };
7649
- }, Go = (e, t) => e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height, Vo = (e) => e === "top-left" || e === "bottom-left", $o = (e) => e === "top-left" || e === "top-right", Wo = (e, t, n, a) => {
7668
+ }, Vo = (e, t) => e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height, $o = (e) => e === "top-left" || e === "bottom-left", Wo = (e) => e === "top-left" || e === "top-right", Uo = (e, t, n, a) => {
7650
7669
  const o = e.textAnnotations.find((i) => i.id === t);
7651
- return o === void 0 ? null : dl(il(o, n), a);
7670
+ return o === void 0 ? null : ul(ll(o, n), a);
7652
7671
  }, mm = "var(--_1ee8fau0)";
7653
7672
  var gm = {
7654
7673
  hovered: "_1ee8fau2 _1ee8fau1",
@@ -7657,7 +7676,7 @@ var gm = {
7657
7676
  hovered: "_1ee8fau5 _1ee8fau4",
7658
7677
  selected: "_1ee8fau6 _1ee8fau4"
7659
7678
  }, fm = ({ panelRect: e }) => {
7660
- const t = Ne(e), n = na(), a = X(), o = Je(), i = J((f) => U(f, "move-drag")), l = J((f) => U(f, "shape-resize-drag")), s = J((f) => U(f, "arrow-endpoint-drag")), c = J((f) => U(f, "text-resize-drag")), h = J(Ni), d = I(() => ({
7679
+ const t = Ne(e), n = na(), a = X(), o = Je(), i = J((f) => U(f, "move-drag")), l = J((f) => U(f, "shape-resize-drag")), s = J((f) => U(f, "arrow-endpoint-drag")), c = J((f) => U(f, "text-resize-drag")), h = J(Ri), d = E(() => ({
7661
7680
  panel: {
7662
7681
  width: e.width,
7663
7682
  height: e.height
@@ -7671,17 +7690,17 @@ var gm = {
7671
7690
  a
7672
7691
  ]), u = Tr(t, o, d), p = Tr(t, h === o ? null : h, d), v = (f) => {
7673
7692
  if (l?.annotationId === f.id) {
7674
- const b = t.shapes.find((w) => w.id === f.id);
7693
+ const b = t.shapes.find((x) => x.id === f.id);
7675
7694
  return b === void 0 ? f.geometry : jr(Pn(l.region), a.annotation.shape(b.id).get("strokeWidth"), d.panel);
7676
7695
  }
7677
7696
  if (s?.annotationId === f.id) {
7678
- const b = t.arrows.find((w) => w.id === f.id);
7679
- return b === void 0 ? f.geometry : ul(Ln(b, s), d.panel) ?? f.geometry;
7697
+ const b = t.arrows.find((x) => x.id === f.id);
7698
+ return b === void 0 ? f.geometry : hl(Ln(b, s), d.panel) ?? f.geometry;
7680
7699
  }
7681
- return c?.annotationId === f.id ? Wo(t, f.id, c, d) ?? f.geometry : f.geometry;
7700
+ return c?.annotationId === f.id ? Uo(t, f.id, c, d) ?? f.geometry : f.geometry;
7682
7701
  }, m = (f) => {
7683
7702
  if (i?.annotationId !== f) return e;
7684
- const b = Do(i.translation, e);
7703
+ const b = _o(i.translation, e);
7685
7704
  return {
7686
7705
  x: e.x + b.x,
7687
7706
  y: e.y + b.y
@@ -7700,7 +7719,7 @@ var gm = {
7700
7719
  })] });
7701
7720
  }, Tr = (e, t, n) => {
7702
7721
  if (t === null) return null;
7703
- const a = Fi(e, t, n);
7722
+ const a = zi(e, t, n);
7704
7723
  return a === null ? null : {
7705
7724
  id: t,
7706
7725
  geometry: a
@@ -7745,7 +7764,7 @@ var gm = {
7745
7764
  }), bm = ({ panelRect: e }) => {
7746
7765
  const t = J((o) => U(o, "move-drag")), n = Ne(e);
7747
7766
  if (t === null) return null;
7748
- const a = Do(t.translation, e);
7767
+ const a = _o(t.translation, e);
7749
7768
  return /* @__PURE__ */ r("svg", {
7750
7769
  "aria-hidden": "true",
7751
7770
  className: kn,
@@ -7760,8 +7779,8 @@ var gm = {
7760
7779
  children: Cm(n, t.annotationId, e)
7761
7780
  });
7762
7781
  }, ym = ({ annotation: e, panel: t }) => {
7763
- const n = Qi(e.id);
7764
- return /* @__PURE__ */ r(qi, {
7782
+ const n = el(e.id);
7783
+ return /* @__PURE__ */ r(Xi, {
7765
7784
  annotation: e,
7766
7785
  panel: t,
7767
7786
  style: X().annotation.text(e.id).resolve(),
@@ -7794,7 +7813,7 @@ var gm = {
7794
7813
  }
7795
7814
  return null;
7796
7815
  }, xm = ({ arrow: e, panelSize: t }) => {
7797
- const n = fn(X(), e.id), a = ba({
7816
+ const n = fn(X(), e.id), a = ya({
7798
7817
  arrow: e,
7799
7818
  style: n,
7800
7819
  panelWidth: t.width,
@@ -7809,7 +7828,7 @@ var gm = {
7809
7828
  shape: e,
7810
7829
  style: X().annotation.shape(e.id).resolve(),
7811
7830
  panel: t
7812
- }), Tm = ({ image: e, panelSize: t }) => /* @__PURE__ */ r(Ji, {
7831
+ }), Tm = ({ image: e, panelSize: t }) => /* @__PURE__ */ r(Qi, {
7813
7832
  image: e,
7814
7833
  panel: t,
7815
7834
  style: X().annotation.image(e.id).resolve()
@@ -7844,7 +7863,7 @@ var gm = {
7844
7863
  horizontal: "o49ib43",
7845
7864
  diagonalDown: "o49ib44",
7846
7865
  diagonalUp: "o49ib45"
7847
- }, Uo = ({ point: e, label: t, pull: n, size: a, attributes: o, dragHandlers: i, keyboardHandlers: l }) => {
7866
+ }, Ko = ({ point: e, label: t, pull: n, size: a, attributes: o, dragHandlers: i, keyboardHandlers: l }) => {
7848
7867
  const s = X().editOutline.selected().resolve().stroke;
7849
7868
  return /* @__PURE__ */ r("div", {
7850
7869
  "aria-label": t,
@@ -7882,28 +7901,28 @@ var gm = {
7882
7901
  key: "graph.annotations.shapeToolbar.border.thick"
7883
7902
  }
7884
7903
  ], Im = (e) => [...an].reverse().find((t) => t.width <= e) ?? an[0], Em = ({ shape: e, shapeBox: t, panelRect: n, frameWidth: a, frameHeight: o, frameElement: i }) => {
7885
- const l = P(), { commands: s } = z(), c = R((C) => C.spec.styles.overrides), h = R((C) => De(C.spec)), d = Ot(), u = X().annotation.shape(e.id).resolve(), p = Im(u.strokeWidth), v = I(() => ({
7904
+ const l = I(), { commands: s } = B(), c = R((C) => C.spec.styles.overrides), h = R((C) => De(C.spec)), d = Ot(), u = X().annotation.shape(e.id).resolve(), p = Im(u.strokeWidth), v = E(() => ({
7886
7905
  target: "annotation",
7887
7906
  kind: "shape",
7888
7907
  annotation: e.id
7889
7908
  }), [e.id]), m = (C, S) => {
7890
- const T = Ae(c, { select: v }, h)?.declarations ?? {};
7909
+ const P = Ae(c, { select: v }, h)?.declarations ?? {};
7891
7910
  s.dispatch(new Oe({
7892
7911
  list: "overrides",
7893
7912
  rule: {
7894
7913
  select: v,
7895
7914
  declarations: {
7896
- ...T,
7915
+ ...P,
7897
7916
  ...C
7898
7917
  }
7899
7918
  }
7900
7919
  }), S);
7901
7920
  }, f = () => {
7902
7921
  s.dispatch(new We({ id: e.id })), i.focus({ preventScroll: !0 });
7903
- }, b = (C) => m({ fill: C }, { transient: !0 }), w = (C) => m({ fillAlpha: C }, { transient: !0 }), x = (C) => () => {
7922
+ }, b = (C) => m({ fill: C }, { transient: !0 }), x = (C) => m({ fillAlpha: C }, { transient: !0 }), w = (C) => () => {
7904
7923
  m({ strokeWidth: C }), d.close();
7905
7924
  };
7906
- return /* @__PURE__ */ g(D.Root, {
7925
+ return /* @__PURE__ */ g(_.Root, {
7907
7926
  anchorBox: t,
7908
7927
  panelRect: n,
7909
7928
  frameWidth: a,
@@ -7911,33 +7930,33 @@ var gm = {
7911
7930
  label: l("graph.annotations.shapeToolbar.label"),
7912
7931
  testId: "shape-toolbar",
7913
7932
  children: [
7914
- /* @__PURE__ */ r(D.ColorPicker, {
7933
+ /* @__PURE__ */ r(_.ColorPicker, {
7915
7934
  color: ut(u.fill),
7916
7935
  label: l("graph.annotations.shapeToolbar.color"),
7917
7936
  onChange: b,
7918
7937
  opacity: u.fillAlpha,
7919
- onOpacityChange: w,
7938
+ onOpacityChange: x,
7920
7939
  ...d.bind("color"),
7921
- children: /* @__PURE__ */ r(D.Swatch, {
7940
+ children: /* @__PURE__ */ r(_.Swatch, {
7922
7941
  color: ut(u.fill),
7923
7942
  opacity: u.fillAlpha
7924
7943
  })
7925
7944
  }),
7926
- /* @__PURE__ */ r(D.Dropdown, {
7945
+ /* @__PURE__ */ r(_.Dropdown, {
7927
7946
  label: l("graph.annotations.shapeToolbar.border.ariaLabel"),
7928
- trigger: /* @__PURE__ */ r(Ro, {
7947
+ trigger: /* @__PURE__ */ r(Do, {
7929
7948
  size: "sm",
7930
7949
  title: ""
7931
7950
  }),
7932
7951
  ...d.bind("border"),
7933
- children: an.map((C) => /* @__PURE__ */ r(D.MenuItem, {
7952
+ children: an.map((C) => /* @__PURE__ */ r(_.MenuItem, {
7934
7953
  isSelected: C.width === p?.width,
7935
- onClick: x(C.width),
7954
+ onClick: w(C.width),
7936
7955
  children: l(C.key)
7937
7956
  }, C.width))
7938
7957
  }),
7939
- /* @__PURE__ */ r(D.Separator, {}),
7940
- /* @__PURE__ */ r(D.IconButton, {
7958
+ /* @__PURE__ */ r(_.Separator, {}),
7959
+ /* @__PURE__ */ r(_.IconButton, {
7941
7960
  label: l("graph.annotations.shapeToolbar.remove"),
7942
7961
  onClick: f,
7943
7962
  children: /* @__PURE__ */ r(Et, {
@@ -7947,9 +7966,9 @@ var gm = {
7947
7966
  })
7948
7967
  ]
7949
7968
  });
7950
- }, Ko = (e) => {
7969
+ }, qo = (e) => {
7951
7970
  const t = ee(e), n = ne(null);
7952
- return _(() => () => n.current?.finish(!1), []), ae((a) => ({ onPointerDown: (o) => {
7971
+ return z(() => () => n.current?.finish(!1), []), ae((a) => ({ onPointerDown: (o) => {
7953
7972
  if (o.button !== 0 || n.current !== null) return;
7954
7973
  try {
7955
7974
  o.currentTarget.setPointerCapture(o.pointerId);
@@ -7985,28 +8004,28 @@ var gm = {
7985
8004
  return s === null ? null : {
7986
8005
  kind: "shape-resize-drag",
7987
8006
  annotationId: t,
7988
- region: Ho({
8007
+ region: Go({
7989
8008
  region: s,
7990
8009
  corner: n,
7991
8010
  delta: Mt(a, e, l),
7992
- minSize: Bo(l)
8011
+ minSize: Ho(l)
7993
8012
  })
7994
8013
  };
7995
8014
  }
7996
8015
  commit({ region: e }) {
7997
8016
  const { annotationId: t, dispatch: n, readInputs: a } = this.params, o = gt(a().annotations, t);
7998
- o === null || Go(o, e) || n(new he({
8017
+ o === null || Vo(o, e) || n(new he({
7999
8018
  kind: "shape",
8000
8019
  id: t,
8001
8020
  patch: { region: e }
8002
8021
  }));
8003
8022
  }
8004
8023
  }, Mm = ({ annotationId: e, panelRect: t }) => {
8005
- const { commands: n } = z(), a = $(), o = ee({
8024
+ const { commands: n } = B(), a = $(), o = ee({
8006
8025
  annotations: R((i) => i.spec.annotations),
8007
8026
  panelRect: t
8008
8027
  });
8009
- return Ko((i, l) => new Om({
8028
+ return qo((i, l) => new Om({
8010
8029
  ...l,
8011
8030
  annotationId: e,
8012
8031
  corner: i,
@@ -8014,9 +8033,9 @@ var gm = {
8014
8033
  editorStore: a,
8015
8034
  dispatch: n.dispatch
8016
8035
  }));
8017
- }, Nm = [" ", "Enter"], qo = (e) => {
8036
+ }, Nm = [" ", "Enter"], Xo = (e) => {
8018
8037
  const t = $(), n = ee(e);
8019
- return _(() => () => Lr(t, n.current), [t, n]), ae((a) => ({ onKeyDown: (o) => {
8038
+ return z(() => () => Lr(t, n.current), [t, n]), ae((a) => ({ onKeyDown: (o) => {
8020
8039
  if (o.altKey || o.ctrlKey || o.metaKey || o.shiftKey) return;
8021
8040
  const i = t.getState(), l = n.current.readHeld();
8022
8041
  if (Nm.includes(o.key)) {
@@ -8038,8 +8057,8 @@ var gm = {
8038
8057
  const n = t.readHeld();
8039
8058
  n !== null && (e.getState().releaseInteraction(n.kind), t.commit(n));
8040
8059
  }, Pr = 4, Rm = ({ annotationId: e, panelRect: t }) => {
8041
- const { commands: n } = z(), a = $(), o = R((i) => i.spec.annotations);
8042
- return qo({
8060
+ const { commands: n } = B(), a = $(), o = R((i) => i.spec.annotations);
8061
+ return Xo({
8043
8062
  readHeld: () => dn(U(a.getState(), "shape-resize-drag"), e),
8044
8063
  claim: () => {
8045
8064
  const i = gt(o, e);
@@ -8054,17 +8073,17 @@ var gm = {
8054
8073
  return c === null ? null : {
8055
8074
  kind: "shape-resize-drag",
8056
8075
  annotationId: e,
8057
- region: Ho({
8076
+ region: Go({
8058
8077
  region: i.region,
8059
8078
  corner: l,
8060
8079
  delta: c,
8061
- minSize: Bo(t)
8080
+ minSize: Ho(t)
8062
8081
  })
8063
8082
  };
8064
8083
  },
8065
8084
  commit: ({ region: i }) => {
8066
8085
  const l = gt(o, e);
8067
- l === null || Go(l, i) || n.dispatch(new he({
8086
+ l === null || Vo(l, i) || n.dispatch(new he({
8068
8087
  kind: "shape",
8069
8088
  id: e,
8070
8089
  patch: { region: i }
@@ -8114,7 +8133,7 @@ var gm = {
8114
8133
  ...e
8115
8134
  });
8116
8135
  }, zm = ({ shape: e, region: t, isSettled: n, isMoved: a, panelRect: o, frameRect: i, frameElement: l }) => {
8117
- const s = P(), c = Mm({
8136
+ const s = I(), c = Mm({
8118
8137
  annotationId: e.id,
8119
8138
  panelRect: o
8120
8139
  }), h = Rm({
@@ -8133,7 +8152,7 @@ var gm = {
8133
8152
  frameElement: l
8134
8153
  }), !a && hm.map((p) => {
8135
8154
  const v = pm(u, p);
8136
- return /* @__PURE__ */ r(Uo, {
8155
+ return /* @__PURE__ */ r(Ko, {
8137
8156
  point: {
8138
8157
  x: o.x + v.x,
8139
8158
  y: o.y + v.y
@@ -8173,15 +8192,15 @@ var gm = {
8173
8192
  strokeLinecap: "round"
8174
8193
  })]
8175
8194
  });
8176
- var vt = "textStyle", Xo = /* @__PURE__ */ new Set(["paragraph", "heading"]), Vm = (e) => {
8177
- const t = jo(e), n = Xm(e);
8195
+ var vt = "textStyle", jo = /* @__PURE__ */ new Set(["paragraph", "heading"]), Vm = (e) => {
8196
+ const t = Zo(e), n = Xm(e);
8178
8197
  return {
8179
8198
  color: lt(t.map((a) => jm($t(a)?.color))),
8180
8199
  font: lt(t.map((a) => qm($t(a)))),
8181
8200
  fontSize: lt(t.map((a) => Zm($t(a)?.fontSize))),
8182
8201
  alignment: lt(n.map((a) => Ym(a.attrs?.textAlign)))
8183
8202
  };
8184
- }, $m = (e, t) => In(e, (n) => n.type === "text" ? Km(n, t) : n), Wm = (e) => jo(e).length > 0, Um = (e, t) => In(e, (n) => Xo.has(n.type ?? "") ? {
8203
+ }, $m = (e, t) => In(e, (n) => n.type === "text" ? Km(n, t) : n), Wm = (e) => Zo(e).length > 0, Um = (e, t) => In(e, (n) => jo.has(n.type ?? "") ? {
8185
8204
  ...n,
8186
8205
  attrs: {
8187
8206
  ...n.attrs,
@@ -8202,11 +8221,11 @@ var vt = "textStyle", Xo = /* @__PURE__ */ new Set(["paragraph", "heading"]), Vm
8202
8221
  ...e,
8203
8222
  marks: a === void 0 ? [...n, o] : n.map((i) => i === a ? o : i)
8204
8223
  };
8205
- }, $t = (e) => e.marks?.find((t) => t.type === vt)?.attrs, qm = (e) => _n(e?.font) ?? _n(e?.fontFamily), jo = (e) => En(e, (t) => t.type === "text"), Xm = (e) => En(e, (t) => Xo.has(t.type ?? "")), En = (e, t) => [...t(e) ? [e] : [], ...(e.content ?? []).flatMap((n) => En(n, t))], lt = (e) => {
8224
+ }, $t = (e) => e.marks?.find((t) => t.type === vt)?.attrs, qm = (e) => _n(e?.font) ?? _n(e?.fontFamily), Zo = (e) => En(e, (t) => t.type === "text"), Xm = (e) => En(e, (t) => jo.has(t.type ?? "")), En = (e, t) => [...t(e) ? [e] : [], ...(e.content ?? []).flatMap((n) => En(n, t))], lt = (e) => {
8206
8225
  const [t, ...n] = e;
8207
8226
  return t === void 0 ? null : n.every((a) => a === t) ? t : null;
8208
8227
  }, jm = (e) => typeof e == "string" && e.length > 0 ? e : void 0, Zm = (e) => typeof e == "number" && Number.isFinite(e) ? e : void 0, Ym = (e) => e === "left" || e === "center" || e === "right" ? e : void 0;
8209
- var Zo = [
8228
+ var Yo = [
8210
8229
  {
8211
8230
  id: "modern",
8212
8231
  key: "graph.annotations.textToolbar.font.modern"
@@ -8230,9 +8249,9 @@ var Zo = [
8230
8249
  ].map(({ id: e, key: t }) => ({
8231
8250
  id: e,
8232
8251
  key: t,
8233
- fontFamily: Ki[e] ?? e
8234
- })), Jm = (e) => Zo.find((t) => t.id === (e ?? "modern")) ?? null;
8235
- var Yo = [
8252
+ fontFamily: qi[e] ?? e
8253
+ })), Jm = (e) => Yo.find((t) => t.id === (e ?? "modern")) ?? null;
8254
+ var Jo = [
8236
8255
  {
8237
8256
  size: 12,
8238
8257
  key: "graph.annotations.textToolbar.fontSize.small"
@@ -8253,30 +8272,30 @@ var Yo = [
8253
8272
  size: 30,
8254
8273
  key: "graph.annotations.textToolbar.fontSize.huge"
8255
8274
  }
8256
- ], Qm = (e) => Yo.find((t) => t.size === (e ?? 15)) ?? null, eg = (e) => `${e}px`, tg = [
8275
+ ], Qm = (e) => Jo.find((t) => t.size === (e ?? 15)) ?? null, eg = (e) => `${e}px`, tg = [
8257
8276
  {
8258
8277
  alignment: "left",
8259
- Icon: co
8278
+ Icon: uo
8260
8279
  },
8261
8280
  {
8262
8281
  alignment: "center",
8263
- Icon: lo
8282
+ Icon: so
8264
8283
  },
8265
8284
  {
8266
8285
  alignment: "right",
8267
- Icon: so
8286
+ Icon: co
8268
8287
  }
8269
8288
  ], ng = ({ annotation: e, textBox: t, panelRect: n, frameWidth: a, frameHeight: o, frameElement: i }) => {
8270
- const l = P(), { commands: s } = z(), c = R((y) => y.spec.styles.overrides), h = R((y) => De(y.spec)), d = $(), u = Ot(), p = X().annotation.text(e.id).resolve(), v = Vm(e.content), m = Jm(v.font), f = Qm(v.fontSize), b = v.color ?? p.textColor, w = I(() => ({
8289
+ const l = I(), { commands: s } = B(), c = R((y) => y.spec.styles.overrides), h = R((y) => De(y.spec)), d = $(), u = Ot(), p = X().annotation.text(e.id).resolve(), v = Vm(e.content), m = Jm(v.font), f = Qm(v.fontSize), b = v.color ?? p.textColor, x = E(() => ({
8271
8290
  target: "annotation",
8272
8291
  kind: "text",
8273
8292
  annotation: e.id
8274
- }), [e.id]), x = (y, V) => {
8275
- const re = Ae(c, { select: w }, h)?.declarations ?? {};
8293
+ }), [e.id]), w = (y, V) => {
8294
+ const re = Ae(c, { select: x }, h)?.declarations ?? {};
8276
8295
  s.dispatch(new Oe({
8277
8296
  list: "overrides",
8278
8297
  rule: {
8279
- select: w,
8298
+ select: x,
8280
8299
  declarations: {
8281
8300
  ...re,
8282
8301
  ...y
@@ -8289,7 +8308,7 @@ var Yo = [
8289
8308
  id: e.id,
8290
8309
  patch: y
8291
8310
  }), V);
8292
- }, S = () => d.getState().caret?.editor?.getJSON() ?? e.content, T = (y, V) => {
8311
+ }, S = () => d.getState().caret?.editor?.getJSON() ?? e.content, P = (y, V) => {
8293
8312
  const re = S(), xe = d.getState().caret?.editor ?? null;
8294
8313
  if (xe !== null && !Wm(re)) {
8295
8314
  xe.chain().focus().setMark(vt, y).run();
@@ -8298,12 +8317,12 @@ var Yo = [
8298
8317
  C({ content: $m(re, y) }, V);
8299
8318
  }, k = () => {
8300
8319
  s.dispatch(new We({ id: e.id })), i.focus({ preventScroll: !0 });
8301
- }, O = (y) => x(rg(y), { transient: !0 }), H = (y) => T({ color: y }, { transient: !0 }), F = (y) => () => {
8302
- T({ font: y }), u.close();
8320
+ }, T = (y) => w(rg(y), { transient: !0 }), F = (y) => P({ color: y }, { transient: !0 }), D = (y) => () => {
8321
+ P({ font: y }), u.close();
8303
8322
  }, M = (y) => () => {
8304
- T({ fontSize: y }), u.close();
8323
+ P({ fontSize: y }), u.close();
8305
8324
  }, N = (y) => C({ content: Um(S(), y) });
8306
- return /* @__PURE__ */ g(D.Root, {
8325
+ return /* @__PURE__ */ g(_.Root, {
8307
8326
  anchorBox: t,
8308
8327
  panelRect: n,
8309
8328
  frameWidth: a,
@@ -8311,18 +8330,18 @@ var Yo = [
8311
8330
  label: l("graph.annotations.textToolbar.label"),
8312
8331
  testId: "text-toolbar",
8313
8332
  children: [
8314
- /* @__PURE__ */ r(D.ColorPicker, {
8333
+ /* @__PURE__ */ r(_.ColorPicker, {
8315
8334
  color: ut(p.fill),
8316
8335
  label: l("graph.annotations.textToolbar.background"),
8317
8336
  hasTransparentOption: !0,
8318
- onChange: O,
8337
+ onChange: T,
8319
8338
  ...u.bind("background"),
8320
- children: /* @__PURE__ */ r(D.Swatch, { color: p.fill === "transparent" ? mu : ut(p.fill) })
8339
+ children: /* @__PURE__ */ r(_.Swatch, { color: p.fill === "transparent" ? mu : ut(p.fill) })
8321
8340
  }),
8322
- /* @__PURE__ */ r(D.ColorPicker, {
8341
+ /* @__PURE__ */ r(_.ColorPicker, {
8323
8342
  color: b,
8324
8343
  label: l("graph.annotations.textToolbar.color"),
8325
- onChange: H,
8344
+ onChange: F,
8326
8345
  ...u.bind("color"),
8327
8346
  children: /* @__PURE__ */ r(Gm, {
8328
8347
  size: "sm",
@@ -8330,27 +8349,27 @@ var Yo = [
8330
8349
  title: ""
8331
8350
  })
8332
8351
  }),
8333
- /* @__PURE__ */ r(D.Dropdown, {
8352
+ /* @__PURE__ */ r(_.Dropdown, {
8334
8353
  label: l("graph.annotations.textToolbar.font.ariaLabel"),
8335
8354
  trigger: /* @__PURE__ */ r("span", {
8336
8355
  style: { fontFamily: m?.fontFamily },
8337
8356
  children: "Aa"
8338
8357
  }),
8339
8358
  ...u.bind("font"),
8340
- children: Zo.map((y) => /* @__PURE__ */ r(D.MenuItem, {
8359
+ children: Yo.map((y) => /* @__PURE__ */ r(_.MenuItem, {
8341
8360
  isSelected: y.id === m?.id,
8342
- onClick: F(y.id),
8361
+ onClick: D(y.id),
8343
8362
  children: /* @__PURE__ */ r("span", {
8344
8363
  style: { fontFamily: y.fontFamily },
8345
8364
  children: l(y.key)
8346
8365
  })
8347
8366
  }, y.id))
8348
8367
  }),
8349
- /* @__PURE__ */ r(D.Dropdown, {
8368
+ /* @__PURE__ */ r(_.Dropdown, {
8350
8369
  label: l("graph.annotations.textToolbar.fontSize.ariaLabel"),
8351
8370
  trigger: f === null ? "" : l(f.key),
8352
8371
  ...u.bind("fontSize"),
8353
- children: Yo.map((y) => /* @__PURE__ */ r(D.MenuItem, {
8372
+ children: Jo.map((y) => /* @__PURE__ */ r(_.MenuItem, {
8354
8373
  isSelected: y.size === f?.size,
8355
8374
  onClick: M(y.size),
8356
8375
  children: /* @__PURE__ */ r("span", {
@@ -8359,13 +8378,13 @@ var Yo = [
8359
8378
  })
8360
8379
  }, y.size))
8361
8380
  }),
8362
- /* @__PURE__ */ r(D.Separator, {}),
8381
+ /* @__PURE__ */ r(_.Separator, {}),
8363
8382
  /* @__PURE__ */ r(ag, {
8364
8383
  current: v.alignment ?? "center",
8365
8384
  onPick: N
8366
8385
  }),
8367
- /* @__PURE__ */ r(D.Separator, {}),
8368
- /* @__PURE__ */ r(D.IconButton, {
8386
+ /* @__PURE__ */ r(_.Separator, {}),
8387
+ /* @__PURE__ */ r(_.IconButton, {
8369
8388
  label: l("graph.annotations.textToolbar.remove"),
8370
8389
  onClick: k,
8371
8390
  children: /* @__PURE__ */ r(Et, {
@@ -8375,12 +8394,12 @@ var Yo = [
8375
8394
  })
8376
8395
  ]
8377
8396
  });
8378
- }, rg = (e) => e === "transparent" ? { fill: Ga } : {
8397
+ }, rg = (e) => e === "transparent" ? { fill: Va } : {
8379
8398
  fill: e,
8380
8399
  fillAlpha: ku(e) ? ds : 1
8381
8400
  }, ag = ({ current: e, onPick: t }) => {
8382
- const n = P(), a = (o) => () => t(o);
8383
- return /* @__PURE__ */ r(q, { children: tg.map((o) => /* @__PURE__ */ r(D.ToggleButton, {
8401
+ const n = I(), a = (o) => () => t(o);
8402
+ return /* @__PURE__ */ r(q, { children: tg.map((o) => /* @__PURE__ */ r(_.ToggleButton, {
8384
8403
  label: n(`graph.annotations.textToolbar.align.${o.alignment}`),
8385
8404
  isPressed: o.alignment === e,
8386
8405
  onClick: a(o.alignment),
@@ -8390,10 +8409,10 @@ var Yo = [
8390
8409
  })
8391
8410
  }, o.alignment)) });
8392
8411
  }, og = ["left", "right"];
8393
- var Jo = ({ width: e }) => de(60, e), ig = (e, t) => ({
8412
+ var Qo = ({ width: e }) => de(60, e), ig = (e, t) => ({
8394
8413
  x: t === "left" ? e.x : e.x + e.width,
8395
8414
  y: e.y + e.height / 2
8396
- }), Qo = ({ at: e, width: t, align: n, edge: a, delta: o, minWidth: i, panelWidth: l }) => {
8415
+ }), ei = ({ at: e, width: t, align: n, edge: a, delta: o, minWidth: i, panelWidth: l }) => {
8397
8416
  if (o === 0) return {
8398
8417
  at: e,
8399
8418
  width: t,
@@ -8414,7 +8433,7 @@ var Jo = ({ width: e }) => de(60, e), ig = (e, t) => ({
8414
8433
  width: h.extent,
8415
8434
  shift: d - e.x
8416
8435
  };
8417
- }, ei = (e, t) => e.at.x === t.at.x && e.width === t.width, lg = (e, t) => e?.x === void 0 ? 0 : e.unit === "px" ? de(e.x, t) : e.x, ft = (e, t) => {
8436
+ }, ti = (e, t) => e.at.x === t.at.x && e.width === t.width, lg = (e, t) => e?.x === void 0 ? 0 : e.unit === "px" ? de(e.x, t) : e.x, ft = (e, t) => {
8418
8437
  const n = e.textAnnotations.find((a) => a.id === t);
8419
8438
  return n === void 0 || n.at.anchorType !== "panel" ? null : {
8420
8439
  at: n.at,
@@ -8436,18 +8455,18 @@ var Jo = ({ width: e }) => de(60, e), ig = (e, t) => ({
8436
8455
  kind: "text-resize-drag",
8437
8456
  annotationId: t,
8438
8457
  delta: c,
8439
- ...Qo({
8458
+ ...ei({
8440
8459
  ...s,
8441
8460
  edge: n,
8442
8461
  delta: c,
8443
- minWidth: Jo(l),
8462
+ minWidth: Qo(l),
8444
8463
  panelWidth: l.width
8445
8464
  })
8446
8465
  };
8447
8466
  }
8448
8467
  commit(e) {
8449
8468
  const { annotationId: t, dispatch: n, readInputs: a } = this.params, o = ft(a().annotations, t);
8450
- o === null || ei(o, e) || n(new he({
8469
+ o === null || ti(o, e) || n(new he({
8451
8470
  kind: "text",
8452
8471
  id: t,
8453
8472
  patch: {
@@ -8457,11 +8476,11 @@ var Jo = ({ width: e }) => de(60, e), ig = (e, t) => ({
8457
8476
  }));
8458
8477
  }
8459
8478
  }, cg = ({ annotationId: e, panelRect: t }) => {
8460
- const { commands: n } = z(), a = $(), o = ee({
8479
+ const { commands: n } = B(), a = $(), o = ee({
8461
8480
  annotations: R((i) => i.spec.annotations),
8462
8481
  panelRect: t
8463
8482
  });
8464
- return Ko((i, l) => new sg({
8483
+ return qo((i, l) => new sg({
8465
8484
  ...l,
8466
8485
  annotationId: e,
8467
8486
  edge: i,
@@ -8470,22 +8489,22 @@ var Jo = ({ width: e }) => de(60, e), ig = (e, t) => ({
8470
8489
  dispatch: n.dispatch
8471
8490
  }));
8472
8491
  }, dg = 4, ug = ({ annotationId: e, panelRect: t }) => {
8473
- const { commands: n } = z(), a = $(), o = R((l) => l.spec.annotations), i = (l, s) => {
8492
+ const { commands: n } = B(), a = $(), o = R((l) => l.spec.annotations), i = (l, s) => {
8474
8493
  const c = ft(o, e);
8475
8494
  return c === null ? null : {
8476
8495
  kind: "text-resize-drag",
8477
8496
  annotationId: e,
8478
8497
  delta: s,
8479
- ...Qo({
8498
+ ...ei({
8480
8499
  ...c,
8481
8500
  edge: l,
8482
8501
  delta: s,
8483
- minWidth: Jo(t),
8502
+ minWidth: Qo(t),
8484
8503
  panelWidth: t.width
8485
8504
  })
8486
8505
  };
8487
8506
  };
8488
- return qo({
8507
+ return Xo({
8489
8508
  readHeld: () => un(U(a.getState(), "text-resize-drag"), e),
8490
8509
  claim: (l) => i(l, 0),
8491
8510
  step: (l, s, c) => {
@@ -8494,7 +8513,7 @@ var Jo = ({ width: e }) => de(60, e), ig = (e, t) => ({
8494
8513
  },
8495
8514
  commit: (l) => {
8496
8515
  const s = ft(o, e);
8497
- s === null || ei(s, l) || n.dispatch(new he({
8516
+ s === null || ti(s, l) || n.dispatch(new he({
8498
8517
  kind: "text",
8499
8518
  id: e,
8500
8519
  patch: {
@@ -8526,7 +8545,7 @@ var Jo = ({ width: e }) => de(60, e), ig = (e, t) => ({
8526
8545
  ...e
8527
8546
  });
8528
8547
  }, mg = ({ annotation: e, textBox: t, isSettled: n, isMoved: a, isResizable: o, hasCaret: i, panelRect: l, frameRect: s, frameElement: c }) => {
8529
- const h = P(), d = cg({
8548
+ const h = I(), d = cg({
8530
8549
  annotationId: e.id,
8531
8550
  panelRect: l
8532
8551
  }), u = ug({
@@ -8545,7 +8564,7 @@ var Jo = ({ width: e }) => de(60, e), ig = (e, t) => ({
8545
8564
  frameElement: c
8546
8565
  }), o && !a && !i && og.map((p) => {
8547
8566
  const v = ig(t, p);
8548
- return /* @__PURE__ */ r(Uo, {
8567
+ return /* @__PURE__ */ r(Ko, {
8549
8568
  point: {
8550
8569
  x: l.x + v.x,
8551
8570
  y: l.y + v.y
@@ -8572,7 +8591,7 @@ var Jo = ({ width: e }) => de(60, e), ig = (e, t) => ({
8572
8591
  resized: un(U(t, "text-resize-drag"), e),
8573
8592
  isMoved: Ct(U(t, "move-drag"), e) !== null
8574
8593
  })), fg = (e, t, n) => {
8575
- const a = Ne(e), o = na(), i = X(), l = I(() => ({
8594
+ const a = Ne(e), o = na(), i = X(), l = E(() => ({
8576
8595
  panel: {
8577
8596
  width: e.width,
8578
8597
  height: e.height
@@ -8585,7 +8604,7 @@ var Jo = ({ width: e }) => de(60, e), ig = (e, t) => ({
8585
8604
  o,
8586
8605
  i
8587
8606
  ]);
8588
- return t === null ? null : Wo(a, t, n, l)?.rect ?? null;
8607
+ return t === null ? null : Uo(a, t, n, l)?.rect ?? null;
8589
8608
  }, bg = (e) => /* @__PURE__ */ r(L, {
8590
8609
  ...e,
8591
8610
  children: /* @__PURE__ */ g("g", {
@@ -8608,7 +8627,7 @@ var xg = "_1tyillx2", wg = {
8608
8627
  closed: "_1tyillx7",
8609
8628
  open: "_1tyillx8"
8610
8629
  }, kg = ({ interaction: e, panelRect: t }) => {
8611
- const n = $(), a = X().editOutline.selected().resolve().stroke, o = e.kind === "trigger" || e.kind === "menu" ? e.anchor : null, i = Lg(e), l = I(() => {
8630
+ const n = $(), a = X().editOutline.selected().resolve().stroke, o = e.kind === "trigger" || e.kind === "menu" ? e.anchor : null, i = Lg(e), l = E(() => {
8612
8631
  if (o === null) return null;
8613
8632
  const s = dt(o.position, t);
8614
8633
  return {
@@ -8624,9 +8643,9 @@ var xg = "_1tyillx2", wg = {
8624
8643
  t,
8625
8644
  i
8626
8645
  ]);
8627
- return _(() => {
8646
+ return z(() => {
8628
8647
  n.getState().setMenuTrigger(l);
8629
- }, [n, l]), _(() => () => n.getState().setMenuTrigger(null), [n]), o === null || l === null ? null : /* @__PURE__ */ r("div", {
8648
+ }, [n, l]), z(() => () => n.getState().setMenuTrigger(null), [n]), o === null || l === null ? null : /* @__PURE__ */ r("div", {
8630
8649
  "aria-hidden": "true",
8631
8650
  "data-testid": "observation-menu-trigger",
8632
8651
  "data-state": i,
@@ -8645,11 +8664,11 @@ var xg = "_1tyillx2", wg = {
8645
8664
  })
8646
8665
  });
8647
8666
  }, Lg = (e) => e.kind === "menu" ? "open" : e.kind === "trigger" && e.isEngaged ? "hovered" : "rest", Pg = 'button:not([disabled]):not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])', Ig = (e, t) => {
8648
- const { chartId: n } = z(), a = $();
8649
- _(() => {
8667
+ const { chartId: n } = B(), a = $();
8668
+ z(() => {
8650
8669
  if (t === null) return;
8651
8670
  const o = (i) => {
8652
- if (i.key !== "Tab" || i.defaultPrevented || !Xe(i.target, e, n) || Wa(i.target) || a.getState().standingInteraction?.kind === "chrome-popup") return;
8671
+ if (i.key !== "Tab" || i.defaultPrevented || !Xe(i.target, e, n) || Ua(i.target) || a.getState().standingInteraction?.kind === "chrome-popup") return;
8653
8672
  const l = [...t.querySelectorAll(Pg)];
8654
8673
  if (l.length === 0) return;
8655
8674
  i.preventDefault();
@@ -8663,12 +8682,12 @@ var xg = "_1tyillx2", wg = {
8663
8682
  n,
8664
8683
  a
8665
8684
  ]);
8666
- }, Eg = (e, t) => typeof document.elementsFromPoint == "function" ? document.elementsFromPoint(e, t) : [], ti = (e, t, n) => yt(Eg(e, t), n), Og = (e) => {
8667
- const { selectionStore: t, chartId: n } = z(), a = $();
8668
- _(() => {
8685
+ }, Eg = (e, t) => typeof document.elementsFromPoint == "function" ? document.elementsFromPoint(e, t) : [], ni = (e, t, n) => yt(Eg(e, t), n), Og = (e) => {
8686
+ const { selectionStore: t, chartId: n } = B(), a = $();
8687
+ z(() => {
8669
8688
  let o = null;
8670
8689
  const i = (c) => {
8671
- const { caret: h } = a.getState(), d = h === null ? null : ti(c.clientX, c.clientY, e);
8690
+ const { caret: h } = a.getState(), d = h === null ? null : ni(c.clientX, c.clientY, e);
8672
8691
  d?.kind === "annotation" && d.target.id === h?.annotationId || e.focus({ preventScroll: !0 });
8673
8692
  }, l = (c) => {
8674
8693
  const { selection: h, clearSelection: d } = t.getState();
@@ -8693,7 +8712,7 @@ var xg = "_1tyillx2", wg = {
8693
8712
  const n = t.legends[e.part.legendIndex], a = n?.items[e.part.itemIndex];
8694
8713
  if (n === void 0 || a === void 0) return null;
8695
8714
  const o = Ng(n, a.layerId, t.layers);
8696
- return o === null ? null : fa({
8715
+ return o === null ? null : ba({
8697
8716
  layer: o.layer,
8698
8717
  scope: "series",
8699
8718
  variable: o.variable,
@@ -8735,7 +8754,7 @@ var xg = "_1tyillx2", wg = {
8735
8754
  if (!o.interactive) continue;
8736
8755
  const i = ic(o.mapping);
8737
8756
  if (i === null) continue;
8738
- const l = fa({
8757
+ const l = ba({
8739
8758
  layer: o,
8740
8759
  scope: "x-value",
8741
8760
  variable: i,
@@ -8753,7 +8772,7 @@ var xg = "_1tyillx2", wg = {
8753
8772
  if (o === null) return null;
8754
8773
  const l = ve(t, o.layerId);
8755
8774
  if (l === void 0) return null;
8756
- const s = ka(o), c = i?.intersects !== !1, h = Us(l), d = c || !Bs(n) ? [h] : ["x-value", h];
8775
+ const s = La(o), c = i?.intersects !== !1, h = Us(l), d = c || !Bs(n) ? [h] : ["x-value", h];
8757
8776
  for (const u of d) {
8758
8777
  const p = wt({
8759
8778
  layer: l,
@@ -8778,7 +8797,7 @@ var xg = "_1tyillx2", wg = {
8778
8797
  scope: "data-point",
8779
8798
  parsingLocale: n
8780
8799
  });
8781
- }, ni = (e, t) => {
8800
+ }, ri = (e, t) => {
8782
8801
  const { target: n, clientX: a, clientY: o } = e, { frameElement: i, captureRect: l, menuTrigger: s, panelOrigin: c, resolvesObservations: h, scene: d } = t, u = s !== null && vn({
8783
8802
  x: a - c.x,
8784
8803
  y: o - c.y
@@ -8810,7 +8829,7 @@ var xg = "_1tyillx2", wg = {
8810
8829
  return t.width > 0 && t.height > 0 ? t : null;
8811
8830
  }, Ir = (e, t, n, { paintsAnnotations: a, resolvesGuides: o, frameElement: i, scene: l }) => {
8812
8831
  if (!a && l.coordSystem.type === "cartesian" && e && t) return null;
8813
- const s = e || a ? ti(n.clientX, n.clientY, i) : Hg(n.target, i);
8832
+ const s = e || a ? ni(n.clientX, n.clientY, i) : Hg(n.target, i);
8814
8833
  return s === null ? null : (s.kind === "annotation" ? a : o) ? s : null;
8815
8834
  }, Hg = (e, t) => e instanceof Element ? yt([e], t) : null, Gg = (e, t, n) => {
8816
8835
  const a = {
@@ -8837,7 +8856,7 @@ var xg = "_1tyillx2", wg = {
8837
8856
  }
8838
8857
  commit({ translation: e }) {
8839
8858
  const { annotationId: t, dispatch: n } = this.params;
8840
- P2(e) && n(new Pl({
8859
+ P2(e) && n(new Il({
8841
8860
  id: t,
8842
8861
  translation: e
8843
8862
  }));
@@ -8874,34 +8893,34 @@ var xg = "_1tyillx2", wg = {
8874
8893
  target: e,
8875
8894
  observationIndex: n ? t : null
8876
8895
  }, Ug = (e, t, n, a, o) => {
8877
- const { commands: i, selectionStore: l, store: s } = z(), c = $(), h = R((b) => b.spec.annotations), d = Re[Le()], u = ee(d.graphPress), p = ee({
8896
+ const { commands: i, selectionStore: l, store: s } = B(), c = $(), h = R((b) => b.spec.annotations), d = Re[Le()], u = ee(d.graphPress), p = ee({
8878
8897
  annotations: h,
8879
8898
  panelRect: n
8880
8899
  }), v = ee(t), m = ee(o), f = ne(null);
8881
- _(() => () => f.current?.finish(!1), []), _(() => l.subscribe(({ selection: b }) => {
8882
- const w = c.getState().pressedObservation, [x, ...C] = b, S = x !== void 0 && C.length === 0 && w !== null && va(x, w.selectedFor);
8883
- w !== null && !S && c.getState().setPressedObservation(null);
8884
- }), [c, l]), _(() => {
8885
- const b = (k) => ni({
8900
+ z(() => () => f.current?.finish(!1), []), z(() => l.subscribe(({ selection: b }) => {
8901
+ const x = c.getState().pressedObservation, [w, ...C] = b, S = w !== void 0 && C.length === 0 && x !== null && fa(w, x.selectedFor);
8902
+ x !== null && !S && c.getState().setPressedObservation(null);
8903
+ }), [c, l]), z(() => {
8904
+ const b = (k) => ri({
8886
8905
  target: k.target,
8887
8906
  clientX: k.clientX,
8888
8907
  clientY: k.clientY
8889
- }, a()).targetAtPoint, w = (k) => {
8908
+ }, a()).targetAtPoint, x = (k) => {
8890
8909
  if (!(k.target instanceof Element)) return !1;
8891
- const O = k.target.closest(Kr);
8892
- return O !== null && e.contains(O) && yt([k.target], e) === null;
8893
- }, x = (k, O) => {
8894
- if (f.current !== null || !sl(p.current.annotations, O.id)) return;
8910
+ const T = k.target.closest(Kr);
8911
+ return T !== null && e.contains(T) && yt([k.target], e) === null;
8912
+ }, w = (k, T) => {
8913
+ if (f.current !== null || !cl(p.current.annotations, T.id)) return;
8895
8914
  try {
8896
8915
  e.setPointerCapture(k.pointerId);
8897
8916
  } catch {
8898
8917
  return;
8899
8918
  }
8900
8919
  k.preventDefault();
8901
- const H = new Vg({
8920
+ const F = new Vg({
8902
8921
  handle: e,
8903
8922
  pointerId: k.pointerId,
8904
- annotationId: O.id,
8923
+ annotationId: T.id,
8905
8924
  press: {
8906
8925
  x: k.clientX,
8907
8926
  y: k.clientY
@@ -8913,39 +8932,39 @@ var xg = "_1tyillx2", wg = {
8913
8932
  f.current = null;
8914
8933
  }
8915
8934
  });
8916
- f.current = H, H.start();
8917
- }, C = (k, O) => {
8918
- const H = l.getState(), { layers: F, config: M } = s.getState().scene, N = O.kind === "select-observations" && O.observationIndex !== null ? Vi(O.observationIndex, F, O.target, M.parsingLocale) : null;
8919
- switch (c.getState().setPressedObservation(N), O.kind) {
8935
+ f.current = F, F.start();
8936
+ }, C = (k, T) => {
8937
+ const F = l.getState(), { layers: D, config: M } = s.getState().scene, N = T.kind === "select-observations" && T.observationIndex !== null ? $i(T.observationIndex, D, T.target, M.parsingLocale) : null;
8938
+ switch (c.getState().setPressedObservation(N), T.kind) {
8920
8939
  case "select-annotation":
8921
- H.setSelection([O.target]), x(k, O.target);
8940
+ F.setSelection([T.target]), w(k, T.target);
8922
8941
  return;
8923
8942
  case "select-observations":
8924
8943
  case "select-band":
8925
8944
  case "select-guide":
8926
8945
  case "select-graph":
8927
- H.setSelection([O.target]);
8946
+ F.setSelection([T.target]);
8928
8947
  return;
8929
8948
  case "clear":
8930
- H.clearSelection();
8949
+ F.clearSelection();
8931
8950
  return;
8932
8951
  default:
8933
- throw new Al({ message: `No press outcome for: ${JSON.stringify(O)}` });
8952
+ throw new kl({ message: `No press outcome for: ${JSON.stringify(T)}` });
8934
8953
  }
8935
8954
  }, S = (k) => {
8936
- if (k.button !== 0 || Xt(k.target) || Ua(k, v.current, c.getState().menuTrigger) || w(k)) return;
8937
- const O = $g(b(k), {
8955
+ if (k.button !== 0 || Xt(k.target) || Ka(k, v.current, c.getState().menuTrigger) || x(k)) return;
8956
+ const T = $g(b(k), {
8938
8957
  canSelectGraph: u.current,
8939
8958
  isWithinFrame: k.target instanceof Node && e.contains(k.target),
8940
8959
  caretAnnotationId: c.getState().caret?.annotationId ?? null
8941
8960
  });
8942
- O.kind !== "keep-caret" && (c.getState().setCaret(null), C(k, O));
8943
- }, T = (k) => {
8944
- if (Xt(k.target) || w(k)) return;
8945
- const O = b(k), { layers: H, guides: F, config: M } = s.getState().scene, N = l.getState(), y = c.getState();
8946
- switch (O?.kind) {
8961
+ T.kind !== "keep-caret" && (c.getState().setCaret(null), C(k, T));
8962
+ }, P = (k) => {
8963
+ if (Xt(k.target) || x(k)) return;
8964
+ const T = b(k), { layers: F, guides: D, config: M } = s.getState().scene, N = l.getState(), y = c.getState();
8965
+ switch (T?.kind) {
8947
8966
  case "observations": {
8948
- const { observations: V } = O, re = zg(V, H, M.parsingLocale);
8967
+ const { observations: V } = T, re = zg(V, F, M.parsingLocale);
8949
8968
  if (re === null) return;
8950
8969
  const { observationIndex: xe } = V;
8951
8970
  y.setPressedObservation({
@@ -8957,9 +8976,9 @@ var xg = "_1tyillx2", wg = {
8957
8976
  }
8958
8977
  case "axis":
8959
8978
  case "legend": {
8960
- const V = Mg(O, {
8961
- layers: H,
8962
- legends: F.legends.drawn,
8979
+ const V = Mg(T, {
8980
+ layers: F,
8981
+ legends: D.legends.drawn,
8963
8982
  formattedAxes: m.current,
8964
8983
  parsingLocale: M.parsingLocale
8965
8984
  });
@@ -8968,7 +8987,7 @@ var xg = "_1tyillx2", wg = {
8968
8987
  return;
8969
8988
  }
8970
8989
  case "annotation": {
8971
- const { target: V } = O;
8990
+ const { target: V } = T;
8972
8991
  if (!p.current.annotations.textAnnotations.some((re) => re.id === V.id)) return;
8973
8992
  N.setSelection([V]), y.setCaret(V.id);
8974
8993
  return;
@@ -8979,8 +8998,8 @@ var xg = "_1tyillx2", wg = {
8979
8998
  return;
8980
8999
  }
8981
9000
  };
8982
- return document.addEventListener("pointerdown", S), document.addEventListener("dblclick", T), () => {
8983
- document.removeEventListener("pointerdown", S), document.removeEventListener("dblclick", T);
9001
+ return document.addEventListener("pointerdown", S), document.addEventListener("dblclick", P), () => {
9002
+ document.removeEventListener("pointerdown", S), document.removeEventListener("dblclick", P);
8984
9003
  };
8985
9004
  }, [
8986
9005
  e,
@@ -8995,7 +9014,7 @@ var xg = "_1tyillx2", wg = {
8995
9014
  a
8996
9015
  ]);
8997
9016
  }, Kg = (e) => {
8998
- const { selectionStore: t, commands: n, chartId: a } = z(), o = $(), i = ee(R((d) => d.spec.annotations.textAnnotations)), { annotations: l } = Re[Le()], s = ae((d) => {
9017
+ const { selectionStore: t, commands: n, chartId: a } = B(), o = $(), i = ee(R((d) => d.spec.annotations.textAnnotations)), { annotations: l } = Re[Le()], s = ae((d) => {
8999
9018
  const { selection: u } = t.getState(), p = l ? nn(u) : null;
9000
9019
  p !== null && (d.preventDefault(), n.dispatch(new We({ id: p })), e.focus({ preventScroll: !0 }));
9001
9020
  }, [
@@ -9030,9 +9049,9 @@ var xg = "_1tyillx2", wg = {
9030
9049
  e,
9031
9050
  a
9032
9051
  ]);
9033
- _(() => {
9052
+ z(() => {
9034
9053
  const d = (u) => {
9035
- if (!Xe(u.target, e, a) || Wa(u.target)) return;
9054
+ if (!Xe(u.target, e, a) || Ua(u.target)) return;
9036
9055
  const p = qg(u.target), v = o.getState().caret !== null && !ct(u.target, a);
9037
9056
  if (!(p && !v))
9038
9057
  switch (u.key) {
@@ -9057,7 +9076,7 @@ var xg = "_1tyillx2", wg = {
9057
9076
  o
9058
9077
  ]);
9059
9078
  }, qg = (e) => e instanceof HTMLElement && (e.isContentEditable || e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement), Xg = (e, t) => {
9060
- const n = $(), { store: a } = z(), { engine: o, overlayRef: i } = je(), l = ee(t), { annotations: s, observationsPress: c, guidePress: h, tolerance: d } = Re[Le()], u = nl(), p = c && !u;
9079
+ const n = $(), { store: a } = B(), { engine: o, overlayRef: i } = je(), l = ee(t), { annotations: s, observationsPress: c, guidePress: h, tolerance: d } = Re[Le()], u = rl(), p = c && !u;
9061
9080
  return ae(() => ({
9062
9081
  frameElement: e,
9063
9082
  captureRect: i.current,
@@ -9082,11 +9101,11 @@ var xg = "_1tyillx2", wg = {
9082
9101
  a
9083
9102
  ]);
9084
9103
  }, jg = () => {
9085
- const e = Re[Le()].observationMenu, t = al((l) => e ? l.hover.primary : null), { layers: n, coordSystem: a } = R(fe((l) => ({
9104
+ const e = Re[Le()].observationMenu, t = ol((l) => e ? l.hover.primary : null), { layers: n, coordSystem: a } = R(fe((l) => ({
9086
9105
  layers: l.layers,
9087
9106
  coordSystem: l.coordSystem
9088
- }))), { anchorResolver: o } = z(), i = Yr();
9089
- return I(() => {
9107
+ }))), { anchorResolver: o } = B(), i = Yr();
9108
+ return E(() => {
9090
9109
  if (t === null) return null;
9091
9110
  const l = n.find((h) => h.id === t.layerId);
9092
9111
  if (l === void 0) return null;
@@ -9099,7 +9118,7 @@ var xg = "_1tyillx2", wg = {
9099
9118
  const c = ws(l)(t.observation);
9100
9119
  return c === null ? null : {
9101
9120
  position: s,
9102
- color: js({ geom: i }, l, t.observation) ?? xl,
9121
+ color: js({ geom: i }, l, t.observation) ?? wl,
9103
9122
  layer: l,
9104
9123
  at: c,
9105
9124
  observation: t.observation
@@ -9111,9 +9130,9 @@ var xg = "_1tyillx2", wg = {
9111
9130
  o,
9112
9131
  i
9113
9132
  ]);
9114
- }, Zg = { kind: "idle" }, ri = () => {
9133
+ }, Zg = { kind: "idle" }, ai = () => {
9115
9134
  const e = J((a) => a.standingInteraction), t = J((a) => a.editTargetUnderPointer?.kind === "menu-trigger"), n = jg();
9116
- return I(() => e !== null ? e : n === null ? Zg : {
9135
+ return E(() => e !== null ? e : n === null ? Zg : {
9117
9136
  kind: "trigger",
9118
9137
  anchor: n,
9119
9138
  isEngaged: t
@@ -9123,14 +9142,14 @@ var xg = "_1tyillx2", wg = {
9123
9142
  t
9124
9143
  ]);
9125
9144
  }, Yg = (e, t) => e.x >= 0 && e.x <= t.width && e.y >= 0 && e.y <= t.height, Jg = (e, t, n) => {
9126
- const a = $(), { selectionStore: o } = z(), { store: i, engine: l } = je(), s = ee(e), c = ee(t), h = ee(n);
9127
- _(() => {
9128
- const d = (f) => Ua(f, c.current, a.getState().menuTrigger), u = (f) => {
9145
+ const a = $(), { selectionStore: o } = B(), { store: i, engine: l } = je(), s = ee(e), c = ee(t), h = ee(n);
9146
+ z(() => {
9147
+ const d = (f) => Ka(f, c.current, a.getState().menuTrigger), u = (f) => {
9129
9148
  if (d(f) || o.getState().selection.length > 0) return;
9130
- const b = h.current, w = c.current, x = {
9131
- x: f.clientX - w.x,
9132
- y: f.clientY - w.y
9133
- }, C = Yg(x, b) ? l.query(kt(x, b)) : gn;
9149
+ const b = h.current, x = c.current, w = {
9150
+ x: f.clientX - x.x,
9151
+ y: f.clientY - x.y
9152
+ }, C = Yg(w, b) ? l.query(kt(w, b)) : gn;
9134
9153
  i.getState().setHoverState(C);
9135
9154
  };
9136
9155
  let p = !1;
@@ -9138,15 +9157,15 @@ var xg = "_1tyillx2", wg = {
9138
9157
  p = s.current.kind === "menu";
9139
9158
  }, m = (f) => {
9140
9159
  if (Xt(f.target)) return;
9141
- const { claimInteraction: b, releaseInteraction: w } = a.getState();
9160
+ const { claimInteraction: b, releaseInteraction: x } = a.getState();
9142
9161
  if (!d(f) || p) {
9143
- w("menu"), p && u(f);
9162
+ x("menu"), p && u(f);
9144
9163
  return;
9145
9164
  }
9146
- const x = s.current;
9147
- x.kind === "trigger" && b({
9165
+ const w = s.current;
9166
+ w.kind === "trigger" && b({
9148
9167
  kind: "menu",
9149
- anchor: x.anchor
9168
+ anchor: w.anchor
9150
9169
  });
9151
9170
  };
9152
9171
  return document.addEventListener("pointerdown", v, !0), document.addEventListener("click", m), () => {
@@ -9162,30 +9181,30 @@ var xg = "_1tyillx2", wg = {
9162
9181
  h
9163
9182
  ]);
9164
9183
  }, Qg = (e, t, n) => {
9165
- const a = $(), { store: o } = z(), { store: i } = je(), l = ee(t), s = Re[Le()].observationsPress;
9166
- _(() => (i.getState().setQueryOwnedByEditor(s), () => i.getState().setQueryOwnedByEditor(!1)), [i, s]), _(() => {
9184
+ const a = $(), { store: o } = B(), { store: i } = je(), l = ee(t), s = Re[Le()].observationsPress;
9185
+ z(() => (i.getState().setQueryOwnedByEditor(s), () => i.getState().setQueryOwnedByEditor(!1)), [i, s]), z(() => {
9167
9186
  let c = null, h = null, d = !1;
9168
9187
  const u = (S) => {
9169
9188
  if (!s) return;
9170
- const T = i.getState();
9171
- T.isPointerSuspended || S === null && T.hover.primary === null || T.setHoverState(S ?? gn);
9189
+ const P = i.getState();
9190
+ P.isPointerSuspended || S === null && P.hover.primary === null || P.setHoverState(S ?? gn);
9172
9191
  }, p = () => {
9173
9192
  if (c = null, h === null) return;
9174
9193
  const S = a.getState();
9175
9194
  if (st(S.standingInteraction)) {
9176
- const O = S.menuTrigger !== null && vn({
9195
+ const T = S.menuTrigger !== null && vn({
9177
9196
  x: h.clientX - l.current.x,
9178
9197
  y: h.clientY - l.current.y
9179
- }, S.menuTrigger), H = S.editTargetUnderPointer;
9180
- O ? S.setEditTargetUnderPointer({ kind: "menu-trigger" }) : H?.kind === "menu-trigger" && S.setEditTargetUnderPointer(null);
9198
+ }, S.menuTrigger), F = S.editTargetUnderPointer;
9199
+ T ? S.setEditTargetUnderPointer({ kind: "menu-trigger" }) : F?.kind === "menu-trigger" && S.setEditTargetUnderPointer(null);
9181
9200
  return;
9182
9201
  }
9183
9202
  d && (d = !1, h = {
9184
9203
  ...h,
9185
9204
  target: e0(h)
9186
9205
  });
9187
- const { targetAtPoint: T, hover: k } = ni(h, n());
9188
- S.setEditTargetUnderPointer(T), u(k);
9206
+ const { targetAtPoint: P, hover: k } = ri(h, n());
9207
+ S.setEditTargetUnderPointer(P), u(k);
9189
9208
  }, v = () => {
9190
9209
  c === null && (c = requestAnimationFrame(p));
9191
9210
  }, m = () => {
@@ -9198,15 +9217,15 @@ var xg = "_1tyillx2", wg = {
9198
9217
  clientX: S.clientX,
9199
9218
  clientY: S.clientY
9200
9219
  }, d = !1, v();
9201
- }, w = () => {
9220
+ }, x = () => {
9202
9221
  h = null, c !== null && (cancelAnimationFrame(c), c = null), f();
9203
- }, x = a.subscribe((S, T) => {
9204
- st(T.standingInteraction) && !st(S.standingInteraction) && m();
9205
- }), C = o.subscribe((S, T) => {
9206
- S.scene !== T.scene && (st(a.getState().standingInteraction) || m());
9222
+ }, w = a.subscribe((S, P) => {
9223
+ st(P.standingInteraction) && !st(S.standingInteraction) && m();
9224
+ }), C = o.subscribe((S, P) => {
9225
+ S.scene !== P.scene && (st(a.getState().standingInteraction) || m());
9207
9226
  });
9208
- return e.addEventListener("pointermove", b), e.addEventListener("pointerleave", w), () => {
9209
- c !== null && cancelAnimationFrame(c), x(), C(), e.removeEventListener("pointermove", b), e.removeEventListener("pointerleave", w), f();
9227
+ return e.addEventListener("pointermove", b), e.addEventListener("pointerleave", x), () => {
9228
+ c !== null && cancelAnimationFrame(c), w(), C(), e.removeEventListener("pointermove", b), e.removeEventListener("pointerleave", x), f();
9210
9229
  };
9211
9230
  }, [
9212
9231
  e,
@@ -9231,10 +9250,10 @@ var xg = "_1tyillx2", wg = {
9231
9250
  return !1;
9232
9251
  }
9233
9252
  }, Er = "editor", Or = [], t0 = (e, t, n, a, o) => {
9234
- const i = ri(), { store: l } = je(), s = pn().length > 0, c = Re[Le()].holdsHoverWhileSelected, h = J((m) => m.menuTrigger), d = i.kind === "menu", u = I(() => h === null ? Or : [vs(h)], [h]), p = Xg(e, t);
9235
- Qg(e, t, p), Ug(e, t, n, p, o), Jg(i, t, n), Og(e), Kg(e), Ig(e, a), _(() => (l.getState().publishPointerRegions(Er, u), () => l.getState().publishPointerRegions(Er, Or)), [l, u]);
9253
+ const i = ai(), { store: l } = je(), s = pn().length > 0, c = Re[Le()].holdsHoverWhileSelected, h = J((m) => m.menuTrigger), d = i.kind === "menu", u = E(() => h === null ? Or : [vs(h)], [h]), p = Xg(e, t);
9254
+ Qg(e, t, p), Ug(e, t, n, p, o), Jg(i, t, n), Og(e), Kg(e), Ig(e, a), z(() => (l.getState().publishPointerRegions(Er, u), () => l.getState().publishPointerRegions(Er, Or)), [l, u]);
9236
9255
  const v = d || s && c;
9237
- _(() => (l.getState().setPointerSuspended(v), () => l.getState().setPointerSuspended(!1)), [l, v]), _(() => {
9256
+ z(() => (l.getState().setPointerSuspended(v), () => l.getState().setPointerSuspended(!1)), [l, v]), z(() => {
9238
9257
  if (!s || !c) return;
9239
9258
  const m = l.getState();
9240
9259
  m.setHoverState(gn), m.setTooltipAnchor(null);
@@ -9244,11 +9263,11 @@ var xg = "_1tyillx2", wg = {
9244
9263
  c
9245
9264
  ]);
9246
9265
  }, n0 = ({ frameElement: e, panelRect: t, formattedAxes: n, shouldAnimateTransitions: a }) => {
9247
- const { measureRef: o, screenRect: i } = ki(), { selectionStore: l } = z(), s = $(), c = J((u) => u.caret?.annotationId ?? null), h = Le(), d = ne(h);
9248
- return _(() => (o(e), () => o(null)), [o, e]), _(() => () => {
9266
+ const { measureRef: o, screenRect: i } = Li(), { selectionStore: l } = B(), s = $(), c = J((u) => u.caret?.annotationId ?? null), h = Le(), d = ne(h);
9267
+ return z(() => (o(e), () => o(null)), [o, e]), z(() => () => {
9249
9268
  const u = s.getState();
9250
9269
  u.releaseInteraction("menu"), u.setCaret(null), u.setPressedObservation(null);
9251
- }, [s]), _(() => {
9270
+ }, [s]), z(() => {
9252
9271
  if (d.current === h) return;
9253
9272
  d.current = h;
9254
9273
  const u = s.getState();
@@ -9269,7 +9288,7 @@ var xg = "_1tyillx2", wg = {
9269
9288
  })] });
9270
9289
  }, r0 = ({ annotationId: e, panelRect: t }) => {
9271
9290
  const n = $(), { textAnnotations: a } = Ne(t);
9272
- return _(() => {
9291
+ return z(() => {
9273
9292
  a.some(({ id: o }) => o === e) || n.getState().setCaret(null);
9274
9293
  }, [
9275
9294
  e,
@@ -9277,7 +9296,7 @@ var xg = "_1tyillx2", wg = {
9277
9296
  n
9278
9297
  ]), null;
9279
9298
  }, a0 = ({ frameElement: e, frameRect: t, panelRect: n, formattedAxes: a, shouldAnimateTransitions: o }) => {
9280
- const i = I(() => ({
9299
+ const i = E(() => ({
9281
9300
  x: t.left + n.x,
9282
9301
  y: t.top + n.y
9283
9302
  }), [
@@ -9295,7 +9314,7 @@ var xg = "_1tyillx2", wg = {
9295
9314
  shouldAnimateTransitions: o
9296
9315
  });
9297
9316
  }, o0 = ({ frameElement: e, frameRect: t, panelOrigin: n, panelRect: a, boxRef: o, shouldAnimateTransitions: i }) => {
9298
- const l = Ze(), s = ri(), { annotations: c, editOutline: h, overlayMenu: d } = Re[Le()], u = I(() => ({
9317
+ const l = Ze(), s = ai(), { annotations: c, editOutline: h, overlayMenu: d } = Re[Le()], u = E(() => ({
9299
9318
  width: t.width,
9300
9319
  height: t.height
9301
9320
  }), [t.width, t.height]);
@@ -9304,9 +9323,9 @@ var xg = "_1tyillx2", wg = {
9304
9323
  frameSize: u,
9305
9324
  panelRect: a,
9306
9325
  shouldAnimateTransitions: i
9307
- }), /* @__PURE__ */ r(v1, { frameRect: t })] }), /* @__PURE__ */ r(zi, {
9326
+ }), /* @__PURE__ */ r(v1, { frameRect: t })] }), /* @__PURE__ */ r(Bi, {
9308
9327
  rect: t,
9309
- zIndex: Mi.editorOverlay,
9328
+ zIndex: Ni.editorOverlay,
9310
9329
  container: l,
9311
9330
  "data-testid": "editor-overlay",
9312
9331
  boxRef: o,
@@ -9352,10 +9371,10 @@ var xg = "_1tyillx2", wg = {
9352
9371
  })] });
9353
9372
  }, Z5 = ({ slots: e, mode: t, ...n }) => /* @__PURE__ */ r(ed, {
9354
9373
  locale: ea(),
9355
- children: /* @__PURE__ */ r(Bi, { children: /* @__PURE__ */ r(ml, {
9374
+ children: /* @__PURE__ */ r(Hi, { children: /* @__PURE__ */ r(gl, {
9356
9375
  editors: _h,
9357
- children: /* @__PURE__ */ r(el, {
9358
- slots: I(() => ({
9376
+ children: /* @__PURE__ */ r(tl, {
9377
+ slots: E(() => ({
9359
9378
  EditorSurface: n0,
9360
9379
  ...e
9361
9380
  }), [e]),
@@ -9363,19 +9382,19 @@ var xg = "_1tyillx2", wg = {
9363
9382
  ...n
9364
9383
  })
9365
9384
  }) })
9366
- }), i0 = "_12lhx9e0", ai = ({ children: e }) => /* @__PURE__ */ r("div", {
9385
+ }), i0 = "_12lhx9e0", oi = ({ children: e }) => /* @__PURE__ */ r("div", {
9367
9386
  className: i0,
9368
9387
  children: e
9369
9388
  }), l0 = "_139ohwv0", te = ({ children: e }) => /* @__PURE__ */ r("div", {
9370
9389
  className: l0,
9371
9390
  children: e
9372
- }), oi = _e(null), s0 = oi.Provider, c0 = () => {
9373
- const e = ye(oi);
9391
+ }), ii = _e(null), s0 = ii.Provider, c0 = () => {
9392
+ const e = ye(ii);
9374
9393
  if (!e) throw new Error("A section must be rendered inside <EditorPanel.Root>.");
9375
9394
  return e;
9376
9395
  }, d0 = "_1jlczkt0", u0 = "data-graphy-editor-panel", h0 = {
9377
9396
  List: te,
9378
- Grid: ai
9397
+ Grid: oi
9379
9398
  };
9380
9399
  function p0(e) {
9381
9400
  if (e === void 0) return !1;
@@ -9383,7 +9402,7 @@ function p0(e) {
9383
9402
  return t.includes("_1ii3bsb0") || t.includes("_1ii3bsb1");
9384
9403
  }
9385
9404
  var m0 = ({ handle: e, children: t, controls: n, defaultExpandedSection: a = void 0, className: o }) => {
9386
- const i = Qr(e), { themeClass: l, inlineVarsStyle: s } = St(), [c, h] = Q(() => a ? [a] : []), d = I(() => ({
9405
+ const i = Qr(e), { themeClass: l, inlineVarsStyle: s } = St(), [c, h] = Q(() => a ? [a] : []), d = E(() => ({
9387
9406
  expandSection: (u) => h([u]),
9388
9407
  collapseAllSections: () => h([])
9389
9408
  }), []);
@@ -9404,7 +9423,7 @@ var m0 = ({ handle: e, children: t, controls: n, defaultExpandedSection: a = voi
9404
9423
  })
9405
9424
  })
9406
9425
  });
9407
- }, ii = {
9426
+ }, li = {
9408
9427
  Root: m0,
9409
9428
  Controls: h0
9410
9429
  }, g0 = "_2m7wuq0", Y5 = () => /* @__PURE__ */ r(Fc, { className: g0 }), v0 = (e) => /* @__PURE__ */ r(L, {
@@ -9416,7 +9435,7 @@ var m0 = ({ handle: e, children: t, controls: n, defaultExpandedSection: a = voi
9416
9435
  strokeLinejoin: "round",
9417
9436
  children: /* @__PURE__ */ r("path", { d: "m9 6 6 6-6 6" })
9418
9437
  })
9419
- }), On = "_40zvwv0", Mn = "_40zvwv1", f0 = "_40zvwv2", li = "_40zvwv3", b0 = "_40zvwv4 _40zvwv3";
9438
+ }), On = "_40zvwv0", Mn = "_40zvwv1", f0 = "_40zvwv2", si = "_40zvwv3", b0 = "_40zvwv4 _40zvwv3";
9420
9439
  var y0 = "_40zvwv6";
9421
9440
  var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory: a, onOpenChange: o, children: i }) => t === "collapsible" ? /* @__PURE__ */ r(x0, {
9422
9441
  title: e,
@@ -9434,7 +9453,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
9434
9453
  className: Mn,
9435
9454
  children: [
9436
9455
  /* @__PURE__ */ r("span", {
9437
- className: li,
9456
+ className: si,
9438
9457
  children: e
9439
9458
  }),
9440
9459
  n !== void 0 && /* @__PURE__ */ r("span", {
@@ -9462,7 +9481,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
9462
9481
  }),
9463
9482
  /* @__PURE__ */ r("span", {
9464
9483
  className: y0,
9465
- children: /* @__PURE__ */ r(za, {
9484
+ children: /* @__PURE__ */ r(Ba, {
9466
9485
  labelId: a,
9467
9486
  controlId: o,
9468
9487
  children: n
@@ -9476,7 +9495,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
9476
9495
  })
9477
9496
  });
9478
9497
  }, x0 = ({ title: e, preview: t, accessory: n, onOpenChange: a, children: o }) => {
9479
- const i = P();
9498
+ const i = I();
9480
9499
  return /* @__PURE__ */ g(Ke.Item, {
9481
9500
  value: e,
9482
9501
  className: On,
@@ -9490,7 +9509,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
9490
9509
  "aria-label": i("editor.accessibility.toggleSection", { title: e })
9491
9510
  }),
9492
9511
  /* @__PURE__ */ r("span", {
9493
- className: li,
9512
+ className: si,
9494
9513
  children: e
9495
9514
  }),
9496
9515
  t !== void 0 && /* @__PURE__ */ r("span", {
@@ -9509,7 +9528,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
9509
9528
  }), /* @__PURE__ */ r(Ke.Panel, { children: /* @__PURE__ */ r("div", { children: o }) })]
9510
9529
  });
9511
9530
  }, w0 = ({ title: e, isChecked: t, onToggle: n, isDisabled: a, preview: o, children: i }) => {
9512
- const { expandSection: l, collapseAllSections: s } = c0(), { Switch: c } = B();
9531
+ const { expandSection: l, collapseAllSections: s } = c0(), { Switch: c } = H();
9513
9532
  return /* @__PURE__ */ r(j, {
9514
9533
  title: e,
9515
9534
  layout: "collapsible",
@@ -9539,78 +9558,78 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
9539
9558
  x: "editor.axesPanel.mainAxisSection.xAxis",
9540
9559
  y: "editor.axesPanel.mainAxisSection.yAxis"
9541
9560
  }, Mr = ({ axis: e, title: t, layout: n = "collapsible", preview: a }) => {
9542
- const o = W(), i = K(o), l = P(), { NumberField: s, Switch: c, TextField: h, ToggleGroup: d } = B();
9561
+ const o = W(), i = K(o), l = I(), { NumberField: s, Switch: c, TextField: h, ToggleGroup: d } = H();
9543
9562
  if (!i) return null;
9544
9563
  const u = i.coordSystem.type === "polar" ? i.coordSystem.axisMapping[e].geometry : "linear", p = i.config.axes[e], v = i.scales[e], m = v?.spec, f = m?.scaleType === "continuous" ? m : void 0;
9545
9564
  if (u === "circular" || u === "radial" && f === void 0) return null;
9546
- const b = m !== void 0 && "reverse" in m ? m : void 0, w = m?.scaleType === "continuous" || m?.scaleType === "datetime", x = f !== void 0 && wa(i, e), C = f?.transform === "log", S = f?.domainMax ?? null, T = L0(f), k = (E, pe) => E.map((et) => ({
9565
+ const b = m !== void 0 && "reverse" in m ? m : void 0, x = m?.scaleType === "continuous" || m?.scaleType === "datetime", w = f !== void 0 && Ta(i, e), C = f?.transform === "log", S = f?.domainMax ?? null, P = L0(f), k = (O, pe) => O.map((et) => ({
9547
9566
  value: et,
9548
9567
  label: pe(et)
9549
- })), O = i.guides.axes.find((E) => E.scaleAestheticKey === e)?.position, H = T0[O === "bottom" || O === "top" || O === void 0 && e === "x" ? "horizontal" : "vertical"], F = e === "y" ? Ks(i.spec) : null, M = F === null ? void 0 : ve(i.spec.layers, F), N = i.guides.legends.drawn.some((E) => H.some((pe) => pe === E.position)), y = H.map((E) => ({
9550
- value: E,
9551
- label: l(A0[E])
9552
- })), V = k(["auto", "edges"], (E) => l(E === "edges" ? "editor.axesPanel.labelMode.edges" : "editor.axesPanel.labelMode.auto")), re = k(["linear", "log"], (E) => l(E === "log" ? "editor.axesPanel.scale.log" : "editor.axesPanel.scale.auto")), xe = k([
9568
+ })), T = i.guides.axes.find((O) => O.scaleAestheticKey === e)?.position, F = T0[T === "bottom" || T === "top" || T === void 0 && e === "x" ? "horizontal" : "vertical"], D = e === "y" ? Ks(i.spec) : null, M = D === null ? void 0 : ve(i.spec.layers, D), N = i.guides.legends.drawn.some((O) => F.some((pe) => pe === O.position)), y = F.map((O) => ({
9569
+ value: O,
9570
+ label: l(A0[O])
9571
+ })), V = k(["auto", "edges"], (O) => l(O === "edges" ? "editor.axesPanel.labelMode.edges" : "editor.axesPanel.labelMode.auto")), re = k(["linear", "log"], (O) => l(O === "log" ? "editor.axesPanel.scale.log" : "editor.axesPanel.scale.auto")), xe = k([
9553
9572
  "auto",
9554
9573
  "zero",
9555
9574
  "custom"
9556
- ], (E) => l(E === "zero" ? "editor.axesPanel.startFrom.zero" : E === "custom" ? "editor.axesPanel.startFrom.custom" : "editor.axesPanel.startFrom.auto")), oe = k(["auto", "custom"], (E) => l(E === "custom" ? "editor.axesPanel.endAt.custom" : "editor.axesPanel.endAt.auto")), Be = k(["no", "yes"], (E) => l(E === "yes" ? "editor.axesPanel.yesNo.yes" : "editor.axesPanel.yesNo.no")), hi = k(["single", "double"], (E) => l(E === "double" ? "editor.axesPanel.axisCount.double" : "editor.axesPanel.axisCount.single")), pi = (E) => {
9557
- o.commands.dispatch(new Nl({
9575
+ ], (O) => l(O === "zero" ? "editor.axesPanel.startFrom.zero" : O === "custom" ? "editor.axesPanel.startFrom.custom" : "editor.axesPanel.startFrom.auto")), oe = k(["auto", "custom"], (O) => l(O === "custom" ? "editor.axesPanel.endAt.custom" : "editor.axesPanel.endAt.auto")), Be = k(["no", "yes"], (O) => l(O === "yes" ? "editor.axesPanel.yesNo.yes" : "editor.axesPanel.yesNo.no")), pi = k(["single", "double"], (O) => l(O === "double" ? "editor.axesPanel.axisCount.double" : "editor.axesPanel.axisCount.single")), mi = (O) => {
9576
+ o.commands.dispatch(new Rl({
9558
9577
  axis: e,
9559
- isVisible: E
9578
+ isVisible: O
9560
9579
  }));
9561
- }, mi = (E) => {
9580
+ }, gi = (O) => {
9562
9581
  o.commands.dispatch(new aa({
9563
9582
  axis: e,
9564
- label: E === "" ? null : E
9583
+ label: O === "" ? null : O
9565
9584
  }), { transient: !0 });
9566
- }, gi = (E) => {
9567
- o.commands.dispatch(new Ml({
9585
+ }, vi = (O) => {
9586
+ o.commands.dispatch(new Nl({
9568
9587
  axis: e,
9569
- isVisible: E
9588
+ isVisible: O
9570
9589
  }));
9571
- }, vi = (E) => {
9590
+ }, fi = (O) => {
9572
9591
  o.commands.dispatch(new ia({
9573
9592
  axis: e,
9574
- tickMode: E === "edges" ? "edges" : "auto"
9593
+ tickMode: O === "edges" ? "edges" : "auto"
9575
9594
  }));
9576
- }, fi = (E) => {
9577
- o.commands.dispatch(new is({
9595
+ }, bi = (O) => {
9596
+ o.commands.dispatch(new ls({
9578
9597
  scaledAesthetic: e,
9579
- reverse: E === "yes"
9598
+ reverse: O === "yes"
9580
9599
  }));
9581
- }, bi = (E) => {
9582
- o.commands.dispatch(new ls({
9600
+ }, yi = (O) => {
9601
+ o.commands.dispatch(new ha({
9583
9602
  scaledAesthetic: e,
9584
- transform: E === "log" ? "log" : "linear"
9603
+ transform: O === "log" ? "log" : "linear"
9585
9604
  }));
9586
- }, Dn = (E) => {
9605
+ }, Dn = (O) => {
9587
9606
  o.commands.dispatch(new Ie({
9588
9607
  scaledAesthetic: e,
9589
- ...E
9608
+ ...O
9590
9609
  }), { transient: !0 });
9591
- }, yi = (E) => {
9592
- E !== null && Dn({ domainMin: E });
9593
- }, Si = (E) => {
9594
- E !== null && Dn({ domainMax: E });
9595
- }, Ci = (E) => {
9596
- const pe = E === "auto" ? null : E === "zero" ? 0 : Nr(v?.domain, "start");
9610
+ }, Si = (O) => {
9611
+ O !== null && Dn({ domainMin: O });
9612
+ }, Ci = (O) => {
9613
+ O !== null && Dn({ domainMax: O });
9614
+ }, xi = (O) => {
9615
+ const pe = O === "auto" ? null : O === "zero" ? 0 : Nr(v?.domain, "start");
9597
9616
  o.commands.dispatch(new Ie({
9598
9617
  scaledAesthetic: e,
9599
9618
  domainMin: pe
9600
9619
  }));
9601
- }, xi = (E) => {
9602
- const pe = E === "custom" ? Nr(v?.domain, "end") : null;
9620
+ }, wi = (O) => {
9621
+ const pe = O === "custom" ? Nr(v?.domain, "end") : null;
9603
9622
  o.commands.dispatch(new Ie({
9604
9623
  scaledAesthetic: e,
9605
9624
  domainMax: pe
9606
9625
  }));
9607
- }, wi = (E) => {
9608
- M !== void 0 && o.commands.dispatch(new Ul({
9626
+ }, Ti = (O) => {
9627
+ M !== void 0 && o.commands.dispatch(new Kl({
9609
9628
  layerId: M.id,
9610
- yScaleType: E === "double" ? "secondary" : "primary"
9629
+ yScaleType: O === "double" ? "secondary" : "primary"
9611
9630
  }));
9612
- }, Ti = (E) => {
9613
- const pe = H.find((et) => et === E);
9631
+ }, Ai = (O) => {
9632
+ const pe = F.find((et) => et === O);
9614
9633
  pe && o.commands.dispatch(new oa({
9615
9634
  axis: e,
9616
9635
  position: pe
@@ -9625,45 +9644,45 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
9625
9644
  label: l("editor.axesPanel.controls.visible"),
9626
9645
  children: /* @__PURE__ */ r(c, {
9627
9646
  isChecked: p.isVisible,
9628
- onChange: pi
9647
+ onChange: mi
9629
9648
  })
9630
9649
  }),
9631
9650
  M !== void 0 && /* @__PURE__ */ r(A, {
9632
9651
  label: l("editor.axesPanel.controls.numberOfAxes"),
9633
9652
  children: /* @__PURE__ */ r(d, {
9634
9653
  value: M.yScaleType === "secondary" ? "double" : "single",
9635
- options: hi,
9636
- onChange: wi
9654
+ options: pi,
9655
+ onChange: Ti
9637
9656
  })
9638
9657
  }),
9639
9658
  u === "linear" && /* @__PURE__ */ g(q, { children: [/* @__PURE__ */ r(A, {
9640
9659
  label: l("editor.axesPanel.controls.title"),
9641
9660
  children: /* @__PURE__ */ r(h, {
9642
9661
  value: p.label ?? "",
9643
- onChange: mi,
9662
+ onChange: gi,
9644
9663
  onCommit: o.commands.commit
9645
9664
  })
9646
9665
  }), /* @__PURE__ */ r(A, {
9647
9666
  label: l("editor.axesPanel.controls.ticks"),
9648
9667
  children: /* @__PURE__ */ r(c, {
9649
9668
  isChecked: p.ticks.isVisible,
9650
- onChange: gi
9669
+ onChange: vi
9651
9670
  })
9652
9671
  })] }),
9653
- w && /* @__PURE__ */ r(A, {
9672
+ x && /* @__PURE__ */ r(A, {
9654
9673
  label: l("editor.axesPanel.controls.labels"),
9655
9674
  children: /* @__PURE__ */ r(d, {
9656
9675
  value: p.ticks.mode,
9657
9676
  options: V,
9658
- onChange: vi
9677
+ onChange: fi
9659
9678
  })
9660
9679
  }),
9661
9680
  f && u === "linear" && !N && /* @__PURE__ */ r(A, {
9662
9681
  label: l("editor.axesPanel.controls.position"),
9663
9682
  children: /* @__PURE__ */ r(d, {
9664
- value: O ?? p.position,
9683
+ value: T ?? p.position,
9665
9684
  options: y,
9666
- onChange: Ti
9685
+ onChange: Ai
9667
9686
  })
9668
9687
  }),
9669
9688
  b !== void 0 && /* @__PURE__ */ r(A, {
@@ -9671,30 +9690,30 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
9671
9690
  children: /* @__PURE__ */ r(d, {
9672
9691
  value: b.reverse === !0 ? "yes" : "no",
9673
9692
  options: Be,
9674
- onChange: fi
9693
+ onChange: bi
9675
9694
  })
9676
9695
  }),
9677
- f && !x && /* @__PURE__ */ r(A, {
9696
+ f && !w && /* @__PURE__ */ r(A, {
9678
9697
  label: l("editor.axesPanel.controls.scale"),
9679
9698
  children: /* @__PURE__ */ r(d, {
9680
9699
  value: C ? "log" : "linear",
9681
9700
  options: re,
9682
- onChange: bi
9701
+ onChange: yi
9683
9702
  })
9684
9703
  }),
9685
9704
  f && !C && /* @__PURE__ */ g(q, { children: [
9686
- !x && /* @__PURE__ */ g(q, { children: [/* @__PURE__ */ r(A, {
9705
+ !w && /* @__PURE__ */ g(q, { children: [/* @__PURE__ */ r(A, {
9687
9706
  label: l("editor.axesPanel.controls.startFrom"),
9688
9707
  children: /* @__PURE__ */ r(d, {
9689
- value: T,
9708
+ value: P,
9690
9709
  options: xe,
9691
- onChange: Ci
9710
+ onChange: xi
9692
9711
  })
9693
- }), T !== "auto" && /* @__PURE__ */ r(A, {
9712
+ }), P !== "auto" && /* @__PURE__ */ r(A, {
9694
9713
  label: l("editor.axesPanel.controls.value"),
9695
9714
  children: /* @__PURE__ */ r(s, {
9696
9715
  value: f.domainMin ?? null,
9697
- onChange: yi,
9716
+ onChange: Si,
9698
9717
  onCommit: o.commands.commit
9699
9718
  })
9700
9719
  })] }),
@@ -9703,14 +9722,14 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
9703
9722
  children: /* @__PURE__ */ r(d, {
9704
9723
  value: S === null ? "auto" : "custom",
9705
9724
  options: oe,
9706
- onChange: xi
9725
+ onChange: wi
9707
9726
  })
9708
9727
  }),
9709
9728
  S !== null && /* @__PURE__ */ r(A, {
9710
9729
  label: l("editor.axesPanel.controls.value"),
9711
9730
  children: /* @__PURE__ */ r(s, {
9712
9731
  value: S,
9713
- onChange: Si,
9732
+ onChange: Ci,
9714
9733
  onCommit: o.commands.commit
9715
9734
  })
9716
9735
  })
@@ -9724,7 +9743,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
9724
9743
  const n = t === "start" ? e?.[0] : e?.[e.length - 1];
9725
9744
  return typeof n == "number" ? n : 0;
9726
9745
  }, Nn = ({ value: e, onChange: t }) => {
9727
- const n = W(), a = P(), { TextField: o } = B(), i = e !== null && typeof e != "string", l = (s) => t(s === "" ? null : s);
9746
+ const n = W(), a = I(), { TextField: o } = H(), i = e !== null && typeof e != "string", l = (s) => t(s === "" ? null : s);
9728
9747
  return /* @__PURE__ */ r(A, {
9729
9748
  label: a("editor.elementsPanel.contentValue"),
9730
9749
  children: /* @__PURE__ */ r(o, {
@@ -9735,7 +9754,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
9735
9754
  })
9736
9755
  });
9737
9756
  }, P0 = ({ title: e, layout: t = "collapsible", preview: n }) => {
9738
- const a = W(), o = K(a), i = P(), { Switch: l } = B();
9757
+ const a = W(), o = K(a), i = I(), { Switch: l } = H();
9739
9758
  if (!o) return null;
9740
9759
  const s = o.config.content, c = (d) => {
9741
9760
  a.commands.dispatch(new xt({
@@ -9761,7 +9780,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
9761
9780
  })] })
9762
9781
  });
9763
9782
  }, Rr = /^[a-z][a-z\d+.-]*:/i, I0 = {}, E0 = ({ title: e, layout: t = "collapsible", preview: n }) => {
9764
- const a = W(), o = K(a), i = P(), { Switch: l } = B();
9783
+ const a = W(), o = K(a), i = I(), { Switch: l } = H();
9765
9784
  if (!o) return null;
9766
9785
  const s = o.config.content, c = (h) => {
9767
9786
  a.commands.dispatch(new xt({
@@ -9782,9 +9801,9 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
9782
9801
  }), /* @__PURE__ */ r(O0, { source: s.source ?? I0 })] })
9783
9802
  });
9784
9803
  }, O0 = ({ source: e }) => {
9785
- const t = W(), n = P(), { TextField: a } = B(), o = (c) => {
9804
+ const t = W(), n = I(), { TextField: a } = H(), o = (c) => {
9786
9805
  const h = (c.label ?? "") !== "" || (c.url ?? "") !== "";
9787
- t.commands.dispatch(new _l({ source: h ? c : null }), { transient: !0 });
9806
+ t.commands.dispatch(new Fl({ source: h ? c : null }), { transient: !0 });
9788
9807
  }, i = () => {
9789
9808
  const c = e.url ?? "";
9790
9809
  c !== "" && !Rr.test(c) && o({
@@ -9815,7 +9834,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
9815
9834
  })
9816
9835
  })] });
9817
9836
  }, M0 = ({ title: e, layout: t = "collapsible", preview: n }) => {
9818
- const a = W(), o = K(a), i = P(), { Switch: l } = B();
9837
+ const a = W(), o = K(a), i = I(), { Switch: l } = H();
9819
9838
  if (!o) return null;
9820
9839
  const s = o.config.content, c = (d) => {
9821
9840
  a.commands.dispatch(new xt({
@@ -9841,11 +9860,11 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
9841
9860
  })] })
9842
9861
  });
9843
9862
  }, Nt = (e) => {
9844
- const { colorScheme: t } = St(), n = I(() => As({ colorScheme: t }), [t]);
9845
- return I(() => e === null ? null : n.readers(e), [e, n]);
9863
+ const { colorScheme: t } = St(), n = E(() => As({ colorScheme: t }), [t]);
9864
+ return E(() => e === null ? null : n.readers(e), [e, n]);
9846
9865
  }, Rn = (e, t, n) => {
9847
9866
  const a = Nt(e);
9848
- return I(() => {
9867
+ return E(() => {
9849
9868
  if (a === null || e === null || t === null) return null;
9850
9869
  const o = ve(e.layers, t);
9851
9870
  return o === void 0 ? null : a.geom[n](o);
@@ -9867,7 +9886,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
9867
9886
  3,
9868
9887
  4
9869
9888
  ], N0 = on.length / 2, R0 = { select: { target: "graph" } }, D0 = ({ title: e, layout: t = "collapsible", preview: n }) => {
9870
- const a = W(), o = K(a), i = P(), { RadioGrid: l } = B(), s = Nt(o);
9889
+ const a = W(), o = K(a), i = I(), { RadioGrid: l } = H(), s = Nt(o);
9871
9890
  if (!o || !s) return null;
9872
9891
  const c = s.graph().get("textScale"), h = (p) => i("editor.elementsPanel.textSizeSection.scaleFormat", { value: `${p}` }), d = on.map((p) => ({
9873
9892
  value: `${p}`,
@@ -9900,7 +9919,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
9900
9919
  })
9901
9920
  });
9902
9921
  }, _0 = ({ title: e, layout: t = "collapsible", preview: n }) => {
9903
- const a = W(), o = K(a), i = P(), { Switch: l } = B();
9922
+ const a = W(), o = K(a), i = I(), { Switch: l } = H();
9904
9923
  if (!o) return null;
9905
9924
  const s = o.config.content, c = (d) => {
9906
9925
  a.commands.dispatch(new xt({
@@ -9925,7 +9944,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
9925
9944
  onChange: h
9926
9945
  })] })
9927
9946
  });
9928
- }, J5 = ({ children: e, ...t }) => /* @__PURE__ */ r(ii.Root, {
9947
+ }, J5 = ({ children: e, ...t }) => /* @__PURE__ */ r(li.Root, {
9929
9948
  ...t,
9930
9949
  children: e ?? /* @__PURE__ */ g(q, { children: [
9931
9950
  /* @__PURE__ */ r(_0, {}),
@@ -9934,11 +9953,11 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
9934
9953
  /* @__PURE__ */ r(E0, {}),
9935
9954
  /* @__PURE__ */ r(D0, {})
9936
9955
  ] })
9937
- }), Q5 = ({ children: e, ...t }) => /* @__PURE__ */ r(ii.Root, {
9956
+ }), Q5 = ({ children: e, ...t }) => /* @__PURE__ */ r(li.Root, {
9938
9957
  ...t,
9939
9958
  children: e ?? /* @__PURE__ */ g(q, { children: [/* @__PURE__ */ r(Mr, { axis: "x" }), /* @__PURE__ */ r(Mr, { axis: "y" })] })
9940
- }), Rt = (e) => `${e}px`, si = (e) => `${Math.round(e * 100)}%`, F0 = (e) => `${e}°`, z0 = 24, B0 = { select: { target: "graph" } }, Dr = ["dim", "desaturate"], ef = ({ title: e, layout: t = "collapsible", preview: n }) => {
9941
- const a = W(), o = K(a), i = P(), { Slider: l, ToggleGroup: s } = B(), c = Nt(o);
9959
+ }), Rt = (e) => `${e}px`, ci = (e) => `${Math.round(e * 100)}%`, F0 = (e) => `${e}°`, z0 = 24, B0 = { select: { target: "graph" } }, Dr = ["dim", "desaturate"], ef = ({ title: e, layout: t = "collapsible", preview: n }) => {
9960
+ const a = W(), o = K(a), i = I(), { Slider: l, ToggleGroup: s } = H(), c = Nt(o);
9942
9961
  if (!o || !c) return null;
9943
9962
  const h = c.graph().get("cornerRadius"), d = Zs(o.spec), u = Dr.map((m) => ({
9944
9963
  value: m,
@@ -9957,7 +9976,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
9957
9976
  }), { transient: !0 });
9958
9977
  }, v = (m) => {
9959
9978
  const f = Dr.find((b) => b === m);
9960
- f && a.commands.dispatch(new Wl({ dimStyle: f }));
9979
+ f && a.commands.dispatch(new Ul({ dimStyle: f }));
9961
9980
  };
9962
9981
  return /* @__PURE__ */ r(j, {
9963
9982
  title: e ?? i("editor.colorPanel.appearanceSection.title"),
@@ -9984,23 +10003,23 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
9984
10003
  })] })
9985
10004
  });
9986
10005
  }, H0 = 0.05, tf = ({ title: e, layout: t = "collapsible", preview: n }) => {
9987
- const a = W(), o = K(a), i = P(), { Slider: l, ToggleGroup: s } = B(), c = o ? Ca(o.spec.layers, "bar") : void 0, h = Rn(o, c?.id ?? null, "bar");
10006
+ const a = W(), o = K(a), i = I(), { Slider: l, ToggleGroup: s } = H(), c = o ? xa(o.spec.layers, "bar") : void 0, h = Rn(o, c?.id ?? null, "bar");
9988
10007
  if (!o || !c || o.coordSystem.type === "polar" && o.coordSystem.bandAxis === null) return null;
9989
10008
  const d = (f) => {
9990
- a.commands.dispatch(new Dl({
10009
+ a.commands.dispatch(new _l({
9991
10010
  layerId: c.id,
9992
10011
  width: f
9993
10012
  }), { transient: !0 });
9994
10013
  }, u = (f) => {
9995
- const b = zn.find((w) => w === f);
9996
- b && a.commands.dispatch(new Rl({
10014
+ const b = zn.find((x) => x === f);
10015
+ b && a.commands.dispatch(new Dl({
9997
10016
  layerId: c.id,
9998
10017
  cornerRadius: b
9999
10018
  }));
10000
10019
  }, p = zn.map((f) => ({
10001
10020
  value: f,
10002
10021
  label: i(`editor.graphPanel.barSection.roundingOptions.${f}`)
10003
- })), v = sc(c.params, o.coordSystem.type), m = h?.get("cornerRadius") ?? Cl;
10022
+ })), v = sc(c.params, o.coordSystem.type), m = h?.get("cornerRadius") ?? xl;
10004
10023
  return /* @__PURE__ */ r(j, {
10005
10024
  title: e ?? i("editor.graphPanel.barSection.title"),
10006
10025
  layout: t,
@@ -10009,10 +10028,10 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
10009
10028
  label: i("editor.graphPanel.barSection.thickness"),
10010
10029
  children: /* @__PURE__ */ r(l, {
10011
10030
  value: v,
10012
- min: Ll,
10013
- max: kl,
10031
+ min: Pl,
10032
+ max: Ll,
10014
10033
  step: H0,
10015
- formatValue: si,
10034
+ formatValue: ci,
10016
10035
  onChange: d,
10017
10036
  onCommit: a.commands.commit
10018
10037
  })
@@ -10112,7 +10131,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
10112
10131
  x: 0.6,
10113
10132
  y: 0.4
10114
10133
  }, Y0 = "relative-difference", nf = ({ title: e, layout: t = "collapsible", preview: n }) => {
10115
- const a = W(), o = K(a), i = P(), { Button: l } = B();
10134
+ const a = W(), o = K(a), i = I(), { Button: l } = H();
10116
10135
  if (!o) return null;
10117
10136
  const s = () => {
10118
10137
  a.commands.dispatch(new we({
@@ -10131,7 +10150,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
10131
10150
  a.commands.dispatch(new we({
10132
10151
  kind: "arrow",
10133
10152
  annotation: {
10134
- ...vl,
10153
+ ...fl,
10135
10154
  start: {
10136
10155
  anchorType: "panel",
10137
10156
  ...j0
@@ -10146,7 +10165,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
10146
10165
  a.commands.dispatch(new we({
10147
10166
  kind: "shape",
10148
10167
  annotation: {
10149
- ...El,
10168
+ ...Ol,
10150
10169
  ...X0,
10151
10170
  region: {
10152
10171
  anchorType: "panel",
@@ -10169,7 +10188,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
10169
10188
  title: e ?? i("editor.annotatePanel.callOutSection.title"),
10170
10189
  layout: t,
10171
10190
  preview: n,
10172
- children: /* @__PURE__ */ g(ai, { children: [
10191
+ children: /* @__PURE__ */ g(oi, { children: [
10173
10192
  /* @__PURE__ */ r(l, {
10174
10193
  variant: "tile",
10175
10194
  icon: /* @__PURE__ */ r(W0, { size: "xl" }),
@@ -10206,9 +10225,9 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
10206
10225
  }]
10207
10226
  }]
10208
10227
  }), rf = ({ title: e, layout: t = "collapsible", preview: n }) => {
10209
- const a = W(), o = K(a), i = P(), { ToggleGroup: l } = B();
10228
+ const a = W(), o = K(a), i = I(), { ToggleGroup: l } = H();
10210
10229
  if (!o) return null;
10211
- const s = Aa(o.spec);
10230
+ const s = ka(o.spec);
10212
10231
  if (s === null || !Ee(s)) return null;
10213
10232
  const c = Bn.map((d) => ({
10214
10233
  value: d,
@@ -10232,7 +10251,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
10232
10251
  })
10233
10252
  });
10234
10253
  }, Q0 = 0.1, ev = 20, af = ({ title: e, preview: t }) => {
10235
- const n = W(), a = K(n), o = P(), { NumberField: i, TextField: l } = B();
10254
+ const n = W(), a = K(n), o = I(), { NumberField: i, TextField: l } = H();
10236
10255
  if (!a || a.coordSystem.type === "polar") return null;
10237
10256
  const s = Es(a.spec.layers), c = e ?? o("editor.annotationsPanel.goalSection.title"), h = Xs(s?.mapping.y), d = typeof h == "number" ? h : null, u = (m) => {
10238
10257
  const f = new us({
@@ -10243,14 +10262,14 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
10243
10262
  n.commands.dispatch(f);
10244
10263
  }, p = (m) => {
10245
10264
  if (s === void 0) return;
10246
- const f = new as({
10265
+ const f = new os({
10247
10266
  layerId: s.id,
10248
10267
  label: m === "" ? null : m
10249
10268
  });
10250
10269
  n.commands.dispatch(f, { transient: !0 });
10251
10270
  }, v = (m) => {
10252
10271
  if (s === void 0 || m === null) return;
10253
- const f = new os({
10272
+ const f = new is({
10254
10273
  layerId: s.id,
10255
10274
  value: m
10256
10275
  });
@@ -10289,37 +10308,37 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
10289
10308
  const i = Math.min(ev, Math.max(0, 1 - Math.floor(Math.log10(o))));
10290
10309
  return Number((n + o * Q0).toFixed(i));
10291
10310
  }, of = ({ layerId: e, title: t, layout: n = "collapsible", preview: a }) => {
10292
- const o = W(), i = K(o), l = P(), { Switch: s } = B();
10311
+ const o = W(), i = K(o), l = I(), { Switch: s } = H();
10293
10312
  if (!i) return null;
10294
10313
  const c = e === void 0 ? i.layers[0] : ve(i.layers, e);
10295
10314
  if (!c) return null;
10296
- const { showDataLabels: h, format: d, showStackTotals: u, showCategoryLabels: p } = c.dataLabels, v = vo(c, i.coordSystem.type, {
10315
+ const { showDataLabels: h, format: d, showStackTotals: u, showCategoryLabels: p } = c.dataLabels, v = fo(c, i.coordSystem.type, {
10297
10316
  hasCapability: o.canPlaceDataLabels,
10298
10317
  hasPercentageFormat: o.canFormatDataLabelsAsPercentages
10299
10318
  });
10300
10319
  if (!v.supportsDataLabels) return null;
10301
- const m = (x) => {
10302
- const C = new pa({
10320
+ const m = (w) => {
10321
+ const C = new ma({
10303
10322
  layerId: c.id,
10304
- showDataLabels: x
10323
+ showDataLabels: w
10305
10324
  });
10306
10325
  o.commands.dispatch(C);
10307
- }, f = (x) => {
10326
+ }, f = (w) => {
10308
10327
  const C = new ua({
10309
10328
  layerId: c.id,
10310
- format: x ? "percentage" : "absolute"
10329
+ format: w ? "percentage" : "absolute"
10311
10330
  });
10312
10331
  o.commands.dispatch(C);
10313
- }, b = (x) => {
10314
- const C = new ma({
10332
+ }, b = (w) => {
10333
+ const C = new ga({
10315
10334
  layerId: c.id,
10316
- showStackTotals: x
10335
+ showStackTotals: w
10317
10336
  });
10318
10337
  o.commands.dispatch(C);
10319
- }, w = (x) => {
10320
- const C = new ha({
10338
+ }, x = (w) => {
10339
+ const C = new pa({
10321
10340
  layerId: c.id,
10322
- showCategoryLabels: x
10341
+ showCategoryLabels: w
10323
10342
  });
10324
10343
  o.commands.dispatch(C);
10325
10344
  };
@@ -10353,7 +10372,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
10353
10372
  label: l("editor.graphPanel.graphOptions.categoryLabels"),
10354
10373
  children: /* @__PURE__ */ r(s, {
10355
10374
  isChecked: p,
10356
- onChange: w
10375
+ onChange: x
10357
10376
  })
10358
10377
  })
10359
10378
  ] })
@@ -11120,26 +11139,26 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11120
11139
  }
11121
11140
  ], xv = 0.05, wv = (e) => e === null ? null : ln.find((t) => Av(t.summary, e)) ?? null, Tv = (e, t) => {
11122
11141
  const { summary: n } = e;
11123
- return t === null || Ee(n) ? n : n.position === "dodge" && ci(t) ? {
11142
+ return t === null || Ee(n) ? n : n.position === "dodge" && di(t) ? {
11124
11143
  ...n,
11125
11144
  position: "identity"
11126
11145
  } : n.coordType !== "polar" || !bt(n.innerRadius) || t.coordType !== "polar" || !bt(t.innerRadius) ? n : {
11127
11146
  ...n,
11128
11147
  innerRadius: t.innerRadius
11129
11148
  };
11130
- }, ci = (e) => !Ee(e) && e.geom === "bar" && e.position === "identity", Av = (e, t) => {
11149
+ }, di = (e) => !Ee(e) && e.geom === "bar" && e.position === "identity", Av = (e, t) => {
11131
11150
  if (Ee(e) || Ee(t)) return Ee(e) && Ee(t);
11132
- const n = e.position === t.position || e.position === "dodge" && ci(t);
11151
+ const n = e.position === t.position || e.position === "dodge" && di(t);
11133
11152
  return e.coordType !== t.coordType || e.geom !== t.geom || !n ? !1 : e.coordType !== "polar" || t.coordType !== "polar" ? !0 : e.theta === t.theta && bt(e.innerRadius) === bt(t.innerRadius);
11134
11153
  }, bt = (e) => e >= xv, kv = 3, lf = ({ title: e, layout: t = "collapsible", preview: n }) => {
11135
- const a = W(), o = K(a), i = P(), { RadioGrid: l } = B(), s = I(() => ln.map(({ name: u, icon: p }) => ({
11154
+ const a = W(), o = K(a), i = I(), { RadioGrid: l } = H(), s = E(() => ln.map(({ name: u, icon: p }) => ({
11136
11155
  value: u,
11137
11156
  label: i(`editor.graphTypes.${u}`),
11138
11157
  icon: /* @__PURE__ */ r(p, { size: "md" }),
11139
11158
  isDisabled: u === "combo" && !Ss(o?.spec) || u === "heatmap" && !Cs(o?.spec)
11140
11159
  })), [i, o]);
11141
11160
  if (!o) return null;
11142
- const c = Aa(o.spec), h = wv(c), d = (u) => {
11161
+ const c = ka(o.spec), h = wv(c), d = (u) => {
11143
11162
  const p = ln.find((v) => v.name === u);
11144
11163
  p && a.commands.dispatch(new la(Tv(p, c)));
11145
11164
  };
@@ -11160,41 +11179,41 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11160
11179
  "dashed",
11161
11180
  "dotted"
11162
11181
  ], Lv = 8, Pv = 0, sf = ({ title: e, layout: t = "collapsible", preview: n }) => {
11163
- const a = W(), o = K(a), i = P(), { Slider: l, Switch: s, ToggleGroup: c } = B(), h = Nt(o);
11182
+ const a = W(), o = K(a), i = I(), { Slider: l, Switch: s, ToggleGroup: c } = H(), h = Nt(o);
11164
11183
  if (!o || !h) return null;
11165
11184
  const d = o.guides.axes.filter(Iv);
11166
11185
  if (d.length === 0) return null;
11167
- const u = o.coordSystem.type !== "polar", p = d.some((x) => x.gridVisible), v = h.gridLine.y().resolve(), m = _r.map((x) => ({
11168
- value: x,
11169
- label: i(`editor.graphPanel.gridSection.lineStyles.${x}`)
11170
- })), f = (x) => (C) => {
11171
- a.commands.dispatch(new Hl({
11172
- axis: x,
11186
+ const u = o.coordSystem.type !== "polar", p = d.some((w) => w.gridVisible), v = h.gridLine.y().resolve(), m = _r.map((w) => ({
11187
+ value: w,
11188
+ label: i(`editor.graphPanel.gridSection.lineStyles.${w}`)
11189
+ })), f = (w) => (C) => {
11190
+ a.commands.dispatch(new Gl({
11191
+ axis: w,
11173
11192
  isVisible: C
11174
11193
  }));
11175
- }, b = (x) => {
11176
- const C = _r.find((S) => S === x);
11177
- C && a.commands.dispatch(new zl({
11194
+ }, b = (w) => {
11195
+ const C = _r.find((S) => S === w);
11196
+ C && a.commands.dispatch(new Bl({
11178
11197
  axis: "both",
11179
11198
  lineStyle: C
11180
11199
  }));
11181
- }, w = (x) => {
11182
- a.commands.dispatch(new Bl({
11200
+ }, x = (w) => {
11201
+ a.commands.dispatch(new Hl({
11183
11202
  axis: "both",
11184
- lineWidth: x
11203
+ lineWidth: w
11185
11204
  }), { transient: !0 });
11186
11205
  };
11187
11206
  return /* @__PURE__ */ r(j, {
11188
11207
  title: e ?? i("editor.graphPanel.gridSection.title"),
11189
11208
  layout: t,
11190
11209
  preview: n,
11191
- children: /* @__PURE__ */ g(te, { children: [d.map((x) => /* @__PURE__ */ r(A, {
11192
- label: i(Ev(x)),
11210
+ children: /* @__PURE__ */ g(te, { children: [d.map((w) => /* @__PURE__ */ r(A, {
11211
+ label: i(Ev(w)),
11193
11212
  children: /* @__PURE__ */ r(s, {
11194
- isChecked: x.gridVisible,
11195
- onChange: f(x.scaleAestheticKey)
11213
+ isChecked: w.gridVisible,
11214
+ onChange: f(w.scaleAestheticKey)
11196
11215
  })
11197
- }, x.scaleAestheticKey)), u && p && /* @__PURE__ */ g(q, { children: [/* @__PURE__ */ r(A, {
11216
+ }, w.scaleAestheticKey)), u && p && /* @__PURE__ */ g(q, { children: [/* @__PURE__ */ r(A, {
11198
11217
  label: i("editor.graphPanel.gridSection.gridStyle"),
11199
11218
  children: /* @__PURE__ */ r(c, {
11200
11219
  value: qt(v.dashArray),
@@ -11209,12 +11228,12 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11209
11228
  max: Lv,
11210
11229
  step: 0.5,
11211
11230
  formatValue: Rt,
11212
- onChange: w,
11231
+ onChange: x,
11213
11232
  onCommit: a.commands.commit
11214
11233
  })
11215
11234
  })] })] })
11216
11235
  });
11217
- }, Iv = (e) => e.scaleAestheticKey === "x" || e.scaleAestheticKey === "y", Ev = (e) => e.geometry === "radial" ? "editor.graphPanel.gridSection.rings" : e.geometry === "circular" ? "editor.graphPanel.gridSection.spokes" : e.scaleAestheticKey === "x" ? "editor.graphPanel.gridSection.verticalGridLines" : "editor.graphPanel.gridSection.horizontalGridLines", Ov = "total", di = [
11236
+ }, Iv = (e) => e.scaleAestheticKey === "x" || e.scaleAestheticKey === "y", Ev = (e) => e.geometry === "radial" ? "editor.graphPanel.gridSection.rings" : e.geometry === "circular" ? "editor.graphPanel.gridSection.spokes" : e.scaleAestheticKey === "x" ? "editor.graphPanel.gridSection.verticalGridLines" : "editor.graphPanel.gridSection.horizontalGridLines", Ov = "total", ui = [
11218
11237
  "total",
11219
11238
  "average",
11220
11239
  "current"
@@ -11224,14 +11243,14 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11224
11243
  "medium",
11225
11244
  "large"
11226
11245
  ], cf = ({ title: e, layout: t = "collapsible", preview: n }) => {
11227
- const a = W(), o = K(a), i = P(), { Switch: l, ToggleGroup: s } = B();
11246
+ const a = W(), o = K(a), i = I(), { Switch: l, ToggleGroup: s } = H();
11228
11247
  if (!o) return null;
11229
11248
  const c = o.config.headline, h = c.show !== "none", d = o.coordSystem, u = d.type === "polar", p = d.type === "polar" && d.innerRadius > 0, v = o.layers.some((M) => M.summary.grandTotal !== void 0);
11230
11249
  if (u && !v) return null;
11231
- const m = u ? Mv : di, f = o.guides.headline, b = f?.kind === "perGroup" && f.items.some((M) => M.comparison !== null), w = m.map((M) => ({
11250
+ const m = u ? Mv : ui, f = o.guides.headline, b = f?.kind === "perGroup" && f.items.some((M) => M.comparison !== null), x = m.map((M) => ({
11232
11251
  value: M,
11233
11252
  label: i(`editor.graphPanel.headlineNumberSection.metrics.${M}`)
11234
- })), x = Fr.map((M) => ({
11253
+ })), w = Fr.map((M) => ({
11235
11254
  value: M,
11236
11255
  label: i(`editor.graphPanel.headlineNumberSection.comparison.${M}`)
11237
11256
  })), C = zr.map((M) => ({
@@ -11243,19 +11262,19 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11243
11262
  }, {
11244
11263
  value: "center",
11245
11264
  label: i("editor.graphPanel.headlineNumberSection.position.center")
11246
- }], T = (M) => {
11265
+ }], P = (M) => {
11247
11266
  a.commands.dispatch(new Gn({ show: M ? Ov : "none" }));
11248
11267
  }, k = (M) => {
11249
11268
  const N = m.find((y) => y === M);
11250
11269
  N && a.commands.dispatch(new Gn({ show: N }));
11251
- }, O = (M) => {
11270
+ }, T = (M) => {
11252
11271
  const N = Fr.find((y) => y === M);
11253
- N && a.commands.dispatch(new Gl({ compareWith: N }));
11254
- }, H = (M) => {
11255
- const N = zr.find((y) => y === M);
11256
- N && a.commands.dispatch(new $l({ size: N }));
11272
+ N && a.commands.dispatch(new Vl({ compareWith: N }));
11257
11273
  }, F = (M) => {
11258
- a.commands.dispatch(new Vl({ position: M === "center" ? "center" : "above" }));
11274
+ const N = zr.find((y) => y === M);
11275
+ N && a.commands.dispatch(new Wl({ size: N }));
11276
+ }, D = (M) => {
11277
+ a.commands.dispatch(new $l({ position: M === "center" ? "center" : "above" }));
11259
11278
  };
11260
11279
  return /* @__PURE__ */ r(j, {
11261
11280
  title: e ?? i("editor.graphPanel.headlineNumberSection.title"),
@@ -11265,15 +11284,15 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11265
11284
  label: i("editor.graphPanel.headlineNumberSection.toggle"),
11266
11285
  children: /* @__PURE__ */ r(l, {
11267
11286
  isChecked: h,
11268
- onChange: T
11287
+ onChange: P
11269
11288
  })
11270
11289
  }), h && /* @__PURE__ */ g(q, { children: [
11271
- w.length > 1 && /* @__PURE__ */ r(A, {
11290
+ x.length > 1 && /* @__PURE__ */ r(A, {
11272
11291
  label: i("editor.graphPanel.headlineNumberSection.metricLabel"),
11273
11292
  layout: "stack",
11274
11293
  children: /* @__PURE__ */ r(s, {
11275
11294
  value: c.show,
11276
- options: w,
11295
+ options: x,
11277
11296
  onChange: k
11278
11297
  })
11279
11298
  }),
@@ -11282,8 +11301,8 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11282
11301
  layout: "stack",
11283
11302
  children: /* @__PURE__ */ r(s, {
11284
11303
  value: cc(c.compareWith),
11285
- options: x,
11286
- onChange: O
11304
+ options: w,
11305
+ onChange: T
11287
11306
  })
11288
11307
  }),
11289
11308
  /* @__PURE__ */ r(A, {
@@ -11291,7 +11310,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11291
11310
  children: /* @__PURE__ */ r(s, {
11292
11311
  value: c.size,
11293
11312
  options: C,
11294
- onChange: H
11313
+ onChange: F
11295
11314
  })
11296
11315
  }),
11297
11316
  p && /* @__PURE__ */ r(A, {
@@ -11299,13 +11318,13 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11299
11318
  children: /* @__PURE__ */ r(s, {
11300
11319
  value: c.position,
11301
11320
  options: S,
11302
- onChange: F
11321
+ onChange: D
11303
11322
  })
11304
11323
  })
11305
11324
  ] })] })
11306
11325
  });
11307
11326
  }, Nv = (e, t) => {
11308
- const n = di.find((a) => a === t);
11327
+ const n = ui.find((a) => a === t);
11309
11328
  return n && e(`editor.graphPanel.headlineNumberSection.metrics.${n}`);
11310
11329
  }, Wt = [
11311
11330
  "top",
@@ -11323,7 +11342,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11323
11342
  "pill",
11324
11343
  "direct"
11325
11344
  ], df = ({ positions: e, title: t, layout: n = "collapsible", preview: a }) => {
11326
- const o = W(), i = K(o), l = P(), { ToggleGroup: s } = B();
11345
+ const o = W(), i = K(o), l = I(), { ToggleGroup: s } = H();
11327
11346
  if (!i) return null;
11328
11347
  const c = i.config.legend.position, h = e ?? Wt, d = i.guides.legends.drawn[0], u = ys({
11329
11348
  legendPosition: i.guides.legends.position,
@@ -11331,29 +11350,29 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11331
11350
  layers: i.layers
11332
11351
  }), p = i.guides.headline?.kind === "perGroup", v = i.guides.colorGroups.length > 0;
11333
11352
  if (c === "auto" && d === void 0 && !u && (p || !v)) return null;
11334
- const m = d?.position ?? "none", f = c === "auto" ? m : c, b = Wt.filter((F) => F === f || h.includes(F)).map((F) => ({
11335
- value: F,
11336
- label: l(`editor.graphPanel.legendSection.${F}`)
11337
- })), w = (F) => {
11338
- const M = Wt.find((N) => N === F);
11339
- M && o.commands.dispatch(new jl({ position: M }));
11340
- }, x = (F) => {
11341
- const M = Br.find((N) => N === F);
11342
- M && o.commands.dispatch(new Kl({ align: M }));
11343
- }, C = (F) => {
11344
- const M = Hr.find((N) => N === F);
11345
- M && o.commands.dispatch(new ql({ display: M }));
11346
- }, S = Br.map((F) => ({
11347
- value: F,
11348
- label: l(`editor.graphPanel.legendSection.align.${F}`)
11349
- })), T = Hr.map((F) => ({
11350
- value: F,
11351
- label: l(`editor.graphPanel.legendSection.display.${F}`)
11352
- })), k = t ?? l("editor.graphPanel.legendSection.title"), O = b.find((F) => F.value === f)?.label, H = d !== void 0;
11353
+ const m = d?.position ?? "none", f = c === "auto" ? m : c, b = Wt.filter((D) => D === f || h.includes(D)).map((D) => ({
11354
+ value: D,
11355
+ label: l(`editor.graphPanel.legendSection.${D}`)
11356
+ })), x = (D) => {
11357
+ const M = Wt.find((N) => N === D);
11358
+ M && o.commands.dispatch(new Zl({ position: M }));
11359
+ }, w = (D) => {
11360
+ const M = Br.find((N) => N === D);
11361
+ M && o.commands.dispatch(new ql({ align: M }));
11362
+ }, C = (D) => {
11363
+ const M = Hr.find((N) => N === D);
11364
+ M && o.commands.dispatch(new Xl({ display: M }));
11365
+ }, S = Br.map((D) => ({
11366
+ value: D,
11367
+ label: l(`editor.graphPanel.legendSection.align.${D}`)
11368
+ })), P = Hr.map((D) => ({
11369
+ value: D,
11370
+ label: l(`editor.graphPanel.legendSection.display.${D}`)
11371
+ })), k = t ?? l("editor.graphPanel.legendSection.title"), T = b.find((D) => D.value === f)?.label, F = d !== void 0;
11353
11372
  return /* @__PURE__ */ r(j, {
11354
11373
  title: k,
11355
11374
  layout: n,
11356
- preview: a ?? O,
11375
+ preview: a ?? T,
11357
11376
  children: /* @__PURE__ */ g(te, { children: [
11358
11377
  /* @__PURE__ */ r(A, {
11359
11378
  label: l("editor.axesPanel.controls.position"),
@@ -11361,16 +11380,16 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11361
11380
  children: /* @__PURE__ */ r(s, {
11362
11381
  value: f,
11363
11382
  options: b,
11364
- onChange: w
11383
+ onChange: x
11365
11384
  })
11366
11385
  }),
11367
- H && /* @__PURE__ */ r(A, {
11386
+ F && /* @__PURE__ */ r(A, {
11368
11387
  label: l("editor.graphPanel.legendSection.alignLabel"),
11369
11388
  layout: "stack",
11370
11389
  children: /* @__PURE__ */ r(s, {
11371
11390
  value: i.config.legend.align,
11372
11391
  options: S,
11373
- onChange: x
11392
+ onChange: w
11374
11393
  })
11375
11394
  }),
11376
11395
  u && /* @__PURE__ */ r(A, {
@@ -11378,24 +11397,24 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11378
11397
  layout: "stack",
11379
11398
  children: /* @__PURE__ */ r(s, {
11380
11399
  value: i.config.legend.display,
11381
- options: T,
11400
+ options: P,
11382
11401
  onChange: C
11383
11402
  })
11384
11403
  })
11385
11404
  ] })
11386
11405
  });
11387
- }, Rv = 1, Dv = 20, _v = 0.5, ui = ({ layerId: e }) => {
11388
- const t = W(), n = K(t), { Slider: a } = B(), o = Rn(n, e, "point");
11406
+ }, Rv = 1, Dv = 20, _v = 0.5, hi = ({ layerId: e }) => {
11407
+ const t = W(), n = K(t), { Slider: a } = H(), o = Rn(n, e, "point");
11389
11408
  if (!n) return null;
11390
11409
  const i = (l) => {
11391
- const s = new ts({
11410
+ const s = new ns({
11392
11411
  layerId: e,
11393
11412
  size: l
11394
11413
  });
11395
11414
  t.commands.dispatch(s, { transient: !0 });
11396
11415
  };
11397
11416
  return /* @__PURE__ */ r(a, {
11398
- value: o?.get("size") ?? wl,
11417
+ value: o?.get("size") ?? Tl,
11399
11418
  min: Rv,
11400
11419
  max: Dv,
11401
11420
  step: _v,
@@ -11408,12 +11427,12 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11408
11427
  "zero",
11409
11428
  "connect"
11410
11429
  ], uf = ({ title: e, layout: t = "collapsible", preview: n }) => {
11411
- const a = W(), o = K(a), i = P(), { Select: l, Slider: s, Switch: c, ToggleGroup: h } = B(), d = o?.spec.layers ?? [], u = Ca(d, "line", "area"), p = Rn(o, u?.id ?? null, "line");
11430
+ const a = W(), o = K(a), i = I(), { Select: l, Slider: s, Switch: c, ToggleGroup: h } = H(), d = o?.spec.layers ?? [], u = xa(d, "line", "area"), p = Rn(o, u?.id ?? null, "line");
11412
11431
  if (!o || !u) return null;
11413
- const v = o.coordSystem.type === "polar", m = $v(i, u), f = Vv(u, d), b = fs(u.geom, u.id), w = De(o.spec), x = o.spec.styles.overrides, C = Wn(x, b, w), S = Wn(lc(x, b, w), b, w), T = C?.strokeWidth, k = typeof T == "number", O = S?.strokeWidth !== void 0, H = u.geom === "line" ? u : void 0, F = [{
11432
+ const v = o.coordSystem.type === "polar", m = $v(i, u), f = Vv(u, d), b = fs(u.geom, u.id), x = De(o.spec), w = o.spec.styles.overrides, C = Wn(w, b, x), S = Wn(lc(w, b, x), b, x), P = C?.strokeWidth, k = typeof P == "number", T = S?.strokeWidth !== void 0, F = u.geom === "line" ? u : void 0, D = [{
11414
11433
  value: "auto",
11415
11434
  label: i("editor.graphPanel.numberFormat.options.auto"),
11416
- isDisabled: O
11435
+ isDisabled: T
11417
11436
  }, {
11418
11437
  value: "custom",
11419
11438
  label: i("editor.graphPanel.numberFormat.options.custom")
@@ -11423,17 +11442,17 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11423
11442
  showPoints: oe
11424
11443
  }));
11425
11444
  }, N = (oe) => {
11426
- H && a.commands.dispatch(new hs({
11427
- layerId: H.id,
11445
+ F && a.commands.dispatch(new hs({
11446
+ layerId: F.id,
11428
11447
  showFill: oe
11429
11448
  }));
11430
11449
  }, y = (oe) => {
11431
- a.commands.dispatch(new Zl({
11450
+ a.commands.dispatch(new Yl({
11432
11451
  layerId: u.id,
11433
11452
  curve: oe ? "smooth" : "linear"
11434
11453
  }));
11435
11454
  }, V = (oe) => {
11436
- const Be = p?.get("strokeWidth") ?? Tl;
11455
+ const Be = p?.get("strokeWidth") ?? Al;
11437
11456
  a.commands.dispatch(new Vn({
11438
11457
  layerId: u.id,
11439
11458
  lineWidth: oe === "custom" ? Be : null
@@ -11445,7 +11464,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11445
11464
  }), { transient: !0 });
11446
11465
  }, xe = (oe) => {
11447
11466
  const Be = Gv(oe);
11448
- Be && a.commands.dispatch(new Yl({
11467
+ Be && a.commands.dispatch(new Jl({
11449
11468
  layerId: u.id,
11450
11469
  missingValues: Be
11451
11470
  }));
@@ -11464,9 +11483,9 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11464
11483
  }),
11465
11484
  f && /* @__PURE__ */ r(A, {
11466
11485
  label: i("editor.graphPanel.pointSize.label"),
11467
- children: /* @__PURE__ */ r(ui, { layerId: f.id })
11486
+ children: /* @__PURE__ */ r(hi, { layerId: f.id })
11468
11487
  }),
11469
- H && !v && /* @__PURE__ */ r(A, {
11488
+ F && !v && /* @__PURE__ */ r(A, {
11470
11489
  label: i("editor.graphPanel.graphOptions.lineFill"),
11471
11490
  children: /* @__PURE__ */ r(c, {
11472
11491
  isChecked: (C?.fillAlpha ?? 0) > 0,
@@ -11484,14 +11503,14 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11484
11503
  label: i("editor.graphPanel.lineThickness.label"),
11485
11504
  children: /* @__PURE__ */ r(h, {
11486
11505
  value: k ? "custom" : "auto",
11487
- options: F,
11506
+ options: D,
11488
11507
  onChange: V
11489
11508
  })
11490
11509
  }),
11491
11510
  k && /* @__PURE__ */ r(A, {
11492
11511
  label: i("editor.graphPanel.numberFormat.valueLabel"),
11493
11512
  children: /* @__PURE__ */ r(s, {
11494
- value: T,
11513
+ value: P,
11495
11514
  min: Fv,
11496
11515
  max: zv,
11497
11516
  step: Bv,
@@ -11510,7 +11529,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11510
11529
  })
11511
11530
  ] })
11512
11531
  });
11513
- }, Gv = (e) => Hv.find((t) => t === e), Vv = (e, t) => Ut(t, "point").find((n) => xa(n, [e])), $v = (e, t) => {
11532
+ }, Gv = (e) => Hv.find((t) => t === e), Vv = (e, t) => Ut(t, "point").find((n) => wa(n, [e])), $v = (e, t) => {
11514
11533
  const n = [{
11515
11534
  value: "gap",
11516
11535
  label: e("editor.graphPanel.treatEmptyValues.leaveGap.label")
@@ -11535,7 +11554,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11535
11554
  size: "editor.graphPanel.mappingSection.size",
11536
11555
  label: "editor.graphPanel.mappingSection.label"
11537
11556
  }, hf = ({ title: e, layout: t = "collapsible" }) => {
11538
- const n = W(), a = K(n), o = P(), { Select: i } = B(), l = o("editor.graphPanel.mappingSection.none"), s = a?.spec, c = I(() => s === void 0 ? [] : Js(s, Wv).map(({ aesthetic: h, variables: d, isRequired: u }) => {
11557
+ const n = W(), a = K(n), o = I(), { Select: i } = H(), l = o("editor.graphPanel.mappingSection.none"), s = a?.spec, c = E(() => s === void 0 ? [] : Js(s, Wv).map(({ aesthetic: h, variables: d, isRequired: u }) => {
11539
11558
  const p = Qs(s.mapping, h);
11540
11559
  return {
11541
11560
  aesthetic: h,
@@ -11543,7 +11562,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11543
11562
  value: p ?? (u ? null : sn),
11544
11563
  options: Kv(d, p, u ? null : l),
11545
11564
  chooseColumn: (v) => {
11546
- n.commands.dispatch(new Jl({
11565
+ n.commands.dispatch(new Ql({
11547
11566
  aesthetic: h,
11548
11567
  variable: v === sn ? null : v
11549
11568
  }));
@@ -11591,7 +11610,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11591
11610
  labelKey: "billions"
11592
11611
  }
11593
11612
  ], Yv = ["auto", "none"], pf = ({ title: e, layout: t = "collapsible", preview: n }) => {
11594
- const a = W(), o = K(a), i = P(), { NumberField: l, ToggleGroup: s } = B();
11613
+ const a = W(), o = K(a), i = I(), { NumberField: l, ToggleGroup: s } = H();
11595
11614
  if (!o) return null;
11596
11615
  const { abbreviation: c, decimals: h } = o.config.numberFormat, d = Jv(c) !== void 0, u = h !== "auto", p = (C) => C.map((S) => ({
11597
11616
  value: S,
@@ -11600,16 +11619,16 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11600
11619
  value: C,
11601
11620
  label: i(`common.abbreviations.${S}`)
11602
11621
  })), m = (C) => {
11603
- a.commands.dispatch(new Ql({ abbreviation: C }));
11622
+ a.commands.dispatch(new es({ abbreviation: C }));
11604
11623
  }, f = (C) => {
11605
- const S = Yv.find((T) => T === C);
11624
+ const S = Yv.find((P) => P === C);
11606
11625
  m(S ?? qv);
11607
11626
  }, b = (C) => {
11608
- const S = cn.find((T) => T.value === C);
11627
+ const S = cn.find((P) => P.value === C);
11609
11628
  S && m(S.value);
11610
- }, w = (C) => {
11611
- a.commands.dispatch(new $n({ decimals: C === "custom" ? Xv : "auto" }));
11612
11629
  }, x = (C) => {
11630
+ a.commands.dispatch(new $n({ decimals: C === "custom" ? Xv : "auto" }));
11631
+ }, w = (C) => {
11613
11632
  C !== null && a.commands.dispatch(new $n({ decimals: C }), { transient: !0 });
11614
11633
  };
11615
11634
  return /* @__PURE__ */ r(j, {
@@ -11642,7 +11661,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11642
11661
  children: /* @__PURE__ */ r(s, {
11643
11662
  value: u ? "custom" : "auto",
11644
11663
  options: p(["auto", "custom"]),
11645
- onChange: w
11664
+ onChange: x
11646
11665
  })
11647
11666
  }),
11648
11667
  u && /* @__PURE__ */ r(A, {
@@ -11651,14 +11670,14 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11651
11670
  value: h,
11652
11671
  min: jv,
11653
11672
  max: Zv,
11654
- onChange: x,
11673
+ onChange: w,
11655
11674
  onCommit: a.commands.commit
11656
11675
  })
11657
11676
  })
11658
11677
  ] })
11659
11678
  });
11660
11679
  }, Jv = (e) => cn.find((t) => t.value === e), mf = ({ title: e, layout: t = "collapsible", preview: n }) => {
11661
- const a = K(W()), o = P();
11680
+ const a = K(W()), o = I();
11662
11681
  if (!a) return null;
11663
11682
  const i = Qv(a.spec.layers);
11664
11683
  return i ? /* @__PURE__ */ r(j, {
@@ -11667,19 +11686,19 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11667
11686
  preview: n,
11668
11687
  children: /* @__PURE__ */ r(te, { children: /* @__PURE__ */ r(A, {
11669
11688
  label: o("editor.graphPanel.numberFormat.valueLabel"),
11670
- children: /* @__PURE__ */ r(ui, { layerId: i.id })
11689
+ children: /* @__PURE__ */ r(hi, { layerId: i.id })
11671
11690
  }) })
11672
11691
  }) : null;
11673
11692
  }, Qv = (e) => {
11674
11693
  const t = Ut(e, "line", "area");
11675
- return Ut(e, "point").find((n) => !xa(n, t));
11694
+ return Ut(e, "point").find((n) => !wa(n, t));
11676
11695
  }, e5 = 0.9, t5 = 360, n5 = 0.05, r5 = 15, gf = ({ title: e, layout: t = "collapsible", preview: n }) => {
11677
- const a = W(), o = K(a), i = P(), { Slider: l } = B();
11696
+ const a = W(), o = K(a), i = I(), { Slider: l } = H();
11678
11697
  if (!o || o.spec.coords.coordType !== "polar") return null;
11679
11698
  const { innerRadius: s, startAngle: c } = o.spec.coords.params, h = (u) => {
11680
- a.commands.dispatch(new ns({ innerRadius: u }), { transient: !0 });
11699
+ a.commands.dispatch(new rs({ innerRadius: u }), { transient: !0 });
11681
11700
  }, d = (u) => {
11682
- a.commands.dispatch(new rs({ startAngle: u }), { transient: !0 });
11701
+ a.commands.dispatch(new as({ startAngle: u }), { transient: !0 });
11683
11702
  };
11684
11703
  return /* @__PURE__ */ r(j, {
11685
11704
  title: e ?? i("editor.graphPanel.polarSection.title"),
@@ -11692,7 +11711,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11692
11711
  min: 0,
11693
11712
  max: e5,
11694
11713
  step: n5,
11695
- formatValue: si,
11714
+ formatValue: ci,
11696
11715
  onChange: h,
11697
11716
  onCommit: a.commands.commit
11698
11717
  })
@@ -11764,25 +11783,25 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11764
11783
  "power",
11765
11784
  "loess"
11766
11785
  ], o5 = "linear", vf = ({ title: e, layout: t = "collapsible", preview: n }) => {
11767
- const a = W(), o = K(a), i = P(), { Select: l, Switch: s } = B(), { options: c, findValue: h } = So(o);
11786
+ const a = W(), o = K(a), i = I(), { Select: l, Switch: s } = H(), { options: c, findValue: h } = Co(o);
11768
11787
  if (!o || o.coordSystem.type === "polar") return null;
11769
11788
  const d = Rs(o.spec.layers), u = Ps(o.spec.layers), p = d?.stat.type === "smooth" ? d.stat.method : o5, v = i5(u), m = Vr.map((S) => ({
11770
11789
  value: S,
11771
11790
  label: i(`editor.annotationsPanel.trendType.options.${S}`)
11772
- })), f = (S, T = {}) => {
11773
- const k = d ?? u, O = new ss({
11791
+ })), f = (S, P = {}) => {
11792
+ const k = d ?? u, T = new ss({
11774
11793
  line: S,
11775
- ...T,
11794
+ ...P,
11776
11795
  ...k !== void 0 && { layerId: k.id },
11777
11796
  label: i("editor.annotationsPanel.trendsAndAveragesSection.average")
11778
11797
  });
11779
- a.commands.dispatch(O);
11780
- }, b = (S) => f(S ? "trend" : "none", { method: p }), w = (S) => f(S ? "average" : "none", { group: v ?? h(c[0]?.value ?? "") }), x = (S) => {
11781
- const T = Vr.find((k) => k === S);
11782
- T !== void 0 && f("trend", { method: T });
11798
+ a.commands.dispatch(T);
11799
+ }, b = (S) => f(S ? "trend" : "none", { method: p }), x = (S) => f(S ? "average" : "none", { group: v ?? h(c[0]?.value ?? "") }), w = (S) => {
11800
+ const P = Vr.find((k) => k === S);
11801
+ P !== void 0 && f("trend", { method: P });
11783
11802
  }, C = (S) => {
11784
- const T = S === null ? void 0 : h(S);
11785
- T !== void 0 && f("average", { group: T });
11803
+ const P = S === null ? void 0 : h(S);
11804
+ P !== void 0 && f("average", { group: P });
11786
11805
  };
11787
11806
  return /* @__PURE__ */ r(j, {
11788
11807
  title: e ?? i("editor.annotationsPanel.trendsAndAveragesSection.title"),
@@ -11802,7 +11821,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11802
11821
  children: /* @__PURE__ */ r(l, {
11803
11822
  value: p,
11804
11823
  options: m,
11805
- onChange: x,
11824
+ onChange: w,
11806
11825
  placeholder: i("editor.annotationsPanel.trendType.placeholder")
11807
11826
  })
11808
11827
  }),
@@ -11811,7 +11830,7 @@ var S0 = "_40zvwv8", j = ({ title: e, layout: t = "fixed", preview: n, accessory
11811
11830
  icon: /* @__PURE__ */ r(a5, { size: "lg" }),
11812
11831
  children: /* @__PURE__ */ r(s, {
11813
11832
  isChecked: u !== void 0,
11814
- onChange: w
11833
+ onChange: x
11815
11834
  })
11816
11835
  }),
11817
11836
  u !== void 0 && c.length > 0 && /* @__PURE__ */ r(A, {
@@ -11841,10 +11860,10 @@ export {
11841
11860
  dd as ColorSwatches,
11842
11861
  rf as ComboSection,
11843
11862
  pu as ControlRegistryProvider,
11844
- Ya as ControlTooltip,
11863
+ Ja as ControlTooltip,
11845
11864
  kd as CustomColor,
11846
11865
  Z5 as EditableGraphRenderer,
11847
- ii as EditorPanel,
11866
+ li as EditorPanel,
11848
11867
  J5 as ElementsPanel,
11849
11868
  af as GoalSection,
11850
11869
  of as GraphOptionsSection,
@@ -11872,10 +11891,10 @@ export {
11872
11891
  su as TextField,
11873
11892
  D0 as TextSizeSection,
11874
11893
  _0 as TitleSection,
11875
- Qa as ToggleGroup,
11894
+ eo as ToggleGroup,
11876
11895
  w0 as ToggledSection,
11877
11896
  vf as TrendsAndAveragesSection,
11878
- B as useControls,
11897
+ H as useControls,
11879
11898
  c0 as usePanelExpansion,
11880
11899
  W as usePanelGraph
11881
11900
  };