@sps-woodland/tabs 8.17.2 → 8.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.cjs.js +3 -3
- package/lib/index.es.js +746 -733
- package/lib/style.css +1 -1
- package/package.json +5 -5
package/lib/index.es.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
import * as N from "react";
|
2
|
-
import R, { useState as B, useRef as
|
3
|
-
import { compareNodeOrder as
|
4
|
-
import { flushSync as
|
5
|
-
import { Metadata as
|
6
|
-
import { code as
|
7
|
-
class
|
2
|
+
import R, { useState as B, useRef as k, useEffect as O, useCallback as J, useMemo as V, useContext as ae, createContext as Ht } from "react";
|
3
|
+
import { compareNodeOrder as Pe, getFirstItem as Wt, getChildNodes as jt, useCollection as Vt } from "@react-stately/collections";
|
4
|
+
import { flushSync as Gt } from "react-dom";
|
5
|
+
import { Metadata as ue, modChildren as Xt, cl as pt, Content as Yt, useChildTestIdAttrBuilder as qt } from "@sps-woodland/core";
|
6
|
+
import { code as Ge } from "@spscommerce/utils";
|
7
|
+
class Xe {
|
8
8
|
*[Symbol.iterator]() {
|
9
9
|
yield* this.iterable;
|
10
10
|
}
|
@@ -58,84 +58,84 @@ class z extends Set {
|
|
58
58
|
super(e), e instanceof z ? (this.anchorKey = r || e.anchorKey, this.currentKey = n || e.currentKey) : (this.anchorKey = r, this.currentKey = n);
|
59
59
|
}
|
60
60
|
}
|
61
|
-
function
|
62
|
-
let [n, i] = B(t || e), o =
|
61
|
+
function bt(t, e, r) {
|
62
|
+
let [n, i] = B(t || e), o = k(t !== void 0), s = t !== void 0;
|
63
63
|
O(() => {
|
64
64
|
let v = o.current;
|
65
65
|
v !== s && console.warn(`WARN: A component changed from ${v ? "controlled" : "uncontrolled"} to ${s ? "controlled" : "uncontrolled"}.`), o.current = s;
|
66
66
|
}, [
|
67
67
|
s
|
68
68
|
]);
|
69
|
-
let
|
70
|
-
let
|
71
|
-
r && (Object.is(
|
69
|
+
let c = s ? t : n, f = J((v, ...y) => {
|
70
|
+
let K = (h, ...g) => {
|
71
|
+
r && (Object.is(c, h) || r(h, ...g)), s || (c = h);
|
72
72
|
};
|
73
|
-
typeof v == "function" ? (console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"), i((
|
74
|
-
let
|
75
|
-
return
|
76
|
-
})) : (s || i(v),
|
73
|
+
typeof v == "function" ? (console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"), i((g, ...L) => {
|
74
|
+
let P = v(s ? c : g, ...L);
|
75
|
+
return K(P, ...y), s ? g : P;
|
76
|
+
})) : (s || i(v), K(v, ...y));
|
77
77
|
}, [
|
78
78
|
s,
|
79
|
-
|
79
|
+
c,
|
80
80
|
r
|
81
81
|
]);
|
82
82
|
return [
|
83
|
-
|
84
|
-
|
83
|
+
c,
|
84
|
+
f
|
85
85
|
];
|
86
86
|
}
|
87
|
-
function
|
87
|
+
function Jt(t, e) {
|
88
88
|
if (t.size !== e.size) return !1;
|
89
89
|
for (let r of t)
|
90
90
|
if (!e.has(r)) return !1;
|
91
91
|
return !0;
|
92
92
|
}
|
93
|
-
function
|
94
|
-
let { selectionMode: e = "none", disallowEmptySelection: r, allowDuplicateSelectionEvents: n, selectionBehavior: i = "toggle", disabledBehavior: o = "all" } = t, s =
|
93
|
+
function Zt(t) {
|
94
|
+
let { selectionMode: e = "none", disallowEmptySelection: r, allowDuplicateSelectionEvents: n, selectionBehavior: i = "toggle", disabledBehavior: o = "all" } = t, s = k(!1), [, c] = B(!1), f = k(null), v = k(null), [, y] = B(null), K = V(() => Ye(t.selectedKeys), [
|
95
95
|
t.selectedKeys
|
96
|
-
]), h = V(() =>
|
96
|
+
]), h = V(() => Ye(t.defaultSelectedKeys, new z()), [
|
97
97
|
t.defaultSelectedKeys
|
98
|
-
]), [
|
98
|
+
]), [g, L] = bt(K, h, t.onSelectionChange), P = V(() => t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set(), [
|
99
99
|
t.disabledKeys
|
100
|
-
]), [
|
101
|
-
i === "replace" &&
|
102
|
-
let
|
100
|
+
]), [w, E] = B(i);
|
101
|
+
i === "replace" && w === "toggle" && typeof g == "object" && g.size === 0 && E("replace");
|
102
|
+
let x = k(i);
|
103
103
|
return O(() => {
|
104
|
-
i !==
|
104
|
+
i !== x.current && (E(i), x.current = i);
|
105
105
|
}, [
|
106
106
|
i
|
107
107
|
]), {
|
108
108
|
selectionMode: e,
|
109
109
|
disallowEmptySelection: r,
|
110
|
-
selectionBehavior:
|
111
|
-
setSelectionBehavior:
|
110
|
+
selectionBehavior: w,
|
111
|
+
setSelectionBehavior: E,
|
112
112
|
get isFocused() {
|
113
113
|
return s.current;
|
114
114
|
},
|
115
115
|
setFocused(_) {
|
116
|
-
s.current = _,
|
116
|
+
s.current = _, c(_);
|
117
117
|
},
|
118
118
|
get focusedKey() {
|
119
|
-
return
|
119
|
+
return f.current;
|
120
120
|
},
|
121
121
|
get childFocusStrategy() {
|
122
122
|
return v.current;
|
123
123
|
},
|
124
|
-
setFocusedKey(_,
|
125
|
-
|
124
|
+
setFocusedKey(_, I = "first") {
|
125
|
+
f.current = _, v.current = I, y(_);
|
126
126
|
},
|
127
|
-
selectedKeys:
|
127
|
+
selectedKeys: g,
|
128
128
|
setSelectedKeys(_) {
|
129
|
-
(n || !
|
129
|
+
(n || !Jt(_, g)) && L(_);
|
130
130
|
},
|
131
|
-
disabledKeys:
|
131
|
+
disabledKeys: P,
|
132
132
|
disabledBehavior: o
|
133
133
|
};
|
134
134
|
}
|
135
|
-
function
|
135
|
+
function Ye(t, e) {
|
136
136
|
return t ? t === "all" ? "all" : new z(t) : e;
|
137
137
|
}
|
138
|
-
class
|
138
|
+
class Qt {
|
139
139
|
/**
|
140
140
|
* The type of selection that is allowed in the collection.
|
141
141
|
*/
|
@@ -227,7 +227,7 @@ class Yt {
|
|
227
227
|
let e = null;
|
228
228
|
for (let r of this.state.selectedKeys) {
|
229
229
|
let n = this.collection.getItem(r);
|
230
|
-
(!e || n &&
|
230
|
+
(!e || n && Pe(this.collection, n, e) < 0) && (e = n);
|
231
231
|
}
|
232
232
|
return e == null ? void 0 : e.key;
|
233
233
|
}
|
@@ -235,7 +235,7 @@ class Yt {
|
|
235
235
|
let e = null;
|
236
236
|
for (let r of this.state.selectedKeys) {
|
237
237
|
let n = this.collection.getItem(r);
|
238
|
-
(!e || n &&
|
238
|
+
(!e || n && Pe(this.collection, n, e) > 0) && (e = n);
|
239
239
|
}
|
240
240
|
return e == null ? void 0 : e.key;
|
241
241
|
}
|
@@ -269,7 +269,7 @@ class Yt {
|
|
269
269
|
}
|
270
270
|
getKeyRange(e, r) {
|
271
271
|
let n = this.collection.getItem(e), i = this.collection.getItem(r);
|
272
|
-
return n && i ?
|
272
|
+
return n && i ? Pe(this.collection, n, i) <= 0 ? this.getKeyRangeInternal(e, r) : this.getKeyRangeInternal(r, e) : [];
|
273
273
|
}
|
274
274
|
getKeyRangeInternal(e, r) {
|
275
275
|
let n = [], i = e;
|
@@ -322,10 +322,10 @@ class Yt {
|
|
322
322
|
}
|
323
323
|
getSelectAllKeys() {
|
324
324
|
let e = [], r = (n) => {
|
325
|
-
for (; n; ) {
|
325
|
+
for (; n != null; ) {
|
326
326
|
if (this.canSelectItem(n)) {
|
327
327
|
let i = this.collection.getItem(n);
|
328
|
-
i.type === "item" && e.push(n), i.hasChildNodes && (this.allowsCellSelection || i.type !== "item") && r(
|
328
|
+
i.type === "item" && e.push(n), i.hasChildNodes && (this.allowsCellSelection || i.type !== "item") && r(Wt(jt(i, this.collection)).key);
|
329
329
|
}
|
330
330
|
n = this.collection.getKeyAfter(n);
|
331
331
|
}
|
@@ -390,178 +390,179 @@ class Yt {
|
|
390
390
|
this.allowsCellSelection = (i = n == null ? void 0 : n.allowsCellSelection) !== null && i !== void 0 ? i : !1, this._isSelectAll = null;
|
391
391
|
}
|
392
392
|
}
|
393
|
-
function
|
394
|
-
let { filter: e } = t, r =
|
393
|
+
function er(t) {
|
394
|
+
let { filter: e } = t, r = Zt(t), n = V(() => t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set(), [
|
395
395
|
t.disabledKeys
|
396
|
-
]), i =
|
396
|
+
]), i = J((v) => e ? new Xe(e(v)) : new Xe(v), [
|
397
397
|
e
|
398
398
|
]), o = V(() => ({
|
399
399
|
suppressTextValueWarning: t.suppressTextValueWarning
|
400
400
|
}), [
|
401
401
|
t.suppressTextValueWarning
|
402
|
-
]), s =
|
402
|
+
]), s = Vt(t, i, o), c = V(() => new Qt(s, r), [
|
403
403
|
s,
|
404
404
|
r
|
405
405
|
]);
|
406
|
-
const
|
406
|
+
const f = k(null);
|
407
407
|
return O(() => {
|
408
408
|
if (r.focusedKey != null && !s.getItem(r.focusedKey)) {
|
409
|
-
const v =
|
410
|
-
...
|
411
|
-
].map((
|
412
|
-
const
|
413
|
-
return
|
414
|
-
}).filter((
|
409
|
+
const v = f.current.getItem(r.focusedKey), y = [
|
410
|
+
...f.current.getKeys()
|
411
|
+
].map((w) => {
|
412
|
+
const E = f.current.getItem(w);
|
413
|
+
return E.type === "item" ? E : null;
|
414
|
+
}).filter((w) => w !== null), K = [
|
415
415
|
...s.getKeys()
|
416
|
-
].map((
|
417
|
-
const
|
418
|
-
return
|
419
|
-
}).filter((
|
420
|
-
let
|
421
|
-
for (;
|
422
|
-
if (!
|
423
|
-
|
416
|
+
].map((w) => {
|
417
|
+
const E = s.getItem(w);
|
418
|
+
return E.type === "item" ? E : null;
|
419
|
+
}).filter((w) => w !== null), h = y.length - K.length;
|
420
|
+
let g = Math.min(h > 1 ? Math.max(v.index - h + 1, 0) : v.index, K.length - 1), L, P = !1;
|
421
|
+
for (; g >= 0; ) {
|
422
|
+
if (!c.isDisabled(K[g].key)) {
|
423
|
+
L = K[g];
|
424
424
|
break;
|
425
425
|
}
|
426
|
-
|
426
|
+
g < K.length - 1 && !P ? g++ : (P = !0, g > v.index && (g = v.index), g--);
|
427
427
|
}
|
428
|
-
r.setFocusedKey(
|
428
|
+
r.setFocusedKey(L ? L.key : null);
|
429
429
|
}
|
430
|
-
|
430
|
+
f.current = s;
|
431
431
|
}, [
|
432
432
|
s,
|
433
|
-
|
433
|
+
c,
|
434
434
|
r,
|
435
435
|
r.focusedKey
|
436
436
|
]), {
|
437
437
|
collection: s,
|
438
438
|
disabledKeys: n,
|
439
|
-
selectionManager:
|
439
|
+
selectionManager: c
|
440
440
|
};
|
441
441
|
}
|
442
|
-
function
|
442
|
+
function tr(t) {
|
443
443
|
var e;
|
444
|
-
let [r, n] =
|
444
|
+
let [r, n] = bt(t.selectedKey, (e = t.defaultSelectedKey) !== null && e !== void 0 ? e : null, t.onSelectionChange), i = V(() => r != null ? [
|
445
445
|
r
|
446
446
|
] : [], [
|
447
447
|
r
|
448
|
-
]), { collection: o, disabledKeys: s, selectionManager:
|
448
|
+
]), { collection: o, disabledKeys: s, selectionManager: c } = er({
|
449
449
|
...t,
|
450
450
|
selectionMode: "single",
|
451
451
|
disallowEmptySelection: !0,
|
452
452
|
allowDuplicateSelectionEvents: !0,
|
453
453
|
selectedKeys: i,
|
454
454
|
onSelectionChange: (v) => {
|
455
|
-
var
|
456
|
-
let
|
457
|
-
|
455
|
+
var y;
|
456
|
+
let K = (y = v.values().next().value) !== null && y !== void 0 ? y : null;
|
457
|
+
K === r && t.onSelectionChange && t.onSelectionChange(K), n(K);
|
458
458
|
}
|
459
|
-
}),
|
459
|
+
}), f = r != null ? o.getItem(r) : null;
|
460
460
|
return {
|
461
461
|
collection: o,
|
462
462
|
disabledKeys: s,
|
463
|
-
selectionManager:
|
463
|
+
selectionManager: c,
|
464
464
|
selectedKey: r,
|
465
465
|
setSelectedKey: n,
|
466
|
-
selectedItem:
|
466
|
+
selectedItem: f
|
467
467
|
};
|
468
468
|
}
|
469
|
-
function
|
469
|
+
function rr(t) {
|
470
470
|
var e;
|
471
|
-
let r =
|
471
|
+
let r = tr({
|
472
472
|
...t,
|
473
473
|
suppressTextValueWarning: !0,
|
474
|
-
defaultSelectedKey: (e = t.defaultSelectedKey) !== null && e !== void 0 ? e :
|
475
|
-
}), { selectionManager: n, collection: i, selectedKey: o } = r, s =
|
474
|
+
defaultSelectedKey: (e = t.defaultSelectedKey) !== null && e !== void 0 ? e : qe(t.collection, t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set())
|
475
|
+
}), { selectionManager: n, collection: i, selectedKey: o } = r, s = k(o);
|
476
476
|
return O(() => {
|
477
|
-
let
|
478
|
-
(n.isEmpty || !i.getItem(
|
479
|
-
|
480
|
-
])), (
|
477
|
+
let c = o;
|
478
|
+
(n.isEmpty || !i.getItem(c)) && (c = qe(i, r.disabledKeys), c != null && n.setSelectedKeys([
|
479
|
+
c
|
480
|
+
])), (c != null && n.focusedKey == null || !n.isFocused && c !== s.current) && n.setFocusedKey(c), s.current = c;
|
481
481
|
}), {
|
482
482
|
...r,
|
483
483
|
isDisabled: t.isDisabled || !1
|
484
484
|
};
|
485
485
|
}
|
486
|
-
function
|
486
|
+
function qe(t, e) {
|
487
487
|
let r = null;
|
488
488
|
if (t) {
|
489
|
-
|
490
|
-
e.has(r)
|
489
|
+
var n, i, o, s;
|
490
|
+
for (r = t.getFirstKey(); (e.has(r) || !((i = t.getItem(r)) === null || i === void 0 || (n = i.props) === null || n === void 0) && n.isDisabled) && r !== t.getLastKey(); ) r = t.getKeyAfter(r);
|
491
|
+
(e.has(r) || !((s = t.getItem(r)) === null || s === void 0 || (o = s.props) === null || o === void 0) && o.isDisabled) && r === t.getLastKey() && (r = t.getFirstKey());
|
491
492
|
}
|
492
493
|
return r;
|
493
494
|
}
|
494
|
-
const
|
495
|
-
function
|
496
|
-
return typeof e == "string" && (e = e.replace(/\s+/g, "")), `${
|
495
|
+
const vt = /* @__PURE__ */ new WeakMap();
|
496
|
+
function $e(t, e, r) {
|
497
|
+
return typeof e == "string" && (e = e.replace(/\s+/g, "")), `${vt.get(t)}-${r}-${e}`;
|
497
498
|
}
|
498
|
-
const
|
499
|
+
const fe = typeof document < "u" ? R.useLayoutEffect : () => {
|
499
500
|
};
|
500
|
-
function
|
501
|
-
const e =
|
502
|
-
return
|
501
|
+
function ie(t) {
|
502
|
+
const e = k(null);
|
503
|
+
return fe(() => {
|
503
504
|
e.current = t;
|
504
505
|
}, [
|
505
506
|
t
|
506
|
-
]),
|
507
|
+
]), J((...r) => {
|
507
508
|
const n = e.current;
|
508
509
|
return n == null ? void 0 : n(...r);
|
509
510
|
}, []);
|
510
511
|
}
|
511
|
-
const
|
512
|
+
const me = {
|
512
513
|
prefix: String(Math.round(Math.random() * 1e10)),
|
513
514
|
current: 0
|
514
|
-
},
|
515
|
-
let
|
516
|
-
function
|
517
|
-
let e =
|
515
|
+
}, yt = /* @__PURE__ */ R.createContext(me), nr = /* @__PURE__ */ R.createContext(!1);
|
516
|
+
let ir = !!(typeof window < "u" && window.document && window.document.createElement), _e = /* @__PURE__ */ new WeakMap();
|
517
|
+
function lr(t = !1) {
|
518
|
+
let e = ae(yt), r = k(null);
|
518
519
|
if (r.current === null && !t) {
|
519
520
|
var n, i;
|
520
521
|
let o = (i = R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || i === void 0 || (n = i.ReactCurrentOwner) === null || n === void 0 ? void 0 : n.current;
|
521
522
|
if (o) {
|
522
|
-
let s =
|
523
|
-
s == null ?
|
523
|
+
let s = _e.get(o);
|
524
|
+
s == null ? _e.set(o, {
|
524
525
|
id: e.current,
|
525
526
|
state: o.memoizedState
|
526
|
-
}) : o.memoizedState !== s.state && (e.current = s.id,
|
527
|
+
}) : o.memoizedState !== s.state && (e.current = s.id, _e.delete(o));
|
527
528
|
}
|
528
529
|
r.current = ++e.current;
|
529
530
|
}
|
530
531
|
return r.current;
|
531
532
|
}
|
532
|
-
function
|
533
|
-
let e =
|
534
|
-
e ===
|
535
|
-
let r =
|
533
|
+
function or(t) {
|
534
|
+
let e = ae(yt);
|
535
|
+
e === me && !ir && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
|
536
|
+
let r = lr(!!t), n = e === me && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${e.prefix}`;
|
536
537
|
return t || `${n}-${r}`;
|
537
538
|
}
|
538
|
-
function
|
539
|
-
let e = R.useId(), [r] = B(
|
539
|
+
function sr(t) {
|
540
|
+
let e = R.useId(), [r] = B(gt()), n = r || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${me.prefix}`;
|
540
541
|
return t || `${n}-${e}`;
|
541
542
|
}
|
542
|
-
const
|
543
|
-
function
|
543
|
+
const ar = typeof R.useId == "function" ? sr : or;
|
544
|
+
function cr() {
|
544
545
|
return !1;
|
545
546
|
}
|
546
|
-
function
|
547
|
+
function dr() {
|
547
548
|
return !0;
|
548
549
|
}
|
549
|
-
function
|
550
|
+
function ur(t) {
|
550
551
|
return () => {
|
551
552
|
};
|
552
553
|
}
|
553
|
-
function
|
554
|
-
return typeof R.useSyncExternalStore == "function" ? R.useSyncExternalStore(
|
554
|
+
function gt() {
|
555
|
+
return typeof R.useSyncExternalStore == "function" ? R.useSyncExternalStore(ur, cr, dr) : ae(nr);
|
555
556
|
}
|
556
|
-
let
|
557
|
-
function
|
558
|
-
let [e, r] = B(t), n =
|
557
|
+
let fr = !!(typeof window < "u" && window.document && window.document.createElement), Ke = /* @__PURE__ */ new Map();
|
558
|
+
function ht(t) {
|
559
|
+
let [e, r] = B(t), n = k(null), i = ar(e), o = J((s) => {
|
559
560
|
n.current = s;
|
560
561
|
}, []);
|
561
|
-
return
|
562
|
+
return fr && Ke.set(i, o), fe(() => {
|
562
563
|
let s = i;
|
563
564
|
return () => {
|
564
|
-
|
565
|
+
Ke.delete(s);
|
565
566
|
};
|
566
567
|
}, [
|
567
568
|
i
|
@@ -570,15 +571,15 @@ function vt(t) {
|
|
570
571
|
s && (n.current = null, r(s));
|
571
572
|
}), i;
|
572
573
|
}
|
573
|
-
function
|
574
|
+
function pr(t, e) {
|
574
575
|
if (t === e) return t;
|
575
|
-
let r =
|
576
|
+
let r = Ke.get(t);
|
576
577
|
if (r)
|
577
578
|
return r(e), e;
|
578
|
-
let n =
|
579
|
+
let n = Ke.get(e);
|
579
580
|
return n ? (n(t), t) : e;
|
580
581
|
}
|
581
|
-
function
|
582
|
+
function $t(...t) {
|
582
583
|
return (...e) => {
|
583
584
|
for (let r of t) typeof r == "function" && r(...e);
|
584
585
|
};
|
@@ -586,21 +587,21 @@ function yt(...t) {
|
|
586
587
|
const C = (t) => {
|
587
588
|
var e;
|
588
589
|
return (e = t == null ? void 0 : t.ownerDocument) !== null && e !== void 0 ? e : document;
|
589
|
-
},
|
590
|
-
function
|
590
|
+
}, Z = (t) => t && "window" in t && t.window === t ? t : C(t).defaultView || window;
|
591
|
+
function mt(t) {
|
591
592
|
var e, r, n = "";
|
592
593
|
if (typeof t == "string" || typeof t == "number") n += t;
|
593
594
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
594
595
|
var i = t.length;
|
595
|
-
for (e = 0; e < i; e++) t[e] && (r =
|
596
|
+
for (e = 0; e < i; e++) t[e] && (r = mt(t[e])) && (n && (n += " "), n += r);
|
596
597
|
} else for (r in t) t[r] && (n && (n += " "), n += r);
|
597
598
|
return n;
|
598
599
|
}
|
599
|
-
function
|
600
|
-
for (var t, e, r = 0, n = "", i = arguments.length; r < i; r++) (t = arguments[r]) && (e =
|
600
|
+
function br() {
|
601
|
+
for (var t, e, r = 0, n = "", i = arguments.length; r < i; r++) (t = arguments[r]) && (e = mt(t)) && (n && (n += " "), n += e);
|
601
602
|
return n;
|
602
603
|
}
|
603
|
-
function
|
604
|
+
function Y(...t) {
|
604
605
|
let e = {
|
605
606
|
...t[0]
|
606
607
|
};
|
@@ -611,19 +612,19 @@ function G(...t) {
|
|
611
612
|
typeof o == "function" && typeof s == "function" && // This is a lot faster than a regex.
|
612
613
|
i[0] === "o" && i[1] === "n" && i.charCodeAt(2) >= /* 'A' */
|
613
614
|
65 && i.charCodeAt(2) <= /* 'Z' */
|
614
|
-
90 ? e[i] =
|
615
|
+
90 ? e[i] = $t(o, s) : (i === "className" || i === "UNSAFE_className") && typeof o == "string" && typeof s == "string" ? e[i] = br(o, s) : i === "id" && o && s ? e.id = pr(o, s) : e[i] = s !== void 0 ? s : o;
|
615
616
|
}
|
616
617
|
}
|
617
618
|
return e;
|
618
619
|
}
|
619
|
-
const
|
620
|
+
const vr = /* @__PURE__ */ new Set([
|
620
621
|
"id"
|
621
|
-
]),
|
622
|
+
]), yr = /* @__PURE__ */ new Set([
|
622
623
|
"aria-label",
|
623
624
|
"aria-labelledby",
|
624
625
|
"aria-describedby",
|
625
626
|
"aria-details"
|
626
|
-
]),
|
627
|
+
]), gr = /* @__PURE__ */ new Set([
|
627
628
|
"href",
|
628
629
|
"hrefLang",
|
629
630
|
"target",
|
@@ -631,37 +632,37 @@ const fr = /* @__PURE__ */ new Set([
|
|
631
632
|
"download",
|
632
633
|
"ping",
|
633
634
|
"referrerPolicy"
|
634
|
-
]),
|
635
|
-
function
|
635
|
+
]), hr = /^(data-.*)$/;
|
636
|
+
function $r(t, e = {}) {
|
636
637
|
let { labelable: r, isLink: n, propNames: i } = e, o = {};
|
637
|
-
for (const s in t) Object.prototype.hasOwnProperty.call(t, s) && (
|
638
|
+
for (const s in t) Object.prototype.hasOwnProperty.call(t, s) && (vr.has(s) || r && yr.has(s) || n && gr.has(s) || i != null && i.has(s) || hr.test(s)) && (o[s] = t[s]);
|
638
639
|
return o;
|
639
640
|
}
|
640
641
|
function j(t) {
|
641
|
-
if (
|
642
|
+
if (mr()) t.focus({
|
642
643
|
preventScroll: !0
|
643
644
|
});
|
644
645
|
else {
|
645
|
-
let e =
|
646
|
-
t.focus(),
|
646
|
+
let e = Kr(t);
|
647
|
+
t.focus(), Sr(e);
|
647
648
|
}
|
648
649
|
}
|
649
|
-
let
|
650
|
-
function
|
651
|
-
if (
|
652
|
-
|
650
|
+
let be = null;
|
651
|
+
function mr() {
|
652
|
+
if (be == null) {
|
653
|
+
be = !1;
|
653
654
|
try {
|
654
655
|
document.createElement("div").focus({
|
655
656
|
get preventScroll() {
|
656
|
-
return
|
657
|
+
return be = !0, !0;
|
657
658
|
}
|
658
659
|
});
|
659
660
|
} catch {
|
660
661
|
}
|
661
662
|
}
|
662
|
-
return
|
663
|
+
return be;
|
663
664
|
}
|
664
|
-
function
|
665
|
+
function Kr(t) {
|
665
666
|
let e = t.parentNode, r = [], n = document.scrollingElement || document.documentElement;
|
666
667
|
for (; e instanceof HTMLElement && e !== n; )
|
667
668
|
(e.offsetHeight < e.scrollHeight || e.offsetWidth < e.scrollWidth) && r.push({
|
@@ -675,87 +676,82 @@ function hr(t) {
|
|
675
676
|
scrollLeft: n.scrollLeft
|
676
677
|
}), r;
|
677
678
|
}
|
678
|
-
function
|
679
|
+
function Sr(t) {
|
679
680
|
for (let { element: e, scrollTop: r, scrollLeft: n } of t)
|
680
681
|
e.scrollTop = r, e.scrollLeft = n;
|
681
682
|
}
|
682
|
-
function
|
683
|
+
function we(t) {
|
683
684
|
var e;
|
684
685
|
return typeof window > "u" || window.navigator == null ? !1 : ((e = window.navigator.userAgentData) === null || e === void 0 ? void 0 : e.brands.some((r) => t.test(r.brand))) || t.test(window.navigator.userAgent);
|
685
686
|
}
|
686
|
-
function
|
687
|
+
function ze(t) {
|
687
688
|
var e;
|
688
689
|
return typeof window < "u" && window.navigator != null ? t.test(((e = window.navigator.userAgentData) === null || e === void 0 ? void 0 : e.platform) || window.navigator.platform) : !1;
|
689
690
|
}
|
690
|
-
function
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
return
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
return
|
705
|
-
}
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
return
|
711
|
-
}
|
712
|
-
|
713
|
-
|
714
|
-
}
|
715
|
-
function Tr() {
|
716
|
-
return Ke(/Firefox/i);
|
717
|
-
}
|
718
|
-
const Pr = /* @__PURE__ */ Bt({
|
691
|
+
function G(t) {
|
692
|
+
let e = null;
|
693
|
+
return () => (e == null && (e = t()), e);
|
694
|
+
}
|
695
|
+
const Q = G(function() {
|
696
|
+
return ze(/^Mac/i);
|
697
|
+
}), wr = G(function() {
|
698
|
+
return ze(/^iPhone/i);
|
699
|
+
}), Kt = G(function() {
|
700
|
+
return ze(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
701
|
+
Q() && navigator.maxTouchPoints > 1;
|
702
|
+
}), Ne = G(function() {
|
703
|
+
return wr() || Kt();
|
704
|
+
}), Tr = G(function() {
|
705
|
+
return Q() || Ne();
|
706
|
+
}), Pr = G(function() {
|
707
|
+
return we(/AppleWebKit/i) && !_r();
|
708
|
+
}), _r = G(function() {
|
709
|
+
return we(/Chrome/i);
|
710
|
+
}), St = G(function() {
|
711
|
+
return we(/Android/i);
|
712
|
+
}), Er = G(function() {
|
713
|
+
return we(/Firefox/i);
|
714
|
+
}), xr = /* @__PURE__ */ Ht({
|
719
715
|
isNative: !0,
|
720
|
-
open:
|
716
|
+
open: Lr,
|
721
717
|
useHref: (t) => t
|
722
718
|
});
|
723
|
-
function
|
724
|
-
return
|
719
|
+
function Be() {
|
720
|
+
return ae(xr);
|
725
721
|
}
|
726
|
-
function
|
722
|
+
function ee(t, e, r = !0) {
|
727
723
|
var n, i;
|
728
|
-
let { metaKey: o, ctrlKey: s, altKey:
|
729
|
-
|
730
|
-
let v =
|
724
|
+
let { metaKey: o, ctrlKey: s, altKey: c, shiftKey: f } = e;
|
725
|
+
Er() && (!((i = window.event) === null || i === void 0 || (n = i.type) === null || n === void 0) && n.startsWith("key")) && t.target === "_blank" && (Q() ? o = !0 : s = !0);
|
726
|
+
let v = Pr() && Q() && !Kt() ? new KeyboardEvent("keydown", {
|
731
727
|
keyIdentifier: "Enter",
|
732
728
|
metaKey: o,
|
733
729
|
ctrlKey: s,
|
734
|
-
altKey:
|
735
|
-
shiftKey:
|
730
|
+
altKey: c,
|
731
|
+
shiftKey: f
|
736
732
|
}) : new MouseEvent("click", {
|
737
733
|
metaKey: o,
|
738
734
|
ctrlKey: s,
|
739
|
-
altKey:
|
740
|
-
shiftKey:
|
735
|
+
altKey: c,
|
736
|
+
shiftKey: f,
|
741
737
|
bubbles: !0,
|
742
738
|
cancelable: !0
|
743
739
|
});
|
744
|
-
|
740
|
+
ee.isOpening = r, j(t), t.dispatchEvent(v), ee.isOpening = !1;
|
745
741
|
}
|
746
|
-
|
747
|
-
function
|
742
|
+
ee.isOpening = !1;
|
743
|
+
function kr(t, e) {
|
748
744
|
if (t instanceof HTMLAnchorElement) e(t);
|
749
745
|
else if (t.hasAttribute("data-href")) {
|
750
746
|
let r = document.createElement("a");
|
751
747
|
r.href = t.getAttribute("data-href"), t.hasAttribute("data-target") && (r.target = t.getAttribute("data-target")), t.hasAttribute("data-rel") && (r.rel = t.getAttribute("data-rel")), t.hasAttribute("data-download") && (r.download = t.getAttribute("data-download")), t.hasAttribute("data-ping") && (r.ping = t.getAttribute("data-ping")), t.hasAttribute("data-referrer-policy") && (r.referrerPolicy = t.getAttribute("data-referrer-policy")), t.appendChild(r), e(r), t.removeChild(r);
|
752
748
|
}
|
753
749
|
}
|
754
|
-
function
|
755
|
-
|
750
|
+
function Lr(t, e) {
|
751
|
+
kr(t, (r) => ee(r, e));
|
756
752
|
}
|
757
|
-
function
|
758
|
-
let e =
|
753
|
+
function Mr(t) {
|
754
|
+
let e = Be();
|
759
755
|
return {
|
760
756
|
href: t != null && t.href ? e.useHref(t == null ? void 0 : t.href) : void 0,
|
761
757
|
target: t == null ? void 0 : t.target,
|
@@ -765,50 +761,50 @@ function xr(t) {
|
|
765
761
|
referrerPolicy: t == null ? void 0 : t.referrerPolicy
|
766
762
|
};
|
767
763
|
}
|
768
|
-
let
|
769
|
-
function
|
764
|
+
let le = /* @__PURE__ */ new Map(), Le = /* @__PURE__ */ new Set();
|
765
|
+
function Je() {
|
770
766
|
if (typeof window > "u") return;
|
771
767
|
function t(n) {
|
772
768
|
return "propertyName" in n;
|
773
769
|
}
|
774
770
|
let e = (n) => {
|
775
771
|
if (!t(n) || !n.target) return;
|
776
|
-
let i =
|
777
|
-
i || (i = /* @__PURE__ */ new Set(),
|
772
|
+
let i = le.get(n.target);
|
773
|
+
i || (i = /* @__PURE__ */ new Set(), le.set(n.target, i), n.target.addEventListener("transitioncancel", r, {
|
778
774
|
once: !0
|
779
775
|
})), i.add(n.propertyName);
|
780
776
|
}, r = (n) => {
|
781
777
|
if (!t(n) || !n.target) return;
|
782
|
-
let i =
|
783
|
-
if (i && (i.delete(n.propertyName), i.size === 0 && (n.target.removeEventListener("transitioncancel", r),
|
784
|
-
for (let o of
|
785
|
-
|
778
|
+
let i = le.get(n.target);
|
779
|
+
if (i && (i.delete(n.propertyName), i.size === 0 && (n.target.removeEventListener("transitioncancel", r), le.delete(n.target)), le.size === 0)) {
|
780
|
+
for (let o of Le) o();
|
781
|
+
Le.clear();
|
786
782
|
}
|
787
783
|
};
|
788
784
|
document.body.addEventListener("transitionrun", e), document.body.addEventListener("transitionend", r);
|
789
785
|
}
|
790
|
-
typeof document < "u" && (document.readyState !== "loading" ?
|
791
|
-
function
|
786
|
+
typeof document < "u" && (document.readyState !== "loading" ? Je() : document.addEventListener("DOMContentLoaded", Je));
|
787
|
+
function wt(t) {
|
792
788
|
requestAnimationFrame(() => {
|
793
|
-
|
789
|
+
le.size === 0 ? t() : Le.add(t);
|
794
790
|
});
|
795
791
|
}
|
796
|
-
function
|
797
|
-
let t =
|
798
|
-
let
|
792
|
+
function Tt() {
|
793
|
+
let t = k(/* @__PURE__ */ new Map()), e = J((i, o, s, c) => {
|
794
|
+
let f = c != null && c.once ? (...v) => {
|
799
795
|
t.current.delete(s), s(...v);
|
800
796
|
} : s;
|
801
797
|
t.current.set(s, {
|
802
798
|
type: o,
|
803
799
|
eventTarget: i,
|
804
|
-
fn:
|
805
|
-
options:
|
806
|
-
}), i.addEventListener(o, s,
|
807
|
-
}, []), r =
|
808
|
-
var
|
809
|
-
let v = ((
|
810
|
-
i.removeEventListener(o, v,
|
811
|
-
}, []), n =
|
800
|
+
fn: f,
|
801
|
+
options: c
|
802
|
+
}), i.addEventListener(o, s, c);
|
803
|
+
}, []), r = J((i, o, s, c) => {
|
804
|
+
var f;
|
805
|
+
let v = ((f = t.current.get(s)) === null || f === void 0 ? void 0 : f.fn) || s;
|
806
|
+
i.removeEventListener(o, v, c), t.current.delete(s);
|
807
|
+
}, []), n = J(() => {
|
812
808
|
t.current.forEach((i, o) => {
|
813
809
|
r(i.eventTarget, i.type, o, i.options);
|
814
810
|
});
|
@@ -823,9 +819,9 @@ function Kt() {
|
|
823
819
|
removeAllGlobalListeners: n
|
824
820
|
};
|
825
821
|
}
|
826
|
-
function
|
822
|
+
function Pt(t, e) {
|
827
823
|
let { id: r, "aria-label": n, "aria-labelledby": i } = t;
|
828
|
-
return r =
|
824
|
+
return r = ht(r), i && n ? i = [
|
829
825
|
.../* @__PURE__ */ new Set([
|
830
826
|
r,
|
831
827
|
...i.trim().split(/\s+/)
|
@@ -836,44 +832,44 @@ function St(t, e) {
|
|
836
832
|
"aria-labelledby": i
|
837
833
|
};
|
838
834
|
}
|
839
|
-
function
|
840
|
-
|
835
|
+
function Ir(t, e) {
|
836
|
+
fe(() => {
|
841
837
|
if (t && t.ref && e)
|
842
838
|
return t.ref.current = e.current, () => {
|
843
839
|
t.ref && (t.ref.current = null);
|
844
840
|
};
|
845
841
|
});
|
846
842
|
}
|
847
|
-
function
|
843
|
+
function Dr(t, e) {
|
848
844
|
let r = window.getComputedStyle(t), n = /(auto|scroll)/.test(r.overflow + r.overflowX + r.overflowY);
|
849
845
|
return n && e && (n = t.scrollHeight !== t.clientHeight || t.scrollWidth !== t.clientWidth), n;
|
850
846
|
}
|
851
|
-
function
|
847
|
+
function Cr(t, e) {
|
852
848
|
const r = [];
|
853
849
|
for (; t && t !== document.documentElement; )
|
854
|
-
|
850
|
+
Dr(t, e) && r.push(t), t = t.parentElement;
|
855
851
|
return r;
|
856
852
|
}
|
857
|
-
let
|
858
|
-
const
|
859
|
-
function
|
853
|
+
let Ar = 0;
|
854
|
+
const Ee = /* @__PURE__ */ new Map();
|
855
|
+
function Fr(t) {
|
860
856
|
let [e, r] = B();
|
861
|
-
return
|
857
|
+
return fe(() => {
|
862
858
|
if (!t) return;
|
863
|
-
let n =
|
859
|
+
let n = Ee.get(t);
|
864
860
|
if (n)
|
865
861
|
r(n.element.id);
|
866
862
|
else {
|
867
|
-
let i = `react-aria-description-${
|
863
|
+
let i = `react-aria-description-${Ar++}`;
|
868
864
|
r(i);
|
869
865
|
let o = document.createElement("div");
|
870
866
|
o.id = i, o.style.display = "none", o.textContent = t, document.body.appendChild(o), n = {
|
871
867
|
refCount: 0,
|
872
868
|
element: o
|
873
|
-
},
|
869
|
+
}, Ee.set(t, n);
|
874
870
|
}
|
875
871
|
return n.refCount++, () => {
|
876
|
-
n && --n.refCount === 0 && (n.element.remove(),
|
872
|
+
n && --n.refCount === 0 && (n.element.remove(), Ee.delete(t));
|
877
873
|
};
|
878
874
|
}, [
|
879
875
|
t
|
@@ -881,8 +877,8 @@ function Cr(t) {
|
|
881
877
|
"aria-describedby": t ? e : void 0
|
882
878
|
};
|
883
879
|
}
|
884
|
-
function
|
885
|
-
let i =
|
880
|
+
function Ze(t, e, r, n) {
|
881
|
+
let i = ie(r), o = r == null;
|
886
882
|
O(() => {
|
887
883
|
if (o || !t.current) return;
|
888
884
|
let s = t.current;
|
@@ -897,11 +893,11 @@ function Dr(t, e, r, n) {
|
|
897
893
|
i
|
898
894
|
]);
|
899
895
|
}
|
900
|
-
function
|
901
|
-
let r =
|
902
|
-
r <= s ? s = r - parseInt(v, 10) : r + i > h && (s += r + i - h), n <=
|
896
|
+
function _t(t, e) {
|
897
|
+
let r = Qe(t, e, "left"), n = Qe(t, e, "top"), i = e.offsetWidth, o = e.offsetHeight, s = t.scrollLeft, c = t.scrollTop, { borderTopWidth: f, borderLeftWidth: v } = getComputedStyle(t), y = t.scrollLeft + parseInt(v, 10), K = t.scrollTop + parseInt(f, 10), h = y + t.clientWidth, g = K + t.clientHeight;
|
898
|
+
r <= s ? s = r - parseInt(v, 10) : r + i > h && (s += r + i - h), n <= K ? c = n - parseInt(f, 10) : n + o > g && (c += n + o - g), t.scrollLeft = s, t.scrollTop = c;
|
903
899
|
}
|
904
|
-
function
|
900
|
+
function Qe(t, e, r) {
|
905
901
|
const n = r === "left" ? "offsetLeft" : "offsetTop";
|
906
902
|
let i = 0;
|
907
903
|
for (; e.offsetParent && (i += e[n], e.offsetParent !== t); ) {
|
@@ -913,20 +909,20 @@ function Ye(t, e, r) {
|
|
913
909
|
}
|
914
910
|
return i;
|
915
911
|
}
|
916
|
-
function
|
912
|
+
function et(t, e) {
|
917
913
|
if (document.contains(t)) {
|
918
914
|
let s = document.scrollingElement || document.documentElement;
|
919
915
|
if (window.getComputedStyle(s).overflow === "hidden") {
|
920
|
-
let
|
921
|
-
for (let v of
|
916
|
+
let f = Cr(t);
|
917
|
+
for (let v of f) _t(v, t);
|
922
918
|
} else {
|
923
919
|
var r;
|
924
|
-
let { left:
|
920
|
+
let { left: f, top: v } = t.getBoundingClientRect();
|
925
921
|
t == null || (r = t.scrollIntoView) === null || r === void 0 || r.call(t, {
|
926
922
|
block: "nearest"
|
927
923
|
});
|
928
|
-
let { left:
|
929
|
-
if (Math.abs(
|
924
|
+
let { left: y, top: K } = t.getBoundingClientRect();
|
925
|
+
if (Math.abs(f - y) > 1 || Math.abs(v - K) > 1) {
|
930
926
|
var n, i, o;
|
931
927
|
e == null || (i = e.containingElement) === null || i === void 0 || (n = i.scrollIntoView) === null || n === void 0 || n.call(i, {
|
932
928
|
block: "center",
|
@@ -938,31 +934,31 @@ function Je(t, e) {
|
|
938
934
|
}
|
939
935
|
}
|
940
936
|
}
|
941
|
-
function
|
942
|
-
return t.mozInputSource === 0 && t.isTrusted ? !0 :
|
937
|
+
function Me(t) {
|
938
|
+
return t.mozInputSource === 0 && t.isTrusted ? !0 : St() && t.pointerType ? t.type === "click" && t.buttons === 1 : t.detail === 0 && !t.pointerType;
|
943
939
|
}
|
944
|
-
function
|
945
|
-
return
|
940
|
+
function Or(t) {
|
941
|
+
return !St() && t.width === 0 && t.height === 0 || t.width === 1 && t.height === 1 && t.pressure === 0 && t.detail === 0 && t.pointerType === "mouse";
|
946
942
|
}
|
947
|
-
function
|
948
|
-
return
|
943
|
+
function Ie(t) {
|
944
|
+
return Tr() ? t.altKey : t.ctrlKey;
|
949
945
|
}
|
950
|
-
function
|
951
|
-
return
|
946
|
+
function oe(t) {
|
947
|
+
return Q() ? t.metaKey : t.ctrlKey;
|
952
948
|
}
|
953
|
-
const
|
954
|
-
function
|
955
|
-
let { keyboardDelegate: e, selectionManager: r, onTypeSelect: n } = t, i =
|
949
|
+
const zr = 1e3;
|
950
|
+
function Nr(t) {
|
951
|
+
let { keyboardDelegate: e, selectionManager: r, onTypeSelect: n } = t, i = k({
|
956
952
|
search: "",
|
957
953
|
timeout: null
|
958
954
|
}).current, o = (s) => {
|
959
|
-
let
|
960
|
-
if (!
|
961
|
-
|
962
|
-
let
|
963
|
-
|
955
|
+
let c = Br(s.key);
|
956
|
+
if (!c || s.ctrlKey || s.metaKey || !s.currentTarget.contains(s.target)) return;
|
957
|
+
c === " " && i.search.trim().length > 0 && (s.preventDefault(), "continuePropagation" in s || s.stopPropagation()), i.search += c;
|
958
|
+
let f = e.getKeyForSearch(i.search, r.focusedKey);
|
959
|
+
f == null && (f = e.getKeyForSearch(i.search)), f != null && (r.setFocusedKey(f), n && n(f)), clearTimeout(i.timeout), i.timeout = setTimeout(() => {
|
964
960
|
i.search = "";
|
965
|
-
},
|
961
|
+
}, zr);
|
966
962
|
};
|
967
963
|
return {
|
968
964
|
typeSelectProps: {
|
@@ -972,59 +968,59 @@ function Or(t) {
|
|
972
968
|
}
|
973
969
|
};
|
974
970
|
}
|
975
|
-
function
|
971
|
+
function Br(t) {
|
976
972
|
return t.length === 1 || !/^[A-Z]/i.test(t) ? t : "";
|
977
973
|
}
|
978
|
-
let
|
979
|
-
function
|
980
|
-
if (
|
981
|
-
if (
|
974
|
+
let se = "default", De = "", he = /* @__PURE__ */ new WeakMap();
|
975
|
+
function tt(t) {
|
976
|
+
if (Ne()) {
|
977
|
+
if (se === "default") {
|
982
978
|
const e = C(t);
|
983
|
-
|
979
|
+
De = e.documentElement.style.webkitUserSelect, e.documentElement.style.webkitUserSelect = "none";
|
984
980
|
}
|
985
|
-
|
986
|
-
} else (t instanceof HTMLElement || t instanceof SVGElement) && (
|
987
|
-
}
|
988
|
-
function
|
989
|
-
if (
|
990
|
-
if (
|
991
|
-
|
992
|
-
|
993
|
-
if (
|
981
|
+
se = "disabled";
|
982
|
+
} else (t instanceof HTMLElement || t instanceof SVGElement) && (he.set(t, t.style.userSelect), t.style.userSelect = "none");
|
983
|
+
}
|
984
|
+
function ve(t) {
|
985
|
+
if (Ne()) {
|
986
|
+
if (se !== "disabled") return;
|
987
|
+
se = "restoring", setTimeout(() => {
|
988
|
+
wt(() => {
|
989
|
+
if (se === "restoring") {
|
994
990
|
const e = C(t);
|
995
|
-
e.documentElement.style.webkitUserSelect === "none" && (e.documentElement.style.webkitUserSelect =
|
991
|
+
e.documentElement.style.webkitUserSelect === "none" && (e.documentElement.style.webkitUserSelect = De || ""), De = "", se = "default";
|
996
992
|
}
|
997
993
|
});
|
998
994
|
}, 300);
|
999
|
-
} else if ((t instanceof HTMLElement || t instanceof SVGElement) && t &&
|
1000
|
-
let e =
|
1001
|
-
t.style.userSelect === "none" && (t.style.userSelect = e), t.getAttribute("style") === "" && t.removeAttribute("style"),
|
995
|
+
} else if ((t instanceof HTMLElement || t instanceof SVGElement) && t && he.has(t)) {
|
996
|
+
let e = he.get(t);
|
997
|
+
t.style.userSelect === "none" && (t.style.userSelect = e), t.getAttribute("style") === "" && t.removeAttribute("style"), he.delete(t);
|
1002
998
|
}
|
1003
999
|
}
|
1004
|
-
const
|
1000
|
+
const Et = R.createContext({
|
1005
1001
|
register: () => {
|
1006
1002
|
}
|
1007
1003
|
});
|
1008
|
-
|
1009
|
-
function
|
1004
|
+
Et.displayName = "PressResponderContext";
|
1005
|
+
function Rr(t, e) {
|
1010
1006
|
return e.get ? e.get.call(t) : e.value;
|
1011
1007
|
}
|
1012
|
-
function
|
1008
|
+
function xt(t, e, r) {
|
1013
1009
|
if (!e.has(t)) throw new TypeError("attempted to " + r + " private field on non-instance");
|
1014
1010
|
return e.get(t);
|
1015
1011
|
}
|
1016
|
-
function
|
1017
|
-
var r =
|
1018
|
-
return
|
1012
|
+
function Ur(t, e) {
|
1013
|
+
var r = xt(t, e, "get");
|
1014
|
+
return Rr(t, r);
|
1019
1015
|
}
|
1020
|
-
function
|
1016
|
+
function Hr(t, e) {
|
1021
1017
|
if (e.has(t))
|
1022
1018
|
throw new TypeError("Cannot initialize the same private elements twice on an object");
|
1023
1019
|
}
|
1024
|
-
function
|
1025
|
-
|
1020
|
+
function Wr(t, e, r) {
|
1021
|
+
Hr(t, e), e.set(t, r);
|
1026
1022
|
}
|
1027
|
-
function
|
1023
|
+
function jr(t, e, r) {
|
1028
1024
|
if (e.set) e.set.call(t, r);
|
1029
1025
|
else {
|
1030
1026
|
if (!e.writable)
|
@@ -1032,35 +1028,40 @@ function Hr(t, e, r) {
|
|
1032
1028
|
e.value = r;
|
1033
1029
|
}
|
1034
1030
|
}
|
1035
|
-
function
|
1036
|
-
var n =
|
1037
|
-
return
|
1031
|
+
function rt(t, e, r) {
|
1032
|
+
var n = xt(t, e, "set");
|
1033
|
+
return jr(t, n, r), r;
|
1038
1034
|
}
|
1039
|
-
function
|
1040
|
-
let e =
|
1035
|
+
function Vr(t) {
|
1036
|
+
let e = ae(Et);
|
1041
1037
|
if (e) {
|
1042
1038
|
let { register: r, ...n } = e;
|
1043
|
-
t =
|
1039
|
+
t = Y(n, t), r();
|
1044
1040
|
}
|
1045
|
-
return
|
1041
|
+
return Ir(e, t.ref), t;
|
1046
1042
|
}
|
1047
|
-
var
|
1048
|
-
class
|
1043
|
+
var ye = /* @__PURE__ */ new WeakMap();
|
1044
|
+
class ge {
|
1049
1045
|
continuePropagation() {
|
1050
|
-
|
1046
|
+
rt(this, ye, !1);
|
1051
1047
|
}
|
1052
1048
|
get shouldStopPropagation() {
|
1053
|
-
return
|
1049
|
+
return Ur(this, ye);
|
1054
1050
|
}
|
1055
|
-
constructor(e, r, n) {
|
1056
|
-
|
1051
|
+
constructor(e, r, n, i) {
|
1052
|
+
Wr(this, ye, {
|
1057
1053
|
writable: !0,
|
1058
1054
|
value: void 0
|
1059
|
-
}),
|
1055
|
+
}), rt(this, ye, !0);
|
1056
|
+
var o;
|
1057
|
+
let s = (o = i == null ? void 0 : i.target) !== null && o !== void 0 ? o : n.currentTarget;
|
1058
|
+
const c = s == null ? void 0 : s.getBoundingClientRect();
|
1059
|
+
let f, v = 0, y, K = null;
|
1060
|
+
n.clientX != null && n.clientY != null && (y = n.clientX, K = n.clientY), c && (y != null && K != null ? (f = y - c.left, v = K - c.top) : (f = c.width / 2, v = c.height / 2)), this.type = e, this.pointerType = r, this.target = n.currentTarget, this.shiftKey = n.shiftKey, this.metaKey = n.metaKey, this.ctrlKey = n.ctrlKey, this.altKey = n.altKey, this.x = f, this.y = v;
|
1060
1061
|
}
|
1061
1062
|
}
|
1062
|
-
const
|
1063
|
-
function
|
1063
|
+
const nt = Symbol("linkClicked");
|
1064
|
+
function kt(t) {
|
1064
1065
|
let {
|
1065
1066
|
onPress: e,
|
1066
1067
|
onPressChange: r,
|
@@ -1068,14 +1069,14 @@ function _t(t) {
|
|
1068
1069
|
onPressEnd: i,
|
1069
1070
|
onPressUp: o,
|
1070
1071
|
isDisabled: s,
|
1071
|
-
isPressed:
|
1072
|
-
preventFocusOnPress:
|
1072
|
+
isPressed: c,
|
1073
|
+
preventFocusOnPress: f,
|
1073
1074
|
shouldCancelOnPointerExit: v,
|
1074
|
-
allowTextSelectionOnPress:
|
1075
|
+
allowTextSelectionOnPress: y,
|
1075
1076
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
1076
|
-
ref:
|
1077
|
+
ref: K,
|
1077
1078
|
...h
|
1078
|
-
} =
|
1079
|
+
} = Vr(t), [g, L] = B(!1), P = k({
|
1079
1080
|
isPressed: !1,
|
1080
1081
|
ignoreEmulatedMouseEvents: !1,
|
1081
1082
|
ignoreClickAfterPress: !1,
|
@@ -1085,164 +1086,164 @@ function _t(t) {
|
|
1085
1086
|
target: null,
|
1086
1087
|
isOverTarget: !1,
|
1087
1088
|
pointerType: null
|
1088
|
-
}), { addGlobalListener:
|
1089
|
-
let
|
1090
|
-
if (s ||
|
1089
|
+
}), { addGlobalListener: w, removeAllGlobalListeners: E } = Tt(), x = ie((l, $) => {
|
1090
|
+
let p = P.current;
|
1091
|
+
if (s || p.didFirePressStart) return !1;
|
1091
1092
|
let u = !0;
|
1092
|
-
if (
|
1093
|
-
let
|
1094
|
-
n(
|
1093
|
+
if (p.isTriggeringEvent = !0, n) {
|
1094
|
+
let S = new ge("pressstart", $, l);
|
1095
|
+
n(S), u = S.shouldStopPropagation;
|
1095
1096
|
}
|
1096
|
-
return r && r(!0),
|
1097
|
-
}), _ =
|
1098
|
-
let u =
|
1097
|
+
return r && r(!0), p.isTriggeringEvent = !1, p.didFirePressStart = !0, L(!0), u;
|
1098
|
+
}), _ = ie((l, $, p = !0) => {
|
1099
|
+
let u = P.current;
|
1099
1100
|
if (!u.didFirePressStart) return !1;
|
1100
1101
|
u.ignoreClickAfterPress = !0, u.didFirePressStart = !1, u.isTriggeringEvent = !0;
|
1101
|
-
let
|
1102
|
+
let S = !0;
|
1102
1103
|
if (i) {
|
1103
|
-
let a = new
|
1104
|
-
i(a),
|
1104
|
+
let a = new ge("pressend", $, l);
|
1105
|
+
i(a), S = a.shouldStopPropagation;
|
1105
1106
|
}
|
1106
|
-
if (r && r(!1),
|
1107
|
-
let a = new
|
1108
|
-
e(a),
|
1107
|
+
if (r && r(!1), L(!1), e && p && !s) {
|
1108
|
+
let a = new ge("press", $, l);
|
1109
|
+
e(a), S && (S = a.shouldStopPropagation);
|
1109
1110
|
}
|
1110
|
-
return u.isTriggeringEvent = !1,
|
1111
|
-
}),
|
1112
|
-
let
|
1111
|
+
return u.isTriggeringEvent = !1, S;
|
1112
|
+
}), I = ie((l, $) => {
|
1113
|
+
let p = P.current;
|
1113
1114
|
if (s) return !1;
|
1114
1115
|
if (o) {
|
1115
|
-
|
1116
|
-
let u = new
|
1117
|
-
return o(u),
|
1116
|
+
p.isTriggeringEvent = !0;
|
1117
|
+
let u = new ge("pressup", $, l);
|
1118
|
+
return o(u), p.isTriggeringEvent = !1, u.shouldStopPropagation;
|
1118
1119
|
}
|
1119
1120
|
return !0;
|
1120
|
-
}),
|
1121
|
-
let $ =
|
1122
|
-
$.isPressed && $.target && ($.isOverTarget && $.pointerType != null && _(W($.target, l), $.pointerType, !1), $.isPressed = !1, $.isOverTarget = !1, $.activePointerId = null, $.pointerType = null,
|
1123
|
-
}), D =
|
1124
|
-
v &&
|
1121
|
+
}), M = ie((l) => {
|
1122
|
+
let $ = P.current;
|
1123
|
+
$.isPressed && $.target && ($.isOverTarget && $.pointerType != null && _(W($.target, l), $.pointerType, !1), $.isPressed = !1, $.isOverTarget = !1, $.activePointerId = null, $.pointerType = null, E(), y || ve($.target));
|
1124
|
+
}), D = ie((l) => {
|
1125
|
+
v && M(l);
|
1125
1126
|
}), U = V(() => {
|
1126
|
-
let l =
|
1127
|
+
let l = P.current, $ = {
|
1127
1128
|
onKeyDown(u) {
|
1128
|
-
if (
|
1129
|
-
var
|
1130
|
-
|
1129
|
+
if (xe(u.nativeEvent, u.currentTarget) && u.currentTarget.contains(u.target)) {
|
1130
|
+
var S;
|
1131
|
+
lt(u.target, u.key) && u.preventDefault();
|
1131
1132
|
let a = !0;
|
1132
1133
|
if (!l.isPressed && !u.repeat) {
|
1133
|
-
l.target = u.currentTarget, l.isPressed = !0, a =
|
1134
|
-
let
|
1135
|
-
|
1134
|
+
l.target = u.currentTarget, l.isPressed = !0, a = x(u, "keyboard");
|
1135
|
+
let d = u.currentTarget, T = (A) => {
|
1136
|
+
xe(A, d) && !A.repeat && d.contains(A.target) && l.target && I(W(l.target, A), "keyboard");
|
1136
1137
|
};
|
1137
|
-
|
1138
|
+
w(C(u.currentTarget), "keyup", $t(T, p), !0);
|
1138
1139
|
}
|
1139
|
-
a && u.stopPropagation(), u.metaKey &&
|
1140
|
+
a && u.stopPropagation(), u.metaKey && Q() && ((S = l.metaKeyEvents) === null || S === void 0 || S.set(u.key, u.nativeEvent));
|
1140
1141
|
} else u.key === "Meta" && (l.metaKeyEvents = /* @__PURE__ */ new Map());
|
1141
1142
|
},
|
1142
1143
|
onClick(u) {
|
1143
|
-
if (!(u && !u.currentTarget.contains(u.target)) && u && u.button === 0 && !l.isTriggeringEvent && !
|
1144
|
-
let
|
1145
|
-
if (s && u.preventDefault(), !l.ignoreClickAfterPress && !l.ignoreEmulatedMouseEvents && !l.isPressed && (l.pointerType === "virtual" ||
|
1146
|
-
!s && !
|
1147
|
-
let a =
|
1148
|
-
|
1144
|
+
if (!(u && !u.currentTarget.contains(u.target)) && u && u.button === 0 && !l.isTriggeringEvent && !ee.isOpening) {
|
1145
|
+
let S = !0;
|
1146
|
+
if (s && u.preventDefault(), !l.ignoreClickAfterPress && !l.ignoreEmulatedMouseEvents && !l.isPressed && (l.pointerType === "virtual" || Me(u.nativeEvent))) {
|
1147
|
+
!s && !f && j(u.currentTarget);
|
1148
|
+
let a = x(u, "virtual"), d = I(u, "virtual"), T = _(u, "virtual");
|
1149
|
+
S = a && d && T;
|
1149
1150
|
}
|
1150
|
-
l.ignoreEmulatedMouseEvents = !1, l.ignoreClickAfterPress = !1,
|
1151
|
+
l.ignoreEmulatedMouseEvents = !1, l.ignoreClickAfterPress = !1, S && u.stopPropagation();
|
1151
1152
|
}
|
1152
1153
|
}
|
1153
|
-
},
|
1154
|
-
var
|
1155
|
-
if (l.isPressed && l.target &&
|
1154
|
+
}, p = (u) => {
|
1155
|
+
var S;
|
1156
|
+
if (l.isPressed && l.target && xe(u, l.target)) {
|
1156
1157
|
var a;
|
1157
|
-
|
1158
|
-
let
|
1159
|
-
_(W(l.target, u), "keyboard", l.target.contains(
|
1160
|
-
} else if (u.key === "Meta" && (!((
|
1161
|
-
var
|
1162
|
-
let
|
1158
|
+
lt(u.target, u.key) && u.preventDefault();
|
1159
|
+
let T = u.target;
|
1160
|
+
_(W(l.target, u), "keyboard", l.target.contains(T)), E(), u.key !== "Enter" && Re(l.target) && l.target.contains(T) && !u[nt] && (u[nt] = !0, ee(l.target, u, !1)), l.isPressed = !1, (a = l.metaKeyEvents) === null || a === void 0 || a.delete(u.key);
|
1161
|
+
} else if (u.key === "Meta" && (!((S = l.metaKeyEvents) === null || S === void 0) && S.size)) {
|
1162
|
+
var d;
|
1163
|
+
let T = l.metaKeyEvents;
|
1163
1164
|
l.metaKeyEvents = void 0;
|
1164
|
-
for (let A of
|
1165
|
+
for (let A of T.values()) (d = l.target) === null || d === void 0 || d.dispatchEvent(new KeyboardEvent("keyup", A));
|
1165
1166
|
}
|
1166
1167
|
};
|
1167
1168
|
if (typeof PointerEvent < "u") {
|
1168
|
-
$.onPointerDown = (
|
1169
|
-
if (
|
1170
|
-
if (
|
1169
|
+
$.onPointerDown = (d) => {
|
1170
|
+
if (d.button !== 0 || !d.currentTarget.contains(d.target)) return;
|
1171
|
+
if (Or(d.nativeEvent)) {
|
1171
1172
|
l.pointerType = "virtual";
|
1172
1173
|
return;
|
1173
1174
|
}
|
1174
|
-
|
1175
|
-
let
|
1176
|
-
l.isPressed || (l.isPressed = !0, l.isOverTarget = !0, l.activePointerId =
|
1177
|
-
}, $.onMouseDown = (
|
1178
|
-
|
1179
|
-
}, $.onPointerUp = (
|
1180
|
-
!
|
1175
|
+
ke(d.currentTarget) && d.preventDefault(), l.pointerType = d.pointerType;
|
1176
|
+
let T = !0;
|
1177
|
+
l.isPressed || (l.isPressed = !0, l.isOverTarget = !0, l.activePointerId = d.pointerId, l.target = d.currentTarget, !s && !f && j(d.currentTarget), y || tt(l.target), T = x(d, l.pointerType), w(C(d.currentTarget), "pointermove", u, !1), w(C(d.currentTarget), "pointerup", S, !1), w(C(d.currentTarget), "pointercancel", a, !1)), T && d.stopPropagation();
|
1178
|
+
}, $.onMouseDown = (d) => {
|
1179
|
+
d.currentTarget.contains(d.target) && d.button === 0 && (ke(d.currentTarget) && d.preventDefault(), d.stopPropagation());
|
1180
|
+
}, $.onPointerUp = (d) => {
|
1181
|
+
!d.currentTarget.contains(d.target) || l.pointerType === "virtual" || d.button === 0 && ne(d, d.currentTarget) && I(d, l.pointerType || d.pointerType);
|
1181
1182
|
};
|
1182
|
-
let u = (
|
1183
|
-
|
1184
|
-
},
|
1185
|
-
|
1186
|
-
}, a = (
|
1187
|
-
|
1183
|
+
let u = (d) => {
|
1184
|
+
d.pointerId === l.activePointerId && (l.target && ne(d, l.target) ? !l.isOverTarget && l.pointerType != null && (l.isOverTarget = !0, x(W(l.target, d), l.pointerType)) : l.target && l.isOverTarget && l.pointerType != null && (l.isOverTarget = !1, _(W(l.target, d), l.pointerType, !1), D(d)));
|
1185
|
+
}, S = (d) => {
|
1186
|
+
d.pointerId === l.activePointerId && l.isPressed && d.button === 0 && l.target && (ne(d, l.target) && l.pointerType != null ? _(W(l.target, d), l.pointerType) : l.isOverTarget && l.pointerType != null && _(W(l.target, d), l.pointerType, !1), l.isPressed = !1, l.isOverTarget = !1, l.activePointerId = null, l.pointerType = null, E(), y || ve(l.target));
|
1187
|
+
}, a = (d) => {
|
1188
|
+
M(d);
|
1188
1189
|
};
|
1189
|
-
$.onDragStart = (
|
1190
|
-
|
1190
|
+
$.onDragStart = (d) => {
|
1191
|
+
d.currentTarget.contains(d.target) && M(d);
|
1191
1192
|
};
|
1192
1193
|
} else {
|
1193
1194
|
$.onMouseDown = (a) => {
|
1194
1195
|
if (a.button !== 0 || !a.currentTarget.contains(a.target)) return;
|
1195
|
-
if (
|
1196
|
+
if (ke(a.currentTarget) && a.preventDefault(), l.ignoreEmulatedMouseEvents) {
|
1196
1197
|
a.stopPropagation();
|
1197
1198
|
return;
|
1198
1199
|
}
|
1199
|
-
l.isPressed = !0, l.isOverTarget = !0, l.target = a.currentTarget, l.pointerType =
|
1200
|
+
l.isPressed = !0, l.isOverTarget = !0, l.target = a.currentTarget, l.pointerType = Me(a.nativeEvent) ? "virtual" : "mouse", !s && !f && j(a.currentTarget), x(a, l.pointerType) && a.stopPropagation(), w(C(a.currentTarget), "mouseup", u, !1);
|
1200
1201
|
}, $.onMouseEnter = (a) => {
|
1201
1202
|
if (!a.currentTarget.contains(a.target)) return;
|
1202
|
-
let
|
1203
|
-
l.isPressed && !l.ignoreEmulatedMouseEvents && l.pointerType != null && (l.isOverTarget = !0,
|
1203
|
+
let d = !0;
|
1204
|
+
l.isPressed && !l.ignoreEmulatedMouseEvents && l.pointerType != null && (l.isOverTarget = !0, d = x(a, l.pointerType)), d && a.stopPropagation();
|
1204
1205
|
}, $.onMouseLeave = (a) => {
|
1205
1206
|
if (!a.currentTarget.contains(a.target)) return;
|
1206
|
-
let
|
1207
|
-
l.isPressed && !l.ignoreEmulatedMouseEvents && l.pointerType != null && (l.isOverTarget = !1,
|
1207
|
+
let d = !0;
|
1208
|
+
l.isPressed && !l.ignoreEmulatedMouseEvents && l.pointerType != null && (l.isOverTarget = !1, d = _(a, l.pointerType, !1), D(a)), d && a.stopPropagation();
|
1208
1209
|
}, $.onMouseUp = (a) => {
|
1209
|
-
a.currentTarget.contains(a.target) && !l.ignoreEmulatedMouseEvents && a.button === 0 &&
|
1210
|
+
a.currentTarget.contains(a.target) && !l.ignoreEmulatedMouseEvents && a.button === 0 && I(a, l.pointerType || "mouse");
|
1210
1211
|
};
|
1211
1212
|
let u = (a) => {
|
1212
1213
|
if (a.button === 0) {
|
1213
|
-
if (l.isPressed = !1,
|
1214
|
+
if (l.isPressed = !1, E(), l.ignoreEmulatedMouseEvents) {
|
1214
1215
|
l.ignoreEmulatedMouseEvents = !1;
|
1215
1216
|
return;
|
1216
1217
|
}
|
1217
|
-
l.target &&
|
1218
|
+
l.target && ne(a, l.target) && l.pointerType != null ? _(W(l.target, a), l.pointerType) : l.target && l.isOverTarget && l.pointerType != null && _(W(l.target, a), l.pointerType, !1), l.isOverTarget = !1;
|
1218
1219
|
}
|
1219
1220
|
};
|
1220
1221
|
$.onTouchStart = (a) => {
|
1221
1222
|
if (!a.currentTarget.contains(a.target)) return;
|
1222
|
-
let
|
1223
|
-
if (!
|
1224
|
-
l.activePointerId =
|
1223
|
+
let d = Gr(a.nativeEvent);
|
1224
|
+
if (!d) return;
|
1225
|
+
l.activePointerId = d.identifier, l.ignoreEmulatedMouseEvents = !0, l.isOverTarget = !0, l.isPressed = !0, l.target = a.currentTarget, l.pointerType = "touch", !s && !f && j(a.currentTarget), y || tt(l.target), x(X(l.target, a), l.pointerType) && a.stopPropagation(), w(Z(a.currentTarget), "scroll", S, !0);
|
1225
1226
|
}, $.onTouchMove = (a) => {
|
1226
1227
|
if (!a.currentTarget.contains(a.target)) return;
|
1227
1228
|
if (!l.isPressed) {
|
1228
1229
|
a.stopPropagation();
|
1229
1230
|
return;
|
1230
1231
|
}
|
1231
|
-
let
|
1232
|
-
|
1232
|
+
let d = it(a.nativeEvent, l.activePointerId), T = !0;
|
1233
|
+
d && ne(d, a.currentTarget) ? !l.isOverTarget && l.pointerType != null && (l.isOverTarget = !0, T = x(X(l.target, a), l.pointerType)) : l.isOverTarget && l.pointerType != null && (l.isOverTarget = !1, T = _(X(l.target, a), l.pointerType, !1), D(X(l.target, a))), T && a.stopPropagation();
|
1233
1234
|
}, $.onTouchEnd = (a) => {
|
1234
1235
|
if (!a.currentTarget.contains(a.target)) return;
|
1235
1236
|
if (!l.isPressed) {
|
1236
1237
|
a.stopPropagation();
|
1237
1238
|
return;
|
1238
1239
|
}
|
1239
|
-
let
|
1240
|
-
|
1240
|
+
let d = it(a.nativeEvent, l.activePointerId), T = !0;
|
1241
|
+
d && ne(d, a.currentTarget) && l.pointerType != null ? (I(X(l.target, a), l.pointerType), T = _(X(l.target, a), l.pointerType)) : l.isOverTarget && l.pointerType != null && (T = _(X(l.target, a), l.pointerType, !1)), T && a.stopPropagation(), l.isPressed = !1, l.activePointerId = null, l.isOverTarget = !1, l.ignoreEmulatedMouseEvents = !0, l.target && !y && ve(l.target), E();
|
1241
1242
|
}, $.onTouchCancel = (a) => {
|
1242
|
-
a.currentTarget.contains(a.target) && (a.stopPropagation(), l.isPressed &&
|
1243
|
+
a.currentTarget.contains(a.target) && (a.stopPropagation(), l.isPressed && M(X(l.target, a)));
|
1243
1244
|
};
|
1244
|
-
let
|
1245
|
-
l.isPressed && a.target.contains(l.target) &&
|
1245
|
+
let S = (a) => {
|
1246
|
+
l.isPressed && a.target.contains(l.target) && M({
|
1246
1247
|
currentTarget: l.target,
|
1247
1248
|
shiftKey: !1,
|
1248
1249
|
ctrlKey: !1,
|
@@ -1251,45 +1252,45 @@ function _t(t) {
|
|
1251
1252
|
});
|
1252
1253
|
};
|
1253
1254
|
$.onDragStart = (a) => {
|
1254
|
-
a.currentTarget.contains(a.target) &&
|
1255
|
+
a.currentTarget.contains(a.target) && M(a);
|
1255
1256
|
};
|
1256
1257
|
}
|
1257
1258
|
return $;
|
1258
1259
|
}, [
|
1259
|
-
|
1260
|
+
w,
|
1260
1261
|
s,
|
1261
|
-
|
1262
|
-
|
1263
|
-
|
1264
|
-
|
1262
|
+
f,
|
1263
|
+
E,
|
1264
|
+
y,
|
1265
|
+
M,
|
1265
1266
|
D,
|
1266
1267
|
_,
|
1267
|
-
|
1268
|
-
|
1268
|
+
x,
|
1269
|
+
I
|
1269
1270
|
]);
|
1270
1271
|
return O(() => () => {
|
1271
1272
|
var l;
|
1272
|
-
|
1273
|
+
y || ve((l = P.current.target) !== null && l !== void 0 ? l : void 0);
|
1273
1274
|
}, [
|
1274
|
-
|
1275
|
+
y
|
1275
1276
|
]), {
|
1276
|
-
isPressed:
|
1277
|
-
pressProps:
|
1277
|
+
isPressed: c || g,
|
1278
|
+
pressProps: Y(h, U)
|
1278
1279
|
};
|
1279
1280
|
}
|
1280
|
-
function
|
1281
|
+
function Re(t) {
|
1281
1282
|
return t.tagName === "A" && t.hasAttribute("href");
|
1282
1283
|
}
|
1283
|
-
function
|
1284
|
+
function xe(t, e) {
|
1284
1285
|
const { key: r, code: n } = t, i = e, o = i.getAttribute("role");
|
1285
|
-
return (r === "Enter" || r === " " || r === "Spacebar" || n === "Space") && !(i instanceof
|
1286
|
-
!((o === "link" || !o &&
|
1286
|
+
return (r === "Enter" || r === " " || r === "Spacebar" || n === "Space") && !(i instanceof Z(i).HTMLInputElement && !Lt(i, r) || i instanceof Z(i).HTMLTextAreaElement || i.isContentEditable) && // Links should only trigger with Enter key
|
1287
|
+
!((o === "link" || !o && Re(i)) && r !== "Enter");
|
1287
1288
|
}
|
1288
|
-
function
|
1289
|
+
function Gr(t) {
|
1289
1290
|
const { targetTouches: e } = t;
|
1290
1291
|
return e.length > 0 ? e[0] : null;
|
1291
1292
|
}
|
1292
|
-
function
|
1293
|
+
function it(t, e) {
|
1293
1294
|
const r = t.changedTouches;
|
1294
1295
|
for (let n = 0; n < r.length; n++) {
|
1295
1296
|
const i = r[n];
|
@@ -1297,16 +1298,31 @@ function tt(t, e) {
|
|
1297
1298
|
}
|
1298
1299
|
return null;
|
1299
1300
|
}
|
1301
|
+
function X(t, e) {
|
1302
|
+
let r = 0, n = 0;
|
1303
|
+
return e.targetTouches && e.targetTouches.length === 1 && (r = e.targetTouches[0].clientX, n = e.targetTouches[0].clientY), {
|
1304
|
+
currentTarget: t,
|
1305
|
+
shiftKey: e.shiftKey,
|
1306
|
+
ctrlKey: e.ctrlKey,
|
1307
|
+
metaKey: e.metaKey,
|
1308
|
+
altKey: e.altKey,
|
1309
|
+
clientX: r,
|
1310
|
+
clientY: n
|
1311
|
+
};
|
1312
|
+
}
|
1300
1313
|
function W(t, e) {
|
1314
|
+
let r = e.clientX, n = e.clientY;
|
1301
1315
|
return {
|
1302
1316
|
currentTarget: t,
|
1303
1317
|
shiftKey: e.shiftKey,
|
1304
1318
|
ctrlKey: e.ctrlKey,
|
1305
1319
|
metaKey: e.metaKey,
|
1306
|
-
altKey: e.altKey
|
1320
|
+
altKey: e.altKey,
|
1321
|
+
clientX: r,
|
1322
|
+
clientY: n
|
1307
1323
|
};
|
1308
1324
|
}
|
1309
|
-
function
|
1325
|
+
function Xr(t) {
|
1310
1326
|
let e = 0, r = 0;
|
1311
1327
|
return t.width !== void 0 ? e = t.width / 2 : t.radiusX !== void 0 && (e = t.radiusX), t.height !== void 0 ? r = t.height / 2 : t.radiusY !== void 0 && (r = t.radiusY), {
|
1312
1328
|
top: t.clientY - r,
|
@@ -1315,20 +1331,20 @@ function Vr(t) {
|
|
1315
1331
|
left: t.clientX - e
|
1316
1332
|
};
|
1317
1333
|
}
|
1318
|
-
function
|
1334
|
+
function Yr(t, e) {
|
1319
1335
|
return !(t.left > e.right || e.left > t.right || t.top > e.bottom || e.top > t.bottom);
|
1320
1336
|
}
|
1321
|
-
function
|
1322
|
-
let r = e.getBoundingClientRect(), n =
|
1323
|
-
return
|
1337
|
+
function ne(t, e) {
|
1338
|
+
let r = e.getBoundingClientRect(), n = Xr(t);
|
1339
|
+
return Yr(r, n);
|
1324
1340
|
}
|
1325
|
-
function
|
1341
|
+
function ke(t) {
|
1326
1342
|
return !(t instanceof HTMLElement) || !t.hasAttribute("draggable");
|
1327
1343
|
}
|
1328
|
-
function
|
1329
|
-
return t instanceof HTMLInputElement ? !
|
1344
|
+
function lt(t, e) {
|
1345
|
+
return t instanceof HTMLInputElement ? !Lt(t, e) : t instanceof HTMLButtonElement ? t.type !== "submit" && t.type !== "reset" : !Re(t);
|
1330
1346
|
}
|
1331
|
-
const
|
1347
|
+
const qr = /* @__PURE__ */ new Set([
|
1332
1348
|
"checkbox",
|
1333
1349
|
"radio",
|
1334
1350
|
"range",
|
@@ -1339,86 +1355,86 @@ const Xr = /* @__PURE__ */ new Set([
|
|
1339
1355
|
"submit",
|
1340
1356
|
"reset"
|
1341
1357
|
]);
|
1342
|
-
function
|
1343
|
-
return t.type === "checkbox" || t.type === "radio" ? e === " " :
|
1358
|
+
function Lt(t, e) {
|
1359
|
+
return t.type === "checkbox" || t.type === "radio" ? e === " " : qr.has(t.type);
|
1344
1360
|
}
|
1345
|
-
let
|
1346
|
-
function
|
1347
|
-
for (let r of
|
1361
|
+
let pe = null, Jr = /* @__PURE__ */ new Set(), de = /* @__PURE__ */ new Map(), te = !1, Ce = !1;
|
1362
|
+
function Ue(t, e) {
|
1363
|
+
for (let r of Jr) r(t, e);
|
1348
1364
|
}
|
1349
|
-
function
|
1350
|
-
return !(t.metaKey || !
|
1365
|
+
function Zr(t) {
|
1366
|
+
return !(t.metaKey || !Q() && t.altKey || t.ctrlKey || t.key === "Control" || t.key === "Shift" || t.key === "Meta");
|
1351
1367
|
}
|
1352
|
-
function
|
1353
|
-
|
1368
|
+
function Se(t) {
|
1369
|
+
te = !0, Zr(t) && (pe = "keyboard", Ue("keyboard", t));
|
1354
1370
|
}
|
1355
1371
|
function F(t) {
|
1356
|
-
|
1372
|
+
pe = "pointer", (t.type === "mousedown" || t.type === "pointerdown") && (te = !0, Ue("pointer", t));
|
1357
1373
|
}
|
1358
|
-
function
|
1359
|
-
|
1374
|
+
function Mt(t) {
|
1375
|
+
Me(t) && (te = !0, pe = "virtual");
|
1360
1376
|
}
|
1361
|
-
function
|
1362
|
-
t.target === window || t.target === document || (!
|
1377
|
+
function It(t) {
|
1378
|
+
t.target === window || t.target === document || (!te && !Ce && (pe = "virtual", Ue("virtual", t)), te = !1, Ce = !1);
|
1363
1379
|
}
|
1364
|
-
function
|
1365
|
-
|
1380
|
+
function Dt() {
|
1381
|
+
te = !1, Ce = !0;
|
1366
1382
|
}
|
1367
|
-
function
|
1368
|
-
if (typeof window > "u" ||
|
1369
|
-
const e =
|
1383
|
+
function ot(t) {
|
1384
|
+
if (typeof window > "u" || de.get(Z(t))) return;
|
1385
|
+
const e = Z(t), r = C(t);
|
1370
1386
|
let n = e.HTMLElement.prototype.focus;
|
1371
1387
|
e.HTMLElement.prototype.focus = function() {
|
1372
|
-
|
1373
|
-
}, r.addEventListener("keydown",
|
1374
|
-
|
1388
|
+
te = !0, n.apply(this, arguments);
|
1389
|
+
}, r.addEventListener("keydown", Se, !0), r.addEventListener("keyup", Se, !0), r.addEventListener("click", Mt, !0), e.addEventListener("focus", It, !0), e.addEventListener("blur", Dt, !1), typeof PointerEvent < "u" ? (r.addEventListener("pointerdown", F, !0), r.addEventListener("pointermove", F, !0), r.addEventListener("pointerup", F, !0)) : (r.addEventListener("mousedown", F, !0), r.addEventListener("mousemove", F, !0), r.addEventListener("mouseup", F, !0)), e.addEventListener("beforeunload", () => {
|
1390
|
+
Ct(t);
|
1375
1391
|
}, {
|
1376
1392
|
once: !0
|
1377
|
-
}),
|
1393
|
+
}), de.set(e, {
|
1378
1394
|
focus: n
|
1379
1395
|
});
|
1380
1396
|
}
|
1381
|
-
const
|
1382
|
-
const r =
|
1383
|
-
e && n.removeEventListener("DOMContentLoaded", e),
|
1397
|
+
const Ct = (t, e) => {
|
1398
|
+
const r = Z(t), n = C(t);
|
1399
|
+
e && n.removeEventListener("DOMContentLoaded", e), de.has(r) && (r.HTMLElement.prototype.focus = de.get(r).focus, n.removeEventListener("keydown", Se, !0), n.removeEventListener("keyup", Se, !0), n.removeEventListener("click", Mt, !0), r.removeEventListener("focus", It, !0), r.removeEventListener("blur", Dt, !1), typeof PointerEvent < "u" ? (n.removeEventListener("pointerdown", F, !0), n.removeEventListener("pointermove", F, !0), n.removeEventListener("pointerup", F, !0)) : (n.removeEventListener("mousedown", F, !0), n.removeEventListener("mousemove", F, !0), n.removeEventListener("mouseup", F, !0)), de.delete(r));
|
1384
1400
|
};
|
1385
|
-
function
|
1401
|
+
function Qr(t) {
|
1386
1402
|
const e = C(t);
|
1387
1403
|
let r;
|
1388
|
-
return e.readyState !== "loading" ?
|
1389
|
-
|
1390
|
-
}, e.addEventListener("DOMContentLoaded", r)), () =>
|
1391
|
-
}
|
1392
|
-
typeof document < "u" &&
|
1393
|
-
function
|
1394
|
-
return
|
1395
|
-
}
|
1396
|
-
const
|
1397
|
-
function
|
1398
|
-
let { isDisabled: e, onLongPressStart: r, onLongPressEnd: n, onLongPress: i, threshold: o =
|
1399
|
-
const
|
1400
|
-
let { addGlobalListener:
|
1404
|
+
return e.readyState !== "loading" ? ot(t) : (r = () => {
|
1405
|
+
ot(t);
|
1406
|
+
}, e.addEventListener("DOMContentLoaded", r)), () => Ct(t, r);
|
1407
|
+
}
|
1408
|
+
typeof document < "u" && Qr();
|
1409
|
+
function Ae() {
|
1410
|
+
return pe;
|
1411
|
+
}
|
1412
|
+
const en = 500;
|
1413
|
+
function tn(t) {
|
1414
|
+
let { isDisabled: e, onLongPressStart: r, onLongPressEnd: n, onLongPress: i, threshold: o = en, accessibilityDescription: s } = t;
|
1415
|
+
const c = k(void 0);
|
1416
|
+
let { addGlobalListener: f, removeGlobalListener: v } = Tt(), { pressProps: y } = kt({
|
1401
1417
|
isDisabled: e,
|
1402
1418
|
onPressStart(h) {
|
1403
1419
|
if (h.continuePropagation(), (h.pointerType === "mouse" || h.pointerType === "touch") && (r && r({
|
1404
1420
|
...h,
|
1405
1421
|
type: "longpressstart"
|
1406
|
-
}),
|
1422
|
+
}), c.current = setTimeout(() => {
|
1407
1423
|
h.target.dispatchEvent(new PointerEvent("pointercancel", {
|
1408
1424
|
bubbles: !0
|
1409
1425
|
})), i && i({
|
1410
1426
|
...h,
|
1411
1427
|
type: "longpress"
|
1412
|
-
}),
|
1428
|
+
}), c.current = void 0;
|
1413
1429
|
}, o), h.pointerType === "touch")) {
|
1414
|
-
let
|
1415
|
-
|
1430
|
+
let g = (L) => {
|
1431
|
+
L.preventDefault();
|
1416
1432
|
};
|
1417
|
-
|
1433
|
+
f(h.target, "contextmenu", g, {
|
1418
1434
|
once: !0
|
1419
|
-
}),
|
1435
|
+
}), f(window, "pointerup", () => {
|
1420
1436
|
setTimeout(() => {
|
1421
|
-
v(h.target, "contextmenu",
|
1437
|
+
v(h.target, "contextmenu", g);
|
1422
1438
|
}, 30);
|
1423
1439
|
}, {
|
1424
1440
|
once: !0
|
@@ -1426,44 +1442,44 @@ function Qr(t) {
|
|
1426
1442
|
}
|
1427
1443
|
},
|
1428
1444
|
onPressEnd(h) {
|
1429
|
-
|
1445
|
+
c.current && clearTimeout(c.current), n && (h.pointerType === "mouse" || h.pointerType === "touch") && n({
|
1430
1446
|
...h,
|
1431
1447
|
type: "longpressend"
|
1432
1448
|
});
|
1433
1449
|
}
|
1434
|
-
}),
|
1450
|
+
}), K = Fr(i && !e ? s : void 0);
|
1435
1451
|
return {
|
1436
|
-
longPressProps:
|
1452
|
+
longPressProps: Y(y, K)
|
1437
1453
|
};
|
1438
1454
|
}
|
1439
|
-
function
|
1455
|
+
function Fe(t) {
|
1440
1456
|
const e = C(t);
|
1441
|
-
if (
|
1457
|
+
if (Ae() === "virtual") {
|
1442
1458
|
let r = e.activeElement;
|
1443
|
-
|
1459
|
+
wt(() => {
|
1444
1460
|
e.activeElement === r && t.isConnected && j(t);
|
1445
1461
|
});
|
1446
1462
|
} else j(t);
|
1447
1463
|
}
|
1448
|
-
function
|
1449
|
-
const e =
|
1464
|
+
function rn(t) {
|
1465
|
+
const e = Z(t);
|
1450
1466
|
if (!(t instanceof e.HTMLElement) && !(t instanceof e.SVGElement)) return !1;
|
1451
1467
|
let { display: r, visibility: n } = t.style, i = r !== "none" && n !== "hidden" && n !== "collapse";
|
1452
1468
|
if (i) {
|
1453
1469
|
const { getComputedStyle: o } = t.ownerDocument.defaultView;
|
1454
|
-
let { display: s, visibility:
|
1455
|
-
i = s !== "none" &&
|
1470
|
+
let { display: s, visibility: c } = o(t);
|
1471
|
+
i = s !== "none" && c !== "hidden" && c !== "collapse";
|
1456
1472
|
}
|
1457
1473
|
return i;
|
1458
1474
|
}
|
1459
|
-
function
|
1475
|
+
function nn(t, e) {
|
1460
1476
|
return !t.hasAttribute("hidden") && // Ignore HiddenSelect when tree walking.
|
1461
1477
|
!t.hasAttribute("data-react-aria-prevent-focus") && (t.nodeName === "DETAILS" && e && e.nodeName !== "SUMMARY" ? t.hasAttribute("open") : !0);
|
1462
1478
|
}
|
1463
|
-
function
|
1464
|
-
return t.nodeName !== "#comment" &&
|
1479
|
+
function At(t, e) {
|
1480
|
+
return t.nodeName !== "#comment" && rn(t) && nn(t, e) && (!t.parentElement || At(t.parentElement, t));
|
1465
1481
|
}
|
1466
|
-
const
|
1482
|
+
const He = [
|
1467
1483
|
"input:not([disabled]):not([type=hidden])",
|
1468
1484
|
"select:not([disabled])",
|
1469
1485
|
"textarea:not([disabled])",
|
@@ -1477,22 +1493,22 @@ const Re = [
|
|
1477
1493
|
"audio[controls]",
|
1478
1494
|
"video[controls]",
|
1479
1495
|
"[contenteditable]"
|
1480
|
-
],
|
1481
|
-
|
1482
|
-
const
|
1483
|
-
function
|
1496
|
+
], ln = He.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
|
1497
|
+
He.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
|
1498
|
+
const on = He.join(':not([hidden]):not([tabindex="-1"]),');
|
1499
|
+
function Ft(t, e) {
|
1484
1500
|
return !t || !e ? !1 : e.some((r) => r.contains(t));
|
1485
1501
|
}
|
1486
|
-
function
|
1487
|
-
let n = e != null && e.tabbable ?
|
1502
|
+
function Ot(t, e, r) {
|
1503
|
+
let n = e != null && e.tabbable ? on : ln, i = C(t).createTreeWalker(t, NodeFilter.SHOW_ELEMENT, {
|
1488
1504
|
acceptNode(o) {
|
1489
1505
|
var s;
|
1490
|
-
return !(e == null || (s = e.from) === null || s === void 0) && s.contains(o) ? NodeFilter.FILTER_REJECT : o.matches(n) &&
|
1506
|
+
return !(e == null || (s = e.from) === null || s === void 0) && s.contains(o) ? NodeFilter.FILTER_REJECT : o.matches(n) && At(o) && (!r || Ft(o, r)) && (!(e != null && e.accept) || e.accept(o)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
1491
1507
|
}
|
1492
1508
|
});
|
1493
1509
|
return e != null && e.from && (i.currentNode = e.from), i;
|
1494
1510
|
}
|
1495
|
-
class
|
1511
|
+
class We {
|
1496
1512
|
get size() {
|
1497
1513
|
return this.fastMap.size;
|
1498
1514
|
}
|
@@ -1502,7 +1518,7 @@ class Ue {
|
|
1502
1518
|
addTreeNode(e, r, n) {
|
1503
1519
|
let i = this.fastMap.get(r ?? null);
|
1504
1520
|
if (!i) return;
|
1505
|
-
let o = new
|
1521
|
+
let o = new st({
|
1506
1522
|
scopeRef: e
|
1507
1523
|
});
|
1508
1524
|
i.addChild(o), o.parent = i, this.fastMap.set(e, o), n && (o.nodeToRestore = n);
|
@@ -1515,7 +1531,7 @@ class Ue {
|
|
1515
1531
|
let r = this.fastMap.get(e);
|
1516
1532
|
if (!r) return;
|
1517
1533
|
let n = r.parent;
|
1518
|
-
for (let o of this.traverse()) o !== r && r.nodeToRestore && o.nodeToRestore && r.scopeRef && r.scopeRef.current &&
|
1534
|
+
for (let o of this.traverse()) o !== r && r.nodeToRestore && o.nodeToRestore && r.scopeRef && r.scopeRef.current && Ft(o.nodeToRestore, r.scopeRef.current) && (o.nodeToRestore = r.nodeToRestore);
|
1519
1535
|
let i = r.children;
|
1520
1536
|
n && (n.removeChild(r), i.size > 0 && i.forEach((o) => n && n.addChild(o))), this.fastMap.delete(r.scopeRef);
|
1521
1537
|
}
|
@@ -1525,18 +1541,18 @@ class Ue {
|
|
1525
1541
|
}
|
1526
1542
|
clone() {
|
1527
1543
|
var e;
|
1528
|
-
let r = new
|
1544
|
+
let r = new We();
|
1529
1545
|
var n;
|
1530
1546
|
for (let i of this.traverse()) r.addTreeNode(i.scopeRef, (n = (e = i.parent) === null || e === void 0 ? void 0 : e.scopeRef) !== null && n !== void 0 ? n : null, i.nodeToRestore);
|
1531
1547
|
return r;
|
1532
1548
|
}
|
1533
1549
|
constructor() {
|
1534
|
-
this.fastMap = /* @__PURE__ */ new Map(), this.root = new
|
1550
|
+
this.fastMap = /* @__PURE__ */ new Map(), this.root = new st({
|
1535
1551
|
scopeRef: null
|
1536
1552
|
}), this.fastMap.set(null, this.root);
|
1537
1553
|
}
|
1538
1554
|
}
|
1539
|
-
class
|
1555
|
+
class st {
|
1540
1556
|
addChild(e) {
|
1541
1557
|
this.children.add(e), e.parent = this;
|
1542
1558
|
}
|
@@ -1547,17 +1563,17 @@ class it {
|
|
1547
1563
|
this.children = /* @__PURE__ */ new Set(), this.contain = !1, this.scopeRef = e.scopeRef;
|
1548
1564
|
}
|
1549
1565
|
}
|
1550
|
-
new
|
1551
|
-
function
|
1566
|
+
new We();
|
1567
|
+
function sn(t, e) {
|
1552
1568
|
let r = e == null ? void 0 : e.isDisabled, [n, i] = B(!1);
|
1553
|
-
return
|
1569
|
+
return fe(() => {
|
1554
1570
|
if (t != null && t.current && !r) {
|
1555
1571
|
let o = () => {
|
1556
1572
|
if (t.current) {
|
1557
|
-
let
|
1573
|
+
let c = Ot(t.current, {
|
1558
1574
|
tabbable: !0
|
1559
1575
|
});
|
1560
|
-
i(!!
|
1576
|
+
i(!!c.nextNode());
|
1561
1577
|
}
|
1562
1578
|
};
|
1563
1579
|
o();
|
@@ -1576,7 +1592,7 @@ function ln(t, e) {
|
|
1576
1592
|
}
|
1577
1593
|
}), r ? !1 : n;
|
1578
1594
|
}
|
1579
|
-
const
|
1595
|
+
const an = /* @__PURE__ */ new Set([
|
1580
1596
|
"Arab",
|
1581
1597
|
"Syrc",
|
1582
1598
|
"Samr",
|
@@ -1587,7 +1603,7 @@ const on = /* @__PURE__ */ new Set([
|
|
1587
1603
|
"Adlm",
|
1588
1604
|
"Rohg",
|
1589
1605
|
"Hebr"
|
1590
|
-
]),
|
1606
|
+
]), cn = /* @__PURE__ */ new Set([
|
1591
1607
|
"ae",
|
1592
1608
|
"ar",
|
1593
1609
|
"arc",
|
@@ -1608,18 +1624,18 @@ const on = /* @__PURE__ */ new Set([
|
|
1608
1624
|
"ur",
|
1609
1625
|
"yi"
|
1610
1626
|
]);
|
1611
|
-
function
|
1627
|
+
function dn(t) {
|
1612
1628
|
if (Intl.Locale) {
|
1613
1629
|
let r = new Intl.Locale(t).maximize(), n = typeof r.getTextInfo == "function" ? r.getTextInfo() : r.textInfo;
|
1614
1630
|
if (n) return n.direction === "rtl";
|
1615
|
-
if (r.script) return
|
1631
|
+
if (r.script) return an.has(r.script);
|
1616
1632
|
}
|
1617
1633
|
let e = t.split("-")[0];
|
1618
|
-
return
|
1634
|
+
return cn.has(e);
|
1619
1635
|
}
|
1620
|
-
const
|
1621
|
-
function
|
1622
|
-
let t = typeof window < "u" && window[
|
1636
|
+
const un = Symbol.for("react-aria.i18n.locale");
|
1637
|
+
function zt() {
|
1638
|
+
let t = typeof window < "u" && window[un] || typeof navigator < "u" && (navigator.language || navigator.userLanguage) || "en-US";
|
1623
1639
|
try {
|
1624
1640
|
Intl.DateTimeFormat.supportedLocalesOf([
|
1625
1641
|
t
|
@@ -1629,229 +1645,226 @@ function At() {
|
|
1629
1645
|
}
|
1630
1646
|
return {
|
1631
1647
|
locale: t,
|
1632
|
-
direction:
|
1648
|
+
direction: dn(t) ? "rtl" : "ltr"
|
1633
1649
|
};
|
1634
1650
|
}
|
1635
|
-
let
|
1636
|
-
function
|
1637
|
-
|
1638
|
-
for (let t of
|
1651
|
+
let Oe = zt(), ce = /* @__PURE__ */ new Set();
|
1652
|
+
function at() {
|
1653
|
+
Oe = zt();
|
1654
|
+
for (let t of ce) t(Oe);
|
1639
1655
|
}
|
1640
|
-
function
|
1641
|
-
let t =
|
1642
|
-
return O(() => (
|
1643
|
-
|
1656
|
+
function fn() {
|
1657
|
+
let t = gt(), [e, r] = B(Oe);
|
1658
|
+
return O(() => (ce.size === 0 && window.addEventListener("languagechange", at), ce.add(r), () => {
|
1659
|
+
ce.delete(r), ce.size === 0 && window.removeEventListener("languagechange", at);
|
1644
1660
|
}), []), t ? {
|
1645
1661
|
locale: "en-US",
|
1646
1662
|
direction: "ltr"
|
1647
1663
|
} : e;
|
1648
1664
|
}
|
1649
|
-
const
|
1650
|
-
function
|
1651
|
-
let t =
|
1652
|
-
return
|
1665
|
+
const pn = /* @__PURE__ */ R.createContext(null);
|
1666
|
+
function Nt() {
|
1667
|
+
let t = fn();
|
1668
|
+
return ae(pn) || t;
|
1653
1669
|
}
|
1654
|
-
function
|
1655
|
-
let { selectionManager: e, keyboardDelegate: r, ref: n, autoFocus: i = !1, shouldFocusWrap: o = !1, disallowEmptySelection: s = !1, disallowSelectAll:
|
1656
|
-
if (
|
1657
|
-
const u = (m,
|
1670
|
+
function bn(t) {
|
1671
|
+
let { selectionManager: e, keyboardDelegate: r, ref: n, autoFocus: i = !1, shouldFocusWrap: o = !1, disallowEmptySelection: s = !1, disallowSelectAll: c = !1, selectOnFocus: f = e.selectionBehavior === "replace", disallowTypeAhead: v = !1, shouldUseVirtualFocus: y, allowsTabNavigation: K = !1, isVirtualized: h, scrollRef: g = n, linkBehavior: L = "action" } = t, { direction: P } = Nt(), w = Be(), E = (p) => {
|
1672
|
+
if (p.altKey && p.key === "Tab" && p.preventDefault(), !n.current.contains(p.target)) return;
|
1673
|
+
const u = (m, q) => {
|
1658
1674
|
if (m != null) {
|
1659
|
-
if (e.isLink(m) &&
|
1660
|
-
|
1661
|
-
e.setFocusedKey(m,
|
1675
|
+
if (e.isLink(m) && L === "selection" && f && !Ie(p)) {
|
1676
|
+
Gt(() => {
|
1677
|
+
e.setFocusedKey(m, q);
|
1662
1678
|
});
|
1663
|
-
let
|
1664
|
-
|
1679
|
+
let re = g.current.querySelector(`[data-key="${CSS.escape(m.toString())}"]`), Ve = e.getItemProps(m);
|
1680
|
+
w.open(re, p, Ve.href, Ve.routerOptions);
|
1665
1681
|
return;
|
1666
1682
|
}
|
1667
|
-
if (e.setFocusedKey(m,
|
1668
|
-
|
1683
|
+
if (e.setFocusedKey(m, q), e.isLink(m) && L === "override") return;
|
1684
|
+
p.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(m) : f && !Ie(p) && e.replaceSelection(m);
|
1669
1685
|
}
|
1670
1686
|
};
|
1671
|
-
switch (
|
1687
|
+
switch (p.key) {
|
1672
1688
|
case "ArrowDown":
|
1673
1689
|
if (r.getKeyBelow) {
|
1674
|
-
var
|
1675
|
-
|
1676
|
-
let m = e.focusedKey != null ? r.getKeyBelow(e.focusedKey) : (
|
1690
|
+
var S, a;
|
1691
|
+
p.preventDefault();
|
1692
|
+
let m = e.focusedKey != null ? r.getKeyBelow(e.focusedKey) : (S = r.getFirstKey) === null || S === void 0 ? void 0 : S.call(r);
|
1677
1693
|
m == null && o && (m = (a = r.getFirstKey) === null || a === void 0 ? void 0 : a.call(r, e.focusedKey)), u(m);
|
1678
1694
|
}
|
1679
1695
|
break;
|
1680
1696
|
case "ArrowUp":
|
1681
1697
|
if (r.getKeyAbove) {
|
1682
|
-
var
|
1683
|
-
|
1684
|
-
let m = e.focusedKey != null ? r.getKeyAbove(e.focusedKey) : (
|
1685
|
-
m == null && o && (m = (
|
1698
|
+
var d, T;
|
1699
|
+
p.preventDefault();
|
1700
|
+
let m = e.focusedKey != null ? r.getKeyAbove(e.focusedKey) : (d = r.getLastKey) === null || d === void 0 ? void 0 : d.call(r);
|
1701
|
+
m == null && o && (m = (T = r.getLastKey) === null || T === void 0 ? void 0 : T.call(r, e.focusedKey)), u(m);
|
1686
1702
|
}
|
1687
1703
|
break;
|
1688
1704
|
case "ArrowLeft":
|
1689
1705
|
if (r.getKeyLeftOf) {
|
1690
1706
|
var A, b;
|
1691
|
-
|
1707
|
+
p.preventDefault();
|
1692
1708
|
let m = r.getKeyLeftOf(e.focusedKey);
|
1693
|
-
m == null && o && (m =
|
1709
|
+
m == null && o && (m = P === "rtl" ? (A = r.getFirstKey) === null || A === void 0 ? void 0 : A.call(r, e.focusedKey) : (b = r.getLastKey) === null || b === void 0 ? void 0 : b.call(r, e.focusedKey)), u(m, P === "rtl" ? "first" : "last");
|
1694
1710
|
}
|
1695
1711
|
break;
|
1696
1712
|
case "ArrowRight":
|
1697
1713
|
if (r.getKeyRightOf) {
|
1698
|
-
var H,
|
1699
|
-
|
1714
|
+
var H, Te;
|
1715
|
+
p.preventDefault();
|
1700
1716
|
let m = r.getKeyRightOf(e.focusedKey);
|
1701
|
-
m == null && o && (m =
|
1717
|
+
m == null && o && (m = P === "rtl" ? (H = r.getLastKey) === null || H === void 0 ? void 0 : H.call(r, e.focusedKey) : (Te = r.getFirstKey) === null || Te === void 0 ? void 0 : Te.call(r, e.focusedKey)), u(m, P === "rtl" ? "last" : "first");
|
1702
1718
|
}
|
1703
1719
|
break;
|
1704
1720
|
case "Home":
|
1705
1721
|
if (r.getFirstKey) {
|
1706
|
-
|
1707
|
-
let m = r.getFirstKey(e.focusedKey,
|
1708
|
-
e.setFocusedKey(m),
|
1722
|
+
p.preventDefault();
|
1723
|
+
let m = r.getFirstKey(e.focusedKey, oe(p));
|
1724
|
+
e.setFocusedKey(m), oe(p) && p.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(m) : f && e.replaceSelection(m);
|
1709
1725
|
}
|
1710
1726
|
break;
|
1711
1727
|
case "End":
|
1712
1728
|
if (r.getLastKey) {
|
1713
|
-
|
1714
|
-
let m = r.getLastKey(e.focusedKey,
|
1715
|
-
e.setFocusedKey(m),
|
1729
|
+
p.preventDefault();
|
1730
|
+
let m = r.getLastKey(e.focusedKey, oe(p));
|
1731
|
+
e.setFocusedKey(m), oe(p) && p.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(m) : f && e.replaceSelection(m);
|
1716
1732
|
}
|
1717
1733
|
break;
|
1718
1734
|
case "PageDown":
|
1719
1735
|
if (r.getKeyPageBelow) {
|
1720
|
-
|
1736
|
+
p.preventDefault();
|
1721
1737
|
let m = r.getKeyPageBelow(e.focusedKey);
|
1722
1738
|
u(m);
|
1723
1739
|
}
|
1724
1740
|
break;
|
1725
1741
|
case "PageUp":
|
1726
1742
|
if (r.getKeyPageAbove) {
|
1727
|
-
|
1743
|
+
p.preventDefault();
|
1728
1744
|
let m = r.getKeyPageAbove(e.focusedKey);
|
1729
1745
|
u(m);
|
1730
1746
|
}
|
1731
1747
|
break;
|
1732
1748
|
case "a":
|
1733
|
-
|
1749
|
+
oe(p) && e.selectionMode === "multiple" && c !== !0 && (p.preventDefault(), e.selectAll());
|
1734
1750
|
break;
|
1735
1751
|
case "Escape":
|
1736
|
-
!s && e.selectedKeys.size !== 0 && (
|
1752
|
+
!s && e.selectedKeys.size !== 0 && (p.stopPropagation(), p.preventDefault(), e.clearSelection());
|
1737
1753
|
break;
|
1738
1754
|
case "Tab":
|
1739
|
-
if (!
|
1740
|
-
if (
|
1755
|
+
if (!K) {
|
1756
|
+
if (p.shiftKey) n.current.focus();
|
1741
1757
|
else {
|
1742
|
-
let m =
|
1758
|
+
let m = Ot(n.current, {
|
1743
1759
|
tabbable: !0
|
1744
|
-
}),
|
1760
|
+
}), q, re;
|
1745
1761
|
do
|
1746
|
-
|
1747
|
-
while (
|
1748
|
-
|
1762
|
+
re = m.lastChild(), re && (q = re);
|
1763
|
+
while (re);
|
1764
|
+
q && !q.contains(document.activeElement) && j(q);
|
1749
1765
|
}
|
1750
1766
|
break;
|
1751
1767
|
}
|
1752
1768
|
}
|
1753
|
-
},
|
1769
|
+
}, x = k({
|
1754
1770
|
top: 0,
|
1755
1771
|
left: 0
|
1756
1772
|
});
|
1757
|
-
|
1758
|
-
|
1759
|
-
top:
|
1760
|
-
left:
|
1773
|
+
Ze(g, "scroll", h ? null : () => {
|
1774
|
+
x.current = {
|
1775
|
+
top: g.current.scrollTop,
|
1776
|
+
left: g.current.scrollLeft
|
1761
1777
|
};
|
1762
1778
|
});
|
1763
|
-
let _ = (
|
1779
|
+
let _ = (p) => {
|
1764
1780
|
if (e.isFocused) {
|
1765
|
-
|
1781
|
+
p.currentTarget.contains(p.target) || e.setFocused(!1);
|
1766
1782
|
return;
|
1767
1783
|
}
|
1768
|
-
if (
|
1784
|
+
if (p.currentTarget.contains(p.target)) {
|
1769
1785
|
if (e.setFocused(!0), e.focusedKey == null) {
|
1770
|
-
let a = (
|
1771
|
-
|
1772
|
-
},
|
1773
|
-
var u,
|
1774
|
-
|
1775
|
-
} else h || (
|
1776
|
-
if (
|
1777
|
-
let a =
|
1778
|
-
a && (a.contains(document.activeElement) || j(a),
|
1786
|
+
let a = (T) => {
|
1787
|
+
T != null && (e.setFocusedKey(T), f && e.replaceSelection(T));
|
1788
|
+
}, d = p.relatedTarget;
|
1789
|
+
var u, S;
|
1790
|
+
d && p.currentTarget.compareDocumentPosition(d) & Node.DOCUMENT_POSITION_FOLLOWING ? a((u = e.lastSelectedKey) !== null && u !== void 0 ? u : r.getLastKey()) : a((S = e.firstSelectedKey) !== null && S !== void 0 ? S : r.getFirstKey());
|
1791
|
+
} else h || (g.current.scrollTop = x.current.top, g.current.scrollLeft = x.current.left);
|
1792
|
+
if (e.focusedKey != null) {
|
1793
|
+
let a = g.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);
|
1794
|
+
a && (a.contains(document.activeElement) || j(a), Ae() === "keyboard" && et(a, {
|
1779
1795
|
containingElement: n.current
|
1780
1796
|
}));
|
1781
1797
|
}
|
1782
1798
|
}
|
1783
|
-
},
|
1784
|
-
|
1799
|
+
}, I = (p) => {
|
1800
|
+
p.currentTarget.contains(p.relatedTarget) || e.setFocused(!1);
|
1785
1801
|
};
|
1786
|
-
const
|
1802
|
+
const M = k(i);
|
1787
1803
|
O(() => {
|
1788
|
-
if (
|
1789
|
-
let
|
1790
|
-
i === "first" && (
|
1804
|
+
if (M.current) {
|
1805
|
+
let p = null;
|
1806
|
+
i === "first" && (p = r.getFirstKey()), i === "last" && (p = r.getLastKey());
|
1791
1807
|
let u = e.selectedKeys;
|
1792
1808
|
if (u.size) {
|
1793
|
-
for (let
|
1794
|
-
|
1809
|
+
for (let S of u) if (e.canSelectItem(S)) {
|
1810
|
+
p = S;
|
1795
1811
|
break;
|
1796
1812
|
}
|
1797
1813
|
}
|
1798
|
-
e.setFocused(!0), e.setFocusedKey(
|
1814
|
+
e.setFocused(!0), e.setFocusedKey(p), p == null && !y && Fe(n.current);
|
1799
1815
|
}
|
1800
1816
|
}, []);
|
1801
|
-
let D =
|
1817
|
+
let D = k(e.focusedKey);
|
1802
1818
|
O(() => {
|
1803
|
-
|
1804
|
-
|
1805
|
-
|
1806
|
-
|
1819
|
+
if (e.isFocused && e.focusedKey != null && (e.focusedKey !== D.current || M.current) && (g != null && g.current)) {
|
1820
|
+
let p = Ae(), u = n.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);
|
1821
|
+
if (!u)
|
1822
|
+
return;
|
1823
|
+
(p === "keyboard" || M.current) && (_t(g.current, u), p !== "virtual" && et(u, {
|
1807
1824
|
containingElement: n.current
|
1808
1825
|
}));
|
1809
1826
|
}
|
1810
|
-
e.isFocused && e.focusedKey == null && D.current != null &&
|
1811
|
-
},
|
1812
|
-
|
1813
|
-
|
1814
|
-
e.focusedKey,
|
1815
|
-
e.isFocused,
|
1816
|
-
n
|
1817
|
-
]);
|
1827
|
+
e.isFocused && e.focusedKey == null && D.current != null && Fe(n.current), D.current = e.focusedKey, M.current = !1;
|
1828
|
+
}), Ze(n, "react-aria-focus-scope-restore", (p) => {
|
1829
|
+
p.preventDefault(), e.setFocused(!0);
|
1830
|
+
});
|
1818
1831
|
let U = {
|
1819
|
-
onKeyDown:
|
1832
|
+
onKeyDown: E,
|
1820
1833
|
onFocus: _,
|
1821
|
-
onBlur:
|
1822
|
-
onMouseDown(
|
1823
|
-
|
1834
|
+
onBlur: I,
|
1835
|
+
onMouseDown(p) {
|
1836
|
+
g.current === p.target && p.preventDefault();
|
1824
1837
|
}
|
1825
|
-
}, { typeSelectProps: l } =
|
1838
|
+
}, { typeSelectProps: l } = Nr({
|
1826
1839
|
keyboardDelegate: r,
|
1827
1840
|
selectionManager: e
|
1828
1841
|
});
|
1829
|
-
v || (U =
|
1842
|
+
v || (U = Y(l, U));
|
1830
1843
|
let $;
|
1831
|
-
return
|
1844
|
+
return y || ($ = e.focusedKey == null ? 0 : -1), {
|
1832
1845
|
collectionProps: {
|
1833
1846
|
...U,
|
1834
1847
|
tabIndex: $
|
1835
1848
|
}
|
1836
1849
|
};
|
1837
1850
|
}
|
1838
|
-
function
|
1839
|
-
let { selectionManager: e, key: r, ref: n, shouldSelectOnPressUp: i, shouldUseVirtualFocus: o, focus: s, isDisabled:
|
1840
|
-
if (b.pointerType === "keyboard" &&
|
1851
|
+
function vn(t) {
|
1852
|
+
let { selectionManager: e, key: r, ref: n, shouldSelectOnPressUp: i, shouldUseVirtualFocus: o, focus: s, isDisabled: c, onAction: f, allowsDifferentPressOrigin: v, linkBehavior: y = "action" } = t, K = Be(), h = (b) => {
|
1853
|
+
if (b.pointerType === "keyboard" && Ie(b)) e.toggleSelection(r);
|
1841
1854
|
else {
|
1842
1855
|
if (e.selectionMode === "none") return;
|
1843
1856
|
if (e.isLink(r)) {
|
1844
|
-
if (
|
1857
|
+
if (y === "selection") {
|
1845
1858
|
let H = e.getItemProps(r);
|
1846
|
-
|
1859
|
+
K.open(n.current, b, H.href, H.routerOptions), e.setSelectedKeys(e.selectedKeys);
|
1847
1860
|
return;
|
1848
|
-
} else if (
|
1861
|
+
} else if (y === "override" || y === "none") return;
|
1849
1862
|
}
|
1850
|
-
e.selectionMode === "single" ? e.isSelected(r) && !e.disallowEmptySelection ? e.toggleSelection(r) : e.replaceSelection(r) : b && b.shiftKey ? e.extendSelection(r) : e.selectionBehavior === "toggle" || b && (
|
1863
|
+
e.selectionMode === "single" ? e.isSelected(r) && !e.disallowEmptySelection ? e.toggleSelection(r) : e.replaceSelection(r) : b && b.shiftKey ? e.extendSelection(r) : e.selectionBehavior === "toggle" || b && (oe(b) || b.pointerType === "touch" || b.pointerType === "virtual") ? e.toggleSelection(r) : e.replaceSelection(r);
|
1851
1864
|
}
|
1852
1865
|
};
|
1853
1866
|
O(() => {
|
1854
|
-
r === e.focusedKey && e.isFocused && !o && (s ? s() : document.activeElement !== n.current &&
|
1867
|
+
r === e.focusedKey && e.isFocused && !o && (s ? s() : document.activeElement !== n.current && Fe(n.current));
|
1855
1868
|
}, [
|
1856
1869
|
n,
|
1857
1870
|
r,
|
@@ -1859,107 +1872,107 @@ function pn(t) {
|
|
1859
1872
|
e.childFocusStrategy,
|
1860
1873
|
e.isFocused,
|
1861
1874
|
o
|
1862
|
-
]),
|
1863
|
-
let
|
1864
|
-
!o && !
|
1875
|
+
]), c = c || e.isDisabled(r);
|
1876
|
+
let g = {};
|
1877
|
+
!o && !c ? g = {
|
1865
1878
|
tabIndex: r === e.focusedKey ? 0 : -1,
|
1866
1879
|
onFocus(b) {
|
1867
1880
|
b.target === n.current && e.setFocusedKey(r);
|
1868
1881
|
}
|
1869
|
-
} :
|
1882
|
+
} : c && (g.onMouseDown = (b) => {
|
1870
1883
|
b.preventDefault();
|
1871
1884
|
});
|
1872
|
-
let
|
1873
|
-
if (
|
1885
|
+
let L = e.isLink(r) && y === "override", P = e.isLink(r) && y !== "selection" && y !== "none", w = !c && e.canSelectItem(r) && !L, E = (f || P) && !c, x = E && (e.selectionBehavior === "replace" ? !w : !w || e.isEmpty), _ = E && w && e.selectionBehavior === "replace", I = x || _, M = k(null), D = I && w, U = k(!1), l = k(!1), $ = (b) => {
|
1886
|
+
if (f && f(), P) {
|
1874
1887
|
let H = e.getItemProps(r);
|
1875
|
-
|
1888
|
+
K.open(n.current, b, H.href, H.routerOptions);
|
1876
1889
|
}
|
1877
|
-
},
|
1878
|
-
i ? (
|
1879
|
-
|
1880
|
-
}, v ? (
|
1881
|
-
b.pointerType !== "keyboard" &&
|
1882
|
-
},
|
1883
|
-
if (
|
1884
|
-
if (b.pointerType === "keyboard" && !
|
1890
|
+
}, p = {};
|
1891
|
+
i ? (p.onPressStart = (b) => {
|
1892
|
+
M.current = b.pointerType, U.current = D, b.pointerType === "keyboard" && (!I || dt()) && h(b);
|
1893
|
+
}, v ? (p.onPressUp = x ? null : (b) => {
|
1894
|
+
b.pointerType !== "keyboard" && w && h(b);
|
1895
|
+
}, p.onPress = x ? $ : null) : p.onPress = (b) => {
|
1896
|
+
if (x || _ && b.pointerType !== "mouse") {
|
1897
|
+
if (b.pointerType === "keyboard" && !ct()) return;
|
1885
1898
|
$(b);
|
1886
|
-
} else b.pointerType !== "keyboard" &&
|
1887
|
-
}) : (
|
1888
|
-
|
1889
|
-
},
|
1890
|
-
(b.pointerType === "touch" || b.pointerType === "pen" || b.pointerType === "virtual" || b.pointerType === "keyboard" &&
|
1891
|
-
}),
|
1892
|
-
let { pressProps: u, isPressed:
|
1893
|
-
|
1894
|
-
} : void 0, { longPressProps:
|
1899
|
+
} else b.pointerType !== "keyboard" && w && h(b);
|
1900
|
+
}) : (p.onPressStart = (b) => {
|
1901
|
+
M.current = b.pointerType, U.current = D, l.current = x, w && (b.pointerType === "mouse" && !x || b.pointerType === "keyboard" && (!E || dt())) && h(b);
|
1902
|
+
}, p.onPress = (b) => {
|
1903
|
+
(b.pointerType === "touch" || b.pointerType === "pen" || b.pointerType === "virtual" || b.pointerType === "keyboard" && I && ct() || b.pointerType === "mouse" && l.current) && (I ? $(b) : w && h(b));
|
1904
|
+
}), g["data-key"] = r, p.preventFocusOnPress = o;
|
1905
|
+
let { pressProps: u, isPressed: S } = kt(p), a = _ ? (b) => {
|
1906
|
+
M.current === "mouse" && (b.stopPropagation(), b.preventDefault(), $(b));
|
1907
|
+
} : void 0, { longPressProps: d } = tn({
|
1895
1908
|
isDisabled: !D,
|
1896
1909
|
onLongPress(b) {
|
1897
1910
|
b.pointerType === "touch" && (h(b), e.setSelectionBehavior("toggle"));
|
1898
1911
|
}
|
1899
|
-
}),
|
1900
|
-
|
1912
|
+
}), T = (b) => {
|
1913
|
+
M.current === "touch" && U.current && b.preventDefault();
|
1901
1914
|
}, A = e.isLink(r) ? (b) => {
|
1902
|
-
|
1915
|
+
ee.isOpening || b.preventDefault();
|
1903
1916
|
} : void 0;
|
1904
1917
|
return {
|
1905
|
-
itemProps:
|
1918
|
+
itemProps: Y(g, w || x ? u : {}, D ? d : {}, {
|
1906
1919
|
onDoubleClick: a,
|
1907
|
-
onDragStartCapture:
|
1920
|
+
onDragStartCapture: T,
|
1908
1921
|
onClick: A
|
1909
1922
|
}),
|
1910
|
-
isPressed:
|
1923
|
+
isPressed: S,
|
1911
1924
|
isSelected: e.isSelected(r),
|
1912
1925
|
isFocused: e.isFocused && e.focusedKey === r,
|
1913
|
-
isDisabled:
|
1914
|
-
allowsSelection:
|
1915
|
-
hasAction:
|
1926
|
+
isDisabled: c,
|
1927
|
+
allowsSelection: w,
|
1928
|
+
hasAction: I
|
1916
1929
|
};
|
1917
1930
|
}
|
1918
|
-
function
|
1931
|
+
function ct() {
|
1919
1932
|
let t = window.event;
|
1920
1933
|
return (t == null ? void 0 : t.key) === "Enter";
|
1921
1934
|
}
|
1922
|
-
function
|
1935
|
+
function dt() {
|
1923
1936
|
let t = window.event;
|
1924
1937
|
return (t == null ? void 0 : t.key) === " " || (t == null ? void 0 : t.code) === "Space";
|
1925
1938
|
}
|
1926
|
-
function
|
1927
|
-
let { key: n, isDisabled: i, shouldSelectOnPressUp: o } = t, { selectionManager: s, selectedKey:
|
1939
|
+
function yn(t, e, r) {
|
1940
|
+
let { key: n, isDisabled: i, shouldSelectOnPressUp: o } = t, { selectionManager: s, selectedKey: c } = e, f = n === c, v = i || e.isDisabled || e.selectionManager.isDisabled(n), { itemProps: y, isPressed: K } = vn({
|
1928
1941
|
selectionManager: s,
|
1929
1942
|
key: n,
|
1930
1943
|
ref: r,
|
1931
1944
|
isDisabled: v,
|
1932
1945
|
shouldSelectOnPressUp: o,
|
1933
1946
|
linkBehavior: "selection"
|
1934
|
-
}), h =
|
1947
|
+
}), h = $e(e, n, "tab"), g = $e(e, n, "tabpanel"), { tabIndex: L } = y, P = e.collection.getItem(n), w = $r(P == null ? void 0 : P.props, {
|
1935
1948
|
labelable: !0
|
1936
1949
|
});
|
1937
|
-
delete
|
1938
|
-
let
|
1950
|
+
delete w.id;
|
1951
|
+
let E = Mr(P == null ? void 0 : P.props);
|
1939
1952
|
return {
|
1940
|
-
tabProps:
|
1953
|
+
tabProps: Y(w, E, y, {
|
1941
1954
|
id: h,
|
1942
|
-
"aria-selected":
|
1955
|
+
"aria-selected": f,
|
1943
1956
|
"aria-disabled": v || void 0,
|
1944
|
-
"aria-controls":
|
1945
|
-
tabIndex: v ? void 0 :
|
1957
|
+
"aria-controls": f ? g : void 0,
|
1958
|
+
tabIndex: v ? void 0 : L,
|
1946
1959
|
role: "tab"
|
1947
1960
|
}),
|
1948
|
-
isSelected:
|
1961
|
+
isSelected: f,
|
1949
1962
|
isDisabled: v,
|
1950
|
-
isPressed:
|
1963
|
+
isPressed: K
|
1951
1964
|
};
|
1952
1965
|
}
|
1953
|
-
function
|
1954
|
-
let n =
|
1966
|
+
function gn(t, e, r) {
|
1967
|
+
let n = sn(r) ? void 0 : 0;
|
1955
1968
|
var i;
|
1956
|
-
const o =
|
1969
|
+
const o = $e(e, (i = t.id) !== null && i !== void 0 ? i : e == null ? void 0 : e.selectedKey, "tabpanel"), s = Pt({
|
1957
1970
|
...t,
|
1958
1971
|
id: o,
|
1959
|
-
"aria-labelledby":
|
1972
|
+
"aria-labelledby": $e(e, e == null ? void 0 : e.selectedKey, "tab")
|
1960
1973
|
});
|
1961
1974
|
return {
|
1962
|
-
tabPanelProps:
|
1975
|
+
tabPanelProps: Y(s, {
|
1963
1976
|
tabIndex: n,
|
1964
1977
|
role: "tabpanel",
|
1965
1978
|
"aria-describedby": t["aria-describedby"],
|
@@ -1967,7 +1980,7 @@ function vn(t, e, r) {
|
|
1967
1980
|
})
|
1968
1981
|
};
|
1969
1982
|
}
|
1970
|
-
class
|
1983
|
+
class hn {
|
1971
1984
|
getKeyLeftOf(e) {
|
1972
1985
|
return this.flipDirection ? this.getNextKey(e) : this.getPreviousKey(e);
|
1973
1986
|
}
|
@@ -2008,13 +2021,13 @@ class yn {
|
|
2008
2021
|
this.collection = e, this.flipDirection = r === "rtl" && n === "horizontal", this.disabledKeys = i;
|
2009
2022
|
}
|
2010
2023
|
}
|
2011
|
-
function
|
2012
|
-
let { orientation: n = "horizontal", keyboardActivation: i = "automatic" } = t, { collection: o, selectionManager: s, disabledKeys:
|
2024
|
+
function $n(t, e, r) {
|
2025
|
+
let { orientation: n = "horizontal", keyboardActivation: i = "automatic" } = t, { collection: o, selectionManager: s, disabledKeys: c } = e, { direction: f } = Nt(), v = V(() => new hn(o, f, n, c), [
|
2013
2026
|
o,
|
2014
|
-
|
2027
|
+
c,
|
2015
2028
|
n,
|
2016
|
-
|
2017
|
-
]), { collectionProps:
|
2029
|
+
f
|
2030
|
+
]), { collectionProps: y } = bn({
|
2018
2031
|
ref: r,
|
2019
2032
|
selectionManager: s,
|
2020
2033
|
keyboardDelegate: v,
|
@@ -2022,22 +2035,22 @@ function gn(t, e, r) {
|
|
2022
2035
|
disallowEmptySelection: !0,
|
2023
2036
|
scrollRef: r,
|
2024
2037
|
linkBehavior: "selection"
|
2025
|
-
}),
|
2026
|
-
|
2027
|
-
let h =
|
2038
|
+
}), K = ht();
|
2039
|
+
vt.set(e, K);
|
2040
|
+
let h = Pt({
|
2028
2041
|
...t,
|
2029
|
-
id:
|
2042
|
+
id: K
|
2030
2043
|
});
|
2031
2044
|
return {
|
2032
2045
|
tabListProps: {
|
2033
|
-
...
|
2046
|
+
...Y(y, h),
|
2034
2047
|
role: "tablist",
|
2035
2048
|
"aria-orientation": n,
|
2036
2049
|
tabIndex: void 0
|
2037
2050
|
}
|
2038
2051
|
};
|
2039
2052
|
}
|
2040
|
-
function
|
2053
|
+
function mn(t, e, r) {
|
2041
2054
|
return e in t ? Object.defineProperty(t, e, {
|
2042
2055
|
value: r,
|
2043
2056
|
enumerable: !0,
|
@@ -2045,7 +2058,7 @@ function hn(t, e, r) {
|
|
2045
2058
|
writable: !0
|
2046
2059
|
}) : t[e] = r, t;
|
2047
2060
|
}
|
2048
|
-
function
|
2061
|
+
function ut(t, e) {
|
2049
2062
|
var r = Object.keys(t);
|
2050
2063
|
if (Object.getOwnPropertySymbols) {
|
2051
2064
|
var n = Object.getOwnPropertySymbols(t);
|
@@ -2055,70 +2068,70 @@ function at(t, e) {
|
|
2055
2068
|
}
|
2056
2069
|
return r;
|
2057
2070
|
}
|
2058
|
-
function
|
2071
|
+
function ft(t) {
|
2059
2072
|
for (var e = 1; e < arguments.length; e++) {
|
2060
2073
|
var r = arguments[e] != null ? arguments[e] : {};
|
2061
|
-
e % 2 ?
|
2062
|
-
|
2063
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) :
|
2074
|
+
e % 2 ? ut(Object(r), !0).forEach(function(n) {
|
2075
|
+
mn(t, n, r[n]);
|
2076
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : ut(Object(r)).forEach(function(n) {
|
2064
2077
|
Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
|
2065
2078
|
});
|
2066
2079
|
}
|
2067
2080
|
return t;
|
2068
2081
|
}
|
2069
|
-
var
|
2082
|
+
var Kn = (t, e, r) => {
|
2070
2083
|
for (var n of Object.keys(t)) {
|
2071
2084
|
var i;
|
2072
2085
|
if (t[n] !== ((i = e[n]) !== null && i !== void 0 ? i : r[n]))
|
2073
2086
|
return !1;
|
2074
2087
|
}
|
2075
2088
|
return !0;
|
2076
|
-
},
|
2077
|
-
var r = t.defaultClassName, n =
|
2089
|
+
}, je = (t) => (e) => {
|
2090
|
+
var r = t.defaultClassName, n = ft(ft({}, t.defaultVariants), e);
|
2078
2091
|
for (var i in n) {
|
2079
2092
|
var o, s = (o = n[i]) !== null && o !== void 0 ? o : t.defaultVariants[i];
|
2080
2093
|
if (s != null) {
|
2081
|
-
var
|
2082
|
-
typeof
|
2083
|
-
var
|
2094
|
+
var c = s;
|
2095
|
+
typeof c == "boolean" && (c = c === !0 ? "true" : "false");
|
2096
|
+
var f = (
|
2084
2097
|
// @ts-expect-error
|
2085
|
-
t.variantClassNames[i][
|
2098
|
+
t.variantClassNames[i][c]
|
2086
2099
|
);
|
2087
|
-
|
2100
|
+
f && (r += " " + f);
|
2088
2101
|
}
|
2089
2102
|
}
|
2090
|
-
for (var [v,
|
2091
|
-
|
2103
|
+
for (var [v, y] of t.compoundVariants)
|
2104
|
+
Kn(v, n, t.defaultVariants) && (r += " " + y);
|
2092
2105
|
return r;
|
2093
|
-
},
|
2094
|
-
function
|
2106
|
+
}, Sn = je({ defaultClassName: "pkg_sps-woodland_tabs__version_8_19_0__hash_kz6kzz0", variantClassNames: { context: { container: "pkg_sps-woodland_tabs__version_8_19_0__hash_kz6kzz1", navigation: "pkg_sps-woodland_tabs__version_8_19_0__hash_kz6kzz2" }, active: { true: "pkg_sps-woodland_tabs__version_8_19_0__hash_kz6kzz3", false: "pkg_sps-woodland_tabs__version_8_19_0__hash_kz6kzz4" }, disabled: { true: "pkg_sps-woodland_tabs__version_8_19_0__hash_kz6kzz5", false: "pkg_sps-woodland_tabs__version_8_19_0__hash_kz6kzz6" } }, defaultVariants: {}, compoundVariants: [[{ context: "container", active: !0 }, "pkg_sps-woodland_tabs__version_8_19_0__hash_kz6kzz7"], [{ context: "container", active: !1 }, "pkg_sps-woodland_tabs__version_8_19_0__hash_kz6kzz8"], [{ context: "container", active: !1, disabled: !1 }, "pkg_sps-woodland_tabs__version_8_19_0__hash_kz6kzz9"], [{ context: "navigation", active: !0 }, "pkg_sps-woodland_tabs__version_8_19_0__hash_kz6kzza"], [{ context: "navigation", active: !1 }, "pkg_sps-woodland_tabs__version_8_19_0__hash_kz6kzzb"], [{ context: "navigation", active: !1, disabled: !1 }, "pkg_sps-woodland_tabs__version_8_19_0__hash_kz6kzzc"], [{ context: "navigation", active: !1, disabled: !0 }, "pkg_sps-woodland_tabs__version_8_19_0__hash_kz6kzzd"]] }), wn = je({ defaultClassName: "", variantClassNames: { active: { true: "pkg_sps-woodland_tabs__version_8_19_0__hash_kz6kzze", false: "pkg_sps-woodland_tabs__version_8_19_0__hash_kz6kzzf" }, disabled: { true: "pkg_sps-woodland_tabs__version_8_19_0__hash_kz6kzzg", false: "pkg_sps-woodland_tabs__version_8_19_0__hash_kz6kzzh" }, context: { navigation: "pkg_sps-woodland_tabs__version_8_19_0__hash_kz6kzzi", container: "pkg_sps-woodland_tabs__version_8_19_0__hash_kz6kzzj" } }, defaultVariants: {}, compoundVariants: [[{ context: "navigation", active: !0 }, "pkg_sps-woodland_tabs__version_8_19_0__hash_kz6kzzk"]] });
|
2107
|
+
function Bt({
|
2095
2108
|
context: t,
|
2096
2109
|
item: e,
|
2097
2110
|
state: r,
|
2098
2111
|
...n
|
2099
2112
|
}) {
|
2100
|
-
const { key: i } = e, o = N.useRef(null), { tabProps: s } =
|
2101
|
-
className:
|
2113
|
+
const { key: i } = e, o = N.useRef(null), { tabProps: s } = yn({ key: i }, r, o), c = r.selectedKey === i, f = r.disabledKeys.has(i), v = Xt(e.rendered, (y) => y.type.displayName === "SpsTag" || ue.isWoodlandComponent(y.type) && ue.get(y.type).name === "Tag" ? [{
|
2114
|
+
className: pt(y.props.className, wn({ active: c, disabled: f, context: t }))
|
2102
2115
|
}] : [{}]);
|
2103
2116
|
return /* @__PURE__ */ N.createElement(
|
2104
2117
|
"div",
|
2105
2118
|
{
|
2106
2119
|
...s,
|
2107
2120
|
ref: o,
|
2108
|
-
className:
|
2121
|
+
className: Sn({ active: c, disabled: f, context: t }),
|
2109
2122
|
...n
|
2110
2123
|
},
|
2111
2124
|
v
|
2112
2125
|
);
|
2113
2126
|
}
|
2114
|
-
|
2115
|
-
function
|
2127
|
+
ue.set(Bt, { name: "Tab" });
|
2128
|
+
function Rt({
|
2116
2129
|
context: t,
|
2117
2130
|
"data-testid": e,
|
2118
2131
|
state: r,
|
2119
2132
|
...n
|
2120
2133
|
}) {
|
2121
|
-
const i = N.useRef(null), { tabPanelProps: o } =
|
2134
|
+
const i = N.useRef(null), { tabPanelProps: o } = gn(n, r, i), s = t === "container" ? Yt : "div";
|
2122
2135
|
return /* @__PURE__ */ N.createElement(
|
2123
2136
|
s,
|
2124
2137
|
{
|
@@ -2129,55 +2142,55 @@ function zt({
|
|
2129
2142
|
r.selectedItem ? r.selectedItem.props.children : null
|
2130
2143
|
);
|
2131
2144
|
}
|
2132
|
-
|
2133
|
-
var
|
2134
|
-
function
|
2145
|
+
ue.set(Rt, { name: "TabPanel" });
|
2146
|
+
var Tn = je({ defaultClassName: "pkg_sps-woodland_tabs__version_8_19_0__hash_fy26er0", variantClassNames: { context: { container: "pkg_sps-woodland_tabs__version_8_19_0__hash_fy26er1", navigation: "pkg_sps-woodland_tabs__version_8_19_0__hash_fy26er2" } }, defaultVariants: {}, compoundVariants: [] });
|
2147
|
+
function Ut({
|
2135
2148
|
className: t,
|
2136
2149
|
context: e = "navigation",
|
2137
2150
|
"data-testid": r,
|
2138
2151
|
...n
|
2139
2152
|
}) {
|
2140
|
-
const i =
|
2153
|
+
const i = rr(n), o = N.useRef(null), { tabListProps: s } = $n(n, i, o), c = qt({ "data-testid": r });
|
2141
2154
|
return /* @__PURE__ */ N.createElement(N.Fragment, null, /* @__PURE__ */ N.createElement(
|
2142
2155
|
"div",
|
2143
2156
|
{
|
2144
2157
|
...s,
|
2145
2158
|
ref: o,
|
2146
|
-
className:
|
2159
|
+
className: pt(Tn({ context: e }), t),
|
2147
2160
|
"data-testid": r
|
2148
2161
|
},
|
2149
|
-
[...i.collection].map((
|
2150
|
-
|
2162
|
+
[...i.collection].map((f) => /* @__PURE__ */ N.createElement(
|
2163
|
+
Bt,
|
2151
2164
|
{
|
2152
|
-
key:
|
2153
|
-
item:
|
2165
|
+
key: f.key,
|
2166
|
+
item: f,
|
2154
2167
|
state: i,
|
2155
2168
|
context: e,
|
2156
|
-
...
|
2169
|
+
...c(`tab-${String(f.key)}`)
|
2157
2170
|
}
|
2158
2171
|
))
|
2159
2172
|
), /* @__PURE__ */ N.createElement(
|
2160
|
-
|
2173
|
+
Rt,
|
2161
2174
|
{
|
2162
2175
|
key: i.selectedItem ? i.selectedItem.key : null,
|
2163
2176
|
state: i,
|
2164
2177
|
context: e,
|
2165
|
-
...
|
2178
|
+
...c("tab-panel")
|
2166
2179
|
}
|
2167
2180
|
));
|
2168
2181
|
}
|
2169
|
-
|
2170
|
-
const
|
2171
|
-
components: [
|
2182
|
+
ue.set(Ut, { name: "Tabs" });
|
2183
|
+
const Pn = {
|
2184
|
+
components: [Ut],
|
2172
2185
|
examples: {
|
2173
2186
|
basic: {
|
2174
2187
|
label: "Basic Navigation Tabs",
|
2175
|
-
description:
|
2188
|
+
description: Ge`
|
2176
2189
|
<p>Navigation tabs</p>
|
2177
2190
|
`,
|
2178
2191
|
examples: {
|
2179
2192
|
basic: {
|
2180
|
-
react:
|
2193
|
+
react: Ge`
|
2181
2194
|
import { Item } from "@react-stately/collections";
|
2182
2195
|
import { Box, Icon } from "@sps-woodland/core";
|
2183
2196
|
import { Tabs } from "@sps-woodland/tabs";
|
@@ -2243,10 +2256,10 @@ const wn = {
|
|
2243
2256
|
}
|
2244
2257
|
}
|
2245
2258
|
}
|
2246
|
-
},
|
2247
|
-
"Tabbed Navigation":
|
2259
|
+
}, Mn = {
|
2260
|
+
"Tabbed Navigation": Pn
|
2248
2261
|
};
|
2249
2262
|
export {
|
2250
|
-
|
2251
|
-
|
2263
|
+
Mn as MANIFEST,
|
2264
|
+
Ut as Tabs
|
2252
2265
|
};
|