You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
34 KiB
JavaScript
2 lines
34 KiB
JavaScript
7 years ago
|
(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){Pe.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 t(e,t){var o=Element.prototype.closest||function(e){for(var t=this;t;){if(Ie.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(){var i=function(){xe.touch=!0,xe.iOS()&&document.body.classList.add('tippy-touch'),xe.dynamicInputDetection&&document.addEventListener('mousemove',n)},n=function(){var e;return function(){var t=performance&&performance.now();t&&10>t-e&&(xe.touch=!1,document.removeEventListener('mousemove',n),!xe.iOS()&&document.body.classList.contains('tippy-touch')&&document.body.classList.remove('tippy-touch')),e=t}}();document.addEventListener('click',function(i){if(!(i.target instanceof Element))return e();var n=t(i.target,Ce.TOOLTIPPED_EL),r=t(i.target,Ce.POPPER);if(r){var s=o(Pe,function(e){return e.popper===r}),a=s.settings.interactive;if(a)return}if(n){var p=o(Pe,function(e){return e.el===n}),l=p.settings,d=l.hideOnClick,c=l.multiple,f=l.trigger;if(!c&&xe.touch||!c&&-1!==f.indexOf('click'))return e(p);if(!0!==d||-1!==f.indexOf('click'))return}t(i.target,Ce.CONTROLLER)||!document.querySelector(Ce.POPPER)||e()}),document.addEventListener('touchstart',i),window.addEventListener('blur',function(){var e=document,t=e.activeElement;t&&t.blur&&Ie.call(t,Ce.TOOLTIPPED_EL)&&t.blur()}),!xe.SUPPORTS_TOUCH&&(0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)&&document.addEventListener('pointerdown',i)}function r(){return!r.done&&(r.done=!0,Ae.appendTo=document.body,n(),!0)}function s(e){window.requestAnimationFrame(function(){setTimeout(e,0)})}function a(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 p(e,t){return Array.prototype.findIndex?e.findIndex(t):e.indexOf(o(e,t))}function l(e){var t=e.getAttribute('title');e.setAttribute('data-original-title',t||'html'),e.removeAttribute('title')}function d(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 c(e,t){t?window.getComputedStyle(t)[a('transform')]:window.getComputedStyle(e).opacity}function f(e,t){e.forEach(function(e){e&&t(e.classList)})}function m(e,t){e.forEach(function(e){if(e){var o=Ie.call(e,Ce.CONTENT),i=o?Se(t/1.3):t;e.style[a('transitionDuration')]=i+'ms'}})}function h(e){return'visible'===e.style.visibility}function u(){}function g(e){return e.replace(/-.+/,'')}function b(t){var e,i,n=this,r=o(Pe,function(e){return e.el===n}),s=r.popper,p=r.settings.offset,l=g(s.getAttribute('x-placement')),d=Se(s.offsetWidth/2),c=Se(s.offsetHeight/2),f=5,m=document.documentElement.offsetWidth||document.body.offsetWidth,h=t.pageX,u=t.pageY;'top'===l?(e=h-d+p,i=u-2.25*c):'left'===l?(e=h-2*d-10,i=u-c+p):'right'===l?(e=h+c,i=u-c+p):'bottom'===l?(e=h-d+p,i=u+c/1.5):void 0;('top'===l||'bottom'===l)&&(h+f+d+p>m&&(e=m-f-2*d),0>h-f-d+p&&(e=f)),s.style[a('transform')]='translate3d('+e+'px, '+i+'px, 0)'}function y(e){return e instanceof Element?[e]:[].slice.call(document.querySelectorAll(e))}function v(e,t,o){if(!t)return o();var i=e.popper.querySelector(Ce.TOOLTIP),n=!1,r=function t(r){r.target!==i||(n=!0,i.removeEventListener('webkitTransitionEnd',t),i.removeEventListener('transitionend',t),o())};i.addEventListener('webkitTransitionEnd',r),i.addEventListener('transitionend',r),clearTimeout(e._transitionendTimeout),e._transitionendTimeout=setTimeout(function(){n||o()},t)}function E(e){return e&&'[object Function]'==={}.toString.call(e)}function O(e,t){if(1!==e.nodeType)return[];var o=windo
|