@graphysdk/react-renderer 1.9.0-beta.1791402470702 → 1.9.0-beta.1791403305083
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editable.cjs +1 -1
- package/dist/editable.mjs +613 -613
- package/dist/{history-chords-vrYuh7hl.js → history-chords-BA0sExar.js} +1 -1
- package/dist/{history-chords-CMbODkOy.cjs → history-chords-Dbx6jyaY.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +4 -4
package/dist/editable.mjs
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { $ as sn, $t as cn, At as hi, C as pi, Ct as mi, D as gi, E as vi, F as k, G as fi, H as bi, Ht as yi, J as Si, Jt as Ci, K as
|
|
2
|
-
import { n as se, t as
|
|
3
|
-
import { ARROW_DEFAULTS as al, ARROW_STICKER_DECLARATIONS as ol, ARROW_STROKE_WIDTHS_PX as Dt, AddAnnotationCommand as we, AddHighlightCommand as il, BORDER_RADIUS_TOKENS as
|
|
4
|
-
import { Fragment as
|
|
1
|
+
import { $ as sn, $t as cn, At as hi, C as pi, Ct as mi, D as gi, E as vi, F as k, G as fi, H as bi, Ht as yi, J as Si, Jt as Ci, K as Rn, Kt as xi, N as wi, O as Hr, Ot as Xe, P as Ti, Q as Gr, Qt as Vr, R as Ai, Rt as ki, S as Li, St as Pi, T as Le, Tt as de, U as Z, V as Ii, W as V, X as dn, Xt as Ei, Y as U, Yt as Oi, Z as un, _ as Me, _t as M, at as Mi, b as $r, bt as Ne, c as Wr, ct as Dn, d as Ni, dn as te, en as He, et as vt, f as Ri, ft, g as Ur, gt as Di, h as hn, hn as B, ht as _i, i as Fi, in as zi, jt as Bi, k as bt, kt as J, l as Hi, ln as Kr, lt as Gi, m as Vi, n as fe, nt as qr, o as $i, on as Wi, ot as Ui, p as Xr, pn as _, q as Ki, qt as qi, r as K, rn as Xi, rt as Zr, st as Zi, t as ji, tt as Yi, u as Ji, ut as ie, v as Qi, vt as el, wt as tl, x as nl, y as rl, zt as jr } from "./history-chords-BA0sExar.js";
|
|
2
|
+
import { n as se, t as Yr } from "./theme.contract.css-oFmndjcI.js";
|
|
3
|
+
import { ARROW_DEFAULTS as al, ARROW_STICKER_DECLARATIONS as ol, ARROW_STROKE_WIDTHS_PX as Dt, AddAnnotationCommand as we, AddHighlightCommand as il, BORDER_RADIUS_TOKENS as _n, COMBO_TYPES as Fn, CONSTANT_VARIABLES as ll, DASH_PRESETS as sl, DEFAULT_BAR_CORNER_RADIUS as cl, DEFAULT_GEOM_COLOR as dl, DEFAULT_POINT_SIZE_PX as ul, DEFAULT_STROKE_WIDTH_PX as hl, DIFFERENCE_ARROW_DEFAULTS as Jr, DIFFERENCE_ARROW_SIZE_DECLARATIONS as zn, InternalError as pl, MAX_BAR_WIDTH_FRACTION as ml, MIN_BAR_WIDTH_FRACTION as gl, MoveAnnotationCommand as vl, RESTING_HOVER_STATE as pn, RemoveAnnotationCommand as $e, RemoveHighlightCommand as fl, SHAPE_DEFAULTS as bl, SetAxisLabelCommand as yl, SetAxisPositionCommand as Sl, SetAxisTickModeCommand as Cl, SetAxisTicksVisibilityCommand as xl, SetAxisVisibilityCommand as wl, SetBarCornerRadiusCommand as Tl, SetBarWidthCommand as Al, SetChartTypeCommand as Qr, SetContentCaptionCommand as ea, SetContentSourceCommand as kl, SetContentSubtitleCommand as ta, SetContentTitleCommand as na, SetDataLabelsFormatCommand as Ll, SetDifferenceArrowStyleCommand as Pl, SetGridLineStyleCommand as Il, SetGridLineWidthCommand as El, SetGridVisibilityCommand as Ol, SetHeadlineCompareWithCommand as Ml, SetHeadlinePositionCommand as Nl, SetHeadlineShowCommand as Bn, SetHeadlineSizeCommand as Rl, SetHighlightDimStyleCommand as Dl, SetLayerYScaleTypeCommand as _l, SetLegendAlignCommand as Fl, SetLegendDisplayCommand as zl, SetLegendPositionCommand as Bl, SetLineCurveCommand as Hl, SetLineMissingValuesCommand as Gl, SetLineWidthCommand as Hn, SetMappingCommand as Vl, SetNumberFormatAbbreviationCommand as $l, SetNumberFormatDecimalsCommand as Gn, SetPointSizeCommand as Wl, SetPolarInnerRadiusCommand as Ul, SetPolarStartAngleCommand as Kl, SetRuleLabelCommand as ql, SetRuleValueCommand as Xl, SetScaleDomainCommand as _t, SetScaleReverseCommand as Zl, SetScaleTransformCommand as jl, SetStatLineCommand as Yl, SetStyleRuleCommand as Ee, TEXT_ANNOTATION_DEFAULTS as Jl, TEXT_ANNOTATION_FADE_ALPHA as Ql, ToggleCategoryLabelsCommand as es, ToggleContentVisibilityCommand as yt, ToggleDataLabelsCommand as ts, ToggleGoalLineCommand as ns, ToggleLineFillCommand as rs, ToggleLinePointsCommand as as, ToggleStackTotalsCommand as os, UpdateAnnotationCommand as ue, alignUnitFractions as is, areAnchorsEqual as ra, areEditTargetsEqual as aa, areEndpointsComparable as ls, buildEditMenuTriggerRegion as ss, buildLayerStyleAddress as cs, buildObservationPredicate as ds, buildObservationsTarget as St, buildObservationsTargetAtValue as oa, canAnchorDirectLabels as us, canBecomeCombo as hs, canBecomeHeatmap as ps, clampAnnotationTranslation as ms, combineKindStyleDeclarations as Vn, computeArrow as ia, createObservationAnchorBuilder as gs, createObservationAnchorParser as vs, createStyleResolver as fs, createValueFormatter as la, createXValueReader as bs, filterLayersByGeoms as Vt, findAnnotation as ys, findAverageLineLayer as Ss, findAxisGuide as Cs, findCompanionLayers as sa, findGoalLineLayer as xs, findHighlightsAtObservation as ws, findHostLayer as Ts, findLayerByGeom as ca, findLayerById as ve, findObservationAttachment as As, findStyleRule as Ae, findTrendLineLayer as ks, formatDifferenceLabel as Ls, getBoundingRect as $t, getGroupVariables as Ps, getXBand as Is, getYBand as Es, hasMainAxisBand as Os, hasMultipleGroups as Ms, inferDefaultDifferenceArrowEndpoints as Ns, inferDifferenceArrowEndpoints as Rs, isComboChartType as Ie, isCompanionLayer as da, isObservationAttachmentKind as Ds, isPointWithinEditMenuTrigger as mn, isSafeUrl as _s, isZeroAnchoredAxis as Fs, measureObservationsBoxes as ua, projectAnchorToPanel as lt, readBroadestObservationsScope as zs, readChartType as ha, readComboLineLayerId as Bs, readCompanionRowsAtScopeKey as Hs, readConstantValue as Gs, readEditTargetKey as Ct, readGeomColor as Vs, readHighlightDimStyle as $s, readMainAxis as Ws, readMappableAesthetics as Us, readMappedVariable as Ks, readObservationIndex as pa, readReachableLevels as qs, readRowScopeKey as Xs, readRowsAtScopeKey as Zs, readScopeXVariable as js, readStyleCoord as Re, readStyleRulesBeneath as Ys, readVariableName as xt, resolveArrowAnnotationStyle as gn, resolveBarBandFraction as Js, resolveComparisonBasis as Qs, resolveDifferenceArrowAnnotationStyle as ec, resolveEditOutlineStyle as tc, resolveObservationPoint as ma, resolveObservationsTarget as $n, stepDifferenceArrowEndpoint as nc, toDashPreset as Wt, toPaintColor as st, toPanelCursor as wt } from "@graphysdk/viz-engine";
|
|
4
|
+
import { Fragment as rc, createContext as De, memo as ga, useCallback as ae, useContext as Se, useEffect as z, useId as ke, useLayoutEffect as Oe, useMemo as P, useRef as ne, useState as Y } from "react";
|
|
5
5
|
import { Fragment as Q, jsx as r, jsxs as g } from "react/jsx-runtime";
|
|
6
|
-
import { motion as
|
|
7
|
-
import { useShallow as
|
|
6
|
+
import { motion as ac } from "motion/react";
|
|
7
|
+
import { useShallow as be } from "zustand/react/shallow";
|
|
8
8
|
import { assignInlineVars as Ze } from "@vanilla-extract/dynamic";
|
|
9
9
|
import { createPortal as va } from "react-dom";
|
|
10
10
|
import ye from "clsx";
|
|
11
|
-
import { autoUpdate as
|
|
11
|
+
import { autoUpdate as oc, flip as ic, offset as lc, shift as sc, useFloating as cc } from "@floating-ui/react-dom";
|
|
12
12
|
import { Extension as fa } from "@tiptap/core";
|
|
13
|
-
import { Bold as
|
|
13
|
+
import { Bold as dc } from "@tiptap/extension-bold";
|
|
14
14
|
import { Document as ct } from "@tiptap/extension-document";
|
|
15
|
-
import { HardBreak as
|
|
16
|
-
import { Heading as
|
|
17
|
-
import { Italic as
|
|
18
|
-
import { Link as
|
|
19
|
-
import { Text as
|
|
20
|
-
import { TextAlign as
|
|
21
|
-
import { Color as
|
|
22
|
-
import { Underline as
|
|
23
|
-
import { Placeholder as
|
|
15
|
+
import { HardBreak as uc } from "@tiptap/extension-hard-break";
|
|
16
|
+
import { Heading as hc } from "@tiptap/extension-heading";
|
|
17
|
+
import { Italic as pc } from "@tiptap/extension-italic";
|
|
18
|
+
import { Link as mc } from "@tiptap/extension-link";
|
|
19
|
+
import { Text as gc } from "@tiptap/extension-text";
|
|
20
|
+
import { TextAlign as vc } from "@tiptap/extension-text-align";
|
|
21
|
+
import { Color as fc, FontFamily as ba, TextStyle as bc } from "@tiptap/extension-text-style";
|
|
22
|
+
import { Underline as yc } from "@tiptap/extension-underline";
|
|
23
|
+
import { Placeholder as vn, UndoRedo as Sc } from "@tiptap/extensions";
|
|
24
24
|
import { Paragraph as ya } from "@tiptap/extension-paragraph";
|
|
25
|
-
import { EditorContent as Sa, useEditor as
|
|
25
|
+
import { EditorContent as Sa, useEditor as Cc, useEditorState as xc } from "@tiptap/react";
|
|
26
26
|
import { Toolbar as Ce } from "@base-ui/react/toolbar";
|
|
27
27
|
import { Tooltip as le } from "@base-ui/react/tooltip";
|
|
28
28
|
import { Popover as j } from "@base-ui/react/popover";
|
|
29
|
-
import { HexColorInput as
|
|
29
|
+
import { HexColorInput as wc, HexColorPicker as Tc } from "react-colorful";
|
|
30
30
|
import { Slider as ge } from "@base-ui/react/slider";
|
|
31
31
|
import { Menu as H } from "@base-ui/react/menu";
|
|
32
|
-
import { Toggle as
|
|
32
|
+
import { Toggle as Ac } from "@base-ui/react/toggle";
|
|
33
33
|
import Ve from "lodash-es/clamp";
|
|
34
34
|
import { Radio as Ca } from "@base-ui/react/radio";
|
|
35
35
|
import { RadioGroup as xa } from "@base-ui/react/radio-group";
|
|
36
36
|
import { Menu as Te } from "@base-ui/react";
|
|
37
37
|
import { Accordion as Ue } from "@base-ui/react/accordion";
|
|
38
|
-
import { NumberField as
|
|
38
|
+
import { NumberField as Wn } from "@base-ui/react/number-field";
|
|
39
39
|
import { Select as pe } from "@base-ui/react/select";
|
|
40
|
-
import { Switch as
|
|
41
|
-
import { Input as
|
|
42
|
-
import { Separator as
|
|
43
|
-
import './editable.css';var
|
|
40
|
+
import { Switch as Un } from "@base-ui/react/switch";
|
|
41
|
+
import { Input as kc } from "@base-ui/react/input";
|
|
42
|
+
import { Separator as Lc } from "@base-ui/react/separator";
|
|
43
|
+
import './editable.css';var Pc = {
|
|
44
44
|
save: "حفظ",
|
|
45
45
|
cancel: "إلغاء",
|
|
46
46
|
confirm: "تأكيد",
|
|
@@ -51,7 +51,7 @@ import './editable.css';var Lc = {
|
|
|
51
51
|
millions: "مليون",
|
|
52
52
|
billions: "مليار"
|
|
53
53
|
}
|
|
54
|
-
},
|
|
54
|
+
}, Ic = {
|
|
55
55
|
title: "محرر Graphy",
|
|
56
56
|
description: "قم بتحرير المحتوى الخاص بك هنا",
|
|
57
57
|
graphTypes: {
|
|
@@ -581,7 +581,7 @@ import './editable.css';var Lc = {
|
|
|
581
581
|
light: "فاتح",
|
|
582
582
|
dark: "داكن"
|
|
583
583
|
} }
|
|
584
|
-
},
|
|
584
|
+
}, Ec = {
|
|
585
585
|
titleEditor: {
|
|
586
586
|
titlePlaceholder: "بدون عنوان",
|
|
587
587
|
subtitlePlaceholder: "إضافة عنوان فرعي"
|
|
@@ -821,11 +821,11 @@ import './editable.css';var Lc = {
|
|
|
821
821
|
}
|
|
822
822
|
}
|
|
823
823
|
}
|
|
824
|
-
}, Ec = {
|
|
825
|
-
common: Lc,
|
|
826
|
-
editor: Pc,
|
|
827
|
-
graph: Ic
|
|
828
824
|
}, Oc = {
|
|
825
|
+
common: Pc,
|
|
826
|
+
editor: Ic,
|
|
827
|
+
graph: Ec
|
|
828
|
+
}, Mc = {
|
|
829
829
|
save: "Save",
|
|
830
830
|
cancel: "Cancel",
|
|
831
831
|
confirm: "Confirm",
|
|
@@ -836,7 +836,7 @@ import './editable.css';var Lc = {
|
|
|
836
836
|
millions: "m",
|
|
837
837
|
billions: "b"
|
|
838
838
|
}
|
|
839
|
-
},
|
|
839
|
+
}, Nc = {
|
|
840
840
|
title: "Graphy Editor",
|
|
841
841
|
description: "Edit your content here",
|
|
842
842
|
graphTypes: {
|
|
@@ -1368,7 +1368,7 @@ import './editable.css';var Lc = {
|
|
|
1368
1368
|
light: "Light",
|
|
1369
1369
|
dark: "Dark"
|
|
1370
1370
|
} }
|
|
1371
|
-
},
|
|
1371
|
+
}, Rc = {
|
|
1372
1372
|
titleEditor: {
|
|
1373
1373
|
titlePlaceholder: "Untitled",
|
|
1374
1374
|
subtitlePlaceholder: "Add a subtitle"
|
|
@@ -1608,17 +1608,17 @@ import './editable.css';var Lc = {
|
|
|
1608
1608
|
}
|
|
1609
1609
|
}
|
|
1610
1610
|
}
|
|
1611
|
-
}, Rc = {
|
|
1612
|
-
common: Oc,
|
|
1613
|
-
editor: Mc,
|
|
1614
|
-
graph: Nc
|
|
1615
1611
|
}, Dc = {
|
|
1612
|
+
common: Mc,
|
|
1613
|
+
editor: Nc,
|
|
1614
|
+
graph: Rc
|
|
1615
|
+
}, _c = {
|
|
1616
1616
|
colorPanel: {
|
|
1617
1617
|
backgroundSection: { gray: "Gray" },
|
|
1618
1618
|
borderType: { gray: "Gray" }
|
|
1619
1619
|
},
|
|
1620
1620
|
highlighting: { highlightStyle: { gray: "Gray" } }
|
|
1621
|
-
},
|
|
1621
|
+
}, Fc = { editor: _c }, zc = {
|
|
1622
1622
|
save: "Guardar",
|
|
1623
1623
|
cancel: "Cancelar",
|
|
1624
1624
|
confirm: "Confirmar",
|
|
@@ -1629,7 +1629,7 @@ import './editable.css';var Lc = {
|
|
|
1629
1629
|
millions: "M",
|
|
1630
1630
|
billions: "MM"
|
|
1631
1631
|
}
|
|
1632
|
-
},
|
|
1632
|
+
}, Bc = {
|
|
1633
1633
|
title: "Editor Graphy",
|
|
1634
1634
|
description: "Edite o seu conteúdo aqui",
|
|
1635
1635
|
graphTypes: {
|
|
@@ -2160,7 +2160,7 @@ import './editable.css';var Lc = {
|
|
|
2160
2160
|
light: "Claro",
|
|
2161
2161
|
dark: "Escuro"
|
|
2162
2162
|
} }
|
|
2163
|
-
},
|
|
2163
|
+
}, Hc = {
|
|
2164
2164
|
titleEditor: {
|
|
2165
2165
|
titlePlaceholder: "Sem título",
|
|
2166
2166
|
subtitlePlaceholder: "Adicionar subtítulo"
|
|
@@ -2400,26 +2400,26 @@ import './editable.css';var Lc = {
|
|
|
2400
2400
|
}
|
|
2401
2401
|
}
|
|
2402
2402
|
}
|
|
2403
|
-
}, Hc = {
|
|
2404
|
-
common: Fc,
|
|
2405
|
-
editor: zc,
|
|
2406
|
-
graph: Bc
|
|
2407
2403
|
}, Gc = {
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2404
|
+
common: zc,
|
|
2405
|
+
editor: Bc,
|
|
2406
|
+
graph: Hc
|
|
2407
|
+
}, Vc = {
|
|
2408
|
+
"en-GB": Dc,
|
|
2409
|
+
"en-US": Fc,
|
|
2410
|
+
ar: Oc,
|
|
2411
|
+
"pt-PT": Gc
|
|
2412
|
+
}, $c = [Vc, el], Wc = ({ children: e, ...t }) => /* @__PURE__ */ r(Di, {
|
|
2413
|
+
dictionaries: $c,
|
|
2414
2414
|
...t,
|
|
2415
2415
|
children: e
|
|
2416
|
-
}),
|
|
2416
|
+
}), Uc = "data-variant", wa = ya.extend({ addAttributes() {
|
|
2417
2417
|
return { variant: {
|
|
2418
2418
|
default: null,
|
|
2419
2419
|
parseHTML: (e) => e.getAttribute("data-variant") ?? null,
|
|
2420
|
-
renderHTML: (e) => e.variant ? { [
|
|
2420
|
+
renderHTML: (e) => e.variant ? { [Uc]: e.variant } : {}
|
|
2421
2421
|
} };
|
|
2422
|
-
} }),
|
|
2422
|
+
} }), Kc = fa.create({
|
|
2423
2423
|
name: "preventBackspaceAcrossTitleBoundary",
|
|
2424
2424
|
addOptions() {
|
|
2425
2425
|
return { isTitleVisible: !0 };
|
|
@@ -2433,35 +2433,35 @@ import './editable.css';var Lc = {
|
|
|
2433
2433
|
return n.depth !== 1 || n.parentOffset !== 0 ? !1 : n.index(0) === 1;
|
|
2434
2434
|
} };
|
|
2435
2435
|
}
|
|
2436
|
-
}),
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2436
|
+
}), fn = () => [
|
|
2437
|
+
gc,
|
|
2438
|
+
Sc,
|
|
2439
|
+
hc.configure({ levels: [
|
|
2440
2440
|
1,
|
|
2441
2441
|
2,
|
|
2442
2442
|
3
|
|
2443
2443
|
] }),
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2444
|
+
dc,
|
|
2445
|
+
pc,
|
|
2446
|
+
yc,
|
|
2447
|
+
vc.configure({ types: ["heading", "paragraph"] }),
|
|
2448
|
+
mc.configure({
|
|
2449
2449
|
openOnClick: !1,
|
|
2450
2450
|
autolink: !0
|
|
2451
2451
|
}),
|
|
2452
|
+
bc,
|
|
2452
2453
|
fc,
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
Xc({
|
|
2454
|
+
uc
|
|
2455
|
+
], qc = ({ titlePlaceholder: e, subtitlePlaceholder: t, isTitleVisible: n, isSubtitleVisible: a }) => [
|
|
2456
|
+
Zc({
|
|
2457
2457
|
isTitleVisible: n,
|
|
2458
2458
|
isSubtitleVisible: a
|
|
2459
2459
|
}),
|
|
2460
2460
|
wa,
|
|
2461
|
-
...
|
|
2461
|
+
...fn(),
|
|
2462
2462
|
ba,
|
|
2463
|
-
|
|
2464
|
-
|
|
2463
|
+
Kc.configure({ isTitleVisible: n }),
|
|
2464
|
+
vn.configure({
|
|
2465
2465
|
showOnlyCurrent: !1,
|
|
2466
2466
|
placeholder: ({ pos: o, editor: i }) => {
|
|
2467
2467
|
if (n && o === 0) return e;
|
|
@@ -2469,35 +2469,35 @@ import './editable.css';var Lc = {
|
|
|
2469
2469
|
return a && o === l ? t : "";
|
|
2470
2470
|
}
|
|
2471
2471
|
})
|
|
2472
|
-
],
|
|
2472
|
+
], Xc = ({ placeholder: e }) => [
|
|
2473
2473
|
ct,
|
|
2474
2474
|
wa,
|
|
2475
|
-
...
|
|
2475
|
+
...fn(),
|
|
2476
2476
|
ba,
|
|
2477
|
-
|
|
2477
|
+
vn.configure({
|
|
2478
2478
|
showOnlyCurrent: !1,
|
|
2479
2479
|
placeholder: ({ pos: t }) => t === 0 ? e : ""
|
|
2480
2480
|
})
|
|
2481
|
-
],
|
|
2482
|
-
var Aa = "d0bl03",
|
|
2483
|
-
className:
|
|
2481
|
+
], Zc = ({ isTitleVisible: e, isSubtitleVisible: t }) => e && t ? ct.extend({ content: "block{2,}" }) : ct, Ta = "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))", jc = "d0bl00";
|
|
2482
|
+
var Aa = "d0bl03", Yc = "d0bl04", ka = "d0bl05", Ut = "d0bl06", Jc = "d0bl07", Qc = "d0bl08", La = "d0bl09", ed = "d0bl0a", td = "d0bl0b", nd = "d0bl0c", rd = "d0bl0d", ad = "d0bl0e", od = "owf1yg0", id = "owf1yg1", ld = "owf1yg2", sd = "owf1yg3", cd = "owf1yg4", dd = 0.01, ud = ({ value: e, onChange: t, label: n }) => /* @__PURE__ */ r(ge.Root, {
|
|
2483
|
+
className: od,
|
|
2484
2484
|
value: e,
|
|
2485
2485
|
onValueChange: (a) => t(a),
|
|
2486
2486
|
min: 0,
|
|
2487
2487
|
max: 1,
|
|
2488
|
-
step:
|
|
2488
|
+
step: dd,
|
|
2489
2489
|
children: /* @__PURE__ */ r(ge.Control, {
|
|
2490
|
-
className:
|
|
2490
|
+
className: id,
|
|
2491
2491
|
children: /* @__PURE__ */ g(ge.Track, {
|
|
2492
|
-
className:
|
|
2493
|
-
children: [/* @__PURE__ */ r(ge.Indicator, { className:
|
|
2494
|
-
className:
|
|
2492
|
+
className: ld,
|
|
2493
|
+
children: [/* @__PURE__ */ r(ge.Indicator, { className: sd }), /* @__PURE__ */ r(ge.Thumb, {
|
|
2494
|
+
className: cd,
|
|
2495
2495
|
"aria-label": n
|
|
2496
2496
|
})]
|
|
2497
2497
|
})
|
|
2498
2498
|
})
|
|
2499
|
-
}), Pa = "transparent", Kt =
|
|
2500
|
-
const d = M(), u =
|
|
2499
|
+
}), Pa = "transparent", Kt = Yr.map((e) => se[e]), hd = Object.fromEntries(Yr.map((e) => [se[e], e])), pd = (e) => Kt.some((t) => Ea(t, e)), md = ({ color: e, onChange: t, isOpen: n, onOpenChange: a, children: o, label: i, popupAttributes: l, opacity: s, onOpacityChange: c, hasTransparentOption: h = !1 }) => {
|
|
2500
|
+
const d = M(), u = vd(), p = h ? [Pa, ...Kt] : Kt, v = (m) => {
|
|
2501
2501
|
t(m), a(!1);
|
|
2502
2502
|
};
|
|
2503
2503
|
return /* @__PURE__ */ g(j.Root, {
|
|
@@ -2506,7 +2506,7 @@ var Aa = "d0bl03", jc = "d0bl04", ka = "d0bl05", Ut = "d0bl06", Yc = "d0bl07", J
|
|
|
2506
2506
|
children: [/* @__PURE__ */ r(j.Trigger, {
|
|
2507
2507
|
render: /* @__PURE__ */ r(Ce.Button, {}),
|
|
2508
2508
|
"aria-label": i ?? d("graph.toolbar.color.label"),
|
|
2509
|
-
className:
|
|
2509
|
+
className: jc,
|
|
2510
2510
|
onMouseDown: (m) => m.preventDefault(),
|
|
2511
2511
|
children: o ?? /* @__PURE__ */ r("span", {
|
|
2512
2512
|
className: "d0bl01",
|
|
@@ -2519,23 +2519,23 @@ var Aa = "d0bl03", jc = "d0bl04", ka = "d0bl05", Ut = "d0bl06", Yc = "d0bl07", J
|
|
|
2519
2519
|
align: "start",
|
|
2520
2520
|
className: Aa,
|
|
2521
2521
|
children: /* @__PURE__ */ g(j.Popup, {
|
|
2522
|
-
className:
|
|
2522
|
+
className: Yc,
|
|
2523
2523
|
onMouseDown: (m) => m.preventDefault(),
|
|
2524
2524
|
...l,
|
|
2525
2525
|
children: [
|
|
2526
|
-
/* @__PURE__ */ r(
|
|
2526
|
+
/* @__PURE__ */ r(Kn, {
|
|
2527
2527
|
title: d("graph.colorDropdown.colors"),
|
|
2528
2528
|
colors: p,
|
|
2529
2529
|
currentColor: e,
|
|
2530
2530
|
onPick: v
|
|
2531
2531
|
}),
|
|
2532
|
-
u.length > 0 && /* @__PURE__ */ r(
|
|
2532
|
+
u.length > 0 && /* @__PURE__ */ r(Kn, {
|
|
2533
2533
|
title: d("graph.colorDropdown.chartColors"),
|
|
2534
2534
|
colors: u,
|
|
2535
2535
|
currentColor: e,
|
|
2536
2536
|
onPick: v
|
|
2537
2537
|
}),
|
|
2538
|
-
/* @__PURE__ */ r(
|
|
2538
|
+
/* @__PURE__ */ r(gd, {
|
|
2539
2539
|
value: e ?? "#000000",
|
|
2540
2540
|
onChange: t,
|
|
2541
2541
|
popupAttributes: l
|
|
@@ -2545,7 +2545,7 @@ var Aa = "d0bl03", jc = "d0bl04", ka = "d0bl05", Ut = "d0bl06", Yc = "d0bl07", J
|
|
|
2545
2545
|
children: [/* @__PURE__ */ r("div", {
|
|
2546
2546
|
className: "d0bl06",
|
|
2547
2547
|
children: d("graph.colorDropdown.opacity")
|
|
2548
|
-
}), /* @__PURE__ */ r(
|
|
2548
|
+
}), /* @__PURE__ */ r(ud, {
|
|
2549
2549
|
value: s,
|
|
2550
2550
|
onChange: c,
|
|
2551
2551
|
label: d("graph.colorDropdown.opacity")
|
|
@@ -2556,7 +2556,7 @@ var Aa = "d0bl03", jc = "d0bl04", ka = "d0bl05", Ut = "d0bl06", Yc = "d0bl07", J
|
|
|
2556
2556
|
}) })
|
|
2557
2557
|
})]
|
|
2558
2558
|
});
|
|
2559
|
-
},
|
|
2559
|
+
}, Kn = ({ title: e, colors: t, currentColor: n, onPick: a }) => {
|
|
2560
2560
|
const o = M();
|
|
2561
2561
|
return /* @__PURE__ */ g("div", {
|
|
2562
2562
|
className: ka,
|
|
@@ -2564,11 +2564,11 @@ var Aa = "d0bl03", jc = "d0bl04", ka = "d0bl05", Ut = "d0bl06", Yc = "d0bl07", J
|
|
|
2564
2564
|
className: Ut,
|
|
2565
2565
|
children: e
|
|
2566
2566
|
}), /* @__PURE__ */ r("div", {
|
|
2567
|
-
className:
|
|
2567
|
+
className: Jc,
|
|
2568
2568
|
children: t.map((i) => /* @__PURE__ */ r("button", {
|
|
2569
2569
|
type: "button",
|
|
2570
2570
|
"aria-label": i === "transparent" ? o("graph.colorDropdown.transparent") : i,
|
|
2571
|
-
className:
|
|
2571
|
+
className: Qc,
|
|
2572
2572
|
"data-active": Ea(i, n),
|
|
2573
2573
|
onMouseDown: (l) => l.preventDefault(),
|
|
2574
2574
|
onClick: () => a(i),
|
|
@@ -2579,8 +2579,8 @@ var Aa = "d0bl03", jc = "d0bl04", ka = "d0bl05", Ut = "d0bl06", Yc = "d0bl07", J
|
|
|
2579
2579
|
}, i))
|
|
2580
2580
|
})]
|
|
2581
2581
|
});
|
|
2582
|
-
},
|
|
2583
|
-
const a = M(), [o, i] = Y(!1), l = Ei(e) ? e : "#000000", s =
|
|
2582
|
+
}, gd = ({ value: e, onChange: t, popupAttributes: n }) => {
|
|
2583
|
+
const a = M(), [o, i] = Y(!1), l = Ei(e) ? e : "#000000", s = fd(l);
|
|
2584
2584
|
return /* @__PURE__ */ g(j.Root, {
|
|
2585
2585
|
open: o,
|
|
2586
2586
|
onOpenChange: i,
|
|
@@ -2590,14 +2590,14 @@ var Aa = "d0bl03", jc = "d0bl04", ka = "d0bl05", Ut = "d0bl06", Yc = "d0bl07", J
|
|
|
2590
2590
|
className: Ut,
|
|
2591
2591
|
children: a("graph.colorDropdown.custom")
|
|
2592
2592
|
}), /* @__PURE__ */ g(j.Trigger, {
|
|
2593
|
-
className:
|
|
2593
|
+
className: ed,
|
|
2594
2594
|
onMouseDown: (c) => c.preventDefault(),
|
|
2595
2595
|
"aria-label": a("graph.colorDropdown.pickCustom"),
|
|
2596
2596
|
children: [/* @__PURE__ */ r("span", {
|
|
2597
2597
|
className: La,
|
|
2598
2598
|
style: Ia(l)
|
|
2599
2599
|
}), /* @__PURE__ */ r("span", {
|
|
2600
|
-
className:
|
|
2600
|
+
className: td,
|
|
2601
2601
|
children: s
|
|
2602
2602
|
})]
|
|
2603
2603
|
})]
|
|
@@ -2609,7 +2609,7 @@ var Aa = "d0bl03", jc = "d0bl04", ka = "d0bl05", Ut = "d0bl06", Yc = "d0bl07", J
|
|
|
2609
2609
|
sideOffset: 18,
|
|
2610
2610
|
className: Aa,
|
|
2611
2611
|
children: /* @__PURE__ */ g(j.Popup, {
|
|
2612
|
-
className:
|
|
2612
|
+
className: nd,
|
|
2613
2613
|
onMouseDown: (c) => c.preventDefault(),
|
|
2614
2614
|
...n,
|
|
2615
2615
|
children: [
|
|
@@ -2617,16 +2617,16 @@ var Aa = "d0bl03", jc = "d0bl04", ka = "d0bl05", Ut = "d0bl06", Yc = "d0bl07", J
|
|
|
2617
2617
|
className: Ut,
|
|
2618
2618
|
children: a("graph.colorDropdown.pickColor")
|
|
2619
2619
|
}),
|
|
2620
|
-
/* @__PURE__ */ r(
|
|
2620
|
+
/* @__PURE__ */ r(Tc, {
|
|
2621
2621
|
color: s,
|
|
2622
2622
|
onChange: t,
|
|
2623
|
-
className:
|
|
2623
|
+
className: rd
|
|
2624
2624
|
}),
|
|
2625
|
-
/* @__PURE__ */ r(
|
|
2625
|
+
/* @__PURE__ */ r(wc, {
|
|
2626
2626
|
color: s,
|
|
2627
2627
|
onChange: t,
|
|
2628
2628
|
prefixed: !0,
|
|
2629
|
-
className:
|
|
2629
|
+
className: ad,
|
|
2630
2630
|
onMouseDown: (c) => c.stopPropagation()
|
|
2631
2631
|
})
|
|
2632
2632
|
]
|
|
@@ -2634,7 +2634,7 @@ var Aa = "d0bl03", jc = "d0bl04", ka = "d0bl05", Ut = "d0bl06", Yc = "d0bl07", J
|
|
|
2634
2634
|
}) })
|
|
2635
2635
|
})]
|
|
2636
2636
|
});
|
|
2637
|
-
},
|
|
2637
|
+
}, vd = () => {
|
|
2638
2638
|
const e = _((t) => t.scales.color);
|
|
2639
2639
|
return P(() => {
|
|
2640
2640
|
if (!e || e.kind !== "visual") return [];
|
|
@@ -2651,52 +2651,52 @@ var Aa = "d0bl03", jc = "d0bl04", ka = "d0bl05", Ut = "d0bl06", Yc = "d0bl07", J
|
|
|
2651
2651
|
} : {
|
|
2652
2652
|
background: e,
|
|
2653
2653
|
border: `1px solid ${Ci(e, 0.1)}`
|
|
2654
|
-
},
|
|
2654
|
+
}, fd = (e) => {
|
|
2655
2655
|
const { themeValues: t } = ft();
|
|
2656
2656
|
if (Oi(e)) return e.toUpperCase();
|
|
2657
|
-
const n =
|
|
2657
|
+
const n = hd[e];
|
|
2658
2658
|
return n ? t[n].toUpperCase() : "#000000";
|
|
2659
|
-
}, Ea = (e, t) => t === null ? !1 : e.toLowerCase() === t.toLowerCase(),
|
|
2659
|
+
}, Ea = (e, t) => t === null ? !1 : e.toLowerCase() === t.toLowerCase(), bd = "l9kff0", yd = "l9kff1", Sd = "l9kff2", Cd = "xn24px0", xd = "xn24px1", wd = "xn24px2", Td = ({ children: e, popupAttributes: t }) => /* @__PURE__ */ r(H.Portal, {
|
|
2660
2660
|
container: de(),
|
|
2661
2661
|
children: /* @__PURE__ */ r(ie, { children: /* @__PURE__ */ r(H.Positioner, {
|
|
2662
2662
|
side: "bottom",
|
|
2663
2663
|
align: "start",
|
|
2664
2664
|
sideOffset: 6,
|
|
2665
|
-
className:
|
|
2665
|
+
className: Cd,
|
|
2666
2666
|
children: /* @__PURE__ */ r(H.Popup, {
|
|
2667
|
-
className:
|
|
2667
|
+
className: xd,
|
|
2668
2668
|
onMouseDown: (n) => n.preventDefault(),
|
|
2669
2669
|
...t,
|
|
2670
2670
|
children: e
|
|
2671
2671
|
})
|
|
2672
2672
|
}) })
|
|
2673
|
-
}),
|
|
2674
|
-
className:
|
|
2673
|
+
}), Ad = ({ children: e, isSelected: t = !1, isDisabled: n = !1, onClick: a }) => /* @__PURE__ */ r(H.Item, {
|
|
2674
|
+
className: wd,
|
|
2675
2675
|
"data-selected": t,
|
|
2676
2676
|
disabled: n,
|
|
2677
2677
|
onClick: a,
|
|
2678
2678
|
children: e
|
|
2679
|
-
}),
|
|
2680
|
-
...t,
|
|
2681
|
-
className: ye(fd, e)
|
|
2682
|
-
}) }), kd = ({ className: e, ...t }) => /* @__PURE__ */ r(Ce.Group, {
|
|
2679
|
+
}), kd = ({ className: e, ...t }) => /* @__PURE__ */ r(le.Provider, { children: /* @__PURE__ */ r(Ce.Root, {
|
|
2683
2680
|
...t,
|
|
2684
2681
|
className: ye(bd, e)
|
|
2685
|
-
}), Ld = ({ className: e, ...t }) => /* @__PURE__ */ r(Ce.
|
|
2682
|
+
}) }), Ld = ({ className: e, ...t }) => /* @__PURE__ */ r(Ce.Group, {
|
|
2686
2683
|
...t,
|
|
2687
2684
|
className: ye(yd, e)
|
|
2688
|
-
}), Pd = ({
|
|
2685
|
+
}), Pd = ({ className: e, ...t }) => /* @__PURE__ */ r(Ce.Separator, {
|
|
2686
|
+
...t,
|
|
2687
|
+
className: ye(Sd, e)
|
|
2688
|
+
}), Id = ({ children: e }) => {
|
|
2689
2689
|
const t = de();
|
|
2690
2690
|
return t === null ? null : va(/* @__PURE__ */ r(ie, { children: e }), t);
|
|
2691
2691
|
}, X = {
|
|
2692
|
-
Portal:
|
|
2693
|
-
Root:
|
|
2694
|
-
Group:
|
|
2695
|
-
Separator:
|
|
2692
|
+
Portal: Id,
|
|
2693
|
+
Root: kd,
|
|
2694
|
+
Group: Ld,
|
|
2695
|
+
Separator: Pd,
|
|
2696
2696
|
Button: Ce.Button,
|
|
2697
|
-
ColorPicker:
|
|
2698
|
-
MenuPopup:
|
|
2699
|
-
MenuItem:
|
|
2697
|
+
ColorPicker: md,
|
|
2698
|
+
MenuPopup: Td,
|
|
2699
|
+
MenuItem: Ad
|
|
2700
2700
|
}, je = (e) => /* @__PURE__ */ r(k, {
|
|
2701
2701
|
...e,
|
|
2702
2702
|
children: /* @__PURE__ */ r("g", {
|
|
@@ -2706,39 +2706,39 @@ var Aa = "d0bl03", jc = "d0bl04", ka = "d0bl05", Ut = "d0bl06", Yc = "d0bl07", J
|
|
|
2706
2706
|
strokeLinejoin: "round",
|
|
2707
2707
|
children: /* @__PURE__ */ r("path", { d: "m6 9 6 6 6-6" })
|
|
2708
2708
|
})
|
|
2709
|
-
}),
|
|
2709
|
+
}), Ed = "'Noto Serif', Georgia, 'Times New Roman', serif, 'Apple Color Emoji', 'NotoColorEmoji'", Od = `'Aeonik', 'Aeonik Fallback', ${Vr}`, Md = "'PT Mono', 'Courier New', monospace, 'Apple Color Emoji', 'NotoColorEmoji'", Nd = "'Intruding Cat', cursive, 'Apple Color Emoji', 'NotoColorEmoji'", qt = [
|
|
2710
2710
|
{
|
|
2711
2711
|
id: "modern",
|
|
2712
2712
|
label: "Modern",
|
|
2713
2713
|
preview: "Aa",
|
|
2714
|
-
fontFamily:
|
|
2714
|
+
fontFamily: Vr
|
|
2715
2715
|
},
|
|
2716
2716
|
{
|
|
2717
2717
|
id: "fresh",
|
|
2718
2718
|
label: "Fresh",
|
|
2719
2719
|
preview: "Aa",
|
|
2720
|
-
fontFamily:
|
|
2720
|
+
fontFamily: Od
|
|
2721
2721
|
},
|
|
2722
2722
|
{
|
|
2723
2723
|
id: "timeless",
|
|
2724
2724
|
label: "Timeless",
|
|
2725
2725
|
preview: "Aa",
|
|
2726
|
-
fontFamily:
|
|
2726
|
+
fontFamily: Ed
|
|
2727
2727
|
},
|
|
2728
2728
|
{
|
|
2729
2729
|
id: "technical",
|
|
2730
2730
|
label: "Technical",
|
|
2731
2731
|
preview: "00",
|
|
2732
|
-
fontFamily:
|
|
2732
|
+
fontFamily: Md
|
|
2733
2733
|
},
|
|
2734
2734
|
{
|
|
2735
2735
|
id: "fineliner",
|
|
2736
2736
|
label: "Fineliner",
|
|
2737
2737
|
preview: "Aa",
|
|
2738
|
-
fontFamily:
|
|
2738
|
+
fontFamily: Nd
|
|
2739
2739
|
}
|
|
2740
|
-
],
|
|
2741
|
-
const o = M(), i =
|
|
2740
|
+
], Rd = (e) => e ? qt.find((t) => t.fontFamily === e) ?? null : null, Oa = "_70l3rt0", Ma = "_70l3rt1", Na = "_70l3rt3", Ra = "_70l3rt4", Da = "_70l3rt5", Dd = ({ editor: e, currentFontFamily: t, isOpen: n, onOpenChange: a }) => {
|
|
2741
|
+
const o = M(), i = Rd(t) ?? qt[0], l = (s) => {
|
|
2742
2742
|
e.chain().focus().setFontFamily(s.fontFamily).run();
|
|
2743
2743
|
};
|
|
2744
2744
|
return /* @__PURE__ */ g(H.Root, {
|
|
@@ -2781,7 +2781,7 @@ var Aa = "d0bl03", jc = "d0bl04", ka = "d0bl05", Ut = "d0bl06", Yc = "d0bl07", J
|
|
|
2781
2781
|
id: "text",
|
|
2782
2782
|
translationKey: "graph.toolbar.heading.text",
|
|
2783
2783
|
previewFont: se.fontTextEditorBody
|
|
2784
|
-
},
|
|
2784
|
+
}, qn = [
|
|
2785
2785
|
{
|
|
2786
2786
|
id: "caption",
|
|
2787
2787
|
translationKey: "graph.toolbar.heading.caption",
|
|
@@ -2803,8 +2803,8 @@ var Aa = "d0bl03", jc = "d0bl04", ka = "d0bl05", Ut = "d0bl06", Yc = "d0bl07", J
|
|
|
2803
2803
|
translationKey: "graph.toolbar.heading.heading1",
|
|
2804
2804
|
previewFont: se.fontTextEditorH1
|
|
2805
2805
|
}
|
|
2806
|
-
],
|
|
2807
|
-
const o = M(), i =
|
|
2806
|
+
], _d = ({ editor: e, activeStyle: t, isOpen: n, onOpenChange: a }) => {
|
|
2807
|
+
const o = M(), i = qn.find((l) => l.id === t) ?? _a;
|
|
2808
2808
|
return /* @__PURE__ */ g(H.Root, {
|
|
2809
2809
|
open: n,
|
|
2810
2810
|
onOpenChange: a,
|
|
@@ -2827,11 +2827,11 @@ var Aa = "d0bl03", jc = "d0bl04", ka = "d0bl05", Ut = "d0bl06", Yc = "d0bl07", J
|
|
|
2827
2827
|
children: /* @__PURE__ */ r(H.Popup, {
|
|
2828
2828
|
className: Ra,
|
|
2829
2829
|
onMouseDown: (l) => l.preventDefault(),
|
|
2830
|
-
children:
|
|
2830
|
+
children: qn.map((l) => /* @__PURE__ */ r(H.Item, {
|
|
2831
2831
|
className: Da,
|
|
2832
2832
|
"data-selected": l.id === i.id,
|
|
2833
|
-
onClick: () =>
|
|
2834
|
-
children: /* @__PURE__ */ r(
|
|
2833
|
+
onClick: () => Fd(e, l.id),
|
|
2834
|
+
children: /* @__PURE__ */ r(zd, {
|
|
2835
2835
|
font: l.previewFont,
|
|
2836
2836
|
children: o(l.translationKey)
|
|
2837
2837
|
})
|
|
@@ -2840,7 +2840,7 @@ var Aa = "d0bl03", jc = "d0bl04", ka = "d0bl05", Ut = "d0bl06", Yc = "d0bl07", J
|
|
|
2840
2840
|
}) })
|
|
2841
2841
|
})]
|
|
2842
2842
|
});
|
|
2843
|
-
},
|
|
2843
|
+
}, Fd = (e, t) => {
|
|
2844
2844
|
switch (t) {
|
|
2845
2845
|
case "caption":
|
|
2846
2846
|
e.chain().focus().setNode("paragraph", { variant: "caption" }).run();
|
|
@@ -2857,7 +2857,7 @@ var Aa = "d0bl03", jc = "d0bl04", ka = "d0bl05", Ut = "d0bl06", Yc = "d0bl07", J
|
|
|
2857
2857
|
case "h3":
|
|
2858
2858
|
e.chain().focus().setHeading({ level: 3 }).run();
|
|
2859
2859
|
}
|
|
2860
|
-
},
|
|
2860
|
+
}, zd = ({ font: e, children: t }) => /* @__PURE__ */ r("span", {
|
|
2861
2861
|
style: {
|
|
2862
2862
|
font: e,
|
|
2863
2863
|
margin: 0
|
|
@@ -2872,7 +2872,7 @@ var Aa = "d0bl03", jc = "d0bl04", ka = "d0bl05", Ut = "d0bl06", Yc = "d0bl07", J
|
|
|
2872
2872
|
strokeLinejoin: "round",
|
|
2873
2873
|
children: /* @__PURE__ */ r("path", { d: "M20 6 9 17l-5-5" })
|
|
2874
2874
|
})
|
|
2875
|
-
}),
|
|
2875
|
+
}), Bd = (e) => /* @__PURE__ */ r(k, {
|
|
2876
2876
|
...e,
|
|
2877
2877
|
children: /* @__PURE__ */ g("g", {
|
|
2878
2878
|
stroke: "currentColor",
|
|
@@ -2881,7 +2881,7 @@ var Aa = "d0bl03", jc = "d0bl04", ka = "d0bl05", Ut = "d0bl06", Yc = "d0bl07", J
|
|
|
2881
2881
|
strokeLinejoin: "round",
|
|
2882
2882
|
children: [/* @__PURE__ */ r("path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" }), /* @__PURE__ */ r("path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" })]
|
|
2883
2883
|
})
|
|
2884
|
-
}),
|
|
2884
|
+
}), Hd = (e) => /* @__PURE__ */ r(k, {
|
|
2885
2885
|
...e,
|
|
2886
2886
|
children: /* @__PURE__ */ g("g", {
|
|
2887
2887
|
stroke: "currentColor",
|
|
@@ -2890,23 +2890,23 @@ var Aa = "d0bl03", jc = "d0bl04", ka = "d0bl05", Ut = "d0bl06", Yc = "d0bl07", J
|
|
|
2890
2890
|
strokeLinejoin: "round",
|
|
2891
2891
|
children: [/* @__PURE__ */ r("path", { d: "M18 6 6 18" }), /* @__PURE__ */ r("path", { d: "m6 6 12 12" })]
|
|
2892
2892
|
})
|
|
2893
|
-
}),
|
|
2893
|
+
}), Gd = (e) => !e.content || e.content.length === 0 ? !0 : e.content.every((t) => !t.content || t.content.length === 0), Vd = (e) => {
|
|
2894
2894
|
const { $from: t } = e.state.selection, n = t.parent.textContent, a = t.parentOffset, o = t.start();
|
|
2895
2895
|
let i = a;
|
|
2896
|
-
for (; i > 0 &&
|
|
2896
|
+
for (; i > 0 && Xn(n[i - 1]); ) i -= 1;
|
|
2897
2897
|
let l = a;
|
|
2898
|
-
for (; l < n.length &&
|
|
2898
|
+
for (; l < n.length && Xn(n[l]); ) l += 1;
|
|
2899
2899
|
return {
|
|
2900
2900
|
from: o + i,
|
|
2901
2901
|
to: o + l
|
|
2902
2902
|
};
|
|
2903
|
-
},
|
|
2903
|
+
}, Xn = (e) => e !== void 0 && /\S/.test(e), $d = "fop13s0", Wd = "fop13s1", Ud = "fop13s2", Kd = "fop13s3", Zn = "fop13s4", qd = ({ editor: e, currentUrl: t, isActive: n, isOpen: a, onOpenChange: o }) => {
|
|
2904
2904
|
const i = M(), [l, s] = Y(""), c = ne(null);
|
|
2905
2905
|
z(() => {
|
|
2906
2906
|
a && s(t ?? "");
|
|
2907
2907
|
}, [a, t]);
|
|
2908
2908
|
const h = () => {
|
|
2909
|
-
|
|
2909
|
+
Xd(e, l), o(!1);
|
|
2910
2910
|
}, d = () => {
|
|
2911
2911
|
s(""), o(!1);
|
|
2912
2912
|
}, u = (v) => {
|
|
@@ -2921,17 +2921,17 @@ var Aa = "d0bl03", jc = "d0bl04", ka = "d0bl05", Ut = "d0bl06", Yc = "d0bl07", J
|
|
|
2921
2921
|
render: /* @__PURE__ */ r(Ce.Button, {}),
|
|
2922
2922
|
"aria-label": i("graph.toolbar.formatting.link"),
|
|
2923
2923
|
"data-active": n,
|
|
2924
|
-
className:
|
|
2924
|
+
className: $d,
|
|
2925
2925
|
onMouseDown: (v) => v.preventDefault(),
|
|
2926
|
-
children: /* @__PURE__ */ r(
|
|
2926
|
+
children: /* @__PURE__ */ r(Bd, {})
|
|
2927
2927
|
}), /* @__PURE__ */ r(j.Portal, {
|
|
2928
2928
|
container: de(),
|
|
2929
2929
|
children: /* @__PURE__ */ r(ie, { children: /* @__PURE__ */ r(j.Positioner, {
|
|
2930
2930
|
sideOffset: 6,
|
|
2931
2931
|
align: "end",
|
|
2932
|
-
className:
|
|
2932
|
+
className: Wd,
|
|
2933
2933
|
children: /* @__PURE__ */ g(j.Popup, {
|
|
2934
|
-
className:
|
|
2934
|
+
className: Ud,
|
|
2935
2935
|
initialFocus: c,
|
|
2936
2936
|
onMouseDown: (v) => v.preventDefault(),
|
|
2937
2937
|
children: [
|
|
@@ -2941,7 +2941,7 @@ var Aa = "d0bl03", jc = "d0bl04", ka = "d0bl05", Ut = "d0bl06", Yc = "d0bl07", J
|
|
|
2941
2941
|
value: l,
|
|
2942
2942
|
placeholder: i("graph.toolbar.link.placeholder"),
|
|
2943
2943
|
"aria-label": i("graph.toolbar.link.urlLabel"),
|
|
2944
|
-
className:
|
|
2944
|
+
className: Kd,
|
|
2945
2945
|
onMouseDown: (v) => v.stopPropagation(),
|
|
2946
2946
|
onChange: u,
|
|
2947
2947
|
onKeyDown: p
|
|
@@ -2949,14 +2949,14 @@ var Aa = "d0bl03", jc = "d0bl04", ka = "d0bl05", Ut = "d0bl06", Yc = "d0bl07", J
|
|
|
2949
2949
|
/* @__PURE__ */ r("button", {
|
|
2950
2950
|
type: "button",
|
|
2951
2951
|
"aria-label": i("common.cancel"),
|
|
2952
|
-
className:
|
|
2952
|
+
className: Zn,
|
|
2953
2953
|
onClick: d,
|
|
2954
|
-
children: /* @__PURE__ */ r(
|
|
2954
|
+
children: /* @__PURE__ */ r(Hd, {})
|
|
2955
2955
|
}),
|
|
2956
2956
|
/* @__PURE__ */ r("button", {
|
|
2957
2957
|
type: "button",
|
|
2958
2958
|
"aria-label": i("graph.toolbar.link.apply"),
|
|
2959
|
-
className:
|
|
2959
|
+
className: Zn,
|
|
2960
2960
|
onClick: h,
|
|
2961
2961
|
children: /* @__PURE__ */ r(Fa, {})
|
|
2962
2962
|
})
|
|
@@ -2965,7 +2965,7 @@ var Aa = "d0bl03", jc = "d0bl04", ka = "d0bl05", Ut = "d0bl06", Yc = "d0bl07", J
|
|
|
2965
2965
|
}) })
|
|
2966
2966
|
})]
|
|
2967
2967
|
});
|
|
2968
|
-
},
|
|
2968
|
+
}, Xd = (e, t) => {
|
|
2969
2969
|
const n = t.trim(), { selection: a } = e.state;
|
|
2970
2970
|
if (!n) {
|
|
2971
2971
|
e.chain().focus().extendMarkRange("link").unsetLink().run();
|
|
@@ -2979,7 +2979,7 @@ var Aa = "d0bl03", jc = "d0bl04", ka = "d0bl05", Ut = "d0bl06", Yc = "d0bl07", J
|
|
|
2979
2979
|
e.chain().focus().extendMarkRange("link").setLink({ href: n }).run();
|
|
2980
2980
|
return;
|
|
2981
2981
|
}
|
|
2982
|
-
const o =
|
|
2982
|
+
const o = Vd(e);
|
|
2983
2983
|
e.chain().focus().setTextSelection(o).setLink({ href: n }).run();
|
|
2984
2984
|
}, za = (e) => /* @__PURE__ */ r(k, {
|
|
2985
2985
|
...e,
|
|
@@ -3021,7 +3021,7 @@ var Aa = "d0bl03", jc = "d0bl04", ka = "d0bl05", Ut = "d0bl06", Yc = "d0bl07", J
|
|
|
3021
3021
|
]
|
|
3022
3022
|
})
|
|
3023
3023
|
});
|
|
3024
|
-
var Ga = "srewh00",
|
|
3024
|
+
var Ga = "srewh00", Zd = "srewh01", bn = ({ children: e }) => {
|
|
3025
3025
|
const { themeValues: t } = ft();
|
|
3026
3026
|
return /* @__PURE__ */ r(ie, {
|
|
3027
3027
|
style: P(() => Ze({
|
|
@@ -3030,30 +3030,30 @@ var Ga = "srewh00", Xd = "srewh01", yn = ({ children: e }) => {
|
|
|
3030
3030
|
}), [t]),
|
|
3031
3031
|
children: e
|
|
3032
3032
|
});
|
|
3033
|
-
},
|
|
3033
|
+
}, jd = "_1d66w570", Yd = "_1d66w571", Ge = ({ label: e, isActive: t, onToggle: n, children: a }) => {
|
|
3034
3034
|
const o = (i) => i.preventDefault();
|
|
3035
3035
|
return /* @__PURE__ */ g(le.Root, { children: [/* @__PURE__ */ r(le.Trigger, {
|
|
3036
|
-
render: /* @__PURE__ */ r(
|
|
3036
|
+
render: /* @__PURE__ */ r(Ac, {
|
|
3037
3037
|
render: /* @__PURE__ */ r(Ce.Button, {}),
|
|
3038
3038
|
pressed: t,
|
|
3039
3039
|
onPressedChange: () => n()
|
|
3040
3040
|
}),
|
|
3041
3041
|
"aria-label": e,
|
|
3042
|
-
className:
|
|
3042
|
+
className: jd,
|
|
3043
3043
|
onMouseDown: o,
|
|
3044
3044
|
children: a
|
|
3045
3045
|
}), /* @__PURE__ */ r(le.Portal, {
|
|
3046
3046
|
container: de(),
|
|
3047
|
-
children: /* @__PURE__ */ r(
|
|
3047
|
+
children: /* @__PURE__ */ r(bn, { children: /* @__PURE__ */ r(le.Positioner, {
|
|
3048
3048
|
sideOffset: 6,
|
|
3049
|
-
className:
|
|
3049
|
+
className: Yd,
|
|
3050
3050
|
children: /* @__PURE__ */ r(le.Popup, {
|
|
3051
3051
|
className: Ga,
|
|
3052
3052
|
children: e
|
|
3053
3053
|
})
|
|
3054
3054
|
}) })
|
|
3055
3055
|
})] });
|
|
3056
|
-
},
|
|
3056
|
+
}, Jd = ({ editor: e, activeAlignment: t = "left" }) => {
|
|
3057
3057
|
const n = M();
|
|
3058
3058
|
return /* @__PURE__ */ g(Q, { children: [
|
|
3059
3059
|
/* @__PURE__ */ r(Ge, {
|
|
@@ -3075,7 +3075,7 @@ var Ga = "srewh00", Xd = "srewh01", yn = ({ children: e }) => {
|
|
|
3075
3075
|
children: /* @__PURE__ */ r(Ba, {})
|
|
3076
3076
|
})
|
|
3077
3077
|
] });
|
|
3078
|
-
},
|
|
3078
|
+
}, Qd = "_1u34vl40", eu = ({ editor: e }) => ({
|
|
3079
3079
|
isBold: e?.isActive("bold") ?? !1,
|
|
3080
3080
|
isItalic: e?.isActive("italic") ?? !1,
|
|
3081
3081
|
isUnderline: e?.isActive("underline") ?? !1,
|
|
@@ -3083,23 +3083,23 @@ var Ga = "srewh00", Xd = "srewh01", yn = ({ children: e }) => {
|
|
|
3083
3083
|
linkUrl: e?.getAttributes("link").href ?? null,
|
|
3084
3084
|
color: e?.getAttributes("textStyle").color ?? null,
|
|
3085
3085
|
fontFamily: e?.getAttributes("textStyle").fontFamily ?? null,
|
|
3086
|
-
fontSize:
|
|
3087
|
-
textAlign:
|
|
3088
|
-
}),
|
|
3086
|
+
fontSize: tu(e),
|
|
3087
|
+
textAlign: nu(e)
|
|
3088
|
+
}), tu = (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", nu = (e) => e ? e.isActive({ textAlign: "center" }) ? "center" : e.isActive({ textAlign: "right" }) ? "right" : "left" : "left", ru = 8, au = 8, ou = ({ editor: e }) => {
|
|
3089
3089
|
const t = M(), [n, a] = Y(!1), [o, i] = Y(null), l = o !== null, s = (v) => (m) => {
|
|
3090
3090
|
i(m ? v : null);
|
|
3091
|
-
}, { refs: c, floatingStyles: h } =
|
|
3091
|
+
}, { refs: c, floatingStyles: h } = cc({
|
|
3092
3092
|
placement: "top-start",
|
|
3093
3093
|
strategy: "fixed",
|
|
3094
3094
|
middleware: [
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3095
|
+
lc(ru),
|
|
3096
|
+
ic(),
|
|
3097
|
+
sc({ padding: au })
|
|
3098
3098
|
],
|
|
3099
|
-
whileElementsMounted:
|
|
3100
|
-
}), d = ne(null), u =
|
|
3099
|
+
whileElementsMounted: oc
|
|
3100
|
+
}), d = ne(null), u = xc({
|
|
3101
3101
|
editor: e,
|
|
3102
|
-
selector:
|
|
3102
|
+
selector: eu
|
|
3103
3103
|
}), p = ae((v) => {
|
|
3104
3104
|
d.current = v, c.setFloating(v);
|
|
3105
3105
|
}, [c]);
|
|
@@ -3116,7 +3116,7 @@ var Ga = "srewh00", Xd = "srewh01", yn = ({ children: e }) => {
|
|
|
3116
3116
|
};
|
|
3117
3117
|
}, [e]), !e || !n && !l ? null : /* @__PURE__ */ r(X.Portal, { children: /* @__PURE__ */ g(X.Root, {
|
|
3118
3118
|
ref: p,
|
|
3119
|
-
className:
|
|
3119
|
+
className: Qd,
|
|
3120
3120
|
style: h,
|
|
3121
3121
|
children: [
|
|
3122
3122
|
/* @__PURE__ */ g(X.Group, { children: [/* @__PURE__ */ r(X.ColorPicker, {
|
|
@@ -3124,14 +3124,14 @@ var Ga = "srewh00", Xd = "srewh01", yn = ({ children: e }) => {
|
|
|
3124
3124
|
onChange: (v) => e.chain().setColor(v).run(),
|
|
3125
3125
|
isOpen: o === "color",
|
|
3126
3126
|
onOpenChange: s("color")
|
|
3127
|
-
}), /* @__PURE__ */ r(
|
|
3127
|
+
}), /* @__PURE__ */ r(Dd, {
|
|
3128
3128
|
editor: e,
|
|
3129
3129
|
currentFontFamily: u?.fontFamily ?? null,
|
|
3130
3130
|
isOpen: o === "fontFamily",
|
|
3131
3131
|
onOpenChange: s("fontFamily")
|
|
3132
3132
|
})] }),
|
|
3133
3133
|
/* @__PURE__ */ r(X.Separator, {}),
|
|
3134
|
-
/* @__PURE__ */ r(X.Group, { children: /* @__PURE__ */ r(
|
|
3134
|
+
/* @__PURE__ */ r(X.Group, { children: /* @__PURE__ */ r(_d, {
|
|
3135
3135
|
editor: e,
|
|
3136
3136
|
activeStyle: u?.fontSize ?? "text",
|
|
3137
3137
|
isOpen: o === "fontSize",
|
|
@@ -3159,12 +3159,12 @@ var Ga = "srewh00", Xd = "srewh01", yn = ({ children: e }) => {
|
|
|
3159
3159
|
})
|
|
3160
3160
|
] }),
|
|
3161
3161
|
/* @__PURE__ */ r(X.Separator, {}),
|
|
3162
|
-
/* @__PURE__ */ r(X.Group, { children: /* @__PURE__ */ r(
|
|
3162
|
+
/* @__PURE__ */ r(X.Group, { children: /* @__PURE__ */ r(Jd, {
|
|
3163
3163
|
editor: e,
|
|
3164
3164
|
activeAlignment: u?.textAlign
|
|
3165
3165
|
}) }),
|
|
3166
3166
|
/* @__PURE__ */ r(X.Separator, {}),
|
|
3167
|
-
/* @__PURE__ */ r(X.Group, { children: /* @__PURE__ */ r(
|
|
3167
|
+
/* @__PURE__ */ r(X.Group, { children: /* @__PURE__ */ r(qd, {
|
|
3168
3168
|
editor: e,
|
|
3169
3169
|
currentUrl: u?.linkUrl ?? null,
|
|
3170
3170
|
isActive: u?.isLink ?? !1,
|
|
@@ -3173,16 +3173,16 @@ var Ga = "srewh00", Xd = "srewh01", yn = ({ children: e }) => {
|
|
|
3173
3173
|
}) })
|
|
3174
3174
|
]
|
|
3175
3175
|
}) });
|
|
3176
|
-
},
|
|
3177
|
-
className:
|
|
3178
|
-
children: [/* @__PURE__ */ r(
|
|
3176
|
+
}, iu = "_1uy50v30", Va = ({ editor: e, ariaLabel: t }) => /* @__PURE__ */ g("div", {
|
|
3177
|
+
className: iu,
|
|
3178
|
+
children: [/* @__PURE__ */ r(ou, { editor: e }), /* @__PURE__ */ r(Sa, {
|
|
3179
3179
|
editor: e,
|
|
3180
3180
|
"aria-label": t
|
|
3181
3181
|
})]
|
|
3182
|
-
}),
|
|
3183
|
-
const i = ne(
|
|
3182
|
+
}), lu = 200, yn = ({ content: e, extensions: t, isEditable: n, onUpdate: a, updateDebounceMs: o = lu }) => {
|
|
3183
|
+
const i = ne(jn(e)), l = ne(i.current), s = mi((h) => {
|
|
3184
3184
|
l.current = h, a?.(h);
|
|
3185
|
-
}, o), c =
|
|
3185
|
+
}, o), c = Cc({
|
|
3186
3186
|
extensions: t,
|
|
3187
3187
|
content: i.current,
|
|
3188
3188
|
editable: n,
|
|
@@ -3197,14 +3197,14 @@ var Ga = "srewh00", Xd = "srewh01", yn = ({ children: e }) => {
|
|
|
3197
3197
|
c?.setEditable(n);
|
|
3198
3198
|
}, [c, n]), z(() => {
|
|
3199
3199
|
if (!c) return;
|
|
3200
|
-
const h =
|
|
3201
|
-
Ft(l.current, h) || (l.current = h, !Ft(c.getJSON(), h) && (s.cancel(),
|
|
3200
|
+
const h = jn(e);
|
|
3201
|
+
Ft(l.current, h) || (l.current = h, !Ft(c.getJSON(), h) && (s.cancel(), su(c, h)));
|
|
3202
3202
|
}, [
|
|
3203
3203
|
c,
|
|
3204
3204
|
e,
|
|
3205
3205
|
s
|
|
3206
3206
|
]), z(() => () => s.flush(), [s]), c;
|
|
3207
|
-
},
|
|
3207
|
+
}, jn = (e) => e === null ? {
|
|
3208
3208
|
type: "doc",
|
|
3209
3209
|
content: []
|
|
3210
3210
|
} : typeof e == "string" ? {
|
|
@@ -3216,7 +3216,7 @@ var Ga = "srewh00", Xd = "srewh01", yn = ({ children: e }) => {
|
|
|
3216
3216
|
text: e
|
|
3217
3217
|
}] : []
|
|
3218
3218
|
}]
|
|
3219
|
-
} : e,
|
|
3219
|
+
} : e, su = (e, t) => {
|
|
3220
3220
|
const { from: n, to: a } = e.state.selection;
|
|
3221
3221
|
e.commands.setContent(t, { emitUpdate: !1 });
|
|
3222
3222
|
const o = e.state.doc.content.size;
|
|
@@ -3224,35 +3224,35 @@ var Ga = "srewh00", Xd = "srewh01", yn = ({ children: e }) => {
|
|
|
3224
3224
|
from: Math.min(n, o),
|
|
3225
3225
|
to: Math.min(a, o)
|
|
3226
3226
|
});
|
|
3227
|
-
}, Ft = (e, t) => JSON.stringify(dt(e)) === JSON.stringify(dt(t)), dt = (e) => Array.isArray(e) ? e.map(dt) : e === null || typeof e != "object" ? e : Object.fromEntries(Object.entries(e).map(([t, n]) => [t, dt(n)]).filter(([, t]) => !
|
|
3228
|
-
const { dispatch: n } =
|
|
3227
|
+
}, Ft = (e, t) => JSON.stringify(dt(e)) === JSON.stringify(dt(t)), dt = (e) => Array.isArray(e) ? e.map(dt) : e === null || typeof e != "object" ? e : Object.fromEntries(Object.entries(e).map(([t, n]) => [t, dt(n)]).filter(([, t]) => !cu(t)).sort(([t], [n]) => String(t).localeCompare(String(n)))), cu = (e) => e == null || typeof e == "object" && Object.keys(e).length === 0, du = ({ caption: e, captionStyle: t }) => {
|
|
3228
|
+
const { dispatch: n } = fe(), a = yn({
|
|
3229
3229
|
content: e,
|
|
3230
|
-
extensions: P(() =>
|
|
3230
|
+
extensions: P(() => Xc({ placeholder: "Add caption" }), []),
|
|
3231
3231
|
isEditable: !0,
|
|
3232
3232
|
onUpdate: (o) => {
|
|
3233
|
-
const i =
|
|
3234
|
-
n(new
|
|
3233
|
+
const i = Gd(o) ? null : o;
|
|
3234
|
+
n(new ea({ caption: i }));
|
|
3235
3235
|
}
|
|
3236
3236
|
});
|
|
3237
3237
|
return /* @__PURE__ */ r("div", {
|
|
3238
3238
|
"data-testid": "caption-editor",
|
|
3239
|
-
style:
|
|
3239
|
+
style: jr(t),
|
|
3240
3240
|
children: /* @__PURE__ */ r(Va, {
|
|
3241
3241
|
editor: a,
|
|
3242
3242
|
ariaLabel: "Chart caption"
|
|
3243
3243
|
})
|
|
3244
3244
|
});
|
|
3245
|
-
},
|
|
3245
|
+
}, uu = (e) => [
|
|
3246
3246
|
ct,
|
|
3247
3247
|
ya,
|
|
3248
|
-
...
|
|
3249
|
-
|
|
3250
|
-
|
|
3248
|
+
...fn(),
|
|
3249
|
+
pu,
|
|
3250
|
+
vn.configure({
|
|
3251
3251
|
showOnlyCurrent: !1,
|
|
3252
3252
|
placeholder: ({ pos: t }) => t === 0 ? e : ""
|
|
3253
3253
|
})
|
|
3254
|
-
],
|
|
3255
|
-
const t = M(), { dispatch: n } =
|
|
3254
|
+
], hu = ({ annotation: e }) => {
|
|
3255
|
+
const t = M(), { dispatch: n } = fe(), a = V(), o = P(() => uu(t("graph.annotations.text.placeholder")), [t]), i = yn({
|
|
3256
3256
|
content: e.content,
|
|
3257
3257
|
extensions: o,
|
|
3258
3258
|
isEditable: !0,
|
|
@@ -3275,10 +3275,10 @@ var Ga = "srewh00", Xd = "srewh01", yn = ({ children: e }) => {
|
|
|
3275
3275
|
editor: i,
|
|
3276
3276
|
"data-testid": "text-annotation-editor"
|
|
3277
3277
|
});
|
|
3278
|
-
},
|
|
3278
|
+
}, Yn = (e) => {
|
|
3279
3279
|
const t = Gi(e);
|
|
3280
3280
|
return t === void 0 ? {} : { style: `font-family: ${t}` };
|
|
3281
|
-
},
|
|
3281
|
+
}, pu = fa.create({
|
|
3282
3282
|
name: "annotationTextStyleAttributes",
|
|
3283
3283
|
addGlobalAttributes() {
|
|
3284
3284
|
return [{
|
|
@@ -3286,11 +3286,11 @@ var Ga = "srewh00", Xd = "srewh01", yn = ({ children: e }) => {
|
|
|
3286
3286
|
attributes: {
|
|
3287
3287
|
fontFamily: {
|
|
3288
3288
|
default: null,
|
|
3289
|
-
renderHTML: (e) =>
|
|
3289
|
+
renderHTML: (e) => Yn(e.fontFamily)
|
|
3290
3290
|
},
|
|
3291
3291
|
font: {
|
|
3292
3292
|
default: null,
|
|
3293
|
-
renderHTML: (e) =>
|
|
3293
|
+
renderHTML: (e) => Yn(e.font)
|
|
3294
3294
|
},
|
|
3295
3295
|
fontSize: {
|
|
3296
3296
|
default: null,
|
|
@@ -3299,48 +3299,48 @@ var Ga = "srewh00", Xd = "srewh01", yn = ({ children: e }) => {
|
|
|
3299
3299
|
}
|
|
3300
3300
|
}];
|
|
3301
3301
|
}
|
|
3302
|
-
}),
|
|
3302
|
+
}), mu = 3, gu = ({ title: e, isTitleVisible: t, subtitle: n, isSubtitleVisible: a }) => {
|
|
3303
3303
|
const o = [];
|
|
3304
3304
|
return t && o.push({
|
|
3305
3305
|
type: "heading",
|
|
3306
|
-
attrs: { level:
|
|
3307
|
-
content:
|
|
3308
|
-
}), a && o.push(...
|
|
3306
|
+
attrs: { level: mu },
|
|
3307
|
+
content: fu(e)
|
|
3308
|
+
}), a && o.push(...bu(n)), {
|
|
3309
3309
|
type: "doc",
|
|
3310
3310
|
content: o
|
|
3311
3311
|
};
|
|
3312
|
-
},
|
|
3312
|
+
}, vu = (e) => {
|
|
3313
3313
|
const [t, ...n] = e.content ?? [];
|
|
3314
3314
|
return {
|
|
3315
|
-
title:
|
|
3316
|
-
subtitle:
|
|
3315
|
+
title: yu(t?.content ?? []),
|
|
3316
|
+
subtitle: Su(n)
|
|
3317
3317
|
};
|
|
3318
|
-
},
|
|
3318
|
+
}, Sn = (e) => ({
|
|
3319
3319
|
type: e.type ?? "text",
|
|
3320
|
-
...e.content !== void 0 ? { content: e.content.map(
|
|
3320
|
+
...e.content !== void 0 ? { content: e.content.map(Sn) } : {},
|
|
3321
3321
|
...e.text !== void 0 ? { text: e.text } : {},
|
|
3322
3322
|
...e.marks !== void 0 ? { marks: e.marks } : {},
|
|
3323
3323
|
...e.attrs !== void 0 ? { attrs: e.attrs } : {}
|
|
3324
|
-
}),
|
|
3324
|
+
}), fu = (e) => e === null ? [] : typeof e == "string" ? e === "" ? [] : [{
|
|
3325
3325
|
type: "text",
|
|
3326
3326
|
text: e
|
|
3327
|
-
}] : e.type === "doc" && e.content ? e.content.flatMap((t) => t.content ?? []) : e.type === "text" || e.type === "hardBreak" ? [e] : e.content ?? [],
|
|
3327
|
+
}] : e.type === "doc" && e.content ? e.content.flatMap((t) => t.content ?? []) : e.type === "text" || e.type === "hardBreak" ? [e] : e.content ?? [], bu = (e) => e === null ? [{ type: "paragraph" }] : typeof e == "string" ? e === "" ? [{ type: "paragraph" }] : [{
|
|
3328
3328
|
type: "paragraph",
|
|
3329
3329
|
content: [{
|
|
3330
3330
|
type: "text",
|
|
3331
3331
|
text: e
|
|
3332
3332
|
}]
|
|
3333
|
-
}] : e.type === "doc" && e.content ? e.content.length === 0 ? [{ type: "paragraph" }] : e.content.map(
|
|
3333
|
+
}] : e.type === "doc" && e.content ? e.content.length === 0 ? [{ type: "paragraph" }] : e.content.map(Jn) : [Jn(e)], Jn = (e) => e.type === "paragraph" ? e : {
|
|
3334
3334
|
type: "paragraph",
|
|
3335
3335
|
content: e.content ?? [e]
|
|
3336
|
-
},
|
|
3336
|
+
}, yu = (e) => {
|
|
3337
3337
|
if (e.length === 0) return null;
|
|
3338
3338
|
const [t] = e;
|
|
3339
3339
|
return t && e.length === 1 && t.type === "text" && (!t.marks || t.marks.length === 0) ? t.text ?? null : {
|
|
3340
3340
|
type: "paragraph",
|
|
3341
|
-
content: e.map(
|
|
3341
|
+
content: e.map(Sn)
|
|
3342
3342
|
};
|
|
3343
|
-
},
|
|
3343
|
+
}, Su = (e) => {
|
|
3344
3344
|
const t = e.filter((a) => (a.content ?? []).length > 0);
|
|
3345
3345
|
if (t.length === 0) return null;
|
|
3346
3346
|
const [n] = t;
|
|
@@ -3350,22 +3350,22 @@ var Ga = "srewh00", Xd = "srewh01", yn = ({ children: e }) => {
|
|
|
3350
3350
|
}
|
|
3351
3351
|
return {
|
|
3352
3352
|
type: "doc",
|
|
3353
|
-
content: t.map(
|
|
3353
|
+
content: t.map(Sn)
|
|
3354
3354
|
};
|
|
3355
|
-
},
|
|
3355
|
+
}, Cu = {
|
|
3356
3356
|
fontFamily: "var(--uwf6lt0)",
|
|
3357
3357
|
fontSize: "var(--uwf6lt1)",
|
|
3358
3358
|
fontWeight: "var(--uwf6lt2)",
|
|
3359
3359
|
lineHeight: "var(--uwf6lt3)",
|
|
3360
3360
|
textColor: "var(--uwf6lt4)"
|
|
3361
|
-
},
|
|
3362
|
-
const { dispatch: l } =
|
|
3361
|
+
}, xu = "uwf6lt5", wu = ({ title: e, isTitleVisible: t, isSubtitleVisible: n, subtitle: a, headingStyle: o, subtitleStyle: i }) => {
|
|
3362
|
+
const { dispatch: l } = fe(), s = P(() => qc({
|
|
3363
3363
|
titlePlaceholder: "Untitled",
|
|
3364
3364
|
subtitlePlaceholder: "Untitled",
|
|
3365
3365
|
isTitleVisible: t,
|
|
3366
3366
|
isSubtitleVisible: n
|
|
3367
|
-
}), [t, n]), c =
|
|
3368
|
-
content: P(() =>
|
|
3367
|
+
}), [t, n]), c = yn({
|
|
3368
|
+
content: P(() => gu({
|
|
3369
3369
|
title: e,
|
|
3370
3370
|
isTitleVisible: t,
|
|
3371
3371
|
subtitle: a,
|
|
@@ -3379,37 +3379,37 @@ var Ga = "srewh00", Xd = "srewh01", yn = ({ children: e }) => {
|
|
|
3379
3379
|
extensions: s,
|
|
3380
3380
|
isEditable: !0,
|
|
3381
3381
|
onUpdate: (h) => {
|
|
3382
|
-
const d =
|
|
3383
|
-
t && l(new
|
|
3382
|
+
const d = vu(h);
|
|
3383
|
+
t && l(new na({ title: d.title })), n && l(new ta({ subtitle: d.subtitle }));
|
|
3384
3384
|
}
|
|
3385
3385
|
});
|
|
3386
3386
|
return /* @__PURE__ */ r("div", {
|
|
3387
|
-
className:
|
|
3387
|
+
className: xu,
|
|
3388
3388
|
"data-testid": "title-editor",
|
|
3389
3389
|
style: {
|
|
3390
|
-
...
|
|
3391
|
-
...ki(
|
|
3390
|
+
...jr(o),
|
|
3391
|
+
...ki(Cu, i)
|
|
3392
3392
|
},
|
|
3393
3393
|
children: /* @__PURE__ */ r(Va, {
|
|
3394
3394
|
editor: c,
|
|
3395
3395
|
ariaLabel: "Chart title and subtitle"
|
|
3396
3396
|
})
|
|
3397
3397
|
});
|
|
3398
|
-
},
|
|
3399
|
-
Title:
|
|
3400
|
-
Caption:
|
|
3401
|
-
TextAnnotation:
|
|
3398
|
+
}, Tu = {
|
|
3399
|
+
Title: wu,
|
|
3400
|
+
Caption: du,
|
|
3401
|
+
TextAnnotation: hu
|
|
3402
3402
|
}, $a = (e, t) => {
|
|
3403
3403
|
const { offsetWidth: n } = e;
|
|
3404
3404
|
return n <= 0 || t <= 0 ? 1 : t / n;
|
|
3405
|
-
}, Wa = (e) => $a(e, e.getBoundingClientRect().width),
|
|
3405
|
+
}, Wa = (e) => $a(e, e.getBoundingClientRect().width), Qn = (e, t) => {
|
|
3406
3406
|
const { offsetWidth: n, offsetHeight: a } = e;
|
|
3407
3407
|
return n <= 0 || a <= 0 ? t : {
|
|
3408
3408
|
width: n,
|
|
3409
3409
|
height: a
|
|
3410
3410
|
};
|
|
3411
|
-
}, Tt = (e) => e.offset + e.strokeWidth,
|
|
3412
|
-
const n =
|
|
3411
|
+
}, Tt = (e) => e.offset + e.strokeWidth, er = "http://www.w3.org/2000/svg", tr = /* @__PURE__ */ new WeakMap(), Au = (e, t) => {
|
|
3412
|
+
const n = ku(e);
|
|
3413
3413
|
n.setAttribute("d", t);
|
|
3414
3414
|
const { x: a, y: o, width: i, height: l } = n.getBBox();
|
|
3415
3415
|
return {
|
|
@@ -3418,24 +3418,24 @@ var Ga = "srewh00", Xd = "srewh01", yn = ({ children: e }) => {
|
|
|
3418
3418
|
width: i,
|
|
3419
3419
|
height: l
|
|
3420
3420
|
};
|
|
3421
|
-
},
|
|
3422
|
-
const t =
|
|
3421
|
+
}, ku = (e) => {
|
|
3422
|
+
const t = tr.get(e);
|
|
3423
3423
|
if (t?.isConnected) return t;
|
|
3424
|
-
const n = e.createElementNS(
|
|
3424
|
+
const n = e.createElementNS(er, "svg");
|
|
3425
3425
|
n.setAttribute("aria-hidden", "true"), n.style.cssText = "position:absolute;width:0;height:0;overflow:hidden;visibility:hidden;pointer-events:none";
|
|
3426
|
-
const a = e.createElementNS(
|
|
3427
|
-
return n.append(a), e.body.append(n),
|
|
3428
|
-
},
|
|
3426
|
+
const a = e.createElementNS(er, "path");
|
|
3427
|
+
return n.append(a), e.body.append(n), tr.set(e, a), a;
|
|
3428
|
+
}, Lu = (e, t) => {
|
|
3429
3429
|
const { panelRect: n, look: a, readGridLineWidth: o, measurePathBox: i } = t, l = Tt(a);
|
|
3430
3430
|
switch (e.kind) {
|
|
3431
3431
|
case "observations":
|
|
3432
|
-
return zt([...e.parts, ...e.vertex === null ? [] : [e.vertex]].flatMap((s) =>
|
|
3432
|
+
return zt([...e.parts, ...e.vertex === null ? [] : [e.vertex]].flatMap((s) => Pu(s, i)).map((s) => ({
|
|
3433
3433
|
...s,
|
|
3434
3434
|
x: s.x + n.x,
|
|
3435
3435
|
y: s.y + n.y
|
|
3436
3436
|
})), l);
|
|
3437
3437
|
case "guide":
|
|
3438
|
-
return zt(e.shapes.map((s) => s.kind === "box" ? s.rect : He(
|
|
3438
|
+
return zt(e.shapes.map((s) => s.kind === "box" ? s.rect : He(Eu(s), o(s.axis) / 2)), l);
|
|
3439
3439
|
case "graph":
|
|
3440
3440
|
return zt([{
|
|
3441
3441
|
x: 0,
|
|
@@ -3445,7 +3445,7 @@ var Ga = "srewh00", Xd = "srewh01", yn = ({ children: e }) => {
|
|
|
3445
3445
|
default:
|
|
3446
3446
|
return e;
|
|
3447
3447
|
}
|
|
3448
|
-
},
|
|
3448
|
+
}, Pu = (e, t) => e.kind === "boxes" ? e.boxes : Iu(e.shapes, t), Iu = (e, t) => {
|
|
3449
3449
|
const n = [], a = /* @__PURE__ */ new Map();
|
|
3450
3450
|
for (const o of e) {
|
|
3451
3451
|
if (o.kind === "dots") {
|
|
@@ -3467,7 +3467,7 @@ var Ga = "srewh00", Xd = "srewh01", yn = ({ children: e }) => {
|
|
|
3467
3467
|
}
|
|
3468
3468
|
for (const [o, i] of a) n.push(He(t(i.join("")), o));
|
|
3469
3469
|
return n;
|
|
3470
|
-
},
|
|
3470
|
+
}, Eu = (e) => {
|
|
3471
3471
|
switch (e.kind) {
|
|
3472
3472
|
case "line":
|
|
3473
3473
|
return {
|
|
@@ -3488,15 +3488,15 @@ var Ga = "srewh00", Xd = "srewh01", yn = ({ children: e }) => {
|
|
|
3488
3488
|
const n = e.filter(({ width: a, height: o }) => a > 0 || o > 0);
|
|
3489
3489
|
return n.length === 0 ? null : He($t(n), t);
|
|
3490
3490
|
};
|
|
3491
|
-
var
|
|
3491
|
+
var Ou = (e, { coordSystem: t, panelRect: n }) => {
|
|
3492
3492
|
if (e.kind !== "observations") return null;
|
|
3493
3493
|
const a = e.vertex === null ? e.parts : [...e.parts, e.vertex], o = a.reduce((l, s) => Math.max(l, s.rows.length), 0), i = o === 1 && e.vertex === null;
|
|
3494
|
-
return o === 0 || i || o > 1e3 ? null : a.flatMap((l) =>
|
|
3494
|
+
return o === 0 || i || o > 1e3 ? null : a.flatMap((l) => Mu(l, t, n).map((s) => ({
|
|
3495
3495
|
...s,
|
|
3496
3496
|
x: s.x + n.x,
|
|
3497
3497
|
y: s.y + n.y
|
|
3498
3498
|
})));
|
|
3499
|
-
},
|
|
3499
|
+
}, Mu = (e, t, n) => ua({
|
|
3500
3500
|
layer: {
|
|
3501
3501
|
...e.layer,
|
|
3502
3502
|
data: e.layer.data.take(e.rows)
|
|
@@ -3504,12 +3504,12 @@ var Eu = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
3504
3504
|
coordSystem: t,
|
|
3505
3505
|
panelSize: n,
|
|
3506
3506
|
radialExtent: "outerEnd"
|
|
3507
|
-
}),
|
|
3507
|
+
}), Nu = 0.5, Ru = {
|
|
3508
3508
|
top: (e) => -e.y,
|
|
3509
3509
|
right: (e) => e.x + e.width,
|
|
3510
3510
|
bottom: (e) => e.y + e.height,
|
|
3511
3511
|
left: (e) => -e.x
|
|
3512
|
-
},
|
|
3512
|
+
}, Du = (e, t, n) => e === null || !_u(e) ? {
|
|
3513
3513
|
top: Xt(t),
|
|
3514
3514
|
right: Zt(t),
|
|
3515
3515
|
bottom: Xt(t),
|
|
@@ -3520,10 +3520,10 @@ var Eu = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
3520
3520
|
bottom: et(e, t, "bottom", n),
|
|
3521
3521
|
left: et(e, t, "left", n)
|
|
3522
3522
|
}, et = (e, t, n, a) => {
|
|
3523
|
-
const o =
|
|
3523
|
+
const o = Ru[n], i = n === "left" || n === "right", l = (m) => i ? m.y : m.x, s = (m) => i ? m.y + m.height : m.x + m.width;
|
|
3524
3524
|
let c = -1 / 0;
|
|
3525
3525
|
for (const m of e) c = Math.max(c, o(m));
|
|
3526
|
-
const h = c - Math.max(a,
|
|
3526
|
+
const h = c - Math.max(a, Nu);
|
|
3527
3527
|
let d = 1 / 0, u = -1 / 0;
|
|
3528
3528
|
for (const m of e)
|
|
3529
3529
|
o(m) < h || (d = Math.min(d, l(m)), u = Math.max(u, s(m)));
|
|
@@ -3532,7 +3532,7 @@ var Eu = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
3532
3532
|
to: Ve(u + a, p.from, p.to)
|
|
3533
3533
|
};
|
|
3534
3534
|
return v.from < v.to ? v : p;
|
|
3535
|
-
},
|
|
3535
|
+
}, _u = (e) => {
|
|
3536
3536
|
const [t] = e;
|
|
3537
3537
|
return t !== void 0 && e.some((n) => !Bi(n, t));
|
|
3538
3538
|
}, Xt = (e) => ({
|
|
@@ -3541,16 +3541,16 @@ var Eu = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
3541
3541
|
}), Zt = (e) => ({
|
|
3542
3542
|
from: e.y,
|
|
3543
3543
|
to: e.y + e.height
|
|
3544
|
-
}),
|
|
3544
|
+
}), Fu = (e, { frameElement: t, panelRect: n, look: a }) => {
|
|
3545
3545
|
const o = V(), i = te(), l = _((u) => u.coordSystem), s = ne(/* @__PURE__ */ new Map()), c = e?.target ?? null, h = e?.outline ?? null;
|
|
3546
3546
|
Oe(() => {
|
|
3547
3547
|
if (c === null || h === null) return;
|
|
3548
|
-
const u = s.current, p = /* @__PURE__ */ new Map(), m =
|
|
3548
|
+
const u = s.current, p = /* @__PURE__ */ new Map(), m = Lu(h, {
|
|
3549
3549
|
panelRect: n,
|
|
3550
3550
|
look: a,
|
|
3551
|
-
readGridLineWidth: (x) =>
|
|
3551
|
+
readGridLineWidth: (x) => Wr(i, x).strokeWidth,
|
|
3552
3552
|
measurePathBox: (x) => {
|
|
3553
|
-
const w = u.get(x) ??
|
|
3553
|
+
const w = u.get(x) ?? Au(t.ownerDocument, x);
|
|
3554
3554
|
return p.set(x, w), w;
|
|
3555
3555
|
}
|
|
3556
3556
|
});
|
|
@@ -3558,7 +3558,7 @@ var Eu = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
3558
3558
|
o.getState().setSelectedOutline(null);
|
|
3559
3559
|
return;
|
|
3560
3560
|
}
|
|
3561
|
-
const f =
|
|
3561
|
+
const f = Du(Ou(h, {
|
|
3562
3562
|
coordSystem: l,
|
|
3563
3563
|
panelRect: n
|
|
3564
3564
|
}), m, Tt(a)), b = Wa(t);
|
|
@@ -3580,31 +3580,31 @@ var Eu = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
3580
3580
|
]);
|
|
3581
3581
|
const d = e !== null;
|
|
3582
3582
|
Oe(() => d ? () => o.getState().setSelectedOutline(null) : void 0, [o, d]);
|
|
3583
|
-
},
|
|
3583
|
+
}, zu = "var(--_10d2ycx0)", Bu = "_10d2ycx1", Hu = "_10d2ycx2", nr = ({ pathData: e, shouldAnimateTransitions: t, source: n, ...a }) => t ? /* @__PURE__ */ r(Gu, {
|
|
3584
3584
|
pathData: e,
|
|
3585
3585
|
source: n,
|
|
3586
3586
|
...a
|
|
3587
3587
|
}) : /* @__PURE__ */ r("path", {
|
|
3588
3588
|
d: e,
|
|
3589
3589
|
...a
|
|
3590
|
-
}),
|
|
3590
|
+
}), Gu = ({ pathData: e, source: t, ...n }) => {
|
|
3591
3591
|
const a = Xi(e, zi, t);
|
|
3592
|
-
return /* @__PURE__ */ r(
|
|
3592
|
+
return /* @__PURE__ */ r(ac.path, {
|
|
3593
3593
|
d: a,
|
|
3594
3594
|
...n
|
|
3595
3595
|
});
|
|
3596
|
-
},
|
|
3597
|
-
[
|
|
3598
|
-
style: Ze({ [
|
|
3596
|
+
}, Vu = "var(--n5vlnq0)", $u = "data-edit-outline-stroke", jt = (e) => ({
|
|
3597
|
+
[$u]: "",
|
|
3598
|
+
style: Ze({ [Vu]: `${e}px` })
|
|
3599
3599
|
});
|
|
3600
|
-
var
|
|
3600
|
+
var rr = (e, t) => {
|
|
3601
3601
|
if (e.kind === "observations" && t.kind === "observations") {
|
|
3602
3602
|
if (e.layerId !== t.layerId || e.scope !== t.scope) return !1;
|
|
3603
3603
|
const n = e.parts[0]?.rows[0];
|
|
3604
3604
|
return n !== void 0 && (t.parts[0]?.rows.includes(n) ?? !1);
|
|
3605
3605
|
}
|
|
3606
|
-
return e.kind === "guide" && t.kind === "guide" ?
|
|
3607
|
-
},
|
|
3606
|
+
return e.kind === "guide" && t.kind === "guide" ? aa(e.target, t.target) : e.kind === "graph" && t.kind === "graph";
|
|
3607
|
+
}, Wu = (e, t) => {
|
|
3608
3608
|
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);
|
|
3609
3609
|
return {
|
|
3610
3610
|
x: o,
|
|
@@ -3612,16 +3612,16 @@ var ar = (e, t) => {
|
|
|
3612
3612
|
width: Math.max(0, l - o),
|
|
3613
3613
|
height: Math.max(0, s - i)
|
|
3614
3614
|
};
|
|
3615
|
-
},
|
|
3616
|
-
const { layers: t, parsingLocale: n } = _(
|
|
3615
|
+
}, Uu = [], Ku = (e) => {
|
|
3616
|
+
const { layers: t, parsingLocale: n } = _(be((u) => ({
|
|
3617
3617
|
layers: u.layers,
|
|
3618
3618
|
parsingLocale: u.config.parsingLocale
|
|
3619
|
-
}))), a = Z((u) => u.editTargetUnderPointer), o = a?.kind === "observations" ? a.observations : null, i = o === null ? void 0 :
|
|
3619
|
+
}))), a = Z((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 : Xs(i, o.target.scope, o.observationIndex), c = P(() => i === void 0 || l === null || s === null ? null : qu(t, i, l, s), [
|
|
3620
3620
|
t,
|
|
3621
3621
|
i,
|
|
3622
3622
|
l,
|
|
3623
3623
|
s
|
|
3624
|
-
]), h = P(() => c !== null && e !== null &&
|
|
3624
|
+
]), h = P(() => c !== null && e !== null && rr(c, e), [c, e]), d = o !== null && i !== void 0 && Xu(o, i, n) ? o.observationIndex : null;
|
|
3625
3625
|
return P(() => {
|
|
3626
3626
|
switch (a?.kind) {
|
|
3627
3627
|
case "observations": {
|
|
@@ -3633,7 +3633,7 @@ var ar = (e, t) => {
|
|
|
3633
3633
|
};
|
|
3634
3634
|
return h ? p === null ? null : {
|
|
3635
3635
|
...c,
|
|
3636
|
-
parts:
|
|
3636
|
+
parts: Uu,
|
|
3637
3637
|
vertex: p
|
|
3638
3638
|
} : {
|
|
3639
3639
|
...c,
|
|
@@ -3648,7 +3648,7 @@ var ar = (e, t) => {
|
|
|
3648
3648
|
key: Ct(a.target),
|
|
3649
3649
|
target: a.target
|
|
3650
3650
|
};
|
|
3651
|
-
return e !== null &&
|
|
3651
|
+
return e !== null && rr(u, e) ? null : u;
|
|
3652
3652
|
}
|
|
3653
3653
|
default:
|
|
3654
3654
|
return null;
|
|
@@ -3660,13 +3660,13 @@ var ar = (e, t) => {
|
|
|
3660
3660
|
d,
|
|
3661
3661
|
e
|
|
3662
3662
|
]);
|
|
3663
|
-
},
|
|
3663
|
+
}, qu = (e, t, n, a) => {
|
|
3664
3664
|
const o = [{
|
|
3665
3665
|
layer: t,
|
|
3666
|
-
rows:
|
|
3666
|
+
rows: Zs(t, n, a)
|
|
3667
3667
|
}];
|
|
3668
|
-
for (const i of
|
|
3669
|
-
const l =
|
|
3668
|
+
for (const i of sa(t, e)) {
|
|
3669
|
+
const l = Hs(i, t, n, a);
|
|
3670
3670
|
l.length > 0 && o.push({
|
|
3671
3671
|
layer: i,
|
|
3672
3672
|
rows: l
|
|
@@ -3684,13 +3684,13 @@ var ar = (e, t) => {
|
|
|
3684
3684
|
parts: o,
|
|
3685
3685
|
vertex: null
|
|
3686
3686
|
};
|
|
3687
|
-
},
|
|
3687
|
+
}, Xu = ({ observationIndex: e, target: t, isOnObservation: n }, a, o) => n && t.scope === "series" && St({
|
|
3688
3688
|
layer: a,
|
|
3689
3689
|
observationIndex: e,
|
|
3690
3690
|
scope: "data-point",
|
|
3691
3691
|
parsingLocale: o
|
|
3692
|
-
}) !== null,
|
|
3693
|
-
const o = e.getBoundingClientRect(), i = [...e.querySelectorAll(
|
|
3692
|
+
}) !== null, Zu = ({ frameElement: e, target: t, coordType: n, legendDisplays: a }) => {
|
|
3693
|
+
const o = e.getBoundingClientRect(), i = [...e.querySelectorAll(ju(t))], l = (s) => {
|
|
3694
3694
|
const c = s.getBoundingClientRect();
|
|
3695
3695
|
return {
|
|
3696
3696
|
x: c.left - o.left,
|
|
@@ -3705,29 +3705,29 @@ var ar = (e, t) => {
|
|
|
3705
3705
|
return n === "polar" || s.length === 0 ? Bt(s) : Bt([$t(s)]);
|
|
3706
3706
|
}
|
|
3707
3707
|
case "legend":
|
|
3708
|
-
return Bt([...
|
|
3708
|
+
return Bt([...Yu(i.filter((s) => !Ju(s)))].flatMap(([s, c]) => a[s] === "direct" ? c.map(l) : [$t(c.map(l))]));
|
|
3709
3709
|
case "grid":
|
|
3710
3710
|
return i.flatMap((s) => {
|
|
3711
3711
|
const c = bt([s], e);
|
|
3712
3712
|
if (c?.kind !== "grid" || c.target.axis === "both") return [];
|
|
3713
3713
|
const { axis: h } = c.target;
|
|
3714
|
-
return t.axis === "both" || h === t.axis ? [
|
|
3714
|
+
return t.axis === "both" || h === t.axis ? [Qu(s, l(s), h)] : [];
|
|
3715
3715
|
});
|
|
3716
3716
|
}
|
|
3717
|
-
},
|
|
3717
|
+
}, ju = (e) => {
|
|
3718
3718
|
const t = `[${gi}="${e.kind}"]`;
|
|
3719
3719
|
return e.kind !== "axis" ? t : `${t}[${vi}="${e.axis}"]`;
|
|
3720
|
-
},
|
|
3720
|
+
}, Yu = (e) => {
|
|
3721
3721
|
const t = /* @__PURE__ */ new Map();
|
|
3722
3722
|
for (const n of e) {
|
|
3723
3723
|
const a = wi(n);
|
|
3724
3724
|
a !== null && t.set(a.legendIndex, [...t.get(a.legendIndex) ?? [], n]);
|
|
3725
3725
|
}
|
|
3726
3726
|
return t;
|
|
3727
|
-
},
|
|
3727
|
+
}, Ju = (e) => e.closest(Hr) !== null, Bt = (e) => e.map((t) => ({
|
|
3728
3728
|
kind: "box",
|
|
3729
3729
|
rect: t
|
|
3730
|
-
})),
|
|
3730
|
+
})), Qu = (e, { x: t, y: n, width: a, height: o }, i) => e.querySelector("circle") !== null ? {
|
|
3731
3731
|
kind: "ring",
|
|
3732
3732
|
axis: i,
|
|
3733
3733
|
center: {
|
|
@@ -3757,7 +3757,7 @@ var ar = (e, t) => {
|
|
|
3757
3757
|
x: t + a,
|
|
3758
3758
|
y: n + o / 2
|
|
3759
3759
|
}
|
|
3760
|
-
} :
|
|
3760
|
+
} : eh(e.querySelector("line")) ? {
|
|
3761
3761
|
kind: "line",
|
|
3762
3762
|
axis: i,
|
|
3763
3763
|
from: {
|
|
@@ -3779,14 +3779,14 @@ var ar = (e, t) => {
|
|
|
3779
3779
|
x: t + a,
|
|
3780
3780
|
y: n
|
|
3781
3781
|
}
|
|
3782
|
-
},
|
|
3782
|
+
}, eh = (e) => {
|
|
3783
3783
|
const t = (n) => Number(e?.getAttribute(n) ?? 0);
|
|
3784
3784
|
return (t("x2") - t("x1")) * (t("y2") - t("y1")) >= 0;
|
|
3785
|
-
},
|
|
3786
|
-
const i = _((f) => f.coordSystem), l = yi(), s =
|
|
3785
|
+
}, th = [], nh = (e, { frameElement: t, frameSize: n, panelRect: a, shouldAnimateTransitions: o }) => {
|
|
3786
|
+
const i = _((f) => f.coordSystem), l = yi(), s = Kr(), c = ah(e.kind === "guide" ? e.target : null, {
|
|
3787
3787
|
frameElement: t,
|
|
3788
3788
|
frameSize: n
|
|
3789
|
-
}), h =
|
|
3789
|
+
}), h = rh(t, n), d = P(() => ({
|
|
3790
3790
|
coordSystem: i,
|
|
3791
3791
|
panelRect: a,
|
|
3792
3792
|
resolveRenderer: l,
|
|
@@ -3796,11 +3796,11 @@ var ar = (e, t) => {
|
|
|
3796
3796
|
a,
|
|
3797
3797
|
l,
|
|
3798
3798
|
s
|
|
3799
|
-
]), u = e.kind === "observations" ? e.parts : null, p = e.kind === "observations" ? e.vertex : null, v = P(() => u?.map((f) =>
|
|
3799
|
+
]), u = e.kind === "observations" ? e.parts : null, p = e.kind === "observations" ? e.vertex : null, v = P(() => u?.map((f) => ar(f, d, o)) ?? th, [
|
|
3800
3800
|
u,
|
|
3801
3801
|
d,
|
|
3802
3802
|
o
|
|
3803
|
-
]), m = P(() => p === null ? null :
|
|
3803
|
+
]), m = P(() => p === null ? null : ar(p, d, !1), [p, d]);
|
|
3804
3804
|
return P(() => {
|
|
3805
3805
|
switch (e.kind) {
|
|
3806
3806
|
case "observations":
|
|
@@ -3828,11 +3828,11 @@ var ar = (e, t) => {
|
|
|
3828
3828
|
c,
|
|
3829
3829
|
h
|
|
3830
3830
|
]);
|
|
3831
|
-
},
|
|
3832
|
-
const [n, a] = Y(() =>
|
|
3831
|
+
}, rh = (e, t) => {
|
|
3832
|
+
const [n, a] = Y(() => Qn(e, t));
|
|
3833
3833
|
return Oe(() => {
|
|
3834
3834
|
a((o) => {
|
|
3835
|
-
const i =
|
|
3835
|
+
const i = Qn(e, {
|
|
3836
3836
|
width: t.width,
|
|
3837
3837
|
height: t.height
|
|
3838
3838
|
});
|
|
@@ -3843,7 +3843,7 @@ var ar = (e, t) => {
|
|
|
3843
3843
|
t.width,
|
|
3844
3844
|
t.height
|
|
3845
3845
|
]), n;
|
|
3846
|
-
},
|
|
3846
|
+
}, ar = ({ layer: e, rows: t }, { coordSystem: n, panelRect: a, resolveRenderer: o, geomReaders: i }, l) => {
|
|
3847
3847
|
const s = {
|
|
3848
3848
|
...e,
|
|
3849
3849
|
data: e.data.take(t)
|
|
@@ -3856,7 +3856,7 @@ var ar = (e, t) => {
|
|
|
3856
3856
|
layer: s,
|
|
3857
3857
|
coordSystem: n,
|
|
3858
3858
|
panelSize: a
|
|
3859
|
-
}).map((h) =>
|
|
3859
|
+
}).map((h) => Wu(h, a))
|
|
3860
3860
|
} : {
|
|
3861
3861
|
kind: "declared",
|
|
3862
3862
|
layer: e,
|
|
@@ -3870,19 +3870,19 @@ var ar = (e, t) => {
|
|
|
3870
3870
|
shouldAnimateTransitions: l
|
|
3871
3871
|
})
|
|
3872
3872
|
};
|
|
3873
|
-
},
|
|
3874
|
-
const a = _((d) => d.coordSystem.type), o = _(
|
|
3873
|
+
}, ah = (e, { frameElement: t, frameSize: n }) => {
|
|
3874
|
+
const a = _((d) => d.coordSystem.type), o = _(be((d) => d.guides.legends.drawn.map((u) => u.display))), i = _((d) => e === null ? null : d), [l, s] = Y([]), c = J(e), h = ne(!1);
|
|
3875
3875
|
return Oe(() => {
|
|
3876
3876
|
const d = c.current;
|
|
3877
3877
|
if (d === null) return;
|
|
3878
3878
|
const u = () => {
|
|
3879
|
-
const p =
|
|
3879
|
+
const p = Zu({
|
|
3880
3880
|
frameElement: t,
|
|
3881
3881
|
target: d,
|
|
3882
3882
|
coordType: a,
|
|
3883
3883
|
legendDisplays: o
|
|
3884
3884
|
}), v = Wa(t);
|
|
3885
|
-
s(p.map((m) =>
|
|
3885
|
+
s(p.map((m) => oh(m, 1 / v)));
|
|
3886
3886
|
};
|
|
3887
3887
|
if (h.current) {
|
|
3888
3888
|
const p = requestAnimationFrame(u);
|
|
@@ -3898,7 +3898,7 @@ var ar = (e, t) => {
|
|
|
3898
3898
|
n.width,
|
|
3899
3899
|
n.height
|
|
3900
3900
|
]), l;
|
|
3901
|
-
},
|
|
3901
|
+
}, oh = (e, t) => {
|
|
3902
3902
|
switch (e.kind) {
|
|
3903
3903
|
case "box": {
|
|
3904
3904
|
const { x: n, y: a, width: o, height: i } = e.rect;
|
|
@@ -3934,20 +3934,20 @@ var ar = (e, t) => {
|
|
|
3934
3934
|
radius: e.radius * t
|
|
3935
3935
|
};
|
|
3936
3936
|
}
|
|
3937
|
-
},
|
|
3938
|
-
const e = hn()[0] ?? null, { layers: t, parsingLocale: n } = _(
|
|
3937
|
+
}, ih = () => {
|
|
3938
|
+
const e = hn()[0] ?? null, { layers: t, parsingLocale: n } = _(be((a) => ({
|
|
3939
3939
|
layers: a.layers,
|
|
3940
3940
|
parsingLocale: a.config.parsingLocale
|
|
3941
3941
|
})));
|
|
3942
|
-
return P(() => e === null ? null :
|
|
3942
|
+
return P(() => e === null ? null : lh(e, t, n), [
|
|
3943
3943
|
e,
|
|
3944
3944
|
t,
|
|
3945
3945
|
n
|
|
3946
3946
|
]);
|
|
3947
|
-
},
|
|
3947
|
+
}, lh = (e, t, n) => {
|
|
3948
3948
|
switch (e.kind) {
|
|
3949
3949
|
case "observations": {
|
|
3950
|
-
const a =
|
|
3950
|
+
const a = sh(e, t, n);
|
|
3951
3951
|
return a === null ? null : {
|
|
3952
3952
|
outlined: a,
|
|
3953
3953
|
target: e
|
|
@@ -3975,10 +3975,10 @@ var ar = (e, t) => {
|
|
|
3975
3975
|
default:
|
|
3976
3976
|
return null;
|
|
3977
3977
|
}
|
|
3978
|
-
},
|
|
3979
|
-
const a =
|
|
3978
|
+
}, sh = (e, t, n) => {
|
|
3979
|
+
const a = ve(t, e.layerId);
|
|
3980
3980
|
if (a === void 0) return null;
|
|
3981
|
-
const o =
|
|
3981
|
+
const o = $n({
|
|
3982
3982
|
layer: a,
|
|
3983
3983
|
target: e,
|
|
3984
3984
|
parsingLocale: n
|
|
@@ -3988,8 +3988,8 @@ var ar = (e, t) => {
|
|
|
3988
3988
|
layer: a,
|
|
3989
3989
|
rows: o
|
|
3990
3990
|
}];
|
|
3991
|
-
for (const l of
|
|
3992
|
-
const s =
|
|
3991
|
+
for (const l of sa(a, t)) {
|
|
3992
|
+
const s = $n({
|
|
3993
3993
|
layer: l,
|
|
3994
3994
|
host: a,
|
|
3995
3995
|
target: e,
|
|
@@ -4008,8 +4008,8 @@ var ar = (e, t) => {
|
|
|
4008
4008
|
parts: i,
|
|
4009
4009
|
vertex: null
|
|
4010
4010
|
};
|
|
4011
|
-
},
|
|
4012
|
-
const i = xi(
|
|
4011
|
+
}, ch = ["x", "y"], dh = ga(function({ frameElement: t, frameSize: n, panelRect: a, shouldAnimateTransitions: o }) {
|
|
4012
|
+
const i = xi(tc, te()), l = ih(), s = Ku(l?.outlined ?? null);
|
|
4013
4013
|
if (l === null && s === null) return null;
|
|
4014
4014
|
const c = {
|
|
4015
4015
|
frameElement: t,
|
|
@@ -4018,17 +4018,17 @@ var ar = (e, t) => {
|
|
|
4018
4018
|
shouldAnimateTransitions: o
|
|
4019
4019
|
};
|
|
4020
4020
|
return /* @__PURE__ */ g("svg", {
|
|
4021
|
-
className:
|
|
4021
|
+
className: Bu,
|
|
4022
4022
|
width: n.width,
|
|
4023
4023
|
height: n.height,
|
|
4024
4024
|
"aria-hidden": !0,
|
|
4025
4025
|
"data-testid": "edit-outline",
|
|
4026
|
-
children: [s !== null && /* @__PURE__ */ r(
|
|
4026
|
+
children: [s !== null && /* @__PURE__ */ r(or, {
|
|
4027
4027
|
part: "hover",
|
|
4028
4028
|
target: s,
|
|
4029
4029
|
look: i.hover,
|
|
4030
4030
|
...c
|
|
4031
|
-
}, s.key), l !== null && /* @__PURE__ */ r(
|
|
4031
|
+
}, s.key), l !== null && /* @__PURE__ */ r(or, {
|
|
4032
4032
|
part: "selected",
|
|
4033
4033
|
target: l.outlined,
|
|
4034
4034
|
editTarget: l.target,
|
|
@@ -4036,14 +4036,14 @@ var ar = (e, t) => {
|
|
|
4036
4036
|
...c
|
|
4037
4037
|
}, l.outlined.key)]
|
|
4038
4038
|
});
|
|
4039
|
-
}),
|
|
4040
|
-
const c = ke(), h = `${c}-shapes`, d = `${c}-hole`, u =
|
|
4039
|
+
}), or = ({ part: e, target: t, editTarget: n, look: a, frameSize: o, panelRect: i, frameElement: l, shouldAnimateTransitions: s }) => {
|
|
4040
|
+
const c = ke(), h = `${c}-shapes`, d = `${c}-hole`, u = nh(t, {
|
|
4041
4041
|
frameElement: l,
|
|
4042
4042
|
frameSize: o,
|
|
4043
4043
|
panelRect: i,
|
|
4044
4044
|
shouldAnimateTransitions: s
|
|
4045
4045
|
});
|
|
4046
|
-
return
|
|
4046
|
+
return Fu(n === void 0 ? null : {
|
|
4047
4047
|
target: n,
|
|
4048
4048
|
outline: u
|
|
4049
4049
|
}, {
|
|
@@ -4056,8 +4056,8 @@ var ar = (e, t) => {
|
|
|
4056
4056
|
children: [
|
|
4057
4057
|
/* @__PURE__ */ g("defs", { children: [/* @__PURE__ */ r("g", {
|
|
4058
4058
|
id: h,
|
|
4059
|
-
className:
|
|
4060
|
-
children: /* @__PURE__ */ r(
|
|
4059
|
+
className: Hu,
|
|
4060
|
+
children: /* @__PURE__ */ r(hh, {
|
|
4061
4061
|
outline: u,
|
|
4062
4062
|
look: a,
|
|
4063
4063
|
panelRect: i
|
|
@@ -4077,69 +4077,69 @@ var ar = (e, t) => {
|
|
|
4077
4077
|
fill: "white"
|
|
4078
4078
|
}), /* @__PURE__ */ r("use", {
|
|
4079
4079
|
href: `#${h}`,
|
|
4080
|
-
style:
|
|
4080
|
+
style: ir("black", a.offset)
|
|
4081
4081
|
})]
|
|
4082
4082
|
})] }),
|
|
4083
4083
|
/* @__PURE__ */ r("use", {
|
|
4084
4084
|
href: `#${h}`,
|
|
4085
4085
|
mask: `url(#${d})`,
|
|
4086
|
-
style:
|
|
4086
|
+
style: ir(a.stroke, Tt(a)),
|
|
4087
4087
|
"data-testid": `edit-outline-${e}-ring`
|
|
4088
4088
|
}),
|
|
4089
|
-
t.kind === "observations" && /* @__PURE__ */ r(
|
|
4089
|
+
t.kind === "observations" && /* @__PURE__ */ r(fh, {
|
|
4090
4090
|
target: t,
|
|
4091
4091
|
look: a,
|
|
4092
4092
|
panelRect: i
|
|
4093
4093
|
})
|
|
4094
4094
|
]
|
|
4095
4095
|
});
|
|
4096
|
-
},
|
|
4096
|
+
}, ir = (e, t) => ({
|
|
4097
4097
|
fill: e,
|
|
4098
4098
|
stroke: e,
|
|
4099
|
-
...Ze({ [
|
|
4100
|
-
}),
|
|
4099
|
+
...Ze({ [zu]: `${2 * t}px` })
|
|
4100
|
+
}), uh = (e, t, n) => {
|
|
4101
4101
|
const a = n.offset + Tt(n);
|
|
4102
4102
|
return cn(He({
|
|
4103
4103
|
x: 0,
|
|
4104
4104
|
y: 0,
|
|
4105
4105
|
...e
|
|
4106
4106
|
}, -a), Math.max(0, t - a));
|
|
4107
|
-
},
|
|
4107
|
+
}, hh = ({ outline: e, look: t, panelRect: n }) => {
|
|
4108
4108
|
const a = te().graph().get("cornerRadius"), { cornerRadius: o } = t;
|
|
4109
4109
|
switch (e.kind) {
|
|
4110
4110
|
case "observations":
|
|
4111
4111
|
return /* @__PURE__ */ g("g", {
|
|
4112
4112
|
transform: `translate(${n.x} ${n.y})`,
|
|
4113
|
-
children: [e.parts.map((i) => /* @__PURE__ */ r(
|
|
4113
|
+
children: [e.parts.map((i) => /* @__PURE__ */ r(lr, {
|
|
4114
4114
|
part: i,
|
|
4115
4115
|
borderRadius: o
|
|
4116
|
-
}, i.layer.id)), e.vertex !== null && /* @__PURE__ */ r(
|
|
4116
|
+
}, i.layer.id)), e.vertex !== null && /* @__PURE__ */ r(lr, {
|
|
4117
4117
|
part: e.vertex,
|
|
4118
4118
|
borderRadius: o
|
|
4119
4119
|
}, `vertex-${e.vertex.rows.join()}`)]
|
|
4120
4120
|
});
|
|
4121
4121
|
case "guide":
|
|
4122
|
-
return /* @__PURE__ */ r(
|
|
4122
|
+
return /* @__PURE__ */ r(gh, {
|
|
4123
4123
|
target: e.target,
|
|
4124
4124
|
shapes: e.shapes,
|
|
4125
4125
|
borderRadius: o
|
|
4126
4126
|
});
|
|
4127
4127
|
case "graph":
|
|
4128
|
-
return /* @__PURE__ */ r("path", { d:
|
|
4128
|
+
return /* @__PURE__ */ r("path", { d: uh(e.frameSize, a, t) });
|
|
4129
4129
|
}
|
|
4130
|
-
},
|
|
4131
|
-
return t.kind === "boxes" ? /* @__PURE__ */ r(
|
|
4130
|
+
}, lr = ga(function({ part: t, borderRadius: n }) {
|
|
4131
|
+
return t.kind === "boxes" ? /* @__PURE__ */ r(mh, {
|
|
4132
4132
|
boxes: t.boxes,
|
|
4133
4133
|
borderRadius: n
|
|
4134
|
-
}) : /* @__PURE__ */ r(
|
|
4134
|
+
}) : /* @__PURE__ */ r(ph, {
|
|
4135
4135
|
shapes: t.shapes,
|
|
4136
4136
|
layer: t.layer
|
|
4137
4137
|
});
|
|
4138
|
-
}),
|
|
4138
|
+
}), ph = ({ shapes: e, layer: t }) => e.map((n, a) => {
|
|
4139
4139
|
const o = n.kind === "dots" || n.key === void 0 ? String(a) : `${n.kind}:${n.key}`;
|
|
4140
4140
|
switch (n.kind) {
|
|
4141
4141
|
case "region":
|
|
4142
|
-
return n.pathData === "" ? null : /* @__PURE__ */ r(
|
|
4142
|
+
return n.pathData === "" ? null : /* @__PURE__ */ r(nr, {
|
|
4143
4143
|
pathData: n.pathData,
|
|
4144
4144
|
fillRule: n.fillRule,
|
|
4145
4145
|
shouldAnimateTransitions: n.shouldAnimateTransitions ?? !1,
|
|
@@ -4147,7 +4147,7 @@ var ar = (e, t) => {
|
|
|
4147
4147
|
"data-geom": t.geom
|
|
4148
4148
|
}, o);
|
|
4149
4149
|
case "stroke":
|
|
4150
|
-
return n.pathData === "" ? null : /* @__PURE__ */ r(
|
|
4150
|
+
return n.pathData === "" ? null : /* @__PURE__ */ r(nr, {
|
|
4151
4151
|
pathData: n.pathData,
|
|
4152
4152
|
shouldAnimateTransitions: n.shouldAnimateTransitions ?? !1,
|
|
4153
4153
|
source: t,
|
|
@@ -4161,24 +4161,24 @@ var ar = (e, t) => {
|
|
|
4161
4161
|
...jt(n.size)
|
|
4162
4162
|
}, o);
|
|
4163
4163
|
}
|
|
4164
|
-
}),
|
|
4164
|
+
}), mh = ({ boxes: e, borderRadius: t }) => {
|
|
4165
4165
|
const n = e.map((a) => cn(a, t)).join("");
|
|
4166
4166
|
return n === "" ? null : /* @__PURE__ */ r("path", {
|
|
4167
4167
|
d: n,
|
|
4168
4168
|
"data-testid": "edit-outline-boxes"
|
|
4169
4169
|
});
|
|
4170
|
-
},
|
|
4170
|
+
}, gh = ({ target: e, shapes: t, borderRadius: n }) => {
|
|
4171
4171
|
const a = te();
|
|
4172
|
-
if (e.kind === "grid") return
|
|
4173
|
-
const l = t.map((s) =>
|
|
4172
|
+
if (e.kind === "grid") return ch.map((i) => {
|
|
4173
|
+
const l = t.map((s) => vh(s, i)).join("");
|
|
4174
4174
|
return l === "" ? null : /* @__PURE__ */ r("path", {
|
|
4175
4175
|
d: l,
|
|
4176
|
-
...jt(
|
|
4176
|
+
...jt(Wr(a, i).strokeWidth)
|
|
4177
4177
|
}, i);
|
|
4178
4178
|
});
|
|
4179
4179
|
const o = t.map((i) => i.kind === "box" ? cn(i.rect, n) : "").join("");
|
|
4180
4180
|
return o === "" ? null : /* @__PURE__ */ r("path", { d: o });
|
|
4181
|
-
},
|
|
4181
|
+
}, vh = (e, t) => {
|
|
4182
4182
|
if (e.kind === "box" || e.axis !== t) return "";
|
|
4183
4183
|
switch (e.kind) {
|
|
4184
4184
|
case "line":
|
|
@@ -4188,10 +4188,10 @@ var ar = (e, t) => {
|
|
|
4188
4188
|
return `M${o}A${a},${a} 0 0 1 ${`${n.x},${n.y + a}`}A${a},${a} 0 0 1 ${o}`;
|
|
4189
4189
|
}
|
|
4190
4190
|
}
|
|
4191
|
-
},
|
|
4191
|
+
}, fh = ({ target: e, look: t, panelRect: n }) => {
|
|
4192
4192
|
const a = _((l) => l.coordSystem), o = e.parts[0];
|
|
4193
4193
|
if (e.scope !== "x-value" || o === void 0 || o.layer.highlight?.strategy !== "overlay-anchor") return null;
|
|
4194
|
-
const i =
|
|
4194
|
+
const i = bh(o);
|
|
4195
4195
|
return i === null ? null : /* @__PURE__ */ r("svg", {
|
|
4196
4196
|
x: n.x,
|
|
4197
4197
|
y: n.y,
|
|
@@ -4207,16 +4207,16 @@ var ar = (e, t) => {
|
|
|
4207
4207
|
"data-testid": "edit-outline-band-guide"
|
|
4208
4208
|
})
|
|
4209
4209
|
});
|
|
4210
|
-
},
|
|
4210
|
+
}, bh = ({ layer: e, rows: t }) => {
|
|
4211
4211
|
for (const n of t) {
|
|
4212
|
-
const a = e.data.getAt(n), o = a === null ? null :
|
|
4212
|
+
const a = e.data.getAt(n), o = a === null ? null : Is(a), i = a === null ? null : Es(a);
|
|
4213
4213
|
if (o !== null && i !== null) return {
|
|
4214
4214
|
x: o,
|
|
4215
4215
|
y: i
|
|
4216
4216
|
};
|
|
4217
4217
|
}
|
|
4218
4218
|
return null;
|
|
4219
|
-
},
|
|
4219
|
+
}, yh = {
|
|
4220
4220
|
pointer: null,
|
|
4221
4221
|
focus: null,
|
|
4222
4222
|
last: "pointer"
|
|
@@ -4231,7 +4231,7 @@ var ar = (e, t) => {
|
|
|
4231
4231
|
dismiss: () => {
|
|
4232
4232
|
}
|
|
4233
4233
|
}), Yt = ({ className: e, children: t }) => {
|
|
4234
|
-
const [n, a] = Y(!1), [o, i] = Y(!1), [l, s] = Y(
|
|
4234
|
+
const [n, a] = Y(!1), [o, i] = Y(!1), [l, s] = Y(yh), c = ae((m, f) => {
|
|
4235
4235
|
i(!1), s((b) => ({
|
|
4236
4236
|
...b,
|
|
4237
4237
|
[f]: m,
|
|
@@ -4242,7 +4242,7 @@ var ar = (e, t) => {
|
|
|
4242
4242
|
...b,
|
|
4243
4243
|
[f]: null
|
|
4244
4244
|
} : b);
|
|
4245
|
-
}, []), d = ae(() => i(!0), []), u =
|
|
4245
|
+
}, []), d = ae(() => i(!0), []), u = Ch(l), p = P(() => ({
|
|
4246
4246
|
isHovered: n,
|
|
4247
4247
|
isDismissed: o,
|
|
4248
4248
|
reachedTooltipId: u,
|
|
@@ -4268,7 +4268,7 @@ var ar = (e, t) => {
|
|
|
4268
4268
|
children: t
|
|
4269
4269
|
})
|
|
4270
4270
|
});
|
|
4271
|
-
},
|
|
4271
|
+
}, Sh = ({ label: e, isChecked: t = !1, children: n }) => {
|
|
4272
4272
|
const { isHovered: a, isDismissed: o, reachedTooltipId: i, reach: l, release: s, dismiss: c } = Se(Ua), h = ke(), [d, u] = Y(!1), p = a ? !o && (i === h || t && i === null) : d;
|
|
4273
4273
|
z(() => () => {
|
|
4274
4274
|
s(h, "pointer"), s(h, "focus");
|
|
@@ -4289,9 +4289,9 @@ var ar = (e, t) => {
|
|
|
4289
4289
|
onBlur: () => s(h, "focus")
|
|
4290
4290
|
}), /* @__PURE__ */ r(le.Portal, {
|
|
4291
4291
|
container: de(),
|
|
4292
|
-
children: /* @__PURE__ */ r(
|
|
4292
|
+
children: /* @__PURE__ */ r(bn, { children: /* @__PURE__ */ r(le.Positioner, {
|
|
4293
4293
|
sideOffset: 6,
|
|
4294
|
-
className:
|
|
4294
|
+
className: Zd,
|
|
4295
4295
|
children: /* @__PURE__ */ r(le.Popup, {
|
|
4296
4296
|
className: Ga,
|
|
4297
4297
|
children: e
|
|
@@ -4299,44 +4299,44 @@ var ar = (e, t) => {
|
|
|
4299
4299
|
}) })
|
|
4300
4300
|
})]
|
|
4301
4301
|
});
|
|
4302
|
-
},
|
|
4302
|
+
}, Ch = ({ pointer: e, focus: t, last: n }) => n === "focus" ? t ?? e : e ?? t, xh = "data-graphy-chart-chrome", wh = "data-graphy-chart-menu", Cn = { [wh]: "" }, At = (e) => ({ [xh]: e }), it = (e, t) => e instanceof Element && e.closest(`[data-graphy-chart-chrome="${CSS.escape(t)}"]`) !== null, Ka = (e) => e instanceof Element && e.closest("[data-graphy-chart-menu]") !== null, Jt = (e) => e instanceof Element && e.closest("[data-graphy-chart-chrome]") !== null, qa = (e, t, n) => n !== null && mn({
|
|
4303
4303
|
x: e.clientX - t.x,
|
|
4304
4304
|
y: e.clientY - t.y
|
|
4305
|
-
}, n), qe = (e, t, n) => e instanceof Node && (t.contains(e) || it(e, n)),
|
|
4305
|
+
}, n), qe = (e, t, n) => e instanceof Node && (t.contains(e) || it(e, n)), Th = "cml7ha0", Xa = De(null), Ah = ({ children: e }) => {
|
|
4306
4306
|
const { chartId: t } = B(), [n] = Y(de), [a, o] = Y(null);
|
|
4307
4307
|
return n === null ? null : /* @__PURE__ */ g(Q, { children: [va(/* @__PURE__ */ r("div", {
|
|
4308
4308
|
ref: o,
|
|
4309
|
-
className:
|
|
4309
|
+
className: Th,
|
|
4310
4310
|
...At(t)
|
|
4311
4311
|
}), n), /* @__PURE__ */ r(Xa.Provider, {
|
|
4312
4312
|
value: a,
|
|
4313
4313
|
children: e
|
|
4314
4314
|
})] });
|
|
4315
|
-
}, kt = () => Se(Xa),
|
|
4315
|
+
}, kt = () => Se(Xa), kh = "kwvn4c0", Lh = "kwvn4c1", Za = (e, t) => ({
|
|
4316
4316
|
contextElement: e,
|
|
4317
4317
|
getBoundingClientRect: () => {
|
|
4318
4318
|
const n = e.getBoundingClientRect(), a = $a(e, n.width);
|
|
4319
4319
|
return new DOMRect(n.left + t.x * a, n.top + t.y * a, t.width * a, t.height * a);
|
|
4320
4320
|
}
|
|
4321
|
-
}),
|
|
4322
|
-
if (!
|
|
4321
|
+
}), Ph = ({ side: e, boundary: t, spans: n, anchor: a, isRightToLeft: o }) => {
|
|
4322
|
+
if (!Ih(e)) return 0;
|
|
4323
4323
|
const i = n[e];
|
|
4324
|
-
if (e === "left" || e === "right") return
|
|
4324
|
+
if (e === "left" || e === "right") return sr(i.from - t.y, a.height, t.height);
|
|
4325
4325
|
const l = o ? t.x + t.width - i.to : i.from - t.x;
|
|
4326
|
-
return
|
|
4326
|
+
return sr(l, a.width, t.width);
|
|
4327
4327
|
}, ja = () => {
|
|
4328
4328
|
const [e, t] = Y(!1);
|
|
4329
4329
|
return z(() => {
|
|
4330
4330
|
t(!0);
|
|
4331
4331
|
}, []), e;
|
|
4332
|
-
},
|
|
4332
|
+
}, Ih = (e) => hi.some((t) => t === e), sr = (e, t, n) => n === 0 ? 0 : e * t / n, Eh = {
|
|
4333
4333
|
x: 8,
|
|
4334
4334
|
y: 8
|
|
4335
|
-
},
|
|
4335
|
+
}, Oh = {
|
|
4336
4336
|
side: "flip",
|
|
4337
4337
|
align: "shift",
|
|
4338
4338
|
fallbackAxisSide: "end"
|
|
4339
|
-
},
|
|
4339
|
+
}, Mh = ({ frameElement: e, boundary: t, spans: n, clearance: a = Eh, onEscape: o, children: i }) => {
|
|
4340
4340
|
const l = kt(), s = ja(), [c, h] = Y(null), d = ne(null), u = ae((S) => {
|
|
4341
4341
|
d.current = S, h(S);
|
|
4342
4342
|
}, []), p = ne(null);
|
|
@@ -4366,26 +4366,26 @@ var ar = (e, t) => {
|
|
|
4366
4366
|
onOpenChange: C,
|
|
4367
4367
|
children: /* @__PURE__ */ r(j.Portal, {
|
|
4368
4368
|
container: l,
|
|
4369
|
-
children: /* @__PURE__ */ r(
|
|
4369
|
+
children: /* @__PURE__ */ r(bn, { children: /* @__PURE__ */ r(j.Positioner, {
|
|
4370
4370
|
ref: p,
|
|
4371
4371
|
anchor: w,
|
|
4372
4372
|
side: "right",
|
|
4373
4373
|
align: "start",
|
|
4374
4374
|
sideOffset: ({ side: S }) => S === "top" || S === "bottom" ? a.y : a.x,
|
|
4375
|
-
alignOffset: ({ side: S, anchor: L }) =>
|
|
4375
|
+
alignOffset: ({ side: S, anchor: L }) => Ph({
|
|
4376
4376
|
side: S,
|
|
4377
4377
|
boundary: x.box,
|
|
4378
4378
|
spans: x.spans,
|
|
4379
4379
|
anchor: L,
|
|
4380
|
-
isRightToLeft:
|
|
4380
|
+
isRightToLeft: Nh(p.current)
|
|
4381
4381
|
}),
|
|
4382
|
-
collisionAvoidance:
|
|
4382
|
+
collisionAvoidance: Oh,
|
|
4383
4383
|
sticky: !0,
|
|
4384
|
-
className:
|
|
4385
|
-
...
|
|
4384
|
+
className: kh,
|
|
4385
|
+
...Cn,
|
|
4386
4386
|
children: /* @__PURE__ */ r(j.Popup, {
|
|
4387
4387
|
ref: u,
|
|
4388
|
-
className:
|
|
4388
|
+
className: Lh,
|
|
4389
4389
|
initialFocus: d,
|
|
4390
4390
|
finalFocus: !1,
|
|
4391
4391
|
"data-testid": "anchored-popover",
|
|
@@ -4394,14 +4394,14 @@ var ar = (e, t) => {
|
|
|
4394
4394
|
}) })
|
|
4395
4395
|
})
|
|
4396
4396
|
});
|
|
4397
|
-
},
|
|
4398
|
-
const n =
|
|
4397
|
+
}, Nh = (e) => e !== null && getComputedStyle(e).direction === "rtl", Rh = (e, t) => {
|
|
4398
|
+
const n = ve(t.layers, e);
|
|
4399
4399
|
if (n === void 0) return null;
|
|
4400
|
-
const
|
|
4400
|
+
const a = ve(t.spec.layers, e), o = a === void 0 ? null : Ts(a, t.spec.layers), i = o !== null && o.id !== n.id ? o : n;
|
|
4401
4401
|
return {
|
|
4402
|
-
geom:
|
|
4402
|
+
geom: i.geom,
|
|
4403
4403
|
coord: t.spec.coords.coordType,
|
|
4404
|
-
position:
|
|
4404
|
+
position: i.position
|
|
4405
4405
|
};
|
|
4406
4406
|
}, Ke = (e, t) => {
|
|
4407
4407
|
for (const n of e) {
|
|
@@ -4409,15 +4409,15 @@ var ar = (e, t) => {
|
|
|
4409
4409
|
if (a !== void 0) return a;
|
|
4410
4410
|
}
|
|
4411
4411
|
return null;
|
|
4412
|
-
},
|
|
4413
|
-
const i =
|
|
4414
|
-
return i !== void 0 ? i :
|
|
4415
|
-
}),
|
|
4416
|
-
const t = Se(zh), n = e?.kind === "observations" ? e.layerId : null, a = _(
|
|
4412
|
+
}, Dh = ({ geom: e, coord: t, position: n }, a) => Ke(a, (o) => {
|
|
4413
|
+
const i = cr(o.layers, e)?.[t]?.[n];
|
|
4414
|
+
return i !== void 0 ? i : cr(o.geoms, e);
|
|
4415
|
+
}), cr = (e, t) => e !== void 0 && Object.hasOwn(e, t) ? e[t] : void 0, _h = (e) => {
|
|
4416
|
+
const t = Se(zh), n = e?.kind === "observations" ? e.layerId : null, a = _(be((o) => n === null ? null : Rh(n, o)));
|
|
4417
4417
|
if (e === null) return null;
|
|
4418
4418
|
switch (e.kind) {
|
|
4419
4419
|
case "observations": {
|
|
4420
|
-
const o = a === null ? null :
|
|
4420
|
+
const o = a === null ? null : Dh(a, t);
|
|
4421
4421
|
return o === null ? null : /* @__PURE__ */ r(o, { target: e });
|
|
4422
4422
|
}
|
|
4423
4423
|
case "legend": {
|
|
@@ -4645,7 +4645,7 @@ var ro = ({ options: e, value: t, onChange: n, onCommit: a, itemLayout: o = "inl
|
|
|
4645
4645
|
children: m.label
|
|
4646
4646
|
})]
|
|
4647
4647
|
}, m.value);
|
|
4648
|
-
return f === void 0 ? b : /* @__PURE__ */ r(
|
|
4648
|
+
return f === void 0 ? b : /* @__PURE__ */ r(Sh, {
|
|
4649
4649
|
label: f,
|
|
4650
4650
|
isChecked: m.value === t,
|
|
4651
4651
|
children: b
|
|
@@ -4662,7 +4662,7 @@ var ro = ({ options: e, value: t, onChange: n, onCommit: a, itemLayout: o = "inl
|
|
|
4662
4662
|
}
|
|
4663
4663
|
};
|
|
4664
4664
|
const { parsingLocale: t, numberFormat: n } = e.config, a = e.guides.colorGroups.map((o) => {
|
|
4665
|
-
const i =
|
|
4665
|
+
const i = la({
|
|
4666
4666
|
valueFormat: o.valueFormat,
|
|
4667
4667
|
locale: t,
|
|
4668
4668
|
numberFormat: n
|
|
@@ -4695,12 +4695,12 @@ var ro = ({ options: e, value: t, onChange: n, onCommit: a, itemLayout: o = "inl
|
|
|
4695
4695
|
default:
|
|
4696
4696
|
return "editor.overlayMenu.thisPoint";
|
|
4697
4697
|
}
|
|
4698
|
-
}, Wh = (e, t, n, a) =>
|
|
4698
|
+
}, Wh = (e, t, n, a) => la({
|
|
4699
4699
|
valueFormat: Cs(e.guides, "x")?.valueFormat ?? { type: "text" },
|
|
4700
4700
|
locale: a,
|
|
4701
4701
|
numberFormat: e.config.numberFormat
|
|
4702
4702
|
})(bs(t.data, t.mapping)(n), n), Uh = (e, t, n, a) => {
|
|
4703
|
-
const o =
|
|
4703
|
+
const o = Ps(t.data, t.mapping);
|
|
4704
4704
|
return o.length === 0 ? Kh(e, t) : o.map((i) => qh(n[i] ?? null, a)).join(", ");
|
|
4705
4705
|
}, Kh = (e, t) => {
|
|
4706
4706
|
const n = xt(t.mapping.y), a = n === null ? void 0 : e.guides.variableLabels[n];
|
|
@@ -4713,7 +4713,7 @@ var ro = ({ options: e, value: t, onChange: n, onCommit: a, itemLayout: o = "inl
|
|
|
4713
4713
|
"x-value": Ja,
|
|
4714
4714
|
series: Qa
|
|
4715
4715
|
}, Zh = () => {
|
|
4716
|
-
const { selectionStore: e } = B(), t = V(), n = M(), a =
|
|
4716
|
+
const { selectionStore: e } = B(), t = V(), n = M(), a = Zr(), o = _((f) => f), i = oo(o), l = Z((f) => f.pressedObservation), s = P(() => jh({
|
|
4717
4717
|
scene: o,
|
|
4718
4718
|
pressed: l,
|
|
4719
4719
|
groupOptions: i,
|
|
@@ -4755,7 +4755,7 @@ var ro = ({ options: e, value: t, onChange: n, onCommit: a, itemLayout: o = "inl
|
|
|
4755
4755
|
}, jh = ({ scene: e, pressed: t, groupOptions: n, locale: a, t: o }) => {
|
|
4756
4756
|
const i = t === null ? null : Ki(t, e.layers, e.config.parsingLocale);
|
|
4757
4757
|
if (t === null || i === null) return null;
|
|
4758
|
-
const { layer: l, observation: s } = i, c =
|
|
4758
|
+
const { layer: l, observation: s } = i, c = qs({
|
|
4759
4759
|
layer: l,
|
|
4760
4760
|
observationIndex: t.observationIndex,
|
|
4761
4761
|
parsingLocale: e.config.parsingLocale,
|
|
@@ -4815,7 +4815,7 @@ var ro = ({ options: e, value: t, onChange: n, onCommit: a, itemLayout: o = "inl
|
|
|
4815
4815
|
const i = () => {
|
|
4816
4816
|
n.getState().clearSelection();
|
|
4817
4817
|
};
|
|
4818
|
-
return /* @__PURE__ */ g(
|
|
4818
|
+
return /* @__PURE__ */ g(Mh, {
|
|
4819
4819
|
frameElement: e,
|
|
4820
4820
|
boundary: a.frame,
|
|
4821
4821
|
spans: a.frameSpans,
|
|
@@ -4827,7 +4827,7 @@ var ro = ({ options: e, value: t, onChange: n, onCommit: a, itemLayout: o = "inl
|
|
|
4827
4827
|
"data-testid": "overlay-menu-title",
|
|
4828
4828
|
children: Qh(a.target, t)
|
|
4829
4829
|
}), a.target.kind === "observations" && /* @__PURE__ */ r(Zh, {})]
|
|
4830
|
-
}), /* @__PURE__ */ r(
|
|
4830
|
+
}), /* @__PURE__ */ r(rc, { children: o }, Ct(a.target))]
|
|
4831
4831
|
});
|
|
4832
4832
|
}, r1 = ({ frameRect: e }) => {
|
|
4833
4833
|
const { targetBoundaryStore: t } = B(), n = Z((l) => l.selectedOutline), { left: a, top: o } = e, i = P(() => {
|
|
@@ -4893,7 +4893,7 @@ var lo = "efjmb40", so = "efjmb41", _e = "efjmb42", Fe = "efjmb43", a1 = "efjmb4
|
|
|
4893
4893
|
"close-press",
|
|
4894
4894
|
"sibling-open",
|
|
4895
4895
|
"trigger-press"
|
|
4896
|
-
]),
|
|
4896
|
+
]), xn = ({ label: e, icon: t, onOpened: n, children: a }) => {
|
|
4897
4897
|
const o = kt(), [i, l] = Y(!1), s = (c, h) => {
|
|
4898
4898
|
c ? (l(!0), n?.()) : i1.has(h.reason) && l(!1);
|
|
4899
4899
|
};
|
|
@@ -4910,7 +4910,7 @@ var lo = "efjmb40", so = "efjmb41", _e = "efjmb42", Fe = "efjmb43", a1 = "efjmb4
|
|
|
4910
4910
|
align: "start",
|
|
4911
4911
|
sideOffset: 4,
|
|
4912
4912
|
className: lo,
|
|
4913
|
-
...
|
|
4913
|
+
...Cn,
|
|
4914
4914
|
children: /* @__PURE__ */ r(Te.Popup, {
|
|
4915
4915
|
className: so,
|
|
4916
4916
|
children: a
|
|
@@ -4933,7 +4933,7 @@ var lo = "efjmb40", so = "efjmb41", _e = "efjmb42", Fe = "efjmb43", a1 = "efjmb4
|
|
|
4933
4933
|
})
|
|
4934
4934
|
]
|
|
4935
4935
|
}), s1 = "_1qe7q450", c1 = "_1qe7q451", d1 = "_1qe7q452", u1 = ({ label: e, placeholder: t, addLabel: n, at: a, onRequestClose: o }) => {
|
|
4936
|
-
const i = ne(null), [l, s] = Y(""), { dispatch: c } =
|
|
4936
|
+
const i = ne(null), [l, s] = Y(""), { dispatch: c } = fe(), h = l.trim(), d = () => {
|
|
4937
4937
|
h.length !== 0 && (c(new we({
|
|
4938
4938
|
kind: "comment",
|
|
4939
4939
|
annotation: {
|
|
@@ -4942,7 +4942,7 @@ var lo = "efjmb40", so = "efjmb41", _e = "efjmb42", Fe = "efjmb43", a1 = "efjmb4
|
|
|
4942
4942
|
}
|
|
4943
4943
|
})), o());
|
|
4944
4944
|
};
|
|
4945
|
-
return /* @__PURE__ */ r(
|
|
4945
|
+
return /* @__PURE__ */ r(xn, {
|
|
4946
4946
|
label: e,
|
|
4947
4947
|
icon: /* @__PURE__ */ r(io, {}),
|
|
4948
4948
|
onOpened: () => {
|
|
@@ -4988,7 +4988,7 @@ var lo = "efjmb40", so = "efjmb41", _e = "efjmb42", Fe = "efjmb43", a1 = "efjmb4
|
|
|
4988
4988
|
fillOpacity: "0.8"
|
|
4989
4989
|
})
|
|
4990
4990
|
}), m1 = "relative-difference", g1 = ({ label: e, layer: t, at: n, onRequestClose: a }) => {
|
|
4991
|
-
const { dispatch: o } =
|
|
4991
|
+
const { dispatch: o } = fe(), i = _((c) => c.coordSystem), l = P(() => Rs({
|
|
4992
4992
|
layer: t,
|
|
4993
4993
|
at: n,
|
|
4994
4994
|
coordSystem: i
|
|
@@ -5002,7 +5002,7 @@ var lo = "efjmb40", so = "efjmb41", _e = "efjmb42", Fe = "efjmb43", a1 = "efjmb4
|
|
|
5002
5002
|
o(new we({
|
|
5003
5003
|
kind: "differenceArrow",
|
|
5004
5004
|
annotation: {
|
|
5005
|
-
...
|
|
5005
|
+
...Jr,
|
|
5006
5006
|
...l,
|
|
5007
5007
|
label: m1
|
|
5008
5008
|
}
|
|
@@ -5022,7 +5022,7 @@ function v1(e, t) {
|
|
|
5022
5022
|
scope: "series",
|
|
5023
5023
|
labelKey: "pieSlice"
|
|
5024
5024
|
}];
|
|
5025
|
-
const n =
|
|
5025
|
+
const n = Ms(t.data, t.mapping);
|
|
5026
5026
|
switch (t.geom) {
|
|
5027
5027
|
case "bar": {
|
|
5028
5028
|
const a = [{
|
|
@@ -5336,7 +5336,7 @@ var f1 = (e) => {
|
|
|
5336
5336
|
})]
|
|
5337
5337
|
}), A1 = ({ label: e, options: t, onSelect: n }) => {
|
|
5338
5338
|
const a = M();
|
|
5339
|
-
return /* @__PURE__ */ r(
|
|
5339
|
+
return /* @__PURE__ */ r(xn, {
|
|
5340
5340
|
label: e,
|
|
5341
5341
|
icon: /* @__PURE__ */ r(uo, {}),
|
|
5342
5342
|
children: t.map((o) => /* @__PURE__ */ g(Te.Item, {
|
|
@@ -5349,7 +5349,7 @@ var f1 = (e) => {
|
|
|
5349
5349
|
}, o.scope))
|
|
5350
5350
|
});
|
|
5351
5351
|
}, k1 = ({ label: e, layer: t, observation: n, highlights: a, onRequestClose: o }) => {
|
|
5352
|
-
const i = M(), { dispatch: l } =
|
|
5352
|
+
const i = M(), { dispatch: l } = fe(), s = _((v) => v.coordSystem), c = P(() => ds(t, n), [t, n]), h = P(() => v1(s, t), [s, t]), d = P(() => {
|
|
5353
5353
|
const v = new Set(a.map((m) => m.scope));
|
|
5354
5354
|
return h.filter((m) => !v.has(m.scope));
|
|
5355
5355
|
}, [h, a]), [u] = d;
|
|
@@ -5382,7 +5382,7 @@ var f1 = (e) => {
|
|
|
5382
5382
|
"aria-hidden": "true",
|
|
5383
5383
|
children: [e, /* @__PURE__ */ r("span", { className: P1 })]
|
|
5384
5384
|
}), I1 = ({ label: e, highlights: t, onRequestClose: n }) => {
|
|
5385
|
-
const { dispatch: a } =
|
|
5385
|
+
const { dispatch: a } = fe(), o = t.at(-1);
|
|
5386
5386
|
if (o === void 0) return null;
|
|
5387
5387
|
const i = () => {
|
|
5388
5388
|
a(new fl({ id: o.id })), n();
|
|
@@ -5432,7 +5432,7 @@ var f1 = (e) => {
|
|
|
5432
5432
|
})
|
|
5433
5433
|
]
|
|
5434
5434
|
}), O1 = ({ label: e, at: t, onRequestClose: n }) => {
|
|
5435
|
-
const { dispatch: a } =
|
|
5435
|
+
const { dispatch: a } = fe(), o = () => {
|
|
5436
5436
|
a(new we({
|
|
5437
5437
|
kind: "pinnedNumber",
|
|
5438
5438
|
annotation: { at: t }
|
|
@@ -5493,8 +5493,8 @@ var f1 = (e) => {
|
|
|
5493
5493
|
labelKey: "graph.annotations.baseMenu.removeSticker"
|
|
5494
5494
|
},
|
|
5495
5495
|
image: null
|
|
5496
|
-
}, M1 = (e) =>
|
|
5497
|
-
const n = M(), { dispatch: a } =
|
|
5496
|
+
}, M1 = (e) => Ds(e.kind) && go[e.kind] !== null, N1 = ({ attachment: e, onRequestClose: t }) => {
|
|
5497
|
+
const n = M(), { dispatch: a } = fe(), { icon: o, labelKey: i } = go[e.kind], l = () => {
|
|
5498
5498
|
a(new $e({ id: e.annotation.id })), t();
|
|
5499
5499
|
};
|
|
5500
5500
|
return /* @__PURE__ */ g(H.Item, {
|
|
@@ -5506,7 +5506,7 @@ var f1 = (e) => {
|
|
|
5506
5506
|
})]
|
|
5507
5507
|
});
|
|
5508
5508
|
}, R1 = "ceeojg0", D1 = "ceeojg1", _1 = "ceeojg2", F1 = ({ label: e, at: t, onRequestClose: n }) => {
|
|
5509
|
-
const { dispatch: a } =
|
|
5509
|
+
const { dispatch: a } = fe(), o = (i) => {
|
|
5510
5510
|
a(new we({
|
|
5511
5511
|
kind: "sticker",
|
|
5512
5512
|
annotation: {
|
|
@@ -5518,7 +5518,7 @@ var f1 = (e) => {
|
|
|
5518
5518
|
}
|
|
5519
5519
|
})), n();
|
|
5520
5520
|
};
|
|
5521
|
-
return /* @__PURE__ */ r(
|
|
5521
|
+
return /* @__PURE__ */ r(xn, {
|
|
5522
5522
|
label: e,
|
|
5523
5523
|
icon: /* @__PURE__ */ r(mo, {}),
|
|
5524
5524
|
children: /* @__PURE__ */ r("div", {
|
|
@@ -5566,7 +5566,7 @@ var f1 = (e) => {
|
|
|
5566
5566
|
p,
|
|
5567
5567
|
v,
|
|
5568
5568
|
m
|
|
5569
|
-
]), b =
|
|
5569
|
+
]), b = As(c, a, P(() => vs(n, h), [n, h])), x = b !== null && M1(b) ? b : null, w = E1(n, o), C = (S, L) => {
|
|
5570
5570
|
!S && H1(L.reason) && i();
|
|
5571
5571
|
};
|
|
5572
5572
|
return /* @__PURE__ */ r(H.Root, {
|
|
@@ -5581,7 +5581,7 @@ var f1 = (e) => {
|
|
|
5581
5581
|
align: "start",
|
|
5582
5582
|
sideOffset: 8,
|
|
5583
5583
|
className: lo,
|
|
5584
|
-
...
|
|
5584
|
+
...Cn,
|
|
5585
5585
|
children: /* @__PURE__ */ g(H.Popup, {
|
|
5586
5586
|
className: so,
|
|
5587
5587
|
"data-testid": "observation-menu",
|
|
@@ -5633,10 +5633,10 @@ var f1 = (e) => {
|
|
|
5633
5633
|
}) })
|
|
5634
5634
|
})
|
|
5635
5635
|
});
|
|
5636
|
-
}, H1 = (e) => e === "outside-press" || e === "escape-key" || e === "item-press",
|
|
5636
|
+
}, H1 = (e) => e === "outside-press" || e === "escape-key" || e === "item-press", wn = "l8tsqe0", vo = ["start", "end"], fo = ({ anchor: e, point: t, delta: n }) => {
|
|
5637
5637
|
const a = {
|
|
5638
|
-
x:
|
|
5639
|
-
y:
|
|
5638
|
+
x: dr(t.x, n.x),
|
|
5639
|
+
y: dr(1 - t.y, n.y)
|
|
5640
5640
|
};
|
|
5641
5641
|
return {
|
|
5642
5642
|
anchor: {
|
|
@@ -5649,7 +5649,7 @@ var f1 = (e) => {
|
|
|
5649
5649
|
y: t.y - a.y
|
|
5650
5650
|
}
|
|
5651
5651
|
};
|
|
5652
|
-
},
|
|
5652
|
+
}, Tn = (e, t) => ({
|
|
5653
5653
|
...e,
|
|
5654
5654
|
[t.endpoint]: {
|
|
5655
5655
|
...e[t.endpoint],
|
|
@@ -5669,20 +5669,20 @@ var f1 = (e) => {
|
|
|
5669
5669
|
width: Math.abs(o.x - a.x),
|
|
5670
5670
|
height: Math.abs(o.y - a.y)
|
|
5671
5671
|
};
|
|
5672
|
-
},
|
|
5672
|
+
}, dr = (e, t) => !Number.isFinite(t) || !Number.isFinite(e) ? 0 : Ve(t, Math.min(-e, 0), Math.max(1 - e, 0)), $1 = ({ panelRect: e }) => {
|
|
5673
5673
|
const t = Z((s) => U(s, "arrow-endpoint-drag")), n = Me(e).arrows, a = te();
|
|
5674
5674
|
if (t === null) return null;
|
|
5675
5675
|
const o = n.find((s) => s.id === t.annotationId);
|
|
5676
5676
|
if (o === void 0) return null;
|
|
5677
|
-
const i =
|
|
5678
|
-
arrow:
|
|
5677
|
+
const i = gn(a, o.id), l = ia({
|
|
5678
|
+
arrow: Tn(o, t),
|
|
5679
5679
|
style: i,
|
|
5680
5680
|
panelWidth: e.width,
|
|
5681
5681
|
panelHeight: e.height
|
|
5682
5682
|
});
|
|
5683
5683
|
return l === null ? null : /* @__PURE__ */ r("svg", {
|
|
5684
5684
|
"aria-hidden": "true",
|
|
5685
|
-
className:
|
|
5685
|
+
className: wn,
|
|
5686
5686
|
width: e.width,
|
|
5687
5687
|
height: e.height,
|
|
5688
5688
|
style: {
|
|
@@ -5691,7 +5691,7 @@ var f1 = (e) => {
|
|
|
5691
5691
|
},
|
|
5692
5692
|
"data-testid": "arrow-endpoint-preview",
|
|
5693
5693
|
"data-annotation-id": t.annotationId,
|
|
5694
|
-
children: /* @__PURE__ */ r(
|
|
5694
|
+
children: /* @__PURE__ */ r(Ur, {
|
|
5695
5695
|
computed: l,
|
|
5696
5696
|
style: i,
|
|
5697
5697
|
isAddressable: !1
|
|
@@ -5921,7 +5921,7 @@ var f1 = (e) => {
|
|
|
5921
5921
|
value: Dt.thick,
|
|
5922
5922
|
key: "graph.annotations.arrowToolbar.thickness.thick"
|
|
5923
5923
|
}
|
|
5924
|
-
],
|
|
5924
|
+
], ur = [{
|
|
5925
5925
|
value: "line-arrow",
|
|
5926
5926
|
key: "graph.annotations.arrowToolbar.arrowhead.lineArrow",
|
|
5927
5927
|
Icon: yo
|
|
@@ -5929,7 +5929,7 @@ var f1 = (e) => {
|
|
|
5929
5929
|
value: "none",
|
|
5930
5930
|
key: "graph.annotations.arrowToolbar.arrowhead.none",
|
|
5931
5931
|
Icon: Ti
|
|
5932
|
-
}],
|
|
5932
|
+
}], hr = [
|
|
5933
5933
|
{
|
|
5934
5934
|
value: "solid",
|
|
5935
5935
|
key: "graph.annotations.arrowToolbar.lineStyle.solid",
|
|
@@ -5947,7 +5947,7 @@ var f1 = (e) => {
|
|
|
5947
5947
|
}
|
|
5948
5948
|
], hp = (e, t) => e.find((n) => n.value === t) ?? e[0];
|
|
5949
5949
|
var pp = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o, frameElement: i }) => {
|
|
5950
|
-
const l = M(), { commands: s } = B(), c = _((O) => O.spec.styles.overrides), h = _((O) => Re(O.spec)), d = It(), u =
|
|
5950
|
+
const l = M(), { commands: s } = B(), c = _((O) => O.spec.styles.overrides), h = _((O) => Re(O.spec)), d = It(), u = gn(te(), e.id), p = hp(hr, Wt(u.dashArray)), v = u.outline.strokeWidth > 0 || u.outline.shadow !== "none", m = P(() => ({
|
|
5951
5951
|
target: "annotation",
|
|
5952
5952
|
kind: "arrow",
|
|
5953
5953
|
annotation: e.id
|
|
@@ -6028,7 +6028,7 @@ var pp = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
|
|
|
6028
6028
|
}),
|
|
6029
6029
|
...d.bind("startArrowhead"),
|
|
6030
6030
|
children: /* @__PURE__ */ r(nt, {
|
|
6031
|
-
options:
|
|
6031
|
+
options: ur,
|
|
6032
6032
|
current: e.startArrowheadStyle,
|
|
6033
6033
|
onPick: N
|
|
6034
6034
|
})
|
|
@@ -6041,7 +6041,7 @@ var pp = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
|
|
|
6041
6041
|
}),
|
|
6042
6042
|
...d.bind("lineStyle"),
|
|
6043
6043
|
children: /* @__PURE__ */ r(nt, {
|
|
6044
|
-
options:
|
|
6044
|
+
options: hr,
|
|
6045
6045
|
current: Wt(u.dashArray),
|
|
6046
6046
|
onPick: F
|
|
6047
6047
|
})
|
|
@@ -6054,7 +6054,7 @@ var pp = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
|
|
|
6054
6054
|
}),
|
|
6055
6055
|
...d.bind("endArrowhead"),
|
|
6056
6056
|
children: /* @__PURE__ */ r(nt, {
|
|
6057
|
-
options:
|
|
6057
|
+
options: ur,
|
|
6058
6058
|
current: e.endArrowheadStyle,
|
|
6059
6059
|
onPick: R
|
|
6060
6060
|
})
|
|
@@ -6215,10 +6215,10 @@ var vp = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Je = class {
|
|
|
6215
6215
|
o,
|
|
6216
6216
|
a
|
|
6217
6217
|
]);
|
|
6218
|
-
}, yp = [" ", "Enter"],
|
|
6218
|
+
}, yp = [" ", "Enter"], pr = 4, Sp = ({ annotationId: e, arrow: t, panelRect: n }) => {
|
|
6219
6219
|
const { commands: a } = B(), o = V(), i = _((c) => c.spec.annotations), l = J(i), s = J(a.dispatch);
|
|
6220
6220
|
return z(() => () => {
|
|
6221
|
-
for (const c of vo)
|
|
6221
|
+
for (const c of vo) mr({
|
|
6222
6222
|
editorStore: o,
|
|
6223
6223
|
annotationId: e,
|
|
6224
6224
|
endpoint: c,
|
|
@@ -6236,7 +6236,7 @@ var vp = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Je = class {
|
|
|
6236
6236
|
if (yp.includes(h.key)) {
|
|
6237
6237
|
if (h.preventDefault(), h.repeat) return;
|
|
6238
6238
|
if (u !== null) {
|
|
6239
|
-
|
|
6239
|
+
mr({
|
|
6240
6240
|
editorStore: o,
|
|
6241
6241
|
annotationId: e,
|
|
6242
6242
|
endpoint: c,
|
|
@@ -6276,7 +6276,7 @@ var vp = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Je = class {
|
|
|
6276
6276
|
o,
|
|
6277
6277
|
a
|
|
6278
6278
|
]);
|
|
6279
|
-
},
|
|
6279
|
+
}, mr = ({ editorStore: e, annotationId: t, endpoint: n, annotations: a, dispatch: o }) => {
|
|
6280
6280
|
const i = e.getState(), l = sn(U(i, "arrow-endpoint-drag"), t, n);
|
|
6281
6281
|
if (l === null) return;
|
|
6282
6282
|
i.releaseInteraction("arrow-endpoint-drag");
|
|
@@ -6287,7 +6287,7 @@ var vp = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Je = class {
|
|
|
6287
6287
|
patch: xo(n, l.anchor)
|
|
6288
6288
|
}));
|
|
6289
6289
|
}, Cp = (e, t) => {
|
|
6290
|
-
const n = ce(
|
|
6290
|
+
const n = ce(pr, t.width), a = ce(pr, t.height);
|
|
6291
6291
|
switch (e) {
|
|
6292
6292
|
case "ArrowLeft":
|
|
6293
6293
|
return {
|
|
@@ -6315,7 +6315,7 @@ var vp = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Je = class {
|
|
|
6315
6315
|
}, xp = (e) => {
|
|
6316
6316
|
const t = Ye(), n = Ap(t), a = kp(e.panelRect, t), o = Lp(t);
|
|
6317
6317
|
if (n === null || a === null) return null;
|
|
6318
|
-
const i = o.dragged === null ? a :
|
|
6318
|
+
const i = o.dragged === null ? a : Tn(a, o.dragged);
|
|
6319
6319
|
return /* @__PURE__ */ r(wp, {
|
|
6320
6320
|
arrow: n,
|
|
6321
6321
|
committed: a,
|
|
@@ -6371,7 +6371,7 @@ var vp = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Je = class {
|
|
|
6371
6371
|
}, kp = (e, t) => {
|
|
6372
6372
|
const n = Me(e).arrows;
|
|
6373
6373
|
return t === null ? null : n.find((a) => a.id === t) ?? null;
|
|
6374
|
-
}, Lp = (e) => Z(
|
|
6374
|
+
}, Lp = (e) => Z(be((t) => {
|
|
6375
6375
|
if (e === null) return {
|
|
6376
6376
|
dragged: null,
|
|
6377
6377
|
isMoved: !1
|
|
@@ -6395,7 +6395,7 @@ var Mp = [
|
|
|
6395
6395
|
"absolute-difference",
|
|
6396
6396
|
"relative-difference",
|
|
6397
6397
|
"proportion"
|
|
6398
|
-
],
|
|
6398
|
+
], gr = ["absolute-difference", "relative-difference"], Np = ["relative-difference", "proportion"], Rp = {
|
|
6399
6399
|
"absolute-difference": "graph.annotations.differenceArrowToolbar.labelKind.absoluteDifference",
|
|
6400
6400
|
"relative-difference": "graph.annotations.differenceArrowToolbar.labelKind.relativeDifference",
|
|
6401
6401
|
proportion: "graph.annotations.differenceArrowToolbar.labelKind.proportion"
|
|
@@ -6403,21 +6403,21 @@ var Mp = [
|
|
|
6403
6403
|
const { formattingLocale: t } = B(), n = _((o) => o.config.parsingLocale), a = t ?? n;
|
|
6404
6404
|
return P(() => {
|
|
6405
6405
|
const o = ls(e.start, e.end);
|
|
6406
|
-
return Mp.filter((i) => o || !
|
|
6406
|
+
return Mp.filter((i) => o || !gr.includes(i) || i === e.label).map((i) => ({
|
|
6407
6407
|
kind: i,
|
|
6408
6408
|
key: Rp[i],
|
|
6409
|
-
preview:
|
|
6409
|
+
preview: Ls({
|
|
6410
6410
|
locale: a,
|
|
6411
6411
|
kind: i,
|
|
6412
6412
|
startValue: e.start.measurementValue,
|
|
6413
6413
|
endValue: e.end.measurementValue,
|
|
6414
6414
|
valueFormat: e.start.valueFormat
|
|
6415
6415
|
}),
|
|
6416
|
-
isPickable: o || !
|
|
6416
|
+
isPickable: o || !gr.includes(i),
|
|
6417
6417
|
isSuspect: Np.includes(i) && e.start.measurementValue === 0
|
|
6418
6418
|
}));
|
|
6419
6419
|
}, [e, a]);
|
|
6420
|
-
},
|
|
6420
|
+
}, vr = [
|
|
6421
6421
|
{
|
|
6422
6422
|
id: "small",
|
|
6423
6423
|
key: "graph.annotations.differenceArrowToolbar.size.small"
|
|
@@ -6431,14 +6431,14 @@ var Mp = [
|
|
|
6431
6431
|
key: "graph.annotations.differenceArrowToolbar.size.large"
|
|
6432
6432
|
}
|
|
6433
6433
|
], _p = ({ arrow: e, color: t, labelBox: n, panelRect: a, frameWidth: o, frameHeight: i, frameElement: l }) => {
|
|
6434
|
-
const s = M(), { commands: c } = B(), h = _((y) => y.spec.styles.overrides), d = _((y) => Re(y.spec)), u = It(), p = Dp(e), v =
|
|
6434
|
+
const s = M(), { commands: c } = B(), h = _((y) => y.spec.styles.overrides), d = _((y) => Re(y.spec)), u = It(), p = Dp(e), v = ec(te(), e.id), m = P(() => ({
|
|
6435
6435
|
target: "annotation",
|
|
6436
6436
|
kind: "differenceArrow",
|
|
6437
6437
|
annotation: e.id
|
|
6438
6438
|
}), [e.id]), f = P(() => ({
|
|
6439
6439
|
...m,
|
|
6440
6440
|
part: "label"
|
|
6441
|
-
}), [m]), b = p.find((y) => y.kind === e.label), x = p.some((y) => y.isPickable && y.kind !== e.label), w =
|
|
6441
|
+
}), [m]), b = p.find((y) => y.kind === e.label), x = p.some((y) => y.isPickable && y.kind !== e.label), w = vr.find((y) => zn[y.id].arrow.strokeWidth === v.strokeWidth), C = (y, G) => {
|
|
6442
6442
|
c.dispatch(new ue({
|
|
6443
6443
|
kind: "differenceArrow",
|
|
6444
6444
|
id: e.id,
|
|
@@ -6464,7 +6464,7 @@ var Mp = [
|
|
|
6464
6464
|
start: e.end.anchor,
|
|
6465
6465
|
end: e.start.anchor
|
|
6466
6466
|
}), E = (y) => () => A({ label: y }), O = (y) => () => {
|
|
6467
|
-
const G =
|
|
6467
|
+
const G = zn[y];
|
|
6468
6468
|
c.dispatch(new Pl({
|
|
6469
6469
|
annotationId: e.id,
|
|
6470
6470
|
arrow: S(G.arrow),
|
|
@@ -6515,7 +6515,7 @@ var Mp = [
|
|
|
6515
6515
|
label: s("graph.annotations.differenceArrowToolbar.size.ariaLabel"),
|
|
6516
6516
|
trigger: w === void 0 ? "" : s(w.key),
|
|
6517
6517
|
...u.bind("size"),
|
|
6518
|
-
children:
|
|
6518
|
+
children: vr.map((y) => /* @__PURE__ */ r(D.MenuItem, {
|
|
6519
6519
|
isSelected: y.id === w?.id,
|
|
6520
6520
|
onClick: O(y.id),
|
|
6521
6521
|
children: s(y.key)
|
|
@@ -6570,12 +6570,12 @@ var zp = "ydgo3h0", Bp = "ydgo3h1", Hp = "ydgo3h2", Gp = ({ clientPoint: e, pane
|
|
|
6570
6570
|
coordSystem: i,
|
|
6571
6571
|
align: c
|
|
6572
6572
|
});
|
|
6573
|
-
return p === null ||
|
|
6573
|
+
return p === null || ra(p.anchor, s) ? null : p;
|
|
6574
6574
|
}, Vp = (e, t) => ({
|
|
6575
6575
|
x: Math.max(0, Math.min(e.x, t.width)),
|
|
6576
6576
|
y: Math.max(0, Math.min(e.y, t.height))
|
|
6577
6577
|
}), wo = (e) => e === "start" ? "end" : "start", To = ({ dispatch: e, arrow: t, endpoint: n, anchor: a }) => {
|
|
6578
|
-
|
|
6578
|
+
ra(a, t[n].anchor) || e(new ue({
|
|
6579
6579
|
kind: "differenceArrow",
|
|
6580
6580
|
id: t.id,
|
|
6581
6581
|
patch: { [n]: a }
|
|
@@ -6589,7 +6589,7 @@ var zp = "ydgo3h0", Bp = "ydgo3h1", Hp = "ydgo3h2", Gp = ({ clientPoint: e, pane
|
|
|
6589
6589
|
}
|
|
6590
6590
|
readOwn(e) {
|
|
6591
6591
|
const { endpoint: t, readInputs: n } = this.params;
|
|
6592
|
-
return
|
|
6592
|
+
return Gr(U(e, "difference-arrow-endpoint-drag"), n().arrow.id, t);
|
|
6593
6593
|
}
|
|
6594
6594
|
resolvePreview(e) {
|
|
6595
6595
|
const { endpoint: t, readInputs: n, engine: a, anchorResolver: o } = this.params, { arrow: i, panelOrigin: l, panelRect: s, layers: c, coordSystem: h } = n(), d = Gp({
|
|
@@ -6624,7 +6624,7 @@ var zp = "ydgo3h0", Bp = "ydgo3h1", Hp = "ydgo3h2", Gp = ({ clientPoint: e, pane
|
|
|
6624
6624
|
arrow: e,
|
|
6625
6625
|
panelOrigin: t,
|
|
6626
6626
|
panelRect: n,
|
|
6627
|
-
..._(
|
|
6627
|
+
..._(be((h) => ({
|
|
6628
6628
|
layers: h.layers,
|
|
6629
6629
|
coordSystem: h.coordSystem
|
|
6630
6630
|
})))
|
|
@@ -6662,17 +6662,17 @@ var zp = "ydgo3h0", Bp = "ydgo3h1", Hp = "ydgo3h2", Gp = ({ clientPoint: e, pane
|
|
|
6662
6662
|
a
|
|
6663
6663
|
]);
|
|
6664
6664
|
}, Up = [" ", "Enter"], Kp = ({ arrow: e }) => {
|
|
6665
|
-
const { commands: t, anchorResolver: n } = B(), a = V(), { layers: o, coordSystem: i, mainAxis: l } = _(
|
|
6665
|
+
const { commands: t, anchorResolver: n } = B(), a = V(), { layers: o, coordSystem: i, mainAxis: l } = _(be((c) => ({
|
|
6666
6666
|
layers: c.layers,
|
|
6667
6667
|
coordSystem: c.coordSystem,
|
|
6668
|
-
mainAxis:
|
|
6668
|
+
mainAxis: Ws(c.coordSystem)
|
|
6669
6669
|
}))), s = e.id;
|
|
6670
6670
|
return z(() => () => {
|
|
6671
6671
|
const c = a.getState();
|
|
6672
6672
|
U(c, "difference-arrow-endpoint-drag")?.annotationId === s && c.releaseInteraction("difference-arrow-endpoint-drag");
|
|
6673
6673
|
}, [a, s]), ae((c) => ({ onKeyDown: (h) => {
|
|
6674
6674
|
if (h.altKey || h.ctrlKey || h.metaKey || h.shiftKey) return;
|
|
6675
|
-
const d = a.getState(), u =
|
|
6675
|
+
const d = a.getState(), u = Gr(U(d, "difference-arrow-endpoint-drag"), e.id, c);
|
|
6676
6676
|
if (Up.includes(h.key)) {
|
|
6677
6677
|
if (h.preventDefault(), h.repeat) return;
|
|
6678
6678
|
if (u === null) return d.claimInteraction({
|
|
@@ -6729,7 +6729,7 @@ var zp = "ydgo3h0", Bp = "ydgo3h1", Hp = "ydgo3h2", Gp = ({ clientPoint: e, pane
|
|
|
6729
6729
|
const c = l.createLayerMeasurement(s);
|
|
6730
6730
|
if (c === null) return null;
|
|
6731
6731
|
const { align: h } = e[t].anchor;
|
|
6732
|
-
return
|
|
6732
|
+
return nc({
|
|
6733
6733
|
layer: s,
|
|
6734
6734
|
from: n,
|
|
6735
6735
|
partner: e[wo(t)].anchor,
|
|
@@ -6794,14 +6794,14 @@ var zp = "ydgo3h0", Bp = "ydgo3h1", Hp = "ydgo3h2", Gp = ({ clientPoint: e, pane
|
|
|
6794
6794
|
borderRadius: _i(n, 2)
|
|
6795
6795
|
}
|
|
6796
6796
|
}),
|
|
6797
|
-
/* @__PURE__ */ r(
|
|
6797
|
+
/* @__PURE__ */ r(fr, {
|
|
6798
6798
|
endpoint: "start",
|
|
6799
6799
|
point: i,
|
|
6800
6800
|
panelRect: s,
|
|
6801
6801
|
dragHandlers: p("start"),
|
|
6802
6802
|
keyboardHandlers: v("start")
|
|
6803
6803
|
}),
|
|
6804
|
-
/* @__PURE__ */ r(
|
|
6804
|
+
/* @__PURE__ */ r(fr, {
|
|
6805
6805
|
endpoint: "end",
|
|
6806
6806
|
point: l,
|
|
6807
6807
|
panelRect: s,
|
|
@@ -6810,7 +6810,7 @@ var zp = "ydgo3h0", Bp = "ydgo3h1", Hp = "ydgo3h2", Gp = ({ clientPoint: e, pane
|
|
|
6810
6810
|
})
|
|
6811
6811
|
]
|
|
6812
6812
|
});
|
|
6813
|
-
},
|
|
6813
|
+
}, fr = ({ endpoint: e, point: t, panelRect: n, dragHandlers: a, keyboardHandlers: o }) => /* @__PURE__ */ r("div", {
|
|
6814
6814
|
className: zp,
|
|
6815
6815
|
"data-testid": "difference-arrow-selection-handle",
|
|
6816
6816
|
"data-endpoint": e,
|
|
@@ -6856,7 +6856,7 @@ var Ao = ({ width: e, height: t }) => ({
|
|
|
6856
6856
|
}), Qp = (e, t) => ({
|
|
6857
6857
|
x: Po(t) ? e.x : e.x + e.width,
|
|
6858
6858
|
y: Io(t) ? e.y : e.y + e.height
|
|
6859
|
-
}),
|
|
6859
|
+
}), An = (e) => ({
|
|
6860
6860
|
x: e.x,
|
|
6861
6861
|
y: 1 - e.y - e.height,
|
|
6862
6862
|
width: e.width,
|
|
@@ -6893,7 +6893,7 @@ var e2 = {
|
|
|
6893
6893
|
hovered: "_1ee8fau4 _1ee8fau3",
|
|
6894
6894
|
selected: "_1ee8fau5 _1ee8fau3"
|
|
6895
6895
|
}, n2 = ({ panelRect: e }) => {
|
|
6896
|
-
const t = Me(e), n =
|
|
6896
|
+
const t = Me(e), n = qr(), a = te(), o = Ye(), i = Z((f) => U(f, "move-drag")), l = Z((f) => U(f, "shape-resize-drag")), s = Z((f) => U(f, "arrow-endpoint-drag")), c = Z((f) => U(f, "text-resize-drag")), h = Z(fi), d = P(() => ({
|
|
6897
6897
|
panel: {
|
|
6898
6898
|
width: e.width,
|
|
6899
6899
|
height: e.height
|
|
@@ -6905,14 +6905,14 @@ var e2 = {
|
|
|
6905
6905
|
e.height,
|
|
6906
6906
|
n,
|
|
6907
6907
|
a
|
|
6908
|
-
]), u =
|
|
6908
|
+
]), u = br(t, o, d), p = br(t, h === o ? null : h, d), v = (f) => {
|
|
6909
6909
|
if (l?.annotationId === f.id) {
|
|
6910
6910
|
const b = t.shapes.find((x) => x.id === f.id);
|
|
6911
|
-
return b === void 0 ? f.geometry :
|
|
6911
|
+
return b === void 0 ? f.geometry : $r(An(l.region), a.annotation.shape(b.id).get("strokeWidth"), d.panel);
|
|
6912
6912
|
}
|
|
6913
6913
|
if (s?.annotationId === f.id) {
|
|
6914
6914
|
const b = t.arrows.find((x) => x.id === f.id);
|
|
6915
|
-
return b === void 0 ? f.geometry : rl(
|
|
6915
|
+
return b === void 0 ? f.geometry : rl(Tn(b, s), d.panel) ?? f.geometry;
|
|
6916
6916
|
}
|
|
6917
6917
|
return c?.annotationId === f.id ? Eo(t, f.id, c, d) ?? f.geometry : f.geometry;
|
|
6918
6918
|
}, m = (f) => {
|
|
@@ -6923,34 +6923,34 @@ var e2 = {
|
|
|
6923
6923
|
y: e.y + b.y
|
|
6924
6924
|
};
|
|
6925
6925
|
};
|
|
6926
|
-
return /* @__PURE__ */ g(Q, { children: [p !== null && /* @__PURE__ */ r(
|
|
6926
|
+
return /* @__PURE__ */ g(Q, { children: [p !== null && /* @__PURE__ */ r(yr, {
|
|
6927
6927
|
annotationId: p.id,
|
|
6928
6928
|
geometry: v(p),
|
|
6929
6929
|
state: "hovered",
|
|
6930
6930
|
origin: m(p.id)
|
|
6931
|
-
}), u !== null && /* @__PURE__ */ r(
|
|
6931
|
+
}), u !== null && /* @__PURE__ */ r(yr, {
|
|
6932
6932
|
annotationId: u.id,
|
|
6933
6933
|
geometry: v(u),
|
|
6934
6934
|
state: "selected",
|
|
6935
6935
|
origin: m(u.id)
|
|
6936
6936
|
})] });
|
|
6937
|
-
},
|
|
6937
|
+
}, br = (e, t, n) => {
|
|
6938
6938
|
if (t === null) return null;
|
|
6939
6939
|
const a = Li(e, t, n);
|
|
6940
6940
|
return a === null ? null : {
|
|
6941
6941
|
id: t,
|
|
6942
6942
|
geometry: a
|
|
6943
6943
|
};
|
|
6944
|
-
},
|
|
6944
|
+
}, yr = ({ annotationId: e, geometry: t, state: n, origin: a }) => t.shape === "segment" ? /* @__PURE__ */ g("div", {
|
|
6945
6945
|
"aria-hidden": "true",
|
|
6946
6946
|
"data-testid": "annotation-chrome",
|
|
6947
6947
|
"data-annotation-id": e,
|
|
6948
6948
|
"data-state": n,
|
|
6949
|
-
children: [/* @__PURE__ */ r(
|
|
6949
|
+
children: [/* @__PURE__ */ r(Sr, {
|
|
6950
6950
|
point: t.start,
|
|
6951
6951
|
state: n,
|
|
6952
6952
|
origin: a
|
|
6953
|
-
}), /* @__PURE__ */ r(
|
|
6953
|
+
}), /* @__PURE__ */ r(Sr, {
|
|
6954
6954
|
point: t.end,
|
|
6955
6955
|
state: n,
|
|
6956
6956
|
origin: a
|
|
@@ -6967,7 +6967,7 @@ var e2 = {
|
|
|
6967
6967
|
width: t.rect.width + 4,
|
|
6968
6968
|
height: t.rect.height + 4
|
|
6969
6969
|
}
|
|
6970
|
-
}),
|
|
6970
|
+
}), Sr = ({ point: e, state: t, origin: n }) => /* @__PURE__ */ r("span", {
|
|
6971
6971
|
className: t2[t],
|
|
6972
6972
|
style: {
|
|
6973
6973
|
left: n.x + e.x,
|
|
@@ -6979,7 +6979,7 @@ var e2 = {
|
|
|
6979
6979
|
const a = Co(t.translation, e);
|
|
6980
6980
|
return /* @__PURE__ */ r("svg", {
|
|
6981
6981
|
"aria-hidden": "true",
|
|
6982
|
-
className:
|
|
6982
|
+
className: wn,
|
|
6983
6983
|
width: e.width,
|
|
6984
6984
|
height: e.height,
|
|
6985
6985
|
style: {
|
|
@@ -7025,18 +7025,18 @@ var e2 = {
|
|
|
7025
7025
|
}
|
|
7026
7026
|
return null;
|
|
7027
7027
|
}, l2 = ({ arrow: e, panelSize: t }) => {
|
|
7028
|
-
const n =
|
|
7028
|
+
const n = gn(te(), e.id), a = ia({
|
|
7029
7029
|
arrow: e,
|
|
7030
7030
|
style: n,
|
|
7031
7031
|
panelWidth: t.width,
|
|
7032
7032
|
panelHeight: t.height
|
|
7033
7033
|
});
|
|
7034
|
-
return a === null ? null : /* @__PURE__ */ r(
|
|
7034
|
+
return a === null ? null : /* @__PURE__ */ r(Ur, {
|
|
7035
7035
|
computed: a,
|
|
7036
7036
|
style: n,
|
|
7037
7037
|
isAddressable: !1
|
|
7038
7038
|
});
|
|
7039
|
-
}, s2 = ({ shape: e, panelSize: t }) => /* @__PURE__ */ r(
|
|
7039
|
+
}, s2 = ({ shape: e, panelSize: t }) => /* @__PURE__ */ r(Xr, {
|
|
7040
7040
|
shape: e,
|
|
7041
7041
|
style: te().annotation.shape(e.id).resolve(),
|
|
7042
7042
|
panel: t
|
|
@@ -7050,7 +7050,7 @@ var e2 = {
|
|
|
7050
7050
|
const o = n.find((i) => i.id === t.annotationId);
|
|
7051
7051
|
return o === void 0 ? null : /* @__PURE__ */ r("svg", {
|
|
7052
7052
|
"aria-hidden": "true",
|
|
7053
|
-
className:
|
|
7053
|
+
className: wn,
|
|
7054
7054
|
width: e.width,
|
|
7055
7055
|
height: e.height,
|
|
7056
7056
|
style: {
|
|
@@ -7059,10 +7059,10 @@ var e2 = {
|
|
|
7059
7059
|
},
|
|
7060
7060
|
"data-testid": "shape-resize-preview",
|
|
7061
7061
|
"data-annotation-id": t.annotationId,
|
|
7062
|
-
children: /* @__PURE__ */ r(
|
|
7062
|
+
children: /* @__PURE__ */ r(Xr, {
|
|
7063
7063
|
shape: {
|
|
7064
7064
|
...o,
|
|
7065
|
-
region:
|
|
7065
|
+
region: An(t.region)
|
|
7066
7066
|
},
|
|
7067
7067
|
style: a.annotation.shape(o.id).resolve(),
|
|
7068
7068
|
panel: e
|
|
@@ -7243,13 +7243,13 @@ var e2 = {
|
|
|
7243
7243
|
}));
|
|
7244
7244
|
}, f2 = [" ", "Enter"], No = (e) => {
|
|
7245
7245
|
const t = V(), n = J(e);
|
|
7246
|
-
return z(() => () =>
|
|
7246
|
+
return z(() => () => Cr(t, n.current), [t, n]), ae((a) => ({ onKeyDown: (o) => {
|
|
7247
7247
|
if (o.altKey || o.ctrlKey || o.metaKey || o.shiftKey) return;
|
|
7248
7248
|
const i = t.getState(), l = n.current.readHeld();
|
|
7249
7249
|
if (f2.includes(o.key)) {
|
|
7250
7250
|
if (o.preventDefault(), o.repeat) return;
|
|
7251
7251
|
if (l !== null) {
|
|
7252
|
-
|
|
7252
|
+
Cr(t, n.current);
|
|
7253
7253
|
return;
|
|
7254
7254
|
}
|
|
7255
7255
|
const c = n.current.claim(a);
|
|
@@ -7261,10 +7261,10 @@ var e2 = {
|
|
|
7261
7261
|
const s = n.current.step(l, a, o.key);
|
|
7262
7262
|
s !== null && (o.preventDefault(), i.claimInteraction(s));
|
|
7263
7263
|
} }), [t, n]);
|
|
7264
|
-
},
|
|
7264
|
+
}, Cr = (e, t) => {
|
|
7265
7265
|
const n = t.readHeld();
|
|
7266
7266
|
n !== null && (e.getState().releaseInteraction(n.kind), t.commit(n));
|
|
7267
|
-
},
|
|
7267
|
+
}, xr = 4, b2 = ({ annotationId: e, panelRect: t }) => {
|
|
7268
7268
|
const { commands: n } = B(), a = V(), o = _((i) => i.spec.annotations);
|
|
7269
7269
|
return No({
|
|
7270
7270
|
readHeld: () => un(U(a.getState(), "shape-resize-drag"), e),
|
|
@@ -7299,7 +7299,7 @@ var e2 = {
|
|
|
7299
7299
|
}
|
|
7300
7300
|
});
|
|
7301
7301
|
}, y2 = (e, t) => {
|
|
7302
|
-
const n = ce(
|
|
7302
|
+
const n = ce(xr, t.width), a = ce(xr, t.height);
|
|
7303
7303
|
switch (e) {
|
|
7304
7304
|
case "ArrowLeft":
|
|
7305
7305
|
return {
|
|
@@ -7347,7 +7347,7 @@ var e2 = {
|
|
|
7347
7347
|
}), h = b2({
|
|
7348
7348
|
annotationId: e.id,
|
|
7349
7349
|
panelRect: o
|
|
7350
|
-
}), d = te().annotation.shape(e.id).resolve(), { rect: u } =
|
|
7350
|
+
}), d = te().annotation.shape(e.id).resolve(), { rect: u } = $r(An(t), d.strokeWidth, o);
|
|
7351
7351
|
return /* @__PURE__ */ g("div", {
|
|
7352
7352
|
"data-testid": "shape-selection",
|
|
7353
7353
|
"data-annotation-id": e.id,
|
|
@@ -7380,7 +7380,7 @@ var e2 = {
|
|
|
7380
7380
|
}, w2 = (e) => {
|
|
7381
7381
|
const t = _((n) => n.spec.annotations.shapes);
|
|
7382
7382
|
return e === null ? null : t.find((n) => n.id === e) ?? null;
|
|
7383
|
-
}, T2 = (e) => Z(
|
|
7383
|
+
}, T2 = (e) => Z(be((t) => e === null ? {
|
|
7384
7384
|
resizedRegion: null,
|
|
7385
7385
|
isMoved: !1
|
|
7386
7386
|
} : {
|
|
@@ -7408,15 +7408,15 @@ var pt = "textStyle", Ro = /* @__PURE__ */ new Set(["paragraph", "heading"]), k2
|
|
|
7408
7408
|
fontSize: at(t.map((a) => R2(Ht(a)?.fontSize))),
|
|
7409
7409
|
alignment: at(n.map((a) => D2(a.attrs?.textAlign)))
|
|
7410
7410
|
};
|
|
7411
|
-
}, L2 = (e, t) =>
|
|
7411
|
+
}, L2 = (e, t) => kn(e, (n) => n.type === "text" ? E2(n, t) : n), P2 = (e) => Do(e).length > 0, I2 = (e, t) => kn(e, (n) => Ro.has(n.type ?? "") ? {
|
|
7412
7412
|
...n,
|
|
7413
7413
|
attrs: {
|
|
7414
7414
|
...n.attrs,
|
|
7415
7415
|
textAlign: t
|
|
7416
7416
|
}
|
|
7417
|
-
} : n),
|
|
7417
|
+
} : n), kn = (e, t) => t(e.content === void 0 ? e : {
|
|
7418
7418
|
...e,
|
|
7419
|
-
content: e.content.map((n) =>
|
|
7419
|
+
content: e.content.map((n) => kn(n, t))
|
|
7420
7420
|
}), E2 = (e, t) => {
|
|
7421
7421
|
const n = e.marks ?? [], a = n.find((i) => i.type === pt), o = {
|
|
7422
7422
|
type: pt,
|
|
@@ -7429,7 +7429,7 @@ var pt = "textStyle", Ro = /* @__PURE__ */ new Set(["paragraph", "heading"]), k2
|
|
|
7429
7429
|
...e,
|
|
7430
7430
|
marks: a === void 0 ? [...n, o] : n.map((i) => i === a ? o : i)
|
|
7431
7431
|
};
|
|
7432
|
-
}, Ht = (e) => e.marks?.find((t) => t.type === pt)?.attrs, O2 = (e) =>
|
|
7432
|
+
}, Ht = (e) => e.marks?.find((t) => t.type === pt)?.attrs, O2 = (e) => Dn(e?.font) ?? Dn(e?.fontFamily), Do = (e) => Ln(e, (t) => t.type === "text"), M2 = (e) => Ln(e, (t) => Ro.has(t.type ?? "")), Ln = (e, t) => [...t(e) ? [e] : [], ...(e.content ?? []).flatMap((n) => Ln(n, t))], at = (e) => {
|
|
7433
7433
|
const [t, ...n] = e;
|
|
7434
7434
|
return t === void 0 ? null : n.every((a) => a === t) ? t : null;
|
|
7435
7435
|
}, N2 = (e) => typeof e == "string" && e.length > 0 ? e : void 0, R2 = (e) => typeof e == "number" && Number.isFinite(e) ? e : void 0, D2 = (e) => e === "left" || e === "center" || e === "right" ? e : void 0;
|
|
@@ -7604,7 +7604,7 @@ var Fo = [
|
|
|
7604
7604
|
});
|
|
7605
7605
|
}, G2 = (e) => e === "transparent" ? { fill: Pa } : {
|
|
7606
7606
|
fill: e,
|
|
7607
|
-
fillAlpha:
|
|
7607
|
+
fillAlpha: pd(e) ? Ql : 1
|
|
7608
7608
|
}, V2 = ({ current: e, onPick: t }) => {
|
|
7609
7609
|
const n = M(), a = (o) => () => t(o);
|
|
7610
7610
|
return /* @__PURE__ */ r(Q, { children: B2.map((o) => /* @__PURE__ */ r(D.ToggleButton, {
|
|
@@ -7792,14 +7792,14 @@ var zo = ({ width: e }) => ce(60, e), W2 = (e, t) => ({
|
|
|
7792
7792
|
}, Q2 = (e) => {
|
|
7793
7793
|
const t = _((n) => n.spec.annotations.textAnnotations);
|
|
7794
7794
|
return e === null ? null : t.find((n) => n.id === e) ?? null;
|
|
7795
|
-
}, em = (e) => Z(
|
|
7795
|
+
}, em = (e) => Z(be((t) => e === null ? {
|
|
7796
7796
|
resized: null,
|
|
7797
7797
|
isMoved: !1
|
|
7798
7798
|
} : {
|
|
7799
7799
|
resized: dn(U(t, "text-resize-drag"), e),
|
|
7800
7800
|
isMoved: vt(U(t, "move-drag"), e) !== null
|
|
7801
7801
|
})), tm = (e, t, n) => {
|
|
7802
|
-
const a = Me(e), o =
|
|
7802
|
+
const a = Me(e), o = qr(), i = te(), l = P(() => ({
|
|
7803
7803
|
panel: {
|
|
7804
7804
|
width: e.width,
|
|
7805
7805
|
height: e.height
|
|
@@ -7917,7 +7917,7 @@ var om = "_1tyillx1", im = {
|
|
|
7917
7917
|
const n = t.legends[e.part.legendIndex], a = n?.items[e.part.itemIndex];
|
|
7918
7918
|
if (n === void 0 || a === void 0) return null;
|
|
7919
7919
|
const o = vm(n, a.layerId, t.layers);
|
|
7920
|
-
return o === null ? null :
|
|
7920
|
+
return o === null ? null : oa({
|
|
7921
7921
|
layer: o.layer,
|
|
7922
7922
|
scope: "series",
|
|
7923
7923
|
variable: o.variable,
|
|
@@ -7957,9 +7957,9 @@ var om = "_1tyillx1", im = {
|
|
|
7957
7957
|
let a = null;
|
|
7958
7958
|
for (const o of e) {
|
|
7959
7959
|
if (!o.interactive) continue;
|
|
7960
|
-
const i =
|
|
7960
|
+
const i = js(o.mapping);
|
|
7961
7961
|
if (i === null) continue;
|
|
7962
|
-
const l =
|
|
7962
|
+
const l = oa({
|
|
7963
7963
|
layer: o,
|
|
7964
7964
|
scope: "x-value",
|
|
7965
7965
|
variable: i,
|
|
@@ -7975,9 +7975,9 @@ var om = "_1tyillx1", im = {
|
|
|
7975
7975
|
}, Sm = ({ hover: e, layers: t, scales: n, parsingLocale: a }) => {
|
|
7976
7976
|
const { primary: o, intersection: i } = e;
|
|
7977
7977
|
if (o === null) return null;
|
|
7978
|
-
const l =
|
|
7978
|
+
const l = ve(t, o.layerId);
|
|
7979
7979
|
if (l === void 0) return null;
|
|
7980
|
-
const s = pa(o), c = i?.intersects !== !1, h =
|
|
7980
|
+
const s = pa(o), c = i?.intersects !== !1, h = zs(l), d = c || !Os(n) ? [h] : ["x-value", h];
|
|
7981
7981
|
for (const u of d) {
|
|
7982
7982
|
const p = St({
|
|
7983
7983
|
layer: l,
|
|
@@ -7995,7 +7995,7 @@ var om = "_1tyillx1", im = {
|
|
|
7995
7995
|
return null;
|
|
7996
7996
|
}, Cm = (e, t, n) => {
|
|
7997
7997
|
if (!e.isOnObservation || e.target.scope !== "series") return null;
|
|
7998
|
-
const a =
|
|
7998
|
+
const a = ve(t, e.layerId);
|
|
7999
7999
|
return a === void 0 ? null : St({
|
|
8000
8000
|
layer: a,
|
|
8001
8001
|
observationIndex: e.observationIndex,
|
|
@@ -8003,14 +8003,14 @@ var om = "_1tyillx1", im = {
|
|
|
8003
8003
|
parsingLocale: n
|
|
8004
8004
|
});
|
|
8005
8005
|
}, Vo = (e, t) => {
|
|
8006
|
-
const { target: n, clientX: a, clientY: o } = e, { frameElement: i, captureRect: l, menuTrigger: s, panelOrigin: c, resolvesObservations: h, scene: d } = t, u = s !== null &&
|
|
8006
|
+
const { target: n, clientX: a, clientY: o } = e, { frameElement: i, captureRect: l, menuTrigger: s, panelOrigin: c, resolvesObservations: h, scene: d } = t, u = s !== null && mn({
|
|
8007
8007
|
x: a - c.x,
|
|
8008
8008
|
y: o - c.y
|
|
8009
8009
|
}, s);
|
|
8010
8010
|
if (!(n instanceof Element && i.contains(n))) return {
|
|
8011
|
-
targetAtPoint:
|
|
8011
|
+
targetAtPoint: Rn({
|
|
8012
8012
|
isMenuTrigger: u,
|
|
8013
|
-
stamped:
|
|
8013
|
+
stamped: wr(!1, !1, e, t),
|
|
8014
8014
|
observations: null
|
|
8015
8015
|
}),
|
|
8016
8016
|
hover: null
|
|
@@ -8020,9 +8020,9 @@ var om = "_1tyillx1", im = {
|
|
|
8020
8020
|
layers: d.layers,
|
|
8021
8021
|
scales: d.scales,
|
|
8022
8022
|
parsingLocale: d.config.parsingLocale
|
|
8023
|
-
}), b =
|
|
8023
|
+
}), b = Rn({
|
|
8024
8024
|
isMenuTrigger: u,
|
|
8025
|
-
stamped:
|
|
8025
|
+
stamped: wr(p, f !== null, e, t),
|
|
8026
8026
|
observations: f
|
|
8027
8027
|
});
|
|
8028
8028
|
return {
|
|
@@ -8032,7 +8032,7 @@ var om = "_1tyillx1", im = {
|
|
|
8032
8032
|
}, xm = (e) => {
|
|
8033
8033
|
const t = e.getBoundingClientRect();
|
|
8034
8034
|
return t.width > 0 && t.height > 0 ? t : null;
|
|
8035
|
-
},
|
|
8035
|
+
}, wr = (e, t, n, { paintsAnnotations: a, resolvesGuides: o, frameElement: i, scene: l }) => {
|
|
8036
8036
|
if (!a && l.coordSystem.type === "cartesian" && e && t) return null;
|
|
8037
8037
|
const s = e || a ? Go(n.clientX, n.clientY, i) : wm(n.target, i);
|
|
8038
8038
|
return s === null ? null : (s.kind === "annotation" ? a : o) ? s : null;
|
|
@@ -8103,7 +8103,7 @@ var om = "_1tyillx1", im = {
|
|
|
8103
8103
|
panelRect: n
|
|
8104
8104
|
}), v = J(t), m = J(o), f = ne(null);
|
|
8105
8105
|
z(() => () => f.current?.finish(!1), []), z(() => l.subscribe(({ selection: b }) => {
|
|
8106
|
-
const x = c.getState().pressedObservation, [w, ...C] = b, S = w !== void 0 && C.length === 0 && x !== null &&
|
|
8106
|
+
const x = c.getState().pressedObservation, [w, ...C] = b, S = w !== void 0 && C.length === 0 && x !== null && aa(w, x.selectedFor);
|
|
8107
8107
|
x !== null && !S && c.getState().setPressedObservation(null);
|
|
8108
8108
|
}), [c, l]), z(() => {
|
|
8109
8109
|
const b = (A) => Vo({
|
|
@@ -8112,7 +8112,7 @@ var om = "_1tyillx1", im = {
|
|
|
8112
8112
|
clientY: A.clientY
|
|
8113
8113
|
}, a()).targetAtPoint, x = (A) => {
|
|
8114
8114
|
if (!(A.target instanceof Element)) return !1;
|
|
8115
|
-
const N = A.target.closest(
|
|
8115
|
+
const N = A.target.closest(Hr);
|
|
8116
8116
|
return N !== null && e.contains(N) && bt([A.target], e) === null;
|
|
8117
8117
|
}, w = (A, N) => {
|
|
8118
8118
|
if (f.current !== null || !Qi(p.current.annotations, N.id)) return;
|
|
@@ -8306,10 +8306,10 @@ var om = "_1tyillx1", im = {
|
|
|
8306
8306
|
a
|
|
8307
8307
|
]);
|
|
8308
8308
|
}, Mm = () => {
|
|
8309
|
-
const e = Ne[Le()].observationMenu, t = Ui((l) => e ? l.hover.primary : null), { layers: n, coordSystem: a } = _(
|
|
8309
|
+
const e = Ne[Le()].observationMenu, t = Ui((l) => e ? l.hover.primary : null), { layers: n, coordSystem: a } = _(be((l) => ({
|
|
8310
8310
|
layers: l.layers,
|
|
8311
8311
|
coordSystem: l.coordSystem
|
|
8312
|
-
}))), { anchorResolver: o } = B(), i =
|
|
8312
|
+
}))), { anchorResolver: o } = B(), i = Kr();
|
|
8313
8313
|
return P(() => {
|
|
8314
8314
|
if (t === null) return null;
|
|
8315
8315
|
const l = n.find((h) => h.id === t.layerId);
|
|
@@ -8323,7 +8323,7 @@ var om = "_1tyillx1", im = {
|
|
|
8323
8323
|
const c = gs(l)(t.observation);
|
|
8324
8324
|
return c === null ? null : {
|
|
8325
8325
|
position: s,
|
|
8326
|
-
color:
|
|
8326
|
+
color: Vs({ geom: i }, l, t.observation) ?? dl,
|
|
8327
8327
|
layer: l,
|
|
8328
8328
|
at: c,
|
|
8329
8329
|
observation: t.observation
|
|
@@ -8397,7 +8397,7 @@ var om = "_1tyillx1", im = {
|
|
|
8397
8397
|
if (c = null, h === null) return;
|
|
8398
8398
|
const S = a.getState();
|
|
8399
8399
|
if (ot(S.standingInteraction)) {
|
|
8400
|
-
const N = S.menuTrigger !== null &&
|
|
8400
|
+
const N = S.menuTrigger !== null && mn({
|
|
8401
8401
|
x: h.clientX - l.current.x,
|
|
8402
8402
|
y: h.clientY - l.current.y
|
|
8403
8403
|
}, S.menuTrigger), F = S.editTargetUnderPointer;
|
|
@@ -8454,9 +8454,9 @@ var om = "_1tyillx1", im = {
|
|
|
8454
8454
|
case "chrome-popup":
|
|
8455
8455
|
return !1;
|
|
8456
8456
|
}
|
|
8457
|
-
},
|
|
8458
|
-
const i = $o(), { store: l } = Xe(), s = hn().length > 0, c = Ne[Le()].holdsHoverWhileSelected, h = Z((m) => m.menuTrigger), d = i.kind === "menu", u = P(() => h === null ?
|
|
8459
|
-
_m(e, t, p), Pm(e, t, n, p, o), Dm(i, t, n), mm(e), Im(e), hm(e, a), z(() => (l.getState().publishPointerRegions(
|
|
8457
|
+
}, Tr = "editor", Ar = [], zm = (e, t, n, a, o) => {
|
|
8458
|
+
const i = $o(), { store: l } = Xe(), s = hn().length > 0, c = Ne[Le()].holdsHoverWhileSelected, h = Z((m) => m.menuTrigger), d = i.kind === "menu", u = P(() => h === null ? Ar : [ss(h)], [h]), p = Om(e, t);
|
|
8459
|
+
_m(e, t, p), Pm(e, t, n, p, o), Dm(i, t, n), mm(e), Im(e), hm(e, a), z(() => (l.getState().publishPointerRegions(Tr, u), () => l.getState().publishPointerRegions(Tr, Ar)), [l, u]);
|
|
8460
8460
|
const v = d || s && c;
|
|
8461
8461
|
z(() => (l.getState().setPointerSuspended(v), () => l.getState().setPointerSuspended(!1)), [l, v]), z(() => {
|
|
8462
8462
|
if (!s || !c) return;
|
|
@@ -8481,7 +8481,7 @@ var om = "_1tyillx1", im = {
|
|
|
8481
8481
|
h,
|
|
8482
8482
|
s,
|
|
8483
8483
|
l
|
|
8484
|
-
]), i === null ? null : /* @__PURE__ */ g(
|
|
8484
|
+
]), i === null ? null : /* @__PURE__ */ g(Ah, { children: [c !== null && /* @__PURE__ */ r(Hm, {
|
|
8485
8485
|
annotationId: c,
|
|
8486
8486
|
panelRect: t
|
|
8487
8487
|
}), /* @__PURE__ */ r(Gm, {
|
|
@@ -8523,7 +8523,7 @@ var om = "_1tyillx1", im = {
|
|
|
8523
8523
|
width: t.width,
|
|
8524
8524
|
height: t.height
|
|
8525
8525
|
}), [t.width, t.height]);
|
|
8526
|
-
return /* @__PURE__ */ g(Q, { children: [h && /* @__PURE__ */ g(Q, { children: [/* @__PURE__ */ r(
|
|
8526
|
+
return /* @__PURE__ */ g(Q, { children: [h && /* @__PURE__ */ g(Q, { children: [/* @__PURE__ */ r(dh, {
|
|
8527
8527
|
frameElement: e,
|
|
8528
8528
|
frameSize: u,
|
|
8529
8529
|
panelRect: a,
|
|
@@ -8574,10 +8574,10 @@ var om = "_1tyillx1", im = {
|
|
|
8574
8574
|
d && /* @__PURE__ */ r(n1, { frameElement: e })
|
|
8575
8575
|
] })
|
|
8576
8576
|
})] });
|
|
8577
|
-
}, bv = ({ slots: e, mode: t, ...n }) => /* @__PURE__ */ r(
|
|
8578
|
-
locale:
|
|
8577
|
+
}, bv = ({ slots: e, mode: t, ...n }) => /* @__PURE__ */ r(Wc, {
|
|
8578
|
+
locale: Zr(),
|
|
8579
8579
|
children: /* @__PURE__ */ r(bi, { children: /* @__PURE__ */ r(Ai, {
|
|
8580
|
-
editors:
|
|
8580
|
+
editors: Tu,
|
|
8581
8581
|
children: /* @__PURE__ */ r($i, {
|
|
8582
8582
|
slots: P(() => ({
|
|
8583
8583
|
EditorSurface: Bm,
|
|
@@ -8611,12 +8611,12 @@ var $m = {
|
|
|
8611
8611
|
children: e
|
|
8612
8612
|
})]
|
|
8613
8613
|
});
|
|
8614
|
-
},
|
|
8615
|
-
const e = Se(
|
|
8614
|
+
}, Pn = De(null), $ = () => {
|
|
8615
|
+
const e = Se(Pn);
|
|
8616
8616
|
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>.");
|
|
8617
8617
|
return e;
|
|
8618
8618
|
}, Wo = ({ children: e, onKeyDown: t, ...n }) => {
|
|
8619
|
-
const a = Se(
|
|
8619
|
+
const a = Se(Pn);
|
|
8620
8620
|
return /* @__PURE__ */ r("div", {
|
|
8621
8621
|
onKeyDown: (i) => {
|
|
8622
8622
|
if (t?.(i), !a || i.defaultPrevented) return;
|
|
@@ -8633,7 +8633,7 @@ var Xm = ({ value: e, onChange: t, onCommit: n, min: a, max: o, step: i, placeho
|
|
|
8633
8633
|
ariaLabel: u,
|
|
8634
8634
|
ariaLabelledBy: p
|
|
8635
8635
|
}), { commitUnlessHeldKey: f, gestureHandlers: b } = Lt(n);
|
|
8636
|
-
return /* @__PURE__ */ r(
|
|
8636
|
+
return /* @__PURE__ */ r(Wn.Root, {
|
|
8637
8637
|
className: Um,
|
|
8638
8638
|
value: e,
|
|
8639
8639
|
onValueChange: (x) => t(x),
|
|
@@ -8653,7 +8653,7 @@ var Xm = ({ value: e, onChange: t, onCommit: n, min: a, max: o, step: i, placeho
|
|
|
8653
8653
|
className: "eh8dvc3",
|
|
8654
8654
|
children: s
|
|
8655
8655
|
}),
|
|
8656
|
-
/* @__PURE__ */ r(
|
|
8656
|
+
/* @__PURE__ */ r(Wn.Input, {
|
|
8657
8657
|
className: qm,
|
|
8658
8658
|
placeholder: l,
|
|
8659
8659
|
...b,
|
|
@@ -8716,7 +8716,7 @@ var Ym = 6, Jm = ({ options: e, value: t, onChange: n, onCommit: a, columns: o,
|
|
|
8716
8716
|
default:
|
|
8717
8717
|
return Be[6];
|
|
8718
8718
|
}
|
|
8719
|
-
}, eg = "_1g5x15w0 uz3g760", tg = "_1g5x15w1", ng = "_1g5x15w2",
|
|
8719
|
+
}, eg = "_1g5x15w0 uz3g760", tg = "_1g5x15w1", ng = "_1g5x15w2", kr = "_1g5x15w3", rg = "_1g5x15w4", ag = "_1g5x15w5", og = "_1g5x15w6", ig = "_1g5x15w7";
|
|
8720
8720
|
var lg = ({ options: e, value: t, onChange: n, placeholder: a, isDisabled: o, hasError: i, ariaLabel: l, ariaLabelledBy: s, id: c }) => {
|
|
8721
8721
|
const h = Pe({
|
|
8722
8722
|
id: c,
|
|
@@ -8739,7 +8739,7 @@ var lg = ({ options: e, value: t, onChange: n, placeholder: a, isDisabled: o, ha
|
|
|
8739
8739
|
className: tg,
|
|
8740
8740
|
children: (d) => sg(e, d, a)
|
|
8741
8741
|
}), /* @__PURE__ */ r(pe.Icon, {
|
|
8742
|
-
className:
|
|
8742
|
+
className: kr,
|
|
8743
8743
|
children: /* @__PURE__ */ r(je, { size: "sm" })
|
|
8744
8744
|
})]
|
|
8745
8745
|
}), /* @__PURE__ */ r(pe.Portal, {
|
|
@@ -8764,7 +8764,7 @@ var lg = ({ options: e, value: t, onChange: n, placeholder: a, isDisabled: o, ha
|
|
|
8764
8764
|
})]
|
|
8765
8765
|
}),
|
|
8766
8766
|
/* @__PURE__ */ r(pe.ItemIndicator, {
|
|
8767
|
-
className:
|
|
8767
|
+
className: kr,
|
|
8768
8768
|
children: /* @__PURE__ */ r(Fa, { size: "sm" })
|
|
8769
8769
|
})
|
|
8770
8770
|
]
|
|
@@ -8817,13 +8817,13 @@ var vg = ({ value: e, onChange: t, onCommit: n, min: a, max: o, step: i, suffix:
|
|
|
8817
8817
|
ariaLabel: a,
|
|
8818
8818
|
ariaLabelledBy: o
|
|
8819
8819
|
});
|
|
8820
|
-
return /* @__PURE__ */ r(
|
|
8820
|
+
return /* @__PURE__ */ r(Un.Root, {
|
|
8821
8821
|
checked: e,
|
|
8822
8822
|
onCheckedChange: (s) => t(s),
|
|
8823
8823
|
disabled: n,
|
|
8824
8824
|
className: bg,
|
|
8825
8825
|
...l,
|
|
8826
|
-
children: /* @__PURE__ */ r(
|
|
8826
|
+
children: /* @__PURE__ */ r(Un.Thumb, { className: yg })
|
|
8827
8827
|
});
|
|
8828
8828
|
}, Cg = "uz3g761", xg = "tpcnun0 uz3g760", wg = ({ value: e, onChange: t, onCommit: n, placeholder: a, isDisabled: o, hasError: i, ariaLabel: l, ariaLabelledBy: s, id: c }) => {
|
|
8829
8829
|
const h = Pe({
|
|
@@ -8834,7 +8834,7 @@ var vg = ({ value: e, onChange: t, onCommit: n, min: a, max: o, step: i, suffix:
|
|
|
8834
8834
|
return /* @__PURE__ */ r(Wo, {
|
|
8835
8835
|
className: xg,
|
|
8836
8836
|
"data-error": i === !0,
|
|
8837
|
-
children: /* @__PURE__ */ r(
|
|
8837
|
+
children: /* @__PURE__ */ r(kc, {
|
|
8838
8838
|
className: Cg,
|
|
8839
8839
|
value: e,
|
|
8840
8840
|
onValueChange: (d) => t(d),
|
|
@@ -8903,7 +8903,7 @@ var Rg = ({ handle: e, children: t, controls: n, defaultExpandedSection: a = voi
|
|
|
8903
8903
|
expandSection: (u) => h([u]),
|
|
8904
8904
|
collapseAllSections: () => h([])
|
|
8905
8905
|
}), []);
|
|
8906
|
-
return /* @__PURE__ */ r(
|
|
8906
|
+
return /* @__PURE__ */ r(Pn.Provider, {
|
|
8907
8907
|
value: i,
|
|
8908
8908
|
children: /* @__PURE__ */ r(Ag, {
|
|
8909
8909
|
controls: n,
|
|
@@ -8923,22 +8923,22 @@ var Rg = ({ handle: e, children: t, controls: n, defaultExpandedSection: a = voi
|
|
|
8923
8923
|
}, qo = {
|
|
8924
8924
|
Root: Rg,
|
|
8925
8925
|
Controls: Mg
|
|
8926
|
-
},
|
|
8926
|
+
}, Lr = {
|
|
8927
8927
|
stack: "pr583x0",
|
|
8928
8928
|
grid: "pr583x1"
|
|
8929
|
-
},
|
|
8929
|
+
}, Pr = "pr583x2", Dg = {
|
|
8930
8930
|
plain: "pr583x4 pr583x3",
|
|
8931
8931
|
withIcon: "pr583x5 pr583x3"
|
|
8932
8932
|
}, T = ({ label: e, layout: t = "grid", icon: n, children: a }) => {
|
|
8933
8933
|
const o = ke(), i = ke();
|
|
8934
8934
|
return e === void 0 ? /* @__PURE__ */ r(Yt, {
|
|
8935
|
-
className:
|
|
8935
|
+
className: Lr[t],
|
|
8936
8936
|
children: /* @__PURE__ */ r("div", {
|
|
8937
|
-
className:
|
|
8937
|
+
className: Pr,
|
|
8938
8938
|
children: a
|
|
8939
8939
|
})
|
|
8940
8940
|
}) : /* @__PURE__ */ g(Yt, {
|
|
8941
|
-
className:
|
|
8941
|
+
className: Lr[t],
|
|
8942
8942
|
children: [/* @__PURE__ */ g("label", {
|
|
8943
8943
|
id: o,
|
|
8944
8944
|
htmlFor: i,
|
|
@@ -8948,7 +8948,7 @@ var Rg = ({ handle: e, children: t, controls: n, defaultExpandedSection: a = voi
|
|
|
8948
8948
|
children: n
|
|
8949
8949
|
}), e]
|
|
8950
8950
|
}), /* @__PURE__ */ r("div", {
|
|
8951
|
-
className:
|
|
8951
|
+
className: Pr,
|
|
8952
8952
|
children: /* @__PURE__ */ r(to, {
|
|
8953
8953
|
labelId: o,
|
|
8954
8954
|
controlId: i,
|
|
@@ -8956,7 +8956,7 @@ var Rg = ({ handle: e, children: t, controls: n, defaultExpandedSection: a = voi
|
|
|
8956
8956
|
})
|
|
8957
8957
|
})]
|
|
8958
8958
|
});
|
|
8959
|
-
}, _g = "_2m7wuq0", yv = () => /* @__PURE__ */ r(
|
|
8959
|
+
}, _g = "_2m7wuq0", yv = () => /* @__PURE__ */ r(Lc, { className: _g }), Fg = (e) => /* @__PURE__ */ r(k, {
|
|
8960
8960
|
...e,
|
|
8961
8961
|
children: /* @__PURE__ */ r("g", {
|
|
8962
8962
|
stroke: "currentColor",
|
|
@@ -8965,7 +8965,7 @@ var Rg = ({ handle: e, children: t, controls: n, defaultExpandedSection: a = voi
|
|
|
8965
8965
|
strokeLinejoin: "round",
|
|
8966
8966
|
children: /* @__PURE__ */ r("path", { d: "m9 6 6 6-6 6" })
|
|
8967
8967
|
})
|
|
8968
|
-
}),
|
|
8968
|
+
}), In = "_40zvwv0", En = "_40zvwv1", zg = "_40zvwv2", Xo = "_40zvwv3", Bg = "_40zvwv4 _40zvwv3";
|
|
8969
8969
|
var Hg = "_40zvwv6";
|
|
8970
8970
|
var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory: a, onOpenChange: o, children: i }) => t === "collapsible" ? /* @__PURE__ */ r($g, {
|
|
8971
8971
|
title: e,
|
|
@@ -8978,9 +8978,9 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
8978
8978
|
accessory: a,
|
|
8979
8979
|
children: i
|
|
8980
8980
|
}) : /* @__PURE__ */ g("div", {
|
|
8981
|
-
className:
|
|
8981
|
+
className: In,
|
|
8982
8982
|
children: [/* @__PURE__ */ g("div", {
|
|
8983
|
-
className:
|
|
8983
|
+
className: En,
|
|
8984
8984
|
children: [
|
|
8985
8985
|
/* @__PURE__ */ r("span", {
|
|
8986
8986
|
className: Xo,
|
|
@@ -8999,9 +8999,9 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
8999
8999
|
}), Vg = ({ title: e, accessory: t, children: n }) => {
|
|
9000
9000
|
const a = ke(), o = ke();
|
|
9001
9001
|
return /* @__PURE__ */ r("div", {
|
|
9002
|
-
className:
|
|
9002
|
+
className: In,
|
|
9003
9003
|
children: /* @__PURE__ */ g("div", {
|
|
9004
|
-
className:
|
|
9004
|
+
className: En,
|
|
9005
9005
|
children: [
|
|
9006
9006
|
/* @__PURE__ */ r("label", {
|
|
9007
9007
|
id: a,
|
|
@@ -9028,10 +9028,10 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9028
9028
|
const i = M();
|
|
9029
9029
|
return /* @__PURE__ */ g(Ue.Item, {
|
|
9030
9030
|
value: e,
|
|
9031
|
-
className:
|
|
9031
|
+
className: In,
|
|
9032
9032
|
onOpenChange: a,
|
|
9033
9033
|
children: [/* @__PURE__ */ g(Ue.Header, {
|
|
9034
|
-
className:
|
|
9034
|
+
className: En,
|
|
9035
9035
|
render: /* @__PURE__ */ r("div", {}),
|
|
9036
9036
|
children: [
|
|
9037
9037
|
/* @__PURE__ */ r(Ue.Trigger, {
|
|
@@ -9087,15 +9087,15 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9087
9087
|
}, qg = {
|
|
9088
9088
|
x: "editor.axesPanel.mainAxisSection.xAxis",
|
|
9089
9089
|
y: "editor.axesPanel.mainAxisSection.yAxis"
|
|
9090
|
-
},
|
|
9090
|
+
}, Ir = ({ axis: e, title: t, layout: n = "collapsible", preview: a }) => {
|
|
9091
9091
|
const o = $(), i = K(o), l = M(), { NumberField: s, Switch: c, TextField: h, ToggleGroup: d } = W();
|
|
9092
9092
|
if (!i) return null;
|
|
9093
9093
|
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;
|
|
9094
9094
|
if (u === "circular" || u === "radial" && f === void 0) return null;
|
|
9095
|
-
const b = m !== void 0 && "reverse" in m ? m : void 0, x = m?.scaleType === "continuous" || m?.scaleType === "datetime", w = f !== void 0 &&
|
|
9095
|
+
const b = m !== void 0 && "reverse" in m ? m : void 0, x = m?.scaleType === "continuous" || m?.scaleType === "datetime", w = f !== void 0 && Fs(i, e), C = f?.transform === "log", S = f?.domainMax ?? null, L = Xg(f), A = (I, he) => I.map((Qe) => ({
|
|
9096
9096
|
value: Qe,
|
|
9097
9097
|
label: he(Qe)
|
|
9098
|
-
})), N = i.guides.axes.find((I) => I.scaleAestheticKey === e)?.position, F = Ug[N === "bottom" || N === "top" || N === void 0 && e === "x" ? "horizontal" : "vertical"], R = e === "y" ?
|
|
9098
|
+
})), N = i.guides.axes.find((I) => I.scaleAestheticKey === e)?.position, F = Ug[N === "bottom" || N === "top" || N === void 0 && e === "x" ? "horizontal" : "vertical"], R = e === "y" ? Bs(i.spec) : null, E = R === null ? void 0 : ve(i.spec.layers, R), O = i.guides.legends.drawn.some((I) => F.some((he) => he === I.position)), y = F.map((I) => ({
|
|
9099
9099
|
value: I,
|
|
9100
9100
|
label: l(Kg[I])
|
|
9101
9101
|
})), G = A(["auto", "edges"], (I) => l(I === "edges" ? "editor.axesPanel.labelMode.edges" : "editor.axesPanel.labelMode.auto")), re = A(["linear", "log"], (I) => l(I === "log" ? "editor.axesPanel.scale.log" : "editor.axesPanel.scale.auto")), xe = A([
|
|
@@ -9132,23 +9132,23 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9132
9132
|
scaledAesthetic: e,
|
|
9133
9133
|
transform: I === "log" ? "log" : "linear"
|
|
9134
9134
|
}));
|
|
9135
|
-
},
|
|
9135
|
+
}, Nn = (I) => {
|
|
9136
9136
|
o.commands.dispatch(new _t({
|
|
9137
9137
|
scaledAesthetic: e,
|
|
9138
9138
|
...I
|
|
9139
9139
|
}), { transient: !0 });
|
|
9140
9140
|
}, ii = (I) => {
|
|
9141
|
-
I !== null &&
|
|
9141
|
+
I !== null && Nn({ domainMin: I });
|
|
9142
9142
|
}, li = (I) => {
|
|
9143
|
-
I !== null &&
|
|
9143
|
+
I !== null && Nn({ domainMax: I });
|
|
9144
9144
|
}, si = (I) => {
|
|
9145
|
-
const he = I === "auto" ? null : I === "zero" ? 0 :
|
|
9145
|
+
const he = I === "auto" ? null : I === "zero" ? 0 : Er(v?.domain, "start");
|
|
9146
9146
|
o.commands.dispatch(new _t({
|
|
9147
9147
|
scaledAesthetic: e,
|
|
9148
9148
|
domainMin: he
|
|
9149
9149
|
}));
|
|
9150
9150
|
}, ci = (I) => {
|
|
9151
|
-
const he = I === "custom" ?
|
|
9151
|
+
const he = I === "custom" ? Er(v?.domain, "end") : null;
|
|
9152
9152
|
o.commands.dispatch(new _t({
|
|
9153
9153
|
scaledAesthetic: e,
|
|
9154
9154
|
domainMax: he
|
|
@@ -9269,10 +9269,10 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9269
9269
|
}, Xg = (e) => {
|
|
9270
9270
|
const t = e?.domainMin ?? null;
|
|
9271
9271
|
return t === null ? "auto" : t === 0 ? "zero" : "custom";
|
|
9272
|
-
},
|
|
9272
|
+
}, Er = (e, t) => {
|
|
9273
9273
|
const n = t === "start" ? e?.[0] : e?.[e.length - 1];
|
|
9274
9274
|
return typeof n == "number" ? n : 0;
|
|
9275
|
-
},
|
|
9275
|
+
}, On = ({ value: e, onChange: t }) => {
|
|
9276
9276
|
const n = $(), a = M(), { TextField: o } = W(), i = e !== null && typeof e != "string", l = (s) => t(s === "" ? null : s);
|
|
9277
9277
|
return /* @__PURE__ */ r(T, {
|
|
9278
9278
|
label: a("editor.elementsPanel.contentValue"),
|
|
@@ -9292,7 +9292,7 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9292
9292
|
isVisible: d
|
|
9293
9293
|
}));
|
|
9294
9294
|
}, h = (d) => {
|
|
9295
|
-
a.commands.dispatch(new
|
|
9295
|
+
a.commands.dispatch(new ea({ caption: d }), { transient: !0 });
|
|
9296
9296
|
};
|
|
9297
9297
|
return /* @__PURE__ */ r(q, {
|
|
9298
9298
|
title: e ?? i("editor.elementsPanel.footerSection.caption"),
|
|
@@ -9304,12 +9304,12 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9304
9304
|
isChecked: s.isCaptionVisible,
|
|
9305
9305
|
onChange: c
|
|
9306
9306
|
})
|
|
9307
|
-
}), /* @__PURE__ */ r(
|
|
9307
|
+
}), /* @__PURE__ */ r(On, {
|
|
9308
9308
|
value: s.caption,
|
|
9309
9309
|
onChange: h
|
|
9310
9310
|
})] })
|
|
9311
9311
|
});
|
|
9312
|
-
},
|
|
9312
|
+
}, Or = /^[a-z][a-z\d+.-]*:/i, jg = {}, Yg = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
9313
9313
|
const a = $(), o = K(a), i = M(), { Switch: l } = W();
|
|
9314
9314
|
if (!o) return null;
|
|
9315
9315
|
const s = o.config.content, c = (h) => {
|
|
@@ -9336,7 +9336,7 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9336
9336
|
t.commands.dispatch(new kl({ source: h ? c : null }), { transient: !0 });
|
|
9337
9337
|
}, i = () => {
|
|
9338
9338
|
const c = e.url ?? "";
|
|
9339
|
-
c !== "" && !
|
|
9339
|
+
c !== "" && !Or.test(c) && o({
|
|
9340
9340
|
...e,
|
|
9341
9341
|
url: `https://${c}`
|
|
9342
9342
|
}), t.commands.commit();
|
|
@@ -9353,7 +9353,7 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9353
9353
|
value: e.url ?? "",
|
|
9354
9354
|
onChange: l,
|
|
9355
9355
|
onCommit: i,
|
|
9356
|
-
hasError:
|
|
9356
|
+
hasError: Or.test(e.url ?? "") && !_s(e.url)
|
|
9357
9357
|
})
|
|
9358
9358
|
}), /* @__PURE__ */ r(T, {
|
|
9359
9359
|
label: n("editor.elementsPanel.sourceSection.name"),
|
|
@@ -9372,7 +9372,7 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9372
9372
|
isVisible: d
|
|
9373
9373
|
}));
|
|
9374
9374
|
}, h = (d) => {
|
|
9375
|
-
a.commands.dispatch(new
|
|
9375
|
+
a.commands.dispatch(new ta({ subtitle: d }), { transient: !0 });
|
|
9376
9376
|
};
|
|
9377
9377
|
return /* @__PURE__ */ r(q, {
|
|
9378
9378
|
title: e ?? i("editor.elementsPanel.headerSection.subtitle"),
|
|
@@ -9384,7 +9384,7 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9384
9384
|
isChecked: s.isSubtitleVisible,
|
|
9385
9385
|
onChange: c
|
|
9386
9386
|
})
|
|
9387
|
-
}), /* @__PURE__ */ r(
|
|
9387
|
+
}), /* @__PURE__ */ r(On, {
|
|
9388
9388
|
value: s.subtitle,
|
|
9389
9389
|
onChange: h
|
|
9390
9390
|
})] })
|
|
@@ -9392,11 +9392,11 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9392
9392
|
}, Ot = (e) => {
|
|
9393
9393
|
const { colorScheme: t } = ft(), n = P(() => fs({ colorScheme: t }), [t]);
|
|
9394
9394
|
return P(() => e === null ? null : n.readers(e), [e, n]);
|
|
9395
|
-
},
|
|
9395
|
+
}, Mn = (e, t, n) => {
|
|
9396
9396
|
const a = Ot(e);
|
|
9397
9397
|
return P(() => {
|
|
9398
9398
|
if (a === null || e === null || t === null) return null;
|
|
9399
|
-
const o =
|
|
9399
|
+
const o = ve(e.layers, t);
|
|
9400
9400
|
return o === void 0 ? null : a.geom[n](o);
|
|
9401
9401
|
}, [
|
|
9402
9402
|
a,
|
|
@@ -9457,7 +9457,7 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9457
9457
|
isVisible: d
|
|
9458
9458
|
}));
|
|
9459
9459
|
}, h = (d) => {
|
|
9460
|
-
a.commands.dispatch(new
|
|
9460
|
+
a.commands.dispatch(new na({ title: d }), { transient: !0 });
|
|
9461
9461
|
};
|
|
9462
9462
|
return /* @__PURE__ */ r(q, {
|
|
9463
9463
|
title: e ?? i("editor.elementsPanel.headerSection.toggleTitle"),
|
|
@@ -9469,7 +9469,7 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9469
9469
|
isChecked: s.isTitleVisible,
|
|
9470
9470
|
onChange: c
|
|
9471
9471
|
})
|
|
9472
|
-
}), /* @__PURE__ */ r(
|
|
9472
|
+
}), /* @__PURE__ */ r(On, {
|
|
9473
9473
|
value: s.title,
|
|
9474
9474
|
onChange: h
|
|
9475
9475
|
})] })
|
|
@@ -9485,11 +9485,11 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9485
9485
|
] })
|
|
9486
9486
|
}), Cv = ({ children: e, ...t }) => /* @__PURE__ */ r(qo.Root, {
|
|
9487
9487
|
...t,
|
|
9488
|
-
children: e ?? /* @__PURE__ */ g(Q, { children: [/* @__PURE__ */ r(
|
|
9489
|
-
}), Mt = (e) => `${e}px`, Zo = (e) => `${Math.round(e * 100)}%`, a0 = (e) => `${e}°`, o0 = 24, i0 = { select: { target: "graph" } },
|
|
9488
|
+
children: e ?? /* @__PURE__ */ g(Q, { children: [/* @__PURE__ */ r(Ir, { axis: "x" }), /* @__PURE__ */ r(Ir, { axis: "y" })] })
|
|
9489
|
+
}), Mt = (e) => `${e}px`, Zo = (e) => `${Math.round(e * 100)}%`, a0 = (e) => `${e}°`, o0 = 24, i0 = { select: { target: "graph" } }, Mr = ["dim", "desaturate"], xv = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
9490
9490
|
const a = $(), o = K(a), i = M(), { Slider: l, ToggleGroup: s } = W(), c = Ot(o);
|
|
9491
9491
|
if (!o || !c) return null;
|
|
9492
|
-
const h = c.graph().get("cornerRadius"), d =
|
|
9492
|
+
const h = c.graph().get("cornerRadius"), d = $s(o.spec), u = Mr.map((m) => ({
|
|
9493
9493
|
value: m,
|
|
9494
9494
|
label: i(m === "dim" ? "editor.highlighting.highlightStyle.tint" : "editor.highlighting.highlightStyle.gray")
|
|
9495
9495
|
})), p = (m) => {
|
|
@@ -9505,7 +9505,7 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9505
9505
|
}
|
|
9506
9506
|
}), { transient: !0 });
|
|
9507
9507
|
}, v = (m) => {
|
|
9508
|
-
const f =
|
|
9508
|
+
const f = Mr.find((b) => b === m);
|
|
9509
9509
|
f && a.commands.dispatch(new Dl({ dimStyle: f }));
|
|
9510
9510
|
};
|
|
9511
9511
|
return /* @__PURE__ */ r(q, {
|
|
@@ -9533,7 +9533,7 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9533
9533
|
})] })
|
|
9534
9534
|
});
|
|
9535
9535
|
}, l0 = 0.05, wv = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
9536
|
-
const a = $(), o = K(a), i = M(), { Slider: l, ToggleGroup: s } = W(), c = o ?
|
|
9536
|
+
const a = $(), o = K(a), i = M(), { Slider: l, ToggleGroup: s } = W(), c = o ? ca(o.spec.layers, "bar") : void 0, h = Mn(o, c?.id ?? null, "bar");
|
|
9537
9537
|
if (!o || !c || o.coordSystem.type === "polar" && o.coordSystem.bandAxis === null) return null;
|
|
9538
9538
|
const d = (f) => {
|
|
9539
9539
|
a.commands.dispatch(new Al({
|
|
@@ -9541,15 +9541,15 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9541
9541
|
width: f
|
|
9542
9542
|
}), { transient: !0 });
|
|
9543
9543
|
}, u = (f) => {
|
|
9544
|
-
const b =
|
|
9544
|
+
const b = _n.find((x) => x === f);
|
|
9545
9545
|
b && a.commands.dispatch(new Tl({
|
|
9546
9546
|
layerId: c.id,
|
|
9547
9547
|
cornerRadius: b
|
|
9548
9548
|
}));
|
|
9549
|
-
}, p =
|
|
9549
|
+
}, p = _n.map((f) => ({
|
|
9550
9550
|
value: f,
|
|
9551
9551
|
label: i(`editor.graphPanel.barSection.roundingOptions.${f}`)
|
|
9552
|
-
})), v =
|
|
9552
|
+
})), v = Js(c.params, o.coordSystem.type), m = h?.get("cornerRadius") ?? cl;
|
|
9553
9553
|
return /* @__PURE__ */ r(q, {
|
|
9554
9554
|
title: e ?? i("editor.graphPanel.barSection.title"),
|
|
9555
9555
|
layout: t,
|
|
@@ -9704,11 +9704,11 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9704
9704
|
}
|
|
9705
9705
|
}));
|
|
9706
9706
|
}, d = () => {
|
|
9707
|
-
const p =
|
|
9707
|
+
const p = Ns(o);
|
|
9708
9708
|
p !== null && a.commands.dispatch(new we({
|
|
9709
9709
|
kind: "differenceArrow",
|
|
9710
9710
|
annotation: {
|
|
9711
|
-
...
|
|
9711
|
+
...Jr,
|
|
9712
9712
|
...p,
|
|
9713
9713
|
label: b0
|
|
9714
9714
|
}
|
|
@@ -9759,12 +9759,12 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9759
9759
|
if (!o) return null;
|
|
9760
9760
|
const s = ha(o.spec);
|
|
9761
9761
|
if (s === null || !Ie(s)) return null;
|
|
9762
|
-
const c =
|
|
9762
|
+
const c = Fn.map((d) => ({
|
|
9763
9763
|
value: d,
|
|
9764
9764
|
label: i(`editor.graphPanel.comboSection.types.${d}`)
|
|
9765
9765
|
})), h = (d) => {
|
|
9766
|
-
const u =
|
|
9767
|
-
u && a.commands.dispatch(new
|
|
9766
|
+
const u = Fn.find((p) => p === d);
|
|
9767
|
+
u && a.commands.dispatch(new Qr({
|
|
9768
9768
|
coordType: "cartesian",
|
|
9769
9769
|
comboType: u
|
|
9770
9770
|
}));
|
|
@@ -9783,7 +9783,7 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9783
9783
|
}, S0 = 0.1, C0 = 20, kv = ({ title: e, preview: t }) => {
|
|
9784
9784
|
const n = $(), a = K(n), o = M(), { NumberField: i, TextField: l } = W();
|
|
9785
9785
|
if (!a || a.coordSystem.type === "polar") return null;
|
|
9786
|
-
const s = xs(a.spec.layers), c = e ?? o("editor.annotationsPanel.goalSection.title"), h =
|
|
9786
|
+
const s = xs(a.spec.layers), c = e ?? o("editor.annotationsPanel.goalSection.title"), h = Gs(s?.mapping.y), d = typeof h == "number" ? h : null, u = (m) => {
|
|
9787
9787
|
const f = new ns({
|
|
9788
9788
|
showGoalLine: m,
|
|
9789
9789
|
value: x0(a),
|
|
@@ -9840,9 +9840,9 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9840
9840
|
}, Lv = ({ layerId: e, title: t, layout: n = "collapsible", preview: a }) => {
|
|
9841
9841
|
const o = $(), i = K(o), l = M(), { Switch: s } = W();
|
|
9842
9842
|
if (!i) return null;
|
|
9843
|
-
const c = e === void 0 ? i.spec.layers[0] :
|
|
9843
|
+
const c = e === void 0 ? i.spec.layers[0] : ve(i.spec.layers, e);
|
|
9844
9844
|
if (!c) return null;
|
|
9845
|
-
const { showDataLabels: h, format: d, showStackTotals: u, showCategoryLabels: p } = c.dataLabels, v = i.coordSystem.type, m = v === "polar", f = c.geom === "bar", b = f && !m && c.position === "stack", x = f && (!m || h), w =
|
|
9845
|
+
const { showDataLabels: h, format: d, showStackTotals: u, showCategoryLabels: p } = c.dataLabels, v = i.coordSystem.type, m = v === "polar", f = c.geom === "bar", b = f && !m && c.position === "stack", x = f && (!m || h), w = ve(i.layers, c.id), C = w !== void 0 && o.canFormatDataLabelsAsPercentages(w, v);
|
|
9846
9846
|
if (!o.canPlaceDataLabels(c.geom, v)) return null;
|
|
9847
9847
|
const S = (F) => {
|
|
9848
9848
|
const R = new ts({
|
|
@@ -10687,7 +10687,7 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10687
10687
|
if (!o) return null;
|
|
10688
10688
|
const c = ha(o.spec), h = W0(c), d = (u) => {
|
|
10689
10689
|
const p = an.find((v) => v.name === u);
|
|
10690
|
-
p && a.commands.dispatch(new
|
|
10690
|
+
p && a.commands.dispatch(new Qr(U0(p, c)));
|
|
10691
10691
|
};
|
|
10692
10692
|
return /* @__PURE__ */ r(q, {
|
|
10693
10693
|
title: e ?? i("editor.graphPanel.graphTypeSection.title"),
|
|
@@ -10701,7 +10701,7 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10701
10701
|
ariaLabel: i("editor.graphPanel.graphTypeSection.title")
|
|
10702
10702
|
})
|
|
10703
10703
|
});
|
|
10704
|
-
},
|
|
10704
|
+
}, Nr = [
|
|
10705
10705
|
"solid",
|
|
10706
10706
|
"dashed",
|
|
10707
10707
|
"dotted"
|
|
@@ -10710,7 +10710,7 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10710
10710
|
if (!o || !h) return null;
|
|
10711
10711
|
const d = o.guides.axes.filter(j0);
|
|
10712
10712
|
if (d.length === 0) return null;
|
|
10713
|
-
const u = o.coordSystem.type !== "polar", p = d.some((w) => w.gridVisible), v = h.gridLine.y().resolve(), m =
|
|
10713
|
+
const u = o.coordSystem.type !== "polar", p = d.some((w) => w.gridVisible), v = h.gridLine.y().resolve(), m = Nr.map((w) => ({
|
|
10714
10714
|
value: w,
|
|
10715
10715
|
label: i(`editor.graphPanel.gridSection.lineStyles.${w}`)
|
|
10716
10716
|
})), f = (w) => (C) => {
|
|
@@ -10719,7 +10719,7 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10719
10719
|
isVisible: C
|
|
10720
10720
|
}));
|
|
10721
10721
|
}, b = (w) => {
|
|
10722
|
-
const C =
|
|
10722
|
+
const C = Nr.find((S) => S === w);
|
|
10723
10723
|
C && a.commands.dispatch(new Il({
|
|
10724
10724
|
axis: "both",
|
|
10725
10725
|
lineStyle: C
|
|
@@ -10764,7 +10764,7 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10764
10764
|
"total",
|
|
10765
10765
|
"average",
|
|
10766
10766
|
"current"
|
|
10767
|
-
], Q0 = ["total"],
|
|
10767
|
+
], Q0 = ["total"], Rr = ["previous", "first"], Dr = [
|
|
10768
10768
|
"auto",
|
|
10769
10769
|
"small",
|
|
10770
10770
|
"medium",
|
|
@@ -10777,10 +10777,10 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10777
10777
|
const m = u ? Q0 : Yo, f = o.guides.headline, b = f?.kind === "perGroup" && f.items.some((E) => E.comparison !== null), x = m.map((E) => ({
|
|
10778
10778
|
value: E,
|
|
10779
10779
|
label: i(`editor.graphPanel.headlineNumberSection.metrics.${E}`)
|
|
10780
|
-
})), w =
|
|
10780
|
+
})), w = Rr.map((E) => ({
|
|
10781
10781
|
value: E,
|
|
10782
10782
|
label: i(`editor.graphPanel.headlineNumberSection.comparison.${E}`)
|
|
10783
|
-
})), C =
|
|
10783
|
+
})), C = Dr.map((E) => ({
|
|
10784
10784
|
value: E,
|
|
10785
10785
|
label: i(E === "auto" ? "editor.graphPanel.numberFormat.options.auto" : `editor.graphPanel.headlineNumberSize.sizes.${E}`)
|
|
10786
10786
|
})), S = [{
|
|
@@ -10790,15 +10790,15 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10790
10790
|
value: "center",
|
|
10791
10791
|
label: i("editor.graphPanel.headlineNumberSection.position.center")
|
|
10792
10792
|
}], L = (E) => {
|
|
10793
|
-
a.commands.dispatch(new
|
|
10793
|
+
a.commands.dispatch(new Bn({ show: E ? J0 : "none" }));
|
|
10794
10794
|
}, A = (E) => {
|
|
10795
10795
|
const O = m.find((y) => y === E);
|
|
10796
|
-
O && a.commands.dispatch(new
|
|
10796
|
+
O && a.commands.dispatch(new Bn({ show: O }));
|
|
10797
10797
|
}, N = (E) => {
|
|
10798
|
-
const O =
|
|
10798
|
+
const O = Rr.find((y) => y === E);
|
|
10799
10799
|
O && a.commands.dispatch(new Ml({ compareWith: O }));
|
|
10800
10800
|
}, F = (E) => {
|
|
10801
|
-
const O =
|
|
10801
|
+
const O = Dr.find((y) => y === E);
|
|
10802
10802
|
O && a.commands.dispatch(new Rl({ size: O }));
|
|
10803
10803
|
}, R = (E) => {
|
|
10804
10804
|
a.commands.dispatch(new Nl({ position: E === "center" ? "center" : "above" }));
|
|
@@ -10827,7 +10827,7 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10827
10827
|
label: i("editor.graphPanel.headlineNumberSection.compareWithLabel"),
|
|
10828
10828
|
layout: "stack",
|
|
10829
10829
|
children: /* @__PURE__ */ r(s, {
|
|
10830
|
-
value:
|
|
10830
|
+
value: Qs(c.compareWith),
|
|
10831
10831
|
options: w,
|
|
10832
10832
|
onChange: N
|
|
10833
10833
|
})
|
|
@@ -10859,12 +10859,12 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10859
10859
|
"left",
|
|
10860
10860
|
"right",
|
|
10861
10861
|
"none"
|
|
10862
|
-
],
|
|
10862
|
+
], _r = [
|
|
10863
10863
|
"auto",
|
|
10864
10864
|
"start",
|
|
10865
10865
|
"center",
|
|
10866
10866
|
"end"
|
|
10867
|
-
],
|
|
10867
|
+
], Fr = [
|
|
10868
10868
|
"auto",
|
|
10869
10869
|
"pill",
|
|
10870
10870
|
"direct"
|
|
@@ -10884,15 +10884,15 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10884
10884
|
const E = Gt.find((O) => O === R);
|
|
10885
10885
|
E && o.commands.dispatch(new Bl({ position: E }));
|
|
10886
10886
|
}, w = (R) => {
|
|
10887
|
-
const E =
|
|
10887
|
+
const E = _r.find((O) => O === R);
|
|
10888
10888
|
E && o.commands.dispatch(new Fl({ align: E }));
|
|
10889
10889
|
}, C = (R) => {
|
|
10890
|
-
const E =
|
|
10890
|
+
const E = Fr.find((O) => O === R);
|
|
10891
10891
|
E && o.commands.dispatch(new zl({ display: E }));
|
|
10892
|
-
}, S =
|
|
10892
|
+
}, S = _r.map((R) => ({
|
|
10893
10893
|
value: R,
|
|
10894
10894
|
label: l(`editor.graphPanel.legendSection.align.${R}`)
|
|
10895
|
-
})), L =
|
|
10895
|
+
})), L = Fr.map((R) => ({
|
|
10896
10896
|
value: R,
|
|
10897
10897
|
label: l(`editor.graphPanel.legendSection.display.${R}`)
|
|
10898
10898
|
})), A = t ?? l("editor.graphPanel.legendSection.title"), N = b.find((R) => R.value === f)?.label, F = d !== void 0;
|
|
@@ -10931,7 +10931,7 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10931
10931
|
] })
|
|
10932
10932
|
});
|
|
10933
10933
|
}, t5 = 1, n5 = 20, r5 = 0.5, Jo = ({ layerId: e }) => {
|
|
10934
|
-
const t = $(), n = K(t), { Slider: a } = W(), o =
|
|
10934
|
+
const t = $(), n = K(t), { Slider: a } = W(), o = Mn(n, e, "point");
|
|
10935
10935
|
if (!n) return null;
|
|
10936
10936
|
const i = (l) => {
|
|
10937
10937
|
const s = new Wl({
|
|
@@ -10954,9 +10954,9 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10954
10954
|
"zero",
|
|
10955
10955
|
"connect"
|
|
10956
10956
|
], Mv = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
10957
|
-
const a = $(), o = K(a), i = M(), { Select: l, Slider: s, Switch: c, ToggleGroup: h } = W(), d = o?.spec.layers ?? [], u =
|
|
10957
|
+
const a = $(), o = K(a), i = M(), { Select: l, Slider: s, Switch: c, ToggleGroup: h } = W(), d = o?.spec.layers ?? [], u = ca(d, "line", "area"), p = Mn(o, u?.id ?? null, "line");
|
|
10958
10958
|
if (!o || !u) return null;
|
|
10959
|
-
const v = o.coordSystem.type === "polar", m = d5(i, u), f = c5(u, d), b = cs(u.geom, u.id), x = Re(o.spec), w = o.spec.styles.overrides, C =
|
|
10959
|
+
const v = o.coordSystem.type === "polar", m = d5(i, u), f = c5(u, d), b = cs(u.geom, u.id), x = Re(o.spec), w = o.spec.styles.overrides, C = Vn(w, b, x), S = Vn(Ys(w, b, x), b, x), L = C?.strokeWidth, A = typeof L == "number", N = S?.strokeWidth !== void 0, F = u.geom === "line" ? u : void 0, R = [{
|
|
10960
10960
|
value: "auto",
|
|
10961
10961
|
label: i("editor.graphPanel.numberFormat.options.auto"),
|
|
10962
10962
|
isDisabled: N
|
|
@@ -10980,12 +10980,12 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10980
10980
|
}));
|
|
10981
10981
|
}, G = (oe) => {
|
|
10982
10982
|
const ze = p?.get("strokeWidth") ?? hl;
|
|
10983
|
-
a.commands.dispatch(new
|
|
10983
|
+
a.commands.dispatch(new Hn({
|
|
10984
10984
|
layerId: u.id,
|
|
10985
10985
|
lineWidth: oe === "custom" ? ze : null
|
|
10986
10986
|
}));
|
|
10987
10987
|
}, re = (oe) => {
|
|
10988
|
-
a.commands.dispatch(new
|
|
10988
|
+
a.commands.dispatch(new Hn({
|
|
10989
10989
|
layerId: u.id,
|
|
10990
10990
|
lineWidth: oe
|
|
10991
10991
|
}), { transient: !0 });
|
|
@@ -11056,7 +11056,7 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
11056
11056
|
})
|
|
11057
11057
|
] })
|
|
11058
11058
|
});
|
|
11059
|
-
}, s5 = (e) => l5.find((t) => t === e), c5 = (e, t) => Vt(t, "point").find((n) =>
|
|
11059
|
+
}, s5 = (e) => l5.find((t) => t === e), c5 = (e, t) => Vt(t, "point").find((n) => da(n, [e])), d5 = (e, t) => {
|
|
11060
11060
|
const n = [{
|
|
11061
11061
|
value: "gap",
|
|
11062
11062
|
label: e("editor.graphPanel.treatEmptyValues.leaveGap.label")
|
|
@@ -11081,8 +11081,8 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
11081
11081
|
size: "editor.graphPanel.mappingSection.size",
|
|
11082
11082
|
label: "editor.graphPanel.mappingSection.label"
|
|
11083
11083
|
}, Nv = ({ title: e, layout: t = "collapsible" }) => {
|
|
11084
|
-
const n = $(), a = K(n), o = M(), { Select: i } = W(), l = o("editor.graphPanel.mappingSection.none"), s = a?.spec, c = P(() => s === void 0 ? [] :
|
|
11085
|
-
const p =
|
|
11084
|
+
const n = $(), a = K(n), o = M(), { Select: i } = W(), l = o("editor.graphPanel.mappingSection.none"), s = a?.spec, c = P(() => s === void 0 ? [] : Us(s, u5).map(({ aesthetic: h, variables: d, isRequired: u }) => {
|
|
11085
|
+
const p = Ks(s.mapping, h);
|
|
11086
11086
|
return {
|
|
11087
11087
|
aesthetic: h,
|
|
11088
11088
|
label: o(h5[h]),
|
|
@@ -11154,9 +11154,9 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
11154
11154
|
const S = ln.find((L) => L.value === C);
|
|
11155
11155
|
S && m(S.value);
|
|
11156
11156
|
}, x = (C) => {
|
|
11157
|
-
a.commands.dispatch(new
|
|
11157
|
+
a.commands.dispatch(new Gn({ decimals: C === "custom" ? g5 : "auto" }));
|
|
11158
11158
|
}, w = (C) => {
|
|
11159
|
-
C !== null && a.commands.dispatch(new
|
|
11159
|
+
C !== null && a.commands.dispatch(new Gn({ decimals: C }), { transient: !0 });
|
|
11160
11160
|
};
|
|
11161
11161
|
return /* @__PURE__ */ r(q, {
|
|
11162
11162
|
title: e ?? i("editor.graphPanel.numberFormatSection.title"),
|
|
@@ -11218,7 +11218,7 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
11218
11218
|
}) : null;
|
|
11219
11219
|
}, S5 = (e) => {
|
|
11220
11220
|
const t = Vt(e, "line", "area");
|
|
11221
|
-
return Vt(e, "point").find((n) => !
|
|
11221
|
+
return Vt(e, "point").find((n) => !da(n, t));
|
|
11222
11222
|
}, C5 = 0.9, x5 = 360, w5 = 0.05, T5 = 15, _v = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
11223
11223
|
const a = $(), o = K(a), i = M(), { Slider: l } = W();
|
|
11224
11224
|
if (!o || o.spec.coords.coordType !== "polar") return null;
|
|
@@ -11278,7 +11278,7 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
11278
11278
|
fill: "currentColor"
|
|
11279
11279
|
})
|
|
11280
11280
|
]
|
|
11281
|
-
}),
|
|
11281
|
+
}), zr = (e) => /* @__PURE__ */ g(k, {
|
|
11282
11282
|
...e,
|
|
11283
11283
|
children: [
|
|
11284
11284
|
/* @__PURE__ */ r("path", {
|
|
@@ -11301,7 +11301,7 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
11301
11301
|
fill: "currentColor"
|
|
11302
11302
|
})
|
|
11303
11303
|
]
|
|
11304
|
-
}),
|
|
11304
|
+
}), Br = [
|
|
11305
11305
|
"linear",
|
|
11306
11306
|
"exponential",
|
|
11307
11307
|
"quadratic",
|
|
@@ -11312,7 +11312,7 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
11312
11312
|
], k5 = "linear", Fv = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
11313
11313
|
const a = $(), o = K(a), i = M(), { Select: l, Switch: s } = W(), { options: c, findValue: h } = oo(o);
|
|
11314
11314
|
if (!o || o.coordSystem.type === "polar") return null;
|
|
11315
|
-
const d =
|
|
11315
|
+
const d = ks(o.spec.layers), u = Ss(o.spec.layers), p = d?.stat.type === "smooth" ? d.stat.method : k5, v = L5(u), m = Br.map((S) => ({
|
|
11316
11316
|
value: S,
|
|
11317
11317
|
label: i(`editor.annotationsPanel.trendType.options.${S}`)
|
|
11318
11318
|
})), f = (S, L = {}) => {
|
|
@@ -11324,7 +11324,7 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
11324
11324
|
});
|
|
11325
11325
|
a.commands.dispatch(N);
|
|
11326
11326
|
}, b = (S) => f(S ? "trend" : "none", { method: p }), x = (S) => f(S ? "average" : "none", { group: v ?? h(c[0]?.value ?? "") }), w = (S) => {
|
|
11327
|
-
const L =
|
|
11327
|
+
const L = Br.find((A) => A === S);
|
|
11328
11328
|
L !== void 0 && f("trend", { method: L });
|
|
11329
11329
|
}, C = (S) => {
|
|
11330
11330
|
const L = S === null ? void 0 : h(S);
|
|
@@ -11333,11 +11333,11 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
11333
11333
|
return /* @__PURE__ */ r(q, {
|
|
11334
11334
|
title: e ?? i("editor.annotationsPanel.trendsAndAveragesSection.title"),
|
|
11335
11335
|
layout: t,
|
|
11336
|
-
preview: n ?? /* @__PURE__ */ r(
|
|
11336
|
+
preview: n ?? /* @__PURE__ */ r(zr, { size: "lg" }),
|
|
11337
11337
|
children: /* @__PURE__ */ g(ee, { children: [
|
|
11338
11338
|
/* @__PURE__ */ r(T, {
|
|
11339
11339
|
label: i("editor.annotationsPanel.trendsAndAveragesSection.trend"),
|
|
11340
|
-
icon: /* @__PURE__ */ r(
|
|
11340
|
+
icon: /* @__PURE__ */ r(zr, { size: "lg" }),
|
|
11341
11341
|
children: /* @__PURE__ */ r(s, {
|
|
11342
11342
|
isChecked: d !== void 0,
|
|
11343
11343
|
onChange: b
|
|
@@ -11379,14 +11379,14 @@ var Gg = "_40zvwv8", q = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
11379
11379
|
export {
|
|
11380
11380
|
xv as AppearanceSection,
|
|
11381
11381
|
Cv as AxesPanel,
|
|
11382
|
-
|
|
11382
|
+
Ir as AxisSection,
|
|
11383
11383
|
wv as BarSection,
|
|
11384
11384
|
Wm as Button,
|
|
11385
11385
|
Tv as CalloutsSection,
|
|
11386
11386
|
Zg as CaptionSection,
|
|
11387
11387
|
Av as ComboSection,
|
|
11388
11388
|
Ag as ControlRegistryProvider,
|
|
11389
|
-
|
|
11389
|
+
Sh as ControlTooltip,
|
|
11390
11390
|
bv as EditableGraphRenderer,
|
|
11391
11391
|
qo as EditorPanel,
|
|
11392
11392
|
Sv as ElementsPanel,
|
|
@@ -11395,7 +11395,7 @@ export {
|
|
|
11395
11395
|
Pv as GraphTypeSection,
|
|
11396
11396
|
Iv as GridSection,
|
|
11397
11397
|
Ev as HeadlineSection,
|
|
11398
|
-
|
|
11398
|
+
Wc as IntlProvider,
|
|
11399
11399
|
Ov as LegendSection,
|
|
11400
11400
|
Mv as LineSection,
|
|
11401
11401
|
Nv as MappingSection,
|