@ea-lab/reactive-json 0.7.0 → 1.0.0-alpha.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/README.md +1 -3
- package/dist/TemplateSystem-kQJEKjik.js +3568 -0
- package/dist/assets/VariablesDebug.css +1 -4
- package/dist/assets/reset.css +4 -0
- package/dist/assets/usePagination.css +1 -0
- package/dist/component/action/HashChangeListener.js +29 -7
- package/dist/component/action/MessageListener.js +26 -8
- package/dist/component/action/ReactOnEvent.js +64 -8
- package/dist/component/action/Redirect.js +9 -5
- package/dist/component/action/SetAttributeValue.js +37 -5
- package/dist/component/action/ToggleAttributeValue.js +56 -5
- package/dist/component/action/UnsetAttribute.js +20 -5
- package/dist/component/action/UnsetAttributeValue.js +58 -5
- package/dist/component/action/index.js +19 -15
- package/dist/component/dataMapping/index.js +6 -3
- package/dist/component/dataMapping/simpleMapping.js +93 -2
- package/dist/component/element/debug/VariablesDebug/VariablesDebug.js +110 -13
- package/dist/component/element/debug/index.js +2 -2
- package/dist/component/element/html/FolderSortableTree.js +131 -8
- package/dist/component/element/html/FormatNumeral.js +57 -6
- package/dist/component/element/html/Html.js +1 -1
- package/dist/component/element/html/LabelFromValue.js +25 -6
- package/dist/component/element/html/PreformattedMarkup.js +50 -7
- package/dist/component/element/html/SortableTreeItemCollapseButton.js +10 -5
- package/dist/component/element/html/index.js +12 -10
- package/dist/component/element/index.js +35 -30
- package/dist/component/element/special/Count.js +21 -10
- package/dist/component/element/special/DataFilter.js +75 -6
- package/dist/component/element/special/DelayedActions.js +46 -7
- package/dist/component/element/special/Phantom.js +12 -3
- package/dist/component/element/special/ReactiveJsonBasicComponentWrapper.js +29 -0
- package/dist/component/element/special/ReactiveJsonSubroot.js +4 -3
- package/dist/component/element/special/Switch.js +78 -8
- package/dist/component/element/special/index.js +16 -10
- package/dist/component/hook/index.js +1 -1
- package/dist/component/hook/usePagination.js +172 -4
- package/dist/component/index.js +85 -63
- package/dist/component/reaction/addData.js +23 -3
- package/dist/component/reaction/fetchData.js +12 -2
- package/dist/component/reaction/index.js +34 -12
- package/dist/component/reaction/moveData.js +34 -2
- package/dist/component/reaction/postMessage.js +23 -2
- package/dist/component/reaction/redirectNow.js +6 -2
- package/dist/component/reaction/removeData.js +27 -2
- package/dist/component/reaction/setClipboardData.js +16 -2
- package/dist/component/reaction/setData.js +22 -3
- package/dist/component/reaction/submitData.js +25 -2
- package/dist/component/reaction/utility/httpRequestCommon.js +3 -2
- package/dist/component/reaction/utility/index.js +1 -1
- package/dist/coreComponentsPlugin.js +5 -2
- package/dist/dnd-kit-sortable-tree.esm-Cz1RJyIg.js +4135 -0
- package/dist/engine/Actions.js +4 -7
- package/dist/engine/ParsingDebugDisplay/ParsingDebugDisplay.js +692 -3
- package/dist/engine/ReactiveJsonRoot.js +8 -6
- package/dist/engine/TemplateSystem.js +3 -3
- package/dist/engine/View.js +2 -7
- package/dist/engine/index.js +38 -37
- package/dist/engine/utility/alterData.js +7 -1
- package/dist/engine/utility/analyzeDataOverrideReferences.js +41 -2
- package/dist/engine/utility/formElementsCommon.js +34 -0
- package/dist/engine/utility/formatString.js +19 -3
- package/dist/engine/utility/index.js +12 -11
- package/dist/httpRequestCommon-BFntjNdS.js +1799 -0
- package/dist/index-BA09SSaJ.js +26 -0
- package/dist/index-Bzk15m61.js +19 -0
- package/dist/index-CACLSxWi.js +8 -0
- package/dist/index-NNBvIV0S.js +1873 -0
- package/dist/index-OhHUX6nj.js +460 -0
- package/dist/main.js +124 -102
- package/package.json +4 -4
- package/dist/HashChangeListener-D6HwdXBJ.js +0 -8526
- package/dist/ParsingDebugDisplay-8f4yL4Jw.js +0 -696
- package/dist/VariablesDebug-pv5GGWel.js +0 -9262
- package/dist/component/action/Popover.js +0 -6
- package/dist/component/action/Tooltip.js +0 -5
- package/dist/component/element/form/CheckBoxField.js +0 -8
- package/dist/component/element/form/DateField.js +0 -8
- package/dist/component/element/form/NumberField.js +0 -8
- package/dist/component/element/form/SelectField.js +0 -8
- package/dist/component/element/form/TextAreaField.js +0 -8
- package/dist/component/element/form/TextField.js +0 -8
- package/dist/component/element/form/formElementsCommon.js +0 -4
- package/dist/component/element/form/index.js +0 -10
- package/dist/component/element/html/AccordionItem.js +0 -6
- package/dist/component/element/html/Modal.js +0 -8
- package/dist/component/element/html/Tabs.js +0 -8
- package/dist/component/element/special/BootstrapElement.js +0 -5
- package/dist/engine/PaginationProvider.js +0 -30
- package/dist/usePagination-Bb6lefHG.js +0 -353
|
@@ -0,0 +1,4135 @@
|
|
|
1
|
+
import I, { useLayoutEffect as tr, useEffect as j, useRef as z, useMemo as L, useCallback as U, useState as H, createContext as rt, memo as nr, useReducer as rr, useContext as Pe, forwardRef as pn, cloneElement as or } from "react";
|
|
2
|
+
var lt = { exports: {} }, J = {};
|
|
3
|
+
/**
|
|
4
|
+
* @license React
|
|
5
|
+
* react-dom.production.js
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/
|
|
12
|
+
var Zt;
|
|
13
|
+
function ir() {
|
|
14
|
+
if (Zt) return J;
|
|
15
|
+
Zt = 1;
|
|
16
|
+
var e = I;
|
|
17
|
+
function t(s) {
|
|
18
|
+
var a = "https://react.dev/errors/" + s;
|
|
19
|
+
if (1 < arguments.length) {
|
|
20
|
+
a += "?args[]=" + encodeURIComponent(arguments[1]);
|
|
21
|
+
for (var f = 2; f < arguments.length; f++)
|
|
22
|
+
a += "&args[]=" + encodeURIComponent(arguments[f]);
|
|
23
|
+
}
|
|
24
|
+
return "Minified React error #" + s + "; visit " + a + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
|
|
25
|
+
}
|
|
26
|
+
function n() {
|
|
27
|
+
}
|
|
28
|
+
var r = {
|
|
29
|
+
d: {
|
|
30
|
+
f: n,
|
|
31
|
+
r: function() {
|
|
32
|
+
throw Error(t(522));
|
|
33
|
+
},
|
|
34
|
+
D: n,
|
|
35
|
+
C: n,
|
|
36
|
+
L: n,
|
|
37
|
+
m: n,
|
|
38
|
+
X: n,
|
|
39
|
+
S: n,
|
|
40
|
+
M: n
|
|
41
|
+
},
|
|
42
|
+
p: 0,
|
|
43
|
+
findDOMNode: null
|
|
44
|
+
}, o = Symbol.for("react.portal");
|
|
45
|
+
function i(s, a, f) {
|
|
46
|
+
var c = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
|
|
47
|
+
return {
|
|
48
|
+
$$typeof: o,
|
|
49
|
+
key: c == null ? null : "" + c,
|
|
50
|
+
children: s,
|
|
51
|
+
containerInfo: a,
|
|
52
|
+
implementation: f
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
var d = e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
56
|
+
function u(s, a) {
|
|
57
|
+
if (s === "font") return "";
|
|
58
|
+
if (typeof a == "string")
|
|
59
|
+
return a === "use-credentials" ? a : "";
|
|
60
|
+
}
|
|
61
|
+
return J.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = r, J.createPortal = function(s, a) {
|
|
62
|
+
var f = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
|
|
63
|
+
if (!a || a.nodeType !== 1 && a.nodeType !== 9 && a.nodeType !== 11)
|
|
64
|
+
throw Error(t(299));
|
|
65
|
+
return i(s, a, null, f);
|
|
66
|
+
}, J.flushSync = function(s) {
|
|
67
|
+
var a = d.T, f = r.p;
|
|
68
|
+
try {
|
|
69
|
+
if (d.T = null, r.p = 2, s) return s();
|
|
70
|
+
} finally {
|
|
71
|
+
d.T = a, r.p = f, r.d.f();
|
|
72
|
+
}
|
|
73
|
+
}, J.preconnect = function(s, a) {
|
|
74
|
+
typeof s == "string" && (a ? (a = a.crossOrigin, a = typeof a == "string" ? a === "use-credentials" ? a : "" : void 0) : a = null, r.d.C(s, a));
|
|
75
|
+
}, J.prefetchDNS = function(s) {
|
|
76
|
+
typeof s == "string" && r.d.D(s);
|
|
77
|
+
}, J.preinit = function(s, a) {
|
|
78
|
+
if (typeof s == "string" && a && typeof a.as == "string") {
|
|
79
|
+
var f = a.as, c = u(f, a.crossOrigin), l = typeof a.integrity == "string" ? a.integrity : void 0, g = typeof a.fetchPriority == "string" ? a.fetchPriority : void 0;
|
|
80
|
+
f === "style" ? r.d.S(
|
|
81
|
+
s,
|
|
82
|
+
typeof a.precedence == "string" ? a.precedence : void 0,
|
|
83
|
+
{
|
|
84
|
+
crossOrigin: c,
|
|
85
|
+
integrity: l,
|
|
86
|
+
fetchPriority: g
|
|
87
|
+
}
|
|
88
|
+
) : f === "script" && r.d.X(s, {
|
|
89
|
+
crossOrigin: c,
|
|
90
|
+
integrity: l,
|
|
91
|
+
fetchPriority: g,
|
|
92
|
+
nonce: typeof a.nonce == "string" ? a.nonce : void 0
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}, J.preinitModule = function(s, a) {
|
|
96
|
+
if (typeof s == "string")
|
|
97
|
+
if (typeof a == "object" && a !== null) {
|
|
98
|
+
if (a.as == null || a.as === "script") {
|
|
99
|
+
var f = u(
|
|
100
|
+
a.as,
|
|
101
|
+
a.crossOrigin
|
|
102
|
+
);
|
|
103
|
+
r.d.M(s, {
|
|
104
|
+
crossOrigin: f,
|
|
105
|
+
integrity: typeof a.integrity == "string" ? a.integrity : void 0,
|
|
106
|
+
nonce: typeof a.nonce == "string" ? a.nonce : void 0
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
} else a == null && r.d.M(s);
|
|
110
|
+
}, J.preload = function(s, a) {
|
|
111
|
+
if (typeof s == "string" && typeof a == "object" && a !== null && typeof a.as == "string") {
|
|
112
|
+
var f = a.as, c = u(f, a.crossOrigin);
|
|
113
|
+
r.d.L(s, f, {
|
|
114
|
+
crossOrigin: c,
|
|
115
|
+
integrity: typeof a.integrity == "string" ? a.integrity : void 0,
|
|
116
|
+
nonce: typeof a.nonce == "string" ? a.nonce : void 0,
|
|
117
|
+
type: typeof a.type == "string" ? a.type : void 0,
|
|
118
|
+
fetchPriority: typeof a.fetchPriority == "string" ? a.fetchPriority : void 0,
|
|
119
|
+
referrerPolicy: typeof a.referrerPolicy == "string" ? a.referrerPolicy : void 0,
|
|
120
|
+
imageSrcSet: typeof a.imageSrcSet == "string" ? a.imageSrcSet : void 0,
|
|
121
|
+
imageSizes: typeof a.imageSizes == "string" ? a.imageSizes : void 0,
|
|
122
|
+
media: typeof a.media == "string" ? a.media : void 0
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
}, J.preloadModule = function(s, a) {
|
|
126
|
+
if (typeof s == "string")
|
|
127
|
+
if (a) {
|
|
128
|
+
var f = u(a.as, a.crossOrigin);
|
|
129
|
+
r.d.m(s, {
|
|
130
|
+
as: typeof a.as == "string" && a.as !== "script" ? a.as : void 0,
|
|
131
|
+
crossOrigin: f,
|
|
132
|
+
integrity: typeof a.integrity == "string" ? a.integrity : void 0
|
|
133
|
+
});
|
|
134
|
+
} else r.d.m(s);
|
|
135
|
+
}, J.requestFormReset = function(s) {
|
|
136
|
+
r.d.r(s);
|
|
137
|
+
}, J.unstable_batchedUpdates = function(s, a) {
|
|
138
|
+
return s(a);
|
|
139
|
+
}, J.useFormState = function(s, a, f) {
|
|
140
|
+
return d.H.useFormState(s, a, f);
|
|
141
|
+
}, J.useFormStatus = function() {
|
|
142
|
+
return d.H.useHostTransitionStatus();
|
|
143
|
+
}, J.version = "19.1.0", J;
|
|
144
|
+
}
|
|
145
|
+
var Z = {};
|
|
146
|
+
/**
|
|
147
|
+
* @license React
|
|
148
|
+
* react-dom.development.js
|
|
149
|
+
*
|
|
150
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
151
|
+
*
|
|
152
|
+
* This source code is licensed under the MIT license found in the
|
|
153
|
+
* LICENSE file in the root directory of this source tree.
|
|
154
|
+
*/
|
|
155
|
+
var Qt;
|
|
156
|
+
function ar() {
|
|
157
|
+
return Qt || (Qt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
158
|
+
function e() {
|
|
159
|
+
}
|
|
160
|
+
function t(c) {
|
|
161
|
+
return "" + c;
|
|
162
|
+
}
|
|
163
|
+
function n(c, l, g) {
|
|
164
|
+
var b = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
|
|
165
|
+
try {
|
|
166
|
+
t(b);
|
|
167
|
+
var p = !1;
|
|
168
|
+
} catch {
|
|
169
|
+
p = !0;
|
|
170
|
+
}
|
|
171
|
+
return p && (console.error(
|
|
172
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
173
|
+
typeof Symbol == "function" && Symbol.toStringTag && b[Symbol.toStringTag] || b.constructor.name || "Object"
|
|
174
|
+
), t(b)), {
|
|
175
|
+
$$typeof: a,
|
|
176
|
+
key: b == null ? null : "" + b,
|
|
177
|
+
children: c,
|
|
178
|
+
containerInfo: l,
|
|
179
|
+
implementation: g
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
function r(c, l) {
|
|
183
|
+
if (c === "font") return "";
|
|
184
|
+
if (typeof l == "string")
|
|
185
|
+
return l === "use-credentials" ? l : "";
|
|
186
|
+
}
|
|
187
|
+
function o(c) {
|
|
188
|
+
return c === null ? "`null`" : c === void 0 ? "`undefined`" : c === "" ? "an empty string" : 'something with type "' + typeof c + '"';
|
|
189
|
+
}
|
|
190
|
+
function i(c) {
|
|
191
|
+
return c === null ? "`null`" : c === void 0 ? "`undefined`" : c === "" ? "an empty string" : typeof c == "string" ? JSON.stringify(c) : typeof c == "number" ? "`" + c + "`" : 'something with type "' + typeof c + '"';
|
|
192
|
+
}
|
|
193
|
+
function d() {
|
|
194
|
+
var c = f.H;
|
|
195
|
+
return c === null && console.error(
|
|
196
|
+
`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
197
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
198
|
+
2. You might be breaking the Rules of Hooks
|
|
199
|
+
3. You might have more than one copy of React in the same app
|
|
200
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`
|
|
201
|
+
), c;
|
|
202
|
+
}
|
|
203
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
204
|
+
var u = I, s = {
|
|
205
|
+
d: {
|
|
206
|
+
f: e,
|
|
207
|
+
r: function() {
|
|
208
|
+
throw Error(
|
|
209
|
+
"Invalid form element. requestFormReset must be passed a form that was rendered by React."
|
|
210
|
+
);
|
|
211
|
+
},
|
|
212
|
+
D: e,
|
|
213
|
+
C: e,
|
|
214
|
+
L: e,
|
|
215
|
+
m: e,
|
|
216
|
+
X: e,
|
|
217
|
+
S: e,
|
|
218
|
+
M: e
|
|
219
|
+
},
|
|
220
|
+
p: 0,
|
|
221
|
+
findDOMNode: null
|
|
222
|
+
}, a = Symbol.for("react.portal"), f = u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
223
|
+
typeof Map == "function" && Map.prototype != null && typeof Map.prototype.forEach == "function" && typeof Set == "function" && Set.prototype != null && typeof Set.prototype.clear == "function" && typeof Set.prototype.forEach == "function" || console.error(
|
|
224
|
+
"React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"
|
|
225
|
+
), Z.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = s, Z.createPortal = function(c, l) {
|
|
226
|
+
var g = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
|
|
227
|
+
if (!l || l.nodeType !== 1 && l.nodeType !== 9 && l.nodeType !== 11)
|
|
228
|
+
throw Error("Target container is not a DOM element.");
|
|
229
|
+
return n(c, l, null, g);
|
|
230
|
+
}, Z.flushSync = function(c) {
|
|
231
|
+
var l = f.T, g = s.p;
|
|
232
|
+
try {
|
|
233
|
+
if (f.T = null, s.p = 2, c)
|
|
234
|
+
return c();
|
|
235
|
+
} finally {
|
|
236
|
+
f.T = l, s.p = g, s.d.f() && console.error(
|
|
237
|
+
"flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."
|
|
238
|
+
);
|
|
239
|
+
}
|
|
240
|
+
}, Z.preconnect = function(c, l) {
|
|
241
|
+
typeof c == "string" && c ? l != null && typeof l != "object" ? console.error(
|
|
242
|
+
"ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",
|
|
243
|
+
i(l)
|
|
244
|
+
) : l != null && typeof l.crossOrigin != "string" && console.error(
|
|
245
|
+
"ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",
|
|
246
|
+
o(l.crossOrigin)
|
|
247
|
+
) : console.error(
|
|
248
|
+
"ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
|
|
249
|
+
o(c)
|
|
250
|
+
), typeof c == "string" && (l ? (l = l.crossOrigin, l = typeof l == "string" ? l === "use-credentials" ? l : "" : void 0) : l = null, s.d.C(c, l));
|
|
251
|
+
}, Z.prefetchDNS = function(c) {
|
|
252
|
+
if (typeof c != "string" || !c)
|
|
253
|
+
console.error(
|
|
254
|
+
"ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
|
|
255
|
+
o(c)
|
|
256
|
+
);
|
|
257
|
+
else if (1 < arguments.length) {
|
|
258
|
+
var l = arguments[1];
|
|
259
|
+
typeof l == "object" && l.hasOwnProperty("crossOrigin") ? console.error(
|
|
260
|
+
"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
|
|
261
|
+
i(l)
|
|
262
|
+
) : console.error(
|
|
263
|
+
"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
|
|
264
|
+
i(l)
|
|
265
|
+
);
|
|
266
|
+
}
|
|
267
|
+
typeof c == "string" && s.d.D(c);
|
|
268
|
+
}, Z.preinit = function(c, l) {
|
|
269
|
+
if (typeof c == "string" && c ? l == null || typeof l != "object" ? console.error(
|
|
270
|
+
"ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",
|
|
271
|
+
i(l)
|
|
272
|
+
) : l.as !== "style" && l.as !== "script" && console.error(
|
|
273
|
+
'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',
|
|
274
|
+
i(l.as)
|
|
275
|
+
) : console.error(
|
|
276
|
+
"ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
|
|
277
|
+
o(c)
|
|
278
|
+
), typeof c == "string" && l && typeof l.as == "string") {
|
|
279
|
+
var g = l.as, b = r(g, l.crossOrigin), p = typeof l.integrity == "string" ? l.integrity : void 0, h = typeof l.fetchPriority == "string" ? l.fetchPriority : void 0;
|
|
280
|
+
g === "style" ? s.d.S(
|
|
281
|
+
c,
|
|
282
|
+
typeof l.precedence == "string" ? l.precedence : void 0,
|
|
283
|
+
{
|
|
284
|
+
crossOrigin: b,
|
|
285
|
+
integrity: p,
|
|
286
|
+
fetchPriority: h
|
|
287
|
+
}
|
|
288
|
+
) : g === "script" && s.d.X(c, {
|
|
289
|
+
crossOrigin: b,
|
|
290
|
+
integrity: p,
|
|
291
|
+
fetchPriority: h,
|
|
292
|
+
nonce: typeof l.nonce == "string" ? l.nonce : void 0
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
}, Z.preinitModule = function(c, l) {
|
|
296
|
+
var g = "";
|
|
297
|
+
if (typeof c == "string" && c || (g += " The `href` argument encountered was " + o(c) + "."), l !== void 0 && typeof l != "object" ? g += " The `options` argument encountered was " + o(l) + "." : l && "as" in l && l.as !== "script" && (g += " The `as` option encountered was " + i(l.as) + "."), g)
|
|
298
|
+
console.error(
|
|
299
|
+
"ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",
|
|
300
|
+
g
|
|
301
|
+
);
|
|
302
|
+
else
|
|
303
|
+
switch (g = l && typeof l.as == "string" ? l.as : "script", g) {
|
|
304
|
+
case "script":
|
|
305
|
+
break;
|
|
306
|
+
default:
|
|
307
|
+
g = i(g), console.error(
|
|
308
|
+
'ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',
|
|
309
|
+
g,
|
|
310
|
+
c
|
|
311
|
+
);
|
|
312
|
+
}
|
|
313
|
+
typeof c == "string" && (typeof l == "object" && l !== null ? (l.as == null || l.as === "script") && (g = r(
|
|
314
|
+
l.as,
|
|
315
|
+
l.crossOrigin
|
|
316
|
+
), s.d.M(c, {
|
|
317
|
+
crossOrigin: g,
|
|
318
|
+
integrity: typeof l.integrity == "string" ? l.integrity : void 0,
|
|
319
|
+
nonce: typeof l.nonce == "string" ? l.nonce : void 0
|
|
320
|
+
})) : l == null && s.d.M(c));
|
|
321
|
+
}, Z.preload = function(c, l) {
|
|
322
|
+
var g = "";
|
|
323
|
+
if (typeof c == "string" && c || (g += " The `href` argument encountered was " + o(c) + "."), l == null || typeof l != "object" ? g += " The `options` argument encountered was " + o(l) + "." : typeof l.as == "string" && l.as || (g += " The `as` option encountered was " + o(l.as) + "."), g && console.error(
|
|
324
|
+
'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',
|
|
325
|
+
g
|
|
326
|
+
), typeof c == "string" && typeof l == "object" && l !== null && typeof l.as == "string") {
|
|
327
|
+
g = l.as;
|
|
328
|
+
var b = r(
|
|
329
|
+
g,
|
|
330
|
+
l.crossOrigin
|
|
331
|
+
);
|
|
332
|
+
s.d.L(c, g, {
|
|
333
|
+
crossOrigin: b,
|
|
334
|
+
integrity: typeof l.integrity == "string" ? l.integrity : void 0,
|
|
335
|
+
nonce: typeof l.nonce == "string" ? l.nonce : void 0,
|
|
336
|
+
type: typeof l.type == "string" ? l.type : void 0,
|
|
337
|
+
fetchPriority: typeof l.fetchPriority == "string" ? l.fetchPriority : void 0,
|
|
338
|
+
referrerPolicy: typeof l.referrerPolicy == "string" ? l.referrerPolicy : void 0,
|
|
339
|
+
imageSrcSet: typeof l.imageSrcSet == "string" ? l.imageSrcSet : void 0,
|
|
340
|
+
imageSizes: typeof l.imageSizes == "string" ? l.imageSizes : void 0,
|
|
341
|
+
media: typeof l.media == "string" ? l.media : void 0
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
}, Z.preloadModule = function(c, l) {
|
|
345
|
+
var g = "";
|
|
346
|
+
typeof c == "string" && c || (g += " The `href` argument encountered was " + o(c) + "."), l !== void 0 && typeof l != "object" ? g += " The `options` argument encountered was " + o(l) + "." : l && "as" in l && typeof l.as != "string" && (g += " The `as` option encountered was " + o(l.as) + "."), g && console.error(
|
|
347
|
+
'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',
|
|
348
|
+
g
|
|
349
|
+
), typeof c == "string" && (l ? (g = r(
|
|
350
|
+
l.as,
|
|
351
|
+
l.crossOrigin
|
|
352
|
+
), s.d.m(c, {
|
|
353
|
+
as: typeof l.as == "string" && l.as !== "script" ? l.as : void 0,
|
|
354
|
+
crossOrigin: g,
|
|
355
|
+
integrity: typeof l.integrity == "string" ? l.integrity : void 0
|
|
356
|
+
})) : s.d.m(c));
|
|
357
|
+
}, Z.requestFormReset = function(c) {
|
|
358
|
+
s.d.r(c);
|
|
359
|
+
}, Z.unstable_batchedUpdates = function(c, l) {
|
|
360
|
+
return c(l);
|
|
361
|
+
}, Z.useFormState = function(c, l, g) {
|
|
362
|
+
return d().useFormState(c, l, g);
|
|
363
|
+
}, Z.useFormStatus = function() {
|
|
364
|
+
return d().useHostTransitionStatus();
|
|
365
|
+
}, Z.version = "19.1.0", typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
366
|
+
}()), Z;
|
|
367
|
+
}
|
|
368
|
+
var en;
|
|
369
|
+
function sr() {
|
|
370
|
+
if (en) return lt.exports;
|
|
371
|
+
en = 1;
|
|
372
|
+
function e() {
|
|
373
|
+
if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function")) {
|
|
374
|
+
if (process.env.NODE_ENV !== "production")
|
|
375
|
+
throw new Error("^_^");
|
|
376
|
+
try {
|
|
377
|
+
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e);
|
|
378
|
+
} catch (t) {
|
|
379
|
+
console.error(t);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
return process.env.NODE_ENV === "production" ? (e(), lt.exports = ir()) : lt.exports = ar(), lt.exports;
|
|
384
|
+
}
|
|
385
|
+
var He = sr();
|
|
386
|
+
function bn(e) {
|
|
387
|
+
var t, n, r = "";
|
|
388
|
+
if (typeof e == "string" || typeof e == "number") r += e;
|
|
389
|
+
else if (typeof e == "object") if (Array.isArray(e)) for (t = 0; t < e.length; t++) e[t] && (n = bn(e[t])) && (r && (r += " "), r += n);
|
|
390
|
+
else for (t in e) e[t] && (r && (r += " "), r += t);
|
|
391
|
+
return r;
|
|
392
|
+
}
|
|
393
|
+
function _t() {
|
|
394
|
+
for (var e, t, n = 0, r = ""; n < arguments.length; ) (e = arguments[n++]) && (t = bn(e)) && (r && (r += " "), r += t);
|
|
395
|
+
return r;
|
|
396
|
+
}
|
|
397
|
+
function lr() {
|
|
398
|
+
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
399
|
+
t[n] = arguments[n];
|
|
400
|
+
return L(
|
|
401
|
+
() => (r) => {
|
|
402
|
+
t.forEach((o) => o(r));
|
|
403
|
+
},
|
|
404
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
405
|
+
t
|
|
406
|
+
);
|
|
407
|
+
}
|
|
408
|
+
const yt = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
409
|
+
function We(e) {
|
|
410
|
+
const t = Object.prototype.toString.call(e);
|
|
411
|
+
return t === "[object Window]" || // In Electron context the Window object serializes to [object global]
|
|
412
|
+
t === "[object global]";
|
|
413
|
+
}
|
|
414
|
+
function $t(e) {
|
|
415
|
+
return "nodeType" in e;
|
|
416
|
+
}
|
|
417
|
+
function ne(e) {
|
|
418
|
+
var t, n;
|
|
419
|
+
return e ? We(e) ? e : $t(e) && (t = (n = e.ownerDocument) == null ? void 0 : n.defaultView) != null ? t : window : window;
|
|
420
|
+
}
|
|
421
|
+
function Ft(e) {
|
|
422
|
+
const {
|
|
423
|
+
Document: t
|
|
424
|
+
} = ne(e);
|
|
425
|
+
return e instanceof t;
|
|
426
|
+
}
|
|
427
|
+
function ot(e) {
|
|
428
|
+
return We(e) ? !1 : e instanceof ne(e).HTMLElement;
|
|
429
|
+
}
|
|
430
|
+
function mn(e) {
|
|
431
|
+
return e instanceof ne(e).SVGElement;
|
|
432
|
+
}
|
|
433
|
+
function Ye(e) {
|
|
434
|
+
return e ? We(e) ? e.document : $t(e) ? Ft(e) ? e : ot(e) || mn(e) ? e.ownerDocument : document : document : document;
|
|
435
|
+
}
|
|
436
|
+
const be = yt ? tr : j;
|
|
437
|
+
function wt(e) {
|
|
438
|
+
const t = z(e);
|
|
439
|
+
return be(() => {
|
|
440
|
+
t.current = e;
|
|
441
|
+
}), U(function() {
|
|
442
|
+
for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
|
|
443
|
+
r[o] = arguments[o];
|
|
444
|
+
return t.current == null ? void 0 : t.current(...r);
|
|
445
|
+
}, []);
|
|
446
|
+
}
|
|
447
|
+
function cr() {
|
|
448
|
+
const e = z(null), t = U((r, o) => {
|
|
449
|
+
e.current = setInterval(r, o);
|
|
450
|
+
}, []), n = U(() => {
|
|
451
|
+
e.current !== null && (clearInterval(e.current), e.current = null);
|
|
452
|
+
}, []);
|
|
453
|
+
return [t, n];
|
|
454
|
+
}
|
|
455
|
+
function et(e, t) {
|
|
456
|
+
t === void 0 && (t = [e]);
|
|
457
|
+
const n = z(e);
|
|
458
|
+
return be(() => {
|
|
459
|
+
n.current !== e && (n.current = e);
|
|
460
|
+
}, t), n;
|
|
461
|
+
}
|
|
462
|
+
function it(e, t) {
|
|
463
|
+
const n = z();
|
|
464
|
+
return L(
|
|
465
|
+
() => {
|
|
466
|
+
const r = e(n.current);
|
|
467
|
+
return n.current = r, r;
|
|
468
|
+
},
|
|
469
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
470
|
+
[...t]
|
|
471
|
+
);
|
|
472
|
+
}
|
|
473
|
+
function ft(e) {
|
|
474
|
+
const t = wt(e), n = z(null), r = U(
|
|
475
|
+
(o) => {
|
|
476
|
+
o !== n.current && (t == null || t(o, n.current)), n.current = o;
|
|
477
|
+
},
|
|
478
|
+
//eslint-disable-next-line
|
|
479
|
+
[]
|
|
480
|
+
);
|
|
481
|
+
return [n, r];
|
|
482
|
+
}
|
|
483
|
+
function gt(e) {
|
|
484
|
+
const t = z();
|
|
485
|
+
return j(() => {
|
|
486
|
+
t.current = e;
|
|
487
|
+
}, [e]), t.current;
|
|
488
|
+
}
|
|
489
|
+
let It = {};
|
|
490
|
+
function at(e, t) {
|
|
491
|
+
return L(() => {
|
|
492
|
+
if (t)
|
|
493
|
+
return t;
|
|
494
|
+
const n = It[e] == null ? 0 : It[e] + 1;
|
|
495
|
+
return It[e] = n, e + "-" + n;
|
|
496
|
+
}, [e, t]);
|
|
497
|
+
}
|
|
498
|
+
function yn(e) {
|
|
499
|
+
return function(t) {
|
|
500
|
+
for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++)
|
|
501
|
+
r[o - 1] = arguments[o];
|
|
502
|
+
return r.reduce((i, d) => {
|
|
503
|
+
const u = Object.entries(d);
|
|
504
|
+
for (const [s, a] of u) {
|
|
505
|
+
const f = i[s];
|
|
506
|
+
f != null && (i[s] = f + e * a);
|
|
507
|
+
}
|
|
508
|
+
return i;
|
|
509
|
+
}, {
|
|
510
|
+
...t
|
|
511
|
+
});
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
const Ue = /* @__PURE__ */ yn(1), vt = /* @__PURE__ */ yn(-1);
|
|
515
|
+
function dr(e) {
|
|
516
|
+
return "clientX" in e && "clientY" in e;
|
|
517
|
+
}
|
|
518
|
+
function xt(e) {
|
|
519
|
+
if (!e)
|
|
520
|
+
return !1;
|
|
521
|
+
const {
|
|
522
|
+
KeyboardEvent: t
|
|
523
|
+
} = ne(e.target);
|
|
524
|
+
return t && e instanceof t;
|
|
525
|
+
}
|
|
526
|
+
function ur(e) {
|
|
527
|
+
if (!e)
|
|
528
|
+
return !1;
|
|
529
|
+
const {
|
|
530
|
+
TouchEvent: t
|
|
531
|
+
} = ne(e.target);
|
|
532
|
+
return t && e instanceof t;
|
|
533
|
+
}
|
|
534
|
+
function ht(e) {
|
|
535
|
+
if (ur(e)) {
|
|
536
|
+
if (e.touches && e.touches.length) {
|
|
537
|
+
const {
|
|
538
|
+
clientX: t,
|
|
539
|
+
clientY: n
|
|
540
|
+
} = e.touches[0];
|
|
541
|
+
return {
|
|
542
|
+
x: t,
|
|
543
|
+
y: n
|
|
544
|
+
};
|
|
545
|
+
} else if (e.changedTouches && e.changedTouches.length) {
|
|
546
|
+
const {
|
|
547
|
+
clientX: t,
|
|
548
|
+
clientY: n
|
|
549
|
+
} = e.changedTouches[0];
|
|
550
|
+
return {
|
|
551
|
+
x: t,
|
|
552
|
+
y: n
|
|
553
|
+
};
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
return dr(e) ? {
|
|
557
|
+
x: e.clientX,
|
|
558
|
+
y: e.clientY
|
|
559
|
+
} : null;
|
|
560
|
+
}
|
|
561
|
+
const De = /* @__PURE__ */ Object.freeze({
|
|
562
|
+
Translate: {
|
|
563
|
+
toString(e) {
|
|
564
|
+
if (!e)
|
|
565
|
+
return;
|
|
566
|
+
const {
|
|
567
|
+
x: t,
|
|
568
|
+
y: n
|
|
569
|
+
} = e;
|
|
570
|
+
return "translate3d(" + (t ? Math.round(t) : 0) + "px, " + (n ? Math.round(n) : 0) + "px, 0)";
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
Scale: {
|
|
574
|
+
toString(e) {
|
|
575
|
+
if (!e)
|
|
576
|
+
return;
|
|
577
|
+
const {
|
|
578
|
+
scaleX: t,
|
|
579
|
+
scaleY: n
|
|
580
|
+
} = e;
|
|
581
|
+
return "scaleX(" + t + ") scaleY(" + n + ")";
|
|
582
|
+
}
|
|
583
|
+
},
|
|
584
|
+
Transform: {
|
|
585
|
+
toString(e) {
|
|
586
|
+
if (e)
|
|
587
|
+
return [De.Translate.toString(e), De.Scale.toString(e)].join(" ");
|
|
588
|
+
}
|
|
589
|
+
},
|
|
590
|
+
Transition: {
|
|
591
|
+
toString(e) {
|
|
592
|
+
let {
|
|
593
|
+
property: t,
|
|
594
|
+
duration: n,
|
|
595
|
+
easing: r
|
|
596
|
+
} = e;
|
|
597
|
+
return t + " " + n + "ms " + r;
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
}), tn = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";
|
|
601
|
+
function fr(e) {
|
|
602
|
+
return e.matches(tn) ? e : e.querySelector(tn);
|
|
603
|
+
}
|
|
604
|
+
const gr = {
|
|
605
|
+
display: "none"
|
|
606
|
+
};
|
|
607
|
+
function vr(e) {
|
|
608
|
+
let {
|
|
609
|
+
id: t,
|
|
610
|
+
value: n
|
|
611
|
+
} = e;
|
|
612
|
+
return I.createElement("div", {
|
|
613
|
+
id: t,
|
|
614
|
+
style: gr
|
|
615
|
+
}, n);
|
|
616
|
+
}
|
|
617
|
+
function hr(e) {
|
|
618
|
+
let {
|
|
619
|
+
id: t,
|
|
620
|
+
announcement: n,
|
|
621
|
+
ariaLiveType: r = "assertive"
|
|
622
|
+
} = e;
|
|
623
|
+
const o = {
|
|
624
|
+
position: "fixed",
|
|
625
|
+
top: 0,
|
|
626
|
+
left: 0,
|
|
627
|
+
width: 1,
|
|
628
|
+
height: 1,
|
|
629
|
+
margin: -1,
|
|
630
|
+
border: 0,
|
|
631
|
+
padding: 0,
|
|
632
|
+
overflow: "hidden",
|
|
633
|
+
clip: "rect(0 0 0 0)",
|
|
634
|
+
clipPath: "inset(100%)",
|
|
635
|
+
whiteSpace: "nowrap"
|
|
636
|
+
};
|
|
637
|
+
return I.createElement("div", {
|
|
638
|
+
id: t,
|
|
639
|
+
style: o,
|
|
640
|
+
role: "status",
|
|
641
|
+
"aria-live": r,
|
|
642
|
+
"aria-atomic": !0
|
|
643
|
+
}, n);
|
|
644
|
+
}
|
|
645
|
+
function pr() {
|
|
646
|
+
const [e, t] = H("");
|
|
647
|
+
return {
|
|
648
|
+
announce: U((r) => {
|
|
649
|
+
r != null && t(r);
|
|
650
|
+
}, []),
|
|
651
|
+
announcement: e
|
|
652
|
+
};
|
|
653
|
+
}
|
|
654
|
+
const wn = /* @__PURE__ */ rt(null);
|
|
655
|
+
function br(e) {
|
|
656
|
+
const t = Pe(wn);
|
|
657
|
+
j(() => {
|
|
658
|
+
if (!t)
|
|
659
|
+
throw new Error("useDndMonitor must be used within a children of <DndContext>");
|
|
660
|
+
return t(e);
|
|
661
|
+
}, [e, t]);
|
|
662
|
+
}
|
|
663
|
+
function mr() {
|
|
664
|
+
const [e] = H(() => /* @__PURE__ */ new Set()), t = U((r) => (e.add(r), () => e.delete(r)), [e]);
|
|
665
|
+
return [U((r) => {
|
|
666
|
+
let {
|
|
667
|
+
type: o,
|
|
668
|
+
event: i
|
|
669
|
+
} = r;
|
|
670
|
+
e.forEach((d) => {
|
|
671
|
+
var u;
|
|
672
|
+
return (u = d[o]) == null ? void 0 : u.call(d, i);
|
|
673
|
+
});
|
|
674
|
+
}, [e]), t];
|
|
675
|
+
}
|
|
676
|
+
const yr = {
|
|
677
|
+
draggable: `
|
|
678
|
+
To pick up a draggable item, press the space bar.
|
|
679
|
+
While dragging, use the arrow keys to move the item.
|
|
680
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
681
|
+
`
|
|
682
|
+
}, wr = {
|
|
683
|
+
onDragStart(e) {
|
|
684
|
+
let {
|
|
685
|
+
active: t
|
|
686
|
+
} = e;
|
|
687
|
+
return "Picked up draggable item " + t.id + ".";
|
|
688
|
+
},
|
|
689
|
+
onDragOver(e) {
|
|
690
|
+
let {
|
|
691
|
+
active: t,
|
|
692
|
+
over: n
|
|
693
|
+
} = e;
|
|
694
|
+
return n ? "Draggable item " + t.id + " was moved over droppable area " + n.id + "." : "Draggable item " + t.id + " is no longer over a droppable area.";
|
|
695
|
+
},
|
|
696
|
+
onDragEnd(e) {
|
|
697
|
+
let {
|
|
698
|
+
active: t,
|
|
699
|
+
over: n
|
|
700
|
+
} = e;
|
|
701
|
+
return n ? "Draggable item " + t.id + " was dropped over droppable area " + n.id : "Draggable item " + t.id + " was dropped.";
|
|
702
|
+
},
|
|
703
|
+
onDragCancel(e) {
|
|
704
|
+
let {
|
|
705
|
+
active: t
|
|
706
|
+
} = e;
|
|
707
|
+
return "Dragging was cancelled. Draggable item " + t.id + " was dropped.";
|
|
708
|
+
}
|
|
709
|
+
};
|
|
710
|
+
function xr(e) {
|
|
711
|
+
let {
|
|
712
|
+
announcements: t = wr,
|
|
713
|
+
container: n,
|
|
714
|
+
hiddenTextDescribedById: r,
|
|
715
|
+
screenReaderInstructions: o = yr
|
|
716
|
+
} = e;
|
|
717
|
+
const {
|
|
718
|
+
announce: i,
|
|
719
|
+
announcement: d
|
|
720
|
+
} = pr(), u = at("DndLiveRegion"), [s, a] = H(!1);
|
|
721
|
+
if (j(() => {
|
|
722
|
+
a(!0);
|
|
723
|
+
}, []), br(L(() => ({
|
|
724
|
+
onDragStart(c) {
|
|
725
|
+
let {
|
|
726
|
+
active: l
|
|
727
|
+
} = c;
|
|
728
|
+
i(t.onDragStart({
|
|
729
|
+
active: l
|
|
730
|
+
}));
|
|
731
|
+
},
|
|
732
|
+
onDragMove(c) {
|
|
733
|
+
let {
|
|
734
|
+
active: l,
|
|
735
|
+
over: g
|
|
736
|
+
} = c;
|
|
737
|
+
t.onDragMove && i(t.onDragMove({
|
|
738
|
+
active: l,
|
|
739
|
+
over: g
|
|
740
|
+
}));
|
|
741
|
+
},
|
|
742
|
+
onDragOver(c) {
|
|
743
|
+
let {
|
|
744
|
+
active: l,
|
|
745
|
+
over: g
|
|
746
|
+
} = c;
|
|
747
|
+
i(t.onDragOver({
|
|
748
|
+
active: l,
|
|
749
|
+
over: g
|
|
750
|
+
}));
|
|
751
|
+
},
|
|
752
|
+
onDragEnd(c) {
|
|
753
|
+
let {
|
|
754
|
+
active: l,
|
|
755
|
+
over: g
|
|
756
|
+
} = c;
|
|
757
|
+
i(t.onDragEnd({
|
|
758
|
+
active: l,
|
|
759
|
+
over: g
|
|
760
|
+
}));
|
|
761
|
+
},
|
|
762
|
+
onDragCancel(c) {
|
|
763
|
+
let {
|
|
764
|
+
active: l,
|
|
765
|
+
over: g
|
|
766
|
+
} = c;
|
|
767
|
+
i(t.onDragCancel({
|
|
768
|
+
active: l,
|
|
769
|
+
over: g
|
|
770
|
+
}));
|
|
771
|
+
}
|
|
772
|
+
}), [i, t])), !s)
|
|
773
|
+
return null;
|
|
774
|
+
const f = I.createElement(I.Fragment, null, I.createElement(vr, {
|
|
775
|
+
id: r,
|
|
776
|
+
value: o.draggable
|
|
777
|
+
}), I.createElement(hr, {
|
|
778
|
+
id: u,
|
|
779
|
+
announcement: d
|
|
780
|
+
}));
|
|
781
|
+
return n ? He.createPortal(f, n) : f;
|
|
782
|
+
}
|
|
783
|
+
var F;
|
|
784
|
+
(function(e) {
|
|
785
|
+
e.DragStart = "dragStart", e.DragMove = "dragMove", e.DragEnd = "dragEnd", e.DragCancel = "dragCancel", e.DragOver = "dragOver", e.RegisterDroppable = "registerDroppable", e.SetDroppableDisabled = "setDroppableDisabled", e.UnregisterDroppable = "unregisterDroppable";
|
|
786
|
+
})(F || (F = {}));
|
|
787
|
+
function pt() {
|
|
788
|
+
}
|
|
789
|
+
function Dr(e, t) {
|
|
790
|
+
return L(
|
|
791
|
+
() => ({
|
|
792
|
+
sensor: e,
|
|
793
|
+
options: t ?? {}
|
|
794
|
+
}),
|
|
795
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
796
|
+
[e, t]
|
|
797
|
+
);
|
|
798
|
+
}
|
|
799
|
+
function Sr() {
|
|
800
|
+
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
801
|
+
t[n] = arguments[n];
|
|
802
|
+
return L(
|
|
803
|
+
() => [...t].filter((r) => r != null),
|
|
804
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
805
|
+
[...t]
|
|
806
|
+
);
|
|
807
|
+
}
|
|
808
|
+
const me = /* @__PURE__ */ Object.freeze({
|
|
809
|
+
x: 0,
|
|
810
|
+
y: 0
|
|
811
|
+
});
|
|
812
|
+
function Cr(e, t) {
|
|
813
|
+
return Math.sqrt(Math.pow(e.x - t.x, 2) + Math.pow(e.y - t.y, 2));
|
|
814
|
+
}
|
|
815
|
+
function Or(e, t) {
|
|
816
|
+
const n = ht(e);
|
|
817
|
+
if (!n)
|
|
818
|
+
return "0 0";
|
|
819
|
+
const r = {
|
|
820
|
+
x: (n.x - t.left) / t.width * 100,
|
|
821
|
+
y: (n.y - t.top) / t.height * 100
|
|
822
|
+
};
|
|
823
|
+
return r.x + "% " + r.y + "%";
|
|
824
|
+
}
|
|
825
|
+
function Rr(e, t) {
|
|
826
|
+
let {
|
|
827
|
+
data: {
|
|
828
|
+
value: n
|
|
829
|
+
}
|
|
830
|
+
} = e, {
|
|
831
|
+
data: {
|
|
832
|
+
value: r
|
|
833
|
+
}
|
|
834
|
+
} = t;
|
|
835
|
+
return n - r;
|
|
836
|
+
}
|
|
837
|
+
function Er(e, t) {
|
|
838
|
+
let {
|
|
839
|
+
data: {
|
|
840
|
+
value: n
|
|
841
|
+
}
|
|
842
|
+
} = e, {
|
|
843
|
+
data: {
|
|
844
|
+
value: r
|
|
845
|
+
}
|
|
846
|
+
} = t;
|
|
847
|
+
return r - n;
|
|
848
|
+
}
|
|
849
|
+
function Tr(e, t) {
|
|
850
|
+
if (!e || e.length === 0)
|
|
851
|
+
return null;
|
|
852
|
+
const [n] = e;
|
|
853
|
+
return n[t];
|
|
854
|
+
}
|
|
855
|
+
function nn(e, t, n) {
|
|
856
|
+
return t === void 0 && (t = e.left), n === void 0 && (n = e.top), {
|
|
857
|
+
x: t + e.width * 0.5,
|
|
858
|
+
y: n + e.height * 0.5
|
|
859
|
+
};
|
|
860
|
+
}
|
|
861
|
+
const _r = (e) => {
|
|
862
|
+
let {
|
|
863
|
+
collisionRect: t,
|
|
864
|
+
droppableRects: n,
|
|
865
|
+
droppableContainers: r
|
|
866
|
+
} = e;
|
|
867
|
+
const o = nn(t, t.left, t.top), i = [];
|
|
868
|
+
for (const d of r) {
|
|
869
|
+
const {
|
|
870
|
+
id: u
|
|
871
|
+
} = d, s = n.get(u);
|
|
872
|
+
if (s) {
|
|
873
|
+
const a = Cr(nn(s), o);
|
|
874
|
+
i.push({
|
|
875
|
+
id: u,
|
|
876
|
+
data: {
|
|
877
|
+
droppableContainer: d,
|
|
878
|
+
value: a
|
|
879
|
+
}
|
|
880
|
+
});
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
return i.sort(Rr);
|
|
884
|
+
};
|
|
885
|
+
function Ir(e, t) {
|
|
886
|
+
const n = Math.max(t.top, e.top), r = Math.max(t.left, e.left), o = Math.min(t.left + t.width, e.left + e.width), i = Math.min(t.top + t.height, e.top + e.height), d = o - r, u = i - n;
|
|
887
|
+
if (r < o && n < i) {
|
|
888
|
+
const s = t.width * t.height, a = e.width * e.height, f = d * u, c = f / (s + a - f);
|
|
889
|
+
return Number(c.toFixed(4));
|
|
890
|
+
}
|
|
891
|
+
return 0;
|
|
892
|
+
}
|
|
893
|
+
const Ar = (e) => {
|
|
894
|
+
let {
|
|
895
|
+
collisionRect: t,
|
|
896
|
+
droppableRects: n,
|
|
897
|
+
droppableContainers: r
|
|
898
|
+
} = e;
|
|
899
|
+
const o = [];
|
|
900
|
+
for (const i of r) {
|
|
901
|
+
const {
|
|
902
|
+
id: d
|
|
903
|
+
} = i, u = n.get(d);
|
|
904
|
+
if (u) {
|
|
905
|
+
const s = Ir(u, t);
|
|
906
|
+
s > 0 && o.push({
|
|
907
|
+
id: d,
|
|
908
|
+
data: {
|
|
909
|
+
droppableContainer: i,
|
|
910
|
+
value: s
|
|
911
|
+
}
|
|
912
|
+
});
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
return o.sort(Er);
|
|
916
|
+
};
|
|
917
|
+
function Nr(e, t, n) {
|
|
918
|
+
return {
|
|
919
|
+
...e,
|
|
920
|
+
scaleX: t && n ? t.width / n.width : 1,
|
|
921
|
+
scaleY: t && n ? t.height / n.height : 1
|
|
922
|
+
};
|
|
923
|
+
}
|
|
924
|
+
function xn(e, t) {
|
|
925
|
+
return e && t ? {
|
|
926
|
+
x: e.left - t.left,
|
|
927
|
+
y: e.top - t.top
|
|
928
|
+
} : me;
|
|
929
|
+
}
|
|
930
|
+
function Lr(e) {
|
|
931
|
+
return function(n) {
|
|
932
|
+
for (var r = arguments.length, o = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++)
|
|
933
|
+
o[i - 1] = arguments[i];
|
|
934
|
+
return o.reduce((d, u) => ({
|
|
935
|
+
...d,
|
|
936
|
+
top: d.top + e * u.y,
|
|
937
|
+
bottom: d.bottom + e * u.y,
|
|
938
|
+
left: d.left + e * u.x,
|
|
939
|
+
right: d.right + e * u.x
|
|
940
|
+
}), {
|
|
941
|
+
...n
|
|
942
|
+
});
|
|
943
|
+
};
|
|
944
|
+
}
|
|
945
|
+
const Mr = /* @__PURE__ */ Lr(1);
|
|
946
|
+
function Dn(e) {
|
|
947
|
+
if (e.startsWith("matrix3d(")) {
|
|
948
|
+
const t = e.slice(9, -1).split(/, /);
|
|
949
|
+
return {
|
|
950
|
+
x: +t[12],
|
|
951
|
+
y: +t[13],
|
|
952
|
+
scaleX: +t[0],
|
|
953
|
+
scaleY: +t[5]
|
|
954
|
+
};
|
|
955
|
+
} else if (e.startsWith("matrix(")) {
|
|
956
|
+
const t = e.slice(7, -1).split(/, /);
|
|
957
|
+
return {
|
|
958
|
+
x: +t[4],
|
|
959
|
+
y: +t[5],
|
|
960
|
+
scaleX: +t[0],
|
|
961
|
+
scaleY: +t[3]
|
|
962
|
+
};
|
|
963
|
+
}
|
|
964
|
+
return null;
|
|
965
|
+
}
|
|
966
|
+
function Pr(e, t, n) {
|
|
967
|
+
const r = Dn(t);
|
|
968
|
+
if (!r)
|
|
969
|
+
return e;
|
|
970
|
+
const {
|
|
971
|
+
scaleX: o,
|
|
972
|
+
scaleY: i,
|
|
973
|
+
x: d,
|
|
974
|
+
y: u
|
|
975
|
+
} = r, s = e.left - d - (1 - o) * parseFloat(n), a = e.top - u - (1 - i) * parseFloat(n.slice(n.indexOf(" ") + 1)), f = o ? e.width / o : e.width, c = i ? e.height / i : e.height;
|
|
976
|
+
return {
|
|
977
|
+
width: f,
|
|
978
|
+
height: c,
|
|
979
|
+
top: a,
|
|
980
|
+
right: s + f,
|
|
981
|
+
bottom: a + c,
|
|
982
|
+
left: s
|
|
983
|
+
};
|
|
984
|
+
}
|
|
985
|
+
const kr = {
|
|
986
|
+
ignoreTransform: !1
|
|
987
|
+
};
|
|
988
|
+
function Xe(e, t) {
|
|
989
|
+
t === void 0 && (t = kr);
|
|
990
|
+
let n = e.getBoundingClientRect();
|
|
991
|
+
if (t.ignoreTransform) {
|
|
992
|
+
const {
|
|
993
|
+
transform: a,
|
|
994
|
+
transformOrigin: f
|
|
995
|
+
} = ne(e).getComputedStyle(e);
|
|
996
|
+
a && (n = Pr(n, a, f));
|
|
997
|
+
}
|
|
998
|
+
const {
|
|
999
|
+
top: r,
|
|
1000
|
+
left: o,
|
|
1001
|
+
width: i,
|
|
1002
|
+
height: d,
|
|
1003
|
+
bottom: u,
|
|
1004
|
+
right: s
|
|
1005
|
+
} = n;
|
|
1006
|
+
return {
|
|
1007
|
+
top: r,
|
|
1008
|
+
left: o,
|
|
1009
|
+
width: i,
|
|
1010
|
+
height: d,
|
|
1011
|
+
bottom: u,
|
|
1012
|
+
right: s
|
|
1013
|
+
};
|
|
1014
|
+
}
|
|
1015
|
+
function rn(e) {
|
|
1016
|
+
return Xe(e, {
|
|
1017
|
+
ignoreTransform: !0
|
|
1018
|
+
});
|
|
1019
|
+
}
|
|
1020
|
+
function zr(e) {
|
|
1021
|
+
const t = e.innerWidth, n = e.innerHeight;
|
|
1022
|
+
return {
|
|
1023
|
+
top: 0,
|
|
1024
|
+
left: 0,
|
|
1025
|
+
right: t,
|
|
1026
|
+
bottom: n,
|
|
1027
|
+
width: t,
|
|
1028
|
+
height: n
|
|
1029
|
+
};
|
|
1030
|
+
}
|
|
1031
|
+
function jr(e, t) {
|
|
1032
|
+
return t === void 0 && (t = ne(e).getComputedStyle(e)), t.position === "fixed";
|
|
1033
|
+
}
|
|
1034
|
+
function Br(e, t) {
|
|
1035
|
+
t === void 0 && (t = ne(e).getComputedStyle(e));
|
|
1036
|
+
const n = /(auto|scroll|overlay)/;
|
|
1037
|
+
return ["overflow", "overflowX", "overflowY"].some((o) => {
|
|
1038
|
+
const i = t[o];
|
|
1039
|
+
return typeof i == "string" ? n.test(i) : !1;
|
|
1040
|
+
});
|
|
1041
|
+
}
|
|
1042
|
+
function Ht(e, t) {
|
|
1043
|
+
const n = [];
|
|
1044
|
+
function r(o) {
|
|
1045
|
+
if (t != null && n.length >= t || !o)
|
|
1046
|
+
return n;
|
|
1047
|
+
if (Ft(o) && o.scrollingElement != null && !n.includes(o.scrollingElement))
|
|
1048
|
+
return n.push(o.scrollingElement), n;
|
|
1049
|
+
if (!ot(o) || mn(o) || n.includes(o))
|
|
1050
|
+
return n;
|
|
1051
|
+
const i = ne(e).getComputedStyle(o);
|
|
1052
|
+
return o !== e && Br(o, i) && n.push(o), jr(o, i) ? n : r(o.parentNode);
|
|
1053
|
+
}
|
|
1054
|
+
return e ? r(e) : n;
|
|
1055
|
+
}
|
|
1056
|
+
function Sn(e) {
|
|
1057
|
+
const [t] = Ht(e, 1);
|
|
1058
|
+
return t ?? null;
|
|
1059
|
+
}
|
|
1060
|
+
function At(e) {
|
|
1061
|
+
return !yt || !e ? null : We(e) ? e : $t(e) ? Ft(e) || e === Ye(e).scrollingElement ? window : ot(e) ? e : null : null;
|
|
1062
|
+
}
|
|
1063
|
+
function Cn(e) {
|
|
1064
|
+
return We(e) ? e.scrollX : e.scrollLeft;
|
|
1065
|
+
}
|
|
1066
|
+
function On(e) {
|
|
1067
|
+
return We(e) ? e.scrollY : e.scrollTop;
|
|
1068
|
+
}
|
|
1069
|
+
function kt(e) {
|
|
1070
|
+
return {
|
|
1071
|
+
x: Cn(e),
|
|
1072
|
+
y: On(e)
|
|
1073
|
+
};
|
|
1074
|
+
}
|
|
1075
|
+
var X;
|
|
1076
|
+
(function(e) {
|
|
1077
|
+
e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
|
|
1078
|
+
})(X || (X = {}));
|
|
1079
|
+
function Rn(e) {
|
|
1080
|
+
return !yt || !e ? !1 : e === document.scrollingElement;
|
|
1081
|
+
}
|
|
1082
|
+
function En(e) {
|
|
1083
|
+
const t = {
|
|
1084
|
+
x: 0,
|
|
1085
|
+
y: 0
|
|
1086
|
+
}, n = Rn(e) ? {
|
|
1087
|
+
height: window.innerHeight,
|
|
1088
|
+
width: window.innerWidth
|
|
1089
|
+
} : {
|
|
1090
|
+
height: e.clientHeight,
|
|
1091
|
+
width: e.clientWidth
|
|
1092
|
+
}, r = {
|
|
1093
|
+
x: e.scrollWidth - n.width,
|
|
1094
|
+
y: e.scrollHeight - n.height
|
|
1095
|
+
}, o = e.scrollTop <= t.y, i = e.scrollLeft <= t.x, d = e.scrollTop >= r.y, u = e.scrollLeft >= r.x;
|
|
1096
|
+
return {
|
|
1097
|
+
isTop: o,
|
|
1098
|
+
isLeft: i,
|
|
1099
|
+
isBottom: d,
|
|
1100
|
+
isRight: u,
|
|
1101
|
+
maxScroll: r,
|
|
1102
|
+
minScroll: t
|
|
1103
|
+
};
|
|
1104
|
+
}
|
|
1105
|
+
const $r = {
|
|
1106
|
+
x: 0.2,
|
|
1107
|
+
y: 0.2
|
|
1108
|
+
};
|
|
1109
|
+
function Fr(e, t, n, r, o) {
|
|
1110
|
+
let {
|
|
1111
|
+
top: i,
|
|
1112
|
+
left: d,
|
|
1113
|
+
right: u,
|
|
1114
|
+
bottom: s
|
|
1115
|
+
} = n;
|
|
1116
|
+
r === void 0 && (r = 10), o === void 0 && (o = $r);
|
|
1117
|
+
const {
|
|
1118
|
+
isTop: a,
|
|
1119
|
+
isBottom: f,
|
|
1120
|
+
isLeft: c,
|
|
1121
|
+
isRight: l
|
|
1122
|
+
} = En(e), g = {
|
|
1123
|
+
x: 0,
|
|
1124
|
+
y: 0
|
|
1125
|
+
}, b = {
|
|
1126
|
+
x: 0,
|
|
1127
|
+
y: 0
|
|
1128
|
+
}, p = {
|
|
1129
|
+
height: t.height * o.y,
|
|
1130
|
+
width: t.width * o.x
|
|
1131
|
+
};
|
|
1132
|
+
return !a && i <= t.top + p.height ? (g.y = X.Backward, b.y = r * Math.abs((t.top + p.height - i) / p.height)) : !f && s >= t.bottom - p.height && (g.y = X.Forward, b.y = r * Math.abs((t.bottom - p.height - s) / p.height)), !l && u >= t.right - p.width ? (g.x = X.Forward, b.x = r * Math.abs((t.right - p.width - u) / p.width)) : !c && d <= t.left + p.width && (g.x = X.Backward, b.x = r * Math.abs((t.left + p.width - d) / p.width)), {
|
|
1133
|
+
direction: g,
|
|
1134
|
+
speed: b
|
|
1135
|
+
};
|
|
1136
|
+
}
|
|
1137
|
+
function Hr(e) {
|
|
1138
|
+
if (e === document.scrollingElement) {
|
|
1139
|
+
const {
|
|
1140
|
+
innerWidth: i,
|
|
1141
|
+
innerHeight: d
|
|
1142
|
+
} = window;
|
|
1143
|
+
return {
|
|
1144
|
+
top: 0,
|
|
1145
|
+
left: 0,
|
|
1146
|
+
right: i,
|
|
1147
|
+
bottom: d,
|
|
1148
|
+
width: i,
|
|
1149
|
+
height: d
|
|
1150
|
+
};
|
|
1151
|
+
}
|
|
1152
|
+
const {
|
|
1153
|
+
top: t,
|
|
1154
|
+
left: n,
|
|
1155
|
+
right: r,
|
|
1156
|
+
bottom: o
|
|
1157
|
+
} = e.getBoundingClientRect();
|
|
1158
|
+
return {
|
|
1159
|
+
top: t,
|
|
1160
|
+
left: n,
|
|
1161
|
+
right: r,
|
|
1162
|
+
bottom: o,
|
|
1163
|
+
width: e.clientWidth,
|
|
1164
|
+
height: e.clientHeight
|
|
1165
|
+
};
|
|
1166
|
+
}
|
|
1167
|
+
function Tn(e) {
|
|
1168
|
+
return e.reduce((t, n) => Ue(t, kt(n)), me);
|
|
1169
|
+
}
|
|
1170
|
+
function Ur(e) {
|
|
1171
|
+
return e.reduce((t, n) => t + Cn(n), 0);
|
|
1172
|
+
}
|
|
1173
|
+
function Wr(e) {
|
|
1174
|
+
return e.reduce((t, n) => t + On(n), 0);
|
|
1175
|
+
}
|
|
1176
|
+
function _n(e, t) {
|
|
1177
|
+
if (t === void 0 && (t = Xe), !e)
|
|
1178
|
+
return;
|
|
1179
|
+
const {
|
|
1180
|
+
top: n,
|
|
1181
|
+
left: r,
|
|
1182
|
+
bottom: o,
|
|
1183
|
+
right: i
|
|
1184
|
+
} = t(e);
|
|
1185
|
+
Sn(e) && (o <= 0 || i <= 0 || n >= window.innerHeight || r >= window.innerWidth) && e.scrollIntoView({
|
|
1186
|
+
block: "center",
|
|
1187
|
+
inline: "center"
|
|
1188
|
+
});
|
|
1189
|
+
}
|
|
1190
|
+
const Yr = [["x", ["left", "right"], Ur], ["y", ["top", "bottom"], Wr]];
|
|
1191
|
+
class Ut {
|
|
1192
|
+
constructor(t, n) {
|
|
1193
|
+
this.rect = void 0, this.width = void 0, this.height = void 0, this.top = void 0, this.bottom = void 0, this.right = void 0, this.left = void 0;
|
|
1194
|
+
const r = Ht(n), o = Tn(r);
|
|
1195
|
+
this.rect = {
|
|
1196
|
+
...t
|
|
1197
|
+
}, this.width = t.width, this.height = t.height;
|
|
1198
|
+
for (const [i, d, u] of Yr)
|
|
1199
|
+
for (const s of d)
|
|
1200
|
+
Object.defineProperty(this, s, {
|
|
1201
|
+
get: () => {
|
|
1202
|
+
const a = u(r), f = o[i] - a;
|
|
1203
|
+
return this.rect[s] + f;
|
|
1204
|
+
},
|
|
1205
|
+
enumerable: !0
|
|
1206
|
+
});
|
|
1207
|
+
Object.defineProperty(this, "rect", {
|
|
1208
|
+
enumerable: !1
|
|
1209
|
+
});
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
class Je {
|
|
1213
|
+
constructor(t) {
|
|
1214
|
+
this.target = void 0, this.listeners = [], this.removeAll = () => {
|
|
1215
|
+
this.listeners.forEach((n) => {
|
|
1216
|
+
var r;
|
|
1217
|
+
return (r = this.target) == null ? void 0 : r.removeEventListener(...n);
|
|
1218
|
+
});
|
|
1219
|
+
}, this.target = t;
|
|
1220
|
+
}
|
|
1221
|
+
add(t, n, r) {
|
|
1222
|
+
var o;
|
|
1223
|
+
(o = this.target) == null || o.addEventListener(t, n, r), this.listeners.push([t, n, r]);
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
function Xr(e) {
|
|
1227
|
+
const {
|
|
1228
|
+
EventTarget: t
|
|
1229
|
+
} = ne(e);
|
|
1230
|
+
return e instanceof t ? e : Ye(e);
|
|
1231
|
+
}
|
|
1232
|
+
function Nt(e, t) {
|
|
1233
|
+
const n = Math.abs(e.x), r = Math.abs(e.y);
|
|
1234
|
+
return typeof t == "number" ? Math.sqrt(n ** 2 + r ** 2) > t : "x" in t && "y" in t ? n > t.x && r > t.y : "x" in t ? n > t.x : "y" in t ? r > t.y : !1;
|
|
1235
|
+
}
|
|
1236
|
+
var ge;
|
|
1237
|
+
(function(e) {
|
|
1238
|
+
e.Click = "click", e.DragStart = "dragstart", e.Keydown = "keydown", e.ContextMenu = "contextmenu", e.Resize = "resize", e.SelectionChange = "selectionchange", e.VisibilityChange = "visibilitychange";
|
|
1239
|
+
})(ge || (ge = {}));
|
|
1240
|
+
function on(e) {
|
|
1241
|
+
e.preventDefault();
|
|
1242
|
+
}
|
|
1243
|
+
function Kr(e) {
|
|
1244
|
+
e.stopPropagation();
|
|
1245
|
+
}
|
|
1246
|
+
var k;
|
|
1247
|
+
(function(e) {
|
|
1248
|
+
e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter", e.Tab = "Tab";
|
|
1249
|
+
})(k || (k = {}));
|
|
1250
|
+
const In = {
|
|
1251
|
+
start: [k.Space, k.Enter],
|
|
1252
|
+
cancel: [k.Esc],
|
|
1253
|
+
end: [k.Space, k.Enter, k.Tab]
|
|
1254
|
+
}, Gr = (e, t) => {
|
|
1255
|
+
let {
|
|
1256
|
+
currentCoordinates: n
|
|
1257
|
+
} = t;
|
|
1258
|
+
switch (e.code) {
|
|
1259
|
+
case k.Right:
|
|
1260
|
+
return {
|
|
1261
|
+
...n,
|
|
1262
|
+
x: n.x + 25
|
|
1263
|
+
};
|
|
1264
|
+
case k.Left:
|
|
1265
|
+
return {
|
|
1266
|
+
...n,
|
|
1267
|
+
x: n.x - 25
|
|
1268
|
+
};
|
|
1269
|
+
case k.Down:
|
|
1270
|
+
return {
|
|
1271
|
+
...n,
|
|
1272
|
+
y: n.y + 25
|
|
1273
|
+
};
|
|
1274
|
+
case k.Up:
|
|
1275
|
+
return {
|
|
1276
|
+
...n,
|
|
1277
|
+
y: n.y - 25
|
|
1278
|
+
};
|
|
1279
|
+
}
|
|
1280
|
+
};
|
|
1281
|
+
class An {
|
|
1282
|
+
constructor(t) {
|
|
1283
|
+
this.props = void 0, this.autoScrollEnabled = !1, this.referenceCoordinates = void 0, this.listeners = void 0, this.windowListeners = void 0, this.props = t;
|
|
1284
|
+
const {
|
|
1285
|
+
event: {
|
|
1286
|
+
target: n
|
|
1287
|
+
}
|
|
1288
|
+
} = t;
|
|
1289
|
+
this.props = t, this.listeners = new Je(Ye(n)), this.windowListeners = new Je(ne(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
|
|
1290
|
+
}
|
|
1291
|
+
attach() {
|
|
1292
|
+
this.handleStart(), this.windowListeners.add(ge.Resize, this.handleCancel), this.windowListeners.add(ge.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(ge.Keydown, this.handleKeyDown));
|
|
1293
|
+
}
|
|
1294
|
+
handleStart() {
|
|
1295
|
+
const {
|
|
1296
|
+
activeNode: t,
|
|
1297
|
+
onStart: n
|
|
1298
|
+
} = this.props, r = t.node.current;
|
|
1299
|
+
r && _n(r), n(me);
|
|
1300
|
+
}
|
|
1301
|
+
handleKeyDown(t) {
|
|
1302
|
+
if (xt(t)) {
|
|
1303
|
+
const {
|
|
1304
|
+
active: n,
|
|
1305
|
+
context: r,
|
|
1306
|
+
options: o
|
|
1307
|
+
} = this.props, {
|
|
1308
|
+
keyboardCodes: i = In,
|
|
1309
|
+
coordinateGetter: d = Gr,
|
|
1310
|
+
scrollBehavior: u = "smooth"
|
|
1311
|
+
} = o, {
|
|
1312
|
+
code: s
|
|
1313
|
+
} = t;
|
|
1314
|
+
if (i.end.includes(s)) {
|
|
1315
|
+
this.handleEnd(t);
|
|
1316
|
+
return;
|
|
1317
|
+
}
|
|
1318
|
+
if (i.cancel.includes(s)) {
|
|
1319
|
+
this.handleCancel(t);
|
|
1320
|
+
return;
|
|
1321
|
+
}
|
|
1322
|
+
const {
|
|
1323
|
+
collisionRect: a
|
|
1324
|
+
} = r.current, f = a ? {
|
|
1325
|
+
x: a.left,
|
|
1326
|
+
y: a.top
|
|
1327
|
+
} : me;
|
|
1328
|
+
this.referenceCoordinates || (this.referenceCoordinates = f);
|
|
1329
|
+
const c = d(t, {
|
|
1330
|
+
active: n,
|
|
1331
|
+
context: r.current,
|
|
1332
|
+
currentCoordinates: f
|
|
1333
|
+
});
|
|
1334
|
+
if (c) {
|
|
1335
|
+
const l = vt(c, f), g = {
|
|
1336
|
+
x: 0,
|
|
1337
|
+
y: 0
|
|
1338
|
+
}, {
|
|
1339
|
+
scrollableAncestors: b
|
|
1340
|
+
} = r.current;
|
|
1341
|
+
for (const p of b) {
|
|
1342
|
+
const h = t.code, {
|
|
1343
|
+
isTop: S,
|
|
1344
|
+
isRight: w,
|
|
1345
|
+
isLeft: x,
|
|
1346
|
+
isBottom: C,
|
|
1347
|
+
maxScroll: D,
|
|
1348
|
+
minScroll: R
|
|
1349
|
+
} = En(p), O = Hr(p), m = {
|
|
1350
|
+
x: Math.min(h === k.Right ? O.right - O.width / 2 : O.right, Math.max(h === k.Right ? O.left : O.left + O.width / 2, c.x)),
|
|
1351
|
+
y: Math.min(h === k.Down ? O.bottom - O.height / 2 : O.bottom, Math.max(h === k.Down ? O.top : O.top + O.height / 2, c.y))
|
|
1352
|
+
}, P = h === k.Right && !w || h === k.Left && !x, N = h === k.Down && !C || h === k.Up && !S;
|
|
1353
|
+
if (P && m.x !== c.x) {
|
|
1354
|
+
const E = p.scrollLeft + l.x, M = h === k.Right && E <= D.x || h === k.Left && E >= R.x;
|
|
1355
|
+
if (M && !l.y) {
|
|
1356
|
+
p.scrollTo({
|
|
1357
|
+
left: E,
|
|
1358
|
+
behavior: u
|
|
1359
|
+
});
|
|
1360
|
+
return;
|
|
1361
|
+
}
|
|
1362
|
+
M ? g.x = p.scrollLeft - E : g.x = h === k.Right ? p.scrollLeft - D.x : p.scrollLeft - R.x, g.x && p.scrollBy({
|
|
1363
|
+
left: -g.x,
|
|
1364
|
+
behavior: u
|
|
1365
|
+
});
|
|
1366
|
+
break;
|
|
1367
|
+
} else if (N && m.y !== c.y) {
|
|
1368
|
+
const E = p.scrollTop + l.y, M = h === k.Down && E <= D.y || h === k.Up && E >= R.y;
|
|
1369
|
+
if (M && !l.x) {
|
|
1370
|
+
p.scrollTo({
|
|
1371
|
+
top: E,
|
|
1372
|
+
behavior: u
|
|
1373
|
+
});
|
|
1374
|
+
return;
|
|
1375
|
+
}
|
|
1376
|
+
M ? g.y = p.scrollTop - E : g.y = h === k.Down ? p.scrollTop - D.y : p.scrollTop - R.y, g.y && p.scrollBy({
|
|
1377
|
+
top: -g.y,
|
|
1378
|
+
behavior: u
|
|
1379
|
+
});
|
|
1380
|
+
break;
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
this.handleMove(t, Ue(vt(c, this.referenceCoordinates), g));
|
|
1384
|
+
}
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
handleMove(t, n) {
|
|
1388
|
+
const {
|
|
1389
|
+
onMove: r
|
|
1390
|
+
} = this.props;
|
|
1391
|
+
t.preventDefault(), r(n);
|
|
1392
|
+
}
|
|
1393
|
+
handleEnd(t) {
|
|
1394
|
+
const {
|
|
1395
|
+
onEnd: n
|
|
1396
|
+
} = this.props;
|
|
1397
|
+
t.preventDefault(), this.detach(), n();
|
|
1398
|
+
}
|
|
1399
|
+
handleCancel(t) {
|
|
1400
|
+
const {
|
|
1401
|
+
onCancel: n
|
|
1402
|
+
} = this.props;
|
|
1403
|
+
t.preventDefault(), this.detach(), n();
|
|
1404
|
+
}
|
|
1405
|
+
detach() {
|
|
1406
|
+
this.listeners.removeAll(), this.windowListeners.removeAll();
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
An.activators = [{
|
|
1410
|
+
eventName: "onKeyDown",
|
|
1411
|
+
handler: (e, t, n) => {
|
|
1412
|
+
let {
|
|
1413
|
+
keyboardCodes: r = In,
|
|
1414
|
+
onActivation: o
|
|
1415
|
+
} = t, {
|
|
1416
|
+
active: i
|
|
1417
|
+
} = n;
|
|
1418
|
+
const {
|
|
1419
|
+
code: d
|
|
1420
|
+
} = e.nativeEvent;
|
|
1421
|
+
if (r.start.includes(d)) {
|
|
1422
|
+
const u = i.activatorNode.current;
|
|
1423
|
+
return u && e.target !== u ? !1 : (e.preventDefault(), o == null || o({
|
|
1424
|
+
event: e.nativeEvent
|
|
1425
|
+
}), !0);
|
|
1426
|
+
}
|
|
1427
|
+
return !1;
|
|
1428
|
+
}
|
|
1429
|
+
}];
|
|
1430
|
+
function an(e) {
|
|
1431
|
+
return !!(e && "distance" in e);
|
|
1432
|
+
}
|
|
1433
|
+
function sn(e) {
|
|
1434
|
+
return !!(e && "delay" in e);
|
|
1435
|
+
}
|
|
1436
|
+
class Wt {
|
|
1437
|
+
constructor(t, n, r) {
|
|
1438
|
+
var o;
|
|
1439
|
+
r === void 0 && (r = Xr(t.event.target)), this.props = void 0, this.events = void 0, this.autoScrollEnabled = !0, this.document = void 0, this.activated = !1, this.initialCoordinates = void 0, this.timeoutId = null, this.listeners = void 0, this.documentListeners = void 0, this.windowListeners = void 0, this.props = t, this.events = n;
|
|
1440
|
+
const {
|
|
1441
|
+
event: i
|
|
1442
|
+
} = t, {
|
|
1443
|
+
target: d
|
|
1444
|
+
} = i;
|
|
1445
|
+
this.props = t, this.events = n, this.document = Ye(d), this.documentListeners = new Je(this.document), this.listeners = new Je(r), this.windowListeners = new Je(ne(d)), this.initialCoordinates = (o = ht(i)) != null ? o : me, this.handleStart = this.handleStart.bind(this), this.handleMove = this.handleMove.bind(this), this.handleEnd = this.handleEnd.bind(this), this.handleCancel = this.handleCancel.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.removeTextSelection = this.removeTextSelection.bind(this), this.attach();
|
|
1446
|
+
}
|
|
1447
|
+
attach() {
|
|
1448
|
+
const {
|
|
1449
|
+
events: t,
|
|
1450
|
+
props: {
|
|
1451
|
+
options: {
|
|
1452
|
+
activationConstraint: n,
|
|
1453
|
+
bypassActivationConstraint: r
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
} = this;
|
|
1457
|
+
if (this.listeners.add(t.move.name, this.handleMove, {
|
|
1458
|
+
passive: !1
|
|
1459
|
+
}), this.listeners.add(t.end.name, this.handleEnd), t.cancel && this.listeners.add(t.cancel.name, this.handleCancel), this.windowListeners.add(ge.Resize, this.handleCancel), this.windowListeners.add(ge.DragStart, on), this.windowListeners.add(ge.VisibilityChange, this.handleCancel), this.windowListeners.add(ge.ContextMenu, on), this.documentListeners.add(ge.Keydown, this.handleKeydown), n) {
|
|
1460
|
+
if (r != null && r({
|
|
1461
|
+
event: this.props.event,
|
|
1462
|
+
activeNode: this.props.activeNode,
|
|
1463
|
+
options: this.props.options
|
|
1464
|
+
}))
|
|
1465
|
+
return this.handleStart();
|
|
1466
|
+
if (sn(n)) {
|
|
1467
|
+
this.timeoutId = setTimeout(this.handleStart, n.delay), this.handlePending(n);
|
|
1468
|
+
return;
|
|
1469
|
+
}
|
|
1470
|
+
if (an(n)) {
|
|
1471
|
+
this.handlePending(n);
|
|
1472
|
+
return;
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
this.handleStart();
|
|
1476
|
+
}
|
|
1477
|
+
detach() {
|
|
1478
|
+
this.listeners.removeAll(), this.windowListeners.removeAll(), setTimeout(this.documentListeners.removeAll, 50), this.timeoutId !== null && (clearTimeout(this.timeoutId), this.timeoutId = null);
|
|
1479
|
+
}
|
|
1480
|
+
handlePending(t, n) {
|
|
1481
|
+
const {
|
|
1482
|
+
active: r,
|
|
1483
|
+
onPending: o
|
|
1484
|
+
} = this.props;
|
|
1485
|
+
o(r, t, this.initialCoordinates, n);
|
|
1486
|
+
}
|
|
1487
|
+
handleStart() {
|
|
1488
|
+
const {
|
|
1489
|
+
initialCoordinates: t
|
|
1490
|
+
} = this, {
|
|
1491
|
+
onStart: n
|
|
1492
|
+
} = this.props;
|
|
1493
|
+
t && (this.activated = !0, this.documentListeners.add(ge.Click, Kr, {
|
|
1494
|
+
capture: !0
|
|
1495
|
+
}), this.removeTextSelection(), this.documentListeners.add(ge.SelectionChange, this.removeTextSelection), n(t));
|
|
1496
|
+
}
|
|
1497
|
+
handleMove(t) {
|
|
1498
|
+
var n;
|
|
1499
|
+
const {
|
|
1500
|
+
activated: r,
|
|
1501
|
+
initialCoordinates: o,
|
|
1502
|
+
props: i
|
|
1503
|
+
} = this, {
|
|
1504
|
+
onMove: d,
|
|
1505
|
+
options: {
|
|
1506
|
+
activationConstraint: u
|
|
1507
|
+
}
|
|
1508
|
+
} = i;
|
|
1509
|
+
if (!o)
|
|
1510
|
+
return;
|
|
1511
|
+
const s = (n = ht(t)) != null ? n : me, a = vt(o, s);
|
|
1512
|
+
if (!r && u) {
|
|
1513
|
+
if (an(u)) {
|
|
1514
|
+
if (u.tolerance != null && Nt(a, u.tolerance))
|
|
1515
|
+
return this.handleCancel();
|
|
1516
|
+
if (Nt(a, u.distance))
|
|
1517
|
+
return this.handleStart();
|
|
1518
|
+
}
|
|
1519
|
+
if (sn(u) && Nt(a, u.tolerance))
|
|
1520
|
+
return this.handleCancel();
|
|
1521
|
+
this.handlePending(u, a);
|
|
1522
|
+
return;
|
|
1523
|
+
}
|
|
1524
|
+
t.cancelable && t.preventDefault(), d(s);
|
|
1525
|
+
}
|
|
1526
|
+
handleEnd() {
|
|
1527
|
+
const {
|
|
1528
|
+
onAbort: t,
|
|
1529
|
+
onEnd: n
|
|
1530
|
+
} = this.props;
|
|
1531
|
+
this.detach(), this.activated || t(this.props.active), n();
|
|
1532
|
+
}
|
|
1533
|
+
handleCancel() {
|
|
1534
|
+
const {
|
|
1535
|
+
onAbort: t,
|
|
1536
|
+
onCancel: n
|
|
1537
|
+
} = this.props;
|
|
1538
|
+
this.detach(), this.activated || t(this.props.active), n();
|
|
1539
|
+
}
|
|
1540
|
+
handleKeydown(t) {
|
|
1541
|
+
t.code === k.Esc && this.handleCancel();
|
|
1542
|
+
}
|
|
1543
|
+
removeTextSelection() {
|
|
1544
|
+
var t;
|
|
1545
|
+
(t = this.document.getSelection()) == null || t.removeAllRanges();
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1548
|
+
const Vr = {
|
|
1549
|
+
cancel: {
|
|
1550
|
+
name: "pointercancel"
|
|
1551
|
+
},
|
|
1552
|
+
move: {
|
|
1553
|
+
name: "pointermove"
|
|
1554
|
+
},
|
|
1555
|
+
end: {
|
|
1556
|
+
name: "pointerup"
|
|
1557
|
+
}
|
|
1558
|
+
};
|
|
1559
|
+
class Yt extends Wt {
|
|
1560
|
+
constructor(t) {
|
|
1561
|
+
const {
|
|
1562
|
+
event: n
|
|
1563
|
+
} = t, r = Ye(n.target);
|
|
1564
|
+
super(t, Vr, r);
|
|
1565
|
+
}
|
|
1566
|
+
}
|
|
1567
|
+
Yt.activators = [{
|
|
1568
|
+
eventName: "onPointerDown",
|
|
1569
|
+
handler: (e, t) => {
|
|
1570
|
+
let {
|
|
1571
|
+
nativeEvent: n
|
|
1572
|
+
} = e, {
|
|
1573
|
+
onActivation: r
|
|
1574
|
+
} = t;
|
|
1575
|
+
return !n.isPrimary || n.button !== 0 ? !1 : (r == null || r({
|
|
1576
|
+
event: n
|
|
1577
|
+
}), !0);
|
|
1578
|
+
}
|
|
1579
|
+
}];
|
|
1580
|
+
const qr = {
|
|
1581
|
+
move: {
|
|
1582
|
+
name: "mousemove"
|
|
1583
|
+
},
|
|
1584
|
+
end: {
|
|
1585
|
+
name: "mouseup"
|
|
1586
|
+
}
|
|
1587
|
+
};
|
|
1588
|
+
var zt;
|
|
1589
|
+
(function(e) {
|
|
1590
|
+
e[e.RightClick = 2] = "RightClick";
|
|
1591
|
+
})(zt || (zt = {}));
|
|
1592
|
+
class Jr extends Wt {
|
|
1593
|
+
constructor(t) {
|
|
1594
|
+
super(t, qr, Ye(t.event.target));
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
Jr.activators = [{
|
|
1598
|
+
eventName: "onMouseDown",
|
|
1599
|
+
handler: (e, t) => {
|
|
1600
|
+
let {
|
|
1601
|
+
nativeEvent: n
|
|
1602
|
+
} = e, {
|
|
1603
|
+
onActivation: r
|
|
1604
|
+
} = t;
|
|
1605
|
+
return n.button === zt.RightClick ? !1 : (r == null || r({
|
|
1606
|
+
event: n
|
|
1607
|
+
}), !0);
|
|
1608
|
+
}
|
|
1609
|
+
}];
|
|
1610
|
+
const Lt = {
|
|
1611
|
+
cancel: {
|
|
1612
|
+
name: "touchcancel"
|
|
1613
|
+
},
|
|
1614
|
+
move: {
|
|
1615
|
+
name: "touchmove"
|
|
1616
|
+
},
|
|
1617
|
+
end: {
|
|
1618
|
+
name: "touchend"
|
|
1619
|
+
}
|
|
1620
|
+
};
|
|
1621
|
+
class Zr extends Wt {
|
|
1622
|
+
constructor(t) {
|
|
1623
|
+
super(t, Lt);
|
|
1624
|
+
}
|
|
1625
|
+
static setup() {
|
|
1626
|
+
return window.addEventListener(Lt.move.name, t, {
|
|
1627
|
+
capture: !1,
|
|
1628
|
+
passive: !1
|
|
1629
|
+
}), function() {
|
|
1630
|
+
window.removeEventListener(Lt.move.name, t);
|
|
1631
|
+
};
|
|
1632
|
+
function t() {
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
}
|
|
1636
|
+
Zr.activators = [{
|
|
1637
|
+
eventName: "onTouchStart",
|
|
1638
|
+
handler: (e, t) => {
|
|
1639
|
+
let {
|
|
1640
|
+
nativeEvent: n
|
|
1641
|
+
} = e, {
|
|
1642
|
+
onActivation: r
|
|
1643
|
+
} = t;
|
|
1644
|
+
const {
|
|
1645
|
+
touches: o
|
|
1646
|
+
} = n;
|
|
1647
|
+
return o.length > 1 ? !1 : (r == null || r({
|
|
1648
|
+
event: n
|
|
1649
|
+
}), !0);
|
|
1650
|
+
}
|
|
1651
|
+
}];
|
|
1652
|
+
var Ze;
|
|
1653
|
+
(function(e) {
|
|
1654
|
+
e[e.Pointer = 0] = "Pointer", e[e.DraggableRect = 1] = "DraggableRect";
|
|
1655
|
+
})(Ze || (Ze = {}));
|
|
1656
|
+
var bt;
|
|
1657
|
+
(function(e) {
|
|
1658
|
+
e[e.TreeOrder = 0] = "TreeOrder", e[e.ReversedTreeOrder = 1] = "ReversedTreeOrder";
|
|
1659
|
+
})(bt || (bt = {}));
|
|
1660
|
+
function Qr(e) {
|
|
1661
|
+
let {
|
|
1662
|
+
acceleration: t,
|
|
1663
|
+
activator: n = Ze.Pointer,
|
|
1664
|
+
canScroll: r,
|
|
1665
|
+
draggingRect: o,
|
|
1666
|
+
enabled: i,
|
|
1667
|
+
interval: d = 5,
|
|
1668
|
+
order: u = bt.TreeOrder,
|
|
1669
|
+
pointerCoordinates: s,
|
|
1670
|
+
scrollableAncestors: a,
|
|
1671
|
+
scrollableAncestorRects: f,
|
|
1672
|
+
delta: c,
|
|
1673
|
+
threshold: l
|
|
1674
|
+
} = e;
|
|
1675
|
+
const g = to({
|
|
1676
|
+
delta: c,
|
|
1677
|
+
disabled: !i
|
|
1678
|
+
}), [b, p] = cr(), h = z({
|
|
1679
|
+
x: 0,
|
|
1680
|
+
y: 0
|
|
1681
|
+
}), S = z({
|
|
1682
|
+
x: 0,
|
|
1683
|
+
y: 0
|
|
1684
|
+
}), w = L(() => {
|
|
1685
|
+
switch (n) {
|
|
1686
|
+
case Ze.Pointer:
|
|
1687
|
+
return s ? {
|
|
1688
|
+
top: s.y,
|
|
1689
|
+
bottom: s.y,
|
|
1690
|
+
left: s.x,
|
|
1691
|
+
right: s.x
|
|
1692
|
+
} : null;
|
|
1693
|
+
case Ze.DraggableRect:
|
|
1694
|
+
return o;
|
|
1695
|
+
}
|
|
1696
|
+
}, [n, o, s]), x = z(null), C = U(() => {
|
|
1697
|
+
const R = x.current;
|
|
1698
|
+
if (!R)
|
|
1699
|
+
return;
|
|
1700
|
+
const O = h.current.x * S.current.x, m = h.current.y * S.current.y;
|
|
1701
|
+
R.scrollBy(O, m);
|
|
1702
|
+
}, []), D = L(() => u === bt.TreeOrder ? [...a].reverse() : a, [u, a]);
|
|
1703
|
+
j(
|
|
1704
|
+
() => {
|
|
1705
|
+
if (!i || !a.length || !w) {
|
|
1706
|
+
p();
|
|
1707
|
+
return;
|
|
1708
|
+
}
|
|
1709
|
+
for (const R of D) {
|
|
1710
|
+
if ((r == null ? void 0 : r(R)) === !1)
|
|
1711
|
+
continue;
|
|
1712
|
+
const O = a.indexOf(R), m = f[O];
|
|
1713
|
+
if (!m)
|
|
1714
|
+
continue;
|
|
1715
|
+
const {
|
|
1716
|
+
direction: P,
|
|
1717
|
+
speed: N
|
|
1718
|
+
} = Fr(R, m, w, t, l);
|
|
1719
|
+
for (const E of ["x", "y"])
|
|
1720
|
+
g[E][P[E]] || (N[E] = 0, P[E] = 0);
|
|
1721
|
+
if (N.x > 0 || N.y > 0) {
|
|
1722
|
+
p(), x.current = R, b(C, d), h.current = N, S.current = P;
|
|
1723
|
+
return;
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
h.current = {
|
|
1727
|
+
x: 0,
|
|
1728
|
+
y: 0
|
|
1729
|
+
}, S.current = {
|
|
1730
|
+
x: 0,
|
|
1731
|
+
y: 0
|
|
1732
|
+
}, p();
|
|
1733
|
+
},
|
|
1734
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1735
|
+
[
|
|
1736
|
+
t,
|
|
1737
|
+
C,
|
|
1738
|
+
r,
|
|
1739
|
+
p,
|
|
1740
|
+
i,
|
|
1741
|
+
d,
|
|
1742
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1743
|
+
JSON.stringify(w),
|
|
1744
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1745
|
+
JSON.stringify(g),
|
|
1746
|
+
b,
|
|
1747
|
+
a,
|
|
1748
|
+
D,
|
|
1749
|
+
f,
|
|
1750
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1751
|
+
JSON.stringify(l)
|
|
1752
|
+
]
|
|
1753
|
+
);
|
|
1754
|
+
}
|
|
1755
|
+
const eo = {
|
|
1756
|
+
x: {
|
|
1757
|
+
[X.Backward]: !1,
|
|
1758
|
+
[X.Forward]: !1
|
|
1759
|
+
},
|
|
1760
|
+
y: {
|
|
1761
|
+
[X.Backward]: !1,
|
|
1762
|
+
[X.Forward]: !1
|
|
1763
|
+
}
|
|
1764
|
+
};
|
|
1765
|
+
function to(e) {
|
|
1766
|
+
let {
|
|
1767
|
+
delta: t,
|
|
1768
|
+
disabled: n
|
|
1769
|
+
} = e;
|
|
1770
|
+
const r = gt(t);
|
|
1771
|
+
return it((o) => {
|
|
1772
|
+
if (n || !r || !o)
|
|
1773
|
+
return eo;
|
|
1774
|
+
const i = {
|
|
1775
|
+
x: Math.sign(t.x - r.x),
|
|
1776
|
+
y: Math.sign(t.y - r.y)
|
|
1777
|
+
};
|
|
1778
|
+
return {
|
|
1779
|
+
x: {
|
|
1780
|
+
[X.Backward]: o.x[X.Backward] || i.x === -1,
|
|
1781
|
+
[X.Forward]: o.x[X.Forward] || i.x === 1
|
|
1782
|
+
},
|
|
1783
|
+
y: {
|
|
1784
|
+
[X.Backward]: o.y[X.Backward] || i.y === -1,
|
|
1785
|
+
[X.Forward]: o.y[X.Forward] || i.y === 1
|
|
1786
|
+
}
|
|
1787
|
+
};
|
|
1788
|
+
}, [n, t, r]);
|
|
1789
|
+
}
|
|
1790
|
+
function no(e, t) {
|
|
1791
|
+
const n = t != null ? e.get(t) : void 0, r = n ? n.node.current : null;
|
|
1792
|
+
return it((o) => {
|
|
1793
|
+
var i;
|
|
1794
|
+
return t == null ? null : (i = r ?? o) != null ? i : null;
|
|
1795
|
+
}, [r, t]);
|
|
1796
|
+
}
|
|
1797
|
+
function ro(e, t) {
|
|
1798
|
+
return L(() => e.reduce((n, r) => {
|
|
1799
|
+
const {
|
|
1800
|
+
sensor: o
|
|
1801
|
+
} = r, i = o.activators.map((d) => ({
|
|
1802
|
+
eventName: d.eventName,
|
|
1803
|
+
handler: t(d.handler, r)
|
|
1804
|
+
}));
|
|
1805
|
+
return [...n, ...i];
|
|
1806
|
+
}, []), [e, t]);
|
|
1807
|
+
}
|
|
1808
|
+
var tt;
|
|
1809
|
+
(function(e) {
|
|
1810
|
+
e[e.Always = 0] = "Always", e[e.BeforeDragging = 1] = "BeforeDragging", e[e.WhileDragging = 2] = "WhileDragging";
|
|
1811
|
+
})(tt || (tt = {}));
|
|
1812
|
+
var jt;
|
|
1813
|
+
(function(e) {
|
|
1814
|
+
e.Optimized = "optimized";
|
|
1815
|
+
})(jt || (jt = {}));
|
|
1816
|
+
const ln = /* @__PURE__ */ new Map();
|
|
1817
|
+
function oo(e, t) {
|
|
1818
|
+
let {
|
|
1819
|
+
dragging: n,
|
|
1820
|
+
dependencies: r,
|
|
1821
|
+
config: o
|
|
1822
|
+
} = t;
|
|
1823
|
+
const [i, d] = H(null), {
|
|
1824
|
+
frequency: u,
|
|
1825
|
+
measure: s,
|
|
1826
|
+
strategy: a
|
|
1827
|
+
} = o, f = z(e), c = h(), l = et(c), g = U(function(S) {
|
|
1828
|
+
S === void 0 && (S = []), !l.current && d((w) => w === null ? S : w.concat(S.filter((x) => !w.includes(x))));
|
|
1829
|
+
}, [l]), b = z(null), p = it((S) => {
|
|
1830
|
+
if (c && !n)
|
|
1831
|
+
return ln;
|
|
1832
|
+
if (!S || S === ln || f.current !== e || i != null) {
|
|
1833
|
+
const w = /* @__PURE__ */ new Map();
|
|
1834
|
+
for (let x of e) {
|
|
1835
|
+
if (!x)
|
|
1836
|
+
continue;
|
|
1837
|
+
if (i && i.length > 0 && !i.includes(x.id) && x.rect.current) {
|
|
1838
|
+
w.set(x.id, x.rect.current);
|
|
1839
|
+
continue;
|
|
1840
|
+
}
|
|
1841
|
+
const C = x.node.current, D = C ? new Ut(s(C), C) : null;
|
|
1842
|
+
x.rect.current = D, D && w.set(x.id, D);
|
|
1843
|
+
}
|
|
1844
|
+
return w;
|
|
1845
|
+
}
|
|
1846
|
+
return S;
|
|
1847
|
+
}, [e, i, n, c, s]);
|
|
1848
|
+
return j(() => {
|
|
1849
|
+
f.current = e;
|
|
1850
|
+
}, [e]), j(
|
|
1851
|
+
() => {
|
|
1852
|
+
c || g();
|
|
1853
|
+
},
|
|
1854
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1855
|
+
[n, c]
|
|
1856
|
+
), j(
|
|
1857
|
+
() => {
|
|
1858
|
+
i && i.length > 0 && d(null);
|
|
1859
|
+
},
|
|
1860
|
+
//eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1861
|
+
[JSON.stringify(i)]
|
|
1862
|
+
), j(
|
|
1863
|
+
() => {
|
|
1864
|
+
c || typeof u != "number" || b.current !== null || (b.current = setTimeout(() => {
|
|
1865
|
+
g(), b.current = null;
|
|
1866
|
+
}, u));
|
|
1867
|
+
},
|
|
1868
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1869
|
+
[u, c, g, ...r]
|
|
1870
|
+
), {
|
|
1871
|
+
droppableRects: p,
|
|
1872
|
+
measureDroppableContainers: g,
|
|
1873
|
+
measuringScheduled: i != null
|
|
1874
|
+
};
|
|
1875
|
+
function h() {
|
|
1876
|
+
switch (a) {
|
|
1877
|
+
case tt.Always:
|
|
1878
|
+
return !1;
|
|
1879
|
+
case tt.BeforeDragging:
|
|
1880
|
+
return n;
|
|
1881
|
+
default:
|
|
1882
|
+
return !n;
|
|
1883
|
+
}
|
|
1884
|
+
}
|
|
1885
|
+
}
|
|
1886
|
+
function Xt(e, t) {
|
|
1887
|
+
return it((n) => e ? n || (typeof t == "function" ? t(e) : e) : null, [t, e]);
|
|
1888
|
+
}
|
|
1889
|
+
function io(e, t) {
|
|
1890
|
+
return Xt(e, t);
|
|
1891
|
+
}
|
|
1892
|
+
function ao(e) {
|
|
1893
|
+
let {
|
|
1894
|
+
callback: t,
|
|
1895
|
+
disabled: n
|
|
1896
|
+
} = e;
|
|
1897
|
+
const r = wt(t), o = L(() => {
|
|
1898
|
+
if (n || typeof window > "u" || typeof window.MutationObserver > "u")
|
|
1899
|
+
return;
|
|
1900
|
+
const {
|
|
1901
|
+
MutationObserver: i
|
|
1902
|
+
} = window;
|
|
1903
|
+
return new i(r);
|
|
1904
|
+
}, [r, n]);
|
|
1905
|
+
return j(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
|
|
1906
|
+
}
|
|
1907
|
+
function Dt(e) {
|
|
1908
|
+
let {
|
|
1909
|
+
callback: t,
|
|
1910
|
+
disabled: n
|
|
1911
|
+
} = e;
|
|
1912
|
+
const r = wt(t), o = L(
|
|
1913
|
+
() => {
|
|
1914
|
+
if (n || typeof window > "u" || typeof window.ResizeObserver > "u")
|
|
1915
|
+
return;
|
|
1916
|
+
const {
|
|
1917
|
+
ResizeObserver: i
|
|
1918
|
+
} = window;
|
|
1919
|
+
return new i(r);
|
|
1920
|
+
},
|
|
1921
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1922
|
+
[n]
|
|
1923
|
+
);
|
|
1924
|
+
return j(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
|
|
1925
|
+
}
|
|
1926
|
+
function so(e) {
|
|
1927
|
+
return new Ut(Xe(e), e);
|
|
1928
|
+
}
|
|
1929
|
+
function cn(e, t, n) {
|
|
1930
|
+
t === void 0 && (t = so);
|
|
1931
|
+
const [r, o] = H(null);
|
|
1932
|
+
function i() {
|
|
1933
|
+
o((s) => {
|
|
1934
|
+
if (!e)
|
|
1935
|
+
return null;
|
|
1936
|
+
if (e.isConnected === !1) {
|
|
1937
|
+
var a;
|
|
1938
|
+
return (a = s ?? n) != null ? a : null;
|
|
1939
|
+
}
|
|
1940
|
+
const f = t(e);
|
|
1941
|
+
return JSON.stringify(s) === JSON.stringify(f) ? s : f;
|
|
1942
|
+
});
|
|
1943
|
+
}
|
|
1944
|
+
const d = ao({
|
|
1945
|
+
callback(s) {
|
|
1946
|
+
if (e)
|
|
1947
|
+
for (const a of s) {
|
|
1948
|
+
const {
|
|
1949
|
+
type: f,
|
|
1950
|
+
target: c
|
|
1951
|
+
} = a;
|
|
1952
|
+
if (f === "childList" && c instanceof HTMLElement && c.contains(e)) {
|
|
1953
|
+
i();
|
|
1954
|
+
break;
|
|
1955
|
+
}
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
}), u = Dt({
|
|
1959
|
+
callback: i
|
|
1960
|
+
});
|
|
1961
|
+
return be(() => {
|
|
1962
|
+
i(), e ? (u == null || u.observe(e), d == null || d.observe(document.body, {
|
|
1963
|
+
childList: !0,
|
|
1964
|
+
subtree: !0
|
|
1965
|
+
})) : (u == null || u.disconnect(), d == null || d.disconnect());
|
|
1966
|
+
}, [e]), r;
|
|
1967
|
+
}
|
|
1968
|
+
function lo(e) {
|
|
1969
|
+
const t = Xt(e);
|
|
1970
|
+
return xn(e, t);
|
|
1971
|
+
}
|
|
1972
|
+
const dn = [];
|
|
1973
|
+
function co(e) {
|
|
1974
|
+
const t = z(e), n = it((r) => e ? r && r !== dn && e && t.current && e.parentNode === t.current.parentNode ? r : Ht(e) : dn, [e]);
|
|
1975
|
+
return j(() => {
|
|
1976
|
+
t.current = e;
|
|
1977
|
+
}, [e]), n;
|
|
1978
|
+
}
|
|
1979
|
+
function uo(e) {
|
|
1980
|
+
const [t, n] = H(null), r = z(e), o = U((i) => {
|
|
1981
|
+
const d = At(i.target);
|
|
1982
|
+
d && n((u) => u ? (u.set(d, kt(d)), new Map(u)) : null);
|
|
1983
|
+
}, []);
|
|
1984
|
+
return j(() => {
|
|
1985
|
+
const i = r.current;
|
|
1986
|
+
if (e !== i) {
|
|
1987
|
+
d(i);
|
|
1988
|
+
const u = e.map((s) => {
|
|
1989
|
+
const a = At(s);
|
|
1990
|
+
return a ? (a.addEventListener("scroll", o, {
|
|
1991
|
+
passive: !0
|
|
1992
|
+
}), [a, kt(a)]) : null;
|
|
1993
|
+
}).filter((s) => s != null);
|
|
1994
|
+
n(u.length ? new Map(u) : null), r.current = e;
|
|
1995
|
+
}
|
|
1996
|
+
return () => {
|
|
1997
|
+
d(e), d(i);
|
|
1998
|
+
};
|
|
1999
|
+
function d(u) {
|
|
2000
|
+
u.forEach((s) => {
|
|
2001
|
+
const a = At(s);
|
|
2002
|
+
a == null || a.removeEventListener("scroll", o);
|
|
2003
|
+
});
|
|
2004
|
+
}
|
|
2005
|
+
}, [o, e]), L(() => e.length ? t ? Array.from(t.values()).reduce((i, d) => Ue(i, d), me) : Tn(e) : me, [e, t]);
|
|
2006
|
+
}
|
|
2007
|
+
function un(e, t) {
|
|
2008
|
+
t === void 0 && (t = []);
|
|
2009
|
+
const n = z(null);
|
|
2010
|
+
return j(
|
|
2011
|
+
() => {
|
|
2012
|
+
n.current = null;
|
|
2013
|
+
},
|
|
2014
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2015
|
+
t
|
|
2016
|
+
), j(() => {
|
|
2017
|
+
const r = e !== me;
|
|
2018
|
+
r && !n.current && (n.current = e), !r && n.current && (n.current = null);
|
|
2019
|
+
}, [e]), n.current ? vt(e, n.current) : me;
|
|
2020
|
+
}
|
|
2021
|
+
function fo(e) {
|
|
2022
|
+
j(
|
|
2023
|
+
() => {
|
|
2024
|
+
if (!yt)
|
|
2025
|
+
return;
|
|
2026
|
+
const t = e.map((n) => {
|
|
2027
|
+
let {
|
|
2028
|
+
sensor: r
|
|
2029
|
+
} = n;
|
|
2030
|
+
return r.setup == null ? void 0 : r.setup();
|
|
2031
|
+
});
|
|
2032
|
+
return () => {
|
|
2033
|
+
for (const n of t)
|
|
2034
|
+
n == null || n();
|
|
2035
|
+
};
|
|
2036
|
+
},
|
|
2037
|
+
// TO-DO: Sensors length could theoretically change which would not be a valid dependency
|
|
2038
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2039
|
+
e.map((t) => {
|
|
2040
|
+
let {
|
|
2041
|
+
sensor: n
|
|
2042
|
+
} = t;
|
|
2043
|
+
return n;
|
|
2044
|
+
})
|
|
2045
|
+
);
|
|
2046
|
+
}
|
|
2047
|
+
function go(e, t) {
|
|
2048
|
+
return L(() => e.reduce((n, r) => {
|
|
2049
|
+
let {
|
|
2050
|
+
eventName: o,
|
|
2051
|
+
handler: i
|
|
2052
|
+
} = r;
|
|
2053
|
+
return n[o] = (d) => {
|
|
2054
|
+
i(d, t);
|
|
2055
|
+
}, n;
|
|
2056
|
+
}, {}), [e, t]);
|
|
2057
|
+
}
|
|
2058
|
+
function Nn(e) {
|
|
2059
|
+
return L(() => e ? zr(e) : null, [e]);
|
|
2060
|
+
}
|
|
2061
|
+
const fn = [];
|
|
2062
|
+
function vo(e, t) {
|
|
2063
|
+
t === void 0 && (t = Xe);
|
|
2064
|
+
const [n] = e, r = Nn(n ? ne(n) : null), [o, i] = H(fn);
|
|
2065
|
+
function d() {
|
|
2066
|
+
i(() => e.length ? e.map((s) => Rn(s) ? r : new Ut(t(s), s)) : fn);
|
|
2067
|
+
}
|
|
2068
|
+
const u = Dt({
|
|
2069
|
+
callback: d
|
|
2070
|
+
});
|
|
2071
|
+
return be(() => {
|
|
2072
|
+
u == null || u.disconnect(), d(), e.forEach((s) => u == null ? void 0 : u.observe(s));
|
|
2073
|
+
}, [e]), o;
|
|
2074
|
+
}
|
|
2075
|
+
function Ln(e) {
|
|
2076
|
+
if (!e)
|
|
2077
|
+
return null;
|
|
2078
|
+
if (e.children.length > 1)
|
|
2079
|
+
return e;
|
|
2080
|
+
const t = e.children[0];
|
|
2081
|
+
return ot(t) ? t : e;
|
|
2082
|
+
}
|
|
2083
|
+
function ho(e) {
|
|
2084
|
+
let {
|
|
2085
|
+
measure: t
|
|
2086
|
+
} = e;
|
|
2087
|
+
const [n, r] = H(null), o = U((a) => {
|
|
2088
|
+
for (const {
|
|
2089
|
+
target: f
|
|
2090
|
+
} of a)
|
|
2091
|
+
if (ot(f)) {
|
|
2092
|
+
r((c) => {
|
|
2093
|
+
const l = t(f);
|
|
2094
|
+
return c ? {
|
|
2095
|
+
...c,
|
|
2096
|
+
width: l.width,
|
|
2097
|
+
height: l.height
|
|
2098
|
+
} : l;
|
|
2099
|
+
});
|
|
2100
|
+
break;
|
|
2101
|
+
}
|
|
2102
|
+
}, [t]), i = Dt({
|
|
2103
|
+
callback: o
|
|
2104
|
+
}), d = U((a) => {
|
|
2105
|
+
const f = Ln(a);
|
|
2106
|
+
i == null || i.disconnect(), f && (i == null || i.observe(f)), r(f ? t(f) : null);
|
|
2107
|
+
}, [t, i]), [u, s] = ft(d);
|
|
2108
|
+
return L(() => ({
|
|
2109
|
+
nodeRef: u,
|
|
2110
|
+
rect: n,
|
|
2111
|
+
setRef: s
|
|
2112
|
+
}), [n, u, s]);
|
|
2113
|
+
}
|
|
2114
|
+
const po = [{
|
|
2115
|
+
sensor: Yt,
|
|
2116
|
+
options: {}
|
|
2117
|
+
}, {
|
|
2118
|
+
sensor: An,
|
|
2119
|
+
options: {}
|
|
2120
|
+
}], bo = {
|
|
2121
|
+
current: {}
|
|
2122
|
+
}, ut = {
|
|
2123
|
+
draggable: {
|
|
2124
|
+
measure: rn
|
|
2125
|
+
},
|
|
2126
|
+
droppable: {
|
|
2127
|
+
measure: rn,
|
|
2128
|
+
strategy: tt.WhileDragging,
|
|
2129
|
+
frequency: jt.Optimized
|
|
2130
|
+
},
|
|
2131
|
+
dragOverlay: {
|
|
2132
|
+
measure: Xe
|
|
2133
|
+
}
|
|
2134
|
+
};
|
|
2135
|
+
class Qe extends Map {
|
|
2136
|
+
get(t) {
|
|
2137
|
+
var n;
|
|
2138
|
+
return t != null && (n = super.get(t)) != null ? n : void 0;
|
|
2139
|
+
}
|
|
2140
|
+
toArray() {
|
|
2141
|
+
return Array.from(this.values());
|
|
2142
|
+
}
|
|
2143
|
+
getEnabled() {
|
|
2144
|
+
return this.toArray().filter((t) => {
|
|
2145
|
+
let {
|
|
2146
|
+
disabled: n
|
|
2147
|
+
} = t;
|
|
2148
|
+
return !n;
|
|
2149
|
+
});
|
|
2150
|
+
}
|
|
2151
|
+
getNodeFor(t) {
|
|
2152
|
+
var n, r;
|
|
2153
|
+
return (n = (r = this.get(t)) == null ? void 0 : r.node.current) != null ? n : void 0;
|
|
2154
|
+
}
|
|
2155
|
+
}
|
|
2156
|
+
const mo = {
|
|
2157
|
+
activatorEvent: null,
|
|
2158
|
+
active: null,
|
|
2159
|
+
activeNode: null,
|
|
2160
|
+
activeNodeRect: null,
|
|
2161
|
+
collisions: null,
|
|
2162
|
+
containerNodeRect: null,
|
|
2163
|
+
draggableNodes: /* @__PURE__ */ new Map(),
|
|
2164
|
+
droppableRects: /* @__PURE__ */ new Map(),
|
|
2165
|
+
droppableContainers: /* @__PURE__ */ new Qe(),
|
|
2166
|
+
over: null,
|
|
2167
|
+
dragOverlay: {
|
|
2168
|
+
nodeRef: {
|
|
2169
|
+
current: null
|
|
2170
|
+
},
|
|
2171
|
+
rect: null,
|
|
2172
|
+
setRef: pt
|
|
2173
|
+
},
|
|
2174
|
+
scrollableAncestors: [],
|
|
2175
|
+
scrollableAncestorRects: [],
|
|
2176
|
+
measuringConfiguration: ut,
|
|
2177
|
+
measureDroppableContainers: pt,
|
|
2178
|
+
windowRect: null,
|
|
2179
|
+
measuringScheduled: !1
|
|
2180
|
+
}, Mn = {
|
|
2181
|
+
activatorEvent: null,
|
|
2182
|
+
activators: [],
|
|
2183
|
+
active: null,
|
|
2184
|
+
activeNodeRect: null,
|
|
2185
|
+
ariaDescribedById: {
|
|
2186
|
+
draggable: ""
|
|
2187
|
+
},
|
|
2188
|
+
dispatch: pt,
|
|
2189
|
+
draggableNodes: /* @__PURE__ */ new Map(),
|
|
2190
|
+
over: null,
|
|
2191
|
+
measureDroppableContainers: pt
|
|
2192
|
+
}, st = /* @__PURE__ */ rt(Mn), Pn = /* @__PURE__ */ rt(mo);
|
|
2193
|
+
function yo() {
|
|
2194
|
+
return {
|
|
2195
|
+
draggable: {
|
|
2196
|
+
active: null,
|
|
2197
|
+
initialCoordinates: {
|
|
2198
|
+
x: 0,
|
|
2199
|
+
y: 0
|
|
2200
|
+
},
|
|
2201
|
+
nodes: /* @__PURE__ */ new Map(),
|
|
2202
|
+
translate: {
|
|
2203
|
+
x: 0,
|
|
2204
|
+
y: 0
|
|
2205
|
+
}
|
|
2206
|
+
},
|
|
2207
|
+
droppable: {
|
|
2208
|
+
containers: new Qe()
|
|
2209
|
+
}
|
|
2210
|
+
};
|
|
2211
|
+
}
|
|
2212
|
+
function wo(e, t) {
|
|
2213
|
+
switch (t.type) {
|
|
2214
|
+
case F.DragStart:
|
|
2215
|
+
return {
|
|
2216
|
+
...e,
|
|
2217
|
+
draggable: {
|
|
2218
|
+
...e.draggable,
|
|
2219
|
+
initialCoordinates: t.initialCoordinates,
|
|
2220
|
+
active: t.active
|
|
2221
|
+
}
|
|
2222
|
+
};
|
|
2223
|
+
case F.DragMove:
|
|
2224
|
+
return e.draggable.active == null ? e : {
|
|
2225
|
+
...e,
|
|
2226
|
+
draggable: {
|
|
2227
|
+
...e.draggable,
|
|
2228
|
+
translate: {
|
|
2229
|
+
x: t.coordinates.x - e.draggable.initialCoordinates.x,
|
|
2230
|
+
y: t.coordinates.y - e.draggable.initialCoordinates.y
|
|
2231
|
+
}
|
|
2232
|
+
}
|
|
2233
|
+
};
|
|
2234
|
+
case F.DragEnd:
|
|
2235
|
+
case F.DragCancel:
|
|
2236
|
+
return {
|
|
2237
|
+
...e,
|
|
2238
|
+
draggable: {
|
|
2239
|
+
...e.draggable,
|
|
2240
|
+
active: null,
|
|
2241
|
+
initialCoordinates: {
|
|
2242
|
+
x: 0,
|
|
2243
|
+
y: 0
|
|
2244
|
+
},
|
|
2245
|
+
translate: {
|
|
2246
|
+
x: 0,
|
|
2247
|
+
y: 0
|
|
2248
|
+
}
|
|
2249
|
+
}
|
|
2250
|
+
};
|
|
2251
|
+
case F.RegisterDroppable: {
|
|
2252
|
+
const {
|
|
2253
|
+
element: n
|
|
2254
|
+
} = t, {
|
|
2255
|
+
id: r
|
|
2256
|
+
} = n, o = new Qe(e.droppable.containers);
|
|
2257
|
+
return o.set(r, n), {
|
|
2258
|
+
...e,
|
|
2259
|
+
droppable: {
|
|
2260
|
+
...e.droppable,
|
|
2261
|
+
containers: o
|
|
2262
|
+
}
|
|
2263
|
+
};
|
|
2264
|
+
}
|
|
2265
|
+
case F.SetDroppableDisabled: {
|
|
2266
|
+
const {
|
|
2267
|
+
id: n,
|
|
2268
|
+
key: r,
|
|
2269
|
+
disabled: o
|
|
2270
|
+
} = t, i = e.droppable.containers.get(n);
|
|
2271
|
+
if (!i || r !== i.key)
|
|
2272
|
+
return e;
|
|
2273
|
+
const d = new Qe(e.droppable.containers);
|
|
2274
|
+
return d.set(n, {
|
|
2275
|
+
...i,
|
|
2276
|
+
disabled: o
|
|
2277
|
+
}), {
|
|
2278
|
+
...e,
|
|
2279
|
+
droppable: {
|
|
2280
|
+
...e.droppable,
|
|
2281
|
+
containers: d
|
|
2282
|
+
}
|
|
2283
|
+
};
|
|
2284
|
+
}
|
|
2285
|
+
case F.UnregisterDroppable: {
|
|
2286
|
+
const {
|
|
2287
|
+
id: n,
|
|
2288
|
+
key: r
|
|
2289
|
+
} = t, o = e.droppable.containers.get(n);
|
|
2290
|
+
if (!o || r !== o.key)
|
|
2291
|
+
return e;
|
|
2292
|
+
const i = new Qe(e.droppable.containers);
|
|
2293
|
+
return i.delete(n), {
|
|
2294
|
+
...e,
|
|
2295
|
+
droppable: {
|
|
2296
|
+
...e.droppable,
|
|
2297
|
+
containers: i
|
|
2298
|
+
}
|
|
2299
|
+
};
|
|
2300
|
+
}
|
|
2301
|
+
default:
|
|
2302
|
+
return e;
|
|
2303
|
+
}
|
|
2304
|
+
}
|
|
2305
|
+
function xo(e) {
|
|
2306
|
+
let {
|
|
2307
|
+
disabled: t
|
|
2308
|
+
} = e;
|
|
2309
|
+
const {
|
|
2310
|
+
active: n,
|
|
2311
|
+
activatorEvent: r,
|
|
2312
|
+
draggableNodes: o
|
|
2313
|
+
} = Pe(st), i = gt(r), d = gt(n == null ? void 0 : n.id);
|
|
2314
|
+
return j(() => {
|
|
2315
|
+
if (!t && !r && i && d != null) {
|
|
2316
|
+
if (!xt(i) || document.activeElement === i.target)
|
|
2317
|
+
return;
|
|
2318
|
+
const u = o.get(d);
|
|
2319
|
+
if (!u)
|
|
2320
|
+
return;
|
|
2321
|
+
const {
|
|
2322
|
+
activatorNode: s,
|
|
2323
|
+
node: a
|
|
2324
|
+
} = u;
|
|
2325
|
+
if (!s.current && !a.current)
|
|
2326
|
+
return;
|
|
2327
|
+
requestAnimationFrame(() => {
|
|
2328
|
+
for (const f of [s.current, a.current]) {
|
|
2329
|
+
if (!f)
|
|
2330
|
+
continue;
|
|
2331
|
+
const c = fr(f);
|
|
2332
|
+
if (c) {
|
|
2333
|
+
c.focus();
|
|
2334
|
+
break;
|
|
2335
|
+
}
|
|
2336
|
+
}
|
|
2337
|
+
});
|
|
2338
|
+
}
|
|
2339
|
+
}, [r, t, o, d, i]), null;
|
|
2340
|
+
}
|
|
2341
|
+
function kn(e, t) {
|
|
2342
|
+
let {
|
|
2343
|
+
transform: n,
|
|
2344
|
+
...r
|
|
2345
|
+
} = t;
|
|
2346
|
+
return e != null && e.length ? e.reduce((o, i) => i({
|
|
2347
|
+
transform: o,
|
|
2348
|
+
...r
|
|
2349
|
+
}), n) : n;
|
|
2350
|
+
}
|
|
2351
|
+
function Do(e) {
|
|
2352
|
+
return L(
|
|
2353
|
+
() => ({
|
|
2354
|
+
draggable: {
|
|
2355
|
+
...ut.draggable,
|
|
2356
|
+
...e == null ? void 0 : e.draggable
|
|
2357
|
+
},
|
|
2358
|
+
droppable: {
|
|
2359
|
+
...ut.droppable,
|
|
2360
|
+
...e == null ? void 0 : e.droppable
|
|
2361
|
+
},
|
|
2362
|
+
dragOverlay: {
|
|
2363
|
+
...ut.dragOverlay,
|
|
2364
|
+
...e == null ? void 0 : e.dragOverlay
|
|
2365
|
+
}
|
|
2366
|
+
}),
|
|
2367
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2368
|
+
[e == null ? void 0 : e.draggable, e == null ? void 0 : e.droppable, e == null ? void 0 : e.dragOverlay]
|
|
2369
|
+
);
|
|
2370
|
+
}
|
|
2371
|
+
function So(e) {
|
|
2372
|
+
let {
|
|
2373
|
+
activeNode: t,
|
|
2374
|
+
measure: n,
|
|
2375
|
+
initialRect: r,
|
|
2376
|
+
config: o = !0
|
|
2377
|
+
} = e;
|
|
2378
|
+
const i = z(!1), {
|
|
2379
|
+
x: d,
|
|
2380
|
+
y: u
|
|
2381
|
+
} = typeof o == "boolean" ? {
|
|
2382
|
+
x: o,
|
|
2383
|
+
y: o
|
|
2384
|
+
} : o;
|
|
2385
|
+
be(() => {
|
|
2386
|
+
if (!d && !u || !t) {
|
|
2387
|
+
i.current = !1;
|
|
2388
|
+
return;
|
|
2389
|
+
}
|
|
2390
|
+
if (i.current || !r)
|
|
2391
|
+
return;
|
|
2392
|
+
const a = t == null ? void 0 : t.node.current;
|
|
2393
|
+
if (!a || a.isConnected === !1)
|
|
2394
|
+
return;
|
|
2395
|
+
const f = n(a), c = xn(f, r);
|
|
2396
|
+
if (d || (c.x = 0), u || (c.y = 0), i.current = !0, Math.abs(c.x) > 0 || Math.abs(c.y) > 0) {
|
|
2397
|
+
const l = Sn(a);
|
|
2398
|
+
l && l.scrollBy({
|
|
2399
|
+
top: c.y,
|
|
2400
|
+
left: c.x
|
|
2401
|
+
});
|
|
2402
|
+
}
|
|
2403
|
+
}, [t, d, u, r, n]);
|
|
2404
|
+
}
|
|
2405
|
+
const St = /* @__PURE__ */ rt({
|
|
2406
|
+
...me,
|
|
2407
|
+
scaleX: 1,
|
|
2408
|
+
scaleY: 1
|
|
2409
|
+
});
|
|
2410
|
+
var Me;
|
|
2411
|
+
(function(e) {
|
|
2412
|
+
e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
|
|
2413
|
+
})(Me || (Me = {}));
|
|
2414
|
+
const Co = /* @__PURE__ */ nr(function(t) {
|
|
2415
|
+
var n, r, o, i;
|
|
2416
|
+
let {
|
|
2417
|
+
id: d,
|
|
2418
|
+
accessibility: u,
|
|
2419
|
+
autoScroll: s = !0,
|
|
2420
|
+
children: a,
|
|
2421
|
+
sensors: f = po,
|
|
2422
|
+
collisionDetection: c = Ar,
|
|
2423
|
+
measuring: l,
|
|
2424
|
+
modifiers: g,
|
|
2425
|
+
...b
|
|
2426
|
+
} = t;
|
|
2427
|
+
const p = rr(wo, void 0, yo), [h, S] = p, [w, x] = mr(), [C, D] = H(Me.Uninitialized), R = C === Me.Initialized, {
|
|
2428
|
+
draggable: {
|
|
2429
|
+
active: O,
|
|
2430
|
+
nodes: m,
|
|
2431
|
+
translate: P
|
|
2432
|
+
},
|
|
2433
|
+
droppable: {
|
|
2434
|
+
containers: N
|
|
2435
|
+
}
|
|
2436
|
+
} = h, E = O != null ? m.get(O) : null, M = z({
|
|
2437
|
+
initial: null,
|
|
2438
|
+
translated: null
|
|
2439
|
+
}), Q = L(() => {
|
|
2440
|
+
var q;
|
|
2441
|
+
return O != null ? {
|
|
2442
|
+
id: O,
|
|
2443
|
+
// It's possible for the active node to unmount while dragging
|
|
2444
|
+
data: (q = E == null ? void 0 : E.data) != null ? q : bo,
|
|
2445
|
+
rect: M
|
|
2446
|
+
} : null;
|
|
2447
|
+
}, [O, E]), re = z(null), [ve, he] = H(null), [T, B] = H(null), W = et(b, Object.values(b)), Se = at("DndDescribedBy", d), Te = L(() => N.getEnabled(), [N]), V = Do(l), {
|
|
2448
|
+
droppableRects: pe,
|
|
2449
|
+
measureDroppableContainers: Ce,
|
|
2450
|
+
measuringScheduled: ke
|
|
2451
|
+
} = oo(Te, {
|
|
2452
|
+
dragging: R,
|
|
2453
|
+
dependencies: [P.x, P.y],
|
|
2454
|
+
config: V.droppable
|
|
2455
|
+
}), oe = no(m, O), ze = L(() => T ? ht(T) : null, [T]), ce = er(), y = io(oe, V.draggable.measure);
|
|
2456
|
+
So({
|
|
2457
|
+
activeNode: O != null ? m.get(O) : null,
|
|
2458
|
+
config: ce.layoutShiftCompensation,
|
|
2459
|
+
initialRect: y,
|
|
2460
|
+
measure: V.draggable.measure
|
|
2461
|
+
});
|
|
2462
|
+
const v = cn(oe, V.draggable.measure, y), _ = cn(oe ? oe.parentElement : null), A = z({
|
|
2463
|
+
activatorEvent: null,
|
|
2464
|
+
active: null,
|
|
2465
|
+
activeNode: oe,
|
|
2466
|
+
collisionRect: null,
|
|
2467
|
+
collisions: null,
|
|
2468
|
+
droppableRects: pe,
|
|
2469
|
+
draggableNodes: m,
|
|
2470
|
+
draggingNode: null,
|
|
2471
|
+
draggingNodeRect: null,
|
|
2472
|
+
droppableContainers: N,
|
|
2473
|
+
over: null,
|
|
2474
|
+
scrollableAncestors: [],
|
|
2475
|
+
scrollAdjustedTranslate: null
|
|
2476
|
+
}), Y = N.getNodeFor((n = A.current.over) == null ? void 0 : n.id), $ = ho({
|
|
2477
|
+
measure: V.dragOverlay.measure
|
|
2478
|
+
}), ie = (r = $.nodeRef.current) != null ? r : oe, K = R ? (o = $.rect) != null ? o : v : null, ye = !!($.nodeRef.current && $.rect), je = lo(ye ? null : v), Oe = Nn(ie ? ne(ie) : null), de = co(R ? Y ?? oe : null), ee = vo(de), _e = kn(g, {
|
|
2479
|
+
transform: {
|
|
2480
|
+
x: P.x - je.x,
|
|
2481
|
+
y: P.y - je.y,
|
|
2482
|
+
scaleX: 1,
|
|
2483
|
+
scaleY: 1
|
|
2484
|
+
},
|
|
2485
|
+
activatorEvent: T,
|
|
2486
|
+
active: Q,
|
|
2487
|
+
activeNodeRect: v,
|
|
2488
|
+
containerNodeRect: _,
|
|
2489
|
+
draggingNodeRect: K,
|
|
2490
|
+
over: A.current.over,
|
|
2491
|
+
overlayNodeRect: $.rect,
|
|
2492
|
+
scrollableAncestors: de,
|
|
2493
|
+
scrollableAncestorRects: ee,
|
|
2494
|
+
windowRect: Oe
|
|
2495
|
+
}), te = ze ? Ue(ze, P) : null, ue = uo(de), Ot = un(ue), Rt = un(ue, [v]), Be = Ue(_e, Ot), $e = K ? Mr(K, _e) : null, Ke = Q && $e ? c({
|
|
2496
|
+
active: Q,
|
|
2497
|
+
collisionRect: $e,
|
|
2498
|
+
droppableRects: pe,
|
|
2499
|
+
droppableContainers: Te,
|
|
2500
|
+
pointerCoordinates: te
|
|
2501
|
+
}) : null, Gt = Tr(Ke, "id"), [Ie, Vt] = H(null), Vn = ye ? _e : Ue(_e, Rt), qn = Nr(Vn, (i = Ie == null ? void 0 : Ie.rect) != null ? i : null, v), Et = z(null), qt = U(
|
|
2502
|
+
(q, ae) => {
|
|
2503
|
+
let {
|
|
2504
|
+
sensor: se,
|
|
2505
|
+
options: Ae
|
|
2506
|
+
} = ae;
|
|
2507
|
+
if (re.current == null)
|
|
2508
|
+
return;
|
|
2509
|
+
const fe = m.get(re.current);
|
|
2510
|
+
if (!fe)
|
|
2511
|
+
return;
|
|
2512
|
+
const le = q.nativeEvent, we = new se({
|
|
2513
|
+
active: re.current,
|
|
2514
|
+
activeNode: fe,
|
|
2515
|
+
event: le,
|
|
2516
|
+
options: Ae,
|
|
2517
|
+
// Sensors need to be instantiated with refs for arguments that change over time
|
|
2518
|
+
// otherwise they are frozen in time with the stale arguments
|
|
2519
|
+
context: A,
|
|
2520
|
+
onAbort(G) {
|
|
2521
|
+
if (!m.get(G))
|
|
2522
|
+
return;
|
|
2523
|
+
const {
|
|
2524
|
+
onDragAbort: xe
|
|
2525
|
+
} = W.current, Re = {
|
|
2526
|
+
id: G
|
|
2527
|
+
};
|
|
2528
|
+
xe == null || xe(Re), w({
|
|
2529
|
+
type: "onDragAbort",
|
|
2530
|
+
event: Re
|
|
2531
|
+
});
|
|
2532
|
+
},
|
|
2533
|
+
onPending(G, Ne, xe, Re) {
|
|
2534
|
+
if (!m.get(G))
|
|
2535
|
+
return;
|
|
2536
|
+
const {
|
|
2537
|
+
onDragPending: Ve
|
|
2538
|
+
} = W.current, Le = {
|
|
2539
|
+
id: G,
|
|
2540
|
+
constraint: Ne,
|
|
2541
|
+
initialCoordinates: xe,
|
|
2542
|
+
offset: Re
|
|
2543
|
+
};
|
|
2544
|
+
Ve == null || Ve(Le), w({
|
|
2545
|
+
type: "onDragPending",
|
|
2546
|
+
event: Le
|
|
2547
|
+
});
|
|
2548
|
+
},
|
|
2549
|
+
onStart(G) {
|
|
2550
|
+
const Ne = re.current;
|
|
2551
|
+
if (Ne == null)
|
|
2552
|
+
return;
|
|
2553
|
+
const xe = m.get(Ne);
|
|
2554
|
+
if (!xe)
|
|
2555
|
+
return;
|
|
2556
|
+
const {
|
|
2557
|
+
onDragStart: Re
|
|
2558
|
+
} = W.current, Ge = {
|
|
2559
|
+
activatorEvent: le,
|
|
2560
|
+
active: {
|
|
2561
|
+
id: Ne,
|
|
2562
|
+
data: xe.data,
|
|
2563
|
+
rect: M
|
|
2564
|
+
}
|
|
2565
|
+
};
|
|
2566
|
+
He.unstable_batchedUpdates(() => {
|
|
2567
|
+
Re == null || Re(Ge), D(Me.Initializing), S({
|
|
2568
|
+
type: F.DragStart,
|
|
2569
|
+
initialCoordinates: G,
|
|
2570
|
+
active: Ne
|
|
2571
|
+
}), w({
|
|
2572
|
+
type: "onDragStart",
|
|
2573
|
+
event: Ge
|
|
2574
|
+
}), he(Et.current), B(le);
|
|
2575
|
+
});
|
|
2576
|
+
},
|
|
2577
|
+
onMove(G) {
|
|
2578
|
+
S({
|
|
2579
|
+
type: F.DragMove,
|
|
2580
|
+
coordinates: G
|
|
2581
|
+
});
|
|
2582
|
+
},
|
|
2583
|
+
onEnd: Fe(F.DragEnd),
|
|
2584
|
+
onCancel: Fe(F.DragCancel)
|
|
2585
|
+
});
|
|
2586
|
+
Et.current = we;
|
|
2587
|
+
function Fe(G) {
|
|
2588
|
+
return async function() {
|
|
2589
|
+
const {
|
|
2590
|
+
active: xe,
|
|
2591
|
+
collisions: Re,
|
|
2592
|
+
over: Ge,
|
|
2593
|
+
scrollAdjustedTranslate: Ve
|
|
2594
|
+
} = A.current;
|
|
2595
|
+
let Le = null;
|
|
2596
|
+
if (xe && Ve) {
|
|
2597
|
+
const {
|
|
2598
|
+
cancelDrop: qe
|
|
2599
|
+
} = W.current;
|
|
2600
|
+
Le = {
|
|
2601
|
+
activatorEvent: le,
|
|
2602
|
+
active: xe,
|
|
2603
|
+
collisions: Re,
|
|
2604
|
+
delta: Ve,
|
|
2605
|
+
over: Ge
|
|
2606
|
+
}, G === F.DragEnd && typeof qe == "function" && await Promise.resolve(qe(Le)) && (G = F.DragCancel);
|
|
2607
|
+
}
|
|
2608
|
+
re.current = null, He.unstable_batchedUpdates(() => {
|
|
2609
|
+
S({
|
|
2610
|
+
type: G
|
|
2611
|
+
}), D(Me.Uninitialized), Vt(null), he(null), B(null), Et.current = null;
|
|
2612
|
+
const qe = G === F.DragEnd ? "onDragEnd" : "onDragCancel";
|
|
2613
|
+
if (Le) {
|
|
2614
|
+
const Tt = W.current[qe];
|
|
2615
|
+
Tt == null || Tt(Le), w({
|
|
2616
|
+
type: qe,
|
|
2617
|
+
event: Le
|
|
2618
|
+
});
|
|
2619
|
+
}
|
|
2620
|
+
});
|
|
2621
|
+
};
|
|
2622
|
+
}
|
|
2623
|
+
},
|
|
2624
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2625
|
+
[m]
|
|
2626
|
+
), Jn = U((q, ae) => (se, Ae) => {
|
|
2627
|
+
const fe = se.nativeEvent, le = m.get(Ae);
|
|
2628
|
+
if (
|
|
2629
|
+
// Another sensor is already instantiating
|
|
2630
|
+
re.current !== null || // No active draggable
|
|
2631
|
+
!le || // Event has already been captured
|
|
2632
|
+
fe.dndKit || fe.defaultPrevented
|
|
2633
|
+
)
|
|
2634
|
+
return;
|
|
2635
|
+
const we = {
|
|
2636
|
+
active: le
|
|
2637
|
+
};
|
|
2638
|
+
q(se, ae.options, we) === !0 && (fe.dndKit = {
|
|
2639
|
+
capturedBy: ae.sensor
|
|
2640
|
+
}, re.current = Ae, qt(se, ae));
|
|
2641
|
+
}, [m, qt]), Jt = ro(f, Jn);
|
|
2642
|
+
fo(f), be(() => {
|
|
2643
|
+
v && C === Me.Initializing && D(Me.Initialized);
|
|
2644
|
+
}, [v, C]), j(
|
|
2645
|
+
() => {
|
|
2646
|
+
const {
|
|
2647
|
+
onDragMove: q
|
|
2648
|
+
} = W.current, {
|
|
2649
|
+
active: ae,
|
|
2650
|
+
activatorEvent: se,
|
|
2651
|
+
collisions: Ae,
|
|
2652
|
+
over: fe
|
|
2653
|
+
} = A.current;
|
|
2654
|
+
if (!ae || !se)
|
|
2655
|
+
return;
|
|
2656
|
+
const le = {
|
|
2657
|
+
active: ae,
|
|
2658
|
+
activatorEvent: se,
|
|
2659
|
+
collisions: Ae,
|
|
2660
|
+
delta: {
|
|
2661
|
+
x: Be.x,
|
|
2662
|
+
y: Be.y
|
|
2663
|
+
},
|
|
2664
|
+
over: fe
|
|
2665
|
+
};
|
|
2666
|
+
He.unstable_batchedUpdates(() => {
|
|
2667
|
+
q == null || q(le), w({
|
|
2668
|
+
type: "onDragMove",
|
|
2669
|
+
event: le
|
|
2670
|
+
});
|
|
2671
|
+
});
|
|
2672
|
+
},
|
|
2673
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2674
|
+
[Be.x, Be.y]
|
|
2675
|
+
), j(
|
|
2676
|
+
() => {
|
|
2677
|
+
const {
|
|
2678
|
+
active: q,
|
|
2679
|
+
activatorEvent: ae,
|
|
2680
|
+
collisions: se,
|
|
2681
|
+
droppableContainers: Ae,
|
|
2682
|
+
scrollAdjustedTranslate: fe
|
|
2683
|
+
} = A.current;
|
|
2684
|
+
if (!q || re.current == null || !ae || !fe)
|
|
2685
|
+
return;
|
|
2686
|
+
const {
|
|
2687
|
+
onDragOver: le
|
|
2688
|
+
} = W.current, we = Ae.get(Gt), Fe = we && we.rect.current ? {
|
|
2689
|
+
id: we.id,
|
|
2690
|
+
rect: we.rect.current,
|
|
2691
|
+
data: we.data,
|
|
2692
|
+
disabled: we.disabled
|
|
2693
|
+
} : null, G = {
|
|
2694
|
+
active: q,
|
|
2695
|
+
activatorEvent: ae,
|
|
2696
|
+
collisions: se,
|
|
2697
|
+
delta: {
|
|
2698
|
+
x: fe.x,
|
|
2699
|
+
y: fe.y
|
|
2700
|
+
},
|
|
2701
|
+
over: Fe
|
|
2702
|
+
};
|
|
2703
|
+
He.unstable_batchedUpdates(() => {
|
|
2704
|
+
Vt(Fe), le == null || le(G), w({
|
|
2705
|
+
type: "onDragOver",
|
|
2706
|
+
event: G
|
|
2707
|
+
});
|
|
2708
|
+
});
|
|
2709
|
+
},
|
|
2710
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2711
|
+
[Gt]
|
|
2712
|
+
), be(() => {
|
|
2713
|
+
A.current = {
|
|
2714
|
+
activatorEvent: T,
|
|
2715
|
+
active: Q,
|
|
2716
|
+
activeNode: oe,
|
|
2717
|
+
collisionRect: $e,
|
|
2718
|
+
collisions: Ke,
|
|
2719
|
+
droppableRects: pe,
|
|
2720
|
+
draggableNodes: m,
|
|
2721
|
+
draggingNode: ie,
|
|
2722
|
+
draggingNodeRect: K,
|
|
2723
|
+
droppableContainers: N,
|
|
2724
|
+
over: Ie,
|
|
2725
|
+
scrollableAncestors: de,
|
|
2726
|
+
scrollAdjustedTranslate: Be
|
|
2727
|
+
}, M.current = {
|
|
2728
|
+
initial: K,
|
|
2729
|
+
translated: $e
|
|
2730
|
+
};
|
|
2731
|
+
}, [Q, oe, Ke, $e, m, ie, K, pe, N, Ie, de, Be]), Qr({
|
|
2732
|
+
...ce,
|
|
2733
|
+
delta: P,
|
|
2734
|
+
draggingRect: $e,
|
|
2735
|
+
pointerCoordinates: te,
|
|
2736
|
+
scrollableAncestors: de,
|
|
2737
|
+
scrollableAncestorRects: ee
|
|
2738
|
+
});
|
|
2739
|
+
const Zn = L(() => ({
|
|
2740
|
+
active: Q,
|
|
2741
|
+
activeNode: oe,
|
|
2742
|
+
activeNodeRect: v,
|
|
2743
|
+
activatorEvent: T,
|
|
2744
|
+
collisions: Ke,
|
|
2745
|
+
containerNodeRect: _,
|
|
2746
|
+
dragOverlay: $,
|
|
2747
|
+
draggableNodes: m,
|
|
2748
|
+
droppableContainers: N,
|
|
2749
|
+
droppableRects: pe,
|
|
2750
|
+
over: Ie,
|
|
2751
|
+
measureDroppableContainers: Ce,
|
|
2752
|
+
scrollableAncestors: de,
|
|
2753
|
+
scrollableAncestorRects: ee,
|
|
2754
|
+
measuringConfiguration: V,
|
|
2755
|
+
measuringScheduled: ke,
|
|
2756
|
+
windowRect: Oe
|
|
2757
|
+
}), [Q, oe, v, T, Ke, _, $, m, N, pe, Ie, Ce, de, ee, V, ke, Oe]), Qn = L(() => ({
|
|
2758
|
+
activatorEvent: T,
|
|
2759
|
+
activators: Jt,
|
|
2760
|
+
active: Q,
|
|
2761
|
+
activeNodeRect: v,
|
|
2762
|
+
ariaDescribedById: {
|
|
2763
|
+
draggable: Se
|
|
2764
|
+
},
|
|
2765
|
+
dispatch: S,
|
|
2766
|
+
draggableNodes: m,
|
|
2767
|
+
over: Ie,
|
|
2768
|
+
measureDroppableContainers: Ce
|
|
2769
|
+
}), [T, Jt, Q, v, S, Se, m, Ie, Ce]);
|
|
2770
|
+
return I.createElement(wn.Provider, {
|
|
2771
|
+
value: x
|
|
2772
|
+
}, I.createElement(st.Provider, {
|
|
2773
|
+
value: Qn
|
|
2774
|
+
}, I.createElement(Pn.Provider, {
|
|
2775
|
+
value: Zn
|
|
2776
|
+
}, I.createElement(St.Provider, {
|
|
2777
|
+
value: qn
|
|
2778
|
+
}, a)), I.createElement(xo, {
|
|
2779
|
+
disabled: (u == null ? void 0 : u.restoreFocus) === !1
|
|
2780
|
+
})), I.createElement(xr, {
|
|
2781
|
+
...u,
|
|
2782
|
+
hiddenTextDescribedById: Se
|
|
2783
|
+
}));
|
|
2784
|
+
function er() {
|
|
2785
|
+
const q = (ve == null ? void 0 : ve.autoScrollEnabled) === !1, ae = typeof s == "object" ? s.enabled === !1 : s === !1, se = R && !q && !ae;
|
|
2786
|
+
return typeof s == "object" ? {
|
|
2787
|
+
...s,
|
|
2788
|
+
enabled: se
|
|
2789
|
+
} : {
|
|
2790
|
+
enabled: se
|
|
2791
|
+
};
|
|
2792
|
+
}
|
|
2793
|
+
}), Oo = /* @__PURE__ */ rt(null), gn = "button", Ro = "Draggable";
|
|
2794
|
+
function Eo(e) {
|
|
2795
|
+
let {
|
|
2796
|
+
id: t,
|
|
2797
|
+
data: n,
|
|
2798
|
+
disabled: r = !1,
|
|
2799
|
+
attributes: o
|
|
2800
|
+
} = e;
|
|
2801
|
+
const i = at(Ro), {
|
|
2802
|
+
activators: d,
|
|
2803
|
+
activatorEvent: u,
|
|
2804
|
+
active: s,
|
|
2805
|
+
activeNodeRect: a,
|
|
2806
|
+
ariaDescribedById: f,
|
|
2807
|
+
draggableNodes: c,
|
|
2808
|
+
over: l
|
|
2809
|
+
} = Pe(st), {
|
|
2810
|
+
role: g = gn,
|
|
2811
|
+
roleDescription: b = "draggable",
|
|
2812
|
+
tabIndex: p = 0
|
|
2813
|
+
} = o ?? {}, h = (s == null ? void 0 : s.id) === t, S = Pe(h ? St : Oo), [w, x] = ft(), [C, D] = ft(), R = go(d, t), O = et(n);
|
|
2814
|
+
be(
|
|
2815
|
+
() => (c.set(t, {
|
|
2816
|
+
id: t,
|
|
2817
|
+
key: i,
|
|
2818
|
+
node: w,
|
|
2819
|
+
activatorNode: C,
|
|
2820
|
+
data: O
|
|
2821
|
+
}), () => {
|
|
2822
|
+
const P = c.get(t);
|
|
2823
|
+
P && P.key === i && c.delete(t);
|
|
2824
|
+
}),
|
|
2825
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2826
|
+
[c, t]
|
|
2827
|
+
);
|
|
2828
|
+
const m = L(() => ({
|
|
2829
|
+
role: g,
|
|
2830
|
+
tabIndex: p,
|
|
2831
|
+
"aria-disabled": r,
|
|
2832
|
+
"aria-pressed": h && g === gn ? !0 : void 0,
|
|
2833
|
+
"aria-roledescription": b,
|
|
2834
|
+
"aria-describedby": f.draggable
|
|
2835
|
+
}), [r, g, p, h, b, f.draggable]);
|
|
2836
|
+
return {
|
|
2837
|
+
active: s,
|
|
2838
|
+
activatorEvent: u,
|
|
2839
|
+
activeNodeRect: a,
|
|
2840
|
+
attributes: m,
|
|
2841
|
+
isDragging: h,
|
|
2842
|
+
listeners: r ? void 0 : R,
|
|
2843
|
+
node: w,
|
|
2844
|
+
over: l,
|
|
2845
|
+
setNodeRef: x,
|
|
2846
|
+
setActivatorNodeRef: D,
|
|
2847
|
+
transform: S
|
|
2848
|
+
};
|
|
2849
|
+
}
|
|
2850
|
+
function zn() {
|
|
2851
|
+
return Pe(Pn);
|
|
2852
|
+
}
|
|
2853
|
+
const To = "Droppable", _o = {
|
|
2854
|
+
timeout: 25
|
|
2855
|
+
};
|
|
2856
|
+
function Io(e) {
|
|
2857
|
+
let {
|
|
2858
|
+
data: t,
|
|
2859
|
+
disabled: n = !1,
|
|
2860
|
+
id: r,
|
|
2861
|
+
resizeObserverConfig: o
|
|
2862
|
+
} = e;
|
|
2863
|
+
const i = at(To), {
|
|
2864
|
+
active: d,
|
|
2865
|
+
dispatch: u,
|
|
2866
|
+
over: s,
|
|
2867
|
+
measureDroppableContainers: a
|
|
2868
|
+
} = Pe(st), f = z({
|
|
2869
|
+
disabled: n
|
|
2870
|
+
}), c = z(!1), l = z(null), g = z(null), {
|
|
2871
|
+
disabled: b,
|
|
2872
|
+
updateMeasurementsFor: p,
|
|
2873
|
+
timeout: h
|
|
2874
|
+
} = {
|
|
2875
|
+
..._o,
|
|
2876
|
+
...o
|
|
2877
|
+
}, S = et(p ?? r), w = U(
|
|
2878
|
+
() => {
|
|
2879
|
+
if (!c.current) {
|
|
2880
|
+
c.current = !0;
|
|
2881
|
+
return;
|
|
2882
|
+
}
|
|
2883
|
+
g.current != null && clearTimeout(g.current), g.current = setTimeout(() => {
|
|
2884
|
+
a(Array.isArray(S.current) ? S.current : [S.current]), g.current = null;
|
|
2885
|
+
}, h);
|
|
2886
|
+
},
|
|
2887
|
+
//eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2888
|
+
[h]
|
|
2889
|
+
), x = Dt({
|
|
2890
|
+
callback: w,
|
|
2891
|
+
disabled: b || !d
|
|
2892
|
+
}), C = U((m, P) => {
|
|
2893
|
+
x && (P && (x.unobserve(P), c.current = !1), m && x.observe(m));
|
|
2894
|
+
}, [x]), [D, R] = ft(C), O = et(t);
|
|
2895
|
+
return j(() => {
|
|
2896
|
+
!x || !D.current || (x.disconnect(), c.current = !1, x.observe(D.current));
|
|
2897
|
+
}, [D, x]), j(
|
|
2898
|
+
() => (u({
|
|
2899
|
+
type: F.RegisterDroppable,
|
|
2900
|
+
element: {
|
|
2901
|
+
id: r,
|
|
2902
|
+
key: i,
|
|
2903
|
+
disabled: n,
|
|
2904
|
+
node: D,
|
|
2905
|
+
rect: l,
|
|
2906
|
+
data: O
|
|
2907
|
+
}
|
|
2908
|
+
}), () => u({
|
|
2909
|
+
type: F.UnregisterDroppable,
|
|
2910
|
+
key: i,
|
|
2911
|
+
id: r
|
|
2912
|
+
})),
|
|
2913
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2914
|
+
[r]
|
|
2915
|
+
), j(() => {
|
|
2916
|
+
n !== f.current.disabled && (u({
|
|
2917
|
+
type: F.SetDroppableDisabled,
|
|
2918
|
+
id: r,
|
|
2919
|
+
key: i,
|
|
2920
|
+
disabled: n
|
|
2921
|
+
}), f.current.disabled = n);
|
|
2922
|
+
}, [r, i, n, u]), {
|
|
2923
|
+
active: d,
|
|
2924
|
+
rect: l,
|
|
2925
|
+
isOver: (s == null ? void 0 : s.id) === r,
|
|
2926
|
+
node: D,
|
|
2927
|
+
over: s,
|
|
2928
|
+
setNodeRef: R
|
|
2929
|
+
};
|
|
2930
|
+
}
|
|
2931
|
+
function Ao(e) {
|
|
2932
|
+
let {
|
|
2933
|
+
animation: t,
|
|
2934
|
+
children: n
|
|
2935
|
+
} = e;
|
|
2936
|
+
const [r, o] = H(null), [i, d] = H(null), u = gt(n);
|
|
2937
|
+
return !n && !r && u && o(u), be(() => {
|
|
2938
|
+
if (!i)
|
|
2939
|
+
return;
|
|
2940
|
+
const s = r == null ? void 0 : r.key, a = r == null ? void 0 : r.props.id;
|
|
2941
|
+
if (s == null || a == null) {
|
|
2942
|
+
o(null);
|
|
2943
|
+
return;
|
|
2944
|
+
}
|
|
2945
|
+
Promise.resolve(t(a, i)).then(() => {
|
|
2946
|
+
o(null);
|
|
2947
|
+
});
|
|
2948
|
+
}, [t, r, i]), I.createElement(I.Fragment, null, n, r ? or(r, {
|
|
2949
|
+
ref: d
|
|
2950
|
+
}) : null);
|
|
2951
|
+
}
|
|
2952
|
+
const No = {
|
|
2953
|
+
x: 0,
|
|
2954
|
+
y: 0,
|
|
2955
|
+
scaleX: 1,
|
|
2956
|
+
scaleY: 1
|
|
2957
|
+
};
|
|
2958
|
+
function Lo(e) {
|
|
2959
|
+
let {
|
|
2960
|
+
children: t
|
|
2961
|
+
} = e;
|
|
2962
|
+
return I.createElement(st.Provider, {
|
|
2963
|
+
value: Mn
|
|
2964
|
+
}, I.createElement(St.Provider, {
|
|
2965
|
+
value: No
|
|
2966
|
+
}, t));
|
|
2967
|
+
}
|
|
2968
|
+
const Mo = {
|
|
2969
|
+
position: "fixed",
|
|
2970
|
+
touchAction: "none"
|
|
2971
|
+
}, Po = (e) => xt(e) ? "transform 250ms ease" : void 0, ko = /* @__PURE__ */ pn((e, t) => {
|
|
2972
|
+
let {
|
|
2973
|
+
as: n,
|
|
2974
|
+
activatorEvent: r,
|
|
2975
|
+
adjustScale: o,
|
|
2976
|
+
children: i,
|
|
2977
|
+
className: d,
|
|
2978
|
+
rect: u,
|
|
2979
|
+
style: s,
|
|
2980
|
+
transform: a,
|
|
2981
|
+
transition: f = Po
|
|
2982
|
+
} = e;
|
|
2983
|
+
if (!u)
|
|
2984
|
+
return null;
|
|
2985
|
+
const c = o ? a : {
|
|
2986
|
+
...a,
|
|
2987
|
+
scaleX: 1,
|
|
2988
|
+
scaleY: 1
|
|
2989
|
+
}, l = {
|
|
2990
|
+
...Mo,
|
|
2991
|
+
width: u.width,
|
|
2992
|
+
height: u.height,
|
|
2993
|
+
top: u.top,
|
|
2994
|
+
left: u.left,
|
|
2995
|
+
transform: De.Transform.toString(c),
|
|
2996
|
+
transformOrigin: o && r ? Or(r, u) : void 0,
|
|
2997
|
+
transition: typeof f == "function" ? f(r) : f,
|
|
2998
|
+
...s
|
|
2999
|
+
};
|
|
3000
|
+
return I.createElement(n, {
|
|
3001
|
+
className: d,
|
|
3002
|
+
style: l,
|
|
3003
|
+
ref: t
|
|
3004
|
+
}, i);
|
|
3005
|
+
}), zo = (e) => (t) => {
|
|
3006
|
+
let {
|
|
3007
|
+
active: n,
|
|
3008
|
+
dragOverlay: r
|
|
3009
|
+
} = t;
|
|
3010
|
+
const o = {}, {
|
|
3011
|
+
styles: i,
|
|
3012
|
+
className: d
|
|
3013
|
+
} = e;
|
|
3014
|
+
if (i != null && i.active)
|
|
3015
|
+
for (const [u, s] of Object.entries(i.active))
|
|
3016
|
+
s !== void 0 && (o[u] = n.node.style.getPropertyValue(u), n.node.style.setProperty(u, s));
|
|
3017
|
+
if (i != null && i.dragOverlay)
|
|
3018
|
+
for (const [u, s] of Object.entries(i.dragOverlay))
|
|
3019
|
+
s !== void 0 && r.node.style.setProperty(u, s);
|
|
3020
|
+
return d != null && d.active && n.node.classList.add(d.active), d != null && d.dragOverlay && r.node.classList.add(d.dragOverlay), function() {
|
|
3021
|
+
for (const [s, a] of Object.entries(o))
|
|
3022
|
+
n.node.style.setProperty(s, a);
|
|
3023
|
+
d != null && d.active && n.node.classList.remove(d.active);
|
|
3024
|
+
};
|
|
3025
|
+
}, jo = (e) => {
|
|
3026
|
+
let {
|
|
3027
|
+
transform: {
|
|
3028
|
+
initial: t,
|
|
3029
|
+
final: n
|
|
3030
|
+
}
|
|
3031
|
+
} = e;
|
|
3032
|
+
return [{
|
|
3033
|
+
transform: De.Transform.toString(t)
|
|
3034
|
+
}, {
|
|
3035
|
+
transform: De.Transform.toString(n)
|
|
3036
|
+
}];
|
|
3037
|
+
}, Bt = {
|
|
3038
|
+
duration: 250,
|
|
3039
|
+
easing: "ease",
|
|
3040
|
+
keyframes: jo,
|
|
3041
|
+
sideEffects: /* @__PURE__ */ zo({
|
|
3042
|
+
styles: {
|
|
3043
|
+
active: {
|
|
3044
|
+
opacity: "0"
|
|
3045
|
+
}
|
|
3046
|
+
}
|
|
3047
|
+
})
|
|
3048
|
+
};
|
|
3049
|
+
function Bo(e) {
|
|
3050
|
+
let {
|
|
3051
|
+
config: t,
|
|
3052
|
+
draggableNodes: n,
|
|
3053
|
+
droppableContainers: r,
|
|
3054
|
+
measuringConfiguration: o
|
|
3055
|
+
} = e;
|
|
3056
|
+
return wt((i, d) => {
|
|
3057
|
+
if (t === null)
|
|
3058
|
+
return;
|
|
3059
|
+
const u = n.get(i);
|
|
3060
|
+
if (!u)
|
|
3061
|
+
return;
|
|
3062
|
+
const s = u.node.current;
|
|
3063
|
+
if (!s)
|
|
3064
|
+
return;
|
|
3065
|
+
const a = Ln(d);
|
|
3066
|
+
if (!a)
|
|
3067
|
+
return;
|
|
3068
|
+
const {
|
|
3069
|
+
transform: f
|
|
3070
|
+
} = ne(d).getComputedStyle(d), c = Dn(f);
|
|
3071
|
+
if (!c)
|
|
3072
|
+
return;
|
|
3073
|
+
const l = typeof t == "function" ? t : $o(t);
|
|
3074
|
+
return _n(s, o.draggable.measure), l({
|
|
3075
|
+
active: {
|
|
3076
|
+
id: i,
|
|
3077
|
+
data: u.data,
|
|
3078
|
+
node: s,
|
|
3079
|
+
rect: o.draggable.measure(s)
|
|
3080
|
+
},
|
|
3081
|
+
draggableNodes: n,
|
|
3082
|
+
dragOverlay: {
|
|
3083
|
+
node: d,
|
|
3084
|
+
rect: o.dragOverlay.measure(a)
|
|
3085
|
+
},
|
|
3086
|
+
droppableContainers: r,
|
|
3087
|
+
measuringConfiguration: o,
|
|
3088
|
+
transform: c
|
|
3089
|
+
});
|
|
3090
|
+
});
|
|
3091
|
+
}
|
|
3092
|
+
function $o(e) {
|
|
3093
|
+
const {
|
|
3094
|
+
duration: t,
|
|
3095
|
+
easing: n,
|
|
3096
|
+
sideEffects: r,
|
|
3097
|
+
keyframes: o
|
|
3098
|
+
} = {
|
|
3099
|
+
...Bt,
|
|
3100
|
+
...e
|
|
3101
|
+
};
|
|
3102
|
+
return (i) => {
|
|
3103
|
+
let {
|
|
3104
|
+
active: d,
|
|
3105
|
+
dragOverlay: u,
|
|
3106
|
+
transform: s,
|
|
3107
|
+
...a
|
|
3108
|
+
} = i;
|
|
3109
|
+
if (!t)
|
|
3110
|
+
return;
|
|
3111
|
+
const f = {
|
|
3112
|
+
x: u.rect.left - d.rect.left,
|
|
3113
|
+
y: u.rect.top - d.rect.top
|
|
3114
|
+
}, c = {
|
|
3115
|
+
scaleX: s.scaleX !== 1 ? d.rect.width * s.scaleX / u.rect.width : 1,
|
|
3116
|
+
scaleY: s.scaleY !== 1 ? d.rect.height * s.scaleY / u.rect.height : 1
|
|
3117
|
+
}, l = {
|
|
3118
|
+
x: s.x - f.x,
|
|
3119
|
+
y: s.y - f.y,
|
|
3120
|
+
...c
|
|
3121
|
+
}, g = o({
|
|
3122
|
+
...a,
|
|
3123
|
+
active: d,
|
|
3124
|
+
dragOverlay: u,
|
|
3125
|
+
transform: {
|
|
3126
|
+
initial: s,
|
|
3127
|
+
final: l
|
|
3128
|
+
}
|
|
3129
|
+
}), [b] = g, p = g[g.length - 1];
|
|
3130
|
+
if (JSON.stringify(b) === JSON.stringify(p))
|
|
3131
|
+
return;
|
|
3132
|
+
const h = r == null ? void 0 : r({
|
|
3133
|
+
active: d,
|
|
3134
|
+
dragOverlay: u,
|
|
3135
|
+
...a
|
|
3136
|
+
}), S = u.node.animate(g, {
|
|
3137
|
+
duration: t,
|
|
3138
|
+
easing: n,
|
|
3139
|
+
fill: "forwards"
|
|
3140
|
+
});
|
|
3141
|
+
return new Promise((w) => {
|
|
3142
|
+
S.onfinish = () => {
|
|
3143
|
+
h == null || h(), w();
|
|
3144
|
+
};
|
|
3145
|
+
});
|
|
3146
|
+
};
|
|
3147
|
+
}
|
|
3148
|
+
let vn = 0;
|
|
3149
|
+
function Fo(e) {
|
|
3150
|
+
return L(() => {
|
|
3151
|
+
if (e != null)
|
|
3152
|
+
return vn++, vn;
|
|
3153
|
+
}, [e]);
|
|
3154
|
+
}
|
|
3155
|
+
const Ho = /* @__PURE__ */ I.memo((e) => {
|
|
3156
|
+
let {
|
|
3157
|
+
adjustScale: t = !1,
|
|
3158
|
+
children: n,
|
|
3159
|
+
dropAnimation: r,
|
|
3160
|
+
style: o,
|
|
3161
|
+
transition: i,
|
|
3162
|
+
modifiers: d,
|
|
3163
|
+
wrapperElement: u = "div",
|
|
3164
|
+
className: s,
|
|
3165
|
+
zIndex: a = 999
|
|
3166
|
+
} = e;
|
|
3167
|
+
const {
|
|
3168
|
+
activatorEvent: f,
|
|
3169
|
+
active: c,
|
|
3170
|
+
activeNodeRect: l,
|
|
3171
|
+
containerNodeRect: g,
|
|
3172
|
+
draggableNodes: b,
|
|
3173
|
+
droppableContainers: p,
|
|
3174
|
+
dragOverlay: h,
|
|
3175
|
+
over: S,
|
|
3176
|
+
measuringConfiguration: w,
|
|
3177
|
+
scrollableAncestors: x,
|
|
3178
|
+
scrollableAncestorRects: C,
|
|
3179
|
+
windowRect: D
|
|
3180
|
+
} = zn(), R = Pe(St), O = Fo(c == null ? void 0 : c.id), m = kn(d, {
|
|
3181
|
+
activatorEvent: f,
|
|
3182
|
+
active: c,
|
|
3183
|
+
activeNodeRect: l,
|
|
3184
|
+
containerNodeRect: g,
|
|
3185
|
+
draggingNodeRect: h.rect,
|
|
3186
|
+
over: S,
|
|
3187
|
+
overlayNodeRect: h.rect,
|
|
3188
|
+
scrollableAncestors: x,
|
|
3189
|
+
scrollableAncestorRects: C,
|
|
3190
|
+
transform: R,
|
|
3191
|
+
windowRect: D
|
|
3192
|
+
}), P = Xt(l), N = Bo({
|
|
3193
|
+
config: r,
|
|
3194
|
+
draggableNodes: b,
|
|
3195
|
+
droppableContainers: p,
|
|
3196
|
+
measuringConfiguration: w
|
|
3197
|
+
}), E = P ? h.setRef : void 0;
|
|
3198
|
+
return I.createElement(Lo, null, I.createElement(Ao, {
|
|
3199
|
+
animation: N
|
|
3200
|
+
}, c && O ? I.createElement(ko, {
|
|
3201
|
+
key: O,
|
|
3202
|
+
id: c.id,
|
|
3203
|
+
ref: E,
|
|
3204
|
+
as: u,
|
|
3205
|
+
activatorEvent: f,
|
|
3206
|
+
adjustScale: t,
|
|
3207
|
+
className: s,
|
|
3208
|
+
transition: i,
|
|
3209
|
+
rect: P,
|
|
3210
|
+
style: {
|
|
3211
|
+
zIndex: a,
|
|
3212
|
+
...o
|
|
3213
|
+
},
|
|
3214
|
+
transform: m
|
|
3215
|
+
}, n) : null));
|
|
3216
|
+
});
|
|
3217
|
+
function nt(e, t, n) {
|
|
3218
|
+
const r = e.slice();
|
|
3219
|
+
return r.splice(n < 0 ? r.length + n : n, 0, r.splice(t, 1)[0]), r;
|
|
3220
|
+
}
|
|
3221
|
+
function Uo(e, t) {
|
|
3222
|
+
return e.reduce((n, r, o) => {
|
|
3223
|
+
const i = t.get(r);
|
|
3224
|
+
return i && (n[o] = i), n;
|
|
3225
|
+
}, Array(e.length));
|
|
3226
|
+
}
|
|
3227
|
+
function ct(e) {
|
|
3228
|
+
return e !== null && e >= 0;
|
|
3229
|
+
}
|
|
3230
|
+
function Wo(e, t) {
|
|
3231
|
+
if (e === t)
|
|
3232
|
+
return !0;
|
|
3233
|
+
if (e.length !== t.length)
|
|
3234
|
+
return !1;
|
|
3235
|
+
for (let n = 0; n < e.length; n++)
|
|
3236
|
+
if (e[n] !== t[n])
|
|
3237
|
+
return !1;
|
|
3238
|
+
return !0;
|
|
3239
|
+
}
|
|
3240
|
+
function Yo(e) {
|
|
3241
|
+
return typeof e == "boolean" ? {
|
|
3242
|
+
draggable: e,
|
|
3243
|
+
droppable: e
|
|
3244
|
+
} : e;
|
|
3245
|
+
}
|
|
3246
|
+
const jn = (e) => {
|
|
3247
|
+
let {
|
|
3248
|
+
rects: t,
|
|
3249
|
+
activeIndex: n,
|
|
3250
|
+
overIndex: r,
|
|
3251
|
+
index: o
|
|
3252
|
+
} = e;
|
|
3253
|
+
const i = nt(t, r, n), d = t[o], u = i[o];
|
|
3254
|
+
return !u || !d ? null : {
|
|
3255
|
+
x: u.left - d.left,
|
|
3256
|
+
y: u.top - d.top,
|
|
3257
|
+
scaleX: u.width / d.width,
|
|
3258
|
+
scaleY: u.height / d.height
|
|
3259
|
+
};
|
|
3260
|
+
}, dt = {
|
|
3261
|
+
scaleX: 1,
|
|
3262
|
+
scaleY: 1
|
|
3263
|
+
}, Xo = (e) => {
|
|
3264
|
+
var t;
|
|
3265
|
+
let {
|
|
3266
|
+
activeIndex: n,
|
|
3267
|
+
activeNodeRect: r,
|
|
3268
|
+
index: o,
|
|
3269
|
+
rects: i,
|
|
3270
|
+
overIndex: d
|
|
3271
|
+
} = e;
|
|
3272
|
+
const u = (t = i[n]) != null ? t : r;
|
|
3273
|
+
if (!u)
|
|
3274
|
+
return null;
|
|
3275
|
+
if (o === n) {
|
|
3276
|
+
const a = i[d];
|
|
3277
|
+
return a ? {
|
|
3278
|
+
x: 0,
|
|
3279
|
+
y: n < d ? a.top + a.height - (u.top + u.height) : a.top - u.top,
|
|
3280
|
+
...dt
|
|
3281
|
+
} : null;
|
|
3282
|
+
}
|
|
3283
|
+
const s = Ko(i, o, n);
|
|
3284
|
+
return o > n && o <= d ? {
|
|
3285
|
+
x: 0,
|
|
3286
|
+
y: -u.height - s,
|
|
3287
|
+
...dt
|
|
3288
|
+
} : o < n && o >= d ? {
|
|
3289
|
+
x: 0,
|
|
3290
|
+
y: u.height + s,
|
|
3291
|
+
...dt
|
|
3292
|
+
} : {
|
|
3293
|
+
x: 0,
|
|
3294
|
+
y: 0,
|
|
3295
|
+
...dt
|
|
3296
|
+
};
|
|
3297
|
+
};
|
|
3298
|
+
function Ko(e, t, n) {
|
|
3299
|
+
const r = e[t], o = e[t - 1], i = e[t + 1];
|
|
3300
|
+
return r ? n < t ? o ? r.top - (o.top + o.height) : i ? i.top - (r.top + r.height) : 0 : i ? i.top - (r.top + r.height) : o ? r.top - (o.top + o.height) : 0 : 0;
|
|
3301
|
+
}
|
|
3302
|
+
const Bn = "Sortable", $n = /* @__PURE__ */ I.createContext({
|
|
3303
|
+
activeIndex: -1,
|
|
3304
|
+
containerId: Bn,
|
|
3305
|
+
disableTransforms: !1,
|
|
3306
|
+
items: [],
|
|
3307
|
+
overIndex: -1,
|
|
3308
|
+
useDragOverlay: !1,
|
|
3309
|
+
sortedRects: [],
|
|
3310
|
+
strategy: jn,
|
|
3311
|
+
disabled: {
|
|
3312
|
+
draggable: !1,
|
|
3313
|
+
droppable: !1
|
|
3314
|
+
}
|
|
3315
|
+
});
|
|
3316
|
+
function Go(e) {
|
|
3317
|
+
let {
|
|
3318
|
+
children: t,
|
|
3319
|
+
id: n,
|
|
3320
|
+
items: r,
|
|
3321
|
+
strategy: o = jn,
|
|
3322
|
+
disabled: i = !1
|
|
3323
|
+
} = e;
|
|
3324
|
+
const {
|
|
3325
|
+
active: d,
|
|
3326
|
+
dragOverlay: u,
|
|
3327
|
+
droppableRects: s,
|
|
3328
|
+
over: a,
|
|
3329
|
+
measureDroppableContainers: f
|
|
3330
|
+
} = zn(), c = at(Bn, n), l = u.rect !== null, g = L(() => r.map((R) => typeof R == "object" && "id" in R ? R.id : R), [r]), b = d != null, p = d ? g.indexOf(d.id) : -1, h = a ? g.indexOf(a.id) : -1, S = z(g), w = !Wo(g, S.current), x = h !== -1 && p === -1 || w, C = Yo(i);
|
|
3331
|
+
be(() => {
|
|
3332
|
+
w && b && f(g);
|
|
3333
|
+
}, [w, g, b, f]), j(() => {
|
|
3334
|
+
S.current = g;
|
|
3335
|
+
}, [g]);
|
|
3336
|
+
const D = L(
|
|
3337
|
+
() => ({
|
|
3338
|
+
activeIndex: p,
|
|
3339
|
+
containerId: c,
|
|
3340
|
+
disabled: C,
|
|
3341
|
+
disableTransforms: x,
|
|
3342
|
+
items: g,
|
|
3343
|
+
overIndex: h,
|
|
3344
|
+
useDragOverlay: l,
|
|
3345
|
+
sortedRects: Uo(g, s),
|
|
3346
|
+
strategy: o
|
|
3347
|
+
}),
|
|
3348
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3349
|
+
[p, c, C.draggable, C.droppable, x, g, h, s, l, o]
|
|
3350
|
+
);
|
|
3351
|
+
return I.createElement($n.Provider, {
|
|
3352
|
+
value: D
|
|
3353
|
+
}, t);
|
|
3354
|
+
}
|
|
3355
|
+
const Vo = (e) => {
|
|
3356
|
+
let {
|
|
3357
|
+
id: t,
|
|
3358
|
+
items: n,
|
|
3359
|
+
activeIndex: r,
|
|
3360
|
+
overIndex: o
|
|
3361
|
+
} = e;
|
|
3362
|
+
return nt(n, r, o).indexOf(t);
|
|
3363
|
+
}, qo = (e) => {
|
|
3364
|
+
let {
|
|
3365
|
+
containerId: t,
|
|
3366
|
+
isSorting: n,
|
|
3367
|
+
wasDragging: r,
|
|
3368
|
+
index: o,
|
|
3369
|
+
items: i,
|
|
3370
|
+
newIndex: d,
|
|
3371
|
+
previousItems: u,
|
|
3372
|
+
previousContainerId: s,
|
|
3373
|
+
transition: a
|
|
3374
|
+
} = e;
|
|
3375
|
+
return !a || !r || u !== i && o === d ? !1 : n ? !0 : d !== o && t === s;
|
|
3376
|
+
}, Jo = {
|
|
3377
|
+
duration: 200,
|
|
3378
|
+
easing: "ease"
|
|
3379
|
+
}, Fn = "transform", Zo = /* @__PURE__ */ De.Transition.toString({
|
|
3380
|
+
property: Fn,
|
|
3381
|
+
duration: 0,
|
|
3382
|
+
easing: "linear"
|
|
3383
|
+
}), Qo = {
|
|
3384
|
+
roleDescription: "sortable"
|
|
3385
|
+
};
|
|
3386
|
+
function ei(e) {
|
|
3387
|
+
let {
|
|
3388
|
+
disabled: t,
|
|
3389
|
+
index: n,
|
|
3390
|
+
node: r,
|
|
3391
|
+
rect: o
|
|
3392
|
+
} = e;
|
|
3393
|
+
const [i, d] = H(null), u = z(n);
|
|
3394
|
+
return be(() => {
|
|
3395
|
+
if (!t && n !== u.current && r.current) {
|
|
3396
|
+
const s = o.current;
|
|
3397
|
+
if (s) {
|
|
3398
|
+
const a = Xe(r.current, {
|
|
3399
|
+
ignoreTransform: !0
|
|
3400
|
+
}), f = {
|
|
3401
|
+
x: s.left - a.left,
|
|
3402
|
+
y: s.top - a.top,
|
|
3403
|
+
scaleX: s.width / a.width,
|
|
3404
|
+
scaleY: s.height / a.height
|
|
3405
|
+
};
|
|
3406
|
+
(f.x || f.y) && d(f);
|
|
3407
|
+
}
|
|
3408
|
+
}
|
|
3409
|
+
n !== u.current && (u.current = n);
|
|
3410
|
+
}, [t, n, r, o]), j(() => {
|
|
3411
|
+
i && d(null);
|
|
3412
|
+
}, [i]), i;
|
|
3413
|
+
}
|
|
3414
|
+
function ti(e) {
|
|
3415
|
+
let {
|
|
3416
|
+
animateLayoutChanges: t = qo,
|
|
3417
|
+
attributes: n,
|
|
3418
|
+
disabled: r,
|
|
3419
|
+
data: o,
|
|
3420
|
+
getNewIndex: i = Vo,
|
|
3421
|
+
id: d,
|
|
3422
|
+
strategy: u,
|
|
3423
|
+
resizeObserverConfig: s,
|
|
3424
|
+
transition: a = Jo
|
|
3425
|
+
} = e;
|
|
3426
|
+
const {
|
|
3427
|
+
items: f,
|
|
3428
|
+
containerId: c,
|
|
3429
|
+
activeIndex: l,
|
|
3430
|
+
disabled: g,
|
|
3431
|
+
disableTransforms: b,
|
|
3432
|
+
sortedRects: p,
|
|
3433
|
+
overIndex: h,
|
|
3434
|
+
useDragOverlay: S,
|
|
3435
|
+
strategy: w
|
|
3436
|
+
} = Pe($n), x = ni(r, g), C = f.indexOf(d), D = L(() => ({
|
|
3437
|
+
sortable: {
|
|
3438
|
+
containerId: c,
|
|
3439
|
+
index: C,
|
|
3440
|
+
items: f
|
|
3441
|
+
},
|
|
3442
|
+
...o
|
|
3443
|
+
}), [c, o, C, f]), R = L(() => f.slice(f.indexOf(d)), [f, d]), {
|
|
3444
|
+
rect: O,
|
|
3445
|
+
node: m,
|
|
3446
|
+
isOver: P,
|
|
3447
|
+
setNodeRef: N
|
|
3448
|
+
} = Io({
|
|
3449
|
+
id: d,
|
|
3450
|
+
data: D,
|
|
3451
|
+
disabled: x.droppable,
|
|
3452
|
+
resizeObserverConfig: {
|
|
3453
|
+
updateMeasurementsFor: R,
|
|
3454
|
+
...s
|
|
3455
|
+
}
|
|
3456
|
+
}), {
|
|
3457
|
+
active: E,
|
|
3458
|
+
activatorEvent: M,
|
|
3459
|
+
activeNodeRect: Q,
|
|
3460
|
+
attributes: re,
|
|
3461
|
+
setNodeRef: ve,
|
|
3462
|
+
listeners: he,
|
|
3463
|
+
isDragging: T,
|
|
3464
|
+
over: B,
|
|
3465
|
+
setActivatorNodeRef: W,
|
|
3466
|
+
transform: Se
|
|
3467
|
+
} = Eo({
|
|
3468
|
+
id: d,
|
|
3469
|
+
data: D,
|
|
3470
|
+
attributes: {
|
|
3471
|
+
...Qo,
|
|
3472
|
+
...n
|
|
3473
|
+
},
|
|
3474
|
+
disabled: x.draggable
|
|
3475
|
+
}), Te = lr(N, ve), V = !!E, pe = V && !b && ct(l) && ct(h), Ce = !S && T, ke = Ce && pe ? Se : null, ze = pe ? ke ?? (u ?? w)({
|
|
3476
|
+
rects: p,
|
|
3477
|
+
activeNodeRect: Q,
|
|
3478
|
+
activeIndex: l,
|
|
3479
|
+
overIndex: h,
|
|
3480
|
+
index: C
|
|
3481
|
+
}) : null, ce = ct(l) && ct(h) ? i({
|
|
3482
|
+
id: d,
|
|
3483
|
+
items: f,
|
|
3484
|
+
activeIndex: l,
|
|
3485
|
+
overIndex: h
|
|
3486
|
+
}) : C, y = E == null ? void 0 : E.id, v = z({
|
|
3487
|
+
activeId: y,
|
|
3488
|
+
items: f,
|
|
3489
|
+
newIndex: ce,
|
|
3490
|
+
containerId: c
|
|
3491
|
+
}), _ = f !== v.current.items, A = t({
|
|
3492
|
+
active: E,
|
|
3493
|
+
containerId: c,
|
|
3494
|
+
isDragging: T,
|
|
3495
|
+
isSorting: V,
|
|
3496
|
+
id: d,
|
|
3497
|
+
index: C,
|
|
3498
|
+
items: f,
|
|
3499
|
+
newIndex: v.current.newIndex,
|
|
3500
|
+
previousItems: v.current.items,
|
|
3501
|
+
previousContainerId: v.current.containerId,
|
|
3502
|
+
transition: a,
|
|
3503
|
+
wasDragging: v.current.activeId != null
|
|
3504
|
+
}), Y = ei({
|
|
3505
|
+
disabled: !A,
|
|
3506
|
+
index: C,
|
|
3507
|
+
node: m,
|
|
3508
|
+
rect: O
|
|
3509
|
+
});
|
|
3510
|
+
return j(() => {
|
|
3511
|
+
V && v.current.newIndex !== ce && (v.current.newIndex = ce), c !== v.current.containerId && (v.current.containerId = c), f !== v.current.items && (v.current.items = f);
|
|
3512
|
+
}, [V, ce, c, f]), j(() => {
|
|
3513
|
+
if (y === v.current.activeId)
|
|
3514
|
+
return;
|
|
3515
|
+
if (y != null && v.current.activeId == null) {
|
|
3516
|
+
v.current.activeId = y;
|
|
3517
|
+
return;
|
|
3518
|
+
}
|
|
3519
|
+
const ie = setTimeout(() => {
|
|
3520
|
+
v.current.activeId = y;
|
|
3521
|
+
}, 50);
|
|
3522
|
+
return () => clearTimeout(ie);
|
|
3523
|
+
}, [y]), {
|
|
3524
|
+
active: E,
|
|
3525
|
+
activeIndex: l,
|
|
3526
|
+
attributes: re,
|
|
3527
|
+
data: D,
|
|
3528
|
+
rect: O,
|
|
3529
|
+
index: C,
|
|
3530
|
+
newIndex: ce,
|
|
3531
|
+
items: f,
|
|
3532
|
+
isOver: P,
|
|
3533
|
+
isSorting: V,
|
|
3534
|
+
isDragging: T,
|
|
3535
|
+
listeners: he,
|
|
3536
|
+
node: m,
|
|
3537
|
+
overIndex: h,
|
|
3538
|
+
over: B,
|
|
3539
|
+
setNodeRef: Te,
|
|
3540
|
+
setActivatorNodeRef: W,
|
|
3541
|
+
setDroppableNodeRef: N,
|
|
3542
|
+
setDraggableNodeRef: ve,
|
|
3543
|
+
transform: Y ?? ze,
|
|
3544
|
+
transition: $()
|
|
3545
|
+
};
|
|
3546
|
+
function $() {
|
|
3547
|
+
if (
|
|
3548
|
+
// Temporarily disable transitions for a single frame to set up derived transforms
|
|
3549
|
+
Y || // Or to prevent items jumping to back to their "new" position when items change
|
|
3550
|
+
_ && v.current.newIndex === C
|
|
3551
|
+
)
|
|
3552
|
+
return Zo;
|
|
3553
|
+
if (!(Ce && !xt(M) || !a) && (V || A))
|
|
3554
|
+
return De.Transition.toString({
|
|
3555
|
+
...a,
|
|
3556
|
+
property: Fn
|
|
3557
|
+
});
|
|
3558
|
+
}
|
|
3559
|
+
}
|
|
3560
|
+
function ni(e, t) {
|
|
3561
|
+
var n, r;
|
|
3562
|
+
return typeof e == "boolean" ? {
|
|
3563
|
+
draggable: e,
|
|
3564
|
+
// Backwards compatibility
|
|
3565
|
+
droppable: !1
|
|
3566
|
+
} : {
|
|
3567
|
+
draggable: (n = e == null ? void 0 : e.draggable) != null ? n : t.draggable,
|
|
3568
|
+
droppable: (r = e == null ? void 0 : e.droppable) != null ? r : t.droppable
|
|
3569
|
+
};
|
|
3570
|
+
}
|
|
3571
|
+
k.Down, k.Right, k.Up, k.Left;
|
|
3572
|
+
function Ee() {
|
|
3573
|
+
return Ee = Object.assign || function(e) {
|
|
3574
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
3575
|
+
var n = arguments[t];
|
|
3576
|
+
for (var r in n)
|
|
3577
|
+
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
3578
|
+
}
|
|
3579
|
+
return e;
|
|
3580
|
+
}, Ee.apply(this, arguments);
|
|
3581
|
+
}
|
|
3582
|
+
function Kt(e, t) {
|
|
3583
|
+
if (e == null) return {};
|
|
3584
|
+
var n = {}, r = Object.keys(e), o, i;
|
|
3585
|
+
for (i = 0; i < r.length; i++)
|
|
3586
|
+
o = r[i], !(t.indexOf(o) >= 0) && (n[o] = e[o]);
|
|
3587
|
+
return n;
|
|
3588
|
+
}
|
|
3589
|
+
function ri(e, t) {
|
|
3590
|
+
if (e) {
|
|
3591
|
+
if (typeof e == "string") return hn(e, t);
|
|
3592
|
+
var n = Object.prototype.toString.call(e).slice(8, -1);
|
|
3593
|
+
if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e);
|
|
3594
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return hn(e, t);
|
|
3595
|
+
}
|
|
3596
|
+
}
|
|
3597
|
+
function hn(e, t) {
|
|
3598
|
+
(t == null || t > e.length) && (t = e.length);
|
|
3599
|
+
for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n];
|
|
3600
|
+
return r;
|
|
3601
|
+
}
|
|
3602
|
+
function Ct(e, t) {
|
|
3603
|
+
var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
3604
|
+
if (n) return (n = n.call(e)).next.bind(n);
|
|
3605
|
+
if (Array.isArray(e) || (n = ri(e)) || t) {
|
|
3606
|
+
n && (e = n);
|
|
3607
|
+
var r = 0;
|
|
3608
|
+
return function() {
|
|
3609
|
+
return r >= e.length ? {
|
|
3610
|
+
done: !0
|
|
3611
|
+
} : {
|
|
3612
|
+
done: !1,
|
|
3613
|
+
value: e[r++]
|
|
3614
|
+
};
|
|
3615
|
+
};
|
|
3616
|
+
}
|
|
3617
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
3618
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
3619
|
+
}
|
|
3620
|
+
function Hn(e, t) {
|
|
3621
|
+
t === void 0 && (t = {});
|
|
3622
|
+
var n = t.insertAt;
|
|
3623
|
+
if (!(!e || typeof document > "u")) {
|
|
3624
|
+
var r = document.head || document.getElementsByTagName("head")[0], o = document.createElement("style");
|
|
3625
|
+
o.type = "text/css", n === "top" && r.firstChild ? r.insertBefore(o, r.firstChild) : r.appendChild(o), o.styleSheet ? o.styleSheet.cssText = e : o.appendChild(document.createTextNode(e));
|
|
3626
|
+
}
|
|
3627
|
+
}
|
|
3628
|
+
var oi = `.dnd-sortable-tree_simple_wrapper{box-sizing:border-box;list-style:none;margin-bottom:-1px}.dnd-sortable-tree_simple_tree-item{align-items:center;border:1px solid #dedede;box-sizing:border-box;color:#222;display:flex;padding:10px;position:relative}.dnd-sortable-tree_simple_clone{display:inline-block;padding:5px;pointer-events:none}.dnd-sortable-tree_simple_clone>.dnd-sortable-tree_simple_tree-item{border-radius:4px;box-shadow:0 15px 15px 0 rgba(34,33,81,.1);padding-bottom:5px;padding-right:24px;padding-top:5px}.dnd-sortable-tree_simple_ghost{opacity:.5}.dnd-sortable-tree_simple_disable-selection{-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none}.dnd-sortable-tree_simple_disable-interaction{pointer-events:none}.dnd-sortable-tree_folder_tree-item-collapse_button{align-self:stretch;background:url("data:image/svg+xml;utf8,<svg width='10' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 70 41'><path d='M30.76 39.2402C31.885 40.3638 33.41 40.995 35 40.995C36.59 40.995 38.115 40.3638 39.24 39.2402L68.24 10.2402C69.2998 9.10284 69.8768 7.59846 69.8494 6.04406C69.822 4.48965 69.1923 3.00657 68.093 1.90726C66.9937 0.807959 65.5106 0.178263 63.9562 0.150837C62.4018 0.123411 60.8974 0.700397 59.76 1.76024L35 26.5102L10.24 1.76024C9.10259 0.700397 7.59822 0.123411 6.04381 0.150837C4.4894 0.178263 3.00632 0.807959 1.90702 1.90726C0.807714 3.00657 0.178019 4.48965 0.150593 6.04406C0.123167 7.59846 0.700153 9.10284 1.75999 10.2402L30.76 39.2402Z' /></svg>") no-repeat 50%;border:0;transition:transform .25s ease;width:20px}.dnd-sortable-tree_folder_tree-item-collapse_button-collapsed{transform:rotate(-90deg)}.dnd-sortable-tree_simple_handle{align-self:stretch;background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' width='12'><path d='M7 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 2zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 14zm6-8a2 2 0 1 0-.001-4.001A2 2 0 0 0 13 6zm0 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 14z'></path></svg>") no-repeat 50%;cursor:pointer;width:20px}.dnd-sortable-tree_simple_tree-item-collapse_button{align-self:stretch;background:url("data:image/svg+xml;utf8,<svg width='10' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 70 41'><path d='M30.76 39.2402C31.885 40.3638 33.41 40.995 35 40.995C36.59 40.995 38.115 40.3638 39.24 39.2402L68.24 10.2402C69.2998 9.10284 69.8768 7.59846 69.8494 6.04406C69.822 4.48965 69.1923 3.00657 68.093 1.90726C66.9937 0.807959 65.5106 0.178263 63.9562 0.150837C62.4018 0.123411 60.8974 0.700397 59.76 1.76024L35 26.5102L10.24 1.76024C9.10259 0.700397 7.59822 0.123411 6.04381 0.150837C4.4894 0.178263 3.00632 0.807959 1.90702 1.90726C0.807714 3.00657 0.178019 4.48965 0.150593 6.04406C0.123167 7.59846 0.700153 9.10284 1.75999 10.2402L30.76 39.2402Z' /></svg>") no-repeat 50%;border:0;transition:transform .25s ease;width:20px}.dnd-sortable-tree_folder_simple-item-collapse_button-collapsed{transform:rotate(-90deg)}`;
|
|
3629
|
+
Hn(oi);
|
|
3630
|
+
var ii = `.dnd-sortable-tree_folder_wrapper{box-sizing:border-box;display:flex;flex-direction:row;list-style:none;margin-bottom:-1px}.dnd-sortable-tree_folder_tree-item{align-items:center;box-sizing:border-box;display:flex;padding:7px 0;position:relative}.dnd-sortable-tree_folder_clone{display:inline-block;padding:5px;pointer-events:none}.dnd-sortable-tree_folder_clone>.dnd-sortable-tree_folder_tree-item{border-radius:4px;padding-bottom:5px;padding-right:24px;padding-top:5px}.dnd-sortable-tree_folder_ghost{opacity:.5}.dnd-sortable-tree_folder_disable-selection{-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none}.dnd-sortable-tree_folder_disable-interaction{pointer-events:none}.dnd-sortable-tree_folder_line{align-self:stretch;background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><line stroke='black' style='stroke-width: 1px;' x1='50%' y1='0' x2='50%' y2='100%'/></svg>");width:20px}.dnd-sortable-tree_folder_line-last{align-self:stretch;width:20px}.dnd-sortable-tree_folder_line-to_self{align-self:stretch;background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><line stroke='black' style='stroke-width: 1px;' x1='50%' y1='0' x2='50%' y2='100%'/><line stroke='black' style='stroke-width: 1px;' x1='50%' y1='50%' x2='100%' y2='50%'/></svg>");width:20px}.dnd-sortable-tree_folder_line-to_self-last{align-self:stretch;background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><line stroke='black' style='stroke-width: 1px;' x1='50%' y1='0' x2='50%' y2='50%'/><line stroke='black' style='stroke-width: 1px;' x1='50%' y1='50%' x2='100%' y2='50%'/></svg>");width:20px}.dnd-sortable-tree_folder_tree-item-collapse_button{align-self:stretch;background:url("data:image/svg+xml;utf8,<svg width='10' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 70 41'><path d='M30.76 39.2402C31.885 40.3638 33.41 40.995 35 40.995C36.59 40.995 38.115 40.3638 39.24 39.2402L68.24 10.2402C69.2998 9.10284 69.8768 7.59846 69.8494 6.04406C69.822 4.48965 69.1923 3.00657 68.093 1.90726C66.9937 0.807959 65.5106 0.178263 63.9562 0.150837C62.4018 0.123411 60.8974 0.700397 59.76 1.76024L35 26.5102L10.24 1.76024C9.10259 0.700397 7.59822 0.123411 6.04381 0.150837C4.4894 0.178263 3.00632 0.807959 1.90702 1.90726C0.807714 3.00657 0.178019 4.48965 0.150593 6.04406C0.123167 7.59846 0.700153 9.10284 1.75999 10.2402L30.76 39.2402Z' /></svg>") no-repeat 50%;border:0;transition:transform .25s ease;width:20px}.dnd-sortable-tree_folder_tree-item-collapse_button-collapsed{transform:rotate(-90deg)}.dnd-sortable-tree_folder_handle{align-self:stretch;background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' width='12'><path d='M7 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 2zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 14zm6-8a2 2 0 1 0-.001-4.001A2 2 0 0 0 13 6zm0 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 14z'></path></svg>") no-repeat 50%;cursor:pointer;width:20px}`;
|
|
3631
|
+
Hn(ii);
|
|
3632
|
+
var ai = ["clone", "depth", "disableSelection", "disableInteraction", "disableSorting", "ghost", "handleProps", "indentationWidth", "indicator", "collapsed", "onCollapse", "onRemove", "item", "wrapperRef", "style", "isLast", "parent", "hideCollapseButton", "childCount", "manualDrag", "showDragHandle", "disableCollapseOnItemClick", "className", "contentClassName", "isOver", "isOverParent"];
|
|
3633
|
+
function Un(e) {
|
|
3634
|
+
return e ? [].concat(Un(e.parent), [e]) : [];
|
|
3635
|
+
}
|
|
3636
|
+
var Oi = /* @__PURE__ */ pn(function(e, t) {
|
|
3637
|
+
var n = e.clone, r = e.disableSelection, o = e.disableInteraction, i = e.disableSorting, d = e.ghost, u = e.handleProps, s = e.collapsed, a = e.onCollapse, f = e.wrapperRef, c = e.style, l = e.isLast, g = e.parent, b = e.hideCollapseButton, p = e.childCount, h = e.manualDrag, S = e.showDragHandle, w = e.disableCollapseOnItemClick, x = e.className, C = e.contentClassName, D = Kt(e, ai), R = Un(g);
|
|
3638
|
+
return I.createElement("li", Object.assign({}, D, {
|
|
3639
|
+
className: _t("dnd-sortable-tree_folder_wrapper", n && "dnd-sortable-tree_folder_clone", d && "dnd-sortable-tree_folder_ghost", r && "dnd-sortable-tree_folder_disable-selection", o && "dnd-sortable-tree_folder_disable-interaction", x),
|
|
3640
|
+
ref: f,
|
|
3641
|
+
style: c
|
|
3642
|
+
}), R.map(function(O) {
|
|
3643
|
+
return I.createElement("div", {
|
|
3644
|
+
key: O.id,
|
|
3645
|
+
className: O.isLast ? "dnd-sortable-tree_folder_line-last" : "dnd-sortable-tree_folder_line"
|
|
3646
|
+
});
|
|
3647
|
+
}), I.createElement("div", {
|
|
3648
|
+
className: l ? "dnd-sortable-tree_folder_line-to_self-last" : "dnd-sortable-tree_folder_line-to_self"
|
|
3649
|
+
}), h && S && !i && I.createElement("div", Object.assign({
|
|
3650
|
+
className: "dnd-sortable-tree_folder_handle"
|
|
3651
|
+
}, u)), !h && !b && !!a && !!p && I.createElement("button", {
|
|
3652
|
+
onClick: function(m) {
|
|
3653
|
+
m.preventDefault(), a == null || a();
|
|
3654
|
+
},
|
|
3655
|
+
className: _t("dnd-sortable-tree_folder_tree-item-collapse_button", s && "dnd-sortable-tree_folder_tree-item-collapse_button-collapsed")
|
|
3656
|
+
}), I.createElement("div", Object.assign({
|
|
3657
|
+
className: _t("dnd-sortable-tree_folder_tree-item", C),
|
|
3658
|
+
ref: t
|
|
3659
|
+
}, h ? void 0 : u, {
|
|
3660
|
+
onClick: w ? void 0 : a
|
|
3661
|
+
}), e.children));
|
|
3662
|
+
}), si = typeof window < "u" ? /* @__PURE__ */ /iPad|iPhone|iPod/.test(navigator.platform) : !1;
|
|
3663
|
+
function li(e, t) {
|
|
3664
|
+
return Math.round(e / t);
|
|
3665
|
+
}
|
|
3666
|
+
var Mt = function() {
|
|
3667
|
+
};
|
|
3668
|
+
function ci(e, t, n, r, o, i, d) {
|
|
3669
|
+
var u, s, a;
|
|
3670
|
+
if (Mt(), Mt = function() {
|
|
3671
|
+
}, !t || !n) return null;
|
|
3672
|
+
var f = e.findIndex(function(T) {
|
|
3673
|
+
var B = T.id;
|
|
3674
|
+
return B === n;
|
|
3675
|
+
}), c = e.findIndex(function(T) {
|
|
3676
|
+
var B = T.id;
|
|
3677
|
+
return B === t;
|
|
3678
|
+
}), l = e[c];
|
|
3679
|
+
if (i) {
|
|
3680
|
+
var g, b, p, h, S, w = e[f];
|
|
3681
|
+
return w = ve(w, l, d), w === void 0 ? null : {
|
|
3682
|
+
depth: (g = (b = w) == null ? void 0 : b.depth) != null ? g : 1,
|
|
3683
|
+
parentId: (p = (h = w) == null ? void 0 : h.id) != null ? p : null,
|
|
3684
|
+
parent: w,
|
|
3685
|
+
isLast: !!((S = w) != null && S.isLast)
|
|
3686
|
+
};
|
|
3687
|
+
}
|
|
3688
|
+
var x = nt(e, c, f), C = x[f - 1], D = x[f + 1], R = li(r, o), O = l.depth + R, m = O, P = re(m - 1, C), N = ve(P, l, d);
|
|
3689
|
+
if (N === void 0) return null;
|
|
3690
|
+
var E = ((u = N == null ? void 0 : N.depth) != null ? u : -1) + 1, M = (s = D == null ? void 0 : D.depth) != null ? s : 0;
|
|
3691
|
+
if (M > E) return null;
|
|
3692
|
+
m >= E ? m = E : m < M && (m = M);
|
|
3693
|
+
var Q = ((a = D == null ? void 0 : D.depth) != null ? a : -1) < m;
|
|
3694
|
+
return N && N.isLast && (Mt = function() {
|
|
3695
|
+
N.isLast = !0;
|
|
3696
|
+
}, N.isLast = !1), {
|
|
3697
|
+
depth: m,
|
|
3698
|
+
parentId: he(),
|
|
3699
|
+
parent: N,
|
|
3700
|
+
isLast: Q
|
|
3701
|
+
};
|
|
3702
|
+
function re(T, B) {
|
|
3703
|
+
if (!B) return null;
|
|
3704
|
+
for (; T < B.depth; ) {
|
|
3705
|
+
if (B.parent === null) return null;
|
|
3706
|
+
B = B.parent;
|
|
3707
|
+
}
|
|
3708
|
+
return B;
|
|
3709
|
+
}
|
|
3710
|
+
function ve(T, B, W) {
|
|
3711
|
+
if (!T) {
|
|
3712
|
+
var Se = typeof W == "function" ? W(B) : W;
|
|
3713
|
+
return Se === !1 ? void 0 : T;
|
|
3714
|
+
}
|
|
3715
|
+
var Te = typeof T.canHaveChildren == "function" ? T.canHaveChildren(B) : T.canHaveChildren;
|
|
3716
|
+
return Te === !1 ? ve(T.parent, l, W) : T;
|
|
3717
|
+
}
|
|
3718
|
+
function he() {
|
|
3719
|
+
var T;
|
|
3720
|
+
if (m === 0 || !C)
|
|
3721
|
+
return null;
|
|
3722
|
+
if (m === C.depth)
|
|
3723
|
+
return C.parentId;
|
|
3724
|
+
if (m > C.depth)
|
|
3725
|
+
return C.id;
|
|
3726
|
+
var B = (T = x.slice(0, f).reverse().find(function(W) {
|
|
3727
|
+
return W.depth === m;
|
|
3728
|
+
})) == null ? void 0 : T.parentId;
|
|
3729
|
+
return B ?? null;
|
|
3730
|
+
}
|
|
3731
|
+
}
|
|
3732
|
+
function Wn(e, t, n, r) {
|
|
3733
|
+
return t === void 0 && (t = null), n === void 0 && (n = 0), r === void 0 && (r = null), e.reduce(function(o, i, d) {
|
|
3734
|
+
var u, s = Ee({}, i, {
|
|
3735
|
+
parentId: t,
|
|
3736
|
+
depth: n,
|
|
3737
|
+
index: d,
|
|
3738
|
+
isLast: e.length === d + 1,
|
|
3739
|
+
parent: r
|
|
3740
|
+
});
|
|
3741
|
+
return [].concat(o, [s], Wn((u = i.children) != null ? u : [], i.id, n + 1, s));
|
|
3742
|
+
}, []);
|
|
3743
|
+
}
|
|
3744
|
+
function Pt(e) {
|
|
3745
|
+
return Wn(e);
|
|
3746
|
+
}
|
|
3747
|
+
function di(e) {
|
|
3748
|
+
for (var t, n, r = {
|
|
3749
|
+
id: "root",
|
|
3750
|
+
children: []
|
|
3751
|
+
}, o = (t = {}, t[r.id] = r, t), i = e.map(function(p) {
|
|
3752
|
+
return Ee({}, p, {
|
|
3753
|
+
children: []
|
|
3754
|
+
});
|
|
3755
|
+
}), d = Ct(i), u; !(u = d()).done; ) {
|
|
3756
|
+
var s, a, f, c = u.value, l = c.id, g = (s = c.parentId) != null ? s : r.id, b = (a = o[g]) != null ? a : ui(i, g);
|
|
3757
|
+
c.parent = null, o[l] = c, b == null || (f = b.children) == null || f.push(c);
|
|
3758
|
+
}
|
|
3759
|
+
return (n = r.children) != null ? n : [];
|
|
3760
|
+
}
|
|
3761
|
+
function ui(e, t) {
|
|
3762
|
+
return e.find(function(n) {
|
|
3763
|
+
var r = n.id;
|
|
3764
|
+
return r === t;
|
|
3765
|
+
});
|
|
3766
|
+
}
|
|
3767
|
+
function mt(e, t) {
|
|
3768
|
+
for (var n = Ct(e), r; !(r = n()).done; ) {
|
|
3769
|
+
var o = r.value, i = o.id, d = o.children;
|
|
3770
|
+
if (i === t)
|
|
3771
|
+
return o;
|
|
3772
|
+
if (d != null && d.length) {
|
|
3773
|
+
var u = mt(d, t);
|
|
3774
|
+
if (u)
|
|
3775
|
+
return u;
|
|
3776
|
+
}
|
|
3777
|
+
}
|
|
3778
|
+
}
|
|
3779
|
+
function Yn(e, t) {
|
|
3780
|
+
for (var n = [], r = Ct(e), o; !(o = r()).done; ) {
|
|
3781
|
+
var i, d = o.value;
|
|
3782
|
+
d.id !== t && ((i = d.children) != null && i.length && (d.children = Yn(d.children, t)), n.push(d));
|
|
3783
|
+
}
|
|
3784
|
+
return n;
|
|
3785
|
+
}
|
|
3786
|
+
function Xn(e, t, n, r) {
|
|
3787
|
+
for (var o = Ct(e), i; !(i = o()).done; ) {
|
|
3788
|
+
var d, u = i.value;
|
|
3789
|
+
if (u.id === t) {
|
|
3790
|
+
u[n] = r(u[n]);
|
|
3791
|
+
continue;
|
|
3792
|
+
}
|
|
3793
|
+
(d = u.children) != null && d.length && (u.children = Xn(u.children, t, n, r));
|
|
3794
|
+
}
|
|
3795
|
+
return [].concat(e);
|
|
3796
|
+
}
|
|
3797
|
+
function Kn(e, t) {
|
|
3798
|
+
return t === void 0 && (t = 0), e.reduce(function(n, r) {
|
|
3799
|
+
var o = r.children;
|
|
3800
|
+
return o != null && o.length ? Kn(o, n + 1) : n + 1;
|
|
3801
|
+
}, t);
|
|
3802
|
+
}
|
|
3803
|
+
function fi(e, t) {
|
|
3804
|
+
var n;
|
|
3805
|
+
if (!t)
|
|
3806
|
+
return 0;
|
|
3807
|
+
var r = mt(e, t);
|
|
3808
|
+
return r ? Kn((n = r.children) != null ? n : []) : 0;
|
|
3809
|
+
}
|
|
3810
|
+
function gi(e, t) {
|
|
3811
|
+
var n = [].concat(t);
|
|
3812
|
+
return e.filter(function(r) {
|
|
3813
|
+
if (r.parentId && n.includes(r.parentId)) {
|
|
3814
|
+
var o;
|
|
3815
|
+
return (o = r.children) != null && o.length && n.push(r.id), !1;
|
|
3816
|
+
}
|
|
3817
|
+
return !0;
|
|
3818
|
+
});
|
|
3819
|
+
}
|
|
3820
|
+
function Gn(e, t) {
|
|
3821
|
+
return !e || !t ? !1 : e.id === t ? !0 : Gn(e.parent, t);
|
|
3822
|
+
}
|
|
3823
|
+
var vi = ["id", "depth", "isLast", "TreeItemComponent", "parent", "disableSorting", "sortableProps", "keepGhostInPlace"], hi = function(t) {
|
|
3824
|
+
var n = t.isSorting, r = t.isDragging;
|
|
3825
|
+
return !(n || r);
|
|
3826
|
+
}, pi = function(t) {
|
|
3827
|
+
var n = t.id, r = t.depth, o = t.isLast, i = t.TreeItemComponent, d = t.parent, u = t.disableSorting, s = t.sortableProps, a = t.keepGhostInPlace, f = Kt(t, vi), c = ti(Ee({
|
|
3828
|
+
id: n,
|
|
3829
|
+
animateLayoutChanges: hi,
|
|
3830
|
+
disabled: u
|
|
3831
|
+
}, s)), l = c.attributes, g = c.isDragging, b = c.isSorting, p = c.listeners, h = c.setDraggableNodeRef, S = c.setDroppableNodeRef, w = c.transform, x = c.transition, C = c.isOver, D = c.over, R = L(function() {
|
|
3832
|
+
return !!(D != null && D.id) && Gn(d, D.id);
|
|
3833
|
+
}, [D == null ? void 0 : D.id]), O = {
|
|
3834
|
+
transform: De.Translate.toString(w),
|
|
3835
|
+
transition: x ?? void 0
|
|
3836
|
+
}, m = L(function() {
|
|
3837
|
+
if (f.onCollapse)
|
|
3838
|
+
return function() {
|
|
3839
|
+
return f.onCollapse == null ? void 0 : f.onCollapse(f.item.id);
|
|
3840
|
+
};
|
|
3841
|
+
}, [f.item.id, f.onCollapse]), P = L(function() {
|
|
3842
|
+
if (f.onRemove)
|
|
3843
|
+
return function() {
|
|
3844
|
+
return f.onRemove == null ? void 0 : f.onRemove(f.item.id);
|
|
3845
|
+
};
|
|
3846
|
+
}, [f.item.id, f.onRemove]);
|
|
3847
|
+
return I.createElement(i, Object.assign({}, f, {
|
|
3848
|
+
ref: h,
|
|
3849
|
+
wrapperRef: S,
|
|
3850
|
+
style: a ? void 0 : O,
|
|
3851
|
+
depth: r,
|
|
3852
|
+
ghost: g,
|
|
3853
|
+
disableSelection: si,
|
|
3854
|
+
disableInteraction: b,
|
|
3855
|
+
isLast: o,
|
|
3856
|
+
parent: d,
|
|
3857
|
+
handleProps: Ee({}, l, p),
|
|
3858
|
+
onCollapse: m,
|
|
3859
|
+
onRemove: P,
|
|
3860
|
+
disableSorting: u,
|
|
3861
|
+
isOver: C,
|
|
3862
|
+
isOverParent: R
|
|
3863
|
+
}));
|
|
3864
|
+
}, bi = /* @__PURE__ */ I.memo(pi), mi = function(t) {
|
|
3865
|
+
var n = function(o) {
|
|
3866
|
+
var i = o.activeIndex, d = o.activeNodeRect, u = o.index, s = o.rects, a = o.overIndex;
|
|
3867
|
+
return t(i, a) ? Xo({
|
|
3868
|
+
activeIndex: i,
|
|
3869
|
+
activeNodeRect: d,
|
|
3870
|
+
index: u,
|
|
3871
|
+
rects: s,
|
|
3872
|
+
overIndex: a
|
|
3873
|
+
}) : null;
|
|
3874
|
+
};
|
|
3875
|
+
return n;
|
|
3876
|
+
}, yi = ["items", "indicator", "indentationWidth", "onItemsChanged", "TreeItemComponent", "pointerSensorOptions", "disableSorting", "dropAnimation", "dndContextProps", "sortableProps", "keepGhostInPlace", "canRootHaveChildren"], wi = {
|
|
3877
|
+
activationConstraint: {
|
|
3878
|
+
distance: 3
|
|
3879
|
+
}
|
|
3880
|
+
}, xi = {
|
|
3881
|
+
keyframes: function(t) {
|
|
3882
|
+
var n = t.transform;
|
|
3883
|
+
return [{
|
|
3884
|
+
opacity: 1,
|
|
3885
|
+
transform: De.Transform.toString(n.initial)
|
|
3886
|
+
}, {
|
|
3887
|
+
opacity: 0,
|
|
3888
|
+
transform: De.Transform.toString(Ee({}, n.final, {
|
|
3889
|
+
x: n.final.x + 5,
|
|
3890
|
+
y: n.final.y + 5
|
|
3891
|
+
}))
|
|
3892
|
+
}];
|
|
3893
|
+
},
|
|
3894
|
+
easing: "ease-out",
|
|
3895
|
+
sideEffects: function(t) {
|
|
3896
|
+
var n = t.active;
|
|
3897
|
+
n.node.animate([{
|
|
3898
|
+
opacity: 0
|
|
3899
|
+
}, {
|
|
3900
|
+
opacity: 1
|
|
3901
|
+
}], {
|
|
3902
|
+
duration: Bt.duration,
|
|
3903
|
+
easing: Bt.easing
|
|
3904
|
+
});
|
|
3905
|
+
}
|
|
3906
|
+
};
|
|
3907
|
+
function Ri(e) {
|
|
3908
|
+
var t = e.items, n = e.indicator, r = e.indentationWidth, o = r === void 0 ? 20 : r, i = e.onItemsChanged, d = e.TreeItemComponent, u = e.pointerSensorOptions, s = e.disableSorting, a = e.dropAnimation, f = e.dndContextProps, c = e.sortableProps, l = e.keepGhostInPlace, g = e.canRootHaveChildren, b = Kt(e, yi), p = H(null), h = p[0], S = p[1], w = H(null), x = w[0], C = w[1], D = H(0), R = D[0], O = D[1], m = H(null), P = m[0], N = m[1], E = L(function() {
|
|
3909
|
+
var y = Pt(t), v = y.reduce(function(A, Y) {
|
|
3910
|
+
var $ = Y.children, ie = Y.collapsed, K = Y.id;
|
|
3911
|
+
return ie && $ != null && $.length ? [].concat(A, [K]) : A;
|
|
3912
|
+
}, []), _ = gi(y, h ? [h].concat(v) : v);
|
|
3913
|
+
return _;
|
|
3914
|
+
}, [h, t]), M = ci(E, h, x, R, o, l ?? !1, g), Q = z({
|
|
3915
|
+
items: E,
|
|
3916
|
+
offset: R
|
|
3917
|
+
}), re = Sr(
|
|
3918
|
+
Dr(Yt, u ?? wi)
|
|
3919
|
+
// useSensor(KeyboardSensor, {
|
|
3920
|
+
// coordinateGetter,
|
|
3921
|
+
// })
|
|
3922
|
+
), ve = L(function() {
|
|
3923
|
+
return E.map(function(y) {
|
|
3924
|
+
var v = y.id;
|
|
3925
|
+
return v;
|
|
3926
|
+
});
|
|
3927
|
+
}, [E]), he = h ? E.find(function(y) {
|
|
3928
|
+
var v = y.id;
|
|
3929
|
+
return v === h;
|
|
3930
|
+
}) : null;
|
|
3931
|
+
j(function() {
|
|
3932
|
+
Q.current = {
|
|
3933
|
+
items: E,
|
|
3934
|
+
offset: R
|
|
3935
|
+
};
|
|
3936
|
+
}, [E, R]);
|
|
3937
|
+
var T = z(t);
|
|
3938
|
+
T.current = t;
|
|
3939
|
+
var B = U(function(y) {
|
|
3940
|
+
var v = mt(T.current, y);
|
|
3941
|
+
i(Yn(T.current, y), {
|
|
3942
|
+
type: "removed",
|
|
3943
|
+
item: v
|
|
3944
|
+
});
|
|
3945
|
+
}, [i]), W = U(function(v) {
|
|
3946
|
+
var _ = mt(T.current, v);
|
|
3947
|
+
i(Xn(T.current, v, "collapsed", function(A) {
|
|
3948
|
+
return !A;
|
|
3949
|
+
}), {
|
|
3950
|
+
type: _.collapsed ? "collapsed" : "expanded",
|
|
3951
|
+
item: _
|
|
3952
|
+
});
|
|
3953
|
+
}, [i]), Se = L(function() {
|
|
3954
|
+
return {
|
|
3955
|
+
onDragStart: function(v) {
|
|
3956
|
+
var _ = v.active;
|
|
3957
|
+
return "Picked up " + _.id + ".";
|
|
3958
|
+
},
|
|
3959
|
+
onDragMove: function(v) {
|
|
3960
|
+
var _ = v.active, A = v.over;
|
|
3961
|
+
return ce("onDragMove", _.id, A == null ? void 0 : A.id);
|
|
3962
|
+
},
|
|
3963
|
+
onDragOver: function(v) {
|
|
3964
|
+
var _ = v.active, A = v.over;
|
|
3965
|
+
return ce("onDragOver", _.id, A == null ? void 0 : A.id);
|
|
3966
|
+
},
|
|
3967
|
+
onDragEnd: function(v) {
|
|
3968
|
+
var _ = v.active, A = v.over;
|
|
3969
|
+
return ce("onDragEnd", _.id, A == null ? void 0 : A.id);
|
|
3970
|
+
},
|
|
3971
|
+
onDragCancel: function(v) {
|
|
3972
|
+
var _ = v.active;
|
|
3973
|
+
return "Moving was cancelled. " + _.id + " was dropped in its original position.";
|
|
3974
|
+
}
|
|
3975
|
+
};
|
|
3976
|
+
}, []), Te = U(function() {
|
|
3977
|
+
return !!M;
|
|
3978
|
+
}, [M]);
|
|
3979
|
+
return I.createElement(Co, Object.assign({
|
|
3980
|
+
accessibility: {
|
|
3981
|
+
announcements: Se
|
|
3982
|
+
},
|
|
3983
|
+
sensors: s ? void 0 : re,
|
|
3984
|
+
modifiers: n ? Si : void 0,
|
|
3985
|
+
collisionDetection: _r,
|
|
3986
|
+
// measuring={measuring}
|
|
3987
|
+
onDragStart: s ? void 0 : V,
|
|
3988
|
+
onDragMove: s ? void 0 : pe,
|
|
3989
|
+
onDragOver: s ? void 0 : Ce,
|
|
3990
|
+
onDragEnd: s ? void 0 : ke,
|
|
3991
|
+
onDragCancel: s ? void 0 : oe
|
|
3992
|
+
}, f), I.createElement(Go, {
|
|
3993
|
+
items: ve,
|
|
3994
|
+
strategy: s ? void 0 : mi(Te)
|
|
3995
|
+
}, E.map(function(y) {
|
|
3996
|
+
var v, _, A;
|
|
3997
|
+
return I.createElement(bi, Object.assign({}, b, {
|
|
3998
|
+
key: y.id,
|
|
3999
|
+
id: y.id,
|
|
4000
|
+
item: y,
|
|
4001
|
+
childCount: (v = y.children) == null ? void 0 : v.length,
|
|
4002
|
+
depth: y.id === h && M && !l ? M.depth : y.depth,
|
|
4003
|
+
indentationWidth: o,
|
|
4004
|
+
indicator: n,
|
|
4005
|
+
collapsed: !!(y.collapsed && ((_ = y.children) != null && _.length)),
|
|
4006
|
+
onCollapse: (A = y.children) != null && A.length ? W : void 0,
|
|
4007
|
+
onRemove: B,
|
|
4008
|
+
isLast: y.id === h && M ? M.isLast : y.isLast,
|
|
4009
|
+
parent: y.id === h && M ? M.parent : y.parent,
|
|
4010
|
+
TreeItemComponent: d,
|
|
4011
|
+
disableSorting: s,
|
|
4012
|
+
sortableProps: c,
|
|
4013
|
+
keepGhostInPlace: l
|
|
4014
|
+
}));
|
|
4015
|
+
}), He.createPortal(I.createElement(Ho, {
|
|
4016
|
+
dropAnimation: a === void 0 ? xi : a
|
|
4017
|
+
}, h && he ? I.createElement(d, Object.assign({}, b, {
|
|
4018
|
+
item: he,
|
|
4019
|
+
children: [],
|
|
4020
|
+
depth: he.depth,
|
|
4021
|
+
clone: !0,
|
|
4022
|
+
childCount: fi(t, h) + 1,
|
|
4023
|
+
indentationWidth: o,
|
|
4024
|
+
isLast: !1,
|
|
4025
|
+
parent: he.parent,
|
|
4026
|
+
isOver: !1,
|
|
4027
|
+
isOverParent: !1
|
|
4028
|
+
})) : null), document.body)));
|
|
4029
|
+
function V(y) {
|
|
4030
|
+
var v = y.active.id;
|
|
4031
|
+
S(v), C(v);
|
|
4032
|
+
var _ = E.find(function(A) {
|
|
4033
|
+
var Y = A.id;
|
|
4034
|
+
return Y === v;
|
|
4035
|
+
});
|
|
4036
|
+
_ && N({
|
|
4037
|
+
parentId: _.parentId,
|
|
4038
|
+
overId: v
|
|
4039
|
+
}), document.body.style.setProperty("cursor", "grabbing");
|
|
4040
|
+
}
|
|
4041
|
+
function pe(y) {
|
|
4042
|
+
var v = y.delta;
|
|
4043
|
+
O(v.x);
|
|
4044
|
+
}
|
|
4045
|
+
function Ce(y) {
|
|
4046
|
+
var v, _ = y.over;
|
|
4047
|
+
C((v = _ == null ? void 0 : _.id) != null ? v : null);
|
|
4048
|
+
}
|
|
4049
|
+
function ke(y) {
|
|
4050
|
+
var v = y.active, _ = y.over;
|
|
4051
|
+
if (ze(), M && _) {
|
|
4052
|
+
var A = M.depth, Y = M.parentId;
|
|
4053
|
+
if (l && _.id === v.id) return;
|
|
4054
|
+
var $ = Pt(t), ie = $.findIndex(function(te) {
|
|
4055
|
+
var ue = te.id;
|
|
4056
|
+
return ue === _.id;
|
|
4057
|
+
}), K = $.findIndex(function(te) {
|
|
4058
|
+
var ue = te.id;
|
|
4059
|
+
return ue === v.id;
|
|
4060
|
+
}), ye = $[K];
|
|
4061
|
+
$[K] = Ee({}, ye, {
|
|
4062
|
+
depth: A,
|
|
4063
|
+
parentId: Y
|
|
4064
|
+
});
|
|
4065
|
+
var je = ye.parent, Oe = nt($, K, ie), de = di(Oe), ee = Oe.find(function(te) {
|
|
4066
|
+
return te.id === v.id;
|
|
4067
|
+
}), _e = ee.parentId ? Oe.find(function(te) {
|
|
4068
|
+
return te.id === ee.parentId;
|
|
4069
|
+
}) : null;
|
|
4070
|
+
setTimeout(function() {
|
|
4071
|
+
return i(de, {
|
|
4072
|
+
type: "dropped",
|
|
4073
|
+
draggedItem: ee,
|
|
4074
|
+
draggedFromParent: je,
|
|
4075
|
+
droppedToParent: _e
|
|
4076
|
+
});
|
|
4077
|
+
});
|
|
4078
|
+
}
|
|
4079
|
+
}
|
|
4080
|
+
function oe() {
|
|
4081
|
+
ze();
|
|
4082
|
+
}
|
|
4083
|
+
function ze() {
|
|
4084
|
+
C(null), S(null), O(0), N(null), document.body.style.setProperty("cursor", "");
|
|
4085
|
+
}
|
|
4086
|
+
function ce(y, v, _) {
|
|
4087
|
+
if (_ && M) {
|
|
4088
|
+
if (y !== "onDragEnd") {
|
|
4089
|
+
if (P && M.parentId === P.parentId && _ === P.overId)
|
|
4090
|
+
return;
|
|
4091
|
+
N({
|
|
4092
|
+
parentId: M.parentId,
|
|
4093
|
+
overId: _
|
|
4094
|
+
});
|
|
4095
|
+
}
|
|
4096
|
+
var A = Pt(t), Y = A.findIndex(function(te) {
|
|
4097
|
+
var ue = te.id;
|
|
4098
|
+
return ue === _;
|
|
4099
|
+
}), $ = A.findIndex(function(te) {
|
|
4100
|
+
var ue = te.id;
|
|
4101
|
+
return ue === v;
|
|
4102
|
+
}), ie = nt(A, $, Y), K = ie[Y - 1], ye, je = y === "onDragEnd" ? "dropped" : "moved", Oe = y === "onDragEnd" ? "dropped" : "nested";
|
|
4103
|
+
if (K)
|
|
4104
|
+
if (M.depth > K.depth)
|
|
4105
|
+
ye = v + " was " + Oe + " under " + K.id + ".";
|
|
4106
|
+
else {
|
|
4107
|
+
for (var ee = K, _e = function() {
|
|
4108
|
+
var ue = ee.parentId;
|
|
4109
|
+
ee = ie.find(function(Ot) {
|
|
4110
|
+
var Rt = Ot.id;
|
|
4111
|
+
return Rt === ue;
|
|
4112
|
+
});
|
|
4113
|
+
}; ee && M.depth < ee.depth; )
|
|
4114
|
+
_e();
|
|
4115
|
+
ee && (ye = v + " was " + je + " after " + ee.id + ".");
|
|
4116
|
+
}
|
|
4117
|
+
else {
|
|
4118
|
+
var de = ie[Y + 1];
|
|
4119
|
+
ye = v + " was " + je + " before " + de.id + ".";
|
|
4120
|
+
}
|
|
4121
|
+
return ye;
|
|
4122
|
+
}
|
|
4123
|
+
}
|
|
4124
|
+
}
|
|
4125
|
+
var Di = function(t) {
|
|
4126
|
+
var n = t.transform;
|
|
4127
|
+
return Ee({}, n, {
|
|
4128
|
+
y: n.y - 25
|
|
4129
|
+
});
|
|
4130
|
+
}, Si = [Di];
|
|
4131
|
+
export {
|
|
4132
|
+
Oi as F,
|
|
4133
|
+
Ri as S,
|
|
4134
|
+
He as r
|
|
4135
|
+
};
|