blob: 6b3d4f1ab4dd1a7eb0c77b1bae2b4b3a0fae2f49 [file] [log] [blame]
(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.tippy=t()})(this,function(){'use strict';function e(e){xe.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 t(e,t){var i=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),o=t.length;0<=--o&&t.item(o)!==this;);return-1<o},o=Element.prototype.closest||function(e){for(var t=this;t;){if(i.call(t,e))return t;t=t.parentElement}};return o.call(e,t)}function o(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function n(){if(n.done)return!1;n.done=!0,Pe.appendTo=document.body;var i=function(){Te.touch=!0,Te.iOS()&&document.body.classList.add('tippy-touch'),Te.dynamicInputDetection&&document.addEventListener('mousemove',r)},r=function(){var e;return function(){var t=performance.now();10>t-e&&(Te.touch=!1,document.removeEventListener('mousemove',r),!Te.iOS()&&document.body.classList.contains('tippy-touch')&&document.body.classList.remove('tippy-touch')),e=t}}();return document.addEventListener('click',function(i){if(!(i.target instanceof Element))return e();var n=t(i.target,Se.TOOLTIPPED_EL),r=t(i.target,Se.POPPER);if(r){var s=o(xe,function(e){return e.popper===r}),a=s.settings.interactive;if(a)return}if(n){var p=o(xe,function(e){return e.el===n}),l=p.settings,d=l.hideOnClick,c=l.multiple,f=l.trigger;if(!c&&Te.touch||!c&&-1!==f.indexOf('click'))return e(p);if(!0!==d||-1!==f.indexOf('click'))return}t(i.target,Se.CONTROLLER)||!document.querySelector(Se.POPPER)||e()}),document.addEventListener('touchstart',i),(!Te.SUPPORTS_TOUCH&&0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)&&document.addEventListener('pointerdown',i),!0}function r(e){window.requestAnimationFrame(function(){setTimeout(e,0)})}function s(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 a(e){var t=e.getAttribute('title');e.setAttribute('data-original-title',t||'html'),e.removeAttribute('title')}function p(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 l(e,t){t?window.getComputedStyle(t)[s('transform')]:window.getComputedStyle(e).opacity}function d(e,t){e.forEach(function(e){e&&t(e.classList)})}function c(e,t){var i;e.forEach(function(e){e&&(i=t,e.hasAttribute('x-circle')&&(i=Le(t/1.1)),e.style[s('transitionDuration')]=i+'ms')})}function f(e){return'visible'===e.style.visibility}function m(){}function h(e){return e.replace(/-.+/,'')}function u(t){var e,i,n=this,r=o(xe,function(e){return e.el===n}),a=r.popper,p=h(a.getAttribute('x-placement')),l=Le(a.offsetWidth/2),d=Le(a.offsetHeight/2),c=5,f=document.documentElement.offsetWidth||document.body.offsetWidth,m=t.pageX,u=t.pageY;'top'===p?(e=m-l,i=u-2.5*d):'left'===p?(e=m-2*l-15,i=u-d):'right'===p?(e=m+d,i=u-d):'bottom'===p?(e=m-l,i=u+d/1.5):void 0;('top'===p||'bottom'===p)&&(m+c+l>f&&(e=f-c-2*l),0>m-c-l&&(e=c)),a.style[s('transform')]='translate3d('+e+'px, '+i+'px, 0)'}function g(e){return e instanceof Element?[e]:[].slice.call(document.querySelectorAll(e))}function b(e,t,i){if(!t)return i();var o=e.popper.querySelector(Se.TOOLTIP),n=!1,r=function t(r){r.target!==o||(n=!0,o.removeEventListener('webkitTransitionEnd',t),o.removeEventListener('transitionend',t),i())};o.addEventListener('webkitTransitionEnd',r),o.addEventListener('transitionend',r),clearTimeout(e._transitionendTimeout),e._transitionendTimeout=setTimeout(function(){n||i()},t)}function y(e){return''!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function v(e,t){Object.keys(t).forEach(function(i){var o='';-1!==['width','height','top','right','bottom','left'].indexOf(i)&&y(t[i])&&(o='px'),e.style[i]=t[i]+o})}function E(e){return e&&'[object Function]'==={}.toString.call(e)}function O(e,t){if(1!==e.nodeType)return[];var i=window.getComputedStyle(e,null);return t?i[t]:i}function w(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function L(e){if(!e||-1!==['HTML','BODY','#document'].indexOf(e.nodeName))return window.document.body;var t=O(e),i=t.overflow,o=t.overflowX,n=t.overflowY;return /(auto|scroll)/.test(i+n+o)?e:L(w(e))}function T(e){var t=e.nodeName;return'BODY'!==t&&('HTML'===t||e.firstElementChild.offsetParent===e)}function x(e){return null===e.parentNode?e:x(e.parentNode)}function S(e){var t=e&&e.offsetParent,i=t&&t.nodeName;return i&&'BODY'!==i&&'HTML'!==i?t:window.document.documentElement}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 T(s)?s:S(s);var a=x(e);return a.host?P(a.host,t):P(e,x(t).host)}function A(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 C(e,t){var i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],o=A(t,'top'),n=A(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 k(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 I(e,t,i,o){return we(t['offset'+e],i['client'+e],i['offset'+e],Me()?i['offset'+e]+o['margin'+('Height'===e?'Top':'Left')]+o['margin'+('Height'===e?'Bottom':'Right')]:0)}function D(){var e=window.document.body,t=window.document.documentElement,i=Me()&&window.getComputedStyle(t);return{height:I('Height',e,t,i),width:I('Width',e,t,i)}}function R(e){return _e({},e,{right:e.left+e.width,bottom:e.top+e.height})}function H(e){var t={};if(Me())try{t=e.getBoundingClientRect();var i=A(e,'top'),o=A(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?D():{},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=O(e);p-=k(d,'x'),l-=k(d,'y'),n.width-=p,n.height-=l}return R(n)}function N(e,t){var i=Me(),o='HTML'===t.nodeName,n=H(e),r=H(t),s=L(e),a=R({top:n.top-r.top,left:n.left-r.left,width:n.width,height:n.height});if(a.marginTop=0,a.marginLeft=0,o||'BODY'===t.nodeName){var p=O(t),l=i&&o?0:+p.borderTopWidth.split('px')[0],d=i&&o?0:+p.borderLeftWidth.split('px')[0],c=i&&o?0:+p.marginTop.split('px')[0],f=i&&o?0:+p.marginLeft.split('px')[0];a.top-=l-c,a.bottom-=l-c,a.left-=d-f,a.right-=d-f,a.marginTop=c,a.marginLeft=f}return(i?t.contains(s):t===s&&'BODY'!==s.nodeName)&&(a=C(a,t)),a}function B(e){var t=window.document.documentElement,i=N(e,t),o=we(t.clientWidth,window.innerWidth||0),n=we(t.clientHeight,window.innerHeight||0),r=A(t),s=A(t,'left'),a={top:r-i.top+i.marginTop,left:s-i.left+i.marginLeft,width:o,height:n};return R(a)}function M(e){var t=e.nodeName;return'BODY'===t||'HTML'===t?!1:'fixed'===O(e,'position')||M(w(e))}function W(e,t,i,o){var n={top:0,left:0},r=P(e,t);if('viewport'===o)n=B(r);else{var s;'scrollParent'===o?(s=L(w(e)),'BODY'===s.nodeName&&(s=window.document.documentElement)):'window'===o?s=window.document.documentElement:s=o;var a=N(s,r);if('HTML'===s.nodeName&&!M(r)){var p=D(),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 U(e){var t=e.width,i=e.height;return t*i}function q(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=W(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 _e({key:e},a[e],{area:U(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 _(e,t,i){var o=P(t,i);return N(i,o)}function F(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 Y(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 z(e,t,i){i=i.split('-')[0];var o=F(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[Y(a)],n}function j(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function K(e,t,i){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===i});var o=j(e,function(e){return e[t]===i});return e.indexOf(o)}function G(e,t,i){var o=void 0===i?e:e.slice(0,K(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&&E(i)&&(t.offsets.popper=R(t.offsets.popper),t.offsets.reference=R(t.offsets.reference),t=i(t,e))}),t}function X(){if(!this.state.isDestroyed){var e={instance:this,styles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=_(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=z(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position='absolute',e=G(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function V(e,t){return e.some(function(e){var i=e.name,o=e.enabled;return o&&i===t})}function Q(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 J(){return this.state.isDestroyed=!0,V(this.modifiers,'applyStyle')&&(this.popper.removeAttribute('x-placement'),this.popper.style.left='',this.popper.style.position='',this.popper.style.top='',this.popper.style[Q('transform')]=''),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function Z(e,t,i,o){var n='BODY'===e.nodeName,r=n?window:e;r.addEventListener(t,i,{passive:!0}),n||Z(L(r.parentNode),t,i,o),o.push(r)}function $(e,t,i,o){i.updateBound=o,window.addEventListener('resize',i.updateBound,{passive:!0});var n=L(e);return Z(n,'scroll',i.updateBound,i.scrollParents),i.scrollElement=n,i.eventsEnabled=!0,i}function ee(){this.state.eventsEnabled||(this.state=$(this.reference,this.options,this.state,this.scheduleUpdate))}function te(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 ie(){this.state.eventsEnabled&&(window.cancelAnimationFrame(this.scheduleUpdate),this.state=te(this.reference,this.state))}function oe(e,t){Object.keys(t).forEach(function(i){var o=t[i];!1===o?e.removeAttribute(i):e.setAttribute(i,t[i])})}function ne(e,t,i){var o=j(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 re(e){return'end'===e?'start':'start'===e?'end':e}function se(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],i=Ye.indexOf(e),o=Ye.slice(i+1).concat(Ye.slice(0,i));return t?o.reverse():o}function ae(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=R(a);return p[t]/100*r}if('vh'===s||'vw'===s){var l;return l='vh'===s?we(document.documentElement.clientHeight,window.innerHeight||0):we(document.documentElement.clientWidth,window.innerWidth||0),l/100*r}return r}function pe(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(j(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 ae(e,n,t,i)})}),l.forEach(function(e,t){e.forEach(function(i,o){y(i)&&(n[t]+=i*('-'===e[o-1]?-1:1))})}),n}function le(e){return-(e-Pe.distance)+'px'}function de(e){var t=e.el,i=e.popper,o=e.settings,n=o.position,r=o.popperOptions,s=o.offset,a=o.distance,p=i.querySelector(Se.TOOLTIP),l=Xe({placement:n},r||{},{modifiers:Xe({},r?r.modifiers:{},{flip:Xe({padding:a+5},r&&r.modifiers?r.modifiers.flip:{}),offset:Xe({offset:s},r&&r.modifiers?r.modifiers.offset:{})}),onUpdate:function(){p.style.top='',p.style.bottom='',p.style.left='',p.style.right='',p.style[h(i.getAttribute('x-placement'))]=le(a)}});return new je(t,i,l)}function ce(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||Te.touch)&&e.popperInstance.enableEventListeners()):e.popperInstance=de(e),r&&!Te.touch&&(t.addEventListener('mousemove',u),e.popperInstance.disableEventListeners()))}function fe(e){var t=e.popper,i=e.popperInstance,o=e.settings.stickyDuration,n=function(){return t.style[s('transitionDuration')]=o+'ms'},a=function(){return t.style[s('transitionDuration')]=''};r(function e(){i&&i.scheduleUpdate(),n(),f(t)?window.requestAnimationFrame(e):a()})}function me(e,t){var i=Ae.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 Xe({},t,i)}function he(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,u=i.interactive,g=document.createElement('div');g.setAttribute('class','tippy-popper'),g.setAttribute('role','tooltip'),g.setAttribute('aria-hidden','true'),g.setAttribute('id','tippy-tooltip-'+e),g.style.zIndex=m;var b=document.createElement('div');if(b.setAttribute('class','tippy-tooltip tippy-tooltip--'+d+' leave'),b.setAttribute('data-animation',p),c.split(' ').forEach(function(e){b.classList.add(e+'-theme')}),r){var y=document.createElement('div');y.setAttribute('class','arrow-'+l),y.setAttribute('x-arrow',''),b.appendChild(y)}if(s){b.setAttribute('data-animatefill','');var v=document.createElement('div');v.setAttribute('class','leave'),v.setAttribute('x-circle',''),b.appendChild(v)}a&&b.setAttribute('data-inertia',''),u&&b.setAttribute('data-interactive','');var E=document.createElement('div');if(E.setAttribute('class','tippy-tooltip-content'),f){var O;f instanceof Element?(E.appendChild(f),O=f.id||'tippy-html-template'):(E.innerHTML=document.getElementById(f.replace('#','')).innerHTML,O=f),g.classList.add('html-template'),g.setAttribute('tabindex','0'),b.setAttribute('data-template-id',O)}else E.innerHTML=t;return b.style[h(o)]=le(n),b.appendChild(E),g.appendChild(b),g}function ue(e,t,i,o){var n=[];return'manual'===e?n:(t.addEventListener(e,i.handleTrigger),n.push({event:e,handler:i.handleTrigger}),'mouseenter'===e&&(Te.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 ge(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=h(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 be(e,i,o){var n,r,s=this,a=o.position,p=o.delay,l=o.duration,d=o.interactive,c=o.interactiveBorder,m=o.distance,h=o.hideOnClick,u=o.trigger,g=o.touchHold,b=o.touchWait,y=function(){clearTimeout(n),clearTimeout(r)},v=function(){if(y(),!f(i)){var e=Array.isArray(p)?p[0]:p;p?n=setTimeout(function(){return s.show(i)},e):s.show(i)}},E=function(e){return s.callbacks.wait?s.callbacks.wait.call(i,v,e):v()},O=function(){y();var e=Array.isArray(p)?p[1]:p;p?r=setTimeout(function(){return s.hide(i)},e):s.hide(i)};return{handleTrigger:function(t){if('mouseenter'===t.type&&Te.SUPPORTS_TOUCH&&Te.touch){if(g)return;Te.iOS()&&e.click()}var o='click'===t.type;o&&f(i)&&'persistent'!==h?O():E(t)},handleMouseleave:function(n){if(!('mouseleave'===n.type&&Te.SUPPORTS_TOUCH&&Te.touch&&g)){if(d){var r=function n(r){var s=function(){document.body.removeEventListener('mouseleave',O),document.removeEventListener('mousemove',n),O()},a=t(r.target,Se.TOOLTIPPED_EL),p=t(r.target,Se.POPPER)===i,l=-1!==u.indexOf('click');return a&&a!==e?s():void(p||a===e||l||ge(r,i,o)&&s())};return document.body.addEventListener('mouseleave',O),void document.addEventListener('mousemove',r)}O()}},handleBlur:function(e){Te.touch||!e.relatedTarget||t(e.relatedTarget,Se.POPPER)||O()}}}function ye(e){var t=this;e.forEach(function(e){var i=t.settings.performance?t.settings:me(e,t.settings);i.arrow&&(i.animateFill=!1);var o=i.html,n=i.trigger,r=i.touchHold,s=e.getAttribute('title');if(s||o){var p=Ve;e.setAttribute('data-tooltipped',''),e.setAttribute('aria-describedby','tippy-tooltip-'+p),a(e);var l=he(p,s,i),d=be.call(t,e,l,i),c=[];n.trim().split(' ').forEach(function(t){return c=c.concat(ue(t,e,d,r))}),xe.push({id:p,el:e,popper:l,settings:i,listeners:c,tippyInstance:t}),Ve++}})}function ve(e,t){return new Qe(e,t)}var Ee=Math.floor,Oe=Math.min,we=Math.max,Le=Math.round,Te={};'undefined'!=typeof window&&(Te.SUPPORTED=!!window.requestAnimationFrame,Te.SUPPORTS_TOUCH='ontouchstart'in window,Te.touch=!1,Te.iOS=function(){return /iPhone|iPad|iPod/.test(navigator.userAgent)&&!window.MSStream},Te.dynamicInputDetection=!0);for(var xe=[],Se={POPPER:'.tippy-popper',TOOLTIP:'.tippy-tooltip',CONTENT:'.tippy-tooltip-content',CIRCLE:'[x-circle]',ARROW:'[x-arrow]',TOOLTIPPED_EL:'[data-tooltipped]',CONTROLLER:'[data-tippy-controller]'},Pe={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:300,sticky:!1,stickyDuration:200,appendTo:null,zIndex:9999,touchHold:!1,performance:!1,popperOptions:{}},Ae=Te.SUPPORTED&&Object.keys(Pe),Ce=['native code','[object MutationObserverConstructor]'],ke=function(e){return Ce.some(function(t){return-1<(e||'').toString().indexOf(t)})},Ie='undefined'!=typeof window,De=['Edge','Trident','Firefox'],Re=0,He=0;He<De.length;He+=1)if(Ie&&0<=navigator.userAgent.indexOf(De[He])){Re=1;break}var i,Ne=Ie&&ke(window.MutationObserver),Be=Ne?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()},Re))}},Me=function(){return void 0==i&&(i=-1!==navigator.appVersion.indexOf('MSIE 10')),i},We=function(e,t){if(!(e instanceof t))throw new TypeError('Cannot call a class as a function')},Ue=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}}(),qe=function(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e},_e=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},Fe=['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'],Ye=Fe.slice(3),ze={FLIP:'flip',CLOCKWISE:'clockwise',COUNTERCLOCKWISE:'counterclockwise'},je=function(){function e(t,i){var o=this,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};We(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(o.update)},this.update=Be(this.update.bind(this)),this.options=_e({},e.Defaults,n),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t.jquery?t[0]:t,this.popper=i.jquery?i[0]:i,v(this.popper,{position:'absolute'}),this.options.modifiers={},Object.keys(_e({},e.Defaults.modifiers,n.modifiers)).forEach(function(t){o.options.modifiers[t]=_e({},e.Defaults.modifiers[t]||{},n.modifiers?n.modifiers[t]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return _e({name:e},o.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&E(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 Ue(e,[{key:'update',value:function(){return X.call(this)}},{key:'destroy',value:function(){return J.call(this)}},{key:'enableEventListeners',value:function(){return ee.call(this)}},{key:'disableEventListeners',value:function(){return ie.call(this)}}]),e}();je.Utils=('undefined'==typeof window?global:window).PopperUtils,je.placements=Fe,je.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:qe({},p,r[p]),end:qe({},p,r[p]+r[l]-s[l])};e.offsets.popper=_e({},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=y(+o)?[+o,0]:pe(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||S(e.instance.popper);e.instance.reference===i&&(i=S(i));var o=W(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=we(r[e],o[e])),qe({},e,i)},secondary:function(e){var i='right'===e?'left':'top',n=r[i];return r[e]>o[e]&&!t.escapeWithReference&&(n=Oe(r[i],o[e]-('right'===e?r.width:r.height))),qe({},i,n)}};return n.forEach(function(e){var t=-1===['left','top'].indexOf(e)?'secondary':'primary';r=_e({},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=Ee,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(!ne(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=a?'left':'top',c=a?'bottom':'right',f=F(i)[p];s[c]-f<r[l]&&(e.offsets.popper[l]-=r[l]-(s[c]-f)),s[l]+f>r[c]&&(e.offsets.popper[l]+=s[l]+f-r[c]);var m=s[l]+s[p]/2-f/2,h=m-R(e.offsets.popper)[l];return h=we(Oe(r[p]-f,h),0),e.arrowElement=i,e.offsets.arrow={},e.offsets.arrow[l]=Le(h),e.offsets.arrow[d]='',e},element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:function(e,t){if(V(e.instance.modifiers,'inner'))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var i=W(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),o=e.placement.split('-')[0],n=Y(o),r=e.placement.split('-')[1]||'',s=[];switch(t.behavior){case ze.FLIP:s=[o,n];break;case ze.CLOCKWISE:s=se(o);break;case ze.COUNTERCLOCKWISE:s=se(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=Y(o);var l=e.offsets.popper,d=e.offsets.reference,c=Ee,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=re(r)),e.placement=o+(r?'-'+r:''),e.offsets.popper=_e({},e.offsets.popper,z(e.instance.popper,e.offsets.reference,e.placement)),e=G(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[t]-(a?n[s?'width':'height']:0),e.placement=Y(t),e.offsets.popper=R(n),e}},hide:{order:800,enabled:!0,fn:function(e){if(!ne(e.instance.modifiers,'hide','preventOverflow'))return e;var t=e.offsets.reference,i=j(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=j(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=H(l),c={position:n.position},f={left:Le(n.left),top:Le(n.top),bottom:Le(n.bottom),right:Le(n.right)},m='bottom'===i?'top':'bottom',h='right'===o?'left':'right',u=Q('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=y,e.styles=_e({},c,e.styles),e},gpuAcceleration:!0,x:'bottom',y:'right'},applyStyle:{order:900,enabled:!0,fn:function(e){return v(e.instance.popper,e.styles),oe(e.instance.popper,e.attributes),e.offsets.arrow&&v(e.arrowElement,e.offsets.arrow),e},onLoad:function(e,t,i,o,n){var r=_(n,t,e),s=q(i.placement,r,t,e,i.modifiers.flip.boundariesElement,i.modifiers.flip.padding);return t.setAttribute('x-placement',s),i},gpuAcceleration:void 0}}};var 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=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=1,Qe=function(){function e(t){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};Ke(this,e),Te.SUPPORTED&&(n(),this.state={destroyed:!1},this.selector=t,this.settings=Xe({},Pe,i),this.callbacks={wait:i.wait,show:i.show||m,shown:i.shown||m,hide:i.hide||m,hidden:i.hidden||m},ye.call(this,g(t)))}return Ge(e,[{key:'getPopperElement',value:function(e){var t=this;try{return o(xe.filter(function(e){return e.tippyInstance===t}),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){var t=this;try{return o(xe.filter(function(e){return e.tippyInstance===t}),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 o(xe,function(t){return t.el===e||t.popper===e})}},{key:'show',value:function(e,t){var i=this;if(!this.state.destroyed){this.callbacks.show.call(e);var n=o(xe,function(t){return t.popper===e}),s=e.querySelector(Se.TOOLTIP),a=e.querySelector(Se.CIRCLE),p=n.el,m=n.settings,h=m.appendTo,u=m.sticky,g=m.interactive,y=m.followCursor,v=m.flipDuration,E=m.duration,O=void 0===t?Array.isArray(E)?E[0]:E:t;c([e,s,a],0),ce(n),e.style.visibility='visible',e.setAttribute('aria-hidden','false'),r(function(){f(e)&&((!y||Te.touch)&&n.popperInstance.update(),c([s,a],O,!0),(!y||Te.touch)&&c([e],v,!0),g&&p.classList.add('active'),u&&fe(n),l(s,a),d([s,a],function(e){e.contains('tippy-notransition')&&e.remove('tippy-notransition'),e.remove('leave'),e.add('enter')}),b(n,O,function(){!f(e)||n._onShownFired||(g&&e.focus(),s.classList.add('tippy-notransition'),n._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 n=o(xe,function(t){return t.popper===e}),r=e.querySelector(Se.TOOLTIP),s=e.querySelector(Se.CIRCLE),a=e.querySelector(Se.CONTENT),l=n.el,m=n.settings,h=m.appendTo,g=m.sticky,y=m.interactive,v=m.followCursor,E=m.html,O=m.trigger,w=m.duration,L=void 0===t?Array.isArray(w)?w[1]:w:t;n._onShownFired=!1,y&&l.classList.remove('active'),e.style.visibility='hidden',e.setAttribute('aria-hidden','true'),c([r,s],L),d([r,s],function(e){e.contains('tippy-tooltip')&&e.remove('tippy-notransition'),e.remove('enter'),e.add('leave')}),E&&-1!==O.indexOf('click')&&p(l)&&l.focus(),b(n,L,function(){f(e)||!h.contains(e)||(l.removeEventListener('mousemove',u),n.popperInstance.disableEventListeners(),h.removeChild(e),i.callbacks.hidden.call(e))})}}},{key:'destroy',value:function(e){if(!this.state.destroyed){var t=o(xe,function(t){return t.popper===e}),i=t.el,n=t.popperInstance,r=t.listeners;f(e)&&this.hide(e,0),r.forEach(function(e){return i.removeEventListener(e.event,e.handler)}),i.setAttribute('title',i.getAttribute('data-original-title')),i.removeAttribute('data-original-title'),i.removeAttribute('data-tooltipped'),i.removeAttribute('aria-describedby'),n&&n.destroy(),xe.splice(xe.map(function(e){return e.popper}).indexOf(e),1)}}},{key:'update',value:function(e){if(!this.state.destroyed){var t=o(xe,function(t){return t.popper===e}),i=e.querySelector(Se.CONTENT),n=t.el,r=t.settings.html;r?i.innerHTML=r instanceof Element?r.innerHTML:document.getElementById(r.replace('#','')).innerHTML:(i.innerHTML=n.getAttribute('title')||n.getAttribute('data-original-title'),a(n))}}},{key:'destroyAll',value:function(){var e=this;this.state.destroyed||(xe.filter(function(t){return t.tippyInstance===e}).forEach(function(t){e.destroy(t.popper)}),this.state.destroyed=!0)}}]),e}();return ve.Browser=Te,ve.Defaults=Pe,ve.disableDynamicInputDetection=function(){return Te.dynamicInputDetection=!1},ve.enableDynamicInputDetection=function(){return Te.dynamicInputDetection=!0},ve});