@annotorious/react 3.7.20 → 3.7.21
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/annotorious-react.es11.js.map +1 -1
- package/dist/annotorious-react.es14.js.map +1 -1
- package/dist/annotorious-react.es16.js +188 -187
- package/dist/annotorious-react.es16.js.map +1 -1
- package/dist/annotorious-react.es17.js +113 -93
- package/dist/annotorious-react.es17.js.map +1 -1
- package/dist/annotorious-react.es20.js +97 -97
- package/dist/annotorious-react.es20.js.map +1 -1
- package/dist/annotorious-react.es24.js +66 -68
- package/dist/annotorious-react.es24.js.map +1 -1
- package/dist/annotorious-react.es25.js +214 -214
- package/dist/annotorious-react.es25.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
function
|
|
1
|
+
function u() {
|
|
2
2
|
return typeof window < "u";
|
|
3
3
|
}
|
|
4
|
-
function
|
|
5
|
-
return
|
|
4
|
+
function a(t) {
|
|
5
|
+
return m(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
6
6
|
}
|
|
7
7
|
function i(t) {
|
|
8
|
-
var
|
|
9
|
-
return (t == null || (
|
|
8
|
+
var n;
|
|
9
|
+
return (t == null || (n = t.ownerDocument) == null ? void 0 : n.defaultView) || window;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
var
|
|
13
|
-
return (
|
|
14
|
-
}
|
|
15
|
-
function p(t) {
|
|
16
|
-
return c() ? t instanceof Node || t instanceof i(t).Node : !1;
|
|
11
|
+
function L(t) {
|
|
12
|
+
var n;
|
|
13
|
+
return (n = (m(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : n.documentElement;
|
|
17
14
|
}
|
|
18
15
|
function m(t) {
|
|
19
|
-
return
|
|
16
|
+
return u() ? t instanceof Node || t instanceof i(t).Node : !1;
|
|
20
17
|
}
|
|
21
|
-
function
|
|
22
|
-
return
|
|
18
|
+
function h(t) {
|
|
19
|
+
return u() ? t instanceof Element || t instanceof i(t).Element : !1;
|
|
23
20
|
}
|
|
24
|
-
function
|
|
25
|
-
return
|
|
21
|
+
function g(t) {
|
|
22
|
+
return u() ? t instanceof HTMLElement || t instanceof i(t).HTMLElement : !1;
|
|
23
|
+
}
|
|
24
|
+
function p(t) {
|
|
25
|
+
return !u() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof i(t).ShadowRoot;
|
|
26
26
|
}
|
|
27
|
-
const E = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
28
27
|
function y(t) {
|
|
29
28
|
const {
|
|
30
|
-
overflow:
|
|
31
|
-
overflowX:
|
|
32
|
-
overflowY:
|
|
33
|
-
display:
|
|
34
|
-
} =
|
|
35
|
-
return /auto|scroll|overlay|hidden|clip/.test(
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
if (
|
|
29
|
+
overflow: n,
|
|
30
|
+
overflowX: r,
|
|
31
|
+
overflowY: c,
|
|
32
|
+
display: e
|
|
33
|
+
} = b(t);
|
|
34
|
+
return /auto|scroll|overlay|hidden|clip/.test(n + c + r) && e !== "inline" && e !== "contents";
|
|
35
|
+
}
|
|
36
|
+
function _(t) {
|
|
37
|
+
return /^(table|td|th)$/.test(a(t));
|
|
38
|
+
}
|
|
39
|
+
function T(t) {
|
|
40
|
+
try {
|
|
41
|
+
if (t.matches(":popover-open"))
|
|
42
|
+
return !0;
|
|
43
|
+
} catch {
|
|
44
|
+
}
|
|
45
|
+
try {
|
|
46
|
+
return t.matches(":modal");
|
|
47
|
+
} catch {
|
|
48
|
+
return !1;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const v = /transform|translate|scale|rotate|perspective|filter/, C = /paint|layout|strict|content/, o = (t) => !!t && t !== "none";
|
|
52
|
+
let s;
|
|
53
|
+
function D(t) {
|
|
54
|
+
const n = h(t) ? b(t) : t;
|
|
55
|
+
return o(n.transform) || o(n.translate) || o(n.scale) || o(n.rotate) || o(n.perspective) || !R() && (o(n.backdropFilter) || o(n.filter)) || v.test(n.willChange || "") || C.test(n.contain || "");
|
|
56
|
+
}
|
|
57
|
+
function W(t) {
|
|
58
|
+
let n = f(t);
|
|
59
|
+
for (; g(n) && !N(n); ) {
|
|
60
|
+
if (D(n))
|
|
61
|
+
return n;
|
|
62
|
+
if (T(n))
|
|
62
63
|
return null;
|
|
63
|
-
|
|
64
|
+
n = f(n);
|
|
64
65
|
}
|
|
65
66
|
return null;
|
|
66
67
|
}
|
|
67
|
-
function
|
|
68
|
-
return typeof CSS
|
|
68
|
+
function R() {
|
|
69
|
+
return s == null && (s = typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")), s;
|
|
69
70
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
return R.has(u(t));
|
|
71
|
+
function N(t) {
|
|
72
|
+
return /^(html|body|#document)$/.test(a(t));
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function b(t) {
|
|
75
75
|
return i(t).getComputedStyle(t);
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
return
|
|
77
|
+
function $(t) {
|
|
78
|
+
return h(t) ? {
|
|
79
79
|
scrollLeft: t.scrollLeft,
|
|
80
80
|
scrollTop: t.scrollTop
|
|
81
81
|
} : {
|
|
@@ -83,55 +83,55 @@ function F(t) {
|
|
|
83
83
|
scrollTop: t.scrollY
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
if (
|
|
86
|
+
function f(t) {
|
|
87
|
+
if (a(t) === "html")
|
|
88
88
|
return t;
|
|
89
|
-
const
|
|
89
|
+
const n = (
|
|
90
90
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
91
91
|
t.assignedSlot || // DOM Element detected.
|
|
92
92
|
t.parentNode || // ShadowRoot detected.
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
p(t) && t.host || // Fallback.
|
|
94
|
+
L(t)
|
|
95
95
|
);
|
|
96
|
-
return
|
|
97
|
-
}
|
|
98
|
-
function b(t) {
|
|
99
|
-
const e = s(t);
|
|
100
|
-
return h(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : w(e) && y(e) ? e : b(e);
|
|
101
|
-
}
|
|
102
|
-
function d(t, e, n) {
|
|
103
|
-
var o;
|
|
104
|
-
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
105
|
-
const r = b(t), g = r === ((o = t.ownerDocument) == null ? void 0 : o.body), l = i(r);
|
|
106
|
-
if (g) {
|
|
107
|
-
const a = _(l);
|
|
108
|
-
return e.concat(l, l.visualViewport || [], y(r) ? r : [], a && n ? d(a) : []);
|
|
109
|
-
}
|
|
110
|
-
return e.concat(r, d(r, [], n));
|
|
96
|
+
return p(n) ? n.host : n;
|
|
111
97
|
}
|
|
112
|
-
function
|
|
98
|
+
function S(t) {
|
|
99
|
+
const n = f(t);
|
|
100
|
+
return N(n) ? t.ownerDocument ? t.ownerDocument.body : t.body : g(n) && y(n) ? n : S(n);
|
|
101
|
+
}
|
|
102
|
+
function w(t, n, r) {
|
|
103
|
+
var c;
|
|
104
|
+
n === void 0 && (n = []), r === void 0 && (r = !0);
|
|
105
|
+
const e = S(t), E = e === ((c = t.ownerDocument) == null ? void 0 : c.body), l = i(e);
|
|
106
|
+
if (E) {
|
|
107
|
+
const d = k(l);
|
|
108
|
+
return n.concat(l, l.visualViewport || [], y(e) ? e : [], d && r ? w(d) : []);
|
|
109
|
+
} else
|
|
110
|
+
return n.concat(e, w(e, [], r));
|
|
111
|
+
}
|
|
112
|
+
function k(t) {
|
|
113
113
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
114
114
|
}
|
|
115
115
|
export {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
116
|
+
b as getComputedStyle,
|
|
117
|
+
W as getContainingBlock,
|
|
118
|
+
L as getDocumentElement,
|
|
119
|
+
k as getFrameElement,
|
|
120
|
+
S as getNearestOverflowAncestor,
|
|
121
|
+
a as getNodeName,
|
|
122
|
+
$ as getNodeScroll,
|
|
123
|
+
w as getOverflowAncestors,
|
|
124
|
+
f as getParentNode,
|
|
125
125
|
i as getWindow,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
126
|
+
D as isContainingBlock,
|
|
127
|
+
h as isElement,
|
|
128
|
+
g as isHTMLElement,
|
|
129
|
+
N as isLastTraversableNode,
|
|
130
|
+
m as isNode,
|
|
131
131
|
y as isOverflowElement,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
p as isShadowRoot,
|
|
133
|
+
_ as isTableElement,
|
|
134
|
+
T as isTopLayer,
|
|
135
|
+
R as isWebKit
|
|
136
136
|
};
|
|
137
137
|
//# sourceMappingURL=annotorious-react.es20.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotorious-react.es20.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}\nconst invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);\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) && !invalidOverflowDisplayValues.has(display);\n}\nconst tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);\nfunction isTableElement(element) {\n return tableElements.has(getNodeName(element));\n}\nconst topLayerSelectors = [':popover-open', ':modal'];\nfunction isTopLayer(element) {\n return topLayerSelectors.some(selector => {\n try {\n return element.matches(selector);\n } catch (_e) {\n return false;\n }\n });\n}\nconst transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];\nconst willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];\nconst containValues = ['paint', 'layout', 'strict', 'content'];\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 transformProperties.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) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.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}\nconst lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);\nfunction isLastTraversableNode(node) {\n return lastTraversableNodeNames.has(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":["hasWindow","getNodeName","node","isNode","getWindow","_node$ownerDocument","getDocumentElement","_ref","value","isElement","isHTMLElement","isShadowRoot","invalidOverflowDisplayValues","isOverflowElement","element","overflow","overflowX","overflowY","display","getComputedStyle","tableElements","isTableElement","topLayerSelectors","isTopLayer","selector","transformProperties","willChangeValues","containValues","isContainingBlock","elementOrCss","webkit","isWebKit","css","getContainingBlock","currentNode","getParentNode","isLastTraversableNode","lastTraversableNodeNames","getNodeScroll","result","getNearestOverflowAncestor","parentNode","getOverflowAncestors","list","traverseIframes","_node$ownerDocument2","scrollableAncestor","isBody","win","frameElement","getFrameElement"],"mappings":"AAAA,SAASA,IAAY;AACnB,SAAO,OAAO,SAAW;AAC3B;AACA,SAASC,EAAYC,GAAM;AACzB,SAAIC,EAAOD,CAAI,KACLA,EAAK,YAAY,IAAI,YAAW,IAKnC;AACT;AACA,SAASE,EAAUF,GAAM;AACvB,MAAIG;AACJ,UAAQH,KAAQ,SAASG,IAAsBH,EAAK,kBAAkB,OA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I,EAAE;AAAA,EAC9L;AACA,SAAON,EAAK,OAAOG,GAAoBJ,EAAqBI,GAAoB,CAAA,GAAIF,CAAe,CAAC;AACtG;AACA,SAASM,EAAgBF,GAAK;AAC5B,SAAOA,EAAI,UAAU,OAAO,eAAeA,EAAI,MAAM,IAAIA,EAAI,eAAe;AAC9E;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"annotorious-react.es20.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) && display !== 'inline' && display !== 'contents';\n}\nfunction isTableElement(element) {\n return /^(table|td|th)$/.test(getNodeName(element));\n}\nfunction isTopLayer(element) {\n try {\n if (element.matches(':popover-open')) {\n return true;\n }\n } catch (_e) {\n // no-op\n }\n try {\n return element.matches(':modal');\n } catch (_e) {\n return false;\n }\n}\nconst willChangeRe = /transform|translate|scale|rotate|perspective|filter/;\nconst containRe = /paint|layout|strict|content/;\nconst isNotNone = value => !!value && value !== 'none';\nlet isWebKitValue;\nfunction isContainingBlock(elementOrCss) {\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 isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');\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 (isWebKitValue == null) {\n isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');\n }\n return isWebKitValue;\n}\nfunction isLastTraversableNode(node) {\n return /^(html|body|#document)$/.test(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 } else {\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n }\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":["hasWindow","getNodeName","node","isNode","getWindow","_node$ownerDocument","getDocumentElement","_ref","value","isElement","isHTMLElement","isShadowRoot","isOverflowElement","element","overflow","overflowX","overflowY","display","getComputedStyle","isTableElement","isTopLayer","willChangeRe","containRe","isNotNone","isWebKitValue","isContainingBlock","elementOrCss","css","isWebKit","getContainingBlock","currentNode","getParentNode","isLastTraversableNode","getNodeScroll","result","getNearestOverflowAncestor","parentNode","getOverflowAncestors","list","traverseIframes","_node$ownerDocument2","scrollableAncestor","isBody","win","frameElement","getFrameElement"],"mappings":"AAAA,SAASA,IAAY;AACnB,SAAO,OAAO,SAAW;AAC3B;AACA,SAASC,EAAYC,GAAM;AACzB,SAAIC,EAAOD,CAAI,KACLA,EAAK,YAAY,IAAI,YAAW,IAKnC;AACT;AACA,SAASE,EAAUF,GAAM;AACvB,MAAIG;AACJ,UAAQH,KAAQ,SAASG,IAAsBH,EAAK,kBAAkB,OAAO,SAASG,EAAoB,gBAAgB;AAC5H;AACA,SAASC,EAAmBJ,GAAM;AAChC,MAAIK;AACJ,UAAQA,KAAQJ,EAAOD,CAAI,IAAIA,EAAK,gBAAgBA,EAAK,aAAa,OAAO,aAAa,OAAO,SAASK,EAAK;AACjH;AACA,SAASJ,EAAOK,GAAO;AACrB,SAAKR,EAAS,IAGPQ,aAAiB,QAAQA,aAAiBJ,EAAUI,CAAK,EAAE,OAFzD;AAGX;AACA,SAASC,EAAUD,GAAO;AACxB,SAAKR,EAAS,IAGPQ,aAAiB,WAAWA,aAAiBJ,EAAUI,CAAK,EAAE,UAF5D;AAGX;AACA,SAASE,EAAcF,GAAO;AAC5B,SAAKR,EAAS,IAGPQ,aAAiB,eAAeA,aAAiBJ,EAAUI,CAAK,EAAE,cAFhE;AAGX;AACA,SAASG,EAAaH,GAAO;AAC3B,SAAI,CAACR,EAAS,KAAM,OAAO,aAAe,MACjC,KAEFQ,aAAiB,cAAcA,aAAiBJ,EAAUI,CAAK,EAAE;AAC1E;AACA,SAASI,EAAkBC,GAAS;AAClC,QAAM;AAAA,IACJ,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,SAAAC;AAAA,EACJ,IAAMC,EAAiBL,CAAO;AAC5B,SAAO,kCAAkC,KAAKC,IAAWE,IAAYD,CAAS,KAAKE,MAAY,YAAYA,MAAY;AACzH;AACA,SAASE,EAAeN,GAAS;AAC/B,SAAO,kBAAkB,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AAqBI,GAAoB,CAAA,GAAIF,CAAe,CAAC;AAExG;AACA,SAASM,EAAgBF,GAAK;AAC5B,SAAOA,EAAI,UAAU,OAAO,eAAeA,EAAI,MAAM,IAAIA,EAAI,eAAe;AAC9E;","x_google_ignoreList":[0]}
|
|
@@ -1,75 +1,73 @@
|
|
|
1
|
-
const m = Math.min,
|
|
1
|
+
const m = Math.min, h = Math.max, S = Math.round, w = Math.floor, C = (t) => ({
|
|
2
2
|
x: t,
|
|
3
3
|
y: t
|
|
4
|
-
}),
|
|
4
|
+
}), p = {
|
|
5
5
|
left: "right",
|
|
6
6
|
right: "left",
|
|
7
7
|
bottom: "top",
|
|
8
8
|
top: "bottom"
|
|
9
|
-
}, x = {
|
|
10
|
-
start: "end",
|
|
11
|
-
end: "start"
|
|
12
9
|
};
|
|
13
|
-
function
|
|
14
|
-
return
|
|
10
|
+
function j(t, n, e) {
|
|
11
|
+
return h(t, m(n, e));
|
|
15
12
|
}
|
|
16
|
-
function
|
|
17
|
-
return typeof t == "function" ? t(
|
|
13
|
+
function L(t, n) {
|
|
14
|
+
return typeof t == "function" ? t(n) : t;
|
|
18
15
|
}
|
|
19
|
-
function
|
|
16
|
+
function g(t) {
|
|
20
17
|
return t.split("-")[0];
|
|
21
18
|
}
|
|
22
|
-
function
|
|
19
|
+
function a(t) {
|
|
23
20
|
return t.split("-")[1];
|
|
24
21
|
}
|
|
25
|
-
function
|
|
22
|
+
function x(t) {
|
|
26
23
|
return t === "x" ? "y" : "x";
|
|
27
24
|
}
|
|
28
|
-
function
|
|
25
|
+
function b(t) {
|
|
29
26
|
return t === "y" ? "height" : "width";
|
|
30
27
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return
|
|
28
|
+
function d(t) {
|
|
29
|
+
const n = t[0];
|
|
30
|
+
return n === "t" || n === "b" ? "y" : "x";
|
|
34
31
|
}
|
|
35
|
-
function
|
|
36
|
-
return
|
|
32
|
+
function A(t) {
|
|
33
|
+
return x(d(t));
|
|
37
34
|
}
|
|
38
|
-
function
|
|
39
|
-
|
|
40
|
-
const r =
|
|
41
|
-
let c = i === "x" ? r === (
|
|
42
|
-
return
|
|
35
|
+
function E(t, n, e) {
|
|
36
|
+
e === void 0 && (e = !1);
|
|
37
|
+
const r = a(t), i = A(t), o = b(i);
|
|
38
|
+
let c = i === "x" ? r === (e ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
39
|
+
return n.reference[o] > n.floating[o] && (c = u(c)), [c, u(c)];
|
|
43
40
|
}
|
|
44
|
-
function
|
|
45
|
-
const
|
|
46
|
-
return [s(t),
|
|
41
|
+
function R(t) {
|
|
42
|
+
const n = u(t);
|
|
43
|
+
return [s(t), n, s(n)];
|
|
47
44
|
}
|
|
48
45
|
function s(t) {
|
|
49
|
-
return t.replace(
|
|
46
|
+
return t.includes("start") ? t.replace("start", "end") : t.replace("end", "start");
|
|
50
47
|
}
|
|
51
|
-
const
|
|
52
|
-
function
|
|
48
|
+
const f = ["left", "right"], l = ["right", "left"], P = ["top", "bottom"], y = ["bottom", "top"];
|
|
49
|
+
function O(t, n, e) {
|
|
53
50
|
switch (t) {
|
|
54
51
|
case "top":
|
|
55
52
|
case "bottom":
|
|
56
|
-
return
|
|
53
|
+
return e ? n ? l : f : n ? f : l;
|
|
57
54
|
case "left":
|
|
58
55
|
case "right":
|
|
59
|
-
return
|
|
56
|
+
return n ? P : y;
|
|
60
57
|
default:
|
|
61
58
|
return [];
|
|
62
59
|
}
|
|
63
60
|
}
|
|
64
|
-
function
|
|
65
|
-
const i =
|
|
66
|
-
let o =
|
|
67
|
-
return i && (o = o.map((c) => c + "-" + i),
|
|
61
|
+
function T(t, n, e, r) {
|
|
62
|
+
const i = a(t);
|
|
63
|
+
let o = O(g(t), e === "start", r);
|
|
64
|
+
return i && (o = o.map((c) => c + "-" + i), n && (o = o.concat(o.map(s)))), o;
|
|
68
65
|
}
|
|
69
|
-
function
|
|
70
|
-
|
|
66
|
+
function u(t) {
|
|
67
|
+
const n = g(t);
|
|
68
|
+
return p[n] + t.slice(n.length);
|
|
71
69
|
}
|
|
72
|
-
function
|
|
70
|
+
function M(t) {
|
|
73
71
|
return {
|
|
74
72
|
top: 0,
|
|
75
73
|
right: 0,
|
|
@@ -78,53 +76,53 @@ function w(t) {
|
|
|
78
76
|
...t
|
|
79
77
|
};
|
|
80
78
|
}
|
|
81
|
-
function
|
|
82
|
-
return typeof t != "number" ?
|
|
79
|
+
function k(t) {
|
|
80
|
+
return typeof t != "number" ? M(t) : {
|
|
83
81
|
top: t,
|
|
84
82
|
right: t,
|
|
85
83
|
bottom: t,
|
|
86
84
|
left: t
|
|
87
85
|
};
|
|
88
86
|
}
|
|
89
|
-
function
|
|
87
|
+
function q(t) {
|
|
90
88
|
const {
|
|
91
|
-
x:
|
|
92
|
-
y:
|
|
89
|
+
x: n,
|
|
90
|
+
y: e,
|
|
93
91
|
width: r,
|
|
94
92
|
height: i
|
|
95
93
|
} = t;
|
|
96
94
|
return {
|
|
97
95
|
width: r,
|
|
98
96
|
height: i,
|
|
99
|
-
top:
|
|
100
|
-
left:
|
|
101
|
-
right:
|
|
102
|
-
bottom:
|
|
103
|
-
x:
|
|
104
|
-
y:
|
|
97
|
+
top: e,
|
|
98
|
+
left: n,
|
|
99
|
+
right: n + r,
|
|
100
|
+
bottom: e + i,
|
|
101
|
+
x: n,
|
|
102
|
+
y: e
|
|
105
103
|
};
|
|
106
104
|
}
|
|
107
105
|
export {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
106
|
+
j as clamp,
|
|
107
|
+
C as createCoords,
|
|
108
|
+
L as evaluate,
|
|
109
|
+
M as expandPaddingObject,
|
|
110
|
+
w as floor,
|
|
111
|
+
a as getAlignment,
|
|
112
|
+
A as getAlignmentAxis,
|
|
113
|
+
E as getAlignmentSides,
|
|
114
|
+
b as getAxisLength,
|
|
115
|
+
R as getExpandedPlacements,
|
|
118
116
|
s as getOppositeAlignmentPlacement,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
117
|
+
x as getOppositeAxis,
|
|
118
|
+
T as getOppositeAxisPlacements,
|
|
119
|
+
u as getOppositePlacement,
|
|
120
|
+
k as getPaddingObject,
|
|
121
|
+
g as getSide,
|
|
122
|
+
d as getSideAxis,
|
|
123
|
+
h as max,
|
|
126
124
|
m as min,
|
|
127
|
-
|
|
128
|
-
|
|
125
|
+
q as rectToClientRect,
|
|
126
|
+
S as round
|
|
129
127
|
};
|
|
130
128
|
//# sourceMappingURL=annotorious-react.es24.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotorious-react.es24.js","sources":["../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs"],"sourcesContent":["/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\
|
|
1
|
+
{"version":3,"file":"annotorious-react.es24.js","sources":["../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs"],"sourcesContent":["/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n const firstChar = placement[0];\n return firstChar === 't' || firstChar === 'b' ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');\n}\nconst lrPlacement = ['left', 'right'];\nconst rlPlacement = ['right', 'left'];\nconst tbPlacement = ['top', 'bottom'];\nconst btPlacement = ['bottom', 'top'];\nfunction getSideList(side, isStart, rtl) {\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rlPlacement : lrPlacement;\n return isStart ? lrPlacement : rlPlacement;\n case 'left':\n case 'right':\n return isStart ? tbPlacement : btPlacement;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n const side = getSide(placement);\n return oppositeSideMap[side] + placement.slice(side.length);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n const {\n x,\n y,\n width,\n height\n } = rect;\n return {\n width,\n height,\n top: y,\n left: x,\n right: x + width,\n bottom: y + height,\n x,\n y\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n"],"names":["min","max","round","floor","createCoords","v","oppositeSideMap","clamp","start","value","end","evaluate","param","getSide","placement","getAlignment","getOppositeAxis","axis","getAxisLength","getSideAxis","firstChar","getAlignmentAxis","getAlignmentSides","rects","rtl","alignment","alignmentAxis","length","mainAlignmentSide","getOppositePlacement","getExpandedPlacements","oppositePlacement","getOppositeAlignmentPlacement","lrPlacement","rlPlacement","tbPlacement","btPlacement","getSideList","side","isStart","getOppositeAxisPlacements","flipAlignment","direction","list","expandPaddingObject","padding","getPaddingObject","rectToClientRect","rect","x","y","width","height"],"mappings":"AAQK,MAACA,IAAM,KAAK,KACXC,I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