@thednp/shorty 2.0.6 → 2.0.7
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/README.md +1 -1
- package/dist/shorty.cjs +1 -18
- package/dist/shorty.cjs.map +1 -1
- package/dist/shorty.d.ts +2033 -1720
- package/dist/shorty.js +1 -18
- package/dist/shorty.js.map +1 -1
- package/dist/shorty.mjs +506 -539
- package/dist/shorty.mjs.map +1 -1
- package/package.json +7 -8
- package/src/boolean/isApple.ts +10 -11
- package/src/boolean/isFirefox.ts +3 -5
- package/src/boolean/isMobile.ts +9 -14
- package/src/boolean/support3DTransform.ts +2 -5
- package/src/boolean/supportAnimation.ts +2 -5
- package/src/boolean/supportPassive.ts +4 -4
- package/src/boolean/supportTouch.ts +2 -1
- package/src/boolean/supportTransform.ts +2 -5
- package/src/boolean/supportTransition.ts +2 -5
- package/src/index.ts +85 -47
- package/src/strings/userAgentData.ts +2 -3
- package/test/boolean.test.ts +9 -9
- package/tsconfig.json +2 -1
- package/vite.config.mts +19 -0
- package/dts.config.ts +0 -16
package/dist/shorty.mjs
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
const
|
|
2
|
-
DOMContentLoaded:
|
|
3
|
-
DOMMouseScroll:
|
|
4
|
-
abort:
|
|
5
|
-
beforeunload:
|
|
6
|
-
blur:
|
|
7
|
-
change:
|
|
8
|
-
click:
|
|
9
|
-
contextmenu:
|
|
10
|
-
dblclick:
|
|
11
|
-
error:
|
|
12
|
-
focus:
|
|
13
|
-
focusin:
|
|
14
|
-
focusout:
|
|
15
|
-
gesturechange:
|
|
16
|
-
gestureend:
|
|
17
|
-
gesturestart:
|
|
18
|
-
hover:
|
|
19
|
-
keydown:
|
|
20
|
-
keypress:
|
|
21
|
-
keyup:
|
|
22
|
-
load:
|
|
23
|
-
mousedown:
|
|
24
|
-
mousemove:
|
|
25
|
-
mousein:
|
|
26
|
-
mouseout:
|
|
27
|
-
mouseenter:
|
|
28
|
-
mouseleave:
|
|
29
|
-
mouseover:
|
|
30
|
-
mouseup:
|
|
31
|
-
mousewheel:
|
|
32
|
-
move:
|
|
33
|
-
orientationchange:
|
|
34
|
-
pointercancel:
|
|
35
|
-
pointerdown:
|
|
36
|
-
pointerleave:
|
|
37
|
-
pointermove:
|
|
38
|
-
pointerup:
|
|
39
|
-
readystatechange:
|
|
40
|
-
reset:
|
|
41
|
-
resize:
|
|
42
|
-
scroll:
|
|
43
|
-
select:
|
|
44
|
-
selectend:
|
|
45
|
-
selectstart:
|
|
46
|
-
submit:
|
|
47
|
-
touchcancel:
|
|
48
|
-
touchend:
|
|
49
|
-
touchmove:
|
|
50
|
-
touchstart:
|
|
51
|
-
unload:
|
|
52
|
-
},
|
|
1
|
+
const ariaChecked = "aria-checked", ariaDescription = "aria-description", ariaDescribedBy = "aria-describedby", ariaExpanded = "aria-expanded", ariaHasPopup = "aria-haspopup", ariaHidden = "aria-hidden", ariaLabel = "aria-label", ariaLabelledBy = "aria-labelledby", ariaModal = "aria-modal", ariaPressed = "aria-pressed", ariaSelected = "aria-selected", ariaValueMin = "aria-valuemin", ariaValueMax = "aria-valuemax", ariaValueNow = "aria-valuenow", ariaValueText = "aria-valuetext", abortEvent = "abort", beforeunloadEvent = "beforeunload", blurEvent = "blur", changeEvent = "change", contextmenuEvent = "contextmenu", DOMContentLoadedEvent = "DOMContentLoaded", DOMMouseScrollEvent = "DOMMouseScroll", errorEvent = "error", focusEvent = "focus", focusinEvent = "focusin", focusoutEvent = "focusout", gesturechangeEvent = "gesturechange", gestureendEvent = "gestureend", gesturestartEvent = "gesturestart", keydownEvent = "keydown", keypressEvent = "keypress", keyupEvent = "keyup", loadEvent = "load", mouseclickEvent = "click", mousedblclickEvent = "dblclick", mousedownEvent = "mousedown", mouseupEvent = "mouseup", mousehoverEvent = "hover", mouseenterEvent = "mouseenter", mouseleaveEvent = "mouseleave", mouseinEvent = "mousein", mouseoutEvent = "mouseout", mouseoverEvent = "mouseover", mousemoveEvent = "mousemove", mousewheelEvent = "mousewheel", moveEvent = "move", orientationchangeEvent = "orientationchange", pointercancelEvent = "pointercancel", pointerdownEvent = "pointerdown", pointerleaveEvent = "pointerleave", pointermoveEvent = "pointermove", pointerupEvent = "pointerup", readystatechangeEvent = "readystatechange", resetEvent = "reset", resizeEvent = "resize", selectEvent = "select", selectendEvent = "selectend", selectstartEvent = "selectstart", scrollEvent = "scroll", submitEvent = "submit", touchstartEvent = "touchstart", touchmoveEvent = "touchmove", touchcancelEvent = "touchcancel", touchendEvent = "touchend", unloadEvent = "unload", nativeEvents = {
|
|
2
|
+
DOMContentLoaded: DOMContentLoadedEvent,
|
|
3
|
+
DOMMouseScroll: DOMMouseScrollEvent,
|
|
4
|
+
abort: abortEvent,
|
|
5
|
+
beforeunload: beforeunloadEvent,
|
|
6
|
+
blur: blurEvent,
|
|
7
|
+
change: changeEvent,
|
|
8
|
+
click: mouseclickEvent,
|
|
9
|
+
contextmenu: contextmenuEvent,
|
|
10
|
+
dblclick: mousedblclickEvent,
|
|
11
|
+
error: errorEvent,
|
|
12
|
+
focus: focusEvent,
|
|
13
|
+
focusin: focusinEvent,
|
|
14
|
+
focusout: focusoutEvent,
|
|
15
|
+
gesturechange: gesturechangeEvent,
|
|
16
|
+
gestureend: gestureendEvent,
|
|
17
|
+
gesturestart: gesturestartEvent,
|
|
18
|
+
hover: mousehoverEvent,
|
|
19
|
+
keydown: keydownEvent,
|
|
20
|
+
keypress: keypressEvent,
|
|
21
|
+
keyup: keyupEvent,
|
|
22
|
+
load: loadEvent,
|
|
23
|
+
mousedown: mousedownEvent,
|
|
24
|
+
mousemove: mousemoveEvent,
|
|
25
|
+
mousein: mouseinEvent,
|
|
26
|
+
mouseout: mouseoutEvent,
|
|
27
|
+
mouseenter: mouseenterEvent,
|
|
28
|
+
mouseleave: mouseleaveEvent,
|
|
29
|
+
mouseover: mouseoverEvent,
|
|
30
|
+
mouseup: mouseupEvent,
|
|
31
|
+
mousewheel: mousewheelEvent,
|
|
32
|
+
move: moveEvent,
|
|
33
|
+
orientationchange: orientationchangeEvent,
|
|
34
|
+
pointercancel: pointercancelEvent,
|
|
35
|
+
pointerdown: pointerdownEvent,
|
|
36
|
+
pointerleave: pointerleaveEvent,
|
|
37
|
+
pointermove: pointermoveEvent,
|
|
38
|
+
pointerup: pointerupEvent,
|
|
39
|
+
readystatechange: readystatechangeEvent,
|
|
40
|
+
reset: resetEvent,
|
|
41
|
+
resize: resizeEvent,
|
|
42
|
+
scroll: scrollEvent,
|
|
43
|
+
select: selectEvent,
|
|
44
|
+
selectend: selectendEvent,
|
|
45
|
+
selectstart: selectstartEvent,
|
|
46
|
+
submit: submitEvent,
|
|
47
|
+
touchcancel: touchcancelEvent,
|
|
48
|
+
touchend: touchendEvent,
|
|
49
|
+
touchmove: touchmoveEvent,
|
|
50
|
+
touchstart: touchstartEvent,
|
|
51
|
+
unload: unloadEvent
|
|
52
|
+
}, dragEvent = "drag", dragstartEvent = "dragstart", dragenterEvent = "dragenter", dragleaveEvent = "dragleave", dragoverEvent = "dragover", dragendEvent = "dragend", loadstartEvent = "loadstart", mouseSwipeEvents = {
|
|
53
53
|
start: "mousedown",
|
|
54
54
|
end: "mouseup",
|
|
55
55
|
move: "mousemove",
|
|
56
56
|
cancel: "mouseleave"
|
|
57
|
-
},
|
|
57
|
+
}, mouseClickEvents = { down: "mousedown", up: "mouseup" }, mouseHoverEvents = "onmouseleave" in document ? ["mouseenter", "mouseleave"] : (
|
|
58
58
|
/* istanbul ignore next @preserve */
|
|
59
59
|
["mouseover", "mouseout"]
|
|
60
|
-
),
|
|
60
|
+
), touchEvents = {
|
|
61
61
|
start: "touchstart",
|
|
62
62
|
end: "touchend",
|
|
63
63
|
move: "touchmove",
|
|
64
64
|
cancel: "touchcancel"
|
|
65
|
-
},
|
|
65
|
+
}, focusEvents = { in: "focusin", out: "focusout" }, focusableSelector = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]', keyboardEventKeys = {
|
|
66
66
|
Backspace: "Backspace",
|
|
67
67
|
// 8
|
|
68
68
|
Tab: "Tab",
|
|
@@ -101,7 +101,7 @@ const he = "aria-checked", ye = "aria-description", we = "aria-describedby", Ae
|
|
|
101
101
|
// 93
|
|
102
102
|
ScrollLock: "ScrollLock"
|
|
103
103
|
// 145
|
|
104
|
-
},
|
|
104
|
+
}, keyAlt = "Alt", keyArrowDown = "ArrowDown", keyArrowUp = "ArrowUp", keyArrowLeft = "ArrowLeft", keyArrowRight = "ArrowRight", keyBackspace = "Backspace", keyCapsLock = "CapsLock", keyControl = "Control", keyDelete = "Delete", keyEnter = "Enter", keyNumpadEnter = "NumpadEnter", keyEscape = "Escape", keyInsert = "Insert", keyMeta = "Meta", keyPause = "Pause", keyScrollLock = "ScrollLock", keyShift = "Shift", keySpace = "Space", keyTab = "Tab", animationDuration = "animationDuration", animationDelay = "animationDelay", animationName = "animationName", animationEndEvent = "animationend", transitionDuration = "transitionDuration", transitionDelay = "transitionDelay", transitionEndEvent = "transitionend", transitionProperty = "transitionProperty", addEventListener = "addEventListener", removeEventListener = "removeEventListener", bezierEasings = {
|
|
105
105
|
linear: "linear",
|
|
106
106
|
easingSinusoidalIn: "cubic-bezier(0.47,0,0.745,0.715)",
|
|
107
107
|
easingSinusoidalOut: "cubic-bezier(0.39,0.575,0.565,1)",
|
|
@@ -127,67 +127,59 @@ const he = "aria-checked", ye = "aria-description", we = "aria-describedby", Ae
|
|
|
127
127
|
easingBackIn: "cubic-bezier(0.6,-0.28,0.735,0.045)",
|
|
128
128
|
easingBackOut: "cubic-bezier(0.175,0.885,0.32,1.275)",
|
|
129
129
|
easingBackInOut: "cubic-bezier(0.68,-0.55,0.265,1.55)"
|
|
130
|
-
},
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
)
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
)
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
130
|
+
}, offsetHeight = "offsetHeight", offsetWidth = "offsetWidth", scrollHeight = "scrollHeight", scrollWidth = "scrollWidth", tabindex = "tabindex", userAgentData = navigator.userAgentData, { userAgent: userAgentString } = navigator, userAgent = userAgentString, isMobile = () => {
|
|
131
|
+
const mobileBrands = /iPhone|iPad|iPod|Android/i;
|
|
132
|
+
return navigator?.userAgentData?.brands.some(
|
|
133
|
+
(x) => mobileBrands.test(x.brand)
|
|
134
|
+
) || mobileBrands.test(navigator?.userAgent) || !1;
|
|
135
|
+
}, isApple = () => {
|
|
136
|
+
const appleBrands = /(iPhone|iPod|iPad)/;
|
|
137
|
+
return navigator?.userAgentData?.brands.some(
|
|
138
|
+
(x) => appleBrands.test(x.brand)
|
|
139
|
+
) || /* istanbul ignore next @preserve */
|
|
140
|
+
appleBrands.test(
|
|
141
|
+
navigator?.userAgent
|
|
142
|
+
) || !1;
|
|
143
|
+
}, isFirefox = () => navigator?.userAgent?.includes("Firefox") || /* istanbul ignore next @preserve */
|
|
144
|
+
!1, support3DTransform = () => ["webkitPerspective", "perspective"].some((p) => p in document.head.style), noop = () => {
|
|
145
|
+
}, on = (element, eventName, listener, options) => {
|
|
146
|
+
const ops = options || !1;
|
|
147
|
+
element.addEventListener(
|
|
148
|
+
eventName,
|
|
149
|
+
listener,
|
|
150
|
+
ops
|
|
150
151
|
);
|
|
151
|
-
},
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
152
|
+
}, off = (element, eventName, listener, options) => {
|
|
153
|
+
const ops = options || !1;
|
|
154
|
+
element.removeEventListener(
|
|
155
|
+
eventName,
|
|
156
|
+
listener,
|
|
157
|
+
ops
|
|
157
158
|
);
|
|
158
|
-
},
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
(c.target === t || c.currentTarget === t) && (n.apply(t, [c]), Q(t, e, s, o));
|
|
159
|
+
}, one = (element, eventName, listener, options) => {
|
|
160
|
+
const handlerWrapper = (e) => {
|
|
161
|
+
(e.target === element || e.currentTarget === element) && (listener.apply(element, [e]), off(element, eventName, handlerWrapper, options));
|
|
162
162
|
};
|
|
163
|
-
|
|
164
|
-
},
|
|
165
|
-
|
|
166
|
-
let t = !1;
|
|
163
|
+
on(element, eventName, handlerWrapper, options);
|
|
164
|
+
}, supportPassive = () => {
|
|
165
|
+
let result = !1;
|
|
167
166
|
try {
|
|
168
|
-
const
|
|
169
|
-
get: () => (
|
|
167
|
+
const opts = Object.defineProperty({}, "passive", {
|
|
168
|
+
get: () => (result = !0, result)
|
|
170
169
|
});
|
|
171
|
-
|
|
172
|
-
_t(document, P, $t, e);
|
|
170
|
+
one(document, DOMContentLoadedEvent, noop, opts);
|
|
173
171
|
} catch {
|
|
174
172
|
}
|
|
175
|
-
return
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
)
|
|
179
|
-
|
|
180
|
-
(
|
|
181
|
-
),
|
|
182
|
-
(
|
|
183
|
-
)
|
|
184
|
-
|
|
185
|
-
}, Fn = (t, ...e) => {
|
|
186
|
-
t.classList.remove(...e);
|
|
187
|
-
}, Hn = (t, e) => t.classList.contains(e), { body: Pn } = document, { documentElement: Un } = document, Wn = (t) => Array.from(t), v = (t) => t != null && typeof t == "object" || !1, i = (t) => v(t) && typeof t.nodeType == "number" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some(
|
|
188
|
-
(e) => t.nodeType === e
|
|
189
|
-
) || !1, l = (t) => i(t) && t.nodeType === 1 || !1, E = /* @__PURE__ */ new Map(), L = {
|
|
190
|
-
data: E,
|
|
173
|
+
return result;
|
|
174
|
+
}, supportTransform = () => ["webkitTransform", "transform"].some((p) => p in document.head.style), supportTouch = () => "ontouchstart" in window || /* istanbul ignore next @preserve */
|
|
175
|
+
"msMaxTouchPoints" in navigator, supportAnimation = () => ["webkitAnimation", "animation"].some((p) => p in document.head.style), supportTransition = () => ["webkitTransition", "transition"].some((p) => p in document.head.style), getAttribute = (element, att) => element.getAttribute(att), getAttributeNS = (ns, element, att) => element.getAttributeNS(ns, att), hasAttribute = (element, att) => element.hasAttribute(att), hasAttributeNS = (ns, element, att) => element.hasAttributeNS(ns, att), setAttribute = (element, att, value) => element.setAttribute(att, value), setAttributeNS = (ns, element, att, value) => element.setAttributeNS(ns, att, value), removeAttribute = (element, att) => element.removeAttribute(att), removeAttributeNS = (ns, element, att) => element.removeAttributeNS(ns, att), addClass = (element, ...classNAME) => {
|
|
176
|
+
element.classList.add(...classNAME);
|
|
177
|
+
}, removeClass = (element, ...classNAME) => {
|
|
178
|
+
element.classList.remove(...classNAME);
|
|
179
|
+
}, hasClass = (element, classNAME) => element.classList.contains(classNAME), { body: documentBody } = document, { documentElement } = document, { head: documentHead } = document, ArrayFrom = (arr) => Array.from(arr), isObject = (obj) => obj != null && typeof obj == "object" || !1, isNode = (node) => isObject(node) && typeof node.nodeType == "number" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some(
|
|
180
|
+
(x) => node.nodeType === x
|
|
181
|
+
) || !1, isHTMLElement = (element) => isNode(element) && element.nodeType === 1 || !1, componentData = /* @__PURE__ */ new Map(), Data = {
|
|
182
|
+
data: componentData,
|
|
191
183
|
/**
|
|
192
184
|
* Sets web components data.
|
|
193
185
|
*
|
|
@@ -195,10 +187,9 @@ const wn = O, V = /(iPhone|iPod|iPad)/, An = A ? A.brands.some(
|
|
|
195
187
|
* @param component the component's name or a unique key
|
|
196
188
|
* @param instance the component instance
|
|
197
189
|
*/
|
|
198
|
-
set: (
|
|
199
|
-
if (!
|
|
200
|
-
|
|
201
|
-
E.has(e) || E.set(e, /* @__PURE__ */ new Map()), E.get(e).set(t, n);
|
|
190
|
+
set: (element, component, instance) => {
|
|
191
|
+
if (!isHTMLElement(element)) return;
|
|
192
|
+
componentData.has(component) || componentData.set(component, /* @__PURE__ */ new Map()), componentData.get(component).set(element, instance);
|
|
202
193
|
},
|
|
203
194
|
/**
|
|
204
195
|
* Returns all instances for specified component.
|
|
@@ -206,7 +197,7 @@ const wn = O, V = /(iPhone|iPod|iPad)/, An = A ? A.brands.some(
|
|
|
206
197
|
* @param component the component's name or a unique key
|
|
207
198
|
* @returns all the component instances
|
|
208
199
|
*/
|
|
209
|
-
getAllFor: (
|
|
200
|
+
getAllFor: (component) => componentData.get(component) || null,
|
|
210
201
|
/**
|
|
211
202
|
* Returns the instance associated with the target.
|
|
212
203
|
*
|
|
@@ -214,10 +205,10 @@ const wn = O, V = /(iPhone|iPod|iPad)/, An = A ? A.brands.some(
|
|
|
214
205
|
* @param component the component's name or a unique key
|
|
215
206
|
* @returns the instance
|
|
216
207
|
*/
|
|
217
|
-
get: (
|
|
218
|
-
if (!
|
|
219
|
-
const
|
|
220
|
-
return
|
|
208
|
+
get: (element, component) => {
|
|
209
|
+
if (!isHTMLElement(element) || !component) return null;
|
|
210
|
+
const instanceMap = Data.getAllFor(component);
|
|
211
|
+
return element && instanceMap && instanceMap.get(element) || null;
|
|
221
212
|
},
|
|
222
213
|
/**
|
|
223
214
|
* Removes web components data.
|
|
@@ -225,138 +216,127 @@ const wn = O, V = /(iPhone|iPod|iPad)/, An = A ? A.brands.some(
|
|
|
225
216
|
* @param element target element
|
|
226
217
|
* @param component the component's name or a unique key
|
|
227
218
|
*/
|
|
228
|
-
remove: (
|
|
229
|
-
const
|
|
230
|
-
|
|
231
|
-
n.delete(t);
|
|
232
|
-
// istanbul ignore else @preserve
|
|
233
|
-
n.size === 0 && E.delete(e);
|
|
219
|
+
remove: (element, component) => {
|
|
220
|
+
const instanceMap = Data.getAllFor(component);
|
|
221
|
+
!instanceMap || !isHTMLElement(element) || (instanceMap.delete(element), instanceMap.size === 0 && componentData.delete(component));
|
|
234
222
|
}
|
|
235
|
-
},
|
|
236
|
-
if (!
|
|
237
|
-
if (
|
|
238
|
-
return
|
|
239
|
-
const { tagName
|
|
240
|
-
if (!
|
|
241
|
-
const
|
|
242
|
-
return delete
|
|
243
|
-
},
|
|
244
|
-
if (!
|
|
245
|
-
if (
|
|
246
|
-
return
|
|
247
|
-
const { tagName
|
|
248
|
-
if (!
|
|
249
|
-
const
|
|
250
|
-
return delete
|
|
251
|
-
},
|
|
252
|
-
const
|
|
253
|
-
return
|
|
254
|
-
},
|
|
255
|
-
const
|
|
223
|
+
}, getInstance = (target, component) => Data.get(target, component), isString = (str) => typeof str == "string" || !1, isWindow = (obj) => isObject(obj) && obj.constructor.name === "Window" || !1, isDocument = (obj) => isNode(obj) && obj.nodeType === 9 || !1, getDocument = (node) => isWindow(node) ? node.document : isDocument(node) ? node : isNode(node) ? node.ownerDocument : globalThis.document, ObjectAssign = (obj, ...source) => Object.assign(obj, ...source), createElement = (param) => {
|
|
224
|
+
if (!param) return;
|
|
225
|
+
if (isString(param))
|
|
226
|
+
return getDocument().createElement(param);
|
|
227
|
+
const { tagName } = param, newElement = createElement(tagName);
|
|
228
|
+
if (!newElement) return;
|
|
229
|
+
const attr = { ...param };
|
|
230
|
+
return delete attr.tagName, ObjectAssign(newElement, attr);
|
|
231
|
+
}, createElementNS = (ns, param) => {
|
|
232
|
+
if (!ns || !param) return;
|
|
233
|
+
if (isString(param))
|
|
234
|
+
return getDocument().createElementNS(ns, param);
|
|
235
|
+
const { tagName } = param, newElement = createElementNS(ns, tagName);
|
|
236
|
+
if (!newElement) return;
|
|
237
|
+
const attr = { ...param };
|
|
238
|
+
return delete attr.tagName, ObjectAssign(newElement, attr);
|
|
239
|
+
}, dispatchEvent = (element, event) => element.dispatchEvent(event), distinct = (value, index, arr) => arr.indexOf(value) === index, getElementStyle = (element, property) => {
|
|
240
|
+
const computedStyle = getComputedStyle(element), prop = property.replace("webkit", "Webkit").replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
241
|
+
return computedStyle.getPropertyValue(prop);
|
|
242
|
+
}, getElementAnimationDelay = (element) => {
|
|
243
|
+
const propertyValue = getElementStyle(element, animationName), durationValue = getElementStyle(element, animationDelay), durationScale = durationValue.includes("ms") ? (
|
|
256
244
|
/* istanbul ignore next */
|
|
257
245
|
1
|
|
258
|
-
) : 1e3,
|
|
259
|
-
return Number.isNaN(
|
|
246
|
+
) : 1e3, duration = propertyValue && propertyValue !== "none" ? parseFloat(durationValue) * durationScale : 0;
|
|
247
|
+
return Number.isNaN(duration) ? (
|
|
260
248
|
/* istanbul ignore next */
|
|
261
249
|
0
|
|
262
|
-
) :
|
|
263
|
-
},
|
|
264
|
-
const
|
|
250
|
+
) : duration;
|
|
251
|
+
}, getElementAnimationDuration = (element) => {
|
|
252
|
+
const propertyValue = getElementStyle(element, animationName), durationValue = getElementStyle(element, animationDuration), durationScale = durationValue.includes("ms") ? (
|
|
265
253
|
/* istanbul ignore next */
|
|
266
254
|
1
|
|
267
|
-
) : 1e3,
|
|
268
|
-
return Number.isNaN(
|
|
255
|
+
) : 1e3, duration = propertyValue && propertyValue !== "none" ? parseFloat(durationValue) * durationScale : 0;
|
|
256
|
+
return Number.isNaN(duration) ? (
|
|
269
257
|
/* istanbul ignore next */
|
|
270
258
|
0
|
|
271
|
-
) :
|
|
272
|
-
},
|
|
273
|
-
let
|
|
274
|
-
const
|
|
275
|
-
if (
|
|
276
|
-
const
|
|
277
|
-
|
|
278
|
-
u.target === t && (e.apply(t, [u]), t.removeEventListener(D, a), n = 1);
|
|
259
|
+
) : duration;
|
|
260
|
+
}, emulateAnimationEnd = (element, handler) => {
|
|
261
|
+
let called = 0;
|
|
262
|
+
const endEvent = new Event(animationEndEvent), duration = getElementAnimationDuration(element), delay = getElementAnimationDelay(element);
|
|
263
|
+
if (duration) {
|
|
264
|
+
const animationEndWrapper = (e) => {
|
|
265
|
+
e.target === element && (handler.apply(element, [e]), element.removeEventListener(animationEndEvent, animationEndWrapper), called = 1);
|
|
279
266
|
};
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
}
|
|
288
|
-
}, ce = (t) => {
|
|
289
|
-
const e = g(t, W), n = g(t, Xt), o = n.includes("ms") ? (
|
|
267
|
+
element.addEventListener(animationEndEvent, animationEndWrapper), setTimeout(() => {
|
|
268
|
+
called || dispatchEvent(element, endEvent);
|
|
269
|
+
}, duration + delay + 17);
|
|
270
|
+
} else
|
|
271
|
+
handler.apply(element, [endEvent]);
|
|
272
|
+
}, getElementTransitionDelay = (element) => {
|
|
273
|
+
const propertyValue = getElementStyle(element, transitionProperty), delayValue = getElementStyle(element, transitionDelay), delayScale = delayValue.includes("ms") ? (
|
|
290
274
|
/* istanbul ignore next */
|
|
291
275
|
1
|
|
292
|
-
) : 1e3,
|
|
276
|
+
) : 1e3, duration = propertyValue && propertyValue !== "none" ? parseFloat(delayValue) * delayScale : (
|
|
293
277
|
/* istanbul ignore next */
|
|
294
278
|
0
|
|
295
279
|
);
|
|
296
|
-
return Number.isNaN(
|
|
280
|
+
return Number.isNaN(duration) ? (
|
|
297
281
|
/* istanbul ignore next */
|
|
298
282
|
0
|
|
299
|
-
) :
|
|
300
|
-
},
|
|
301
|
-
const
|
|
283
|
+
) : duration;
|
|
284
|
+
}, getElementTransitionDuration = (element) => {
|
|
285
|
+
const propertyValue = getElementStyle(element, transitionProperty), durationValue = getElementStyle(element, transitionDuration), durationScale = durationValue.includes("ms") ? (
|
|
302
286
|
/* istanbul ignore next */
|
|
303
287
|
1
|
|
304
|
-
) : 1e3,
|
|
288
|
+
) : 1e3, duration = propertyValue && propertyValue !== "none" ? parseFloat(durationValue) * durationScale : (
|
|
305
289
|
/* istanbul ignore next */
|
|
306
290
|
0
|
|
307
291
|
);
|
|
308
|
-
return Number.isNaN(
|
|
292
|
+
return Number.isNaN(duration) ? (
|
|
309
293
|
/* istanbul ignore next */
|
|
310
294
|
0
|
|
311
|
-
) :
|
|
312
|
-
},
|
|
313
|
-
let
|
|
314
|
-
const
|
|
315
|
-
if (
|
|
316
|
-
const
|
|
317
|
-
|
|
318
|
-
u.target === t && (e.apply(t, [u]), t.removeEventListener(C, a), n = 1);
|
|
295
|
+
) : duration;
|
|
296
|
+
}, emulateTransitionEnd = (element, handler) => {
|
|
297
|
+
let called = 0;
|
|
298
|
+
const endEvent = new Event(transitionEndEvent), duration = getElementTransitionDuration(element), delay = getElementTransitionDelay(element);
|
|
299
|
+
if (duration) {
|
|
300
|
+
const transitionEndWrapper = (e) => {
|
|
301
|
+
e.target === element && (handler.apply(element, [e]), element.removeEventListener(transitionEndEvent, transitionEndWrapper), called = 1);
|
|
319
302
|
};
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
}, s + c + 17);
|
|
303
|
+
element.addEventListener(transitionEndEvent, transitionEndWrapper), setTimeout(() => {
|
|
304
|
+
called || dispatchEvent(element, endEvent);
|
|
305
|
+
}, duration + delay + 17);
|
|
324
306
|
} else
|
|
325
|
-
|
|
326
|
-
},
|
|
327
|
-
const
|
|
328
|
-
return
|
|
329
|
-
const
|
|
307
|
+
handler.apply(element, [endEvent]);
|
|
308
|
+
}, Float32ArrayFrom = (arr) => Float32Array.from(Array.from(arr)), Float64ArrayFrom = (arr) => Float64Array.from(Array.from(arr)), focus = (element, options) => element.focus(options), normalizeValue = (value) => ["true", !0].includes(value) ? !0 : ["false", !1].includes(value) ? !1 : ["null", "", null, void 0].includes(value) ? null : value !== "" && !Number.isNaN(+value) ? +value : value, ObjectEntries = (obj) => Object.entries(obj), toLowerCase = (source) => source.toLowerCase(), normalizeOptions = (element, defaultOps, inputOps, ns) => {
|
|
309
|
+
const INPUT = { ...inputOps }, data = { ...element.dataset }, normalOps = { ...defaultOps }, dataOps = {}, title = "title";
|
|
310
|
+
return ObjectEntries(data).forEach(([k, v]) => {
|
|
311
|
+
const key = ns && typeof k == "string" && k.includes(ns) ? k.replace(ns, "").replace(
|
|
330
312
|
/[A-Z]/g,
|
|
331
|
-
(
|
|
313
|
+
(match) => toLowerCase(match)
|
|
332
314
|
) : (
|
|
333
315
|
/* istanbul ignore next @preserve */
|
|
334
|
-
|
|
316
|
+
k
|
|
335
317
|
);
|
|
336
|
-
|
|
337
|
-
}),
|
|
338
|
-
|
|
339
|
-
}),
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
const n = new CustomEvent(t, {
|
|
318
|
+
dataOps[key] = normalizeValue(v);
|
|
319
|
+
}), ObjectEntries(INPUT).forEach(([k, v]) => {
|
|
320
|
+
INPUT[k] = normalizeValue(v);
|
|
321
|
+
}), ObjectEntries(defaultOps).forEach(([k, v]) => {
|
|
322
|
+
k in INPUT ? normalOps[k] = INPUT[k] : k in dataOps ? normalOps[k] = dataOps[k] : normalOps[k] = k === title ? getAttribute(element, title) : v;
|
|
323
|
+
}), normalOps;
|
|
324
|
+
}, ObjectHasOwn = (obj, prop) => isObject(obj) && (Object.hasOwn(obj, prop) || prop in obj), ObjectKeys = (obj) => Object.keys(obj), ObjectValues = (obj) => Object.values(obj), ObjectFromEntries = (entries) => Object.fromEntries(entries), createCustomEvent = (eventType, config) => {
|
|
325
|
+
const OriginalCustomEvent = new CustomEvent(eventType, {
|
|
345
326
|
cancelable: !0,
|
|
346
327
|
bubbles: !0
|
|
347
328
|
});
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
t.style.setProperty(n, o);
|
|
329
|
+
return isObject(config) && ObjectAssign(OriginalCustomEvent, config), OriginalCustomEvent;
|
|
330
|
+
}, passiveHandler = { passive: !0 }, reflow = (element) => element.offsetHeight, setElementStyle = (element, styles) => {
|
|
331
|
+
ObjectEntries(styles).forEach(([key, value]) => {
|
|
332
|
+
if (value && isString(key) && key.includes("--"))
|
|
333
|
+
element.style.setProperty(key, value);
|
|
354
334
|
else {
|
|
355
|
-
const
|
|
356
|
-
|
|
335
|
+
const propObject = {};
|
|
336
|
+
propObject[key] = value, ObjectAssign(element.style, propObject);
|
|
357
337
|
}
|
|
358
338
|
});
|
|
359
|
-
},
|
|
339
|
+
}, isMap = (obj) => isObject(obj) && obj.constructor.name === "Map" || !1, isNumber = (num) => typeof num == "number" || !1, TimeCache = /* @__PURE__ */ new Map(), Timer = {
|
|
360
340
|
/**
|
|
361
341
|
* Sets a new timeout timer for an element, or element -> key association.
|
|
362
342
|
*
|
|
@@ -365,14 +345,8 @@ const wn = O, V = /(iPhone|iPod|iPad)/, An = A ? A.brands.some(
|
|
|
365
345
|
* @param delay the execution delay
|
|
366
346
|
* @param key a unique key
|
|
367
347
|
*/
|
|
368
|
-
set: (
|
|
369
|
-
|
|
370
|
-
// istanbul ignore else @preserve
|
|
371
|
-
if (o && o.length) {
|
|
372
|
-
// istanbul ignore else @preserve
|
|
373
|
-
m.has(t) || m.set(t, /* @__PURE__ */ new Map()), m.get(t).set(o, setTimeout(e, n));
|
|
374
|
-
} else
|
|
375
|
-
m.set(t, setTimeout(e, n));
|
|
348
|
+
set: (element, callback, delay, key) => {
|
|
349
|
+
isHTMLElement(element) && (key && key.length ? (TimeCache.has(element) || TimeCache.set(element, /* @__PURE__ */ new Map()), TimeCache.get(element).set(key, setTimeout(callback, delay))) : TimeCache.set(element, setTimeout(callback, delay)));
|
|
376
350
|
},
|
|
377
351
|
/**
|
|
378
352
|
* Returns the timer associated with the target.
|
|
@@ -381,11 +355,11 @@ const wn = O, V = /(iPhone|iPod|iPad)/, An = A ? A.brands.some(
|
|
|
381
355
|
* @param key a unique
|
|
382
356
|
* @returns the timer
|
|
383
357
|
*/
|
|
384
|
-
get: (
|
|
385
|
-
if (!
|
|
386
|
-
const
|
|
387
|
-
return
|
|
388
|
-
null :
|
|
358
|
+
get: (element, key) => {
|
|
359
|
+
if (!isHTMLElement(element)) return null;
|
|
360
|
+
const keyTimers = TimeCache.get(element);
|
|
361
|
+
return key && keyTimers && isMap(keyTimers) ? keyTimers.get(key) || /* istanbul ignore next @preserve */
|
|
362
|
+
null : isNumber(keyTimers) ? keyTimers : null;
|
|
389
363
|
},
|
|
390
364
|
/**
|
|
391
365
|
* Clears the element's timer.
|
|
@@ -393,340 +367,333 @@ const wn = O, V = /(iPhone|iPod|iPad)/, An = A ? A.brands.some(
|
|
|
393
367
|
* @param element target element
|
|
394
368
|
* @param key a unique key
|
|
395
369
|
*/
|
|
396
|
-
clear: (
|
|
397
|
-
if (!
|
|
398
|
-
const
|
|
399
|
-
|
|
400
|
-
clearTimeout(n.get(e)), n.delete(e);
|
|
401
|
-
// istanbul ignore else @preserve
|
|
402
|
-
n.size === 0 && m.delete(t);
|
|
403
|
-
} else
|
|
404
|
-
clearTimeout(n), m.delete(t);
|
|
370
|
+
clear: (element, key) => {
|
|
371
|
+
if (!isHTMLElement(element)) return;
|
|
372
|
+
const keyTimers = TimeCache.get(element);
|
|
373
|
+
key && key.length && isMap(keyTimers) ? (clearTimeout(keyTimers.get(key)), keyTimers.delete(key), keyTimers.size === 0 && TimeCache.delete(element)) : (clearTimeout(keyTimers), TimeCache.delete(element));
|
|
405
374
|
}
|
|
406
|
-
},
|
|
407
|
-
function
|
|
408
|
-
const { shiftKey
|
|
409
|
-
...
|
|
375
|
+
}, toUpperCase = (source) => source.toUpperCase(), querySelectorAll = (selector, parent) => (isNode(parent) ? parent : getDocument()).querySelectorAll(selector), focusTrapMap = /* @__PURE__ */ new Map();
|
|
376
|
+
function handleKeyboardNavigation(event) {
|
|
377
|
+
const { shiftKey, code } = event, doc = getDocument(this), focusableElements = [
|
|
378
|
+
...querySelectorAll(focusableSelector, this)
|
|
410
379
|
].filter(
|
|
411
|
-
(
|
|
380
|
+
(el) => !hasAttribute(el, "disabled") && !getAttribute(el, ariaHidden)
|
|
412
381
|
);
|
|
413
|
-
if (!
|
|
414
|
-
const
|
|
415
|
-
|
|
416
|
-
n === "Tab" && (e && o.activeElement === c ? (a.focus(), t.preventDefault()) : !e && o.activeElement === a && (c.focus(), t.preventDefault()));
|
|
382
|
+
if (!focusableElements.length) return;
|
|
383
|
+
const firstFocusable = focusableElements[0], lastFocusable = focusableElements[focusableElements.length - 1];
|
|
384
|
+
code === "Tab" && (shiftKey && doc.activeElement === firstFocusable ? (lastFocusable.focus(), event.preventDefault()) : !shiftKey && doc.activeElement === lastFocusable && (firstFocusable.focus(), event.preventDefault()));
|
|
417
385
|
}
|
|
418
|
-
const
|
|
419
|
-
const
|
|
420
|
-
(
|
|
421
|
-
},
|
|
422
|
-
const { width
|
|
423
|
-
let
|
|
424
|
-
if (
|
|
425
|
-
const { offsetWidth:
|
|
426
|
-
|
|
386
|
+
const hasFocusTrap = (target) => focusTrapMap.has(target) === !0, toggleFocusTrap = (target) => {
|
|
387
|
+
const isCurrentlyTrapped = hasFocusTrap(target);
|
|
388
|
+
(isCurrentlyTrapped ? off : on)(target, "keydown", handleKeyboardNavigation), isCurrentlyTrapped ? focusTrapMap.delete(target) : focusTrapMap.set(target, !0);
|
|
389
|
+
}, getBoundingClientRect = (element, includeScale) => {
|
|
390
|
+
const { width, height, top, right, bottom, left } = element.getBoundingClientRect();
|
|
391
|
+
let scaleX = 1, scaleY = 1;
|
|
392
|
+
if (includeScale && isHTMLElement(element)) {
|
|
393
|
+
const { offsetWidth: offsetWidth2, offsetHeight: offsetHeight2 } = element;
|
|
394
|
+
scaleX = offsetWidth2 > 0 ? Math.round(width) / offsetWidth2 : (
|
|
427
395
|
/* istanbul ignore next @preserve */
|
|
428
396
|
1
|
|
429
|
-
),
|
|
397
|
+
), scaleY = offsetHeight2 > 0 ? Math.round(height) / offsetHeight2 : (
|
|
430
398
|
/* istanbul ignore next @preserve */
|
|
431
399
|
1
|
|
432
400
|
);
|
|
433
401
|
}
|
|
434
402
|
return {
|
|
435
|
-
width:
|
|
436
|
-
height:
|
|
437
|
-
top:
|
|
438
|
-
right:
|
|
439
|
-
bottom:
|
|
440
|
-
left:
|
|
441
|
-
x:
|
|
442
|
-
y:
|
|
403
|
+
width: width / scaleX,
|
|
404
|
+
height: height / scaleY,
|
|
405
|
+
top: top / scaleY,
|
|
406
|
+
right: right / scaleX,
|
|
407
|
+
bottom: bottom / scaleY,
|
|
408
|
+
left: left / scaleX,
|
|
409
|
+
x: left / scaleX,
|
|
410
|
+
y: top / scaleY
|
|
443
411
|
};
|
|
444
|
-
},
|
|
445
|
-
const
|
|
446
|
-
return { x
|
|
447
|
-
},
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
if (!
|
|
452
|
-
const { width
|
|
453
|
-
return Math.round(
|
|
454
|
-
},
|
|
455
|
-
const
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
),
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
c.x = a.x + e.clientLeft, c.y = a.y + e.clientTop;
|
|
412
|
+
}, getDocumentBody = (node) => getDocument(node).body, getDocumentElement = (node) => getDocument(node).documentElement, getDocumentHead = (node) => getDocument(node).head, getNodeScroll = (element) => {
|
|
413
|
+
const isWin = isWindow(element), x = isWin ? element.scrollX : element.scrollLeft, y = isWin ? element.scrollY : element.scrollTop;
|
|
414
|
+
return { x, y };
|
|
415
|
+
}, isShadowRoot = (element) => isNode(element) && element.constructor.name === "ShadowRoot" || !1, getParentNode = (node) => node.nodeName === "HTML" ? node : isHTMLElement(node) && node.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
|
416
|
+
isNode(node) && node.parentNode || // DOM Element detected
|
|
417
|
+
isShadowRoot(node) && node.host || // ShadowRoot detected
|
|
418
|
+
getDocumentElement(node), isScaledElement = (element) => {
|
|
419
|
+
if (!isHTMLElement(element)) return !1;
|
|
420
|
+
const { width, height } = getBoundingClientRect(element), { offsetWidth: offsetWidth2, offsetHeight: offsetHeight2 } = element;
|
|
421
|
+
return Math.round(width) !== offsetWidth2 || Math.round(height) !== offsetHeight2;
|
|
422
|
+
}, getRectRelativeToOffsetParent = (element, offsetParent, scroll) => {
|
|
423
|
+
const isParentAnElement = isHTMLElement(offsetParent), rect = getBoundingClientRect(
|
|
424
|
+
element,
|
|
425
|
+
isParentAnElement && isScaledElement(offsetParent)
|
|
426
|
+
), offsets = { x: 0, y: 0 };
|
|
427
|
+
if (isParentAnElement) {
|
|
428
|
+
const offsetRect = getBoundingClientRect(offsetParent, !0);
|
|
429
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft, offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
463
430
|
}
|
|
464
431
|
return {
|
|
465
|
-
x:
|
|
466
|
-
y:
|
|
467
|
-
width:
|
|
468
|
-
height:
|
|
432
|
+
x: rect.left + scroll.x - offsets.x,
|
|
433
|
+
y: rect.top + scroll.y - offsets.y,
|
|
434
|
+
width: rect.width,
|
|
435
|
+
height: rect.height
|
|
469
436
|
};
|
|
470
437
|
};
|
|
471
|
-
let
|
|
472
|
-
const
|
|
473
|
-
let
|
|
474
|
-
if (
|
|
475
|
-
const
|
|
476
|
-
|
|
438
|
+
let elementUID = 0, elementMapUID = 0;
|
|
439
|
+
const elementIDMap = /* @__PURE__ */ new Map(), getUID = (element, key) => {
|
|
440
|
+
let result = key ? elementUID : elementMapUID;
|
|
441
|
+
if (key) {
|
|
442
|
+
const elID = getUID(element), elMap = elementIDMap.get(elID) || /* @__PURE__ */ new Map();
|
|
443
|
+
elementIDMap.has(elID) || elementIDMap.set(elID, elMap), isMap(elMap) && !elMap.has(key) ? (elMap.set(key, result), elementUID += 1) : result = elMap.get(key);
|
|
477
444
|
} else {
|
|
478
|
-
const
|
|
479
|
-
|
|
445
|
+
const elkey = element.id || element;
|
|
446
|
+
elementIDMap.has(elkey) ? result = elementIDMap.get(elkey) : (elementIDMap.set(elkey, result), elementMapUID += 1);
|
|
480
447
|
}
|
|
481
|
-
return
|
|
482
|
-
},
|
|
483
|
-
if (!
|
|
484
|
-
const { top
|
|
485
|
-
return
|
|
486
|
-
},
|
|
487
|
-
if (!
|
|
488
|
-
const { clientWidth
|
|
489
|
-
return
|
|
490
|
-
},
|
|
491
|
-
if (!
|
|
448
|
+
return result;
|
|
449
|
+
}, getWindow = (node) => node ? isDocument(node) ? node.defaultView : isNode(node) ? node?.ownerDocument?.defaultView : node : window, isArray = (obj) => Array.isArray(obj) || !1, isCanvas = (element) => isNode(element) && element.nodeName === "CANVAS" || !1, isCustomElement = (element) => isHTMLElement(element) && !!element.shadowRoot || !1, isElement = (element) => isNode(element) && [1, 2, 3, 4, 5, 6, 7, 8].some((x) => element.nodeType === x) || !1, isElementInScrollRange = (element) => {
|
|
450
|
+
if (!isNode(element)) return !1;
|
|
451
|
+
const { top, bottom } = getBoundingClientRect(element), { clientHeight } = getDocumentElement(element);
|
|
452
|
+
return top <= clientHeight && bottom >= 0;
|
|
453
|
+
}, isElementInViewport = (element) => {
|
|
454
|
+
if (!isNode(element)) return !1;
|
|
455
|
+
const { clientWidth, clientHeight } = getDocumentElement(element), { top, left, bottom, right } = getBoundingClientRect(element, !0);
|
|
456
|
+
return top >= 0 && left >= 0 && bottom <= clientHeight && right <= clientWidth;
|
|
457
|
+
}, isElementsArray = (obj) => isArray(obj) && obj.every(isHTMLElement) || !1, isFunction = (fn) => typeof fn == "function" || !1, isHTMLCollection = (obj) => isObject(obj) && obj.constructor.name === "HTMLCollection" || !1, isHTMLImageElement = (element) => isHTMLElement(element) && element.tagName === "IMG" || !1, isJSON = (str) => {
|
|
458
|
+
if (!isString(str)) return !1;
|
|
492
459
|
try {
|
|
493
|
-
JSON.parse(
|
|
460
|
+
JSON.parse(str);
|
|
494
461
|
} catch {
|
|
495
462
|
return !1;
|
|
496
463
|
}
|
|
497
464
|
return !0;
|
|
498
|
-
},
|
|
499
|
-
(
|
|
500
|
-
) || !1,
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
),
|
|
504
|
-
|
|
505
|
-
),
|
|
465
|
+
}, isWeakMap = (obj) => isObject(obj) && obj.constructor.name === "WeakMap" || !1, isMedia = (element) => isNode(element) && ["SVG", "Image", "Video", "Canvas"].some(
|
|
466
|
+
(s) => element.constructor.name.includes(s)
|
|
467
|
+
) || !1, isNodeList = (obj) => isObject(obj) && obj.constructor.name === "NodeList" || !1, isRTL = (node) => getDocumentElement(node).dir === "rtl", isSVGElement = (element) => isNode(element) && element.constructor.name.includes("SVG") || !1, isTableElement = (element) => isNode(element) && ["TABLE", "TD", "TH"].includes(element.nodeName) || !1, closest = (element, selector) => element ? element.closest(selector) || // break out of `ShadowRoot`
|
|
468
|
+
closest(element.getRootNode().host, selector) : null, querySelector = (selector, parent) => isHTMLElement(selector) ? selector : (isNode(parent) ? parent : getDocument()).querySelector(selector), getElementsByTagName = (selector, parent) => (isNode(parent) ? parent : getDocument()).getElementsByTagName(
|
|
469
|
+
selector
|
|
470
|
+
), getCustomElements = (parent) => [...getElementsByTagName("*", parent)].filter(isCustomElement), getElementById = (id, context) => getDocument(context).getElementById(id) || null, getElementsByClassName = (selector, parent) => (parent && isNode(parent) ? parent : getDocument()).getElementsByClassName(
|
|
471
|
+
selector
|
|
472
|
+
), matches = (target, selector) => target.matches(selector), version = "2.0.7";
|
|
506
473
|
export {
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
474
|
+
ArrayFrom,
|
|
475
|
+
DOMContentLoadedEvent,
|
|
476
|
+
DOMMouseScrollEvent,
|
|
477
|
+
Data,
|
|
478
|
+
Float32ArrayFrom,
|
|
479
|
+
Float64ArrayFrom,
|
|
480
|
+
ObjectAssign,
|
|
481
|
+
ObjectEntries,
|
|
482
|
+
ObjectFromEntries,
|
|
483
|
+
ObjectHasOwn,
|
|
484
|
+
ObjectKeys,
|
|
485
|
+
ObjectValues,
|
|
486
|
+
Timer,
|
|
487
|
+
abortEvent,
|
|
488
|
+
addClass,
|
|
489
|
+
addEventListener,
|
|
490
|
+
animationDelay,
|
|
491
|
+
animationDuration,
|
|
492
|
+
animationEndEvent,
|
|
493
|
+
animationName,
|
|
494
|
+
ariaChecked,
|
|
495
|
+
ariaDescribedBy,
|
|
496
|
+
ariaDescription,
|
|
497
|
+
ariaExpanded,
|
|
498
|
+
ariaHasPopup,
|
|
499
|
+
ariaHidden,
|
|
500
|
+
ariaLabel,
|
|
501
|
+
ariaLabelledBy,
|
|
502
|
+
ariaModal,
|
|
503
|
+
ariaPressed,
|
|
504
|
+
ariaSelected,
|
|
505
|
+
ariaValueMax,
|
|
506
|
+
ariaValueMin,
|
|
507
|
+
ariaValueNow,
|
|
508
|
+
ariaValueText,
|
|
509
|
+
beforeunloadEvent,
|
|
510
|
+
bezierEasings,
|
|
511
|
+
blurEvent,
|
|
512
|
+
changeEvent,
|
|
513
|
+
closest,
|
|
514
|
+
contextmenuEvent,
|
|
515
|
+
createCustomEvent,
|
|
516
|
+
createElement,
|
|
517
|
+
createElementNS,
|
|
518
|
+
dispatchEvent,
|
|
519
|
+
distinct,
|
|
520
|
+
documentBody,
|
|
521
|
+
documentElement,
|
|
522
|
+
documentHead,
|
|
523
|
+
dragEvent,
|
|
524
|
+
dragendEvent,
|
|
525
|
+
dragenterEvent,
|
|
526
|
+
dragleaveEvent,
|
|
527
|
+
dragoverEvent,
|
|
528
|
+
dragstartEvent,
|
|
529
|
+
emulateAnimationEnd,
|
|
530
|
+
emulateTransitionEnd,
|
|
531
|
+
errorEvent,
|
|
532
|
+
focus,
|
|
533
|
+
focusEvent,
|
|
534
|
+
focusEvents,
|
|
535
|
+
focusableSelector,
|
|
536
|
+
focusinEvent,
|
|
537
|
+
focusoutEvent,
|
|
538
|
+
gesturechangeEvent,
|
|
539
|
+
gestureendEvent,
|
|
540
|
+
gesturestartEvent,
|
|
541
|
+
getAttribute,
|
|
542
|
+
getAttributeNS,
|
|
543
|
+
getBoundingClientRect,
|
|
544
|
+
getCustomElements,
|
|
545
|
+
getDocument,
|
|
546
|
+
getDocumentBody,
|
|
547
|
+
getDocumentElement,
|
|
548
|
+
getDocumentHead,
|
|
549
|
+
getElementAnimationDelay,
|
|
550
|
+
getElementAnimationDuration,
|
|
551
|
+
getElementById,
|
|
552
|
+
getElementStyle,
|
|
553
|
+
getElementTransitionDelay,
|
|
554
|
+
getElementTransitionDuration,
|
|
555
|
+
getElementsByClassName,
|
|
556
|
+
getElementsByTagName,
|
|
557
|
+
getInstance,
|
|
558
|
+
getNodeScroll,
|
|
559
|
+
getParentNode,
|
|
560
|
+
getRectRelativeToOffsetParent,
|
|
561
|
+
getUID,
|
|
562
|
+
getWindow,
|
|
563
|
+
hasAttribute,
|
|
564
|
+
hasAttributeNS,
|
|
565
|
+
hasClass,
|
|
566
|
+
hasFocusTrap,
|
|
567
|
+
isApple,
|
|
568
|
+
isArray,
|
|
569
|
+
isCanvas,
|
|
570
|
+
isCustomElement,
|
|
571
|
+
isDocument,
|
|
572
|
+
isElement,
|
|
573
|
+
isElementInScrollRange,
|
|
574
|
+
isElementInViewport,
|
|
575
|
+
isElementsArray,
|
|
576
|
+
isFirefox,
|
|
577
|
+
isFunction,
|
|
578
|
+
isHTMLCollection,
|
|
579
|
+
isHTMLElement,
|
|
580
|
+
isHTMLImageElement,
|
|
581
|
+
isJSON,
|
|
582
|
+
isMap,
|
|
583
|
+
isMedia,
|
|
584
|
+
isMobile,
|
|
585
|
+
isNode,
|
|
586
|
+
isNodeList,
|
|
587
|
+
isNumber,
|
|
588
|
+
isObject,
|
|
589
|
+
isRTL,
|
|
590
|
+
isSVGElement,
|
|
591
|
+
isScaledElement,
|
|
592
|
+
isShadowRoot,
|
|
593
|
+
isString,
|
|
594
|
+
isTableElement,
|
|
595
|
+
isWeakMap,
|
|
596
|
+
isWindow,
|
|
597
|
+
keyAlt,
|
|
598
|
+
keyArrowDown,
|
|
599
|
+
keyArrowLeft,
|
|
600
|
+
keyArrowRight,
|
|
601
|
+
keyArrowUp,
|
|
602
|
+
keyBackspace,
|
|
603
|
+
keyCapsLock,
|
|
604
|
+
keyControl,
|
|
605
|
+
keyDelete,
|
|
606
|
+
keyEnter,
|
|
607
|
+
keyEscape,
|
|
608
|
+
keyInsert,
|
|
609
|
+
keyMeta,
|
|
610
|
+
keyNumpadEnter,
|
|
611
|
+
keyPause,
|
|
612
|
+
keyScrollLock,
|
|
613
|
+
keyShift,
|
|
614
|
+
keySpace,
|
|
615
|
+
keyTab,
|
|
616
|
+
keyboardEventKeys,
|
|
617
|
+
keydownEvent,
|
|
618
|
+
keypressEvent,
|
|
619
|
+
keyupEvent,
|
|
620
|
+
loadEvent,
|
|
621
|
+
loadstartEvent,
|
|
622
|
+
matches,
|
|
623
|
+
mouseClickEvents,
|
|
624
|
+
mouseHoverEvents,
|
|
625
|
+
mouseSwipeEvents,
|
|
626
|
+
mouseclickEvent,
|
|
627
|
+
mousedblclickEvent,
|
|
628
|
+
mousedownEvent,
|
|
629
|
+
mouseenterEvent,
|
|
630
|
+
mousehoverEvent,
|
|
631
|
+
mouseinEvent,
|
|
632
|
+
mouseleaveEvent,
|
|
633
|
+
mousemoveEvent,
|
|
634
|
+
mouseoutEvent,
|
|
635
|
+
mouseoverEvent,
|
|
636
|
+
mouseupEvent,
|
|
637
|
+
mousewheelEvent,
|
|
638
|
+
moveEvent,
|
|
639
|
+
nativeEvents,
|
|
640
|
+
noop,
|
|
641
|
+
normalizeOptions,
|
|
642
|
+
normalizeValue,
|
|
643
|
+
off,
|
|
644
|
+
offsetHeight,
|
|
645
|
+
offsetWidth,
|
|
646
|
+
on,
|
|
647
|
+
one,
|
|
648
|
+
orientationchangeEvent,
|
|
649
|
+
passiveHandler,
|
|
650
|
+
pointercancelEvent,
|
|
651
|
+
pointerdownEvent,
|
|
652
|
+
pointerleaveEvent,
|
|
653
|
+
pointermoveEvent,
|
|
654
|
+
pointerupEvent,
|
|
655
|
+
querySelector,
|
|
656
|
+
querySelectorAll,
|
|
657
|
+
readystatechangeEvent,
|
|
658
|
+
reflow,
|
|
659
|
+
removeAttribute,
|
|
660
|
+
removeAttributeNS,
|
|
661
|
+
removeClass,
|
|
662
|
+
removeEventListener,
|
|
663
|
+
resetEvent,
|
|
664
|
+
resizeEvent,
|
|
665
|
+
scrollEvent,
|
|
666
|
+
scrollHeight,
|
|
667
|
+
scrollWidth,
|
|
668
|
+
selectEvent,
|
|
669
|
+
selectendEvent,
|
|
670
|
+
selectstartEvent,
|
|
671
|
+
setAttribute,
|
|
672
|
+
setAttributeNS,
|
|
673
|
+
setElementStyle,
|
|
674
|
+
submitEvent,
|
|
675
|
+
support3DTransform,
|
|
676
|
+
supportAnimation,
|
|
677
|
+
supportPassive,
|
|
678
|
+
supportTouch,
|
|
679
|
+
supportTransform,
|
|
680
|
+
supportTransition,
|
|
681
|
+
tabindex,
|
|
682
|
+
toLowerCase,
|
|
683
|
+
toUpperCase,
|
|
684
|
+
toggleFocusTrap,
|
|
685
|
+
touchEvents,
|
|
686
|
+
touchcancelEvent,
|
|
687
|
+
touchendEvent,
|
|
688
|
+
touchmoveEvent,
|
|
689
|
+
touchstartEvent,
|
|
690
|
+
transitionDelay,
|
|
691
|
+
transitionDuration,
|
|
692
|
+
transitionEndEvent,
|
|
693
|
+
transitionProperty,
|
|
694
|
+
unloadEvent,
|
|
695
|
+
userAgent,
|
|
696
|
+
userAgentData,
|
|
697
|
+
version
|
|
731
698
|
};
|
|
732
699
|
//# sourceMappingURL=shorty.mjs.map
|