Comparing version 1.3.0 to 1.4.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 t(e){Ce.forEach(function(t){var o=t.popper,i=t.tippyInstance,n=t.settings,r=n.appendTo,s=n.hideOnClick,a=n.trigger;if(r.contains(o)){var p=!0===s||-1!==a.indexOf('focus'),l=!e||o!==e.popper;p&&l&&i.hide(o)}})}function o(t,o){var i=Element.prototype.closest||function(t){for(var o=this;o;){if(e.call(o,t))return o;o=o.parentElement}};return i.call(t,o)}function n(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function r(){var i=function(){Pe.touch=!0,Pe.iOS()&&document.body.classList.add('tippy-touch'),Pe.dynamicInputDetection&&window.performance&&document.addEventListener('mousemove',r)},r=function(){var e;return function(){var t=performance.now();20>t-e&&(Pe.touch=!1,document.removeEventListener('mousemove',r),!Pe.iOS()&&document.body.classList.remove('tippy-touch')),e=t}}();document.addEventListener('click',function(e){if(!(e.target instanceof Element))return t();var i=o(e.target,De.TOOLTIPPED_EL),r=o(e.target,De.POPPER);if(r){var s=n(Ce,function(e){return e.popper===r}),a=s.settings.interactive;if(a)return}if(i){var p=n(Ce,function(e){return e.el===i}),l=p.settings,d=l.hideOnClick,c=l.multiple,f=l.trigger;if(!c&&Pe.touch||!c&&-1!==f.indexOf('click'))return t(p);if(!0!==d||-1!==f.indexOf('click'))return}o(e.target,De.CONTROLLER)||!document.querySelector(De.POPPER)||t()}),document.addEventListener('touchstart',i),window.addEventListener('blur',function(){var t=document,o=t.activeElement;o&&o.blur&&e.call(o,De.TOOLTIPPED_EL)&&o.blur()}),!Pe.SUPPORTS_TOUCH&&(0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)&&document.addEventListener('pointerdown',i)}function s(){return!s.done&&(s.done=!0,r(),!0)}function a(e){window.requestAnimationFrame(function(){setTimeout(e,0)})}function p(e){for(var t=[!1,'webkit'],o=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<t.length;n++){var i=t[n],r=i?''+i+o:e;if('undefined'!=typeof window.document.body.style[r])return r}return null}function l(e,t){return Array.prototype.findIndex?e.findIndex(t):e.indexOf(n(e,t))}function d(e){var t=e.getAttribute('title');t&&e.setAttribute('data-original-title',t),e.removeAttribute('title')}function c(e){var t=e.getBoundingClientRect();return 0<=t.top&&0<=t.left&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function f(e,t){t?window.getComputedStyle(t)[p('transform')]:window.getComputedStyle(e).opacity}function m(e,t){e.forEach(function(e){e&&t(e.classList)})}function h(e){return{tooltip:e.querySelector(De.TOOLTIP),circle:e.querySelector(De.CIRCLE),content:e.querySelector(De.CONTENT)}}function u(t,o){t.forEach(function(t){if(t){var i=e.call(t,De.CONTENT),n=i?ke(o/1.3):o;t.style[p('transitionDuration')]=n+'ms'}})}function g(e){return'visible'===e.style.visibility}function b(){}function v(e){return e.replace(/-.+/,'')}function y(t){var e,o,i=this,r=n(Ce,function(e){return e.el===i}),s=r.popper,a=r.settings.offset,l=v(s.getAttribute('x-placement')),d=ke(s.offsetWidth/2),c=ke(s.offsetHeight/2),f=5,m=document.documentElement.offsetWidth||document.body.offsetWidth,h=t.pageX,u=t.pageY;'top'===l?(e=h-d+a,o=u-2.25*c):'left'===l?(e=h-2*d-10,o=u-c+a):'right'===l?(e=h+c,o=u-c+a):'bottom'===l?(e=h-d+a,o=u+c/1.5):void 0;('top'===l||'bottom'===l)&&(h+f+d+a>m&&(e=m-f-2*d),0>h-f-d+a&&(e=f)),s.style[p('transform')]='translate3d('+e+'px, '+o+'px, 0)'}function E(e){return e instanceof Element?[e]:Array.isArray(e)?e:'NodeList'===e.constructor.name?[].slice.call(e):[].slice.call(document.querySelectorAll(e))}function w(e,t,o){if(!t)return o();var i=h(e.popper),n=i.tooltip,r=!1,s=function(t){t.target!==n||r||(r=!0,o())};n.addEventListener('webkitTransitionEnd',s),n.addEventListener('transitionend',s),clearTimeout(e._transitionendTimeout),e._transitionendTimeout=setTimeout(function(){r||o()},t)}function O(e){return e&&'[object Function]'==={}.toString.call(e)}function L(e,t){if(1!==e.nodeType)return[];var o=window.getComputedStyle(e,null);return t?o[t]:o}function T(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function x(e){if(!e||-1!==['HTML','BODY','#document'].indexOf(e.nodeName))return window.document.body;var t=L(e),o=t.overflow,i=t.overflowX,n=t.overflowY;return /(auto|scroll)/.test(o+n+i)?e:x(T(e))}function S(e){var t=e&&e.offsetParent,o=t&&t.nodeName;return o&&'BODY'!==o&&'HTML'!==o?-1!==['TD','TABLE'].indexOf(t.nodeName)&&'static'===L(t,'position')?S(t):t:window.document.documentElement}function A(e){var t=e.nodeName;return'BODY'!==t&&('HTML'===t||S(e.firstElementChild)===e)}function k(e){return null===e.parentNode?e:k(e.parentNode)}function P(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return window.document.documentElement;var o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,i=o?e:t,n=o?t:e,r=document.createRange();r.setStart(i,0),r.setEnd(n,0);var s=r.commonAncestorContainer;if(e!==s&&t!==s||i.contains(n))return A(s)?s:S(s);var a=k(e);return a.host?P(a.host,t):P(e,k(t).host)}function C(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:'top',o='top'===t?'scrollTop':'scrollLeft',i=e.nodeName;if('BODY'===i||'HTML'===i){var n=window.document.documentElement,r=window.document.scrollingElement||n;return r[o]}return e[o]}function D(e,t){var o=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=C(t,'top'),n=C(t,'left'),r=o?-1:1;return e.top+=i*r,e.bottom+=i*r,e.left+=n*r,e.right+=n*r,e}function I(e,t){var o='x'===t?'Left':'Top',i='Left'==o?'Right':'Bottom';return+e['border'+o+'Width'].split('px')[0]+ +e['border'+i+'Width'].split('px')[0]}function H(e,t,o,i,n){return Ae(t['offset'+e],n?t['scroll'+e]:0,o['client'+e],o['offset'+e],n?o['scroll'+e]:0,Ye()?o['offset'+e]+i['margin'+('Height'===e?'Top':'Left')]+i['margin'+('Height'===e?'Bottom':'Right')]:0)}function R(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:!0,t=window.document.body,o=window.document.documentElement,i=Ye()&&window.getComputedStyle(o);return{height:H('Height',t,o,i,e),width:H('Width',t,o,i,e)}}function N(e){return Xe({},e,{right:e.left+e.width,bottom:e.top+e.height})}function M(e){var t={};if(Ye())try{t=e.getBoundingClientRect();var o=C(e,'top'),i=C(e,'left');t.top+=o,t.left+=i,t.bottom+=o,t.right+=i}catch(e){}else t=e.getBoundingClientRect();var n={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},r='HTML'===e.nodeName?R():{},s=r.width||e.clientWidth||n.right-n.left,a=r.height||e.clientHeight||n.bottom-n.top,p=e.offsetWidth-s,l=e.offsetHeight-a;if(p||l){var d=L(e);p-=I(d,'x'),l-=I(d,'y'),n.width-=p,n.height-=l}return N(n)}function B(e,t){var o=Ye(),i='HTML'===t.nodeName,n=M(e),r=M(t),s=x(e),a=L(t),p=+a.borderTopWidth.split('px')[0],l=+a.borderLeftWidth.split('px')[0],d=N({top:n.top-r.top-p,left:n.left-r.left-l,width:n.width,height:n.height});if(d.marginTop=0,d.marginLeft=0,!o&&i){var c=+a.marginTop.split('px')[0],f=+a.marginLeft.split('px')[0];d.top-=p-c,d.bottom-=p-c,d.left-=l-f,d.right-=l-f,d.marginTop=c,d.marginLeft=f}return(o?t.contains(s):t===s&&'BODY'!==s.nodeName)&&(d=D(d,t)),d}function W(e){var t=window.document.documentElement,o=B(e,t),i=Ae(t.clientWidth,window.innerWidth||0),n=Ae(t.clientHeight,window.innerHeight||0),r=C(t),s=C(t,'left'),a={top:r-o.top+o.marginTop,left:s-o.left+o.marginLeft,width:i,height:n};return N(a)}function U(e){var t=e.nodeName;return'BODY'===t||'HTML'===t?!1:'fixed'===L(e,'position')||U(T(e))}function _(e,t,o,i){var n={top:0,left:0},r=P(e,t);if('viewport'===i)n=W(r);else{var s;'scrollParent'===i?(s=x(T(e)),'BODY'===s.nodeName&&(s=window.document.documentElement)):'window'===i?s=window.document.documentElement:s=i;var a=B(s,r);if('HTML'===s.nodeName&&!U(r)){var p=R(!1),l=p.height,d=p.width;n.top+=a.top-a.marginTop,n.bottom=l+a.top,n.left+=a.left-a.marginLeft,n.right=d+a.left}else n=a}return n.left+=o,n.top+=o,n.right-=o,n.bottom-=o,n}function F(e){var t=e.width,o=e.height;return t*o}function q(e,t,o,i,n){var r=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf('auto'))return e;var s=_(o,i,r,n),a={top:{width:s.width,height:t.top-s.top},right:{width:s.right-t.right,height:s.height},bottom:{width:s.width,height:s.bottom-t.bottom},left:{width:t.left-s.left,height:s.height}},p=Object.keys(a).map(function(e){return Xe({key:e},a[e],{area:F(a[e])})}).sort(function(e,t){return t.area-e.area}),l=p.filter(function(e){var t=e.width,i=e.height;return t>=o.clientWidth&&i>=o.clientHeight}),d=0<l.length?l[0].key:p[0].key,c=e.split('-')[1];return d+(c?'-'+c:'')}function z(e,t,o){var i=P(t,o);return B(o,i)}function Y(e){var t=window.getComputedStyle(e),o=parseFloat(t.marginTop)+parseFloat(t.marginBottom),i=parseFloat(t.marginLeft)+parseFloat(t.marginRight),n={width:e.offsetWidth+i,height:e.offsetHeight+o};return n}function j(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 K(e,t,o){o=o.split('-')[0];var i=Y(e),n={width:i.width,height:i.height},r=-1!==['right','left'].indexOf(o),s=r?'top':'left',a=r?'left':'top',p=r?'height':'width',l=r?'width':'height';return n[s]=t[s]+t[p]/2-i[p]/2,n[a]=o===a?t[a]-i[l]:t[j(a)],n}function G(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function X(e,t,o){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===o});var i=G(e,function(e){return e[t]===o});return e.indexOf(i)}function V(e,t,o){var i=void 0===o?e:e.slice(0,X(e,'name',o));return i.forEach(function(e){e.function&&console.warn('`modifier.function` is deprecated, use `modifier.fn`!');var o=e.function||e.fn;e.enabled&&O(o)&&(t.offsets.popper=N(t.offsets.popper),t.offsets.reference=N(t.offsets.reference),t=o(t,e))}),t}function Q(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=z(this.state,this.popper,this.reference),e.placement=q(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=K(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position='absolute',e=V(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function J(e,t){return e.some(function(e){var o=e.name,i=e.enabled;return i&&o===t})}function Z(e){for(var t=[!1,'ms','Webkit','Moz','O'],o=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<t.length-1;n++){var i=t[n],r=i?''+i+o:e;if('undefined'!=typeof window.document.body.style[r])return r}return null}function $(){return this.state.isDestroyed=!0,J(this.modifiers,'applyStyle')&&(this.popper.removeAttribute('x-placement'),this.popper.style.left='',this.popper.style.position='',this.popper.style.top='',this.popper.style[Z('transform')]=''),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function ee(e,t,o,i){var n='BODY'===e.nodeName,r=n?window:e;r.addEventListener(t,o,{passive:!0}),n||ee(x(r.parentNode),t,o,i),i.push(r)}function te(e,t,o,i){o.updateBound=i,window.addEventListener('resize',o.updateBound,{passive:!0});var n=x(e);return ee(n,'scroll',o.updateBound,o.scrollParents),o.scrollElement=n,o.eventsEnabled=!0,o}function oe(){this.state.eventsEnabled||(this.state=te(this.reference,this.options,this.state,this.scheduleUpdate))}function ie(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 ne(){this.state.eventsEnabled&&(window.cancelAnimationFrame(this.scheduleUpdate),this.state=ie(this.reference,this.state))}function re(e){return''!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function se(e,t){Object.keys(t).forEach(function(o){var i='';-1!==['width','height','top','right','bottom','left'].indexOf(o)&&re(t[o])&&(i='px'),e.style[o]=t[o]+i})}function ae(e,t){Object.keys(t).forEach(function(o){var i=t[o];!1===i?e.removeAttribute(o):e.setAttribute(o,t[o])})}function pe(e,t,o){var i=G(e,function(e){var o=e.name;return o===t}),n=!!i&&e.some(function(e){return e.name===o&&e.enabled&&e.order<i.order});if(!n){var r='`'+t+'`';console.warn('`'+o+'`'+' modifier is required by '+r+' modifier in order to work, be sure to include it before '+r+'!')}return n}function le(e){return'end'===e?'start':'start'===e?'end':e}function de(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o=Qe.indexOf(e),i=Qe.slice(o+1).concat(Qe.slice(0,o));return t?i.reverse():i}function ce(e,t,o,i){var n=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+n[1],s=n[2];if(!r)return e;if(0===s.indexOf('%')){var a;switch(s){case'%p':a=o;break;case'%':case'%r':default:a=i;}var p=N(a);return p[t]/100*r}if('vh'===s||'vw'===s){var l;return l='vh'===s?Ae(document.documentElement.clientHeight,window.innerHeight||0):Ae(document.documentElement.clientWidth,window.innerWidth||0),l/100*r}return r}function fe(e,t,o,i){var n=[0,0],r=-1!==['right','left'].indexOf(i),s=e.split(/(\+|\-)/).map(function(e){return e.trim()}),a=s.indexOf(G(s,function(e){return-1!==e.search(/,|\s/)}));s[a]&&-1===s[a].indexOf(',')&&console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');var p=/\s*,\s*|\s+/,l=-1===a?[s]:[s.slice(0,a).concat([s[a].split(p)[0]]),[s[a].split(p)[1],s.slice(a+1)]];return l=l.map(function(e,i){var n=(1===i?!r:r)?'height':'width',s=!1;return e.reduce(function(e,t){return''===e[e.length-1]&&-1!==['+','-'].indexOf(t)?(e[e.length-1]=t,s=!0,e):s?(e[e.length-1]+=t,s=!1,e):e.concat(t)},[]).map(function(e){return ce(e,n,t,o)})}),l.forEach(function(e,t){e.forEach(function(o,i){re(o)&&(n[t]+=o*('-'===e[i-1]?-1:1))})}),n}function me(e){return-(e-Ie.distance)+'px'}function he(e){var t=e.el,o=e.popper,i=e.settings,n=i.position,r=i.popperOptions,s=i.offset,l=i.distance,d=i.flipDuration,c=h(o),f=c.tooltip,m=tt({placement:n},r||{},{modifiers:tt({},r?r.modifiers:{},{flip:tt({padding:l+5},r&&r.modifiers?r.modifiers.flip:{}),offset:tt({offset:s},r&&r.modifiers?r.modifiers.offset:{})}),onUpdate:function(){var e=f.style;e.top='',e.bottom='',e.left='',e.right='',e[v(o.getAttribute('x-placement'))]=me(l)}});if(window.MutationObserver){var u=o.style,g=new MutationObserver(function(){u[p('transitionDuration')]='0ms',e.popperInstance.update(),a(function(){u[p('transitionDuration')]=d+'ms'})});g.observe(o,{childList:!0,subtree:!0,characterData:!0}),e._mutationObservers.push(g)}return new Ze(t,o,m)}function ue(e){var t=e.el,o=e.popper,i=e.settings,n=i.appendTo,r=i.followCursor;n.contains(o)||(n.appendChild(o),e.popperInstance?(e.popperInstance.update(),(!r||Pe.touch)&&e.popperInstance.enableEventListeners()):e.popperInstance=he(e),r&&!Pe.touch&&(t.addEventListener('mousemove',y),e.popperInstance.disableEventListeners()))}function ge(e){var t=e.popper,o=e.popperInstance,i=e.settings.stickyDuration,n=function(){return t.style[p('transitionDuration')]=i+'ms'},r=function(){return t.style[p('transitionDuration')]=''};a(function e(){o&&o.scheduleUpdate(),n(),g(t)?window.requestAnimationFrame(e):r()})}function be(e,t){var o=He.reduce(function(o,i){var n=e.getAttribute('data-'+i.toLowerCase())||t[i];return'false'===n&&(n=!1),'true'===n&&(n=!0),isFinite(n)&&!isNaN(parseFloat(n))&&(n=parseFloat(n)),'string'==typeof n&&'['===n.trim().charAt(0)&&(n=JSON.parse(n)),o[i]=n,o},{});return tt({},t,o)}function ye(e,t,o){var i=o.position,n=o.distance,r=o.arrow,s=o.animateFill,a=o.inertia,p=o.animation,l=o.arrowSize,d=o.size,c=o.theme,f=o.html,m=o.zIndex,h=o.interactive,u=document.createElement('div');u.setAttribute('class','tippy-popper'),u.setAttribute('role','tooltip'),u.setAttribute('aria-hidden','true'),u.setAttribute('id','tippy-tooltip-'+e),u.style.zIndex=m;var g=document.createElement('div');if(g.setAttribute('class','tippy-tooltip tippy-tooltip--'+d+' leave'),g.setAttribute('data-animation',p),c.split(' ').forEach(function(e){g.classList.add(e+'-theme')}),r){var b=document.createElement('div');b.setAttribute('class','arrow-'+l),b.setAttribute('x-arrow',''),g.appendChild(b)}if(s){g.setAttribute('data-animatefill','');var y=document.createElement('div');y.setAttribute('class','leave'),y.setAttribute('x-circle',''),g.appendChild(y)}a&&g.setAttribute('data-inertia',''),h&&g.setAttribute('data-interactive','');var E=document.createElement('div');if(E.setAttribute('class','tippy-tooltip-content'),f){var w;f instanceof Element?(E.appendChild(f),w='#'+f.id||'tippy-html-template'):(E.innerHTML=document.getElementById(f.replace('#','')).innerHTML,w=f),u.classList.add('html-template'),h&&u.setAttribute('tabindex','-1'),g.setAttribute('data-template-id',w)}else E.innerHTML=t;return g.style[v(i)]=me(n),g.appendChild(E),u.appendChild(g),u}function ve(e,t,o,i){var n=[];return'manual'===e?n:(t.addEventListener(e,o.handleTrigger),n.push({event:e,handler:o.handleTrigger}),'mouseenter'===e&&(Pe.SUPPORTS_TOUCH&&i&&(t.addEventListener('touchstart',o.handleTrigger),n.push({event:'touchstart',handler:o.handleTrigger}),t.addEventListener('touchend',o.handleMouseleave),n.push({event:'touchend',handler:o.handleMouseleave})),t.addEventListener('mouseleave',o.handleMouseleave),n.push({event:'mouseleave',handler:o.handleMouseleave})),'focus'===e&&(t.addEventListener('blur',o.handleBlur),n.push({event:'blur',handler:o.handleBlur})),n)}function Ee(e,t,o){if(!t.getAttribute('x-placement'))return!0;var i=e.clientX,n=e.clientY,r=o.interactiveBorder,s=o.distance,a=t.getBoundingClientRect(),p=v(t.getAttribute('x-placement')),l=r+s,d={top:a.top-n>r,bottom:n-a.bottom>r,left:a.left-i>r,right:i-a.right>r};return'top'===p?d.top=a.top-n>l:'bottom'===p?d.bottom=n-a.bottom>l:'left'===p?d.left=a.left-i>l:'right'===p?d.right=i-a.right>l:void 0,d.top||d.bottom||d.left||d.right}function we(e,t,i){var n,r,s=this,a=i.position,p=i.delay,l=i.duration,d=i.interactive,c=i.interactiveBorder,f=i.distance,m=i.hideOnClick,h=i.trigger,u=i.touchHold,b=i.touchWait,y=function(){clearTimeout(n),clearTimeout(r)},v=function(){if(y(),!g(t)){var e=Array.isArray(p)?p[0]:p;p?n=setTimeout(function(){return s.show(t)},e):s.show(t)}},E=function(e){return s.callbacks.wait?s.callbacks.wait.call(t,v,e):v()},w=function(){y();var e=Array.isArray(p)?p[1]:p;p?r=setTimeout(function(){return s.hide(t)},e):s.hide(t)};return{handleTrigger:function(o){var i='mouseenter'===o.type&&Pe.SUPPORTS_TOUCH&&Pe.touch;if(!(i&&u)){var n='click'===o.type;n&&g(t)&&'persistent'!==m?w():E(o),i&&Pe.iOS()&&e.click&&e.click()}},handleMouseleave:function(n){if(!('mouseleave'===n.type&&Pe.SUPPORTS_TOUCH&&Pe.touch&&u)){if(d){var r=function n(r){var s=function(){document.body.removeEventListener('mouseleave',w),document.removeEventListener('mousemove',n),w()},a=o(r.target,De.TOOLTIPPED_EL),p=o(r.target,De.POPPER)===t,l=-1!==h.indexOf('click');return a&&a!==e?s():void(p||a===e||l||Ee(r,t,i)&&s())};return document.body.addEventListener('mouseleave',w),void document.addEventListener('mousemove',r)}w()}},handleBlur:function(e){!e.relatedTarget||Pe.touch||o(e.relatedTarget,De.POPPER)||w()}}}function Oe(e){return e.arrow&&(e.animateFill=!1),e.appendTo&&'function'==typeof e.appendTo&&(e.appendTo=e.appendTo()),e}function Le(e){var t=this;return e.reduce(function(e,o){var i=ot,n=tt({},Oe(t.settings.performance?t.settings:be(o,t.settings)));'function'==typeof n.html&&(n.html=n.html(o));var r=n.html,s=n.trigger,a=n.touchHold,p=n.dynamicTitle,l=o.getAttribute('title');if(!l&&!r)return e;o.setAttribute('data-tooltipped',''),o.setAttribute('aria-describedby','tippy-tooltip-'+i),d(o);var c=ye(i,l,n),f=we.call(t,o,c,n),m=[];s.trim().split(' ').forEach(function(e){return m=m.concat(ve(e,o,f,a))});var u;if(p&&window.MutationObserver){var g=h(c),b=g.content;u=new MutationObserver(function(){var e=o.getAttribute('title');e&&(b.innerHTML=e,d(o))}),u.observe(o,{attributes:!0})}return e.push({id:i,el:o,popper:c,settings:n,listeners:m,tippyInstance:t,_mutationObservers:[u]}),ot++,e},[])}function Te(e,t){return new it(e,t)}var xe=Math.min,Se=Math.floor,Ae=Math.max,ke=Math.round,Pe={};'undefined'!=typeof window&&(Pe.SUPPORTED='requestAnimationFrame'in window,Pe.SUPPORTS_TOUCH='ontouchstart'in window,Pe.touch=!1,Pe.dynamicInputDetection=!0,Pe.iOS=function(){return /iPhone|iPad|iPod/.test(navigator.userAgent)&&!window.MSStream});var Ce=[],De={POPPER:'.tippy-popper',TOOLTIP:'.tippy-tooltip',CONTENT:'.tippy-tooltip-content',CIRCLE:'[x-circle]',ARROW:'[x-arrow]',TOOLTIPPED_EL:'[data-tooltipped]',CONTROLLER:'[data-tippy-controller]'},Ie={html:!1,position:'top',animation:'shift',animateFill:!0,arrow:!1,arrowSize:'regular',delay:0,trigger:'mouseenter focus',duration:350,interactive:!1,interactiveBorder:2,theme:'dark',size:'regular',distance:10,offset:0,hideOnClick:!0,multiple:!1,followCursor:!1,inertia:!1,flipDuration:350,sticky:!1,stickyDuration:200,appendTo:function(){return document.body},zIndex:9999,touchHold:!1,performance:!1,dynamicTitle:!1,popperOptions:{}},He=Pe.SUPPORTED&&Object.keys(Ie),Re={};if('undefined'!=typeof Element){var Ne=Element.prototype;Re=Ne.matches||Ne.matchesSelector||Ne.webkitMatchesSelector||Ne.mozMatchesSelector||Ne.msMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),o=t.length;0<=--o&&t.item(o)!==this;);return-1<o}}for(var e=Re,Me=['native code','[object MutationObserverConstructor]'],Be=function(e){return Me.some(function(t){return-1<(e||'').toString().indexOf(t)})},We='undefined'!=typeof window,Ue=['Edge','Trident','Firefox'],_e=0,Fe=0;Fe<Ue.length;Fe+=1)if(We&&0<=navigator.userAgent.indexOf(Ue[Fe])){_e=1;break}var i,qe=We&&Be(window.MutationObserver),ze=qe?function(e){var t=!1,o=0,i=document.createElement('span'),n=new MutationObserver(function(){e(),t=!1});return n.observe(i,{attributes:!0}),function(){t||(t=!0,i.setAttribute('x-index',o),++o)}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},_e))}},Ye=function(){return void 0==i&&(i=-1!==navigator.appVersion.indexOf('MSIE 10')),i},je=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 o,n=0;n<t.length;n++)o=t[n],o.enumerable=o.enumerable||!1,o.configurable=!0,'value'in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}return function(t,o,i){return o&&e(t.prototype,o),i&&e(t,i),t}}(),Ge=function(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e},Xe=Object.assign||function(e){for(var t,o=1;o<arguments.length;o++)for(var i in t=arguments[o],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ve=['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=Ve.slice(3),Je={FLIP:'flip',CLOCKWISE:'clockwise',COUNTERCLOCKWISE:'counterclockwise'},Ze=function(){function e(t,o){var i=this,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};je(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=ze(this.update.bind(this)),this.options=Xe({},e.Defaults,n),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t.jquery?t[0]:t,this.popper=o.jquery?o[0]:o,this.options.modifiers={},Object.keys(Xe({},e.Defaults.modifiers,n.modifiers)).forEach(function(t){i.options.modifiers[t]=Xe({},e.Defaults.modifiers[t]||{},n.modifiers?n.modifiers[t]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return Xe({name:e},i.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&O(e.onLoad)&&e.onLoad(i.reference,i.popper,i.options,e,i.state)}),this.update();var r=this.options.eventsEnabled;r&&this.enableEventListeners(),this.state.eventsEnabled=r}return Ke(e,[{key:'update',value:function(){return Q.call(this)}},{key:'destroy',value:function(){return $.call(this)}},{key:'enableEventListeners',value:function(){return oe.call(this)}},{key:'disableEventListeners',value:function(){return ne.call(this)}}]),e}();Ze.Utils=('undefined'==typeof window?global:window).PopperUtils,Ze.placements=Ve,Ze.Defaults={placement:'bottom',eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,o=t.split('-')[0],i=t.split('-')[1];if(i){var n=e.offsets,r=n.reference,s=n.popper,a=-1!==['bottom','top'].indexOf(o),p=a?'left':'top',l=a?'width':'height',d={start:Ge({},p,r[p]),end:Ge({},p,r[p]+r[l]-s[l])};e.offsets.popper=Xe({},s,d[i])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var o,i=t.offset,n=e.placement,r=e.offsets,s=r.popper,a=r.reference,p=n.split('-')[0];return o=re(+i)?[+i,0]:fe(i,s,a,p),'left'===p?(s.top+=o[0],s.left-=o[1]):'right'===p?(s.top+=o[0],s.left+=o[1]):'top'===p?(s.left+=o[0],s.top-=o[1]):'bottom'===p&&(s.left+=o[0],s.top+=o[1]),e.popper=s,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var o=t.boundariesElement||S(e.instance.popper);e.instance.reference===o&&(o=S(o));var i=_(e.instance.popper,e.instance.reference,t.padding,o);t.boundaries=i;var n=t.priority,r=e.offsets.popper,s={primary:function(e){var o=r[e];return r[e]<i[e]&&!t.escapeWithReference&&(o=Ae(r[e],i[e])),Ge({},e,o)},secondary:function(e){var o='right'===e?'left':'top',n=r[o];return r[e]>i[e]&&!t.escapeWithReference&&(n=xe(r[o],i[e]-('right'===e?r.width:r.height))),Ge({},o,n)}};return n.forEach(function(e){var t=-1===['left','top'].indexOf(e)?'secondary':'primary';r=Xe({},r,s[t](e))}),e.offsets.popper=r,e},priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,o=t.popper,i=t.reference,n=e.placement.split('-')[0],r=Se,s=-1!==['top','bottom'].indexOf(n),a=s?'right':'bottom',p=s?'left':'top',l=s?'width':'height';return o[a]<r(i[p])&&(e.offsets.popper[p]=r(i[p])-o[l]),o[p]>r(i[a])&&(e.offsets.popper[p]=r(i[a])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){if(!pe(e.instance.modifiers,'arrow','keepTogether'))return e;var o=t.element;if('string'==typeof o){if(o=e.instance.popper.querySelector(o),!o)return e;}else if(!e.instance.popper.contains(o))return console.warn('WARNING: `arrow.element` must be child of its popper element!'),e;var i=e.placement.split('-')[0],n=e.offsets,r=n.popper,s=n.reference,a=-1!==['left','right'].indexOf(i),p=a?'height':'width',l=a?'Top':'Left',d=l.toLowerCase(),c=a?'left':'top',f=a?'bottom':'right',m=Y(o)[p];s[f]-m<r[d]&&(e.offsets.popper[d]-=r[d]-(s[f]-m)),s[d]+m>r[f]&&(e.offsets.popper[d]+=s[d]+m-r[f]);var h=s[d]+s[p]/2-m/2,u=L(e.instance.popper,'margin'+l).replace('px',''),g=h-N(e.offsets.popper)[d]-u;return g=Ae(xe(r[p]-m,g),0),e.arrowElement=o,e.offsets.arrow={},e.offsets.arrow[d]=ke(g),e.offsets.arrow[c]='',e},element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:function(e,t){if(J(e.instance.modifiers,'inner'))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var o=_(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),i=e.placement.split('-')[0],n=j(i),r=e.placement.split('-')[1]||'',s=[];switch(t.behavior){case Je.FLIP:s=[i,n];break;case Je.CLOCKWISE:s=de(i);break;case Je.COUNTERCLOCKWISE:s=de(i,!0);break;default:s=t.behavior;}return s.forEach(function(a,p){if(i!==a||s.length===p+1)return e;i=e.placement.split('-')[0],n=j(i);var l=e.offsets.popper,d=e.offsets.reference,c=Se,f='left'===i&&c(l.right)>c(d.left)||'right'===i&&c(l.left)<c(d.right)||'top'===i&&c(l.bottom)>c(d.top)||'bottom'===i&&c(l.top)<c(d.bottom),m=c(l.left)<c(o.left),h=c(l.right)>c(o.right),u=c(l.top)<c(o.top),g=c(l.bottom)>c(o.bottom),b='left'===i&&m||'right'===i&&h||'top'===i&&u||'bottom'===i&&g,y=-1!==['top','bottom'].indexOf(i),v=!!t.flipVariations&&(y&&'start'===r&&m||y&&'end'===r&&h||!y&&'start'===r&&u||!y&&'end'===r&&g);(f||b||v)&&(e.flipped=!0,(f||b)&&(i=s[p+1]),v&&(r=le(r)),e.placement=i+(r?'-'+r:''),e.offsets.popper=Xe({},e.offsets.popper,K(e.instance.popper,e.offsets.reference,e.placement)),e=V(e.instance.modifiers,e,'flip'))}),e},behavior:'flip',padding:5,boundariesElement:'viewport'},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,o=t.split('-')[0],i=e.offsets,n=i.popper,r=i.reference,s=-1!==['left','right'].indexOf(o),a=-1===['top','left'].indexOf(o);return n[s?'left':'top']=r[o]-(a?n[s?'width':'height']:0),e.placement=j(t),e.offsets.popper=N(n),e}},hide:{order:800,enabled:!0,fn:function(e){if(!pe(e.instance.modifiers,'hide','preventOverflow'))return e;var t=e.offsets.reference,o=G(e.instance.modifiers,function(e){return'preventOverflow'===e.name}).boundaries;if(t.bottom<o.top||t.left>o.right||t.top>o.bottom||t.right<o.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}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var o=t.x,i=t.y,n=e.offsets.popper,r=G(e.instance.modifiers,function(e){return'applyStyle'===e.name}).gpuAcceleration;void 0!==r&&console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');var s,a,p=void 0===r?t.gpuAcceleration:r,l=S(e.instance.popper),d=M(l),c={position:n.position},f={left:Se(n.left),top:Se(n.top),bottom:Se(n.bottom),right:Se(n.right)},m='bottom'===o?'top':'bottom',h='right'===i?'left':'right',u=Z('transform');if(a='bottom'==m?-d.height+f.bottom:f.top,s='right'==h?-d.width+f.right:f.left,p&&u)c[u]='translate3d('+s+'px, '+a+'px, 0)',c[m]=0,c[h]=0,c.willChange='transform';else{var g='bottom'==m?-1:1,b='right'==h?-1:1;c[m]=a*g,c[h]=s*b,c.willChange=m+', '+h}var y={"x-placement":e.placement};return e.attributes=Xe({},y,e.attributes),e.styles=Xe({},c,e.styles),e.arrowStyles=Xe({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:'bottom',y:'right'},applyStyle:{order:900,enabled:!0,fn:function(e){return se(e.instance.popper,e.styles),ae(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&se(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,o,i,n){var r=z(n,t,e),s=q(o.placement,r,t,e,o.modifiers.flip.boundariesElement,o.modifiers.flip.padding);return t.setAttribute('x-placement',s),se(t,{position:'absolute'}),o},gpuAcceleration:void 0}}};var $e=function(e,t){if(!(e instanceof t))throw new TypeError('Cannot call a class as a function')},et=function(){function e(e,t){for(var o,n=0;n<t.length;n++)o=t[n],o.enumerable=o.enumerable||!1,o.configurable=!0,'value'in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}return function(t,o,i){return o&&e(t.prototype,o),i&&e(t,i),t}}(),tt=Object.assign||function(e){for(var t,o=1;o<arguments.length;o++)for(var i in t=arguments[o],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ot=1,it=function(){function e(t){var o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};$e(this,e),Pe.SUPPORTED&&(s(),this.state={destroyed:!1},this.selector=t,this.settings=tt({},Ie,o),(o.show||o.shown||o.hide||o.hidden)&&console.warn('Callbacks without the `on` prefix are deprecated (with the exception of `wait`). Use onShow, onShown, onHide, and onHidden instead.'),this.callbacks={wait:o.wait,show:o.onShow||o.show||b,shown:o.onShown||o.shown||b,hide:o.onHide||o.hide||b,hidden:o.onHidden||o.hidden||b},this.store=Le.call(this,E(t)),Ce.push.apply(Ce,this.store))}return et(e,[{key:'getPopperElement',value:function(e){try{return n(this.store,function(t){return t.el===e}).popper}catch(t){console.error('[getPopperElement]: Element passed as the argument does not exist in the instance')}}},{key:'getReferenceElement',value:function(e){try{return n(this.store,function(t){return t.popper===e}).el}catch(t){console.error('[getReferenceElement]: Popper passed as the argument does not exist in the instance')}}},{key:'getReferenceData',value:function(e){return n(this.store,function(t){return t.el===e||t.popper===e})}},{key:'show',value:function(e,t){var o=this;if(!this.state.destroyed){var i=n(this.store,function(t){return t.popper===e}),r=h(e),s=r.tooltip,p=r.circle,l=r.content;if(!document.body.contains(i.el))return void this.destroy(e);this.callbacks.show.call(e);var d=i.el,c=i.settings,b=c.appendTo,y=c.sticky,v=c.interactive,E=c.followCursor,O=c.flipDuration,L=c.duration,T=void 0===t?Array.isArray(L)?L[0]:L:t;u([e,s,p],0),ue(i),e.style.visibility='visible',e.setAttribute('aria-hidden','false'),a(function(){g(e)&&((!E||Pe.touch)&&(i.popperInstance.update(),u([e],O)),u([s,p],T),p&&(l.style.opacity=1),v&&d.classList.add('active'),y&&ge(i),f(s,p),m([s,p],function(e){e.contains('tippy-notransition')&&e.remove('tippy-notransition'),e.remove('leave'),e.add('enter')}),w(i,T,function(){!g(e)||i._onShownFired||(v&&e.focus(),s.classList.add('tippy-notransition'),i._onShownFired=!0,o.callbacks.shown.call(e))}))})}}},{key:'hide',value:function(e,t){var o=this;if(!this.state.destroyed){this.callbacks.hide.call(e);var i=n(this.store,function(t){return t.popper===e}),r=h(e),s=r.tooltip,a=r.circle,p=r.content,l=i.el,d=i.settings,f=d.appendTo,b=d.sticky,v=d.interactive,E=d.followCursor,O=d.html,L=d.trigger,T=d.duration,x=void 0===t?Array.isArray(T)?T[1]:T:t;i._onShownFired=!1,v&&l.classList.remove('active'),e.style.visibility='hidden',e.setAttribute('aria-hidden','true'),u([s,a,a?p:null],x),a&&(p.style.opacity=0),m([s,a],function(e){e.contains('tippy-tooltip')&&e.remove('tippy-notransition'),e.remove('enter'),e.add('leave')}),O&&-1!==L.indexOf('click')&&c(l)&&l.focus(),w(i,x,function(){g(e)||!f.contains(e)||'1'===getComputedStyle(s).opacity||(l.removeEventListener('mousemove',y),i.popperInstance.disableEventListeners(),f.removeChild(e),o.callbacks.hidden.call(e))})}}},{key:'update',value:function(e){if(!this.state.destroyed){var t=n(this.store,function(t){return t.popper===e}),o=h(e),i=o.content,r=t.el,s=t.settings.html;return s instanceof Element?void console.warn('Aborted: update() should not be used if `html` is a DOM element'):void(i.innerHTML=s?document.getElementById(s.replace('#','')).innerHTML:r.getAttribute('title')||r.getAttribute('data-original-title'),!s&&d(r))}}},{key:'destroy',value:function(e,t){var o=this;if(!this.state.destroyed){var i=n(this.store,function(t){return t.popper===e}),r=i.el,s=i.popperInstance,a=i.listeners,p=i._mutationObservers;g(e)&&this.hide(e,0),a.forEach(function(e){return r.removeEventListener(e.event,e.handler)}),r.setAttribute('title',r.getAttribute('data-original-title')),r.removeAttribute('data-original-title'),r.removeAttribute('data-tooltipped'),r.removeAttribute('aria-describedby'),s&&s.destroy(),p.forEach(function(e){e&&e.disconnect()}),Ce.splice(l(Ce,function(t){return t.popper===e}),1),(void 0===t||t)&&(this.store=Ce.filter(function(e){return e.tippyInstance===o}))}}},{key:'destroyAll',value:function(){var e=this;if(!this.state.destroyed){var t=this.store.length;this.store.forEach(function(o,i){var n=o.popper;e.destroy(n,i===t-1)}),this.store=null,this.state.destroyed=!0}}}]),e}();return Te.Browser=Pe,Te.Defaults=Ie,Te.disableDynamicInputDetection=function(){return Pe.dynamicInputDetection=!1},Te.enableDynamicInputDetection=function(){return Pe.dynamicInputDetection=!0},Te}); | ||
(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 t(e){De.forEach(function(t){var i=t.popper,o=t.tippyInstance,n=t.settings,r=n.appendTo,s=n.hideOnClick,a=n.trigger;if(r.contains(i)){var p=!0===s||-1!==a.indexOf('focus'),l=!e||i!==e.popper;p&&l&&o.hide(i)}})}function o(t,i){var o=Element.prototype.closest||function(t){for(var i=this;i;){if(e.call(i,t))return i;i=i.parentElement}};return o.call(t,i)}function n(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function r(){var i=function(){Pe.touch=!0,Pe.iOS()&&document.body.classList.add('tippy-touch'),Pe.dynamicInputDetection&&window.performance&&document.addEventListener('mousemove',r)},r=function(){var e;return function(){var t=performance.now();20>t-e&&(Pe.touch=!1,document.removeEventListener('mousemove',r),!Pe.iOS()&&document.body.classList.remove('tippy-touch')),e=t}}();document.addEventListener('click',function(e){if(!(e.target instanceof Element))return t();var i=o(e.target,Ie.TOOLTIPPED_EL),r=o(e.target,Ie.POPPER);if(r){var s=n(De,function(e){return e.popper===r}),a=s.settings.interactive;if(a)return}if(i){var p=n(De,function(e){return e.el===i}),l=p.settings,d=l.hideOnClick,c=l.multiple,f=l.trigger;if(!c&&Pe.touch||!c&&-1!==f.indexOf('click'))return t(p);if(!0!==d||-1!==f.indexOf('click'))return}o(e.target,Ie.CONTROLLER)||!document.querySelector(Ie.POPPER)||t()}),document.addEventListener('touchstart',i),window.addEventListener('blur',function(){var t=document,i=t.activeElement;i&&i.blur&&e.call(i,Ie.TOOLTIPPED_EL)&&i.blur()}),!Pe.SUPPORTS_TOUCH&&(0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)&&document.addEventListener('pointerdown',i)}function s(){return!s.done&&(s.done=!0,r(),!0)}function a(e){window.requestAnimationFrame(function(){setTimeout(e,0)})}function p(e){for(var t=[!1,'webkit'],o=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<t.length;n++){var i=t[n],r=i?''+i+o:e;if('undefined'!=typeof window.document.body.style[r])return r}return null}function l(e,t){return Array.prototype.findIndex?e.findIndex(t):e.indexOf(n(e,t))}function d(e){var t=e.getAttribute('title');t&&e.setAttribute('data-original-title',t),e.removeAttribute('title')}function c(e){var t=e.getBoundingClientRect();return 0<=t.top&&0<=t.left&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function f(e,t){t?window.getComputedStyle(t)[p('transform')]:window.getComputedStyle(e).opacity}function m(e,t){e.forEach(function(e){e&&t(e.classList)})}function h(e){return{tooltip:e.querySelector(Ie.TOOLTIP),circle:e.querySelector(Ie.CIRCLE),content:e.querySelector(Ie.CONTENT)}}function u(t,i){t.forEach(function(t){if(t){var o=e.call(t,Ie.CONTENT),n=o?Ce(i/1.3):i;t.style[p('transitionDuration')]=n+'ms'}})}function g(e){return'visible'===e.style.visibility}function b(){}function y(e){return!!e&&'[object Object]'===e.toString()}function v(e){return e.replace(/-.+/,'')}function E(t){var e,i,o=this,r=n(De,function(e){return e.el===o}),s=r.popper,a=r.settings.offset,l=v(s.getAttribute('x-placement')),d=Ce(s.offsetWidth/2),c=Ce(s.offsetHeight/2),f=5,m=document.documentElement.offsetWidth||document.body.offsetWidth,h=t.pageX,u=t.pageY;'top'===l?(e=h-d+a,i=u-2.25*c):'left'===l?(e=h-2*d-10,i=u-c+a):'right'===l?(e=h+c,i=u-c+a):'bottom'===l?(e=h-d+a,i=u+c/1.5):void 0;('top'===l||'bottom'===l)&&(h+f+d+a>m&&(e=m-f-2*d),0>h-f-d+a&&(e=f)),s.style[p('transform')]='translate3d('+e+'px, '+i+'px, 0)'}function w(e){if(e instanceof Element||y(e))return[e];if(e instanceof NodeList)return[].slice.call(e);if(Array.isArray(e))return e;try{return[].slice.call(document.querySelectorAll(e))}catch(e){return[]}}function O(e,t,i){if(!t)return i();var o=h(e.popper),n=o.tooltip,r=!1,s=function(t){t.target!==n||r||(r=!0,i())};n.addEventListener('webkitTransitionEnd',s),n.addEventListener('transitionend',s),clearTimeout(e._transitionendTimeout),e._transitionendTimeout=setTimeout(function(){r||i()},t)}function L(e){return e&&'[object Function]'==={}.toString.call(e)}function T(e,t){if(1!==e.nodeType)return[];var i=window.getComputedStyle(e,null);return t?i[t]:i}function x(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=T(e),i=t.overflow,o=t.overflowX,n=t.overflowY;return /(auto|scroll)/.test(i+n+o)?e:S(x(e))}function A(e){var t=e&&e.offsetParent,i=t&&t.nodeName;return i&&'BODY'!==i&&'HTML'!==i?-1!==['TD','TABLE'].indexOf(t.nodeName)&&'static'===T(t,'position')?A(t):t:window.document.documentElement}function k(e){var t=e.nodeName;return'BODY'!==t&&('HTML'===t||A(e.firstElementChild)===e)}function C(e){return null===e.parentNode?e:C(e.parentNode)}function P(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return window.document.documentElement;var i=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,o=i?e:t,n=i?t:e,r=document.createRange();r.setStart(o,0),r.setEnd(n,0);var s=r.commonAncestorContainer;if(e!==s&&t!==s||o.contains(n))return k(s)?s:A(s);var a=C(e);return a.host?P(a.host,t):P(e,C(t).host)}function D(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:'top',i='top'===t?'scrollTop':'scrollLeft',o=e.nodeName;if('BODY'===o||'HTML'===o){var n=window.document.documentElement,r=window.document.scrollingElement||n;return r[i]}return e[i]}function I(e,t){var i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],o=D(t,'top'),n=D(t,'left'),r=i?-1:1;return e.top+=o*r,e.bottom+=o*r,e.left+=n*r,e.right+=n*r,e}function H(e,t){var i='x'===t?'Left':'Top',o='Left'==i?'Right':'Bottom';return+e['border'+i+'Width'].split('px')[0]+ +e['border'+o+'Width'].split('px')[0]}function R(e,t,i,o,n){return ke(t['offset'+e],n?t['scroll'+e]:0,i['client'+e],i['offset'+e],n?i['scroll'+e]:0,je()?i['offset'+e]+o['margin'+('Height'===e?'Top':'Left')]+o['margin'+('Height'===e?'Bottom':'Right')]:0)}function N(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:!0,t=window.document.body,i=window.document.documentElement,o=je()&&window.getComputedStyle(i);return{height:R('Height',t,i,o,e),width:R('Width',t,i,o,e)}}function B(e){return Ve({},e,{right:e.left+e.width,bottom:e.top+e.height})}function M(e){var t={};if(je())try{t=e.getBoundingClientRect();var i=D(e,'top'),o=D(e,'left');t.top+=i,t.left+=o,t.bottom+=i,t.right+=o}catch(e){}else t=e.getBoundingClientRect();var n={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},r='HTML'===e.nodeName?N():{},s=r.width||e.clientWidth||n.right-n.left,a=r.height||e.clientHeight||n.bottom-n.top,p=e.offsetWidth-s,l=e.offsetHeight-a;if(p||l){var d=T(e);p-=H(d,'x'),l-=H(d,'y'),n.width-=p,n.height-=l}return B(n)}function W(e,t){var i=je(),o='HTML'===t.nodeName,n=M(e),r=M(t),s=S(e),a=T(t),p=+a.borderTopWidth.split('px')[0],l=+a.borderLeftWidth.split('px')[0],d=B({top:n.top-r.top-p,left:n.left-r.left-l,width:n.width,height:n.height});if(d.marginTop=0,d.marginLeft=0,!i&&o){var c=+a.marginTop.split('px')[0],f=+a.marginLeft.split('px')[0];d.top-=p-c,d.bottom-=p-c,d.left-=l-f,d.right-=l-f,d.marginTop=c,d.marginLeft=f}return(i?t.contains(s):t===s&&'BODY'!==s.nodeName)&&(d=I(d,t)),d}function U(e){var t=window.document.documentElement,i=W(e,t),o=ke(t.clientWidth,window.innerWidth||0),n=ke(t.clientHeight,window.innerHeight||0),r=D(t),s=D(t,'left'),a={top:r-i.top+i.marginTop,left:s-i.left+i.marginLeft,width:o,height:n};return B(a)}function _(e){var t=e.nodeName;return'BODY'===t||'HTML'===t?!1:'fixed'===T(e,'position')||_(x(e))}function F(e,t,i,o){var n={top:0,left:0},r=P(e,t);if('viewport'===o)n=U(r);else{var s;'scrollParent'===o?(s=S(x(e)),'BODY'===s.nodeName&&(s=window.document.documentElement)):'window'===o?s=window.document.documentElement:s=o;var a=W(s,r);if('HTML'===s.nodeName&&!_(r)){var p=N(!1),l=p.height,d=p.width;n.top+=a.top-a.marginTop,n.bottom=l+a.top,n.left+=a.left-a.marginLeft,n.right=d+a.left}else n=a}return n.left+=i,n.top+=i,n.right-=i,n.bottom-=i,n}function q(e){var t=e.width,i=e.height;return t*i}function Y(e,t,i,o,n){var r=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf('auto'))return e;var s=F(i,o,r,n),a={top:{width:s.width,height:t.top-s.top},right:{width:s.right-t.right,height:s.height},bottom:{width:s.width,height:s.bottom-t.bottom},left:{width:t.left-s.left,height:s.height}},p=Object.keys(a).map(function(e){return Ve({key:e},a[e],{area:q(a[e])})}).sort(function(e,t){return t.area-e.area}),l=p.filter(function(e){var t=e.width,o=e.height;return t>=i.clientWidth&&o>=i.clientHeight}),d=0<l.length?l[0].key:p[0].key,c=e.split('-')[1];return d+(c?'-'+c:'')}function z(e,t,i){var o=P(t,i);return W(i,o)}function j(e){var t=window.getComputedStyle(e),i=parseFloat(t.marginTop)+parseFloat(t.marginBottom),o=parseFloat(t.marginLeft)+parseFloat(t.marginRight),n={width:e.offsetWidth+o,height:e.offsetHeight+i};return n}function K(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 G(e,t,i){i=i.split('-')[0];var o=j(e),n={width:o.width,height:o.height},r=-1!==['right','left'].indexOf(i),s=r?'top':'left',a=r?'left':'top',p=r?'height':'width',l=r?'width':'height';return n[s]=t[s]+t[p]/2-o[p]/2,n[a]=i===a?t[a]-o[l]:t[K(a)],n}function X(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function V(e,t,i){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===i});var o=X(e,function(e){return e[t]===i});return e.indexOf(o)}function Q(e,t,i){var o=void 0===i?e:e.slice(0,V(e,'name',i));return o.forEach(function(e){e.function&&console.warn('`modifier.function` is deprecated, use `modifier.fn`!');var i=e.function||e.fn;e.enabled&&L(i)&&(t.offsets.popper=B(t.offsets.popper),t.offsets.reference=B(t.offsets.reference),t=i(t,e))}),t}function J(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=z(this.state,this.popper,this.reference),e.placement=Y(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=G(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position='absolute',e=Q(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function Z(e,t){return e.some(function(e){var i=e.name,o=e.enabled;return o&&i===t})}function $(e){for(var t=[!1,'ms','Webkit','Moz','O'],o=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<t.length-1;n++){var i=t[n],r=i?''+i+o:e;if('undefined'!=typeof window.document.body.style[r])return r}return null}function ee(){return this.state.isDestroyed=!0,Z(this.modifiers,'applyStyle')&&(this.popper.removeAttribute('x-placement'),this.popper.style.left='',this.popper.style.position='',this.popper.style.top='',this.popper.style[$('transform')]=''),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function te(e,t,i,o){var n='BODY'===e.nodeName,r=n?window:e;r.addEventListener(t,i,{passive:!0}),n||te(S(r.parentNode),t,i,o),o.push(r)}function ie(e,t,i,o){i.updateBound=o,window.addEventListener('resize',i.updateBound,{passive:!0});var n=S(e);return te(n,'scroll',i.updateBound,i.scrollParents),i.scrollElement=n,i.eventsEnabled=!0,i}function oe(){this.state.eventsEnabled||(this.state=ie(this.reference,this.options,this.state,this.scheduleUpdate))}function ne(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 re(){this.state.eventsEnabled&&(window.cancelAnimationFrame(this.scheduleUpdate),this.state=ne(this.reference,this.state))}function se(e){return''!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function ae(e,t){Object.keys(t).forEach(function(i){var o='';-1!==['width','height','top','right','bottom','left'].indexOf(i)&&se(t[i])&&(o='px'),e.style[i]=t[i]+o})}function pe(e,t){Object.keys(t).forEach(function(i){var o=t[i];!1===o?e.removeAttribute(i):e.setAttribute(i,t[i])})}function le(e,t,i){var o=X(e,function(e){var i=e.name;return i===t}),n=!!o&&e.some(function(e){return e.name===i&&e.enabled&&e.order<o.order});if(!n){var r='`'+t+'`';console.warn('`'+i+'`'+' modifier is required by '+r+' modifier in order to work, be sure to include it before '+r+'!')}return n}function de(e){return'end'===e?'start':'start'===e?'end':e}function ce(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],i=Je.indexOf(e),o=Je.slice(i+1).concat(Je.slice(0,i));return t?o.reverse():o}function fe(e,t,i,o){var n=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+n[1],s=n[2];if(!r)return e;if(0===s.indexOf('%')){var a;switch(s){case'%p':a=i;break;case'%':case'%r':default:a=o;}var p=B(a);return p[t]/100*r}if('vh'===s||'vw'===s){var l;return l='vh'===s?ke(document.documentElement.clientHeight,window.innerHeight||0):ke(document.documentElement.clientWidth,window.innerWidth||0),l/100*r}return r}function me(e,t,i,o){var n=[0,0],r=-1!==['right','left'].indexOf(o),s=e.split(/(\+|\-)/).map(function(e){return e.trim()}),a=s.indexOf(X(s,function(e){return-1!==e.search(/,|\s/)}));s[a]&&-1===s[a].indexOf(',')&&console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');var p=/\s*,\s*|\s+/,l=-1===a?[s]:[s.slice(0,a).concat([s[a].split(p)[0]]),[s[a].split(p)[1],s.slice(a+1)]];return l=l.map(function(e,o){var n=(1===o?!r:r)?'height':'width',s=!1;return e.reduce(function(e,t){return''===e[e.length-1]&&-1!==['+','-'].indexOf(t)?(e[e.length-1]=t,s=!0,e):s?(e[e.length-1]+=t,s=!1,e):e.concat(t)},[]).map(function(e){return fe(e,n,t,i)})}),l.forEach(function(e,t){e.forEach(function(i,o){se(i)&&(n[t]+=i*('-'===e[o-1]?-1:1))})}),n}function he(e){return-(e-He.distance)+'px'}function ue(e){var t=e.el,i=e.popper,o=e.settings,n=o.position,r=o.popperOptions,s=o.offset,l=o.distance,d=o.flipDuration,c=h(i),f=c.tooltip,m=it({placement:n},r||{},{modifiers:it({},r?r.modifiers:{},{flip:it({padding:l+5},r&&r.modifiers?r.modifiers.flip:{}),offset:it({offset:s},r&&r.modifiers?r.modifiers.offset:{})}),onUpdate:function(){var e=f.style;e.top='',e.bottom='',e.left='',e.right='',e[v(i.getAttribute('x-placement'))]=he(l)}});if(window.MutationObserver){var u=i.style,g=new MutationObserver(function(){u[p('transitionDuration')]='0ms',e.popperInstance.update(),a(function(){u[p('transitionDuration')]=d+'ms'})});g.observe(i,{childList:!0,subtree:!0,characterData:!0}),e._mutationObservers.push(g)}return new $e(t,i,m)}function ge(e){var t=e.el,i=e.popper,o=e.settings,n=o.appendTo,r=o.followCursor;n.contains(i)||(n.appendChild(i),e.popperInstance?(e.popperInstance.update(),(!r||Pe.touch)&&e.popperInstance.enableEventListeners()):e.popperInstance=ue(e),r&&!Pe.touch&&(t.addEventListener('mousemove',E),e.popperInstance.disableEventListeners()))}function be(e){var t=e.popper,i=e.popperInstance,o=e.settings.stickyDuration,n=function(){return t.style[p('transitionDuration')]=o+'ms'},r=function(){return t.style[p('transitionDuration')]=''};a(function e(){i&&i.scheduleUpdate(),n(),g(t)?window.requestAnimationFrame(e):r()})}function ye(e,t){var i=Re.reduce(function(i,o){var n=e.getAttribute('data-'+o.toLowerCase())||t[o];return'false'===n&&(n=!1),'true'===n&&(n=!0),isFinite(n)&&!isNaN(parseFloat(n))&&(n=parseFloat(n)),'string'==typeof n&&'['===n.trim().charAt(0)&&(n=JSON.parse(n)),i[o]=n,i},{});return it({},t,i)}function ve(e,t,i){var o=i.position,n=i.distance,r=i.arrow,s=i.animateFill,a=i.inertia,p=i.animation,l=i.arrowSize,d=i.size,c=i.theme,f=i.html,m=i.zIndex,h=i.interactive,u=document.createElement('div');u.setAttribute('class','tippy-popper'),u.setAttribute('role','tooltip'),u.setAttribute('aria-hidden','true'),u.setAttribute('id','tippy-tooltip-'+e),u.style.zIndex=m;var g=document.createElement('div');if(g.setAttribute('class','tippy-tooltip tippy-tooltip--'+d+' leave'),g.setAttribute('data-animation',p),c.split(' ').forEach(function(e){g.classList.add(e+'-theme')}),r){var b=document.createElement('div');b.setAttribute('class','arrow-'+l),b.setAttribute('x-arrow',''),g.appendChild(b)}if(s){g.setAttribute('data-animatefill','');var y=document.createElement('div');y.setAttribute('class','leave'),y.setAttribute('x-circle',''),g.appendChild(y)}a&&g.setAttribute('data-inertia',''),h&&g.setAttribute('data-interactive','');var E=document.createElement('div');if(E.setAttribute('class','tippy-tooltip-content'),f){var w;f instanceof Element?(E.appendChild(f),w='#'+f.id||'tippy-html-template'):(E.innerHTML=document.getElementById(f.replace('#','')).innerHTML,w=f),u.classList.add('html-template'),h&&u.setAttribute('tabindex','-1'),g.setAttribute('data-template-id',w)}else E.innerHTML=t;return g.style[v(o)]=he(n),g.appendChild(E),u.appendChild(g),u}function Ee(e,t,i,o){var n=[];return'manual'===e?n:(t.addEventListener(e,i.handleTrigger),n.push({event:e,handler:i.handleTrigger}),'mouseenter'===e&&(Pe.SUPPORTS_TOUCH&&o&&(t.addEventListener('touchstart',i.handleTrigger),n.push({event:'touchstart',handler:i.handleTrigger}),t.addEventListener('touchend',i.handleMouseleave),n.push({event:'touchend',handler:i.handleMouseleave})),t.addEventListener('mouseleave',i.handleMouseleave),n.push({event:'mouseleave',handler:i.handleMouseleave})),'focus'===e&&(t.addEventListener('blur',i.handleBlur),n.push({event:'blur',handler:i.handleBlur})),n)}function we(e,t,i){if(!t.getAttribute('x-placement'))return!0;var o=e.clientX,n=e.clientY,r=i.interactiveBorder,s=i.distance,a=t.getBoundingClientRect(),p=v(t.getAttribute('x-placement')),l=r+s,d={top:a.top-n>r,bottom:n-a.bottom>r,left:a.left-o>r,right:o-a.right>r};return'top'===p?d.top=a.top-n>l:'bottom'===p?d.bottom=n-a.bottom>l:'left'===p?d.left=a.left-o>l:'right'===p?d.right=o-a.right>l:void 0,d.top||d.bottom||d.left||d.right}function Oe(e,t,i){var n,r,s=this,a=i.position,p=i.delay,l=i.duration,d=i.interactive,c=i.interactiveBorder,f=i.distance,m=i.hideOnClick,h=i.trigger,u=i.touchHold,b=i.touchWait,y=function(){clearTimeout(n),clearTimeout(r)},v=function(){if(y(),!g(t)){var e=Array.isArray(p)?p[0]:p;p?n=setTimeout(function(){return s.show(t)},e):s.show(t)}},E=function(e){return s.callbacks.wait?s.callbacks.wait.call(t,v,e):v()},w=function(){y();var e=Array.isArray(p)?p[1]:p;p?r=setTimeout(function(){return s.hide(t)},e):s.hide(t)};return{handleTrigger:function(i){var o='mouseenter'===i.type&&Pe.SUPPORTS_TOUCH&&Pe.touch;if(!(o&&u)){var n='click'===i.type;n&&g(t)&&'persistent'!==m?w():E(i),o&&Pe.iOS()&&e.click&&e.click()}},handleMouseleave:function(n){if(!('mouseleave'===n.type&&Pe.SUPPORTS_TOUCH&&Pe.touch&&u)){if(d){var r=function n(r){var s=function(){document.body.removeEventListener('mouseleave',w),document.removeEventListener('mousemove',n),w()},a=o(r.target,Ie.TOOLTIPPED_EL),p=o(r.target,Ie.POPPER)===t,l=-1!==h.indexOf('click');return a&&a!==e?s():void(p||a===e||l||we(r,t,i)&&s())};return document.body.addEventListener('mouseleave',w),void document.addEventListener('mousemove',r)}w()}},handleBlur:function(e){!e.relatedTarget||Pe.touch||o(e.relatedTarget,Ie.POPPER)||w()}}}function Le(e){return e.arrow&&(e.animateFill=!1),e.appendTo&&'function'==typeof e.appendTo&&(e.appendTo=e.appendTo()),e}function Te(e){var t=this;return e.reduce(function(e,i){var o=ot,n=it({},Le(t.settings.performance?t.settings:ye(i,t.settings)));'function'==typeof n.html&&(n.html=n.html(i));var r=n.html,s=n.trigger,a=n.touchHold,p=n.dynamicTitle,l=i.getAttribute('title');if(!l&&!r)return e;i.setAttribute('data-tooltipped',''),i.setAttribute('aria-describedby','tippy-tooltip-'+o),d(i);var c=ve(o,l,n),f=Oe.call(t,i,c,n),m=[];s.trim().split(' ').forEach(function(e){return m=m.concat(Ee(e,i,f,a))});var u;if(p&&window.MutationObserver){var g=h(c),b=g.content;u=new MutationObserver(function(){var e=i.getAttribute('title');e&&(b.innerHTML=e,d(i))}),u.observe(i,{attributes:!0})}return e.push({id:o,el:i,popper:c,settings:n,listeners:m,tippyInstance:t,_mutationObservers:[u]}),ot++,e},[])}function xe(e,t){return y(e)&&(e={refObj:!0,attributes:e.attributes||{},getBoundingClientRect:e.getBoundingClientRect,clientWidth:e.clientWidth,clientHeight:e.clientHeight,setAttribute:function(t,i){e.attributes[t]=i},getAttribute:function(t){return e.attributes[t]},removeAttribute:function(t){delete e.attributes[t]},addEventListener:function(){},removeEventListener:function(){},classList:{classNames:{},add:function(t){e.classList.classNames[t]=!0},remove:function(t){return e.classList.classNames[t]=!1,!0},contains:function(t){return!!e.classList.classNames[t]}}}),new nt(e,t)}var Se=Math.min,Ae=Math.floor,ke=Math.max,Ce=Math.round,Pe={};'undefined'!=typeof window&&(Pe.SUPPORTED='requestAnimationFrame'in window,Pe.SUPPORTS_TOUCH='ontouchstart'in window,Pe.touch=!1,Pe.dynamicInputDetection=!0,Pe.iOS=function(){return /iPhone|iPad|iPod/.test(navigator.userAgent)&&!window.MSStream});var De=[],Ie={POPPER:'.tippy-popper',TOOLTIP:'.tippy-tooltip',CONTENT:'.tippy-tooltip-content',CIRCLE:'[x-circle]',ARROW:'[x-arrow]',TOOLTIPPED_EL:'[data-tooltipped]',CONTROLLER:'[data-tippy-controller]'},He={html:!1,position:'top',animation:'shift',animateFill:!0,arrow:!1,arrowSize:'regular',delay:0,trigger:'mouseenter focus',duration:350,interactive:!1,interactiveBorder:2,theme:'dark',size:'regular',distance:10,offset:0,hideOnClick:!0,multiple:!1,followCursor:!1,inertia:!1,flipDuration:350,sticky:!1,stickyDuration:200,appendTo:function(){return document.body},zIndex:9999,touchHold:!1,performance:!1,dynamicTitle:!1,popperOptions:{}},Re=Pe.SUPPORTED&&Object.keys(He),Ne={};if('undefined'!=typeof Element){var Be=Element.prototype;Ne=Be.matches||Be.matchesSelector||Be.webkitMatchesSelector||Be.mozMatchesSelector||Be.msMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),o=t.length;0<=--o&&t.item(o)!==this;);return-1<o}}for(var e=Ne,Me=['native code','[object MutationObserverConstructor]'],We=function(e){return Me.some(function(t){return-1<(e||'').toString().indexOf(t)})},Ue='undefined'!=typeof window,_e=['Edge','Trident','Firefox'],Fe=0,qe=0;qe<_e.length;qe+=1)if(Ue&&0<=navigator.userAgent.indexOf(_e[qe])){Fe=1;break}var i,Ye=Ue&&We(window.MutationObserver),ze=Ye?function(e){var t=!1,o=0,i=document.createElement('span'),n=new MutationObserver(function(){e(),t=!1});return n.observe(i,{attributes:!0}),function(){t||(t=!0,i.setAttribute('x-index',o),++o)}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},Fe))}},je=function(){return void 0==i&&(i=-1!==navigator.appVersion.indexOf('MSIE 10')),i},Ke=function(e,t){if(!(e instanceof t))throw new TypeError('Cannot call a class as a function')},Ge=function(){function e(e,t){for(var o,n=0;n<t.length;n++)o=t[n],o.enumerable=o.enumerable||!1,o.configurable=!0,'value'in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),Xe=function(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e},Ve=Object.assign||function(e){for(var t,o=1;o<arguments.length;o++)for(var i in t=arguments[o],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Qe=['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=Qe.slice(3),Ze={FLIP:'flip',CLOCKWISE:'clockwise',COUNTERCLOCKWISE:'counterclockwise'},$e=function(){function e(t,i){var o=this,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};Ke(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(o.update)},this.update=ze(this.update.bind(this)),this.options=Ve({},e.Defaults,n),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t.jquery?t[0]:t,this.popper=i.jquery?i[0]:i,this.options.modifiers={},Object.keys(Ve({},e.Defaults.modifiers,n.modifiers)).forEach(function(t){o.options.modifiers[t]=Ve({},e.Defaults.modifiers[t]||{},n.modifiers?n.modifiers[t]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return Ve({name:e},o.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&L(e.onLoad)&&e.onLoad(o.reference,o.popper,o.options,e,o.state)}),this.update();var r=this.options.eventsEnabled;r&&this.enableEventListeners(),this.state.eventsEnabled=r}return Ge(e,[{key:'update',value:function(){return J.call(this)}},{key:'destroy',value:function(){return ee.call(this)}},{key:'enableEventListeners',value:function(){return oe.call(this)}},{key:'disableEventListeners',value:function(){return re.call(this)}}]),e}();$e.Utils=('undefined'==typeof window?global:window).PopperUtils,$e.placements=Qe,$e.Defaults={placement:'bottom',eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,i=t.split('-')[0],o=t.split('-')[1];if(o){var n=e.offsets,r=n.reference,s=n.popper,a=-1!==['bottom','top'].indexOf(i),p=a?'left':'top',l=a?'width':'height',d={start:Xe({},p,r[p]),end:Xe({},p,r[p]+r[l]-s[l])};e.offsets.popper=Ve({},s,d[o])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var i,o=t.offset,n=e.placement,r=e.offsets,s=r.popper,a=r.reference,p=n.split('-')[0];return i=se(+o)?[+o,0]:me(o,s,a,p),'left'===p?(s.top+=i[0],s.left-=i[1]):'right'===p?(s.top+=i[0],s.left+=i[1]):'top'===p?(s.left+=i[0],s.top-=i[1]):'bottom'===p&&(s.left+=i[0],s.top+=i[1]),e.popper=s,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var i=t.boundariesElement||A(e.instance.popper);e.instance.reference===i&&(i=A(i));var o=F(e.instance.popper,e.instance.reference,t.padding,i);t.boundaries=o;var n=t.priority,r=e.offsets.popper,s={primary:function(e){var i=r[e];return r[e]<o[e]&&!t.escapeWithReference&&(i=ke(r[e],o[e])),Xe({},e,i)},secondary:function(e){var i='right'===e?'left':'top',n=r[i];return r[e]>o[e]&&!t.escapeWithReference&&(n=Se(r[i],o[e]-('right'===e?r.width:r.height))),Xe({},i,n)}};return n.forEach(function(e){var t=-1===['left','top'].indexOf(e)?'secondary':'primary';r=Ve({},r,s[t](e))}),e.offsets.popper=r,e},priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,i=t.popper,o=t.reference,n=e.placement.split('-')[0],r=Ae,s=-1!==['top','bottom'].indexOf(n),a=s?'right':'bottom',p=s?'left':'top',l=s?'width':'height';return i[a]<r(o[p])&&(e.offsets.popper[p]=r(o[p])-i[l]),i[p]>r(o[a])&&(e.offsets.popper[p]=r(o[a])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){if(!le(e.instance.modifiers,'arrow','keepTogether'))return e;var i=t.element;if('string'==typeof i){if(i=e.instance.popper.querySelector(i),!i)return e;}else if(!e.instance.popper.contains(i))return console.warn('WARNING: `arrow.element` must be child of its popper element!'),e;var o=e.placement.split('-')[0],n=e.offsets,r=n.popper,s=n.reference,a=-1!==['left','right'].indexOf(o),p=a?'height':'width',l=a?'Top':'Left',d=l.toLowerCase(),c=a?'left':'top',f=a?'bottom':'right',m=j(i)[p];s[f]-m<r[d]&&(e.offsets.popper[d]-=r[d]-(s[f]-m)),s[d]+m>r[f]&&(e.offsets.popper[d]+=s[d]+m-r[f]);var h=s[d]+s[p]/2-m/2,u=T(e.instance.popper,'margin'+l).replace('px',''),g=h-B(e.offsets.popper)[d]-u;return g=ke(Se(r[p]-m,g),0),e.arrowElement=i,e.offsets.arrow={},e.offsets.arrow[d]=Ce(g),e.offsets.arrow[c]='',e},element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:function(e,t){if(Z(e.instance.modifiers,'inner'))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var i=F(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),o=e.placement.split('-')[0],n=K(o),r=e.placement.split('-')[1]||'',s=[];switch(t.behavior){case Ze.FLIP:s=[o,n];break;case Ze.CLOCKWISE:s=ce(o);break;case Ze.COUNTERCLOCKWISE:s=ce(o,!0);break;default:s=t.behavior;}return s.forEach(function(a,p){if(o!==a||s.length===p+1)return e;o=e.placement.split('-')[0],n=K(o);var l=e.offsets.popper,d=e.offsets.reference,c=Ae,f='left'===o&&c(l.right)>c(d.left)||'right'===o&&c(l.left)<c(d.right)||'top'===o&&c(l.bottom)>c(d.top)||'bottom'===o&&c(l.top)<c(d.bottom),m=c(l.left)<c(i.left),h=c(l.right)>c(i.right),u=c(l.top)<c(i.top),g=c(l.bottom)>c(i.bottom),b='left'===o&&m||'right'===o&&h||'top'===o&&u||'bottom'===o&&g,y=-1!==['top','bottom'].indexOf(o),v=!!t.flipVariations&&(y&&'start'===r&&m||y&&'end'===r&&h||!y&&'start'===r&&u||!y&&'end'===r&&g);(f||b||v)&&(e.flipped=!0,(f||b)&&(o=s[p+1]),v&&(r=de(r)),e.placement=o+(r?'-'+r:''),e.offsets.popper=Ve({},e.offsets.popper,G(e.instance.popper,e.offsets.reference,e.placement)),e=Q(e.instance.modifiers,e,'flip'))}),e},behavior:'flip',padding:5,boundariesElement:'viewport'},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,i=t.split('-')[0],o=e.offsets,n=o.popper,r=o.reference,s=-1!==['left','right'].indexOf(i),a=-1===['top','left'].indexOf(i);return n[s?'left':'top']=r[i]-(a?n[s?'width':'height']:0),e.placement=K(t),e.offsets.popper=B(n),e}},hide:{order:800,enabled:!0,fn:function(e){if(!le(e.instance.modifiers,'hide','preventOverflow'))return e;var t=e.offsets.reference,i=X(e.instance.modifiers,function(e){return'preventOverflow'===e.name}).boundaries;if(t.bottom<i.top||t.left>i.right||t.top>i.bottom||t.right<i.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}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var i=t.x,o=t.y,n=e.offsets.popper,r=X(e.instance.modifiers,function(e){return'applyStyle'===e.name}).gpuAcceleration;void 0!==r&&console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');var s,a,p=void 0===r?t.gpuAcceleration:r,l=A(e.instance.popper),d=M(l),c={position:n.position},f={left:Ae(n.left),top:Ae(n.top),bottom:Ae(n.bottom),right:Ae(n.right)},m='bottom'===i?'top':'bottom',h='right'===o?'left':'right',u=$('transform');if(a='bottom'==m?-d.height+f.bottom:f.top,s='right'==h?-d.width+f.right:f.left,p&&u)c[u]='translate3d('+s+'px, '+a+'px, 0)',c[m]=0,c[h]=0,c.willChange='transform';else{var g='bottom'==m?-1:1,b='right'==h?-1:1;c[m]=a*g,c[h]=s*b,c.willChange=m+', '+h}var y={"x-placement":e.placement};return e.attributes=Ve({},y,e.attributes),e.styles=Ve({},c,e.styles),e.arrowStyles=Ve({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:'bottom',y:'right'},applyStyle:{order:900,enabled:!0,fn:function(e){return ae(e.instance.popper,e.styles),pe(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&ae(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,i,o,n){var r=z(n,t,e),s=Y(i.placement,r,t,e,i.modifiers.flip.boundariesElement,i.modifiers.flip.padding);return t.setAttribute('x-placement',s),ae(t,{position:'absolute'}),i},gpuAcceleration:void 0}}};var et=function(e,t){if(!(e instanceof t))throw new TypeError('Cannot call a class as a function')},tt=function(){function e(e,t){for(var o,n=0;n<t.length;n++)o=t[n],o.enumerable=o.enumerable||!1,o.configurable=!0,'value'in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),it=Object.assign||function(e){for(var t,o=1;o<arguments.length;o++)for(var i in t=arguments[o],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ot=1,nt=function(){function e(t){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};et(this,e),Pe.SUPPORTED&&(s(),this.state={destroyed:!1},this.selector=t,this.settings=it({},He,i),(i.show||i.shown||i.hide||i.hidden)&&console.warn('Callbacks without the `on` prefix are deprecated (with the exception of `wait`). Use onShow, onShown, onHide, and onHidden instead.'),this.callbacks={wait:i.wait,show:i.onShow||i.show||b,shown:i.onShown||i.shown||b,hide:i.onHide||i.hide||b,hidden:i.onHidden||i.hidden||b},this.store=Te.call(this,w(t)),De.push.apply(De,this.store))}return tt(e,[{key:'getPopperElement',value:function(e){try{return n(this.store,function(t){return t.el===e}).popper}catch(t){console.error('[getPopperElement]: Element passed as the argument does not exist in the instance')}}},{key:'getReferenceElement',value:function(e){try{return n(this.store,function(t){return t.popper===e}).el}catch(t){console.error('[getReferenceElement]: Popper passed as the argument does not exist in the instance')}}},{key:'getReferenceData',value:function(e){return n(this.store,function(t){return t.el===e||t.popper===e})}},{key:'show',value:function(e,t){var i=this;if(!this.state.destroyed){var o=n(this.store,function(t){return t.popper===e}),r=h(e),s=r.tooltip,p=r.circle,l=r.content;if(!this.selector.refObj&&!document.body.contains(o.el))return void this.destroy(e);this.callbacks.show.call(e);var d=o.el,c=o.settings,b=c.appendTo,y=c.sticky,v=c.interactive,E=c.followCursor,w=c.flipDuration,L=c.duration,T=void 0===t?Array.isArray(L)?L[0]:L:t;u([e,s,p],0),ge(o),e.style.visibility='visible',e.setAttribute('aria-hidden','false'),a(function(){g(e)&&((!E||Pe.touch)&&(o.popperInstance.update(),u([e],w)),u([s,p],T),p&&(l.style.opacity=1),v&&d.classList.add('active'),y&&be(o),f(s,p),m([s,p],function(e){e.contains('tippy-notransition')&&e.remove('tippy-notransition'),e.remove('leave'),e.add('enter')}),O(o,T,function(){!g(e)||o._onShownFired||(v&&e.focus(),s.classList.add('tippy-notransition'),o._onShownFired=!0,i.callbacks.shown.call(e))}))})}}},{key:'hide',value:function(e,t){var i=this;if(!this.state.destroyed){this.callbacks.hide.call(e);var o=n(this.store,function(t){return t.popper===e}),r=h(e),s=r.tooltip,a=r.circle,p=r.content,l=o.el,d=o.settings,f=d.appendTo,b=d.sticky,y=d.interactive,v=d.followCursor,w=d.html,L=d.trigger,T=d.duration,x=void 0===t?Array.isArray(T)?T[1]:T:t;o._onShownFired=!1,y&&l.classList.remove('active'),e.style.visibility='hidden',e.setAttribute('aria-hidden','true'),u([s,a,a?p:null],x),a&&(p.style.opacity=0),m([s,a],function(e){e.contains('tippy-tooltip')&&e.remove('tippy-notransition'),e.remove('enter'),e.add('leave')}),w&&-1!==L.indexOf('click')&&c(l)&&l.focus(),O(o,x,function(){g(e)||!f.contains(e)||'1'===getComputedStyle(s).opacity||(l.removeEventListener('mousemove',E),o.popperInstance.disableEventListeners(),f.removeChild(e),i.callbacks.hidden.call(e))})}}},{key:'update',value:function(e){if(!this.state.destroyed){var t=n(this.store,function(t){return t.popper===e}),i=h(e),o=i.content,r=t.el,s=t.settings.html;return s instanceof Element?void console.warn('Aborted: update() should not be used if `html` is a DOM element'):void(o.innerHTML=s?document.getElementById(s.replace('#','')).innerHTML:r.getAttribute('title')||r.getAttribute('data-original-title'),!s&&d(r))}}},{key:'destroy',value:function(e,t){var i=this;if(!this.state.destroyed){var o=n(this.store,function(t){return t.popper===e}),r=o.el,s=o.popperInstance,a=o.listeners,p=o._mutationObservers;g(e)&&this.hide(e,0),a.forEach(function(e){return r.removeEventListener(e.event,e.handler)}),r.setAttribute('title',r.getAttribute('data-original-title')),r.removeAttribute('data-original-title'),r.removeAttribute('data-tooltipped'),r.removeAttribute('aria-describedby'),s&&s.destroy(),p.forEach(function(e){e&&e.disconnect()}),De.splice(l(De,function(t){return t.popper===e}),1),(void 0===t||t)&&(this.store=De.filter(function(e){return e.tippyInstance===i}))}}},{key:'destroyAll',value:function(){var e=this;if(!this.state.destroyed){var t=this.store.length;this.store.forEach(function(i,o){var n=i.popper;e.destroy(n,o===t-1)}),this.store=null,this.state.destroyed=!0}}}]),e}();return xe.Browser=Pe,xe.Defaults=He,xe.disableDynamicInputDetection=function(){return Pe.dynamicInputDetection=!1},xe.enableDynamicInputDetection=function(){return Pe.dynamicInputDetection=!0},xe}); |
@@ -1,1 +0,1 @@ | ||
(function(a,b){'object'==typeof exports&&'undefined'!=typeof module?module.exports=b(require('popper.js')):'function'==typeof define&&define.amd?define(['popper.js'],b):a.tippy=b(a.Popper)})(this,function(a){'use strict';function b(a){K.forEach(function(b){var c=b.popper,d=b.tippyInstance,e=b.settings,f=e.appendTo,g=e.hideOnClick,h=e.trigger;if(f.contains(c)){var i=!0===g||-1!==h.indexOf('focus'),j=!a||c!==a.popper;i&&j&&d.hide(c)}})}function c(a,b){var c=Element.prototype.closest||function(a){for(var b=this;b;){if(e.call(b,a))return b;b=b.parentElement}};return c.call(a,b)}function d(a,b){return Array.prototype.find?a.find(b):a.filter(b)[0]}function f(){var a=function(){J.touch=!0,J.iOS()&&document.body.classList.add('tippy-touch'),J.dynamicInputDetection&&window.performance&&document.addEventListener('mousemove',f)},f=function(){var a;return function(){var b=performance.now();20>b-a&&(J.touch=!1,document.removeEventListener('mousemove',f),!J.iOS()&&document.body.classList.remove('tippy-touch')),a=b}}();document.addEventListener('click',function(a){if(!(a.target instanceof Element))return b();var e=c(a.target,L.TOOLTIPPED_EL),f=c(a.target,L.POPPER);if(f){var g=d(K,function(a){return a.popper===f}),h=g.settings.interactive;if(h)return}if(e){var i=d(K,function(a){return a.el===e}),j=i.settings,k=j.hideOnClick,l=j.multiple,m=j.trigger;if(!l&&J.touch||!l&&-1!==m.indexOf('click'))return b(i);if(!0!==k||-1!==m.indexOf('click'))return}c(a.target,L.CONTROLLER)||!document.querySelector(L.POPPER)||b()}),document.addEventListener('touchstart',a),window.addEventListener('blur',function(){var a=document,b=a.activeElement;b&&b.blur&&e.call(b,L.TOOLTIPPED_EL)&&b.blur()}),!J.SUPPORTS_TOUCH&&(0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)&&document.addEventListener('pointerdown',a)}function g(){return!g.done&&(g.done=!0,f(),!0)}function h(a){window.requestAnimationFrame(function(){setTimeout(a,0)})}function i(a){for(var b=[!1,'webkit'],c=a.charAt(0).toUpperCase()+a.slice(1),d=0;d<b.length;d++){var e=b[d],f=e?''+e+c:a;if('undefined'!=typeof window.document.body.style[f])return f}return null}function j(a,b){return Array.prototype.findIndex?a.findIndex(b):a.indexOf(d(a,b))}function k(a){var b=a.getAttribute('title');b&&a.setAttribute('data-original-title',b),a.removeAttribute('title')}function l(a){var b=a.getBoundingClientRect();return 0<=b.top&&0<=b.left&&b.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&b.right<=(window.innerWidth||document.documentElement.clientWidth)}function m(a,b){b?window.getComputedStyle(b)[i('transform')]:window.getComputedStyle(a).opacity}function n(a,b){a.forEach(function(a){a&&b(a.classList)})}function o(a){return{tooltip:a.querySelector(L.TOOLTIP),circle:a.querySelector(L.CIRCLE),content:a.querySelector(L.CONTENT)}}function p(a,b){a.forEach(function(a){if(a){var c=e.call(a,L.CONTENT),d=c?I(b/1.3):b;a.style[i('transitionDuration')]=d+'ms'}})}function q(a){return'visible'===a.style.visibility}function r(){}function s(a){return a.replace(/-.+/,'')}function t(a){var b,c,e=this,f=d(K,function(a){return a.el===e}),g=f.popper,h=f.settings.offset,j=s(g.getAttribute('x-placement')),k=I(g.offsetWidth/2),l=I(g.offsetHeight/2),m=5,n=document.documentElement.offsetWidth||document.body.offsetWidth,o=a.pageX,p=a.pageY;'top'===j?(b=o-k+h,c=p-2.25*l):'left'===j?(b=o-2*k-10,c=p-l+h):'right'===j?(b=o+l,c=p-l+h):'bottom'===j?(b=o-k+h,c=p+l/1.5):void 0;('top'===j||'bottom'===j)&&(o+m+k+h>n&&(b=n-m-2*k),0>o-m-k+h&&(b=m)),g.style[i('transform')]='translate3d('+b+'px, '+c+'px, 0)'}function u(a){return a instanceof Element?[a]:Array.isArray(a)?a:'NodeList'===a.constructor.name?[].slice.call(a):[].slice.call(document.querySelectorAll(a))}function v(a,b,c){if(!b)return c();var d=o(a.popper),f=d.tooltip,g=!1,e=function(a){a.target!==f||g||(g=!0,c())};f.addEventListener('webkitTransitionEnd',e),f.addEventListener('transitionend',e),clearTimeout(a._transitionendTimeout),a._transitionendTimeout=setTimeout(function(){g||c()},b)}function w(a){return-(a-M.distance)+'px'}function x(b){var c=b.el,d=b.popper,e=b.settings,f=e.position,g=e.popperOptions,j=e.offset,k=e.distance,l=e.flipDuration,m=o(d),n=m.tooltip,p=S({placement:f},g||{},{modifiers:S({},g?g.modifiers:{},{flip:S({padding:k+5},g&&g.modifiers?g.modifiers.flip:{}),offset:S({offset:j},g&&g.modifiers?g.modifiers.offset:{})}),onUpdate:function(){var a=n.style;a.top='',a.bottom='',a.left='',a.right='',a[s(d.getAttribute('x-placement'))]=w(k)}});if(window.MutationObserver){var q=d.style,r=new MutationObserver(function(){q[i('transitionDuration')]='0ms',b.popperInstance.update(),h(function(){q[i('transitionDuration')]=l+'ms'})});r.observe(d,{childList:!0,subtree:!0,characterData:!0}),b._mutationObservers.push(r)}return new a(c,d,p)}function y(a){var b=a.el,c=a.popper,d=a.settings,e=d.appendTo,f=d.followCursor;e.contains(c)||(e.appendChild(c),a.popperInstance?(a.popperInstance.update(),(!f||J.touch)&&a.popperInstance.enableEventListeners()):a.popperInstance=x(a),f&&!J.touch&&(b.addEventListener('mousemove',t),a.popperInstance.disableEventListeners()))}function z(a){var b=a.popper,c=a.popperInstance,d=a.settings.stickyDuration,e=function(){return b.style[i('transitionDuration')]=d+'ms'},f=function(){return b.style[i('transitionDuration')]=''};h(function a(){c&&c.scheduleUpdate(),e(),q(b)?window.requestAnimationFrame(a):f()})}function A(a,b){var c=N.reduce(function(c,d){var e=a.getAttribute('data-'+d.toLowerCase())||b[d];return'false'===e&&(e=!1),'true'===e&&(e=!0),isFinite(e)&&!isNaN(parseFloat(e))&&(e=parseFloat(e)),'string'==typeof e&&'['===e.trim().charAt(0)&&(e=JSON.parse(e)),c[d]=e,c},{});return S({},b,c)}function B(a,b,c){var d=c.position,e=c.distance,f=c.arrow,g=c.animateFill,h=c.inertia,i=c.animation,j=c.arrowSize,k=c.size,l=c.theme,m=c.html,n=c.zIndex,o=c.interactive,p=document.createElement('div');p.setAttribute('class','tippy-popper'),p.setAttribute('role','tooltip'),p.setAttribute('aria-hidden','true'),p.setAttribute('id','tippy-tooltip-'+a),p.style.zIndex=n;var q=document.createElement('div');if(q.setAttribute('class','tippy-tooltip tippy-tooltip--'+k+' leave'),q.setAttribute('data-animation',i),l.split(' ').forEach(function(a){q.classList.add(a+'-theme')}),f){var r=document.createElement('div');r.setAttribute('class','arrow-'+j),r.setAttribute('x-arrow',''),q.appendChild(r)}if(g){q.setAttribute('data-animatefill','');var t=document.createElement('div');t.setAttribute('class','leave'),t.setAttribute('x-circle',''),q.appendChild(t)}h&&q.setAttribute('data-inertia',''),o&&q.setAttribute('data-interactive','');var u=document.createElement('div');if(u.setAttribute('class','tippy-tooltip-content'),m){var v;m instanceof Element?(u.appendChild(m),v='#'+m.id||'tippy-html-template'):(u.innerHTML=document.getElementById(m.replace('#','')).innerHTML,v=m),p.classList.add('html-template'),o&&p.setAttribute('tabindex','-1'),q.setAttribute('data-template-id',v)}else u.innerHTML=b;return q.style[s(d)]=w(e),q.appendChild(u),p.appendChild(q),p}function C(a,b,c,d){var e=[];return'manual'===a?e:(b.addEventListener(a,c.handleTrigger),e.push({event:a,handler:c.handleTrigger}),'mouseenter'===a&&(J.SUPPORTS_TOUCH&&d&&(b.addEventListener('touchstart',c.handleTrigger),e.push({event:'touchstart',handler:c.handleTrigger}),b.addEventListener('touchend',c.handleMouseleave),e.push({event:'touchend',handler:c.handleMouseleave})),b.addEventListener('mouseleave',c.handleMouseleave),e.push({event:'mouseleave',handler:c.handleMouseleave})),'focus'===a&&(b.addEventListener('blur',c.handleBlur),e.push({event:'blur',handler:c.handleBlur})),e)}function D(a,b,c){if(!b.getAttribute('x-placement'))return!0;var d=a.clientX,e=a.clientY,f=c.interactiveBorder,g=c.distance,h=b.getBoundingClientRect(),i=s(b.getAttribute('x-placement')),j=f+g,k={top:h.top-e>f,bottom:e-h.bottom>f,left:h.left-d>f,right:d-h.right>f};return'top'===i?k.top=h.top-e>j:'bottom'===i?k.bottom=e-h.bottom>j:'left'===i?k.left=h.left-d>j:'right'===i?k.right=d-h.right>j:void 0,k.top||k.bottom||k.left||k.right}function E(a,b,d){var e,f,g=this,h=d.position,i=d.delay,j=d.duration,k=d.interactive,l=d.interactiveBorder,m=d.distance,n=d.hideOnClick,o=d.trigger,p=d.touchHold,r=d.touchWait,s=function(){clearTimeout(e),clearTimeout(f)},t=function(){if(s(),!q(b)){var a=Array.isArray(i)?i[0]:i;i?e=setTimeout(function(){return g.show(b)},a):g.show(b)}},u=function(a){return g.callbacks.wait?g.callbacks.wait.call(b,t,a):t()},v=function(){s();var a=Array.isArray(i)?i[1]:i;i?f=setTimeout(function(){return g.hide(b)},a):g.hide(b)};return{handleTrigger:function(c){var d='mouseenter'===c.type&&J.SUPPORTS_TOUCH&&J.touch;if(!(d&&p)){var e='click'===c.type;e&&q(b)&&'persistent'!==n?v():u(c),d&&J.iOS()&&a.click&&a.click()}},handleMouseleave:function(e){if(!('mouseleave'===e.type&&J.SUPPORTS_TOUCH&&J.touch&&p)){if(k){var f=function e(f){var g=function(){document.body.removeEventListener('mouseleave',v),document.removeEventListener('mousemove',e),v()},h=c(f.target,L.TOOLTIPPED_EL),i=c(f.target,L.POPPER)===b,j=-1!==o.indexOf('click');return h&&h!==a?g():void(i||h===a||j||D(f,b,d)&&g())};return document.body.addEventListener('mouseleave',v),void document.addEventListener('mousemove',f)}v()}},handleBlur:function(a){!a.relatedTarget||J.touch||c(a.relatedTarget,L.POPPER)||v()}}}function F(a){return a.arrow&&(a.animateFill=!1),a.appendTo&&'function'==typeof a.appendTo&&(a.appendTo=a.appendTo()),a}function G(a){var b=this;return a.reduce(function(a,c){var d=T,e=S({},F(b.settings.performance?b.settings:A(c,b.settings)));'function'==typeof e.html&&(e.html=e.html(c));var f=e.html,g=e.trigger,h=e.touchHold,i=e.dynamicTitle,j=c.getAttribute('title');if(!j&&!f)return a;c.setAttribute('data-tooltipped',''),c.setAttribute('aria-describedby','tippy-tooltip-'+d),k(c);var l=B(d,j,e),m=E.call(b,c,l,e),n=[];g.trim().split(' ').forEach(function(a){return n=n.concat(C(a,c,m,h))});var p;if(i&&window.MutationObserver){var q=o(l),r=q.content;p=new MutationObserver(function(){var a=c.getAttribute('title');a&&(r.innerHTML=a,k(c))}),p.observe(c,{attributes:!0})}return a.push({id:d,el:c,popper:l,settings:e,listeners:n,tippyInstance:b,_mutationObservers:[p]}),T++,a},[])}function H(a,b){return new U(a,b)}var I=Math.round;a=a&&a.hasOwnProperty('default')?a['default']:a;var J={};'undefined'!=typeof window&&(J.SUPPORTED='requestAnimationFrame'in window,J.SUPPORTS_TOUCH='ontouchstart'in window,J.touch=!1,J.dynamicInputDetection=!0,J.iOS=function(){return /iPhone|iPad|iPod/.test(navigator.userAgent)&&!window.MSStream});var K=[],L={POPPER:'.tippy-popper',TOOLTIP:'.tippy-tooltip',CONTENT:'.tippy-tooltip-content',CIRCLE:'[x-circle]',ARROW:'[x-arrow]',TOOLTIPPED_EL:'[data-tooltipped]',CONTROLLER:'[data-tippy-controller]'},M={html:!1,position:'top',animation:'shift',animateFill:!0,arrow:!1,arrowSize:'regular',delay:0,trigger:'mouseenter focus',duration:350,interactive:!1,interactiveBorder:2,theme:'dark',size:'regular',distance:10,offset:0,hideOnClick:!0,multiple:!1,followCursor:!1,inertia:!1,flipDuration:350,sticky:!1,stickyDuration:200,appendTo:function(){return document.body},zIndex:9999,touchHold:!1,performance:!1,dynamicTitle:!1,popperOptions:{}},N=J.SUPPORTED&&Object.keys(M),O={};if('undefined'!=typeof Element){var P=Element.prototype;O=P.matches||P.matchesSelector||P.webkitMatchesSelector||P.mozMatchesSelector||P.msMatchesSelector||function(a){for(var b=(this.document||this.ownerDocument).querySelectorAll(a),c=b.length;0<=--c&&b.item(c)!==this;);return-1<c}}var e=O,Q=function(a,b){if(!(a instanceof b))throw new TypeError('Cannot call a class as a function')},R=function(){function a(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,'value'in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),S=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},T=1,U=function(){function a(b){var c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};Q(this,a),J.SUPPORTED&&(g(),this.state={destroyed:!1},this.selector=b,this.settings=S({},M,c),(c.show||c.shown||c.hide||c.hidden)&&console.warn('Callbacks without the `on` prefix are deprecated (with the exception of `wait`). Use onShow, onShown, onHide, and onHidden instead.'),this.callbacks={wait:c.wait,show:c.onShow||c.show||r,shown:c.onShown||c.shown||r,hide:c.onHide||c.hide||r,hidden:c.onHidden||c.hidden||r},this.store=G.call(this,u(b)),K.push.apply(K,this.store))}return R(a,[{key:'getPopperElement',value:function(a){try{return d(this.store,function(b){return b.el===a}).popper}catch(a){console.error('[getPopperElement]: Element passed as the argument does not exist in the instance')}}},{key:'getReferenceElement',value:function(a){try{return d(this.store,function(b){return b.popper===a}).el}catch(a){console.error('[getReferenceElement]: Popper passed as the argument does not exist in the instance')}}},{key:'getReferenceData',value:function(a){return d(this.store,function(b){return b.el===a||b.popper===a})}},{key:'show',value:function(a,b){var c=this;if(!this.state.destroyed){var e=d(this.store,function(b){return b.popper===a}),f=o(a),g=f.tooltip,i=f.circle,j=f.content;if(!document.body.contains(e.el))return void this.destroy(a);this.callbacks.show.call(a);var k=e.el,l=e.settings,r=l.appendTo,s=l.sticky,t=l.interactive,u=l.followCursor,w=l.flipDuration,x=l.duration,A=void 0===b?Array.isArray(x)?x[0]:x:b;p([a,g,i],0),y(e),a.style.visibility='visible',a.setAttribute('aria-hidden','false'),h(function(){q(a)&&((!u||J.touch)&&(e.popperInstance.update(),p([a],w)),p([g,i],A),i&&(j.style.opacity=1),t&&k.classList.add('active'),s&&z(e),m(g,i),n([g,i],function(a){a.contains('tippy-notransition')&&a.remove('tippy-notransition'),a.remove('leave'),a.add('enter')}),v(e,A,function(){!q(a)||e._onShownFired||(t&&a.focus(),g.classList.add('tippy-notransition'),e._onShownFired=!0,c.callbacks.shown.call(a))}))})}}},{key:'hide',value:function(a,b){var c=this;if(!this.state.destroyed){this.callbacks.hide.call(a);var e=d(this.store,function(b){return b.popper===a}),f=o(a),g=f.tooltip,h=f.circle,i=f.content,j=e.el,k=e.settings,m=k.appendTo,r=k.sticky,s=k.interactive,u=k.followCursor,w=k.html,x=k.trigger,y=k.duration,z=void 0===b?Array.isArray(y)?y[1]:y:b;e._onShownFired=!1,s&&j.classList.remove('active'),a.style.visibility='hidden',a.setAttribute('aria-hidden','true'),p([g,h,h?i:null],z),h&&(i.style.opacity=0),n([g,h],function(a){a.contains('tippy-tooltip')&&a.remove('tippy-notransition'),a.remove('enter'),a.add('leave')}),w&&-1!==x.indexOf('click')&&l(j)&&j.focus(),v(e,z,function(){q(a)||!m.contains(a)||'1'===getComputedStyle(g).opacity||(j.removeEventListener('mousemove',t),e.popperInstance.disableEventListeners(),m.removeChild(a),c.callbacks.hidden.call(a))})}}},{key:'update',value:function(a){if(!this.state.destroyed){var b=d(this.store,function(b){return b.popper===a}),c=o(a),e=c.content,f=b.el,g=b.settings.html;return g instanceof Element?void console.warn('Aborted: update() should not be used if `html` is a DOM element'):void(e.innerHTML=g?document.getElementById(g.replace('#','')).innerHTML:f.getAttribute('title')||f.getAttribute('data-original-title'),!g&&k(f))}}},{key:'destroy',value:function(a,b){var c=this;if(!this.state.destroyed){var e=d(this.store,function(b){return b.popper===a}),f=e.el,g=e.popperInstance,h=e.listeners,i=e._mutationObservers;q(a)&&this.hide(a,0),h.forEach(function(a){return f.removeEventListener(a.event,a.handler)}),f.setAttribute('title',f.getAttribute('data-original-title')),f.removeAttribute('data-original-title'),f.removeAttribute('data-tooltipped'),f.removeAttribute('aria-describedby'),g&&g.destroy(),i.forEach(function(a){a&&a.disconnect()}),K.splice(j(K,function(b){return b.popper===a}),1),(void 0===b||b)&&(this.store=K.filter(function(a){return a.tippyInstance===c}))}}},{key:'destroyAll',value:function(){var a=this;if(!this.state.destroyed){var b=this.store.length;this.store.forEach(function(c,d){var e=c.popper;a.destroy(e,d===b-1)}),this.store=null,this.state.destroyed=!0}}}]),a}();return H.Browser=J,H.Defaults=M,H.disableDynamicInputDetection=function(){return J.dynamicInputDetection=!1},H.enableDynamicInputDetection=function(){return J.dynamicInputDetection=!0},H}); | ||
(function(a,b){'object'==typeof exports&&'undefined'!=typeof module?module.exports=b(require('popper.js')):'function'==typeof define&&define.amd?define(['popper.js'],b):a.tippy=b(a.Popper)})(this,function(a){'use strict';function b(a){L.forEach(function(b){var c=b.popper,d=b.tippyInstance,e=b.settings,f=e.appendTo,g=e.hideOnClick,h=e.trigger;if(f.contains(c)){var i=!0===g||-1!==h.indexOf('focus'),j=!a||c!==a.popper;i&&j&&d.hide(c)}})}function c(a,b){var c=Element.prototype.closest||function(a){for(var b=this;b;){if(e.call(b,a))return b;b=b.parentElement}};return c.call(a,b)}function d(a,b){return Array.prototype.find?a.find(b):a.filter(b)[0]}function f(){var a=function(){K.touch=!0,K.iOS()&&document.body.classList.add('tippy-touch'),K.dynamicInputDetection&&window.performance&&document.addEventListener('mousemove',f)},f=function(){var a;return function(){var b=performance.now();20>b-a&&(K.touch=!1,document.removeEventListener('mousemove',f),!K.iOS()&&document.body.classList.remove('tippy-touch')),a=b}}();document.addEventListener('click',function(a){if(!(a.target instanceof Element))return b();var e=c(a.target,M.TOOLTIPPED_EL),f=c(a.target,M.POPPER);if(f){var g=d(L,function(a){return a.popper===f}),h=g.settings.interactive;if(h)return}if(e){var i=d(L,function(a){return a.el===e}),j=i.settings,k=j.hideOnClick,l=j.multiple,m=j.trigger;if(!l&&K.touch||!l&&-1!==m.indexOf('click'))return b(i);if(!0!==k||-1!==m.indexOf('click'))return}c(a.target,M.CONTROLLER)||!document.querySelector(M.POPPER)||b()}),document.addEventListener('touchstart',a),window.addEventListener('blur',function(){var a=document,b=a.activeElement;b&&b.blur&&e.call(b,M.TOOLTIPPED_EL)&&b.blur()}),!K.SUPPORTS_TOUCH&&(0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)&&document.addEventListener('pointerdown',a)}function g(){return!g.done&&(g.done=!0,f(),!0)}function h(a){window.requestAnimationFrame(function(){setTimeout(a,0)})}function i(a){for(var b=[!1,'webkit'],c=a.charAt(0).toUpperCase()+a.slice(1),d=0;d<b.length;d++){var e=b[d],f=e?''+e+c:a;if('undefined'!=typeof window.document.body.style[f])return f}return null}function j(a,b){return Array.prototype.findIndex?a.findIndex(b):a.indexOf(d(a,b))}function k(a){var b=a.getAttribute('title');b&&a.setAttribute('data-original-title',b),a.removeAttribute('title')}function l(a){var b=a.getBoundingClientRect();return 0<=b.top&&0<=b.left&&b.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&b.right<=(window.innerWidth||document.documentElement.clientWidth)}function m(a,b){b?window.getComputedStyle(b)[i('transform')]:window.getComputedStyle(a).opacity}function n(a,b){a.forEach(function(a){a&&b(a.classList)})}function o(a){return{tooltip:a.querySelector(M.TOOLTIP),circle:a.querySelector(M.CIRCLE),content:a.querySelector(M.CONTENT)}}function p(a,b){a.forEach(function(a){if(a){var c=e.call(a,M.CONTENT),d=c?J(b/1.3):b;a.style[i('transitionDuration')]=d+'ms'}})}function q(a){return'visible'===a.style.visibility}function r(){}function s(a){return!!a&&'[object Object]'===a.toString()}function t(a){return a.replace(/-.+/,'')}function u(a){var b,c,e=this,f=d(L,function(a){return a.el===e}),g=f.popper,h=f.settings.offset,j=t(g.getAttribute('x-placement')),k=J(g.offsetWidth/2),l=J(g.offsetHeight/2),m=5,n=document.documentElement.offsetWidth||document.body.offsetWidth,o=a.pageX,p=a.pageY;'top'===j?(b=o-k+h,c=p-2.25*l):'left'===j?(b=o-2*k-10,c=p-l+h):'right'===j?(b=o+l,c=p-l+h):'bottom'===j?(b=o-k+h,c=p+l/1.5):void 0;('top'===j||'bottom'===j)&&(o+m+k+h>n&&(b=n-m-2*k),0>o-m-k+h&&(b=m)),g.style[i('transform')]='translate3d('+b+'px, '+c+'px, 0)'}function v(a){if(a instanceof Element||s(a))return[a];if(a instanceof NodeList)return[].slice.call(a);if(Array.isArray(a))return a;try{return[].slice.call(document.querySelectorAll(a))}catch(a){return[]}}function w(a,b,c){if(!b)return c();var d=o(a.popper),f=d.tooltip,g=!1,e=function(a){a.target!==f||g||(g=!0,c())};f.addEventListener('webkitTransitionEnd',e),f.addEventListener('transitionend',e),clearTimeout(a._transitionendTimeout),a._transitionendTimeout=setTimeout(function(){g||c()},b)}function x(a){return-(a-N.distance)+'px'}function y(b){var c=b.el,d=b.popper,e=b.settings,f=e.position,g=e.popperOptions,j=e.offset,k=e.distance,l=e.flipDuration,m=o(d),n=m.tooltip,p=T({placement:f},g||{},{modifiers:T({},g?g.modifiers:{},{flip:T({padding:k+5},g&&g.modifiers?g.modifiers.flip:{}),offset:T({offset:j},g&&g.modifiers?g.modifiers.offset:{})}),onUpdate:function(){var a=n.style;a.top='',a.bottom='',a.left='',a.right='',a[t(d.getAttribute('x-placement'))]=x(k)}});if(window.MutationObserver){var q=d.style,r=new MutationObserver(function(){q[i('transitionDuration')]='0ms',b.popperInstance.update(),h(function(){q[i('transitionDuration')]=l+'ms'})});r.observe(d,{childList:!0,subtree:!0,characterData:!0}),b._mutationObservers.push(r)}return new a(c,d,p)}function z(a){var b=a.el,c=a.popper,d=a.settings,e=d.appendTo,f=d.followCursor;e.contains(c)||(e.appendChild(c),a.popperInstance?(a.popperInstance.update(),(!f||K.touch)&&a.popperInstance.enableEventListeners()):a.popperInstance=y(a),f&&!K.touch&&(b.addEventListener('mousemove',u),a.popperInstance.disableEventListeners()))}function A(a){var b=a.popper,c=a.popperInstance,d=a.settings.stickyDuration,e=function(){return b.style[i('transitionDuration')]=d+'ms'},f=function(){return b.style[i('transitionDuration')]=''};h(function a(){c&&c.scheduleUpdate(),e(),q(b)?window.requestAnimationFrame(a):f()})}function B(a,b){var c=O.reduce(function(c,d){var e=a.getAttribute('data-'+d.toLowerCase())||b[d];return'false'===e&&(e=!1),'true'===e&&(e=!0),isFinite(e)&&!isNaN(parseFloat(e))&&(e=parseFloat(e)),'string'==typeof e&&'['===e.trim().charAt(0)&&(e=JSON.parse(e)),c[d]=e,c},{});return T({},b,c)}function C(a,b,c){var d=c.position,e=c.distance,f=c.arrow,g=c.animateFill,h=c.inertia,i=c.animation,j=c.arrowSize,k=c.size,l=c.theme,m=c.html,n=c.zIndex,o=c.interactive,p=document.createElement('div');p.setAttribute('class','tippy-popper'),p.setAttribute('role','tooltip'),p.setAttribute('aria-hidden','true'),p.setAttribute('id','tippy-tooltip-'+a),p.style.zIndex=n;var q=document.createElement('div');if(q.setAttribute('class','tippy-tooltip tippy-tooltip--'+k+' leave'),q.setAttribute('data-animation',i),l.split(' ').forEach(function(a){q.classList.add(a+'-theme')}),f){var r=document.createElement('div');r.setAttribute('class','arrow-'+j),r.setAttribute('x-arrow',''),q.appendChild(r)}if(g){q.setAttribute('data-animatefill','');var s=document.createElement('div');s.setAttribute('class','leave'),s.setAttribute('x-circle',''),q.appendChild(s)}h&&q.setAttribute('data-inertia',''),o&&q.setAttribute('data-interactive','');var u=document.createElement('div');if(u.setAttribute('class','tippy-tooltip-content'),m){var v;m instanceof Element?(u.appendChild(m),v='#'+m.id||'tippy-html-template'):(u.innerHTML=document.getElementById(m.replace('#','')).innerHTML,v=m),p.classList.add('html-template'),o&&p.setAttribute('tabindex','-1'),q.setAttribute('data-template-id',v)}else u.innerHTML=b;return q.style[t(d)]=x(e),q.appendChild(u),p.appendChild(q),p}function D(a,b,c,d){var e=[];return'manual'===a?e:(b.addEventListener(a,c.handleTrigger),e.push({event:a,handler:c.handleTrigger}),'mouseenter'===a&&(K.SUPPORTS_TOUCH&&d&&(b.addEventListener('touchstart',c.handleTrigger),e.push({event:'touchstart',handler:c.handleTrigger}),b.addEventListener('touchend',c.handleMouseleave),e.push({event:'touchend',handler:c.handleMouseleave})),b.addEventListener('mouseleave',c.handleMouseleave),e.push({event:'mouseleave',handler:c.handleMouseleave})),'focus'===a&&(b.addEventListener('blur',c.handleBlur),e.push({event:'blur',handler:c.handleBlur})),e)}function E(a,b,c){if(!b.getAttribute('x-placement'))return!0;var d=a.clientX,e=a.clientY,f=c.interactiveBorder,g=c.distance,h=b.getBoundingClientRect(),i=t(b.getAttribute('x-placement')),j=f+g,k={top:h.top-e>f,bottom:e-h.bottom>f,left:h.left-d>f,right:d-h.right>f};return'top'===i?k.top=h.top-e>j:'bottom'===i?k.bottom=e-h.bottom>j:'left'===i?k.left=h.left-d>j:'right'===i?k.right=d-h.right>j:void 0,k.top||k.bottom||k.left||k.right}function F(a,b,d){var e,f,g=this,h=d.position,i=d.delay,j=d.duration,k=d.interactive,l=d.interactiveBorder,m=d.distance,n=d.hideOnClick,o=d.trigger,p=d.touchHold,r=d.touchWait,s=function(){clearTimeout(e),clearTimeout(f)},t=function(){if(s(),!q(b)){var a=Array.isArray(i)?i[0]:i;i?e=setTimeout(function(){return g.show(b)},a):g.show(b)}},u=function(a){return g.callbacks.wait?g.callbacks.wait.call(b,t,a):t()},v=function(){s();var a=Array.isArray(i)?i[1]:i;i?f=setTimeout(function(){return g.hide(b)},a):g.hide(b)};return{handleTrigger:function(c){var d='mouseenter'===c.type&&K.SUPPORTS_TOUCH&&K.touch;if(!(d&&p)){var e='click'===c.type;e&&q(b)&&'persistent'!==n?v():u(c),d&&K.iOS()&&a.click&&a.click()}},handleMouseleave:function(e){if(!('mouseleave'===e.type&&K.SUPPORTS_TOUCH&&K.touch&&p)){if(k){var f=function e(f){var g=function(){document.body.removeEventListener('mouseleave',v),document.removeEventListener('mousemove',e),v()},h=c(f.target,M.TOOLTIPPED_EL),i=c(f.target,M.POPPER)===b,j=-1!==o.indexOf('click');return h&&h!==a?g():void(i||h===a||j||E(f,b,d)&&g())};return document.body.addEventListener('mouseleave',v),void document.addEventListener('mousemove',f)}v()}},handleBlur:function(a){!a.relatedTarget||K.touch||c(a.relatedTarget,M.POPPER)||v()}}}function G(a){return a.arrow&&(a.animateFill=!1),a.appendTo&&'function'==typeof a.appendTo&&(a.appendTo=a.appendTo()),a}function H(a){var b=this;return a.reduce(function(a,c){var d=U,e=T({},G(b.settings.performance?b.settings:B(c,b.settings)));'function'==typeof e.html&&(e.html=e.html(c));var f=e.html,g=e.trigger,h=e.touchHold,i=e.dynamicTitle,j=c.getAttribute('title');if(!j&&!f)return a;c.setAttribute('data-tooltipped',''),c.setAttribute('aria-describedby','tippy-tooltip-'+d),k(c);var l=C(d,j,e),m=F.call(b,c,l,e),n=[];g.trim().split(' ').forEach(function(a){return n=n.concat(D(a,c,m,h))});var p;if(i&&window.MutationObserver){var q=o(l),r=q.content;p=new MutationObserver(function(){var a=c.getAttribute('title');a&&(r.innerHTML=a,k(c))}),p.observe(c,{attributes:!0})}return a.push({id:d,el:c,popper:l,settings:e,listeners:n,tippyInstance:b,_mutationObservers:[p]}),U++,a},[])}function I(a,b){return s(a)&&(a={refObj:!0,attributes:a.attributes||{},getBoundingClientRect:a.getBoundingClientRect,clientWidth:a.clientWidth,clientHeight:a.clientHeight,setAttribute:function(b,c){a.attributes[b]=c},getAttribute:function(b){return a.attributes[b]},removeAttribute:function(b){delete a.attributes[b]},addEventListener:function(){},removeEventListener:function(){},classList:{classNames:{},add:function(b){a.classList.classNames[b]=!0},remove:function(b){return a.classList.classNames[b]=!1,!0},contains:function(b){return!!a.classList.classNames[b]}}}),new V(a,b)}var J=Math.round;a=a&&a.hasOwnProperty('default')?a['default']:a;var K={};'undefined'!=typeof window&&(K.SUPPORTED='requestAnimationFrame'in window,K.SUPPORTS_TOUCH='ontouchstart'in window,K.touch=!1,K.dynamicInputDetection=!0,K.iOS=function(){return /iPhone|iPad|iPod/.test(navigator.userAgent)&&!window.MSStream});var L=[],M={POPPER:'.tippy-popper',TOOLTIP:'.tippy-tooltip',CONTENT:'.tippy-tooltip-content',CIRCLE:'[x-circle]',ARROW:'[x-arrow]',TOOLTIPPED_EL:'[data-tooltipped]',CONTROLLER:'[data-tippy-controller]'},N={html:!1,position:'top',animation:'shift',animateFill:!0,arrow:!1,arrowSize:'regular',delay:0,trigger:'mouseenter focus',duration:350,interactive:!1,interactiveBorder:2,theme:'dark',size:'regular',distance:10,offset:0,hideOnClick:!0,multiple:!1,followCursor:!1,inertia:!1,flipDuration:350,sticky:!1,stickyDuration:200,appendTo:function(){return document.body},zIndex:9999,touchHold:!1,performance:!1,dynamicTitle:!1,popperOptions:{}},O=K.SUPPORTED&&Object.keys(N),P={};if('undefined'!=typeof Element){var Q=Element.prototype;P=Q.matches||Q.matchesSelector||Q.webkitMatchesSelector||Q.mozMatchesSelector||Q.msMatchesSelector||function(a){for(var b=(this.document||this.ownerDocument).querySelectorAll(a),c=b.length;0<=--c&&b.item(c)!==this;);return-1<c}}var e=P,R=function(a,b){if(!(a instanceof b))throw new TypeError('Cannot call a class as a function')},S=function(){function a(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,'value'in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),T=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},U=1,V=function(){function a(b){var c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};R(this,a),K.SUPPORTED&&(g(),this.state={destroyed:!1},this.selector=b,this.settings=T({},N,c),(c.show||c.shown||c.hide||c.hidden)&&console.warn('Callbacks without the `on` prefix are deprecated (with the exception of `wait`). Use onShow, onShown, onHide, and onHidden instead.'),this.callbacks={wait:c.wait,show:c.onShow||c.show||r,shown:c.onShown||c.shown||r,hide:c.onHide||c.hide||r,hidden:c.onHidden||c.hidden||r},this.store=H.call(this,v(b)),L.push.apply(L,this.store))}return S(a,[{key:'getPopperElement',value:function(a){try{return d(this.store,function(b){return b.el===a}).popper}catch(a){console.error('[getPopperElement]: Element passed as the argument does not exist in the instance')}}},{key:'getReferenceElement',value:function(a){try{return d(this.store,function(b){return b.popper===a}).el}catch(a){console.error('[getReferenceElement]: Popper passed as the argument does not exist in the instance')}}},{key:'getReferenceData',value:function(a){return d(this.store,function(b){return b.el===a||b.popper===a})}},{key:'show',value:function(a,b){var c=this;if(!this.state.destroyed){var e=d(this.store,function(b){return b.popper===a}),f=o(a),g=f.tooltip,i=f.circle,j=f.content;if(!this.selector.refObj&&!document.body.contains(e.el))return void this.destroy(a);this.callbacks.show.call(a);var k=e.el,l=e.settings,r=l.appendTo,s=l.sticky,t=l.interactive,u=l.followCursor,v=l.flipDuration,x=l.duration,y=void 0===b?Array.isArray(x)?x[0]:x:b;p([a,g,i],0),z(e),a.style.visibility='visible',a.setAttribute('aria-hidden','false'),h(function(){q(a)&&((!u||K.touch)&&(e.popperInstance.update(),p([a],v)),p([g,i],y),i&&(j.style.opacity=1),t&&k.classList.add('active'),s&&A(e),m(g,i),n([g,i],function(a){a.contains('tippy-notransition')&&a.remove('tippy-notransition'),a.remove('leave'),a.add('enter')}),w(e,y,function(){!q(a)||e._onShownFired||(t&&a.focus(),g.classList.add('tippy-notransition'),e._onShownFired=!0,c.callbacks.shown.call(a))}))})}}},{key:'hide',value:function(a,b){var c=this;if(!this.state.destroyed){this.callbacks.hide.call(a);var e=d(this.store,function(b){return b.popper===a}),f=o(a),g=f.tooltip,h=f.circle,i=f.content,j=e.el,k=e.settings,m=k.appendTo,r=k.sticky,s=k.interactive,t=k.followCursor,v=k.html,x=k.trigger,y=k.duration,z=void 0===b?Array.isArray(y)?y[1]:y:b;e._onShownFired=!1,s&&j.classList.remove('active'),a.style.visibility='hidden',a.setAttribute('aria-hidden','true'),p([g,h,h?i:null],z),h&&(i.style.opacity=0),n([g,h],function(a){a.contains('tippy-tooltip')&&a.remove('tippy-notransition'),a.remove('enter'),a.add('leave')}),v&&-1!==x.indexOf('click')&&l(j)&&j.focus(),w(e,z,function(){q(a)||!m.contains(a)||'1'===getComputedStyle(g).opacity||(j.removeEventListener('mousemove',u),e.popperInstance.disableEventListeners(),m.removeChild(a),c.callbacks.hidden.call(a))})}}},{key:'update',value:function(a){if(!this.state.destroyed){var b=d(this.store,function(b){return b.popper===a}),c=o(a),e=c.content,f=b.el,g=b.settings.html;return g instanceof Element?void console.warn('Aborted: update() should not be used if `html` is a DOM element'):void(e.innerHTML=g?document.getElementById(g.replace('#','')).innerHTML:f.getAttribute('title')||f.getAttribute('data-original-title'),!g&&k(f))}}},{key:'destroy',value:function(a,b){var c=this;if(!this.state.destroyed){var e=d(this.store,function(b){return b.popper===a}),f=e.el,g=e.popperInstance,h=e.listeners,i=e._mutationObservers;q(a)&&this.hide(a,0),h.forEach(function(a){return f.removeEventListener(a.event,a.handler)}),f.setAttribute('title',f.getAttribute('data-original-title')),f.removeAttribute('data-original-title'),f.removeAttribute('data-tooltipped'),f.removeAttribute('aria-describedby'),g&&g.destroy(),i.forEach(function(a){a&&a.disconnect()}),L.splice(j(L,function(b){return b.popper===a}),1),(void 0===b||b)&&(this.store=L.filter(function(a){return a.tippyInstance===c}))}}},{key:'destroyAll',value:function(){var a=this;if(!this.state.destroyed){var b=this.store.length;this.store.forEach(function(c,d){var e=c.popper;a.destroy(e,d===b-1)}),this.store=null,this.state.destroyed=!0}}}]),a}();return I.Browser=K,I.Defaults=N,I.disableDynamicInputDetection=function(){return K.dynamicInputDetection=!1},I.enableDynamicInputDetection=function(){return K.dynamicInputDetection=!0},I}); |
{ | ||
"name": "tippy.js", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "Vanilla JS Tooltip Library", | ||
@@ -5,0 +5,0 @@ "main": "dist/tippy.js", |
@@ -0,1 +1,3 @@ | ||
import isObjectLiteral from '../utils/isObjectLiteral' | ||
/** | ||
@@ -7,6 +9,10 @@ * Returns an array of elements based on the selector input | ||
export default function getArrayOfElements(selector) { | ||
if (selector instanceof Element) { | ||
if (selector instanceof Element || isObjectLiteral(selector)) { | ||
return [selector] | ||
} | ||
if (selector instanceof NodeList) { | ||
return [].slice.call(selector) | ||
} | ||
if (Array.isArray(selector)) { | ||
@@ -16,7 +22,7 @@ return selector | ||
if (selector.constructor.name === 'NodeList') { | ||
return [].slice.call(selector) | ||
try { | ||
return [].slice.call(document.querySelectorAll(selector)) | ||
} catch (_) { | ||
return [] | ||
} | ||
return [].slice.call(document.querySelectorAll(selector)) | ||
} |
@@ -23,2 +23,3 @@ import { | ||
import noop from './utils/noop' | ||
import isObjectLiteral from './utils/isObjectLiteral' | ||
@@ -117,3 +118,4 @@ /* Core library functions */ | ||
if (!document.body.contains(data.el)) { | ||
// Destroy popper if its reference is no longer on the DOM (excluding refObjs) | ||
if (!this.selector.refObj && !document.body.contains(data.el)) { | ||
this.destroy(popper) | ||
@@ -357,2 +359,27 @@ return | ||
function tippy(selector, settings) { | ||
// Create a virtual object for custom positioning | ||
if (isObjectLiteral(selector)) { | ||
selector = { | ||
refObj: true, | ||
attributes: selector.attributes || {}, | ||
getBoundingClientRect: selector.getBoundingClientRect, | ||
clientWidth: selector.clientWidth, | ||
clientHeight: selector.clientHeight, | ||
setAttribute: (key, val) => { selector.attributes[key] = val }, | ||
getAttribute: key => selector.attributes[key], | ||
removeAttribute: key => { delete selector.attributes[key] }, | ||
addEventListener: () => {}, | ||
removeEventListener: () => {}, | ||
classList: { | ||
classNames: {}, | ||
add: key => { selector.classList.classNames[key] = true }, | ||
remove: key => { | ||
selector.classList.classNames[key] = false | ||
return true | ||
}, | ||
contains: key => !!selector.classList.classNames[key] | ||
} | ||
} | ||
} | ||
return new Tippy(selector, settings) | ||
@@ -359,0 +386,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
418195
9441