diff --git a/public/css/blue-twilight.css b/public/css/blue-twilight.css
index de81224..a804ca7 100644
--- a/public/css/blue-twilight.css
+++ b/public/css/blue-twilight.css
@@ -7,11 +7,6 @@
margin-top: 5px;
}
-.card-header.card-danger {
- color: #fff;
- font-weight: bold;
-}
-
.photo .loading {
background-color: #ffffff;
display: none;
@@ -28,6 +23,18 @@
.photo .loading img {
margin-top: 40px;
}
+.album-slideshow-container #image-preview {
+ height: 600px;
+ max-width: 100%;
+ width: 800px;
+}
+
+.album-slideshow-container .thumbnails {
+ overflow-x: scroll;
+ overflow-y: hidden;
+ white-space: nowrap;
+ width: auto;
+}
html {
font-size: 14px !important;
}
diff --git a/public/css/blue-twilight.min.css b/public/css/blue-twilight.min.css
index 16aa57a..85724dc 100644
--- a/public/css/blue-twilight.min.css
+++ b/public/css/blue-twilight.min.css
@@ -1,4 +1,4 @@
-.admin-sidebar-card{margin-bottom:15px}.album-expand-handle{cursor:pointer;margin-top:5px}.card-header.card-danger{color:#fff;font-weight:bold}.photo .loading{background-color:#fff;display:none;height:100%;left:0;opacity:.8;position:absolute;text-align:center;top:0;width:100%;z-index:1000}.photo .loading img{margin-top:40px}html{font-size:14px !important}button,input,optgroup,select,textarea{cursor:pointer;font-family:inherit !important}.album-photo-cards .card{margin-bottom:15px}.container,.container-fluid{margin-top:20px}.hidden{display:none}.tab-content{border:solid 1px #ddd;border-top:0;padding:20px}.tether-element,.tether-element:after,.tether-element:before,.tether-element *,.tether-element *:after,.tether-element *:before{box-sizing:border-box}.tether-element{position:absolute;display:none}.tether-element.tether-open{display:block}.tether-element.tether-theme-basic{max-width:100%;max-height:100%}.tether-element.tether-theme-basic .tether-content{border-radius:5px;box-shadow:0 2px 8px rgba(0,0,0,0.2);font-family:inherit;background:#fff;color:inherit;padding:1em;font-size:1.1em;line-height:1.5em}.tether-element,.tether-element:after,.tether-element:before,.tether-element *,.tether-element *:after,.tether-element *:before{box-sizing:border-box}.tether-element{position:absolute;display:none}.tether-element.tether-open{display:block}.tt-query{-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.tt-hint{color:#999}.tt-menu{width:422px;margin-top:4px;padding:4px 0;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.tt-suggestion{padding:3px 20px;line-height:24px}.tt-suggestion.tt-cursor,.tt-suggestion:hover{color:#fff;background-color:#0097cf}.tt-suggestion p{margin:0}/*!
+.admin-sidebar-card{margin-bottom:15px}.album-expand-handle{cursor:pointer;margin-top:5px}.photo .loading{background-color:#fff;display:none;height:100%;left:0;opacity:.8;position:absolute;text-align:center;top:0;width:100%;z-index:1000}.photo .loading img{margin-top:40px}.album-slideshow-container #image-preview{height:600px;max-width:100%;width:800px}.album-slideshow-container .thumbnails{overflow-x:scroll;overflow-y:hidden;white-space:nowrap;width:auto}html{font-size:14px !important}button,input,optgroup,select,textarea{cursor:pointer;font-family:inherit !important}.album-photo-cards .card{margin-bottom:15px}.container,.container-fluid{margin-top:20px}.hidden{display:none}.tab-content{border:solid 1px #ddd;border-top:0;padding:20px}.tether-element,.tether-element:after,.tether-element:before,.tether-element *,.tether-element *:after,.tether-element *:before{box-sizing:border-box}.tether-element{position:absolute;display:none}.tether-element.tether-open{display:block}.tether-element.tether-theme-basic{max-width:100%;max-height:100%}.tether-element.tether-theme-basic .tether-content{border-radius:5px;box-shadow:0 2px 8px rgba(0,0,0,0.2);font-family:inherit;background:#fff;color:inherit;padding:1em;font-size:1.1em;line-height:1.5em}.tether-element,.tether-element:after,.tether-element:before,.tether-element *,.tether-element *:after,.tether-element *:before{box-sizing:border-box}.tether-element{position:absolute;display:none}.tether-element.tether-open{display:block}.tt-query{-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.tt-hint{color:#999}.tt-menu{width:422px;margin-top:4px;padding:4px 0;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.tt-suggestion{padding:3px 20px;line-height:24px}.tt-suggestion.tt-cursor,.tt-suggestion:hover{color:#fff;background-color:#0097cf}.tt-suggestion p{margin:0}/*!
* Bootstrap v4.0.0-beta (https://getbootstrap.com)
* Copyright 2011-2017 The Bootstrap Authors
* Copyright 2011-2017 Twitter, Inc.
diff --git a/public/js/blue-twilight.js b/public/js/blue-twilight.js
index 59f4ea3..ec1ee13 100644
--- a/public/js/blue-twilight.js
+++ b/public/js/blue-twilight.js
@@ -10283,7 +10283,7 @@ return jQuery;
"",
header:
"
",
footer:
"",
@@ -10866,7 +10866,7 @@ return jQuery;
var closeButton = $(templates.closeButton);
if (options.title) {
- dialog.find(".modal-header").prepend(closeButton);
+ dialog.find(".modal-header").append(closeButton);
} else {
closeButton.css("margin-top", "-10px").prependTo(body);
}
@@ -22656,9 +22656,6 @@ function EditPhotosViewModel(album_id, language, urls) {
// Save the photo ID
this.photoIDs = [];
this.photoIDs.push(photo_id);
-
- // Hide the dropdown
- $(link_item).dropdown('toggle');
},
switchToUploadTab: function (e) {
$('.nav-tabs a[href="#upload-tab"]').tab('show');
@@ -25363,7 +25360,13 @@ function StorageLocationViewModel()
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-const nativeHints = ['native code', '[object MutationObserverConstructor]'];
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+ typeof define === 'function' && define.amd ? define(factory) :
+ (global.Popper = factory());
+}(this, (function () { 'use strict';
+
+var nativeHints = ['native code', '[object MutationObserverConstructor]'];
/**
* Determine if a function is implemented natively (as opposed to a polyfill).
@@ -25372,12 +25375,16 @@ const nativeHints = ['native code', '[object MutationObserverConstructor]'];
* @argument {Function | undefined} fn the function to check
* @returns {Boolean}
*/
-var isNative = (fn => nativeHints.some(hint => (fn || '').toString().indexOf(hint) > -1));
+var isNative = (function (fn) {
+ return nativeHints.some(function (hint) {
+ return (fn || '').toString().indexOf(hint) > -1;
+ });
+});
-const isBrowser = typeof window !== 'undefined';
-const longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
-let timeoutDuration = 0;
-for (let i = 0; i < longerTimeoutBrowsers.length; i += 1) {
+var isBrowser = typeof window !== 'undefined';
+var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
+var timeoutDuration = 0;
+for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {
if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {
timeoutDuration = 1;
break;
@@ -25385,21 +25392,21 @@ for (let i = 0; i < longerTimeoutBrowsers.length; i += 1) {
}
function microtaskDebounce(fn) {
- let scheduled = false;
- let i = 0;
- const elem = document.createElement('span');
+ var scheduled = false;
+ var i = 0;
+ var elem = document.createElement('span');
// MutationObserver provides a mechanism for scheduling microtasks, which
// are scheduled *before* the next task. This gives us a way to debounce
// a function but ensure it's called *before* the next paint.
- const observer = new MutationObserver(() => {
+ var observer = new MutationObserver(function () {
fn();
scheduled = false;
});
observer.observe(elem, { attributes: true });
- return () => {
+ return function () {
if (!scheduled) {
scheduled = true;
elem.setAttribute('x-index', i);
@@ -25409,11 +25416,11 @@ function microtaskDebounce(fn) {
}
function taskDebounce(fn) {
- let scheduled = false;
- return () => {
+ var scheduled = false;
+ return function () {
if (!scheduled) {
scheduled = true;
- setTimeout(() => {
+ setTimeout(function () {
scheduled = false;
fn();
}, timeoutDuration);
@@ -25425,7 +25432,7 @@ function taskDebounce(fn) {
// these rely on Mutation Events which only occur when an element is connected
// to the DOM. The algorithm used in this module does not use a connected element,
// and so we must ensure that a *native* MutationObserver is available.
-const supportsNativeMutationObserver = isBrowser && isNative(window.MutationObserver);
+var supportsNativeMutationObserver = isBrowser && isNative(window.MutationObserver);
/**
* Create a debounced version of a method, that's asynchronously deferred
@@ -25446,7 +25453,7 @@ var debounce = supportsNativeMutationObserver ? microtaskDebounce : taskDebounce
* @returns {Boolean} answer to: is a function?
*/
function isFunction(functionToCheck) {
- const getType = {};
+ var getType = {};
return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
}
@@ -25462,7 +25469,7 @@ function getStyleComputedProperty(element, property) {
return [];
}
// NOTE: 1 DOM access here
- const css = window.getComputedStyle(element, null);
+ var css = window.getComputedStyle(element, null);
return property ? css[property] : css;
}
@@ -25494,7 +25501,12 @@ function getScrollParent(element) {
}
// Firefox want us to check `-x` and `-y` variations as well
- const { overflow, overflowX, overflowY } = getStyleComputedProperty(element);
+
+ var _getStyleComputedProp = getStyleComputedProperty(element),
+ overflow = _getStyleComputedProp.overflow,
+ overflowX = _getStyleComputedProp.overflowX,
+ overflowY = _getStyleComputedProp.overflowY;
+
if (/(auto|scroll)/.test(overflow + overflowY + overflowX)) {
return element;
}
@@ -25511,8 +25523,8 @@ function getScrollParent(element) {
*/
function getOffsetParent(element) {
// NOTE: 1 DOM access here
- const offsetParent = element && element.offsetParent;
- const nodeName = offsetParent && offsetParent.nodeName;
+ var offsetParent = element && element.offsetParent;
+ var nodeName = offsetParent && offsetParent.nodeName;
if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {
return window.document.documentElement;
@@ -25528,7 +25540,8 @@ function getOffsetParent(element) {
}
function isOffsetContainer(element) {
- const { nodeName } = element;
+ var nodeName = element.nodeName;
+
if (nodeName === 'BODY') {
return false;
}
@@ -25565,17 +25578,18 @@ function findCommonOffsetParent(element1, element2) {
}
// Here we make sure to give as "start" the element that comes first in the DOM
- const order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;
- const start = order ? element1 : element2;
- const end = order ? element2 : element1;
+ var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;
+ var start = order ? element1 : element2;
+ var end = order ? element2 : element1;
// Get common ancestor container
- const range = document.createRange();
+ var range = document.createRange();
range.setStart(start, 0);
range.setEnd(end, 0);
- const { commonAncestorContainer } = range;
+ var commonAncestorContainer = range.commonAncestorContainer;
// Both nodes are inside #document
+
if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {
if (isOffsetContainer(commonAncestorContainer)) {
return commonAncestorContainer;
@@ -25585,7 +25599,7 @@ function findCommonOffsetParent(element1, element2) {
}
// one of the nodes is inside shadowDOM, find which one
- const element1root = getRoot(element1);
+ var element1root = getRoot(element1);
if (element1root.host) {
return findCommonOffsetParent(element1root.host, element2);
} else {
@@ -25601,13 +25615,15 @@ function findCommonOffsetParent(element1, element2) {
* @argument {String} side `top` or `left`
* @returns {number} amount of scrolled pixels
*/
-function getScroll(element, side = 'top') {
- const upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';
- const nodeName = element.nodeName;
+function getScroll(element) {
+ var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';
+
+ var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';
+ var nodeName = element.nodeName;
if (nodeName === 'BODY' || nodeName === 'HTML') {
- const html = window.document.documentElement;
- const scrollingElement = window.document.scrollingElement || html;
+ var html = window.document.documentElement;
+ var scrollingElement = window.document.scrollingElement || html;
return scrollingElement[upperSide];
}
@@ -25623,10 +25639,12 @@ function getScroll(element, side = 'top') {
* @param {Boolean} subtract - set to true if you want to subtract the scroll values
* @return {Object} rect - The modifier rect object
*/
-function includeScroll(rect, element, subtract = false) {
- const scrollTop = getScroll(element, 'top');
- const scrollLeft = getScroll(element, 'left');
- const modifier = subtract ? -1 : 1;
+function includeScroll(rect, element) {
+ var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+
+ var scrollTop = getScroll(element, 'top');
+ var scrollLeft = getScroll(element, 'left');
+ var modifier = subtract ? -1 : 1;
rect.top += scrollTop * modifier;
rect.bottom += scrollTop * modifier;
rect.left += scrollLeft * modifier;
@@ -25645,10 +25663,10 @@ function includeScroll(rect, element, subtract = false) {
*/
function getBordersSize(styles, axis) {
- const sideA = axis === 'x' ? 'Left' : 'Top';
- const sideB = sideA === 'Left' ? 'Right' : 'Bottom';
+ var sideA = axis === 'x' ? 'Left' : 'Top';
+ var sideB = sideA === 'Left' ? 'Right' : 'Bottom';
- return +styles[`border${sideA}Width`].split('px')[0] + +styles[`border${sideB}Width`].split('px')[0];
+ return +styles['border' + sideA + 'Width'].split('px')[0] + +styles['border' + sideB + 'Width'].split('px')[0];
}
/**
@@ -25657,7 +25675,7 @@ function getBordersSize(styles, axis) {
* @memberof Popper.Utils
* @returns {Boolean} isIE10
*/
-let isIE10 = undefined;
+var isIE10 = undefined;
var isIE10$1 = function () {
if (isIE10 === undefined) {
@@ -25667,13 +25685,13 @@ var isIE10$1 = function () {
};
function getSize(axis, body, html, computedStyle) {
- return Math.max(body[`offset${axis}`], body[`scroll${axis}`], html[`client${axis}`], html[`offset${axis}`], html[`scroll${axis}`], isIE10$1() ? html[`offset${axis}`] + computedStyle[`margin${axis === 'Height' ? 'Top' : 'Left'}`] + computedStyle[`margin${axis === 'Height' ? 'Bottom' : 'Right'}`] : 0);
+ return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE10$1() ? html['offset' + axis] + computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')] + computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')] : 0);
}
function getWindowSizes() {
- const body = window.document.body;
- const html = window.document.documentElement;
- const computedStyle = isIE10$1() && window.getComputedStyle(html);
+ var body = window.document.body;
+ var html = window.document.documentElement;
+ var computedStyle = isIE10$1() && window.getComputedStyle(html);
return {
height: getSize('Height', body, html, computedStyle),
@@ -25681,6 +25699,49 @@ function getWindowSizes() {
};
}
+var classCallCheck = function (instance, Constructor) {
+ if (!(instance instanceof Constructor)) {
+ throw new TypeError("Cannot call a class as a function");
+ }
+};
+
+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;
+ };
+}();
+
+
+
+
+
+var defineProperty = function (obj, key, value) {
+ if (key in obj) {
+ Object.defineProperty(obj, key, {
+ value: value,
+ enumerable: true,
+ configurable: true,
+ writable: true
+ });
+ } else {
+ obj[key] = value;
+ }
+
+ return obj;
+};
+
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
@@ -25717,7 +25778,7 @@ function getClientRect(offsets) {
* @return {Object} client rect
*/
function getBoundingClientRect(element) {
- let rect = {};
+ var rect = {};
// IE10 10 FIX: Please, don't ask, the element isn't
// considered in DOM in some circumstances...
@@ -25725,8 +25786,8 @@ function getBoundingClientRect(element) {
if (isIE10$1()) {
try {
rect = element.getBoundingClientRect();
- const scrollTop = getScroll(element, 'top');
- const scrollLeft = getScroll(element, 'left');
+ var scrollTop = getScroll(element, 'top');
+ var scrollLeft = getScroll(element, 'left');
rect.top += scrollTop;
rect.left += scrollLeft;
rect.bottom += scrollTop;
@@ -25736,7 +25797,7 @@ function getBoundingClientRect(element) {
rect = element.getBoundingClientRect();
}
- const result = {
+ var result = {
left: rect.left,
top: rect.top,
width: rect.right - rect.left,
@@ -25744,17 +25805,17 @@ function getBoundingClientRect(element) {
};
// subtract scrollbar size from sizes
- const sizes = element.nodeName === 'HTML' ? getWindowSizes() : {};
- const width = sizes.width || element.clientWidth || result.right - result.left;
- const height = sizes.height || element.clientHeight || result.bottom - result.top;
+ var sizes = element.nodeName === 'HTML' ? getWindowSizes() : {};
+ var width = sizes.width || element.clientWidth || result.right - result.left;
+ var height = sizes.height || element.clientHeight || result.bottom - result.top;
- let horizScrollbar = element.offsetWidth - width;
- let vertScrollbar = element.offsetHeight - height;
+ var horizScrollbar = element.offsetWidth - width;
+ var vertScrollbar = element.offsetHeight - height;
// if an hypothetical scrollbar is detected, we must be sure it's not a `border`
// we make this check conditional for performance reasons
if (horizScrollbar || vertScrollbar) {
- const styles = getStyleComputedProperty(element);
+ var styles = getStyleComputedProperty(element);
horizScrollbar -= getBordersSize(styles, 'x');
vertScrollbar -= getBordersSize(styles, 'y');
@@ -25766,17 +25827,17 @@ function getBoundingClientRect(element) {
}
function getOffsetRectRelativeToArbitraryNode(children, parent) {
- const isIE10 = isIE10$1();
- const isHTML = parent.nodeName === 'HTML';
- const childrenRect = getBoundingClientRect(children);
- const parentRect = getBoundingClientRect(parent);
- const scrollParent = getScrollParent(children);
+ var isIE10 = isIE10$1();
+ var isHTML = parent.nodeName === 'HTML';
+ var childrenRect = getBoundingClientRect(children);
+ var parentRect = getBoundingClientRect(parent);
+ var scrollParent = getScrollParent(children);
- const styles = getStyleComputedProperty(parent);
- const borderTopWidth = +styles.borderTopWidth.split('px')[0];
- const borderLeftWidth = +styles.borderLeftWidth.split('px')[0];
+ var styles = getStyleComputedProperty(parent);
+ var borderTopWidth = +styles.borderTopWidth.split('px')[0];
+ var borderLeftWidth = +styles.borderLeftWidth.split('px')[0];
- let offsets = getClientRect({
+ var offsets = getClientRect({
top: childrenRect.top - parentRect.top - borderTopWidth,
left: childrenRect.left - parentRect.left - borderLeftWidth,
width: childrenRect.width,
@@ -25790,8 +25851,8 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) {
// differently when margins are applied to it. The margins are included in
// the box of the documentElement, in the other cases not.
if (!isIE10 && isHTML) {
- const marginTop = +styles.marginTop.split('px')[0];
- const marginLeft = +styles.marginLeft.split('px')[0];
+ var marginTop = +styles.marginTop.split('px')[0];
+ var marginLeft = +styles.marginLeft.split('px')[0];
offsets.top -= borderTopWidth - marginTop;
offsets.bottom -= borderTopWidth - marginTop;
@@ -25811,19 +25872,19 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) {
}
function getViewportOffsetRectRelativeToArtbitraryNode(element) {
- const html = window.document.documentElement;
- const relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);
- const width = Math.max(html.clientWidth, window.innerWidth || 0);
- const height = Math.max(html.clientHeight, window.innerHeight || 0);
+ var html = window.document.documentElement;
+ var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);
+ var width = Math.max(html.clientWidth, window.innerWidth || 0);
+ var height = Math.max(html.clientHeight, window.innerHeight || 0);
- const scrollTop = getScroll(html);
- const scrollLeft = getScroll(html, 'left');
+ var scrollTop = getScroll(html);
+ var scrollLeft = getScroll(html, 'left');
- const offset = {
+ var offset = {
top: scrollTop - relativeOffset.top + relativeOffset.marginTop,
left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,
- width,
- height
+ width: width,
+ height: height
};
return getClientRect(offset);
@@ -25838,7 +25899,7 @@ function getViewportOffsetRectRelativeToArtbitraryNode(element) {
* @returns {Boolean} answer to "isFixed?"
*/
function isFixed(element) {
- const nodeName = element.nodeName;
+ var nodeName = element.nodeName;
if (nodeName === 'BODY' || nodeName === 'HTML') {
return false;
}
@@ -25860,15 +25921,15 @@ function isFixed(element) {
*/
function getBoundaries(popper, reference, padding, boundariesElement) {
// NOTE: 1 DOM access here
- let boundaries = { top: 0, left: 0 };
- const offsetParent = findCommonOffsetParent(popper, reference);
+ var boundaries = { top: 0, left: 0 };
+ var offsetParent = findCommonOffsetParent(popper, reference);
// Handle viewport case
if (boundariesElement === 'viewport') {
boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent);
} else {
// Handle other cases based on DOM element used as boundaries
- let boundariesNode;
+ var boundariesNode = void 0;
if (boundariesElement === 'scrollParent') {
boundariesNode = getScrollParent(getParentNode(popper));
if (boundariesNode.nodeName === 'BODY') {
@@ -25880,11 +25941,14 @@ function getBoundaries(popper, reference, padding, boundariesElement) {
boundariesNode = boundariesElement;
}
- const offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent);
+ var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent);
// In case of HTML, we need a different computation
if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {
- const { height, width } = getWindowSizes();
+ var _getWindowSizes = getWindowSizes(),
+ height = _getWindowSizes.height,
+ width = _getWindowSizes.width;
+
boundaries.top += offsets.top - offsets.marginTop;
boundaries.bottom = height + offsets.top;
boundaries.left += offsets.left - offsets.marginLeft;
@@ -25904,7 +25968,10 @@ function getBoundaries(popper, reference, padding, boundariesElement) {
return boundaries;
}
-function getArea({ width, height }) {
+function getArea(_ref) {
+ var width = _ref.width,
+ height = _ref.height;
+
return width * height;
}
@@ -25917,14 +25984,16 @@ function getArea({ width, height }) {
* @argument {Object} options - Modifiers configuration and options
* @returns {Object} The data object, properly modified
*/
-function computeAutoPlacement(placement, refRect, popper, reference, boundariesElement, padding = 0) {
+function computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {
+ var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
+
if (placement.indexOf('auto') === -1) {
return placement;
}
- const boundaries = getBoundaries(popper, reference, padding, boundariesElement);
+ var boundaries = getBoundaries(popper, reference, padding, boundariesElement);
- const rects = {
+ var rects = {
top: {
width: boundaries.width,
height: refRect.top - boundaries.top
@@ -25943,19 +26012,27 @@ function computeAutoPlacement(placement, refRect, popper, reference, boundariesE
}
};
- const sortedAreas = Object.keys(rects).map(key => _extends({
- key
- }, rects[key], {
- area: getArea(rects[key])
- })).sort((a, b) => b.area - a.area);
+ var sortedAreas = Object.keys(rects).map(function (key) {
+ return _extends({
+ key: key
+ }, rects[key], {
+ area: getArea(rects[key])
+ });
+ }).sort(function (a, b) {
+ return b.area - a.area;
+ });
- const filteredAreas = sortedAreas.filter(({ width, height }) => width >= popper.clientWidth && height >= popper.clientHeight);
+ var filteredAreas = sortedAreas.filter(function (_ref2) {
+ var width = _ref2.width,
+ height = _ref2.height;
+ return width >= popper.clientWidth && height >= popper.clientHeight;
+ });
- const computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;
+ var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;
- const variation = placement.split('-')[1];
+ var variation = placement.split('-')[1];
- return computedPlacement + (variation ? `-${variation}` : '');
+ return computedPlacement + (variation ? '-' + variation : '');
}
/**
@@ -25968,7 +26045,7 @@ function computeAutoPlacement(placement, refRect, popper, reference, boundariesE
* @returns {Object} An object containing the offsets which will be applied to the popper
*/
function getReferenceOffsets(state, popper, reference) {
- const commonOffsetParent = findCommonOffsetParent(popper, reference);
+ var commonOffsetParent = findCommonOffsetParent(popper, reference);
return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent);
}
@@ -25980,10 +26057,10 @@ function getReferenceOffsets(state, popper, reference) {
* @returns {Object} object containing width and height properties
*/
function getOuterSizes(element) {
- const styles = window.getComputedStyle(element);
- const x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
- const y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);
- const result = {
+ var styles = window.getComputedStyle(element);
+ var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
+ var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);
+ var result = {
width: element.offsetWidth + y,
height: element.offsetHeight + x
};
@@ -25998,8 +26075,10 @@ function getOuterSizes(element) {
* @returns {String} flipped placement
*/
function getOppositePlacement(placement) {
- const hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
- return placement.replace(/left|right|bottom|top/g, matched => hash[matched]);
+ var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
+ return placement.replace(/left|right|bottom|top/g, function (matched) {
+ return hash[matched];
+ });
}
/**
@@ -26016,20 +26095,20 @@ function getPopperOffsets(popper, referenceOffsets, placement) {
placement = placement.split('-')[0];
// Get popper node sizes
- const popperRect = getOuterSizes(popper);
+ var popperRect = getOuterSizes(popper);
// Add position, width and height to our offsets object
- const popperOffsets = {
+ var popperOffsets = {
width: popperRect.width,
height: popperRect.height
};
// depending by the popper placement we have to compute its offsets slightly differently
- const isHoriz = ['right', 'left'].indexOf(placement) !== -1;
- const mainSide = isHoriz ? 'top' : 'left';
- const secondarySide = isHoriz ? 'left' : 'top';
- const measurement = isHoriz ? 'height' : 'width';
- const secondaryMeasurement = !isHoriz ? 'height' : 'width';
+ var isHoriz = ['right', 'left'].indexOf(placement) !== -1;
+ var mainSide = isHoriz ? 'top' : 'left';
+ var secondarySide = isHoriz ? 'left' : 'top';
+ var measurement = isHoriz ? 'height' : 'width';
+ var secondaryMeasurement = !isHoriz ? 'height' : 'width';
popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;
if (placement === secondarySide) {
@@ -26072,11 +26151,15 @@ function find(arr, check) {
function findIndex(arr, prop, value) {
// use native findIndex if supported
if (Array.prototype.findIndex) {
- return arr.findIndex(cur => cur[prop] === value);
+ return arr.findIndex(function (cur) {
+ return cur[prop] === value;
+ });
}
// use `find` + `indexOf` if `findIndex` isn't supported
- const match = find(arr, obj => obj[prop] === value);
+ var match = find(arr, function (obj) {
+ return obj[prop] === value;
+ });
return arr.indexOf(match);
}
@@ -26091,13 +26174,13 @@ function findIndex(arr, prop, value) {
* @returns {dataObject}
*/
function runModifiers(modifiers, data, ends) {
- const modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));
+ var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));
- modifiersToRun.forEach(modifier => {
+ modifiersToRun.forEach(function (modifier) {
if (modifier.function) {
console.warn('`modifier.function` is deprecated, use `modifier.fn`!');
}
- const fn = modifier.function || modifier.fn;
+ var fn = modifier.function || modifier.fn;
if (modifier.enabled && isFunction(fn)) {
// Add properties to offsets to make them a complete clientRect object
// we do this before each modifier to make sure the previous one doesn't
@@ -26125,7 +26208,7 @@ function update() {
return;
}
- let data = {
+ var data = {
instance: this,
styles: {},
arrowStyles: {},
@@ -26169,7 +26252,11 @@ function update() {
* @returns {Boolean}
*/
function isModifierEnabled(modifiers, modifierName) {
- return modifiers.some(({ name, enabled }) => enabled && name === modifierName);
+ return modifiers.some(function (_ref) {
+ var name = _ref.name,
+ enabled = _ref.enabled;
+ return enabled && name === modifierName;
+ });
}
/**
@@ -26180,12 +26267,12 @@ function isModifierEnabled(modifiers, modifierName) {
* @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)
*/
function getSupportedPropertyName(property) {
- const prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];
- const upperProp = property.charAt(0).toUpperCase() + property.slice(1);
+ var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];
+ var upperProp = property.charAt(0).toUpperCase() + property.slice(1);
- for (let i = 0; i < prefixes.length - 1; i++) {
- const prefix = prefixes[i];
- const toCheck = prefix ? `${prefix}${upperProp}` : property;
+ for (var i = 0; i < prefixes.length - 1; i++) {
+ var prefix = prefixes[i];
+ var toCheck = prefix ? '' + prefix + upperProp : property;
if (typeof window.document.body.style[toCheck] !== 'undefined') {
return toCheck;
}
@@ -26221,8 +26308,8 @@ function destroy() {
}
function attachToScrollParents(scrollParent, event, callback, scrollParents) {
- const isBody = scrollParent.nodeName === 'BODY';
- const target = isBody ? window : scrollParent;
+ var isBody = scrollParent.nodeName === 'BODY';
+ var target = isBody ? window : scrollParent;
target.addEventListener(event, callback, { passive: true });
if (!isBody) {
@@ -26243,7 +26330,7 @@ function setupEventListeners(reference, options, state, updateBound) {
window.addEventListener('resize', state.updateBound, { passive: true });
// Scroll event listener on scroll parents
- const scrollElement = getScrollParent(reference);
+ var scrollElement = getScrollParent(reference);
attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);
state.scrollElement = scrollElement;
state.eventsEnabled = true;
@@ -26274,7 +26361,7 @@ function removeEventListeners(reference, state) {
window.removeEventListener('resize', state.updateBound);
// Remove scroll event listener on scroll parents
- state.scrollParents.forEach(target => {
+ state.scrollParents.forEach(function (target) {
target.removeEventListener('scroll', state.updateBound);
});
@@ -26320,8 +26407,8 @@ function isNumeric(n) {
* Object with a list of properties and values which will be applied to the element
*/
function setStyles(element, styles) {
- Object.keys(styles).forEach(prop => {
- let unit = '';
+ Object.keys(styles).forEach(function (prop) {
+ var unit = '';
// add unit if the value is numeric and is one of the following
if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {
unit = 'px';
@@ -26340,7 +26427,7 @@ function setStyles(element, styles) {
*/
function setAttributes(element, attributes) {
Object.keys(attributes).forEach(function (prop) {
- const value = attributes[prop];
+ var value = attributes[prop];
if (value !== false) {
element.setAttribute(prop, attributes[prop]);
} else {
@@ -26389,12 +26476,12 @@ function applyStyle(data) {
*/
function applyStyleOnLoad(reference, popper, options, modifierOptions, state) {
// compute reference element offsets
- const referenceOffsets = getReferenceOffsets(state, popper, reference);
+ var referenceOffsets = getReferenceOffsets(state, popper, reference);
// compute auto placement, store placement inside the data object,
// modifiers will be able to edit `placement` if needed
// and refer to originalPlacement to know the original value
- const placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);
+ var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);
popper.setAttribute('x-placement', placement);
@@ -26413,39 +26500,43 @@ function applyStyleOnLoad(reference, popper, options, modifierOptions, state) {
* @returns {Object} The data object, properly modified
*/
function computeStyle(data, options) {
- const { x, y } = options;
- const { popper } = data.offsets;
+ var x = options.x,
+ y = options.y;
+ var popper = data.offsets.popper;
// Remove this legacy support in Popper.js v2
- const legacyGpuAccelerationOption = find(data.instance.modifiers, modifier => modifier.name === 'applyStyle').gpuAcceleration;
+
+ var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {
+ return modifier.name === 'applyStyle';
+ }).gpuAcceleration;
if (legacyGpuAccelerationOption !== undefined) {
console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');
}
- const gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;
+ var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;
- const offsetParent = getOffsetParent(data.instance.popper);
- const offsetParentRect = getBoundingClientRect(offsetParent);
+ var offsetParent = getOffsetParent(data.instance.popper);
+ var offsetParentRect = getBoundingClientRect(offsetParent);
// Styles
- const styles = {
+ var styles = {
position: popper.position
};
// floor sides to avoid blurry text
- const offsets = {
+ var offsets = {
left: Math.floor(popper.left),
top: Math.floor(popper.top),
bottom: Math.floor(popper.bottom),
right: Math.floor(popper.right)
};
- const sideA = x === 'bottom' ? 'top' : 'bottom';
- const sideB = y === 'right' ? 'left' : 'right';
+ var sideA = x === 'bottom' ? 'top' : 'bottom';
+ var sideB = y === 'right' ? 'left' : 'right';
// if gpuAcceleration is set to `true` and transform is supported,
// we use `translate3d` to apply the position to the popper we
// automatically use the supported prefixed version if needed
- const prefixedProperty = getSupportedPropertyName('transform');
+ var prefixedProperty = getSupportedPropertyName('transform');
// now, let's make a step back and look at this code closely (wtf?)
// If the content of the popper grows once it's been positioned, it
@@ -26456,7 +26547,8 @@ function computeStyle(data, options) {
// If we position a popper on top of a reference element, we can set
// `x` to `top` to make the popper grow towards its top instead of
// its bottom.
- let left, top;
+ var left = void 0,
+ top = void 0;
if (sideA === 'bottom') {
top = -offsetParentRect.height + offsets.bottom;
} else {
@@ -26468,21 +26560,21 @@ function computeStyle(data, options) {
left = offsets.left;
}
if (gpuAcceleration && prefixedProperty) {
- styles[prefixedProperty] = `translate3d(${left}px, ${top}px, 0)`;
+ styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
styles[sideA] = 0;
styles[sideB] = 0;
styles.willChange = 'transform';
} else {
// othwerise, we use the standard `top`, `left`, `bottom` and `right` properties
- const invertTop = sideA === 'bottom' ? -1 : 1;
- const invertLeft = sideB === 'right' ? -1 : 1;
+ var invertTop = sideA === 'bottom' ? -1 : 1;
+ var invertLeft = sideB === 'right' ? -1 : 1;
styles[sideA] = top * invertTop;
styles[sideB] = left * invertLeft;
- styles.willChange = `${sideA}, ${sideB}`;
+ styles.willChange = sideA + ', ' + sideB;
}
// Attributes
- const attributes = {
+ var attributes = {
'x-placement': data.placement
};
@@ -26505,16 +26597,19 @@ function computeStyle(data, options) {
* @returns {Boolean}
*/
function isModifierRequired(modifiers, requestingName, requestedName) {
- const requesting = find(modifiers, ({ name }) => name === requestingName);
+ var requesting = find(modifiers, function (_ref) {
+ var name = _ref.name;
+ return name === requestingName;
+ });
- const isRequired = !!requesting && modifiers.some(modifier => {
+ var isRequired = !!requesting && modifiers.some(function (modifier) {
return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;
});
if (!isRequired) {
- const requesting = `\`${requestingName}\``;
- const requested = `\`${requestedName}\``;
- console.warn(`${requested} modifier is required by ${requesting} modifier in order to work, be sure to include it before ${requesting}!`);
+ var _requesting = '`' + requestingName + '`';
+ var requested = '`' + requestedName + '`';
+ console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');
}
return isRequired;
}
@@ -26532,7 +26627,7 @@ function arrow(data, options) {
return data;
}
- let arrowElement = options.element;
+ var arrowElement = options.element;
// if arrowElement is a string, suppose it's a CSS selector
if (typeof arrowElement === 'string') {
@@ -26551,16 +26646,19 @@ function arrow(data, options) {
}
}
- const placement = data.placement.split('-')[0];
- const { popper, reference } = data.offsets;
- const isVertical = ['left', 'right'].indexOf(placement) !== -1;
+ var placement = data.placement.split('-')[0];
+ var _data$offsets = data.offsets,
+ popper = _data$offsets.popper,
+ reference = _data$offsets.reference;
- const len = isVertical ? 'height' : 'width';
- const sideCapitalized = isVertical ? 'Top' : 'Left';
- const side = sideCapitalized.toLowerCase();
- const altSide = isVertical ? 'left' : 'top';
- const opSide = isVertical ? 'bottom' : 'right';
- const arrowElementSize = getOuterSizes(arrowElement)[len];
+ var isVertical = ['left', 'right'].indexOf(placement) !== -1;
+
+ var len = isVertical ? 'height' : 'width';
+ var sideCapitalized = isVertical ? 'Top' : 'Left';
+ var side = sideCapitalized.toLowerCase();
+ var altSide = isVertical ? 'left' : 'top';
+ var opSide = isVertical ? 'bottom' : 'right';
+ var arrowElementSize = getOuterSizes(arrowElement)[len];
//
// extends keepTogether behavior making sure the popper and its
@@ -26577,12 +26675,12 @@ function arrow(data, options) {
}
// compute center of the popper
- const center = reference[side] + reference[len] / 2 - arrowElementSize / 2;
+ var center = reference[side] + reference[len] / 2 - arrowElementSize / 2;
// Compute the sideValue using the updated popper offsets
// take popper margin in account because we don't have this info available
- const popperMarginSide = getStyleComputedProperty(data.instance.popper, `margin${sideCapitalized}`).replace('px', '');
- let sideValue = center - getClientRect(data.offsets.popper)[side] - popperMarginSide;
+ var popperMarginSide = getStyleComputedProperty(data.instance.popper, 'margin' + sideCapitalized).replace('px', '');
+ var sideValue = center - getClientRect(data.offsets.popper)[side] - popperMarginSide;
// prevent arrowElement from being placed not contiguously to its popper
sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);
@@ -26645,7 +26743,7 @@ function getOppositeVariation(variation) {
var placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];
// Get rid of `auto` `auto-start` and `auto-end`
-const validPlacements = placements.slice(3);
+var validPlacements = placements.slice(3);
/**
* Given an initial placement, returns all the subsequent placements
@@ -26657,13 +26755,15 @@ const validPlacements = placements.slice(3);
* @argument {Boolean} counter - Set to true to walk the placements counterclockwise
* @returns {Array} placements including their variations
*/
-function clockwise(placement, counter = false) {
- const index = validPlacements.indexOf(placement);
- const arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));
+function clockwise(placement) {
+ var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+
+ var index = validPlacements.indexOf(placement);
+ var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));
return counter ? arr.reverse() : arr;
}
-const BEHAVIORS = {
+var BEHAVIORS = {
FLIP: 'flip',
CLOCKWISE: 'clockwise',
COUNTERCLOCKWISE: 'counterclockwise'
@@ -26687,13 +26787,13 @@ function flip(data, options) {
return data;
}
- const boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement);
+ var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement);
- let placement = data.placement.split('-')[0];
- let placementOpposite = getOppositePlacement(placement);
- let variation = data.placement.split('-')[1] || '';
+ var placement = data.placement.split('-')[0];
+ var placementOpposite = getOppositePlacement(placement);
+ var variation = data.placement.split('-')[1] || '';
- let flipOrder = [];
+ var flipOrder = [];
switch (options.behavior) {
case BEHAVIORS.FLIP:
@@ -26709,7 +26809,7 @@ function flip(data, options) {
flipOrder = options.behavior;
}
- flipOrder.forEach((step, index) => {
+ flipOrder.forEach(function (step, index) {
if (placement !== step || flipOrder.length === index + 1) {
return data;
}
@@ -26717,23 +26817,23 @@ function flip(data, options) {
placement = data.placement.split('-')[0];
placementOpposite = getOppositePlacement(placement);
- const popperOffsets = data.offsets.popper;
- const refOffsets = data.offsets.reference;
+ var popperOffsets = data.offsets.popper;
+ var refOffsets = data.offsets.reference;
// using floor because the reference offsets may contain decimals we are not going to consider here
- const floor = Math.floor;
- const overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);
+ var floor = Math.floor;
+ var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);
- const overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);
- const overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);
- const overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);
- const overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);
+ var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);
+ var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);
+ var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);
+ var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);
- const overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;
+ var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;
// flip the variation if required
- const isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
- const flippedVariation = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);
+ var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
+ var flippedVariation = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);
if (overlapsRef || overflowsBoundaries || flippedVariation) {
// this boolean to detect any flip loop
@@ -26767,13 +26867,16 @@ function flip(data, options) {
* @returns {Object} The data object, properly modified
*/
function keepTogether(data) {
- const { popper, reference } = data.offsets;
- const placement = data.placement.split('-')[0];
- const floor = Math.floor;
- const isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
- const side = isVertical ? 'right' : 'bottom';
- const opSide = isVertical ? 'left' : 'top';
- const measurement = isVertical ? 'width' : 'height';
+ var _data$offsets = data.offsets,
+ popper = _data$offsets.popper,
+ reference = _data$offsets.reference;
+
+ var placement = data.placement.split('-')[0];
+ var floor = Math.floor;
+ var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
+ var side = isVertical ? 'right' : 'bottom';
+ var opSide = isVertical ? 'left' : 'top';
+ var measurement = isVertical ? 'width' : 'height';
if (popper[side] < floor(reference[opSide])) {
data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];
@@ -26799,9 +26902,9 @@ function keepTogether(data) {
*/
function toValue(str, measurement, popperOffsets, referenceOffsets) {
// separate value from unit
- const split = str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/);
- const value = +split[1];
- const unit = split[2];
+ var split = str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/);
+ var value = +split[1];
+ var unit = split[2];
// If it's not a number it's an operator, I guess
if (!value) {
@@ -26809,7 +26912,7 @@ function toValue(str, measurement, popperOffsets, referenceOffsets) {
}
if (unit.indexOf('%') === 0) {
- let element;
+ var element = void 0;
switch (unit) {
case '%p':
element = popperOffsets;
@@ -26820,11 +26923,11 @@ function toValue(str, measurement, popperOffsets, referenceOffsets) {
element = referenceOffsets;
}
- const rect = getClientRect(element);
+ var rect = getClientRect(element);
return rect[measurement] / 100 * value;
} else if (unit === 'vh' || unit === 'vw') {
// if is a vh or vw, we calculate the size based on the viewport
- let size;
+ var size = void 0;
if (unit === 'vh') {
size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
} else {
@@ -26850,20 +26953,24 @@ function toValue(str, measurement, popperOffsets, referenceOffsets) {
* @returns {Array} a two cells array with x and y offsets in numbers
*/
function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {
- const offsets = [0, 0];
+ var offsets = [0, 0];
// Use height if placement is left or right and index is 0 otherwise use width
// in this way the first offset will use an axis and the second one
// will use the other one
- const useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;
+ var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;
// Split the offset string to obtain a list of values and operands
// The regex addresses values with the plus or minus sign in front (+10, -20, etc)
- const fragments = offset.split(/(\+|\-)/).map(frag => frag.trim());
+ var fragments = offset.split(/(\+|\-)/).map(function (frag) {
+ return frag.trim();
+ });
// Detect if the offset string contains a pair of values or a single one
// they could be separated by comma or space
- const divider = fragments.indexOf(find(fragments, frag => frag.search(/,|\s/) !== -1));
+ var divider = fragments.indexOf(find(fragments, function (frag) {
+ return frag.search(/,|\s/) !== -1;
+ }));
if (fragments[divider] && fragments[divider].indexOf(',') === -1) {
console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');
@@ -26871,18 +26978,18 @@ function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {
// If divider is found, we divide the list of values and operands to divide
// them by ofset X and Y.
- const splitRegex = /\s*,\s*|\s+/;
- let ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments];
+ var splitRegex = /\s*,\s*|\s+/;
+ var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments];
// Convert the values with units to absolute pixels to allow our computations
- ops = ops.map((op, index) => {
+ ops = ops.map(function (op, index) {
// Most of the units rely on the orientation of the popper
- const measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';
- let mergeWithPrevious = false;
+ var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';
+ var mergeWithPrevious = false;
return op
// This aggregates any `+` or `-` sign that aren't considered operators
// e.g.: 10 + +5 => [10, +, +5]
- .reduce((a, b) => {
+ .reduce(function (a, b) {
if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {
a[a.length - 1] = b;
mergeWithPrevious = true;
@@ -26896,12 +27003,14 @@ function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {
}
}, [])
// Here we convert the string values into number values (in px)
- .map(str => toValue(str, measurement, popperOffsets, referenceOffsets));
+ .map(function (str) {
+ return toValue(str, measurement, popperOffsets, referenceOffsets);
+ });
});
// Loop trough the offsets arrays and execute the operations
- ops.forEach((op, index) => {
- op.forEach((frag, index2) => {
+ ops.forEach(function (op, index) {
+ op.forEach(function (frag, index2) {
if (isNumeric(frag)) {
offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);
}
@@ -26919,11 +27028,16 @@ function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {
* The offset value as described in the modifier description
* @returns {Object} The data object, properly modified
*/
-function offset(data, { offset }) {
- const { placement, offsets: { popper, reference } } = data;
- const basePlacement = placement.split('-')[0];
+function offset(data, _ref) {
+ var offset = _ref.offset;
+ var placement = data.placement,
+ _data$offsets = data.offsets,
+ popper = _data$offsets.popper,
+ reference = _data$offsets.reference;
- let offsets;
+ var basePlacement = placement.split('-')[0];
+
+ var offsets = void 0;
if (isNumeric(+offset)) {
offsets = [+offset, 0];
} else {
@@ -26956,7 +27070,7 @@ function offset(data, { offset }) {
* @returns {Object} The data object, properly modified
*/
function preventOverflow(data, options) {
- let boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper);
+ var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper);
// If offsetParent is the reference element, we really want to
// go one step up and use the next offsetParent as reference to
@@ -26965,32 +27079,32 @@ function preventOverflow(data, options) {
boundariesElement = getOffsetParent(boundariesElement);
}
- const boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement);
+ var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement);
options.boundaries = boundaries;
- const order = options.priority;
- let popper = data.offsets.popper;
+ var order = options.priority;
+ var popper = data.offsets.popper;
- const check = {
- primary(placement) {
- let value = popper[placement];
+ var check = {
+ primary: function primary(placement) {
+ var value = popper[placement];
if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {
value = Math.max(popper[placement], boundaries[placement]);
}
- return { [placement]: value };
+ return defineProperty({}, placement, value);
},
- secondary(placement) {
- const mainSide = placement === 'right' ? 'left' : 'top';
- let value = popper[mainSide];
+ secondary: function secondary(placement) {
+ var mainSide = placement === 'right' ? 'left' : 'top';
+ var value = popper[mainSide];
if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {
value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));
}
- return { [mainSide]: value };
+ return defineProperty({}, mainSide, value);
}
};
- order.forEach(placement => {
- const side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';
+ order.forEach(function (placement) {
+ var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';
popper = _extends({}, popper, check[side](placement));
});
@@ -27007,22 +27121,23 @@ function preventOverflow(data, options) {
* @returns {Object} The data object, properly modified
*/
function shift(data) {
- const placement = data.placement;
- const basePlacement = placement.split('-')[0];
- const shiftvariation = placement.split('-')[1];
+ var placement = data.placement;
+ var basePlacement = placement.split('-')[0];
+ var shiftvariation = placement.split('-')[1];
// if shift shiftvariation is specified, run the modifier
if (shiftvariation) {
- const { reference, popper } = data.offsets;
- const isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;
- const side = isVertical ? 'left' : 'top';
- const measurement = isVertical ? 'width' : 'height';
+ var _data$offsets = data.offsets,
+ reference = _data$offsets.reference,
+ popper = _data$offsets.popper;
- const shiftOffsets = {
- start: { [side]: reference[side] },
- end: {
- [side]: reference[side] + reference[measurement] - popper[measurement]
- }
+ var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;
+ var side = isVertical ? 'left' : 'top';
+ var measurement = isVertical ? 'width' : 'height';
+
+ var shiftOffsets = {
+ start: defineProperty({}, side, reference[side]),
+ end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])
};
data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);
@@ -27043,8 +27158,10 @@ function hide(data) {
return data;
}
- const refRect = data.offsets.reference;
- const bound = find(data.instance.modifiers, modifier => modifier.name === 'preventOverflow').boundaries;
+ var refRect = data.offsets.reference;
+ var bound = find(data.instance.modifiers, function (modifier) {
+ return modifier.name === 'preventOverflow';
+ }).boundaries;
if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {
// Avoid unnecessary DOM access if visibility hasn't changed
@@ -27075,12 +27192,15 @@ function hide(data) {
* @returns {Object} The data object, properly modified
*/
function inner(data) {
- const placement = data.placement;
- const basePlacement = placement.split('-')[0];
- const { popper, reference } = data.offsets;
- const isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;
+ var placement = data.placement;
+ var basePlacement = placement.split('-')[0];
+ var _data$offsets = data.offsets,
+ popper = _data$offsets.popper,
+ reference = _data$offsets.reference;
- const subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;
+ var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;
+
+ var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;
popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);
@@ -27475,7 +27595,7 @@ var Defaults = {
* Access Popper.js instance with `data.instance`.
* @prop {onCreate}
*/
- onCreate: () => {},
+ onCreate: function onCreate() {},
/**
* Callback called when the popper is updated, this callback is not called
@@ -27485,14 +27605,14 @@ var Defaults = {
* Access Popper.js instance with `data.instance`.
* @prop {onUpdate}
*/
- onUpdate: () => {},
+ onUpdate: function onUpdate() {},
/**
* List of modifiers used to modify the offsets before they are applied to the popper.
* They provide most of the functionalities of Popper.js
* @prop {modifiers}
*/
- modifiers
+ modifiers: modifiers
};
/**
@@ -27507,7 +27627,7 @@ var Defaults = {
// Utils
// Methods
-class Popper {
+var Popper = function () {
/**
* Create a new Popper.js instance
* @class Popper
@@ -27516,8 +27636,15 @@ class Popper {
* @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)
* @return {Object} instance - The generated Popper.js instance
*/
- constructor(reference, popper, options = {}) {
- this.scheduleUpdate = () => requestAnimationFrame(this.update);
+ function Popper(reference, popper) {
+ var _this = this;
+
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+ classCallCheck(this, Popper);
+
+ this.scheduleUpdate = function () {
+ return requestAnimationFrame(_this.update);
+ };
// make update() debounced, so that it only runs at most once-per-tick
this.update = debounce(this.update.bind(this));
@@ -27538,31 +27665,35 @@ class Popper {
// Deep merge modifiers options
this.options.modifiers = {};
- Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(name => {
- this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});
+ Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {
+ _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});
});
// Refactoring modifiers' list (Object => Array)
- this.modifiers = Object.keys(this.options.modifiers).map(name => _extends({
- name
- }, this.options.modifiers[name]))
+ this.modifiers = Object.keys(this.options.modifiers).map(function (name) {
+ return _extends({
+ name: name
+ }, _this.options.modifiers[name]);
+ })
// sort the modifiers by order
- .sort((a, b) => a.order - b.order);
+ .sort(function (a, b) {
+ return a.order - b.order;
+ });
// modifiers have the ability to execute arbitrary code when Popper.js get inited
// such code is executed in the same order of its modifier
// they could add new properties to their options configuration
// BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!
- this.modifiers.forEach(modifierOptions => {
+ this.modifiers.forEach(function (modifierOptions) {
if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {
- modifierOptions.onLoad(this.reference, this.popper, this.options, modifierOptions, this.state);
+ modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);
}
});
// fire the first update to position the popper in the right place
this.update();
- const eventsEnabled = this.options.eventsEnabled;
+ var eventsEnabled = this.options.eventsEnabled;
if (eventsEnabled) {
// setup event listeners, they will take care of update the position in specific situations
this.enableEventListeners();
@@ -27573,43 +27704,56 @@ class Popper {
// We can't use class properties because they don't get listed in the
// class prototype and break stuff like Sinon stubs
- update() {
- return update.call(this);
- }
- destroy() {
- return destroy.call(this);
- }
- enableEventListeners() {
- return enableEventListeners.call(this);
- }
- disableEventListeners() {
- return disableEventListeners.call(this);
- }
-
- /**
- * Schedule an update, it will run on the next UI update available
- * @method scheduleUpdate
- * @memberof Popper
- */
- /**
- * Collection of utilities useful when writing custom modifiers.
- * Starting from version 1.7, this method is available only if you
- * include `popper-utils.js` before `popper.js`.
- *
- * **DEPRECATION**: This way to access PopperUtils is deprecated
- * and will be removed in v2! Use the PopperUtils module directly instead.
- * Due to the high instability of the methods contained in Utils, we can't
- * guarantee them to follow semver. Use them at your own risk!
- * @static
- * @private
- * @type {Object}
- * @deprecated since version 1.8
- * @member Utils
- * @memberof Popper
- */
-}
+ createClass(Popper, [{
+ key: 'update',
+ value: function update$$1() {
+ return update.call(this);
+ }
+ }, {
+ key: 'destroy',
+ value: function destroy$$1() {
+ return destroy.call(this);
+ }
+ }, {
+ key: 'enableEventListeners',
+ value: function enableEventListeners$$1() {
+ return enableEventListeners.call(this);
+ }
+ }, {
+ key: 'disableEventListeners',
+ value: function disableEventListeners$$1() {
+ return disableEventListeners.call(this);
+ }
+
+ /**
+ * Schedule an update, it will run on the next UI update available
+ * @method scheduleUpdate
+ * @memberof Popper
+ */
+
+
+ /**
+ * Collection of utilities useful when writing custom modifiers.
+ * Starting from version 1.7, this method is available only if you
+ * include `popper-utils.js` before `popper.js`.
+ *
+ * **DEPRECATION**: This way to access PopperUtils is deprecated
+ * and will be removed in v2! Use the PopperUtils module directly instead.
+ * Due to the high instability of the methods contained in Utils, we can't
+ * guarantee them to follow semver. Use them at your own risk!
+ * @static
+ * @private
+ * @type {Object}
+ * @deprecated since version 1.8
+ * @member Utils
+ * @memberof Popper
+ */
+
+ }]);
+ return Popper;
+}();
/**
* The `referenceObject` is an object that provides an interface compatible with Popper.js
@@ -27631,11 +27775,14 @@ class Popper {
* An ES6 getter that will return the height of the virtual reference element.
*/
+
Popper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;
Popper.placements = placements;
Popper.Defaults = Defaults;
-export default Popper;
+return Popper;
+
+})));
//# sourceMappingURL=popper.js.map
/**!
@@ -27662,6 +27809,12 @@ export default Popper;
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
+ (factory((global.PopperUtils = global.PopperUtils || {})));
+}(this, (function (exports) { 'use strict';
+
/**
* Get CSS computed property of the given element
* @method
@@ -27674,7 +27827,7 @@ function getStyleComputedProperty(element, property) {
return [];
}
// NOTE: 1 DOM access here
- const css = window.getComputedStyle(element, null);
+ var css = window.getComputedStyle(element, null);
return property ? css[property] : css;
}
@@ -27706,7 +27859,12 @@ function getScrollParent(element) {
}
// Firefox want us to check `-x` and `-y` variations as well
- const { overflow, overflowX, overflowY } = getStyleComputedProperty(element);
+
+ var _getStyleComputedProp = getStyleComputedProperty(element),
+ overflow = _getStyleComputedProp.overflow,
+ overflowX = _getStyleComputedProp.overflowX,
+ overflowY = _getStyleComputedProp.overflowY;
+
if (/(auto|scroll)/.test(overflow + overflowY + overflowX)) {
return element;
}
@@ -27723,8 +27881,8 @@ function getScrollParent(element) {
*/
function getOffsetParent(element) {
// NOTE: 1 DOM access here
- const offsetParent = element && element.offsetParent;
- const nodeName = offsetParent && offsetParent.nodeName;
+ var offsetParent = element && element.offsetParent;
+ var nodeName = offsetParent && offsetParent.nodeName;
if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {
return window.document.documentElement;
@@ -27740,7 +27898,8 @@ function getOffsetParent(element) {
}
function isOffsetContainer(element) {
- const { nodeName } = element;
+ var nodeName = element.nodeName;
+
if (nodeName === 'BODY') {
return false;
}
@@ -27777,17 +27936,18 @@ function findCommonOffsetParent(element1, element2) {
}
// Here we make sure to give as "start" the element that comes first in the DOM
- const order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;
- const start = order ? element1 : element2;
- const end = order ? element2 : element1;
+ var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;
+ var start = order ? element1 : element2;
+ var end = order ? element2 : element1;
// Get common ancestor container
- const range = document.createRange();
+ var range = document.createRange();
range.setStart(start, 0);
range.setEnd(end, 0);
- const { commonAncestorContainer } = range;
+ var commonAncestorContainer = range.commonAncestorContainer;
// Both nodes are inside #document
+
if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {
if (isOffsetContainer(commonAncestorContainer)) {
return commonAncestorContainer;
@@ -27797,7 +27957,7 @@ function findCommonOffsetParent(element1, element2) {
}
// one of the nodes is inside shadowDOM, find which one
- const element1root = getRoot(element1);
+ var element1root = getRoot(element1);
if (element1root.host) {
return findCommonOffsetParent(element1root.host, element2);
} else {
@@ -27813,13 +27973,15 @@ function findCommonOffsetParent(element1, element2) {
* @argument {String} side `top` or `left`
* @returns {number} amount of scrolled pixels
*/
-function getScroll(element, side = 'top') {
- const upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';
- const nodeName = element.nodeName;
+function getScroll(element) {
+ var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';
+
+ var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';
+ var nodeName = element.nodeName;
if (nodeName === 'BODY' || nodeName === 'HTML') {
- const html = window.document.documentElement;
- const scrollingElement = window.document.scrollingElement || html;
+ var html = window.document.documentElement;
+ var scrollingElement = window.document.scrollingElement || html;
return scrollingElement[upperSide];
}
@@ -27835,10 +27997,12 @@ function getScroll(element, side = 'top') {
* @param {Boolean} subtract - set to true if you want to subtract the scroll values
* @return {Object} rect - The modifier rect object
*/
-function includeScroll(rect, element, subtract = false) {
- const scrollTop = getScroll(element, 'top');
- const scrollLeft = getScroll(element, 'left');
- const modifier = subtract ? -1 : 1;
+function includeScroll(rect, element) {
+ var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+
+ var scrollTop = getScroll(element, 'top');
+ var scrollLeft = getScroll(element, 'left');
+ var modifier = subtract ? -1 : 1;
rect.top += scrollTop * modifier;
rect.bottom += scrollTop * modifier;
rect.left += scrollLeft * modifier;
@@ -27857,10 +28021,10 @@ function includeScroll(rect, element, subtract = false) {
*/
function getBordersSize(styles, axis) {
- const sideA = axis === 'x' ? 'Left' : 'Top';
- const sideB = sideA === 'Left' ? 'Right' : 'Bottom';
+ var sideA = axis === 'x' ? 'Left' : 'Top';
+ var sideB = sideA === 'Left' ? 'Right' : 'Bottom';
- return +styles[`border${sideA}Width`].split('px')[0] + +styles[`border${sideB}Width`].split('px')[0];
+ return +styles['border' + sideA + 'Width'].split('px')[0] + +styles['border' + sideB + 'Width'].split('px')[0];
}
/**
@@ -27869,7 +28033,7 @@ function getBordersSize(styles, axis) {
* @memberof Popper.Utils
* @returns {Boolean} isIE10
*/
-let isIE10 = undefined;
+var isIE10 = undefined;
var isIE10$1 = function () {
if (isIE10 === undefined) {
@@ -27879,13 +28043,13 @@ var isIE10$1 = function () {
};
function getSize(axis, body, html, computedStyle) {
- return Math.max(body[`offset${axis}`], body[`scroll${axis}`], html[`client${axis}`], html[`offset${axis}`], html[`scroll${axis}`], isIE10$1() ? html[`offset${axis}`] + computedStyle[`margin${axis === 'Height' ? 'Top' : 'Left'}`] + computedStyle[`margin${axis === 'Height' ? 'Bottom' : 'Right'}`] : 0);
+ return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE10$1() ? html['offset' + axis] + computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')] + computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')] : 0);
}
function getWindowSizes() {
- const body = window.document.body;
- const html = window.document.documentElement;
- const computedStyle = isIE10$1() && window.getComputedStyle(html);
+ var body = window.document.body;
+ var html = window.document.documentElement;
+ var computedStyle = isIE10$1() && window.getComputedStyle(html);
return {
height: getSize('Height', body, html, computedStyle),
@@ -27929,7 +28093,7 @@ function getClientRect(offsets) {
* @return {Object} client rect
*/
function getBoundingClientRect(element) {
- let rect = {};
+ var rect = {};
// IE10 10 FIX: Please, don't ask, the element isn't
// considered in DOM in some circumstances...
@@ -27937,8 +28101,8 @@ function getBoundingClientRect(element) {
if (isIE10$1()) {
try {
rect = element.getBoundingClientRect();
- const scrollTop = getScroll(element, 'top');
- const scrollLeft = getScroll(element, 'left');
+ var scrollTop = getScroll(element, 'top');
+ var scrollLeft = getScroll(element, 'left');
rect.top += scrollTop;
rect.left += scrollLeft;
rect.bottom += scrollTop;
@@ -27948,7 +28112,7 @@ function getBoundingClientRect(element) {
rect = element.getBoundingClientRect();
}
- const result = {
+ var result = {
left: rect.left,
top: rect.top,
width: rect.right - rect.left,
@@ -27956,17 +28120,17 @@ function getBoundingClientRect(element) {
};
// subtract scrollbar size from sizes
- const sizes = element.nodeName === 'HTML' ? getWindowSizes() : {};
- const width = sizes.width || element.clientWidth || result.right - result.left;
- const height = sizes.height || element.clientHeight || result.bottom - result.top;
+ var sizes = element.nodeName === 'HTML' ? getWindowSizes() : {};
+ var width = sizes.width || element.clientWidth || result.right - result.left;
+ var height = sizes.height || element.clientHeight || result.bottom - result.top;
- let horizScrollbar = element.offsetWidth - width;
- let vertScrollbar = element.offsetHeight - height;
+ var horizScrollbar = element.offsetWidth - width;
+ var vertScrollbar = element.offsetHeight - height;
// if an hypothetical scrollbar is detected, we must be sure it's not a `border`
// we make this check conditional for performance reasons
if (horizScrollbar || vertScrollbar) {
- const styles = getStyleComputedProperty(element);
+ var styles = getStyleComputedProperty(element);
horizScrollbar -= getBordersSize(styles, 'x');
vertScrollbar -= getBordersSize(styles, 'y');
@@ -27978,17 +28142,17 @@ function getBoundingClientRect(element) {
}
function getOffsetRectRelativeToArbitraryNode(children, parent) {
- const isIE10 = isIE10$1();
- const isHTML = parent.nodeName === 'HTML';
- const childrenRect = getBoundingClientRect(children);
- const parentRect = getBoundingClientRect(parent);
- const scrollParent = getScrollParent(children);
+ var isIE10 = isIE10$1();
+ var isHTML = parent.nodeName === 'HTML';
+ var childrenRect = getBoundingClientRect(children);
+ var parentRect = getBoundingClientRect(parent);
+ var scrollParent = getScrollParent(children);
- const styles = getStyleComputedProperty(parent);
- const borderTopWidth = +styles.borderTopWidth.split('px')[0];
- const borderLeftWidth = +styles.borderLeftWidth.split('px')[0];
+ var styles = getStyleComputedProperty(parent);
+ var borderTopWidth = +styles.borderTopWidth.split('px')[0];
+ var borderLeftWidth = +styles.borderLeftWidth.split('px')[0];
- let offsets = getClientRect({
+ var offsets = getClientRect({
top: childrenRect.top - parentRect.top - borderTopWidth,
left: childrenRect.left - parentRect.left - borderLeftWidth,
width: childrenRect.width,
@@ -28002,8 +28166,8 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) {
// differently when margins are applied to it. The margins are included in
// the box of the documentElement, in the other cases not.
if (!isIE10 && isHTML) {
- const marginTop = +styles.marginTop.split('px')[0];
- const marginLeft = +styles.marginLeft.split('px')[0];
+ var marginTop = +styles.marginTop.split('px')[0];
+ var marginLeft = +styles.marginLeft.split('px')[0];
offsets.top -= borderTopWidth - marginTop;
offsets.bottom -= borderTopWidth - marginTop;
@@ -28023,19 +28187,19 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) {
}
function getViewportOffsetRectRelativeToArtbitraryNode(element) {
- const html = window.document.documentElement;
- const relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);
- const width = Math.max(html.clientWidth, window.innerWidth || 0);
- const height = Math.max(html.clientHeight, window.innerHeight || 0);
+ var html = window.document.documentElement;
+ var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);
+ var width = Math.max(html.clientWidth, window.innerWidth || 0);
+ var height = Math.max(html.clientHeight, window.innerHeight || 0);
- const scrollTop = getScroll(html);
- const scrollLeft = getScroll(html, 'left');
+ var scrollTop = getScroll(html);
+ var scrollLeft = getScroll(html, 'left');
- const offset = {
+ var offset = {
top: scrollTop - relativeOffset.top + relativeOffset.marginTop,
left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,
- width,
- height
+ width: width,
+ height: height
};
return getClientRect(offset);
@@ -28050,7 +28214,7 @@ function getViewportOffsetRectRelativeToArtbitraryNode(element) {
* @returns {Boolean} answer to "isFixed?"
*/
function isFixed(element) {
- const nodeName = element.nodeName;
+ var nodeName = element.nodeName;
if (nodeName === 'BODY' || nodeName === 'HTML') {
return false;
}
@@ -28072,15 +28236,15 @@ function isFixed(element) {
*/
function getBoundaries(popper, reference, padding, boundariesElement) {
// NOTE: 1 DOM access here
- let boundaries = { top: 0, left: 0 };
- const offsetParent = findCommonOffsetParent(popper, reference);
+ var boundaries = { top: 0, left: 0 };
+ var offsetParent = findCommonOffsetParent(popper, reference);
// Handle viewport case
if (boundariesElement === 'viewport') {
boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent);
} else {
// Handle other cases based on DOM element used as boundaries
- let boundariesNode;
+ var boundariesNode = void 0;
if (boundariesElement === 'scrollParent') {
boundariesNode = getScrollParent(getParentNode(popper));
if (boundariesNode.nodeName === 'BODY') {
@@ -28092,11 +28256,14 @@ function getBoundaries(popper, reference, padding, boundariesElement) {
boundariesNode = boundariesElement;
}
- const offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent);
+ var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent);
// In case of HTML, we need a different computation
if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {
- const { height, width } = getWindowSizes();
+ var _getWindowSizes = getWindowSizes(),
+ height = _getWindowSizes.height,
+ width = _getWindowSizes.width;
+
boundaries.top += offsets.top - offsets.marginTop;
boundaries.bottom = height + offsets.top;
boundaries.left += offsets.left - offsets.marginLeft;
@@ -28116,7 +28283,10 @@ function getBoundaries(popper, reference, padding, boundariesElement) {
return boundaries;
}
-function getArea({ width, height }) {
+function getArea(_ref) {
+ var width = _ref.width,
+ height = _ref.height;
+
return width * height;
}
@@ -28129,14 +28299,16 @@ function getArea({ width, height }) {
* @argument {Object} options - Modifiers configuration and options
* @returns {Object} The data object, properly modified
*/
-function computeAutoPlacement(placement, refRect, popper, reference, boundariesElement, padding = 0) {
+function computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {
+ var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
+
if (placement.indexOf('auto') === -1) {
return placement;
}
- const boundaries = getBoundaries(popper, reference, padding, boundariesElement);
+ var boundaries = getBoundaries(popper, reference, padding, boundariesElement);
- const rects = {
+ var rects = {
top: {
width: boundaries.width,
height: refRect.top - boundaries.top
@@ -28155,22 +28327,30 @@ function computeAutoPlacement(placement, refRect, popper, reference, boundariesE
}
};
- const sortedAreas = Object.keys(rects).map(key => _extends({
- key
- }, rects[key], {
- area: getArea(rects[key])
- })).sort((a, b) => b.area - a.area);
+ var sortedAreas = Object.keys(rects).map(function (key) {
+ return _extends({
+ key: key
+ }, rects[key], {
+ area: getArea(rects[key])
+ });
+ }).sort(function (a, b) {
+ return b.area - a.area;
+ });
- const filteredAreas = sortedAreas.filter(({ width, height }) => width >= popper.clientWidth && height >= popper.clientHeight);
+ var filteredAreas = sortedAreas.filter(function (_ref2) {
+ var width = _ref2.width,
+ height = _ref2.height;
+ return width >= popper.clientWidth && height >= popper.clientHeight;
+ });
- const computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;
+ var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;
- const variation = placement.split('-')[1];
+ var variation = placement.split('-')[1];
- return computedPlacement + (variation ? `-${variation}` : '');
+ return computedPlacement + (variation ? '-' + variation : '');
}
-const nativeHints = ['native code', '[object MutationObserverConstructor]'];
+var nativeHints = ['native code', '[object MutationObserverConstructor]'];
/**
* Determine if a function is implemented natively (as opposed to a polyfill).
@@ -28179,12 +28359,16 @@ const nativeHints = ['native code', '[object MutationObserverConstructor]'];
* @argument {Function | undefined} fn the function to check
* @returns {Boolean}
*/
-var isNative = (fn => nativeHints.some(hint => (fn || '').toString().indexOf(hint) > -1));
+var isNative = (function (fn) {
+ return nativeHints.some(function (hint) {
+ return (fn || '').toString().indexOf(hint) > -1;
+ });
+});
-const isBrowser = typeof window !== 'undefined';
-const longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
-let timeoutDuration = 0;
-for (let i = 0; i < longerTimeoutBrowsers.length; i += 1) {
+var isBrowser = typeof window !== 'undefined';
+var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
+var timeoutDuration = 0;
+for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {
if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {
timeoutDuration = 1;
break;
@@ -28192,21 +28376,21 @@ for (let i = 0; i < longerTimeoutBrowsers.length; i += 1) {
}
function microtaskDebounce(fn) {
- let scheduled = false;
- let i = 0;
- const elem = document.createElement('span');
+ var scheduled = false;
+ var i = 0;
+ var elem = document.createElement('span');
// MutationObserver provides a mechanism for scheduling microtasks, which
// are scheduled *before* the next task. This gives us a way to debounce
// a function but ensure it's called *before* the next paint.
- const observer = new MutationObserver(() => {
+ var observer = new MutationObserver(function () {
fn();
scheduled = false;
});
observer.observe(elem, { attributes: true });
- return () => {
+ return function () {
if (!scheduled) {
scheduled = true;
elem.setAttribute('x-index', i);
@@ -28216,11 +28400,11 @@ function microtaskDebounce(fn) {
}
function taskDebounce(fn) {
- let scheduled = false;
- return () => {
+ var scheduled = false;
+ return function () {
if (!scheduled) {
scheduled = true;
- setTimeout(() => {
+ setTimeout(function () {
scheduled = false;
fn();
}, timeoutDuration);
@@ -28232,7 +28416,7 @@ function taskDebounce(fn) {
// these rely on Mutation Events which only occur when an element is connected
// to the DOM. The algorithm used in this module does not use a connected element,
// and so we must ensure that a *native* MutationObserver is available.
-const supportsNativeMutationObserver = isBrowser && isNative(window.MutationObserver);
+var supportsNativeMutationObserver = isBrowser && isNative(window.MutationObserver);
/**
* Create a debounced version of a method, that's asynchronously deferred
@@ -28276,11 +28460,15 @@ function find(arr, check) {
function findIndex(arr, prop, value) {
// use native findIndex if supported
if (Array.prototype.findIndex) {
- return arr.findIndex(cur => cur[prop] === value);
+ return arr.findIndex(function (cur) {
+ return cur[prop] === value;
+ });
}
// use `find` + `indexOf` if `findIndex` isn't supported
- const match = find(arr, obj => obj[prop] === value);
+ var match = find(arr, function (obj) {
+ return obj[prop] === value;
+ });
return arr.indexOf(match);
}
@@ -28292,12 +28480,15 @@ function findIndex(arr, prop, value) {
* @return {Object} position - Coordinates of the element and its `scrollTop`
*/
function getOffsetRect(element) {
- let elementRect;
+ var elementRect = void 0;
if (element.nodeName === 'HTML') {
- const { width, height } = getWindowSizes();
+ var _getWindowSizes = getWindowSizes(),
+ width = _getWindowSizes.width,
+ height = _getWindowSizes.height;
+
elementRect = {
- width,
- height,
+ width: width,
+ height: height,
left: 0,
top: 0
};
@@ -28322,10 +28513,10 @@ function getOffsetRect(element) {
* @returns {Object} object containing width and height properties
*/
function getOuterSizes(element) {
- const styles = window.getComputedStyle(element);
- const x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
- const y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);
- const result = {
+ var styles = window.getComputedStyle(element);
+ var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
+ var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);
+ var result = {
width: element.offsetWidth + y,
height: element.offsetHeight + x
};
@@ -28340,8 +28531,10 @@ function getOuterSizes(element) {
* @returns {String} flipped placement
*/
function getOppositePlacement(placement) {
- const hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
- return placement.replace(/left|right|bottom|top/g, matched => hash[matched]);
+ var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
+ return placement.replace(/left|right|bottom|top/g, function (matched) {
+ return hash[matched];
+ });
}
/**
@@ -28358,20 +28551,20 @@ function getPopperOffsets(popper, referenceOffsets, placement) {
placement = placement.split('-')[0];
// Get popper node sizes
- const popperRect = getOuterSizes(popper);
+ var popperRect = getOuterSizes(popper);
// Add position, width and height to our offsets object
- const popperOffsets = {
+ var popperOffsets = {
width: popperRect.width,
height: popperRect.height
};
// depending by the popper placement we have to compute its offsets slightly differently
- const isHoriz = ['right', 'left'].indexOf(placement) !== -1;
- const mainSide = isHoriz ? 'top' : 'left';
- const secondarySide = isHoriz ? 'left' : 'top';
- const measurement = isHoriz ? 'height' : 'width';
- const secondaryMeasurement = !isHoriz ? 'height' : 'width';
+ var isHoriz = ['right', 'left'].indexOf(placement) !== -1;
+ var mainSide = isHoriz ? 'top' : 'left';
+ var secondarySide = isHoriz ? 'left' : 'top';
+ var measurement = isHoriz ? 'height' : 'width';
+ var secondaryMeasurement = !isHoriz ? 'height' : 'width';
popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;
if (placement === secondarySide) {
@@ -28393,7 +28586,7 @@ function getPopperOffsets(popper, referenceOffsets, placement) {
* @returns {Object} An object containing the offsets which will be applied to the popper
*/
function getReferenceOffsets(state, popper, reference) {
- const commonOffsetParent = findCommonOffsetParent(popper, reference);
+ var commonOffsetParent = findCommonOffsetParent(popper, reference);
return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent);
}
@@ -28405,12 +28598,12 @@ function getReferenceOffsets(state, popper, reference) {
* @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)
*/
function getSupportedPropertyName(property) {
- const prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];
- const upperProp = property.charAt(0).toUpperCase() + property.slice(1);
+ var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];
+ var upperProp = property.charAt(0).toUpperCase() + property.slice(1);
- for (let i = 0; i < prefixes.length - 1; i++) {
- const prefix = prefixes[i];
- const toCheck = prefix ? `${prefix}${upperProp}` : property;
+ for (var i = 0; i < prefixes.length - 1; i++) {
+ var prefix = prefixes[i];
+ var toCheck = prefix ? '' + prefix + upperProp : property;
if (typeof window.document.body.style[toCheck] !== 'undefined') {
return toCheck;
}
@@ -28426,7 +28619,7 @@ function getSupportedPropertyName(property) {
* @returns {Boolean} answer to: is a function?
*/
function isFunction(functionToCheck) {
- const getType = {};
+ var getType = {};
return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
}
@@ -28437,7 +28630,11 @@ function isFunction(functionToCheck) {
* @returns {Boolean}
*/
function isModifierEnabled(modifiers, modifierName) {
- return modifiers.some(({ name, enabled }) => enabled && name === modifierName);
+ return modifiers.some(function (_ref) {
+ var name = _ref.name,
+ enabled = _ref.enabled;
+ return enabled && name === modifierName;
+ });
}
/**
@@ -28451,16 +28648,19 @@ function isModifierEnabled(modifiers, modifierName) {
* @returns {Boolean}
*/
function isModifierRequired(modifiers, requestingName, requestedName) {
- const requesting = find(modifiers, ({ name }) => name === requestingName);
+ var requesting = find(modifiers, function (_ref) {
+ var name = _ref.name;
+ return name === requestingName;
+ });
- const isRequired = !!requesting && modifiers.some(modifier => {
+ var isRequired = !!requesting && modifiers.some(function (modifier) {
return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;
});
if (!isRequired) {
- const requesting = `\`${requestingName}\``;
- const requested = `\`${requestedName}\``;
- console.warn(`${requested} modifier is required by ${requesting} modifier in order to work, be sure to include it before ${requesting}!`);
+ var _requesting = '`' + requestingName + '`';
+ var requested = '`' + requestedName + '`';
+ console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');
}
return isRequired;
}
@@ -28487,7 +28687,7 @@ function removeEventListeners(reference, state) {
window.removeEventListener('resize', state.updateBound);
// Remove scroll event listener on scroll parents
- state.scrollParents.forEach(target => {
+ state.scrollParents.forEach(function (target) {
target.removeEventListener('scroll', state.updateBound);
});
@@ -28510,13 +28710,13 @@ function removeEventListeners(reference, state) {
* @returns {dataObject}
*/
function runModifiers(modifiers, data, ends) {
- const modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));
+ var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));
- modifiersToRun.forEach(modifier => {
+ modifiersToRun.forEach(function (modifier) {
if (modifier.function) {
console.warn('`modifier.function` is deprecated, use `modifier.fn`!');
}
- const fn = modifier.function || modifier.fn;
+ var fn = modifier.function || modifier.fn;
if (modifier.enabled && isFunction(fn)) {
// Add properties to offsets to make them a complete clientRect object
// we do this before each modifier to make sure the previous one doesn't
@@ -28541,7 +28741,7 @@ function runModifiers(modifiers, data, ends) {
*/
function setAttributes(element, attributes) {
Object.keys(attributes).forEach(function (prop) {
- const value = attributes[prop];
+ var value = attributes[prop];
if (value !== false) {
element.setAttribute(prop, attributes[prop]);
} else {
@@ -28559,8 +28759,8 @@ function setAttributes(element, attributes) {
* Object with a list of properties and values which will be applied to the element
*/
function setStyles(element, styles) {
- Object.keys(styles).forEach(prop => {
- let unit = '';
+ Object.keys(styles).forEach(function (prop) {
+ var unit = '';
// add unit if the value is numeric and is one of the following
if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {
unit = 'px';
@@ -28570,8 +28770,8 @@ function setStyles(element, styles) {
}
function attachToScrollParents(scrollParent, event, callback, scrollParents) {
- const isBody = scrollParent.nodeName === 'BODY';
- const target = isBody ? window : scrollParent;
+ var isBody = scrollParent.nodeName === 'BODY';
+ var target = isBody ? window : scrollParent;
target.addEventListener(event, callback, { passive: true });
if (!isBody) {
@@ -28592,7 +28792,7 @@ function setupEventListeners(reference, options, state, updateBound) {
window.addEventListener('resize', state.updateBound, { passive: true });
// Scroll event listener on scroll parents
- const scrollElement = getScrollParent(reference);
+ var scrollElement = getScrollParent(reference);
attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);
state.scrollElement = scrollElement;
state.eventsEnabled = true;
@@ -28607,39 +28807,73 @@ function setupEventListeners(reference, options, state, updateBound) {
// ```
// The default export will be removed in the next major version.
var index = {
- computeAutoPlacement,
- debounce,
- findIndex,
- getBordersSize,
- getBoundaries,
- getBoundingClientRect,
- getClientRect,
- getOffsetParent,
- getOffsetRect,
- getOffsetRectRelativeToArbitraryNode,
- getOuterSizes,
- getParentNode,
- getPopperOffsets,
- getReferenceOffsets,
- getScroll,
- getScrollParent,
- getStyleComputedProperty,
- getSupportedPropertyName,
- getWindowSizes,
- isFixed,
- isFunction,
- isModifierEnabled,
- isModifierRequired,
- isNative,
- isNumeric,
- removeEventListeners,
- runModifiers,
- setAttributes,
- setStyles,
- setupEventListeners
+ computeAutoPlacement: computeAutoPlacement,
+ debounce: debounce,
+ findIndex: findIndex,
+ getBordersSize: getBordersSize,
+ getBoundaries: getBoundaries,
+ getBoundingClientRect: getBoundingClientRect,
+ getClientRect: getClientRect,
+ getOffsetParent: getOffsetParent,
+ getOffsetRect: getOffsetRect,
+ getOffsetRectRelativeToArbitraryNode: getOffsetRectRelativeToArbitraryNode,
+ getOuterSizes: getOuterSizes,
+ getParentNode: getParentNode,
+ getPopperOffsets: getPopperOffsets,
+ getReferenceOffsets: getReferenceOffsets,
+ getScroll: getScroll,
+ getScrollParent: getScrollParent,
+ getStyleComputedProperty: getStyleComputedProperty,
+ getSupportedPropertyName: getSupportedPropertyName,
+ getWindowSizes: getWindowSizes,
+ isFixed: isFixed,
+ isFunction: isFunction,
+ isModifierEnabled: isModifierEnabled,
+ isModifierRequired: isModifierRequired,
+ isNative: isNative,
+ isNumeric: isNumeric,
+ removeEventListeners: removeEventListeners,
+ runModifiers: runModifiers,
+ setAttributes: setAttributes,
+ setStyles: setStyles,
+ setupEventListeners: setupEventListeners
};
-export { computeAutoPlacement, debounce, findIndex, getBordersSize, getBoundaries, getBoundingClientRect, getClientRect, getOffsetParent, getOffsetRect, getOffsetRectRelativeToArbitraryNode, getOuterSizes, getParentNode, getPopperOffsets, getReferenceOffsets, getScroll, getScrollParent, getStyleComputedProperty, getSupportedPropertyName, getWindowSizes, isFixed, isFunction, isModifierEnabled, isModifierRequired, isNative, isNumeric, removeEventListeners, runModifiers, setAttributes, setStyles, setupEventListeners };export default index;
+exports.computeAutoPlacement = computeAutoPlacement;
+exports.debounce = debounce;
+exports.findIndex = findIndex;
+exports.getBordersSize = getBordersSize;
+exports.getBoundaries = getBoundaries;
+exports.getBoundingClientRect = getBoundingClientRect;
+exports.getClientRect = getClientRect;
+exports.getOffsetParent = getOffsetParent;
+exports.getOffsetRect = getOffsetRect;
+exports.getOffsetRectRelativeToArbitraryNode = getOffsetRectRelativeToArbitraryNode;
+exports.getOuterSizes = getOuterSizes;
+exports.getParentNode = getParentNode;
+exports.getPopperOffsets = getPopperOffsets;
+exports.getReferenceOffsets = getReferenceOffsets;
+exports.getScroll = getScroll;
+exports.getScrollParent = getScrollParent;
+exports.getStyleComputedProperty = getStyleComputedProperty;
+exports.getSupportedPropertyName = getSupportedPropertyName;
+exports.getWindowSizes = getWindowSizes;
+exports.isFixed = isFixed;
+exports.isFunction = isFunction;
+exports.isModifierEnabled = isModifierEnabled;
+exports.isModifierRequired = isModifierRequired;
+exports.isNative = isNative;
+exports.isNumeric = isNumeric;
+exports.removeEventListeners = removeEventListeners;
+exports.runModifiers = runModifiers;
+exports.setAttributes = setAttributes;
+exports.setStyles = setStyles;
+exports.setupEventListeners = setupEventListeners;
+exports['default'] = index;
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+})));
//# sourceMappingURL=popper-utils.js.map
/*!
diff --git a/public/js/blue-twilight.min.js b/public/js/blue-twilight.min.js
index ea81e8e..ecd7492 100644
--- a/public/js/blue-twilight.min.js
+++ b/public/js/blue-twilight.min.js
@@ -1,10 +1 @@
-function AnalyseAlbumViewModel(){this.el="#analyse-album",this.data={imagesFailed:[],imagesToAnalyse:[],imagesInProgress:[],imagesRecentlyCompleted:[],numberSuccessful:0,numberFailed:0},this.computed={failedPercentage:function(){var t=0;return this.numberTotal>0&&(t=this.numberFailed/this.numberTotal*100),t.toFixed(2)+"%"},isCompleted:function(){return this.numberTotal>0&&this.numberSuccessful+this.numberFailed>=this.numberTotal},latestCompletedImages:function(){var t=this.imagesRecentlyCompleted.length-3<0?0:this.imagesRecentlyCompleted.length-3,e=t+3;return this.imagesRecentlyCompleted.slice(t,e)},numberTotal:function(){return this.imagesToAnalyse.length},successfulPercentage:function(){var t=0;return this.numberTotal>0&&(t=this.numberSuccessful/this.numberTotal*100),t.toFixed(2)+"%"}},this.methods={analyseImage:function(t){var e=this;this.imagesToAnalyse.push(t),$.ajax(t.url,{beforeSend:function(){e.imagesInProgress.push(t)},dataType:"json",error:function(n,i,r){e.numberFailed++,e.imagesFailed.push({name:t.name,reason:i}),t.isSuccessful=!1,t.isPending=!1},method:"POST",success:function(n){if(n.is_successful){e.numberSuccessful++,t.isSuccessful=!0,t.isPending=!1,e.imagesRecentlyCompleted.push(t);var i=e.imagesInProgress.indexOf(t);i>-1&&e.imagesInProgress.splice(i,1)}else e.numberFailed++,e.imagesFailed.push({name:t.name,reason:n.message}),t.isSuccessful=!1,t.isPending=!1}})}}}function AnalyseImageViewModel(t){this.isPending=!0,this.isSuccessful=!1,this.name=t.name,this.photoID=t.photo_id,this.url=t.url}function EditPhotosViewModel(t,e,n){this.el="#photos-tab",this.data={albums:[],bulkModifyMethod:"",isSubmitting:!1,photoIDs:[],photoIDsAvailable:[],selectAllInAlbum:0},this.methods={bulkModifySelected:function(t){if(this.isSubmitting)return!0;var n=this,i=$(t.target).closest("form");return"change_album"===this.bulkModifyMethod?(this.promptForNewAlbum(function(t){var e=$("select",t).val();$('input[name="new-album-id"]',i).val(e),n.isSubmitting=!0,$('button[name="bulk-apply"]',i).click(),_bt_showLoadingModal()}),t.preventDefault(),!1):"delete"!==this.bulkModifyMethod||(bootbox.dialog({message:e.delete_bulk_confirm_message,title:e.delete_bulk_confirm_title,buttons:{cancel:{label:e.action_cancel,className:"btn-secondary"},confirm:{label:e.action_delete,className:"btn-danger",callback:function(){n.isSubmitting=!0,$('button[name="bulk-apply"]',i).click(),_bt_showLoadingModal()}}}}),t.preventDefault(),!1)},changeAlbum:function(t){this.selectPhotoSingle(t.target);var e=this.photoIDs[0];return this.photoIDs=[],this.promptForNewAlbum(function(t){var i=$("select",t).val();$.post(n.move_photo.replace(/\/0$/,"/"+e),{new_album_id:i},function(){window.location.reload()})}),t.preventDefault(),!1},deletePhoto:function(t){var i=this;this.selectPhotoSingle(t.target);var r=i.photoIDs[0];return this.photoIDs=[],bootbox.dialog({message:e.delete_confirm_message,title:e.delete_confirm_title,buttons:{cancel:{label:e.action_cancel,className:"btn-secondary"},confirm:{label:e.action_delete,className:"btn-danger",callback:function(){var t=n.delete_photo;t=t.replace(/\/0$/,"/"+r),$(".loading",parent).show(),$.post(t,{_method:"DELETE"},function(t){window.location.reload()})}}}}),t.preventDefault(),!1},flip:function(t,e,i){var r=n.flip_photo;r=r.replace("/0/","/"+this.photoIDs[0]+"/"),r=t?r.replace(/\/-1\//,"/1/"):r.replace(/\/-1\//,"/0/"),r=e?r.replace(/\/-2$/,"/1"):r.replace(/\/-2$/,"/0"),$(".loading",i).show(),$.post(r,function(){var t=$("img.photo-thumbnail",i),e=t.data("original-src");t.attr("src",e+"&_="+(new Date).getTime()),$(".loading",i).hide()}),this.photoIDs=[]},flipBoth:function(t){return this.selectPhotoSingle(t.target),this.flip(!0,!0,$(t.target).closest(".photo")),t.preventDefault(),!1},flipHorizontal:function(t){return this.selectPhotoSingle(t.target),this.flip(!0,!1,$(t.target).closest(".photo")),t.preventDefault(),!1},flipVertical:function(t){return this.selectPhotoSingle(t.target),this.flip(!1,!0,$(t.target).closest(".photo")),t.preventDefault(),!1},isPhotoSelected:function(t){return this.photoIDs.indexOf(t)>-1?"checked":""},promptForNewAlbum:function(n){for(var i=this.albums,r=$("").attr("name","album_id").addClass("form-control"),o=0;o").attr("value",i[o].id).html(i[o].name).appendTo(r);t===i[o].id&&s.attr("selected","selected")}bootbox.dialog({message:$("").html(e.change_album_message).prop("outerHTML")+r.prop("outerHTML"),title:e.change_album_title,buttons:{cancel:{label:e.action_cancel,className:"btn-secondary"},confirm:{label:e.action_continue,className:"btn-success",callback:function(){n(this)}}}})},regenerateThumbnails:function(t){this.selectPhotoSingle(t.target);var e=$(t.target).closest(".photo"),i=n.regenerate_thumbnails;return i=i.replace(/\/0$/,"/"+this.photoIDs[0]),$(".loading",e).show(),$.post(i,function(){var t=$("img.photo-thumbnail",e),n=t.data("original-src");t.attr("src",n+"&_="+(new Date).getTime()),$(".loading",e).hide()}),this.photoIDs=[],t.preventDefault(),!1},rotate:function(t,e){var i=n.rotate_photo;i=i.replace("/0/","/"+this.photoIDs[0]+"/"),i=i.replace(/\/1$/,"/"+t),$(".loading",e).show(),$.post(i,function(){var t=$("img.photo-thumbnail",e),n=t.data("original-src");t.attr("src",n+"&_="+(new Date).getTime()),$(".loading",e).hide()}),this.photoIDs=[]},rotateLeft:function(t){return this.selectPhotoSingle(t.target),this.rotate(90,$(t.target).closest(".photo")),t.preventDefault(),!1},rotateRight:function(t){return this.selectPhotoSingle(t.target),this.rotate(270,$(t.target).closest(".photo")),t.preventDefault(),!1},selectAll:function(){var t=this;return bootbox.dialog({title:e.select_all_choice_title,message:e.select_all_choice_message,buttons:{select_all:{label:e.select_all_choice_all_action,className:"btn-secondary",callback:function(){for(t.selectAllInAlbum=1,i=0;i=this.images.length&&(t=0),this.current=this.images[t],this.currentIndex=t},startSlideshow:function(){this.images.length<=0||(this.interval=window.setInterval(this.rotateNextImage,t),this.current=this.images[0],this.isRunning=!0)}}}function UploadPhotosViewModel(t,e,n,i){this.el="#upload-tab",this.data={currentStatus:"",imagesFailed:0,imagesTotal:0,imagesUploaded:0,isBulkUploadInProgress:!1,isUploadInProgress:!1,statusMessages:[]},this.computed={failedPercentage:function(){var t=0;return this.imagesTotal>0&&(t=this.imagesFailed/this.imagesTotal*100),t.toFixed(2)+"%"},successfulPercentage:function(){var t=0;return this.imagesTotal>0&&(t=this.imagesUploaded/this.imagesTotal*100),t.toFixed(2)+"%"}},this.methods={onUploadCompleted:function(){this.currentStatus=n.upload_status.replace(":current",this.imagesUploaded+this.imagesFailed).replace(":total",this.imagesTotal),this.imagesFailed+this.imagesUploaded>=this.imagesTotal&&(this.isUploadInProgress=!1,0===this.imagesFailed&&this.imagesUploaded>0&&(window.location=i.analyse))},onUploadFailed:function(t,e){this.imagesFailed++,this.statusMessages.push({message_class:"text-danger",message_text:n.image_failed.replace(":file_name",e)}),this.onUploadCompleted()},onUploadSuccessful:function(t,e){t.is_successful?(this.imagesUploaded++,this.onUploadCompleted()):this.onUploadFailed(t,e)},uploadFile:function(i,r){var o=this,s=new FormData;s.append("album_id",t),s.append("queue_token",e),s.append("photo[]",r,r.name),$.ajax({contentType:!1,data:s,error:function(t){o.onUploadFailed(t,r.name)},method:$(i).attr("method"),processData:!1,success:function(t){o.onUploadSuccessful(t,r.name)},url:$(i).attr("action")}),this.isUploadInProgress=!0,this.currentStatus=n.upload_status.replace(":current",0).replace(":total",this.imagesTotal)},uploadBulkFiles:function(t){return this.isBulkUploadInProgress=!0,!0},uploadIndividualFiles:function(t){var e=$("input[type=file]",t.target),i=e[0].files;this.currentStatus="",this.statusMessages=[],this.imagesUploaded=0,this.imagesFailed=0,this.imagesTotal=i.length,this.isUploadInProgress=!0;for(var r=0;r0&&e-1 in t)}function r(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}function o(t,e,n){return pt.isFunction(e)?pt.grep(t,function(t,i){return!!e.call(t,i,t)!==n}):e.nodeType?pt.grep(t,function(t){return t===e!==n}):"string"!=typeof e?pt.grep(t,function(t){return at.call(e,t)>-1!==n}):Et.test(e)?pt.filter(e,t,n):(e=pt.filter(e,t),pt.grep(t,function(t){return at.call(e,t)>-1!==n&&1===t.nodeType}))}function s(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function a(t){var e={};return pt.each(t.match(kt)||[],function(t,n){e[n]=!0}),e}function l(t){return t}function u(t){throw t}function c(t,e,n,i){var r;try{t&&pt.isFunction(r=t.promise)?r.call(t).done(e).fail(n):t&&pt.isFunction(r=t.then)?r.call(t,e,n):e.apply(void 0,[t].slice(i))}catch(t){n.apply(void 0,[t])}}function f(){nt.removeEventListener("DOMContentLoaded",f),t.removeEventListener("load",f),pt.ready()}function d(){this.expando=pt.expando+d.uid++}function h(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:Pt.test(t)?JSON.parse(t):t)}function p(t,e,n){var i;if(void 0===n&&1===t.nodeType)if(i="data-"+e.replace(Rt,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(i))){try{n=h(n)}catch(t){}jt.set(t,e,n)}else n=void 0;return n}function g(t,e,n,i){var r,o=1,s=20,a=i?function(){return i.cur()}:function(){return pt.css(t,e,"")},l=a(),u=n&&n[3]||(pt.cssNumber[e]?"":"px"),c=(pt.cssNumber[e]||"px"!==u&&+l)&&Mt.exec(pt.css(t,e));if(c&&c[3]!==u){u=u||c[3],n=n||[],c=+l||1;do{o=o||".5",c/=o,pt.style(t,e,c+u)}while(o!==(o=a()/l)&&1!==o&&--s)}return n&&(c=+c||+l||0,r=n[1]?c+(n[1]+1)*n[2]:+n[2],i&&(i.unit=u,i.start=c,i.end=r)),r}function m(t){var e,n=t.ownerDocument,i=t.nodeName,r=Bt[i];return r||(e=n.body.appendChild(n.createElement(i)),r=pt.css(e,"display"),e.parentNode.removeChild(e),"none"===r&&(r="block"),Bt[i]=r,r)}function v(t,e){for(var n,i,r=[],o=0,s=t.length;o-1)r&&r.push(o);else if(u=pt.contains(o.ownerDocument,o),s=y(f.appendChild(o),"script"),u&&b(s),n)for(c=0;o=s[c++];)Kt.test(o.type||"")&&n.push(o);return f}function w(){return!0}function C(){return!1}function T(){try{return nt.activeElement}catch(t){}}function E(t,e,n,i,r,o){var s,a;if("object"==typeof e){"string"!=typeof n&&(i=i||n,n=void 0);for(a in e)E(t,a,n,i,e[a],o);return t}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=C;else if(!r)return t;return 1===o&&(s=r,r=function(t){return pt().off(t),s.apply(this,arguments)},r.guid=s.guid||(s.guid=pt.guid++)),t.each(function(){pt.event.add(this,e,r,i,n)})}function x(t,e){return r(t,"table")&&r(11!==e.nodeType?e:e.firstChild,"tr")?pt(">tbody",t)[0]||t:t}function A(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function S(t){var e=ne.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function O(t,e){var n,i,r,o,s,a,l,u;if(1===e.nodeType){if($t.hasData(t)&&(o=$t.access(t),s=$t.set(e,o),u=o.events)){delete s.handle,s.events={};for(r in u)for(n=0,i=u[r].length;n1&&"string"==typeof p&&!ht.checkClone&&ee.test(p))return t.each(function(n){var o=t.eq(n);g&&(e[0]=p.call(this,n,o.html())),I(o,e,i,r)});if(d&&(o=_(e,t[0].ownerDocument,!1,t,r),s=o.firstChild,1===o.childNodes.length&&(o=s),s||r)){for(a=pt.map(y(o,"script"),A),l=a.length;f=0&&nw.cacheLength&&delete t[e.shift()],t[n+" "]=i}var e=[];return t}function i(t){return t[F]=!0,t}function r(t){var e=D.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function o(t,e){for(var n=t.split("|"),i=n.length;i--;)w.attrHandle[n[i]]=e}function s(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function a(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&Ct(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function l(t){return i(function(e){return e=+e,i(function(n,i){for(var r,o=t([],n.length,e),s=o.length;s--;)n[r=o[s]]&&(n[r]=!(i[r]=n[r]))})})}function u(t){return t&&void 0!==t.getElementsByTagName&&t}function c(){}function f(t){for(var e=0,n=t.length,i="";e1?function(e,n,i){for(var r=t.length;r--;)if(!t[r](e,n,i))return!1;return!0}:t[0]}function p(t,n,i){for(var r=0,o=n.length;r-1&&(i[u]=!(s[u]=f))}}else b=g(b===s?b.splice(m,b.length):b),o?o(null,s,b,l):Y.apply(s,b)})}function v(t){for(var e,n,i,r=t.length,o=w.relative[t[0].type],s=o||w.relative[" "],a=o?1:0,l=d(function(t){return t===e},s,!0),u=d(function(t){return J(e,t)>-1},s,!0),c=[function(t,n,i){var r=!o&&(i||n!==S)||((e=n).nodeType?l(t,n,i):u(t,n,i));return e=null,r}];a1&&h(c),a>1&&f(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(ot,"$1"),n,a0,o=t.length>0,s=function(i,s,a,l,u){var c,f,d,h=0,p="0",m=i&&[],v=[],y=S,b=i||o&&w.find.TAG("*",u),_=H+=null==y?1:Math.random()||.1,C=b.length;for(u&&(S=s===D||s||u);p!==C&&null!=(c=b[p]);p++){if(o&&c){for(f=0,s||c.ownerDocument===D||(I(c),a=!L);d=t[f++];)if(d(c,s||D,a)){l.push(c);break}u&&(H=_)}r&&((c=!d&&c)&&h--,i&&m.push(c))}if(h+=p,r&&p!==h){for(f=0;d=n[f++];)d(m,v,s,a);if(i){if(h>0)for(;p--;)m[p]||v[p]||(v[p]=Q.call(l));v=g(v)}Y.apply(l,v),u&&!i&&v.length>0&&h+n.length>1&&e.uniqueSort(l)}return u&&(H=_,S=y),m};return r?i(s):s}var b,_,w,C,T,E,x,A,S,O,k,I,D,N,L,$,j,P,R,F="sizzle"+1*new Date,M=t.document,H=0,W=0,q=n(),B=n(),U=n(),V=function(t,e){return t===e&&(k=!0),0},K={}.hasOwnProperty,z=[],Q=z.pop,G=z.push,Y=z.push,X=z.slice,J=function(t,e){for(var n=0,i=t.length;n+~]|"+tt+")"+tt+"*"),lt=new RegExp("="+tt+"*([^\\]'\"]*?)"+tt+"*\\]","g"),ut=new RegExp(it),ct=new RegExp("^"+et+"$"),ft={ID:new RegExp("^#("+et+")"),CLASS:new RegExp("^\\.("+et+")"),TAG:new RegExp("^("+et+"|[*])"),ATTR:new RegExp("^"+nt),PSEUDO:new RegExp("^"+it),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+tt+"*(even|odd|(([+-]|)(\\d*)n|)"+tt+"*(?:([+-]|)"+tt+"*(\\d+)|))"+tt+"*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^"+tt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+tt+"*((?:-\\d)?\\d*)"+tt+"*\\)|)(?=[^-]|$)","i")},dt=/^(?:input|select|textarea|button)$/i,ht=/^h\d$/i,pt=/^[^{]+\{\s*\[native \w/,gt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,mt=/[+~]/,vt=new RegExp("\\\\([\\da-f]{1,6}"+tt+"?|("+tt+")|.)","ig"),yt=function(t,e,n){var i="0x"+e-65536;return i!==i||n?e:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},bt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,_t=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},wt=function(){I()},Ct=d(function(t){
-return!0===t.disabled&&("form"in t||"label"in t)},{dir:"parentNode",next:"legend"});try{Y.apply(z=X.call(M.childNodes),M.childNodes),z[M.childNodes.length].nodeType}catch(t){Y={apply:z.length?function(t,e){G.apply(t,X.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}_=e.support={},T=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},I=e.setDocument=function(t){var e,n,i=t?t.ownerDocument||t:M;return i!==D&&9===i.nodeType&&i.documentElement?(D=i,N=D.documentElement,L=!T(D),M!==D&&(n=D.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",wt,!1):n.attachEvent&&n.attachEvent("onunload",wt)),_.attributes=r(function(t){return t.className="i",!t.getAttribute("className")}),_.getElementsByTagName=r(function(t){return t.appendChild(D.createComment("")),!t.getElementsByTagName("*").length}),_.getElementsByClassName=pt.test(D.getElementsByClassName),_.getById=r(function(t){return N.appendChild(t).id=F,!D.getElementsByName||!D.getElementsByName(F).length}),_.getById?(w.filter.ID=function(t){var e=t.replace(vt,yt);return function(t){return t.getAttribute("id")===e}},w.find.ID=function(t,e){if(void 0!==e.getElementById&&L){var n=e.getElementById(t);return n?[n]:[]}}):(w.filter.ID=function(t){var e=t.replace(vt,yt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},w.find.ID=function(t,e){if(void 0!==e.getElementById&&L){var n,i,r,o=e.getElementById(t);if(o){if((n=o.getAttributeNode("id"))&&n.value===t)return[o];for(r=e.getElementsByName(t),i=0;o=r[i++];)if((n=o.getAttributeNode("id"))&&n.value===t)return[o]}return[]}}),w.find.TAG=_.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):_.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],r=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},w.find.CLASS=_.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&L)return e.getElementsByClassName(t)},j=[],$=[],(_.qsa=pt.test(D.querySelectorAll))&&(r(function(t){N.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&$.push("[*^$]="+tt+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||$.push("\\["+tt+"*(?:value|"+Z+")"),t.querySelectorAll("[id~="+F+"-]").length||$.push("~="),t.querySelectorAll(":checked").length||$.push(":checked"),t.querySelectorAll("a#"+F+"+*").length||$.push(".#.+[+~]")}),r(function(t){t.innerHTML="";var e=D.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&$.push("name"+tt+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&$.push(":enabled",":disabled"),N.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&$.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),$.push(",.*:")})),(_.matchesSelector=pt.test(P=N.matches||N.webkitMatchesSelector||N.mozMatchesSelector||N.oMatchesSelector||N.msMatchesSelector))&&r(function(t){_.disconnectedMatch=P.call(t,"*"),P.call(t,"[s!='']:x"),j.push("!=",it)}),$=$.length&&new RegExp($.join("|")),j=j.length&&new RegExp(j.join("|")),e=pt.test(N.compareDocumentPosition),R=e||pt.test(N.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},V=e?function(t,e){if(t===e)return k=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&n||!_.sortDetached&&e.compareDocumentPosition(t)===n?t===D||t.ownerDocument===M&&R(M,t)?-1:e===D||e.ownerDocument===M&&R(M,e)?1:O?J(O,t)-J(O,e):0:4&n?-1:1)}:function(t,e){if(t===e)return k=!0,0;var n,i=0,r=t.parentNode,o=e.parentNode,a=[t],l=[e];if(!r||!o)return t===D?-1:e===D?1:r?-1:o?1:O?J(O,t)-J(O,e):0;if(r===o)return s(t,e);for(n=t;n=n.parentNode;)a.unshift(n);for(n=e;n=n.parentNode;)l.unshift(n);for(;a[i]===l[i];)i++;return i?s(a[i],l[i]):a[i]===M?-1:l[i]===M?1:0},D):D},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==D&&I(t),n=n.replace(lt,"='$1']"),_.matchesSelector&&L&&!U[n+" "]&&(!j||!j.test(n))&&(!$||!$.test(n)))try{var i=P.call(t,n);if(i||_.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){}return e(n,D,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==D&&I(t),R(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==D&&I(t);var n=w.attrHandle[e.toLowerCase()],i=n&&K.call(w.attrHandle,e.toLowerCase())?n(t,e,!L):void 0;return void 0!==i?i:_.attributes||!L?t.getAttribute(e):(i=t.getAttributeNode(e))&&i.specified?i.value:null},e.escape=function(t){return(t+"").replace(bt,_t)},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,n=[],i=0,r=0;if(k=!_.detectDuplicates,O=!_.sortStable&&t.slice(0),t.sort(V),k){for(;e=t[r++];)e===t[r]&&(i=n.push(r));for(;i--;)t.splice(n[i],1)}return O=null,t},C=e.getText=function(t){var e,n="",i=0,r=t.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=C(t)}else if(3===r||4===r)return t.nodeValue}else for(;e=t[i++];)n+=C(e);return n},w=e.selectors={cacheLength:50,createPseudo:i,match:ft,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(vt,yt),t[3]=(t[3]||t[4]||t[5]||"").replace(vt,yt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return ft.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&ut.test(n)&&(e=E(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(vt,yt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=q[t+" "];return e||(e=new RegExp("(^|"+tt+")"+t+"("+tt+"|$)"))&&q(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,n,i){return function(r){var o=e.attr(r,t);return null==o?"!="===n:!n||(o+="","="===n?o===i:"!="===n?o!==i:"^="===n?i&&0===o.indexOf(i):"*="===n?i&&o.indexOf(i)>-1:"$="===n?i&&o.slice(-i.length)===i:"~="===n?(" "+o.replace(rt," ")+" ").indexOf(i)>-1:"|="===n&&(o===i||o.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,n,i,r){var o="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===i&&0===r?function(t){return!!t.parentNode}:function(e,n,l){var u,c,f,d,h,p,g=o!==s?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(m){if(o){for(;g;){for(d=e;d=d[g];)if(a?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;p=g="only"===t&&!p&&"nextSibling"}return!0}if(p=[s?m.firstChild:m.lastChild],s&&y){for(d=m,f=d[F]||(d[F]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),u=c[t]||[],h=u[0]===H&&u[1],b=h&&u[2],d=h&&m.childNodes[h];d=++h&&d&&d[g]||(b=h=0)||p.pop();)if(1===d.nodeType&&++b&&d===e){c[t]=[H,h,b];break}}else if(y&&(d=e,f=d[F]||(d[F]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),u=c[t]||[],h=u[0]===H&&u[1],b=h),!1===b)for(;(d=++h&&d&&d[g]||(b=h=0)||p.pop())&&((a?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++b||(y&&(f=d[F]||(d[F]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),c[t]=[H,b]),d!==e)););return(b-=r)===i||b%i==0&&b/i>=0}}},PSEUDO:function(t,n){var r,o=w.pseudos[t]||w.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[F]?o(n):o.length>1?(r=[t,t,"",n],w.setFilters.hasOwnProperty(t.toLowerCase())?i(function(t,e){for(var i,r=o(t,n),s=r.length;s--;)i=J(t,r[s]),t[i]=!(e[i]=r[s])}):function(t){return o(t,0,r)}):o}},pseudos:{not:i(function(t){var e=[],n=[],r=x(t.replace(ot,"$1"));return r[F]?i(function(t,e,n,i){for(var o,s=r(t,null,i,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))}):function(t,i,o){return e[0]=t,r(e,null,o,n),e[0]=null,!n.pop()}}),has:i(function(t){return function(n){return e(t,n).length>0}}),contains:i(function(t){return t=t.replace(vt,yt),function(e){return(e.textContent||e.innerText||C(e)).indexOf(t)>-1}}),lang:i(function(t){return ct.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(vt,yt).toLowerCase(),function(e){var n;do{if(n=L?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===N},focus:function(t){return t===D.activeElement&&(!D.hasFocus||D.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:a(!1),disabled:a(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!w.pseudos.empty(t)},header:function(t){return ht.test(t.nodeName)},input:function(t){return dt.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:l(function(){return[0]}),last:l(function(t,e){return[e-1]}),eq:l(function(t,e,n){return[n<0?n+e:n]}),even:l(function(t,e){for(var n=0;n=0;)t.push(i);return t}),gt:l(function(t,e,n){for(var i=n<0?n+e:n;++i2&&"ID"===(s=o[0]).type&&9===e.nodeType&&L&&w.relative[o[1].type]){if(!(e=(w.find.ID(s.matches[0].replace(vt,yt),e)||[])[0]))return n;c&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(r=ft.needsContext.test(t)?0:o.length;r--&&(s=o[r],!w.relative[a=s.type]);)if((l=w.find[a])&&(i=l(s.matches[0].replace(vt,yt),mt.test(o[0].type)&&u(e.parentNode)||e))){if(o.splice(r,1),!(t=i.length&&f(o)))return Y.apply(n,i),n;break}}return(c||x(t,d))(i,e,!L,n,!e||mt.test(t)&&u(e.parentNode)||e),n},_.sortStable=F.split("").sort(V).join("")===F,_.detectDuplicates=!!k,I(),_.sortDetached=r(function(t){return 1&t.compareDocumentPosition(D.createElement("fieldset"))}),r(function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")})||o("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),_.attributes&&r(function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||o("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),r(function(t){return null==t.getAttribute("disabled")})||o(Z,function(t,e,n){var i;if(!n)return!0===t[e]?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null}),e}(t);pt.find=bt,pt.expr=bt.selectors,pt.expr[":"]=pt.expr.pseudos,pt.uniqueSort=pt.unique=bt.uniqueSort,pt.text=bt.getText,pt.isXMLDoc=bt.isXML,pt.contains=bt.contains,pt.escapeSelector=bt.escape;var _t=function(t,e,n){for(var i=[],r=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(r&&pt(t).is(n))break;i.push(t)}return i},wt=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},Ct=pt.expr.match.needsContext,Tt=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,Et=/^.[^:#\[\.,]*$/;pt.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?pt.find.matchesSelector(i,t)?[i]:[]:pt.find.matches(t,pt.grep(e,function(t){return 1===t.nodeType}))},pt.fn.extend({find:function(t){var e,n,i=this.length,r=this;if("string"!=typeof t)return this.pushStack(pt(t).filter(function(){for(e=0;e1?pt.uniqueSort(n):n},filter:function(t){return this.pushStack(o(this,t||[],!1))},not:function(t){return this.pushStack(o(this,t||[],!0))},is:function(t){return!!o(this,"string"==typeof t&&Ct.test(t)?pt(t):t||[],!1).length}});var xt,At=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(pt.fn.init=function(t,e,n){var i,r;if(!t)return this;if(n=n||xt,"string"==typeof t){if(!(i="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:At.exec(t))||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof pt?e[0]:e,pt.merge(this,pt.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:nt,!0)),Tt.test(i[1])&&pt.isPlainObject(e))for(i in e)pt.isFunction(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return r=nt.getElementById(i[2]),r&&(this[0]=r,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):pt.isFunction(t)?void 0!==n.ready?n.ready(t):t(pt):pt.makeArray(t,this)}).prototype=pt.fn,xt=pt(nt);var St=/^(?:parents|prev(?:Until|All))/,Ot={children:!0,contents:!0,next:!0,prev:!0};pt.fn.extend({has:function(t){var e=pt(t,this),n=e.length;return this.filter(function(){for(var t=0;t-1:1===n.nodeType&&pt.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?pt.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?at.call(pt(t),this[0]):at.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(pt.uniqueSort(pt.merge(this.get(),pt(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),pt.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return _t(t,"parentNode")},parentsUntil:function(t,e,n){return _t(t,"parentNode",n)},next:function(t){return s(t,"nextSibling")},prev:function(t){return s(t,"previousSibling")},nextAll:function(t){return _t(t,"nextSibling")},prevAll:function(t){return _t(t,"previousSibling")},nextUntil:function(t,e,n){return _t(t,"nextSibling",n)},prevUntil:function(t,e,n){return _t(t,"previousSibling",n)},siblings:function(t){return wt((t.parentNode||{}).firstChild,t)},children:function(t){return wt(t.firstChild)},contents:function(t){return r(t,"iframe")?t.contentDocument:(r(t,"template")&&(t=t.content||t),pt.merge([],t.childNodes))}},function(t,e){pt.fn[t]=function(n,i){var r=pt.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=pt.filter(i,r)),this.length>1&&(Ot[t]||pt.uniqueSort(r),St.test(t)&&r.reverse()),this.pushStack(r)}});var kt=/[^\x20\t\r\n\f]+/g;pt.Callbacks=function(t){t="string"==typeof t?a(t):pt.extend({},t);var e,n,i,r,o=[],s=[],l=-1,u=function(){for(r=r||t.once,i=e=!0;s.length;l=-1)for(n=s.shift();++l-1;)o.splice(n,1),n<=l&&l--}),this},has:function(t){return t?pt.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return r=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return r=s=[],n||e||(o=n=""),this},locked:function(){return!!r},fireWith:function(t,n){return r||(n=n||[],n=[t,n.slice?n.slice():n],s.push(n),e||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},pt.extend({Deferred:function(e){var n=[["notify","progress",pt.Callbacks("memory"),pt.Callbacks("memory"),2],["resolve","done",pt.Callbacks("once memory"),pt.Callbacks("once memory"),0,"resolved"],["reject","fail",pt.Callbacks("once memory"),pt.Callbacks("once memory"),1,"rejected"]],i="pending",r={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return r.then(null,t)},pipe:function(){var t=arguments;return pt.Deferred(function(e){pt.each(n,function(n,i){var r=pt.isFunction(t[i[4]])&&t[i[4]];o[i[1]](function(){var t=r&&r.apply(this,arguments);t&&pt.isFunction(t.promise)?t.promise().progress(e.notify).done(e.resolve).fail(e.reject):e[i[0]+"With"](this,r?[t]:arguments)})}),t=null}).promise()},then:function(e,i,r){function o(e,n,i,r){return function(){var a=this,c=arguments,f=function(){var t,f;if(!(e=s&&(i!==u&&(a=void 0,c=[t]),n.rejectWith(a,c))}};e?d():(pt.Deferred.getStackHook&&(d.stackTrace=pt.Deferred.getStackHook()),t.setTimeout(d))}}var s=0;return pt.Deferred(function(t){n[0][3].add(o(0,t,pt.isFunction(r)?r:l,t.notifyWith)),n[1][3].add(o(0,t,pt.isFunction(e)?e:l)),n[2][3].add(o(0,t,pt.isFunction(i)?i:u))}).promise()},promise:function(t){return null!=t?pt.extend(t,r):r}},o={};return pt.each(n,function(t,e){var s=e[2],a=e[5];r[e[1]]=s.add,a&&s.add(function(){i=a},n[3-t][2].disable,n[0][2].lock),s.add(e[3].fire),o[e[0]]=function(){return o[e[0]+"With"](this===o?void 0:this,arguments),this},o[e[0]+"With"]=s.fireWith}),r.promise(o),e&&e.call(o,o),o},when:function(t){var e=arguments.length,n=e,i=Array(n),r=rt.call(arguments),o=pt.Deferred(),s=function(t){return function(n){i[t]=this,r[t]=arguments.length>1?rt.call(arguments):n,--e||o.resolveWith(i,r)}};if(e<=1&&(c(t,o.done(s(n)).resolve,o.reject,!e),"pending"===o.state()||pt.isFunction(r[n]&&r[n].then)))return o.then();for(;n--;)c(r[n],s(n),o.reject);return o.promise()}});var It=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;pt.Deferred.exceptionHook=function(e,n){t.console&&t.console.warn&&e&&It.test(e.name)&&t.console.warn("jQuery.Deferred exception: "+e.message,e.stack,n)},pt.readyException=function(e){t.setTimeout(function(){throw e})};var Dt=pt.Deferred();pt.fn.ready=function(t){return Dt.then(t).catch(function(t){pt.readyException(t)}),this},pt.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--pt.readyWait:pt.isReady)||(pt.isReady=!0,!0!==t&&--pt.readyWait>0||Dt.resolveWith(nt,[pt]))}}),pt.ready.then=Dt.then,"complete"===nt.readyState||"loading"!==nt.readyState&&!nt.documentElement.doScroll?t.setTimeout(pt.ready):(nt.addEventListener("DOMContentLoaded",f),t.addEventListener("load",f));var Nt=function(t,e,n,i,r,o,s){var a=0,l=t.length,u=null==n;if("object"===pt.type(n)){r=!0;for(a in n)Nt(t,e,a,n[a],!0,o,s)}else if(void 0!==i&&(r=!0,pt.isFunction(i)||(s=!0),u&&(s?(e.call(t,i),e=null):(u=e,e=function(t,e,n){return u.call(pt(t),n)})),e))for(;a1,null,!0)},removeData:function(t){return this.each(function(){jt.remove(this,t)})}}),pt.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=$t.get(t,e),n&&(!i||Array.isArray(n)?i=$t.access(t,e,pt.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=pt.queue(t,e),i=n.length,r=n.shift(),o=pt._queueHooks(t,e),s=function(){pt.dequeue(t,e)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===e&&n.unshift("inprogress"),delete o.stop,r.call(t,s,o)),!i&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return $t.get(t,n)||$t.access(t,n,{empty:pt.Callbacks("once memory").add(function(){$t.remove(t,[e+"queue",n])})})}}),pt.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length\x20\t\r\n\f]+)/i,Kt=/^$|\/(?:java|ecma)script/i,zt={option:[1,""],thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};zt.optgroup=zt.option,zt.tbody=zt.tfoot=zt.colgroup=zt.caption=zt.thead,zt.th=zt.td;var Qt=/<|?\w+;/;!function(){var t=nt.createDocumentFragment(),e=t.appendChild(nt.createElement("div")),n=nt.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),ht.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="",ht.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var Gt=nt.documentElement,Yt=/^key/,Xt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Jt=/^([^.]*)(?:\.(.+)|)/;pt.event={global:{},add:function(t,e,n,i,r){var o,s,a,l,u,c,f,d,h,p,g,m=$t.get(t);if(m)for(n.handler&&(o=n,n=o.handler,r=o.selector),r&&pt.find.matchesSelector(Gt,r),n.guid||(n.guid=pt.guid++),(l=m.events)||(l=m.events={}),(s=m.handle)||(s=m.handle=function(e){return void 0!==pt&&pt.event.triggered!==e.type?pt.event.dispatch.apply(t,arguments):void 0}),e=(e||"").match(kt)||[""],u=e.length;u--;)a=Jt.exec(e[u])||[],h=g=a[1],p=(a[2]||"").split(".").sort(),h&&(f=pt.event.special[h]||{},h=(r?f.delegateType:f.bindType)||h,f=pt.event.special[h]||{},c=pt.extend({type:h,origType:g,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&pt.expr.match.needsContext.test(r),namespace:p.join(".")},o),(d=l[h])||(d=l[h]=[],d.delegateCount=0,f.setup&&!1!==f.setup.call(t,i,p,s)||t.addEventListener&&t.addEventListener(h,s)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),r?d.splice(d.delegateCount++,0,c):d.push(c),pt.event.global[h]=!0)},remove:function(t,e,n,i,r){var o,s,a,l,u,c,f,d,h,p,g,m=$t.hasData(t)&&$t.get(t);if(m&&(l=m.events)){for(e=(e||"").match(kt)||[""],u=e.length;u--;)if(a=Jt.exec(e[u])||[],h=g=a[1],p=(a[2]||"").split(".").sort(),h){for(f=pt.event.special[h]||{},h=(i?f.delegateType:f.bindType)||h,d=l[h]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=d.length;o--;)c=d[o],!r&&g!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||i&&i!==c.selector&&("**"!==i||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,f.remove&&f.remove.call(t,c));s&&!d.length&&(f.teardown&&!1!==f.teardown.call(t,p,m.handle)||pt.removeEvent(t,h,m.handle),delete l[h])}else for(h in l)pt.event.remove(t,h+e[u],n,i,!0);pt.isEmptyObject(l)&&$t.remove(t,"handle events")}},dispatch:function(t){var e,n,i,r,o,s,a=pt.event.fix(t),l=new Array(arguments.length),u=($t.get(this,"events")||{})[a.type]||[],c=pt.event.special[a.type]||{};for(l[0]=a,e=1;e=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==t.type||!0!==u.disabled)){for(o=[],s={},n=0;n-1:pt.find(r,this,null,[u]).length),s[r]&&o.push(i);o.length&&a.push({elem:u,handlers:o})}return u=this,l\x20\t\r\n\f]*)[^>]*)\/>/gi,te=/