@react-aria/utils 3.23.2 → 3.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chain.main.js +26 -0
- package/dist/chain.main.js.map +1 -0
- package/dist/chain.mjs +21 -0
- package/dist/chain.module.js +21 -0
- package/dist/chain.module.js.map +1 -0
- package/dist/domHelpers.main.js +19 -0
- package/dist/domHelpers.main.js.map +1 -0
- package/dist/domHelpers.mjs +13 -0
- package/dist/domHelpers.module.js +13 -0
- package/dist/domHelpers.module.js.map +1 -0
- package/dist/filterDOMProps.main.js +45 -0
- package/dist/filterDOMProps.main.js.map +1 -0
- package/dist/filterDOMProps.mjs +40 -0
- package/dist/filterDOMProps.module.js +40 -0
- package/dist/filterDOMProps.module.js.map +1 -0
- package/dist/focusWithoutScrolling.main.js +72 -0
- package/dist/focusWithoutScrolling.main.js.map +1 -0
- package/dist/focusWithoutScrolling.mjs +67 -0
- package/dist/focusWithoutScrolling.module.js +67 -0
- package/dist/focusWithoutScrolling.module.js.map +1 -0
- package/dist/getOffset.main.js +24 -0
- package/dist/getOffset.main.js.map +1 -0
- package/dist/getOffset.mjs +19 -0
- package/dist/getOffset.module.js +19 -0
- package/dist/getOffset.module.js.map +1 -0
- package/dist/getScrollParent.main.js +28 -0
- package/dist/getScrollParent.main.js.map +1 -0
- package/dist/getScrollParent.mjs +23 -0
- package/dist/getScrollParent.module.js +23 -0
- package/dist/getScrollParent.module.js.map +1 -0
- package/dist/getScrollParents.main.js +30 -0
- package/dist/getScrollParents.main.js.map +1 -0
- package/dist/getScrollParents.mjs +25 -0
- package/dist/getScrollParents.module.js +25 -0
- package/dist/getScrollParents.module.js.map +1 -0
- package/dist/import.mjs +32 -1232
- package/dist/isScrollable.main.js +25 -0
- package/dist/isScrollable.main.js.map +1 -0
- package/dist/isScrollable.mjs +20 -0
- package/dist/isScrollable.module.js +20 -0
- package/dist/isScrollable.module.js.map +1 -0
- package/dist/isVirtualEvent.main.js +41 -0
- package/dist/isVirtualEvent.main.js.map +1 -0
- package/dist/isVirtualEvent.mjs +35 -0
- package/dist/isVirtualEvent.module.js +35 -0
- package/dist/isVirtualEvent.module.js.map +1 -0
- package/dist/main.js +80 -1282
- package/dist/main.js.map +1 -1
- package/dist/mergeProps.main.js +51 -0
- package/dist/mergeProps.main.js.map +1 -0
- package/dist/mergeProps.mjs +42 -0
- package/dist/mergeProps.module.js +42 -0
- package/dist/mergeProps.module.js.map +1 -0
- package/dist/mergeRefs.main.js +28 -0
- package/dist/mergeRefs.main.js.map +1 -0
- package/dist/mergeRefs.mjs +23 -0
- package/dist/mergeRefs.module.js +23 -0
- package/dist/mergeRefs.module.js.map +1 -0
- package/dist/module.js +32 -1232
- package/dist/module.js.map +1 -1
- package/dist/openLink.main.js +143 -0
- package/dist/openLink.main.js.map +1 -0
- package/dist/openLink.mjs +129 -0
- package/dist/openLink.module.js +129 -0
- package/dist/openLink.module.js.map +1 -0
- package/dist/platform.main.js +64 -0
- package/dist/platform.main.js.map +1 -0
- package/dist/platform.mjs +51 -0
- package/dist/platform.module.js +51 -0
- package/dist/platform.module.js.map +1 -0
- package/dist/runAfterTransition.main.js +82 -0
- package/dist/runAfterTransition.main.js.map +1 -0
- package/dist/runAfterTransition.mjs +77 -0
- package/dist/runAfterTransition.module.js +77 -0
- package/dist/runAfterTransition.module.js.map +1 -0
- package/dist/scrollIntoView.main.js +96 -0
- package/dist/scrollIntoView.main.js.map +1 -0
- package/dist/scrollIntoView.mjs +90 -0
- package/dist/scrollIntoView.module.js +90 -0
- package/dist/scrollIntoView.module.js.map +1 -0
- package/dist/types.d.ts +17 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/useDeepMemo.main.js +30 -0
- package/dist/useDeepMemo.main.js.map +1 -0
- package/dist/useDeepMemo.mjs +25 -0
- package/dist/useDeepMemo.module.js +25 -0
- package/dist/useDeepMemo.module.js.map +1 -0
- package/dist/useDescription.main.js +59 -0
- package/dist/useDescription.main.js.map +1 -0
- package/dist/useDescription.mjs +54 -0
- package/dist/useDescription.module.js +54 -0
- package/dist/useDescription.module.js.map +1 -0
- package/dist/useDrag1D.main.js +139 -0
- package/dist/useDrag1D.main.js.map +1 -0
- package/dist/useDrag1D.mjs +134 -0
- package/dist/useDrag1D.module.js +134 -0
- package/dist/useDrag1D.module.js.map +1 -0
- package/dist/useEffectEvent.main.js +37 -0
- package/dist/useEffectEvent.main.js.map +1 -0
- package/dist/useEffectEvent.mjs +32 -0
- package/dist/useEffectEvent.module.js +32 -0
- package/dist/useEffectEvent.module.js.map +1 -0
- package/dist/useEvent.main.js +42 -0
- package/dist/useEvent.main.js.map +1 -0
- package/dist/useEvent.mjs +37 -0
- package/dist/useEvent.module.js +37 -0
- package/dist/useEvent.module.js.map +1 -0
- package/dist/useFormReset.main.js +41 -0
- package/dist/useFormReset.main.js.map +1 -0
- package/dist/useFormReset.mjs +36 -0
- package/dist/useFormReset.module.js +36 -0
- package/dist/useFormReset.module.js.map +1 -0
- package/dist/useGlobalListeners.main.js +63 -0
- package/dist/useGlobalListeners.main.js.map +1 -0
- package/dist/useGlobalListeners.mjs +58 -0
- package/dist/useGlobalListeners.module.js +58 -0
- package/dist/useGlobalListeners.module.js.map +1 -0
- package/dist/useId.main.js +93 -0
- package/dist/useId.main.js.map +1 -0
- package/dist/useId.mjs +86 -0
- package/dist/useId.module.js +86 -0
- package/dist/useId.module.js.map +1 -0
- package/dist/useLabels.main.js +44 -0
- package/dist/useLabels.main.js.map +1 -0
- package/dist/useLabels.mjs +39 -0
- package/dist/useLabels.module.js +39 -0
- package/dist/useLabels.module.js.map +1 -0
- package/dist/useLayoutEffect.main.js +27 -0
- package/dist/useLayoutEffect.main.js.map +1 -0
- package/dist/useLayoutEffect.mjs +18 -0
- package/dist/useLayoutEffect.module.js +18 -0
- package/dist/useLayoutEffect.module.js.map +1 -0
- package/dist/useObjectRef.main.js +37 -0
- package/dist/useObjectRef.main.js.map +1 -0
- package/dist/useObjectRef.mjs +32 -0
- package/dist/useObjectRef.module.js +32 -0
- package/dist/useObjectRef.module.js.map +1 -0
- package/dist/useResizeObserver.main.js +40 -0
- package/dist/useResizeObserver.main.js.map +1 -0
- package/dist/useResizeObserver.mjs +35 -0
- package/dist/useResizeObserver.module.js +35 -0
- package/dist/useResizeObserver.module.js.map +1 -0
- package/dist/useSyncRef.main.js +32 -0
- package/dist/useSyncRef.main.js.map +1 -0
- package/dist/useSyncRef.mjs +27 -0
- package/dist/useSyncRef.module.js +27 -0
- package/dist/useSyncRef.module.js.map +1 -0
- package/dist/useUpdateEffect.main.js +38 -0
- package/dist/useUpdateEffect.main.js.map +1 -0
- package/dist/useUpdateEffect.mjs +33 -0
- package/dist/useUpdateEffect.module.js +33 -0
- package/dist/useUpdateEffect.module.js.map +1 -0
- package/dist/useValueEffect.main.js +58 -0
- package/dist/useValueEffect.main.js.map +1 -0
- package/dist/useValueEffect.mjs +53 -0
- package/dist/useValueEffect.module.js +53 -0
- package/dist/useValueEffect.module.js.map +1 -0
- package/dist/useViewportSize.main.js +56 -0
- package/dist/useViewportSize.main.js.map +1 -0
- package/dist/useViewportSize.mjs +51 -0
- package/dist/useViewportSize.module.js +51 -0
- package/dist/useViewportSize.module.js.map +1 -0
- package/package.json +5 -5
- package/src/filterDOMProps.ts +1 -0
- package/src/getScrollParent.ts +2 -10
- package/src/getScrollParents.ts +26 -0
- package/src/index.ts +4 -2
- package/src/isScrollable.ts +22 -0
- package/src/mergeRefs.ts +2 -2
- package/src/openLink.tsx +25 -9
- package/src/scrollIntoView.ts +3 -5
package/dist/main.js
CHANGED
|
@@ -1,807 +1,92 @@
|
|
|
1
|
+
var $8c61827343eed941$exports = require("./useId.main.js");
|
|
2
|
+
var $1e2191638e54f613$exports = require("./chain.main.js");
|
|
3
|
+
var $aaa611146751592e$exports = require("./domHelpers.main.js");
|
|
4
|
+
var $f847cd1382ea7cd4$exports = require("./mergeProps.main.js");
|
|
5
|
+
var $f05dc24eafaeb7e2$exports = require("./mergeRefs.main.js");
|
|
6
|
+
var $8d15d0e1797d4238$exports = require("./filterDOMProps.main.js");
|
|
7
|
+
var $1117b6c0d4c4c164$exports = require("./focusWithoutScrolling.main.js");
|
|
8
|
+
var $16ec41ef3e36c19c$exports = require("./getOffset.main.js");
|
|
9
|
+
var $4068a0fae83b6d84$exports = require("./openLink.main.js");
|
|
10
|
+
var $e8117ebcab55be6a$exports = require("./runAfterTransition.main.js");
|
|
11
|
+
var $28ed3fb20343b78b$exports = require("./useDrag1D.main.js");
|
|
12
|
+
var $4571ff54ac709100$exports = require("./useGlobalListeners.main.js");
|
|
13
|
+
var $6ec78bde395c477d$exports = require("./useLabels.main.js");
|
|
14
|
+
var $475b35fe72ba49b3$exports = require("./useObjectRef.main.js");
|
|
15
|
+
var $29293a6f5c75b37e$exports = require("./useUpdateEffect.main.js");
|
|
16
|
+
var $78605a5d7424e31b$exports = require("./useLayoutEffect.main.js");
|
|
17
|
+
var $37733e1652f47193$exports = require("./useResizeObserver.main.js");
|
|
18
|
+
var $6fc733991a9f977c$exports = require("./useSyncRef.main.js");
|
|
19
|
+
var $d796e7157ac96470$exports = require("./getScrollParent.main.js");
|
|
20
|
+
var $49f0d9486c2408aa$exports = require("./getScrollParents.main.js");
|
|
21
|
+
var $9a54e9cd5db23b5d$exports = require("./isScrollable.main.js");
|
|
22
|
+
var $8b24bab62f5c65ad$exports = require("./useViewportSize.main.js");
|
|
23
|
+
var $34da4502ea8120db$exports = require("./useDescription.main.js");
|
|
24
|
+
var $9e20cff0af27e8cc$exports = require("./platform.main.js");
|
|
25
|
+
var $2a8c0bb1629926c8$exports = require("./useEvent.main.js");
|
|
26
|
+
var $19a2307bfabafaf1$exports = require("./useValueEffect.main.js");
|
|
27
|
+
var $449412113267a1fe$exports = require("./scrollIntoView.main.js");
|
|
28
|
+
var $577e795361f19be9$exports = require("./isVirtualEvent.main.js");
|
|
29
|
+
var $1254e5bb94ac8761$exports = require("./useEffectEvent.main.js");
|
|
30
|
+
var $20e6e72fbf5dc81e$exports = require("./useDeepMemo.main.js");
|
|
31
|
+
var $1f205e845604a423$exports = require("./useFormReset.main.js");
|
|
1
32
|
var $1Yh1N$reactstatelyutils = require("@react-stately/utils");
|
|
2
|
-
var $1Yh1N$react = require("react");
|
|
3
|
-
var $1Yh1N$reactariassr = require("@react-aria/ssr");
|
|
4
|
-
var $1Yh1N$clsx = require("clsx");
|
|
5
33
|
|
|
6
34
|
|
|
7
35
|
function $parcel$export(e, n, v, s) {
|
|
8
36
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
9
37
|
}
|
|
10
38
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
$parcel$export(module.exports, "
|
|
16
|
-
$parcel$export(module.exports, "
|
|
17
|
-
$parcel$export(module.exports, "
|
|
18
|
-
$parcel$export(module.exports, "
|
|
19
|
-
$parcel$export(module.exports, "
|
|
20
|
-
$parcel$export(module.exports, "
|
|
21
|
-
$parcel$export(module.exports, "
|
|
22
|
-
$parcel$export(module.exports, "
|
|
23
|
-
$parcel$export(module.exports, "
|
|
24
|
-
$parcel$export(module.exports, "
|
|
25
|
-
$parcel$export(module.exports, "
|
|
26
|
-
$parcel$export(module.exports, "
|
|
27
|
-
$parcel$export(module.exports, "
|
|
28
|
-
$parcel$export(module.exports, "
|
|
29
|
-
$parcel$export(module.exports, "
|
|
30
|
-
$parcel$export(module.exports, "
|
|
31
|
-
$parcel$export(module.exports, "
|
|
32
|
-
$parcel$export(module.exports, "
|
|
33
|
-
$parcel$export(module.exports, "
|
|
34
|
-
$parcel$export(module.exports, "
|
|
35
|
-
$parcel$export(module.exports, "
|
|
36
|
-
$parcel$export(module.exports, "
|
|
37
|
-
$parcel$export(module.exports, "
|
|
38
|
-
$parcel$export(module.exports, "
|
|
39
|
-
$parcel$export(module.exports, "
|
|
40
|
-
$parcel$export(module.exports, "
|
|
41
|
-
$parcel$export(module.exports, "
|
|
42
|
-
$parcel$export(module.exports, "
|
|
43
|
-
$parcel$export(module.exports, "
|
|
44
|
-
$parcel$export(module.exports, "
|
|
45
|
-
$parcel$export(module.exports, "
|
|
46
|
-
$parcel$export(module.exports, "
|
|
47
|
-
$parcel$export(module.exports, "
|
|
48
|
-
$parcel$export(module.exports, "
|
|
49
|
-
$parcel$export(module.exports, "
|
|
50
|
-
$parcel$export(module.exports, "
|
|
51
|
-
$parcel$export(module.exports, "
|
|
52
|
-
$parcel$export(module.exports, "
|
|
53
|
-
$parcel$export(module.exports, "
|
|
54
|
-
$parcel$export(module.exports, "
|
|
55
|
-
$parcel$export(module.exports, "scrollIntoView", () => $449412113267a1fe$export$53a0910f038337bd);
|
|
56
|
-
$parcel$export(module.exports, "scrollIntoViewport", () => $449412113267a1fe$export$c826860796309d1b);
|
|
39
|
+
$parcel$export(module.exports, "useId", () => $8c61827343eed941$exports.useId);
|
|
40
|
+
$parcel$export(module.exports, "mergeIds", () => $8c61827343eed941$exports.mergeIds);
|
|
41
|
+
$parcel$export(module.exports, "useSlotId", () => $8c61827343eed941$exports.useSlotId);
|
|
42
|
+
$parcel$export(module.exports, "chain", () => $1e2191638e54f613$exports.chain);
|
|
43
|
+
$parcel$export(module.exports, "getOwnerDocument", () => $aaa611146751592e$exports.getOwnerDocument);
|
|
44
|
+
$parcel$export(module.exports, "getOwnerWindow", () => $aaa611146751592e$exports.getOwnerWindow);
|
|
45
|
+
$parcel$export(module.exports, "mergeProps", () => $f847cd1382ea7cd4$exports.mergeProps);
|
|
46
|
+
$parcel$export(module.exports, "mergeRefs", () => $f05dc24eafaeb7e2$exports.mergeRefs);
|
|
47
|
+
$parcel$export(module.exports, "filterDOMProps", () => $8d15d0e1797d4238$exports.filterDOMProps);
|
|
48
|
+
$parcel$export(module.exports, "focusWithoutScrolling", () => $1117b6c0d4c4c164$exports.focusWithoutScrolling);
|
|
49
|
+
$parcel$export(module.exports, "getOffset", () => $16ec41ef3e36c19c$exports.getOffset);
|
|
50
|
+
$parcel$export(module.exports, "openLink", () => $4068a0fae83b6d84$exports.openLink);
|
|
51
|
+
$parcel$export(module.exports, "getSyntheticLinkProps", () => $4068a0fae83b6d84$exports.getSyntheticLinkProps);
|
|
52
|
+
$parcel$export(module.exports, "RouterProvider", () => $4068a0fae83b6d84$exports.RouterProvider);
|
|
53
|
+
$parcel$export(module.exports, "shouldClientNavigate", () => $4068a0fae83b6d84$exports.shouldClientNavigate);
|
|
54
|
+
$parcel$export(module.exports, "useRouter", () => $4068a0fae83b6d84$exports.useRouter);
|
|
55
|
+
$parcel$export(module.exports, "useLinkProps", () => $4068a0fae83b6d84$exports.useLinkProps);
|
|
56
|
+
$parcel$export(module.exports, "runAfterTransition", () => $e8117ebcab55be6a$exports.runAfterTransition);
|
|
57
|
+
$parcel$export(module.exports, "useDrag1D", () => $28ed3fb20343b78b$exports.useDrag1D);
|
|
58
|
+
$parcel$export(module.exports, "useGlobalListeners", () => $4571ff54ac709100$exports.useGlobalListeners);
|
|
59
|
+
$parcel$export(module.exports, "useLabels", () => $6ec78bde395c477d$exports.useLabels);
|
|
60
|
+
$parcel$export(module.exports, "useObjectRef", () => $475b35fe72ba49b3$exports.useObjectRef);
|
|
61
|
+
$parcel$export(module.exports, "useUpdateEffect", () => $29293a6f5c75b37e$exports.useUpdateEffect);
|
|
62
|
+
$parcel$export(module.exports, "useLayoutEffect", () => $78605a5d7424e31b$exports.useLayoutEffect);
|
|
63
|
+
$parcel$export(module.exports, "useResizeObserver", () => $37733e1652f47193$exports.useResizeObserver);
|
|
64
|
+
$parcel$export(module.exports, "useSyncRef", () => $6fc733991a9f977c$exports.useSyncRef);
|
|
65
|
+
$parcel$export(module.exports, "getScrollParent", () => $d796e7157ac96470$exports.getScrollParent);
|
|
66
|
+
$parcel$export(module.exports, "getScrollParents", () => $49f0d9486c2408aa$exports.getScrollParents);
|
|
67
|
+
$parcel$export(module.exports, "isScrollable", () => $9a54e9cd5db23b5d$exports.isScrollable);
|
|
68
|
+
$parcel$export(module.exports, "useViewportSize", () => $8b24bab62f5c65ad$exports.useViewportSize);
|
|
69
|
+
$parcel$export(module.exports, "useDescription", () => $34da4502ea8120db$exports.useDescription);
|
|
70
|
+
$parcel$export(module.exports, "isMac", () => $9e20cff0af27e8cc$exports.isMac);
|
|
71
|
+
$parcel$export(module.exports, "isIPhone", () => $9e20cff0af27e8cc$exports.isIPhone);
|
|
72
|
+
$parcel$export(module.exports, "isIPad", () => $9e20cff0af27e8cc$exports.isIPad);
|
|
73
|
+
$parcel$export(module.exports, "isIOS", () => $9e20cff0af27e8cc$exports.isIOS);
|
|
74
|
+
$parcel$export(module.exports, "isAppleDevice", () => $9e20cff0af27e8cc$exports.isAppleDevice);
|
|
75
|
+
$parcel$export(module.exports, "isWebKit", () => $9e20cff0af27e8cc$exports.isWebKit);
|
|
76
|
+
$parcel$export(module.exports, "isChrome", () => $9e20cff0af27e8cc$exports.isChrome);
|
|
77
|
+
$parcel$export(module.exports, "isAndroid", () => $9e20cff0af27e8cc$exports.isAndroid);
|
|
78
|
+
$parcel$export(module.exports, "isFirefox", () => $9e20cff0af27e8cc$exports.isFirefox);
|
|
79
|
+
$parcel$export(module.exports, "useEvent", () => $2a8c0bb1629926c8$exports.useEvent);
|
|
80
|
+
$parcel$export(module.exports, "useValueEffect", () => $19a2307bfabafaf1$exports.useValueEffect);
|
|
81
|
+
$parcel$export(module.exports, "scrollIntoView", () => $449412113267a1fe$exports.scrollIntoView);
|
|
82
|
+
$parcel$export(module.exports, "scrollIntoViewport", () => $449412113267a1fe$exports.scrollIntoViewport);
|
|
57
83
|
$parcel$export(module.exports, "clamp", () => $1Yh1N$reactstatelyutils.clamp);
|
|
58
84
|
$parcel$export(module.exports, "snapValueToStep", () => $1Yh1N$reactstatelyutils.snapValueToStep);
|
|
59
|
-
$parcel$export(module.exports, "isVirtualClick", () => $577e795361f19be9$
|
|
60
|
-
$parcel$export(module.exports, "isVirtualPointerEvent", () => $577e795361f19be9$
|
|
61
|
-
$parcel$export(module.exports, "useEffectEvent", () => $1254e5bb94ac8761$
|
|
62
|
-
$parcel$export(module.exports, "useDeepMemo", () => $20e6e72fbf5dc81e$
|
|
63
|
-
$parcel$export(module.exports, "useFormReset", () => $1f205e845604a423$
|
|
64
|
-
/*
|
|
65
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
66
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
67
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
68
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
69
|
-
*
|
|
70
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
71
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
72
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
73
|
-
* governing permissions and limitations under the License.
|
|
74
|
-
*/ /*
|
|
75
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
76
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
77
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
78
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
79
|
-
*
|
|
80
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
81
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
82
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
83
|
-
* governing permissions and limitations under the License.
|
|
84
|
-
*/
|
|
85
|
-
/*
|
|
86
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
87
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
88
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
89
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
90
|
-
*
|
|
91
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
92
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
93
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
94
|
-
* governing permissions and limitations under the License.
|
|
95
|
-
*/
|
|
96
|
-
const $78605a5d7424e31b$export$e5c5a5f917a5871c = typeof document !== "undefined" ? (0, ($parcel$interopDefault($1Yh1N$react))).useLayoutEffect : ()=>{};
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
/*
|
|
101
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
102
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
103
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
104
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
105
|
-
*
|
|
106
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
107
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
108
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
109
|
-
* governing permissions and limitations under the License.
|
|
110
|
-
*/
|
|
111
|
-
/*
|
|
112
|
-
* Copyright 2023 Adobe. All rights reserved.
|
|
113
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
114
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
115
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
116
|
-
*
|
|
117
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
118
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
119
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
120
|
-
* governing permissions and limitations under the License.
|
|
121
|
-
*/
|
|
122
|
-
|
|
123
|
-
function $1254e5bb94ac8761$export$7f54fc3180508a52(fn) {
|
|
124
|
-
const ref = (0, $1Yh1N$react.useRef)(null);
|
|
125
|
-
(0, $78605a5d7424e31b$export$e5c5a5f917a5871c)(()=>{
|
|
126
|
-
ref.current = fn;
|
|
127
|
-
}, [
|
|
128
|
-
fn
|
|
129
|
-
]);
|
|
130
|
-
// @ts-ignore
|
|
131
|
-
return (0, $1Yh1N$react.useCallback)((...args)=>{
|
|
132
|
-
const f = ref.current;
|
|
133
|
-
return f === null || f === void 0 ? void 0 : f(...args);
|
|
134
|
-
}, []);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
function $19a2307bfabafaf1$export$14d238f342723f25(defaultValue) {
|
|
139
|
-
let [value, setValue] = (0, $1Yh1N$react.useState)(defaultValue);
|
|
140
|
-
let effect = (0, $1Yh1N$react.useRef)(null);
|
|
141
|
-
// Store the function in a ref so we can always access the current version
|
|
142
|
-
// which has the proper `value` in scope.
|
|
143
|
-
let nextRef = (0, $1254e5bb94ac8761$export$7f54fc3180508a52)(()=>{
|
|
144
|
-
if (!effect.current) return;
|
|
145
|
-
// Run the generator to the next yield.
|
|
146
|
-
let newValue = effect.current.next();
|
|
147
|
-
// If the generator is done, reset the effect.
|
|
148
|
-
if (newValue.done) {
|
|
149
|
-
effect.current = null;
|
|
150
|
-
return;
|
|
151
|
-
}
|
|
152
|
-
// If the value is the same as the current value,
|
|
153
|
-
// then continue to the next yield. Otherwise,
|
|
154
|
-
// set the value in state and wait for the next layout effect.
|
|
155
|
-
if (value === newValue.value) nextRef();
|
|
156
|
-
else setValue(newValue.value);
|
|
157
|
-
});
|
|
158
|
-
(0, $78605a5d7424e31b$export$e5c5a5f917a5871c)(()=>{
|
|
159
|
-
// If there is an effect currently running, continue to the next yield.
|
|
160
|
-
if (effect.current) nextRef();
|
|
161
|
-
});
|
|
162
|
-
let queue = (0, $1254e5bb94ac8761$export$7f54fc3180508a52)((fn)=>{
|
|
163
|
-
effect.current = fn(value);
|
|
164
|
-
nextRef();
|
|
165
|
-
});
|
|
166
|
-
return [
|
|
167
|
-
value,
|
|
168
|
-
queue
|
|
169
|
-
];
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
// copied from SSRProvider.tsx to reduce exports, if needed again, consider sharing
|
|
174
|
-
let $8c61827343eed941$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
175
|
-
let $8c61827343eed941$var$idsUpdaterMap = new Map();
|
|
176
|
-
function $8c61827343eed941$export$f680877a34711e37(defaultId) {
|
|
177
|
-
let [value, setValue] = (0, $1Yh1N$react.useState)(defaultId);
|
|
178
|
-
let nextId = (0, $1Yh1N$react.useRef)(null);
|
|
179
|
-
let res = (0, $1Yh1N$reactariassr.useSSRSafeId)(value);
|
|
180
|
-
let updateValue = (0, $1Yh1N$react.useCallback)((val)=>{
|
|
181
|
-
nextId.current = val;
|
|
182
|
-
}, []);
|
|
183
|
-
if ($8c61827343eed941$var$canUseDOM) $8c61827343eed941$var$idsUpdaterMap.set(res, updateValue);
|
|
184
|
-
(0, $78605a5d7424e31b$export$e5c5a5f917a5871c)(()=>{
|
|
185
|
-
let r = res;
|
|
186
|
-
return ()=>{
|
|
187
|
-
$8c61827343eed941$var$idsUpdaterMap.delete(r);
|
|
188
|
-
};
|
|
189
|
-
}, [
|
|
190
|
-
res
|
|
191
|
-
]);
|
|
192
|
-
// This cannot cause an infinite loop because the ref is updated first.
|
|
193
|
-
// eslint-disable-next-line
|
|
194
|
-
(0, $1Yh1N$react.useEffect)(()=>{
|
|
195
|
-
let newId = nextId.current;
|
|
196
|
-
if (newId) {
|
|
197
|
-
nextId.current = null;
|
|
198
|
-
setValue(newId);
|
|
199
|
-
}
|
|
200
|
-
});
|
|
201
|
-
return res;
|
|
202
|
-
}
|
|
203
|
-
function $8c61827343eed941$export$cd8c9cb68f842629(idA, idB) {
|
|
204
|
-
if (idA === idB) return idA;
|
|
205
|
-
let setIdA = $8c61827343eed941$var$idsUpdaterMap.get(idA);
|
|
206
|
-
if (setIdA) {
|
|
207
|
-
setIdA(idB);
|
|
208
|
-
return idB;
|
|
209
|
-
}
|
|
210
|
-
let setIdB = $8c61827343eed941$var$idsUpdaterMap.get(idB);
|
|
211
|
-
if (setIdB) {
|
|
212
|
-
setIdB(idA);
|
|
213
|
-
return idA;
|
|
214
|
-
}
|
|
215
|
-
return idB;
|
|
216
|
-
}
|
|
217
|
-
function $8c61827343eed941$export$b4cc09c592e8fdb8(depArray = []) {
|
|
218
|
-
let id = $8c61827343eed941$export$f680877a34711e37();
|
|
219
|
-
let [resolvedId, setResolvedId] = (0, $19a2307bfabafaf1$export$14d238f342723f25)(id);
|
|
220
|
-
let updateId = (0, $1Yh1N$react.useCallback)(()=>{
|
|
221
|
-
setResolvedId(function*() {
|
|
222
|
-
yield id;
|
|
223
|
-
yield document.getElementById(id) ? id : undefined;
|
|
224
|
-
});
|
|
225
|
-
}, [
|
|
226
|
-
id,
|
|
227
|
-
setResolvedId
|
|
228
|
-
]);
|
|
229
|
-
(0, $78605a5d7424e31b$export$e5c5a5f917a5871c)(updateId, [
|
|
230
|
-
id,
|
|
231
|
-
updateId,
|
|
232
|
-
...depArray
|
|
233
|
-
]);
|
|
234
|
-
return resolvedId;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
/*
|
|
239
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
240
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
241
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
242
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
243
|
-
*
|
|
244
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
245
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
246
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
247
|
-
* governing permissions and limitations under the License.
|
|
248
|
-
*/ /**
|
|
249
|
-
* Calls all functions in the order they were chained with the same arguments.
|
|
250
|
-
*/ function $1e2191638e54f613$export$e08e3b67e392101e(...callbacks) {
|
|
251
|
-
return (...args)=>{
|
|
252
|
-
for (let callback of callbacks)if (typeof callback === "function") callback(...args);
|
|
253
|
-
};
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
const $aaa611146751592e$export$b204af158042fbac = (el)=>{
|
|
258
|
-
var _el_ownerDocument;
|
|
259
|
-
return (_el_ownerDocument = el === null || el === void 0 ? void 0 : el.ownerDocument) !== null && _el_ownerDocument !== void 0 ? _el_ownerDocument : document;
|
|
260
|
-
};
|
|
261
|
-
const $aaa611146751592e$export$f21a1ffae260145a = (el)=>{
|
|
262
|
-
if (el && "window" in el && el.window === el) return el;
|
|
263
|
-
const doc = $aaa611146751592e$export$b204af158042fbac(el);
|
|
264
|
-
return doc.defaultView || window;
|
|
265
|
-
};
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
/*
|
|
269
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
270
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
271
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
272
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
273
|
-
*
|
|
274
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
275
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
276
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
277
|
-
* governing permissions and limitations under the License.
|
|
278
|
-
*/
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
function $f847cd1382ea7cd4$export$9d1611c77c2fe928(...args) {
|
|
282
|
-
// Start with a base clone of the first argument. This is a lot faster than starting
|
|
283
|
-
// with an empty object and adding properties as we go.
|
|
284
|
-
let result = {
|
|
285
|
-
...args[0]
|
|
286
|
-
};
|
|
287
|
-
for(let i = 1; i < args.length; i++){
|
|
288
|
-
let props = args[i];
|
|
289
|
-
for(let key in props){
|
|
290
|
-
let a = result[key];
|
|
291
|
-
let b = props[key];
|
|
292
|
-
// Chain events
|
|
293
|
-
if (typeof a === "function" && typeof b === "function" && // This is a lot faster than a regex.
|
|
294
|
-
key[0] === "o" && key[1] === "n" && key.charCodeAt(2) >= /* 'A' */ 65 && key.charCodeAt(2) <= /* 'Z' */ 90) result[key] = (0, $1e2191638e54f613$export$e08e3b67e392101e)(a, b);
|
|
295
|
-
else if ((key === "className" || key === "UNSAFE_className") && typeof a === "string" && typeof b === "string") result[key] = (0, ($parcel$interopDefault($1Yh1N$clsx)))(a, b);
|
|
296
|
-
else if (key === "id" && a && b) result.id = (0, $8c61827343eed941$export$cd8c9cb68f842629)(a, b);
|
|
297
|
-
else result[key] = b !== undefined ? b : a;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
return result;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
/*
|
|
305
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
306
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
307
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
308
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
309
|
-
*
|
|
310
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
311
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
312
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
313
|
-
* governing permissions and limitations under the License.
|
|
314
|
-
*/ function $f05dc24eafaeb7e2$export$c9058316764c140e(...refs) {
|
|
315
|
-
if (refs.length === 1) return refs[0];
|
|
316
|
-
return (value)=>{
|
|
317
|
-
for (let ref of refs){
|
|
318
|
-
if (typeof ref === "function") ref(value);
|
|
319
|
-
else if (ref != null) ref.current = value;
|
|
320
|
-
}
|
|
321
|
-
};
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
/*
|
|
326
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
327
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
328
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
329
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
330
|
-
*
|
|
331
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
332
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
333
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
334
|
-
* governing permissions and limitations under the License.
|
|
335
|
-
*/ const $8d15d0e1797d4238$var$DOMPropNames = new Set([
|
|
336
|
-
"id"
|
|
337
|
-
]);
|
|
338
|
-
const $8d15d0e1797d4238$var$labelablePropNames = new Set([
|
|
339
|
-
"aria-label",
|
|
340
|
-
"aria-labelledby",
|
|
341
|
-
"aria-describedby",
|
|
342
|
-
"aria-details"
|
|
343
|
-
]);
|
|
344
|
-
// See LinkDOMProps in dom.d.ts.
|
|
345
|
-
const $8d15d0e1797d4238$var$linkPropNames = new Set([
|
|
346
|
-
"href",
|
|
347
|
-
"target",
|
|
348
|
-
"rel",
|
|
349
|
-
"download",
|
|
350
|
-
"ping",
|
|
351
|
-
"referrerPolicy"
|
|
352
|
-
]);
|
|
353
|
-
const $8d15d0e1797d4238$var$propRe = /^(data-.*)$/;
|
|
354
|
-
function $8d15d0e1797d4238$export$457c3d6518dd4c6f(props, opts = {}) {
|
|
355
|
-
let { labelable: labelable, isLink: isLink, propNames: propNames } = opts;
|
|
356
|
-
let filteredProps = {};
|
|
357
|
-
for(const prop in props)if (Object.prototype.hasOwnProperty.call(props, prop) && ($8d15d0e1797d4238$var$DOMPropNames.has(prop) || labelable && $8d15d0e1797d4238$var$labelablePropNames.has(prop) || isLink && $8d15d0e1797d4238$var$linkPropNames.has(prop) || (propNames === null || propNames === void 0 ? void 0 : propNames.has(prop)) || $8d15d0e1797d4238$var$propRe.test(prop))) filteredProps[prop] = props[prop];
|
|
358
|
-
return filteredProps;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
/*
|
|
363
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
364
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
365
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
366
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
367
|
-
*
|
|
368
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
369
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
370
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
371
|
-
* governing permissions and limitations under the License.
|
|
372
|
-
*/ function $1117b6c0d4c4c164$export$de79e2c695e052f3(element) {
|
|
373
|
-
if ($1117b6c0d4c4c164$var$supportsPreventScroll()) element.focus({
|
|
374
|
-
preventScroll: true
|
|
375
|
-
});
|
|
376
|
-
else {
|
|
377
|
-
let scrollableElements = $1117b6c0d4c4c164$var$getScrollableElements(element);
|
|
378
|
-
element.focus();
|
|
379
|
-
$1117b6c0d4c4c164$var$restoreScrollPosition(scrollableElements);
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
let $1117b6c0d4c4c164$var$supportsPreventScrollCached = null;
|
|
383
|
-
function $1117b6c0d4c4c164$var$supportsPreventScroll() {
|
|
384
|
-
if ($1117b6c0d4c4c164$var$supportsPreventScrollCached == null) {
|
|
385
|
-
$1117b6c0d4c4c164$var$supportsPreventScrollCached = false;
|
|
386
|
-
try {
|
|
387
|
-
let focusElem = document.createElement("div");
|
|
388
|
-
focusElem.focus({
|
|
389
|
-
get preventScroll () {
|
|
390
|
-
$1117b6c0d4c4c164$var$supportsPreventScrollCached = true;
|
|
391
|
-
return true;
|
|
392
|
-
}
|
|
393
|
-
});
|
|
394
|
-
} catch (e) {
|
|
395
|
-
// Ignore
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
return $1117b6c0d4c4c164$var$supportsPreventScrollCached;
|
|
399
|
-
}
|
|
400
|
-
function $1117b6c0d4c4c164$var$getScrollableElements(element) {
|
|
401
|
-
let parent = element.parentNode;
|
|
402
|
-
let scrollableElements = [];
|
|
403
|
-
let rootScrollingElement = document.scrollingElement || document.documentElement;
|
|
404
|
-
while(parent instanceof HTMLElement && parent !== rootScrollingElement){
|
|
405
|
-
if (parent.offsetHeight < parent.scrollHeight || parent.offsetWidth < parent.scrollWidth) scrollableElements.push({
|
|
406
|
-
element: parent,
|
|
407
|
-
scrollTop: parent.scrollTop,
|
|
408
|
-
scrollLeft: parent.scrollLeft
|
|
409
|
-
});
|
|
410
|
-
parent = parent.parentNode;
|
|
411
|
-
}
|
|
412
|
-
if (rootScrollingElement instanceof HTMLElement) scrollableElements.push({
|
|
413
|
-
element: rootScrollingElement,
|
|
414
|
-
scrollTop: rootScrollingElement.scrollTop,
|
|
415
|
-
scrollLeft: rootScrollingElement.scrollLeft
|
|
416
|
-
});
|
|
417
|
-
return scrollableElements;
|
|
418
|
-
}
|
|
419
|
-
function $1117b6c0d4c4c164$var$restoreScrollPosition(scrollableElements) {
|
|
420
|
-
for (let { element: element, scrollTop: scrollTop, scrollLeft: scrollLeft } of scrollableElements){
|
|
421
|
-
element.scrollTop = scrollTop;
|
|
422
|
-
element.scrollLeft = scrollLeft;
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
/*
|
|
428
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
429
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
430
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
431
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
432
|
-
*
|
|
433
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
434
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
435
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
436
|
-
* governing permissions and limitations under the License.
|
|
437
|
-
*/ function $16ec41ef3e36c19c$export$622cea445a1c5b7d(element, reverse, orientation = "horizontal") {
|
|
438
|
-
let rect = element.getBoundingClientRect();
|
|
439
|
-
if (reverse) return orientation === "horizontal" ? rect.right : rect.bottom;
|
|
440
|
-
return orientation === "horizontal" ? rect.left : rect.top;
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
/*
|
|
445
|
-
* Copyright 2023 Adobe. All rights reserved.
|
|
446
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
447
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
448
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
449
|
-
*
|
|
450
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
451
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
452
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
453
|
-
* governing permissions and limitations under the License.
|
|
454
|
-
*/ /*
|
|
455
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
456
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
457
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
458
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
459
|
-
*
|
|
460
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
461
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
462
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
463
|
-
* governing permissions and limitations under the License.
|
|
464
|
-
*/ function $9e20cff0af27e8cc$var$testUserAgent(re) {
|
|
465
|
-
var _window_navigator_userAgentData;
|
|
466
|
-
if (typeof window === "undefined" || window.navigator == null) return false;
|
|
467
|
-
return ((_window_navigator_userAgentData = window.navigator["userAgentData"]) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.brands.some((brand)=>re.test(brand.brand))) || re.test(window.navigator.userAgent);
|
|
468
|
-
}
|
|
469
|
-
function $9e20cff0af27e8cc$var$testPlatform(re) {
|
|
470
|
-
var _window_navigator_userAgentData;
|
|
471
|
-
return typeof window !== "undefined" && window.navigator != null ? re.test(((_window_navigator_userAgentData = window.navigator["userAgentData"]) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.platform) || window.navigator.platform) : false;
|
|
472
|
-
}
|
|
473
|
-
function $9e20cff0af27e8cc$export$9ac100e40613ea10() {
|
|
474
|
-
return $9e20cff0af27e8cc$var$testPlatform(/^Mac/i);
|
|
475
|
-
}
|
|
476
|
-
function $9e20cff0af27e8cc$export$186c6964ca17d99() {
|
|
477
|
-
return $9e20cff0af27e8cc$var$testPlatform(/^iPhone/i);
|
|
478
|
-
}
|
|
479
|
-
function $9e20cff0af27e8cc$export$7bef049ce92e4224() {
|
|
480
|
-
return $9e20cff0af27e8cc$var$testPlatform(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
|
481
|
-
$9e20cff0af27e8cc$export$9ac100e40613ea10() && navigator.maxTouchPoints > 1;
|
|
482
|
-
}
|
|
483
|
-
function $9e20cff0af27e8cc$export$fedb369cb70207f1() {
|
|
484
|
-
return $9e20cff0af27e8cc$export$186c6964ca17d99() || $9e20cff0af27e8cc$export$7bef049ce92e4224();
|
|
485
|
-
}
|
|
486
|
-
function $9e20cff0af27e8cc$export$e1865c3bedcd822b() {
|
|
487
|
-
return $9e20cff0af27e8cc$export$9ac100e40613ea10() || $9e20cff0af27e8cc$export$fedb369cb70207f1();
|
|
488
|
-
}
|
|
489
|
-
function $9e20cff0af27e8cc$export$78551043582a6a98() {
|
|
490
|
-
return $9e20cff0af27e8cc$var$testUserAgent(/AppleWebKit/i) && !$9e20cff0af27e8cc$export$6446a186d09e379e();
|
|
491
|
-
}
|
|
492
|
-
function $9e20cff0af27e8cc$export$6446a186d09e379e() {
|
|
493
|
-
return $9e20cff0af27e8cc$var$testUserAgent(/Chrome/i);
|
|
494
|
-
}
|
|
495
|
-
function $9e20cff0af27e8cc$export$a11b0059900ceec8() {
|
|
496
|
-
return $9e20cff0af27e8cc$var$testUserAgent(/Android/i);
|
|
497
|
-
}
|
|
498
|
-
function $9e20cff0af27e8cc$export$b7d78993b74f766d() {
|
|
499
|
-
return $9e20cff0af27e8cc$var$testUserAgent(/Firefox/i);
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
const $4068a0fae83b6d84$var$RouterContext = /*#__PURE__*/ (0, $1Yh1N$react.createContext)({
|
|
506
|
-
isNative: true,
|
|
507
|
-
open: $4068a0fae83b6d84$var$openSyntheticLink
|
|
508
|
-
});
|
|
509
|
-
function $4068a0fae83b6d84$export$323e4fc2fa4753fb(props) {
|
|
510
|
-
let { children: children, navigate: navigate } = props;
|
|
511
|
-
let ctx = (0, $1Yh1N$react.useMemo)(()=>({
|
|
512
|
-
isNative: false,
|
|
513
|
-
open: (target, modifiers)=>{
|
|
514
|
-
$4068a0fae83b6d84$var$getSyntheticLink(target, (link)=>{
|
|
515
|
-
if ($4068a0fae83b6d84$export$efa8c9099e530235(link, modifiers)) navigate(link.pathname + link.search + link.hash);
|
|
516
|
-
else $4068a0fae83b6d84$export$95185d699e05d4d7(link, modifiers);
|
|
517
|
-
});
|
|
518
|
-
}
|
|
519
|
-
}), [
|
|
520
|
-
navigate
|
|
521
|
-
]);
|
|
522
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($1Yh1N$react))).createElement($4068a0fae83b6d84$var$RouterContext.Provider, {
|
|
523
|
-
value: ctx
|
|
524
|
-
}, children);
|
|
525
|
-
}
|
|
526
|
-
function $4068a0fae83b6d84$export$9a302a45f65d0572() {
|
|
527
|
-
return (0, $1Yh1N$react.useContext)($4068a0fae83b6d84$var$RouterContext);
|
|
528
|
-
}
|
|
529
|
-
function $4068a0fae83b6d84$export$efa8c9099e530235(link, modifiers) {
|
|
530
|
-
// Use getAttribute here instead of link.target. Firefox will default link.target to "_parent" when inside an iframe.
|
|
531
|
-
let target = link.getAttribute("target");
|
|
532
|
-
return (!target || target === "_self") && link.origin === location.origin && !link.hasAttribute("download") && !modifiers.metaKey && // open in new tab (mac)
|
|
533
|
-
!modifiers.ctrlKey && // open in new tab (windows)
|
|
534
|
-
!modifiers.altKey && // download
|
|
535
|
-
!modifiers.shiftKey;
|
|
536
|
-
}
|
|
537
|
-
function $4068a0fae83b6d84$export$95185d699e05d4d7(target, modifiers, setOpening = true) {
|
|
538
|
-
var _window_event_type, _window_event;
|
|
539
|
-
let { metaKey: metaKey, ctrlKey: ctrlKey, altKey: altKey, shiftKey: shiftKey } = modifiers;
|
|
540
|
-
// Firefox does not recognize keyboard events as a user action by default, and the popup blocker
|
|
541
|
-
// will prevent links with target="_blank" from opening. However, it does allow the event if the
|
|
542
|
-
// Command/Control key is held, which opens the link in a background tab. This seems like the best we can do.
|
|
543
|
-
// See https://bugzilla.mozilla.org/show_bug.cgi?id=257870 and https://bugzilla.mozilla.org/show_bug.cgi?id=746640.
|
|
544
|
-
if ((0, $9e20cff0af27e8cc$export$b7d78993b74f766d)() && ((_window_event = window.event) === null || _window_event === void 0 ? void 0 : (_window_event_type = _window_event.type) === null || _window_event_type === void 0 ? void 0 : _window_event_type.startsWith("key")) && target.target === "_blank") {
|
|
545
|
-
if ((0, $9e20cff0af27e8cc$export$9ac100e40613ea10)()) metaKey = true;
|
|
546
|
-
else ctrlKey = true;
|
|
547
|
-
}
|
|
548
|
-
// WebKit does not support firing click events with modifier keys, but does support keyboard events.
|
|
549
|
-
// https://github.com/WebKit/WebKit/blob/c03d0ac6e6db178f90923a0a63080b5ca210d25f/Source/WebCore/html/HTMLAnchorElement.cpp#L184
|
|
550
|
-
let event = (0, $9e20cff0af27e8cc$export$78551043582a6a98)() && (0, $9e20cff0af27e8cc$export$9ac100e40613ea10)() && !(0, $9e20cff0af27e8cc$export$7bef049ce92e4224)() && true ? new KeyboardEvent("keydown", {
|
|
551
|
-
keyIdentifier: "Enter",
|
|
552
|
-
metaKey: metaKey,
|
|
553
|
-
ctrlKey: ctrlKey,
|
|
554
|
-
altKey: altKey,
|
|
555
|
-
shiftKey: shiftKey
|
|
556
|
-
}) : new MouseEvent("click", {
|
|
557
|
-
metaKey: metaKey,
|
|
558
|
-
ctrlKey: ctrlKey,
|
|
559
|
-
altKey: altKey,
|
|
560
|
-
shiftKey: shiftKey,
|
|
561
|
-
bubbles: true,
|
|
562
|
-
cancelable: true
|
|
563
|
-
});
|
|
564
|
-
$4068a0fae83b6d84$export$95185d699e05d4d7.isOpening = setOpening;
|
|
565
|
-
(0, $1117b6c0d4c4c164$export$de79e2c695e052f3)(target);
|
|
566
|
-
target.dispatchEvent(event);
|
|
567
|
-
$4068a0fae83b6d84$export$95185d699e05d4d7.isOpening = false;
|
|
568
|
-
}
|
|
569
|
-
// https://github.com/parcel-bundler/parcel/issues/8724
|
|
570
|
-
$4068a0fae83b6d84$export$95185d699e05d4d7.isOpening = false;
|
|
571
|
-
function $4068a0fae83b6d84$var$getSyntheticLink(target, open) {
|
|
572
|
-
if (target instanceof HTMLAnchorElement) open(target);
|
|
573
|
-
else if (target.hasAttribute("data-href")) {
|
|
574
|
-
let link = document.createElement("a");
|
|
575
|
-
link.href = target.getAttribute("data-href");
|
|
576
|
-
if (target.hasAttribute("data-target")) link.target = target.getAttribute("data-target");
|
|
577
|
-
if (target.hasAttribute("data-rel")) link.rel = target.getAttribute("data-rel");
|
|
578
|
-
if (target.hasAttribute("data-download")) link.download = target.getAttribute("data-download");
|
|
579
|
-
if (target.hasAttribute("data-ping")) link.ping = target.getAttribute("data-ping");
|
|
580
|
-
if (target.hasAttribute("data-referrer-policy")) link.referrerPolicy = target.getAttribute("data-referrer-policy");
|
|
581
|
-
target.appendChild(link);
|
|
582
|
-
open(link);
|
|
583
|
-
target.removeChild(link);
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
function $4068a0fae83b6d84$var$openSyntheticLink(target, modifiers) {
|
|
587
|
-
$4068a0fae83b6d84$var$getSyntheticLink(target, (link)=>$4068a0fae83b6d84$export$95185d699e05d4d7(link, modifiers));
|
|
588
|
-
}
|
|
589
|
-
function $4068a0fae83b6d84$export$51437d503373d223(props) {
|
|
590
|
-
return {
|
|
591
|
-
"data-href": props.href,
|
|
592
|
-
"data-target": props.target,
|
|
593
|
-
"data-rel": props.rel,
|
|
594
|
-
"data-download": props.download,
|
|
595
|
-
"data-ping": props.ping,
|
|
596
|
-
"data-referrer-policy": props.referrerPolicy
|
|
597
|
-
};
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
/*
|
|
602
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
603
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
604
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
605
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
606
|
-
*
|
|
607
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
608
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
609
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
610
|
-
* governing permissions and limitations under the License.
|
|
611
|
-
*/ // We store a global list of elements that are currently transitioning,
|
|
612
|
-
// mapped to a set of CSS properties that are transitioning for that element.
|
|
613
|
-
// This is necessary rather than a simple count of transitions because of browser
|
|
614
|
-
// bugs, e.g. Chrome sometimes fires both transitionend and transitioncancel rather
|
|
615
|
-
// than one or the other. So we need to track what's actually transitioning so that
|
|
616
|
-
// we can ignore these duplicate events.
|
|
617
|
-
let $e8117ebcab55be6a$var$transitionsByElement = new Map();
|
|
618
|
-
// A list of callbacks to call once there are no transitioning elements.
|
|
619
|
-
let $e8117ebcab55be6a$var$transitionCallbacks = new Set();
|
|
620
|
-
function $e8117ebcab55be6a$var$setupGlobalEvents() {
|
|
621
|
-
if (typeof window === "undefined") return;
|
|
622
|
-
function isTransitionEvent(event) {
|
|
623
|
-
return "propertyName" in event;
|
|
624
|
-
}
|
|
625
|
-
let onTransitionStart = (e)=>{
|
|
626
|
-
if (!isTransitionEvent(e) || !e.target) return;
|
|
627
|
-
// Add the transitioning property to the list for this element.
|
|
628
|
-
let transitions = $e8117ebcab55be6a$var$transitionsByElement.get(e.target);
|
|
629
|
-
if (!transitions) {
|
|
630
|
-
transitions = new Set();
|
|
631
|
-
$e8117ebcab55be6a$var$transitionsByElement.set(e.target, transitions);
|
|
632
|
-
// The transitioncancel event must be registered on the element itself, rather than as a global
|
|
633
|
-
// event. This enables us to handle when the node is deleted from the document while it is transitioning.
|
|
634
|
-
// In that case, the cancel event would have nowhere to bubble to so we need to handle it directly.
|
|
635
|
-
e.target.addEventListener("transitioncancel", onTransitionEnd, {
|
|
636
|
-
once: true
|
|
637
|
-
});
|
|
638
|
-
}
|
|
639
|
-
transitions.add(e.propertyName);
|
|
640
|
-
};
|
|
641
|
-
let onTransitionEnd = (e)=>{
|
|
642
|
-
if (!isTransitionEvent(e) || !e.target) return;
|
|
643
|
-
// Remove property from list of transitioning properties.
|
|
644
|
-
let properties = $e8117ebcab55be6a$var$transitionsByElement.get(e.target);
|
|
645
|
-
if (!properties) return;
|
|
646
|
-
properties.delete(e.propertyName);
|
|
647
|
-
// If empty, remove transitioncancel event, and remove the element from the list of transitioning elements.
|
|
648
|
-
if (properties.size === 0) {
|
|
649
|
-
e.target.removeEventListener("transitioncancel", onTransitionEnd);
|
|
650
|
-
$e8117ebcab55be6a$var$transitionsByElement.delete(e.target);
|
|
651
|
-
}
|
|
652
|
-
// If no transitioning elements, call all of the queued callbacks.
|
|
653
|
-
if ($e8117ebcab55be6a$var$transitionsByElement.size === 0) {
|
|
654
|
-
for (let cb of $e8117ebcab55be6a$var$transitionCallbacks)cb();
|
|
655
|
-
$e8117ebcab55be6a$var$transitionCallbacks.clear();
|
|
656
|
-
}
|
|
657
|
-
};
|
|
658
|
-
document.body.addEventListener("transitionrun", onTransitionStart);
|
|
659
|
-
document.body.addEventListener("transitionend", onTransitionEnd);
|
|
660
|
-
}
|
|
661
|
-
if (typeof document !== "undefined") {
|
|
662
|
-
if (document.readyState !== "loading") $e8117ebcab55be6a$var$setupGlobalEvents();
|
|
663
|
-
else document.addEventListener("DOMContentLoaded", $e8117ebcab55be6a$var$setupGlobalEvents);
|
|
664
|
-
}
|
|
665
|
-
function $e8117ebcab55be6a$export$24490316f764c430(fn) {
|
|
666
|
-
// Wait one frame to see if an animation starts, e.g. a transition on mount.
|
|
667
|
-
requestAnimationFrame(()=>{
|
|
668
|
-
// If no transitions are running, call the function immediately.
|
|
669
|
-
// Otherwise, add it to a list of callbacks to run at the end of the animation.
|
|
670
|
-
if ($e8117ebcab55be6a$var$transitionsByElement.size === 0) fn();
|
|
671
|
-
else $e8117ebcab55be6a$var$transitionCallbacks.add(fn);
|
|
672
|
-
});
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
/*
|
|
677
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
678
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
679
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
680
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
681
|
-
*
|
|
682
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
683
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
684
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
685
|
-
* governing permissions and limitations under the License.
|
|
686
|
-
*/ /* eslint-disable rulesdir/pure-render */
|
|
687
|
-
|
|
688
|
-
// Keep track of elements that we are currently handling dragging for via useDrag1D.
|
|
689
|
-
// If there's an ancestor and a descendant both using useDrag1D(), and the user starts
|
|
690
|
-
// dragging the descendant, we don't want useDrag1D events to fire for the ancestor.
|
|
691
|
-
const $28ed3fb20343b78b$var$draggingElements = [];
|
|
692
|
-
function $28ed3fb20343b78b$export$7bbed75feba39706(props) {
|
|
693
|
-
console.warn("useDrag1D is deprecated, please use `useMove` instead https://react-spectrum.adobe.com/react-aria/useMove.html");
|
|
694
|
-
let { containerRef: containerRef, reverse: reverse, orientation: orientation, onHover: onHover, onDrag: onDrag, onPositionChange: onPositionChange, onIncrement: onIncrement, onDecrement: onDecrement, onIncrementToMax: onIncrementToMax, onDecrementToMin: onDecrementToMin, onCollapseToggle: onCollapseToggle } = props;
|
|
695
|
-
let getPosition = (e)=>orientation === "horizontal" ? e.clientX : e.clientY;
|
|
696
|
-
let getNextOffset = (e)=>{
|
|
697
|
-
let containerOffset = (0, $16ec41ef3e36c19c$export$622cea445a1c5b7d)(containerRef.current, reverse, orientation);
|
|
698
|
-
let mouseOffset = getPosition(e);
|
|
699
|
-
let nextOffset = reverse ? containerOffset - mouseOffset : mouseOffset - containerOffset;
|
|
700
|
-
return nextOffset;
|
|
701
|
-
};
|
|
702
|
-
let dragging = (0, $1Yh1N$react.useRef)(false);
|
|
703
|
-
let prevPosition = (0, $1Yh1N$react.useRef)(0);
|
|
704
|
-
// Keep track of the current handlers in a ref so that the events can access them.
|
|
705
|
-
let handlers = (0, $1Yh1N$react.useRef)({
|
|
706
|
-
onPositionChange: onPositionChange,
|
|
707
|
-
onDrag: onDrag
|
|
708
|
-
});
|
|
709
|
-
handlers.current.onDrag = onDrag;
|
|
710
|
-
handlers.current.onPositionChange = onPositionChange;
|
|
711
|
-
let onMouseDragged = (e)=>{
|
|
712
|
-
e.preventDefault();
|
|
713
|
-
let nextOffset = getNextOffset(e);
|
|
714
|
-
if (!dragging.current) {
|
|
715
|
-
dragging.current = true;
|
|
716
|
-
if (handlers.current.onDrag) handlers.current.onDrag(true);
|
|
717
|
-
if (handlers.current.onPositionChange) handlers.current.onPositionChange(nextOffset);
|
|
718
|
-
}
|
|
719
|
-
if (prevPosition.current === nextOffset) return;
|
|
720
|
-
prevPosition.current = nextOffset;
|
|
721
|
-
if (onPositionChange) onPositionChange(nextOffset);
|
|
722
|
-
};
|
|
723
|
-
let onMouseUp = (e)=>{
|
|
724
|
-
const target = e.target;
|
|
725
|
-
dragging.current = false;
|
|
726
|
-
let nextOffset = getNextOffset(e);
|
|
727
|
-
if (handlers.current.onDrag) handlers.current.onDrag(false);
|
|
728
|
-
if (handlers.current.onPositionChange) handlers.current.onPositionChange(nextOffset);
|
|
729
|
-
$28ed3fb20343b78b$var$draggingElements.splice($28ed3fb20343b78b$var$draggingElements.indexOf(target), 1);
|
|
730
|
-
window.removeEventListener("mouseup", onMouseUp, false);
|
|
731
|
-
window.removeEventListener("mousemove", onMouseDragged, false);
|
|
732
|
-
};
|
|
733
|
-
let onMouseDown = (e)=>{
|
|
734
|
-
const target = e.currentTarget;
|
|
735
|
-
// If we're already handling dragging on a descendant with useDrag1D, then
|
|
736
|
-
// we don't want to handle the drag motion on this target as well.
|
|
737
|
-
if ($28ed3fb20343b78b$var$draggingElements.some((elt)=>target.contains(elt))) return;
|
|
738
|
-
$28ed3fb20343b78b$var$draggingElements.push(target);
|
|
739
|
-
window.addEventListener("mousemove", onMouseDragged, false);
|
|
740
|
-
window.addEventListener("mouseup", onMouseUp, false);
|
|
741
|
-
};
|
|
742
|
-
let onMouseEnter = ()=>{
|
|
743
|
-
if (onHover) onHover(true);
|
|
744
|
-
};
|
|
745
|
-
let onMouseOut = ()=>{
|
|
746
|
-
if (onHover) onHover(false);
|
|
747
|
-
};
|
|
748
|
-
let onKeyDown = (e)=>{
|
|
749
|
-
switch(e.key){
|
|
750
|
-
case "Left":
|
|
751
|
-
case "ArrowLeft":
|
|
752
|
-
if (orientation === "horizontal") {
|
|
753
|
-
e.preventDefault();
|
|
754
|
-
if (onDecrement && !reverse) onDecrement();
|
|
755
|
-
else if (onIncrement && reverse) onIncrement();
|
|
756
|
-
}
|
|
757
|
-
break;
|
|
758
|
-
case "Up":
|
|
759
|
-
case "ArrowUp":
|
|
760
|
-
if (orientation === "vertical") {
|
|
761
|
-
e.preventDefault();
|
|
762
|
-
if (onDecrement && !reverse) onDecrement();
|
|
763
|
-
else if (onIncrement && reverse) onIncrement();
|
|
764
|
-
}
|
|
765
|
-
break;
|
|
766
|
-
case "Right":
|
|
767
|
-
case "ArrowRight":
|
|
768
|
-
if (orientation === "horizontal") {
|
|
769
|
-
e.preventDefault();
|
|
770
|
-
if (onIncrement && !reverse) onIncrement();
|
|
771
|
-
else if (onDecrement && reverse) onDecrement();
|
|
772
|
-
}
|
|
773
|
-
break;
|
|
774
|
-
case "Down":
|
|
775
|
-
case "ArrowDown":
|
|
776
|
-
if (orientation === "vertical") {
|
|
777
|
-
e.preventDefault();
|
|
778
|
-
if (onIncrement && !reverse) onIncrement();
|
|
779
|
-
else if (onDecrement && reverse) onDecrement();
|
|
780
|
-
}
|
|
781
|
-
break;
|
|
782
|
-
case "Home":
|
|
783
|
-
e.preventDefault();
|
|
784
|
-
if (onDecrementToMin) onDecrementToMin();
|
|
785
|
-
break;
|
|
786
|
-
case "End":
|
|
787
|
-
e.preventDefault();
|
|
788
|
-
if (onIncrementToMax) onIncrementToMax();
|
|
789
|
-
break;
|
|
790
|
-
case "Enter":
|
|
791
|
-
e.preventDefault();
|
|
792
|
-
if (onCollapseToggle) onCollapseToggle();
|
|
793
|
-
break;
|
|
794
|
-
}
|
|
795
|
-
};
|
|
796
|
-
return {
|
|
797
|
-
onMouseDown: onMouseDown,
|
|
798
|
-
onMouseEnter: onMouseEnter,
|
|
799
|
-
onMouseOut: onMouseOut,
|
|
800
|
-
onKeyDown: onKeyDown
|
|
801
|
-
};
|
|
802
|
-
}
|
|
803
|
-
|
|
804
|
-
|
|
85
|
+
$parcel$export(module.exports, "isVirtualClick", () => $577e795361f19be9$exports.isVirtualClick);
|
|
86
|
+
$parcel$export(module.exports, "isVirtualPointerEvent", () => $577e795361f19be9$exports.isVirtualPointerEvent);
|
|
87
|
+
$parcel$export(module.exports, "useEffectEvent", () => $1254e5bb94ac8761$exports.useEffectEvent);
|
|
88
|
+
$parcel$export(module.exports, "useDeepMemo", () => $20e6e72fbf5dc81e$exports.useDeepMemo);
|
|
89
|
+
$parcel$export(module.exports, "useFormReset", () => $1f205e845604a423$exports.useFormReset);
|
|
805
90
|
/*
|
|
806
91
|
* Copyright 2020 Adobe. All rights reserved.
|
|
807
92
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -813,522 +98,35 @@ function $28ed3fb20343b78b$export$7bbed75feba39706(props) {
|
|
|
813
98
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
814
99
|
* governing permissions and limitations under the License.
|
|
815
100
|
*/
|
|
816
|
-
function $4571ff54ac709100$export$4eaf04e54aa8eed6() {
|
|
817
|
-
let globalListeners = (0, $1Yh1N$react.useRef)(new Map());
|
|
818
|
-
let addGlobalListener = (0, $1Yh1N$react.useCallback)((eventTarget, type, listener, options)=>{
|
|
819
|
-
// Make sure we remove the listener after it is called with the `once` option.
|
|
820
|
-
let fn = (options === null || options === void 0 ? void 0 : options.once) ? (...args)=>{
|
|
821
|
-
globalListeners.current.delete(listener);
|
|
822
|
-
listener(...args);
|
|
823
|
-
} : listener;
|
|
824
|
-
globalListeners.current.set(listener, {
|
|
825
|
-
type: type,
|
|
826
|
-
eventTarget: eventTarget,
|
|
827
|
-
fn: fn,
|
|
828
|
-
options: options
|
|
829
|
-
});
|
|
830
|
-
eventTarget.addEventListener(type, listener, options);
|
|
831
|
-
}, []);
|
|
832
|
-
let removeGlobalListener = (0, $1Yh1N$react.useCallback)((eventTarget, type, listener, options)=>{
|
|
833
|
-
var _globalListeners_current_get;
|
|
834
|
-
let fn = ((_globalListeners_current_get = globalListeners.current.get(listener)) === null || _globalListeners_current_get === void 0 ? void 0 : _globalListeners_current_get.fn) || listener;
|
|
835
|
-
eventTarget.removeEventListener(type, fn, options);
|
|
836
|
-
globalListeners.current.delete(listener);
|
|
837
|
-
}, []);
|
|
838
|
-
let removeAllGlobalListeners = (0, $1Yh1N$react.useCallback)(()=>{
|
|
839
|
-
globalListeners.current.forEach((value, key)=>{
|
|
840
|
-
removeGlobalListener(value.eventTarget, value.type, key, value.options);
|
|
841
|
-
});
|
|
842
|
-
}, [
|
|
843
|
-
removeGlobalListener
|
|
844
|
-
]);
|
|
845
|
-
// eslint-disable-next-line arrow-body-style
|
|
846
|
-
(0, $1Yh1N$react.useEffect)(()=>{
|
|
847
|
-
return removeAllGlobalListeners;
|
|
848
|
-
}, [
|
|
849
|
-
removeAllGlobalListeners
|
|
850
|
-
]);
|
|
851
|
-
return {
|
|
852
|
-
addGlobalListener: addGlobalListener,
|
|
853
|
-
removeGlobalListener: removeGlobalListener,
|
|
854
|
-
removeAllGlobalListeners: removeAllGlobalListeners
|
|
855
|
-
};
|
|
856
|
-
}
|
|
857
101
|
|
|
858
102
|
|
|
859
|
-
/*
|
|
860
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
861
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
862
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
863
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
864
|
-
*
|
|
865
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
866
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
867
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
868
|
-
* governing permissions and limitations under the License.
|
|
869
|
-
*/
|
|
870
|
-
function $6ec78bde395c477d$export$d6875122194c7b44(props, defaultLabel) {
|
|
871
|
-
let { id: id, "aria-label": label, "aria-labelledby": labelledBy } = props;
|
|
872
|
-
// If there is both an aria-label and aria-labelledby,
|
|
873
|
-
// combine them by pointing to the element itself.
|
|
874
|
-
id = (0, $8c61827343eed941$export$f680877a34711e37)(id);
|
|
875
|
-
if (labelledBy && label) {
|
|
876
|
-
let ids = new Set([
|
|
877
|
-
id,
|
|
878
|
-
...labelledBy.trim().split(/\s+/)
|
|
879
|
-
]);
|
|
880
|
-
labelledBy = [
|
|
881
|
-
...ids
|
|
882
|
-
].join(" ");
|
|
883
|
-
} else if (labelledBy) labelledBy = labelledBy.trim().split(/\s+/).join(" ");
|
|
884
|
-
// If no labels are provided, use the default
|
|
885
|
-
if (!label && !labelledBy && defaultLabel) label = defaultLabel;
|
|
886
|
-
return {
|
|
887
|
-
id: id,
|
|
888
|
-
"aria-label": label,
|
|
889
|
-
"aria-labelledby": labelledBy
|
|
890
|
-
};
|
|
891
|
-
}
|
|
892
103
|
|
|
893
104
|
|
|
894
|
-
/*
|
|
895
|
-
* Copyright 2021 Adobe. All rights reserved.
|
|
896
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
897
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
898
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
899
|
-
*
|
|
900
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
901
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
902
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
903
|
-
* governing permissions and limitations under the License.
|
|
904
|
-
*/
|
|
905
|
-
function $475b35fe72ba49b3$export$4338b53315abf666(forwardedRef) {
|
|
906
|
-
const objRef = (0, $1Yh1N$react.useRef)(null);
|
|
907
|
-
return (0, $1Yh1N$react.useMemo)(()=>({
|
|
908
|
-
get current () {
|
|
909
|
-
return objRef.current;
|
|
910
|
-
},
|
|
911
|
-
set current (value){
|
|
912
|
-
objRef.current = value;
|
|
913
|
-
if (typeof forwardedRef === "function") forwardedRef(value);
|
|
914
|
-
else if (forwardedRef) forwardedRef.current = value;
|
|
915
|
-
}
|
|
916
|
-
}), [
|
|
917
|
-
forwardedRef
|
|
918
|
-
]);
|
|
919
|
-
}
|
|
920
105
|
|
|
921
106
|
|
|
922
|
-
/*
|
|
923
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
924
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
925
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
926
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
927
|
-
*
|
|
928
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
929
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
930
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
931
|
-
* governing permissions and limitations under the License.
|
|
932
|
-
*/
|
|
933
|
-
function $29293a6f5c75b37e$export$496315a1608d9602(effect, dependencies) {
|
|
934
|
-
const isInitialMount = (0, $1Yh1N$react.useRef)(true);
|
|
935
|
-
const lastDeps = (0, $1Yh1N$react.useRef)(null);
|
|
936
|
-
(0, $1Yh1N$react.useEffect)(()=>{
|
|
937
|
-
isInitialMount.current = true;
|
|
938
|
-
return ()=>{
|
|
939
|
-
isInitialMount.current = false;
|
|
940
|
-
};
|
|
941
|
-
}, []);
|
|
942
|
-
(0, $1Yh1N$react.useEffect)(()=>{
|
|
943
|
-
if (isInitialMount.current) isInitialMount.current = false;
|
|
944
|
-
else if (!lastDeps.current || dependencies.some((dep, i)=>!Object.is(dep, lastDeps[i]))) effect();
|
|
945
|
-
lastDeps.current = dependencies;
|
|
946
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
947
|
-
}, dependencies);
|
|
948
|
-
}
|
|
949
107
|
|
|
950
108
|
|
|
951
109
|
|
|
952
110
|
|
|
953
|
-
function $37733e1652f47193$var$hasResizeObserver() {
|
|
954
|
-
return typeof window.ResizeObserver !== "undefined";
|
|
955
|
-
}
|
|
956
|
-
function $37733e1652f47193$export$683480f191c0e3ea(options) {
|
|
957
|
-
const { ref: ref, onResize: onResize } = options;
|
|
958
|
-
(0, $1Yh1N$react.useEffect)(()=>{
|
|
959
|
-
let element = ref === null || ref === void 0 ? void 0 : ref.current;
|
|
960
|
-
if (!element) return;
|
|
961
|
-
if (!$37733e1652f47193$var$hasResizeObserver()) {
|
|
962
|
-
window.addEventListener("resize", onResize, false);
|
|
963
|
-
return ()=>{
|
|
964
|
-
window.removeEventListener("resize", onResize, false);
|
|
965
|
-
};
|
|
966
|
-
} else {
|
|
967
|
-
const resizeObserverInstance = new window.ResizeObserver((entries)=>{
|
|
968
|
-
if (!entries.length) return;
|
|
969
|
-
onResize();
|
|
970
|
-
});
|
|
971
|
-
resizeObserverInstance.observe(element);
|
|
972
|
-
return ()=>{
|
|
973
|
-
if (element) resizeObserverInstance.unobserve(element);
|
|
974
|
-
};
|
|
975
|
-
}
|
|
976
|
-
}, [
|
|
977
|
-
onResize,
|
|
978
|
-
ref
|
|
979
|
-
]);
|
|
980
|
-
}
|
|
981
111
|
|
|
982
112
|
|
|
983
|
-
/*
|
|
984
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
985
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
986
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
987
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
988
|
-
*
|
|
989
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
990
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
991
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
992
|
-
* governing permissions and limitations under the License.
|
|
993
|
-
*/
|
|
994
|
-
function $6fc733991a9f977c$export$4debdb1a3f0fa79e(context, ref) {
|
|
995
|
-
(0, $78605a5d7424e31b$export$e5c5a5f917a5871c)(()=>{
|
|
996
|
-
if (context && context.ref && ref) {
|
|
997
|
-
context.ref.current = ref.current;
|
|
998
|
-
return ()=>{
|
|
999
|
-
if (context.ref) context.ref.current = null;
|
|
1000
|
-
};
|
|
1001
|
-
}
|
|
1002
|
-
});
|
|
1003
|
-
}
|
|
1004
113
|
|
|
1005
114
|
|
|
1006
|
-
/*
|
|
1007
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
1008
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
1009
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
1010
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
1011
|
-
*
|
|
1012
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
1013
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
1014
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1015
|
-
* governing permissions and limitations under the License.
|
|
1016
|
-
*/ function $d796e7157ac96470$export$cfa2225e87938781(node, checkForOverflow) {
|
|
1017
|
-
let scrollableNode = node;
|
|
1018
|
-
if ($d796e7157ac96470$export$2bb74740c4e19def(scrollableNode, checkForOverflow)) scrollableNode = scrollableNode.parentElement;
|
|
1019
|
-
while(scrollableNode && !$d796e7157ac96470$export$2bb74740c4e19def(scrollableNode, checkForOverflow))scrollableNode = scrollableNode.parentElement;
|
|
1020
|
-
return scrollableNode || document.scrollingElement || document.documentElement;
|
|
1021
|
-
}
|
|
1022
|
-
function $d796e7157ac96470$export$2bb74740c4e19def(node, checkForOverflow) {
|
|
1023
|
-
let style = window.getComputedStyle(node);
|
|
1024
|
-
let isScrollable = /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY);
|
|
1025
|
-
if (isScrollable && checkForOverflow) isScrollable = node.scrollHeight !== node.clientHeight || node.scrollWidth !== node.clientWidth;
|
|
1026
|
-
return isScrollable;
|
|
1027
|
-
}
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
/*
|
|
1031
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
1032
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
1033
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
1034
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
1035
|
-
*
|
|
1036
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
1037
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
1038
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1039
|
-
* governing permissions and limitations under the License.
|
|
1040
|
-
*/
|
|
1041
115
|
|
|
1042
|
-
// @ts-ignore
|
|
1043
|
-
let $8b24bab62f5c65ad$var$visualViewport = typeof document !== "undefined" && window.visualViewport;
|
|
1044
|
-
function $8b24bab62f5c65ad$export$d699905dd57c73ca() {
|
|
1045
|
-
let isSSR = (0, $1Yh1N$reactariassr.useIsSSR)();
|
|
1046
|
-
let [size, setSize] = (0, $1Yh1N$react.useState)(()=>isSSR ? {
|
|
1047
|
-
width: 0,
|
|
1048
|
-
height: 0
|
|
1049
|
-
} : $8b24bab62f5c65ad$var$getViewportSize());
|
|
1050
|
-
(0, $1Yh1N$react.useEffect)(()=>{
|
|
1051
|
-
// Use visualViewport api to track available height even on iOS virtual keyboard opening
|
|
1052
|
-
let onResize = ()=>{
|
|
1053
|
-
setSize((size)=>{
|
|
1054
|
-
let newSize = $8b24bab62f5c65ad$var$getViewportSize();
|
|
1055
|
-
if (newSize.width === size.width && newSize.height === size.height) return size;
|
|
1056
|
-
return newSize;
|
|
1057
|
-
});
|
|
1058
|
-
};
|
|
1059
|
-
if (!$8b24bab62f5c65ad$var$visualViewport) window.addEventListener("resize", onResize);
|
|
1060
|
-
else $8b24bab62f5c65ad$var$visualViewport.addEventListener("resize", onResize);
|
|
1061
|
-
return ()=>{
|
|
1062
|
-
if (!$8b24bab62f5c65ad$var$visualViewport) window.removeEventListener("resize", onResize);
|
|
1063
|
-
else $8b24bab62f5c65ad$var$visualViewport.removeEventListener("resize", onResize);
|
|
1064
|
-
};
|
|
1065
|
-
}, []);
|
|
1066
|
-
return size;
|
|
1067
|
-
}
|
|
1068
|
-
function $8b24bab62f5c65ad$var$getViewportSize() {
|
|
1069
|
-
return {
|
|
1070
|
-
width: $8b24bab62f5c65ad$var$visualViewport && ($8b24bab62f5c65ad$var$visualViewport === null || $8b24bab62f5c65ad$var$visualViewport === void 0 ? void 0 : $8b24bab62f5c65ad$var$visualViewport.width) || window.innerWidth,
|
|
1071
|
-
height: $8b24bab62f5c65ad$var$visualViewport && ($8b24bab62f5c65ad$var$visualViewport === null || $8b24bab62f5c65ad$var$visualViewport === void 0 ? void 0 : $8b24bab62f5c65ad$var$visualViewport.height) || window.innerHeight
|
|
1072
|
-
};
|
|
1073
|
-
}
|
|
1074
116
|
|
|
1075
117
|
|
|
1076
|
-
/*
|
|
1077
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
1078
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
1079
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
1080
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
1081
|
-
*
|
|
1082
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
1083
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
1084
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1085
|
-
* governing permissions and limitations under the License.
|
|
1086
|
-
*/
|
|
1087
|
-
|
|
1088
|
-
let $34da4502ea8120db$var$descriptionId = 0;
|
|
1089
|
-
const $34da4502ea8120db$var$descriptionNodes = new Map();
|
|
1090
|
-
function $34da4502ea8120db$export$f8aeda7b10753fa1(description) {
|
|
1091
|
-
let [id, setId] = (0, $1Yh1N$react.useState)();
|
|
1092
|
-
(0, $78605a5d7424e31b$export$e5c5a5f917a5871c)(()=>{
|
|
1093
|
-
if (!description) return;
|
|
1094
|
-
let desc = $34da4502ea8120db$var$descriptionNodes.get(description);
|
|
1095
|
-
if (!desc) {
|
|
1096
|
-
let id = `react-aria-description-${$34da4502ea8120db$var$descriptionId++}`;
|
|
1097
|
-
setId(id);
|
|
1098
|
-
let node = document.createElement("div");
|
|
1099
|
-
node.id = id;
|
|
1100
|
-
node.style.display = "none";
|
|
1101
|
-
node.textContent = description;
|
|
1102
|
-
document.body.appendChild(node);
|
|
1103
|
-
desc = {
|
|
1104
|
-
refCount: 0,
|
|
1105
|
-
element: node
|
|
1106
|
-
};
|
|
1107
|
-
$34da4502ea8120db$var$descriptionNodes.set(description, desc);
|
|
1108
|
-
} else setId(desc.element.id);
|
|
1109
|
-
desc.refCount++;
|
|
1110
|
-
return ()=>{
|
|
1111
|
-
if (desc && --desc.refCount === 0) {
|
|
1112
|
-
desc.element.remove();
|
|
1113
|
-
$34da4502ea8120db$var$descriptionNodes.delete(description);
|
|
1114
|
-
}
|
|
1115
|
-
};
|
|
1116
|
-
}, [
|
|
1117
|
-
description
|
|
1118
|
-
]);
|
|
1119
|
-
return {
|
|
1120
|
-
"aria-describedby": description ? id : undefined
|
|
1121
|
-
};
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
/*
|
|
1127
|
-
* Copyright 2021 Adobe. All rights reserved.
|
|
1128
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
1129
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
1130
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
1131
|
-
*
|
|
1132
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
1133
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
1134
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1135
|
-
* governing permissions and limitations under the License.
|
|
1136
|
-
*/
|
|
1137
|
-
|
|
1138
|
-
function $2a8c0bb1629926c8$export$90fc3a17d93f704c(ref, event, handler, options) {
|
|
1139
|
-
let handleEvent = (0, $1254e5bb94ac8761$export$7f54fc3180508a52)(handler);
|
|
1140
|
-
let isDisabled = handler == null;
|
|
1141
|
-
(0, $1Yh1N$react.useEffect)(()=>{
|
|
1142
|
-
if (isDisabled || !ref.current) return;
|
|
1143
|
-
let element = ref.current;
|
|
1144
|
-
element.addEventListener(event, handleEvent, options);
|
|
1145
|
-
return ()=>{
|
|
1146
|
-
element.removeEventListener(event, handleEvent, options);
|
|
1147
|
-
};
|
|
1148
|
-
}, [
|
|
1149
|
-
ref,
|
|
1150
|
-
event,
|
|
1151
|
-
options,
|
|
1152
|
-
isDisabled,
|
|
1153
|
-
handleEvent
|
|
1154
|
-
]);
|
|
1155
|
-
}
|
|
1156
118
|
|
|
1157
119
|
|
|
1158
120
|
|
|
1159
|
-
/*
|
|
1160
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
1161
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
1162
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
1163
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
1164
|
-
*
|
|
1165
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
1166
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
1167
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1168
|
-
* governing permissions and limitations under the License.
|
|
1169
|
-
*/
|
|
1170
|
-
function $449412113267a1fe$export$53a0910f038337bd(scrollView, element) {
|
|
1171
|
-
let offsetX = $449412113267a1fe$var$relativeOffset(scrollView, element, "left");
|
|
1172
|
-
let offsetY = $449412113267a1fe$var$relativeOffset(scrollView, element, "top");
|
|
1173
|
-
let width = element.offsetWidth;
|
|
1174
|
-
let height = element.offsetHeight;
|
|
1175
|
-
let x = scrollView.scrollLeft;
|
|
1176
|
-
let y = scrollView.scrollTop;
|
|
1177
|
-
// Account for top/left border offsetting the scroll top/Left
|
|
1178
|
-
let { borderTopWidth: borderTopWidth, borderLeftWidth: borderLeftWidth } = getComputedStyle(scrollView);
|
|
1179
|
-
let borderAdjustedX = scrollView.scrollLeft + parseInt(borderLeftWidth, 10);
|
|
1180
|
-
let borderAdjustedY = scrollView.scrollTop + parseInt(borderTopWidth, 10);
|
|
1181
|
-
// Ignore end/bottom border via clientHeight/Width instead of offsetHeight/Width
|
|
1182
|
-
let maxX = borderAdjustedX + scrollView.clientWidth;
|
|
1183
|
-
let maxY = borderAdjustedY + scrollView.clientHeight;
|
|
1184
|
-
if (offsetX <= x) x = offsetX - parseInt(borderLeftWidth, 10);
|
|
1185
|
-
else if (offsetX + width > maxX) x += offsetX + width - maxX;
|
|
1186
|
-
if (offsetY <= borderAdjustedY) y = offsetY - parseInt(borderTopWidth, 10);
|
|
1187
|
-
else if (offsetY + height > maxY) y += offsetY + height - maxY;
|
|
1188
|
-
scrollView.scrollLeft = x;
|
|
1189
|
-
scrollView.scrollTop = y;
|
|
1190
|
-
}
|
|
1191
|
-
/**
|
|
1192
|
-
* Computes the offset left or top from child to ancestor by accumulating
|
|
1193
|
-
* offsetLeft or offsetTop through intervening offsetParents.
|
|
1194
|
-
*/ function $449412113267a1fe$var$relativeOffset(ancestor, child, axis) {
|
|
1195
|
-
const prop = axis === "left" ? "offsetLeft" : "offsetTop";
|
|
1196
|
-
let sum = 0;
|
|
1197
|
-
while(child.offsetParent){
|
|
1198
|
-
sum += child[prop];
|
|
1199
|
-
if (child.offsetParent === ancestor) break;
|
|
1200
|
-
else if (child.offsetParent.contains(ancestor)) {
|
|
1201
|
-
// If the ancestor is not `position:relative`, then we stop at
|
|
1202
|
-
// _its_ offset parent, and we subtract off _its_ offset, so that
|
|
1203
|
-
// we end up with the proper offset from child to ancestor.
|
|
1204
|
-
sum -= ancestor[prop];
|
|
1205
|
-
break;
|
|
1206
|
-
}
|
|
1207
|
-
child = child.offsetParent;
|
|
1208
|
-
}
|
|
1209
|
-
return sum;
|
|
1210
|
-
}
|
|
1211
|
-
function $449412113267a1fe$export$c826860796309d1b(targetElement, opts) {
|
|
1212
|
-
if (document.contains(targetElement)) {
|
|
1213
|
-
let root = document.scrollingElement || document.documentElement;
|
|
1214
|
-
let isScrollPrevented = window.getComputedStyle(root).overflow === "hidden";
|
|
1215
|
-
// If scrolling is not currently prevented then we aren’t in a overlay nor is a overlay open, just use element.scrollIntoView to bring the element into view
|
|
1216
|
-
if (!isScrollPrevented) {
|
|
1217
|
-
var // use scrollIntoView({block: 'nearest'}) instead of .focus to check if the element is fully in view or not since .focus()
|
|
1218
|
-
// won't cause a scroll if the element is already focused and doesn't behave consistently when an element is partially out of view horizontally vs vertically
|
|
1219
|
-
_targetElement_scrollIntoView;
|
|
1220
|
-
let { left: originalLeft, top: originalTop } = targetElement.getBoundingClientRect();
|
|
1221
|
-
targetElement === null || targetElement === void 0 ? void 0 : (_targetElement_scrollIntoView = targetElement.scrollIntoView) === null || _targetElement_scrollIntoView === void 0 ? void 0 : _targetElement_scrollIntoView.call(targetElement, {
|
|
1222
|
-
block: "nearest"
|
|
1223
|
-
});
|
|
1224
|
-
let { left: newLeft, top: newTop } = targetElement.getBoundingClientRect();
|
|
1225
|
-
// Account for sub pixel differences from rounding
|
|
1226
|
-
if (Math.abs(originalLeft - newLeft) > 1 || Math.abs(originalTop - newTop) > 1) {
|
|
1227
|
-
var _opts_containingElement_scrollIntoView, _opts_containingElement, _targetElement_scrollIntoView1;
|
|
1228
|
-
opts === null || opts === void 0 ? void 0 : (_opts_containingElement = opts.containingElement) === null || _opts_containingElement === void 0 ? void 0 : (_opts_containingElement_scrollIntoView = _opts_containingElement.scrollIntoView) === null || _opts_containingElement_scrollIntoView === void 0 ? void 0 : _opts_containingElement_scrollIntoView.call(_opts_containingElement, {
|
|
1229
|
-
block: "center",
|
|
1230
|
-
inline: "center"
|
|
1231
|
-
});
|
|
1232
|
-
(_targetElement_scrollIntoView1 = targetElement.scrollIntoView) === null || _targetElement_scrollIntoView1 === void 0 ? void 0 : _targetElement_scrollIntoView1.call(targetElement, {
|
|
1233
|
-
block: "nearest"
|
|
1234
|
-
});
|
|
1235
|
-
}
|
|
1236
|
-
} else {
|
|
1237
|
-
let scrollParent = (0, $d796e7157ac96470$export$cfa2225e87938781)(targetElement);
|
|
1238
|
-
// If scrolling is prevented, we don't want to scroll the body since it might move the overlay partially offscreen and the user can't scroll it back into view.
|
|
1239
|
-
while(targetElement && scrollParent && targetElement !== root && scrollParent !== root){
|
|
1240
|
-
$449412113267a1fe$export$53a0910f038337bd(scrollParent, targetElement);
|
|
1241
|
-
targetElement = scrollParent;
|
|
1242
|
-
scrollParent = (0, $d796e7157ac96470$export$cfa2225e87938781)(targetElement);
|
|
1243
|
-
}
|
|
1244
|
-
}
|
|
1245
|
-
}
|
|
1246
|
-
}
|
|
1247
121
|
|
|
1248
122
|
|
|
1249
123
|
|
|
1250
|
-
/*
|
|
1251
|
-
* Copyright 2022 Adobe. All rights reserved.
|
|
1252
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
1253
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
1254
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
1255
|
-
*
|
|
1256
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
1257
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
1258
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1259
|
-
* governing permissions and limitations under the License.
|
|
1260
|
-
*/
|
|
1261
|
-
function $577e795361f19be9$export$60278871457622de(event) {
|
|
1262
|
-
// JAWS/NVDA with Firefox.
|
|
1263
|
-
if (event.mozInputSource === 0 && event.isTrusted) return true;
|
|
1264
|
-
// Android TalkBack's detail value varies depending on the event listener providing the event so we have specific logic here instead
|
|
1265
|
-
// If pointerType is defined, event is from a click listener. For events from mousedown listener, detail === 0 is a sufficient check
|
|
1266
|
-
// to detect TalkBack virtual clicks.
|
|
1267
|
-
if ((0, $9e20cff0af27e8cc$export$a11b0059900ceec8)() && event.pointerType) return event.type === "click" && event.buttons === 1;
|
|
1268
|
-
return event.detail === 0 && !event.pointerType;
|
|
1269
|
-
}
|
|
1270
|
-
function $577e795361f19be9$export$29bf1b5f2c56cf63(event) {
|
|
1271
|
-
// If the pointer size is zero, then we assume it's from a screen reader.
|
|
1272
|
-
// Android TalkBack double tap will sometimes return a event with width and height of 1
|
|
1273
|
-
// and pointerType === 'mouse' so we need to check for a specific combination of event attributes.
|
|
1274
|
-
// Cannot use "event.pressure === 0" as the sole check due to Safari pointer events always returning pressure === 0
|
|
1275
|
-
// instead of .5, see https://bugs.webkit.org/show_bug.cgi?id=206216. event.pointerType === 'mouse' is to distingush
|
|
1276
|
-
// Talkback double tap from Windows Firefox touch screen press
|
|
1277
|
-
return !(0, $9e20cff0af27e8cc$export$a11b0059900ceec8)() && event.width === 0 && event.height === 0 || event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === "mouse";
|
|
1278
|
-
}
|
|
1279
124
|
|
|
1280
125
|
|
|
1281
126
|
|
|
1282
|
-
/*
|
|
1283
|
-
* Copyright 2023 Adobe. All rights reserved.
|
|
1284
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
1285
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
1286
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
1287
|
-
*
|
|
1288
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
1289
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
1290
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1291
|
-
* governing permissions and limitations under the License.
|
|
1292
|
-
*/ /* eslint-disable rulesdir/pure-render */
|
|
1293
|
-
function $20e6e72fbf5dc81e$export$722debc0e56fea39(value, isEqual) {
|
|
1294
|
-
// Using a ref during render is ok here because it's only an optimization – both values are equivalent.
|
|
1295
|
-
// If a render is thrown away, it'll still work the same no matter if the next render is the same or not.
|
|
1296
|
-
let lastValue = (0, $1Yh1N$react.useRef)(null);
|
|
1297
|
-
if (value && lastValue.current && isEqual(value, lastValue.current)) value = lastValue.current;
|
|
1298
|
-
lastValue.current = value;
|
|
1299
|
-
return value;
|
|
1300
|
-
}
|
|
1301
127
|
|
|
1302
128
|
|
|
1303
|
-
/*
|
|
1304
|
-
* Copyright 2023 Adobe. All rights reserved.
|
|
1305
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
1306
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
1307
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
1308
|
-
*
|
|
1309
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
1310
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
1311
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1312
|
-
* governing permissions and limitations under the License.
|
|
1313
|
-
*/
|
|
1314
129
|
|
|
1315
|
-
function $1f205e845604a423$export$5add1d006293d136(ref, initialValue, onReset) {
|
|
1316
|
-
let resetValue = (0, $1Yh1N$react.useRef)(initialValue);
|
|
1317
|
-
let handleReset = (0, $1254e5bb94ac8761$export$7f54fc3180508a52)(()=>{
|
|
1318
|
-
if (onReset) onReset(resetValue.current);
|
|
1319
|
-
});
|
|
1320
|
-
(0, $1Yh1N$react.useEffect)(()=>{
|
|
1321
|
-
var _ref_current;
|
|
1322
|
-
let form = ref === null || ref === void 0 ? void 0 : (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.form;
|
|
1323
|
-
form === null || form === void 0 ? void 0 : form.addEventListener("reset", handleReset);
|
|
1324
|
-
return ()=>{
|
|
1325
|
-
form === null || form === void 0 ? void 0 : form.removeEventListener("reset", handleReset);
|
|
1326
|
-
};
|
|
1327
|
-
}, [
|
|
1328
|
-
ref,
|
|
1329
|
-
handleReset
|
|
1330
|
-
]);
|
|
1331
|
-
}
|
|
1332
130
|
|
|
1333
131
|
|
|
1334
132
|
|