mirror of
https://github.com/Combodo/iTop.git
synced 2026-03-11 03:54:21 +01:00
3 lines
20 KiB
JavaScript
3 lines
20 KiB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],e):(t=t||self).tippy=e(t.Popper)}(this,(function(t){"use strict";var e={passive:!0,capture:!0};function n(t,e,n){if(Array.isArray(t)){var r=t[e];return null==r?Array.isArray(n)?n[e]:n:r}return t}function r(t,e){var n={}.toString.call(t);return 0===n.indexOf("[object")&&n.indexOf(e+"]")>-1}function i(t,e){return"function"==typeof t?t.apply(void 0,e):t}function o(t,e){return 0===e?t:function(r){clearTimeout(n),n=setTimeout((function(){t(r)}),e)};var n}function a(t,e){var n=Object.assign({},t);return e.forEach((function(t){delete n[t]})),n}function s(t){return[].concat(t)}function u(t,e){-1===t.indexOf(e)&&t.push(e)}function c(t){return t.split("-")[0]}function p(t){return[].slice.call(t)}function f(){return document.createElement("div")}function l(t){return["Element","Fragment"].some((function(e){return r(t,e)}))}function d(t){return r(t,"MouseEvent")}function v(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function g(t){return l(t)?[t]:function(t){return r(t,"NodeList")}(t)?p(t):Array.isArray(t)?t:p(document.querySelectorAll(t))}function m(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function h(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function b(t){var e=s(t)[0];return e&&e.ownerDocument||document}function y(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[r](e,n)}))}var E={isTouch:!1},w=0;function T(){E.isTouch||(E.isTouch=!0,window.performance&&document.addEventListener("mousemove",O))}function O(){var t=performance.now();t-w<20&&(E.isTouch=!1,document.removeEventListener("mousemove",O)),w=t}function x(){var t=document.activeElement;if(v(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}var C="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",A=/MSIE |Trident\//.test(C),L=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),D=Object.keys(L);function k(t){var e=(t.plugins||[]).reduce((function(e,n){var r=n.name,i=n.defaultValue;return r&&(e[r]=void 0!==t[r]?t[r]:i),e}),{});return Object.assign({},t,{},e)}function V(t,e){var n=Object.assign({},e,{content:i(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(k(Object.assign({},L,{plugins:e}))):D).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,e.plugins));return n.aria=Object.assign({},L.aria,{},n.aria),n.aria={expanded:"auto"===n.aria.expanded?e.interactive:n.aria.expanded,content:"auto"===n.aria.content?e.interactive?null:"describedby":n.aria.content},n}function R(t){var e=t.firstElementChild,n=p(e.children);return{box:e,content:n.find((function(t){return t.classList.contains("tippy-content")})),arrow:n.find((function(t){return t.classList.contains("tippy-arrow")||t.classList.contains("tippy-svg-arrow")})),backdrop:n.find((function(t){return t.classList.contains("tippy-backdrop")}))}}var j=1,M=[],P=[];function I(r,a){var l,v,g,w,T,O,x,C,D,I=V(r,Object.assign({},L,{},k((l=a,Object.keys(l).reduce((function(t,e){return void 0!==l[e]&&(t[e]=l[e]),t}),{}))))),S=!1,B=!1,U=!1,H=!1,_=[],F=o(bt,I.interactiveDebounce),N=b(I.triggerTarget||r),q=j++,X=(D=I.plugins).filter((function(t,e){return D.indexOf(t)===e})),Y={id:q,reference:r,popper:f(),popperInstance:null,props:I,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:X,clearDelayTimeouts:function(){clearTimeout(v),clearTimeout(g),cancelAnimationFrame(w)},setProps:function(t){if(Y.state.isDestroyed)return;it("onBeforeUpdate",[Y,t]),mt();var e=Y.props,n=V(r,Object.assign({},Y.props,{},t,{ignoreAttributes:!0}));Y.props=n,gt(),e.interactiveDebounce!==n.interactiveDebounce&&(st(),F=o(bt,n.interactiveDebounce));e.triggerTarget&&!n.triggerTarget?s(e.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):n.triggerTarget&&r.removeAttribute("aria-expanded");at(),rt(),W&&W(e,n);Y.popperInstance&&(Tt(),xt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));it("onAfterUpdate",[Y,t])},setContent:function(t){Y.setProps({content:t})},show:function(){var t=Y.state.isVisible,e=Y.state.isDestroyed,r=!Y.state.isEnabled,o=E.isTouch&&!Y.props.touch,a=n(Y.props.duration,0,L.duration);if(t||e||r||o)return;if(tt().hasAttribute("disabled"))return;if(it("onShow",[Y],!1),!1===Y.props.onShow(Y))return;Y.state.isVisible=!0,Z()&&($.style.visibility="visible");rt(),ft(),Y.state.isMounted||($.style.transition="none");if(Z()){var s=et(),c=s.box,p=s.content;m([c,p],0)}x=function(){if(Y.state.isVisible&&!H){if(H=!0,$.offsetHeight,$.style.transition=Y.props.moveTransition,Z()&&Y.props.animation){var t=et(),e=t.box,n=t.content;m([e,n],a),h([e,n],"visible")}ot(),at(),u(P,Y),Y.state.isMounted=!0,it("onMount",[Y]),Y.props.animation&&Z()&&function(t,e){dt(t,e)}(a,(function(){Y.state.isShown=!0,it("onShown",[Y])}))}},function(){var t,e=Y.props.appendTo,n=tt();t=Y.props.interactive&&e===L.appendTo||"parent"===e?n.parentNode:i(e,[n]);t.contains($)||t.appendChild($);Tt()}()},hide:function(){var t=!Y.state.isVisible,e=Y.state.isDestroyed,r=!Y.state.isEnabled,i=n(Y.props.duration,1,L.duration);if(t||e||r)return;if(it("onHide",[Y],!1),!1===Y.props.onHide(Y))return;Y.state.isVisible=!1,Y.state.isShown=!1,H=!1,Z()&&($.style.visibility="hidden");if(st(),lt(),rt(),Z()){var o=et(),a=o.box,s=o.content;Y.props.animation&&(m([a,s],i),h([a,s],"hidden"))}ot(),at(),Y.props.animation?Z()&&function(t,e){dt(t,(function(){!Y.state.isVisible&&$.parentNode&&$.parentNode.contains($)&&e()}))}(i,Y.unmount):Y.unmount()},hideWithInteractivity:function(t){N.addEventListener("mousemove",F),u(M,F),F(t)},enable:function(){Y.state.isEnabled=!0},disable:function(){Y.hide(),Y.state.isEnabled=!1},unmount:function(){Y.state.isVisible&&Y.hide();if(!Y.state.isMounted)return;Ot(),xt().forEach((function(t){t._tippy.unmount()})),$.parentNode&&$.parentNode.removeChild($);P=P.filter((function(t){return t!==Y})),Y.state.isMounted=!1,it("onHidden",[Y])},destroy:function(){if(Y.state.isDestroyed)return;Y.clearDelayTimeouts(),Y.unmount(),mt(),delete r._tippy,Y.state.isDestroyed=!0,it("onDestroy",[Y])}};if(!I.render)return Y;var z=I.render(Y),$=z.popper,W=z.onUpdate;$.setAttribute("data-tippy-root",""),$.id="tippy-"+Y.id,Y.popper=$,r._tippy=Y,$._tippy=Y;var J=X.map((function(t){return t.fn(Y)})),G=r.hasAttribute("aria-expanded");return gt(),at(),rt(),it("onCreate",[Y]),I.showOnCreate&&Ct(),$.addEventListener("mouseenter",(function(){Y.props.interactive&&Y.state.isVisible&&Y.clearDelayTimeouts()})),$.addEventListener("mouseleave",(function(t){Y.props.interactive&&Y.props.trigger.indexOf("mouseenter")>=0&&(N.addEventListener("mousemove",F),F(t))})),Y;function K(){var t=Y.props.touch;return Array.isArray(t)?t:[t,0]}function Q(){return"hold"===K()[0]}function Z(){var t;return!!(null==(t=Y.props.render)?void 0:t.$$tippy)}function tt(){return C||r}function et(){return R($)}function nt(t){return Y.state.isMounted&&!Y.state.isVisible||E.isTouch||T&&"focus"===T.type?0:n(Y.props.delay,t?0:1,L.delay)}function rt(){$.style.pointerEvents=Y.props.interactive&&Y.state.isVisible?"":"none",$.style.zIndex=""+Y.props.zIndex}function it(t,e,n){var r;(void 0===n&&(n=!0),J.forEach((function(n){n[t]&&n[t].apply(void 0,e)})),n)&&(r=Y.props)[t].apply(r,e)}function ot(){var t=Y.props.aria;if(t.content){var e="aria-"+t.content,n=$.id;s(Y.props.triggerTarget||r).forEach((function(t){var r=t.getAttribute(e);if(Y.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 at(){!G&&Y.props.aria.expanded&&s(Y.props.triggerTarget||r).forEach((function(t){Y.props.interactive?t.setAttribute("aria-expanded",Y.state.isVisible&&t===tt()?"true":"false"):t.removeAttribute("aria-expanded")}))}function st(){N.removeEventListener("mousemove",F),M=M.filter((function(t){return t!==F}))}function ut(t){if(!(E.isTouch&&(U||"mousedown"===t.type)||Y.props.interactive&&$.contains(t.target))){if(tt().contains(t.target)){if(E.isTouch)return;if(Y.state.isVisible&&Y.props.trigger.indexOf("click")>=0)return}else it("onClickOutside",[Y,t]);!0===Y.props.hideOnClick&&(S=!1,Y.clearDelayTimeouts(),Y.hide(),B=!0,setTimeout((function(){B=!1})),Y.state.isMounted||lt())}}function ct(){U=!0}function pt(){U=!1}function ft(){N.addEventListener("mousedown",ut,!0),N.addEventListener("touchend",ut,e),N.addEventListener("touchstart",pt,e),N.addEventListener("touchmove",ct,e)}function lt(){N.removeEventListener("mousedown",ut,!0),N.removeEventListener("touchend",ut,e),N.removeEventListener("touchstart",pt,e),N.removeEventListener("touchmove",ct,e)}function dt(t,e){var n=et().box;function r(t){t.target===n&&(y(n,"remove",r),e())}if(0===t)return e();y(n,"remove",O),y(n,"add",r),O=r}function vt(t,e,n){void 0===n&&(n=!1),s(Y.props.triggerTarget||r).forEach((function(r){r.addEventListener(t,e,n),_.push({node:r,eventType:t,handler:e,options:n})}))}function gt(){var t;Q()&&(vt("touchstart",ht,{passive:!0}),vt("touchend",yt,{passive:!0})),(t=Y.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch(vt(t,ht),t){case"mouseenter":vt("mouseleave",yt);break;case"focus":vt(A?"focusout":"blur",Et);break;case"focusin":vt("focusout",Et)}}))}function mt(){_.forEach((function(t){var e=t.node,n=t.eventType,r=t.handler,i=t.options;e.removeEventListener(n,r,i)})),_=[]}function ht(t){var e,n=!1;if(Y.state.isEnabled&&!wt(t)&&!B){var r="focus"===(null==(e=T)?void 0:e.type);T=t,C=t.currentTarget,at(),!Y.state.isVisible&&d(t)&&M.forEach((function(e){return e(t)})),"click"===t.type&&(Y.props.trigger.indexOf("mouseenter")<0||S)&&!1!==Y.props.hideOnClick&&Y.state.isVisible?n=!0:Ct(t),"click"===t.type&&(S=!n),n&&!r&&At(t)}}function bt(t){var e=t.target,n=r.contains(e)||$.contains(e);"mousemove"===t.type&&n||function(t,e){var n=e.clientX,r=e.clientY;return t.every((function(t){var e=t.popperRect,i=t.popperState,o=t.props.interactiveBorder,a=c(i.placement),s=i.modifiersData.offset;if(!s)return!0;var u="bottom"===a?s.top.y:0,p="top"===a?s.bottom.y:0,f="right"===a?s.left.x:0,l="left"===a?s.right.x:0,d=e.top-r+u>o,v=r-e.bottom-p>o,g=e.left-n+f>o,m=n-e.right-l>o;return d||v||g||m}))}(xt().concat($).map((function(t){var e,n=null==(e=t._tippy.popperInstance)?void 0:e.state;return n?{popperRect:t.getBoundingClientRect(),popperState:n,props:I}:null})).filter(Boolean),t)&&(st(),At(t))}function yt(t){wt(t)||Y.props.trigger.indexOf("click")>=0&&S||(Y.props.interactive?Y.hideWithInteractivity(t):At(t))}function Et(t){Y.props.trigger.indexOf("focusin")<0&&t.target!==tt()||Y.props.interactive&&t.relatedTarget&&$.contains(t.relatedTarget)||At(t)}function wt(t){return!!E.isTouch&&Q()!==t.type.indexOf("touch")>=0}function Tt(){Ot();var e=Y.props,n=e.popperOptions,i=e.placement,o=e.offset,a=e.getReferenceClientRect,s=e.moveTransition,u=Z()?R($).arrow:null,c=a?{getBoundingClientRect:a,contextElement:a.contextElement||tt()}:r,p=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(Z()){var n=et().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?n.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?n.setAttribute("data-"+t,""):n.removeAttribute("data-"+t)})),e.attributes.popper={}}}}];Z()&&u&&p.push({name:"arrow",options:{element:u,padding:3}}),p.push.apply(p,(null==n?void 0:n.modifiers)||[]),Y.popperInstance=t.createPopper(c,$,Object.assign({},n,{placement:i,onFirstUpdate:x,modifiers:p}))}function Ot(){Y.popperInstance&&(Y.popperInstance.destroy(),Y.popperInstance=null)}function xt(){return p($.querySelectorAll("[data-tippy-root]"))}function Ct(t){Y.clearDelayTimeouts(),t&&it("onTrigger",[Y,t]),ft();var e=nt(!0),n=K(),r=n[0],i=n[1];E.isTouch&&"hold"===r&&i&&(e=i),e?v=setTimeout((function(){Y.show()}),e):Y.show()}function At(t){if(Y.clearDelayTimeouts(),it("onUntrigger",[Y,t]),Y.state.isVisible){if(!(Y.props.trigger.indexOf("mouseenter")>=0&&Y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&S)){var e=nt(!1);e?g=setTimeout((function(){Y.state.isVisible&&Y.hide()}),e):w=requestAnimationFrame((function(){Y.hide()}))}}else lt()}}function S(t,n){void 0===n&&(n={});var r=L.plugins.concat(n.plugins||[]);document.addEventListener("touchstart",T,e),window.addEventListener("blur",x);var i=Object.assign({},n,{plugins:r}),o=g(t).reduce((function(t,e){var n=e&&I(e,i);return n&&t.push(n),t}),[]);return l(t)?o[0]:o}S.defaultProps=L,S.setDefaultProps=function(t){Object.keys(t).forEach((function(e){L[e]=t[e]}))},S.currentInput=E;var B={mouseover:"mouseenter",focusin:"focus",click:"click"};var U={name:"animateFill",defaultValue:!1,fn:function(t){var e;if(!(null==(e=t.props.render)?void 0:e.$$tippy))return{};var n=R(t.popper),r=n.box,i=n.content,o=t.props.animateFill?function(){var t=f();return t.className="tippy-backdrop",h([t],"hidden"),t}():null;return{onCreate:function(){o&&(r.insertBefore(o,r.firstElementChild),r.setAttribute("data-animatefill",""),r.style.overflow="hidden",t.setProps({arrow:!1,animation:"shift-away"}))},onMount:function(){if(o){var t=r.style.transitionDuration,e=Number(t.replace("ms",""));i.style.transitionDelay=Math.round(e/10)+"ms",o.style.transitionDuration=t,h([o],"visible")}},onShow:function(){o&&(o.style.transitionDuration="0ms")},onHide:function(){o&&h([o],"hidden")}}}};var H={clientX:0,clientY:0},_=[];function F(t){var e=t.clientX,n=t.clientY;H={clientX:e,clientY:n}}var N={name:"followCursor",defaultValue:!1,fn:function(t){var e=t.reference,n=b(t.props.triggerTarget||e),r=!1,i=!1,o=!0,a=t.props;function s(){return"initial"===t.props.followCursor&&t.state.isVisible}function u(){n.addEventListener("mousemove",f)}function c(){n.removeEventListener("mousemove",f)}function p(){r=!0,t.setProps({getReferenceClientRect:null}),r=!1}function f(n){var r=!n.target||e.contains(n.target),i=t.props.followCursor,o=n.clientX,a=n.clientY,s=e.getBoundingClientRect(),u=o-s.left,c=a-s.top;!r&&t.props.interactive||t.setProps({getReferenceClientRect:function(){var t=e.getBoundingClientRect(),n=o,r=a;"initial"===i&&(n=t.left+u,r=t.top+c);var s="horizontal"===i?t.top:r,p="vertical"===i?t.right:n,f="horizontal"===i?t.bottom:r,l="vertical"===i?t.left:n;return{width:p-l,height:f-s,top:s,right:p,bottom:f,left:l}}})}function l(){t.props.followCursor&&(_.push({instance:t,doc:n}),function(t){t.addEventListener("mousemove",F)}(n))}function d(){0===(_=_.filter((function(e){return e.instance!==t}))).filter((function(t){return t.doc===n})).length&&function(t){t.removeEventListener("mousemove",F)}(n)}return{onCreate:l,onDestroy:d,onBeforeUpdate:function(){a=t.props},onAfterUpdate:function(e,n){var o=n.followCursor;r||void 0!==o&&a.followCursor!==o&&(d(),o?(l(),!t.state.isMounted||i||s()||u()):(c(),p()))},onMount:function(){t.props.followCursor&&(o&&(f(H),o=!1),i||s()||u())},onTrigger:function(t,e){var n=e.type;i="focus"===n},onHidden:function(){t.props.followCursor&&(p(),c(),o=!0)}}}};var q={name:"inlinePositioning",defaultValue:!1,fn:function(t){var e,n=t.reference;var r=-1,i=!1,o={name:"tippyInlinePositioning",enabled:!0,phase:"afterWrite",fn:function(i){var o=i.state;t.props.inlinePositioning&&(e!==o.placement&&t.setProps({getReferenceClientRect:function(){return function(t){return function(t,e,n,r){if(n.length<2||null===t)return e;if(2===n.length&&r>=0&&n[0].left>n[1].right)return n[r]||e;switch(t){case"top":case"bottom":var i=n[0],o=n[n.length-1],a="top"===t,s=i.top,u=o.bottom,c=a?i.left:o.left,p=a?i.right:o.right;return{top:s,bottom:u,left:c,right:p,width:p-c,height:u-s};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,g=d[d.length-1].bottom;return{top:v,bottom:g,left:f,right:l,width:l-f,height:g-v};default:return e}}(c(t),n.getBoundingClientRect(),p(n.getClientRects()),r)}(o.placement)}}),e=o.placement)}};function a(){var e;i||(e=function(t,e){var n;return{popperOptions:Object.assign({},t.popperOptions,{modifiers:[].concat(((null==(n=t.popperOptions)?void 0:n.modifiers)||[]).filter((function(t){return t.name!==e.name})),[e])})}}(t.props,o),i=!0,t.setProps(e),i=!1)}return{onCreate:a,onAfterUpdate:a,onTrigger:function(e,n){if(d(n)){var i=p(t.reference.getClientRects()),o=i.find((function(t){return t.left-2<=n.clientX&&t.right+2>=n.clientX&&t.top-2<=n.clientY&&t.bottom+2>=n.clientY}));r=i.indexOf(o)}},onUntrigger:function(){r=-1}}}};var X={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 s=r("reference")?(t.popperInstance?t.popperInstance.state.elements.reference:e).getBoundingClientRect():null,u=r("popper")?n.getBoundingClientRect():null;(s&&Y(i,s)||u&&Y(o,u))&&t.popperInstance&&t.popperInstance.update(),i=s,o=u,t.state.isMounted&&requestAnimationFrame(a)}return{onMount:function(){t.props.sticky&&a()}}}};function Y(t,e){return!t||!e||(t.top!==e.top||t.right!==e.right||t.bottom!==e.bottom||t.left!==e.left)}return S.setDefaultProps({plugins:[U,N,q,X],animation:!1}),S.createSingleton=function(t,e){void 0===e&&(e={});var n,r=t,i=[],o=e.overrides;function s(){i=r.map((function(t){return t.reference}))}function u(t){r.forEach((function(e){t?e.enable():e.disable()}))}u(!1),s();var c={fn:function(){return{onDestroy:function(){u(!0)},onTrigger:function(t,e){var a=e.currentTarget,s=i.indexOf(a);if(a!==n){n=a;var u=(o||[]).concat("content").reduce((function(t,e){return t[e]=r[s].props[e],t}),{});t.setProps(Object.assign({},u,{getReferenceClientRect:function(){return a.getBoundingClientRect()}}))}}}}},p=S(f(),Object.assign({},a(e,["overrides"]),{plugins:[c].concat(e.plugins||[]),triggerTarget:i})),l=p.setProps;return p.setProps=function(t){o=t.overrides||o,l(t)},p.setInstances=function(t){u(!0),r=t,u(!1),s(),p.setProps({triggerTarget:i})},p},S.delegate=function(t,e){var n=[],r=[],i=e.target,o=a(e,["target"]),u=Object.assign({},o,{trigger:"manual",touch:!1}),c=Object.assign({},o,{showOnCreate:!0}),p=S(t,u);function f(t){if(t.target){var n=t.target.closest(i);if(n){var o=n.getAttribute("data-tippy-trigger")||e.trigger||L.trigger;if(!n._tippy&&!("touchstart"===t.type&&"boolean"==typeof c.touch||"touchstart"!==t.type&&o.indexOf(B[t.type]))){var a=S(n,c);a&&(r=r.concat(a))}}}}function l(t,e,r,i){void 0===i&&(i=!1),t.addEventListener(e,r,i),n.push({node:t,eventType:e,handler:r,options:i})}return s(p).forEach((function(t){var e=t.destroy;t.destroy=function(t){void 0===t&&(t=!0),t&&r.forEach((function(t){t.destroy()})),r=[],n.forEach((function(t){var e=t.node,n=t.eventType,r=t.handler,i=t.options;e.removeEventListener(n,r,i)})),n=[],e()},function(t){var e=t.reference;l(e,"touchstart",f),l(e,"mouseover",f),l(e,"focusin",f),l(e,"click",f)}(t)})),p},S.hideAll=function(t){var e=void 0===t?{}:t,n=e.exclude,r=e.duration;P.forEach((function(t){var e=!1;if(n&&(e=v(n)?t.reference===n:t.popper===n.popper),!e){var i=t.props.duration;t.setProps({duration:r}),t.hide(),t.state.isDestroyed||t.setProps({duration:i})}}))},S.roundArrow='<svg width="16" height="6" xmlns="http://www.w3.org/2000/svg"><path d="M0 6s1.796-.013 4.67-3.615C5.851.9 6.93.006 8 0c1.07-.006 2.148.887 3.343 2.385C14.233 6.005 16 6 16 6H0z"></svg>',S}));
|
|
//# sourceMappingURL=tippy-headless.umd.min.js.map
|