Comparing version 0.14.2 to 0.15.0
@@ -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()},Ce))}}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){var t={};return e&&"[object Function]"===t.toString.call(e)}function o(e,t){if(1!==e.nodeType)return[];var n=window.getComputedStyle(e,null);return t?n[t]:n}function a(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function s(e){if(!e||-1!==["HTML","BODY","#document"].indexOf(e.nodeName))return window.document.body;var t=o(e),n=t.overflow,i=t.overflowX;return/(auto|scroll)/.test(n+t.overflowY+i)?e:s(a(e))}function p(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||e.firstElementChild.offsetParent===e)}function l(e){return null!==e.parentNode?l(e.parentNode):e}function f(e){var t=e&&e.offsetParent,n=t&&t.nodeName;return n&&"BODY"!==n&&"HTML"!==n?t:window.document.documentElement}function u(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,o=document.createRange();o.setStart(i,0),o.setEnd(r,0);var a=o.commonAncestorContainer;if(e!==a&&t!==a||i.contains(r))return p(a)?a:f(a);var s=l(e);return s.host?u(s.host,t):u(e,l(t).host)}function c(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=c(t,"top"),r=c(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 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(e,t,n,i){return Math.max(t["offset"+e],n["client"+e],n["offset"+e],Ie()?n["offset"+e]+i["margin"+("Height"===e?"Top":"Left")]+i["margin"+("Height"===e?"Bottom":"Right")]:0)}function v(){var e=window.document.body,t=window.document.documentElement,n=Ie()&&window.getComputedStyle(t);return{height:m("Height",e,t,n),width:m("Width",e,t,n)}}function g(e){return We({},e,{right:e.left+e.width,bottom:e.top+e.height})}function b(e){var t={};if(Ie())try{t=e.getBoundingClientRect();var n=c(e,"top"),i=c(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},a="HTML"===e.nodeName?v():{},s=a.width||e.clientWidth||r.right-r.left,p=a.height||e.clientHeight||r.bottom-r.top,l=e.offsetWidth-s,f=e.offsetHeight-p;if(l||f){var u=o(e);l-=h(u,"x"),f-=h(u,"y"),r.width-=l,r.height-=f}return g(r)}function w(e,t){var n=Ie(),i="HTML"===t.nodeName,r=b(e),a=b(t),p=s(e),l=g({top:r.top-a.top,left:r.left-a.left,width:r.width,height:r.height});if(i||"BODY"===t.nodeName){var f=o(t),u=n&&i?0:+f.borderTopWidth.split("px")[0],c=n&&i?0:+f.borderLeftWidth.split("px")[0],h=n&&i?0:+f.marginTop.split("px")[0],m=n&&i?0:+f.marginLeft.split("px")[0];l.top-=u-h,l.bottom-=u-h,l.left-=c-m,l.right-=c-m,l.marginTop=h,l.marginLeft=m}return(n?t.contains(p):t===p&&"BODY"!==p.nodeName)&&(l=d(l,t)),l}function y(e){var t=window.document.documentElement,n=w(e,t),i=Math.max(t.clientWidth,window.innerWidth||0),r=Math.max(t.clientHeight,window.innerHeight||0),o=c(t),a=c(t,"left");return g({top:o-n.top+n.marginTop,left:a-n.left+n.marginLeft,width:i,height:r})}function E(e){var t=e.nodeName;return"BODY"!==t&&"HTML"!==t&&("fixed"===o(e,"position")||E(a(e)))}function O(e,t,n,i){var r={top:0,left:0},o=u(e,t);if("viewport"===i)r=y(o);else{var p=void 0;"scrollParent"===i?(p=s(a(e)),"BODY"===p.nodeName&&(p=window.document.documentElement)):p="window"===i?window.document.documentElement:i;var l=w(p,o);if("HTML"!==p.nodeName||E(o))r=l;else{var f=v(),c=f.height,d=f.width;r.top+=l.top-l.marginTop,r.bottom=c+l.top,r.left+=l.left-l.marginLeft,r.right=d+l.left}}return r.left+=n,r.top+=n,r.right-=n,r.bottom-=n,r}function x(e){return e.width*e.height}function L(e,t,n,i,r){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=O(n,i,o,r),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},p=Object.keys(s).map(function(e){return We({key:e},s[e],{area:x(s[e])})}).sort(function(e,t){return t.area-e.area}),l=p.filter(function(e){var t=e.width,i=e.height;return t>=n.clientWidth&&i>=n.clientHeight}),f=l.length>0?l[0].key:p[0].key,u=e.split("-")[1];return f+(u?"-"+u:"")}function T(e,t,n){return w(n,u(t,n))}function k(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 A(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 C(e,t,n){n=n.split("-")[0];var i=k(e),r={width:i.width,height:i.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",p=o?"height":"width",l=o?"width":"height";return r[a]=t[a]+t[p]/2-i[p]/2,r[s]=n===s?t[s]-i[l]:t[A(s)],r}function M(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function S(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var i=M(e,function(e){return e[t]===n});return e.indexOf(i)}function H(e,t,n){return(void 0===n?e:e.slice(0,S(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&&r(n)&&(t=n(t,e))}),t}function D(){if(!this.state.isDestroyed){var e={instance:this,styles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=T(this.state,this.popper,this.reference),e.placement=L(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.offsets.popper=C(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position="absolute",e=H(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function I(e,t){return e.some(function(e){var n=e.name;return e.enabled&&n===t})}function B(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 F(){return this.state.isDestroyed=!0,I(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.left="",this.popper.style.position="",this.popper.style.top="",this.popper.style[B("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function N(e,t,n,i){var r="BODY"===e.nodeName,o=r?window:e;o.addEventListener(t,n,{passive:!0}),r||N(s(o.parentNode),t,n,i),i.push(o)}function W(e,t,n,i){n.updateBound=i,window.addEventListener("resize",n.updateBound,{passive:!0});var r=s(e);return N(r,"scroll",n.updateBound,n.scrollParents),n.scrollElement=r,n.eventsEnabled=!0,n}function P(){this.state.eventsEnabled||(this.state=W(this.reference,this.options,this.state,this.scheduleUpdate))}function j(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 U(){this.state.eventsEnabled&&(window.cancelAnimationFrame(this.scheduleUpdate),this.state=j(this.reference,this.state))}function q(e,t){Object.keys(t).forEach(function(n){!1!==t[n]?e.setAttribute(n,t[n]):e.removeAttribute(n)})}function R(e,t){var n={position:e.offsets.popper.position},r={"x-placement":e.placement},o=Math.round(e.offsets.popper.left),a=Math.round(e.offsets.popper.top),s=B("transform");return t.gpuAcceleration&&s?(n[s]="translate3d("+o+"px, "+a+"px, 0)",n.top=0,n.left=0,n.willChange="transform"):(n.left=o,n.top=a,n.willChange="top, left"),i(e.instance.popper,We({},n,e.styles)),q(e.instance.popper,We({},r,e.attributes)),e.offsets.arrow&&i(e.arrowElement,e.offsets.arrow),e}function Y(e,t,n,i,r){var o=T(r,t,e),a=L(n.placement,o,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),n}function z(e,t,n){var i=M(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+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return r}function _(e,t){if(!z(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=g(e.offsets.popper),o=e.offsets.reference,a=-1!==["left","right"].indexOf(i),s=a?"height":"width",p=a?"top":"left",l=a?"left":"top",f=a?"bottom":"right",u=k(n)[s];o[f]-u<r[p]&&(e.offsets.popper[p]-=r[p]-(o[f]-u)),o[p]+u>r[f]&&(e.offsets.popper[p]+=o[p]+u-r[f]);var c=o[p]+o[s]/2-u/2,d=c-g(e.offsets.popper)[p];return d=Math.max(Math.min(r[s]-u,d),0),e.arrowElement=n,e.offsets.arrow={},e.offsets.arrow[p]=Math.round(d),e.offsets.arrow[l]="",e}function K(e){return"end"===e?"start":"start"===e?"end":e}function X(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=je.indexOf(e),i=je.slice(n+1).concat(je.slice(0,n));return t?i.reverse():i}function G(e,t){if(I(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=O(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),i=e.placement.split("-")[0],r=A(i),o=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case Ue.FLIP:a=[i,r];break;case Ue.CLOCKWISE:a=X(i);break;case Ue.COUNTERCLOCKWISE:a=X(i,!0);break;default:a=t.behavior}return a.forEach(function(s,p){if(i!==s||a.length===p+1)return e;i=e.placement.split("-")[0],r=A(i);var l=g(e.offsets.popper),f=e.offsets.reference,u=Math.floor,c="left"===i&&u(l.right)>u(f.left)||"right"===i&&u(l.left)<u(f.right)||"top"===i&&u(l.bottom)>u(f.top)||"bottom"===i&&u(l.top)<u(f.bottom),d=u(l.left)<u(n.left),h=u(l.right)>u(n.right),m=u(l.top)<u(n.top),v=u(l.bottom)>u(n.bottom),b="left"===i&&d||"right"===i&&h||"top"===i&&m||"bottom"===i&&v,w=-1!==["top","bottom"].indexOf(i),y=!!t.flipVariations&&(w&&"start"===o&&d||w&&"end"===o&&h||!w&&"start"===o&&m||!w&&"end"===o&&v);(c||b||y)&&(e.flipped=!0,(c||b)&&(i=a[p+1]),y&&(o=K(o)),e.placement=i+(o?"-"+o:""),e.offsets.popper=We({},e.offsets.popper,C(e.instance.popper,e.offsets.reference,e.placement)),e=H(e.instance.modifiers,e,"flip"))}),e}function V(e){var t=g(e.offsets.popper),n=e.offsets.reference,i=e.placement.split("-")[0],r=Math.floor,o=-1!==["top","bottom"].indexOf(i),a=o?"right":"bottom",s=o?"left":"top",p=o?"width":"height";return t[a]<r(n[s])&&(e.offsets.popper[s]=r(n[s])-t[p]),t[s]>r(n[a])&&(e.offsets.popper[s]=r(n[a])),e}function J(e,t,n,i){var r=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+r[1],a=r[2];if(!o)return e;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=i}return g(s)[t]/100*o}if("vh"===a||"vw"===a){return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o}return o}function Q(e,t,i,r){var o=[0,0],a=-1!==["right","left"].indexOf(r),s=e.split(/(\+|\-)/).map(function(e){return e.trim()}),p=s.indexOf(M(s,function(e){return-1!==e.search(/,|\s/)}));s[p]&&-1===s[p].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=-1!==p?[s.slice(0,p).concat([s[p].split(/\s*,\s*|\s+/)[0]]),[s[p].split(/\s*,\s*|\s+/)[1]].concat(s.slice(p+1))]:[s];return l=l.map(function(e,n){var r=(1===n?!a:a)?"height":"width",o=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,o=!0,e):o?(e[e.length-1]+=t,o=!1,e):e.concat(t)},[]).map(function(e){return J(e,r,t,i)})}),l.forEach(function(e,t){e.forEach(function(i,r){n(i)&&(o[t]+=i*("-"===e[r-1]?-1:1))})}),o}function Z(e,t){var i=t.offset,r=e.placement,o=e.offsets,a=o.popper,s=o.reference,p=r.split("-")[0],l=void 0;return l=n(+i)?[+i,0]:Q(i,a,s,p),"left"===p?(a.top+=l[0],a.left-=l[1]):"right"===p?(a.top+=l[0],a.left+=l[1]):"top"===p?(a.left+=l[0],a.top-=l[1]):"bottom"===p&&(a.left+=l[0],a.top+=l[1]),e.popper=a,e}function $(e,t){var n=t.boundariesElement||f(e.instance.popper),i=O(e.instance.popper,e.instance.reference,t.padding,n);t.boundaries=i;var r=t.priority,o=g(e.offsets.popper),a={primary:function(e){var n=o[e];return o[e]<i[e]&&!t.escapeWithReference&&(n=Math.max(o[e],i[e])),Ne({},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))),Ne({},n,r)}};return r.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";o=We({},o,a[t](e))}),e.offsets.popper=o,e}function ee(e){var t=e.placement,n=t.split("-")[0],i=t.split("-")[1];if(i){var r=e.offsets.reference,o=g(e.offsets.popper),a=-1!==["bottom","top"].indexOf(n),s=a?"left":"top",p=a?"width":"height",l={start:Ne({},s,r[s]),end:Ne({},s,r[s]+r[p]-o[p])};e.offsets.popper=We({},o,l[i])}return e}function te(e){if(!z(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=M(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 ne(e){var t=e.placement,n=t.split("-")[0],i=g(e.offsets.popper),r=g(e.offsets.reference),o=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return i[o?"left":"top"]=r[t]-(a?i[o?"width":"height"]:0),e.placement=A(t),e.offsets.popper=g(i),e}function ie(){Ge.touchUser=!0,/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&!window.MSStream&&document.body.classList.add("tippy-touch"),document.removeEventListener("touchstart",ie)}function re(e){var t=se(e.target,Ze.el),n=se(e.target,Ze.popper);if(n){if(pe(Ve.refs,function(e){return e.popper===n}).settings.interactive)return}if(t){var i=pe(Ve.refs,function(e){return e.el===t}),r=i.popper,o=i.settings,a=o.hideOnClick,s=o.multiple,p=o.trigger;if(!0!==a||Ge.touchUser||clearTimeout(r.getAttribute("data-delay")),!s&&Ge.touchUser||!s&&-1!==p.indexOf("click"))return xe(i);if(!0!==a||-1!==p.indexOf("click"))return}!se(e.target,Ze.controller)&&document.querySelector(Ze.popper)&&xe()}function oe(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 ae(e){return e.replace(/-.+/,"")}function se(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 pe(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function le(e){var t=e.settings,n=t.position,i=t.popperOptions,r=t.offset,o=t.distance,a=e.el,s=e.popper,p=s.querySelector(Ze.tooltip),l=Ke({placement:n},i||{},{modifiers:Ke({},i?i.modifiers:{},{flip:Ke({padding:parseInt(o)+5},i&&i.modifiers?i.modifiers.flip:{}),offset:Ke({offset:parseInt(r)},i&&i.modifiers?i.modifiers.offset:{})}),onUpdate:function(){s.style[oe("transitionDuration")]="",p.style.top="",p.style.bottom="",p.style.left="",p.style.right="",p.style[ae(s.getAttribute("x-placement"))]=-(o-Je.distance)+"px"}});return new Ye(a,s,l)}function fe(e,t,n){var i=n.position,r=n.distance,o=n.arrow,a=n.animateFill,s=n.inertia,p=n.animation,l=n.arrowSize,f=n.size,u=n.theme,c=n.html,d=document.createElement("div");d.setAttribute("class","tippy-popper"),d.setAttribute("role","tooltip"),d.setAttribute("aria-hidden","true"),d.setAttribute("id","tippy-tooltip-"+e);var h=document.createElement("div");if(h.setAttribute("class","tippy-tooltip tippy-tooltip--"+f+" "+u+"-theme leave"),h.setAttribute("data-animation",p),o){var m=document.createElement("div");m.setAttribute("class","arrow-"+l),m.setAttribute("x-arrow",""),h.appendChild(m)}if(a){h.setAttribute("data-animatefill","");var v=document.createElement("div");v.setAttribute("class","leave"),v.setAttribute("x-circle",""),h.appendChild(v)}s&&h.setAttribute("data-inertia","");var g=document.createElement("div");if(g.setAttribute("class","tippy-tooltip-content"),c){var b=void 0;c instanceof Element?(g.innerHTML=c.innerHTML,b=c.id||"tippy-html-template"):(g.innerHTML=document.getElementById(c.replace("#","")).innerHTML,b=c),d.classList.add("html-template"),d.setAttribute("tabindex","0"),h.setAttribute("data-template-id",b)}else g.innerHTML=t;return h.style[ae(i)]=-(r-Je.distance)+"px",h.appendChild(g),d.appendChild(h),d}function ue(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 ce(e){Ve.refs.push(e)}function de(e){var t=e.title;e.setAttribute("data-original-title",t||"html"),e.removeAttribute("title")}function he(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 me(e){var t=this,n=pe(Ve.refs,function(e){return e.el===t}),i=n.popper,r=ae(i.getAttribute("x-placement")),o=Math.round(i.offsetWidth/2),a=Math.round(i.offsetHeight/2),s=document.documentElement.offsetWidth||document.body.offsetWidth,p=e.pageX,l=e.pageY,f=void 0,u=void 0;"top"===r?(f=p-o,u=l-2.5*a):"left"===r?(f=p-2*o-15,u=l-a):"right"===r?(f=p+a,u=l-a):"bottom"===r&&(f=p-o,u=l+a/1.5),"top"!==r&&"bottom"!==r||(p+5+o>s?f=s-5-2*o:p-5-o<0&&(f=5)),i.style[oe("transform")]="translate3d("+f+"px, "+u+"px, 0)"}function ve(e,t){t?window.getComputedStyle(t)[oe("transform")]:window.getComputedStyle(e).opacity}function ge(e,t){e.forEach(function(e){e&&t(e.classList)})}function be(e,t){var n=t;e.forEach(function(e){e&&(n=t,e.hasAttribute("x-circle")&&(n=Math.round(n/1.2)),e.style[oe("transitionDuration")]=n+"ms")})}function we(e,t,n){var i=e.popper.querySelector(Ze.tooltip),r=!1,o=function e(t){t.target===i&&(r=!0,i.removeEventListener("webkitTransitionEnd",e),i.removeEventListener("transitionend",e),n())};i.addEventListener("webkitTransitionEnd",o),i.addEventListener("transitionend",o),clearTimeout(e.transitionendTimeout),e.transitionendTimeout=setTimeout(function(){!r&&n()},t)}function ye(e,t){var n=e.style.visibility;return"show"===t?"visible"===n:"hidden"===n}function Ee(e){var t=e.el,n=(e.popper,e.settings.appendTo),i=e.settings.followCursor;n.appendChild(e.popper),e.popperInstance?(e.popperInstance.update(),!i&&e.popperInstance.enableEventListeners()):(e.popperInstance=le(e),i&&!Ge.touchUser&&(t.addEventListener("mousemove",me),e.popperInstance.disableEventListeners()))}function Oe(e){var t=e.popper,n=e.popperInstance,i=e.settings.stickyDuration,r=function(){return t.style[oe("transitionDuration")]=i+"ms"},o=function(){return t.style[oe("transitionDuration")]=""},a=function t(){n&&n.scheduleUpdate(),r();var i=!e.hidden;window.requestAnimationFrame?i?window.requestAnimationFrame(t):(window.cancelAnimationFrame(t),o()):i?setTimeout(t,20):o()};setTimeout(a,0)}function xe(e){Ve.refs.forEach(function(t){var n=t.popper,i=t.tippyInstance,r=t.settings,o=r.hideOnClick,a=r.hideDuration,s=r.trigger;if(r.appendTo.contains(n)){var p=!0===o||-1!==s.indexOf("focus"),l=!e||n!==e.popper;p&&l&&i.hide(n,a)}})}function Le(e){return e instanceof Element?[e]:[].slice.call(document.querySelectorAll(e))}for(var Te=["native code","[object MutationObserverConstructor]"],ke="undefined"!=typeof window,Ae=["Edge","Trident","Firefox"],Ce=0,Me=0;Me<Ae.length;Me+=1)if(ke&&navigator.userAgent.indexOf(Ae[Me])>=0){Ce=1;break}var Se=ke&&function(e){return Te.some(function(t){return(e||"").toString().indexOf(t)>-1})}(window.MutationObserver),He=Se?e:t,De=void 0,Ie=function(){return void 0===De&&(De=-1!==navigator.appVersion.indexOf("MSIE 10")),De},Be=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Fe=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}}(),Ne=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},We=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},Pe=["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"],je=Pe.slice(3),Ue={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},qe={shift:{order:100,enabled:!0,fn:ee},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:V},arrow:{order:500,enabled:!0,fn:_,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:G,behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:ne},hide:{order:800,enabled:!0,fn:te},applyStyle:{order:900,enabled:!0,fn:R,onLoad:Y,gpuAcceleration:!0}},Re={placement:"bottom",eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:qe},Ye=function(){function e(t,n){var o=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Be(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(o.update)},this.update=He(this.update.bind(this)),this.options=We({},e.Defaults,a),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.options.modifiers={},Object.keys(We({},e.Defaults.modifiers,a.modifiers)).forEach(function(t){o.options.modifiers[t]=We({},e.Defaults.modifiers[t]||{},a.modifiers?a.modifiers[t]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return We({name:e},o.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&r(e.onLoad)&&e.onLoad(o.reference,o.popper,o.options,e,o.state)}),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return Fe(e,[{key:"update",value:function(){return D.call(this)}},{key:"destroy",value:function(){return F.call(this)}},{key:"enableEventListeners",value:function(){return P.call(this)}},{key:"disableEventListeners",value:function(){return U.call(this)}}]),e}();Ye.Utils=("undefined"!=typeof window?window:global).PopperUtils,Ye.placements=Pe,Ye.Defaults=Re;var ze=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},_e=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}}(),Ke=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},Xe="undefined"!=typeof window&&(!("addEventListener"in window)||/MSIE 9/i.test(navigator.userAgent)||void 0!==window.operamini),Ge={touchUser:!1,idCounter:1},Ve={refs:[]},Je=!Xe&&Object.freeze({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,interactiveBorder:2,theme:"dark",size:"regular",distance:10,offset:0,hideOnClick:!0,multiple:!1,followCursor:!1,inertia:!1,transitionFlip:!0,sticky:!1,stickyDuration:200,appendTo:"undefined"!=typeof document?document.body:null,popperOptions:{}}),Qe=!Xe&&Object.keys(Je),Ze={popper:".tippy-popper",tooltip:".tippy-tooltip",content:".tippy-tooltip-content",circle:"[x-circle]",arrow:"[x-arrow]",el:"[data-tooltipped]",controller:"[data-tippy-controller]"};return"undefined"!=typeof window&&"undefined"!=typeof document&&(Xe||(document.addEventListener("click",re),document.addEventListener("touchstart",ie))),function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(ze(this,e),!Xe){this.selector=t,this.settings=Object.freeze(Ke({},Je,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=Le(t);this._createTooltips(i)}}return _e(e,[{key:"_applyIndividualSettings",value:function(e){var t=this,n={};return Qe.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),Ke({},this.settings,n)}},{key:"_getEventListenerHandlers",value:function(e,t,n){var i=this,r=(n.position,n.delay),o=n.hideDelay,a=n.hideDuration,s=n.duration,p=n.interactive,l=n.interactiveBorder,f=n.distance,u=n.hideOnClick,c=n.trigger,d=function(){clearTimeout(t.getAttribute("data-delay")),clearTimeout(t.getAttribute("data-hidedelay"))},h=function(){if(d(),"visible"!==t.style.visibility)if(r){var e=setTimeout(function(){return i.show(t,s)},r);t.setAttribute("data-delay",e)}else i.show(t,s)},m=function(e){return i.callbacks.wait?i.callbacks.wait.call(t,h,e):h()},v=function(){if(d(),o){var e=setTimeout(function(){return i.hide(t,a)},o);t.setAttribute("data-hidedelay",e)}else i.hide(t,a)};return{handleTrigger:function(e){var n="click"===e.type,i="visible"===t.style.visibility,r="persistent"!==u;n&&i&&r?v():m(e)},handleMouseleave:function(n){if(p){var i=function n(i){var r=function(){document.removeEventListener("mousemove",n),v()},o=se(i.target,Ze.el),a=se(i.target,Ze.popper)===t,s=o===e,p=-1!==c.indexOf("click");if(o&&o!==e)return r();if(!(a||s||p)&&t.getAttribute("x-placement")){var u=i.clientX,d=i.clientY,h=t.getBoundingClientRect(),m=ae(t.getAttribute("x-placement")),g=parseInt(l),b=g+parseInt(f),w=h.top-d>g,y=d-h.bottom>g,E=h.left-u>g,O=u-h.right>g;"top"===m?w=h.top-d>b:"bottom"===m?y=d-h.bottom>b:"left"===m?E=h.left-u>b:"right"===m&&(O=u-h.right>b),(w||y||E||O)&&r()}};return document.addEventListener("mousemove",i)}v()},handleBlur:function(e){!Ge.touchUser&&e.relatedTarget&&(se(e.relatedTarget,Ze.popper)||v())}}}},{key:"_createTooltips",value:function(t){var n=this;t.forEach(function(e){var t=n._applyIndividualSettings(e),i=t.html,r=t.trigger,o=e.title;if(o||i){var a=Ge.idCounter;e.setAttribute("data-tooltipped",""),e.setAttribute("aria-describedby","tippy-tooltip-"+a),de(e);var s=fe(a,o,t),p=n._getEventListenerHandlers(e,s,t),l=[];r.trim().split(" ").forEach(function(t){return l=l.concat(ue(t,e,p))}),ce({id:a,el:e,popper:s,settings:t,listeners:l,tippyInstance:n}),Ge.idCounter++}}),e.store=Ve}},{key:"getPopperElement",value:function(e){try{return pe(Ve.refs,function(t){return t.el===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(Ve.refs,function(t){return t.popper===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;this.callbacks.beforeShown.call(e);var i=pe(Ve.refs,function(t){return t.popper===e}),r=e.querySelector(Ze.tooltip),o=e.querySelector(Ze.circle),a=i.el,s=i.settings,p=s.appendTo,l=s.sticky,f=s.interactive,u=s.followCursor,c=s.transitionFlip;be([r,o],0),!p.contains(e)&&Ee(i),i.hidden=!1,e.style.visibility="visible",e.setAttribute("aria-hidden","false"),setTimeout(function(){!u&&i.popperInstance.update(),be([r,o],n),f&&a.classList.add("active"),l&&Oe(i),ve(r,o),ge([r,o],function(e){e.remove("leave"),e.add("enter")}),we(i,n,function(){ye(e,"show")&&!i.onShownFired&&(!c&&r.classList.add("tippy-notransition"),f&&e.focus(),i.onShownFired=!0,t.callbacks.shown.call(e))})},0)}},{key:"hide",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.settings.duration;this.callbacks.beforeHidden.call(e);var i=pe(Ve.refs,function(t){return t.popper===e}),r=e.querySelector(Ze.tooltip),o=e.querySelector(Ze.circle),a=(e.querySelector(Ze.content),i.el),s=i.settings,p=s.appendTo,l=(s.sticky,s.interactive),f=(s.followCursor,s.html),u=s.trigger,c=s.transitionFlip;i.hidden=!0,i.onShownFired=!1,l&&i.el.classList.remove("active"),!c&&r.classList.remove("tippy-notransition"),e.style.visibility="hidden",e.setAttribute("aria-hidden","true"),n===Je.hideDuration?n=parseInt(r.style[oe("transitionDuration")]):be([r,o],n),ge([r,o],function(e){e.remove("enter"),e.add("leave")}),f&&-1!==u.indexOf("click")&&he(a)&&a.focus(),we(i,n,function(){ye(e,"hide")&&p.contains(e)&&(i.popperInstance.disableEventListeners(),p.removeChild(e),t.callbacks.hidden.call(e))})}},{key:"destroy",value:function(e){var t=pe(Ve.refs,function(t){return t.popper===e}),n=t.el,i=t.popperInstance;t.listeners.forEach(function(e){return n.removeEventListener(e.event,e.handler)}),n.removeAttribute("data-tooltipped"),n.removeAttribute("aria-describedby"),i&&i.destroy(),Ve.refs.splice(Ve.refs.map(function(e){return e.popper}).indexOf(e),1)}},{key:"update",value:function(e){var t=pe(Ve.refs,function(t){return t.popper===e}),n=e.querySelector(Ze.content),i=t.el,r=t.settings.html;r?n.innerHTML=r instanceof Element?r.innerHTML:document.getElementById(r.replace("#","")).innerHTML:(n.innerHTML=i.title||i.getAttribute("data-original-title"),de(i))}}]),e}()}); | ||
!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()},Me))}}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){var t={};return e&&"[object Function]"===t.toString.call(e)}function o(e,t){if(1!==e.nodeType)return[];var n=window.getComputedStyle(e,null);return t?n[t]:n}function a(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function s(e){if(!e||-1!==["HTML","BODY","#document"].indexOf(e.nodeName))return window.document.body;var t=o(e),n=t.overflow,i=t.overflowX;return/(auto|scroll)/.test(n+t.overflowY+i)?e:s(a(e))}function f(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||e.firstElementChild.offsetParent===e)}function l(e){return null!==e.parentNode?l(e.parentNode):e}function p(e){var t=e&&e.offsetParent,n=t&&t.nodeName;return n&&"BODY"!==n&&"HTML"!==n?t:window.document.documentElement}function u(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,o=document.createRange();o.setStart(i,0),o.setEnd(r,0);var a=o.commonAncestorContainer;if(e!==a&&t!==a||i.contains(r))return f(a)?a:p(a);var s=l(e);return s.host?u(s.host,t):u(e,l(t).host)}function c(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=c(t,"top"),r=c(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 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(e,t,n,i){return Math.max(t["offset"+e],n["client"+e],n["offset"+e],Be()?n["offset"+e]+i["margin"+("Height"===e?"Top":"Left")]+i["margin"+("Height"===e?"Bottom":"Right")]:0)}function v(){var e=window.document.body,t=window.document.documentElement,n=Be()&&window.getComputedStyle(t);return{height:m("Height",e,t,n),width:m("Width",e,t,n)}}function g(e){return Pe({},e,{right:e.left+e.width,bottom:e.top+e.height})}function b(e){var t={};if(Be())try{t=e.getBoundingClientRect();var n=c(e,"top"),i=c(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},a="HTML"===e.nodeName?v():{},s=a.width||e.clientWidth||r.right-r.left,f=a.height||e.clientHeight||r.bottom-r.top,l=e.offsetWidth-s,p=e.offsetHeight-f;if(l||p){var u=o(e);l-=h(u,"x"),p-=h(u,"y"),r.width-=l,r.height-=p}return g(r)}function w(e,t){var n=Be(),i="HTML"===t.nodeName,r=b(e),a=b(t),f=s(e),l=g({top:r.top-a.top,left:r.left-a.left,width:r.width,height:r.height});if(i||"BODY"===t.nodeName){var p=o(t),u=n&&i?0:+p.borderTopWidth.split("px")[0],c=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];l.top-=u-h,l.bottom-=u-h,l.left-=c-m,l.right-=c-m,l.marginTop=h,l.marginLeft=m}return(n?t.contains(f):t===f&&"BODY"!==f.nodeName)&&(l=d(l,t)),l}function y(e){var t=window.document.documentElement,n=w(e,t),i=Math.max(t.clientWidth,window.innerWidth||0),r=Math.max(t.clientHeight,window.innerHeight||0),o=c(t),a=c(t,"left");return g({top:o-n.top+n.marginTop,left:a-n.left+n.marginLeft,width:i,height:r})}function E(e){var t=e.nodeName;return"BODY"!==t&&"HTML"!==t&&("fixed"===o(e,"position")||E(a(e)))}function O(e,t,n,i){var r={top:0,left:0},o=u(e,t);if("viewport"===i)r=y(o);else{var f=void 0;"scrollParent"===i?(f=s(a(e)),"BODY"===f.nodeName&&(f=window.document.documentElement)):f="window"===i?window.document.documentElement:i;var l=w(f,o);if("HTML"!==f.nodeName||E(o))r=l;else{var p=v(),c=p.height,d=p.width;r.top+=l.top-l.marginTop,r.bottom=c+l.top,r.left+=l.left-l.marginLeft,r.right=d+l.left}}return r.left+=n,r.top+=n,r.right-=n,r.bottom-=n,r}function x(e){return e.width*e.height}function L(e,t,n,i,r){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=O(n,i,o,r),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},f=Object.keys(s).map(function(e){return Pe({key:e},s[e],{area:x(s[e])})}).sort(function(e,t){return t.area-e.area}),l=f.filter(function(e){var t=e.width,i=e.height;return t>=n.clientWidth&&i>=n.clientHeight}),p=l.length>0?l[0].key:f[0].key,u=e.split("-")[1];return p+(u?"-"+u:"")}function T(e,t,n){return w(n,u(t,n))}function k(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 A(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 C(e,t,n){n=n.split("-")[0];var i=k(e),r={width:i.width,height:i.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",f=o?"height":"width",l=o?"width":"height";return r[a]=t[a]+t[f]/2-i[f]/2,r[s]=n===s?t[s]-i[l]:t[A(s)],r}function M(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function S(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var i=M(e,function(e){return e[t]===n});return e.indexOf(i)}function H(e,t,n){return(void 0===n?e:e.slice(0,S(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&&r(n)&&(t=n(t,e))}),t}function D(){if(!this.state.isDestroyed){var e={instance:this,styles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=T(this.state,this.popper,this.reference),e.placement=L(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.offsets.popper=C(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position="absolute",e=H(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function I(e,t){return e.some(function(e){var n=e.name;return e.enabled&&n===t})}function B(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 N(){return this.state.isDestroyed=!0,I(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.left="",this.popper.style.position="",this.popper.style.top="",this.popper.style[B("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function F(e,t,n,i){var r="BODY"===e.nodeName,o=r?window:e;o.addEventListener(t,n,{passive:!0}),r||F(s(o.parentNode),t,n,i),i.push(o)}function W(e,t,n,i){n.updateBound=i,window.addEventListener("resize",n.updateBound,{passive:!0});var r=s(e);return F(r,"scroll",n.updateBound,n.scrollParents),n.scrollElement=r,n.eventsEnabled=!0,n}function P(){this.state.eventsEnabled||(this.state=W(this.reference,this.options,this.state,this.scheduleUpdate))}function j(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 q(){this.state.eventsEnabled&&(window.cancelAnimationFrame(this.scheduleUpdate),this.state=j(this.reference,this.state))}function U(e,t){Object.keys(t).forEach(function(n){!1!==t[n]?e.setAttribute(n,t[n]):e.removeAttribute(n)})}function z(e,t){var n={position:e.offsets.popper.position},r={"x-placement":e.placement},o=Math.round(e.offsets.popper.left),a=Math.round(e.offsets.popper.top),s=B("transform");return t.gpuAcceleration&&s?(n[s]="translate3d("+o+"px, "+a+"px, 0)",n.top=0,n.left=0,n.willChange="transform"):(n.left=o,n.top=a,n.willChange="top, left"),i(e.instance.popper,Pe({},n,e.styles)),U(e.instance.popper,Pe({},r,e.attributes)),e.offsets.arrow&&i(e.arrowElement,e.offsets.arrow),e}function R(e,t,n,i,r){var o=T(r,t,e),a=L(n.placement,o,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),n}function Y(e,t,n){var i=M(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+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return r}function _(e,t){if(!Y(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=g(e.offsets.popper),o=e.offsets.reference,a=-1!==["left","right"].indexOf(i),s=a?"height":"width",f=a?"top":"left",l=a?"left":"top",p=a?"bottom":"right",u=k(n)[s];o[p]-u<r[f]&&(e.offsets.popper[f]-=r[f]-(o[p]-u)),o[f]+u>r[p]&&(e.offsets.popper[f]+=o[f]+u-r[p]);var c=o[f]+o[s]/2-u/2,d=c-g(e.offsets.popper)[f];return d=Math.max(Math.min(r[s]-u,d),0),e.arrowElement=n,e.offsets.arrow={},e.offsets.arrow[f]=Math.round(d),e.offsets.arrow[l]="",e}function K(e){return"end"===e?"start":"start"===e?"end":e}function X(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=qe.indexOf(e),i=qe.slice(n+1).concat(qe.slice(0,n));return t?i.reverse():i}function G(e,t){if(I(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=O(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),i=e.placement.split("-")[0],r=A(i),o=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case Ue.FLIP:a=[i,r];break;case Ue.CLOCKWISE:a=X(i);break;case Ue.COUNTERCLOCKWISE:a=X(i,!0);break;default:a=t.behavior}return a.forEach(function(s,f){if(i!==s||a.length===f+1)return e;i=e.placement.split("-")[0],r=A(i);var l=g(e.offsets.popper),p=e.offsets.reference,u=Math.floor,c="left"===i&&u(l.right)>u(p.left)||"right"===i&&u(l.left)<u(p.right)||"top"===i&&u(l.bottom)>u(p.top)||"bottom"===i&&u(l.top)<u(p.bottom),d=u(l.left)<u(n.left),h=u(l.right)>u(n.right),m=u(l.top)<u(n.top),v=u(l.bottom)>u(n.bottom),b="left"===i&&d||"right"===i&&h||"top"===i&&m||"bottom"===i&&v,w=-1!==["top","bottom"].indexOf(i),y=!!t.flipVariations&&(w&&"start"===o&&d||w&&"end"===o&&h||!w&&"start"===o&&m||!w&&"end"===o&&v);(c||b||y)&&(e.flipped=!0,(c||b)&&(i=a[f+1]),y&&(o=K(o)),e.placement=i+(o?"-"+o:""),e.offsets.popper=Pe({},e.offsets.popper,C(e.instance.popper,e.offsets.reference,e.placement)),e=H(e.instance.modifiers,e,"flip"))}),e}function V(e){var t=g(e.offsets.popper),n=e.offsets.reference,i=e.placement.split("-")[0],r=Math.floor,o=-1!==["top","bottom"].indexOf(i),a=o?"right":"bottom",s=o?"left":"top",f=o?"width":"height";return t[a]<r(n[s])&&(e.offsets.popper[s]=r(n[s])-t[f]),t[s]>r(n[a])&&(e.offsets.popper[s]=r(n[a])),e}function J(e,t,n,i){var r=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+r[1],a=r[2];if(!o)return e;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=i}return g(s)[t]/100*o}if("vh"===a||"vw"===a){return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o}return o}function Q(e,t,i,r){var o=[0,0],a=-1!==["right","left"].indexOf(r),s=e.split(/(\+|\-)/).map(function(e){return e.trim()}),f=s.indexOf(M(s,function(e){return-1!==e.search(/,|\s/)}));s[f]&&-1===s[f].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=-1!==f?[s.slice(0,f).concat([s[f].split(/\s*,\s*|\s+/)[0]]),[s[f].split(/\s*,\s*|\s+/)[1]].concat(s.slice(f+1))]:[s];return l=l.map(function(e,n){var r=(1===n?!a:a)?"height":"width",o=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,o=!0,e):o?(e[e.length-1]+=t,o=!1,e):e.concat(t)},[]).map(function(e){return J(e,r,t,i)})}),l.forEach(function(e,t){e.forEach(function(i,r){n(i)&&(o[t]+=i*("-"===e[r-1]?-1:1))})}),o}function Z(e,t){var i=t.offset,r=e.placement,o=e.offsets,a=o.popper,s=o.reference,f=r.split("-")[0],l=void 0;return l=n(+i)?[+i,0]:Q(i,a,s,f),"left"===f?(a.top+=l[0],a.left-=l[1]):"right"===f?(a.top+=l[0],a.left+=l[1]):"top"===f?(a.left+=l[0],a.top-=l[1]):"bottom"===f&&(a.left+=l[0],a.top+=l[1]),e.popper=a,e}function $(e,t){var n=t.boundariesElement||p(e.instance.popper),i=O(e.instance.popper,e.instance.reference,t.padding,n);t.boundaries=i;var r=t.priority,o=g(e.offsets.popper),a={primary:function(e){var n=o[e];return o[e]<i[e]&&!t.escapeWithReference&&(n=Math.max(o[e],i[e])),We({},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))),We({},n,r)}};return r.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";o=Pe({},o,a[t](e))}),e.offsets.popper=o,e}function ee(e){var t=e.placement,n=t.split("-")[0],i=t.split("-")[1];if(i){var r=e.offsets.reference,o=g(e.offsets.popper),a=-1!==["bottom","top"].indexOf(n),s=a?"left":"top",f=a?"width":"height",l={start:We({},s,r[s]),end:We({},s,r[s]+r[f]-o[f])};e.offsets.popper=Pe({},o,l[i])}return e}function te(e){if(!Y(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=M(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 ne(e){var t=e.placement,n=t.split("-")[0],i=g(e.offsets.popper),r=g(e.offsets.reference),o=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return i[o?"left":"top"]=r[t]-(a?i[o?"width":"height"]:0),e.placement=A(t),e.offsets.popper=g(i),e}function ie(){Ve.touchUser=!0,/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&!window.MSStream&&document.body.classList.add("tippy-touch"),document.removeEventListener("touchstart",ie)}function re(e){var t=se(e.target,$e.el),n=se(e.target,$e.popper);if(n){if(fe(Je.refs,function(e){return e.popper===n}).settings.interactive)return}if(t){var i=fe(Je.refs,function(e){return e.el===t}),r=i.popper,o=i.settings,a=o.hideOnClick,s=o.multiple,f=o.trigger;if(!0!==a||Ve.touchUser||clearTimeout(r.getAttribute("data-delay")),!s&&Ve.touchUser||!s&&-1!==f.indexOf("click"))return xe(i);if(!0!==a||-1!==f.indexOf("click"))return}!se(e.target,$e.controller)&&document.querySelector($e.popper)&&xe()}function oe(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 ae(e){return e.replace(/-.+/,"")}function se(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 fe(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function le(e){var t=e.el,n=e.popper,i=e.settings,r=i.position,o=i.popperOptions,a=i.offset,s=i.distance,f=n.querySelector($e.tooltip),l=Xe({placement:r},o||{},{modifiers:Xe({},o?o.modifiers:{},{flip:Xe({padding:s+5},o&&o.modifiers?o.modifiers.flip:{}),offset:Xe({offset:a},o&&o.modifiers?o.modifiers.offset:{})}),onUpdate:function(){f.style.top="",f.style.bottom="",f.style.left="",f.style.right="",f.style[ae(n.getAttribute("x-placement"))]=-(s-Qe.distance)+"px"}});return new Ye(t,n,l)}function pe(e,t,n){var i=n.position,r=n.distance,o=n.arrow,a=n.animateFill,s=n.inertia,f=n.animation,l=n.arrowSize,p=n.size,u=n.theme,c=n.html,d=n.zIndex,h=document.createElement("div");h.setAttribute("class","tippy-popper"),h.setAttribute("role","tooltip"),h.setAttribute("aria-hidden","true"),h.setAttribute("id","tippy-tooltip-"+e),h.style.zIndex=d;var m=document.createElement("div");if(m.setAttribute("class","tippy-tooltip tippy-tooltip--"+p+" "+u+"-theme leave"),m.setAttribute("data-animation",f),o){var v=document.createElement("div");v.setAttribute("class","arrow-"+l),v.setAttribute("x-arrow",""),m.appendChild(v)}if(a){m.setAttribute("data-animatefill","");var g=document.createElement("div");g.setAttribute("class","leave"),g.setAttribute("x-circle",""),m.appendChild(g)}s&&m.setAttribute("data-inertia","");var b=document.createElement("div");if(b.setAttribute("class","tippy-tooltip-content"),c){var w=void 0;c instanceof Element?(b.innerHTML=c.innerHTML,w=c.id||"tippy-html-template"):(b.innerHTML=document.getElementById(c.replace("#","")).innerHTML,w=c),h.classList.add("html-template"),h.setAttribute("tabindex","0"),m.setAttribute("data-template-id",w)}else b.innerHTML=t;return m.style[ae(i)]=-(r-Qe.distance)+"px",m.appendChild(b),h.appendChild(m),h}function ue(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 ce(e){Je.refs.push(e)}function de(e){var t=e.title;e.setAttribute("data-original-title",t||"html"),e.removeAttribute("title")}function he(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 me(e){var t=this,n=fe(Je.refs,function(e){return e.el===t}),i=n.popper,r=ae(i.getAttribute("x-placement")),o=Math.round(i.offsetWidth/2),a=Math.round(i.offsetHeight/2),s=document.documentElement.offsetWidth||document.body.offsetWidth,f=e.pageX,l=e.pageY,p=void 0,u=void 0;"top"===r?(p=f-o,u=l-2.5*a):"left"===r?(p=f-2*o-15,u=l-a):"right"===r?(p=f+a,u=l-a):"bottom"===r&&(p=f-o,u=l+a/1.5),"top"!==r&&"bottom"!==r||(f+5+o>s?p=s-5-2*o:f-5-o<0&&(p=5)),i.style[oe("transform")]="translate3d("+p+"px, "+u+"px, 0)"}function ve(e,t){t?window.getComputedStyle(t)[oe("transform")]:window.getComputedStyle(e).opacity}function ge(e,t){e.forEach(function(e){e&&t(e.classList)})}function be(e,t){var n=t;e.forEach(function(e){e&&(n=t,e.hasAttribute("x-circle")&&(n=Math.round(n/1.2)),e.style[oe("transitionDuration")]=n+"ms")})}function we(e,t,n){var i=e.popper.querySelector($e.tooltip),r=!1,o=function e(t){t.target===i&&(r=!0,i.removeEventListener("webkitTransitionEnd",e),i.removeEventListener("transitionend",e),n())};i.addEventListener("webkitTransitionEnd",o),i.addEventListener("transitionend",o),clearTimeout(e.transitionendTimeout),e.transitionendTimeout=setTimeout(function(){!r&&n()},t)}function ye(e,t){var n=e.style.visibility;return"show"===t?"visible"===n:"hidden"===n}function Ee(e){var t=e.el,n=(e.popper,e.settings.appendTo),i=e.settings.followCursor;n.appendChild(e.popper),e.popperInstance?(e.popperInstance.update(),!i&&e.popperInstance.enableEventListeners()):(e.popperInstance=le(e),i&&!Ve.touchUser&&(t.addEventListener("mousemove",me),e.popperInstance.disableEventListeners()))}function Oe(e){var t=e.popper,n=e.popperInstance,i=e.settings.stickyDuration,r=function(){return t.style[oe("transitionDuration")]=i+"ms"},o=function(){return t.style[oe("transitionDuration")]=""},a=function e(){n&&n.scheduleUpdate(),r();var i="visible"===t.style.visibility;window.requestAnimationFrame?i?window.requestAnimationFrame(e):o():i?setTimeout(e,20):o()};setTimeout(a,0)}function xe(e){Je.refs.forEach(function(t){var n=t.popper,i=t.tippyInstance,r=t.settings,o=r.hideOnClick,a=r.hideDuration,s=r.trigger;if(r.appendTo.contains(n)){var f=!0===o||-1!==s.indexOf("focus"),l=!e||n!==e.popper;f&&l&&i.hide(n,a)}})}function Le(e){return e instanceof Element?[e]:[].slice.call(document.querySelectorAll(e))}function Te(e,t,n){if(!t.getAttribute("x-placement"))return!1;var i=e.clientX,r=e.clientY,o=n.interactiveBorder,a=n.distance,s=t.getBoundingClientRect(),f=ae(t.getAttribute("x-placement")),l=o+a,p=s.top-r>o,u=r-s.bottom>o,c=s.left-i>o,d=i-s.right>o;return"top"===f?p=s.top-r>l:"bottom"===f?u=r-s.bottom>l:"left"===f?c=s.left-i>l:"right"===f&&(d=i-s.right>l),p||u||c||d}for(var ke=["native code","[object MutationObserverConstructor]"],Ae="undefined"!=typeof window,Ce=["Edge","Trident","Firefox"],Me=0,Se=0;Se<Ce.length;Se+=1)if(Ae&&navigator.userAgent.indexOf(Ce[Se])>=0){Me=1;break}var He=Ae&&function(e){return ke.some(function(t){return(e||"").toString().indexOf(t)>-1})}(window.MutationObserver),De=He?e:t,Ie=void 0,Be=function(){return void 0===Ie&&(Ie=-1!==navigator.appVersion.indexOf("MSIE 10")),Ie},Ne=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Fe=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}}(),We=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Pe=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},je=["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"],qe=je.slice(3),Ue={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},ze={shift:{order:100,enabled:!0,fn:ee},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:V},arrow:{order:500,enabled:!0,fn:_,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:G,behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:ne},hide:{order:800,enabled:!0,fn:te},applyStyle:{order:900,enabled:!0,fn:z,onLoad:R,gpuAcceleration:!0}},Re={placement:"bottom",eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:ze},Ye=function(){function e(t,n){var o=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Ne(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(o.update)},this.update=De(this.update.bind(this)),this.options=Pe({},e.Defaults,a),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.options.modifiers={},Object.keys(Pe({},e.Defaults.modifiers,a.modifiers)).forEach(function(t){o.options.modifiers[t]=Pe({},e.Defaults.modifiers[t]||{},a.modifiers?a.modifiers[t]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return Pe({name:e},o.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&r(e.onLoad)&&e.onLoad(o.reference,o.popper,o.options,e,o.state)}),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return Fe(e,[{key:"update",value:function(){return D.call(this)}},{key:"destroy",value:function(){return N.call(this)}},{key:"enableEventListeners",value:function(){return P.call(this)}},{key:"disableEventListeners",value:function(){return q.call(this)}}]),e}();Ye.Utils=("undefined"!=typeof window?window:global).PopperUtils,Ye.placements=je,Ye.Defaults=Re;var _e=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Ke=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}}(),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},Ge="undefined"!=typeof window&&(!("addEventListener"in window)||/MSIE 9/i.test(navigator.userAgent)||void 0!==window.operamini),Ve={touchUser:!1,idCounter:1},Je={refs:[]},Qe=!Ge&&Object.freeze({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,interactiveBorder:2,theme:"dark",size:"regular",distance:10,offset:0,hideOnClick:!0,multiple:!1,followCursor:!1,inertia:!1,flipDuration:300,sticky:!1,stickyDuration:200,appendTo:"undefined"!=typeof document?document.body:null,zIndex:9999,popperOptions:{}}),Ze=!Ge&&Object.keys(Qe),$e={popper:".tippy-popper",tooltip:".tippy-tooltip",content:".tippy-tooltip-content",circle:"[x-circle]",arrow:"[x-arrow]",el:"[data-tooltipped]",controller:"[data-tippy-controller]"};return"undefined"!=typeof window&&"undefined"!=typeof document&&(Ge||(document.addEventListener("click",re),document.addEventListener("touchstart",ie))),function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(_e(this,e),!Ge){this.selector=t,this.settings=Object.freeze(Xe({},Qe,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=Le(t);this._createTooltips(i)}}return Ke(e,[{key:"_applyIndividualSettings",value:function(e){var t=this,n={};return Ze.forEach(function(i){var r=e.getAttribute("data-"+i.toLowerCase())||t.settings[i];"false"===r?r=!1:"true"===r&&(r=!0),isNaN(parseFloat(r))||(r=parseFloat(r)),n[i]=r}),n.arrow&&(n.animateFill=!1),Xe({},this.settings,n)}},{key:"_getEventListenerHandlers",value:function(e,t,n){var i=this,r=(n.position,n.delay),o=n.hideDelay,a=n.hideDuration,s=n.duration,f=n.interactive,l=(n.interactiveBorder,n.distance,n.hideOnClick),p=n.trigger,u=function(){clearTimeout(t.getAttribute("data-delay")),clearTimeout(t.getAttribute("data-hidedelay"))},c=function(){if(u(),"visible"!==t.style.visibility)if(r){var e=setTimeout(function(){return i.show(t,s)},r);t.setAttribute("data-delay",e)}else i.show(t,s)},d=function(e){return i.callbacks.wait?i.callbacks.wait.call(t,c,e):c()},h=function(){if(u(),o){var e=setTimeout(function(){return i.hide(t,a)},o);t.setAttribute("data-hidedelay",e)}else i.hide(t,a)};return{handleTrigger:function(e){var n="click"===e.type,i="visible"===t.style.visibility,r="persistent"!==l;n&&i&&r?h():d(e)},handleMouseleave:function(i){if(f){var r=function i(r){var o=function(){document.removeEventListener("mousemove",i),h()},a=se(r.target,$e.el),s=se(r.target,$e.popper)===t,f=a===e,l=-1!==p.indexOf("click");if(a&&a!==e)return o();s||f||l||Te(r,t,n)&&o()};return document.addEventListener("mousemove",r)}h()},handleBlur:function(e){!Ve.touchUser&&e.relatedTarget&&(se(e.relatedTarget,$e.popper)||h())}}}},{key:"_createTooltips",value:function(t){var n=this;t.forEach(function(e){var t=n._applyIndividualSettings(e),i=t.html,r=t.trigger,o=e.title;if(o||i){var a=Ve.idCounter;e.setAttribute("data-tooltipped",""),e.setAttribute("aria-describedby","tippy-tooltip-"+a),de(e);var s=pe(a,o,t),f=n._getEventListenerHandlers(e,s,t),l=[];r.trim().split(" ").forEach(function(t){return l=l.concat(ue(t,e,f))}),ce({id:a,el:e,popper:s,settings:t,listeners:l,tippyInstance:n}),Ve.idCounter++}}),e.store=Je}},{key:"getPopperElement",value:function(e){try{return fe(Je.refs,function(t){return t.el===e}).popper}catch(e){throw new Error("[Tippy error]: Element does not exist in any Tippy instances")}}},{key:"getTooltippedElement",value:function(e){try{return fe(Je.refs,function(t){return t.popper===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;this.callbacks.beforeShown.call(e);var i=fe(Je.refs,function(t){return t.popper===e}),r=e.querySelector($e.tooltip),o=e.querySelector($e.circle),a=i.el,s=i.settings,f=s.appendTo,l=s.sticky,p=s.interactive,u=s.followCursor,c=s.flipDuration;be([e,r,o],0),!f.contains(e)&&Ee(i),e.style.visibility="visible",e.setAttribute("aria-hidden","false");var d=function(){ye(e,"show")&&(!u&&i.popperInstance.update(),be([r,o],n),!u&&be([e],c),p&&a.classList.add("active"),l&&Oe(i),ve(r,o),ge([r,o],function(e){e.remove("leave"),e.add("enter")}),we(i,n,function(){ye(e,"show")&&!i.onShownFired&&(p&&e.focus(),r.classList.add("tippy-notransition"),i.onShownFired=!0,t.callbacks.shown.call(e))}))};window.requestAnimationFrame?window.requestAnimationFrame(function(){setTimeout(d,0)}):setTimeout(d,0)}},{key:"hide",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.settings.duration;this.callbacks.beforeHidden.call(e);var i=fe(Je.refs,function(t){return t.popper===e}),r=e.querySelector($e.tooltip),o=e.querySelector($e.circle),a=(e.querySelector($e.content),i.el),s=i.settings,f=s.appendTo,l=(s.sticky,s.interactive),p=(s.followCursor,s.html),u=s.trigger;i.onShownFired=!1,l&&i.el.classList.remove("active"),r.classList.remove("tippy-notransition"),e.style.visibility="hidden",e.setAttribute("aria-hidden","true"),n===Qe.hideDuration?n=parseInt(r.style[oe("transitionDuration")]):be([r,o],n),ge([r,o],function(e){e.remove("enter"),e.add("leave")}),p&&-1!==u.indexOf("click")&&he(a)&&a.focus(),we(i,n,function(){ye(e,"hide")&&f.contains(e)&&(i.popperInstance.disableEventListeners(),f.removeChild(e),t.callbacks.hidden.call(e))})}},{key:"destroy",value:function(e){var t=fe(Je.refs,function(t){return t.popper===e}),n=t.el,i=t.popperInstance;t.listeners.forEach(function(e){return n.removeEventListener(e.event,e.handler)}),n.removeAttribute("data-tooltipped"),n.removeAttribute("aria-describedby"),i&&i.destroy(),Je.refs.splice(Je.refs.map(function(e){return e.popper}).indexOf(e),1)}},{key:"update",value:function(e){var t=fe(Je.refs,function(t){return t.popper===e}),n=e.querySelector($e.content),i=t.el,r=t.settings.html;r?n.innerHTML=r instanceof Element?r.innerHTML:document.getElementById(r.replace("#","")).innerHTML:(n.innerHTML=i.title||i.getAttribute("data-original-title"),de(i))}}]),e}()}); |
@@ -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(){x.touchUser=!0,/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&!window.MSStream&&document.body.classList.add("tippy-touch"),document.removeEventListener("touchstart",t)}function n(e){var t=o(e.target,O.el),n=o(e.target,O.popper);if(n){if(a(C.refs,function(e){return e.popper===n}).settings.interactive)return}if(t){var i=a(C.refs,function(e){return e.el===t}),r=i.popper,s=i.settings,l=s.hideOnClick,c=s.multiple,u=s.trigger;if(!0!==l||x.touchUser||clearTimeout(r.getAttribute("data-delay")),!c&&x.touchUser||!c&&-1!==u.indexOf("click"))return E(i);if(!0!==l||-1!==u.indexOf("click"))return}!o(e.target,O.controller)&&document.querySelector(O.popper)&&E()}function i(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 r(e){return e.replace(/-.+/,"")}function o(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 a(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function s(t){var n=t.settings,o=n.position,a=n.popperOptions,s=n.offset,l=n.distance,c=t.el,u=t.popper,p=u.querySelector(O.tooltip),d=L({placement:o},a||{},{modifiers:L({},a?a.modifiers:{},{flip:L({padding:parseInt(l)+5},a&&a.modifiers?a.modifiers.flip:{}),offset:L({offset:parseInt(s)},a&&a.modifiers?a.modifiers.offset:{})}),onUpdate:function(){u.style[i("transitionDuration")]="",p.style.top="",p.style.bottom="",p.style.left="",p.style.right="",p.style[r(u.getAttribute("x-placement"))]=-(l-I.distance)+"px"}});return new e(c,u,d)}function l(e,t,n){var i=n.position,o=n.distance,a=n.arrow,s=n.animateFill,l=n.inertia,c=n.animation,u=n.arrowSize,p=n.size,d=n.theme,f=n.html,m=document.createElement("div");m.setAttribute("class","tippy-popper"),m.setAttribute("role","tooltip"),m.setAttribute("aria-hidden","true"),m.setAttribute("id","tippy-tooltip-"+e);var h=document.createElement("div");if(h.setAttribute("class","tippy-tooltip tippy-tooltip--"+p+" "+d+"-theme leave"),h.setAttribute("data-animation",c),a){var v=document.createElement("div");v.setAttribute("class","arrow-"+u),v.setAttribute("x-arrow",""),h.appendChild(v)}if(s){h.setAttribute("data-animatefill","");var y=document.createElement("div");y.setAttribute("class","leave"),y.setAttribute("x-circle",""),h.appendChild(y)}l&&h.setAttribute("data-inertia","");var g=document.createElement("div");if(g.setAttribute("class","tippy-tooltip-content"),f){var b=void 0;f instanceof Element?(g.innerHTML=f.innerHTML,b=f.id||"tippy-html-template"):(g.innerHTML=document.getElementById(f.replace("#","")).innerHTML,b=f),m.classList.add("html-template"),m.setAttribute("tabindex","0"),h.setAttribute("data-template-id",b)}else g.innerHTML=t;return h.style[r(i)]=-(o-I.distance)+"px",h.appendChild(g),m.appendChild(h),m}function c(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 u(e){C.refs.push(e)}function p(e){var t=e.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 f(e){var t=this,n=a(C.refs,function(e){return e.el===t}),o=n.popper,s=r(o.getAttribute("x-placement")),l=Math.round(o.offsetWidth/2),c=Math.round(o.offsetHeight/2),u=document.documentElement.offsetWidth||document.body.offsetWidth,p=e.pageX,d=e.pageY,f=void 0,m=void 0;"top"===s?(f=p-l,m=d-2.5*c):"left"===s?(f=p-2*l-15,m=d-c):"right"===s?(f=p+c,m=d-c):"bottom"===s&&(f=p-l,m=d+c/1.5),"top"!==s&&"bottom"!==s||(p+5+l>u?f=u-5-2*l:p-5-l<0&&(f=5)),o.style[i("transform")]="translate3d("+f+"px, "+m+"px, 0)"}function m(e,t){t?window.getComputedStyle(t)[i("transform")]:window.getComputedStyle(e).opacity}function h(e,t){e.forEach(function(e){e&&t(e.classList)})}function v(e,t){var n=t;e.forEach(function(e){e&&(n=t,e.hasAttribute("x-circle")&&(n=Math.round(n/1.2)),e.style[i("transitionDuration")]=n+"ms")})}function y(e,t,n){var i=e.popper.querySelector(O.tooltip),r=!1,o=function e(t){t.target===i&&(r=!0,i.removeEventListener("webkitTransitionEnd",e),i.removeEventListener("transitionend",e),n())};i.addEventListener("webkitTransitionEnd",o),i.addEventListener("transitionend",o),clearTimeout(e.transitionendTimeout),e.transitionendTimeout=setTimeout(function(){!r&&n()},t)}function g(e,t){var n=e.style.visibility;return"show"===t?"visible"===n:"hidden"===n}function b(e){var t=e.el,n=(e.popper,e.settings.appendTo),i=e.settings.followCursor;n.appendChild(e.popper),e.popperInstance?(e.popperInstance.update(),!i&&e.popperInstance.enableEventListeners()):(e.popperInstance=s(e),i&&!x.touchUser&&(t.addEventListener("mousemove",f),e.popperInstance.disableEventListeners()))}function w(e){var t=e.popper,n=e.popperInstance,r=e.settings.stickyDuration,o=function(){return t.style[i("transitionDuration")]=r+"ms"},a=function(){return t.style[i("transitionDuration")]=""},s=function t(){n&&n.scheduleUpdate(),o();var i=!e.hidden;window.requestAnimationFrame?i?window.requestAnimationFrame(t):(window.cancelAnimationFrame(t),a()):i?setTimeout(t,20):a()};setTimeout(s,0)}function E(e){C.refs.forEach(function(t){var n=t.popper,i=t.tippyInstance,r=t.settings,o=r.hideOnClick,a=r.hideDuration,s=r.trigger;if(r.appendTo.contains(n)){var l=!0===o||-1!==s.indexOf("focus"),c=!e||n!==e.popper;l&&c&&i.hide(n,a)}})}function A(e){return e instanceof Element?[e]:[].slice.call(document.querySelectorAll(e))}e="default"in e?e.default:e;var T=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},k=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}}(),L=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},S="undefined"!=typeof window&&(!("addEventListener"in window)||/MSIE 9/i.test(navigator.userAgent)||void 0!==window.operamini),x={touchUser:!1,idCounter:1},C={refs:[]},I=!S&&Object.freeze({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,interactiveBorder:2,theme:"dark",size:"regular",distance:10,offset:0,hideOnClick:!0,multiple:!1,followCursor:!1,inertia:!1,transitionFlip:!0,sticky:!1,stickyDuration:200,appendTo:"undefined"!=typeof document?document.body:null,popperOptions:{}}),M=!S&&Object.keys(I),O={popper:".tippy-popper",tooltip:".tippy-tooltip",content:".tippy-tooltip-content",circle:"[x-circle]",arrow:"[x-arrow]",el:"[data-tooltipped]",controller:"[data-tippy-controller]"};return"undefined"!=typeof window&&"undefined"!=typeof document&&(S||(document.addEventListener("click",n),document.addEventListener("touchstart",t))),function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(T(this,e),!S){this.selector=t,this.settings=Object.freeze(L({},I,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=A(t);this._createTooltips(i)}}return k(e,[{key:"_applyIndividualSettings",value:function(e){var t=this,n={};return M.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),L({},this.settings,n)}},{key:"_getEventListenerHandlers",value:function(e,t,n){var i=this,a=(n.position,n.delay),s=n.hideDelay,l=n.hideDuration,c=n.duration,u=n.interactive,p=n.interactiveBorder,d=n.distance,f=n.hideOnClick,m=n.trigger,h=function(){clearTimeout(t.getAttribute("data-delay")),clearTimeout(t.getAttribute("data-hidedelay"))},v=function(){if(h(),"visible"!==t.style.visibility)if(a){var e=setTimeout(function(){return i.show(t,c)},a);t.setAttribute("data-delay",e)}else i.show(t,c)},y=function(e){return i.callbacks.wait?i.callbacks.wait.call(t,v,e):v()},g=function(){if(h(),s){var e=setTimeout(function(){return i.hide(t,l)},s);t.setAttribute("data-hidedelay",e)}else i.hide(t,l)};return{handleTrigger:function(e){var n="click"===e.type,i="visible"===t.style.visibility,r="persistent"!==f;n&&i&&r?g():y(e)},handleMouseleave:function(n){if(u){var i=function n(i){var a=function(){document.removeEventListener("mousemove",n),g()},s=o(i.target,O.el),l=o(i.target,O.popper)===t,c=s===e,u=-1!==m.indexOf("click");if(s&&s!==e)return a();if(!(l||c||u)&&t.getAttribute("x-placement")){var f=i.clientX,h=i.clientY,v=t.getBoundingClientRect(),y=r(t.getAttribute("x-placement")),b=parseInt(p),w=b+parseInt(d),E=v.top-h>b,A=h-v.bottom>b,T=v.left-f>b,k=f-v.right>b;"top"===y?E=v.top-h>w:"bottom"===y?A=h-v.bottom>w:"left"===y?T=v.left-f>w:"right"===y&&(k=f-v.right>w),(E||A||T||k)&&a()}};return document.addEventListener("mousemove",i)}g()},handleBlur:function(e){!x.touchUser&&e.relatedTarget&&(o(e.relatedTarget,O.popper)||g())}}}},{key:"_createTooltips",value:function(t){var n=this;t.forEach(function(e){var t=n._applyIndividualSettings(e),i=t.html,r=t.trigger,o=e.title;if(o||i){var a=x.idCounter;e.setAttribute("data-tooltipped",""),e.setAttribute("aria-describedby","tippy-tooltip-"+a),p(e);var s=l(a,o,t),d=n._getEventListenerHandlers(e,s,t),f=[];r.trim().split(" ").forEach(function(t){return f=f.concat(c(t,e,d))}),u({id:a,el:e,popper:s,settings:t,listeners:f,tippyInstance:n}),x.idCounter++}}),e.store=C}},{key:"getPopperElement",value:function(e){try{return a(C.refs,function(t){return t.el===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(C.refs,function(t){return t.popper===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;this.callbacks.beforeShown.call(e);var i=a(C.refs,function(t){return t.popper===e}),r=e.querySelector(O.tooltip),o=e.querySelector(O.circle),s=i.el,l=i.settings,c=l.appendTo,u=l.sticky,p=l.interactive,d=l.followCursor,f=l.transitionFlip;v([r,o],0),!c.contains(e)&&b(i),i.hidden=!1,e.style.visibility="visible",e.setAttribute("aria-hidden","false"),setTimeout(function(){!d&&i.popperInstance.update(),v([r,o],n),p&&s.classList.add("active"),u&&w(i),m(r,o),h([r,o],function(e){e.remove("leave"),e.add("enter")}),y(i,n,function(){g(e,"show")&&!i.onShownFired&&(!f&&r.classList.add("tippy-notransition"),p&&e.focus(),i.onShownFired=!0,t.callbacks.shown.call(e))})},0)}},{key:"hide",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.settings.duration;this.callbacks.beforeHidden.call(e);var r=a(C.refs,function(t){return t.popper===e}),o=e.querySelector(O.tooltip),s=e.querySelector(O.circle),l=(e.querySelector(O.content),r.el),c=r.settings,u=c.appendTo,p=(c.sticky,c.interactive),f=(c.followCursor,c.html),m=c.trigger,b=c.transitionFlip;r.hidden=!0,r.onShownFired=!1,p&&r.el.classList.remove("active"),!b&&o.classList.remove("tippy-notransition"),e.style.visibility="hidden",e.setAttribute("aria-hidden","true"),n===I.hideDuration?n=parseInt(o.style[i("transitionDuration")]):v([o,s],n),h([o,s],function(e){e.remove("enter"),e.add("leave")}),f&&-1!==m.indexOf("click")&&d(l)&&l.focus(),y(r,n,function(){g(e,"hide")&&u.contains(e)&&(r.popperInstance.disableEventListeners(),u.removeChild(e),t.callbacks.hidden.call(e))})}},{key:"destroy",value:function(e){var t=a(C.refs,function(t){return t.popper===e}),n=t.el,i=t.popperInstance;t.listeners.forEach(function(e){return n.removeEventListener(e.event,e.handler)}),n.removeAttribute("data-tooltipped"),n.removeAttribute("aria-describedby"),i&&i.destroy(),C.refs.splice(C.refs.map(function(e){return e.popper}).indexOf(e),1)}},{key:"update",value:function(e){var t=a(C.refs,function(t){return t.popper===e}),n=e.querySelector(O.content),i=t.el,r=t.settings.html;r?n.innerHTML=r instanceof Element?r.innerHTML:document.getElementById(r.replace("#","")).innerHTML:(n.innerHTML=i.title||i.getAttribute("data-original-title"),p(i))}}]),e}()}); | ||
!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(){C.touchUser=!0,/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&!window.MSStream&&document.body.classList.add("tippy-touch"),document.removeEventListener("touchstart",t)}function n(e){var t=o(e.target,H.el),n=o(e.target,H.popper);if(n){if(a(I.refs,function(e){return e.popper===n}).settings.interactive)return}if(t){var i=a(I.refs,function(e){return e.el===t}),r=i.popper,s=i.settings,l=s.hideOnClick,u=s.multiple,c=s.trigger;if(!0!==l||C.touchUser||clearTimeout(r.getAttribute("data-delay")),!u&&C.touchUser||!u&&-1!==c.indexOf("click"))return E(i);if(!0!==l||-1!==c.indexOf("click"))return}!o(e.target,H.controller)&&document.querySelector(H.popper)&&E()}function i(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 r(e){return e.replace(/-.+/,"")}function o(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 a(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function s(t){var n=t.el,i=t.popper,o=t.settings,a=o.position,s=o.popperOptions,l=o.offset,u=o.distance,c=i.querySelector(H.tooltip),p=S({placement:a},s||{},{modifiers:S({},s?s.modifiers:{},{flip:S({padding:u+5},s&&s.modifiers?s.modifiers.flip:{}),offset:S({offset:l},s&&s.modifiers?s.modifiers.offset:{})}),onUpdate:function(){c.style.top="",c.style.bottom="",c.style.left="",c.style.right="",c.style[r(i.getAttribute("x-placement"))]=-(u-M.distance)+"px"}});return new e(n,i,p)}function l(e,t,n){var i=n.position,o=n.distance,a=n.arrow,s=n.animateFill,l=n.inertia,u=n.animation,c=n.arrowSize,p=n.size,d=n.theme,f=n.html,m=n.zIndex,h=document.createElement("div");h.setAttribute("class","tippy-popper"),h.setAttribute("role","tooltip"),h.setAttribute("aria-hidden","true"),h.setAttribute("id","tippy-tooltip-"+e),h.style.zIndex=m;var v=document.createElement("div");if(v.setAttribute("class","tippy-tooltip tippy-tooltip--"+p+" "+d+"-theme leave"),v.setAttribute("data-animation",u),a){var y=document.createElement("div");y.setAttribute("class","arrow-"+c),y.setAttribute("x-arrow",""),v.appendChild(y)}if(s){v.setAttribute("data-animatefill","");var b=document.createElement("div");b.setAttribute("class","leave"),b.setAttribute("x-circle",""),v.appendChild(b)}l&&v.setAttribute("data-inertia","");var g=document.createElement("div");if(g.setAttribute("class","tippy-tooltip-content"),f){var w=void 0;f instanceof Element?(g.innerHTML=f.innerHTML,w=f.id||"tippy-html-template"):(g.innerHTML=document.getElementById(f.replace("#","")).innerHTML,w=f),h.classList.add("html-template"),h.setAttribute("tabindex","0"),v.setAttribute("data-template-id",w)}else g.innerHTML=t;return v.style[r(i)]=-(o-M.distance)+"px",v.appendChild(g),h.appendChild(v),h}function u(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 c(e){I.refs.push(e)}function p(e){var t=e.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 f(e){var t=this,n=a(I.refs,function(e){return e.el===t}),o=n.popper,s=r(o.getAttribute("x-placement")),l=Math.round(o.offsetWidth/2),u=Math.round(o.offsetHeight/2),c=document.documentElement.offsetWidth||document.body.offsetWidth,p=e.pageX,d=e.pageY,f=void 0,m=void 0;"top"===s?(f=p-l,m=d-2.5*u):"left"===s?(f=p-2*l-15,m=d-u):"right"===s?(f=p+u,m=d-u):"bottom"===s&&(f=p-l,m=d+u/1.5),"top"!==s&&"bottom"!==s||(p+5+l>c?f=c-5-2*l:p-5-l<0&&(f=5)),o.style[i("transform")]="translate3d("+f+"px, "+m+"px, 0)"}function m(e,t){t?window.getComputedStyle(t)[i("transform")]:window.getComputedStyle(e).opacity}function h(e,t){e.forEach(function(e){e&&t(e.classList)})}function v(e,t){var n=t;e.forEach(function(e){e&&(n=t,e.hasAttribute("x-circle")&&(n=Math.round(n/1.2)),e.style[i("transitionDuration")]=n+"ms")})}function y(e,t,n){var i=e.popper.querySelector(H.tooltip),r=!1,o=function e(t){t.target===i&&(r=!0,i.removeEventListener("webkitTransitionEnd",e),i.removeEventListener("transitionend",e),n())};i.addEventListener("webkitTransitionEnd",o),i.addEventListener("transitionend",o),clearTimeout(e.transitionendTimeout),e.transitionendTimeout=setTimeout(function(){!r&&n()},t)}function b(e,t){var n=e.style.visibility;return"show"===t?"visible"===n:"hidden"===n}function g(e){var t=e.el,n=(e.popper,e.settings.appendTo),i=e.settings.followCursor;n.appendChild(e.popper),e.popperInstance?(e.popperInstance.update(),!i&&e.popperInstance.enableEventListeners()):(e.popperInstance=s(e),i&&!C.touchUser&&(t.addEventListener("mousemove",f),e.popperInstance.disableEventListeners()))}function w(e){var t=e.popper,n=e.popperInstance,r=e.settings.stickyDuration,o=function(){return t.style[i("transitionDuration")]=r+"ms"},a=function(){return t.style[i("transitionDuration")]=""},s=function e(){n&&n.scheduleUpdate(),o();var i="visible"===t.style.visibility;window.requestAnimationFrame?i?window.requestAnimationFrame(e):a():i?setTimeout(e,20):a()};setTimeout(s,0)}function E(e){I.refs.forEach(function(t){var n=t.popper,i=t.tippyInstance,r=t.settings,o=r.hideOnClick,a=r.hideDuration,s=r.trigger;if(r.appendTo.contains(n)){var l=!0===o||-1!==s.indexOf("focus"),u=!e||n!==e.popper;l&&u&&i.hide(n,a)}})}function A(e){return e instanceof Element?[e]:[].slice.call(document.querySelectorAll(e))}function T(e,t,n){if(!t.getAttribute("x-placement"))return!1;var i=e.clientX,o=e.clientY,a=n.interactiveBorder,s=n.distance,l=t.getBoundingClientRect(),u=r(t.getAttribute("x-placement")),c=a+s,p=l.top-o>a,d=o-l.bottom>a,f=l.left-i>a,m=i-l.right>a;return"top"===u?p=l.top-o>c:"bottom"===u?d=o-l.bottom>c:"left"===u?f=l.left-i>c:"right"===u&&(m=i-l.right>c),p||d||f||m}e="default"in e?e.default:e;var k=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},L=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}}(),S=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},x="undefined"!=typeof window&&(!("addEventListener"in window)||/MSIE 9/i.test(navigator.userAgent)||void 0!==window.operamini),C={touchUser:!1,idCounter:1},I={refs:[]},M=!x&&Object.freeze({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,interactiveBorder:2,theme:"dark",size:"regular",distance:10,offset:0,hideOnClick:!0,multiple:!1,followCursor:!1,inertia:!1,flipDuration:300,sticky:!1,stickyDuration:200,appendTo:"undefined"!=typeof document?document.body:null,zIndex:9999,popperOptions:{}}),O=!x&&Object.keys(M),H={popper:".tippy-popper",tooltip:".tippy-tooltip",content:".tippy-tooltip-content",circle:"[x-circle]",arrow:"[x-arrow]",el:"[data-tooltipped]",controller:"[data-tippy-controller]"};return"undefined"!=typeof window&&"undefined"!=typeof document&&(x||(document.addEventListener("click",n),document.addEventListener("touchstart",t))),function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(k(this,e),!x){this.selector=t,this.settings=Object.freeze(S({},M,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=A(t);this._createTooltips(i)}}return L(e,[{key:"_applyIndividualSettings",value:function(e){var t=this,n={};return O.forEach(function(i){var r=e.getAttribute("data-"+i.toLowerCase())||t.settings[i];"false"===r?r=!1:"true"===r&&(r=!0),isNaN(parseFloat(r))||(r=parseFloat(r)),n[i]=r}),n.arrow&&(n.animateFill=!1),S({},this.settings,n)}},{key:"_getEventListenerHandlers",value:function(e,t,n){var i=this,r=(n.position,n.delay),a=n.hideDelay,s=n.hideDuration,l=n.duration,u=n.interactive,c=(n.interactiveBorder,n.distance,n.hideOnClick),p=n.trigger,d=function(){clearTimeout(t.getAttribute("data-delay")),clearTimeout(t.getAttribute("data-hidedelay"))},f=function(){if(d(),"visible"!==t.style.visibility)if(r){var e=setTimeout(function(){return i.show(t,l)},r);t.setAttribute("data-delay",e)}else i.show(t,l)},m=function(e){return i.callbacks.wait?i.callbacks.wait.call(t,f,e):f()},h=function(){if(d(),a){var e=setTimeout(function(){return i.hide(t,s)},a);t.setAttribute("data-hidedelay",e)}else i.hide(t,s)};return{handleTrigger:function(e){var n="click"===e.type,i="visible"===t.style.visibility,r="persistent"!==c;n&&i&&r?h():m(e)},handleMouseleave:function(i){if(u){var r=function i(r){var a=function(){document.removeEventListener("mousemove",i),h()},s=o(r.target,H.el),l=o(r.target,H.popper)===t,u=s===e,c=-1!==p.indexOf("click");if(s&&s!==e)return a();l||u||c||T(r,t,n)&&a()};return document.addEventListener("mousemove",r)}h()},handleBlur:function(e){!C.touchUser&&e.relatedTarget&&(o(e.relatedTarget,H.popper)||h())}}}},{key:"_createTooltips",value:function(t){var n=this;t.forEach(function(e){var t=n._applyIndividualSettings(e),i=t.html,r=t.trigger,o=e.title;if(o||i){var a=C.idCounter;e.setAttribute("data-tooltipped",""),e.setAttribute("aria-describedby","tippy-tooltip-"+a),p(e);var s=l(a,o,t),d=n._getEventListenerHandlers(e,s,t),f=[];r.trim().split(" ").forEach(function(t){return f=f.concat(u(t,e,d))}),c({id:a,el:e,popper:s,settings:t,listeners:f,tippyInstance:n}),C.idCounter++}}),e.store=I}},{key:"getPopperElement",value:function(e){try{return a(I.refs,function(t){return t.el===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(I.refs,function(t){return t.popper===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;this.callbacks.beforeShown.call(e);var i=a(I.refs,function(t){return t.popper===e}),r=e.querySelector(H.tooltip),o=e.querySelector(H.circle),s=i.el,l=i.settings,u=l.appendTo,c=l.sticky,p=l.interactive,d=l.followCursor,f=l.flipDuration;v([e,r,o],0),!u.contains(e)&&g(i),e.style.visibility="visible",e.setAttribute("aria-hidden","false");var E=function(){b(e,"show")&&(!d&&i.popperInstance.update(),v([r,o],n),!d&&v([e],f),p&&s.classList.add("active"),c&&w(i),m(r,o),h([r,o],function(e){e.remove("leave"),e.add("enter")}),y(i,n,function(){b(e,"show")&&!i.onShownFired&&(p&&e.focus(),r.classList.add("tippy-notransition"),i.onShownFired=!0,t.callbacks.shown.call(e))}))};window.requestAnimationFrame?window.requestAnimationFrame(function(){setTimeout(E,0)}):setTimeout(E,0)}},{key:"hide",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.settings.duration;this.callbacks.beforeHidden.call(e);var r=a(I.refs,function(t){return t.popper===e}),o=e.querySelector(H.tooltip),s=e.querySelector(H.circle),l=(e.querySelector(H.content),r.el),u=r.settings,c=u.appendTo,p=(u.sticky,u.interactive),f=(u.followCursor,u.html),m=u.trigger;r.onShownFired=!1,p&&r.el.classList.remove("active"),o.classList.remove("tippy-notransition"),e.style.visibility="hidden",e.setAttribute("aria-hidden","true"),n===M.hideDuration?n=parseInt(o.style[i("transitionDuration")]):v([o,s],n),h([o,s],function(e){e.remove("enter"),e.add("leave")}),f&&-1!==m.indexOf("click")&&d(l)&&l.focus(),y(r,n,function(){b(e,"hide")&&c.contains(e)&&(r.popperInstance.disableEventListeners(),c.removeChild(e),t.callbacks.hidden.call(e))})}},{key:"destroy",value:function(e){var t=a(I.refs,function(t){return t.popper===e}),n=t.el,i=t.popperInstance;t.listeners.forEach(function(e){return n.removeEventListener(e.event,e.handler)}),n.removeAttribute("data-tooltipped"),n.removeAttribute("aria-describedby"),i&&i.destroy(),I.refs.splice(I.refs.map(function(e){return e.popper}).indexOf(e),1)}},{key:"update",value:function(e){var t=a(I.refs,function(t){return t.popper===e}),n=e.querySelector(H.content),i=t.el,r=t.settings.html;r?n.innerHTML=r instanceof Element?r.innerHTML:document.getElementById(r.replace("#","")).innerHTML:(n.innerHTML=i.title||i.getAttribute("data-original-title"),p(i))}}]),e}()}); |
{ | ||
"name": "tippy.js", | ||
"version": "0.14.2", | ||
"version": "0.15.0", | ||
"description": "Pure JS Tooltip Library", | ||
@@ -5,0 +5,0 @@ "main": "dist/tippy.js", |
@@ -5,3 +5,3 @@ import Popper from 'popper.js' | ||
* @file tippy.js | Pure JS Tooltip Library | ||
* @version 0.14.2 | ||
* @version 0.15.0 | ||
* @license MIT | ||
@@ -52,6 +52,7 @@ */ | ||
inertia: false, | ||
transitionFlip: true, | ||
flipDuration: 300, | ||
sticky: false, | ||
stickyDuration: 200, | ||
appendTo: (typeof document !== 'undefined') ? document.body : null, | ||
zIndex: 9999, | ||
popperOptions: {} | ||
@@ -213,7 +214,16 @@ }) | ||
function createPopperInstance(ref) { | ||
const { settings: { position, popperOptions, offset, distance }, el, popper } = ref | ||
const { | ||
el, | ||
popper, | ||
settings: { | ||
position, | ||
popperOptions, | ||
offset, | ||
distance | ||
} | ||
} = ref | ||
const tooltip = popper.querySelector(SELECTORS.tooltip) | ||
const config = { | ||
@@ -225,7 +235,7 @@ placement: position, | ||
flip: { | ||
padding: parseInt(distance) + 5 /* 5px from viewport boundary */, | ||
padding: distance + 5 /* 5px from viewport boundary */, | ||
...(popperOptions && popperOptions.modifiers ? popperOptions.modifiers.flip : {}) | ||
}, | ||
offset: { | ||
offset: parseInt(offset), | ||
offset, | ||
...(popperOptions && popperOptions.modifiers ? popperOptions.modifiers.offset : {}) | ||
@@ -235,3 +245,2 @@ } | ||
onUpdate() { | ||
popper.style[prefix('transitionDuration')] = '' | ||
tooltip.style.top = '' | ||
@@ -267,3 +276,4 @@ tooltip.style.bottom = '' | ||
theme, | ||
html | ||
html, | ||
zIndex | ||
} = settings | ||
@@ -276,2 +286,3 @@ | ||
popper.setAttribute('id', `tippy-tooltip-${id}`) | ||
popper.style.zIndex = zIndex | ||
@@ -578,3 +589,3 @@ const tooltip = document.createElement('div') | ||
const { popper, popperInstance, settings: { stickyDuration } } = ref | ||
const applyTransitionDuration = () => | ||
@@ -585,10 +596,10 @@ popper.style[prefix('transitionDuration')] = `${stickyDuration}ms` | ||
popper.style[prefix('transitionDuration')] = '' | ||
const updatePosition = () => { | ||
popperInstance && popperInstance.scheduleUpdate() | ||
applyTransitionDuration() | ||
const isVisible = !ref.hidden | ||
const isVisible = popper.style.visibility === 'visible' | ||
if (window.requestAnimationFrame) { | ||
@@ -598,3 +609,2 @@ if (isVisible) { | ||
} else { | ||
window.cancelAnimationFrame(updatePosition) | ||
removeTransitionDuration() | ||
@@ -616,5 +626,5 @@ } | ||
function hideAllPoppers(currentRef) { | ||
STORE.refs.forEach(ref => { | ||
const { | ||
@@ -630,3 +640,3 @@ popper, | ||
} = ref | ||
// Don't hide already hidden ones | ||
@@ -638,3 +648,3 @@ if (!appendTo.contains(popper)) return | ||
const isNotCurrentRef = !currentRef || popper !== currentRef.popper | ||
if (isHideOnClick && isNotCurrentRef) { | ||
@@ -660,2 +670,39 @@ tippyInstance.hide(popper, hideDuration) | ||
/** | ||
* Determines if the mouse's cursor is outside the interactive border | ||
* @param {MouseEvent} event | ||
* @param {Element} popper | ||
* @param {Object} settings | ||
* @return {Boolean} | ||
*/ | ||
function exceedsInteractiveBorder(event, popper, settings) { | ||
if (!popper.getAttribute('x-placement')) return false | ||
const x = event.clientX | ||
const y = event.clientY | ||
const { interactiveBorder, distance } = settings | ||
const rect = popper.getBoundingClientRect() | ||
const corePosition = getCorePlacement(popper.getAttribute('x-placement')) | ||
const borderWithDistance = interactiveBorder + distance | ||
let exceedsTop = rect.top - y > interactiveBorder | ||
let exceedsBottom = y - rect.bottom > interactiveBorder | ||
let exceedsLeft = rect.left - x > interactiveBorder | ||
let exceedsRight = x - rect.right > interactiveBorder | ||
if (corePosition === 'top') { | ||
exceedsTop = rect.top - y > borderWithDistance | ||
} else if (corePosition === 'bottom') { | ||
exceedsBottom = y - rect.bottom > borderWithDistance | ||
} else if (corePosition === 'left') { | ||
exceedsLeft = rect.left - x > borderWithDistance | ||
} else if (corePosition === 'right') { | ||
exceedsRight = x - rect.right > borderWithDistance | ||
} | ||
return exceedsTop || exceedsBottom || exceedsLeft || exceedsRight | ||
} | ||
/** | ||
* The class to be exported to be used on the `window` | ||
@@ -692,3 +739,3 @@ * Private methods are prefixed with an underscore _ | ||
_applyIndividualSettings(el) { | ||
const settings = {} | ||
@@ -698,3 +745,13 @@ | ||
let val = el.getAttribute(`data-${ key.toLowerCase() }`) || this.settings[key] | ||
if (val === 'false') val = false | ||
// Convert strings to booleans | ||
if (val === 'false') { | ||
val = false | ||
} else if (val === 'true') { | ||
val = true | ||
} | ||
// Convert number strings to true numbers | ||
if (!isNaN(parseFloat(val))) { | ||
val = parseFloat(val) | ||
} | ||
@@ -705,3 +762,5 @@ settings[key] = val | ||
// animateFill is disabled if an arrow is true | ||
if (settings.arrow) settings['animateFill'] = false | ||
if (settings.arrow) { | ||
settings.animateFill = false | ||
} | ||
@@ -798,30 +857,4 @@ return Object.assign({}, this.settings, settings) | ||
if (isOverPopper || isOverEl || isClickTriggered) return | ||
// Interactive border logic | ||
if (!popper.getAttribute('x-placement')) return | ||
const x = event.clientX | ||
const y = event.clientY | ||
const rect = popper.getBoundingClientRect() | ||
const corePosition = getCorePlacement(popper.getAttribute('x-placement')) | ||
const border = parseInt(interactiveBorder) | ||
const borderWithDistance = border + parseInt(distance) | ||
let exceedsTop = rect.top - y > border | ||
let exceedsBottom = y - rect.bottom > border | ||
let exceedsLeft = rect.left - x > border | ||
let exceedsRight = x - rect.right > border | ||
if (corePosition === 'top') { | ||
exceedsTop = rect.top - y > borderWithDistance | ||
} else if (corePosition === 'bottom') { | ||
exceedsBottom = y - rect.bottom > borderWithDistance | ||
} else if (corePosition === 'left') { | ||
exceedsLeft = rect.left - x > borderWithDistance | ||
} else if (corePosition === 'right') { | ||
exceedsRight = x - rect.right > borderWithDistance | ||
} | ||
if (exceedsTop || exceedsBottom || exceedsLeft || exceedsRight) { | ||
if (exceedsInteractiveBorder(event, popper, settings)) { | ||
triggerHide() | ||
@@ -873,3 +906,2 @@ } | ||
const popper = createPopperElement(id, title, settings) | ||
const handlers = this._getEventListenerHandlers(el, popper, settings) | ||
@@ -943,3 +975,3 @@ let listeners = [] | ||
followCursor, | ||
transitionFlip | ||
flipDuration | ||
} | ||
@@ -949,12 +981,12 @@ } = ref | ||
// Remove transition duration (prevent a transition when popper changes posiiton) | ||
applyTransitionDuration([tooltip, circle], 0) | ||
applyTransitionDuration([popper, tooltip, circle], 0) | ||
!appendTo.contains(popper) && awakenPopper(ref) | ||
ref.hidden = false | ||
popper.style.visibility = 'visible' | ||
popper.setAttribute('aria-hidden', 'false') | ||
const onceUpdated = () => { | ||
if (!isExpectedState(popper, 'show')) return | ||
// Wait for popper to update position and alter x-placement | ||
setTimeout(() => { | ||
// Sometimes the arrow will not be in the correct position, | ||
@@ -966,2 +998,3 @@ // force another update | ||
applyTransitionDuration([tooltip, circle], duration) | ||
!followCursor && applyTransitionDuration([popper], flipDuration) | ||
@@ -985,4 +1018,2 @@ // Interactive tooltips receive a class of 'active' | ||
if (!isExpectedState(popper, 'show') || ref.onShownFired) return | ||
!transitionFlip && tooltip.classList.add('tippy-notransition') | ||
@@ -992,2 +1023,5 @@ // Focus interactive tooltips only | ||
// Remove transitions from tooltip | ||
tooltip.classList.add('tippy-notransition') | ||
// Prevents shown() from firing more than once from early transition cancellations | ||
@@ -998,3 +1032,12 @@ ref.onShownFired = true | ||
}) | ||
}, 0) | ||
} | ||
// Wait for popper to update position and alter x-placement | ||
if (window.requestAnimationFrame) { | ||
window.requestAnimationFrame(() => { | ||
setTimeout(onceUpdated, 0) | ||
}) | ||
} else { | ||
setTimeout(onceUpdated, 0) | ||
} | ||
} | ||
@@ -1024,12 +1067,10 @@ | ||
html, | ||
trigger, | ||
transitionFlip | ||
trigger | ||
} | ||
} = ref | ||
ref.hidden = true | ||
ref.onShownFired = false | ||
interactive && ref.el.classList.remove('active') | ||
!transitionFlip && tooltip.classList.remove('tippy-notransition') | ||
tooltip.classList.remove('tippy-notransition') | ||
@@ -1036,0 +1077,0 @@ popper.style.visibility = 'hidden' |
Sorry, the diff of this file is too big to display
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
222205
4095