@webalternatif/js-core 1.6.4 → 1.6.6
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/cjs/Mouse.js +20 -14
- package/dist/cjs/dom.js +4 -2
- package/dist/cjs/onOff.js +16 -15
- package/dist/cjs/traversal.js +1 -1
- package/dist/cjs/utils.js +23 -2
- package/dist/esm/Mouse.js +19 -14
- package/dist/esm/dom.js +4 -2
- package/dist/esm/onOff.js +16 -15
- package/dist/esm/traversal.js +1 -1
- package/dist/esm/utils.js +22 -1
- package/dist/umd/dom.umd.js +1 -1
- package/dist/umd/mouse.umd.js +1 -1
- package/dist/umd/webf.umd.js +1 -1
- package/package.json +1 -1
- package/src/Mouse.js +20 -12
- package/src/dom.js +2 -2
- package/src/onOff.js +15 -15
- package/src/traversal.js +1 -1
- package/src/utils.js +33 -0
- package/types/Mouse.d.ts +14 -3
- package/types/dom.d.ts +2 -2
- package/types/index.d.ts +1 -0
- package/types/traversal.d.ts +1 -1
- package/types/utils.d.ts +1 -0
package/dist/cjs/Mouse.js
CHANGED
|
@@ -5,7 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports["default"] = void 0;
|
|
8
|
-
var
|
|
8
|
+
var _jsCore = _interopRequireDefault(require("@webalternatif/js-core"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
10
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
10
11
|
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
11
12
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
@@ -64,23 +65,28 @@ var Mouse = /*#__PURE__*/function () {
|
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
/**
|
|
67
|
-
*
|
|
68
|
-
*
|
|
68
|
+
* Normalize an event
|
|
69
|
+
*
|
|
70
|
+
* @param {Event|{originalEvent?: Event}|{detail?: {originalEvent?: Event}}} ev
|
|
71
|
+
* @returns {{clientX:number, clientY:number, pageX:number, pageY:number}|null}
|
|
69
72
|
*/
|
|
70
73
|
}]);
|
|
71
74
|
}();
|
|
72
75
|
function _getEvent(ev) {
|
|
73
|
-
var _ev$
|
|
74
|
-
|
|
75
|
-
if (
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
76
|
+
var _ref, _ev$detail$originalEv, _ev$detail, _ref2, _e$changedTouches$, _e$changedTouches, _e$touches;
|
|
77
|
+
var e = (_ref = (_ev$detail$originalEv = ev === null || ev === void 0 || (_ev$detail = ev.detail) === null || _ev$detail === void 0 ? void 0 : _ev$detail.originalEvent) !== null && _ev$detail$originalEv !== void 0 ? _ev$detail$originalEv : ev === null || ev === void 0 ? void 0 : ev.originalEvent) !== null && _ref !== void 0 ? _ref : ev;
|
|
78
|
+
if (!e) return null;
|
|
79
|
+
var src = (_ref2 = (_e$changedTouches$ = (_e$changedTouches = e.changedTouches) === null || _e$changedTouches === void 0 ? void 0 : _e$changedTouches[0]) !== null && _e$changedTouches$ !== void 0 ? _e$changedTouches$ : (_e$touches = e.touches) === null || _e$touches === void 0 ? void 0 : _e$touches[0]) !== null && _ref2 !== void 0 ? _ref2 : e;
|
|
80
|
+
var clientX = typeof src.clientX === 'number' ? src.clientX : 0;
|
|
81
|
+
var clientY = typeof src.clientY === 'number' ? src.clientY : 0;
|
|
82
|
+
var pageX = typeof src.pageX === 'number' ? src.pageX : clientX + ('undefined' !== typeof window ? window.scrollX : 0);
|
|
83
|
+
var pageY = typeof src.pageY === 'number' ? src.pageY : clientY + ('undefined' !== typeof window ? window.scrollY : 0);
|
|
84
|
+
return {
|
|
85
|
+
clientX: clientX,
|
|
86
|
+
clientY: clientY,
|
|
87
|
+
pageX: pageX,
|
|
88
|
+
pageY: pageY
|
|
89
|
+
};
|
|
84
90
|
}
|
|
85
91
|
var _default = exports["default"] = Mouse;
|
|
86
92
|
/* istanbul ignore else */
|
package/dist/cjs/dom.js
CHANGED
|
@@ -338,7 +338,7 @@ var dom = {
|
|
|
338
338
|
return node;
|
|
339
339
|
},
|
|
340
340
|
/**
|
|
341
|
-
* @param {Element|
|
|
341
|
+
* @param {...(Element|NodeListOf<Element>|Iterable<Element>|string)} els
|
|
342
342
|
* @returns {void}
|
|
343
343
|
*/
|
|
344
344
|
remove: function remove() {
|
|
@@ -354,7 +354,9 @@ var dom = {
|
|
|
354
354
|
return e.remove();
|
|
355
355
|
});
|
|
356
356
|
} else {
|
|
357
|
-
_this3.
|
|
357
|
+
_this3.find(el).forEach(function (e) {
|
|
358
|
+
return e.remove();
|
|
359
|
+
});
|
|
358
360
|
}
|
|
359
361
|
});
|
|
360
362
|
},
|
package/dist/cjs/onOff.js
CHANGED
|
@@ -57,8 +57,6 @@ var enableLongTap = function enableLongTap() {
|
|
|
57
57
|
}, LONGPRESS_DELAY);
|
|
58
58
|
};
|
|
59
59
|
var move = function move(ev) {
|
|
60
|
-
// if (!timer) return;
|
|
61
|
-
|
|
62
60
|
var pos = _Mouse["default"].getViewportPosition(ev);
|
|
63
61
|
if (Math.hypot(pos.x - startX, pos.y - startY) > MOVE_TOLERANCE) {
|
|
64
62
|
clearTimeout(timer);
|
|
@@ -94,15 +92,19 @@ var enableDblTap = function enableDblTap() {
|
|
|
94
92
|
var MOVE_TOLERANCE = 40;
|
|
95
93
|
var lastTapTime = 0;
|
|
96
94
|
var lastPos = null;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
95
|
+
|
|
96
|
+
// if (isTouchDevice()) {
|
|
97
|
+
// document.addEventListener(
|
|
98
|
+
// 'dblclick',
|
|
99
|
+
// (ev) => {
|
|
100
|
+
// ev.preventDefault()
|
|
101
|
+
// ev.stopPropagation()
|
|
102
|
+
// ev.stopImmediatePropagation()
|
|
103
|
+
// },
|
|
104
|
+
// { capture: true },
|
|
105
|
+
// )
|
|
106
|
+
// }
|
|
107
|
+
|
|
106
108
|
var start = function start(ev) {
|
|
107
109
|
var target = ev.target;
|
|
108
110
|
if (Date.now() - lastTapTime > DBLTAP_DELAY) {
|
|
@@ -111,6 +113,7 @@ var enableDblTap = function enableDblTap() {
|
|
|
111
113
|
} else {
|
|
112
114
|
var pos = _Mouse["default"].getViewportPosition(ev);
|
|
113
115
|
if (Math.hypot(pos.x - lastPos.x, pos.y - lastPos.y) <= MOVE_TOLERANCE) {
|
|
116
|
+
ev.preventDefault();
|
|
114
117
|
target.dispatchEvent(new CustomEvent('dbltap', {
|
|
115
118
|
bubbles: true,
|
|
116
119
|
cancelable: true,
|
|
@@ -124,12 +127,10 @@ var enableDblTap = function enableDblTap() {
|
|
|
124
127
|
}
|
|
125
128
|
};
|
|
126
129
|
document.addEventListener('touchstart', start, {
|
|
127
|
-
passive:
|
|
130
|
+
passive: false
|
|
128
131
|
});
|
|
129
132
|
_teardownDblTap = function teardownDblTap() {
|
|
130
|
-
document.removeEventListener('touchstart', start
|
|
131
|
-
passive: true
|
|
132
|
-
});
|
|
133
|
+
document.removeEventListener('touchstart', start);
|
|
133
134
|
_teardownDblTap = null;
|
|
134
135
|
};
|
|
135
136
|
};
|
package/dist/cjs/traversal.js
CHANGED
|
@@ -15,7 +15,7 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
15
15
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
16
16
|
/**
|
|
17
17
|
* @template T
|
|
18
|
-
* @typedef {Array<T> | Set<T> | Map<any, T> | Object<string, T> | string | string[]} Collection
|
|
18
|
+
* @typedef {Array<T> | readonly T[] | Set<T> | Map<any, T> | Object<string, T> | string | string[]} Collection
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
/**
|
package/dist/cjs/utils.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.throttle = exports.strParseFloat = exports.sizeOf = exports.noop = exports.flatten = exports.equals = exports.debounce = void 0;
|
|
6
|
+
exports.throttle = exports.strParseFloat = exports.sizeOf = exports.noop = exports.getScrollbarWidth = exports.flatten = exports.equals = exports.debounce = void 0;
|
|
7
7
|
var _traversal = require("./traversal.js");
|
|
8
8
|
var _is = require("./is.js");
|
|
9
9
|
var _array = require("./array.js");
|
|
@@ -244,4 +244,25 @@ var debounce = exports.debounce = function debounce(func, wait) {
|
|
|
244
244
|
func.apply(context || _this2, args);
|
|
245
245
|
}, wait);
|
|
246
246
|
};
|
|
247
|
-
};
|
|
247
|
+
};
|
|
248
|
+
var getScrollbarWidth = exports.getScrollbarWidth = function () {
|
|
249
|
+
var scrollbarWidth = null;
|
|
250
|
+
return function () {
|
|
251
|
+
if (scrollbarWidth === null) {
|
|
252
|
+
var outer = document.createElement('div');
|
|
253
|
+
outer.style.visibility = 'hidden';
|
|
254
|
+
outer.style.width = '100px';
|
|
255
|
+
outer.style.msOverflowStyle = 'scrollbar';
|
|
256
|
+
document.body.appendChild(outer);
|
|
257
|
+
var widthNoScroll = outer.offsetWidth;
|
|
258
|
+
outer.style.overflow = 'scroll';
|
|
259
|
+
var inner = document.createElement('div');
|
|
260
|
+
inner.style.width = '100%';
|
|
261
|
+
outer.appendChild(inner);
|
|
262
|
+
var widthWithScroll = inner.offsetWidth;
|
|
263
|
+
outer.remove();
|
|
264
|
+
scrollbarWidth = widthNoScroll - widthWithScroll;
|
|
265
|
+
}
|
|
266
|
+
return scrollbarWidth;
|
|
267
|
+
};
|
|
268
|
+
}();
|
package/dist/esm/Mouse.js
CHANGED
|
@@ -5,7 +5,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
|
8
|
-
import
|
|
8
|
+
import webf from '@webalternatif/js-core';
|
|
9
9
|
var Mouse = /*#__PURE__*/function () {
|
|
10
10
|
function Mouse() {
|
|
11
11
|
_classCallCheck(this, Mouse);
|
|
@@ -58,23 +58,28 @@ var Mouse = /*#__PURE__*/function () {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
|
-
*
|
|
62
|
-
*
|
|
61
|
+
* Normalize an event
|
|
62
|
+
*
|
|
63
|
+
* @param {Event|{originalEvent?: Event}|{detail?: {originalEvent?: Event}}} ev
|
|
64
|
+
* @returns {{clientX:number, clientY:number, pageX:number, pageY:number}|null}
|
|
63
65
|
*/
|
|
64
66
|
}]);
|
|
65
67
|
}();
|
|
66
68
|
function _getEvent(ev) {
|
|
67
|
-
var _ev$
|
|
68
|
-
|
|
69
|
-
if (
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
69
|
+
var _ref, _ev$detail$originalEv, _ev$detail, _ref2, _e$changedTouches$, _e$changedTouches, _e$touches;
|
|
70
|
+
var e = (_ref = (_ev$detail$originalEv = ev === null || ev === void 0 || (_ev$detail = ev.detail) === null || _ev$detail === void 0 ? void 0 : _ev$detail.originalEvent) !== null && _ev$detail$originalEv !== void 0 ? _ev$detail$originalEv : ev === null || ev === void 0 ? void 0 : ev.originalEvent) !== null && _ref !== void 0 ? _ref : ev;
|
|
71
|
+
if (!e) return null;
|
|
72
|
+
var src = (_ref2 = (_e$changedTouches$ = (_e$changedTouches = e.changedTouches) === null || _e$changedTouches === void 0 ? void 0 : _e$changedTouches[0]) !== null && _e$changedTouches$ !== void 0 ? _e$changedTouches$ : (_e$touches = e.touches) === null || _e$touches === void 0 ? void 0 : _e$touches[0]) !== null && _ref2 !== void 0 ? _ref2 : e;
|
|
73
|
+
var clientX = typeof src.clientX === 'number' ? src.clientX : 0;
|
|
74
|
+
var clientY = typeof src.clientY === 'number' ? src.clientY : 0;
|
|
75
|
+
var pageX = typeof src.pageX === 'number' ? src.pageX : clientX + ('undefined' !== typeof window ? window.scrollX : 0);
|
|
76
|
+
var pageY = typeof src.pageY === 'number' ? src.pageY : clientY + ('undefined' !== typeof window ? window.scrollY : 0);
|
|
77
|
+
return {
|
|
78
|
+
clientX: clientX,
|
|
79
|
+
clientY: clientY,
|
|
80
|
+
pageX: pageX,
|
|
81
|
+
pageY: pageY
|
|
82
|
+
};
|
|
78
83
|
}
|
|
79
84
|
export default Mouse;
|
|
80
85
|
|
package/dist/esm/dom.js
CHANGED
|
@@ -332,7 +332,7 @@ var dom = {
|
|
|
332
332
|
return node;
|
|
333
333
|
},
|
|
334
334
|
/**
|
|
335
|
-
* @param {Element|
|
|
335
|
+
* @param {...(Element|NodeListOf<Element>|Iterable<Element>|string)} els
|
|
336
336
|
* @returns {void}
|
|
337
337
|
*/
|
|
338
338
|
remove: function remove() {
|
|
@@ -348,7 +348,9 @@ var dom = {
|
|
|
348
348
|
return e.remove();
|
|
349
349
|
});
|
|
350
350
|
} else {
|
|
351
|
-
_this3.
|
|
351
|
+
_this3.find(el).forEach(function (e) {
|
|
352
|
+
return e.remove();
|
|
353
|
+
});
|
|
352
354
|
}
|
|
353
355
|
});
|
|
354
356
|
},
|
package/dist/esm/onOff.js
CHANGED
|
@@ -48,8 +48,6 @@ var enableLongTap = function enableLongTap() {
|
|
|
48
48
|
}, LONGPRESS_DELAY);
|
|
49
49
|
};
|
|
50
50
|
var move = function move(ev) {
|
|
51
|
-
// if (!timer) return;
|
|
52
|
-
|
|
53
51
|
var pos = Mouse.getViewportPosition(ev);
|
|
54
52
|
if (Math.hypot(pos.x - startX, pos.y - startY) > MOVE_TOLERANCE) {
|
|
55
53
|
clearTimeout(timer);
|
|
@@ -85,15 +83,19 @@ var enableDblTap = function enableDblTap() {
|
|
|
85
83
|
var MOVE_TOLERANCE = 40;
|
|
86
84
|
var lastTapTime = 0;
|
|
87
85
|
var lastPos = null;
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
86
|
+
|
|
87
|
+
// if (isTouchDevice()) {
|
|
88
|
+
// document.addEventListener(
|
|
89
|
+
// 'dblclick',
|
|
90
|
+
// (ev) => {
|
|
91
|
+
// ev.preventDefault()
|
|
92
|
+
// ev.stopPropagation()
|
|
93
|
+
// ev.stopImmediatePropagation()
|
|
94
|
+
// },
|
|
95
|
+
// { capture: true },
|
|
96
|
+
// )
|
|
97
|
+
// }
|
|
98
|
+
|
|
97
99
|
var start = function start(ev) {
|
|
98
100
|
var target = ev.target;
|
|
99
101
|
if (Date.now() - lastTapTime > DBLTAP_DELAY) {
|
|
@@ -102,6 +104,7 @@ var enableDblTap = function enableDblTap() {
|
|
|
102
104
|
} else {
|
|
103
105
|
var pos = Mouse.getViewportPosition(ev);
|
|
104
106
|
if (Math.hypot(pos.x - lastPos.x, pos.y - lastPos.y) <= MOVE_TOLERANCE) {
|
|
107
|
+
ev.preventDefault();
|
|
105
108
|
target.dispatchEvent(new CustomEvent('dbltap', {
|
|
106
109
|
bubbles: true,
|
|
107
110
|
cancelable: true,
|
|
@@ -115,12 +118,10 @@ var enableDblTap = function enableDblTap() {
|
|
|
115
118
|
}
|
|
116
119
|
};
|
|
117
120
|
document.addEventListener('touchstart', start, {
|
|
118
|
-
passive:
|
|
121
|
+
passive: false
|
|
119
122
|
});
|
|
120
123
|
_teardownDblTap = function teardownDblTap() {
|
|
121
|
-
document.removeEventListener('touchstart', start
|
|
122
|
-
passive: true
|
|
123
|
-
});
|
|
124
|
+
document.removeEventListener('touchstart', start);
|
|
124
125
|
_teardownDblTap = null;
|
|
125
126
|
};
|
|
126
127
|
};
|
package/dist/esm/traversal.js
CHANGED
|
@@ -10,7 +10,7 @@ import { sizeOf } from './utils.js';
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @template T
|
|
13
|
-
* @typedef {Array<T> | Set<T> | Map<any, T> | Object<string, T> | string | string[]} Collection
|
|
13
|
+
* @typedef {Array<T> | readonly T[] | Set<T> | Map<any, T> | Object<string, T> | string | string[]} Collection
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
/**
|
package/dist/esm/utils.js
CHANGED
|
@@ -240,4 +240,25 @@ export var debounce = function debounce(func, wait) {
|
|
|
240
240
|
func.apply(context || _this2, args);
|
|
241
241
|
}, wait);
|
|
242
242
|
};
|
|
243
|
-
};
|
|
243
|
+
};
|
|
244
|
+
export var getScrollbarWidth = function () {
|
|
245
|
+
var scrollbarWidth = null;
|
|
246
|
+
return function () {
|
|
247
|
+
if (scrollbarWidth === null) {
|
|
248
|
+
var outer = document.createElement('div');
|
|
249
|
+
outer.style.visibility = 'hidden';
|
|
250
|
+
outer.style.width = '100px';
|
|
251
|
+
outer.style.msOverflowStyle = 'scrollbar';
|
|
252
|
+
document.body.appendChild(outer);
|
|
253
|
+
var widthNoScroll = outer.offsetWidth;
|
|
254
|
+
outer.style.overflow = 'scroll';
|
|
255
|
+
var inner = document.createElement('div');
|
|
256
|
+
inner.style.width = '100%';
|
|
257
|
+
outer.appendChild(inner);
|
|
258
|
+
var widthWithScroll = inner.offsetWidth;
|
|
259
|
+
outer.remove();
|
|
260
|
+
scrollbarWidth = widthNoScroll - widthWithScroll;
|
|
261
|
+
}
|
|
262
|
+
return scrollbarWidth;
|
|
263
|
+
};
|
|
264
|
+
}();
|
package/dist/umd/dom.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.dom=e():t.dom=e()}(this,()=>(()=>{"use strict";var t={260(t,e,n){n.d(e,{default:()=>f});var r=n(531);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,a(r.key),r)}}function a(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}function u(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return e=t,n=[{key:"getPosition",value:function(e,n){e=u(t,this,c).call(this,e);var r={left:0,top:0};if(n instanceof Element){var o=n.getBoundingClientRect();r={left:window.scrollX+o.left,top:window.scrollY+o.top}}return{x:e.pageX-r.left,y:e.pageY-r.top}}},{key:"getViewportPosition",value:function(e){return{x:(e=u(t,this,c).call(this,e)).clientX,y:e.clientY}}},{key:"getElement",value:function(e){return e=u(t,this,c).call(this,e),window.document.elementFromPoint(e.clientX,e.clientY)}}],null&&i(e.prototype,null),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function c(t){var e;if(t=null!==(e=t.originalEvent)&&void 0!==e?e:t,(0,r.isTouchDevice)()){var n,o,i=(null===(n=t.changedTouches)||void 0===n?void 0:n[0])||(null===(o=t.touches)||void 0===o?void 0:o[0]);t.clientX=i.clientX,t.clientY=i.clientY,t.pageX=i.pageX,t.pageY=i.pageY}return t}const f=l;"undefined"!=typeof window&&(window.webf=window.webf||{},window.webf.mouse=l)},626(t,e,n){n.d(e,{inArray:()=>a});var r=n(385),o=n(531),i=(n(245),n(82)),a=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],u=!1;return(0,r.each)(e,function(e,r){if(e>=n)if(a){if(r===t)return u=!0,!1}else{if((0,o.isObject)(t)&&(0,o.isObject)(r))return u=(0,i.equals)(r,t),!1;if((0,o.isArray)(t)&&(0,o.isObject)(r))return u=(0,i.equals)(r,t),!1;if(r==t)return u=!0,!1}}),u}},531(t,e,n){function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}n.d(e,{isArray:()=>f,isArrayLike:()=>c,isDocument:()=>y,isFunction:()=>u,isObject:()=>a,isPlainObject:()=>l,isString:()=>i,isTouchDevice:()=>p,isWindow:()=>v}),n(626);var o,i=function(t){return"string"==typeof t||"[object String]"===Object.prototype.toString.call(t)},a=function(t){return!!t&&!f(t)&&"object"===r(t)},u=function(t){return!!t&&"function"==typeof t},l=function(t){return!1!==a(t)&&(void 0===t.constructor||!1!==a(t.constructor.prototype)&&!1!==t.constructor.prototype.hasOwnProperty("isPrototypeOf"))},c=function(t){return!!t&&!i(t)&&!u(t)&&s(t.length)&&Number.isFinite(t.length)},f=function(t){return Array.isArray(t)},s=function(t){return/^[-+]?\d+$/.test(t+"")},d=(o={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"},function(t){var e=document.createElement(o[t]||"div"),n=(t="on"+t)in e;return e=null,n}),p=function(){return d("touchstart")},v=function(t){return!!t&&t===t.window},y=function(t){return!!t&&9===t.nodeType}},245(t,e,n){n(385),n(531),n(54)},54(t,e,n){n.d(e,{camelCase:()=>u}),n(531),n(245),n(626);var r=n(385),o=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"\\s";return i(a(t,e),e)},i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"\\s";return t.replace(new RegExp("^".concat(e,"+"),"g"),"")},a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"\\s";return t.replace(new RegExp("".concat(e,"+$"),"g"),"")},u=function(t){if(!t)return"";var e="",n=!1,i=!1,a=!1;t=o(t),t=o(t,"_"),t=o(t,"-");var u=function(t){return t===t.toUpperCase()&&t!==t.toLowerCase()},l=function(t){return"-"===t||"_"===t||" "===t};return(0,r.map)(t,function(t,r){return i=l(e),a=u(e),e=r,l(r)?null:(i?(r=r.toUpperCase(),n=!0):u(r)?((0===t||a&&!n)&&(r=r.toLowerCase()),n=!1):n=!1,r)}).join("")}},385(t,e,n){n.d(e,{each:()=>l,foreach:()=>c,map:()=>f});var r=n(531);function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,u=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return u}}(t,e)||a(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=a(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return u=t.done,t},e:function(t){l=!0,i=t},f:function(){try{u||null==n.return||n.return()}finally{if(l)throw i}}}}function a(t,e){if(t){if("string"==typeof t)return u(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}n(82);var l=function(t,e,n){if((0,r.isPlainObject)(t)){var a=-1;for(var u in t)if(t.hasOwnProperty(u)&&!1===e.call(null!=n?n:t[u],u,t[u],t,++a))return}else{if((0,r.isString)(t)){for(var l=t.split(""),c=0;c<l.length;c++)if(!1===e.call(null!=n?n:l[c],c,l[c],t,c))return t;return t}if(t instanceof Map){var f,s=0,d=i(t.entries());try{for(d.s();!(f=d.n()).done;){var p=o(f.value,2),v=p[0],y=p[1];if(!1===e.call(null!=n?n:y,v,y,t,s++))return t}}catch(t){d.e(t)}finally{d.f()}}else if(t instanceof Set){var m,h=0,g=i(t.values());try{for(g.s();!(m=g.n()).done;){var b=m.value;if(!1===e.call(null!=n?n:b,h,b,t,h))return t;h++}}catch(t){g.e(t)}finally{g.f()}}else if((0,r.isArrayLike)(t))for(var w=Array.from(t),S=0;S<w.length;S++)if(!1===e.call(n||w[S],S,w[S],w,S))return t}return t},c=function(t,e,n){return l(t,function(t,r,o,i){return e.apply(n||r,[r,t,o,i])},n)},f=function(t,e,n){var r=[];return l(t,function(t,o,i,a){var u=e.call(n,t,o,i,a);null!==u&&r.push(u)}),r}},82(t,e,n){n.d(e,{equals:()=>i}),n(385);var r=n(531);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}n(626);var i=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(e.length<2)return!1;var i=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new WeakMap;if(t===e)return!0;if(Number.isNaN(t)&&Number.isNaN(e))return!0;if(o(t)!==o(e)||null===t||null===e)return!1;if((0,r.isArray)(t)||(0,r.isObject)(t)){if(n.has(t))return n.get(t)===e;n.set(t,e)}if((0,r.isArray)(t)||(0,r.isArray)(e))return!(!(0,r.isArray)(t)||!(0,r.isArray)(e))&&t.length===e.length&&t.every(function(t,r){return i(t,e[r],n)});if((0,r.isObject)(t)){if(Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;if(t instanceof Date)return t.getTime()===e.getTime();if(t instanceof RegExp)return t.toString()===e.toString();var a=Object.keys(t),u=Object.keys(e);return a.length===u.length&&a.every(function(r){return i(t[r],e[r],n)})}return!1},a=e[0];return e.slice(1).every(function(t){return i(a,t)})}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};n.r(r),n.d(r,{default:()=>E});var o=n(531),i=n(54),a=n(385),u=n(626),l=n(260);function c(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=d(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function f(t){return function(t){if(Array.isArray(t))return p(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||d(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,u=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return u}}(t,e)||d(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t,e){if(t){if("string"==typeof t)return p(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(t,e):void 0}}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var v=new Map,y=["longtap","dbltap"],m=new Set;function h(t,e){var n={_immediateStopped:!1,_propagationStopped:!1,originalEvent:t,currentTarget:e,stopPropagation:function(){n._propagationStopped=!0,t.stopPropagation.apply(t,arguments)},stopImmediatePropagation:function(){n._immediateStopped=!0,n._propagationStopped=!0,t.stopImmediatePropagation.apply(t,arguments)}};return new Proxy(n,{get:function(e,n,r){if(n in e)return Reflect.get(e,n,r);var i=t[n];return(0,o.isFunction)(i)?i.bind(t):i}})}function g(t){return function(t){if(Array.isArray(t))return b(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return b(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var w=["animationIterationCount","aspectRatio","borderImageSlice","columnCount","flexGrow","flexShrink","fontWeight","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineHeight","opacity","order","orphans","scale","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeMiterlimit","strokeOpacity"],S={children:function(t,e){return e?this.find(t,":scope > ".concat(e)):Array.from(t.children)},child:function(t,e){return this.first(this.children(t,e))},find:function(t,e){if(void 0===e&&(e=t,t=document),e instanceof Element&&(e=[e]),(0,o.isArrayLike)(e))return(0,a.map)(Array.from(e),function(e,n){return n instanceof Element&&(t===n||t.contains(n))?n:null});try{return Array.from(t.querySelectorAll(e))}catch(t){return[]}},findOne:function(t,e){var n;return null!==(n=this.find(t,e)[0])&&void 0!==n?n:null},findByData:function(t,e,n){if(void 0===n)return this.find(t,"[data-".concat(e,"]"));var r=CSS.escape(n+"");return this.find(t,"[data-".concat(e,'="').concat(r,'"]'))},findOneByData:function(t,e,n){var r;return null!==(r=this.findByData(t,e,n)[0])&&void 0!==r?r:null},addClass:function(t,e){if(!e)return t;var n=e.split(" ").map(function(t){return t.trim()}).filter(Boolean);return(t instanceof Element?[t]:Array.from(t)).forEach(function(t){var e;t instanceof Element&&(e=t.classList).add.apply(e,g(n))}),t},removeClass:function(t,e){if(!e)return t;var n=e.split(" ").map(function(t){return t.trim()}).filter(Boolean);return(t instanceof Element?[t]:Array.from(t)).forEach(function(t){var e;t instanceof Element&&(e=t.classList).remove.apply(e,g(n))}),t},toggleClass:function(t,e,n){return(0,a.foreach)(e.split(" ").map(function(t){return t.trim()}).filter(Boolean),function(e){return t.classList.toggle(e,n)}),t},hasClass:function(t,e){if(!e)return!1;var n=!0;return(0,a.foreach)(e.split(" ").map(function(t){return t.trim()}).filter(Boolean),function(e){if(!(0,u.inArray)(e,Array.from(t.classList)))return n=!1,!1}),n},append:function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(0,a.foreach)(r,function(n){(0,o.isString)(n)&&(n=e.create(n)),n&&t.append(n)}),t},prepend:function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(0,a.foreach)([].concat(r).reverse(),function(n){(0,o.isString)(n)&&(n=e.create(n)),n&&t.prepend(n)}),t},remove:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];n.forEach(function(e){e instanceof Element?e.remove():e instanceof NodeList||(0,o.isArray)(e)?Array.from(e).forEach(function(t){return t.remove()}):t.remove(t.find(e))})},closest:function(t,e){if(e instanceof Element){if(t===e)return t;for(var n=t.parentElement;n;){if(n===e)return n;n=n.parentElement}return null}return void 0===e?t:t.closest(e)},next:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=t.nextElementSibling;return e?n&&n.matches(e)?n:null:n},prev:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=t.previousElementSibling;return e?n&&n.matches(e)?n:null:n},nextAll:function(t,e){for(var n=[],r=t.nextElementSibling;r;)(void 0===e||r.matches(e))&&n.push(r),r=r.nextElementSibling;return n},prevAll:function(t,e){for(var n=[],r=t.previousElementSibling;r;)(void 0===e||r.matches(e))&&n.push(r),r=r.previousElementSibling;return n},index:function(t,e){return this.prevAll(t,e).length},nextUntil:function(t,e){var n=!1,r=[];e instanceof Element&&(n=!0);for(var o=t.nextElementSibling;o&&!(n?o===e:o.matches(e));)r.push(o),o=o.nextElementSibling;return r},prevUntil:function(t,e){var n=!1,r=[];e instanceof Element&&(n=!0);for(var o=t.previousElementSibling;o&&!(n?o===e:o.matches(e));)r.push(o),o=o.previousElementSibling;return r},wrap:function(t,e){return e.isConnected||t.parentNode.insertBefore(e,t),this.append(e,t),t},attr:function(t,e,n){return void 0===n?t.getAttribute(e):(null===n?t.removeAttribute(e):t.setAttribute(e,n),t)},prop:function(t,e,n){return void 0===n?t[e]:(t[e]=n,t)},html:function(t,e){return void 0===e?t.innerHTML:(t.innerHTML=e,t)},text:function(t,e){return void 0===e?t.innerText:(t.innerText=e,t)},hide:function(t){if(void 0===this.data(t,"__display__")){var e;e=(0,o.isFunction)(window.getComputedStyle)?window.getComputedStyle(t).display:t.style.display,this.data(t,"__display__",e)}return t.style.display="none",t},show:function(t){var e=this.data(t,"__display__");return void 0===e?t.style.removeProperty("display"):(t.style.display=e,this.removeData(t,"__display__")),t},toggle:function(t){return"none"===this.css(t,"display")?this.show(t):this.hide(t)},data:function(t,e,n){var r=this;if(void 0===e&&void 0===n)return t.dataset;if((0,o.isPlainObject)(e))return(0,a.each)(e,function(e,n){return r.data(t,e,n)}),t;var u=/^data-/.test(e+""),l=(0,i.camelCase)(u?(e+"").replace(/^data-/,""):e+"");return void 0===n?t.dataset[l]:null===n?(delete t.dataset[l],t):(t.dataset[l]=n,t)},removeData:function(t,e){return this.data(t,e,null)},css:function(t,e,n){var r=this;if((0,o.isString)(e)){var l=e.startsWith("--")?e:(0,i.camelCase)(e);if(void 0===n){if(window.getComputedStyle){var c=window.getComputedStyle(t,null);return c.getPropertyValue(e)||c[(0,i.camelCase)(e)]||""}return t.style[(0,i.camelCase)(e)]||""}l.startsWith("--")?t.style.setProperty(l,String(n)):("number"!=typeof n||(0,u.inArray)(l,w)||(n+="px"),t.style[l]=n)}else(0,a.each)(e,function(e,n){r.css(t,e,n)});return t},closestFind:function(t,e,n){var r=this.closest(t,e);return r?this.find(r,n):[]},closestFindOne:function(t,e,n){var r=this.closest(t,e);return r?this.findOne(r,n):null},first:function(t){var e;return t instanceof Element?t:null!==(e=Array.from(t)[0])&&void 0!==e?e:null},last:function(t){var e;if(t instanceof Element)return t;var n=Array.from(t);return null!==(e=n[n.length-1])&&void 0!==e?e:null},create:function(t){if(!(0,o.isString)(t))return null;if(/^[A-Za-z][A-Za-z0-9-]*$/.test(t))return document.createElement(t);var e=document.createElement("template");e.innerHTML=t.trim();var n=e.content;return 1===n.childElementCount&&1===n.children.length?n.firstElementChild:n.cloneNode(!0)},eq:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t=Array.from(t),Math.abs(e)>=t.length?null:(e<0&&(e=t.length+e),t[e])},after:function(t,e){return t.parentElement?((0,o.isString)(e)&&(e=this.create(e)),t.parentElement.insertBefore(e,t.nextElementSibling)):null},before:function(t,e){return t.parentElement?((0,o.isString)(e)&&(e=this.create(e)),t.parentElement.insertBefore(e,t)):null},empty:function(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t},not:function(t,e){var n=t instanceof Element?[t]:Array.from(t),r=(0,o.isString)(e);return n.filter(function(t){return r?!t.matches(e):t!==e})},collide:function(t,e){var n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return n.x<r.x+r.width&&n.x+n.width>r.x&&n.y<r.y+r.height&&n.y+n.height>r.y},matches:function(t,e){return!!t&&(e instanceof Element?e===t:t.matches(e))},replaceChild:function(t,e,n){return t.replaceChild(e,n)},replaceChildren:function(t){for(var e=this,n=[],r=arguments.length,i=new Array(r>1?r-1:0),u=1;u<r;u++)i[u-1]=arguments[u];return(0,a.foreach)(i,function(t){(0,o.isString)(t)&&(t=e.create(t)),n.push(t)}),t.replaceChildren.apply(t,n),t},offset:function(t){if((0,o.isWindow)(t))return{top:t.scrollY,left:t.scrollX};if((0,o.isDocument)(t))return{top:t.documentElement.scrollTop,left:t.documentElement.scrollLeft};var e=t.getBoundingClientRect(),n=this.offset(window);return{top:e.top+n.top,left:e.left+n.left}},isEditable:function(t){var e;return 3===(null===(e=t)||void 0===e?void 0:e.nodeType)&&(t=t.parentElement),t instanceof HTMLElement&&((0,u.inArray)(t.tagName,["INPUT","TEXTAREA","SELECT"])||t.isContentEditable||!!this.closest(t,'[contenteditable="true"]'))},isInDOM:function(t){return t instanceof Node&&t.getRootNode({composed:!0})===document},on:function(t,e,n,r,i){return(0,o.isFunction)(n)&&(i=r,r=n,n=null),(0,a.foreach)(e.split(" "),function(e){var d=s(e.split("."),2),p=d[0],g=d[1],b=function(e){if(!e.cancelBubble){var n,r=function(t,e){for(var n=[],r=3===t.nodeType?t.parentNode:t;r&&(n.push(r),r!==e);)r=r.parentNode;return n}(e.target,t),o=f(v.get(t)),i=c(r);try{for(i.s();!(n=i.n()).done;){var a,u=n.value,l=!1,s=c(o);try{for(s.s();!(a=s.n()).done;){var d=a.value;if(d.event===e.type){if(d.selector){if(!u.matches(d.selector))continue}else if(u!==t)continue;var p=h(e,u);if(d.handler.call(u,p),p._immediateStopped)return;p._propagationStopped&&(l=!0)}}}catch(t){s.e(t)}finally{s.f()}if(l)return}}catch(t){i.e(t)}finally{i.f()}}},w=v.get(t);w||(w=[],v.set(t,w)),(0,u.inArray)(p,y)&&function(t){var e,n,r,i,a,u,c;null!=m&&m.has(t)||("longtap"===t&&(r=null,i=0,a=0,u=null,c=function(){clearTimeout(r),r=null},document.addEventListener("touchstart",function(t){u=t.target;var e=l.default.getViewportPosition(t);i=e.x,a=e.y,r=setTimeout(function(){u.dispatchEvent(new CustomEvent("longtap",{bubbles:!0,cancelable:!0,detail:{originalEvent:t}})),r=null},800)},{passive:!0}),document.addEventListener("touchmove",function(t){var e=l.default.getViewportPosition(t);Math.hypot(e.x-i,e.y-a)>40&&(clearTimeout(r),r=null)},{passive:!0}),document.addEventListener("touchend",c),document.addEventListener("touchcancel",c)),"dbltap"===t&&(e=0,n=null,(0,o.isTouchDevice)()&&document.addEventListener("dblclick",function(t){t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()},{capture:!0}),document.addEventListener("touchstart",function(t){var r=t.target;if(Date.now()-e>300)e=Date.now(),n=l.default.getViewportPosition(t);else{var o=l.default.getViewportPosition(t);Math.hypot(o.x-n.x,o.y-n.y)<=40&&r.dispatchEvent(new CustomEvent("dbltap",{bubbles:!0,cancelable:!0,detail:{originalEvent:t}})),e=Date.now(),n=o}},{passive:!0})),m.add(t))}(p);var S=(0,a.map)(w,function(t,e){return e.event});(0,u.inArray)(p,S)||t.addEventListener(p,b,i),w.push({event:p,handler:r,selector:n,listener:b,namespace:g,options:i})}),t},off:function(t,e,n,r,i){(0,o.isFunction)(n)&&(i=r,r=n,n=null);var u=v.get(t);if(!u)return t;var l=e?e.split(" "):[void 0];return(0,a.foreach)(l,function(e){var o=s(void 0===e?[void 0,void 0]:e.split("."),2),l=o[0],c=o[1],d=void 0!==(l=l||void 0),p=void 0!==c;(0,a.foreach)(f(u).reverse(),function(e){if((!d&&!p||d&&!p&&e.event===l||!d&&p&&e.namespace===c||d&&p&&e.event===l&&e.namespace===c)&&(void 0===l||e.event===l)&&(void 0===r||e.handler===r)&&(void 0===n||e.selector===n)&&(void 0===c||e.namespace===c)&&(void 0===i||e.options===i)){var o=u.indexOf(e);-1!==o&&u.splice(o,1),(0,a.map)(u,function(t,e){return e.event===l?e:null})[0]||t.removeEventListener(e.event,e.listener,e.options)}})}),t}};const E=S;return"undefined"!=typeof window&&(window.webf=window.webf||{},window.webf.dom=S),r})());
|
|
1
|
+
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.dom=n():t.dom=n()}(this,()=>(()=>{"use strict";var t={153(t,n,e){e.d(n,{default:()=>le});var r={};e.r(r),e.d(r,{debounce:()=>g,equals:()=>p,flatten:()=>y,getScrollbarWidth:()=>b,noop:()=>d,sizeOf:()=>v,strParseFloat:()=>h,throttle:()=>m});var o={};e.r(o),e.d(o,{clone:()=>T,each:()=>C,extend:()=>P,foreach:()=>j,map:()=>x,merge:()=>L,reduce:()=>O});var i={};e.r(i),e.d(i,{dec2hex:()=>R,floorTo:()=>_,hex2dec:()=>B,max:()=>D,min:()=>k,plancher:()=>I,round:()=>M});var a={};e.r(a),e.d(a,{arrayDiff:()=>W,arrayUnique:()=>F,array_diff:()=>z,array_unique:()=>q,inArray:()=>U,indexOf:()=>X,lastIndexOf:()=>Y,range:()=>$});var u={};e.r(u),e.d(u,{isArray:()=>rt,isArrayLike:()=>et,isBool:()=>tt,isBoolean:()=>Q,isDate:()=>ot,isDocument:()=>dt,isDomElement:()=>vt,isEvent:()=>it,isEventSupported:()=>ft,isFloat:()=>lt,isFunction:()=>J,isInt:()=>ut,isInteger:()=>at,isObject:()=>Z,isPlainObject:()=>K,isScalar:()=>ct,isString:()=>G,isTouchDevice:()=>st,isUndefined:()=>nt,isWindow:()=>pt});var l={};e.r(l),e.d(l,{addUrlParam:()=>Ut,br2nl:()=>Et,camelCase:()=>Vt,compareMixAlphaDigits:()=>Qt,decodeHtml:()=>Xt,escapeRegex:()=>$t,f:()=>Gt,format:()=>Ht,formatSize:()=>Kt,hex2rgb:()=>Nt,hextorgb:()=>Rt,hilite:()=>Jt,htmlquotes:()=>Yt,htmlsimplequotes:()=>Ft,insert:()=>Pt,insertTag:()=>xt,lcfirst:()=>jt,ltrim:()=>gt,nl2br:()=>At,noAccent:()=>St,numberFormat:()=>Mt,pad:()=>It,parse_url:()=>Bt,repeat:()=>qt,reverse:()=>Tt,rgb2hex:()=>kt,rgbtohex:()=>Dt,rtrim:()=>bt,stripMultipleSpaces:()=>wt,stripTags:()=>Wt,substringIndex:()=>Ot,thousandSeparator:()=>Lt,toCssClassName:()=>Zt,toPrice:()=>_t,toUrl:()=>zt,trim:()=>mt,ucfirst:()=>Ct});var c={};function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}e.r(c),e.d(c,{rand:()=>un,randAlpha:()=>nn,randAlphaCs:()=>en,randAlphaNum:()=>rn,randAlphaNumCs:()=>on,randNum:()=>an,uniqid:()=>ln});var s,p=function(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];if(n.length<2)return!1;var r=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new WeakMap;if(t===n)return!0;if(Number.isNaN(t)&&Number.isNaN(n))return!0;if(f(t)!==f(n)||null===t||null===n)return!1;if(rt(t)||Z(t)){if(e.has(t))return e.get(t)===n;e.set(t,n)}if(rt(t)||rt(n))return!(!rt(t)||!rt(n))&&t.length===n.length&&t.every(function(t,o){return r(t,n[o],e)});if(Z(t)){if(Object.getPrototypeOf(t)!==Object.getPrototypeOf(n))return!1;if(t instanceof Date)return t.getTime()===n.getTime();if(t instanceof RegExp)return t.toString()===n.toString();var o=Object.keys(t),i=Object.keys(n);return o.length===i.length&&o.every(function(o){return r(t[o],n[o],e)})}return!1},o=n[0];return n.slice(1).every(function(t){return r(o,t)})},d=function(){},v=function(t){return x(t,d).length},y=function(t){return Z(t)||rt(t)?[].concat.apply([],x(t,function(t,n){return y(n)})):t},h=function(t){if(!t)return 0;var n=parseFloat((t+"").replace(/\s/g,"").replace(",","."));return Number.isNaN(n)?0:n},m=function(t,n){var e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i=null,a=0;return function(){for(var u=this,l=arguments.length,c=new Array(l),f=0;f<l;f++)c[f]=arguments[f];var s=Date.now();a||e||(a=s);var p=n-(s-a);p<=0||p>n?(a=s,t.apply(o||this,c)):!i&&r&&(i=setTimeout(function(){i=null,a=e?Date.now():0,t.apply(o||u,c)},p))}},g=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=null,i=0;return function(){for(var a=this,u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];var f=Date.now();e&&(i||(i=f,t.apply(r||this,l))),clearTimeout(o),o=null,o=setTimeout(function(){i=f,clearTimeout(o),o=null,t.apply(r||a,l)},n)}},b=(s=null,function(){if(null===s){var t=document.createElement("div");t.style.visibility="hidden",t.style.width="100px",t.style.msOverflowStyle="scrollbar",document.body.appendChild(t);var n=t.offsetWidth;t.style.overflow="scroll";var e=document.createElement("div");e.style.width="100%",t.appendChild(e);var r=e.offsetWidth;t.remove(),s=n-r}return s});function w(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var r,o,i,a,u=[],l=!0,c=!1;try{if(i=(e=e.call(t)).next,0===n){if(Object(e)!==e)return;l=!1}else for(;!(l=(r=i.call(e)).done)&&(u.push(r.value),u.length!==n);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=e.return&&(a=e.return(),Object(a)!==a))return}finally{if(c)throw o}}return u}}(t,n)||E(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(t,n){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=E(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==e.return||e.return()}finally{if(u)throw i}}}}function E(t,n){if(t){if("string"==typeof t)return A(t,n);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?A(t,n):void 0}}function A(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=Array(n);e<n;e++)r[e]=t[e];return r}var C=function(t,n,e){if(K(t)){var r=-1;for(var o in t)if(t.hasOwnProperty(o)&&!1===n.call(null!=e?e:t[o],o,t[o],t,++r))return}else{if(G(t)){for(var i=t.split(""),a=0;a<i.length;a++)if(!1===n.call(null!=e?e:i[a],a,i[a],t,a))return t;return t}if(t instanceof Map){var u,l=0,c=S(t.entries());try{for(c.s();!(u=c.n()).done;){var f=w(u.value,2),s=f[0],p=f[1];if(!1===n.call(null!=e?e:p,s,p,t,l++))return t}}catch(t){c.e(t)}finally{c.f()}}else if(t instanceof Set){var d,v=0,y=S(t.values());try{for(y.s();!(d=y.n()).done;){var h=d.value;if(!1===n.call(null!=e?e:h,v,h,t,v))return t;v++}}catch(t){y.e(t)}finally{y.f()}}else if(et(t))for(var m=Array.from(t),g=0;g<m.length;g++)if(!1===n.call(e||m[g],g,m[g],m,g))return t}return t},j=function(t,n,e){return C(t,function(t,r,o,i){return n.apply(e||r,[r,t,o,i])},e)},x=function(t,n,e){var r=[];return C(t,function(t,o,i,a){var u=n.call(e,t,o,i,a);null!==u&&r.push(u)}),r},O=function(t,n,e){var r=!nt(e);if(!v(t)&&!r)throw new Error("Nothing to reduce and no initial value");var o=r?e:x(t,function(t,n,e,r){return 0===r?n:null})[0];return C(t,function(t,e,i,a){(0!==a||r)&&(o=n(o,e,t,a,i))}),o},P=function(){for(var t=!1,n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];if(Q(e[0])&&(t=e.shift()),e.length<2||nt(e[0])||null===e[0])return e[0];var o=e[0];return Z(o)||(e[0]=o={}),j(e.slice(1),function(n){if(Z(n))for(var e in n)t&&K(n[e])?o[e]=P(!0,{},o[e],n[e]):o[e]=n[e]}),o},T=function(t){if(!Z(t)&&!rt(t)||pt(t))return t;var n=Z(t)?{}:[];return C(t,function(t,e){Z(e)?n[t]=T(e):n[t]=e}),n},L=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],e=x(t,function(t,n){return n});C(n,function(t,n){e.push(n)});for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];return o.length?L.apply(void 0,[e].concat(o)):e},M=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Math.round(t*Math.pow(10,n))/Math.pow(10,n)},_=function(t,n){if(n<=0)throw new Error("Precision must be greater than 0");return M(Math.floor(t/n)*n,6)},I=_,k=function(t,n){return N(t,n=J(n)?n:function(t,n){return t<n?-1:1})},D=function(t,n){return N(t,n=J(n)?n:function(t,n){return t>n?-1:1})};function N(t,n){var e;return C(t,function(t,r,o,i){e=0===i||n.call(null,e,r)>0?r:e}),e}var R=function(t){return t.toString(16)},B=function(t){t=Tt(t+"").toUpperCase();var n=0;return C(t,function(t,e){var r="0123456789ABCDEF".indexOf(e);if(-1===r)return n=0,!1;n+=r*Math.pow(2,4*t)}),n},U=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=!1;return C(n,function(n,i){if(n>=e)if(r){if(i===t)return o=!0,!1}else{if(Z(t)&&Z(i))return o=p(i,t),!1;if(rt(t)&&Z(i))return o=p(i,t),!1;if(i==t)return o=!0,!1}}),o},X=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=G(t)?x(t,function(t,n){return n}):t;for(e=e<0?Math.ceil(e)+r.length:Math.floor(e);e<r.length;e++)if(e in r&&r[e]===n)return e;return-1},Y=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=G(t)?x(t,function(t,n){return n}):t;for(e=e<0?r.length+Math.ceil(e):Math.floor(e);e>=0;e--)if(e in r&&r[e]===n)return e;return-1},F=function(t){return t.filter(function(t,n,e){return n===X(e,t)})},q=F,W=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t.filter(function(t){return!U(t,n,0,e)})},z=W,$=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;t=M(t),e=M(e);var r=[];if(nt(n)||t<1||0===e||t<Math.abs(e))return r;var o=t*e;if(G(n)){n=n.charCodeAt(0);for(var i=0;e>0?i<o:i>o;i+=e)r.push(String.fromCharCode(n+i))}else if(at(n))for(var a=0;e>0?a<o:a>o;a+=e)r.push(n+a);return r};function V(t){return V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},V(t)}var H,G=function(t){return"string"==typeof t||"[object String]"===Object.prototype.toString.call(t)},Z=function(t){return!!t&&!rt(t)&&"object"===V(t)},J=function(t){return!!t&&"function"==typeof t},K=function(t){return!1!==Z(t)&&(void 0===t.constructor||!1!==Z(t.constructor.prototype)&&!1!==t.constructor.prototype.hasOwnProperty("isPrototypeOf"))},Q=function(t){return!0===t||!1===t},tt=Q,nt=function(t){return void 0===t},et=function(t){return!!t&&!G(t)&&!J(t)&&ut(t.length)&&Number.isFinite(t.length)},rt=function(t){return Array.isArray(t)},ot=function(t){return!!t&&"[object Date]"===Object.prototype.toString.call(t)},it=function(t){return Z(t)&&(!!t.preventDefault||/\[object Event\]/.test(t.constructor.toString()))},at=function(t){return/^[-+]?\d+$/.test(t+"")},ut=at,lt=function(t){return/^[-+]?\d+(\.\d+)?$/.test(t+"")},ct=function(t){var n=V(t);return null===t||U(n,["string","number","bigint","symbol","boolean"])},ft=(H={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"},function(t){var n=document.createElement(H[t]||"div"),e=(t="on"+t)in n;return n=null,e}),st=function(){return ft("touchstart")},pt=function(t){return!!t&&t===t.window},dt=function(t){return!!t&&9===t.nodeType},vt=function(t){return Z(t)&&1===t.nodeType&&!K(t)};function yt(t){return function(t){if(Array.isArray(t))return ht(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,n){if(t){if("string"==typeof t)return ht(t,n);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?ht(t,n):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ht(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=Array(n);e<n;e++)r[e]=t[e];return r}var mt=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"\\s";return gt(bt(t,n),n)},gt=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"\\s";return t.replace(new RegExp("^".concat(n,"+"),"g"),"")},bt=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"\\s";return t.replace(new RegExp("".concat(n,"+$"),"g"),"")},wt=function(t){return t.trim().replace(/ +/g," ")},St=function(t){return t.replace(/[àäâ]/g,"a").replace(/[èéêë]/g,"e").replace(/[îïí]/g,"i").replace(/[öô]/g,"o").replace(/[üù]/g,"u").replace(/ç/g,"c").replace(/ÿ/g,"y").replace(/[ÀÄÂ]/g,"A").replace(/[ÈÉÊË]/g,"E").replace(/[ÎÏÍ]/g,"I").replace(/[ÖÔ]/g,"O").replace(/[ÜÙ]/g,"U").replace(/Ç/g,"C").replace(/Ÿ/g,"Y")},Et=function(t){return t.split(/<br\s*\/*>/).join("\n")},At=function(t){return t.split("\n").join("<br>")},Ct=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},jt=function(t){return t.charAt(0).toLowerCase()+t.slice(1)},xt=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o="<".concat(n,">"),i="</".concat(n,">");return["br","hr","img","link","input"].includes(n)&&(o="<".concat(n,"/>"),i=""),t.slice(0,e)+o+t.slice(e,e+r)+i+t.slice(e+r)},Ot=function(t,n,e){var r=(t+"").split(n);return e>0?r.splice(e,r.length-e):e<0&&r.splice(0,r.length+e),r.join(n)},Pt=function(t,n,e){return e>=t.length?t:yt(t).reduce(function(t,r,o){return o>0&&o%e===0?t+n+r:t+r},"")},Tt=function(t){for(var n=[],e=0;e<t.length;e++)n.unshift(t[e]);return n.join("")},Lt=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".",e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(nt(t)||null===t)return t;if(t=(t+"").replace(",","."),Math.abs(t)>=1e3){var r=Math[t>=1e3?"floor":"ceil"](t)+"",o=Tt(Pt(Tt(r),Tt(n),3));return t.indexOf(".")>0?o+e+Ot(t,".",-1):o}return(t+"").replace(".",e)},Mt=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:".";if(t=t?t+"":"0",t=M(parseFloat(t.replace(",",".")),n)+"",0===n)return Lt(t,r,o);var i=t.lastIndexOf(".");if(-1===i)return!0===e&&(t+=o+qt("0",n)),Lt(t,r,o);var a=t.slice(i+1).length;return Lt(n>a?t+"0".repeat(n-a):t.slice(0,i+1+n),r,o)},_t=Mt,It=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:" ",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"left";return nt(n)||t.length>=n||!U(r,["left","right"])?t:"left"===r?e.repeat(Math.ceil(n/e.length)).slice(0,n-t.length)+t:t+e.repeat(Math.ceil(n/e.length)).slice(0,n-t.length)},kt=function(t,n,e){return rt(t)?kt.apply(void 0,yt(t)):at(t)&&at(n)&&at(e)?[It(R(parseInt(t)),2,"0").toUpperCase(),It(R(parseInt(n)),2,"0").toUpperCase(),It(R(parseInt(e)),2,"0").toUpperCase()].join(""):""},Dt=kt,Nt=function(t){if(!G(t)||!t.length)return[];(t=t.slice(-6).toUpperCase()).length<6&&(t=x(t.slice(-3),function(t,n){return n+""+n}).join(""));for(var n=0;n<t.length;n++)if(-1==="0123456789ABCDEF".indexOf(t[n]))return[];return x(Pt(t,",",2).split(","),function(t,n){return B(n)})},Rt=Nt,Bt=function(t){for(var n=["source","scheme","authority","userInfo","user","pass","host","port","relative","path","directory","file","query","fragment"],e=/^(?:([^:\/?#]+):)?(?:\/\/()(?:(?:()(?:([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?()(?:(()(?:(?:[^?#\/]*\/)*)()(?:[^?#]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(t),r={},o=14;o--;)e[o]&&(r[n[o]]=e[o]);return delete r.source,r},Ut=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(K(n))return C(n,function(n,e){t=Ut(t,n,e)}),t;var r,o=Bt(t),i="";(r=t.indexOf("#"))>-1&&(i=t.slice(r),t=t.slice(0,r));var a=encodeURIComponent(n),u=null===e?"":encodeURIComponent(e);if(!o.query)return t+"?"+a+"="+u+i;for(var l=o.query.split("&"),c=!1,f=0;f<l.length;f++)if(l[f].startsWith(a+"=")){l[f]=a+"="+u,c=!0;break}return c||l.push(a+"="+u),o.scheme&&o.host?o.scheme+"://"+o.host+(o.path||"")+"?"+l.join("&")+i:(o.host||"")+o.path+"?"+l.join("&")+i},Xt=function(t){return G(t)?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'"):""},Yt=function(t){return G(t)?t.replace(/"/g,""").replace(/'/g,"'"):""},Ft=function(t){return G(t)?t.replace(/'/g,"'"):""},qt=function(t,n){return G(t)&<(n)?new Array(Math.floor(n)+1).join(t):""},Wt=function(t,n){if(G(n)){for(var e=new RegExp("<".concat(n,"[^>]*>(.*?)</").concat(n,">|<").concat(n,"[^>]*/>"),"ig");e.test(t);)t=t.replace(e,"$1");return t}return t.replace(/(<([^>]+)>)/gi,"")},zt=function(t){return mt(St(t).toLowerCase().replace(/[^a-z0-9]/g,"-").replace(/-{2,}/g,"-"),"-")},$t=function(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&").replace(/[\n\t]/g," ")},Vt=function(t){if(!t)return"";var n="",e=!1,r=!1,o=!1;t=mt(t),t=mt(t,"_"),t=mt(t,"-");var i=function(t){return t===t.toUpperCase()&&t!==t.toLowerCase()},a=function(t){return"-"===t||"_"===t||" "===t};return x(t,function(t,u){return r=a(n),o=i(n),n=u,a(u)?null:(r?(u=u.toUpperCase(),e=!0):i(u)?((0===t||o&&!e)&&(u=u.toLowerCase()),e=!1):e=!1,u)}).join("")},Ht=function(t){for(var n=arguments.length,e=new Array(n>1?n-1:0),r=1;r<n;r++)e[r-1]=arguments[r];return e.length&&C(e,function(n,e){if(G(e)){var r={};r[n]=e,e=r}C(e,function(n,e){t=t.replace(new RegExp("\\{"+n+"\\}","gm"),function(t){return nt(e)?t:e})})}),t},Gt=Ht,Zt=function(t){return t.replace(/[^a-z0-9_-]/gi,function(t){var n=t.charCodeAt(0);return 32===n?"-":"__"+("000"+n.toString(16)).slice(-4)})},Jt=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"strong";t=Xt(t);var r,o,i=St(t).toLowerCase().replace(/[[\]]+/g,""),a="";if(rt(n)||(n=[n]),C(n,function(t,n){n.length&&(n=Xt(n),r=St(n).toLowerCase().replace(/[[\]]+/g,""),o=new RegExp($t(r),"g"),a=i.replace(o,"[".concat(r,"]")),i=a)}),!a.length)return t;var u=0,l="",c="end";return C(a,function(n,r){var o=t.charAt(u);"["===r&&"end"===c?(l+="<".concat(e,">"),c="start"):"]"===r&&"start"===c?(l+="</".concat(e,">"),c="end"):(u+=1,l+=o)}),l.replace(/</g,"<").replace(/>/g,">").replace(new RegExp("<".concat(e,">"),"g"),"<".concat(e,">")).replace(new RegExp("</".concat(e,">"),"g"),"</".concat(e,">")).replace(new RegExp("<br>","g"),"<br>")},Kt=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:",",e=-1,r=0;do{t/=1024,e++}while(t>999);at(t)||(r=1);var o=x(["k","M","G","T","P","E"],function(t,n){return n+"B"});return Mt(Math.max(t,0),r,!0,"",n)+" "+o[e]},Qt=function(t,n){if(t===n)return 0;if(at(t)&&at(n))return Math.sign(t-n);for(var e="",r=0;r<Math.min(t.length,n.length)&&t.charAt(r)===n.charAt(r)&&!at(t);r++)e+=t.charAt(r);t=t.slice(e.length),n=n.slice(e.length);var o="",i=null;C(t,function(t,n){if(o)return n>="0"&&n<="9"&&(o+=n,!0);i=t,n>="0"&&n<="9"&&(o+=n)});var a="",u=null;return C(n,function(t,n){if(a)return n>="0"&&n<="9"&&(a+=n,!0);u=t,n>="0"&&n<="9"&&(a+=n)}),o.length&&a.length&&i===u&&t.substring(0,i)===n.substring(0,u)?Math.sign(o-a):t>n?1:-1};j(Object.keys(l),function(t){var n=l[t],e=String.prototype,r=e[t];e[t]=function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return r&&e.length===r.length?r.apply(this,e):n.apply(void 0,[this].concat(e))}});var tn,nn=function(t){return un("abcdefghijklmnopqrstuvwxyz".split(""),t)},en=function(t){return un("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),t)},rn=function(t){return un("0123456789abcdefghijklmnopqrstuvwxyz".split(""),t)},on=function(t){return un("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),t)},an=function(t){return un("0123456789".split(""),t)},un=function(t,n){for(var e="",r=0;r<n;r++)e+=t[Math.floor(1e3*Math.random())%t.length];return e},ln=(tn=0,function(){return tn++,"".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").concat(Date.now().toString(36),"_").concat(tn.toString(36),"_").concat(rn(5))});function cn(t){return cn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cn(t)}function fn(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,sn(r.key),r)}}function sn(t){var n=function(t){if("object"!=cn(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var e=n.call(t,"string");if("object"!=cn(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==cn(n)?n:n+""}function pn(t,n,e){if("function"==typeof t?t===n:t.has(n))return arguments.length<3?n:e;throw new TypeError("Private element is not present on this object")}var dn=function(){function t(){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t)}return n=t,e=[{key:"getPosition",value:function(n,e){n=pn(t,this,vn).call(this,n);var r={left:0,top:0};if(e instanceof Element){var o=e.getBoundingClientRect();r={left:window.scrollX+o.left,top:window.scrollY+o.top}}return{x:n.pageX-r.left,y:n.pageY-r.top}}},{key:"getViewportPosition",value:function(n){return{x:(n=pn(t,this,vn).call(this,n)).clientX,y:n.clientY}}},{key:"getElement",value:function(n){return n=pn(t,this,vn).call(this,n),window.document.elementFromPoint(n.clientX,n.clientY)}}],null&&fn(n.prototype,null),e&&fn(n,e),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,e}();function vn(t){var n,e,r,o,i,a,u,l=null!==(n=null!==(e=null==t||null===(r=t.detail)||void 0===r?void 0:r.originalEvent)&&void 0!==e?e:null==t?void 0:t.originalEvent)&&void 0!==n?n:t;if(!l)return null;var c=null!==(o=null!==(i=null===(a=l.changedTouches)||void 0===a?void 0:a[0])&&void 0!==i?i:null===(u=l.touches)||void 0===u?void 0:u[0])&&void 0!==o?o:l,f="number"==typeof c.clientX?c.clientX:0,s="number"==typeof c.clientY?c.clientY:0;return{clientX:f,clientY:s,pageX:"number"==typeof c.pageX?c.pageX:f+("undefined"!=typeof window?window.scrollX:0),pageY:"number"==typeof c.pageY?c.pageY:s+("undefined"!=typeof window?window.scrollY:0)}}const yn=dn;function hn(t,n){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=bn(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==e.return||e.return()}finally{if(u)throw i}}}}function mn(t){return function(t){if(Array.isArray(t))return wn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||bn(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gn(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var r,o,i,a,u=[],l=!0,c=!1;try{if(i=(e=e.call(t)).next,0===n){if(Object(e)!==e)return;l=!1}else for(;!(l=(r=i.call(e)).done)&&(u.push(r.value),u.length!==n);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=e.return&&(a=e.return(),Object(a)!==a))return}finally{if(c)throw o}}return u}}(t,n)||bn(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bn(t,n){if(t){if("string"==typeof t)return wn(t,n);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?wn(t,n):void 0}}function wn(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=Array(n);e<n;e++)r[e]=t[e];return r}"undefined"!=typeof window&&(window.webf=window.webf||{},window.webf.mouse=dn);var Sn=new Map,En=["longtap","dbltap"],An=new Set;function Cn(t,n){var e={_immediateStopped:!1,_propagationStopped:!1,originalEvent:t,currentTarget:n,stopPropagation:function(){e._propagationStopped=!0,t.stopPropagation.apply(t,arguments)},stopImmediatePropagation:function(){e._immediateStopped=!0,e._propagationStopped=!0,t.stopImmediatePropagation.apply(t,arguments)}};return new Proxy(e,{get:function(n,e,r){if(e in n)return Reflect.get(n,e,r);var o=t[e];return J(o)?o.bind(t):o}})}function jn(t){return function(t){if(Array.isArray(t))return xn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,n){if(t){if("string"==typeof t)return xn(t,n);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?xn(t,n):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xn(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=Array(n);e<n;e++)r[e]=t[e];return r}var On=["animationIterationCount","aspectRatio","borderImageSlice","columnCount","flexGrow","flexShrink","fontWeight","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineHeight","opacity","order","orphans","scale","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeMiterlimit","strokeOpacity"],Pn={children:function(t,n){return n?this.find(t,":scope > ".concat(n)):Array.from(t.children)},child:function(t,n){return this.first(this.children(t,n))},find:function(t,n){if(void 0===n&&(n=t,t=document),n instanceof Element&&(n=[n]),et(n))return x(Array.from(n),function(n,e){return e instanceof Element&&(t===e||t.contains(e))?e:null});try{return Array.from(t.querySelectorAll(n))}catch(t){return[]}},findOne:function(t,n){var e;return null!==(e=this.find(t,n)[0])&&void 0!==e?e:null},findByData:function(t,n,e){if(void 0===e)return this.find(t,"[data-".concat(n,"]"));var r=CSS.escape(e+"");return this.find(t,"[data-".concat(n,'="').concat(r,'"]'))},findOneByData:function(t,n,e){var r;return null!==(r=this.findByData(t,n,e)[0])&&void 0!==r?r:null},addClass:function(t,n){if(!n)return t;var e=n.split(" ").map(function(t){return t.trim()}).filter(Boolean);return(t instanceof Element?[t]:Array.from(t)).forEach(function(t){var n;t instanceof Element&&(n=t.classList).add.apply(n,jn(e))}),t},removeClass:function(t,n){if(!n)return t;var e=n.split(" ").map(function(t){return t.trim()}).filter(Boolean);return(t instanceof Element?[t]:Array.from(t)).forEach(function(t){var n;t instanceof Element&&(n=t.classList).remove.apply(n,jn(e))}),t},toggleClass:function(t,n,e){return j(n.split(" ").map(function(t){return t.trim()}).filter(Boolean),function(n){return t.classList.toggle(n,e)}),t},hasClass:function(t,n){if(!n)return!1;var e=!0;return j(n.split(" ").map(function(t){return t.trim()}).filter(Boolean),function(n){if(!U(n,Array.from(t.classList)))return e=!1,!1}),e},append:function(t){for(var n=this,e=arguments.length,r=new Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];return j(r,function(e){G(e)&&(e=n.create(e)),e&&t.append(e)}),t},prepend:function(t){for(var n=this,e=arguments.length,r=new Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];return j([].concat(r).reverse(),function(e){G(e)&&(e=n.create(e)),e&&t.prepend(e)}),t},remove:function(){for(var t=this,n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];e.forEach(function(n){n instanceof Element?n.remove():n instanceof NodeList||rt(n)?Array.from(n).forEach(function(t){return t.remove()}):t.find(n).forEach(function(t){return t.remove()})})},closest:function(t,n){if(n instanceof Element){if(t===n)return t;for(var e=t.parentElement;e;){if(e===n)return e;e=e.parentElement}return null}return void 0===n?t:t.closest(n)},next:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,e=t.nextElementSibling;return n?e&&e.matches(n)?e:null:e},prev:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,e=t.previousElementSibling;return n?e&&e.matches(n)?e:null:e},nextAll:function(t,n){for(var e=[],r=t.nextElementSibling;r;)(void 0===n||r.matches(n))&&e.push(r),r=r.nextElementSibling;return e},prevAll:function(t,n){for(var e=[],r=t.previousElementSibling;r;)(void 0===n||r.matches(n))&&e.push(r),r=r.previousElementSibling;return e},index:function(t,n){return this.prevAll(t,n).length},nextUntil:function(t,n){var e=!1,r=[];n instanceof Element&&(e=!0);for(var o=t.nextElementSibling;o&&!(e?o===n:o.matches(n));)r.push(o),o=o.nextElementSibling;return r},prevUntil:function(t,n){var e=!1,r=[];n instanceof Element&&(e=!0);for(var o=t.previousElementSibling;o&&!(e?o===n:o.matches(n));)r.push(o),o=o.previousElementSibling;return r},wrap:function(t,n){return n.isConnected||t.parentNode.insertBefore(n,t),this.append(n,t),t},attr:function(t,n,e){return void 0===e?t.getAttribute(n):(null===e?t.removeAttribute(n):t.setAttribute(n,e),t)},prop:function(t,n,e){return void 0===e?t[n]:(t[n]=e,t)},html:function(t,n){return void 0===n?t.innerHTML:(t.innerHTML=n,t)},text:function(t,n){return void 0===n?t.innerText:(t.innerText=n,t)},hide:function(t){if(void 0===this.data(t,"__display__")){var n;n=J(window.getComputedStyle)?window.getComputedStyle(t).display:t.style.display,this.data(t,"__display__",n)}return t.style.display="none",t},show:function(t){var n=this.data(t,"__display__");return void 0===n?t.style.removeProperty("display"):(t.style.display=n,this.removeData(t,"__display__")),t},toggle:function(t){return"none"===this.css(t,"display")?this.show(t):this.hide(t)},data:function(t,n,e){var r=this;if(void 0===n&&void 0===e)return t.dataset;if(K(n))return C(n,function(n,e){return r.data(t,n,e)}),t;var o=/^data-/.test(n+""),i=Vt(o?(n+"").replace(/^data-/,""):n+"");return void 0===e?t.dataset[i]:null===e?(delete t.dataset[i],t):(t.dataset[i]=e,t)},removeData:function(t,n){return this.data(t,n,null)},css:function(t,n,e){var r=this;if(G(n)){var o=n.startsWith("--")?n:Vt(n);if(void 0===e){if(window.getComputedStyle){var i=window.getComputedStyle(t,null);return i.getPropertyValue(n)||i[Vt(n)]||""}return t.style[Vt(n)]||""}o.startsWith("--")?t.style.setProperty(o,String(e)):("number"!=typeof e||U(o,On)||(e+="px"),t.style[o]=e)}else C(n,function(n,e){r.css(t,n,e)});return t},closestFind:function(t,n,e){var r=this.closest(t,n);return r?this.find(r,e):[]},closestFindOne:function(t,n,e){var r=this.closest(t,n);return r?this.findOne(r,e):null},first:function(t){var n;return t instanceof Element?t:null!==(n=Array.from(t)[0])&&void 0!==n?n:null},last:function(t){var n;if(t instanceof Element)return t;var e=Array.from(t);return null!==(n=e[e.length-1])&&void 0!==n?n:null},create:function(t){if(!G(t))return null;if(/^[A-Za-z][A-Za-z0-9-]*$/.test(t))return document.createElement(t);var n=document.createElement("template");n.innerHTML=t.trim();var e=n.content;return 1===e.childElementCount&&1===e.children.length?e.firstElementChild:e.cloneNode(!0)},eq:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t=Array.from(t),Math.abs(n)>=t.length?null:(n<0&&(n=t.length+n),t[n])},after:function(t,n){return t.parentElement?(G(n)&&(n=this.create(n)),t.parentElement.insertBefore(n,t.nextElementSibling)):null},before:function(t,n){return t.parentElement?(G(n)&&(n=this.create(n)),t.parentElement.insertBefore(n,t)):null},empty:function(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t},not:function(t,n){var e=t instanceof Element?[t]:Array.from(t),r=G(n);return e.filter(function(t){return r?!t.matches(n):t!==n})},collide:function(t,n){var e=t.getBoundingClientRect(),r=n.getBoundingClientRect();return e.x<r.x+r.width&&e.x+e.width>r.x&&e.y<r.y+r.height&&e.y+e.height>r.y},matches:function(t,n){return!!t&&(n instanceof Element?n===t:t.matches(n))},replaceChild:function(t,n,e){return t.replaceChild(n,e)},replaceChildren:function(t){for(var n=this,e=[],r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return j(o,function(t){G(t)&&(t=n.create(t)),e.push(t)}),t.replaceChildren.apply(t,e),t},offset:function(t){if(pt(t))return{top:t.scrollY,left:t.scrollX};if(dt(t))return{top:t.documentElement.scrollTop,left:t.documentElement.scrollLeft};var n=t.getBoundingClientRect(),e=this.offset(window);return{top:n.top+e.top,left:n.left+e.left}},isEditable:function(t){var n;return 3===(null===(n=t)||void 0===n?void 0:n.nodeType)&&(t=t.parentElement),t instanceof HTMLElement&&(U(t.tagName,["INPUT","TEXTAREA","SELECT"])||t.isContentEditable||!!this.closest(t,'[contenteditable="true"]'))},isInDOM:function(t){return t instanceof Node&&t.getRootNode({composed:!0})===document},on:function(t,n,e,r,o){return J(e)&&(o=r,r=e,e=null),j(n.split(" "),function(n){var i=gn(n.split("."),2),a=i[0],u=i[1],l=function(n){if(!n.cancelBubble){var e,r=function(t,n){for(var e=[],r=3===t.nodeType?t.parentNode:t;r&&(e.push(r),r!==n);)r=r.parentNode;return e}(n.target,t),o=mn(Sn.get(t)),i=hn(r);try{for(i.s();!(e=i.n()).done;){var a,u=e.value,l=!1,c=hn(o);try{for(c.s();!(a=c.n()).done;){var f=a.value;if(f.event===n.type){if(f.selector){if(!u.matches(f.selector))continue}else if(u!==t)continue;var s=Cn(n,u);if(f.handler.call(u,s),s._immediateStopped)return;s._propagationStopped&&(l=!0)}}}catch(t){c.e(t)}finally{c.f()}if(l)return}}catch(t){i.e(t)}finally{i.f()}}},c=Sn.get(t);c||(c=[],Sn.set(t,c)),U(a,En)&&function(t){var n,e,r,o,i,a,u;null!=An&&An.has(t)||("longtap"===t&&(r=null,o=0,i=0,a=null,u=function(){clearTimeout(r),r=null},document.addEventListener("touchstart",function(t){a=t.target;var n=yn.getViewportPosition(t);o=n.x,i=n.y,r=setTimeout(function(){a.dispatchEvent(new CustomEvent("longtap",{bubbles:!0,cancelable:!0,detail:{originalEvent:t}})),r=null},800)},{passive:!0}),document.addEventListener("touchmove",function(t){var n=yn.getViewportPosition(t);Math.hypot(n.x-o,n.y-i)>40&&(clearTimeout(r),r=null)},{passive:!0}),document.addEventListener("touchend",u),document.addEventListener("touchcancel",u)),"dbltap"===t&&(n=0,e=null,document.addEventListener("touchstart",function(t){var r=t.target;if(Date.now()-n>300)n=Date.now(),e=yn.getViewportPosition(t);else{var o=yn.getViewportPosition(t);Math.hypot(o.x-e.x,o.y-e.y)<=40&&(t.preventDefault(),r.dispatchEvent(new CustomEvent("dbltap",{bubbles:!0,cancelable:!0,detail:{originalEvent:t}}))),n=Date.now(),e=o}},{passive:!1})),An.add(t))}(a);var f=x(c,function(t,n){return n.event});U(a,f)||t.addEventListener(a,l,o),c.push({event:a,handler:r,selector:e,listener:l,namespace:u,options:o})}),t},off:function(t,n,e,r,o){J(e)&&(o=r,r=e,e=null);var i=Sn.get(t);if(!i)return t;var a=n?n.split(" "):[void 0];return j(a,function(n){var a=gn(void 0===n?[void 0,void 0]:n.split("."),2),u=a[0],l=a[1],c=void 0!==(u=u||void 0),f=void 0!==l;j(mn(i).reverse(),function(n){if((!c&&!f||c&&!f&&n.event===u||!c&&f&&n.namespace===l||c&&f&&n.event===u&&n.namespace===l)&&(void 0===u||n.event===u)&&(void 0===r||n.handler===r)&&(void 0===e||n.selector===e)&&(void 0===l||n.namespace===l)&&(void 0===o||n.options===o)){var a=i.indexOf(n);-1!==a&&i.splice(a,1),x(i,function(t,n){return n.event===u?n:null})[0]||t.removeEventListener(n.event,n.listener,n.options)}})}),t}};function Tn(t){return Tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tn(t)}function Ln(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Mn(r.key),r)}}function Mn(t){var n=function(t){if("object"!=Tn(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var e=n.call(t,"string");if("object"!=Tn(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Tn(n)?n:n+""}function _n(t,n){return t.get(In(t,n))}function In(t,n,e){if("function"==typeof t?t===n:t.has(n))return arguments.length<3?n:e;throw new TypeError("Private element is not present on this object")}"undefined"!=typeof window&&(window.webf=window.webf||{},window.webf.dom=Pn);var kn=new WeakMap,Dn=function(){return t=function t(){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),function(t,n,e){(function(t,n){if(n.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,n),n.set(t,e)}(this,kn,{})},n=[{key:"addListener",value:function(t,n,e){var r=this;if(!J(n))throw new Error("Callback must be a function.");if(!G(t))throw new Error("Events name must be a string separated by comma.");for(var o=arguments.length,i=new Array(o>3?o-3:0),a=3;a<o;a++)i[a-3]=arguments[a];var u={callback:n,context:e,args:i};return C(t.split(","),function(t,n){if(!n)return!0;n=n.trim(),r.hasListener(n)?_n(kn,r)[n].push(u):_n(kn,r)[n]=[u]}),this}},{key:"addListenerOnce",value:function(t,n,e){for(var r=this,o=arguments.length,i=new Array(o>3?o-3:0),a=3;a<o;a++)i[a-3]=arguments[a];return C(t.split(","),function(t,o){if(!(o=o.trim()))return!0;var a=function(){for(var t=arguments.length,u=new Array(t),l=0;l<t;l++)u[l]=arguments[l];n.apply(e,[o].concat(i).concat(u.slice(1))),r.removeListener(o,a)};r.addListener(o,a,e)}),this}},{key:"dispatch",value:function(t){for(var n=this,e=arguments.length,r=new Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];if(!G(t))throw new Error("Events name must be a string seperated by comma.");return C(t.split(","),function(t,e){return!(e=e.trim())||(n.hasListener(e)?void C(_n(kn,n)[e],function(t,n){n.callback.apply(n.context,[e].concat(n.args).concat(r))}):(console.warn("No listeners found for event: ".concat(e)),!0))}),this}},{key:"hasListener",value:function(t,n,e){return nt(n)?!nt(_n(kn,this)[t]):!!x(_n(kn,this)[t],function(t,r){return r.callback===n&&r.context===e||null}).length}},{key:"removeListener",value:function(t,n,e){var r=this;return this.hasListener(t,n,e)&&(nt(n)?_n(kn,this)[t].splice(0):C(_n(kn,this)[t],function(n){return _n(kn,r)[t].splice(n,1),delete _n(kn,r)[t],!1})),this}},{key:"getListeners",value:function(t){return t?_n(kn,this)[t]||[]:_n(kn,this)}},{key:"reset",value:function(){var t,n;n={},(t=kn).set(In(t,this),n)}}],n&&Ln(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n}(),Nn=new Dn;function Rn(t){return Rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rn(t)}function Bn(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Un(r.key),r)}}function Un(t){var n=function(t){if("object"!=Rn(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var e=n.call(t,"string");if("object"!=Rn(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Rn(n)?n:n+""}function Xn(t,n,e){Yn(t,n),n.set(t,e)}function Yn(t,n){if(n.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Fn(t,n){return t.get(Wn(t,n))}function qn(t,n,e){return t.set(Wn(t,n),e),e}function Wn(t,n,e){if("function"==typeof t?t===n:t.has(n))return arguments.length<3?n:e;throw new TypeError("Private element is not present on this object")}"undefined"!=typeof window&&(window.webf=window.webf||{},window.webf.eventDispatcher=Nn);var zn=new WeakMap,$n=new WeakMap,Vn=new WeakSet,Hn=function(){return t=function t(n,e){var r;!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),Yn(this,r=Vn),r.add(this),Xn(this,zn,void 0),Xn(this,$n,void 0),Wn(Vn,this,Gn).call(this,n),this.setLang(e)},n=[{key:"translate",value:function(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"core";if(n=void 0===n?this.getLang():n,void 0!==Fn($n,this)[e]&&void 0!==Fn($n,this)[e][n]&&void 0!==Fn($n,this)[e][n][t]){var r=Fn($n,this)[e][n][t];return Wn(Vn,this,Jn).call(this,r)}return"en"!==n?this.translate(t,"en",e):t}},{key:"translateFrom",value:function(t,n,e){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"core";if(!t)return t;var i=null===(r=Fn($n,this))||void 0===r?void 0:r[o];if(!i)return t;var a=null==i?void 0:i[n],u=null==i?void 0:i[e];if(!a||!u)return t;var l=Wn(Vn,this,Zn).call(this,a,t);if(!l)return t;var c=u[l],f=Wn(Vn,this,Jn).call(this,c);return null!=f?f:t}},{key:"_",value:function(){return this.translate.apply(this,arguments)}},{key:"getLang",value:function(){return Fn(zn,this)}},{key:"setLang",value:function(t){t||("undefined"!=typeof navigator&&navigator.language?t=navigator.language:"undefined"!=typeof process&&process.env&&(t=process.env.LANG||process.env.LC_ALL||process.env.LC_MESSAGES)),qn(zn,this,(t||"en").trim().toLowerCase().slice(0,2))}}],n&&Bn(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n}();function Gn(t){var n={},e={};C(t,function(t,r){C(r,function(r,o){K(o)?(void 0===n[t]&&(n[t]={}),n[t][r]=o):(void 0===e[t]&&(e[t]={}),e[t][r]=o)})}),qn($n,this,P(!0,n,{core:P({},n.core||{},e)}))}function Zn(t,n){for(var e in t)if(Wn(Vn,this,Jn).call(this,t[e])===n)return e;return null}function Jn(t){return J(t)?t():t}function Kn(t){return Kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kn(t)}function Qn(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),e.push.apply(e,r)}return e}function te(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?Qn(Object(e),!0).forEach(function(n){ne(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Qn(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}return t}function ne(t,n,e){return(n=function(t){var n=function(t){if("object"!=Kn(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var e=n.call(t,"string");if("object"!=Kn(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Kn(n)?n:n+""}(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function ee(t){return ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ee(t)}function re(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,oe(r.key),r)}}function oe(t){var n=function(t){if("object"!=ee(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var e=n.call(t,"string");if("object"!=ee(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ee(n)?n:n+""}function ie(t,n,e){if("function"==typeof t?t===n:t.has(n))return arguments.length<3?n:e;throw new TypeError("Private element is not present on this object")}"undefined"!=typeof window&&(window.webf=window.webf||{},window.webf.Translator=Hn),te(te(te(te(te(te(te({},l),a),o),u),c),i),r);var ae=function(){function t(){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t)}return n=t,e=[{key:"getPosition",value:function(n,e){n=ie(t,this,ue).call(this,n);var r={left:0,top:0};if(e instanceof Element){var o=e.getBoundingClientRect();r={left:window.scrollX+o.left,top:window.scrollY+o.top}}return{x:n.pageX-r.left,y:n.pageY-r.top}}},{key:"getViewportPosition",value:function(n){return{x:(n=ie(t,this,ue).call(this,n)).clientX,y:n.clientY}}},{key:"getElement",value:function(n){return n=ie(t,this,ue).call(this,n),window.document.elementFromPoint(n.clientX,n.clientY)}}],null&&re(n.prototype,null),e&&re(n,e),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,e}();function ue(t){var n,e,r,o,i,a,u,l=null!==(n=null!==(e=null==t||null===(r=t.detail)||void 0===r?void 0:r.originalEvent)&&void 0!==e?e:null==t?void 0:t.originalEvent)&&void 0!==n?n:t;if(!l)return null;var c=null!==(o=null!==(i=null===(a=l.changedTouches)||void 0===a?void 0:a[0])&&void 0!==i?i:null===(u=l.touches)||void 0===u?void 0:u[0])&&void 0!==o?o:l,f="number"==typeof c.clientX?c.clientX:0,s="number"==typeof c.clientY?c.clientY:0;return{clientX:f,clientY:s,pageX:"number"==typeof c.pageX?c.pageX:f+("undefined"!=typeof window?window.scrollX:0),pageY:"number"==typeof c.pageY?c.pageY:s+("undefined"!=typeof window?window.scrollY:0)}}const le=ae;"undefined"!=typeof window&&(window.webf=window.webf||{},window.webf.mouse=ae)},626(t,n,e){e.d(n,{inArray:()=>a});var r=e(385),o=e(531),i=(e(245),e(82)),a=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],u=!1;return(0,r.each)(n,function(n,r){if(n>=e)if(a){if(r===t)return u=!0,!1}else{if((0,o.isObject)(t)&&(0,o.isObject)(r))return u=(0,i.equals)(r,t),!1;if((0,o.isArray)(t)&&(0,o.isObject)(r))return u=(0,i.equals)(r,t),!1;if(r==t)return u=!0,!1}}),u}},531(t,n,e){function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}e.d(n,{isArray:()=>c,isArrayLike:()=>l,isDocument:()=>p,isFunction:()=>a,isObject:()=>i,isPlainObject:()=>u,isString:()=>o,isWindow:()=>s}),e(626);var o=function(t){return"string"==typeof t||"[object String]"===Object.prototype.toString.call(t)},i=function(t){return!!t&&!c(t)&&"object"===r(t)},a=function(t){return!!t&&"function"==typeof t},u=function(t){return!1!==i(t)&&(void 0===t.constructor||!1!==i(t.constructor.prototype)&&!1!==t.constructor.prototype.hasOwnProperty("isPrototypeOf"))},l=function(t){return!!t&&!o(t)&&!a(t)&&f(t.length)&&Number.isFinite(t.length)},c=function(t){return Array.isArray(t)},f=function(t){return/^[-+]?\d+$/.test(t+"")},s=function(t){return!!t&&t===t.window},p=function(t){return!!t&&9===t.nodeType}},245(t,n,e){e(385),e(531),e(54)},54(t,n,e){e.d(n,{camelCase:()=>u}),e(531),e(245),e(626);var r=e(385),o=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"\\s";return i(a(t,n),n)},i=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"\\s";return t.replace(new RegExp("^".concat(n,"+"),"g"),"")},a=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"\\s";return t.replace(new RegExp("".concat(n,"+$"),"g"),"")},u=function(t){if(!t)return"";var n="",e=!1,i=!1,a=!1;t=o(t),t=o(t,"_"),t=o(t,"-");var u=function(t){return t===t.toUpperCase()&&t!==t.toLowerCase()},l=function(t){return"-"===t||"_"===t||" "===t};return(0,r.map)(t,function(t,r){return i=l(n),a=u(n),n=r,l(r)?null:(i?(r=r.toUpperCase(),e=!0):u(r)?((0===t||a&&!e)&&(r=r.toLowerCase()),e=!1):e=!1,r)}).join("")}},385(t,n,e){e.d(n,{each:()=>l,foreach:()=>c,map:()=>f});var r=e(531);function o(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var r,o,i,a,u=[],l=!0,c=!1;try{if(i=(e=e.call(t)).next,0===n){if(Object(e)!==e)return;l=!1}else for(;!(l=(r=i.call(e)).done)&&(u.push(r.value),u.length!==n);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=e.return&&(a=e.return(),Object(a)!==a))return}finally{if(c)throw o}}return u}}(t,n)||a(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,n){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=a(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,l=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return u=t.done,t},e:function(t){l=!0,i=t},f:function(){try{u||null==e.return||e.return()}finally{if(l)throw i}}}}function a(t,n){if(t){if("string"==typeof t)return u(t,n);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?u(t,n):void 0}}function u(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=Array(n);e<n;e++)r[e]=t[e];return r}e(82);var l=function(t,n,e){if((0,r.isPlainObject)(t)){var a=-1;for(var u in t)if(t.hasOwnProperty(u)&&!1===n.call(null!=e?e:t[u],u,t[u],t,++a))return}else{if((0,r.isString)(t)){for(var l=t.split(""),c=0;c<l.length;c++)if(!1===n.call(null!=e?e:l[c],c,l[c],t,c))return t;return t}if(t instanceof Map){var f,s=0,p=i(t.entries());try{for(p.s();!(f=p.n()).done;){var d=o(f.value,2),v=d[0],y=d[1];if(!1===n.call(null!=e?e:y,v,y,t,s++))return t}}catch(t){p.e(t)}finally{p.f()}}else if(t instanceof Set){var h,m=0,g=i(t.values());try{for(g.s();!(h=g.n()).done;){var b=h.value;if(!1===n.call(null!=e?e:b,m,b,t,m))return t;m++}}catch(t){g.e(t)}finally{g.f()}}else if((0,r.isArrayLike)(t))for(var w=Array.from(t),S=0;S<w.length;S++)if(!1===n.call(e||w[S],S,w[S],w,S))return t}return t},c=function(t,n,e){return l(t,function(t,r,o,i){return n.apply(e||r,[r,t,o,i])},e)},f=function(t,n,e){var r=[];return l(t,function(t,o,i,a){var u=n.call(e,t,o,i,a);null!==u&&r.push(u)}),r}},82(t,n,e){e.d(n,{equals:()=>i}),e(385);var r=e(531);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}e(626);var i=function(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];if(n.length<2)return!1;var i=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new WeakMap;if(t===n)return!0;if(Number.isNaN(t)&&Number.isNaN(n))return!0;if(o(t)!==o(n)||null===t||null===n)return!1;if((0,r.isArray)(t)||(0,r.isObject)(t)){if(e.has(t))return e.get(t)===n;e.set(t,n)}if((0,r.isArray)(t)||(0,r.isArray)(n))return!(!(0,r.isArray)(t)||!(0,r.isArray)(n))&&t.length===n.length&&t.every(function(t,r){return i(t,n[r],e)});if((0,r.isObject)(t)){if(Object.getPrototypeOf(t)!==Object.getPrototypeOf(n))return!1;if(t instanceof Date)return t.getTime()===n.getTime();if(t instanceof RegExp)return t.toString()===n.toString();var a=Object.keys(t),u=Object.keys(n);return a.length===u.length&&a.every(function(r){return i(t[r],n[r],e)})}return!1},a=n[0];return n.slice(1).every(function(t){return i(a,t)})}}},n={};function e(r){var o=n[r];if(void 0!==o)return o.exports;var i=n[r]={exports:{}};return t[r](i,i.exports,e),i.exports}e.d=(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},e.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),e.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};e.r(r),e.d(r,{default:()=>E});var o=e(531),i=e(54),a=e(385),u=e(626),l=e(153);function c(t,n){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=p(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==e.return||e.return()}finally{if(u)throw i}}}}function f(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||p(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var r,o,i,a,u=[],l=!0,c=!1;try{if(i=(e=e.call(t)).next,0===n){if(Object(e)!==e)return;l=!1}else for(;!(l=(r=i.call(e)).done)&&(u.push(r.value),u.length!==n);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=e.return&&(a=e.return(),Object(a)!==a))return}finally{if(c)throw o}}return u}}(t,n)||p(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(t,n){if(t){if("string"==typeof t)return d(t,n);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?d(t,n):void 0}}function d(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=Array(n);e<n;e++)r[e]=t[e];return r}var v=new Map,y=["longtap","dbltap"],h=new Set;function m(t,n){var e={_immediateStopped:!1,_propagationStopped:!1,originalEvent:t,currentTarget:n,stopPropagation:function(){e._propagationStopped=!0,t.stopPropagation.apply(t,arguments)},stopImmediatePropagation:function(){e._immediateStopped=!0,e._propagationStopped=!0,t.stopImmediatePropagation.apply(t,arguments)}};return new Proxy(e,{get:function(n,e,r){if(e in n)return Reflect.get(n,e,r);var i=t[e];return(0,o.isFunction)(i)?i.bind(t):i}})}function g(t){return function(t){if(Array.isArray(t))return b(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,n){if(t){if("string"==typeof t)return b(t,n);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?b(t,n):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=Array(n);e<n;e++)r[e]=t[e];return r}var w=["animationIterationCount","aspectRatio","borderImageSlice","columnCount","flexGrow","flexShrink","fontWeight","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineHeight","opacity","order","orphans","scale","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeMiterlimit","strokeOpacity"],S={children:function(t,n){return n?this.find(t,":scope > ".concat(n)):Array.from(t.children)},child:function(t,n){return this.first(this.children(t,n))},find:function(t,n){if(void 0===n&&(n=t,t=document),n instanceof Element&&(n=[n]),(0,o.isArrayLike)(n))return(0,a.map)(Array.from(n),function(n,e){return e instanceof Element&&(t===e||t.contains(e))?e:null});try{return Array.from(t.querySelectorAll(n))}catch(t){return[]}},findOne:function(t,n){var e;return null!==(e=this.find(t,n)[0])&&void 0!==e?e:null},findByData:function(t,n,e){if(void 0===e)return this.find(t,"[data-".concat(n,"]"));var r=CSS.escape(e+"");return this.find(t,"[data-".concat(n,'="').concat(r,'"]'))},findOneByData:function(t,n,e){var r;return null!==(r=this.findByData(t,n,e)[0])&&void 0!==r?r:null},addClass:function(t,n){if(!n)return t;var e=n.split(" ").map(function(t){return t.trim()}).filter(Boolean);return(t instanceof Element?[t]:Array.from(t)).forEach(function(t){var n;t instanceof Element&&(n=t.classList).add.apply(n,g(e))}),t},removeClass:function(t,n){if(!n)return t;var e=n.split(" ").map(function(t){return t.trim()}).filter(Boolean);return(t instanceof Element?[t]:Array.from(t)).forEach(function(t){var n;t instanceof Element&&(n=t.classList).remove.apply(n,g(e))}),t},toggleClass:function(t,n,e){return(0,a.foreach)(n.split(" ").map(function(t){return t.trim()}).filter(Boolean),function(n){return t.classList.toggle(n,e)}),t},hasClass:function(t,n){if(!n)return!1;var e=!0;return(0,a.foreach)(n.split(" ").map(function(t){return t.trim()}).filter(Boolean),function(n){if(!(0,u.inArray)(n,Array.from(t.classList)))return e=!1,!1}),e},append:function(t){for(var n=this,e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return(0,a.foreach)(r,function(e){(0,o.isString)(e)&&(e=n.create(e)),e&&t.append(e)}),t},prepend:function(t){for(var n=this,e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return(0,a.foreach)([].concat(r).reverse(),function(e){(0,o.isString)(e)&&(e=n.create(e)),e&&t.prepend(e)}),t},remove:function(){for(var t=this,n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];e.forEach(function(n){n instanceof Element?n.remove():n instanceof NodeList||(0,o.isArray)(n)?Array.from(n).forEach(function(t){return t.remove()}):t.find(n).forEach(function(t){return t.remove()})})},closest:function(t,n){if(n instanceof Element){if(t===n)return t;for(var e=t.parentElement;e;){if(e===n)return e;e=e.parentElement}return null}return void 0===n?t:t.closest(n)},next:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,e=t.nextElementSibling;return n?e&&e.matches(n)?e:null:e},prev:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,e=t.previousElementSibling;return n?e&&e.matches(n)?e:null:e},nextAll:function(t,n){for(var e=[],r=t.nextElementSibling;r;)(void 0===n||r.matches(n))&&e.push(r),r=r.nextElementSibling;return e},prevAll:function(t,n){for(var e=[],r=t.previousElementSibling;r;)(void 0===n||r.matches(n))&&e.push(r),r=r.previousElementSibling;return e},index:function(t,n){return this.prevAll(t,n).length},nextUntil:function(t,n){var e=!1,r=[];n instanceof Element&&(e=!0);for(var o=t.nextElementSibling;o&&!(e?o===n:o.matches(n));)r.push(o),o=o.nextElementSibling;return r},prevUntil:function(t,n){var e=!1,r=[];n instanceof Element&&(e=!0);for(var o=t.previousElementSibling;o&&!(e?o===n:o.matches(n));)r.push(o),o=o.previousElementSibling;return r},wrap:function(t,n){return n.isConnected||t.parentNode.insertBefore(n,t),this.append(n,t),t},attr:function(t,n,e){return void 0===e?t.getAttribute(n):(null===e?t.removeAttribute(n):t.setAttribute(n,e),t)},prop:function(t,n,e){return void 0===e?t[n]:(t[n]=e,t)},html:function(t,n){return void 0===n?t.innerHTML:(t.innerHTML=n,t)},text:function(t,n){return void 0===n?t.innerText:(t.innerText=n,t)},hide:function(t){if(void 0===this.data(t,"__display__")){var n;n=(0,o.isFunction)(window.getComputedStyle)?window.getComputedStyle(t).display:t.style.display,this.data(t,"__display__",n)}return t.style.display="none",t},show:function(t){var n=this.data(t,"__display__");return void 0===n?t.style.removeProperty("display"):(t.style.display=n,this.removeData(t,"__display__")),t},toggle:function(t){return"none"===this.css(t,"display")?this.show(t):this.hide(t)},data:function(t,n,e){var r=this;if(void 0===n&&void 0===e)return t.dataset;if((0,o.isPlainObject)(n))return(0,a.each)(n,function(n,e){return r.data(t,n,e)}),t;var u=/^data-/.test(n+""),l=(0,i.camelCase)(u?(n+"").replace(/^data-/,""):n+"");return void 0===e?t.dataset[l]:null===e?(delete t.dataset[l],t):(t.dataset[l]=e,t)},removeData:function(t,n){return this.data(t,n,null)},css:function(t,n,e){var r=this;if((0,o.isString)(n)){var l=n.startsWith("--")?n:(0,i.camelCase)(n);if(void 0===e){if(window.getComputedStyle){var c=window.getComputedStyle(t,null);return c.getPropertyValue(n)||c[(0,i.camelCase)(n)]||""}return t.style[(0,i.camelCase)(n)]||""}l.startsWith("--")?t.style.setProperty(l,String(e)):("number"!=typeof e||(0,u.inArray)(l,w)||(e+="px"),t.style[l]=e)}else(0,a.each)(n,function(n,e){r.css(t,n,e)});return t},closestFind:function(t,n,e){var r=this.closest(t,n);return r?this.find(r,e):[]},closestFindOne:function(t,n,e){var r=this.closest(t,n);return r?this.findOne(r,e):null},first:function(t){var n;return t instanceof Element?t:null!==(n=Array.from(t)[0])&&void 0!==n?n:null},last:function(t){var n;if(t instanceof Element)return t;var e=Array.from(t);return null!==(n=e[e.length-1])&&void 0!==n?n:null},create:function(t){if(!(0,o.isString)(t))return null;if(/^[A-Za-z][A-Za-z0-9-]*$/.test(t))return document.createElement(t);var n=document.createElement("template");n.innerHTML=t.trim();var e=n.content;return 1===e.childElementCount&&1===e.children.length?e.firstElementChild:e.cloneNode(!0)},eq:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t=Array.from(t),Math.abs(n)>=t.length?null:(n<0&&(n=t.length+n),t[n])},after:function(t,n){return t.parentElement?((0,o.isString)(n)&&(n=this.create(n)),t.parentElement.insertBefore(n,t.nextElementSibling)):null},before:function(t,n){return t.parentElement?((0,o.isString)(n)&&(n=this.create(n)),t.parentElement.insertBefore(n,t)):null},empty:function(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t},not:function(t,n){var e=t instanceof Element?[t]:Array.from(t),r=(0,o.isString)(n);return e.filter(function(t){return r?!t.matches(n):t!==n})},collide:function(t,n){var e=t.getBoundingClientRect(),r=n.getBoundingClientRect();return e.x<r.x+r.width&&e.x+e.width>r.x&&e.y<r.y+r.height&&e.y+e.height>r.y},matches:function(t,n){return!!t&&(n instanceof Element?n===t:t.matches(n))},replaceChild:function(t,n,e){return t.replaceChild(n,e)},replaceChildren:function(t){for(var n=this,e=[],r=arguments.length,i=new Array(r>1?r-1:0),u=1;u<r;u++)i[u-1]=arguments[u];return(0,a.foreach)(i,function(t){(0,o.isString)(t)&&(t=n.create(t)),e.push(t)}),t.replaceChildren.apply(t,e),t},offset:function(t){if((0,o.isWindow)(t))return{top:t.scrollY,left:t.scrollX};if((0,o.isDocument)(t))return{top:t.documentElement.scrollTop,left:t.documentElement.scrollLeft};var n=t.getBoundingClientRect(),e=this.offset(window);return{top:n.top+e.top,left:n.left+e.left}},isEditable:function(t){var n;return 3===(null===(n=t)||void 0===n?void 0:n.nodeType)&&(t=t.parentElement),t instanceof HTMLElement&&((0,u.inArray)(t.tagName,["INPUT","TEXTAREA","SELECT"])||t.isContentEditable||!!this.closest(t,'[contenteditable="true"]'))},isInDOM:function(t){return t instanceof Node&&t.getRootNode({composed:!0})===document},on:function(t,n,e,r,i){return(0,o.isFunction)(e)&&(i=r,r=e,e=null),(0,a.foreach)(n.split(" "),function(n){var o=s(n.split("."),2),p=o[0],d=o[1],g=function(n){if(!n.cancelBubble){var e,r=function(t,n){for(var e=[],r=3===t.nodeType?t.parentNode:t;r&&(e.push(r),r!==n);)r=r.parentNode;return e}(n.target,t),o=f(v.get(t)),i=c(r);try{for(i.s();!(e=i.n()).done;){var a,u=e.value,l=!1,s=c(o);try{for(s.s();!(a=s.n()).done;){var p=a.value;if(p.event===n.type){if(p.selector){if(!u.matches(p.selector))continue}else if(u!==t)continue;var d=m(n,u);if(p.handler.call(u,d),d._immediateStopped)return;d._propagationStopped&&(l=!0)}}}catch(t){s.e(t)}finally{s.f()}if(l)return}}catch(t){i.e(t)}finally{i.f()}}},b=v.get(t);b||(b=[],v.set(t,b)),(0,u.inArray)(p,y)&&function(t){var n,e,r,o,i,a,u;null!=h&&h.has(t)||("longtap"===t&&(r=null,o=0,i=0,a=null,u=function(){clearTimeout(r),r=null},document.addEventListener("touchstart",function(t){a=t.target;var n=l.default.getViewportPosition(t);o=n.x,i=n.y,r=setTimeout(function(){a.dispatchEvent(new CustomEvent("longtap",{bubbles:!0,cancelable:!0,detail:{originalEvent:t}})),r=null},800)},{passive:!0}),document.addEventListener("touchmove",function(t){var n=l.default.getViewportPosition(t);Math.hypot(n.x-o,n.y-i)>40&&(clearTimeout(r),r=null)},{passive:!0}),document.addEventListener("touchend",u),document.addEventListener("touchcancel",u)),"dbltap"===t&&(n=0,e=null,document.addEventListener("touchstart",function(t){var r=t.target;if(Date.now()-n>300)n=Date.now(),e=l.default.getViewportPosition(t);else{var o=l.default.getViewportPosition(t);Math.hypot(o.x-e.x,o.y-e.y)<=40&&(t.preventDefault(),r.dispatchEvent(new CustomEvent("dbltap",{bubbles:!0,cancelable:!0,detail:{originalEvent:t}}))),n=Date.now(),e=o}},{passive:!1})),h.add(t))}(p);var w=(0,a.map)(b,function(t,n){return n.event});(0,u.inArray)(p,w)||t.addEventListener(p,g,i),b.push({event:p,handler:r,selector:e,listener:g,namespace:d,options:i})}),t},off:function(t,n,e,r,i){(0,o.isFunction)(e)&&(i=r,r=e,e=null);var u=v.get(t);if(!u)return t;var l=n?n.split(" "):[void 0];return(0,a.foreach)(l,function(n){var o=s(void 0===n?[void 0,void 0]:n.split("."),2),l=o[0],c=o[1],p=void 0!==(l=l||void 0),d=void 0!==c;(0,a.foreach)(f(u).reverse(),function(n){if((!p&&!d||p&&!d&&n.event===l||!p&&d&&n.namespace===c||p&&d&&n.event===l&&n.namespace===c)&&(void 0===l||n.event===l)&&(void 0===r||n.handler===r)&&(void 0===e||n.selector===e)&&(void 0===c||n.namespace===c)&&(void 0===i||n.options===i)){var o=u.indexOf(n);-1!==o&&u.splice(o,1),(0,a.map)(u,function(t,n){return n.event===l?n:null})[0]||t.removeEventListener(n.event,n.listener,n.options)}})}),t}};const E=S;return"undefined"!=typeof window&&(window.webf=window.webf||{},window.webf.dom=S),r})());
|