Comparing version 0.10.0 to 0.10.1
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Tippy=t()}(this,function(){"use strict";function e(e){var t=!1,n=0,i=document.createElement("span");return new MutationObserver(function(){e(),t=!1}).observe(i,{attributes:!0}),function(){t||(t=!0,i.setAttribute("x-index",n),n+=1)}}function t(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},ve))}}function n(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function i(e,t){Object.keys(t).forEach(function(i){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(i)&&n(t[i])&&(r="px"),e.style[i]=t[i]+r})}function r(e){for(var t=[!1,"ms","webkit","moz","o"],n=e.charAt(0).toUpperCase()+e.slice(1),i=0;i<t.length-1;i++){var r=t[i],o=r?""+r+n:e;if(void 0!==window.document.body.style[o])return o}return null}function o(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||e.firstElementChild.offsetParent===e)}function s(e){return null!==e.parentNode?s(e.parentNode):e}function a(e){var t=e&&e.offsetParent,n=t&&t.nodeName;return n&&"BODY"!==n&&"HTML"!==n?t:window.document.documentElement}function p(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return window.document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?e:t,r=n?t:e,l=document.createRange();l.setStart(i,0),l.setEnd(r,0);var f=l.commonAncestorContainer;if(e!==f&&t!==f)return o(f)?f:a(f);var d=s(e);return d.host?p(d.host,t):p(e,s(t).host)}function l(e,t){if(1!==e.nodeType)return[];var n=window.getComputedStyle(e,null);return t?n[t]:n}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",i=e.nodeName;if("BODY"===i||"HTML"===i){var r=window.document.documentElement;return(window.document.scrollingElement||r)[n]}return e[n]}function d(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=f(t,"top"),r=f(t,"left"),o=n?-1:1;return e.top+=i*o,e.bottom+=i*o,e.left+=r*o,e.right+=r*o,e}function u(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function c(e){if(!e||-1!==["HTML","BODY","#document"].indexOf(e.nodeName))return window.document.body;var t=l(e),n=t.overflow,i=t.overflowX;return/(auto|scroll)/.test(n+t.overflowY+i)?e:c(u(e))}function h(e,t){var n="x"===t?"Left":"Top",i="Left"===n?"Right":"Bottom";return+e["border"+n+"Width"].split("px")[0]+ +e["border"+i+"Width"].split("px")[0]}function m(){var e=window.document.body,t=window.document.documentElement;return{height:Math.max(e.scrollHeight,e.offsetHeight,t.clientHeight,t.scrollHeight,t.offsetHeight),width:Math.max(e.scrollWidth,e.offsetWidth,t.clientWidth,t.scrollWidth,t.offsetWidth)}}function v(e){return xe({},e,{right:e.left+e.width,bottom:e.top+e.height})}function g(e){var t={};if(Te)try{t=e.getBoundingClientRect();var n=f(e,"top"),i=f(e,"left");t.top+=n,t.left+=i,t.bottom+=n,t.right+=i}catch(e){}else t=e.getBoundingClientRect();var r={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},o="HTML"===e.nodeName?m():{},s=o.width||e.clientWidth||r.right-r.left,a=o.height||e.clientHeight||r.bottom-r.top,p=e.offsetWidth-s,d=e.offsetHeight-a;if(p||d){var u=l(e);p-=h(u,"x"),d-=h(u,"y"),r.width-=p,r.height-=d}return v(r)}function b(e,t){var n="HTML"===t.nodeName,i=g(e),r=g(t),o=c(e),s=v({top:i.top-r.top,left:i.left-r.left,width:i.width,height:i.height});if(n||"BODY"===t.nodeName){var a=l(t),p=Ae&&n?0:+a.borderTopWidth.split("px")[0],f=Ae&&n?0:+a.borderLeftWidth.split("px")[0],u=Ae&&n?0:+a.marginTop.split("px")[0],h=Ae&&n?0:+a.marginLeft.split("px")[0];s.top-=p-u,s.bottom-=p-u,s.left-=f-h,s.right-=f-h,s.marginTop=u,s.marginLeft=h}return t.contains(o)&&(Ae||"BODY"!==o.nodeName)&&(s=d(s,t)),s}function w(e,t,n){return b(n,p(t,n))}function y(e){var t=window.getComputedStyle(e),n=parseFloat(t.marginTop)+parseFloat(t.marginBottom),i=parseFloat(t.marginLeft)+parseFloat(t.marginRight);return{width:e.offsetWidth+i,height:e.offsetHeight+n}}function E(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function O(e,t,n,i){i=i.split("-")[0];var r=y(t),o={position:e,width:r.width,height:r.height},s=-1!==["right","left"].indexOf(i),a=s?"top":"left",p=s?"left":"top",l=s?"height":"width",f=s?"width":"height";return o[a]=n[a]+n[l]/2-r[l]/2,o[p]=i===p?n[p]-r[f]:n[E(p)],o}function x(e){var t={};return e&&"[object Function]"===t.toString.call(e)}function L(e,t,n,i){var r="BODY"===e.nodeName,o=r?window:e;o.addEventListener(t,n,{passive:!0}),r||L(c(o.parentNode),t,n,i),i.push(o)}function T(e,t,n,i){n.updateBound=i,window.addEventListener("resize",n.updateBound,{passive:!0});var r=c(e);return L(r,"scroll",n.updateBound,n.scrollParents),n.scrollElement=r,n.eventsEnabled=!0,n}function A(e,t){return window.removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function k(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function C(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var i=k(e,function(e){return e[t]===n});return e.indexOf(i)}function M(e,t,n){return(void 0===n?e:e.slice(0,C(e,"name",n))).forEach(function(e){e.enabled&&x(e.function)&&(t=e.function(t,e))}),t}function S(e,t){return e.some(function(e){var n=e.name;return e.enabled&&n===t})}function H(e){var t=window.document.documentElement,n=b(e,t),i=Math.max(t.clientWidth,window.innerWidth||0),r=Math.max(t.clientHeight,window.innerHeight||0),o=f(t),s=f(t,"left");return v({top:o-n.top+n.marginTop,left:s-n.left+n.marginLeft,width:i,height:r})}function N(e){var t=e.nodeName;return"BODY"!==t&&"HTML"!==t&&("fixed"===l(e,"position")||N(u(e)))}function D(e,t,n,i){var r={top:0,left:0},o=p(e,t);if("viewport"===i)r=H(o);else{var s=void 0;"scrollParent"===i?(s=c(u(e)),"BODY"===s.nodeName&&(s=window.document.documentElement)):s="window"===i?window.document.documentElement:i;var a=b(s,o);if("HTML"!==s.nodeName||N(o))r=a;else{var l=m(),f=l.height,d=l.width;r.top+=a.top-a.marginTop,r.bottom=f+a.top,r.left+=a.left-a.marginLeft,r.right=d+a.left}}return r.left+=n,r.top+=n,r.right-=n,r.bottom-=n,r}function W(e,t,n,i){if(-1===e.indexOf("auto"))return e;var r=D(n,i,0,"scrollParent"),o={top:t.top-r.top,right:r.right-t.right,bottom:r.bottom-t.bottom,left:t.left-r.left},s=Object.keys(o).sort(function(e,t){return o[t]-o[e]})[0],a=e.split("-")[1];return s+(a?"-"+a:"")}function F(e,t){Object.keys(t).forEach(function(n){!1!==t[n]?e.setAttribute(n,t[n]):e.removeAttribute(n)})}function B(e,t){var n={position:e.offsets.popper.position},o={"x-placement":e.placement},s=Math.round(e.offsets.popper.left),a=Math.round(e.offsets.popper.top),p=r("transform");return t.gpuAcceleration&&p?(n[p]="translate3d("+s+"px, "+a+"px, 0)",n.top=0,n.left=0,n.willChange="transform"):(n.left=s,n.top=a,n.willChange="top, left"),i(e.instance.popper,xe({},n,e.styles)),F(e.instance.popper,xe({},o,e.attributes)),e.offsets.arrow&&i(e.arrowElement,e.offsets.arrow),e}function P(e,t,n,i,r){var o=w(r,t,e);return n.placement=W(n.placement,o,t,e),t.setAttribute("x-placement",n.placement),n}function I(e,t,n){var i=k(e,function(e){return e.name===t});return!!i&&e.some(function(e){return e.name===n&&e.enabled&&e.order<i.order})}function U(e,t){if(!I(e.instance.modifiers,"arrow","keepTogether"))return console.warn("WARNING: `keepTogether` modifier is required by arrow modifier in order to work, be sure to include it before `arrow`!"),e;var n=t.element;if("string"==typeof n){if(!(n=e.instance.popper.querySelector(n)))return e}else if(!e.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],r=v(e.offsets.popper),o=e.offsets.reference,s=-1!==["left","right"].indexOf(i),a=s?"height":"width",p=s?"top":"left",l=s?"left":"top",f=s?"bottom":"right",d=y(n)[a];o[f]-d<r[p]&&(e.offsets.popper[p]-=r[p]-(o[f]-d)),o[p]+d>r[f]&&(e.offsets.popper[p]+=o[p]+d-r[f]);var u=o[p]+o[a]/2-d/2,c=u-v(e.offsets.popper)[p];return c=Math.max(Math.min(r[a]-d,c),0),e.arrowElement=n,e.offsets.arrow={},e.offsets.arrow[p]=c,e.offsets.arrow[l]="",e}function j(e){return"end"===e?"start":"start"===e?"end":e}function q(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Ce.indexOf(e),i=Ce.slice(n+1).concat(Ce.slice(0,n));return t?i.reverse():i}function Y(e,t){if(S(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=D(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),i=e.placement.split("-")[0],r=E(i),o=e.placement.split("-")[1]||"",s=[];switch(t.behavior){case Me.FLIP:s=[i,r];break;case Me.CLOCKWISE:s=q(i);break;case Me.COUNTERCLOCKWISE:s=q(i,!0);break;default:s=t.behavior}return s.forEach(function(a,p){if(i!==a||s.length===p+1)return e;i=e.placement.split("-")[0],r=E(i);var l=v(e.offsets.popper),f=e.offsets.reference,d=Math.floor,u="left"===i&&d(l.right)>d(f.left)||"right"===i&&d(l.left)<d(f.right)||"top"===i&&d(l.bottom)>d(f.top)||"bottom"===i&&d(l.top)<d(f.bottom),c=d(l.left)<d(n.left),h=d(l.right)>d(n.right),m=d(l.top)<d(n.top),g=d(l.bottom)>d(n.bottom),b="left"===i&&c||"right"===i&&h||"top"===i&&m||"bottom"===i&&g,w=-1!==["top","bottom"].indexOf(i),y=!!t.flipVariations&&(w&&"start"===o&&c||w&&"end"===o&&h||!w&&"start"===o&&m||!w&&"end"===o&&g);(u||b||y)&&(e.flipped=!0,(u||b)&&(i=s[p+1]),y&&(o=j(o)),e.placement=i+(o?"-"+o:""),e.offsets.popper=O(e.instance.state.position,e.instance.popper,e.offsets.reference,e.placement),e=M(e.instance.modifiers,e,"flip"))}),e}function R(e){var t=v(e.offsets.popper),n=e.offsets.reference,i=e.placement.split("-")[0],r=Math.floor,o=-1!==["top","bottom"].indexOf(i),s=o?"right":"bottom",a=o?"left":"top",p=o?"width":"height";return t[s]<r(n[a])&&(e.offsets.popper[a]=r(n[a])-t[p]),t[a]>r(n[s])&&(e.offsets.popper[a]=r(n[s])),e}function z(e,t){var i=e.placement,r=e.offsets.popper,o=void 0;return n(t.offset)?o=[t.offset,0]:(o=t.offset.split(" "),o=o.map(function(t,n){var r=t.match(/(\d*\.?\d*)(.*)/),o=+r[1],s=r[2],a=-1!==i.indexOf("right")||-1!==i.indexOf("left");1===n&&(a=!a);var p=a?"height":"width";if(0===s.indexOf("%")){var l=void 0;switch(s){case"%p":l=e.offsets.popper;break;case"%":case"$r":default:l=e.offsets.reference}return v(l)[p]/100*o}if("vh"===s||"vw"===s){return("vh"===s?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o}return"px"===s?+o:+t})),-1!==e.placement.indexOf("left")?(r.top+=o[0],r.left-=o[1]||0):-1!==e.placement.indexOf("right")?(r.top+=o[0],r.left+=o[1]||0):-1!==e.placement.indexOf("top")?(r.left+=o[0],r.top-=o[1]||0):-1!==e.placement.indexOf("bottom")&&(r.left+=o[0],r.top+=o[1]||0),e}function _(e,t){var n=t.boundariesElement||a(e.instance.popper),i=D(e.instance.popper,e.instance.reference,t.padding,n);t.boundaries=i;var r=t.priority,o=v(e.offsets.popper),s={primary:function(e){var n=o[e];return o[e]<i[e]&&!t.escapeWithReference&&(n=Math.max(o[e],i[e])),Oe({},e,n)},secondary:function(e){var n="right"===e?"left":"top",r=o[n];return o[e]>i[e]&&!t.escapeWithReference&&(r=Math.min(o[n],i[e]-("right"===e?o.width:o.height))),Oe({},n,r)}};return r.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";o=xe({},o,s[t](e))}),e.offsets.popper=o,e}function G(e){var t=e.placement,n=t.split("-")[0],i=t.split("-")[1];if(i){var r=e.offsets.reference,o=v(e.offsets.popper),s=-1!==["bottom","top"].indexOf(n),a=s?"left":"top",p=s?"width":"height",l={start:Oe({},a,r[a]),end:Oe({},a,r[a]+r[p]-o[p])};e.offsets.popper=xe({},o,l[i])}return e}function K(e){if(!I(e.instance.modifiers,"hide","preventOverflow"))return console.warn("WARNING: preventOverflow modifier is required by hide modifier in order to work, be sure to include it before hide!"),e;var t=e.offsets.reference,n=k(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}function X(e){var t=e.placement,n=t.split("-")[0],i=v(e.offsets.popper),r=v(e.offsets.reference),o=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[o?"left":"top"]=r[t]-(s?i[o?"width":"height"]:0),e.placement=E(t),e.offsets.popper=v(i),e}function J(){Be.touchUser=!0,document.body.classList.add("tippy-touch"),document.removeEventListener("touchstart",J)}function V(e){var t=Q(e.target,je.el),n=Q(e.target,je.popper);if(n){if(Pe.refs[Pe.poppers.indexOf(n)].settings.interactive)return}if(t){var i=Pe.refs[Pe.els.indexOf(t)];if(!i.settings.multiple&&Be.touchUser||!i.settings.multiple&&-1!==i.settings.trigger.indexOf("click"))return ue(i);if(!0!==i.settings.hideOnClick||-1!==i.settings.trigger.indexOf("click"))return}!Q(e.target,je.controller)&&document.body.querySelector(je.popper)&&ue()}function $(e){for(var t=[!1,"webkit"],n=e.charAt(0).toUpperCase()+e.slice(1),i=0;i<t.length;i++){var r=t[i],o=r?""+r+n:e;if(void 0!==window.document.body.style[o])return o}return null}function Q(e,t){return Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;--n>=0&&t.item(n)!==this;);return n>-1}),Element.prototype.closest||(Element.prototype.closest=function(e){for(var t=this;t;){if(t.matches(e))return t;t=t.parentElement}}),e.closest(t)}function Z(e){var t=e.settings,n=e.popper.querySelector(je.tooltip),i=Fe({placement:t.position},t.popperOptions||{},{modifiers:Fe({},t.popperOptions?t.popperOptions.modifiers:{},{flip:Fe({padding:15},t.popperOptions&&t.popperOptions.modifiers?t.popperOptions.modifiers.flip:{}),offset:Fe({offset:parseInt(t.offset)},t.popperOptions&&t.popperOptions.modifiers?t.popperOptions.modifiers.offset:{})}),onUpdate:function(){n.style.top="",n.style.bottom="",n.style.left="",n.style.right="",n.style[e.popper.getAttribute("x-placement")]=-(t.distance-10)+"px"}});return new Ne(e.el,e.popper,i)}function ee(e,t,n){var i=document.createElement("div");i.setAttribute("class","tippy-popper"),i.setAttribute("role","tooltip"),i.setAttribute("aria-hidden","true"),i.setAttribute("id","tippy-tooltip-"+e);var r=document.createElement("div");if(r.setAttribute("class","tippy-tooltip tippy-tooltip--"+n.size+" "+n.theme+"-theme leave"),r.setAttribute("data-animation",n.animation),n.arrow){var o=document.createElement("div");o.setAttribute("class","arrow-"+n.arrowSize),o.setAttribute("x-arrow",""),r.appendChild(o)}if(n.animateFill){r.setAttribute("data-animatefill","");var s=document.createElement("div");s.setAttribute("class","leave"),s.setAttribute("x-circle",""),r.appendChild(s)}n.inertia&&r.setAttribute("data-inertia","");var a=document.createElement("div");if(a.setAttribute("class","tippy-tooltip-content"),n.html){var p=void 0;n.html instanceof Element?(a.innerHTML=n.html.innerHTML,p=n.html.id||"tippy-html-template"):(a.innerHTML=document.getElementById(n.html.replace("#","")).innerHTML,p=n.html),i.classList.add("html-template"),i.setAttribute("tabindex","0"),r.setAttribute("data-template-id",p)}else a.innerHTML=t;return r.style[n.position]=-(n.distance-10)+"px",r.appendChild(a),i.appendChild(r),i}function te(e,t,n){var i=[];return"manual"===e?i:(t.addEventListener(e,n.handleTrigger),i.push({event:e,handler:n.handleTrigger}),"mouseenter"===e&&(t.addEventListener("mouseleave",n.handleMouseleave),i.push({event:"mouseleave",handler:n.handleMouseleave})),"focus"===e&&(t.addEventListener("blur",n.handleBlur),i.push({event:"blur",handler:n.handleBlur})),i)}function ne(e){Pe.refs.push(e),Pe.els.push(e.el),Pe.poppers.push(e.popper)}function ie(e){var t=e.getAttribute("title");e.setAttribute("data-original-title",t||"html"),e.removeAttribute("title")}function re(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function oe(e){var t=Pe.refs[Pe.els.indexOf(this)],n=t.popper.getAttribute("x-placement"),i=Math.round(t.popper.offsetWidth/2),r=Math.round(t.popper.offsetHeight/2),o=e.pageX-i,s=e.pageY-2.5*r;"left"===n?(o=e.pageX-2*i-15,s=e.pageY-r):"right"===n?(o=e.pageX+r,s=e.pageY-r):"bottom"===n&&(s=e.pageY+r/1.5),t.popper.style[$("transform")]="translate3d("+o+"px, "+s+"px, 0)"}function se(e,t){t?window.getComputedStyle(t)[$("transform")]:window.getComputedStyle(e).opacity}function ae(e,t){e.forEach(function(e){e&&t(e.classList)})}function pe(e,t){e.forEach(function(e){e&&(e.hasAttribute("x-circle")&&(t=Math.round(t/1.25)),e.style[$("transitionDuration")]=t+"ms")})}function le(e,t){setTimeout(function(){e.settings.position!==e.popper.getAttribute("x-placement")?(e.flipped=!0,t()):e.flipped&&e.settings.position===e.popper.getAttribute("x-placement")&&(e.flipped=!1,t())},0)}function fe(e,t,n){var i=e.popper.querySelector(je.tooltip),r=function e(){t||(i.removeEventListener("webkitTransitionEnd",e),i.removeEventListener("transitionend",e)),n()};if(e.transititionendListener=r,t)return r();i.addEventListener("webkitTransitionEnd",r),i.addEventListener("transitionend",r)}function de(e){document.body.appendChild(e.popper),!e.settings.followCursor||e.hasFollowCursorListener||Be.touchUser||(e.hasFollowCursorListener=!0,e.el.addEventListener("mousemove",oe)),e.instance?(e.instance.update(),e.settings.followCursor||e.instance.enableEventListeners()):(e.instance=Z(e),e.settings.followCursor&&!Be.touchUser&&e.instance.disableEventListeners())}function ue(e){Pe.refs.forEach(function(t){document.body.contains(t.popper)&&(!0!==t.settings.hideOnClick||e&&t.popper===e.popper||Ye.hide(t.popper,t.settings.hideDuration))})}for(var ce=["native code","[object MutationObserverConstructor]"],he="undefined"!=typeof window,me=["Edge","Trident","Firefox"],ve=0,ge=0;ge<me.length;ge+=1)if(he&&navigator.userAgent.indexOf(me[ge])>=0){ve=1;break}var be=he&&function(e){return ce.some(function(t){return(e||"").toString().indexOf(t)>-1})}(window.MutationObserver),we=be?e:t,ye=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Ee=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),Oe=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},xe=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},Le=function(){return-1!==navigator.appVersion.indexOf("MSIE 10")},Te=Le(),Ae=Le(),ke=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Ce=ke.slice(3),Me={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},Se={shift:{order:100,enabled:!0,function:G},offset:{order:200,enabled:!0,function:z,offset:0},preventOverflow:{order:300,enabled:!0,function:_,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,function:R},arrow:{order:500,enabled:!0,function:U,element:"[x-arrow]"},flip:{order:600,enabled:!0,function:Y,behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,function:X},hide:{order:800,enabled:!0,function:K},applyStyle:{order:900,enabled:!0,function:B,onLoad:P,gpuAcceleration:!0}},He={placement:"bottom",eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:Se},Ne=function(){function e(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};ye(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=we(this.update.bind(this)),this.options=xe({},e.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t.jquery?t[0]:t,this.popper=n.jquery?n[0]:n,i(this.popper,{position:"absolute"}),this.modifiers=Object.keys(e.Defaults.modifiers).map(function(t){return xe({name:t},e.Defaults.modifiers[t])}),this.modifiers=this.modifiers.map(function(e){var t=o.modifiers&&o.modifiers[e.name]||{};return xe({},e,t)}),o.modifiers&&(this.options.modifiers=xe({},e.Defaults.modifiers,o.modifiers),Object.keys(o.modifiers).forEach(function(t){if(void 0===e.Defaults.modifiers[t]){var n=o.modifiers[t];n.name=t,r.modifiers.push(n)}})),this.modifiers=this.modifiers.sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&x(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)}),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return Ee(e,[{key:"update",value:function(){if(!this.state.isDestroyed){var e={instance:this,styles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=w(this.state,this.popper,this.reference),e.placement=W(this.options.placement,e.offsets.reference,this.popper,this.reference),e.originalPlacement=this.options.placement,e.offsets.popper=O(this.state,this.popper,e.offsets.reference,e.placement),e=M(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}},{key:"destroy",value:function(){return this.state.isDestroyed=!0,S(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.left="",this.popper.style.position="",this.popper.style.top="",this.popper.style[r("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}},{key:"enableEventListeners",value:function(){this.state.eventsEnabled||(this.state=T(this.reference,this.options,this.state,this.scheduleUpdate))}},{key:"disableEventListeners",value:function(){this.state.eventsEnabled&&(window.cancelAnimationFrame(this.scheduleUpdate),this.state=A(this.reference,this.state))}}]),e}();Ne.Utils=window.PopperUtils,Ne.placements=ke,Ne.Defaults=He;var De=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},We=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),Fe=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},Be={touchUser:!1,idCounter:0},Pe={refs:[],els:[],poppers:[]},Ie={html:!1,position:"top",animation:"shift",animateFill:!0,arrow:!1,arrowSize:"regular",delay:0,hideDelay:0,trigger:"mouseenter focus",duration:375,hideDuration:375,interactive:!1,theme:"dark",size:"regular",distance:10,offset:0,hideOnClick:!0,multiple:!1,followCursor:!1,inertia:!1,transitionFlip:!0,popperOptions:{}},Ue=Object.keys(Ie),je={popper:".tippy-popper",tooltip:".tippy-tooltip",content:".tippy-tooltip-content",circle:"[x-circle]",arrow:"[x-arrow]",el:"[data-tooltipped]",controller:"[data-tippy-controller]"};document.addEventListener("click",V),document.addEventListener("touchstart",J);var qe=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(De(this,e),"addEventListener"in window&&!/MSIE 9/i.test(navigator.userAgent)&&!window.operamini){this.settings=Fe(JSON.parse(JSON.stringify(Ie)),n),this.callbacks={wait:n.wait,beforeShown:n.beforeShown||new Function,shown:n.shown||new Function,beforeHidden:n.beforeHidden||new Function,hidden:n.hidden||new Function};var i=t instanceof Element?[t]:[].slice.call(document.querySelectorAll(t));this._createTooltips(i)}}return We(e,[{key:"_applyIndividualSettings",value:function(e){var t=this,n={};return Ue.forEach(function(i){var r=e.getAttribute("data-"+i.toLowerCase())||t.settings[i];"false"===r&&(r=!1),n[i]=r}),n.arrow&&(n.animateFill=!1),Fe(Fe({},this.settings),n)}},{key:"_getEventListenerHandlers",value:function(e,t,n){var i=this,r=function(){if(clearTimeout(t.getAttribute("data-delay")),clearTimeout(t.getAttribute("data-hidedelay")),"visible"!==t.style.visibility)if(n.delay){var e=setTimeout(function(){return i.show(t,n.duration)},n.delay);t.setAttribute("data-delay",e)}else i.show(t,n.duration)},o=function(){return i.callbacks.wait?i.callbacks.wait(r):r()},s=function(){if(clearTimeout(t.getAttribute("data-hidedelay")),clearTimeout(t.getAttribute("data-delay")),n.hideDelay){var e=setTimeout(function(){return i.hide(t,n.hideDuration)},n.hideDelay);t.setAttribute("data-hidedelay",e)}else i.hide(t,n.hideDuration)};return{handleTrigger:function(e){if(n.interactive&&e.target.classList.add("active"),"click"===e.type&&"visible"===t.style.visibility&&"persistent"!==n.hideOnClick)return s();o()},handleMouseleave:function(i){if(n.interactive){var r=function i(r){Q(r.target,je.popper)!==t&&Q(r.target,je.el)!==e&&-1===n.trigger.indexOf("click")&&(document.removeEventListener("mousemove",i),s())};return document.addEventListener("mousemove",r)}s()},handleBlur:function(e){!Be.touchUser&&e.relatedTarget&&(Q(e.relatedTarget,je.popper)||s())}}}},{key:"_createTooltips",value:function(t){var n=this;t.forEach(function(e){var t=n._applyIndividualSettings(e),i=e.getAttribute("title");if(i||t.html){var r=Be.idCounter;e.setAttribute("data-tooltipped",""),e.setAttribute("aria-describedby","tippy-tooltip-"+r),ie(e);var o=ee(r,i,t),s=n._getEventListenerHandlers(e,o,t),a=[];t.trigger.trim().split(" ").forEach(function(t){return a=a.concat(te(t,e,s))}),ne({id:r,el:e,popper:o,settings:t,listeners:a}),Be.idCounter++}}),e.store=Pe}},{key:"getPopperElement",value:function(e){try{return Pe.refs[Pe.els.indexOf(e)].popper}catch(e){throw new Error("[Tippy error]: Element does not exist in any Tippy instances")}}},{key:"getTooltippedElement",value:function(e){try{return Pe.refs[Pe.poppers.indexOf(e)].el}catch(e){throw new Error("[Tippy error]: Popper does not exist in any Tippy instances")}}},{key:"show",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.settings.duration,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=Pe.refs[Pe.poppers.indexOf(e)],o=e.querySelector(je.tooltip),s=e.querySelector(je.circle);o.removeEventListener("webkitTransitionEnd",r.transitionendListener),o.removeEventListener("transitionend",r.transitionendListener),i&&(this.callbacks.beforeShown(),n>=20&&le(r,function(){t.hide(e,0,!1),setTimeout(function(){r.hidden||t.show(e,n,!1)},0)})),document.body.contains(e)||de(r),r.hidden=!1,r.popper.style.visibility="visible",r.popper.setAttribute("aria-hidden","false"),se(o,s),ae([o,s],function(e){e.remove("leave"),e.add("enter")}),pe([o,s],n);var a=!1,p=function(){a=!0,"hidden"===e.style.visibility||r.onShownFired||(r.settings.transitionFlip||o.classList.add("tippy-notransition"),r.settings.interactive&&e.focus(),r.onShownFired=!0,i&&t.callbacks.shown())};fe(r,n<20,p),clearTimeout(r.transitionendTimeout),r.transitionendTimeout=setTimeout(function(){a||p()},n)}},{key:"hide",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.settings.duration,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=Pe.refs[Pe.poppers.indexOf(e)],o=e.querySelector(je.tooltip),s=e.querySelector(je.circle);e.querySelector(je.content);o.removeEventListener("webkitTransitionEnd",r.transitionendListener),o.removeEventListener("transitionend",r.transitionendListener),i&&(this.callbacks.beforeHidden(),r.hidden=!0,r.el.classList.remove("active"),r.onShownFired=!1,r.settings.transitionFlip||o.classList.remove("tippy-notransition"),r.flipped=r.settings.position!==e.getAttribute("x-placement")),e.style.visibility="hidden",e.setAttribute("aria-hidden","true"),n===Ie.hideDuration?n=parseInt(o.style[$("transitionDuration")]):pe([o,s],n),ae([o,s],function(e){e.remove("enter"),e.add("leave")}),r.settings.html&&-1!==r.settings.trigger.indexOf("click")&&re(r.el)&&r.el.focus();var a=!1,p=function(){a=!0,"visible"!==e.style.visibility&&document.body.contains(e)&&(r.instance.disableEventListeners(),document.body.removeChild(e),i&&t.callbacks.hidden())};fe(r,n<20,p),clearTimeout(r.transitionendTimeout),r.transitionendTimeout=setTimeout(function(){a||p()},n)}},{key:"destroy",value:function(e){var t=Pe.poppers.indexOf(e),n=Pe.refs[t];n.listeners.forEach(function(e){return n.el.removeEventListener(e.event,e.handler)}),n.el.removeAttribute("data-tooltipped"),n.el.removeAttribute("aria-describedby"),n.instance&&n.instance.destroy(),Pe.refs.splice(t,1),Pe.els.splice(t,1),Pe.poppers.splice(t,1)}},{key:"update",value:function(e){var t=Pe.refs[Pe.poppers.indexOf(e)],n=e.querySelector(je.content),i=t.settings.html;i?n.innerHTML=i instanceof Element?i.innerHTML:document.getElementById(i.replace("#","")).innerHTML:(n.innerHTML=t.el.getAttribute("title")||t.el.getAttribute("data-original-title"),ie(t.el))}}]),e}(),Ye=new qe;return qe}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Tippy=t()}(this,function(){"use strict";function e(e){var t=!1,n=0,i=document.createElement("span");return new MutationObserver(function(){e(),t=!1}).observe(i,{attributes:!0}),function(){t||(t=!0,i.setAttribute("x-index",n),n+=1)}}function t(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},ve))}}function n(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function i(e,t){Object.keys(t).forEach(function(i){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(i)&&n(t[i])&&(r="px"),e.style[i]=t[i]+r})}function r(e){for(var t=[!1,"ms","webkit","moz","o"],n=e.charAt(0).toUpperCase()+e.slice(1),i=0;i<t.length-1;i++){var r=t[i],o=r?""+r+n:e;if(void 0!==window.document.body.style[o])return o}return null}function o(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||e.firstElementChild.offsetParent===e)}function s(e){return null!==e.parentNode?s(e.parentNode):e}function a(e){var t=e&&e.offsetParent,n=t&&t.nodeName;return n&&"BODY"!==n&&"HTML"!==n?t:window.document.documentElement}function p(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return window.document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?e:t,r=n?t:e,l=document.createRange();l.setStart(i,0),l.setEnd(r,0);var f=l.commonAncestorContainer;if(e!==f&&t!==f)return o(f)?f:a(f);var d=s(e);return d.host?p(d.host,t):p(e,s(t).host)}function l(e,t){if(1!==e.nodeType)return[];var n=window.getComputedStyle(e,null);return t?n[t]:n}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",i=e.nodeName;if("BODY"===i||"HTML"===i){var r=window.document.documentElement;return(window.document.scrollingElement||r)[n]}return e[n]}function d(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=f(t,"top"),r=f(t,"left"),o=n?-1:1;return e.top+=i*o,e.bottom+=i*o,e.left+=r*o,e.right+=r*o,e}function u(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function c(e){if(!e||-1!==["HTML","BODY","#document"].indexOf(e.nodeName))return window.document.body;var t=l(e),n=t.overflow,i=t.overflowX;return/(auto|scroll)/.test(n+t.overflowY+i)?e:c(u(e))}function h(e,t){var n="x"===t?"Left":"Top",i="Left"===n?"Right":"Bottom";return+e["border"+n+"Width"].split("px")[0]+ +e["border"+i+"Width"].split("px")[0]}function m(){var e=window.document.body,t=window.document.documentElement;return{height:Math.max(e.scrollHeight,e.offsetHeight,t.clientHeight,t.scrollHeight,t.offsetHeight),width:Math.max(e.scrollWidth,e.offsetWidth,t.clientWidth,t.scrollWidth,t.offsetWidth)}}function v(e){return xe({},e,{right:e.left+e.width,bottom:e.top+e.height})}function g(e){var t={};if(Te())try{t=e.getBoundingClientRect();var n=f(e,"top"),i=f(e,"left");t.top+=n,t.left+=i,t.bottom+=n,t.right+=i}catch(e){}else t=e.getBoundingClientRect();var r={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},o="HTML"===e.nodeName?m():{},s=o.width||e.clientWidth||r.right-r.left,a=o.height||e.clientHeight||r.bottom-r.top,p=e.offsetWidth-s,d=e.offsetHeight-a;if(p||d){var u=l(e);p-=h(u,"x"),d-=h(u,"y"),r.width-=p,r.height-=d}return v(r)}function b(e,t){var n=Te(),i="HTML"===t.nodeName,r=g(e),o=g(t),s=c(e),a=v({top:r.top-o.top,left:r.left-o.left,width:r.width,height:r.height});if(i||"BODY"===t.nodeName){var p=l(t),f=n&&i?0:+p.borderTopWidth.split("px")[0],u=n&&i?0:+p.borderLeftWidth.split("px")[0],h=n&&i?0:+p.marginTop.split("px")[0],m=n&&i?0:+p.marginLeft.split("px")[0];a.top-=f-h,a.bottom-=f-h,a.left-=u-m,a.right-=u-m,a.marginTop=h,a.marginLeft=m}return t.contains(s)&&(n||"BODY"!==s.nodeName)&&(a=d(a,t)),a}function y(e,t,n){return b(n,p(t,n))}function w(e){var t=window.getComputedStyle(e),n=parseFloat(t.marginTop)+parseFloat(t.marginBottom),i=parseFloat(t.marginLeft)+parseFloat(t.marginRight);return{width:e.offsetWidth+i,height:e.offsetHeight+n}}function E(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function O(e,t,n,i){i=i.split("-")[0];var r=w(t),o={position:e,width:r.width,height:r.height},s=-1!==["right","left"].indexOf(i),a=s?"top":"left",p=s?"left":"top",l=s?"height":"width",f=s?"width":"height";return o[a]=n[a]+n[l]/2-r[l]/2,o[p]=i===p?n[p]-r[f]:n[E(p)],o}function x(e){var t={};return e&&"[object Function]"===t.toString.call(e)}function L(e,t,n,i){var r="BODY"===e.nodeName,o=r?window:e;o.addEventListener(t,n,{passive:!0}),r||L(c(o.parentNode),t,n,i),i.push(o)}function T(e,t,n,i){n.updateBound=i,window.addEventListener("resize",n.updateBound,{passive:!0});var r=c(e);return L(r,"scroll",n.updateBound,n.scrollParents),n.scrollElement=r,n.eventsEnabled=!0,n}function A(e,t){return window.removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function k(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function C(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var i=k(e,function(e){return e[t]===n});return e.indexOf(i)}function M(e,t,n){return(void 0===n?e:e.slice(0,C(e,"name",n))).forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&x(n)&&(t=n(t,e))}),t}function S(e,t){return e.some(function(e){var n=e.name;return e.enabled&&n===t})}function H(e){var t=window.document.documentElement,n=b(e,t),i=Math.max(t.clientWidth,window.innerWidth||0),r=Math.max(t.clientHeight,window.innerHeight||0),o=f(t),s=f(t,"left");return v({top:o-n.top+n.marginTop,left:s-n.left+n.marginLeft,width:i,height:r})}function D(e){var t=e.nodeName;return"BODY"!==t&&"HTML"!==t&&("fixed"===l(e,"position")||D(u(e)))}function N(e,t,n,i){var r={top:0,left:0},o=p(e,t);if("viewport"===i)r=H(o);else{var s=void 0;"scrollParent"===i?(s=c(u(e)),"BODY"===s.nodeName&&(s=window.document.documentElement)):s="window"===i?window.document.documentElement:i;var a=b(s,o);if("HTML"!==s.nodeName||D(o))r=a;else{var l=m(),f=l.height,d=l.width;r.top+=a.top-a.marginTop,r.bottom=f+a.top,r.left+=a.left-a.marginLeft,r.right=d+a.left}}return r.left+=n,r.top+=n,r.right-=n,r.bottom-=n,r}function F(e,t,n,i,r){if(-1===e.indexOf("auto"))return e;var o=N(n,i,0,r),s={top:t.top-o.top,right:o.right-t.right,bottom:o.bottom-t.bottom,left:t.left-o.left},a=Object.keys(s).sort(function(e,t){return s[t]-s[e]})[0],p=e.split("-")[1];return a+(p?"-"+p:"")}function W(e,t){Object.keys(t).forEach(function(n){!1!==t[n]?e.setAttribute(n,t[n]):e.removeAttribute(n)})}function B(e,t){var n={position:e.offsets.popper.position},o={"x-placement":e.placement},s=Math.round(e.offsets.popper.left),a=Math.round(e.offsets.popper.top),p=r("transform");return t.gpuAcceleration&&p?(n[p]="translate3d("+s+"px, "+a+"px, 0)",n.top=0,n.left=0,n.willChange="transform"):(n.left=s,n.top=a,n.willChange="top, left"),i(e.instance.popper,xe({},n,e.styles)),W(e.instance.popper,xe({},o,e.attributes)),e.offsets.arrow&&i(e.arrowElement,e.offsets.arrow),e}function P(e,t,n,i,r){var o=y(r,t,e),s=F(n.placement,o,t,e,n.modifiers.flip.boundariesElement);return t.setAttribute("x-placement",s),n}function I(e,t,n){var i=k(e,function(e){return e.name===t}),r=!!i&&e.some(function(e){return e.name===n&&e.enabled&&e.order<i.order});if(!r){var o="`"+t+"`",s="`"+n+"`";console.warn(s+" modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return r}function U(e,t){if(!I(e.instance.modifiers,"arrow","keepTogether"))return e;var n=t.element;if("string"==typeof n){if(!(n=e.instance.popper.querySelector(n)))return e}else if(!e.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],r=v(e.offsets.popper),o=e.offsets.reference,s=-1!==["left","right"].indexOf(i),a=s?"height":"width",p=s?"top":"left",l=s?"left":"top",f=s?"bottom":"right",d=w(n)[a];o[f]-d<r[p]&&(e.offsets.popper[p]-=r[p]-(o[f]-d)),o[p]+d>r[f]&&(e.offsets.popper[p]+=o[p]+d-r[f]);var u=o[p]+o[a]/2-d/2,c=u-v(e.offsets.popper)[p];return c=Math.max(Math.min(r[a]-d,c),0),e.arrowElement=n,e.offsets.arrow={},e.offsets.arrow[p]=c,e.offsets.arrow[l]="",e}function j(e){return"end"===e?"start":"start"===e?"end":e}function q(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=ke.indexOf(e),i=ke.slice(n+1).concat(ke.slice(0,n));return t?i.reverse():i}function Y(e,t){if(S(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=N(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),i=e.placement.split("-")[0],r=E(i),o=e.placement.split("-")[1]||"",s=[];switch(t.behavior){case Ce.FLIP:s=[i,r];break;case Ce.CLOCKWISE:s=q(i);break;case Ce.COUNTERCLOCKWISE:s=q(i,!0);break;default:s=t.behavior}return s.forEach(function(a,p){if(i!==a||s.length===p+1)return e;i=e.placement.split("-")[0],r=E(i);var l=v(e.offsets.popper),f=e.offsets.reference,d=Math.floor,u="left"===i&&d(l.right)>d(f.left)||"right"===i&&d(l.left)<d(f.right)||"top"===i&&d(l.bottom)>d(f.top)||"bottom"===i&&d(l.top)<d(f.bottom),c=d(l.left)<d(n.left),h=d(l.right)>d(n.right),m=d(l.top)<d(n.top),g=d(l.bottom)>d(n.bottom),b="left"===i&&c||"right"===i&&h||"top"===i&&m||"bottom"===i&&g,y=-1!==["top","bottom"].indexOf(i),w=!!t.flipVariations&&(y&&"start"===o&&c||y&&"end"===o&&h||!y&&"start"===o&&m||!y&&"end"===o&&g);(u||b||w)&&(e.flipped=!0,(u||b)&&(i=s[p+1]),w&&(o=j(o)),e.placement=i+(o?"-"+o:""),e.offsets.popper=O(e.instance.state.position,e.instance.popper,e.offsets.reference,e.placement),e=M(e.instance.modifiers,e,"flip"))}),e}function R(e){var t=v(e.offsets.popper),n=e.offsets.reference,i=e.placement.split("-")[0],r=Math.floor,o=-1!==["top","bottom"].indexOf(i),s=o?"right":"bottom",a=o?"left":"top",p=o?"width":"height";return t[s]<r(n[a])&&(e.offsets.popper[a]=r(n[a])-t[p]),t[a]>r(n[s])&&(e.offsets.popper[a]=r(n[s])),e}function z(e,t){var i=e.placement,r=e.offsets.popper,o=void 0;return n(t.offset)?o=[t.offset,0]:(o=t.offset.split(" "),o=o.map(function(t,n){var r=t.match(/(\-?\d*\.?\d*)(.*)/),o=+r[1],s=r[2],a=-1!==i.indexOf("right")||-1!==i.indexOf("left");1===n&&(a=!a);var p=a?"height":"width";if(0===s.indexOf("%")){var l=void 0;switch(s){case"%p":l=e.offsets.popper;break;case"%":case"$r":default:l=e.offsets.reference}return v(l)[p]/100*o}if("vh"===s||"vw"===s){return("vh"===s?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o}return"px"===s?+o:+t})),-1!==e.placement.indexOf("left")?(r.top+=o[0],r.left-=o[1]||0):-1!==e.placement.indexOf("right")?(r.top+=o[0],r.left+=o[1]||0):-1!==e.placement.indexOf("top")?(r.left+=o[0],r.top-=o[1]||0):-1!==e.placement.indexOf("bottom")&&(r.left+=o[0],r.top+=o[1]||0),e}function _(e,t){var n=t.boundariesElement||a(e.instance.popper),i=N(e.instance.popper,e.instance.reference,t.padding,n);t.boundaries=i;var r=t.priority,o=v(e.offsets.popper),s={primary:function(e){var n=o[e];return o[e]<i[e]&&!t.escapeWithReference&&(n=Math.max(o[e],i[e])),Oe({},e,n)},secondary:function(e){var n="right"===e?"left":"top",r=o[n];return o[e]>i[e]&&!t.escapeWithReference&&(r=Math.min(o[n],i[e]-("right"===e?o.width:o.height))),Oe({},n,r)}};return r.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";o=xe({},o,s[t](e))}),e.offsets.popper=o,e}function K(e){var t=e.placement,n=t.split("-")[0],i=t.split("-")[1];if(i){var r=e.offsets.reference,o=v(e.offsets.popper),s=-1!==["bottom","top"].indexOf(n),a=s?"left":"top",p=s?"width":"height",l={start:Oe({},a,r[a]),end:Oe({},a,r[a]+r[p]-o[p])};e.offsets.popper=xe({},o,l[i])}return e}function X(e){if(!I(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=k(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}function G(e){var t=e.placement,n=t.split("-")[0],i=v(e.offsets.popper),r=v(e.offsets.reference),o=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[o?"left":"top"]=r[t]-(s?i[o?"width":"height"]:0),e.placement=E(t),e.offsets.popper=v(i),e}function J(){We.touchUser=!0,document.body.classList.add("tippy-touch"),document.removeEventListener("touchstart",J)}function V(e){var t=Q(e.target,Ue.el),n=Q(e.target,Ue.popper);if(n){if(Be.refs[Be.poppers.indexOf(n)].settings.interactive)return}if(t){var i=Be.refs[Be.els.indexOf(t)];if(!i.settings.multiple&&We.touchUser||!i.settings.multiple&&-1!==i.settings.trigger.indexOf("click"))return ue(i);if(!0!==i.settings.hideOnClick||-1!==i.settings.trigger.indexOf("click"))return}!Q(e.target,Ue.controller)&&document.body.querySelector(Ue.popper)&&ue()}function $(e){for(var t=[!1,"webkit"],n=e.charAt(0).toUpperCase()+e.slice(1),i=0;i<t.length;i++){var r=t[i],o=r?""+r+n:e;if(void 0!==window.document.body.style[o])return o}return null}function Q(e,t){return Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;--n>=0&&t.item(n)!==this;);return n>-1}),Element.prototype.closest||(Element.prototype.closest=function(e){for(var t=this;t;){if(t.matches(e))return t;t=t.parentElement}}),e.closest(t)}function Z(e){var t=e.settings,n=e.popper.querySelector(Ue.tooltip),i=Fe({placement:t.position},t.popperOptions||{},{modifiers:Fe({},t.popperOptions?t.popperOptions.modifiers:{},{flip:Fe({padding:parseInt(t.distance)+3},t.popperOptions&&t.popperOptions.modifiers?t.popperOptions.modifiers.flip:{}),offset:Fe({offset:parseInt(t.offset)},t.popperOptions&&t.popperOptions.modifiers?t.popperOptions.modifiers.offset:{})}),onUpdate:function(){n.style.top="",n.style.bottom="",n.style.left="",n.style.right="",n.style[e.popper.getAttribute("x-placement")]=-(t.distance-10)+"px"}});return new He(e.el,e.popper,i)}function ee(e,t,n){var i=document.createElement("div");i.setAttribute("class","tippy-popper"),i.setAttribute("role","tooltip"),i.setAttribute("aria-hidden","true"),i.setAttribute("id","tippy-tooltip-"+e);var r=document.createElement("div");if(r.setAttribute("class","tippy-tooltip tippy-tooltip--"+n.size+" "+n.theme+"-theme leave"),r.setAttribute("data-animation",n.animation),n.arrow){var o=document.createElement("div");o.setAttribute("class","arrow-"+n.arrowSize),o.setAttribute("x-arrow",""),r.appendChild(o)}if(n.animateFill){r.setAttribute("data-animatefill","");var s=document.createElement("div");s.setAttribute("class","leave"),s.setAttribute("x-circle",""),r.appendChild(s)}n.inertia&&r.setAttribute("data-inertia","");var a=document.createElement("div");if(a.setAttribute("class","tippy-tooltip-content"),n.html){var p=void 0;n.html instanceof Element?(a.innerHTML=n.html.innerHTML,p=n.html.id||"tippy-html-template"):(a.innerHTML=document.getElementById(n.html.replace("#","")).innerHTML,p=n.html),i.classList.add("html-template"),i.setAttribute("tabindex","0"),r.setAttribute("data-template-id",p)}else a.innerHTML=t;return r.style[n.position]=-(n.distance-10)+"px",r.appendChild(a),i.appendChild(r),i}function te(e,t,n){var i=[];return"manual"===e?i:(t.addEventListener(e,n.handleTrigger),i.push({event:e,handler:n.handleTrigger}),"mouseenter"===e&&(t.addEventListener("mouseleave",n.handleMouseleave),i.push({event:"mouseleave",handler:n.handleMouseleave})),"focus"===e&&(t.addEventListener("blur",n.handleBlur),i.push({event:"blur",handler:n.handleBlur})),i)}function ne(e){Be.refs.push(e),Be.els.push(e.el),Be.poppers.push(e.popper)}function ie(e){var t=e.getAttribute("title");e.setAttribute("data-original-title",t||"html"),e.removeAttribute("title")}function re(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function oe(e){var t=Be.refs[Be.els.indexOf(this)],n=t.popper.getAttribute("x-placement"),i=Math.round(t.popper.offsetWidth/2),r=Math.round(t.popper.offsetHeight/2),o=e.pageX-i,s=e.pageY-2.5*r;"left"===n?(o=e.pageX-2*i-15,s=e.pageY-r):"right"===n?(o=e.pageX+r,s=e.pageY-r):"bottom"===n&&(s=e.pageY+r/1.5),t.popper.style[$("transform")]="translate3d("+o+"px, "+s+"px, 0)"}function se(e,t){t?window.getComputedStyle(t)[$("transform")]:window.getComputedStyle(e).opacity}function ae(e,t){e.forEach(function(e){e&&t(e.classList)})}function pe(e,t){e.forEach(function(e){e&&(e.hasAttribute("x-circle")&&(t=Math.round(t/1.25)),e.style[$("transitionDuration")]=t+"ms")})}function le(e,t){setTimeout(function(){e.settings.position!==e.popper.getAttribute("x-placement")?(e.flipped=!0,t()):e.flipped&&e.settings.position===e.popper.getAttribute("x-placement")&&(e.flipped=!1,t())},0)}function fe(e,t){var n=e.popper.querySelector(Ue.tooltip),i=function e(){n.removeEventListener("webkitTransitionEnd",e),n.removeEventListener("transitionend",e),t()};n.addEventListener("webkitTransitionEnd",i),n.addEventListener("transitionend",i)}function de(e){document.body.appendChild(e.popper),!e.settings.followCursor||e.hasFollowCursorListener||We.touchUser||(e.hasFollowCursorListener=!0,e.el.addEventListener("mousemove",oe)),e.instance?(e.instance.update(),e.settings.followCursor||e.instance.enableEventListeners()):(e.instance=Z(e),e.settings.followCursor&&!We.touchUser&&e.instance.disableEventListeners())}function ue(e){Be.refs.forEach(function(t){document.body.contains(t.popper)&&(!0!==t.settings.hideOnClick||e&&t.popper===e.popper||qe.hide(t.popper,t.settings.hideDuration))})}for(var ce=["native code","[object MutationObserverConstructor]"],he="undefined"!=typeof window,me=["Edge","Trident","Firefox"],ve=0,ge=0;ge<me.length;ge+=1)if(he&&navigator.userAgent.indexOf(me[ge])>=0){ve=1;break}var be=he&&function(e){return ce.some(function(t){return(e||"").toString().indexOf(t)>-1})}(window.MutationObserver),ye=be?e:t,we=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Ee=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),Oe=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},xe=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},Le=void 0,Te=function(){return void 0===Le&&(Le=-1!==navigator.appVersion.indexOf("MSIE 10")),Le},Ae=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],ke=Ae.slice(3),Ce={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},Me={shift:{order:100,enabled:!0,fn:K},offset:{order:200,enabled:!0,fn:z,offset:0},preventOverflow:{order:300,enabled:!0,fn:_,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:R},arrow:{order:500,enabled:!0,fn:U,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:Y,behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:G},hide:{order:800,enabled:!0,fn:X},applyStyle:{order:900,enabled:!0,fn:B,onLoad:P,gpuAcceleration:!0}},Se={placement:"bottom",eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:Me},He=function(){function e(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};we(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=ye(this.update.bind(this)),this.options=xe({},e.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t.jquery?t[0]:t,this.popper=n.jquery?n[0]:n,i(this.popper,{position:"absolute"}),this.modifiers=Object.keys(e.Defaults.modifiers).map(function(t){return xe({name:t},e.Defaults.modifiers[t])}),this.modifiers=this.modifiers.map(function(e){var t=o.modifiers&&o.modifiers[e.name]||{};return xe({},e,t)}),o.modifiers&&(this.options.modifiers=xe({},e.Defaults.modifiers,o.modifiers),Object.keys(o.modifiers).forEach(function(t){if(void 0===e.Defaults.modifiers[t]){var n=o.modifiers[t];n.name=t,r.modifiers.push(n)}})),this.modifiers=this.modifiers.sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&x(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)}),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return Ee(e,[{key:"update",value:function(){if(!this.state.isDestroyed){var e={instance:this,styles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=y(this.state,this.popper,this.reference),e.placement=F(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement),e.originalPlacement=e.placement,e.offsets.popper=O(this.state,this.popper,e.offsets.reference,e.placement),e=M(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}},{key:"destroy",value:function(){return this.state.isDestroyed=!0,S(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.left="",this.popper.style.position="",this.popper.style.top="",this.popper.style[r("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}},{key:"enableEventListeners",value:function(){this.state.eventsEnabled||(this.state=T(this.reference,this.options,this.state,this.scheduleUpdate))}},{key:"disableEventListeners",value:function(){this.state.eventsEnabled&&(window.cancelAnimationFrame(this.scheduleUpdate),this.state=A(this.reference,this.state))}}]),e}();He.Utils=("undefined"!=typeof window?window:global).PopperUtils,He.placements=Ae,He.Defaults=Se;var De=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Ne=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),Fe=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},We={touchUser:!1,idCounter:0},Be={refs:[],els:[],poppers:[]},Pe={html:!1,position:"top",animation:"shift",animateFill:!0,arrow:!1,arrowSize:"regular",delay:0,hideDelay:0,trigger:"mouseenter focus",duration:375,hideDuration:375,interactive:!1,theme:"dark",size:"regular",distance:10,offset:0,hideOnClick:!0,multiple:!1,followCursor:!1,inertia:!1,transitionFlip:!0,popperOptions:{}},Ie=Object.keys(Pe),Ue={popper:".tippy-popper",tooltip:".tippy-tooltip",content:".tippy-tooltip-content",circle:"[x-circle]",arrow:"[x-arrow]",el:"[data-tooltipped]",controller:"[data-tippy-controller]"};document.addEventListener("click",V),document.addEventListener("touchstart",J);var je=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(De(this,e),"addEventListener"in window&&!/MSIE 9/i.test(navigator.userAgent)&&!window.operamini){this.settings=Fe(JSON.parse(JSON.stringify(Pe)),n),this.callbacks={wait:n.wait,beforeShown:n.beforeShown||new Function,shown:n.shown||new Function,beforeHidden:n.beforeHidden||new Function,hidden:n.hidden||new Function};var i=t instanceof Element?[t]:[].slice.call(document.querySelectorAll(t));this._createTooltips(i)}}return Ne(e,[{key:"_applyIndividualSettings",value:function(e){var t=this,n={};return Ie.forEach(function(i){var r=e.getAttribute("data-"+i.toLowerCase())||t.settings[i];"false"===r&&(r=!1),n[i]=r}),n.arrow&&(n.animateFill=!1),Fe(Fe({},this.settings),n)}},{key:"_getEventListenerHandlers",value:function(e,t,n){var i=this,r=function(){if(clearTimeout(t.getAttribute("data-delay")),clearTimeout(t.getAttribute("data-hidedelay")),"visible"!==t.style.visibility)if(n.delay){var e=setTimeout(function(){return i.show(t,n.duration)},n.delay);t.setAttribute("data-delay",e)}else i.show(t,n.duration)},o=function(){return i.callbacks.wait?i.callbacks.wait(r):r()},s=function(){if(clearTimeout(t.getAttribute("data-hidedelay")),clearTimeout(t.getAttribute("data-delay")),n.hideDelay){var e=setTimeout(function(){return i.hide(t,n.hideDuration)},n.hideDelay);t.setAttribute("data-hidedelay",e)}else i.hide(t,n.hideDuration)};return{handleTrigger:function(e){if("click"===e.type&&"visible"===t.style.visibility&&"persistent"!==n.hideOnClick)return s();o()},handleMouseleave:function(i){if(n.interactive){var r=function i(r){Q(r.target,Ue.popper)!==t&&Q(r.target,Ue.el)!==e&&-1===n.trigger.indexOf("click")&&(document.removeEventListener("mousemove",i),s())};return document.addEventListener("mousemove",r)}s()},handleBlur:function(e){!We.touchUser&&e.relatedTarget&&(Q(e.relatedTarget,Ue.popper)||s())}}}},{key:"_createTooltips",value:function(t){var n=this;t.forEach(function(e){var t=n._applyIndividualSettings(e),i=e.getAttribute("title");if(i||t.html){var r=We.idCounter;e.setAttribute("data-tooltipped",""),e.setAttribute("aria-describedby","tippy-tooltip-"+r),ie(e);var o=ee(r,i,t),s=n._getEventListenerHandlers(e,o,t),a=[];t.trigger.trim().split(" ").forEach(function(t){return a=a.concat(te(t,e,s))}),ne({id:r,el:e,popper:o,settings:t,listeners:a}),We.idCounter++}}),e.store=Be}},{key:"getPopperElement",value:function(e){try{return Be.refs[Be.els.indexOf(e)].popper}catch(e){throw new Error("[Tippy error]: Element does not exist in any Tippy instances")}}},{key:"getTooltippedElement",value:function(e){try{return Be.refs[Be.poppers.indexOf(e)].el}catch(e){throw new Error("[Tippy error]: Popper does not exist in any Tippy instances")}}},{key:"show",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.settings.duration,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=Be.refs[Be.poppers.indexOf(e)],o=e.querySelector(Ue.tooltip),s=e.querySelector(Ue.circle);i&&(this.callbacks.beforeShown(),n>=20&&le(r,function(){t.hide(e,0,!1),setTimeout(function(){r.hidden||t.show(e,n,!1)},0)})),document.body.contains(e)||de(r),r.settings.interactive&&r.el.classList.add("active"),r.hidden=!1,r.popper.style.visibility="visible",r.popper.setAttribute("aria-hidden","false"),se(o,s),ae([o,s],function(e){e.remove("leave"),e.add("enter")}),pe([o,s],n);var a=!1,p=function(){a=!0,"hidden"===e.style.visibility||r.onShownFired||(r.settings.transitionFlip||o.classList.add("tippy-notransition"),r.settings.interactive&&e.focus(),r.onShownFired=!0,i&&t.callbacks.shown())};fe(r,p),clearTimeout(r.transitionendTimeout),r.transitionendTimeout=setTimeout(function(){a||p()},n)}},{key:"hide",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.settings.duration,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=Be.refs[Be.poppers.indexOf(e)],o=e.querySelector(Ue.tooltip),s=e.querySelector(Ue.circle);e.querySelector(Ue.content);i&&(this.callbacks.beforeHidden(),r.hidden=!0,r.el.classList.remove("active"),r.onShownFired=!1,r.settings.transitionFlip||o.classList.remove("tippy-notransition"),r.flipped=r.settings.position!==e.getAttribute("x-placement")),e.style.visibility="hidden",e.setAttribute("aria-hidden","true"),n===Pe.hideDuration?n=parseInt(o.style[$("transitionDuration")]):pe([o,s],n),ae([o,s],function(e){e.remove("enter"),e.add("leave")}),r.settings.html&&-1!==r.settings.trigger.indexOf("click")&&re(r.el)&&r.el.focus();var a=!1,p=function(){a=!0,"visible"!==e.style.visibility&&document.body.contains(e)&&(r.instance.disableEventListeners(),document.body.removeChild(e),i&&t.callbacks.hidden())};fe(r,p),clearTimeout(r.transitionendTimeout),r.transitionendTimeout=setTimeout(function(){a||p()},n)}},{key:"destroy",value:function(e){var t=Be.poppers.indexOf(e),n=Be.refs[t];n.listeners.forEach(function(e){return n.el.removeEventListener(e.event,e.handler)}),n.el.removeAttribute("data-tooltipped"),n.el.removeAttribute("aria-describedby"),n.instance&&n.instance.destroy(),Be.refs.splice(t,1),Be.els.splice(t,1),Be.poppers.splice(t,1)}},{key:"update",value:function(e){var t=Be.refs[Be.poppers.indexOf(e)],n=e.querySelector(Ue.content),i=t.settings.html;i?n.innerHTML=i instanceof Element?i.innerHTML:document.getElementById(i.replace("#","")).innerHTML:(n.innerHTML=t.el.getAttribute("title")||t.el.getAttribute("data-original-title"),ie(t.el))}}]),e}(),qe=new je;return je}); |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("popper.js")):"function"==typeof define&&define.amd?define(["popper.js"],t):e.Tippy=t(e.Popper)}(this,function(e){"use strict";function t(){L.touchUser=!0,document.body.classList.add("tippy-touch"),document.removeEventListener("touchstart",t)}function i(e){var t=r(e.target,O.el),i=r(e.target,O.popper);if(i){if(A.refs[A.poppers.indexOf(i)].settings.interactive)return}if(t){var n=A.refs[A.els.indexOf(t)];if(!n.settings.multiple&&L.touchUser||!n.settings.multiple&&-1!==n.settings.trigger.indexOf("click"))return g(n);if(!0!==n.settings.hideOnClick||-1!==n.settings.trigger.indexOf("click"))return}!r(e.target,O.controller)&&document.body.querySelector(O.popper)&&g()}function n(e){for(var t=[!1,"webkit"],i=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<t.length;n++){var r=t[n],o=r?""+r+i:e;if(void 0!==window.document.body.style[o])return o}return null}function r(e,t){return Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),i=t.length;--i>=0&&t.item(i)!==this;);return i>-1}),Element.prototype.closest||(Element.prototype.closest=function(e){for(var t=this;t;){if(t.matches(e))return t;t=t.parentElement}}),e.closest(t)}function o(t){var i=t.settings,n=t.popper.querySelector(O.tooltip),r=E({placement:i.position},i.popperOptions||{},{modifiers:E({},i.popperOptions?i.popperOptions.modifiers:{},{flip:E({padding:15},i.popperOptions&&i.popperOptions.modifiers?i.popperOptions.modifiers.flip:{}),offset:E({offset:parseInt(i.offset)},i.popperOptions&&i.popperOptions.modifiers?i.popperOptions.modifiers.offset:{})}),onUpdate:function(){n.style.top="",n.style.bottom="",n.style.left="",n.style.right="",n.style[t.popper.getAttribute("x-placement")]=-(i.distance-10)+"px"}});return new e(t.el,t.popper,r)}function s(e,t,i){var n=document.createElement("div");n.setAttribute("class","tippy-popper"),n.setAttribute("role","tooltip"),n.setAttribute("aria-hidden","true"),n.setAttribute("id","tippy-tooltip-"+e);var r=document.createElement("div");if(r.setAttribute("class","tippy-tooltip tippy-tooltip--"+i.size+" "+i.theme+"-theme leave"),r.setAttribute("data-animation",i.animation),i.arrow){var o=document.createElement("div");o.setAttribute("class","arrow-"+i.arrowSize),o.setAttribute("x-arrow",""),r.appendChild(o)}if(i.animateFill){r.setAttribute("data-animatefill","");var s=document.createElement("div");s.setAttribute("class","leave"),s.setAttribute("x-circle",""),r.appendChild(s)}i.inertia&&r.setAttribute("data-inertia","");var a=document.createElement("div");if(a.setAttribute("class","tippy-tooltip-content"),i.html){var l=void 0;i.html instanceof Element?(a.innerHTML=i.html.innerHTML,l=i.html.id||"tippy-html-template"):(a.innerHTML=document.getElementById(i.html.replace("#","")).innerHTML,l=i.html),n.classList.add("html-template"),n.setAttribute("tabindex","0"),r.setAttribute("data-template-id",l)}else a.innerHTML=t;return r.style[i.position]=-(i.distance-10)+"px",r.appendChild(a),n.appendChild(r),n}function a(e,t,i){var n=[];return"manual"===e?n:(t.addEventListener(e,i.handleTrigger),n.push({event:e,handler:i.handleTrigger}),"mouseenter"===e&&(t.addEventListener("mouseleave",i.handleMouseleave),n.push({event:"mouseleave",handler:i.handleMouseleave})),"focus"===e&&(t.addEventListener("blur",i.handleBlur),n.push({event:"blur",handler:i.handleBlur})),n)}function l(e){A.refs.push(e),A.els.push(e.el),A.poppers.push(e.popper)}function p(e){var t=e.getAttribute("title");e.setAttribute("data-original-title",t||"html"),e.removeAttribute("title")}function d(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function u(e){var t=A.refs[A.els.indexOf(this)],i=t.popper.getAttribute("x-placement"),r=Math.round(t.popper.offsetWidth/2),o=Math.round(t.popper.offsetHeight/2),s=e.pageX-r,a=e.pageY-2.5*o;"left"===i?(s=e.pageX-2*r-15,a=e.pageY-o):"right"===i?(s=e.pageX+o,a=e.pageY-o):"bottom"===i&&(a=e.pageY+o/1.5),t.popper.style[n("transform")]="translate3d("+s+"px, "+a+"px, 0)"}function c(e,t){t?window.getComputedStyle(t)[n("transform")]:window.getComputedStyle(e).opacity}function f(e,t){e.forEach(function(e){e&&t(e.classList)})}function h(e,t){e.forEach(function(e){e&&(e.hasAttribute("x-circle")&&(t=Math.round(t/1.25)),e.style[n("transitionDuration")]=t+"ms")})}function m(e,t){setTimeout(function(){e.settings.position!==e.popper.getAttribute("x-placement")?(e.flipped=!0,t()):e.flipped&&e.settings.position===e.popper.getAttribute("x-placement")&&(e.flipped=!1,t())},0)}function v(e,t,i){var n=e.popper.querySelector(O.tooltip),r=function e(){t||(n.removeEventListener("webkitTransitionEnd",e),n.removeEventListener("transitionend",e)),i()};if(e.transititionendListener=r,t)return r();n.addEventListener("webkitTransitionEnd",r),n.addEventListener("transitionend",r)}function y(e){document.body.appendChild(e.popper),!e.settings.followCursor||e.hasFollowCursorListener||L.touchUser||(e.hasFollowCursorListener=!0,e.el.addEventListener("mousemove",u)),e.instance?(e.instance.update(),e.settings.followCursor||e.instance.enableEventListeners()):(e.instance=o(e),e.settings.followCursor&&!L.touchUser&&e.instance.disableEventListeners())}function g(e){A.refs.forEach(function(t){document.body.contains(t.popper)&&(!0!==t.settings.hideOnClick||e&&t.popper===e.popper||S.hide(t.popper,t.settings.hideDuration))})}e="default"in e?e.default:e;var b=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},w=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},L={touchUser:!1,idCounter:0},A={refs:[],els:[],poppers:[]},T={html:!1,position:"top",animation:"shift",animateFill:!0,arrow:!1,arrowSize:"regular",delay:0,hideDelay:0,trigger:"mouseenter focus",duration:375,hideDuration:375,interactive:!1,theme:"dark",size:"regular",distance:10,offset:0,hideOnClick:!0,multiple:!1,followCursor:!1,inertia:!1,transitionFlip:!0,popperOptions:{}},k=Object.keys(T),O={popper:".tippy-popper",tooltip:".tippy-tooltip",content:".tippy-tooltip-content",circle:"[x-circle]",arrow:"[x-arrow]",el:"[data-tooltipped]",controller:"[data-tippy-controller]"};document.addEventListener("click",i),document.addEventListener("touchstart",t);var x=function(){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(b(this,e),"addEventListener"in window&&!/MSIE 9/i.test(navigator.userAgent)&&!window.operamini){this.settings=E(JSON.parse(JSON.stringify(T)),i),this.callbacks={wait:i.wait,beforeShown:i.beforeShown||new Function,shown:i.shown||new Function,beforeHidden:i.beforeHidden||new Function,hidden:i.hidden||new Function};var n=t instanceof Element?[t]:[].slice.call(document.querySelectorAll(t));this._createTooltips(n)}}return w(e,[{key:"_applyIndividualSettings",value:function(e){var t=this,i={};return k.forEach(function(n){var r=e.getAttribute("data-"+n.toLowerCase())||t.settings[n];"false"===r&&(r=!1),i[n]=r}),i.arrow&&(i.animateFill=!1),E(E({},this.settings),i)}},{key:"_getEventListenerHandlers",value:function(e,t,i){var n=this,o=function(){if(clearTimeout(t.getAttribute("data-delay")),clearTimeout(t.getAttribute("data-hidedelay")),"visible"!==t.style.visibility)if(i.delay){var e=setTimeout(function(){return n.show(t,i.duration)},i.delay);t.setAttribute("data-delay",e)}else n.show(t,i.duration)},s=function(){return n.callbacks.wait?n.callbacks.wait(o):o()},a=function(){if(clearTimeout(t.getAttribute("data-hidedelay")),clearTimeout(t.getAttribute("data-delay")),i.hideDelay){var e=setTimeout(function(){return n.hide(t,i.hideDuration)},i.hideDelay);t.setAttribute("data-hidedelay",e)}else n.hide(t,i.hideDuration)};return{handleTrigger:function(e){if(i.interactive&&e.target.classList.add("active"),"click"===e.type&&"visible"===t.style.visibility&&"persistent"!==i.hideOnClick)return a();s()},handleMouseleave:function(n){if(i.interactive){var o=function n(o){r(o.target,O.popper)!==t&&r(o.target,O.el)!==e&&-1===i.trigger.indexOf("click")&&(document.removeEventListener("mousemove",n),a())};return document.addEventListener("mousemove",o)}a()},handleBlur:function(e){!L.touchUser&&e.relatedTarget&&(r(e.relatedTarget,O.popper)||a())}}}},{key:"_createTooltips",value:function(t){var i=this;t.forEach(function(e){var t=i._applyIndividualSettings(e),n=e.getAttribute("title");if(n||t.html){var r=L.idCounter;e.setAttribute("data-tooltipped",""),e.setAttribute("aria-describedby","tippy-tooltip-"+r),p(e);var o=s(r,n,t),d=i._getEventListenerHandlers(e,o,t),u=[];t.trigger.trim().split(" ").forEach(function(t){return u=u.concat(a(t,e,d))}),l({id:r,el:e,popper:o,settings:t,listeners:u}),L.idCounter++}}),e.store=A}},{key:"getPopperElement",value:function(e){try{return A.refs[A.els.indexOf(e)].popper}catch(e){throw new Error("[Tippy error]: Element does not exist in any Tippy instances")}}},{key:"getTooltippedElement",value:function(e){try{return A.refs[A.poppers.indexOf(e)].el}catch(e){throw new Error("[Tippy error]: Popper does not exist in any Tippy instances")}}},{key:"show",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.settings.duration,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=A.refs[A.poppers.indexOf(e)],o=e.querySelector(O.tooltip),s=e.querySelector(O.circle);o.removeEventListener("webkitTransitionEnd",r.transitionendListener),o.removeEventListener("transitionend",r.transitionendListener),n&&(this.callbacks.beforeShown(),i>=20&&m(r,function(){t.hide(e,0,!1),setTimeout(function(){r.hidden||t.show(e,i,!1)},0)})),document.body.contains(e)||y(r),r.hidden=!1,r.popper.style.visibility="visible",r.popper.setAttribute("aria-hidden","false"),c(o,s),f([o,s],function(e){e.remove("leave"),e.add("enter")}),h([o,s],i);var a=!1,l=function(){a=!0,"hidden"===e.style.visibility||r.onShownFired||(r.settings.transitionFlip||o.classList.add("tippy-notransition"),r.settings.interactive&&e.focus(),r.onShownFired=!0,n&&t.callbacks.shown())};v(r,i<20,l),clearTimeout(r.transitionendTimeout),r.transitionendTimeout=setTimeout(function(){a||l()},i)}},{key:"hide",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.settings.duration,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=A.refs[A.poppers.indexOf(e)],s=e.querySelector(O.tooltip),a=e.querySelector(O.circle);e.querySelector(O.content);s.removeEventListener("webkitTransitionEnd",o.transitionendListener),s.removeEventListener("transitionend",o.transitionendListener),r&&(this.callbacks.beforeHidden(),o.hidden=!0,o.el.classList.remove("active"),o.onShownFired=!1,o.settings.transitionFlip||s.classList.remove("tippy-notransition"),o.flipped=o.settings.position!==e.getAttribute("x-placement")),e.style.visibility="hidden",e.setAttribute("aria-hidden","true"),i===T.hideDuration?i=parseInt(s.style[n("transitionDuration")]):h([s,a],i),f([s,a],function(e){e.remove("enter"),e.add("leave")}),o.settings.html&&-1!==o.settings.trigger.indexOf("click")&&d(o.el)&&o.el.focus();var l=!1,p=function(){l=!0,"visible"!==e.style.visibility&&document.body.contains(e)&&(o.instance.disableEventListeners(),document.body.removeChild(e),r&&t.callbacks.hidden())};v(o,i<20,p),clearTimeout(o.transitionendTimeout),o.transitionendTimeout=setTimeout(function(){l||p()},i)}},{key:"destroy",value:function(e){var t=A.poppers.indexOf(e),i=A.refs[t];i.listeners.forEach(function(e){return i.el.removeEventListener(e.event,e.handler)}),i.el.removeAttribute("data-tooltipped"),i.el.removeAttribute("aria-describedby"),i.instance&&i.instance.destroy(),A.refs.splice(t,1),A.els.splice(t,1),A.poppers.splice(t,1)}},{key:"update",value:function(e){var t=A.refs[A.poppers.indexOf(e)],i=e.querySelector(O.content),n=t.settings.html;n?i.innerHTML=n instanceof Element?n.innerHTML:document.getElementById(n.replace("#","")).innerHTML:(i.innerHTML=t.el.getAttribute("title")||t.el.getAttribute("data-original-title"),p(t.el))}}]),e}(),S=new x;return x}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("popper.js")):"function"==typeof define&&define.amd?define(["popper.js"],t):e.Tippy=t(e.Popper)}(this,function(e){"use strict";function t(){A.touchUser=!0,document.body.classList.add("tippy-touch"),document.removeEventListener("touchstart",t)}function i(e){var t=r(e.target,k.el),i=r(e.target,k.popper);if(i){if(T.refs[T.poppers.indexOf(i)].settings.interactive)return}if(t){var n=T.refs[T.els.indexOf(t)];if(!n.settings.multiple&&A.touchUser||!n.settings.multiple&&-1!==n.settings.trigger.indexOf("click"))return g(n);if(!0!==n.settings.hideOnClick||-1!==n.settings.trigger.indexOf("click"))return}!r(e.target,k.controller)&&document.body.querySelector(k.popper)&&g()}function n(e){for(var t=[!1,"webkit"],i=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<t.length;n++){var r=t[n],o=r?""+r+i:e;if(void 0!==window.document.body.style[o])return o}return null}function r(e,t){return Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),i=t.length;--i>=0&&t.item(i)!==this;);return i>-1}),Element.prototype.closest||(Element.prototype.closest=function(e){for(var t=this;t;){if(t.matches(e))return t;t=t.parentElement}}),e.closest(t)}function o(t){var i=t.settings,n=t.popper.querySelector(k.tooltip),r=E({placement:i.position},i.popperOptions||{},{modifiers:E({},i.popperOptions?i.popperOptions.modifiers:{},{flip:E({padding:parseInt(i.distance)+3},i.popperOptions&&i.popperOptions.modifiers?i.popperOptions.modifiers.flip:{}),offset:E({offset:parseInt(i.offset)},i.popperOptions&&i.popperOptions.modifiers?i.popperOptions.modifiers.offset:{})}),onUpdate:function(){n.style.top="",n.style.bottom="",n.style.left="",n.style.right="",n.style[t.popper.getAttribute("x-placement")]=-(i.distance-10)+"px"}});return new e(t.el,t.popper,r)}function s(e,t,i){var n=document.createElement("div");n.setAttribute("class","tippy-popper"),n.setAttribute("role","tooltip"),n.setAttribute("aria-hidden","true"),n.setAttribute("id","tippy-tooltip-"+e);var r=document.createElement("div");if(r.setAttribute("class","tippy-tooltip tippy-tooltip--"+i.size+" "+i.theme+"-theme leave"),r.setAttribute("data-animation",i.animation),i.arrow){var o=document.createElement("div");o.setAttribute("class","arrow-"+i.arrowSize),o.setAttribute("x-arrow",""),r.appendChild(o)}if(i.animateFill){r.setAttribute("data-animatefill","");var s=document.createElement("div");s.setAttribute("class","leave"),s.setAttribute("x-circle",""),r.appendChild(s)}i.inertia&&r.setAttribute("data-inertia","");var a=document.createElement("div");if(a.setAttribute("class","tippy-tooltip-content"),i.html){var l=void 0;i.html instanceof Element?(a.innerHTML=i.html.innerHTML,l=i.html.id||"tippy-html-template"):(a.innerHTML=document.getElementById(i.html.replace("#","")).innerHTML,l=i.html),n.classList.add("html-template"),n.setAttribute("tabindex","0"),r.setAttribute("data-template-id",l)}else a.innerHTML=t;return r.style[i.position]=-(i.distance-10)+"px",r.appendChild(a),n.appendChild(r),n}function a(e,t,i){var n=[];return"manual"===e?n:(t.addEventListener(e,i.handleTrigger),n.push({event:e,handler:i.handleTrigger}),"mouseenter"===e&&(t.addEventListener("mouseleave",i.handleMouseleave),n.push({event:"mouseleave",handler:i.handleMouseleave})),"focus"===e&&(t.addEventListener("blur",i.handleBlur),n.push({event:"blur",handler:i.handleBlur})),n)}function l(e){T.refs.push(e),T.els.push(e.el),T.poppers.push(e.popper)}function p(e){var t=e.getAttribute("title");e.setAttribute("data-original-title",t||"html"),e.removeAttribute("title")}function u(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function d(e){var t=T.refs[T.els.indexOf(this)],i=t.popper.getAttribute("x-placement"),r=Math.round(t.popper.offsetWidth/2),o=Math.round(t.popper.offsetHeight/2),s=e.pageX-r,a=e.pageY-2.5*o;"left"===i?(s=e.pageX-2*r-15,a=e.pageY-o):"right"===i?(s=e.pageX+o,a=e.pageY-o):"bottom"===i&&(a=e.pageY+o/1.5),t.popper.style[n("transform")]="translate3d("+s+"px, "+a+"px, 0)"}function c(e,t){t?window.getComputedStyle(t)[n("transform")]:window.getComputedStyle(e).opacity}function f(e,t){e.forEach(function(e){e&&t(e.classList)})}function h(e,t){e.forEach(function(e){e&&(e.hasAttribute("x-circle")&&(t=Math.round(t/1.25)),e.style[n("transitionDuration")]=t+"ms")})}function m(e,t){setTimeout(function(){e.settings.position!==e.popper.getAttribute("x-placement")?(e.flipped=!0,t()):e.flipped&&e.settings.position===e.popper.getAttribute("x-placement")&&(e.flipped=!1,t())},0)}function v(e,t){var i=e.popper.querySelector(k.tooltip),n=function e(){i.removeEventListener("webkitTransitionEnd",e),i.removeEventListener("transitionend",e),t()};i.addEventListener("webkitTransitionEnd",n),i.addEventListener("transitionend",n)}function y(e){document.body.appendChild(e.popper),!e.settings.followCursor||e.hasFollowCursorListener||A.touchUser||(e.hasFollowCursorListener=!0,e.el.addEventListener("mousemove",d)),e.instance?(e.instance.update(),e.settings.followCursor||e.instance.enableEventListeners()):(e.instance=o(e),e.settings.followCursor&&!A.touchUser&&e.instance.disableEventListeners())}function g(e){T.refs.forEach(function(t){document.body.contains(t.popper)&&(!0!==t.settings.hideOnClick||e&&t.popper===e.popper||S.hide(t.popper,t.settings.hideDuration))})}e="default"in e?e.default:e;var b=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},w=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},A={touchUser:!1,idCounter:0},T={refs:[],els:[],poppers:[]},L={html:!1,position:"top",animation:"shift",animateFill:!0,arrow:!1,arrowSize:"regular",delay:0,hideDelay:0,trigger:"mouseenter focus",duration:375,hideDuration:375,interactive:!1,theme:"dark",size:"regular",distance:10,offset:0,hideOnClick:!0,multiple:!1,followCursor:!1,inertia:!1,transitionFlip:!0,popperOptions:{}},O=Object.keys(L),k={popper:".tippy-popper",tooltip:".tippy-tooltip",content:".tippy-tooltip-content",circle:"[x-circle]",arrow:"[x-arrow]",el:"[data-tooltipped]",controller:"[data-tippy-controller]"};document.addEventListener("click",i),document.addEventListener("touchstart",t);var x=function(){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(b(this,e),"addEventListener"in window&&!/MSIE 9/i.test(navigator.userAgent)&&!window.operamini){this.settings=E(JSON.parse(JSON.stringify(L)),i),this.callbacks={wait:i.wait,beforeShown:i.beforeShown||new Function,shown:i.shown||new Function,beforeHidden:i.beforeHidden||new Function,hidden:i.hidden||new Function};var n=t instanceof Element?[t]:[].slice.call(document.querySelectorAll(t));this._createTooltips(n)}}return w(e,[{key:"_applyIndividualSettings",value:function(e){var t=this,i={};return O.forEach(function(n){var r=e.getAttribute("data-"+n.toLowerCase())||t.settings[n];"false"===r&&(r=!1),i[n]=r}),i.arrow&&(i.animateFill=!1),E(E({},this.settings),i)}},{key:"_getEventListenerHandlers",value:function(e,t,i){var n=this,o=function(){if(clearTimeout(t.getAttribute("data-delay")),clearTimeout(t.getAttribute("data-hidedelay")),"visible"!==t.style.visibility)if(i.delay){var e=setTimeout(function(){return n.show(t,i.duration)},i.delay);t.setAttribute("data-delay",e)}else n.show(t,i.duration)},s=function(){return n.callbacks.wait?n.callbacks.wait(o):o()},a=function(){if(clearTimeout(t.getAttribute("data-hidedelay")),clearTimeout(t.getAttribute("data-delay")),i.hideDelay){var e=setTimeout(function(){return n.hide(t,i.hideDuration)},i.hideDelay);t.setAttribute("data-hidedelay",e)}else n.hide(t,i.hideDuration)};return{handleTrigger:function(e){if("click"===e.type&&"visible"===t.style.visibility&&"persistent"!==i.hideOnClick)return a();s()},handleMouseleave:function(n){if(i.interactive){var o=function n(o){r(o.target,k.popper)!==t&&r(o.target,k.el)!==e&&-1===i.trigger.indexOf("click")&&(document.removeEventListener("mousemove",n),a())};return document.addEventListener("mousemove",o)}a()},handleBlur:function(e){!A.touchUser&&e.relatedTarget&&(r(e.relatedTarget,k.popper)||a())}}}},{key:"_createTooltips",value:function(t){var i=this;t.forEach(function(e){var t=i._applyIndividualSettings(e),n=e.getAttribute("title");if(n||t.html){var r=A.idCounter;e.setAttribute("data-tooltipped",""),e.setAttribute("aria-describedby","tippy-tooltip-"+r),p(e);var o=s(r,n,t),u=i._getEventListenerHandlers(e,o,t),d=[];t.trigger.trim().split(" ").forEach(function(t){return d=d.concat(a(t,e,u))}),l({id:r,el:e,popper:o,settings:t,listeners:d}),A.idCounter++}}),e.store=T}},{key:"getPopperElement",value:function(e){try{return T.refs[T.els.indexOf(e)].popper}catch(e){throw new Error("[Tippy error]: Element does not exist in any Tippy instances")}}},{key:"getTooltippedElement",value:function(e){try{return T.refs[T.poppers.indexOf(e)].el}catch(e){throw new Error("[Tippy error]: Popper does not exist in any Tippy instances")}}},{key:"show",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.settings.duration,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=T.refs[T.poppers.indexOf(e)],o=e.querySelector(k.tooltip),s=e.querySelector(k.circle);n&&(this.callbacks.beforeShown(),i>=20&&m(r,function(){t.hide(e,0,!1),setTimeout(function(){r.hidden||t.show(e,i,!1)},0)})),document.body.contains(e)||y(r),r.settings.interactive&&r.el.classList.add("active"),r.hidden=!1,r.popper.style.visibility="visible",r.popper.setAttribute("aria-hidden","false"),c(o,s),f([o,s],function(e){e.remove("leave"),e.add("enter")}),h([o,s],i);var a=!1,l=function(){a=!0,"hidden"===e.style.visibility||r.onShownFired||(r.settings.transitionFlip||o.classList.add("tippy-notransition"),r.settings.interactive&&e.focus(),r.onShownFired=!0,n&&t.callbacks.shown())};v(r,l),clearTimeout(r.transitionendTimeout),r.transitionendTimeout=setTimeout(function(){a||l()},i)}},{key:"hide",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.settings.duration,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=T.refs[T.poppers.indexOf(e)],s=e.querySelector(k.tooltip),a=e.querySelector(k.circle);e.querySelector(k.content);r&&(this.callbacks.beforeHidden(),o.hidden=!0,o.el.classList.remove("active"),o.onShownFired=!1,o.settings.transitionFlip||s.classList.remove("tippy-notransition"),o.flipped=o.settings.position!==e.getAttribute("x-placement")),e.style.visibility="hidden",e.setAttribute("aria-hidden","true"),i===L.hideDuration?i=parseInt(s.style[n("transitionDuration")]):h([s,a],i),f([s,a],function(e){e.remove("enter"),e.add("leave")}),o.settings.html&&-1!==o.settings.trigger.indexOf("click")&&u(o.el)&&o.el.focus();var l=!1,p=function(){l=!0,"visible"!==e.style.visibility&&document.body.contains(e)&&(o.instance.disableEventListeners(),document.body.removeChild(e),r&&t.callbacks.hidden())};v(o,p),clearTimeout(o.transitionendTimeout),o.transitionendTimeout=setTimeout(function(){l||p()},i)}},{key:"destroy",value:function(e){var t=T.poppers.indexOf(e),i=T.refs[t];i.listeners.forEach(function(e){return i.el.removeEventListener(e.event,e.handler)}),i.el.removeAttribute("data-tooltipped"),i.el.removeAttribute("aria-describedby"),i.instance&&i.instance.destroy(),T.refs.splice(t,1),T.els.splice(t,1),T.poppers.splice(t,1)}},{key:"update",value:function(e){var t=T.refs[T.poppers.indexOf(e)],i=e.querySelector(k.content),n=t.settings.html;n?i.innerHTML=n instanceof Element?n.innerHTML:document.getElementById(n.replace("#","")).innerHTML:(i.innerHTML=t.el.getAttribute("title")||t.el.getAttribute("data-original-title"),p(t.el))}}]),e}(),S=new x;return x}); |
{ | ||
"name": "tippy.js", | ||
"version": "0.10.0", | ||
"version": "0.10.1", | ||
"description": "Pure JS Tooltip Library", | ||
@@ -34,4 +34,4 @@ "main": "dist/tippy.js", | ||
"dependencies": { | ||
"popper.js": "^1.8.2" | ||
"popper.js": "^1.8.5" | ||
} | ||
} |
@@ -5,3 +5,3 @@ import Popper from 'popper.js' | ||
* @file tippy.js | Pure JS Tooltip Library | ||
* @version 0.10.0 | ||
* @version 0.10.1 | ||
* @license MIT | ||
@@ -178,3 +178,3 @@ */ | ||
flip: { | ||
padding: 15, | ||
padding: parseInt(settings.distance) + 3 /* 3px from viewport boundary */, | ||
...(settings.popperOptions && settings.popperOptions.modifiers ? settings.popperOptions.modifiers.flip : {}) | ||
@@ -428,21 +428,13 @@ }, | ||
* @param {Object} ref - the element/popper reference | ||
* @param {Boolean} immediatelyFire - whether to instantly fire the callback or wait | ||
* @param {Function} callback - callback function to fire once transitions complete | ||
*/ | ||
function onTransitionEnd(ref, immediatelyFire, callback) { | ||
function onTransitionEnd(ref, callback) { | ||
const tooltip = ref.popper.querySelector(SELECTORS.tooltip) | ||
const listenerCallback = () => { | ||
if (!immediatelyFire) { | ||
tooltip.removeEventListener('webkitTransitionEnd', listenerCallback) | ||
tooltip.removeEventListener('transitionend', listenerCallback) | ||
} | ||
tooltip.removeEventListener('webkitTransitionEnd', listenerCallback) | ||
tooltip.removeEventListener('transitionend', listenerCallback) | ||
callback() | ||
} | ||
ref.transititionendListener = listenerCallback | ||
// transitionend may not fire for 0 duration, keep it safe and use ~1 frame of time | ||
if (immediatelyFire) return listenerCallback() | ||
// Wait for transitions to complete | ||
@@ -601,8 +593,2 @@ tooltip.addEventListener('webkitTransitionEnd', listenerCallback) | ||
const handleTrigger = event => { | ||
// Interactive tooltips receive a class of 'active' | ||
if (settings.interactive) { | ||
event.target.classList.add('active') | ||
} | ||
// Toggle show/hide when clicking click-triggered tooltips | ||
@@ -739,7 +725,5 @@ if ( | ||
tooltip.removeEventListener('webkitTransitionEnd', ref.transitionendListener) | ||
tooltip.removeEventListener('transitionend', ref.transitionendListener) | ||
if (enableCallback) { | ||
this.callbacks.beforeShown() | ||
// Flipping causes CSS transition to go haywire | ||
@@ -766,2 +750,7 @@ if (duration >= 20) { | ||
// Interactive tooltips receive a class of 'active' | ||
if (ref.settings.interactive) { | ||
ref.el.classList.add('active') | ||
} | ||
ref.hidden = false | ||
@@ -805,3 +794,3 @@ ref.popper.style.visibility = 'visible' | ||
onTransitionEnd(ref, duration < 20, transitionendCallback) | ||
onTransitionEnd(ref, transitionendCallback) | ||
@@ -829,5 +818,2 @@ // transitionend listener sometimes may not fire | ||
tooltip.removeEventListener('webkitTransitionEnd', ref.transitionendListener) | ||
tooltip.removeEventListener('transitionend', ref.transitionendListener) | ||
if (enableCallback) { | ||
@@ -895,3 +881,3 @@ this.callbacks.beforeHidden() | ||
onTransitionEnd(ref, duration < 20, transitionendCallback) | ||
onTransitionEnd(ref, transitionendCallback) | ||
@@ -898,0 +884,0 @@ // transitionend listener sometimes may not fire |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
201811
Updatedpopper.js@^1.8.5