{"version":3,"file":"TooltipButton-B_uNnvjm-chunk.js","sources":["../../../node_modules/react-tooltip/node_modules/uuid/dist/esm-browser/rng.js","../../../node_modules/react-tooltip/node_modules/uuid/dist/esm-browser/bytesToUuid.js","../../../node_modules/react-tooltip/node_modules/uuid/dist/esm-browser/v4.js","../../../node_modules/react-tooltip/dist/index.es.js","../../../src/components/utility/tooltip/TooltipOverridePosition.jsx","../../../src/components/utility/tooltip/Tooltip.jsx","../../../src/components/utility/tooltip/TooltipButton.jsx"],"sourcesContent":["// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n// find the complete implementation of crypto (msCrypto) on IE11.\nvar getRandomValues = typeof crypto != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != 'undefined' && typeof msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto);\nvar rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\nexport default function rng() {\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n\n return getRandomValues(rnds8);\n}","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex; // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n\n return [bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]]].join('');\n}\n\nexport default bytesToUuid;","import rng from './rng.js';\nimport bytesToUuid from './bytesToUuid.js';\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof options == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nexport default v4;","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { v4 } from 'uuid';\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nvar CONSTANT = {\n GLOBAL: {\n HIDE: '__react_tooltip_hide_event',\n REBUILD: '__react_tooltip_rebuild_event',\n SHOW: '__react_tooltip_show_event'\n }\n};\n\n/**\n * Static methods for react-tooltip\n */\n\nvar dispatchGlobalEvent = function dispatchGlobalEvent(eventName, opts) {\n // Compatible with IE\n // @see http://stackoverflow.com/questions/26596123/internet-explorer-9-10-11-event-constructor-doesnt-work\n // @see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent\n var event;\n\n if (typeof window.CustomEvent === 'function') {\n event = new window.CustomEvent(eventName, {\n detail: opts\n });\n } else {\n event = document.createEvent('Event');\n event.initEvent(eventName, false, true, opts);\n }\n\n window.dispatchEvent(event);\n};\n\nfunction staticMethods (target) {\n /**\n * Hide all tooltip\n * @trigger ReactTooltip.hide()\n */\n target.hide = function (target) {\n dispatchGlobalEvent(CONSTANT.GLOBAL.HIDE, {\n target: target\n });\n };\n /**\n * Rebuild all tooltip\n * @trigger ReactTooltip.rebuild()\n */\n\n\n target.rebuild = function () {\n dispatchGlobalEvent(CONSTANT.GLOBAL.REBUILD);\n };\n /**\n * Show specific tooltip\n * @trigger ReactTooltip.show()\n */\n\n\n target.show = function (target) {\n dispatchGlobalEvent(CONSTANT.GLOBAL.SHOW, {\n target: target\n });\n };\n\n target.prototype.globalRebuild = function () {\n if (this.mount) {\n this.unbindListener();\n this.bindListener();\n }\n };\n\n target.prototype.globalShow = function (event) {\n if (this.mount) {\n var hasTarget = event && event.detail && event.detail.target && true || false; // Create a fake event, specific show will limit the type to `solid`\n // only `float` type cares e.clientX e.clientY\n\n this.showTooltip({\n currentTarget: hasTarget && event.detail.target\n }, true);\n }\n };\n\n target.prototype.globalHide = function (event) {\n if (this.mount) {\n var hasTarget = event && event.detail && event.detail.target && true || false;\n this.hideTooltip({\n currentTarget: hasTarget && event.detail.target\n }, hasTarget);\n }\n };\n}\n\n/**\n * Events that should be bound to the window\n */\nfunction windowListener (target) {\n target.prototype.bindWindowEvents = function (resizeHide) {\n // ReactTooltip.hide\n window.removeEventListener(CONSTANT.GLOBAL.HIDE, this.globalHide);\n window.addEventListener(CONSTANT.GLOBAL.HIDE, this.globalHide, false); // ReactTooltip.rebuild\n\n window.removeEventListener(CONSTANT.GLOBAL.REBUILD, this.globalRebuild);\n window.addEventListener(CONSTANT.GLOBAL.REBUILD, this.globalRebuild, false); // ReactTooltip.show\n\n window.removeEventListener(CONSTANT.GLOBAL.SHOW, this.globalShow);\n window.addEventListener(CONSTANT.GLOBAL.SHOW, this.globalShow, false); // Resize\n\n if (resizeHide) {\n window.removeEventListener('resize', this.onWindowResize);\n window.addEventListener('resize', this.onWindowResize, false);\n }\n };\n\n target.prototype.unbindWindowEvents = function () {\n window.removeEventListener(CONSTANT.GLOBAL.HIDE, this.globalHide);\n window.removeEventListener(CONSTANT.GLOBAL.REBUILD, this.globalRebuild);\n window.removeEventListener(CONSTANT.GLOBAL.SHOW, this.globalShow);\n window.removeEventListener('resize', this.onWindowResize);\n };\n /**\n * invoked by resize event of window\n */\n\n\n target.prototype.onWindowResize = function () {\n if (!this.mount) return;\n this.hideTooltip();\n };\n}\n\n/**\n * Custom events to control showing and hiding of tooltip\n *\n * @attributes\n * - `event` {String}\n * - `eventOff` {String}\n */\nvar checkStatus = function checkStatus(dataEventOff, e) {\n var show = this.state.show;\n var id = this.props.id;\n var isCapture = this.isCapture(e.currentTarget);\n var currentItem = e.currentTarget.getAttribute('currentItem');\n if (!isCapture) e.stopPropagation();\n\n if (show && currentItem === 'true') {\n if (!dataEventOff) this.hideTooltip(e);\n } else {\n e.currentTarget.setAttribute('currentItem', 'true');\n setUntargetItems(e.currentTarget, this.getTargetArray(id));\n this.showTooltip(e);\n }\n};\n\nvar setUntargetItems = function setUntargetItems(currentTarget, targetArray) {\n for (var i = 0; i < targetArray.length; i++) {\n if (currentTarget !== targetArray[i]) {\n targetArray[i].setAttribute('currentItem', 'false');\n } else {\n targetArray[i].setAttribute('currentItem', 'true');\n }\n }\n};\n\nvar customListeners = {\n id: '9b69f92e-d3fe-498b-b1b4-c5e63a51b0cf',\n set: function set(target, event, listener) {\n if (this.id in target) {\n var map = target[this.id];\n map[event] = listener;\n } else {\n // this is workaround for WeakMap, which is not supported in older browsers, such as IE\n Object.defineProperty(target, this.id, {\n configurable: true,\n value: _defineProperty({}, event, listener)\n });\n }\n },\n get: function get(target, event) {\n var map = target[this.id];\n\n if (map !== undefined) {\n return map[event];\n }\n }\n};\nfunction customEvent (target) {\n target.prototype.isCustomEvent = function (ele) {\n var event = this.state.event;\n return event || !!ele.getAttribute('data-event');\n };\n /* Bind listener for custom event */\n\n\n target.prototype.customBindListener = function (ele) {\n var _this = this;\n\n var _this$state = this.state,\n event = _this$state.event,\n eventOff = _this$state.eventOff;\n var dataEvent = ele.getAttribute('data-event') || event;\n var dataEventOff = ele.getAttribute('data-event-off') || eventOff;\n dataEvent.split(' ').forEach(function (event) {\n ele.removeEventListener(event, customListeners.get(ele, event));\n var customListener = checkStatus.bind(_this, dataEventOff);\n customListeners.set(ele, event, customListener);\n ele.addEventListener(event, customListener, false);\n });\n\n if (dataEventOff) {\n dataEventOff.split(' ').forEach(function (event) {\n ele.removeEventListener(event, _this.hideTooltip);\n ele.addEventListener(event, _this.hideTooltip, false);\n });\n }\n };\n /* Unbind listener for custom event */\n\n\n target.prototype.customUnbindListener = function (ele) {\n var _this$state2 = this.state,\n event = _this$state2.event,\n eventOff = _this$state2.eventOff;\n var dataEvent = event || ele.getAttribute('data-event');\n var dataEventOff = eventOff || ele.getAttribute('data-event-off');\n ele.removeEventListener(dataEvent, customListeners.get(ele, event));\n if (dataEventOff) ele.removeEventListener(dataEventOff, this.hideTooltip);\n };\n}\n\n/**\n * Util method to judge if it should follow capture model\n */\nfunction isCapture (target) {\n target.prototype.isCapture = function (currentTarget) {\n return currentTarget && currentTarget.getAttribute('data-iscapture') === 'true' || this.props.isCapture || false;\n };\n}\n\n/**\n * Util method to get effect\n */\nfunction getEffect (target) {\n target.prototype.getEffect = function (currentTarget) {\n var dataEffect = currentTarget.getAttribute('data-effect');\n return dataEffect || this.props.effect || 'float';\n };\n}\n\n/**\n * Util method to get effect\n */\n\nvar makeProxy = function makeProxy(e) {\n var proxy = {};\n\n for (var key in e) {\n if (typeof e[key] === 'function') {\n proxy[key] = e[key].bind(e);\n } else {\n proxy[key] = e[key];\n }\n }\n\n return proxy;\n};\n\nvar bodyListener = function bodyListener(callback, options, e) {\n var _options$respectEffec = options.respectEffect,\n respectEffect = _options$respectEffec === void 0 ? false : _options$respectEffec,\n _options$customEvent = options.customEvent,\n customEvent = _options$customEvent === void 0 ? false : _options$customEvent;\n var id = this.props.id;\n var tip = e.target.getAttribute('data-tip') || null;\n var forId = e.target.getAttribute('data-for') || null;\n var target = e.target;\n\n if (this.isCustomEvent(target) && !customEvent) {\n return;\n }\n\n var isTargetBelongsToTooltip = id == null && forId == null || forId === id;\n\n if (tip != null && (!respectEffect || this.getEffect(target) === 'float') && isTargetBelongsToTooltip) {\n var proxy = makeProxy(e);\n proxy.currentTarget = target;\n callback(proxy);\n }\n};\n\nvar findCustomEvents = function findCustomEvents(targetArray, dataAttribute) {\n var events = {};\n targetArray.forEach(function (target) {\n var event = target.getAttribute(dataAttribute);\n if (event) event.split(' ').forEach(function (event) {\n return events[event] = true;\n });\n });\n return events;\n};\n\nvar getBody = function getBody() {\n return document.getElementsByTagName('body')[0];\n};\n\nfunction bodyMode (target) {\n target.prototype.isBodyMode = function () {\n return !!this.props.bodyMode;\n };\n\n target.prototype.bindBodyListener = function (targetArray) {\n var _this = this;\n\n var _this$state = this.state,\n event = _this$state.event,\n eventOff = _this$state.eventOff,\n possibleCustomEvents = _this$state.possibleCustomEvents,\n possibleCustomEventsOff = _this$state.possibleCustomEventsOff;\n var body = getBody();\n var customEvents = findCustomEvents(targetArray, 'data-event');\n var customEventsOff = findCustomEvents(targetArray, 'data-event-off');\n if (event != null) customEvents[event] = true;\n if (eventOff != null) customEventsOff[eventOff] = true;\n possibleCustomEvents.split(' ').forEach(function (event) {\n return customEvents[event] = true;\n });\n possibleCustomEventsOff.split(' ').forEach(function (event) {\n return customEventsOff[event] = true;\n });\n this.unbindBodyListener(body);\n var listeners = this.bodyModeListeners = {};\n\n if (event == null) {\n listeners.mouseover = bodyListener.bind(this, this.showTooltip, {});\n listeners.mousemove = bodyListener.bind(this, this.updateTooltip, {\n respectEffect: true\n });\n listeners.mouseout = bodyListener.bind(this, this.hideTooltip, {});\n }\n\n for (var _event in customEvents) {\n listeners[_event] = bodyListener.bind(this, function (e) {\n var targetEventOff = e.currentTarget.getAttribute('data-event-off') || eventOff;\n checkStatus.call(_this, targetEventOff, e);\n }, {\n customEvent: true\n });\n }\n\n for (var _event2 in customEventsOff) {\n listeners[_event2] = bodyListener.bind(this, this.hideTooltip, {\n customEvent: true\n });\n }\n\n for (var _event3 in listeners) {\n body.addEventListener(_event3, listeners[_event3]);\n }\n };\n\n target.prototype.unbindBodyListener = function (body) {\n body = body || getBody();\n var listeners = this.bodyModeListeners;\n\n for (var event in listeners) {\n body.removeEventListener(event, listeners[event]);\n }\n };\n}\n\n/**\n * Tracking target removing from DOM.\n * It's necessary to hide tooltip when it's target disappears.\n * Otherwise, the tooltip would be shown forever until another target\n * is triggered.\n *\n * If MutationObserver is not available, this feature just doesn't work.\n */\n// https://hacks.mozilla.org/2012/05/dom-mutationobserver-reacting-to-dom-changes-without-killing-browser-performance/\nvar getMutationObserverClass = function getMutationObserverClass() {\n return window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;\n};\n\nfunction trackRemoval (target) {\n target.prototype.bindRemovalTracker = function () {\n var _this = this;\n\n var MutationObserver = getMutationObserverClass();\n if (MutationObserver == null) return;\n var observer = new MutationObserver(function (mutations) {\n for (var m1 = 0; m1 < mutations.length; m1++) {\n var mutation = mutations[m1];\n\n for (var m2 = 0; m2 < mutation.removedNodes.length; m2++) {\n var element = mutation.removedNodes[m2];\n\n if (element === _this.state.currentTarget) {\n _this.hideTooltip();\n\n return;\n }\n }\n }\n });\n observer.observe(window.document, {\n childList: true,\n subtree: true\n });\n this.removalTracker = observer;\n };\n\n target.prototype.unbindRemovalTracker = function () {\n if (this.removalTracker) {\n this.removalTracker.disconnect();\n this.removalTracker = null;\n }\n };\n}\n\n/**\n * Calculate the position of tooltip\n *\n * @params\n * - `e` {Event} the event of current mouse\n * - `target` {Element} the currentTarget of the event\n * - `node` {DOM} the react-tooltip object\n * - `place` {String} top / right / bottom / left\n * - `effect` {String} float / solid\n * - `offset` {Object} the offset to default position\n *\n * @return {Object}\n * - `isNewState` {Bool} required\n * - `newState` {Object}\n * - `position` {Object} {left: {Number}, top: {Number}}\n */\nfunction getPosition (e, target, node, place, desiredPlace, effect, offset) {\n var _getDimensions = getDimensions(node),\n tipWidth = _getDimensions.width,\n tipHeight = _getDimensions.height;\n\n var _getDimensions2 = getDimensions(target),\n targetWidth = _getDimensions2.width,\n targetHeight = _getDimensions2.height;\n\n var _getCurrentOffset = getCurrentOffset(e, target, effect),\n mouseX = _getCurrentOffset.mouseX,\n mouseY = _getCurrentOffset.mouseY;\n\n var defaultOffset = getDefaultPosition(effect, targetWidth, targetHeight, tipWidth, tipHeight);\n\n var _calculateOffset = calculateOffset(offset),\n extraOffsetX = _calculateOffset.extraOffsetX,\n extraOffsetY = _calculateOffset.extraOffsetY;\n\n var windowWidth = window.innerWidth;\n var windowHeight = window.innerHeight;\n\n var _getParent = getParent(node),\n parentTop = _getParent.parentTop,\n parentLeft = _getParent.parentLeft; // Get the edge offset of the tooltip\n\n\n var getTipOffsetLeft = function getTipOffsetLeft(place) {\n var offsetX = defaultOffset[place].l;\n return mouseX + offsetX + extraOffsetX;\n };\n\n var getTipOffsetRight = function getTipOffsetRight(place) {\n var offsetX = defaultOffset[place].r;\n return mouseX + offsetX + extraOffsetX;\n };\n\n var getTipOffsetTop = function getTipOffsetTop(place) {\n var offsetY = defaultOffset[place].t;\n return mouseY + offsetY + extraOffsetY;\n };\n\n var getTipOffsetBottom = function getTipOffsetBottom(place) {\n var offsetY = defaultOffset[place].b;\n return mouseY + offsetY + extraOffsetY;\n }; //\n // Functions to test whether the tooltip's sides are inside\n // the client window for a given orientation p\n //\n // _____________\n // | | <-- Right side\n // | p = 'left' |\\\n // | |/ |\\\n // |_____________| |_\\ <-- Mouse\n // / \\ |\n // |\n // |\n // Bottom side\n //\n\n\n var outsideLeft = function outsideLeft(p) {\n return getTipOffsetLeft(p) < 0;\n };\n\n var outsideRight = function outsideRight(p) {\n return getTipOffsetRight(p) > windowWidth;\n };\n\n var outsideTop = function outsideTop(p) {\n return getTipOffsetTop(p) < 0;\n };\n\n var outsideBottom = function outsideBottom(p) {\n return getTipOffsetBottom(p) > windowHeight;\n }; // Check whether the tooltip with orientation p is completely inside the client window\n\n\n var outside = function outside(p) {\n return outsideLeft(p) || outsideRight(p) || outsideTop(p) || outsideBottom(p);\n };\n\n var inside = function inside(p) {\n return !outside(p);\n };\n\n var placesList = ['top', 'bottom', 'left', 'right'];\n var insideList = [];\n\n for (var i = 0; i < 4; i++) {\n var p = placesList[i];\n\n if (inside(p)) {\n insideList.push(p);\n }\n }\n\n var isNewState = false;\n var newPlace;\n var shouldUpdatePlace = desiredPlace !== place;\n\n if (inside(desiredPlace) && shouldUpdatePlace) {\n isNewState = true;\n newPlace = desiredPlace;\n } else if (insideList.length > 0 && outside(desiredPlace) && outside(place)) {\n isNewState = true;\n newPlace = insideList[0];\n }\n\n if (isNewState) {\n return {\n isNewState: true,\n newState: {\n place: newPlace\n }\n };\n }\n\n return {\n isNewState: false,\n position: {\n left: parseInt(getTipOffsetLeft(place) - parentLeft, 10),\n top: parseInt(getTipOffsetTop(place) - parentTop, 10)\n }\n };\n}\n\nvar getDimensions = function getDimensions(node) {\n var _node$getBoundingClie = node.getBoundingClientRect(),\n height = _node$getBoundingClie.height,\n width = _node$getBoundingClie.width;\n\n return {\n height: parseInt(height, 10),\n width: parseInt(width, 10)\n };\n}; // Get current mouse offset\n\n\nvar getCurrentOffset = function getCurrentOffset(e, currentTarget, effect) {\n var boundingClientRect = currentTarget.getBoundingClientRect();\n var targetTop = boundingClientRect.top;\n var targetLeft = boundingClientRect.left;\n\n var _getDimensions3 = getDimensions(currentTarget),\n targetWidth = _getDimensions3.width,\n targetHeight = _getDimensions3.height;\n\n if (effect === 'float') {\n return {\n mouseX: e.clientX,\n mouseY: e.clientY\n };\n }\n\n return {\n mouseX: targetLeft + targetWidth / 2,\n mouseY: targetTop + targetHeight / 2\n };\n}; // List all possibility of tooltip final offset\n// This is useful in judging if it is necessary for tooltip to switch position when out of window\n\n\nvar getDefaultPosition = function getDefaultPosition(effect, targetWidth, targetHeight, tipWidth, tipHeight) {\n var top;\n var right;\n var bottom;\n var left;\n var disToMouse = 3;\n var triangleHeight = 2;\n var cursorHeight = 12; // Optimize for float bottom only, cause the cursor will hide the tooltip\n\n if (effect === 'float') {\n top = {\n l: -(tipWidth / 2),\n r: tipWidth / 2,\n t: -(tipHeight + disToMouse + triangleHeight),\n b: -disToMouse\n };\n bottom = {\n l: -(tipWidth / 2),\n r: tipWidth / 2,\n t: disToMouse + cursorHeight,\n b: tipHeight + disToMouse + triangleHeight + cursorHeight\n };\n left = {\n l: -(tipWidth + disToMouse + triangleHeight),\n r: -disToMouse,\n t: -(tipHeight / 2),\n b: tipHeight / 2\n };\n right = {\n l: disToMouse,\n r: tipWidth + disToMouse + triangleHeight,\n t: -(tipHeight / 2),\n b: tipHeight / 2\n };\n } else if (effect === 'solid') {\n top = {\n l: -(tipWidth / 2),\n r: tipWidth / 2,\n t: -(targetHeight / 2 + tipHeight + triangleHeight),\n b: -(targetHeight / 2)\n };\n bottom = {\n l: -(tipWidth / 2),\n r: tipWidth / 2,\n t: targetHeight / 2,\n b: targetHeight / 2 + tipHeight + triangleHeight\n };\n left = {\n l: -(tipWidth + targetWidth / 2 + triangleHeight),\n r: -(targetWidth / 2),\n t: -(tipHeight / 2),\n b: tipHeight / 2\n };\n right = {\n l: targetWidth / 2,\n r: tipWidth + targetWidth / 2 + triangleHeight,\n t: -(tipHeight / 2),\n b: tipHeight / 2\n };\n }\n\n return {\n top: top,\n bottom: bottom,\n left: left,\n right: right\n };\n}; // Consider additional offset into position calculation\n\n\nvar calculateOffset = function calculateOffset(offset) {\n var extraOffsetX = 0;\n var extraOffsetY = 0;\n\n if (Object.prototype.toString.apply(offset) === '[object String]') {\n offset = JSON.parse(offset.toString().replace(/'/g, '\"'));\n }\n\n for (var key in offset) {\n if (key === 'top') {\n extraOffsetY -= parseInt(offset[key], 10);\n } else if (key === 'bottom') {\n extraOffsetY += parseInt(offset[key], 10);\n } else if (key === 'left') {\n extraOffsetX -= parseInt(offset[key], 10);\n } else if (key === 'right') {\n extraOffsetX += parseInt(offset[key], 10);\n }\n }\n\n return {\n extraOffsetX: extraOffsetX,\n extraOffsetY: extraOffsetY\n };\n}; // Get the offset of the parent elements\n\n\nvar getParent = function getParent(currentTarget) {\n var currentParent = currentTarget;\n\n while (currentParent) {\n var computedStyle = window.getComputedStyle(currentParent); // transform and will-change: transform change the containing block\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_Block\n\n if (computedStyle.getPropertyValue('transform') !== 'none' || computedStyle.getPropertyValue('will-change') === 'transform') break;\n currentParent = currentParent.parentElement;\n }\n\n var parentTop = currentParent && currentParent.getBoundingClientRect().top || 0;\n var parentLeft = currentParent && currentParent.getBoundingClientRect().left || 0;\n return {\n parentTop: parentTop,\n parentLeft: parentLeft\n };\n};\n\n/**\n * To get the tooltip content\n * it may comes from data-tip or this.props.children\n * it should support multiline\n *\n * @params\n * - `tip` {String} value of data-tip\n * - `children` {ReactElement} this.props.children\n * - `multiline` {Any} could be Bool(true/false) or String('true'/'false')\n *\n * @return\n * - String or react component\n */\nfunction getTipContent (tip, children, getContent, multiline) {\n if (children) return children;\n if (getContent !== undefined && getContent !== null) return getContent; // getContent can be 0, '', etc.\n\n if (getContent === null) return null; // Tip not exist and children is null or undefined\n\n var regexp = /
/;\n\n if (!multiline || multiline === 'false' || !regexp.test(tip)) {\n // No trim(), so that user can keep their input\n return tip;\n } // Multiline tooltip content\n\n\n return tip.split(regexp).map(function (d, i) {\n return React.createElement(\"span\", {\n key: i,\n className: \"multi-line\"\n }, d);\n });\n}\n\n/**\n * Support aria- and role in ReactTooltip\n *\n * @params props {Object}\n * @return {Object}\n */\nfunction parseAria(props) {\n var ariaObj = {};\n Object.keys(props).filter(function (prop) {\n // aria-xxx and role is acceptable\n return /(^aria-\\w+$|^role$)/.test(prop);\n }).forEach(function (prop) {\n ariaObj[prop] = props[prop];\n });\n return ariaObj;\n}\n\n/**\n * Convert nodelist to array\n * @see https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/core/createArrayFromMixed.js#L24\n * NodeLists are functions in Safari\n */\nfunction nodeListToArray (nodeList) {\n var length = nodeList.length;\n\n if (nodeList.hasOwnProperty) {\n return Array.prototype.slice.call(nodeList);\n }\n\n return new Array(length).fill().map(function (index) {\n return nodeList[index];\n });\n}\n\nfunction generateUUID() {\n return 't' + v4();\n}\n\nvar baseCss = \".__react_component_tooltip {\\n border-radius: 3px;\\n display: inline-block;\\n font-size: 13px;\\n left: -999em;\\n opacity: 0;\\n padding: 8px 21px;\\n position: fixed;\\n pointer-events: none;\\n transition: opacity 0.3s ease-out;\\n top: -999em;\\n visibility: hidden;\\n z-index: 999;\\n}\\n.__react_component_tooltip.allow_hover, .__react_component_tooltip.allow_click {\\n pointer-events: auto;\\n}\\n.__react_component_tooltip::before, .__react_component_tooltip::after {\\n content: \\\"\\\";\\n width: 0;\\n height: 0;\\n position: absolute;\\n}\\n.__react_component_tooltip.show {\\n opacity: 0.9;\\n margin-top: 0;\\n margin-left: 0;\\n visibility: visible;\\n}\\n.__react_component_tooltip.place-top::before {\\n border-left: 10px solid transparent;\\n border-right: 10px solid transparent;\\n bottom: -8px;\\n left: 50%;\\n margin-left: -10px;\\n}\\n.__react_component_tooltip.place-bottom::before {\\n border-left: 10px solid transparent;\\n border-right: 10px solid transparent;\\n top: -8px;\\n left: 50%;\\n margin-left: -10px;\\n}\\n.__react_component_tooltip.place-left::before {\\n border-top: 6px solid transparent;\\n border-bottom: 6px solid transparent;\\n right: -8px;\\n top: 50%;\\n margin-top: -5px;\\n}\\n.__react_component_tooltip.place-right::before {\\n border-top: 6px solid transparent;\\n border-bottom: 6px solid transparent;\\n left: -8px;\\n top: 50%;\\n margin-top: -5px;\\n}\\n.__react_component_tooltip .multi-line {\\n display: block;\\n padding: 2px 0;\\n text-align: center;\\n}\";\n\n/**\n * Default pop-up style values (text color, background color).\n */\nvar defaultColors = {\n dark: {\n text: '#fff',\n background: '#222',\n border: 'transparent',\n arrow: '#222'\n },\n success: {\n text: '#fff',\n background: '#8DC572',\n border: 'transparent',\n arrow: '#8DC572'\n },\n warning: {\n text: '#fff',\n background: '#F0AD4E',\n border: 'transparent',\n arrow: '#F0AD4E'\n },\n error: {\n text: '#fff',\n background: '#BE6464',\n border: 'transparent',\n arrow: '#BE6464'\n },\n info: {\n text: '#fff',\n background: '#337AB7',\n border: 'transparent',\n arrow: '#337AB7'\n },\n light: {\n text: '#222',\n background: '#fff',\n border: 'transparent',\n arrow: '#fff'\n }\n};\nfunction getDefaultPopupColors(type) {\n return defaultColors[type] ? _objectSpread2({}, defaultColors[type]) : undefined;\n}\n\n/**\n * Generates the specific tooltip style for use on render.\n */\n\nfunction generateTooltipStyle(uuid, customColors, type, hasBorder) {\n return generateStyle(uuid, getPopupColors(customColors, type, hasBorder));\n}\n/**\n * Generates the tooltip style rules based on the element-specified \"data-type\" property.\n */\n\nfunction generateStyle(uuid, colors) {\n var textColor = colors.text;\n var backgroundColor = colors.background;\n var borderColor = colors.border;\n var arrowColor = colors.arrow;\n return \"\\n \\t.\".concat(uuid, \" {\\n\\t color: \").concat(textColor, \";\\n\\t background: \").concat(backgroundColor, \";\\n\\t border: 1px solid \").concat(borderColor, \";\\n \\t}\\n\\n \\t.\").concat(uuid, \".place-top {\\n margin-top: -10px;\\n }\\n .\").concat(uuid, \".place-top::before {\\n border-top: 8px solid \").concat(borderColor, \";\\n }\\n .\").concat(uuid, \".place-top::after {\\n border-left: 8px solid transparent;\\n border-right: 8px solid transparent;\\n bottom: -6px;\\n left: 50%;\\n margin-left: -8px;\\n border-top-color: \").concat(arrowColor, \";\\n border-top-style: solid;\\n border-top-width: 6px;\\n }\\n\\n .\").concat(uuid, \".place-bottom {\\n margin-top: 10px;\\n }\\n .\").concat(uuid, \".place-bottom::before {\\n border-bottom: 8px solid \").concat(borderColor, \";\\n }\\n .\").concat(uuid, \".place-bottom::after {\\n border-left: 8px solid transparent;\\n border-right: 8px solid transparent;\\n top: -6px;\\n left: 50%;\\n margin-left: -8px;\\n border-bottom-color: \").concat(arrowColor, \";\\n border-bottom-style: solid;\\n border-bottom-width: 6px;\\n }\\n\\n .\").concat(uuid, \".place-left {\\n margin-left: -10px;\\n }\\n .\").concat(uuid, \".place-left::before {\\n border-left: 8px solid \").concat(borderColor, \";\\n }\\n .\").concat(uuid, \".place-left::after {\\n border-top: 5px solid transparent;\\n border-bottom: 5px solid transparent;\\n right: -6px;\\n top: 50%;\\n margin-top: -4px;\\n border-left-color: \").concat(arrowColor, \";\\n border-left-style: solid;\\n border-left-width: 6px;\\n }\\n\\n .\").concat(uuid, \".place-right {\\n margin-left: 10px;\\n }\\n .\").concat(uuid, \".place-right::before {\\n border-right: 8px solid \").concat(borderColor, \";\\n }\\n .\").concat(uuid, \".place-right::after {\\n border-top: 5px solid transparent;\\n border-bottom: 5px solid transparent;\\n left: -6px;\\n top: 50%;\\n margin-top: -4px;\\n border-right-color: \").concat(arrowColor, \";\\n border-right-style: solid;\\n border-right-width: 6px;\\n }\\n \");\n}\n\nfunction getPopupColors(customColors, type, hasBorder) {\n var textColor = customColors.text;\n var backgroundColor = customColors.background;\n var borderColor = customColors.border;\n var arrowColor = customColors.arrow ? customColors.arrow : customColors.background;\n var colors = getDefaultPopupColors(type);\n\n if (textColor) {\n colors.text = textColor;\n }\n\n if (backgroundColor) {\n colors.background = backgroundColor;\n }\n\n if (hasBorder) {\n if (borderColor) {\n colors.border = borderColor;\n } else {\n colors.border = type === 'light' ? 'black' : 'white';\n }\n }\n\n if (arrowColor) {\n colors.arrow = arrowColor;\n }\n\n return colors;\n}\n\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\nvar check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global_1 =\n // eslint-disable-next-line es/no-global-this -- safe\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n // eslint-disable-next-line no-restricted-globals -- safe\n check(typeof self == 'object' && self) ||\n check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||\n // eslint-disable-next-line no-new-func -- fallback\n (function () { return this; })() || Function('return this')();\n\nvar fails = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n\n// Detect IE8's incomplete defineProperty implementation\nvar descriptors = !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nvar f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;\n\nvar objectPropertyIsEnumerable = {\n\tf: f\n};\n\nvar createPropertyDescriptor = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n\nvar toString = {}.toString;\n\nvar classofRaw = function (it) {\n return toString.call(it).slice(8, -1);\n};\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar indexedObject = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins -- safe\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n\n// `RequireObjectCoercible` abstract operation\n// https://tc39.es/ecma262/#sec-requireobjectcoercible\nvar requireObjectCoercible = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n\n// toObject with fallback for non-array-like ES3 strings\n\n\n\nvar toIndexedObject = function (it) {\n return indexedObject(requireObjectCoercible(it));\n};\n\nvar isObject = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\n// `ToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-toprimitive\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nvar toPrimitive = function (input, PREFERRED_STRING) {\n if (!isObject(input)) return input;\n var fn, val;\n if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;\n if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nvar toObject = function (argument) {\n return Object(requireObjectCoercible(argument));\n};\n\nvar hasOwnProperty = {}.hasOwnProperty;\n\nvar has = function hasOwn(it, key) {\n return hasOwnProperty.call(toObject(it), key);\n};\n\nvar document$1 = global_1.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document$1) && isObject(document$1.createElement);\n\nvar documentCreateElement = function (it) {\n return EXISTS ? document$1.createElement(it) : {};\n};\n\n// Thank's IE8 for his funny defineProperty\nvar ie8DomDefine = !descriptors && !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- requied for testing\n return Object.defineProperty(documentCreateElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\nvar f$1 = descriptors ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPrimitive(P, true);\n if (ie8DomDefine) try {\n return $getOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);\n};\n\nvar objectGetOwnPropertyDescriptor = {\n\tf: f$1\n};\n\nvar anObject = function (it) {\n if (!isObject(it)) {\n throw TypeError(String(it) + ' is not an object');\n } return it;\n};\n\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar $defineProperty = Object.defineProperty;\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\nvar f$2 = descriptors ? $defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (ie8DomDefine) try {\n return $defineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n\nvar objectDefineProperty = {\n\tf: f$2\n};\n\nvar createNonEnumerableProperty = descriptors ? function (object, key, value) {\n return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n\nvar setGlobal = function (key, value) {\n try {\n createNonEnumerableProperty(global_1, key, value);\n } catch (error) {\n global_1[key] = value;\n } return value;\n};\n\nvar SHARED = '__core-js_shared__';\nvar store = global_1[SHARED] || setGlobal(SHARED, {});\n\nvar sharedStore = store;\n\nvar functionToString = Function.toString;\n\n// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper\nif (typeof sharedStore.inspectSource != 'function') {\n sharedStore.inspectSource = function (it) {\n return functionToString.call(it);\n };\n}\n\nvar inspectSource = sharedStore.inspectSource;\n\nvar WeakMap = global_1.WeakMap;\n\nvar nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));\n\nvar shared = createCommonjsModule(function (module) {\n(module.exports = function (key, value) {\n return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.12.1',\n mode: 'global',\n copyright: '© 2021 Denis Pushkarev (zloirock.ru)'\n});\n});\n\nvar id = 0;\nvar postfix = Math.random();\n\nvar uid = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n\nvar keys = shared('keys');\n\nvar sharedKey = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n\nvar hiddenKeys = {};\n\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar WeakMap$1 = global_1.WeakMap;\nvar set, get, has$1;\n\nvar enforce = function (it) {\n return has$1(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (nativeWeakMap || sharedStore.state) {\n var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$1());\n var wmget = store$1.get;\n var wmhas = store$1.has;\n var wmset = store$1.set;\n set = function (it, metadata) {\n if (wmhas.call(store$1, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n wmset.call(store$1, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget.call(store$1, it) || {};\n };\n has$1 = function (it) {\n return wmhas.call(store$1, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n if (has(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return has(it, STATE) ? it[STATE] : {};\n };\n has$1 = function (it) {\n return has(it, STATE);\n };\n}\n\nvar internalState = {\n set: set,\n get: get,\n has: has$1,\n enforce: enforce,\n getterFor: getterFor\n};\n\nvar redefine = createCommonjsModule(function (module) {\nvar getInternalState = internalState.get;\nvar enforceInternalState = internalState.enforce;\nvar TEMPLATE = String(String).split('String');\n\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n var state;\n if (typeof value == 'function') {\n if (typeof key == 'string' && !has(value, 'name')) {\n createNonEnumerableProperty(value, 'name', key);\n }\n state = enforceInternalState(value);\n if (!state.source) {\n state.source = TEMPLATE.join(typeof key == 'string' ? key : '');\n }\n }\n if (O === global_1) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else createNonEnumerableProperty(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return typeof this == 'function' && getInternalState(this).source || inspectSource(this);\n});\n});\n\nvar path = global_1;\n\nvar aFunction = function (variable) {\n return typeof variable == 'function' ? variable : undefined;\n};\n\nvar getBuiltIn = function (namespace, method) {\n return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace])\n : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];\n};\n\nvar ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToInteger` abstract operation\n// https://tc39.es/ecma262/#sec-tointeger\nvar toInteger = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.es/ecma262/#sec-tolength\nvar toLength = function (argument) {\n return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n\nvar max = Math.max;\nvar min$1 = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nvar toAbsoluteIndex = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min$1(integer, length);\n};\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare -- NaN check\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare -- NaN check\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nvar arrayIncludes = {\n // `Array.prototype.includes` method\n // https://tc39.es/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.es/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n\nvar indexOf = arrayIncludes.indexOf;\n\n\nvar objectKeysInternal = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n return result;\n};\n\n// IE8- don't enum bug keys\nvar enumBugKeys = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n\nvar hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\n// eslint-disable-next-line es/no-object-getownpropertynames -- safe\nvar f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return objectKeysInternal(O, hiddenKeys$1);\n};\n\nvar objectGetOwnPropertyNames = {\n\tf: f$3\n};\n\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe\nvar f$4 = Object.getOwnPropertySymbols;\n\nvar objectGetOwnPropertySymbols = {\n\tf: f$4\n};\n\n// all object keys, includes non-enumerable and symbols\nvar ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = objectGetOwnPropertyNames.f(anObject(it));\n var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;\n return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;\n};\n\nvar copyConstructorProperties = function (target, source) {\n var keys = ownKeys$1(source);\n var defineProperty = objectDefineProperty.f;\n var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : typeof detection == 'function' ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nvar isForced_1 = isForced;\n\nvar getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;\n\n\n\n\n\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n*/\nvar _export = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global_1;\n } else if (STATIC) {\n target = global_1[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global_1[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor$1(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n};\n\nvar aFunction$1 = function (it) {\n if (typeof it != 'function') {\n throw TypeError(String(it) + ' is not a function');\n } return it;\n};\n\n// optional / simple context binding\nvar functionBindContext = function (fn, that, length) {\n aFunction$1(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 0: return function () {\n return fn.call(that);\n };\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n\n// `IsArray` abstract operation\n// https://tc39.es/ecma262/#sec-isarray\n// eslint-disable-next-line es/no-array-isarray -- safe\nvar isArray = Array.isArray || function isArray(arg) {\n return classofRaw(arg) == 'Array';\n};\n\nvar engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';\n\nvar process = global_1.process;\nvar versions = process && process.versions;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n version = match[0] < 4 ? 1 : match[0] + match[1];\n} else if (engineUserAgent) {\n match = engineUserAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = engineUserAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = match[1];\n }\n}\n\nvar engineV8Version = version && +version;\n\n/* eslint-disable es/no-symbol -- required for testing */\n\n\n\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing\nvar nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {\n return !String(Symbol()) ||\n // Chrome 38 Symbol has incorrect toString conversion\n // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n !Symbol.sham && engineV8Version && engineV8Version < 41;\n});\n\n/* eslint-disable es/no-symbol -- required for testing */\n\n\nvar useSymbolAsUid = nativeSymbol\n && !Symbol.sham\n && typeof Symbol.iterator == 'symbol';\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol$1 = global_1.Symbol;\nvar createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;\n\nvar wellKnownSymbol = function (name) {\n if (!has(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {\n if (nativeSymbol && has(Symbol$1, name)) {\n WellKnownSymbolsStore[name] = Symbol$1[name];\n } else {\n WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);\n }\n } return WellKnownSymbolsStore[name];\n};\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nvar arraySpeciesCreate = function (originalArray, length) {\n var C;\n if (isArray(originalArray)) {\n C = originalArray.constructor;\n // cross-realm fallback\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);\n};\n\nvar push = [].push;\n\n// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation\nvar createMethod$1 = function (TYPE) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var IS_FILTER_OUT = TYPE == 7;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n return function ($this, callbackfn, that, specificCreate) {\n var O = toObject($this);\n var self = indexedObject(O);\n var boundFunction = functionBindContext(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var create = specificCreate || arraySpeciesCreate;\n var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;\n var value, result;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n value = self[index];\n result = boundFunction(value, index, O);\n if (TYPE) {\n if (IS_MAP) target[index] = result; // map\n else if (result) switch (TYPE) {\n case 3: return true; // some\n case 5: return value; // find\n case 6: return index; // findIndex\n case 2: push.call(target, value); // filter\n } else switch (TYPE) {\n case 4: return false; // every\n case 7: push.call(target, value); // filterOut\n }\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n };\n};\n\nvar arrayIteration = {\n // `Array.prototype.forEach` method\n // https://tc39.es/ecma262/#sec-array.prototype.foreach\n forEach: createMethod$1(0),\n // `Array.prototype.map` method\n // https://tc39.es/ecma262/#sec-array.prototype.map\n map: createMethod$1(1),\n // `Array.prototype.filter` method\n // https://tc39.es/ecma262/#sec-array.prototype.filter\n filter: createMethod$1(2),\n // `Array.prototype.some` method\n // https://tc39.es/ecma262/#sec-array.prototype.some\n some: createMethod$1(3),\n // `Array.prototype.every` method\n // https://tc39.es/ecma262/#sec-array.prototype.every\n every: createMethod$1(4),\n // `Array.prototype.find` method\n // https://tc39.es/ecma262/#sec-array.prototype.find\n find: createMethod$1(5),\n // `Array.prototype.findIndex` method\n // https://tc39.es/ecma262/#sec-array.prototype.findIndex\n findIndex: createMethod$1(6),\n // `Array.prototype.filterOut` method\n // https://github.com/tc39/proposal-array-filtering\n filterOut: createMethod$1(7)\n};\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n// eslint-disable-next-line es/no-object-keys -- safe\nvar objectKeys = Object.keys || function keys(O) {\n return objectKeysInternal(O, enumBugKeys);\n};\n\n// `Object.defineProperties` method\n// https://tc39.es/ecma262/#sec-object.defineproperties\n// eslint-disable-next-line es/no-object-defineproperties -- safe\nvar objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);\n return O;\n};\n\nvar html = getBuiltIn('document', 'documentElement');\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n /* global ActiveXObject -- old IE */\n activeXDocument = document.domain && new ActiveXObject('htmlfile');\n } catch (error) { /* ignore */ }\n NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\nvar objectCreate = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : objectDefineProperties(result, Properties);\n};\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\n\n// Array.prototype[@@unscopables]\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\nif (ArrayPrototype[UNSCOPABLES] == undefined) {\n objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {\n configurable: true,\n value: objectCreate(null)\n });\n}\n\n// add a key to Array.prototype[@@unscopables]\nvar addToUnscopables = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n};\n\nvar $find = arrayIteration.find;\n\n\nvar FIND = 'find';\nvar SKIPS_HOLES = true;\n\n// Shouldn't skip holes\nif (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });\n\n// `Array.prototype.find` method\n// https://tc39.es/ecma262/#sec-array.prototype.find\n_export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {\n find: function find(callbackfn /* , that = undefined */) {\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables(FIND);\n\nvar _class, _class2, _temp;\n\nvar ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_class = isCapture(_class = getEffect(_class = bodyMode(_class = trackRemoval(_class = (_temp = _class2 =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(ReactTooltip, _React$Component);\n\n _createClass(ReactTooltip, null, [{\n key: \"propTypes\",\n get: function get() {\n return {\n uuid: PropTypes.string,\n children: PropTypes.any,\n place: PropTypes.string,\n type: PropTypes.string,\n effect: PropTypes.string,\n offset: PropTypes.object,\n multiline: PropTypes.bool,\n border: PropTypes.bool,\n textColor: PropTypes.string,\n backgroundColor: PropTypes.string,\n borderColor: PropTypes.string,\n arrowColor: PropTypes.string,\n insecure: PropTypes.bool,\n \"class\": PropTypes.string,\n className: PropTypes.string,\n id: PropTypes.string,\n html: PropTypes.bool,\n delayHide: PropTypes.number,\n delayUpdate: PropTypes.number,\n delayShow: PropTypes.number,\n event: PropTypes.string,\n eventOff: PropTypes.string,\n isCapture: PropTypes.bool,\n globalEventOff: PropTypes.string,\n getContent: PropTypes.any,\n afterShow: PropTypes.func,\n afterHide: PropTypes.func,\n overridePosition: PropTypes.func,\n disable: PropTypes.bool,\n scrollHide: PropTypes.bool,\n resizeHide: PropTypes.bool,\n wrapper: PropTypes.string,\n bodyMode: PropTypes.bool,\n possibleCustomEvents: PropTypes.string,\n possibleCustomEventsOff: PropTypes.string,\n clickable: PropTypes.bool\n };\n }\n }]);\n\n function ReactTooltip(props) {\n var _this;\n\n _classCallCheck(this, ReactTooltip);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(ReactTooltip).call(this, props));\n _this.state = {\n uuid: props.uuid || generateUUID(),\n place: props.place || 'top',\n // Direction of tooltip\n desiredPlace: props.place || 'top',\n type: 'dark',\n // Color theme of tooltip\n effect: 'float',\n // float or fixed\n show: false,\n border: false,\n customColors: {},\n offset: {},\n extraClass: '',\n html: false,\n delayHide: 0,\n delayShow: 0,\n event: props.event || null,\n eventOff: props.eventOff || null,\n currentEvent: null,\n // Current mouse event\n currentTarget: null,\n // Current target of mouse event\n ariaProps: parseAria(props),\n // aria- and role attributes\n isEmptyTip: false,\n disable: false,\n possibleCustomEvents: props.possibleCustomEvents || '',\n possibleCustomEventsOff: props.possibleCustomEventsOff || '',\n originTooltip: null,\n isMultiline: false\n };\n\n _this.bind(['showTooltip', 'updateTooltip', 'hideTooltip', 'hideTooltipOnScroll', 'getTooltipContent', 'globalRebuild', 'globalShow', 'globalHide', 'onWindowResize', 'mouseOnToolTip']);\n\n _this.mount = true;\n _this.delayShowLoop = null;\n _this.delayHideLoop = null;\n _this.delayReshow = null;\n _this.intervalUpdateContent = null;\n return _this;\n }\n /**\n * For unify the bind and unbind listener\n */\n\n\n _createClass(ReactTooltip, [{\n key: \"bind\",\n value: function bind(methodArray) {\n var _this2 = this;\n\n methodArray.forEach(function (method) {\n _this2[method] = _this2[method].bind(_this2);\n });\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this$props = this.props,\n insecure = _this$props.insecure,\n resizeHide = _this$props.resizeHide;\n this.bindListener(); // Bind listener for tooltip\n\n this.bindWindowEvents(resizeHide); // Bind global event for static method\n\n this.injectStyles(); // Inject styles for each DOM root having tooltip.\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.mount = false;\n this.clearTimer();\n this.unbindListener();\n this.removeScrollListener(this.state.currentTarget);\n this.unbindWindowEvents();\n }\n /* Look for the closest DOM root having tooltip and inject styles. */\n\n }, {\n key: \"injectStyles\",\n value: function injectStyles() {\n var tooltipRef = this.tooltipRef;\n\n if (!tooltipRef) {\n return;\n }\n\n var parentNode = tooltipRef.parentNode;\n\n while (parentNode.parentNode) {\n parentNode = parentNode.parentNode;\n }\n\n var domRoot;\n\n switch (parentNode.constructor.name) {\n case 'Document':\n case 'HTMLDocument':\n case undefined:\n domRoot = parentNode.head;\n break;\n\n case 'ShadowRoot':\n default:\n domRoot = parentNode;\n break;\n } // Prevent styles duplication.\n\n\n if (!domRoot.querySelector('style[data-react-tooltip]')) {\n var style = document.createElement('style');\n style.textContent = baseCss;\n style.setAttribute('data-react-tooltip', 'true');\n domRoot.appendChild(style);\n }\n }\n /**\n * Return if the mouse is on the tooltip.\n * @returns {boolean} true - mouse is on the tooltip\n */\n\n }, {\n key: \"mouseOnToolTip\",\n value: function mouseOnToolTip() {\n var show = this.state.show;\n\n if (show && this.tooltipRef) {\n /* old IE or Firefox work around */\n if (!this.tooltipRef.matches) {\n /* old IE work around */\n if (this.tooltipRef.msMatchesSelector) {\n this.tooltipRef.matches = this.tooltipRef.msMatchesSelector;\n } else {\n /* old Firefox work around */\n this.tooltipRef.matches = this.tooltipRef.mozMatchesSelector;\n }\n }\n\n return this.tooltipRef.matches(':hover');\n }\n\n return false;\n }\n /**\n * Pick out corresponded target elements\n */\n\n }, {\n key: \"getTargetArray\",\n value: function getTargetArray(id) {\n var targetArray = [];\n var selector;\n\n if (!id) {\n selector = '[data-tip]:not([data-for])';\n } else {\n var escaped = id.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"');\n selector = \"[data-tip][data-for=\\\"\".concat(escaped, \"\\\"]\");\n } // Scan document for shadow DOM elements\n\n\n nodeListToArray(document.getElementsByTagName('*')).filter(function (element) {\n return element.shadowRoot;\n }).forEach(function (element) {\n targetArray = targetArray.concat(nodeListToArray(element.shadowRoot.querySelectorAll(selector)));\n });\n return targetArray.concat(nodeListToArray(document.querySelectorAll(selector)));\n }\n /**\n * Bind listener to the target elements\n * These listeners used to trigger showing or hiding the tooltip\n */\n\n }, {\n key: \"bindListener\",\n value: function bindListener() {\n var _this3 = this;\n\n var _this$props2 = this.props,\n id = _this$props2.id,\n globalEventOff = _this$props2.globalEventOff,\n isCapture = _this$props2.isCapture;\n var targetArray = this.getTargetArray(id);\n targetArray.forEach(function (target) {\n if (target.getAttribute('currentItem') === null) {\n target.setAttribute('currentItem', 'false');\n }\n\n _this3.unbindBasicListener(target);\n\n if (_this3.isCustomEvent(target)) {\n _this3.customUnbindListener(target);\n }\n });\n\n if (this.isBodyMode()) {\n this.bindBodyListener(targetArray);\n } else {\n targetArray.forEach(function (target) {\n var isCaptureMode = _this3.isCapture(target);\n\n var effect = _this3.getEffect(target);\n\n if (_this3.isCustomEvent(target)) {\n _this3.customBindListener(target);\n\n return;\n }\n\n target.addEventListener('mouseenter', _this3.showTooltip, isCaptureMode);\n target.addEventListener('focus', _this3.showTooltip, isCaptureMode);\n\n if (effect === 'float') {\n target.addEventListener('mousemove', _this3.updateTooltip, isCaptureMode);\n }\n\n target.addEventListener('mouseleave', _this3.hideTooltip, isCaptureMode);\n target.addEventListener('blur', _this3.hideTooltip, isCaptureMode);\n });\n } // Global event to hide tooltip\n\n\n if (globalEventOff) {\n window.removeEventListener(globalEventOff, this.hideTooltip);\n window.addEventListener(globalEventOff, this.hideTooltip, isCapture);\n } // Track removal of targetArray elements from DOM\n\n\n this.bindRemovalTracker();\n }\n /**\n * Unbind listeners on target elements\n */\n\n }, {\n key: \"unbindListener\",\n value: function unbindListener() {\n var _this4 = this;\n\n var _this$props3 = this.props,\n id = _this$props3.id,\n globalEventOff = _this$props3.globalEventOff;\n\n if (this.isBodyMode()) {\n this.unbindBodyListener();\n } else {\n var targetArray = this.getTargetArray(id);\n targetArray.forEach(function (target) {\n _this4.unbindBasicListener(target);\n\n if (_this4.isCustomEvent(target)) _this4.customUnbindListener(target);\n });\n }\n\n if (globalEventOff) window.removeEventListener(globalEventOff, this.hideTooltip);\n this.unbindRemovalTracker();\n }\n /**\n * Invoke this before bind listener and unmount the component\n * it is necessary to invoke this even when binding custom event\n * so that the tooltip can switch between custom and default listener\n */\n\n }, {\n key: \"unbindBasicListener\",\n value: function unbindBasicListener(target) {\n var isCaptureMode = this.isCapture(target);\n target.removeEventListener('mouseenter', this.showTooltip, isCaptureMode);\n target.removeEventListener('mousemove', this.updateTooltip, isCaptureMode);\n target.removeEventListener('mouseleave', this.hideTooltip, isCaptureMode);\n }\n }, {\n key: \"getTooltipContent\",\n value: function getTooltipContent() {\n var _this$props4 = this.props,\n getContent = _this$props4.getContent,\n children = _this$props4.children; // Generate tooltip content\n\n var content;\n\n if (getContent) {\n if (Array.isArray(getContent)) {\n content = getContent[0] && getContent[0](this.state.originTooltip);\n } else {\n content = getContent(this.state.originTooltip);\n }\n }\n\n return getTipContent(this.state.originTooltip, children, content, this.state.isMultiline);\n }\n }, {\n key: \"isEmptyTip\",\n value: function isEmptyTip(placeholder) {\n return typeof placeholder === 'string' && placeholder === '' || placeholder === null;\n }\n /**\n * When mouse enter, show the tooltip\n */\n\n }, {\n key: \"showTooltip\",\n value: function showTooltip(e, isGlobalCall) {\n if (!this.tooltipRef) {\n return;\n }\n\n if (isGlobalCall) {\n // Don't trigger other elements belongs to other ReactTooltip\n var targetArray = this.getTargetArray(this.props.id);\n var isMyElement = targetArray.some(function (ele) {\n return ele === e.currentTarget;\n });\n if (!isMyElement) return;\n } // Get the tooltip content\n // calculate in this phrase so that tip width height can be detected\n\n\n var _this$props5 = this.props,\n multiline = _this$props5.multiline,\n getContent = _this$props5.getContent;\n var originTooltip = e.currentTarget.getAttribute('data-tip');\n var isMultiline = e.currentTarget.getAttribute('data-multiline') || multiline || false; // If it is focus event or called by ReactTooltip.show, switch to `solid` effect\n\n var switchToSolid = e instanceof window.FocusEvent || isGlobalCall; // if it needs to skip adding hide listener to scroll\n\n var scrollHide = true;\n\n if (e.currentTarget.getAttribute('data-scroll-hide')) {\n scrollHide = e.currentTarget.getAttribute('data-scroll-hide') === 'true';\n } else if (this.props.scrollHide != null) {\n scrollHide = this.props.scrollHide;\n } // adding aria-describedby to target to make tooltips read by screen readers\n\n\n if (e && e.currentTarget && e.currentTarget.setAttribute) {\n e.currentTarget.setAttribute('aria-describedby', this.state.uuid);\n } // Make sure the correct place is set\n\n\n var desiredPlace = e.currentTarget.getAttribute('data-place') || this.props.place || 'top';\n var effect = switchToSolid && 'solid' || this.getEffect(e.currentTarget);\n var offset = e.currentTarget.getAttribute('data-offset') || this.props.offset || {};\n var result = getPosition(e, e.currentTarget, this.tooltipRef, desiredPlace, desiredPlace, effect, offset);\n\n if (result.position && this.props.overridePosition) {\n result.position = this.props.overridePosition(result.position, e, e.currentTarget, this.tooltipRef, desiredPlace, desiredPlace, effect, offset);\n }\n\n var place = result.isNewState ? result.newState.place : desiredPlace; // To prevent previously created timers from triggering\n\n this.clearTimer();\n var target = e.currentTarget;\n var reshowDelay = this.state.show ? target.getAttribute('data-delay-update') || this.props.delayUpdate : 0;\n var self = this;\n\n var updateState = function updateState() {\n self.setState({\n originTooltip: originTooltip,\n isMultiline: isMultiline,\n desiredPlace: desiredPlace,\n place: place,\n type: target.getAttribute('data-type') || self.props.type || 'dark',\n customColors: {\n text: target.getAttribute('data-text-color') || self.props.textColor || null,\n background: target.getAttribute('data-background-color') || self.props.backgroundColor || null,\n border: target.getAttribute('data-border-color') || self.props.borderColor || null,\n arrow: target.getAttribute('data-arrow-color') || self.props.arrowColor || null\n },\n effect: effect,\n offset: offset,\n html: (target.getAttribute('data-html') ? target.getAttribute('data-html') === 'true' : self.props.html) || false,\n delayShow: target.getAttribute('data-delay-show') || self.props.delayShow || 0,\n delayHide: target.getAttribute('data-delay-hide') || self.props.delayHide || 0,\n delayUpdate: target.getAttribute('data-delay-update') || self.props.delayUpdate || 0,\n border: (target.getAttribute('data-border') ? target.getAttribute('data-border') === 'true' : self.props.border) || false,\n extraClass: target.getAttribute('data-class') || self.props[\"class\"] || self.props.className || '',\n disable: (target.getAttribute('data-tip-disable') ? target.getAttribute('data-tip-disable') === 'true' : self.props.disable) || false,\n currentTarget: target\n }, function () {\n if (scrollHide) {\n self.addScrollListener(self.state.currentTarget);\n }\n\n self.updateTooltip(e);\n\n if (getContent && Array.isArray(getContent)) {\n self.intervalUpdateContent = setInterval(function () {\n if (self.mount) {\n var _getContent = self.props.getContent;\n var placeholder = getTipContent(originTooltip, '', _getContent[0](), isMultiline);\n var isEmptyTip = self.isEmptyTip(placeholder);\n self.setState({\n isEmptyTip: isEmptyTip\n });\n self.updatePosition();\n }\n }, getContent[1]);\n }\n });\n }; // If there is no delay call immediately, don't allow events to get in first.\n\n\n if (reshowDelay) {\n this.delayReshow = setTimeout(updateState, reshowDelay);\n } else {\n updateState();\n }\n }\n /**\n * When mouse hover, update tool tip\n */\n\n }, {\n key: \"updateTooltip\",\n value: function updateTooltip(e) {\n var _this5 = this;\n\n var _this$state = this.state,\n delayShow = _this$state.delayShow,\n disable = _this$state.disable;\n var afterShow = this.props.afterShow;\n var placeholder = this.getTooltipContent();\n var eventTarget = e.currentTarget || e.target; // Check if the mouse is actually over the tooltip, if so don't hide the tooltip\n\n if (this.mouseOnToolTip()) {\n return;\n } // if the tooltip is empty, disable the tooltip\n\n\n if (this.isEmptyTip(placeholder) || disable) {\n return;\n }\n\n var delayTime = !this.state.show ? parseInt(delayShow, 10) : 0;\n\n var updateState = function updateState() {\n if (Array.isArray(placeholder) && placeholder.length > 0 || placeholder) {\n var isInvisible = !_this5.state.show;\n\n _this5.setState({\n currentEvent: e,\n currentTarget: eventTarget,\n show: true\n }, function () {\n _this5.updatePosition();\n\n if (isInvisible && afterShow) {\n afterShow(e);\n }\n });\n }\n };\n\n clearTimeout(this.delayShowLoop);\n\n if (delayTime) {\n this.delayShowLoop = setTimeout(updateState, delayTime);\n } else {\n updateState();\n }\n }\n /*\n * If we're mousing over the tooltip remove it when we leave.\n */\n\n }, {\n key: \"listenForTooltipExit\",\n value: function listenForTooltipExit() {\n var show = this.state.show;\n\n if (show && this.tooltipRef) {\n this.tooltipRef.addEventListener('mouseleave', this.hideTooltip);\n }\n }\n }, {\n key: \"removeListenerForTooltipExit\",\n value: function removeListenerForTooltipExit() {\n var show = this.state.show;\n\n if (show && this.tooltipRef) {\n this.tooltipRef.removeEventListener('mouseleave', this.hideTooltip);\n }\n }\n /**\n * When mouse leave, hide tooltip\n */\n\n }, {\n key: \"hideTooltip\",\n value: function hideTooltip(e, hasTarget) {\n var _this6 = this;\n\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {\n isScroll: false\n };\n var disable = this.state.disable;\n var isScroll = options.isScroll;\n var delayHide = isScroll ? 0 : this.state.delayHide;\n var afterHide = this.props.afterHide;\n var placeholder = this.getTooltipContent();\n if (!this.mount) return;\n if (this.isEmptyTip(placeholder) || disable) return; // if the tooltip is empty, disable the tooltip\n\n if (hasTarget) {\n // Don't trigger other elements belongs to other ReactTooltip\n var targetArray = this.getTargetArray(this.props.id);\n var isMyElement = targetArray.some(function (ele) {\n return ele === e.currentTarget;\n });\n if (!isMyElement || !this.state.show) return;\n } // clean up aria-describedby when hiding tooltip\n\n\n if (e && e.currentTarget && e.currentTarget.removeAttribute) {\n e.currentTarget.removeAttribute('aria-describedby');\n }\n\n var resetState = function resetState() {\n var isVisible = _this6.state.show; // Check if the mouse is actually over the tooltip, if so don't hide the tooltip\n\n if (_this6.mouseOnToolTip()) {\n _this6.listenForTooltipExit();\n\n return;\n }\n\n _this6.removeListenerForTooltipExit();\n\n _this6.setState({\n show: false\n }, function () {\n _this6.removeScrollListener(_this6.state.currentTarget);\n\n if (isVisible && afterHide) {\n afterHide(e);\n }\n });\n };\n\n this.clearTimer();\n\n if (delayHide) {\n this.delayHideLoop = setTimeout(resetState, parseInt(delayHide, 10));\n } else {\n resetState();\n }\n }\n /**\n * When scroll, hide tooltip\n */\n\n }, {\n key: \"hideTooltipOnScroll\",\n value: function hideTooltipOnScroll(event, hasTarget) {\n this.hideTooltip(event, hasTarget, {\n isScroll: true\n });\n }\n /**\n * Add scroll event listener when tooltip show\n * automatically hide the tooltip when scrolling\n */\n\n }, {\n key: \"addScrollListener\",\n value: function addScrollListener(currentTarget) {\n var isCaptureMode = this.isCapture(currentTarget);\n window.addEventListener('scroll', this.hideTooltipOnScroll, isCaptureMode);\n }\n }, {\n key: \"removeScrollListener\",\n value: function removeScrollListener(currentTarget) {\n var isCaptureMode = this.isCapture(currentTarget);\n window.removeEventListener('scroll', this.hideTooltipOnScroll, isCaptureMode);\n } // Calculation the position\n\n }, {\n key: \"updatePosition\",\n value: function updatePosition() {\n var _this7 = this;\n\n var _this$state2 = this.state,\n currentEvent = _this$state2.currentEvent,\n currentTarget = _this$state2.currentTarget,\n place = _this$state2.place,\n desiredPlace = _this$state2.desiredPlace,\n effect = _this$state2.effect,\n offset = _this$state2.offset;\n var node = this.tooltipRef;\n var result = getPosition(currentEvent, currentTarget, node, place, desiredPlace, effect, offset);\n\n if (result.position && this.props.overridePosition) {\n result.position = this.props.overridePosition(result.position, currentEvent, currentTarget, node, place, desiredPlace, effect, offset);\n }\n\n if (result.isNewState) {\n // Switch to reverse placement\n return this.setState(result.newState, function () {\n _this7.updatePosition();\n });\n } // Set tooltip position\n\n\n node.style.left = result.position.left + 'px';\n node.style.top = result.position.top + 'px';\n }\n /**\n * CLear all kinds of timeout of interval\n */\n\n }, {\n key: \"clearTimer\",\n value: function clearTimer() {\n clearTimeout(this.delayShowLoop);\n clearTimeout(this.delayHideLoop);\n clearTimeout(this.delayReshow);\n clearInterval(this.intervalUpdateContent);\n }\n }, {\n key: \"hasCustomColors\",\n value: function hasCustomColors() {\n var _this8 = this;\n\n return Boolean(Object.keys(this.state.customColors).find(function (color) {\n return color !== 'border' && _this8.state.customColors[color];\n }) || this.state.border && this.state.customColors['border']);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this9 = this;\n\n var _this$state3 = this.state,\n extraClass = _this$state3.extraClass,\n html = _this$state3.html,\n ariaProps = _this$state3.ariaProps,\n disable = _this$state3.disable,\n uuid = _this$state3.uuid;\n var content = this.getTooltipContent();\n var isEmptyTip = this.isEmptyTip(content);\n var style = generateTooltipStyle(this.state.uuid, this.state.customColors, this.state.type, this.state.border);\n var tooltipClass = '__react_component_tooltip' + \" \".concat(this.state.uuid) + (this.state.show && !disable && !isEmptyTip ? ' show' : '') + (this.state.border ? ' border' : '') + \" place-\".concat(this.state.place) + // top, bottom, left, right\n \" type-\".concat(this.hasCustomColors() ? 'custom' : this.state.type) + ( // dark, success, warning, error, info, light, custom\n this.props.delayUpdate ? ' allow_hover' : '') + (this.props.clickable ? ' allow_click' : '');\n var Wrapper = this.props.wrapper;\n\n if (ReactTooltip.supportedWrappers.indexOf(Wrapper) < 0) {\n Wrapper = ReactTooltip.defaultProps.wrapper;\n }\n\n var wrapperClassName = [tooltipClass, extraClass].filter(Boolean).join(' ');\n\n if (html) {\n var htmlContent = \"\".concat(content, \"\\n\");\n return React.createElement(Wrapper, _extends({\n className: \"\".concat(wrapperClassName),\n id: this.props.id || uuid,\n ref: function ref(_ref) {\n return _this9.tooltipRef = _ref;\n }\n }, ariaProps, {\n \"data-id\": \"tooltip\",\n dangerouslySetInnerHTML: {\n __html: htmlContent\n }\n }));\n } else {\n return React.createElement(Wrapper, _extends({\n className: \"\".concat(wrapperClassName),\n id: this.props.id || uuid\n }, ariaProps, {\n ref: function ref(_ref2) {\n return _this9.tooltipRef = _ref2;\n },\n \"data-id\": \"tooltip\"\n }), React.createElement(\"style\", {\n dangerouslySetInnerHTML: {\n __html: style\n },\n \"aria-hidden\": \"true\"\n }), content);\n }\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(nextProps, prevState) {\n var ariaProps = prevState.ariaProps;\n var newAriaProps = parseAria(nextProps);\n var isChanged = Object.keys(newAriaProps).some(function (props) {\n return newAriaProps[props] !== ariaProps[props];\n });\n\n if (!isChanged) {\n return null;\n }\n\n return _objectSpread2({}, prevState, {\n ariaProps: newAriaProps\n });\n }\n }]);\n\n return ReactTooltip;\n}(React.Component), _defineProperty(_class2, \"defaultProps\", {\n insecure: true,\n resizeHide: true,\n wrapper: 'div',\n clickable: false\n}), _defineProperty(_class2, \"supportedWrappers\", ['div', 'span']), _defineProperty(_class2, \"displayName\", 'ReactTooltip'), _temp)) || _class) || _class) || _class) || _class) || _class) || _class) || _class;\n\nexport default ReactTooltip;\n//# sourceMappingURL=index.es.js.map\n","const removeClassName = (node, partialName) => {\n\tnode.classList.forEach((className) => {\n\t\treturn className.includes(partialName) ? node.classList.remove(className) : null;\n\t});\n\treturn node;\n};\nconst checkXPlace = (target, node) => {\n\tlet xPosition = target.tooltipPosition;\n\tlet checkRightNode = window.innerWidth - target.right >= parseInt(node.clientWidth);\n\tlet checkLeftNode = target.left >= parseInt(node.clientWidth);\n\tnode.classList.remove(\"tooltip-responsive\");\n\n\tif (!(checkRightNode && checkLeftNode)) {\n\t\tif (checkRightNode) {\n\t\t\txPosition = \"right\";\n\t\t} else if (checkLeftNode) {\n\t\t\txPosition = \"left\";\n\t\t} else {\n\t\t\tnode.classList.add(\"tooltip-responsive\");\n\t\t}\n\t}\n\n\treturn xPosition;\n};\n\nconst checkYPlace = (target, node) => {\n\tlet yPosition = target.position;\n\tlet nodeBottomPosition = target.bottom + parseInt(node.clientHeight);\n\tif (nodeBottomPosition >= window.innerHeight) {\n\t\tyPosition = \"top\";\n\t}\n\treturn yPosition;\n};\n\nconst bottomTooltip = (target, node) => {\n\tlet top = target.top + target.height + target.arrowHeight;\n\tlet left = target.left;\n\tlet xPlace = checkXPlace(target, node);\n\tif (xPlace === \"left\") {\n\t\tleft = bottomLeftTooltip(target, node);\n\t} else if (xPlace === \"right\") {\n\t\tleft = bottomRightTooltip(target, node);\n\t}\n\treturn { top, left };\n};\nconst topTooltip = (target, node) => {\n\tlet top = target.top - node.clientHeight;\n\tlet left = target.left;\n\tlet xPlace = checkXPlace(target, node);\n\tif (xPlace === \"left\") {\n\t\tleft = topLeftTooltip(target, node);\n\t} else if (xPlace === \"right\") {\n\t\tleft = topRightTooltip(target, node);\n\t}\n\treturn { top, left };\n};\n\nconst bottomRightTooltip = (target, node) => {\n\tlet left = target.left;\n\tlet arrowPosition = target.width / 2;\n\tnode.classList.add(`place-bottom`);\n\tnode.classList.add(`arrow-bottom-${target.tooltipPosition}`);\n\tnode.style.setProperty(\"--tooltip-position-left\", `${left}px`);\n\tnode.style.setProperty(\"--tooltip-arrow-position\", `${arrowPosition}px`);\n\treturn left;\n};\n\nconst bottomLeftTooltip = (target, node) => {\n\tlet left = target.right - node.offsetWidth;\n\tlet right = window.innerWidth - target.right - node.offsetWidth / 2;\n\tlet arrowPosition = node.offsetWidth - target.width / 2;\n\tnode.classList.add(`place-bottom`);\n\tnode.classList.add(`arrow-bottom-${target.tooltipPosition}`);\n\tnode.style.setProperty(\"--tooltip-arrow-position\", `${arrowPosition}px`);\n\tnode.style.setProperty(\"--tooltip-position-right\", `${right}px`);\n\treturn left;\n};\nconst topRightTooltip = (target, node) => {\n\tlet left = target.left;\n\tlet arrowPosition = target.width / 2;\n\tnode.classList.add(`place-top`);\n\tnode.classList.add(`arrow-top-${target.tooltipPosition}`);\n\tnode.style.setProperty(\"--tooltip-position-left\", `${left}px`);\n\tnode.style.setProperty(\"--tooltip-arrow-position\", `${arrowPosition}px`);\n\treturn left;\n};\n\nconst topLeftTooltip = (target, node) => {\n\tlet left = target.right - node.offsetWidth;\n\tlet arrowPosition = node.offsetWidth - target.width / 2 - 6;\n\tif (left <= 0) {\n\t\tleft = 10;\n\t\tarrowPosition = target.left - target.width;\n\t}\n\tlet right = window.innerWidth - target.right - node.offsetWidth / 2;\n\tnode.classList.add(`place-top`);\n\tnode.classList.add(`arrow-top-${target.tooltipPosition}`);\n\tnode.style.setProperty(\"--tooltip-arrow-position\", `${arrowPosition}px`);\n\tnode.style.setProperty(\"--tooltip-position-right\", `${right}px`);\n\treturn left;\n};\n\nexport const setPosition = (\n\t{ left, top },\n\tcurrentEvent,\n\tcurrentTarget,\n\tnode,\n\tplace,\n\tdesiredPlace,\n\teffect,\n\toffset,\n\tposition,\n\ttooltipPosition\n) => {\n\tconst target = currentTarget.querySelectorAll(\".button-icon\").length\n\t\t? currentTarget.querySelectorAll(\".button-icon\")[0]\n\t\t: currentTarget;\n\tconst BoundingClientRect = target.getBoundingClientRect();\n\tconst targetPosition = {\n\t\tleft: BoundingClientRect.left,\n\t\tright: BoundingClientRect.right,\n\t\ttop: BoundingClientRect.top,\n\t\tbottom: BoundingClientRect.bottom,\n\t\theight: target.clientHeight,\n\t\twidth: target.clientWidth,\n\t\tarrowHeight: 10,\n\t\tposition: position,\n\t\ttooltipPosition: tooltipPosition\n\t};\n\tlet yPlace = checkYPlace(targetPosition, node);\n\tnode = removeClassName(node, \"place-\");\n\tif (yPlace === \"bottom\") {\n\t\treturn bottomTooltip(targetPosition, node);\n\t} else if (yPlace === \"top\") {\n\t\treturn topTooltip(targetPosition, node);\n\t} else {\n\t\treturn { top, left };\n\t}\n};\n\nexport default {\n\tsetPosition\n};\n","import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport ReactTooltip from \"react-tooltip\";\nimport { setPosition } from \"./TooltipOverridePosition\";\n\nexport default class Tooltip extends Component {\n\tcomponentDidMount() {\n\t\twindow.addEventListener(\"resize\", this.toggleTooltip);\n\t}\n\tcomponentDidUpdate(prevProps) {\n\t\tif (this.props.clickable && prevProps.isVisible !== this.props.isVisible) {\n\t\t\tthis.toggleTooltip();\n\t\t}\n\t}\n\toverridePosition = (\n\t\t{ left, top },\n\t\tcurrentEvent,\n\t\tcurrentTarget,\n\t\tnode,\n\t\tplace,\n\t\tdesiredPlace,\n\t\teffect,\n\t\toffset\n\t) => {\n\t\tconst { position, tooltipPosition = this.props.position } = this.props;\n\t\treturn setPosition(\n\t\t\t{ left, top },\n\t\t\tcurrentEvent,\n\t\t\tcurrentTarget,\n\t\t\tnode,\n\t\t\tplace,\n\t\t\tdesiredPlace,\n\t\t\teffect,\n\t\t\toffset,\n\t\t\tposition,\n\t\t\ttooltipPosition\n\t\t);\n\t};\n\n\ttoggleTooltip = () => {\n\t\tconst { isVisible, buttonRef } = this.props;\n\t\tif (isVisible) {\n\t\t\tReactTooltip.show(buttonRef.current);\n\t\t} else {\n\t\t\tReactTooltip.hide(buttonRef.current);\n\t\t}\n\t\tReactTooltip.rebuild();\n\t};\n\trender() {\n\t\tconst { id, className = \"\", position = \"bottom\" } = this.props;\n\t\treturn (\n\t\t\t