@sheetxl/react 0.4.8 → 0.4.10
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/browser/cjs/{B4mGpkDOkCHItemz.cjs → BkuITQ2sNHxvsmB0.cjs} +1 -1
- package/browser/cjs/{B4ETvS5YfOd86KDN.cjs → DNo5c_VFRpVYlOmp.cjs} +1 -1
- package/browser/cjs/index.cjs +10 -10
- package/browser/cjs/{BZs0YPX82So7JAoE.cjs → wDNFYRRXgRT9EMu2.cjs} +1 -1
- package/browser/esm/{Bl-eU8zCnI2rr2d3.mjs → CD-LLUyw3wwDiAZr.mjs} +1 -1
- package/browser/esm/{Bcq_kfgxJrhU6yN7.mjs → Cv3UmnkBp-69XB-f.mjs} +1 -1
- package/browser/esm/{LItROSSHxPJCz9E5.mjs → D7ucmKEU706sujEB.mjs} +1 -1
- package/browser/esm/index.mjs +542 -541
- package/node/esm/{C8tQNfgmpDLQkca4.mjs → dxyFXUyZ0WCn3N9j.mjs} +1 -1
- package/node/esm/index.mjs +10 -9
- package/package.json +5 -5
package/browser/esm/index.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import tt, { memo as ft, useMemo as ye, useState as ue, forwardRef as wt, useRef
|
|
|
9
9
|
import { STANDARD_KEY_CHARS as mi, useSelection as nl, useHeaderSelection as pi, HeaderRenderer as fi, Grid as ol, HeaderDivider as vi, SELECTION_CLIP_INSETS as $o, defaultSelectionRenderer as wi, useKeyboardEditorOverlay as yi, Selection as rl, SVGLine as ro } from "@sheetxl/grid-react";
|
|
10
10
|
import { unstable_batchedUpdates as Nn, createPortal as ll } from "react-dom";
|
|
11
11
|
/**
|
|
12
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.4.
|
|
12
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.4.10
|
|
13
13
|
*
|
|
14
14
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
15
15
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -36,9 +36,9 @@ const $n = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), _s = Object.fr
|
|
|
36
36
|
i?.(R, o);
|
|
37
37
|
}, ...g, children: p("svg", { width: "" + 15 * r, height: "" + 15 * r, viewBox: "0 0 15 15", style: { fill: `var(${b && !l ? "--sxl-app-color-primary-dark" : "--sxl-app-color-button-text"}, grey)`, opacity: l ? 0.6 : 1 }, children: p("path", { d: s }) }) });
|
|
38
38
|
}, qi = (e) => {
|
|
39
|
-
const { value: t, coords: n, bounds: r, children: l, style: o, range: i, zoom: c = 1, view: g, bodyStyle: s, normalStyle: b, showFormulas: d, showZeros: u, docTheme: R, onLinkMouseDown: q, onFilterButtonMouseDown: E, filterButtonProps: A, createFilterButton: U = bi, ...P } = e,
|
|
39
|
+
const { value: t, coords: n, bounds: r, children: l, style: o, range: i, zoom: c = 1, view: g, bodyStyle: s, normalStyle: b, showFormulas: d, showZeros: u, docTheme: R, onLinkMouseDown: q, onFilterButtonMouseDown: E, filterButtonProps: A, createFilterButton: U = bi, ...P } = e, v = r.height / c, L = r.width / c, C = t, w = C.getValue(), x = t.getStyle(), F = s?.darkMode ?? !1;
|
|
40
40
|
let M, D;
|
|
41
|
-
const G =
|
|
41
|
+
const G = w && w.isFormulaError, $ = G && w instanceof Kr.Parse;
|
|
42
42
|
let B, O = d || $;
|
|
43
43
|
if (O) if (C.isSpillOverflow()) D = "";
|
|
44
44
|
else {
|
|
@@ -47,11 +47,11 @@ const $n = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), _s = Object.fr
|
|
|
47
47
|
}
|
|
48
48
|
else M = C.getNumberFormat();
|
|
49
49
|
O || (B = C.getTextOverflow());
|
|
50
|
-
const W = B ? B.colBounds.width + B.leftOffset + B.rightOffset :
|
|
50
|
+
const W = B ? B.colBounds.width + B.leftOffset + B.rightOffset : L, ee = B ? B.anchorBounds.x - B.leftOffset : 0, z = B ? B.anchorBounds.width : L, y = B ? B.anchorBounds.x : 0;
|
|
51
51
|
let V, ne = C.getRenderHorizontalAlignment();
|
|
52
52
|
M && (V = M?.formattedRuns, D = V?.runs[0]?.text ?? M.displayText);
|
|
53
53
|
const xe = C.getCalcStatus() === Kt.CalcStatus.Pending;
|
|
54
|
-
let oe = null, _ = x.getFill().toCSS(
|
|
54
|
+
let oe = null, _ = x.getFill().toCSS(F, r), ae = 0, ze = 0;
|
|
55
55
|
if (!x.getBorder().isEmpty()) {
|
|
56
56
|
const Oe = x.getBorder().getRight();
|
|
57
57
|
!Oe.isNone() && At.BuiltInDefinitions.get(Oe.getStyle()).width > 1 && (ae = 1);
|
|
@@ -59,14 +59,14 @@ const $n = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), _s = Object.fr
|
|
|
59
59
|
!S.isNone() && At.BuiltInDefinitions.get(S.getStyle()).width > 1 && (ze = 1);
|
|
60
60
|
}
|
|
61
61
|
let Ie = null;
|
|
62
|
-
if (
|
|
63
|
-
const { backgroundPosition: Oe, ...S } = _, te = Oe ?? 0,
|
|
64
|
-
(Oe !== void 0 || ae || ze ||
|
|
62
|
+
if (L !== z || ae || ze || typeof _?.backgroundPosition == "number") {
|
|
63
|
+
const { backgroundPosition: Oe, ...S } = _, te = Oe ?? 0, N = g?.getScrollTopLeft(), Z = te ? -(r.x + (N.left ?? 0)) % te : 0, a = te ? -(r.y + (N.top ?? 0)) % te : 0;
|
|
64
|
+
(Oe !== void 0 || ae || ze || L !== z) && (Object.keys(S).length === 1 && S.background === "none" || (_ = null, Ie = p("div", { className: "fill", style: { marginLeft: `${Z}px`, marginTop: `${a}px`, left: y * c, width: it.boundPixel(z * c - Z + 1 + ae), height: it.boundPixel(r.height - a + 1 + ze), ...S } }, "background")));
|
|
65
65
|
}
|
|
66
66
|
let fe = null;
|
|
67
67
|
const Ge = C.getComments(), ve = C.getWarnings(), _e = C.getErrors();
|
|
68
68
|
if (Ge || G || _e.length > 0 || ve.length > 0) {
|
|
69
|
-
const Oe = { size: 7 * c, darkMode:
|
|
69
|
+
const Oe = { size: 7 * c, darkMode: F, cellWidth: z * c + 2, cellHeight: v * c + 2, style: { top: -1, left: y * c - 1 } };
|
|
70
70
|
fe = fe ?? [], (ve.length > 0 || _e.length > 0 || G) && fe.push(p(dr, { anchorLocation: yt.TopLeft, ...Oe }, `indicator-${fe.length}`)), Ge && fe.push(p(dr, { anchorLocation: yt.TopRight, ...Oe }, `indicator-${fe.length}`));
|
|
71
71
|
}
|
|
72
72
|
const De = x.getFont();
|
|
@@ -86,14 +86,14 @@ const $n = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), _s = Object.fr
|
|
|
86
86
|
const Fe = { ..._, ...Ze, pointerEvents: q ? "auto" : void 0 };
|
|
87
87
|
if (!rt.isEmpty(D) || !rt.isEmpty(M?.repeatPlaceholder)) {
|
|
88
88
|
const Oe = M?.canWrap ?? !1;
|
|
89
|
-
let S = null, te = null,
|
|
90
|
-
u || O ||
|
|
89
|
+
let S = null, te = null, N = null, Z = [], a = !0;
|
|
90
|
+
u || O || w !== 0 || (a = !1);
|
|
91
91
|
const k = C.getTextFrame(O);
|
|
92
92
|
if (a && k) {
|
|
93
93
|
let T = W - 1 - (Ne + We);
|
|
94
94
|
if (Se) {
|
|
95
95
|
S = k.layout().bounds;
|
|
96
|
-
const Ce = { x: 0, y: 0, width: W - 1, height:
|
|
96
|
+
const Ce = { x: 0, y: 0, width: W - 1, height: v };
|
|
97
97
|
if (V) {
|
|
98
98
|
let he = V.width;
|
|
99
99
|
if (M.repeatPlaceholder || M.repeatChars.length > 0) {
|
|
@@ -102,7 +102,7 @@ const $n = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), _s = Object.fr
|
|
|
102
102
|
}
|
|
103
103
|
S = { ...S, width: he };
|
|
104
104
|
}
|
|
105
|
-
|
|
105
|
+
N = Rt.clipToOuterRect({ ...S, width: S.width + 1 + Ne + We }, Ce, Se), T = N.width - 1 - (Ne + We) + 0.01;
|
|
106
106
|
}
|
|
107
107
|
let f = null;
|
|
108
108
|
Oe && (f = { width: T });
|
|
@@ -118,7 +118,7 @@ const $n = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), _s = Object.fr
|
|
|
118
118
|
}
|
|
119
119
|
if (!h && C.getType() !== Pn.String && Math.floor(S.width) > T) {
|
|
120
120
|
if (x.getNumberFormat() === "General" && C.getType() === Pn.Number) {
|
|
121
|
-
const se = x.measureText("0"), Ce = Math.floor(T / se.width), he =
|
|
121
|
+
const se = x.measureText("0"), Ce = Math.floor(T / se.width), he = w, me = rt.splitNumber(he), Re = Math.min(10, Ce - (Math.max(1, me.ipLength) + 1) - (he < 0 ? 1 : 0));
|
|
122
122
|
if (Re >= -1) {
|
|
123
123
|
const Pe = `0${Re > 0 ? "." : ""}${"#".repeat(Math.max(0, Re))}`;
|
|
124
124
|
I = C.getNumberFormat(Pe).displayText, I === "0" && he < 0 && (I = "-0");
|
|
@@ -144,11 +144,11 @@ const $n = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), _s = Object.fr
|
|
|
144
144
|
const se = Rt.boundsToPoints(te), Ce = Rt.rotatePoints(se, Se), he = Rt.minBoundingRect(Ce);
|
|
145
145
|
te.width = he.width, te.height = he.height;
|
|
146
146
|
}
|
|
147
|
-
ne === pe.HorizontalAlignment.Center || ne === pe.HorizontalAlignment.CenterContinuous ? te.x = (W - te.width) / 2 : ne === pe.HorizontalAlignment.Right ? te.x = W - te.width - 0.5 : te.x = 0.5, ce.getVertical() === pe.VerticalAlignment.Center ? te.y = (
|
|
147
|
+
ne === pe.HorizontalAlignment.Center || ne === pe.HorizontalAlignment.CenterContinuous ? te.x = (W - te.width) / 2 : ne === pe.HorizontalAlignment.Right ? te.x = W - te.width - 0.5 : te.x = 0.5, ce.getVertical() === pe.VerticalAlignment.Center ? te.y = (v - te.height) / 2 : ce.getVertical() === pe.VerticalAlignment.Bottom ? te.y = v - te.height - qe : te.y = qe;
|
|
148
148
|
const j = Qe ? { ...P } : void 0, J = { style: { left: o.left - 1, top: o.top - 1, width: o.width + 1, height: o.height + 1, transform: Se ? `rotate(${Se}deg)` : void 0, cursor: q ? "pointer" : void 0, pointerEvents: q ? "auto" : void 0, zIndex: K ? 1 : void 0, ..._ }, onMouseDown: q, onDoubleClick: q ? (se) => {
|
|
149
149
|
se.stopPropagation(), se.preventDefault();
|
|
150
150
|
} : null, ...j };
|
|
151
|
-
$ && (J.style.textDecorationStyle = "wavy", J.style.textDecorationColor =
|
|
151
|
+
$ && (J.style.textDecorationStyle = "wavy", J.style.textDecorationColor = F ? "rgb(0, 255, 255)" : "red", J.style.textDecorationLine = "underline");
|
|
152
152
|
const re = De.getSize(), le = (se, Ce, he, me, Re, Pe, Be, et = null) => {
|
|
153
153
|
let $e = re * c, nt = he, He = Be?.runs ? Be.runs : [{ type: Zt.ParseRunType.Text, text: se, width: x.measureText(se, $e).width }];
|
|
154
154
|
Be && Be?.width !== S.width && (S = { ...S, width: Be?.width });
|
|
@@ -180,8 +180,8 @@ const $n = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), _s = Object.fr
|
|
|
180
180
|
const St = De.getSuperSubScale();
|
|
181
181
|
$e *= St, Gt *= St;
|
|
182
182
|
}
|
|
183
|
-
const mt = { textAlign: tn, textAlignLast: tn, background: void 0, ..._t, ...De.toCSS(
|
|
184
|
-
ge && (mt.color = ge.toCSS(
|
|
183
|
+
const mt = { textAlign: tn, textAlignLast: tn, background: void 0, ..._t, ...De.toCSS(F, c, !0), fontSize: $e * dt.getDeviceScale() };
|
|
184
|
+
ge && (mt.color = ge.toCSS(F));
|
|
185
185
|
const Mn = at + vt;
|
|
186
186
|
let gn = Le.top + nt.y + 0;
|
|
187
187
|
if (Tn && (gn += cn - $e), Mt) {
|
|
@@ -218,7 +218,7 @@ const $n = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), _s = Object.fr
|
|
|
218
218
|
const me = se.runs[0].text.replace(/\s+$/, ""), Re = Ce === he - 1;
|
|
219
219
|
let Pe = ne === pe.HorizontalAlignment.Justify && (Re || se.runs[0].text.endsWith(`
|
|
220
220
|
`)) ? pe.HorizontalAlignment.Left : ne, Be = 0;
|
|
221
|
-
Ce > 0 && (ce.getVertical() === pe.VerticalAlignment.Distributed || ce.getVertical() === pe.VerticalAlignment.Justify) && (Be = Math.max(0, (
|
|
221
|
+
Ce > 0 && (ce.getVertical() === pe.VerticalAlignment.Distributed || ce.getVertical() === pe.VerticalAlignment.Justify) && (Be = Math.max(0, (v - (qe + 3) - se.bounds.height * he) / (he - 1) * Ce)), ce.getVertical() === pe.VerticalAlignment.Distributed && Se && Se % 90 == 0 && Se % 180 != 0 && (Pe = pe.HorizontalAlignment.Distributed), Pe !== pe.HorizontalAlignment.Justify && Pe !== pe.HorizontalAlignment.Distributed && Pe !== pe.HorizontalAlignment.Fill || (S = { ...S, width: T });
|
|
222
222
|
const et = { ...se.bounds, y: se.bounds.y + Be + 0, width: ke || M && (M.repeatChars.length > 0 || M.spacingChars.length > 0) ? S.width : se.bounds.width };
|
|
223
223
|
le(me, Ce, et, k.lines[0].baseline, Pe, Re, he === 1 ? V : null, Qe && Ce > 0 ? { ...J, style: { ...J.style, background: void 0 } } : J);
|
|
224
224
|
} });
|
|
@@ -228,8 +228,8 @@ const $n = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), _s = Object.fr
|
|
|
228
228
|
if (Qe) return oe && oe.length > 0 ? oe : p("div", { style: Fe, ...P });
|
|
229
229
|
let je = q ? "auto" : Ze.pointerEvents, Ae = null;
|
|
230
230
|
if (Ke) {
|
|
231
|
-
const Oe = { x: y * c - 1, y: -1, width: z * c + 1, height:
|
|
232
|
-
je = "auto", Ae = U({ renderBounds: Oe, darkMode:
|
|
231
|
+
const Oe = { x: y * c - 1, y: -1, width: z * c + 1, height: v * c + 1 };
|
|
232
|
+
je = "auto", Ae = U({ renderBounds: Oe, darkMode: F, className: "filter-button", disabled: !C.isEditAllowed(), zoom: c, filter: C.getColumnFilter(), onFilterButtonMouseDown: E, ...A }), Ae && (Ae = p("div", { style: { ...Oe, position: "absolute", zIndex: 2, display: "flex", alignItems: "end" }, onDoubleClick: (S) => {
|
|
233
233
|
S.stopPropagation(), S.preventDefault();
|
|
234
234
|
}, children: Ae }, "filterButton"));
|
|
235
235
|
}
|
|
@@ -241,7 +241,7 @@ const $n = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), _s = Object.fr
|
|
|
241
241
|
const n = t ?? e.dirty ?? "";
|
|
242
242
|
return n.length === 0 || n.endsWith("%") && !isNaN(parseFloat(n.substring(0, n.length - 1)));
|
|
243
243
|
}, Ci = Object.freeze([zt.Delete, zt.Home, zt.End]), Si = ft(wt((e, t) => {
|
|
244
|
-
const { editState: n, onStartEdit: r, onChangeEdit: l, onSubmitEdit: o, onCancelEdit: i, onDoneEdit: c, defaultTextStyle: g, useRichStyling: s = !0, bodyStyle: b, activeCoords: d, sheet: u, commands: R, containerBounds: q, setNaturalDimensions: E, onFocus: A, disabled: U, style: P, zoom:
|
|
244
|
+
const { editState: n, onStartEdit: r, onChangeEdit: l, onSubmitEdit: o, onCancelEdit: i, onDoneEdit: c, defaultTextStyle: g, useRichStyling: s = !0, bodyStyle: b, activeCoords: d, sheet: u, commands: R, containerBounds: q, setNaturalDimensions: E, onFocus: A, disabled: U, style: P, zoom: v = 1, linesVisible: L, autoFocus: C = !1, ...w } = e, { height: x = 0, width: F = 0 } = q ?? {}, M = b?.darkMode ?? !1, D = Te(null), [G, $] = ue(!1), [B, O] = ue(null), [W, ee] = ue(() => n);
|
|
245
245
|
be(() => {
|
|
246
246
|
ze.current = !1, ee(n);
|
|
247
247
|
}, [n]);
|
|
@@ -249,7 +249,7 @@ const $n = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), _s = Object.fr
|
|
|
249
249
|
const S = W.clean();
|
|
250
250
|
let te = S.getStyle();
|
|
251
251
|
s || (te = te.createTemporaryStyle({ font: { size: g?.fontSize } }));
|
|
252
|
-
const
|
|
252
|
+
const N = S.getFormula(), Z = te.getAlignment(), a = N ? pe.HorizontalAlignment.Left : Z.getHorizontal(), k = Z.getVertical(), T = Z.getOverflow() === pe.Overflow.Wrap || S.getType() === Pn.String && (a === pe.HorizontalAlignment.Justify || a === pe.HorizontalAlignment.Distributed || k === pe.VerticalAlignment.Justify || k === pe.VerticalAlignment.Distributed), f = ((H) => {
|
|
253
253
|
if (!H) return cr;
|
|
254
254
|
const j = H.clean();
|
|
255
255
|
if (!j) return cr;
|
|
@@ -268,9 +268,9 @@ const $n = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), _s = Object.fr
|
|
|
268
268
|
return J && (re = "'" + re), { text: re, placeholder: se };
|
|
269
269
|
}
|
|
270
270
|
return { text: H.dirty ?? "", placeholder: "" };
|
|
271
|
-
})(W), I = f.text, h = pe.toCSSHorizontalTextAlign(s && !
|
|
272
|
-
return { style: te, isWrapped: T, textValue: I, formula:
|
|
273
|
-
}, [W, g, M,
|
|
271
|
+
})(W), I = f.text, h = pe.toCSSHorizontalTextAlign(s && !N ? W.clean()?.getRenderHorizontalAlignment() : pe.HorizontalAlignment.Left);
|
|
272
|
+
return { style: te, isWrapped: T, textValue: I, formula: N, frameVertAlign: k, placeholder: f.placeholder, insets: s ? S.getInsets() : Wn.EmptyRect, textAlign: h };
|
|
273
|
+
}, [W, g, M, v, s]), y = Te(null), V = jt(t, () => ({ startEdit: (S) => {
|
|
274
274
|
D.current = S?.initialSelection;
|
|
275
275
|
const te = { ...n, editMode: S?.editMode ?? !1 };
|
|
276
276
|
S?.text !== void 0 && (te.dirty = S.text), te.editMode === n.editMode && te.dirty === n.dirty || (ee(te), oe?.(te));
|
|
@@ -287,13 +287,13 @@ const $n = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), _s = Object.fr
|
|
|
287
287
|
z.textValue, S && S.setSelectionRange(B.start, B.end, B.direction);
|
|
288
288
|
}, [y.current, B, z.textValue]);
|
|
289
289
|
const ne = ye(() => {
|
|
290
|
-
const S = W?.clean(), te = z.style.createTemporaryTextFrame(z.textValue, S?.getType() === Pn.String),
|
|
290
|
+
const S = W?.clean(), te = z.style.createTemporaryTextFrame(z.textValue, S?.getType() === Pn.String), N = s ? S.getInsets().right + S.getInsets().left : 0;
|
|
291
291
|
let Z = null;
|
|
292
|
-
return z.isWrapped && (Z = { width:
|
|
293
|
-
}, [z,
|
|
292
|
+
return z.isWrapped && (Z = { width: F - N }), te.layout(Z);
|
|
293
|
+
}, [z, F, W, s]), xe = ie(() => Math.ceil(ne?.lines[0]?.bounds.height), [ne]);
|
|
294
294
|
Ot(() => {
|
|
295
295
|
if (!ne) return;
|
|
296
|
-
const S = z.style, te = S.getInsets() ?? Wn.EmptyRect,
|
|
296
|
+
const S = z.style, te = S.getInsets() ?? Wn.EmptyRect, N = s ? te.left + te.right : 0, Z = s ? 0.04 * S.getFont().getSize() : 1, a = Math.round(z.isWrapped ? void 0 : ne.bounds.width + N + Z), k = Math.round(ne.bounds.height);
|
|
297
297
|
E?.({ width: a, height: k });
|
|
298
298
|
}, [ne, E, z, s, W]);
|
|
299
299
|
const oe = ie(l, [l]), _ = ie((S) => {
|
|
@@ -321,7 +321,7 @@ const $n = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), _s = Object.fr
|
|
|
321
321
|
let I = 0;
|
|
322
322
|
return ur(f, f.dirty) && !isNaN(parseFloat(S.key)) ? (f.dirty?.endsWith("%") ? f.dirty = (f.dirty.substring(0, f.dirty.length - 1) ?? "") + S.key + "%" : f.dirty = (f.dirty ?? "") + S.key + "%", I = f.dirty.length - 1) : S.nativeEvent.key === "Backspace" ? (f.dirty = "", I = f.dirty.length) : (f.dirty = (f.dirty ?? "") + S.key, I = f.dirty.length), y.current.value = f?.dirty, D.current = { start: I, end: I, direction: "forward" }, y.current?.setSelectionRange(I, I, "forward"), ee(f), oe?.(f), void S.preventDefault();
|
|
323
323
|
}
|
|
324
|
-
const te = S.nativeEvent.ctrlKey,
|
|
324
|
+
const te = S.nativeEvent.ctrlKey, N = S.nativeEvent.shiftKey, Z = S.nativeEvent.altKey, a = S.nativeEvent.metaKey;
|
|
325
325
|
if (te && S.key === "z" && S.stopPropagation(), S.which === zt.Escape) return S.preventDefault(), void fe();
|
|
326
326
|
if (S.which === zt.F2) return ae(!0), void S.preventDefault();
|
|
327
327
|
const k = S.target;
|
|
@@ -332,9 +332,9 @@ const $n = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), _s = Object.fr
|
|
|
332
332
|
` + z.textValue.substring(k.selectionEnd);
|
|
333
333
|
return _(f), void O({ start: k.selectionStart + 1, end: k.selectionStart + 1, direction: k.selectionDirection });
|
|
334
334
|
}
|
|
335
|
-
return void (Ie() && u.getSelection().traverse(we.Orientation.Column,
|
|
335
|
+
return void (Ie() && u.getSelection().traverse(we.Orientation.Column, N));
|
|
336
336
|
}
|
|
337
|
-
if (S.which === zt.Tab) return S.preventDefault(), void (Ie() && u.getSelection().traverse(we.Orientation.Row,
|
|
337
|
+
if (S.which === zt.Tab) return S.preventDefault(), void (Ie() && u.getSelection().traverse(we.Orientation.Row, N));
|
|
338
338
|
let T = null;
|
|
339
339
|
switch (S.which) {
|
|
340
340
|
case zt.Left:
|
|
@@ -349,7 +349,7 @@ const $n = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), _s = Object.fr
|
|
|
349
349
|
case zt.Down:
|
|
350
350
|
T = we.Direction.Down;
|
|
351
351
|
}
|
|
352
|
-
if (T && !(te ||
|
|
352
|
+
if (T && !(te || N || Z || a) && !W.editMode)
|
|
353
353
|
return void Ie();
|
|
354
354
|
W.editMode && (T || Ci.includes(S.which)) && S.stopPropagation();
|
|
355
355
|
}, [W, u, z]), ve = Xe(() => {
|
|
@@ -362,8 +362,8 @@ const $n = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), _s = Object.fr
|
|
|
362
362
|
const S = y.current?.value;
|
|
363
363
|
let te = "";
|
|
364
364
|
if (d.rowIndex > 0) {
|
|
365
|
-
const
|
|
366
|
-
|
|
365
|
+
const N = u.getRange({ rowIndex: d.rowIndex - 1, colIndex: d.colIndex }).getCell();
|
|
366
|
+
N && (te = N.toTextUnformatted(!0));
|
|
367
367
|
}
|
|
368
368
|
_(S + te);
|
|
369
369
|
}, [d, u]);
|
|
@@ -380,20 +380,20 @@ const $n = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), _s = Object.fr
|
|
|
380
380
|
}, [u]), ke = ye(() => ({ element: () => y.current, doCopy: (S) => {
|
|
381
381
|
const te = y.current.value.substring(y.current.selectionStart, y.current.selectionEnd);
|
|
382
382
|
if (S?.isCut) {
|
|
383
|
-
const
|
|
384
|
-
_(
|
|
383
|
+
const N = y.current.value.substring(0, y.current.selectionStart) + y.current.value.substring(y.current.selectionEnd, y.current.value.length);
|
|
384
|
+
_(N);
|
|
385
385
|
}
|
|
386
386
|
return te;
|
|
387
387
|
} }), [y.current]), de = ye(() => ({ element: () => y.current, doPaste: async (S, te) => {
|
|
388
|
-
const
|
|
389
|
-
if (!
|
|
390
|
-
const Z = y.current.value.substring(0, y.current.selectionStart) +
|
|
391
|
-
return _(Z), O({ start: y.current.selectionStart +
|
|
388
|
+
const N = await S.toText?.();
|
|
389
|
+
if (!N) return !0;
|
|
390
|
+
const Z = y.current.value.substring(0, y.current.selectionStart) + N + y.current.value.substring(y.current.selectionEnd, y.current.value.length);
|
|
391
|
+
return _(Z), O({ start: y.current.selectionStart + N.length, end: y.current.selectionStart + N.length, direction: "forward" }), !0;
|
|
392
392
|
} }), [y.current]), Se = ye(() => ({ contains: (S) => y.current?.contains(S) || !1, focus() {
|
|
393
393
|
y.current.focus();
|
|
394
394
|
} }), []), Le = ye(() => [new Ue("selectAll", Se, { label: "Select All", description: "Select all of the text in cell.", shortcut: { key: "a", modifiers: [Q.Ctrl] } }, ve), new Ue("startEditValueAbove", Se, { label: "Copy From Above", description: "Copy the value from the cell above the active cell into the cell or the formula bar.", shortcut: [{ key: '"', modifiers: [Q.Ctrl] }, { key: '"', modifiers: [Q.Ctrl, Q.Shift] }] }, De), new Ue("startEditCurrentTime", Se, { label: "Current Time", description: "Insert the current time.", shortcut: { key: "Semicolon", modifiers: [Q.Ctrl, Q.Shift] } }, ge), new Ue("startEditCurrentDate", Se, { label: "Current Date", description: "Insert the current date.", shortcut: { key: "Semicolon", modifiers: [Q.Ctrl] } }, ce), new Y("relativeReferencesToggle", Se, { label: "Toggle References", description: "Toggles cell references from relative to absolute, to partially absolute, back to relative again.", shortcut: { key: "F4" } }, _e), new Y("toggleEditorFocus", Se, { label: "Toggle Editor Focus", description: "Moves focus between editors such as formula editor and inline editor.", shortcut: { key: "F2", modifiers: [Q.Ctrl] } })], []), qe = ye(() => {
|
|
395
395
|
let S = null;
|
|
396
|
-
const te = () => ({ contains: (
|
|
396
|
+
const te = () => ({ contains: (N) => y.current?.contains(N) || !1, focus() {
|
|
397
397
|
y.current.focus();
|
|
398
398
|
} });
|
|
399
399
|
return S = R ? R.createChildGroup(te, "editor", !1) : new yo(te, "editor"), S.addCommands(Le, !0), S;
|
|
@@ -407,25 +407,25 @@ const $n = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), _s = Object.fr
|
|
|
407
407
|
$(!0), qe?.activate();
|
|
408
408
|
const te = D.current;
|
|
409
409
|
if (te !== !1) {
|
|
410
|
-
let
|
|
410
|
+
let N, Z;
|
|
411
411
|
const a = y.current.value;
|
|
412
|
-
ur(W, a) && (
|
|
412
|
+
ur(W, a) && (N = a.length - 1, Z = a.length - 1), N = te?.start ?? N ?? a.length, Z = te?.end ?? Z ?? a.length, D.current = !1, O({ start: N, end: Z, direction: "forward" });
|
|
413
413
|
}
|
|
414
414
|
A?.(S);
|
|
415
415
|
}, [A, W]), Ke = z.insets;
|
|
416
416
|
let ut = Ke.left + 1;
|
|
417
417
|
const Qe = Ke.left + Ke.right + 2 - 1, K = ne?.bounds.height ?? 0;
|
|
418
418
|
let Fe, je = Ke.top;
|
|
419
|
-
z.frameVertAlign === pe.VerticalAlignment.Center ? je = Math.max(0, (x - (Ke.top + Ke.bottom) - K) / 2) : z.frameVertAlign === pe.VerticalAlignment.Bottom && (je = Math.max(0, x - (Ke.top + Ke.bottom) - K)),
|
|
419
|
+
z.frameVertAlign === pe.VerticalAlignment.Center ? je = Math.max(0, (x - (Ke.top + Ke.bottom) - K) / 2) : z.frameVertAlign === pe.VerticalAlignment.Bottom && (je = Math.max(0, x - (Ke.top + Ke.bottom) - K)), L !== void 0 && ne?.lines[0]?.bounds && (Fe = ne?.lines[0]?.bounds.height * L);
|
|
420
420
|
const Ae = z.style.getFont();
|
|
421
421
|
let Ve = Ae.getSize();
|
|
422
|
-
Ae.isSuperSub() && (Ve *= Ae.getSuperSubScale()), Ve *= dt.getDeviceScale() *
|
|
423
|
-
const Oe = s ? Ae.toCSS(M,
|
|
422
|
+
Ae.isSuperSub() && (Ve *= Ae.getSuperSubScale()), Ve *= dt.getDeviceScale() * v;
|
|
423
|
+
const Oe = s ? Ae.toCSS(M, v) : null;
|
|
424
424
|
return p("div", { className: "sheet-cell-editor", onMouseDown: (S) => {
|
|
425
425
|
y.current && document.activeElement !== y.current && requestAnimationFrame(() => {
|
|
426
426
|
y.current.focus();
|
|
427
427
|
});
|
|
428
|
-
}, ref: V, ...
|
|
428
|
+
}, ref: V, ...w, style: { display: "flex", flexGrow: 1, alignSelf: "stretch", height: "100%", width: "100%", maxWidth: "100%", maxHeight: "100%", cursor: "initial", ...P }, children: p("div", { className: "editor-placement", style: { display: "flex", flexGrow: 1, position: "relative", top: je * v + 1, left: ut * v, width: `calc(100% - ${Qe * v}px)`, maxWidth: `calc(100% - ${Qe * v}px)`, height: (Fe ?? K) * v, maxHeight: (Fe ?? K) * v }, children: p("textarea", { spellCheck: "false", placeholder: z.placeholder, ref: y, value: z.textValue, disabled: We, readOnly: U || u.getProtection().isReadOnly(), name: "sheet-cell-editor", autoComplete: "off", autoCapitalize: "off", style: { flex: "1 1 100%", font: "inherit", ...Oe, fontSize: Ve ? `${Ve}px` : "inherit", textAlign: z.textAlign, lineHeight: (ne?.lines[0]?.bounds.height ?? 0) * v + "px", height: (ne?.bounds.height ?? 0) * v, boxSizing: "border-box", padding: "0px", margin: "0px", borderWidth: 0, outline: "none", resize: "none", overflow: "hidden", background: "transparent", maxHeight: "100%", maxWidth: "100%", width: "100%", userSelect: "text", position: "absolute", whiteSpace: z.isWrapped ? "normal" : "pre", wordWrap: "break-word" }, onFocus: m, onBlur: () => {
|
|
429
429
|
$(!1);
|
|
430
430
|
}, onSelect: (S) => {
|
|
431
431
|
}, onChange: (S) => {
|
|
@@ -435,12 +435,12 @@ const $n = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), _s = Object.fr
|
|
|
435
435
|
}, onKeyDown: Ge }) }) });
|
|
436
436
|
})), xi = (e, t) => ({ clean: e, dirty: t, editMode: !1 }), ki = (e) => {
|
|
437
437
|
const { length: t = 0, width: n = 1, dashArray: r = null, dashArrayAdditional: l = null, isDouble: o = !1, isAngled: i = !1, offsetX: c = 0, offsetY: g = 0, isVertical: s = !1, ...b } = e, d = (P) => {
|
|
438
|
-
let
|
|
438
|
+
let v = null;
|
|
439
439
|
if (P && n > 0) {
|
|
440
|
-
|
|
441
|
-
for (let
|
|
440
|
+
v = "";
|
|
441
|
+
for (let L = 0; L < P.length; L++) v += P[L], L < P.length - 1 && (v += ",");
|
|
442
442
|
}
|
|
443
|
-
return
|
|
443
|
+
return v;
|
|
444
444
|
}, u = d(r);
|
|
445
445
|
let R = u;
|
|
446
446
|
l && (R = d(l));
|
|
@@ -448,14 +448,14 @@ const $n = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), _s = Object.fr
|
|
|
448
448
|
if (o) {
|
|
449
449
|
q = Math.floor(n / 2);
|
|
450
450
|
const P = q + q / 2 + 1;
|
|
451
|
-
let
|
|
452
|
-
|
|
451
|
+
let v = null;
|
|
452
|
+
v = s ? `M ${it.boundPixel(c + P)} ${it.boundPixel(g)} L ${it.boundPixel(c + P)} ${it.boundPixel(g + E)}` : `M ${it.boundPixel(c)} ${it.boundPixel(g + P)} L ${it.boundPixel(c + E)} ${it.boundPixel(g + P)}`, A = p("path", { strokeWidth: q, strokeDasharray: R, d: v, ...b });
|
|
453
453
|
}
|
|
454
454
|
if (i) {
|
|
455
455
|
q = n / 2;
|
|
456
456
|
const P = q + q / 2;
|
|
457
|
-
let
|
|
458
|
-
|
|
457
|
+
let v = R, L = null;
|
|
458
|
+
L = s ? `M ${it.boundPixel(c + P)} ${it.boundPixel(g)} L ${it.boundPixel(c + P)} ${it.boundPixel(g + E)}` : `M ${it.boundPixel(c)} ${it.boundPixel(g + P)} L ${it.boundPixel(c + E)} ${it.boundPixel(g + P)}`, A = p("path", { strokeWidth: q, strokeDasharray: v, strokeDashoffset: "1", shapeRendering: "crispEdges", d: L, ...b });
|
|
459
459
|
}
|
|
460
460
|
let U = null;
|
|
461
461
|
return U = s ? `M ${it.boundPixel(c + q / 2)} ${it.boundPixel(g)} L ${it.boundPixel(c + q / 2)} ${it.boundPixel(g + E)}` : `M ${it.boundPixel(c)} ${it.boundPixel(g + q / 2)} L ${it.boundPixel(c + E)} ${it.boundPixel(g + q / 2)}`, Je(bn, { children: [p("path", { strokeWidth: q, strokeDasharray: u, d: U, ...b }), A] });
|
|
@@ -502,12 +502,12 @@ const an = al && window.ResizeObserver !== void 0 ? function() {
|
|
|
502
502
|
if (!d) return null;
|
|
503
503
|
const u = n[0], R = n[1], q = n[2], E = n[3];
|
|
504
504
|
let A = 1 + (g ? E - R : q - u), U = 0;
|
|
505
|
-
const P = l.getColor().toRGBA(o).toString(),
|
|
506
|
-
let
|
|
507
|
-
const
|
|
505
|
+
const P = l.getColor().toRGBA(o).toString(), v = d.description.toLowerCase().includes("double");
|
|
506
|
+
let L, C;
|
|
507
|
+
const w = g ? "rowStart" : "colStart", x = g ? "rowEnd" : "colEnd", F = g ? R : u;
|
|
508
508
|
if (s?.length > 0) {
|
|
509
509
|
const $ = s[0];
|
|
510
|
-
if ($?.range[
|
|
510
|
+
if ($?.range[w] === r[w]) {
|
|
511
511
|
const O = At.BuiltInDefinitions.get($.stroke.getStyle());
|
|
512
512
|
U = Math.floor(O.width / 2);
|
|
513
513
|
}
|
|
@@ -515,23 +515,23 @@ const an = al && window.ResizeObserver !== void 0 ? function() {
|
|
|
515
515
|
const O = At.BuiltInDefinitions.get(s[s.length - 1].stroke.getStyle());
|
|
516
516
|
A = Math.floor(A + (O.width === 2 ? 0 : O.width / 2));
|
|
517
517
|
}
|
|
518
|
-
if (
|
|
518
|
+
if (v) {
|
|
519
519
|
const O = g ? "colStart" : "rowStart", W = g ? "colEnd" : "rowEnd", ee = g ? b?.getRowOffset : b?.getColOffset;
|
|
520
520
|
let z = 0, y = 0;
|
|
521
|
-
|
|
521
|
+
L = [], C = [];
|
|
522
522
|
for (let V = 0; V < s.length; V++) {
|
|
523
523
|
const ne = s[V];
|
|
524
524
|
if (ne.stroke.getStyle() === At.StrokeStyle.Double && ee) {
|
|
525
|
-
const xe = ee(ne.range[
|
|
526
|
-
ne.range[O] < r[O] && (
|
|
525
|
+
const xe = ee(ne.range[w]) - (F - U);
|
|
526
|
+
ne.range[O] < r[O] && (L.push(xe - z), z = xe, L.push(1), z++), ne.range[W] > r[W] && (C.push(xe - y), y = xe, C.push(1), y++);
|
|
527
527
|
}
|
|
528
528
|
}
|
|
529
|
-
|
|
529
|
+
L.length > 0 && z < A && L.push(A - z), C.length > 0 && y < A && C.push(A - y);
|
|
530
530
|
}
|
|
531
531
|
}
|
|
532
532
|
let M = g ? -Math.floor(d.width / 2) : -U, D = g ? -U : -Math.floor(d.width / 2);
|
|
533
533
|
const G = c && d.width > 2 ? -1 : 0;
|
|
534
|
-
return p(ki, { offsetX: u + M + G, offsetY: R + D + G, length: A + U, isVertical: g, stroke: P, width: d.width, dashArray:
|
|
534
|
+
return p(ki, { offsetX: u + M + G, offsetY: R + D + G, length: A + U, isVertical: g, stroke: P, width: d.width, dashArray: L ?? d.pattern, dashArrayAdditional: C, isDouble: v, isAngled: d.description.toLowerCase().includes("slant") }, t);
|
|
535
535
|
}, sl = ({ getBorderAt: e, borderRenderer: t = Ei, getVisibleCells: n, darkMode: r, forceThinBorder: l = !1, defaultColor: o = "black", shiftIfWide: i = !1 }) => {
|
|
536
536
|
const c = ie(n, [n]);
|
|
537
537
|
return { overlay: ye(() => (s) => {
|
|
@@ -541,7 +541,7 @@ const an = al && window.ResizeObserver !== void 0 ? function() {
|
|
|
541
541
|
if (d.length === 0) return;
|
|
542
542
|
const u = s.getVisibleColumnOffsets(), R = s.getVisibleRowOffsets();
|
|
543
543
|
let q = [], E = [];
|
|
544
|
-
const A = s.getVisibleColumns(), U = s.getVisibleRows(), P = [],
|
|
544
|
+
const A = s.getVisibleColumns(), U = s.getVisibleRows(), P = [], v = [], L = [], C = (M, D, G, $, B, O, W) => {
|
|
545
545
|
const ee = { index: $, stroke: B, visibleIndex: G, edge: O, length: W };
|
|
546
546
|
M[D] || (M[D] = []), M[D].length > 0 && M[D][M[D].length - 1]?.index === $ ? M[D][M[D].length - 1] = ee : M[D].push(ee);
|
|
547
547
|
};
|
|
@@ -565,9 +565,9 @@ const an = al && window.ResizeObserver !== void 0 ? function() {
|
|
|
565
565
|
let ae = 1, ze = 1;
|
|
566
566
|
if (!ee || !z) continue;
|
|
567
567
|
const Ie = ee.spanIndex, fe = z.spanIndex;
|
|
568
|
-
ne.isNone() || C(P, Ie, fe, W, ne, At.Edge.Left, ae), xe.isNone() || C(
|
|
568
|
+
ne.isNone() || C(P, Ie, fe, W, ne, At.Edge.Left, ae), xe.isNone() || C(v, fe, Ie, O, xe, At.Edge.Top, ze), oe.isNone() || C(P, Ie + ze, fe, W, oe, At.Edge.Right, ae), _.isNone() || C(v, fe + ae, Ie, O, _, At.Edge.Bottom, ze);
|
|
569
569
|
}
|
|
570
|
-
const
|
|
570
|
+
const w = (M, D, G) => {
|
|
571
571
|
const $ = [];
|
|
572
572
|
return M.forEach((B, O) => {
|
|
573
573
|
let W = null;
|
|
@@ -592,29 +592,29 @@ const an = al && window.ResizeObserver !== void 0 ? function() {
|
|
|
592
592
|
}), $;
|
|
593
593
|
};
|
|
594
594
|
q = q.sort(Di), E = E.sort(Mi);
|
|
595
|
-
const x =
|
|
596
|
-
if (x.length === 0 &&
|
|
597
|
-
for (let M = 0; M <
|
|
598
|
-
const D =
|
|
595
|
+
const x = w(P, A, !1), F = w(v, U, !0);
|
|
596
|
+
if (x.length === 0 && F.length === 0) return null;
|
|
597
|
+
for (let M = 0; M < F.length; M++) {
|
|
598
|
+
const D = F[M];
|
|
599
599
|
let G = rt.findEqualOrGreater(x, D.from, (B) => B.index), $ = !1;
|
|
600
600
|
for (; !$; ) {
|
|
601
601
|
const B = x[G++];
|
|
602
602
|
B && B.index >= D.from && B.index <= D.to + 1 && B.from <= D.index && B.to + 1 >= D.index && (D.intersections.push({ stroke: B.stroke, range: { rowStart: B.from, rowEnd: B.to + 1, colStart: B.index, colEnd: B.index } }), B.intersections.push({ stroke: D.stroke, range: { rowStart: D.index, rowEnd: D.index, colStart: D.from, colEnd: D.to + 1 } })), $ = !B || B.index > D.to + 1;
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
|
-
for (let M = 0; M <
|
|
606
|
-
const D =
|
|
605
|
+
for (let M = 0; M < F.length; M++) {
|
|
606
|
+
const D = F[M];
|
|
607
607
|
let G = D.stroke;
|
|
608
608
|
const $ = `rBorder:${D.index}:${D.from}:${D.to}:${D.edge}`, B = { rowStart: D.index, rowEnd: D.index, colStart: D.from, colEnd: D.to + 1 }, O = s.getLayout(), W = !1, ee = O.getColOffset(B.colStart), z = O.getRowOffset(B.rowStart), y = [ee, z, O.getColOffset(B.colEnd), z];
|
|
609
|
-
|
|
609
|
+
L.push(t({ key: $, points: y, stroke: G, darkMode: r, forceThinBorder: l, shiftIfWide: i, range: B, intersections: D.intersections, layout: O, isVertical: W }));
|
|
610
610
|
}
|
|
611
611
|
for (let M = 0; M < x.length; M++) {
|
|
612
612
|
const D = x[M];
|
|
613
613
|
let G = D.stroke;
|
|
614
614
|
const $ = `cBorder:${D.index}:${D.from}:${D.to}:${D.edge}`, B = { rowStart: D.from, rowEnd: D.to + 1, colStart: D.index, colEnd: D.index }, O = s.getLayout(), W = !0, ee = O.getColOffset(B.colStart), z = [ee, O.getRowOffset(B.rowStart), ee, O.getRowOffset(B.rowEnd)];
|
|
615
|
-
|
|
615
|
+
L.push(t({ key: $, stroke: G, points: z, darkMode: r, forceThinBorder: l, shiftIfWide: i, range: B, intersections: D.intersections, layout: O, isVertical: W }));
|
|
616
616
|
}
|
|
617
|
-
return p("svg", { width: `${b.width}`, height: `${b.height}`, viewBox: `0 0 ${b.width} ${b.height}`, preserveAspectRatio: "none", shapeRendering: "crispEdges", style: { position: "absolute", left: "0px", top: "0px", width: `${b.width}px`, height: `${b.height}px`, pointerEvents: "none", transitionTimingFunction: "linear", transitionDelay: "0", transitionProperty: "left, top, width, height", willChange: "left, top, width, height, stroke-dashoffset", overflow: "visible" }, children:
|
|
617
|
+
return p("svg", { width: `${b.width}`, height: `${b.height}`, viewBox: `0 0 ${b.width} ${b.height}`, preserveAspectRatio: "none", shapeRendering: "crispEdges", style: { position: "absolute", left: "0px", top: "0px", width: `${b.width}px`, height: `${b.height}px`, pointerEvents: "none", transitionTimingFunction: "linear", transitionDelay: "0", transitionProperty: "left, top, width, height", willChange: "left, top, width, height, stroke-dashoffset", overflow: "visible" }, children: L }, "borders");
|
|
618
618
|
}, [e, r]) };
|
|
619
619
|
}, hr = yt.Center, Ai = Object.freeze({ horizontal: !1, vertical: !1 }), mr = Wn.EmptyTopLeft, zi = (e, t) => qt.EmptyCell, Ii = (e, t) => new Promise((n, r) => {
|
|
620
620
|
r("StaticBorderRenderer does not support scrolling");
|
|
@@ -626,7 +626,7 @@ const an = al && window.ResizeObserver !== void 0 ? function() {
|
|
|
626
626
|
W.push({ coords: y, value: y });
|
|
627
627
|
}
|
|
628
628
|
return W;
|
|
629
|
-
}, []), P = Xe((W) => U, [U]), { overlay:
|
|
629
|
+
}, []), P = Xe((W) => U, [U]), { overlay: v } = sl({ getVisibleCells: P, getBorderAt: t, darkMode: c, forceThinBorder: g }), L = Math.floor(E / i), C = Math.floor(A / o), w = { getColOffset: (W) => Math.ceil(W * L) + 0, getRowOffset: (W) => Math.ceil(W * C) + 0, getColIndex: (W) => Math.floor((W - 0) / L) - 1, getRowIndex: (W) => Math.floor((W - 0) / C) - 1 }, x = { rowStart: 0, colStart: 0, rowEnd: o, colEnd: i }, F = { x: 0, y: 0, width: Math.max(0, E) + 0, height: Math.max(0, A) + 0 }, M = ye(() => {
|
|
630
630
|
const W = {}, ee = Math.floor(E / i);
|
|
631
631
|
for (let z = 0; z < i; z++) W[z] = { offset: z * ee, size: ee, spanIndex: z };
|
|
632
632
|
return W;
|
|
@@ -635,8 +635,8 @@ const an = al && window.ResizeObserver !== void 0 ? function() {
|
|
|
635
635
|
for (let z = 0; z < o; z++) W[z] = { offset: z * ee, size: ee, spanIndex: z };
|
|
636
636
|
return W;
|
|
637
637
|
}, [E, A]);
|
|
638
|
-
if (!
|
|
639
|
-
const G = { width: E, height: A }, $ = { width: E, height: A }, B = { getStage: () => d.current, getTotalSize: () => G, getViewportSize: () => $, getLayout: () =>
|
|
638
|
+
if (!v) return null;
|
|
639
|
+
const G = { width: E, height: A }, $ = { width: E, height: A }, B = { getStage: () => d.current, getTotalSize: () => G, getViewportSize: () => $, getLayout: () => w, getCellCoordsAsRangeCoords: qt.cellToRange, getVisibleRangeCoords: () => x, getVisibleRows: () => {
|
|
640
640
|
const W = [];
|
|
641
641
|
for (let ee = 0; ee < o; ee++) W.push(ee);
|
|
642
642
|
return W;
|
|
@@ -644,7 +644,7 @@ const an = al && window.ResizeObserver !== void 0 ? function() {
|
|
|
644
644
|
const W = [];
|
|
645
645
|
for (let ee = 0; ee < i; ee++) W.push(ee);
|
|
646
646
|
return W;
|
|
647
|
-
}, toClipBounds: (W, ee) =>
|
|
647
|
+
}, toClipBounds: (W, ee) => F, toViewBounds: (W) => W, toAbsoluteBounds: (W) => W, getBounds: () => F, getInsets: () => null, getRangeCoordsBounds: (W, ee) => null, getVisibleColumnOffsets: () => M, getVisibleRowOffsets: () => D, allViews: () => ({ [hr]: B }), getAnchor: () => hr, getZoom: () => 1, scrollCellCoordsIntoView: Ii, getCellCoordsFromClient: zi, getScrollOrientation: () => Ai, getScrollTopLeft: () => mr, getFreezeTopLeft: () => mr }, O = v(B);
|
|
648
648
|
return Je("div", { style: { ...l, position: "relative", display: "flex" }, ...b, children: [p("div", { ref: Cn([d, u]), style: { flex: "1 1 100%", display: "flex", maxWidth: "100%", maxHeight: "100%" }, children: s }), O] });
|
|
649
649
|
});
|
|
650
650
|
function dl(e) {
|
|
@@ -672,18 +672,19 @@ const Fi = "_sheetxl-sheet_1qeq6_5", Ni = "_viewport-overlay_1qeq6_6", Li = (e)
|
|
|
672
672
|
})();
|
|
673
673
|
}, []);
|
|
674
674
|
const [b, d] = tt.useState(!1), u = { opacity: 0.65 }, R = tt.useMemo(() => {
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
675
|
+
const C = g?.exceptions(), w = C?.length ?? 0;
|
|
676
|
+
if (w === 0) return null;
|
|
677
|
+
const x = [];
|
|
678
|
+
for (let F = 0; F < w; F++) {
|
|
679
|
+
const M = C[F];
|
|
680
|
+
x.push(p("div", { style: { opacity: 0.8, fontSize: "16px", textAlign: "left", color: n }, children: M }, F));
|
|
680
681
|
}
|
|
681
|
-
return
|
|
682
|
+
return x;
|
|
682
683
|
}, [g, n]);
|
|
683
|
-
if (g
|
|
684
|
-
const q = g.type(), E = !R && q.endsWith("ity"), A = g.licensee(), U = E ? 1.6 : 1, P = 135 / U,
|
|
685
|
-
let
|
|
686
|
-
return !q && A?.length > 0 && (
|
|
684
|
+
if (g === null || g.isValidFor(o)) return null;
|
|
685
|
+
const q = g.type(), E = !R && q.endsWith("ity"), A = g.licensee(), U = E ? 1.6 : 1, P = 135 / U, v = 37 / U;
|
|
686
|
+
let L = null;
|
|
687
|
+
return !q && A?.length > 0 && (L = p("div", { style: { opacity: 0.7, fontWeight: "500", fontSize: "16px", textAlign: "left", color: t }, children: A })), p("div", { style: { pointerEvents: "none", display: "flex", flexDirection: "column", overflow: "hidden", ...i }, ...c, children: Je("div", { style: { position: "relative", display: "flex", flexDirection: "column" }, children: [b ? p(Li, { style: u }) : p("svg", { width: P, height: v, style: u, children: p("image", { style: { width: P, height: v }, href: "https://www.sheetxl.com/watermark.svg", onError: () => d(!0) }) }), Je("div", { children: [L, R, p("div", { style: { height: "0px", fontSize: "16px", textAlign: "left", width: "0px", opacity: 0.8, color: r }, children: l })] })] }) });
|
|
687
688
|
}), ht = (e, t, n) => {
|
|
688
689
|
const r = Te(t);
|
|
689
690
|
r.current = t;
|
|
@@ -726,18 +727,18 @@ const Fi = "_sheetxl-sheet_1qeq6_5", Ni = "_viewport-overlay_1qeq6_6", Li = (e)
|
|
|
726
727
|
}, [e, t]);
|
|
727
728
|
}, lo = new Xr("transparent");
|
|
728
729
|
function Bi(e) {
|
|
729
|
-
const { sheet: t, onRepeatCommandChange: n, bodyStyle: r, commands: l, target: o, notifier: i, onStartEdit: c, getViewport: g } = e, [s, b] = ue(null), [d, u] = ue(null), R = Te(null), q = ie(c, [c]), E = ie(g, [g]), [A, U] = ue(), [P,
|
|
730
|
-
Te(
|
|
731
|
-
const x = ti(), [
|
|
730
|
+
const { sheet: t, onRepeatCommandChange: n, bodyStyle: r, commands: l, target: o, notifier: i, onStartEdit: c, getViewport: g } = e, [s, b] = ue(null), [d, u] = ue(null), R = Te(null), q = ie(c, [c]), E = ie(g, [g]), [A, U] = ue(), [P, v] = ue(() => t?.getStyles().parseColor(Kl.Scheme.Bg2)), [L, C] = ue(() => t?.getStyles().getNormal().getFont().getFill()), w = dn();
|
|
731
|
+
Te(w.getMode()).current = w.getMode();
|
|
732
|
+
const x = ti(), [F, M] = ue(rt.EmptyArray), D = Xe(() => {
|
|
732
733
|
if (R.current !== t) return;
|
|
733
734
|
const a = t.getSelectedRanges();
|
|
734
735
|
let k = null;
|
|
735
|
-
|
|
736
|
+
F.length > 0 && qt.isCellWithinRange(s, F[0].getRange().getCoords()) && (k = F[0]);
|
|
736
737
|
const T = t?.getSelectedCell(), f = T?.getCoords() ?? null;
|
|
737
738
|
Nn(() => {
|
|
738
739
|
ne(k), b(f), u(a);
|
|
739
740
|
});
|
|
740
|
-
}, [t,
|
|
741
|
+
}, [t, F, d, s]), G = Xe(rt.debounce(D, 210), [D]);
|
|
741
742
|
be(() => {
|
|
742
743
|
R.current = t, D();
|
|
743
744
|
}, [t]);
|
|
@@ -745,7 +746,7 @@ function Bi(e) {
|
|
|
745
746
|
const h = a?.label?.(), H = async () => {
|
|
746
747
|
const le = await Promise.resolve(I && i?.showBusy?.(h ?? "Busy..."));
|
|
747
748
|
try {
|
|
748
|
-
await t.doBatch(async () => k(t), h), f &&
|
|
749
|
+
await t.doBatch(async () => k(t), h), f && w.setMode(null), le && le();
|
|
749
750
|
} catch (se) {
|
|
750
751
|
if (le && le(), !se) return;
|
|
751
752
|
i?.showError?.(se);
|
|
@@ -790,16 +791,16 @@ function Bi(e) {
|
|
|
790
791
|
let h = I.getSelectedRanges();
|
|
791
792
|
T && (k === we.Orientation.Row ? h = h.getEntireRows(f) : k === we.Orientation.Column && (h = h.getEntireColumns(f)));
|
|
792
793
|
let H = null;
|
|
793
|
-
const j =
|
|
794
|
+
const j = w.getMode()?.key;
|
|
794
795
|
if (j === "copy" || j === "cut") {
|
|
795
796
|
const J = await x.getClipboard().readReference();
|
|
796
797
|
J && J.getItemType() === "range" && (H = J.getItem(), H.getCoords() || (H = null));
|
|
797
798
|
}
|
|
798
799
|
if (H) {
|
|
799
800
|
const J = await h.insertFrom(H, { ...H.getMarkOptions(), orientation: k, autoSelect: !0 });
|
|
800
|
-
!J || J.isEntireRows() || J.isEntireColumns() || J.autoFit({ orientations: we.Orientations.Row, minContent: !0 }),
|
|
801
|
+
!J || J.isEntireRows() || J.isEntireColumns() || J.autoFit({ orientations: we.Orientations.Row, minContent: !0 }), w.setMode(null);
|
|
801
802
|
} else h.insert(k, { autoSelect: !0 });
|
|
802
|
-
}, "Insert Cells", !1), [
|
|
803
|
+
}, "Insert Cells", !1), [w]), [V, ne] = ue(null), xe = ie((a) => t.getStyles().setDefaultTableStyle(a), [t]), oe = ie((a) => {
|
|
803
804
|
t.getStyles().getTableStyle(a)?.delete();
|
|
804
805
|
}, [t]), _ = ie((a, k) => {
|
|
805
806
|
B(a, async (T) => {
|
|
@@ -984,7 +985,7 @@ Continue?`, options: ["Convert", "Cancel"], defaultOption: "Convert" }) !== "Con
|
|
|
984
985
|
let k = null;
|
|
985
986
|
const T = E(), f = Math.min(T.width - 8, 480), I = Math.min(T.height - 8, 288);
|
|
986
987
|
try {
|
|
987
|
-
t.getSelectedRanges(), k = await t.getMovables().add({ bounds: { x: T.left + (T.width - f) / 2, y: T.top + (T.height - I) / 2, width: f, height: I }, type: "chart", json: a.template }), k.select(),
|
|
988
|
+
t.getSelectedRanges(), k = await t.getMovables().add({ bounds: { x: T.left + (T.width - f) / 2, y: T.top + (T.height - I) / 2, width: f, height: I }, type: "chart", json: a.template }), k.select(), w.setMode(null);
|
|
988
989
|
} catch (h) {
|
|
989
990
|
i?.showError?.(h);
|
|
990
991
|
}
|
|
@@ -994,7 +995,7 @@ Continue?`, options: ["Convert", "Cancel"], defaultOption: "Convert" }) !== "Con
|
|
|
994
995
|
const f = await i?.showBusy?.(a.label());
|
|
995
996
|
try {
|
|
996
997
|
const I = await t.getMovables().addImage(k, { autoSelect: !0, ...T });
|
|
997
|
-
return f(),
|
|
998
|
+
return f(), w.setMode(null), I;
|
|
998
999
|
} catch (I) {
|
|
999
1000
|
f();
|
|
1000
1001
|
let h = I;
|
|
@@ -1231,9 +1232,9 @@ All contents and formatting are removed.`, shortcut: { key: "Delete", modifiers:
|
|
|
1231
1232
|
for (let H = 0; h && H < a.length; H++) h = qt.isSingleCell(a[H]);
|
|
1232
1233
|
K(I), ut(k.length === 0 && !I && (f || !h));
|
|
1233
1234
|
}, [Ne, d, t]), Qr(l, null, { onChange: () => {
|
|
1234
|
-
const a = !t.getProtection().isFormatCellsAllowed(), k =
|
|
1235
|
-
m.getCommand("formatPainterToggle").update({ disabled: a || !l?.getCommand("copy"), state: () => k }).updateCallback(() => k ? void
|
|
1236
|
-
} }, [
|
|
1235
|
+
const a = !t.getProtection().isFormatCellsAllowed(), k = w.getMode()?.key === "formatPainter";
|
|
1236
|
+
m.getCommand("formatPainterToggle").update({ disabled: a || !l?.getCommand("copy"), state: () => k }).updateCallback(() => k ? void w.setMode(null) : m.getCommand("copy").execute({ editMode: { key: "formatPainter", description: "Use the mouse to apply the copied format to another selection.", cursor: `url("data:image/svg+xml,%3Csvg width='30' height='22' viewBox='0 0 30 22' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='M 26.737611,2.811068 V 2.0241451 c 0,-0.4328075 -0.354115,-0.7869227 -0.786923,-0.7869227 h -9.443074 c -0.432808,0 -0.786923,0.3541152 -0.786923,0.7869227 v 3.1476914 c 0,0.4328076 0.354115,0.7869235 0.786923,0.7869235 h 9.443074 c 0.432808,0 0.786923,-0.3541159 0.786923,-0.7869235 V 4.3849137 h 0.786923 v 3.1476915 h -7.869229 v 8.6561518 c 0,0.432808 0.354116,0.786923 0.786923,0.786923 h 1.573846 c 0.432807,0 0.786923,-0.354115 0.786923,-0.786923 V 9.1064513 H 29.09838 V 2.811068 Z M 10.714339,6.2116849 c -1.60877,0.0017 -3.2175361,0.00425 -4.8263048,0.00609 0.0012,1.5756989 0.00158,3.1513905 0.00244,4.7270891 -1.5978311,0.0017 -3.1956617,0.0034 -4.7934919,0.0043 0.00335,1.740011 0.00655,3.480012 0.00988,5.220023 1.5954589,0 3.1909181,0 4.7863775,0 -0.0017,1.606793 -0.00353,3.213585 -0.0051,4.820375 1.7440936,0.0016 3.4881881,0.0033 5.2322842,0.005 -0.0014,-1.608503 -0.0018,-3.217015 -0.0028,-4.825519 1.58518,0 3.17036,0 4.755543,0 0.0033,-1.741851 0.0073,-3.483705 0.01072,-5.225556 -1.58808,0 -3.176158,0 -4.764238,0 0,-1.5775391 0,-3.1550792 0,-4.7326117 -0.135065,1.3e-4 -0.270128,1.982e-4 -0.40519,4.047e-4 z' stroke='black' fill='white'/%3E%3C/g%3E%3C/svg%3E%0A") 7 12, pointer` } }));
|
|
1237
|
+
} }, [w, Le, l]), ht(t.getView(), { onFreezeSplitChange: () => {
|
|
1237
1238
|
We();
|
|
1238
1239
|
} }), ht(t.getSelection(), { onChange: () => {
|
|
1239
1240
|
G();
|
|
@@ -1277,13 +1278,13 @@ All contents and formatting are removed.`, shortcut: { key: "Delete", modifiers:
|
|
|
1277
1278
|
} }), be(() => {
|
|
1278
1279
|
Fe(), je();
|
|
1279
1280
|
}, [r]), be(() => {
|
|
1280
|
-
const a = !t.getProtection().isFormatCellsAllowed(), k =
|
|
1281
|
+
const a = !t.getProtection().isFormatCellsAllowed(), k = F.length > 0 && !V || a, T = Ie(V), f = { context: T };
|
|
1281
1282
|
m.getCommand("editTable").update(f), m.getCommand("deleteTable").update(f), m.getCommand("convertTableToRange").update(f);
|
|
1282
1283
|
const I = { context: T, disabled: k };
|
|
1283
|
-
m.getCommand("formatTableStyle").update({ label: V ? "Apply Table Style" : "Format As Table", ...I }), m.getCommand("formatTableStyleClearCellStyles").update(I), m.getCommand("deleteTableStyle").update(I), m.getCommand("convertTableToRange").update(I), m.getCommand("insertTable").update({ disabled: k ||
|
|
1284
|
-
const h = { context: T, disabled: k ||
|
|
1284
|
+
m.getCommand("formatTableStyle").update({ label: V ? "Apply Table Style" : "Format As Table", ...I }), m.getCommand("formatTableStyleClearCellStyles").update(I), m.getCommand("deleteTableStyle").update(I), m.getCommand("convertTableToRange").update(I), m.getCommand("insertTable").update({ disabled: k || F.length > 0 });
|
|
1285
|
+
const h = { context: T, disabled: k || F.length === 0 };
|
|
1285
1286
|
m.getCommand("tableHeaderRowToggle").update(h), m.getCommand("tableTotalRowToggle").update(h), m.getCommand("autoFilterToggle").update(h), m.getCommand("formatTableStyleClearTableStyle").update({ ...h, disabled: h.disabled || !V || V.getStyleOptions().name === null });
|
|
1286
|
-
}, [V,
|
|
1287
|
+
}, [V, F, Le]), be(() => {
|
|
1287
1288
|
m.getCommand("sheetZoomOut").updateCallback(() => {
|
|
1288
1289
|
t.getView().update({ zoomScale: rt.findNextStep(t.getView().getZoomScale(), !1) });
|
|
1289
1290
|
}), m.getCommand("sheetZoomIn").updateCallback(() => {
|
|
@@ -1326,7 +1327,7 @@ All contents and formatting are removed.`, shortcut: { key: "Delete", modifiers:
|
|
|
1326
1327
|
t.getView().setFreezePanes(null);
|
|
1327
1328
|
}).update({ disabled: () => !f() });
|
|
1328
1329
|
}, [Ne, s, t, r]);
|
|
1329
|
-
const Ae = $().getStyle(), Ve = Ae.getFont(), Oe = Ae.getAlignment(), S = Oe.getHorizontal(), te = Oe.getVertical(),
|
|
1330
|
+
const Ae = $().getStyle(), Ve = Ae.getFont(), Oe = Ae.getAlignment(), S = Oe.getHorizontal(), te = Oe.getVertical(), N = Oe.getOverflow(), Z = Oe.getRotation();
|
|
1330
1331
|
return be(() => {
|
|
1331
1332
|
m.getCommand("formatCellStyle").update({ context: () => ({ styles: () => t.getStyles(), named: () => $().getStyle(!0).getNamed(), bodyStyle: ze, createTemporaryCell: (He) => t.createTemporaryCell(He) }) }), m.getCommand("formatFillColor").update({ state: () => {
|
|
1332
1333
|
let He = null;
|
|
@@ -1335,13 +1336,13 @@ All contents and formatting are removed.`, shortcut: { key: "Delete", modifiers:
|
|
|
1335
1336
|
}, context: () => {
|
|
1336
1337
|
const He = t.getStyles();
|
|
1337
1338
|
return { onColorSelect: (at) => {
|
|
1338
|
-
|
|
1339
|
+
v(at ?? lo);
|
|
1339
1340
|
}, darkMode: r.darkMode, quickColor: P, autoColor: lo, schemeLookup: He.schemeLookup(), recentColors: He.recentColors(), addRecentColor: (at) => He.addRecentColor(at), clearRecentColors: () => He.clearRecentColors() };
|
|
1340
1341
|
} }), m.getCommand("formatFontColor").update({ state: () => Ve.toJSON()?.fill ? Ve.getFill() : null, context: () => {
|
|
1341
1342
|
const He = t.getStyles();
|
|
1342
1343
|
return { onColorSelect: (at) => {
|
|
1343
1344
|
C(at);
|
|
1344
|
-
}, darkMode: r.darkMode, quickColor:
|
|
1345
|
+
}, darkMode: r.darkMode, quickColor: L, autoColor: He.getNormal().getFont().getFill(), schemeLookup: He.schemeLookup(), recentColors: He.recentColors(), addRecentColor: (at) => He.addRecentColor(at), clearRecentColors: () => He.clearRecentColors() };
|
|
1345
1346
|
} }), m.getCommand("formatNumberFormat").update({ state: () => Ae.getNumberFormat(), context: () => $ }), m.getCommand("formatNumberDialog").update({ state: () => Ae.getNumberFormat(), context: () => $ }), m.getCommand("formatFontFamily").update({ state: () => Ve.getFamily() }), m.getCommand("formatFontSize").update({ state: () => Ve.getSize() });
|
|
1346
1347
|
const a = function() {
|
|
1347
1348
|
const He = Ve.getWeight() || 0;
|
|
@@ -1370,28 +1371,28 @@ All contents and formatting are removed.`, shortcut: { key: "Delete", modifiers:
|
|
|
1370
1371
|
}).update({ state: Ve.getVerticalAlignment() === dt.VerticalAlignment.Super }), m.getCommand("formatSubscriptToggle").updateCallback(function() {
|
|
1371
1372
|
O(this, { font: { verticalAlign: Ve.getVerticalAlignment() !== dt.VerticalAlignment.Sub ? dt.VerticalAlignment.Sub : dt.VerticalAlignment.Baseline } });
|
|
1372
1373
|
}).update({ state: Ve.getVerticalAlignment() === dt.VerticalAlignment.Sub });
|
|
1373
|
-
const T = () =>
|
|
1374
|
+
const T = () => N === pe.Overflow.Visible;
|
|
1374
1375
|
m.getCommand("formatTextOverflowVisibleToggle").updateCallback(function() {
|
|
1375
1376
|
O(this, { alignment: { overflow: (T(), pe.Overflow.Visible) } });
|
|
1376
1377
|
}).update({ state: T });
|
|
1377
|
-
const f = () =>
|
|
1378
|
+
const f = () => N === pe.Overflow.Wrap;
|
|
1378
1379
|
m.getCommand("formatTextOverflowWrapToggle").updateCallback(function() {
|
|
1379
1380
|
O(this, { alignment: { overflow: f() ? pe.Overflow.Visible : pe.Overflow.Wrap } });
|
|
1380
1381
|
}).update({ state: f });
|
|
1381
1382
|
const I = function() {
|
|
1382
|
-
return
|
|
1383
|
+
return N === pe.Overflow.Clip;
|
|
1383
1384
|
};
|
|
1384
1385
|
m.getCommand("formatTextOverflowClipToggle").updateCallback(function() {
|
|
1385
1386
|
O(this, { alignment: { overflow: I() ? pe.Overflow.Visible : pe.Overflow.Clip } });
|
|
1386
1387
|
}).update({ state: I });
|
|
1387
1388
|
const h = function() {
|
|
1388
|
-
return
|
|
1389
|
+
return N === pe.Overflow.Shrink;
|
|
1389
1390
|
};
|
|
1390
1391
|
m.getCommand("formatTextOverflowShrinkToggle").updateCallback(function() {
|
|
1391
1392
|
O(this, { alignment: { overflow: h() ? pe.Overflow.Visible : pe.Overflow.Shrink } });
|
|
1392
1393
|
}).update({ state: h });
|
|
1393
1394
|
const H = function() {
|
|
1394
|
-
return
|
|
1395
|
+
return N === pe.Overflow.Shrink;
|
|
1395
1396
|
};
|
|
1396
1397
|
m.getCommand("formatTextOverflowEllipsisToggle").updateCallback(function() {
|
|
1397
1398
|
O(this, { alignment: { overflow: H() ? pe.Overflow.Visible : pe.Overflow.Ellipsis } });
|
|
@@ -1484,7 +1485,7 @@ All contents and formatting are removed.`, shortcut: { key: "Delete", modifiers:
|
|
|
1484
1485
|
}).update({ disabled: $e || nt, state: Z === 315 }), m.getCommand("formatTextRotateCustom").updateCallback(function(He) {
|
|
1485
1486
|
O(this, { alignment: { rotation: He } });
|
|
1486
1487
|
}).update({ disabled: $e || nt, state: Z ?? 0 });
|
|
1487
|
-
}, [Ae, t, r, P,
|
|
1488
|
+
}, [Ae, t, r, P, L]), be(() => {
|
|
1488
1489
|
const a = !t.getProtection().isFormatCellsAllowed(), k = t.getSelectedRanges().getMerges().length > 0, T = async (ot, vt) => {
|
|
1489
1490
|
B(vt, async (Nt) => {
|
|
1490
1491
|
const Vt = async (Mt = !1) => {
|
|
@@ -1569,14 +1570,14 @@ All contents and formatting are removed.`, shortcut: { key: "Delete", modifiers:
|
|
|
1569
1570
|
const me = J || a || Qe || j;
|
|
1570
1571
|
me && (re = 1);
|
|
1571
1572
|
let Re = "", Pe = "", Be = "", et = "", $e = "", nt = "", He = "", at = "", Ct = "";
|
|
1572
|
-
H > 1 && (nt = Pe = H + " ", He = Be = "s"), re > 1 && (at = et = re + " ", Ct = $e = "s"),
|
|
1573
|
+
H > 1 && (nt = Pe = H + " ", He = Be = "s"), re > 1 && (at = et = re + " ", Ct = $e = "s"), w.getMode()?.key === "copy" ? (Re = et = Pe = "Copied ", Be = $e = "s") : w.getMode()?.key === "cut" && (Re = et = Pe = "Cut ", Be = $e = "s");
|
|
1573
1574
|
let Ft = "", Ht = "";
|
|
1574
1575
|
if (d) {
|
|
1575
1576
|
const ot = d.getDefaultShiftOrientation() === we.Orientation.Column;
|
|
1576
1577
|
Ft = ` (${ot ? "Shift Right" : "Shift Down"})`, Ht = ` (${ot ? "Shift Left" : "Shift up"})`, m.getCommand("deleteCells").update({ label: `Delete Cells${Ht}` });
|
|
1577
1578
|
}
|
|
1578
1579
|
m.getCommand("insertCells").update({ label: `Insert ${Re}Cells${Ft}`, scopedLabels: { insertCells: `${Re}At Selection` } }), m.getCommand("insertCellsShiftRight").update(Ce), m.getCommand("insertCellsShiftDown").update(Ce), m.getCommand("deleteCellsShiftUp").update(Ce), m.getCommand("deleteCellsShiftLeft").update(Ce), m.getCommand("insertRows").update({ label: `Insert ${et}Row${$e}`, scopedLabels: { insertCells: `${et}Row${$e}` }, disabled: me }), m.getCommand("insertRowsAfter").update({ label: `Insert ${et}Row${$e} Below`, disabled: me }), m.getCommand("insertColumns").update({ label: `Insert ${Pe}Column${Be}`, scopedLabels: { insertCells: `${Pe}Column${Be}` }, disabled: he }), m.getCommand("insertColumnsAfter").update({ label: `Insert ${Pe}Column${Be} After`, disabled: he }), m.getCommand("deleteRows").update({ label: `Delete ${at}Row${Ct}`, scopedLabels: { deleteCells: `${at}Row${Ct}` }, disabled: me }), m.getCommand("deleteColumns").update({ label: `Delete ${nt}Column${He}`, scopedLabels: { deleteCells: `${nt}Column${He}` }, disabled: he });
|
|
1579
|
-
}, [Ne, Ke, Qe, d,
|
|
1580
|
+
}, [Ne, Ke, Qe, d, w, i, Le]), be(() => {
|
|
1580
1581
|
const a = t.getProtection(), k = t.getProtection().isLocked(), T = !a.isFormatCellsAllowed(), f = { disabled: T };
|
|
1581
1582
|
m.getCommand("protectionSheetToggle").updateCallback(async (H, j) => {
|
|
1582
1583
|
let J = null;
|
|
@@ -1627,41 +1628,41 @@ var pr, fr;
|
|
|
1627
1628
|
return A || r.test(q) ? l(q.slice(2), A ? 2 : 8) : t.test(q) ? NaN : +q;
|
|
1628
1629
|
}
|
|
1629
1630
|
pr = function(q, E, A) {
|
|
1630
|
-
var U, P,
|
|
1631
|
+
var U, P, v, L, C, w, x = 0, F = !1, M = !1, D = !0;
|
|
1631
1632
|
if (typeof q != "function") throw new TypeError("Expected a function");
|
|
1632
1633
|
function G(ee) {
|
|
1633
1634
|
var z = U, y = P;
|
|
1634
|
-
return U = P = void 0, x = ee,
|
|
1635
|
+
return U = P = void 0, x = ee, L = q.apply(y, z);
|
|
1635
1636
|
}
|
|
1636
1637
|
function $(ee) {
|
|
1637
|
-
var z = ee -
|
|
1638
|
-
return
|
|
1638
|
+
var z = ee - w;
|
|
1639
|
+
return w === void 0 || z >= E || z < 0 || M && ee - x >= v;
|
|
1639
1640
|
}
|
|
1640
1641
|
function B() {
|
|
1641
1642
|
var ee = d();
|
|
1642
1643
|
if ($(ee)) return O(ee);
|
|
1643
1644
|
C = setTimeout(B, function(z) {
|
|
1644
|
-
var y = E - (z -
|
|
1645
|
-
return M ? b(y,
|
|
1645
|
+
var y = E - (z - w);
|
|
1646
|
+
return M ? b(y, v - (z - x)) : y;
|
|
1646
1647
|
}(ee));
|
|
1647
1648
|
}
|
|
1648
1649
|
function O(ee) {
|
|
1649
|
-
return C = void 0, D && U ? G(ee) : (U = P = void 0,
|
|
1650
|
+
return C = void 0, D && U ? G(ee) : (U = P = void 0, L);
|
|
1650
1651
|
}
|
|
1651
1652
|
function W() {
|
|
1652
1653
|
var ee = d(), z = $(ee);
|
|
1653
|
-
if (U = arguments, P = this,
|
|
1654
|
+
if (U = arguments, P = this, w = ee, z) {
|
|
1654
1655
|
if (C === void 0) return function(y) {
|
|
1655
|
-
return x = y, C = setTimeout(B, E),
|
|
1656
|
-
}(
|
|
1657
|
-
if (M) return C = setTimeout(B, E), G(
|
|
1656
|
+
return x = y, C = setTimeout(B, E), F ? G(y) : L;
|
|
1657
|
+
}(w);
|
|
1658
|
+
if (M) return C = setTimeout(B, E), G(w);
|
|
1658
1659
|
}
|
|
1659
|
-
return C === void 0 && (C = setTimeout(B, E)),
|
|
1660
|
+
return C === void 0 && (C = setTimeout(B, E)), L;
|
|
1660
1661
|
}
|
|
1661
|
-
return E = R(E) || 0, u(A) && (
|
|
1662
|
-
C !== void 0 && clearTimeout(C), x = 0, U =
|
|
1662
|
+
return E = R(E) || 0, u(A) && (F = !!A.leading, v = (M = "maxWait" in A) ? s(R(A.maxWait) || 0, E) : v, D = "trailing" in A ? !!A.trailing : D), W.cancel = function() {
|
|
1663
|
+
C !== void 0 && clearTimeout(C), x = 0, U = w = P = C = void 0;
|
|
1663
1664
|
}, W.flush = function() {
|
|
1664
|
-
return C === void 0 ?
|
|
1665
|
+
return C === void 0 ? L : O(d());
|
|
1665
1666
|
}, W;
|
|
1666
1667
|
};
|
|
1667
1668
|
})();
|
|
@@ -1755,13 +1756,13 @@ const cl = ft(wt((e, t) => {
|
|
|
1755
1756
|
Cr(U, _), Cr(P, _);
|
|
1756
1757
|
}, [U = R, P = t]);
|
|
1757
1758
|
var U, P;
|
|
1758
|
-
const [
|
|
1759
|
+
const [v, L] = ue(() => {
|
|
1759
1760
|
const _ = l.getView().getTopLeft();
|
|
1760
1761
|
return r === rn.Vertical ? _.top : _.left;
|
|
1761
1762
|
}), C = () => {
|
|
1762
1763
|
const _ = l.getView().getFreezePanes();
|
|
1763
1764
|
return r === rn.Vertical ? _.coords.rowIndex === 0 ? { shift: 0, scroll: 0 } : { shift: l.getRowHeaders().findOffset(_.coords.rowIndex) - _.topLeft.top, scroll: _.topLeft.top } : _.coords.colIndex === 0 ? { shift: 0, scroll: 0 } : { shift: l.getColumnHeaders().findOffset(_.coords.colIndex) - _.topLeft.left, scroll: _.topLeft.left };
|
|
1764
|
-
}, [
|
|
1765
|
+
}, [w, x] = ue(C), [F, M] = ue(null), [D, G] = ue(!1), $ = r === rn.Vertical ? l.getRowHeaders() : l.getColumnHeaders(), B = () => {
|
|
1765
1766
|
const _ = l.getUsedRange()?.getCoords() ?? qt.EmptyRange, ae = l.getSelection().getCoords().cell;
|
|
1766
1767
|
return { colIndex: Math.max(_.colEnd, ae.colIndex), rowIndex: Math.max(_.rowEnd, ae.rowIndex) };
|
|
1767
1768
|
}, [O, W] = ue(B), ee = O ? (r === rn.Vertical ? O.rowIndex : O.colIndex) + 1 : 0, z = () => {
|
|
@@ -1773,15 +1774,15 @@ const cl = ft(wt((e, t) => {
|
|
|
1773
1774
|
} }), ht(l.getSelection(), { onChange: z }), ht(l, { onUsedRangeChange: z }), be(() => {
|
|
1774
1775
|
W(B());
|
|
1775
1776
|
}, [l]), be(() => {
|
|
1776
|
-
if (!
|
|
1777
|
-
const _ = $.getTextAt($.findIndex(
|
|
1778
|
-
G(!0), q?.({ ...
|
|
1779
|
-
}, [s,
|
|
1777
|
+
if (!F) return D && E?.(), void G(!1);
|
|
1778
|
+
const _ = $.getTextAt($.findIndex(v / (l.getView().getZoomScale() / 100) + w.scroll + w.shift));
|
|
1779
|
+
G(!0), q?.({ ...F, display: (r === rn.Vertical ? "Row" : "Column") + ": " + _ });
|
|
1780
|
+
}, [s, v, w, r, F, $, D, l]);
|
|
1780
1781
|
const y = ie((_, ae, ze) => {
|
|
1781
|
-
|
|
1782
|
-
const Ie = _ +
|
|
1782
|
+
L(_);
|
|
1783
|
+
const Ie = _ + w.scroll, fe = ae + w.shift, Ge = ze + w.shift + w.scroll;
|
|
1783
1784
|
c?.(Ie, fe, Ge);
|
|
1784
|
-
}, [c,
|
|
1785
|
+
}, [c, w]), V = s - w.scroll, ne = d - w.shift, xe = b - (w.shift + w.scroll), oe = $.findOffset(ee) * (l.getView().getZoomScale() / 100) - (w.scroll + w.shift);
|
|
1785
1786
|
return p(ni, { ref: A, style: n, offset: V, viewportSize: ne, totalSize: xe, orientation: r, showCustomScrollButtons: g, onMouseDown: (_) => {
|
|
1786
1787
|
M({ anchor: { x: _.clientX, y: _.clientY } }), _.preventDefault();
|
|
1787
1788
|
}, onScrollOffset: y, onMouseOut: () => {
|
|
@@ -1799,19 +1800,19 @@ const Sr = (e, t, n = null) => {
|
|
|
1799
1800
|
}
|
|
1800
1801
|
return r;
|
|
1801
1802
|
}, xr = ft(wt((e, t) => {
|
|
1802
|
-
const { sheetHeader: n, gridRef: r, sheetElement: l, commands: o, oppositeSize: i = 30, containerWidth: c, containerHeight: g, headerText: s, freezeStart: b, gridStyle: d, verticalPadding: u, horizontalPadding: R, onSheetContextMenu: q, onResizeHeadersStart: E, onResizeHeaders: A, onResizeHeadersEnd: U, onResizeHeadersDown: P, onResizeHeadersUp:
|
|
1803
|
+
const { sheetHeader: n, gridRef: r, sheetElement: l, commands: o, oppositeSize: i = 30, containerWidth: c, containerHeight: g, headerText: s, freezeStart: b, gridStyle: d, verticalPadding: u, horizontalPadding: R, onSheetContextMenu: q, onResizeHeadersStart: E, onResizeHeaders: A, onResizeHeadersEnd: U, onResizeHeadersDown: P, onResizeHeadersUp: v, scrollPoint: L, onSelectionStart: C, onSelectionEnd: w } = e, x = ye(() => n.getOrientation(), [n]), F = Te(null), [M, D] = ln((N) => N + 1, 0), [G, $] = ln((N) => N + 1, 0), B = n?.getSheet(), O = Te(!1);
|
|
1803
1804
|
Ot(() => {
|
|
1804
1805
|
O.current = !0;
|
|
1805
1806
|
}, [n]);
|
|
1806
1807
|
const W = ye(() => n.getEntireRange().getCoords().max + 1, [n]), ee = ye(() => {
|
|
1807
|
-
const
|
|
1808
|
-
return { left:
|
|
1809
|
-
}, [
|
|
1810
|
-
ht(n, { onSizesChange: (
|
|
1808
|
+
const N = x === we.Orientation.Column;
|
|
1809
|
+
return { left: N ? L.left : 0, top: N ? 0 : L.top };
|
|
1810
|
+
}, [L]), [z, y] = ue(B?.getView().getZoomScale() / 100), [V, ne] = ue(null);
|
|
1811
|
+
ht(n, { onSizesChange: (N) => {
|
|
1811
1812
|
y(B?.getView().getZoomScale() / 100), Le(de());
|
|
1812
1813
|
} });
|
|
1813
1814
|
const xe = Xe(() => {
|
|
1814
|
-
|
|
1815
|
+
F.current?.invalidate(), $();
|
|
1815
1816
|
}, []), oe = Xe(rt.debounce(() => {
|
|
1816
1817
|
xe();
|
|
1817
1818
|
}, 10), []), [_, ae] = ue(null);
|
|
@@ -1826,35 +1827,35 @@ const Sr = (e, t, n = null) => {
|
|
|
1826
1827
|
}, [x, z, i]), Ot(() => {
|
|
1827
1828
|
ne(null), y(n?.getSheet().getView().getZoomScale() / 100), Le(de());
|
|
1828
1829
|
}, [n]);
|
|
1829
|
-
const ze = Xe((
|
|
1830
|
+
const ze = Xe((N) => n.at(N)?.isHidden() || n.at(N)?.getSize() === 0, [n]), Ie = Xe((N, Z) => n.hiddenHeadersAt(N, Z), [ze]), fe = ie((N) => n.isSelected(N), [n]), Ge = ie((N) => n.isSelectedAll(N), [n]), ve = Xe(() => n.getMinSize(), [n]), _e = Xe(() => n.getMaxSize(), [n]), De = ie((N, Z, a) => {
|
|
1830
1831
|
Z /= z;
|
|
1831
1832
|
const k = { size: Z = Math.max(ve(), Math.min(rt.roundAccurately(Z, ve()), _e())), hidden: !1 }, T = [];
|
|
1832
|
-
if (Z <= 0 && (k.hidden = !0, k.size = a), T.push({ address: { min:
|
|
1833
|
-
const f = x === we.Orientation.Column, I = f ? Se.getColOffset : Se.getRowOffset, h = f ? Se.getColIndex : Se.getRowIndex, H = I(
|
|
1833
|
+
if (Z <= 0 && (k.hidden = !0, k.size = a), T.push({ address: { min: N, max: N }, update: k }), Z < 0) {
|
|
1834
|
+
const f = x === we.Orientation.Column, I = f ? Se.getColOffset : Se.getRowOffset, h = f ? Se.getColIndex : Se.getRowIndex, H = I(N);
|
|
1834
1835
|
let j = h(H + Z);
|
|
1835
1836
|
const J = I(j);
|
|
1836
|
-
J === H + Z ? j-- : T.push({ address: { min: j, max: j }, update: { size: H - J + Z } }),
|
|
1837
|
+
J === H + Z ? j-- : T.push({ address: { min: j, max: j }, update: { size: H - J + Z } }), N - j > 1 && T.push({ address: { min: j + 1, max: N - 1 }, update: { hidden: !0 } });
|
|
1837
1838
|
}
|
|
1838
|
-
n.updateHeaderPairs(T), A?.(
|
|
1839
|
-
}, [M, n, z, A]), ge = ie((
|
|
1839
|
+
n.updateHeaderPairs(T), A?.(N, Z, a);
|
|
1840
|
+
}, [M, n, z, A]), ge = ie((N, Z, a) => {
|
|
1840
1841
|
const k = x === we.Orientation.Column;
|
|
1841
|
-
let T = null, f = { min:
|
|
1842
|
-
if (n.isSelectedAll(
|
|
1842
|
+
let T = null, f = { min: N, max: N };
|
|
1843
|
+
if (n.isSelectedAll(N)) {
|
|
1843
1844
|
const I = n.getSelectedRuns();
|
|
1844
1845
|
I.length > 1 ? T = "Resize " + (k ? "Columns" : "Rows") : f = I[0];
|
|
1845
1846
|
const h = { hidden: Z <= 0, size: (Z <= 0 ? a : Z) / z };
|
|
1846
|
-
n.updateHeaderPairs(Sr(I, h,
|
|
1847
|
+
n.updateHeaderPairs(Sr(I, h, N));
|
|
1847
1848
|
}
|
|
1848
1849
|
if (f) {
|
|
1849
1850
|
const I = f.max - f.min + 1;
|
|
1850
1851
|
let h;
|
|
1851
1852
|
h = I === 1 ? n.getRange(f).at(0).getDisplayText() : n.getRange(f).toString(), T = `Resize ${k ? "Column" : "Row"}${I > 1 ? "s" : ""} '${h}'`;
|
|
1852
1853
|
}
|
|
1853
|
-
U?.(
|
|
1854
|
-
}, [M, n, U]), ce = ie((
|
|
1854
|
+
U?.(N, Z, T);
|
|
1855
|
+
}, [M, n, U]), ce = ie((N, Z) => {
|
|
1855
1856
|
const a = x === we.Orientation.Column;
|
|
1856
|
-
E(
|
|
1857
|
-
}, [E]), ke = ie((
|
|
1857
|
+
E(N, Z, `Resize ${a ? "Column" : "Row"}(s)`);
|
|
1858
|
+
}, [E]), ke = ie((N) => {
|
|
1858
1859
|
let Z = !1;
|
|
1859
1860
|
const a = x === we.Orientation.Column, k = n.getSheet().getEntireRange().getCoords(), T = [], f = n.getSelectedRuns(), I = (h) => {
|
|
1860
1861
|
let H;
|
|
@@ -1862,37 +1863,37 @@ const Sr = (e, t, n = null) => {
|
|
|
1862
1863
|
};
|
|
1863
1864
|
for (let h = 0; h < f.length; h++) {
|
|
1864
1865
|
const H = f[h];
|
|
1865
|
-
H.value.isSelectedAll && (H.min <=
|
|
1866
|
+
H.value.isSelectedAll && (H.min <= N && H.max >= N && (Z = !0), I(H));
|
|
1866
1867
|
}
|
|
1867
|
-
if (Z || I({ min:
|
|
1868
|
+
if (Z || I({ min: N, max: N }), n.getSheet().getRanges(T).autoFit({ orientations: a ? we.Orientations.Column : we.Orientations.Row }), ze(N)) {
|
|
1868
1869
|
const h = { hidden: null }, H = Sr(f, h);
|
|
1869
|
-
Z || H.push({ address:
|
|
1870
|
+
Z || H.push({ address: N, update: h }), n.updateHeaderPairs(H);
|
|
1870
1871
|
}
|
|
1871
|
-
U?.(
|
|
1872
|
+
U?.(N, null, "Resize Column(s)");
|
|
1872
1873
|
}, [M, n, U, ze]), de = () => {
|
|
1873
|
-
const
|
|
1874
|
-
return { getColOffset: (Z) =>
|
|
1875
|
-
}, [Se, Le] = ue(() => de()), qe = Xe((
|
|
1874
|
+
const N = x === we.Orientation.Column;
|
|
1875
|
+
return { getColOffset: (Z) => N ? n.findOffset(Z) : Z === 0 ? 0 : i / z, getColIndex: (Z) => N ? n.findIndex(Z) : 0, getRowOffset: (Z) => N ? Z === 0 ? 0 : i / z : n.findOffset(Z), getRowIndex: (Z) => N ? 0 : n.findIndex(Z) };
|
|
1876
|
+
}, [Se, Le] = ue(() => de()), qe = Xe((N, Z) => N.nativeEvent.which !== el.Right || !Ge(x === we.Orientation.Column ? Z.colIndex : Z.rowIndex), [x, Ge]), Ne = ie((N) => {
|
|
1876
1877
|
l.focusSheet();
|
|
1877
|
-
}, [l]), We = ie((
|
|
1878
|
-
B?.getSelection().updateCoords(
|
|
1879
|
-
}, [B]), { ...Ze } = nl({ gridRef: r, commands: null, layout: Se, selection: _, fillHandleBorderColor: d.body.fill, selectionBackgroundColor: d.selection.fill, selectionBorderColor: d.selection.strokeFill, selectionRemoveBackgroundColor: d.selectionRemove.fill, selectionRemoveBorderColor: d.selectionRemove.strokeFill, disableTouchSelection: !0, onSelectionChange: We, canSelectionSpanMergedCells: (
|
|
1880
|
-
const Z = B.getRange(
|
|
1878
|
+
}, [l]), We = ie((N) => {
|
|
1879
|
+
B?.getSelection().updateCoords(N);
|
|
1880
|
+
}, [B]), { ...Ze } = nl({ gridRef: r, commands: null, layout: Se, selection: _, fillHandleBorderColor: d.body.fill, selectionBackgroundColor: d.selection.fill, selectionBorderColor: d.selection.strokeFill, selectionRemoveBackgroundColor: d.selectionRemove.fill, selectionRemoveBorderColor: d.selectionRemove.strokeFill, disableTouchSelection: !0, onSelectionChange: We, canSelectionSpanMergedCells: (N) => {
|
|
1881
|
+
const Z = B.getRange(N);
|
|
1881
1882
|
return Z.isEntireColumns() || Z.isEntireRows();
|
|
1882
1883
|
} }), m = ie(() => {
|
|
1883
1884
|
C?.();
|
|
1884
|
-
const
|
|
1885
|
-
|
|
1885
|
+
const N = B?.getSelection();
|
|
1886
|
+
N && N.setAdjusting(N.getCoords());
|
|
1886
1887
|
}, [B, C]), Ke = ie(async () => {
|
|
1887
|
-
B?.getSelection().setAdjusting(null),
|
|
1888
|
-
}, [B,
|
|
1888
|
+
B?.getSelection().setAdjusting(null), w?.();
|
|
1889
|
+
}, [B, w]), { ...ut } = pi({ orientation: x, headerCount: W, gridRef: F, gridMainRef: r, newSelection: Ze?.newSelection, modifySelection: Ze?.modifySelection, appendSelection: Ze?.appendSelection, clearSelections: Ze?.clearSelections, pointerDownInterceptor: qe, onPointerUp: Ne, onDragStart: m, onDragEnd: Ke }), Qe = d.selection?.strokeFill;
|
|
1889
1890
|
be(() => {
|
|
1890
|
-
if (!
|
|
1891
|
-
const
|
|
1892
|
-
if (h) return p("div",
|
|
1891
|
+
if (!F.current) return void ne(null);
|
|
1892
|
+
const N = x === we.Orientation.Column, Z = n.getSelectedRuns(), a = n.isProtected() ? null : De, k = (f, I, h) => {
|
|
1893
|
+
if (h) return p("div", N ? { style: { position: "absolute", borderBottom: `${d.headerSelection.strokeWidth}px solid ${Qe}`, pointerEvents: "none", top: `${it.boundPixel(-d.headerSelection.strokeWidth / 2)}px`, left: `${it.boundPixel(h.x - d.headerSelection.strokeWidth)}px`, width: `${it.boundPixel(h.width + d.headerSelection.strokeWidth + 1, !0)}px`, height: i + d.headerSelection.strokeWidth - 0.5 + "px" } } : { style: { position: "absolute", borderRight: `${d.headerSelection.strokeWidth}px solid ${Qe}`, pointerEvents: "none", top: `${it.boundPixel(h.y - d.headerSelection.strokeWidth)}px`, left: `${it.boundPixel(-d.headerSelection.strokeWidth / 2)}px`, width: i + d.headerSelection.strokeWidth - 0.5 + "px", height: `${it.boundPixel(h.height + d.headerSelection.strokeWidth + 1, !0)}px` } }, f);
|
|
1893
1894
|
}, T = (f, I, h) => {
|
|
1894
1895
|
const H = { x: 0, y: 0, width: 0, height: 0 };
|
|
1895
|
-
if (
|
|
1896
|
+
if (N) {
|
|
1896
1897
|
const j = h.toClipBounds(h.getRangeCoordsBounds({ rowStart: 0, rowEnd: 0, colStart: f, colEnd: Math.min(W, I) }), $o);
|
|
1897
1898
|
if (!j) return;
|
|
1898
1899
|
H.x = j.x, H.width = j.width;
|
|
@@ -1905,8 +1906,8 @@ const Sr = (e, t, n = null) => {
|
|
|
1905
1906
|
};
|
|
1906
1907
|
ne([(f) => {
|
|
1907
1908
|
const I = [];
|
|
1908
|
-
let h = null, H =
|
|
1909
|
-
const j =
|
|
1909
|
+
let h = null, H = N ? f.getVisibleColumns() : f.getVisibleRows();
|
|
1910
|
+
const j = N ? f.getTotalRangeCoords().colStart : f.getTotalRangeCoords().rowStart;
|
|
1910
1911
|
H.length > 0 && H[0] > j && (H = [H[0] - 1, ...H]);
|
|
1911
1912
|
let J = [];
|
|
1912
1913
|
const re = [];
|
|
@@ -1921,13 +1922,13 @@ const Sr = (e, t, n = null) => {
|
|
|
1921
1922
|
let nt = !1, He = !1;
|
|
1922
1923
|
h?.value && h.min <= Re && (nt = !0, He = h.value.isSelectedAll), Re > 0 && re.push({ index: Re - 1, isNextHidden: Be, isSelected: nt, isSelectedAll: He, disabledResize: !0 });
|
|
1923
1924
|
}
|
|
1924
|
-
if ($e && J.push(re.length), re.push({ index: Re, isHidden: me === 0 && Ie(Re, !1) > 0, isNextHidden: Be, isSelected: et, isSelectedAll: $e, onDividerMouseDown: P, onDividerResizeStart: ce, onDividerResize: a, onDividerMouseUp:
|
|
1925
|
+
if ($e && J.push(re.length), re.push({ index: Re, isHidden: me === 0 && Ie(Re, !1) > 0, isNextHidden: Be, isSelected: et, isSelectedAll: $e, onDividerMouseDown: P, onDividerResizeStart: ce, onDividerResize: a, onDividerMouseUp: v, onDividerResizeEnd: ge, onDividerAutoFit: ke }), Be) {
|
|
1925
1926
|
let nt = !1, He = !1;
|
|
1926
1927
|
if (h && h.min >= Re && h.max <= Pe - 1 && h.value.isSelectedAll && J.push(re.length), !(h?.value && h.max >= Pe)) if (Z.length > 0 && Z[Z.length - 1].max >= Pe) {
|
|
1927
1928
|
const at = rt.findEqualOrGreater(Z, Pe, (Ct) => Ct.max);
|
|
1928
1929
|
h = Z[at];
|
|
1929
1930
|
} else h = null;
|
|
1930
|
-
h?.value && h.min <= Pe && (nt = h.value.isSelected, He = h.value.isSelectedAll), Pe > 0 && re.push({ index: Pe - 1, isHidden: !0, isSelected: nt, isSelectedAll: He, onDividerMouseDown: P, onDividerResizeStart: ce, onDividerResize: a, onDividerMouseUp:
|
|
1931
|
+
h?.value && h.min <= Pe && (nt = h.value.isSelected, He = h.value.isSelectedAll), Pe > 0 && re.push({ index: Pe - 1, isHidden: !0, isSelected: nt, isSelectedAll: He, onDividerMouseDown: P, onDividerResizeStart: ce, onDividerResize: a, onDividerMouseUp: v, onDividerResizeEnd: ge, onDividerAutoFit: ke });
|
|
1931
1932
|
}
|
|
1932
1933
|
}
|
|
1933
1934
|
if (J.length > 0) {
|
|
@@ -1935,7 +1936,7 @@ const Sr = (e, t, n = null) => {
|
|
|
1935
1936
|
if (J.length > 0) {
|
|
1936
1937
|
const Be = re[J[me]].index;
|
|
1937
1938
|
let et = null;
|
|
1938
|
-
|
|
1939
|
+
N ? (et = f.getRangeCoordsBounds({ rowStart: 0, rowEnd: 0, colStart: Be, colEnd: Be }), et.x + et.width > f.getBounds().width && (me -= 1, me === 0 && (me = -1))) : (et = f.getRangeCoordsBounds({ rowStart: Be, rowEnd: Be, colStart: 0, colEnd: 0 }), et.y + et.height > f.getBounds().height && (me -= 1, me === 0 && (me = -1)));
|
|
1939
1940
|
}
|
|
1940
1941
|
const Re = Z?.[Z.length - 1], Pe = f.getAnchor();
|
|
1941
1942
|
if (Pe === "t" || Pe === "l") {
|
|
@@ -1952,95 +1953,95 @@ const Sr = (e, t, n = null) => {
|
|
|
1952
1953
|
return I;
|
|
1953
1954
|
}]);
|
|
1954
1955
|
}, [G, !0, Qe, d, Se, W, b, M, z]), be(() => {
|
|
1955
|
-
|
|
1956
|
+
F.current?.invalidate();
|
|
1956
1957
|
}, [M]);
|
|
1957
|
-
const K = ie((
|
|
1958
|
-
const { header: Z, headerSelect: a, headerSelectAll: k, headerHover: T } = d ?? {}, { range: f, key: I, ...h } =
|
|
1958
|
+
const K = ie((N) => s ? s(N) : n.getTextAt(N), [s, n]), Fe = ie((N) => {
|
|
1959
|
+
const { header: Z, headerSelect: a, headerSelectAll: k, headerHover: T } = d ?? {}, { range: f, key: I, ...h } = N;
|
|
1959
1960
|
return p(fi, { orientation: x, index: x === we.Orientation.Column ? f.colStart : f.rowStart, isSelected: fe, isSelectedAll: Ge, zoomScale: 100 * z, headerText: K, headerStyle: Z, headerStyleSelect: a, headerStyleSelectAll: k, headerStyleHover: T, verticalPadding: u, horizontalPadding: R, ...h }, I);
|
|
1960
1961
|
}, [M, W, d, z, n]), je = dn(), Ae = ye(() => {
|
|
1961
|
-
const
|
|
1962
|
+
const N = "white", Z = "black", a = {};
|
|
1962
1963
|
if (it.detectIt().primaryInput !== "touch") {
|
|
1963
|
-
let k = x === we.Orientation.Column ? `url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='M 8,14.5 2.3125,8.8125 h 3.25 V 1.5 h 4.875 v 7.3125 h 3.25 z' stroke='${Z}' fill='${
|
|
1964
|
-
je.getMode()?.key === "formatPainter" && (k = `url("data:image/svg+xml,%3Csvg width='30' height='22' viewBox='0 0 30 22' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='M 26.737611,2.811068 V 2.0241451 c 0,-0.4328075 -0.354115,-0.7869227 -0.786923,-0.7869227 h -9.443074 c -0.432808,0 -0.786923,0.3541152 -0.786923,0.7869227 v 3.1476914 c 0,0.4328076 0.354115,0.7869235 0.786923,0.7869235 h 9.443074 c 0.432808,0 0.786923,-0.3541159 0.786923,-0.7869235 V 4.3849137 h 0.786923 v 3.1476915 h -7.869229 v 8.6561518 c 0,0.432808 0.354116,0.786923 0.786923,0.786923 h 1.573846 c 0.432807,0 0.786923,-0.354115 0.786923,-0.786923 V 9.1064513 H 29.09838 V 2.811068 Z M 10.714339,6.2116849 c -1.60877,0.0017 -3.2175361,0.00425 -4.8263048,0.00609 0.0012,1.5756989 0.00158,3.1513905 0.00244,4.7270891 -1.5978311,0.0017 -3.1956617,0.0034 -4.7934919,0.0043 0.00335,1.740011 0.00655,3.480012 0.00988,5.220023 1.5954589,0 3.1909181,0 4.7863775,0 -0.0017,1.606793 -0.00353,3.213585 -0.0051,4.820375 1.7440936,0.0016 3.4881881,0.0033 5.2322842,0.005 -0.0014,-1.608503 -0.0018,-3.217015 -0.0028,-4.825519 1.58518,0 3.17036,0 4.755543,0 0.0033,-1.741851 0.0073,-3.483705 0.01072,-5.225556 -1.58808,0 -3.176158,0 -4.764238,0 0,-1.5775391 0,-3.1550792 0,-4.7326117 -0.135065,1.3e-4 -0.270128,1.982e-4 -0.40519,4.047e-4 z' stroke='${Z}' fill='${
|
|
1964
|
+
let k = x === we.Orientation.Column ? `url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='M 8,14.5 2.3125,8.8125 h 3.25 V 1.5 h 4.875 v 7.3125 h 3.25 z' stroke='${Z}' fill='${N}'/%3E%3C/g%3E%3C/svg%3E%0A") 8 15, pointer` : `url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='m 14.5,8 -5.6875,5.6875 v -3.25 H 1.5 v -4.875 h 7.3125 v -3.25 z' stroke='${Z}' fill='${N}'/%3E%3C/g%3E%3C/svg%3E%0A") 15 8, pointer`;
|
|
1965
|
+
je.getMode()?.key === "formatPainter" && (k = `url("data:image/svg+xml,%3Csvg width='30' height='22' viewBox='0 0 30 22' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='M 26.737611,2.811068 V 2.0241451 c 0,-0.4328075 -0.354115,-0.7869227 -0.786923,-0.7869227 h -9.443074 c -0.432808,0 -0.786923,0.3541152 -0.786923,0.7869227 v 3.1476914 c 0,0.4328076 0.354115,0.7869235 0.786923,0.7869235 h 9.443074 c 0.432808,0 0.786923,-0.3541159 0.786923,-0.7869235 V 4.3849137 h 0.786923 v 3.1476915 h -7.869229 v 8.6561518 c 0,0.432808 0.354116,0.786923 0.786923,0.786923 h 1.573846 c 0.432807,0 0.786923,-0.354115 0.786923,-0.786923 V 9.1064513 H 29.09838 V 2.811068 Z M 10.714339,6.2116849 c -1.60877,0.0017 -3.2175361,0.00425 -4.8263048,0.00609 0.0012,1.5756989 0.00158,3.1513905 0.00244,4.7270891 -1.5978311,0.0017 -3.1956617,0.0034 -4.7934919,0.0043 0.00335,1.740011 0.00655,3.480012 0.00988,5.220023 1.5954589,0 3.1909181,0 4.7863775,0 -0.0017,1.606793 -0.00353,3.213585 -0.0051,4.820375 1.7440936,0.0016 3.4881881,0.0033 5.2322842,0.005 -0.0014,-1.608503 -0.0018,-3.217015 -0.0028,-4.825519 1.58518,0 3.17036,0 4.755543,0 0.0033,-1.741851 0.0073,-3.483705 0.01072,-5.225556 -1.58808,0 -3.176158,0 -4.764238,0 0,-1.5775391 0,-3.1550792 0,-4.7326117 -0.135065,1.3e-4 -0.270128,1.982e-4 -0.40519,4.047e-4 z' stroke='${Z}' fill='${N}'/%3E%3C/g%3E%3C/svg%3E%0A") 7 12, pointer`), a.cursor = k;
|
|
1965
1966
|
}
|
|
1966
1967
|
return a.backgroundColor = d?.header?.fill || "transparent", a;
|
|
1967
|
-
}, [x, M, je, d]), Ve = jt(t, () => ({ scrollTo: (
|
|
1968
|
-
|
|
1968
|
+
}, [x, M, je, d]), Ve = jt(t, () => ({ scrollTo: (N) => {
|
|
1969
|
+
F.current?.scrollTo(N);
|
|
1969
1970
|
}, forceRender: () => {
|
|
1970
1971
|
D();
|
|
1971
|
-
}, getGridElement: () =>
|
|
1972
|
-
ut.onPointerDown(
|
|
1973
|
-
}, [ut]), S = Xe((
|
|
1974
|
-
const Z = ut.getCellCoordsFromClient(
|
|
1972
|
+
}, getGridElement: () => F.current }), []), Oe = Xe((N) => {
|
|
1973
|
+
ut.onPointerDown(N);
|
|
1974
|
+
}, [ut]), S = Xe((N) => {
|
|
1975
|
+
const Z = ut.getCellCoordsFromClient(N.clientX, N.clientY);
|
|
1975
1976
|
if (!Z || !q) return;
|
|
1976
1977
|
const a = x === we.Orientation.Column;
|
|
1977
|
-
q({ originalEvent:
|
|
1978
|
+
q({ originalEvent: N, clientX: N.clientX, clientY: N.clientY, rowIndex: a ? -1 : Z.rowIndex, colIndex: a ? Z.colIndex : -1 }), N.stopPropagation(), N.preventDefault();
|
|
1978
1979
|
}, [ut, q]), te = ye(() => {
|
|
1979
|
-
const
|
|
1980
|
-
return p("div", { ref: Ve, children: p(ol, { className: "sheet-header", style: Ae, ref:
|
|
1980
|
+
const N = x === we.Orientation.Column;
|
|
1981
|
+
return p("div", { ref: Ve, children: p(ol, { className: "sheet-header", style: Ae, ref: F, scrollPoint: ee, columnCount: N ? W : 1, rowCount: N ? 1 : W, width: N ? c : i, height: N ? i : g, freezeLeft: N ? b : void 0, freezeTop: N ? void 0 : b, hiddenColumnsAt: N ? Ie : void 0, hiddenRowsAt: N ? void 0 : Ie, showGridLines: !1, layout: Se, clipCells: !1, allowOverlaysOverflow: !0, enableMouseWheel: !1, onContextMenu: S, onPointerDown: Oe, zoom: z, cellRenderer: Fe, overlays: V }) });
|
|
1981
1982
|
}, [V, Se, c, g, ee, Ae, G]);
|
|
1982
1983
|
return be(() => {
|
|
1983
|
-
O.current = !1,
|
|
1984
|
+
O.current = !1, F.current?.invalidate(), $();
|
|
1984
1985
|
}, [n, d]), te;
|
|
1985
1986
|
})), Hi = ft(wt((e, t) => {
|
|
1986
1987
|
const { view: n, sheet: r, getVisibleCells: l, gridStyle: o } = e, i = ie((s, b) => s.getStyle().getBorder(), []), { overlay: c } = sl({ getVisibleCells: l, getBorderAt: i, darkMode: o.body.darkMode, shiftIfWide: !0 }), g = c(n);
|
|
1987
1988
|
return g && n ? g : null;
|
|
1988
1989
|
})), Pi = { key: "copy", description: "'Copy' Select destination and press ENTER or choose Paste." }, Wi = { key: "cut", description: "'Cut' Select destination and press ENTER or choose Paste." }, $i = { type: Kt.Content.Values }, Ui = { fitDestination: !0, type: Kt.Content.Formats }, Gi = { fitDestination: !0, type: Kt.Content.Formulas }, ji = { transpose: !0 }, _i = { fitDestination: !0, adjustCells: (e, t, n) => ({ value: `=${t.getA1({ $colIndex: !0, $rowIndex: !0 })}` }) }, Zi = ({ element: e, sheet: t, sheetView: n, commands: r, onClipboardUpdate: l, onPaste: o, selectionRenderer: i = wi, copyForegroundColor: c = "rgb(33, 115, 70)", cutForegroundColor: g = "rgb(33, 115, 70)", copyBackgroundColor: s = "white", cutBackgroundColor: b = "white", notifier: d, ...u }) => {
|
|
1989
|
-
const R = ie(i, [i]), q = Te(null), E = dn(), A = E.getMode(), U = ye(() => ({ element: e, doCopy: (
|
|
1990
|
-
const x = t.getSelectedRanges().getSnapshot(
|
|
1990
|
+
const R = ie(i, [i]), q = Te(null), E = dn(), A = E.getMode(), U = ye(() => ({ element: e, doCopy: (w) => {
|
|
1991
|
+
const x = t.getSelectedRanges().getSnapshot(w);
|
|
1991
1992
|
return new Xl(x);
|
|
1992
|
-
} }), [t, n, e]), P = ye(() => ({ element: e, importFromExternal: async (
|
|
1993
|
-
const
|
|
1994
|
-
return await
|
|
1995
|
-
}, doPaste: async (
|
|
1996
|
-
if (
|
|
1993
|
+
} }), [t, n, e]), P = ye(() => ({ element: e, importFromExternal: async (w, x) => {
|
|
1994
|
+
const F = new Jl(w, x, t.getStyles(), t.isDate1904());
|
|
1995
|
+
return await F.parse() ? F : null;
|
|
1996
|
+
}, doPaste: async (w, x) => {
|
|
1997
|
+
if (w?.getItemType() !== "range") return;
|
|
1997
1998
|
x?.contentsOnly && delete (x = { ...x, type: Kt.Content.Values }).contentsOnly;
|
|
1998
|
-
const
|
|
1999
|
-
return await
|
|
2000
|
-
const G = await
|
|
1999
|
+
const F = t.getSelectedRange(), M = w.getItem(), D = M.getName();
|
|
2000
|
+
return await F.doBatch(async () => {
|
|
2001
|
+
const G = await F.copyFrom(M, x);
|
|
2001
2002
|
!G || G.isEntireRows() || G.isEntireColumns() || G.autoFit({ orientations: we.Orientations.Row, minContent: !0 });
|
|
2002
2003
|
}, { description: "Paste" + (D ? ` ${D}` : ""), autoSelect: !0 }), !0;
|
|
2003
|
-
} }), [t, n, d, e]), { clipboard:
|
|
2004
|
-
const x =
|
|
2004
|
+
} }), [t, n, d, e]), { clipboard: v, ...L } = Jr({ ...u, source: U, commands: r, target: P, notifier: d, onClipboardUpdate: (w) => {
|
|
2005
|
+
const x = w?.getItemType() === "range" ? w : null;
|
|
2005
2006
|
if (x) {
|
|
2006
|
-
const
|
|
2007
|
-
D?.args?.isClipboard ||
|
|
2007
|
+
const F = w.editMode?.(), M = { ...w?.isCut?.() ? Wi : Pi, ...F, args: { isClipboard: !0, ...F?.args }, onModeChange: (D) => {
|
|
2008
|
+
D?.args?.isClipboard || v.clear(!0), F?.onModeChange?.(D);
|
|
2008
2009
|
} };
|
|
2009
2010
|
E.setMode(M);
|
|
2010
2011
|
}
|
|
2011
2012
|
q.current = x, l?.(x);
|
|
2012
|
-
}, onPaste: (
|
|
2013
|
-
if (
|
|
2014
|
-
let
|
|
2015
|
-
if (!
|
|
2016
|
-
const M =
|
|
2013
|
+
}, onPaste: (w, x) => {
|
|
2014
|
+
if (w?.getItemType() !== "range") return;
|
|
2015
|
+
let F = E.getMode()?.key === "cut" || w.isCut?.();
|
|
2016
|
+
if (!F && E.getMode()?.key === "copy") {
|
|
2017
|
+
const M = w.getItem().getCoords(), D = t.getSelectedRanges().getCoords();
|
|
2017
2018
|
let G = !1;
|
|
2018
|
-
if (!G && M && D &&
|
|
2019
|
-
|
|
2019
|
+
if (!G && M && D && w.getItem().getSource?.() === t) for (let $ = 0; !G && $ < D.length; $++) G = qt.isRangesIntersect(M, D[$]);
|
|
2020
|
+
F = G;
|
|
2020
2021
|
}
|
|
2021
|
-
|
|
2022
|
+
F && E.setMode(null), e?.()?.focus(), o?.(w, x);
|
|
2022
2023
|
} });
|
|
2023
2024
|
ye(() => {
|
|
2024
|
-
const
|
|
2025
|
+
const w = e;
|
|
2025
2026
|
if (!r) return;
|
|
2026
|
-
const x = [new Y("pasteValues",
|
|
2027
|
+
const x = [new Y("pasteValues", w, { label: "Paste Values", scopedLabels: { paste: "Values" }, description: `Paste only the values of the selected cells.
|
|
2027
2028
|
|
|
2028
|
-
The formatting is not applied.`, shortcut: { key: "V", modifiers: [Q.Ctrl, Q.Shift] } }), new Y("pasteFormats",
|
|
2029
|
+
The formatting is not applied.`, shortcut: { key: "V", modifiers: [Q.Ctrl, Q.Shift] } }), new Y("pasteFormats", w, { label: "Paste Formatting", scopedLabels: { paste: "Formatting" }, description: `Paste only the formats of the selected cells.
|
|
2029
2030
|
|
|
2030
|
-
The content is not applied.` }), new Y("pasteFormulas",
|
|
2031
|
+
The content is not applied.` }), new Y("pasteFormulas", w, { label: "Paste Formulas", scopedLabels: { paste: "Formulas" }, description: "Paste only the formulas of the selected cells. The values and formatting is not applied." }), new Y("pasteTranspose", w, { label: "Paste Transpose", scopedLabels: { paste: "Transpose" }, description: "Paste with the rows and columns flipped." }), new Y("pasteLinks", w, { label: "Paste Links", scopedLabels: { paste: "Links" }, description: "Paste as formula references to the original cells." })];
|
|
2031
2032
|
r.addCommands(x, !0);
|
|
2032
2033
|
}, [r, e]), be(() => {
|
|
2033
2034
|
if (!r) return;
|
|
2034
|
-
const
|
|
2035
|
-
r.getCommand("pasteValues").updateCallback((x) =>
|
|
2035
|
+
const w = { disabled: !t.getProtection().isFormatCellsAllowed() };
|
|
2036
|
+
r.getCommand("pasteValues").updateCallback((x) => L.paste({ ...$i, ...x })).update(w), r.getCommand("pasteFormats").updateCallback((x, F) => L.paste({ ...Ui, description: F.label(), ...x })).update(w), r.getCommand("pasteFormulas").updateCallback((x, F) => L.paste({ ...Gi, description: F.label(), ...x })).update(w), r.getCommand("pasteTranspose").updateCallback((x, F) => L.paste({ ...ji, description: F.label(), ...x })).update(w), r.getCommand("pasteLinks").updateCallback((x, F) => L.paste({ ..._i, description: F.label(), ...x })).update(w), r.getCommand("cut").update(w), r.getCommand("paste").update(w);
|
|
2036
2037
|
}, [t, r]);
|
|
2037
2038
|
const C = ye(() => {
|
|
2038
2039
|
if (!A || !q.current) return;
|
|
2039
|
-
const
|
|
2040
|
-
if (
|
|
2040
|
+
const w = A.key;
|
|
2041
|
+
if (w !== "copy" && w !== "cut" && w !== "formatPainter") return;
|
|
2041
2042
|
const x = q.current.getItem();
|
|
2042
2043
|
if (x.getSource() !== t) return;
|
|
2043
|
-
const
|
|
2044
|
+
const F = q.current.isCut?.(), M = F ? b : s, D = F ? g : c, G = x.getCoords(), $ = G ? [G] : null;
|
|
2044
2045
|
return $ && $.length !== 0 ? (B) => {
|
|
2045
2046
|
const O = [];
|
|
2046
2047
|
for (let W = 0; W < $.length; W++) {
|
|
@@ -2050,7 +2051,7 @@ The content is not applied.` }), new Y("pasteFormulas", v, { label: "Paste Formu
|
|
|
2050
2051
|
return O;
|
|
2051
2052
|
} : null;
|
|
2052
2053
|
}, [A, t, n, c, s, g, b]);
|
|
2053
|
-
return { ...
|
|
2054
|
+
return { ...L, clipboard: v, overlays: C };
|
|
2054
2055
|
}, Ki = ft(wt((e, t) => {
|
|
2055
2056
|
const { view: n, element: r, sheet: l, gridStyle: o, commands: i, notifier: c } = e, g = o.body ?? {}, s = l.getView(), { overlays: b } = Zi({ element: r, sheet: l, sheetView: s, commands: i, copyForegroundColor: o.selection.strokeFill, copyBackgroundColor: g.fill, cutForegroundColor: o.selectionRemove.strokeFill, cutBackgroundColor: g.fill, notifier: c });
|
|
2056
2057
|
return ht(l?.getSelection(), { onChange(d) {
|
|
@@ -2058,9 +2059,9 @@ The content is not applied.` }), new Y("pasteFormulas", v, { label: "Paste Formu
|
|
|
2058
2059
|
n?.getStage();
|
|
2059
2060
|
}, [n?.getStage()]), b && n ? b(n) : null;
|
|
2060
2061
|
})), Yi = "_sheet-selection_12wyx_5", Xi = { key: "dragCut", description: "Drag selection to move cell contents.", cursor: "move" }, Ji = { key: "dragCutInsert", description: "Drag selection to insert cell contents.", cursor: "copy" }, Qi = { key: "dragCopy", description: "Drag selection to copy cell contents." }, ea = { key: "dragCopyInsert", description: "Drag selection to insert copied cell contents.", cursor: "move" }, kr = (e, t) => t.ctrlKey && t.shiftKey ? ea : t.ctrlKey ? Qi : t.shiftKey ? Ji : Xi, ta = { key: "fill", description: "Drag selection to extend series or fill.", cursor: "crosshair" }, na = ft(wt((e, t) => {
|
|
2061
|
-
const { view: n, commands: r, className: l, onFirstRender: o, notifier: i, onShowTooltip: c, onCloseTooltip: g, sheet: s, gridRef: b, gridStyle: d, isActive: u, editingCoords: R, ...q } = e, E = n?.getBounds(), A = ie(c, [c]), U = ie(g, [g]), [P,
|
|
2062
|
+
const { view: n, commands: r, className: l, onFirstRender: o, notifier: i, onShowTooltip: c, onCloseTooltip: g, sheet: s, gridRef: b, gridStyle: d, isActive: u, editingCoords: R, ...q } = e, E = n?.getBounds(), A = ie(c, [c]), U = ie(g, [g]), [P, v] = ue(() => s?.getSelection().getCoords()), L = ie((ge) => {
|
|
2062
2063
|
qt.isEqualSelectionCoords(ge, P) || s && s.getSelection().updateCoords(ge);
|
|
2063
|
-
}, [s, P]), C = dn(),
|
|
2064
|
+
}, [s, P]), C = dn(), w = Te(null), [x, F] = ue(s?.getProtection().isLocked()), [M, D] = ue(s?.getView().getMovableSelection().length > 0), G = it.detectIt().primaryInput === "touch", $ = !G && u, B = R !== null || M, O = ie((ge) => {
|
|
2064
2065
|
const ce = qt.cellToRange(ge);
|
|
2065
2066
|
if (s.isClosed()) return ce;
|
|
2066
2067
|
const ke = s.getRange(ce, { excludeHidden: !0 }).getMerges();
|
|
@@ -2092,11 +2093,11 @@ The content is not applied.` }), new Y("pasteFormulas", v, { label: "Paste Formu
|
|
|
2092
2093
|
D(s.getView().getMovableSelection().length > 0);
|
|
2093
2094
|
} }), ht(s?.getSelection(), { onChange(ge) {
|
|
2094
2095
|
const ce = s.getSelection().getCoords();
|
|
2095
|
-
|
|
2096
|
+
v(ce);
|
|
2096
2097
|
} }), ht(s, { onProtectionChange: () => {
|
|
2097
|
-
|
|
2098
|
+
F(s.getProtection().isLocked());
|
|
2098
2099
|
} });
|
|
2099
|
-
const { body: _ = {} } = d || {}, ae = n.getLayout(), ze = !($ && P.ranges.length <= 1 && R === null && !x && (!C.getMode() || oe)), { cursor: Ie, overlay: fe, onPointerDown: Ge } = nl({ gridRef: b, commands: r, layout: ae, getCellCoordsAsRangeCoords: O, selection: P, fillHandleBorderColor: _.fill, selectionBackgroundColor: u ? d.selection.fill : d.selectionInactive.fill, selectionBorderColor: u ? d.selection.strokeFill : d.selectionInactive.strokeFill, selectionRemoveBackgroundColor: u ? d.selectionRemove.fill : d.selectionInactive.fill, selectionRemoveBorderColor: u ? d.selectionRemove.strokeFill : d.selectionInactive.strokeFill, disableFillDrag: ze, disableMoveDrag: G || !(u && P.ranges.length <= 1 && R === null && !x), disableTouchSelection: B, onSelectionChange:
|
|
2100
|
+
const { body: _ = {} } = d || {}, ae = n.getLayout(), ze = !($ && P.ranges.length <= 1 && R === null && !x && (!C.getMode() || oe)), { cursor: Ie, overlay: fe, onPointerDown: Ge } = nl({ gridRef: b, commands: r, layout: ae, getCellCoordsAsRangeCoords: O, selection: P, fillHandleBorderColor: _.fill, selectionBackgroundColor: u ? d.selection.fill : d.selectionInactive.fill, selectionBorderColor: u ? d.selection.strokeFill : d.selectionInactive.strokeFill, selectionRemoveBackgroundColor: u ? d.selectionRemove.fill : d.selectionInactive.fill, selectionRemoveBorderColor: u ? d.selectionRemove.strokeFill : d.selectionInactive.strokeFill, disableFillDrag: ze, disableMoveDrag: G || !(u && P.ranges.length <= 1 && R === null && !x), disableTouchSelection: B, onSelectionChange: L, onSelectionDragStart: ne, onSelectionDragEnd: xe, onMoveDragStart: (ge, ce, ke) => {
|
|
2100
2101
|
C.setMode(kr(0, ke));
|
|
2101
2102
|
}, onMoveDragUpdate: (ge, ce, ke) => {
|
|
2102
2103
|
C.setMode(kr(0, ke));
|
|
@@ -2135,16 +2136,16 @@ The content is not applied.` }), new Y("pasteFormulas", v, { label: "Paste Formu
|
|
|
2135
2136
|
} catch (Se) {
|
|
2136
2137
|
i?.showError?.(Se);
|
|
2137
2138
|
} finally {
|
|
2138
|
-
|
|
2139
|
+
w.current = null, de?.();
|
|
2139
2140
|
}
|
|
2140
2141
|
}, onFillPreview: (ge, ce, ke) => {
|
|
2141
2142
|
if (b.current && A) {
|
|
2142
2143
|
C.setMode(ta);
|
|
2143
2144
|
try {
|
|
2144
|
-
|
|
2145
|
-
|
|
2145
|
+
w.current?.direction !== ke && (w.current = null, s.getRange(ge).autoFill(ce, { previewOnly: (m) => {
|
|
2146
|
+
w.current = { callback: m, direction: ke };
|
|
2146
2147
|
} }));
|
|
2147
|
-
const de =
|
|
2148
|
+
const de = w.current?.callback?.(ce);
|
|
2148
2149
|
if (!de || de.isEmpty()) return;
|
|
2149
2150
|
const Se = de.toText();
|
|
2150
2151
|
if (!Se) return;
|
|
@@ -2173,7 +2174,7 @@ The content is not applied.` }), new Y("pasteFormulas", v, { label: "Paste Formu
|
|
|
2173
2174
|
}
|
|
2174
2175
|
}
|
|
2175
2176
|
}, onFillDone: () => {
|
|
2176
|
-
|
|
2177
|
+
w.current = null, C.setMode(null), U?.();
|
|
2177
2178
|
} }), ve = ie((ge) => {
|
|
2178
2179
|
Ge(it.createSyntheticEvent(ge));
|
|
2179
2180
|
}, [Ge, R]);
|
|
@@ -2186,7 +2187,7 @@ The content is not applied.` }), new Y("pasteFormulas", v, { label: "Paste Formu
|
|
|
2186
2187
|
const _e = jt(t, () => ({}), []), De = Te(null);
|
|
2187
2188
|
return p("div", { className: Bt(l, "sheet-selection", Yi), style: { position: "absolute", width: E?.width, height: E?.height, overflow: "hidden", pointerEvents: "none", willChange: "none" }, ref: Cn([_e, De]), ...q, children: fe(n) });
|
|
2188
2189
|
})), io = Object.freeze({ x: 0, y: 0, width: 0, height: 0 }), oa = { fireOnModelChange: !1 }, ra = ft(wt((e, t) => {
|
|
2189
|
-
const { children: n, view: r, movable: l, onRefLoad: o, onRefUnload: i, onHide: c, onShow: g, onUnFocus: s, isDragging: b, updateFrameBounds: d, dragStart: u, style: R, disabled: q, renderMovable: E, ...A } = e, [U, P] = ue(io), [
|
|
2190
|
+
const { children: n, view: r, movable: l, onRefLoad: o, onRefUnload: i, onHide: c, onShow: g, onUnFocus: s, isDragging: b, updateFrameBounds: d, dragStart: u, style: R, disabled: q, renderMovable: E, ...A } = e, [U, P] = ue(io), [v, L] = ue(null), [C, w] = ue(!1), x = Te(null);
|
|
2190
2191
|
Ot(() => {
|
|
2191
2192
|
if (l.isClosed()) return;
|
|
2192
2193
|
const M = l.getBounds();
|
|
@@ -2207,7 +2208,7 @@ The content is not applied.` }), new Y("pasteFormulas", v, { label: "Paste Formu
|
|
|
2207
2208
|
i(M);
|
|
2208
2209
|
};
|
|
2209
2210
|
}, []);
|
|
2210
|
-
const
|
|
2211
|
+
const F = ye(() => {
|
|
2211
2212
|
if (!U) return null;
|
|
2212
2213
|
let { width: M, height: D } = U;
|
|
2213
2214
|
return E({ view: r, movable: l, disabled: q, isDragging: b, style: { position: "relative", left: 0, top: 0, width: M, height: D }, onHide: c, onShow: g });
|
|
@@ -2216,12 +2217,12 @@ The content is not applied.` }), new Y("pasteFormulas", v, { label: "Paste Formu
|
|
|
2216
2217
|
const D = M.shiftKey || M.ctrlKey, G = l.isSelected(), $ = M.currentTarget;
|
|
2217
2218
|
D && G ? l.unselect() : (G && !D || await l.select({ addToSelection: D }), u(M.nativeEvent, $), $.focus());
|
|
2218
2219
|
}, onFocus: (M) => {
|
|
2219
|
-
M.relatedTarget && !
|
|
2220
|
+
M.relatedTarget && !v && L(M.relatedTarget), w(!0);
|
|
2220
2221
|
}, onBlur: (M) => {
|
|
2221
|
-
|
|
2222
|
-
}, ...A, children:
|
|
2222
|
+
v && !x?.current?.contains(M.relatedTarget) && L(null), M.relatedTarget && w(!1);
|
|
2223
|
+
}, ...A, children: F });
|
|
2223
2224
|
})), la = "_movable-area_314c6_5", ia = ft(wt((e, t) => {
|
|
2224
|
-
const { view: n, movables: r, movablesView: l, renderMovable: o, transactional: i, onUnFocus: c, onFocus: g, disabled: s = !1, disableDrag: b = !1, disableResize: d = !1, className: u, style: R, renderDirections: q = ["nw", "n", "ne", "w", "e", "sw", "s", "se"], onFirstRender: E, ...A } = e, U = n.getBounds(), P = ie(E, [E]),
|
|
2225
|
+
const { view: n, movables: r, movablesView: l, renderMovable: o, transactional: i, onUnFocus: c, onFocus: g, disabled: s = !1, disableDrag: b = !1, disableResize: d = !1, className: u, style: R, renderDirections: q = ["nw", "n", "ne", "w", "e", "sw", "s", "se"], onFirstRender: E, ...A } = e, U = n.getBounds(), P = ie(E, [E]), v = ie(c, [c]), L = ie(g, [g]), [C, w] = ue([]), [x, F] = ue(!1), [M, D] = ue(!1), G = Te(!0), $ = Te(/* @__PURE__ */ new Map()), B = Te(/* @__PURE__ */ new Map()), O = Te(/* @__PURE__ */ new Map()), W = Te(/* @__PURE__ */ new Map()), ee = Te(/* @__PURE__ */ new Map()), z = Te({ onRequestFocus: (K) => (ce(K), null) }), y = Te(null), V = Te(null), ne = Te(null), [xe, oe] = ln((K) => K + 1, 0);
|
|
2225
2226
|
Ot(() => {
|
|
2226
2227
|
oe();
|
|
2227
2228
|
}, [n, r]), ht(r, { onCollectionChange: () => {
|
|
@@ -2252,13 +2253,13 @@ The content is not applied.` }), new Y("pasteFormulas", v, { label: "Paste Formu
|
|
|
2252
2253
|
Fe.forEach((je) => {
|
|
2253
2254
|
const Ae = O.current.get(je);
|
|
2254
2255
|
Ae && Fe.indexOf(je) !== -1 && K.push(Ae);
|
|
2255
|
-
}),
|
|
2256
|
+
}), w((je) => rt.isEqualArrays(je, K) ? je : K);
|
|
2256
2257
|
}, ze = Te(null), Ie = ye(() => new Promise((K) => {
|
|
2257
2258
|
ze.current = K;
|
|
2258
2259
|
}), []), fe = Te(null), Ge = ie(async (K, Fe) => {
|
|
2259
2260
|
fe.current = Fe, await (async () => !(!await Ie.then() || !ne.current))() && fe.current === Fe && ne.current.dragStart(K, Fe);
|
|
2260
2261
|
}, [C]), [ve, _e] = ue(!1), De = Te(null), ge = Te(null), ce = ie(async (K = null) => {
|
|
2261
|
-
if (K || (K = l.getMovableSelection()[0]), !K) return
|
|
2262
|
+
if (K || (K = l.getMovableSelection()[0]), !K) return v?.(), !1;
|
|
2262
2263
|
const Fe = O.current.get(K);
|
|
2263
2264
|
Fe ? (await rt.whenFocus(Fe), Fe.focus(), ge.current = Fe, De.current = null) : De.current = K;
|
|
2264
2265
|
}, [l]);
|
|
@@ -2268,12 +2269,12 @@ The content is not applied.` }), new Y("pasteFormulas", v, { label: "Paste Formu
|
|
|
2268
2269
|
const ke = ye(() => {
|
|
2269
2270
|
const K = r.search({ address: n.getVisibleRangeCoords(), excludeHidden: !0 });
|
|
2270
2271
|
if (K.length === 0 && $.current.size === 0) return null;
|
|
2271
|
-
const Fe = (S, te,
|
|
2272
|
-
const a = S.isSelected(), k = { tabIndex:
|
|
2272
|
+
const Fe = (S, te, N, Z = !0) => {
|
|
2273
|
+
const a = S.isSelected(), k = { tabIndex: N, view: n, movable: S, onRefLoad: (T) => {
|
|
2273
2274
|
De.current === S && (T.focus(), ge.current = T, De.current = null), O.current.set(S, T), B.current.set(T, S), te.rendered = !0, ae();
|
|
2274
2275
|
}, onRefUnload: (T) => {
|
|
2275
2276
|
O.current.delete(S), B.current.delete(T), te.rendered = !1, ae();
|
|
2276
|
-
}, onUnFocus:
|
|
2277
|
+
}, onUnFocus: v, onHide: (T) => {
|
|
2277
2278
|
te.onHide = T;
|
|
2278
2279
|
}, onShow: (T) => {
|
|
2279
2280
|
te.onShow = T;
|
|
@@ -2281,7 +2282,7 @@ The content is not applied.` }), new Y("pasteFormulas", v, { label: "Paste Formu
|
|
|
2281
2282
|
_(S, T);
|
|
2282
2283
|
}, dragStart: Ge, onMouseUp: () => {
|
|
2283
2284
|
if (fe.current = null, V.current) {
|
|
2284
|
-
|
|
2285
|
+
F(!1), D(!1);
|
|
2285
2286
|
let T = !1;
|
|
2286
2287
|
W.current?.forEach((f) => {
|
|
2287
2288
|
rt.isEqualBounds(f.movable.getBounds(), f.startBounds) || (T = !0);
|
|
@@ -2293,8 +2294,8 @@ The content is not applied.` }), new Y("pasteFormulas", v, { label: "Paste Formu
|
|
|
2293
2294
|
for (let S = 0; S < K.length; S++) {
|
|
2294
2295
|
const te = K[S];
|
|
2295
2296
|
if (te.isClosed()) continue;
|
|
2296
|
-
let
|
|
2297
|
-
|
|
2297
|
+
let N = je.get(te);
|
|
2298
|
+
N || (N = { frame: null, shown: null, onShow: null, onHide: null, rendered: !1, doShow: (Z, a) => {
|
|
2298
2299
|
if (!a || a.shown === !0) return;
|
|
2299
2300
|
a.shown = !0;
|
|
2300
2301
|
const k = ++a.visibilityRequestId;
|
|
@@ -2307,7 +2308,7 @@ The content is not applied.` }), new Y("pasteFormulas", v, { label: "Paste Formu
|
|
|
2307
2308
|
a.shown = !1;
|
|
2308
2309
|
const k = ++a.visibilityRequestId, T = await Promise.resolve(a.onHide?.(Z));
|
|
2309
2310
|
k === a.visibilityRequestId && T !== !1 && (a.shown = !1, $.current.delete(Z), oe());
|
|
2310
|
-
}, visibilityRequestId: 0 }),
|
|
2311
|
+
}, visibilityRequestId: 0 }), N.frame = Fe(te, N, S, !0), Ve.push(N.frame), N.doShow(te, N), je.delete(te), Ae.set(te, N);
|
|
2311
2312
|
}
|
|
2312
2313
|
const Oe = [];
|
|
2313
2314
|
return l.getMovableSelection().forEach((S) => {
|
|
@@ -2343,13 +2344,13 @@ The content is not applied.` }), new Y("pasteFormulas", v, { label: "Paste Formu
|
|
|
2343
2344
|
be(() => {
|
|
2344
2345
|
if (s || C.length === 0 || ut.current || m.current) return;
|
|
2345
2346
|
if (Ke.current) return void requestAnimationFrame(() => {
|
|
2346
|
-
ne.current && y.current && ne.current.refTargets.length > 0 && (ut.current = !0, ze.current?.(!0)),
|
|
2347
|
+
ne.current && y.current && ne.current.refTargets.length > 0 && (ut.current = !0, ze.current?.(!0)), w([...C]);
|
|
2347
2348
|
});
|
|
2348
2349
|
m.current = !0;
|
|
2349
2350
|
const K = tt.lazy(async () => {
|
|
2350
2351
|
try {
|
|
2351
|
-
const Fe = await import("./
|
|
2352
|
-
return m.current = !1, Ke.current = !0,
|
|
2352
|
+
const Fe = await import("./D7ucmKEU706sujEB.mjs");
|
|
2353
|
+
return m.current = !1, Ke.current = !0, w([...C]), Fe;
|
|
2353
2354
|
} catch (Fe) {
|
|
2354
2355
|
return console.warn(Fe), ze.current?.(!1), null;
|
|
2355
2356
|
}
|
|
@@ -2360,7 +2361,7 @@ The content is not applied.` }), new Y("pasteFormulas", v, { label: "Paste Formu
|
|
|
2360
2361
|
de(K.target, "Resize");
|
|
2361
2362
|
}, onResize: (K) => {
|
|
2362
2363
|
if (!V.current) return K.stopDrag(), void oe();
|
|
2363
|
-
|
|
2364
|
+
F(!0);
|
|
2364
2365
|
const Fe = K.direction[0] !== 0 && K.direction[1] !== 0;
|
|
2365
2366
|
let je = 0, Ae = 0;
|
|
2366
2367
|
for (let Ve = 0; Ve < C.length; Ve++) {
|
|
@@ -2369,17 +2370,17 @@ The content is not applied.` }), new Y("pasteFormulas", v, { label: "Paste Formu
|
|
|
2369
2370
|
console.warn("invalid element");
|
|
2370
2371
|
continue;
|
|
2371
2372
|
}
|
|
2372
|
-
let
|
|
2373
|
-
Ve === 0 ? (je = T, Ae = f) : (
|
|
2373
|
+
let N = K.dist[0], Z = K.dist[1], a = K.drag.dist[0], k = K.drag.dist[1], T = S.startBounds.width, f = S.startBounds.height;
|
|
2374
|
+
Ve === 0 ? (je = T, Ae = f) : (N *= T / je, a *= T / je, Z *= f / Ae, k *= f / Ae);
|
|
2374
2375
|
const I = { ...S.startBounds };
|
|
2375
|
-
if (I.width = Math.max(0, T +
|
|
2376
|
+
if (I.width = Math.max(0, T + N), I.height = Math.max(0, f + Z), K.direction[0] === -1 && (I.width = Math.max(0, Math.min(S.startBounds.x + T, T - a))), K.direction[1] === -1 && (I.height = Math.max(0, Math.min(S.startBounds.y + f, f - k))), Fe && (te.isLockAspectRatio() || K.inputEvent?.shiftKey)) {
|
|
2376
2377
|
const h = T / f, H = I.width / I.height;
|
|
2377
2378
|
H > h ? I.height = I.width / h : H < h && (I.width = I.height * h);
|
|
2378
2379
|
}
|
|
2379
2380
|
K.direction[0] === -1 && (I.x = Math.max(0, Math.min(S.startBounds.x + T, S.startBounds.x + T - I.width))), K.direction[1] === -1 && (I.y = Math.min(S.startBounds.y + f, S.startBounds.y + f - I.height)), S.movable.setBounds(n.toAbsoluteBounds(I));
|
|
2380
2381
|
}
|
|
2381
2382
|
}, onResizeEnd: (K) => {
|
|
2382
|
-
|
|
2383
|
+
F(!1), Se();
|
|
2383
2384
|
}, onDragStart: (K) => {
|
|
2384
2385
|
de(K.target, "Move");
|
|
2385
2386
|
}, onDrag: (K) => {
|
|
@@ -2393,48 +2394,48 @@ The content is not applied.` }), new Y("pasteFormulas", v, { label: "Paste Formu
|
|
|
2393
2394
|
}, onMouseUp: (K) => {
|
|
2394
2395
|
} }) }), [xe, We, C, n, s, b, d, x, M]);
|
|
2395
2396
|
return p("div", { className: Bt(u, "movable-area", la), style: { width: U.width, height: U.height, ...R, position: "absolute", overflow: "hidden", willChange: "transform" }, ref: Cn([Ne, qe]), ...A, children: p("div", { className: "movable-scroll", style: { position: "absolute", cursor: "initial", left: 0, top: 0, width: U.width, height: U.height }, ...A, children: Je("div", { ref: y, style: { position: "absolute", pointerEvents: "auto" }, onFocus: (K) => {
|
|
2396
|
-
|
|
2397
|
+
L?.(), _e(!0);
|
|
2397
2398
|
}, onBlur: (K) => {
|
|
2398
2399
|
_e(!1);
|
|
2399
2400
|
}, onKeyDownCapture: (K) => {
|
|
2400
2401
|
if (K.isDefaultPrevented()) return;
|
|
2401
2402
|
const Fe = K.nativeEvent.ctrlKey, je = K.nativeEvent.altKey, Ae = K.nativeEvent.shiftKey;
|
|
2402
2403
|
if (K.which === zt.Escape) {
|
|
2403
|
-
const
|
|
2404
|
-
let Z = [...
|
|
2404
|
+
const N = l.getMovableSelection();
|
|
2405
|
+
let Z = [...N];
|
|
2405
2406
|
return C.forEach((a) => {
|
|
2406
2407
|
if (Z.length === 0) return;
|
|
2407
2408
|
const k = B.current.get(a);
|
|
2408
2409
|
let T = Z.indexOf(k);
|
|
2409
2410
|
Z.splice(T, 1);
|
|
2410
|
-
}), Z.length !==
|
|
2411
|
+
}), Z.length !== N.length && l.selectMovables(Z), Z.length === 0 && v?.(), void K.preventDefault();
|
|
2411
2412
|
}
|
|
2412
|
-
const Ve = 0.1, Oe = (
|
|
2413
|
+
const Ve = 0.1, Oe = (N) => {
|
|
2413
2414
|
r.updateSelected((Z) => {
|
|
2414
|
-
Z.setRotation(Z.getRotation() +
|
|
2415
|
+
Z.setRotation(Z.getRotation() + N);
|
|
2415
2416
|
}, "Rotate");
|
|
2416
|
-
}, S = (
|
|
2417
|
+
}, S = (N, Z = !0) => {
|
|
2417
2418
|
r.updateSelected((a) => {
|
|
2418
2419
|
const k = a.getBounds();
|
|
2419
|
-
let T = 1 +
|
|
2420
|
+
let T = 1 + N;
|
|
2420
2421
|
Z || (T = 1 / T);
|
|
2421
2422
|
const f = Math.sqrt(Math.pow(k.width, 2) + Math.pow(k.height, 2)), I = Math.atan2(k.height, k.width), h = T * f;
|
|
2422
2423
|
if (h < 10) return;
|
|
2423
2424
|
const H = h * Math.cos(I), j = h * Math.sin(I), J = { x: k.x + (k.width - H) / 2, y: k.y + (k.height - j) / 2, width: H, height: j };
|
|
2424
2425
|
a.setBounds(J);
|
|
2425
2426
|
}, "Resize");
|
|
2426
|
-
}, te = (
|
|
2427
|
+
}, te = (N) => {
|
|
2427
2428
|
r.updateSelected((Z) => {
|
|
2428
|
-
const a = Z.getBounds(), k = { x: a.x + (
|
|
2429
|
+
const a = Z.getBounds(), k = { x: a.x + (N.x ?? 0), y: a.y + (N.y ?? 0), width: a.width + (N.width ?? 0), height: a.height + (N.height ?? 0) };
|
|
2429
2430
|
Z.setBounds(k);
|
|
2430
2431
|
}, "Nudge");
|
|
2431
2432
|
};
|
|
2432
|
-
if (K.which === zt.Delete) r.updateSelected((
|
|
2433
|
-
|
|
2433
|
+
if (K.which === zt.Delete) r.updateSelected((N) => {
|
|
2434
|
+
N.delete();
|
|
2434
2435
|
}, "Delete"), K.preventDefault();
|
|
2435
2436
|
else if (K.key === "a" && Fe) {
|
|
2436
|
-
const
|
|
2437
|
-
l.selectMovables(r.search(), !0), l.selectMovables(
|
|
2437
|
+
const N = l.getMovableSelection();
|
|
2438
|
+
l.selectMovables(r.search(), !0), l.selectMovables(N, !0), K.preventDefault();
|
|
2438
2439
|
} else K.key === "ArrowLeft" ? (Ae ? S(Ve, !1) : je ? Oe(-10) : te({ x: Fe ? -10 : -1 }), K.preventDefault()) : K.key === "ArrowRight" ? (Ae ? S(Ve, !0) : je ? Oe(10) : te({ x: Fe ? 10 : 1 }), K.preventDefault()) : K.key === "ArrowUp" ? (Ae ? S(Ve, !0) : te({ y: Fe ? -10 : -1 }), K.preventDefault()) : K.key === "ArrowDown" && (Ae ? S(Ve, !1) : te({ y: Fe ? 10 : 1 }), K.preventDefault());
|
|
2439
2440
|
}, children: [ke, Qe] }) }) });
|
|
2440
2441
|
})), fn = (e) => {
|
|
@@ -2467,135 +2468,135 @@ The content is not applied.` }), new Y("pasteFormulas", v, { label: "Paste Formu
|
|
|
2467
2468
|
function aa(e) {
|
|
2468
2469
|
const { movables: t, movablesView: n, transactional: r, commands: l, target: o, onRepeatCommandChange: i, notifier: c } = e, g = dn();
|
|
2469
2470
|
Te(g.getMode()).current = g.getMode();
|
|
2470
|
-
const s = ie(async (
|
|
2471
|
+
const s = ie(async (v, L, C = null, w = !0) => {
|
|
2471
2472
|
const x = async () => {
|
|
2472
|
-
const
|
|
2473
|
+
const F = await Promise.resolve(c?.showBusy?.(v.label()));
|
|
2473
2474
|
try {
|
|
2474
|
-
await
|
|
2475
|
-
const M = C ??
|
|
2475
|
+
await L();
|
|
2476
|
+
const M = C ?? v?.label?.();
|
|
2476
2477
|
if (i) {
|
|
2477
2478
|
let D = null;
|
|
2478
|
-
|
|
2479
|
+
v && M !== !1 && (D = new Ue(v.key(), o, { label: M, description: M }, x)), i(D);
|
|
2479
2480
|
}
|
|
2480
|
-
|
|
2481
|
+
F?.(), w && g.setMode(null);
|
|
2481
2482
|
} catch (M) {
|
|
2482
|
-
|
|
2483
|
+
F?.(), c?.showError?.(M);
|
|
2483
2484
|
}
|
|
2484
2485
|
};
|
|
2485
2486
|
await x();
|
|
2486
|
-
}, [i, c]), [b, d] = ln((
|
|
2487
|
+
}, [i, c]), [b, d] = ln((v) => v + 1, 0), u = ie((v, L, C) => {
|
|
2487
2488
|
if (!n) return;
|
|
2488
|
-
const
|
|
2489
|
-
if (
|
|
2489
|
+
const w = n.getMovableSelection();
|
|
2490
|
+
if (w.length === 0) return;
|
|
2490
2491
|
let x = "Drawings";
|
|
2491
|
-
if (
|
|
2492
|
-
const M =
|
|
2492
|
+
if (w.length === 1) {
|
|
2493
|
+
const M = w[0];
|
|
2493
2494
|
x = Xo.capitalize(M.getContent().getType()) ?? "Drawing";
|
|
2494
2495
|
}
|
|
2495
|
-
const
|
|
2496
|
-
s(
|
|
2496
|
+
const F = `${v.label()} ${x}`;
|
|
2497
|
+
s(v, () => {
|
|
2497
2498
|
let M = null;
|
|
2498
|
-
r && (M = r.beginCommit(
|
|
2499
|
+
r && (M = r.beginCommit(F));
|
|
2499
2500
|
const D = n.getMovableSelection();
|
|
2500
2501
|
if (D.length === 0) return;
|
|
2501
2502
|
const G = C?.(D);
|
|
2502
2503
|
for (let $ = 0; $ < D.length; $++) {
|
|
2503
2504
|
const B = D[$];
|
|
2504
|
-
|
|
2505
|
+
L(B, G);
|
|
2505
2506
|
}
|
|
2506
2507
|
M?.commit();
|
|
2507
2508
|
});
|
|
2508
2509
|
}, [n, r]), [R, q] = ue(n.getMovableSelection()[0] ?? null), [E, A] = ue(!R || R?.isProtected()), U = ye(() => [new Y("moveToFront", o, { label: "Bring to Front", description: "Move to the front of all of the other drawings.", shortcut: { key: "BracketRight", modifiers: [Q.Ctrl, Q.Shift] } }, function() {
|
|
2509
|
-
u(this, (
|
|
2510
|
-
|
|
2510
|
+
u(this, (v) => {
|
|
2511
|
+
v.moveToFront();
|
|
2511
2512
|
});
|
|
2512
2513
|
}), new Y("moveForward", o, { label: "Bring Forward", description: "Move forward one layer in the z order.", shortcut: { key: "BracketRight", modifiers: [Q.Ctrl] } }, function() {
|
|
2513
|
-
u(this, (
|
|
2514
|
-
|
|
2514
|
+
u(this, (v) => {
|
|
2515
|
+
v.moveForward();
|
|
2515
2516
|
});
|
|
2516
2517
|
}), new Y("moveToBack", o, { label: "Send to Back", description: "Move to the back of all of the other drawings.", shortcut: { key: "BracketLeft", modifiers: [Q.Ctrl, Q.Shift] } }, function() {
|
|
2517
|
-
u(this, (
|
|
2518
|
-
|
|
2518
|
+
u(this, (v) => {
|
|
2519
|
+
v.moveToBack();
|
|
2519
2520
|
});
|
|
2520
2521
|
}), new Y("moveBackward", o, { label: "Send Backward", description: "Move backwards one layer in the z order.", shortcut: { key: "BracketLeft", modifiers: [Q.Ctrl] } }, function() {
|
|
2521
|
-
u(this, (
|
|
2522
|
-
|
|
2522
|
+
u(this, (v) => {
|
|
2523
|
+
v.moveBackward();
|
|
2523
2524
|
});
|
|
2524
2525
|
}), new Y("toggleLockAspectRatio", o, { label: "Lock Aspect Ratio", description: "Toggle whether the aspect ratio should be maintained when resizing from corners." }, function() {
|
|
2525
|
-
u(this, (
|
|
2526
|
-
|
|
2526
|
+
u(this, (v) => {
|
|
2527
|
+
v.setLockAspectRatio(!v.isLockAspectRatio());
|
|
2527
2528
|
});
|
|
2528
2529
|
}), new Y("formatAnchorTypeTwoCell", o, { label: "Move and size with cells", description: "Set your drawing to move and resize when underling sheet resizes." }, function() {
|
|
2529
|
-
u(this, (
|
|
2530
|
-
|
|
2530
|
+
u(this, (v) => {
|
|
2531
|
+
v.setAnchorType(on.Type.TwoCell);
|
|
2531
2532
|
});
|
|
2532
2533
|
}), new Y("formatAnchorTypeOneCell", o, { label: "Move but don't size with cells", description: "Set your drawing to only move when underling sheet resizes." }, function() {
|
|
2533
|
-
u(this, (
|
|
2534
|
-
|
|
2534
|
+
u(this, (v) => {
|
|
2535
|
+
v.setAnchorType(on.Type.OneCell);
|
|
2535
2536
|
});
|
|
2536
2537
|
}), new Y("formatAnchorTypeAbsolute", o, { label: "Don't move or size with cells", description: "Set your drawing to never move or resize when underling sheet resizes." }, function() {
|
|
2537
|
-
u(this, (
|
|
2538
|
-
|
|
2538
|
+
u(this, (v) => {
|
|
2539
|
+
v.setAnchorType(on.Type.Absolute);
|
|
2539
2540
|
});
|
|
2540
2541
|
}), new Y("formatDrawAlignLeft", o, { label: "Align Left", description: "Align the selected drawings to the left." }, function() {
|
|
2541
|
-
u(this, (
|
|
2542
|
-
|
|
2542
|
+
u(this, (v, L) => {
|
|
2543
|
+
v.setBounds({ x: L.x });
|
|
2543
2544
|
}, fn);
|
|
2544
2545
|
}), new Y("formatDrawAlignCenter", o, { label: "Align Center", description: "Align the selected drawings vertically relative to each other." }, function() {
|
|
2545
|
-
u(this, (
|
|
2546
|
-
|
|
2546
|
+
u(this, (v, L) => {
|
|
2547
|
+
v.setBounds({ x: (L.width - v.getBounds().width) / 2 + L.x });
|
|
2547
2548
|
}, fn);
|
|
2548
2549
|
}), new Y("formatDrawAlignRight", o, { label: "Align Right", description: "Align the selected drawings to the right." }, function() {
|
|
2549
|
-
u(this, (
|
|
2550
|
-
|
|
2550
|
+
u(this, (v, L) => {
|
|
2551
|
+
v.setBounds({ x: L.width - v.getBounds().width + L.x });
|
|
2551
2552
|
}, fn);
|
|
2552
2553
|
}), new Y("formatDrawAlignTop", o, { label: "Align Top", description: "Align the selected drawings to the top." }, function() {
|
|
2553
|
-
u(this, (
|
|
2554
|
-
|
|
2554
|
+
u(this, (v, L) => {
|
|
2555
|
+
v.setBounds({ y: L.y });
|
|
2555
2556
|
}, fn);
|
|
2556
2557
|
}), new Y("formatDrawAlignMiddle", o, { label: "Align Middle", description: "Align the selected drawings horizontally relative to each other." }, function() {
|
|
2557
|
-
u(this, (
|
|
2558
|
-
|
|
2558
|
+
u(this, (v, L) => {
|
|
2559
|
+
v.setBounds({ y: (L.height - v.getBounds().height) / 2 + L.y });
|
|
2559
2560
|
}, fn);
|
|
2560
2561
|
}), new Y("formatDrawAlignBottom", o, { label: "Align Bottom", description: "Align the selected drawings to the bottom." }, function() {
|
|
2561
|
-
u(this, (
|
|
2562
|
-
|
|
2562
|
+
u(this, (v, L) => {
|
|
2563
|
+
v.setBounds({ y: L.height - v.getBounds().height + L.y });
|
|
2563
2564
|
}, fn);
|
|
2564
2565
|
}), new Y("formatDrawDistributeHorz", o, { label: "Distribute Horizontally", description: "Distribute the selected drawings horizontally with equal spacing between each." }, function() {
|
|
2565
|
-
u(this, (
|
|
2566
|
-
|
|
2567
|
-
}, (
|
|
2566
|
+
u(this, (v, L) => {
|
|
2567
|
+
v.setBounds(L.get(v));
|
|
2568
|
+
}, (v) => Rr(v));
|
|
2568
2569
|
}), new Y("formatDrawDistributeVert", o, { label: "Distribute Vertically", description: "Distribute the selected drawings vertically with equal spacing between each." }, function() {
|
|
2569
|
-
u(this, (
|
|
2570
|
-
|
|
2571
|
-
}, (
|
|
2570
|
+
u(this, (v, L) => {
|
|
2571
|
+
v.setBounds(L.get(v));
|
|
2572
|
+
}, (v) => Rr(v, !1));
|
|
2572
2573
|
}), new Y("formatDrawFlipHorz", o, { label: "Flip Horizontally", description: "Flip the selected drawings horizontally." }), new Y("formatDrawFlipVert", o, { label: "Flip Vertically", description: "Flip the selected drawings vertically." }), new Y("formatDrawGroup", o, { label: "Group", description: "Group the selected drawings into a single drawing." }), new Y("formatDrawUngroup", o, { label: "Ungroup", description: "Break the group of a drawing into individual drawings." }), new Y("formatDrawSwapShapes", o, { label: "Swap Shapes", description: "Swap the positions of the swap." }), new Y("formatDrawSwapShapesHorz", o, { label: "Swap Shapes Horizontally", description: "Swap the positions of the swap horizontally." }), new Y("formatDrawSwapShapesVert", o, { label: "Swap Shapes Vertically", description: "Swap the positions of the swap vertically." })], [n, R]);
|
|
2573
2574
|
be(() => {
|
|
2574
2575
|
}, [g]);
|
|
2575
2576
|
const P = ye(() => {
|
|
2576
|
-
let
|
|
2577
|
-
return
|
|
2577
|
+
let v = null;
|
|
2578
|
+
return v = l ? l.createChildGroup(o, "movable", !1) : new yo(o, "movable"), v.addCommands(U, !0), v;
|
|
2578
2579
|
}, [l, U]);
|
|
2579
2580
|
return ht(R, { onAnyChange: () => {
|
|
2580
2581
|
P.getCommand("formatAnchorTypeTwoCell").update({ state: R?.getAnchorType() === on.Type.TwoCell }), P.getCommand("formatAnchorTypeOneCell").update({ state: R?.getAnchorType() === on.Type.OneCell }), P.getCommand("formatAnchorTypeAbsolute").update({ state: R?.getAnchorType() === on.Type.Absolute }), P.getCommand("formatAnchorTypeAbsolute").update({ state: R?.getAnchorType() === on.Type.Absolute }), P.getCommand("toggleLockAspectRatio").update({ state: R?.isLockAspectRatio() });
|
|
2581
|
-
}, onProtectedChange: (
|
|
2582
|
-
A(
|
|
2582
|
+
}, onProtectedChange: (v) => {
|
|
2583
|
+
A(v.isProtected());
|
|
2583
2584
|
}, onDelete: () => {
|
|
2584
2585
|
} }), ht(n, { onMovableSelectionChange: () => {
|
|
2585
|
-
const
|
|
2586
|
-
q(
|
|
2586
|
+
const v = n.getMovableSelection()[0] ?? null;
|
|
2587
|
+
q(v), A(!v || v.isProtected()), d();
|
|
2587
2588
|
} }), ht(t, { onCollectionChange: () => {
|
|
2588
2589
|
d();
|
|
2589
2590
|
} }), be(() => {
|
|
2590
|
-
const
|
|
2591
|
-
P.getCommand("formatAnchorTypeTwoCell").update(
|
|
2592
|
-
const
|
|
2593
|
-
let x = { disabled:
|
|
2594
|
-
if (!
|
|
2591
|
+
const v = { disabled: E };
|
|
2592
|
+
P.getCommand("formatAnchorTypeTwoCell").update(v), P.getCommand("formatAnchorTypeOneCell").update(v), P.getCommand("formatAnchorTypeAbsolute").update(v), P.getCommand("toggleLockAspectRatio").update(v);
|
|
2593
|
+
const L = t.getCount(), C = n.getMovableSelection(), w = E || L <= 1 || C.length === 0;
|
|
2594
|
+
let x = { disabled: w }, F = x;
|
|
2595
|
+
if (!w && C.length === 1) {
|
|
2595
2596
|
const G = C[0];
|
|
2596
|
-
G.getZIndex() === 0 && (x = { disabled: !0 }), G.getZIndex() ===
|
|
2597
|
+
G.getZIndex() === 0 && (x = { disabled: !0 }), G.getZIndex() === L - 1 && (F = { disabled: !0 });
|
|
2597
2598
|
}
|
|
2598
|
-
P.getCommand("moveToFront").update(
|
|
2599
|
+
P.getCommand("moveToFront").update(F), P.getCommand("moveForward").update(F), P.getCommand("moveToBack").update(x), P.getCommand("moveBackward").update(x);
|
|
2599
2600
|
const M = { disabled: E || C.length <= 1 };
|
|
2600
2601
|
P.getCommand("formatDrawAlignLeft").update(M), P.getCommand("formatDrawAlignCenter").update(M), P.getCommand("formatDrawAlignRight").update(M), P.getCommand("formatDrawAlignTop").update(M), P.getCommand("formatDrawAlignMiddle").update(M), P.getCommand("formatDrawAlignBottom").update(M), P.getCommand("formatDrawFlipHorz").update(M), P.getCommand("formatDrawFlipVert").update(M), P.getCommand("formatDrawGroup").update(M), P.getCommand("formatDrawUngroup").update(M), P.getCommand("formatDrawSwapShapes").update(M), P.getCommand("formatDrawSwapShapesHorz").update(M), P.getCommand("formatDrawSwapShapesVert").update(M);
|
|
2601
2602
|
const D = { disabled: E || C.length <= 2 };
|
|
@@ -2618,13 +2619,13 @@ const Xs = ft(wt((e, t) => {
|
|
|
2618
2619
|
} }, "movable-area"), [r, l, i, b]);
|
|
2619
2620
|
return d && n ? d : null;
|
|
2620
2621
|
})), da = ft(wt((e, t) => {
|
|
2621
|
-
const { view: n, sheet: r, gridStyle: l, getCellEditor: o, showProtectedError: i, setEditingCoords: c, commands: g, notifier: s = oi } = e, b = dn(), [d, u] = ue(null), [R, q] = ue(null), [E, A] = ue(null), [U, P] = ue(null), [
|
|
2622
|
+
const { view: n, sheet: r, gridStyle: l, getCellEditor: o, showProtectedError: i, setEditingCoords: c, commands: g, notifier: s = oi } = e, b = dn(), [d, u] = ue(null), [R, q] = ue(null), [E, A] = ue(null), [U, P] = ue(null), [v, L] = ue(null);
|
|
2622
2623
|
Ot(() => {
|
|
2623
|
-
if (E === null) return P(null), void
|
|
2624
|
+
if (E === null) return P(null), void L(null);
|
|
2624
2625
|
const y = () => {
|
|
2625
2626
|
const V = r.getRange(E).getCell(), ne = V.getStyle();
|
|
2626
2627
|
let xe, oe = ne.getFill()?.toCSS(l.body.darkMode);
|
|
2627
|
-
oe.background !== "none" && oe.background !== "transparent" || (oe = r.getStyles().getNormal().getFill().toCSS(l.body.darkMode)), oe.background !== "none" && oe.background !== "transparent" || (oe = { background: l.body.fill }), P({ style: oe }), V && !V.getFormula() && (xe = V?.getRenderHorizontalAlignment()),
|
|
2628
|
+
oe.background !== "none" && oe.background !== "transparent" || (oe = r.getStyles().getNormal().getFill().toCSS(l.body.darkMode)), oe.background !== "none" && oe.background !== "transparent" || (oe = { background: l.body.fill }), P({ style: oe }), V && !V.getFormula() && (xe = V?.getRenderHorizontalAlignment()), L(xe ?? ri.Left);
|
|
2628
2629
|
};
|
|
2629
2630
|
return y(), r.getRange(E).addListener(() => {
|
|
2630
2631
|
y();
|
|
@@ -2641,10 +2642,10 @@ const Xs = ft(wt((e, t) => {
|
|
|
2641
2642
|
throw s.showError(new Error(`Unable to enter '${V}'.`, { cause: ne })), ne;
|
|
2642
2643
|
}
|
|
2643
2644
|
}
|
|
2644
|
-
}, [r, R, s]),
|
|
2645
|
+
}, [r, R, s]), w = ie((y) => r.getRange(y).getCell().getExtrusions() ?? qt.cellToRange(y), [r]), x = ie((y) => {
|
|
2645
2646
|
let V = we.Orientation.Row, ne = !1;
|
|
2646
2647
|
y !== we.Direction.Up && y !== we.Direction.Down || (V = we.Orientation.Column), y !== we.Direction.Left && y !== we.Direction.Up || (ne = !0), r.getSelection().traverse(V, ne);
|
|
2647
|
-
}, [r]),
|
|
2648
|
+
}, [r]), F = Xe((y, V) => {
|
|
2648
2649
|
if (o) return o(y, V);
|
|
2649
2650
|
if (!r) return null;
|
|
2650
2651
|
const { ref: ne, ...xe } = y;
|
|
@@ -2652,7 +2653,7 @@ const Xs = ft(wt((e, t) => {
|
|
|
2652
2653
|
const _ = { sheet: r, coords: V, editState: oe };
|
|
2653
2654
|
b.setMode((ae) => ({ ...ae, description: _.editState.editMode ? "Edit" : "Enter", args: { ...ae?.args, stateAndCoords: _ } }));
|
|
2654
2655
|
}, editState: R.editState });
|
|
2655
|
-
}, [r, U, o, R, E]), { overlay: M, startEdit: D, submitEdit: G, cancelEdit: $, onKeyboardEventNative: B, onPointerEventNative: O } = yi({ view: n, activeCoords: d, getCellEditor:
|
|
2656
|
+
}, [r, U, o, R, E]), { overlay: M, startEdit: D, submitEdit: G, cancelEdit: $, onKeyboardEventNative: B, onPointerEventNative: O } = yi({ view: n, activeCoords: d, getCellEditor: F, canEdit: () => {
|
|
2656
2657
|
const y = r.getProtection();
|
|
2657
2658
|
if (y.isReadOnly()) return !1;
|
|
2658
2659
|
const V = y.isLocked();
|
|
@@ -2666,7 +2667,7 @@ const Xs = ft(wt((e, t) => {
|
|
|
2666
2667
|
A(null), q(null), b.setMode(null), c(null);
|
|
2667
2668
|
}, onDoneEdit: (y) => {
|
|
2668
2669
|
b.setMode(null);
|
|
2669
|
-
}, onNavigate: x, containerProps: U, borderStrokeFill: l.selection?.strokeFill, borderStrokeWidth: r?.getSelection().getCoords().ranges?.length > 1 ? 1 : 2, alignment:
|
|
2670
|
+
}, onNavigate: x, containerProps: U, borderStrokeFill: l.selection?.strokeFill, borderStrokeWidth: r?.getSelection().getCoords().ranges?.length > 1 ? 1 : 2, alignment: v, getRangeCoords: w });
|
|
2670
2671
|
ht(r.getSelection(), { onChange(y) {
|
|
2671
2672
|
u(r.getSelection().getCoords().cell);
|
|
2672
2673
|
} });
|
|
@@ -2695,13 +2696,13 @@ const Xs = ft(wt((e, t) => {
|
|
|
2695
2696
|
} else o(!1), c(null);
|
|
2696
2697
|
}, [r, n]), E = ie((C) => {
|
|
2697
2698
|
C.preventDefault(), C.stopPropagation();
|
|
2698
|
-
const
|
|
2699
|
+
const w = n.getCellCoordsFromClient(C.clientX, C.clientY), x = r.getTables().search({ address: w });
|
|
2699
2700
|
x.length === 1 && x[0].select();
|
|
2700
2701
|
}, [n, r]), A = ie((C) => {
|
|
2701
2702
|
C.preventDefault(), C.stopPropagation();
|
|
2702
|
-
const
|
|
2703
|
+
const w = n.getCellCoordsFromClient(C.clientX, C.clientY), x = r.getTables().search({ address: w });
|
|
2703
2704
|
if (x.length === 1) {
|
|
2704
|
-
const
|
|
2705
|
+
const F = x[0].getRange().getCoords(), M = { colStart: F.colStart, rowStart: w.rowIndex, colEnd: F.colEnd, rowEnd: w.rowIndex };
|
|
2705
2706
|
r.getRange(M).select();
|
|
2706
2707
|
}
|
|
2707
2708
|
}, [n, r]), U = ie(() => {
|
|
@@ -2725,48 +2726,48 @@ const Xs = ft(wt((e, t) => {
|
|
|
2725
2726
|
P();
|
|
2726
2727
|
}, [n]), be(() => {
|
|
2727
2728
|
let C = null;
|
|
2728
|
-
if (i) for (let
|
|
2729
|
-
const x = i[
|
|
2730
|
-
Ql.isCellWithinRange(g,
|
|
2729
|
+
if (i) for (let w = 0; w < i.length && !C; w++) {
|
|
2730
|
+
const x = i[w], F = x.getRange().getCoords();
|
|
2731
|
+
Ql.isCellWithinRange(g, F) && (C = x);
|
|
2731
2732
|
}
|
|
2732
2733
|
d(C);
|
|
2733
2734
|
}, [g, i]);
|
|
2734
|
-
const
|
|
2735
|
-
let
|
|
2735
|
+
const v = ie((C) => {
|
|
2736
|
+
let w = null;
|
|
2736
2737
|
if (i) for (let x = 0; x < i.length; x++) {
|
|
2737
|
-
const
|
|
2738
|
+
const F = i[x], M = F.getRange().getCoords();
|
|
2738
2739
|
let D = n.getRangeCoordsBounds(M);
|
|
2739
2740
|
const G = n.getRelativePointFromClient(C.clientX, C.clientY), $ = G.x, B = G.y;
|
|
2740
2741
|
if ($ >= D.x && $ <= D.x + D.width && B >= D.y && B <= D.y + D.height) {
|
|
2741
2742
|
const O = n.getViewportSize();
|
|
2742
|
-
$ <= 0 || B <= 0 || $ >= O.width || B >= O.height || (
|
|
2743
|
+
$ <= 0 || B <= 0 || $ >= O.width || B >= O.height || (w = F);
|
|
2743
2744
|
}
|
|
2744
2745
|
}
|
|
2745
|
-
R(
|
|
2746
|
+
R(w);
|
|
2746
2747
|
}, [n, i]);
|
|
2747
2748
|
if (be(() => {
|
|
2748
2749
|
const C = n?.getStage();
|
|
2749
|
-
if (C && i) return C.addEventListener("mousemove",
|
|
2750
|
-
C.removeEventListener("mousemove",
|
|
2750
|
+
if (C && i) return C.addEventListener("mousemove", v), C.addEventListener("mouseleave", v), () => {
|
|
2751
|
+
C.removeEventListener("mousemove", v), C.removeEventListener("mouseleave", v);
|
|
2751
2752
|
};
|
|
2752
2753
|
}, [i, n?.getStage()]), !n || !i || i.length === 0) return null;
|
|
2753
|
-
const
|
|
2754
|
+
const L = [];
|
|
2754
2755
|
for (let C = 0; C < i.length; C++) {
|
|
2755
|
-
const
|
|
2756
|
-
if (
|
|
2757
|
-
const x =
|
|
2756
|
+
const w = i[C];
|
|
2757
|
+
if (w.isClosed()) continue;
|
|
2758
|
+
const x = w === u, F = w === b, M = w.getRange().getCoords(), D = n.getRangeCoordsBounds(M);
|
|
2758
2759
|
let G;
|
|
2759
|
-
if (x ||
|
|
2760
|
-
const $ =
|
|
2760
|
+
if (x || F) {
|
|
2761
|
+
const $ = w.getStyle().getProperties(), B = $.headerRow?.fill?.background ?? $.wholeTable?.border?.top?.color?.toString();
|
|
2761
2762
|
if (B && r) {
|
|
2762
2763
|
const O = r.getStyles().parseColor(B);
|
|
2763
2764
|
O && (G = O.toCSS());
|
|
2764
2765
|
}
|
|
2765
2766
|
G || (G = "var(--sxl-app-color-shadow, rgba(0,0,0,.15))");
|
|
2766
2767
|
}
|
|
2767
|
-
|
|
2768
|
+
L.push(p("div", { style: { position: "absolute", left: D.x, top: D.y, width: Math.min(16, D.width), height: D.height, pointerEvents: "all", cursor: ca }, onMouseDown: A }, `table-select-row-${w.getName()}`)), L.push(p("div", { style: { position: "absolute", left: D.x, top: D.y, width: Math.min(16, D.width), height: Math.min(16, D.height), pointerEvents: "all", cursor: ua }, onMouseDown: E }, `table-select-${w.getName()}`)), L.push(p(rl, { x: D.x, y: D.y, width: D.width, height: D.height, range: M, strokeWidth: F ? 0.5 : 0, stroke: G ?? "var(--sxl-app-color-grey, grey)", style: { willChange: "box-shadow", transition: "box-shadow 80ms ease-in-out", boxShadow: x ? `${G} 0px 0px 1px 1px` : void 0 } }, `table-outline-${w.getName()}`));
|
|
2768
2769
|
}
|
|
2769
|
-
return
|
|
2770
|
+
return L;
|
|
2770
2771
|
})), ha = ft(wt((e, t) => {
|
|
2771
2772
|
const { view: n, sheet: r, animationTime: l = 60 } = e, [o, i] = tt.useState(null), [c, g] = tt.useState(null), s = tt.useRef(null), b = ie(() => {
|
|
2772
2773
|
const A = r.getSelectedCell(), U = A.getSpill()?.getCoords() ?? null;
|
|
@@ -2794,7 +2795,7 @@ const Xs = ft(wt((e, t) => {
|
|
|
2794
2795
|
const n = { ...e }, r = t?.getNormal().getFont(), l = r?.toCSS(), o = { text: { fontFamily: l?.fontFamily, fontSize: r?.getSize() } }, i = n.body = rt.mergeContentful(e.body, o);
|
|
2795
2796
|
return n.body = rt.mergeContentful({ fill: "#fff", strokeFill: "#dad8d6", strokeWidth: 0.5, text: { fontWeight: "400", fontStyle: "normal", fill: "#040404" } }, i), n.buttonSurface = rt.mergeContentful({ fill: "#fff", text: { fill: "black" }, edgeStrokeFill: "black" }, n.buttonSurface), n.selection = { fill: "rgba(16, 124, 65, 0.1)", strokeFill: "#217346", strokeWidth: 2, ...e.selection }, n.selectionInactive = { ...n.selection, fill: "rgba(16, 124, 65, 0.1)", strokeFill: "#dad8d6", ...e.selectionInactive }, n.selectionRemove = { ...n.selection, fill: "rgba(200, 0, 0, 0.1)", strokeFill: "rgba(200, 0, 0, 1)", ...e.selectionRemove }, n.headerSelection = { ...n.selection, ...e.headerSelection }, n.headerSelectionInactive = { ...n.selectionInactive, ...e.headerSelectionInactive }, n.header = rt.mergeContentful(n.body, { edgeStrokeFill: "rgb(171, 171, 171)", fill: "#f0f0f0", strokeShadow: void 0, edgeStrokeWidth: 1 }, e.header), n.header = rt.mergeContentful(n.header, o), n.headerSelect = rt.mergeContentful(n.header, { fill: "rgba(16, 124, 65, 0.1)", text: { fill: n.headerSelection.strokeFill, fontWeight: "700" } }, e.headerSelect), n.headerSelect = rt.mergeContentful(n.headerSelect, o), n.headerSelectAll = rt.mergeContentful(n.headerSelect, {}, e.headerSelectAll), n.headerSelectAll = rt.mergeContentful(n.headerSelectAll, o), n;
|
|
2796
2797
|
}, pa = { fireOnModelChange: !1 }, Mr = {}, fa = ft(wt((e, t) => {
|
|
2797
|
-
const { sheet: n, gridStyle: r = Mr, headersStyle: l = Mr, onSheetContextMenu: o, showColumnHeaders: i, columnHeaderProps: c, showRowHeaders: g, rowHeaderProps: s, showScrollbars: b = !0, scrollPaneProps: d, onViewportChange: u, commands: R, onRepeatCommandChange: q, onMoveCell: E, overlays: A, renderMovable: U, viewportComponent: P, onElementLoad:
|
|
2798
|
+
const { sheet: n, gridStyle: r = Mr, headersStyle: l = Mr, onSheetContextMenu: o, showColumnHeaders: i, columnHeaderProps: c, showRowHeaders: g, rowHeaderProps: s, showScrollbars: b = !0, scrollPaneProps: d, onViewportChange: u, commands: R, onRepeatCommandChange: q, onMoveCell: E, overlays: A, renderMovable: U, viewportComponent: P, onElementLoad: v, getCellEditor: L, onFocus: C, onBlur: w, style: x = it.EmptyCssProperties, notifier: F, onShowTooltip: M, onShowColumnTooltip: D, onShowRowTooltip: G, onCloseTooltip: $, gridProps: B, cellRenderProps: O, ...W } = e;
|
|
2798
2799
|
if (tt.useEffect(() => {
|
|
2799
2800
|
Yr._validate(!0);
|
|
2800
2801
|
}, []), !n) throw new Error("ISheet must be provided.");
|
|
@@ -2812,7 +2813,7 @@ const Xs = ft(wt((e, t) => {
|
|
|
2812
2813
|
X = gt.width, Me = gt.lineHeight;
|
|
2813
2814
|
}
|
|
2814
2815
|
return { width: Math.round(X + 5), height: Math.round(Me + 3) };
|
|
2815
|
-
}, [m, fe?.header.text, n]), Qe = Ze ? Le * ut.width : De.edgeStrokeWidth, K = We ? Le * ut.height : De.edgeStrokeWidth, Fe = Math.max(V, (n?.getColumnHeaders().getDefaultSize() ?? ut.width) + Qe + 1), je = Math.max(ne, (n?.getRowHeaders().getDefaultSize() ?? ut.height) + K + 1), Ae = Te(/* @__PURE__ */ new Map()), Ve = Te(null), Oe = () => ({ getColOffset: (X) => n.getColumnHeaders().findOffset(X), getColIndex: (X) => n.getColumnHeaders().findIndex(X), getRowOffset: (X) => n.getRowHeaders().findOffset(X), getRowIndex: (X) => n.getRowHeaders().findIndex(X) }), [S, te] = ue(() => Oe()), [
|
|
2816
|
+
}, [m, fe?.header.text, n]), Qe = Ze ? Le * ut.width : De.edgeStrokeWidth, K = We ? Le * ut.height : De.edgeStrokeWidth, Fe = Math.max(V, (n?.getColumnHeaders().getDefaultSize() ?? ut.width) + Qe + 1), je = Math.max(ne, (n?.getRowHeaders().getDefaultSize() ?? ut.height) + K + 1), Ae = Te(/* @__PURE__ */ new Map()), Ve = Te(null), Oe = () => ({ getColOffset: (X) => n.getColumnHeaders().findOffset(X), getColIndex: (X) => n.getColumnHeaders().findIndex(X), getRowOffset: (X) => n.getRowHeaders().findOffset(X), getRowIndex: (X) => n.getRowHeaders().findIndex(X) }), [S, te] = ue(() => Oe()), [N, Z] = ue(!1), [a, k] = ue(null), T = !0, f = fe.selection?.strokeFill, I = Xe(() => Gt.current, []), [h, H] = ue(), j = ie((X) => {
|
|
2816
2817
|
H(X), n && n.getView() && n.getView().setTopLeft(X ? { left: X.left, top: X.top } : null), u?.(X);
|
|
2817
2818
|
}, [n, u]), J = Te(null);
|
|
2818
2819
|
be(() => {
|
|
@@ -2834,13 +2835,13 @@ const Xs = ft(wt((e, t) => {
|
|
|
2834
2835
|
return X.coords.colIndex > 0 && (Me[yt.Left] = { index: X.coords.colIndex, scrollOffset: X.topLeft.left }), X.coords.rowIndex > 0 && (Me[yt.Top] = { index: X.coords.rowIndex, scrollOffset: X.topLeft.top }), Me;
|
|
2835
2836
|
}, [he, me] = ue(() => Ce(n.getView().getFreezePanes())), Re = dn(), Pe = Xe(() => ke.current, []), Be = ie((X) => {
|
|
2836
2837
|
Re.setMode((Me) => Me?.key === "edit" ? { ...Me, args: { ...Me.args } } : { key: "edit", args: { stateAndCoords: null, start: X } });
|
|
2837
|
-
}, []), et = ie(() => h, [h]), $e = Bi({ sheet: n, commands: R, target: Pe, onRepeatCommandChange: q, bodyStyle: ve, notifier:
|
|
2838
|
+
}, []), et = ie(() => h, [h]), $e = Bi({ sheet: n, commands: R, target: Pe, onRepeatCommandChange: q, bodyStyle: ve, notifier: F, onStartEdit: Be, getViewport: et }), [nt, He] = ue(n.getSelection().isEntire()), [at, Ct] = ue(de?.getMovableSelection().length > 0), Ft = a !== null || at, Ht = null, [ot, vt] = ue(!1);
|
|
2838
2839
|
be(() => {
|
|
2839
2840
|
vt(!1);
|
|
2840
2841
|
}, [n.getProtection()]);
|
|
2841
2842
|
const Nt = ie(() => {
|
|
2842
|
-
ot || (vt(!0),
|
|
2843
|
-
}, [
|
|
2843
|
+
ot || (vt(!0), F.showMessage?.(Je("span", { children: ["This sheet is protected.", p("br", {}), "To make a change, unprotect the sheet. You might be requested to enter a password."] }), { type: Jo.Error }));
|
|
2844
|
+
}, [F, ot]), Vt = ye(() => {
|
|
2844
2845
|
const X = Re.getMode();
|
|
2845
2846
|
return X?.cursor ? X.cursor : null;
|
|
2846
2847
|
}, [Ht, Re]), [Lt, Mt] = ue(null), bt = Te(!1), [Xt, cn] = ue([]), kn = Te(null), [tn, Rn] = ue(Wn.EmptyTopLeft), [_t, Yn] = ue(Wn.EmptyTopLeft);
|
|
@@ -3014,7 +3015,7 @@ const Xs = ft(wt((e, t) => {
|
|
|
3014
3015
|
try {
|
|
3015
3016
|
await lt.getHyperlink()?.open();
|
|
3016
3017
|
} catch (Et) {
|
|
3017
|
-
|
|
3018
|
+
F?.showError?.(Et);
|
|
3018
3019
|
}
|
|
3019
3020
|
}
|
|
3020
3021
|
}), gt && gt.colIndex === X.range.colStart && gt.rowIndex === X.range.rowStart && (lt = lt.createTemporaryCell({ value: null }));
|
|
@@ -3022,10 +3023,10 @@ const Xs = ft(wt((e, t) => {
|
|
|
3022
3023
|
return ui(qi, { ...Ye, key: Ee, bodyStyle: ve, docTheme: ct.getTheme(), normalStyle: ct.getNormal(), showFormulas: de.isShowFormulas(), showZeros: de.isShowZeros(), onLinkMouseDown: pt, ...O, value: lt });
|
|
3023
3024
|
}, [n, S, ve, a, de?.isShowFormulas(), de.isShowZeros()]), $l = Xe((X, Me) => {
|
|
3024
3025
|
const { key: Ee, ...Ye } = X;
|
|
3025
|
-
return [p(Hi, { ref: Me, getVisibleCells: Dt, sheet: n, gridStyle: fe, ...Ye }, `border-${Ee}`), p(ga, { ref: Me, sheet: n, commands: $e, ...Ye }, `table-${Ee}`), p(ha, { ref: Me, sheet: n, ...Ye }, `spill-${Ee}`), p(na, { ref: Me, sheet: n, commands: $e, notifier:
|
|
3026
|
+
return [p(Hi, { ref: Me, getVisibleCells: Dt, sheet: n, gridStyle: fe, ...Ye }, `border-${Ee}`), p(ga, { ref: Me, sheet: n, commands: $e, ...Ye }, `table-${Ee}`), p(ha, { ref: Me, sheet: n, ...Ye }, `spill-${Ee}`), p(na, { ref: Me, sheet: n, commands: $e, notifier: F, onShowTooltip: xe, onCloseTooltip: ae, gridStyle: fe, gridRef: ke, editingCoords: a, isActive: T, ...Ye }, `selection-${Ee}`), p(Ki, { ref: Me, sheet: n, commands: $e, gridStyle: fe, element: I, notifier: F, ...Ye }, `copy-paste-${Ee}`), p(sa, { ref: Me, sheet: n, commands: $e, target: Pe, notifier: F, renderMovable: U, movableProps: { onUnFocus: () => {
|
|
3026
3027
|
Gt.current.focus();
|
|
3027
|
-
} }, ...Ye }, `movable-${Ee}`), p(da, { ref: Me, sheet: n, commands: $e, notifier:
|
|
3028
|
-
}, [n, ke.current, fe,
|
|
3028
|
+
} }, ...Ye }, `movable-${Ee}`), p(da, { ref: Me, sheet: n, commands: $e, notifier: F, gridStyle: fe, getCellEditor: L, showProtectedError: Nt, setEditingCoords: k, ...Ye }, `editor-${Ee}`)];
|
|
3029
|
+
}, [n, ke.current, fe, L, $e, F]), [ir, Ul] = ue(!1), Gl = ye(() => {
|
|
3029
3030
|
if (Fe === 0 || je === 0) return null;
|
|
3030
3031
|
const X = n.getStyles().getNormal(), Me = X.getFont(), Ee = X.getFill(), Ye = X.getBorder(), lt = X.getFill().getType() === co.Type.None;
|
|
3031
3032
|
let gt = Ne, pt = Ne;
|
|
@@ -3052,7 +3053,7 @@ const Xs = ft(wt((e, t) => {
|
|
|
3052
3053
|
}, onFocus: (X) => {
|
|
3053
3054
|
Z(!0), C?.(X);
|
|
3054
3055
|
}, onBlur: (X) => {
|
|
3055
|
-
Z(!1),
|
|
3056
|
+
Z(!1), w?.(X);
|
|
3056
3057
|
}, ref: Gt, ...W, children: p("div", { className: Bt("sheetxl-sheet", Fi), style: { position: "absolute", width: "100%", height: "100%", boxSizing: "border-box", display: "flex", flexDirection: "column", flex: "1 1 100%", zIndex: "0", ...jl }, children: Je("div", { style: { display: "flex", flexDirection: "row", flex: "1 1 100%" }, children: [Mn, eo, Je("div", { style: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden", position: "relative" }, children: [to, Je("div", { style: { display: "flex", flexDirection: "column", flex: "1 1 100%", position: "relative", borderRight: `solid ${De.edgeStrokeWidth}px ${De.edgeStrokeFill}`, backgroundColor: ve.fill }, ref: y, onContextMenu: Jn, children: [Gl, mt, p(Oi, { style: { position: "absolute", right: 24, bottom: 4 }, colorLicensee: fe?.selection?.strokeFill, colorCredits: fe?.body?.text?.fill })] })] })] }) }) });
|
|
3057
3058
|
if (b) {
|
|
3058
3059
|
const X = (Me) => p(cl, { ...Me, sheet: n });
|
|
@@ -3061,19 +3062,19 @@ const Xs = ft(wt((e, t) => {
|
|
|
3061
3062
|
}, createHorizontalScrollbar: X, createVerticalScrollbar: X, ...d, children: Mo });
|
|
3062
3063
|
}
|
|
3063
3064
|
be(() => {
|
|
3064
|
-
ze.current = !1, z?.(),
|
|
3065
|
+
ze.current = !1, z?.(), N && Gt.current?.focus();
|
|
3065
3066
|
}, [n]);
|
|
3066
3067
|
const [Do, _l] = ue(!1), ar = ie(() => {
|
|
3067
3068
|
Do || _l(!0);
|
|
3068
3069
|
}, [Do]);
|
|
3069
3070
|
return be(() => {
|
|
3070
|
-
if (ir) return typeof
|
|
3071
|
+
if (ir) return typeof v == "function" && v(), it.detectIt().primaryInput === "touch" && ar(), () => {
|
|
3071
3072
|
};
|
|
3072
|
-
}, [
|
|
3073
|
+
}, [v, ir, Do]), Mo;
|
|
3073
3074
|
}));
|
|
3074
3075
|
fa.displayName = "SheetElement";
|
|
3075
3076
|
const Js = Object.freeze(Object.defineProperty({ __proto__: null }, Symbol.toStringTag, { value: "Module" })), Dr = "data:image/webp;base64,UklGRhIPAABXRUJQVlA4TAYPAAAv/8F/EM8HIZJtWU0fdlTh3wRCIMlkE+EqkiTFyt57/KQ8/zKeEf5iaseNJClS1DGDxWcwvhfuCo5tW88SHw8Xh5ypbC3tnf8QHEfOB/D97w4PuFHBIx6MHJ74zvj/0aLdlH9AYWEjHiwOJR5M7Q+FAigmTRQOJRqczrVUKABQSMYgoAFFAhIwBkgaYEkBSABowDGgcYakUZirArQhRMUIIHGLBIAEEoDRfyokIAEAMhrSRmEOSPyS/jvR+BYFIWkUhLQhCpLGGQ2rhPiCOKPxDIVQmAZQDMYIjCTfNQXVJv8pnQqhuAonnczGDPv0VwFw/w+uGiAwQYjJXxffaJzROKPHoArGAPA+6o9AtiIj4XgAWGKCwAQBVNMSHQNEjTMqOSWPQEFRHOVl4vp/nnhI/DBNK8CGXCpeFvONip/jvPn67qb957v+Nssyv96/Jwg/xzT9yORhfR4fb6vF9ef39Nt62g55v37/7dRzfx9xFLRtIyX8ae+/AxARE8APxbCQtkidoqVGDBDxR3r8/59vo88vnW07v9nrY+l0tn0zemuSnn03W83Otn2zcarbfIrZqnG7Ykr77/nS5PP+/E6/iP7DgiRJiZX13F2QhYM/OrBtm7at/ZB927Zt27ZtPr/oK7Jt27b9x7dtGxcv1sFcc/R1woj+S2IkSZGkaXMpD2sZhqf3R5Y/23+2/2z/2f6z/Wf7z/af7T/bf7b/bP/97S8/r8tpn2+Rafa98ufeMc3nfK8v3V9QZHWVtFs5f/i2z8bd7+E/nX/Vuk9+uO6dF3IuWEy12r0S9eGUdA5q0RtuvnxxXpUFVPf5eQlfe7jG8j58Q6+uZZZNRGmv+GgOidbMMHMMy/WbJu7az/wcUqUk9C01LJNj5tZsDsnuizfPWh/F3WdN4FDO/eiYow4LozJuhpfDoPtcywyr8pAYDpv2RlmOB1TF7fBymPXAqA4Wwskrp3JY9oVZZA2efmm8m8O2Xa796tcoMprDvA2DAprXfkYWC9C0eflat2xrBgtRrKuDwgXemsKS5I6vr2zVzq9ZnLbUUzSHL5lFast+JTPi1rJUZWzN1bBuSSxZ7pvqaFfeVpYub2QtzaqI3McCtsppqPXPTWc0C9kjB3TqyFcsZ54b8/XpXJSHRW23qU1LJrC4PdFRlWsMzWCJ815ZpUYDU1no7mqiQ7VvYbnz9zIUaOkqFr3tZ7XnfKSHhe/+ON3pNJblL8N1QXEG+xlCXzXXmvKZjKJYn9IWKV7POMqIqlaYVtEMpU0l6lq46Eo3g2lvO2WtRPoB48m/SFXjwt3JiMqYp6eJkHWTGVQ3BZSky30Mq0/KVMTnZ2BN6aggV2UwtPa0UI+rGV1pylkm1RjB+IpZqpoxRG5ghGW/oZjr9xlj+xarZSiBBEaZe5BSxhK4jXHmeVElj/2Bkeb2KeQVzWKs7eumDnMZbemtlGEU4236UVUYyojb3UATK5Yx5lY30sOqRVlBn3YPdqKCgrexZ7SwcknQP13bfjWC6nD1XEcreHs8QgXOTg369bDmlxFQNU28mRpwYUMNXDcTQVXC2woYTOo2DrJxk1+ZQ9/9PIeNprjRs72ij4H2wbdZjdzdTDYizUXG9P3gnfZGDVy3gFMxD5ZBN9U7BWoJpoK2OpBvHvbYArWBUlFDgXu8QG2BVJanG2xLxC/UckNZZ6Om5VZmnd1NQfvtrRJzByPGXHr8ohqyn/eOr0MIZXAJZFvF1zGAUvC0AuzT+LpgXxJ7K/BuK/jA8LpiXhpPwZ3dcFN4XbIukUVgnVR01Y4WhVi19KLTC6Ca/vD4uevReM40PgHVY9GFMC2bHkAtG10Qy9K5rzHOLQkcGVwYwxJ6H+fspuAC2ZVSG5Rbjg0ulFk5Ta2FcUHTvcqtGrCo7aqZFo2EaK3oOXi0mpOO+xoinOB8cGgF2JTYrQC9EFoRJqV2Gp6Z3oisEItymxKBbniR+yIrxqDsBoCzUGQFpS+93fnYNiO4Z6FVwxc1WjXpotdCc0HoXHRMPucfY0qQTXJ6L+jqGCY0EzekcaOm+LY/g4PSCGCuirwgDtJ4dePy/uCvg2tJ8wNkhDzmObBsJDkhj7OagtL3rrwAhX84mnWiv8Yz+M/IXgyZHTFNc3jZ7dLYfSNo5uA2EpLzJT/c8b1liOY47CtHKOEfj+xcyRJ2vCqAx0MyRR2zE88uwr4hV9RxkoHGeIDv93Cf8aVotiT/uiTb0X+uKfFgnCw5Y473FWJxu7whx/wull0JkMwhx5MMJJ6UPeKYjyCZ43iw/BHHTwOxtAQAOPafwGEExem+vKd794bhxzckhNFvDgGbYbhCgoAbe46jcKsw0MbcH4Qv3hAH2vgOHIsbg4CNPScxuFcoWGPuhWFX8WnO/gt7hufPIVhSEstIOjN7ChF4WDhIY34RwcqGb4uHWfjnPZwmAQGN73PI7xkh4Yy5nvzuFhPOeKj4OkhQsqeJF9qz0DXAWB45sBFU7K6QXoKENTLOzPyC9PYIDGR8sfBOscikTwfzHp3MJlOPcujyB2TnYjiEMbeUfn0jOoRxP9GVeRgPYPyk6FqH3AaAUh5ZkOL4hpC/XLOim8/yXQ3yxXxWck9o4gb3h85/inFrhLfLQf3iIZIPNfmWLFQvniG4DyUPtYvHij7V0UXl4uxqua0vG3WLOUduNxjdELBn98vm8Jroy5z5jCSzJpY9m/CWnF43NYtvlHu8CclKxeJPxDabzNQrfkBsZ8pNteLMCKmdIDu1irmj1LaRn1rFraT2oAxVKh4oNcuHj7aRx9FNhof3pPaq5Djyzsi2RD3sDXmCSAejD/wqmeIM3y7JzS1b9YkfkfpAIchXdeI1Yu9ZqrHaxNOFdqGcVSbmgMyW974v2DmPb3A+lMhsbcl6rMrMXCCz9WSuKnFDmW0gdzWJc2S2suxVJO4s9YiT/uoRt5TZ1gJQjbitzMaJQC3iFVJfqhAElYiX6M3VCQ7FijMOokpYIfSTMFQLbYV+QQhlobUXtDJB9dBZ6OnOAFVEjtDznfyribpCz3e2ryoKLP9yJ4Uyu9x+rsmYUS2zS7yrjDSpjwuidbXxtdCmda46NghtGuPq4yOphx071LYKeZ+E7hXXamTk37XjTjzo+gqq0ThI7L2Nq9X7Z7Gexp1aq1ofnovVNO7cmfX67FyspXEnP/P74qxa1uho3Omrm6ZePpF73PkPzL41q5gbSOzu8PrOvGbek9uoXvF2Z1bKbQOvd8yajU3kdpHRx+W6yY4QfGfjfT4tV87dJLfBD1y+Kqudm0jwjjX5orx6+ol+ISM9viernxV/5+53wqw94f3OSCHJ/XII3Z/23S+tgPeHH5DovQgYoAWye5ovQkdldwpehNIDspuOLkSPkfDdCXaXo+7Pdj8G87pGemPRgnRI/Eua2/Pd78zMMvH3OhxtZhw/I/G7AytM78lvS6o4lQI4YuRQcbofwH5n//w6UqDeJwDtSBSpNyEcXSigSHkgHIqUqXq6x53xGUFoV56ZdHwZg41hYuU5jsF0b6AE6zEC0fEk0RqAwpIg0XKXwDiC6G9ghGsLwWgXolUZFzVxWAxjph3TgRyLsuFHIATsfQLS1gQRWw7laOMARGyyQUi61z5k/QiKRd1Dtq8Qi79e847ZDst/3Al+ROO7N6xn5HGtQWh62DdqiwiOWWyjtipAeLrXNGzvQjq40J5hu/ccIoPvOcbtUlBnFMF8VdZFswowGX6U4Yl+2KOLQHWiW+D2NUPl5/29Ijcb2NEGtYqc/ySw0wlzV2+038muI2AtFXWS2zCsewq3gsl+ZytEZnC/Xmi/011M0FpQYSPW/QRcwWC/80WfA3fcCXdOr2+ElFz+/U74CoFrnkPjFCy97I2tInRdo9T6RkgGku93yrYEz68HZdY3QrKQungC2DoKVCQTifM3g3g6yfboZfY76zCC2CeKHAvMNmPW/U47vogw9kKo4KzkLGMFzONOfFSo0Myk3O3A3xLMLlKowOxk3O/MtQlnj8QKy1C+/U69koCa6/BYQVnK1kcEtUV6kP1OvqsRVkOuV+wYMpuOqfY7ew8C26/7B+s6Y4maQXC7VMG6zFqaHigmvK0aravMZfm5E7SFfMJhdo/WRfZy/NwZ5hHk5vkgWscByNAj1YS5CxStwxCUb3dTQt2T4ToKQvGfO0kbgu3f28J1EIbCP3eWKwl40x8Yrm0ginaLQcg79ZCgX7UJRcEmnSPsncBBv2oZjGLF5sA/70y3oj/vTIcVcIpRHw3+nS1mnLHIzH1JAdV+MPhXk4WkRC5SQU1Sg3711QgJSnwfRWjhFPPuQ33e2b4oIi30WgZDblUd0kPzIbsvhzTRMMCm1yNddClc3iPqOO+ULrD2HSJ15EiEyr2YFFJVPFCeHqSSAh/gvPsZtZx32ptQPkd3xZx24NkYX1EbIsVczQUotivppivhSW1J2undDHDzGhqQfno+HZmHCkhDtYzG5fZzpKOOTUblxmrSUic2gjrv9KSoym8GJH0l6SozC40J9UlbHUnB4vETpK9OPorkZURWkcY6H4VjEbPupLWe9WKwriHpreZfIniyqPOkuSLmuaU3rRtpr4N7hf9/4yfSX+d2Sj6tqZdBKsx5j9Tu6EBa7IRLZLt6OUiRHZoqr62NSJddiHTLKsVJ+uzAWElXLBheRhrN4ZwmpcdakFarNS9bxDnMToMUW9148cTMKyfldvpu0WTecJz0mxEn1x2e+DzScQ6fTAsmZ2xtTz+n5juS5bGlM+m66meSZPl7Y2dnUnjLtmaIsSpxVEdSerkuvwiTmOedIMV38uKUcHfXqwFSflVL4zPDeJxhV3uyBB2/cnx4+sK8QJahqm47Y8PNg9c0JItRedyM2PAxMWqZQVakyrgZMeFg7y8PsS7VeuO70P4bxP3ZRaUGWZ6OmVv9oSk63llBVqkLh4Zt9IaW1Tt6tjfIYhWRY86YGCKH/WWGmUOWraaHxzw1yV2DMxQ2zHq51Tmyfl2o99bI25Jig2vP54ljDp9ykLWsdj3fkO9vvWPKtL8wndo7YeztOy8bcKh5OVncyhq2XNrd96ZpLrjy5/qYb/l8S7q2r1NJlj/bf7b/bP/Z/rP9Z/vP9p/tP9t/tv9s//3djwA=", va = ft(wt((e, t) => {
|
|
3076
|
-
const { children: n, disabled: r, style: l, picture: o, description: i, isDragging: c, view: g, onHide: s, onShow: b, onKeyDownCapture: d, onFocus: u, onBlur: R, loadingPanel: q, ...E } = e, [A, U] = ue(!1), [P,
|
|
3077
|
+
const { children: n, disabled: r, style: l, picture: o, description: i, isDragging: c, view: g, onHide: s, onShow: b, onKeyDownCapture: d, onFocus: u, onBlur: R, loadingPanel: q, ...E } = e, [A, U] = ue(!1), [P, v] = ue(null), [L, C] = ue(null), [w, x] = ue(null);
|
|
3077
3078
|
be(() => {
|
|
3078
3079
|
C(null), o.getDetails().then((D) => {
|
|
3079
3080
|
U(!1), C(D.asUrl()), D.asSVGText?.() && x(D.asSVGText());
|
|
@@ -3081,16 +3082,16 @@ const Js = Object.freeze(Object.defineProperty({ __proto__: null }, Symbol.toStr
|
|
|
3081
3082
|
console.warn(D), U(!0), C(Dr), x(null);
|
|
3082
3083
|
});
|
|
3083
3084
|
}, [o]);
|
|
3084
|
-
const
|
|
3085
|
-
if (
|
|
3086
|
-
|
|
3085
|
+
const F = jt(t, () => ({ isPictureEditor: () => !0 }), []), M = ye(() => {
|
|
3086
|
+
if (L || w) return p("img", { style: { flex: "1", width: "100%", height: "100%", border: A ? "var(--sxl-app-color-grey, grey) solid 1px" : void 0, backgroundColor: A ? "var(--sxl-app-color-background, white)" : void 0, boxShadow: A ? "0px 0px 3px var(--sxl-app-color-error, red)" : void 0, objectFit: A ? "contain" : void 0, opacity: P ? 1 : 0, filter: "var(--sxl-app-filter-dark-invert)" }, draggable: !1, src: L, onLoad: () => {
|
|
3087
|
+
v(!0);
|
|
3087
3088
|
}, onError: ({ currentTarget: D }) => {
|
|
3088
3089
|
console.log("error"), D.onerror = null, C(Dr), U(!0);
|
|
3089
3090
|
}, alt: i ?? `${o.getType()}` });
|
|
3090
|
-
}, [P, o,
|
|
3091
|
+
}, [P, o, L, w, c]);
|
|
3091
3092
|
if (!o.isClosed()) return Je("div", { className: "picture-editor", style: { position: "relative", display: "flex", flex: "1 1 100%", filter: c ? "drop-shadow(1px 1px 1.5px var(--sxl-app-color-shadow, rgba(0, 0, 0, .25)))" : void 0, ...l, width: "100%", height: "100%" }, tabIndex: 0, ...E, onKeyDownCapture: (D) => {
|
|
3092
3093
|
d?.(D);
|
|
3093
|
-
}, ref:
|
|
3094
|
+
}, ref: F, children: [P || A ? void 0 : q, M] });
|
|
3094
3095
|
}));
|
|
3095
3096
|
va.displayName = "PictureEditor";
|
|
3096
3097
|
const Qs = ft(wt((e, t) => {
|
|
@@ -3100,13 +3101,13 @@ const Qs = ft(wt((e, t) => {
|
|
|
3100
3101
|
const b = jt(t, () => ({ isChartEditor: () => !0 }), []), [d, { height: u, width: R }] = an();
|
|
3101
3102
|
if (!l.isClosed()) return p("div", { ...s, ref: Cn([b, d]), children: p("div", { className: "chart-editor", style: { width: "100%", height: "100%", backgroundColor: "var(--sxl-app-color-background, white)", backgroundImage: "var(--sxl-app-image-background)", alignItems: "center", justifyContent: "center", zoom: o.getZoom(), display: "flex", position: "relative", border: "var(--sxl-app-color-grey, grey) solid 1px", filter: r ? "blur(1px)" : void 0, boxShadow: i ? "1px 1px 2px var(--sxl-app-color-shadow, rgba(0,0,0,.15))" : void 0 }, children: p("div", { style: { textAlign: "center" }, children: l.getDescription() }) }) });
|
|
3102
3103
|
})), wa = "_editable-input_1bqx6_6", ya = (e) => p("input", { ...e }), ba = ft(wt((e, t) => {
|
|
3103
|
-
const { style: n = {}, className: r, value: l = "", onSubmit: o, onChange: i, onCancel: c, createInput: g = ya, notifier: s, styleHover: b = {}, dragging: d, maxLength: u, disabled: R = !1, readOnly: q = !1, ...E } = e, [A, U] = ue(!1), [P,
|
|
3104
|
+
const { style: n = {}, className: r, value: l = "", onSubmit: o, onChange: i, onCancel: c, createInput: g = ya, notifier: s, styleHover: b = {}, dragging: d, maxLength: u, disabled: R = !1, readOnly: q = !1, ...E } = e, [A, U] = ue(!1), [P, v] = ue(!1), [L, C] = ue(l);
|
|
3104
3105
|
be(() => {
|
|
3105
3106
|
C(l);
|
|
3106
3107
|
}, [l]);
|
|
3107
|
-
const
|
|
3108
|
+
const w = Te(null), [x, F] = ue(null), M = Xe(function(ee) {
|
|
3108
3109
|
const z = ee.message;
|
|
3109
|
-
x !== z && (s?.showMessage?.(z, { type: Jo.Error }),
|
|
3110
|
+
x !== z && (s?.showMessage?.(z, { type: Jo.Error }), F(z));
|
|
3110
3111
|
}, [s, x]), D = Xe((ee) => {
|
|
3111
3112
|
let z = !1;
|
|
3112
3113
|
try {
|
|
@@ -3114,38 +3115,38 @@ const Qs = ft(wt((e, t) => {
|
|
|
3114
3115
|
} catch (y) {
|
|
3115
3116
|
M(y);
|
|
3116
3117
|
}
|
|
3117
|
-
return z ? (
|
|
3118
|
-
|
|
3118
|
+
return z ? (w.current = null, v(!1), C(ee), z) : (setTimeout(() => {
|
|
3119
|
+
w.current?.focus();
|
|
3119
3120
|
}, 0), z);
|
|
3120
3121
|
}, [o]), G = ie(() => {
|
|
3121
|
-
C(l),
|
|
3122
|
+
C(l), w.current = null, v(!1), c?.();
|
|
3122
3123
|
}, [c, l]), $ = ye(() => {
|
|
3123
3124
|
if (!P) return null;
|
|
3124
|
-
const ee = { className: Bt(wa), autoFocus: !0, spellCheck: !1, name: "editable-label", autoComplete: "off", maxLength: u, type: "text", value:
|
|
3125
|
-
|
|
3125
|
+
const ee = { className: Bt(wa), autoFocus: !0, spellCheck: !1, name: "editable-label", autoComplete: "off", maxLength: u, type: "text", value: L, onFocus: (z) => {
|
|
3126
|
+
w.current || (w.current = z.target, setTimeout(() => {
|
|
3126
3127
|
z.target?.select();
|
|
3127
3128
|
}, 0));
|
|
3128
3129
|
}, onBlur: (z) => {
|
|
3129
|
-
|
|
3130
|
+
w.current && D(L);
|
|
3130
3131
|
}, onChange: (z) => {
|
|
3131
3132
|
P && C(z.target.value);
|
|
3132
3133
|
}, onMouseDown: (z) => z.stopPropagation(), onKeyDown: (z) => z.code === "Escape" ? (z.preventDefault(), void G()) : z.code === "Enter" ? (z.preventDefault(), void D(z.target.value)) : void (z.code !== "Tab" ? z.stopPropagation() : D(z.target.value)) };
|
|
3133
3134
|
return p(bn, { children: g(ee) });
|
|
3134
|
-
}, [P,
|
|
3135
|
+
}, [P, L, D, G, g, R]), [B, O] = ue();
|
|
3135
3136
|
Ot(() => {
|
|
3136
3137
|
let ee = Object.assign({}, n);
|
|
3137
3138
|
(d || A) && (ee = Object.assign(ee, b)), O(ee);
|
|
3138
3139
|
}, [d, A, b, n]), be(() => {
|
|
3139
|
-
$ && i?.(
|
|
3140
|
-
}, [$, i,
|
|
3140
|
+
$ && i?.(L);
|
|
3141
|
+
}, [$, i, L]);
|
|
3141
3142
|
const W = jt(t, () => ({ startEdit() {
|
|
3142
|
-
R || q ||
|
|
3143
|
+
R || q || v(!0);
|
|
3143
3144
|
}, cancel() {
|
|
3144
3145
|
G();
|
|
3145
3146
|
} }), []);
|
|
3146
3147
|
return Je("div", { ...E, ref: W, style: { flexDirection: "column", display: "flex", ...B }, className: Bt(r), children: [Je("div", { style: { position: "relative", boxSizing: "content-box", whiteSpace: "pre", userSelect: "none", display: "flex", justifyContent: "center" }, onDoubleClick: () => {
|
|
3147
|
-
R || q ||
|
|
3148
|
-
}, onMouseEnter: () => U(!0), onMouseLeave: () => U(!1), children: [p("div", { className: "editable-label-container", style: { textAlign: "center", display: "flex", minHeight: "1em", marginTop: "2px", opacity: P ? 0 : 1 }, children:
|
|
3148
|
+
R || q || v(!0);
|
|
3149
|
+
}, onMouseEnter: () => U(!0), onMouseLeave: () => U(!1), children: [p("div", { className: "editable-label-container", style: { textAlign: "center", display: "flex", minHeight: "1em", marginTop: "2px", opacity: P ? 0 : 1 }, children: L }), $] }), p("div", { style: { whiteSpace: "pre", position: "relative", maxHeight: "0px", height: "0px", visibility: "hidden", marginLeft: "1px", marginRight: "1px", overflow: "hidden", ...b }, children: L })] });
|
|
3149
3150
|
})), bo = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0;
|
|
3150
3151
|
function Sn(e) {
|
|
3151
3152
|
const t = Object.prototype.toString.call(e);
|
|
@@ -3430,8 +3431,8 @@ function xn(e, t) {
|
|
|
3430
3431
|
s && (n = function(d, u, R) {
|
|
3431
3432
|
const q = yl(u);
|
|
3432
3433
|
if (!q) return d;
|
|
3433
|
-
const { scaleX: E, scaleY: A, x: U, y: P } = q,
|
|
3434
|
-
return { width: C, height:
|
|
3434
|
+
const { scaleX: E, scaleY: A, x: U, y: P } = q, v = d.left - U - (1 - E) * parseFloat(R), L = d.top - P - (1 - A) * parseFloat(R.slice(R.indexOf(" ") + 1)), C = E ? d.width / E : d.width, w = A ? d.height / A : d.height;
|
|
3435
|
+
return { width: C, height: w, top: L, right: v + C, bottom: L + w, left: v };
|
|
3435
3436
|
}(n, s, b));
|
|
3436
3437
|
}
|
|
3437
3438
|
const { top: r, left: l, width: o, height: i, bottom: c, right: g } = n;
|
|
@@ -3593,17 +3594,17 @@ class tr {
|
|
|
3593
3594
|
if (d) {
|
|
3594
3595
|
const u = Gn(d, b), R = { x: 0, y: 0 }, { scrollableAncestors: q } = r.current;
|
|
3595
3596
|
for (const E of q) {
|
|
3596
|
-
const A = t.code, { isTop: U, isRight: P, isLeft:
|
|
3597
|
-
if (M &&
|
|
3598
|
-
const G = E.scrollLeft + u.x, $ = A === st.Right && G <= C.x || A === st.Left && G >=
|
|
3597
|
+
const A = t.code, { isTop: U, isRight: P, isLeft: v, isBottom: L, maxScroll: C, minScroll: w } = xl(E), x = Ba(E), F = { x: Math.min(A === st.Right ? x.right - x.width / 2 : x.right, Math.max(A === st.Right ? x.left : x.left + x.width / 2, d.x)), y: Math.min(A === st.Down ? x.bottom - x.height / 2 : x.bottom, Math.max(A === st.Down ? x.top : x.top + x.height / 2, d.y)) }, M = A === st.Right && !P || A === st.Left && !v, D = A === st.Down && !L || A === st.Up && !U;
|
|
3598
|
+
if (M && F.x !== d.x) {
|
|
3599
|
+
const G = E.scrollLeft + u.x, $ = A === st.Right && G <= C.x || A === st.Left && G >= w.x;
|
|
3599
3600
|
if ($ && !u.y) return void E.scrollTo({ left: G, behavior: c });
|
|
3600
|
-
R.x = $ ? E.scrollLeft - G : A === st.Right ? E.scrollLeft - C.x : E.scrollLeft -
|
|
3601
|
+
R.x = $ ? E.scrollLeft - G : A === st.Right ? E.scrollLeft - C.x : E.scrollLeft - w.x, R.x && E.scrollBy({ left: -R.x, behavior: c });
|
|
3601
3602
|
break;
|
|
3602
3603
|
}
|
|
3603
|
-
if (D &&
|
|
3604
|
-
const G = E.scrollTop + u.y, $ = A === st.Down && G <= C.y || A === st.Up && G >=
|
|
3604
|
+
if (D && F.y !== d.y) {
|
|
3605
|
+
const G = E.scrollTop + u.y, $ = A === st.Down && G <= C.y || A === st.Up && G >= w.y;
|
|
3605
3606
|
if ($ && !u.x) return void E.scrollTo({ top: G, behavior: c });
|
|
3606
|
-
R.y = $ ? E.scrollTop - G : A === st.Down ? E.scrollTop - C.y : E.scrollTop -
|
|
3607
|
+
R.y = $ ? E.scrollTop - G : A === st.Down ? E.scrollTop - C.y : E.scrollTop - w.y, R.y && E.scrollBy({ top: -R.y, behavior: c });
|
|
3607
3608
|
break;
|
|
3608
3609
|
}
|
|
3609
3610
|
}
|
|
@@ -3743,20 +3744,20 @@ class El extends nr {
|
|
|
3743
3744
|
var Vn, fo;
|
|
3744
3745
|
function Ua(e) {
|
|
3745
3746
|
let { acceleration: t, activator: n = Vn.Pointer, canScroll: r, draggingRect: l, enabled: o, interval: i = 5, order: c = fo.TreeOrder, pointerCoordinates: g, scrollableAncestors: s, scrollableAncestorRects: b, delta: d, threshold: u } = e;
|
|
3746
|
-
const R = function(
|
|
3747
|
-
let { delta: x, disabled:
|
|
3747
|
+
const R = function(w) {
|
|
3748
|
+
let { delta: x, disabled: F } = w;
|
|
3748
3749
|
const M = ho(x);
|
|
3749
3750
|
return On((D) => {
|
|
3750
|
-
if (
|
|
3751
|
+
if (F || !M || !D) return Ga;
|
|
3751
3752
|
const G = { x: Math.sign(x.x - M.x), y: Math.sign(x.y - M.y) };
|
|
3752
3753
|
return { x: { [Tt.Backward]: D.x[Tt.Backward] || G.x === -1, [Tt.Forward]: D.x[Tt.Forward] || G.x === 1 }, y: { [Tt.Backward]: D.y[Tt.Backward] || G.y === -1, [Tt.Forward]: D.y[Tt.Forward] || G.y === 1 } };
|
|
3753
|
-
}, [
|
|
3754
|
+
}, [F, x, M]);
|
|
3754
3755
|
}({ delta: d, disabled: !o }), [q, E] = function() {
|
|
3755
|
-
const
|
|
3756
|
-
return [Xe((x,
|
|
3757
|
-
|
|
3756
|
+
const w = Te(null);
|
|
3757
|
+
return [Xe((x, F) => {
|
|
3758
|
+
w.current = setInterval(x, F);
|
|
3758
3759
|
}, []), Xe(() => {
|
|
3759
|
-
|
|
3760
|
+
w.current !== null && (clearInterval(w.current), w.current = null);
|
|
3760
3761
|
}, [])];
|
|
3761
3762
|
}(), A = Te({ x: 0, y: 0 }), U = Te({ x: 0, y: 0 }), P = ye(() => {
|
|
3762
3763
|
switch (n) {
|
|
@@ -3765,25 +3766,25 @@ function Ua(e) {
|
|
|
3765
3766
|
case Vn.DraggableRect:
|
|
3766
3767
|
return l;
|
|
3767
3768
|
}
|
|
3768
|
-
}, [n, l, g]),
|
|
3769
|
-
const
|
|
3770
|
-
if (!
|
|
3771
|
-
const x = A.current.x * U.current.x,
|
|
3772
|
-
|
|
3769
|
+
}, [n, l, g]), v = Te(null), L = Xe(() => {
|
|
3770
|
+
const w = v.current;
|
|
3771
|
+
if (!w) return;
|
|
3772
|
+
const x = A.current.x * U.current.x, F = A.current.y * U.current.y;
|
|
3773
|
+
w.scrollBy(x, F);
|
|
3773
3774
|
}, []), C = ye(() => c === fo.TreeOrder ? [...s].reverse() : s, [c, s]);
|
|
3774
3775
|
be(() => {
|
|
3775
3776
|
if (o && s.length && P) {
|
|
3776
|
-
for (const
|
|
3777
|
-
if (r?.(
|
|
3778
|
-
const x = s.indexOf(
|
|
3779
|
-
if (!
|
|
3780
|
-
const { direction: M, speed: D } = Oa(
|
|
3777
|
+
for (const w of C) {
|
|
3778
|
+
if (r?.(w) === !1) continue;
|
|
3779
|
+
const x = s.indexOf(w), F = b[x];
|
|
3780
|
+
if (!F) continue;
|
|
3781
|
+
const { direction: M, speed: D } = Oa(w, F, P, t, u);
|
|
3781
3782
|
for (const G of ["x", "y"]) R[G][M[G]] || (D[G] = 0, M[G] = 0);
|
|
3782
|
-
if (D.x > 0 || D.y > 0) return E(),
|
|
3783
|
+
if (D.x > 0 || D.y > 0) return E(), v.current = w, q(L, i), A.current = D, void (U.current = M);
|
|
3783
3784
|
}
|
|
3784
3785
|
A.current = { x: 0, y: 0 }, U.current = { x: 0, y: 0 }, E();
|
|
3785
3786
|
} else E();
|
|
3786
|
-
}, [t,
|
|
3787
|
+
}, [t, L, r, E, o, i, JSON.stringify(P), JSON.stringify(R), q, s, C, b, JSON.stringify(u)]);
|
|
3787
3788
|
}
|
|
3788
3789
|
El.activators = [{ eventName: "onTouchStart", handler: (e, t) => {
|
|
3789
3790
|
let { nativeEvent: n } = e, { onActivation: r } = t;
|
|
@@ -3971,10 +3972,10 @@ const Qa = ft(function(e) {
|
|
|
3971
3972
|
return (se = le[J]) == null ? void 0 : se.call(le, re);
|
|
3972
3973
|
});
|
|
3973
3974
|
}, [h]), H];
|
|
3974
|
-
}(), [
|
|
3975
|
+
}(), [v, L] = ue(en.Uninitialized), C = v === en.Initialized, { draggable: { active: w, nodes: x, translate: F }, droppable: { containers: M } } = E, D = w != null ? x.get(w) : null, G = Te({ initial: null, translated: null }), $ = ye(() => {
|
|
3975
3976
|
var h;
|
|
3976
|
-
return
|
|
3977
|
-
}, [
|
|
3977
|
+
return w != null ? { id: w, data: (h = D?.data) != null ? h : Za, rect: G } : null;
|
|
3978
|
+
}, [w, D]), B = Te(null), [O, W] = ue(null), [ee, z] = ue(null), y = Un(R, Object.values(R)), V = Zn("DndDescribedBy", o), ne = ye(() => M.getEnabled(), [M]), xe = ye(() => ({ draggable: { ...uo.draggable, ...oe?.draggable }, droppable: { ...uo.droppable, ...oe?.droppable }, dragOverlay: { ...uo.dragOverlay, ...oe?.dragOverlay } }), [(oe = d) == null ? void 0 : oe.draggable, oe?.droppable, oe?.dragOverlay]);
|
|
3978
3979
|
var oe;
|
|
3979
3980
|
const { droppableRects: _, measureDroppableContainers: ae, measuringScheduled: ze } = function(h, H) {
|
|
3980
3981
|
let { dragging: j, dependencies: J, config: re } = H;
|
|
@@ -4017,13 +4018,13 @@ const Qa = ft(function(e) {
|
|
|
4017
4018
|
et(), $e.current = null;
|
|
4018
4019
|
}, Ce));
|
|
4019
4020
|
}, [Ce, Pe, et, ...J]), { droppableRects: nt, measureDroppableContainers: et, measuringScheduled: le != null };
|
|
4020
|
-
}(ne, { dragging: C, dependencies: [
|
|
4021
|
+
}(ne, { dragging: C, dependencies: [F.x, F.y], config: xe.droppable }), Ie = function(h, H) {
|
|
4021
4022
|
const j = H != null ? h.get(H) : void 0, J = j ? j.node.current : null;
|
|
4022
4023
|
return On((re) => {
|
|
4023
4024
|
var le;
|
|
4024
4025
|
return H == null ? null : (le = J ?? re) != null ? le : null;
|
|
4025
4026
|
}, [J, H]);
|
|
4026
|
-
}(x,
|
|
4027
|
+
}(x, w), fe = ye(() => ee ? mo(ee) : null, [ee]), Ge = function() {
|
|
4027
4028
|
const h = O?.autoScrollEnabled === !1, H = typeof c == "object" ? c.enabled === !1 : c === !1, j = C && !h && !H;
|
|
4028
4029
|
return typeof c == "object" ? { ...c, enabled: j } : { enabled: j };
|
|
4029
4030
|
}(), ve = function(h, H) {
|
|
@@ -4043,7 +4044,7 @@ const Qa = ft(function(e) {
|
|
|
4043
4044
|
Re && Re.scrollBy({ top: me.y, left: me.x });
|
|
4044
4045
|
}
|
|
4045
4046
|
}, [H, se, Ce, J, j]);
|
|
4046
|
-
})({ activeNode:
|
|
4047
|
+
})({ activeNode: w != null ? x.get(w) : null, config: Ge.layoutShiftCompensation, initialRect: ve, measure: xe.draggable.measure });
|
|
4047
4048
|
const _e = Vr(Ie, xe.draggable.measure, ve), De = Vr(Ie ? Ie.parentElement : null), ge = Te({ activatorEvent: null, active: null, activeNode: Ie, collisionRect: null, collisions: null, droppableRects: _, draggableNodes: x, draggingNode: null, draggingNodeRect: null, droppableContainers: M, over: null, scrollableAncestors: [], scrollAdjustedTranslate: null }), ce = M.getNodeFor((t = ge.current.over) == null ? void 0 : t.id), ke = function(h) {
|
|
4048
4049
|
let { measure: H } = h;
|
|
4049
4050
|
const [j, J] = ue(null), re = vo({ callback: Xe((he) => {
|
|
@@ -4076,7 +4077,7 @@ const Qa = ft(function(e) {
|
|
|
4076
4077
|
return $t(() => {
|
|
4077
4078
|
Ce?.disconnect(), se(), h.forEach((he) => Ce?.observe(he));
|
|
4078
4079
|
}, [h]), re;
|
|
4079
|
-
}(Ze), Ke = Fl(u, { transform: { x:
|
|
4080
|
+
}(Ze), Ke = Fl(u, { transform: { x: F.x - qe.x, y: F.y - qe.y, scaleX: 1, scaleY: 1 }, activatorEvent: ee, active: $, activeNodeRect: _e, containerNodeRect: De, draggingNodeRect: Se, over: ge.current.over, overlayNodeRect: ke.rect, scrollableAncestors: Ze, scrollableAncestorRects: m, windowRect: We }), ut = fe ? wn(fe, F) : null, Qe = function(h) {
|
|
4080
4081
|
const [H, j] = ue(null), J = Te(h), re = Xe((le) => {
|
|
4081
4082
|
const se = Ho(le.target);
|
|
4082
4083
|
se && j((Ce) => Ce ? (Ce.set(se, Go(se)), new Map(Ce)) : null);
|
|
@@ -4101,7 +4102,7 @@ const Qa = ft(function(e) {
|
|
|
4101
4102
|
});
|
|
4102
4103
|
}
|
|
4103
4104
|
}, [re, h]), ye(() => h.length ? H ? Array.from(H.values()).reduce((le, se) => wn(le, se), Ut) : kl(h) : Ut, [h, H]);
|
|
4104
|
-
}(Ze), K = Pr(Qe), Fe = Pr(Qe, [_e]), je = wn(Ke, K), Ae = Se ? Fa(Se, Ke) : null, Ve = $ && Ae ? b({ active: $, collisionRect: Ae, droppableRects: _, droppableContainers: ne, pointerCoordinates: ut }) : null, Oe = wl(Ve, "id"), [S, te] = ue(null),
|
|
4105
|
+
}(Ze), K = Pr(Qe), Fe = Pr(Qe, [_e]), je = wn(Ke, K), Ae = Se ? Fa(Se, Ke) : null, Ve = $ && Ae ? b({ active: $, collisionRect: Ae, droppableRects: _, droppableContainers: ne, pointerCoordinates: ut }) : null, Oe = wl(Ve, "id"), [S, te] = ue(null), N = function(h, H, j) {
|
|
4105
4106
|
return { ...h, scaleX: H && j ? H.width / j.width : 1, scaleY: H && j ? H.height / j.height : 1 };
|
|
4106
4107
|
}(Le ? Ke : wn(Ke, Fe), (l = S?.rect) != null ? l : null, _e), Z = Te(null), a = Xe((h, H) => {
|
|
4107
4108
|
let { sensor: j, options: J } = H;
|
|
@@ -4123,7 +4124,7 @@ const Qa = ft(function(e) {
|
|
|
4123
4124
|
if (!Re) return;
|
|
4124
4125
|
const { onDragStart: Pe } = y.current, Be = { activatorEvent: le, active: { id: me, data: Re.data, rect: G } };
|
|
4125
4126
|
Nn(() => {
|
|
4126
|
-
Pe?.(Be),
|
|
4127
|
+
Pe?.(Be), L(en.Initializing), A({ type: kt.DragStart, initialCoordinates: he, active: me }), U({ type: "onDragStart", event: Be }), W(Z.current), z(le);
|
|
4127
4128
|
});
|
|
4128
4129
|
}, onMove(he) {
|
|
4129
4130
|
A({ type: kt.DragMove, coordinates: he });
|
|
@@ -4137,7 +4138,7 @@ const Qa = ft(function(e) {
|
|
|
4137
4138
|
et = { activatorEvent: le, active: me, collisions: Re, delta: Be, over: Pe }, he === kt.DragEnd && typeof $e == "function" && await Promise.resolve($e(et)) && (he = kt.DragCancel);
|
|
4138
4139
|
}
|
|
4139
4140
|
B.current = null, Nn(() => {
|
|
4140
|
-
A({ type: he }),
|
|
4141
|
+
A({ type: he }), L(en.Uninitialized), te(null), W(null), z(null), Z.current = null;
|
|
4141
4142
|
const $e = he === kt.DragEnd ? "onDragEnd" : "onDragCancel";
|
|
4142
4143
|
if (et) {
|
|
4143
4144
|
const nt = y.current[$e];
|
|
@@ -4173,8 +4174,8 @@ const Qa = ft(function(e) {
|
|
|
4173
4174
|
return j;
|
|
4174
4175
|
}));
|
|
4175
4176
|
})(s), $t(() => {
|
|
4176
|
-
_e &&
|
|
4177
|
-
}, [_e,
|
|
4177
|
+
_e && v === en.Initializing && L(en.Initialized);
|
|
4178
|
+
}, [_e, v]), be(() => {
|
|
4178
4179
|
const { onDragMove: h } = y.current, { active: H, activatorEvent: j, collisions: J, over: re } = ge.current;
|
|
4179
4180
|
if (!H || !j) return;
|
|
4180
4181
|
const le = { active: H, activatorEvent: j, collisions: J, delta: { x: je.x, y: je.y }, over: re };
|
|
@@ -4190,24 +4191,24 @@ const Qa = ft(function(e) {
|
|
|
4190
4191
|
});
|
|
4191
4192
|
}, [Oe]), $t(() => {
|
|
4192
4193
|
ge.current = { activatorEvent: ee, active: $, activeNode: Ie, collisionRect: Ae, collisions: Ve, droppableRects: _, draggableNodes: x, draggingNode: de, draggingNodeRect: Se, droppableContainers: M, over: S, scrollableAncestors: Ze, scrollAdjustedTranslate: je }, G.current = { initial: Se, translated: Ae };
|
|
4193
|
-
}, [$, Ie, Ve, Ae, x, de, Se, _, M, S, Ze, je]), Ua({ ...Ge, delta:
|
|
4194
|
+
}, [$, Ie, Ve, Ae, x, de, Se, _, M, S, Ze, je]), Ua({ ...Ge, delta: F, draggingRect: Ae, pointerCoordinates: ut, scrollableAncestors: Ze, scrollableAncestorRects: m });
|
|
4194
4195
|
const f = ye(() => ({ active: $, activeNode: Ie, activeNodeRect: _e, activatorEvent: ee, collisions: Ve, containerNodeRect: De, dragOverlay: ke, draggableNodes: x, droppableContainers: M, droppableRects: _, over: S, measureDroppableContainers: ae, scrollableAncestors: Ze, scrollableAncestorRects: m, measuringConfiguration: xe, measuringScheduled: ze, windowRect: We }), [$, Ie, _e, ee, Ve, De, ke, x, M, _, S, ae, Ze, m, xe, ze, We]), I = ye(() => ({ activatorEvent: ee, activators: T, active: $, activeNodeRect: _e, ariaDescribedById: { draggable: V }, dispatch: A, draggableNodes: x, over: S, measureDroppableContainers: ae }), [ee, T, $, _e, A, V, x, S, ae]);
|
|
4195
|
-
return tt.createElement(pl.Provider, { value: P }, tt.createElement(Kn.Provider, { value: I }, tt.createElement(Il.Provider, { value: f }, tt.createElement(xo.Provider, { value:
|
|
4196
|
+
return tt.createElement(pl.Provider, { value: P }, tt.createElement(Kn.Provider, { value: I }, tt.createElement(Il.Provider, { value: f }, tt.createElement(xo.Provider, { value: N }, g)), tt.createElement(Ja, { disabled: i?.restoreFocus === !1 })), tt.createElement(Ta, { ...i, hiddenTextDescribedById: V }));
|
|
4196
4197
|
}), es = qn(null), Ur = "button";
|
|
4197
4198
|
function ts(e) {
|
|
4198
4199
|
let { id: t, data: n, disabled: r = !1, attributes: l } = e;
|
|
4199
|
-
const o = Zn("Draggable"), { activators: i, activatorEvent: c, active: g, activeNodeRect: s, ariaDescribedById: b, draggableNodes: d, over: u } = Yt(Kn), { role: R = Ur, roleDescription: q = "draggable", tabIndex: E = 0 } = l ?? {}, A = g?.id === t, U = Yt(A ? xo : es), [P,
|
|
4200
|
-
return ye(() =>
|
|
4200
|
+
const o = Zn("Draggable"), { activators: i, activatorEvent: c, active: g, activeNodeRect: s, ariaDescribedById: b, draggableNodes: d, over: u } = Yt(Kn), { role: R = Ur, roleDescription: q = "draggable", tabIndex: E = 0 } = l ?? {}, A = g?.id === t, U = Yt(A ? xo : es), [P, v] = go(), [L, C] = go(), w = function(F, M) {
|
|
4201
|
+
return ye(() => F.reduce((D, G) => {
|
|
4201
4202
|
let { eventName: $, handler: B } = G;
|
|
4202
4203
|
return D[$] = (O) => {
|
|
4203
4204
|
B(O, M);
|
|
4204
4205
|
}, D;
|
|
4205
|
-
}, {}), [
|
|
4206
|
+
}, {}), [F, M]);
|
|
4206
4207
|
}(i, t), x = Un(n);
|
|
4207
|
-
return $t(() => (d.set(t, { id: t, key: o, node: P, activatorNode:
|
|
4208
|
-
const
|
|
4209
|
-
|
|
4210
|
-
}), [d, t]), { active: g, activatorEvent: c, activeNodeRect: s, attributes: ye(() => ({ role: R, tabIndex: E, "aria-disabled": r, "aria-pressed": !(!A || R !== Ur) || void 0, "aria-roledescription": q, "aria-describedby": b.draggable }), [r, R, E, A, q, b.draggable]), isDragging: A, listeners: r ? void 0 :
|
|
4208
|
+
return $t(() => (d.set(t, { id: t, key: o, node: P, activatorNode: L, data: x }), () => {
|
|
4209
|
+
const F = d.get(t);
|
|
4210
|
+
F && F.key === o && d.delete(t);
|
|
4211
|
+
}), [d, t]), { active: g, activatorEvent: c, activeNodeRect: s, attributes: ye(() => ({ role: R, tabIndex: E, "aria-disabled": r, "aria-pressed": !(!A || R !== Ur) || void 0, "aria-roledescription": q, "aria-describedby": b.draggable }), [r, R, E, A, q, b.draggable]), isDragging: A, listeners: r ? void 0 : w, node: P, over: u, setNodeRef: v, setActivatorNodeRef: C, transform: U };
|
|
4211
4212
|
}
|
|
4212
4213
|
function Nl() {
|
|
4213
4214
|
return Yt(Il);
|
|
@@ -4262,11 +4263,11 @@ function cs(e) {
|
|
|
4262
4263
|
const u = typeof t == "function" ? t : function(R) {
|
|
4263
4264
|
const { duration: q, easing: E, sideEffects: A, keyframes: U } = { ...Ll, ...R };
|
|
4264
4265
|
return (P) => {
|
|
4265
|
-
let { active:
|
|
4266
|
+
let { active: v, dragOverlay: L, transform: C, ...w } = P;
|
|
4266
4267
|
if (!q) return;
|
|
4267
|
-
const x = { x:
|
|
4268
|
+
const x = { x: L.rect.left - v.rect.left, y: L.rect.top - v.rect.top }, F = { scaleX: C.scaleX !== 1 ? v.rect.width * C.scaleX / L.rect.width : 1, scaleY: C.scaleY !== 1 ? v.rect.height * C.scaleY / L.rect.height : 1 }, M = { x: C.x - x.x, y: C.y - x.y, ...F }, D = U({ ...w, active: v, dragOverlay: L, transform: { initial: C, final: M } }), [G] = D, $ = D[D.length - 1];
|
|
4268
4269
|
if (JSON.stringify(G) === JSON.stringify($)) return;
|
|
4269
|
-
const B = A?.({ active:
|
|
4270
|
+
const B = A?.({ active: v, dragOverlay: L, ...w }), O = L.node.animate(D, { duration: q, easing: E, fill: "forwards" });
|
|
4270
4271
|
return new Promise((W) => {
|
|
4271
4272
|
O.onfinish = () => {
|
|
4272
4273
|
B?.(), W();
|
|
@@ -4285,8 +4286,8 @@ function us(e) {
|
|
|
4285
4286
|
}
|
|
4286
4287
|
const gs = tt.memo((e) => {
|
|
4287
4288
|
let { adjustScale: t = !1, children: n, dropAnimation: r, style: l, transition: o, modifiers: i, wrapperElement: c = "div", className: g, zIndex: s = 999 } = e;
|
|
4288
|
-
const { activatorEvent: b, active: d, activeNodeRect: u, containerNodeRect: R, draggableNodes: q, droppableContainers: E, dragOverlay: A, over: U, measuringConfiguration: P, scrollableAncestors:
|
|
4289
|
-
return tt.createElement(ls, null, tt.createElement(os, { animation: D }, d && x ? tt.createElement(ss, { key: x, id: d.id, ref: G, as: c, activatorEvent: b, adjustScale: t, className: g, transition: o, rect: M, style: { zIndex: s, ...l }, transform:
|
|
4289
|
+
const { activatorEvent: b, active: d, activeNodeRect: u, containerNodeRect: R, draggableNodes: q, droppableContainers: E, dragOverlay: A, over: U, measuringConfiguration: P, scrollableAncestors: v, scrollableAncestorRects: L, windowRect: C } = Nl(), w = Yt(xo), x = us(d?.id), F = Fl(i, { activatorEvent: b, active: d, activeNodeRect: u, containerNodeRect: R, draggingNodeRect: A.rect, over: U, overlayNodeRect: A.rect, scrollableAncestors: v, scrollableAncestorRects: L, transform: w, windowRect: C }), M = Ko(u), D = cs({ config: r, draggableNodes: q, droppableContainers: E, measuringConfiguration: P }), G = M ? A.setRef : void 0;
|
|
4290
|
+
return tt.createElement(ls, null, tt.createElement(os, { animation: D }, d && x ? tt.createElement(ss, { key: x, id: d.id, ref: G, as: c, activatorEvent: b, adjustScale: t, className: g, transition: o, rect: M, style: { zIndex: s, ...l }, transform: F }, n) : null));
|
|
4290
4291
|
});
|
|
4291
4292
|
function or(e, t, n) {
|
|
4292
4293
|
const r = e.slice();
|
|
@@ -4322,20 +4323,20 @@ const so = { scaleX: 1, scaleY: 1 }, ms = (e) => {
|
|
|
4322
4323
|
}, Ol = "Sortable", Bl = tt.createContext({ activeIndex: -1, containerId: Ol, disableTransforms: !1, items: [], overIndex: -1, useDragOverlay: !1, sortedRects: [], strategy: rr, disabled: { draggable: !1, droppable: !1 } });
|
|
4323
4324
|
function ps(e) {
|
|
4324
4325
|
let { children: t, id: n, items: r, strategy: l = rr, disabled: o = !1 } = e;
|
|
4325
|
-
const { active: i, dragOverlay: c, droppableRects: g, over: s, measureDroppableContainers: b } = Nl(), d = Zn(Ol, n), u = c.rect !== null, R = ye(() => r.map((
|
|
4326
|
-
if (
|
|
4327
|
-
if (
|
|
4328
|
-
for (let
|
|
4326
|
+
const { active: i, dragOverlay: c, droppableRects: g, over: s, measureDroppableContainers: b } = Nl(), d = Zn(Ol, n), u = c.rect !== null, R = ye(() => r.map((w) => typeof w == "object" && "id" in w ? w.id : w), [r]), q = i != null, E = i ? R.indexOf(i.id) : -1, A = s ? R.indexOf(s.id) : -1, U = Te(R), P = !function(w, x) {
|
|
4327
|
+
if (w === x) return !0;
|
|
4328
|
+
if (w.length !== x.length) return !1;
|
|
4329
|
+
for (let F = 0; F < w.length; F++) if (w[F] !== x[F]) return !1;
|
|
4329
4330
|
return !0;
|
|
4330
|
-
}(R, U.current),
|
|
4331
|
-
return typeof
|
|
4331
|
+
}(R, U.current), v = A !== -1 && E === -1 || P, L = /* @__PURE__ */ function(w) {
|
|
4332
|
+
return typeof w == "boolean" ? { draggable: w, droppable: w } : w;
|
|
4332
4333
|
}(o);
|
|
4333
4334
|
$t(() => {
|
|
4334
4335
|
P && q && b(R);
|
|
4335
4336
|
}, [P, R, q, b]), be(() => {
|
|
4336
4337
|
U.current = R;
|
|
4337
4338
|
}, [R]);
|
|
4338
|
-
const C = ye(() => ({ activeIndex: E, containerId: d, disabled:
|
|
4339
|
+
const C = ye(() => ({ activeIndex: E, containerId: d, disabled: L, disableTransforms: v, items: R, overIndex: A, useDragOverlay: u, sortedRects: hs(R, g), strategy: l }), [E, d, L.draggable, L.droppable, v, R, A, g, u, l]);
|
|
4339
4340
|
return tt.createElement(Bl.Provider, { value: C }, t);
|
|
4340
4341
|
}
|
|
4341
4342
|
const fs = (e) => {
|
|
@@ -4347,10 +4348,10 @@ const fs = (e) => {
|
|
|
4347
4348
|
}, ws = { duration: 200, easing: "ease" }, Vl = "transform", ys = sn.Transition.toString({ property: Vl, duration: 0, easing: "linear" }), bs = { roleDescription: "sortable" };
|
|
4348
4349
|
function qs(e) {
|
|
4349
4350
|
let { animateLayoutChanges: t = vs, attributes: n, disabled: r, data: l, getNewIndex: o = fs, id: i, strategy: c, resizeObserverConfig: g, transition: s = ws } = e;
|
|
4350
|
-
const { items: b, containerId: d, activeIndex: u, disabled: R, disableTransforms: q, sortedRects: E, overIndex: A, useDragOverlay: U, strategy: P } = Yt(Bl),
|
|
4351
|
+
const { items: b, containerId: d, activeIndex: u, disabled: R, disableTransforms: q, sortedRects: E, overIndex: A, useDragOverlay: U, strategy: P } = Yt(Bl), v = function(ce, ke) {
|
|
4351
4352
|
var de, Se;
|
|
4352
4353
|
return typeof ce == "boolean" ? { draggable: ce, droppable: !1 } : { draggable: (de = ce?.draggable) != null ? de : ke.draggable, droppable: (Se = ce?.droppable) != null ? Se : ke.droppable };
|
|
4353
|
-
}(r, R),
|
|
4354
|
+
}(r, R), L = b.indexOf(i), C = ye(() => ({ sortable: { containerId: d, index: L, items: b }, ...l }), [d, l, L, b]), w = ye(() => b.slice(b.indexOf(i)), [b, i]), { rect: x, node: F, isOver: M, setNodeRef: D } = function(ce) {
|
|
4354
4355
|
let { data: ke, disabled: de = !1, id: Se, resizeObserverConfig: Le } = ce;
|
|
4355
4356
|
const qe = Zn("Droppable"), { active: Ne, dispatch: We, over: Ze, measureDroppableContainers: m } = Yt(Kn), Ke = Te({ disabled: de }), ut = Te(!1), Qe = Te(null), K = Te(null), { disabled: Fe, updateMeasurementsFor: je, timeout: Ae } = { ...ns, ...Le }, Ve = Un(je ?? Se), Oe = vo({ callback: Xe(() => {
|
|
4356
4357
|
ut.current ? (K.current != null && clearTimeout(K.current), K.current = setTimeout(() => {
|
|
@@ -4358,18 +4359,18 @@ function qs(e) {
|
|
|
4358
4359
|
}, Ae)) : ut.current = !0;
|
|
4359
4360
|
}, [Ae]), disabled: Fe || !Ne }), S = Xe((a, k) => {
|
|
4360
4361
|
Oe && (k && (Oe.unobserve(k), ut.current = !1), a && Oe.observe(a));
|
|
4361
|
-
}, [Oe]), [te,
|
|
4362
|
+
}, [Oe]), [te, N] = go(S), Z = Un(ke);
|
|
4362
4363
|
return be(() => {
|
|
4363
4364
|
Oe && te.current && (Oe.disconnect(), ut.current = !1, Oe.observe(te.current));
|
|
4364
4365
|
}, [te, Oe]), be(() => (We({ type: kt.RegisterDroppable, element: { id: Se, key: qe, disabled: de, node: te, rect: Qe, data: Z } }), () => We({ type: kt.UnregisterDroppable, key: qe, id: Se })), [Se]), be(() => {
|
|
4365
4366
|
de !== Ke.current.disabled && (We({ type: kt.SetDroppableDisabled, id: Se, key: qe, disabled: de }), Ke.current.disabled = de);
|
|
4366
|
-
}, [Se, qe, de, We]), { active: Ne, rect: Qe, isOver: Ze?.id === Se, node: te, over: Ze, setNodeRef:
|
|
4367
|
-
}({ id: i, data: C, disabled:
|
|
4367
|
+
}, [Se, qe, de, We]), { active: Ne, rect: Qe, isOver: Ze?.id === Se, node: te, over: Ze, setNodeRef: N };
|
|
4368
|
+
}({ id: i, data: C, disabled: v.droppable, resizeObserverConfig: { updateMeasurementsFor: w, ...g } }), { active: G, activatorEvent: $, activeNodeRect: B, attributes: O, setNodeRef: W, listeners: ee, isDragging: z, over: y, setActivatorNodeRef: V, transform: ne } = ts({ id: i, data: C, attributes: { ...bs, ...n }, disabled: v.draggable }), xe = function() {
|
|
4368
4369
|
for (var ce = arguments.length, ke = new Array(ce), de = 0; de < ce; de++) ke[de] = arguments[de];
|
|
4369
4370
|
return ye(() => (Se) => {
|
|
4370
4371
|
ke.forEach((Le) => Le(Se));
|
|
4371
4372
|
}, ke);
|
|
4372
|
-
}(D, W), oe = !!G, _ = oe && !q && ao(u) && ao(A), ae = !U && z, ze = ae && _ ? ne : null, Ie = _ ? ze ?? (c ?? P)({ rects: E, activeNodeRect: B, activeIndex: u, overIndex: A, index:
|
|
4373
|
+
}(D, W), oe = !!G, _ = oe && !q && ao(u) && ao(A), ae = !U && z, ze = ae && _ ? ne : null, Ie = _ ? ze ?? (c ?? P)({ rects: E, activeNodeRect: B, activeIndex: u, overIndex: A, index: L }) : null, fe = ao(u) && ao(A) ? o({ id: i, items: b, activeIndex: u, overIndex: A }) : L, Ge = G?.id, ve = Te({ activeId: Ge, items: b, newIndex: fe, containerId: d }), _e = b !== ve.current.items, De = t({ active: G, containerId: d, isDragging: z, isSorting: oe, id: i, index: L, items: b, newIndex: ve.current.newIndex, previousItems: ve.current.items, previousContainerId: ve.current.containerId, transition: s, wasDragging: ve.current.activeId != null }), ge = function(ce) {
|
|
4373
4374
|
let { disabled: ke, index: de, node: Se, rect: Le } = ce;
|
|
4374
4375
|
const [qe, Ne] = ue(null), We = Te(de);
|
|
4375
4376
|
return $t(() => {
|
|
@@ -4384,7 +4385,7 @@ function qs(e) {
|
|
|
4384
4385
|
}, [ke, de, Se, Le]), be(() => {
|
|
4385
4386
|
qe && Ne(null);
|
|
4386
4387
|
}, [qe]), qe;
|
|
4387
|
-
}({ disabled: !De, index:
|
|
4388
|
+
}({ disabled: !De, index: L, node: F, rect: x });
|
|
4388
4389
|
return be(() => {
|
|
4389
4390
|
oe && ve.current.newIndex !== fe && (ve.current.newIndex = fe), d !== ve.current.containerId && (ve.current.containerId = d), b !== ve.current.items && (ve.current.items = b);
|
|
4390
4391
|
}, [oe, fe, d, b]), be(() => {
|
|
@@ -4394,8 +4395,8 @@ function qs(e) {
|
|
|
4394
4395
|
ve.current.activeId = Ge;
|
|
4395
4396
|
}, 50);
|
|
4396
4397
|
return () => clearTimeout(ce);
|
|
4397
|
-
}, [Ge]), { active: G, activeIndex: u, attributes: O, data: C, rect: x, index:
|
|
4398
|
-
if (ge || _e && ve.current.newIndex ===
|
|
4398
|
+
}, [Ge]), { active: G, activeIndex: u, attributes: O, data: C, rect: x, index: L, newIndex: fe, items: b, isOver: M, isSorting: oe, isDragging: z, listeners: ee, node: F, overIndex: A, over: y, setNodeRef: xe, setActivatorNodeRef: V, setDroppableNodeRef: D, setDraggableNodeRef: W, transform: ge ?? Ie, transition: function() {
|
|
4399
|
+
if (ge || _e && ve.current.newIndex === L) return ys;
|
|
4399
4400
|
if (!(ae && !Co($) || !s) && (oe || De))
|
|
4400
4401
|
return sn.Transition.toString({ ...s, property: Vl });
|
|
4401
4402
|
}() };
|
|
@@ -4431,10 +4432,10 @@ const Cs = [st.Down, st.Right, st.Up, st.Left], Ss = (e, t) => {
|
|
|
4431
4432
|
let { collisionRect: u, droppableRects: R, droppableContainers: q } = d;
|
|
4432
4433
|
const E = Ar(u), A = [];
|
|
4433
4434
|
for (const U of q) {
|
|
4434
|
-
const { id: P } = U,
|
|
4435
|
-
if (
|
|
4436
|
-
const
|
|
4437
|
-
A.push({ id: P, data: { droppableContainer: U, value:
|
|
4435
|
+
const { id: P } = U, v = R.get(P);
|
|
4436
|
+
if (v) {
|
|
4437
|
+
const L = Ar(v), C = E.reduce((x, F, M) => x + fl(L[M], F), 0), w = Number((C / 4).toFixed(4));
|
|
4438
|
+
A.push({ id: P, data: { droppableContainer: U, value: w } });
|
|
4438
4439
|
}
|
|
4439
4440
|
}
|
|
4440
4441
|
return A.sort(vl);
|
|
@@ -4443,10 +4444,10 @@ const Cs = [st.Down, st.Right, st.Up, st.Left], Ss = (e, t) => {
|
|
|
4443
4444
|
if (b === i?.id && s.length > 1 && (b = s[1].id), b != null) {
|
|
4444
4445
|
const d = o.get(n.id), u = o.get(b), R = u ? l.get(u.id) : null, q = u?.node.current;
|
|
4445
4446
|
if (q && R && d && u) {
|
|
4446
|
-
const E = So(q).some((
|
|
4447
|
-
return !wo(
|
|
4448
|
-
}(d, u), P = E || !A ? { x: 0, y: 0 } : { x: U ? r.width - R.width : 0, y: U ? r.height - R.height : 0 },
|
|
4449
|
-
return P.x && P.y ?
|
|
4447
|
+
const E = So(q).some((L, C) => c[C] !== L), A = jr(d, u), U = function(L, C) {
|
|
4448
|
+
return !wo(L) || !wo(C) || !jr(L, C) ? !1 : L.data.current.sortable.index < C.data.current.sortable.index;
|
|
4449
|
+
}(d, u), P = E || !A ? { x: 0, y: 0 } : { x: U ? r.width - R.width : 0, y: U ? r.height - R.height : 0 }, v = { x: R.left, y: R.top };
|
|
4450
|
+
return P.x && P.y ? v : Gn(v, P);
|
|
4450
4451
|
}
|
|
4451
4452
|
}
|
|
4452
4453
|
}
|
|
@@ -4466,10 +4467,10 @@ const xs = (e) => {
|
|
|
4466
4467
|
document.body.style.cursor = "";
|
|
4467
4468
|
};
|
|
4468
4469
|
}, [t]);
|
|
4469
|
-
const
|
|
4470
|
-
return p("div", { className: Bt("tab-item", Wt.Wrapper, l && Wt.fadeIn, d && Wt.sorting, t && Wt.dragOverlay), style: { ...A, transition: [R, A?.transition].filter(Boolean).join(", "), "--translate-x": q ? `${Math.round(q.x)}px` : void 0, "--translate-y": q ? `${Math.round(q.y)}px` : void 0, "--scale-x": q?.scaleX ? `${q.scaleX}` : void 0, "--scale-y": q?.scaleY ? `${q.scaleY}` : void 0, "--index": c }, ref: P, children: p("div", { className: Bt(Wt.Item, n && Wt.dragging, o && Wt.withHandle, t && Wt.dragOverlay, r && Wt.disabled, e && Wt.color, "dragging"), style: u, "data-cypress": "draggable-item", ...o ? void 0 : g, ...U, tabIndex: o ? void 0 : -1, children:
|
|
4470
|
+
const v = b ? b({ dragOverlay: !!t, dragging: !!n, sorting: !!d, index: c, fadeIn: !!l, listeners: g, ref: P, style: u, transform: q, transition: R, value: E }) : p(bn, { children: E });
|
|
4471
|
+
return p("div", { className: Bt("tab-item", Wt.Wrapper, l && Wt.fadeIn, d && Wt.sorting, t && Wt.dragOverlay), style: { ...A, transition: [R, A?.transition].filter(Boolean).join(", "), "--translate-x": q ? `${Math.round(q.x)}px` : void 0, "--translate-y": q ? `${Math.round(q.y)}px` : void 0, "--scale-x": q?.scaleX ? `${q.scaleX}` : void 0, "--scale-y": q?.scaleY ? `${q.scaleY}` : void 0, "--index": c }, ref: P, children: p("div", { className: Bt(Wt.Item, n && Wt.dragging, o && Wt.withHandle, t && Wt.dragOverlay, r && Wt.disabled, e && Wt.color, "dragging"), style: u, "data-cypress": "draggable-item", ...o ? void 0 : g, ...U, tabIndex: o ? void 0 : -1, children: v }) });
|
|
4471
4472
|
})), _r = { Row: "_Row_1kr10_1" }, Rs = ft(wt(({ children: e, horizontal: t, style: n }, r) => p("div", { ref: r, style: { ...n }, className: Bt(_r.Row, t && _r.horizontal), children: e }))), Ts = { ...Ll }, Ms = ft(wt((e, t) => {
|
|
4472
|
-
const { className: n, activationConstraint: r, animateLayoutChanges: l, adjustScale: o = !1, collisionDetection: i = Ea, coordinateGetter: c = Ss, dropAnimation: g = Ts, getItemStyles: s = () => ({}), getNewIndex: b, handle: d = !1, items: u, onMove: R, isDisabled: q = () => !1, measuring: E, modifiers: A, renderItem: U, renderDivider: P, reorderItems:
|
|
4473
|
+
const { className: n, activationConstraint: r, animateLayoutChanges: l, adjustScale: o = !1, collisionDetection: i = Ea, coordinateGetter: c = Ss, dropAnimation: g = Ts, getItemStyles: s = () => ({}), getNewIndex: b, handle: d = !1, items: u, onMove: R, isDisabled: q = () => !1, measuring: E, modifiers: A, renderItem: U, renderDivider: P, reorderItems: v = or, strategy: L = rr, style: C, useDragOverlay: w = !0, onDragStart: x, wrapperStyle: F = () => ({}) } = e, [M, D] = ue(() => u);
|
|
4473
4474
|
be(() => {
|
|
4474
4475
|
D(u);
|
|
4475
4476
|
}, [u]);
|
|
@@ -4478,7 +4479,7 @@ const xs = (e) => {
|
|
|
4478
4479
|
return ye(() => [...V].filter((xe) => xe != null), [...V]);
|
|
4479
4480
|
}(Vo(Dl, { activationConstraint: r }), Vo(El, { activationConstraint: r }), Vo(tr, { scrollBehavior: "Cypress" in window ? "auto" : void 0, coordinateGetter: c })), O = M.indexOf.bind(M), W = G ? O(G) : -1, ee = [];
|
|
4480
4481
|
M.map((y, V) => {
|
|
4481
|
-
ee.push(p(Ds, { id: y, handle: d, index: V, style: s, wrapperStyle:
|
|
4482
|
+
ee.push(p(Ds, { id: y, handle: d, index: V, style: s, wrapperStyle: F, disabled: q(y), renderItem: U, animateLayoutChanges: l, useDragOverlay: w, getNewIndex: b }, y + "-" + V));
|
|
4482
4483
|
const ne = P?.({ key: "divider-" + V });
|
|
4483
4484
|
ne && ee.push(ne);
|
|
4484
4485
|
});
|
|
@@ -4489,18 +4490,18 @@ const xs = (e) => {
|
|
|
4489
4490
|
}, autoScroll: { canScroll: (y) => !0 }, onDragEnd: (y) => {
|
|
4490
4491
|
if ($(null), y.over) {
|
|
4491
4492
|
const V = O(y.over.id);
|
|
4492
|
-
W !== V && (D((ne) =>
|
|
4493
|
+
W !== V && (D((ne) => v(ne, W, V)), R?.(W, V));
|
|
4493
4494
|
}
|
|
4494
4495
|
}, onDragCancel: () => {
|
|
4495
4496
|
$(null);
|
|
4496
|
-
}, measuring: E, modifiers: A, children: [p("div", { style: { display: "flex", justifyContent: "flex-start", boxSizing: "border-box", ...C }, className: Bt(n, Wt.Wrapper), children: p(ps, { items: M, strategy:
|
|
4497
|
+
}, measuring: E, modifiers: A, children: [p("div", { style: { display: "flex", justifyContent: "flex-start", boxSizing: "border-box", ...C }, className: Bt(n, Wt.Wrapper), children: p(ps, { items: M, strategy: L, children: p(Rs, { ref: t, children: ee }) }) }), w ? ll(p(gs, { adjustScale: o, dropAnimation: g, children: G ? p(Hl, { value: M[W], handle: d, renderItem: U, wrapperStyle: F({ index: W, isDragging: !0, id: M[W] }), index: W, dragging: !0, style: s({ id: M[W], index: W, isSorting: G !== null, isDragging: !0, overIndex: -1, isDragOverlay: !0 }), dragOverlay: !0 }) : null }), z()) : null] });
|
|
4497
4498
|
}));
|
|
4498
4499
|
function Ds({ disabled: e, animateLayoutChanges: t, getNewIndex: n, handle: r, id: l, index: o, onRemove: i, style: c, renderItem: g, useDragOverlay: s, wrapperStyle: b }) {
|
|
4499
4500
|
const { attributes: d, isDragging: u, isSorting: R, listeners: q, overIndex: E, setNodeRef: A, transform: U, transition: P } = qs({ id: l, animateLayoutChanges: t, disabled: e, getNewIndex: n });
|
|
4500
4501
|
return p(Hl, { ref: A, value: l, disabled: e, dragging: u, sorting: R, handle: r, renderItem: g, index: o, style: c({ index: o, id: l, isDragging: u, isSorting: R, overIndex: E }), onRemove: i ? () => i(l) : void 0, transform: U, transition: P, wrapperStyle: b({ index: o, isDragging: u, id: l }), listeners: q, "data-index": o, "data-id": l, dragOverlay: !s && u, ...d });
|
|
4501
4502
|
}
|
|
4502
4503
|
const Es = "_TabStrip_3x0dp_1", As = new Xr("rgb(33, 115, 70)"), zs = "#eee", Is = (e) => p(ks, { ...e }), Fs = ft(wt((e, t) => {
|
|
4503
|
-
const { children: n, style: r, className: l, selectedTabIndex: o = 0, tabNames: i = [], onSelectedTabIndexChange: c, onTabNameChange: g, onTabMove: s, createScrollStartButton: b = ai, createScrollEndButton: d = si, createScrollEdgeButton: u = di, createTabButton: R = Is, createTabDivider: q, editLabelProps: E, disabled: A = !1, disableDrag: U = !1, background: P = "white", activeColor:
|
|
4504
|
+
const { children: n, style: r, className: l, selectedTabIndex: o = 0, tabNames: i = [], onSelectedTabIndexChange: c, onTabNameChange: g, onTabMove: s, createScrollStartButton: b = ai, createScrollEndButton: d = si, createScrollEdgeButton: u = di, createTabButton: R = Is, createTabDivider: q, editLabelProps: E, disabled: A = !1, disableDrag: U = !1, background: P = "white", activeColor: v = As, borderColor: L = zs, borderWidth: C = 1 } = e, [w, x] = ue(o), [F, M] = ue(i), D = Xe((qe) => {
|
|
4504
4505
|
const Ne = z.current?.[qe]?.closest(".tab-item") ?? z.current?.[qe];
|
|
4505
4506
|
Ne && ae.current?.scrollTo({ top: Ne.offsetTop, left: Ne.offsetLeft, behavior: "smooth" });
|
|
4506
4507
|
}, []);
|
|
@@ -4508,8 +4509,8 @@ const Es = "_TabStrip_3x0dp_1", As = new Xr("rgb(33, 115, 70)"), zs = "#eee", Is
|
|
|
4508
4509
|
D(o);
|
|
4509
4510
|
}, [o]);
|
|
4510
4511
|
const G = Xe((qe, Ne) => {
|
|
4511
|
-
Ne !==
|
|
4512
|
-
}, [c,
|
|
4512
|
+
Ne !== w && (x(Ne), c?.(Ne)), D(Ne);
|
|
4513
|
+
}, [c, w]), $ = Xe((qe, Ne) => {
|
|
4513
4514
|
s?.(qe, Ne);
|
|
4514
4515
|
}, [s]), B = Te(null), [O, W] = ue(-1), ee = Xe((qe, Ne) => {
|
|
4515
4516
|
g?.(qe, Ne);
|
|
@@ -4524,17 +4525,17 @@ const Es = "_TabStrip_3x0dp_1", As = new Xr("rgb(33, 115, 70)"), zs = "#eee", Is
|
|
|
4524
4525
|
z.current?.[qe]?.startEdit();
|
|
4525
4526
|
}, cancel(qe) {
|
|
4526
4527
|
z.current?.[qe]?.cancel();
|
|
4527
|
-
} }, y.current), [
|
|
4528
|
+
} }, y.current), [w, O]);
|
|
4528
4529
|
const V = Xe(({ value: qe, index: Ne, dragging: We }) => {
|
|
4529
4530
|
const { style: Ze, maxLength: m, ...Ke } = E || {}, ut = p(ba, { ref: (Qe) => {
|
|
4530
4531
|
z.current[Ne] = Qe;
|
|
4531
|
-
}, value: qe, disabled: A, maxLength: m, style: { color:
|
|
4532
|
+
}, value: qe, disabled: A, maxLength: m, style: { color: w === Ne && v ? v?.toRGBA().toString() : "inherit", flex: "1 1 100%", paddingTop: "1px", paddingBottom: "1px", ...Ze }, styleHover: {}, onSubmit: (Qe) => (B.current = !1, W(-1), ee(Ne, Qe)), onCancel: () => {
|
|
4532
4533
|
B.current = !1, W(-1);
|
|
4533
4534
|
}, onChange: (Qe) => {
|
|
4534
4535
|
B.current = !0, W(Ne);
|
|
4535
4536
|
}, ...Ke });
|
|
4536
|
-
return R({ onClick: (Qe) => G(Qe, Ne), value: qe, index: Ne, editing: O === Ne && B.current, editable: !0, disabled: A, selectedIndex:
|
|
4537
|
-
}, [
|
|
4537
|
+
return R({ onClick: (Qe) => G(Qe, Ne), value: qe, index: Ne, editing: O === Ne && B.current, editable: !0, disabled: A, selectedIndex: w, background: P, activeColor: v, borderColor: L, borderWidth: C, dragging: We, children: ut });
|
|
4538
|
+
}, [w, ee, G, E, A, O, R]), [ne, { width: xe }] = an(), [oe, { width: _ }] = an(), ae = Te(null), [ze, Ie] = ue({ left: 0, top: 0, width: 0, height: 0 }), [fe, Ge] = ue(null);
|
|
4538
4539
|
be(() => {
|
|
4539
4540
|
fe !== null && ae.current && ae.current.scrollTo({ left: fe, behavior: "smooth" });
|
|
4540
4541
|
}, [fe]);
|
|
@@ -4557,9 +4558,9 @@ const Es = "_TabStrip_3x0dp_1", As = new Xr("rgb(33, 115, 70)"), zs = "#eee", Is
|
|
|
4557
4558
|
}, [ve, _e, ce]);
|
|
4558
4559
|
be(() => () => ce(), [ce]);
|
|
4559
4560
|
const de = ye(() => ({ style: { marginLeft: "4px", marginRight: "6px" }, disabled: Math.floor(ze.left) <= 0 || Math.floor(_ - xe) === 0, orientation: rn.Horizontal, onMouseUp: ce, onMouseLeave: ce, onMouseDown: () => ke(ae.current.scrollLeft, !0), onClick: (qe) => ve(Math.min(ae.current.scrollLeft, fe ?? Number.MAX_SAFE_INTEGER), qe.ctrlKey) }), [ze, fe, _, xe]), Se = ye(() => ({ style: { marginLeft: "6px", marginRight: "4px" }, disabled: Math.floor(_ - xe) <= Math.ceil(ze.left), orientation: rn.Horizontal, onMouseUp: ce, onMouseLeave: ce, onMouseDown: () => ke(ae.current.scrollLeft, !1), onClick: (qe) => _e(Math.max(ae.current.scrollLeft, fe ?? 0), qe.ctrlKey) }), [ze, fe, _, xe]), Le = ye(() => Je(bn, { children: [p("div", { style: { minWidth: "16px" } }), n, u?.(de)] }), [de, Se, b, d, n, u]);
|
|
4560
|
-
return Je("div", { style: { ...r, display: "flex", alignItems: "stretch" }, className: Bt(Es, l), ref: y, children: [p("div", { style: { borderTop: `solid ${
|
|
4561
|
+
return Je("div", { style: { ...r, display: "flex", alignItems: "stretch" }, className: Bt(Es, l), ref: y, children: [p("div", { style: { borderTop: `solid ${L} ${C}px`, position: "absolute", width: "100%" } }), p("div", { style: { flex: "none", display: "flex", alignItems: "center" }, children: Le }), p("div", { className: "Tabs", ref: ne, style: { flex: "1 1 100%", display: "flex", position: "relative", overflow: "hidden" }, children: p("div", { style: { position: "relative", overflowY: "hidden", overflowX: "hidden", marginBottom: "3px" }, ref: ae, onScroll: (qe) => {
|
|
4561
4562
|
Ie({ left: qe.target.scrollLeft, top: qe.target.scrollTop, width: qe.target.scrollWidth, height: qe.target.scrollHeight });
|
|
4562
|
-
}, children: p(Ms, { isDisabled: (qe) => A || U, items:
|
|
4563
|
+
}, children: p(Ms, { isDisabled: (qe) => A || U, items: F, strategy: ms, modifiers: [xs], ref: oe, renderItem: V, renderDivider: q, onMove: $, activationConstraint: { distance: 15 } }) }) }), p("div", { style: { flex: "none", display: "flex", alignItems: "center" }, children: u(Se) })] });
|
|
4563
4564
|
}));
|
|
4564
4565
|
Fs.displayName = "TabStrip";
|
|
4565
4566
|
const ed = (e) => Je("svg", { ...e, viewBox: "0 0 48 48", children: [p("path", { d: "M 2.2827924,0 C 1.5038324,0 0.87090248,0.52603 0.87090248,1.17149 v 25.39667 h -0.01 v 20.2607 c 0,0.39663 0.24025002,0.74639 0.60481992,0.95852 v 0.18499 h 0.50664 c 0.0972,0.0173 0.19732,0.0276 0.30092,0.0276 h 15.5346916 16.7448 v 0 h 11.35822 c 0.10311,0 0.20276,-0.0104 0.29945,-0.0276 h 0.0696 v -0.0182 c 0.59938,-0.13566 1.04238,-0.58606 1.04238,-1.12526 V 26.96484 c 0.006,-0.0429 0.009,-0.0853 0.009,-0.12925 V 1.17154 c 0,-0.64586 -0.63293,-1.17149 -1.41189,-1.17149 h -15.7478 v 2e-4 h -2.06997 V 5e-5 Z", fill: "#547DBE" }), p("path", { d: "m 2.8338324,2.7184 v 9.0404 H 11.538484 V 2.7184 Z m 11.2334116,0 v 9.0404 h 8.70465 V 2.7184 Z m 11.26696,0 v 9.0404 h 8.70465 V 2.7184 Z m 11.33258,0 v 9.0404 h 8.70465 V 2.7184 Z M 2.8338324,14.32723 v 8.84046 h 8.7046516 v -8.84046 z m 11.2334116,0 v 8.84046 h 8.70465 v -8.84046 z m 11.26696,0 v 8.84046 h 8.70465 v -8.84046 z m 11.33258,0 v 8.84046 h 8.70465 V 14.32723 Z M 2.8338324,25.73691 v 8.67308 h 8.7046516 v -8.67308 z m 11.2334116,0 v 8.67308 h 8.73721 v -8.67308 z m 11.26696,0 v 8.67308 h 8.70465 v -8.67308 z m 11.33258,0 v 8.67308 h 8.70465 V 25.73691 Z M 2.8693424,36.61859 v 8.67357 h 8.7046616 v -8.67357 z m 11.2339116,0 v 8.67357 h 8.73771 v -8.67357 z m 11.26697,0 v 8.67357 h 8.70465 v -8.67357 z m 11.33257,0 v 8.67357 h 8.70465 v -8.67357 z", fill: "#FFFFFF" }), p("path", { d: "m 2.8254424,2.72091 v 9.04041 H 11.570544 V 2.72091 Z m 0,11.60889 v 8.84036 H 11.570544 V 14.3298 Z m 0,11.40958 v 8.67357 h 8.7451016 v -8.67357 z m 0.036,10.88167 v 8.67358 h 8.7451116 v -8.67358 z", fill: "#547DBE", fillOpacity: "0.4" }), p("path", { d: "m 30.820434,6.19497 c 1.85291,0 3.66241,0.29708 5.4285,0.89113 1.7656,0.5942 3.49568,1.50108 5.19073,2.72107 l -2.37584,3.25571 c -1.40941,-1.01391 -2.79515,-1.76647 -4.15721,-2.25759 -1.36206,-0.49111 -2.72412,-0.73667 -4.08618,-0.73667 -2.5817,0 -4.58902,0.53064 -6.02232,1.59218 -1.43334,1.06143 -2.14989,2.56661 -2.14989,4.51523 v 0.0237 c 0,1.36241 0.41177,2.40021 1.23532,3.11315 0.82355,0.71288 1.89253,1.24367 3.20703,1.59217 1.31446,0.3485 2.71608,0.67341 4.20493,0.97439 1.29842,0.26929 2.58944,0.58216 3.87257,0.9386 1.28263,0.3565 2.45032,0.8635 3.50356,1.52097 1.05324,0.65747 1.89288,1.5486 2.51841,2.6734 0.62553,1.12485 0.93829,2.59035 0.93829,4.39635 v 0.0477 c 0,3.18435 -1.10849,5.64817 -3.32597,7.39066 -2.21698,1.7425 -5.33724,2.61399 -9.35978,2.61399 -1.67882,0 -3.25863,-0.15841 -4.73958,-0.47523 -1.4808,-0.31681 -2.86644,-0.79204 -4.15737,-1.42617 -1.29077,-0.63363 -2.49827,-1.42567 -3.6227,-2.37612 l 2.54179,-3.20819 c 1.39383,1.204 2.91819,2.10717 4.57323,2.70928 1.6549,0.60205 3.45641,0.90307 5.40463,0.90307 2.73991,0 4.85823,-0.52704 6.35447,-1.58048 1.49674,-1.05359 2.24511,-2.53098 2.24511,-4.43213 v -0.0237 c 0,-1.37834 -0.37197,-2.43583 -1.11639,-3.17245 -0.74442,-0.73668 -1.71824,-1.2912 -2.92194,-1.66359 -1.2037,-0.37223 -2.51051,-0.6851 -3.91993,-0.9386 -1.34627,-0.23762 -2.69635,-0.51485 -4.05046,-0.83182 -1.35417,-0.31677 -2.59339,-0.7841 -3.71782,-1.40204 -1.12448,-0.61779 -2.03125,-1.49708 -2.72017,-2.63782 -0.68898,-1.14078 -1.03341,-2.66156 -1.03341,-4.5627 v -0.0237 c 0,-3.21623 1.06898,-5.70753 3.20718,-7.47386 2.13805,-1.76648 5.15506,-2.64981 9.05121,-2.64981 z", strokeWidth: "2.5", stroke: "#EB594D", fill: "#f9CECB" })] }), td = (e) => Je("svg", { viewBox: "0,0,2048,2048", ...e, children: [p("path", { className: "styled high_contrast", d: "M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z" }), p("path", { className: "styled background", d: "M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z" }), p("path", { className: "styled info_light", d: "M 619 1941 h -299 v -1322 h 299 z" }), p("path", { className: "styled info_dark", d: "M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z" }), p("path", { className: "styled secondary_light", d: "M 1429 1941 h -298 v -1066 h 298 z" }), p("path", { className: "styled secondary_dark", d: "M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z" }), p("path", { className: "styled current_color", d: "M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z" })] }), nd = (e) => Je("svg", { viewBox: "0,0,2048,2048", ...e, children: [p("path", { className: "styled high_contrast", d: "M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -1195 h 512 v 1195 h 256 v -1621 h 512 v 1621 m -810 -512 h -427 v 512 h 427 m 768 -768 h -427 v 768 h 427 z" }), p("path", { className: "styled background", d: "M 832 1941 h -469 v -554 h 469 m 768 554 h -469 v -810 h 469 z" }), p("path", { className: "styled current_color", d: "M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -555 h 512 v 555 h 256 v -811 h 512 v 811 m -469 0 h 427 v -768 h -427 m -768 768 h 427 v -512 h -427 z" }), p("path", { className: "styled info_light", d: "M 832 1387 h -469 v -640 h 469 z" }), p("path", { className: "styled info_dark", d: "M 341 725 h 512 v 683 h -512 m 43 -640 v 597 h 427 v -597 z" }), p("path", { className: "styled secondary_light", d: "M 1600 1131 h -469 v -811 h 469 z" }), p("path", { className: "styled secondary_dark", d: "M 1109 299 h 512 v 853 h -512 m 43 -811 v 768 h 427 v -768 z" })] }), od = (e) => Je("svg", { viewBox: "0,0,2048,2048", ...e, children: [p("path", { className: "styled high_contrast", d: "M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -1621 h 512 v 1621 h 256 v -1621 h 512 v 1621 m -810 -384 h -427 v 384 h 427 m 768 -1024 h -427 v 1024 h 427 z" }), p("path", { className: "styled background", d: "M 832 1941 h -469 v -426 h 469 m 768 426 h -469 v -1066 h 469 z" }), p("path", { className: "styled current_color", d: "M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -427 h 512 v 427 h 256 v -1067 h 512 v 1067 m -469 0 h 427 v -1024 h -427 m -768 1024 h 427 v -384 h -427 z" }), p("path", { className: "styled info_light", d: "M 832 1515 h -469 v -1195 h 469 z" }), p("path", { className: "styled info_dark", d: "M 341 299 h 512 v 1237 h -512 m 43 -1195 v 1152 h 427 v -1152 z" }), p("path", { className: "styled secondary_light", d: "M 1600 875 h -469 v -555 h 469 z" }), p("path", { className: "styled secondary_dark", d: "M 1109 299 h 512 v 597 h -512 m 43 -555 v 512 h 427 v -512 z" })] }), rd = (e) => Je("svg", { viewBox: "0,0,2048,2048", ...e, children: [p("path", { className: "styled high_contrast", d: "M 1963 1920 v 43 h -1878 v -1878 h 43 v 1165 l 574 -574 l 197 144 l 402 -402 l 361 360 l 263 -301 l 32 28 l -265 303 l 264 265 l -30 30 l -262 -263 l -317 362 l -444 -326 l -775 776 v 268 m 806 -1074 l 407 299 l 292 -335 l -332 -332 m -1173 832 v 281 l 740 -740 l -162 -119 z" }), p("path", { className: "styled info", d: "M 122 1658 l -30 -30 l 1209 -1210 l 655 655 l -30 30 l -625 -625 z" }), p("path", { className: "styled current_color", d: "M 1963 1920 v 43 h -1878 v -1878 h 43 v 1165 l 574 -574 l 639 469 l 584 -668 l 32 28 l -610 697 l -641 -470 l -578 578 v 610 z" })] }), ld = (e) => Je("svg", { viewBox: "0,0,2048,2048", ...e, children: [p("path", { className: "styled high_contrast", d: "M 1963 1920 v 43 h -1878 v -1878 h 43 v 1037 l 571 -570 l 535 259 l 651 -550 l 27 33 l -669 565 l -534 -259 l -581 582 v 452 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z" }), p("path", { className: "styled info", d: "M 121 1189 l -29 -31 l 607 -606 l 535 259 l 651 -550 l 27 33 l -669 565 l -534 -259 z" }), p("path", { className: "styled current_color", d: "M 1963 1920 v 43 h -1878 v -1878 h 43 v 1549 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z" })] }), id = (e) => Je("svg", { viewBox: "0,0,2048,2048", ...e, children: [p("path", { className: "styled high_contrast", d: "M 1963 1920 v 43 h -1878 v -1878 h 43 v 171 h 1749 v 43 h -1749 v 1335 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z" }), p("path", { className: "styled info", d: "M 1877 299 h -1770 v -43 h 1770 z" }), p("path", { className: "styled current_color", d: "M 1963 1920 v 43 h -1878 v -1878 h 43 v 1549 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z" })] }), ad = (e) => Je("svg", { viewBox: "0,0,2048,2048", ...e, children: [p("path", { className: "styled high_contrast", d: "M 128 1920 h 1835 v 43 h -1878 v -214 h -42 v -170 h 42 v -256 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 99 73 l 175 -190 h -18 v -170 h 170 v 140 l 233 233 l 280 -373 v -171 h 170 v 171 h -118 l -302 402 l 194 195 h 98 v 171 h -171 v -171 h 13 l -160 -160 l -109 144 v 144 h -170 v -104 l -279 -205 l -703 759 v 147 h -85 m 1015 -1152 l -199 215 l 251 184 v -15 h 139 l 110 -147 l -237 -237 m -1079 726 v 256 h 48 l 705 -761 l -70 -52 v 2 h -171 v -12 l -427 426 v 141 z" }), p("path", { className: "styled current_color", d: "M 128 1920 h 1835 v 43 h -1878 v -640 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 416 -554 v -171 h 170 v 171 h -118 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -85 z" }), p("path", { className: "styled info", d: "M 1694 1024 h 98 v 171 h -171 v -171 h 13 l -427 -427 h -64 l -930 1005 v 147 h -170 v -170 h 133 l 909 -982 h -18 v -170 h 170 v 140 z" })] }), sd = (e) => Je("svg", { viewBox: "0,0,2048,2048", ...e, children: [p("path", { className: "styled high_contrast", d: "M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -256 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -554 v -171 h 171 v 171 h -118 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -85 v 256 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z" }), p("path", { className: "styled current_color", d: "M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1494 h 43 v 1494 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z" }), p("path", { className: "styled info", d: "M 1802 427 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -170 v -171 h 140 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -554 v -171 h 171 v 171 z" })] }), dd = (e) => Je("svg", { viewBox: "0,0,2048,2048", ...e, children: [p("path", { className: "styled high_contrast", d: "M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1195 h -42 v -171 h 42 v -128 h 43 v 128 h 85 v 43 h 384 v -43 h 171 v 43 h 427 v -43 h 170 v 43 h 384 v -43 h 171 v 171 h -171 v -85 h -384 v 85 h -170 v -85 h -427 v 85 h -171 v -85 h -384 v 85 h -85 v 1195 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z" }), p("path", { className: "styled current_color", d: "M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1494 h 43 v 1494 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z" }), p("path", { className: "styled info", d: "M 1920 213 v 171 h -171 v -85 h -384 v 85 h -170 v -85 h -427 v 85 h -171 v -85 h -384 v 85 h -170 v -171 h 170 v 43 h 384 v -43 h 171 v 43 h 427 v -43 h 170 v 43 h 384 v -43 z" })] }), cd = (e) => Je("svg", { viewBox: "0,0,2048,2048", ...e, children: [p("path", { className: "styled high_contrast", d: "M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 130 -33 250 q -34 119 -95 224 q -62 104 -147 190 q -86 86 -190 147 q -105 61 -225 95 q -120 33 -249 33 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -126 32 -243 q 31 -117 89 -219 q 58 -102 140 -187 q 82 -86 182 -148 q 100 -62 217 -99 q 116 -37 243 -43 m -862 939 q 0 124 32 238 q 32 114 91 214 q 58 99 140 181 q 82 82 182 141 q 99 58 214 90 q 114 32 237 32 q 173 0 325 -61 q 151 -61 272 -167 l -638 -638 v -924 q -121 6 -230 41 q -109 35 -204 94 q -95 59 -172 140 q -78 81 -133 179 q -55 97 -85 209 q -31 111 -31 231 z" }), p("path", { className: "styled background", d: "M 1941 1024 q 0 127 -32 244 q -33 117 -93 219 q -60 102 -143 186 q -84 83 -186 143 q -102 60 -219 93 q -117 32 -244 32 q -127 0 -244 -32 q -117 -33 -219 -93 q -102 -60 -185 -143 q -84 -84 -144 -186 q -60 -102 -92 -219 q -33 -117 -33 -244 q 0 -127 33 -244 q 32 -117 92 -219 q 60 -102 144 -185 q 83 -84 185 -144 q 102 -60 219 -92 q 117 -33 244 -33 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 z" }), p("path", { className: "styled current_color", d: "M 1666 1709 q -127 118 -291 186 q -164 68 -351 68 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -128 33 -246 q 32 -119 92 -222 q 59 -103 143 -188 q 84 -86 186 -147 q 102 -62 220 -97 q 117 -35 244 -38 v 43 q -121 3 -233 37 q -112 33 -209 92 q -97 59 -177 140 q -80 81 -137 180 q -57 98 -88 211 q -31 113 -31 235 q 0 124 32 238 q 32 114 91 214 q 58 99 140 181 q 82 82 182 141 q 99 58 214 90 q 114 32 237 32 q 178 0 334 -65 q 156 -65 277 -177 z" }), p("path", { className: "styled info_light", d: "M 1024 107 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 q 0 99 -20 193 q -21 93 -58 178 q -38 85 -92 160 q -54 75 -121 138 l -647 -648 v -937 q 5 0 11 0 q 5 -1 10 -1 z" }), p("path", { className: "styled info_dark", d: "M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -62 187 q -41 89 -99 168 q -58 78 -130 142 q -9 -8 -15 -15 q -6 -6 -10 -10 q -5 -5 -5 -6 l -639 -638 v -969 m 670 1578 q 62 -61 112 -133 q 50 -72 85 -153 q 35 -82 54 -170 q 18 -89 18 -183 q 0 -123 -32 -237 q -32 -115 -90 -214 q -59 -100 -141 -182 q -82 -82 -181 -140 q -100 -59 -214 -91 q -115 -32 -238 -32 v 908 z" })] }), ud = (e) => Je("svg", { viewBox: "0,0,2048,2048", ...e, children: [p("path", { className: "styled high_contrast", d: "M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -63 187 q -41 89 -98 168 q -58 78 -130 142 q -125 112 -284 176 q -160 64 -342 64 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -126 33 -244 q 33 -118 93 -221 q 59 -104 144 -190 q 84 -86 187 -148 q 102 -62 221 -97 q 118 -36 247 -39 m 307 1305 q 81 -65 129 -159 q 47 -95 47 -207 q 0 -97 -37 -182 q -37 -86 -100 -149 q -64 -64 -149 -101 q -86 -37 -183 -37 q -11 0 -21 1 q -11 0 -22 1 q -90 8 -167 48 q -78 39 -135 102 q -58 62 -91 144 q -33 81 -33 173 q 0 97 37 183 q 37 85 101 149 q 63 63 149 100 q 85 37 182 37 q 84 0 159 -27 q 74 -28 134 -76 m -293 530 q 173 0 325 -60 q 151 -61 270 -168 l -272 -272 q -66 54 -148 85 q -82 31 -175 31 q -106 0 -199 -40 q -94 -40 -163 -109 q -70 -70 -110 -163 q -40 -94 -40 -200 q 0 -100 37 -189 q 36 -90 100 -158 q 63 -69 149 -112 q 85 -43 183 -51 v -384 q -119 6 -228 41 q -109 35 -204 94 q -95 59 -172 140 q -78 81 -133 179 q -56 97 -86 209 q -30 111 -30 231 q 0 124 32 239 q 32 114 91 214 q 58 99 140 181 q 81 81 181 140 q 99 58 214 90 q 114 32 238 32 z" }), p("path", { className: "styled background", d: "M 1658 1692 q -125 119 -286 187 q -162 68 -348 68 q -127 0 -244 -33 q -118 -33 -220 -93 q -103 -60 -186 -143 q -84 -84 -144 -186 q -60 -103 -93 -220 q -33 -118 -33 -245 q 0 -125 32 -241 q 32 -116 90 -217 q 58 -101 140 -184 q 81 -84 181 -144 q 99 -61 214 -95 q 115 -35 239 -38 v 429 q -97 5 -181 45 q -85 40 -148 106 q -63 65 -99 152 q -36 86 -36 184 q 0 101 39 190 q 38 89 104 155 q 66 66 155 105 q 89 38 190 38 q 91 0 171 -30 q 80 -31 144 -85 z" }), p("path", { className: "styled current_color", d: "M 1364 1406 q -69 61 -155 96 q -86 34 -185 34 q -106 0 -199 -40 q -94 -40 -163 -109 q -70 -70 -110 -163 q -40 -94 -40 -200 q 0 -103 39 -194 q 38 -92 105 -161 q 66 -69 156 -110 q 89 -42 191 -46 v 42 q -94 4 -175 43 q -82 38 -142 101 q -61 63 -96 147 q -35 84 -35 178 q 0 97 37 183 q 37 85 101 149 q 63 63 149 100 q 85 37 182 37 q 90 0 169 -31 q 79 -31 141 -86 m 332 333 q -127 118 -291 186 q -164 68 -351 68 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -128 33 -246 q 32 -119 92 -222 q 59 -103 143 -188 q 84 -86 186 -147 q 102 -62 220 -97 q 117 -35 244 -38 v 43 q -121 3 -233 37 q -112 33 -209 92 q -98 58 -177 140 q -80 81 -137 180 q -57 98 -88 211 q -31 113 -31 235 q 0 124 32 239 q 32 114 91 214 q 58 99 140 181 q 81 81 181 140 q 99 58 214 90 q 114 32 238 32 q 179 0 335 -64 q 155 -65 276 -178 z" }), p("path", { className: "styled info_light", d: "M 1515 1024 q 0 -102 -38 -191 q -39 -89 -106 -156 q -67 -67 -156 -105 q -89 -39 -191 -39 q -5 0 -10 1 q -6 0 -11 0 v -426 q 5 0 11 0 q 5 -1 10 -1 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 q 0 99 -20 193 q -21 93 -58 178 q -38 85 -92 160 q -54 75 -121 138 l -302 -301 q 77 -68 122 -162 q 45 -95 45 -206 z" }), p("path", { className: "styled info_dark", d: "M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -63 188 q -41 89 -98 168 q -58 78 -130 142 l -333 -334 q 81 -65 129 -159 q 47 -95 47 -207 q 0 -97 -37 -182 q -37 -86 -100 -149 q -64 -64 -149 -101 q -86 -37 -183 -37 q -11 0 -21 1 q -11 0 -22 1 v -471 q 11 0 22 0 q 10 -1 21 -1 m 627 1579 q 62 -61 112 -133 q 50 -73 85 -154 q 35 -81 54 -170 q 18 -89 18 -183 q 0 -124 -32 -238 q -32 -115 -90 -214 q -59 -100 -140 -181 q -82 -82 -181 -140 q -100 -59 -214 -91 q -115 -32 -239 -32 v 384 q 106 0 200 40 q 93 40 163 110 q 69 69 109 163 q 40 93 40 199 q 0 109 -42 204 q -42 94 -114 164 z" })] }), gd = (e) => Je("svg", { viewBox: "0,0,2048,2048", ...e, children: [p("path", { className: "styled high_contrast", d: "M 1963 1920 v 43 h -1878 v -1878 h 43 v 171 h 1707 v 341 h -640 v 299 h -1067 v 171 h 811 v 298 h 512 v 342 h -1323 v 213 m 0 -1067 h 1024 v -256 h -1024 m 0 1067 h 1280 v -256 h -1280 z" }), p("path", { className: "styled background", d: "M 1429 1387 v 298 h -1322 v -298 m 1066 -811 v 299 h -1066 v -299 z" }), p("path", { className: "styled info_light", d: "M 1813 277 v 299 h -1706 v -299 z" }), p("path", { className: "styled info_dark", d: "M 101 597 v -42 h 1691 v -256 h -1691 v -43 h 1734 v 341 z" }), p("path", { className: "styled secondary_light", d: "M 917 1088 v 299 h -810 v -299 z" }), p("path", { className: "styled secondary_dark", d: "M 896 1109 h -795 v -42 h 838 v 322 h -43 z" }), p("path", { className: "styled current_color", d: "M 1963 1920 v 43 h -1878 v -1878 h 43 v 768 h 1024 v -256 h 43 v 299 h -1067 v 469 h 1323 v 342 h -1323 v 213 m 0 -512 v 256 h 1280 v -256 z" })] }), hd = (e) => Je("svg", { viewBox: "0,0,2048,2048", ...e, children: [p("path", { className: "styled high_contrast", d: "M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 1237 v 512 h -1237 v 256 h 1621 v 512 h -1621 v 299 m 0 -1109 h 555 v -427 h -555 m 0 1195 h 768 v -427 h -768 z" }), p("path", { className: "styled background", d: "M 107 832 v -469 h 597 v 469 m -597 768 v -469 h 810 v 469 z" }), p("path", { className: "styled current_color", d: "M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 597 v 512 h -597 v 256 h 811 v 512 h -811 v 299 m 0 -768 v 427 h 768 v -427 m -768 -768 v 427 h 555 v -427 z" }), p("path", { className: "styled info_light", d: "M 704 832 v -469 h 640 v 469 z" }), p("path", { className: "styled info_dark", d: "M 1365 341 v 512 h -682 v -512 m 640 43 h -598 v 427 h 598 z" }), p("path", { className: "styled secondary_light", d: "M 917 1600 v -469 h 811 v 469 z" }), p("path", { className: "styled secondary_dark", d: "M 1749 1109 v 512 h -853 v -512 m 811 43 h -768 v 427 h 768 z" })] }), md = (e) => Je("svg", { viewBox: "0,0,2048,2048", ...e, children: [p("path", { className: "styled high_contrast", d: "M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 1621 v 512 h -1621 v 256 h 1621 v 512 h -1621 v 299 m 0 -1109 h 384 v -427 h -384 m 0 1195 h 1024 v -427 h -1024 z" }), p("path", { className: "styled background", d: "M 107 832 v -469 h 426 v 469 m -426 768 v -469 h 1066 v 469 z" }), p("path", { className: "styled current_color", d: "M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 427 v 512 h -427 v 256 h 1067 v 512 h -1067 v 299 m 0 -768 v 427 h 1024 v -427 m -1024 -768 v 427 h 384 v -427 z" }), p("path", { className: "styled info_light", d: "M 533 832 v -469 h 1195 v 469 z" }), p("path", { className: "styled info_dark", d: "M 1749 341 v 512 h -1237 v -512 m 1195 43 h -1152 v 427 h 1152 z" }), p("path", { className: "styled secondary_light", d: "M 1173 1600 v -469 h 555 v 469 z" }), p("path", { className: "styled secondary_dark", d: "M 1749 1109 v 512 h -597 v -512 m 555 43 h -512 v 427 h 512 z" })] }), pd = (e) => Je("svg", { viewBox: "0,0,2048,2048", ...e, children: [p("path", { className: "styled high_contrast", d: "M 1963 896 v 1067 h -1878 v -1878 h 43 v 989 l 253 256 l 544 -345 l 74 -91 l 644 466 l 277 -464 m 0 718 l -913 -662 l -476 591 l -403 -408 v 785 h 1792 z" }), p("path", { className: "styled background", d: "M 530 1511 l 473 -588 l 914 656 l 24 53 v 304 h -1834 l 2 -864 z" }), p("path", { className: "styled info_light", d: "M 1939 923 v 658 l -288 -192 m -1272 -40 l 525 -312 l -374 474 z" }), p("path", { className: "styled info_dark", d: "M 361 1342 l 572 -362 l 22 36 l -571 362 m 1248 1 l 287 -483 l 37 22 l -287 482 z" }), p("path", { className: "styled current_color", d: "M 1963 896 v 1067 h -1878 v -1878 h 43 v 989 l 400 405 l 471 -585 l 921 667 v -665 m 0 1024 v -306 l -913 -662 l -476 591 l -403 -408 v 785 z" })] }), fd = (e) => Je("svg", { viewBox: "0,0,2048,2048", ...e, children: [p("path", { className: "styled high_contrast", d: "M 1963 640 v 926 l -641 -554 l -618 703 l -576 -575 v 780 h 1835 v 43 h -1878 v -1878 h 43 v 353 l 576 577 l 661 -704 l 276 329 z" }), p("path", { className: "styled background", d: "M 1963 1941 h -1856 v -853 l 597 597 l 618 -704 l 641 555 z" }), p("path", { className: "styled info_light", d: "M 1963 1536 l -641 -555 l -618 704 l -597 -597 v -640 l 597 597 l 661 -704 l 269 319 h 329 z" }), p("path", { className: "styled info_dark", d: "M 1963 640 v 43 h -342 l -258 -310 l -659 702 l -597 -598 v -60 l 597 598 l 661 -704 l 276 329 m 322 866 v 60 l -641 -554 l -618 703 l -597 -597 v -62 l 597 599 l 618 -704 z" }), p("path", { className: "styled current_color", d: "M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 z" })] }), vd = (e) => Je("svg", { viewBox: "0,0,2048,2048", ...e, children: [p("path", { className: "styled high_contrast", d: "M 1963 85 v 1878 h -1878 v -1878 m 1835 1524 l -788 -746 l -576 662 l -428 -428 v 823 h 1792 z" }), p("path", { className: "styled background", d: "M 1941 1941 h -1834 v -1834 h 1834 z" }), p("path", { className: "styled current_color", d: "M 1963 85 v 1878 h -1878 v -1878 m 1835 43 h -1792 v 1792 h 1792 z" }), p("path", { className: "styled info_light", d: "M 1941 107 v 1493 l -810 -768 l -576 661 l -448 -448 v -938 z" }), p("path", { className: "styled info_dark", d: "M 1963 1649 l -831 -786 l -576 662 l -471 -467 v -973 h 1878 m -43 1465 v -1422 h -1792 v 908 l 426 426 l 575 -661 z" })] }), wd = (e) => Je("svg", { viewBox: "0,0,2048,2048", ...e, children: [p("path", { className: "styled high_contrast", d: "M 384 213 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 1323 42 q 26 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 7 33 7 m -939 298 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 427 128 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m 0 213 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 m 768 384 v 43 h -1878 v -1878 h 43 v 1835 m 1579 -213 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 m -854 -982 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m -469 982 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m 1024 -640 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 z" }), p("path", { className: "styled background", d: "M 1195 1344 q 22 0 42 9 q 19 8 33 23 q 14 14 23 34 q 8 19 8 41 q 0 45 -30 76 q -31 30 -76 30 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -14 -23 -33 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 m -427 -341 q 22 0 42 9 q 19 8 34 22 q 14 14 23 34 q 8 19 8 41 q 0 22 -8 42 q -9 19 -23 34 q -15 14 -34 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 m 939 -512 q 45 0 76 31 q 30 30 30 75 q 0 22 -8 42 q -9 19 -23 34 q -14 14 -33 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 m -1323 -256 q 22 0 42 9 q 19 8 34 22 q 14 14 23 34 q 8 19 8 41 q 0 22 -8 42 q -9 19 -23 34 q -15 14 -34 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 z" }), p("path", { className: "styled info", d: "M 384 213 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 1323 42 q 26 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 7 33 7 m -939 298 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 427 128 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m 0 213 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 z" }), p("path", { className: "styled current_color", d: "M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1579 -213 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 m -854 -982 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m -469 982 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m 1024 -640 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 z" })] }), yd = (e) => Je("svg", { viewBox: "0,0,2048,2048", ...e, children: [p("path", { className: "styled high_contrast", d: "M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1664 1501 q 37 13 61 46 q 24 33 24 75 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 v -34 q 0 -140 -15 -248 q -16 -108 -42 -191 l -7 2 q -26 93 -66 161 q -40 68 -88 116 q -48 47 -101 76 q -54 29 -108 44 q -2 24 -13 46 q -11 21 -28 37 q -17 15 -39 24 q -22 9 -47 9 q -45 0 -78 -26 q -34 -26 -45 -66 q -115 -15 -221 -84 q -107 -69 -207 -190 q -36 91 -59 176 q -24 85 -38 152 q 41 12 67 46 q 26 33 26 78 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -26 10 -48 q 9 -23 25 -40 q 16 -18 38 -28 q 22 -10 47 -12 q 15 -73 42 -167 q 26 -95 69 -195 q -48 -62 -94 -141 q -47 -80 -89 -168 q -43 -88 -80 -178 q -37 -91 -64 -176 q -25 -2 -46 -12 q -22 -11 -37 -28 q -16 -17 -25 -39 q -9 -23 -9 -48 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 45 -26 79 q -27 33 -69 44 q 19 59 48 135 q 29 75 67 158 q 37 82 84 167 q 47 85 103 163 q 33 -72 76 -141 q 42 -70 96 -131 q -38 -36 -38 -90 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 35 0 64 17 q 28 16 45 43 q 63 -32 133 -48 q 70 -17 154 -17 q 6 0 39 4 q 32 3 79 21 q 47 17 102 54 q 55 37 107 105 q 21 -9 45 -9 q 5 0 9 1 q 3 0 7 0 q 1 -20 2 -40 q 0 -21 0 -43 q 0 -174 -33 -390 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 35 -16 64 q -17 28 -44 45 q 18 113 27 215 q 8 102 8 193 q 0 25 0 48 q 0 23 -2 46 q 32 16 51 46 q 19 30 19 68 q 0 35 -16 63 q -17 28 -43 45 q 30 96 45 210 q 14 114 14 248 m -171 -1206 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 m -1408 86 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 m 982 1152 q 35 0 60 -25 q 25 -25 25 -61 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 12 27 19 q 15 6 33 6 m 354 -278 q 59 -80 92 -194 q -23 -4 -42 -15 q -19 -12 -33 -28 q -14 -17 -22 -38 q -8 -21 -8 -45 q 0 -29 13 -54 q 12 -26 32 -43 q -45 -61 -95 -94 q -51 -34 -93 -49 q -43 -15 -71 -17 q -29 -3 -31 -3 q -78 0 -144 16 q -67 15 -126 46 q 3 14 3 28 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -29 0 -55 -13 q -57 63 -101 136 q -44 73 -77 150 q 41 53 87 99 q 45 46 96 82 q 50 36 106 60 q 55 23 115 32 q 1 -25 12 -47 q 11 -22 28 -38 q 17 -16 40 -25 q 22 -10 48 -10 q 45 0 79 28 q 34 27 45 69 q 61 -19 120 -56 q 59 -37 110 -105 z" }), p("path", { className: "styled background", d: "M 1305 1497 q 0 23 -8 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -43 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 23 0 43 9 q 20 8 35 23 q 15 15 24 35 q 8 20 8 43 m -890 -1072 q 0 23 -9 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -42 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 22 0 42 9 q 20 8 35 23 q 15 15 24 35 q 9 20 9 43 m 1317 -167 q 0 23 -8 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -43 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 23 0 43 9 q 20 8 35 23 q 15 15 24 35 q 8 20 8 43 z" }), p("path", { className: "styled info", d: "M 1689 365 q 18 112 27 213 q 8 101 8 193 q 0 183 -35 322 q -35 138 -106 234 q -29 38 -60 67 q -32 29 -65 51 q -34 21 -68 36 q -35 14 -68 24 q -2 24 -13 46 q -11 21 -28 37 q -17 15 -39 24 q -22 9 -47 9 q -45 0 -78 -26 q -34 -26 -45 -66 q -114 -15 -224 -87 q -110 -72 -211 -196 q -101 -125 -189 -299 q -89 -174 -160 -393 q -25 -2 -46 -12 q -22 -11 -37 -28 q -16 -17 -25 -39 q -9 -23 -9 -48 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 45 -26 79 q -27 33 -69 44 q 23 69 59 161 q 35 92 83 191 q 48 99 109 197 q 61 98 136 179 q 74 81 161 137 q 87 55 187 70 q 1 -25 12 -47 q 11 -22 28 -38 q 17 -16 40 -25 q 22 -10 48 -10 q 45 0 79 28 q 34 27 45 69 q 61 -19 120 -56 q 59 -37 110 -105 q 133 -178 133 -530 q 0 -174 -33 -390 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 35 -16 64 q -17 28 -44 45 m -1476 62 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 m 982 1152 q 35 0 60 -25 q 25 -25 25 -61 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 12 27 19 q 15 6 33 6 m 341 -1323 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 z" }), p("path", { className: "styled current_color", d: "M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1664 1501 q 37 13 61 46 q 24 33 24 75 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 v -34 q 0 -140 -15 -248 q -16 -108 -42 -191 q -14 3 -28 3 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -29 13 -54 q 12 -26 32 -43 q -45 -61 -95 -94 q -51 -34 -93 -49 q -43 -15 -71 -17 q -29 -3 -31 -3 q -78 0 -144 16 q -67 15 -126 46 q 3 14 3 28 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -29 0 -55 -13 q -66 73 -115 161 q -49 87 -84 176 q -35 88 -58 172 q -24 83 -37 148 q 41 12 67 46 q 26 33 26 78 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -26 10 -48 q 9 -23 25 -40 q 16 -18 38 -28 q 22 -10 47 -12 q 14 -67 38 -152 q 23 -86 59 -177 q 36 -92 87 -182 q 50 -90 118 -167 q -38 -36 -38 -90 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 35 0 64 17 q 28 16 45 43 q 63 -32 133 -48 q 70 -17 154 -17 q 6 0 39 4 q 32 3 79 21 q 47 17 102 54 q 55 37 107 105 q 21 -9 45 -9 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 35 -16 63 q -17 28 -43 45 q 30 96 45 210 q 14 114 14 248 z" })] }), bd = (e) => Je("svg", { viewBox: "0,0,2048,2048", ...e, children: [p("path", { className: "styled high_contrast", d: "M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1577 -902 q 93 215 93 547 q 0 88 -6 184 l -43 -3 q 3 -47 5 -92 q 2 -45 2 -88 q 0 -277 -68 -470 q -25 97 -65 167 q -40 70 -89 119 q -49 48 -104 78 q -55 29 -108 46 q -54 16 -103 22 q -49 5 -87 5 q -74 0 -141 -21 q -68 -21 -129 -58 q -62 -37 -116 -88 q -55 -51 -104 -111 q -39 93 -64 181 q -25 88 -40 157 q -15 69 -21 112 q -6 42 -6 44 l -42 -4 q 0 -2 7 -48 q 6 -46 23 -120 q 16 -74 44 -168 q 27 -94 70 -192 q -60 -79 -109 -167 q -50 -88 -90 -174 q -40 -86 -70 -164 q -30 -79 -50 -141 q -21 -62 -32 -102 q -11 -40 -13 -47 l 42 -11 q 0 2 10 37 q 10 35 29 93 q 19 58 48 135 q 28 76 66 160 q 38 83 86 170 q 47 86 104 165 q 45 -96 106 -184 q 61 -89 142 -156 q 80 -68 181 -108 q 101 -40 227 -40 q 3 0 22 2 q 19 1 49 9 q 30 8 68 25 q 38 16 80 46 q 41 29 83 75 q 42 46 80 112 q 5 -42 8 -87 q 2 -45 2 -93 q 0 -243 -64 -562 l 42 -8 q 65 325 65 569 q 0 68 -5 130 q -5 61 -15 117 m -156 283 q 79 -106 111 -275 q -33 -74 -72 -125 q -40 -51 -81 -84 q -41 -34 -80 -52 q -39 -19 -69 -27 q -31 -9 -49 -11 q -19 -2 -20 -2 q -121 0 -218 41 q -97 40 -173 107 q -77 67 -135 155 q -58 87 -101 181 q 47 60 100 112 q 53 51 112 89 q 58 37 123 59 q 65 21 136 21 q 45 0 99 -7 q 54 -7 110 -27 q 55 -21 109 -58 q 54 -37 98 -97 z" }), p("path", { className: "styled info", d: "M 1792 1749 l -43 -3 q 6 -93 6 -178 q 0 -244 -51 -422 q -51 -179 -152 -287 q -47 -49 -93 -76 q -46 -28 -83 -40 q -38 -13 -62 -15 q -24 -3 -25 -3 q -124 0 -223 44 q -99 43 -177 114 q -78 71 -136 162 q -58 90 -100 186 q -42 95 -69 187 q -28 91 -44 164 q -16 72 -22 118 q -7 46 -7 49 l -42 -4 q 0 -3 5 -34 q 4 -32 14 -84 q 10 -52 27 -120 q 17 -68 43 -144 q 25 -76 60 -156 q 35 -80 82 -155 q 46 -76 105 -143 q 58 -67 131 -117 q 73 -51 161 -80 q 88 -29 193 -29 q 3 0 30 3 q 27 2 69 16 q 41 14 92 44 q 51 30 102 84 q 216 231 216 735 q 0 45 -2 91 q -2 45 -5 93 z" }), p("path", { className: "styled current_color", d: "M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1004 -387 q -111 0 -207 -46 q -97 -46 -179 -121 q -83 -75 -151 -172 q -68 -97 -122 -199 q -55 -102 -96 -201 q -41 -99 -68 -178 q -28 -80 -43 -132 q -15 -53 -17 -62 l 42 -11 q 1 2 14 50 q 13 47 40 124 q 26 76 66 173 q 39 96 91 197 q 52 101 118 197 q 65 96 144 171 q 79 75 171 121 q 92 46 197 46 q 45 0 99 -7 q 54 -7 110 -27 q 56 -21 110 -58 q 54 -37 98 -97 q 133 -180 133 -528 q 0 -121 -16 -261 q -16 -141 -48 -302 l 42 -8 q 65 325 65 569 q 0 364 -142 556 q -50 67 -111 108 q -62 40 -123 62 q -62 22 -119 29 q -57 7 -98 7 z" })] }), qd = (e) => Je("svg", { viewBox: "0,0,2048,2048", ...e, children: [p("path", { className: "styled high_contrast", d: "M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 213 342 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 63 q -17 28 -44 45 l 361 762 l 165 -282 q -36 -14 -59 -46 q -23 -32 -23 -73 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 62 q -16 28 -42 45 l 78 89 l 449 -570 q -20 -18 -31 -42 q -11 -25 -11 -53 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -11 0 -20 -2 q -10 -2 -19 -5 l -258 814 l 410 467 l -54 -422 q -5 1 -8 1 q -4 0 -8 0 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 38 -19 69 q -20 30 -52 46 l 70 565 l -482 -549 l -46 145 q 26 17 43 45 q 16 28 16 63 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 15 0 29 3 l 53 -166 l -189 -214 l -295 375 l -69 -146 l -147 251 q 29 17 47 46 q 17 29 17 64 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 q 11 0 23 3 l 166 -283 l -375 -789 q -14 3 -28 3 m 982 1109 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 m 341 -1323 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 m -105 275 l -401 509 l 176 200 m -355 -301 l -187 301 l 52 129 l 258 -327 l -93 -106 q -15 3 -30 3 m -638 -683 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 z" }), p("path", { className: "styled background", d: "M 1771 296 q 0 22 -8 42 q -9 19 -23 34 q -15 15 -35 24 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -24 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 q 22 0 42 9 q 20 8 35 23 q 14 14 23 34 q 8 19 8 41 m -1320 7 q 0 22 -8 42 q -9 19 -23 34 q -15 15 -34 24 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -35 -24 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 15 -15 35 -23 q 19 -9 41 -9 q 22 0 42 9 q 19 8 34 23 q 14 14 23 34 q 8 19 8 41 m 902 1232 q 0 23 -8 43 q -9 19 -23 34 q -15 14 -35 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -43 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 q 22 0 42 9 q 20 8 35 23 q 14 14 23 34 q 8 19 8 41 z" }), p("path", { className: "styled info", d: "M 1664 171 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -11 0 -20 -2 q -10 -2 -19 -5 l -319 1008 q 26 17 43 45 q 16 28 16 63 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 15 0 29 3 l 293 -923 l -724 918 l -466 -982 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 63 q -17 28 -44 45 l 435 919 l 734 -932 q -20 -18 -31 -42 q -11 -25 -11 -53 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m -1323 213 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 m 982 1152 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 m 341 -1152 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 z" }), p("path", { className: "styled current_color", d: "M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1636 1182 l 70 565 l -825 -939 q -15 3 -30 3 l -360 615 q 29 17 47 46 q 17 29 17 64 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 q 11 0 23 3 l 357 -609 q -36 -14 -59 -46 q -23 -32 -23 -73 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 62 q -16 28 -42 45 l 726 826 l -54 -422 q -5 1 -8 1 q -4 0 -8 0 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 38 -19 69 q -20 30 -52 46 z" })] }), Cd = (e) => Je("svg", { viewBox: "0,0,2048,2048", ...e, children: [p("path", { className: "styled high_contrast", d: "M 1503 1457 l -10 61 l -42 -6 l 16 -96 l -334 -380 l -309 389 l -72 -147 l -248 421 l -37 -21 l 262 -446 l -463 -951 l 39 -18 l 451 925 l 227 -387 l 149 168 l 564 -710 l -184 1143 l 263 299 l -68 -525 l 42 -5 l 83 661 m -728 -828 l -114 -130 l -212 360 l 54 112 m 644 14 l 155 -951 l -471 593 m 803 918 v 43 h -1878 v -1878 h 43 v 1835 z" }), p("path", { className: "styled info", d: "M 1493 1518 l -42 -6 l 180 -1103 l -807 1016 l -558 -1144 l 39 -18 l 527 1083 l 864 -1087 z" }), p("path", { className: "styled current_color", d: "M 1832 1832 l -842 -958 l -486 825 l -37 -21 l 516 -877 l 792 900 l -68 -525 l 42 -5 m 214 749 v 43 h -1878 v -1878 h 43 v 1835 z" })] }), Sd = (e) => Je("svg", { viewBox: "0,0,2048,2048", ...e, children: [p("path", { className: "styled high_contrast", d: "M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z" }), p("path", { className: "styled background", d: "M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z" }), p("path", { className: "styled info_light", d: "M 619 1941 h -299 v -1322 h 299 z" }), p("path", { className: "styled info_dark", d: "M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z" }), p("path", { className: "styled secondary_light", d: "M 1429 1941 h -298 v -1066 h 298 z" }), p("path", { className: "styled secondary_dark", d: "M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z" }), p("path", { className: "styled current_color", d: "M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z" })] }), xd = (e) => Je("svg", { viewBox: "0,0,2048,2048", ...e, children: [p("path", { className: "styled high_contrast", d: "M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z" }), p("path", { className: "styled background", d: "M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z" }), p("path", { className: "styled info_light", d: "M 619 1941 h -299 v -1322 h 299 z" }), p("path", { className: "styled info_dark", d: "M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z" }), p("path", { className: "styled secondary_light", d: "M 1429 1941 h -298 v -1066 h 298 z" }), p("path", { className: "styled secondary_dark", d: "M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z" }), p("path", { className: "styled current_color", d: "M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z" })] }), Pl = qn(null), kd = (e) => {
|
|
@@ -4568,7 +4569,7 @@ const ed = (e) => Je("svg", { ...e, viewBox: "0 0 48 48", children: [p("path", {
|
|
|
4568
4569
|
}, Rd = () => {
|
|
4569
4570
|
const e = Yt(Pl), [t] = ue(() => new ei());
|
|
4570
4571
|
return ye(() => e || t, [e]);
|
|
4571
|
-
}, Ns = "_script-editor_iy654_5", Ls = tt.lazy(() => import("./
|
|
4572
|
+
}, Ns = "_script-editor_iy654_5", Ls = tt.lazy(() => import("./Cv3UmnkBp-69XB-f.mjs")), Os = { lightbulb: { enabled: !1 }, tabSize: 2, acceptSuggestionOnCommitCharacter: !0, acceptSuggestionOnEnter: "on", accessibilitySupport: "auto", automaticLayout: !0, autoIndent: !1, codeLens: !0, colorDecorators: !0, contextmenu: !0, cursorBlinking: "blink", cursorSmoothCaretAnimation: !1, cursorStyle: "line", disableLayerHinting: !1, disableMonospaceOptimizations: !1, dragAndDrop: !0, glyphMargin: !0, fixedOverflowWidgets: !1, folding: !0, foldingStrategy: "auto", fontLigatures: !1, formatOnPaste: !0, formatOnType: !1, hideCursorInOverviewRuler: !1, highlightActiveIndentGuide: !0, links: !0, lineDecorationsWidth: 8, lineNumbersMinChars: 3, mouseWheelZoom: !1, multiCursorMergeOverlapping: !0, multiCursorModifier: "alt", overviewRulerBorder: !0, overviewRulerLanes: 2, quickSuggestions: !0, quickSuggestionsDelay: 100, readOnly: !1, renderControlCharacters: !1, renderFinalNewline: !0, renderIndentGuides: !0, renderLineHighlight: "all", renderWhitespace: "none", revealHorizontalRightPadding: 30, roundedSelection: !0, rulers: [], scrollBeyondLastColumn: 5, scrollBeyondLastLine: !0, selectOnLineNumbers: !0, selectionClipboard: !0, selectionHighlight: !0, showLightbulbIconMode: !1, showFoldingControls: "mouseover", smoothScrolling: !0, suggestOnTriggerCharacters: !0, wordBasedSuggestions: !0, wordSeparators: `~!@#$%^&*()-=+[{]}|;:'",.<>/?`, wordWrap: "off", wordWrapBreakAfterCharacters: " })]?|&,;", wordWrapBreakBeforeCharacters: "{([+", wordWrapBreakObtrusiveCharacters: ".", wordWrapColumn: 80, wordWrapMinified: !0, wrappingIndent: "none" }, Zr = async (e, t, n) => {
|
|
4572
4573
|
const r = e.getModel();
|
|
4573
4574
|
if (!r) return;
|
|
4574
4575
|
const l = await t.languages.typescript.getTypeScriptWorker(), o = await l(r.uri), i = await o.getNavigationTree(r.uri.toString()), c = e.getPosition();
|
|
@@ -4648,9 +4649,9 @@ const Td = ft(wt((e, t) => {
|
|
|
4648
4649
|
let y = null;
|
|
4649
4650
|
const V = () => E;
|
|
4650
4651
|
return y = l ? l.createChildGroup(V, "scriptEditor", !1) : new yo(V, "scriptEditor"), y.addCommands(A, !0), y;
|
|
4651
|
-
}, [l, A]), P = Qr(U, ["executeSelectedScript"])[0],
|
|
4652
|
+
}, [l, A]), P = Qr(U, ["executeSelectedScript"])[0], v = P?.context(), L = ie((y) => {
|
|
4652
4653
|
P?.execute(y);
|
|
4653
|
-
}, [P]), C = Te(""), [
|
|
4654
|
+
}, [P]), C = Te(""), [w, x] = ue(!1), F = ie(async () => {
|
|
4654
4655
|
if (!u.current) return null;
|
|
4655
4656
|
const y = u.current, V = y.editor;
|
|
4656
4657
|
if (!V) return null;
|
|
@@ -4668,7 +4669,7 @@ const Td = ft(wt((e, t) => {
|
|
|
4668
4669
|
})(V, ne);
|
|
4669
4670
|
return b?.({ message: (xe ?? "").toUpperCase() }), xe ? { source: V.getValue(), name: xe } : null;
|
|
4670
4671
|
}, [b]), M = ie(async (y, V, ne) => {
|
|
4671
|
-
const xe = await
|
|
4672
|
+
const xe = await v.getScripts().createModule({ source: ne?.getValue(), declarationsOnly: !0 }), oe = xe ? xe.getFunctions().search() : rt.EmptyArray;
|
|
4672
4673
|
xe && (async function(_, ae) {
|
|
4673
4674
|
const ze = [];
|
|
4674
4675
|
for (let Ie = 1; Ie < _.getLineCount() + 1; Ie++) {
|
|
@@ -4683,39 +4684,39 @@ const Td = ft(wt((e, t) => {
|
|
|
4683
4684
|
});
|
|
4684
4685
|
B.current && B.current.clear(), B.current = ze.createDecorationsCollection(_e);
|
|
4685
4686
|
}(y, V, ne, oe));
|
|
4686
|
-
}, [
|
|
4687
|
-
if (!u.current || !
|
|
4687
|
+
}, [v]), D = ie(rt.debounce(M, 580), []), G = ie(async (y = void 0) => {
|
|
4688
|
+
if (!u.current || !v) return;
|
|
4688
4689
|
const V = u.current.editor.getPosition(), ne = { cursor: V ? V.toString() : "" };
|
|
4689
4690
|
y !== void 0 && (ne.message = y), b?.(ne);
|
|
4690
|
-
const xe =
|
|
4691
|
-
|
|
4692
|
-
}, [
|
|
4691
|
+
const xe = F();
|
|
4692
|
+
v.setSelectedFunction(xe);
|
|
4693
|
+
}, [v, b]);
|
|
4693
4694
|
be(() => {
|
|
4694
|
-
if (!
|
|
4695
|
+
if (!v) return;
|
|
4695
4696
|
const y = { insertSnippet: (ne) => {
|
|
4696
|
-
u.current?.editor && (
|
|
4697
|
+
u.current?.editor && (w ? Zr(u.current.editor, u.current.monaco, ne) : C.current = ne);
|
|
4697
4698
|
} };
|
|
4698
|
-
|
|
4699
|
-
const V =
|
|
4700
|
-
if (!u.current?.editor || !
|
|
4701
|
-
const ne = u.current.editor, xe =
|
|
4699
|
+
v.setEditor(y), v.setSelectedFunction(F());
|
|
4700
|
+
const V = v.addContainerListener({ onBeforeSave: async () => {
|
|
4701
|
+
if (!u.current?.editor || !v) return;
|
|
4702
|
+
const ne = u.current.editor, xe = v?.getScripts().getModules().getByName("scripting"), oe = xe?.getSource(), _ = ne.getValue();
|
|
4702
4703
|
if (!((oe?.length ?? 0) !== _.length || oe !== _)) return;
|
|
4703
|
-
await
|
|
4704
|
+
await v.saveSource(ne.getValue());
|
|
4704
4705
|
const ae = (oe?.length ?? 0) !== _.length || oe !== _;
|
|
4705
4706
|
b?.({ dirty: ae });
|
|
4706
4707
|
}, onReadonlyChange() {
|
|
4707
4708
|
}, onScriptChange: async () => {
|
|
4708
|
-
if (!u.current?.editor || !
|
|
4709
|
-
const ne = u.current.editor, xe =
|
|
4709
|
+
if (!u.current?.editor || !v) return;
|
|
4710
|
+
const ne = u.current.editor, xe = v.getScripts().getModules().search()[0]?.getSource() ?? "";
|
|
4710
4711
|
ne.setValue(xe);
|
|
4711
4712
|
} });
|
|
4712
4713
|
return () => {
|
|
4713
|
-
V(),
|
|
4714
|
+
V(), v.setSelectedFunction(null), v.setEditor(null);
|
|
4714
4715
|
};
|
|
4715
|
-
}, [
|
|
4716
|
+
}, [v, w]), be(() => () => {
|
|
4716
4717
|
if (!u.current?.editor) return;
|
|
4717
4718
|
const y = u.current.editor;
|
|
4718
|
-
|
|
4719
|
+
v?.saveSource(y.getValue());
|
|
4719
4720
|
}, []);
|
|
4720
4721
|
const $ = ie((y) => {
|
|
4721
4722
|
const V = u.current;
|
|
@@ -4724,8 +4725,8 @@ const Td = ft(wt((e, t) => {
|
|
|
4724
4725
|
return !!ne && (ne.focus(), !0);
|
|
4725
4726
|
}, []), B = Te(null), O = ie((y, V) => {
|
|
4726
4727
|
u.current = { monaco: V, editor: y }, x(!0), G("Loading Types");
|
|
4727
|
-
const ne =
|
|
4728
|
-
y.setValue(ne), import("./
|
|
4728
|
+
const ne = v.getScripts().getModules().search()[0]?.getSource() ?? "";
|
|
4729
|
+
y.setValue(ne), import("./CD-LLUyw3wwDiAZr.mjs").then((oe) => oe.c).then((oe) => {
|
|
4729
4730
|
G(""), oe.AutoTypings.create(y, { shareCache: !0, monaco: V, onError: (_) => {
|
|
4730
4731
|
_ === "Not implemented yet" && (_ = "Compile Errors"), console.warn("Error compiling types", _);
|
|
4731
4732
|
} }).then(async (_) => {
|
|
@@ -4733,23 +4734,23 @@ const Td = ft(wt((e, t) => {
|
|
|
4733
4734
|
D(ae, V, y);
|
|
4734
4735
|
});
|
|
4735
4736
|
}), y.addCommand("executeScript", function(oe, ..._) {
|
|
4736
|
-
_?.[0] &&
|
|
4737
|
+
_?.[0] && L({ functionName: _?.[0] });
|
|
4737
4738
|
}, ""), y.addAction({ id: "executeScript", label: "Execute", keybindings: [V.KeyCode.F8], run: async (oe) => {
|
|
4738
|
-
const _ =
|
|
4739
|
-
|
|
4739
|
+
const _ = F();
|
|
4740
|
+
v.setSelectedFunction(_);
|
|
4740
4741
|
const ae = await _;
|
|
4741
|
-
|
|
4742
|
+
L(ae);
|
|
4742
4743
|
} }), y.addAction({ id: "saveScript", label: "Save Script", keybindings: [V.KeyMod.CtrlCmd | V.KeyCode.KeyS], run: (oe) => {
|
|
4743
|
-
|
|
4744
|
-
const _ =
|
|
4744
|
+
v?.saveSource(y.getValue()).then(() => {
|
|
4745
|
+
const _ = v?.getScripts().getModules().getByName("scripting"), ae = _?.getSource(), ze = y.getValue(), Ie = (ae?.length ?? 0) !== ze.length || ae !== ze;
|
|
4745
4746
|
b?.({ dirty: Ie });
|
|
4746
4747
|
});
|
|
4747
4748
|
} }), y.onMouseDown(async (oe) => {
|
|
4748
4749
|
if (oe.target.type === V.editor.MouseTargetType.GUTTER_GLYPH_MARGIN) {
|
|
4749
|
-
const _ = oe.target.position.lineNumber, ae = await V.languages.typescript.getTypeScriptWorker(), ze = await ae(xe.uri), Ie = await ze.getNavigationTree(xe.uri.toString()), fe = y?.getValue(), Ge = (await
|
|
4750
|
+
const _ = oe.target.position.lineNumber, ae = await V.languages.typescript.getTypeScriptWorker(), ze = await ae(xe.uri), Ie = await ze.getNavigationTree(xe.uri.toString()), fe = y?.getValue(), Ge = (await v?.saveSource(fe)).getFunctions().search(), ve = Yo(xe, V, Ge, Ie).find((_e) => _e.lineNumber === _);
|
|
4750
4751
|
if (ve) {
|
|
4751
4752
|
const _e = oe.event.browserEvent.button;
|
|
4752
|
-
_e === 0 ? ve.type === "macro" || ve.type === "autoRun" ?
|
|
4753
|
+
_e === 0 ? ve.type === "macro" || ve.type === "autoRun" ? L({ functionName: ve.name }) : ve.type === "formula" && v.quickInsertFunction?.(ve.name) : _e === 2 && (console.log("Context menu for function:", ve.name), oe.event.browserEvent.preventDefault());
|
|
4753
4754
|
}
|
|
4754
4755
|
}
|
|
4755
4756
|
}), y.onDidChangeModelContent(() => {
|
|
@@ -4768,13 +4769,13 @@ const Td = ft(wt((e, t) => {
|
|
|
4768
4769
|
} };
|
|
4769
4770
|
} });
|
|
4770
4771
|
})(0, V), xe.onDidChangeContent((oe) => {
|
|
4771
|
-
const _ =
|
|
4772
|
+
const _ = v?.getScripts().getModules().getByName("scripting"), ae = _?.getSource(), ze = y.getValue(), Ie = (ae?.length ?? 0) !== ze.length || ae !== ze;
|
|
4772
4773
|
b?.({ dirty: Ie });
|
|
4773
4774
|
}), y.onDidChangeCursorPosition((oe) => {
|
|
4774
4775
|
G();
|
|
4775
4776
|
});
|
|
4776
|
-
}, [
|
|
4777
|
-
const y =
|
|
4777
|
+
}, [v, b]), W = ye(() => w ? null : g || p("div", { style: { position: "absolute", width: "100%", height: "100%" }, children: "Loading..." }), [w, g]), ee = ye(() => {
|
|
4778
|
+
const y = v?.getScripts().getModules().getByName("scripting")?.getSource() ?? "";
|
|
4778
4779
|
return Je("div", { style: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "row", position: "relative", boxSizing: "border-box" }, children: [p(tl, { children: p(Ls, { theme: c ? "extended-dark" : "extended", options: { ...Os, fixedOverflowWidgets: !0, readOnly: o }, language: "typescript", value: y, onValidate: (V) => {
|
|
4779
4780
|
let ne = !1;
|
|
4780
4781
|
for (let xe = 0; !ne && xe < V?.length; xe++) V[xe].severity === 8 && (ne = !0);
|
|
@@ -4800,7 +4801,7 @@ const Td = ft(wt((e, t) => {
|
|
|
4800
4801
|
const Le = de[de.length - 1];
|
|
4801
4802
|
Le !== "`" && Le !== "'" && Le !== '"' || (ge++, de = de.substring(0, de.length - 1));
|
|
4802
4803
|
try {
|
|
4803
|
-
|
|
4804
|
+
v.getRanges(de) && ae.push({ range: { endColumn: ce, endLineNumber: fe, startColumn: ge, startLineNumber: fe }, tooltip: `Goto range '${de}'`, url: `/range/${de}` });
|
|
4804
4805
|
} catch (qe) {
|
|
4805
4806
|
console.warn(qe);
|
|
4806
4807
|
}
|
|
@@ -4811,7 +4812,7 @@ const Td = ft(wt((e, t) => {
|
|
|
4811
4812
|
} }), V.editor.registerLinkOpener({ open(oe) {
|
|
4812
4813
|
if (oe?.path?.startsWith("/range/")) {
|
|
4813
4814
|
try {
|
|
4814
|
-
|
|
4815
|
+
v.getRanges(oe.path.substring(7))?.select();
|
|
4815
4816
|
} catch (_) {
|
|
4816
4817
|
console.warn("invalid range", _);
|
|
4817
4818
|
}
|
|
@@ -4825,11 +4826,11 @@ const Td = ft(wt((e, t) => {
|
|
|
4825
4826
|
}), V.languages.typescript.typescriptDefaults.setDiagnosticsOptions({ noSemanticValidation: !1, noSyntaxValidation: !1 }), x(!0);
|
|
4826
4827
|
})();
|
|
4827
4828
|
}, onMount: O }) }), W] });
|
|
4828
|
-
}, [
|
|
4829
|
+
}, [v, U, o, W, c]), z = jt(t, () => ({ isScriptEditorElement: () => !0, focus: (y) => {
|
|
4829
4830
|
$(y);
|
|
4830
4831
|
}, close: () => {
|
|
4831
4832
|
R?.();
|
|
4832
|
-
}, getEditor: () =>
|
|
4833
|
+
}, getEditor: () => v?.getEditor() }), [v]);
|
|
4833
4834
|
return be(() => (s && requestAnimationFrame(() => {
|
|
4834
4835
|
$();
|
|
4835
4836
|
}), () => {
|