/
www
/
wwwroot
/
alo88.autos
/
wp-content
/
plugins
/
wp-content-crawler
/
app
/
public
/
node_modules
/
tether
/
dist
/
js
/
Upload File
HOME
{"version":3,"file":"tether.esm.js","sources":["../../src/js/utils/type-check.js","../../src/js/utils/classes.js","../../src/js/utils/deferred.js","../../src/js/utils/general.js","../../src/js/utils/bounds.js","../../src/js/abutment.js","../../src/js/constraint.js","../../src/js/shift.js","../../src/js/evented.js","../../src/js/utils/offset.js","../../src/js/utils/parents.js","../../src/js/tether.js"],"sourcesContent":["/**\n * Checks if `value` is classified as a `Function` object.\n * @param {*} value The param to check if it is a function\n */\nexport function isFunction(value) {\n return typeof value === 'function';\n}\n\n/**\n * Checks if `value` is classified as a `Number` object.\n * @param {*} value The param to check if it is a number\n */\nexport function isNumber(value) {\n return typeof value === 'number';\n}\n\n/**\n * Checks if `value` is classified as an `Object`.\n * @param {*} value The param to check if it is an object\n */\nexport function isObject(value) {\n return typeof value === 'object';\n}\n\n/**\n * Checks if `value` is classified as a `String` object.\n * @param {*} value The param to check if it is a string\n */\nexport function isString(value) {\n return typeof value === 'string';\n}\n\n/**\n * Checks if `value` is undefined.\n * @param {*} value The param to check if it is undefined\n */\nexport function isUndefined(value) {\n return value === undefined;\n}\n","import { isUndefined } from './type-check';\n\nexport function addClass(el, name) {\n name.split(' ').forEach((cls) => {\n if (cls.trim()) {\n el.classList.add(cls);\n }\n });\n}\n\n/**\n * Get class string based on previously determined classes\n * @param {String} [key=''] - default value for the classes object\n * @param {Object} classes\n * @param {String} classPrefix\n */\nexport function getClass(key = '', classes, classPrefix) {\n if (!isUndefined(classes) && !isUndefined(classes[key])) {\n if (classes[key] === false) {\n return '';\n }\n return classes[key];\n } else if (classPrefix) {\n return `${classPrefix}-${key}`;\n } else {\n return key;\n }\n}\n\nexport function removeClass(el, name) {\n name.split(' ').forEach((cls) => {\n if (cls.trim()) {\n el.classList.remove(cls);\n }\n });\n}\n\nexport function updateClasses(el, add, all) {\n // Of the set of 'all' classes, we need the 'add' classes, and only the\n // 'add' classes to be set.\n all.forEach((cls) => {\n if (add.indexOf(cls) === -1 && el.classList.contains(cls)) {\n removeClass(el, cls);\n }\n });\n\n add.forEach((cls) => {\n if (!el.classList.contains(cls)) {\n addClass(el, cls);\n }\n });\n}\n","const deferred = [];\n\nexport function defer(fn) {\n deferred.push(fn);\n}\n\nexport function flush() {\n let fn;\n // eslint-disable-next-line\n while (fn = deferred.pop()) {\n fn();\n }\n}\n","let _scrollBarSize = null;\n\nexport function extend(out = {}) {\n const args = [];\n\n Array.prototype.push.apply(args, arguments);\n\n args.slice(1).forEach((obj) => {\n if (obj) {\n for (let key in obj) {\n if ({}.hasOwnProperty.call(obj, key)) {\n out[key] = obj[key];\n }\n }\n }\n });\n\n return out;\n}\n\nexport function getScrollBarSize() {\n if (_scrollBarSize) {\n return _scrollBarSize;\n }\n const inner = document.createElement('div');\n inner.style.width = '100%';\n inner.style.height = '200px';\n\n const outer = document.createElement('div');\n extend(outer.style, {\n position: 'absolute',\n top: 0,\n left: 0,\n pointerEvents: 'none',\n visibility: 'hidden',\n width: '200px',\n height: '150px',\n overflow: 'hidden'\n });\n\n outer.appendChild(inner);\n\n document.body.appendChild(outer);\n\n const widthContained = inner.offsetWidth;\n outer.style.overflow = 'scroll';\n let widthScroll = inner.offsetWidth;\n\n if (widthContained === widthScroll) {\n widthScroll = outer.clientWidth;\n }\n\n document.body.removeChild(outer);\n\n const width = widthContained - widthScroll;\n\n _scrollBarSize = { width, height: width };\n return _scrollBarSize;\n}\n\nexport const uniqueId = (() => {\n let id = 0;\n return () => ++id;\n})();\n","import { defer } from './deferred';\nimport { extend, uniqueId } from './general';\nimport { isUndefined } from './type-check';\n\nconst zeroPosCache = {};\nlet zeroElement = null;\n\nexport function getBounds(body, el) {\n let doc;\n if (el === document) {\n doc = document;\n el = document.documentElement;\n } else {\n doc = el.ownerDocument;\n }\n\n const docEl = doc.documentElement;\n\n const box = _getActualBoundingClientRect(el);\n\n const origin = _getOrigin(body);\n\n box.top -= origin.top;\n box.left -= origin.left;\n\n if (isUndefined(box.width)) {\n box.width = document.body.scrollWidth - box.left - box.right;\n }\n if (isUndefined(box.height)) {\n box.height = document.body.scrollHeight - box.top - box.bottom;\n }\n\n box.top = box.top - docEl.clientTop;\n box.left = box.left - docEl.clientLeft;\n box.right = doc.body.clientWidth - box.width - box.left;\n box.bottom = doc.body.clientHeight - box.height - box.top;\n\n return box;\n}\n\n/**\n * Gets bounds for when target modifiier is 'scroll-handle'\n * @param target\n * @return {{left: number, width: number, height: number}}\n */\nexport function getScrollHandleBounds(body, target) {\n let bounds;\n // We have to do the check for the scrollTop and if target === document.body here and set to variables\n // because we may reset target below.\n const targetScrollTop = target.scrollTop;\n const targetIsBody = target === document.body;\n\n if (targetIsBody) {\n target = document.documentElement;\n\n bounds = {\n left: pageXOffset,\n top: pageYOffset,\n height: innerHeight,\n width: innerWidth\n };\n } else {\n bounds = getBounds(body, target);\n }\n\n const style = getComputedStyle(target);\n\n const hasBottomScroll = (\n target.scrollWidth > target.clientWidth ||\n [style.overflow, style.overflowX].indexOf('scroll') >= 0 ||\n !targetIsBody\n );\n\n let scrollBottom = 0;\n if (hasBottomScroll) {\n scrollBottom = 15;\n }\n\n const height = bounds.height - parseFloat(style.borderTopWidth) - parseFloat(style.borderBottomWidth) - scrollBottom;\n\n const out = {\n width: 15,\n height: height * 0.975 * (height / target.scrollHeight),\n left: bounds.left + bounds.width - parseFloat(style.borderLeftWidth) - 15\n };\n\n let fitAdj = 0;\n if (height < 408 && targetIsBody) {\n fitAdj = -0.00011 * Math.pow(height, 2) - 0.00727 * height + 22.58;\n }\n\n if (!targetIsBody) {\n out.height = Math.max(out.height, 24);\n }\n\n const scrollPercentage = targetScrollTop / (target.scrollHeight - height);\n out.top = scrollPercentage * (height - out.height - fitAdj) + bounds.top + parseFloat(style.borderTopWidth);\n\n if (targetIsBody) {\n out.height = Math.max(out.height, 24);\n }\n\n return out;\n}\n\n/**\n * Gets bounds for when target modifiier is 'visible\n * @param target\n * @return {{top: *, left: *, width: *, height: *}}\n */\nexport function getVisibleBounds(body, target) {\n if (target === document.body) {\n return { top: pageYOffset, left: pageXOffset, height: innerHeight, width: innerWidth };\n } else {\n const bounds = getBounds(body, target);\n\n const out = {\n height: bounds.height,\n width: bounds.width,\n top: bounds.top,\n left: bounds.left\n };\n\n out.height = Math.min(out.height, bounds.height - (pageYOffset - bounds.top));\n out.height = Math.min(out.height, bounds.height - ((bounds.top + bounds.height) - (pageYOffset + innerHeight)));\n out.height = Math.min(innerHeight, out.height);\n out.height -= 2;\n\n out.width = Math.min(out.width, bounds.width - (pageXOffset - bounds.left));\n out.width = Math.min(out.width, bounds.width - ((bounds.left + bounds.width) - (pageXOffset + innerWidth)));\n out.width = Math.min(innerWidth, out.width);\n out.width -= 2;\n\n if (out.top < pageYOffset) {\n out.top = pageYOffset;\n }\n if (out.left < pageXOffset) {\n out.left = pageXOffset;\n }\n\n return out;\n }\n}\n\nexport function removeUtilElements(body) {\n if (zeroElement) {\n body.removeChild(zeroElement);\n }\n zeroElement = null;\n}\n\n/**\n * Same as native getBoundingClientRect, except it takes into account parent <frame> offsets\n * if the element lies within a nested document (<frame> or <iframe>-like).\n * @param node\n */\nfunction _getActualBoundingClientRect(node) {\n let boundingRect = node.getBoundingClientRect();\n\n // The original object returned by getBoundingClientRect is immutable, so we clone it\n // We can't use extend because the properties are not considered part of the object by hasOwnProperty in IE9\n let rect = {};\n for (let k in boundingRect) {\n rect[k] = boundingRect[k];\n }\n\n try {\n if (node.ownerDocument !== document) {\n let { frameElement } = node.ownerDocument.defaultView;\n if (frameElement) {\n let frameRect = _getActualBoundingClientRect(frameElement);\n rect.top += frameRect.top;\n rect.bottom += frameRect.top;\n rect.left += frameRect.left;\n rect.right += frameRect.left;\n }\n }\n } catch(err) {\n // Ignore \"Access is denied\" in IE11/Edge\n }\n\n return rect;\n}\n\nfunction _getOrigin(body) {\n // getBoundingClientRect is unfortunately too accurate. It introduces a pixel or two of\n // jitter as the user scrolls that messes with our ability to detect if two positions\n // are equivilant or not. We place an element at the top left of the page that will\n // get the same jitter, so we can cancel the two out.\n let node = zeroElement;\n if (!node || !body.contains(node)) {\n node = document.createElement('div');\n node.setAttribute('data-tether-id', uniqueId());\n extend(node.style, {\n top: 0,\n left: 0,\n position: 'absolute'\n });\n\n body.appendChild(node);\n\n zeroElement = node;\n }\n\n const id = node.getAttribute('data-tether-id');\n if (isUndefined(zeroPosCache[id])) {\n zeroPosCache[id] = _getActualBoundingClientRect(node);\n\n // Clear the cache when this position call is done\n defer(() => {\n delete zeroPosCache[id];\n });\n }\n\n return zeroPosCache[id];\n}\n","import { getClass, updateClasses } from './utils/classes';\nimport { defer } from './utils/deferred';\nimport { getBounds } from './utils/bounds';\n\nexport default {\n position({ top, left }) {\n const { height, width } = this.cache('element-bounds', () => {\n return getBounds(this.element);\n });\n\n const targetPos = this.getTargetBounds();\n\n const bottom = top + height;\n const right = left + width;\n\n const abutted = [];\n if (top <= targetPos.bottom && bottom >= targetPos.top) {\n ['left', 'right'].forEach((side) => {\n const targetPosSide = targetPos[side];\n if (targetPosSide === left || targetPosSide === right) {\n abutted.push(side);\n }\n });\n }\n\n if (left <= targetPos.right && right >= targetPos.left) {\n ['top', 'bottom'].forEach((side) => {\n const targetPosSide = targetPos[side];\n if (targetPosSide === top || targetPosSide === bottom) {\n abutted.push(side);\n }\n });\n }\n\n const sides = ['left', 'top', 'right', 'bottom'];\n const { classes, classPrefix } = this.options;\n this.all.push(getClass('abutted', classes, classPrefix));\n sides.forEach((side) => {\n this.all.push(`${getClass('abutted', classes, classPrefix)}-${side}`);\n });\n\n if (abutted.length) {\n this.add.push(getClass('abutted', classes, classPrefix));\n }\n\n abutted.forEach((side) => {\n this.add.push(`${getClass('abutted', classes, classPrefix)}-${side}`);\n });\n\n defer(() => {\n if (!(this.options.addTargetClasses === false)) {\n updateClasses(this.target, this.add, this.all);\n }\n updateClasses(this.element, this.add, this.all);\n });\n\n return true;\n }\n};\n","import { getClass, updateClasses } from './utils/classes';\nimport { defer } from './utils/deferred';\nimport { extend } from './utils/general';\nimport { getBounds } from './utils/bounds';\nimport { isString, isUndefined } from './utils/type-check';\n\nconst BOUNDS_FORMAT = ['left', 'top', 'right', 'bottom'];\n\n/**\n * Returns an array of bounds of the format [left, top, right, bottom]\n * @param tether\n * @param to\n * @return {*[]|HTMLElement|ActiveX.IXMLDOMElement}\n */\nfunction getBoundingRect(body, tether, to) {\n // arg to is required\n if (!to) {\n return null;\n }\n if (to === 'scrollParent') {\n to = tether.scrollParents[0];\n } else if (to === 'window') {\n to = [pageXOffset, pageYOffset, innerWidth + pageXOffset, innerHeight + pageYOffset];\n }\n\n if (to === document) {\n to = to.documentElement;\n }\n\n if (!isUndefined(to.nodeType)) {\n const node = to;\n const size = getBounds(body, to);\n const pos = size;\n const style = getComputedStyle(to);\n\n to = [pos.left, pos.top, size.width + pos.left, size.height + pos.top];\n\n // Account any parent Frames scroll offset\n if (node.ownerDocument !== document) {\n let win = node.ownerDocument.defaultView;\n to[0] += win.pageXOffset;\n to[1] += win.pageYOffset;\n to[2] += win.pageXOffset;\n to[3] += win.pageYOffset;\n }\n\n BOUNDS_FORMAT.forEach((side, i) => {\n side = side[0].toUpperCase() + side.substr(1);\n if (side === 'Top' || side === 'Left') {\n to[i] += parseFloat(style[`border${side}Width`]);\n } else {\n to[i] -= parseFloat(style[`border${side}Width`]);\n }\n });\n }\n\n return to;\n}\n\n/**\n * Add out of bounds classes to the list of classes we add to tether\n * @param {string[]} oob An array of directions that are out of bounds\n * @param {string[]} addClasses The array of classes to add to Tether\n * @param {string[]} classes The array of class types for Tether\n * @param {string} classPrefix The prefix to add to the front of the class\n * @param {string} outOfBoundsClass The class to apply when out of bounds\n * @private\n */\nfunction _addOutOfBoundsClass(oob, addClasses, classes, classPrefix, outOfBoundsClass) {\n if (oob.length) {\n let oobClass;\n if (!isUndefined(outOfBoundsClass)) {\n oobClass = outOfBoundsClass;\n } else {\n oobClass = getClass('out-of-bounds', classes, classPrefix);\n }\n\n addClasses.push(oobClass);\n oob.forEach((side) => {\n addClasses.push(`${oobClass}-${side}`);\n });\n }\n}\n\n/**\n * Calculates if out of bounds or pinned in the X direction.\n *\n * @param {number} left\n * @param {number[]} bounds Array of bounds of the format [left, top, right, bottom]\n * @param {number} width\n * @param pin\n * @param pinned\n * @param {string[]} oob\n * @return {number}\n * @private\n */\nfunction _calculateOOBAndPinnedLeft(left, bounds, width, pin, pinned, oob) {\n if (left < bounds[0]) {\n if (pin.indexOf('left') >= 0) {\n left = bounds[0];\n pinned.push('left');\n } else {\n oob.push('left');\n }\n }\n\n if (left + width > bounds[2]) {\n if (pin.indexOf('right') >= 0) {\n left = bounds[2] - width;\n pinned.push('right');\n } else {\n oob.push('right');\n }\n }\n\n return left;\n}\n\n/**\n * Calculates if out of bounds or pinned in the Y direction.\n *\n * @param {number} top\n * @param {number[]} bounds Array of bounds of the format [left, top, right, bottom]\n * @param {number} height\n * @param pin\n * @param {string[]} pinned\n * @param {string[]} oob\n * @return {number}\n * @private\n */\nfunction _calculateOOBAndPinnedTop(top, bounds, height, pin, pinned, oob) {\n if (top < bounds[1]) {\n if (pin.indexOf('top') >= 0) {\n top = bounds[1];\n pinned.push('top');\n } else {\n oob.push('top');\n }\n }\n\n if (top + height > bounds[3]) {\n if (pin.indexOf('bottom') >= 0) {\n top = bounds[3] - height;\n pinned.push('bottom');\n } else {\n oob.push('bottom');\n }\n }\n\n return top;\n}\n\n/**\n * Flip X \"together\"\n * @param {object} tAttachment The target attachment\n * @param {object} eAttachment The element attachment\n * @param {number[]} bounds Array of bounds of the format [left, top, right, bottom]\n * @param {number} width\n * @param targetWidth\n * @param {number} left\n * @private\n */\nfunction _flipXTogether(tAttachment, eAttachment, bounds, width, targetWidth, left) {\n if (left < bounds[0] && tAttachment.left === 'left') {\n if (eAttachment.left === 'right') {\n left += targetWidth;\n tAttachment.left = 'right';\n\n left += width;\n eAttachment.left = 'left';\n\n } else if (eAttachment.left === 'left') {\n left += targetWidth;\n tAttachment.left = 'right';\n\n left -= width;\n eAttachment.left = 'right';\n }\n\n } else if (left + width > bounds[2] && tAttachment.left === 'right') {\n if (eAttachment.left === 'left') {\n left -= targetWidth;\n tAttachment.left = 'left';\n\n left -= width;\n eAttachment.left = 'right';\n\n } else if (eAttachment.left === 'right') {\n left -= targetWidth;\n tAttachment.left = 'left';\n\n left += width;\n eAttachment.left = 'left';\n }\n\n } else if (tAttachment.left === 'center') {\n if (left + width > bounds[2] && eAttachment.left === 'left') {\n left -= width;\n eAttachment.left = 'right';\n\n } else if (left < bounds[0] && eAttachment.left === 'right') {\n left += width;\n eAttachment.left = 'left';\n }\n }\n\n return left;\n}\n\n/**\n * Flip Y \"together\"\n * @param {object} tAttachment The target attachment\n * @param {object} eAttachment The element attachment\n * @param {number[]} bounds Array of bounds of the format [left, top, right, bottom]\n * @param {number} height\n * @param targetHeight\n * @param {number} top\n * @private\n */\nfunction _flipYTogether(tAttachment, eAttachment, bounds, height, targetHeight, top) {\n if (tAttachment.top === 'top') {\n if (eAttachment.top === 'bottom' && top < bounds[1]) {\n top += targetHeight;\n tAttachment.top = 'bottom';\n\n top += height;\n eAttachment.top = 'top';\n\n } else if (eAttachment.top === 'top' && top + height > bounds[3] && top - (height - targetHeight) >= bounds[1]) {\n top -= height - targetHeight;\n tAttachment.top = 'bottom';\n\n eAttachment.top = 'bottom';\n }\n }\n\n if (tAttachment.top === 'bottom') {\n if (eAttachment.top === 'top' && top + height > bounds[3]) {\n top -= targetHeight;\n tAttachment.top = 'top';\n\n top -= height;\n eAttachment.top = 'bottom';\n\n } else if (eAttachment.top === 'bottom' && top < bounds[1] && top + (height * 2 - targetHeight) <= bounds[3]) {\n top += height - targetHeight;\n tAttachment.top = 'top';\n\n eAttachment.top = 'top';\n\n }\n }\n\n if (tAttachment.top === 'middle') {\n if (top + height > bounds[3] && eAttachment.top === 'top') {\n top -= height;\n eAttachment.top = 'bottom';\n\n } else if (top < bounds[1] && eAttachment.top === 'bottom') {\n top += height;\n eAttachment.top = 'top';\n }\n }\n\n return top;\n}\n\n/**\n * Get all the initial classes\n * @param classes\n * @param {string} classPrefix\n * @param constraints\n * @return {[*, *]}\n * @private\n */\nfunction _getAllClasses(classes, classPrefix, constraints) {\n const allClasses = [getClass('pinned', classes, classPrefix), getClass('out-of-bounds', classes, classPrefix)];\n\n constraints.forEach((constraint) => {\n const { outOfBoundsClass, pinnedClass } = constraint;\n if (outOfBoundsClass) {\n allClasses.push(outOfBoundsClass);\n }\n if (pinnedClass) {\n allClasses.push(pinnedClass);\n }\n });\n\n allClasses.forEach((cls) => {\n ['left', 'top', 'right', 'bottom'].forEach((side) => {\n allClasses.push(`${cls}-${side}`);\n });\n });\n\n return allClasses;\n}\n\nexport default {\n position({ top, left, targetAttachment }) {\n if (!this.options.constraints) {\n return true;\n }\n\n let { height, width } = this.cache('element-bounds', () => {\n return getBounds(this.bodyElement, this.element);\n });\n\n if (width === 0 && height === 0 && !isUndefined(this.lastSize)) {\n // Handle the item getting hidden as a result of our positioning without glitching\n // the classes in and out\n ({ width, height } = this.lastSize);\n }\n\n const targetSize = this.cache('target-bounds', () => {\n return this.getTargetBounds();\n });\n\n const { height: targetHeight, width: targetWidth } = targetSize;\n const { classes, classPrefix } = this.options;\n\n const allClasses = _getAllClasses(classes, classPrefix, this.options.constraints);\n const addClasses = [];\n\n const tAttachment = extend({}, targetAttachment);\n const eAttachment = extend({}, this.attachment);\n\n this.options.constraints.forEach((constraint) => {\n let { to, attachment, pin } = constraint;\n\n if (isUndefined(attachment)) {\n attachment = '';\n }\n\n let changeAttachX, changeAttachY;\n if (attachment.indexOf(' ') >= 0) {\n [changeAttachY, changeAttachX] = attachment.split(' ');\n } else {\n changeAttachX = changeAttachY = attachment;\n }\n\n const bounds = getBoundingRect(this.bodyElement, this, to);\n\n if (changeAttachY === 'target' || changeAttachY === 'both') {\n if (top < bounds[1] && tAttachment.top === 'top') {\n top += targetHeight;\n tAttachment.top = 'bottom';\n }\n\n if (top + height > bounds[3] && tAttachment.top === 'bottom') {\n top -= targetHeight;\n tAttachment.top = 'top';\n }\n }\n\n if (changeAttachY === 'together') {\n top = _flipYTogether(tAttachment, eAttachment, bounds, height, targetHeight, top);\n }\n\n if (changeAttachX === 'target' || changeAttachX === 'both') {\n if (left < bounds[0] && tAttachment.left === 'left') {\n left += targetWidth;\n tAttachment.left = 'right';\n }\n\n if (left + width > bounds[2] && tAttachment.left === 'right') {\n left -= targetWidth;\n tAttachment.left = 'left';\n }\n }\n\n if (changeAttachX === 'together') {\n left = _flipXTogether(tAttachment, eAttachment, bounds, width, targetWidth, left);\n }\n\n if (changeAttachY === 'element' || changeAttachY === 'both') {\n if (top < bounds[1] && eAttachment.top === 'bottom') {\n top += height;\n eAttachment.top = 'top';\n }\n\n if (top + height > bounds[3] && eAttachment.top === 'top') {\n top -= height;\n eAttachment.top = 'bottom';\n }\n }\n\n if (changeAttachX === 'element' || changeAttachX === 'both') {\n if (left < bounds[0]) {\n if (eAttachment.left === 'right') {\n left += width;\n eAttachment.left = 'left';\n } else if (eAttachment.left === 'center') {\n left += (width / 2);\n eAttachment.left = 'left';\n }\n }\n\n if (left + width > bounds[2]) {\n if (eAttachment.left === 'left') {\n left -= width;\n eAttachment.left = 'right';\n } else if (eAttachment.left === 'center') {\n left -= (width / 2);\n eAttachment.left = 'right';\n }\n }\n }\n\n if (isString(pin)) {\n pin = pin.split(',').map((p) => p.trim());\n } else if (pin === true) {\n pin = ['top', 'left', 'right', 'bottom'];\n }\n\n pin = pin || [];\n\n const pinned = [];\n const oob = [];\n\n left = _calculateOOBAndPinnedLeft(left, bounds, width, pin, pinned, oob);\n top = _calculateOOBAndPinnedTop(top, bounds, height, pin, pinned, oob);\n\n if (pinned.length) {\n let pinnedClass;\n if (!isUndefined(this.options.pinnedClass)) {\n pinnedClass = this.options.pinnedClass;\n } else {\n pinnedClass = getClass('pinned', classes, classPrefix);\n }\n\n addClasses.push(pinnedClass);\n pinned.forEach((side) => {\n addClasses.push(`${pinnedClass}-${side}`);\n });\n }\n\n _addOutOfBoundsClass(oob, addClasses, classes, classPrefix, this.options.outOfBoundsClass);\n\n if (pinned.indexOf('left') >= 0 || pinned.indexOf('right') >= 0) {\n eAttachment.left = tAttachment.left = false;\n }\n if (pinned.indexOf('top') >= 0 || pinned.indexOf('bottom') >= 0) {\n eAttachment.top = tAttachment.top = false;\n }\n\n if (tAttachment.top !== targetAttachment.top ||\n tAttachment.left !== targetAttachment.left ||\n eAttachment.top !== this.attachment.top ||\n eAttachment.left !== this.attachment.left) {\n this.updateAttachClasses(eAttachment, tAttachment);\n this.trigger('update', {\n attachment: eAttachment,\n targetAttachment: tAttachment\n });\n }\n });\n\n defer(() => {\n if (!(this.options.addTargetClasses === false)) {\n updateClasses(this.target, addClasses, allClasses);\n }\n updateClasses(this.element, addClasses, allClasses);\n });\n\n return { top, left };\n }\n};\n","import { isFunction, isString } from './utils/type-check';\n\nexport default {\n position({ top, left }) {\n if (!this.options.shift) {\n return;\n }\n\n let { shift } = this.options;\n if (isFunction(shift)) {\n shift = shift.call(this, { top, left });\n }\n\n let shiftTop, shiftLeft;\n if (isString(shift)) {\n shift = shift.split(' ');\n shift[1] = shift[1] || shift[0];\n\n ([shiftTop, shiftLeft] = shift);\n\n shiftTop = parseFloat(shiftTop, 10);\n shiftLeft = parseFloat(shiftLeft, 10);\n } else {\n ([shiftTop, shiftLeft] = [shift.top, shift.left]);\n }\n\n top += shiftTop;\n left += shiftLeft;\n\n return { top, left };\n }\n};\n","import { isUndefined } from './utils/type-check';\n\nexport class Evented {\n on(event, handler, ctx, once = false) {\n if (isUndefined(this.bindings)) {\n this.bindings = {};\n }\n if (isUndefined(this.bindings[event])) {\n this.bindings[event] = [];\n }\n this.bindings[event].push({ handler, ctx, once });\n\n return this;\n }\n\n once(event, handler, ctx) {\n return this.on(event, handler, ctx, true);\n }\n\n off(event, handler) {\n if (isUndefined(this.bindings) ||\n isUndefined(this.bindings[event])) {\n return this;\n }\n\n if (isUndefined(handler)) {\n delete this.bindings[event];\n } else {\n this.bindings[event].forEach((binding, index) => {\n if (binding.handler === handler) {\n this.bindings[event].splice(index, 1);\n }\n });\n }\n\n return this;\n }\n\n trigger(event, ...args) {\n if (!isUndefined(this.bindings) && this.bindings[event]) {\n this.bindings[event].forEach((binding, index) => {\n const { ctx, handler, once } = binding;\n\n const context = ctx || this;\n\n handler.apply(context, args);\n\n if (once) {\n this.bindings[event].splice(index, 1);\n }\n });\n }\n\n return this;\n }\n}\n","import { isString, isUndefined } from './type-check';\n\nconst MIRROR_LR = {\n center: 'center',\n left: 'right',\n right: 'left'\n};\n\nconst MIRROR_TB = {\n middle: 'middle',\n top: 'bottom',\n bottom: 'top'\n};\n\nconst OFFSET_MAP = {\n top: 0,\n left: 0,\n middle: '50%',\n center: '50%',\n bottom: '100%',\n right: '100%'\n};\n\nexport function addOffset(...offsets) {\n const out = { top: 0, left: 0 };\n\n offsets.forEach(({ top, left }) => {\n if (isString(top)) {\n top = parseFloat(top);\n }\n if (isString(left)) {\n left = parseFloat(left);\n }\n\n out.top += top;\n out.left += left;\n });\n\n return out;\n}\n\nexport function attachmentToOffset(attachment) {\n let { left, top } = attachment;\n\n if (!isUndefined(OFFSET_MAP[attachment.left])) {\n left = OFFSET_MAP[attachment.left];\n }\n\n if (!isUndefined(OFFSET_MAP[attachment.top])) {\n top = OFFSET_MAP[attachment.top];\n }\n\n return { left, top };\n}\n\nexport function autoToFixedAttachment(attachment, relativeToAttachment) {\n let { left, top } = attachment;\n\n if (left === 'auto') {\n left = MIRROR_LR[relativeToAttachment.left];\n }\n\n if (top === 'auto') {\n top = MIRROR_TB[relativeToAttachment.top];\n }\n\n return { left, top };\n}\n\nexport function offsetToPx(offset, size) {\n if (isString(offset.left) && offset.left.indexOf('%') !== -1) {\n offset.left = parseFloat(offset.left) / 100 * size.width;\n }\n if (isString(offset.top) && offset.top.indexOf('%') !== -1) {\n offset.top = parseFloat(offset.top) / 100 * size.height;\n }\n\n return offset;\n}\n\nexport function parseTopLeft(value) {\n const [top, left] = value.split(' ');\n return { top, left };\n}\n","import { isUndefined } from './type-check';\n\nexport function getScrollParents(el) {\n // In firefox if the el is inside an iframe with display: none; window.getComputedStyle() will return null;\n // https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n const computedStyle = getComputedStyle(el) || {};\n const { position } = computedStyle;\n let parents = [];\n\n if (position === 'fixed') {\n return [el];\n }\n\n let parent = el;\n while ((parent = parent.parentNode) && parent && parent.nodeType === 1) {\n let style;\n try {\n style = getComputedStyle(parent);\n } catch(err) {\n // Intentionally blank\n }\n\n if (isUndefined(style) || style === null) {\n parents.push(parent);\n return parents;\n }\n\n const { overflow, overflowX, overflowY } = style;\n if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n if (position !== 'absolute' || ['relative', 'absolute', 'fixed'].indexOf(style.position) >= 0) {\n parents.push(parent);\n }\n }\n }\n\n parents.push(el.ownerDocument.body);\n\n // If the node is within a frame, account for the parent window scroll\n if (el.ownerDocument !== document) {\n parents.push(el.ownerDocument.defaultView);\n }\n\n return parents;\n}\n\nexport function getOffsetParent(el) {\n return el.offsetParent || document.documentElement;\n}\n","import '../css/tether.scss';\nimport '../css/tether-theme-arrows.scss';\nimport '../css/tether-theme-arrows-dark.scss';\nimport '../css/tether-theme-basic.scss';\nimport Abutment from './abutment';\nimport Constraint from './constraint';\nimport Shift from './shift';\nimport { Evented } from './evented';\nimport { addClass, getClass, removeClass, updateClasses } from './utils/classes';\nimport { defer, flush } from './utils/deferred';\nimport { extend, getScrollBarSize } from './utils/general';\nimport { addOffset, attachmentToOffset, autoToFixedAttachment, offsetToPx, parseTopLeft } from './utils/offset';\nimport { getBounds, getScrollHandleBounds, getVisibleBounds, removeUtilElements } from './utils/bounds';\nimport { getOffsetParent, getScrollParents } from './utils/parents';\nimport { isNumber, isObject, isString, isUndefined } from './utils/type-check';\n\nconst TetherBase = { modules: [Constraint, Abutment, Shift] };\n\nfunction isFullscreenElement(e) {\n let d = e.ownerDocument;\n let fe = d.fullscreenElement || d.webkitFullscreenElement || d.mozFullScreenElement || d.msFullscreenElement;\n return fe === e;\n}\n\nfunction within(a, b, diff = 1) {\n return (a + diff >= b && b >= a - diff);\n}\n\nconst transformKey = (() => {\n if (isUndefined(document)) {\n return '';\n }\n const el = document.createElement('div');\n\n const transforms = ['transform', 'WebkitTransform', 'OTransform', 'MozTransform', 'msTransform'];\n for (let i = 0; i < transforms.length; ++i) {\n const key = transforms[i];\n if (el.style[key] !== undefined) {\n return key;\n }\n }\n})();\n\nconst tethers = [];\n\nconst position = () => {\n tethers.forEach((tether) => {\n tether.position(false);\n });\n flush();\n};\n\nfunction now() {\n return performance.now();\n}\n\n(() => {\n let lastCall = null;\n let lastDuration = null;\n let pendingTimeout = null;\n\n const tick = () => {\n if (!isUndefined(lastDuration) && lastDuration > 16) {\n // We voluntarily throttle ourselves if we can't manage 60fps\n lastDuration = Math.min(lastDuration - 16, 250);\n\n // Just in case this is the last event, remember to position just once more\n pendingTimeout = setTimeout(tick, 250);\n return;\n }\n\n if (!isUndefined(lastCall) && (now() - lastCall) < 10) {\n // Some browsers call events a little too frequently, refuse to run more than is reasonable\n return;\n }\n\n if (pendingTimeout != null) {\n clearTimeout(pendingTimeout);\n pendingTimeout = null;\n }\n\n lastCall = now();\n position();\n lastDuration = now() - lastCall;\n };\n\n if (!isUndefined(window) && !isUndefined(window.addEventListener)) {\n ['resize', 'scroll', 'touchmove'].forEach((event) => {\n window.addEventListener(event, tick);\n });\n }\n})();\n\nclass TetherClass extends Evented {\n constructor(options) {\n super();\n this.position = this.position.bind(this);\n\n tethers.push(this);\n\n this.history = [];\n\n this.setOptions(options, false);\n\n TetherBase.modules.forEach((module) => {\n if (!isUndefined(module.initialize)) {\n module.initialize.call(this);\n }\n });\n\n this.position();\n }\n\n setOptions(options, pos = true) {\n const defaults = {\n offset: '0 0',\n targetOffset: '0 0',\n targetAttachment: 'auto auto',\n classPrefix: 'tether',\n bodyElement: document.body\n };\n\n this.options = extend(defaults, options);\n\n let { element, target, targetModifier, bodyElement } = this.options;\n this.element = element;\n this.target = target;\n this.targetModifier = targetModifier;\n\n if (typeof bodyElement === 'string') {\n bodyElement = document.querySelector(bodyElement);\n }\n this.bodyElement = bodyElement;\n\n if (this.target === 'viewport') {\n this.target = document.body;\n this.targetModifier = 'visible';\n } else if (this.target === 'scroll-handle') {\n this.target = document.body;\n this.targetModifier = 'scroll-handle';\n }\n\n ['element', 'target'].forEach((key) => {\n if (isUndefined(this[key])) {\n throw new Error('Tether Error: Both element and target must be defined');\n }\n\n if (!isUndefined(this[key].jquery)) {\n this[key] = this[key][0];\n } else if (isString(this[key])) {\n this[key] = document.querySelector(this[key]);\n }\n });\n\n this._addClasses();\n\n if (!this.options.attachment) {\n throw new Error('Tether Error: You must provide an attachment');\n }\n\n this.targetAttachment = parseTopLeft(this.options.targetAttachment);\n this.attachment = parseTopLeft(this.options.attachment);\n this.offset = parseTopLeft(this.options.offset);\n this.targetOffset = parseTopLeft(this.options.targetOffset);\n\n if (!isUndefined(this.scrollParents)) {\n this.disable();\n }\n\n if (this.targetModifier === 'scroll-handle') {\n this.scrollParents = [this.target];\n } else {\n this.scrollParents = getScrollParents(this.target);\n }\n\n if (!(this.options.enabled === false)) {\n this.enable(pos);\n }\n }\n\n getTargetBounds() {\n if (!isUndefined(this.targetModifier)) {\n if (this.targetModifier === 'visible') {\n return getVisibleBounds(this.bodyElement, this.target);\n } else if (this.targetModifier === 'scroll-handle') {\n return getScrollHandleBounds(this.bodyElement, this.target);\n }\n } else {\n return getBounds(this.bodyElement, this.target);\n }\n }\n\n clearCache() {\n this._cache = {};\n }\n\n cache(k, getter) {\n // More than one module will often need the same DOM info, so\n // we keep a cache which is cleared on each position call\n if (isUndefined(this._cache)) {\n this._cache = {};\n }\n\n if (isUndefined(this._cache[k])) {\n this._cache[k] = getter.call(this);\n }\n\n return this._cache[k];\n }\n\n enable(pos = true) {\n const { classes, classPrefix } = this.options;\n if (!(this.options.addTargetClasses === false)) {\n addClass(this.target, getClass('enabled', classes, classPrefix));\n }\n addClass(this.element, getClass('enabled', classes, classPrefix));\n this.enabled = true;\n\n this.scrollParents.forEach((parent) => {\n if (parent !== this.target.ownerDocument) {\n parent.addEventListener('scroll', this.position);\n }\n });\n\n if (pos) {\n this.position();\n }\n }\n\n disable() {\n const { classes, classPrefix } = this.options;\n removeClass(this.target, getClass('enabled', classes, classPrefix));\n removeClass(this.element, getClass('enabled', classes, classPrefix));\n this.enabled = false;\n\n if (!isUndefined(this.scrollParents)) {\n this.scrollParents.forEach((parent) => {\n parent.removeEventListener('scroll', this.position);\n });\n }\n }\n\n destroy() {\n this.disable();\n\n this._removeClasses();\n\n tethers.forEach((tether, i) => {\n if (tether === this) {\n tethers.splice(i, 1);\n }\n });\n\n // Remove any elements we were using for convenience from the DOM\n if (tethers.length === 0) {\n removeUtilElements(this.bodyElement);\n }\n }\n\n updateAttachClasses(elementAttach, targetAttach) {\n elementAttach = elementAttach || this.attachment;\n targetAttach = targetAttach || this.targetAttachment;\n const sides = ['left', 'top', 'bottom', 'right', 'middle', 'center'];\n const { classes, classPrefix } = this.options;\n\n if (!isUndefined(this._addAttachClasses) && this._addAttachClasses.length) {\n // updateAttachClasses can be called more than once in a position call, so\n // we need to clean up after ourselves such that when the last defer gets\n // ran it doesn't add any extra classes from previous calls.\n this._addAttachClasses.splice(0, this._addAttachClasses.length);\n }\n\n if (isUndefined(this._addAttachClasses)) {\n this._addAttachClasses = [];\n }\n this.add = this._addAttachClasses;\n\n if (elementAttach.top) {\n this.add.push(`${getClass('element-attached', classes, classPrefix)}-${elementAttach.top}`);\n }\n if (elementAttach.left) {\n this.add.push(`${getClass('element-attached', classes, classPrefix)}-${elementAttach.left}`);\n }\n if (targetAttach.top) {\n this.add.push(`${getClass('target-attached', classes, classPrefix)}-${targetAttach.top}`);\n }\n if (targetAttach.left) {\n this.add.push(`${getClass('target-attached', classes, classPrefix)}-${targetAttach.left}`);\n }\n\n this.all = [];\n sides.forEach((side) => {\n this.all.push(`${getClass('element-attached', classes, classPrefix)}-${side}`);\n this.all.push(`${getClass('target-attached', classes, classPrefix)}-${side}`);\n });\n\n defer(() => {\n if (isUndefined(this._addAttachClasses)) {\n return;\n }\n\n updateClasses(this.element, this._addAttachClasses, this.all);\n if (!(this.options.addTargetClasses === false)) {\n updateClasses(this.target, this._addAttachClasses, this.all);\n }\n\n delete this._addAttachClasses;\n });\n }\n\n position(flushChanges = true) {\n // flushChanges commits the changes immediately, leave true unless you are positioning multiple\n // tethers (in which case call Tether.Utils.flush yourself when you're done)\n\n if (!this.enabled) {\n return;\n }\n\n this.clearCache();\n\n // Turn 'auto' attachments into the appropriate corner or edge\n const targetAttachment = autoToFixedAttachment(this.targetAttachment, this.attachment);\n\n this.updateAttachClasses(this.attachment, targetAttachment);\n\n const elementPos = this.cache('element-bounds', () => {\n return getBounds(this.bodyElement, this.element);\n });\n\n let { width, height } = elementPos;\n\n if (width === 0 && height === 0 && !isUndefined(this.lastSize)) {\n // We cache the height and width to make it possible to position elements that are\n // getting hidden.\n ({ width, height } = this.lastSize);\n } else {\n this.lastSize = { width, height };\n }\n\n const targetPos = this.cache('target-bounds', () => {\n return this.getTargetBounds();\n });\n const targetSize = targetPos;\n\n // Get an actual px offset from the attachment\n let offset = offsetToPx(attachmentToOffset(this.attachment), { width, height });\n let targetOffset = offsetToPx(attachmentToOffset(targetAttachment), targetSize);\n\n const manualOffset = offsetToPx(this.offset, { width, height });\n const manualTargetOffset = offsetToPx(this.targetOffset, targetSize);\n\n // Add the manually provided offset\n offset = addOffset(offset, manualOffset);\n targetOffset = addOffset(targetOffset, manualTargetOffset);\n\n // It's now our goal to make (element position + offset) == (target position + target offset)\n let left = targetPos.left + targetOffset.left - offset.left;\n let top = targetPos.top + targetOffset.top - offset.top;\n\n for (let i = 0; i < TetherBase.modules.length; ++i) {\n const module = TetherBase.modules[i];\n const ret = module.position.call(this, {\n left,\n top,\n targetAttachment,\n targetPos,\n elementPos,\n offset,\n targetOffset,\n manualOffset,\n manualTargetOffset,\n scrollbarSize,\n attachment: this.attachment\n });\n\n if (ret === false) {\n return false;\n } else if (isUndefined(ret) || !isObject(ret)) {\n continue;\n } else {\n ({ top, left } = ret);\n }\n }\n\n // We describe the position three different ways to give the optimizer\n // a chance to decide the best possible way to position the element\n // with the fewest repaints.\n const next = {\n // It's position relative to the page (absolute positioning when\n // the element is a child of the body)\n page: {\n top,\n left\n },\n\n // It's position relative to the viewport (fixed positioning)\n viewport: {\n top: top - pageYOffset,\n bottom: pageYOffset - top - height + innerHeight,\n left: left - pageXOffset,\n right: pageXOffset - left - width + innerWidth\n }\n };\n\n let doc = this.target.ownerDocument;\n let win = doc.defaultView;\n\n let scrollbarSize;\n if (win.innerHeight > doc.documentElement.clientHeight) {\n scrollbarSize = this.cache('scrollbar-size', getScrollBarSize);\n next.viewport.bottom -= scrollbarSize.height;\n }\n\n if (win.innerWidth > doc.documentElement.clientWidth) {\n scrollbarSize = this.cache('scrollbar-size', getScrollBarSize);\n next.viewport.right -= scrollbarSize.width;\n }\n\n if (['', 'static'].indexOf(doc.body.style.position) === -1 ||\n ['', 'static'].indexOf(doc.body.parentElement.style.position) === -1) {\n // Absolute positioning in the body will be relative to the page, not the 'initial containing block'\n next.page.bottom = doc.body.scrollHeight - top - height;\n next.page.right = doc.body.scrollWidth - left - width;\n }\n\n if (!isUndefined(this.options.optimizations) &&\n this.options.optimizations.moveElement !== false &&\n isUndefined(this.targetModifier)) {\n const offsetParent = this.cache('target-offsetparent', () => getOffsetParent(this.target));\n const offsetPosition = this.cache('target-offsetparent-bounds', () => getBounds(this.bodyElement, offsetParent));\n const offsetParentStyle = getComputedStyle(offsetParent);\n const offsetParentSize = offsetPosition;\n\n const offsetBorder = {};\n ['Top', 'Left', 'Bottom', 'Right'].forEach((side) => {\n offsetBorder[side.toLowerCase()] = parseFloat(offsetParentStyle[`border${side}Width`]);\n });\n\n offsetPosition.right = doc.body.scrollWidth - offsetPosition.left - offsetParentSize.width + offsetBorder.right;\n offsetPosition.bottom = doc.body.scrollHeight - offsetPosition.top - offsetParentSize.height + offsetBorder.bottom;\n\n if (next.page.top >= (offsetPosition.top + offsetBorder.top) && next.page.bottom >= offsetPosition.bottom) {\n if (next.page.left >= (offsetPosition.left + offsetBorder.left) && next.page.right >= offsetPosition.right) {\n // We're within the visible part of the target's scroll parent\n const { scrollLeft, scrollTop } = offsetParent;\n\n // It's position relative to the target's offset parent (absolute positioning when\n // the element is moved to be a child of the target's offset parent).\n next.offset = {\n top: next.page.top - offsetPosition.top + scrollTop - offsetBorder.top,\n left: next.page.left - offsetPosition.left + scrollLeft - offsetBorder.left\n };\n }\n }\n }\n\n // We could also travel up the DOM and try each containing context, rather than only\n // looking at the body, but we're gonna get diminishing returns.\n\n this.move(next);\n\n this.history.unshift(next);\n\n if (this.history.length > 3) {\n this.history.pop();\n }\n\n if (flushChanges) {\n flush();\n }\n\n return true;\n }\n\n // THE ISSUE\n move(pos) {\n if (isUndefined(this.element.parentNode)) {\n return;\n }\n\n const same = {};\n\n for (let type in pos) {\n same[type] = {};\n\n for (let key in pos[type]) {\n let found = false;\n\n for (let i = 0; i < this.history.length; ++i) {\n const point = this.history[i];\n if (!isUndefined(point[type]) &&\n !within(point[type][key], pos[type][key])) {\n found = true;\n break;\n }\n\n }\n\n if (!found) {\n same[type][key] = true;\n }\n }\n }\n\n let css = { top: '', left: '', right: '', bottom: '' };\n\n const transcribe = (_same, _pos) => {\n const hasOptimizations = !isUndefined(this.options.optimizations);\n const gpu = hasOptimizations ? this.options.optimizations.gpu : null;\n if (gpu !== false) {\n let yPos, xPos;\n if (_same.top) {\n css.top = 0;\n yPos = _pos.top;\n } else {\n css.bottom = 0;\n yPos = -_pos.bottom;\n }\n\n if (_same.left) {\n css.left = 0;\n xPos = _pos.left;\n } else {\n css.right = 0;\n xPos = -_pos.right;\n }\n\n if (isNumber(window.devicePixelRatio) && devicePixelRatio % 1 === 0) {\n xPos = Math.round(xPos * devicePixelRatio) / devicePixelRatio;\n yPos = Math.round(yPos * devicePixelRatio) / devicePixelRatio;\n }\n\n css[transformKey] = `translateX(${xPos}px) translateY(${yPos}px)`;\n\n if (transformKey !== 'msTransform') {\n // The Z transform will keep this in the GPU (faster, and prevents artifacts),\n // but IE9 doesn't support 3d transforms and will choke.\n css[transformKey] += ' translateZ(0)';\n }\n\n } else {\n if (_same.top) {\n css.top = `${_pos.top}px`;\n } else {\n css.bottom = `${_pos.bottom}px`;\n }\n\n if (_same.left) {\n css.left = `${_pos.left}px`;\n } else {\n css.right = `${_pos.right}px`;\n }\n }\n };\n\n const hasOptimizations = !isUndefined(this.options.optimizations);\n let allowPositionFixed = true;\n\n if (hasOptimizations && this.options.optimizations.allowPositionFixed === false) {\n allowPositionFixed = false;\n }\n\n let moved = false;\n if ((same.page.top || same.page.bottom) && (same.page.left || same.page.right)) {\n css.position = 'absolute';\n transcribe(same.page, pos.page);\n\n } else if (allowPositionFixed && (same.viewport.top || same.viewport.bottom) && (same.viewport.left || same.viewport.right)) {\n css.position = 'fixed';\n transcribe(same.viewport, pos.viewport);\n } else if (!isUndefined(same.offset) && same.offset.top && same.offset.left) {\n css.position = 'absolute';\n const offsetParent = this.cache('target-offsetparent', () => getOffsetParent(this.target));\n\n if (getOffsetParent(this.element) !== offsetParent) {\n defer(() => {\n this.element.parentNode.removeChild(this.element);\n offsetParent.appendChild(this.element);\n });\n }\n\n transcribe(same.offset, pos.offset);\n moved = true;\n\n } else {\n css.position = 'absolute';\n transcribe({ top: true, left: true }, pos.page);\n }\n\n if (!moved) {\n if (this.options.bodyElement) {\n if (this.element.parentNode !== this.options.bodyElement) {\n this.options.bodyElement.appendChild(this.element);\n }\n } else {\n let offsetParentIsBody = true;\n\n let currentNode = this.element.parentNode;\n while (currentNode && currentNode.nodeType === 1 && currentNode.tagName !== 'BODY' && !isFullscreenElement(currentNode)) {\n if (getComputedStyle(currentNode).position !== 'static') {\n offsetParentIsBody = false;\n break;\n }\n\n currentNode = currentNode.parentNode;\n }\n\n if (!offsetParentIsBody) {\n this.element.parentNode.removeChild(this.element);\n this.element.ownerDocument.body.appendChild(this.element);\n }\n }\n }\n\n // Any css change will trigger a repaint, so let's avoid one if nothing changed\n const writeCSS = {};\n let write = false;\n for (let key in css) {\n let val = css[key];\n let elVal = this.element.style[key];\n\n if (elVal !== val) {\n write = true;\n writeCSS[key] = val;\n }\n }\n\n if (write) {\n defer(() => {\n extend(this.element.style, writeCSS);\n this.trigger('repositioned');\n });\n }\n }\n\n _addClasses() {\n const { classes, classPrefix } = this.options;\n addClass(this.element, getClass('element', classes, classPrefix));\n if (!(this.options.addTargetClasses === false)) {\n addClass(this.target, getClass('target', classes, classPrefix));\n }\n }\n\n _removeClasses() {\n const { classes, classPrefix } = this.options;\n removeClass(this.element, getClass('element', classes, classPrefix));\n if (!(this.options.addTargetClasses === false)) {\n removeClass(this.target, getClass('target', classes, classPrefix));\n }\n\n this.all.forEach((className) => {\n this.element.classList.remove(className);\n this.target.classList.remove(className);\n });\n }\n}\n\nTetherClass.modules = [];\n\nTetherBase.position = position;\n\nlet Tether = extend(TetherClass, TetherBase);\n\nTether.modules.push({\n initialize() {\n const { classes, classPrefix } = this.options;\n this.markers = {};\n\n ['target', 'element'].forEach((type) => {\n const el = document.createElement('div');\n el.className = getClass(`${type}-marker`, classes, classPrefix);\n\n const dot = document.createElement('div');\n dot.className = getClass('marker-dot', classes, classPrefix);\n el.appendChild(dot);\n\n this[type].appendChild(el);\n\n this.markers[type] = { dot, el };\n });\n },\n\n position({ manualOffset, manualTargetOffset }) {\n const offsets = {\n element: manualOffset,\n target: manualTargetOffset\n };\n\n for (let type in offsets) {\n const offset = offsets[type];\n for (let side in offset) {\n let val = offset[side];\n if (!isString(val) ||\n val.indexOf('%') === -1 &&\n val.indexOf('px') === -1) {\n val += 'px';\n }\n\n if (this.markers[type].dot.style[side] !== val) {\n this.markers[type].dot.style[side] = val;\n }\n }\n }\n\n return true;\n }\n});\n\nexport default Tether;\n"],"names":["isFunction","value","isNumber","isObject","isString","isUndefined","undefined","addClass","el","name","split","forEach","cls","trim","classList","add","getClass","key","classes","classPrefix","removeClass","remove","updateClasses","all","indexOf","contains","deferred","defer","fn","push","flush","pop","_scrollBarSize","extend","out","args","Array","prototype","apply","arguments","slice","obj","hasOwnProperty","call","getScrollBarSize","inner","document","createElement","style","width","height","outer","position","top","left","pointerEvents","visibility","overflow","appendChild","body","widthContained","offsetWidth","widthScroll","clientWidth","removeChild","uniqueId","id","zeroPosCache","zeroElement","getBounds","doc","documentElement","ownerDocument","docEl","box","_getActualBoundingClientRect","origin","_getOrigin","scrollWidth","right","scrollHeight","bottom","clientTop","clientLeft","clientHeight","getScrollHandleBounds","target","bounds","targetScrollTop","scrollTop","targetIsBody","pageXOffset","pageYOffset","innerHeight","innerWidth","getComputedStyle","hasBottomScroll","overflowX","scrollBottom","parseFloat","borderTopWidth","borderBottomWidth","borderLeftWidth","fitAdj","Math","pow","max","scrollPercentage","getVisibleBounds","min","removeUtilElements","node","boundingRect","getBoundingClientRect","rect","k","frameElement","defaultView","frameRect","err","setAttribute","getAttribute","cache","element","targetPos","getTargetBounds","abutted","side","targetPosSide","sides","options","length","addTargetClasses","BOUNDS_FORMAT","getBoundingRect","tether","to","scrollParents","nodeType","size","pos","win","i","toUpperCase","substr","_addOutOfBoundsClass","oob","addClasses","outOfBoundsClass","oobClass","_calculateOOBAndPinnedLeft","pin","pinned","_calculateOOBAndPinnedTop","_flipXTogether","tAttachment","eAttachment","targetWidth","_flipYTogether","targetHeight","_getAllClasses","constraints","allClasses","constraint","pinnedClass","targetAttachment","bodyElement","lastSize","targetSize","attachment","changeAttachX","changeAttachY","map","p","updateAttachClasses","trigger","shift","shiftTop","shiftLeft","Evented","on","event","handler","ctx","once","bindings","off","binding","index","splice","context","MIRROR_LR","center","MIRROR_TB","middle","OFFSET_MAP","addOffset","offsets","attachmentToOffset","autoToFixedAttachment","relativeToAttachment","offsetToPx","offset","parseTopLeft","getScrollParents","computedStyle","parents","parent","parentNode","overflowY","test","getOffsetParent","offsetParent","TetherBase","modules","Constraint","Abutment","Shift","isFullscreenElement","e","d","fe","fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement","within","a","b","diff","transformKey","transforms","tethers","now","performance","lastCall","lastDuration","pendingTimeout","tick","setTimeout","clearTimeout","window","addEventListener","TetherClass","bind","history","setOptions","module","initialize","defaults","targetOffset","targetModifier","querySelector","Error","jquery","_addClasses","disable","enabled","enable","clearCache","_cache","getter","removeEventListener","destroy","_removeClasses","elementAttach","targetAttach","_addAttachClasses","flushChanges","elementPos","manualOffset","manualTargetOffset","ret","scrollbarSize","next","page","viewport","parentElement","optimizations","moveElement","offsetPosition","offsetParentStyle","offsetParentSize","offsetBorder","toLowerCase","scrollLeft","move","unshift","same","type","found","point","css","transcribe","_same","_pos","hasOptimizations","gpu","yPos","xPos","devicePixelRatio","round","allowPositionFixed","moved","offsetParentIsBody","currentNode","tagName","writeCSS","write","val","elVal","className","Tether","markers","dot"],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;AAIO,SAASA,UAAT,CAAoBC,KAApB,EAA2B;SACzB,OAAOA,KAAP,KAAiB,UAAxB;;;;;;;AAOK,SAASC,QAAT,CAAkBD,KAAlB,EAAyB;SACvB,OAAOA,KAAP,KAAiB,QAAxB;;;;;;;AAOK,SAASE,QAAT,CAAkBF,KAAlB,EAAyB;SACvB,OAAOA,KAAP,KAAiB,QAAxB;;;;;;;AAOK,SAASG,QAAT,CAAkBH,KAAlB,EAAyB;SACvB,OAAOA,KAAP,KAAiB,QAAxB;;;;;;;AAOK,SAASI,WAAT,CAAqBJ,KAArB,EAA4B;SAC1BA,KAAK,KAAKK,SAAjB;;;ACnCK,SAASC,QAAT,CAAkBC,EAAlB,EAAsBC,IAAtB,EAA4B;EACjCA,IAAI,CAACC,KAAL,CAAW,GAAX,EAAgBC,OAAhB,CAAwB,UAACC,GAAD,EAAS;QAC3BA,GAAG,CAACC,IAAJ,EAAJ,EAAgB;MACdL,EAAE,CAAC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