react-composable-treeview 1.0.18 → 1.0.20

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