react-composable-treeview 1.0.16 → 1.0.18
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 +7 -6
- package/dist/contexts/treeViewContext.d.ts +2 -1
- package/dist/hooks/useNodeMap.d.ts +3 -2
- package/dist/index.cjs +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +440 -417
- package/dist/index.js.map +1 -1
- package/dist/treeView.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
1
|
+
import Ye, { createContext as Me, useRef as J, useState as We, useCallback as Ue, forwardRef as H, useContext as I, useEffect as oe } from "react";
|
|
2
|
+
var de = { exports: {} }, q = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.production.min.js
|
|
@@ -9,21 +9,21 @@ var ce = { exports: {} }, G = {};
|
|
|
9
9
|
* This source code is licensed under the MIT license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
|
-
var
|
|
13
|
-
function
|
|
14
|
-
if (
|
|
15
|
-
|
|
16
|
-
var
|
|
17
|
-
function
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
for (
|
|
21
|
-
if (
|
|
22
|
-
return { $$typeof:
|
|
12
|
+
var Le;
|
|
13
|
+
function mr() {
|
|
14
|
+
if (Le) return q;
|
|
15
|
+
Le = 1;
|
|
16
|
+
var n = Ye, i = Symbol.for("react.element"), o = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, s = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
17
|
+
function g(u, f, S) {
|
|
18
|
+
var y, m = {}, w = null, k = null;
|
|
19
|
+
S !== void 0 && (w = "" + S), f.key !== void 0 && (w = "" + f.key), f.ref !== void 0 && (k = f.ref);
|
|
20
|
+
for (y in f) a.call(f, y) && !l.hasOwnProperty(y) && (m[y] = f[y]);
|
|
21
|
+
if (u && u.defaultProps) for (y in f = u.defaultProps, f) m[y] === void 0 && (m[y] = f[y]);
|
|
22
|
+
return { $$typeof: i, type: u, key: w, ref: k, props: m, _owner: s.current };
|
|
23
23
|
}
|
|
24
|
-
return
|
|
24
|
+
return q.Fragment = o, q.jsx = g, q.jsxs = g, q;
|
|
25
25
|
}
|
|
26
|
-
var
|
|
26
|
+
var K = {};
|
|
27
27
|
/**
|
|
28
28
|
* @license React
|
|
29
29
|
* react-jsx-runtime.development.js
|
|
@@ -33,91 +33,91 @@ var B = {};
|
|
|
33
33
|
* This source code is licensed under the MIT license found in the
|
|
34
34
|
* LICENSE file in the root directory of this source tree.
|
|
35
35
|
*/
|
|
36
|
-
var
|
|
37
|
-
function
|
|
38
|
-
return
|
|
39
|
-
var
|
|
40
|
-
function
|
|
36
|
+
var $e;
|
|
37
|
+
function br() {
|
|
38
|
+
return $e || ($e = 1, process.env.NODE_ENV !== "production" && function() {
|
|
39
|
+
var n = Ye, i = Symbol.for("react.element"), o = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), u = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), S = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), k = Symbol.for("react.offscreen"), P = Symbol.iterator, V = "@@iterator";
|
|
40
|
+
function N(e) {
|
|
41
41
|
if (e === null || typeof e != "object")
|
|
42
42
|
return null;
|
|
43
|
-
var r =
|
|
43
|
+
var r = P && e[P] || e[V];
|
|
44
44
|
return typeof r == "function" ? r : null;
|
|
45
45
|
}
|
|
46
|
-
var
|
|
47
|
-
function
|
|
46
|
+
var _ = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
47
|
+
function b(e) {
|
|
48
48
|
{
|
|
49
|
-
for (var r = arguments.length,
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), c = 1; c < r; c++)
|
|
50
|
+
t[c - 1] = arguments[c];
|
|
51
|
+
L("error", e, t);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function L(e, r, t) {
|
|
55
55
|
{
|
|
56
|
-
var
|
|
57
|
-
|
|
58
|
-
var
|
|
59
|
-
return String(
|
|
56
|
+
var c = _.ReactDebugCurrentFrame, v = c.getStackAddendum();
|
|
57
|
+
v !== "" && (r += "%s", t = t.concat([v]));
|
|
58
|
+
var h = t.map(function(p) {
|
|
59
|
+
return String(p);
|
|
60
60
|
});
|
|
61
|
-
|
|
61
|
+
h.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, h);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
var
|
|
65
|
-
|
|
66
|
-
function
|
|
67
|
-
return !!(typeof e == "string" || typeof e == "function" || e === a || e ===
|
|
64
|
+
var x = !1, D = !1, T = !1, j = !1, Z = !1, G;
|
|
65
|
+
G = Symbol.for("react.module.reference");
|
|
66
|
+
function Be(e) {
|
|
67
|
+
return !!(typeof e == "string" || typeof e == "function" || e === a || e === l || Z || e === s || e === S || e === y || j || e === k || x || D || T || typeof e == "object" && e !== null && (e.$$typeof === w || e.$$typeof === m || e.$$typeof === g || e.$$typeof === u || e.$$typeof === f || // This needs to include all possible module reference object
|
|
68
68
|
// types supported by any Flight configuration anywhere since
|
|
69
69
|
// we don't know which Flight build this will end up being used
|
|
70
70
|
// with.
|
|
71
|
-
e.$$typeof ===
|
|
71
|
+
e.$$typeof === G || e.getModuleId !== void 0));
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
var
|
|
75
|
-
if (
|
|
76
|
-
return
|
|
77
|
-
var
|
|
78
|
-
return
|
|
73
|
+
function qe(e, r, t) {
|
|
74
|
+
var c = e.displayName;
|
|
75
|
+
if (c)
|
|
76
|
+
return c;
|
|
77
|
+
var v = r.displayName || r.name || "";
|
|
78
|
+
return v !== "" ? t + "(" + v + ")" : t;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function ve(e) {
|
|
81
81
|
return e.displayName || "Context";
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function $(e) {
|
|
84
84
|
if (e == null)
|
|
85
85
|
return null;
|
|
86
|
-
if (typeof e.tag == "number" &&
|
|
86
|
+
if (typeof e.tag == "number" && b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
87
87
|
return e.displayName || e.name || null;
|
|
88
88
|
if (typeof e == "string")
|
|
89
89
|
return e;
|
|
90
90
|
switch (e) {
|
|
91
91
|
case a:
|
|
92
92
|
return "Fragment";
|
|
93
|
-
case
|
|
93
|
+
case o:
|
|
94
94
|
return "Portal";
|
|
95
|
-
case
|
|
95
|
+
case l:
|
|
96
96
|
return "Profiler";
|
|
97
|
-
case
|
|
97
|
+
case s:
|
|
98
98
|
return "StrictMode";
|
|
99
|
-
case
|
|
99
|
+
case S:
|
|
100
100
|
return "Suspense";
|
|
101
|
-
case
|
|
101
|
+
case y:
|
|
102
102
|
return "SuspenseList";
|
|
103
103
|
}
|
|
104
104
|
if (typeof e == "object")
|
|
105
105
|
switch (e.$$typeof) {
|
|
106
|
-
case
|
|
106
|
+
case u:
|
|
107
107
|
var r = e;
|
|
108
|
-
return
|
|
109
|
-
case
|
|
110
|
-
var
|
|
111
|
-
return
|
|
112
|
-
case
|
|
113
|
-
return
|
|
114
|
-
case
|
|
115
|
-
var
|
|
116
|
-
return
|
|
117
|
-
case
|
|
118
|
-
var
|
|
108
|
+
return ve(r) + ".Consumer";
|
|
109
|
+
case g:
|
|
110
|
+
var t = e;
|
|
111
|
+
return ve(t._context) + ".Provider";
|
|
112
|
+
case f:
|
|
113
|
+
return qe(e, e.render, "ForwardRef");
|
|
114
|
+
case m:
|
|
115
|
+
var c = e.displayName || null;
|
|
116
|
+
return c !== null ? c : $(e.type) || "Memo";
|
|
117
|
+
case w: {
|
|
118
|
+
var v = e, h = v._payload, p = v._init;
|
|
119
119
|
try {
|
|
120
|
-
return
|
|
120
|
+
return $(p(h));
|
|
121
121
|
} catch {
|
|
122
122
|
return null;
|
|
123
123
|
}
|
|
@@ -125,18 +125,18 @@ function Er() {
|
|
|
125
125
|
}
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
128
|
-
var
|
|
129
|
-
function
|
|
128
|
+
var Y = Object.assign, B = 0, he, _e, ge, me, be, Ee, Re;
|
|
129
|
+
function ye() {
|
|
130
130
|
}
|
|
131
|
-
|
|
132
|
-
function
|
|
131
|
+
ye.__reactDisabledLog = !0;
|
|
132
|
+
function Ke() {
|
|
133
133
|
{
|
|
134
|
-
if (
|
|
135
|
-
|
|
134
|
+
if (B === 0) {
|
|
135
|
+
he = console.log, _e = console.info, ge = console.warn, me = console.error, be = console.group, Ee = console.groupCollapsed, Re = console.groupEnd;
|
|
136
136
|
var e = {
|
|
137
137
|
configurable: !0,
|
|
138
138
|
enumerable: !0,
|
|
139
|
-
value:
|
|
139
|
+
value: ye,
|
|
140
140
|
writable: !0
|
|
141
141
|
};
|
|
142
142
|
Object.defineProperties(console, {
|
|
@@ -149,229 +149,229 @@ function Er() {
|
|
|
149
149
|
groupEnd: e
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
|
-
|
|
152
|
+
B++;
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function Je() {
|
|
156
156
|
{
|
|
157
|
-
if (
|
|
157
|
+
if (B--, B === 0) {
|
|
158
158
|
var e = {
|
|
159
159
|
configurable: !0,
|
|
160
160
|
enumerable: !0,
|
|
161
161
|
writable: !0
|
|
162
162
|
};
|
|
163
163
|
Object.defineProperties(console, {
|
|
164
|
-
log:
|
|
165
|
-
value: ve
|
|
166
|
-
}),
|
|
167
|
-
info: $({}, e, {
|
|
168
|
-
value: pe
|
|
169
|
-
}),
|
|
170
|
-
warn: $({}, e, {
|
|
164
|
+
log: Y({}, e, {
|
|
171
165
|
value: he
|
|
172
166
|
}),
|
|
173
|
-
|
|
167
|
+
info: Y({}, e, {
|
|
174
168
|
value: _e
|
|
175
169
|
}),
|
|
176
|
-
|
|
170
|
+
warn: Y({}, e, {
|
|
177
171
|
value: ge
|
|
178
172
|
}),
|
|
179
|
-
|
|
173
|
+
error: Y({}, e, {
|
|
174
|
+
value: me
|
|
175
|
+
}),
|
|
176
|
+
group: Y({}, e, {
|
|
180
177
|
value: be
|
|
181
178
|
}),
|
|
182
|
-
|
|
179
|
+
groupCollapsed: Y({}, e, {
|
|
183
180
|
value: Ee
|
|
181
|
+
}),
|
|
182
|
+
groupEnd: Y({}, e, {
|
|
183
|
+
value: Re
|
|
184
184
|
})
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
|
-
|
|
187
|
+
B < 0 && b("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
var
|
|
191
|
-
function
|
|
190
|
+
var ae = _.ReactCurrentDispatcher, ie;
|
|
191
|
+
function Q(e, r, t) {
|
|
192
192
|
{
|
|
193
|
-
if (
|
|
193
|
+
if (ie === void 0)
|
|
194
194
|
try {
|
|
195
195
|
throw Error();
|
|
196
|
-
} catch (
|
|
197
|
-
var
|
|
198
|
-
|
|
196
|
+
} catch (v) {
|
|
197
|
+
var c = v.stack.trim().match(/\n( *(at )?)/);
|
|
198
|
+
ie = c && c[1] || "";
|
|
199
199
|
}
|
|
200
200
|
return `
|
|
201
|
-
` +
|
|
201
|
+
` + ie + e;
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
var
|
|
204
|
+
var ue = !1, ee;
|
|
205
205
|
{
|
|
206
|
-
var
|
|
207
|
-
|
|
206
|
+
var ze = typeof WeakMap == "function" ? WeakMap : Map;
|
|
207
|
+
ee = new ze();
|
|
208
208
|
}
|
|
209
|
-
function
|
|
210
|
-
if (!e ||
|
|
209
|
+
function we(e, r) {
|
|
210
|
+
if (!e || ue)
|
|
211
211
|
return "";
|
|
212
212
|
{
|
|
213
|
-
var
|
|
214
|
-
if (
|
|
215
|
-
return
|
|
213
|
+
var t = ee.get(e);
|
|
214
|
+
if (t !== void 0)
|
|
215
|
+
return t;
|
|
216
216
|
}
|
|
217
|
-
var
|
|
218
|
-
|
|
219
|
-
var
|
|
217
|
+
var c;
|
|
218
|
+
ue = !0;
|
|
219
|
+
var v = Error.prepareStackTrace;
|
|
220
220
|
Error.prepareStackTrace = void 0;
|
|
221
|
-
var
|
|
222
|
-
|
|
221
|
+
var h;
|
|
222
|
+
h = ae.current, ae.current = null, Ke();
|
|
223
223
|
try {
|
|
224
224
|
if (r) {
|
|
225
|
-
var
|
|
225
|
+
var p = function() {
|
|
226
226
|
throw Error();
|
|
227
227
|
};
|
|
228
|
-
if (Object.defineProperty(
|
|
228
|
+
if (Object.defineProperty(p.prototype, "props", {
|
|
229
229
|
set: function() {
|
|
230
230
|
throw Error();
|
|
231
231
|
}
|
|
232
232
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
233
233
|
try {
|
|
234
|
-
Reflect.construct(
|
|
235
|
-
} catch (
|
|
236
|
-
|
|
234
|
+
Reflect.construct(p, []);
|
|
235
|
+
} catch (A) {
|
|
236
|
+
c = A;
|
|
237
237
|
}
|
|
238
|
-
Reflect.construct(e, [],
|
|
238
|
+
Reflect.construct(e, [], p);
|
|
239
239
|
} else {
|
|
240
240
|
try {
|
|
241
|
-
|
|
242
|
-
} catch (
|
|
243
|
-
|
|
241
|
+
p.call();
|
|
242
|
+
} catch (A) {
|
|
243
|
+
c = A;
|
|
244
244
|
}
|
|
245
|
-
e.call(
|
|
245
|
+
e.call(p.prototype);
|
|
246
246
|
}
|
|
247
247
|
} else {
|
|
248
248
|
try {
|
|
249
249
|
throw Error();
|
|
250
|
-
} catch (
|
|
251
|
-
|
|
250
|
+
} catch (A) {
|
|
251
|
+
c = A;
|
|
252
252
|
}
|
|
253
253
|
e();
|
|
254
254
|
}
|
|
255
|
-
} catch (
|
|
256
|
-
if (
|
|
257
|
-
for (var
|
|
258
|
-
`), C =
|
|
259
|
-
`), E =
|
|
260
|
-
|
|
261
|
-
for (; E >= 1 &&
|
|
262
|
-
if (
|
|
263
|
-
if (E !== 1 ||
|
|
255
|
+
} catch (A) {
|
|
256
|
+
if (A && c && typeof A.stack == "string") {
|
|
257
|
+
for (var d = A.stack.split(`
|
|
258
|
+
`), C = c.stack.split(`
|
|
259
|
+
`), E = d.length - 1, R = C.length - 1; E >= 1 && R >= 0 && d[E] !== C[R]; )
|
|
260
|
+
R--;
|
|
261
|
+
for (; E >= 1 && R >= 0; E--, R--)
|
|
262
|
+
if (d[E] !== C[R]) {
|
|
263
|
+
if (E !== 1 || R !== 1)
|
|
264
264
|
do
|
|
265
|
-
if (E--,
|
|
265
|
+
if (E--, R--, R < 0 || d[E] !== C[R]) {
|
|
266
266
|
var O = `
|
|
267
|
-
` +
|
|
268
|
-
return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" &&
|
|
267
|
+
` + d[E].replace(" at new ", " at ");
|
|
268
|
+
return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" && ee.set(e, O), O;
|
|
269
269
|
}
|
|
270
|
-
while (E >= 1 &&
|
|
270
|
+
while (E >= 1 && R >= 0);
|
|
271
271
|
break;
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
} finally {
|
|
275
|
-
|
|
275
|
+
ue = !1, ae.current = h, Je(), Error.prepareStackTrace = v;
|
|
276
276
|
}
|
|
277
|
-
var
|
|
278
|
-
return typeof e == "function" &&
|
|
277
|
+
var W = e ? e.displayName || e.name : "", Ne = W ? Q(W) : "";
|
|
278
|
+
return typeof e == "function" && ee.set(e, Ne), Ne;
|
|
279
279
|
}
|
|
280
|
-
function He(e, r,
|
|
281
|
-
return
|
|
280
|
+
function He(e, r, t) {
|
|
281
|
+
return we(e, !1);
|
|
282
282
|
}
|
|
283
283
|
function Xe(e) {
|
|
284
284
|
var r = e.prototype;
|
|
285
285
|
return !!(r && r.isReactComponent);
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function re(e, r, t) {
|
|
288
288
|
if (e == null)
|
|
289
289
|
return "";
|
|
290
290
|
if (typeof e == "function")
|
|
291
|
-
return
|
|
291
|
+
return we(e, Xe(e));
|
|
292
292
|
if (typeof e == "string")
|
|
293
|
-
return
|
|
293
|
+
return Q(e);
|
|
294
294
|
switch (e) {
|
|
295
|
+
case S:
|
|
296
|
+
return Q("Suspense");
|
|
295
297
|
case y:
|
|
296
|
-
return
|
|
297
|
-
case b:
|
|
298
|
-
return H("SuspenseList");
|
|
298
|
+
return Q("SuspenseList");
|
|
299
299
|
}
|
|
300
300
|
if (typeof e == "object")
|
|
301
301
|
switch (e.$$typeof) {
|
|
302
|
-
case
|
|
302
|
+
case f:
|
|
303
303
|
return He(e.render);
|
|
304
|
-
case
|
|
305
|
-
return
|
|
306
|
-
case
|
|
307
|
-
var
|
|
304
|
+
case m:
|
|
305
|
+
return re(e.type, r, t);
|
|
306
|
+
case w: {
|
|
307
|
+
var c = e, v = c._payload, h = c._init;
|
|
308
308
|
try {
|
|
309
|
-
return
|
|
309
|
+
return re(h(v), r, t);
|
|
310
310
|
} catch {
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
return "";
|
|
315
315
|
}
|
|
316
|
-
var
|
|
317
|
-
function
|
|
316
|
+
var te = Object.prototype.hasOwnProperty, xe = {}, Te = _.ReactDebugCurrentFrame;
|
|
317
|
+
function ne(e) {
|
|
318
318
|
if (e) {
|
|
319
|
-
var r = e._owner,
|
|
320
|
-
|
|
319
|
+
var r = e._owner, t = re(e.type, e._source, r ? r.type : null);
|
|
320
|
+
Te.setExtraStackFrame(t);
|
|
321
321
|
} else
|
|
322
|
-
|
|
322
|
+
Te.setExtraStackFrame(null);
|
|
323
323
|
}
|
|
324
|
-
function Ze(e, r,
|
|
324
|
+
function Ze(e, r, t, c, v) {
|
|
325
325
|
{
|
|
326
|
-
var
|
|
327
|
-
for (var
|
|
328
|
-
if (
|
|
329
|
-
var
|
|
326
|
+
var h = Function.call.bind(te);
|
|
327
|
+
for (var p in e)
|
|
328
|
+
if (h(e, p)) {
|
|
329
|
+
var d = void 0;
|
|
330
330
|
try {
|
|
331
|
-
if (typeof e[
|
|
332
|
-
var C = Error((
|
|
331
|
+
if (typeof e[p] != "function") {
|
|
332
|
+
var C = Error((c || "React class") + ": " + t + " type `" + p + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[p] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
333
333
|
throw C.name = "Invariant Violation", C;
|
|
334
334
|
}
|
|
335
|
-
|
|
335
|
+
d = e[p](r, p, c, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
336
336
|
} catch (E) {
|
|
337
|
-
|
|
337
|
+
d = E;
|
|
338
338
|
}
|
|
339
|
-
|
|
339
|
+
d && !(d instanceof Error) && (ne(v), b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", c || "React class", t, p, typeof d), ne(null)), d instanceof Error && !(d.message in xe) && (xe[d.message] = !0, ne(v), b("Failed %s type: %s", t, d.message), ne(null));
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
var Qe = Array.isArray;
|
|
344
|
-
function
|
|
344
|
+
function ce(e) {
|
|
345
345
|
return Qe(e);
|
|
346
346
|
}
|
|
347
347
|
function er(e) {
|
|
348
348
|
{
|
|
349
|
-
var r = typeof Symbol == "function" && Symbol.toStringTag,
|
|
350
|
-
return
|
|
349
|
+
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
350
|
+
return t;
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
function rr(e) {
|
|
354
354
|
try {
|
|
355
|
-
return
|
|
355
|
+
return Ce(e), !1;
|
|
356
356
|
} catch {
|
|
357
357
|
return !0;
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function Ce(e) {
|
|
361
361
|
return "" + e;
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function Se(e) {
|
|
364
364
|
if (rr(e))
|
|
365
|
-
return
|
|
365
|
+
return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", er(e)), Ce(e);
|
|
366
366
|
}
|
|
367
|
-
var
|
|
367
|
+
var Pe = _.ReactCurrentOwner, tr = {
|
|
368
368
|
key: !0,
|
|
369
369
|
ref: !0,
|
|
370
370
|
__self: !0,
|
|
371
371
|
__source: !0
|
|
372
|
-
},
|
|
372
|
+
}, Oe, ke;
|
|
373
373
|
function nr(e) {
|
|
374
|
-
if (
|
|
374
|
+
if (te.call(e, "ref")) {
|
|
375
375
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
376
376
|
if (r && r.isReactWarning)
|
|
377
377
|
return !1;
|
|
@@ -379,7 +379,7 @@ function Er() {
|
|
|
379
379
|
return e.ref !== void 0;
|
|
380
380
|
}
|
|
381
381
|
function or(e) {
|
|
382
|
-
if (
|
|
382
|
+
if (te.call(e, "key")) {
|
|
383
383
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
384
384
|
if (r && r.isReactWarning)
|
|
385
385
|
return !1;
|
|
@@ -387,94 +387,94 @@ function Er() {
|
|
|
387
387
|
return e.key !== void 0;
|
|
388
388
|
}
|
|
389
389
|
function ar(e, r) {
|
|
390
|
-
typeof e.ref == "string" &&
|
|
390
|
+
typeof e.ref == "string" && Pe.current;
|
|
391
391
|
}
|
|
392
392
|
function ir(e, r) {
|
|
393
393
|
{
|
|
394
|
-
var
|
|
395
|
-
|
|
394
|
+
var t = function() {
|
|
395
|
+
Oe || (Oe = !0, b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
396
396
|
};
|
|
397
|
-
|
|
398
|
-
get:
|
|
397
|
+
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
398
|
+
get: t,
|
|
399
399
|
configurable: !0
|
|
400
400
|
});
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
403
|
function ur(e, r) {
|
|
404
404
|
{
|
|
405
|
-
var
|
|
406
|
-
|
|
405
|
+
var t = function() {
|
|
406
|
+
ke || (ke = !0, b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
407
407
|
};
|
|
408
|
-
|
|
409
|
-
get:
|
|
408
|
+
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
409
|
+
get: t,
|
|
410
410
|
configurable: !0
|
|
411
411
|
});
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
var
|
|
415
|
-
var
|
|
414
|
+
var cr = function(e, r, t, c, v, h, p) {
|
|
415
|
+
var d = {
|
|
416
416
|
// This tag allows us to uniquely identify this as a React Element
|
|
417
|
-
$$typeof:
|
|
417
|
+
$$typeof: i,
|
|
418
418
|
// Built-in properties that belong on the element
|
|
419
419
|
type: e,
|
|
420
420
|
key: r,
|
|
421
|
-
ref:
|
|
422
|
-
props:
|
|
421
|
+
ref: t,
|
|
422
|
+
props: p,
|
|
423
423
|
// Record the component responsible for creating this element.
|
|
424
|
-
_owner:
|
|
424
|
+
_owner: h
|
|
425
425
|
};
|
|
426
|
-
return
|
|
426
|
+
return d._store = {}, Object.defineProperty(d._store, "validated", {
|
|
427
427
|
configurable: !1,
|
|
428
428
|
enumerable: !1,
|
|
429
429
|
writable: !0,
|
|
430
430
|
value: !1
|
|
431
|
-
}), Object.defineProperty(
|
|
431
|
+
}), Object.defineProperty(d, "_self", {
|
|
432
432
|
configurable: !1,
|
|
433
433
|
enumerable: !1,
|
|
434
434
|
writable: !1,
|
|
435
|
-
value:
|
|
436
|
-
}), Object.defineProperty(
|
|
435
|
+
value: c
|
|
436
|
+
}), Object.defineProperty(d, "_source", {
|
|
437
437
|
configurable: !1,
|
|
438
438
|
enumerable: !1,
|
|
439
439
|
writable: !1,
|
|
440
|
-
value:
|
|
441
|
-
}), Object.freeze && (Object.freeze(
|
|
440
|
+
value: v
|
|
441
|
+
}), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
|
|
442
442
|
};
|
|
443
|
-
function
|
|
443
|
+
function sr(e, r, t, c, v) {
|
|
444
444
|
{
|
|
445
|
-
var
|
|
446
|
-
|
|
447
|
-
for (
|
|
448
|
-
|
|
445
|
+
var h, p = {}, d = null, C = null;
|
|
446
|
+
t !== void 0 && (Se(t), d = "" + t), or(r) && (Se(r.key), d = "" + r.key), nr(r) && (C = r.ref, ar(r, v));
|
|
447
|
+
for (h in r)
|
|
448
|
+
te.call(r, h) && !tr.hasOwnProperty(h) && (p[h] = r[h]);
|
|
449
449
|
if (e && e.defaultProps) {
|
|
450
450
|
var E = e.defaultProps;
|
|
451
|
-
for (
|
|
452
|
-
|
|
451
|
+
for (h in E)
|
|
452
|
+
p[h] === void 0 && (p[h] = E[h]);
|
|
453
453
|
}
|
|
454
|
-
if (
|
|
455
|
-
var
|
|
456
|
-
|
|
454
|
+
if (d || C) {
|
|
455
|
+
var R = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
456
|
+
d && ir(p, R), C && ur(p, R);
|
|
457
457
|
}
|
|
458
|
-
return
|
|
458
|
+
return cr(e, d, C, v, c, Pe.current, p);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
var
|
|
462
|
-
function
|
|
461
|
+
var se = _.ReactCurrentOwner, je = _.ReactDebugCurrentFrame;
|
|
462
|
+
function M(e) {
|
|
463
463
|
if (e) {
|
|
464
|
-
var r = e._owner,
|
|
465
|
-
|
|
464
|
+
var r = e._owner, t = re(e.type, e._source, r ? r.type : null);
|
|
465
|
+
je.setExtraStackFrame(t);
|
|
466
466
|
} else
|
|
467
|
-
|
|
467
|
+
je.setExtraStackFrame(null);
|
|
468
468
|
}
|
|
469
|
-
var
|
|
470
|
-
|
|
471
|
-
function
|
|
472
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
469
|
+
var fe;
|
|
470
|
+
fe = !1;
|
|
471
|
+
function le(e) {
|
|
472
|
+
return typeof e == "object" && e !== null && e.$$typeof === i;
|
|
473
473
|
}
|
|
474
|
-
function
|
|
474
|
+
function De() {
|
|
475
475
|
{
|
|
476
|
-
if (
|
|
477
|
-
var e =
|
|
476
|
+
if (se.current) {
|
|
477
|
+
var e = $(se.current.type);
|
|
478
478
|
if (e)
|
|
479
479
|
return `
|
|
480
480
|
|
|
@@ -486,48 +486,48 @@ Check the render method of \`` + e + "`.";
|
|
|
486
486
|
function fr(e) {
|
|
487
487
|
return "";
|
|
488
488
|
}
|
|
489
|
-
var
|
|
489
|
+
var Ae = {};
|
|
490
490
|
function lr(e) {
|
|
491
491
|
{
|
|
492
|
-
var r =
|
|
492
|
+
var r = De();
|
|
493
493
|
if (!r) {
|
|
494
|
-
var
|
|
495
|
-
|
|
494
|
+
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
495
|
+
t && (r = `
|
|
496
496
|
|
|
497
|
-
Check the top-level render call using <` +
|
|
497
|
+
Check the top-level render call using <` + t + ">.");
|
|
498
498
|
}
|
|
499
499
|
return r;
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
function
|
|
502
|
+
function Fe(e, r) {
|
|
503
503
|
{
|
|
504
504
|
if (!e._store || e._store.validated || e.key != null)
|
|
505
505
|
return;
|
|
506
506
|
e._store.validated = !0;
|
|
507
|
-
var
|
|
508
|
-
if (
|
|
507
|
+
var t = lr(r);
|
|
508
|
+
if (Ae[t])
|
|
509
509
|
return;
|
|
510
|
-
|
|
511
|
-
var
|
|
512
|
-
e && e._owner && e._owner !==
|
|
510
|
+
Ae[t] = !0;
|
|
511
|
+
var c = "";
|
|
512
|
+
e && e._owner && e._owner !== se.current && (c = " It was passed a child from " + $(e._owner.type) + "."), M(e), b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, c), M(null);
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
|
-
function
|
|
515
|
+
function Ie(e, r) {
|
|
516
516
|
{
|
|
517
517
|
if (typeof e != "object")
|
|
518
518
|
return;
|
|
519
|
-
if (
|
|
520
|
-
for (var
|
|
521
|
-
var
|
|
522
|
-
|
|
519
|
+
if (ce(e))
|
|
520
|
+
for (var t = 0; t < e.length; t++) {
|
|
521
|
+
var c = e[t];
|
|
522
|
+
le(c) && Fe(c, r);
|
|
523
523
|
}
|
|
524
|
-
else if (
|
|
524
|
+
else if (le(e))
|
|
525
525
|
e._store && (e._store.validated = !0);
|
|
526
526
|
else if (e) {
|
|
527
|
-
var
|
|
528
|
-
if (typeof
|
|
529
|
-
for (var
|
|
530
|
-
|
|
527
|
+
var v = N(e);
|
|
528
|
+
if (typeof v == "function" && v !== e.entries)
|
|
529
|
+
for (var h = v.call(e), p; !(p = h.next()).done; )
|
|
530
|
+
le(p.value) && Fe(p.value, r);
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
533
|
}
|
|
@@ -536,81 +536,81 @@ Check the top-level render call using <` + n + ">.");
|
|
|
536
536
|
var r = e.type;
|
|
537
537
|
if (r == null || typeof r == "string")
|
|
538
538
|
return;
|
|
539
|
-
var
|
|
539
|
+
var t;
|
|
540
540
|
if (typeof r == "function")
|
|
541
|
-
|
|
542
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
|
541
|
+
t = r.propTypes;
|
|
542
|
+
else if (typeof r == "object" && (r.$$typeof === f || // Note: Memo only checks outer props here.
|
|
543
543
|
// Inner props are checked in the reconciler.
|
|
544
|
-
r.$$typeof ===
|
|
545
|
-
|
|
544
|
+
r.$$typeof === m))
|
|
545
|
+
t = r.propTypes;
|
|
546
546
|
else
|
|
547
547
|
return;
|
|
548
|
-
if (
|
|
549
|
-
var
|
|
550
|
-
Ze(
|
|
551
|
-
} else if (r.PropTypes !== void 0 && !
|
|
552
|
-
|
|
553
|
-
var
|
|
554
|
-
|
|
548
|
+
if (t) {
|
|
549
|
+
var c = $(r);
|
|
550
|
+
Ze(t, e.props, "prop", c, e);
|
|
551
|
+
} else if (r.PropTypes !== void 0 && !fe) {
|
|
552
|
+
fe = !0;
|
|
553
|
+
var v = $(r);
|
|
554
|
+
b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", v || "Unknown");
|
|
555
555
|
}
|
|
556
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
556
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
function
|
|
559
|
+
function pr(e) {
|
|
560
560
|
{
|
|
561
|
-
for (var r = Object.keys(e.props),
|
|
562
|
-
var
|
|
563
|
-
if (
|
|
564
|
-
|
|
561
|
+
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
562
|
+
var c = r[t];
|
|
563
|
+
if (c !== "children" && c !== "key") {
|
|
564
|
+
M(e), b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", c), M(null);
|
|
565
565
|
break;
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
|
-
e.ref !== null && (
|
|
568
|
+
e.ref !== null && (M(e), b("Invalid attribute `ref` supplied to `React.Fragment`."), M(null));
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
|
-
function
|
|
571
|
+
function Ve(e, r, t, c, v, h) {
|
|
572
572
|
{
|
|
573
|
-
var
|
|
574
|
-
if (!
|
|
575
|
-
var
|
|
576
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
573
|
+
var p = Be(e);
|
|
574
|
+
if (!p) {
|
|
575
|
+
var d = "";
|
|
576
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (d += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
577
577
|
var C = fr();
|
|
578
|
-
C ?
|
|
578
|
+
C ? d += C : d += De();
|
|
579
579
|
var E;
|
|
580
|
-
e === null ? E = "null" :
|
|
580
|
+
e === null ? E = "null" : ce(e) ? E = "array" : e !== void 0 && e.$$typeof === i ? (E = "<" + ($(e.type) || "Unknown") + " />", d = " Did you accidentally export a JSX literal instead of a component?") : E = typeof e, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", E, d);
|
|
581
581
|
}
|
|
582
|
-
var
|
|
583
|
-
if (
|
|
584
|
-
return
|
|
585
|
-
if (
|
|
582
|
+
var R = sr(e, r, t, v, h);
|
|
583
|
+
if (R == null)
|
|
584
|
+
return R;
|
|
585
|
+
if (p) {
|
|
586
586
|
var O = r.children;
|
|
587
587
|
if (O !== void 0)
|
|
588
|
-
if (
|
|
589
|
-
if (
|
|
590
|
-
for (var
|
|
591
|
-
|
|
588
|
+
if (c)
|
|
589
|
+
if (ce(O)) {
|
|
590
|
+
for (var W = 0; W < O.length; W++)
|
|
591
|
+
Ie(O[W], e);
|
|
592
592
|
Object.freeze && Object.freeze(O);
|
|
593
593
|
} else
|
|
594
|
-
|
|
594
|
+
b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
595
595
|
else
|
|
596
|
-
|
|
596
|
+
Ie(O, e);
|
|
597
597
|
}
|
|
598
|
-
return e === a ?
|
|
598
|
+
return e === a ? pr(R) : dr(R), R;
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
|
-
function
|
|
602
|
-
return
|
|
601
|
+
function vr(e, r, t) {
|
|
602
|
+
return Ve(e, r, t, !0);
|
|
603
603
|
}
|
|
604
|
-
function hr(e, r,
|
|
605
|
-
return
|
|
604
|
+
function hr(e, r, t) {
|
|
605
|
+
return Ve(e, r, t, !1);
|
|
606
606
|
}
|
|
607
|
-
var _r = hr, gr =
|
|
608
|
-
|
|
609
|
-
}()),
|
|
607
|
+
var _r = hr, gr = vr;
|
|
608
|
+
K.Fragment = a, K.jsx = _r, K.jsxs = gr;
|
|
609
|
+
}()), K;
|
|
610
610
|
}
|
|
611
|
-
process.env.NODE_ENV === "production" ?
|
|
612
|
-
var
|
|
613
|
-
const
|
|
611
|
+
process.env.NODE_ENV === "production" ? de.exports = mr() : de.exports = br();
|
|
612
|
+
var F = de.exports;
|
|
613
|
+
const X = Me({
|
|
614
614
|
rootValue: /* @__PURE__ */ new Set(),
|
|
615
615
|
setRootValue: () => {
|
|
616
616
|
},
|
|
@@ -618,211 +618,234 @@ const J = Ne({
|
|
|
618
618
|
setSelection: () => {
|
|
619
619
|
},
|
|
620
620
|
focus: { current: "" },
|
|
621
|
-
nodeMap: {},
|
|
622
|
-
|
|
621
|
+
nodeMap: { current: {} },
|
|
622
|
+
registerNode: () => {
|
|
623
|
+
},
|
|
624
|
+
removeNode: () => {
|
|
623
625
|
}
|
|
624
626
|
});
|
|
625
|
-
function
|
|
626
|
-
const
|
|
627
|
+
function Er() {
|
|
628
|
+
const n = J({
|
|
627
629
|
__root__: { value: "__root__", parent: "", children: {}, index: 0, childrenLength: 0, isGroup: !0, ref: { current: null } }
|
|
628
|
-
};
|
|
629
|
-
return [
|
|
630
|
-
|
|
630
|
+
});
|
|
631
|
+
return [n, (a, s, l, g, u) => {
|
|
632
|
+
if (n.current == null) return;
|
|
633
|
+
const f = n.current;
|
|
634
|
+
f[a] = { value: a, parent: s, children: {}, childrenLength: 0, index: l, isGroup: g, ref: u }, f[s].children[l] = a, (l + 1 > f[s].childrenLength || f[f[s].childrenLength - 1] == null) && (f[s].childrenLength = l + 1);
|
|
635
|
+
}, (a) => {
|
|
636
|
+
if (n.current == null) return;
|
|
637
|
+
const s = n.current[a], l = n.current[s.parent];
|
|
638
|
+
for (delete l.children[s.index]; l.childrenLength > 0 && l.children[l.childrenLength - 1] == null; )
|
|
639
|
+
l.childrenLength -= 1;
|
|
640
|
+
delete n.current[a];
|
|
631
641
|
}];
|
|
632
642
|
}
|
|
633
|
-
const
|
|
643
|
+
const U = Me({
|
|
634
644
|
parent: "",
|
|
635
645
|
getIndex: () => -1,
|
|
636
646
|
depth: -1
|
|
637
647
|
});
|
|
638
|
-
function
|
|
639
|
-
const [a,
|
|
640
|
-
return [
|
|
641
|
-
const
|
|
642
|
-
|
|
648
|
+
function Rr(n, i, o) {
|
|
649
|
+
const [a, s] = We(o), l = n !== void 0 ? n : a;
|
|
650
|
+
return [l, (u) => {
|
|
651
|
+
const f = typeof u == "function" ? u(l) : u;
|
|
652
|
+
i && i(f), s(f);
|
|
643
653
|
}];
|
|
644
654
|
}
|
|
645
|
-
function
|
|
655
|
+
function z(n, i) {
|
|
646
656
|
return function(a) {
|
|
647
|
-
const
|
|
648
|
-
|
|
649
|
-
let
|
|
650
|
-
return a.defaultPrevented || (
|
|
657
|
+
const s = a.defaultPrevented;
|
|
658
|
+
s && (a.defaultPrevented = !1), n == null || n(a);
|
|
659
|
+
let l;
|
|
660
|
+
return a.defaultPrevented || (l = i == null ? void 0 : i(a), s && (a.defaultPrevented = !0)), l;
|
|
651
661
|
};
|
|
652
662
|
}
|
|
653
|
-
function
|
|
654
|
-
return
|
|
655
|
-
for (const
|
|
656
|
-
typeof
|
|
657
|
-
}, [
|
|
663
|
+
function pe(...n) {
|
|
664
|
+
return Ue((i) => {
|
|
665
|
+
for (const o of n)
|
|
666
|
+
typeof o == "function" ? o(i) : o != null && (o.current = i);
|
|
667
|
+
}, [n]);
|
|
658
668
|
}
|
|
659
669
|
function Ge() {
|
|
660
|
-
let
|
|
661
|
-
const
|
|
662
|
-
function
|
|
663
|
-
return
|
|
670
|
+
let n = -1;
|
|
671
|
+
const i = {};
|
|
672
|
+
function o(a) {
|
|
673
|
+
return i[a] == null && (i[a] = ++n), i[a];
|
|
664
674
|
}
|
|
665
|
-
return
|
|
675
|
+
return o;
|
|
666
676
|
}
|
|
667
677
|
const yr = ["ArrowRight", "ArrowUp", "ArrowLeft", "ArrowDown", "Home", "End", "Enter"];
|
|
668
|
-
function wr(
|
|
669
|
-
var
|
|
670
|
-
const
|
|
671
|
-
|
|
678
|
+
function wr(n, i) {
|
|
679
|
+
var s;
|
|
680
|
+
const o = n.current;
|
|
681
|
+
if (!o) return;
|
|
682
|
+
const a = o[i].children[0];
|
|
683
|
+
a != null && ((s = o[a].ref.current) == null || s.focus());
|
|
672
684
|
}
|
|
673
|
-
function
|
|
674
|
-
var
|
|
675
|
-
const
|
|
676
|
-
|
|
685
|
+
function xr(n, i) {
|
|
686
|
+
var s;
|
|
687
|
+
const o = n.current;
|
|
688
|
+
if (!o) return;
|
|
689
|
+
const a = o[i].parent;
|
|
690
|
+
a != "__root__" && ((s = o[a].ref.current) == null || s.focus());
|
|
677
691
|
}
|
|
678
|
-
function
|
|
679
|
-
var
|
|
680
|
-
const
|
|
681
|
-
if (
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
(
|
|
692
|
+
function Tr(n, i) {
|
|
693
|
+
var l, g;
|
|
694
|
+
const o = n.current;
|
|
695
|
+
if (!o) return;
|
|
696
|
+
const a = o[i].parent, s = o[i].index;
|
|
697
|
+
if (s != 0) {
|
|
698
|
+
let u = o[a].children[s - 1], f;
|
|
699
|
+
for (; o[u].isGroup && (f = o[u].children[o[u].childrenLength - 1], !(f == null || o[f].ref.current == null)); )
|
|
700
|
+
u = f;
|
|
701
|
+
(l = o[u].ref.current) == null || l.focus();
|
|
686
702
|
return;
|
|
687
703
|
}
|
|
688
|
-
|
|
704
|
+
a != "__root__" && ((g = o[a].ref.current) == null || g.focus());
|
|
689
705
|
}
|
|
690
|
-
function Cr(
|
|
691
|
-
var
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
706
|
+
function Cr(n, i) {
|
|
707
|
+
var l, g;
|
|
708
|
+
const o = n.current;
|
|
709
|
+
if (!o) return;
|
|
710
|
+
if (o[i].isGroup) {
|
|
711
|
+
const u = (l = o[o[i].children[0]]) == null ? void 0 : l.ref.current;
|
|
712
|
+
if (u) {
|
|
713
|
+
u.focus();
|
|
696
714
|
return;
|
|
697
715
|
}
|
|
698
716
|
}
|
|
699
|
-
let
|
|
700
|
-
for (;
|
|
701
|
-
if (
|
|
702
|
-
|
|
717
|
+
let a, s;
|
|
718
|
+
for (; a = o[i].parent, s = o[a].children[o[i].index + 1], s == null; ) {
|
|
719
|
+
if (a == "__root__") return;
|
|
720
|
+
i = a;
|
|
703
721
|
}
|
|
704
|
-
(
|
|
722
|
+
(g = o[s].ref.current) == null || g.focus();
|
|
705
723
|
}
|
|
706
|
-
function Sr(
|
|
707
|
-
var i;
|
|
708
|
-
const o = t.__root__.children[0];
|
|
709
|
-
(i = t[o].ref.current) == null || i.focus();
|
|
710
|
-
}
|
|
711
|
-
function Pr(t) {
|
|
724
|
+
function Sr(n) {
|
|
712
725
|
var a;
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
(a =
|
|
726
|
+
const i = n.current;
|
|
727
|
+
if (!i) return;
|
|
728
|
+
const o = i.__root__.children[0];
|
|
729
|
+
(a = i[o].ref.current) == null || a.focus();
|
|
730
|
+
}
|
|
731
|
+
function Pr(n) {
|
|
732
|
+
var s;
|
|
733
|
+
const i = n.current;
|
|
734
|
+
if (!i) return;
|
|
735
|
+
let o = "__root__", a;
|
|
736
|
+
for (; i[o].isGroup && (a = i[o].children[i[o].childrenLength - 1], !(a == null || i[a].ref.current == null)); )
|
|
737
|
+
o = a;
|
|
738
|
+
(s = i[o].ref.current) == null || s.focus();
|
|
717
739
|
}
|
|
718
|
-
const Or =
|
|
719
|
-
const [
|
|
720
|
-
|
|
721
|
-
|
|
740
|
+
const Or = H(({ value: n, onValueChange: i, defaultValue: o, defaultSelection: a, onKeyDown: s, ...l }, g) => {
|
|
741
|
+
const [u, f, S] = Er(), y = Ge(), [m, w] = Rr(n, i, o ?? /* @__PURE__ */ new Set()), [k, P] = We(""), V = J(null), N = pe(V, g), _ = J(""), b = Ue((x) => {
|
|
742
|
+
var D;
|
|
743
|
+
if (!(!yr.includes(x.key) || !u))
|
|
744
|
+
switch (x.key) {
|
|
722
745
|
case "ArrowRight":
|
|
723
|
-
if (!
|
|
724
|
-
|
|
746
|
+
if (!((D = u.current) != null && D[_.current].isGroup)) break;
|
|
747
|
+
x.preventDefault(), m.has(_.current) ? wr(u, _.current) : w((T) => /* @__PURE__ */ new Set([...T, _.current]));
|
|
725
748
|
break;
|
|
726
749
|
case "ArrowLeft":
|
|
727
|
-
|
|
750
|
+
x.preventDefault(), m.has(_.current) ? w((T) => new Set([...T].filter((j) => j !== _.current))) : xr(u, _.current);
|
|
728
751
|
break;
|
|
729
752
|
case "ArrowUp":
|
|
730
|
-
|
|
753
|
+
x.preventDefault(), Tr(u, _.current);
|
|
731
754
|
break;
|
|
732
755
|
case "ArrowDown":
|
|
733
|
-
|
|
756
|
+
x.preventDefault(), Cr(u, _.current);
|
|
734
757
|
break;
|
|
735
758
|
case "Home":
|
|
736
|
-
|
|
759
|
+
x.preventDefault(), Sr(u);
|
|
737
760
|
break;
|
|
738
761
|
case "End":
|
|
739
|
-
|
|
762
|
+
x.preventDefault(), Pr(u);
|
|
740
763
|
break;
|
|
741
764
|
case "Enter":
|
|
742
|
-
|
|
765
|
+
x.preventDefault(), P(_.current), m.has(_.current) ? w((T) => new Set([...T].filter((j) => j !== _.current))) : w((T) => /* @__PURE__ */ new Set([...T, _.current]));
|
|
743
766
|
break;
|
|
744
767
|
}
|
|
745
|
-
}, [
|
|
746
|
-
return /* @__PURE__ */
|
|
768
|
+
}, [m]), L = z(s, b);
|
|
769
|
+
return /* @__PURE__ */ F.jsx(X.Provider, { value: { rootValue: m, setRootValue: w, selection: k, setSelection: P, focus: _, nodeMap: u, registerNode: f, removeNode: S }, children: /* @__PURE__ */ F.jsx(U.Provider, { value: { parent: "__root__", getIndex: y, depth: 0 }, children: /* @__PURE__ */ F.jsx(
|
|
747
770
|
"ul",
|
|
748
771
|
{
|
|
749
|
-
ref:
|
|
772
|
+
ref: N,
|
|
750
773
|
role: "tree",
|
|
751
774
|
"aria-multiselectable": "false",
|
|
752
|
-
onKeyDown:
|
|
753
|
-
...
|
|
775
|
+
onKeyDown: L,
|
|
776
|
+
...l
|
|
754
777
|
}
|
|
755
778
|
) }) });
|
|
756
|
-
}), kr =
|
|
757
|
-
const { selection:
|
|
758
|
-
function
|
|
759
|
-
var
|
|
760
|
-
(
|
|
779
|
+
}), kr = H(({ value: n, onFocus: i, onClick: o, ...a }, s) => {
|
|
780
|
+
const { selection: l, setSelection: g, focus: u, nodeMap: f, registerNode: S, removeNode: y } = I(X), { parent: m, getIndex: w, depth: k } = I(U), P = J(null), V = pe(P, s), N = z(i, b), _ = z(o, L);
|
|
781
|
+
function b(D) {
|
|
782
|
+
var T, j, Z, G;
|
|
783
|
+
(Z = (j = (T = f.current) == null ? void 0 : T[u.current]) == null ? void 0 : j.ref.current) == null || Z.setAttribute("tabindex", "-1"), (G = P.current) == null || G.setAttribute("tabindex", "0"), u.current = n, D.stopPropagation();
|
|
761
784
|
}
|
|
762
|
-
function
|
|
763
|
-
|
|
785
|
+
function L() {
|
|
786
|
+
g(n);
|
|
764
787
|
}
|
|
765
|
-
const x = w(
|
|
766
|
-
return
|
|
767
|
-
|
|
768
|
-
}, []), /* @__PURE__ */
|
|
788
|
+
const x = w(n);
|
|
789
|
+
return u.current == "" && m == "__root__" && x == 0 && (u.current = n), oe(() => (S(n, m, x, !1, P), () => y(n)), []), oe(() => () => {
|
|
790
|
+
u.current == n && (u.current = "");
|
|
791
|
+
}, []), /* @__PURE__ */ F.jsx(
|
|
769
792
|
"li",
|
|
770
793
|
{
|
|
771
|
-
ref:
|
|
794
|
+
ref: V,
|
|
772
795
|
role: "treeitem",
|
|
773
|
-
"aria-selected":
|
|
774
|
-
tabIndex:
|
|
775
|
-
onFocus:
|
|
776
|
-
onClick:
|
|
777
|
-
"data-depth":
|
|
796
|
+
"aria-selected": l == n,
|
|
797
|
+
tabIndex: u.current == n ? 0 : -1,
|
|
798
|
+
onFocus: N,
|
|
799
|
+
onClick: _,
|
|
800
|
+
"data-depth": k,
|
|
778
801
|
...a
|
|
779
802
|
}
|
|
780
803
|
);
|
|
781
|
-
}), jr =
|
|
782
|
-
const
|
|
783
|
-
function
|
|
784
|
-
var x,
|
|
785
|
-
(
|
|
804
|
+
}), jr = H(({ value: n, onFocus: i, ...o }, a) => {
|
|
805
|
+
const s = Ge(), { rootValue: l, selection: g, focus: u, nodeMap: f, registerNode: S, removeNode: y } = I(X), { parent: m, getIndex: w, depth: k } = I(U), P = J(null), V = pe(P, a), N = z(i, _);
|
|
806
|
+
function _(L) {
|
|
807
|
+
var x, D, T, j;
|
|
808
|
+
(T = (D = (x = f.current) == null ? void 0 : x[u.current]) == null ? void 0 : D.ref.current) == null || T.setAttribute("tabindex", "-1"), (j = P.current) == null || j.setAttribute("tabindex", "0"), u.current = n, L.stopPropagation();
|
|
786
809
|
}
|
|
787
|
-
const
|
|
788
|
-
return
|
|
789
|
-
|
|
790
|
-
}, []), /* @__PURE__ */
|
|
810
|
+
const b = w(n);
|
|
811
|
+
return u.current == "" && m == "__root__" && b == 0 && (u.current = n), oe(() => (S(n, m, b, !0, P), () => y(n)), []), oe(() => () => {
|
|
812
|
+
u.current == n && (u.current = "");
|
|
813
|
+
}, []), /* @__PURE__ */ F.jsx(U.Provider, { value: { parent: n, getIndex: s, depth: k + 1 }, children: /* @__PURE__ */ F.jsx(
|
|
791
814
|
"li",
|
|
792
815
|
{
|
|
793
|
-
ref:
|
|
816
|
+
ref: V,
|
|
794
817
|
role: "treeitem",
|
|
795
|
-
"data-state":
|
|
796
|
-
"data-depth":
|
|
797
|
-
"aria-expanded":
|
|
798
|
-
"aria-selected":
|
|
799
|
-
tabIndex:
|
|
800
|
-
onFocus:
|
|
801
|
-
...
|
|
818
|
+
"data-state": l.has(n) ? "open" : "closed",
|
|
819
|
+
"data-depth": k,
|
|
820
|
+
"aria-expanded": l.has(n),
|
|
821
|
+
"aria-selected": g == n,
|
|
822
|
+
tabIndex: u.current == n ? 0 : -1,
|
|
823
|
+
onFocus: N,
|
|
824
|
+
...o
|
|
802
825
|
}
|
|
803
826
|
) });
|
|
804
|
-
}), Dr =
|
|
805
|
-
const { setRootValue: a, setSelection:
|
|
806
|
-
function
|
|
807
|
-
|
|
827
|
+
}), Dr = H(({ onClick: n, ...i }, o) => {
|
|
828
|
+
const { setRootValue: a, setSelection: s } = I(X), { parent: l } = I(U), g = z(n, u);
|
|
829
|
+
function u() {
|
|
830
|
+
s(l), a((f) => f.has(l) ? new Set([...f].filter((S) => S !== l)) : /* @__PURE__ */ new Set([...f, l]));
|
|
808
831
|
}
|
|
809
|
-
return /* @__PURE__ */
|
|
832
|
+
return /* @__PURE__ */ F.jsx(
|
|
810
833
|
"div",
|
|
811
834
|
{
|
|
812
|
-
ref:
|
|
813
|
-
onClick:
|
|
814
|
-
...
|
|
835
|
+
ref: o,
|
|
836
|
+
onClick: g,
|
|
837
|
+
...i
|
|
815
838
|
}
|
|
816
839
|
);
|
|
817
|
-
}), Ar =
|
|
818
|
-
const { rootValue:
|
|
819
|
-
if (
|
|
820
|
-
return /* @__PURE__ */
|
|
840
|
+
}), Ar = H(({ ...n }, i) => {
|
|
841
|
+
const { rootValue: o } = I(X), { parent: a } = I(U);
|
|
842
|
+
if (o.has(a))
|
|
843
|
+
return /* @__PURE__ */ F.jsx(
|
|
821
844
|
"ul",
|
|
822
845
|
{
|
|
823
|
-
ref:
|
|
846
|
+
ref: i,
|
|
824
847
|
role: "group",
|
|
825
|
-
...
|
|
848
|
+
...n
|
|
826
849
|
}
|
|
827
850
|
);
|
|
828
851
|
}), Ir = {
|