Fixes tradingview/charting_library#60 Fixes tradingview/charting_library#65 Fixes tradingview/charting_library#70 Fixes tradingview/charting_library#71 Fixes tradingview/charting_library#75 Fixes tradingview/charting_library#76 Fixes tradingview/charting_library#78 Fixes tradingview/charting_library#79 Fixes tradingview/charting_library#81 Fixes tradingview/charting_library#82 Fixes tradingview/charting_library#84 Fixes tradingview/charting_library#86 Fixes tradingview/charting_library#89 Fixes tradingview/charting_library#90 Fixes tradingview/charting_library#91 Fixes tradingview/charting_library#92 Fixes tradingview/charting_library#94 Fixes tradingview/charting_library#99 Fixes tradingview/charting_library#100 Fixes tradingview/charting_library#101 Fixes tradingview/charting_library#102 Fixes tradingview/charting_library#103 Fixes tradingview/charting_library#1995 Fixes tradingview/charting_library#5726 Fixes tradingview/charting_library#6025 Fixes tradingview/charting_library#6406 Fixes tradingview/charting_library#6636 Fixes tradingview/charting_library#6767 Fixes tradingview/charting_library#6775 Fixes tradingview/charting_library#6783 Fixes tradingview/charting_library#6864 Fixes tradingview/charting_library#6926 Fixes tradingview/charting_library#7060 Fixes tradingview/charting_library#7169 Fixes tradingview/charting_library#7307
7 lines
20 KiB
JavaScript
7 lines
20 KiB
JavaScript
(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[9039],{59142:function(e,t){var n,r,o;r=[t],n=function(e){"use strict";function t(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(e,"__esModule",{value:!0});var n=!1;if("undefined"!=typeof window){var r={get passive(){n=!0}};window.addEventListener("testPassive",null,r),window.removeEventListener("testPassive",null,r)}var o="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&/iP(ad|hone|od)/.test(window.navigator.platform),a=[],l=!1,s=-1,u=void 0,c=void 0,i=function(e){return a.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},f=function(e){var t=e||window.event;return!!i(t.target)||1<t.touches.length||(t.preventDefault&&t.preventDefault(),!1)},d=function(){setTimeout((function(){void 0!==c&&(document.body.style.paddingRight=c,c=void 0),void 0!==u&&(document.body.style.overflow=u,u=void 0)}))};e.disableBodyScroll=function(e,r){if(o){if(!e)return void console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");if(e&&!a.some((function(t){return t.targetElement===e}))){var d={targetElement:e,options:r||{}};a=[].concat(t(a),[d]),e.ontouchstart=function(e){1===e.targetTouches.length&&(s=e.targetTouches[0].clientY)},e.ontouchmove=function(t){var n,r,o,a;1===t.targetTouches.length&&(r=e,a=(n=t).targetTouches[0].clientY-s,!i(n.target)&&(r&&0===r.scrollTop&&0<a||(o=r)&&o.scrollHeight-o.scrollTop<=o.clientHeight&&a<0?f(n):n.stopPropagation()))},l||(document.addEventListener("touchmove",f,n?{passive:!1}:void 0),l=!0)}}else{m=r,setTimeout((function(){if(void 0===c){var e=!!m&&!0===m.reserveScrollBarGap,t=window.innerWidth-document.documentElement.clientWidth;e&&0<t&&(c=document.body.style.paddingRight,document.body.style.paddingRight=t+"px")}void 0===u&&(u=document.body.style.overflow,document.body.style.overflow="hidden")}));var p={targetElement:e,options:r||{}};a=[].concat(t(a),[p])}var m},e.clearAllBodyScrollLocks=function(){o?(a.forEach((function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null})),l&&(document.removeEventListener("touchmove",f,n?{passive:!1}:void 0),l=!1),a=[],s=-1):(d(),a=[])},e.enableBodyScroll=function(e){if(o){if(!e)return void console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");e.ontouchstart=null,e.ontouchmove=null,a=a.filter((function(t){return t.targetElement!==e})),l&&0===a.length&&(document.removeEventListener("touchmove",f,n?{passive:!1}:void 0),l=!1)}else 1===a.length&&a[0].targetElement===e?(d(),a=[]):a=a.filter((function(t){return t.targetElement!==e}))}},void 0===(o="function"==typeof n?n.apply(t,r):n)||(e.exports=o)},97754:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n
|
|
;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)&&n.length){var l=o.apply(null,n);l&&e.push(l)}else if("object"===a)for(var s in n)r.call(n,s)&&n[s]&&e.push(s)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},45966:e=>{e.exports={"default-drawer-min-top-distance":"100px",wrap:"wrap-yBUNQyVA",positionBottom:"positionBottom-yBUNQyVA",backdrop:"backdrop-yBUNQyVA",drawer:"drawer-yBUNQyVA",positionLeft:"positionLeft-yBUNQyVA"}},39640:(e,t,n)=>{"use strict";function r(e,t,n,r,o){function a(o){if(e>o.timeStamp)return;const a=o.target;void 0!==n&&null!==t&&null!==a&&a.ownerDocument===r&&(t.contains(a)||n(o))}return o.click&&r.addEventListener("click",a,!1),o.mouseDown&&r.addEventListener("mousedown",a,!1),o.touchEnd&&r.addEventListener("touchend",a,!1),o.touchStart&&r.addEventListener("touchstart",a,!1),()=>{r.removeEventListener("click",a,!1),r.removeEventListener("mousedown",a,!1),r.removeEventListener("touchend",a,!1),r.removeEventListener("touchstart",a,!1)}}n.d(t,{addOutsideEventListener:()=>r})},37558:(e,t,n)=>{"use strict";n.d(t,{DrawerManager:()=>a,DrawerContext:()=>l});var r=n(50959),o=n(99054);class a extends r.PureComponent{constructor(e){super(e),this._isBodyFixed=!1,this._addDrawer=e=>{this.setState((t=>({stack:[...t.stack,e]})))},this._removeDrawer=e=>{this.setState((t=>({stack:t.stack.filter((t=>t!==e))})))},this.state={stack:[]}}componentDidUpdate(e,t){!t.stack.length&&this.state.stack.length&&((0,o.setFixedBodyState)(!0),this._isBodyFixed=!0),t.stack.length&&!this.state.stack.length&&this._isBodyFixed&&((0,o.setFixedBodyState)(!1),this._isBodyFixed=!1)}componentWillUnmount(){this.state.stack.length&&this._isBodyFixed&&(0,o.setFixedBodyState)(!1)}render(){return r.createElement(l.Provider,{value:{addDrawer:this._addDrawer,removeDrawer:this._removeDrawer,currentDrawer:this.state.stack.length?this.state.stack[this.state.stack.length-1]:null}},this.props.children)}}const l=r.createContext(null)},41590:(e,t,n)=>{"use strict";n.d(t,{Drawer:()=>d});var r=n(50959),o=n(50151),a=n(97754),l=n(68671),s=n(65718),u=n(37558),c=n(29197),i=n(86656),f=n(45966);function d(e){const{position:t="Bottom",onClose:n,children:d,className:p,theme:m=f}=e,v=(0,o.ensureNotNull)((0,r.useContext)(u.DrawerContext)),[y]=(0,r.useState)((()=>(0,l.randomHash)())),h=(0,r.useRef)(null),g=(0,r.useContext)(c.CloseDelegateContext);return(0,r.useLayoutEffect)((()=>((0,o.ensureNotNull)(h.current).focus({preventScroll:!0}),g.subscribe(v,n),v.addDrawer(y),()=>{v.removeDrawer(y),g.unsubscribe(v,n)})),[]),r.createElement(s.Portal,null,r.createElement("div",{className:a(f.wrap,f[`position${t}`])},y===v.currentDrawer&&r.createElement("div",{className:f.backdrop,onClick:n}),r.createElement(i.TouchScrollContainer,{className:a(f.drawer,m.drawer,f[`position${t}`],p),tabIndex:-1,ref:h,"data-name":e["data-name"]},d)))}},50628:(e,t,n)=>{"use strict";n.d(t,{PopupMenu:()=>i});var r=n(50959),o=n(962),a=n(62942),l=n(65718),s=n(27317),u=n(29197),c=n(58095);function i(e){
|
|
const{controller:t,children:n,isOpened:i,closeOnClickOutside:f=!0,doNotCloseOn:d,onClickOutside:p,onClose:m,onKeyboardClose:v,"data-name":y="popup-menu-container",...h}=e,g=(0,r.useContext)(u.CloseDelegateContext),C=(0,c.useOutsideEvent)({handler:function(e){p&&p(e);if(!f)return;const t=(0,a.default)(d)?d():d;if(t&&e.target instanceof Node){const n=o.findDOMNode(t);if(n instanceof Node&&n.contains(e.target))return}m()},mouseDown:!0,touchStart:!0});return i?r.createElement(l.Portal,{top:"0",left:"0",right:"0",bottom:"0",pointerEvents:"none"},r.createElement("span",{ref:C,style:{pointerEvents:"auto"}},r.createElement(s.Menu,{...h,onClose:m,onKeyboardClose:v,onScroll:function(t){const{onScroll:n}=e;n&&n(t)},customCloseDelegate:g,ref:t,"data-name":y},n))):null}},86656:(e,t,n)=>{"use strict";n.d(t,{TouchScrollContainer:()=>s});var r=n(50959),o=n(59142),a=n(50151),l=n(49483);const s=(0,r.forwardRef)(((e,t)=>{const{children:n,...a}=e,s=(0,r.useRef)(null);return(0,r.useImperativeHandle)(t,(()=>s.current)),(0,r.useLayoutEffect)((()=>{if(l.CheckMobile.iOS())return null!==s.current&&(0,o.disableBodyScroll)(s.current,{allowTouchMove:u(s)}),()=>{null!==s.current&&(0,o.enableBodyScroll)(s.current)}}),[]),r.createElement("div",{ref:s,...a},n)}));function u(e){return t=>{const n=(0,a.ensureNotNull)(e.current),r=document.activeElement;return!n.contains(t)||null!==r&&n.contains(r)&&r.contains(t)}}},40173:(e,t,n)=>{"use strict";function r(e,t,n={}){return Object.assign({},e,function(e,t,n={}){const r=Object.assign({},t);for(const o of Object.keys(t)){const a=n[o]||o;a in e&&(r[o]=[e[a],t[o]].join(" "))}return r}(e,t,n))}n.d(t,{mergeThemes:()=>r})},95257:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.iterator;var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,y={};function h(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||m}function g(){}function C(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||m}h.prototype.isReactComponent={},h.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},h.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},g.prototype=h.prototype;var w=C.prototype=new g;w.constructor=C,v(w,h.prototype),w.isPureReactComponent=!0;var E=Array.isArray,b=Object.prototype.hasOwnProperty,k={current:null},S={key:!0,ref:!0,__self:!0,__source:!0};function R(e,t,r){var o,a={},l=null,s=null;if(null!=t)for(o in void 0!==t.ref&&(s=t.ref),
|
|
void 0!==t.key&&(l=""+t.key),t)b.call(t,o)&&!S.hasOwnProperty(o)&&(a[o]=t[o]);var u=arguments.length-2;if(1===u)a.children=r;else if(1<u){for(var c=Array(u),i=0;i<u;i++)c[i]=arguments[i+2];a.children=c}if(e&&e.defaultProps)for(o in u=e.defaultProps)void 0===a[o]&&(a[o]=u[o]);return{$$typeof:n,type:e,key:l,ref:s,props:a,_owner:k.current}}function _(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var x=/\/+/g;function N(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function O(e,t,o,a,l){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var u=!1;if(null===e)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case n:case r:u=!0}}if(u)return l=l(u=e),e=""===a?"."+N(u,0):a,E(l)?(o="",null!=e&&(o=e.replace(x,"$&/")+"/"),O(l,t,o,"",(function(e){return e}))):null!=l&&(_(l)&&(l=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(l,o+(!l.key||u&&u.key===l.key?"":(""+l.key).replace(x,"$&/")+"/")+e)),t.push(l)),1;if(u=0,a=""===a?".":a+":",E(e))for(var c=0;c<e.length;c++){var i=a+N(s=e[c],c);u+=O(s,t,o,i,l)}else if(i=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"==typeof i)for(e=i.call(e),c=0;!(s=e.next()).done;)u+=O(s=s.value,t,o,i=a+N(s,c++),l);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return u}function D(e,t,n){if(null==e)return e;var r=[],o=0;return O(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function T(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var B={current:null},M={transition:null},A={ReactCurrentDispatcher:B,ReactCurrentBatchConfig:M,ReactCurrentOwner:k};t.Children={map:D,forEach:function(e,t,n){D(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return D(e,(function(){t++})),t},toArray:function(e){return D(e,(function(e){return e}))||[]},only:function(e){if(!_(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=h,t.Fragment=o,t.Profiler=l,t.PureComponent=C,t.StrictMode=a,t.Suspense=i,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=A,t.cloneElement=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=v({},e.props),a=e.key,l=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(l=t.ref,s=k.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps
|
|
;for(c in t)b.call(t,c)&&!S.hasOwnProperty(c)&&(o[c]=void 0===t[c]&&void 0!==u?u[c]:t[c])}var c=arguments.length-2;if(1===c)o.children=r;else if(1<c){u=Array(c);for(var i=0;i<c;i++)u[i]=arguments[i+2];o.children=u}return{$$typeof:n,type:e.type,key:a,ref:l,props:o,_owner:s}},t.createContext=function(e){return(e={$$typeof:u,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=R,t.createFactory=function(e){var t=R.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=_,t.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:T}},t.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=M.transition;M.transition={};try{e()}finally{M.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return B.current.useCallback(e,t)},t.useContext=function(e){return B.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return B.current.useDeferredValue(e)},t.useEffect=function(e,t){return B.current.useEffect(e,t)},t.useId=function(){return B.current.useId()},t.useImperativeHandle=function(e,t,n){return B.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return B.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return B.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return B.current.useMemo(e,t)},t.useReducer=function(e,t,n){return B.current.useReducer(e,t,n)},t.useRef=function(e){return B.current.useRef(e)},t.useState=function(e){return B.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return B.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return B.current.useTransition()},t.version="18.2.0"},50959:(e,t,n)=>{"use strict";e.exports=n(95257)},51150:e=>{e.exports={drawer:"drawer-VW29iqAD",drawerItem:"drawerItem-VW29iqAD",menuWrap:"menuWrap-VW29iqAD",menuBox:"menuBox-VW29iqAD",card:"card-VW29iqAD",cardRow:"cardRow-VW29iqAD",mini:"mini-VW29iqAD",fadeTop:"fadeTop-VW29iqAD",fadeBottom:"fadeBottom-VW29iqAD"}},31726:e=>{e.exports={content:"content-meCuRfZr",titleWrapper:"titleWrapper-meCuRfZr",title:"title-meCuRfZr",subtitle:"subtitle-meCuRfZr",text:"text-meCuRfZr",icon:"icon-meCuRfZr",group:"group-meCuRfZr",groupIcon:"groupIcon-meCuRfZr",beforeMarketOpen:"beforeMarketOpen-meCuRfZr",afterMarketClose:"afterMarketClose-meCuRfZr",groupTitle:"groupTitle-meCuRfZr",groupRow:"groupRow-meCuRfZr",groupCell:"groupCell-meCuRfZr",link:"link-meCuRfZr",mob:"mob-meCuRfZr",mini:"mini-meCuRfZr",newsContent:"newsContent-meCuRfZr"}},36647:(e,t,n)=>{"use strict";n.r(t),n.d(t,{showLollipopTooltip:()=>T});var r=n(50959),o=n(962),a=n(50151),l=n(97754),s=n.n(l);function u(e,t,n){(0,r.useEffect)((()=>{const r=new IntersectionObserver((e=>{e[e.length-1].intersectionRatio<.25?n():t()}),{
|
|
threshold:[0,.25,.5,.75,1],root:null,rootMargin:"0px"});return e.current&&r.observe(e.current),()=>r.disconnect()}),[])}var c=n(90692),i=n(41590),f=n(37558),d=n(50628),p=n(68335),m=n(59064),v=n(65665);const y=(0,r.forwardRef)(((e,t)=>{const{onClose:n,onForceClose:o,onClickOutside:a,className:l,customCloseSubscriptions:s=[],...u}=e,c=(0,r.useRef)(null),i=(0,r.useCallback)((e=>{27===(0,p.hashFromEvent)(e)&&o()}),[o]),f=(0,r.useCallback)((()=>{(0,m.globalCloseMenu)(),o()}),[o]),y=(0,r.useCallback)((()=>{c.current&&c.current.focus({preventScroll:!0})}),[]);return(0,r.useEffect)((()=>{const e=(t=f,window.addEventListener("scroll",t),()=>window.removeEventListener("scroll",t));var t;const n=s&&function(e,t){for(const n of e)n.subscribe(null,t);return()=>{for(const n of e)n.unsubscribe(null,t)}}(s,f);return()=>{e(),(0,v.isFunction)(n)&&n()}}),[s,f]),r.createElement(d.PopupMenu,{className:l,isOpened:!0,tabIndex:-1,reference:e=>{"function"==typeof t?t(e):(0,v.isObject)(t)&&(t.current=e),c.current=e},onClose:n,onClickOutside:a,onKeyDown:i,onOpen:y,...u},e.children)}));var h,g=n(40173),C=n(27317),w=n(9745),E=n(31726);function b(e){const{name:t,value:n,style:o,valueStyle:a,onValueClick:l,valueRightIcon:u,className:c}=e;return r.createElement("div",{className:s()(E.groupRow,c),style:o},t&&r.createElement("div",{className:E.groupCell},r.createElement("span",{className:E.text},t)),r.createElement("div",{className:E.groupCell},r.createElement("span",{className:E.text,style:a,onClick:l},n),u&&r.createElement(w.Icon,{icon:u.iconContent,className:s()(E.groupIcon,u.iconClass,"apply-common-tooltip"),title:u.tooltipText})))}function k(e){const{text:t,href:n,onClick:o}=e;return r.createElement("a",{href:n,onClick:o&&(e=>{e.preventDefault(),o()}),className:E.link},t)}function S(e){var t;const{cardType:n,anchor:o,...a}=e,l=n?s()(E.content,E[n]):E.content;return r.createElement("div",{className:l},e.title&&r.createElement("div",{className:s()(E.titleWrapper,e.cardRowClass)},e.tooltipIcon&&r.createElement(w.Icon,{icon:e.tooltipIcon,className:E.icon,style:{color:null===(t=e.style)||void 0===t?void 0:t.color}}),r.createElement("span",{className:E.title},e.title)),"common"===a.type&&r.createElement(R,{...a}),"news"===a.type&&r.createElement(_,{cardType:n,...a}),o&&("mob"!==n||!o.hideInMobileMode)&&r.createElement("div",{className:s()(E.group,e.cardRowClass)},r.createElement(k,{...o})))}function R(e){const{content:t=[],subTitle:n,cardRowClass:o}=e,a=t.map(((e,t)=>{const{title:n,content:o}=e;return r.createElement("div",{key:`group${t}`,className:E.group},n&&r.createElement("span",{className:E.groupTitle},n),o.map(((e,t)=>r.createElement(b,{key:`contentRow${t}`,...e}))))})),l="string"==typeof n?n:n.map(((e,t)=>r.createElement(b,{key:`subTitle${t}`,...e})));return r.createElement("div",{className:o},r.createElement("span",{className:E.subtitle},l),a.length>0&&r.createElement("div",null,a))}function _(e){return null}!function(e){e[e.BeforeMarketOpen=E.beforeMarketOpen]="BeforeMarketOpen",e[e.AfterMarketClose=E.afterMarketClose]="AfterMarketClose"
|
|
}(h||(h={}));var x=n(51150);const N=(0,g.mergeThemes)(C.DEFAULT_MENU_THEME,{menuWrap:x.menuWrap,menuBox:x.menuBox});function O(e){const{tooltips:t,onClose:n,onForceClose:o,onClickOutside:a,position:l,customCloseSubscriptions:d,showScrollFades:p,cardType:m,doNotCloseOn:v}=e,h=(0,r.useRef)(null),g=(0,r.useRef)(null),C=(0,r.useRef)(null),w=(0,r.useRef)(null),[E,b]=(0,r.useState)("100%"),k=e=>{null!==e&&b(`${e.clientWidth}px`)},[R,_]=(0,r.useState)(!1);u(C,(()=>_(!1)),(()=>_(!0)));const O={display:R?"block":"none",width:E},[D,T]=(0,r.useState)(!1);u(w,(()=>T(!1)),(()=>T(!0)));const B={display:D?"block":"none",width:E},M=m?s()(x.card,x[m]):x.card;return r.createElement(f.DrawerManager,null,r.createElement(c.MatchMedia,{rule:"screen and (max-width: 419px)"},(e=>e?r.createElement(i.Drawer,{className:x.drawer,onClose:o||n,position:"Bottom"},t.map(((e,t)=>r.createElement("div",{key:`${t}`,className:x.drawerItem},r.createElement(S,{cardType:"mob",...e}))))):r.createElement(y,{position:l,theme:N,onClose:n,onForceClose:o||n,onClickOutside:a,doNotCloseOn:v,customCloseSubscriptions:d},p&&r.createElement(r.Fragment,null,r.createElement("div",{ref:h,className:x.fadeTop,style:O}),r.createElement("div",{ref:C})),r.createElement("div",{ref:k},t.map(((e,t)=>{var n;return r.createElement("div",{key:`${t}`,className:M,style:{borderColor:null===(n=e.style)||void 0===n?void 0:n.color}},r.createElement(S,{cardType:m,...e,cardRowClass:x.cardRow}))}))),p&&r.createElement(r.Fragment,null,r.createElement("div",{ref:w}),r.createElement("div",{ref:g,className:x.fadeBottom,style:B}))))))}let D=null;function T(e){if(!e.items.length)return()=>{};const t={tooltips:e.items,onClose:B,onForceClose:()=>{B(),"function"==typeof e.onCustomClose&&e.onCustomClose()},onClickOutside:e.onClickOutside,doNotCloseOn:e.doNotCloseOn,position:M.bind(null,e.position),customCloseSubscriptions:e.customCloseSubscriptions,showScrollFades:e.showScrollFades,cardType:e.cardType};return null===D&&(D=document.createElement("div"),document.body.appendChild(D)),o.render(r.createElement(O,{...t}),D),B}function B(){null!==D&&(o.unmountComponentAtNode(D),D.remove(),D=null)}function M(e,t,n){const r=e.target,o=r.getBoundingClientRect(),l=o.width-e.targetSize.width,s=o.height-e.targetSize.height,u=(0,a.ensureNotNull)(r.closest(".chart-container")),c=u.getBoundingClientRect(),i=(0,a.ensureNotNull)(u.parentElement).getBoundingClientRect(),f=o.left+e.point.x+l,d=Math.round(f-t/2),p=Math.min(d+t,c.right,i.right);let m,v,y=Math.max(p-t,c.left,i.left);y+t>=i.right&&(y=i.right-t);const h=c.bottom-(o.top+e.point.y+s),g=c.height-h-e.marginTop;return g<n?(v=e.marginTop+c.top,m=Math.max(g,0)):v=c.height+c.top-h-n,{x:y,y:v,overrideHeight:m}}}}]); |