UNPKG

tippy.js

Version:

Highly customizable tooltip and popover library

3 lines (2 loc) 22.9 kB
var tippy=function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;function e(){return(e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var n={passive:!0},r="tippy-iOS",i="tippy-popper",o="tippy-tooltip",a="tippy-content",p="tippy-backdrop",u="tippy-arrow",s="tippy-svg-arrow",c="."+i,f="."+o,l="."+a,d="."+u,v="."+s,m={isTouch:!1},h=0;function g(){m.isTouch||(m.isTouch=!0,window.performance&&document.addEventListener("mousemove",b))}function b(){var t=performance.now();t-h<20&&(m.isTouch=!1,document.removeEventListener("mousemove",b)),h=t}function y(){var t=document.activeElement,e=t._tippy;t&&t.blur&&e&&!e.state.isVisible&&t.blur()}var w="undefined"!=typeof window&&"undefined"!=typeof document,E=w?navigator.userAgent:"",T=/MSIE |Trident\//.test(E),A=/UCBrowser\//.test(E),C=w&&/iPhone|iPad|iPod/.test(navigator.platform);function x(t){var e=t&&C&&m.isTouch;document.body.classList[e?"add":"remove"](r)}var I="5.0.3",O={allowHTML:!0,animation:"fade",appendTo:function(){return document.body},aria:"describedby",arrow:!0,boundary:"scrollParent",content:"",delay:0,distance:10,duration:[300,250],flip:!0,flipBehavior:"flip",flipOnUpdate:!1,hideOnClick:!0,ignoreAttributes:!1,inertia:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,lazy:!0,maxWidth:350,multiple:!1,offset:0,onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},placement:"top",popperOptions:{},role:"tooltip",showOnCreate:!1,theme:"",touch:!0,trigger:"mouseenter focus",triggerTarget:null,updateDuration:0,zIndex:9999},L=["arrow","boundary","distance","flip","flipBehavior","flipOnUpdate","offset","placement","popperOptions"];function D(t,n){return e({},t,{},n.reduce(function(e,n){var r=n.name,i=n.defaultValue;return r&&(e[r]=void 0!==t[r]?t[r]:i),e},{}))}var M=Object.keys(O);function k(t,e){return{}.hasOwnProperty.call(t,e)}function P(t){return S(t)?[t]:function(t){return B(t,"NodeList")}(t)?X(t):Array.isArray(t)?t:X(document.querySelectorAll(t))}function V(t,e,n){if(Array.isArray(t)){var r=t[e];return null==r?Array.isArray(n)?n[e]:n:r}return t}function U(t,e){return t&&t.modifiers&&t.modifiers[e]}function B(t,e){var n={}.toString.call(t);return 0===n.indexOf("[object")&&n.indexOf(e+"]")>-1}function S(t){return B(t,"Element")}function H(t){return B(t,"MouseEvent")}function N(t,e){return"function"==typeof t?t.apply(void 0,e):t}function z(t,e){t.filter(function(t){return"flip"===t.name})[0].enabled=e}function R(){return document.createElement("div")}function q(t,e){t.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function j(t,e){t.forEach(function(t){t&&t.setAttribute("data-state",e)})}function _(t,n,r){var i=e({},n,{content:N(n.content,[t])},n.ignoreAttributes?{}:function(t,e){return(e?Object.keys(D(O,e)):M).reduce(function(e,n){var r=(t.getAttribute("data-tippy-"+n)||"").trim();if(!r)return e;if("content"===n)e[n]=r;else try{e[n]=JSON.parse(r)}catch(t){e[n]=r}return e},{})}(t,r));return i.interactive&&(i.aria=null),i}function W(t,e){return 0===e?t:function(r){clearTimeout(n),n=setTimeout(function(){t(r)},e)};var n}function F(t,e,n){t&&t!==e&&t.apply(void 0,n)}function X(t){return[].slice.call(t)}function Y(t,e){for(;t;){if(e(t))return t;t=t.parentElement}return null}function J(t,e){return t.indexOf(e)>-1}function G(t){return t.split(/\s+/).filter(Boolean)}function K(t,e){return void 0!==t?t:e}function Q(t){return[].concat(t)}function Z(t){var e=Q(t)[0];return e&&e.ownerDocument||document}function $(t,e){-1===t.indexOf(e)&&t.push(e)}function tt(t){return"number"==typeof t?t+"px":t}function et(t,e){t.innerHTML=S(e)?e.innerHTML:e}function nt(t,e){if(S(e.content))et(t,""),t.appendChild(e.content);else if("function"!=typeof e.content){t[e.allowHTML?"innerHTML":"textContent"]=e.content}}function rt(t){return{tooltip:t.querySelector(f),content:t.querySelector(l),arrow:t.querySelector(d)||t.querySelector(v)}}function it(t){t.setAttribute("data-inertia","")}function ot(t){var e=R();return!0===t?e.className=u:(e.className=s,S(t)?e.appendChild(t):et(e,t)),e}function at(t){t.setAttribute("data-interactive","")}function pt(t,e,n){var r=A&&void 0!==document.body.style.webkitTransition?"webkitTransitionEnd":"transitionend";t[e+"EventListener"](r,n)}function ut(t){return t.split("-")[0]}function st(t,e,n){G(n).forEach(function(n){t.classList[e](n+"-theme")})}function ct(t,e){var n=R();n.className=i,n.style.position="absolute",n.style.top="0",n.style.left="0";var r=R();r.className=o,r.id="tippy-"+t,r.setAttribute("data-state","hidden"),r.setAttribute("tabindex","-1"),st(r,"add",e.theme);var p=R();return p.className=a,p.setAttribute("data-state","hidden"),e.interactive&&at(r),e.arrow&&(r.setAttribute("data-arrow",""),r.appendChild(ot(e.arrow))),e.inertia&&it(r),nt(p,e),r.appendChild(p),n.appendChild(r),ft(n,e,e),n}function ft(t,e,n){var r=rt(t),i=r.tooltip,o=r.content,a=r.arrow;t.style.zIndex=""+n.zIndex,i.setAttribute("data-animation",n.animation),i.style.maxWidth=tt(n.maxWidth),n.role?i.setAttribute("role",n.role):i.removeAttribute("role"),e.content!==n.content&&nt(o,n),!e.arrow&&n.arrow?(i.appendChild(ot(n.arrow)),i.setAttribute("data-arrow","")):e.arrow&&!n.arrow?(i.removeChild(a),i.removeAttribute("data-arrow")):e.arrow!==n.arrow&&(i.removeChild(a),i.appendChild(ot(n.arrow))),!e.interactive&&n.interactive?at(i):e.interactive&&!n.interactive&&function(t){t.removeAttribute("data-interactive")}(i),!e.inertia&&n.inertia?it(i):e.inertia&&!n.inertia&&function(t){t.removeAttribute("data-inertia")}(i),e.theme!==n.theme&&(st(i,"remove",e.theme),st(i,"add",n.theme))}var lt=[],dt=1,vt=[];function mt(r,i,o){void 0===o&&(o=[]);var a,p,u,s=D(_(r,i,o),o);if(!s.multiple&&r._tippy)return null;var f,l,d,v,h=!1,g=!1,b=0,y=[],w=W(xt,s.interactiveDebounce),E=Z(s.triggerTarget||r),A=dt++,C=ct(A,s),I=rt(C),M=I.tooltip,P=I.content,B=[M,P],S={id:A,reference:r,popper:C,popperChildren:I,popperInstance:null,props:s,state:{currentPlacement:null,isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:o,clearDelayTimeouts:function(){clearTimeout(a),clearTimeout(p),cancelAnimationFrame(u)},setProps:function(t){if(S.state.isDestroyed)return;at("onBeforeUpdate",[S,t]),At();var n=S.props,i=_(r,e({},S.props,{},t,{ignoreAttributes:!0}),o);i.ignoreAttributes=K(t.ignoreAttributes,n.ignoreAttributes),S.props=i,Tt(),n.interactiveDebounce!==i.interactiveDebounce&&(ht(),w=W(xt,i.interactiveDebounce));ft(C,n,i),S.popperChildren=rt(C),n.triggerTarget&&!i.triggerTarget?Q(n.triggerTarget).forEach(function(t){t.removeAttribute("aria-expanded")}):i.triggerTarget&&r.removeAttribute("aria-expanded");mt(),S.popperInstance&&(L.some(function(e){return k(t,e)&&t[e]!==n[e]})?(S.popperInstance.destroy(),Dt(),S.state.isVisible&&S.popperInstance.enableEventListeners()):S.popperInstance.update());at("onAfterUpdate",[S,t])},setContent:function(t){S.setProps({content:t})},show:function(t){void 0===t&&(t=V(S.props.duration,0,O.duration));var e=S.state.isVisible,n=S.state.isDestroyed,r=!S.state.isEnabled,i=m.isTouch&&!S.props.touch;if(e||n||r||i)return;if(it().hasAttribute("disabled"))return;if(at("onShow",[S],!1),!1===S.props.onShow(S))return;bt(),C.style.visibility="visible",S.state.isVisible=!0,S.state.isMounted||q(B.concat(C),0);l=function(){S.state.isVisible&&(q([C],S.props.updateDuration),q(B,t),j(B,"visible"),st(),mt(),$(lt,S),x(!0),S.state.isMounted=!0,at("onMount",[S]),function(t,e){wt(t,e)}(t,function(){S.state.isShown=!0,at("onShown",[S])}))},function(){b=0;var t,e=S.props.appendTo,n=it();t=S.props.interactive&&e===O.appendTo||"parent"===e?n.parentNode:N(e,[n]);t.contains(C)||t.appendChild(C);S.popperInstance?(z(S.popperInstance.modifiers,S.props.flip),S.popperInstance.enableEventListeners(),S.popperInstance.update()):(Dt(),S.popperInstance.enableEventListeners())}()},hide:function(t){void 0===t&&(t=V(S.props.duration,1,O.duration));var e=!S.state.isVisible&&!h,n=S.state.isDestroyed,r=!S.state.isEnabled&&!h;if(e||n||r)return;if(at("onHide",[S],!1),!1===S.props.onHide(S)&&!h)return;yt(),C.style.visibility="hidden",S.state.isVisible=!1,S.state.isShown=!1,q(B,t),j(B,"hidden"),st(),mt(),function(t,e){wt(t,function(){!S.state.isVisible&&C.parentNode&&C.parentNode.contains(C)&&e()})}(t,function(){S.popperInstance.disableEventListeners(),S.popperInstance.options.placement=S.props.placement,C.parentNode.removeChild(C),0===(lt=lt.filter(function(t){return t!==S})).length&&x(!1),S.state.isMounted=!1,at("onHidden",[S])})},enable:function(){S.state.isEnabled=!0},disable:function(){S.hide(),S.state.isEnabled=!1},destroy:function(){if(S.state.isDestroyed)return;h=!0,S.clearDelayTimeouts(),S.hide(0),At(),delete r._tippy,S.popperInstance&&S.popperInstance.destroy();h=!1,S.state.isDestroyed=!0,at("onDestroy",[S])}};r._tippy=S,C._tippy=S;var R=o.map(function(t){return t.fn(S)});return Tt(),mt(),s.lazy||Dt(),at("onCreate",[S]),s.showOnCreate&&kt(),C.addEventListener("mouseenter",function(){S.props.interactive&&S.state.isVisible&&S.clearDelayTimeouts()}),C.addEventListener("mouseleave",function(){S.props.interactive&&J(S.props.trigger,"mouseenter")&&E.addEventListener("mousemove",w)}),S;function et(){var t=S.props.touch;return Array.isArray(t)?t:[t,0]}function nt(){return"hold"===et()[0]}function it(){return v||r}function ot(t){return S.state.isMounted&&!S.state.isVisible||m.isTouch||!f||"focus"===f.type?0:V(S.props.delay,t?0:1,O.delay)}function at(t,e,n){var r;(void 0===n&&(n=!0),R.forEach(function(n){k(n,t)&&n[t].apply(n,e)}),n)&&(r=S.props)[t].apply(r,e)}function st(){var t=S.props.aria;if(t){var e="aria-"+t,n=M.id;Q(S.props.triggerTarget||r).forEach(function(t){var r=t.getAttribute(e);if(S.state.isVisible)t.setAttribute(e,r?r+" "+n:n);else{var i=r&&r.replace(n,"").trim();i?t.setAttribute(e,i):t.removeAttribute(e)}})}}function mt(){Q(S.props.triggerTarget||r).forEach(function(t){S.props.interactive?t.setAttribute("aria-expanded",S.state.isVisible&&t===it()?"true":"false"):t.removeAttribute("aria-expanded")})}function ht(){E.body.removeEventListener("mouseleave",Pt),E.removeEventListener("mousemove",w),vt=vt.filter(function(t){return t!==w})}function gt(t){if(!S.props.interactive||!C.contains(t.target)){if(it().contains(t.target)){if(m.isTouch)return;if(S.state.isVisible&&J(S.props.trigger,"click"))return}!0===S.props.hideOnClick&&(S.clearDelayTimeouts(),S.hide(),g=!0,setTimeout(function(){g=!1}),S.state.isMounted||yt())}}function bt(){E.addEventListener("mousedown",gt,!0)}function yt(){E.removeEventListener("mousedown",gt,!0)}function wt(t,e){function n(t){t.target===M&&(pt(M,"remove",n),e())}if(0===t)return e();pt(M,"remove",d),pt(M,"add",n),d=n}function Et(t,e,n){void 0===n&&(n=!1),Q(S.props.triggerTarget||r).forEach(function(r){r.addEventListener(t,e,n),y.push({node:r,eventType:t,handler:e,options:n})})}function Tt(){nt()&&(Et("touchstart",Ct,n),Et("touchend",It,n)),G(S.props.trigger).forEach(function(t){if("manual"!==t)switch(Et(t,Ct),t){case"mouseenter":Et("mouseleave",It);break;case"focus":Et(T?"focusout":"blur",Ot)}})}function At(){y.forEach(function(t){var e=t.node,n=t.eventType,r=t.handler,i=t.options;e.removeEventListener(n,r,i)}),y=[]}function Ct(t){if(S.state.isEnabled&&!Lt(t)&&!g)if(f=t,v=t.currentTarget,mt(),!S.state.isVisible&&H(t)&&vt.forEach(function(e){return e(t)}),"click"===t.type&&!1!==S.props.hideOnClick&&S.state.isVisible)Pt(t);else{var e=et(),n=e[0],r=e[1];m.isTouch&&"hold"===n&&r?a=setTimeout(function(){kt(t)},r):kt(t)}}function xt(t){Y(t.target,function(t){return t===r||t===C})||function(t,e){var n=e.clientX,r=e.clientY;return t.every(function(t){var e=t.popperRect,i=t.interactiveBorder,o=e.top>r+i,a=e.bottom<r-i,p=e.left>n+i,u=e.right<n-i;return o||a||p||u})}(X(C.querySelectorAll(c)).concat(C).map(function(t){return{popperRect:t.getBoundingClientRect(),interactiveBorder:t._tippy.props.interactiveBorder}}),t)&&(ht(),Pt(t))}function It(t){if(!Lt(t))return S.props.interactive?(E.body.addEventListener("mouseleave",Pt),E.addEventListener("mousemove",w),void $(vt,w)):void Pt(t)}function Ot(t){t.target===it()&&(S.props.interactive&&t.relatedTarget&&C.contains(t.relatedTarget)||Pt(t))}function Lt(t){var e="ontouchstart"in window,n=J(t.type,"touch"),r=nt();return e&&m.isTouch&&r&&!n||m.isTouch&&!r&&n}function Dt(){var n=S.props.popperOptions,i=S.popperChildren.arrow;function o(t){S.state.currentPlacement=t.placement,S.props.flip&&!S.props.flipOnUpdate&&(t.flipped&&(S.popperInstance.options.placement=t.placement),z(S.popperInstance.modifiers,!1)),M.setAttribute("data-placement",t.placement),!1!==t.attributes["x-out-of-boundaries"]?M.setAttribute("data-out-of-boundaries",""):M.removeAttribute("data-out-of-boundaries");var e=ut(t.placement),n=tt(S.props.distance),r={bottom:n+" 0 0 0",left:"0 "+n+" 0 0",top:"0 0 "+n+" 0",right:"0 0 0 "+n};C.style.padding=r[e]}var a=e({eventsEnabled:!1,placement:S.props.placement},n,{modifiers:e({},n&&n.modifiers,{preventOverflow:e({boundariesElement:S.props.boundary},U(n,"preventOverflow")),arrow:e({element:i,enabled:!!i},U(n,"arrow")),flip:e({enabled:S.props.flip,behavior:S.props.flipBehavior},U(n,"flip")),offset:e({offset:S.props.offset},U(n,"offset"))}),onCreate:function(t){o(t),F(n&&n.onCreate,a.onCreate,[t]),Mt()},onUpdate:function(t){o(t),F(n&&n.onUpdate,a.onUpdate,[t]),Mt()}});S.popperInstance=new t(r,C,a)}function Mt(){0===b?(b++,S.popperInstance.update()):l&&1===b&&(b++,function(t){t.offsetHeight}(C),l())}function kt(t){S.clearDelayTimeouts(),S.popperInstance||Dt(),t&&at("onTrigger",[S,t]),bt();var e=ot(!0);e?a=setTimeout(function(){S.show()},e):S.show()}function Pt(t){if(S.clearDelayTimeouts(),at("onUntrigger",[S,t]),S.state.isVisible){var e=ot(!1);e?p=setTimeout(function(){S.state.isVisible&&S.hide()},e):u=requestAnimationFrame(function(){S.hide()})}else yt()}}function ht(t,r,i){void 0===i&&(i=[]),document.addEventListener("touchstart",g,e({},n,{capture:!0})),window.addEventListener("blur",y);var o=e({},O,{},r),a=P(t).reduce(function(t,e){var n=e&&mt(e,o,i);return n&&t.push(n),t},[]);return S(t)?a[0]:a}function gt(t){Object.keys(t).forEach(function(e){O[e]=t[e]})}ht.version=I,ht.defaultProps=O,ht.setDefaultProps=gt,ht.currentInput=m;var bt={mouseover:"mouseenter",focusin:"focus",click:"click"};var yt={name:"animateFill",defaultValue:!1,fn:function(t){var e=t.popperChildren,n=e.tooltip,r=e.content,i=t.props.animateFill&&!A?function(){var t=R();return t.className=p,j([t],"hidden"),t}():null;function o(){t.popperChildren.backdrop=i}return{onCreate:function(){i&&(o(),n.insertBefore(i,n.firstElementChild),n.setAttribute("data-animatefill",""),n.style.overflow="hidden",t.setProps({animation:"shift-away",arrow:!1}))},onMount:function(){if(i){var t=n.style.transitionDuration,e=Number(t.replace("ms",""));r.style.transitionDelay=Math.round(e/10)+"ms",i.style.transitionDuration=t,j([i],"visible")}},onShow:function(){i&&(i.style.transitionDuration="0ms")},onHide:function(){i&&j([i],"hidden")},onAfterUpdate:function(){o()}}}};var wt={name:"followCursor",defaultValue:!1,fn:function(t){var e,n=t.reference,r=t.popper,i=Z(t.props.triggerTarget||n),o=null,a=!1,p=t.props;function u(){var e=p.placement;if(e){var n=e.split("-")[1];a=!0,t.setProps({placement:s()&&n?e.replace(n,"start"===n?"end":"start"):e}),a=!1}}function s(){return t.props.followCursor&&H(o)&&!(0===o.clientX&&0===o.clientY)}function c(){return m.isTouch||"initial"===t.props.followCursor&&t.state.isVisible}function f(){t.popperInstance&&(t.popperInstance.reference=n)}function l(){t.popperInstance&&s()&&(c()||!0!==t.props.followCursor)&&t.popperInstance.disableEventListeners()}function d(){s()&&h(e)}function v(){i.removeEventListener("mousemove",h)}function h(i){var o=e=i,a=o.clientX,p=o.clientY;if(t.popperInstance&&t.state.currentPlacement){var u=Y(i.target,function(t){return t===n}),s=n.getBoundingClientRect(),f=t.props.followCursor,l="horizontal"===f,d="vertical"===f,m=J(["top","bottom"],ut(t.state.currentPlacement)),h=function(t,e){var n=e?t.offsetWidth:t.offsetHeight;return{size:n,x:e?n:0,y:e?0:n}}(r,m),g=h.size,b=h.x,y=h.y;!u&&t.props.interactive||(t.popperInstance.reference={referenceNode:n,clientWidth:0,clientHeight:0,getBoundingClientRect:function(){return{width:m?g:0,height:m?0:g,top:(l?s.top:p)-y,bottom:(l?s.bottom:p)+y,left:(d?s.left:a)-b,right:(d?s.right:a)+b}}},t.popperInstance.update()),c()&&v()}}return{onAfterUpdate:function(t,e){var n;a||(n=e,Object.keys(n).forEach(function(t){p[t]=K(n[t],p[t])}),e.placement&&u()),e.placement&&l(),requestAnimationFrame(d)},onMount:function(){d(),l()},onTrigger:function(n,r){o||(o=r,H(r)&&(e=r),s()&&c()?(a=!0,t.setProps({flipOnUpdate:!0}),a=!1):t.setProps({flipOnUpdate:p.flipOnUpdate}),u(),s()?r===o&&i.addEventListener("mousemove",h):f())},onUntrigger:function(){t.state.isVisible||(v(),o=null)},onHidden:function(){v(),f(),o=null}}}};var Et={name:"inlinePositioning",defaultValue:!1,fn:function(t){var e=t.reference;function n(){return t.props.inlinePositioning}return{onHidden:function(){n()&&(t.popperInstance.reference=e)},onTrigger:function(){n()&&(t.popperInstance.reference={referenceNode:e,clientWidth:0,clientHeight:0,getBoundingClientRect:function(){return function(t,e,n){if(n.length<2||null===t)return e;var r;switch(t){case"top":case"bottom":var i=n[0],o=n[n.length-1],a="top"===t,p=i.top,u=o.bottom,s=a?i.left:o.left,c=a?i.right:o.right;r={top:p,bottom:u,left:s,right:c,width:c-s,height:u-p};break;case"left":case"right":var f=Math.min.apply(Math,n.map(function(t){return t.left})),l=Math.max.apply(Math,n.map(function(t){return t.right})),d=n.filter(function(e){return"left"===t?e.left===f:e.right===l}),v=d[0].top,m=d[d.length-1].bottom;r={top:v,bottom:m,left:f,right:l,width:l-f,height:m-v};break;default:r=e}return r}(t.state.currentPlacement&&ut(t.state.currentPlacement),e.getBoundingClientRect(),X(e.getClientRects()))}})}}}};var Tt={name:"sticky",defaultValue:!1,fn:function(t){var e=t.reference,n=t.popper;function r(e){return!0===t.props.sticky||t.props.sticky===e}var i=null,o=null;function a(){var p=r("reference")?e.getBoundingClientRect():null,u=r("popper")?n.getBoundingClientRect():null;(p&&At(i,p)||u&&At(o,u))&&t.popperInstance.update(),i=p,o=u,t.state.isMounted&&requestAnimationFrame(a)}return{onMount:function(){t.props.sticky&&a()}}}};function At(t,e){return!t||!e||(t.top!==e.top||t.right!==e.right||t.bottom!==e.bottom||t.left!==e.left)}w&&function(t){var e=document.createElement("style");e.textContent=t,e.setAttribute("data-tippy-stylesheet","");var n=document.head,r=document.querySelector("head>style,head>link");r?n.insertBefore(e,r):n.appendChild(e)}(".tippy-tooltip[data-animation=fade][data-state=hidden]{opacity:0}.tippy-iOS{cursor:pointer!important;-webkit-tap-highlight-color:transparent}.tippy-popper{pointer-events:none;max-width:calc(100vw - 10px);transition-timing-function:cubic-bezier(.165,.84,.44,1);transition-property:transform}.tippy-tooltip{position:relative;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;background-color:#333;transition-property:visibility,opacity,transform;outline:0}.tippy-tooltip[data-placement^=top]>.tippy-arrow{border-width:8px 8px 0;border-top-color:#333;margin:0 3px;transform-origin:50% 0;bottom:-7px}.tippy-tooltip[data-placement^=bottom]>.tippy-arrow{border-width:0 8px 8px;border-bottom-color:#333;margin:0 3px;transform-origin:50% 7px;top:-7px}.tippy-tooltip[data-placement^=left]>.tippy-arrow{border-width:8px 0 8px 8px;border-left-color:#333;margin:3px 0;transform-origin:0 50%;right:-7px}.tippy-tooltip[data-placement^=right]>.tippy-arrow{border-width:8px 8px 8px 0;border-right-color:#333;margin:3px 0;transform-origin:7px 50%;left:-7px}.tippy-tooltip[data-interactive][data-state=visible]{pointer-events:auto}.tippy-tooltip[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{position:absolute;border-color:transparent;border-style:solid}.tippy-content{padding:5px 9px}");var Ct,xt,It=(Ct=[yt,wt,Et,Tt],(xt=function(t,e,n){return void 0===n&&(n=[]),ht(t,e,[].concat(Ct,n))}).version=I,xt.defaultProps=O,xt.setDefaultProps=gt,xt.currentInput=m,xt);return It.createSingleton=function(t,n,r){var i,o;void 0===r&&(r=[]),t.forEach(function(t){t.disable()});var a={};function p(t){Object.keys(t).forEach(function(e){a[e]=K(t[e],a[e])})}function u(t,e,n){i&&(n&&!e?o.setAttribute("aria-"+i,t):o.removeAttribute("aria-"+i))}p(e({},O,{},n));var s=t.map(function(t){return t.reference}),c=e({},n,{aria:null,triggerTarget:s,onMount:function(t){F(a.onMount,t.props.onMount,[t]),u(t.popperChildren.tooltip.id,t.props.interactive,!0)},onUntrigger:function(t,e){F(a.onUntrigger,t.props.onUntrigger,[t,e]),u(t.popperChildren.tooltip.id,t.props.interactive,!1)},onTrigger:function(e,n){F(a.onTrigger,e.props.onTrigger,[e,n]);var r=n.currentTarget,p=s.indexOf(r);o=r,i=a.aria,e.state.isVisible&&u(e.popperChildren.tooltip.id,e.props.interactive,!0),e.setContent(t[p].props.content),e.popperInstance.reference={referenceNode:r,clientHeight:0,clientWidth:0,getBoundingClientRect:function(){return r.getBoundingClientRect()}}},onAfterUpdate:function(t,e){F(a.onAfterUpdate,t.props.onAfterUpdate,[t,e]),p(e)},onDestroy:function(e){F(a.onDestroy,e.props.onDestroy,[e]),t.forEach(function(t){t.enable()})}});return ht(document.createElement("div"),c,r)},It.delegate=function(t,n,r){void 0===r&&(r=[]);var i=[],o=[],a=n.target,p=function(t,n){var r=e({},t);return n.forEach(function(t){delete r[t]}),r}(n,["target"]),u=e({},p,{trigger:"manual"}),s=e({},p,{showOnCreate:!0}),c=ht(t,u,r);function f(t){if(t.target){var e=t.target.closest(a);if(e)if(J(e.getAttribute("data-tippy-trigger")||n.trigger||O.trigger,bt[t.type])){var i=ht(e,s,r);i&&(o=o.concat(i))}}}function l(t,e,n,r){void 0===r&&(r=!1),t.addEventListener(e,n,r),i.push({element:t,eventType:e,listener:n,options:r})}return Q(c).forEach(function(t){var e=t.destroy;t.destroy=function(t){void 0===t&&(t=!0),t&&o.forEach(function(t){t.destroy()}),o=[],i.forEach(function(t){var e=t.element,n=t.eventType,r=t.listener,i=t.options;e.removeEventListener(n,r,i)}),i=[],e()},function(t){var e=t.reference;l(e,"mouseover",f),l(e,"focusin",f),l(e,"click",f)}(t)}),c},It.hideAll=function(t){var e=void 0===t?{}:t,n=e.exclude,r=e.duration;lt.forEach(function(t){var e,i=!1;n&&(i=(e=n)&&e._tippy&&e._tippy.reference===e?t.reference===n:t.popper===n.popper),i||t.hide(r)})},It.roundArrow='<svg viewBox="0 0 18 7" xmlns="http://www.w3.org/2000/svg"><path d="M0 7s2.021-.015 5.253-4.218C6.584 1.051 7.797.007 9 0c1.203-.007 2.416 1.035 3.761 2.782C16.012 7.005 18 7 18 7H0z"/></svg>',It}(Popper); //# sourceMappingURL=tippy-bundle.iife.min.js.map