Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-tooltip

Package Overview
Dependencies
Maintainers
6
Versions
347
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-tooltip - npm Package Compare versions

Comparing version 5.25.0 to 5.25.1-beta.1137.0

2

dist/react-tooltip.umd.min.js

@@ -7,3 +7,3 @@ /*

*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("@floating-ui/dom"),require("classnames")):"function"==typeof define&&define.amd?define(["exports","react","@floating-ui/dom","classnames"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactTooltip={},e.React,e.FloatingUIDOM,e.classNames)}(this,(function(e,t,o,l){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=r(t),c=r(l);const s="react-tooltip-core-styles",i="react-tooltip-base-styles",a={core:!1,base:!1};function u({css:e,id:t=i,type:o="base",ref:l}){var r,n;if(!e||"undefined"==typeof document||a[o])return;if("core"===o&&"undefined"!=typeof process&&(null===(r=null===process||void 0===process?void 0:process.env)||void 0===r?void 0:r.REACT_TOOLTIP_DISABLE_CORE_STYLES))return;if("base"!==o&&"undefined"!=typeof process&&(null===(n=null===process||void 0===process?void 0:process.env)||void 0===n?void 0:n.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;"core"===o&&(t=s),l||(l={});const{insertAt:c}=l;if(document.getElementById(t))return void console.warn(`[react-tooltip] Element with id '${t}' already exists. Call \`removeStyle()\` first`);const u=document.head||document.getElementsByTagName("head")[0],d=document.createElement("style");d.id=t,d.type="text/css","top"===c&&u.firstChild?u.insertBefore(d,u.firstChild):u.appendChild(d),d.styleSheet?d.styleSheet.cssText=e:d.appendChild(document.createTextNode(e)),a[o]=!0}const d=(e,t,o)=>{let l=null;return function(...r){const n=()=>{l=null,o||e.apply(this,r)};o&&!l&&(e.apply(this,r),l=setTimeout(n,t)),o||(l&&clearTimeout(l),l=setTimeout(n,t))}},p="DEFAULT_TOOLTIP_ID",f={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},v={getTooltipData:()=>f},m=t.createContext(v);function y(e=p){return t.useContext(m).getTooltipData(e)}const h="undefined"!=typeof window?t.useLayoutEffect:t.useEffect,w=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const o=t.getPropertyValue(e);return"auto"===o||"scroll"===o}))},S=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(w(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},E=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:l=null,place:r="top",offset:n=10,strategy:c="absolute",middlewares:s=[o.offset(Number(n)),o.flip(),o.shift({padding:5})],border:i})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const a=s;return l?(a.push(o.arrow({element:l,padding:5})),o.computePosition(e,t,{placement:r,strategy:c,middleware:a}).then((({x:e,y:t,placement:o,middlewareData:l})=>{var r,n;const c={left:`${e}px`,top:`${t}px`,border:i},{x:s,y:a}=null!==(r=l.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(n={top:"bottom",right:"left",bottom:"top",left:"right"}[o.split("-")[0]])&&void 0!==n?n:"bottom",d=i&&{borderBottom:i,borderRight:i};let p=0;if(i){const e=`${i}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:c,tooltipArrowStyles:{left:null!=s?`${s}px`:"",top:null!=a?`${a}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:o}}))):o.computePosition(e,t,{placement:"bottom",strategy:c,middleware:a}).then((({x:e,y:t,placement:o})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:o})))};var b={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},g={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const _=({forwardRef:e,id:l,className:r,classNameArrow:s,variant:i="dark",anchorId:a,anchorSelect:u,place:p="top",offset:f=10,events:v=["hover"],openOnClick:m=!1,positionStrategy:w="absolute",middlewares:_,wrapper:A,delayShow:O=0,delayHide:T=0,float:k=!1,hidden:R=!1,noArrow:C=!1,clickable:L=!1,closeOnEsc:x=!1,closeOnScroll:N=!1,closeOnResize:$=!1,openEvents:j,closeEvents:I,globalCloseEvents:B,imperativeModeOnly:q,style:z,position:D,afterShow:M,afterHide:H,content:P,contentWrapperRef:W,isOpen:F,setIsOpen:U,activeAnchor:K,setActiveAnchor:X,border:Y,opacity:G,arrowColor:V,role:Z="tooltip"})=>{var J;const Q=t.useRef(null),ee=t.useRef(null),te=t.useRef(null),oe=t.useRef(null),[le,re]=t.useState(p),[ne,ce]=t.useState({}),[se,ie]=t.useState({}),[ae,ue]=t.useState(!1),[de,pe]=t.useState(!1),[fe,ve]=t.useState(null),me=t.useRef(!1),ye=t.useRef(null),{anchorRefs:he,setActiveAnchor:we}=y(l),Se=t.useRef(!1),[Ee,be]=t.useState([]),ge=t.useRef(!1),_e=m||v.includes("click"),Ae=_e||(null==j?void 0:j.click)||(null==j?void 0:j.dblclick)||(null==j?void 0:j.mousedown),Oe=j?{...j}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};!j&&_e&&Object.assign(Oe,{mouseenter:!1,focus:!1,click:!0});const Te=I?{...I}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};!I&&_e&&Object.assign(Te,{mouseleave:!1,blur:!1});const ke=B?{...B}:{escape:x||!1,scroll:N||!1,resize:$||!1,clickOutsideAnchor:Ae||!1};q&&(Object.assign(Oe,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Te,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(ke,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),h((()=>(ge.current=!0,()=>{ge.current=!1})),[]);const Re=e=>{ge.current&&(e&&pe(!0),setTimeout((()=>{ge.current&&(null==U||U(e),void 0===F&&ue(e))}),10))};t.useEffect((()=>{if(void 0===F)return()=>null;F&&pe(!0);const e=setTimeout((()=>{ue(F)}),10);return()=>{clearTimeout(e)}}),[F]),t.useEffect((()=>{ae!==me.current&&(me.current=ae,ae&&(null==M||M()))}),[ae]);const Ce=(e=O)=>{te.current&&clearTimeout(te.current),te.current=setTimeout((()=>{Re(!0)}),e)},Le=(e=T)=>{oe.current&&clearTimeout(oe.current),oe.current=setTimeout((()=>{Se.current||Re(!1)}),e)},xe=e=>{var t;if(!e)return;const o=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==o?void 0:o.isConnected))return X(null),void we({current:null});O?Ce():Re(!0),X(o),we({current:o}),oe.current&&clearTimeout(oe.current)},Ne=()=>{L?Le(T||100):T?Le():Re(!1),te.current&&clearTimeout(te.current)},$e=({x:e,y:t})=>{var o;const l={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};E({place:null!==(o=null==fe?void 0:fe.place)&&void 0!==o?o:p,offset:f,elementReference:l,tooltipReference:Q.current,tooltipArrowReference:ee.current,strategy:w,middlewares:_,border:Y}).then((e=>{Object.keys(e.tooltipStyles).length&&ce(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&ie(e.tooltipArrowStyles),re(e.place)}))},je=e=>{if(!e)return;const t=e,o={x:t.clientX,y:t.clientY};$e(o),ye.current=o},Ie=e=>{var t;if(!ae)return;const o=e.target;if(null===(t=Q.current)||void 0===t?void 0:t.contains(o))return;[document.querySelector(`[id='${a}']`),...Ee].some((e=>null==e?void 0:e.contains(o)))||(Re(!1),te.current&&clearTimeout(te.current))},Be=d(xe,50,!0),qe=d(Ne,50,!0),ze=t.useCallback((()=>{var e,t;const o=null!==(e=null==fe?void 0:fe.position)&&void 0!==e?e:D;o?$e(o):k?ye.current&&$e(ye.current):(null==K?void 0:K.isConnected)&&E({place:null!==(t=null==fe?void 0:fe.place)&&void 0!==t?t:p,offset:f,elementReference:K,tooltipReference:Q.current,tooltipArrowReference:ee.current,strategy:w,middlewares:_,border:Y}).then((e=>{ge.current&&(Object.keys(e.tooltipStyles).length&&ce(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&ie(e.tooltipArrowStyles),re(e.place))}))}),[ae,K,P,z,p,null==fe?void 0:fe.place,f,w,D,null==fe?void 0:fe.position,k]);t.useEffect((()=>{var e,t;const l=new Set(he);Ee.forEach((e=>{l.add({current:e})}));const r=document.querySelector(`[id='${a}']`);r&&l.add({current:r});const n=()=>{Re(!1)},c=S(K),s=S(Q.current);ke.scroll&&(window.addEventListener("scroll",n),null==c||c.addEventListener("scroll",n),null==s||s.addEventListener("scroll",n));let i=null;ke.resize?window.addEventListener("resize",n):K&&Q.current&&(i=o.autoUpdate(K,Q.current,ze,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const u=e=>{"Escape"===e.key&&Re(!1)};ke.escape&&window.addEventListener("keydown",u),ke.clickOutsideAnchor&&window.addEventListener("click",Ie);const d=[],p=e=>{ae||xe(e)},f=()=>{ae&&Ne()},v=["mouseenter","mouseleave","focus","blur"],m=["click","dblclick","mousedown","mouseup"];Object.entries(Oe).forEach((([e,t])=>{t&&(v.includes(e)?d.push({event:e,listener:Be}):m.includes(e)&&d.push({event:e,listener:p}))})),Object.entries(Te).forEach((([e,t])=>{t&&(v.includes(e)?d.push({event:e,listener:qe}):m.includes(e)&&d.push({event:e,listener:f}))})),k&&d.push({event:"mousemove",listener:je});const y=()=>{Se.current=!0},h=()=>{Se.current=!1,Ne()};return L&&!Ae&&(null===(e=Q.current)||void 0===e||e.addEventListener("mouseenter",y),null===(t=Q.current)||void 0===t||t.addEventListener("mouseleave",h)),d.forEach((({event:e,listener:t})=>{l.forEach((o=>{var l;null===(l=o.current)||void 0===l||l.addEventListener(e,t)}))})),()=>{var e,t;ke.scroll&&(window.removeEventListener("scroll",n),null==c||c.removeEventListener("scroll",n),null==s||s.removeEventListener("scroll",n)),ke.resize?window.removeEventListener("resize",n):null==i||i(),ke.clickOutsideAnchor&&window.removeEventListener("click",Ie),ke.escape&&window.removeEventListener("keydown",u),L&&!Ae&&(null===(e=Q.current)||void 0===e||e.removeEventListener("mouseenter",y),null===(t=Q.current)||void 0===t||t.removeEventListener("mouseleave",h)),d.forEach((({event:e,listener:t})=>{l.forEach((o=>{var l;null===(l=o.current)||void 0===l||l.removeEventListener(e,t)}))}))}}),[K,ze,de,he,Ee,j,I,B,_e]),t.useEffect((()=>{var e,t;let o=null!==(t=null!==(e=null==fe?void 0:fe.anchorSelect)&&void 0!==e?e:u)&&void 0!==t?t:"";!o&&l&&(o=`[data-tooltip-id='${l}']`);const r=new MutationObserver((e=>{const t=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName){e.target.getAttribute("data-tooltip-id")===l&&t.push(e.target)}if("childList"===e.type){if(K){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,K))&&(pe(!1),Re(!1),X(null),te.current&&clearTimeout(te.current),oe.current&&clearTimeout(oe.current),!0)}))}if(o)try{const l=[...e.addedNodes].filter((e=>1===e.nodeType));t.push(...l.filter((e=>e.matches(o)))),t.push(...l.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(t.length||r.length)&&be((e=>[...e.filter((e=>!r.includes(e))),...t]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{r.disconnect()}}),[l,u,null==fe?void 0:fe.anchorSelect,K]),t.useEffect((()=>{ze()}),[ze]),t.useEffect((()=>{if(!(null==W?void 0:W.current))return()=>null;const e=new ResizeObserver((()=>{ze()}));return e.observe(W.current),()=>{e.disconnect()}}),[P,null==W?void 0:W.current]),t.useEffect((()=>{var e;const t=document.querySelector(`[id='${a}']`),o=[...Ee,t];K&&o.includes(K)||X(null!==(e=Ee[0])&&void 0!==e?e:t)}),[a,Ee,K]),t.useEffect((()=>()=>{te.current&&clearTimeout(te.current),oe.current&&clearTimeout(oe.current)}),[]),t.useEffect((()=>{var e;let t=null!==(e=null==fe?void 0:fe.anchorSelect)&&void 0!==e?e:u;if(!t&&l&&(t=`[data-tooltip-id='${l}']`),t)try{const e=Array.from(document.querySelectorAll(t));be(e)}catch(e){be([])}}),[l,u,null==fe?void 0:fe.anchorSelect]);const De=null!==(J=null==fe?void 0:fe.content)&&void 0!==J?J:P,Me=ae&&Object.keys(ne).length>0;return t.useImperativeHandle(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}ve(null!=e?e:null),(null==e?void 0:e.delay)?Ce(e.delay):Re(!0)},close:e=>{(null==e?void 0:e.delay)?Le(e.delay):Re(!1)},activeAnchor:K,place:le,isOpen:Boolean(de&&!R&&De&&Me)}))),de&&!R&&De?n.default.createElement(A,{id:l,role:Z,className:c.default("react-tooltip",b.tooltip,g.tooltip,g[i],r,`react-tooltip__place-${le}`,b[Me?"show":"closing"],Me?"react-tooltip__show":"react-tooltip__closing","fixed"===w&&b.fixed,L&&b.clickable),onTransitionEnd:e=>{ae||"opacity"!==e.propertyName||(pe(!1),ve(null),null==H||H())},style:{...z,...ne,opacity:void 0!==G&&Me?G:void 0},ref:Q},De,n.default.createElement(A,{className:c.default("react-tooltip-arrow",b.arrow,g.arrow,s,C&&b.noArrow),style:{...se,background:V?`linear-gradient(to right bottom, transparent 50%, ${V} 50%)`:void 0},ref:ee})):null},A=({content:e})=>n.default.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),O=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),T=n.default.forwardRef((({id:e,anchorId:o,anchorSelect:l,content:r,html:s,render:i,className:a,classNameArrow:u,variant:d="dark",place:p="top",offset:f=10,wrapper:v="div",children:m=null,events:h=["hover"],openOnClick:w=!1,positionStrategy:S="absolute",middlewares:E,delayShow:b=0,delayHide:g=0,float:T=!1,hidden:k=!1,noArrow:R=!1,clickable:C=!1,closeOnEsc:L=!1,closeOnScroll:x=!1,closeOnResize:N=!1,openEvents:$,closeEvents:j,globalCloseEvents:I,imperativeModeOnly:B=!1,style:q,position:z,isOpen:D,disableStyleInjection:M=!1,border:H,opacity:P,arrowColor:W,setIsOpen:F,afterShow:U,afterHide:K,role:X="tooltip"},Y)=>{const[G,V]=t.useState(r),[Z,J]=t.useState(s),[Q,ee]=t.useState(p),[te,oe]=t.useState(d),[le,re]=t.useState(f),[ne,ce]=t.useState(b),[se,ie]=t.useState(g),[ae,ue]=t.useState(T),[de,pe]=t.useState(k),[fe,ve]=t.useState(v),[me,ye]=t.useState(h),[he,we]=t.useState(S),[Se,Ee]=t.useState(null),[be,ge]=t.useState(null),_e=t.useRef(M),{anchorRefs:Ae,activeAnchor:Oe}=y(e),Te=e=>null==e?void 0:e.getAttributeNames().reduce(((t,o)=>{var l;if(o.startsWith("data-tooltip-")){t[o.replace(/^data-tooltip-/,"")]=null!==(l=null==e?void 0:e.getAttribute(o))&&void 0!==l?l:null}return t}),{}),ke=e=>{const t={place:e=>{var t;ee(null!==(t=e)&&void 0!==t?t:p)},content:e=>{V(null!=e?e:r)},html:e=>{J(null!=e?e:s)},variant:e=>{var t;oe(null!==(t=e)&&void 0!==t?t:d)},offset:e=>{re(null===e?f:Number(e))},wrapper:e=>{var t;ve(null!==(t=e)&&void 0!==t?t:v)},events:e=>{const t=null==e?void 0:e.split(" ");ye(null!=t?t:h)},"position-strategy":e=>{var t;we(null!==(t=e)&&void 0!==t?t:S)},"delay-show":e=>{ce(null===e?b:Number(e))},"delay-hide":e=>{ie(null===e?g:Number(e))},float:e=>{ue(null===e?T:"true"===e)},hidden:e=>{pe(null===e?k:"true"===e)},"class-name":e=>{Ee(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,o])=>{var l;null===(l=t[e])||void 0===l||l.call(t,o)}))};t.useEffect((()=>{V(r)}),[r]),t.useEffect((()=>{J(s)}),[s]),t.useEffect((()=>{ee(p)}),[p]),t.useEffect((()=>{oe(d)}),[d]),t.useEffect((()=>{re(f)}),[f]),t.useEffect((()=>{ce(b)}),[b]),t.useEffect((()=>{ie(g)}),[g]),t.useEffect((()=>{ue(T)}),[T]),t.useEffect((()=>{pe(k)}),[k]),t.useEffect((()=>{we(S)}),[S]),t.useEffect((()=>{_e.current!==M&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[M]),t.useEffect((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===M,disableBase:M}}))}),[]),t.useEffect((()=>{var t;const r=new Set(Ae);let n=l;if(!n&&e&&(n=`[data-tooltip-id='${e}']`),n)try{document.querySelectorAll(n).forEach((e=>{r.add({current:e})}))}catch(e){console.warn(`[react-tooltip] "${n}" is not a valid CSS selector`)}const c=document.querySelector(`[id='${o}']`);if(c&&r.add({current:c}),!r.size)return()=>null;const s=null!==(t=null!=be?be:c)&&void 0!==t?t:Oe.current,i=new MutationObserver((e=>{e.forEach((e=>{var t;if(!s||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const o=Te(s);ke(o)}))})),a={attributes:!0,childList:!1,subtree:!1};if(s){const e=Te(s);ke(e),i.observe(s,a)}return()=>{i.disconnect()}}),[Ae,Oe,be,o,l]),t.useEffect((()=>{(null==q?void 0:q.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),H&&!O("border",`${H}`)&&console.warn(`[react-tooltip] "${H}" is not a valid \`border\`.`),(null==q?void 0:q.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),P&&!O("opacity",`${P}`)&&console.warn(`[react-tooltip] "${P}" is not a valid \`opacity\`.`)}),[]);let Re=m;const Ce=t.useRef(null);if(i){const e=i({content:null!=G?G:null,activeAnchor:be});Re=e?n.default.createElement("div",{ref:Ce,className:"react-tooltip-content-wrapper"},e):null}else G&&(Re=G);Z&&(Re=n.default.createElement(A,{content:Z}));const Le={forwardRef:Y,id:e,anchorId:o,anchorSelect:l,className:c.default(a,Se),classNameArrow:u,content:Re,contentWrapperRef:Ce,place:Q,variant:te,offset:le,wrapper:fe,events:me,openOnClick:w,positionStrategy:he,middlewares:E,delayShow:ne,delayHide:se,float:ae,hidden:de,noArrow:R,clickable:C,closeOnEsc:L,closeOnScroll:x,closeOnResize:N,openEvents:$,closeEvents:j,globalCloseEvents:I,imperativeModeOnly:B,style:q,position:z,isOpen:D,border:H,opacity:P,arrowColor:W,setIsOpen:F,afterShow:U,afterHide:K,activeAnchor:be,setActiveAnchor:e=>ge(e),role:X};return n.default.createElement(_,{...Le})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||u({css:`:root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}`,type:"core"}),e.detail.disableBase||u({css:`
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("@floating-ui/dom"),require("classnames")):"function"==typeof define&&define.amd?define(["exports","react","@floating-ui/dom","classnames"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactTooltip={},e.React,e.FloatingUIDOM,e.classNames)}(this,(function(e,t,o,l){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=r(t),c=r(l);const s="react-tooltip-core-styles",i="react-tooltip-base-styles",a={core:!1,base:!1};function u({css:e,id:t=i,type:o="base",ref:l}){var r,n;if(!e||"undefined"==typeof document||a[o])return;if("core"===o&&"undefined"!=typeof process&&(null===(r=null===process||void 0===process?void 0:process.env)||void 0===r?void 0:r.REACT_TOOLTIP_DISABLE_CORE_STYLES))return;if("base"!==o&&"undefined"!=typeof process&&(null===(n=null===process||void 0===process?void 0:process.env)||void 0===n?void 0:n.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;"core"===o&&(t=s),l||(l={});const{insertAt:c}=l;if(document.getElementById(t))return void console.warn(`[react-tooltip] Element with id '${t}' already exists. Call \`removeStyle()\` first`);const u=document.head||document.getElementsByTagName("head")[0],d=document.createElement("style");d.id=t,d.type="text/css","top"===c&&u.firstChild?u.insertBefore(d,u.firstChild):u.appendChild(d),d.styleSheet?d.styleSheet.cssText=e:d.appendChild(document.createTextNode(e)),a[o]=!0}const d=(e,t,o)=>{let l=null;return function(...r){const n=()=>{l=null,o||e.apply(this,r)};o&&!l&&(e.apply(this,r),l=setTimeout(n,t)),o||(l&&clearTimeout(l),l=setTimeout(n,t))}},p="DEFAULT_TOOLTIP_ID",f={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},v={getTooltipData:()=>f},m=t.createContext(v);function y(e=p){return t.useContext(m).getTooltipData(e)}const h="undefined"!=typeof window?t.useLayoutEffect:t.useEffect,w=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const o=t.getPropertyValue(e);return"auto"===o||"scroll"===o}))},S=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(w(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},E=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:l=null,place:r="top",offset:n=10,strategy:c="absolute",middlewares:s=[o.offset(Number(n)),o.flip(),o.shift({padding:5})],border:i})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const a=s;return l?(a.push(o.arrow({element:l,padding:5})),o.computePosition(e,t,{placement:r,strategy:c,middleware:a}).then((({x:e,y:t,placement:o,middlewareData:l})=>{var r,n;const c={left:`${e}px`,top:`${t}px`,border:i},{x:s,y:a}=null!==(r=l.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(n={top:"bottom",right:"left",bottom:"top",left:"right"}[o.split("-")[0]])&&void 0!==n?n:"bottom",d=i&&{borderBottom:i,borderRight:i};let p=0;if(i){const e=`${i}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:c,tooltipArrowStyles:{left:null!=s?`${s}px`:"",top:null!=a?`${a}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:o}}))):o.computePosition(e,t,{placement:"bottom",strategy:c,middleware:a}).then((({x:e,y:t,placement:o})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:o})))};var b={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},g={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const _=({forwardRef:e,id:l,className:r,classNameArrow:s,variant:i="dark",anchorId:a,anchorSelect:u,place:p="top",offset:f=10,events:v=["hover"],openOnClick:m=!1,positionStrategy:w="absolute",middlewares:_,wrapper:A,delayShow:O=0,delayHide:T=0,float:k=!1,hidden:R=!1,noArrow:C=!1,clickable:L=!1,closeOnEsc:x=!1,closeOnScroll:N=!1,closeOnResize:$=!1,openEvents:j,closeEvents:I,globalCloseEvents:B,imperativeModeOnly:q,style:z,position:D,afterShow:M,afterHide:H,content:P,contentWrapperRef:W,isOpen:F,setIsOpen:U,activeAnchor:K,setActiveAnchor:X,border:Y,opacity:G,arrowColor:V,role:Z="tooltip"})=>{var J;const Q=t.useRef(null),ee=t.useRef(null),te=t.useRef(null),oe=t.useRef(null),[le,re]=t.useState(p),[ne,ce]=t.useState({}),[se,ie]=t.useState({}),[ae,ue]=t.useState(!1),[de,pe]=t.useState(!1),[fe,ve]=t.useState(null),me=t.useRef(!1),ye=t.useRef(null),{anchorRefs:he,setActiveAnchor:we}=y(l),Se=t.useRef(!1),[Ee,be]=t.useState([]),ge=t.useRef(!1),_e=m||v.includes("click"),Ae=_e||(null==j?void 0:j.click)||(null==j?void 0:j.dblclick)||(null==j?void 0:j.mousedown),Oe=j?{...j}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};!j&&_e&&Object.assign(Oe,{mouseenter:!1,focus:!1,click:!0});const Te=I?{...I}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};!I&&_e&&Object.assign(Te,{mouseleave:!1,blur:!1});const ke=B?{...B}:{escape:x||!1,scroll:N||!1,resize:$||!1,clickOutsideAnchor:Ae||!1};q&&(Object.assign(Oe,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Te,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(ke,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),h((()=>(ge.current=!0,()=>{ge.current=!1})),[]);const Re=e=>{ge.current&&(e&&pe(!0),setTimeout((()=>{ge.current&&(null==U||U(e),void 0===F&&ue(e))}),10))};t.useEffect((()=>{if(void 0===F)return()=>null;F&&pe(!0);const e=setTimeout((()=>{ue(F)}),10);return()=>{clearTimeout(e)}}),[F]),t.useEffect((()=>{ae!==me.current&&(me.current=ae,ae&&(null==M||M()))}),[ae]);const Ce=(e=O)=>{te.current&&clearTimeout(te.current),te.current=setTimeout((()=>{Re(!0)}),e)},Le=(e=T)=>{oe.current&&clearTimeout(oe.current),oe.current=setTimeout((()=>{Se.current||Re(!1)}),e)},xe=e=>{var t;if(!e)return;const o=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==o?void 0:o.isConnected))return X(null),void we({current:null});O?Ce():Re(!0),X(o),we({current:o}),oe.current&&clearTimeout(oe.current)},Ne=()=>{L?Le(T||100):T?Le():Re(!1),te.current&&clearTimeout(te.current)},$e=({x:e,y:t})=>{var o;const l={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};E({place:null!==(o=null==fe?void 0:fe.place)&&void 0!==o?o:p,offset:f,elementReference:l,tooltipReference:Q.current,tooltipArrowReference:ee.current,strategy:w,middlewares:_,border:Y}).then((e=>{Object.keys(e.tooltipStyles).length&&ce(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&ie(e.tooltipArrowStyles),re(e.place)}))},je=e=>{if(!e)return;const t=e,o={x:t.clientX,y:t.clientY};$e(o),ye.current=o},Ie=e=>{var t;if(!ae)return;const o=e.target;if(null===(t=Q.current)||void 0===t?void 0:t.contains(o))return;[document.querySelector(`[id='${a}']`),...Ee].some((e=>null==e?void 0:e.contains(o)))||(Re(!1),te.current&&clearTimeout(te.current))},Be=d(xe,50,!0),qe=d(Ne,50,!0),ze=t.useCallback((()=>{var e,t;const o=null!==(e=null==fe?void 0:fe.position)&&void 0!==e?e:D;o?$e(o):k?ye.current&&$e(ye.current):(null==K?void 0:K.isConnected)&&E({place:null!==(t=null==fe?void 0:fe.place)&&void 0!==t?t:p,offset:f,elementReference:K,tooltipReference:Q.current,tooltipArrowReference:ee.current,strategy:w,middlewares:_,border:Y}).then((e=>{ge.current&&(Object.keys(e.tooltipStyles).length&&ce(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&ie(e.tooltipArrowStyles),re(e.place))}))}),[ae,K,P,z,p,null==fe?void 0:fe.place,f,w,D,null==fe?void 0:fe.position,k]);t.useEffect((()=>{var e,t;const l=new Set(he);Ee.forEach((e=>{l.add({current:e})}));const r=document.querySelector(`[id='${a}']`);r&&l.add({current:r});const n=()=>{Re(!1)},c=S(K),s=S(Q.current);ke.scroll&&(window.addEventListener("scroll",n),null==c||c.addEventListener("scroll",n),null==s||s.addEventListener("scroll",n));let i=null;ke.resize?window.addEventListener("resize",n):K&&Q.current&&(i=o.autoUpdate(K,Q.current,ze,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const u=e=>{"Escape"===e.key&&Re(!1)};ke.escape&&window.addEventListener("keydown",u),ke.clickOutsideAnchor&&window.addEventListener("click",Ie);const d=[],p=e=>{ae||xe(e)},f=()=>{ae&&Ne()},v=["mouseenter","mouseleave","focus","blur"],m=["click","dblclick","mousedown","mouseup"];Object.entries(Oe).forEach((([e,t])=>{t&&(v.includes(e)?d.push({event:e,listener:Be}):m.includes(e)&&d.push({event:e,listener:p}))})),Object.entries(Te).forEach((([e,t])=>{t&&(v.includes(e)?d.push({event:e,listener:qe}):m.includes(e)&&d.push({event:e,listener:f}))})),k&&d.push({event:"mousemove",listener:je});const y=()=>{Se.current=!0},h=()=>{Se.current=!1,Ne()};return L&&!Ae&&(null===(e=Q.current)||void 0===e||e.addEventListener("mouseenter",y),null===(t=Q.current)||void 0===t||t.addEventListener("mouseleave",h)),d.forEach((({event:e,listener:t})=>{l.forEach((o=>{var l;null===(l=o.current)||void 0===l||l.addEventListener(e,t)}))})),()=>{var e,t;ke.scroll&&(window.removeEventListener("scroll",n),null==c||c.removeEventListener("scroll",n),null==s||s.removeEventListener("scroll",n)),ke.resize?window.removeEventListener("resize",n):null==i||i(),ke.clickOutsideAnchor&&window.removeEventListener("click",Ie),ke.escape&&window.removeEventListener("keydown",u),L&&!Ae&&(null===(e=Q.current)||void 0===e||e.removeEventListener("mouseenter",y),null===(t=Q.current)||void 0===t||t.removeEventListener("mouseleave",h)),d.forEach((({event:e,listener:t})=>{l.forEach((o=>{var l;null===(l=o.current)||void 0===l||l.removeEventListener(e,t)}))}))}}),[K,ze,de,he,Ee,j,I,B,_e]),t.useEffect((()=>{var e,t;let o=null!==(t=null!==(e=null==fe?void 0:fe.anchorSelect)&&void 0!==e?e:u)&&void 0!==t?t:"";!o&&l&&(o=`[data-tooltip-id='${l}']`);const r=new MutationObserver((e=>{const t=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName){e.target.getAttribute("data-tooltip-id")===l&&t.push(e.target)}if("childList"===e.type){if(K){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,K))&&(pe(!1),Re(!1),X(null),te.current&&clearTimeout(te.current),oe.current&&clearTimeout(oe.current),!0)}))}if(o)try{const l=[...e.addedNodes].filter((e=>1===e.nodeType));t.push(...l.filter((e=>e.matches(o)))),t.push(...l.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(t.length||r.length)&&be((e=>[...e.filter((e=>!r.includes(e))),...t]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{r.disconnect()}}),[l,u,null==fe?void 0:fe.anchorSelect,K]),t.useEffect((()=>{ze()}),[ze]),t.useEffect((()=>{if(!(null==W?void 0:W.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>ze()))}));return e.observe(W.current),()=>{e.disconnect()}}),[P,null==W?void 0:W.current]),t.useEffect((()=>{var e;const t=document.querySelector(`[id='${a}']`),o=[...Ee,t];K&&o.includes(K)||X(null!==(e=Ee[0])&&void 0!==e?e:t)}),[a,Ee,K]),t.useEffect((()=>()=>{te.current&&clearTimeout(te.current),oe.current&&clearTimeout(oe.current)}),[]),t.useEffect((()=>{var e;let t=null!==(e=null==fe?void 0:fe.anchorSelect)&&void 0!==e?e:u;if(!t&&l&&(t=`[data-tooltip-id='${l}']`),t)try{const e=Array.from(document.querySelectorAll(t));be(e)}catch(e){be([])}}),[l,u,null==fe?void 0:fe.anchorSelect]);const De=null!==(J=null==fe?void 0:fe.content)&&void 0!==J?J:P,Me=ae&&Object.keys(ne).length>0;return t.useImperativeHandle(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}ve(null!=e?e:null),(null==e?void 0:e.delay)?Ce(e.delay):Re(!0)},close:e=>{(null==e?void 0:e.delay)?Le(e.delay):Re(!1)},activeAnchor:K,place:le,isOpen:Boolean(de&&!R&&De&&Me)}))),de&&!R&&De?n.default.createElement(A,{id:l,role:Z,className:c.default("react-tooltip",b.tooltip,g.tooltip,g[i],r,`react-tooltip__place-${le}`,b[Me?"show":"closing"],Me?"react-tooltip__show":"react-tooltip__closing","fixed"===w&&b.fixed,L&&b.clickable),onTransitionEnd:e=>{ae||"opacity"!==e.propertyName||(pe(!1),ve(null),null==H||H())},style:{...z,...ne,opacity:void 0!==G&&Me?G:void 0},ref:Q},De,n.default.createElement(A,{className:c.default("react-tooltip-arrow",b.arrow,g.arrow,s,C&&b.noArrow),style:{...se,background:V?`linear-gradient(to right bottom, transparent 50%, ${V} 50%)`:void 0},ref:ee})):null},A=({content:e})=>n.default.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),O=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),T=n.default.forwardRef((({id:e,anchorId:o,anchorSelect:l,content:r,html:s,render:i,className:a,classNameArrow:u,variant:d="dark",place:p="top",offset:f=10,wrapper:v="div",children:m=null,events:h=["hover"],openOnClick:w=!1,positionStrategy:S="absolute",middlewares:E,delayShow:b=0,delayHide:g=0,float:T=!1,hidden:k=!1,noArrow:R=!1,clickable:C=!1,closeOnEsc:L=!1,closeOnScroll:x=!1,closeOnResize:N=!1,openEvents:$,closeEvents:j,globalCloseEvents:I,imperativeModeOnly:B=!1,style:q,position:z,isOpen:D,disableStyleInjection:M=!1,border:H,opacity:P,arrowColor:W,setIsOpen:F,afterShow:U,afterHide:K,role:X="tooltip"},Y)=>{const[G,V]=t.useState(r),[Z,J]=t.useState(s),[Q,ee]=t.useState(p),[te,oe]=t.useState(d),[le,re]=t.useState(f),[ne,ce]=t.useState(b),[se,ie]=t.useState(g),[ae,ue]=t.useState(T),[de,pe]=t.useState(k),[fe,ve]=t.useState(v),[me,ye]=t.useState(h),[he,we]=t.useState(S),[Se,Ee]=t.useState(null),[be,ge]=t.useState(null),_e=t.useRef(M),{anchorRefs:Ae,activeAnchor:Oe}=y(e),Te=e=>null==e?void 0:e.getAttributeNames().reduce(((t,o)=>{var l;if(o.startsWith("data-tooltip-")){t[o.replace(/^data-tooltip-/,"")]=null!==(l=null==e?void 0:e.getAttribute(o))&&void 0!==l?l:null}return t}),{}),ke=e=>{const t={place:e=>{var t;ee(null!==(t=e)&&void 0!==t?t:p)},content:e=>{V(null!=e?e:r)},html:e=>{J(null!=e?e:s)},variant:e=>{var t;oe(null!==(t=e)&&void 0!==t?t:d)},offset:e=>{re(null===e?f:Number(e))},wrapper:e=>{var t;ve(null!==(t=e)&&void 0!==t?t:v)},events:e=>{const t=null==e?void 0:e.split(" ");ye(null!=t?t:h)},"position-strategy":e=>{var t;we(null!==(t=e)&&void 0!==t?t:S)},"delay-show":e=>{ce(null===e?b:Number(e))},"delay-hide":e=>{ie(null===e?g:Number(e))},float:e=>{ue(null===e?T:"true"===e)},hidden:e=>{pe(null===e?k:"true"===e)},"class-name":e=>{Ee(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,o])=>{var l;null===(l=t[e])||void 0===l||l.call(t,o)}))};t.useEffect((()=>{V(r)}),[r]),t.useEffect((()=>{J(s)}),[s]),t.useEffect((()=>{ee(p)}),[p]),t.useEffect((()=>{oe(d)}),[d]),t.useEffect((()=>{re(f)}),[f]),t.useEffect((()=>{ce(b)}),[b]),t.useEffect((()=>{ie(g)}),[g]),t.useEffect((()=>{ue(T)}),[T]),t.useEffect((()=>{pe(k)}),[k]),t.useEffect((()=>{we(S)}),[S]),t.useEffect((()=>{_e.current!==M&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[M]),t.useEffect((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===M,disableBase:M}}))}),[]),t.useEffect((()=>{var t;const r=new Set(Ae);let n=l;if(!n&&e&&(n=`[data-tooltip-id='${e}']`),n)try{document.querySelectorAll(n).forEach((e=>{r.add({current:e})}))}catch(e){console.warn(`[react-tooltip] "${n}" is not a valid CSS selector`)}const c=document.querySelector(`[id='${o}']`);if(c&&r.add({current:c}),!r.size)return()=>null;const s=null!==(t=null!=be?be:c)&&void 0!==t?t:Oe.current,i=new MutationObserver((e=>{e.forEach((e=>{var t;if(!s||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const o=Te(s);ke(o)}))})),a={attributes:!0,childList:!1,subtree:!1};if(s){const e=Te(s);ke(e),i.observe(s,a)}return()=>{i.disconnect()}}),[Ae,Oe,be,o,l]),t.useEffect((()=>{(null==q?void 0:q.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),H&&!O("border",`${H}`)&&console.warn(`[react-tooltip] "${H}" is not a valid \`border\`.`),(null==q?void 0:q.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),P&&!O("opacity",`${P}`)&&console.warn(`[react-tooltip] "${P}" is not a valid \`opacity\`.`)}),[]);let Re=m;const Ce=t.useRef(null);if(i){const e=i({content:null!=G?G:null,activeAnchor:be});Re=e?n.default.createElement("div",{ref:Ce,className:"react-tooltip-content-wrapper"},e):null}else G&&(Re=G);Z&&(Re=n.default.createElement(A,{content:Z}));const Le={forwardRef:Y,id:e,anchorId:o,anchorSelect:l,className:c.default(a,Se),classNameArrow:u,content:Re,contentWrapperRef:Ce,place:Q,variant:te,offset:le,wrapper:fe,events:me,openOnClick:w,positionStrategy:he,middlewares:E,delayShow:ne,delayHide:se,float:ae,hidden:de,noArrow:R,clickable:C,closeOnEsc:L,closeOnScroll:x,closeOnResize:N,openEvents:$,closeEvents:j,globalCloseEvents:I,imperativeModeOnly:B,style:q,position:z,isOpen:D,border:H,opacity:P,arrowColor:W,setIsOpen:F,afterShow:U,afterHide:K,activeAnchor:be,setActiveAnchor:e=>ge(e),role:X};return n.default.createElement(_,{...Le})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||u({css:`:root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}`,type:"core"}),e.detail.disableBase||u({css:`
.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}`,type:"base"})})),e.Tooltip=T,e.TooltipProvider=({children:e})=>{const[o,l]=t.useState({[p]:new Set}),[r,c]=t.useState({[p]:{current:null}}),s=(e,...t)=>{l((o=>{var l;const r=null!==(l=o[e])&&void 0!==l?l:new Set;return t.forEach((e=>r.add(e))),{...o,[e]:new Set(r)}}))},i=(e,...t)=>{l((o=>{const l=o[e];return l?(t.forEach((e=>l.delete(e))),{...o}):o}))},a=t.useCallback(((e=p)=>{var t,l;return{anchorRefs:null!==(t=o[e])&&void 0!==t?t:new Set,activeAnchor:null!==(l=r[e])&&void 0!==l?l:{current:null},attach:(...t)=>s(e,...t),detach:(...t)=>i(e,...t),setActiveAnchor:t=>((e,t)=>{c((o=>{var l;return(null===(l=o[e])||void 0===l?void 0:l.current)===t.current?o:{...o,[e]:t}}))})(e,t)}}),[o,r,s,i]),u=t.useMemo((()=>({getTooltipData:a})),[a]);return n.default.createElement(m.Provider,{value:u},e)},e.TooltipWrapper=({tooltipId:e,children:o,className:l,place:r,content:s,html:i,variant:a,offset:u,wrapper:d,events:p,positionStrategy:f,delayShow:v,delayHide:m})=>{const{attach:h,detach:w}=y(e),S=t.useRef(null);return t.useEffect((()=>(h(S),()=>{w(S)})),[]),n.default.createElement("span",{ref:S,className:c.default("react-tooltip-wrapper",l),"data-tooltip-place":r,"data-tooltip-content":s,"data-tooltip-html":i,"data-tooltip-variant":a,"data-tooltip-offset":u,"data-tooltip-wrapper":d,"data-tooltip-events":p,"data-tooltip-position-strategy":f,"data-tooltip-delay-show":v,"data-tooltip-delay-hide":m},o)},e.removeStyle=function({type:e="base",id:t=i}={}){if(!a[e])return;"core"===e&&(t=s);const o=document.getElementById(t);"style"===(null==o?void 0:o.tagName)?null==o||o.remove():console.warn(`[react-tooltip] Failed to remove 'style' element with id '${t}'. Call \`injectStyle()\` first`),a[e]=!1},Object.defineProperty(e,"__esModule",{value:!0})}));
{
"name": "react-tooltip",
"version": "5.25.0",
"version": "5.25.1-beta.1137.0",
"description": "react tooltip component",

@@ -5,0 +5,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc