Socket
Socket
Sign inDemoInstall

tippy.js

Package Overview
Dependencies
1
Maintainers
1
Versions
152
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.0.0-alpha.2 to 5.0.0-beta.0

26

addons/cjs/tippy-addons.js
/**!
* tippy.js v5.0.0-alpha.2
* tippy.js v5.0.0-beta.0
* (c) 2017-2019 atomiks

@@ -20,3 +20,3 @@ * MIT License

if (process.env.NODE_ENV !== "production") {
__chunk_1.throwErrorWhen(!props || !props.target, 'You must specify a `target` prop indicating the CSS selector string ' + 'matching the target elements that should receive a tippy.');
__chunk_2.throwErrorWhen(!props || !props.target, 'You must specify a `target` prop indicating the CSS selector string ' + 'matching the target elements that should receive a tippy.');
}

@@ -142,4 +142,4 @@

if (!Array.isArray(tippyInstances)) {
__chunk_1.throwErrorWhen(!tippyInstances, 'First argument to `createSingleton()` must be an array of tippy ' + 'instances. The passed value was `' + tippyInstances + '`');
__chunk_1.throwErrorWhen( // @ts-ignore
__chunk_2.throwErrorWhen(!tippyInstances, 'First argument to `createSingleton()` must be an array of tippy ' + 'instances. The passed value was `' + tippyInstances + '`');
__chunk_2.throwErrorWhen( // @ts-ignore
tippyInstances.reference && tippyInstances.reference._tippy, 'First argument to `createSingleton()` must be an *array* of tippy ' + 'instances. The passed value was a *single* tippy instance.');

@@ -151,3 +151,3 @@ }

});
__chunk_1.throwErrorWhen(isAnyInstancePartOfExistingSingleton, 'The passed tippy instance(s) are already part of an existing ' + 'singleton instance. Make sure you destroy the previous singleton ' + 'before calling `createSingleton()` again.');
__chunk_2.throwErrorWhen(isAnyInstancePartOfExistingSingleton, 'The passed tippy instance(s) are already part of an existing ' + 'singleton instance. Make sure you destroy the previous singleton ' + 'before calling `createSingleton()` again.');
tippyInstances.forEach(function (instance) {

@@ -200,8 +200,4 @@ Object.defineProperty(instance, '__singleton__', {

__chunk_1.preserveInvocation(instance.__originalProps__.onTrigger, instance.props.onTrigger, [instance, event]);
singletonInstance.setProps(__chunk_1.removeProperties(instance.props, __chunk_1.NON_UPDATEABLE_PROPS.concat('delay')));
var props = __chunk_1._extends({}, instance.props);
delete props.delay;
singletonInstance.setProps(props);
singletonInstance.reference.getBoundingClientRect = function () {

@@ -222,3 +218,3 @@ return instance.reference.getBoundingClientRect();

singletonInstance.show();
}, __chunk_1.getValue(delay, 0, __chunk_2.tippy.defaultProps.delay));
}, __chunk_1.getValueAtIndexOrReturn(delay, 0, __chunk_2.tippy.defaultProps.delay));
}

@@ -231,3 +227,3 @@ },

singletonInstance.hide();
}, __chunk_1.getValue(delay, 1, __chunk_2.tippy.defaultProps.delay));
}, __chunk_1.getValueAtIndexOrReturn(delay, 1, __chunk_2.tippy.defaultProps.delay));
}

@@ -265,3 +261,7 @@ }); // Ensure the lifecycle functions can be updated

tippyInstances.forEach(function (instance) {
// Restore the instances to their original state
if (instance.state.isDestroyed) {
return;
} // Restore the instances to their original state
instance.clearDelayTimeouts = instance.__originalClearDelayTimeouts__;

@@ -268,0 +268,0 @@ instance.setProps = instance.__originalSetProps__;

/**!
* tippy.js v5.0.0-alpha.2
* tippy.js v5.0.0-beta.0
* (c) 2017-2019 atomiks
* MIT License
*/
import { J as throwErrorWhen, _ as _extends, q as hasOwnProperty, p as preserveInvocation, j as getValue, K as removeProperties } from '../../esm/tippy.chunk.js';
import { t as tippy } from '../../esm/tippy.chunk2.js';
import { _ as _extends, h as hasOwnProperty, p as preserveInvocation, F as removeProperties, l as getValueAtIndexOrReturn, N as NON_UPDATEABLE_PROPS } from '../../esm/tippy.chunk.js';
import { a as throwErrorWhen, t as tippy } from '../../esm/tippy.chunk2.js';
import 'popper.js';

@@ -193,8 +193,4 @@

preserveInvocation(instance.__originalProps__.onTrigger, instance.props.onTrigger, [instance, event]);
singletonInstance.setProps(removeProperties(instance.props, NON_UPDATEABLE_PROPS.concat('delay')));
var props = _extends({}, instance.props);
delete props.delay;
singletonInstance.setProps(props);
singletonInstance.reference.getBoundingClientRect = function () {

@@ -215,3 +211,3 @@ return instance.reference.getBoundingClientRect();

singletonInstance.show();
}, getValue(delay, 0, tippy.defaultProps.delay));
}, getValueAtIndexOrReturn(delay, 0, tippy.defaultProps.delay));
}

@@ -224,3 +220,3 @@ },

singletonInstance.hide();
}, getValue(delay, 1, tippy.defaultProps.delay));
}, getValueAtIndexOrReturn(delay, 1, tippy.defaultProps.delay));
}

@@ -258,3 +254,7 @@ }); // Ensure the lifecycle functions can be updated

tippyInstances.forEach(function (instance) {
// Restore the instances to their original state
if (instance.state.isDestroyed) {
return;
} // Restore the instances to their original state
instance.clearDelayTimeouts = instance.__originalClearDelayTimeouts__;

@@ -261,0 +261,0 @@ instance.setProps = instance.__originalSetProps__;

@@ -24,7 +24,3 @@ (function (tippy$1) {

var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';
var ua = isBrowser ? navigator.userAgent : '';
var isIE = /MSIE |Trident\//.test(ua);
var isUCBrowser = /UCBrowser\//.test(ua);
var isIOS = isBrowser && /iPhone|iPad|iPod/.test(navigator.platform);
var NON_UPDATEABLE_PROPS = ['followCursor'];

@@ -42,6 +38,6 @@ /**

function getValue(value, index, defaultValue) {
function getValueAtIndexOrReturn(value, index, defaultValue) {
if (Array.isArray(value)) {
var v = value[index];
return v == null ? defaultValue : v;
return v == null ? Array.isArray(defaultValue) ? defaultValue[index] : defaultValue : v;
}

@@ -266,8 +262,4 @@

preserveInvocation(instance.__originalProps__.onTrigger, instance.props.onTrigger, [instance, event]);
singletonInstance.setProps(removeProperties(instance.props, NON_UPDATEABLE_PROPS.concat('delay')));
var props = _extends({}, instance.props);
delete props.delay;
singletonInstance.setProps(props);
singletonInstance.reference.getBoundingClientRect = function () {

@@ -288,3 +280,3 @@ return instance.reference.getBoundingClientRect();

singletonInstance.show();
}, getValue(delay, 0, tippy$1.defaultProps.delay));
}, getValueAtIndexOrReturn(delay, 0, tippy$1.defaultProps.delay));
}

@@ -297,3 +289,3 @@ },

singletonInstance.hide();
}, getValue(delay, 1, tippy$1.defaultProps.delay));
}, getValueAtIndexOrReturn(delay, 1, tippy$1.defaultProps.delay));
}

@@ -331,3 +323,7 @@ }); // Ensure the lifecycle functions can be updated

tippyInstances.forEach(function (instance) {
// Restore the instances to their original state
if (instance.state.isDestroyed) {
return;
} // Restore the instances to their original state
instance.clearDelayTimeouts = instance.__originalClearDelayTimeouts__;

@@ -334,0 +330,0 @@ instance.setProps = instance.__originalSetProps__;

@@ -1,2 +0,2 @@

!function(e){"use strict";function r(){return(r=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}e=e&&e.hasOwnProperty("default")?e.default:e;var t="undefined"!=typeof window&&"undefined"!=typeof document,o=t?navigator.userAgent:"";/MSIE |Trident\//.test(o),/UCBrowser\//.test(o),t&&/iPhone|iPad|iPod/.test(navigator.platform);function n(e,r,t){if(Array.isArray(e)){var o=e[r];return null==o?t:o}return e}function i(e,r,t){e&&e!==r&&e.apply(null,t)}if("function"!=typeof tippy)throw new Error("[tippy.js ERROR] `tippy` is not a global function. Make sure you have included the tippy script before tippy-addons.");tippy.delegate=function t(o,n){var i=[],a=[],s=n.target;delete n.target;var l=t.tippy||e,p=l(o,n);function c(e){if(e.target){var t=e.target.closest(s);if(t){var o=l(t,r({},n,{showOnCreate:!0}));o&&(a=a.concat(o))}}}function u(e,r,t,o){void 0===o&&(o=!1),e.addEventListener(r,t,o),i.push({element:e,eventType:r,listener:t,options:o})}return[].concat(p).forEach(function(e){var r=e.destroy;e.destroy=function(e){void 0===e&&(e=!0),e&&a.forEach(function(e){e.destroy()}),a=[],function(e){e.forEach(function(e){var r=e.element,t=e.eventType,o=e.listener,n=e.options;r.removeEventListener(t,o,n)}),e=[]}(i),r()},function(e){var r=e.reference;e.props.trigger.trim().split(" ").forEach(function(e){switch(e){case"mouseenter":u(r,"mouseover",c);break;case"focus":u(r,"focusin",c);break;case"click":u(r,"click",c)}})}(e),e.setProps({trigger:"manual"})}),p},tippy.createSingleton=function t(o,a){void 0===a&&(a={delay:0});var s,l,p=(t.tippy||e)(document.createElement("div")),c=a.delay;function u(){clearTimeout(s),clearTimeout(l)}o.forEach(function(t){t.__originalProps__={delay:t.props.delay,onTrigger:t.props.onTrigger,onUntrigger:t.props.onUntrigger},t.popper.style.opacity="0",t.__originalClearDelayTimeouts__=t.clearDelayTimeouts,t.clearDelayTimeouts=function(){t.__originalClearDelayTimeouts__(),u()},t.setProps({delay:0,onTrigger:function(o,a){i(t.__originalProps__.onTrigger,t.props.onTrigger,[t,a]);var l=r({},t.props);delete l.delay,p.setProps(l),p.reference.getBoundingClientRect=function(){return t.reference.getBoundingClientRect()},u(),!p.state.isVisible&&p.state.isMounted?p.show(void 0,!1):s=setTimeout(function(){p.show()},n(c,0,e.defaultProps.delay))},onUntrigger:function(r,o){i(t.__originalProps__.onUntrigger,t.props.onUntrigger,[t,o]),u(),l=setTimeout(function(){p.hide()},n(c,1,e.defaultProps.delay))}}),t.__originalSetProps__=t.setProps,t.setProps=function(e){e.onTrigger&&(t.__originalProps__.onTrigger=e.onTrigger),e.onUntrigger&&(t.__originalProps__.onUntrigger=e.onUntrigger),t.__originalSetProps__(function(e,t){var o=r({},e);return t.forEach(function(e){delete o[e]}),o}(e,["delay","onTrigger","onUntrigger"]))}});var g=p.setProps;p.setProps=function(e){c=void 0!==e.delay?e.delay:c,g(e)};var f=p.destroy;return p.destroy=function(e){void 0===e&&(e=!0),o.forEach(function(r){r.clearDelayTimeouts=r.__originalClearDelayTimeouts__,r.setProps=r.__originalSetProps__,r.setProps(r.__originalProps__),delete r.__originalClearDelayTimeouts__,delete r.__originalProps__,delete r.__originalSetProps__,e&&r.destroy()}),f()},p}}(tippy);
!function(e){"use strict";function r(){return(r=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}e=e&&e.hasOwnProperty("default")?e.default:e;var t=["followCursor"];function o(e,r,t){if(Array.isArray(e)){var o=e[r];return null==o?Array.isArray(t)?t[r]:t:o}return e}function n(e,r,t){e&&e!==r&&e.apply(null,t)}function i(e,t){var o=r({},e);return t.forEach(function(e){delete o[e]}),o}if("function"!=typeof tippy)throw new Error("[tippy.js ERROR] `tippy` is not a global function. Make sure you have included the tippy script before tippy-addons.");tippy.delegate=function t(o,n){var i=[],a=[],s=n.target;delete n.target;var l=t.tippy||e,c=l(o,n);function p(e){if(e.target){var t=e.target.closest(s);if(t){var o=l(t,r({},n,{showOnCreate:!0}));o&&(a=a.concat(o))}}}function u(e,r,t,o){void 0===o&&(o=!1),e.addEventListener(r,t,o),i.push({element:e,eventType:r,listener:t,options:o})}return[].concat(c).forEach(function(e){var r=e.destroy;e.destroy=function(e){void 0===e&&(e=!0),e&&a.forEach(function(e){e.destroy()}),a=[],function(e){e.forEach(function(e){var r=e.element,t=e.eventType,o=e.listener,n=e.options;r.removeEventListener(t,o,n)}),e=[]}(i),r()},function(e){var r=e.reference;e.props.trigger.trim().split(" ").forEach(function(e){switch(e){case"mouseenter":u(r,"mouseover",p);break;case"focus":u(r,"focusin",p);break;case"click":u(r,"click",p)}})}(e),e.setProps({trigger:"manual"})}),c},tippy.createSingleton=function r(a,s){void 0===s&&(s={delay:0});var l,c,p=(r.tippy||e)(document.createElement("div")),u=s.delay;function g(){clearTimeout(l),clearTimeout(c)}a.forEach(function(r){r.__originalProps__={delay:r.props.delay,onTrigger:r.props.onTrigger,onUntrigger:r.props.onUntrigger},r.popper.style.opacity="0",r.__originalClearDelayTimeouts__=r.clearDelayTimeouts,r.clearDelayTimeouts=function(){r.__originalClearDelayTimeouts__(),g()},r.setProps({delay:0,onTrigger:function(a,s){n(r.__originalProps__.onTrigger,r.props.onTrigger,[r,s]),p.setProps(i(r.props,t.concat("delay"))),p.reference.getBoundingClientRect=function(){return r.reference.getBoundingClientRect()},g(),!p.state.isVisible&&p.state.isMounted?p.show(void 0,!1):l=setTimeout(function(){p.show()},o(u,0,e.defaultProps.delay))},onUntrigger:function(t,i){n(r.__originalProps__.onUntrigger,r.props.onUntrigger,[r,i]),g(),c=setTimeout(function(){p.hide()},o(u,1,e.defaultProps.delay))}}),r.__originalSetProps__=r.setProps,r.setProps=function(e){e.onTrigger&&(r.__originalProps__.onTrigger=e.onTrigger),e.onUntrigger&&(r.__originalProps__.onUntrigger=e.onUntrigger),r.__originalSetProps__(i(e,["delay","onTrigger","onUntrigger"]))}});var _=p.setProps;p.setProps=function(e){u=void 0!==e.delay?e.delay:u,_(e)};var f=p.destroy;return p.destroy=function(e){void 0===e&&(e=!0),a.forEach(function(r){r.state.isDestroyed||(r.clearDelayTimeouts=r.__originalClearDelayTimeouts__,r.setProps=r.__originalSetProps__,r.setProps(r.__originalProps__),delete r.__originalClearDelayTimeouts__,delete r.__originalProps__,delete r.__originalSetProps__,e&&r.destroy())}),f()},p}}(tippy);
//# sourceMappingURL=tippy-addons.min.js.map
/**!
* tippy.js v5.0.0-alpha.2
* tippy.js v5.0.0-beta.0
* (c) 2017-2019 atomiks

@@ -14,3 +14,3 @@ * MIT License

var css = ".tippy-tooltip[data-animation=fade][data-state=hidden]{opacity:0}.tippy-iOS{cursor:pointer!important;-webkit-tap-highlight-color:transparent}.tippy-popper{pointer-events:none;max-width:calc(100% - 8px);transition-timing-function:cubic-bezier(.165,.84,.44,1)}.tippy-tooltip{position:relative;color:#fff;border-radius:.25rem;font-size:.875rem;line-height:1.4;background-color:#333;overflow:hidden;transition-property:visibility,opacity,transform;outline:0}.tippy-tooltip[data-placement^=top] .tippy-arrow{border-width:8px 8px 0;border-top-color:#333;margin:0 3px;transform-origin:50% 0;bottom:-7px}.tippy-tooltip[data-placement^=bottom] .tippy-arrow{border-width:0 8px 8px;border-bottom-color:#333;margin:0 3px;transform-origin:50% 7px;top:-7px}.tippy-tooltip[data-placement^=left] .tippy-arrow{border-width:8px 0 8px 8px;border-left-color:#333;margin:3px 0;transform-origin:0 50%;right:-7px}.tippy-tooltip[data-placement^=right] .tippy-arrow{border-width:8px 8px 8px 0;border-right-color:#333;margin:3px 0;transform-origin:7px 50%;left:-7px}.tippy-tooltip[data-arrow]{overflow:visible}.tippy-tooltip[data-animatefill]{background-color:transparent!important}.tippy-tooltip[data-interactive]{pointer-events:auto}.tippy-tooltip[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-tooltip[data-inertia][data-state=hidden]{transition-timing-function:ease}.tippy-arrow{border-color:transparent;border-style:solid;position:absolute}.tippy-arrow[data-state=hidden]{opacity:0}.tippy-content{padding:.3125rem .5625rem}";
var css = ".tippy-tooltip[data-animation=fade][data-state=hidden]{opacity:0}.tippy-iOS{cursor:pointer!important;-webkit-tap-highlight-color:transparent}.tippy-popper{pointer-events:none;max-width:calc(100% - 10px);transition-timing-function:cubic-bezier(.165,.84,.44,1)}.tippy-tooltip{position:relative;color:#fff;border-radius:.25rem;font-size:.875rem;line-height:1.4;background-color:#333;overflow:hidden;transition-property:visibility,opacity,transform;outline:0}.tippy-tooltip[data-placement^=top] .tippy-arrow{border-width:8px 8px 0;border-top-color:#333;margin:0 3px;transform-origin:50% 0;bottom:-7px}.tippy-tooltip[data-placement^=bottom] .tippy-arrow{border-width:0 8px 8px;border-bottom-color:#333;margin:0 3px;transform-origin:50% 7px;top:-7px}.tippy-tooltip[data-placement^=left] .tippy-arrow{border-width:8px 0 8px 8px;border-left-color:#333;margin:3px 0;transform-origin:0 50%;right:-7px}.tippy-tooltip[data-placement^=right] .tippy-arrow{border-width:8px 8px 8px 0;border-right-color:#333;margin:3px 0;transform-origin:7px 50%;left:-7px}.tippy-tooltip[data-arrow]{overflow:visible}.tippy-tooltip[data-animatefill]{background-color:transparent!important}.tippy-tooltip[data-interactive]{pointer-events:auto}.tippy-tooltip[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-tooltip[data-inertia][data-state=hidden]{transition-timing-function:ease}.tippy-arrow{border-color:transparent;border-style:solid;position:absolute}.tippy-arrow[data-state=hidden]{opacity:0}.tippy-content{padding:.3125rem .5625rem}";

@@ -20,22 +20,21 @@ /**

*/
function injectCSS(css) {
if (__chunk_1.isBrowser) {
var style = document.createElement('style');
style.textContent = css;
style.setAttribute('data-tippy-stylesheet', '');
var head = document.head;
var firstStyleOrLinkTag = head.querySelector('style,link');
var style = document.createElement('style');
style.textContent = css;
style.setAttribute('data-tippy-stylesheet', '');
var head = document.head;
var firstStyleOrLinkTag = head.querySelector('style,link');
if (firstStyleOrLinkTag) {
head.insertBefore(style, firstStyleOrLinkTag);
} else {
head.appendChild(style);
}
if (firstStyleOrLinkTag) {
head.insertBefore(style, firstStyleOrLinkTag);
} else {
head.appendChild(style);
}
}
injectCSS(css);
if (__chunk_1.isBrowser) {
injectCSS(css);
}
exports.default = __chunk_2.tippy;
//# sourceMappingURL=tippy.bundle.js.map
/**!
* tippy.js v5.0.0-alpha.2
* tippy.js v5.0.0-beta.0
* (c) 2017-2019 atomiks

@@ -49,2 +49,3 @@ * MIT License

flipOnUpdate: false,
followCursor: false,
hideOnClick: true,

@@ -78,8 +79,3 @@ ignoreAttributes: false,

updateDuration: 0,
wait: null,
zIndex: 9999
};
var extraProps = {
followCursor: false,
inlinePositioning: false
/**

@@ -110,4 +106,6 @@ * If the setProps() method encounters one of these, the popperInstance must be

var ARROW_SELECTOR = "." + ARROW_CLASS;
var SVG_ARROW_SELECTOR = "." + SVG_ARROW_CLASS;
var SVG_ARROW_SELECTOR = "." + SVG_ARROW_CLASS; // TODO: Work out best way to make these updateable
var NON_UPDATEABLE_PROPS = ['followCursor'];
var currentInput = {

@@ -245,7 +243,3 @@ isTouch: false

try {
return arrayFrom(document.querySelectorAll(value));
} catch (e) {
return [];
}
return arrayFrom(document.querySelectorAll(value));
}

@@ -256,6 +250,6 @@ /**

function getValue(value, index, defaultValue) {
function getValueAtIndexOrReturn(value, index, defaultValue) {
if (Array.isArray(value)) {
var v = value[index];
return v == null ? defaultValue : v;
return v == null ? Array.isArray(defaultValue) ? defaultValue[index] : defaultValue : v;
}

@@ -377,12 +371,8 @@

function getVirtualOffsets(_ref, isVerticalPlacement) {
var popper = _ref.popper,
currentPlacement = _ref.state.currentPlacement;
var isShift = !!currentPlacement.split('-')[1];
function getVirtualOffsets(popper, isVerticalPlacement) {
var size = isVerticalPlacement ? popper.offsetWidth : popper.offsetHeight;
var halfSize = size / 2;
return {
size: size,
x: isVerticalPlacement ? isShift ? size : halfSize : 0,
y: isVerticalPlacement ? 0 : isShift ? size : halfSize
x: isVerticalPlacement ? size : 0,
y: isVerticalPlacement ? 0 : size
};

@@ -434,3 +424,3 @@ }

/**
* Determines if an array or string includes a value
* Determines if an array or string includes a string
*/

@@ -700,86 +690,3 @@

/**
* Helpful wrapper around `console.warn()`.
* TODO: Should we use a cache so it only warns a single time and not spam the
* console? (Need to consider hot reloading and invalidation though). Chrome
* already batches warnings as well.
*/
function warnWhen(condition, message) {
if (condition) {
/* eslint-disable-next-line no-console */
console.warn("[tippy.js WARNING] " + message);
}
}
/**
* Helpful wrapper around thrown errors
*/
function throwErrorWhen(condition, message) {
if (condition) {
throw new Error("[tippy.js ERROR] " + message);
}
}
/**
* Validates props with the valid `defaultProps` object
*/
function validateProps(partialProps) {
if (partialProps === void 0) {
partialProps = {};
}
Object.keys(partialProps).forEach(function (prop) {
var value = partialProps[prop];
var didPassTargetProp = prop === 'target';
var didPassA11yProp = prop === 'a11y';
var didPassShowOnInitProp = prop === 'showOnInit';
var didPassArrowTypeProp = prop === 'arrowType';
var didPassTouchHoldProp = prop === 'touchHold';
var didPassSizeProp = prop === 'size';
var didPassGoogleTheme = prop === 'theme' && value === 'google';
var didSpecifyPlacementInPopperOptions = prop === 'popperOptions' && value && hasOwnProperty(value, 'placement');
var didPassOtherUnknownProp = !hasOwnProperty(defaultProps, prop) && !didPassTargetProp && !didPassA11yProp && !didPassShowOnInitProp && !includes(Object.keys(extraProps), prop);
warnWhen(didPassTargetProp, 'The `target` prop was removed in v5 and ' + 'replaced with the `delegate()` method. Read more here: ' + 'https//atomiks.github.io/tippyjs/addons#event-delegation');
warnWhen(didPassA11yProp, 'The `a11y` prop was removed in v5. Make ' + 'sure the element you are giving a tippy to is natively ' + 'focusable, such as <button> or <input>, not <div> or <span>.');
warnWhen(didPassShowOnInitProp, 'The `showOnInit` prop was renamed to `showOnCreate` in v5.');
warnWhen(didPassArrowTypeProp, 'The `arrowType` prop was removed in v5 ' + 'in favor of overloading the `arrow` prop. Specify ' + '`arrow: "' + value + '"` instead.');
warnWhen(didPassTouchHoldProp, 'The `touchHold` prop was removed in v5 in favor of overloading the ' + '`touch` prop. Specify `touch: "hold"` instead.');
warnWhen(didPassSizeProp, 'The `size` prop was removed in v5. Instead, use a theme that ' + 'specifies `font-size` and `padding` CSS properties.');
warnWhen(didPassOtherUnknownProp, '`' + prop + '` is not a valid prop. You ' + 'may have spelled it incorrectly. View all of the valid props ' + 'here: https://atomiks.github.io/tippyjs/all-props/');
warnWhen(didPassGoogleTheme, 'The included theme `google` was renamed to `material` in v5.');
warnWhen(didSpecifyPlacementInPopperOptions, 'Specifying `placement` in `popperOptions` is not supported. Use the ' + 'base-level `placement` prop instead.');
});
}
/**
* Validates the `targets` value passed to `tippy()`
*/
function validateTargets(targets) {
var didPassFalsyValue = !targets;
var didPassPlainObject = Object.prototype.toString.call(targets) === '[object Object]' && !targets.addEventListener;
throwErrorWhen(didPassFalsyValue, '`tippy()` was passed `' + targets + '` (an invalid falsy value) as its targets argument. Valid types are: ' + 'String (CSS selector), Element, Element[], or NodeList.');
throwErrorWhen(didPassPlainObject, '`tippy()` was passed a plain object (virtual ' + 'reference element) which is no longer supported in v5. Instead, pass ' + 'a placeholder element like `document.createElement("div")`');
}
/**
* Ensures the instance has been configured with the extra prop's functionality
* if the user is specifying it as a prop
*/
function validateExtraPropsFunctionality(instance, partialProps) {
if (partialProps === void 0) {
partialProps = {};
}
var extraProps = ['followCursor', 'inlinePositioning'];
extraProps.forEach(function (prop) {
if (hasOwnProperty(partialProps, prop) && !instance.__extraProps__[prop]) {
var didPassFollowCursor = prop === 'followCursor';
var didPassOtherExtraProp = !didPassFollowCursor;
warnWhen(didPassFollowCursor, 'The `followCursor` prop was specified, but the instance has not ' + 'been configured with followCursor functionality. In v5, ' + '`followCursor` was moved to `extra-props`. View details: ' + 'https://atomiks.github.io/tippyjs/extra-props/');
warnWhen(didPassOtherExtraProp, 'The `' + prop + '` prop was specified, but the instance has not been configured ' + 'with ' + prop + ' functionality. View details: ' + 'https://atomiks.github.io/tippyjs/extra-props/');
}
});
}
exports.NON_UPDATEABLE_PROPS = NON_UPDATEABLE_PROPS;
exports.PASSIVE = PASSIVE;

@@ -802,3 +709,3 @@ exports.POPPER_INSTANCE_DEPENDENCIES = POPPER_INSTANCE_DEPENDENCIES;

exports.getModifier = getModifier;
exports.getValue = getValue;
exports.getValueAtIndexOrReturn = getValueAtIndexOrReturn;
exports.getVirtualOffsets = getVirtualOffsets;

@@ -819,9 +726,4 @@ exports.hasOwnProperty = hasOwnProperty;

exports.setVisibilityState = setVisibilityState;
exports.throwErrorWhen = throwErrorWhen;
exports.updatePopperElement = updatePopperElement;
exports.updateTransitionEndListener = updateTransitionEndListener;
exports.validateExtraPropsFunctionality = validateExtraPropsFunctionality;
exports.validateProps = validateProps;
exports.validateTargets = validateTargets;
exports.warnWhen = warnWhen;
//# sourceMappingURL=tippy.chunk.js.map
/**!
* tippy.js v5.0.0-alpha.2
* tippy.js v5.0.0-beta.0
* (c) 2017-2019 atomiks

@@ -13,4 +13,88 @@ * MIT License

var version = "5.0.0-alpha.2";
var version = "5.0.0-beta.0";
/**
* Helpful wrapper around `console.warn()`.
* TODO: Should we use a cache so it only warns a single time and not spam the
* console? (Need to consider hot reloading and invalidation though). Chrome
* already batches warnings as well.
*/
function warnWhen(condition, message) {
if (condition) {
/* eslint-disable-next-line no-console */
console.warn("[tippy.js WARNING] " + message);
}
}
/**
* Helpful wrapper around thrown errors
*/
function throwErrorWhen(condition, message) {
if (condition) {
throw new Error("[tippy.js ERROR] " + message);
}
}
/**
* Validates props with the valid `defaultProps` object
*/
function validateProps(partialProps) {
if (partialProps === void 0) {
partialProps = {};
}
Object.keys(partialProps).forEach(function (prop) {
var value = partialProps[prop];
var didPassTargetProp = prop === 'target';
var didPassA11yProp = prop === 'a11y';
var didPassShowOnInitProp = prop === 'showOnInit';
var didPassArrowTypeProp = prop === 'arrowType';
var didPassTouchHoldProp = prop === 'touchHold';
var didPassSizeProp = prop === 'size';
var didPassGoogleTheme = prop === 'theme' && value === 'google';
var didSpecifyPlacementInPopperOptions = prop === 'popperOptions' && value && __chunk_1.hasOwnProperty(value, 'placement');
var didPassOtherUnknownProp = !__chunk_1.hasOwnProperty(__chunk_1.defaultProps, prop) && !didPassTargetProp && !didPassA11yProp && !didPassShowOnInitProp && !__chunk_1.includes(['followCursor'], prop);
warnWhen(didPassTargetProp, 'The `target` prop was removed in v5 and ' + 'replaced with the `delegate()` method. Read more here: ' + 'https//atomiks.github.io/tippyjs/addons#event-delegation');
warnWhen(didPassA11yProp, 'The `a11y` prop was removed in v5. Make ' + 'sure the element you are giving a tippy to is natively ' + 'focusable, such as <button> or <input>, not <div> or <span>.');
warnWhen(didPassShowOnInitProp, 'The `showOnInit` prop was renamed to `showOnCreate` in v5.');
warnWhen(didPassArrowTypeProp, 'The `arrowType` prop was removed in v5 ' + 'in favor of overloading the `arrow` prop. Specify ' + '`arrow: "' + value + '"` instead.');
warnWhen(didPassTouchHoldProp, 'The `touchHold` prop was removed in v5 in favor of overloading the ' + '`touch` prop. Specify `touch: "hold"` instead.');
warnWhen(didPassSizeProp, 'The `size` prop was removed in v5. Instead, use a theme that ' + 'specifies `font-size` and `padding` CSS properties.');
warnWhen(didPassOtherUnknownProp, '`' + prop + '` is not a valid prop. You ' + 'may have spelled it incorrectly. View all of the valid props ' + 'here: https://atomiks.github.io/tippyjs/all-props/');
warnWhen(didPassGoogleTheme, 'The included theme `google` was renamed to `material` in v5.');
warnWhen(didSpecifyPlacementInPopperOptions, 'Specifying `placement` in `popperOptions` is not supported. Use the ' + 'base-level `placement` prop instead.');
});
}
/**
* Validates the `targets` value passed to `tippy()`
*/
function validateTargets(targets) {
var didPassFalsyValue = !targets;
var didPassPlainObject = Object.prototype.toString.call(targets) === '[object Object]' && !targets.addEventListener;
throwErrorWhen(didPassFalsyValue, '`tippy()` was passed `' + targets + '` (an invalid falsy value) as its targets argument. Valid types are: ' + 'String (CSS selector), Element, Element[], or NodeList.');
throwErrorWhen(didPassPlainObject, '`tippy()` was passed a plain object (virtual ' + 'reference element) which is no longer supported in v5. Instead, pass ' + 'a placeholder element like `document.createElement("div")`');
}
/**
* Ensures the instance has been configured with the extra prop's functionality
* if the user is specifying it as a prop
*/
function validateExtraPropsFunctionality(instance, partialProps) {
if (partialProps === void 0) {
partialProps = {};
}
var extraProps = ['followCursor'];
extraProps.forEach(function (prop) {
if (__chunk_1.hasOwnProperty(partialProps, prop) && !instance.__extraProps__[prop]) {
var didPassFollowCursor = prop === 'followCursor';
var didPassOtherExtraProp = !didPassFollowCursor;
warnWhen(didPassFollowCursor, 'The `followCursor` prop was specified, but the instance has not ' + 'been configured with followCursor functionality. In v5, ' + '`followCursor` was moved to `extra-props`. View details: ' + 'https://atomiks.github.io/tippyjs/extra-props/');
warnWhen(didPassOtherExtraProp, 'The `' + prop + '` prop was specified, but the instance has not been configured ' + 'with ' + prop + ' functionality. View details: ' + 'https://atomiks.github.io/tippyjs/extra-props/');
}
});
}
var idCounter = 1; // Workaround for IE11's lack of new MouseEvent constructor

@@ -41,3 +125,2 @@

var didHideDueToDocumentMouseDown = false;
var normalizedPlacement;
var currentMountCallback;

@@ -95,3 +178,3 @@ var currentTransitionEndListener;

value: function value() {
__chunk_1.warnWhen(true, '`set()` was renamed to `setProps()` in v5.');
warnWhen(true, '`set()` was renamed to `setProps()` in v5.');
},

@@ -136,10 +219,2 @@ enumerable: false

function getIsVerticalPlacement() {
return __chunk_1.includes(['top', 'bottom'], __chunk_1.getBasePlacement(instance.state.currentPlacement));
}
function getIsOppositePlacement() {
return __chunk_1.includes(['bottom', 'right'], __chunk_1.getBasePlacement(instance.state.currentPlacement));
}
function getNormalizedTouchSettings() {

@@ -215,10 +290,15 @@ var touch = instance.props.touch;

__chunk_1.setTransitionDuration([popper], __chunk_1.isIE ? 0 : instance.props.updateDuration);
var prevRefRect = reference.getBoundingClientRect();
function updatePosition() {
instance.popperInstance.scheduleUpdate();
var currentRefRect = reference.getBoundingClientRect(); // Only schedule an update if the reference rect has changed
if (prevRefRect.top !== currentRefRect.top || prevRefRect.right !== currentRefRect.right || prevRefRect.bottom !== currentRefRect.bottom || prevRefRect.left !== currentRefRect.left) {
instance.popperInstance.scheduleUpdate();
}
prevRefRect = currentRefRect;
if (instance.state.isMounted) {
requestAnimationFrame(updatePosition);
} else {
__chunk_1.setTransitionDuration([popper], 0);
}

@@ -411,12 +491,6 @@ }

function createPopperInstance() {
var _instance$props = instance.props,
popperOptions = _instance$props.popperOptions,
placement = _instance$props.placement;
var popperOptions = instance.props.popperOptions;
var arrow = instance.popperChildren.arrow;
var preventOverflowModifier = __chunk_1.getModifier(popperOptions, 'preventOverflow'); // Due to the virtual offsets normalization when using `followCursor`, we
// need to use the opposite placement
var preventOverflowModifier = __chunk_1.getModifier(popperOptions, 'preventOverflow');
var shift = instance.state.currentPlacement.split('-')[1];
normalizedPlacement = instance.props.followCursor && shift ? placement.replace(shift, shift === 'start' ? 'end' : 'start') : placement;
function applyMutations(data) {

@@ -433,3 +507,3 @@ instance.state.currentPlacement = data.placement;

tooltip.setAttribute('data-placement', instance.state.currentPlacement);
tooltip.setAttribute('data-placement', data.placement);

@@ -440,24 +514,12 @@ if (data.attributes['x-out-of-boundaries'] !== false) {

tooltip.removeAttribute('data-out-of-boundaries');
} // Apply the `distance` prop
}
var basePlacement = __chunk_1.getBasePlacement(data.placement);
var isVerticalPlacement = __chunk_1.includes(['top', 'bottom'], basePlacement);
var isSecondaryPlacement = __chunk_1.includes(['bottom', 'right'], basePlacement); // Apply `distance` prop
var basePlacement = __chunk_1.getBasePlacement(instance.state.currentPlacement);
var tooltipStyles = tooltip.style;
tooltipStyles.top = '0';
tooltipStyles.left = '0';
tooltipStyles[getIsVerticalPlacement() ? 'top' : 'left'] = (getIsOppositePlacement() ? 1 : -1) * instance.props.distance + "px";
var padding = preventOverflowModifier && preventOverflowModifier.padding !== undefined ? preventOverflowModifier.padding : __chunk_1.PREVENT_OVERFLOW_PADDING;
var isPaddingNumber = typeof padding === 'number';
var computedPadding = __chunk_1._extends({
top: isPaddingNumber ? padding : padding.top,
bottom: isPaddingNumber ? padding : padding.bottom,
left: isPaddingNumber ? padding : padding.left,
right: isPaddingNumber ? padding : padding.right
}, !isPaddingNumber && padding);
computedPadding[basePlacement] = isPaddingNumber ? padding + instance.props.distance : (padding[basePlacement] || 0) + instance.props.distance;
instance.popperInstance.modifiers.filter(function (m) {
return m.name === 'preventOverflow';
})[0].padding = computedPadding;
tooltipStyles[isVerticalPlacement ? 'top' : 'left'] = (isSecondaryPlacement ? 1 : -1) * instance.props.distance + "px";
}

@@ -467,5 +529,5 @@

eventsEnabled: false,
placement: normalizedPlacement
placement: instance.props.placement
}, popperOptions, {
modifiers: __chunk_1._extends({}, popperOptions ? popperOptions.modifiers : {}, {
modifiers: __chunk_1._extends({}, popperOptions && popperOptions.modifiers, {
preventOverflow: __chunk_1._extends({

@@ -475,2 +537,31 @@ boundariesElement: instance.props.boundary,

}, preventOverflowModifier),
// Adds the `distance` calculation to preventOverflow padding
tippySetPreventOverflowPadding: {
enabled: true,
order: 299,
fn: function fn(data) {
var basePlacement = __chunk_1.getBasePlacement(data.placement);
var padding = preventOverflowModifier && preventOverflowModifier.padding !== undefined ? preventOverflowModifier.padding : __chunk_1.PREVENT_OVERFLOW_PADDING;
var isPaddingNumber = typeof padding === 'number';
var paddingObject = {
top: 0,
bottom: 0,
left: 0,
right: 0
};
var computedPadding = Object.keys(paddingObject).reduce(function (obj, key) {
obj[key] = isPaddingNumber ? padding : padding[key];
if (basePlacement === key) {
obj[key] = isPaddingNumber ? padding + instance.props.distance : (padding[basePlacement] || 0) + instance.props.distance;
}
return obj;
}, paddingObject);
instance.popperInstance.modifiers.filter(function (m) {
return m.name === 'preventOverflow';
})[0].padding = computedPadding;
return data;
}
},
arrow: __chunk_1._extends({

@@ -482,4 +573,2 @@ element: arrow,

enabled: instance.props.flip,
// The tooltip is offset by 10px from the popper in CSS,
// we need to account for its distance
padding: instance.props.distance + __chunk_1.PREVENT_OVERFLOW_PADDING,

@@ -551,8 +640,4 @@ behavior: instance.props.flipBehavior

if (instance.props.wait) {
return instance.props.wait(instance, event);
}
addDocumentMouseDownListener();
var delay = __chunk_1.getValue(instance.props.delay, 0, __chunk_1.defaultProps.delay);
var delay = __chunk_1.getValueAtIndexOrReturn(instance.props.delay, 0, __chunk_1.defaultProps.delay);

@@ -578,3 +663,3 @@ if (delay) {

instance.state.isScheduledToShow = false;
var delay = __chunk_1.getValue(instance.props.delay, 1, __chunk_1.defaultProps.delay);
var delay = __chunk_1.getValueAtIndexOrReturn(instance.props.delay, 1, __chunk_1.defaultProps.delay);

@@ -610,7 +695,10 @@ if (delay) {

cancelAnimationFrame(scheduleHideAnimationFrame);
}
} // Cloning as we're deleting non-updateable props in DEV mode
function setProps(partialProps) {
function setProps(_ref2) {
var partialProps = __chunk_1._extends({}, _ref2);
if (process.env.NODE_ENV !== "production") {
__chunk_1.warnWhen(instance.state.isDestroyed, '`set()` was called on a destroyed instance. ' + 'This is a no-op but indicates a potential memory leak.');
warnWhen(instance.state.isDestroyed, '`setProps()` was called on a destroyed instance. ' + 'This is a no-op but indicates a potential memory leak.');
}

@@ -623,4 +711,10 @@

if (process.env.NODE_ENV !== "production") {
__chunk_1.validateProps(partialProps);
__chunk_1.validateExtraPropsFunctionality(instance, partialProps);
validateProps(partialProps);
validateExtraPropsFunctionality(instance, partialProps);
__chunk_1.NON_UPDATEABLE_PROPS.forEach(function (prop) {
if (__chunk_1.hasOwnProperty(partialProps, prop)) {
delete partialProps[prop];
warnWhen(true, 'Cannot update `' + prop + '` prop. Destroy this instance and create a new instance instead.');
}
});
}

@@ -630,3 +724,3 @@

var prevProps = instance.props;
var nextProps = __chunk_1.evaluateProps(reference, __chunk_1._extends({}, instance.props, partialProps, {
var nextProps = __chunk_1.evaluateProps(reference, __chunk_1._extends({}, instance.props, {}, partialProps, {
ignoreAttributes: true

@@ -666,3 +760,3 @@ }));

if (duration === void 0) {
duration = __chunk_1.getValue(instance.props.duration, 0, __chunk_1.defaultProps.duration[1]);
duration = __chunk_1.getValueAtIndexOrReturn(instance.props.duration, 0, __chunk_1.defaultProps.duration);
}

@@ -675,3 +769,3 @@

if (process.env.NODE_ENV !== "production") {
__chunk_1.warnWhen(instance.state.isDestroyed, '`show()` was called on a destroyed instance. ' + 'This is a no-op but indicates a potential memory leak.');
warnWhen(instance.state.isDestroyed, '`show()` was called on a destroyed instance. ' + 'This is a no-op but indicates a potential memory leak.');
} // Early bail-out

@@ -744,7 +838,7 @@

if (duration === void 0) {
duration = __chunk_1.getValue(instance.props.duration, 1, __chunk_1.defaultProps.duration[1]);
duration = __chunk_1.getValueAtIndexOrReturn(instance.props.duration, 1, __chunk_1.defaultProps.duration);
}
if (process.env.NODE_ENV !== "production") {
__chunk_1.warnWhen(instance.state.isDestroyed, '`hide()` was called on a destroyed instance. ' + 'This is a no-op but indicates a potential memory leak.');
warnWhen(instance.state.isDestroyed, '`hide()` was called on a destroyed instance. ' + 'This is a no-op but indicates a potential memory leak.');
} // Early bail-out

@@ -778,3 +872,3 @@

instance.popperInstance.disableEventListeners();
instance.popperInstance.options.placement = normalizedPlacement;
instance.popperInstance.options.placement = instance.props.placement;
popper.parentNode.removeChild(popper);

@@ -788,3 +882,3 @@ instance.props.onHidden(instance);

if (process.env.NODE_ENV !== "production") {
__chunk_1.warnWhen(instance.state.isDestroyed, '`destroy()` was called on an already-destroyed ' + 'instance. This is a no-op but indicates a potential memory leak.');
warnWhen(instance.state.isDestroyed, '`destroy()` was called on an already-destroyed ' + 'instance. This is a no-op but indicates a potential memory leak.');
}

@@ -815,4 +909,4 @@

if (process.env.NODE_ENV !== "production") {
__chunk_1.validateTargets(targets);
__chunk_1.validateProps(optionalProps);
validateTargets(targets);
validateProps(optionalProps);
}

@@ -822,3 +916,3 @@

var props = __chunk_1._extends({}, __chunk_1.defaultProps, optionalProps);
var props = __chunk_1._extends({}, __chunk_1.defaultProps, {}, optionalProps);

@@ -830,3 +924,3 @@ var elements = __chunk_1.getArrayOfElements(targets);

var isMoreThanOneReferenceElement = elements.length > 1;
__chunk_1.warnWhen(isSingleContentElement && isMoreThanOneReferenceElement, '`tippy()` was passed a targets argument that will create more than ' + 'one tippy instance, but only a single element was supplied as the ' + '`content` prop. This means the content will only be appended to the ' + 'last tippy element of the list. Instead, use a function that ' + 'returns a cloned version of the element instead, or pass the ' + '.innerHTML of the element.');
warnWhen(isSingleContentElement && isMoreThanOneReferenceElement, '`tippy()` was passed a targets argument that will create more than ' + 'one tippy instance, but only a single element was supplied as the ' + '`content` prop. This means the content will only be appended to the ' + 'last tippy element of the list. Instead, use a function that ' + 'returns a cloned version of the element instead, or pass the ' + '.innerHTML of the element.');
}

@@ -839,3 +933,3 @@

if (process.env.NODE_ENV !== "production") {
__chunk_1.validateExtraPropsFunctionality(instance, optionalProps);
validateExtraPropsFunctionality(instance, optionalProps);
}

@@ -860,3 +954,3 @@

if (process.env.NODE_ENV !== "production") {
__chunk_1.validateProps(partialProps);
validateProps(partialProps);
}

@@ -899,3 +993,3 @@

value: function value() {
__chunk_1.warnWhen(true, '`tippy.group()` was removed in v5 and replaced with ' + '`createSingleton()`. Read more here: ' + 'https://atomiks.github.io/tippyjs/addons#singleton');
warnWhen(true, '`tippy.group()` was removed in v5 and replaced with ' + '`createSingleton()`. Read more here: ' + 'https://atomiks.github.io/tippyjs/addons#singleton');
},

@@ -906,3 +1000,3 @@ enumerable: false

value: function value() {
__chunk_1.warnWhen(true, '`tippy.setDefaults()` was renamed to `tippy.setDefaultProps()` in v5.');
warnWhen(true, '`tippy.setDefaults()` was renamed to `tippy.setDefaultProps()` in v5.');
},

@@ -913,3 +1007,3 @@ enumerable: false

get: function get() {
__chunk_1.warnWhen(true, 'The `tippy.defaults` property was renamed to `tippy.defaultProps` ' + 'in v5.');
warnWhen(true, 'The `tippy.defaults` property was renamed to `tippy.defaultProps` ' + 'in v5.');
return undefined;

@@ -941,3 +1035,4 @@ },

exports.throwErrorWhen = throwErrorWhen;
exports.tippy = tippy;
//# sourceMappingURL=tippy.chunk2.js.map
/**!
* tippy.js v5.0.0-alpha.2
* tippy.js v5.0.0-beta.0
* (c) 2017-2019 atomiks

@@ -4,0 +4,0 @@ * MIT License

/**!
* tippy.js v5.0.0-alpha.2
* tippy.js v5.0.0-beta.0
* (c) 2017-2019 atomiks
* MIT License
*/
import { I as isBrowser } from './tippy.chunk.js';
import { E as isBrowser } from './tippy.chunk.js';
import { t as tippy } from './tippy.chunk2.js';
import 'popper.js';
var css = ".tippy-tooltip[data-animation=fade][data-state=hidden]{opacity:0}.tippy-iOS{cursor:pointer!important;-webkit-tap-highlight-color:transparent}.tippy-popper{pointer-events:none;max-width:calc(100% - 8px);transition-timing-function:cubic-bezier(.165,.84,.44,1)}.tippy-tooltip{position:relative;color:#fff;border-radius:.25rem;font-size:.875rem;line-height:1.4;background-color:#333;overflow:hidden;transition-property:visibility,opacity,transform;outline:0}.tippy-tooltip[data-placement^=top] .tippy-arrow{border-width:8px 8px 0;border-top-color:#333;margin:0 3px;transform-origin:50% 0;bottom:-7px}.tippy-tooltip[data-placement^=bottom] .tippy-arrow{border-width:0 8px 8px;border-bottom-color:#333;margin:0 3px;transform-origin:50% 7px;top:-7px}.tippy-tooltip[data-placement^=left] .tippy-arrow{border-width:8px 0 8px 8px;border-left-color:#333;margin:3px 0;transform-origin:0 50%;right:-7px}.tippy-tooltip[data-placement^=right] .tippy-arrow{border-width:8px 8px 8px 0;border-right-color:#333;margin:3px 0;transform-origin:7px 50%;left:-7px}.tippy-tooltip[data-arrow]{overflow:visible}.tippy-tooltip[data-animatefill]{background-color:transparent!important}.tippy-tooltip[data-interactive]{pointer-events:auto}.tippy-tooltip[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-tooltip[data-inertia][data-state=hidden]{transition-timing-function:ease}.tippy-arrow{border-color:transparent;border-style:solid;position:absolute}.tippy-arrow[data-state=hidden]{opacity:0}.tippy-content{padding:.3125rem .5625rem}";
var css = ".tippy-tooltip[data-animation=fade][data-state=hidden]{opacity:0}.tippy-iOS{cursor:pointer!important;-webkit-tap-highlight-color:transparent}.tippy-popper{pointer-events:none;max-width:calc(100% - 10px);transition-timing-function:cubic-bezier(.165,.84,.44,1)}.tippy-tooltip{position:relative;color:#fff;border-radius:.25rem;font-size:.875rem;line-height:1.4;background-color:#333;overflow:hidden;transition-property:visibility,opacity,transform;outline:0}.tippy-tooltip[data-placement^=top] .tippy-arrow{border-width:8px 8px 0;border-top-color:#333;margin:0 3px;transform-origin:50% 0;bottom:-7px}.tippy-tooltip[data-placement^=bottom] .tippy-arrow{border-width:0 8px 8px;border-bottom-color:#333;margin:0 3px;transform-origin:50% 7px;top:-7px}.tippy-tooltip[data-placement^=left] .tippy-arrow{border-width:8px 0 8px 8px;border-left-color:#333;margin:3px 0;transform-origin:0 50%;right:-7px}.tippy-tooltip[data-placement^=right] .tippy-arrow{border-width:8px 8px 8px 0;border-right-color:#333;margin:3px 0;transform-origin:7px 50%;left:-7px}.tippy-tooltip[data-arrow]{overflow:visible}.tippy-tooltip[data-animatefill]{background-color:transparent!important}.tippy-tooltip[data-interactive]{pointer-events:auto}.tippy-tooltip[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-tooltip[data-inertia][data-state=hidden]{transition-timing-function:ease}.tippy-arrow{border-color:transparent;border-style:solid;position:absolute}.tippy-arrow[data-state=hidden]{opacity:0}.tippy-content{padding:.3125rem .5625rem}";

@@ -15,22 +15,21 @@ /**

*/
function injectCSS(css) {
if (isBrowser) {
var style = document.createElement('style');
style.textContent = css;
style.setAttribute('data-tippy-stylesheet', '');
var head = document.head;
var firstStyleOrLinkTag = head.querySelector('style,link');
var style = document.createElement('style');
style.textContent = css;
style.setAttribute('data-tippy-stylesheet', '');
var head = document.head;
var firstStyleOrLinkTag = head.querySelector('style,link');
if (firstStyleOrLinkTag) {
head.insertBefore(style, firstStyleOrLinkTag);
} else {
head.appendChild(style);
}
if (firstStyleOrLinkTag) {
head.insertBefore(style, firstStyleOrLinkTag);
} else {
head.appendChild(style);
}
}
injectCSS(css);
if (isBrowser) {
injectCSS(css);
}
export default tippy;
//# sourceMappingURL=tippy.bundle.js.map
/**!
* tippy.js v5.0.0-alpha.2
* tippy.js v5.0.0-beta.0
* (c) 2017-2019 atomiks

@@ -47,2 +47,3 @@ * MIT License

flipOnUpdate: false,
followCursor: false,
hideOnClick: true,

@@ -76,8 +77,3 @@ ignoreAttributes: false,

updateDuration: 0,
wait: null,
zIndex: 9999
};
var extraProps = {
followCursor: false,
inlinePositioning: false
/**

@@ -108,4 +104,6 @@ * If the setProps() method encounters one of these, the popperInstance must be

var ARROW_SELECTOR = "." + ARROW_CLASS;
var SVG_ARROW_SELECTOR = "." + SVG_ARROW_CLASS;
var SVG_ARROW_SELECTOR = "." + SVG_ARROW_CLASS; // TODO: Work out best way to make these updateable
var NON_UPDATEABLE_PROPS = ['followCursor'];
var currentInput = {

@@ -243,7 +241,3 @@ isTouch: false

try {
return arrayFrom(document.querySelectorAll(value));
} catch (e) {
return [];
}
return arrayFrom(document.querySelectorAll(value));
}

@@ -254,6 +248,6 @@ /**

function getValue(value, index, defaultValue) {
function getValueAtIndexOrReturn(value, index, defaultValue) {
if (Array.isArray(value)) {
var v = value[index];
return v == null ? defaultValue : v;
return v == null ? Array.isArray(defaultValue) ? defaultValue[index] : defaultValue : v;
}

@@ -375,12 +369,8 @@

function getVirtualOffsets(_ref, isVerticalPlacement) {
var popper = _ref.popper,
currentPlacement = _ref.state.currentPlacement;
var isShift = !!currentPlacement.split('-')[1];
function getVirtualOffsets(popper, isVerticalPlacement) {
var size = isVerticalPlacement ? popper.offsetWidth : popper.offsetHeight;
var halfSize = size / 2;
return {
size: size,
x: isVerticalPlacement ? isShift ? size : halfSize : 0,
y: isVerticalPlacement ? 0 : isShift ? size : halfSize
x: isVerticalPlacement ? size : 0,
y: isVerticalPlacement ? 0 : size
};

@@ -432,3 +422,3 @@ }

/**
* Determines if an array or string includes a value
* Determines if an array or string includes a string
*/

@@ -698,87 +688,3 @@

/**
* Helpful wrapper around `console.warn()`.
* TODO: Should we use a cache so it only warns a single time and not spam the
* console? (Need to consider hot reloading and invalidation though). Chrome
* already batches warnings as well.
*/
function warnWhen(condition, message) {
if (condition) {
/* eslint-disable-next-line no-console */
console.warn("[tippy.js WARNING] " + message);
}
}
/**
* Helpful wrapper around thrown errors
*/
function throwErrorWhen(condition, message) {
if (condition) {
throw new Error("[tippy.js ERROR] " + message);
}
}
/**
* Validates props with the valid `defaultProps` object
*/
function validateProps(partialProps) {
if (partialProps === void 0) {
partialProps = {};
}
Object.keys(partialProps).forEach(function (prop) {
var value = partialProps[prop];
var didPassTargetProp = prop === 'target';
var didPassA11yProp = prop === 'a11y';
var didPassShowOnInitProp = prop === 'showOnInit';
var didPassArrowTypeProp = prop === 'arrowType';
var didPassTouchHoldProp = prop === 'touchHold';
var didPassSizeProp = prop === 'size';
var didPassGoogleTheme = prop === 'theme' && value === 'google';
var didSpecifyPlacementInPopperOptions = prop === 'popperOptions' && value && hasOwnProperty(value, 'placement');
var didPassOtherUnknownProp = !hasOwnProperty(defaultProps, prop) && !didPassTargetProp && !didPassA11yProp && !didPassShowOnInitProp && !includes(Object.keys(extraProps), prop);
warnWhen(didPassTargetProp, 'The `target` prop was removed in v5 and ' + 'replaced with the `delegate()` method. Read more here: ' + 'https//atomiks.github.io/tippyjs/addons#event-delegation');
warnWhen(didPassA11yProp, 'The `a11y` prop was removed in v5. Make ' + 'sure the element you are giving a tippy to is natively ' + 'focusable, such as <button> or <input>, not <div> or <span>.');
warnWhen(didPassShowOnInitProp, 'The `showOnInit` prop was renamed to `showOnCreate` in v5.');
warnWhen(didPassArrowTypeProp, 'The `arrowType` prop was removed in v5 ' + 'in favor of overloading the `arrow` prop. Specify ' + '`arrow: "' + value + '"` instead.');
warnWhen(didPassTouchHoldProp, 'The `touchHold` prop was removed in v5 in favor of overloading the ' + '`touch` prop. Specify `touch: "hold"` instead.');
warnWhen(didPassSizeProp, 'The `size` prop was removed in v5. Instead, use a theme that ' + 'specifies `font-size` and `padding` CSS properties.');
warnWhen(didPassOtherUnknownProp, '`' + prop + '` is not a valid prop. You ' + 'may have spelled it incorrectly. View all of the valid props ' + 'here: https://atomiks.github.io/tippyjs/all-props/');
warnWhen(didPassGoogleTheme, 'The included theme `google` was renamed to `material` in v5.');
warnWhen(didSpecifyPlacementInPopperOptions, 'Specifying `placement` in `popperOptions` is not supported. Use the ' + 'base-level `placement` prop instead.');
});
}
/**
* Validates the `targets` value passed to `tippy()`
*/
function validateTargets(targets) {
var didPassFalsyValue = !targets;
var didPassPlainObject = Object.prototype.toString.call(targets) === '[object Object]' && !targets.addEventListener;
throwErrorWhen(didPassFalsyValue, '`tippy()` was passed `' + targets + '` (an invalid falsy value) as its targets argument. Valid types are: ' + 'String (CSS selector), Element, Element[], or NodeList.');
throwErrorWhen(didPassPlainObject, '`tippy()` was passed a plain object (virtual ' + 'reference element) which is no longer supported in v5. Instead, pass ' + 'a placeholder element like `document.createElement("div")`');
}
/**
* Ensures the instance has been configured with the extra prop's functionality
* if the user is specifying it as a prop
*/
function validateExtraPropsFunctionality(instance, partialProps) {
if (partialProps === void 0) {
partialProps = {};
}
var extraProps = ['followCursor', 'inlinePositioning'];
extraProps.forEach(function (prop) {
if (hasOwnProperty(partialProps, prop) && !instance.__extraProps__[prop]) {
var didPassFollowCursor = prop === 'followCursor';
var didPassOtherExtraProp = !didPassFollowCursor;
warnWhen(didPassFollowCursor, 'The `followCursor` prop was specified, but the instance has not ' + 'been configured with followCursor functionality. In v5, ' + '`followCursor` was moved to `extra-props`. View details: ' + 'https://atomiks.github.io/tippyjs/extra-props/');
warnWhen(didPassOtherExtraProp, 'The `' + prop + '` prop was specified, but the instance has not been configured ' + 'with ' + prop + ' functionality. View details: ' + 'https://atomiks.github.io/tippyjs/extra-props/');
}
});
}
export { invokeWithArgsOrReturn as A, validateTargets as B, bindGlobalEventListeners as C, getArrayOfElements as D, isRealElement as E, arrayFrom as F, POPPER_SELECTOR as G, isReferenceElement as H, isBrowser as I, throwErrorWhen as J, removeProperties as K, getVirtualOffsets as L, PREVENT_OVERFLOW_PADDING as P, _extends as _, closestCallback as a, isCursorOutsideInteractiveBorder as b, createPopperElement as c, debounce as d, evaluateProps as e, getBasePlacement as f, getChildren as g, getModifier as h, includes as i, getValue as j, defaultProps as k, PASSIVE as l, currentInput as m, isIE as n, validateExtraPropsFunctionality as o, preserveInvocation as p, hasOwnProperty as q, reflow as r, setFlipModifierEnabled as s, POPPER_INSTANCE_DEPENDENCIES as t, updatePopperElement as u, validateProps as v, warnWhen as w, setTransitionDuration as x, setVisibilityState as y, updateTransitionEndListener as z };
export { isRealElement as A, arrayFrom as B, POPPER_SELECTOR as C, isReferenceElement as D, isBrowser as E, removeProperties as F, getVirtualOffsets as G, NON_UPDATEABLE_PROPS as N, PREVENT_OVERFLOW_PADDING as P, _extends as _, debounce as a, closestCallback as b, createPopperElement as c, defaultProps as d, evaluateProps as e, isCursorOutsideInteractiveBorder as f, getChildren as g, hasOwnProperty as h, includes as i, getBasePlacement as j, getModifier as k, getValueAtIndexOrReturn as l, PASSIVE as m, currentInput as n, isIE as o, preserveInvocation as p, POPPER_INSTANCE_DEPENDENCIES as q, reflow as r, setFlipModifierEnabled as s, setTransitionDuration as t, updatePopperElement as u, setVisibilityState as v, updateTransitionEndListener as w, invokeWithArgsOrReturn as x, bindGlobalEventListeners as y, getArrayOfElements as z };
//# sourceMappingURL=tippy.chunk.js.map
/**!
* tippy.js v5.0.0-alpha.2
* tippy.js v5.0.0-beta.0
* (c) 2017-2019 atomiks
* MIT License
*/
import { e as evaluateProps, d as debounce, c as createPopperElement, g as getChildren, w as warnWhen, i as includes, a as closestCallback, b as isCursorOutsideInteractiveBorder, f as getBasePlacement, h as getModifier, _ as _extends, P as PREVENT_OVERFLOW_PADDING, p as preserveInvocation, r as reflow, j as getValue, k as defaultProps, l as PASSIVE, m as currentInput, n as isIE, s as setFlipModifierEnabled, v as validateProps, o as validateExtraPropsFunctionality, q as hasOwnProperty, u as updatePopperElement, t as POPPER_INSTANCE_DEPENDENCIES, x as setTransitionDuration, y as setVisibilityState, z as updateTransitionEndListener, A as invokeWithArgsOrReturn, B as validateTargets, C as bindGlobalEventListeners, D as getArrayOfElements, E as isRealElement, F as arrayFrom, G as POPPER_SELECTOR, H as isReferenceElement, I as isBrowser } from './tippy.chunk.js';
import { h as hasOwnProperty, d as defaultProps, i as includes, e as evaluateProps, a as debounce, c as createPopperElement, g as getChildren, b as closestCallback, f as isCursorOutsideInteractiveBorder, j as getBasePlacement, k as getModifier, _ as _extends, P as PREVENT_OVERFLOW_PADDING, p as preserveInvocation, r as reflow, l as getValueAtIndexOrReturn, m as PASSIVE, n as currentInput, o as isIE, s as setFlipModifierEnabled, N as NON_UPDATEABLE_PROPS, u as updatePopperElement, q as POPPER_INSTANCE_DEPENDENCIES, t as setTransitionDuration, v as setVisibilityState, w as updateTransitionEndListener, x as invokeWithArgsOrReturn, y as bindGlobalEventListeners, z as getArrayOfElements, A as isRealElement, B as arrayFrom, C as POPPER_SELECTOR, D as isReferenceElement, E as isBrowser } from './tippy.chunk.js';
import Popper from 'popper.js';
var version = "5.0.0-alpha.2";
var version = "5.0.0-beta.0";
/**
* Helpful wrapper around `console.warn()`.
* TODO: Should we use a cache so it only warns a single time and not spam the
* console? (Need to consider hot reloading and invalidation though). Chrome
* already batches warnings as well.
*/
function warnWhen(condition, message) {
if (condition) {
/* eslint-disable-next-line no-console */
console.warn("[tippy.js WARNING] " + message);
}
}
/**
* Helpful wrapper around thrown errors
*/
function throwErrorWhen(condition, message) {
if (condition) {
throw new Error("[tippy.js ERROR] " + message);
}
}
/**
* Validates props with the valid `defaultProps` object
*/
function validateProps(partialProps) {
if (partialProps === void 0) {
partialProps = {};
}
Object.keys(partialProps).forEach(function (prop) {
var value = partialProps[prop];
var didPassTargetProp = prop === 'target';
var didPassA11yProp = prop === 'a11y';
var didPassShowOnInitProp = prop === 'showOnInit';
var didPassArrowTypeProp = prop === 'arrowType';
var didPassTouchHoldProp = prop === 'touchHold';
var didPassSizeProp = prop === 'size';
var didPassGoogleTheme = prop === 'theme' && value === 'google';
var didSpecifyPlacementInPopperOptions = prop === 'popperOptions' && value && hasOwnProperty(value, 'placement');
var didPassOtherUnknownProp = !hasOwnProperty(defaultProps, prop) && !didPassTargetProp && !didPassA11yProp && !didPassShowOnInitProp && !includes(['followCursor'], prop);
warnWhen(didPassTargetProp, 'The `target` prop was removed in v5 and ' + 'replaced with the `delegate()` method. Read more here: ' + 'https//atomiks.github.io/tippyjs/addons#event-delegation');
warnWhen(didPassA11yProp, 'The `a11y` prop was removed in v5. Make ' + 'sure the element you are giving a tippy to is natively ' + 'focusable, such as <button> or <input>, not <div> or <span>.');
warnWhen(didPassShowOnInitProp, 'The `showOnInit` prop was renamed to `showOnCreate` in v5.');
warnWhen(didPassArrowTypeProp, 'The `arrowType` prop was removed in v5 ' + 'in favor of overloading the `arrow` prop. Specify ' + '`arrow: "' + value + '"` instead.');
warnWhen(didPassTouchHoldProp, 'The `touchHold` prop was removed in v5 in favor of overloading the ' + '`touch` prop. Specify `touch: "hold"` instead.');
warnWhen(didPassSizeProp, 'The `size` prop was removed in v5. Instead, use a theme that ' + 'specifies `font-size` and `padding` CSS properties.');
warnWhen(didPassOtherUnknownProp, '`' + prop + '` is not a valid prop. You ' + 'may have spelled it incorrectly. View all of the valid props ' + 'here: https://atomiks.github.io/tippyjs/all-props/');
warnWhen(didPassGoogleTheme, 'The included theme `google` was renamed to `material` in v5.');
warnWhen(didSpecifyPlacementInPopperOptions, 'Specifying `placement` in `popperOptions` is not supported. Use the ' + 'base-level `placement` prop instead.');
});
}
/**
* Validates the `targets` value passed to `tippy()`
*/
function validateTargets(targets) {
var didPassFalsyValue = !targets;
var didPassPlainObject = Object.prototype.toString.call(targets) === '[object Object]' && !targets.addEventListener;
throwErrorWhen(didPassFalsyValue, '`tippy()` was passed `' + targets + '` (an invalid falsy value) as its targets argument. Valid types are: ' + 'String (CSS selector), Element, Element[], or NodeList.');
throwErrorWhen(didPassPlainObject, '`tippy()` was passed a plain object (virtual ' + 'reference element) which is no longer supported in v5. Instead, pass ' + 'a placeholder element like `document.createElement("div")`');
}
/**
* Ensures the instance has been configured with the extra prop's functionality
* if the user is specifying it as a prop
*/
function validateExtraPropsFunctionality(instance, partialProps) {
if (partialProps === void 0) {
partialProps = {};
}
var extraProps = ['followCursor'];
extraProps.forEach(function (prop) {
if (hasOwnProperty(partialProps, prop) && !instance.__extraProps__[prop]) {
var didPassFollowCursor = prop === 'followCursor';
var didPassOtherExtraProp = !didPassFollowCursor;
warnWhen(didPassFollowCursor, 'The `followCursor` prop was specified, but the instance has not ' + 'been configured with followCursor functionality. In v5, ' + '`followCursor` was moved to `extra-props`. View details: ' + 'https://atomiks.github.io/tippyjs/extra-props/');
warnWhen(didPassOtherExtraProp, 'The `' + prop + '` prop was specified, but the instance has not been configured ' + 'with ' + prop + ' functionality. View details: ' + 'https://atomiks.github.io/tippyjs/extra-props/');
}
});
}
var idCounter = 1; // Workaround for IE11's lack of new MouseEvent constructor

@@ -36,3 +120,2 @@

var didHideDueToDocumentMouseDown = false;
var normalizedPlacement;
var currentMountCallback;

@@ -130,10 +213,2 @@ var currentTransitionEndListener;

function getIsVerticalPlacement() {
return includes(['top', 'bottom'], getBasePlacement(instance.state.currentPlacement));
}
function getIsOppositePlacement() {
return includes(['bottom', 'right'], getBasePlacement(instance.state.currentPlacement));
}
function getNormalizedTouchSettings() {

@@ -209,10 +284,15 @@ var touch = instance.props.touch;

setTransitionDuration([popper], isIE ? 0 : instance.props.updateDuration);
var prevRefRect = reference.getBoundingClientRect();
function updatePosition() {
instance.popperInstance.scheduleUpdate();
var currentRefRect = reference.getBoundingClientRect(); // Only schedule an update if the reference rect has changed
if (prevRefRect.top !== currentRefRect.top || prevRefRect.right !== currentRefRect.right || prevRefRect.bottom !== currentRefRect.bottom || prevRefRect.left !== currentRefRect.left) {
instance.popperInstance.scheduleUpdate();
}
prevRefRect = currentRefRect;
if (instance.state.isMounted) {
requestAnimationFrame(updatePosition);
} else {
setTransitionDuration([popper], 0);
}

@@ -405,12 +485,6 @@ }

function createPopperInstance() {
var _instance$props = instance.props,
popperOptions = _instance$props.popperOptions,
placement = _instance$props.placement;
var popperOptions = instance.props.popperOptions;
var arrow = instance.popperChildren.arrow;
var preventOverflowModifier = getModifier(popperOptions, 'preventOverflow'); // Due to the virtual offsets normalization when using `followCursor`, we
// need to use the opposite placement
var preventOverflowModifier = getModifier(popperOptions, 'preventOverflow');
var shift = instance.state.currentPlacement.split('-')[1];
normalizedPlacement = instance.props.followCursor && shift ? placement.replace(shift, shift === 'start' ? 'end' : 'start') : placement;
function applyMutations(data) {

@@ -427,3 +501,3 @@ instance.state.currentPlacement = data.placement;

tooltip.setAttribute('data-placement', instance.state.currentPlacement);
tooltip.setAttribute('data-placement', data.placement);

@@ -434,24 +508,12 @@ if (data.attributes['x-out-of-boundaries'] !== false) {

tooltip.removeAttribute('data-out-of-boundaries');
} // Apply the `distance` prop
}
var basePlacement = getBasePlacement(data.placement);
var isVerticalPlacement = includes(['top', 'bottom'], basePlacement);
var isSecondaryPlacement = includes(['bottom', 'right'], basePlacement); // Apply `distance` prop
var basePlacement = getBasePlacement(instance.state.currentPlacement);
var tooltipStyles = tooltip.style;
tooltipStyles.top = '0';
tooltipStyles.left = '0';
tooltipStyles[getIsVerticalPlacement() ? 'top' : 'left'] = (getIsOppositePlacement() ? 1 : -1) * instance.props.distance + "px";
var padding = preventOverflowModifier && preventOverflowModifier.padding !== undefined ? preventOverflowModifier.padding : PREVENT_OVERFLOW_PADDING;
var isPaddingNumber = typeof padding === 'number';
var computedPadding = _extends({
top: isPaddingNumber ? padding : padding.top,
bottom: isPaddingNumber ? padding : padding.bottom,
left: isPaddingNumber ? padding : padding.left,
right: isPaddingNumber ? padding : padding.right
}, !isPaddingNumber && padding);
computedPadding[basePlacement] = isPaddingNumber ? padding + instance.props.distance : (padding[basePlacement] || 0) + instance.props.distance;
instance.popperInstance.modifiers.filter(function (m) {
return m.name === 'preventOverflow';
})[0].padding = computedPadding;
tooltipStyles[isVerticalPlacement ? 'top' : 'left'] = (isSecondaryPlacement ? 1 : -1) * instance.props.distance + "px";
}

@@ -461,5 +523,5 @@

eventsEnabled: false,
placement: normalizedPlacement
placement: instance.props.placement
}, popperOptions, {
modifiers: _extends({}, popperOptions ? popperOptions.modifiers : {}, {
modifiers: _extends({}, popperOptions && popperOptions.modifiers, {
preventOverflow: _extends({

@@ -469,2 +531,31 @@ boundariesElement: instance.props.boundary,

}, preventOverflowModifier),
// Adds the `distance` calculation to preventOverflow padding
tippySetPreventOverflowPadding: {
enabled: true,
order: 299,
fn: function fn(data) {
var basePlacement = getBasePlacement(data.placement);
var padding = preventOverflowModifier && preventOverflowModifier.padding !== undefined ? preventOverflowModifier.padding : PREVENT_OVERFLOW_PADDING;
var isPaddingNumber = typeof padding === 'number';
var paddingObject = {
top: 0,
bottom: 0,
left: 0,
right: 0
};
var computedPadding = Object.keys(paddingObject).reduce(function (obj, key) {
obj[key] = isPaddingNumber ? padding : padding[key];
if (basePlacement === key) {
obj[key] = isPaddingNumber ? padding + instance.props.distance : (padding[basePlacement] || 0) + instance.props.distance;
}
return obj;
}, paddingObject);
instance.popperInstance.modifiers.filter(function (m) {
return m.name === 'preventOverflow';
})[0].padding = computedPadding;
return data;
}
},
arrow: _extends({

@@ -476,4 +567,2 @@ element: arrow,

enabled: instance.props.flip,
// The tooltip is offset by 10px from the popper in CSS,
// we need to account for its distance
padding: instance.props.distance + PREVENT_OVERFLOW_PADDING,

@@ -545,8 +634,4 @@ behavior: instance.props.flipBehavior

if (instance.props.wait) {
return instance.props.wait(instance, event);
}
addDocumentMouseDownListener();
var delay = getValue(instance.props.delay, 0, defaultProps.delay);
var delay = getValueAtIndexOrReturn(instance.props.delay, 0, defaultProps.delay);

@@ -572,3 +657,3 @@ if (delay) {

instance.state.isScheduledToShow = false;
var delay = getValue(instance.props.delay, 1, defaultProps.delay);
var delay = getValueAtIndexOrReturn(instance.props.delay, 1, defaultProps.delay);

@@ -604,7 +689,10 @@ if (delay) {

cancelAnimationFrame(scheduleHideAnimationFrame);
}
} // Cloning as we're deleting non-updateable props in DEV mode
function setProps(partialProps) {
function setProps(_ref2) {
var partialProps = _extends({}, _ref2);
if (process.env.NODE_ENV !== "production") {
warnWhen(instance.state.isDestroyed, '`set()` was called on a destroyed instance. ' + 'This is a no-op but indicates a potential memory leak.');
warnWhen(instance.state.isDestroyed, '`setProps()` was called on a destroyed instance. ' + 'This is a no-op but indicates a potential memory leak.');
}

@@ -619,2 +707,8 @@

validateExtraPropsFunctionality(instance, partialProps);
NON_UPDATEABLE_PROPS.forEach(function (prop) {
if (hasOwnProperty(partialProps, prop)) {
delete partialProps[prop];
warnWhen(true, 'Cannot update `' + prop + '` prop. Destroy this instance and create a new instance instead.');
}
});
}

@@ -624,3 +718,3 @@

var prevProps = instance.props;
var nextProps = evaluateProps(reference, _extends({}, instance.props, partialProps, {
var nextProps = evaluateProps(reference, _extends({}, instance.props, {}, partialProps, {
ignoreAttributes: true

@@ -660,3 +754,3 @@ }));

if (duration === void 0) {
duration = getValue(instance.props.duration, 0, defaultProps.duration[1]);
duration = getValueAtIndexOrReturn(instance.props.duration, 0, defaultProps.duration);
}

@@ -737,3 +831,3 @@

if (duration === void 0) {
duration = getValue(instance.props.duration, 1, defaultProps.duration[1]);
duration = getValueAtIndexOrReturn(instance.props.duration, 1, defaultProps.duration);
}

@@ -771,3 +865,3 @@

instance.popperInstance.disableEventListeners();
instance.popperInstance.options.placement = normalizedPlacement;
instance.popperInstance.options.placement = instance.props.placement;
popper.parentNode.removeChild(popper);

@@ -813,3 +907,3 @@ instance.props.onHidden(instance);

var props = _extends({}, defaultProps, optionalProps);
var props = _extends({}, defaultProps, {}, optionalProps);

@@ -926,3 +1020,3 @@ var elements = getArrayOfElements(targets);

export { tippy as t };
export { throwErrorWhen as a, tippy as t };
//# sourceMappingURL=tippy.chunk2.js.map
/**!
* tippy.js v5.0.0-alpha.2
* tippy.js v5.0.0-beta.0
* (c) 2017-2019 atomiks

@@ -4,0 +4,0 @@ * MIT License

/**!
* tippy.js v5.0.0-alpha.2
* tippy.js v5.0.0-beta.0
* (c) 2017-2019 atomiks

@@ -38,20 +38,4 @@ * MIT License

var undo = function undo() {};
var originalSetProps = instance.setProps;
instance.setProps = function (partialProps) {
if (__chunk_1.hasOwnProperty(partialProps, 'followCursor')) {
undo();
if (partialProps.followCursor) {
undo = applyFollowCursor(instance);
}
}
originalSetProps(partialProps);
};
if (instance.props.followCursor) {
undo = applyFollowCursor(instance);
applyFollowCursor(instance);
}

@@ -65,5 +49,5 @@ }

var reference = instance.reference;
var originalSetProps = instance.setProps;
var lastMouseMoveEvent;
var isPopperInstanceCreated = false;
var isDestroyed = false;
var wasTriggeredByFocus = false;

@@ -80,3 +64,3 @@

function onMouseMove(event) {
if (wasTriggeredByFocus || isDestroyed || !event) {
if (wasTriggeredByFocus || !event) {
return;

@@ -99,3 +83,4 @@ }

var rect = reference.getBoundingClientRect();
var followCursor = instance.props.followCursor;
var _ref = instance.props,
followCursor = _ref.followCursor;
var isHorizontal = followCursor === 'horizontal';

@@ -105,3 +90,3 @@ var isVertical = followCursor === 'vertical';

var _getVirtualOffsets = __chunk_1.getVirtualOffsets(instance, isVerticalPlacement),
var _getVirtualOffsets = __chunk_1.getVirtualOffsets(instance.popper, isVerticalPlacement),
size = _getVirtualOffsets.size,

@@ -135,3 +120,3 @@ x = _getVirtualOffsets.x,

if (ci.isTouch) {
if (ci.isTouch || followCursor === 'initial' && instance.state.isVisible) {
removeListener();

@@ -146,10 +131,27 @@ }

_onUntrigger = _instance$props.onUntrigger,
_onHidden = _instance$props.onHidden;
_onHidden = _instance$props.onHidden; // Due to the virtual offsets normalization when using `followCursor`,
// we need to use the opposite placement
var placement = instance.props.placement;
var normalizedPlacement = placement;
function setNormalizedPlacement() {
var shift = placement.split('-')[1];
normalizedPlacement = instance.props.followCursor && shift ? placement.replace(shift, shift === 'start' ? 'end' : 'start') : placement;
originalSetProps({
placement: normalizedPlacement
});
}
setNormalizedPlacement();
function popperOnCreate(data) {
__chunk_1.preserveInvocation(popperOptions && popperOptions.onCreate, instance.props.popperOptions.onCreate, [data]);
isPopperInstanceCreated = true;
}
instance.setProps({
popperOptions: {
onCreate: function onCreate(data) {
__chunk_1.preserveInvocation(popperOptions && popperOptions.onCreate, instance.props.popperOptions.onCreate, [data]);
isPopperInstanceCreated = true;
}
},
popperOptions: __chunk_1._extends({}, popperOptions, {
onCreate: popperOnCreate
}),
onMount: function onMount(instance) {

@@ -178,3 +180,3 @@ __chunk_1.preserveInvocation(_onMount, instance.props.onMount, [instance]); // Popper's scroll listeners make sense for `true`, where the cursor

if (!wasTriggeredByFocus && instance.props.followCursor !== 'initial') {
if (!wasTriggeredByFocus && !(instance.state.isMounted && instance.props.followCursor === 'initial')) {
addListener();

@@ -199,7 +201,9 @@ }

}
instance.popperInstance.options.placement = normalizedPlacement;
}
});
var originalSetProps = instance.setProps;
instance.setProps = function (partialProps) {
placement = partialProps.placement || placement;
_onTrigger = partialProps.onTrigger || _onTrigger;

@@ -210,222 +214,14 @@ _onUntrigger = partialProps.onUntrigger || _onUntrigger;

popperOptions = partialProps.popperOptions || popperOptions;
originalSetProps(__chunk_1.removeProperties(partialProps, ['onTrigger', 'onUntrigger', 'onMount', 'onHidden', 'popperOptions']));
originalSetProps(__chunk_1._extends({
popperOptions: __chunk_1._extends({}, popperOptions, {
onCreate: popperOnCreate
})
}, __chunk_1.removeProperties(partialProps, ['placement', 'onTrigger', 'onUntrigger', 'onMount', 'onHidden', 'popperOptions'])));
setNormalizedPlacement();
onMouseMove(lastMouseMoveEvent);
};
return function () {
// Undo
removeListener();
if (instance.popperInstance) {
instance.popperInstance.reference = instance.reference;
}
instance.setProps = originalSetProps;
originalSetProps({
popperOptions: popperOptions,
onTrigger: _onTrigger,
onUntrigger: _onUntrigger,
onMount: _onMount,
onHidden: _onHidden
});
isDestroyed = true;
};
}
function withInlinePositioning(tippy) {
return function (targets, optionalProps) {
var props = __chunk_1._extends({
inlinePositioning: false
}, optionalProps);
return tippy(targets, __chunk_1._extends({}, props, {
onCreate: function onCreate(instance) {
__chunk_1.preserveInvocation(optionalProps && optionalProps.onCreate, instance.props.onCreate, [instance]);
if (process.env.NODE_ENV !== "production") {
instance.__extraProps__.inlinePositioning = true;
}
if (props.inlinePositioning) {
var virtualReference = document.createElement('div');
var _onTrigger = instance.props.onTrigger;
instance.setProps({
onTrigger: function onTrigger(instance, event) {
__chunk_1.preserveInvocation(_onTrigger, instance.props.onTrigger, [instance, event]);
instance.popperInstance.reference = virtualReference;
}
});
if (props.inlinePositioning === 'cursor') {
applyCursorStrategy(instance);
} else {
virtualReference.getBoundingClientRect = function () {
return getBestRect(instance);
};
}
var originalSetProps = instance.setProps;
instance.setProps = function (partialProps) {
// Making this prop fully dynamic is difficult and buggy, and it's
// very unlikely the user will need to dynamically update it anyway.
// Just warn.
if (process.env.NODE_ENV !== "production") {
__chunk_1.warnWhen(__chunk_1.hasOwnProperty(partialProps, 'inlinePositioning'), 'Cannot change `inlinePositioning` prop. Destroy this ' + 'instance and create a new instance instead.');
}
_onTrigger = partialProps.onTrigger || _onTrigger;
originalSetProps(__chunk_1.removeProperties(partialProps, ['onTrigger']));
};
}
}
}));
};
}
function getBestRect(instance) {
var reference = instance.reference;
var rects = reference.getClientRects();
var basePlacement = __chunk_1.getBasePlacement(instance.state.currentPlacement);
var top;
var right;
var bottom;
var left; // Not an inline element that spans 2 or more rows
if (rects.length < 2) {
return reference.getBoundingClientRect();
}
var firstRect = rects[0];
var lastRect = rects[rects.length - 1];
switch (basePlacement) {
case 'top':
{
top = firstRect.top;
bottom = firstRect.bottom;
left = firstRect.left;
right = firstRect.right;
break;
}
case 'bottom':
{
top = lastRect.top;
bottom = lastRect.bottom;
left = lastRect.left;
right = lastRect.right;
break;
}
case 'left':
case 'right':
{
var rectsArr = __chunk_1.arrayFrom(rects); // The values are rounded because the rects are displayed via whole pixels
// e.g. 140.1 and 139.9 are aligned the same
var lefts = rectsArr.map(function (rects) {
return Math.round(rects.left);
});
var rights = rectsArr.map(function (rects) {
return Math.round(rects.right);
});
var minLeft = Math.min.apply(Math, lefts);
var maxRight = Math.max.apply(Math, rights);
var measureRects = rectsArr.filter(function (rect) {
return basePlacement === 'left' ? Math.round(rect.left) === minLeft : Math.round(rect.right) === maxRight;
});
top = measureRects[0].top;
bottom = measureRects[measureRects.length - 1].bottom;
left = minLeft;
right = maxRight;
break;
}
default:
{
return reference.getBoundingClientRect();
}
}
return {
width: right - left,
height: bottom - top,
top: top,
right: right,
bottom: bottom,
left: left
};
}
function applyCursorStrategy(instance) {
var reference = instance.reference;
var _onTrigger2 = instance.props.onTrigger;
instance.setProps({
onTrigger: function onTrigger(instance, event) {
__chunk_1.preserveInvocation(_onTrigger2, instance.props.onTrigger, [instance, event]);
var rects = __chunk_1.arrayFrom(reference.getClientRects());
var basePlacement = __chunk_1.getBasePlacement(instance.state.currentPlacement);
if (event instanceof MouseEvent) {
// We need to choose which rect to use. Check which rect
// the cursor landed on.
var index = -1;
rects.forEach(function (rect, i) {
var isVerticalPlacement = __chunk_1.includes(['top', 'bottom'], basePlacement);
var isWithinHorizontalBounds = event.clientX >= Math.floor(rect.left) && event.clientX <= Math.ceil(rect.right);
var isWithinAllBounds = isWithinHorizontalBounds && event.clientY >= Math.floor(rect.top) && event.clientY <= Math.ceil(rect.bottom);
if (isVerticalPlacement) {
if (isWithinHorizontalBounds && (basePlacement === 'top' && index === -1 || basePlacement === 'bottom')) {
index = i;
}
} else if (isWithinAllBounds && (basePlacement === 'left' && index === -1 || basePlacement === 'right')) {
index = i;
}
});
instance.popperInstance.reference.getBoundingClientRect = function () {
var rect = reference.getClientRects()[index];
var isVerticalPlacement = __chunk_1.includes(['top', 'bottom'], __chunk_1.getBasePlacement(instance.state.currentPlacement));
var _getVirtualOffsets = __chunk_1.getVirtualOffsets(instance, isVerticalPlacement),
size = _getVirtualOffsets.size,
x = _getVirtualOffsets.x,
y = _getVirtualOffsets.y;
var baseRect = {
width: isVerticalPlacement ? size : 0,
height: isVerticalPlacement ? 0 : size,
top: rect.top,
right: rect.right,
bottom: rect.bottom,
left: rect.left
};
return isVerticalPlacement ? __chunk_1._extends({}, baseRect, {
left: event.clientX - x,
right: event.clientX + x
}) : __chunk_1._extends({}, baseRect, {
top: event.clientY - y,
bottom: event.clientY + y
});
};
} else {
// Fallback to `getBestRect` since "cursor" coords don't apply to
// non-MouseEvents
instance.popperInstance.reference.getBoundingClientRect = function () {
return getBestRect(instance);
};
}
}
});
var originalSetProps = instance.setProps;
instance.setProps = function (partialProps) {
_onTrigger2 = partialProps.onTrigger || _onTrigger2;
originalSetProps(__chunk_1.removeProperties(partialProps, ['onTrigger']));
};
}
exports.default = enhance;
exports.followCursor = withFollowCursor;
exports.inlinePositioning = withInlinePositioning;
//# sourceMappingURL=tippy-extra-props.js.map
/**!
* tippy.js v5.0.0-alpha.2
* tippy.js v5.0.0-beta.0
* (c) 2017-2019 atomiks
* MIT License
*/
import { _ as _extends, p as preserveInvocation, q as hasOwnProperty, a as closestCallback, i as includes, f as getBasePlacement, L as getVirtualOffsets, m as currentInput, K as removeProperties, w as warnWhen, F as arrayFrom } from '../../esm/tippy.chunk.js';
import { _ as _extends, p as preserveInvocation, F as removeProperties, b as closestCallback, i as includes, j as getBasePlacement, G as getVirtualOffsets, n as currentInput } from '../../esm/tippy.chunk.js';

@@ -34,20 +34,4 @@ function copyStatics(to, from) {

var undo = function undo() {};
var originalSetProps = instance.setProps;
instance.setProps = function (partialProps) {
if (hasOwnProperty(partialProps, 'followCursor')) {
undo();
if (partialProps.followCursor) {
undo = applyFollowCursor(instance);
}
}
originalSetProps(partialProps);
};
if (instance.props.followCursor) {
undo = applyFollowCursor(instance);
applyFollowCursor(instance);
}

@@ -61,5 +45,5 @@ }

var reference = instance.reference;
var originalSetProps = instance.setProps;
var lastMouseMoveEvent;
var isPopperInstanceCreated = false;
var isDestroyed = false;
var wasTriggeredByFocus = false;

@@ -76,3 +60,3 @@

function onMouseMove(event) {
if (wasTriggeredByFocus || isDestroyed || !event) {
if (wasTriggeredByFocus || !event) {
return;

@@ -95,3 +79,4 @@ }

var rect = reference.getBoundingClientRect();
var followCursor = instance.props.followCursor;
var _ref = instance.props,
followCursor = _ref.followCursor;
var isHorizontal = followCursor === 'horizontal';

@@ -101,3 +86,3 @@ var isVertical = followCursor === 'vertical';

var _getVirtualOffsets = getVirtualOffsets(instance, isVerticalPlacement),
var _getVirtualOffsets = getVirtualOffsets(instance.popper, isVerticalPlacement),
size = _getVirtualOffsets.size,

@@ -131,3 +116,3 @@ x = _getVirtualOffsets.x,

if (ci.isTouch) {
if (ci.isTouch || followCursor === 'initial' && instance.state.isVisible) {
removeListener();

@@ -142,10 +127,27 @@ }

_onUntrigger = _instance$props.onUntrigger,
_onHidden = _instance$props.onHidden;
_onHidden = _instance$props.onHidden; // Due to the virtual offsets normalization when using `followCursor`,
// we need to use the opposite placement
var placement = instance.props.placement;
var normalizedPlacement = placement;
function setNormalizedPlacement() {
var shift = placement.split('-')[1];
normalizedPlacement = instance.props.followCursor && shift ? placement.replace(shift, shift === 'start' ? 'end' : 'start') : placement;
originalSetProps({
placement: normalizedPlacement
});
}
setNormalizedPlacement();
function popperOnCreate(data) {
preserveInvocation(popperOptions && popperOptions.onCreate, instance.props.popperOptions.onCreate, [data]);
isPopperInstanceCreated = true;
}
instance.setProps({
popperOptions: {
onCreate: function onCreate(data) {
preserveInvocation(popperOptions && popperOptions.onCreate, instance.props.popperOptions.onCreate, [data]);
isPopperInstanceCreated = true;
}
},
popperOptions: _extends({}, popperOptions, {
onCreate: popperOnCreate
}),
onMount: function onMount(instance) {

@@ -174,3 +176,3 @@ preserveInvocation(_onMount, instance.props.onMount, [instance]); // Popper's scroll listeners make sense for `true`, where the cursor

if (!wasTriggeredByFocus && instance.props.followCursor !== 'initial') {
if (!wasTriggeredByFocus && !(instance.state.isMounted && instance.props.followCursor === 'initial')) {
addListener();

@@ -195,7 +197,9 @@ }

}
instance.popperInstance.options.placement = normalizedPlacement;
}
});
var originalSetProps = instance.setProps;
instance.setProps = function (partialProps) {
placement = partialProps.placement || placement;
_onTrigger = partialProps.onTrigger || _onTrigger;

@@ -206,221 +210,14 @@ _onUntrigger = partialProps.onUntrigger || _onUntrigger;

popperOptions = partialProps.popperOptions || popperOptions;
originalSetProps(removeProperties(partialProps, ['onTrigger', 'onUntrigger', 'onMount', 'onHidden', 'popperOptions']));
originalSetProps(_extends({
popperOptions: _extends({}, popperOptions, {
onCreate: popperOnCreate
})
}, removeProperties(partialProps, ['placement', 'onTrigger', 'onUntrigger', 'onMount', 'onHidden', 'popperOptions'])));
setNormalizedPlacement();
onMouseMove(lastMouseMoveEvent);
};
return function () {
// Undo
removeListener();
if (instance.popperInstance) {
instance.popperInstance.reference = instance.reference;
}
instance.setProps = originalSetProps;
originalSetProps({
popperOptions: popperOptions,
onTrigger: _onTrigger,
onUntrigger: _onUntrigger,
onMount: _onMount,
onHidden: _onHidden
});
isDestroyed = true;
};
}
function withInlinePositioning(tippy) {
return function (targets, optionalProps) {
var props = _extends({
inlinePositioning: false
}, optionalProps);
return tippy(targets, _extends({}, props, {
onCreate: function onCreate(instance) {
preserveInvocation(optionalProps && optionalProps.onCreate, instance.props.onCreate, [instance]);
if (process.env.NODE_ENV !== "production") {
instance.__extraProps__.inlinePositioning = true;
}
if (props.inlinePositioning) {
var virtualReference = document.createElement('div');
var _onTrigger = instance.props.onTrigger;
instance.setProps({
onTrigger: function onTrigger(instance, event) {
preserveInvocation(_onTrigger, instance.props.onTrigger, [instance, event]);
instance.popperInstance.reference = virtualReference;
}
});
if (props.inlinePositioning === 'cursor') {
applyCursorStrategy(instance);
} else {
virtualReference.getBoundingClientRect = function () {
return getBestRect(instance);
};
}
var originalSetProps = instance.setProps;
instance.setProps = function (partialProps) {
// Making this prop fully dynamic is difficult and buggy, and it's
// very unlikely the user will need to dynamically update it anyway.
// Just warn.
if (process.env.NODE_ENV !== "production") {
warnWhen(hasOwnProperty(partialProps, 'inlinePositioning'), 'Cannot change `inlinePositioning` prop. Destroy this ' + 'instance and create a new instance instead.');
}
_onTrigger = partialProps.onTrigger || _onTrigger;
originalSetProps(removeProperties(partialProps, ['onTrigger']));
};
}
}
}));
};
}
function getBestRect(instance) {
var reference = instance.reference;
var rects = reference.getClientRects();
var basePlacement = getBasePlacement(instance.state.currentPlacement);
var top;
var right;
var bottom;
var left; // Not an inline element that spans 2 or more rows
if (rects.length < 2) {
return reference.getBoundingClientRect();
}
var firstRect = rects[0];
var lastRect = rects[rects.length - 1];
switch (basePlacement) {
case 'top':
{
top = firstRect.top;
bottom = firstRect.bottom;
left = firstRect.left;
right = firstRect.right;
break;
}
case 'bottom':
{
top = lastRect.top;
bottom = lastRect.bottom;
left = lastRect.left;
right = lastRect.right;
break;
}
case 'left':
case 'right':
{
var rectsArr = arrayFrom(rects); // The values are rounded because the rects are displayed via whole pixels
// e.g. 140.1 and 139.9 are aligned the same
var lefts = rectsArr.map(function (rects) {
return Math.round(rects.left);
});
var rights = rectsArr.map(function (rects) {
return Math.round(rects.right);
});
var minLeft = Math.min.apply(Math, lefts);
var maxRight = Math.max.apply(Math, rights);
var measureRects = rectsArr.filter(function (rect) {
return basePlacement === 'left' ? Math.round(rect.left) === minLeft : Math.round(rect.right) === maxRight;
});
top = measureRects[0].top;
bottom = measureRects[measureRects.length - 1].bottom;
left = minLeft;
right = maxRight;
break;
}
default:
{
return reference.getBoundingClientRect();
}
}
return {
width: right - left,
height: bottom - top,
top: top,
right: right,
bottom: bottom,
left: left
};
}
function applyCursorStrategy(instance) {
var reference = instance.reference;
var _onTrigger2 = instance.props.onTrigger;
instance.setProps({
onTrigger: function onTrigger(instance, event) {
preserveInvocation(_onTrigger2, instance.props.onTrigger, [instance, event]);
var rects = arrayFrom(reference.getClientRects());
var basePlacement = getBasePlacement(instance.state.currentPlacement);
if (event instanceof MouseEvent) {
// We need to choose which rect to use. Check which rect
// the cursor landed on.
var index = -1;
rects.forEach(function (rect, i) {
var isVerticalPlacement = includes(['top', 'bottom'], basePlacement);
var isWithinHorizontalBounds = event.clientX >= Math.floor(rect.left) && event.clientX <= Math.ceil(rect.right);
var isWithinAllBounds = isWithinHorizontalBounds && event.clientY >= Math.floor(rect.top) && event.clientY <= Math.ceil(rect.bottom);
if (isVerticalPlacement) {
if (isWithinHorizontalBounds && (basePlacement === 'top' && index === -1 || basePlacement === 'bottom')) {
index = i;
}
} else if (isWithinAllBounds && (basePlacement === 'left' && index === -1 || basePlacement === 'right')) {
index = i;
}
});
instance.popperInstance.reference.getBoundingClientRect = function () {
var rect = reference.getClientRects()[index];
var isVerticalPlacement = includes(['top', 'bottom'], getBasePlacement(instance.state.currentPlacement));
var _getVirtualOffsets = getVirtualOffsets(instance, isVerticalPlacement),
size = _getVirtualOffsets.size,
x = _getVirtualOffsets.x,
y = _getVirtualOffsets.y;
var baseRect = {
width: isVerticalPlacement ? size : 0,
height: isVerticalPlacement ? 0 : size,
top: rect.top,
right: rect.right,
bottom: rect.bottom,
left: rect.left
};
return isVerticalPlacement ? _extends({}, baseRect, {
left: event.clientX - x,
right: event.clientX + x
}) : _extends({}, baseRect, {
top: event.clientY - y,
bottom: event.clientY + y
});
};
} else {
// Fallback to `getBestRect` since "cursor" coords don't apply to
// non-MouseEvents
instance.popperInstance.reference.getBoundingClientRect = function () {
return getBestRect(instance);
};
}
}
});
var originalSetProps = instance.setProps;
instance.setProps = function (partialProps) {
_onTrigger2 = partialProps.onTrigger || _onTrigger2;
originalSetProps(removeProperties(partialProps, ['onTrigger']));
};
}
export default enhance;
export { withFollowCursor as followCursor, withInlinePositioning as inlinePositioning };
export { withFollowCursor as followCursor };
//# sourceMappingURL=tippy-extra-props.js.map

@@ -38,29 +38,12 @@ (function () {

var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';
var ua = isBrowser ? navigator.userAgent : '';
var isIE = /MSIE |Trident\//.test(ua);
var isUCBrowser = /UCBrowser\//.test(ua);
var isIOS = isBrowser && /iPhone|iPad|iPod/.test(navigator.platform);
/**
* Safe .hasOwnProperty check, for prototype-less objects
*/
function hasOwnProperty(obj, key) {
return {}.hasOwnProperty.call(obj, key);
}
/**
* Returns offsets for virtual reference when using a cursor point
*/
function getVirtualOffsets(_ref, isVerticalPlacement) {
var popper = _ref.popper,
currentPlacement = _ref.state.currentPlacement;
var isShift = !!currentPlacement.split('-')[1];
function getVirtualOffsets(popper, isVerticalPlacement) {
var size = isVerticalPlacement ? popper.offsetWidth : popper.offsetHeight;
var halfSize = size / 2;
return {
size: size,
x: isVerticalPlacement ? isShift ? size : halfSize : 0,
y: isVerticalPlacement ? 0 : isShift ? size : halfSize
x: isVerticalPlacement ? size : 0,
y: isVerticalPlacement ? 0 : size
};

@@ -90,9 +73,2 @@ }

/**
* Ponyfill for Array.from - converts iterable values to an array
*/
function arrayFrom(value) {
return [].slice.call(value);
}
/**
* Works like Element.prototype.closest, but uses a callback instead

@@ -113,3 +89,3 @@ */

/**
* Determines if an array or string includes a value
* Determines if an array or string includes a string
*/

@@ -143,20 +119,4 @@

var undo = function undo() {};
var originalSetProps = instance.setProps;
instance.setProps = function (partialProps) {
if (hasOwnProperty(partialProps, 'followCursor')) {
undo();
if (partialProps.followCursor) {
undo = applyFollowCursor(instance);
}
}
originalSetProps(partialProps);
};
if (instance.props.followCursor) {
undo = applyFollowCursor(instance);
applyFollowCursor(instance);
}

@@ -170,5 +130,5 @@ }

var reference = instance.reference;
var originalSetProps = instance.setProps;
var lastMouseMoveEvent;
var isPopperInstanceCreated = false;
var isDestroyed = false;
var wasTriggeredByFocus = false;

@@ -185,3 +145,3 @@

function onMouseMove(event) {
if (wasTriggeredByFocus || isDestroyed || !event) {
if (wasTriggeredByFocus || !event) {
return;

@@ -204,3 +164,4 @@ }

var rect = reference.getBoundingClientRect();
var followCursor = instance.props.followCursor;
var _ref = instance.props,
followCursor = _ref.followCursor;
var isHorizontal = followCursor === 'horizontal';

@@ -210,3 +171,3 @@ var isVertical = followCursor === 'vertical';

var _getVirtualOffsets = getVirtualOffsets(instance, isVerticalPlacement),
var _getVirtualOffsets = getVirtualOffsets(instance.popper, isVerticalPlacement),
size = _getVirtualOffsets.size,

@@ -240,3 +201,3 @@ x = _getVirtualOffsets.x,

if (ci.isTouch) {
if (ci.isTouch || followCursor === 'initial' && instance.state.isVisible) {
removeListener();

@@ -251,10 +212,27 @@ }

_onUntrigger = _instance$props.onUntrigger,
_onHidden = _instance$props.onHidden;
_onHidden = _instance$props.onHidden; // Due to the virtual offsets normalization when using `followCursor`,
// we need to use the opposite placement
var placement = instance.props.placement;
var normalizedPlacement = placement;
function setNormalizedPlacement() {
var shift = placement.split('-')[1];
normalizedPlacement = instance.props.followCursor && shift ? placement.replace(shift, shift === 'start' ? 'end' : 'start') : placement;
originalSetProps({
placement: normalizedPlacement
});
}
setNormalizedPlacement();
function popperOnCreate(data) {
preserveInvocation(popperOptions && popperOptions.onCreate, instance.props.popperOptions.onCreate, [data]);
isPopperInstanceCreated = true;
}
instance.setProps({
popperOptions: {
onCreate: function onCreate(data) {
preserveInvocation(popperOptions && popperOptions.onCreate, instance.props.popperOptions.onCreate, [data]);
isPopperInstanceCreated = true;
}
},
popperOptions: _extends({}, popperOptions, {
onCreate: popperOnCreate
}),
onMount: function onMount(instance) {

@@ -283,3 +261,3 @@ preserveInvocation(_onMount, instance.props.onMount, [instance]); // Popper's scroll listeners make sense for `true`, where the cursor

if (!wasTriggeredByFocus && instance.props.followCursor !== 'initial') {
if (!wasTriggeredByFocus && !(instance.state.isMounted && instance.props.followCursor === 'initial')) {
addListener();

@@ -304,7 +282,9 @@ }

}
instance.popperInstance.options.placement = normalizedPlacement;
}
});
var originalSetProps = instance.setProps;
instance.setProps = function (partialProps) {
placement = partialProps.placement || placement;
_onTrigger = partialProps.onTrigger || _onTrigger;

@@ -315,237 +295,16 @@ _onUntrigger = partialProps.onUntrigger || _onUntrigger;

popperOptions = partialProps.popperOptions || popperOptions;
originalSetProps(removeProperties(partialProps, ['onTrigger', 'onUntrigger', 'onMount', 'onHidden', 'popperOptions']));
originalSetProps(_extends({
popperOptions: _extends({}, popperOptions, {
onCreate: popperOnCreate
})
}, removeProperties(partialProps, ['placement', 'onTrigger', 'onUntrigger', 'onMount', 'onHidden', 'popperOptions'])));
setNormalizedPlacement();
onMouseMove(lastMouseMoveEvent);
};
return function () {
// Undo
removeListener();
if (instance.popperInstance) {
instance.popperInstance.reference = instance.reference;
}
instance.setProps = originalSetProps;
originalSetProps({
popperOptions: popperOptions,
onTrigger: _onTrigger,
onUntrigger: _onUntrigger,
onMount: _onMount,
onHidden: _onHidden
});
isDestroyed = true;
};
}
/**
* Helpful wrapper around `console.warn()`.
* TODO: Should we use a cache so it only warns a single time and not spam the
* console? (Need to consider hot reloading and invalidation though). Chrome
* already batches warnings as well.
*/
function warnWhen(condition, message) {
if (condition) {
/* eslint-disable-next-line no-console */
console.warn("[tippy.js WARNING] " + message);
}
}
function withInlinePositioning(tippy) {
return function (targets, optionalProps) {
var props = _extends({
inlinePositioning: false
}, optionalProps);
return tippy(targets, _extends({}, props, {
onCreate: function onCreate(instance) {
preserveInvocation(optionalProps && optionalProps.onCreate, instance.props.onCreate, [instance]);
{
instance.__extraProps__.inlinePositioning = true;
}
if (props.inlinePositioning) {
var virtualReference = document.createElement('div');
var _onTrigger = instance.props.onTrigger;
instance.setProps({
onTrigger: function onTrigger(instance, event) {
preserveInvocation(_onTrigger, instance.props.onTrigger, [instance, event]);
instance.popperInstance.reference = virtualReference;
}
});
if (props.inlinePositioning === 'cursor') {
applyCursorStrategy(instance);
} else {
virtualReference.getBoundingClientRect = function () {
return getBestRect(instance);
};
}
var originalSetProps = instance.setProps;
instance.setProps = function (partialProps) {
// Making this prop fully dynamic is difficult and buggy, and it's
// very unlikely the user will need to dynamically update it anyway.
// Just warn.
{
warnWhen(hasOwnProperty(partialProps, 'inlinePositioning'), 'Cannot change `inlinePositioning` prop. Destroy this ' + 'instance and create a new instance instead.');
}
_onTrigger = partialProps.onTrigger || _onTrigger;
originalSetProps(removeProperties(partialProps, ['onTrigger']));
};
}
}
}));
};
}
function getBestRect(instance) {
var reference = instance.reference;
var rects = reference.getClientRects();
var basePlacement = getBasePlacement(instance.state.currentPlacement);
var top;
var right;
var bottom;
var left; // Not an inline element that spans 2 or more rows
if (rects.length < 2) {
return reference.getBoundingClientRect();
}
var firstRect = rects[0];
var lastRect = rects[rects.length - 1];
switch (basePlacement) {
case 'top':
{
top = firstRect.top;
bottom = firstRect.bottom;
left = firstRect.left;
right = firstRect.right;
break;
}
case 'bottom':
{
top = lastRect.top;
bottom = lastRect.bottom;
left = lastRect.left;
right = lastRect.right;
break;
}
case 'left':
case 'right':
{
var rectsArr = arrayFrom(rects); // The values are rounded because the rects are displayed via whole pixels
// e.g. 140.1 and 139.9 are aligned the same
var lefts = rectsArr.map(function (rects) {
return Math.round(rects.left);
});
var rights = rectsArr.map(function (rects) {
return Math.round(rects.right);
});
var minLeft = Math.min.apply(Math, lefts);
var maxRight = Math.max.apply(Math, rights);
var measureRects = rectsArr.filter(function (rect) {
return basePlacement === 'left' ? Math.round(rect.left) === minLeft : Math.round(rect.right) === maxRight;
});
top = measureRects[0].top;
bottom = measureRects[measureRects.length - 1].bottom;
left = minLeft;
right = maxRight;
break;
}
default:
{
return reference.getBoundingClientRect();
}
}
return {
width: right - left,
height: bottom - top,
top: top,
right: right,
bottom: bottom,
left: left
};
}
function applyCursorStrategy(instance) {
var reference = instance.reference;
var _onTrigger2 = instance.props.onTrigger;
instance.setProps({
onTrigger: function onTrigger(instance, event) {
preserveInvocation(_onTrigger2, instance.props.onTrigger, [instance, event]);
var rects = arrayFrom(reference.getClientRects());
var basePlacement = getBasePlacement(instance.state.currentPlacement);
if (event instanceof MouseEvent) {
// We need to choose which rect to use. Check which rect
// the cursor landed on.
var index = -1;
rects.forEach(function (rect, i) {
var isVerticalPlacement = includes(['top', 'bottom'], basePlacement);
var isWithinHorizontalBounds = event.clientX >= Math.floor(rect.left) && event.clientX <= Math.ceil(rect.right);
var isWithinAllBounds = isWithinHorizontalBounds && event.clientY >= Math.floor(rect.top) && event.clientY <= Math.ceil(rect.bottom);
if (isVerticalPlacement) {
if (isWithinHorizontalBounds && (basePlacement === 'top' && index === -1 || basePlacement === 'bottom')) {
index = i;
}
} else if (isWithinAllBounds && (basePlacement === 'left' && index === -1 || basePlacement === 'right')) {
index = i;
}
});
instance.popperInstance.reference.getBoundingClientRect = function () {
var rect = reference.getClientRects()[index];
var isVerticalPlacement = includes(['top', 'bottom'], getBasePlacement(instance.state.currentPlacement));
var _getVirtualOffsets = getVirtualOffsets(instance, isVerticalPlacement),
size = _getVirtualOffsets.size,
x = _getVirtualOffsets.x,
y = _getVirtualOffsets.y;
var baseRect = {
width: isVerticalPlacement ? size : 0,
height: isVerticalPlacement ? 0 : size,
top: rect.top,
right: rect.right,
bottom: rect.bottom,
left: rect.left
};
return isVerticalPlacement ? _extends({}, baseRect, {
left: event.clientX - x,
right: event.clientX + x
}) : _extends({}, baseRect, {
top: event.clientY - y,
bottom: event.clientY + y
});
};
} else {
// Fallback to `getBestRect` since "cursor" coords don't apply to
// non-MouseEvents
instance.popperInstance.reference.getBoundingClientRect = function () {
return getBestRect(instance);
};
}
}
});
var originalSetProps = instance.setProps;
instance.setProps = function (partialProps) {
_onTrigger2 = partialProps.onTrigger || _onTrigger2;
originalSetProps(removeProperties(partialProps, ['onTrigger']));
};
}
/* eslint-disable no-undef */
if (typeof tippy === 'function') {
window.tippy = enhance(tippy, [withFollowCursor, withInlinePositioning]);
window.tippy = enhance(tippy, [withFollowCursor]);
} else {

@@ -552,0 +311,0 @@ throw new Error('[tippy.js ERROR] `tippy` is not a global function. Make sure you have ' + 'included the tippy script before tippy-extra-props.');

@@ -1,2 +0,2 @@

!function(){"use strict";function t(){return(t=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var e="undefined"!=typeof window&&"undefined"!=typeof document,n=e?navigator.userAgent:"";/MSIE |Trident\//.test(n),/UCBrowser\//.test(n),e&&/iPhone|iPad|iPod/.test(navigator.platform);function r(t,e){var n=t.popper,r=!!t.state.currentPlacement.split("-")[1],o=e?n.offsetWidth:n.offsetHeight,i=o/2;return{size:o,x:e?r?o:i:0,y:e?0:r?o:i}}function o(t,e,n){t&&t!==e&&t.apply(null,n)}function i(e,n){var r=t({},e);return n.forEach(function(t){delete r[t]}),r}function p(t){return[].slice.call(t)}function c(t,e){return t.indexOf(e)>-1}function u(t){return t.split("-")[0]}var s,a,f,l,g={isTouch:!1};function d(t){var e,n=t.reference,p=!1,s=!1,a=!1;function f(){document.removeEventListener("mousemove",l)}function l(o){if(!a&&!s&&o){var i=e=o,l=i.clientX,d=i.clientY;if(t.popperInstance&&p){var h=function(t,e){for(;t;){if(e(t))return t;t=t.parentElement}return null}(o.target,function(t){return t===n}),v=n.getBoundingClientRect(),m=t.props.followCursor,P="horizontal"===m,C="vertical"===m,y=c(["top","bottom"],u(t.state.currentPlacement)),b=r(t,y),M=b.size,w=b.x,T=b.y;!h&&t.props.interactive||(t.popperInstance.reference={clientWidth:0,clientHeight:0,getBoundingClientRect:function(){return{width:y?M:0,height:y?0:M,top:(P?v.top:d)-T,bottom:(P?v.bottom:d)+T,left:(C?v.left:l)-w,right:(C?v.right:l)+w}}},t.popperInstance.update()),("undefined"!=typeof tippy?tippy.currentInput:g).isTouch&&f()}}}var d=t.props,h=d.popperOptions,v=d.onMount,m=d.onTrigger,P=d.onUntrigger,C=d.onHidden;t.setProps({popperOptions:{onCreate:function(e){o(h&&h.onCreate,t.props.popperOptions.onCreate,[e]),p=!0}},onMount:function(t){o(v,t.props.onMount,[t]),a||!0===t.props.followCursor||t.popperInstance.disableEventListeners(),l(e)},onTrigger:function(t,n){o(m,t.props.onTrigger,[t,n]),a="focus"===n.type,n instanceof MouseEvent&&(e=n),a&&t.popperInstance&&(t.popperInstance.reference=t.reference),a||"initial"===t.props.followCursor||document.addEventListener("mousemove",l)},onUntrigger:function(t,e){o(P,t.props.onUntrigger,[t,e]),t.state.isVisible||f()},onHidden:function(){o(C,t.props.onHidden,[t]),t.state.isScheduledToShow||f()}});var y=t.setProps;return t.setProps=function(t){m=t.onTrigger||m,P=t.onUntrigger||P,v=t.onMount||v,C=t.onHidden||C,h=t.popperOptions||h,y(i(t,["onTrigger","onUntrigger","onMount","onHidden","popperOptions"])),l(e)},function(){f(),t.popperInstance&&(t.popperInstance.reference=t.reference),t.setProps=y,y({popperOptions:h,onTrigger:m,onUntrigger:P,onMount:v,onHidden:C}),s=!0}}function h(t){var e,n,r,o,i=t.reference,c=i.getClientRects(),s=u(t.state.currentPlacement);if(c.length<2)return i.getBoundingClientRect();var a=c[0],f=c[c.length-1];switch(s){case"top":e=a.top,r=a.bottom,o=a.left,n=a.right;break;case"bottom":e=f.top,r=f.bottom,o=f.left,n=f.right;break;case"left":case"right":var l=p(c),g=l.map(function(t){return Math.round(t.left)}),d=l.map(function(t){return Math.round(t.right)}),h=Math.min.apply(Math,g),v=Math.max.apply(Math,d),m=l.filter(function(t){return"left"===s?Math.round(t.left)===h:Math.round(t.right)===v});e=m[0].top,r=m[m.length-1].bottom,o=h,n=v;break;default:return i.getBoundingClientRect()}return{width:n-o,height:r-e,top:e,right:n,bottom:r,left:o}}if("function"!=typeof tippy)throw new Error("[tippy.js ERROR] `tippy` is not a global function. Make sure you have included the tippy script before tippy-extra-props.");window.tippy=(s=tippy,l=[function(e){return function(n,r){return e(n,t({},r,{onCreate:function(t){o(r&&r.onCreate,t.props.onCreate,[t]);var e=function(){},n=t.setProps;t.setProps=function(r){var o,i;o=r,i="followCursor",{}.hasOwnProperty.call(o,i)&&(e(),r.followCursor&&(e=d(t))),n(r)},t.props.followCursor&&(e=d(t))}}))}},function(e){return function(n,s){var a=t({inlinePositioning:!1},s);return e(n,t({},a,{onCreate:function(e){if(o(s&&s.onCreate,e.props.onCreate,[e]),a.inlinePositioning){var n=document.createElement("div"),f=e.props.onTrigger;e.setProps({onTrigger:function(t,e){o(f,t.props.onTrigger,[t,e]),t.popperInstance.reference=n}}),"cursor"===a.inlinePositioning?function(e){var n=e.reference,s=e.props.onTrigger;e.setProps({onTrigger:function(e,i){o(s,e.props.onTrigger,[e,i]);var a=p(n.getClientRects()),f=u(e.state.currentPlacement);if(i instanceof MouseEvent){var l=-1;a.forEach(function(t,e){var n=c(["top","bottom"],f),r=i.clientX>=Math.floor(t.left)&&i.clientX<=Math.ceil(t.right),o=r&&i.clientY>=Math.floor(t.top)&&i.clientY<=Math.ceil(t.bottom);n?r&&("top"===f&&-1===l||"bottom"===f)&&(l=e):o&&("left"===f&&-1===l||"right"===f)&&(l=e)}),e.popperInstance.reference.getBoundingClientRect=function(){var o=n.getClientRects()[l],p=c(["top","bottom"],u(e.state.currentPlacement)),s=r(e,p),a=s.size,f=s.x,g=s.y,d={width:p?a:0,height:p?0:a,top:o.top,right:o.right,bottom:o.bottom,left:o.left};return t({},d,p?{left:i.clientX-f,right:i.clientX+f}:{top:i.clientY-g,bottom:i.clientY+g})}}else e.popperInstance.reference.getBoundingClientRect=function(){return h(e)}}});var a=e.setProps;e.setProps=function(t){s=t.onTrigger||s,a(i(t,["onTrigger"]))}}(e):n.getBoundingClientRect=function(){return h(e)};var l=e.setProps;e.setProps=function(t){f=t.onTrigger||f,l(i(t,["onTrigger"]))}}}}))}}].reduce(function(t,e){return e(t)},s),f=s,(a=l).currentInput=f.currentInput,a.version=f.version,a.defaultProps=f.defaultProps,a.setDefaultProps=f.setDefaultProps,a.hideAll=f.hideAll,a)}();
!function(){"use strict";function e(){return(e=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}function n(e,n,t){e&&e!==n&&e.apply(null,t)}var t,o,r,p,i={isTouch:!1};function s(t){var o,r=t.reference,p=t.setProps,s=!1,u=!1;function c(){document.removeEventListener("mousemove",a)}function a(e){if(!u&&e){var n=o=e,p=n.clientX,a=n.clientY;if(t.popperInstance&&s){var f,l,d=function(e,n){for(;e;){if(n(e))return e;e=e.parentElement}return null}(e.target,function(e){return e===r}),g=r.getBoundingClientRect(),h=t.props.followCursor,v="horizontal"===h,y="vertical"===h,m=(f=["top","bottom"],l=function(e){return e.split("-")[0]}(t.state.currentPlacement),f.indexOf(l)>-1),C=function(e,n){var t=n?e.offsetWidth:e.offsetHeight;return{size:t,x:n?t:0,y:n?0:t}}(t.popper,m),w=C.size,O=C.x,b=C.y;!d&&t.props.interactive||(t.popperInstance.reference={clientWidth:0,clientHeight:0,getBoundingClientRect:function(){return{width:m?w:0,height:m?0:w,top:(v?g.top:a)-b,bottom:(v?g.bottom:a)+b,left:(y?g.left:p)-O,right:(y?g.right:p)+O}}},t.popperInstance.update()),(("undefined"!=typeof tippy?tippy.currentInput:i).isTouch||"initial"===h&&t.state.isVisible)&&c()}}}var f=t.props,l=f.popperOptions,d=f.onMount,g=f.onTrigger,h=f.onUntrigger,v=f.onHidden,y=t.props.placement,m=y;function C(){var e=y.split("-")[1];m=t.props.followCursor&&e?y.replace(e,"start"===e?"end":"start"):y,p({placement:m})}function w(e){n(l&&l.onCreate,t.props.popperOptions.onCreate,[e]),s=!0}C(),t.setProps({popperOptions:e({},l,{onCreate:w}),onMount:function(e){n(d,e.props.onMount,[e]),u||!0===e.props.followCursor||e.popperInstance.disableEventListeners(),a(o)},onTrigger:function(e,t){n(g,e.props.onTrigger,[e,t]),u="focus"===t.type,t instanceof MouseEvent&&(o=t),u&&e.popperInstance&&(e.popperInstance.reference=e.reference),u||e.state.isMounted&&"initial"===e.props.followCursor||document.addEventListener("mousemove",a)},onUntrigger:function(e,t){n(h,e.props.onUntrigger,[e,t]),e.state.isVisible||c()},onHidden:function(){n(v,t.props.onHidden,[t]),t.state.isScheduledToShow||c(),t.popperInstance.options.placement=m}}),t.setProps=function(n){y=n.placement||y,g=n.onTrigger||g,h=n.onUntrigger||h,d=n.onMount||d,v=n.onHidden||v,l=n.popperOptions||l,p(e({popperOptions:e({},l,{onCreate:w})},function(n,t){var o=e({},n);return t.forEach(function(e){delete o[e]}),o}(n,["placement","onTrigger","onUntrigger","onMount","onHidden","popperOptions"]))),C(),a(o)}}if("function"!=typeof tippy)throw new Error("[tippy.js ERROR] `tippy` is not a global function. Make sure you have included the tippy script before tippy-extra-props.");window.tippy=(t=tippy,p=[function(t){return function(o,r){return t(o,e({},r,{onCreate:function(e){n(r&&r.onCreate,e.props.onCreate,[e]),e.props.followCursor&&s(e)}}))}}].reduce(function(e,n){return n(e)},t),r=t,(o=p).currentInput=r.currentInput,o.version=r.version,o.defaultProps=r.defaultProps,o.setDefaultProps=r.setDefaultProps,o.hideAll=r.hideAll,o)}();
//# sourceMappingURL=tippy-extra-props.min.js.map

@@ -12,5 +12,4 @@ import {

declare const followCursor: (tippy: Tippy) => TippyCallWrapper
declare const inlinePositioning: (tippy: Tippy) => TippyCallWrapper
export default enhance
export { followCursor, inlinePositioning }
export { followCursor }
/**!
* tippy.js v5.0.0-alpha.2
* tippy.js v5.0.0-beta.0
* (c) 2017-2019 atomiks

@@ -11,3 +11,3 @@ * MIT License

var css = ".tippy-tooltip[data-animation=fade][data-state=hidden]{opacity:0}.tippy-iOS{cursor:pointer!important;-webkit-tap-highlight-color:transparent}.tippy-popper{pointer-events:none;max-width:calc(100% - 8px);transition-timing-function:cubic-bezier(.165,.84,.44,1)}.tippy-tooltip{position:relative;color:#fff;border-radius:.25rem;font-size:.875rem;line-height:1.4;background-color:#333;overflow:hidden;transition-property:visibility,opacity,transform;outline:0}.tippy-tooltip[data-placement^=top] .tippy-arrow{border-width:8px 8px 0;border-top-color:#333;margin:0 3px;transform-origin:50% 0;bottom:-7px}.tippy-tooltip[data-placement^=bottom] .tippy-arrow{border-width:0 8px 8px;border-bottom-color:#333;margin:0 3px;transform-origin:50% 7px;top:-7px}.tippy-tooltip[data-placement^=left] .tippy-arrow{border-width:8px 0 8px 8px;border-left-color:#333;margin:3px 0;transform-origin:0 50%;right:-7px}.tippy-tooltip[data-placement^=right] .tippy-arrow{border-width:8px 8px 8px 0;border-right-color:#333;margin:3px 0;transform-origin:7px 50%;left:-7px}.tippy-tooltip[data-arrow]{overflow:visible}.tippy-tooltip[data-animatefill]{background-color:transparent!important}.tippy-tooltip[data-interactive]{pointer-events:auto}.tippy-tooltip[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-tooltip[data-inertia][data-state=hidden]{transition-timing-function:ease}.tippy-arrow{border-color:transparent;border-style:solid;position:absolute}.tippy-arrow[data-state=hidden]{opacity:0}.tippy-content{padding:.3125rem .5625rem}";
var css = ".tippy-tooltip[data-animation=fade][data-state=hidden]{opacity:0}.tippy-iOS{cursor:pointer!important;-webkit-tap-highlight-color:transparent}.tippy-popper{pointer-events:none;max-width:calc(100% - 10px);transition-timing-function:cubic-bezier(.165,.84,.44,1)}.tippy-tooltip{position:relative;color:#fff;border-radius:.25rem;font-size:.875rem;line-height:1.4;background-color:#333;overflow:hidden;transition-property:visibility,opacity,transform;outline:0}.tippy-tooltip[data-placement^=top] .tippy-arrow{border-width:8px 8px 0;border-top-color:#333;margin:0 3px;transform-origin:50% 0;bottom:-7px}.tippy-tooltip[data-placement^=bottom] .tippy-arrow{border-width:0 8px 8px;border-bottom-color:#333;margin:0 3px;transform-origin:50% 7px;top:-7px}.tippy-tooltip[data-placement^=left] .tippy-arrow{border-width:8px 0 8px 8px;border-left-color:#333;margin:3px 0;transform-origin:0 50%;right:-7px}.tippy-tooltip[data-placement^=right] .tippy-arrow{border-width:8px 8px 8px 0;border-right-color:#333;margin:3px 0;transform-origin:7px 50%;left:-7px}.tippy-tooltip[data-arrow]{overflow:visible}.tippy-tooltip[data-animatefill]{background-color:transparent!important}.tippy-tooltip[data-interactive]{pointer-events:auto}.tippy-tooltip[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-tooltip[data-inertia][data-state=hidden]{transition-timing-function:ease}.tippy-arrow{border-color:transparent;border-style:solid;position:absolute}.tippy-arrow[data-state=hidden]{opacity:0}.tippy-content{padding:.3125rem .5625rem}";

@@ -32,3 +32,3 @@ function _extends() {

var version = "5.0.0-alpha.2";
var version = "5.0.0-beta.0";

@@ -58,2 +58,3 @@ var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';

flipOnUpdate: false,
followCursor: false,
hideOnClick: true,

@@ -87,8 +88,3 @@ ignoreAttributes: false,

updateDuration: 0,
wait: null,
zIndex: 9999
};
var extraProps = {
followCursor: false,
inlinePositioning: false
/**

@@ -119,4 +115,6 @@ * If the setProps() method encounters one of these, the popperInstance must be

var ARROW_SELECTOR = "." + ARROW_CLASS;
var SVG_ARROW_SELECTOR = "." + SVG_ARROW_CLASS;
var SVG_ARROW_SELECTOR = "." + SVG_ARROW_CLASS; // TODO: Work out best way to make these updateable
var NON_UPDATEABLE_PROPS = ['followCursor'];
var currentInput = {

@@ -254,7 +252,3 @@ isTouch: false

try {
return arrayFrom(document.querySelectorAll(value));
} catch (e) {
return [];
}
return arrayFrom(document.querySelectorAll(value));
}

@@ -265,6 +259,6 @@ /**

function getValue(value, index, defaultValue) {
function getValueAtIndexOrReturn(value, index, defaultValue) {
if (Array.isArray(value)) {
var v = value[index];
return v == null ? defaultValue : v;
return v == null ? Array.isArray(defaultValue) ? defaultValue[index] : defaultValue : v;
}

@@ -414,3 +408,3 @@

/**
* Determines if an array or string includes a value
* Determines if an array or string includes a string
*/

@@ -721,3 +715,3 @@

var didSpecifyPlacementInPopperOptions = prop === 'popperOptions' && value && hasOwnProperty(value, 'placement');
var didPassOtherUnknownProp = !hasOwnProperty(defaultProps, prop) && !didPassTargetProp && !didPassA11yProp && !didPassShowOnInitProp && !includes(Object.keys(extraProps), prop);
var didPassOtherUnknownProp = !hasOwnProperty(defaultProps, prop) && !didPassTargetProp && !didPassA11yProp && !didPassShowOnInitProp && !includes(['followCursor'], prop);
warnWhen(didPassTargetProp, 'The `target` prop was removed in v5 and ' + 'replaced with the `delegate()` method. Read more here: ' + 'https//atomiks.github.io/tippyjs/addons#event-delegation');

@@ -754,3 +748,3 @@ warnWhen(didPassA11yProp, 'The `a11y` prop was removed in v5. Make ' + 'sure the element you are giving a tippy to is natively ' + 'focusable, such as <button> or <input>, not <div> or <span>.');

var extraProps = ['followCursor', 'inlinePositioning'];
var extraProps = ['followCursor'];
extraProps.forEach(function (prop) {

@@ -791,3 +785,2 @@ if (hasOwnProperty(partialProps, prop) && !instance.__extraProps__[prop]) {

var didHideDueToDocumentMouseDown = false;
var normalizedPlacement;
var currentMountCallback;

@@ -885,10 +878,2 @@ var currentTransitionEndListener;

function getIsVerticalPlacement() {
return includes(['top', 'bottom'], getBasePlacement(instance.state.currentPlacement));
}
function getIsOppositePlacement() {
return includes(['bottom', 'right'], getBasePlacement(instance.state.currentPlacement));
}
function getNormalizedTouchSettings() {

@@ -964,10 +949,15 @@ var touch = instance.props.touch;

setTransitionDuration([popper], isIE ? 0 : instance.props.updateDuration);
var prevRefRect = reference.getBoundingClientRect();
function updatePosition() {
instance.popperInstance.scheduleUpdate();
var currentRefRect = reference.getBoundingClientRect(); // Only schedule an update if the reference rect has changed
if (prevRefRect.top !== currentRefRect.top || prevRefRect.right !== currentRefRect.right || prevRefRect.bottom !== currentRefRect.bottom || prevRefRect.left !== currentRefRect.left) {
instance.popperInstance.scheduleUpdate();
}
prevRefRect = currentRefRect;
if (instance.state.isMounted) {
requestAnimationFrame(updatePosition);
} else {
setTransitionDuration([popper], 0);
}

@@ -1160,12 +1150,6 @@ }

function createPopperInstance() {
var _instance$props = instance.props,
popperOptions = _instance$props.popperOptions,
placement = _instance$props.placement;
var popperOptions = instance.props.popperOptions;
var arrow = instance.popperChildren.arrow;
var preventOverflowModifier = getModifier(popperOptions, 'preventOverflow'); // Due to the virtual offsets normalization when using `followCursor`, we
// need to use the opposite placement
var preventOverflowModifier = getModifier(popperOptions, 'preventOverflow');
var shift = instance.state.currentPlacement.split('-')[1];
normalizedPlacement = instance.props.followCursor && shift ? placement.replace(shift, shift === 'start' ? 'end' : 'start') : placement;
function applyMutations(data) {

@@ -1182,3 +1166,3 @@ instance.state.currentPlacement = data.placement;

tooltip.setAttribute('data-placement', instance.state.currentPlacement);
tooltip.setAttribute('data-placement', data.placement);

@@ -1189,24 +1173,12 @@ if (data.attributes['x-out-of-boundaries'] !== false) {

tooltip.removeAttribute('data-out-of-boundaries');
} // Apply the `distance` prop
}
var basePlacement = getBasePlacement(data.placement);
var isVerticalPlacement = includes(['top', 'bottom'], basePlacement);
var isSecondaryPlacement = includes(['bottom', 'right'], basePlacement); // Apply `distance` prop
var basePlacement = getBasePlacement(instance.state.currentPlacement);
var tooltipStyles = tooltip.style;
tooltipStyles.top = '0';
tooltipStyles.left = '0';
tooltipStyles[getIsVerticalPlacement() ? 'top' : 'left'] = (getIsOppositePlacement() ? 1 : -1) * instance.props.distance + "px";
var padding = preventOverflowModifier && preventOverflowModifier.padding !== undefined ? preventOverflowModifier.padding : PREVENT_OVERFLOW_PADDING;
var isPaddingNumber = typeof padding === 'number';
var computedPadding = _extends({
top: isPaddingNumber ? padding : padding.top,
bottom: isPaddingNumber ? padding : padding.bottom,
left: isPaddingNumber ? padding : padding.left,
right: isPaddingNumber ? padding : padding.right
}, !isPaddingNumber && padding);
computedPadding[basePlacement] = isPaddingNumber ? padding + instance.props.distance : (padding[basePlacement] || 0) + instance.props.distance;
instance.popperInstance.modifiers.filter(function (m) {
return m.name === 'preventOverflow';
})[0].padding = computedPadding;
tooltipStyles[isVerticalPlacement ? 'top' : 'left'] = (isSecondaryPlacement ? 1 : -1) * instance.props.distance + "px";
}

@@ -1216,5 +1188,5 @@

eventsEnabled: false,
placement: normalizedPlacement
placement: instance.props.placement
}, popperOptions, {
modifiers: _extends({}, popperOptions ? popperOptions.modifiers : {}, {
modifiers: _extends({}, popperOptions && popperOptions.modifiers, {
preventOverflow: _extends({

@@ -1224,2 +1196,31 @@ boundariesElement: instance.props.boundary,

}, preventOverflowModifier),
// Adds the `distance` calculation to preventOverflow padding
tippySetPreventOverflowPadding: {
enabled: true,
order: 299,
fn: function fn(data) {
var basePlacement = getBasePlacement(data.placement);
var padding = preventOverflowModifier && preventOverflowModifier.padding !== undefined ? preventOverflowModifier.padding : PREVENT_OVERFLOW_PADDING;
var isPaddingNumber = typeof padding === 'number';
var paddingObject = {
top: 0,
bottom: 0,
left: 0,
right: 0
};
var computedPadding = Object.keys(paddingObject).reduce(function (obj, key) {
obj[key] = isPaddingNumber ? padding : padding[key];
if (basePlacement === key) {
obj[key] = isPaddingNumber ? padding + instance.props.distance : (padding[basePlacement] || 0) + instance.props.distance;
}
return obj;
}, paddingObject);
instance.popperInstance.modifiers.filter(function (m) {
return m.name === 'preventOverflow';
})[0].padding = computedPadding;
return data;
}
},
arrow: _extends({

@@ -1231,4 +1232,2 @@ element: arrow,

enabled: instance.props.flip,
// The tooltip is offset by 10px from the popper in CSS,
// we need to account for its distance
padding: instance.props.distance + PREVENT_OVERFLOW_PADDING,

@@ -1300,8 +1299,4 @@ behavior: instance.props.flipBehavior

if (instance.props.wait) {
return instance.props.wait(instance, event);
}
addDocumentMouseDownListener();
var delay = getValue(instance.props.delay, 0, defaultProps.delay);
var delay = getValueAtIndexOrReturn(instance.props.delay, 0, defaultProps.delay);

@@ -1327,3 +1322,3 @@ if (delay) {

instance.state.isScheduledToShow = false;
var delay = getValue(instance.props.delay, 1, defaultProps.delay);
var delay = getValueAtIndexOrReturn(instance.props.delay, 1, defaultProps.delay);

@@ -1359,7 +1354,10 @@ if (delay) {

cancelAnimationFrame(scheduleHideAnimationFrame);
}
} // Cloning as we're deleting non-updateable props in DEV mode
function setProps(partialProps) {
function setProps(_ref2) {
var partialProps = _extends({}, _ref2);
{
warnWhen(instance.state.isDestroyed, '`set()` was called on a destroyed instance. ' + 'This is a no-op but indicates a potential memory leak.');
warnWhen(instance.state.isDestroyed, '`setProps()` was called on a destroyed instance. ' + 'This is a no-op but indicates a potential memory leak.');
}

@@ -1374,2 +1372,8 @@

validateExtraPropsFunctionality(instance, partialProps);
NON_UPDATEABLE_PROPS.forEach(function (prop) {
if (hasOwnProperty(partialProps, prop)) {
delete partialProps[prop];
warnWhen(true, 'Cannot update `' + prop + '` prop. Destroy this instance and create a new instance instead.');
}
});
}

@@ -1379,3 +1383,3 @@

var prevProps = instance.props;
var nextProps = evaluateProps(reference, _extends({}, instance.props, partialProps, {
var nextProps = evaluateProps(reference, _extends({}, instance.props, {}, partialProps, {
ignoreAttributes: true

@@ -1415,3 +1419,3 @@ }));

if (duration === void 0) {
duration = getValue(instance.props.duration, 0, defaultProps.duration[1]);
duration = getValueAtIndexOrReturn(instance.props.duration, 0, defaultProps.duration);
}

@@ -1492,3 +1496,3 @@

if (duration === void 0) {
duration = getValue(instance.props.duration, 1, defaultProps.duration[1]);
duration = getValueAtIndexOrReturn(instance.props.duration, 1, defaultProps.duration);
}

@@ -1526,3 +1530,3 @@

instance.popperInstance.disableEventListeners();
instance.popperInstance.options.placement = normalizedPlacement;
instance.popperInstance.options.placement = instance.props.placement;
popper.parentNode.removeChild(popper);

@@ -1568,3 +1572,3 @@ instance.props.onHidden(instance);

var props = _extends({}, defaultProps, optionalProps);
var props = _extends({}, defaultProps, {}, optionalProps);

@@ -1684,20 +1688,19 @@ var elements = getArrayOfElements(targets);

*/
function injectCSS(css) {
if (isBrowser) {
var style = document.createElement('style');
style.textContent = css;
style.setAttribute('data-tippy-stylesheet', '');
var head = document.head;
var firstStyleOrLinkTag = head.querySelector('style,link');
var style = document.createElement('style');
style.textContent = css;
style.setAttribute('data-tippy-stylesheet', '');
var head = document.head;
var firstStyleOrLinkTag = head.querySelector('style,link');
if (firstStyleOrLinkTag) {
head.insertBefore(style, firstStyleOrLinkTag);
} else {
head.appendChild(style);
}
if (firstStyleOrLinkTag) {
head.insertBefore(style, firstStyleOrLinkTag);
} else {
head.appendChild(style);
}
}
injectCSS(css);
if (isBrowser) {
injectCSS(css);
}

@@ -1704,0 +1707,0 @@ return tippy;

@@ -1,2 +0,2 @@

var tippy=function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;function e(){return(e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}var n="undefined"!=typeof window&&"undefined"!=typeof document,i=n?navigator.userAgent:"",r=/MSIE |Trident\//.test(i),o=/UCBrowser\//.test(i),a=n&&/iPhone|iPad|iPod/.test(navigator.platform),p={allowHTML:!0,animateFill:!1,animation:"fade",appendTo:function(){return document.body},aria:"describedby",arrow:!0,boundary:"scrollParent",content:"",delay:0,distance:10,duration:[325,275],flip:!0,flipBehavior:"flip",flipOnUpdate:!1,hideOnClick:!0,ignoreAttributes:!1,inertia:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,lazy:!0,maxWidth:350,multiple:!1,offset:0,onCreate:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},placement:"top",popperOptions:{},role:"tooltip",showOnCreate:!1,sticky:!1,theme:"",touch:!0,trigger:"mouseenter focus",triggerTarget:null,updateDuration:0,wait:null,zIndex:9999},s=["arrow","boundary","distance","flip","flipBehavior","flipOnUpdate","offset","placement","popperOptions"],u={passive:!0},c=5,d='<svg viewBox="0 0 18 7" xmlns="http://www.w3.org/2000/svg"><path d="M0 7s2.021-.015 5.253-4.218C6.584 1.051 7.797.007 9 0c1.203-.007 2.416 1.035 3.761 2.782C16.012 7.005 18 7 18 7H0z"/></svg>',l="tippy-iOS",f="tippy-popper",m="tippy-tooltip",v="tippy-content",h="tippy-backdrop",b="tippy-arrow",y="tippy-svg-arrow",w="."+f,g="."+m,A="."+v,E="."+h,T="."+b,x="."+y,C={isTouch:!1},L=0;function I(){C.isTouch||(C.isTouch=!0,a&&document.body.classList.add(l),window.performance&&document.addEventListener("mousemove",O))}function O(){var t=performance.now();t-L<20&&(C.isTouch=!1,document.removeEventListener("mousemove",O),a||document.body.classList.remove(l)),L=t}function S(){var t=document.activeElement,e=t._tippy;t&&t.blur&&e&&!e.state.isVisible&&t.blur()}var k=Object.keys(p);function D(t,e){return{}.hasOwnProperty.call(t,e)}function P(t,e,n){if(Array.isArray(t)){var i=t[e];return null==i?n:i}return t}function M(t,e){return t&&t.modifiers&&t.modifiers[e]}function V(t){return t instanceof Element}function N(t,e){return"function"==typeof t?t.apply(null,e):t}function q(t,e){t.filter(function(t){return"flip"===t.name})[0].enabled=e}function F(){return document.createElement("div")}function H(t,e){t.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function U(t,e){t.forEach(function(t){t&&t.setAttribute("data-state",e)})}function z(t,n){var i=e({},n,{content:N(n.content,[t])},n.ignoreAttributes?{}:function(t){return k.reduce(function(e,n){var i=(t.getAttribute("data-tippy-"+n)||"").trim();if(!i)return e;if("content"===n)e[n]=i;else try{e[n]=JSON.parse(i)}catch(t){e[n]=i}return e},{})}(t));return i.animateFill&&(i.arrow=!1),(i.arrow||o)&&(i.animateFill=!1),i}function B(t,e){return 0===e?t:function(i){clearTimeout(n),n=setTimeout(function(){t(i)},e)};var n}function _(t,e,n){t&&t!==e&&t.apply(null,n)}function j(t){return[].slice.call(t)}function W(t,e){return t.indexOf(e)>-1}function J(t,e){t.innerHTML=V(e)?e.innerHTML:e}function R(t,e){if(V(e.content))J(t,""),t.appendChild(e.content);else if("function"!=typeof e.content){t[e.allowHTML?"innerHTML":"textContent"]=e.content}}function X(t){return{tooltip:t.querySelector(g),backdrop:t.querySelector(E),content:t.querySelector(A),arrow:t.querySelector(T)||t.querySelector(x)}}function Y(t){t.setAttribute("data-inertia","")}function G(t){var e=F();return!0===t?e.className=b:(e.className=y,V(t)?e.appendChild(t):J(e,"round"===t?d:t)),e}function K(t){var e=F();return e.className=h,e.setAttribute("data-state",t?"visible":"hidden"),e}function Q(t){t.setAttribute("data-interactive","")}function Z(t,e,n){var i=o&&void 0!==document.body.style.webkitTransition?"webkitTransitionEnd":"transitionend";t[e+"EventListener"](i,n)}function $(t){return t.split("-")[0]}function tt(t,e,n){n.split(" ").forEach(function(n){n&&t.classList[e](n+"-theme")})}function et(t,e){var n=F();n.className=f,n.style.position="absolute",n.style.top="0",n.style.left="0";var i=F();i.className=m,i.id="tippy-"+t,i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1"),tt(i,"add",e.theme);var r=F();return r.className=v,r.setAttribute("data-state","hidden"),e.interactive&&Q(i),e.arrow&&(i.setAttribute("data-arrow",""),i.appendChild(G(e.arrow))),e.animateFill&&(i.appendChild(K(!1)),i.setAttribute("data-animatefill","")),e.inertia&&Y(i),R(r,e),i.appendChild(r),n.appendChild(i),nt(n,e,e,!1),n}function nt(t,e,n,i){var r=X(t),o=r.tooltip,a=r.content,p=r.backdrop,s=r.arrow;t.style.zIndex=""+n.zIndex,o.setAttribute("data-animation",n.animation),o.style.maxWidth=n.maxWidth+("number"==typeof n.maxWidth?"px":""),n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),e.content!==n.content&&R(a,n),!e.animateFill&&n.animateFill?(o.appendChild(K(i)),o.setAttribute("data-animatefill","")):e.animateFill&&!n.animateFill&&(o.removeChild(p),o.removeAttribute("data-animatefill")),!e.arrow&&n.arrow?(o.appendChild(G(n.arrow)),o.setAttribute("data-arrow","")):e.arrow&&!n.arrow?(o.removeChild(s),o.removeAttribute("data-arrow")):e.arrow!==n.arrow&&(o.removeChild(s),o.appendChild(G(n.arrow))),!e.interactive&&n.interactive?Q(o):e.interactive&&!n.interactive&&function(t){t.removeAttribute("data-interactive")}(o),!e.inertia&&n.inertia?Y(o):e.inertia&&!n.inertia&&function(t){t.removeAttribute("data-inertia")}(o),e.theme!==n.theme&&(tt(o,"remove",e.theme),tt(o,"add",n.theme))}var it=1,rt=[];function ot(n,i){var o,a,d,l,f=z(n,i);if(!f.multiple&&n._tippy)return null;var m,v,h,b=!1,y=!1,w=!1,g=[],A=B(pt,f.interactiveDebounce),E=it++,T=et(E,f),x=X(T),L=x.tooltip,I=x.content,O={currentPlacement:f.placement,isScheduledToShow:!1,isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},S={id:E,reference:n,popper:T,popperChildren:x,popperInstance:null,props:f,state:O,clearDelayTimeouts:function(){clearTimeout(a),clearTimeout(d),cancelAnimationFrame(l)},setProps:function(t){if(S.state.isDestroyed)return;ot();var i=S.props,r=z(n,e({},S.props,t,{ignoreAttributes:!0}));r.ignoreAttributes=D(t,"ignoreAttributes")?t.ignoreAttributes||!1:i.ignoreAttributes,S.props=r,tt(),J(),A=B(pt,r.interactiveDebounce),nt(T,i,r,S.state.isVisible),S.popperChildren=X(T),S.popperInstance&&(s.some(function(e){return D(t,e)&&t[e]!==i[e]})?(S.popperInstance.destroy(),dt(),S.state.isVisible&&S.popperInstance.enableEventListeners()):S.popperInstance.update())},setContent:function(t){S.setProps({content:t})},show:function(t,e){void 0===t&&(t=P(S.props.duration,0,p.duration[1]));void 0===e&&(e=!0);var i=S.state.isVisible,o=S.state.isDestroyed,a=!S.state.isEnabled,s=C.isTouch&&!S.props.touch;if(i||o||a||s)return;if(j().hasAttribute("disabled"))return;if(!1===S.props.onShow(S))return;Y(),T.style.visibility="visible",S.state.isVisible=!0;var u=F();H(e?u.concat(T):u,0),v=function(){S.state.isVisible&&(S.popperInstance.update(),S.props.onMount(S),S.state.isMounted=!0,I.style.transitionDelay=S.popperChildren.backdrop?Math.round(t/12)+"ms":"",S.props.sticky&&function(){H([T],r?0:S.props.updateDuration),function t(){S.popperInstance.scheduleUpdate();S.state.isMounted?requestAnimationFrame(t):H([T],0)}()}(),H([T],S.props.updateDuration),H(u,t),U(u,"visible"),function(t,e){K(t,e)}(t,function(){S.props.aria&&j().setAttribute("aria-"+S.props.aria,L.id),S.props.onShown(S),S.state.isShown=!0}))},function(){y=!1;var t=S.props.appendTo,e="parent"===t?n.parentNode:N(t,[n]);e.contains(T)||e.appendChild(T);S.popperInstance?(q(S.popperInstance.modifiers,S.props.flip),S.popperInstance.enableEventListeners(),S.popperInstance.scheduleUpdate()):(dt(),S.popperInstance.enableEventListeners())}()},hide:function(t){void 0===t&&(t=P(S.props.duration,1,p.duration[1]));var e=!S.state.isVisible&&!b,n=S.state.isDestroyed,i=!S.state.isEnabled&&!b;if(e||n||i)return;if(!1===S.props.onHide(S)&&!b)return;G(),T.style.visibility="hidden",S.state.isVisible=!1,S.state.isShown=!1;var r=F();H(r,t),U(r,"hidden"),function(t,e){K(t,function(){!S.state.isVisible&&T.parentNode&&T.parentNode.contains(T)&&e()})}(t,function(){S.props.aria&&j().removeAttribute("aria-"+S.props.aria),S.popperInstance.disableEventListeners(),S.popperInstance.options.placement=m,T.parentNode.removeChild(T),S.props.onHidden(S),S.state.isMounted=!1})},enable:function(){S.state.isEnabled=!0},disable:function(){S.state.isEnabled=!1},destroy:function(){if(S.state.isDestroyed)return;b=!0,S.hide(0),ot(),delete n._tippy,S.popperInstance&&S.popperInstance.destroy();b=!1,S.state.isDestroyed=!0}};return n._tippy=S,T._tippy=S,tt(),f.lazy||dt(),f.showOnCreate&&ft(),T.addEventListener("mouseenter",function(){S.props.interactive&&S.state.isVisible&&"mouseenter"===o&&S.clearDelayTimeouts()}),T.addEventListener("mouseleave",function(){S.props.interactive&&"mouseenter"===o&&document.addEventListener("mousemove",A)}),f.onCreate(S),S;function k(){var t=S.props.touch;return Array.isArray(t)?t:[t,0]}function V(){return"hold"===k()[0]}function F(){return[L,I,S.popperChildren.backdrop]}function j(){return S.props.triggerTarget||n}function J(){document.body.removeEventListener("mouseleave",mt),document.removeEventListener("mousemove",A),rt=rt.filter(function(t){return t!==A})}function R(t){if(!S.props.interactive||!T.contains(t.target)){if(j().contains(t.target)){if(C.isTouch)return;if(S.state.isVisible&&W(S.props.trigger,"click"))return}!0===S.props.hideOnClick&&(S.clearDelayTimeouts(),S.hide(),w=!0,setTimeout(function(){w=!1}),S.state.isMounted||G())}}function Y(){document.addEventListener("mousedown",R,!0)}function G(){document.removeEventListener("mousedown",R,!0)}function K(t,e){function n(t){t.target===L&&(Z(L,"remove",n),e())}if(0===t)return e();Z(L,"remove",h),Z(L,"add",n),h=n}function Q(t,e,n){void 0===n&&(n=!1),j().addEventListener(t,e,n),g.push({eventType:t,handler:e,options:n})}function tt(){V()&&(Q("touchstart",at,u),Q("touchend",st,u)),W(S.props.trigger,"click")||Q("click",function(){C.isTouch||!0!==S.props.hideOnClick||S.hide()}),S.props.trigger.trim().split(" ").forEach(function(t){if("manual"!==t)switch(Q(t,at),t){case"mouseenter":Q("mouseleave",st);break;case"focus":Q(r?"focusout":"blur",ut)}})}function ot(){g.forEach(function(t){var e=t.eventType,n=t.handler,i=t.options;j().removeEventListener(e,n,i)}),g=[]}function at(t){if(!w&&S.state.isEnabled&&!ct(t))if(S.state.isVisible||(o=t.type,t instanceof MouseEvent&&rt.forEach(function(e){return e(t)})),"click"===t.type&&!1!==S.props.hideOnClick&&S.state.isVisible)mt(t);else{var e=k(),n=e[0],i=e[1];C.isTouch&&"hold"===n&&i?a=setTimeout(function(){ft(t)},i):ft(t)}}function pt(t){(function(t,e){for(;t;){if(e(t))return t;t=t.parentElement}return null})(t.target,function(t){return t===n||t===T})||function(t,e,n,i){if(!t)return!0;var r=n.clientX,o=n.clientY,a=i.interactiveBorder,p=i.distance,s=e.top-o>("top"===t?a+p:a),u=o-e.bottom>("bottom"===t?a+p:a),c=e.left-r>("left"===t?a+p:a),d=r-e.right>("right"===t?a+p:a);return s||u||c||d}($(S.state.currentPlacement),T.getBoundingClientRect(),t,S.props)&&(J(),mt(t))}function st(t){if(!ct(t))return S.props.interactive?(document.body.addEventListener("mouseleave",mt),document.addEventListener("mousemove",A),void rt.push(A)):void mt(t)}function ut(t){t.target===j()&&(S.props.interactive&&t.relatedTarget&&T.contains(t.relatedTarget)||mt(t))}function ct(t){var e="ontouchstart"in window,n=W(t.type,"touch"),i=V();return e&&C.isTouch&&i&&!n||C.isTouch&&!i&&n}function dt(){var i=S.props,r=i.popperOptions,o=i.placement,a=S.popperChildren.arrow,p=M(r,"preventOverflow"),s=S.state.currentPlacement.split("-")[1];function u(t){S.state.currentPlacement=t.placement,S.props.flip&&!S.props.flipOnUpdate&&(t.flipped&&(S.popperInstance.options.placement=t.placement),q(S.popperInstance.modifiers,!1)),L.setAttribute("data-placement",S.state.currentPlacement),!1!==t.attributes["x-out-of-boundaries"]?L.setAttribute("data-out-of-boundaries",""):L.removeAttribute("data-out-of-boundaries");var n=$(S.state.currentPlacement),i=L.style;i.top="0",i.left="0",i[W(["top","bottom"],$(S.state.currentPlacement))?"top":"left"]=(W(["bottom","right"],$(S.state.currentPlacement))?1:-1)*S.props.distance+"px";var r=p&&void 0!==p.padding?p.padding:c,o="number"==typeof r,a=e({top:o?r:r.top,bottom:o?r:r.bottom,left:o?r:r.left,right:o?r:r.right},!o&&r);a[n]=o?r+S.props.distance:(r[n]||0)+S.props.distance,S.popperInstance.modifiers.filter(function(t){return"preventOverflow"===t.name})[0].padding=a}var d=e({eventsEnabled:!1,placement:m=S.props.followCursor&&s?o.replace(s,"start"===s?"end":"start"):o},r,{modifiers:e({},r?r.modifiers:{},{preventOverflow:e({boundariesElement:S.props.boundary,padding:c},p),arrow:e({element:a,enabled:!!a},M(r,"arrow")),flip:e({enabled:S.props.flip,padding:S.props.distance+c,behavior:S.props.flipBehavior},M(r,"flip")),offset:e({offset:S.props.offset},M(r,"offset"))}),onCreate:function(t){u(t),_(r&&r.onCreate,d.onCreate,[t]),lt()},onUpdate:function(t){u(t),_(r&&r.onUpdate,d.onUpdate,[t]),lt()}});S.popperInstance=new t(n,T,d)}function lt(){!y&&v&&(y=!0,function(t){t.offsetHeight}(T),v())}function ft(t){if(S.clearDelayTimeouts(),S.state.isScheduledToShow=!0,S.popperInstance||dt(),t&&S.props.onTrigger(S,t),S.props.wait)return S.props.wait(S,t);Y();var e=P(S.props.delay,0,p.delay);e?a=setTimeout(function(){S.show()},e):S.show()}function mt(t){if(S.clearDelayTimeouts(),S.props.onUntrigger(S,t),S.state.isVisible){S.state.isScheduledToShow=!1;var e=P(S.props.delay,1,p.delay);e?d=setTimeout(function(){S.state.isVisible&&S.hide()},e):l=requestAnimationFrame(function(){S.hide()})}else G()}}function at(t,n){document.addEventListener("touchstart",I,e({},u,{capture:!0})),window.addEventListener("blur",S);var i=e({},p,n),r=function(t){if(V(t))return[t];if(t instanceof NodeList)return j(t);if(Array.isArray(t))return t;try{return j(document.querySelectorAll(t))}catch(t){return[]}}(t).reduce(function(t,e){var n=e&&ot(e,i);return n&&t.push(n),t},[]);return V(t)?r[0]:r}return at.version="5.0.0-alpha.2",at.defaultProps=p,at.currentInput=C,at.setDefaultProps=function(t){Object.keys(t).forEach(function(e){p[e]=t[e]})},at.hideAll=function(t){var e=void 0===t?{}:t,n=e.exclude,i=e.duration;j(document.querySelectorAll(w)).forEach(function(t){var e,r=t._tippy;if(r){var o=!1;n&&(o=(e=n)&&e._tippy&&!e.classList.contains(f)?r.reference===n:t===n.popper),o||r.hide(i)}})},n&&setTimeout(function(){j(document.querySelectorAll("[data-tippy]")).forEach(function(t){var e=t.getAttribute("data-tippy");e&&at(t,{content:e})})}),function(t){if(n){var e=document.createElement("style");e.textContent=t,e.setAttribute("data-tippy-stylesheet","");var i=document.head,r=i.querySelector("style,link");r?i.insertBefore(e,r):i.appendChild(e)}}(".tippy-tooltip[data-animation=fade][data-state=hidden]{opacity:0}.tippy-iOS{cursor:pointer!important;-webkit-tap-highlight-color:transparent}.tippy-popper{pointer-events:none;max-width:calc(100% - 8px);transition-timing-function:cubic-bezier(.165,.84,.44,1)}.tippy-tooltip{position:relative;color:#fff;border-radius:.25rem;font-size:.875rem;line-height:1.4;background-color:#333;overflow:hidden;transition-property:visibility,opacity,transform;outline:0}.tippy-tooltip[data-placement^=top] .tippy-arrow{border-width:8px 8px 0;border-top-color:#333;margin:0 3px;transform-origin:50% 0;bottom:-7px}.tippy-tooltip[data-placement^=bottom] .tippy-arrow{border-width:0 8px 8px;border-bottom-color:#333;margin:0 3px;transform-origin:50% 7px;top:-7px}.tippy-tooltip[data-placement^=left] .tippy-arrow{border-width:8px 0 8px 8px;border-left-color:#333;margin:3px 0;transform-origin:0 50%;right:-7px}.tippy-tooltip[data-placement^=right] .tippy-arrow{border-width:8px 8px 8px 0;border-right-color:#333;margin:3px 0;transform-origin:7px 50%;left:-7px}.tippy-tooltip[data-arrow]{overflow:visible}.tippy-tooltip[data-animatefill]{background-color:transparent!important}.tippy-tooltip[data-interactive]{pointer-events:auto}.tippy-tooltip[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-tooltip[data-inertia][data-state=hidden]{transition-timing-function:ease}.tippy-arrow{border-color:transparent;border-style:solid;position:absolute}.tippy-arrow[data-state=hidden]{opacity:0}.tippy-content{padding:.3125rem .5625rem}"),at}(Popper);
var tippy=function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;function e(){return(e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}var n="undefined"!=typeof window&&"undefined"!=typeof document,i=n?navigator.userAgent:"",r=/MSIE |Trident\//.test(i),o=/UCBrowser\//.test(i),a=n&&/iPhone|iPad|iPod/.test(navigator.platform),p={allowHTML:!0,animateFill:!1,animation:"fade",appendTo:function(){return document.body},aria:"describedby",arrow:!0,boundary:"scrollParent",content:"",delay:0,distance:10,duration:[325,275],flip:!0,flipBehavior:"flip",flipOnUpdate:!1,followCursor:!1,hideOnClick:!0,ignoreAttributes:!1,inertia:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,lazy:!0,maxWidth:350,multiple:!1,offset:0,onCreate:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},placement:"top",popperOptions:{},role:"tooltip",showOnCreate:!1,sticky:!1,theme:"",touch:!0,trigger:"mouseenter focus",triggerTarget:null,updateDuration:0,zIndex:9999},s=["arrow","boundary","distance","flip","flipBehavior","flipOnUpdate","offset","placement","popperOptions"],u={passive:!0},c=5,d='<svg viewBox="0 0 18 7" xmlns="http://www.w3.org/2000/svg"><path d="M0 7s2.021-.015 5.253-4.218C6.584 1.051 7.797.007 9 0c1.203-.007 2.416 1.035 3.761 2.782C16.012 7.005 18 7 18 7H0z"/></svg>',l="tippy-iOS",f="tippy-popper",m="tippy-tooltip",v="tippy-content",b="tippy-backdrop",h="tippy-arrow",y="tippy-svg-arrow",g="."+f,w="."+m,A="."+v,E="."+b,T="."+h,C="."+y,x={isTouch:!1},L=0;function O(){x.isTouch||(x.isTouch=!0,a&&document.body.classList.add(l),window.performance&&document.addEventListener("mousemove",S))}function S(){var t=performance.now();t-L<20&&(x.isTouch=!1,document.removeEventListener("mousemove",S),a||document.body.classList.remove(l)),L=t}function I(){var t=document.activeElement,e=t._tippy;t&&t.blur&&e&&!e.state.isVisible&&t.blur()}var k=Object.keys(p);function D(t,e){return{}.hasOwnProperty.call(t,e)}function P(t,e,n){if(Array.isArray(t)){var i=t[e];return null==i?Array.isArray(n)?n[e]:n:i}return t}function M(t,e){return t&&t.modifiers&&t.modifiers[e]}function V(t){return t instanceof Element}function N(t,e){return"function"==typeof t?t.apply(null,e):t}function q(t,e){t.filter(function(t){return"flip"===t.name})[0].enabled=e}function B(){return document.createElement("div")}function F(t,e){t.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function H(t,e){t.forEach(function(t){t&&t.setAttribute("data-state",e)})}function U(t,n){var i=e({},n,{content:N(n.content,[t])},n.ignoreAttributes?{}:function(t){return k.reduce(function(e,n){var i=(t.getAttribute("data-tippy-"+n)||"").trim();if(!i)return e;if("content"===n)e[n]=i;else try{e[n]=JSON.parse(i)}catch(t){e[n]=i}return e},{})}(t));return i.animateFill&&(i.arrow=!1),(i.arrow||o)&&(i.animateFill=!1),i}function z(t,e){return 0===e?t:function(i){clearTimeout(n),n=setTimeout(function(){t(i)},e)};var n}function _(t,e,n){t&&t!==e&&t.apply(null,n)}function j(t){return[].slice.call(t)}function W(t,e){return t.indexOf(e)>-1}function R(t,e){t.innerHTML=V(e)?e.innerHTML:e}function J(t,e){if(V(e.content))R(t,""),t.appendChild(e.content);else if("function"!=typeof e.content){t[e.allowHTML?"innerHTML":"textContent"]=e.content}}function X(t){return{tooltip:t.querySelector(w),backdrop:t.querySelector(E),content:t.querySelector(A),arrow:t.querySelector(T)||t.querySelector(C)}}function Y(t){t.setAttribute("data-inertia","")}function G(t){var e=B();return!0===t?e.className=h:(e.className=y,V(t)?e.appendChild(t):R(e,"round"===t?d:t)),e}function K(t){var e=B();return e.className=b,e.setAttribute("data-state",t?"visible":"hidden"),e}function Q(t){t.setAttribute("data-interactive","")}function Z(t,e,n){var i=o&&void 0!==document.body.style.webkitTransition?"webkitTransitionEnd":"transitionend";t[e+"EventListener"](i,n)}function $(t){return t.split("-")[0]}function tt(t,e,n){n.split(" ").forEach(function(n){n&&t.classList[e](n+"-theme")})}function et(t,e){var n=B();n.className=f,n.style.position="absolute",n.style.top="0",n.style.left="0";var i=B();i.className=m,i.id="tippy-"+t,i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1"),tt(i,"add",e.theme);var r=B();return r.className=v,r.setAttribute("data-state","hidden"),e.interactive&&Q(i),e.arrow&&(i.setAttribute("data-arrow",""),i.appendChild(G(e.arrow))),e.animateFill&&(i.appendChild(K(!1)),i.setAttribute("data-animatefill","")),e.inertia&&Y(i),J(r,e),i.appendChild(r),n.appendChild(i),nt(n,e,e,!1),n}function nt(t,e,n,i){var r=X(t),o=r.tooltip,a=r.content,p=r.backdrop,s=r.arrow;t.style.zIndex=""+n.zIndex,o.setAttribute("data-animation",n.animation),o.style.maxWidth=n.maxWidth+("number"==typeof n.maxWidth?"px":""),n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),e.content!==n.content&&J(a,n),!e.animateFill&&n.animateFill?(o.appendChild(K(i)),o.setAttribute("data-animatefill","")):e.animateFill&&!n.animateFill&&(o.removeChild(p),o.removeAttribute("data-animatefill")),!e.arrow&&n.arrow?(o.appendChild(G(n.arrow)),o.setAttribute("data-arrow","")):e.arrow&&!n.arrow?(o.removeChild(s),o.removeAttribute("data-arrow")):e.arrow!==n.arrow&&(o.removeChild(s),o.appendChild(G(n.arrow))),!e.interactive&&n.interactive?Q(o):e.interactive&&!n.interactive&&function(t){t.removeAttribute("data-interactive")}(o),!e.inertia&&n.inertia?Y(o):e.inertia&&!n.inertia&&function(t){t.removeAttribute("data-inertia")}(o),e.theme!==n.theme&&(tt(o,"remove",e.theme),tt(o,"add",n.theme))}var it=1,rt=[];function ot(n,i){var o,a,d,l,f=U(n,i);if(!f.multiple&&n._tippy)return null;var m,v,b=!1,h=!1,y=!1,g=[],w=z(at,f.interactiveDebounce),A=it++,E=et(A,f),T=X(E),C=T.tooltip,L=T.content,O={currentPlacement:f.placement,isScheduledToShow:!1,isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},S={id:A,reference:n,popper:E,popperChildren:T,popperInstance:null,props:f,state:O,clearDelayTimeouts:function(){clearTimeout(a),clearTimeout(d),cancelAnimationFrame(l)},setProps:function(t){var i=e({},t);if(S.state.isDestroyed)return;tt();var r=S.props,o=U(n,e({},S.props,{},i,{ignoreAttributes:!0}));o.ignoreAttributes=D(i,"ignoreAttributes")?i.ignoreAttributes||!1:r.ignoreAttributes,S.props=o,Q(),j(),w=z(at,o.interactiveDebounce),nt(E,r,o,S.state.isVisible),S.popperChildren=X(E),S.popperInstance&&(s.some(function(t){return D(i,t)&&i[t]!==r[t]})?(S.popperInstance.destroy(),ct(),S.state.isVisible&&S.popperInstance.enableEventListeners()):S.popperInstance.update())},setContent:function(t){S.setProps({content:t})},show:function(t,e){void 0===t&&(t=P(S.props.duration,0,p.duration));void 0===e&&(e=!0);var i=S.state.isVisible,o=S.state.isDestroyed,a=!S.state.isEnabled,s=x.isTouch&&!S.props.touch;if(i||o||a||s)return;if(B().hasAttribute("disabled"))return;if(!1===S.props.onShow(S))return;J(),E.style.visibility="visible",S.state.isVisible=!0;var u=V();F(e?u.concat(E):u,0),m=function(){S.state.isVisible&&(S.popperInstance.update(),S.props.onMount(S),S.state.isMounted=!0,L.style.transitionDelay=S.popperChildren.backdrop?Math.round(t/12)+"ms":"",S.props.sticky&&function(){F([E],r?0:S.props.updateDuration);var t=n.getBoundingClientRect();!function e(){var i=n.getBoundingClientRect();t.top===i.top&&t.right===i.right&&t.bottom===i.bottom&&t.left===i.left||S.popperInstance.scheduleUpdate();t=i;S.state.isMounted&&requestAnimationFrame(e)}()}(),F([E],S.props.updateDuration),F(u,t),H(u,"visible"),function(t,e){G(t,e)}(t,function(){S.props.aria&&B().setAttribute("aria-"+S.props.aria,C.id),S.props.onShown(S),S.state.isShown=!0}))},function(){h=!1;var t=S.props.appendTo,e="parent"===t?n.parentNode:N(t,[n]);e.contains(E)||e.appendChild(E);S.popperInstance?(q(S.popperInstance.modifiers,S.props.flip),S.popperInstance.enableEventListeners(),S.popperInstance.scheduleUpdate()):(ct(),S.popperInstance.enableEventListeners())}()},hide:function(t){void 0===t&&(t=P(S.props.duration,1,p.duration));var e=!S.state.isVisible&&!b,n=S.state.isDestroyed,i=!S.state.isEnabled&&!b;if(e||n||i)return;if(!1===S.props.onHide(S)&&!b)return;Y(),E.style.visibility="hidden",S.state.isVisible=!1,S.state.isShown=!1;var r=V();F(r,t),H(r,"hidden"),function(t,e){G(t,function(){!S.state.isVisible&&E.parentNode&&E.parentNode.contains(E)&&e()})}(t,function(){S.props.aria&&B().removeAttribute("aria-"+S.props.aria),S.popperInstance.disableEventListeners(),S.popperInstance.options.placement=S.props.placement,E.parentNode.removeChild(E),S.props.onHidden(S),S.state.isMounted=!1})},enable:function(){S.state.isEnabled=!0},disable:function(){S.state.isEnabled=!1},destroy:function(){if(S.state.isDestroyed)return;b=!0,S.hide(0),tt(),delete n._tippy,S.popperInstance&&S.popperInstance.destroy();b=!1,S.state.isDestroyed=!0}};return n._tippy=S,E._tippy=S,Q(),f.lazy||ct(),f.showOnCreate&&lt(),E.addEventListener("mouseenter",function(){S.props.interactive&&S.state.isVisible&&"mouseenter"===o&&S.clearDelayTimeouts()}),E.addEventListener("mouseleave",function(){S.props.interactive&&"mouseenter"===o&&document.addEventListener("mousemove",w)}),f.onCreate(S),S;function I(){var t=S.props.touch;return Array.isArray(t)?t:[t,0]}function k(){return"hold"===I()[0]}function V(){return[C,L,S.popperChildren.backdrop]}function B(){return S.props.triggerTarget||n}function j(){document.body.removeEventListener("mouseleave",ft),document.removeEventListener("mousemove",w),rt=rt.filter(function(t){return t!==w})}function R(t){if(!S.props.interactive||!E.contains(t.target)){if(B().contains(t.target)){if(x.isTouch)return;if(S.state.isVisible&&W(S.props.trigger,"click"))return}!0===S.props.hideOnClick&&(S.clearDelayTimeouts(),S.hide(),y=!0,setTimeout(function(){y=!1}),S.state.isMounted||Y())}}function J(){document.addEventListener("mousedown",R,!0)}function Y(){document.removeEventListener("mousedown",R,!0)}function G(t,e){function n(t){t.target===C&&(Z(C,"remove",n),e())}if(0===t)return e();Z(C,"remove",v),Z(C,"add",n),v=n}function K(t,e,n){void 0===n&&(n=!1),B().addEventListener(t,e,n),g.push({eventType:t,handler:e,options:n})}function Q(){k()&&(K("touchstart",ot,u),K("touchend",pt,u)),W(S.props.trigger,"click")||K("click",function(){x.isTouch||!0!==S.props.hideOnClick||S.hide()}),S.props.trigger.trim().split(" ").forEach(function(t){if("manual"!==t)switch(K(t,ot),t){case"mouseenter":K("mouseleave",pt);break;case"focus":K(r?"focusout":"blur",st)}})}function tt(){g.forEach(function(t){var e=t.eventType,n=t.handler,i=t.options;B().removeEventListener(e,n,i)}),g=[]}function ot(t){if(!y&&S.state.isEnabled&&!ut(t))if(S.state.isVisible||(o=t.type,t instanceof MouseEvent&&rt.forEach(function(e){return e(t)})),"click"===t.type&&!1!==S.props.hideOnClick&&S.state.isVisible)ft(t);else{var e=I(),n=e[0],i=e[1];x.isTouch&&"hold"===n&&i?a=setTimeout(function(){lt(t)},i):lt(t)}}function at(t){(function(t,e){for(;t;){if(e(t))return t;t=t.parentElement}return null})(t.target,function(t){return t===n||t===E})||function(t,e,n,i){if(!t)return!0;var r=n.clientX,o=n.clientY,a=i.interactiveBorder,p=i.distance,s=e.top-o>("top"===t?a+p:a),u=o-e.bottom>("bottom"===t?a+p:a),c=e.left-r>("left"===t?a+p:a),d=r-e.right>("right"===t?a+p:a);return s||u||c||d}($(S.state.currentPlacement),E.getBoundingClientRect(),t,S.props)&&(j(),ft(t))}function pt(t){if(!ut(t))return S.props.interactive?(document.body.addEventListener("mouseleave",ft),document.addEventListener("mousemove",w),void rt.push(w)):void ft(t)}function st(t){t.target===B()&&(S.props.interactive&&t.relatedTarget&&E.contains(t.relatedTarget)||ft(t))}function ut(t){var e="ontouchstart"in window,n=W(t.type,"touch"),i=k();return e&&x.isTouch&&i&&!n||x.isTouch&&!i&&n}function ct(){var i=S.props.popperOptions,r=S.popperChildren.arrow,o=M(i,"preventOverflow");function a(t){S.state.currentPlacement=t.placement,S.props.flip&&!S.props.flipOnUpdate&&(t.flipped&&(S.popperInstance.options.placement=t.placement),q(S.popperInstance.modifiers,!1)),C.setAttribute("data-placement",t.placement),!1!==t.attributes["x-out-of-boundaries"]?C.setAttribute("data-out-of-boundaries",""):C.removeAttribute("data-out-of-boundaries");var e=$(t.placement),n=W(["top","bottom"],e),i=W(["bottom","right"],e),r=C.style;r.top="0",r.left="0",r[n?"top":"left"]=(i?1:-1)*S.props.distance+"px"}var p=e({eventsEnabled:!1,placement:S.props.placement},i,{modifiers:e({},i&&i.modifiers,{preventOverflow:e({boundariesElement:S.props.boundary,padding:c},o),tippySetPreventOverflowPadding:{enabled:!0,order:299,fn:function(t){var e=$(t.placement),n=o&&void 0!==o.padding?o.padding:c,i="number"==typeof n,r={top:0,bottom:0,left:0,right:0},a=Object.keys(r).reduce(function(t,r){return t[r]=i?n:n[r],e===r&&(t[r]=i?n+S.props.distance:(n[e]||0)+S.props.distance),t},r);return S.popperInstance.modifiers.filter(function(t){return"preventOverflow"===t.name})[0].padding=a,t}},arrow:e({element:r,enabled:!!r},M(i,"arrow")),flip:e({enabled:S.props.flip,padding:S.props.distance+c,behavior:S.props.flipBehavior},M(i,"flip")),offset:e({offset:S.props.offset},M(i,"offset"))}),onCreate:function(t){a(t),_(i&&i.onCreate,p.onCreate,[t]),dt()},onUpdate:function(t){a(t),_(i&&i.onUpdate,p.onUpdate,[t]),dt()}});S.popperInstance=new t(n,E,p)}function dt(){!h&&m&&(h=!0,function(t){t.offsetHeight}(E),m())}function lt(t){S.clearDelayTimeouts(),S.state.isScheduledToShow=!0,S.popperInstance||ct(),t&&S.props.onTrigger(S,t),J();var e=P(S.props.delay,0,p.delay);e?a=setTimeout(function(){S.show()},e):S.show()}function ft(t){if(S.clearDelayTimeouts(),S.props.onUntrigger(S,t),S.state.isVisible){S.state.isScheduledToShow=!1;var e=P(S.props.delay,1,p.delay);e?d=setTimeout(function(){S.state.isVisible&&S.hide()},e):l=requestAnimationFrame(function(){S.hide()})}else Y()}}function at(t,n){document.addEventListener("touchstart",O,e({},u,{capture:!0})),window.addEventListener("blur",I);var i,r=e({},p,{},n),o=(V(i=t)?[i]:i instanceof NodeList?j(i):Array.isArray(i)?i:j(document.querySelectorAll(i))).reduce(function(t,e){var n=e&&ot(e,r);return n&&t.push(n),t},[]);return V(t)?o[0]:o}return at.version="5.0.0-beta.0",at.defaultProps=p,at.currentInput=x,at.setDefaultProps=function(t){Object.keys(t).forEach(function(e){p[e]=t[e]})},at.hideAll=function(t){var e=void 0===t?{}:t,n=e.exclude,i=e.duration;j(document.querySelectorAll(g)).forEach(function(t){var e,r=t._tippy;if(r){var o=!1;n&&(o=(e=n)&&e._tippy&&!e.classList.contains(f)?r.reference===n:t===n.popper),o||r.hide(i)}})},n&&setTimeout(function(){j(document.querySelectorAll("[data-tippy]")).forEach(function(t){var e=t.getAttribute("data-tippy");e&&at(t,{content:e})})}),n&&function(t){var e=document.createElement("style");e.textContent=t,e.setAttribute("data-tippy-stylesheet","");var n=document.head,i=n.querySelector("style,link");i?n.insertBefore(e,i):n.appendChild(e)}(".tippy-tooltip[data-animation=fade][data-state=hidden]{opacity:0}.tippy-iOS{cursor:pointer!important;-webkit-tap-highlight-color:transparent}.tippy-popper{pointer-events:none;max-width:calc(100% - 10px);transition-timing-function:cubic-bezier(.165,.84,.44,1)}.tippy-tooltip{position:relative;color:#fff;border-radius:.25rem;font-size:.875rem;line-height:1.4;background-color:#333;overflow:hidden;transition-property:visibility,opacity,transform;outline:0}.tippy-tooltip[data-placement^=top] .tippy-arrow{border-width:8px 8px 0;border-top-color:#333;margin:0 3px;transform-origin:50% 0;bottom:-7px}.tippy-tooltip[data-placement^=bottom] .tippy-arrow{border-width:0 8px 8px;border-bottom-color:#333;margin:0 3px;transform-origin:50% 7px;top:-7px}.tippy-tooltip[data-placement^=left] .tippy-arrow{border-width:8px 0 8px 8px;border-left-color:#333;margin:3px 0;transform-origin:0 50%;right:-7px}.tippy-tooltip[data-placement^=right] .tippy-arrow{border-width:8px 8px 8px 0;border-right-color:#333;margin:3px 0;transform-origin:7px 50%;left:-7px}.tippy-tooltip[data-arrow]{overflow:visible}.tippy-tooltip[data-animatefill]{background-color:transparent!important}.tippy-tooltip[data-interactive]{pointer-events:auto}.tippy-tooltip[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-tooltip[data-inertia][data-state=hidden]{transition-timing-function:ease}.tippy-arrow{border-color:transparent;border-style:solid;position:absolute}.tippy-arrow[data-state=hidden]{opacity:0}.tippy-content{padding:.3125rem .5625rem}"),at}(Popper);
//# sourceMappingURL=tippy.bundle.min.js.map
/**!
* tippy.js v5.0.0-alpha.2
* tippy.js v5.0.0-beta.0
* (c) 2017-2019 atomiks

@@ -29,3 +29,3 @@ * MIT License

var version = "5.0.0-alpha.2";
var version = "5.0.0-beta.0";

@@ -55,2 +55,3 @@ var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';

flipOnUpdate: false,
followCursor: false,
hideOnClick: true,

@@ -84,8 +85,3 @@ ignoreAttributes: false,

updateDuration: 0,
wait: null,
zIndex: 9999
};
var extraProps = {
followCursor: false,
inlinePositioning: false
/**

@@ -116,4 +112,6 @@ * If the setProps() method encounters one of these, the popperInstance must be

var ARROW_SELECTOR = "." + ARROW_CLASS;
var SVG_ARROW_SELECTOR = "." + SVG_ARROW_CLASS;
var SVG_ARROW_SELECTOR = "." + SVG_ARROW_CLASS; // TODO: Work out best way to make these updateable
var NON_UPDATEABLE_PROPS = ['followCursor'];
var currentInput = {

@@ -251,7 +249,3 @@ isTouch: false

try {
return arrayFrom(document.querySelectorAll(value));
} catch (e) {
return [];
}
return arrayFrom(document.querySelectorAll(value));
}

@@ -262,6 +256,6 @@ /**

function getValue(value, index, defaultValue) {
function getValueAtIndexOrReturn(value, index, defaultValue) {
if (Array.isArray(value)) {
var v = value[index];
return v == null ? defaultValue : v;
return v == null ? Array.isArray(defaultValue) ? defaultValue[index] : defaultValue : v;
}

@@ -411,3 +405,3 @@

/**
* Determines if an array or string includes a value
* Determines if an array or string includes a string
*/

@@ -718,3 +712,3 @@

var didSpecifyPlacementInPopperOptions = prop === 'popperOptions' && value && hasOwnProperty(value, 'placement');
var didPassOtherUnknownProp = !hasOwnProperty(defaultProps, prop) && !didPassTargetProp && !didPassA11yProp && !didPassShowOnInitProp && !includes(Object.keys(extraProps), prop);
var didPassOtherUnknownProp = !hasOwnProperty(defaultProps, prop) && !didPassTargetProp && !didPassA11yProp && !didPassShowOnInitProp && !includes(['followCursor'], prop);
warnWhen(didPassTargetProp, 'The `target` prop was removed in v5 and ' + 'replaced with the `delegate()` method. Read more here: ' + 'https//atomiks.github.io/tippyjs/addons#event-delegation');

@@ -751,3 +745,3 @@ warnWhen(didPassA11yProp, 'The `a11y` prop was removed in v5. Make ' + 'sure the element you are giving a tippy to is natively ' + 'focusable, such as <button> or <input>, not <div> or <span>.');

var extraProps = ['followCursor', 'inlinePositioning'];
var extraProps = ['followCursor'];
extraProps.forEach(function (prop) {

@@ -788,3 +782,2 @@ if (hasOwnProperty(partialProps, prop) && !instance.__extraProps__[prop]) {

var didHideDueToDocumentMouseDown = false;
var normalizedPlacement;
var currentMountCallback;

@@ -882,10 +875,2 @@ var currentTransitionEndListener;

function getIsVerticalPlacement() {
return includes(['top', 'bottom'], getBasePlacement(instance.state.currentPlacement));
}
function getIsOppositePlacement() {
return includes(['bottom', 'right'], getBasePlacement(instance.state.currentPlacement));
}
function getNormalizedTouchSettings() {

@@ -961,10 +946,15 @@ var touch = instance.props.touch;

setTransitionDuration([popper], isIE ? 0 : instance.props.updateDuration);
var prevRefRect = reference.getBoundingClientRect();
function updatePosition() {
instance.popperInstance.scheduleUpdate();
var currentRefRect = reference.getBoundingClientRect(); // Only schedule an update if the reference rect has changed
if (prevRefRect.top !== currentRefRect.top || prevRefRect.right !== currentRefRect.right || prevRefRect.bottom !== currentRefRect.bottom || prevRefRect.left !== currentRefRect.left) {
instance.popperInstance.scheduleUpdate();
}
prevRefRect = currentRefRect;
if (instance.state.isMounted) {
requestAnimationFrame(updatePosition);
} else {
setTransitionDuration([popper], 0);
}

@@ -1157,12 +1147,6 @@ }

function createPopperInstance() {
var _instance$props = instance.props,
popperOptions = _instance$props.popperOptions,
placement = _instance$props.placement;
var popperOptions = instance.props.popperOptions;
var arrow = instance.popperChildren.arrow;
var preventOverflowModifier = getModifier(popperOptions, 'preventOverflow'); // Due to the virtual offsets normalization when using `followCursor`, we
// need to use the opposite placement
var preventOverflowModifier = getModifier(popperOptions, 'preventOverflow');
var shift = instance.state.currentPlacement.split('-')[1];
normalizedPlacement = instance.props.followCursor && shift ? placement.replace(shift, shift === 'start' ? 'end' : 'start') : placement;
function applyMutations(data) {

@@ -1179,3 +1163,3 @@ instance.state.currentPlacement = data.placement;

tooltip.setAttribute('data-placement', instance.state.currentPlacement);
tooltip.setAttribute('data-placement', data.placement);

@@ -1186,24 +1170,12 @@ if (data.attributes['x-out-of-boundaries'] !== false) {

tooltip.removeAttribute('data-out-of-boundaries');
} // Apply the `distance` prop
}
var basePlacement = getBasePlacement(data.placement);
var isVerticalPlacement = includes(['top', 'bottom'], basePlacement);
var isSecondaryPlacement = includes(['bottom', 'right'], basePlacement); // Apply `distance` prop
var basePlacement = getBasePlacement(instance.state.currentPlacement);
var tooltipStyles = tooltip.style;
tooltipStyles.top = '0';
tooltipStyles.left = '0';
tooltipStyles[getIsVerticalPlacement() ? 'top' : 'left'] = (getIsOppositePlacement() ? 1 : -1) * instance.props.distance + "px";
var padding = preventOverflowModifier && preventOverflowModifier.padding !== undefined ? preventOverflowModifier.padding : PREVENT_OVERFLOW_PADDING;
var isPaddingNumber = typeof padding === 'number';
var computedPadding = _extends({
top: isPaddingNumber ? padding : padding.top,
bottom: isPaddingNumber ? padding : padding.bottom,
left: isPaddingNumber ? padding : padding.left,
right: isPaddingNumber ? padding : padding.right
}, !isPaddingNumber && padding);
computedPadding[basePlacement] = isPaddingNumber ? padding + instance.props.distance : (padding[basePlacement] || 0) + instance.props.distance;
instance.popperInstance.modifiers.filter(function (m) {
return m.name === 'preventOverflow';
})[0].padding = computedPadding;
tooltipStyles[isVerticalPlacement ? 'top' : 'left'] = (isSecondaryPlacement ? 1 : -1) * instance.props.distance + "px";
}

@@ -1213,5 +1185,5 @@

eventsEnabled: false,
placement: normalizedPlacement
placement: instance.props.placement
}, popperOptions, {
modifiers: _extends({}, popperOptions ? popperOptions.modifiers : {}, {
modifiers: _extends({}, popperOptions && popperOptions.modifiers, {
preventOverflow: _extends({

@@ -1221,2 +1193,31 @@ boundariesElement: instance.props.boundary,

}, preventOverflowModifier),
// Adds the `distance` calculation to preventOverflow padding
tippySetPreventOverflowPadding: {
enabled: true,
order: 299,
fn: function fn(data) {
var basePlacement = getBasePlacement(data.placement);
var padding = preventOverflowModifier && preventOverflowModifier.padding !== undefined ? preventOverflowModifier.padding : PREVENT_OVERFLOW_PADDING;
var isPaddingNumber = typeof padding === 'number';
var paddingObject = {
top: 0,
bottom: 0,
left: 0,
right: 0
};
var computedPadding = Object.keys(paddingObject).reduce(function (obj, key) {
obj[key] = isPaddingNumber ? padding : padding[key];
if (basePlacement === key) {
obj[key] = isPaddingNumber ? padding + instance.props.distance : (padding[basePlacement] || 0) + instance.props.distance;
}
return obj;
}, paddingObject);
instance.popperInstance.modifiers.filter(function (m) {
return m.name === 'preventOverflow';
})[0].padding = computedPadding;
return data;
}
},
arrow: _extends({

@@ -1228,4 +1229,2 @@ element: arrow,

enabled: instance.props.flip,
// The tooltip is offset by 10px from the popper in CSS,
// we need to account for its distance
padding: instance.props.distance + PREVENT_OVERFLOW_PADDING,

@@ -1297,8 +1296,4 @@ behavior: instance.props.flipBehavior

if (instance.props.wait) {
return instance.props.wait(instance, event);
}
addDocumentMouseDownListener();
var delay = getValue(instance.props.delay, 0, defaultProps.delay);
var delay = getValueAtIndexOrReturn(instance.props.delay, 0, defaultProps.delay);

@@ -1324,3 +1319,3 @@ if (delay) {

instance.state.isScheduledToShow = false;
var delay = getValue(instance.props.delay, 1, defaultProps.delay);
var delay = getValueAtIndexOrReturn(instance.props.delay, 1, defaultProps.delay);

@@ -1356,7 +1351,10 @@ if (delay) {

cancelAnimationFrame(scheduleHideAnimationFrame);
}
} // Cloning as we're deleting non-updateable props in DEV mode
function setProps(partialProps) {
function setProps(_ref2) {
var partialProps = _extends({}, _ref2);
{
warnWhen(instance.state.isDestroyed, '`set()` was called on a destroyed instance. ' + 'This is a no-op but indicates a potential memory leak.');
warnWhen(instance.state.isDestroyed, '`setProps()` was called on a destroyed instance. ' + 'This is a no-op but indicates a potential memory leak.');
}

@@ -1371,2 +1369,8 @@

validateExtraPropsFunctionality(instance, partialProps);
NON_UPDATEABLE_PROPS.forEach(function (prop) {
if (hasOwnProperty(partialProps, prop)) {
delete partialProps[prop];
warnWhen(true, 'Cannot update `' + prop + '` prop. Destroy this instance and create a new instance instead.');
}
});
}

@@ -1376,3 +1380,3 @@

var prevProps = instance.props;
var nextProps = evaluateProps(reference, _extends({}, instance.props, partialProps, {
var nextProps = evaluateProps(reference, _extends({}, instance.props, {}, partialProps, {
ignoreAttributes: true

@@ -1412,3 +1416,3 @@ }));

if (duration === void 0) {
duration = getValue(instance.props.duration, 0, defaultProps.duration[1]);
duration = getValueAtIndexOrReturn(instance.props.duration, 0, defaultProps.duration);
}

@@ -1489,3 +1493,3 @@

if (duration === void 0) {
duration = getValue(instance.props.duration, 1, defaultProps.duration[1]);
duration = getValueAtIndexOrReturn(instance.props.duration, 1, defaultProps.duration);
}

@@ -1523,3 +1527,3 @@

instance.popperInstance.disableEventListeners();
instance.popperInstance.options.placement = normalizedPlacement;
instance.popperInstance.options.placement = instance.props.placement;
popper.parentNode.removeChild(popper);

@@ -1565,3 +1569,3 @@ instance.props.onHidden(instance);

var props = _extends({}, defaultProps, optionalProps);
var props = _extends({}, defaultProps, {}, optionalProps);

@@ -1568,0 +1572,0 @@ var elements = getArrayOfElements(targets);

@@ -1,2 +0,2 @@

var tippy=function(t){"use strict";function e(){return(e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}t=t&&t.hasOwnProperty("default")?t.default:t;var n="undefined"!=typeof window&&"undefined"!=typeof document,i=n?navigator.userAgent:"",r=/MSIE |Trident\//.test(i),o=/UCBrowser\//.test(i),a=n&&/iPhone|iPad|iPod/.test(navigator.platform),s={allowHTML:!0,animateFill:!1,animation:"fade",appendTo:function(){return document.body},aria:"describedby",arrow:!0,boundary:"scrollParent",content:"",delay:0,distance:10,duration:[325,275],flip:!0,flipBehavior:"flip",flipOnUpdate:!1,hideOnClick:!0,ignoreAttributes:!1,inertia:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,lazy:!0,maxWidth:350,multiple:!1,offset:0,onCreate:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},placement:"top",popperOptions:{},role:"tooltip",showOnCreate:!1,sticky:!1,theme:"",touch:!0,trigger:"mouseenter focus",triggerTarget:null,updateDuration:0,wait:null,zIndex:9999},p=["arrow","boundary","distance","flip","flipBehavior","flipOnUpdate","offset","placement","popperOptions"],u={passive:!0},c=5,d='<svg viewBox="0 0 18 7" xmlns="http://www.w3.org/2000/svg"><path d="M0 7s2.021-.015 5.253-4.218C6.584 1.051 7.797.007 9 0c1.203-.007 2.416 1.035 3.761 2.782C16.012 7.005 18 7 18 7H0z"/></svg>',l="tippy-iOS",f="tippy-popper",m="tippy-tooltip",v="tippy-content",h="tippy-backdrop",b="tippy-arrow",y="tippy-svg-arrow",w="."+f,g="."+m,A="."+v,T="."+h,E="."+b,C="."+y,L={isTouch:!1},I=0;function O(){L.isTouch||(L.isTouch=!0,a&&document.body.classList.add(l),window.performance&&document.addEventListener("mousemove",S))}function S(){var t=performance.now();t-I<20&&(L.isTouch=!1,document.removeEventListener("mousemove",S),a||document.body.classList.remove(l)),I=t}function k(){var t=document.activeElement,e=t._tippy;t&&t.blur&&e&&!e.state.isVisible&&t.blur()}var D=Object.keys(s);function P(t,e){return{}.hasOwnProperty.call(t,e)}function x(t,e,n){if(Array.isArray(t)){var i=t[e];return null==i?n:i}return t}function M(t,e){return t&&t.modifiers&&t.modifiers[e]}function V(t){return t instanceof Element}function N(t,e){return"function"==typeof t?t.apply(null,e):t}function F(t,e){t.filter(function(t){return"flip"===t.name})[0].enabled=e}function H(){return document.createElement("div")}function U(t,e){t.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function q(t,e){t.forEach(function(t){t&&t.setAttribute("data-state",e)})}function B(t,n){var i=e({},n,{content:N(n.content,[t])},n.ignoreAttributes?{}:function(t){return D.reduce(function(e,n){var i=(t.getAttribute("data-tippy-"+n)||"").trim();if(!i)return e;if("content"===n)e[n]=i;else try{e[n]=JSON.parse(i)}catch(t){e[n]=i}return e},{})}(t));return i.animateFill&&(i.arrow=!1),(i.arrow||o)&&(i.animateFill=!1),i}function _(t,e){return 0===e?t:function(i){clearTimeout(n),n=setTimeout(function(){t(i)},e)};var n}function z(t,e,n){t&&t!==e&&t.apply(null,n)}function j(t){return[].slice.call(t)}function W(t,e){return t.indexOf(e)>-1}function J(t,e){t.innerHTML=V(e)?e.innerHTML:e}function R(t,e){if(V(e.content))J(t,""),t.appendChild(e.content);else if("function"!=typeof e.content){t[e.allowHTML?"innerHTML":"textContent"]=e.content}}function X(t){return{tooltip:t.querySelector(g),backdrop:t.querySelector(T),content:t.querySelector(A),arrow:t.querySelector(E)||t.querySelector(C)}}function Y(t){t.setAttribute("data-inertia","")}function G(t){var e=H();return!0===t?e.className=b:(e.className=y,V(t)?e.appendChild(t):J(e,"round"===t?d:t)),e}function K(t){var e=H();return e.className=h,e.setAttribute("data-state",t?"visible":"hidden"),e}function Q(t){t.setAttribute("data-interactive","")}function Z(t,e,n){var i=o&&void 0!==document.body.style.webkitTransition?"webkitTransitionEnd":"transitionend";t[e+"EventListener"](i,n)}function $(t){return t.split("-")[0]}function tt(t,e,n){n.split(" ").forEach(function(n){n&&t.classList[e](n+"-theme")})}function et(t,e){var n=H();n.className=f,n.style.position="absolute",n.style.top="0",n.style.left="0";var i=H();i.className=m,i.id="tippy-"+t,i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1"),tt(i,"add",e.theme);var r=H();return r.className=v,r.setAttribute("data-state","hidden"),e.interactive&&Q(i),e.arrow&&(i.setAttribute("data-arrow",""),i.appendChild(G(e.arrow))),e.animateFill&&(i.appendChild(K(!1)),i.setAttribute("data-animatefill","")),e.inertia&&Y(i),R(r,e),i.appendChild(r),n.appendChild(i),nt(n,e,e,!1),n}function nt(t,e,n,i){var r=X(t),o=r.tooltip,a=r.content,s=r.backdrop,p=r.arrow;t.style.zIndex=""+n.zIndex,o.setAttribute("data-animation",n.animation),o.style.maxWidth=n.maxWidth+("number"==typeof n.maxWidth?"px":""),n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),e.content!==n.content&&R(a,n),!e.animateFill&&n.animateFill?(o.appendChild(K(i)),o.setAttribute("data-animatefill","")):e.animateFill&&!n.animateFill&&(o.removeChild(s),o.removeAttribute("data-animatefill")),!e.arrow&&n.arrow?(o.appendChild(G(n.arrow)),o.setAttribute("data-arrow","")):e.arrow&&!n.arrow?(o.removeChild(p),o.removeAttribute("data-arrow")):e.arrow!==n.arrow&&(o.removeChild(p),o.appendChild(G(n.arrow))),!e.interactive&&n.interactive?Q(o):e.interactive&&!n.interactive&&function(t){t.removeAttribute("data-interactive")}(o),!e.inertia&&n.inertia?Y(o):e.inertia&&!n.inertia&&function(t){t.removeAttribute("data-inertia")}(o),e.theme!==n.theme&&(tt(o,"remove",e.theme),tt(o,"add",n.theme))}var it=1,rt=[];function ot(n,i){var o,a,d,l,f=B(n,i);if(!f.multiple&&n._tippy)return null;var m,v,h,b=!1,y=!1,w=!1,g=[],A=_(st,f.interactiveDebounce),T=it++,E=et(T,f),C=X(E),I=C.tooltip,O=C.content,S={currentPlacement:f.placement,isScheduledToShow:!1,isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},k={id:T,reference:n,popper:E,popperChildren:C,popperInstance:null,props:f,state:S,clearDelayTimeouts:function(){clearTimeout(a),clearTimeout(d),cancelAnimationFrame(l)},setProps:function(t){if(k.state.isDestroyed)return;ot();var i=k.props,r=B(n,e({},k.props,t,{ignoreAttributes:!0}));r.ignoreAttributes=P(t,"ignoreAttributes")?t.ignoreAttributes||!1:i.ignoreAttributes,k.props=r,tt(),J(),A=_(st,r.interactiveDebounce),nt(E,i,r,k.state.isVisible),k.popperChildren=X(E),k.popperInstance&&(p.some(function(e){return P(t,e)&&t[e]!==i[e]})?(k.popperInstance.destroy(),dt(),k.state.isVisible&&k.popperInstance.enableEventListeners()):k.popperInstance.update())},setContent:function(t){k.setProps({content:t})},show:function(t,e){void 0===t&&(t=x(k.props.duration,0,s.duration[1]));void 0===e&&(e=!0);var i=k.state.isVisible,o=k.state.isDestroyed,a=!k.state.isEnabled,p=L.isTouch&&!k.props.touch;if(i||o||a||p)return;if(j().hasAttribute("disabled"))return;if(!1===k.props.onShow(k))return;Y(),E.style.visibility="visible",k.state.isVisible=!0;var u=H();U(e?u.concat(E):u,0),v=function(){k.state.isVisible&&(k.popperInstance.update(),k.props.onMount(k),k.state.isMounted=!0,O.style.transitionDelay=k.popperChildren.backdrop?Math.round(t/12)+"ms":"",k.props.sticky&&function(){U([E],r?0:k.props.updateDuration),function t(){k.popperInstance.scheduleUpdate();k.state.isMounted?requestAnimationFrame(t):U([E],0)}()}(),U([E],k.props.updateDuration),U(u,t),q(u,"visible"),function(t,e){K(t,e)}(t,function(){k.props.aria&&j().setAttribute("aria-"+k.props.aria,I.id),k.props.onShown(k),k.state.isShown=!0}))},function(){y=!1;var t=k.props.appendTo,e="parent"===t?n.parentNode:N(t,[n]);e.contains(E)||e.appendChild(E);k.popperInstance?(F(k.popperInstance.modifiers,k.props.flip),k.popperInstance.enableEventListeners(),k.popperInstance.scheduleUpdate()):(dt(),k.popperInstance.enableEventListeners())}()},hide:function(t){void 0===t&&(t=x(k.props.duration,1,s.duration[1]));var e=!k.state.isVisible&&!b,n=k.state.isDestroyed,i=!k.state.isEnabled&&!b;if(e||n||i)return;if(!1===k.props.onHide(k)&&!b)return;G(),E.style.visibility="hidden",k.state.isVisible=!1,k.state.isShown=!1;var r=H();U(r,t),q(r,"hidden"),function(t,e){K(t,function(){!k.state.isVisible&&E.parentNode&&E.parentNode.contains(E)&&e()})}(t,function(){k.props.aria&&j().removeAttribute("aria-"+k.props.aria),k.popperInstance.disableEventListeners(),k.popperInstance.options.placement=m,E.parentNode.removeChild(E),k.props.onHidden(k),k.state.isMounted=!1})},enable:function(){k.state.isEnabled=!0},disable:function(){k.state.isEnabled=!1},destroy:function(){if(k.state.isDestroyed)return;b=!0,k.hide(0),ot(),delete n._tippy,k.popperInstance&&k.popperInstance.destroy();b=!1,k.state.isDestroyed=!0}};return n._tippy=k,E._tippy=k,tt(),f.lazy||dt(),f.showOnCreate&&ft(),E.addEventListener("mouseenter",function(){k.props.interactive&&k.state.isVisible&&"mouseenter"===o&&k.clearDelayTimeouts()}),E.addEventListener("mouseleave",function(){k.props.interactive&&"mouseenter"===o&&document.addEventListener("mousemove",A)}),f.onCreate(k),k;function D(){var t=k.props.touch;return Array.isArray(t)?t:[t,0]}function V(){return"hold"===D()[0]}function H(){return[I,O,k.popperChildren.backdrop]}function j(){return k.props.triggerTarget||n}function J(){document.body.removeEventListener("mouseleave",mt),document.removeEventListener("mousemove",A),rt=rt.filter(function(t){return t!==A})}function R(t){if(!k.props.interactive||!E.contains(t.target)){if(j().contains(t.target)){if(L.isTouch)return;if(k.state.isVisible&&W(k.props.trigger,"click"))return}!0===k.props.hideOnClick&&(k.clearDelayTimeouts(),k.hide(),w=!0,setTimeout(function(){w=!1}),k.state.isMounted||G())}}function Y(){document.addEventListener("mousedown",R,!0)}function G(){document.removeEventListener("mousedown",R,!0)}function K(t,e){function n(t){t.target===I&&(Z(I,"remove",n),e())}if(0===t)return e();Z(I,"remove",h),Z(I,"add",n),h=n}function Q(t,e,n){void 0===n&&(n=!1),j().addEventListener(t,e,n),g.push({eventType:t,handler:e,options:n})}function tt(){V()&&(Q("touchstart",at,u),Q("touchend",pt,u)),W(k.props.trigger,"click")||Q("click",function(){L.isTouch||!0!==k.props.hideOnClick||k.hide()}),k.props.trigger.trim().split(" ").forEach(function(t){if("manual"!==t)switch(Q(t,at),t){case"mouseenter":Q("mouseleave",pt);break;case"focus":Q(r?"focusout":"blur",ut)}})}function ot(){g.forEach(function(t){var e=t.eventType,n=t.handler,i=t.options;j().removeEventListener(e,n,i)}),g=[]}function at(t){if(!w&&k.state.isEnabled&&!ct(t))if(k.state.isVisible||(o=t.type,t instanceof MouseEvent&&rt.forEach(function(e){return e(t)})),"click"===t.type&&!1!==k.props.hideOnClick&&k.state.isVisible)mt(t);else{var e=D(),n=e[0],i=e[1];L.isTouch&&"hold"===n&&i?a=setTimeout(function(){ft(t)},i):ft(t)}}function st(t){(function(t,e){for(;t;){if(e(t))return t;t=t.parentElement}return null})(t.target,function(t){return t===n||t===E})||function(t,e,n,i){if(!t)return!0;var r=n.clientX,o=n.clientY,a=i.interactiveBorder,s=i.distance,p=e.top-o>("top"===t?a+s:a),u=o-e.bottom>("bottom"===t?a+s:a),c=e.left-r>("left"===t?a+s:a),d=r-e.right>("right"===t?a+s:a);return p||u||c||d}($(k.state.currentPlacement),E.getBoundingClientRect(),t,k.props)&&(J(),mt(t))}function pt(t){if(!ct(t))return k.props.interactive?(document.body.addEventListener("mouseleave",mt),document.addEventListener("mousemove",A),void rt.push(A)):void mt(t)}function ut(t){t.target===j()&&(k.props.interactive&&t.relatedTarget&&E.contains(t.relatedTarget)||mt(t))}function ct(t){var e="ontouchstart"in window,n=W(t.type,"touch"),i=V();return e&&L.isTouch&&i&&!n||L.isTouch&&!i&&n}function dt(){var i=k.props,r=i.popperOptions,o=i.placement,a=k.popperChildren.arrow,s=M(r,"preventOverflow"),p=k.state.currentPlacement.split("-")[1];function u(t){k.state.currentPlacement=t.placement,k.props.flip&&!k.props.flipOnUpdate&&(t.flipped&&(k.popperInstance.options.placement=t.placement),F(k.popperInstance.modifiers,!1)),I.setAttribute("data-placement",k.state.currentPlacement),!1!==t.attributes["x-out-of-boundaries"]?I.setAttribute("data-out-of-boundaries",""):I.removeAttribute("data-out-of-boundaries");var n=$(k.state.currentPlacement),i=I.style;i.top="0",i.left="0",i[W(["top","bottom"],$(k.state.currentPlacement))?"top":"left"]=(W(["bottom","right"],$(k.state.currentPlacement))?1:-1)*k.props.distance+"px";var r=s&&void 0!==s.padding?s.padding:c,o="number"==typeof r,a=e({top:o?r:r.top,bottom:o?r:r.bottom,left:o?r:r.left,right:o?r:r.right},!o&&r);a[n]=o?r+k.props.distance:(r[n]||0)+k.props.distance,k.popperInstance.modifiers.filter(function(t){return"preventOverflow"===t.name})[0].padding=a}var d=e({eventsEnabled:!1,placement:m=k.props.followCursor&&p?o.replace(p,"start"===p?"end":"start"):o},r,{modifiers:e({},r?r.modifiers:{},{preventOverflow:e({boundariesElement:k.props.boundary,padding:c},s),arrow:e({element:a,enabled:!!a},M(r,"arrow")),flip:e({enabled:k.props.flip,padding:k.props.distance+c,behavior:k.props.flipBehavior},M(r,"flip")),offset:e({offset:k.props.offset},M(r,"offset"))}),onCreate:function(t){u(t),z(r&&r.onCreate,d.onCreate,[t]),lt()},onUpdate:function(t){u(t),z(r&&r.onUpdate,d.onUpdate,[t]),lt()}});k.popperInstance=new t(n,E,d)}function lt(){!y&&v&&(y=!0,function(t){t.offsetHeight}(E),v())}function ft(t){if(k.clearDelayTimeouts(),k.state.isScheduledToShow=!0,k.popperInstance||dt(),t&&k.props.onTrigger(k,t),k.props.wait)return k.props.wait(k,t);Y();var e=x(k.props.delay,0,s.delay);e?a=setTimeout(function(){k.show()},e):k.show()}function mt(t){if(k.clearDelayTimeouts(),k.props.onUntrigger(k,t),k.state.isVisible){k.state.isScheduledToShow=!1;var e=x(k.props.delay,1,s.delay);e?d=setTimeout(function(){k.state.isVisible&&k.hide()},e):l=requestAnimationFrame(function(){k.hide()})}else G()}}function at(t,n){document.addEventListener("touchstart",O,e({},u,{capture:!0})),window.addEventListener("blur",k);var i=e({},s,n),r=function(t){if(V(t))return[t];if(t instanceof NodeList)return j(t);if(Array.isArray(t))return t;try{return j(document.querySelectorAll(t))}catch(t){return[]}}(t).reduce(function(t,e){var n=e&&ot(e,i);return n&&t.push(n),t},[]);return V(t)?r[0]:r}return at.version="5.0.0-alpha.2",at.defaultProps=s,at.currentInput=L,at.setDefaultProps=function(t){Object.keys(t).forEach(function(e){s[e]=t[e]})},at.hideAll=function(t){var e=void 0===t?{}:t,n=e.exclude,i=e.duration;j(document.querySelectorAll(w)).forEach(function(t){var e,r=t._tippy;if(r){var o=!1;n&&(o=(e=n)&&e._tippy&&!e.classList.contains(f)?r.reference===n:t===n.popper),o||r.hide(i)}})},n&&setTimeout(function(){j(document.querySelectorAll("[data-tippy]")).forEach(function(t){var e=t.getAttribute("data-tippy");e&&at(t,{content:e})})}),at}(Popper);
var tippy=function(e){"use strict";function t(){return(t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}e=e&&e.hasOwnProperty("default")?e.default:e;var n="undefined"!=typeof window&&"undefined"!=typeof document,i=n?navigator.userAgent:"",r=/MSIE |Trident\//.test(i),o=/UCBrowser\//.test(i),a=n&&/iPhone|iPad|iPod/.test(navigator.platform),s={allowHTML:!0,animateFill:!1,animation:"fade",appendTo:function(){return document.body},aria:"describedby",arrow:!0,boundary:"scrollParent",content:"",delay:0,distance:10,duration:[325,275],flip:!0,flipBehavior:"flip",flipOnUpdate:!1,followCursor:!1,hideOnClick:!0,ignoreAttributes:!1,inertia:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,lazy:!0,maxWidth:350,multiple:!1,offset:0,onCreate:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},placement:"top",popperOptions:{},role:"tooltip",showOnCreate:!1,sticky:!1,theme:"",touch:!0,trigger:"mouseenter focus",triggerTarget:null,updateDuration:0,zIndex:9999},p=["arrow","boundary","distance","flip","flipBehavior","flipOnUpdate","offset","placement","popperOptions"],u={passive:!0},c=5,d='<svg viewBox="0 0 18 7" xmlns="http://www.w3.org/2000/svg"><path d="M0 7s2.021-.015 5.253-4.218C6.584 1.051 7.797.007 9 0c1.203-.007 2.416 1.035 3.761 2.782C16.012 7.005 18 7 18 7H0z"/></svg>',l="tippy-iOS",f="tippy-popper",m="tippy-tooltip",v="tippy-content",h="tippy-backdrop",b="tippy-arrow",y="tippy-svg-arrow",w="."+f,g="."+m,A="."+v,T="."+h,E="."+b,C="."+y,L={isTouch:!1},O=0;function I(){L.isTouch||(L.isTouch=!0,a&&document.body.classList.add(l),window.performance&&document.addEventListener("mousemove",S))}function S(){var e=performance.now();e-O<20&&(L.isTouch=!1,document.removeEventListener("mousemove",S),a||document.body.classList.remove(l)),O=e}function k(){var e=document.activeElement,t=e._tippy;e&&e.blur&&t&&!t.state.isVisible&&e.blur()}var D=Object.keys(s);function P(e,t){return{}.hasOwnProperty.call(e,t)}function x(e,t,n){if(Array.isArray(e)){var i=e[t];return null==i?Array.isArray(n)?n[t]:n:i}return e}function M(e,t){return e&&e.modifiers&&e.modifiers[t]}function V(e){return e instanceof Element}function N(e,t){return"function"==typeof e?e.apply(null,t):e}function F(e,t){e.filter(function(e){return"flip"===e.name})[0].enabled=t}function H(){return document.createElement("div")}function U(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function q(e,t){e.forEach(function(e){e&&e.setAttribute("data-state",t)})}function B(e,n){var i=t({},n,{content:N(n.content,[e])},n.ignoreAttributes?{}:function(e){return D.reduce(function(t,n){var i=(e.getAttribute("data-tippy-"+n)||"").trim();if(!i)return t;if("content"===n)t[n]=i;else try{t[n]=JSON.parse(i)}catch(e){t[n]=i}return t},{})}(e));return i.animateFill&&(i.arrow=!1),(i.arrow||o)&&(i.animateFill=!1),i}function _(e,t){return 0===t?e:function(i){clearTimeout(n),n=setTimeout(function(){e(i)},t)};var n}function z(e,t,n){e&&e!==t&&e.apply(null,n)}function j(e){return[].slice.call(e)}function W(e,t){return e.indexOf(t)>-1}function R(e,t){e.innerHTML=V(t)?t.innerHTML:t}function J(e,t){if(V(t.content))R(e,""),e.appendChild(t.content);else if("function"!=typeof t.content){e[t.allowHTML?"innerHTML":"textContent"]=t.content}}function X(e){return{tooltip:e.querySelector(g),backdrop:e.querySelector(T),content:e.querySelector(A),arrow:e.querySelector(E)||e.querySelector(C)}}function Y(e){e.setAttribute("data-inertia","")}function G(e){var t=H();return!0===e?t.className=b:(t.className=y,V(e)?t.appendChild(e):R(t,"round"===e?d:e)),t}function K(e){var t=H();return t.className=h,t.setAttribute("data-state",e?"visible":"hidden"),t}function Q(e){e.setAttribute("data-interactive","")}function Z(e,t,n){var i=o&&void 0!==document.body.style.webkitTransition?"webkitTransitionEnd":"transitionend";e[t+"EventListener"](i,n)}function $(e){return e.split("-")[0]}function ee(e,t,n){n.split(" ").forEach(function(n){n&&e.classList[t](n+"-theme")})}function te(e,t){var n=H();n.className=f,n.style.position="absolute",n.style.top="0",n.style.left="0";var i=H();i.className=m,i.id="tippy-"+e,i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1"),ee(i,"add",t.theme);var r=H();return r.className=v,r.setAttribute("data-state","hidden"),t.interactive&&Q(i),t.arrow&&(i.setAttribute("data-arrow",""),i.appendChild(G(t.arrow))),t.animateFill&&(i.appendChild(K(!1)),i.setAttribute("data-animatefill","")),t.inertia&&Y(i),J(r,t),i.appendChild(r),n.appendChild(i),ne(n,t,t,!1),n}function ne(e,t,n,i){var r=X(e),o=r.tooltip,a=r.content,s=r.backdrop,p=r.arrow;e.style.zIndex=""+n.zIndex,o.setAttribute("data-animation",n.animation),o.style.maxWidth=n.maxWidth+("number"==typeof n.maxWidth?"px":""),n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),t.content!==n.content&&J(a,n),!t.animateFill&&n.animateFill?(o.appendChild(K(i)),o.setAttribute("data-animatefill","")):t.animateFill&&!n.animateFill&&(o.removeChild(s),o.removeAttribute("data-animatefill")),!t.arrow&&n.arrow?(o.appendChild(G(n.arrow)),o.setAttribute("data-arrow","")):t.arrow&&!n.arrow?(o.removeChild(p),o.removeAttribute("data-arrow")):t.arrow!==n.arrow&&(o.removeChild(p),o.appendChild(G(n.arrow))),!t.interactive&&n.interactive?Q(o):t.interactive&&!n.interactive&&function(e){e.removeAttribute("data-interactive")}(o),!t.inertia&&n.inertia?Y(o):t.inertia&&!n.inertia&&function(e){e.removeAttribute("data-inertia")}(o),t.theme!==n.theme&&(ee(o,"remove",t.theme),ee(o,"add",n.theme))}var ie=1,re=[];function oe(n,i){var o,a,d,l,f=B(n,i);if(!f.multiple&&n._tippy)return null;var m,v,h=!1,b=!1,y=!1,w=[],g=_(ae,f.interactiveDebounce),A=ie++,T=te(A,f),E=X(T),C=E.tooltip,O=E.content,I={currentPlacement:f.placement,isScheduledToShow:!1,isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},S={id:A,reference:n,popper:T,popperChildren:E,popperInstance:null,props:f,state:I,clearDelayTimeouts:function(){clearTimeout(a),clearTimeout(d),cancelAnimationFrame(l)},setProps:function(e){var i=t({},e);if(S.state.isDestroyed)return;ee();var r=S.props,o=B(n,t({},S.props,{},i,{ignoreAttributes:!0}));o.ignoreAttributes=P(i,"ignoreAttributes")?i.ignoreAttributes||!1:r.ignoreAttributes,S.props=o,Q(),j(),g=_(ae,o.interactiveDebounce),ne(T,r,o,S.state.isVisible),S.popperChildren=X(T),S.popperInstance&&(p.some(function(e){return P(i,e)&&i[e]!==r[e]})?(S.popperInstance.destroy(),ce(),S.state.isVisible&&S.popperInstance.enableEventListeners()):S.popperInstance.update())},setContent:function(e){S.setProps({content:e})},show:function(e,t){void 0===e&&(e=x(S.props.duration,0,s.duration));void 0===t&&(t=!0);var i=S.state.isVisible,o=S.state.isDestroyed,a=!S.state.isEnabled,p=L.isTouch&&!S.props.touch;if(i||o||a||p)return;if(H().hasAttribute("disabled"))return;if(!1===S.props.onShow(S))return;J(),T.style.visibility="visible",S.state.isVisible=!0;var u=V();U(t?u.concat(T):u,0),m=function(){S.state.isVisible&&(S.popperInstance.update(),S.props.onMount(S),S.state.isMounted=!0,O.style.transitionDelay=S.popperChildren.backdrop?Math.round(e/12)+"ms":"",S.props.sticky&&function(){U([T],r?0:S.props.updateDuration);var e=n.getBoundingClientRect();!function t(){var i=n.getBoundingClientRect();e.top===i.top&&e.right===i.right&&e.bottom===i.bottom&&e.left===i.left||S.popperInstance.scheduleUpdate();e=i;S.state.isMounted&&requestAnimationFrame(t)}()}(),U([T],S.props.updateDuration),U(u,e),q(u,"visible"),function(e,t){G(e,t)}(e,function(){S.props.aria&&H().setAttribute("aria-"+S.props.aria,C.id),S.props.onShown(S),S.state.isShown=!0}))},function(){b=!1;var e=S.props.appendTo,t="parent"===e?n.parentNode:N(e,[n]);t.contains(T)||t.appendChild(T);S.popperInstance?(F(S.popperInstance.modifiers,S.props.flip),S.popperInstance.enableEventListeners(),S.popperInstance.scheduleUpdate()):(ce(),S.popperInstance.enableEventListeners())}()},hide:function(e){void 0===e&&(e=x(S.props.duration,1,s.duration));var t=!S.state.isVisible&&!h,n=S.state.isDestroyed,i=!S.state.isEnabled&&!h;if(t||n||i)return;if(!1===S.props.onHide(S)&&!h)return;Y(),T.style.visibility="hidden",S.state.isVisible=!1,S.state.isShown=!1;var r=V();U(r,e),q(r,"hidden"),function(e,t){G(e,function(){!S.state.isVisible&&T.parentNode&&T.parentNode.contains(T)&&t()})}(e,function(){S.props.aria&&H().removeAttribute("aria-"+S.props.aria),S.popperInstance.disableEventListeners(),S.popperInstance.options.placement=S.props.placement,T.parentNode.removeChild(T),S.props.onHidden(S),S.state.isMounted=!1})},enable:function(){S.state.isEnabled=!0},disable:function(){S.state.isEnabled=!1},destroy:function(){if(S.state.isDestroyed)return;h=!0,S.hide(0),ee(),delete n._tippy,S.popperInstance&&S.popperInstance.destroy();h=!1,S.state.isDestroyed=!0}};return n._tippy=S,T._tippy=S,Q(),f.lazy||ce(),f.showOnCreate&&le(),T.addEventListener("mouseenter",function(){S.props.interactive&&S.state.isVisible&&"mouseenter"===o&&S.clearDelayTimeouts()}),T.addEventListener("mouseleave",function(){S.props.interactive&&"mouseenter"===o&&document.addEventListener("mousemove",g)}),f.onCreate(S),S;function k(){var e=S.props.touch;return Array.isArray(e)?e:[e,0]}function D(){return"hold"===k()[0]}function V(){return[C,O,S.popperChildren.backdrop]}function H(){return S.props.triggerTarget||n}function j(){document.body.removeEventListener("mouseleave",fe),document.removeEventListener("mousemove",g),re=re.filter(function(e){return e!==g})}function R(e){if(!S.props.interactive||!T.contains(e.target)){if(H().contains(e.target)){if(L.isTouch)return;if(S.state.isVisible&&W(S.props.trigger,"click"))return}!0===S.props.hideOnClick&&(S.clearDelayTimeouts(),S.hide(),y=!0,setTimeout(function(){y=!1}),S.state.isMounted||Y())}}function J(){document.addEventListener("mousedown",R,!0)}function Y(){document.removeEventListener("mousedown",R,!0)}function G(e,t){function n(e){e.target===C&&(Z(C,"remove",n),t())}if(0===e)return t();Z(C,"remove",v),Z(C,"add",n),v=n}function K(e,t,n){void 0===n&&(n=!1),H().addEventListener(e,t,n),w.push({eventType:e,handler:t,options:n})}function Q(){D()&&(K("touchstart",oe,u),K("touchend",se,u)),W(S.props.trigger,"click")||K("click",function(){L.isTouch||!0!==S.props.hideOnClick||S.hide()}),S.props.trigger.trim().split(" ").forEach(function(e){if("manual"!==e)switch(K(e,oe),e){case"mouseenter":K("mouseleave",se);break;case"focus":K(r?"focusout":"blur",pe)}})}function ee(){w.forEach(function(e){var t=e.eventType,n=e.handler,i=e.options;H().removeEventListener(t,n,i)}),w=[]}function oe(e){if(!y&&S.state.isEnabled&&!ue(e))if(S.state.isVisible||(o=e.type,e instanceof MouseEvent&&re.forEach(function(t){return t(e)})),"click"===e.type&&!1!==S.props.hideOnClick&&S.state.isVisible)fe(e);else{var t=k(),n=t[0],i=t[1];L.isTouch&&"hold"===n&&i?a=setTimeout(function(){le(e)},i):le(e)}}function ae(e){(function(e,t){for(;e;){if(t(e))return e;e=e.parentElement}return null})(e.target,function(e){return e===n||e===T})||function(e,t,n,i){if(!e)return!0;var r=n.clientX,o=n.clientY,a=i.interactiveBorder,s=i.distance,p=t.top-o>("top"===e?a+s:a),u=o-t.bottom>("bottom"===e?a+s:a),c=t.left-r>("left"===e?a+s:a),d=r-t.right>("right"===e?a+s:a);return p||u||c||d}($(S.state.currentPlacement),T.getBoundingClientRect(),e,S.props)&&(j(),fe(e))}function se(e){if(!ue(e))return S.props.interactive?(document.body.addEventListener("mouseleave",fe),document.addEventListener("mousemove",g),void re.push(g)):void fe(e)}function pe(e){e.target===H()&&(S.props.interactive&&e.relatedTarget&&T.contains(e.relatedTarget)||fe(e))}function ue(e){var t="ontouchstart"in window,n=W(e.type,"touch"),i=D();return t&&L.isTouch&&i&&!n||L.isTouch&&!i&&n}function ce(){var i=S.props.popperOptions,r=S.popperChildren.arrow,o=M(i,"preventOverflow");function a(e){S.state.currentPlacement=e.placement,S.props.flip&&!S.props.flipOnUpdate&&(e.flipped&&(S.popperInstance.options.placement=e.placement),F(S.popperInstance.modifiers,!1)),C.setAttribute("data-placement",e.placement),!1!==e.attributes["x-out-of-boundaries"]?C.setAttribute("data-out-of-boundaries",""):C.removeAttribute("data-out-of-boundaries");var t=$(e.placement),n=W(["top","bottom"],t),i=W(["bottom","right"],t),r=C.style;r.top="0",r.left="0",r[n?"top":"left"]=(i?1:-1)*S.props.distance+"px"}var s=t({eventsEnabled:!1,placement:S.props.placement},i,{modifiers:t({},i&&i.modifiers,{preventOverflow:t({boundariesElement:S.props.boundary,padding:c},o),tippySetPreventOverflowPadding:{enabled:!0,order:299,fn:function(e){var t=$(e.placement),n=o&&void 0!==o.padding?o.padding:c,i="number"==typeof n,r={top:0,bottom:0,left:0,right:0},a=Object.keys(r).reduce(function(e,r){return e[r]=i?n:n[r],t===r&&(e[r]=i?n+S.props.distance:(n[t]||0)+S.props.distance),e},r);return S.popperInstance.modifiers.filter(function(e){return"preventOverflow"===e.name})[0].padding=a,e}},arrow:t({element:r,enabled:!!r},M(i,"arrow")),flip:t({enabled:S.props.flip,padding:S.props.distance+c,behavior:S.props.flipBehavior},M(i,"flip")),offset:t({offset:S.props.offset},M(i,"offset"))}),onCreate:function(e){a(e),z(i&&i.onCreate,s.onCreate,[e]),de()},onUpdate:function(e){a(e),z(i&&i.onUpdate,s.onUpdate,[e]),de()}});S.popperInstance=new e(n,T,s)}function de(){!b&&m&&(b=!0,function(e){e.offsetHeight}(T),m())}function le(e){S.clearDelayTimeouts(),S.state.isScheduledToShow=!0,S.popperInstance||ce(),e&&S.props.onTrigger(S,e),J();var t=x(S.props.delay,0,s.delay);t?a=setTimeout(function(){S.show()},t):S.show()}function fe(e){if(S.clearDelayTimeouts(),S.props.onUntrigger(S,e),S.state.isVisible){S.state.isScheduledToShow=!1;var t=x(S.props.delay,1,s.delay);t?d=setTimeout(function(){S.state.isVisible&&S.hide()},t):l=requestAnimationFrame(function(){S.hide()})}else Y()}}function ae(e,n){document.addEventListener("touchstart",I,t({},u,{capture:!0})),window.addEventListener("blur",k);var i,r=t({},s,{},n),o=(V(i=e)?[i]:i instanceof NodeList?j(i):Array.isArray(i)?i:j(document.querySelectorAll(i))).reduce(function(e,t){var n=t&&oe(t,r);return n&&e.push(n),e},[]);return V(e)?o[0]:o}return ae.version="5.0.0-beta.0",ae.defaultProps=s,ae.currentInput=L,ae.setDefaultProps=function(e){Object.keys(e).forEach(function(t){s[t]=e[t]})},ae.hideAll=function(e){var t=void 0===e?{}:e,n=t.exclude,i=t.duration;j(document.querySelectorAll(w)).forEach(function(e){var t,r=e._tippy;if(r){var o=!1;n&&(o=(t=n)&&t._tippy&&!t.classList.contains(f)?r.reference===n:e===n.popper),o||r.hide(i)}})},n&&setTimeout(function(){j(document.querySelectorAll("[data-tippy]")).forEach(function(e){var t=e.getAttribute("data-tippy");t&&ae(e,{content:t})})}),ae}(Popper);
//# sourceMappingURL=tippy.min.js.map

@@ -47,3 +47,2 @@ import Popper, { ReferenceObject } from 'popper.js'

inertia: boolean
inlinePositioning: boolean | 'cursor'
interactive: boolean

@@ -74,3 +73,2 @@ interactiveBorder: number

updateDuration: number
wait: ((instance: Instance, event?: Event) => void) | null
zIndex: number

@@ -136,3 +134,3 @@ }

export interface Tippy {
(targets: Targets, props?: Partial<Props>): Instance | Instance[]
(targets: Targets, optionalProps?: Partial<Props>): Instance | Instance[]
readonly currentInput: { isTouch: boolean }

@@ -139,0 +137,0 @@ readonly defaultProps: Props

{
"name": "tippy.js",
"version": "5.0.0-alpha.2",
"version": "5.0.0-beta.0",
"description": "Highly customizable tooltip and popover library",

@@ -49,8 +49,8 @@ "main": "cjs/tippy.bundle.js",

"scripts": {
"dev": "parcel demo/index.html -d .devserver --open",
"dev:flip": "parcel demo/flip/index.html -d .devserver --open",
"dev:themes": "parcel demo/themes/index.html -d .devserver --open",
"dev:animations": "parcel demo/animations/index.html -d .devserver --open",
"dev:addons": "parcel demo/addons/index.html -d .devserver --open",
"dev:extra-props": "parcel demo/extra-props/index.html -d .devserver --open",
"dev": "parcel demo/index.html -d .devserver",
"dev:flip": "parcel demo/flip/index.html -d .devserver",
"dev:themes": "parcel demo/themes/index.html -d .devserver",
"dev:animations": "parcel demo/animations/index.html -d .devserver",
"dev:addons": "parcel demo/addons/index.html -d .devserver",
"dev:extra-props": "parcel demo/extra-props/index.html -d .devserver",
"build": "node rollup.pre-build && rollup --config && bundlesize",

@@ -113,41 +113,42 @@ "test": "jest --coverage --silent",

"devDependencies": {
"@babel/core": "^7.4.5",
"@babel/plugin-proposal-object-rest-spread": "^7.3.1",
"@babel/core": "^7.5.5",
"@babel/plugin-proposal-object-rest-spread": "^7.5.5",
"@babel/plugin-transform-template-literals": "^7.4.4",
"@babel/preset-env": "^7.3.1",
"@babel/preset-env": "^7.5.5",
"@babel/preset-typescript": "^7.3.3",
"@types/node": "^12.0.2",
"@typescript-eslint/eslint-plugin": "^1.4.2",
"@typescript-eslint/parser": "^1.4.2",
"autoprefixer": "^9.5.0",
"babel-jest": "^24.5.0",
"babel-plugin-dev-expression": "^0.2.1",
"bundlesize": "^0.17.2",
"colorette": "^1.0.7",
"@types/node": "^12.6.8",
"@typescript-eslint/eslint-plugin": "^1.13.0",
"@typescript-eslint/parser": "^1.13.0",
"autoprefixer": "^9.6.1",
"babel-jest": "^24.8.0",
"babel-plugin-dev-expression": "^0.2.2",
"bundlesize": "^0.18.0",
"colorette": "^1.1.0",
"cssnano": "^4.1.10",
"eslint": "^5.12.0",
"eslint-config-prettier": "^4.3.0",
"husky": "^1.3.1",
"jest": "^24.0.0",
"lint-staged": "^8.1.7",
"node-sass": "^4.10.0",
"eslint": "^6.1.0",
"eslint-config-prettier": "^6.0.0",
"husky": "^3.0.2",
"jest": "^24.8.0",
"lint-staged": "^9.2.1",
"node-sass": "^4.12.0",
"parcel-bundler": "^1.12.3",
"postcss": "^7.0.14",
"prettier": "^1.17.1",
"postcss": "^7.0.17",
"prettier": "^1.18.2",
"promise": "^8.0.3",
"react-flip-toolkit": "^6.6.9",
"rimraf": "^2.6.3",
"rollup": "^1.13.1",
"rollup-plugin-babel": "^4.3.2",
"rollup-plugin-commonjs": "^9.2.0",
"rollup": "^1.17.0",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-commonjs": "^10.0.1",
"rollup-plugin-css-only": "^1.0.0",
"rollup-plugin-json": "^3.1.0",
"rollup-plugin-node-resolve": "^4.2.4",
"rollup-plugin-json": "^4.0.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-replace": "^2.2.0",
"rollup-plugin-sass": "^1.2.2",
"rollup-plugin-terser": "^4.0.3",
"typescript": "^3.5.1"
"rollup-plugin-terser": "^5.1.1",
"typescript": "^3.5.3"
},
"dependencies": {
"popper.js": "^1.14.7"
"popper.js": "^1.15.0"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc