UNPKG

22.7 kBJavaScriptView Raw
1var tippy=function(e){"use strict";function t(){return(t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}e=e&&e.hasOwnProperty("default")?e.default:e;function n(e,t){e.innerHTML=t}function r(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function i(e,t){return{}.hasOwnProperty.call(e,t)}function o(e){return s(e)?[e]:function(e){return p(e,"NodeList")}(e)?b(e):Array.isArray(e)?e:b(document.querySelectorAll(e))}function a(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function u(e,t){return e&&e.modifiers&&e.modifiers[t]}function p(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function s(e){return p(e,"Element")}function c(e){return p(e,"MouseEvent")}function f(e,t){return"function"==typeof e?e.apply(void 0,t):e}function l(e,t,n,r){e.filter((function(e){return e.name===t}))[0][n]=r}function d(){return document.createElement("div")}function v(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function m(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function g(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function h(e,t,n){e&&e!==t&&e.apply(void 0,n)}function b(e){return[].slice.call(e)}function y(e,t){for(;e;){if(t(e))return e;e=e.parentElement}return null}function w(e,t){return e.indexOf(t)>-1}function E(e){return e.split(/\s+/).filter(Boolean)}function A(e,t){return void 0!==e?e:t}function T(e){return[].concat(e)}function C(e){var t=T(e)[0];return t&&t.ownerDocument||document}function I(e,t){-1===e.indexOf(t)&&e.push(t)}function O(e){return"number"==typeof e?e:parseFloat(e)}function D(e,t,n){void 0===t&&(t=5);var r={top:0,right:0,bottom:0,left:0};return Object.keys(r).reduce((function(r,i){return r[i]="number"==typeof t?t:t[i],e===i&&(r[i]="number"==typeof t?t+n:t[e]+n),r}),r)}var L=t({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",plugins:[],popperOptions:{},role:"tooltip",showOnCreate:!1,theme:"",touch:!0,trigger:"mouseenter focus",triggerTarget:null,updateDuration:0,zIndex:9999},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1}),x=Object.keys(L),M=["arrow","boundary","distance","flip","flipBehavior","flipOnUpdate","offset","placement","popperOptions"];function k(e){var n=(e.plugins||[]).reduce((function(t,n){var r=n.name,i=n.defaultValue;return r&&(t[r]=void 0!==e[r]?e[r]:i),t}),{});return t({},e,{},n)}function P(e,n){var r=t({},n,{content:f(n.content,[e])},n.ignoreAttributes?{}:function(e,n){return(n?Object.keys(k(t({},L,{plugins:n}))):x).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,n.plugins));return r.interactive&&(r.aria=null),r}var V={passive:!0},S={isTouch:!1},B=0;function H(){S.isTouch||(S.isTouch=!0,window.performance&&document.addEventListener("mousemove",U))}function U(){var e=performance.now();e-B<20&&(S.isTouch=!1,document.removeEventListener("mousemove",U)),B=e}function N(){var e=document.activeElement;if(r(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var R="undefined"!=typeof window&&"undefined"!=typeof document,z=R?navigator.userAgent:"",q=/MSIE |Trident\//.test(z),F=R&&/iPhone|iPad|iPod/.test(navigator.platform);function j(e){var t=e&&F&&S.isTouch;document.body.classList[t?"add":"remove"]("tippy-iOS")}function _(e){return e.split("-")[0]}function W(e){e.setAttribute("data-inertia","")}function X(e){e.setAttribute("data-interactive","")}function Y(e,t){if(s(t.content))n(e,""),e.appendChild(t.content);else if("function"!=typeof t.content){e[t.allowHTML?"innerHTML":"textContent"]=t.content}}function J(e){return{tooltip:e.querySelector(".tippy-tooltip"),content:e.querySelector(".tippy-content"),arrow:e.querySelector(".tippy-arrow")||e.querySelector(".tippy-svg-arrow")}}function G(e){var t=d();return!0===e?t.className="tippy-arrow":(t.className="tippy-svg-arrow",s(e)?t.appendChild(e):n(t,e)),t}function K(e,t){var n=d();n.className="tippy-popper",n.style.position="absolute",n.style.top="0",n.style.left="0";var r=d();r.className="tippy-tooltip",r.id="tippy-"+e,r.setAttribute("data-state","hidden"),r.setAttribute("tabindex","-1"),$(r,"add",t.theme);var i=d();return i.className="tippy-content",i.setAttribute("data-state","hidden"),t.interactive&&X(r),t.arrow&&(r.setAttribute("data-arrow",""),r.appendChild(G(t.arrow))),t.inertia&&W(r),Y(i,t),r.appendChild(i),n.appendChild(r),Q(n,t,t),n}function Q(e,t,n){var r,i=J(e),o=i.tooltip,a=i.content,u=i.arrow;e.style.zIndex=""+n.zIndex,o.setAttribute("data-animation",n.animation),o.style.maxWidth="number"==typeof(r=n.maxWidth)?r+"px":r,n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),t.content!==n.content&&Y(a,n),!t.arrow&&n.arrow?(o.appendChild(G(n.arrow)),o.setAttribute("data-arrow","")):t.arrow&&!n.arrow?(o.removeChild(u),o.removeAttribute("data-arrow")):t.arrow!==n.arrow&&(o.removeChild(u),o.appendChild(G(n.arrow))),!t.interactive&&n.interactive?X(o):t.interactive&&!n.interactive&&function(e){e.removeAttribute("data-interactive")}(o),!t.inertia&&n.inertia?W(o):t.inertia&&!n.inertia&&function(e){e.removeAttribute("data-inertia")}(o),t.theme!==n.theme&&($(o,"remove",t.theme),$(o,"add",n.theme))}function Z(e,t,n){["transitionend","webkitTransitionEnd"].forEach((function(r){e[t+"EventListener"](r,n)}))}function $(e,t,n){E(n).forEach((function(n){e.classList[t](n+"-theme")}))}var ee=1,te=[],ne=[];function re(n,r){var o,p,s,d=P(n,t({},L,{},k(r)));if(!d.multiple&&n._tippy)return null;var x,B,H,U,N,R=!1,z=!1,F=!1,W=0,X=[],Y=g(Le,d.interactiveDebounce),G=C(d.triggerTarget||n),$=ee++,re=K($,d),ie=J(re),oe=(N=d.plugins).filter((function(e,t){return N.indexOf(e)===t})),ae=ie.tooltip,ue=ie.content,pe=[ae,ue],se={id:$,reference:n,popper:re,popperChildren:ie,popperInstance:null,props:d,state:{currentPlacement:null,isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:oe,clearDelayTimeouts:function(){clearTimeout(o),clearTimeout(p),cancelAnimationFrame(s)},setProps:function(e){if(se.state.isDestroyed)return;ge("onBeforeUpdate",[se,e]),Oe();var r=se.props,o=P(n,t({},se.props,{},e,{ignoreAttributes:!0}));o.ignoreAttributes=A(e.ignoreAttributes,r.ignoreAttributes),se.props=o,Ie(),r.interactiveDebounce!==o.interactiveDebounce&&(ye(),Y=g(Le,o.interactiveDebounce));Q(re,r,o),se.popperChildren=J(re),r.triggerTarget&&!o.triggerTarget?T(r.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):o.triggerTarget&&n.removeAttribute("aria-expanded");if(be(),se.popperInstance)if(M.some((function(t){return i(e,t)&&e[t]!==r[t]}))){var a=se.popperInstance.reference;se.popperInstance.destroy(),Pe(),se.popperInstance.reference=a,se.state.isVisible&&se.popperInstance.enableEventListeners()}else se.popperInstance.update();ge("onAfterUpdate",[se,e])},setContent:function(e){se.setProps({content:e})},show:function(e){void 0===e&&(e=a(se.props.duration,0,L.duration));var t=se.state.isVisible,n=se.state.isDestroyed,r=!se.state.isEnabled,i=S.isTouch&&!se.props.touch;if(t||n||r||i)return;if(ve().hasAttribute("disabled"))return;se.popperInstance||Pe();if(ge("onShow",[se],!1),!1===se.props.onShow(se))return;Ee(),re.style.visibility="visible",se.state.isVisible=!0,se.state.isMounted||v(pe.concat(re),0);B=function(){se.state.isVisible&&(v([re],se.props.updateDuration),v(pe,e),m(pe,"visible"),he(),be(),I(ne,se),j(!0),se.state.isMounted=!0,ge("onMount",[se]),function(e,t){Te(e,t)}(e,(function(){se.state.isShown=!0,ge("onShown",[se])})))},function(){W=0;var e,t=se.props.appendTo,n=ve();e=se.props.interactive&&t===L.appendTo||"parent"===t?n.parentNode:f(t,[n]);e.contains(re)||e.appendChild(re);l(se.popperInstance.modifiers,"flip","enabled",se.props.flip),se.popperInstance.enableEventListeners(),se.popperInstance.update()}()},hide:function(e){void 0===e&&(e=a(se.props.duration,1,L.duration));var t=!se.state.isVisible&&!R,n=se.state.isDestroyed,r=!se.state.isEnabled&&!R;if(t||n||r)return;if(ge("onHide",[se],!1),!1===se.props.onHide(se)&&!R)return;Ae(),re.style.visibility="hidden",se.state.isVisible=!1,se.state.isShown=!1,v(pe,e),m(pe,"hidden"),he(),be(),function(e,t){Te(e,(function(){!se.state.isVisible&&re.parentNode&&re.parentNode.contains(re)&&t()}))}(e,(function(){se.popperInstance.disableEventListeners(),se.popperInstance.options.placement=se.props.placement,re.parentNode.removeChild(re),0===(ne=ne.filter((function(e){return e!==se}))).length&&j(!1),se.state.isMounted=!1,ge("onHidden",[se])}))},enable:function(){se.state.isEnabled=!0},disable:function(){se.hide(),se.state.isEnabled=!1},destroy:function(){if(se.state.isDestroyed)return;R=!0,se.clearDelayTimeouts(),se.hide(0),Oe(),delete n._tippy,se.popperInstance&&se.popperInstance.destroy();R=!1,se.state.isDestroyed=!0,ge("onDestroy",[se])}};n._tippy=se,re._tippy=se;var ce=oe.map((function(e){return e.fn(se)})),fe=n.hasAttribute("aria-expanded");return Ie(),be(),d.lazy||Pe(),ge("onCreate",[se]),d.showOnCreate&&Se(),re.addEventListener("mouseenter",(function(){se.props.interactive&&se.state.isVisible&&se.clearDelayTimeouts()})),re.addEventListener("mouseleave",(function(e){se.props.interactive&&w(se.props.trigger,"mouseenter")&&(Y(e),G.addEventListener("mousemove",Y))})),se;function le(){var e=se.props.touch;return Array.isArray(e)?e:[e,0]}function de(){return"hold"===le()[0]}function ve(){return U||n}function me(e){return se.state.isMounted&&!se.state.isVisible||S.isTouch||x&&"focus"===x.type?0:a(se.props.delay,e?0:1,L.delay)}function ge(e,t,n){var r;(void 0===n&&(n=!0),ce.forEach((function(n){i(n,e)&&n[e].apply(n,t)})),n)&&(r=se.props)[e].apply(r,t)}function he(){var e=se.props.aria;if(e){var t="aria-"+e,r=ae.id;T(se.props.triggerTarget||n).forEach((function(e){var n=e.getAttribute(t);if(se.state.isVisible)e.setAttribute(t,n?n+" "+r:r);else{var i=n&&n.replace(r,"").trim();i?e.setAttribute(t,i):e.removeAttribute(t)}}))}}function be(){fe||T(se.props.triggerTarget||n).forEach((function(e){se.props.interactive?e.setAttribute("aria-expanded",se.state.isVisible&&e===ve()?"true":"false"):e.removeAttribute("aria-expanded")}))}function ye(){G.body.removeEventListener("mouseleave",Be),G.removeEventListener("mousemove",Y),te=te.filter((function(e){return e!==Y}))}function we(e){if(!se.props.interactive||!re.contains(e.target)){if(ve().contains(e.target)){if(S.isTouch)return;if(se.state.isVisible&&w(se.props.trigger,"click"))return}!0===se.props.hideOnClick&&(z=!1,se.clearDelayTimeouts(),se.hide(),F=!0,setTimeout((function(){F=!1})),se.state.isMounted||Ae())}}function Ee(){G.addEventListener("mousedown",we,!0)}function Ae(){G.removeEventListener("mousedown",we,!0)}function Te(e,t){function n(e){e.target===ae&&(Z(ae,"remove",n),t())}if(0===e)return t();Z(ae,"remove",H),Z(ae,"add",n),H=n}function Ce(e,t,r){void 0===r&&(r=!1),T(se.props.triggerTarget||n).forEach((function(n){n.addEventListener(e,t,r),X.push({node:n,eventType:e,handler:t,options:r})}))}function Ie(){de()&&(Ce("touchstart",De,V),Ce("touchend",xe,V)),E(se.props.trigger).forEach((function(e){if("manual"!==e)switch(Ce(e,De),e){case"mouseenter":Ce("mouseleave",xe);break;case"focus":Ce(q?"focusout":"blur",Me);break;case"focusin":Ce("focusout",Me)}}))}function Oe(){X.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)})),X=[]}function De(e){var t=!1;if(se.state.isEnabled&&!ke(e)&&!F){if(x=e,U=e.currentTarget,be(),!se.state.isVisible&&c(e)&&te.forEach((function(t){return t(e)})),"click"!==e.type||w(se.props.trigger,"mouseenter")&&!z||!1===se.props.hideOnClick||!se.state.isVisible){var n=le(),r=n[0],i=n[1];S.isTouch&&"hold"===r&&i?o=setTimeout((function(){Se(e)}),i):Se(e)}else t=!0;"click"===e.type&&(z=!t),t&&Be(e)}}function Le(e){var t=y(e.target,(function(e){return e===n||e===re}));"mousemove"===e.type&&t||function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,i=e.tooltipRect,o=e.interactiveBorder,a=Math.min(t.top,i.top),u=Math.max(t.right,i.right),p=Math.max(t.bottom,i.bottom),s=Math.min(t.left,i.left);return a-r>o||r-p>o||s-n>o||n-u>o}))}(b(re.querySelectorAll(".tippy-popper")).concat(re).map((function(e){var t=e._tippy,n=t.popperChildren.tooltip,r=t.props.interactiveBorder;return{popperRect:e.getBoundingClientRect(),tooltipRect:n.getBoundingClientRect(),interactiveBorder:r}})),e)&&(ye(),Be(e))}function xe(e){if(!(ke(e)||w(se.props.trigger,"click")&&z))return se.props.interactive?(G.body.addEventListener("mouseleave",Be),G.addEventListener("mousemove",Y),I(te,Y),void Y(e)):void Be(e)}function Me(e){(w(se.props.trigger,"focusin")||e.target===ve())&&(se.props.interactive&&e.relatedTarget&&re.contains(e.relatedTarget)||Be(e))}function ke(e){var t="ontouchstart"in window,n=w(e.type,"touch"),r=de();return t&&S.isTouch&&r&&!n||S.isTouch&&!r&&n}function Pe(){var r,i=se.props.popperOptions,o=se.popperChildren.arrow,a=u(i,"flip"),p=u(i,"preventOverflow");function s(e){var t=se.state.currentPlacement;se.state.currentPlacement=e.placement,se.props.flip&&!se.props.flipOnUpdate&&(e.flipped&&(se.popperInstance.options.placement=e.placement),l(se.popperInstance.modifiers,"flip","enabled",!1)),ae.setAttribute("data-placement",e.placement),!1!==e.attributes["x-out-of-boundaries"]?ae.setAttribute("data-out-of-boundaries",""):ae.removeAttribute("data-out-of-boundaries");var n=_(e.placement),i=w(["top","bottom"],n),o=w(["bottom","right"],n);ae.style.top="0",ae.style.left="0",ae.style[i?"top":"left"]=(o?1:-1)*r+"px",t&&t!==e.placement&&se.popperInstance.update()}var c=t({eventsEnabled:!1,placement:se.props.placement},i,{modifiers:t({},i&&i.modifiers,{tippyDistance:{enabled:!0,order:0,fn:function(e){r=function(e,t){var n="string"==typeof t&&w(t,"rem"),r=e.documentElement;return r&&n?parseFloat(getComputedStyle(r).fontSize||String(16))*O(t):O(t)}(G,se.props.distance);var t=_(e.placement),n=D(t,p&&p.padding,r),i=D(t,a&&a.padding,r),o=se.popperInstance.modifiers;return l(o,"preventOverflow","padding",n),l(o,"flip","padding",i),e}},preventOverflow:t({boundariesElement:se.props.boundary},p),flip:t({enabled:se.props.flip,behavior:se.props.flipBehavior},a),arrow:t({element:o,enabled:!!o},u(i,"arrow")),offset:t({offset:se.props.offset},u(i,"offset"))}),onCreate:function(e){s(e),h(i&&i.onCreate,c.onCreate,[e]),Ve()},onUpdate:function(e){s(e),h(i&&i.onUpdate,c.onUpdate,[e]),Ve()}});se.popperInstance=new e(n,re,c)}function Ve(){0===W?(W++,se.popperInstance.update()):B&&1===W&&(W++,re.offsetHeight,B())}function Se(e){se.clearDelayTimeouts(),se.popperInstance||Pe(),e&&ge("onTrigger",[se,e]),Ee();var t=me(!0);t?o=setTimeout((function(){se.show()}),t):se.show()}function Be(e){if(se.clearDelayTimeouts(),ge("onUntrigger",[se,e]),se.state.isVisible){if(!(w(se.props.trigger,"mouseenter")&&w(se.props.trigger,"click")&&w(["mouseleave","mousemove"],e.type)&&z)){var t=me(!1);t?p=setTimeout((function(){se.state.isVisible&&se.hide()}),t):s=requestAnimationFrame((function(){se.hide()}))}}else Ae()}}function ie(e,n,r){void 0===n&&(n={}),void 0===r&&(r=[]),r=L.plugins.concat(n.plugins||r),document.addEventListener("touchstart",H,t({},V,{capture:!0})),window.addEventListener("blur",N);var i=t({},n,{plugins:r}),a=o(e).reduce((function(e,t){var n=t&&re(t,i);return n&&e.push(n),e}),[]);return s(e)?a[0]:a}ie.version="5.2.1",ie.defaultProps=L,ie.setDefaultProps=function(e){Object.keys(e).forEach((function(t){L[t]=e[t]}))},ie.currentInput=S;var oe={mouseover:"mouseenter",focusin:"focus",click:"click"};var ae={name:"animateFill",defaultValue:!1,fn:function(e){var t=e.popperChildren,n=t.tooltip,r=t.content,i=e.props.animateFill?function(){var e=d();return e.className="tippy-backdrop",m([e],"hidden"),e}():null;function o(){e.popperChildren.backdrop=i}return{onCreate:function(){i&&(o(),n.insertBefore(i,n.firstElementChild),n.setAttribute("data-animatefill",""),n.style.overflow="hidden",e.setProps({animation:"shift-away",arrow:!1}))},onMount:function(){if(i){var e=n.style.transitionDuration,t=Number(e.replace("ms",""));r.style.transitionDelay=Math.round(t/10)+"ms",i.style.transitionDuration=e,m([i],"visible")}},onShow:function(){i&&(i.style.transitionDuration="0ms")},onHide:function(){i&&m([i],"hidden")},onAfterUpdate:function(){o()}}}};var ue={name:"followCursor",defaultValue:!1,fn:function(e){var t,n=e.reference,r=e.popper,i=null,o=C(e.props.triggerTarget||n),a=null,u=!1,p=e.props;function s(){return"manual"===e.props.trigger.trim()}function f(){var t=!!s()||null!==a&&!(0===a.clientX&&0===a.clientY);return e.props.followCursor&&t}function l(){return S.isTouch||"initial"===e.props.followCursor&&e.state.isVisible}function d(){e.popperInstance&&i&&(e.popperInstance.reference=i)}function v(){if(f()||e.props.placement!==p.placement){var t=p.placement,n=t.split("-")[1];u=!0,e.setProps({placement:f()&&n?t.replace(n,"start"===n?"end":"start"):t}),u=!1}}function m(){e.popperInstance&&f()&&l()&&e.popperInstance.disableEventListeners()}function g(){f()?o.addEventListener("mousemove",E):d()}function h(){f()&&E(t)}function b(){o.removeEventListener("mousemove",E)}function E(o){var a=t=o,u=a.clientX,p=a.clientY;if(e.popperInstance&&e.state.currentPlacement){var s=y(o.target,(function(e){return e===n})),c=e.props.followCursor,f="horizontal"===c,d="vertical"===c,v=w(["top","bottom"],_(e.state.currentPlacement)),m=function(e,t){var n=t?e.offsetWidth:e.offsetHeight;return{size:n,x:t?n:0,y:t?0:n}}(r,v),g=m.size,h=m.x,E=m.y;!s&&e.props.interactive||(null===i&&(i=e.popperInstance.reference),e.popperInstance.reference={referenceNode:n,clientWidth:0,clientHeight:0,getBoundingClientRect:function(){var e=n.getBoundingClientRect();return{width:v?g:0,height:v?0:g,top:(f?e.top:p)-E,bottom:(f?e.bottom:p)+E,left:(d?e.left:u)-h,right:(d?e.right:u)+h}}},e.popperInstance.update()),l()&&b()}}return{onAfterUpdate:function(e,t){var n;u||(n=t,Object.keys(n).forEach((function(e){p[e]=A(n[e],p[e])})),t.placement&&v()),t.placement&&m(),requestAnimationFrame(h)},onMount:function(){h(),m()},onShow:function(){s()&&(t=a={clientX:0,clientY:0},v(),g())},onTrigger:function(e,n){a||(c(n)&&(a={clientX:n.clientX,clientY:n.clientY},t=n),v(),g())},onUntrigger:function(){e.state.isVisible||(b(),a=null)},onHidden:function(){b(),d(),a=null}}}};var pe={name:"inlinePositioning",defaultValue:!1,fn:function(e){var t=e.reference;function n(){return!!e.props.inlinePositioning}return{onHidden:function(){n()&&(e.popperInstance.reference=t)},onShow:function(){n()&&(e.popperInstance.reference={referenceNode:t,clientWidth:0,clientHeight:0,getBoundingClientRect:function(){return function(e,t,n){if(n.length<2||null===e)return t;switch(e){case"top":case"bottom":var r=n[0],i=n[n.length-1],o="top"===e,a=r.top,u=i.bottom,p=o?r.left:i.left,s=o?r.right:i.right;return{top:a,bottom:u,left:p,right:s,width:s-p,height:u-a};case"left":case"right":var c=Math.min.apply(Math,n.map((function(e){return e.left}))),f=Math.max.apply(Math,n.map((function(e){return e.right}))),l=n.filter((function(t){return"left"===e?t.left===c:t.right===f})),d=l[0].top,v=l[l.length-1].bottom;return{top:d,bottom:v,left:c,right:f,width:f-c,height:v-d};default:return t}}(e.state.currentPlacement&&_(e.state.currentPlacement),t.getBoundingClientRect(),b(t.getClientRects()))}})}}}};var se={name:"sticky",defaultValue:!1,fn:function(e){var t=e.reference,n=e.popper;function r(t){return!0===e.props.sticky||e.props.sticky===t}var i=null,o=null;function a(){var u=r("reference")?(e.popperInstance?e.popperInstance.reference:t).getBoundingClientRect():null,p=r("popper")?n.getBoundingClientRect():null;(u&&ce(i,u)||p&&ce(o,p))&&e.popperInstance.update(),i=u,o=p,e.state.isMounted&&requestAnimationFrame(a)}return{onMount:function(){e.props.sticky&&a()}}}};function ce(e,t){return!e||!t||(e.top!==t.top||e.right!==t.right||e.bottom!==t.bottom||e.left!==t.left)}return ie.setDefaultProps({plugins:[ae,ue,pe,se]}),ie.createSingleton=function(e,n,r){void 0===n&&(n={}),void 0===r&&(r=[]),r=n.plugins||r,e.forEach((function(e){e.disable()}));var i,o,a=t({},L,{},n).aria,u=!1,p=e.map((function(e){return e.reference})),s={fn:function(t){function n(e){if(i){var n="aria-"+i;e&&!t.props.interactive?o.setAttribute(n,t.popperChildren.tooltip.id):o.removeAttribute(n)}}return{onAfterUpdate:function(e,n){var r=n.aria;void 0!==r&&r!==a&&(u?(u=!0,t.setProps({aria:null}),u=!1):a=r)},onDestroy:function(){e.forEach((function(e){e.enable()}))},onMount:function(){n(!0)},onUntrigger:function(){n(!1)},onTrigger:function(r,u){var s=u.currentTarget,c=p.indexOf(s);s!==o&&(o=s,i=a,t.state.isVisible&&n(!0),t.popperInstance.reference=s,t.setContent(e[c].props.content))}}}};return ie(d(),t({},n,{plugins:[s].concat(r),aria:null,triggerTarget:p}))},ie.delegate=function(e,n,r){void 0===r&&(r=[]),r=n.plugins||r;var i,o,a=[],u=[],p=n.target,s=(i=["target"],o=t({},n),i.forEach((function(e){delete o[e]})),o),c=t({},s,{plugins:r,trigger:"manual"}),f=t({},s,{plugins:r,showOnCreate:!0}),l=ie(e,c);function d(e){if(e.target){var t=e.target.closest(p);if(t)if(w(t.getAttribute("data-tippy-trigger")||n.trigger||L.trigger,oe[e.type])){var r=ie(t,f);r&&(u=u.concat(r))}}}function v(e,t,n,r){void 0===r&&(r=!1),e.addEventListener(t,n,r),a.push({node:e,eventType:t,handler:n,options:r})}return T(l).forEach((function(e){var t=e.destroy;e.destroy=function(e){void 0===e&&(e=!0),e&&u.forEach((function(e){e.destroy()})),u=[],a.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)})),a=[],t()},function(e){var t=e.reference;v(t,"mouseover",d),v(t,"focusin",d),v(t,"click",d)}(e)})),l},ie.hideAll=function(e){var t=void 0===e?{}:e,n=t.exclude,i=t.duration;ne.forEach((function(e){var t=!1;n&&(t=r(n)?e.reference===n:e.popper===n.popper),t||e.hide(i)}))},ie.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>',ie}(Popper);
2//# sourceMappingURL=tippy.iife.min.js.map