react-tooltip 6.0.0-beta.1179.rc.2 → 6.0.0-beta.1179.rc.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,6 +4,6 @@
4
4
  * @copyright ReactTooltip Team
5
5
  * @license MIT
6
6
  */
7
- "use strict";var e=require("react"),t=require("@floating-ui/dom"),o=require("clsx");const l={core:!1,base:!1};function r({css:e,id:t="react-tooltip-base-styles",type:o="base",ref:r}){var n,s;if(!e||"undefined"==typeof document||l[o])return;if("core"===o&&"undefined"!=typeof process&&(null===(n=null===process||void 0===process?void 0:process.env)||void 0===n?void 0:n.REACT_TOOLTIP_DISABLE_CORE_STYLES))return;if("base"!==o&&"undefined"!=typeof process&&(null===(s=null===process||void 0===process?void 0:process.env)||void 0===s?void 0:s.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;"core"===o&&(t="react-tooltip-core-styles"),r||(r={});const{insertAt:c}=r;if(document.getElementById(t))return;const i=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.id=t,a.type="text/css","top"===c&&i.firstChild?i.insertBefore(a,i.firstChild):i.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e)),l[o]=!0}const n=async({elementReference:e=null,tooltipReference:o=null,tooltipArrowReference:l=null,place:r="top",offset:n=10,strategy:s="absolute",middlewares:c=[t.offset(Number(n)),t.flip({fallbackAxisSideDirection:"start"}),t.shift({padding:5})],border:i})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(null===o)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const a=c;return l?(a.push(t.arrow({element:l,padding:5})),t.computePosition(e,o,{placement:r,strategy:s,middleware:a}).then((({x:e,y:t,placement:o,middlewareData:l})=>{var r,n;const s={left:`${e}px`,top:`${t}px`,border:i},{x:c,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:s,tooltipArrowStyles:{left:null!=c?`${c}px`:"",top:null!=a?`${a}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:o}}))):t.computePosition(e,o,{placement:"bottom",strategy:s,middleware:a}).then((({x:e,y:t,placement:o})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:o})))},s=(e,t,o)=>{let l=null;const r=function(...o){const r=()=>{l=null};l||(e.apply(this,o),l=setTimeout(r,t))};return r.cancel=()=>{l&&(clearTimeout(l),l=null)},r},c=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,i=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,o)=>i(e,t[o])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!c(e)||!c(t))return e===t;const o=Object.keys(e),l=Object.keys(t);return o.length===l.length&&o.every((o=>i(e[o],t[o])))},a=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}))},u=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(a(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},d="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,p=e=>{e.current&&(clearTimeout(e.current),e.current=null)};var f={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"},v={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 m=({forwardRef:l,id:r,className:c,classNameArrow:a,variant:m="dark",anchorSelect:y,place:w="top",offset:h=10,openOnClick:b=!1,positionStrategy:E="absolute",middlewares:S,wrapper:g,delayShow:_=0,delayHide:A=0,float:k=!1,hidden:O=!1,noArrow:C=!1,clickable:R=!1,openEvents:T,closeEvents:L,globalCloseEvents:x,imperativeModeOnly:N,style:j,position:$,afterShow:I,afterHide:B,content:z,contentWrapperRef:H,isOpen:q,defaultIsOpen:D=!1,setIsOpen:M,activeAnchor:W,setActiveAnchor:P,border:V,opacity:K,arrowColor:U,role:X="tooltip"})=>{var Y;const F=e.useRef(null),G=e.useRef(null),Z=e.useRef(null),J=e.useRef(null),Q=e.useRef(null),[ee,te]=e.useState({tooltipStyles:{},tooltipArrowStyles:{},place:w}),[oe,le]=e.useState(!1),[re,ne]=e.useState(!1),[se,ce]=e.useState(null),ie=e.useRef(!1),ae=e.useRef(null),ue=e.useRef(!1),[de,pe]=e.useState([]),fe=e.useRef(!1);d((()=>(fe.current=!0,()=>{fe.current=!1})),[]);const ve=e.useCallback((e=>{fe.current&&(e&&ne(!0),setTimeout((()=>{fe.current&&(null==M||M(e),void 0===q&&le(e))}),10))}),[q,M]);e.useEffect((()=>{if(void 0===q)return()=>null;q&&ne(!0);const e=setTimeout((()=>{le(q)}),10);return()=>{clearTimeout(e)}}),[q]),e.useEffect((()=>{if(oe!==ie.current)if(p(Q),ie.current=oe,oe)null==I||I();else{const e=(e=>{const t=e.match(/^([\d.]+)(m?s)$/);if(!t)return 0;const[,o,l]=t;return Number(o)*("ms"===l?1:1e3)})(getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay"));Q.current=setTimeout((()=>{ne(!1),ce(null),null==B||B()}),e+25)}}),[B,I,oe]);const me=e=>{te((t=>i(t,e)?t:e))},ye=e.useCallback(((e=_)=>{Z.current&&clearTimeout(Z.current),re?ve(!0):Z.current=setTimeout((()=>{ve(!0)}),e)}),[_,ve,re]),we=e.useCallback(((e=A)=>{J.current&&clearTimeout(J.current),J.current=setTimeout((()=>{ue.current||ve(!1)}),e)}),[A,ve]),he=e.useCallback((({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})};n({place:null!==(o=null==se?void 0:se.place)&&void 0!==o?o:w,offset:h,elementReference:l,tooltipReference:F.current,tooltipArrowReference:G.current,strategy:E,middlewares:S,border:V}).then((e=>{me(e)}))}),[null==se?void 0:se.place,w,h,E,S,V]),be=e.useCallback((()=>{var e,t;const o=null!==(e=null==se?void 0:se.position)&&void 0!==e?e:$;o?he(o):k?ae.current&&he(ae.current):(null==W?void 0:W.isConnected)&&n({place:null!==(t=null==se?void 0:se.place)&&void 0!==t?t:w,offset:h,elementReference:W,tooltipReference:F.current,tooltipArrowReference:G.current,strategy:E,middlewares:S,border:V}).then((e=>{fe.current&&me(e)}))}),[null==se?void 0:se.position,null==se?void 0:se.place,$,k,W,w,h,E,S,V,he]);e.useEffect((()=>{const e=e=>{if(!e)return;const t=e,o={x:t.clientX,y:t.clientY};he(o),ae.current=o},o=e=>{var t;if(!oe)return;const o=e.target;o.isConnected&&((null===(t=F.current)||void 0===t?void 0:t.contains(o))||de.some((e=>null==e?void 0:e.contains(o)))||(ve(!1),Z.current&&clearTimeout(Z.current)))},l=e=>{var t;if(!e)return;const o=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;(null==o?void 0:o.isConnected)?(_?ye():ve(!0),P(o),J.current&&clearTimeout(J.current)):P(null)},r=()=>{R?we(A||100):A?we():ve(!1),Z.current&&clearTimeout(Z.current)},n=s(l,50),c=s(r,50),i=e=>{c.cancel(),n(e)},a=()=>{n.cancel(),c()},d=()=>{ve(!1)},p=b||(null==T?void 0:T.click)||(null==T?void 0:T.dblclick)||(null==T?void 0:T.mousedown),f=T?{...T}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};!T&&b&&Object.assign(f,{mouseenter:!1,focus:!1,click:!0});const v=L?{...L}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};!L&&b&&Object.assign(v,{mouseleave:!1,blur:!1});const m=x?{...x}:{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:p||!1};N&&(Object.assign(f,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(v,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(m,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1}));const y=F.current,w=u(F.current),h=u(W);m.scroll&&(window.addEventListener("scroll",d),null==h||h.addEventListener("scroll",d),null==w||w.addEventListener("scroll",d));let E=null;m.resize?window.addEventListener("resize",d):W&&F.current&&(E=t.autoUpdate(W,F.current,be,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const S=e=>{"Escape"===e.key&&ve(!1)};m.escape&&window.addEventListener("keydown",S),m.clickOutsideAnchor&&window.addEventListener("click",o);const g=[],O=e=>{oe&&(null==e?void 0:e.target)===W||l(e)},C=e=>{oe&&(null==e?void 0:e.target)===W&&r()},j=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],$=["click","dblclick","mousedown","mouseup"];Object.entries(f).forEach((([e,t])=>{t&&(j.includes(e)?g.push({event:e,listener:i}):$.includes(e)&&g.push({event:e,listener:O}))})),Object.entries(v).forEach((([e,t])=>{t&&(j.includes(e)?g.push({event:e,listener:a}):$.includes(e)&&g.push({event:e,listener:C}))})),k&&g.push({event:"pointermove",listener:e});const I=()=>{ue.current=!0},B=()=>{ue.current=!1,r()};return R&&!p&&(null==y||y.addEventListener("mouseenter",I),null==y||y.addEventListener("mouseleave",B)),g.forEach((({event:e,listener:t})=>{de.forEach((o=>{o.addEventListener(e,t)}))})),()=>{m.scroll&&(window.removeEventListener("scroll",d),null==h||h.removeEventListener("scroll",d),null==w||w.removeEventListener("scroll",d)),m.resize?window.removeEventListener("resize",d):null==E||E(),m.clickOutsideAnchor&&window.removeEventListener("click",o),m.escape&&window.removeEventListener("keydown",S),R&&!p&&(null==y||y.removeEventListener("mouseenter",I),null==y||y.removeEventListener("mouseleave",B)),g.forEach((({event:e,listener:t})=>{de.forEach((o=>{o.removeEventListener(e,t)}))}))}}),[W,de,R,L,A,_,k,x,we,ve,ye,he,N,T,b,P,oe,be]),e.useEffect((()=>{var e,t;let o=null!==(t=null!==(e=null==se?void 0:se.anchorSelect)&&void 0!==e?e:y)&&void 0!==t?t:"";!o&&r&&(o=`[data-tooltip-id='${r.replace(/'/g,"\\'")}']`);const l=new MutationObserver((e=>{const t=new Set,l=new Set;e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName){const o=e.target;o.getAttribute("data-tooltip-id")===r?t.add(o):e.oldValue===r&&l.add(o)}if("childList"!==e.type)return;const n=[...e.removedNodes].filter((e=>1===e.nodeType));if(W&&n.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,W))&&(ne(!1),ve(!1),P(null),p(Z),p(J),!0)})),o){try{n.forEach((e=>{const t=e;t.matches(o)?l.add(t):t.querySelectorAll(o).forEach((e=>l.add(e)))}))}catch(e){console.warn(`[react-tooltip] "${o}" is not a valid CSS selector`)}try{[...e.addedNodes].filter((e=>1===e.nodeType)).forEach((e=>{const l=e;l.matches(o)?t.add(l):l.querySelectorAll(o).forEach((e=>t.add(e)))}))}catch(e){console.warn(`[react-tooltip] "${o}" is not a valid CSS selector`)}}})),(t.size||l.size)&&pe((e=>[...e.filter((e=>!l.has(e))),...t]))}));return l.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{l.disconnect()}}),[r,y,null==se?void 0:se.anchorSelect,W,ve,P]),e.useEffect((()=>{be()}),[be]),e.useEffect((()=>{if(!(null==H?void 0:H.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>be()))}));return e.observe(H.current),()=>{e.disconnect()}}),[z,H,be]),e.useEffect((()=>{var e;W&&de.includes(W)||P(null!==(e=de[0])&&void 0!==e?e:null)}),[de,W,P]),e.useEffect((()=>(D&&ve(!0),()=>{p(Z),p(J)})),[D,ve]),e.useEffect((()=>{var e;let t=null!==(e=null==se?void 0:se.anchorSelect)&&void 0!==e?e:y;if(!t&&r&&(t=`[data-tooltip-id='${r.replace(/'/g,"\\'")}']`),t)try{const e=Array.from(document.querySelectorAll(t));pe(e)}catch(e){pe([])}}),[r,y,null==se?void 0:se.anchorSelect]),e.useEffect((()=>{Z.current&&(p(Z),ye(_))}),[_,ye]);const Ee=null!==(Y=null==se?void 0:se.content)&&void 0!==Y?Y:z,Se=oe&&Object.keys(ee.tooltipStyles).length>0;return e.useImperativeHandle(l,(()=>({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`)}ce(null!=e?e:null),(null==e?void 0:e.delay)?ye(e.delay):ve(!0)},close:e=>{(null==e?void 0:e.delay)?we(e.delay):ve(!1)},activeAnchor:W,place:ee.place,isOpen:Boolean(re&&!O&&Ee&&Se)}))),re&&!O&&Ee?e.createElement(g,{id:r,role:X,className:o("react-tooltip",f.tooltip,v.tooltip,v[m],c,`react-tooltip__place-${ee.place}`,f[Se?"show":"closing"],Se?"react-tooltip__show":"react-tooltip__closing","fixed"===E&&f.fixed,R&&f.clickable),onTransitionEnd:e=>{p(Q),oe||"opacity"!==e.propertyName||(ne(!1),ce(null),null==B||B())},style:{...j,...ee.tooltipStyles,opacity:void 0!==K&&Se?K:void 0},ref:F},Ee,e.createElement(g,{className:o("react-tooltip-arrow",f.arrow,v.arrow,a,C&&f.noArrow),style:{...ee.tooltipArrowStyles,background:U?`linear-gradient(to right bottom, transparent 50%, ${U} 50%)`:void 0},ref:G})):null},y=e.forwardRef((({id:t,anchorSelect:l,content:r,render:n,className:s,classNameArrow:c,variant:i="dark",place:a="top",offset:u=10,wrapper:d="div",children:p=null,openOnClick:f=!1,positionStrategy:v="absolute",middlewares:y,delayShow:w=0,delayHide:h=0,float:b=!1,hidden:E=!1,noArrow:S=!1,clickable:g=!1,openEvents:_,closeEvents:A,globalCloseEvents:k,imperativeModeOnly:O=!1,style:C,position:R,isOpen:T,defaultIsOpen:L=!1,disableStyleInjection:x=!1,border:N,opacity:j,arrowColor:$,setIsOpen:I,afterShow:B,afterHide:z,role:H="tooltip"},q)=>{const[D,M]=e.useState(r),[W,P]=e.useState(a),[V,K]=e.useState(i),[U,X]=e.useState(u),[Y,F]=e.useState(w),[G,Z]=e.useState(h),[J,Q]=e.useState(b),[ee,te]=e.useState(E),[oe,le]=e.useState(d),[re,ne]=e.useState(v),[se,ce]=e.useState(null),[ie,ae]=e.useState(null),ue=e.useRef(x),de=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}),{}),pe=e.useCallback((e=>{const t={place:e=>{var t;P(null!==(t=e)&&void 0!==t?t:a)},content:e=>{M(null!=e?e:r)},variant:e=>{var t;K(null!==(t=e)&&void 0!==t?t:i)},offset:e=>{X(null===e?u:Number(e))},wrapper:e=>{var t;le(null!==(t=e)&&void 0!==t?t:d)},"position-strategy":e=>{var t;ne(null!==(t=e)&&void 0!==t?t:v)},"delay-show":e=>{F(null===e?w:Number(e))},"delay-hide":e=>{Z(null===e?h:Number(e))},float:e=>{Q(null===e?b:"true"===e)},hidden:e=>{te(null===e?E:"true"===e)},"class-name":e=>{ce(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)}))}),[r,h,w,b,E,u,a,v,i,d]);e.useEffect((()=>{M(r)}),[r]),e.useEffect((()=>{P(a)}),[a]),e.useEffect((()=>{K(i)}),[i]),e.useEffect((()=>{X(u)}),[u]),e.useEffect((()=>{F(w)}),[w]),e.useEffect((()=>{Z(h)}),[h]),e.useEffect((()=>{Q(b)}),[b]),e.useEffect((()=>{te(E)}),[E]),e.useEffect((()=>{ne(v)}),[v]),e.useEffect((()=>{ue.current!==x&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[x]),e.useEffect((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===x,disableBase:x}}))}),[]),e.useEffect((()=>{const e=new MutationObserver((e=>{e.forEach((e=>{var t;if(!ie||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const o=de(ie);pe(o)}))})),t={attributes:!0,childList:!1,subtree:!1};if(ie){const o=de(ie);pe(o),e.observe(ie,t)}return()=>{e.disconnect()}}),[ie,l,pe]),e.useEffect((()=>{(null==C?void 0:C.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),(null==C?void 0:C.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead.")}),[N,j,null==C?void 0:C.border,null==C?void 0:C.opacity]);let fe=p;const ve=e.useRef(null);if(n){const t=n({content:(null==ie?void 0:ie.getAttribute("data-tooltip-content"))||D||null,activeAnchor:ie});fe=t?e.createElement("div",{ref:ve,className:"react-tooltip-content-wrapper"},t):null}else D&&(fe=D);const me={forwardRef:q,id:t,anchorSelect:l,className:o(s,se),classNameArrow:c,content:fe,contentWrapperRef:ve,place:W,variant:V,offset:U,wrapper:oe,openOnClick:f,positionStrategy:re,middlewares:y,delayShow:Y,delayHide:G,float:J,hidden:ee,noArrow:S,clickable:g,openEvents:_,closeEvents:A,globalCloseEvents:k,imperativeModeOnly:O,style:C,position:R,isOpen:T,defaultIsOpen:L,border:N,opacity:j,arrowColor:$,setIsOpen:I,afterShow:B,afterHide:z,activeAnchor:ie,setActiveAnchor:ae,role:H};return e.createElement(m,{...me})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||r({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||r({css:`
8
- .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"})})),exports.Tooltip=y;
7
+ "use strict";var e=require("react"),t=require("clsx"),o=require("react-dom"),r=require("@floating-ui/dom");const l={core:!1,base:!1};function n({css:e,id:t="react-tooltip-base-styles",type:o="base",ref:r,state:n={}}){if(!e||"undefined"==typeof document||(void 0!==n[o]?n[o]:l[o]))return;if("core"===o&&"undefined"!=typeof process&&process.env&&process.env.REACT_TOOLTIP_DISABLE_CORE_STYLES)return;if("base"===o&&"undefined"!=typeof process&&process.env&&process.env.REACT_TOOLTIP_DISABLE_BASE_STYLES)return;"core"===o&&(t="react-tooltip-core-styles"),r||(r={});const{insertAt:c}=r;if(document.getElementById(t))return;const i=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.id=t,s.type="text/css","top"===c&&i.firstChild?i.insertBefore(s,i.firstChild):i.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e)),void 0!==n[o]?n[o]=!0:l[o]=!0}const c=r.flip({fallbackAxisSideDirection:"start"}),i=r.shift({padding:5}),s=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:o=null,place:l="top",offset:n=10,strategy:s="absolute",middlewares:u=[r.offset(Number(n)),c,i],border:a,arrowSize:d=8})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:l};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:l};const p=[...u];return o?(p.push(r.arrow({element:o,padding:5})),r.computePosition(e,t,{placement:l,strategy:s,middleware:p}).then(({x:e,y:t,placement:o,middlewareData:r})=>{var l,n;const c={left:`${e}px`,top:`${t}px`,border:a},{x:i,y:s}=null!==(l=r.arrow)&&void 0!==l?l:{x:0,y:0},u=null!==(n={top:"bottom",right:"left",bottom:"top",left:"right"}[o.split("-")[0]])&&void 0!==n?n:"bottom",p=a&&{borderBottom:a,borderRight:a};let f=0;if(a){const e=`${a}`.match(/(\d+)px/);f=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:c,tooltipArrowStyles:{left:null!=i?`${i}px`:"",top:null!=s?`${s}px`:"",right:"",bottom:"",...p,[u]:`-${d/2+f-1}px`},place:o}})):r.computePosition(e,t,{placement:"bottom",strategy:s,middleware:p}).then(({x:e,y:t,placement:o})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:o}))},u=(e,t,o)=>{let r=null,l=e;const n=function(...e){const o=()=>{r=null};r||(l.apply(this,e),r=setTimeout(o,t))};return n.cancel=()=>{r&&(clearTimeout(r),r=null)},n.setCallback=e=>{l=e},n},a=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})},d=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(a(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},p="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?e.useLayoutEffect:e.useEffect,f=e=>{e.current&&(clearTimeout(e.current),e.current=null)};var v={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",content:"core-styles-module_content__BRKdB",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},m={tooltip:"styles-module_tooltip__mnnfp",content:"styles-module_content__ydYdI",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 h=new Map;let y=null;function w(e){const t=e.match(/^\[data-tooltip-id=(['"])((?:\\.|(?!\1).)*)\1\]$/);return t?t[2].replace(/\\(['"])/g,"$1"):null}function b(e){try{return{anchors:Array.from(document.querySelectorAll(e)),error:null}}catch(e){return{anchors:[],error:e instanceof Error?e:new Error(String(e))}}}function S(e,t){var o,r,l,n;const c=b(e),i=null!==(r=null===(o=c.error)||void 0===o?void 0:o.message)&&void 0!==r?r:null,s=null!==(n=null===(l=t.error)||void 0===l?void 0:l.message)&&void 0!==n?n:null;if(u=t.anchors,a=c.anchors,u.length===a.length&&u.every((e,t)=>e===a[t])&&i===s)return;var u,a;const d={...t,anchors:c.anchors,error:c.error};h.set(e,d),function(e){e.subscribers.forEach(t=>t(e.anchors,e.error))}(d)}let E=!1,g=null,A=!1;function R(e){if(e?(g||(g=new Set),e.forEach(e=>g.add(e))):A=!0,E)return;E=!0;const t=()=>{E=!1;const e=A,t=g;var o;A=!1,g=null,e?h.forEach((e,t)=>{S(t,e)}):t&&t.size>0&&(o=t,h.forEach((e,t)=>{(null===e.tooltipId||o.has(e.tooltipId))&&S(t,e)}))};"function"==typeof requestAnimationFrame?requestAnimationFrame(t):Promise.resolve().then(t)}function _(){y||"undefined"==typeof MutationObserver||(y=new MutationObserver(e=>{const t=function(e){var t;if(h.size<=4)return null;const o=new Set;for(const r of e){if("attributes"===r.type){const e=r.target,l=null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"data-tooltip-id");l&&o.add(l),r.oldValue&&o.add(r.oldValue);continue}if("childList"===r.type){const e=e=>{var t,r;for(let l=0;l<e.length;l++){const n=e[l];if(n.nodeType!==Node.ELEMENT_NODE)continue;const c=n,i=null===(t=c.getAttribute)||void 0===t?void 0:t.call(c,"data-tooltip-id");i&&o.add(i);const s=null===(r=c.querySelectorAll)||void 0===r?void 0:r.call(c,"[data-tooltip-id]");if(s){if(s.length>50)return!0;for(let e=0;e<s.length;e++){const t=s[e].getAttribute("data-tooltip-id");t&&o.add(t)}}}return!1};if(e(r.addedNodes)||e(r.removedNodes))return null;continue}}return o}(e);R(t)}),y.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}))}function T(e,t){let o=h.get(e);if(!o){const t=b(e);o={anchors:t.anchors,error:t.error,subscribers:new Set,tooltipId:w(e)},h.set(e,o)}return o.subscribers.add(t),_(),t([...o.anchors],o.error),()=>{const o=h.get(e);o&&(o.subscribers.delete(t),0===o.subscribers.size&&h.delete(e),0===h.size&&y&&(y.disconnect(),y=null))}}const k=new Map;function C(e){const t=k.get(e.type);t&&t.forEach(t=>{t(e)})}function O(e,t){const o=function(e){let t=k.get(e);return t||(t=new Set,k.set(e,t),document.addEventListener(e,C)),t}(e);return o.add(t),()=>{o.delete(t),0===o.size&&(k.delete(e),document.removeEventListener(e,C))}}let L=null;var x=e.memo(({forwardRef:l,id:n,className:c,classNameArrow:i,variant:a="dark",portalRoot:h,anchorSelect:y,place:w="top",offset:b=10,openOnClick:S=!1,positionStrategy:E="absolute",middlewares:g,wrapper:A,delayShow:R=0,delayHide:_=0,autoClose:k,float:C=!1,hidden:x=!1,noArrow:N=!1,clickable:B=!1,openEvents:z,closeEvents:M,globalCloseEvents:I,imperativeModeOnly:$,style:j,position:H,afterShow:D,afterHide:P,disableTooltip:q,content:W,contentWrapperRef:F,isOpen:V,defaultIsOpen:K=!1,setIsOpen:Y,previousActiveAnchor:X,activeAnchor:G,setActiveAnchor:Z,border:J,opacity:Q,arrowColor:U,arrowSize:ee=8,role:te="tooltip"})=>{var oe;const re=e.useRef(null),le=e.useRef(null),ne=e.useRef(null),ce=e.useRef(null),ie=e.useRef(null),se=e.useRef(null),[ue,ae]=e.useState({tooltipStyles:{},tooltipArrowStyles:{},place:w}),[de,pe]=e.useState(!1),[fe,ve]=e.useState(!1),[me,he]=e.useState(null),ye=e.useRef(!1),we=e.useRef(null),be=e.useRef(!1),Se=e.useRef(!1),Ee=e.useRef({getBoundingClientRect:()=>({x:0,y:0,width:0,height:0,top:0,left:0,right:0,bottom:0})});p(()=>(Se.current=!0,()=>{Se.current=!1}),[]);const ge=e.useCallback(e=>{Se.current&&(e&&ve(!0),setTimeout(()=>{Se.current&&(null==Y||Y(e),void 0===V&&pe(e))},10))},[V,Y]);e.useEffect(()=>{if(n){if(de){t(X);const o=e(G),r=[...new Set([...o,n])].filter(Boolean).join(" ");null==G||G.setAttribute("aria-describedby",r)}else t(G);return()=>{t(G),t(X)}}function e(e){var t;return(null===(t=null==e?void 0:e.getAttribute("aria-describedby"))||void 0===t?void 0:t.split(" "))||[]}function t(t){const o=e(t).filter(e=>e!==n);o.length?null==t||t.setAttribute("aria-describedby",o.join(" ")):null==t||t.removeAttribute("aria-describedby")}},[G,de,n,X]),e.useEffect(()=>{if(void 0===V)return()=>null;V&&ve(!0);const e=setTimeout(()=>{pe(V)},10);return()=>{clearTimeout(e)}},[V]),e.useEffect(()=>{if(de!==ye.current)if(f(se),ye.current=de,de)null==D||D();else{if(null===L){const e=getComputedStyle(document.body);L=(e=>{const t=e.match(/^([\d.]+)(m?s)$/);if(!t)return 0;const[,o,r]=t;return Number(o)*("ms"===r?1:1e3)})(e.getPropertyValue("--rt-transition-show-delay"))}const e=L;se.current=setTimeout(()=>{ve(!1),he(null),null==P||P()},e+25)}},[P,D,de]),e.useEffect(()=>(f(ie),!de||!k||k<=0||(ie.current=setTimeout(()=>{ge(!1)},k)),()=>{f(ie)}),[G,k,ge,de]);const Ae=e.useCallback(e=>{Se.current&&ae(t=>t.place===e.place&&t.tooltipStyles.left===e.tooltipStyles.left&&t.tooltipStyles.top===e.tooltipStyles.top&&t.tooltipStyles.border===e.tooltipStyles.border&&t.tooltipArrowStyles.left===e.tooltipArrowStyles.left&&t.tooltipArrowStyles.top===e.tooltipArrowStyles.top&&t.tooltipArrowStyles.right===e.tooltipArrowStyles.right&&t.tooltipArrowStyles.bottom===e.tooltipArrowStyles.bottom&&t.tooltipArrowStyles.borderBottom===e.tooltipArrowStyles.borderBottom&&t.tooltipArrowStyles.borderRight===e.tooltipArrowStyles.borderRight?t:e)},[]),Re=e.useCallback((e=R)=>{ne.current&&clearTimeout(ne.current),fe?ge(!0):ne.current=setTimeout(()=>{ge(!0)},e)},[R,ge,fe]),_e=e.useCallback((e=_)=>{ce.current&&clearTimeout(ce.current),ce.current=setTimeout(()=>{be.current||ge(!1)},e)},[_,ge]),Te=e.useCallback(({x:e,y:t})=>{var o;Ee.current.getBoundingClientRect=()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t}),s({place:null!==(o=null==me?void 0:me.place)&&void 0!==o?o:w,offset:b,elementReference:Ee.current,tooltipReference:re.current,tooltipArrowReference:le.current,strategy:E,middlewares:g,border:J,arrowSize:ee}).then(e=>{Ae(e)})},[null==me?void 0:me.place,w,b,E,g,J,ee,Ae]),ke=e.useCallback(()=>{var e,t;const o=null!==(e=null==me?void 0:me.position)&&void 0!==e?e:H;o?Te(o):C?we.current&&Te(we.current):(null==G?void 0:G.isConnected)&&s({place:null!==(t=null==me?void 0:me.place)&&void 0!==t?t:w,offset:b,elementReference:G,tooltipReference:re.current,tooltipArrowReference:le.current,strategy:E,middlewares:g,border:J,arrowSize:ee}).then(e=>{Se.current&&Ae(e)})},[null==me?void 0:me.position,null==me?void 0:me.place,H,C,G,w,b,E,g,J,Te,Ae,ee]),Ce=e.useCallback(()=>{ve(!1),ge(!1),Z(null),f(ne),f(ce),f(ie)},[ge,Z]),Oe=fe||K||Boolean(V)||Boolean(G)||Boolean(null==me?void 0:me.anchorSelect),{anchorElements:Le,selector:xe}=(({id:t,anchorSelect:o,imperativeAnchorSelect:r,activeAnchor:l,disableTooltip:n,onActiveAnchorRemoved:c,trackAnchors:i})=>{const[s,u]=e.useState([]),[a,d]=e.useState(null),p=e.useRef(null),f=e.useMemo(()=>(({id:e,anchorSelect:t,imperativeAnchorSelect:o})=>{var r;let l=null!==(r=null!=o?o:t)&&void 0!==r?r:"";return!l&&e&&(l=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),l})({id:t,anchorSelect:o,imperativeAnchorSelect:r}),[t,o,r]),v=e.useMemo(()=>s.filter(e=>!(null==n?void 0:n(e))),[s,n]),m=e.useMemo(()=>{if(!l||!f)return!1;try{return l.matches(f)}catch(e){return!1}},[l,f,v]);return e.useEffect(()=>f&&i?T(f,(e,t)=>{u(e),d(t)}):(u([]),void d(null)),[f,i]),e.useEffect(()=>{a&&p.current!==f&&(p.current=f)},[f,a]),e.useEffect(()=>{l&&(l.isConnected&&(v.includes(l)||m)||c())},[l,v,m,c]),{anchorElements:v,selector:f}})({id:n,anchorSelect:y,imperativeAnchorSelect:null==me?void 0:me.anchorSelect,activeAnchor:G,disableTooltip:q,onActiveAnchorRemoved:Ce,trackAnchors:Oe});(({activeAnchor:t,anchorElements:o,anchorSelector:l,clickable:n,closeEvents:c,delayHide:i,delayShow:s,disableTooltip:a,float:p,globalCloseEvents:v,handleHideTooltipDelayed:m,handleShow:h,handleShowTooltipDelayed:y,handleTooltipPosition:w,hoveringTooltip:b,imperativeModeOnly:S,lastFloatPosition:E,openEvents:g,openOnClick:A,setActiveAnchor:R,show:_,tooltipHideDelayTimerRef:T,tooltipRef:k,tooltipShowDelayTimerRef:C,updateTooltipPosition:L})=>{const x=e.useRef(u(e=>{},50)),N=e.useRef(u(()=>{},50)),B=e.useRef(null),z=e.useRef(null),M=e.useRef(null),I=e.useRef(null);t!==M.current&&(M.current=t,B.current=d(t));const $=k.current;$!==I.current&&(I.current=$,z.current=d($));const j=A||(null==g?void 0:g.click)||(null==g?void 0:g.dblclick)||(null==g?void 0:g.mousedown),H=e.useMemo(()=>{const e=g?{...g}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};return!g&&A&&Object.assign(e,{mouseenter:!1,focus:!1,click:!0}),S&&Object.assign(e,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),e},[g,A,S]),D=e.useMemo(()=>{const e=c?{...c}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};return!c&&A&&Object.assign(e,{mouseleave:!1,blur:!1}),S&&Object.assign(e,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),e},[c,A,S]),P=e.useMemo(()=>{const e=v?{...v}:{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:j||!1};return S&&Object.assign(e,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1}),e},[v,j,S]),q=e.useRef(t);q.current=t;const W=e.useRef(_);W.current=_;const F=e.useRef(o);F.current=o;const V=e.useRef(h);V.current=h;const K=e.useRef(w);K.current=w;const Y=e.useRef(L);Y.current=L;const X=e.useRef(()=>null),G=e.useRef(()=>{}),Z=e.useRef(()=>{}),J=l?function(e){const t=e.match(/^\[data-tooltip-id=(['"])((?:\\.|(?!\1).)*)\1\]$/);return t?t[2].replace(/\\(['"])/g,"$1"):null}(l):null;X.current=e=>{var t,o;const r=e;if(!(null==r?void 0:r.isConnected))return null;if(J){const e=function(e,t){let o=e;for(;o;){if(o.dataset.tooltipId===t)return o;o=o.parentElement}return null}(r,J);if(e&&!(null==a?void 0:a(e)))return e}else if(l)try{const e=null!==(t=r.matches(l)?r:r.closest(l))&&void 0!==t?t:null;if(e&&!(null==a?void 0:a(e)))return e}catch(e){return null}return null!==(o=F.current.find(e=>e===r||e.contains(r)))&&void 0!==o?o:null},G.current=e=>{e&&(e.isConnected?(null==a?void 0:a(e))||(s?y():h(!0),s&&q.current&&e!==q.current?(C.current&&clearTimeout(C.current),C.current=setTimeout(()=>{R(e),h(!0)},s)):R(e),T.current&&clearTimeout(T.current)):R(null))},Z.current=()=>{n?m(i||100):i?m():h(!1),C.current&&clearTimeout(C.current)};const Q=x.current,U=N.current;Q.setCallback(e=>G.current(e)),U.setCallback(()=>Z.current()),e.useEffect(()=>{const e=[],t=(t,o)=>{e.push(O(t,o))},o=e=>{var t;return Boolean((null==e?void 0:e.target)&&(null===(t=q.current)||void 0===t?void 0:t.contains(e.target)))},r=e=>{U.cancel(),Q(e)},l=()=>{Q.cancel(),U()},c=()=>{t("mouseover",e=>{const t=X.current(e.target);t&&X.current(e.relatedTarget)!==t&&r(t)})},i=()=>{t("mouseout",e=>{var t;if(!o(e))return;const r=e.relatedTarget;(null===(t=q.current)||void 0===t?void 0:t.contains(r))||l()})};H.mouseenter&&c(),D.mouseleave&&i(),H.mouseover&&c(),D.mouseout&&i(),H.focus&&t("focusin",e=>{r(X.current(e.target))}),D.blur&&t("focusout",e=>{var t;if(!o(e))return;const r=e.relatedTarget;(null===(t=q.current)||void 0===t?void 0:t.contains(r))||l()});const s=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],u=["click","dblclick","mousedown","mouseup"],a=e=>{var t;const o=X.current(null!==(t=null==e?void 0:e.target)&&void 0!==t?t:null);o&&(W.current&&q.current===o||G.current(o))},d=e=>{W.current&&o(e)&&Z.current()};Object.entries(H).forEach(([e,o])=>{o&&!s.includes(e)&&u.includes(e)&&t(e,a)}),Object.entries(D).forEach(([e,o])=>{o&&!s.includes(e)&&u.includes(e)&&t(e,d)}),p&&t("pointermove",e=>{const t=q.current;if(!t)return;if(X.current(e.target)!==t)return;const o=e,r={x:o.clientX,y:o.clientY};K.current(r),E.current=r});const f=k.current,v=()=>{b.current=!0},m=()=>{b.current=!1,Z.current()},h=n&&(D.mouseout||D.mouseleave);return h&&(null==f||f.addEventListener("mouseover",v),null==f||f.addEventListener("mouseout",m)),()=>{e.forEach(e=>e()),h&&(null==f||f.removeEventListener("mouseover",v),null==f||f.removeEventListener("mouseout",m)),Q.cancel(),U.cancel()}},[H,D,p,n]),e.useEffect(()=>{const e=()=>{V.current(!1)},o=z.current,l=B.current;P.scroll&&(window.addEventListener("scroll",e),null==l||l.addEventListener("scroll",e),null==o||o.addEventListener("scroll",e));let n=null;P.resize?window.addEventListener("resize",e):t&&k.current&&(n=r.autoUpdate(t,k.current,()=>Y.current(),{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const c=e=>{"Escape"===e.key&&V.current(!1)};P.escape&&window.addEventListener("keydown",c);const i=e=>{var t,o;if(!W.current)return;const r=e.target;(null==r?void 0:r.isConnected)&&((null===(t=k.current)||void 0===t?void 0:t.contains(r))||(null===(o=q.current)||void 0===o?void 0:o.contains(r))||F.current.some(e=>null==e?void 0:e.contains(r))||(V.current(!1),f(C)))};return P.clickOutsideAnchor&&window.addEventListener("click",i),()=>{P.scroll&&(window.removeEventListener("scroll",e),null==l||l.removeEventListener("scroll",e),null==o||o.removeEventListener("scroll",e)),P.resize&&window.removeEventListener("resize",e),n&&n(),P.escape&&window.removeEventListener("keydown",c),P.clickOutsideAnchor&&window.removeEventListener("click",i)}},[P,t])})({activeAnchor:G,anchorElements:Le,anchorSelector:xe,clickable:B,closeEvents:M,delayHide:_,delayShow:R,disableTooltip:q,float:C,globalCloseEvents:I,handleHideTooltipDelayed:_e,handleShow:ge,handleShowTooltipDelayed:Re,handleTooltipPosition:Te,hoveringTooltip:be,imperativeModeOnly:$,lastFloatPosition:we,openEvents:z,openOnClick:S,setActiveAnchor:Z,show:de,tooltipHideDelayTimerRef:ce,tooltipRef:re,tooltipShowDelayTimerRef:ne,updateTooltipPosition:ke});const Ne=e.useRef(ke);Ne.current=ke,e.useEffect(()=>{fe&&ke()},[fe,ke]),e.useEffect(()=>{if(!fe||!(null==F?void 0:F.current))return()=>null;let e=null;const t=new ResizeObserver(()=>{e&&clearTimeout(e),e=setTimeout(()=>{Se.current&&Ne.current(),e=null},0)});return t.observe(F.current),()=>{t.disconnect(),e&&clearTimeout(e)}},[W,F,fe]),e.useEffect(()=>{var e;if(!(fe||K||Boolean(V)))return;const t=(()=>{if(!G||!(null==me?void 0:me.anchorSelect))return!1;try{return G.matches(me.anchorSelect)}catch(e){return!1}})();if(!G||!Le.includes(G)){if(t)return;Z(null!==(e=Le[0])&&void 0!==e?e:null)}},[G,Le,K,null==me?void 0:me.anchorSelect,V,fe,Z]),e.useEffect(()=>(K&&ge(!0),()=>{f(ne),f(ce),f(ie),f(se)}),[K,ge]),e.useEffect(()=>{ne.current&&(f(ne),Re(R))},[R,Re]);const Be=null!==(oe=null==me?void 0:me.content)&&void 0!==oe?oe:W,ze=null!=Be,Me=de&&void 0!==ue.tooltipStyles.left,Ie=e.useMemo(()=>({...j,...ue.tooltipStyles,opacity:void 0!==Q&&Me?Q:void 0}),[j,ue.tooltipStyles,Q,Me]),$e=e.useMemo(()=>U?`linear-gradient(to right bottom, transparent 50%, ${U} 50%)`:void 0,[U]),je=e.useMemo(()=>({...ue.tooltipArrowStyles,background:$e,"--rt-arrow-size":`${ee}px`}),[ue.tooltipArrowStyles,$e,ee]);e.useImperativeHandle(l,()=>({open:e=>{let t=null;if(null==e?void 0:e.anchorSelect){try{t=document.querySelector(e.anchorSelect)}catch(e){return}if(!t)return}t&&Z(t),he(null!=e?e:null),(null==e?void 0:e.delay)?Re(e.delay):ge(!0)},close:e=>{(null==e?void 0:e.delay)?_e(e.delay):ge(!1)},activeAnchor:G,place:ue.place,isOpen:Boolean(fe&&!x&&ze&&Me)})),e.useEffect(()=>()=>{f(ne),f(ce),f(ie),f(se)},[]);const He=fe&&!x&&ze?e.createElement(A,{id:n,role:te,className:t("react-tooltip",v.tooltip,m.tooltip,m[a],c,`react-tooltip__place-${ue.place}`,v[Me?"show":"closing"],Me?"react-tooltip__show":"react-tooltip__closing","fixed"===E&&v.fixed,B&&v.clickable),onTransitionEnd:e=>{f(se),de||"opacity"!==e.propertyName||(ve(!1),he(null),null==P||P())},style:Ie,ref:re},e.createElement(A,{className:t("react-tooltip-content-wrapper",v.content,m.content)},Be),e.createElement(A,{className:t("react-tooltip-arrow",v.arrow,m.arrow,i,N&&v.noArrow),style:je,ref:le})):null;return He?h?o.createPortal(He,h):He:null});const N=new Map;let B=null;const z={attributes:!0,childList:!1,subtree:!1};function M(e,t){const o=(B||(B=new MutationObserver(e=>{var t;for(const o of e){if("attributes"!==o.type||!(null===(t=o.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))continue;const e=o.target,r=N.get(e);r&&r.forEach(t=>t(e))}})),B);let r=N.get(e);return r||(r=new Set,N.set(e,r),o.observe(e,z)),r.add(t),()=>{const r=N.get(e);r&&(r.delete(t),0===r.size&&(N.delete(e),0===N.size?o.disconnect():(o.disconnect(),N.forEach((e,t)=>{o.observe(t,z)}))))}}const I=e.forwardRef(({id:o,anchorSelect:r,content:l,render:n,className:c,classNameArrow:i,variant:s="dark",portalRoot:u,place:a="top",offset:d=10,wrapper:p="div",children:f=null,openOnClick:v=!1,positionStrategy:m="absolute",middlewares:h,delayShow:y=0,delayHide:w=0,autoClose:b,float:S=!1,hidden:E=!1,noArrow:g=!1,clickable:A=!1,openEvents:R,closeEvents:_,globalCloseEvents:T,imperativeModeOnly:k=!1,style:C,position:O,isOpen:L,defaultIsOpen:N=!1,disableStyleInjection:B=!1,border:z,opacity:I,arrowColor:$,arrowSize:j,setIsOpen:H,afterShow:D,afterHide:P,disableTooltip:q,role:W="tooltip"},F)=>{var V,K,Y,X,G,Z,J,Q;const[U,ee]=e.useState(null),[te,oe]=e.useState({}),re=e.useRef(null),le=e.useRef(B),ne=e.useCallback(e=>{ee(t=>((null==e?void 0:e.isSameNode(t))||(re.current=t),e))},[]);e.useEffect(()=>{le.current},[B]),e.useEffect(()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===B,disableBase:B}}))},[]),e.useEffect(()=>{if(!U)return oe({}),()=>{};const e=e=>{const t=(e=>{const t=null==e?void 0:e.getAttributeNames().reduce((t,o)=>{var r;return o.startsWith("data-tooltip-")&&(t[o.replace(/^data-tooltip-/,"")]=null!==(r=null==e?void 0:e.getAttribute(o))&&void 0!==r?r:null),t},{});return t})(e);oe(e=>{const o=Object.keys(t),r=Object.keys(e);return o.length===r.length&&o.every(o=>t[o]===e[o])?e:t})};e(U);return M(U,e)},[U,r]),e.useEffect(()=>{},[z,I,null==C?void 0:C.border,null==C?void 0:C.opacity]);const ce=null!==(V=te.content)&&void 0!==V?V:l,ie=null!==(K=te.place)&&void 0!==K?K:a,se=null!==(Y=te.variant)&&void 0!==Y?Y:s,ue=null==te.offset?d:Number(te.offset),ae=null!==(X=te.wrapper)&&void 0!==X?X:p,de=null!==(G=te["position-strategy"])&&void 0!==G?G:m,pe=null==te["delay-show"]?y:Number(te["delay-show"]),fe=null==te["delay-hide"]?w:Number(te["delay-hide"]),ve=null==te["auto-close"]?b:Number(te["auto-close"]),me=null==te.float?S:"true"===te.float,he=null==te.hidden?E:"true"===te.hidden,ye=null!==(Z=te["class-name"])&&void 0!==Z?Z:null;let we=f;const be=e.useRef(null);if(n){const t=n({content:null!==(Q=null!==(J=te.content)&&void 0!==J?J:ce)&&void 0!==Q?Q:null,activeAnchor:U});we=t?e.createElement("div",{ref:be,className:"react-tooltip-content-wrapper"},t):null}else null!=ce&&(we=ce);const Se={forwardRef:F,id:o,anchorSelect:r,className:t(c,ye),classNameArrow:i,content:we,contentWrapperRef:be,portalRoot:u,place:ie,variant:se,offset:ue,wrapper:ae,openOnClick:v,positionStrategy:de,middlewares:h,delayShow:pe,delayHide:fe,autoClose:ve,float:me,hidden:he,noArrow:g,clickable:A,openEvents:R,closeEvents:_,globalCloseEvents:T,imperativeModeOnly:k,style:C,position:O,isOpen:L,defaultIsOpen:N,border:z,opacity:I,arrowColor:$,arrowSize:j,setIsOpen:H,afterShow:D,afterHide:P,disableTooltip:q,activeAnchor:U,previousActiveAnchor:re.current,setActiveAnchor:ne,role:W};return e.createElement(x,{...Se})});var $=e.memo(I);"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",e=>{e.detail.disableCore||n({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;--rt-arrow-size:8px}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit;z-index:-1;-webkit-backface-visibility:hidden;backface-visibility:hidden}.core-styles-module_content__BRKdB{position:relative;z-index:1}.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;will-change:opacity}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in;will-change:opacity}`,type:"core"}),e.detail.disableBase||n({css:`
8
+ .styles-module_tooltip__mnnfp{border-radius:3px;font-size:90%;width:max-content}.styles-module_content__ydYdI{background:inherit;border-radius:inherit;padding:8px 16px}.styles-module_arrow__K0L3T{width:var(--rt-arrow-size);height:var(--rt-arrow-size)}[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"})}),exports.Tooltip=$;
9
9
  //# sourceMappingURL=react-tooltip.min.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"react-tooltip.min.cjs","sources":["../src/utils/handle-style.ts","../src/utils/compute-tooltip-position.ts","../src/utils/debounce.ts","../src/utils/deep-equal.ts","../src/utils/get-scroll-parent.ts","../src/utils/use-isomorphic-layout-effect.ts","../src/utils/clear-timeout-ref.ts","../src/components/Tooltip/Tooltip.tsx","../src/utils/css-time-to-ms.ts","../src/components/TooltipController/TooltipController.tsx","../src/index.tsx"],"sourcesContent":["// This is the ID for the core styles of ReactTooltip\nconst REACT_TOOLTIP_CORE_STYLES_ID = 'react-tooltip-core-styles'\n// This is the ID for the visual styles of ReactTooltip\nconst REACT_TOOLTIP_BASE_STYLES_ID = 'react-tooltip-base-styles'\n\nconst injected = {\n core: false,\n base: false,\n}\n\nfunction injectStyle({\n css,\n id = REACT_TOOLTIP_BASE_STYLES_ID,\n type = 'base',\n ref,\n}: {\n css: string\n id?: string\n type?: 'core' | 'base'\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref?: any\n}) {\n if (!css || typeof document === 'undefined' || injected[type]) {\n return\n }\n\n if (\n type === 'core' &&\n typeof process !== 'undefined' && // this validation prevents docs from breaking even with `process?`\n process?.env?.REACT_TOOLTIP_DISABLE_CORE_STYLES\n ) {\n return\n }\n\n if (\n type !== 'base' &&\n typeof process !== 'undefined' && // this validation prevents docs from breaking even with `process?`\n process?.env?.REACT_TOOLTIP_DISABLE_BASE_STYLES\n ) {\n return\n }\n\n if (type === 'core') {\n // eslint-disable-next-line no-param-reassign\n id = REACT_TOOLTIP_CORE_STYLES_ID\n }\n\n if (!ref) {\n // eslint-disable-next-line no-param-reassign\n ref = {}\n }\n const { insertAt } = ref\n\n if (document.getElementById(id)) {\n // this could happen in cases the tooltip is imported by multiple js modules\n return\n }\n\n const head = document.head || document.getElementsByTagName('head')[0]\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const style: any = document.createElement('style')\n style.id = id\n style.type = 'text/css'\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild)\n } else {\n head.appendChild(style)\n }\n } else {\n head.appendChild(style)\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css\n } else {\n style.appendChild(document.createTextNode(css))\n }\n\n injected[type] = true\n}\n\nexport { injectStyle }\n","import { computePosition, offset, shift, arrow, flip } from '@floating-ui/dom'\nimport type { IComputePositionArgs } from './compute-tooltip-position-types'\n\nconst computeTooltipPosition = async ({\n elementReference = null,\n tooltipReference = null,\n tooltipArrowReference = null,\n place = 'top',\n offset: offsetValue = 10,\n strategy = 'absolute',\n middlewares = [\n offset(Number(offsetValue)),\n flip({\n fallbackAxisSideDirection: 'start',\n }),\n shift({ padding: 5 }),\n ],\n border,\n}: IComputePositionArgs) => {\n if (!elementReference) {\n // elementReference can be null or undefined and we will not compute the position\n // eslint-disable-next-line no-console\n // console.error('The reference element for tooltip was not defined: ', elementReference)\n return { tooltipStyles: {}, tooltipArrowStyles: {}, place }\n }\n\n if (tooltipReference === null) {\n return { tooltipStyles: {}, tooltipArrowStyles: {}, place }\n }\n\n const middleware = middlewares\n\n if (tooltipArrowReference) {\n middleware.push(arrow({ element: tooltipArrowReference as HTMLElement, padding: 5 }))\n\n return computePosition(elementReference as HTMLElement, tooltipReference as HTMLElement, {\n placement: place,\n strategy,\n middleware,\n }).then(({ x, y, placement, middlewareData }) => {\n const styles = { left: `${x}px`, top: `${y}px`, border }\n\n /* c8 ignore start */\n const { x: arrowX, y: arrowY } = middlewareData.arrow ?? { x: 0, y: 0 }\n\n const staticSide =\n {\n top: 'bottom',\n right: 'left',\n bottom: 'top',\n left: 'right',\n }[placement.split('-')[0]] ?? 'bottom'\n /* c8 ignore end */\n\n const borderSide = border && {\n borderBottom: border,\n borderRight: border,\n }\n\n let borderWidth = 0\n if (border) {\n const match = `${border}`.match(/(\\d+)px/)\n if (match?.[1]) {\n borderWidth = Number(match[1])\n } else {\n /**\n * this means `border` was set without `width`,\n * or non-px value (such as `medium`, `thick`, ...)\n */\n borderWidth = 1\n }\n }\n\n /* c8 ignore start */\n const arrowStyle = {\n left: arrowX != null ? `${arrowX}px` : '',\n top: arrowY != null ? `${arrowY}px` : '',\n right: '',\n bottom: '',\n ...borderSide,\n [staticSide]: `-${4 + borderWidth}px`,\n }\n /* c8 ignore end */\n\n return { tooltipStyles: styles, tooltipArrowStyles: arrowStyle, place: placement }\n })\n }\n\n return computePosition(elementReference as HTMLElement, tooltipReference as HTMLElement, {\n placement: 'bottom',\n strategy,\n middleware,\n }).then(({ x, y, placement }) => {\n const styles = { left: `${x}px`, top: `${y}px` }\n\n return { tooltipStyles: styles, tooltipArrowStyles: {}, place: placement }\n })\n}\n\nexport default computeTooltipPosition\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * This function debounce the received function\n * @param { function } \tfunc\t\t\t\tFunction to be debounced\n * @param { number } \t\twait\t\t\t\tTime to wait before execut the function\n * @param { boolean } \timmediate\t\tParam to define if the function will be executed immediately\n */\nconst debounce = <T, A extends any[]>(\n func: (...args: A) => void,\n wait?: number,\n immediate?: boolean,\n) => {\n let timeout: NodeJS.Timeout | null = null\n\n const debounced = function debounced(this: T, ...args: A): void {\n const later = () => {\n timeout = null\n if (!immediate) {\n func.apply(this, args)\n }\n }\n\n if (immediate && !timeout) {\n /**\n * there's no need to clear the timeout\n * since we expect it to resolve and set `timeout = null`\n */\n func.apply(this, args)\n timeout = setTimeout(later, wait)\n }\n\n if (!immediate) {\n if (timeout) {\n clearTimeout(timeout)\n }\n timeout = setTimeout(later, wait)\n }\n }\n\n debounced.cancel = () => {\n /* c8 ignore start */\n if (!timeout) {\n return\n }\n /* c8 ignore end */\n clearTimeout(timeout)\n timeout = null\n }\n\n return debounced\n}\n\nexport default debounce\n","const isObject = (object: unknown): object is Record<string, unknown> => {\n return object !== null && !Array.isArray(object) && typeof object === 'object'\n}\n\nconst deepEqual = (object1: unknown, object2: unknown): boolean => {\n if (object1 === object2) {\n return true\n }\n\n if (Array.isArray(object1) && Array.isArray(object2)) {\n if (object1.length !== object2.length) {\n return false\n }\n return object1.every((val, index) => deepEqual(val, object2[index]))\n }\n\n if (Array.isArray(object1) !== Array.isArray(object2)) {\n return false\n }\n\n if (!isObject(object1) || !isObject(object2)) {\n return object1 === object2\n }\n\n const keys1 = Object.keys(object1)\n const keys2 = Object.keys(object2)\n if (keys1.length !== keys2.length) {\n return false\n }\n\n return keys1.every((key) => deepEqual(object1[key], object2[key]))\n}\n\nexport default deepEqual\n","const isScrollable = (node: Element) => {\n if (!(node instanceof HTMLElement || node instanceof SVGElement)) {\n return false\n }\n const style = getComputedStyle(node)\n return ['overflow', 'overflow-x', 'overflow-y'].some((propertyName) => {\n const value = style.getPropertyValue(propertyName)\n return value === 'auto' || value === 'scroll'\n })\n}\n\nconst getScrollParent = (node: Element | null) => {\n if (!node) {\n return null\n }\n let currentParent = node.parentElement\n while (currentParent) {\n if (isScrollable(currentParent)) {\n return currentParent\n }\n currentParent = currentParent.parentElement\n }\n return document.scrollingElement || document.documentElement\n}\n\nexport default getScrollParent\n","import { useLayoutEffect, useEffect } from 'react'\n\nconst useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect\n\nexport default useIsomorphicLayoutEffect\n","const clearTimeoutRef = (ref: React.MutableRefObject<NodeJS.Timeout | null>) => {\n if (ref.current) {\n clearTimeout(ref.current)\n // eslint-disable-next-line no-param-reassign\n ref.current = null\n }\n}\n\nexport default clearTimeoutRef\n","import React, { useEffect, useState, useRef, useCallback, useImperativeHandle } from 'react'\nimport { autoUpdate } from '@floating-ui/dom'\nimport clsx from 'clsx'\nimport {\n debounce,\n deepEqual,\n useIsomorphicLayoutEffect,\n getScrollParent,\n computeTooltipPosition,\n cssTimeToMs,\n clearTimeoutRef,\n} from 'utils'\nimport type { IComputedPosition } from 'utils'\nimport coreStyles from './core-styles.module.css'\nimport styles from './styles.module.css'\nimport type {\n AnchorCloseEvents,\n AnchorOpenEvents,\n GlobalCloseEvents,\n IPosition,\n ITooltip,\n TooltipImperativeOpenOptions,\n} from './TooltipTypes'\n\nconst Tooltip = ({\n // props\n forwardRef,\n id,\n className,\n classNameArrow,\n variant = 'dark',\n anchorSelect,\n place = 'top',\n offset = 10,\n openOnClick = false,\n positionStrategy = 'absolute',\n middlewares,\n wrapper: WrapperElement,\n delayShow = 0,\n delayHide = 0,\n float = false,\n hidden = false,\n noArrow = false,\n clickable = false,\n openEvents,\n closeEvents,\n globalCloseEvents,\n imperativeModeOnly,\n style: externalStyles,\n position,\n afterShow,\n afterHide,\n // props handled by controller\n content,\n contentWrapperRef,\n isOpen,\n defaultIsOpen = false,\n setIsOpen,\n activeAnchor,\n setActiveAnchor,\n border,\n opacity,\n arrowColor,\n role = 'tooltip',\n}: ITooltip) => {\n const tooltipRef = useRef<HTMLElement>(null)\n const tooltipArrowRef = useRef<HTMLElement>(null)\n const tooltipShowDelayTimerRef = useRef<NodeJS.Timeout | null>(null)\n const tooltipHideDelayTimerRef = useRef<NodeJS.Timeout | null>(null)\n const missedTransitionTimerRef = useRef<NodeJS.Timeout | null>(null)\n const [computedPosition, setComputedPosition] = useState<IComputedPosition>({\n tooltipStyles: {},\n tooltipArrowStyles: {},\n place,\n })\n const [show, setShow] = useState(false)\n const [rendered, setRendered] = useState(false)\n const [imperativeOptions, setImperativeOptions] = useState<TooltipImperativeOpenOptions | null>(\n null,\n )\n const wasShowing = useRef(false)\n const lastFloatPosition = useRef<IPosition | null>(null)\n const hoveringTooltip = useRef(false)\n const [anchorElements, setAnchorElements] = useState<HTMLElement[]>([])\n const mounted = useRef(false)\n\n /**\n * useLayoutEffect runs before useEffect,\n * but should be used carefully because of caveats\n * https://beta.reactjs.org/reference/react/useLayoutEffect#caveats\n */\n useIsomorphicLayoutEffect(() => {\n mounted.current = true\n return () => {\n mounted.current = false\n }\n }, [])\n\n const handleShow = useCallback(\n (value: boolean) => {\n if (!mounted.current) {\n return\n }\n if (value) {\n setRendered(true)\n }\n /**\n * wait for the component to render and calculate position\n * before actually showing\n */\n setTimeout(() => {\n if (!mounted.current) {\n return\n }\n setIsOpen?.(value)\n if (isOpen === undefined) {\n setShow(value)\n }\n }, 10)\n },\n [isOpen, setIsOpen],\n )\n\n /**\n * this replicates the effect from `handleShow()`\n * when `isOpen` is changed from outside\n */\n useEffect(() => {\n if (isOpen === undefined) {\n return () => null\n }\n if (isOpen) {\n setRendered(true)\n }\n const timeout = setTimeout(() => {\n setShow(isOpen)\n }, 10)\n return () => {\n clearTimeout(timeout)\n }\n }, [isOpen])\n\n useEffect(() => {\n if (show === wasShowing.current) {\n return\n }\n clearTimeoutRef(missedTransitionTimerRef)\n wasShowing.current = show\n if (show) {\n afterShow?.()\n } else {\n /**\n * see `onTransitionEnd` on tooltip wrapper\n */\n const style = getComputedStyle(document.body)\n const transitionShowDelay = cssTimeToMs(style.getPropertyValue('--rt-transition-show-delay'))\n missedTransitionTimerRef.current = setTimeout(() => {\n /**\n * if the tooltip switches from `show === true` to `show === false` too fast\n * the transition never runs, so `onTransitionEnd` callback never gets fired\n */\n setRendered(false)\n setImperativeOptions(null)\n afterHide?.()\n // +25ms just to make sure `onTransitionEnd` (if it gets fired) has time to run\n }, transitionShowDelay + 25)\n }\n }, [afterHide, afterShow, show])\n\n const handleComputedPosition = (newComputedPosition: IComputedPosition) => {\n setComputedPosition((oldComputedPosition) =>\n deepEqual(oldComputedPosition, newComputedPosition)\n ? oldComputedPosition\n : newComputedPosition,\n )\n }\n\n const handleShowTooltipDelayed = useCallback(\n (delay = delayShow) => {\n if (tooltipShowDelayTimerRef.current) {\n clearTimeout(tooltipShowDelayTimerRef.current)\n }\n\n if (rendered) {\n // if the tooltip is already rendered, ignore delay\n handleShow(true)\n return\n }\n\n tooltipShowDelayTimerRef.current = setTimeout(() => {\n handleShow(true)\n }, delay)\n },\n [delayShow, handleShow, rendered],\n )\n\n const handleHideTooltipDelayed = useCallback(\n (delay = delayHide) => {\n if (tooltipHideDelayTimerRef.current) {\n clearTimeout(tooltipHideDelayTimerRef.current)\n }\n\n tooltipHideDelayTimerRef.current = setTimeout(() => {\n if (hoveringTooltip.current) {\n return\n }\n handleShow(false)\n }, delay)\n },\n [delayHide, handleShow],\n )\n\n const handleTooltipPosition = useCallback(\n ({ x, y }: IPosition) => {\n const virtualElement = {\n getBoundingClientRect() {\n return {\n x,\n y,\n width: 0,\n height: 0,\n top: y,\n left: x,\n right: x,\n bottom: y,\n }\n },\n } as Element\n computeTooltipPosition({\n place: imperativeOptions?.place ?? place,\n offset,\n elementReference: virtualElement,\n tooltipReference: tooltipRef.current,\n tooltipArrowReference: tooltipArrowRef.current,\n strategy: positionStrategy,\n middlewares,\n border,\n }).then((computedStylesData) => {\n handleComputedPosition(computedStylesData)\n })\n },\n [imperativeOptions?.place, place, offset, positionStrategy, middlewares, border],\n )\n\n const updateTooltipPosition = useCallback(() => {\n const actualPosition = imperativeOptions?.position ?? position\n if (actualPosition) {\n // if `position` is set, override regular and `float` positioning\n handleTooltipPosition(actualPosition)\n return\n }\n\n if (float) {\n if (lastFloatPosition.current) {\n /*\n Without this, changes to `content`, `place`, `offset`, ..., will only\n trigger a position calculation after a `mousemove` event.\n\n To see why this matters, comment this line, run `yarn dev` and click the\n \"Hover me!\" anchor.\n */\n handleTooltipPosition(lastFloatPosition.current)\n }\n // if `float` is set, override regular positioning\n return\n }\n\n if (!activeAnchor?.isConnected) {\n return\n }\n\n computeTooltipPosition({\n place: imperativeOptions?.place ?? place,\n offset,\n elementReference: activeAnchor,\n tooltipReference: tooltipRef.current,\n tooltipArrowReference: tooltipArrowRef.current,\n strategy: positionStrategy,\n middlewares,\n border,\n }).then((computedStylesData) => {\n if (!mounted.current) {\n // invalidate computed positions after remount\n return\n }\n handleComputedPosition(computedStylesData)\n })\n }, [\n imperativeOptions?.position,\n imperativeOptions?.place,\n position,\n float,\n activeAnchor,\n place,\n offset,\n positionStrategy,\n middlewares,\n border,\n handleTooltipPosition,\n ])\n\n useEffect(() => {\n /**\n * TODO(V6): break this effect down into callbacks for clarity\n * - `handleKeyboardEvents()`\n * - `handleMouseEvents()`\n * - `handleGlobalCloseEvents()`\n * - `handleAnchorEvents()`\n * - ...\n */\n\n const handlePointerMove = (event?: Event) => {\n if (!event) {\n return\n }\n const mouseEvent = event as MouseEvent\n const mousePosition = {\n x: mouseEvent.clientX,\n y: mouseEvent.clientY,\n }\n handleTooltipPosition(mousePosition)\n lastFloatPosition.current = mousePosition\n }\n\n const handleClickOutsideAnchors = (event: MouseEvent) => {\n if (!show) {\n return\n }\n const target = event.target as HTMLElement\n if (!target.isConnected) {\n return\n }\n if (tooltipRef.current?.contains(target)) {\n return\n }\n if (anchorElements.some((anchor) => anchor?.contains(target))) {\n return\n }\n handleShow(false)\n if (tooltipShowDelayTimerRef.current) {\n clearTimeout(tooltipShowDelayTimerRef.current)\n }\n }\n\n const handleShowTooltip = (event?: Event) => {\n if (!event) {\n return\n }\n const target = (event.currentTarget ?? event.target) as HTMLElement | null\n if (!target?.isConnected) {\n /**\n * this happens when the target is removed from the DOM\n * at the same time the tooltip gets triggered\n */\n setActiveAnchor(null)\n return\n }\n if (delayShow) {\n handleShowTooltipDelayed()\n } else {\n handleShow(true)\n }\n setActiveAnchor(target)\n\n if (tooltipHideDelayTimerRef.current) {\n clearTimeout(tooltipHideDelayTimerRef.current)\n }\n }\n\n const handleHideTooltip = () => {\n if (clickable) {\n // allow time for the mouse to reach the tooltip, in case there's a gap\n handleHideTooltipDelayed(delayHide || 100)\n } else if (delayHide) {\n handleHideTooltipDelayed()\n } else {\n handleShow(false)\n }\n\n if (tooltipShowDelayTimerRef.current) {\n clearTimeout(tooltipShowDelayTimerRef.current)\n }\n }\n\n // debounce handler to prevent call twice when\n // mouse enter and focus events being triggered toggether\n const internalDebouncedHandleShowTooltip = debounce(handleShowTooltip, 50, true)\n const internalDebouncedHandleHideTooltip = debounce(handleHideTooltip, 50, true)\n // If either of the functions is called while the other is still debounced,\n // reset the timeout. Otherwise if there is a sub-50ms (leave A, enter B, leave B)\n // sequence of events, the tooltip will stay open because the hide debounce\n // from leave A prevented the leave B event from calling it, leaving the\n // tooltip visible.\n const debouncedHandleShowTooltip = (e?: Event) => {\n internalDebouncedHandleHideTooltip.cancel()\n internalDebouncedHandleShowTooltip(e)\n }\n const debouncedHandleHideTooltip = () => {\n internalDebouncedHandleShowTooltip.cancel()\n internalDebouncedHandleHideTooltip()\n }\n\n const handleScrollResize = () => {\n handleShow(false)\n }\n\n const hasClickEvent =\n openOnClick || openEvents?.click || openEvents?.dblclick || openEvents?.mousedown\n const actualOpenEvents: AnchorOpenEvents = openEvents\n ? { ...openEvents }\n : {\n mouseenter: true,\n focus: true,\n click: false,\n dblclick: false,\n mousedown: false,\n }\n if (!openEvents && openOnClick) {\n Object.assign(actualOpenEvents, {\n mouseenter: false,\n focus: false,\n click: true,\n })\n }\n const actualCloseEvents: AnchorCloseEvents = closeEvents\n ? { ...closeEvents }\n : {\n mouseleave: true,\n blur: true,\n click: false,\n dblclick: false,\n mouseup: false,\n }\n if (!closeEvents && openOnClick) {\n Object.assign(actualCloseEvents, {\n mouseleave: false,\n blur: false,\n })\n }\n const actualGlobalCloseEvents: GlobalCloseEvents = globalCloseEvents\n ? { ...globalCloseEvents }\n : {\n escape: false,\n scroll: false,\n resize: false,\n clickOutsideAnchor: hasClickEvent || false,\n }\n\n if (imperativeModeOnly) {\n Object.assign(actualOpenEvents, {\n mouseenter: false,\n focus: false,\n click: false,\n dblclick: false,\n mousedown: false,\n })\n Object.assign(actualCloseEvents, {\n mouseleave: false,\n blur: false,\n click: false,\n dblclick: false,\n mouseup: false,\n })\n Object.assign(actualGlobalCloseEvents, {\n escape: false,\n scroll: false,\n resize: false,\n clickOutsideAnchor: false,\n })\n }\n\n const tooltipElement = tooltipRef.current\n const tooltipScrollParent = getScrollParent(tooltipRef.current)\n const anchorScrollParent = getScrollParent(activeAnchor)\n\n if (actualGlobalCloseEvents.scroll) {\n window.addEventListener('scroll', handleScrollResize)\n anchorScrollParent?.addEventListener('scroll', handleScrollResize)\n tooltipScrollParent?.addEventListener('scroll', handleScrollResize)\n }\n let updateTooltipCleanup: null | (() => void) = null\n if (actualGlobalCloseEvents.resize) {\n window.addEventListener('resize', handleScrollResize)\n } else if (activeAnchor && tooltipRef.current) {\n updateTooltipCleanup = autoUpdate(\n activeAnchor as HTMLElement,\n tooltipRef.current as HTMLElement,\n updateTooltipPosition,\n {\n ancestorResize: true,\n elementResize: true,\n layoutShift: true,\n },\n )\n }\n\n const handleEsc = (event: KeyboardEvent) => {\n if (event.key !== 'Escape') {\n return\n }\n handleShow(false)\n }\n if (actualGlobalCloseEvents.escape) {\n window.addEventListener('keydown', handleEsc)\n }\n\n if (actualGlobalCloseEvents.clickOutsideAnchor) {\n window.addEventListener('click', handleClickOutsideAnchors)\n }\n\n const enabledEvents: { event: string; listener: (event?: Event) => void }[] = []\n\n const handleClickOpenTooltipAnchor = (event?: Event) => {\n if (show && event?.target === activeAnchor) {\n /**\n * ignore clicking the anchor that was used to open the tooltip.\n * this avoids conflict with the click close event.\n */\n return\n }\n handleShowTooltip(event)\n }\n const handleClickCloseTooltipAnchor = (event?: Event) => {\n if (!show || event?.target !== activeAnchor) {\n /**\n * ignore clicking the anchor that was NOT used to open the tooltip.\n * this avoids closing the tooltip when clicking on a\n * new anchor with the tooltip already open.\n */\n return\n }\n handleHideTooltip()\n }\n\n const regularEvents = ['mouseover', 'mouseout', 'mouseenter', 'mouseleave', 'focus', 'blur']\n const clickEvents = ['click', 'dblclick', 'mousedown', 'mouseup']\n\n Object.entries(actualOpenEvents).forEach(([event, enabled]) => {\n if (!enabled) {\n return\n }\n if (regularEvents.includes(event)) {\n enabledEvents.push({ event, listener: debouncedHandleShowTooltip })\n } else if (clickEvents.includes(event)) {\n enabledEvents.push({ event, listener: handleClickOpenTooltipAnchor })\n } else {\n // never happens\n }\n })\n\n Object.entries(actualCloseEvents).forEach(([event, enabled]) => {\n if (!enabled) {\n return\n }\n if (regularEvents.includes(event)) {\n enabledEvents.push({ event, listener: debouncedHandleHideTooltip })\n } else if (clickEvents.includes(event)) {\n enabledEvents.push({ event, listener: handleClickCloseTooltipAnchor })\n } else {\n // never happens\n }\n })\n\n if (float) {\n enabledEvents.push({\n event: 'pointermove',\n listener: handlePointerMove,\n })\n }\n\n const handleMouseEnterTooltip = () => {\n hoveringTooltip.current = true\n }\n const handleMouseLeaveTooltip = () => {\n hoveringTooltip.current = false\n handleHideTooltip()\n }\n\n if (clickable && !hasClickEvent) {\n // used to keep the tooltip open when hovering content.\n // not needed if using click events.\n tooltipElement?.addEventListener('mouseenter', handleMouseEnterTooltip)\n tooltipElement?.addEventListener('mouseleave', handleMouseLeaveTooltip)\n }\n\n enabledEvents.forEach(({ event, listener }) => {\n anchorElements.forEach((anchor) => {\n anchor.addEventListener(event, listener)\n })\n })\n\n return () => {\n if (actualGlobalCloseEvents.scroll) {\n window.removeEventListener('scroll', handleScrollResize)\n anchorScrollParent?.removeEventListener('scroll', handleScrollResize)\n tooltipScrollParent?.removeEventListener('scroll', handleScrollResize)\n }\n if (actualGlobalCloseEvents.resize) {\n window.removeEventListener('resize', handleScrollResize)\n } else {\n updateTooltipCleanup?.()\n }\n if (actualGlobalCloseEvents.clickOutsideAnchor) {\n window.removeEventListener('click', handleClickOutsideAnchors)\n }\n if (actualGlobalCloseEvents.escape) {\n window.removeEventListener('keydown', handleEsc)\n }\n if (clickable && !hasClickEvent) {\n tooltipElement?.removeEventListener('mouseenter', handleMouseEnterTooltip)\n tooltipElement?.removeEventListener('mouseleave', handleMouseLeaveTooltip)\n }\n enabledEvents.forEach(({ event, listener }) => {\n anchorElements.forEach((anchor) => {\n anchor.removeEventListener(event, listener)\n })\n })\n }\n /**\n * rendered is also a dependency to ensure anchor observers are re-registered\n * since `tooltipRef` becomes stale after removing/adding the tooltip to the DOM\n */\n }, [\n activeAnchor,\n anchorElements,\n clickable,\n closeEvents,\n delayHide,\n delayShow,\n float,\n globalCloseEvents,\n handleHideTooltipDelayed,\n handleShow,\n handleShowTooltipDelayed,\n handleTooltipPosition,\n imperativeModeOnly,\n openEvents,\n openOnClick,\n setActiveAnchor,\n show,\n updateTooltipPosition,\n ])\n\n useEffect(() => {\n /**\n * TODO(V6): break down observer callback for clarity\n * - `handleAddedAnchors()`\n * - `handleRemovedAnchors()`\n */\n let selector = imperativeOptions?.anchorSelect ?? anchorSelect ?? ''\n if (!selector && id) {\n selector = `[data-tooltip-id='${id.replace(/'/g, \"\\\\'\")}']`\n }\n const documentObserverCallback: MutationCallback = (mutationList) => {\n const addedAnchors = new Set<HTMLElement>()\n const removedAnchors = new Set<HTMLElement>()\n mutationList.forEach((mutation) => {\n if (mutation.type === 'attributes' && mutation.attributeName === 'data-tooltip-id') {\n const target = mutation.target as HTMLElement\n const newId = target.getAttribute('data-tooltip-id')\n if (newId === id) {\n addedAnchors.add(target)\n } else if (mutation.oldValue === id) {\n // data-tooltip-id has now been changed, so we need to remove this anchor\n removedAnchors.add(target)\n }\n }\n if (mutation.type !== 'childList') {\n return\n }\n const removedNodes = [...mutation.removedNodes].filter((node) => node.nodeType === 1)\n if (activeAnchor) {\n removedNodes.some((node) => {\n /**\n * TODO(V6)\n * - isn't `!activeAnchor.isConnected` better?\n * - maybe move to `handleDisconnectedAnchor()`\n */\n if (node?.contains?.(activeAnchor)) {\n setRendered(false)\n handleShow(false)\n setActiveAnchor(null)\n clearTimeoutRef(tooltipShowDelayTimerRef)\n clearTimeoutRef(tooltipHideDelayTimerRef)\n return true\n }\n return false\n })\n }\n if (!selector) {\n return\n }\n try {\n removedNodes.forEach((node) => {\n const element = node as HTMLElement\n if (element.matches(selector)) {\n // the element itself is an anchor\n removedAnchors.add(element)\n } else {\n /**\n * TODO(V6): do we care if an element which is an anchor,\n * has children which are also anchors?\n * (i.e. should we remove `else` and always do this)\n */\n // the element has children which are anchors\n element\n .querySelectorAll<HTMLElement>(selector)\n .forEach((innerNode) => removedAnchors.add(innerNode))\n }\n })\n } catch {\n /* c8 ignore start */\n if (!process.env.NODE_ENV || process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.warn(`[react-tooltip] \"${selector}\" is not a valid CSS selector`)\n }\n /* c8 ignore end */\n }\n try {\n const addedNodes = [...mutation.addedNodes].filter((node) => node.nodeType === 1)\n addedNodes.forEach((node) => {\n const element = node as HTMLElement\n if (element.matches(selector)) {\n // the element itself is an anchor\n addedAnchors.add(element)\n } else {\n /**\n * TODO(V6): do we care if an element which is an anchor,\n * has children which are also anchors?\n * (i.e. should we remove `else` and always do this)\n */\n // the element has children which are anchors\n element\n .querySelectorAll<HTMLElement>(selector)\n .forEach((innerNode) => addedAnchors.add(innerNode))\n }\n })\n } catch {\n /* c8 ignore start */\n if (!process.env.NODE_ENV || process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.warn(`[react-tooltip] \"${selector}\" is not a valid CSS selector`)\n }\n /* c8 ignore end */\n }\n })\n if (addedAnchors.size || removedAnchors.size) {\n setAnchorElements((anchors) => [\n ...anchors.filter((anchor) => !removedAnchors.has(anchor)),\n ...addedAnchors,\n ])\n }\n }\n const documentObserver = new MutationObserver(documentObserverCallback)\n // watch for anchor being removed from the DOM\n documentObserver.observe(document.body, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['data-tooltip-id'],\n // to track the prev value if we need to remove anchor when data-tooltip-id gets changed\n attributeOldValue: true,\n })\n return () => {\n documentObserver.disconnect()\n }\n }, [id, anchorSelect, imperativeOptions?.anchorSelect, activeAnchor, handleShow, setActiveAnchor])\n\n useEffect(() => {\n updateTooltipPosition()\n }, [updateTooltipPosition])\n\n useEffect(() => {\n if (!contentWrapperRef?.current) {\n return () => null\n }\n const contentObserver = new ResizeObserver(() => {\n setTimeout(() => updateTooltipPosition())\n })\n contentObserver.observe(contentWrapperRef.current)\n return () => {\n contentObserver.disconnect()\n }\n }, [content, contentWrapperRef, updateTooltipPosition])\n\n useEffect(() => {\n if (!activeAnchor || !anchorElements.includes(activeAnchor)) {\n /**\n * if there is no active anchor,\n * or if the current active anchor is not amongst the allowed ones,\n * reset it\n */\n setActiveAnchor(anchorElements[0] ?? null)\n }\n }, [anchorElements, activeAnchor, setActiveAnchor])\n\n useEffect(() => {\n if (defaultIsOpen) {\n handleShow(true)\n }\n return () => {\n clearTimeoutRef(tooltipShowDelayTimerRef)\n clearTimeoutRef(tooltipHideDelayTimerRef)\n }\n }, [defaultIsOpen, handleShow])\n\n useEffect(() => {\n let selector = imperativeOptions?.anchorSelect ?? anchorSelect\n if (!selector && id) {\n selector = `[data-tooltip-id='${id.replace(/'/g, \"\\\\'\")}']`\n }\n if (!selector) {\n return\n }\n try {\n const anchors = Array.from(document.querySelectorAll<HTMLElement>(selector))\n setAnchorElements(anchors)\n } catch {\n // warning was already issued in the controller\n setAnchorElements([])\n }\n }, [id, anchorSelect, imperativeOptions?.anchorSelect])\n\n useEffect(() => {\n if (tooltipShowDelayTimerRef.current) {\n /**\n * if the delay changes while the tooltip is waiting to show,\n * reset the timer with the new delay\n */\n clearTimeoutRef(tooltipShowDelayTimerRef)\n handleShowTooltipDelayed(delayShow)\n }\n }, [delayShow, handleShowTooltipDelayed])\n\n const actualContent = imperativeOptions?.content ?? content\n const canShow = show && Object.keys(computedPosition.tooltipStyles).length > 0\n\n useImperativeHandle(forwardRef, () => ({\n open: (options) => {\n if (options?.anchorSelect) {\n try {\n document.querySelector(options.anchorSelect)\n } catch {\n if (!process.env.NODE_ENV || process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.warn(`[react-tooltip] \"${options.anchorSelect}\" is not a valid CSS selector`)\n }\n return\n }\n }\n setImperativeOptions(options ?? null)\n if (options?.delay) {\n handleShowTooltipDelayed(options.delay)\n } else {\n handleShow(true)\n }\n },\n close: (options) => {\n if (options?.delay) {\n handleHideTooltipDelayed(options.delay)\n } else {\n handleShow(false)\n }\n },\n activeAnchor,\n place: computedPosition.place,\n isOpen: Boolean(rendered && !hidden && actualContent && canShow),\n }))\n\n return rendered && !hidden && actualContent ? (\n <WrapperElement\n id={id}\n role={role}\n className={clsx(\n 'react-tooltip',\n coreStyles['tooltip'],\n styles['tooltip'],\n styles[variant],\n className,\n `react-tooltip__place-${computedPosition.place}`,\n coreStyles[canShow ? 'show' : 'closing'],\n canShow ? 'react-tooltip__show' : 'react-tooltip__closing',\n positionStrategy === 'fixed' && coreStyles['fixed'],\n clickable && coreStyles['clickable'],\n )}\n onTransitionEnd={(event: TransitionEvent) => {\n clearTimeoutRef(missedTransitionTimerRef)\n if (show || event.propertyName !== 'opacity') {\n return\n }\n setRendered(false)\n setImperativeOptions(null)\n afterHide?.()\n }}\n style={{\n ...externalStyles,\n ...computedPosition.tooltipStyles,\n opacity: opacity !== undefined && canShow ? opacity : undefined,\n }}\n ref={tooltipRef}\n >\n {actualContent}\n <WrapperElement\n className={clsx(\n 'react-tooltip-arrow',\n coreStyles['arrow'],\n styles['arrow'],\n classNameArrow,\n noArrow && coreStyles['noArrow'],\n )}\n style={{\n ...computedPosition.tooltipArrowStyles,\n background: arrowColor\n ? `linear-gradient(to right bottom, transparent 50%, ${arrowColor} 50%)`\n : undefined,\n }}\n ref={tooltipArrowRef}\n />\n </WrapperElement>\n ) : null\n}\n\nexport default Tooltip\n","const cssTimeToMs = (time: string): number => {\n const match = time.match(/^([\\d.]+)(m?s)$/)\n if (!match) {\n return 0\n }\n const [, amount, unit] = match\n return Number(amount) * (unit === 'ms' ? 1 : 1000)\n}\n\nexport default cssTimeToMs\n","import React, { useCallback, useEffect, useRef, useState } from 'react'\nimport { Tooltip } from 'components/Tooltip'\nimport type {\n PositionStrategy,\n PlacesType,\n VariantType,\n WrapperType,\n DataAttribute,\n ITooltip,\n TooltipRefProps,\n} from 'components/Tooltip/TooltipTypes'\nimport clsx from 'clsx'\nimport type { ITooltipController } from './TooltipControllerTypes'\n\nconst TooltipController = React.forwardRef<TooltipRefProps, ITooltipController>(\n (\n {\n id,\n anchorSelect,\n content,\n render,\n className,\n classNameArrow,\n variant = 'dark',\n place = 'top',\n offset = 10,\n wrapper = 'div',\n children = null,\n openOnClick = false,\n positionStrategy = 'absolute',\n middlewares,\n delayShow = 0,\n delayHide = 0,\n float = false,\n hidden = false,\n noArrow = false,\n clickable = false,\n openEvents,\n closeEvents,\n globalCloseEvents,\n imperativeModeOnly = false,\n style,\n position,\n isOpen,\n defaultIsOpen = false,\n disableStyleInjection = false,\n border,\n opacity,\n arrowColor,\n setIsOpen,\n afterShow,\n afterHide,\n role = 'tooltip',\n }: ITooltipController,\n ref,\n ) => {\n const [tooltipContent, setTooltipContent] = useState(content)\n const [tooltipPlace, setTooltipPlace] = useState(place)\n const [tooltipVariant, setTooltipVariant] = useState(variant)\n const [tooltipOffset, setTooltipOffset] = useState(offset)\n const [tooltipDelayShow, setTooltipDelayShow] = useState(delayShow)\n const [tooltipDelayHide, setTooltipDelayHide] = useState(delayHide)\n const [tooltipFloat, setTooltipFloat] = useState(float)\n const [tooltipHidden, setTooltipHidden] = useState(hidden)\n const [tooltipWrapper, setTooltipWrapper] = useState<WrapperType>(wrapper)\n const [tooltipPositionStrategy, setTooltipPositionStrategy] = useState(positionStrategy)\n const [tooltipClassName, setTooltipClassName] = useState<string | null>(null)\n const [activeAnchor, setActiveAnchor] = useState<HTMLElement | null>(null)\n const styleInjectionRef = useRef(disableStyleInjection)\n\n const getDataAttributesFromAnchorElement = (elementReference: HTMLElement) => {\n const dataAttributes = elementReference?.getAttributeNames().reduce(\n (acc, name) => {\n if (name.startsWith('data-tooltip-')) {\n const parsedAttribute = name.replace(/^data-tooltip-/, '') as DataAttribute\n acc[parsedAttribute] = elementReference?.getAttribute(name) ?? null\n }\n return acc\n },\n {} as Record<DataAttribute, string | null>,\n )\n\n return dataAttributes\n }\n\n const applyAllDataAttributesFromAnchorElement = useCallback(\n (dataAttributes: Record<string, string | null>) => {\n const handleDataAttributes: Record<DataAttribute, (value: string | null) => void> = {\n place: (value) => {\n setTooltipPlace((value as PlacesType) ?? place)\n },\n content: (value) => {\n setTooltipContent(value ?? content)\n },\n variant: (value) => {\n setTooltipVariant((value as VariantType) ?? variant)\n },\n offset: (value) => {\n setTooltipOffset(value === null ? offset : Number(value))\n },\n wrapper: (value) => {\n setTooltipWrapper((value as WrapperType) ?? wrapper)\n },\n 'position-strategy': (value) => {\n setTooltipPositionStrategy((value as PositionStrategy) ?? positionStrategy)\n },\n 'delay-show': (value) => {\n setTooltipDelayShow(value === null ? delayShow : Number(value))\n },\n 'delay-hide': (value) => {\n setTooltipDelayHide(value === null ? delayHide : Number(value))\n },\n float: (value) => {\n setTooltipFloat(value === null ? float : value === 'true')\n },\n hidden: (value) => {\n setTooltipHidden(value === null ? hidden : value === 'true')\n },\n 'class-name': (value) => {\n setTooltipClassName(value)\n },\n }\n // reset unset data attributes to default values\n // without this, data attributes from the last active anchor will still be used\n Object.values(handleDataAttributes).forEach((handler) => handler(null))\n Object.entries(dataAttributes).forEach(([key, value]) => {\n handleDataAttributes[key as DataAttribute]?.(value)\n })\n },\n [\n content,\n delayHide,\n delayShow,\n float,\n hidden,\n offset,\n place,\n positionStrategy,\n variant,\n wrapper,\n ],\n )\n\n useEffect(() => {\n setTooltipContent(content)\n }, [content])\n\n useEffect(() => {\n setTooltipPlace(place)\n }, [place])\n\n useEffect(() => {\n setTooltipVariant(variant)\n }, [variant])\n\n useEffect(() => {\n setTooltipOffset(offset)\n }, [offset])\n\n useEffect(() => {\n setTooltipDelayShow(delayShow)\n }, [delayShow])\n\n useEffect(() => {\n setTooltipDelayHide(delayHide)\n }, [delayHide])\n\n useEffect(() => {\n setTooltipFloat(float)\n }, [float])\n\n useEffect(() => {\n setTooltipHidden(hidden)\n }, [hidden])\n\n useEffect(() => {\n setTooltipPositionStrategy(positionStrategy)\n }, [positionStrategy])\n\n useEffect(() => {\n if (styleInjectionRef.current === disableStyleInjection) {\n return\n }\n /* c8 ignore start */\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.warn('[react-tooltip] Do not change `disableStyleInjection` dynamically.')\n }\n /* c8 ignore end */\n }, [disableStyleInjection])\n\n useEffect(() => {\n if (typeof window !== 'undefined') {\n window.dispatchEvent(\n new CustomEvent('react-tooltip-inject-styles', {\n detail: {\n disableCore: disableStyleInjection === 'core',\n disableBase: disableStyleInjection,\n },\n }),\n )\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n useEffect(() => {\n const observerCallback: MutationCallback = (mutationList) => {\n mutationList.forEach((mutation) => {\n if (\n !activeAnchor ||\n mutation.type !== 'attributes' ||\n !mutation.attributeName?.startsWith('data-tooltip-')\n ) {\n return\n }\n // make sure to get all set attributes, since all unset attributes are reset\n const dataAttributes = getDataAttributesFromAnchorElement(activeAnchor)\n applyAllDataAttributesFromAnchorElement(dataAttributes)\n })\n }\n\n // Create an observer instance linked to the callback function\n const observer = new MutationObserver(observerCallback)\n\n // do not check for subtree and childrens, we only want to know attribute changes\n // to stay watching `data-attributes-*` from anchor element\n const observerConfig = { attributes: true, childList: false, subtree: false }\n\n if (activeAnchor) {\n const dataAttributes = getDataAttributesFromAnchorElement(activeAnchor)\n applyAllDataAttributesFromAnchorElement(dataAttributes)\n // Start observing the target node for configured mutations\n observer.observe(activeAnchor, observerConfig)\n }\n\n return () => {\n // Remove the observer when the tooltip is destroyed\n observer.disconnect()\n }\n }, [activeAnchor, anchorSelect, applyAllDataAttributesFromAnchorElement])\n\n useEffect(() => {\n /* c8 ignore start */\n if (process.env.NODE_ENV === 'production') {\n return\n }\n /* c8 ignore end */\n if (style?.border) {\n // eslint-disable-next-line no-console\n console.warn('[react-tooltip] Do not set `style.border`. Use `border` prop instead.')\n }\n if (style?.opacity) {\n // eslint-disable-next-line no-console\n console.warn('[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead.')\n }\n }, [border, opacity, style?.border, style?.opacity])\n\n /**\n * content priority: children < render or content < html\n * children should be lower priority so that it can be used as the \"default\" content\n */\n let renderedContent = children\n const contentWrapperRef = useRef<HTMLDivElement>(null)\n if (render) {\n const actualContent =\n activeAnchor?.getAttribute('data-tooltip-content') || tooltipContent || null\n const rendered = render({ content: actualContent, activeAnchor }) as React.ReactNode\n renderedContent = rendered ? (\n <div ref={contentWrapperRef} className=\"react-tooltip-content-wrapper\">\n {rendered}\n </div>\n ) : null\n } else if (tooltipContent) {\n renderedContent = tooltipContent\n }\n\n const props: ITooltip = {\n forwardRef: ref,\n id,\n anchorSelect,\n className: clsx(className, tooltipClassName),\n classNameArrow,\n content: renderedContent,\n contentWrapperRef,\n place: tooltipPlace,\n variant: tooltipVariant,\n offset: tooltipOffset,\n wrapper: tooltipWrapper,\n openOnClick,\n positionStrategy: tooltipPositionStrategy,\n middlewares,\n delayShow: tooltipDelayShow,\n delayHide: tooltipDelayHide,\n float: tooltipFloat,\n hidden: tooltipHidden,\n noArrow,\n clickable,\n openEvents,\n closeEvents,\n globalCloseEvents,\n imperativeModeOnly,\n style,\n position,\n isOpen,\n defaultIsOpen,\n border,\n opacity,\n arrowColor,\n setIsOpen,\n afterShow,\n afterHide,\n activeAnchor,\n setActiveAnchor,\n role,\n }\n\n return <Tooltip {...props} />\n },\n)\n\nexport default TooltipController\n","import './tokens.css'\n\nimport { injectStyle } from 'utils/handle-style'\n\nimport type {\n DataAttribute,\n PlacesType,\n PositionStrategy,\n VariantType,\n WrapperType,\n IPosition,\n Middleware,\n TooltipRefProps,\n} from './components/Tooltip/TooltipTypes'\nimport type { ITooltipController } from './components/TooltipController/TooltipControllerTypes'\n\n// those content will be replaced in build time with the `react-tooltip.css` builded content\nconst TooltipCoreStyles = 'react-tooltip-core-css-placeholder'\nconst TooltipStyles = 'react-tooltip-css-placeholder'\n\nif (typeof window !== 'undefined') {\n window.addEventListener('react-tooltip-inject-styles', ((\n event: CustomEvent<{ disableCore: boolean; disableBase: boolean }>,\n ) => {\n if (!event.detail.disableCore) {\n injectStyle({ css: TooltipCoreStyles, type: 'core' })\n }\n if (!event.detail.disableBase) {\n injectStyle({ css: TooltipStyles, type: 'base' })\n }\n }) as EventListener)\n}\n\nexport { TooltipController as Tooltip } from './components/TooltipController'\nexport type {\n DataAttribute,\n PlacesType,\n PositionStrategy,\n VariantType,\n WrapperType,\n ITooltipController as ITooltip,\n IPosition,\n Middleware,\n TooltipRefProps,\n}\n"],"names":["injected","core","base","injectStyle","css","id","type","ref","document","process","_a","env","REACT_TOOLTIP_DISABLE_CORE_STYLES","_b","REACT_TOOLTIP_DISABLE_BASE_STYLES","insertAt","getElementById","head","getElementsByTagName","style","createElement","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","computeTooltipPosition","async","elementReference","tooltipReference","tooltipArrowReference","place","offset","offsetValue","strategy","middlewares","Number","flip","fallbackAxisSideDirection","shift","padding","border","tooltipStyles","tooltipArrowStyles","middleware","push","arrow","element","computePosition","placement","then","x","y","middlewareData","styles","left","top","arrowX","arrowY","staticSide","right","bottom","split","borderSide","borderBottom","borderRight","borderWidth","match","debounce","func","wait","immediate","timeout","debounced","args","later","apply","this","setTimeout","cancel","clearTimeout","isObject","object","Array","isArray","deepEqual","object1","object2","length","every","val","index","keys1","Object","keys","keys2","key","isScrollable","node","HTMLElement","SVGElement","getComputedStyle","some","propertyName","value","getPropertyValue","getScrollParent","currentParent","parentElement","scrollingElement","documentElement","useIsomorphicLayoutEffect","window","useLayoutEffect","useEffect","clearTimeoutRef","current","Tooltip","forwardRef","className","classNameArrow","variant","anchorSelect","openOnClick","positionStrategy","wrapper","WrapperElement","delayShow","delayHide","float","hidden","noArrow","clickable","openEvents","closeEvents","globalCloseEvents","imperativeModeOnly","externalStyles","position","afterShow","afterHide","content","contentWrapperRef","isOpen","defaultIsOpen","setIsOpen","activeAnchor","setActiveAnchor","opacity","arrowColor","role","tooltipRef","useRef","tooltipArrowRef","tooltipShowDelayTimerRef","tooltipHideDelayTimerRef","missedTransitionTimerRef","computedPosition","setComputedPosition","useState","show","setShow","rendered","setRendered","imperativeOptions","setImperativeOptions","wasShowing","lastFloatPosition","hoveringTooltip","anchorElements","setAnchorElements","mounted","handleShow","useCallback","undefined","transitionShowDelay","time","amount","unit","cssTimeToMs","body","handleComputedPosition","newComputedPosition","oldComputedPosition","handleShowTooltipDelayed","delay","handleHideTooltipDelayed","handleTooltipPosition","virtualElement","getBoundingClientRect","width","height","computedStylesData","updateTooltipPosition","actualPosition","isConnected","handlePointerMove","event","mouseEvent","mousePosition","clientX","clientY","handleClickOutsideAnchors","target","contains","anchor","handleShowTooltip","currentTarget","handleHideTooltip","internalDebouncedHandleShowTooltip","internalDebouncedHandleHideTooltip","debouncedHandleShowTooltip","e","debouncedHandleHideTooltip","handleScrollResize","hasClickEvent","click","dblclick","mousedown","actualOpenEvents","mouseenter","focus","assign","actualCloseEvents","mouseleave","blur","mouseup","actualGlobalCloseEvents","escape","scroll","resize","clickOutsideAnchor","tooltipElement","tooltipScrollParent","anchorScrollParent","addEventListener","updateTooltipCleanup","autoUpdate","ancestorResize","elementResize","layoutShift","handleEsc","enabledEvents","handleClickOpenTooltipAnchor","handleClickCloseTooltipAnchor","regularEvents","clickEvents","entries","forEach","enabled","includes","listener","handleMouseEnterTooltip","handleMouseLeaveTooltip","removeEventListener","selector","replace","documentObserver","MutationObserver","mutationList","addedAnchors","Set","removedAnchors","mutation","attributeName","getAttribute","add","oldValue","removedNodes","filter","nodeType","call","matches","querySelectorAll","innerNode","console","warn","addedNodes","size","anchors","has","observe","childList","subtree","attributes","attributeFilter","attributeOldValue","disconnect","contentObserver","ResizeObserver","from","actualContent","canShow","useImperativeHandle","open","options","querySelector","close","Boolean","React","clsx","coreStyles","onTransitionEnd","background","TooltipController","render","children","disableStyleInjection","tooltipContent","setTooltipContent","tooltipPlace","setTooltipPlace","tooltipVariant","setTooltipVariant","tooltipOffset","setTooltipOffset","tooltipDelayShow","setTooltipDelayShow","tooltipDelayHide","setTooltipDelayHide","tooltipFloat","setTooltipFloat","tooltipHidden","setTooltipHidden","tooltipWrapper","setTooltipWrapper","tooltipPositionStrategy","setTooltipPositionStrategy","tooltipClassName","setTooltipClassName","styleInjectionRef","getDataAttributesFromAnchorElement","getAttributeNames","reduce","acc","name","startsWith","applyAllDataAttributesFromAnchorElement","dataAttributes","handleDataAttributes","values","handler","dispatchEvent","CustomEvent","detail","disableCore","disableBase","observer","observerConfig","renderedContent","props"],"mappings":";;;;;;oFACA,MAIMA,EAAW,CACfC,MAAM,EACNC,MAAM,GAGR,SAASC,GAAYC,IACnBA,EAAGC,GACHA,EATmC,4BASFC,KACjCA,EAAO,OAAMC,IACbA,YAQA,IAAKH,GAA2B,oBAAbI,UAA4BR,EAASM,GACtD,OAGF,GACW,SAATA,GACmB,oBAAZG,UACO,QAAdC,EAAA,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S+L,EACTxR,OAAQ0R,EACR7L,QAASuM,GACTzM,cACAC,iBAAkB0M,GAClBnS,cACA4F,UAAW6L,EACX5L,UAAW8L,EACX7L,MAAO+L,EACP9L,OAAQgM,GACR/L,UACAC,YACAC,aACAC,cACAC,oBACAC,qBACAtH,QACAwH,WACAK,SACAC,gBACAvG,SACA2G,UACAC,aACAJ,YACAN,YACAC,YACAM,gBACAC,mBACAG,QAGF,OAAOqJ,EAACxR,cAAAkG,EAAY,IAAAyO,IAAS,ICxSX,oBAAX9O,QACTA,OAAO2H,iBAAiB,+BACtBtC,IAEKA,EAAMmJ,OAAOC,aAChBvV,EAAY,CAAEC,IARM,qCAQkBE,KAAM,SAEzCgM,EAAMmJ,OAAOE,aAChBxV,EAAY,CAAEC,IAVE,gCAUkBE,KAAM,QAE3C"}
1
+ {"version":3,"file":"react-tooltip.min.cjs","sources":["../../src/utils/handle-style.ts","../../src/utils/compute-tooltip-position.ts","../../src/utils/debounce.ts","../../src/utils/get-scroll-parent.ts","../../src/utils/use-isomorphic-layout-effect.ts","../../src/utils/clear-timeout-ref.ts","../../src/components/Tooltip/anchor-registry.ts","../../src/components/Tooltip/use-tooltip-anchors.tsx","../../src/components/Tooltip/event-delegation.ts","../../src/components/Tooltip/Tooltip.tsx","../../src/utils/css-time-to-ms.ts","../../src/components/Tooltip/use-tooltip-events.tsx","../../src/utils/parse-data-tooltip-id-selector.ts","../../src/utils/resolve-data-tooltip-anchor.ts","../../src/components/TooltipController/shared-attribute-observer.ts","../../src/components/TooltipController/TooltipController.tsx","../../src/index.tsx"],"names":["injected","core","base","injectStyle","css","id","type","ref","state","document","process","env","REACT_TOOLTIP_DISABLE_CORE_STYLES","REACT_TOOLTIP_DISABLE_BASE_STYLES","insertAt","getElementById","head","getElementsByTagName","style","createElement","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","defaultFlip","flip","fallbackAxisSideDirection","defaultShift","shift","padding","computeTooltipPosition","async","elementReference","tooltipReference","tooltipArrowReference","place","offset","offsetValue","strategy","middlewares","Number","border","arrowSize","tooltipStyles","tooltipArrowStyles","middleware","push","arrow","element","computePosition","placement","then","x","y","middlewareData","styles","left","top","arrowX","arrowY","_a","staticSide","_b","right","bottom","split","borderSide","borderBottom","borderRight","borderWidth","match","debounce","func","wait","immediate","timeout","currentFunc","debounced","args","later","apply","this","setTimeout","cancel","clearTimeout","setCallback","newFunc","isScrollable","node","HTMLElement","SVGElement","getComputedStyle","some","propertyName","value","getPropertyValue","getScrollParent","currentParent","parentElement","scrollingElement","documentElement","useIsomorphicLayoutEffect","window","useLayoutEffect","useEffect","clearTimeoutRef","current","registry","Map","documentObserver","extractTooltipId","selector","replace","readAnchorsForSelector","anchors","Array","from","querySelectorAll","error","Error","String","refreshEntry","entry","nextState","nextErrorMessage","message","previousErrorMessage","_d","_c","length","every","anchor","index","nextEntry","set","subscribers","forEach","subscriber","notifySubscribers","refreshScheduled","pendingTooltipIds","pendingFullRefresh","scheduleRefresh","affectedTooltipIds","Set","add","flush","fullRefresh","ids","affectedIds","size","tooltipId","has","requestAnimationFrame","Promise","resolve","ensureDocumentObserver","MutationObserver","records","record","target","currentId","getAttribute","call","oldValue","gatherIds","nodes","i","nodeType","Node","ELEMENT_NODE","el","descendants","j","descId","addedNodes","removedNodes","collectAffectedTooltipIds","observe","body","childList","subtree","attributes","attributeFilter","attributeOldValue","subscribeAnchorSelector","get","initialState","currentEntry","delete","disconnect","handlersByType","dispatch","event","handlers","handler","addDelegatedEventListener","eventType","addEventListener","getOrCreateSet","removeEventListener","globalTransitionShowDelay","Tooltip$1","memo","forwardRef","className","classNameArrow","variant","portalRoot","anchorSelect","openOnClick","positionStrategy","wrapper","WrapperElement","delayShow","delayHide","autoClose","float","hidden","noArrow","clickable","openEvents","closeEvents","globalCloseEvents","imperativeModeOnly","externalStyles","position","afterShow","afterHide","disableTooltip","content","contentWrapperRef","isOpen","defaultIsOpen","setIsOpen","previousActiveAnchor","activeAnchor","setActiveAnchor","opacity","arrowColor","role","tooltipRef","useRef","tooltipArrowRef","tooltipShowDelayTimerRef","tooltipHideDelayTimerRef","tooltipAutoCloseTimerRef","missedTransitionTimerRef","computedPosition","setComputedPosition","useState","show","setShow","rendered","setRendered","imperativeOptions","setImperativeOptions","wasShowing","lastFloatPosition","hoveringTooltip","mounted","virtualElementRef","getBoundingClientRect","width","height","handleShow","useCallback","undefined","removeAriaDescribedBy","currentDescribedBy","getAriaDescribedBy","describedBy","filter","Boolean","join","setAttribute","newDescribedBy","s","removeAttribute","time","amount","unit","cssTimeToMs","transitionShowDelay","handleComputedPosition","newComputedPosition","oldComputedPosition","handleShowTooltipDelayed","delay","handleHideTooltipDelayed","handleTooltipPosition","computedStylesData","updateTooltipPosition","actualPosition","isConnected","handleActiveAnchorRemoved","shouldTrackAnchors","anchorElements","anchorSelector","imperativeAnchorSelect","onActiveAnchorRemoved","trackAnchors","rawAnchorElements","setRawAnchorElements","selectorError","setSelectorError","warnedSelectorRef","useMemo","getAnchorSelector","activeAnchorMatchesSelector","matches","includes","useTooltipAnchors","debouncedShowRef","_anchor","debouncedHideRef","anchorScrollParentRef","tooltipScrollParentRef","prevAnchorRef","prevTooltipRef","currentTooltipEl","hasClickEvent","click","dblclick","mousedown","actualOpenEvents","events","mouseenter","focus","Object","assign","actualCloseEvents","mouseleave","blur","mouseup","actualGlobalCloseEvents","escape","scroll","resize","clickOutsideAnchor","activeAnchorRef","showRef","anchorElementsRef","handleShowRef","handleTooltipPositionRef","updateTooltipPositionRef","resolveAnchorElementRef","handleShowTooltipRef","handleHideTooltipRef","dataTooltipId","parseDataTooltipIdSelector","targetElement","matchedAnchor","currentElement","dataset","resolveDataTooltipAnchor","closest","find","contains","debouncedShow","debouncedHide","cleanupFns","addDelegatedListener","listener","activeAnchorContainsTarget","debouncedHandleShowTooltip","debouncedHandleHideTooltip","addDelegatedHoverOpenListener","relatedTarget","addDelegatedHoverCloseListener","mouseover","mouseout","regularEvents","clickEvents","handleClickOpenTooltipAnchor","handleClickCloseTooltipAnchor","entries","enabled","currentActiveAnchor","mouseEvent","mousePosition","clientX","clientY","tooltipElement","handleMouseOverTooltip","handleMouseOutTooltip","addHoveringTooltipListeners","fn","handleScrollResize","tooltipScrollParent","anchorScrollParent","updateTooltipCleanup","autoUpdate","ancestorResize","elementResize","layoutShift","handleEsc","key","handleClickOutsideAnchors","useTooltipEvents","timeoutId","contentObserver","ResizeObserver","activeAnchorMatchesImperativeSelector","actualContent","hasContent","canShow","tooltipStyle","arrowBackground","arrowStyle","background","useImperativeHandle","open","options","imperativeAnchor","querySelector","close","tooltipNode","React","clsx","coreStyles","onTransitionEnd","createPortal","observedElements","sharedObserver","observerConfig","observeAnchorAttributes","callback","observer","mutationList","mutation","attributeName","startsWith","callbacks","cb","cbs","_cbs","TooltipController","render","children","disableStyleInjection","anchorDataAttributes","setAnchorDataAttributes","previousActiveAnchorRef","styleInjectionRef","handleSetActiveAnchor","prev","isSameNode","dispatchEvent","CustomEvent","detail","disableCore","disableBase","updateAttributes","attrs","dataAttributes","getAttributeNames","reduce","acc","name","getDataAttributesFromAnchorElement","keys","prevKeys","tooltipContent","tooltipPlace","tooltipVariant","tooltipOffset","tooltipWrapper","tooltipPositionStrategy","_e","tooltipDelayShow","tooltipDelayHide","tooltipAutoClose","tooltipFloat","tooltipHidden","tooltipClassName","_f","renderedContent","_h","_g","props","Tooltip","TooltipController_default"],"mappings":";;;;;;2GACA,MAIMA,EAAW,CACfC,MAAM,EACNC,MAAM,GAQR,SAASC,GAAYC,IACnBA,EAAGC,GACHA,EAdmC,4BAcFC,KACjCA,EAAO,OAAMC,IACbA,EAAGC,MACHA,EAAQ,CAAA,IASR,IACGJ,GACmB,oBAAbK,gBACiB,IAAhBD,EAAMF,GAAwBE,EAAMF,GAAQN,EAASM,IAE7D,OAGF,GACW,SAATA,GACmB,oBAAZI,SACPA,QAAQC,KACRD,QAAQC,IAAIC,kCAEZ,OAGF,GACW,SAATN,GACmB,oBAAZI,SACPA,QAAQC,KACRD,QAAQC,IA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AAIhB,UAAc,IAAAe,EAAAA,EAAI,KACtBlP,iBAClDiP,GAAkBhO,EAChBqK,EAAAjZ,cAAA,MAAA,CAAKZ,IAAKkO,GAAmB1B,UAAU,iCACpCgD,GAED,IACN,MAAWkN,WACTc,GAAkBd,IAGpB,MAAMiB,GAAkB,CACtBpR,WAAYvM,EACZF,KACA8M,eACAJ,UAAWsN,EAAKtN,EAAW8Q,IAC3B7Q,iBACAwB,QAASuP,GACTtP,qBACAvB,aACA7K,MAAO6a,GACPjQ,QAASkQ,GACT7a,OAAQ8a,GACR9P,QAAS+P,GACTjQ,cACAC,iBAAkBiQ,GAClB7a,cACA+K,UAAWgQ,GACX/P,UAAWgQ,GACX/P,UAAWgQ,GACX/P,MAAOgQ,GACP/P,OAAQgQ,GACR/P,UACAC,YACAC,aACAC,cACAC,oBACAC,qBACAhN,QACAkN,WACAM,SACAC,gBACAhM,SACAqM,UACAC,aACArM,YACAgM,YACAP,YACAC,YACAC,iBACAO,eACAD,qBAAsBgN,GAAwBjV,QAC9CmI,gBAAiBgN,GACjB7M,QAGF,OAAOkL,EAAAjZ,cAACgd,EAAO,IAAKD,OAIxB,IAAAE,EAAevR,EAAAA,KAAK0O,GCxOE,oBAAX/U,QACTA,OAAOgG,iBAAiB,8BACtBL,IAEKA,EAAMiQ,OAAOC,aAChBlc,EAAY,CAAEC,IARM,qCAQkBE,KAAM,SAEzC6L,EAAMiQ,OAAOE,aAChBnc,EAAY,CAAEC,IAVE,gCAUkBE,KAAM,QAE3C"}
@@ -1 +1 @@
1
- :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{left:0;opacity:0;pointer-events:none;position:absolute;top:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{background:inherit;position:absolute}.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}.styles-module_tooltip__mnnfp{border-radius:3px;font-size:90%;padding:8px 16px;width:max-content}.styles-module_arrow__K0L3T{height:8px;width: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)}
1
+ :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;--rt-arrow-size:8px}.core-styles-module_tooltip__3vRRp{left:0;opacity:0;pointer-events:none;position:absolute;top:0}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{-webkit-backface-visibility:hidden;backface-visibility:hidden;background:inherit;position:absolute;z-index:-1}.core-styles-module_content__BRKdB{position:relative;z-index:1}.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;will-change:opacity}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay) ease-in;will-change:opacity}.styles-module_tooltip__mnnfp{border-radius:3px;font-size:90%;width:max-content}.styles-module_content__ydYdI{background:inherit;border-radius:inherit;padding:8px 16px}.styles-module_arrow__K0L3T{height:var(--rt-arrow-size);width:var(--rt-arrow-size)}[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)}
@@ -4,6 +4,6 @@
4
4
  * @copyright ReactTooltip Team
5
5
  * @license MIT
6
6
  */
7
- import e,{useLayoutEffect as t,useEffect as o,useRef as l,useState as r,useCallback as n,useImperativeHandle as i}from"react";import{arrow as c,computePosition as s,offset as a,flip as u,shift as d,autoUpdate as p}from"@floating-ui/dom";import v from"clsx";const m={core:!1,base:!1};function f({css:e,id:t="react-tooltip-base-styles",type:o="base",ref:l}){var r,n;if(!e||"undefined"==typeof document||m[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="react-tooltip-core-styles"),l||(l={});const{insertAt:i}=l;if(document.getElementById(t))return;const c=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.id=t,s.type="text/css","top"===i&&c.firstChild?c.insertBefore(s,c.firstChild):c.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e)),m[o]=!0}const y=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:o=null,place:l="top",offset:r=10,strategy:n="absolute",middlewares:i=[a(Number(r)),u({fallbackAxisSideDirection:"start"}),d({padding:5})],border:p})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:l};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:l};const v=i;return o?(v.push(c({element:o,padding:5})),s(e,t,{placement:l,strategy:n,middleware:v}).then((({x:e,y:t,placement:o,middlewareData:l})=>{var r,n;const i={left:`${e}px`,top:`${t}px`,border:p},{x:c,y:s}=null!==(r=l.arrow)&&void 0!==r?r:{x:0,y:0},a=null!==(n={top:"bottom",right:"left",bottom:"top",left:"right"}[o.split("-")[0]])&&void 0!==n?n:"bottom",u=p&&{borderBottom:p,borderRight:p};let d=0;if(p){const e=`${p}`.match(/(\d+)px/);d=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:i,tooltipArrowStyles:{left:null!=c?`${c}px`:"",top:null!=s?`${s}px`:"",right:"",bottom:"",...u,[a]:`-${4+d}px`},place:o}}))):s(e,t,{placement:"bottom",strategy:n,middleware:v}).then((({x:e,y:t,placement:o})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:o})))},w=(e,t,o)=>{let l=null;const r=function(...o){const r=()=>{l=null};l||(e.apply(this,o),l=setTimeout(r,t))};return r.cancel=()=>{l&&(clearTimeout(l),l=null)},r},h=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,b=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,o)=>b(e,t[o])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!h(e)||!h(t))return e===t;const o=Object.keys(e),l=Object.keys(t);return o.length===l.length&&o.every((o=>b(e[o],t[o])))},E=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}))},g=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(E(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},S="undefined"!=typeof window?t:o,_=e=>{e.current&&(clearTimeout(e.current),e.current=null)};var A={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"},k={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 O=({forwardRef:t,id:c,className:s,classNameArrow:a,variant:u="dark",anchorSelect:d,place:m="top",offset:f=10,openOnClick:h=!1,positionStrategy:E="absolute",middlewares:O,wrapper:T,delayShow:L=0,delayHide:x=0,float:C=!1,hidden:N=!1,noArrow:R=!1,clickable:j=!1,openEvents:$,closeEvents:B,globalCloseEvents:I,imperativeModeOnly:z,style:D,position:H,afterShow:M,afterHide:W,content:q,contentWrapperRef:V,isOpen:P,defaultIsOpen:K=!1,setIsOpen:X,activeAnchor:Y,setActiveAnchor:F,border:G,opacity:U,arrowColor:Z,role:J="tooltip"})=>{var Q;const ee=l(null),te=l(null),oe=l(null),le=l(null),re=l(null),[ne,ie]=r({tooltipStyles:{},tooltipArrowStyles:{},place:m}),[ce,se]=r(!1),[ae,ue]=r(!1),[de,pe]=r(null),ve=l(!1),me=l(null),fe=l(!1),[ye,we]=r([]),he=l(!1);S((()=>(he.current=!0,()=>{he.current=!1})),[]);const be=n((e=>{he.current&&(e&&ue(!0),setTimeout((()=>{he.current&&(null==X||X(e),void 0===P&&se(e))}),10))}),[P,X]);o((()=>{if(void 0===P)return()=>null;P&&ue(!0);const e=setTimeout((()=>{se(P)}),10);return()=>{clearTimeout(e)}}),[P]),o((()=>{if(ce!==ve.current)if(_(re),ve.current=ce,ce)null==M||M();else{const e=(e=>{const t=e.match(/^([\d.]+)(m?s)$/);if(!t)return 0;const[,o,l]=t;return Number(o)*("ms"===l?1:1e3)})(getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay"));re.current=setTimeout((()=>{ue(!1),pe(null),null==W||W()}),e+25)}}),[W,M,ce]);const Ee=e=>{ie((t=>b(t,e)?t:e))},ge=n(((e=L)=>{oe.current&&clearTimeout(oe.current),ae?be(!0):oe.current=setTimeout((()=>{be(!0)}),e)}),[L,be,ae]),Se=n(((e=x)=>{le.current&&clearTimeout(le.current),le.current=setTimeout((()=>{fe.current||be(!1)}),e)}),[x,be]),_e=n((({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})};y({place:null!==(o=null==de?void 0:de.place)&&void 0!==o?o:m,offset:f,elementReference:l,tooltipReference:ee.current,tooltipArrowReference:te.current,strategy:E,middlewares:O,border:G}).then((e=>{Ee(e)}))}),[null==de?void 0:de.place,m,f,E,O,G]),Ae=n((()=>{var e,t;const o=null!==(e=null==de?void 0:de.position)&&void 0!==e?e:H;o?_e(o):C?me.current&&_e(me.current):(null==Y?void 0:Y.isConnected)&&y({place:null!==(t=null==de?void 0:de.place)&&void 0!==t?t:m,offset:f,elementReference:Y,tooltipReference:ee.current,tooltipArrowReference:te.current,strategy:E,middlewares:O,border:G}).then((e=>{he.current&&Ee(e)}))}),[null==de?void 0:de.position,null==de?void 0:de.place,H,C,Y,m,f,E,O,G,_e]);o((()=>{const e=e=>{if(!e)return;const t=e,o={x:t.clientX,y:t.clientY};_e(o),me.current=o},t=e=>{var t;if(!ce)return;const o=e.target;o.isConnected&&((null===(t=ee.current)||void 0===t?void 0:t.contains(o))||ye.some((e=>null==e?void 0:e.contains(o)))||(be(!1),oe.current&&clearTimeout(oe.current)))},o=e=>{var t;if(!e)return;const o=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;(null==o?void 0:o.isConnected)?(L?ge():be(!0),F(o),le.current&&clearTimeout(le.current)):F(null)},l=()=>{j?Se(x||100):x?Se():be(!1),oe.current&&clearTimeout(oe.current)},r=w(o,50),n=w(l,50),i=e=>{n.cancel(),r(e)},c=()=>{r.cancel(),n()},s=()=>{be(!1)},a=h||(null==$?void 0:$.click)||(null==$?void 0:$.dblclick)||(null==$?void 0:$.mousedown),u=$?{...$}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};!$&&h&&Object.assign(u,{mouseenter:!1,focus:!1,click:!0});const d=B?{...B}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};!B&&h&&Object.assign(d,{mouseleave:!1,blur:!1});const v=I?{...I}:{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:a||!1};z&&(Object.assign(u,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(d,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(v,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1}));const m=ee.current,f=g(ee.current),y=g(Y);v.scroll&&(window.addEventListener("scroll",s),null==y||y.addEventListener("scroll",s),null==f||f.addEventListener("scroll",s));let b=null;v.resize?window.addEventListener("resize",s):Y&&ee.current&&(b=p(Y,ee.current,Ae,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const E=e=>{"Escape"===e.key&&be(!1)};v.escape&&window.addEventListener("keydown",E),v.clickOutsideAnchor&&window.addEventListener("click",t);const S=[],_=e=>{ce&&(null==e?void 0:e.target)===Y||o(e)},A=e=>{ce&&(null==e?void 0:e.target)===Y&&l()},k=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],O=["click","dblclick","mousedown","mouseup"];Object.entries(u).forEach((([e,t])=>{t&&(k.includes(e)?S.push({event:e,listener:i}):O.includes(e)&&S.push({event:e,listener:_}))})),Object.entries(d).forEach((([e,t])=>{t&&(k.includes(e)?S.push({event:e,listener:c}):O.includes(e)&&S.push({event:e,listener:A}))})),C&&S.push({event:"pointermove",listener:e});const T=()=>{fe.current=!0},N=()=>{fe.current=!1,l()};return j&&!a&&(null==m||m.addEventListener("mouseenter",T),null==m||m.addEventListener("mouseleave",N)),S.forEach((({event:e,listener:t})=>{ye.forEach((o=>{o.addEventListener(e,t)}))})),()=>{v.scroll&&(window.removeEventListener("scroll",s),null==y||y.removeEventListener("scroll",s),null==f||f.removeEventListener("scroll",s)),v.resize?window.removeEventListener("resize",s):null==b||b(),v.clickOutsideAnchor&&window.removeEventListener("click",t),v.escape&&window.removeEventListener("keydown",E),j&&!a&&(null==m||m.removeEventListener("mouseenter",T),null==m||m.removeEventListener("mouseleave",N)),S.forEach((({event:e,listener:t})=>{ye.forEach((o=>{o.removeEventListener(e,t)}))}))}}),[Y,ye,j,B,x,L,C,I,Se,be,ge,_e,z,$,h,F,ce,Ae]),o((()=>{var e,t;let o=null!==(t=null!==(e=null==de?void 0:de.anchorSelect)&&void 0!==e?e:d)&&void 0!==t?t:"";!o&&c&&(o=`[data-tooltip-id='${c.replace(/'/g,"\\'")}']`);const l=new MutationObserver((e=>{const t=new Set,l=new Set;e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName){const o=e.target;o.getAttribute("data-tooltip-id")===c?t.add(o):e.oldValue===c&&l.add(o)}if("childList"!==e.type)return;const r=[...e.removedNodes].filter((e=>1===e.nodeType));if(Y&&r.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,Y))&&(ue(!1),be(!1),F(null),_(oe),_(le),!0)})),o){try{r.forEach((e=>{const t=e;t.matches(o)?l.add(t):t.querySelectorAll(o).forEach((e=>l.add(e)))}))}catch(e){console.warn(`[react-tooltip] "${o}" is not a valid CSS selector`)}try{[...e.addedNodes].filter((e=>1===e.nodeType)).forEach((e=>{const l=e;l.matches(o)?t.add(l):l.querySelectorAll(o).forEach((e=>t.add(e)))}))}catch(e){console.warn(`[react-tooltip] "${o}" is not a valid CSS selector`)}}})),(t.size||l.size)&&we((e=>[...e.filter((e=>!l.has(e))),...t]))}));return l.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{l.disconnect()}}),[c,d,null==de?void 0:de.anchorSelect,Y,be,F]),o((()=>{Ae()}),[Ae]),o((()=>{if(!(null==V?void 0:V.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Ae()))}));return e.observe(V.current),()=>{e.disconnect()}}),[q,V,Ae]),o((()=>{var e;Y&&ye.includes(Y)||F(null!==(e=ye[0])&&void 0!==e?e:null)}),[ye,Y,F]),o((()=>(K&&be(!0),()=>{_(oe),_(le)})),[K,be]),o((()=>{var e;let t=null!==(e=null==de?void 0:de.anchorSelect)&&void 0!==e?e:d;if(!t&&c&&(t=`[data-tooltip-id='${c.replace(/'/g,"\\'")}']`),t)try{const e=Array.from(document.querySelectorAll(t));we(e)}catch(e){we([])}}),[c,d,null==de?void 0:de.anchorSelect]),o((()=>{oe.current&&(_(oe),ge(L))}),[L,ge]);const ke=null!==(Q=null==de?void 0:de.content)&&void 0!==Q?Q:q,Oe=ce&&Object.keys(ne.tooltipStyles).length>0;return i(t,(()=>({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`)}pe(null!=e?e:null),(null==e?void 0:e.delay)?ge(e.delay):be(!0)},close:e=>{(null==e?void 0:e.delay)?Se(e.delay):be(!1)},activeAnchor:Y,place:ne.place,isOpen:Boolean(ae&&!N&&ke&&Oe)}))),ae&&!N&&ke?e.createElement(T,{id:c,role:J,className:v("react-tooltip",A.tooltip,k.tooltip,k[u],s,`react-tooltip__place-${ne.place}`,A[Oe?"show":"closing"],Oe?"react-tooltip__show":"react-tooltip__closing","fixed"===E&&A.fixed,j&&A.clickable),onTransitionEnd:e=>{_(re),ce||"opacity"!==e.propertyName||(ue(!1),pe(null),null==W||W())},style:{...D,...ne.tooltipStyles,opacity:void 0!==U&&Oe?U:void 0},ref:ee},ke,e.createElement(T,{className:v("react-tooltip-arrow",A.arrow,k.arrow,a,R&&A.noArrow),style:{...ne.tooltipArrowStyles,background:Z?`linear-gradient(to right bottom, transparent 50%, ${Z} 50%)`:void 0},ref:te})):null},T=e.forwardRef((({id:t,anchorSelect:i,content:c,render:s,className:a,classNameArrow:u,variant:d="dark",place:p="top",offset:m=10,wrapper:f="div",children:y=null,openOnClick:w=!1,positionStrategy:h="absolute",middlewares:b,delayShow:E=0,delayHide:g=0,float:S=!1,hidden:_=!1,noArrow:A=!1,clickable:k=!1,openEvents:T,closeEvents:L,globalCloseEvents:x,imperativeModeOnly:C=!1,style:N,position:R,isOpen:j,defaultIsOpen:$=!1,disableStyleInjection:B=!1,border:I,opacity:z,arrowColor:D,setIsOpen:H,afterShow:M,afterHide:W,role:q="tooltip"},V)=>{const[P,K]=r(c),[X,Y]=r(p),[F,G]=r(d),[U,Z]=r(m),[J,Q]=r(E),[ee,te]=r(g),[oe,le]=r(S),[re,ne]=r(_),[ie,ce]=r(f),[se,ae]=r(h),[ue,de]=r(null),[pe,ve]=r(null),me=l(B),fe=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}),{}),ye=n((e=>{const t={place:e=>{var t;Y(null!==(t=e)&&void 0!==t?t:p)},content:e=>{K(null!=e?e:c)},variant:e=>{var t;G(null!==(t=e)&&void 0!==t?t:d)},offset:e=>{Z(null===e?m:Number(e))},wrapper:e=>{var t;ce(null!==(t=e)&&void 0!==t?t:f)},"position-strategy":e=>{var t;ae(null!==(t=e)&&void 0!==t?t:h)},"delay-show":e=>{Q(null===e?E:Number(e))},"delay-hide":e=>{te(null===e?g:Number(e))},float:e=>{le(null===e?S:"true"===e)},hidden:e=>{ne(null===e?_:"true"===e)},"class-name":e=>{de(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)}))}),[c,g,E,S,_,m,p,h,d,f]);o((()=>{K(c)}),[c]),o((()=>{Y(p)}),[p]),o((()=>{G(d)}),[d]),o((()=>{Z(m)}),[m]),o((()=>{Q(E)}),[E]),o((()=>{te(g)}),[g]),o((()=>{le(S)}),[S]),o((()=>{ne(_)}),[_]),o((()=>{ae(h)}),[h]),o((()=>{me.current!==B&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[B]),o((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===B,disableBase:B}}))}),[]),o((()=>{const e=new MutationObserver((e=>{e.forEach((e=>{var t;if(!pe||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const o=fe(pe);ye(o)}))})),t={attributes:!0,childList:!1,subtree:!1};if(pe){const o=fe(pe);ye(o),e.observe(pe,t)}return()=>{e.disconnect()}}),[pe,i,ye]),o((()=>{(null==N?void 0:N.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),(null==N?void 0:N.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead.")}),[I,z,null==N?void 0:N.border,null==N?void 0:N.opacity]);let we=y;const he=l(null);if(s){const t=s({content:(null==pe?void 0:pe.getAttribute("data-tooltip-content"))||P||null,activeAnchor:pe});we=t?e.createElement("div",{ref:he,className:"react-tooltip-content-wrapper"},t):null}else P&&(we=P);const be={forwardRef:V,id:t,anchorSelect:i,className:v(a,ue),classNameArrow:u,content:we,contentWrapperRef:he,place:X,variant:F,offset:U,wrapper:ie,openOnClick:w,positionStrategy:se,middlewares:b,delayShow:J,delayHide:ee,float:oe,hidden:re,noArrow:A,clickable:k,openEvents:T,closeEvents:L,globalCloseEvents:x,imperativeModeOnly:C,style:N,position:R,isOpen:j,defaultIsOpen:$,border:I,opacity:z,arrowColor:D,setIsOpen:H,afterShow:M,afterHide:W,activeAnchor:pe,setActiveAnchor:ve,role:q};return e.createElement(O,{...be})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||f({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||f({css:`
8
- .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"})}));export{T as Tooltip};
7
+ import e,{useLayoutEffect as t,useEffect as o,useState as r,useRef as n,useMemo as l,memo as i,useCallback as c,useImperativeHandle as s}from"react";import u from"clsx";import{createPortal as a}from"react-dom";import{flip as d,shift as p,arrow as v,computePosition as m,offset as f,autoUpdate as h}from"@floating-ui/dom";const y={core:!1,base:!1};function w({css:e,id:t="react-tooltip-base-styles",type:o="base",ref:r,state:n={}}){if(!e||"undefined"==typeof document||(void 0!==n[o]?n[o]:y[o]))return;if("core"===o&&"undefined"!=typeof process&&process.env&&process.env.REACT_TOOLTIP_DISABLE_CORE_STYLES)return;if("base"===o&&"undefined"!=typeof process&&process.env&&process.env.REACT_TOOLTIP_DISABLE_BASE_STYLES)return;"core"===o&&(t="react-tooltip-core-styles"),r||(r={});const{insertAt:l}=r;if(document.getElementById(t))return;const i=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style");c.id=t,c.type="text/css","top"===l&&i.firstChild?i.insertBefore(c,i.firstChild):i.appendChild(c),c.styleSheet?c.styleSheet.cssText=e:c.appendChild(document.createTextNode(e)),void 0!==n[o]?n[o]=!0:y[o]=!0}const b=d({fallbackAxisSideDirection:"start"}),S=p({padding:5}),g=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:o=null,place:r="top",offset:n=10,strategy:l="absolute",middlewares:i=[f(Number(n)),b,S],border:c,arrowSize:s=8})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const u=[...i];return o?(u.push(v({element:o,padding:5})),m(e,t,{placement:r,strategy:l,middleware:u}).then(({x:e,y:t,placement:o,middlewareData:r})=>{var n,l;const i={left:`${e}px`,top:`${t}px`,border:c},{x:u,y:a}=null!==(n=r.arrow)&&void 0!==n?n:{x:0,y:0},d=null!==(l={top:"bottom",right:"left",bottom:"top",left:"right"}[o.split("-")[0]])&&void 0!==l?l:"bottom",p=c&&{borderBottom:c,borderRight:c};let v=0;if(c){const e=`${c}`.match(/(\d+)px/);v=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:i,tooltipArrowStyles:{left:null!=u?`${u}px`:"",top:null!=a?`${a}px`:"",right:"",bottom:"",...p,[d]:`-${s/2+v-1}px`},place:o}})):m(e,t,{placement:"bottom",strategy:l,middleware:u}).then(({x:e,y:t,placement:o})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:o}))},A=(e,t,o)=>{let r=null,n=e;const l=function(...e){const o=()=>{r=null};r||(n.apply(this,e),r=setTimeout(o,t))};return l.cancel=()=>{r&&(clearTimeout(r),r=null)},l.setCallback=e=>{n=e},l},E=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})},_=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(E(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},T="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?t:o,k=e=>{e.current&&(clearTimeout(e.current),e.current=null)};var O={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",content:"core-styles-module_content__BRKdB",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},C={tooltip:"styles-module_tooltip__mnnfp",content:"styles-module_content__ydYdI",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 R=new Map;let x=null;function L(e){const t=e.match(/^\[data-tooltip-id=(['"])((?:\\.|(?!\1).)*)\1\]$/);return t?t[2].replace(/\\(['"])/g,"$1"):null}function N(e){try{return{anchors:Array.from(document.querySelectorAll(e)),error:null}}catch(e){return{anchors:[],error:e instanceof Error?e:new Error(String(e))}}}function B(e,t){var o,r,n,l;const i=N(e),c=null!==(r=null===(o=i.error)||void 0===o?void 0:o.message)&&void 0!==r?r:null,s=null!==(l=null===(n=t.error)||void 0===n?void 0:n.message)&&void 0!==l?l:null;if(u=t.anchors,a=i.anchors,u.length===a.length&&u.every((e,t)=>e===a[t])&&c===s)return;var u,a;const d={...t,anchors:i.anchors,error:i.error};R.set(e,d),function(e){e.subscribers.forEach(t=>t(e.anchors,e.error))}(d)}let z=!1,I=null,$=!1;function j(e){if(e?(I||(I=new Set),e.forEach(e=>I.add(e))):$=!0,z)return;z=!0;const t=()=>{z=!1;const e=$,t=I;var o;$=!1,I=null,e?R.forEach((e,t)=>{B(t,e)}):t&&t.size>0&&(o=t,R.forEach((e,t)=>{(null===e.tooltipId||o.has(e.tooltipId))&&B(t,e)}))};"function"==typeof requestAnimationFrame?requestAnimationFrame(t):Promise.resolve().then(t)}function D(){x||"undefined"==typeof MutationObserver||(x=new MutationObserver(e=>{const t=function(e){var t;if(R.size<=4)return null;const o=new Set;for(const r of e){if("attributes"===r.type){const e=r.target,n=null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"data-tooltip-id");n&&o.add(n),r.oldValue&&o.add(r.oldValue);continue}if("childList"===r.type){const e=e=>{var t,r;for(let n=0;n<e.length;n++){const l=e[n];if(l.nodeType!==Node.ELEMENT_NODE)continue;const i=l,c=null===(t=i.getAttribute)||void 0===t?void 0:t.call(i,"data-tooltip-id");c&&o.add(c);const s=null===(r=i.querySelectorAll)||void 0===r?void 0:r.call(i,"[data-tooltip-id]");if(s){if(s.length>50)return!0;for(let e=0;e<s.length;e++){const t=s[e].getAttribute("data-tooltip-id");t&&o.add(t)}}}return!1};if(e(r.addedNodes)||e(r.removedNodes))return null;continue}}return o}(e);j(t)}),x.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}))}function H(e,t){let o=R.get(e);if(!o){const t=N(e);o={anchors:t.anchors,error:t.error,subscribers:new Set,tooltipId:L(e)},R.set(e,o)}return o.subscribers.add(t),D(),t([...o.anchors],o.error),()=>{const o=R.get(e);o&&(o.subscribers.delete(t),0===o.subscribers.size&&R.delete(e),0===R.size&&x&&(x.disconnect(),x=null))}}const M=new Map;function P(e){const t=M.get(e.type);t&&t.forEach(t=>{t(e)})}function W(e,t){const o=function(e){let t=M.get(e);return t||(t=new Set,M.set(e,t),document.addEventListener(e,P)),t}(e);return o.add(t),()=>{o.delete(t),0===o.size&&(M.delete(e),document.removeEventListener(e,P))}}let q=null;var F=i(({forwardRef:t,id:i,className:d,classNameArrow:p,variant:v="dark",portalRoot:m,anchorSelect:f,place:y="top",offset:w=10,openOnClick:b=!1,positionStrategy:S="absolute",middlewares:E,wrapper:R,delayShow:x=0,delayHide:L=0,autoClose:N,float:B=!1,hidden:z=!1,noArrow:I=!1,clickable:$=!1,openEvents:j,closeEvents:D,globalCloseEvents:M,imperativeModeOnly:P,style:F,position:V,afterShow:K,afterHide:Y,disableTooltip:X,content:G,contentWrapperRef:Z,isOpen:J,defaultIsOpen:Q=!1,setIsOpen:U,previousActiveAnchor:ee,activeAnchor:te,setActiveAnchor:oe,border:re,opacity:ne,arrowColor:le,arrowSize:ie=8,role:ce="tooltip"})=>{var se;const ue=n(null),ae=n(null),de=n(null),pe=n(null),ve=n(null),me=n(null),[fe,he]=r({tooltipStyles:{},tooltipArrowStyles:{},place:y}),[ye,we]=r(!1),[be,Se]=r(!1),[ge,Ae]=r(null),Ee=n(!1),_e=n(null),Te=n(!1),ke=n(!1),Oe=n({getBoundingClientRect:()=>({x:0,y:0,width:0,height:0,top:0,left:0,right:0,bottom:0})});T(()=>(ke.current=!0,()=>{ke.current=!1}),[]);const Ce=c(e=>{ke.current&&(e&&Se(!0),setTimeout(()=>{ke.current&&(null==U||U(e),void 0===J&&we(e))},10))},[J,U]);o(()=>{if(i){if(ye){t(ee);const o=e(te),r=[...new Set([...o,i])].filter(Boolean).join(" ");null==te||te.setAttribute("aria-describedby",r)}else t(te);return()=>{t(te),t(ee)}}function e(e){var t;return(null===(t=null==e?void 0:e.getAttribute("aria-describedby"))||void 0===t?void 0:t.split(" "))||[]}function t(t){const o=e(t).filter(e=>e!==i);o.length?null==t||t.setAttribute("aria-describedby",o.join(" ")):null==t||t.removeAttribute("aria-describedby")}},[te,ye,i,ee]),o(()=>{if(void 0===J)return()=>null;J&&Se(!0);const e=setTimeout(()=>{we(J)},10);return()=>{clearTimeout(e)}},[J]),o(()=>{if(ye!==Ee.current)if(k(me),Ee.current=ye,ye)null==K||K();else{if(null===q){const e=getComputedStyle(document.body);q=(e=>{const t=e.match(/^([\d.]+)(m?s)$/);if(!t)return 0;const[,o,r]=t;return Number(o)*("ms"===r?1:1e3)})(e.getPropertyValue("--rt-transition-show-delay"))}const e=q;me.current=setTimeout(()=>{Se(!1),Ae(null),null==Y||Y()},e+25)}},[Y,K,ye]),o(()=>(k(ve),!ye||!N||N<=0||(ve.current=setTimeout(()=>{Ce(!1)},N)),()=>{k(ve)}),[te,N,Ce,ye]);const Re=c(e=>{ke.current&&he(t=>t.place===e.place&&t.tooltipStyles.left===e.tooltipStyles.left&&t.tooltipStyles.top===e.tooltipStyles.top&&t.tooltipStyles.border===e.tooltipStyles.border&&t.tooltipArrowStyles.left===e.tooltipArrowStyles.left&&t.tooltipArrowStyles.top===e.tooltipArrowStyles.top&&t.tooltipArrowStyles.right===e.tooltipArrowStyles.right&&t.tooltipArrowStyles.bottom===e.tooltipArrowStyles.bottom&&t.tooltipArrowStyles.borderBottom===e.tooltipArrowStyles.borderBottom&&t.tooltipArrowStyles.borderRight===e.tooltipArrowStyles.borderRight?t:e)},[]),xe=c((e=x)=>{de.current&&clearTimeout(de.current),be?Ce(!0):de.current=setTimeout(()=>{Ce(!0)},e)},[x,Ce,be]),Le=c((e=L)=>{pe.current&&clearTimeout(pe.current),pe.current=setTimeout(()=>{Te.current||Ce(!1)},e)},[L,Ce]),Ne=c(({x:e,y:t})=>{var o;Oe.current.getBoundingClientRect=()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t}),g({place:null!==(o=null==ge?void 0:ge.place)&&void 0!==o?o:y,offset:w,elementReference:Oe.current,tooltipReference:ue.current,tooltipArrowReference:ae.current,strategy:S,middlewares:E,border:re,arrowSize:ie}).then(e=>{Re(e)})},[null==ge?void 0:ge.place,y,w,S,E,re,ie,Re]),Be=c(()=>{var e,t;const o=null!==(e=null==ge?void 0:ge.position)&&void 0!==e?e:V;o?Ne(o):B?_e.current&&Ne(_e.current):(null==te?void 0:te.isConnected)&&g({place:null!==(t=null==ge?void 0:ge.place)&&void 0!==t?t:y,offset:w,elementReference:te,tooltipReference:ue.current,tooltipArrowReference:ae.current,strategy:S,middlewares:E,border:re,arrowSize:ie}).then(e=>{ke.current&&Re(e)})},[null==ge?void 0:ge.position,null==ge?void 0:ge.place,V,B,te,y,w,S,E,re,Ne,Re,ie]),ze=c(()=>{Se(!1),Ce(!1),oe(null),k(de),k(pe),k(ve)},[Ce,oe]),Ie=be||Q||Boolean(J)||Boolean(te)||Boolean(null==ge?void 0:ge.anchorSelect),{anchorElements:$e,selector:je}=(({id:e,anchorSelect:t,imperativeAnchorSelect:i,activeAnchor:c,disableTooltip:s,onActiveAnchorRemoved:u,trackAnchors:a})=>{const[d,p]=r([]),[v,m]=r(null),f=n(null),h=l(()=>(({id:e,anchorSelect:t,imperativeAnchorSelect:o})=>{var r;let n=null!==(r=null!=o?o:t)&&void 0!==r?r:"";return!n&&e&&(n=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),n})({id:e,anchorSelect:t,imperativeAnchorSelect:i}),[e,t,i]),y=l(()=>d.filter(e=>!(null==s?void 0:s(e))),[d,s]),w=l(()=>{if(!c||!h)return!1;try{return c.matches(h)}catch(e){return!1}},[c,h,y]);return o(()=>h&&a?H(h,(e,t)=>{p(e),m(t)}):(p([]),void m(null)),[h,a]),o(()=>{v&&f.current!==h&&(f.current=h)},[h,v]),o(()=>{c&&(c.isConnected&&(y.includes(c)||w)||u())},[c,y,w,u]),{anchorElements:y,selector:h}})({id:i,anchorSelect:f,imperativeAnchorSelect:null==ge?void 0:ge.anchorSelect,activeAnchor:te,disableTooltip:X,onActiveAnchorRemoved:ze,trackAnchors:Ie});(({activeAnchor:e,anchorElements:t,anchorSelector:r,clickable:i,closeEvents:c,delayHide:s,delayShow:u,disableTooltip:a,float:d,globalCloseEvents:p,handleHideTooltipDelayed:v,handleShow:m,handleShowTooltipDelayed:f,handleTooltipPosition:y,hoveringTooltip:w,imperativeModeOnly:b,lastFloatPosition:S,openEvents:g,openOnClick:E,setActiveAnchor:T,show:O,tooltipHideDelayTimerRef:C,tooltipRef:R,tooltipShowDelayTimerRef:x,updateTooltipPosition:L})=>{const N=n(A(e=>{},50)),B=n(A(()=>{},50)),z=n(null),I=n(null),$=n(null),j=n(null);e!==$.current&&($.current=e,z.current=_(e));const D=R.current;D!==j.current&&(j.current=D,I.current=_(D));const H=E||(null==g?void 0:g.click)||(null==g?void 0:g.dblclick)||(null==g?void 0:g.mousedown),M=l(()=>{const e=g?{...g}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};return!g&&E&&Object.assign(e,{mouseenter:!1,focus:!1,click:!0}),b&&Object.assign(e,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),e},[g,E,b]),P=l(()=>{const e=c?{...c}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};return!c&&E&&Object.assign(e,{mouseleave:!1,blur:!1}),b&&Object.assign(e,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),e},[c,E,b]),q=l(()=>{const e=p?{...p}:{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:H||!1};return b&&Object.assign(e,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1}),e},[p,H,b]),F=n(e);F.current=e;const V=n(O);V.current=O;const K=n(t);K.current=t;const Y=n(m);Y.current=m;const X=n(y);X.current=y;const G=n(L);G.current=L;const Z=n(()=>null),J=n(()=>{}),Q=n(()=>{}),U=r?function(e){const t=e.match(/^\[data-tooltip-id=(['"])((?:\\.|(?!\1).)*)\1\]$/);return t?t[2].replace(/\\(['"])/g,"$1"):null}(r):null;Z.current=e=>{var t,o;const n=e;if(!(null==n?void 0:n.isConnected))return null;if(U){const e=function(e,t){let o=e;for(;o;){if(o.dataset.tooltipId===t)return o;o=o.parentElement}return null}(n,U);if(e&&!(null==a?void 0:a(e)))return e}else if(r)try{const e=null!==(t=n.matches(r)?n:n.closest(r))&&void 0!==t?t:null;if(e&&!(null==a?void 0:a(e)))return e}catch(e){return null}return null!==(o=K.current.find(e=>e===n||e.contains(n)))&&void 0!==o?o:null},J.current=e=>{e&&(e.isConnected?(null==a?void 0:a(e))||(u?f():m(!0),u&&F.current&&e!==F.current?(x.current&&clearTimeout(x.current),x.current=setTimeout(()=>{T(e),m(!0)},u)):T(e),C.current&&clearTimeout(C.current)):T(null))},Q.current=()=>{i?v(s||100):s?v():m(!1),x.current&&clearTimeout(x.current)};const ee=N.current,te=B.current;ee.setCallback(e=>J.current(e)),te.setCallback(()=>Q.current()),o(()=>{const e=[],t=(t,o)=>{e.push(W(t,o))},o=e=>{var t;return Boolean((null==e?void 0:e.target)&&(null===(t=F.current)||void 0===t?void 0:t.contains(e.target)))},r=e=>{te.cancel(),ee(e)},n=()=>{ee.cancel(),te()},l=()=>{t("mouseover",e=>{const t=Z.current(e.target);t&&Z.current(e.relatedTarget)!==t&&r(t)})},c=()=>{t("mouseout",e=>{var t;if(!o(e))return;const r=e.relatedTarget;(null===(t=F.current)||void 0===t?void 0:t.contains(r))||n()})};M.mouseenter&&l(),P.mouseleave&&c(),M.mouseover&&l(),P.mouseout&&c(),M.focus&&t("focusin",e=>{r(Z.current(e.target))}),P.blur&&t("focusout",e=>{var t;if(!o(e))return;const r=e.relatedTarget;(null===(t=F.current)||void 0===t?void 0:t.contains(r))||n()});const s=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],u=["click","dblclick","mousedown","mouseup"],a=e=>{var t;const o=Z.current(null!==(t=null==e?void 0:e.target)&&void 0!==t?t:null);o&&(V.current&&F.current===o||J.current(o))},p=e=>{V.current&&o(e)&&Q.current()};Object.entries(M).forEach(([e,o])=>{o&&!s.includes(e)&&u.includes(e)&&t(e,a)}),Object.entries(P).forEach(([e,o])=>{o&&!s.includes(e)&&u.includes(e)&&t(e,p)}),d&&t("pointermove",e=>{const t=F.current;if(!t)return;if(Z.current(e.target)!==t)return;const o=e,r={x:o.clientX,y:o.clientY};X.current(r),S.current=r});const v=R.current,m=()=>{w.current=!0},f=()=>{w.current=!1,Q.current()},h=i&&(P.mouseout||P.mouseleave);return h&&(null==v||v.addEventListener("mouseover",m),null==v||v.addEventListener("mouseout",f)),()=>{e.forEach(e=>e()),h&&(null==v||v.removeEventListener("mouseover",m),null==v||v.removeEventListener("mouseout",f)),ee.cancel(),te.cancel()}},[M,P,d,i]),o(()=>{const t=()=>{Y.current(!1)},o=I.current,r=z.current;q.scroll&&(window.addEventListener("scroll",t),null==r||r.addEventListener("scroll",t),null==o||o.addEventListener("scroll",t));let n=null;q.resize?window.addEventListener("resize",t):e&&R.current&&(n=h(e,R.current,()=>G.current(),{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const l=e=>{"Escape"===e.key&&Y.current(!1)};q.escape&&window.addEventListener("keydown",l);const i=e=>{var t,o;if(!V.current)return;const r=e.target;(null==r?void 0:r.isConnected)&&((null===(t=R.current)||void 0===t?void 0:t.contains(r))||(null===(o=F.current)||void 0===o?void 0:o.contains(r))||K.current.some(e=>null==e?void 0:e.contains(r))||(Y.current(!1),k(x)))};return q.clickOutsideAnchor&&window.addEventListener("click",i),()=>{q.scroll&&(window.removeEventListener("scroll",t),null==r||r.removeEventListener("scroll",t),null==o||o.removeEventListener("scroll",t)),q.resize&&window.removeEventListener("resize",t),n&&n(),q.escape&&window.removeEventListener("keydown",l),q.clickOutsideAnchor&&window.removeEventListener("click",i)}},[q,e])})({activeAnchor:te,anchorElements:$e,anchorSelector:je,clickable:$,closeEvents:D,delayHide:L,delayShow:x,disableTooltip:X,float:B,globalCloseEvents:M,handleHideTooltipDelayed:Le,handleShow:Ce,handleShowTooltipDelayed:xe,handleTooltipPosition:Ne,hoveringTooltip:Te,imperativeModeOnly:P,lastFloatPosition:_e,openEvents:j,openOnClick:b,setActiveAnchor:oe,show:ye,tooltipHideDelayTimerRef:pe,tooltipRef:ue,tooltipShowDelayTimerRef:de,updateTooltipPosition:Be});const De=n(Be);De.current=Be,o(()=>{be&&Be()},[be,Be]),o(()=>{if(!be||!(null==Z?void 0:Z.current))return()=>null;let e=null;const t=new ResizeObserver(()=>{e&&clearTimeout(e),e=setTimeout(()=>{ke.current&&De.current(),e=null},0)});return t.observe(Z.current),()=>{t.disconnect(),e&&clearTimeout(e)}},[G,Z,be]),o(()=>{var e;if(!(be||Q||Boolean(J)))return;const t=(()=>{if(!te||!(null==ge?void 0:ge.anchorSelect))return!1;try{return te.matches(ge.anchorSelect)}catch(e){return!1}})();if(!te||!$e.includes(te)){if(t)return;oe(null!==(e=$e[0])&&void 0!==e?e:null)}},[te,$e,Q,null==ge?void 0:ge.anchorSelect,J,be,oe]),o(()=>(Q&&Ce(!0),()=>{k(de),k(pe),k(ve),k(me)}),[Q,Ce]),o(()=>{de.current&&(k(de),xe(x))},[x,xe]);const He=null!==(se=null==ge?void 0:ge.content)&&void 0!==se?se:G,Me=null!=He,Pe=ye&&void 0!==fe.tooltipStyles.left,We=l(()=>({...F,...fe.tooltipStyles,opacity:void 0!==ne&&Pe?ne:void 0}),[F,fe.tooltipStyles,ne,Pe]),qe=l(()=>le?`linear-gradient(to right bottom, transparent 50%, ${le} 50%)`:void 0,[le]),Fe=l(()=>({...fe.tooltipArrowStyles,background:qe,"--rt-arrow-size":`${ie}px`}),[fe.tooltipArrowStyles,qe,ie]);s(t,()=>({open:e=>{let t=null;if(null==e?void 0:e.anchorSelect){try{t=document.querySelector(e.anchorSelect)}catch(e){return}if(!t)return}t&&oe(t),Ae(null!=e?e:null),(null==e?void 0:e.delay)?xe(e.delay):Ce(!0)},close:e=>{(null==e?void 0:e.delay)?Le(e.delay):Ce(!1)},activeAnchor:te,place:fe.place,isOpen:Boolean(be&&!z&&Me&&Pe)})),o(()=>()=>{k(de),k(pe),k(ve),k(me)},[]);const Ve=be&&!z&&Me?e.createElement(R,{id:i,role:ce,className:u("react-tooltip",O.tooltip,C.tooltip,C[v],d,`react-tooltip__place-${fe.place}`,O[Pe?"show":"closing"],Pe?"react-tooltip__show":"react-tooltip__closing","fixed"===S&&O.fixed,$&&O.clickable),onTransitionEnd:e=>{k(me),ye||"opacity"!==e.propertyName||(Se(!1),Ae(null),null==Y||Y())},style:We,ref:ue},e.createElement(R,{className:u("react-tooltip-content-wrapper",O.content,C.content)},He),e.createElement(R,{className:u("react-tooltip-arrow",O.arrow,C.arrow,p,I&&O.noArrow),style:Fe,ref:ae})):null;return Ve?m?a(Ve,m):Ve:null});const V=new Map;let K=null;const Y={attributes:!0,childList:!1,subtree:!1};function X(e,t){const o=(K||(K=new MutationObserver(e=>{var t;for(const o of e){if("attributes"!==o.type||!(null===(t=o.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))continue;const e=o.target,r=V.get(e);r&&r.forEach(t=>t(e))}})),K);let r=V.get(e);return r||(r=new Set,V.set(e,r),o.observe(e,Y)),r.add(t),()=>{const r=V.get(e);r&&(r.delete(t),0===r.size&&(V.delete(e),0===V.size?o.disconnect():(o.disconnect(),V.forEach((e,t)=>{o.observe(t,Y)}))))}}const G=e.forwardRef(({id:t,anchorSelect:l,content:i,render:s,className:a,classNameArrow:d,variant:p="dark",portalRoot:v,place:m="top",offset:f=10,wrapper:h="div",children:y=null,openOnClick:w=!1,positionStrategy:b="absolute",middlewares:S,delayShow:g=0,delayHide:A=0,autoClose:E,float:_=!1,hidden:T=!1,noArrow:k=!1,clickable:O=!1,openEvents:C,closeEvents:R,globalCloseEvents:x,imperativeModeOnly:L=!1,style:N,position:B,isOpen:z,defaultIsOpen:I=!1,disableStyleInjection:$=!1,border:j,opacity:D,arrowColor:H,arrowSize:M,setIsOpen:P,afterShow:W,afterHide:q,disableTooltip:V,role:K="tooltip"},Y)=>{var G,Z,J,Q,U,ee,te,oe;const[re,ne]=r(null),[le,ie]=r({}),ce=n(null),se=n($),ue=c(e=>{ne(t=>((null==e?void 0:e.isSameNode(t))||(ce.current=t),e))},[]);o(()=>{se.current},[$]),o(()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===$,disableBase:$}}))},[]),o(()=>{if(!re)return ie({}),()=>{};const e=e=>{const t=(e=>{const t=null==e?void 0:e.getAttributeNames().reduce((t,o)=>{var r;return o.startsWith("data-tooltip-")&&(t[o.replace(/^data-tooltip-/,"")]=null!==(r=null==e?void 0:e.getAttribute(o))&&void 0!==r?r:null),t},{});return t})(e);ie(e=>{const o=Object.keys(t),r=Object.keys(e);return o.length===r.length&&o.every(o=>t[o]===e[o])?e:t})};e(re);return X(re,e)},[re,l]),o(()=>{},[j,D,null==N?void 0:N.border,null==N?void 0:N.opacity]);const ae=null!==(G=le.content)&&void 0!==G?G:i,de=null!==(Z=le.place)&&void 0!==Z?Z:m,pe=null!==(J=le.variant)&&void 0!==J?J:p,ve=null==le.offset?f:Number(le.offset),me=null!==(Q=le.wrapper)&&void 0!==Q?Q:h,fe=null!==(U=le["position-strategy"])&&void 0!==U?U:b,he=null==le["delay-show"]?g:Number(le["delay-show"]),ye=null==le["delay-hide"]?A:Number(le["delay-hide"]),we=null==le["auto-close"]?E:Number(le["auto-close"]),be=null==le.float?_:"true"===le.float,Se=null==le.hidden?T:"true"===le.hidden,ge=null!==(ee=le["class-name"])&&void 0!==ee?ee:null;let Ae=y;const Ee=n(null);if(s){const t=s({content:null!==(oe=null!==(te=le.content)&&void 0!==te?te:ae)&&void 0!==oe?oe:null,activeAnchor:re});Ae=t?e.createElement("div",{ref:Ee,className:"react-tooltip-content-wrapper"},t):null}else null!=ae&&(Ae=ae);const _e={forwardRef:Y,id:t,anchorSelect:l,className:u(a,ge),classNameArrow:d,content:Ae,contentWrapperRef:Ee,portalRoot:v,place:de,variant:pe,offset:ve,wrapper:me,openOnClick:w,positionStrategy:fe,middlewares:S,delayShow:he,delayHide:ye,autoClose:we,float:be,hidden:Se,noArrow:k,clickable:O,openEvents:C,closeEvents:R,globalCloseEvents:x,imperativeModeOnly:L,style:N,position:B,isOpen:z,defaultIsOpen:I,border:j,opacity:D,arrowColor:H,arrowSize:M,setIsOpen:P,afterShow:W,afterHide:q,disableTooltip:V,activeAnchor:re,previousActiveAnchor:ce.current,setActiveAnchor:ue,role:K};return e.createElement(F,{..._e})});var Z=i(G);"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",e=>{e.detail.disableCore||w({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;--rt-arrow-size:8px}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit;z-index:-1;-webkit-backface-visibility:hidden;backface-visibility:hidden}.core-styles-module_content__BRKdB{position:relative;z-index:1}.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;will-change:opacity}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in;will-change:opacity}`,type:"core"}),e.detail.disableBase||w({css:`
8
+ .styles-module_tooltip__mnnfp{border-radius:3px;font-size:90%;width:max-content}.styles-module_content__ydYdI{background:inherit;border-radius:inherit;padding:8px 16px}.styles-module_arrow__K0L3T{width:var(--rt-arrow-size);height:var(--rt-arrow-size)}[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"})});export{Z as Tooltip};
9
9
  //# sourceMappingURL=react-tooltip.min.mjs.map