@malloy-publisher/sdk 0.9.9 → 0.9.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/dist/{RenderedResult-Bw7EQc42.cjs.js → RenderedResult-BcgYjkZ0.cjs.js} +1 -1
- package/dist/{RenderedResult-BHuJpdSn.es.js → RenderedResult-Dp1Qdajz.es.js} +1 -1
- package/dist/builder/index.cjs.js +61 -61
- package/dist/builder/index.es.js +782 -793
- package/dist/components/Dashboard/DashboardView.d.ts +11 -0
- package/dist/components/Dashboard/useStuck.d.ts +14 -0
- package/dist/components/DocumentCreate/newNotebook.d.ts +9 -5
- package/dist/components/ReportBuilder/FilterStrip.d.ts +3 -1
- package/dist/components/ReportBuilder/TileMenu.d.ts +7 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +3 -3
- package/dist/{useCompiledDocument-1dgF5CC9.es.js → useCompiledDocument-BMPDvdFx.es.js} +2348 -2310
- package/dist/{useCompiledDocument-BKyRnXmA.cjs.js → useCompiledDocument-UY28ITET.cjs.js} +34 -34
- package/package.json +1 -1
- package/src/components/Dashboard/DashboardView.tsx +62 -13
- package/src/components/Dashboard/useStuck.ts +38 -0
- package/src/components/DocumentCreate/newNotebook.spec.ts +8 -6
- package/src/components/DocumentCreate/newNotebook.ts +26 -12
- package/src/components/ReportBuilder/BuilderDialogs.tsx +5 -3
- package/src/components/ReportBuilder/BuilderGrid.tsx +13 -3
- package/src/components/ReportBuilder/FilterStrip.tsx +118 -118
- package/src/components/ReportBuilder/ReportBuilder.inline.spec.tsx +0 -1
- package/src/components/ReportBuilder/ReportBuilder.spec.tsx +5 -6
- package/src/components/ReportBuilder/ReportBuilder.tsx +1 -0
- package/src/components/ReportBuilder/TileMenu.tsx +8 -3
- package/src/components/ReportBuilder/newDashboard.spec.ts +2 -3
package/dist/builder/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _, jsxs as K, Fragment as Be } from "react/jsx-runtime";
|
|
2
|
-
import { A as ds, f as Sc, g as Oc, h as Vr, U as nh, i as Gt, M as mt, j as Yo, l as Xo, k as Qt, P as rh, T as us, t as ih, B as Tc, G as Pn, n as Ur, N as Ec, o as Cc, p as sh, q as oh, s as Zo, S as ah, C as lh, u as ch, v as dh, w as Nt, x as uh, y as fh, z as hh, E as ph, F as gh, H as Qo, I as mh, J as vh, K as yh, L as bh, O as Ic, Q as wh, R as xh, V as _h, W as kh, X as $h, Y as Dc, Z as Ac, _ as Pc, $ as Sh, a0 as Mc, a1 as Oh, a2 as Th, a3 as Eh, a4 as Ch, a5 as Ih, a6 as Dh, a7 as Ah, a8 as Ph, a9 as Mh, aa as Rh, ab as Lh, ac as Nh, ad as zh } from "../useCompiledDocument-
|
|
3
|
-
import { ae as Q0, af as J0, ag as ew, ah as tw, ai as nw, aj as rw, ak as iw, al as sw, am as ow, an as aw, ao as lw } from "../useCompiledDocument-
|
|
2
|
+
import { A as ds, f as Sc, g as Oc, h as Vr, U as nh, i as Gt, M as mt, j as Yo, l as Xo, k as Qt, P as rh, T as us, t as ih, B as Tc, G as Pn, n as Ur, N as Ec, o as Cc, p as sh, q as oh, s as Zo, S as ah, C as lh, u as ch, v as dh, w as Nt, x as uh, y as fh, z as hh, E as ph, F as gh, H as Qo, I as mh, J as vh, K as yh, L as bh, O as Ic, Q as wh, R as xh, V as _h, W as kh, X as $h, Y as Dc, Z as Ac, _ as Pc, $ as Sh, a0 as Mc, a1 as Oh, a2 as Th, a3 as Eh, a4 as Ch, a5 as Ih, a6 as Dh, a7 as Ah, a8 as Ph, a9 as Mh, aa as Rh, ab as Lh, ac as Nh, ad as zh } from "../useCompiledDocument-BMPDvdFx.es.js";
|
|
3
|
+
import { ae as Q0, af as J0, ag as ew, ah as tw, ai as nw, aj as rw, ak as iw, al as sw, am as ow, an as aw, ao as lw } from "../useCompiledDocument-BMPDvdFx.es.js";
|
|
4
4
|
import { TextField as st, MenuItem as qt, ListItemText as Jo, Typography as ve, Box as ze, List as Wh, ListItemButton as Fh, Chip as to, Stack as Se, ToggleButtonGroup as ea, ToggleButton as zn, Button as Pe, Checkbox as no, Tooltip as zt, Autocomplete as Bh, Popover as jh, InputBase as Gh, IconButton as Wi, SvgIcon as qh, Divider as Is, Alert as ht } from "@mui/material";
|
|
5
5
|
import { useId as Rc, useMemo as ue, useState as U, useEffect as ye, useRef as J, createElement as Kh, useLayoutEffect as Fi, useCallback as he, useInsertionEffect as Vh, createContext as Lc, memo as Uh, forwardRef as Hh, startTransition as Yh, useImperativeHandle as Xh, useContext as Nc } from "react";
|
|
6
6
|
import { b4 as rt, b5 as ta } from "../ServerProvider-CQy4jVYK.es.js";
|
|
@@ -66,16 +66,16 @@ function ro({
|
|
|
66
66
|
label: "Viz type",
|
|
67
67
|
value: e,
|
|
68
68
|
disabled: i !== void 0,
|
|
69
|
-
onChange: (
|
|
70
|
-
const
|
|
71
|
-
l.find((f) => f.value ===
|
|
69
|
+
onChange: (c) => {
|
|
70
|
+
const d = c.target.value;
|
|
71
|
+
l.find((f) => f.value === d)?.disabled || o(d);
|
|
72
72
|
},
|
|
73
73
|
helperText: i,
|
|
74
74
|
FormHelperTextProps: { id: u },
|
|
75
75
|
SelectProps: {
|
|
76
76
|
...s ? { onOpen: s } : {},
|
|
77
77
|
// The menu items carry a reason line; the closed field shows the label alone.
|
|
78
|
-
renderValue: (
|
|
78
|
+
renderValue: (c) => l.find((d) => d.value === c)?.label ?? String(c),
|
|
79
79
|
// A disabled choice stays focusable so a keyboard user reaches its reason.
|
|
80
80
|
MenuProps: { MenuListProps: { disabledItemsFocusable: !0 } },
|
|
81
81
|
SelectDisplayProps: {
|
|
@@ -85,20 +85,20 @@ function ro({
|
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
87
|
sx: { minWidth: 140 },
|
|
88
|
-
children: l.map((
|
|
88
|
+
children: l.map((c) => /* @__PURE__ */ _(
|
|
89
89
|
qt,
|
|
90
90
|
{
|
|
91
|
-
value:
|
|
92
|
-
disabled:
|
|
91
|
+
value: c.value,
|
|
92
|
+
disabled: c.value === "custom" || c.disabled === !0,
|
|
93
93
|
children: /* @__PURE__ */ _(
|
|
94
94
|
Jo,
|
|
95
95
|
{
|
|
96
|
-
primary:
|
|
97
|
-
...
|
|
96
|
+
primary: c.label,
|
|
97
|
+
...c.reason ? { secondary: c.reason } : {}
|
|
98
98
|
}
|
|
99
99
|
)
|
|
100
100
|
},
|
|
101
|
-
|
|
101
|
+
c.value
|
|
102
102
|
))
|
|
103
103
|
}
|
|
104
104
|
);
|
|
@@ -220,20 +220,20 @@ function up({
|
|
|
220
220
|
onAdd: s,
|
|
221
221
|
onAddText: o
|
|
222
222
|
}) {
|
|
223
|
-
const { theme: a } = rt(), l = ue(() => n?.sources ?? [], [n]), [u,
|
|
223
|
+
const { theme: a } = rt(), l = ue(() => n?.sources ?? [], [n]), [u, c] = U("query"), [d, f] = U(""), [h, p] = U(""), [m, b] = U(""), [w, v] = U(
|
|
224
224
|
"default"
|
|
225
225
|
), [g, y] = U(Math.ceil(r / 2));
|
|
226
226
|
ye(() => {
|
|
227
227
|
if (!e) return;
|
|
228
|
-
|
|
228
|
+
c("query");
|
|
229
229
|
const $ = (E) => l.some((B) => B.name === E && B.views.length > 0);
|
|
230
230
|
f(
|
|
231
231
|
t.sources.map((E) => E.base).find($) ?? l.find((E) => E.views.length > 0)?.name ?? ""
|
|
232
232
|
), p(""), b(""), v("default"), y(Math.ceil(r / 2));
|
|
233
233
|
}, [e, t, l, r]);
|
|
234
|
-
const x =
|
|
234
|
+
const x = d !== "" && h !== "", k = [d, h].filter(($) => $ !== "" && !na($)).map(
|
|
235
235
|
($) => `"${$}" is not a plain Malloy name, so a tile cannot be written for it.`
|
|
236
|
-
)[0], S = l.find(($) => $.name ===
|
|
236
|
+
)[0], S = l.find(($) => $.name === d), C = S?.views.find(
|
|
237
237
|
($) => $.name === h
|
|
238
238
|
);
|
|
239
239
|
return /* @__PURE__ */ _(
|
|
@@ -251,7 +251,7 @@ function up({
|
|
|
251
251
|
variant: "contained",
|
|
252
252
|
disabled: u === "query" && (!x || k !== void 0),
|
|
253
253
|
onClick: () => u === "text" ? o() : s({
|
|
254
|
-
base:
|
|
254
|
+
base: d,
|
|
255
255
|
modelPath: S?.modelPath ?? "",
|
|
256
256
|
...S?.exporters ? { exporters: S.exporters } : {},
|
|
257
257
|
view: h,
|
|
@@ -277,7 +277,7 @@ function up({
|
|
|
277
277
|
value: u,
|
|
278
278
|
"aria-label": "Tile type",
|
|
279
279
|
onChange: ($, E) => {
|
|
280
|
-
E !== null &&
|
|
280
|
+
E !== null && c(E);
|
|
281
281
|
},
|
|
282
282
|
children: [
|
|
283
283
|
/* @__PURE__ */ _(zn, { value: "query", sx: { px: 1.5 }, children: "Query" }),
|
|
@@ -290,7 +290,7 @@ function up({
|
|
|
290
290
|
dp,
|
|
291
291
|
{
|
|
292
292
|
sources: l,
|
|
293
|
-
source:
|
|
293
|
+
source: d,
|
|
294
294
|
view: h,
|
|
295
295
|
onSource: ($) => {
|
|
296
296
|
f($), p("");
|
|
@@ -359,13 +359,13 @@ function fp({
|
|
|
359
359
|
})
|
|
360
360
|
);
|
|
361
361
|
}, [e, n, t]);
|
|
362
|
-
const
|
|
362
|
+
const c = (p, m) => u(
|
|
363
363
|
(b) => b.map((w, v) => {
|
|
364
364
|
if (v !== p) return w;
|
|
365
365
|
const g = { ...w };
|
|
366
366
|
return m(g), g;
|
|
367
367
|
})
|
|
368
|
-
),
|
|
368
|
+
), d = [Ds, ...i.filter((p) => p !== Ds)], f = (p) => p === Ds ? "This report" : p;
|
|
369
369
|
return /* @__PURE__ */ _(
|
|
370
370
|
ds,
|
|
371
371
|
{
|
|
@@ -461,11 +461,11 @@ function fp({
|
|
|
461
461
|
displayEmpty: !0
|
|
462
462
|
},
|
|
463
463
|
InputLabelProps: { shrink: !0 },
|
|
464
|
-
onChange: (b) =>
|
|
464
|
+
onChange: (b) => c(m, (w) => {
|
|
465
465
|
const v = b.target.value;
|
|
466
466
|
w.to = Array.isArray(v) ? v : String(v).split(",").filter(Boolean);
|
|
467
467
|
}),
|
|
468
|
-
children:
|
|
468
|
+
children: d.map((b) => /* @__PURE__ */ K(qt, { value: b, children: [
|
|
469
469
|
/* @__PURE__ */ _(
|
|
470
470
|
no,
|
|
471
471
|
{
|
|
@@ -492,7 +492,7 @@ function fp({
|
|
|
492
492
|
SelectProps: { displayEmpty: !0 },
|
|
493
493
|
InputLabelProps: { shrink: !0 },
|
|
494
494
|
helperText: p.given === "" ? `Named ${p.name}, like the dimension` : void 0,
|
|
495
|
-
onChange: (b) =>
|
|
495
|
+
onChange: (b) => c(m, (w) => {
|
|
496
496
|
w.given = b.target.value;
|
|
497
497
|
}),
|
|
498
498
|
children: [
|
|
@@ -704,11 +704,11 @@ function _p({
|
|
|
704
704
|
}) {
|
|
705
705
|
const o = J(n);
|
|
706
706
|
e && (o.current = n);
|
|
707
|
-
const a = e ? n : o.current, l = a !== void 0, [u,
|
|
707
|
+
const a = e ? n : o.current, l = a !== void 0, [u, c] = U({ kind: "new" }), [d, f] = U(""), [h, p] = U("select"), [m, b] = U(""), [w, v] = U(""), [g, y] = U([]), [x, k] = U(!1), [S, C] = U(!1), $ = (P) => t.sources.find((L) => L.name === P.source)?.base ?? P.source;
|
|
708
708
|
ye(() => {
|
|
709
709
|
if (e)
|
|
710
710
|
if (C(n !== void 0), n) {
|
|
711
|
-
|
|
711
|
+
c({ kind: "existing", name: n.name }), f(n.label ?? "");
|
|
712
712
|
const P = yp(t, n);
|
|
713
713
|
y(P);
|
|
714
714
|
const L = P.filter((de) => de.include), re = new Set(L.map((de) => de.field));
|
|
@@ -716,7 +716,7 @@ function _p({
|
|
|
716
716
|
re.size === 1 ? L[0].field : n.field ?? ""
|
|
717
717
|
), k(re.size > 1);
|
|
718
718
|
} else
|
|
719
|
-
|
|
719
|
+
c({ kind: "new" }), f(""), p("select"), v(""), b((/* @__PURE__ */ new Date()).toISOString().slice(0, 10)), y(
|
|
720
720
|
t.tiles.map((P) => ({
|
|
721
721
|
include: io(P),
|
|
722
722
|
field: ""
|
|
@@ -734,7 +734,7 @@ function _p({
|
|
|
734
734
|
[w, E]
|
|
735
735
|
), D = u.kind === "existing" ? n ?? r.find((P) => P.name === u.name) : B ? {
|
|
736
736
|
name: B,
|
|
737
|
-
type: ci({ name: B, label:
|
|
737
|
+
type: ci({ name: B, label: d, kind: h, field: w }).type
|
|
738
738
|
} : void 0, N = D?.type !== void 0 && !D.type.startsWith("filter<"), q = g.find((P) => P.include)?.op ?? Bi(D?.type), j = (P, L) => {
|
|
739
739
|
C(!0), y(
|
|
740
740
|
(re) => re.map((de, Ge) => Ge === P ? { ...de, ...L } : de)
|
|
@@ -747,9 +747,9 @@ function _p({
|
|
|
747
747
|
(re) => re.map(({ op: de, ...Ge }) => L ? { ...Ge, op: L } : Ge)
|
|
748
748
|
);
|
|
749
749
|
}, se = (P) => {
|
|
750
|
-
C(!0),
|
|
750
|
+
C(!0), c({ kind: "existing", name: P.name }), v(P.field ?? ""), Q(P.type);
|
|
751
751
|
}, fe = (P) => {
|
|
752
|
-
C(!0), p(P), Q(ci({ name: "X", label:
|
|
752
|
+
C(!0), p(P), Q(ci({ name: "X", label: d, kind: P, field: w }).type);
|
|
753
753
|
}, T = t.tiles.map(io), G = T.filter(Boolean).length, W = g.filter((P, L) => P.include && T[L]).length, A = t.tiles.filter(
|
|
754
754
|
(P, L) => (g[L]?.include ?? !1) && T[L] && ke(P)
|
|
755
755
|
), F = A.length > 0 ? A : t.tiles.filter(
|
|
@@ -803,7 +803,7 @@ function _p({
|
|
|
803
803
|
if (C(!0), v(P), l || u.kind !== "new") return;
|
|
804
804
|
const L = O(P), re = ci({
|
|
805
805
|
name: "X",
|
|
806
|
-
label:
|
|
806
|
+
label: d,
|
|
807
807
|
kind: h,
|
|
808
808
|
field: P
|
|
809
809
|
}).type;
|
|
@@ -824,7 +824,7 @@ function _p({
|
|
|
824
824
|
name: D.name,
|
|
825
825
|
// Untyped, the label is what the placeholder promised — `Status`
|
|
826
826
|
// for `$STATUS` — not the shouted name.
|
|
827
|
-
label:
|
|
827
|
+
label: d.trim() || qc(D.name),
|
|
828
828
|
kind: h,
|
|
829
829
|
field: w.trim(),
|
|
830
830
|
...Y ? { source: Y } : {},
|
|
@@ -832,7 +832,7 @@ function _p({
|
|
|
832
832
|
})
|
|
833
833
|
);
|
|
834
834
|
else if (n?.origin === "dashboard" && n.local) {
|
|
835
|
-
const P =
|
|
835
|
+
const P = d.trim(), L = P !== (n.local.label ?? "");
|
|
836
836
|
s(
|
|
837
837
|
D.name,
|
|
838
838
|
M,
|
|
@@ -846,8 +846,8 @@ function _p({
|
|
|
846
846
|
shown: a,
|
|
847
847
|
fromModel: te,
|
|
848
848
|
source: u,
|
|
849
|
-
setSource:
|
|
850
|
-
label:
|
|
849
|
+
setSource: c,
|
|
850
|
+
label: d,
|
|
851
851
|
setLabel: f,
|
|
852
852
|
kind: h,
|
|
853
853
|
dateDefault: m,
|
|
@@ -889,8 +889,8 @@ function ml({
|
|
|
889
889
|
helperText: a,
|
|
890
890
|
disabled: l,
|
|
891
891
|
autoFocus: u,
|
|
892
|
-
placeholder:
|
|
893
|
-
sx:
|
|
892
|
+
placeholder: c,
|
|
893
|
+
sx: d
|
|
894
894
|
}) {
|
|
895
895
|
const f = ue(
|
|
896
896
|
() => (n ?? []).filter((p) => r?.(p) ?? !0).map((p) => p.name),
|
|
@@ -917,14 +917,14 @@ function ml({
|
|
|
917
917
|
{
|
|
918
918
|
...p,
|
|
919
919
|
label: i,
|
|
920
|
-
placeholder:
|
|
920
|
+
placeholder: c,
|
|
921
921
|
autoFocus: u,
|
|
922
922
|
error: o,
|
|
923
923
|
helperText: a,
|
|
924
924
|
inputProps: { ...p.inputProps, "aria-label": s }
|
|
925
925
|
}
|
|
926
926
|
),
|
|
927
|
-
sx:
|
|
927
|
+
sx: d
|
|
928
928
|
}
|
|
929
929
|
);
|
|
930
930
|
}
|
|
@@ -947,8 +947,8 @@ function kp({
|
|
|
947
947
|
}) {
|
|
948
948
|
const { theme: l } = rt(), {
|
|
949
949
|
editing: u,
|
|
950
|
-
shown:
|
|
951
|
-
fromModel:
|
|
950
|
+
shown: c,
|
|
951
|
+
fromModel: d,
|
|
952
952
|
source: f,
|
|
953
953
|
setSource: h,
|
|
954
954
|
label: p,
|
|
@@ -1005,7 +1005,7 @@ function kp({
|
|
|
1005
1005
|
{
|
|
1006
1006
|
open: e,
|
|
1007
1007
|
onClose: s,
|
|
1008
|
-
title: u ?
|
|
1008
|
+
title: u ? c.label ?? c.name : "Add a filter",
|
|
1009
1009
|
description: u ? /* @__PURE__ */ K(Be, { children: [
|
|
1010
1010
|
/* @__PURE__ */ K(
|
|
1011
1011
|
ze,
|
|
@@ -1014,11 +1014,11 @@ function kp({
|
|
|
1014
1014
|
sx: { fontFamily: "ui-monospace, monospace" },
|
|
1015
1015
|
children: [
|
|
1016
1016
|
"$",
|
|
1017
|
-
|
|
1017
|
+
c.name
|
|
1018
1018
|
]
|
|
1019
1019
|
}
|
|
1020
1020
|
),
|
|
1021
|
-
|
|
1021
|
+
d ? " · declared in the model, so its label and options are set there" : " · declared in this report"
|
|
1022
1022
|
] }) : "A filter on the page, and the tiles it filters.",
|
|
1023
1023
|
actions: /* @__PURE__ */ K(Be, { children: [
|
|
1024
1024
|
u && /* @__PURE__ */ _(
|
|
@@ -1026,7 +1026,7 @@ function kp({
|
|
|
1026
1026
|
{
|
|
1027
1027
|
color: "error",
|
|
1028
1028
|
startIcon: /* @__PURE__ */ _(Oc, {}),
|
|
1029
|
-
onClick: () => a(
|
|
1029
|
+
onClick: () => a(c.name),
|
|
1030
1030
|
sx: (M) => ({
|
|
1031
1031
|
mr: "auto",
|
|
1032
1032
|
color: Sc(M)
|
|
@@ -1115,7 +1115,7 @@ function kp({
|
|
|
1115
1115
|
sx: { flex: 1, minWidth: 200 }
|
|
1116
1116
|
}
|
|
1117
1117
|
),
|
|
1118
|
-
!
|
|
1118
|
+
!d && /* @__PURE__ */ _(
|
|
1119
1119
|
st,
|
|
1120
1120
|
{
|
|
1121
1121
|
size: "small",
|
|
@@ -1305,14 +1305,14 @@ function Kc(e, t, n, r) {
|
|
|
1305
1305
|
const [i, s] = U(void 0);
|
|
1306
1306
|
return ye(() => {
|
|
1307
1307
|
t && e !== void 0 && s(structuredClone(e));
|
|
1308
|
-
}, [t, e]), { draft: i, patch: (
|
|
1309
|
-
if (
|
|
1310
|
-
const f = structuredClone(
|
|
1311
|
-
return
|
|
1312
|
-
}), apply: (
|
|
1308
|
+
}, [t, e]), { draft: i, patch: (c) => s((d) => {
|
|
1309
|
+
if (d === void 0) return d;
|
|
1310
|
+
const f = structuredClone(d);
|
|
1311
|
+
return c(f), f;
|
|
1312
|
+
}), apply: (c) => {
|
|
1313
1313
|
if (i === void 0) return;
|
|
1314
|
-
const
|
|
1315
|
-
d
|
|
1314
|
+
const d = structuredClone(i);
|
|
1315
|
+
c(d), s(d), JSON.stringify(d) !== JSON.stringify(e) && n(d);
|
|
1316
1316
|
}, close: () => {
|
|
1317
1317
|
i !== void 0 && e !== void 0 && JSON.stringify(i) !== JSON.stringify(e) && n(i), r();
|
|
1318
1318
|
}, discard: () => s(void 0) };
|
|
@@ -1328,12 +1328,12 @@ function Tp({
|
|
|
1328
1328
|
onDrills: o,
|
|
1329
1329
|
view: a
|
|
1330
1330
|
}) {
|
|
1331
|
-
const l = Rc(), { theme: u } = rt(), { draft:
|
|
1331
|
+
const l = Rc(), { theme: u } = rt(), { draft: c, apply: d, close: f, discard: h } = Kc(
|
|
1332
1332
|
t,
|
|
1333
1333
|
e !== null,
|
|
1334
1334
|
r,
|
|
1335
1335
|
n
|
|
1336
|
-
), p =
|
|
1336
|
+
), p = c !== void 0 && ke(c) ? c : void 0, m = p !== void 0 && p.declaration.kind !== "inherited", b = (g) => d((y) => {
|
|
1337
1337
|
ke(y) && g(y);
|
|
1338
1338
|
}), w = J(void 0), v = e !== null;
|
|
1339
1339
|
return ye(() => {
|
|
@@ -1341,19 +1341,19 @@ function Tp({
|
|
|
1341
1341
|
}, [v]), /* @__PURE__ */ _(
|
|
1342
1342
|
jh,
|
|
1343
1343
|
{
|
|
1344
|
-
open: e !== null &&
|
|
1344
|
+
open: e !== null && c !== void 0,
|
|
1345
1345
|
anchorEl: e,
|
|
1346
1346
|
onClose: f,
|
|
1347
1347
|
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
1348
1348
|
transformOrigin: { vertical: "top", horizontal: "right" },
|
|
1349
1349
|
slotProps: { paper: { sx: { width: 320, p: 2 } } },
|
|
1350
|
-
children:
|
|
1350
|
+
children: c && /* @__PURE__ */ K(Se, { sx: { gap: 1.5 }, children: [
|
|
1351
1351
|
/* @__PURE__ */ _(
|
|
1352
1352
|
ve,
|
|
1353
1353
|
{
|
|
1354
1354
|
variant: "overline",
|
|
1355
1355
|
sx: { color: u.tileTitle, lineHeight: 1.5 },
|
|
1356
|
-
children: p ? `${p.source} → ${p.name}` : `Text · ${
|
|
1356
|
+
children: p ? `${p.source} → ${p.name}` : `Text · ${c.name}`
|
|
1357
1357
|
}
|
|
1358
1358
|
),
|
|
1359
1359
|
p && m && /* @__PURE__ */ _(Be, { children: /* @__PURE__ */ _(
|
|
@@ -1396,7 +1396,7 @@ function Tp({
|
|
|
1396
1396
|
", so a filter has no single place to go. Everything else here is editable."
|
|
1397
1397
|
] }),
|
|
1398
1398
|
/* @__PURE__ */ K(Se, { direction: "row", sx: { justifyContent: "space-between" }, children: [
|
|
1399
|
-
m ? /* @__PURE__ */ _(
|
|
1399
|
+
m && o ? /* @__PURE__ */ _(
|
|
1400
1400
|
Pe,
|
|
1401
1401
|
{
|
|
1402
1402
|
size: "small",
|
|
@@ -1455,7 +1455,7 @@ function Ep({
|
|
|
1455
1455
|
confirmConversion: l,
|
|
1456
1456
|
exitDialog: u
|
|
1457
1457
|
}) {
|
|
1458
|
-
const { filterDialog:
|
|
1458
|
+
const { filterDialog: c, setFilterDialog: d } = i, { menu: f, setMenu: h } = s, p = f === void 0 ? void 0 : e.document.tiles[f.index], m = p && ke(p) ? p : void 0, b = (() => {
|
|
1459
1459
|
if (!m || !t) return;
|
|
1460
1460
|
const w = e.document.sources.find((g) => g.name === m.source)?.base ?? m.source, v = m.declaration.kind === "reference" ? m.declaration.from : m.name;
|
|
1461
1461
|
return t.sources.find((g) => g.name === w)?.views.find((g) => g.name === v);
|
|
@@ -1464,12 +1464,12 @@ function Ep({
|
|
|
1464
1464
|
/* @__PURE__ */ _(
|
|
1465
1465
|
kp,
|
|
1466
1466
|
{
|
|
1467
|
-
open:
|
|
1467
|
+
open: c !== void 0,
|
|
1468
1468
|
document: e.document,
|
|
1469
|
-
...
|
|
1469
|
+
...c?.control ? { control: c.control } : {},
|
|
1470
1470
|
available: i.available,
|
|
1471
1471
|
...t ? { fieldsFor: i.fieldsFor } : {},
|
|
1472
|
-
onClose: () =>
|
|
1472
|
+
onClose: () => d(void 0),
|
|
1473
1473
|
onApply: i.applyFilter,
|
|
1474
1474
|
onRemove: i.dropControl
|
|
1475
1475
|
}
|
|
@@ -1493,9 +1493,9 @@ function Ep({
|
|
|
1493
1493
|
removeBlocked: "A saved report needs at least one tile."
|
|
1494
1494
|
} : {},
|
|
1495
1495
|
view: b,
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
}
|
|
1496
|
+
...(e.document.sources.find(
|
|
1497
|
+
(w) => w.name === m?.source
|
|
1498
|
+
)?.dimensions?.length ?? 0) > 0 ? { onDrills: () => a(m?.source) } : {}
|
|
1499
1499
|
}
|
|
1500
1500
|
),
|
|
1501
1501
|
/* @__PURE__ */ _(
|
|
@@ -1819,15 +1819,15 @@ var Ap = Object.create, sa = Object.defineProperty, Pp = Object.defineProperties
|
|
|
1819
1819
|
for (var i = 0, s = e[t >> 1], o = s && s.length; i < o; i++) t & 1 ? s[i].call(n) : r = s[i].call(n, r);
|
|
1820
1820
|
return r;
|
|
1821
1821
|
}, Hn = (e, t, n, r, i, s) => {
|
|
1822
|
-
var o, a, l, u,
|
|
1822
|
+
var o, a, l, u, c, d = t & 7, f = !!(t & 8), h = !!(t & 16), p = d > 3 ? e.length + 1 : d ? f ? 1 : 2 : 0, m = Zc[d + 5], b = d > 3 && (e[p - 1] = []), w = e[p] || (e[p] = []), v = d && (!h && !f && (i = i.prototype), d < 5 && (d > 3 || !h) && Mp(d < 4 ? i : { get [n]() {
|
|
1823
1823
|
return ot(this, s);
|
|
1824
1824
|
}, set [n](y) {
|
|
1825
1825
|
return Lt(this, s, y);
|
|
1826
1826
|
} }, n));
|
|
1827
|
-
|
|
1827
|
+
d ? h && d < 4 && wl(s, (d > 2 ? "set " : d > 1 ? "get " : "") + n) : wl(i, n);
|
|
1828
1828
|
for (var g = r.length - 1; g >= 0; g--)
|
|
1829
|
-
u = jp(
|
|
1830
|
-
return
|
|
1829
|
+
u = jp(d, n, l = {}, e[3], w), d && (u.static = f, u.private = h, c = u.access = { has: h ? (y) => Gp(i, y) : (y) => n in y }, d ^ 3 && (c.get = h ? (y) => (d ^ 1 ? ot : qp)(y, i, d ^ 4 ? s : v.get) : (y) => y[n]), d > 2 && (c.set = h ? (y, x) => Lt(y, i, x, d ^ 4 ? s : v.set) : (y, x) => y[n] = x)), a = (0, r[g])(d ? d < 4 ? h ? s : v[m] : d > 4 ? void 0 : { get: v.get, set: v.set } : i, u), l._ = 1, d ^ 4 || a === void 0 ? ur(a) && (d > 4 ? b.unshift(a) : d ? h ? s = a : v[m] = a : i = a) : typeof a != "object" || a === null ? Un("Object expected") : (ur(o = a.get) && (v.get = o), ur(o = a.set) && (v.set = o), ur(o = a.init) && b.unshift(o));
|
|
1830
|
+
return d || Qc(e, i), v && sa(i, n, v), h ? d ^ 4 ? s : v : i;
|
|
1831
1831
|
}, oa = (e, t, n) => t.has(e) || Un("Cannot " + n), Gp = (e, t) => Object(t) !== t ? Un('Cannot use the "in" operator on this value') : e.has(t), ot = (e, t, n) => (oa(e, t, "read from private field"), n ? n.call(e) : t.get(e)), fr = (e, t, n) => t.has(e) ? Un("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), Lt = (e, t, n, r) => (oa(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), qp = (e, t, n) => (oa(e, t, "access private method"), n);
|
|
1832
1832
|
function ao(e, t) {
|
|
1833
1833
|
if (t) {
|
|
@@ -1982,8 +1982,8 @@ var Vp = Object.create, od = Object.defineProperty, Up = Object.getOwnPropertyDe
|
|
|
1982
1982
|
for (var i = 0, s = e[t >> 1], o = s && s.length; i < o; i++) s[i].call(n);
|
|
1983
1983
|
return r;
|
|
1984
1984
|
}, dd = (e, t, n, r, i, s) => {
|
|
1985
|
-
for (var o, a, l, u,
|
|
1986
|
-
l = Qp(
|
|
1985
|
+
for (var o, a, l, u, c = t & 7, d = !1, f = !1, h = 2, p = ld[c + 5], m = e[h] || (e[h] = []), b = (i = i.prototype, Up(i, n)), w = r.length - 1; w >= 0; w--)
|
|
1986
|
+
l = Qp(c, n, a = {}, e[3], m), l.static = d, l.private = f, u = l.access = { has: (v) => n in v }, u.get = (v) => v[n], o = (0, r[w])(b[p], l), a._ = 1, cd(o) && (b[p] = o);
|
|
1987
1987
|
return b && od(i, n, b), i;
|
|
1988
1988
|
}, ud = (e, t, n) => t.has(e) || ps("Cannot " + n), tg = (e, t, n) => (ud(e, t, "read from private field"), t.get(e)), ng = (e, t, n) => t.has(e) ? ps("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), rg = (e, t, n, r) => (ud(e, t, "write to private field"), t.set(e, n), n), at = class go {
|
|
1989
1989
|
/**
|
|
@@ -2179,15 +2179,15 @@ var pd = /* @__PURE__ */ ((e) => (e.Horizontal = "x", e.Vertical = "y", e))(pd |
|
|
|
2179
2179
|
for (var i = 0, s = e[t >> 1], o = s && s.length; i < o; i++) t & 1 ? s[i].call(n) : r = s[i].call(n, r);
|
|
2180
2180
|
return r;
|
|
2181
2181
|
}, me = (e, t, n, r, i, s) => {
|
|
2182
|
-
var o, a, l, u,
|
|
2182
|
+
var o, a, l, u, c, d = t & 7, f = !!(t & 8), h = !!(t & 16), p = d > 3 ? e.length + 1 : d ? f ? 1 : 2 : 0, m = wd[d + 5], b = d > 3 && (e[p - 1] = []), w = e[p] || (e[p] = []), v = d && (!h && !f && (i = i.prototype), d < 5 && (d > 3 || !h) && ag(d < 4 ? i : { get [n]() {
|
|
2183
2183
|
return De(this, s);
|
|
2184
2184
|
}, set [n](y) {
|
|
2185
2185
|
return nt(this, s, y);
|
|
2186
2186
|
} }, n));
|
|
2187
|
-
|
|
2187
|
+
d ? h && d < 4 && kl(s, (d > 2 ? "set " : d > 1 ? "get " : "") + n) : kl(i, n);
|
|
2188
2188
|
for (var g = r.length - 1; g >= 0; g--)
|
|
2189
|
-
u = cg(
|
|
2190
|
-
return
|
|
2189
|
+
u = cg(d, n, l = {}, e[3], w), d && (u.static = f, u.private = h, c = u.access = { has: h ? (y) => dg(i, y) : (y) => n in y }, d ^ 3 && (c.get = h ? (y) => (d ^ 1 ? De : xd)(y, i, d ^ 4 ? s : v.get) : (y) => y[n]), d > 2 && (c.set = h ? (y, x) => nt(y, i, x, d ^ 4 ? s : v.set) : (y, x) => y[n] = x)), a = (0, r[g])(d ? d < 4 ? h ? s : v[m] : d > 4 ? void 0 : { get: v.get, set: v.set } : i, u), l._ = 1, d ^ 4 || a === void 0 ? hr(a) && (d > 4 ? b.unshift(a) : d ? h ? s = a : v[m] = a : i = a) : typeof a != "object" || a === null ? Yn("Object expected") : (hr(o = a.get) && (v.get = o), hr(o = a.set) && (v.set = o), hr(o = a.init) && b.unshift(o));
|
|
2190
|
+
return d || pn(e, i), v && da(i, n, v), h ? d ^ 4 ? s : v : i;
|
|
2191
2191
|
}, ha = (e, t, n) => t.has(e) || Yn("Cannot " + n), dg = (e, t) => Object(t) !== t ? Yn('Cannot use the "in" operator on this value') : e.has(t), De = (e, t, n) => (ha(e, t, "read from private field"), n ? n.call(e) : t.get(e)), we = (e, t, n) => t.has(e) ? Yn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), nt = (e, t, n, r) => (ha(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), xd = (e, t, n) => (ha(e, t, "access private method"), n);
|
|
2192
2192
|
function _d(e, t) {
|
|
2193
2193
|
return {
|
|
@@ -2443,17 +2443,17 @@ var di = [], $n, Sn, fg = class extends He {
|
|
|
2443
2443
|
for (const u of e ?? n.droppables) {
|
|
2444
2444
|
if (u.disabled || i && !u.accepts(i))
|
|
2445
2445
|
continue;
|
|
2446
|
-
const
|
|
2447
|
-
if (!
|
|
2446
|
+
const c = t ?? u.collisionDetector;
|
|
2447
|
+
if (!c)
|
|
2448
2448
|
continue;
|
|
2449
2449
|
l.push(u), u.shape;
|
|
2450
|
-
const
|
|
2451
|
-
() =>
|
|
2450
|
+
const d = pe(
|
|
2451
|
+
() => c({
|
|
2452
2452
|
droppable: u,
|
|
2453
2453
|
dragOperation: r
|
|
2454
2454
|
})
|
|
2455
2455
|
);
|
|
2456
|
-
|
|
2456
|
+
d && (u.collisionPriority != null && (d.priority = u.collisionPriority), a.push(d));
|
|
2457
2457
|
}
|
|
2458
2458
|
return l.length === 0 ? di : (a.sort(ug), a);
|
|
2459
2459
|
}
|
|
@@ -2483,9 +2483,9 @@ var Ct = class tn {
|
|
|
2483
2483
|
var u;
|
|
2484
2484
|
return [
|
|
2485
2485
|
() => {
|
|
2486
|
-
const { id:
|
|
2487
|
-
if (
|
|
2488
|
-
return l =
|
|
2486
|
+
const { id: c, manager: d } = this;
|
|
2487
|
+
if (c !== l)
|
|
2488
|
+
return l = c, d?.registry.register(this), () => d?.registry.unregister(this);
|
|
2489
2489
|
},
|
|
2490
2490
|
...(u = r?.()) != null ? u : []
|
|
2491
2491
|
];
|
|
@@ -2618,15 +2618,15 @@ var ms = Ct, $l = class {
|
|
|
2618
2618
|
super(
|
|
2619
2619
|
fa(ua({}, u), {
|
|
2620
2620
|
effects: () => {
|
|
2621
|
-
var
|
|
2621
|
+
var c;
|
|
2622
2622
|
return [
|
|
2623
|
-
...(
|
|
2623
|
+
...(c = l?.()) != null ? c : [],
|
|
2624
2624
|
() => {
|
|
2625
|
-
const { manager:
|
|
2626
|
-
if (!(!
|
|
2625
|
+
const { manager: d, plugins: f } = this;
|
|
2626
|
+
if (!(!d || !f))
|
|
2627
2627
|
for (const h of f) {
|
|
2628
2628
|
const { plugin: p } = Mr(h);
|
|
2629
|
-
|
|
2629
|
+
d.registry.plugins.register(p);
|
|
2630
2630
|
}
|
|
2631
2631
|
}
|
|
2632
2632
|
];
|
|
@@ -2959,12 +2959,12 @@ var mg = class {
|
|
|
2959
2959
|
(t = e.cancelable) != null ? t : !0
|
|
2960
2960
|
);
|
|
2961
2961
|
((n = e.propagate) == null || n) && this.manager.monitor.dispatch("dragmove", o), queueMicrotask(() => {
|
|
2962
|
-
var a, l, u,
|
|
2962
|
+
var a, l, u, c, d;
|
|
2963
2963
|
if (o.defaultPrevented)
|
|
2964
2964
|
return;
|
|
2965
|
-
const f = (
|
|
2965
|
+
const f = (d = e.to) != null ? d : {
|
|
2966
2966
|
x: r.position.current.x + ((l = (a = e.by) == null ? void 0 : a.x) != null ? l : 0),
|
|
2967
|
-
y: r.position.current.y + ((
|
|
2967
|
+
y: r.position.current.y + ((c = (u = e.by) == null ? void 0 : u.y) != null ? c : 0)
|
|
2968
2968
|
};
|
|
2969
2969
|
r.position.current = f;
|
|
2970
2970
|
});
|
|
@@ -2995,8 +2995,8 @@ var mg = class {
|
|
|
2995
2995
|
abort: () => {
|
|
2996
2996
|
}
|
|
2997
2997
|
};
|
|
2998
|
-
return s = new Promise((u,
|
|
2999
|
-
l.resume = u, l.abort =
|
|
2998
|
+
return s = new Promise((u, c) => {
|
|
2999
|
+
l.resume = u, l.abort = c;
|
|
3000
3000
|
}), l;
|
|
3001
3001
|
};
|
|
3002
3002
|
i.abort();
|
|
@@ -3008,15 +3008,15 @@ var mg = class {
|
|
|
3008
3008
|
);
|
|
3009
3009
|
const l = pe(
|
|
3010
3010
|
() => {
|
|
3011
|
-
var
|
|
3012
|
-
return ((
|
|
3011
|
+
var c;
|
|
3012
|
+
return ((c = r.source) == null ? void 0 : c.status) === "dropping";
|
|
3013
3013
|
}
|
|
3014
3014
|
), u = () => {
|
|
3015
3015
|
r.controller === i && (r.controller = void 0), r.reset();
|
|
3016
3016
|
};
|
|
3017
3017
|
if (l) {
|
|
3018
|
-
const { source:
|
|
3019
|
-
|
|
3018
|
+
const { source: c } = r, d = ut(() => {
|
|
3019
|
+
c?.status === "idle" && (d(), u());
|
|
3020
3020
|
});
|
|
3021
3021
|
} else
|
|
3022
3022
|
this.manager.renderer.rendering.then(u);
|
|
@@ -3271,7 +3271,7 @@ var wg = class {
|
|
|
3271
3271
|
var n;
|
|
3272
3272
|
const r = t ?? {}, i = yt(r.plugins, []), s = yt(r.sensors, []), o = yt(r.modifiers, []), a = (n = r.renderer) != null ? n : bg, l = new pg(this), u = new yg(this);
|
|
3273
3273
|
this.registry = u, this.monitor = l, this.renderer = a, this.actions = new mg(this), this.dragOperation = new bt(this), this.collisionObserver = new fg(this), this.plugins = [gg, ...i], this.modifiers = o, this.sensors = s;
|
|
3274
|
-
const { destroy:
|
|
3274
|
+
const { destroy: c } = this, d = Hr(() => {
|
|
3275
3275
|
var f, h, p;
|
|
3276
3276
|
const m = pe(() => this.dragOperation.modifiers), b = this.modifiers;
|
|
3277
3277
|
for (const w of m)
|
|
@@ -3282,7 +3282,7 @@ var wg = class {
|
|
|
3282
3282
|
})) != null ? p : b;
|
|
3283
3283
|
});
|
|
3284
3284
|
this.destroy = () => {
|
|
3285
|
-
|
|
3285
|
+
d(), c();
|
|
3286
3286
|
};
|
|
3287
3287
|
}
|
|
3288
3288
|
/**
|
|
@@ -3380,11 +3380,11 @@ function Jn(e) {
|
|
|
3380
3380
|
}
|
|
3381
3381
|
function xg(e) {
|
|
3382
3382
|
var t, n, r, i;
|
|
3383
|
-
const { documentElement: s } = Jn(e), o = it(e).visualViewport, a = (t = o?.width) != null ? t : s.clientWidth, l = (n = o?.height) != null ? n : s.clientHeight, u = (r = o?.offsetTop) != null ? r : 0,
|
|
3383
|
+
const { documentElement: s } = Jn(e), o = it(e).visualViewport, a = (t = o?.width) != null ? t : s.clientWidth, l = (n = o?.height) != null ? n : s.clientHeight, u = (r = o?.offsetTop) != null ? r : 0, c = (i = o?.offsetLeft) != null ? i : 0;
|
|
3384
3384
|
return {
|
|
3385
3385
|
top: u,
|
|
3386
|
-
left:
|
|
3387
|
-
right:
|
|
3386
|
+
left: c,
|
|
3387
|
+
right: c + a,
|
|
3388
3388
|
bottom: u + l,
|
|
3389
3389
|
width: a,
|
|
3390
3390
|
height: l
|
|
@@ -3402,11 +3402,11 @@ function kg(e) {
|
|
|
3402
3402
|
function Lr(e, t = e.getBoundingClientRect(), n = 0) {
|
|
3403
3403
|
var r, i, s, o, a;
|
|
3404
3404
|
let l = t;
|
|
3405
|
-
const { ownerDocument: u } = e,
|
|
3406
|
-
let
|
|
3407
|
-
for (;
|
|
3408
|
-
if (!_g(
|
|
3409
|
-
const g =
|
|
3405
|
+
const { ownerDocument: u } = e, c = (r = u.defaultView) != null ? r : window;
|
|
3406
|
+
let d = e.parentElement;
|
|
3407
|
+
for (; d && d !== u.documentElement; ) {
|
|
3408
|
+
if (!_g(d)) {
|
|
3409
|
+
const g = d.getBoundingClientRect(), y = n * (g.bottom - g.top), x = n * (g.right - g.left), k = n * (g.bottom - g.top), S = n * (g.right - g.left);
|
|
3410
3410
|
l = {
|
|
3411
3411
|
top: Math.max(l.top, g.top - y),
|
|
3412
3412
|
right: Math.min(l.right, g.right + x),
|
|
@@ -3418,9 +3418,9 @@ function Lr(e, t = e.getBoundingClientRect(), n = 0) {
|
|
|
3418
3418
|
// Will be calculated next
|
|
3419
3419
|
}, l.width = l.right - l.left, l.height = l.bottom - l.top;
|
|
3420
3420
|
}
|
|
3421
|
-
|
|
3421
|
+
d = d.parentElement;
|
|
3422
3422
|
}
|
|
3423
|
-
const f =
|
|
3423
|
+
const f = c.visualViewport, h = (i = f?.offsetTop) != null ? i : 0, p = (s = f?.offsetLeft) != null ? s : 0, m = (o = f?.width) != null ? o : c.innerWidth, b = (a = f?.height) != null ? a : c.innerHeight, w = n * b, v = n * m;
|
|
3424
3424
|
return l = {
|
|
3425
3425
|
top: Math.max(l.top, h - w),
|
|
3426
3426
|
right: Math.min(
|
|
@@ -3552,14 +3552,14 @@ var du = class {
|
|
|
3552
3552
|
const n = Array.isArray(e) ? e : [e], r = Array.isArray(t) ? t : [t], i = [];
|
|
3553
3553
|
for (const o of n)
|
|
3554
3554
|
for (const a of r) {
|
|
3555
|
-
const { type: l, listener: u, options:
|
|
3556
|
-
o.addEventListener(l, u,
|
|
3555
|
+
const { type: l, listener: u, options: c } = a, d = [o, a];
|
|
3556
|
+
o.addEventListener(l, u, c), this.entries.add(d), i.push(d);
|
|
3557
3557
|
}
|
|
3558
3558
|
const s = this.entries;
|
|
3559
3559
|
return function() {
|
|
3560
3560
|
for (const a of i) {
|
|
3561
|
-
const [l, { type: u, listener:
|
|
3562
|
-
l.removeEventListener(u,
|
|
3561
|
+
const [l, { type: u, listener: c, options: d }] = a;
|
|
3562
|
+
l.removeEventListener(u, c, d), s.delete(a);
|
|
3563
3563
|
}
|
|
3564
3564
|
};
|
|
3565
3565
|
}
|
|
@@ -3635,7 +3635,7 @@ var El = Array.from({ length: 100 }, (e, t) => t / 100), fu = 75, nn, Ui, Mt, rn
|
|
|
3635
3635
|
const { element: l } = this;
|
|
3636
3636
|
if ((s = oe(this, rn)) == null || s.disconnect(), oe(this, Cr) || !oe(this, nn) || !l.isConnected)
|
|
3637
3637
|
return;
|
|
3638
|
-
const u = (o = l.ownerDocument) != null ? o : document, { innerHeight:
|
|
3638
|
+
const u = (o = l.ownerDocument) != null ? o : document, { innerHeight: c, innerWidth: d } = (a = u.defaultView) != null ? a : window, f = l.getBoundingClientRect(), h = Lr(l, f), { top: p, left: m, bottom: b, right: w } = h, v = -Math.floor(p), g = -Math.floor(m), y = -Math.floor(d - w), x = -Math.floor(c - b), k = `${v}px ${y}px ${x}px ${g}px`;
|
|
3639
3639
|
this.boundingClientRect = f, tt(this, rn, new IntersectionObserver(
|
|
3640
3640
|
(S) => {
|
|
3641
3641
|
const [C] = S, { intersectionRect: $ } = C;
|
|
@@ -3659,8 +3659,8 @@ var El = Array.from({ length: 100 }, (e, t) => t / 100), fu = 75, nn, Ui, Mt, rn
|
|
|
3659
3659
|
n?.debug && (tt(this, Ke, document.createElement("div")), oe(this, Ke).style.background = "rgba(0,0,0,0.15)", oe(this, Ke).style.position = "fixed", oe(this, Ke).style.pointerEvents = "none", i.body.appendChild(oe(this, Ke))), tt(this, mr, new IntersectionObserver(
|
|
3660
3660
|
(s) => {
|
|
3661
3661
|
var o, a;
|
|
3662
|
-
const l = s[s.length - 1], { boundingClientRect: u, isIntersecting:
|
|
3663
|
-
tt(this, nn,
|
|
3662
|
+
const l = s[s.length - 1], { boundingClientRect: u, isIntersecting: c } = l, { width: d, height: f } = u, h = oe(this, nn);
|
|
3663
|
+
tt(this, nn, c), !(!d && !f) && (h && !c ? ((o = oe(this, rn)) == null || o.disconnect(), this.callback(null), (a = oe(this, Mt)) == null || a.disconnect(), tt(this, Mt, void 0), oe(this, Ke) && (oe(this, Ke).style.visibility = "hidden")) : oe(this, vr).call(this), c && !oe(this, Mt) && (tt(this, Mt, new Ag(oe(this, vr))), oe(this, Mt).observe(e)));
|
|
3664
3664
|
},
|
|
3665
3665
|
{
|
|
3666
3666
|
threshold: El,
|
|
@@ -3783,25 +3783,25 @@ function mu(e) {
|
|
|
3783
3783
|
x: e.scrollWidth - o.width,
|
|
3784
3784
|
y: e.scrollHeight - o.height
|
|
3785
3785
|
}
|
|
3786
|
-
}, l = a.current.y <= 0, u = a.current.x <= 0,
|
|
3786
|
+
}, l = a.current.y <= 0, u = a.current.x <= 0, c = a.current.y >= a.max.y, d = a.current.x >= a.max.x;
|
|
3787
3787
|
return {
|
|
3788
3788
|
rect: i,
|
|
3789
3789
|
position: a,
|
|
3790
3790
|
isTop: l,
|
|
3791
3791
|
isLeft: u,
|
|
3792
|
-
isBottom:
|
|
3793
|
-
isRight:
|
|
3792
|
+
isBottom: c,
|
|
3793
|
+
isRight: d
|
|
3794
3794
|
};
|
|
3795
3795
|
}
|
|
3796
3796
|
function Ng(e, t) {
|
|
3797
|
-
const { isTop: n, isBottom: r, isLeft: i, isRight: s, position: o } = mu(e), { x: a, y: l } = t ?? { x: 0, y: 0 }, u = !n && o.current.y + l > 0,
|
|
3797
|
+
const { isTop: n, isBottom: r, isLeft: i, isRight: s, position: o } = mu(e), { x: a, y: l } = t ?? { x: 0, y: 0 }, u = !n && o.current.y + l > 0, c = !r && o.current.y + l < o.max.y, d = !i && o.current.x + a > 0, f = !s && o.current.x + a < o.max.x;
|
|
3798
3798
|
return {
|
|
3799
3799
|
top: u,
|
|
3800
|
-
bottom:
|
|
3801
|
-
left:
|
|
3800
|
+
bottom: c,
|
|
3801
|
+
left: d,
|
|
3802
3802
|
right: f,
|
|
3803
|
-
x:
|
|
3804
|
-
y: u ||
|
|
3803
|
+
x: d || f,
|
|
3804
|
+
y: u || c
|
|
3805
3805
|
};
|
|
3806
3806
|
}
|
|
3807
3807
|
var Wa = class {
|
|
@@ -3916,7 +3916,7 @@ function Nr(e) {
|
|
|
3916
3916
|
}
|
|
3917
3917
|
function bs(e) {
|
|
3918
3918
|
var t, n, r, i, s, o, a, l, u;
|
|
3919
|
-
const { scale:
|
|
3919
|
+
const { scale: c, transform: d, translate: f } = e, h = qg(c), p = Nr(f), m = Kg(d);
|
|
3920
3920
|
if (!m && !h && !p)
|
|
3921
3921
|
return null;
|
|
3922
3922
|
const b = {
|
|
@@ -3967,7 +3967,7 @@ var lt = /* @__PURE__ */ ((e) => (e[e.Idle = 0] = "Idle", e[e.Forward = 1] = "Fo
|
|
|
3967
3967
|
y: 10
|
|
3968
3968
|
};
|
|
3969
3969
|
function Hg(e, t, n, r = 25, i = Vg, s = Ug) {
|
|
3970
|
-
const { x: o, y: a } = t, { rect: l, isTop: u, isBottom:
|
|
3970
|
+
const { x: o, y: a } = t, { rect: l, isTop: u, isBottom: c, isLeft: d, isRight: f } = mu(e), h = jn(e), p = Ot(e, !0), m = bs(p), b = m !== null ? m?.scaleX < 0 : !1, w = m !== null ? m?.scaleY < 0 : !1, v = new kt(
|
|
3971
3971
|
l.left * h.scaleX + h.x,
|
|
3972
3972
|
l.top * h.scaleY + h.y,
|
|
3973
3973
|
l.width * h.scaleX,
|
|
@@ -3983,13 +3983,13 @@ function Hg(e, t, n, r = 25, i = Vg, s = Ug) {
|
|
|
3983
3983
|
height: v.height * i.y,
|
|
3984
3984
|
width: v.width * i.x
|
|
3985
3985
|
};
|
|
3986
|
-
return x.height > 0 && (!u || w && !
|
|
3986
|
+
return x.height > 0 && (!u || w && !c) && a <= v.top + x.height && n?.y !== 1 && o >= v.left - s.x && o <= v.right + s.x ? (g.y = w ? 1 : -1, y.y = r * Math.abs(
|
|
3987
3987
|
(v.top + x.height - a) / x.height
|
|
3988
|
-
)) : x.height > 0 && (!
|
|
3988
|
+
)) : x.height > 0 && (!c || w && !u) && a >= v.bottom - x.height && n?.y !== -1 && o >= v.left - s.x && o <= v.right + s.x && (g.y = w ? -1 : 1, y.y = r * Math.abs(
|
|
3989
3989
|
(v.bottom - x.height - a) / x.height
|
|
3990
|
-
)), x.width > 0 && (!f || b && !
|
|
3990
|
+
)), x.width > 0 && (!f || b && !d) && o >= v.right - x.width && n?.x !== -1 && a >= v.top - s.y && a <= v.bottom + s.y ? (g.x = b ? -1 : 1, y.x = r * Math.abs(
|
|
3991
3991
|
(v.right - x.width - o) / x.width
|
|
3992
|
-
)) : x.width > 0 && (!
|
|
3992
|
+
)) : x.width > 0 && (!d || b && !f) && o <= v.left + x.width && n?.x !== 1 && a >= v.top - s.y && a <= v.bottom + s.y && (g.x = b ? 1 : -1, y.x = r * Math.abs(
|
|
3993
3993
|
(v.left + x.width - o) / x.width
|
|
3994
3994
|
)), {
|
|
3995
3995
|
direction: g,
|
|
@@ -4005,15 +4005,15 @@ function vu(e, { block: t = "nearest", inline: n = "nearest" } = {}) {
|
|
|
4005
4005
|
continue;
|
|
4006
4006
|
const { top: o, left: a } = Yg(e, s);
|
|
4007
4007
|
let l = o, u = a;
|
|
4008
|
-
for (const
|
|
4009
|
-
l -=
|
|
4008
|
+
for (const c of i)
|
|
4009
|
+
l -= c.scrollTop, u -= c.scrollLeft;
|
|
4010
4010
|
if (t !== "none") {
|
|
4011
|
-
const
|
|
4012
|
-
|
|
4011
|
+
const c = l < s.scrollTop, d = l + e.offsetHeight > s.scrollTop + s.clientHeight;
|
|
4012
|
+
c !== d && (t === "center" ? s.scrollTop = l - s.clientHeight / 2 + e.offsetHeight / 2 : c ? s.scrollTop = l : s.scrollTop = l + e.offsetHeight - s.clientHeight);
|
|
4013
4013
|
}
|
|
4014
4014
|
if (n !== "none") {
|
|
4015
|
-
const
|
|
4016
|
-
|
|
4015
|
+
const c = u < s.scrollLeft, d = u + e.offsetWidth > s.scrollLeft + s.clientWidth;
|
|
4016
|
+
c !== d && (n === "center" ? s.scrollLeft = u - s.clientWidth / 2 + e.offsetWidth / 2 : c ? s.scrollLeft = u : s.scrollLeft = u + e.offsetWidth - s.clientWidth);
|
|
4017
4017
|
}
|
|
4018
4018
|
i.push(s);
|
|
4019
4019
|
}
|
|
@@ -4037,24 +4037,24 @@ function Yg(e, t) {
|
|
|
4037
4037
|
};
|
|
4038
4038
|
}
|
|
4039
4039
|
function Xg(e, t, n) {
|
|
4040
|
-
const { scaleX: r, scaleY: i, x: s, y: o } = t, a = e.left + s + (1 - r) * parseFloat(n), l = e.top + o + (1 - i) * parseFloat(n.slice(n.indexOf(" ") + 1)), u = r ? e.width * r : e.width,
|
|
4040
|
+
const { scaleX: r, scaleY: i, x: s, y: o } = t, a = e.left + s + (1 - r) * parseFloat(n), l = e.top + o + (1 - i) * parseFloat(n.slice(n.indexOf(" ") + 1)), u = r ? e.width * r : e.width, c = i ? e.height * i : e.height;
|
|
4041
4041
|
return {
|
|
4042
4042
|
width: u,
|
|
4043
|
-
height:
|
|
4043
|
+
height: c,
|
|
4044
4044
|
top: l,
|
|
4045
4045
|
right: a + u,
|
|
4046
|
-
bottom: l +
|
|
4046
|
+
bottom: l + c,
|
|
4047
4047
|
left: a
|
|
4048
4048
|
};
|
|
4049
4049
|
}
|
|
4050
4050
|
function Zg(e, t, n) {
|
|
4051
|
-
const { scaleX: r, scaleY: i, x: s, y: o } = t, a = e.left - s - (1 - r) * parseFloat(n), l = e.top - o - (1 - i) * parseFloat(n.slice(n.indexOf(" ") + 1)), u = r ? e.width / r : e.width,
|
|
4051
|
+
const { scaleX: r, scaleY: i, x: s, y: o } = t, a = e.left - s - (1 - r) * parseFloat(n), l = e.top - o - (1 - i) * parseFloat(n.slice(n.indexOf(" ") + 1)), u = r ? e.width / r : e.width, c = i ? e.height / i : e.height;
|
|
4052
4052
|
return {
|
|
4053
4053
|
width: u,
|
|
4054
|
-
height:
|
|
4054
|
+
height: c,
|
|
4055
4055
|
top: l,
|
|
4056
4056
|
right: a + u,
|
|
4057
|
-
bottom: l +
|
|
4057
|
+
bottom: l + c,
|
|
4058
4058
|
left: a
|
|
4059
4059
|
};
|
|
4060
4060
|
}
|
|
@@ -4125,17 +4125,17 @@ var _t = class extends kt {
|
|
|
4125
4125
|
} = t, u = tm(e, {
|
|
4126
4126
|
properties: ["transform", "translate", "scale", "width", "height"],
|
|
4127
4127
|
isValidTarget: (x) => (x !== e || La()) && x.contains(e)
|
|
4128
|
-
}),
|
|
4129
|
-
let { top:
|
|
4128
|
+
}), c = l(e);
|
|
4129
|
+
let { top: d, left: f, width: h, height: p } = c, m;
|
|
4130
4130
|
const b = Ot(e), w = bs(b), v = {
|
|
4131
4131
|
x: (n = w?.scaleX) != null ? n : 1,
|
|
4132
4132
|
y: (r = w?.scaleY) != null ? r : 1
|
|
4133
4133
|
}, g = nm(e, b);
|
|
4134
4134
|
u?.(), w && (m = Zg(
|
|
4135
|
-
|
|
4135
|
+
c,
|
|
4136
4136
|
w,
|
|
4137
4137
|
b.transformOrigin
|
|
4138
|
-
), (a || g) && (
|
|
4138
|
+
), (a || g) && (d = m.top, f = m.left, h = m.width, p = m.height));
|
|
4139
4139
|
const y = {
|
|
4140
4140
|
width: (i = m?.width) != null ? i : h,
|
|
4141
4141
|
height: (s = m?.height) != null ? s : p
|
|
@@ -4146,9 +4146,9 @@ var _t = class extends kt {
|
|
|
4146
4146
|
g,
|
|
4147
4147
|
b.transformOrigin
|
|
4148
4148
|
);
|
|
4149
|
-
|
|
4149
|
+
d = x.top, f = x.left, h = x.width, p = x.height, v.x = g.scaleX, v.y = g.scaleY;
|
|
4150
4150
|
}
|
|
4151
|
-
o && (a || (f *= o.scaleX, h *= o.scaleX,
|
|
4151
|
+
o && (a || (f *= o.scaleX, h *= o.scaleX, d *= o.scaleY, p *= o.scaleY), f += o.x, d += o.y), super(f, d, h, p), this.scale = v, this.intrinsicWidth = y.width, this.intrinsicHeight = y.height;
|
|
4152
4152
|
}
|
|
4153
4153
|
};
|
|
4154
4154
|
function nm(e, t) {
|
|
@@ -4159,8 +4159,8 @@ function nm(e, t) {
|
|
|
4159
4159
|
if (a.playState !== "running") continue;
|
|
4160
4160
|
const l = vs(a.effect) ? a.effect.getKeyframes() : [], u = l[l.length - 1];
|
|
4161
4161
|
if (!u) continue;
|
|
4162
|
-
const { transform:
|
|
4163
|
-
typeof
|
|
4162
|
+
const { transform: c, translate: d, scale: f } = u;
|
|
4163
|
+
typeof c == "string" && c && (r = c, o = !0), typeof d == "string" && d && (i = d, o = !0), typeof f == "string" && f && (s = f, o = !0);
|
|
4164
4164
|
}
|
|
4165
4165
|
return o ? bs({
|
|
4166
4166
|
transform: r ?? t.transform,
|
|
@@ -4277,11 +4277,11 @@ var Fa = ({
|
|
|
4277
4277
|
const s = r ? kt.from(r.current.boundingRectangle).corners : void 0, a = kt.from(
|
|
4278
4278
|
n.shape.boundingRectangle
|
|
4279
4279
|
).corners.reduce(
|
|
4280
|
-
(l, u,
|
|
4281
|
-
var
|
|
4280
|
+
(l, u, c) => {
|
|
4281
|
+
var d;
|
|
4282
4282
|
return l + at.distance(
|
|
4283
4283
|
at.from(u),
|
|
4284
|
-
(
|
|
4284
|
+
(d = s?.[c]) != null ? d : i.current
|
|
4285
4285
|
);
|
|
4286
4286
|
},
|
|
4287
4287
|
0
|
|
@@ -4316,15 +4316,15 @@ var Fa = ({
|
|
|
4316
4316
|
for (var i = 0, s = e[t >> 1], o = s && s.length; i < o; i++) t & 1 ? s[i].call(n) : r = s[i].call(n, r);
|
|
4317
4317
|
return r;
|
|
4318
4318
|
}, ft = (e, t, n, r, i, s) => {
|
|
4319
|
-
var o, a, l, u,
|
|
4319
|
+
var o, a, l, u, c, d = t & 7, f = !!(t & 8), h = !!(t & 16), p = d > 3 ? e.length + 1 : d ? f ? 1 : 2 : 0, m = $u[d + 5], b = d > 3 && (e[p - 1] = []), w = e[p] || (e[p] = []), v = d && (!h && !f && (i = i.prototype), d < 5 && (d > 3 || !h) && um(d < 4 ? i : { get [n]() {
|
|
4320
4320
|
return _e(this, s);
|
|
4321
4321
|
}, set [n](y) {
|
|
4322
4322
|
return Ze(this, s, y);
|
|
4323
4323
|
} }, n));
|
|
4324
|
-
|
|
4324
|
+
d ? h && d < 4 && Pl(s, (d > 2 ? "set " : d > 1 ? "get " : "") + n) : Pl(i, n);
|
|
4325
4325
|
for (var g = r.length - 1; g >= 0; g--)
|
|
4326
|
-
u = hm(
|
|
4327
|
-
return
|
|
4326
|
+
u = hm(d, n, l = {}, e[3], w), d && (u.static = f, u.private = h, c = u.access = { has: h ? (y) => pm(i, y) : (y) => n in y }, d ^ 3 && (c.get = h ? (y) => (d ^ 1 ? _e : un)(y, i, d ^ 4 ? s : v.get) : (y) => y[n]), d > 2 && (c.set = h ? (y, x) => Ze(y, i, x, d ^ 4 ? s : v.set) : (y, x) => y[n] = x)), a = (0, r[g])(d ? d < 4 ? h ? s : v[m] : d > 4 ? void 0 : { get: v.get, set: v.set } : i, u), l._ = 1, d ^ 4 || a === void 0 ? wr(a) && (d > 4 ? b.unshift(a) : d ? h ? s = a : v[m] = a : i = a) : typeof a != "object" || a === null ? er("Object expected") : (wr(o = a.get) && (v.get = o), wr(o = a.set) && (v.set = o), wr(o = a.init) && b.unshift(o));
|
|
4327
|
+
return d || gn(e, i), v && Ba(i, n, v), h ? d ^ 4 ? s : v : i;
|
|
4328
4328
|
}, Ga = (e, t, n) => t.has(e) || er("Cannot " + n), pm = (e, t) => Object(t) !== t ? er('Cannot use the "in" operator on this value') : e.has(t), _e = (e, t, n) => (Ga(e, t, "read from private field"), n ? n.call(e) : t.get(e)), Re = (e, t, n) => t.has(e) ? er("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), Ze = (e, t, n, r) => (Ga(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), un = (e, t, n) => (Ga(e, t, "access private method"), n), Ml = {
|
|
4329
4329
|
role: "button",
|
|
4330
4330
|
roleDescription: "draggable"
|
|
@@ -4369,7 +4369,7 @@ var _m = ["dragover", "dragmove"], km = class extends He {
|
|
|
4369
4369
|
screenReaderInstructions: o = vm,
|
|
4370
4370
|
debounce: a = 500
|
|
4371
4371
|
} = t ?? {}, l = n ? `${r}-${n}` : Oo(r), u = n ? `${i}-${n}` : Oo(i);
|
|
4372
|
-
let
|
|
4372
|
+
let c, d, f, h;
|
|
4373
4373
|
const p = (x = h) => {
|
|
4374
4374
|
!f || !x || f?.nodeValue !== x && (f.nodeValue = x);
|
|
4375
4375
|
}, m = () => Yi.schedule(p), b = $m(
|
|
@@ -4387,10 +4387,10 @@ var _m = ["dragover", "dragmove"], km = class extends He {
|
|
|
4387
4387
|
)
|
|
4388
4388
|
), v = () => {
|
|
4389
4389
|
let x = [];
|
|
4390
|
-
|
|
4390
|
+
c?.isConnected || (c = wm(
|
|
4391
4391
|
l,
|
|
4392
4392
|
o.draggable
|
|
4393
|
-
), x.push(
|
|
4393
|
+
), x.push(c)), d?.isConnected || (d = xm(u), f = document.createTextNode(""), d.appendChild(f), x.push(d)), x.length > 0 && document.body.append(...x);
|
|
4394
4394
|
}, g = /* @__PURE__ */ new Set();
|
|
4395
4395
|
function y() {
|
|
4396
4396
|
for (const x of g)
|
|
@@ -4402,7 +4402,7 @@ var _m = ["dragover", "dragmove"], km = class extends He {
|
|
|
4402
4402
|
for (const k of this.manager.registry.draggables.value) {
|
|
4403
4403
|
const S = (x = k.handle) != null ? x : k.element;
|
|
4404
4404
|
if (S) {
|
|
4405
|
-
(!
|
|
4405
|
+
(!c || !d) && g.add(v), (!bm(S) || La()) && !S.hasAttribute("tabindex") && g.add(() => S.setAttribute("tabindex", "0")), !S.hasAttribute("role") && S.tagName.toLowerCase() !== "button" && g.add(
|
|
4406
4406
|
() => S.setAttribute("role", Ml.role)
|
|
4407
4407
|
), S.hasAttribute("aria-roledescription") || g.add(
|
|
4408
4408
|
() => S.setAttribute(
|
|
@@ -4424,7 +4424,7 @@ var _m = ["dragover", "dragmove"], km = class extends He {
|
|
|
4424
4424
|
}
|
|
4425
4425
|
g.size > 0 && Yi.schedule(y);
|
|
4426
4426
|
}), this.destroy = () => {
|
|
4427
|
-
super.destroy(),
|
|
4427
|
+
super.destroy(), c?.remove(), d?.remove(), w.forEach((x) => x());
|
|
4428
4428
|
};
|
|
4429
4429
|
}
|
|
4430
4430
|
};
|
|
@@ -4705,13 +4705,13 @@ function Pm(e, t, n) {
|
|
|
4705
4705
|
if (a === "style") {
|
|
4706
4706
|
if (Dr(e) && Dr(t)) {
|
|
4707
4707
|
const u = e.style;
|
|
4708
|
-
for (const
|
|
4709
|
-
u.getPropertyValue(
|
|
4710
|
-
for (const
|
|
4711
|
-
if (Tm.includes(
|
|
4708
|
+
for (const c of Array.from(t.style))
|
|
4709
|
+
u.getPropertyValue(c) === "" && t.style.removeProperty(c);
|
|
4710
|
+
for (const c of Array.from(u)) {
|
|
4711
|
+
if (Tm.includes(c) || c.startsWith(qe))
|
|
4712
4712
|
continue;
|
|
4713
|
-
const
|
|
4714
|
-
t.style.setProperty(
|
|
4713
|
+
const d = u.getPropertyValue(c);
|
|
4714
|
+
t.style.setProperty(c, d);
|
|
4715
4715
|
}
|
|
4716
4716
|
}
|
|
4717
4717
|
} else l !== null ? t.setAttribute(a, l) : t.removeAttribute(a);
|
|
@@ -4768,10 +4768,10 @@ function Rm(e) {
|
|
|
4768
4768
|
v.style.width = `${g.getBoundingClientRect().width}px`;
|
|
4769
4769
|
}
|
|
4770
4770
|
}
|
|
4771
|
-
const u = (r = e.getTranslate()) != null ? r : { x: 0, y: 0 },
|
|
4771
|
+
const u = (r = e.getTranslate()) != null ? r : { x: 0, y: 0 }, c = e.left + o + l.x + u.x, d = e.top + a + l.y + u.y, f = i.width - e.widthOffset, h = i.height - e.heightOffset, p = e.frameTransform;
|
|
4772
4772
|
e.dragOperation.shape = new kt(
|
|
4773
|
-
|
|
4774
|
-
|
|
4773
|
+
c * p.scaleX + p.x,
|
|
4774
|
+
d * p.scaleY + p.y,
|
|
4775
4775
|
f * p.scaleX,
|
|
4776
4776
|
h * p.scaleY
|
|
4777
4777
|
);
|
|
@@ -4805,27 +4805,27 @@ function zm(e) {
|
|
|
4805
4805
|
(v) => "translate" in v
|
|
4806
4806
|
)) != null ? t : [];
|
|
4807
4807
|
l?.pause();
|
|
4808
|
-
const u = (n = e.placeholder) != null ? n : e.element,
|
|
4808
|
+
const u = (n = e.placeholder) != null ? n : e.element, c = {
|
|
4809
4809
|
frameTransform: Pu(e.feedbackElement, u) ? null : void 0
|
|
4810
|
-
},
|
|
4810
|
+
}, d = new _t(e.feedbackElement, c), f = (r = Nr(Ot(e.feedbackElement).translate)) != null ? r : e.translate, h = new _t(u, c), p = kt.delta(d, h, e.alignment), m = {
|
|
4811
4811
|
x: f.x - p.x,
|
|
4812
4812
|
y: f.y - p.y
|
|
4813
|
-
}, b = Math.round(
|
|
4813
|
+
}, b = Math.round(d.intrinsicHeight) !== Math.round(h.intrinsicHeight) ? {
|
|
4814
4814
|
minHeight: [
|
|
4815
|
-
`${
|
|
4815
|
+
`${d.intrinsicHeight}px`,
|
|
4816
4816
|
`${h.intrinsicHeight}px`
|
|
4817
4817
|
],
|
|
4818
4818
|
maxHeight: [
|
|
4819
|
-
`${
|
|
4819
|
+
`${d.intrinsicHeight}px`,
|
|
4820
4820
|
`${h.intrinsicHeight}px`
|
|
4821
4821
|
]
|
|
4822
|
-
} : {}, w = Math.round(
|
|
4822
|
+
} : {}, w = Math.round(d.intrinsicWidth) !== Math.round(h.intrinsicWidth) ? {
|
|
4823
4823
|
minWidth: [
|
|
4824
|
-
`${
|
|
4824
|
+
`${d.intrinsicWidth}px`,
|
|
4825
4825
|
`${h.intrinsicWidth}px`
|
|
4826
4826
|
],
|
|
4827
4827
|
maxWidth: [
|
|
4828
|
-
`${
|
|
4828
|
+
`${d.intrinsicWidth}px`,
|
|
4829
4829
|
`${h.intrinsicWidth}px`
|
|
4830
4830
|
]
|
|
4831
4831
|
} : {};
|
|
@@ -4873,7 +4873,7 @@ Ru = function(e) {
|
|
|
4873
4873
|
};
|
|
4874
4874
|
Lu = function() {
|
|
4875
4875
|
var e, t, n, r, i, s, o;
|
|
4876
|
-
const { state: a, manager: l, options: u } = this, { dragOperation:
|
|
4876
|
+
const { state: a, manager: l, options: u } = this, { dragOperation: c } = l, { position: d, source: f, status: h } = c;
|
|
4877
4877
|
if (h.idle) {
|
|
4878
4878
|
a.current = {}, a.initial = {};
|
|
4879
4879
|
return;
|
|
@@ -4915,7 +4915,7 @@ Lu = function() {
|
|
|
4915
4915
|
}
|
|
4916
4916
|
}
|
|
4917
4917
|
if (!v.transformOrigin) {
|
|
4918
|
-
const xe = pe(() =>
|
|
4918
|
+
const xe = pe(() => d.current), Le = D + ((r = V?.x) != null ? r : 0), et = B + ((i = V?.y) != null ? i : 0);
|
|
4919
4919
|
v.transformOrigin = {
|
|
4920
4920
|
x: (xe.x - Le * y.scaleX - y.x) / ($ * y.scaleX),
|
|
4921
4921
|
y: (xe.y - et * y.scaleY - y.y) / (E * y.scaleY)
|
|
@@ -4944,7 +4944,7 @@ Lu = function() {
|
|
|
4944
4944
|
top: B + te.y
|
|
4945
4945
|
};
|
|
4946
4946
|
g.setAttribute(xt, "true");
|
|
4947
|
-
const L = pe(() =>
|
|
4947
|
+
const L = pe(() => c.transform), re = (s = v.translate) != null ? s : { x: 0, y: 0 }, de = L.x * y.scaleX + re.x, Ge = L.y * y.scaleY + re.y, Yt = lu();
|
|
4948
4948
|
N.set(
|
|
4949
4949
|
{
|
|
4950
4950
|
width: $ - I,
|
|
@@ -4974,7 +4974,7 @@ Lu = function() {
|
|
|
4974
4974
|
heightOffset: ee,
|
|
4975
4975
|
delta: te,
|
|
4976
4976
|
styles: N,
|
|
4977
|
-
dragOperation:
|
|
4977
|
+
dragOperation: c,
|
|
4978
4978
|
getTranslate: () => a.current.translate,
|
|
4979
4979
|
getElementMutationObserver: () => wt,
|
|
4980
4980
|
getSavedCellWidths: () => At,
|
|
@@ -4982,7 +4982,7 @@ Lu = function() {
|
|
|
4982
4982
|
At = xe;
|
|
4983
4983
|
}
|
|
4984
4984
|
}), oi = new _t(g);
|
|
4985
|
-
pe(() =>
|
|
4985
|
+
pe(() => c.shape = oi);
|
|
4986
4986
|
const sr = it(g), Xt = (xe) => {
|
|
4987
4987
|
this.manager.actions.stop({ event: xe });
|
|
4988
4988
|
}, Zf = za(sr);
|
|
@@ -5013,7 +5013,7 @@ Lu = function() {
|
|
|
5013
5013
|
vn.style.width = (Le = At[ai]) != null ? Le : "";
|
|
5014
5014
|
}
|
|
5015
5015
|
f.status = "idle";
|
|
5016
|
-
const et = a.current.translate != null, Pt =
|
|
5016
|
+
const et = a.current.translate != null, Pt = c.status.dragging;
|
|
5017
5017
|
H && (!Pt && et || H.parentElement !== g.parentElement) && g.isConnected && H.replaceWith(g), H?.remove();
|
|
5018
5018
|
};
|
|
5019
5019
|
g === this.overlay ? setTimeout(xe, 0) : xe();
|
|
@@ -5021,14 +5021,14 @@ Lu = function() {
|
|
|
5021
5021
|
// Update transform on move
|
|
5022
5022
|
() => {
|
|
5023
5023
|
var xe, Le, et;
|
|
5024
|
-
const { transform: Pt, status: Es } =
|
|
5024
|
+
const { transform: Pt, status: Es } = c;
|
|
5025
5025
|
if (!(!Pt.x && !Pt.y && !a.current.translate) && Es.dragging) {
|
|
5026
5026
|
const ai = (xe = v.translate) != null ? xe : { x: 0, y: 0 }, vn = {
|
|
5027
5027
|
x: Pt.x / y.scaleX + ai.x,
|
|
5028
5028
|
y: Pt.y / y.scaleY + ai.y
|
|
5029
|
-
}, ul = a.current.translate, th = pe(() =>
|
|
5029
|
+
}, ul = a.current.translate, th = pe(() => c.modifiers), Cs = pe(() => {
|
|
5030
5030
|
var ar;
|
|
5031
|
-
return (ar =
|
|
5031
|
+
return (ar = c.shape) == null ? void 0 : ar.current;
|
|
5032
5032
|
}), or = u?.keyboardTransition, fl = le && !Zf && or !== null ? `${(Le = or?.duration) != null ? Le : 250}ms ${(et = or?.easing) != null ? et : "cubic-bezier(0.25, 1, 0.5, 1)"}` : "0ms linear";
|
|
5033
5033
|
if (N.set(
|
|
5034
5034
|
{
|
|
@@ -5038,20 +5038,20 @@ Lu = function() {
|
|
|
5038
5038
|
qe
|
|
5039
5039
|
), wt?.takeRecords(), Cs && Cs !== oi && ul && !th.length) {
|
|
5040
5040
|
const ar = at.delta(vn, ul);
|
|
5041
|
-
|
|
5041
|
+
c.shape = kt.from(
|
|
5042
5042
|
Cs.boundingRectangle
|
|
5043
5043
|
).translate(
|
|
5044
5044
|
ar.x * y.scaleX,
|
|
5045
5045
|
ar.y * y.scaleY
|
|
5046
5046
|
);
|
|
5047
5047
|
} else
|
|
5048
|
-
|
|
5048
|
+
c.shape = new _t(g);
|
|
5049
5049
|
a.current.translate = vn;
|
|
5050
5050
|
}
|
|
5051
5051
|
},
|
|
5052
5052
|
// Drop animation
|
|
5053
5053
|
function() {
|
|
5054
|
-
if (
|
|
5054
|
+
if (c.status.dropped) {
|
|
5055
5055
|
this.dispose(), f.status = "dropping";
|
|
5056
5056
|
const xe = m?.dropAnimation !== void 0 ? m.dropAnimation : dl.dropAnimation !== void 0 ? dl.dropAnimation : Jf;
|
|
5057
5057
|
let Le = a.current.translate;
|
|
@@ -5161,20 +5161,20 @@ var Bu, Ao, jr, Ya, Rt, Po, ei = class extends (Ao = Zr, Bu = [ge], Ao) {
|
|
|
5161
5161
|
const l = this.getScrollableElements();
|
|
5162
5162
|
if (!l)
|
|
5163
5163
|
return Ze(this, Rt, void 0), !1;
|
|
5164
|
-
const { position: u } = this.manager.dragOperation,
|
|
5165
|
-
if (
|
|
5166
|
-
const { by:
|
|
5167
|
-
x: zl(
|
|
5168
|
-
y: zl(
|
|
5164
|
+
const { position: u } = this.manager.dragOperation, c = u?.current;
|
|
5165
|
+
if (c) {
|
|
5166
|
+
const { by: d } = s ?? {}, f = d ? {
|
|
5167
|
+
x: zl(d.x),
|
|
5168
|
+
y: zl(d.y)
|
|
5169
5169
|
} : void 0, h = f ? void 0 : this.scrollIntentTracker.current;
|
|
5170
5170
|
if (h?.isLocked())
|
|
5171
5171
|
return !1;
|
|
5172
5172
|
for (const p of l) {
|
|
5173
|
-
const m = Ng(p,
|
|
5173
|
+
const m = Ng(p, d);
|
|
5174
5174
|
if (m.x || m.y) {
|
|
5175
5175
|
const { speed: b, direction: w } = Hg(
|
|
5176
5176
|
p,
|
|
5177
|
-
|
|
5177
|
+
c,
|
|
5178
5178
|
f,
|
|
5179
5179
|
o?.acceleration,
|
|
5180
5180
|
o?.threshold
|
|
@@ -5183,7 +5183,7 @@ var Bu, Ao, jr, Ya, Rt, Po, ei = class extends (Ao = Zr, Bu = [ge], Ao) {
|
|
|
5183
5183
|
for (const v of gd)
|
|
5184
5184
|
h[v].isLocked(w[v]) && (b[v] = 0, w[v] = 0);
|
|
5185
5185
|
if (w.x || w.y) {
|
|
5186
|
-
const { x: v, y: g } =
|
|
5186
|
+
const { x: v, y: g } = d ?? w, y = v * b.x, x = g * b.y;
|
|
5187
5187
|
if (y || x) {
|
|
5188
5188
|
const k = (a = _e(this, Rt)) == null ? void 0 : a.by;
|
|
5189
5189
|
if (this.autoScrolling && k && (k.x && !y || k.y && !x))
|
|
@@ -5279,14 +5279,14 @@ var jm = class {
|
|
|
5279
5279
|
};
|
|
5280
5280
|
if (r.scroll(void 0, u)) {
|
|
5281
5281
|
r.autoScrolling = !0;
|
|
5282
|
-
const
|
|
5282
|
+
const d = setInterval(
|
|
5283
5283
|
() => Gm.schedule(
|
|
5284
5284
|
() => r.scroll(void 0, u)
|
|
5285
5285
|
),
|
|
5286
5286
|
qm
|
|
5287
5287
|
);
|
|
5288
5288
|
return () => {
|
|
5289
|
-
clearInterval(
|
|
5289
|
+
clearInterval(d);
|
|
5290
5290
|
};
|
|
5291
5291
|
} else
|
|
5292
5292
|
r.autoScrolling = !1;
|
|
@@ -5605,13 +5605,13 @@ var Ro = Object.freeze({
|
|
|
5605
5605
|
x: l * a.scaleX + a.x,
|
|
5606
5606
|
y: u * a.scaleY + a.y
|
|
5607
5607
|
};
|
|
5608
|
-
const
|
|
5608
|
+
const c = this.activationConstraints(t, n, r);
|
|
5609
5609
|
t.sensor = this;
|
|
5610
|
-
const
|
|
5611
|
-
|
|
5610
|
+
const d = new vg(
|
|
5611
|
+
c,
|
|
5612
5612
|
(m) => this.handleStart(n, m)
|
|
5613
5613
|
);
|
|
5614
|
-
|
|
5614
|
+
d.signal.onabort = () => this.handleCancel(t), d.onEvent(t), this.controller = d;
|
|
5615
5615
|
const f = xo(), h = this.listeners.bind(f, [
|
|
5616
5616
|
{
|
|
5617
5617
|
type: "pointermove",
|
|
@@ -5775,14 +5775,14 @@ var Rn = {
|
|
|
5775
5775
|
var a, l;
|
|
5776
5776
|
const { manager: u } = this;
|
|
5777
5777
|
if (!u) return;
|
|
5778
|
-
const
|
|
5778
|
+
const d = ((l = (a = this.sensors) == null ? void 0 : a.map(Mr)) != null ? l : [
|
|
5779
5779
|
...u.sensors
|
|
5780
5780
|
]).map((f) => {
|
|
5781
5781
|
const h = f instanceof Wn ? f : u.registry.register(f.plugin), p = f instanceof Wn ? void 0 : f.options;
|
|
5782
5782
|
return h.bind(this, p);
|
|
5783
5783
|
});
|
|
5784
5784
|
return function() {
|
|
5785
|
-
|
|
5785
|
+
d.forEach((h) => h());
|
|
5786
5786
|
};
|
|
5787
5787
|
}
|
|
5788
5788
|
]
|
|
@@ -5801,13 +5801,13 @@ var Uu, Hu, zo, Bt, Qa, Fs, Yu, Xu, Pr, Ja, _s = class extends (zo = St, Hu = [g
|
|
|
5801
5801
|
constructor(e, t) {
|
|
5802
5802
|
var n = e, { element: r, effects: i = () => [] } = n, s = ku(n, ["element", "effects"]);
|
|
5803
5803
|
const { collisionDetector: o = bu } = s, a = (u) => {
|
|
5804
|
-
const { manager:
|
|
5805
|
-
if (!
|
|
5804
|
+
const { manager: c, element: d } = this;
|
|
5805
|
+
if (!d || u === null) {
|
|
5806
5806
|
this.shape = void 0;
|
|
5807
5807
|
return;
|
|
5808
5808
|
}
|
|
5809
|
-
if (!
|
|
5810
|
-
const f = new _t(
|
|
5809
|
+
if (!c) return;
|
|
5810
|
+
const f = new _t(d), h = pe(() => this.shape);
|
|
5811
5811
|
return f && h?.equals(f) ? h : (this.shape = f, f);
|
|
5812
5812
|
}, l = Kn(!1);
|
|
5813
5813
|
super(
|
|
@@ -5816,20 +5816,20 @@ var Uu, Hu, zo, Bt, Qa, Fs, Yu, Xu, Pr, Ja, _s = class extends (zo = St, Hu = [g
|
|
|
5816
5816
|
effects: () => [
|
|
5817
5817
|
...i(),
|
|
5818
5818
|
() => {
|
|
5819
|
-
const { element: u, manager:
|
|
5820
|
-
if (!
|
|
5821
|
-
const { dragOperation:
|
|
5822
|
-
l.value = !!(f &&
|
|
5819
|
+
const { element: u, manager: c } = this;
|
|
5820
|
+
if (!c) return;
|
|
5821
|
+
const { dragOperation: d } = c, { source: f } = d;
|
|
5822
|
+
l.value = !!(f && d.status.initialized && u && !this.disabled && this.accepts(f));
|
|
5823
5823
|
},
|
|
5824
5824
|
() => {
|
|
5825
5825
|
const { element: u } = this;
|
|
5826
5826
|
if (l.value && u) {
|
|
5827
|
-
const
|
|
5827
|
+
const c = new Lg(
|
|
5828
5828
|
u,
|
|
5829
5829
|
a
|
|
5830
5830
|
);
|
|
5831
5831
|
return () => {
|
|
5832
|
-
|
|
5832
|
+
c.disconnect(), this.shape = void 0;
|
|
5833
5833
|
};
|
|
5834
5834
|
}
|
|
5835
5835
|
},
|
|
@@ -5886,8 +5886,8 @@ function Zu(e, t) {
|
|
|
5886
5886
|
var i;
|
|
5887
5887
|
let s = !1, o = !1;
|
|
5888
5888
|
for (const a of n.current) {
|
|
5889
|
-
const [l] = a, u = pe(() => a[1]),
|
|
5890
|
-
u !==
|
|
5889
|
+
const [l] = a, u = pe(() => a[1]), c = e[l];
|
|
5890
|
+
u !== c && (s = !0, n.current.set(l, c), o = (i = t?.(l, u, c)) != null ? i : !1);
|
|
5891
5891
|
}
|
|
5892
5892
|
s && (o ? queueMicrotask(() => ip(r)) : r());
|
|
5893
5893
|
});
|
|
@@ -5985,11 +5985,11 @@ function uv(e) {
|
|
|
5985
5985
|
"onDragOver",
|
|
5986
5986
|
"onDragEnd"
|
|
5987
5987
|
]);
|
|
5988
|
-
const
|
|
5989
|
-
plugins:
|
|
5988
|
+
const c = J(null), {
|
|
5989
|
+
plugins: d,
|
|
5990
5990
|
modifiers: f,
|
|
5991
5991
|
sensors: h
|
|
5992
|
-
} = u, p = yt(
|
|
5992
|
+
} = u, p = yt(d, Rn.plugins), m = yt(h, Rn.sensors), b = yt(
|
|
5993
5993
|
f,
|
|
5994
5994
|
Rn.modifiers
|
|
5995
5995
|
), w = bn(i), v = bn(s), g = bn(a), y = bn(o), x = bn(l), k = bn(r), S = fv(() => {
|
|
@@ -5997,8 +5997,8 @@ function uv(e) {
|
|
|
5997
5997
|
return (C = u.manager) != null ? C : new qu(u);
|
|
5998
5998
|
});
|
|
5999
5999
|
return ye(() => {
|
|
6000
|
-
if (!
|
|
6001
|
-
const { renderer: C, trackRendering: $ } =
|
|
6000
|
+
if (!c.current) throw new Error("Renderer not found");
|
|
6001
|
+
const { renderer: C, trackRendering: $ } = c.current, { monitor: E } = S;
|
|
6002
6002
|
S.renderer = C;
|
|
6003
6003
|
const B = [
|
|
6004
6004
|
E.addEventListener("beforedragstart", (D) => {
|
|
@@ -6046,7 +6046,7 @@ function uv(e) {
|
|
|
6046
6046
|
() => S && (S.modifiers = b),
|
|
6047
6047
|
...Bs
|
|
6048
6048
|
), /* @__PURE__ */ K(ef.Provider, { value: S, children: [
|
|
6049
|
-
/* @__PURE__ */ _(dv, { ref:
|
|
6049
|
+
/* @__PURE__ */ _(dv, { ref: c, children: n }),
|
|
6050
6050
|
n
|
|
6051
6051
|
] });
|
|
6052
6052
|
}
|
|
@@ -6074,8 +6074,8 @@ var pv = Object.create, nf = Object.defineProperty, gv = Object.getOwnPropertyDe
|
|
|
6074
6074
|
for (var i = 0, s = e[t >> 1], o = s && s.length; i < o; i++) s[i].call(n);
|
|
6075
6075
|
return r;
|
|
6076
6076
|
}, af = (e, t, n, r, i, s) => {
|
|
6077
|
-
for (var o, a, l, u,
|
|
6078
|
-
l = yv(
|
|
6077
|
+
for (var o, a, l, u, c = t & 7, d = !1, f = !1, h = 2, p = sf[c + 5], m = e[h] || (e[h] = []), b = (i = i.prototype, gv(i, n)), w = r.length - 1; w >= 0; w--)
|
|
6078
|
+
l = yv(c, n, a = {}, e[3], m), l.static = d, l.private = f, u = l.access = { has: (v) => n in v }, u.get = (v) => v[n], o = (0, r[w])(b[p], l), a._ = 1, of(o) && (b[p] = o);
|
|
6079
6079
|
return b && nf(i, n, b), i;
|
|
6080
6080
|
}, lf = (e, t, n) => t.has(e) || ks("Cannot " + n), xv = (e, t, n) => (lf(e, t, "read from private field"), t.get(e)), _v = (e, t, n) => t.has(e) ? ks("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), kv = (e, t, n, r) => (lf(e, t, "write to private field"), t.set(e, n), n), ln = class Wo {
|
|
6081
6081
|
/**
|
|
@@ -6202,15 +6202,15 @@ var $v = ({
|
|
|
6202
6202
|
};
|
|
6203
6203
|
function Tv(e) {
|
|
6204
6204
|
const { collisionDetector: t, data: n, disabled: r, element: i, id: s, accept: o, type: a } = e, l = tf(
|
|
6205
|
-
(
|
|
6205
|
+
(c) => new _s(
|
|
6206
6206
|
av(ov({}, e), {
|
|
6207
6207
|
register: !1,
|
|
6208
6208
|
element: Ln(i)
|
|
6209
6209
|
}),
|
|
6210
|
-
|
|
6210
|
+
c
|
|
6211
6211
|
)
|
|
6212
6212
|
), u = Zu(l);
|
|
6213
|
-
return Ee(s, () => l.id = s), Mi(i, (
|
|
6213
|
+
return Ee(s, () => l.id = s), Mi(i, (c) => l.element = c), Ee(
|
|
6214
6214
|
o,
|
|
6215
6215
|
() => l.accept = o,
|
|
6216
6216
|
void 0,
|
|
@@ -6224,9 +6224,9 @@ function Tv(e) {
|
|
|
6224
6224
|
return u.isDropTarget;
|
|
6225
6225
|
},
|
|
6226
6226
|
ref: he(
|
|
6227
|
-
(
|
|
6228
|
-
var
|
|
6229
|
-
!
|
|
6227
|
+
(c) => {
|
|
6228
|
+
var d, f;
|
|
6229
|
+
!c && ((d = l.element) != null && d.isConnected) && !((f = l.manager) != null && f.dragOperation.status.idle) || (l.element = c ?? void 0);
|
|
6230
6230
|
},
|
|
6231
6231
|
[l]
|
|
6232
6232
|
)
|
|
@@ -6302,20 +6302,20 @@ function Bo({
|
|
|
6302
6302
|
l.current || o === void 0 || (a(void 0), o !== e && r(o));
|
|
6303
6303
|
};
|
|
6304
6304
|
pf(o !== void 0 && o !== e, () => (u(), !0));
|
|
6305
|
-
const
|
|
6305
|
+
const c = () => {
|
|
6306
6306
|
l.current = !1, a(e);
|
|
6307
6307
|
};
|
|
6308
6308
|
if (o === void 0) {
|
|
6309
|
-
const
|
|
6309
|
+
const d = e === "", f = d && i;
|
|
6310
6310
|
return /* @__PURE__ */ _(
|
|
6311
6311
|
ze,
|
|
6312
6312
|
{
|
|
6313
6313
|
component: "button",
|
|
6314
6314
|
type: "button",
|
|
6315
6315
|
className: f ? "builder-affordance" : void 0,
|
|
6316
|
-
onClick:
|
|
6316
|
+
onClick: c,
|
|
6317
6317
|
onKeyDown: (h) => {
|
|
6318
|
-
h.key !== "Enter" && h.key !== " " || (h.preventDefault(),
|
|
6318
|
+
h.key !== "Enter" && h.key !== " " || (h.preventDefault(), c());
|
|
6319
6319
|
},
|
|
6320
6320
|
sx: [
|
|
6321
6321
|
{
|
|
@@ -6327,14 +6327,14 @@ function Bo({
|
|
|
6327
6327
|
maxWidth: "100%",
|
|
6328
6328
|
// An empty slot says what it is for, faintly; a tile's
|
|
6329
6329
|
// own slot shows only while that tile is hovered.
|
|
6330
|
-
...
|
|
6330
|
+
...d && {
|
|
6331
6331
|
fontStyle: "italic",
|
|
6332
6332
|
opacity: f ? 0 : 0.6
|
|
6333
6333
|
}
|
|
6334
6334
|
},
|
|
6335
6335
|
ff(s)
|
|
6336
6336
|
],
|
|
6337
|
-
children:
|
|
6337
|
+
children: d ? t : e
|
|
6338
6338
|
}
|
|
6339
6339
|
);
|
|
6340
6340
|
}
|
|
@@ -6346,10 +6346,10 @@ function Bo({
|
|
|
6346
6346
|
value: o,
|
|
6347
6347
|
placeholder: t,
|
|
6348
6348
|
inputProps: { "aria-label": n },
|
|
6349
|
-
onFocus: (
|
|
6350
|
-
onChange: (
|
|
6351
|
-
onKeyDown: (
|
|
6352
|
-
|
|
6349
|
+
onFocus: (d) => d.target.select(),
|
|
6350
|
+
onChange: (d) => a(d.target.value),
|
|
6351
|
+
onKeyDown: (d) => {
|
|
6352
|
+
d.key === "Enter" && !d.nativeEvent.isComposing ? u() : d.key === "Escape" && (l.current = !0, a(void 0));
|
|
6353
6353
|
},
|
|
6354
6354
|
onBlur: u,
|
|
6355
6355
|
sx: { font: "inherit", color: "inherit", p: 0, "& input": { p: 0 } }
|
|
@@ -6416,12 +6416,12 @@ var Dv = Object.create, vf = Object.defineProperty, Av = Object.defineProperties
|
|
|
6416
6416
|
for (var i = 0, s = e[t >> 1], o = s && s.length; i < o; i++) t & 1 ? s[i].call(n) : r = s[i].call(n, r);
|
|
6417
6417
|
return r;
|
|
6418
6418
|
}, xf = (e, t, n, r, i, s) => {
|
|
6419
|
-
for (var o, a, l, u,
|
|
6419
|
+
for (var o, a, l, u, c, d = t & 7, f = !1, h = !1, p = e.length + 1, m = wf[d + 5], b = e[p - 1] = [], w = e[p] || (e[p] = []), v = (i = i.prototype, Pv({ get [n]() {
|
|
6420
6420
|
return $r(this, s);
|
|
6421
6421
|
}, set [n](y) {
|
|
6422
6422
|
return an(this, s, y);
|
|
6423
6423
|
} }, n)), g = r.length - 1; g >= 0; g--)
|
|
6424
|
-
u = zv(
|
|
6424
|
+
u = zv(d, n, l = {}, e[3], w), u.static = f, u.private = h, c = u.access = { has: (y) => n in y }, c.get = (y) => y[n], c.set = (y, x) => y[n] = x, a = (0, r[g])({ get: v.get, set: v.set }, u), l._ = 1, a === void 0 ? kr(a) && (v[m] = a) : typeof a != "object" || a === null ? ni("Object expected") : (kr(o = a.get) && (v.get = o), kr(o = a.set) && (v.set = o), kr(o = a.init) && b.unshift(o));
|
|
6425
6425
|
return v && vf(i, n, v), i;
|
|
6426
6426
|
}, _f = (e, t, n) => t.has(e) || ni("Cannot " + n), $r = (e, t, n) => (_f(e, t, "read from private field"), t.get(e)), cr = (e, t, n) => t.has(e) ? ni("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), an = (e, t, n, r) => (_f(e, t, "write to private field"), t.set(e, n), n);
|
|
6427
6427
|
function cn(e) {
|
|
@@ -6449,17 +6449,17 @@ var gi = 10, Fv = class extends He {
|
|
|
6449
6449
|
const { actions: o, collisionObserver: a, registry: l } = i, { by: u } = r;
|
|
6450
6450
|
if (!u)
|
|
6451
6451
|
return;
|
|
6452
|
-
const
|
|
6452
|
+
const c = Bv(u), { source: d, target: f } = s, { center: h } = s.shape.current, p = [], m = [];
|
|
6453
6453
|
Ie(() => {
|
|
6454
6454
|
for (const x of l.droppables) {
|
|
6455
6455
|
const { id: k } = x;
|
|
6456
|
-
if (!x.accepts(
|
|
6456
|
+
if (!x.accepts(d) || k === f?.id && cn(x) || !x.element)
|
|
6457
6457
|
continue;
|
|
6458
6458
|
let S = x.shape;
|
|
6459
6459
|
const C = new _t(x.element, {
|
|
6460
6460
|
getBoundingClientRect: ($) => Lr($, void 0, 0.2)
|
|
6461
6461
|
});
|
|
6462
|
-
!C.height || !C.width || (
|
|
6462
|
+
!C.height || !C.width || (c == "down" && h.y + gi < C.center.y || c == "up" && h.y - gi > C.center.y || c == "left" && h.x - gi > C.center.x || c == "right" && h.x + gi < C.center.x) && (p.push(x), x.shape = C, m.push(() => x.shape = S));
|
|
6463
6463
|
}
|
|
6464
6464
|
}), r.preventDefault(), a.disable();
|
|
6465
6465
|
const b = a.computeCollisions(
|
|
@@ -6470,7 +6470,7 @@ var gi = 10, Fv = class extends He {
|
|
|
6470
6470
|
const [w] = b;
|
|
6471
6471
|
if (!w)
|
|
6472
6472
|
return;
|
|
6473
|
-
const { id: v } = w, { index: g, group: y } =
|
|
6473
|
+
const { id: v } = w, { index: g, group: y } = d.sortable;
|
|
6474
6474
|
o.setDropTarget(v).then(() => {
|
|
6475
6475
|
const { source: x, target: k, shape: S } = s;
|
|
6476
6476
|
if (!x || !cn(x) || !S)
|
|
@@ -6557,11 +6557,11 @@ function Hv(e, t, n) {
|
|
|
6557
6557
|
return n(e, g, y);
|
|
6558
6558
|
}
|
|
6559
6559
|
const u = Object.entries(e);
|
|
6560
|
-
let
|
|
6560
|
+
let c = -1, d, f = -1, h;
|
|
6561
6561
|
for (const [g, y] of u)
|
|
6562
|
-
if (
|
|
6562
|
+
if (c === -1 && (c = y.findIndex((x) => l(x, s.id)), c !== -1 && (d = g)), f === -1 && (f = y.findIndex((x) => l(x, o.id)), f !== -1 && (h = g)), c !== -1 && f !== -1)
|
|
6563
6563
|
break;
|
|
6564
|
-
if (
|
|
6564
|
+
if (c === -1 && qs(s)) {
|
|
6565
6565
|
const g = s.initialGroup == null ? void 0 : mi(e, s.initialGroup), y = s.initialIndex, x = s.group == null ? void 0 : mi(e, s.group), k = s.index;
|
|
6566
6566
|
if (g == null || x == null || g === x && y === k)
|
|
6567
6567
|
return "preventDefault" in t && t.preventDefault(), e;
|
|
@@ -6591,25 +6591,25 @@ function Hv(e, t, n) {
|
|
|
6591
6591
|
h = g, f = y;
|
|
6592
6592
|
}
|
|
6593
6593
|
}
|
|
6594
|
-
if (
|
|
6595
|
-
if (
|
|
6596
|
-
const g = s.group == null ? void 0 : mi(e, s.group), y = s.group != null && g !==
|
|
6594
|
+
if (d == null || h == null || d === h && c === f) {
|
|
6595
|
+
if (d != null && d === h && c === f && qs(s)) {
|
|
6596
|
+
const g = s.group == null ? void 0 : mi(e, s.group), y = s.group != null && g !== d, x = s.index !== c;
|
|
6597
6597
|
if (y || x) {
|
|
6598
|
-
const k = s.group == null ?
|
|
6598
|
+
const k = s.group == null ? d : g;
|
|
6599
6599
|
if (k != null) {
|
|
6600
|
-
if (
|
|
6600
|
+
if (d === k)
|
|
6601
6601
|
return xn(wn({}, e), {
|
|
6602
|
-
[
|
|
6603
|
-
e[
|
|
6604
|
-
|
|
6602
|
+
[d]: n(
|
|
6603
|
+
e[d],
|
|
6604
|
+
c,
|
|
6605
6605
|
s.index
|
|
6606
6606
|
)
|
|
6607
6607
|
});
|
|
6608
|
-
const S = e[
|
|
6608
|
+
const S = e[d][c];
|
|
6609
6609
|
return xn(wn({}, e), {
|
|
6610
|
-
[
|
|
6611
|
-
...e[
|
|
6612
|
-
...e[
|
|
6610
|
+
[d]: [
|
|
6611
|
+
...e[d].slice(0, c),
|
|
6612
|
+
...e[d].slice(c + 1)
|
|
6613
6613
|
],
|
|
6614
6614
|
[k]: [
|
|
6615
6615
|
...e[k].slice(0, s.index),
|
|
@@ -6622,15 +6622,15 @@ function Hv(e, t, n) {
|
|
|
6622
6622
|
}
|
|
6623
6623
|
return "preventDefault" in t && t.preventDefault(), e;
|
|
6624
6624
|
}
|
|
6625
|
-
if (
|
|
6625
|
+
if (d === h)
|
|
6626
6626
|
return xn(wn({}, e), {
|
|
6627
|
-
[
|
|
6627
|
+
[d]: n(e[d], c, f)
|
|
6628
6628
|
});
|
|
6629
|
-
const w = o.shape && Math.round(m.y) > Math.round(o.shape.center.y) ? 1 : 0, v = e[
|
|
6629
|
+
const w = o.shape && Math.round(m.y) > Math.round(o.shape.center.y) ? 1 : 0, v = e[d][c];
|
|
6630
6630
|
return xn(wn({}, e), {
|
|
6631
|
-
[
|
|
6632
|
-
...e[
|
|
6633
|
-
...e[
|
|
6631
|
+
[d]: [
|
|
6632
|
+
...e[d].slice(0, c),
|
|
6633
|
+
...e[d].slice(c + 1)
|
|
6634
6634
|
],
|
|
6635
6635
|
[h]: [
|
|
6636
6636
|
...e[h].slice(0, f + w),
|
|
@@ -6678,17 +6678,17 @@ var Ul = "__default__", Xv = class extends He {
|
|
|
6678
6678
|
const { dragOperation: s } = i, { source: o, target: a } = s;
|
|
6679
6679
|
if (!cn(o) || !cn(a) || o.sortable === a.sortable)
|
|
6680
6680
|
return;
|
|
6681
|
-
const l = t(), u = Kl(l),
|
|
6682
|
-
!
|
|
6681
|
+
const l = t(), u = Kl(l), c = o.sortable.group === a.sortable.group, d = l.get(o.sortable.group), f = c ? d : l.get(a.sortable.group);
|
|
6682
|
+
!d || !f || queueMicrotask(() => {
|
|
6683
6683
|
r.defaultPrevented || i.renderer.rendering.then(() => {
|
|
6684
6684
|
var h, p;
|
|
6685
6685
|
const m = t();
|
|
6686
6686
|
if (Vl(u, l, m))
|
|
6687
6687
|
return;
|
|
6688
6688
|
const b = o.sortable.element, w = a.sortable.element;
|
|
6689
|
-
if (!w || !b || !
|
|
6689
|
+
if (!w || !b || !c && a.id === o.sortable.group)
|
|
6690
6690
|
return;
|
|
6691
|
-
const v = vi(
|
|
6691
|
+
const v = vi(d), g = c ? v : vi(f), y = (h = o.sortable.group) != null ? h : Ul, x = (p = a.sortable.group) != null ? p : Ul, k = {
|
|
6692
6692
|
[y]: v,
|
|
6693
6693
|
[x]: g
|
|
6694
6694
|
}, S = Yv(k, r);
|
|
@@ -6697,7 +6697,7 @@ var Ul = "__default__", Xv = class extends He {
|
|
|
6697
6697
|
i.collisionObserver.disable(), Hl(b, C, w, $), Ie(() => {
|
|
6698
6698
|
for (const [E, B] of S[y].entries())
|
|
6699
6699
|
B.index = E;
|
|
6700
|
-
if (!
|
|
6700
|
+
if (!c)
|
|
6701
6701
|
for (const [E, B] of S[x].entries())
|
|
6702
6702
|
B.group = a.sortable.group, B.index = E;
|
|
6703
6703
|
}), i.actions.setDropTarget(o.id).then(() => i.collisionObserver.enable());
|
|
@@ -6713,13 +6713,13 @@ var Ul = "__default__", Xv = class extends He {
|
|
|
6713
6713
|
o.sortable.initialGroup
|
|
6714
6714
|
);
|
|
6715
6715
|
u && i.renderer.rendering.then(() => {
|
|
6716
|
-
const
|
|
6717
|
-
if (Vl(l, a,
|
|
6716
|
+
const c = t();
|
|
6717
|
+
if (Vl(l, a, c))
|
|
6718
6718
|
return;
|
|
6719
|
-
const
|
|
6719
|
+
const d = vi(u), f = vi(
|
|
6720
6720
|
u,
|
|
6721
6721
|
Qv
|
|
6722
|
-
), h = o.sortable.element, p = f.indexOf(o.sortable), m =
|
|
6722
|
+
), h = o.sortable.element, p = f.indexOf(o.sortable), m = d[p], b = m?.element;
|
|
6723
6723
|
!m || !b || !h || (Hl(h, m.index, b, o.index), Ie(() => {
|
|
6724
6724
|
for (const w of a.values()) {
|
|
6725
6725
|
const v = Array.from(w).values();
|
|
@@ -6793,8 +6793,8 @@ var $s = class {
|
|
|
6793
6793
|
sensors: a,
|
|
6794
6794
|
type: l,
|
|
6795
6795
|
transition: u = kf,
|
|
6796
|
-
plugins:
|
|
6797
|
-
} = n,
|
|
6796
|
+
plugins: c
|
|
6797
|
+
} = n, d = Lv(n, [
|
|
6798
6798
|
"effects",
|
|
6799
6799
|
"disabled",
|
|
6800
6800
|
"group",
|
|
@@ -6804,13 +6804,13 @@ var $s = class {
|
|
|
6804
6804
|
"transition",
|
|
6805
6805
|
"plugins"
|
|
6806
6806
|
]);
|
|
6807
|
-
const f = yt(
|
|
6807
|
+
const f = yt(c, Yl), h = Xl(i);
|
|
6808
6808
|
this.droppable = new rl(
|
|
6809
|
-
Gs(js({},
|
|
6809
|
+
Gs(js({}, d), { disabled: h.droppable }),
|
|
6810
6810
|
t,
|
|
6811
6811
|
this
|
|
6812
6812
|
), this.draggable = new Of(
|
|
6813
|
-
Gs(js({},
|
|
6813
|
+
Gs(js({}, d), {
|
|
6814
6814
|
disabled: h.draggable,
|
|
6815
6815
|
plugins: f,
|
|
6816
6816
|
effects: () => [
|
|
@@ -6842,7 +6842,7 @@ var $s = class {
|
|
|
6842
6842
|
}),
|
|
6843
6843
|
t,
|
|
6844
6844
|
this
|
|
6845
|
-
), an(this, In,
|
|
6845
|
+
), an(this, In, d.element), this.manager = t, this.index = o, an(this, Or, o), this.group = s, an(this, Sr, s), this.type = l, this.transition = u;
|
|
6846
6846
|
}
|
|
6847
6847
|
get initialIndex() {
|
|
6848
6848
|
var e, t;
|
|
@@ -6861,8 +6861,8 @@ var $s = class {
|
|
|
6861
6861
|
const { element: i } = this;
|
|
6862
6862
|
if (!i)
|
|
6863
6863
|
return;
|
|
6864
|
-
for (const
|
|
6865
|
-
"transitionProperty" in
|
|
6864
|
+
for (const c of i.getAnimations())
|
|
6865
|
+
"transitionProperty" in c && (c.transitionProperty === "transform" || c.transitionProperty === "translate" || c.transitionProperty === "scale") && c.cancel();
|
|
6866
6866
|
const s = this.refreshShape();
|
|
6867
6867
|
if (!s)
|
|
6868
6868
|
return;
|
|
@@ -6871,7 +6871,7 @@ var $s = class {
|
|
|
6871
6871
|
y: n.boundingRectangle.top - s.boundingRectangle.top
|
|
6872
6872
|
}, { translate: a } = Ot(i), l = Al(i, a, !1), u = Al(i, a);
|
|
6873
6873
|
if (o.x || o.y) {
|
|
6874
|
-
const
|
|
6874
|
+
const c = za(it(i)) ? Gs(js({}, t), { duration: 0 }) : t;
|
|
6875
6875
|
yu({
|
|
6876
6876
|
element: i,
|
|
6877
6877
|
keyframes: {
|
|
@@ -6880,7 +6880,7 @@ var $s = class {
|
|
|
6880
6880
|
`${u.x}px ${u.y}px ${u.z}`
|
|
6881
6881
|
]
|
|
6882
6882
|
},
|
|
6883
|
-
options:
|
|
6883
|
+
options: c
|
|
6884
6884
|
}).then(() => {
|
|
6885
6885
|
e.dragOperation.status.dragging || (this.droppable.shape = void 0);
|
|
6886
6886
|
});
|
|
@@ -7064,8 +7064,8 @@ function sy(e) {
|
|
|
7064
7064
|
handle: a,
|
|
7065
7065
|
index: l,
|
|
7066
7066
|
group: u,
|
|
7067
|
-
disabled:
|
|
7068
|
-
modifiers:
|
|
7067
|
+
disabled: c,
|
|
7068
|
+
modifiers: d,
|
|
7069
7069
|
sensors: f,
|
|
7070
7070
|
target: h,
|
|
7071
7071
|
type: p,
|
|
@@ -7097,8 +7097,8 @@ function sy(e) {
|
|
|
7097
7097
|
},
|
|
7098
7098
|
nv
|
|
7099
7099
|
), Mi(a, (g) => w.handle = g), Mi(o, (g) => w.element = g), Mi(h, (g) => w.target = g), Ee(
|
|
7100
|
-
|
|
7101
|
-
() => w.disabled =
|
|
7100
|
+
c,
|
|
7101
|
+
() => w.disabled = c ?? !1,
|
|
7102
7102
|
void 0,
|
|
7103
7103
|
pt
|
|
7104
7104
|
), Ee(
|
|
@@ -7123,8 +7123,8 @@ function sy(e) {
|
|
|
7123
7123
|
void 0,
|
|
7124
7124
|
pt
|
|
7125
7125
|
), Ee(
|
|
7126
|
-
|
|
7127
|
-
() => w.modifiers =
|
|
7126
|
+
d,
|
|
7127
|
+
() => w.modifiers = d,
|
|
7128
7128
|
void 0,
|
|
7129
7129
|
pt
|
|
7130
7130
|
), Ee(
|
|
@@ -7450,11 +7450,11 @@ function Ko(e, t) {
|
|
|
7450
7450
|
if (!n) return;
|
|
7451
7451
|
const r = [], i = [];
|
|
7452
7452
|
for (const u of qr(t, Te.queryStatement)) {
|
|
7453
|
-
const
|
|
7454
|
-
|
|
7455
|
-
const
|
|
7456
|
-
if (
|
|
7457
|
-
const f = Pf(e,
|
|
7453
|
+
const c = e.positioned(u);
|
|
7454
|
+
c && r.push(c);
|
|
7455
|
+
const d = Me(u, "whereStatement");
|
|
7456
|
+
if (d && Te.whereStatement(d)) {
|
|
7457
|
+
const f = Pf(e, d);
|
|
7458
7458
|
f && i.push(f);
|
|
7459
7459
|
}
|
|
7460
7460
|
}
|
|
@@ -7516,8 +7516,8 @@ function by(e, t) {
|
|
|
7516
7516
|
fromSpan: f
|
|
7517
7517
|
} : { kind: "unsupported", why: "an unreadable refinement" };
|
|
7518
7518
|
}
|
|
7519
|
-
const u = e.text.slice(l.start, l.end),
|
|
7520
|
-
return
|
|
7519
|
+
const u = e.text.slice(l.start, l.end), c = Me(o, "queryProperties"), d = c && Ko(e, c);
|
|
7520
|
+
return d ? { kind: "reference", from: u, fromSpan: l, refinement: d } : { kind: "reference", from: u, fromSpan: l };
|
|
7521
7521
|
}
|
|
7522
7522
|
return { kind: "unsupported", why: "a parenthesized expression" };
|
|
7523
7523
|
}
|
|
@@ -7528,9 +7528,9 @@ function wy(e, t) {
|
|
|
7528
7528
|
if (!i || !s) continue;
|
|
7529
7529
|
const o = Ht(s, "exploreQueryDef").filter(Te.exploreQueryDef), a = e.terminal(Me(r, "VIEW"));
|
|
7530
7530
|
for (const l of o) {
|
|
7531
|
-
const u = e.span(l),
|
|
7532
|
-
!u || !
|
|
7533
|
-
name:
|
|
7531
|
+
const u = e.span(l), c = Me(l, "exploreQueryNameDef"), d = e.text_(c), f = Me(l, "vExpr");
|
|
7532
|
+
!u || !d || !f || n.push({
|
|
7533
|
+
name: d,
|
|
7534
7534
|
span: u,
|
|
7535
7535
|
line: e.line(u.start),
|
|
7536
7536
|
statement: i,
|
|
@@ -7549,10 +7549,10 @@ function xy(e, t) {
|
|
|
7549
7549
|
if (!i || !s) continue;
|
|
7550
7550
|
const o = e.terminal(Me(r, "DIMENSION"));
|
|
7551
7551
|
for (const a of Ht(s, "fieldDef")) {
|
|
7552
|
-
const l = e.span(a), u = e.text_(Me(a, "fieldNameDef"))?.trim(),
|
|
7553
|
-
!l || !u ||
|
|
7552
|
+
const l = e.span(a), u = e.text_(Me(a, "fieldNameDef"))?.trim(), c = e.text_(Me(a, "fieldExpr"))?.trim();
|
|
7553
|
+
!l || !u || c === void 0 || n.push({
|
|
7554
7554
|
name: u,
|
|
7555
|
-
expression:
|
|
7555
|
+
expression: c,
|
|
7556
7556
|
span: l,
|
|
7557
7557
|
line: e.line(l.start),
|
|
7558
7558
|
statement: i,
|
|
@@ -7567,12 +7567,12 @@ function _y(e, t) {
|
|
|
7567
7567
|
for (const r of ri(t, Te.sourceDefinition)) {
|
|
7568
7568
|
const i = e.span(r), s = e.text_(Me(r, "sourceNameDef")), o = Me(r, "sqExplore");
|
|
7569
7569
|
if (!i || !s || !o) continue;
|
|
7570
|
-
const a = e.span(o), l = a ? e.text.slice(a.start, a.end) : "", u = (/^\s*(`[^`]*`|[A-Za-z_][A-Za-z0-9_.]*)/.exec(l)?.[1] ?? "").trim(),
|
|
7570
|
+
const a = e.span(o), l = a ? e.text.slice(a.start, a.end) : "", u = (/^\s*(`[^`]*`|[A-Za-z_][A-Za-z0-9_.]*)/.exec(l)?.[1] ?? "").trim(), c = qr(o, Te.exploreProperties)[0], d = c && Ko(e, c), f = {
|
|
7571
7571
|
start: e.lineStarts[e.line(i.start)],
|
|
7572
7572
|
end: i.end
|
|
7573
7573
|
}, h = [];
|
|
7574
|
-
if (
|
|
7575
|
-
for (const p of qr(
|
|
7574
|
+
if (c)
|
|
7575
|
+
for (const p of qr(c, Te.whereStatement)) {
|
|
7576
7576
|
const m = Pf(e, p);
|
|
7577
7577
|
m && h.push(m);
|
|
7578
7578
|
}
|
|
@@ -7582,9 +7582,9 @@ function _y(e, t) {
|
|
|
7582
7582
|
span: i,
|
|
7583
7583
|
line: e.line(i.start),
|
|
7584
7584
|
statement: f,
|
|
7585
|
-
...
|
|
7586
|
-
views:
|
|
7587
|
-
dimensions:
|
|
7585
|
+
...d ? { properties: d } : {},
|
|
7586
|
+
views: c ? wy(e, c) : [],
|
|
7587
|
+
dimensions: c ? xy(e, c) : [],
|
|
7588
7588
|
wheres: h
|
|
7589
7589
|
});
|
|
7590
7590
|
}
|
|
@@ -7595,16 +7595,16 @@ function ky(e, t) {
|
|
|
7595
7595
|
for (const r of ri(t, Te.givenStatement)) {
|
|
7596
7596
|
const i = e.terminal(Me(r, "GIVEN")), s = Me(r, "givenDefList"), o = i ? e.line(i.start) : void 0;
|
|
7597
7597
|
for (const a of s ? Ht(s, "givenDef") : []) {
|
|
7598
|
-
const l = e.span(a), u = e.span(Me(a, "givenNameDef")),
|
|
7599
|
-
if (!l || !u || !
|
|
7600
|
-
const
|
|
7598
|
+
const l = e.span(a), u = e.span(Me(a, "givenNameDef")), c = u && e.text.slice(u.start, u.end);
|
|
7599
|
+
if (!l || !u || !c) continue;
|
|
7600
|
+
const d = { start: u.start, end: l.end }, f = e.line(d.start);
|
|
7601
7601
|
n.push({
|
|
7602
|
-
name:
|
|
7603
|
-
declaration: e.text.slice(
|
|
7604
|
-
span:
|
|
7602
|
+
name: c,
|
|
7603
|
+
declaration: e.text.slice(d.start, d.end),
|
|
7604
|
+
span: d,
|
|
7605
7605
|
line: f,
|
|
7606
|
-
statement: { start: e.lineStarts[f], end:
|
|
7607
|
-
tags: il(e, l,
|
|
7606
|
+
statement: { start: e.lineStarts[f], end: d.end },
|
|
7607
|
+
tags: il(e, l, d.start),
|
|
7608
7608
|
...o !== void 0 && o !== f ? { blockHeader: o } : {}
|
|
7609
7609
|
});
|
|
7610
7610
|
}
|
|
@@ -7655,12 +7655,12 @@ async function Mf(e) {
|
|
|
7655
7655
|
const a = new Os(e), l = sl(a, s);
|
|
7656
7656
|
a.commentLines = l.lines;
|
|
7657
7657
|
const u = e.split(`
|
|
7658
|
-
`),
|
|
7659
|
-
a.proseLines = Zh(u,
|
|
7658
|
+
`), c = (f) => l.lines.has(f);
|
|
7659
|
+
a.proseLines = Zh(u, c), a.blocks = Qh(u, c).filter(
|
|
7660
7660
|
([f]) => !u[f].trimStart().startsWith("##")
|
|
7661
7661
|
);
|
|
7662
|
-
const
|
|
7663
|
-
return
|
|
7662
|
+
const d = _y(a, i);
|
|
7663
|
+
return d.length === 0 && /^\s*source:/m.test(e) ? {
|
|
7664
7664
|
ok: !1,
|
|
7665
7665
|
reason: `The builder could not locate this file's sources in Malloy's parse tree (malloy ${r?.malloyVersion ?? "unknown"}), so editing is off.`
|
|
7666
7666
|
} : {
|
|
@@ -7669,7 +7669,7 @@ async function Mf(e) {
|
|
|
7669
7669
|
text: e,
|
|
7670
7670
|
lineStarts: a.lineStarts,
|
|
7671
7671
|
imports: $y(a, i),
|
|
7672
|
-
sources:
|
|
7672
|
+
sources: d,
|
|
7673
7673
|
givens: ky(a, i),
|
|
7674
7674
|
textBlocks: Oy(a, s),
|
|
7675
7675
|
modelNotes: Af(a, i),
|
|
@@ -7695,11 +7695,11 @@ async function ii(e, t) {
|
|
|
7695
7695
|
}
|
|
7696
7696
|
function sl(e, t) {
|
|
7697
7697
|
const n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), i = [], s = t.tokenSource?.vocabulary;
|
|
7698
|
-
for (const
|
|
7699
|
-
const
|
|
7700
|
-
if (
|
|
7701
|
-
const f = e.utf16(
|
|
7702
|
-
let h = e.utf16(
|
|
7698
|
+
for (const c of t.getTokens?.() ?? []) {
|
|
7699
|
+
const d = s?.getSymbolicName(c.type);
|
|
7700
|
+
if (d !== "COMMENT_TO_EOL" && d !== "BLOCK_COMMENT") continue;
|
|
7701
|
+
const f = e.utf16(c.startIndex);
|
|
7702
|
+
let h = e.utf16(c.stopIndex + 1);
|
|
7703
7703
|
if (!(f === void 0 || h === void 0 || h < f)) {
|
|
7704
7704
|
for (; h > f && (e.text[h - 1] === `
|
|
7705
7705
|
` || e.text[h - 1] === "\r"); )
|
|
@@ -7707,18 +7707,18 @@ function sl(e, t) {
|
|
|
7707
7707
|
i.push({ start: f, end: h });
|
|
7708
7708
|
}
|
|
7709
7709
|
}
|
|
7710
|
-
const o = [...i].sort((
|
|
7710
|
+
const o = [...i].sort((c, d) => c.start - d.start);
|
|
7711
7711
|
let a = "", l = 0;
|
|
7712
|
-
for (const
|
|
7713
|
-
a += e.text.slice(l, Math.max(l,
|
|
7712
|
+
for (const c of o)
|
|
7713
|
+
a += e.text.slice(l, Math.max(l, c.start)), a += e.text.slice(Math.max(l, c.start), Math.max(l, c.end)).replace(/[^\n\r]/g, " "), l = Math.max(l, c.end);
|
|
7714
7714
|
a += e.text.slice(l);
|
|
7715
|
-
const u = (
|
|
7716
|
-
for (const
|
|
7717
|
-
const
|
|
7718
|
-
for (let m =
|
|
7715
|
+
const u = (c) => a.slice(e.lineStarts[c], e.lineStarts[c + 1] ?? a.length);
|
|
7716
|
+
for (const c of i) {
|
|
7717
|
+
const d = e.line(c.start), f = e.line(c.end - 1);
|
|
7718
|
+
for (let m = d; m <= f; m++)
|
|
7719
7719
|
u(m).trim() === "" && r.add(m);
|
|
7720
|
-
const h = a.slice(e.lineStarts[
|
|
7721
|
-
h !== "" && p === "" && n.set(f,
|
|
7720
|
+
const h = a.slice(e.lineStarts[d], c.start).trim(), p = a.slice(c.end, e.lineStarts[f + 1] ?? a.length).trim();
|
|
7721
|
+
h !== "" && p === "" && n.set(f, c);
|
|
7722
7722
|
}
|
|
7723
7723
|
return { trailing: n, lines: r, all: i };
|
|
7724
7724
|
}
|
|
@@ -7749,12 +7749,12 @@ function Oy(e, t) {
|
|
|
7749
7749
|
);
|
|
7750
7750
|
if (!l) continue;
|
|
7751
7751
|
const u = [];
|
|
7752
|
-
let
|
|
7753
|
-
for (; i(n[
|
|
7754
|
-
u.push(s(n[
|
|
7755
|
-
const
|
|
7756
|
-
if (!
|
|
7757
|
-
const f = e.line(e.utf16(n[a].startIndex) ?? 0), h = e.utf16(
|
|
7752
|
+
let c = a + 1;
|
|
7753
|
+
for (; i(n[c] ?? n[a]) === "BLOCK_ANNOTATION_TEXT"; c++)
|
|
7754
|
+
u.push(s(n[c]));
|
|
7755
|
+
const d = n[c];
|
|
7756
|
+
if (!d || i(d) !== "BLOCK_ANNOTATION_END") continue;
|
|
7757
|
+
const f = e.line(e.utf16(n[a].startIndex) ?? 0), h = e.utf16(d.stopIndex + 1) ?? e.text.length, p = l.name === void 0 && l.rest ? [`${l.rest}
|
|
7758
7758
|
`] : [];
|
|
7759
7759
|
o.push({
|
|
7760
7760
|
...l.name === void 0 ? {} : { name: l.name },
|
|
@@ -7763,7 +7763,7 @@ function Oy(e, t) {
|
|
|
7763
7763
|
`).replace(/\n$/, ""),
|
|
7764
7764
|
span: { start: e.lineStarts[f], end: h },
|
|
7765
7765
|
line: f
|
|
7766
|
-
}), a =
|
|
7766
|
+
}), a = c;
|
|
7767
7767
|
}
|
|
7768
7768
|
return o;
|
|
7769
7769
|
}
|
|
@@ -8029,13 +8029,13 @@ async function Ny(e) {
|
|
|
8029
8029
|
reason: Gc,
|
|
8030
8030
|
line: l.from + 1
|
|
8031
8031
|
};
|
|
8032
|
-
const { tag: u, errors:
|
|
8032
|
+
const { tag: u, errors: c } = al(t, [
|
|
8033
8033
|
Wc(l.text)
|
|
8034
|
-
]),
|
|
8034
|
+
]), d = u?.tag("artifact"), f = ol(l.text);
|
|
8035
8035
|
if (f === void 0)
|
|
8036
|
-
return
|
|
8036
|
+
return c.length > 0 ? {
|
|
8037
8037
|
ok: !1,
|
|
8038
|
-
reason: `The \`## artifact\` tag does not parse: ${
|
|
8038
|
+
reason: `The \`## artifact\` tag does not parse: ${c[0]}`
|
|
8039
8039
|
} : a === "linear" ? {
|
|
8040
8040
|
ok: !1,
|
|
8041
8041
|
legacyNotebook: !0,
|
|
@@ -8152,20 +8152,20 @@ async function Ny(e) {
|
|
|
8152
8152
|
...q?.has("borderless") ? { borderless: !0 } : {}
|
|
8153
8153
|
});
|
|
8154
8154
|
}
|
|
8155
|
-
const v = Py(i, n, t), g = {}, y =
|
|
8155
|
+
const v = Py(i, n, t), g = {}, y = d?.tag("givens");
|
|
8156
8156
|
for (const k of Object.keys(y?.dict ?? {})) {
|
|
8157
8157
|
const S = y?.text(k);
|
|
8158
8158
|
S !== void 0 && (g[k] = S);
|
|
8159
8159
|
}
|
|
8160
|
-
const x = u?.tag("dashboard")?.has("columns") ? Vs(u.tag("dashboard"), "columns") :
|
|
8160
|
+
const x = u?.tag("dashboard")?.has("columns") ? Vs(u.tag("dashboard"), "columns") : d?.array("tiles") ? Vs(d, "dashboard_columns") : void 0;
|
|
8161
8161
|
return {
|
|
8162
8162
|
ok: !0,
|
|
8163
8163
|
document: {
|
|
8164
8164
|
layout: a,
|
|
8165
|
-
title:
|
|
8165
|
+
title: d?.text("title") ?? "",
|
|
8166
8166
|
...s ? { description: s } : {},
|
|
8167
8167
|
...x === void 0 ? {} : { columns: x },
|
|
8168
|
-
...
|
|
8168
|
+
...d?.has("autorun") ? { autorun: d.isTrue("autorun") } : {},
|
|
8169
8169
|
imports: h,
|
|
8170
8170
|
sources: p,
|
|
8171
8171
|
...v ? { localGivens: v } : {},
|
|
@@ -8264,11 +8264,11 @@ function Gy(e, t, n) {
|
|
|
8264
8264
|
ok: !1,
|
|
8265
8265
|
reason: `A new tile names a view of a source; \`${h.name}\` is ${h.declaration.kind === "inline" ? "an inline query" : "not declared here"}, which the builder cannot write.`
|
|
8266
8266
|
};
|
|
8267
|
-
const u = new Map(e.sources.map((h) => [h.name, h])),
|
|
8267
|
+
const u = new Map(e.sources.map((h) => [h.name, h])), c = new Set(
|
|
8268
8268
|
t.imports.flatMap((h) => h.kind === "names" ? h.names : [])
|
|
8269
8269
|
);
|
|
8270
|
-
for (const h of e.sources)
|
|
8271
|
-
const
|
|
8270
|
+
for (const h of e.sources) c.add(h.base);
|
|
8271
|
+
const d = t.imports.some((h) => h.kind === "all"), f = t.sources.filter((h) => !u.has(h.name));
|
|
8272
8272
|
for (const h of e.sources) {
|
|
8273
8273
|
const p = t.sources.find((m) => m.name === h.name);
|
|
8274
8274
|
if (!p || p.base !== h.base)
|
|
@@ -8283,7 +8283,7 @@ function Gy(e, t, n) {
|
|
|
8283
8283
|
ok: !1,
|
|
8284
8284
|
reason: `A new source \`${h.name}\` needs a tile on it.`
|
|
8285
8285
|
};
|
|
8286
|
-
if (!
|
|
8286
|
+
if (!c.has(h.base) && !d && !n?.includes(h.base))
|
|
8287
8287
|
return {
|
|
8288
8288
|
ok: !1,
|
|
8289
8289
|
reason: `\`${h.base}\` is not imported in this file, so a tile cannot be put on it.`
|
|
@@ -8318,8 +8318,8 @@ function ac(e, t) {
|
|
|
8318
8318
|
const n = qy(t), r = n.indexOf("{"), i = n.lastIndexOf("}");
|
|
8319
8319
|
let s = t.slice(r + 1, i), o = n.slice(r + 1, i);
|
|
8320
8320
|
const a = (u) => {
|
|
8321
|
-
const
|
|
8322
|
-
|
|
8321
|
+
const c = u.exec(o);
|
|
8322
|
+
c && (s = s.slice(0, c.index) + s.slice(c.index + c[0].length), o = o.slice(0, c.index) + o.slice(c.index + c[0].length));
|
|
8323
8323
|
};
|
|
8324
8324
|
a(/\s*\bcolspan\s*=\s*[^\s}]+/), a(/\s*\bbreak\b(?!\s*=)/);
|
|
8325
8325
|
const l = [
|
|
@@ -8341,18 +8341,18 @@ function Ky(e) {
|
|
|
8341
8341
|
edits: l
|
|
8342
8342
|
} = e, u = new Map(
|
|
8343
8343
|
r.tiles.filter(je).map((v) => [v.name, v])
|
|
8344
|
-
),
|
|
8344
|
+
), c = i.tiles.filter(je).some((v) => {
|
|
8345
8345
|
const g = u.get(v.name);
|
|
8346
8346
|
return g !== void 0 && oc(g, v);
|
|
8347
8347
|
});
|
|
8348
|
-
if (!s && !
|
|
8349
|
-
const
|
|
8350
|
-
if (!
|
|
8348
|
+
if (!s && !c) return;
|
|
8349
|
+
const d = fs(t);
|
|
8350
|
+
if (!d)
|
|
8351
8351
|
return {
|
|
8352
8352
|
ok: !1,
|
|
8353
8353
|
reason: "Could not find the `## artifact` tag to reorder."
|
|
8354
8354
|
};
|
|
8355
|
-
const f =
|
|
8355
|
+
const f = d.text, h = ol(f);
|
|
8356
8356
|
if (!h)
|
|
8357
8357
|
return {
|
|
8358
8358
|
ok: !1,
|
|
@@ -8388,7 +8388,7 @@ function Ky(e) {
|
|
|
8388
8388
|
reason: "A tile in the new order is not one the `## artifact` tag names."
|
|
8389
8389
|
};
|
|
8390
8390
|
const b = f.slice(0, h.open).search(/tiles\s*=\s*$/), w = `${f.slice(0, b)}tiles=[${Vy(f, h, m)}]${f.slice(h.close + 1)}`;
|
|
8391
|
-
w !== f && l.push({ ...Ff(n,
|
|
8391
|
+
w !== f && l.push({ ...Ff(n, d), text: `${w}
|
|
8392
8392
|
` });
|
|
8393
8393
|
}
|
|
8394
8394
|
function Ff(e, t) {
|
|
@@ -8463,7 +8463,7 @@ function Yy(e) {
|
|
|
8463
8463
|
(g) => g.start === a.start && g.end === a.end
|
|
8464
8464
|
);
|
|
8465
8465
|
let u = l ? l.text.replace(/\n$/, "") : o.text;
|
|
8466
|
-
const
|
|
8466
|
+
const c = r.layout !== i.layout, d = u.indexOf("artifact"), f = u.indexOf("{", d);
|
|
8467
8467
|
let h = 0, p = -1;
|
|
8468
8468
|
for (let g = f; g < u.length; g++)
|
|
8469
8469
|
if (u[g] === "{") h++;
|
|
@@ -8493,7 +8493,7 @@ ${x.source}[ \\t]*(?=
|
|
|
8493
8493
|
(k) => `${o.block ? k.slice(0, k.length - k.trimStart().length) : " "}${g}=${y}`
|
|
8494
8494
|
) : m = w(`${g}=${y}`);
|
|
8495
8495
|
};
|
|
8496
|
-
if (
|
|
8496
|
+
if (c && v("layout", i.layout), r.title !== i.title && v("title", i.title ? vt(i.title) : void 0), r.autorun !== i.autorun && v(
|
|
8497
8497
|
"autorun",
|
|
8498
8498
|
i.autorun === void 0 ? void 0 : String(i.autorun)
|
|
8499
8499
|
), Oe(r.startingGivens) !== Oe(i.startingGivens)) {
|
|
@@ -8508,25 +8508,25 @@ ${x.source}[ \\t]*(?=
|
|
|
8508
8508
|
` });
|
|
8509
8509
|
}
|
|
8510
8510
|
if (r.description !== i.description) {
|
|
8511
|
-
const { read: o, blankAbove: a, below: l, belowBlock: u, inBlock:
|
|
8512
|
-
if (
|
|
8511
|
+
const { read: o, blankAbove: a, below: l, belowBlock: u, inBlock: c } = Bc(t);
|
|
8512
|
+
if (c || i.description === void 0 && u)
|
|
8513
8513
|
return {
|
|
8514
8514
|
ok: !1,
|
|
8515
8515
|
reason: "The description is written in a `##|\"` block, which the builder cannot edit in place. Change it in the file's text."
|
|
8516
8516
|
};
|
|
8517
|
-
const
|
|
8517
|
+
const d = Nf(i.description ?? "").split(`
|
|
8518
8518
|
`).map((m) => m.trim() === "" ? '##"' : `##" ${m.trim()}`).join(`
|
|
8519
8519
|
`), f = o.length > 0 && o[0] < hl(t), h = i.description === void 0, p = f ? [...o.slice(1), ...h ? l : []] : [...o, ...a];
|
|
8520
8520
|
for (const m of p) s.push({ ...n(m), text: "" });
|
|
8521
8521
|
if (f)
|
|
8522
8522
|
s.push({
|
|
8523
8523
|
...n(o[0]),
|
|
8524
|
-
text: i.description === void 0 ? "" : `${
|
|
8524
|
+
text: i.description === void 0 ? "" : `${d}
|
|
8525
8525
|
`
|
|
8526
8526
|
});
|
|
8527
8527
|
else if (i.description !== void 0) {
|
|
8528
8528
|
const m = n(hl(t)).start;
|
|
8529
|
-
s.push({ start: m, end: m, text: `${
|
|
8529
|
+
s.push({ start: m, end: m, text: `${d}
|
|
8530
8530
|
` });
|
|
8531
8531
|
}
|
|
8532
8532
|
}
|
|
@@ -8536,13 +8536,13 @@ function Xy(e) {
|
|
|
8536
8536
|
(i.localGivens ?? []).map((h) => [h.name, h])
|
|
8537
8537
|
), u = new Map(
|
|
8538
8538
|
(s.localGivens ?? []).map((h) => [h.name, h])
|
|
8539
|
-
),
|
|
8539
|
+
), c = new Map(
|
|
8540
8540
|
a.givens.map((h) => [h.name, h])
|
|
8541
|
-
),
|
|
8541
|
+
), d = /* @__PURE__ */ new Set();
|
|
8542
8542
|
for (const [h, p] of l) {
|
|
8543
8543
|
const m = u.get(h);
|
|
8544
8544
|
if (m !== void 0 && Oe(m) === Oe(p)) continue;
|
|
8545
|
-
const b =
|
|
8545
|
+
const b = c.get(h);
|
|
8546
8546
|
if (b === void 0)
|
|
8547
8547
|
return {
|
|
8548
8548
|
ok: !1,
|
|
@@ -8556,7 +8556,7 @@ function Xy(e) {
|
|
|
8556
8556
|
...m === void 0 ? v : []
|
|
8557
8557
|
];
|
|
8558
8558
|
for (const E of y)
|
|
8559
|
-
o.push({ ...n(E), text: "" }),
|
|
8559
|
+
o.push({ ...n(E), text: "" }), d.add(E);
|
|
8560
8560
|
const x = It(a, b.span.end - 1);
|
|
8561
8561
|
if (m === void 0) {
|
|
8562
8562
|
o.push({
|
|
@@ -8564,15 +8564,15 @@ function Xy(e) {
|
|
|
8564
8564
|
end: n(x).end,
|
|
8565
8565
|
text: ""
|
|
8566
8566
|
});
|
|
8567
|
-
for (let j = b.line; j <= x; j++)
|
|
8568
|
-
const E = Math.min(b.line, ...y), B = b.blockHeader ?? E, D = (t[x + 1] ?? "x").trim() === "", N = B === 0 || t[B - 1].trim() === "", q = b.blockHeader === void 0 || ![...
|
|
8567
|
+
for (let j = b.line; j <= x; j++) d.add(j);
|
|
8568
|
+
const E = Math.min(b.line, ...y), B = b.blockHeader ?? E, D = (t[x + 1] ?? "x").trim() === "", N = B === 0 || t[B - 1].trim() === "", q = b.blockHeader === void 0 || ![...c.values()].some(
|
|
8569
8569
|
(j) => j.blockHeader === b.blockHeader && j.line > b.line && u.has(
|
|
8570
|
-
[...
|
|
8570
|
+
[...c.entries()].find(
|
|
8571
8571
|
([, X]) => X === j
|
|
8572
8572
|
)?.[0] ?? ""
|
|
8573
8573
|
)
|
|
8574
8574
|
);
|
|
8575
|
-
D && N && q && !
|
|
8575
|
+
D && N && q && !d.has(x + 1) && (o.push({ ...n(x + 1), text: "" }), d.add(x + 1));
|
|
8576
8576
|
continue;
|
|
8577
8577
|
}
|
|
8578
8578
|
const k = r(b.line), S = nc(m), $ = m.type !== p.type || m.default !== p.default ? b.blockHeader === void 0 ? rc(m) : `${m.name} :: ${m.type} is ${m.default}` : t.slice(b.line, x + 1).join(`
|
|
@@ -8585,11 +8585,11 @@ function Xy(e) {
|
|
|
8585
8585
|
`
|
|
8586
8586
|
});
|
|
8587
8587
|
}
|
|
8588
|
-
for (const [h, p] of
|
|
8588
|
+
for (const [h, p] of c) {
|
|
8589
8589
|
if (p.blockHeader === void 0 || u.has(h)) continue;
|
|
8590
|
-
![...
|
|
8591
|
-
(b) => b.blockHeader === p.blockHeader && !
|
|
8592
|
-
) && !
|
|
8590
|
+
![...c.values()].some(
|
|
8591
|
+
(b) => b.blockHeader === p.blockHeader && !d.has(b.line)
|
|
8592
|
+
) && !d.has(p.blockHeader) && (o.push({ ...n(p.blockHeader), text: "" }), d.add(p.blockHeader));
|
|
8593
8593
|
}
|
|
8594
8594
|
const f = [...u.values()].filter(
|
|
8595
8595
|
(h) => !l.has(h.name)
|
|
@@ -8597,7 +8597,7 @@ function Xy(e) {
|
|
|
8597
8597
|
if (f.length > 0) {
|
|
8598
8598
|
const h = Math.max(
|
|
8599
8599
|
-1,
|
|
8600
|
-
...[...
|
|
8600
|
+
...[...c.values()].map((g) => g.line)
|
|
8601
8601
|
), p = (() => {
|
|
8602
8602
|
let g = -1;
|
|
8603
8603
|
for (let y = 0; y < t.length; y++) {
|
|
@@ -8621,8 +8621,8 @@ ${b}` }), t.some(
|
|
|
8621
8621
|
}
|
|
8622
8622
|
const lc = (e, t) => `import { ${e.join(", ")} } from ${vt(t)}`;
|
|
8623
8623
|
function Zy(e) {
|
|
8624
|
-
const { parsed: t, current: n, next: r, edits: i, wholeLine: s } = e, o = (
|
|
8625
|
-
|
|
8624
|
+
const { parsed: t, current: n, next: r, edits: i, wholeLine: s } = e, o = (d) => Oe(
|
|
8625
|
+
d.imports.flatMap((f) => f.kind === "all" ? [f.from] : []).sort()
|
|
8626
8626
|
);
|
|
8627
8627
|
if (o(n) !== o(r))
|
|
8628
8628
|
return {
|
|
@@ -8631,15 +8631,15 @@ function Zy(e) {
|
|
|
8631
8631
|
};
|
|
8632
8632
|
if (Oe(n.imports) === Oe(r.imports)) return;
|
|
8633
8633
|
const a = r.imports.flatMap(
|
|
8634
|
-
(
|
|
8634
|
+
(d) => d.kind === "names" ? [{ ...d, claimed: !1 }] : []
|
|
8635
8635
|
), l = /* @__PURE__ */ new Set([
|
|
8636
|
-
...r.sources.map((
|
|
8637
|
-
...r.tiles.filter(ke).map((
|
|
8638
|
-
]), u = t.imports.map((
|
|
8639
|
-
statement:
|
|
8636
|
+
...r.sources.map((d) => d.base),
|
|
8637
|
+
...r.tiles.filter(ke).map((d) => d.source)
|
|
8638
|
+
]), u = t.imports.map((d, f) => ({
|
|
8639
|
+
statement: d,
|
|
8640
8640
|
entry: n.imports[f]
|
|
8641
8641
|
}));
|
|
8642
|
-
for (const { statement:
|
|
8642
|
+
for (const { statement: d, entry: f } of u) {
|
|
8643
8643
|
if (!f || f.kind !== "names") continue;
|
|
8644
8644
|
const h = a.find((g) => !g.claimed && g.from === f.from);
|
|
8645
8645
|
h && (h.claimed = !0);
|
|
@@ -8650,7 +8650,7 @@ function Zy(e) {
|
|
|
8650
8650
|
reason: `\`${b}\` is still read by a tile, so its import cannot be removed.`
|
|
8651
8651
|
};
|
|
8652
8652
|
if (Oe(p) === Oe(f.names)) continue;
|
|
8653
|
-
const w = p.length === 0 ? ll(t,
|
|
8653
|
+
const w = p.length === 0 ? ll(t, d.statement) : d.statement, v = t.commentIn(w);
|
|
8654
8654
|
if (v)
|
|
8655
8655
|
return {
|
|
8656
8656
|
ok: !1,
|
|
@@ -8661,37 +8661,37 @@ function Zy(e) {
|
|
|
8661
8661
|
text: p.length === 0 ? "" : lc(p, f.from)
|
|
8662
8662
|
});
|
|
8663
8663
|
}
|
|
8664
|
-
const
|
|
8665
|
-
if (
|
|
8666
|
-
const
|
|
8667
|
-
if (!
|
|
8664
|
+
const c = a.filter((d) => !d.claimed);
|
|
8665
|
+
if (c.length > 0) {
|
|
8666
|
+
const d = t.imports.at(-1);
|
|
8667
|
+
if (!d)
|
|
8668
8668
|
return {
|
|
8669
8669
|
ok: !1,
|
|
8670
8670
|
reason: "This file has no `import` to put a source beside. Import its first source in the file."
|
|
8671
8671
|
};
|
|
8672
|
-
const f = s(It(t,
|
|
8672
|
+
const f = s(It(t, d.statement.end - 1)).end;
|
|
8673
8673
|
i.push({
|
|
8674
8674
|
start: f,
|
|
8675
8675
|
end: f,
|
|
8676
|
-
text:
|
|
8676
|
+
text: c.map((h) => `${lc(h.names, h.from)}
|
|
8677
8677
|
`).join("")
|
|
8678
8678
|
});
|
|
8679
8679
|
}
|
|
8680
8680
|
}
|
|
8681
8681
|
function Qy(e) {
|
|
8682
8682
|
const { lines: t, wholeLine: n, indentOf: r, current: i, next: s, edits: o, parsed: a } = e, l = new Map(
|
|
8683
|
-
(i.drills ?? []).map((
|
|
8683
|
+
(i.drills ?? []).map((c) => [as(c), c])
|
|
8684
8684
|
), u = new Map(
|
|
8685
|
-
(s.drills ?? []).map((
|
|
8685
|
+
(s.drills ?? []).map((c) => [as(c), c])
|
|
8686
8686
|
);
|
|
8687
|
-
for (const
|
|
8688
|
-
const
|
|
8689
|
-
if (
|
|
8690
|
-
const h = f ??
|
|
8687
|
+
for (const c of /* @__PURE__ */ new Set([...l.keys(), ...u.keys()])) {
|
|
8688
|
+
const d = l.get(c), f = u.get(c);
|
|
8689
|
+
if (d && f && Oe(d) === Oe(f)) continue;
|
|
8690
|
+
const h = f ?? d;
|
|
8691
8691
|
if (f && f.to.length === 0)
|
|
8692
8692
|
return {
|
|
8693
8693
|
ok: !1,
|
|
8694
|
-
reason: `The drill on \`${
|
|
8694
|
+
reason: `The drill on \`${c}\` names no destination.`
|
|
8695
8695
|
};
|
|
8696
8696
|
const p = a.sources.find((v) => v.name === h.source)?.dimensions.find((v) => v.name === h.name);
|
|
8697
8697
|
if (p === void 0)
|
|
@@ -8734,8 +8734,8 @@ function Jy(e) {
|
|
|
8734
8734
|
ok: !1,
|
|
8735
8735
|
reason: `\`${o.name}\` is one of several views declared by a single \`view:\` statement, which the builder does not restructure.`
|
|
8736
8736
|
};
|
|
8737
|
-
const l = It(s, a.statement.start), u = It(s, a.statement.end - 1),
|
|
8738
|
-
if (s.text.slice(s.lineStarts[l], a.statement.start).trim() !== "" || s.text.slice(
|
|
8737
|
+
const l = It(s, a.statement.start), u = It(s, a.statement.end - 1), c = s.trailingComment(u), d = c && c.start >= a.statement.end ? c.end : a.statement.end;
|
|
8738
|
+
if (s.text.slice(s.lineStarts[l], a.statement.start).trim() !== "" || s.text.slice(d, n(u).end).trim() !== "") {
|
|
8739
8739
|
i.push({ ...ll(s, a.statement), text: "" });
|
|
8740
8740
|
continue;
|
|
8741
8741
|
}
|
|
@@ -8764,7 +8764,7 @@ function eb(e) {
|
|
|
8764
8764
|
const h = u.get(f.source) ?? [];
|
|
8765
8765
|
h.push(f), u.set(f.source, h);
|
|
8766
8766
|
}
|
|
8767
|
-
const
|
|
8767
|
+
const c = (f, h) => {
|
|
8768
8768
|
const p = f.declaration.kind === "reference" ? f.declaration.from : f.name, m = (f.filters ?? []).map((b) => `where: ${ra(b.field)} ${b.op ?? "~"} $${b.given}`).join(", ");
|
|
8769
8769
|
return [
|
|
8770
8770
|
...Wf(f).map((b) => `${h}${b}`),
|
|
@@ -8772,10 +8772,10 @@ function eb(e) {
|
|
|
8772
8772
|
].join(`
|
|
8773
8773
|
`);
|
|
8774
8774
|
};
|
|
8775
|
-
let
|
|
8775
|
+
let d = -1;
|
|
8776
8776
|
for (const f of l.sources)
|
|
8777
|
-
|
|
8778
|
-
|
|
8777
|
+
d = Math.max(
|
|
8778
|
+
d,
|
|
8779
8779
|
It(l, f.span.end - 1)
|
|
8780
8780
|
);
|
|
8781
8781
|
for (const [f, h] of u)
|
|
@@ -8805,7 +8805,7 @@ function eb(e) {
|
|
|
8805
8805
|
start: v,
|
|
8806
8806
|
end: v,
|
|
8807
8807
|
text: (g ? "" : `
|
|
8808
|
-
`) + h.map((y) =>
|
|
8808
|
+
`) + h.map((y) => c(y, w)).join(`
|
|
8809
8809
|
|
|
8810
8810
|
`) + `
|
|
8811
8811
|
`
|
|
@@ -8819,12 +8819,12 @@ function eb(e) {
|
|
|
8819
8819
|
};
|
|
8820
8820
|
const m = `
|
|
8821
8821
|
source: ${p.name} is ${p.base} extend {
|
|
8822
|
-
` + h.map((g) =>
|
|
8822
|
+
` + h.map((g) => c(g, " ")).join(`
|
|
8823
8823
|
|
|
8824
8824
|
`) + `
|
|
8825
8825
|
}
|
|
8826
8826
|
`;
|
|
8827
|
-
let b =
|
|
8827
|
+
let b = d;
|
|
8828
8828
|
if (b < 0)
|
|
8829
8829
|
for (let g = 0; g < n.length; g++) {
|
|
8830
8830
|
const y = n[g].trim();
|
|
@@ -8833,45 +8833,45 @@ source: ${p.name} is ${p.base} extend {
|
|
|
8833
8833
|
const w = b >= 0 ? r(b).end : t.length, v = w === t.length && !t.endsWith(`
|
|
8834
8834
|
`) ? `
|
|
8835
8835
|
` : "";
|
|
8836
|
-
a.push({ start: w, end: w, text: v + m }),
|
|
8836
|
+
a.push({ start: w, end: w, text: v + m }), d = b;
|
|
8837
8837
|
}
|
|
8838
8838
|
}
|
|
8839
8839
|
function tb(e) {
|
|
8840
|
-
const { lines: t, starts: n, wholeLine: r, indentOf: i, current: s, next: o, edits: a, parsed: l } = e, u = new Map(s.tiles.map((
|
|
8841
|
-
for (const
|
|
8842
|
-
const
|
|
8843
|
-
if (
|
|
8840
|
+
const { lines: t, starts: n, wholeLine: r, indentOf: i, current: s, next: o, edits: a, parsed: l } = e, u = new Map(s.tiles.map((c) => [ct(c), c]));
|
|
8841
|
+
for (const c of o.tiles) {
|
|
8842
|
+
const d = u.get(ct(c));
|
|
8843
|
+
if (d === void 0 || je(c) || je(d) || Oe(ls(d)) === Oe(ls(c)))
|
|
8844
8844
|
continue;
|
|
8845
|
-
if (
|
|
8845
|
+
if (c.declaration.kind === "inherited")
|
|
8846
8846
|
return {
|
|
8847
8847
|
ok: !1,
|
|
8848
|
-
reason: `\`${
|
|
8848
|
+
reason: `\`${c.source} -> ${c.name}\` is declared on its source, not in this report, so its presentation cannot be changed here.`
|
|
8849
8849
|
};
|
|
8850
|
-
const f = jy(l,
|
|
8850
|
+
const f = jy(l, c.source, c.name);
|
|
8851
8851
|
if (f < 0)
|
|
8852
8852
|
return {
|
|
8853
8853
|
ok: !1,
|
|
8854
|
-
reason: `Could not find where \`${
|
|
8854
|
+
reason: `Could not find where \`${c.name}\` is declared inside \`${c.source}\`.`
|
|
8855
8855
|
};
|
|
8856
|
-
const { tags: h } = si(l, t, f), p = i(f), m = Wf(
|
|
8856
|
+
const { tags: h } = si(l, t, f), p = i(f), m = Wf(c, !1), b = new Map(
|
|
8857
8857
|
m.map(($) => [Li($) ?? $, $])
|
|
8858
|
-
), w = /* @__PURE__ */ new Set(), v = zf(
|
|
8858
|
+
), w = /* @__PURE__ */ new Set(), v = zf(c.chart), g = cc(d) !== cc(c);
|
|
8859
8859
|
if (g) {
|
|
8860
|
-
const $ = h.filter((D) => Gr(D.text)), E = h.filter((D) => Kt(D.text)), B =
|
|
8860
|
+
const $ = h.filter((D) => Gr(D.text)), E = h.filter((D) => Kt(D.text)), B = d.chart === "custom" ? h.filter(
|
|
8861
8861
|
(D) => Kt(D.text) || Gr(D.text)
|
|
8862
8862
|
) : $.length > 0 ? $ : E.length > 1 ? E : [];
|
|
8863
8863
|
if (B.length > 0)
|
|
8864
8864
|
return {
|
|
8865
8865
|
ok: !1,
|
|
8866
|
-
reason: `\`${
|
|
8866
|
+
reason: `\`${c.source} -> ${c.name}\` has a chart line the builder does not model (${B.map((D) => D.text).join(" and ")}), so its chart cannot be changed here.`
|
|
8867
8867
|
};
|
|
8868
8868
|
}
|
|
8869
8869
|
let y = !1;
|
|
8870
8870
|
for (const $ of h) {
|
|
8871
8871
|
if (g && Kt($.text)) {
|
|
8872
|
-
v === void 0 ? a.push({ ...r($.line), text: "" }) : $.text !== Nn(v,
|
|
8872
|
+
v === void 0 ? a.push({ ...r($.line), text: "" }) : $.text !== Nn(v, c.chartCarried) && a.push({
|
|
8873
8873
|
...r($.line),
|
|
8874
|
-
text: `${p}${Nn(v,
|
|
8874
|
+
text: `${p}${Nn(v, c.chartCarried)}
|
|
8875
8875
|
`
|
|
8876
8876
|
}), y = !0;
|
|
8877
8877
|
continue;
|
|
@@ -8887,7 +8887,7 @@ function tb(e) {
|
|
|
8887
8887
|
` });
|
|
8888
8888
|
}
|
|
8889
8889
|
const x = m.filter(($) => !w.has(Li($) ?? $));
|
|
8890
|
-
if (g && v !== void 0 && !y && x.push(Nn(v,
|
|
8890
|
+
if (g && v !== void 0 && !y && x.push(Nn(v, c.chartCarried)), x.length > 0) {
|
|
8891
8891
|
const $ = n[f];
|
|
8892
8892
|
a.push({
|
|
8893
8893
|
start: $,
|
|
@@ -8896,26 +8896,26 @@ function tb(e) {
|
|
|
8896
8896
|
`).join("")
|
|
8897
8897
|
});
|
|
8898
8898
|
}
|
|
8899
|
-
if (Oe(
|
|
8900
|
-
const k = Bf(e,
|
|
8899
|
+
if (Oe(d.filters) === Oe(c.filters)) continue;
|
|
8900
|
+
const k = Bf(e, c);
|
|
8901
8901
|
if (!k)
|
|
8902
8902
|
return {
|
|
8903
8903
|
ok: !1,
|
|
8904
|
-
reason: `Could not find \`${
|
|
8904
|
+
reason: `Could not find \`${c.name}\`'s declaration to filter it.`
|
|
8905
8905
|
};
|
|
8906
8906
|
if (k.body.kind === "reference") {
|
|
8907
|
-
const $ = lb(e,
|
|
8907
|
+
const $ = lb(e, c, k);
|
|
8908
8908
|
if ($) return $;
|
|
8909
8909
|
continue;
|
|
8910
8910
|
}
|
|
8911
8911
|
if (k.body.kind !== "inline")
|
|
8912
8912
|
return {
|
|
8913
8913
|
ok: !1,
|
|
8914
|
-
reason: `\`${
|
|
8914
|
+
reason: `\`${c.name}\`'s body is ${k.body.why}, so there is no single first stage to write its filter into.`
|
|
8915
8915
|
};
|
|
8916
|
-
const S = jf(
|
|
8917
|
-
if (S) return Gf(
|
|
8918
|
-
const C = qf(e,
|
|
8916
|
+
const S = jf(c.filters, k.body.stage);
|
|
8917
|
+
if (S) return Gf(c.name, S.given);
|
|
8918
|
+
const C = qf(e, c, k.body.stage);
|
|
8919
8919
|
if (C) return C;
|
|
8920
8920
|
}
|
|
8921
8921
|
}
|
|
@@ -8960,9 +8960,9 @@ ${e.markdown === "" ? "" : `${e.markdown}
|
|
|
8960
8960
|
function ib(e) {
|
|
8961
8961
|
const { sourceText: t, lines: n, wholeLine: r, current: i, next: s, parsed: o, edits: a } = e, l = new Map(
|
|
8962
8962
|
i.tiles.filter(je).map((h) => [h.name, h])
|
|
8963
|
-
), u = s.tiles.filter(je),
|
|
8963
|
+
), u = s.tiles.filter(je), c = (h) => o.textBlocks.find((p) => p.name === h), d = new Set(u.map((h) => h.name));
|
|
8964
8964
|
for (const h of l.keys()) {
|
|
8965
|
-
const p =
|
|
8965
|
+
const p = d.has(h) ? void 0 : c(h);
|
|
8966
8966
|
if (!p) continue;
|
|
8967
8967
|
const m = It(o, p.span.end - 1);
|
|
8968
8968
|
a.push({ ...p.span, text: "" });
|
|
@@ -8971,7 +8971,7 @@ function ib(e) {
|
|
|
8971
8971
|
}
|
|
8972
8972
|
const f = [];
|
|
8973
8973
|
for (const h of u) {
|
|
8974
|
-
const p = l.get(h.name), m =
|
|
8974
|
+
const p = l.get(h.name), m = c(h.name);
|
|
8975
8975
|
if (p === void 0) {
|
|
8976
8976
|
if (m)
|
|
8977
8977
|
return {
|
|
@@ -8983,7 +8983,7 @@ function ib(e) {
|
|
|
8983
8983
|
}
|
|
8984
8984
|
if (f.length > 0) {
|
|
8985
8985
|
const h = o.textBlocks.filter(
|
|
8986
|
-
(v) => v.name === void 0 ||
|
|
8986
|
+
(v) => v.name === void 0 || d.has(v.name)
|
|
8987
8987
|
), p = h[h.length - 1], m = o.sources.find((v) => v.name.endsWith("_tiles"));
|
|
8988
8988
|
if (p) {
|
|
8989
8989
|
const v = p.span.end, g = t.slice(v);
|
|
@@ -9032,12 +9032,12 @@ function sb(e, t) {
|
|
|
9032
9032
|
for (const o of t.tiles) {
|
|
9033
9033
|
const a = n.get(ct(o));
|
|
9034
9034
|
if (je(o)) {
|
|
9035
|
-
const
|
|
9035
|
+
const d = rb(
|
|
9036
9036
|
o,
|
|
9037
9037
|
a && je(a) ? a : void 0,
|
|
9038
9038
|
r
|
|
9039
9039
|
);
|
|
9040
|
-
if (
|
|
9040
|
+
if (d) return d;
|
|
9041
9041
|
continue;
|
|
9042
9042
|
}
|
|
9043
9043
|
const l = a && ke(a) ? a : void 0;
|
|
@@ -9045,22 +9045,22 @@ function sb(e, t) {
|
|
|
9045
9045
|
const u = o.chart;
|
|
9046
9046
|
if (u !== void 0 && u !== "default" && u !== "none" && !Ss(u) && !(u === "custom" && l?.chart === "custom"))
|
|
9047
9047
|
return `"${String(u)}" is not a chart this editor writes.`;
|
|
9048
|
-
const
|
|
9049
|
-
for (const
|
|
9050
|
-
if (!
|
|
9048
|
+
const c = new Set(l?.filters?.map((d) => d.field));
|
|
9049
|
+
for (const d of o.filters ?? [])
|
|
9050
|
+
if (!c.has(d.field) && /[\r\n]/.test(d.field))
|
|
9051
9051
|
return "A filter field is one line.";
|
|
9052
9052
|
if (a === void 0) {
|
|
9053
|
-
const
|
|
9054
|
-
o.declaration.kind === "reference" &&
|
|
9055
|
-
for (const f of
|
|
9053
|
+
const d = [o.name, o.source];
|
|
9054
|
+
o.declaration.kind === "reference" && d.push(o.declaration.from);
|
|
9055
|
+
for (const f of d) {
|
|
9056
9056
|
const h = bi(f);
|
|
9057
9057
|
if (h) return h;
|
|
9058
9058
|
}
|
|
9059
9059
|
}
|
|
9060
|
-
for (const
|
|
9061
|
-
const f = o[
|
|
9062
|
-
if (f === void 0 || f === l?.[
|
|
9063
|
-
const h = Qt(`tile ${
|
|
9060
|
+
for (const d of ["label", "subtitle"]) {
|
|
9061
|
+
const f = o[d];
|
|
9062
|
+
if (f === void 0 || f === l?.[d]) continue;
|
|
9063
|
+
const h = Qt(`tile ${d}`, f);
|
|
9064
9064
|
if (h) return h;
|
|
9065
9065
|
}
|
|
9066
9066
|
}
|
|
@@ -9093,17 +9093,17 @@ function sb(e, t) {
|
|
|
9093
9093
|
if (u) return `The suggest source is not a name. ${u}`;
|
|
9094
9094
|
}
|
|
9095
9095
|
for (const u of ["query", "dimension"]) {
|
|
9096
|
-
const
|
|
9097
|
-
if (
|
|
9098
|
-
const
|
|
9099
|
-
if (
|
|
9096
|
+
const c = o.suggest?.[u];
|
|
9097
|
+
if (c === void 0 || c === a?.suggest?.[u]) continue;
|
|
9098
|
+
const d = Qt(`suggest ${u}`, c);
|
|
9099
|
+
if (d) return d;
|
|
9100
9100
|
}
|
|
9101
9101
|
for (const u of ["label", "description"]) {
|
|
9102
|
-
const
|
|
9103
|
-
if (
|
|
9102
|
+
const c = o[u];
|
|
9103
|
+
if (c === void 0 || c === s.get(o.name)?.[u])
|
|
9104
9104
|
continue;
|
|
9105
|
-
const
|
|
9106
|
-
if (
|
|
9105
|
+
const d = Qt(`given ${u}`, c);
|
|
9106
|
+
if (d) return d;
|
|
9107
9107
|
}
|
|
9108
9108
|
}
|
|
9109
9109
|
for (const [o, a] of Object.entries(t.startingGivens ?? {})) {
|
|
@@ -9201,9 +9201,9 @@ function qf(e, t, n) {
|
|
|
9201
9201
|
const f = r.trailingComment(It(r, u));
|
|
9202
9202
|
f && f.start >= u && (u = f.end);
|
|
9203
9203
|
}
|
|
9204
|
-
const
|
|
9204
|
+
const c = a !== void 0 && !/,\s*$/.test(r.text.slice(0, u)) ? ", " : " ", d = n.oneLine ? `${c}${l.map(zi).join(", ")}` : l.map((f) => `
|
|
9205
9205
|
${n.indent}${zi(f)}`).join("");
|
|
9206
|
-
i.push({ start: u, end: u, text:
|
|
9206
|
+
i.push({ start: u, end: u, text: d });
|
|
9207
9207
|
}
|
|
9208
9208
|
function lb(e, t, n) {
|
|
9209
9209
|
if (n.body.kind !== "reference") return;
|
|
@@ -9212,23 +9212,23 @@ function lb(e, t, n) {
|
|
|
9212
9212
|
const a = t.filters ?? [];
|
|
9213
9213
|
if (!s) {
|
|
9214
9214
|
if (a.length === 0) return;
|
|
9215
|
-
const
|
|
9216
|
-
r.push({ start: i.end, end: i.end, text:
|
|
9215
|
+
const c = ` + { ${a.map(zi).join(", ")} }`;
|
|
9216
|
+
r.push({ start: i.end, end: i.end, text: c });
|
|
9217
9217
|
return;
|
|
9218
9218
|
}
|
|
9219
9219
|
const l = s.wheres.some(
|
|
9220
|
-
(
|
|
9220
|
+
(c) => c.clauses.some((d) => !d.binding)
|
|
9221
9221
|
), u = s.statements.some(
|
|
9222
|
-
(
|
|
9222
|
+
(c) => !s.wheres.some((d) => d.span.start === c.span.start)
|
|
9223
9223
|
);
|
|
9224
9224
|
if (a.length === 0 && !l && !u) {
|
|
9225
|
-
const
|
|
9226
|
-
if (
|
|
9225
|
+
const c = { start: i.end, end: s.span.end }, d = e.parsed.commentIn(c);
|
|
9226
|
+
if (d)
|
|
9227
9227
|
return {
|
|
9228
9228
|
ok: !1,
|
|
9229
|
-
reason: `Removing the last filter from \`${t.name}\` would also remove the comment beside its refinement (\`${e.parsed.text.slice(
|
|
9229
|
+
reason: `Removing the last filter from \`${t.name}\` would also remove the comment beside its refinement (\`${e.parsed.text.slice(d.start, d.end).trim()}\`), so nothing was written. Delete it in the file first, or edit the refinement there.`
|
|
9230
9230
|
};
|
|
9231
|
-
r.push({ ...
|
|
9231
|
+
r.push({ ...c, text: "" });
|
|
9232
9232
|
return;
|
|
9233
9233
|
}
|
|
9234
9234
|
return qf(e, t, s);
|
|
@@ -9263,16 +9263,16 @@ async function uc(e, t, n) {
|
|
|
9263
9263
|
reason: `Cannot edit a file that will not open: ${l.reason}`
|
|
9264
9264
|
};
|
|
9265
9265
|
const u = e.split(`
|
|
9266
|
-
`),
|
|
9267
|
-
start:
|
|
9268
|
-
end: v + 1 <
|
|
9266
|
+
`), c = zy(e), d = (v) => ({
|
|
9267
|
+
start: c[v],
|
|
9268
|
+
end: v + 1 < c.length ? c[v + 1] : e.length
|
|
9269
9269
|
}), f = (v) => /^\s*/.exec(u[v])?.[0] ?? "", h = [], p = {
|
|
9270
9270
|
...o,
|
|
9271
9271
|
sourceText: e,
|
|
9272
9272
|
parsed: l.parsed,
|
|
9273
9273
|
lines: u,
|
|
9274
|
-
starts:
|
|
9275
|
-
wholeLine:
|
|
9274
|
+
starts: c,
|
|
9275
|
+
wholeLine: d,
|
|
9276
9276
|
indentOf: f,
|
|
9277
9277
|
current: i,
|
|
9278
9278
|
next: s,
|
|
@@ -9343,13 +9343,13 @@ function Kf({
|
|
|
9343
9343
|
const { theme: i } = rt(), [s, o] = U(!1), a = ue(
|
|
9344
9344
|
() => s ? { text: e } : void 0,
|
|
9345
9345
|
[s, e]
|
|
9346
|
-
), { draft: l, patch: u, close:
|
|
9346
|
+
), { draft: l, patch: u, close: c, discard: d } = Kc(
|
|
9347
9347
|
a,
|
|
9348
9348
|
s,
|
|
9349
9349
|
(g) => n(g.text),
|
|
9350
9350
|
() => o(!1)
|
|
9351
9351
|
), f = s && l !== void 0 && l.text !== e, h = l !== void 0 && l.text !== e ? Ni(l.text) : void 0;
|
|
9352
|
-
pf(f, () => h !== void 0 ? !1 : (
|
|
9352
|
+
pf(f, () => h !== void 0 ? !1 : (c(), !0));
|
|
9353
9353
|
const p = J(null), m = J(!1);
|
|
9354
9354
|
ye(() => {
|
|
9355
9355
|
s || (m.current = !1);
|
|
@@ -9390,7 +9390,7 @@ function Kf({
|
|
|
9390
9390
|
);
|
|
9391
9391
|
}
|
|
9392
9392
|
const w = l.text !== e ? Ni(l.text) : void 0, v = () => {
|
|
9393
|
-
w === void 0 &&
|
|
9393
|
+
w === void 0 && c();
|
|
9394
9394
|
};
|
|
9395
9395
|
return /* @__PURE__ */ K(Se, { spacing: 1, children: [
|
|
9396
9396
|
/* @__PURE__ */ _(
|
|
@@ -9414,7 +9414,7 @@ function Kf({
|
|
|
9414
9414
|
g.key === "Escape" ? v() : g.key === "Enter" && (g.metaKey || g.ctrlKey) && (g.preventDefault(), v());
|
|
9415
9415
|
},
|
|
9416
9416
|
onBlur: (g) => {
|
|
9417
|
-
g.relatedTarget instanceof Node && p.current?.contains(g.relatedTarget) ||
|
|
9417
|
+
g.relatedTarget instanceof Node && p.current?.contains(g.relatedTarget) || c();
|
|
9418
9418
|
}
|
|
9419
9419
|
}
|
|
9420
9420
|
),
|
|
@@ -9435,7 +9435,7 @@ function Kf({
|
|
|
9435
9435
|
size: "small",
|
|
9436
9436
|
onMouseDown: (g) => g.preventDefault(),
|
|
9437
9437
|
onClick: () => {
|
|
9438
|
-
|
|
9438
|
+
d(), o(!1);
|
|
9439
9439
|
},
|
|
9440
9440
|
children: "Cancel"
|
|
9441
9441
|
}
|
|
@@ -9470,8 +9470,8 @@ function fb({
|
|
|
9470
9470
|
onSelect: a,
|
|
9471
9471
|
onOpenMenu: l,
|
|
9472
9472
|
resizing: u = !1,
|
|
9473
|
-
width:
|
|
9474
|
-
onResizeStart:
|
|
9473
|
+
width: c,
|
|
9474
|
+
onResizeStart: d,
|
|
9475
9475
|
onResizeMove: f,
|
|
9476
9476
|
onResizeEnd: h,
|
|
9477
9477
|
children: p
|
|
@@ -9601,27 +9601,27 @@ function fb({
|
|
|
9601
9601
|
children: /* @__PURE__ */ _(mb, {})
|
|
9602
9602
|
}
|
|
9603
9603
|
),
|
|
9604
|
-
|
|
9604
|
+
d && /* @__PURE__ */ _(
|
|
9605
9605
|
ze,
|
|
9606
9606
|
{
|
|
9607
9607
|
className: "builder-affordance",
|
|
9608
9608
|
[Ef]: "",
|
|
9609
9609
|
role: "separator",
|
|
9610
|
-
tabIndex:
|
|
9610
|
+
tabIndex: c ? 0 : -1,
|
|
9611
9611
|
"aria-orientation": "vertical",
|
|
9612
9612
|
"aria-label": `Width of ${li(e)}`,
|
|
9613
|
-
...
|
|
9614
|
-
"aria-valuenow":
|
|
9613
|
+
...c ? {
|
|
9614
|
+
"aria-valuenow": c.span,
|
|
9615
9615
|
"aria-valuemin": 1,
|
|
9616
|
-
"aria-valuemax":
|
|
9617
|
-
"aria-valuetext": `${
|
|
9616
|
+
"aria-valuemax": c.columns,
|
|
9617
|
+
"aria-valuetext": `${c.span} of ${c.columns} columns`
|
|
9618
9618
|
} : {},
|
|
9619
9619
|
onKeyDown: (v) => {
|
|
9620
|
-
if (!
|
|
9621
|
-
const g = v.key === "ArrowRight" ?
|
|
9622
|
-
g !== void 0 && (v.preventDefault(), v.stopPropagation(),
|
|
9620
|
+
if (!c) return;
|
|
9621
|
+
const g = v.key === "ArrowRight" ? c.span + 1 : v.key === "ArrowLeft" ? c.span - 1 : v.key === "Home" ? 1 : v.key === "End" ? c.columns : void 0;
|
|
9622
|
+
g !== void 0 && (v.preventDefault(), v.stopPropagation(), c.onStep(Math.min(Math.max(g, 1), c.columns)));
|
|
9623
9623
|
},
|
|
9624
|
-
onPointerDown:
|
|
9624
|
+
onPointerDown: d,
|
|
9625
9625
|
onPointerMove: f,
|
|
9626
9626
|
onPointerUp: h,
|
|
9627
9627
|
onPointerCancel: h,
|
|
@@ -9836,8 +9836,8 @@ function vb({
|
|
|
9836
9836
|
canAdd: a,
|
|
9837
9837
|
selected: l,
|
|
9838
9838
|
flash: u,
|
|
9839
|
-
menuIndex:
|
|
9840
|
-
onSelect:
|
|
9839
|
+
menuIndex: c,
|
|
9840
|
+
onSelect: d,
|
|
9841
9841
|
onOpenMenu: f,
|
|
9842
9842
|
openAdd: h,
|
|
9843
9843
|
editTile: p,
|
|
@@ -9845,7 +9845,7 @@ function vb({
|
|
|
9845
9845
|
}) {
|
|
9846
9846
|
const { dragging: b, preview: w, onDragStart: v, onDragOver: g, onDragEnd: y } = t, { resize: x, startResize: k, onResize: S, endResize: C } = n, $ = x !== void 0 ? e.document.tiles.map(
|
|
9847
9847
|
(N, q) => q === x.index ? { ...N, colspan: x.span } : N
|
|
9848
|
-
) : w ?? e.document.tiles, E = e.document.tiles.length === 0, B = b ? Iv($, i) : $.map(gf), D = (N) => yb(N, cs(N), p);
|
|
9848
|
+
) : w ?? e.document.tiles, E = e.document.tiles.length === 0, B = b || x !== void 0 ? Iv($, i) : $.map(gf), D = (N) => yb(N, cs(N), p);
|
|
9849
9849
|
return /* @__PURE__ */ K(Be, { children: [
|
|
9850
9850
|
/* @__PURE__ */ _(
|
|
9851
9851
|
uv,
|
|
@@ -9874,9 +9874,9 @@ function vb({
|
|
|
9874
9874
|
index: j,
|
|
9875
9875
|
selected: j === l,
|
|
9876
9876
|
flash: Ve(q) === u,
|
|
9877
|
-
menuOpen:
|
|
9877
|
+
menuOpen: c === j,
|
|
9878
9878
|
bare: o === "none",
|
|
9879
|
-
...s && a ? {
|
|
9879
|
+
...s && a && j < e.document.tiles.length - 1 ? {
|
|
9880
9880
|
onInsertAfter: () => h(j + 1)
|
|
9881
9881
|
} : {},
|
|
9882
9882
|
...i > 1 && bb(q) ? {
|
|
@@ -9895,7 +9895,7 @@ function vb({
|
|
|
9895
9895
|
onResizeMove: S,
|
|
9896
9896
|
onResizeEnd: C
|
|
9897
9897
|
} : {},
|
|
9898
|
-
onSelect: () =>
|
|
9898
|
+
onSelect: () => d(j),
|
|
9899
9899
|
onOpenMenu: (X) => f(X, j),
|
|
9900
9900
|
children: je(q) ? /* @__PURE__ */ _(
|
|
9901
9901
|
ub,
|
|
@@ -10141,8 +10141,8 @@ function Sb({
|
|
|
10141
10141
|
savesTo: a = "package",
|
|
10142
10142
|
saveLabel: l,
|
|
10143
10143
|
saveButton: u,
|
|
10144
|
-
actions:
|
|
10145
|
-
onAddTile:
|
|
10144
|
+
actions: c,
|
|
10145
|
+
onAddTile: d,
|
|
10146
10146
|
onExit: f,
|
|
10147
10147
|
layout: h,
|
|
10148
10148
|
onLayoutChange: p
|
|
@@ -10181,16 +10181,16 @@ function Sb({
|
|
|
10181
10181
|
) }),
|
|
10182
10182
|
/* @__PURE__ */ _(Is, { orientation: "vertical", flexItem: !0, sx: { mx: 0.5 } })
|
|
10183
10183
|
] }),
|
|
10184
|
-
|
|
10184
|
+
d && /* @__PURE__ */ _(
|
|
10185
10185
|
Pe,
|
|
10186
10186
|
{
|
|
10187
10187
|
startIcon: /* @__PURE__ */ _(Ur, {}),
|
|
10188
|
-
onClick:
|
|
10188
|
+
onClick: d,
|
|
10189
10189
|
"aria-label": "Add tile",
|
|
10190
10190
|
children: "Tile"
|
|
10191
10191
|
}
|
|
10192
10192
|
),
|
|
10193
|
-
|
|
10193
|
+
d && /* @__PURE__ */ _(Is, { orientation: "vertical", flexItem: !0, sx: { mx: 0.5 } }),
|
|
10194
10194
|
/* @__PURE__ */ _(zt, { title: `Undo (${Ys}Z)`, children: /* @__PURE__ */ _("span", { children: /* @__PURE__ */ _(
|
|
10195
10195
|
Wi,
|
|
10196
10196
|
{
|
|
@@ -10211,8 +10211,8 @@ function Sb({
|
|
|
10211
10211
|
children: /* @__PURE__ */ _(_b, { fontSize: "small" })
|
|
10212
10212
|
}
|
|
10213
10213
|
) }) }),
|
|
10214
|
-
(
|
|
10215
|
-
|
|
10214
|
+
(c || o || f) && /* @__PURE__ */ _(Is, { orientation: "vertical", flexItem: !0, sx: { mx: 0.5 } }),
|
|
10215
|
+
c,
|
|
10216
10216
|
o ? /* @__PURE__ */ _(
|
|
10217
10217
|
zt,
|
|
10218
10218
|
{
|
|
@@ -10273,137 +10273,125 @@ function Eb({
|
|
|
10273
10273
|
onAdd: i,
|
|
10274
10274
|
addDisabledReason: s,
|
|
10275
10275
|
onRemove: o,
|
|
10276
|
-
|
|
10276
|
+
sticky: a = !0,
|
|
10277
|
+
children: l
|
|
10277
10278
|
}) {
|
|
10278
|
-
const { theme:
|
|
10279
|
-
return /* @__PURE__ */ _(Be, { children: /* @__PURE__ */ K(
|
|
10280
|
-
|
|
10281
|
-
|
|
10282
|
-
|
|
10283
|
-
|
|
10284
|
-
|
|
10285
|
-
|
|
10286
|
-
// reach on a long page.
|
|
10287
|
-
top: 0,
|
|
10288
|
-
// The page's ground, as the reader's sticky control row uses:
|
|
10289
|
-
// this bar is page chrome, not the chart canvas.
|
|
10290
|
-
zIndex: ch,
|
|
10291
|
-
bgcolor: "background.default",
|
|
10292
|
-
pb: 1
|
|
10293
|
-
},
|
|
10294
|
-
children: [
|
|
10295
|
-
/* @__PURE__ */ _(
|
|
10279
|
+
const { theme: u } = rt();
|
|
10280
|
+
return /* @__PURE__ */ _(Be, { children: /* @__PURE__ */ _(ch, { sticky: a, children: /* @__PURE__ */ K(Se, { sx: { gap: 1 }, children: [
|
|
10281
|
+
/* @__PURE__ */ _(
|
|
10282
|
+
Se,
|
|
10283
|
+
{
|
|
10284
|
+
direction: "row",
|
|
10285
|
+
sx: { gap: 2, alignItems: "center", minHeight: 32 },
|
|
10286
|
+
children: /* @__PURE__ */ K(
|
|
10296
10287
|
Se,
|
|
10297
10288
|
{
|
|
10298
10289
|
direction: "row",
|
|
10299
|
-
|
|
10300
|
-
|
|
10301
|
-
|
|
10302
|
-
|
|
10303
|
-
|
|
10304
|
-
|
|
10305
|
-
|
|
10306
|
-
|
|
10307
|
-
|
|
10308
|
-
|
|
10309
|
-
|
|
10310
|
-
|
|
10311
|
-
|
|
10312
|
-
|
|
10313
|
-
|
|
10314
|
-
|
|
10315
|
-
|
|
10316
|
-
|
|
10317
|
-
|
|
10318
|
-
|
|
10319
|
-
|
|
10320
|
-
|
|
10321
|
-
|
|
10322
|
-
|
|
10323
|
-
|
|
10324
|
-
|
|
10325
|
-
|
|
10326
|
-
|
|
10327
|
-
|
|
10328
|
-
|
|
10329
|
-
|
|
10330
|
-
|
|
10331
|
-
|
|
10332
|
-
|
|
10333
|
-
|
|
10334
|
-
|
|
10335
|
-
|
|
10336
|
-
|
|
10337
|
-
|
|
10338
|
-
|
|
10339
|
-
|
|
10340
|
-
|
|
10341
|
-
|
|
10342
|
-
|
|
10290
|
+
role: "group",
|
|
10291
|
+
"aria-label": "Filters",
|
|
10292
|
+
sx: {
|
|
10293
|
+
gap: 1,
|
|
10294
|
+
alignItems: "center",
|
|
10295
|
+
flexWrap: "wrap",
|
|
10296
|
+
flex: 1,
|
|
10297
|
+
minWidth: 0
|
|
10298
|
+
},
|
|
10299
|
+
children: [
|
|
10300
|
+
/* @__PURE__ */ _(
|
|
10301
|
+
Tb,
|
|
10302
|
+
{
|
|
10303
|
+
sx: {
|
|
10304
|
+
fontSize: 18,
|
|
10305
|
+
color: u.tileTitle,
|
|
10306
|
+
opacity: 0.7
|
|
10307
|
+
}
|
|
10308
|
+
}
|
|
10309
|
+
),
|
|
10310
|
+
/* @__PURE__ */ _(
|
|
10311
|
+
ve,
|
|
10312
|
+
{
|
|
10313
|
+
variant: "subtitle2",
|
|
10314
|
+
sx: { color: u.tileTitle, mr: 0.5 },
|
|
10315
|
+
children: "Filters"
|
|
10316
|
+
}
|
|
10317
|
+
),
|
|
10318
|
+
e.length === 0 && /* @__PURE__ */ _(
|
|
10319
|
+
ve,
|
|
10320
|
+
{
|
|
10321
|
+
variant: "body2",
|
|
10322
|
+
sx: { color: u.tileTitle, opacity: 0.8 },
|
|
10323
|
+
children: "None yet."
|
|
10324
|
+
}
|
|
10325
|
+
),
|
|
10326
|
+
e.map((c) => {
|
|
10327
|
+
const d = n(
|
|
10328
|
+
c.name,
|
|
10329
|
+
c.type
|
|
10330
|
+
);
|
|
10331
|
+
return /* @__PURE__ */ _(
|
|
10332
|
+
zt,
|
|
10333
|
+
{
|
|
10334
|
+
title: d.length > 0 ? `$${c.name} · cannot filter on: ${d.join(", ")}` : `$${c.name} · ${c.origin === "dashboard" ? "declared here" : "from the model"} · ${c.boundTiles} of ${t} tiles`,
|
|
10335
|
+
children: /* @__PURE__ */ _(
|
|
10336
|
+
to,
|
|
10343
10337
|
{
|
|
10344
|
-
|
|
10345
|
-
|
|
10346
|
-
|
|
10338
|
+
size: "small",
|
|
10339
|
+
label: `${c.label ?? c.name}${c.boundTiles === 0 ? " · unused" : ""}`,
|
|
10340
|
+
"aria-label": `Edit filter ${c.name}`,
|
|
10341
|
+
color: d.length > 0 ? "warning" : "default",
|
|
10342
|
+
variant: c.origin === "dashboard" ? "filled" : "outlined",
|
|
10343
|
+
onClick: () => r(c),
|
|
10344
|
+
onDelete: () => o(c.name),
|
|
10345
|
+
deleteIcon: /* @__PURE__ */ _(
|
|
10346
|
+
Ob,
|
|
10347
10347
|
{
|
|
10348
|
-
|
|
10349
|
-
label: `${u.label ?? u.name}${u.boundTiles === 0 ? " · unused" : ""}`,
|
|
10350
|
-
"aria-label": `Edit filter ${u.name}`,
|
|
10351
|
-
color: d.length > 0 ? "warning" : "default",
|
|
10352
|
-
variant: u.origin === "dashboard" ? "filled" : "outlined",
|
|
10353
|
-
onClick: () => r(u),
|
|
10354
|
-
onDelete: () => o(u.name),
|
|
10355
|
-
deleteIcon: /* @__PURE__ */ _(
|
|
10356
|
-
Ob,
|
|
10357
|
-
{
|
|
10358
|
-
"aria-label": `Remove filter ${u.name}`
|
|
10359
|
-
}
|
|
10360
|
-
),
|
|
10361
|
-
sx: {
|
|
10362
|
-
// Faint when nothing binds it: declared, but not yet a
|
|
10363
|
-
// control a reader would see.
|
|
10364
|
-
opacity: u.boundTiles === 0 ? 0.6 : 1,
|
|
10365
|
-
cursor: "pointer",
|
|
10366
|
-
transition: `opacity ${mt}`,
|
|
10367
|
-
...Gt
|
|
10368
|
-
}
|
|
10348
|
+
"aria-label": `Remove filter ${c.name}`
|
|
10369
10349
|
}
|
|
10370
|
-
)
|
|
10371
|
-
|
|
10372
|
-
|
|
10373
|
-
|
|
10374
|
-
|
|
10375
|
-
|
|
10376
|
-
|
|
10377
|
-
|
|
10378
|
-
component: "button",
|
|
10379
|
-
size: "small",
|
|
10380
|
-
variant: "outlined",
|
|
10381
|
-
icon: /* @__PURE__ */ _(Ur, {}),
|
|
10382
|
-
label: "Filter",
|
|
10383
|
-
"aria-label": "Add filter",
|
|
10384
|
-
"aria-haspopup": "dialog",
|
|
10385
|
-
disabled: s !== void 0,
|
|
10386
|
-
onClick: () => i(),
|
|
10387
|
-
sx: {
|
|
10388
|
-
cursor: "pointer",
|
|
10389
|
-
color: l.tileTitle,
|
|
10390
|
-
borderStyle: "dashed",
|
|
10391
|
-
"& .MuiChip-icon": {
|
|
10392
|
-
color: "inherit",
|
|
10393
|
-
fontSize: 16
|
|
10350
|
+
),
|
|
10351
|
+
sx: {
|
|
10352
|
+
// Faint when nothing binds it: declared, but not yet a
|
|
10353
|
+
// control a reader would see.
|
|
10354
|
+
opacity: c.boundTiles === 0 ? 0.6 : 1,
|
|
10355
|
+
cursor: "pointer",
|
|
10356
|
+
transition: `opacity ${mt}`,
|
|
10357
|
+
...Gt
|
|
10394
10358
|
}
|
|
10395
10359
|
}
|
|
10360
|
+
)
|
|
10361
|
+
},
|
|
10362
|
+
c.name
|
|
10363
|
+
);
|
|
10364
|
+
}),
|
|
10365
|
+
/* @__PURE__ */ _(zt, { title: s ?? "", children: /* @__PURE__ */ _("span", { children: /* @__PURE__ */ _(
|
|
10366
|
+
to,
|
|
10367
|
+
{
|
|
10368
|
+
component: "button",
|
|
10369
|
+
size: "small",
|
|
10370
|
+
variant: "outlined",
|
|
10371
|
+
icon: /* @__PURE__ */ _(Ur, {}),
|
|
10372
|
+
label: "Filter",
|
|
10373
|
+
"aria-label": "Add filter",
|
|
10374
|
+
"aria-haspopup": "dialog",
|
|
10375
|
+
disabled: s !== void 0,
|
|
10376
|
+
onClick: () => i(),
|
|
10377
|
+
sx: {
|
|
10378
|
+
cursor: "pointer",
|
|
10379
|
+
color: u.tileTitle,
|
|
10380
|
+
borderStyle: "dashed",
|
|
10381
|
+
"& .MuiChip-icon": {
|
|
10382
|
+
color: "inherit",
|
|
10383
|
+
fontSize: 16
|
|
10396
10384
|
}
|
|
10397
|
-
|
|
10398
|
-
|
|
10399
|
-
}
|
|
10400
|
-
|
|
10385
|
+
}
|
|
10386
|
+
}
|
|
10387
|
+
) }) })
|
|
10388
|
+
]
|
|
10401
10389
|
}
|
|
10402
|
-
)
|
|
10403
|
-
|
|
10404
|
-
|
|
10405
|
-
|
|
10406
|
-
) });
|
|
10390
|
+
)
|
|
10391
|
+
}
|
|
10392
|
+
),
|
|
10393
|
+
l
|
|
10394
|
+
] }) }) });
|
|
10407
10395
|
}
|
|
10408
10396
|
function Cb(e, t) {
|
|
10409
10397
|
const n = new Map(
|
|
@@ -10429,24 +10417,24 @@ function Ib({
|
|
|
10429
10417
|
(m) => m === "description" ? m : void 0
|
|
10430
10418
|
),
|
|
10431
10419
|
[]
|
|
10432
|
-
), l = he(() => r("description"), []), u = he(() => r(void 0), []), [
|
|
10420
|
+
), l = he(() => r("description"), []), u = he(() => r(void 0), []), [c, d] = U(void 0), f = J(!1), h = J(e.document);
|
|
10433
10421
|
ye(() => {
|
|
10434
10422
|
const m = h.current;
|
|
10435
10423
|
if (h.current = e.document, !f.current) return;
|
|
10436
10424
|
f.current = !1;
|
|
10437
10425
|
const b = Cb(m, e.document);
|
|
10438
10426
|
if (b === void 0) return;
|
|
10439
|
-
|
|
10427
|
+
d(b), Array.from(
|
|
10440
10428
|
t.current?.querySelectorAll("[data-tile-key]") ?? []
|
|
10441
10429
|
).find((v) => v.dataset.tileKey === b)?.scrollIntoView?.({
|
|
10442
10430
|
block: "nearest",
|
|
10443
10431
|
behavior: dh()
|
|
10444
10432
|
});
|
|
10445
10433
|
}, [e.document, t]), ye(() => {
|
|
10446
|
-
if (
|
|
10447
|
-
const m = setTimeout(() =>
|
|
10434
|
+
if (c === void 0) return;
|
|
10435
|
+
const m = setTimeout(() => d(void 0), 1500);
|
|
10448
10436
|
return () => clearTimeout(m);
|
|
10449
|
-
}, [
|
|
10437
|
+
}, [c]);
|
|
10450
10438
|
const p = ue(
|
|
10451
10439
|
() => ({
|
|
10452
10440
|
...e,
|
|
@@ -10466,7 +10454,7 @@ function Ib({
|
|
|
10466
10454
|
deselectTile: a,
|
|
10467
10455
|
selectDescription: l,
|
|
10468
10456
|
clearSelection: u,
|
|
10469
|
-
flash:
|
|
10457
|
+
flash: c,
|
|
10470
10458
|
stepEditor: p
|
|
10471
10459
|
};
|
|
10472
10460
|
}
|
|
@@ -10479,30 +10467,30 @@ function Db({
|
|
|
10479
10467
|
}) {
|
|
10480
10468
|
const [s, o] = U("idle"), [a, l] = U(!1), u = J(r);
|
|
10481
10469
|
u.current = r;
|
|
10482
|
-
const
|
|
10483
|
-
|
|
10484
|
-
const
|
|
10485
|
-
const p = ++
|
|
10470
|
+
const c = J(i);
|
|
10471
|
+
c.current = i;
|
|
10472
|
+
const d = J(0), f = he(async () => {
|
|
10473
|
+
const p = ++d.current;
|
|
10486
10474
|
l(!1), o("saving");
|
|
10487
10475
|
try {
|
|
10488
10476
|
await u.current();
|
|
10489
10477
|
} catch {
|
|
10490
|
-
|
|
10478
|
+
d.current === p && o("idle");
|
|
10491
10479
|
return;
|
|
10492
10480
|
}
|
|
10493
|
-
|
|
10481
|
+
d.current === p && l(!0);
|
|
10494
10482
|
}, []);
|
|
10495
10483
|
return ye(() => {
|
|
10496
10484
|
if (s === "waiting") {
|
|
10497
10485
|
if (t) return;
|
|
10498
|
-
e ? f() : (o("idle"),
|
|
10486
|
+
e ? f() : (o("idle"), c.current());
|
|
10499
10487
|
} else if (s === "saving") {
|
|
10500
10488
|
if (!a || t) return;
|
|
10501
|
-
o("idle"), e ||
|
|
10489
|
+
o("idle"), e || c.current();
|
|
10502
10490
|
}
|
|
10503
10491
|
}, [s, a, t, e, f]), {
|
|
10504
10492
|
requestExit: he(() => {
|
|
10505
|
-
s === "idle" && (e ? o("asking") :
|
|
10493
|
+
s === "idle" && (e ? o("asking") : c.current());
|
|
10506
10494
|
}, [s, e]),
|
|
10507
10495
|
dialog: {
|
|
10508
10496
|
open: s === "asking",
|
|
@@ -10511,7 +10499,7 @@ function Db({
|
|
|
10511
10499
|
s === "asking" && o("idle");
|
|
10512
10500
|
},
|
|
10513
10501
|
onDiscard: () => {
|
|
10514
|
-
s === "asking" && (o("idle"),
|
|
10502
|
+
s === "asking" && (o("idle"), c.current());
|
|
10515
10503
|
},
|
|
10516
10504
|
onSaveAndExit: () => {
|
|
10517
10505
|
s === "asking" && (t ? o("waiting") : f());
|
|
@@ -10531,7 +10519,7 @@ function Ab({
|
|
|
10531
10519
|
prepare: l,
|
|
10532
10520
|
shortcuts: u
|
|
10533
10521
|
}) {
|
|
10534
|
-
const [
|
|
10522
|
+
const [c, d] = U(!1), [f, h] = U(!1), p = J(null), m = J(o);
|
|
10535
10523
|
m.current = o;
|
|
10536
10524
|
const b = e.dirty || s, w = (e.edited ?? e.dirty) || s;
|
|
10537
10525
|
ye(() => {
|
|
@@ -10546,7 +10534,7 @@ function Ab({
|
|
|
10546
10534
|
h(!1);
|
|
10547
10535
|
}, [e.document]);
|
|
10548
10536
|
const y = he(() => {
|
|
10549
|
-
|
|
10537
|
+
d(!0), h(!1);
|
|
10550
10538
|
const j = Nt(), { structural: X } = e, Q = e.pendingOpen ?? !1, se = m.current.size;
|
|
10551
10539
|
return e.save().then((fe) => {
|
|
10552
10540
|
fe.ok === !0 ? m.current.saved({
|
|
@@ -10555,15 +10543,15 @@ function Ab({
|
|
|
10555
10543
|
fromOpen: Q,
|
|
10556
10544
|
durationMs: Nt() - j
|
|
10557
10545
|
}) : m.current.refused(fe.reason);
|
|
10558
|
-
}).finally(() =>
|
|
10546
|
+
}).finally(() => d(!1));
|
|
10559
10547
|
}, [e]), x = J(!1), k = J(!1);
|
|
10560
10548
|
ye(() => {
|
|
10561
|
-
!k.current ||
|
|
10562
|
-
}, [f,
|
|
10549
|
+
!k.current || c || (k.current = !1, p.current?.focus());
|
|
10550
|
+
}, [f, c]);
|
|
10563
10551
|
const S = he(() => {
|
|
10564
|
-
if (!t ||
|
|
10552
|
+
if (!t || c || x.current || !e.canUndoSave)
|
|
10565
10553
|
return;
|
|
10566
|
-
x.current = !0,
|
|
10554
|
+
x.current = !0, d(!0);
|
|
10567
10555
|
const j = Nt(), X = e.lastSave?.structural ?? !1, Q = m.current.size;
|
|
10568
10556
|
return e.undoSave().then((se) => {
|
|
10569
10557
|
se.ok === !0 ? (k.current = !0, h(!0), m.current.undone({
|
|
@@ -10573,19 +10561,19 @@ function Ab({
|
|
|
10573
10561
|
durationMs: Nt() - j
|
|
10574
10562
|
})) : m.current.undoRefused(se.reason);
|
|
10575
10563
|
}).finally(() => {
|
|
10576
|
-
x.current = !1,
|
|
10564
|
+
x.current = !1, d(!1);
|
|
10577
10565
|
});
|
|
10578
|
-
}, [t,
|
|
10579
|
-
if (!(!t || !e.dirty ||
|
|
10566
|
+
}, [t, c, e]), C = he(() => {
|
|
10567
|
+
if (!(!t || !e.dirty || c))
|
|
10580
10568
|
return y();
|
|
10581
|
-
}, [t, e,
|
|
10569
|
+
}, [t, e, c, y]), $ = J(C);
|
|
10582
10570
|
$.current = C;
|
|
10583
10571
|
const E = he(() => {
|
|
10584
10572
|
const j = () => $.current();
|
|
10585
10573
|
return l ? l(j) : j();
|
|
10586
10574
|
}, [l]), B = Db({
|
|
10587
10575
|
dirty: w,
|
|
10588
|
-
saving:
|
|
10576
|
+
saving: c,
|
|
10589
10577
|
canSave: !!t,
|
|
10590
10578
|
save: E,
|
|
10591
10579
|
onExit: () => r?.()
|
|
@@ -10603,19 +10591,19 @@ function Ab({
|
|
|
10603
10591
|
[u, e, t, E, B.dialog.open]
|
|
10604
10592
|
)
|
|
10605
10593
|
);
|
|
10606
|
-
const D = !!t && !
|
|
10594
|
+
const D = !!t && !c && e.canUndoSave, N = e.lastSave, q = {
|
|
10607
10595
|
canUndo: e.canUndo,
|
|
10608
10596
|
canRedo: e.canRedo,
|
|
10609
10597
|
onUndo: e.undo,
|
|
10610
10598
|
onRedo: e.redo,
|
|
10611
10599
|
dirty: b,
|
|
10612
|
-
saving:
|
|
10600
|
+
saving: c,
|
|
10613
10601
|
saveButton: p,
|
|
10614
10602
|
...t ? { onSave: E } : {},
|
|
10615
10603
|
...r ? { onExit: B.requestExit } : {}
|
|
10616
10604
|
};
|
|
10617
10605
|
return {
|
|
10618
|
-
saving:
|
|
10606
|
+
saving: c,
|
|
10619
10607
|
save: E,
|
|
10620
10608
|
exitGuard: B,
|
|
10621
10609
|
/** Write the file back as it was before the last save, and put the edits back unsaved. */
|
|
@@ -10702,31 +10690,31 @@ function Nb(e, t = /* @__PURE__ */ new Set()) {
|
|
|
10702
10690
|
if (mc(l, t)) continue;
|
|
10703
10691
|
const u = uh(a.modelInfo);
|
|
10704
10692
|
s.set(a, u);
|
|
10705
|
-
for (const { name:
|
|
10706
|
-
|
|
10707
|
-
for (const
|
|
10708
|
-
i.set(
|
|
10693
|
+
for (const { name: c } of a.sources ?? [])
|
|
10694
|
+
c && o.set(c, [...o.get(c) ?? [], l]);
|
|
10695
|
+
for (const c of u)
|
|
10696
|
+
i.set(c, [...i.get(c) ?? [], l]);
|
|
10709
10697
|
}
|
|
10710
10698
|
for (const a of e) {
|
|
10711
10699
|
const l = vc(a);
|
|
10712
10700
|
if (mc(l, t)) continue;
|
|
10713
|
-
const u = Mb(a),
|
|
10714
|
-
for (const
|
|
10715
|
-
const f =
|
|
10701
|
+
const u = Mb(a), c = Lb(a);
|
|
10702
|
+
for (const d of a.sources ?? []) {
|
|
10703
|
+
const f = d.name;
|
|
10716
10704
|
if (!f || !s.get(a)?.has(f) || r.has(f)) continue;
|
|
10717
10705
|
r.add(f);
|
|
10718
|
-
const h = (
|
|
10706
|
+
const h = (d.givens ?? []).map((p) => p.name).filter((p) => typeof p == "string");
|
|
10719
10707
|
n.push({
|
|
10720
10708
|
name: f,
|
|
10721
10709
|
modelPath: l,
|
|
10722
10710
|
exporters: i.get(f) ?? [l],
|
|
10723
10711
|
visibleIn: o.get(f) ?? [l],
|
|
10724
|
-
...wi(
|
|
10725
|
-
views: (
|
|
10712
|
+
...wi(d.annotations) ? { description: wi(d.annotations) } : {},
|
|
10713
|
+
views: (d.views ?? []).filter((p) => typeof p.name == "string").map((p) => ({
|
|
10726
10714
|
name: p.name,
|
|
10727
10715
|
...wi(p.annotations) ? { description: wi(p.annotations) } : {},
|
|
10728
10716
|
...pc(p.annotations) ? { chart: pc(p.annotations) } : {},
|
|
10729
|
-
...
|
|
10717
|
+
...c.get(f)?.has(p.name) ? { aggregateOnly: !0 } : {}
|
|
10730
10718
|
})),
|
|
10731
10719
|
givens: h,
|
|
10732
10720
|
fields: u.get(f) ?? []
|
|
@@ -10762,7 +10750,7 @@ function zb({
|
|
|
10762
10750
|
// source IS a model source, and may be in the catalog directly.
|
|
10763
10751
|
gc(r, p.source),
|
|
10764
10752
|
[l, r]
|
|
10765
|
-
),
|
|
10753
|
+
), c = (p, m) => {
|
|
10766
10754
|
const b = [];
|
|
10767
10755
|
for (const w of e.document.tiles) {
|
|
10768
10756
|
if (!ke(w)) continue;
|
|
@@ -10775,7 +10763,7 @@ function zb({
|
|
|
10775
10763
|
);
|
|
10776
10764
|
}
|
|
10777
10765
|
return b;
|
|
10778
|
-
},
|
|
10766
|
+
}, d = ue(
|
|
10779
10767
|
() => a.filter((p) => p.origin === "model" && p.boundTiles === 0),
|
|
10780
10768
|
[a]
|
|
10781
10769
|
);
|
|
@@ -10784,8 +10772,8 @@ function zb({
|
|
|
10784
10772
|
setFilterDialog: s,
|
|
10785
10773
|
controlList: a,
|
|
10786
10774
|
fieldsFor: u,
|
|
10787
|
-
unknownFieldsOf:
|
|
10788
|
-
available:
|
|
10775
|
+
unknownFieldsOf: c,
|
|
10776
|
+
available: d,
|
|
10789
10777
|
applyFilter: (p, m, b) => {
|
|
10790
10778
|
s(void 0), e.update((w) => {
|
|
10791
10779
|
b && wp(w, b), bp(w, p, m);
|
|
@@ -10827,12 +10815,12 @@ function Fb(e) {
|
|
|
10827
10815
|
} = e, [o, a] = U({
|
|
10828
10816
|
stack: [e.document],
|
|
10829
10817
|
index: 0
|
|
10830
|
-
}), [l, u] = U(e.source), [
|
|
10818
|
+
}), [l, u] = U(e.source), [c, d] = U(void 0), [f, h] = U(e.document), [p, m] = U(s), [b, w] = U(e.replaces), [v, g] = U(!1), y = o.stack[o.index], x = J(o);
|
|
10831
10819
|
x.current = o;
|
|
10832
10820
|
const k = J(!1), [S, C] = U(!1), $ = (A) => {
|
|
10833
10821
|
k.current = A, C(A);
|
|
10834
10822
|
}, [E, B] = U(void 0), D = he((A) => {
|
|
10835
|
-
|
|
10823
|
+
d(void 0), a((F) => {
|
|
10836
10824
|
const ne = structuredClone(F.stack[F.index]);
|
|
10837
10825
|
if (A(ne), JSON.stringify(ne) === JSON.stringify(F.stack[F.index]))
|
|
10838
10826
|
return F;
|
|
@@ -10840,11 +10828,11 @@ function Fb(e) {
|
|
|
10840
10828
|
return { stack: V, index: V.length - 1 };
|
|
10841
10829
|
});
|
|
10842
10830
|
}, []), N = he(() => {
|
|
10843
|
-
|
|
10831
|
+
d(void 0), a(
|
|
10844
10832
|
(A) => A.index > 0 ? { ...A, index: A.index - 1 } : A
|
|
10845
10833
|
);
|
|
10846
10834
|
}, []), q = he(() => {
|
|
10847
|
-
|
|
10835
|
+
d(void 0), a(
|
|
10848
10836
|
(A) => A.index < A.stack.length - 1 ? { ...A, index: A.index + 1 } : A
|
|
10849
10837
|
);
|
|
10850
10838
|
}, []), j = he(
|
|
@@ -10874,12 +10862,12 @@ function Fb(e) {
|
|
|
10874
10862
|
try {
|
|
10875
10863
|
const Y = await j(l, y);
|
|
10876
10864
|
if (Vo(Y))
|
|
10877
|
-
return
|
|
10865
|
+
return d(Y.reason), { ok: !1, reason: Y.reason };
|
|
10878
10866
|
try {
|
|
10879
10867
|
await n?.(Y.source, { purpose: "save", document: y });
|
|
10880
10868
|
} catch (M) {
|
|
10881
10869
|
const O = `Could not save: ${M instanceof Error ? M.message : String(M)}`;
|
|
10882
|
-
return
|
|
10870
|
+
return d(O), { ok: !1, reason: O };
|
|
10883
10871
|
}
|
|
10884
10872
|
u(Y.source), h(y), m(!1), w(void 0), g(!1);
|
|
10885
10873
|
const V = F ? { stack: [y], index: 0 } : A.history;
|
|
@@ -10896,7 +10884,7 @@ function Fb(e) {
|
|
|
10896
10884
|
clearsHistory: F
|
|
10897
10885
|
}
|
|
10898
10886
|
} : void 0
|
|
10899
|
-
),
|
|
10887
|
+
), d(void 0), { ok: !0 };
|
|
10900
10888
|
} finally {
|
|
10901
10889
|
$(!1);
|
|
10902
10890
|
}
|
|
@@ -10925,11 +10913,11 @@ function Fb(e) {
|
|
|
10925
10913
|
});
|
|
10926
10914
|
} catch (F) {
|
|
10927
10915
|
const ne = `Could not undo the save: ${F instanceof Error ? F.message : String(F)}`;
|
|
10928
|
-
return
|
|
10916
|
+
return d(ne), { ok: !1, reason: ne };
|
|
10929
10917
|
} finally {
|
|
10930
10918
|
$(!1);
|
|
10931
10919
|
}
|
|
10932
|
-
return u(A.source), h(A.saved), m(A.pendingOpen), w(A.replacing), g(A.unwritten || A.replacing !== void 0), a((F) => F === E.after ? A.history : F), B(void 0),
|
|
10920
|
+
return u(A.source), h(A.saved), m(A.pendingOpen), w(A.replacing), g(A.unwritten || A.replacing !== void 0), a((F) => F === E.after ? A.history : F), B(void 0), d(void 0), { ok: !0 };
|
|
10933
10921
|
}, [n, E]), se = ue(
|
|
10934
10922
|
() => v || JSON.stringify(y) !== JSON.stringify(f),
|
|
10935
10923
|
[y, f, v]
|
|
@@ -10952,7 +10940,7 @@ function Fb(e) {
|
|
|
10952
10940
|
dirty: se || p,
|
|
10953
10941
|
edited: se,
|
|
10954
10942
|
pendingOpen: p,
|
|
10955
|
-
...
|
|
10943
|
+
...c === void 0 ? {} : { error: c },
|
|
10956
10944
|
update: D,
|
|
10957
10945
|
undo: N,
|
|
10958
10946
|
redo: q,
|
|
@@ -11017,10 +11005,10 @@ function qb(e, t, { modelPath: n, textHeld: r, notebook: i, insertAt: s }) {
|
|
|
11017
11005
|
));
|
|
11018
11006
|
let o = e.sources.find((u) => u.base === t.base);
|
|
11019
11007
|
if (!o) {
|
|
11020
|
-
const u = new Set(e.sources.map((
|
|
11021
|
-
let
|
|
11022
|
-
for (let
|
|
11023
|
-
o = { name:
|
|
11008
|
+
const u = new Set(e.sources.map((d) => d.name));
|
|
11009
|
+
let c = `${t.base}_tiles`;
|
|
11010
|
+
for (let d = 2; u.has(c); d++) c = `${t.base}_tiles_${d}`;
|
|
11011
|
+
o = { name: c, base: t.base }, e.sources.push(o);
|
|
11024
11012
|
}
|
|
11025
11013
|
const a = new Set(
|
|
11026
11014
|
e.tiles.filter(ke).filter((u) => u.source === o.name).map((u) => u.name)
|
|
@@ -11046,39 +11034,39 @@ function Kb({
|
|
|
11046
11034
|
selectTile: s,
|
|
11047
11035
|
deselectTile: o
|
|
11048
11036
|
}) {
|
|
11049
|
-
const [a, l] = U(void 0), [u,
|
|
11037
|
+
const [a, l] = U(void 0), [u, c] = U(!1), [d, f] = U(void 0);
|
|
11050
11038
|
return {
|
|
11051
11039
|
menu: a,
|
|
11052
11040
|
setMenu: l,
|
|
11053
11041
|
addingTile: u,
|
|
11054
11042
|
openAdd: (g) => {
|
|
11055
|
-
f(g),
|
|
11043
|
+
f(g), c(!0);
|
|
11056
11044
|
},
|
|
11057
|
-
closeAdd: () =>
|
|
11045
|
+
closeAdd: () => c(!1),
|
|
11058
11046
|
addTile: (g) => {
|
|
11059
|
-
|
|
11047
|
+
c(!1), e.update(
|
|
11060
11048
|
(y) => qb(y, g, {
|
|
11061
11049
|
modelPath: r,
|
|
11062
11050
|
textHeld: i,
|
|
11063
11051
|
notebook: t,
|
|
11064
|
-
insertAt:
|
|
11052
|
+
insertAt: d
|
|
11065
11053
|
})
|
|
11066
|
-
), s(
|
|
11054
|
+
), s(d ?? e.document.tiles.length);
|
|
11067
11055
|
},
|
|
11068
11056
|
addText: () => {
|
|
11069
|
-
|
|
11057
|
+
c(!1), e.update((g) => {
|
|
11070
11058
|
const y = new Set(
|
|
11071
11059
|
g.tiles.filter(je).map((k) => k.name)
|
|
11072
11060
|
);
|
|
11073
11061
|
let x = 1;
|
|
11074
11062
|
for (; y.has(`text_${x}`); ) x++;
|
|
11075
|
-
g.tiles.splice(
|
|
11063
|
+
g.tiles.splice(d ?? g.tiles.length, 0, {
|
|
11076
11064
|
kind: "text",
|
|
11077
11065
|
name: `text_${x}`,
|
|
11078
11066
|
markdown: "",
|
|
11079
11067
|
...t ? {} : { colspan: n }
|
|
11080
11068
|
});
|
|
11081
|
-
}), s(
|
|
11069
|
+
}), s(d ?? e.document.tiles.length);
|
|
11082
11070
|
},
|
|
11083
11071
|
editTile: (g, y) => e.update((x) => {
|
|
11084
11072
|
const k = x.tiles.find((S) => Ve(S) === g);
|
|
@@ -11135,11 +11123,11 @@ function Qb(e, t, n) {
|
|
|
11135
11123
|
return n(e, g, y);
|
|
11136
11124
|
}
|
|
11137
11125
|
const u = Object.entries(e);
|
|
11138
|
-
let
|
|
11126
|
+
let c = -1, d, f = -1, h;
|
|
11139
11127
|
for (const [g, y] of u)
|
|
11140
|
-
if (
|
|
11128
|
+
if (c === -1 && (c = y.findIndex((x) => l(x, s.id)), c !== -1 && (d = g)), f === -1 && (f = y.findIndex((x) => l(x, o.id)), f !== -1 && (h = g)), c !== -1 && f !== -1)
|
|
11141
11129
|
break;
|
|
11142
|
-
if (
|
|
11130
|
+
if (c === -1 && Zs(s)) {
|
|
11143
11131
|
const g = s.initialGroup == null ? void 0 : xi(e, s.initialGroup), y = s.initialIndex, x = s.group == null ? void 0 : xi(e, s.group), k = s.index;
|
|
11144
11132
|
if (g == null || x == null || g === x && y === k)
|
|
11145
11133
|
return "preventDefault" in t && t.preventDefault(), e;
|
|
@@ -11169,25 +11157,25 @@ function Qb(e, t, n) {
|
|
|
11169
11157
|
h = g, f = y;
|
|
11170
11158
|
}
|
|
11171
11159
|
}
|
|
11172
|
-
if (
|
|
11173
|
-
if (
|
|
11174
|
-
const g = s.group == null ? void 0 : xi(e, s.group), y = s.group != null && g !==
|
|
11160
|
+
if (d == null || h == null || d === h && c === f) {
|
|
11161
|
+
if (d != null && d === h && c === f && Zs(s)) {
|
|
11162
|
+
const g = s.group == null ? void 0 : xi(e, s.group), y = s.group != null && g !== d, x = s.index !== c;
|
|
11175
11163
|
if (y || x) {
|
|
11176
|
-
const k = s.group == null ?
|
|
11164
|
+
const k = s.group == null ? d : g;
|
|
11177
11165
|
if (k != null) {
|
|
11178
|
-
if (
|
|
11166
|
+
if (d === k)
|
|
11179
11167
|
return kn(_n({}, e), {
|
|
11180
|
-
[
|
|
11181
|
-
e[
|
|
11182
|
-
|
|
11168
|
+
[d]: n(
|
|
11169
|
+
e[d],
|
|
11170
|
+
c,
|
|
11183
11171
|
s.index
|
|
11184
11172
|
)
|
|
11185
11173
|
});
|
|
11186
|
-
const S = e[
|
|
11174
|
+
const S = e[d][c];
|
|
11187
11175
|
return kn(_n({}, e), {
|
|
11188
|
-
[
|
|
11189
|
-
...e[
|
|
11190
|
-
...e[
|
|
11176
|
+
[d]: [
|
|
11177
|
+
...e[d].slice(0, c),
|
|
11178
|
+
...e[d].slice(c + 1)
|
|
11191
11179
|
],
|
|
11192
11180
|
[k]: [
|
|
11193
11181
|
...e[k].slice(0, s.index),
|
|
@@ -11200,15 +11188,15 @@ function Qb(e, t, n) {
|
|
|
11200
11188
|
}
|
|
11201
11189
|
return "preventDefault" in t && t.preventDefault(), e;
|
|
11202
11190
|
}
|
|
11203
|
-
if (
|
|
11191
|
+
if (d === h)
|
|
11204
11192
|
return kn(_n({}, e), {
|
|
11205
|
-
[
|
|
11193
|
+
[d]: n(e[d], c, f)
|
|
11206
11194
|
});
|
|
11207
|
-
const w = o.shape && Math.round(m.y) > Math.round(o.shape.center.y) ? 1 : 0, v = e[
|
|
11195
|
+
const w = o.shape && Math.round(m.y) > Math.round(o.shape.center.y) ? 1 : 0, v = e[d][c];
|
|
11208
11196
|
return kn(_n({}, e), {
|
|
11209
|
-
[
|
|
11210
|
-
...e[
|
|
11211
|
-
...e[
|
|
11197
|
+
[d]: [
|
|
11198
|
+
...e[d].slice(0, c),
|
|
11199
|
+
...e[d].slice(c + 1)
|
|
11212
11200
|
],
|
|
11213
11201
|
[h]: [
|
|
11214
11202
|
...e[h].slice(0, f + w),
|
|
@@ -11230,8 +11218,8 @@ function e0({
|
|
|
11230
11218
|
), s = J(void 0), [o, a] = U(!1);
|
|
11231
11219
|
return { dragging: o, preview: r, onDragStart: () => {
|
|
11232
11220
|
a(!0), s.current = e;
|
|
11233
|
-
}, onDragOver: (
|
|
11234
|
-
const { source: f, target: h } =
|
|
11221
|
+
}, onDragOver: (d) => {
|
|
11222
|
+
const { source: f, target: h } = d.operation;
|
|
11235
11223
|
if (!f || !h) return;
|
|
11236
11224
|
const p = s.current ?? e;
|
|
11237
11225
|
let m;
|
|
@@ -11241,7 +11229,7 @@ function e0({
|
|
|
11241
11229
|
const g = p.filter((y, x) => x !== w).findIndex((y) => Ve(y) === b) + 1;
|
|
11242
11230
|
m = Cv(p, w, g);
|
|
11243
11231
|
} else {
|
|
11244
|
-
const b = p.map(Ve), w = Jb(b,
|
|
11232
|
+
const b = p.map(Ve), w = Jb(b, d);
|
|
11245
11233
|
if (w.every((g, y) => g === b[y])) return;
|
|
11246
11234
|
const v = new Map(p.map((g) => [Ve(g), g]));
|
|
11247
11235
|
m = Ev(
|
|
@@ -11250,13 +11238,13 @@ function e0({
|
|
|
11250
11238
|
);
|
|
11251
11239
|
}
|
|
11252
11240
|
s.current = m, i(m);
|
|
11253
|
-
}, onDragEnd: (
|
|
11241
|
+
}, onDragEnd: (d) => {
|
|
11254
11242
|
a(!1);
|
|
11255
11243
|
const f = s.current;
|
|
11256
|
-
if (s.current = void 0, i(void 0),
|
|
11244
|
+
if (s.current = void 0, i(void 0), d.canceled || !f) return;
|
|
11257
11245
|
t(f);
|
|
11258
11246
|
const h = f.findIndex(
|
|
11259
|
-
(p) => Ve(p) ===
|
|
11247
|
+
(p) => Ve(p) === d.operation.source?.id
|
|
11260
11248
|
);
|
|
11261
11249
|
h >= 0 && n(h);
|
|
11262
11250
|
} };
|
|
@@ -11316,8 +11304,8 @@ function Yf({
|
|
|
11316
11304
|
renderTile: a,
|
|
11317
11305
|
controls: l,
|
|
11318
11306
|
givens: u,
|
|
11319
|
-
catalog:
|
|
11320
|
-
toolbar:
|
|
11307
|
+
catalog: c,
|
|
11308
|
+
toolbar: d,
|
|
11321
11309
|
dashboards: f,
|
|
11322
11310
|
onEvent: h,
|
|
11323
11311
|
conversion: p,
|
|
@@ -11371,7 +11359,7 @@ function Yf({
|
|
|
11371
11359
|
editor: x,
|
|
11372
11360
|
opened: t,
|
|
11373
11361
|
givens: u,
|
|
11374
|
-
catalog:
|
|
11362
|
+
catalog: c
|
|
11375
11363
|
}), { filterDialog: V, setFilterDialog: M } = Y, [O, z] = U(
|
|
11376
11364
|
void 0
|
|
11377
11365
|
), { draftDirty: I, openDraft: ee, prepare: H } = Gb({
|
|
@@ -11430,8 +11418,8 @@ function Yf({
|
|
|
11430
11418
|
Sb,
|
|
11431
11419
|
{
|
|
11432
11420
|
...Z.toolbarProps,
|
|
11433
|
-
...
|
|
11434
|
-
...
|
|
11421
|
+
...d ? { actions: d } : {},
|
|
11422
|
+
...c ? { onAddTile: () => ne() } : {},
|
|
11435
11423
|
savesTo: m,
|
|
11436
11424
|
...b ? { saveLabel: b } : {},
|
|
11437
11425
|
...g === void 0 && o ? {
|
|
@@ -11496,7 +11484,7 @@ function Yf({
|
|
|
11496
11484
|
},
|
|
11497
11485
|
children: [
|
|
11498
11486
|
/* @__PURE__ */ _(ve, { variant: "body2", children: "This report is not served until it has a tile." }),
|
|
11499
|
-
|
|
11487
|
+
c && /* @__PURE__ */ _(
|
|
11500
11488
|
Pe,
|
|
11501
11489
|
{
|
|
11502
11490
|
size: "small",
|
|
@@ -11510,6 +11498,7 @@ function Yf({
|
|
|
11510
11498
|
) }) : /* @__PURE__ */ _(
|
|
11511
11499
|
Eb,
|
|
11512
11500
|
{
|
|
11501
|
+
sticky: !j,
|
|
11513
11502
|
controls: Y.controlList,
|
|
11514
11503
|
tileCount: x.document.tiles.length,
|
|
11515
11504
|
unknownFieldsOf: Y.unknownFieldsOf,
|
|
@@ -11533,7 +11522,7 @@ function Yf({
|
|
|
11533
11522
|
columns: X,
|
|
11534
11523
|
notebook: j,
|
|
11535
11524
|
chrome: Q,
|
|
11536
|
-
canAdd: !!
|
|
11525
|
+
canAdd: !!c,
|
|
11537
11526
|
selected: S,
|
|
11538
11527
|
flash: N,
|
|
11539
11528
|
menuIndex: A?.index,
|
|
@@ -11550,7 +11539,7 @@ function Yf({
|
|
|
11550
11539
|
Ep,
|
|
11551
11540
|
{
|
|
11552
11541
|
editor: x,
|
|
11553
|
-
catalog:
|
|
11542
|
+
catalog: c,
|
|
11554
11543
|
columns: X,
|
|
11555
11544
|
dashboards: f,
|
|
11556
11545
|
bindings: Y,
|
|
@@ -11620,29 +11609,29 @@ function o0(e, t, n, r = /* @__PURE__ */ new Map(), i) {
|
|
|
11620
11609
|
(e.localGivens ?? []).map((m) => [m.name, m.type])
|
|
11621
11610
|
), l = e.sources.find((m) => m.name === s)?.scopedBy ?? [], u = new Set(
|
|
11622
11611
|
[...l, ...i ?? []].filter((m) => n.has(m))
|
|
11623
|
-
),
|
|
11612
|
+
), c = /* @__PURE__ */ new Set([...l, ...i ?? []]), d = [];
|
|
11624
11613
|
for (const m of t.filters ?? []) {
|
|
11625
11614
|
const b = `where: ${ra(m.field)} ${m.op ?? "~"}`;
|
|
11626
11615
|
if (n.has(m.given)) {
|
|
11627
|
-
u.add(m.given),
|
|
11616
|
+
u.add(m.given), c.add(m.given), d.push(`${b} $${m.given}`);
|
|
11628
11617
|
continue;
|
|
11629
11618
|
}
|
|
11630
11619
|
if (!a.has(m.given)) continue;
|
|
11631
|
-
|
|
11620
|
+
c.add(m.given);
|
|
11632
11621
|
const w = gh(
|
|
11633
11622
|
r.get(m.given),
|
|
11634
11623
|
a.get(m.given)
|
|
11635
11624
|
);
|
|
11636
|
-
w !== void 0 &&
|
|
11625
|
+
w !== void 0 && d.push(`${b} ${w}`);
|
|
11637
11626
|
}
|
|
11638
|
-
const f =
|
|
11627
|
+
const f = d.join(", "), h = t.chart, p = h === "none" || Ss(h) ? Nn(h, t.chartCarried) : h === "custom" && t.chartLines?.length ? t.chartLines.join(`
|
|
11639
11628
|
`) : h === "default" && s0(t.declaration) ? Nn("none") : void 0;
|
|
11640
11629
|
return {
|
|
11641
11630
|
...p ? { annotation: p } : {},
|
|
11642
11631
|
expression: `${s} -> ${o}` + (f ? ` + { ${f} }` : ""),
|
|
11643
11632
|
givenNames: Array.from(u),
|
|
11644
11633
|
// No served entry and nothing from the document: the model may still scope it, so say nothing.
|
|
11645
|
-
reads: i ||
|
|
11634
|
+
reads: i || c.size > 0 ? Array.from(c) : void 0
|
|
11646
11635
|
};
|
|
11647
11636
|
}
|
|
11648
11637
|
function a0({
|
|
@@ -11671,11 +11660,11 @@ function a0({
|
|
|
11671
11660
|
...i.flatMap((p) => p.path ? [p.path] : [])
|
|
11672
11661
|
]),
|
|
11673
11662
|
[i, r]
|
|
11674
|
-
),
|
|
11663
|
+
), c = ue(
|
|
11675
11664
|
() => s ? (l ?? []).filter((p) => !u.has(p)) : [],
|
|
11676
11665
|
[l, u, s]
|
|
11677
|
-
),
|
|
11678
|
-
queries:
|
|
11666
|
+
), d = op({
|
|
11667
|
+
queries: c.map((p) => ({
|
|
11679
11668
|
// `useQueries` bypasses `useQueryWithApiError`, so the server is added here to keep two servers' caches apart.
|
|
11680
11669
|
queryKey: [
|
|
11681
11670
|
"report-editor-model",
|
|
@@ -11693,17 +11682,17 @@ function a0({
|
|
|
11693
11682
|
)).data,
|
|
11694
11683
|
retry: !1
|
|
11695
11684
|
}))
|
|
11696
|
-
}), f = l !== void 0 && s &&
|
|
11685
|
+
}), f = l !== void 0 && s && d.every((p) => p.isSuccess || p.isError), h = d.map((p) => p.dataUpdatedAt).join();
|
|
11697
11686
|
return ue(
|
|
11698
11687
|
() => f ? Nb(
|
|
11699
|
-
|
|
11688
|
+
d.flatMap(
|
|
11700
11689
|
(p) => p.data ? [p.data] : []
|
|
11701
11690
|
),
|
|
11702
11691
|
u
|
|
11703
11692
|
) : void 0,
|
|
11704
11693
|
// `results` is read through `wanted` and `version`, which change when the set of models or any one's data does.
|
|
11705
11694
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
11706
|
-
[f,
|
|
11695
|
+
[f, c, h, u]
|
|
11707
11696
|
);
|
|
11708
11697
|
}
|
|
11709
11698
|
const l0 = {};
|
|
@@ -11718,8 +11707,8 @@ function c0({
|
|
|
11718
11707
|
replaces: a,
|
|
11719
11708
|
onSave: l,
|
|
11720
11709
|
onDirtyChange: u,
|
|
11721
|
-
onExit:
|
|
11722
|
-
allowLayoutChange:
|
|
11710
|
+
onExit: c,
|
|
11711
|
+
allowLayoutChange: d,
|
|
11723
11712
|
onEvent: f,
|
|
11724
11713
|
savesTo: h,
|
|
11725
11714
|
saveLabel: p,
|
|
@@ -11953,8 +11942,8 @@ function c0({
|
|
|
11953
11942
|
})),
|
|
11954
11943
|
onChange: F,
|
|
11955
11944
|
onDirtyChange: u,
|
|
11956
|
-
...
|
|
11957
|
-
...
|
|
11945
|
+
...c ? { onExit: c } : {},
|
|
11946
|
+
...d !== void 0 ? { allowLayoutChange: d } : {},
|
|
11958
11947
|
...o.conversion ? { conversion: o.conversion } : {},
|
|
11959
11948
|
...W ? { catalog: W } : {},
|
|
11960
11949
|
dashboards: fe,
|
|
@@ -11988,7 +11977,7 @@ function d0({
|
|
|
11988
11977
|
packageName: i,
|
|
11989
11978
|
modelPath: s
|
|
11990
11979
|
}) {
|
|
11991
|
-
const [o, a] = U(void 0), [l, u] = U(void 0), [
|
|
11980
|
+
const [o, a] = U(void 0), [l, u] = U(void 0), [c, d] = U(e === void 0), [f, h] = U(!1), [p, m] = U(
|
|
11992
11981
|
void 0
|
|
11993
11982
|
);
|
|
11994
11983
|
return ye(() => {
|
|
@@ -12018,7 +12007,7 @@ function d0({
|
|
|
12018
12007
|
if (b) return;
|
|
12019
12008
|
m(Pc(w));
|
|
12020
12009
|
}
|
|
12021
|
-
b ||
|
|
12010
|
+
b || d(!0);
|
|
12022
12011
|
})(), () => {
|
|
12023
12012
|
b = !0;
|
|
12024
12013
|
};
|
|
@@ -12026,7 +12015,7 @@ function d0({
|
|
|
12026
12015
|
workspace: o,
|
|
12027
12016
|
draft: l,
|
|
12028
12017
|
setDraft: u,
|
|
12029
|
-
draftChecked:
|
|
12018
|
+
draftChecked: c,
|
|
12030
12019
|
offered: f,
|
|
12031
12020
|
setOffered: h,
|
|
12032
12021
|
readFailure: p
|
|
@@ -12076,8 +12065,8 @@ async function g0(e) {
|
|
|
12076
12065
|
ok: !1,
|
|
12077
12066
|
refused: "This build of Malloy does not expose a parse tree and token stream the notebook builder can read, so editing is off."
|
|
12078
12067
|
};
|
|
12079
|
-
const
|
|
12080
|
-
const W = f(T).trim(), A =
|
|
12068
|
+
const c = (T) => l.getSymbolicName(T.type), d = (T) => i.routeOf({ value: T.trimStart() }), f = (T) => i.payloadOf({ value: T }), h = (T) => T === "markdown" || T === '"' || T === "text", p = (T) => ki(f(T)).replace(/\n$/, ""), m = (T, G) => {
|
|
12069
|
+
const W = f(T).trim(), A = d(T) !== '"' && h0.test(W) ? "" : W;
|
|
12081
12070
|
return ki(
|
|
12082
12071
|
[A && `${A}
|
|
12083
12072
|
`, ...G].join("")
|
|
@@ -12111,18 +12100,18 @@ async function g0(e) {
|
|
|
12111
12100
|
const V = u[Y];
|
|
12112
12101
|
if (V.startIndex > G) break;
|
|
12113
12102
|
if (V.channel !== 0) continue;
|
|
12114
|
-
const M =
|
|
12103
|
+
const M = c(V);
|
|
12115
12104
|
if (M !== "ANNOTATION" && M !== "BLOCK_ANNOTATION_BEGIN") {
|
|
12116
12105
|
F.insertAt = b.lineStarts[b.line(b.utf16(V.startIndex))];
|
|
12117
12106
|
break;
|
|
12118
12107
|
}
|
|
12119
12108
|
const O = ki(v(V)), z = [];
|
|
12120
12109
|
if (M === "BLOCK_ANNOTATION_BEGIN") {
|
|
12121
|
-
for (;
|
|
12110
|
+
for (; c(u[Y + 1] ?? V) === "BLOCK_ANNOTATION_TEXT"; )
|
|
12122
12111
|
z.push(v(u[++Y]));
|
|
12123
|
-
|
|
12112
|
+
c(u[Y + 1] ?? V) === "BLOCK_ANNOTATION_END" && Y++;
|
|
12124
12113
|
}
|
|
12125
|
-
if (h(
|
|
12114
|
+
if (h(d(O))) {
|
|
12126
12115
|
const I = b.utf16(V.startIndex), ee = b.lineStarts[b.line(I)], H = /^[ \t]*$/.test(e.slice(ee, I));
|
|
12127
12116
|
A.push({
|
|
12128
12117
|
start: H ? ee : I,
|
|
@@ -12142,7 +12131,7 @@ async function g0(e) {
|
|
|
12142
12131
|
});
|
|
12143
12132
|
} else Gr(I) && F.unmodelled === void 0 && (F.unmodelled = I.trim());
|
|
12144
12133
|
}
|
|
12145
|
-
if (
|
|
12134
|
+
if (d(O) !== "markdown")
|
|
12146
12135
|
ne = -2;
|
|
12147
12136
|
else if (M === "BLOCK_ANNOTATION_BEGIN")
|
|
12148
12137
|
W.push(m(O, z)), ne = -2;
|
|
@@ -12166,7 +12155,7 @@ ${I}` : W.push(I), ne = V.line;
|
|
|
12166
12155
|
for (let T = 0; T < (o.childCount ?? 0); T++) {
|
|
12167
12156
|
const G = o.getChild(T);
|
|
12168
12157
|
if (!mn(G)) {
|
|
12169
|
-
const V = G?.symbol, M = V ?
|
|
12158
|
+
const V = G?.symbol, M = V ? c(V) : void 0;
|
|
12170
12159
|
if (V && M === "EOF") continue;
|
|
12171
12160
|
if (V && M === "SEMI") {
|
|
12172
12161
|
k.push([V.startIndex, V.stopIndex]);
|
|
@@ -12222,10 +12211,10 @@ ${I}` : W.push(I), ne = V.line;
|
|
|
12222
12211
|
const O = dr(V, "docBlockAnnotation") !== void 0, z = u.filter(
|
|
12223
12212
|
(R) => R.startIndex >= M.startCp && R.stopIndex <= M.stopCp
|
|
12224
12213
|
), I = z.filter(
|
|
12225
|
-
(R) =>
|
|
12214
|
+
(R) => c(R) === "BLOCK_ANNOTATION_TEXT"
|
|
12226
12215
|
), ee = I[I.length - 1] ?? z[0], H = ki(
|
|
12227
12216
|
O && ee ? e.slice(M.start, b.utf16(ee.stopIndex + 1)).replace(/\r?\n$/, "") : e.slice(M.start, M.end)
|
|
12228
|
-
), le =
|
|
12217
|
+
), le = d(H), ce = h(le) ? O ? m(H.split(`
|
|
12229
12218
|
`, 1)[0], I.map(v)) : p(H) : void 0;
|
|
12230
12219
|
S.push({
|
|
12231
12220
|
kind: "note",
|
|
@@ -12241,7 +12230,7 @@ ${I}` : W.push(I), ne = V.line;
|
|
|
12241
12230
|
}
|
|
12242
12231
|
}
|
|
12243
12232
|
for (const T of u) {
|
|
12244
|
-
if (
|
|
12233
|
+
if (c(T) !== "BLOCK_ANNOTATION_END") continue;
|
|
12245
12234
|
const G = v(T).trimStart().replace(/^\|#{1,2}/, "").trim();
|
|
12246
12235
|
if (G)
|
|
12247
12236
|
return t(
|
|
@@ -12251,7 +12240,7 @@ ${I}` : W.push(I), ne = V.line;
|
|
|
12251
12240
|
}
|
|
12252
12241
|
let $ = 0;
|
|
12253
12242
|
for (const T of u) {
|
|
12254
|
-
if (T.channel !== 0 ||
|
|
12243
|
+
if (T.channel !== 0 || c(T) === "EOF") continue;
|
|
12255
12244
|
for (; $ < k.length && k[$][1] < T.startIndex; )
|
|
12256
12245
|
$++;
|
|
12257
12246
|
const [G, W] = k[$] ?? [1 / 0, -1 / 0];
|
|
@@ -12418,16 +12407,16 @@ async function w0(e) {
|
|
|
12418
12407
|
const l = (await ii(
|
|
12419
12408
|
e,
|
|
12420
12409
|
"file:///publisher-notebook-builder/convert.malloy"
|
|
12421
|
-
)).parse?.tokenStream, u = l?.tokenSource?.vocabulary,
|
|
12410
|
+
)).parse?.tokenStream, u = l?.tokenSource?.vocabulary, c = l?.getTokens?.() ?? [];
|
|
12422
12411
|
if (typeof u?.getSymbolicName != "function")
|
|
12423
12412
|
return i(0, "Malloy's token stream is not available.");
|
|
12424
|
-
const
|
|
12413
|
+
const d = await Yo(), { parseAnnotation: f } = await Xo(), h = (O) => u.getSymbolicName(O.type), p = new Os(e), m = sl(p, l), b = (O) => e.slice(p.utf16(O.startIndex), p.utf16(O.stopIndex + 1)), w = (O) => d.routeOf({ value: O.trimStart() }), v = (O) => d.payloadOf({ value: O }), g = (O) => O.replace(/\r\n?/g, `
|
|
12425
12414
|
`), y = new Set(e.match(/[A-Za-z_][A-Za-z0-9_]*/g)), x = (O) => {
|
|
12426
12415
|
let z = O;
|
|
12427
12416
|
for (let I = 2; y.has(z); I++) z = `${O}_${I}`;
|
|
12428
12417
|
return y.add(z), z;
|
|
12429
12418
|
}, k = (O) => {
|
|
12430
|
-
const z =
|
|
12419
|
+
const z = c.filter(
|
|
12431
12420
|
(Z) => Z.channel === 0 && p.utf16(Z.startIndex) >= O.span.start && p.utf16(Z.stopIndex + 1) <= O.span.end
|
|
12432
12421
|
), I = [], ee = [], H = [];
|
|
12433
12422
|
let le;
|
|
@@ -12697,8 +12686,8 @@ function $0({
|
|
|
12697
12686
|
modelPath: a,
|
|
12698
12687
|
layout: l,
|
|
12699
12688
|
notebook: u,
|
|
12700
|
-
noun:
|
|
12701
|
-
legacyFormat:
|
|
12689
|
+
noun: c,
|
|
12690
|
+
legacyFormat: d,
|
|
12702
12691
|
textHeld: f,
|
|
12703
12692
|
startedAt: h,
|
|
12704
12693
|
onEventRef: p
|
|
@@ -12716,7 +12705,7 @@ function $0({
|
|
|
12716
12705
|
} catch {
|
|
12717
12706
|
}
|
|
12718
12707
|
}), w = e?.authoritative === !0, v = w && r !== void 0, [g, y] = U(void 0), x = (w || g === !0) && t !== void 0, [k, S] = U(void 0), [C, $] = U(
|
|
12719
|
-
|
|
12708
|
+
d ? _0 : void 0
|
|
12720
12709
|
), E = J(void 0), B = J(void 0), [D, N] = U(void 0), q = J(s);
|
|
12721
12710
|
q.current = s;
|
|
12722
12711
|
const j = D !== void 0 && D.onFetch === s ? D.text : i, X = J(j);
|
|
@@ -12759,7 +12748,7 @@ function $0({
|
|
|
12759
12748
|
}
|
|
12760
12749
|
}).catch((ie) => {
|
|
12761
12750
|
if (R) return;
|
|
12762
|
-
const te = `Could not read the ${
|
|
12751
|
+
const te = `Could not read the ${c}: ${ie instanceof Error ? ie.message : String(ie)}`;
|
|
12763
12752
|
$(te), b.current({
|
|
12764
12753
|
type: "report.load_failed",
|
|
12765
12754
|
surface: "edit",
|
|
@@ -12774,17 +12763,17 @@ function $0({
|
|
|
12774
12763
|
n,
|
|
12775
12764
|
v,
|
|
12776
12765
|
u,
|
|
12777
|
-
|
|
12766
|
+
c,
|
|
12778
12767
|
f,
|
|
12779
12768
|
// Refs, stable: read when the open lands, never a reason to open again.
|
|
12780
12769
|
h
|
|
12781
12770
|
]), ye(() => {
|
|
12782
|
-
|
|
12771
|
+
d && b.current({
|
|
12783
12772
|
type: "report.load_failed",
|
|
12784
12773
|
surface: "edit",
|
|
12785
12774
|
category: "unsupported"
|
|
12786
12775
|
});
|
|
12787
|
-
}, [
|
|
12776
|
+
}, [d]), ye(() => {
|
|
12788
12777
|
!f || !n || k || r !== void 0 || (w ? t === void 0 && $("the host's storage has no document at this location.") : $(
|
|
12789
12778
|
"a document held as text needs a storage whose workspace is authoritative. Fix: mark the workspace that keeps it `authoritative`."
|
|
12790
12779
|
));
|
|
@@ -12831,8 +12820,8 @@ function S0({
|
|
|
12831
12820
|
versionId: a,
|
|
12832
12821
|
apiClients: l,
|
|
12833
12822
|
queryClient: u,
|
|
12834
|
-
mutable:
|
|
12835
|
-
textHeld:
|
|
12823
|
+
mutable: c,
|
|
12824
|
+
textHeld: d,
|
|
12836
12825
|
readFailure: f,
|
|
12837
12826
|
authoritative: h,
|
|
12838
12827
|
resume: p,
|
|
@@ -12952,7 +12941,7 @@ function S0({
|
|
|
12952
12941
|
v,
|
|
12953
12942
|
m
|
|
12954
12943
|
]
|
|
12955
|
-
), q = t?.writeable === !0, j =
|
|
12944
|
+
), q = t?.writeable === !0, j = c === !0 && !d, { savesTo: X, pinnedPackageSave: Q, writer: se } = Ch({
|
|
12956
12945
|
authoritative: h,
|
|
12957
12946
|
mutable: j,
|
|
12958
12947
|
...a !== void 0 ? { versionId: a } : {},
|
|
@@ -12978,8 +12967,8 @@ function Xf(e) {
|
|
|
12978
12967
|
path: s,
|
|
12979
12968
|
textSource: o,
|
|
12980
12969
|
allowLayoutChange: a
|
|
12981
|
-
} = e, l = e.layout ?? (i ? Dh(i) : "grid"), u = l === "linear",
|
|
12982
|
-
environmentName:
|
|
12970
|
+
} = e, l = e.layout ?? (i ? Dh(i) : "grid"), u = l === "linear", c = o !== void 0, {
|
|
12971
|
+
environmentName: d,
|
|
12983
12972
|
packageName: f,
|
|
12984
12973
|
versionId: h,
|
|
12985
12974
|
namesBoth: p
|
|
@@ -12990,7 +12979,7 @@ function Xf(e) {
|
|
|
12990
12979
|
const $ = Mh()?.documentStorage, E = s ?? zh(i ?? "dashboard", b), B = /\.malloynb$/i.test(E) || u && /\.malloynb$/i.test(b), D = Qo({
|
|
12991
12980
|
queryKey: [
|
|
12992
12981
|
"dashboard-editor-model",
|
|
12993
|
-
|
|
12982
|
+
d,
|
|
12994
12983
|
f,
|
|
12995
12984
|
E,
|
|
12996
12985
|
h,
|
|
@@ -12998,13 +12987,13 @@ function Xf(e) {
|
|
|
12998
12987
|
],
|
|
12999
12988
|
// A curated package otherwise withholds the text of a notebook reading an off-surface source.
|
|
13000
12989
|
queryFn: () => v.models.getModel(
|
|
13001
|
-
|
|
12990
|
+
d,
|
|
13002
12991
|
f,
|
|
13003
12992
|
E,
|
|
13004
12993
|
h,
|
|
13005
12994
|
u ? !0 : void 0
|
|
13006
12995
|
),
|
|
13007
|
-
enabled: p && !B && !
|
|
12996
|
+
enabled: p && !B && !c
|
|
13008
12997
|
}), N = D.data?.data?.sourceText, {
|
|
13009
12998
|
workspace: q,
|
|
13010
12999
|
draft: j,
|
|
@@ -13017,7 +13006,7 @@ function Xf(e) {
|
|
|
13017
13006
|
storage: $,
|
|
13018
13007
|
layout: l,
|
|
13019
13008
|
notebook: u,
|
|
13020
|
-
environmentName:
|
|
13009
|
+
environmentName: d,
|
|
13021
13010
|
packageName: f,
|
|
13022
13011
|
modelPath: E
|
|
13023
13012
|
}), {
|
|
@@ -13051,7 +13040,7 @@ function Xf(e) {
|
|
|
13051
13040
|
notebook: u,
|
|
13052
13041
|
noun: w,
|
|
13053
13042
|
legacyFormat: B,
|
|
13054
|
-
textHeld:
|
|
13043
|
+
textHeld: c,
|
|
13055
13044
|
startedAt: k,
|
|
13056
13045
|
onEventRef: S
|
|
13057
13046
|
}), {
|
|
@@ -13066,14 +13055,14 @@ function Xf(e) {
|
|
|
13066
13055
|
workspace: q,
|
|
13067
13056
|
layout: l,
|
|
13068
13057
|
notebook: u,
|
|
13069
|
-
environmentName:
|
|
13058
|
+
environmentName: d,
|
|
13070
13059
|
packageName: f,
|
|
13071
13060
|
modelPath: E,
|
|
13072
13061
|
versionId: h,
|
|
13073
13062
|
apiClients: v,
|
|
13074
13063
|
queryClient: x,
|
|
13075
13064
|
mutable: g,
|
|
13076
|
-
textHeld:
|
|
13065
|
+
textHeld: c,
|
|
13077
13066
|
readFailure: T,
|
|
13078
13067
|
authoritative: G,
|
|
13079
13068
|
resume: A,
|
|
@@ -13104,7 +13093,7 @@ function Xf(e) {
|
|
|
13104
13093
|
H(Xt), C.current?.(Xt);
|
|
13105
13094
|
},
|
|
13106
13095
|
[H]
|
|
13107
|
-
), At = ie === "host" && q?.description ? q.description : void 0, ir = !G && !
|
|
13096
|
+
), At = ie === "host" && q?.description ? q.description : void 0, ir = !G && !c && g === void 0 ? y ? "Checking whether this server takes writes." : "This server did not say whether it takes writes, so Save is off." : Lh({
|
|
13108
13097
|
authoritative: G,
|
|
13109
13098
|
mutable: L,
|
|
13110
13099
|
pinnedPackageSave: P,
|
|
@@ -13134,7 +13123,7 @@ function Xf(e) {
|
|
|
13134
13123
|
context: `Opening the ${w}`
|
|
13135
13124
|
}
|
|
13136
13125
|
);
|
|
13137
|
-
if (!Y && (!(
|
|
13126
|
+
if (!Y && (!(c || N) || !Q))
|
|
13138
13127
|
return /* @__PURE__ */ _(Ic, { text: `Opening the ${w}…` });
|
|
13139
13128
|
if (W)
|
|
13140
13129
|
return /* @__PURE__ */ K(ht, { severity: "error", sx: { m: 2 }, children: [
|
|
@@ -13180,7 +13169,7 @@ function Xf(e) {
|
|
|
13180
13169
|
Y && /* @__PURE__ */ _(
|
|
13181
13170
|
c0,
|
|
13182
13171
|
{
|
|
13183
|
-
environmentName:
|
|
13172
|
+
environmentName: d,
|
|
13184
13173
|
packageName: f,
|
|
13185
13174
|
modelPath: E,
|
|
13186
13175
|
...o ? { textSource: o } : {},
|