(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1584],{66998:e=>{e.exports={wrap:"wrap-3HaHQVJm",positionBottom:"positionBottom-3HaHQVJm",backdrop:"backdrop-3HaHQVJm",drawer:"drawer-3HaHQVJm",positionLeft:"positionLeft-3HaHQVJm"}},16842:e=>{e.exports={favorite:"favorite-JVQQsDQk",disabled:"disabled-JVQQsDQk",active:"active-JVQQsDQk",checked:"checked-JVQQsDQk"}},16059:e=>{e.exports={menuWrap:"menuWrap-8MKeZifP",isMeasuring:"isMeasuring-8MKeZifP",scrollWrap:"scrollWrap-8MKeZifP",momentumBased:"momentumBased-8MKeZifP",menuBox:"menuBox-8MKeZifP",isHidden:"isHidden-8MKeZifP"}},73432:e=>{e.exports={button:"button-SD4Dbbwd",disabled:"disabled-SD4Dbbwd",active:"active-SD4Dbbwd",hidden:"hidden-SD4Dbbwd"}},9745:(e,t,n)=>{"use strict";n.d(t,{Icon:()=>s});var r=n(59496);const s=r.forwardRef((e,t)=>{const{icon:n="",...s}=e;return r.createElement("span",{...s,ref:t,dangerouslySetInnerHTML:{__html:n}})})},46608:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ContextMenuRenderer:()=>a});var r=n(59496),s=n(87995),o=n(29332),i=n(62820),l=n(50655);class a{constructor(e,t,n,s){this._root=document.createElement("div"),this._isShown=!1,this._manager=null,this._props={isOpened:!1,items:e,position:{x:0,y:0},menuStatName:t.statName,mode:t.mode,"data-name":t["data-name"]},this._onDestroy=n,this._onShow=s,this._activeElement=document.activeElement,this._returnFocus=t.returnFocus,this._takeFocus=t.takeFocus,this._menuElementRef=r.createRef(),this._doNotCloseOn=t.doNotCloseOn,t.manager&&(this._manager=t.manager)}show(e){this._onShow&&this._onShow(),this._isShown=!0,this._render({...this._props,position:(t,n,r)=>{var s,o,l;e.touches&&e.touches.length>0&&(e={clientX:e.touches[0].clientX,clientY:e.touches[0].clientY});let a;switch(null!==(s=e.attachToXBy)&&void 0!==s?s:(0,i.isRtl)()?"right":"left"){case"left":a=e.clientX;break;case"right":a=e.clientX-t}let c,u=null!==(o=e.attachToYBy)&&void 0!==o?o:"auto",d=e.clientY;if("auto-strict"===u){const t=d+(null!==(l=e.boxHeight)&&void 0!==l?l:0);r{this.hide(),this._unmount()},doNotCloseOn:this._doNotCloseOn,takeFocus:this._takeFocus,menuElementReference:this._menuElementRef})}hide(){this._isShown=!1,this._render({...this._props,isOpened:!1})}isShown(){return this._isShown}_unmount(){this._isShown=!1,s.unmountComponentAtNode(this._root),this._onDestroy&&this._onDestroy(),this._returnFocus&&this._activeElement instanceof HTMLElement&&this._activeElement.focus({preventScroll:!0})}_render(e){s.render(r.createElement(l.SlotContext.Provider,{value:this._manager},r.createElement(o.OverlapContextMenu,{...e})),this._root)}}},39640:(e,t,n)=>{"use strict";function r(e,t,n,r,s){function o(s){if(e>s.timeStamp)return;const o=s.target;void 0!==n&&null!==t&&null!==o&&o.ownerDocument===r&&(t.contains(o)||n(s))}return s.click&&r.addEventListener("click",o,!1),s.mouseDown&&r.addEventListener("mousedown",o,!1), s.touchEnd&&r.addEventListener("touchend",o,!1),s.touchStart&&r.addEventListener("touchstart",o,!1),()=>{r.removeEventListener("click",o,!1),r.removeEventListener("mousedown",o,!1),r.removeEventListener("touchend",o,!1),r.removeEventListener("touchstart",o,!1)}}n.d(t,{addOutsideEventListener:()=>r})},68722:(e,t,n)=>{"use strict";n.d(t,{getScrollbarWidth:()=>r,matchMediaMinMax:()=>s,setStyle:()=>o,getCSSProperty:()=>i,getCSSPropertyNumericValue:()=>l});const r=(()=>{let e;return()=>{var t;if(void 0===e){const n=document.createElement("div"),r=n.style;r.visibility="hidden",r.width="100px",r.msOverflowStyle="scrollbar",document.body.appendChild(n);const s=n.offsetWidth;n.style.overflow="scroll";const o=document.createElement("div");o.style.width="100%",n.appendChild(o);const i=o.offsetWidth;null===(t=n.parentNode)||void 0===t||t.removeChild(n),e=s-i}return e}})();function s(e,t){return t===1/0?window.matchMedia(`(min-width: ${e}px)`):window.matchMedia(`(min-width: ${e}px) and (max-width: ${t}px)`)}function o(e,t,n){null!==e&&e.style.setProperty(t,n)}function i(e,t){return getComputedStyle(e,null).getPropertyValue(t)}function l(e,t){return parseInt(i(e,t))}},43989:(e,t,n)=>{"use strict";n.d(t,{setFixedBodyState:()=>i});var r=n(68722);let s=0,o=!1;function i(e){const{body:t}=document,n=t.querySelector(".widgetbar-wrap");if(e&&1==++s){const e=(0,r.getCSSProperty)(t,"overflow"),s=(0,r.getCSSPropertyNumericValue)(t,"padding-right");"hidden"!==e.toLowerCase()&&t.scrollHeight>t.offsetHeight&&((0,r.setStyle)(n,"right",(0,r.getScrollbarWidth)()+"px"),t.style.paddingRight=s+(0,r.getScrollbarWidth)()+"px",o=!0),t.classList.add("i-no-scroll")}else if(!e&&s>0&&0==--s&&(t.classList.remove("i-no-scroll"),o)){(0,r.setStyle)(n,"right","0px");let e=0;0,t.scrollHeight<=t.clientHeight&&(e-=(0,r.getScrollbarWidth)()),t.style.paddingRight=(e<0?0:e)+"px",o=!1}}},37558:(e,t,n)=>{"use strict";n.d(t,{DrawerManager:()=>s,DrawerContext:()=>o});var r=n(59496);class s extends r.PureComponent{constructor(e){super(e),this._addDrawer=()=>{const e=this.state.currentDrawer+1;return this.setState({currentDrawer:e}),e},this._removeDrawer=()=>{const e=this.state.currentDrawer-1;return this.setState({currentDrawer:e}),e},this.state={currentDrawer:0}}render(){return r.createElement(o.Provider,{value:{addDrawer:this._addDrawer,removeDrawer:this._removeDrawer,currentDrawer:this.state.currentDrawer}},this.props.children)}}const o=r.createContext(null)},41590:(e,t,n)=>{"use strict";n.d(t,{Drawer:()=>p});var r=n(59496),s=n(88537),o=n(97754),i=n(59142),l=n(43989),a=n(65718),c=n(37558),u=n(49483),d=n(29197),h=n(66998);function p(e){const{position:t="Bottom",onClose:n,children:p,className:m,theme:v=h}=e,f=(0,s.ensureNotNull)((0,r.useContext)(c.DrawerContext)),[_,g]=(0,r.useState)(0),w=(0,r.useRef)(null),x=(0,r.useContext)(d.CloseDelegateContext);return(0,r.useEffect)(()=>{const e=(0,s.ensureNotNull)(w.current);return e.focus({preventScroll:!0}),x.subscribe(f,n),0===f.currentDrawer&&(0,l.setFixedBodyState)(!0),u.CheckMobile.iOS()&&(0,i.disableBodyScroll)(e), g(f.addDrawer()),()=>{x.unsubscribe(f,n);const t=f.removeDrawer();u.CheckMobile.iOS()&&(0,i.enableBodyScroll)(e),0===t&&(0,l.setFixedBodyState)(!1)}},[]),r.createElement(a.Portal,null,r.createElement("div",{className:o(h.wrap,h["position"+t])},_===f.currentDrawer&&r.createElement("div",{className:h.backdrop,onClick:n}),r.createElement("div",{className:o(h.drawer,v.drawer,h["position"+t],m),ref:w,tabIndex:-1,"data-name":e["data-name"]},p)))}},36189:(e,t,n)=>{"use strict";n.d(t,{FavoriteButton:()=>d});var r=n(28353),s=n(59496),o=n(97754),i=n(9745),l=n(20614),a=n(55783),c=n(16842);const u={add:(0,r.t)("Add to favorites"),remove:(0,r.t)("Remove from favorites")};function d(e){const{className:t,isFilled:n,isActive:r,onClick:d,...h}=e;return s.createElement(i.Icon,{...h,className:o(c.favorite,"apply-common-tooltip",n&&c.checked,r&&c.active,t),icon:n?l:a,onClick:d,title:n?u.remove:u.add})}},58095:(e,t,n)=>{"use strict";n.d(t,{useOutsideEvent:()=>o});var r=n(59496),s=n(39640);function o(e){const{click:t,mouseDown:n,touchEnd:o,touchStart:i,handler:l,reference:a,ownerDocument:c=document}=e,u=(0,r.useRef)(null),d=(0,r.useRef)(new CustomEvent("timestamp").timeStamp);return(0,r.useLayoutEffect)(()=>{const e={click:t,mouseDown:n,touchEnd:o,touchStart:i},r=a?a.current:u.current;return(0,s.addOutsideEventListener)(d.current,r,l,c,e)},[t,n,o,i,l]),a||u}},90692:(e,t,n)=>{"use strict";n.d(t,{MatchMedia:()=>s});var r=n(59496);class s extends r.PureComponent{constructor(e){super(e),this._handleChange=()=>{this.forceUpdate()},this.state={query:window.matchMedia(this.props.rule)}}componentDidMount(){this._subscribe(this.state.query)}componentDidUpdate(e,t){this.state.query!==t.query&&(this._unsubscribe(t.query),this._subscribe(this.state.query))}componentWillUnmount(){this._unsubscribe(this.state.query)}render(){return this.props.children(this.state.query.matches)}static getDerivedStateFromProps(e,t){return e.rule!==t.query.media?{query:window.matchMedia(e.rule)}:null}_subscribe(e){e.addListener(this._handleChange)}_unsubscribe(e){e.removeListener(this._handleChange)}}},64706:(e,t,n)=>{"use strict";n.d(t,{MenuContext:()=>r});const r=n(59496).createContext(null)},27317:(e,t,n)=>{"use strict";n.d(t,{DEFAULT_MENU_THEME:()=>f,Menu:()=>_});var r=n(59496),s=n(97754),o=n.n(s),i=n(88537),l=n(64514),a=n(54475),c=n(50655),u=n(59064),d=n(88216),h=n(25760),p=n(14758),m=n(64706),v=n(16059);const f=v;class _ extends r.PureComponent{constructor(e){super(e),this._containerRef=null,this._scrollWrapRef=null,this._raf=null,this._scrollRaf=null,this._scrollTimeout=void 0,this._manager=new d.OverlapManager,this._hotkeys=null,this._scroll=0,this._handleContainerRef=e=>{this._containerRef=e,this.props.reference&&("function"==typeof this.props.reference&&this.props.reference(e),"object"==typeof this.props.reference&&(this.props.reference.current=e))},this._handleScrollWrapRef=e=>{this._scrollWrapRef=e,"function"==typeof this.props.scrollWrapReference&&this.props.scrollWrapReference(e), "object"==typeof this.props.scrollWrapReference&&(this.props.scrollWrapReference.current=e)},this._handleMeasure=({callback:e,forceRecalcPosition:t}={})=>{var n,r,s,o;if(this.state.isMeasureValid&&!t)return;const{position:a}=this.props,c=(0,i.ensureNotNull)(this._containerRef);let u=c.getBoundingClientRect();const d=document.documentElement.clientHeight,h=document.documentElement.clientWidth,p=null!==(n=this.props.closeOnScrollOutsideOffset)&&void 0!==n?n:0;let m=d-0-p;const v=u.height>m;if(v){(0,i.ensureNotNull)(this._scrollWrapRef).style.overflowY="scroll",u=c.getBoundingClientRect()}const{width:f,height:_}=u,g="function"==typeof a?a(f,_,d):a,w=h-(null!==(r=g.overrideWidth)&&void 0!==r?r:f)-0,x=(0,l.clamp)(g.x,0,Math.max(0,w)),C=0+p,y=d-(null!==(s=g.overrideHeight)&&void 0!==s?s:_)-0;let S=(0,l.clamp)(g.y,C,Math.max(C,y));if(g.forbidCorrectYCoord&&S{this._restoreScrollPosition(),e&&e()})},this._restoreScrollPosition=()=>{const e=document.activeElement,t=(0,i.ensureNotNull)(this._containerRef);if(null!==e&&t.contains(e))try{e.scrollIntoView()}catch(e){}else(0,i.ensureNotNull)(this._scrollWrapRef).scrollTop=this._scroll},this._resizeForced=()=>{this.setState({appearingMenuHeight:void 0,appearingMenuWidth:void 0,appearingPosition:void 0,isMeasureValid:void 0})},this._resize=()=>{null===this._raf&&(this._raf=requestAnimationFrame(()=>{this.setState({appearingMenuHeight:void 0,appearingMenuWidth:void 0,appearingPosition:void 0,isMeasureValid:void 0}),this._raf=null}))},this._handleGlobalClose=e=>{this.props.onClose(e)},this._handleSlot=e=>{this._manager.setContainer(e)},this._handleScroll=()=>{this._scroll=(0,i.ensureNotNull)(this._scrollWrapRef).scrollTop},this._handleScrollOutsideEnd=()=>{clearTimeout(this._scrollTimeout),this._scrollTimeout=setTimeout(()=>{this._handleMeasure({forceRecalcPosition:!0})},80)},this._handleScrollOutside=e=>{e.target!==this._scrollWrapRef&&(this._handleScrollOutsideEnd(),null===this._scrollRaf&&(this._scrollRaf=requestAnimationFrame(()=>{this._handleMeasure({forceRecalcPosition:!0}),this._scrollRaf=null})))},this.state={}}componentDidMount(){this._handleMeasure({callback:this.props.onOpen});const{customCloseDelegate:e=u.globalCloseDelegate}=this.props;e.subscribe(this,this._handleGlobalClose),window.addEventListener("resize",this._resize);const t=null!==this.context;this._hotkeys||t||(this._hotkeys=h.createGroup({desc:"Popup menu"}),this._hotkeys.add({desc:"Close",hotkey:27,handler:()=>this._handleGlobalClose()})),this.props.repositionOnScroll&&window.addEventListener("scroll",this._handleScrollOutside,{capture:!0})}componentDidUpdate(){this._handleMeasure()}componentWillUnmount(){ const{customCloseDelegate:e=u.globalCloseDelegate}=this.props;e.unsubscribe(this,this._handleGlobalClose),window.removeEventListener("resize",this._resize),window.removeEventListener("scroll",this._handleScrollOutside,{capture:!0}),this._hotkeys&&(this._hotkeys.destroy(),this._hotkeys=null),null!==this._raf&&(cancelAnimationFrame(this._raf),this._raf=null),null!==this._scrollRaf&&(cancelAnimationFrame(this._scrollRaf),this._scrollRaf=null),this._scrollTimeout&&clearTimeout(this._scrollTimeout)}render(){const{id:e,role:t,"aria-labelledby":n,"aria-activedescendant":s,children:i,minWidth:l,theme:u=v,className:d,maxHeight:h,onMouseOver:f,onMouseOut:_,onKeyDown:w,onFocus:x,onBlur:C}=this.props,{appearingMenuHeight:y,appearingMenuWidth:S,appearingPosition:b,isMeasureValid:M}=this.state;return r.createElement(m.MenuContext.Provider,{value:this},r.createElement(p.SubmenuHandler,null,r.createElement(c.SlotContext.Provider,{value:this._manager},r.createElement("div",{id:e,role:t,"aria-labelledby":n,"aria-activedescendant":s,className:o()(d,u.menuWrap,!M&&u.isMeasuring),style:{height:y,left:b&&b.x,minWidth:l,position:"fixed",top:b&&b.y,width:S},"data-name":this.props["data-name"],ref:this._handleContainerRef,onScrollCapture:this.props.onScroll,onContextMenu:a.preventDefaultForContextMenu,tabIndex:this.props.tabIndex,onMouseOver:f,onMouseOut:_,onKeyDown:w,onFocus:x,onBlur:C},r.createElement("div",{className:o()(u.scrollWrap,!this.props.noMomentumBasedScroll&&u.momentumBased),style:{overflowY:void 0!==y?"scroll":"auto",maxHeight:h},onScrollCapture:this._handleScroll,ref:this._handleScrollWrapRef},r.createElement(g,{className:u.menuBox},i)))),r.createElement(c.Slot,{reference:this._handleSlot})))}update(e){e?this._resizeForced():this._resize()}}function g(e){const t=(0,i.ensureNotNull)((0,r.useContext)(p.SubmenuContext)),n=r.useRef(null);return r.createElement("div",{ref:n,className:e.className,onMouseOver:function(e){if(!(null!==t.current&&e.target instanceof Node&&(r=e.target,null===(s=n.current)||void 0===s?void 0:s.contains(r))))return;var r,s;t.isSubmenuNode(e.target)||t.setCurrent(null)},"data-name":"menu-inner"},e.children)}_.contextType=p.SubmenuContext},88216:(e,t,n)=>{"use strict";n.d(t,{OverlapManager:()=>o,getRootOverlapManager:()=>l});var r=n(88537);class s{constructor(){this._storage=[]}add(e){this._storage.push(e)}remove(e){this._storage=this._storage.filter(t=>e!==t)}has(e){return this._storage.includes(e)}getItems(){return this._storage}}class o{constructor(e=document){this._storage=new s,this._windows=new Map,this._index=0,this._document=e,this._container=e.createDocumentFragment()}setContainer(e){const t=this._container,n=null===e?this._document.createDocumentFragment():e;!function(e,t){Array.from(e.childNodes).forEach(e=>{e.nodeType===Node.ELEMENT_NODE&&t.appendChild(e)})}(t,n),this._container=n}registerWindow(e){this._storage.has(e)||this._storage.add(e)}ensureWindow(e,t={position:"fixed",direction:"normal"}){const n=this._windows.get(e);if(void 0!==n)return n;this.registerWindow(e) ;const r=this._document.createElement("div");if(r.style.position=t.position,r.style.zIndex=this._index.toString(),r.dataset.id=e,void 0!==t.index){const e=this._container.childNodes.length;if(t.index>=e)this._container.appendChild(r);else if(t.index<=0)this._container.insertBefore(r,this._container.firstChild);else{const e=this._container.childNodes[t.index];this._container.insertBefore(r,e)}}else"reverse"===t.direction?this._container.insertBefore(r,this._container.firstChild):this._container.appendChild(r);return this._windows.set(e,r),++this._index,r}unregisterWindow(e){this._storage.remove(e);const t=this._windows.get(e);void 0!==t&&(null!==t.parentElement&&t.parentElement.removeChild(t),this._windows.delete(e))}getZindex(e){const t=this.ensureWindow(e);return parseInt(t.style.zIndex||"0")}moveToTop(e){if(this.getZindex(e)!==this._index){this.ensureWindow(e).style.zIndex=(++this._index).toString()}}removeWindow(e){this.unregisterWindow(e)}}const i=new WeakMap;function l(e=document){const t=e.getElementById("overlap-manager-root");if(null!==t)return(0,r.ensureDefined)(i.get(t));{const t=new o(e),n=function(e){const t=e.createElement("div");return t.style.position="absolute",t.style.zIndex=150..toString(),t.style.top="0px",t.style.left="0px",t.id="overlap-manager-root",t}(e);return i.set(n,t),t.setContainer(n),e.body.appendChild(n),t}}},29197:(e,t,n)=>{"use strict";n.d(t,{CloseDelegateContext:()=>o});var r=n(59496),s=n(59064);const o=r.createContext(s.globalCloseDelegate)},65718:(e,t,n)=>{"use strict";n.d(t,{Portal:()=>a,PortalContext:()=>c});var r=n(59496),s=n(87995),o=n(9423),i=n(88216),l=n(50655);class a extends r.PureComponent{constructor(){super(...arguments),this._uuid=(0,o.guid)()}componentWillUnmount(){this._manager().removeWindow(this._uuid)}render(){const e=this._manager().ensureWindow(this._uuid,this.props.layerOptions);return e.style.top=this.props.top||"",e.style.bottom=this.props.bottom||"",e.style.left=this.props.left||"",e.style.right=this.props.right||"",e.style.pointerEvents=this.props.pointerEvents||"",s.createPortal(r.createElement(c.Provider,{value:this},this.props.children),e)}moveToTop(){this._manager().moveToTop(this._uuid)}_manager(){return null===this.context?(0,i.getRootOverlapManager)():this.context}}a.contextType=l.SlotContext;const c=r.createContext(null)},96040:(e,t,n)=>{"use strict";n.d(t,{RemoveButton:()=>u});var r=n(28353),s=n(59496),o=n(97754),i=n(9745),l=n(73366),a=n(73432);const c={remove:(0,r.t)("Remove")};function u(e){const{className:t,isActive:n,onClick:r,onMouseDown:u,title:d,hidden:h,"data-name":p="remove-button",...m}=e;return s.createElement(i.Icon,{...m,"data-name":p,className:o(a.button,"apply-common-tooltip",n&&a.active,h&&a.hidden,t),icon:l,onClick:r,onMouseDown:u,title:d||c.remove})}},50655:(e,t,n)=>{"use strict";n.d(t,{Slot:()=>s,SlotContext:()=>o});var r=n(59496);class s extends r.Component{shouldComponentUpdate(){return!1}render(){return r.createElement("div",{style:{position:"fixed",zIndex:150,left:0,top:0},ref:this.props.reference})}} const o=r.createContext(null)},14758:(e,t,n)=>{"use strict";n.d(t,{SubmenuContext:()=>s,SubmenuHandler:()=>o});var r=n(59496);const s=r.createContext(null);function o(e){const[t,n]=(0,r.useState)(null),o=(0,r.useRef)(null),i=(0,r.useRef)(new Map);return(0,r.useEffect)(()=>()=>{null!==o.current&&clearTimeout(o.current)},[]),r.createElement(s.Provider,{value:{current:t,setCurrent:function(e){null!==o.current&&(clearTimeout(o.current),o.current=null);null===t?n(e):o.current=setTimeout(()=>{o.current=null,n(e)},100)},registerSubmenu:function(e,t){return i.current.set(e,t),()=>{i.current.delete(e)}},isSubmenuNode:function(e){return Array.from(i.current.values()).some(t=>t(e))}}},e.children)}},73366:e=>{e.exports=''},37049:e=>{e.exports=''},20614:e=>{e.exports=''},55783:e=>{e.exports=''}}]);