@pstdio/ui 0.41.0 → 0.42.0
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/{MermaidComponent-BCiI63_G.js → MermaidComponent-D7vhkpka.js} +2 -2
- package/dist/{MermaidComponent-BCiI63_G.js.map → MermaidComponent-D7vhkpka.js.map} +1 -1
- package/dist/alert-MQ47wy7f.js +388 -0
- package/dist/alert-MQ47wy7f.js.map +1 -0
- package/dist/chat-ui.d.ts +36 -5
- package/dist/chat-ui.js +1777 -1422
- package/dist/chat-ui.js.map +1 -1
- package/dist/collection-view-fields-D3cysHNT.d.ts +232 -0
- package/dist/collection-view-grouping-D4nZk8-3.js +90 -0
- package/dist/collection-view-grouping-D4nZk8-3.js.map +1 -0
- package/dist/collection-view-search-CpjJy76w.js +1973 -0
- package/dist/collection-view-search-CpjJy76w.js.map +1 -0
- package/dist/collection-view.d.ts +4 -0
- package/dist/collection-view.js +2 -0
- package/dist/{data-table-stats-row-EiTEONdY.js → data-table-stats-row-64magT2g.js} +2 -2
- package/dist/{data-table-stats-row-EiTEONdY.js.map → data-table-stats-row-64magT2g.js.map} +1 -1
- package/dist/data-table.d.ts +3 -1
- package/dist/data-table.js +279 -277
- package/dist/data-table.js.map +1 -1
- package/dist/{diff-drawer-BwZBOObe.js → diff-drawer-IYpQ-QQK.js} +192 -191
- package/dist/diff-drawer-IYpQ-QQK.js.map +1 -0
- package/dist/{diff-viewer-kOOd7C7h.js → diff-viewer-C-0VAt9P.js} +4 -4
- package/dist/{diff-viewer-kOOd7C7h.js.map → diff-viewer-C-0VAt9P.js.map} +1 -1
- package/dist/diff.js +2 -2
- package/dist/{display-sort-control-DPxc0e5z.js → display-sort-control-f3rbILsV.js} +87 -86
- package/dist/{display-sort-control-DPxc0e5z.js.map → display-sort-control-f3rbILsV.js.map} +1 -1
- package/dist/drop-indicator-HjlBSIeV.js +27 -0
- package/dist/drop-indicator-HjlBSIeV.js.map +1 -0
- package/dist/edit-mode-data-table-DnMB2jiy.js +1449 -0
- package/dist/edit-mode-data-table-DnMB2jiy.js.map +1 -0
- package/dist/host-storage-BIo5azql.js +31 -0
- package/dist/host-storage-BIo5azql.js.map +1 -0
- package/dist/host-storage-J0089Hyk.d.ts +17 -0
- package/dist/icon-options-Tt6Wzhtv.js +308 -0
- package/dist/icon-options-Tt6Wzhtv.js.map +1 -0
- package/dist/{index-C9mywhyX.d.ts → index-B79hwNcB.d.ts} +17 -1
- package/dist/index-CKsd23jv.d.ts +80 -0
- package/dist/{index-D3UJyWWh.d.ts → index-ICoad2I_.d.ts} +4 -223
- package/dist/index.d.ts +22 -6
- package/dist/index.js +1174 -1112
- package/dist/index.js.map +1 -1
- package/dist/kanban-renderer.d.ts +2 -1
- package/dist/kanban-renderer.js +531 -528
- package/dist/kanban-renderer.js.map +1 -1
- package/dist/list-row-Z4SHkseA.js +1195 -0
- package/dist/list-row-Z4SHkseA.js.map +1 -0
- package/dist/markdown-editor-Dd4mor7l.js +3236 -0
- package/dist/markdown-editor-Dd4mor7l.js.map +1 -0
- package/dist/number-input-7K66wnSC.js +63 -0
- package/dist/number-input-7K66wnSC.js.map +1 -0
- package/dist/param-editor-Dnix-fJo.js +225 -0
- package/dist/param-editor-Dnix-fJo.js.map +1 -0
- package/dist/param-editor-field-B3vLST-B.js +2394 -0
- package/dist/param-editor-field-B3vLST-B.js.map +1 -0
- package/dist/param-editor.js +4 -2
- package/dist/prism-OG4H7Hu4.js +334 -0
- package/dist/prism-OG4H7Hu4.js.map +1 -0
- package/dist/queued-follow-up-Bj_vtMgd.js +208 -0
- package/dist/queued-follow-up-Bj_vtMgd.js.map +1 -0
- package/dist/rich-text-BgEnAHr2.js +1160 -0
- package/dist/rich-text-BgEnAHr2.js.map +1 -0
- package/dist/rich-text.d.ts +1 -1
- package/dist/rich-text.js +4 -2
- package/dist/terminal.js +1 -1
- package/dist/{theme-at0rtSnX.js → theme-CMJdH59Z.js} +224 -90
- package/dist/theme-CMJdH59Z.js.map +1 -0
- package/dist/theme.js +1 -1
- package/dist/tree-list-jarhD31R.js +1652 -0
- package/dist/tree-list-jarhD31R.js.map +1 -0
- package/dist/use-virtualizer-uj43XjBp.js +10 -0
- package/dist/use-virtualizer-uj43XjBp.js.map +1 -0
- package/dist/{host-storage-DP0RLj4i.d.ts → workspace-badge-BKtB805G.d.ts} +6 -16
- package/package.json +6 -2
- package/dist/chat-question-bubble-w2vMbFsS.js +0 -68
- package/dist/chat-question-bubble-w2vMbFsS.js.map +0 -1
- package/dist/diff-drawer-BwZBOObe.js.map +0 -1
- package/dist/list-row-DM0DiIrN.js +0 -1167
- package/dist/list-row-DM0DiIrN.js.map +0 -1
- package/dist/prism-JVIsQMoJ.js +0 -1029
- package/dist/prism-JVIsQMoJ.js.map +0 -1
- package/dist/rich-text-DM24VNQZ.js +0 -10447
- package/dist/rich-text-DM24VNQZ.js.map +0 -1
- package/dist/theme-at0rtSnX.js.map +0 -1
- package/dist/tree-list-Cqgl8mnN.js +0 -1621
- package/dist/tree-list-Cqgl8mnN.js.map +0 -1
|
@@ -0,0 +1,1652 @@
|
|
|
1
|
+
import { c as e, l as t, n, t as r, u as i } from "./list-row-Z4SHkseA.js";
|
|
2
|
+
import { t as a } from "./use-virtualizer-uj43XjBp.js";
|
|
3
|
+
import { t as o } from "./drop-indicator-HjlBSIeV.js";
|
|
4
|
+
import { Box as s, Flex as c, HStack as l, IconButton as u, Input as d, Stack as f, Text as p, useSlotRecipe as m } from "@chakra-ui/react";
|
|
5
|
+
import { c as h } from "react/compiler-runtime";
|
|
6
|
+
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
7
|
+
import { Fragment as y, createContext as b, useContext as x, useEffect as S, useId as C, useRef as w, useState as T } from "react";
|
|
8
|
+
import { ChevronRight as E } from "lucide-react";
|
|
9
|
+
import { DndContext as D, MeasuringStrategy as O, PointerSensor as k, closestCenter as A, pointerWithin as j, useDndContext as M, useDndMonitor as N, useDroppable as P, useSensor as F, useSensors as I } from "@dnd-kit/core";
|
|
10
|
+
import { SortableContext as L, useSortable as R, verticalListSortingStrategy as z } from "@dnd-kit/sortable";
|
|
11
|
+
//#region src/components/layout/resizable-split-layout.geometry.ts
|
|
12
|
+
var B = 72, V = 160, H = 72, U = (e, t, n) => Math.min(Math.max(e, t), n), W = {
|
|
13
|
+
left: {
|
|
14
|
+
rootDirection: "row",
|
|
15
|
+
dimension: "width",
|
|
16
|
+
separatorOrientation: "vertical",
|
|
17
|
+
cursor: "col-resize",
|
|
18
|
+
pointerCoordinate: "clientX",
|
|
19
|
+
deltaDirection: 1,
|
|
20
|
+
panelFirst: !0
|
|
21
|
+
},
|
|
22
|
+
right: {
|
|
23
|
+
rootDirection: "row",
|
|
24
|
+
dimension: "width",
|
|
25
|
+
separatorOrientation: "vertical",
|
|
26
|
+
cursor: "col-resize",
|
|
27
|
+
pointerCoordinate: "clientX",
|
|
28
|
+
deltaDirection: -1,
|
|
29
|
+
panelFirst: !1
|
|
30
|
+
},
|
|
31
|
+
top: {
|
|
32
|
+
rootDirection: "column",
|
|
33
|
+
dimension: "height",
|
|
34
|
+
separatorOrientation: "horizontal",
|
|
35
|
+
cursor: "row-resize",
|
|
36
|
+
pointerCoordinate: "clientY",
|
|
37
|
+
deltaDirection: 1,
|
|
38
|
+
panelFirst: !0
|
|
39
|
+
},
|
|
40
|
+
bottom: {
|
|
41
|
+
rootDirection: "column",
|
|
42
|
+
dimension: "height",
|
|
43
|
+
separatorOrientation: "horizontal",
|
|
44
|
+
cursor: "row-resize",
|
|
45
|
+
pointerCoordinate: "clientY",
|
|
46
|
+
deltaDirection: -1,
|
|
47
|
+
panelFirst: !1
|
|
48
|
+
}
|
|
49
|
+
}, G = (e) => W[e], ee = (e) => {
|
|
50
|
+
let t = e.rootSize > 0 ? e.rootSize : e.fallbackRootSize, n = Math.max(0, t - e.separatorSize - e.contentMinSize), r = e.maxSize ?? n, i = Math.max(0, Math.min(r, n));
|
|
51
|
+
return {
|
|
52
|
+
minSize: Math.min(e.minSize, i),
|
|
53
|
+
maxSize: i
|
|
54
|
+
};
|
|
55
|
+
}, K = (e, t) => e === "top" || e === "bottom" ? H : U(t / 2, B, V), te = (e) => {
|
|
56
|
+
let t = G(e.side), n = e.startSize + e.pointerDelta * t.deltaDirection, r = e.collapsible && n <= K(e.side, e.minSize);
|
|
57
|
+
return {
|
|
58
|
+
rawSize: n,
|
|
59
|
+
size: r ? 0 : U(n, e.minSize, e.maxSize),
|
|
60
|
+
collapsed: r
|
|
61
|
+
};
|
|
62
|
+
}, ne = 250, q = [
|
|
63
|
+
0,
|
|
64
|
+
1,
|
|
65
|
+
2
|
|
66
|
+
], re = (e, t) => e ? {
|
|
67
|
+
w: t,
|
|
68
|
+
h: "full",
|
|
69
|
+
hitArea: {
|
|
70
|
+
top: 0,
|
|
71
|
+
bottom: 0,
|
|
72
|
+
insetInlineStart: "-1",
|
|
73
|
+
insetInlineEnd: "-1"
|
|
74
|
+
},
|
|
75
|
+
gripDirection: "column",
|
|
76
|
+
bar: {
|
|
77
|
+
top: "0",
|
|
78
|
+
bottom: "0",
|
|
79
|
+
insetInlineStart: "50%",
|
|
80
|
+
w: "0.5",
|
|
81
|
+
transform: "translateX(-50%)"
|
|
82
|
+
}
|
|
83
|
+
} : {
|
|
84
|
+
w: "full",
|
|
85
|
+
h: t,
|
|
86
|
+
hitArea: {
|
|
87
|
+
insetInline: 0,
|
|
88
|
+
top: "-1",
|
|
89
|
+
bottom: "-1"
|
|
90
|
+
},
|
|
91
|
+
gripDirection: "row",
|
|
92
|
+
bar: {
|
|
93
|
+
top: "50%",
|
|
94
|
+
insetInline: "0",
|
|
95
|
+
h: "0.5",
|
|
96
|
+
transform: "translateY(-50%)"
|
|
97
|
+
}
|
|
98
|
+
}, ie = (e) => {
|
|
99
|
+
let t = h(4), { active: n, layout: r } = e, i = r.gripDirection, a = +!n, o;
|
|
100
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (o = q.map(oe), t[0] = o) : o = t[0];
|
|
101
|
+
let s;
|
|
102
|
+
return t[1] !== r.gripDirection || t[2] !== a ? (s = /* @__PURE__ */ _(c, {
|
|
103
|
+
"data-part": "grip",
|
|
104
|
+
direction: i,
|
|
105
|
+
gap: "3xs",
|
|
106
|
+
opacity: a,
|
|
107
|
+
transition: "opacity 120ms ease",
|
|
108
|
+
children: o
|
|
109
|
+
}), t[1] = r.gripDirection, t[2] = a, t[3] = s) : s = t[3], s;
|
|
110
|
+
}, ae = (e) => {
|
|
111
|
+
let t = h(3), { active: n, layout: r } = e, i = +!!n, a;
|
|
112
|
+
return t[0] !== r.bar || t[1] !== i ? (a = /* @__PURE__ */ _(s, {
|
|
113
|
+
"data-part": "bar",
|
|
114
|
+
position: "absolute",
|
|
115
|
+
borderRadius: "xs",
|
|
116
|
+
bg: "fg.info",
|
|
117
|
+
opacity: i,
|
|
118
|
+
transition: "opacity 120ms ease",
|
|
119
|
+
pointerEvents: "none",
|
|
120
|
+
...r.bar
|
|
121
|
+
}), t[0] = r.bar, t[1] = i, t[2] = a) : a = t[2], a;
|
|
122
|
+
}, J = (e) => {
|
|
123
|
+
let t = h(47), { css: n, axis: r, bounds: i, collapsed: a, collapsible: o, contentPanelId: c, dragging: l, resizablePanelId: u, resizeLabel: d, resolvedPanelSize: f, separator: p, separatorRef: m, onCollapse: g, onResizeKeyDown: y, onResizeStart: b } = e, x = p === "line", C = r.separatorOrientation === "vertical", E = x ? "1px" : "panel-gap", D;
|
|
124
|
+
t[0] !== C || t[1] !== E ? (D = re(C, E), t[0] = C, t[1] = E, t[2] = D) : D = t[2];
|
|
125
|
+
let O = D, [k, A] = T(!1), j = w(0), M = k || l, N;
|
|
126
|
+
t[3] === a ? N = t[4] : (N = a ? {
|
|
127
|
+
"aria-hidden": !0,
|
|
128
|
+
tabIndex: -1
|
|
129
|
+
} : { tabIndex: 0 }, t[3] = a, t[4] = N);
|
|
130
|
+
let P = N, F, I;
|
|
131
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (F = () => () => window.clearTimeout(j.current), I = [], t[5] = F, t[6] = I) : (F = t[5], I = t[6]), S(F, I);
|
|
132
|
+
let L;
|
|
133
|
+
t[7] === Symbol.for("react.memo_cache_sentinel") ? (L = () => {
|
|
134
|
+
j.current = window.setTimeout(() => A(!0), ne);
|
|
135
|
+
}, t[7] = L) : L = t[7];
|
|
136
|
+
let R = L, z;
|
|
137
|
+
t[8] === Symbol.for("react.memo_cache_sentinel") ? (z = () => {
|
|
138
|
+
window.clearTimeout(j.current), A(!1);
|
|
139
|
+
}, t[8] = z) : z = t[8];
|
|
140
|
+
let B = z, V = r.separatorOrientation, H = `${u} ${c}`, U;
|
|
141
|
+
t[9] !== i.minSize || t[10] !== o ? (U = o ? 0 : Math.round(i.minSize), t[9] = i.minSize, t[10] = o, t[11] = U) : U = t[11];
|
|
142
|
+
let W;
|
|
143
|
+
t[12] === i.maxSize ? W = t[13] : (W = Math.round(i.maxSize), t[12] = i.maxSize, t[13] = W);
|
|
144
|
+
let G;
|
|
145
|
+
t[14] === f ? G = t[15] : (G = Math.round(f), t[14] = f, t[15] = G);
|
|
146
|
+
let ee = x ? "border.subtle" : void 0, K;
|
|
147
|
+
t[16] === O.hitArea ? K = t[17] : (K = {
|
|
148
|
+
content: "\"\"",
|
|
149
|
+
position: "absolute",
|
|
150
|
+
...O.hitArea
|
|
151
|
+
}, t[16] = O.hitArea, t[17] = K);
|
|
152
|
+
let te;
|
|
153
|
+
t[18] === Symbol.for("react.memo_cache_sentinel") ? (te = {
|
|
154
|
+
"& [data-part=bar]": { opacity: 1 },
|
|
155
|
+
"& [data-part=grip]": { opacity: 0 }
|
|
156
|
+
}, t[18] = te) : te = t[18];
|
|
157
|
+
let q = o ? g : void 0, J;
|
|
158
|
+
t[19] !== M || t[20] !== O || t[21] !== x ? (J = x ? null : /* @__PURE__ */ _(ie, {
|
|
159
|
+
active: M,
|
|
160
|
+
layout: O
|
|
161
|
+
}), t[19] = M, t[20] = O, t[21] = x, t[22] = J) : J = t[22];
|
|
162
|
+
let oe;
|
|
163
|
+
t[23] !== M || t[24] !== O ? (oe = /* @__PURE__ */ _(ae, {
|
|
164
|
+
active: M,
|
|
165
|
+
layout: O
|
|
166
|
+
}), t[23] = M, t[24] = O, t[25] = oe) : oe = t[25];
|
|
167
|
+
let se;
|
|
168
|
+
return t[26] !== r.cursor || t[27] !== r.separatorOrientation || t[28] !== a || t[29] !== n || t[30] !== O.h || t[31] !== O.w || t[32] !== y || t[33] !== b || t[34] !== d || t[35] !== m || t[36] !== U || t[37] !== W || t[38] !== G || t[39] !== ee || t[40] !== K || t[41] !== q || t[42] !== J || t[43] !== oe || t[44] !== H || t[45] !== P ? (se = /* @__PURE__ */ v(s, {
|
|
169
|
+
css: n,
|
|
170
|
+
ref: m,
|
|
171
|
+
"data-collapsed": a,
|
|
172
|
+
role: "separator",
|
|
173
|
+
"aria-label": d,
|
|
174
|
+
"aria-orientation": V,
|
|
175
|
+
"aria-controls": H,
|
|
176
|
+
"aria-valuemin": U,
|
|
177
|
+
"aria-valuemax": W,
|
|
178
|
+
"aria-valuenow": G,
|
|
179
|
+
...P,
|
|
180
|
+
position: "relative",
|
|
181
|
+
zIndex: "docked",
|
|
182
|
+
alignItems: "center",
|
|
183
|
+
justifyContent: "center",
|
|
184
|
+
flexShrink: 0,
|
|
185
|
+
w: O.w,
|
|
186
|
+
h: O.h,
|
|
187
|
+
bg: ee,
|
|
188
|
+
cursor: r.cursor,
|
|
189
|
+
touchAction: "none",
|
|
190
|
+
outline: "none",
|
|
191
|
+
_before: K,
|
|
192
|
+
_focusVisible: te,
|
|
193
|
+
onPointerEnter: R,
|
|
194
|
+
onPointerLeave: B,
|
|
195
|
+
onPointerDown: b,
|
|
196
|
+
onDoubleClick: q,
|
|
197
|
+
onKeyDown: y,
|
|
198
|
+
children: [J, oe]
|
|
199
|
+
}), t[26] = r.cursor, t[27] = r.separatorOrientation, t[28] = a, t[29] = n, t[30] = O.h, t[31] = O.w, t[32] = y, t[33] = b, t[34] = d, t[35] = m, t[36] = U, t[37] = W, t[38] = G, t[39] = ee, t[40] = K, t[41] = q, t[42] = J, t[43] = oe, t[44] = H, t[45] = P, t[46] = se) : se = t[46], se;
|
|
200
|
+
};
|
|
201
|
+
function oe(e) {
|
|
202
|
+
return /* @__PURE__ */ _(s, {
|
|
203
|
+
boxSize: "0.5",
|
|
204
|
+
borderRadius: "full",
|
|
205
|
+
bg: "border"
|
|
206
|
+
}, e);
|
|
207
|
+
}
|
|
208
|
+
//#endregion
|
|
209
|
+
//#region src/components/layout/resizable-split-layout.panels.tsx
|
|
210
|
+
var se = (e) => {
|
|
211
|
+
let t = h(36), { styles: n, axis: r, bounds: i, collapsed: a, collapsible: o, contentPanel: c, contentPanelId: l, contentPanelRef: u, resizablePanel: d, resizablePanelId: f, resizablePanelRef: p, dragging: m, resizeLabel: y, resolvedPanelSize: b, separator: x, separatorRef: S, onCollapse: C, onResizeKeyDown: w, onResizeStart: T } = e, E = a ? !0 : void 0, D;
|
|
212
|
+
t[0] !== a || t[1] !== d || t[2] !== f || t[3] !== p || t[4] !== n.resizablePanel || t[5] !== E ? (D = /* @__PURE__ */ _(s, {
|
|
213
|
+
id: f,
|
|
214
|
+
ref: p,
|
|
215
|
+
css: n.resizablePanel,
|
|
216
|
+
"data-collapsed": a,
|
|
217
|
+
"aria-hidden": E,
|
|
218
|
+
children: d
|
|
219
|
+
}, "resizable-panel"), t[0] = a, t[1] = d, t[2] = f, t[3] = p, t[4] = n.resizablePanel, t[5] = E, t[6] = D) : D = t[6];
|
|
220
|
+
let O = D, k;
|
|
221
|
+
t[7] !== c || t[8] !== l || t[9] !== u || t[10] !== n.contentPanel ? (k = /* @__PURE__ */ _(s, {
|
|
222
|
+
id: l,
|
|
223
|
+
ref: u,
|
|
224
|
+
css: n.contentPanel,
|
|
225
|
+
children: c
|
|
226
|
+
}, "content-panel"), t[7] = c, t[8] = l, t[9] = u, t[10] = n.contentPanel, t[11] = k) : k = t[11];
|
|
227
|
+
let A = k, j;
|
|
228
|
+
t[12] !== r || t[13] !== i || t[14] !== a || t[15] !== o || t[16] !== l || t[17] !== m || t[18] !== C || t[19] !== w || t[20] !== T || t[21] !== f || t[22] !== y || t[23] !== b || t[24] !== x || t[25] !== S || t[26] !== n.separator ? (j = /* @__PURE__ */ _(J, {
|
|
229
|
+
css: n.separator,
|
|
230
|
+
axis: r,
|
|
231
|
+
bounds: i,
|
|
232
|
+
collapsed: a,
|
|
233
|
+
collapsible: o,
|
|
234
|
+
contentPanelId: l,
|
|
235
|
+
resizablePanelId: f,
|
|
236
|
+
dragging: m,
|
|
237
|
+
resizeLabel: y,
|
|
238
|
+
resolvedPanelSize: b,
|
|
239
|
+
separator: x,
|
|
240
|
+
separatorRef: S,
|
|
241
|
+
onCollapse: C,
|
|
242
|
+
onResizeKeyDown: w,
|
|
243
|
+
onResizeStart: T
|
|
244
|
+
}, "resize-handle"), t[12] = r, t[13] = i, t[14] = a, t[15] = o, t[16] = l, t[17] = m, t[18] = C, t[19] = w, t[20] = T, t[21] = f, t[22] = y, t[23] = b, t[24] = x, t[25] = S, t[26] = n.separator, t[27] = j) : j = t[27];
|
|
245
|
+
let M = j;
|
|
246
|
+
if (r.panelFirst) {
|
|
247
|
+
let e;
|
|
248
|
+
return t[28] !== A || t[29] !== O || t[30] !== M ? (e = /* @__PURE__ */ v(g, { children: [
|
|
249
|
+
O,
|
|
250
|
+
M,
|
|
251
|
+
A
|
|
252
|
+
] }), t[28] = A, t[29] = O, t[30] = M, t[31] = e) : e = t[31], e;
|
|
253
|
+
}
|
|
254
|
+
let N;
|
|
255
|
+
return t[32] !== A || t[33] !== O || t[34] !== M ? (N = /* @__PURE__ */ v(g, { children: [
|
|
256
|
+
A,
|
|
257
|
+
M,
|
|
258
|
+
O
|
|
259
|
+
] }), t[32] = A, t[33] = O, t[34] = M, t[35] = N) : N = t[35], N;
|
|
260
|
+
}, ce = (e, t, n) => {
|
|
261
|
+
let r = h(6), i;
|
|
262
|
+
r[0] === Symbol.for("react.memo_cache_sentinel") ? (i = {
|
|
263
|
+
rootSize: 0,
|
|
264
|
+
separatorSize: 0
|
|
265
|
+
}, r[0] = i) : i = r[0];
|
|
266
|
+
let [a, o] = T(i), s, c;
|
|
267
|
+
return r[1] !== n || r[2] !== e || r[3] !== t ? (s = () => {
|
|
268
|
+
let r = e.current;
|
|
269
|
+
if (!r) return;
|
|
270
|
+
let i = () => {
|
|
271
|
+
o({
|
|
272
|
+
rootSize: r.getBoundingClientRect()[n],
|
|
273
|
+
separatorSize: t.current?.getBoundingClientRect()[n] ?? 0
|
|
274
|
+
});
|
|
275
|
+
};
|
|
276
|
+
if (i(), typeof ResizeObserver > "u") return;
|
|
277
|
+
let a = new ResizeObserver(i);
|
|
278
|
+
return a.observe(r), t.current && a.observe(t.current), () => {
|
|
279
|
+
a.disconnect();
|
|
280
|
+
};
|
|
281
|
+
}, c = [
|
|
282
|
+
e,
|
|
283
|
+
t,
|
|
284
|
+
n
|
|
285
|
+
], r[1] = n, r[2] = e, r[3] = t, r[4] = s, r[5] = c) : (s = r[4], c = r[5]), S(s, c), a;
|
|
286
|
+
}, le = {
|
|
287
|
+
width: 1200,
|
|
288
|
+
height: 720
|
|
289
|
+
}, ue = 24, de = (e, t, n) => Math.min(Math.max(e, t), n), fe = (e, t) => e?.getBoundingClientRect()[t] ?? 0, pe = (e) => {
|
|
290
|
+
let t = h(96), n, r, i, a, o, s, l, u, d, f, p, g, v, y, b;
|
|
291
|
+
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4], o = t[5], s = t[6], l = t[7], u = t[8], d = t[9], f = t[10], p = t[11], g = t[12], v = t[13], y = t[14], b = t[15]) : ({resizablePanel: s, contentPanel: n, resizableSide: u, defaultSizePx: d, minSizePx: f, maxSizePx: i, contentMinSizePx: p, collapsed: r, collapsible: g, resizeLabel: v, separator: y, layout: b, onSizeChange: o, onCollapsedChange: a, ...l} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a, t[5] = o, t[6] = s, t[7] = l, t[8] = u, t[9] = d, t[10] = f, t[11] = p, t[12] = g, t[13] = v, t[14] = y, t[15] = b);
|
|
292
|
+
let x = u === void 0 ? "left" : u, E = d === void 0 ? 240 : d, D = f === void 0 ? 200 : f, O = p === void 0 ? 0 : p, k = g === void 0 || g, A = v === void 0 ? "Resize panel" : v, j = y === void 0 ? "gap" : y, M = b === void 0 ? "split" : b, N;
|
|
293
|
+
t[16] === x ? N = t[17] : (N = G(x), t[16] = x, t[17] = N);
|
|
294
|
+
let P = N, F;
|
|
295
|
+
t[18] === Symbol.for("react.memo_cache_sentinel") ? (F = { key: "resizableSplitLayout" }, t[18] = F) : F = t[18];
|
|
296
|
+
let I = m(F), L = P.dimension === "width" ? "horizontal" : "vertical", R;
|
|
297
|
+
t[19] !== M || t[20] !== I || t[21] !== L ? (R = I({
|
|
298
|
+
orientation: L,
|
|
299
|
+
layout: M
|
|
300
|
+
}), t[19] = M, t[20] = I, t[21] = L, t[22] = R) : R = t[22];
|
|
301
|
+
let z = R, B = C(), V = w(null), H = w(null), U = w(null), W = w(null), K = w(me), { rootSize: ne, separatorSize: q } = ce(V, W, P.dimension), re = w(E), [ie, ae] = T(E), [J, oe] = T(!1), [pe, ge] = T(!1), Y = r ?? J, X, _e;
|
|
302
|
+
t[23] !== P.dimension || t[24] !== Y || t[25] !== O || t[26] !== i || t[27] !== D || t[28] !== ie || t[29] !== ne || t[30] !== q ? (X = ee({
|
|
303
|
+
rootSize: ne,
|
|
304
|
+
fallbackRootSize: le[P.dimension],
|
|
305
|
+
minSize: D,
|
|
306
|
+
maxSize: i,
|
|
307
|
+
contentMinSize: O,
|
|
308
|
+
separatorSize: q
|
|
309
|
+
}), _e = Y ? 0 : de(ie, X.minSize, X.maxSize), t[23] = P.dimension, t[24] = Y, t[25] = O, t[26] = i, t[27] = D, t[28] = ie, t[29] = ne, t[30] = q, t[31] = X, t[32] = _e) : (X = t[31], _e = t[32]);
|
|
310
|
+
let ve = _e, ye = `${B}-content`, be = `${B}-resizable`, xe = `${ve}px`, Se;
|
|
311
|
+
t[33] !== l.style || t[34] !== xe ? (Se = {
|
|
312
|
+
...l.style,
|
|
313
|
+
"--split-size": xe
|
|
314
|
+
}, t[33] = l.style, t[34] = xe, t[35] = Se) : Se = t[35];
|
|
315
|
+
let Ce = Se, we, Te;
|
|
316
|
+
t[36] === E ? (we = t[37], Te = t[38]) : (we = () => {
|
|
317
|
+
re.current = E, ae(E);
|
|
318
|
+
}, Te = [E], t[36] = E, t[37] = we, t[38] = Te), S(we, Te);
|
|
319
|
+
let Ee, De;
|
|
320
|
+
t[39] === Symbol.for("react.memo_cache_sentinel") ? (Ee = () => () => K.current(), De = [], t[39] = Ee, t[40] = De) : (Ee = t[39], De = t[40]), S(Ee, De);
|
|
321
|
+
let Oe;
|
|
322
|
+
t[41] === Symbol.for("react.memo_cache_sentinel") ? (Oe = (e) => {
|
|
323
|
+
V.current?.style.setProperty("--split-size", `${e}px`);
|
|
324
|
+
}, t[41] = Oe) : Oe = t[41];
|
|
325
|
+
let ke = Oe, Ae;
|
|
326
|
+
t[42] !== P.dimension || t[43] !== O || t[44] !== i || t[45] !== D || t[46] !== o ? (Ae = (e) => {
|
|
327
|
+
let t = ee({
|
|
328
|
+
rootSize: fe(V.current, P.dimension),
|
|
329
|
+
fallbackRootSize: le[P.dimension],
|
|
330
|
+
minSize: D,
|
|
331
|
+
maxSize: i,
|
|
332
|
+
contentMinSize: O,
|
|
333
|
+
separatorSize: fe(W.current, P.dimension)
|
|
334
|
+
}), n = de(e, t.minSize, t.maxSize);
|
|
335
|
+
re.current = n, ae(n), ke(n), o?.(n);
|
|
336
|
+
}, t[42] = P.dimension, t[43] = O, t[44] = i, t[45] = D, t[46] = o, t[47] = Ae) : Ae = t[47];
|
|
337
|
+
let Z = Ae, je;
|
|
338
|
+
t[48] !== r || t[49] !== a ? (je = (e) => {
|
|
339
|
+
r === void 0 && oe(e), a?.(e);
|
|
340
|
+
}, t[48] = r, t[49] = a, t[50] = je) : je = t[50];
|
|
341
|
+
let Q = je, Me;
|
|
342
|
+
t[51] !== P.cursor || t[52] !== P.dimension || t[53] !== P.pointerCoordinate || t[54] !== Y || t[55] !== k || t[56] !== Z || t[57] !== O || t[58] !== i || t[59] !== D || t[60] !== x || t[61] !== Q ? (Me = (e) => {
|
|
343
|
+
if (e.button !== 0 || Y && !k) return;
|
|
344
|
+
e.preventDefault(), K.current();
|
|
345
|
+
let t = e.currentTarget, n = ee({
|
|
346
|
+
rootSize: fe(V.current, P.dimension),
|
|
347
|
+
fallbackRootSize: le[P.dimension],
|
|
348
|
+
minSize: D,
|
|
349
|
+
maxSize: i,
|
|
350
|
+
contentMinSize: O,
|
|
351
|
+
separatorSize: fe(W.current, P.dimension)
|
|
352
|
+
}), r = e[P.pointerCoordinate], a = Y ? 0 : fe(H.current, P.dimension) || re.current, o = document.body.style.cursor, s = document.body.style.userSelect, c = a === 0 ? 0 : de(a, n.minSize, n.maxSize), l = Y, u = 0, d = (e) => {
|
|
353
|
+
H.current && (H.current.style.pointerEvents = e), U.current && (U.current.style.pointerEvents = e);
|
|
354
|
+
}, f = () => {
|
|
355
|
+
u ||= window.requestAnimationFrame(() => {
|
|
356
|
+
u = 0, ke(c);
|
|
357
|
+
});
|
|
358
|
+
}, p = (e) => {
|
|
359
|
+
let t = te({
|
|
360
|
+
side: x,
|
|
361
|
+
startSize: a,
|
|
362
|
+
pointerDelta: e[P.pointerCoordinate] - r,
|
|
363
|
+
minSize: n.minSize,
|
|
364
|
+
maxSize: n.maxSize,
|
|
365
|
+
collapsible: k
|
|
366
|
+
});
|
|
367
|
+
l = t.collapsed, c = t.size, f();
|
|
368
|
+
}, m = () => {
|
|
369
|
+
window.removeEventListener("pointermove", p), window.removeEventListener("pointerup", m), window.removeEventListener("pointercancel", m), window.removeEventListener("blur", m), document.body.style.cursor = o, document.body.style.userSelect = s, t.hasPointerCapture(e.pointerId) && t.releasePointerCapture(e.pointerId), d(""), ge(!1), u &&= (window.cancelAnimationFrame(u), 0), K.current = he, l ? (ke(0), Q(!0)) : (Q(!1), Z(c));
|
|
370
|
+
};
|
|
371
|
+
K.current = m, t.setPointerCapture(e.pointerId), document.body.style.cursor = P.cursor, document.body.style.userSelect = "none", d("none"), ge(!0), window.addEventListener("pointermove", p), window.addEventListener("pointerup", m, { once: !0 }), window.addEventListener("pointercancel", m, { once: !0 }), window.addEventListener("blur", m, { once: !0 });
|
|
372
|
+
}, t[51] = P.cursor, t[52] = P.dimension, t[53] = P.pointerCoordinate, t[54] = Y, t[55] = k, t[56] = Z, t[57] = O, t[58] = i, t[59] = D, t[60] = x, t[61] = Q, t[62] = Me) : Me = t[62];
|
|
373
|
+
let Ne = Me, Pe;
|
|
374
|
+
t[63] !== k || t[64] !== Q ? (Pe = () => {
|
|
375
|
+
k && Q(!0);
|
|
376
|
+
}, t[63] = k, t[64] = Q, t[65] = Pe) : Pe = t[65];
|
|
377
|
+
let Fe = Pe, Ie;
|
|
378
|
+
t[66] !== P.deltaDirection || t[67] !== P.dimension || t[68] !== X || t[69] !== Y || t[70] !== k || t[71] !== Z || t[72] !== Q ? (Ie = (e) => {
|
|
379
|
+
let t = P.dimension === "width" ? "ArrowLeft" : "ArrowUp", n = P.dimension === "width" ? "ArrowRight" : "ArrowDown", r = re.current;
|
|
380
|
+
Y && (e.key === t || e.key === n || e.key === "End") ? (e.preventDefault(), Q(!1), Z(r)) : e.key === t ? (e.preventDefault(), Z(r - ue * P.deltaDirection)) : e.key === n ? (e.preventDefault(), Z(r + ue * P.deltaDirection)) : e.key === "Home" ? (e.preventDefault(), k ? Q(!0) : Z(X.minSize)) : e.key === "End" && (e.preventDefault(), Z(X.maxSize));
|
|
381
|
+
}, t[66] = P.deltaDirection, t[67] = P.dimension, t[68] = X, t[69] = Y, t[70] = k, t[71] = Z, t[72] = Q, t[73] = Ie) : Ie = t[73];
|
|
382
|
+
let Le = Ie, $;
|
|
383
|
+
t[74] !== P || t[75] !== X || t[76] !== Y || t[77] !== k || t[78] !== n || t[79] !== ye || t[80] !== pe || t[81] !== Fe || t[82] !== Le || t[83] !== Ne || t[84] !== s || t[85] !== be || t[86] !== A || t[87] !== ve || t[88] !== j || t[89] !== z ? ($ = /* @__PURE__ */ _(se, {
|
|
384
|
+
styles: z,
|
|
385
|
+
axis: P,
|
|
386
|
+
bounds: X,
|
|
387
|
+
collapsed: Y,
|
|
388
|
+
collapsible: k,
|
|
389
|
+
contentPanel: n,
|
|
390
|
+
contentPanelId: ye,
|
|
391
|
+
contentPanelRef: U,
|
|
392
|
+
resizablePanel: s,
|
|
393
|
+
resizablePanelId: be,
|
|
394
|
+
resizablePanelRef: H,
|
|
395
|
+
dragging: pe,
|
|
396
|
+
resizeLabel: A,
|
|
397
|
+
resolvedPanelSize: ve,
|
|
398
|
+
separator: j,
|
|
399
|
+
separatorRef: W,
|
|
400
|
+
onCollapse: Fe,
|
|
401
|
+
onResizeKeyDown: Le,
|
|
402
|
+
onResizeStart: Ne
|
|
403
|
+
}), t[74] = P, t[75] = X, t[76] = Y, t[77] = k, t[78] = n, t[79] = ye, t[80] = pe, t[81] = Fe, t[82] = Le, t[83] = Ne, t[84] = s, t[85] = be, t[86] = A, t[87] = ve, t[88] = j, t[89] = z, t[90] = $) : $ = t[90];
|
|
404
|
+
let Re;
|
|
405
|
+
return t[91] !== l || t[92] !== Ce || t[93] !== z.root || t[94] !== $ ? (Re = /* @__PURE__ */ _(c, {
|
|
406
|
+
ref: V,
|
|
407
|
+
css: z.root,
|
|
408
|
+
...l,
|
|
409
|
+
style: Ce,
|
|
410
|
+
children: $
|
|
411
|
+
}), t[91] = l, t[92] = Ce, t[93] = z.root, t[94] = $, t[95] = Re) : Re = t[95], Re;
|
|
412
|
+
};
|
|
413
|
+
function me() {}
|
|
414
|
+
function he() {}
|
|
415
|
+
//#endregion
|
|
416
|
+
//#region src/components/tree-list/tree-list-background.tsx
|
|
417
|
+
var ge = (e) => {
|
|
418
|
+
let t = h(8), { actions: n, children: r } = e, a;
|
|
419
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ _(s, {
|
|
420
|
+
position: "absolute",
|
|
421
|
+
inset: "0",
|
|
422
|
+
zIndex: 0,
|
|
423
|
+
"aria-hidden": !0,
|
|
424
|
+
"data-tree-list-background": "true"
|
|
425
|
+
}), t[0] = a) : a = t[0];
|
|
426
|
+
let o;
|
|
427
|
+
t[1] === n ? o = t[2] : (o = /* @__PURE__ */ _(i, {
|
|
428
|
+
actions: n,
|
|
429
|
+
closeOnSelect: !1,
|
|
430
|
+
children: a
|
|
431
|
+
}), t[1] = n, t[2] = o);
|
|
432
|
+
let c;
|
|
433
|
+
t[3] === r ? c = t[4] : (c = /* @__PURE__ */ _(s, {
|
|
434
|
+
position: "relative",
|
|
435
|
+
zIndex: 1,
|
|
436
|
+
w: "full",
|
|
437
|
+
minW: "0",
|
|
438
|
+
maxW: "full",
|
|
439
|
+
children: r
|
|
440
|
+
}), t[3] = r, t[4] = c);
|
|
441
|
+
let l;
|
|
442
|
+
return t[5] !== o || t[6] !== c ? (l = /* @__PURE__ */ v(s, {
|
|
443
|
+
position: "relative",
|
|
444
|
+
flex: "1 0 auto",
|
|
445
|
+
minH: "full",
|
|
446
|
+
w: "full",
|
|
447
|
+
minW: "0",
|
|
448
|
+
maxW: "full",
|
|
449
|
+
children: [o, c]
|
|
450
|
+
}), t[5] = o, t[6] = c, t[7] = l) : l = t[7], l;
|
|
451
|
+
}, Y = (e, t) => t.includes(e), X = (e, t) => Array.isArray(t) ? t.includes(e) : t === e, _e = (e) => e.isNavigable || e.navigationIntent !== void 0, ve = (e) => e.children ?? [], ye = (e) => ve(e).length > 0 || e.isContainer === !0, be = (e) => {
|
|
452
|
+
let { rows: t, sectionId: n, nodes: r, expandedNodeIds: i, level: a, parentNodeId: o } = e;
|
|
453
|
+
for (let e of r) {
|
|
454
|
+
t.push({
|
|
455
|
+
kind: "node",
|
|
456
|
+
key: `${n}:${e.id}`,
|
|
457
|
+
sectionId: n,
|
|
458
|
+
node: e,
|
|
459
|
+
level: a,
|
|
460
|
+
parentNodeId: o
|
|
461
|
+
});
|
|
462
|
+
let r = ve(e);
|
|
463
|
+
r.length !== 0 && Y(e.id, i) && be({
|
|
464
|
+
rows: t,
|
|
465
|
+
sectionId: n,
|
|
466
|
+
nodes: r,
|
|
467
|
+
expandedNodeIds: i,
|
|
468
|
+
level: a + 1,
|
|
469
|
+
parentNodeId: e.id
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
}, xe = (e, t, n) => {
|
|
473
|
+
let r = [];
|
|
474
|
+
for (let i of e) {
|
|
475
|
+
let e = i.collapsible !== !1 && i.label !== void 0, a = !e || Y(i.id, t);
|
|
476
|
+
if (i.label && r.push({
|
|
477
|
+
kind: "section-header",
|
|
478
|
+
key: `header:${i.id}`,
|
|
479
|
+
sectionId: i.id,
|
|
480
|
+
section: i,
|
|
481
|
+
collapsible: e,
|
|
482
|
+
expanded: a
|
|
483
|
+
}), a) {
|
|
484
|
+
if (i.nodes.length === 0) {
|
|
485
|
+
i.emptyState && r.push({
|
|
486
|
+
kind: "section-empty",
|
|
487
|
+
key: `empty:${i.id}`,
|
|
488
|
+
sectionId: i.id,
|
|
489
|
+
emptyState: i.emptyState
|
|
490
|
+
});
|
|
491
|
+
continue;
|
|
492
|
+
}
|
|
493
|
+
be({
|
|
494
|
+
rows: r,
|
|
495
|
+
sectionId: i.id,
|
|
496
|
+
nodes: i.nodes,
|
|
497
|
+
expandedNodeIds: n,
|
|
498
|
+
level: 0
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
return r;
|
|
503
|
+
}, Se = (e) => e.kind === "node" ? e.node.id : e.key, Ce = (e) => e.kind === "node" ? e.node.disabled !== !0 : e.kind === "section-header" && e.collapsible, we = (e) => e.filter(Ce), Te = (e, t, n) => {
|
|
504
|
+
let r = we(n), i = new Set(r.map(Se));
|
|
505
|
+
if (e && i.has(e)) return e;
|
|
506
|
+
let a = (t ? [t].flat() : []).find((e) => i.has(e));
|
|
507
|
+
if (a) return a;
|
|
508
|
+
let o = r[0];
|
|
509
|
+
return o ? Se(o) : void 0;
|
|
510
|
+
}, Ee = (e) => {
|
|
511
|
+
let { row: t, focusableRows: n, currentIndex: r, key: i } = e;
|
|
512
|
+
if (i === "Enter" || i === " ") return {
|
|
513
|
+
type: "toggle-section",
|
|
514
|
+
sectionId: t.sectionId
|
|
515
|
+
};
|
|
516
|
+
if (i === "ArrowRight") {
|
|
517
|
+
if (!t.expanded) return {
|
|
518
|
+
type: "toggle-section",
|
|
519
|
+
sectionId: t.sectionId
|
|
520
|
+
};
|
|
521
|
+
let e = n[r + 1];
|
|
522
|
+
return e?.kind === "node" && e.sectionId === t.sectionId ? {
|
|
523
|
+
type: "focus",
|
|
524
|
+
rowId: e.node.id
|
|
525
|
+
} : null;
|
|
526
|
+
}
|
|
527
|
+
return i === "ArrowLeft" && t.expanded ? {
|
|
528
|
+
type: "toggle-section",
|
|
529
|
+
sectionId: t.sectionId
|
|
530
|
+
} : null;
|
|
531
|
+
}, De = (e) => {
|
|
532
|
+
let { row: t, focusableRows: n, currentIndex: r, expandedNodeIds: i, key: a } = e, o = Y(t.node.id, i), s = ye(t.node);
|
|
533
|
+
if (a === "ArrowRight") {
|
|
534
|
+
if (!s) return null;
|
|
535
|
+
if (!o) return {
|
|
536
|
+
type: "toggle-node",
|
|
537
|
+
nodeId: t.node.id
|
|
538
|
+
};
|
|
539
|
+
let e = n[r + 1];
|
|
540
|
+
return e?.kind === "node" && e.parentNodeId === t.node.id ? {
|
|
541
|
+
type: "focus",
|
|
542
|
+
rowId: e.node.id
|
|
543
|
+
} : null;
|
|
544
|
+
}
|
|
545
|
+
if (a === "ArrowLeft") {
|
|
546
|
+
if (s && o) return {
|
|
547
|
+
type: "toggle-node",
|
|
548
|
+
nodeId: t.node.id
|
|
549
|
+
};
|
|
550
|
+
if (t.parentNodeId) return {
|
|
551
|
+
type: "focus",
|
|
552
|
+
rowId: t.parentNodeId
|
|
553
|
+
};
|
|
554
|
+
}
|
|
555
|
+
return null;
|
|
556
|
+
}, Oe = (e) => {
|
|
557
|
+
let { rows: t, focusedRowId: n, activeNodeId: r, expandedNodeIds: i, key: a } = e, o = we(t);
|
|
558
|
+
if (o.length === 0) return null;
|
|
559
|
+
let s = Te(n, r, t), c = Math.max(0, o.findIndex((e) => Se(e) === s)), l = o[c];
|
|
560
|
+
if (!l) return null;
|
|
561
|
+
let u = (e) => {
|
|
562
|
+
let t = Math.min(Math.max(e, 0), o.length - 1);
|
|
563
|
+
return {
|
|
564
|
+
type: "focus",
|
|
565
|
+
rowId: Se(o[t])
|
|
566
|
+
};
|
|
567
|
+
};
|
|
568
|
+
return a === "ArrowDown" ? u(c + 1) : a === "ArrowUp" ? u(c - 1) : a === "Home" ? u(0) : a === "End" ? u(o.length - 1) : l.kind === "section-header" ? Ee({
|
|
569
|
+
row: l,
|
|
570
|
+
focusableRows: o,
|
|
571
|
+
currentIndex: c,
|
|
572
|
+
key: a
|
|
573
|
+
}) : De({
|
|
574
|
+
row: l,
|
|
575
|
+
focusableRows: o,
|
|
576
|
+
currentIndex: c,
|
|
577
|
+
expandedNodeIds: i,
|
|
578
|
+
key: a
|
|
579
|
+
});
|
|
580
|
+
}, ke = "application/x-pstdio-tree-node", Ae = (e, t) => {
|
|
581
|
+
e.setData(ke, t);
|
|
582
|
+
}, Z = (e) => e.getData(ke) || void 0, je = (e) => {
|
|
583
|
+
let t = h(8), { children: n, onMoveNode: r } = e, i;
|
|
584
|
+
t[0] === r ? i = t[1] : (i = (e) => {
|
|
585
|
+
r && (e.preventDefault(), e.dataTransfer.dropEffect = "move");
|
|
586
|
+
}, t[0] = r, t[1] = i);
|
|
587
|
+
let a = i, o;
|
|
588
|
+
t[2] === r ? o = t[3] : (o = (e) => {
|
|
589
|
+
if (!r) return;
|
|
590
|
+
e.preventDefault();
|
|
591
|
+
let t = Z(e.dataTransfer);
|
|
592
|
+
t && r(t, void 0, "inside");
|
|
593
|
+
}, t[2] = r, t[3] = o);
|
|
594
|
+
let c = o, l;
|
|
595
|
+
return t[4] !== n || t[5] !== a || t[6] !== c ? (l = /* @__PURE__ */ _(s, {
|
|
596
|
+
p: "xs",
|
|
597
|
+
w: "full",
|
|
598
|
+
minW: "0",
|
|
599
|
+
maxW: "full",
|
|
600
|
+
minH: "full",
|
|
601
|
+
flex: "1 0 auto",
|
|
602
|
+
onDragOver: a,
|
|
603
|
+
onDrop: c,
|
|
604
|
+
children: n
|
|
605
|
+
}), t[4] = n, t[5] = a, t[6] = c, t[7] = l) : l = t[7], l;
|
|
606
|
+
}, Q = (e) => e <= 0 ? "sm" : `calc(var(--chakra-spacing-1) + ${e} * 12px)`, Me = (e) => {
|
|
607
|
+
let { input: t, icon: n, level: r } = e, [i, a] = T(t.defaultValue ?? ""), [o, l] = T(), u = w(null), f = w(!1), p = async () => {
|
|
608
|
+
if (!f.current) {
|
|
609
|
+
f.current = !0, l(void 0);
|
|
610
|
+
try {
|
|
611
|
+
await t.onCommit(i.trim());
|
|
612
|
+
} catch (e) {
|
|
613
|
+
l(e instanceof Error ? e.message : "Could not create file."), queueMicrotask(() => u.current?.focus());
|
|
614
|
+
} finally {
|
|
615
|
+
f.current = !1;
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
};
|
|
619
|
+
return /* @__PURE__ */ v(c, {
|
|
620
|
+
h: "1.75rem",
|
|
621
|
+
w: "full",
|
|
622
|
+
minW: "0",
|
|
623
|
+
alignItems: "center",
|
|
624
|
+
gap: "1",
|
|
625
|
+
pr: "sm",
|
|
626
|
+
pl: Q(r),
|
|
627
|
+
onMouseDown: (e) => e.stopPropagation(),
|
|
628
|
+
children: [n ? /* @__PURE__ */ _(s, {
|
|
629
|
+
boxSize: "16px",
|
|
630
|
+
color: "fg.muted",
|
|
631
|
+
flexShrink: 0,
|
|
632
|
+
display: "inline-flex",
|
|
633
|
+
alignItems: "center",
|
|
634
|
+
justifyContent: "center",
|
|
635
|
+
css: { "& > svg": {
|
|
636
|
+
width: "16px",
|
|
637
|
+
height: "16px"
|
|
638
|
+
} },
|
|
639
|
+
children: n
|
|
640
|
+
}) : null, /* @__PURE__ */ _(d, {
|
|
641
|
+
ref: u,
|
|
642
|
+
autoFocus: !0,
|
|
643
|
+
size: "xs",
|
|
644
|
+
value: i,
|
|
645
|
+
"aria-label": t.ariaLabel,
|
|
646
|
+
"aria-invalid": !!o || void 0,
|
|
647
|
+
placeholder: t.placeholder,
|
|
648
|
+
title: o,
|
|
649
|
+
onChange: (e) => a(e.currentTarget.value),
|
|
650
|
+
onBlur: () => {
|
|
651
|
+
f.current || t.onCancel?.();
|
|
652
|
+
},
|
|
653
|
+
onKeyDown: (e) => {
|
|
654
|
+
e.stopPropagation(), e.key === "Enter" && (e.preventDefault(), p()), e.key === "Escape" && !f.current && (e.preventDefault(), t.onCancel?.());
|
|
655
|
+
}
|
|
656
|
+
})]
|
|
657
|
+
});
|
|
658
|
+
}, Ne = (e) => {
|
|
659
|
+
let t = h(78), { sectionId: n, node: i, level: a, expandedNodeIds: s, activeNodeId: c, rowVariant: l, nodeGap: u, linkComponent: d, tabIndex: p, onFocus: m, onNavigate: g, onToggleNode: y, onMoveNode: b } = e, [x, S] = T(null);
|
|
660
|
+
if (i.inlineInput) {
|
|
661
|
+
let e;
|
|
662
|
+
return t[0] !== a || t[1] !== i.icon || t[2] !== i.inlineInput ? (e = /* @__PURE__ */ _(Me, {
|
|
663
|
+
input: i.inlineInput,
|
|
664
|
+
icon: i.icon,
|
|
665
|
+
level: a
|
|
666
|
+
}), t[0] = a, t[1] = i.icon, t[2] = i.inlineInput, t[3] = e) : e = t[3], e;
|
|
667
|
+
}
|
|
668
|
+
let C;
|
|
669
|
+
t[4] === i ? C = t[5] : (C = ye(i), t[4] = i, t[5] = C);
|
|
670
|
+
let w = C, E;
|
|
671
|
+
t[6] !== s || t[7] !== w || t[8] !== i.id ? (E = w && Y(i.id, s), t[6] = s, t[7] = w, t[8] = i.id, t[9] = E) : E = t[9];
|
|
672
|
+
let D = E, O;
|
|
673
|
+
t[10] !== c || t[11] !== i.id ? (O = X(i.id, c), t[10] = c, t[11] = i.id, t[12] = O) : O = t[12];
|
|
674
|
+
let k = O, A = i.disabled === !0, j;
|
|
675
|
+
t[13] === i ? j = t[14] : (j = _e(i), t[13] = i, t[14] = j);
|
|
676
|
+
let M = j, N = !!(d && i.href && M && !w && !A), P;
|
|
677
|
+
t[15] !== w || t[16] !== A || t[17] !== M || t[18] !== i || t[19] !== g || t[20] !== y || t[21] !== n ? (P = () => {
|
|
678
|
+
if (!A) {
|
|
679
|
+
if (w) {
|
|
680
|
+
y?.(i.id);
|
|
681
|
+
return;
|
|
682
|
+
}
|
|
683
|
+
if (M && g) {
|
|
684
|
+
g({
|
|
685
|
+
sectionId: n,
|
|
686
|
+
nodeId: i.id,
|
|
687
|
+
node: i,
|
|
688
|
+
intent: i.navigationIntent
|
|
689
|
+
});
|
|
690
|
+
return;
|
|
691
|
+
}
|
|
692
|
+
i.onActivate?.();
|
|
693
|
+
}
|
|
694
|
+
}, t[15] = w, t[16] = A, t[17] = M, t[18] = i, t[19] = g, t[20] = y, t[21] = n, t[22] = P) : P = t[22];
|
|
695
|
+
let F = P, I;
|
|
696
|
+
t[23] === i.id ? I = t[24] : (I = (e) => {
|
|
697
|
+
Ae(e.dataTransfer, i.id), e.dataTransfer.effectAllowed = "move";
|
|
698
|
+
}, t[23] = i.id, t[24] = I);
|
|
699
|
+
let L = I, R;
|
|
700
|
+
t[25] === w ? R = t[26] : (R = (e) => {
|
|
701
|
+
if (w) return "inside";
|
|
702
|
+
let t = e.currentTarget.getBoundingClientRect();
|
|
703
|
+
return e.clientY < t.top + t.height / 2 ? "before" : "after";
|
|
704
|
+
}, t[25] = w, t[26] = R);
|
|
705
|
+
let z = R, B;
|
|
706
|
+
t[27] !== i.canDrop || t[28] !== b || t[29] !== z ? (B = (e) => {
|
|
707
|
+
b && (e.stopPropagation(), i.canDrop && (e.preventDefault(), e.dataTransfer.dropEffect = "move", S(z(e))));
|
|
708
|
+
}, t[27] = i.canDrop, t[28] = b, t[29] = z, t[30] = B) : B = t[30];
|
|
709
|
+
let V = B, H;
|
|
710
|
+
t[31] !== i.canDrop || t[32] !== i.id || t[33] !== b || t[34] !== z ? (H = (e) => {
|
|
711
|
+
if (!b || (e.stopPropagation(), !i.canDrop)) return;
|
|
712
|
+
e.preventDefault(), S(null);
|
|
713
|
+
let t = Z(e.dataTransfer);
|
|
714
|
+
t && t !== i.id && b(t, i.id, z(e));
|
|
715
|
+
}, t[31] = i.canDrop, t[32] = i.id, t[33] = b, t[34] = z, t[35] = H) : H = t[35];
|
|
716
|
+
let U = H, W;
|
|
717
|
+
t[36] !== i.actions || t[37] !== i.id || t[38] !== n ? (W = i.actions?.map((e) => ({
|
|
718
|
+
...e,
|
|
719
|
+
onAction: e.onAction ? (t) => e.onAction?.({
|
|
720
|
+
sectionId: n,
|
|
721
|
+
nodeId: i.id,
|
|
722
|
+
...t
|
|
723
|
+
}) : void 0
|
|
724
|
+
})), t[36] = i.actions, t[37] = i.id, t[38] = n, t[39] = W) : W = t[39];
|
|
725
|
+
let G, ee;
|
|
726
|
+
if (t[40] !== i || t[41] !== W) {
|
|
727
|
+
let { inlineInput: e, rowVariant: n, ...r } = {
|
|
728
|
+
...i,
|
|
729
|
+
actions: W
|
|
730
|
+
};
|
|
731
|
+
ee = n, G = r, t[40] = i, t[41] = W, t[42] = G, t[43] = ee;
|
|
732
|
+
} else G = t[42], ee = t[43];
|
|
733
|
+
let K = ee ?? l, te = a + 1, ne = w ? D : void 0, q;
|
|
734
|
+
t[44] !== i.id || t[45] !== y ? (q = () => y?.(i.id), t[44] = i.id, t[45] = y, t[46] = q) : q = t[46];
|
|
735
|
+
let re;
|
|
736
|
+
t[47] !== D || t[48] !== F || t[49] !== w || t[50] !== k || t[51] !== a || t[52] !== G || t[53] !== i.id || t[54] !== m || t[55] !== K || t[56] !== te || t[57] !== ne || t[58] !== q || t[59] !== p ? (re = {
|
|
737
|
+
...G,
|
|
738
|
+
depth: a,
|
|
739
|
+
variant: K,
|
|
740
|
+
isSelected: k,
|
|
741
|
+
isExpanded: D,
|
|
742
|
+
showExpandToggle: w,
|
|
743
|
+
tabIndex: p,
|
|
744
|
+
"data-tree-list-focus-id": i.id,
|
|
745
|
+
"aria-level": te,
|
|
746
|
+
"aria-expanded": ne,
|
|
747
|
+
"data-tree-list-node-id": i.id,
|
|
748
|
+
onFocus: m,
|
|
749
|
+
onActivate: F,
|
|
750
|
+
onToggleExpand: q
|
|
751
|
+
}, t[47] = D, t[48] = F, t[49] = w, t[50] = k, t[51] = a, t[52] = G, t[53] = i.id, t[54] = m, t[55] = K, t[56] = te, t[57] = ne, t[58] = q, t[59] = p, t[60] = re) : re = t[60];
|
|
752
|
+
let ie = re, ae;
|
|
753
|
+
t[61] !== d || t[62] !== N || t[63] !== i.href || t[64] !== ie ? (ae = N && d && i.href ? /* @__PURE__ */ _(d, {
|
|
754
|
+
to: i.href,
|
|
755
|
+
children: /* @__PURE__ */ _(r, {
|
|
756
|
+
...ie,
|
|
757
|
+
asChild: !0
|
|
758
|
+
})
|
|
759
|
+
}) : /* @__PURE__ */ _(r, { ...ie }), t[61] = d, t[62] = N, t[63] = i.href, t[64] = ie, t[65] = ae) : ae = t[65];
|
|
760
|
+
let J = ae, oe = x === "inside" ? "bg.accent-subtle" : void 0, se = !!(b && i.canDrag), ce = i.canDrag ? L : void 0, le = b ? V : void 0, ue = b ? U : void 0, de;
|
|
761
|
+
t[66] === Symbol.for("react.memo_cache_sentinel") ? (de = (e) => {
|
|
762
|
+
(!(e.relatedTarget instanceof Node) || !e.currentTarget.contains(e.relatedTarget)) && S(null);
|
|
763
|
+
}, t[66] = de) : de = t[66];
|
|
764
|
+
let fe;
|
|
765
|
+
t[67] === x ? fe = t[68] : (fe = x === "before" || x === "after" ? /* @__PURE__ */ _(o, {
|
|
766
|
+
"data-tree-list-drop-indicator": x,
|
|
767
|
+
...x === "before" ? {
|
|
768
|
+
top: "0",
|
|
769
|
+
transform: "translateY(-50%)"
|
|
770
|
+
} : {
|
|
771
|
+
bottom: "0",
|
|
772
|
+
transform: "translateY(50%)"
|
|
773
|
+
}
|
|
774
|
+
}) : null, t[67] = x, t[68] = fe);
|
|
775
|
+
let pe;
|
|
776
|
+
return t[69] !== u || t[70] !== J || t[71] !== oe || t[72] !== se || t[73] !== ce || t[74] !== le || t[75] !== ue || t[76] !== fe ? (pe = /* @__PURE__ */ v(f, {
|
|
777
|
+
gap: u,
|
|
778
|
+
w: "full",
|
|
779
|
+
minW: "0",
|
|
780
|
+
maxW: "full",
|
|
781
|
+
position: "relative",
|
|
782
|
+
bg: oe,
|
|
783
|
+
draggable: se,
|
|
784
|
+
onDragStart: ce,
|
|
785
|
+
onDragOver: le,
|
|
786
|
+
onDrop: ue,
|
|
787
|
+
onDragLeave: de,
|
|
788
|
+
children: [J, fe]
|
|
789
|
+
}), t[69] = u, t[70] = J, t[71] = oe, t[72] = se, t[73] = ce, t[74] = le, t[75] = ue, t[76] = fe, t[77] = pe) : pe = t[77], pe;
|
|
790
|
+
}, Pe = (r) => {
|
|
791
|
+
let i = h(9), { sectionId: a, actions: o } = r;
|
|
792
|
+
if (o.length === 0) return null;
|
|
793
|
+
let s, c;
|
|
794
|
+
i[0] === Symbol.for("react.memo_cache_sentinel") ? (s = {
|
|
795
|
+
opacity: "1",
|
|
796
|
+
pointerEvents: "auto"
|
|
797
|
+
}, c = {
|
|
798
|
+
opacity: "1",
|
|
799
|
+
pointerEvents: "auto"
|
|
800
|
+
}, i[0] = s, i[1] = c) : (s = i[0], c = i[1]);
|
|
801
|
+
let d;
|
|
802
|
+
if (i[2] !== o || i[3] !== a) {
|
|
803
|
+
let r;
|
|
804
|
+
i[5] === a ? r = i[6] : (r = (r) => r.menuItems && r.menuItems.length >= 8 ? /* @__PURE__ */ _(n, { action: r }, r.id) : r.menuItems && r.menuItems.length > 0 ? /* @__PURE__ */ _(t, {
|
|
805
|
+
actions: e(r.menuItems),
|
|
806
|
+
children: /* @__PURE__ */ _(u, {
|
|
807
|
+
variant: "ghost",
|
|
808
|
+
size: "2xs",
|
|
809
|
+
"aria-label": r.label,
|
|
810
|
+
children: r.icon
|
|
811
|
+
})
|
|
812
|
+
}, r.id) : /* @__PURE__ */ _(u, {
|
|
813
|
+
variant: "ghost",
|
|
814
|
+
size: "2xs",
|
|
815
|
+
"aria-label": r.label,
|
|
816
|
+
onClick: (e) => {
|
|
817
|
+
e.stopPropagation(), r.onAction?.({ sectionId: a });
|
|
818
|
+
},
|
|
819
|
+
children: r.icon
|
|
820
|
+
}, r.id), i[5] = a, i[6] = r), d = o.map(r), i[2] = o, i[3] = a, i[4] = d;
|
|
821
|
+
} else d = i[4];
|
|
822
|
+
let f;
|
|
823
|
+
return i[7] === d ? f = i[8] : (f = /* @__PURE__ */ _(l, {
|
|
824
|
+
gap: "0",
|
|
825
|
+
opacity: "0",
|
|
826
|
+
pointerEvents: "none",
|
|
827
|
+
_groupHover: s,
|
|
828
|
+
_groupFocusWithin: c,
|
|
829
|
+
transition: "opacity 120ms ease",
|
|
830
|
+
onClick: Ie,
|
|
831
|
+
children: d
|
|
832
|
+
}), i[7] = d, i[8] = f), f;
|
|
833
|
+
}, Fe = (t) => {
|
|
834
|
+
let n = h(41), { section: r, collapsible: a, expanded: o, focusId: c, tabIndex: u, onFocus: d, onToggle: f, onContextMenu: m } = t;
|
|
835
|
+
if (r.inlineInput) {
|
|
836
|
+
let e;
|
|
837
|
+
return n[0] === r.inlineInput ? e = n[1] : (e = /* @__PURE__ */ _(Me, {
|
|
838
|
+
input: r.inlineInput,
|
|
839
|
+
level: 0
|
|
840
|
+
}), n[0] = r.inlineInput, n[1] = e), e;
|
|
841
|
+
}
|
|
842
|
+
let g;
|
|
843
|
+
n[2] === r.contextMenuItems ? g = n[3] : (g = r.contextMenuItems ?? [], n[2] = r.contextMenuItems, n[3] = g);
|
|
844
|
+
let y;
|
|
845
|
+
n[4] === g ? y = n[5] : (y = e(g), n[4] = g, n[5] = y);
|
|
846
|
+
let b = y, x = a ? "pointer" : "default", S = a ? u : void 0, C = a ? c : void 0, w = a ? o : void 0, T;
|
|
847
|
+
n[6] === a ? T = n[7] : (T = a ? { bg: "bg.hover" } : void 0, n[6] = a, n[7] = T);
|
|
848
|
+
let D;
|
|
849
|
+
n[8] === a ? D = n[9] : (D = a ? { bg: "bg.hover" } : void 0, n[8] = a, n[9] = D);
|
|
850
|
+
let O = a ? d : void 0, k = a ? f : void 0, A;
|
|
851
|
+
n[10] !== m || n[11] !== r.id ? (A = m ? (e) => {
|
|
852
|
+
e.preventDefault(), m(e, r.id);
|
|
853
|
+
} : void 0, n[10] = m, n[11] = r.id, n[12] = A) : A = n[12];
|
|
854
|
+
let j;
|
|
855
|
+
n[13] === r.label ? j = n[14] : (j = /* @__PURE__ */ _(p, {
|
|
856
|
+
textStyle: "label/XS",
|
|
857
|
+
textTransform: "uppercase",
|
|
858
|
+
color: "fg.muted",
|
|
859
|
+
letterSpacing: "0.08em",
|
|
860
|
+
truncate: !0,
|
|
861
|
+
children: r.label
|
|
862
|
+
}), n[13] = r.label, n[14] = j);
|
|
863
|
+
let M;
|
|
864
|
+
n[15] !== a || n[16] !== o ? (M = a ? /* @__PURE__ */ _(s, {
|
|
865
|
+
color: "fg.muted",
|
|
866
|
+
flexShrink: 0,
|
|
867
|
+
children: /* @__PURE__ */ _(s, {
|
|
868
|
+
asChild: !0,
|
|
869
|
+
transform: o ? "rotate(90deg)" : "rotate(0deg)",
|
|
870
|
+
transition: "120ms",
|
|
871
|
+
children: /* @__PURE__ */ _(E, { size: 14 })
|
|
872
|
+
})
|
|
873
|
+
}) : null, n[15] = a, n[16] = o, n[17] = M) : M = n[17];
|
|
874
|
+
let N;
|
|
875
|
+
n[18] !== j || n[19] !== M ? (N = /* @__PURE__ */ v(l, {
|
|
876
|
+
gap: "1",
|
|
877
|
+
flex: "1",
|
|
878
|
+
minW: "0",
|
|
879
|
+
children: [j, M]
|
|
880
|
+
}), n[18] = j, n[19] = M, n[20] = N) : N = n[20];
|
|
881
|
+
let P;
|
|
882
|
+
n[21] === r.actions ? P = n[22] : (P = r.actions ?? [], n[21] = r.actions, n[22] = P);
|
|
883
|
+
let F;
|
|
884
|
+
n[23] !== r.id || n[24] !== P ? (F = /* @__PURE__ */ _(Pe, {
|
|
885
|
+
sectionId: r.id,
|
|
886
|
+
actions: P
|
|
887
|
+
}), n[23] = r.id, n[24] = P, n[25] = F) : F = n[25];
|
|
888
|
+
let I;
|
|
889
|
+
n[26] !== A || n[27] !== N || n[28] !== F || n[29] !== x || n[30] !== S || n[31] !== C || n[32] !== w || n[33] !== T || n[34] !== D || n[35] !== O || n[36] !== k ? (I = /* @__PURE__ */ v(l, {
|
|
890
|
+
className: "group",
|
|
891
|
+
justify: "space-between",
|
|
892
|
+
align: "center",
|
|
893
|
+
w: "full",
|
|
894
|
+
minW: "0",
|
|
895
|
+
maxW: "full",
|
|
896
|
+
px: "sm",
|
|
897
|
+
py: "2xs",
|
|
898
|
+
height: "7",
|
|
899
|
+
cursor: x,
|
|
900
|
+
tabIndex: S,
|
|
901
|
+
"data-tree-list-focus-id": C,
|
|
902
|
+
"aria-expanded": w,
|
|
903
|
+
_hover: T,
|
|
904
|
+
_focusVisible: D,
|
|
905
|
+
onFocus: O,
|
|
906
|
+
onClick: k,
|
|
907
|
+
onContextMenu: A,
|
|
908
|
+
children: [N, F]
|
|
909
|
+
}), n[26] = A, n[27] = N, n[28] = F, n[29] = x, n[30] = S, n[31] = C, n[32] = w, n[33] = T, n[34] = D, n[35] = O, n[36] = k, n[37] = I) : I = n[37];
|
|
910
|
+
let L;
|
|
911
|
+
return n[38] !== b || n[39] !== I ? (L = /* @__PURE__ */ _(i, {
|
|
912
|
+
actions: b,
|
|
913
|
+
children: I
|
|
914
|
+
}), n[38] = b, n[39] = I, n[40] = L) : L = n[40], L;
|
|
915
|
+
};
|
|
916
|
+
function Ie(e) {
|
|
917
|
+
return e.stopPropagation();
|
|
918
|
+
}
|
|
919
|
+
//#endregion
|
|
920
|
+
//#region src/components/tree-list/tree-list-reorder.ts
|
|
921
|
+
var Le = "section:", $ = (e) => `${Le}${e}`, Re = (e) => e.startsWith(Le), ze = (e) => e.slice(8), Be = "after-section:", Ve = (e) => `${Be}${e}`, He = (e) => e.startsWith(Be), Ue = (e) => e.slice(14), We = (e) => {
|
|
922
|
+
if (Re(e)) return ze(e);
|
|
923
|
+
if (He(e)) return Ue(e);
|
|
924
|
+
}, Ge = (e, t) => {
|
|
925
|
+
for (let n of e) {
|
|
926
|
+
let e = n.nodes.findIndex((e) => e.id === t);
|
|
927
|
+
if (e >= 0) return {
|
|
928
|
+
section: n,
|
|
929
|
+
index: e,
|
|
930
|
+
node: n.nodes[e]
|
|
931
|
+
};
|
|
932
|
+
}
|
|
933
|
+
}, Ke = (e, t) => t?.(e) ?? !0, qe = (e, t, n, r) => {
|
|
934
|
+
if (t === n) return !0;
|
|
935
|
+
let i = We(n);
|
|
936
|
+
if (Re(t)) {
|
|
937
|
+
if (i === void 0) return !1;
|
|
938
|
+
let n = e.find((e) => e.id === ze(t)), a = e.find((e) => e.id === i);
|
|
939
|
+
return !n || !a || n.canReorder === !1 || a.canReorder === !1 ? !1 : Ke({
|
|
940
|
+
source: {
|
|
941
|
+
kind: "section",
|
|
942
|
+
sectionId: n.id,
|
|
943
|
+
id: n.id,
|
|
944
|
+
moveScope: n.moveScope
|
|
945
|
+
},
|
|
946
|
+
destination: {
|
|
947
|
+
kind: "section",
|
|
948
|
+
sectionId: a.id,
|
|
949
|
+
id: a.id,
|
|
950
|
+
moveScope: a.moveScope
|
|
951
|
+
}
|
|
952
|
+
}, r);
|
|
953
|
+
}
|
|
954
|
+
let a = Ge(e, t);
|
|
955
|
+
if (!a || a.node.canReorder === !1) return !1;
|
|
956
|
+
let o = i === void 0 ? void 0 : e.find((e) => e.id === i), s = i === void 0 ? Ge(e, n) : void 0, c = o ?? s?.section;
|
|
957
|
+
return !c || c.canReorder === !1 || s?.node.canReorder === !1 ? !1 : Ke({
|
|
958
|
+
source: {
|
|
959
|
+
kind: "node",
|
|
960
|
+
sectionId: a.section.id,
|
|
961
|
+
id: a.node.id,
|
|
962
|
+
moveScope: a.node.moveScope ?? a.section.moveScope
|
|
963
|
+
},
|
|
964
|
+
destination: s ? {
|
|
965
|
+
kind: "node",
|
|
966
|
+
sectionId: c.id,
|
|
967
|
+
id: s.node.id,
|
|
968
|
+
moveScope: s.node.moveScope ?? c.moveScope
|
|
969
|
+
} : {
|
|
970
|
+
kind: "section",
|
|
971
|
+
sectionId: c.id,
|
|
972
|
+
id: c.id,
|
|
973
|
+
moveScope: c.moveScope
|
|
974
|
+
}
|
|
975
|
+
}, r);
|
|
976
|
+
}, Je = {
|
|
977
|
+
modifiers: [({ transform: e }) => ({
|
|
978
|
+
...e,
|
|
979
|
+
x: 0
|
|
980
|
+
})],
|
|
981
|
+
autoScroll: { threshold: {
|
|
982
|
+
x: 0,
|
|
983
|
+
y: .2
|
|
984
|
+
} },
|
|
985
|
+
measuring: { droppable: { strategy: O.Always } }
|
|
986
|
+
}, Ye = (e, t, n, r) => {
|
|
987
|
+
if (e === t) return null;
|
|
988
|
+
let i = n ? "before" : "after";
|
|
989
|
+
return He(t) ? {
|
|
990
|
+
kind: "section",
|
|
991
|
+
id: Ue(t),
|
|
992
|
+
edge: "after",
|
|
993
|
+
nextSectionId: r
|
|
994
|
+
} : Re(t) ? {
|
|
995
|
+
kind: "section",
|
|
996
|
+
id: ze(t),
|
|
997
|
+
edge: Re(e) ? i : "inside"
|
|
998
|
+
} : Re(e) ? null : {
|
|
999
|
+
kind: "node",
|
|
1000
|
+
id: t,
|
|
1001
|
+
edge: i
|
|
1002
|
+
};
|
|
1003
|
+
}, Xe = (e, t, n, r) => {
|
|
1004
|
+
let i = ze(t);
|
|
1005
|
+
if (n.kind !== "section" || n.edge === "inside" || n.id === i || !qe(e, t, $(n.id), r)) return null;
|
|
1006
|
+
let a = e.map((e) => e.id), o = a.filter((e) => e !== i);
|
|
1007
|
+
return o.splice(o.indexOf(n.id) + +(n.edge === "after"), 0, i), o.every((e, t) => e === a[t]) ? null : {
|
|
1008
|
+
kind: "section",
|
|
1009
|
+
nextSectionIds: o
|
|
1010
|
+
};
|
|
1011
|
+
}, Ze = (e, t, n, r) => {
|
|
1012
|
+
if (n.kind === "node") {
|
|
1013
|
+
let t = Ge(e, n.id);
|
|
1014
|
+
return t ? {
|
|
1015
|
+
sectionId: t.section.id,
|
|
1016
|
+
index: t.index + +(n.edge === "after")
|
|
1017
|
+
} : null;
|
|
1018
|
+
}
|
|
1019
|
+
let i = e.find((e) => e.id === n.id);
|
|
1020
|
+
if (!i) return null;
|
|
1021
|
+
if (n.edge === "inside" || !i.label) return {
|
|
1022
|
+
sectionId: i.id,
|
|
1023
|
+
index: i.nodes.length
|
|
1024
|
+
};
|
|
1025
|
+
let a = e.find((e) => e.id === n.nextSectionId);
|
|
1026
|
+
return a && !a.label && a.canReorder !== !1 && qe(e, t, $(a.id), r) ? {
|
|
1027
|
+
sectionId: a.id,
|
|
1028
|
+
index: 0
|
|
1029
|
+
} : void 0;
|
|
1030
|
+
}, Qe = (e, t, n, r, i) => {
|
|
1031
|
+
if (Re(t)) return Xe(e, t, n, r);
|
|
1032
|
+
let a = Ge(e, t);
|
|
1033
|
+
if (!a || a.node.canReorder === !1 || !qe(e, t, n.kind === "node" ? n.id : Ve(n.id), r)) return null;
|
|
1034
|
+
let o = Ze(e, t, n, r);
|
|
1035
|
+
if (o === null) return null;
|
|
1036
|
+
let s = a.section.nodes.map((e) => e.id).filter((e) => e !== t);
|
|
1037
|
+
if (!o) {
|
|
1038
|
+
if (!i || n.kind !== "section") return null;
|
|
1039
|
+
let r = e.map((e) => e.id);
|
|
1040
|
+
return r.splice(r.indexOf(n.id) + 1, 0, i), {
|
|
1041
|
+
kind: "node",
|
|
1042
|
+
orders: {
|
|
1043
|
+
[a.section.id]: s,
|
|
1044
|
+
[i]: [t]
|
|
1045
|
+
},
|
|
1046
|
+
looseSection: {
|
|
1047
|
+
id: i,
|
|
1048
|
+
afterSectionId: n.id,
|
|
1049
|
+
nextSectionIds: r
|
|
1050
|
+
}
|
|
1051
|
+
};
|
|
1052
|
+
}
|
|
1053
|
+
if (o.sectionId === a.section.id) {
|
|
1054
|
+
let e = o.index - +(a.index < o.index);
|
|
1055
|
+
return e === a.index ? null : (s.splice(e, 0, t), {
|
|
1056
|
+
kind: "node",
|
|
1057
|
+
orders: { [a.section.id]: s }
|
|
1058
|
+
});
|
|
1059
|
+
}
|
|
1060
|
+
let c = e.find((e) => e.id === o.sectionId)?.nodes.map((e) => e.id) ?? [];
|
|
1061
|
+
return c.splice(o.index, 0, t), {
|
|
1062
|
+
kind: "node",
|
|
1063
|
+
orders: {
|
|
1064
|
+
[a.section.id]: s,
|
|
1065
|
+
[o.sectionId]: c
|
|
1066
|
+
}
|
|
1067
|
+
};
|
|
1068
|
+
}, $e = (e) => Re(e) ? 2 : +!!He(e), et = (e, t) => (n) => {
|
|
1069
|
+
let r = String(n.active.id), i = (n) => qe(e, r, String(n.id), t), a = n.pointerCoordinates && {
|
|
1070
|
+
x: n.collisionRect.left + n.collisionRect.width / 2,
|
|
1071
|
+
y: n.pointerCoordinates.y
|
|
1072
|
+
}, o = a ? j({
|
|
1073
|
+
...n,
|
|
1074
|
+
pointerCoordinates: a
|
|
1075
|
+
}).filter(i) : [];
|
|
1076
|
+
return o.length === 0 ? A(n).filter(i) : o.sort((e, t) => $e(String(e.id)) - $e(String(t.id)));
|
|
1077
|
+
}, tt = (e, t) => (e instanceof MouseEvent ? e.clientY : 0) + t, nt = (e, t, n) => t ? Ye(e, String(t.id), n < t.rect.top + t.rect.height / 2, t.data.current?.nextSectionId) : null, rt = () => `tree-list-loose:${crypto.randomUUID()}`, it = (e) => (t) => {
|
|
1078
|
+
let n = String(t.active.id), r = nt(n, t.over, tt(t.activatorEvent, t.delta.y));
|
|
1079
|
+
if (!r) return;
|
|
1080
|
+
let i = Qe(e.sections, n, r, e.canMove, rt());
|
|
1081
|
+
if (!i) return;
|
|
1082
|
+
if (i.kind === "section") {
|
|
1083
|
+
e.onReorderSections?.(i.nextSectionIds, ze(n), r.id);
|
|
1084
|
+
return;
|
|
1085
|
+
}
|
|
1086
|
+
let a = i.looseSection;
|
|
1087
|
+
a && e.onReorderSections?.(a.nextSectionIds, a.id, a.afterSectionId);
|
|
1088
|
+
for (let [t, n] of Object.entries(i.orders)) e.onReorderNodes?.(t, n);
|
|
1089
|
+
}, at = b(!1), ot = (e) => {
|
|
1090
|
+
let t = h(16), { sections: n, canMove: r, onReorderSections: i, onReorderNodes: a, children: o } = e, s;
|
|
1091
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (s = { activationConstraint: { distance: 4 } }, t[0] = s) : s = t[0];
|
|
1092
|
+
let c = I(F(k, s)), l;
|
|
1093
|
+
t[1] !== r || t[2] !== n ? (l = et(n, r), t[1] = r, t[2] = n, t[3] = l) : l = t[3];
|
|
1094
|
+
let u = l, d;
|
|
1095
|
+
t[4] !== r || t[5] !== a || t[6] !== i || t[7] !== n ? (d = it({
|
|
1096
|
+
sections: n,
|
|
1097
|
+
canMove: r,
|
|
1098
|
+
onReorderSections: i,
|
|
1099
|
+
onReorderNodes: a
|
|
1100
|
+
}), t[4] = r, t[5] = a, t[6] = i, t[7] = n, t[8] = d) : d = t[8];
|
|
1101
|
+
let f = d, p;
|
|
1102
|
+
t[9] === o ? p = t[10] : (p = /* @__PURE__ */ _(at.Provider, {
|
|
1103
|
+
value: !0,
|
|
1104
|
+
children: o
|
|
1105
|
+
}), t[9] = o, t[10] = p);
|
|
1106
|
+
let m;
|
|
1107
|
+
return t[11] !== u || t[12] !== f || t[13] !== c || t[14] !== p ? (m = /* @__PURE__ */ _(D, {
|
|
1108
|
+
sensors: c,
|
|
1109
|
+
collisionDetection: u,
|
|
1110
|
+
onDragEnd: f,
|
|
1111
|
+
...Je,
|
|
1112
|
+
children: p
|
|
1113
|
+
}), t[11] = u, t[12] = f, t[13] = c, t[14] = p, t[15] = m) : m = t[15], m;
|
|
1114
|
+
}, st = (e) => e?.label ? e.id : void 0, ct = (e, t, n = []) => {
|
|
1115
|
+
if (!t) return null;
|
|
1116
|
+
let r = (e) => {
|
|
1117
|
+
let t = e.children, i = n.includes(e.id) ? t?.at(-1) : void 0;
|
|
1118
|
+
return i ? r(i) : e;
|
|
1119
|
+
};
|
|
1120
|
+
if (t.kind === "node") {
|
|
1121
|
+
let n = Ge(e, t.id);
|
|
1122
|
+
return n ? {
|
|
1123
|
+
lineId: t.edge === "after" ? r(n.node).id : t.id,
|
|
1124
|
+
edge: t.edge,
|
|
1125
|
+
groupId: st(n.section)
|
|
1126
|
+
} : null;
|
|
1127
|
+
}
|
|
1128
|
+
let i = e.find((e) => e.id === t.id);
|
|
1129
|
+
if (!i) return null;
|
|
1130
|
+
if (t.edge === "inside") {
|
|
1131
|
+
let e = i.nodes.at(-1);
|
|
1132
|
+
return {
|
|
1133
|
+
lineId: e ? r(e).id : $(i.id),
|
|
1134
|
+
edge: "after",
|
|
1135
|
+
groupId: st(i)
|
|
1136
|
+
};
|
|
1137
|
+
}
|
|
1138
|
+
return t.edge === "after" ? {
|
|
1139
|
+
lineId: Ve(i.id),
|
|
1140
|
+
edge: "middle"
|
|
1141
|
+
} : {
|
|
1142
|
+
lineId: $(i.id),
|
|
1143
|
+
edge: "before"
|
|
1144
|
+
};
|
|
1145
|
+
}, lt = {
|
|
1146
|
+
before: {
|
|
1147
|
+
top: "0",
|
|
1148
|
+
transform: "translateY(-50%)"
|
|
1149
|
+
},
|
|
1150
|
+
after: {
|
|
1151
|
+
bottom: "0",
|
|
1152
|
+
transform: "translateY(50%)"
|
|
1153
|
+
},
|
|
1154
|
+
middle: {
|
|
1155
|
+
top: "50%",
|
|
1156
|
+
transform: "translateY(-50%)"
|
|
1157
|
+
}
|
|
1158
|
+
}, ut = (e) => {
|
|
1159
|
+
let t = h(3), { edge: n } = e, r = lt[n], i;
|
|
1160
|
+
return t[0] !== n || t[1] !== r ? (i = /* @__PURE__ */ _(o, {
|
|
1161
|
+
"data-tree-list-drop-indicator": n,
|
|
1162
|
+
...r
|
|
1163
|
+
}), t[0] = n, t[1] = r, t[2] = i) : i = t[2], i;
|
|
1164
|
+
}, dt = (e) => {
|
|
1165
|
+
let { id: t, disabled: n, indicator: r, handle: i, liftedBg: a, highlighted: o, children: c } = e, l = R({
|
|
1166
|
+
id: t,
|
|
1167
|
+
disabled: n
|
|
1168
|
+
}), u = r?.lineId === t ? r.edge : void 0, d = l.isDragging ? a : void 0;
|
|
1169
|
+
return /* @__PURE__ */ v(s, {
|
|
1170
|
+
ref: l.setNodeRef,
|
|
1171
|
+
position: "relative",
|
|
1172
|
+
w: "full",
|
|
1173
|
+
minW: "0",
|
|
1174
|
+
borderRadius: "xs",
|
|
1175
|
+
opacity: l.isDragging ? .5 : 1,
|
|
1176
|
+
bg: o ? "bg.accent-subtle" : d,
|
|
1177
|
+
"data-tree-list-drop-group": o ? "" : void 0,
|
|
1178
|
+
onPointerDownCapture: i === "self" ? (e) => l.listeners?.onPointerDown?.(e) : void 0,
|
|
1179
|
+
children: [c(l.listeners), u ? /* @__PURE__ */ _(ut, { edge: u }) : null]
|
|
1180
|
+
});
|
|
1181
|
+
}, ft = (e) => {
|
|
1182
|
+
let { sectionId: t, nextSectionId: n, gap: r, indicator: i } = e, a = Ve(t), o = P({
|
|
1183
|
+
id: a,
|
|
1184
|
+
data: { nextSectionId: n }
|
|
1185
|
+
});
|
|
1186
|
+
return /* @__PURE__ */ _(s, {
|
|
1187
|
+
ref: o.setNodeRef,
|
|
1188
|
+
position: "relative",
|
|
1189
|
+
w: "full",
|
|
1190
|
+
pt: r,
|
|
1191
|
+
flexShrink: 0,
|
|
1192
|
+
children: i?.lineId === a ? /* @__PURE__ */ _(ut, { edge: "middle" }) : null
|
|
1193
|
+
});
|
|
1194
|
+
}, pt = (e) => {
|
|
1195
|
+
let t = h(29), { section: n, sectionRows: r, expandedNodeIds: i, activeNodeId: a, rowVariant: o, nodeGap: c, linkComponent: l, onNavigate: u, onToggleSection: d, onToggleNode: p, onMoveNode: m, onSectionContextMenu: y, indicator: b, dragging: x } = e, S;
|
|
1196
|
+
t[0] === r ? S = t[1] : (S = r.find(_t), t[0] = r, t[1] = S);
|
|
1197
|
+
let C = S, w, T;
|
|
1198
|
+
t[2] === r ? (w = t[3], T = t[4]) : (w = r.filter(vt), T = w.filter(yt).map(bt), t[2] = r, t[3] = w, t[4] = T);
|
|
1199
|
+
let E = T, D;
|
|
1200
|
+
t[5] === n.id ? D = t[6] : (D = $(n.id), t[5] = n.id, t[6] = D);
|
|
1201
|
+
let O = n.canReorder === !1, k = b?.groupId === n.id, A;
|
|
1202
|
+
t[7] !== a || t[8] !== x || t[9] !== i || t[10] !== C || t[11] !== b || t[12] !== l || t[13] !== c || t[14] !== w || t[15] !== m || t[16] !== u || t[17] !== y || t[18] !== p || t[19] !== d || t[20] !== o || t[21] !== E ? (A = (e) => /* @__PURE__ */ v(g, { children: [
|
|
1203
|
+
C && C.kind === "section-header" ? /* @__PURE__ */ _(s, {
|
|
1204
|
+
onPointerDownCapture: (t) => e?.onPointerDown?.(t),
|
|
1205
|
+
children: /* @__PURE__ */ _(Fe, {
|
|
1206
|
+
section: C.section,
|
|
1207
|
+
collapsible: C.collapsible,
|
|
1208
|
+
expanded: C.expanded,
|
|
1209
|
+
focusId: C.key,
|
|
1210
|
+
tabIndex: -1,
|
|
1211
|
+
onFocus: xt,
|
|
1212
|
+
onToggle: () => d?.(C.sectionId),
|
|
1213
|
+
onContextMenu: y
|
|
1214
|
+
})
|
|
1215
|
+
}) : null,
|
|
1216
|
+
x && !C && w.length === 0 ? /* @__PURE__ */ _(s, {
|
|
1217
|
+
h: "tree-empty-drop-zone",
|
|
1218
|
+
"data-tree-list-empty-drop-zone": ""
|
|
1219
|
+
}) : null,
|
|
1220
|
+
/* @__PURE__ */ _(L, {
|
|
1221
|
+
items: E,
|
|
1222
|
+
strategy: z,
|
|
1223
|
+
children: /* @__PURE__ */ _(f, {
|
|
1224
|
+
gap: c,
|
|
1225
|
+
w: "full",
|
|
1226
|
+
minW: "0",
|
|
1227
|
+
children: w.map((e) => e.kind === "node" ? /* @__PURE__ */ _(mt, {
|
|
1228
|
+
row: e,
|
|
1229
|
+
expandedNodeIds: i,
|
|
1230
|
+
activeNodeId: a,
|
|
1231
|
+
rowVariant: o,
|
|
1232
|
+
nodeGap: c,
|
|
1233
|
+
linkComponent: l,
|
|
1234
|
+
onNavigate: u,
|
|
1235
|
+
onToggleNode: p,
|
|
1236
|
+
onMoveNode: m,
|
|
1237
|
+
indicator: b
|
|
1238
|
+
}, e.key) : null)
|
|
1239
|
+
})
|
|
1240
|
+
})
|
|
1241
|
+
] }), t[7] = a, t[8] = x, t[9] = i, t[10] = C, t[11] = b, t[12] = l, t[13] = c, t[14] = w, t[15] = m, t[16] = u, t[17] = y, t[18] = p, t[19] = d, t[20] = o, t[21] = E, t[22] = A) : A = t[22];
|
|
1242
|
+
let j;
|
|
1243
|
+
return t[23] !== b || t[24] !== D || t[25] !== O || t[26] !== k || t[27] !== A ? (j = /* @__PURE__ */ _(dt, {
|
|
1244
|
+
id: D,
|
|
1245
|
+
disabled: O,
|
|
1246
|
+
indicator: b,
|
|
1247
|
+
handle: "child",
|
|
1248
|
+
highlighted: k,
|
|
1249
|
+
children: A
|
|
1250
|
+
}), t[23] = b, t[24] = D, t[25] = O, t[26] = k, t[27] = A, t[28] = j) : j = t[28], j;
|
|
1251
|
+
}, mt = (e) => {
|
|
1252
|
+
let t = h(25), { row: n, expandedNodeIds: r, activeNodeId: i, rowVariant: a, nodeGap: o, linkComponent: c, onNavigate: l, onToggleNode: u, onMoveNode: d, indicator: f } = e, p;
|
|
1253
|
+
t[0] !== i || t[1] !== r || t[2] !== c || t[3] !== o || t[4] !== d || t[5] !== l || t[6] !== u || t[7] !== n.level || t[8] !== n.node || t[9] !== n.sectionId || t[10] !== a ? (p = /* @__PURE__ */ _(Ne, {
|
|
1254
|
+
sectionId: n.sectionId,
|
|
1255
|
+
node: n.node,
|
|
1256
|
+
level: n.level,
|
|
1257
|
+
expandedNodeIds: r,
|
|
1258
|
+
activeNodeId: i,
|
|
1259
|
+
rowVariant: a,
|
|
1260
|
+
nodeGap: o,
|
|
1261
|
+
linkComponent: c,
|
|
1262
|
+
onNavigate: l,
|
|
1263
|
+
onToggleNode: u,
|
|
1264
|
+
onMoveNode: d
|
|
1265
|
+
}), t[0] = i, t[1] = r, t[2] = c, t[3] = o, t[4] = d, t[5] = l, t[6] = u, t[7] = n.level, t[8] = n.node, t[9] = n.sectionId, t[10] = a, t[11] = p) : p = t[11];
|
|
1266
|
+
let m = p;
|
|
1267
|
+
if (n.level > 0) {
|
|
1268
|
+
let e;
|
|
1269
|
+
t[12] !== f || t[13] !== n.node.id ? (e = f?.lineId === n.node.id ? /* @__PURE__ */ _(ut, { edge: f.edge }) : null, t[12] = f, t[13] = n.node.id, t[14] = e) : e = t[14];
|
|
1270
|
+
let r;
|
|
1271
|
+
return t[15] !== m || t[16] !== e ? (r = /* @__PURE__ */ v(s, {
|
|
1272
|
+
position: "relative",
|
|
1273
|
+
w: "full",
|
|
1274
|
+
minW: "0",
|
|
1275
|
+
children: [m, e]
|
|
1276
|
+
}), t[15] = m, t[16] = e, t[17] = r) : r = t[17], r;
|
|
1277
|
+
}
|
|
1278
|
+
let g = n.node.canReorder === !1, y;
|
|
1279
|
+
t[18] === m ? y = t[19] : (y = () => m, t[18] = m, t[19] = y);
|
|
1280
|
+
let b;
|
|
1281
|
+
return t[20] !== f || t[21] !== n.node.id || t[22] !== g || t[23] !== y ? (b = /* @__PURE__ */ _(dt, {
|
|
1282
|
+
id: n.node.id,
|
|
1283
|
+
disabled: g,
|
|
1284
|
+
indicator: f,
|
|
1285
|
+
handle: "self",
|
|
1286
|
+
liftedBg: "bg.hover",
|
|
1287
|
+
children: y
|
|
1288
|
+
}), t[20] = f, t[21] = n.node.id, t[22] = g, t[23] = y, t[24] = b) : b = t[24], b;
|
|
1289
|
+
}, ht = (e) => {
|
|
1290
|
+
let t = h(43), n, r, i, a, o;
|
|
1291
|
+
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4], o = t[5]) : ({sections: o, expandedSectionIds: r, expandedNodeIds: n, sectionGap: a, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a, t[5] = o);
|
|
1292
|
+
let { active: s, over: c } = M(), [l, u] = T(null), d;
|
|
1293
|
+
t[6] === Symbol.for("react.memo_cache_sentinel") ? (d = {
|
|
1294
|
+
onDragMove: (e) => u(tt(e.activatorEvent, e.delta.y)),
|
|
1295
|
+
onDragEnd: () => u(null),
|
|
1296
|
+
onDragCancel: () => u(null)
|
|
1297
|
+
}, t[6] = d) : d = t[6], N(d);
|
|
1298
|
+
let p;
|
|
1299
|
+
if (t[7] !== s || t[8] !== n || t[9] !== c || t[10] !== l || t[11] !== o) {
|
|
1300
|
+
let e = s && l !== null ? nt(String(s.id), c, l) : null;
|
|
1301
|
+
p = ct(o, e, n), t[7] = s, t[8] = n, t[9] = c, t[10] = l, t[11] = o, t[12] = p;
|
|
1302
|
+
} else p = t[12];
|
|
1303
|
+
let m = p, g, b, x, S, C, w, E, D, O;
|
|
1304
|
+
if (t[13] !== s || t[14] !== n || t[15] !== r || t[16] !== m || t[17] !== i || t[18] !== a || t[19] !== o) {
|
|
1305
|
+
let e = xe(o, r, n);
|
|
1306
|
+
b = L, t[29] === o ? D = t[30] : (D = o.map(St), t[29] = o, t[30] = D), O = z, g = f, x = "0", S = "full", C = "0", w = "full", E = o.map((t, r) => /* @__PURE__ */ v(y, { children: [/* @__PURE__ */ _(pt, {
|
|
1307
|
+
section: t,
|
|
1308
|
+
sectionRows: e.filter((e) => e.sectionId === t.id),
|
|
1309
|
+
expandedNodeIds: n,
|
|
1310
|
+
rowVariant: i.rowVariant ?? "tree",
|
|
1311
|
+
nodeGap: i.nodeGap,
|
|
1312
|
+
activeNodeId: i.activeNodeId,
|
|
1313
|
+
linkComponent: i.linkComponent,
|
|
1314
|
+
onNavigate: i.onNavigate,
|
|
1315
|
+
onToggleSection: i.onToggleSection,
|
|
1316
|
+
onToggleNode: i.onToggleNode,
|
|
1317
|
+
onMoveNode: i.onMoveNode,
|
|
1318
|
+
onSectionContextMenu: i.onSectionContextMenu,
|
|
1319
|
+
indicator: m,
|
|
1320
|
+
dragging: !!s
|
|
1321
|
+
}), /* @__PURE__ */ _(ft, {
|
|
1322
|
+
sectionId: t.id,
|
|
1323
|
+
nextSectionId: o[r + 1]?.id,
|
|
1324
|
+
gap: a,
|
|
1325
|
+
indicator: m
|
|
1326
|
+
})] }, t.id)), t[13] = s, t[14] = n, t[15] = r, t[16] = m, t[17] = i, t[18] = a, t[19] = o, t[20] = g, t[21] = b, t[22] = x, t[23] = S, t[24] = C, t[25] = w, t[26] = E, t[27] = D, t[28] = O;
|
|
1327
|
+
} else g = t[20], b = t[21], x = t[22], S = t[23], C = t[24], w = t[25], E = t[26], D = t[27], O = t[28];
|
|
1328
|
+
let k;
|
|
1329
|
+
t[31] !== g || t[32] !== x || t[33] !== S || t[34] !== C || t[35] !== w || t[36] !== E ? (k = /* @__PURE__ */ _(g, {
|
|
1330
|
+
gap: x,
|
|
1331
|
+
w: S,
|
|
1332
|
+
minW: C,
|
|
1333
|
+
maxW: w,
|
|
1334
|
+
children: E
|
|
1335
|
+
}), t[31] = g, t[32] = x, t[33] = S, t[34] = C, t[35] = w, t[36] = E, t[37] = k) : k = t[37];
|
|
1336
|
+
let A;
|
|
1337
|
+
return t[38] !== b || t[39] !== D || t[40] !== O || t[41] !== k ? (A = /* @__PURE__ */ _(b, {
|
|
1338
|
+
items: D,
|
|
1339
|
+
strategy: O,
|
|
1340
|
+
children: k
|
|
1341
|
+
}), t[38] = b, t[39] = D, t[40] = O, t[41] = k, t[42] = A) : A = t[42], A;
|
|
1342
|
+
}, gt = (e) => {
|
|
1343
|
+
let t = h(34), { sections: n, expandedSectionIds: r, expandedNodeIds: i, activeNodeId: a, rowVariant: o, sectionGap: s, nodeGap: c, linkComponent: l, onNavigate: u, onToggleSection: d, onToggleNode: f, onMoveNode: p, onSectionContextMenu: m, onReorderSections: g, onReorderNodes: v, canMove: y } = e, b;
|
|
1344
|
+
t[0] === r ? b = t[1] : (b = r === void 0 ? [] : r, t[0] = r, t[1] = b);
|
|
1345
|
+
let S = b, C;
|
|
1346
|
+
t[2] === i ? C = t[3] : (C = i === void 0 ? [] : i, t[2] = i, t[3] = C);
|
|
1347
|
+
let w = C, T = o === void 0 ? "tree" : o, E = s === void 0 ? "0" : s, O = c === void 0 ? "0" : c, A;
|
|
1348
|
+
t[4] === Symbol.for("react.memo_cache_sentinel") ? (A = { activationConstraint: { distance: 4 } }, t[4] = A) : A = t[4];
|
|
1349
|
+
let j = I(F(k, A)), M = x(at), N;
|
|
1350
|
+
t[5] !== y || t[6] !== n ? (N = et(n, y), t[5] = y, t[6] = n, t[7] = N) : N = t[7];
|
|
1351
|
+
let P = N, L;
|
|
1352
|
+
t[8] === g ? L = t[9] : (L = (e) => g?.(e), t[8] = g, t[9] = L);
|
|
1353
|
+
let R;
|
|
1354
|
+
t[10] !== y || t[11] !== v || t[12] !== n || t[13] !== L ? (R = it({
|
|
1355
|
+
sections: n,
|
|
1356
|
+
canMove: y,
|
|
1357
|
+
onReorderSections: L,
|
|
1358
|
+
onReorderNodes: v
|
|
1359
|
+
}), t[10] = y, t[11] = v, t[12] = n, t[13] = L, t[14] = R) : R = t[14];
|
|
1360
|
+
let z = R, B;
|
|
1361
|
+
t[15] !== a || t[16] !== w || t[17] !== S || t[18] !== l || t[19] !== O || t[20] !== p || t[21] !== u || t[22] !== m || t[23] !== f || t[24] !== d || t[25] !== T || t[26] !== E || t[27] !== n ? (B = /* @__PURE__ */ _(ht, {
|
|
1362
|
+
sections: n,
|
|
1363
|
+
expandedSectionIds: S,
|
|
1364
|
+
expandedNodeIds: w,
|
|
1365
|
+
activeNodeId: a,
|
|
1366
|
+
rowVariant: T,
|
|
1367
|
+
sectionGap: E,
|
|
1368
|
+
nodeGap: O,
|
|
1369
|
+
linkComponent: l,
|
|
1370
|
+
onNavigate: u,
|
|
1371
|
+
onToggleSection: d,
|
|
1372
|
+
onToggleNode: f,
|
|
1373
|
+
onMoveNode: p,
|
|
1374
|
+
onSectionContextMenu: m
|
|
1375
|
+
}), t[15] = a, t[16] = w, t[17] = S, t[18] = l, t[19] = O, t[20] = p, t[21] = u, t[22] = m, t[23] = f, t[24] = d, t[25] = T, t[26] = E, t[27] = n, t[28] = B) : B = t[28];
|
|
1376
|
+
let V = B;
|
|
1377
|
+
if (M) return V;
|
|
1378
|
+
let H;
|
|
1379
|
+
return t[29] !== P || t[30] !== V || t[31] !== z || t[32] !== j ? (H = /* @__PURE__ */ _(D, {
|
|
1380
|
+
sensors: j,
|
|
1381
|
+
collisionDetection: P,
|
|
1382
|
+
onDragEnd: z,
|
|
1383
|
+
...Je,
|
|
1384
|
+
children: V
|
|
1385
|
+
}), t[29] = P, t[30] = V, t[31] = z, t[32] = j, t[33] = H) : H = t[33], H;
|
|
1386
|
+
};
|
|
1387
|
+
function _t(e) {
|
|
1388
|
+
return e.kind === "section-header";
|
|
1389
|
+
}
|
|
1390
|
+
function vt(e) {
|
|
1391
|
+
return e.kind === "node";
|
|
1392
|
+
}
|
|
1393
|
+
function yt(e) {
|
|
1394
|
+
return e.kind === "node" && e.level === 0;
|
|
1395
|
+
}
|
|
1396
|
+
function bt(e) {
|
|
1397
|
+
return e.kind === "node" ? e.node.id : "";
|
|
1398
|
+
}
|
|
1399
|
+
function xt() {}
|
|
1400
|
+
function St(e) {
|
|
1401
|
+
return $(e.id);
|
|
1402
|
+
}
|
|
1403
|
+
//#endregion
|
|
1404
|
+
//#region src/components/tree-list/use-tree-list-keyboard-navigation.ts
|
|
1405
|
+
var Ct = (e, t) => e ? [...e.querySelectorAll("[data-tree-list-focus-id]")].find((e) => e.dataset.treeListFocusId === t) ?? null : null, wt = (e, t) => {
|
|
1406
|
+
if (e && t instanceof HTMLElement && e.contains(t)) return t.closest("[data-tree-list-focus-id]")?.dataset.treeListFocusId;
|
|
1407
|
+
}, Tt = (e) => e instanceof HTMLElement ? e.isContentEditable ? !0 : [
|
|
1408
|
+
"INPUT",
|
|
1409
|
+
"TEXTAREA",
|
|
1410
|
+
"SELECT"
|
|
1411
|
+
].includes(e.tagName) : !1, Et = (e, t) => e.findIndex((e) => Ce(e) && Se(e) === t), Dt = (e) => {
|
|
1412
|
+
let t = h(28), { rows: n, activeNodeId: r, expandedNodeIds: i, onToggleNode: a, onToggleSection: o, scrollToRow: s } = e, c = w(null), [l, u] = T(), [d, f] = T(), p;
|
|
1413
|
+
t[0] !== r || t[1] !== l || t[2] !== n ? (p = Te(l, r, n), t[0] = r, t[1] = l, t[2] = n, t[3] = p) : p = t[3];
|
|
1414
|
+
let m = p, g;
|
|
1415
|
+
t[4] === n ? g = t[5] : (g = we(n).map(Se).join("\0"), t[4] = n, t[5] = g);
|
|
1416
|
+
let _ = g, v, y;
|
|
1417
|
+
t[6] !== _ || t[7] !== l ? (v = () => {
|
|
1418
|
+
l && (_.split("\0").includes(l) || u(void 0));
|
|
1419
|
+
}, y = [l, _], t[6] = _, t[7] = l, t[8] = v, t[9] = y) : (v = t[8], y = t[9]), S(v, y);
|
|
1420
|
+
let b, x;
|
|
1421
|
+
t[10] === d ? (b = t[11], x = t[12]) : (b = () => {
|
|
1422
|
+
if (!d) return;
|
|
1423
|
+
let e = requestAnimationFrame(() => {
|
|
1424
|
+
requestAnimationFrame(() => {
|
|
1425
|
+
let e = Ct(c.current, d);
|
|
1426
|
+
e && (e.focus(), f(void 0));
|
|
1427
|
+
});
|
|
1428
|
+
});
|
|
1429
|
+
return () => cancelAnimationFrame(e);
|
|
1430
|
+
}, x = [d], t[10] = d, t[11] = b, t[12] = x), S(b, x);
|
|
1431
|
+
let C;
|
|
1432
|
+
t[13] !== n || t[14] !== s ? (C = (e) => {
|
|
1433
|
+
u(e);
|
|
1434
|
+
let t = Ct(c.current, e);
|
|
1435
|
+
if (t) {
|
|
1436
|
+
t.focus();
|
|
1437
|
+
return;
|
|
1438
|
+
}
|
|
1439
|
+
let r = Et(n, e);
|
|
1440
|
+
r !== -1 && (s?.(r), f(e));
|
|
1441
|
+
}, t[13] = n, t[14] = s, t[15] = C) : C = t[15];
|
|
1442
|
+
let E = C, D;
|
|
1443
|
+
t[16] !== r || t[17] !== i || t[18] !== E || t[19] !== m || t[20] !== a || t[21] !== o || t[22] !== n ? (D = (e) => {
|
|
1444
|
+
if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || Tt(e.target)) return;
|
|
1445
|
+
let t = Oe({
|
|
1446
|
+
rows: n,
|
|
1447
|
+
focusedRowId: wt(c.current, e.target) ?? m,
|
|
1448
|
+
activeNodeId: r,
|
|
1449
|
+
expandedNodeIds: i,
|
|
1450
|
+
key: e.key
|
|
1451
|
+
});
|
|
1452
|
+
if (t) {
|
|
1453
|
+
if (e.preventDefault(), t.type === "toggle-node") {
|
|
1454
|
+
a?.(t.nodeId);
|
|
1455
|
+
return;
|
|
1456
|
+
}
|
|
1457
|
+
if (t.type === "toggle-section") {
|
|
1458
|
+
o?.(t.sectionId);
|
|
1459
|
+
return;
|
|
1460
|
+
}
|
|
1461
|
+
E(t.rowId);
|
|
1462
|
+
}
|
|
1463
|
+
}, t[16] = r, t[17] = i, t[18] = E, t[19] = m, t[20] = a, t[21] = o, t[22] = n, t[23] = D) : D = t[23];
|
|
1464
|
+
let O = D, k;
|
|
1465
|
+
t[24] === Symbol.for("react.memo_cache_sentinel") ? (k = (e) => u(e), t[24] = k) : k = t[24];
|
|
1466
|
+
let A;
|
|
1467
|
+
return t[25] !== m || t[26] !== O ? (A = {
|
|
1468
|
+
focusRowId: m,
|
|
1469
|
+
rootRef: c,
|
|
1470
|
+
handleKeyDown: O,
|
|
1471
|
+
onRowFocus: k
|
|
1472
|
+
}, t[25] = m, t[26] = O, t[27] = A) : A = t[27], A;
|
|
1473
|
+
}, Ot = 32, kt = 4, At = (e) => {
|
|
1474
|
+
let t = h(32), { row: n, expandedNodeIds: r, activeNodeId: i, focusRowId: a, rowVariant: o, nodeGap: s, linkComponent: c, onRowFocus: l, onNavigate: u, onToggleSection: d, onToggleNode: f, onSectionContextMenu: p, onMoveNode: m } = e;
|
|
1475
|
+
if (n.kind === "section-header") {
|
|
1476
|
+
let e = n.key === a ? 0 : -1, r;
|
|
1477
|
+
t[0] !== l || t[1] !== n.key ? (r = () => l(n.key), t[0] = l, t[1] = n.key, t[2] = r) : r = t[2];
|
|
1478
|
+
let i;
|
|
1479
|
+
t[3] !== d || t[4] !== n.sectionId ? (i = () => d?.(n.sectionId), t[3] = d, t[4] = n.sectionId, t[5] = i) : i = t[5];
|
|
1480
|
+
let o;
|
|
1481
|
+
return t[6] !== p || t[7] !== n.collapsible || t[8] !== n.expanded || t[9] !== n.key || t[10] !== n.section || t[11] !== e || t[12] !== r || t[13] !== i ? (o = /* @__PURE__ */ _(Fe, {
|
|
1482
|
+
section: n.section,
|
|
1483
|
+
collapsible: n.collapsible,
|
|
1484
|
+
expanded: n.expanded,
|
|
1485
|
+
focusId: n.key,
|
|
1486
|
+
tabIndex: e,
|
|
1487
|
+
onFocus: r,
|
|
1488
|
+
onToggle: i,
|
|
1489
|
+
onContextMenu: p
|
|
1490
|
+
}), t[6] = p, t[7] = n.collapsible, t[8] = n.expanded, t[9] = n.key, t[10] = n.section, t[11] = e, t[12] = r, t[13] = i, t[14] = o) : o = t[14], o;
|
|
1491
|
+
}
|
|
1492
|
+
if (n.kind === "section-empty") return n.emptyState ?? null;
|
|
1493
|
+
let g = n.node.id === a ? 0 : -1, v;
|
|
1494
|
+
t[15] !== l || t[16] !== n.node.id ? (v = () => l(n.node.id), t[15] = l, t[16] = n.node.id, t[17] = v) : v = t[17];
|
|
1495
|
+
let y;
|
|
1496
|
+
return t[18] !== i || t[19] !== r || t[20] !== c || t[21] !== s || t[22] !== m || t[23] !== u || t[24] !== f || t[25] !== n.level || t[26] !== n.node || t[27] !== n.sectionId || t[28] !== o || t[29] !== g || t[30] !== v ? (y = /* @__PURE__ */ _(Ne, {
|
|
1497
|
+
sectionId: n.sectionId,
|
|
1498
|
+
node: n.node,
|
|
1499
|
+
level: n.level,
|
|
1500
|
+
expandedNodeIds: r,
|
|
1501
|
+
activeNodeId: i,
|
|
1502
|
+
rowVariant: o,
|
|
1503
|
+
nodeGap: s,
|
|
1504
|
+
linkComponent: c,
|
|
1505
|
+
tabIndex: g,
|
|
1506
|
+
onFocus: v,
|
|
1507
|
+
onNavigate: u,
|
|
1508
|
+
onToggleNode: f,
|
|
1509
|
+
onMoveNode: m
|
|
1510
|
+
}), t[18] = i, t[19] = r, t[20] = c, t[21] = s, t[22] = m, t[23] = u, t[24] = f, t[25] = n.level, t[26] = n.node, t[27] = n.sectionId, t[28] = o, t[29] = g, t[30] = v, t[31] = y) : y = t[31], y;
|
|
1511
|
+
}, jt = (e) => {
|
|
1512
|
+
let { rows: t, expandedNodeIds: n = [], activeNodeId: r, rowVariant: i = "tree", nodeGap: o = "0", linkComponent: c, onNavigate: l, onToggleSection: u, onToggleNode: d, onSectionContextMenu: f, onMoveNode: p, scrollRef: m } = e, h = a({
|
|
1513
|
+
count: t.length,
|
|
1514
|
+
getScrollElement: () => m.current,
|
|
1515
|
+
estimateSize: () => Ot,
|
|
1516
|
+
overscan: kt,
|
|
1517
|
+
getItemKey: (e) => t[e]?.key ?? e
|
|
1518
|
+
}), g = Dt({
|
|
1519
|
+
rows: t,
|
|
1520
|
+
activeNodeId: r,
|
|
1521
|
+
expandedNodeIds: n,
|
|
1522
|
+
onToggleNode: d,
|
|
1523
|
+
onToggleSection: u,
|
|
1524
|
+
scrollToRow: (e) => h.scrollToIndex(e, { align: "auto" })
|
|
1525
|
+
});
|
|
1526
|
+
return /* @__PURE__ */ _(s, {
|
|
1527
|
+
ref: g.rootRef,
|
|
1528
|
+
role: "listbox",
|
|
1529
|
+
w: "full",
|
|
1530
|
+
minW: "0",
|
|
1531
|
+
maxW: "full",
|
|
1532
|
+
position: "relative",
|
|
1533
|
+
style: { height: h.getTotalSize() },
|
|
1534
|
+
onKeyDown: g.handleKeyDown,
|
|
1535
|
+
children: h.getVirtualItems().map((e) => {
|
|
1536
|
+
let a = t[e.index];
|
|
1537
|
+
return a ? /* @__PURE__ */ _(s, {
|
|
1538
|
+
ref: h.measureElement,
|
|
1539
|
+
"data-index": e.index,
|
|
1540
|
+
"data-tree-list-row": a.kind,
|
|
1541
|
+
position: "absolute",
|
|
1542
|
+
top: "0",
|
|
1543
|
+
left: "0",
|
|
1544
|
+
w: "full",
|
|
1545
|
+
pb: e.index === t.length - 1 ? "0" : o,
|
|
1546
|
+
style: { transform: `translateY(${e.start}px)` },
|
|
1547
|
+
children: /* @__PURE__ */ _(At, {
|
|
1548
|
+
row: a,
|
|
1549
|
+
expandedNodeIds: n,
|
|
1550
|
+
activeNodeId: r,
|
|
1551
|
+
focusRowId: g.focusRowId,
|
|
1552
|
+
rowVariant: i,
|
|
1553
|
+
nodeGap: o,
|
|
1554
|
+
linkComponent: c,
|
|
1555
|
+
onRowFocus: g.onRowFocus,
|
|
1556
|
+
onNavigate: l,
|
|
1557
|
+
onToggleSection: u,
|
|
1558
|
+
onToggleNode: d,
|
|
1559
|
+
onSectionContextMenu: f,
|
|
1560
|
+
onMoveNode: p
|
|
1561
|
+
})
|
|
1562
|
+
}, e.key) : null;
|
|
1563
|
+
})
|
|
1564
|
+
});
|
|
1565
|
+
}, Mt = (e) => {
|
|
1566
|
+
let { sections: t, expandedSectionIds: n = [], expandedNodeIds: r = [], activeNodeId: i, rowVariant: a = "tree", sectionGap: o = "0", nodeGap: c = "0", linkComponent: l, onNavigate: u, onToggleSection: d, onToggleNode: p, onSectionContextMenu: m, onMoveNode: h, virtualize: g, scrollRef: v } = e, y = xe(t, n, r), b = Dt({
|
|
1567
|
+
rows: y,
|
|
1568
|
+
activeNodeId: i,
|
|
1569
|
+
expandedNodeIds: r,
|
|
1570
|
+
onToggleNode: p,
|
|
1571
|
+
onToggleSection: d
|
|
1572
|
+
});
|
|
1573
|
+
return g && v ? /* @__PURE__ */ _(jt, {
|
|
1574
|
+
...e,
|
|
1575
|
+
rows: y,
|
|
1576
|
+
scrollRef: v
|
|
1577
|
+
}) : /* @__PURE__ */ _(f, {
|
|
1578
|
+
ref: b.rootRef,
|
|
1579
|
+
role: "listbox",
|
|
1580
|
+
gap: o,
|
|
1581
|
+
w: "full",
|
|
1582
|
+
minW: "0",
|
|
1583
|
+
maxW: "full",
|
|
1584
|
+
overflowX: "hidden",
|
|
1585
|
+
onKeyDown: b.handleKeyDown,
|
|
1586
|
+
children: t.map((e) => {
|
|
1587
|
+
let t = y.filter((t) => t.sectionId === e.id);
|
|
1588
|
+
return /* @__PURE__ */ _(f, {
|
|
1589
|
+
gap: c,
|
|
1590
|
+
w: "full",
|
|
1591
|
+
minW: "0",
|
|
1592
|
+
maxW: "full",
|
|
1593
|
+
"data-testid": `tree-list-section-${e.id}`,
|
|
1594
|
+
children: t.map((e) => /* @__PURE__ */ _(s, {
|
|
1595
|
+
w: "full",
|
|
1596
|
+
minW: "0",
|
|
1597
|
+
children: /* @__PURE__ */ _(At, {
|
|
1598
|
+
row: e,
|
|
1599
|
+
expandedNodeIds: r,
|
|
1600
|
+
activeNodeId: i,
|
|
1601
|
+
focusRowId: b.focusRowId,
|
|
1602
|
+
rowVariant: a,
|
|
1603
|
+
nodeGap: c,
|
|
1604
|
+
linkComponent: l,
|
|
1605
|
+
onRowFocus: b.onRowFocus,
|
|
1606
|
+
onNavigate: u,
|
|
1607
|
+
onToggleSection: d,
|
|
1608
|
+
onToggleNode: p,
|
|
1609
|
+
onSectionContextMenu: m,
|
|
1610
|
+
onMoveNode: h
|
|
1611
|
+
})
|
|
1612
|
+
}, e.key))
|
|
1613
|
+
}, e.id);
|
|
1614
|
+
})
|
|
1615
|
+
});
|
|
1616
|
+
}, Nt = (e) => {
|
|
1617
|
+
let t = h(8), n;
|
|
1618
|
+
t[0] === e ? n = t[1] : (n = e.draggable ? /* @__PURE__ */ _(gt, {
|
|
1619
|
+
sections: e.sections,
|
|
1620
|
+
expandedSectionIds: e.expandedSectionIds,
|
|
1621
|
+
expandedNodeIds: e.expandedNodeIds,
|
|
1622
|
+
activeNodeId: e.activeNodeId,
|
|
1623
|
+
rowVariant: e.rowVariant,
|
|
1624
|
+
sectionGap: e.sectionGap,
|
|
1625
|
+
nodeGap: e.nodeGap,
|
|
1626
|
+
linkComponent: e.linkComponent,
|
|
1627
|
+
onNavigate: e.onNavigate,
|
|
1628
|
+
onToggleSection: e.onToggleSection,
|
|
1629
|
+
onToggleNode: e.onToggleNode,
|
|
1630
|
+
onSectionContextMenu: e.onSectionContextMenu,
|
|
1631
|
+
onReorderSections: e.onReorderSections,
|
|
1632
|
+
onReorderNodes: e.onReorderNodes,
|
|
1633
|
+
onMoveNode: e.onMoveNode,
|
|
1634
|
+
canMove: e.canMove
|
|
1635
|
+
}) : /* @__PURE__ */ _(Mt, { ...e }), t[0] = e, t[1] = n);
|
|
1636
|
+
let r = n, i;
|
|
1637
|
+
t[2] !== r || t[3] !== e.onMoveNode ? (i = /* @__PURE__ */ _(je, {
|
|
1638
|
+
onMoveNode: e.onMoveNode,
|
|
1639
|
+
children: r
|
|
1640
|
+
}), t[2] = r, t[3] = e.onMoveNode, t[4] = i) : i = t[4];
|
|
1641
|
+
let a = i;
|
|
1642
|
+
if (!e.backgroundContextActions || e.backgroundContextActions.length === 0) return a;
|
|
1643
|
+
let o;
|
|
1644
|
+
return t[5] !== a || t[6] !== e.backgroundContextActions ? (o = /* @__PURE__ */ _(ge, {
|
|
1645
|
+
actions: e.backgroundContextActions,
|
|
1646
|
+
children: a
|
|
1647
|
+
}), t[5] = a, t[6] = e.backgroundContextActions, t[7] = o) : o = t[7], o;
|
|
1648
|
+
};
|
|
1649
|
+
//#endregion
|
|
1650
|
+
export { ot as n, pe as r, Nt as t };
|
|
1651
|
+
|
|
1652
|
+
//# sourceMappingURL=tree-list-jarhD31R.js.map
|