Edit File by line
/home/barbar84/www/wp-conte.../plugins/updraftp.../includes/tether
File: tether.js
/*! tether 1.4.7 */
[0] Fix | Delete
[1] Fix | Delete
(function(root, factory) {
[2] Fix | Delete
if (typeof define === 'function' && define.amd) {
[3] Fix | Delete
define([], factory);
[4] Fix | Delete
} else if (typeof exports === 'object') {
[5] Fix | Delete
module.exports = factory();
[6] Fix | Delete
} else {
[7] Fix | Delete
root.Tether = factory();
[8] Fix | Delete
}
[9] Fix | Delete
}(this, function() {
[10] Fix | Delete
[11] Fix | Delete
'use strict';
[12] Fix | Delete
[13] Fix | Delete
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
[14] Fix | Delete
[15] Fix | Delete
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
[16] Fix | Delete
[17] Fix | Delete
var TetherBase = undefined;
[18] Fix | Delete
if (typeof TetherBase === 'undefined') {
[19] Fix | Delete
TetherBase = { modules: [] };
[20] Fix | Delete
}
[21] Fix | Delete
[22] Fix | Delete
var zeroElement = null;
[23] Fix | Delete
[24] Fix | Delete
// Same as native getBoundingClientRect, except it takes into account parent <frame> offsets
[25] Fix | Delete
// if the element lies within a nested document (<frame> or <iframe>-like).
[26] Fix | Delete
function getActualBoundingClientRect(node) {
[27] Fix | Delete
var boundingRect = node.getBoundingClientRect();
[28] Fix | Delete
[29] Fix | Delete
// The original object returned by getBoundingClientRect is immutable, so we clone it
[30] Fix | Delete
// We can't use extend because the properties are not considered part of the object by hasOwnProperty in IE9
[31] Fix | Delete
var rect = {};
[32] Fix | Delete
for (var k in boundingRect) {
[33] Fix | Delete
rect[k] = boundingRect[k];
[34] Fix | Delete
}
[35] Fix | Delete
[36] Fix | Delete
try {
[37] Fix | Delete
if (node.ownerDocument !== document) {
[38] Fix | Delete
var _frameElement = node.ownerDocument.defaultView.frameElement;
[39] Fix | Delete
if (_frameElement) {
[40] Fix | Delete
var frameRect = getActualBoundingClientRect(_frameElement);
[41] Fix | Delete
rect.top += frameRect.top;
[42] Fix | Delete
rect.bottom += frameRect.top;
[43] Fix | Delete
rect.left += frameRect.left;
[44] Fix | Delete
rect.right += frameRect.left;
[45] Fix | Delete
}
[46] Fix | Delete
}
[47] Fix | Delete
} catch (err) {
[48] Fix | Delete
// Ignore "Access is denied" in IE11/Edge
[49] Fix | Delete
}
[50] Fix | Delete
[51] Fix | Delete
return rect;
[52] Fix | Delete
}
[53] Fix | Delete
[54] Fix | Delete
function getScrollParents(el) {
[55] Fix | Delete
// In firefox if the el is inside an iframe with display: none; window.getComputedStyle() will return null;
[56] Fix | Delete
// https://bugzilla.mozilla.org/show_bug.cgi?id=548397
[57] Fix | Delete
var computedStyle = getComputedStyle(el) || {};
[58] Fix | Delete
var position = computedStyle.position;
[59] Fix | Delete
var parents = [];
[60] Fix | Delete
[61] Fix | Delete
if (position === 'fixed') {
[62] Fix | Delete
return [el];
[63] Fix | Delete
}
[64] Fix | Delete
[65] Fix | Delete
var parent = el;
[66] Fix | Delete
while ((parent = parent.parentNode) && parent && parent.nodeType === 1) {
[67] Fix | Delete
var style = undefined;
[68] Fix | Delete
try {
[69] Fix | Delete
style = getComputedStyle(parent);
[70] Fix | Delete
} catch (err) {}
[71] Fix | Delete
[72] Fix | Delete
if (typeof style === 'undefined' || style === null) {
[73] Fix | Delete
parents.push(parent);
[74] Fix | Delete
return parents;
[75] Fix | Delete
}
[76] Fix | Delete
[77] Fix | Delete
var _style = style;
[78] Fix | Delete
var overflow = _style.overflow;
[79] Fix | Delete
var overflowX = _style.overflowX;
[80] Fix | Delete
var overflowY = _style.overflowY;
[81] Fix | Delete
[82] Fix | Delete
if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {
[83] Fix | Delete
if (position !== 'absolute' || ['relative', 'absolute', 'fixed'].indexOf(style.position) >= 0) {
[84] Fix | Delete
parents.push(parent);
[85] Fix | Delete
}
[86] Fix | Delete
}
[87] Fix | Delete
}
[88] Fix | Delete
[89] Fix | Delete
parents.push(el.ownerDocument.body);
[90] Fix | Delete
[91] Fix | Delete
// If the node is within a frame, account for the parent window scroll
[92] Fix | Delete
if (el.ownerDocument !== document) {
[93] Fix | Delete
parents.push(el.ownerDocument.defaultView);
[94] Fix | Delete
}
[95] Fix | Delete
[96] Fix | Delete
return parents;
[97] Fix | Delete
}
[98] Fix | Delete
[99] Fix | Delete
var uniqueId = (function () {
[100] Fix | Delete
var id = 0;
[101] Fix | Delete
return function () {
[102] Fix | Delete
return ++id;
[103] Fix | Delete
};
[104] Fix | Delete
})();
[105] Fix | Delete
[106] Fix | Delete
var zeroPosCache = {};
[107] Fix | Delete
var getOrigin = function getOrigin() {
[108] Fix | Delete
// getBoundingClientRect is unfortunately too accurate. It introduces a pixel or two of
[109] Fix | Delete
// jitter as the user scrolls that messes with our ability to detect if two positions
[110] Fix | Delete
// are equivilant or not. We place an element at the top left of the page that will
[111] Fix | Delete
// get the same jitter, so we can cancel the two out.
[112] Fix | Delete
var node = zeroElement;
[113] Fix | Delete
if (!node || !document.body.contains(node)) {
[114] Fix | Delete
node = document.createElement('div');
[115] Fix | Delete
node.setAttribute('data-tether-id', uniqueId());
[116] Fix | Delete
extend(node.style, {
[117] Fix | Delete
top: 0,
[118] Fix | Delete
left: 0,
[119] Fix | Delete
position: 'absolute'
[120] Fix | Delete
});
[121] Fix | Delete
[122] Fix | Delete
document.body.appendChild(node);
[123] Fix | Delete
[124] Fix | Delete
zeroElement = node;
[125] Fix | Delete
}
[126] Fix | Delete
[127] Fix | Delete
var id = node.getAttribute('data-tether-id');
[128] Fix | Delete
if (typeof zeroPosCache[id] === 'undefined') {
[129] Fix | Delete
zeroPosCache[id] = getActualBoundingClientRect(node);
[130] Fix | Delete
[131] Fix | Delete
// Clear the cache when this position call is done
[132] Fix | Delete
defer(function () {
[133] Fix | Delete
delete zeroPosCache[id];
[134] Fix | Delete
});
[135] Fix | Delete
}
[136] Fix | Delete
[137] Fix | Delete
return zeroPosCache[id];
[138] Fix | Delete
};
[139] Fix | Delete
[140] Fix | Delete
function removeUtilElements() {
[141] Fix | Delete
if (zeroElement) {
[142] Fix | Delete
document.body.removeChild(zeroElement);
[143] Fix | Delete
}
[144] Fix | Delete
zeroElement = null;
[145] Fix | Delete
};
[146] Fix | Delete
[147] Fix | Delete
function getBounds(el) {
[148] Fix | Delete
var doc = undefined;
[149] Fix | Delete
if (el === document) {
[150] Fix | Delete
doc = document;
[151] Fix | Delete
el = document.documentElement;
[152] Fix | Delete
} else {
[153] Fix | Delete
doc = el.ownerDocument;
[154] Fix | Delete
}
[155] Fix | Delete
[156] Fix | Delete
var docEl = doc.documentElement;
[157] Fix | Delete
[158] Fix | Delete
var box = getActualBoundingClientRect(el);
[159] Fix | Delete
[160] Fix | Delete
var origin = getOrigin();
[161] Fix | Delete
[162] Fix | Delete
box.top -= origin.top;
[163] Fix | Delete
box.left -= origin.left;
[164] Fix | Delete
[165] Fix | Delete
if (typeof box.width === 'undefined') {
[166] Fix | Delete
box.width = document.body.scrollWidth - box.left - box.right;
[167] Fix | Delete
}
[168] Fix | Delete
if (typeof box.height === 'undefined') {
[169] Fix | Delete
box.height = document.body.scrollHeight - box.top - box.bottom;
[170] Fix | Delete
}
[171] Fix | Delete
[172] Fix | Delete
box.top = box.top - docEl.clientTop;
[173] Fix | Delete
box.left = box.left - docEl.clientLeft;
[174] Fix | Delete
box.right = doc.body.clientWidth - box.width - box.left;
[175] Fix | Delete
box.bottom = doc.body.clientHeight - box.height - box.top;
[176] Fix | Delete
[177] Fix | Delete
return box;
[178] Fix | Delete
}
[179] Fix | Delete
[180] Fix | Delete
function getOffsetParent(el) {
[181] Fix | Delete
return el.offsetParent || document.documentElement;
[182] Fix | Delete
}
[183] Fix | Delete
[184] Fix | Delete
var _scrollBarSize = null;
[185] Fix | Delete
function getScrollBarSize() {
[186] Fix | Delete
if (_scrollBarSize) {
[187] Fix | Delete
return _scrollBarSize;
[188] Fix | Delete
}
[189] Fix | Delete
var inner = document.createElement('div');
[190] Fix | Delete
inner.style.width = '100%';
[191] Fix | Delete
inner.style.height = '200px';
[192] Fix | Delete
[193] Fix | Delete
var outer = document.createElement('div');
[194] Fix | Delete
extend(outer.style, {
[195] Fix | Delete
position: 'absolute',
[196] Fix | Delete
top: 0,
[197] Fix | Delete
left: 0,
[198] Fix | Delete
pointerEvents: 'none',
[199] Fix | Delete
visibility: 'hidden',
[200] Fix | Delete
width: '200px',
[201] Fix | Delete
height: '150px',
[202] Fix | Delete
overflow: 'hidden'
[203] Fix | Delete
});
[204] Fix | Delete
[205] Fix | Delete
outer.appendChild(inner);
[206] Fix | Delete
[207] Fix | Delete
document.body.appendChild(outer);
[208] Fix | Delete
[209] Fix | Delete
var widthContained = inner.offsetWidth;
[210] Fix | Delete
outer.style.overflow = 'scroll';
[211] Fix | Delete
var widthScroll = inner.offsetWidth;
[212] Fix | Delete
[213] Fix | Delete
if (widthContained === widthScroll) {
[214] Fix | Delete
widthScroll = outer.clientWidth;
[215] Fix | Delete
}
[216] Fix | Delete
[217] Fix | Delete
document.body.removeChild(outer);
[218] Fix | Delete
[219] Fix | Delete
var width = widthContained - widthScroll;
[220] Fix | Delete
[221] Fix | Delete
_scrollBarSize = { width: width, height: width };
[222] Fix | Delete
return _scrollBarSize;
[223] Fix | Delete
}
[224] Fix | Delete
[225] Fix | Delete
function extend() {
[226] Fix | Delete
var out = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
[227] Fix | Delete
[228] Fix | Delete
var args = [];
[229] Fix | Delete
[230] Fix | Delete
Array.prototype.push.apply(args, arguments);
[231] Fix | Delete
[232] Fix | Delete
args.slice(1).forEach(function (obj) {
[233] Fix | Delete
if (obj) {
[234] Fix | Delete
for (var key in obj) {
[235] Fix | Delete
if (({}).hasOwnProperty.call(obj, key)) {
[236] Fix | Delete
out[key] = obj[key];
[237] Fix | Delete
}
[238] Fix | Delete
}
[239] Fix | Delete
}
[240] Fix | Delete
});
[241] Fix | Delete
[242] Fix | Delete
return out;
[243] Fix | Delete
}
[244] Fix | Delete
[245] Fix | Delete
function removeClass(el, name) {
[246] Fix | Delete
if (typeof el.classList !== 'undefined') {
[247] Fix | Delete
name.split(' ').forEach(function (cls) {
[248] Fix | Delete
if (cls.trim()) {
[249] Fix | Delete
el.classList.remove(cls);
[250] Fix | Delete
}
[251] Fix | Delete
});
[252] Fix | Delete
} else {
[253] Fix | Delete
var regex = new RegExp('(^| )' + name.split(' ').join('|') + '( |$)', 'gi');
[254] Fix | Delete
var className = getClassName(el).replace(regex, ' ');
[255] Fix | Delete
setClassName(el, className);
[256] Fix | Delete
}
[257] Fix | Delete
}
[258] Fix | Delete
[259] Fix | Delete
function addClass(el, name) {
[260] Fix | Delete
if (typeof el.classList !== 'undefined') {
[261] Fix | Delete
name.split(' ').forEach(function (cls) {
[262] Fix | Delete
if (cls.trim()) {
[263] Fix | Delete
el.classList.add(cls);
[264] Fix | Delete
}
[265] Fix | Delete
});
[266] Fix | Delete
} else {
[267] Fix | Delete
removeClass(el, name);
[268] Fix | Delete
var cls = getClassName(el) + (' ' + name);
[269] Fix | Delete
setClassName(el, cls);
[270] Fix | Delete
}
[271] Fix | Delete
}
[272] Fix | Delete
[273] Fix | Delete
function hasClass(el, name) {
[274] Fix | Delete
if (typeof el.classList !== 'undefined') {
[275] Fix | Delete
return el.classList.contains(name);
[276] Fix | Delete
}
[277] Fix | Delete
var className = getClassName(el);
[278] Fix | Delete
return new RegExp('(^| )' + name + '( |$)', 'gi').test(className);
[279] Fix | Delete
}
[280] Fix | Delete
[281] Fix | Delete
function getClassName(el) {
[282] Fix | Delete
// Can't use just SVGAnimatedString here since nodes within a Frame in IE have
[283] Fix | Delete
// completely separately SVGAnimatedString base classes
[284] Fix | Delete
if (el.className instanceof el.ownerDocument.defaultView.SVGAnimatedString) {
[285] Fix | Delete
return el.className.baseVal;
[286] Fix | Delete
}
[287] Fix | Delete
return el.className;
[288] Fix | Delete
}
[289] Fix | Delete
[290] Fix | Delete
function setClassName(el, className) {
[291] Fix | Delete
el.setAttribute('class', className);
[292] Fix | Delete
}
[293] Fix | Delete
[294] Fix | Delete
function updateClasses(el, add, all) {
[295] Fix | Delete
// Of the set of 'all' classes, we need the 'add' classes, and only the
[296] Fix | Delete
// 'add' classes to be set.
[297] Fix | Delete
all.forEach(function (cls) {
[298] Fix | Delete
if (add.indexOf(cls) === -1 && hasClass(el, cls)) {
[299] Fix | Delete
removeClass(el, cls);
[300] Fix | Delete
}
[301] Fix | Delete
});
[302] Fix | Delete
[303] Fix | Delete
add.forEach(function (cls) {
[304] Fix | Delete
if (!hasClass(el, cls)) {
[305] Fix | Delete
addClass(el, cls);
[306] Fix | Delete
}
[307] Fix | Delete
});
[308] Fix | Delete
}
[309] Fix | Delete
[310] Fix | Delete
var deferred = [];
[311] Fix | Delete
[312] Fix | Delete
var defer = function defer(fn) {
[313] Fix | Delete
deferred.push(fn);
[314] Fix | Delete
};
[315] Fix | Delete
[316] Fix | Delete
var flush = function flush() {
[317] Fix | Delete
var fn = undefined;
[318] Fix | Delete
while (fn = deferred.pop()) {
[319] Fix | Delete
fn();
[320] Fix | Delete
}
[321] Fix | Delete
};
[322] Fix | Delete
[323] Fix | Delete
var Evented = (function () {
[324] Fix | Delete
function Evented() {
[325] Fix | Delete
_classCallCheck(this, Evented);
[326] Fix | Delete
}
[327] Fix | Delete
[328] Fix | Delete
_createClass(Evented, [{
[329] Fix | Delete
key: 'on',
[330] Fix | Delete
value: function on(event, handler, ctx) {
[331] Fix | Delete
var once = arguments.length <= 3 || arguments[3] === undefined ? false : arguments[3];
[332] Fix | Delete
[333] Fix | Delete
if (typeof this.bindings === 'undefined') {
[334] Fix | Delete
this.bindings = {};
[335] Fix | Delete
}
[336] Fix | Delete
if (typeof this.bindings[event] === 'undefined') {
[337] Fix | Delete
this.bindings[event] = [];
[338] Fix | Delete
}
[339] Fix | Delete
this.bindings[event].push({ handler: handler, ctx: ctx, once: once });
[340] Fix | Delete
}
[341] Fix | Delete
}, {
[342] Fix | Delete
key: 'once',
[343] Fix | Delete
value: function once(event, handler, ctx) {
[344] Fix | Delete
this.on(event, handler, ctx, true);
[345] Fix | Delete
}
[346] Fix | Delete
}, {
[347] Fix | Delete
key: 'off',
[348] Fix | Delete
value: function off(event, handler) {
[349] Fix | Delete
if (typeof this.bindings === 'undefined' || typeof this.bindings[event] === 'undefined') {
[350] Fix | Delete
return;
[351] Fix | Delete
}
[352] Fix | Delete
[353] Fix | Delete
if (typeof handler === 'undefined') {
[354] Fix | Delete
delete this.bindings[event];
[355] Fix | Delete
} else {
[356] Fix | Delete
var i = 0;
[357] Fix | Delete
while (i < this.bindings[event].length) {
[358] Fix | Delete
if (this.bindings[event][i].handler === handler) {
[359] Fix | Delete
this.bindings[event].splice(i, 1);
[360] Fix | Delete
} else {
[361] Fix | Delete
++i;
[362] Fix | Delete
}
[363] Fix | Delete
}
[364] Fix | Delete
}
[365] Fix | Delete
}
[366] Fix | Delete
}, {
[367] Fix | Delete
key: 'trigger',
[368] Fix | Delete
value: function trigger(event) {
[369] Fix | Delete
if (typeof this.bindings !== 'undefined' && this.bindings[event]) {
[370] Fix | Delete
var i = 0;
[371] Fix | Delete
[372] Fix | Delete
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
[373] Fix | Delete
args[_key - 1] = arguments[_key];
[374] Fix | Delete
}
[375] Fix | Delete
[376] Fix | Delete
while (i < this.bindings[event].length) {
[377] Fix | Delete
var _bindings$event$i = this.bindings[event][i];
[378] Fix | Delete
var handler = _bindings$event$i.handler;
[379] Fix | Delete
var ctx = _bindings$event$i.ctx;
[380] Fix | Delete
var once = _bindings$event$i.once;
[381] Fix | Delete
[382] Fix | Delete
var context = ctx;
[383] Fix | Delete
if (typeof context === 'undefined') {
[384] Fix | Delete
context = this;
[385] Fix | Delete
}
[386] Fix | Delete
[387] Fix | Delete
handler.apply(context, args);
[388] Fix | Delete
[389] Fix | Delete
if (once) {
[390] Fix | Delete
this.bindings[event].splice(i, 1);
[391] Fix | Delete
} else {
[392] Fix | Delete
++i;
[393] Fix | Delete
}
[394] Fix | Delete
}
[395] Fix | Delete
}
[396] Fix | Delete
}
[397] Fix | Delete
}]);
[398] Fix | Delete
[399] Fix | Delete
return Evented;
[400] Fix | Delete
})();
[401] Fix | Delete
[402] Fix | Delete
TetherBase.Utils = {
[403] Fix | Delete
getActualBoundingClientRect: getActualBoundingClientRect,
[404] Fix | Delete
getScrollParents: getScrollParents,
[405] Fix | Delete
getBounds: getBounds,
[406] Fix | Delete
getOffsetParent: getOffsetParent,
[407] Fix | Delete
extend: extend,
[408] Fix | Delete
addClass: addClass,
[409] Fix | Delete
removeClass: removeClass,
[410] Fix | Delete
hasClass: hasClass,
[411] Fix | Delete
updateClasses: updateClasses,
[412] Fix | Delete
defer: defer,
[413] Fix | Delete
flush: flush,
[414] Fix | Delete
uniqueId: uniqueId,
[415] Fix | Delete
Evented: Evented,
[416] Fix | Delete
getScrollBarSize: getScrollBarSize,
[417] Fix | Delete
removeUtilElements: removeUtilElements
[418] Fix | Delete
};
[419] Fix | Delete
/* globals TetherBase, performance */
[420] Fix | Delete
[421] Fix | Delete
'use strict';
[422] Fix | Delete
[423] Fix | Delete
var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();
[424] Fix | Delete
[425] Fix | Delete
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
[426] Fix | Delete
[427] Fix | Delete
var _get = function get(_x6, _x7, _x8) { var _again = true; _function: while (_again) { var object = _x6, property = _x7, receiver = _x8; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x6 = parent; _x7 = property; _x8 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
[428] Fix | Delete
[429] Fix | Delete
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
[430] Fix | Delete
[431] Fix | Delete
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
[432] Fix | Delete
[433] Fix | Delete
if (typeof TetherBase === 'undefined') {
[434] Fix | Delete
throw new Error('You must include the utils.js file before tether.js');
[435] Fix | Delete
}
[436] Fix | Delete
[437] Fix | Delete
var _TetherBase$Utils = TetherBase.Utils;
[438] Fix | Delete
var getScrollParents = _TetherBase$Utils.getScrollParents;
[439] Fix | Delete
var getBounds = _TetherBase$Utils.getBounds;
[440] Fix | Delete
var getOffsetParent = _TetherBase$Utils.getOffsetParent;
[441] Fix | Delete
var extend = _TetherBase$Utils.extend;
[442] Fix | Delete
var addClass = _TetherBase$Utils.addClass;
[443] Fix | Delete
var removeClass = _TetherBase$Utils.removeClass;
[444] Fix | Delete
var updateClasses = _TetherBase$Utils.updateClasses;
[445] Fix | Delete
var defer = _TetherBase$Utils.defer;
[446] Fix | Delete
var flush = _TetherBase$Utils.flush;
[447] Fix | Delete
var getScrollBarSize = _TetherBase$Utils.getScrollBarSize;
[448] Fix | Delete
var removeUtilElements = _TetherBase$Utils.removeUtilElements;
[449] Fix | Delete
[450] Fix | Delete
function within(a, b) {
[451] Fix | Delete
var diff = arguments.length <= 2 || arguments[2] === undefined ? 1 : arguments[2];
[452] Fix | Delete
[453] Fix | Delete
return a + diff >= b && b >= a - diff;
[454] Fix | Delete
}
[455] Fix | Delete
[456] Fix | Delete
var transformKey = (function () {
[457] Fix | Delete
if (typeof document === 'undefined') {
[458] Fix | Delete
return '';
[459] Fix | Delete
}
[460] Fix | Delete
var el = document.createElement('div');
[461] Fix | Delete
[462] Fix | Delete
var transforms = ['transform', 'WebkitTransform', 'OTransform', 'MozTransform', 'msTransform'];
[463] Fix | Delete
for (var i = 0; i < transforms.length; ++i) {
[464] Fix | Delete
var key = transforms[i];
[465] Fix | Delete
if (el.style[key] !== undefined) {
[466] Fix | Delete
return key;
[467] Fix | Delete
}
[468] Fix | Delete
}
[469] Fix | Delete
})();
[470] Fix | Delete
[471] Fix | Delete
var tethers = [];
[472] Fix | Delete
[473] Fix | Delete
var position = function position() {
[474] Fix | Delete
tethers.forEach(function (tether) {
[475] Fix | Delete
tether.position(false);
[476] Fix | Delete
});
[477] Fix | Delete
flush();
[478] Fix | Delete
};
[479] Fix | Delete
[480] Fix | Delete
function now() {
[481] Fix | Delete
if (typeof performance === 'object' && typeof performance.now === 'function') {
[482] Fix | Delete
return performance.now();
[483] Fix | Delete
}
[484] Fix | Delete
return +new Date();
[485] Fix | Delete
}
[486] Fix | Delete
[487] Fix | Delete
(function () {
[488] Fix | Delete
var lastCall = null;
[489] Fix | Delete
var lastDuration = null;
[490] Fix | Delete
var pendingTimeout = null;
[491] Fix | Delete
[492] Fix | Delete
var tick = function tick() {
[493] Fix | Delete
if (typeof lastDuration !== 'undefined' && lastDuration > 16) {
[494] Fix | Delete
// We voluntarily throttle ourselves if we can't manage 60fps
[495] Fix | Delete
lastDuration = Math.min(lastDuration - 16, 250);
[496] Fix | Delete
[497] Fix | Delete
// Just in case this is the last event, remember to position just once more
[498] Fix | Delete
pendingTimeout = setTimeout(tick, 250);
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function