@soomo/react-text-annotator 3.1.0-staging.9 → 3.2.0-staging.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/TextAnnotationPopup/TextAnnotationPopup.d.ts +32 -0
- package/dist/TextAnnotationPopup/TextAnnotationPopup.d.ts.map +1 -0
- package/dist/TextAnnotationPopup/index.d.ts +2 -0
- package/dist/TextAnnotationPopup/index.d.ts.map +1 -0
- package/dist/TextAnnotationPopup/isMobile.d.ts.map +1 -0
- package/dist/TextAnnotator.d.ts +5 -5
- package/dist/TextAnnotator.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useAnnotationQuoteIdling.d.ts +4 -0
- package/dist/hooks/useAnnotationQuoteIdling.d.ts.map +1 -0
- package/dist/hooks/useAnnouncePopupNavigation.d.ts.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/react-text-annotator.es.js +10 -4
- package/dist/react-text-annotator.es.js.map +1 -1
- package/dist/react-text-annotator.es10.js +24 -10
- package/dist/react-text-annotator.es10.js.map +1 -1
- package/dist/react-text-annotator.es11.js +82 -9
- package/dist/react-text-annotator.es11.js.map +1 -1
- package/dist/react-text-annotator.es12.js +33 -1436
- package/dist/react-text-annotator.es12.js.map +1 -1
- package/dist/react-text-annotator.es13.js +28 -0
- package/dist/react-text-annotator.es13.js.map +1 -0
- package/dist/react-text-annotator.es14.js +1590 -193
- package/dist/react-text-annotator.es14.js.map +1 -1
- package/dist/react-text-annotator.es15.js +9 -584
- package/dist/react-text-annotator.es15.js.map +1 -1
- package/dist/react-text-annotator.es17.js +592 -33
- package/dist/react-text-annotator.es17.js.map +1 -1
- package/dist/react-text-annotator.es18.js +282 -2
- package/dist/react-text-annotator.es18.js.map +1 -1
- package/dist/react-text-annotator.es19.js +13 -29
- package/dist/react-text-annotator.es19.js.map +1 -1
- package/dist/react-text-annotator.es2.js +5 -2
- package/dist/react-text-annotator.es2.js.map +1 -1
- package/dist/react-text-annotator.es20.js +2 -898
- package/dist/react-text-annotator.es20.js.map +1 -1
- package/dist/react-text-annotator.es21.js +31 -2
- package/dist/react-text-annotator.es21.js.map +1 -1
- package/dist/react-text-annotator.es22.js +888 -2
- package/dist/react-text-annotator.es22.js.map +1 -1
- package/dist/react-text-annotator.es23.js +111 -124
- package/dist/react-text-annotator.es23.js.map +1 -1
- package/dist/react-text-annotator.es24.js +285 -140
- package/dist/react-text-annotator.es24.js.map +1 -1
- package/dist/react-text-annotator.es25.js +43 -296
- package/dist/react-text-annotator.es25.js.map +1 -1
- package/dist/react-text-annotator.es26.js +19 -113
- package/dist/react-text-annotator.es26.js.map +1 -1
- package/dist/react-text-annotator.es27.js +2 -309
- package/dist/react-text-annotator.es27.js.map +1 -1
- package/dist/react-text-annotator.es28.js +2 -58
- package/dist/react-text-annotator.es28.js.map +1 -1
- package/dist/react-text-annotator.es29.js +124 -17
- package/dist/react-text-annotator.es29.js.map +1 -1
- package/dist/react-text-annotator.es3.js +3 -3
- package/dist/react-text-annotator.es3.js.map +1 -1
- package/dist/react-text-annotator.es30.js +146 -131
- package/dist/react-text-annotator.es30.js.map +1 -1
- package/dist/react-text-annotator.es31.js +281 -533
- package/dist/react-text-annotator.es31.js.map +1 -1
- package/dist/react-text-annotator.es32.js +152 -0
- package/dist/react-text-annotator.es32.js.map +1 -0
- package/dist/react-text-annotator.es33.js +629 -0
- package/dist/react-text-annotator.es33.js.map +1 -0
- package/dist/react-text-annotator.es4.js +2 -2
- package/dist/react-text-annotator.es4.js.map +1 -1
- package/dist/react-text-annotator.es5.js +43 -24
- package/dist/react-text-annotator.es5.js.map +1 -1
- package/dist/react-text-annotator.es6.js +23 -122
- package/dist/react-text-annotator.es6.js.map +1 -1
- package/dist/react-text-annotator.es7.js +133 -537
- package/dist/react-text-annotator.es7.js.map +1 -1
- package/dist/react-text-annotator.es8.js +2 -9
- package/dist/react-text-annotator.es8.js.map +1 -1
- package/dist/tei/CETEIcean.d.ts +1 -0
- package/dist/tei/CETEIcean.d.ts.map +1 -1
- package/dist/tei/TEIAnnotator.d.ts +1 -1
- package/dist/tei/TEIAnnotator.d.ts.map +1 -1
- package/package.json +16 -14
- package/dist/TextAnnotatorPopup/TextAnnotatorPopup.d.ts +0 -25
- package/dist/TextAnnotatorPopup/TextAnnotatorPopup.d.ts.map +0 -1
- package/dist/TextAnnotatorPopup/index.d.ts +0 -2
- package/dist/TextAnnotatorPopup/index.d.ts.map +0 -1
- package/dist/TextAnnotatorPopup/isMobile.d.ts.map +0 -1
- package/dist/react-text-annotator.es16.js +0 -85
- package/dist/react-text-annotator.es16.js.map +0 -1
- /package/dist/{TextAnnotatorPopup → TextAnnotationPopup}/isMobile.d.ts +0 -0
|
@@ -1,152 +1,167 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const round = Math.round;
|
|
4
|
-
const floor = Math.floor;
|
|
5
|
-
const createCoords = (v) => ({
|
|
6
|
-
x: v,
|
|
7
|
-
y: v
|
|
8
|
-
});
|
|
9
|
-
const oppositeSideMap = {
|
|
10
|
-
left: "right",
|
|
11
|
-
right: "left",
|
|
12
|
-
bottom: "top",
|
|
13
|
-
top: "bottom"
|
|
14
|
-
};
|
|
15
|
-
const oppositeAlignmentMap = {
|
|
16
|
-
start: "end",
|
|
17
|
-
end: "start"
|
|
18
|
-
};
|
|
19
|
-
function clamp(start, value, end) {
|
|
20
|
-
return max(start, min(value, end));
|
|
21
|
-
}
|
|
22
|
-
function evaluate(value, param) {
|
|
23
|
-
return typeof value === "function" ? value(param) : value;
|
|
24
|
-
}
|
|
25
|
-
function getSide(placement) {
|
|
26
|
-
return placement.split("-")[0];
|
|
1
|
+
function hasWindow() {
|
|
2
|
+
return typeof window !== "undefined";
|
|
27
3
|
}
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return
|
|
4
|
+
function getNodeName(node) {
|
|
5
|
+
if (isNode(node)) {
|
|
6
|
+
return (node.nodeName || "").toLowerCase();
|
|
7
|
+
}
|
|
8
|
+
return "#document";
|
|
33
9
|
}
|
|
34
|
-
function
|
|
35
|
-
|
|
10
|
+
function getWindow(node) {
|
|
11
|
+
var _node$ownerDocument;
|
|
12
|
+
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
36
13
|
}
|
|
37
|
-
function
|
|
38
|
-
|
|
14
|
+
function getDocumentElement(node) {
|
|
15
|
+
var _ref;
|
|
16
|
+
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
39
17
|
}
|
|
40
|
-
function
|
|
41
|
-
|
|
18
|
+
function isNode(value) {
|
|
19
|
+
if (!hasWindow()) {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
42
23
|
}
|
|
43
|
-
function
|
|
44
|
-
if (
|
|
45
|
-
|
|
24
|
+
function isElement(value) {
|
|
25
|
+
if (!hasWindow()) {
|
|
26
|
+
return false;
|
|
46
27
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
28
|
+
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
29
|
+
}
|
|
30
|
+
function isHTMLElement(value) {
|
|
31
|
+
if (!hasWindow()) {
|
|
32
|
+
return false;
|
|
53
33
|
}
|
|
54
|
-
return
|
|
55
|
-
}
|
|
56
|
-
function
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
function getOppositeAlignmentPlacement(placement) {
|
|
61
|
-
return placement.replace(/start|end/g, (alignment) => oppositeAlignmentMap[alignment]);
|
|
62
|
-
}
|
|
63
|
-
function getSideList(side, isStart, rtl) {
|
|
64
|
-
const lr = ["left", "right"];
|
|
65
|
-
const rl = ["right", "left"];
|
|
66
|
-
const tb = ["top", "bottom"];
|
|
67
|
-
const bt = ["bottom", "top"];
|
|
68
|
-
switch (side) {
|
|
69
|
-
case "top":
|
|
70
|
-
case "bottom":
|
|
71
|
-
if (rtl) return isStart ? rl : lr;
|
|
72
|
-
return isStart ? lr : rl;
|
|
73
|
-
case "left":
|
|
74
|
-
case "right":
|
|
75
|
-
return isStart ? tb : bt;
|
|
76
|
-
default:
|
|
77
|
-
return [];
|
|
34
|
+
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
35
|
+
}
|
|
36
|
+
function isShadowRoot(value) {
|
|
37
|
+
if (!hasWindow() || typeof ShadowRoot === "undefined") {
|
|
38
|
+
return false;
|
|
78
39
|
}
|
|
40
|
+
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
79
41
|
}
|
|
80
|
-
function
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
42
|
+
function isOverflowElement(element) {
|
|
43
|
+
const {
|
|
44
|
+
overflow,
|
|
45
|
+
overflowX,
|
|
46
|
+
overflowY,
|
|
47
|
+
display
|
|
48
|
+
} = getComputedStyle(element);
|
|
49
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !["inline", "contents"].includes(display);
|
|
50
|
+
}
|
|
51
|
+
function isTableElement(element) {
|
|
52
|
+
return ["table", "td", "th"].includes(getNodeName(element));
|
|
53
|
+
}
|
|
54
|
+
function isTopLayer(element) {
|
|
55
|
+
return [":popover-open", ":modal"].some((selector) => {
|
|
56
|
+
try {
|
|
57
|
+
return element.matches(selector);
|
|
58
|
+
} catch (e) {
|
|
59
|
+
return false;
|
|
87
60
|
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function isContainingBlock(elementOrCss) {
|
|
64
|
+
const webkit = isWebKit();
|
|
65
|
+
const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
|
|
66
|
+
return ["transform", "translate", "scale", "rotate", "perspective"].some((value) => css[value] ? css[value] !== "none" : false) || (css.containerType ? css.containerType !== "normal" : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== "none" : false) || !webkit && (css.filter ? css.filter !== "none" : false) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((value) => (css.willChange || "").includes(value)) || ["paint", "layout", "strict", "content"].some((value) => (css.contain || "").includes(value));
|
|
67
|
+
}
|
|
68
|
+
function getContainingBlock(element) {
|
|
69
|
+
let currentNode = getParentNode(element);
|
|
70
|
+
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
71
|
+
if (isContainingBlock(currentNode)) {
|
|
72
|
+
return currentNode;
|
|
73
|
+
} else if (isTopLayer(currentNode)) {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
currentNode = getParentNode(currentNode);
|
|
88
77
|
}
|
|
89
|
-
return
|
|
78
|
+
return null;
|
|
90
79
|
}
|
|
91
|
-
function
|
|
92
|
-
|
|
80
|
+
function isWebKit() {
|
|
81
|
+
if (typeof CSS === "undefined" || !CSS.supports) return false;
|
|
82
|
+
return CSS.supports("-webkit-backdrop-filter", "none");
|
|
93
83
|
}
|
|
94
|
-
function
|
|
95
|
-
return
|
|
96
|
-
top: 0,
|
|
97
|
-
right: 0,
|
|
98
|
-
bottom: 0,
|
|
99
|
-
left: 0,
|
|
100
|
-
...padding
|
|
101
|
-
};
|
|
84
|
+
function isLastTraversableNode(node) {
|
|
85
|
+
return ["html", "body", "#document"].includes(getNodeName(node));
|
|
102
86
|
}
|
|
103
|
-
function
|
|
104
|
-
return
|
|
105
|
-
top: padding,
|
|
106
|
-
right: padding,
|
|
107
|
-
bottom: padding,
|
|
108
|
-
left: padding
|
|
109
|
-
};
|
|
87
|
+
function getComputedStyle(element) {
|
|
88
|
+
return getWindow(element).getComputedStyle(element);
|
|
110
89
|
}
|
|
111
|
-
function
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
90
|
+
function getNodeScroll(element) {
|
|
91
|
+
if (isElement(element)) {
|
|
92
|
+
return {
|
|
93
|
+
scrollLeft: element.scrollLeft,
|
|
94
|
+
scrollTop: element.scrollTop
|
|
95
|
+
};
|
|
96
|
+
}
|
|
118
97
|
return {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
top: y,
|
|
122
|
-
left: x,
|
|
123
|
-
right: x + width,
|
|
124
|
-
bottom: y + height,
|
|
125
|
-
x,
|
|
126
|
-
y
|
|
98
|
+
scrollLeft: element.scrollX,
|
|
99
|
+
scrollTop: element.scrollY
|
|
127
100
|
};
|
|
128
101
|
}
|
|
102
|
+
function getParentNode(node) {
|
|
103
|
+
if (getNodeName(node) === "html") {
|
|
104
|
+
return node;
|
|
105
|
+
}
|
|
106
|
+
const result = (
|
|
107
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
108
|
+
node.assignedSlot || // DOM Element detected.
|
|
109
|
+
node.parentNode || // ShadowRoot detected.
|
|
110
|
+
isShadowRoot(node) && node.host || // Fallback.
|
|
111
|
+
getDocumentElement(node)
|
|
112
|
+
);
|
|
113
|
+
return isShadowRoot(result) ? result.host : result;
|
|
114
|
+
}
|
|
115
|
+
function getNearestOverflowAncestor(node) {
|
|
116
|
+
const parentNode = getParentNode(node);
|
|
117
|
+
if (isLastTraversableNode(parentNode)) {
|
|
118
|
+
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
119
|
+
}
|
|
120
|
+
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
121
|
+
return parentNode;
|
|
122
|
+
}
|
|
123
|
+
return getNearestOverflowAncestor(parentNode);
|
|
124
|
+
}
|
|
125
|
+
function getOverflowAncestors(node, list, traverseIframes) {
|
|
126
|
+
var _node$ownerDocument2;
|
|
127
|
+
if (list === void 0) {
|
|
128
|
+
list = [];
|
|
129
|
+
}
|
|
130
|
+
if (traverseIframes === void 0) {
|
|
131
|
+
traverseIframes = true;
|
|
132
|
+
}
|
|
133
|
+
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
134
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
135
|
+
const win = getWindow(scrollableAncestor);
|
|
136
|
+
if (isBody) {
|
|
137
|
+
const frameElement = getFrameElement(win);
|
|
138
|
+
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
139
|
+
}
|
|
140
|
+
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
141
|
+
}
|
|
142
|
+
function getFrameElement(win) {
|
|
143
|
+
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
144
|
+
}
|
|
129
145
|
export {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
round
|
|
146
|
+
getComputedStyle,
|
|
147
|
+
getContainingBlock,
|
|
148
|
+
getDocumentElement,
|
|
149
|
+
getFrameElement,
|
|
150
|
+
getNearestOverflowAncestor,
|
|
151
|
+
getNodeName,
|
|
152
|
+
getNodeScroll,
|
|
153
|
+
getOverflowAncestors,
|
|
154
|
+
getParentNode,
|
|
155
|
+
getWindow,
|
|
156
|
+
isContainingBlock,
|
|
157
|
+
isElement,
|
|
158
|
+
isHTMLElement,
|
|
159
|
+
isLastTraversableNode,
|
|
160
|
+
isNode,
|
|
161
|
+
isOverflowElement,
|
|
162
|
+
isShadowRoot,
|
|
163
|
+
isTableElement,
|
|
164
|
+
isTopLayer,
|
|
165
|
+
isWebKit
|
|
151
166
|
};
|
|
152
167
|
//# sourceMappingURL=react-text-annotator.es30.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-text-annotator.es30.js","sources":["../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"react-text-annotator.es30.js","sources":["../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs"],"sourcesContent":["function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);\n}\nfunction isTableElement(element) {\n return ['table', 'td', 'th'].includes(getNodeName(element));\n}\nfunction isTopLayer(element) {\n return [':popover-open', ':modal'].some(selector => {\n try {\n return element.matches(selector);\n } catch (e) {\n return false;\n }\n });\n}\nfunction isContainingBlock(elementOrCss) {\n const webkit = isWebKit();\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n // https://drafts.csswg.org/css-transforms-2/#individual-transforms\n return ['transform', 'translate', 'scale', 'rotate', 'perspective'].some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (typeof CSS === 'undefined' || !CSS.supports) return false;\n return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nfunction isLastTraversableNode(node) {\n return ['html', 'body', '#document'].includes(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n"],"names":[],"mappings":"AAAA,SAAS,YAAY;AACnB,SAAO,OAAO,WAAW;AAC3B;AACA,SAAS,YAAY,MAAM;AACzB,MAAI,OAAO,IAAI,GAAG;AAChB,YAAQ,KAAK,YAAY,IAAI,YAAa;AAAA,EAC9C;AAIE,SAAO;AACT;AACA,SAAS,UAAU,MAAM;AACvB,MAAI;AACJ,UAAQ,QAAQ,SAAS,sBAAsB,KAAK,kBAAkB,OAAO,SAAS,oBAAoB,gBAAgB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