react-tooltip 5.1.0-beta.1 → 5.1.1

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.
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={exports:{}},o={};!function(){var e=n.default,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),h=Symbol.iterator;var g=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];b("error",e,n)}function b(e,t,n){var r=g.ReactDebugCurrentFrame.getStackAddendum();""!==r&&(t+="%s",n=n.concat([r]));var o=n.map((function(e){return String(e)}));o.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,o)}var w;function x(e){return e.displayName||"Context"}function S(e){if(null==e)return null;if("number"==typeof e.tag&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case i:return"Fragment";case r:return"Portal";case l:return"Profiler";case a:return"StrictMode";case f:return"Suspense";case p:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case c:return x(e)+".Consumer";case s:return x(e._context)+".Provider";case u:return function(e,t,n){var r=e.displayName;if(r)return r;var o=t.displayName||t.name||"";return""!==o?n+"("+o+")":n}(e,e.render,"ForwardRef");case d:var t=e.displayName||null;return null!==t?t:S(e.type)||"Memo";case y:var n=e,o=n._payload,m=n._init;try{return S(m(o))}catch(e){return null}}return null}w=Symbol.for("react.module.reference");var _,R,k,T,O,j,E,P=Object.assign,A=0;function N(){}N.__reactDisabledLog=!0;var L,C=g.ReactCurrentDispatcher;function $(e,t,n){if(void 0===L)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);L=r&&r[1]||""}return"\n"+L+e}var D,F=!1,I="function"==typeof WeakMap?WeakMap:Map;function W(e,t){if(!e||F)return"";var n,r=D.get(e);if(void 0!==r)return r;F=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=C.current,C.current=null,function(){if(0===A){_=console.log,R=console.info,k=console.warn,T=console.error,O=console.group,j=console.groupCollapsed,E=console.groupEnd;var e={configurable:!0,enumerable:!0,value:N,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}A++}();try{if(t){var a=function(){throw Error()};if(Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(a,[])}catch(e){n=e}Reflect.construct(e,[],a)}else{try{a.call()}catch(e){n=e}e.call(a.prototype)}}else{try{throw Error()}catch(e){n=e}e()}}catch(t){if(t&&n&&"string"==typeof t.stack){for(var l=t.stack.split("\n"),s=n.stack.split("\n"),c=l.length-1,u=s.length-1;c>=1&&u>=0&&l[c]!==s[u];)u--;for(;c>=1&&u>=0;c--,u--)if(l[c]!==s[u]){if(1!==c||1!==u)do{if(c--,--u<0||l[c]!==s[u]){var f="\n"+l[c].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),"function"==typeof e&&D.set(e,f),f}}while(c>=1&&u>=0);break}}}finally{F=!1,C.current=o,function(){if(0==--A){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:P({},e,{value:_}),info:P({},e,{value:R}),warn:P({},e,{value:k}),error:P({},e,{value:T}),group:P({},e,{value:O}),groupCollapsed:P({},e,{value:j}),groupEnd:P({},e,{value:E})})}A<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var p=e?e.displayName||e.name:"",d=p?$(p):"";return"function"==typeof e&&D.set(e,d),d}function H(e,t,n){if(null==e)return"";if("function"==typeof e)return W(e,!(!(r=e.prototype)||!r.isReactComponent));var r;if("string"==typeof e)return $(e);switch(e){case f:return $("Suspense");case p:return $("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case u:return W(e.render,!1);case d:return H(e.type,t,n);case y:var o=e,i=o._payload,a=o._init;try{return H(a(i),t,n)}catch(e){}}return""}D=new I;var M=Object.prototype.hasOwnProperty,U={},B=g.ReactDebugCurrentFrame;function V(e){if(e){var t=e._owner,n=H(e.type,e._source,t?t.type:null);B.setExtraStackFrame(n)}else B.setExtraStackFrame(null)}var q=Array.isArray;function z(e){return q(e)}function Y(e){return""+e}function X(e){if(function(e){try{return Y(e),!1}catch(e){return!0}}(e))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),Y(e)}var J,K,Z,G=g.ReactCurrentOwner,Q={key:!0,ref:!0,__self:!0,__source:!0};Z={};function ee(e,n,r,o,i){var a,l={},s=null,c=null;for(a in void 0!==r&&(X(r),s=""+r),function(e){if(M.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(n)&&(X(n.key),s=""+n.key),function(e){if(M.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(n)&&(c=n.ref,function(e,t){if("string"==typeof e.ref&&G.current&&t&&G.current.stateNode!==t){var n=S(G.current.type);Z[n]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',S(G.current.type),e.ref),Z[n]=!0)}}(n,i)),n)M.call(n,a)&&!Q.hasOwnProperty(a)&&(l[a]=n[a]);if(e&&e.defaultProps){var u=e.defaultProps;for(a in u)void 0===l[a]&&(l[a]=u[a])}if(s||c){var f="function"==typeof e?e.displayName||e.name||"Unknown":e;s&&function(e,t){var n=function(){J||(J=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(l,f),c&&function(e,t){var n=function(){K||(K=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(l,f)}return function(e,n,r,o,i,a,l){var s={$$typeof:t,type:e,key:n,ref:r,props:l,_owner:a,_store:{}};return Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}(e,s,c,i,o,G.current,l)}var te,ne=g.ReactCurrentOwner,re=g.ReactDebugCurrentFrame;function oe(e){if(e){var t=e._owner,n=H(e.type,e._source,t?t.type:null);re.setExtraStackFrame(n)}else re.setExtraStackFrame(null)}function ie(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}function ae(){if(ne.current){var e=S(ne.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}te=!1;var le={};function se(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=ae();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!le[n]){le[n]=!0;var r="";e&&e._owner&&e._owner!==ne.current&&(r=" It was passed a child from "+S(e._owner.type)+"."),oe(e),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),oe(null)}}}function ce(e,t){if("object"==typeof e)if(z(e))for(var n=0;n<e.length;n++){var r=e[n];ie(r)&&se(r,t)}else if(ie(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=h&&e[h]||e["@@iterator"];return"function"==typeof t?t:null}(e);if("function"==typeof o&&o!==e.entries)for(var i,a=o.call(e);!(i=a.next()).done;)ie(i.value)&&se(i.value,t)}}function ue(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==u&&n.$$typeof!==d)return;t=n.propTypes}if(t){var r=S(n);!function(e,t,n,r,o){var i=Function.call.bind(M);for(var a in e)if(i(e,a)){var l=void 0;try{if("function"!=typeof e[a]){var s=Error((r||"React class")+": "+n+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}l=e[a](t,a,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){l=e}!l||l instanceof Error||(V(o),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,a,typeof l),V(null)),l instanceof Error&&!(l.message in U)&&(U[l.message]=!0,V(o),v("Failed %s type: %s",n,l.message),V(null))}}(t,e.props,"prop",r,e)}else if(void 0!==n.PropTypes&&!te){te=!0,v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",S(n)||"Unknown")}"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function fe(e,n,r,o,h,g){var b=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===l||e===a||e===f||e===p||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===d||e.$$typeof===s||e.$$typeof===c||e.$$typeof===u||e.$$typeof===w||void 0!==e.getModuleId)}(e);if(!b){var x="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(x+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var _,R=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(h);x+=R||ae(),null===e?_="null":z(e)?_="array":void 0!==e&&e.$$typeof===t?(_="<"+(S(e.type)||"Unknown")+" />",x=" Did you accidentally export a JSX literal instead of a component?"):_=typeof e,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",_,x)}var k=ee(e,n,r,h,g);if(null==k)return k;if(b){var T=n.children;if(void 0!==T)if(o)if(z(T)){for(var O=0;O<T.length;O++)ce(T[O],e);Object.freeze&&Object.freeze(T)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ce(T,e)}return e===i?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){oe(e),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),oe(null);break}}null!==e.ref&&(oe(e),v("Invalid attribute `ref` supplied to `React.Fragment`."),oe(null))}(k):ue(k),k}var pe=function(e,t,n){return fe(e,t,n,!1)},de=function(e,t,n){return fe(e,t,n,!0)};o.Fragment=i,o.jsx=pe,o.jsxs=de}(),r.exports=o;var i,a={exports:{}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={exports:{}},o={};!function(){var e=n.default,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),h=Symbol.iterator;var g=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];b("error",e,n)}function b(e,t,n){var r=g.ReactDebugCurrentFrame.getStackAddendum();""!==r&&(t+="%s",n=n.concat([r]));var o=n.map((function(e){return String(e)}));o.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,o)}var w;function x(e){return e.displayName||"Context"}function S(e){if(null==e)return null;if("number"==typeof e.tag&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case i:return"Fragment";case r:return"Portal";case l:return"Profiler";case a:return"StrictMode";case f:return"Suspense";case p:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case c:return x(e)+".Consumer";case s:return x(e._context)+".Provider";case u:return function(e,t,n){var r=e.displayName;if(r)return r;var o=t.displayName||t.name||"";return""!==o?n+"("+o+")":n}(e,e.render,"ForwardRef");case d:var t=e.displayName||null;return null!==t?t:S(e.type)||"Memo";case y:var n=e,o=n._payload,m=n._init;try{return S(m(o))}catch(e){return null}}return null}w=Symbol.for("react.module.reference");var _,R,k,T,j,O,E,A=Object.assign,P=0;function N(){}N.__reactDisabledLog=!0;var C,L=g.ReactCurrentDispatcher;function $(e,t,n){if(void 0===C)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);C=r&&r[1]||""}return"\n"+C+e}var D,W=!1,I="function"==typeof WeakMap?WeakMap:Map;function F(e,t){if(!e||W)return"";var n,r=D.get(e);if(void 0!==r)return r;W=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=L.current,L.current=null,function(){if(0===P){_=console.log,R=console.info,k=console.warn,T=console.error,j=console.group,O=console.groupCollapsed,E=console.groupEnd;var e={configurable:!0,enumerable:!0,value:N,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}P++}();try{if(t){var a=function(){throw Error()};if(Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(a,[])}catch(e){n=e}Reflect.construct(e,[],a)}else{try{a.call()}catch(e){n=e}e.call(a.prototype)}}else{try{throw Error()}catch(e){n=e}e()}}catch(t){if(t&&n&&"string"==typeof t.stack){for(var l=t.stack.split("\n"),s=n.stack.split("\n"),c=l.length-1,u=s.length-1;c>=1&&u>=0&&l[c]!==s[u];)u--;for(;c>=1&&u>=0;c--,u--)if(l[c]!==s[u]){if(1!==c||1!==u)do{if(c--,--u<0||l[c]!==s[u]){var f="\n"+l[c].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),"function"==typeof e&&D.set(e,f),f}}while(c>=1&&u>=0);break}}}finally{W=!1,L.current=o,function(){if(0==--P){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},e,{value:_}),info:A({},e,{value:R}),warn:A({},e,{value:k}),error:A({},e,{value:T}),group:A({},e,{value:j}),groupCollapsed:A({},e,{value:O}),groupEnd:A({},e,{value:E})})}P<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var p=e?e.displayName||e.name:"",d=p?$(p):"";return"function"==typeof e&&D.set(e,d),d}function H(e,t,n){if(null==e)return"";if("function"==typeof e)return F(e,!(!(r=e.prototype)||!r.isReactComponent));var r;if("string"==typeof e)return $(e);switch(e){case f:return $("Suspense");case p:return $("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case u:return F(e.render,!1);case d:return H(e.type,t,n);case y:var o=e,i=o._payload,a=o._init;try{return H(a(i),t,n)}catch(e){}}return""}D=new I;var M=Object.prototype.hasOwnProperty,U={},B=g.ReactDebugCurrentFrame;function V(e){if(e){var t=e._owner,n=H(e.type,e._source,t?t.type:null);B.setExtraStackFrame(n)}else B.setExtraStackFrame(null)}var z=Array.isArray;function q(e){return z(e)}function Y(e){return""+e}function X(e){if(function(e){try{return Y(e),!1}catch(e){return!0}}(e))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),Y(e)}var J,K,Z,G=g.ReactCurrentOwner,Q={key:!0,ref:!0,__self:!0,__source:!0};Z={};function ee(e,n,r,o,i){var a,l={},s=null,c=null;for(a in void 0!==r&&(X(r),s=""+r),function(e){if(M.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(n)&&(X(n.key),s=""+n.key),function(e){if(M.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(n)&&(c=n.ref,function(e,t){if("string"==typeof e.ref&&G.current&&t&&G.current.stateNode!==t){var n=S(G.current.type);Z[n]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',S(G.current.type),e.ref),Z[n]=!0)}}(n,i)),n)M.call(n,a)&&!Q.hasOwnProperty(a)&&(l[a]=n[a]);if(e&&e.defaultProps){var u=e.defaultProps;for(a in u)void 0===l[a]&&(l[a]=u[a])}if(s||c){var f="function"==typeof e?e.displayName||e.name||"Unknown":e;s&&function(e,t){var n=function(){J||(J=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(l,f),c&&function(e,t){var n=function(){K||(K=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(l,f)}return function(e,n,r,o,i,a,l){var s={$$typeof:t,type:e,key:n,ref:r,props:l,_owner:a,_store:{}};return Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}(e,s,c,i,o,G.current,l)}var te,ne=g.ReactCurrentOwner,re=g.ReactDebugCurrentFrame;function oe(e){if(e){var t=e._owner,n=H(e.type,e._source,t?t.type:null);re.setExtraStackFrame(n)}else re.setExtraStackFrame(null)}function ie(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}function ae(){if(ne.current){var e=S(ne.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}te=!1;var le={};function se(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=ae();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!le[n]){le[n]=!0;var r="";e&&e._owner&&e._owner!==ne.current&&(r=" It was passed a child from "+S(e._owner.type)+"."),oe(e),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),oe(null)}}}function ce(e,t){if("object"==typeof e)if(q(e))for(var n=0;n<e.length;n++){var r=e[n];ie(r)&&se(r,t)}else if(ie(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=h&&e[h]||e["@@iterator"];return"function"==typeof t?t:null}(e);if("function"==typeof o&&o!==e.entries)for(var i,a=o.call(e);!(i=a.next()).done;)ie(i.value)&&se(i.value,t)}}function ue(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==u&&n.$$typeof!==d)return;t=n.propTypes}if(t){var r=S(n);!function(e,t,n,r,o){var i=Function.call.bind(M);for(var a in e)if(i(e,a)){var l=void 0;try{if("function"!=typeof e[a]){var s=Error((r||"React class")+": "+n+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}l=e[a](t,a,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){l=e}!l||l instanceof Error||(V(o),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,a,typeof l),V(null)),l instanceof Error&&!(l.message in U)&&(U[l.message]=!0,V(o),v("Failed %s type: %s",n,l.message),V(null))}}(t,e.props,"prop",r,e)}else if(void 0!==n.PropTypes&&!te){te=!0,v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",S(n)||"Unknown")}"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function fe(e,n,r,o,h,g){var b=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===l||e===a||e===f||e===p||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===d||e.$$typeof===s||e.$$typeof===c||e.$$typeof===u||e.$$typeof===w||void 0!==e.getModuleId)}(e);if(!b){var x="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(x+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var _,R=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(h);x+=R||ae(),null===e?_="null":q(e)?_="array":void 0!==e&&e.$$typeof===t?(_="<"+(S(e.type)||"Unknown")+" />",x=" Did you accidentally export a JSX literal instead of a component?"):_=typeof e,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",_,x)}var k=ee(e,n,r,h,g);if(null==k)return k;if(b){var T=n.children;if(void 0!==T)if(o)if(q(T)){for(var j=0;j<T.length;j++)ce(T[j],e);Object.freeze&&Object.freeze(T)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ce(T,e)}return e===i?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){oe(e),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),oe(null);break}}null!==e.ref&&(oe(e),v("Invalid attribute `ref` supplied to `React.Fragment`."),oe(null))}(k):ue(k),k}var pe=function(e,t,n){return fe(e,t,n,!1)},de=function(e,t,n){return fe(e,t,n,!0)};o.Fragment=i,o.jsx=pe,o.jsxs=de}(),r.exports=o;var i,a={exports:{}};
2
2
  /*!
3
3
  Copyright (c) 2018 Jed Watson.
4
4
  Licensed under the MIT License (MIT), see
5
5
  http://jedwatson.github.io/classnames
6
- */i=a,function(){var e={}.hasOwnProperty;function t(){for(var n=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var i=typeof o;if("string"===i||"number"===i)n.push(o);else if(Array.isArray(o)){if(o.length){var a=t.apply(null,o);a&&n.push(a)}}else if("object"===i){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){n.push(o.toString());continue}for(var l in o)e.call(o,l)&&o[l]&&n.push(l)}}}return n.join(" ")}i.exports?(t.default=t,i.exports=t):window.classNames=t}();var l=a.exports;const s=(e,t,n)=>{let r;return function(){const o=this,i=arguments,a=()=>{r=null,n||e.apply(o,i)};clearTimeout(r),r=setTimeout(a,t)}},c=({content:e})=>r.exports.jsx("span",{dangerouslySetInnerHTML:{__html:e}});function u(e){return e.split("-")[0]}function f(e){return e.split("-")[1]}function p(e){return["top","bottom"].includes(u(e))?"x":"y"}function d(e){return"y"===e?"height":"width"}function y(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,a=r.y+r.height/2-o.height/2,l=p(t),s=d(l),c=r[s]/2-o[s]/2,y="x"===l;let m;switch(u(t)){case"top":m={x:i,y:r.y-o.height};break;case"bottom":m={x:i,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-o.width,y:a};break;default:m={x:r.x,y:r.y}}switch(f(t)){case"start":m[l]-=c*(n&&y?-1:1);break;case"end":m[l]+=c*(n&&y?-1:1)}return m}function m(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function h(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function g(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=t,y=m(d),g=l[p?"floating"===f?"reference":"floating":f],v=h(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:s})),b=h(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===f?{...a.floating,x:r,y:o}:a.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),strategy:s}):a[f]);return{top:v.top-b.top+y.top,bottom:b.bottom-v.bottom+y.bottom,left:v.left-b.left+y.left,right:b.right-v.right+y.right}}const v=Math.min,b=Math.max;function w(e,t,n){return b(e,v(t,n))}const x={left:"right",right:"left",bottom:"top",top:"bottom"};function S(e){return e.replace(/left|right|bottom|top/g,(e=>x[e]))}const _={start:"end",end:"start"};function R(e){return e.replace(/start|end/g,(e=>_[e]))}const k=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:a,platform:l,elements:s}=t,{mainAxis:c=!0,crossAxis:y=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",flipAlignment:v=!0,...b}=e,w=u(r),x=m||(w===a||!v?[S(a)]:function(e){const t=S(e);return[R(e),t,R(t)]}(a)),_=[a,...x],k=await g(t,b),T=[];let O=(null==(n=o.flip)?void 0:n.overflows)||[];if(c&&T.push(k[w]),y){const{main:e,cross:t}=function(e,t,n){void 0===n&&(n=!1);const r=f(e),o=p(e),i=d(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=S(a)),{main:a,cross:S(a)}}(r,i,await(null==l.isRTL?void 0:l.isRTL(s.floating)));T.push(k[e],k[t])}if(O=[...O,{placement:r,overflows:T}],!T.every((e=>e<=0))){var j,E;const e=(null!=(j=null==(E=o.flip)?void 0:E.index)?j:0)+1,t=_[e];if(t)return{data:{index:e,overflows:O},reset:{placement:t}};let n="bottom";switch(h){case"bestFit":{var P;const e=null==(P=O.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:P[0].placement;e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}};const T=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=u(n),l=f(n),s="x"===p(n),c=["left","top"].includes(a)?-1:1,d=i&&s?-1:1,y="function"==typeof t?t(e):t;let{mainAxis:m,crossAxis:h,alignmentAxis:g}="number"==typeof y?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...y};return l&&"number"==typeof g&&(h="end"===l?-1*g:g),s?{x:h*d,y:m*c}:{x:m*c,y:h*d}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};function O(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function j(e){if(null==e)return window;if(!O(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function E(e){return j(e).getComputedStyle(e)}function P(e){return O(e)?"":e?(e.nodeName||"").toLowerCase():""}function A(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function N(e){return e instanceof j(e).HTMLElement}function L(e){return e instanceof j(e).Element}function C(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof j(e).ShadowRoot||e instanceof ShadowRoot}function $(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=E(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(o)}function D(e){return["table","td","th"].includes(P(e))}function F(e){const t=/firefox/i.test(A()),n=E(e),r=n.backdropFilter||n.WebkitBackdropFilter;return"none"!==n.transform||"none"!==n.perspective||!!r&&"none"!==r||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some((e=>n.willChange.includes(e)))||["paint","layout","strict","content"].some((e=>{const t=n.contain;return null!=t&&t.includes(e)}))}function I(){return!/^((?!chrome|android).)*safari/i.test(A())}function W(e){return["html","body","#document"].includes(P(e))}const H=Math.min,M=Math.max,U=Math.round;function B(e,t,n){var r,o,i,a;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect();let s=1,c=1;t&&N(e)&&(s=e.offsetWidth>0&&U(l.width)/e.offsetWidth||1,c=e.offsetHeight>0&&U(l.height)/e.offsetHeight||1);const u=L(e)?j(e):window,f=!I()&&n,p=(l.left+(f&&null!=(r=null==(o=u.visualViewport)?void 0:o.offsetLeft)?r:0))/s,d=(l.top+(f&&null!=(i=null==(a=u.visualViewport)?void 0:a.offsetTop)?i:0))/c,y=l.width/s,m=l.height/c;return{width:y,height:m,top:d,right:p+y,bottom:d+m,left:p,x:p,y:d}}function V(e){return(t=e,(t instanceof j(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function q(e){return L(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function z(e){return B(V(e)).left+q(e).scrollLeft}function Y(e,t,n){const r=N(t),o=V(t),i=B(e,r&&function(e){const t=B(e);return U(t.width)!==e.offsetWidth||U(t.height)!==e.offsetHeight}(t),"fixed"===n);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==P(t)||$(o))&&(a=q(t)),N(t)){const e=B(t,!0);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=z(o));return{x:i.left+a.scrollLeft-l.x,y:i.top+a.scrollTop-l.y,width:i.width,height:i.height}}function X(e){if("html"===P(e))return e;const t=e.assignedSlot||e.parentNode||(C(e)?e.host:null)||V(e);return C(t)?t.host:t}function J(e){return N(e)&&"fixed"!==E(e).position?e.offsetParent:null}function K(e){const t=j(e);let n=J(e);for(;n&&D(n)&&"static"===E(n).position;)n=J(n);return n&&("html"===P(n)||"body"===P(n)&&"static"===E(n).position&&!F(n))?t:n||function(e){let t=X(e);for(;N(t)&&!W(t);){if(F(t))return t;t=X(t)}return null}(e)||t}function Z(e){if(N(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=B(e);return{width:t.width,height:t.height}}function G(e){const t=X(e);return W(t)?e.ownerDocument.body:N(t)&&$(t)?t:G(t)}function Q(e,t){var n;void 0===t&&(t=[]);const r=G(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=j(r),a=o?[i].concat(i.visualViewport||[],$(r)?r:[]):r,l=t.concat(a);return o?l:l.concat(Q(a))}function ee(e,t,n){return"viewport"===t?h(function(e,t){const n=j(e),r=V(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;const e=I();(e||!e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:i,height:a,x:l,y:s}}(e,n)):L(t)?function(e,t){const n=B(e,!1,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft;return{top:r,left:o,x:o,y:r,right:o+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):h(function(e){var t;const n=V(e),r=q(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=M(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=M(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let l=-r.scrollLeft+z(e);const s=-r.scrollTop;return"rtl"===E(o||n).direction&&(l+=M(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:l,y:s}}(V(e)))}const te={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?function(e){let t=Q(e).filter((e=>L(e)&&"body"!==P(e))),n=e,r=null;for(;L(n)&&!W(n);){const e=E(n);"static"===e.position&&r&&["absolute","fixed"].includes(r.position)&&!F(n)?t=t.filter((e=>e!==n)):r=e,n=X(n)}return t}(t):[].concat(n),a=[...i,r],l=a[0],s=a.reduce(((e,n)=>{const r=ee(t,n,o);return e.top=M(r.top,e.top),e.right=H(r.right,e.right),e.bottom=H(r.bottom,e.bottom),e.left=M(r.left,e.left),e}),ee(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=N(n),i=V(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==P(n)||$(i))&&(a=q(n)),N(n))){const e=B(n,!0);l.x=e.x+n.clientLeft,l.y=e.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+l.x,y:t.y-a.scrollTop+l.y}},isElement:L,getDimensions:Z,getOffsetParent:K,getDocumentElement:V,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:Y(t,K(n),r),floating:{...Z(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===E(e).direction},ne=(e,t,n)=>(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=i.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));if(null==a&&console.error(["Floating UI: `platform` property was not passed to config. If you","want to use Floating UI on the web, install @floating-ui/dom","instead of the /core package. Otherwise, you can create your own","`platform`: https://floating-ui.com/docs/platform"].join(" ")),l.filter((e=>{let{name:t}=e;return"autoPlacement"===t||"flip"===t})).length>1)throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement` middleware","detected. This will lead to an infinite loop. Ensure only one of","either has been passed to the `middleware` array."].join(" "));e&&t||console.error(["Floating UI: The reference and/or floating element was not defined","when `computePosition()` was called. Ensure that both elements have","been created and can be measured."].join(" "));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=y(c,r,s),p=r,d={},m=0;for(let n=0;n<l.length;n++){const{name:i,fn:h}=l[n],{x:g,y:v,data:b,reset:w}=await h({x:u,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:d,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=g?g:u,f=null!=v?v:f,d={...d,[i]:{...d[i],...b}},m>50&&console.warn(["Floating UI: The middleware lifecycle appears to be running in an","infinite loop. This is usually caused by a `reset` continually","being returned without a break condition."].join(" ")),w&&m<=50&&(m++,"object"==typeof w&&(w.placement&&(p=w.placement),w.rects&&(c=!0===w.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:u,y:f}=y(c,p,s))),n=-1)}return{x:u,y:f,placement:p,strategy:o,middlewareData:d}})(e,t,{platform:te,...n}),re=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:o=10,strategy:i="absolute"})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{}};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{}};const a=[T(Number(o)),k(),(l={padding:5},void 0===l&&(l={}),{name:"shift",options:l,async fn(e){const{x:t,y:n,placement:r}=e,{mainAxis:o=!0,crossAxis:i=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=l,c={x:t,y:n},f=await g(e,s),d=p(u(r)),y="x"===d?"y":"x";let m=c[d],h=c[y];if(o){const e="y"===d?"bottom":"right";m=w(m+f["y"===d?"top":"left"],m,m-f[e])}if(i){const e="y"===y?"bottom":"right";h=w(h+f["y"===y?"top":"left"],h,h-f[e])}const v=a.fn({...e,[d]:m,[y]:h});return{...v,data:{x:v.x-t,y:v.y-n}}}})];var l;return n?(a.push((e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=null!=e?e:{},{x:o,y:i,placement:a,rects:l,platform:s}=t;if(null==n)return console.warn("Floating UI: No `element` was passed to the `arrow` middleware."),{};const c=m(r),u={x:o,y:i},y=p(a),h=f(a),g=d(y),v=await s.getDimensions(n),b="y"===y?"top":"left",x="y"===y?"bottom":"right",S=l.reference[g]+l.reference[y]-u[y]-l.floating[g],_=u[y]-l.reference[y],R=await(null==s.getOffsetParent?void 0:s.getOffsetParent(n));let k=R?"y"===y?R.clientHeight||0:R.clientWidth||0:0;0===k&&(k=l.floating[g]);const T=S/2-_/2,O=c[b],j=k-v[g]-c[x],E=k/2-v[g]/2+T,P=w(O,E,j),A=("start"===h?c[b]:c[x])>0&&E!==P&&l.reference[g]<=l.floating[g];return{[y]:u[y]-(A?E<O?O-E:j-E:0),data:{[y]:P,centerOffset:E-P}}}}))({element:n})),ne(e,t,{placement:r,strategy:i,middleware:a}).then((({x:e,y:t,placement:n,middlewareData:r})=>{const o={left:`${e}px`,top:`${t}px`},{x:i,y:a}=r.arrow;return{tooltipStyles:o,tooltipArrowStyles:{left:null!=i?`${i}px`:"",top:null!=a?`${a}px`:"",right:"",bottom:"",[{top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]]]:"-4px"}}}))):ne(e,t,{placement:"bottom",strategy:i,middleware:a}).then((({x:e,y:t})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{}})))};var oe={tooltip:"styles-module_tooltip__mnnfp",fixed:"styles-module_fixed__7ciUi",arrow:"styles-module_arrow__K0L3T",show:"styles-module_show__2NboJ",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 ie=({id:t=e.useId(),className:n,classNameArrow:o,variant:i="dark",anchorId:a,place:u="top",offset:f=10,events:p=["hover"],positionStrategy:d="absolute",wrapper:y="div",children:m=null,delayShow:h=0,delayHide:g=0,style:v,isHtmlContent:b=!1,content:w,isOpen:x,setIsOpen:S})=>{const _=e.createRef(),R=e.createRef(),k=e.useRef(),T=e.useRef(),[O,j]=e.useState({}),[E,P]=e.useState({}),[A,N]=e.useState(!1),L=e=>{S?S(e):void 0===x&&N(e)},C=()=>{S?S(!x):void 0===x&&N((e=>!e))},$=s((()=>{h?(k.current&&clearTimeout(k.current),k.current=setTimeout((()=>{L(!0)}),h)):L(!0),T.current&&clearTimeout(T.current)}),50),D=s((()=>{g?(T.current&&clearTimeout(T.current),T.current=setTimeout((()=>{L(!1)}),g)):L(!1),A&&k.current?clearTimeout(k.current):!A&&k.current&&(T.current=setTimeout((()=>{L(!1)}),2*h))}),50);return e.useEffect((()=>{const e=document.querySelector(`#${a}`);if(!e)return()=>{};const t=[];return p.find((e=>"click"===e))&&t.push({event:"click",listener:C}),p.find((e=>"hover"===e))&&t.push({event:"mouseenter",listener:$},{event:"mouseleave",listener:D},{event:"focus",listener:$},{event:"blur",listener:D}),t.forEach((({event:t,listener:n})=>{null==e||e.addEventListener(t,n)})),()=>{t.forEach((({event:t,listener:n})=>{null==e||e.removeEventListener(t,n)}))}}),[a,p,g,h]),e.useEffect((()=>{const e=document.querySelector(`#${a}`);return re({place:u,offset:f,elementReference:e,tooltipReference:_.current,tooltipArrowReference:R.current,strategy:d}).then((e=>{Object.keys(e.tooltipStyles).length&&j(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&P(e.tooltipArrowStyles)})),()=>{k.current=void 0,T.current=void 0}}),[A,x,a]),r.exports.jsxs(y,{id:t,role:"tooltip",className:l(oe.tooltip,oe[i],n,{[oe.show]:x||A,[oe.fixed]:"fixed"===d}),style:{...v,...O},ref:_,children:[m||(b?r.exports.jsx(c,{content:w}):w),r.exports.jsx("div",{className:l(oe.arrow,o),style:E,ref:R})]})},ae=["place","content","html","variant","offset","wrapper","events","delay-show","delay-hide"];exports.Tooltip=({id:t,anchorId:n,content:o,html:i,className:a,classNameArrow:l,variant:s="dark",place:c="top",offset:u=10,wrapper:f="div",children:p=null,events:d=["hover"],positionStrategy:y="absolute",delayShow:m=0,delayHide:h=0,style:g,getContent:v,isOpen:b,setIsOpen:w})=>{const[x,S]=e.useState(o||i),[_,R]=e.useState(c),[k,T]=e.useState(s),[O,j]=e.useState(u),[E,P]=e.useState(m),[A,N]=e.useState(h),[L,C]=e.useState(f),[$,D]=e.useState(d),[F,I]=e.useState(y),[W,H]=e.useState(Boolean(i)),M=e=>{const t=Object.keys(e);let n=null;const r={place:e=>{R(e)},content:e=>{H(!0),S(v?v(e):e)},html:e=>{H(!0),S(v?v(e):e)},variant:e=>{T(e)},offset:e=>{j(e)},wrapper:e=>{C(e)},events:e=>{const t=e.split(" ");D(t)},positionStrategy:e=>{I(e)},"delay-show":e=>{P(Number(e))},"delay-hide":e=>{N(Number(e))}};t.forEach((t=>{n=t.replace("data-tooltip-",""),ae.includes(n)&&r[n](e[t])}))};e.useEffect((()=>{if(!n)return()=>{};const e=document.querySelector(`#${n}`);if(!e)return()=>{};o&&v&&S(v(o));const t=new MutationObserver((t=>{t.forEach((t=>{if("attributes"===t.type){const n=(({element:e,attributeName:t})=>({[t]:e.getAttribute(t)}))({element:e,attributeName:t.attributeName});M(n)}}))}));t.observe(e,{attributes:!0,childList:!1,subtree:!1});const r=(e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>(n.includes("data-tooltip-")&&(t[n]=null==e?void 0:e.getAttribute(n)),t)),{}))(e);return M(r),()=>{t.disconnect()}}),[n]);const U={id:t,anchorId:n,className:a,classNameArrow:l,content:x,isHtmlContent:W,place:_,variant:k,offset:O,wrapper:L,events:$,positionStrategy:F,delayShow:E,delayHide:A,style:g,isOpen:b,setIsOpen:w};return p?r.exports.jsx(ie,{...U,children:p}):r.exports.jsx(ie,{...U})};
6
+ */i=a,function(){var e={}.hasOwnProperty;function t(){for(var n=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var i=typeof o;if("string"===i||"number"===i)n.push(o);else if(Array.isArray(o)){if(o.length){var a=t.apply(null,o);a&&n.push(a)}}else if("object"===i){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){n.push(o.toString());continue}for(var l in o)e.call(o,l)&&o[l]&&n.push(l)}}}return n.join(" ")}i.exports?(t.default=t,i.exports=t):window.classNames=t}();var l=a.exports;const s=(e,t,n)=>{let r=null;return function(...o){r&&clearTimeout(r),r=setTimeout((()=>{r=null,n||e.apply(this,o)}),t)}},c=({content:e})=>r.exports.jsx("span",{dangerouslySetInnerHTML:{__html:e}}),u={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},f=Object.assign((()=>u),u),p=e.createContext(f);function d(){return e.useContext(p)}function y(e){return e.split("-")[0]}function m(e){return e.split("-")[1]}function h(e){return["top","bottom"].includes(y(e))?"x":"y"}function g(e){return"y"===e?"height":"width"}function v(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,a=r.y+r.height/2-o.height/2,l=h(t),s=g(l),c=r[s]/2-o[s]/2,u="x"===l;let f;switch(y(t)){case"top":f={x:i,y:r.y-o.height};break;case"bottom":f={x:i,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:a};break;case"left":f={x:r.x-o.width,y:a};break;default:f={x:r.x,y:r.y}}switch(m(t)){case"start":f[l]-=c*(n&&u?-1:1);break;case"end":f[l]+=c*(n&&u?-1:1)}return f}function b(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function w(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function x(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=t,y=b(d),m=l[p?"floating"===f?"reference":"floating":f],h=w(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:s})),g=w(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===f?{...a.floating,x:r,y:o}:a.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),strategy:s}):a[f]);return{top:h.top-g.top+y.top,bottom:g.bottom-h.bottom+y.bottom,left:h.left-g.left+y.left,right:g.right-h.right+y.right}}const S=Math.min,_=Math.max;function R(e,t,n){return _(e,S(t,n))}const k={left:"right",right:"left",bottom:"top",top:"bottom"};function T(e){return e.replace(/left|right|bottom|top/g,(e=>k[e]))}const j={start:"end",end:"start"};function O(e){return e.replace(/start|end/g,(e=>j[e]))}const E=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:a,platform:l,elements:s}=t,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",flipAlignment:d=!0,...v}=e,b=y(r),w=f||(b===a||!d?[T(a)]:function(e){const t=T(e);return[O(e),t,O(t)]}(a)),S=[a,...w],_=await x(t,v),R=[];let k=(null==(n=o.flip)?void 0:n.overflows)||[];if(c&&R.push(_[b]),u){const{main:e,cross:t}=function(e,t,n){void 0===n&&(n=!1);const r=m(e),o=h(e),i=g(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=T(a)),{main:a,cross:T(a)}}(r,i,await(null==l.isRTL?void 0:l.isRTL(s.floating)));R.push(_[e],_[t])}if(k=[...k,{placement:r,overflows:R}],!R.every((e=>e<=0))){var j,E;const e=(null!=(j=null==(E=o.flip)?void 0:E.index)?j:0)+1,t=S[e];if(t)return{data:{index:e,overflows:k},reset:{placement:t}};let n="bottom";switch(p){case"bestFit":{var A;const e=null==(A=k.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:A[0].placement;e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}};const A=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=y(n),l=m(n),s="x"===h(n),c=["left","top"].includes(a)?-1:1,u=i&&s?-1:1,f="function"==typeof t?t(e):t;let{mainAxis:p,crossAxis:d,alignmentAxis:g}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return l&&"number"==typeof g&&(d="end"===l?-1*g:g),s?{x:d*u,y:p*c}:{x:p*c,y:d*u}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};function P(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function N(e){if(null==e)return window;if(!P(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function C(e){return N(e).getComputedStyle(e)}function L(e){return P(e)?"":e?(e.nodeName||"").toLowerCase():""}function $(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function D(e){return e instanceof N(e).HTMLElement}function W(e){return e instanceof N(e).Element}function I(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof N(e).ShadowRoot||e instanceof ShadowRoot}function F(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=C(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(o)}function H(e){return["table","td","th"].includes(L(e))}function M(e){const t=/firefox/i.test($()),n=C(e),r=n.backdropFilter||n.WebkitBackdropFilter;return"none"!==n.transform||"none"!==n.perspective||!!r&&"none"!==r||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some((e=>n.willChange.includes(e)))||["paint","layout","strict","content"].some((e=>{const t=n.contain;return null!=t&&t.includes(e)}))}function U(){return!/^((?!chrome|android).)*safari/i.test($())}function B(e){return["html","body","#document"].includes(L(e))}const V=Math.min,z=Math.max,q=Math.round;function Y(e,t,n){var r,o,i,a;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect();let s=1,c=1;t&&D(e)&&(s=e.offsetWidth>0&&q(l.width)/e.offsetWidth||1,c=e.offsetHeight>0&&q(l.height)/e.offsetHeight||1);const u=W(e)?N(e):window,f=!U()&&n,p=(l.left+(f&&null!=(r=null==(o=u.visualViewport)?void 0:o.offsetLeft)?r:0))/s,d=(l.top+(f&&null!=(i=null==(a=u.visualViewport)?void 0:a.offsetTop)?i:0))/c,y=l.width/s,m=l.height/c;return{width:y,height:m,top:d,right:p+y,bottom:d+m,left:p,x:p,y:d}}function X(e){return(t=e,(t instanceof N(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function J(e){return W(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function K(e){return Y(X(e)).left+J(e).scrollLeft}function Z(e,t,n){const r=D(t),o=X(t),i=Y(e,r&&function(e){const t=Y(e);return q(t.width)!==e.offsetWidth||q(t.height)!==e.offsetHeight}(t),"fixed"===n);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==L(t)||F(o))&&(a=J(t)),D(t)){const e=Y(t,!0);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=K(o));return{x:i.left+a.scrollLeft-l.x,y:i.top+a.scrollTop-l.y,width:i.width,height:i.height}}function G(e){if("html"===L(e))return e;const t=e.assignedSlot||e.parentNode||(I(e)?e.host:null)||X(e);return I(t)?t.host:t}function Q(e){return D(e)&&"fixed"!==C(e).position?e.offsetParent:null}function ee(e){const t=N(e);let n=Q(e);for(;n&&H(n)&&"static"===C(n).position;)n=Q(n);return n&&("html"===L(n)||"body"===L(n)&&"static"===C(n).position&&!M(n))?t:n||function(e){let t=G(e);for(;D(t)&&!B(t);){if(M(t))return t;t=G(t)}return null}(e)||t}function te(e){if(D(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Y(e);return{width:t.width,height:t.height}}function ne(e){const t=G(e);return B(t)?e.ownerDocument.body:D(t)&&F(t)?t:ne(t)}function re(e,t){var n;void 0===t&&(t=[]);const r=ne(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=N(r),a=o?[i].concat(i.visualViewport||[],F(r)?r:[]):r,l=t.concat(a);return o?l:l.concat(re(a))}function oe(e,t,n){return"viewport"===t?w(function(e,t){const n=N(e),r=X(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;const e=U();(e||!e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:i,height:a,x:l,y:s}}(e,n)):W(t)?function(e,t){const n=Y(e,!1,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft;return{top:r,left:o,x:o,y:r,right:o+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):w(function(e){var t;const n=X(e),r=J(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=z(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=z(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let l=-r.scrollLeft+K(e);const s=-r.scrollTop;return"rtl"===C(o||n).direction&&(l+=z(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:l,y:s}}(X(e)))}const ie={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?function(e){let t=re(e).filter((e=>W(e)&&"body"!==L(e))),n=e,r=null;for(;W(n)&&!B(n);){const e=C(n);"static"===e.position&&r&&["absolute","fixed"].includes(r.position)&&!M(n)?t=t.filter((e=>e!==n)):r=e,n=G(n)}return t}(t):[].concat(n),a=[...i,r],l=a[0],s=a.reduce(((e,n)=>{const r=oe(t,n,o);return e.top=z(r.top,e.top),e.right=V(r.right,e.right),e.bottom=V(r.bottom,e.bottom),e.left=z(r.left,e.left),e}),oe(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=D(n),i=X(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==L(n)||F(i))&&(a=J(n)),D(n))){const e=Y(n,!0);l.x=e.x+n.clientLeft,l.y=e.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+l.x,y:t.y-a.scrollTop+l.y}},isElement:W,getDimensions:te,getOffsetParent:ee,getDocumentElement:X,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:Z(t,ee(n),r),floating:{...te(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===C(e).direction},ae=(e,t,n)=>(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=i.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));if(null==a&&console.error(["Floating UI: `platform` property was not passed to config. If you","want to use Floating UI on the web, install @floating-ui/dom","instead of the /core package. Otherwise, you can create your own","`platform`: https://floating-ui.com/docs/platform"].join(" ")),l.filter((e=>{let{name:t}=e;return"autoPlacement"===t||"flip"===t})).length>1)throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement` middleware","detected. This will lead to an infinite loop. Ensure only one of","either has been passed to the `middleware` array."].join(" "));e&&t||console.error(["Floating UI: The reference and/or floating element was not defined","when `computePosition()` was called. Ensure that both elements have","been created and can be measured."].join(" "));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=v(c,r,s),p=r,d={},y=0;for(let n=0;n<l.length;n++){const{name:i,fn:m}=l[n],{x:h,y:g,data:b,reset:w}=await m({x:u,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:d,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=h?h:u,f=null!=g?g:f,d={...d,[i]:{...d[i],...b}},y>50&&console.warn(["Floating UI: The middleware lifecycle appears to be running in an","infinite loop. This is usually caused by a `reset` continually","being returned without a break condition."].join(" ")),w&&y<=50&&(y++,"object"==typeof w&&(w.placement&&(p=w.placement),w.rects&&(c=!0===w.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:u,y:f}=v(c,p,s))),n=-1)}return{x:u,y:f,placement:p,strategy:o,middlewareData:d}})(e,t,{platform:ie,...n}),le=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:o=10,strategy:i="absolute"})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{}};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{}};const a=[A(Number(o)),E(),(l={padding:5},void 0===l&&(l={}),{name:"shift",options:l,async fn(e){const{x:t,y:n,placement:r}=e,{mainAxis:o=!0,crossAxis:i=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=l,c={x:t,y:n},u=await x(e,s),f=h(y(r)),p="x"===f?"y":"x";let d=c[f],m=c[p];if(o){const e="y"===f?"bottom":"right";d=R(d+u["y"===f?"top":"left"],d,d-u[e])}if(i){const e="y"===p?"bottom":"right";m=R(m+u["y"===p?"top":"left"],m,m-u[e])}const g=a.fn({...e,[f]:d,[p]:m});return{...g,data:{x:g.x-t,y:g.y-n}}}})];var l;return n?(a.push((e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=null!=e?e:{},{x:o,y:i,placement:a,rects:l,platform:s}=t;if(null==n)return console.warn("Floating UI: No `element` was passed to the `arrow` middleware."),{};const c=b(r),u={x:o,y:i},f=h(a),p=m(a),d=g(f),y=await s.getDimensions(n),v="y"===f?"top":"left",w="y"===f?"bottom":"right",x=l.reference[d]+l.reference[f]-u[f]-l.floating[d],S=u[f]-l.reference[f],_=await(null==s.getOffsetParent?void 0:s.getOffsetParent(n));let k=_?"y"===f?_.clientHeight||0:_.clientWidth||0:0;0===k&&(k=l.floating[d]);const T=x/2-S/2,j=c[v],O=k-y[d]-c[w],E=k/2-y[d]/2+T,A=R(j,E,O),P=("start"===p?c[v]:c[w])>0&&E!==A&&l.reference[d]<=l.floating[d];return{[f]:u[f]-(P?E<j?j-E:O-E:0),data:{[f]:A,centerOffset:E-A}}}}))({element:n})),ae(e,t,{placement:r,strategy:i,middleware:a}).then((({x:e,y:t,placement:n,middlewareData:r})=>{var o,i;const a={left:`${e}px`,top:`${t}px`},{x:l,y:s}=null!==(o=r.arrow)&&void 0!==o?o:{x:0,y:0};return{tooltipStyles:a,tooltipArrowStyles:{left:null!=l?`${l}px`:"",top:null!=s?`${s}px`:"",right:"",bottom:"",[null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom"]:"-4px"}}}))):ae(e,t,{placement:"bottom",strategy:i,middleware:a}).then((({x:e,y:t})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{}})))};var se={tooltip:"styles-module_tooltip__mnnfp",fixed:"styles-module_fixed__7ciUi",arrow:"styles-module_arrow__K0L3T",show:"styles-module_show__2NboJ",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 ce=({id:t,className:n,classNameArrow:o,variant:i="dark",anchorId:a,place:u="top",offset:f=10,events:p=["hover"],positionStrategy:y="absolute",wrapper:m="div",children:h=null,delayShow:g=0,delayHide:v=0,style:b,isHtmlContent:w=!1,content:x,isOpen:S,setIsOpen:_})=>{const R=e.useRef(null),k=e.useRef(null),T=e.useRef(null),j=e.useRef(null),[O,E]=e.useState({}),[A,P]=e.useState({}),[N,C]=e.useState(!1),[L,$]=e.useState(!1),{anchorRefs:D,setActiveAnchor:W}=d()(t),[I,F]=e.useState({current:null}),H=e=>{_?_(e):void 0===S&&C(e)},M=()=>{_?_(!S):void 0===S&&C((e=>!e))},U=s((e=>{e&&(g?(T.current&&clearTimeout(T.current),T.current=setTimeout((()=>{H(!0)}),g)):H(!0),F((t=>t.current===e.target?t:{current:e.target})),W({current:e.target}),j.current&&clearTimeout(j.current))}),50),B=s((()=>{v?(j.current&&clearTimeout(j.current),j.current=setTimeout((()=>{H(!1)}),v)):H(!1),T.current&&clearTimeout(T.current)}),50);return e.useEffect((()=>{const e=new Set(D),t=document.querySelector(`[id='${a}']`);if(t&&(F((e=>e.current===t?e:{current:t})),e.add({current:t})),!e.size)return()=>{};const n=[];return p.find((e=>"click"===e))&&n.push({event:"click",listener:M}),p.find((e=>"hover"===e))&&n.push({event:"mouseenter",listener:U},{event:"mouseleave",listener:B},{event:"focus",listener:U},{event:"blur",listener:B}),n.forEach((({event:t,listener:n})=>{e.forEach((e=>{var r;null===(r=e.current)||void 0===r||r.addEventListener(t,n)}))})),()=>{n.forEach((({event:t,listener:n})=>{e.forEach((e=>{var r;null===(r=e.current)||void 0===r||r.removeEventListener(t,n)}))}))}}),[D,a,p,v,g]),e.useEffect((()=>{let e=I.current;a&&(e=document.querySelector(`[id='${a}']`)),$(!0);let t=!0;return le({place:u,offset:f,elementReference:e,tooltipReference:R.current,tooltipArrowReference:k.current,strategy:y}).then((e=>{t&&($(!1),Object.keys(e.tooltipStyles).length&&E(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&P(e.tooltipArrowStyles))})),()=>{t=!1}}),[N,S,a,I,x,u,f,y]),e.useEffect((()=>()=>{T.current&&clearTimeout(T.current),j.current&&clearTimeout(j.current)}),[]),r.exports.jsxs(m,{id:t,role:"tooltip",className:l(se.tooltip,se[i],n,{[se.show]:!L&&(S||N),[se.fixed]:"fixed"===y}),style:{...b,...O},ref:R,children:[h||(w?r.exports.jsx(c,{content:x}):x),r.exports.jsx("div",{className:l(se.arrow,o),style:A,ref:k})]})};exports.Tooltip=({id:t,anchorId:n,content:o,html:i,className:a,classNameArrow:l,variant:s="dark",place:c="top",offset:u=10,wrapper:f="div",children:p=null,events:y=["hover"],positionStrategy:m="absolute",delayShow:h=0,delayHide:g=0,style:v,isOpen:b,setIsOpen:w})=>{const[x,S]=e.useState(o||i),[_,R]=e.useState(c),[k,T]=e.useState(s),[j,O]=e.useState(u),[E,A]=e.useState(h),[P,N]=e.useState(g),[C,L]=e.useState(f),[$,D]=e.useState(y),[W,I]=e.useState(m),[F,H]=e.useState(Boolean(i)),{anchorRefs:M,activeAnchor:U}=d()(t),B=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var r;if(n.startsWith("data-tooltip-")){t[n.replace(/^data-tooltip-/,"")]=null!==(r=null==e?void 0:e.getAttribute(n))&&void 0!==r?r:null}return t}),{}),V=e=>{const t={place:e=>{var t;R(null!==(t=e)&&void 0!==t?t:c)},content:e=>{H(!1),S(null!=e?e:o)},html:e=>{var t;H(!!e),S(null!==(t=null!=e?e:i)&&void 0!==t?t:o)},variant:e=>{var t;T(null!==(t=e)&&void 0!==t?t:s)},offset:e=>{O(null===e?u:Number(e))},wrapper:e=>{var t;L(null!==(t=e)&&void 0!==t?t:"div")},events:e=>{const t=null==e?void 0:e.split(" ");D(null!=t?t:y)},"position-strategy":e=>{var t;I(null!==(t=e)&&void 0!==t?t:m)},"delay-show":e=>{A(null===e?h:Number(e))},"delay-hide":e=>{N(null===e?g:Number(e))}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var r;null===(r=t[e])||void 0===r||r.call(t,n)}))};e.useEffect((()=>{o&&S(o),i&&S(i)}),[o,i]),e.useEffect((()=>{var e;const t=new Set(M),r=document.querySelector(`[id='${n}']`);if(r&&t.add({current:r}),!t.size)return()=>{};const o=new MutationObserver((e=>{e.forEach((e=>{var t;if(!U.current||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=B(U.current);V(n)}))})),i={attributes:!0,childList:!1,subtree:!1},a=null!==(e=U.current)&&void 0!==e?e:r;if(a){const e=B(a);V(e),o.observe(a,i)}return()=>{o.disconnect()}}),[M,U,n]);const z={id:t,anchorId:n,className:a,classNameArrow:l,content:x,isHtmlContent:F,place:_,variant:k,offset:j,wrapper:C,events:$,positionStrategy:W,delayShow:E,delayHide:P,style:v,isOpen:b,setIsOpen:w};return p?r.exports.jsx(ce,{...z,children:p}):r.exports.jsx(ce,{...z})},exports.TooltipProvider=({children:t})=>{const n=e.useId(),[o,i]=e.useState({[n]:new Set}),[a,l]=e.useState({[n]:{current:null}}),s=(e,...t)=>{i((n=>{var r;const o=null!==(r=n[e])&&void 0!==r?r:new Set;return t.forEach((e=>o.add(e))),{...n,[e]:new Set(o)}}))},c=(e,...t)=>{i((n=>{const r=n[e];return r?(t.forEach((e=>r.delete(e))),{...n}):n}))},u=e.useCallback((e=>{var t,r;return{anchorRefs:null!==(t=o[null!=e?e:n])&&void 0!==t?t:new Set,activeAnchor:null!==(r=a[null!=e?e:n])&&void 0!==r?r:{current:null},attach:(...t)=>s(null!=e?e:n,...t),detach:(...t)=>c(null!=e?e:n,...t),setActiveAnchor:t=>((e,t)=>{l((n=>{var r;return(null===(r=n[e])||void 0===r?void 0:r.current)===t.current?n:{...n,[e]:t}}))})(null!=e?e:n,t)}}),[n,o,a,s,c]),f=e.useMemo((()=>{const e=u(n);return Object.assign((e=>u(e)),e)}),[u]);return r.exports.jsx(p.Provider,{value:f,children:t})},exports.TooltipWrapper=({tooltipId:t,children:n,place:o,content:i,html:a,variant:l,offset:s,wrapper:c,events:u,positionStrategy:f,delayShow:p,delayHide:y})=>{const{attach:m,detach:h}=d()(t),g=e.useRef(null);return e.useEffect((()=>(m(g),()=>{h(g)})),[]),r.exports.jsx("span",{ref:g,"data-tooltip-place":o,"data-tooltip-content":i,"data-tooltip-html":a,"data-tooltip-variant":l,"data-tooltip-offset":s,"data-tooltip-wrapper":c,"data-tooltip-events":u,"data-tooltip-position-strategy":f,"data-tooltip-delay-show":p,"data-tooltip-delay-hide":y,children:n})};
@@ -1,4 +1,4 @@
1
- import { ElementType, Element, ReactNode, CSSProperties } from 'react';
1
+ import React, { ElementType, Element, ReactNode, CSSProperties, PropsWithChildren } from 'react';
2
2
 
3
3
  type PlacesType = 'top' | 'right' | 'bottom' | 'left'
4
4
 
@@ -15,7 +15,7 @@ type PositionStrategy = 'absolute' | 'fixed'
15
15
  interface ITooltipController {
16
16
  className?: string
17
17
  classNameArrow?: string
18
- content?: string | number
18
+ content?: string
19
19
  html?: string
20
20
  place?: PlacesType
21
21
  offset?: number
@@ -28,12 +28,46 @@ interface ITooltipController {
28
28
  positionStrategy?: PositionStrategy
29
29
  delayShow?: number
30
30
  delayHide?: number
31
- getContent?: (value) => string
32
31
  style?: CSSProperties
33
32
  isOpen?: boolean
34
33
  setIsOpen?: (value: boolean) => void
35
34
  }
36
35
 
37
- declare const TooltipController: ({ id, anchorId, content, html, className, classNameArrow, variant, place, offset, wrapper, children, events, positionStrategy, delayShow, delayHide, style, getContent, isOpen, setIsOpen, }: ITooltipController) => JSX.Element;
36
+ declare module 'react' {
37
+ interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
38
+ 'data-tooltip-place'?: PlacesType
39
+ 'data-tooltip-content'?: string
40
+ 'data-tooltip-html'?: string
41
+ 'data-tooltip-variant'?: VariantType
42
+ 'data-tooltip-offset'?: number
43
+ 'data-tooltip-wrapper'?: WrapperType
44
+ 'data-tooltip-events'?: EventsType[]
45
+ 'data-tooltip-position-strategy'?: PositionStrategy
46
+ 'data-tooltip-delay-show'?: number
47
+ 'data-tooltip-delay-hide'?: number
48
+ }
49
+ }
50
+
51
+ declare const TooltipController: ({ id, anchorId, content, html, className, classNameArrow, variant, place, offset, wrapper, children, events, positionStrategy, delayShow, delayHide, style, isOpen, setIsOpen, }: ITooltipController) => JSX.Element;
52
+
53
+ interface ITooltipWrapper {
54
+ tooltipId?: string
55
+ children: ReactNode
56
+
57
+ place?: ITooltipController['place']
58
+ content?: ITooltipController['content']
59
+ html?: ITooltipController['html']
60
+ variant?: ITooltipController['variant']
61
+ offset?: ITooltipController['offset']
62
+ wrapper?: ITooltipController['wrapper']
63
+ events?: ITooltipController['events']
64
+ positionStrategy?: ITooltipController['positionStrategy']
65
+ delayShow?: ITooltipController['delayShow']
66
+ delayHide?: ITooltipController['delayHide']
67
+ }
68
+
69
+ declare const TooltipProvider: React.FC<PropsWithChildren>;
70
+
71
+ declare const TooltipWrapper: ({ tooltipId, children, place, content, html, variant, offset, wrapper, events, positionStrategy, delayShow, delayHide, }: ITooltipWrapper) => JSX.Element;
38
72
 
39
- export { TooltipController as Tooltip };
73
+ export { TooltipController as Tooltip, TooltipProvider, TooltipWrapper };