devextreme
Version:
HTML5 JavaScript Component Suite for Responsive Web Development
881 lines (872 loc) • 12.2 MB
JavaScript
/*!
* DevExtreme (dx.all.debug.js)
* Version: 21.2.4
* Build date: Mon Dec 06 2021
*
* Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
"use strict";
! function() {
var e = {
23908:
/*!*****************************************************************!*\
!*** ./artifacts/transpiled-renovation-npm/animation/easing.js ***!
\*****************************************************************/
function(e, t, n) {
t.convertTransitionTimingFuncToEasing = void 0, t.getEasing = function(e) {
return s[e]
}, t.setEasing = function(e) {
s = e
};
var i = n( /*! ../core/utils/type */ 35922),
o = /cubic-bezier\((\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\)/,
a = {
linear: "cubic-bezier(0, 0, 1, 1)",
swing: "cubic-bezier(0.445, 0.05, 0.55, 0.95)",
ease: "cubic-bezier(0.25, 0.1, 0.25, 1)",
"ease-in": "cubic-bezier(0.42, 0, 1, 1)",
"ease-out": "cubic-bezier(0, 0, 0.58, 1)",
"ease-in-out": "cubic-bezier(0.42, 0, 0.58, 1)"
},
s = {};
t.convertTransitionTimingFuncToEasing = function(e) {
var t, n = (e = a[e] || e).match(o);
n || (n = a[t = "linear"].match(o)), n = n.slice(1, 5);
for (var l = 0; l < n.length; l++) {
n[l] = parseFloat(n[l])
}
var u = t || "cubicbezier_" + n.join("_").replace(/\./g, "p");
return (0, i.isFunction)(s[u]) || (s[u] = function(e, t, i, o, a) {
return o * function(e, t, n, i) {
var o = 3 * e,
a = 3 * (n - e) - o,
r = 1 - o - a,
s = 3 * t,
l = 3 * (i - t) - s,
u = 1 - s - l,
d = function(e) {
return e * (o + e * (a + e * r))
},
c = function(e) {
return o + e * (2 * a + 3 * e * r)
};
return function(e) {
return function(e) {
return e * (s + e * (l + e * u))
}(function(e) {
for (var t, n = e, i = 0; i < 14 && (t = d(n) - e, !(Math.abs(t) < .001));) {
n -= t / c(n), i++
}
return n
}(e))
}
}(n[0], n[1], n[2], n[3])(t / a) + i
}), u
}
},
90057:
/*!****************************************************************!*\
!*** ./artifacts/transpiled-renovation-npm/animation/frame.js ***!
\****************************************************************/
function(e, t, n) {
t.cancelAnimationFrame = function() {
u(), l.apply(r, arguments)
}, t.requestAnimationFrame = function() {
return u(), s.apply(r, arguments)
};
var i, o = n( /*! ../core/utils/window */ 58201),
a = (i = n( /*! ../core/utils/call_once */ 39618)) && i.__esModule ? i : {
default: i
};
var r = (0, o.hasWindow)() ? (0, o.getWindow)() : {},
s = function(e) {
return setTimeout(e, 16.666666666666668)
},
l = function(e) {
clearTimeout(e)
},
u = (0, a.default)((function() {
var e = r.requestAnimationFrame || r.webkitRequestAnimationFrame || r.mozRequestAnimationFrame || r.oRequestAnimationFrame || r.msRequestAnimationFrame,
t = r.cancelAnimationFrame || r.webkitCancelAnimationFrame || r.mozCancelAnimationFrame || r.oCancelAnimationFrame || r.msCancelAnimationFrame;
if (e && t && (s = e, l = t), e && !t) {
var n = {};
s = function(t) {
var i = e.call(r, (function() {
try {
if (i in n) {
return
}
t.apply(this, arguments)
} finally {
delete n[i]
}
}));
return i
}, l = function(e) {
n[e] = !0
}
}
}))
},
87209:
/*!*************************************************************!*\
!*** ./artifacts/transpiled-renovation-npm/animation/fx.js ***!
\*************************************************************/
function(e, t, n) {
t.default = void 0;
var i = x(n( /*! ../core/renderer */ 68374)),
o = n( /*! ../core/utils/window */ 58201),
a = x(n( /*! ../events/core/events_engine */ 55994)),
r = x(n( /*! ../core/errors */ 17381)),
s = n( /*! ../core/element */ 6415),
l = n( /*! ../core/utils/extend */ 13306),
u = n( /*! ../core/utils/type */ 35922),
d = n( /*! ../core/utils/iterator */ 95479),
c = n( /*! ./translator */ 31648),
h = n( /*! ./easing */ 23908),
f = n( /*! ./frame */ 90057),
p = n( /*! ../core/utils/support */ 60137),
g = x(n( /*! ./position */ 49387)),
m = n( /*! ../events/remove */ 29007),
_ = n( /*! ../events/utils/index */ 39611),
v = n( /*! ../core/utils/deferred */ 62754),
y = n( /*! ../core/utils/common */ 20576);
function x(e) {
return e && e.__esModule ? e : {
default: e
}
}
function b(e) {
return b = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
return typeof e
} : function(e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
}, b(e)
}
var w = (0, o.getWindow)(),
C = (0, _.addNamespace)(m.removeEvent, "dxFX"),
S = /^([+-])=(.*)/i,
k = "dxAnimData",
D = "dxAnimQueue",
I = {
initAnimation: function(e, t) {
e.css({
transitionProperty: "none"
}), "string" == typeof t.from ? e.addClass(t.from) : U(e, t.from);
var n = this,
i = new v.Deferred,
o = t.cleanupWhen;
t.transitionAnimation = {
deferred: i,
finish: function() {
n._finishTransition(e), o ? (0, v.when)(i, o).always((function() {
n._cleanup(e, t)
})) : n._cleanup(e, t), i.resolveWith(e, [t, e])
}
}, this._completeAnimationCallback(e, t).done((function() {
t.transitionAnimation.finish()
})).fail((function() {
i.rejectWith(e, [t, e])
})), t.duration || t.transitionAnimation.finish(), e.css("transform")
},
animate: function(e, t) {
return this._startAnimation(e, t), t.transitionAnimation.deferred.promise()
},
_completeAnimationCallback: function(e, t) {
var n, i = this,
o = Date.now() + t.delay,
r = new v.Deferred,
s = new v.Deferred,
l = new v.Deferred,
u = (0, p.transitionEndEventName)() + ".dxFX";
t.transitionAnimation.cleanup = function() {
clearTimeout(n), clearTimeout(d), a.default.off(e, u), a.default.off(e, C)
}, a.default.one(e, u, (function() {
Date.now() - o >= t.duration && s.reject()
})), a.default.off(e, C), a.default.on(e, C, (function() {
i.stop(e, t), r.reject()
}));
var d = setTimeout((function() {
n = setTimeout((function() {
l.reject()
}), t.duration + t.delay + Y._simulatedTransitionEndDelay), (0, v.when)(s, l).fail(function() {
r.resolve()
}.bind(this))
}));
return r.promise()
},
_startAnimation: function(e, t) {
e.css({
transitionProperty: "all",
transitionDelay: t.delay + "ms",
transitionDuration: t.duration + "ms",
transitionTimingFunction: t.easing
}), "string" == typeof t.to ? e[0].className += " " + t.to : t.to && U(e, t.to)
},
_finishTransition: function(e) {
e.css("transition", "none")
},
_cleanup: function(e, t) {
t.transitionAnimation.cleanup(), "string" == typeof t.from && (e.removeClass(t.from), e.removeClass(t.to))
},
stop: function(e, t, n) {
t && (n ? t.transitionAnimation.finish() : ((0, u.isPlainObject)(t.to) && (0, d.each)(t.to, (function(t) {
e.css(t, e.css(t))
})), this._finishTransition(e), this._cleanup(e, t)))
}
},
T = {
initAnimation: function(e, t) {
U(e, t.from)
},
animate: function(e, t) {
var n = new v.Deferred,
i = this;
return t ? ((0, d.each)(t.to, (function(n) {
void 0 === t.from[n] && (t.from[n] = i._normalizeValue(e.css(n)))
})), t.to.transform && (t.from.transform = i._parseTransform(t.from.transform), t.to.transform = i._parseTransform(t.to.transform)), t.frameAnimation = {
to: t.to,
from: t.from,
currentValue: t.from,
easing: (0, h.convertTransitionTimingFuncToEasing)(t.easing),
duration: t.duration,
startTime: (new Date).valueOf(),
finish: function() {
this.currentValue = this.to, this.draw(), (0, f.cancelAnimationFrame)(t.frameAnimation.animationFrameId), n.resolve()
},
draw: function() {
if (t.draw) {
t.draw(this.currentValue)
} else {
var n = (0, l.extend)({}, this.currentValue);
n.transform && (n.transform = (0, d.map)(n.transform, (function(e, t) {
return "translate" === t ? (0, c.getTranslateCss)(e) : "scale" === t ? "scale(" + e + ")" : "rotate" === t.substr(0, t.length - 1) ? t + "(" + e + "deg)" : void 0
})).join(" ")), e.css(n)
}
}
}, t.delay ? (t.frameAnimation.startTime += t.delay, t.frameAnimation.delayTimeout = setTimeout((function() {
i._startAnimation(e, t)
}), t.delay)) : i._startAnimation(e, t), n.promise()) : n.reject().promise()
},
_startAnimation: function(e, t) {
a.default.off(e, C), a.default.on(e, C, (function() {
t.frameAnimation && (0, f.cancelAnimationFrame)(t.frameAnimation.animationFrameId)
})), this._animationStep(e, t)
},
_parseTransform: function(e) {
var t = {};
return (0, d.each)(e.match(/\w+\d*\w*\([^)]*\)\s*/g), (function(e, n) {
var i = (0, c.parseTranslate)(n),
o = n.match(/scale\((.+?)\)/),
a = n.match(/(rotate.)\((.+)deg\)/);
i && (t.translate = i), o && o[1] && (t.scale = parseFloat(o[1])), a && a[1] && (t[a[1]] = parseFloat(a[2]))
})), t
},
stop: function(e, t, n) {
var i = t && t.frameAnimation;
i && ((0, f.cancelAnimationFrame)(i.animationFrameId), clearTimeout(i.delayTimeout), n && i.finish(), delete t.frameAnimation)
},
_animationStep: function(e, t) {
var n = t && t.frameAnimation;
if (n) {
var i = (new Date).valueOf();
if (i >= n.startTime + n.duration) {
n.finish()
} else {
n.currentValue = this._calcStepValue(n, i - n.startTime), n.draw();
var o = this;
n.animationFrameId = (0, f.requestAnimationFrame)((function() {
o._animationStep(e, t)
}))
}
}
},
_calcStepValue: function(e, t) {
return function n(i, o) {
var a = Array.isArray(o) ? [] : {};
return (0, d.each)(o, (function(r, s) {
if ("string" == typeof s && !1 === parseFloat(s, 10)) {
return !0
}
a[r] = "object" === b(s) ? n(i[r], s) : function(n) {
var a = t / e.duration,
r = t,
s = 1 * i[n],
l = o[n] - i[n],
u = e.duration;
return (0, h.getEasing)(e.easing)(a, r, s, l, u)
}(r)
})), a
}(e.from, e.to)
},
_normalizeValue: function(e) {
var t = parseFloat(e, 10);
return !1 === t ? e : t
}
},
E = {
initAnimation: function() {},
animate: function() {
return (new v.Deferred).resolve().promise()
},
stop: y.noop,
isSynchronous: !0
},
A = function(e, t, n, i) {
(0, d.each)(["from", "to"], (function() {
if (!n(e[this])) {
throw r.default.Error("E0010", t, this, i)
}
}))
},
O = function(e, t) {
return A(e, t, (function(e) {
return (0, u.isPlainObject)(e)
}), "a plain object")
},
P = {
top: {
my: "bottom center",
at: "top center"
},
bottom: {
my: "top center",
at: "bottom center"
},
right: {
my: "left center",
at: "right center"
},
left: {
my: "right center",
at: "left center"
}
},
M = {
validateConfig: function(e) {
O(e, "slide")
},
setup: function(e, t) {
var n = (0, c.locate)(e);
if ("slide" !== t.type) {
var i = "slideIn" === t.type ? t.from : t.to;
i.position = (0, l.extend)({
of: w
}, P[t.direction]), K(e, i)
}
this._setUpConfig(n, t.from), this._setUpConfig(n, t.to), (0, c.clearCache)(e)
},
_setUpConfig: function(e, t) {
t.left = "left" in t ? t.left : "+=0", t.top = "top" in t ? t.top : "+=0", this._initNewPosition(e, t)
},
_initNewPosition: function(e, t) {
var n = {
left: t.left,
top: t.top
};
delete t.left, delete t.top;
var i = this._getRelativeValue(n.left);
void 0 !== i ? n.left = i + e.left : t.left = 0, void 0 !== (i = this._getRelativeValue(n.top)) ? n.top = i + e.top : t.top = 0, t.transform = (0, c.getTranslateCss)({
x: n.left,
y: n.top
})
},
_getRelativeValue: function(e) {
var t;
if ("string" == typeof e && (t = S.exec(e))) {
return parseInt(t[1] + "1") * t[2]
}
}
},
R = {
setup: function(e, t) {
var n, i, o = t.from,
a = t.to,
r = "fadeOut" === t.type ? 1 : 0,
s = "fadeOut" === t.type ? 0 : 1,
l = (0, u.isPlainObject)(o) ? String(null !== (n = o.opacity) && void 0 !== n ? n : r) : String(o),
d = (0, u.isPlainObject)(a) ? String(null !== (i = a.opacity) && void 0 !== i ? i : s) : String(a);
switch (t.skipElementInitialStyles || (l = e.css("opacity")), t.type) {
case "fadeIn":
d = 1;
break;
case "fadeOut":
d = 0
}
t.from = {
visibility: "visible",
opacity: l
}, t.to = {
opacity: d
}
}
},
B = {
custom: {
setup: function() {}
},
slide: M,
slideIn: M,
slideOut: M,
fade: R,
fadeIn: R,
fadeOut: R,
pop: {
validateConfig: function(e) {
O(e, "pop")
},
setup: function(e, t) {
var n = t.from,
i = t.to,
o = "opacity" in n ? n.opacity : e.css("opacity"),
a = "opacity" in i ? i.opacity : 1,
r = "scale" in n ? n.scale : 0,
s = "scale" in i ? i.scale : 1;
t.from = {
opacity: o
};
var l = (0, c.getTranslate)(e);
t.from.transform = this._getCssTransform(l, r), t.to = {
opacity: a
}, t.to.transform = this._getCssTransform(l, s)
},
_getCssTransform: function(e, t) {
return (0, c.getTranslateCss)(e) + "scale(" + t + ")"
}
},
css: {
validateConfig: function(e) {
! function(e, t) {
A(e, "css", (function(e) {
return "string" == typeof e
}), "a string")
}(e)
},
setup: function() {}
}
},
V = {
type: "custom",
from: {},
to: {},
duration: 400,
start: y.noop,
complete: y.noop,
easing: "ease",
delay: 0
},
F = {
duration: 400,
easing: "ease",
delay: 0
};
function L() {
var e = this,
t = e.element,
n = e.config;
if (K(t, n.from), K(t, n.to), e.configurator.setup(t, n), t.data(k, e), Y.off && (n.duration = 0, n.delay = 0), e.strategy.initAnimation(t, n), n.start) {
var i = (0, s.getPublicElement)(t);
n.start.apply(this, [i, n])
}
}
var H = function() {
var e = this,
t = e.element,
n = e.config;
return e.isStarted = !0, e.strategy.animate(t, n).done((function() {
! function(e) {
var t = e.element,
n = e.config;
if (t.removeData(k), n.complete) {
var i = (0, s.getPublicElement)(t);
n.complete.apply(this, [i, n])
}
e.deferred.resolveWith(this, [t, n])
}(e)
})).fail((function() {
e.deferred.rejectWith(this, [t, n])
}))
},
N = function(e) {
var t = this,
n = t.element,
i = t.config;
clearTimeout(t.startTimeout), t.isStarted || t.start(), t.strategy.stop(n, i, e)
},
z = (0, _.addNamespace)(m.removeEvent, "dxFXStartAnimation"),
W = function(e, t) {
var n = "css" === t.type ? F : V,
o = (0, l.extend)(!0, {}, n, t),
s = function(e) {
var t = B[e.type];
if (!t) {
throw r.default.Error("E0011", e.type)
}
return t
}(o),
d = function(e) {
e = e || {};
var t = {
transition: (0, p.transition)() ? I : T,
frame: T,
noAnimation: E
},
n = e.strategy || "transition";
return "css" !== e.type || (0, p.transition)() || (n = "noAnimation"), t[n]
}(o),
c = {
element: (0, i.default)(e),
config: o,
configurator: s,
strategy: d,
isSynchronous: d.isSynchronous,
setup: L,
start: H,
stop: N,
deferred: new v.Deferred
};
return (0, u.isFunction)(s.validateConfig) && s.validateConfig(o),
function(e) {
a.default.off(e.element, z), a.default.on(e.element, z, (function() {
Y.stop(e.element)
})), e.deferred.always((function() {
a.default.off(e.element, z)
}))
}(c), c
};
function G(e) {
return e.data(D) || []
}
var j = function(e) {
e.removeData(D)
};
function q(e) {
return !!e.data(k)
}
function $(e, t) {
if ((t = G(e)).length) {
var n = t.shift();
0 === t.length && j(e),
function(e) {
e.setup(), Y.off || e.isSynchronous ? e.start() : e.startTimeout = setTimeout((function() {
e.start()
}));
return e.deferred.promise()
}(n).done((function() {
q(e) || $(e)
}))
}
}
function K(e, t) {
if (t && t.position) {
var n = (0, i.default)(w),
o = 0,
a = 0,
r = g.default.calculate(e, t.position),
s = e.offset(),
u = e.position();
u.top > s.top && (a = n.scrollTop()), u.left > s.left && (o = n.scrollLeft()), (0, l.extend)(t, {
left: r.h.location - s.left + u.left - o,
top: r.v.location - s.top + u.top - a
}), delete t.position
}
}
function U(e, t) {
(0, d.each)(t, (function(t, n) {
try {
e.css(t, (0, u.isFunction)(n) ? n() : n)
} catch (e) {}
}))
}
var Y = {
off: !1,
animationTypes: B,
animate: function(e, t) {
var n = (0, i.default)(e);
if (!n.length) {
return (new v.Deferred).resolve().promise()
}
var o = W(n, t);
return function(e, t) {
var n = G(e);
(function(e, t) {
e.data(D, t)
})(e, n), n.push(t), q(e) || $(e, n)
}(n, o), o.deferred.promise()
},
createAnimation: W,
isAnimating: q,
stop: function(e, t) {
var n = (0, i.default)(e),
o = G(n);
(0, d.each)(o, (function(e, t) {
t.config.delay = 0, t.config.duration = 0, t.isSynchronous = !0
})), q(n) || $(n, o);
var a = n.data(k);
a && a.stop(t), n.removeData(k), j(n)
},
_simulatedTransitionEndDelay: 100
},
Z = Y;
t.default = Z, e.exports = t.default, e.exports.default = t.default
},
49387:
/*!*******************************************************************!*\
!*** ./artifacts/transpiled-renovation-npm/animation/position.js ***!
\*******************************************************************/
function(e, t, n) {
t.default = void 0;
var i = n( /*! ../core/utils/size */ 58664),
o = m(n( /*! ../core/renderer */ 68374)),
a = n( /*! ../core/utils/common */ 20576),
r = n( /*! ../core/utils/iterator */ 95479),
s = n( /*! ../core/utils/window */ 58201),
l = m(n( /*! ../core/dom_adapter */ 73349)),
u = n( /*! ../core/utils/type */ 35922),
d = n( /*! ../core/utils/extend */ 13306),
c = n( /*! ../core/utils/position */ 37518),
h = m(n( /*! ../core/utils/browser */ 47810)),
f = n( /*! ./translator */ 31648),
p = n( /*! ../core/utils/support */ 60137),
g = m(n( /*! ../core/devices */ 20530));
function m(e) {
return e && e.__esModule ? e : {
default: e
}
}
var _, v = (0, s.getWindow)(),
y = /left|right/,
x = /top|bottom/,
b = /fit|flip|none/,
w = /scale\(.+?\)/,
C = h.default.safari,
S = function(e) {
var t = {
h: "center",
v: "center"
},
n = (0, a.splitPair)(e);
return n && (0, r.each)(n, (function() {
var e = String(this).toLowerCase();
y.test(e) ? t.h = e : x.test(e) && (t.v = e)
})), t
},
k = function(e) {
return (0, a.pairToObject)(e)
},
D = function(e) {
switch (e) {
case "center":
return .5;
case "right":
case "bottom":
return 1;
default:
return 0
}
},
I = function(e) {
switch (e) {
case "left":
return "right";
case "right":
return "left";
case "top":
return "bottom";
case "bottom":
return "top";
default:
return e
}
},
T = function(e, t) {
var n = 0;
return e.myLocation < t.min && (n += t.min - e.myLocation), e.myLocation > t.max && (n += e.myLocation - t.max), n
},
E = function(e, t, n) {
return t.myLocation < n.min ? "h" === e ? "left" : "top" : t.myLocation > n.max ? "h" === e ? "right" : "bottom" : "none"
},
A = function(e) {
e.myLocation = e.atLocation + D(e.atAlign) * e.atSize - D(e.myAlign) * e.mySize + e.offset
},
O = {
fit: function(e, t) {
var n = !1;
e.myLocation > t.max && (e.myLocation = t.max, n = !0), e.myLocation < t.min && (e.myLocation = t.min, n = !0), e.fit = n
},
flip: function(e, t) {
if (e.flip = !1, ("center" !== e.myAlign || "center" !== e.atAlign) && (e.myLocation < t.min || e.myLocation > t.max)) {
var n = (0, d.extend)({}, e, {
myAlign: I(e.myAlign),
atAlign: I(e.atAlign),
offset: -e.offset
});
A(n), n.oversize = T(n, t), (n.myLocation >= t.min && n.myLocation <= t.max || e.oversize > n.oversize) && (e.myLocation = n.myLocation, e.oversize = n.oversize, e.flip = !0)
}
},
flipfit: function(e, t) {
this.flip(e, t), this.fit(e, t)
},
none: function(e) {
e.oversize = 0
}
},
P = function() {
var e = (0, o.default)("<div>").css({
width: 100,
height: 100,
overflow: "scroll",
position: "absolute",
top: -9999
}).appendTo((0, o.default)("body")),
t = e.get(0).offsetWidth - e.get(0).clientWidth;
e.remove(), _ = t
},
M = {
h: {
location: 0,
flip: !1,
fit: !1,
oversize: 0
},
v: {
location: 0,
flip: !1,
fit: !1,
oversize: 0
}
},
R = function(e, t) {
var n = (0, o.default)(e),
r = n.offset(),
s = (0, d.extend)(!0, {}, M, {
h: {
location: r.left
},
v: {
location: r.top
}
});
if (!t) {
return s
}
var h = S(t.my),
f = S(t.at),
m = (0, o.default)(t.of).length && t.of || v,
y = k(t.offset),
x = function(e) {
var t = (0, a.splitPair)(e),
n = String(t && t[0]).toLowerCase(),
i = String(t && t[1]).toLowerCase();
return b.test(n) || (n = "none"), b.test(i) || (i = n), {
h: n,
v: i
}
}(t.collision),
w = t.boundary,
D = k(t.boundaryOffset),
I = {
mySize: (0, i.getOuterWidth)(n),
myAlign: h.h,
atAlign: f.h,
offset: y.h,
collision: x.h,
boundaryOffset: D.h
},
R = {
mySize: (0, i.getOuterHeight)(n),
myAlign: h.v,
atAlign: f.v,
offset: y.v,
collision: x.v,
boundaryOffset: D.v
};
if (m.preventDefault) {
I.atLocation = m.pageX, R.atLocation = m.pageY, I.atSize = 0, R.atSize = 0
} else if (m = (0, o.default)(m), (0, u.isWindow)(m[0])) {
I.atLocation = m.scrollLeft(), R.atLocation = m.scrollTop(), "phone" === g.default.real().deviceType && m[0].visualViewport ? (I.atLocation = Math.max(I.atLocation, m[0].visualViewport.offsetLeft), R.atLocation = Math.max(R.atLocation, m[0].visualViewport.offsetTop), I.atSize = m[0].visualViewport.width, R.atSize = m[0].visualViewport.height) : (I.atSize = m[0].innerWidth > m[0].outerWidth ? m[0].innerWidth : (0, i.getWidth)(m), R.atSize = m[0].innerHeight > m[0].outerHeight || C ? m[0].innerHeight : (0, i.getHeight)(m))
} else if (9 === m[0].nodeType) {
I.atLocation = 0, R.atLocation = 0, I.atSize = (0, i.getWidth)(m), R.atSize = (0, i.getHeight)(m)
} else {
var B = (0, c.getBoundingRect)(m.get(0)),
F = V(m);
I.atLocation = F.left, R.atLocation = F.top, I.atSize = Math.max(B.width, (0, i.getOuterWidth)(m)), R.atSize = Math.max(B.height, (0, i.getOuterHeight)(m))
}
A(I), A(R);
var L = function() {
var e = (0, o.default)(v),
t = (0, i.getWidth)(e),
n = (0, i.getHeight)(e),
a = e.scrollLeft(),
r = e.scrollTop(),
s = l.default.getDocumentElement(),
u = p.touch ? s.clientWidth / t : 1,
d = p.touch ? s.clientHeight / n : 1;
void 0 === _ && P();
var c = t,
h = n;
if (w) {
var f = (0, o.default)(w),
g = f.offset();
a = g.left, r = g.top, c = (0, i.getWidth)(f), h = (0, i.getHeight)(f)
}
return {
h: {
min: a + I.boundaryOffset,
max: a + c / u - I.mySize - I.boundaryOffset
},
v: {
min: r + R.boundaryOffset,
max: r + h / d - R.mySize - R.boundaryOffset
}
}
}();
I.oversize = T(I, L.h), R.oversize = T(R, L.v), I.collisionSide = E("h", I, L.h), R.collisionSide = E("v", R, L.v), O[I.collision] && O[I.collision](I, L.h), O[R.collision] && O[R.collision](R, L.v);
var H = function(e) {
return t.precise ? e : Math.round(e)
};
return (0, d.extend)(!0, s, {
h: {
location: H(I.myLocation),
oversize: H(I.oversize),
fit: I.fit,
flip: I.flip,
collisionSide: I.collisionSide
},
v: {
location: H(R.myLocation),
oversize: H(R.oversize),
fit: R.fit,
flip: R.flip,
collisionSide: R.collisionSide
},
precise: t.precise
}), s
},
B = function(e, t, n, i, o) {
(0, u.isDefined)(e.style) && !l.default.isNode(e.style) ? e.style.transform = o ? n.replace(t, "") : n : e.setAttribute("style", o ? i.replace(t, "") : i)
},
V = function e(t) {
var n, i, o, a = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : t,
r = a.get(0);
if (!r) {
return t.offset()
}
var s, l = (null === (n = r.getAttribute) || void 0 === n ? void 0 : n.call(r, "style")) || "",
u = null === (i = r.style) || void 0 === i ? void 0 : i.transform,
d = null === (o = l.match(w)) || void 0 === o ? void 0 : o[0];
return d ? (B(r, d, u, l, !0), s = e(t, a.parent()), B(r, d, u, l, !1)) : s = e(t, a.parent()), s
},
F = function(e, t) {
var n = (0, o.default)(e);
if (!t) {
return n.offset()
}(0, f.resetPosition)(n, !0);
var i = V(n),
a = t.h && t.v ? t : R(n, t),
r = function(e) {
return t.precise ? e : Math.round(e)
};
return (0, f.move)(n, {
left: a.h.loca