Files
ai/charting_library/bundles/study-market.729537f5342acf77e3b6.js

15 lines
44 KiB
JavaScript

(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6439,5922],{14487:(e,t)=>{var n;!function(){"use strict";var i={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)&&n.length){var s=r.apply(null,n);s&&e.push(s)}else if("object"===o)for(var a in n)i.call(n,a)&&n[a]&&e.push(a)}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},92318:e=>{e.exports={button:"button-D4RPB3ZC",iconOnly:"iconOnly-D4RPB3ZC",withStartSlot:"withStartSlot-D4RPB3ZC",withEndSlot:"withEndSlot-D4RPB3ZC",startSlotWrap:"startSlotWrap-D4RPB3ZC",endSlotWrap:"endSlotWrap-D4RPB3ZC",xsmall:"xsmall-D4RPB3ZC",small:"small-D4RPB3ZC",medium:"medium-D4RPB3ZC",large:"large-D4RPB3ZC",xlarge:"xlarge-D4RPB3ZC",content:"content-D4RPB3ZC",link:"link-D4RPB3ZC",blue:"blue-D4RPB3ZC",primary:"primary-D4RPB3ZC",secondary:"secondary-D4RPB3ZC",gray:"gray-D4RPB3ZC",green:"green-D4RPB3ZC",red:"red-D4RPB3ZC",black:"black-D4RPB3ZC",slot:"slot-D4RPB3ZC",stretch:"stretch-D4RPB3ZC",grouped:"grouped-D4RPB3ZC",adjustPosition:"adjustPosition-D4RPB3ZC",firstRow:"firstRow-D4RPB3ZC",firstCol:"firstCol-D4RPB3ZC","no-corner-top-left":"no-corner-top-left-D4RPB3ZC","no-corner-top-right":"no-corner-top-right-D4RPB3ZC","no-corner-bottom-right":"no-corner-bottom-right-D4RPB3ZC","no-corner-bottom-left":"no-corner-bottom-left-D4RPB3ZC",textWrap:"textWrap-D4RPB3ZC",multilineContent:"multilineContent-D4RPB3ZC",primaryText:"primaryText-D4RPB3ZC",secondaryText:"secondaryText-D4RPB3ZC"}},25534:e=>{e.exports={disableSelfPositioning:"disableSelfPositioning-dYiqkKAE"}},53160:e=>{e.exports={"tablet-normal-breakpoint":"(max-width: 768px)","small-height-breakpoint":"(max-height: 360px)","tablet-small-breakpoint":"(max-width: 440px)"}},66550:e=>{e.exports={container:"container-qm7Rg5MB",mobile:"mobile-qm7Rg5MB",inputContainer:"inputContainer-qm7Rg5MB",withCancel:"withCancel-qm7Rg5MB",input:"input-qm7Rg5MB",icon:"icon-qm7Rg5MB",cancel:"cancel-qm7Rg5MB"}},40806:e=>{e.exports={wrapper:"wrapper-nGEmjtaX",container:"container-nGEmjtaX",tab:"tab-nGEmjtaX",active:"active-nGEmjtaX",title:"title-nGEmjtaX",icon:"icon-nGEmjtaX",withoutIcon:"withoutIcon-nGEmjtaX",titleText:"titleText-nGEmjtaX",nested:"nested-nGEmjtaX",isTablet:"isTablet-nGEmjtaX",isMobile:"isMobile-nGEmjtaX",showLastDivider:"showLastDivider-nGEmjtaX",medium:"medium-nGEmjtaX",large:"large-nGEmjtaX",withoutArrow:"withoutArrow-nGEmjtaX",accessible:"accessible-nGEmjtaX"}},56714:e=>{e.exports={container:"container-PVi_27Zl",centerElement:"centerElement-PVi_27Zl",contentWrap:"contentWrap-PVi_27Zl",withTransition:"withTransition-PVi_27Zl",noticeShowed:"noticeShowed-PVi_27Zl",icon:"icon-PVi_27Zl",textWrap:"textWrap-PVi_27Zl"}},8976:e=>{e.exports={title:"title-z9fs4j4t",small:"small-z9fs4j4t",normal:"normal-z9fs4j4t",large:"large-z9fs4j4t"}},78910:e=>{e.exports={container:"container-XOHpda28",mobile:"mobile-XOHpda28",
withoutFavoriting:"withoutFavoriting-XOHpda28",hasFilters:"hasFilters-XOHpda28"}},19790:e=>{e.exports={title:"title-cIIj4HrJ",disabled:"disabled-cIIj4HrJ",icon:"icon-cIIj4HrJ",locked:"locked-cIIj4HrJ",open:"open-cIIj4HrJ",actionIcon:"actionIcon-cIIj4HrJ",selected:"selected-cIIj4HrJ",codeIcon:"codeIcon-cIIj4HrJ",solutionIcon:"solutionIcon-cIIj4HrJ"}},24606:e=>{e.exports={"tablet-small-breakpoint":"(max-width: 440px)",container:"container-WeNdU0sq",platform:"platform-WeNdU0sq",favorite:"favorite-WeNdU0sq",isActive:"isActive-WeNdU0sq",mobile:"mobile-WeNdU0sq",selected:"selected-WeNdU0sq",disabled:"disabled-WeNdU0sq",highlighted:"highlighted-WeNdU0sq","highlight-animation":"highlight-animation-WeNdU0sq",badge:"badge-WeNdU0sq",main:"main-WeNdU0sq",paddingLeft:"paddingLeft-WeNdU0sq",author:"author-WeNdU0sq",wide:"wide-WeNdU0sq",likes:"likes-WeNdU0sq",actions:"actions-WeNdU0sq",mobileText:"mobileText-WeNdU0sq"}},94726:e=>{e.exports={container:"container-hrZZtP0J"}},53667:e=>{e.exports={"tablet-small-breakpoint":"(max-width: 440px)",dialog:"dialog-I087YV6b",mobileBackground:"mobileBackground-I087YV6b",rounded:"rounded-I087YV6b",dialogLibrary:"dialogLibrary-I087YV6b",contentContainer:"contentContainer-I087YV6b",listContainer:"listContainer-I087YV6b",scroll:"scroll-I087YV6b",emptyContent:"emptyContent-I087YV6b",emptyContentIcon:"emptyContentIcon-I087YV6b",emptyContentText:"emptyContentText-I087YV6b",contentWrapper:"contentWrapper-I087YV6b",sidebarWrapper:"sidebarWrapper-I087YV6b",isTablet:"isTablet-I087YV6b",isMobile:"isMobile-I087YV6b",sidebarItemIcon:"sidebarItemIcon-I087YV6b",searchInputIcon:"searchInputIcon-I087YV6b",searchInputIconSlot:"searchInputIconSlot-I087YV6b",searchInputWrapper:"searchInputWrapper-I087YV6b",withoutFilters:"withoutFilters-I087YV6b",searchInput:"searchInput-I087YV6b",searchClearIconContainer:"searchClearIconContainer-I087YV6b",loadingContainer:"loadingContainer-I087YV6b"}},1699:e=>{e.exports={container:"container-QcG0kDOU",image:"image-QcG0kDOU",title:"title-QcG0kDOU",description:"description-QcG0kDOU",button:"button-QcG0kDOU"}},73832:e=>{e.exports={favorite:"favorite-_FRQhM5Y",hovered:"hovered-_FRQhM5Y",disabled:"disabled-_FRQhM5Y",focused:"focused-_FRQhM5Y",active:"active-_FRQhM5Y",checked:"checked-_FRQhM5Y"}},1255:e=>{e.exports={highlighted:"highlighted-cwp8YRo6"}},13528:(e,t,n)=>{"use strict";n.d(t,{AppContext:()=>i});const i=(0,n(79474).createContext)({isOnMobileAppPage:()=>!1,isRtl:!1,locale:"en",renderMode:"legacy"})},12725:(e,t,n)=>{"use strict";var i,r,o;function s(e="default"){switch(e){case"default":return"primary";case"stroke":return"secondary"}}function a(e="primary"){switch(e){case"primary":return"brand";case"success":return"green";case"default":return"gray";case"danger":return"red"}}function l(e="m"){switch(e){case"s":return"xsmall";case"m":return"small";case"l":return"large"}}n.d(t,{Button:()=>h}),function(e){e.Primary="primary",e.Success="success",e.Default="default",e.Danger="danger"}(i||(i={})),function(e){e.Small="s",e.Medium="m",e.Large="l"}(r||(r={})),function(e){
e.Default="default",e.Stroke="stroke"}(o||(o={}));var c=n(79474),d=n(63459);function u(e){const{intent:t,size:n,appearance:i,useFullWidth:r,icon:o,...c}=e;return{...c,color:a(t),size:l(n),variant:s(i),stretch:r}}function h(e){return c.createElement(d.SquareButton,{...u(e)})}},63459:(e,t,n)=>{"use strict";n.d(t,{SquareButton:()=>v});var i=n(79474),r=n(14487),o=n.n(r),s=n(67440),a=n(92318),l=n.n(a);const c="apply-overflow-tooltip apply-overflow-tooltip--check-children-recursively apply-overflow-tooltip--allow-text apply-common-tooltip";function d(e){const{size:t="medium",variant:n="primary",color:i="brand",stretch:r=!1,startSlot:a,endSlot:d,iconOnly:u=!1,className:h,isGrouped:p,cellState:m,disablePositionAdjustment:f=!1,primaryText:g,secondaryText:v,isAnchor:y=!1}=e,b="brand"===i?"black":i,w=function(e){let t="";return 0!==e&&(1&e&&(t=o()(t,l()["no-corner-top-left"])),2&e&&(t=o()(t,l()["no-corner-top-right"])),4&e&&(t=o()(t,l()["no-corner-bottom-right"])),8&e&&(t=o()(t,l()["no-corner-bottom-left"]))),t}((0,s.getGroupCellRemoveRoundBorders)(m)),_=u&&(a||d);return o()(h,l().button,l()[t],l()[b],l()[n],r&&l().stretch,a&&l().withStartIcon,d&&l().withEndIcon,_&&l().iconOnly,w,p&&l().grouped,p&&!f&&l().adjustPosition,p&&m.isTop&&l().firstRow,p&&m.isLeft&&l().firstCol,g&&v&&l().multilineContent,y&&l().link,c)}function u(e){const{startSlot:t,iconOnly:n,children:r,endSlot:s,primaryText:a,secondaryText:d}=e;if(t&&s&&n)return i.createElement("span",{className:o()(l().slot,l().startSlotWrap)},t);const u=n&&(t??s),h=!t&&!s&&!n&&!r&&a&&d;return i.createElement(i.Fragment,null,t&&i.createElement("span",{className:o()(l().slot,l().startSlotWrap)},t),r&&!u&&i.createElement("span",{className:l().content},r),s&&i.createElement("span",{className:o()(l().slot,l().endSlotWrap)},s),h&&!u&&function(e){return e.primaryText&&e.secondaryText&&i.createElement("div",{className:o()(l().textWrap,c)},i.createElement("span",{className:l().primaryText}," ",e.primaryText," "),"string"==typeof e.secondaryText?i.createElement("span",{className:l().secondaryText}," ",e.secondaryText," "):i.createElement("span",{className:l().secondaryText},i.createElement("span",null,e.secondaryText.firstLine),i.createElement("span",null,e.secondaryText.secondLine)))}(e))}var h=n(27914),p=n(59794),m=n(40197);function f(e,t){return n=>{if(t)return n.preventDefault(),void n.stopPropagation();e?.(n)}}function g(e){const{className:t,color:n,variant:i,size:r,stretch:o,iconOnly:s,startSlot:a,endSlot:l,primaryText:c,secondaryText:d,...u}=e;return{...u,...(0,m.filterDataProps)(e),...(0,m.filterAriaProps)(e)}}function v(e){const{reference:t,tooltipText:n,disabled:r,onClick:o,onMouseOver:s,onMouseOut:a,onMouseDown:l,onMouseEnter:c,"aria-disabled":m,...v}=e,{isGrouped:y,cellState:b,disablePositionAdjustment:w}=(0,i.useContext)(p.ControlGroupContext),_=d({...v,isGrouped:y,cellState:b,disablePositionAdjustment:w}),E=n??(e.primaryText?[e.primaryText,e.secondaryText].join(" "):(0,h.getTextForTooltip)(e.children));return i.createElement("button",{...g(v),"aria-disabled":r||m,
tabIndex:e.tabIndex??(r?-1:0),className:_,ref:t,onClick:f(o,r),onMouseDown:f(l,r),onMouseOver:f(s,r),onMouseOut:f(a,r),onMouseEnter:f(c,r),"data-overflow-tooltip-text":E},i.createElement(u,{...v}))}n(90741)},59794:(e,t,n)=>{"use strict";n.d(t,{ControlGroupContext:()=>i});const i=n(79474).createContext({isGrouped:!1,cellState:{isTop:!0,isRight:!0,isBottom:!0,isLeft:!0}})},67440:(e,t,n)=>{"use strict";function i(e){let t=0;return e.isTop&&e.isLeft||(t+=1),e.isTop&&e.isRight||(t+=2),e.isBottom&&e.isLeft||(t+=8),e.isBottom&&e.isRight||(t+=4),t}n.d(t,{getGroupCellRemoveRoundBorders:()=>i})},73064:(e,t,n)=>{"use strict";n.d(t,{useFunctionalRefObject:()=>o});var i=n(79474),r=n(69947);function o(e){const t=(0,i.useMemo)((()=>function(e){const t=n=>{e(n),t.current=n};return t.current=null,t}((e=>{a.current(e)}))),[]),n=(0,i.useRef)(null),o=t=>{if(null===t)return s(n.current,t),void(n.current=null);n.current!==e&&(n.current=e,s(n.current,t))},a=(0,i.useRef)(o);return a.current=o,(0,r.useIsomorphicLayoutEffect)((()=>{if(null!==t.current)return a.current(t.current),()=>a.current(null)}),[e]),t}function s(e,t){null!==e&&("function"==typeof e?e(t):e.current=t)}},69947:(e,t,n)=>{"use strict";n.d(t,{useIsomorphicLayoutEffect:()=>r});var i=n(79474);function r(e,t){("undefined"==typeof window?i.useEffect:i.useLayoutEffect)(e,t)}},50534:(e,t,n)=>{"use strict";function i(e,t,n,i,r){function o(r){if(e>r.timeStamp)return;const o=r.target;void 0!==n&&null!==t&&null!==o&&o.ownerDocument===i&&(t.contains(o)||n(r))}return r.click&&i.addEventListener("click",o,!1),r.mouseDown&&i.addEventListener("mousedown",o,!1),r.touchEnd&&i.addEventListener("touchend",o,!1),r.touchStart&&i.addEventListener("touchstart",o,!1),()=>{i.removeEventListener("click",o,!1),i.removeEventListener("mousedown",o,!1),i.removeEventListener("touchend",o,!1),i.removeEventListener("touchstart",o,!1)}}n.d(t,{addOutsideEventListener:()=>i})},4138:(e,t,n)=>{"use strict";n.d(t,{useOutsideEvent:()=>s});var i=n(79474),r=n(69947),o=n(50534);function s(e){const{click:t,mouseDown:n,touchEnd:s,touchStart:a,handler:l,reference:c}=e,d=(0,i.useRef)(null),u=(0,i.useRef)("undefined"==typeof window?0:new window.CustomEvent("timestamp").timeStamp);return(0,r.useIsomorphicLayoutEffect)((()=>{const e={click:t,mouseDown:n,touchEnd:s,touchStart:a},i=c?c.current:d.current;return(0,o.addOutsideEventListener)(u.current,i,l,document,e)}),[t,n,s,a,l]),c||d}},73457:(e,t,n)=>{"use strict";n.d(t,{Icon:()=>r});var i=n(79474);const r=i.forwardRef(((e,t)=>{const{icon:n="",title:r,ariaLabel:o,ariaLabelledby:s,ariaHidden:a,...l}=e,c=!!(r||o||s);return i.createElement("span",{role:"img",...l,ref:t,"aria-label":o,"aria-labelledby":s,"aria-hidden":a||!c,title:r,dangerouslySetInnerHTML:{__html:n}})}))},66334:(e,t,n)=>{"use strict";n.d(t,{Icon:()=>i.Icon});var i=n(73457)},52885:(e,t,n)=>{"use strict";n.d(t,{Portal:()=>c,PortalContext:()=>d});var i=n(79474),r=n(29365),o=n(56770),s=n(46765),a=n(70014),l=n(99286);class c extends i.PureComponent{constructor(){super(...arguments),this._uuid=(0,o.nanoid)()}
componentWillUnmount(){this._manager().removeWindow(this._uuid)}render(){const e=this._manager().ensureWindow(this._uuid,this.props.layerOptions);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||"";const t=this.props.className;return t&&("string"==typeof t?e.classList.add(t):e.classList.add(...t)),this.props.shouldTrapFocus&&!e.hasAttribute(a.FOCUS_TRAP_DATA_ATTRIBUTE)&&e.setAttribute(a.FOCUS_TRAP_DATA_ATTRIBUTE,"true"),this.props["aria-hidden"]&&e.setAttribute("aria-hidden","true"),r.createPortal(i.createElement(d.Provider,{value:this},this.props.children),e)}moveToTop(){this._manager().moveToTop(this._uuid)}_manager(){return null===this.context?(0,s.getRootOverlapManager)():this.context}}c.contextType=l.SlotContext;const d=i.createContext(null)},99286:(e,t,n)=>{"use strict";n.d(t,{Slot:()=>r,SlotContext:()=>o});var i=n(79474);class r extends i.Component{shouldComponentUpdate(){return!1}render(){return i.createElement("div",{style:{position:"fixed",zIndex:150,left:0,top:0},ref:this.props.reference})}}const o=i.createContext(null)},40197:(e,t,n)=>{"use strict";function i(e){return o(e,s)}function r(e){return o(e,a)}function o(e,t){const n=Object.entries(e).filter(t),i={};for(const[e,t]of n)i[e]=t;return i}function s(e){const[t,n]=e;return 0===t.indexOf("data-")&&"string"==typeof n}function a(e){return 0===e[0].indexOf("aria-")}function l(e,t){const n=i(e);return t&&(n["data-qa-id"]=t),n}n.d(t,{filterAriaProps:()=>r,filterCheckedDataProps:()=>l,filterDataProps:()=>i,filterProps:()=>o,isAriaAttribute:()=>a,isDataAttribute:()=>s})},27914:(e,t,n)=>{"use strict";n.d(t,{getTextForTooltip:()=>s});var i=n(79474);const r=e=>(0,i.isValidElement)(e)&&Boolean(e.props.children),o=(e,t=!0)=>null==e||"boolean"==typeof e||"{}"===JSON.stringify(e)?"":e.toString()+(t?" ":""),s=e=>Array.isArray(e)||(0,i.isValidElement)(e)?i.Children.toArray(e).reduce(((e,t)=>{let n="";return n=(0,i.isValidElement)(t)&&r(t)?s(t.props.children):(0,i.isValidElement)(t)&&!r(t)?"":o(t),e.concat(n)}),"").trim():o(e,!1)},46765:(e,t,n)=>{"use strict";n.d(t,{OverlapManager:()=>s,getRootOverlapManager:()=>l});var i=n(85842),r=n(70014);class o{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 s{constructor(e=document){this._storage=new o,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 i=this._document.createElement("div")
;if(i.style.position=t.position,i.style.zIndex=this._index.toString(),i.dataset.id=e,void 0!==t.index){const e=this._container.childNodes.length;if(t.index>=e)this._container.appendChild(i);else if(t.index<=0)this._container.insertBefore(i,this._container.firstChild);else{const e=this._container.childNodes[t.index];this._container.insertBefore(i,e)}}else"reverse"===t.direction?this._container.insertBefore(i,this._container.firstChild):this._container.appendChild(i);return this._windows.set(e,i),++this._index,i}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")}moveLastWindowToTop(){const e=this._storage.getItems(),t=e[e.length-1];t&&this.moveToTop(t)}moveToTop(e){if(this.getZindex(e)!==this._index){const t=this.ensureWindow(e);this._windows.forEach(((e,n)=>{e.hasAttribute(r.FOCUS_TRAP_DATA_ATTRIBUTE)&&e.setAttribute(r.FOCUS_TRAP_DATA_ATTRIBUTE,e===t?"true":"false")})),t.style.zIndex=(++this._index).toString()}}removeWindow(e){this.unregisterWindow(e)}}const a=new WeakMap;function l(e=document){const t=e.getElementById("overlap-manager-root");if(null!==t)return(0,i.ensureDefined)(a.get(t));{const t=new s(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.dataset.qaId="overlap-manager-root",t}(e);return a.set(n,t),t.setContainer(n),e.body.appendChild(n),t}}var c;!function(e){e[e.BaseZindex=150]="BaseZindex"}(c||(c={}))},30019:(e,t,n)=>{"use strict";n.d(t,{useHintShowAnimation:()=>s});var i=n(79474);const r=50,o=2500;function s(e){const[t,n]=(0,i.useState)(!1);return(0,i.useLayoutEffect)((()=>{const t=setTimeout((()=>n(!0)),r),i=setTimeout((()=>n(!1)),e??o);return()=>{clearTimeout(t),clearTimeout(i)}}),[]),t}},11288:(e,t,n)=>{"use strict";n.d(t,{setFixedBodyState:()=>c});const i=(()=>{let e;return()=>{if(void 0===e){const t=document.createElement("div"),n=t.style;n.visibility="hidden",n.width="100px",n.msOverflowStyle="scrollbar",document.body.appendChild(t);const i=t.offsetWidth;t.style.overflow="scroll";const r=document.createElement("div");r.style.width="100%",t.appendChild(r);const o=r.offsetWidth;t.parentNode?.removeChild(t),e=i-o}return e}})();function r(e,t,n){null!==e&&e.style.setProperty(t,n)}function o(e,t){return getComputedStyle(e,null).getPropertyValue(t)}function s(e,t){return parseInt(o(e,t))}let a=0,l=!1;function c(e){const{body:t}=document,n=t.querySelector(".widgetbar-wrap");if(e&&1==++a){const e=o(t,"overflow"),a=s(t,"padding-right");"hidden"!==e.toLowerCase()&&t.scrollHeight>t.offsetHeight&&(r(n,"right",`${i()}px`),t.style.paddingRight=`${a+i()}px`,l=!0),t.classList.add("i-no-scroll")}else if(!e&&a>0&&0==--a&&(t.classList.remove("i-no-scroll"),l)){r(n,"right","0px");let e=0;0,t.scrollHeight<=t.clientHeight&&(e-=i()),t.style.paddingRight=(e<0?0:e)+"px",l=!1}}},64483:(e,t,n)=>{
"use strict";n.d(t,{createReactRoot:()=>u});var i=n(79474),r=n(29365),o=n(36334),s=n(13528),a=n(90141),l=n(81458);const c={iOs:"old",android:"new",old:"old",new:"new",any:"any"};function d(e){const[t]=(0,i.useState)({isOnMobileAppPage:e=>(0,a.isOnMobileAppPage)(c[e]),isRtl:(0,l.isRtl)(),locale:window.locale,renderMode:e.renderMode??"legacy"});return i.createElement(s.AppContext.Provider,{value:t},e.children)}function u(e,t,n="legacy"){const s=i.createElement(d,{renderMode:n},e);if("modern"===n){const e=(0,o.createRoot)(t);return e.render(s),{render(t){e.render(i.createElement(d,{renderMode:n},t))},unmount(){e.unmount()}}}return r.render(s,t),{render(e){r.render(i.createElement(d,{renderMode:n},e),t)},unmount(){r.unmountComponentAtNode(t)}}}},73873:(e,t,n)=>{"use strict";n.d(t,{DialogBreakpoints:()=>r});var i=n(53160);const r={SmallHeight:i["small-height-breakpoint"],TabletSmall:i["tablet-small-breakpoint"],TabletNormal:i["tablet-normal-breakpoint"]}},44973:(e,t,n)=>{"use strict";n.d(t,{DialogSearch:()=>u});var i=n(79474),r=n(14487),o=n.n(r),s=n(91599),a=n(66334),l=n(92003),c=n(78275),d=n(66550);function u(e){const{children:t,isMobile:r,renderInput:u,onCancel:p,containerClassName:m,inputContainerClassName:f,iconClassName:g,cancelTitle:v=s.t(null,void 0,n(43563)),...y}=e;return i.createElement("div",{className:o()(d.container,r&&d.mobile,m)},i.createElement("div",{className:o()(d.inputContainer,r&&d.mobile,f,p&&d.withCancel)},u||i.createElement(h,{isMobile:r,...y})),t,i.createElement(a.Icon,{className:o()(d.icon,r&&d.mobile,g),icon:r?c:l}),p&&(!r||""!==y.value)&&i.createElement("div",{className:o()(d.cancel,r&&d.mobile),onClick:p},v))}function h(e){const{className:t,reference:n,isMobile:r,value:s,onChange:a,onFocus:l,onBlur:c,onKeyDown:u,onSelect:h,placeholder:p,activeDescendant:m,...f}=e;return i.createElement("input",{...f,ref:n,type:"text",className:o()(t,d.input,r&&d.mobile),autoComplete:"off",role:"searchbox","data-role":"search",placeholder:p,value:s,onChange:a,onFocus:l,onBlur:c,onSelect:h,onKeyDown:u,"aria-activedescendant":m})}},71805:(e,t,n)=>{"use strict";n.d(t,{DialogSidebarItem:()=>h,DialogSidebarWrapper:()=>u});var i,r=n(79474),o=n(14487),s=n.n(o),a=n(66334),l=n(75147),c=n(47784),d=n(40806);function u(e){return r.createElement("div",{className:d.wrapper,...e})}function h(e){const{mode:t,title:n,icon:i,isActive:o,onClick:u,tag:h="div",reference:p,className:m,mobileFontSize:f="medium",showLastDivider:g,useBoldIconsForMobile:v,hideArrow:y,...b}=e,{isMobile:w,isTablet:_}=(0,l.getSidebarMode)(t),E=function(){if(w&&v)return i?.bold;return o?i?.bold:i?.default}();return r.createElement(h,{...b,ref:p,title:_?n:"",className:s()(d.tab,_&&d.isTablet,w&&d.isMobile,o&&d.active,y&&d.withoutArrow,m,_&&"apply-common-tooltip"),onClick:u},i&&r.createElement(a.Icon,{className:d.icon,icon:E}),!_&&r.createElement("span",{className:s()(d.title,!i&&d.withoutIcon,"medium"===f?d.medium:d.large,g&&d.showLastDivider)},r.createElement("span",{className:s()(d.titleText,"apply-overflow-tooltip")},n),w&&!y&&r.createElement(a.Icon,{
className:d.nested,icon:c})))}!function(e){e.Medium="medium",e.Large="large"}(i||(i={}))},75147:(e,t,n)=>{"use strict";var i,r;function o(e){return{isMobile:"mobile"===e,isTablet:"tablet"===e}}n.d(t,{getSidebarMode:()=>o}),function(e){e.Bold="bold",e.Default="default"}(i||(i={})),function(e){e.Tablet="tablet",e.Mobile="mobile"}(r||(r={}))},76298:(e,t,n)=>{"use strict";n.r(t),n.d(t,{IndicatorsLibraryContainer:()=>ye});var i=n(79474),r=n(16905),o=n(91599),s=n(54951);const a=o.t(null,void 0,n(51481));var l,c,d,u,h,p,m,f;!function(e){e.Title="Title",e.Item="Item",e.Loader="Loader"}(l||(l={})),function(e){e.User="Script$USER",e.Public="Script$PUB",e.InviteOnly="Script$INVITE",e.Purchased="Script$PURCHASED",e.Favorite="Script$FAVORITE",e.BuiltIn="tv-basicstudies",e.CandlestickPatterns="candlestick-patterns",e.Standard="Script$STD",e.VolumeProfile="tv-volumebyprice",e.Strategies="strategies",e.EditorsPicks="editorsPicks",e.Trending="trending",e.Store="store",e.AutoJava="auto-java",e.AutoStandard="auto-standard",e.Auto="auto",e.OldChartPatterns="tv-chartpatterns",e.ChartPatterns="tv-chart_patterns"}(c||(c={})),function(e){e.Favorites="favorites",e.BuiltIns="built-ins",e.PublicLibrary="public-library",e.UserScripts="my-scripts",e.InviteOnlyScripts="invite-only-scripts",e.Purchased="purchased",e.Addons="addons",e.Fundamentals="fundamentals",e.EditorsPicks="editors-picks",e.Top="top",e.Trending="trending",e.Store="store"}(d||(d={})),function(e){e.Personal="personal",e.BuiltIn="builtIn",e.Community="community"}(u||(u={})),function(e){e.Indicators="indicators",e.Strategies="strategies",e.Patterns="patterns",e.Profiles="profiles"}(h||(h={})),function(e){e.Top="top",e.EditorsPicks="editorsPicks",e.Trending="trending",e.Store="store"}(p||(p={})),function(e){e.Top="top",e.Trending="trending"}(m||(m={})),function(e){e.Favorites="favorites",e.IncomeStatement="income statements",e.BalanceSheet="balance sheet",e.CashFlow="cash flow",e.Ratios="ratios",e.Statistics="statistics",e.Crypto="crypto",e.Ownership="ownership",e.Network="network",e.Social="social",e.Financials="financials"}(f||(f={}));var g=n(6620),v=n(49104);function y(e,t){const n=e.title.toLowerCase(),i=t.title.toLowerCase();return n<i?-1:n>i?1:0}const b={earning:new RegExp("EPS"),earnings:new RegExp("EPS"),"trailing twelve months":new RegExp("TTM")};function w(e){const{id:t,description:i,shortDescription:s,description_localized:l,is_hidden_study:c,version:d,extra:u,tags:h}=e,p=(0,r.isFeaturesetEnabled)("graying_disabled_tools_enabled")&&window.ChartApiInstance?.studiesAccessController.isToolGrayed(i);return{id:t,title:l||o.t(i,{context:"study"},n(84693)),shortDescription:s,shortTitle:s,isStrategy:g.StudyMetaInfo.isScriptStrategy(e),isHidden:c,isNew:u?.isNew,isUpdated:u?.isUpdated,isBeta:u?.isBeta,isPro:u?.isPro,proBadgeTitle:a,isFundamental:!1,isOverlay:e.is_price_study,studyData:{id:t,version:d,descriptor:{type:"java",studyId:e.id},packageName:_(t,u)},isGrayed:p,tags:h}}function _(e,t){
return t?.isChartPattern?"tv-chart_patterns":t?.isAuto?"auto-java":g.StudyMetaInfo.getPackageName(e)}var E=n(14487),x=n.n(E),C=n(55206),S=n(35088),I=n(45958),R=n(44973),T=n(71805),P=n(94726);function D(e){const{reference:t,className:n,...r}=e;return i.createElement("div",{ref:t,className:x()(P.container,n),...r,"data-role":"dialog-content"})}var N=n(19790);function k(e){const{children:t,className:n,disabled:r}=e;return i.createElement("span",{className:x()(N.title,r&&N.disabled,n)},t)}var B=n(42897);const L=i.createContext(null);var F=n(42482),M=n(62466),A=n(23351),W=n(24606);function O(e){const t=(0,i.useContext)(L),{id:r,role:s,style:a,isMobile:l,isTablet:c,item:d,query:u,regExpRules:h,isBeta:p,isNew:m,isUpdated:f,isSelected:g,isHighlighted:v,reference:y,onClick:b,renderActions:w,isPro:_,proBadgeTitle:E,onItemActionsClick:C,favoriteClickHandler:S,hideEP:I,isLockAvailable:R}=e,{isFavorite:T,isLocked:P,public:D,editorsPick:N,isPaidLocked:A}=d,O=(0,B.decodeHTMLEntities)(d.title),Z=void 0!==T,q=H(b,d),j=(0,i.useCallback)((e=>{e.stopPropagation(),C?.()}),[C]),U=(0,i.useCallback)((e=>{if(S)return C?.(),void S(e);const n=t?.toggleFavorite;if(n){H((e=>{C?.(),n(e)}),d)(e)}}),[S,C,t?.toggleFavorite]),V=x()(W.container,!1,l&&W.mobile,d.isGrayed&&W.disabled,g&&W.selected,v&&W.highlighted),G=a?.width?{...a,width:`calc(${a.width} - 25px)`}:a;return i.createElement("div",{id:r,role:s,ref:y,className:V,onClick:q,style:G,"data-role":"list-item","data-disabled":d.isGrayed,"data-title":O,"data-id":d.id},i.createElement("div",{className:x()(W.main,!Z&&W.paddingLeft)},Z&&i.createElement(M.FavoriteButton,{className:x()(W.favorite,T&&W.isActive),isFilled:T,onClick:U}),i.createElement(k,{disabled:d.isGrayed,className:x()(l&&W.mobileText)},i.createElement(F.HighlightedText,{queryString:u,rules:h,text:O})),!1,p&&i.createElement(BadgeStatus,{type:"beta",className:W.badge}),m&&i.createElement(BadgeStatus,{type:"new",className:W.badge}),f&&i.createElement(BadgeStatus,{type:"updated",className:W.badge}),Boolean(N&&!I)&&i.createElement(BadgeStatus,{type:"ep",className:W.badge,tooltip:o.t(null,void 0,n(77010))}),!1),D&&D.authorName&&D.authorLink&&i.createElement(ContentAuthorLink,{authorName:D.authorName,authorLink:D.authorLink,className:x()(W.author,HIDE_SIDEBAR_WHILE_SEARCHING&&u&&W.wide),isMobile:l,isTablet:c,onClick:j}),!l&&D&&void 0!==D.likesCount&&i.createElement("span",{className:W.likes},compactNumberFormat(D.likesCount)),!1)}function H(e,t){return n=>{const i=0===(0,A.modifiersFromEvent)(n)&&0===n.button;!n.defaultPrevented&&e&&i&&(n.preventDefault(),e(t))}}var Z,q=n(8976);function j(e){const{title:t,type:n,className:r}=e;return i.createElement("h3",{className:x()(q.title,"Small"===n&&q.small,"Normal"===n&&q.normal,"Large"===n&&q.large,r)},t)}!function(e){e.Small="Small",e.Normal="Normal",e.Large="Large"}(Z||(Z={}));var U=n(78910);function V(e){const{className:t,style:n,children:r,isMobile:o,withoutFavoriting:s,hasFilters:a}=e,l=x()(U.container,a&&U.hasFilters,o&&U.mobile,s&&U.withoutFavoriting,t);return i.createElement("div",{style:n,
className:l},r)}var G=n(52462);function Y(e){const[t,n]=(0,i.useState)(null);function r(e){return e.findIndex((e=>t?.id===e.id))}return[t,n,function(){n(function(){const n=r(e),i=n===e.length-1;return null===t||-1===n?e[0]??null:i?e[n]:e[n+1]}())},function(){n(function(){const n=r(e);return null===t||0===n||-1===n?e[0]??null:e[n-1]}())}]}var z=n(77982),X=n(67985),J=n(53667);function $(e){const{reference:t,data:r,isOpened:s,onClose:a,applyStudy:l,shouldReturnFocus:c}=e,[d,u]=(0,i.useState)(""),h=(0,i.useMemo)((()=>(0,z.createRegExpList)(d,b)),[d]),p=(0,i.useMemo)((()=>d?(0,z.rankedSearch)({data:r,rules:h,queryString:d,primaryKey:"shortDescription",secondaryKey:"title",optionalPrimaryKey:"shortTitle",tertiaryKey:"tags"}):r),[d,h,r]),m=(0,i.useMemo)((()=>p.slice().sort(K)),[p]),{highlightedItem:f,selectedItem:g,selectedNodeReference:v,scrollContainerRef:y,searchInputRef:w,onClickStudy:_,handleKeyDown:E}=function(e,t,n,r){let o=0;const[s,a]=(0,i.useState)(null),l=(0,i.useRef)(null),c=(0,i.useRef)(null),[d,u,h,p]=Y(t),m=(0,i.useRef)(null);return(0,i.useEffect)((()=>{e?f(0):u(null)}),[e]),(0,i.useEffect)((()=>{void 0!==r&&(f(0),u(null))}),[r]),(0,i.useEffect)((()=>(s&&(o=setTimeout((()=>{a(null)}),1500)),()=>{clearInterval(o)})),[s]),{highlightedItem:s,scrollContainerRef:l,selectedNodeReference:c,selectedItem:d,searchInputRef:m,onClickStudy:function(e){n&&(n(e),u(e),a(e))},handleKeyDown:function(e){const[t,i]=function(e,t){if(null===e.current||null===t.current)return[0,0];const n=e.current.getBoundingClientRect(),i=t.current.getBoundingClientRect(),{height:r}=n,o=n.top-i.top,s=n.bottom-i.bottom+r<0?0:r,a=o-r>0?0:r,{scrollTop:l}=t.current;return[l-a,l+s]}(c,l);if(40===(0,A.hashFromEvent)(e)&&(e.preventDefault(),h(),f(i)),38===(0,A.hashFromEvent)(e)&&(e.preventDefault(),p(),f(t)),13===(0,A.hashFromEvent)(e)&&d){if(!n)return;n(d),a(d)}}};function f(e){null!==l.current&&l.current.scrollTo&&l.current.scrollTo(0,e)}}(s,m,l),P=""===d&&!m.length;(0,i.useEffect)((()=>{s||u(""),I.CheckMobile.any()||w.current?.focus()}),[s]);const N=(0,i.useId)();return i.createElement(S.AdaptivePopupDialog,{className:x()(J.dialogLibrary),isOpened:s,onClose:a,onClickOutside:a,title:o.t(null,void 0,n(48394)),dataName:"indicators-dialog",onKeyDown:E,shouldReturnFocus:c,ref:t,render:()=>i.createElement(i.Fragment,null,i.createElement(R.DialogSearch,{reference:w,placeholder:o.t(null,void 0,n(52127)),onChange:k,onFocus:B,"aria-controls":N,"aria-owns":N,"aria-haspopup":"listbox",activeDescendant:ee(g?.id)}),i.createElement(T.DialogSidebarWrapper,null,i.createElement(D,{id:N,reference:y,role:"listbox",className:J.scroll},P?i.createElement(C.Spinner,null):m.length?i.createElement(i.Fragment,null,i.createElement(V,null,i.createElement(j,{title:o.t(null,void 0,n(78397))})),m.map((e=>i.createElement(O,{key:e.id,id:ee(e.id),role:"option",item:e,onClick:()=>_(e),query:d,regExpRules:h,reference:g?.id===e.id?v:void 0,isSelected:g?.id===e.id,isHighlighted:f?.id===e.id,favoriteClickHandler:t=>{t.stopPropagation(),(0,X.toggleFavorite)(e.title)}
})))):i.createElement(G.ContentIsNotFound,{className:J.noContentBlock,description:o.t(null,void 0,n(7224))}))))});function k(e){u(e.target.value)}function B(){d.length>0&&w.current?.select()}}function K(e,t){return e.isFavorite===t.isFavorite?0:e.isFavorite?-1:1}const Q="indicators_dialog_item";function ee(e){if(void 0!==e)return`${Q}_${e}`}var te=n(60135),ne=n(96375),ie=n(49399),re=n(89659),oe=n(73873),se=n(29365),ae=n(88434),le=n(66334),ce=n(30019),de=n(56714),ue=n(10276);function he(e){const{text:t,withTransition:n=!0}=e,r=(0,ce.useHintShowAnimation)(2500);return i.createElement("div",{className:de.container},i.createElement("div",{className:de.centerElement},i.createElement("div",{className:E(de.contentWrap,r&&de.noticeShowed,n&&de.withTransition)},i.createElement(le.Icon,{icon:ue,className:de.icon}),i.createElement("div",{className:de.textWrap},t))))}class pe{constructor(e,t){this._showed=!1,this._wrap=document.createElement("div"),t&&this._wrap.classList.add(t),this._container=e,this._debouncedHide=(0,ae.default)((()=>this.hide()),3e3)}show(e,t){this._wrap&&!this._showed&&(this._showed=!0,this._container.appendChild(this._wrap),se.render(i.createElement(he,{text:e,withTransition:t}),this._wrap),this._debouncedHide())}hide(){this._wrap&&(this._showed=!1,se.unmountComponentAtNode(this._wrap),this._wrap.remove())}destroy(){this.hide(),delete this._wrap}}var me=n(62352);class fe{constructor(e=!1){this._searchInputRef=i.createRef(),this._dialog=i.createRef(),this._rootInstance=null,this._parentSources=[],this._ignoreChecksWhenAddingStudy=!1,this._visibility=new re.WatchedValue(!1),this._container=document.createElement("div"),this._isForceRender=!1,this._isDestroyed=!1,this._deepFundamentalsHistoryNotificationHasBeenShown=!1,this._hintRenderer=null,this._showDeepFundamentalsHistoryNotification=()=>{},this._ignoreChecksWhenAddingStudy=e}isDestroyed(){return this._isDestroyed}visible(){return this._visibility.readonly()}resetAllStudies(){}open(e,t,n,i,r){this._parentSources=e,this._updateSymbol(),this._setProps({isOpened:!0,shouldReturnFocus:r?.shouldReturnFocus}),this._visibility.setValue(!0),ne.emit("indicators_dialog")}show(e){this.open([],void 0,void 0,void 0,e)}hide(){this._parentSources=[],this._setProps({isOpened:!1}),this._visibility.setValue(!1),this._hintRenderer?.destroy(),this._hintRenderer=null}destroy(){this._isDestroyed=!0,this._hintRenderer?.destroy(),this._rootInstance?.unmount(),this._rootInstance=null}_shouldPreventRender(){return this._isDestroyed||!this._isForceRender&&!this._getProps().value().isOpened}_getRenderData(){return{props:this._getProps().value(),container:this._getContainer()}}_applyStudy(e,t,n){e.isGrayed?ne.emit("onGrayedObjectClicked",{type:"study",name:e.shortDescription}):(I.CheckMobile.any()||this._searchInputRef.current?.select(),this._insertStudyImpl(e,t,n).then((t=>{null===t&&this._hintRenderer?.hide(),null!==t&&((0,me.hasConfirmInputs)(t.inputs)||(0,me.isSymbolicStudy)(t))&&this._hintRenderer?.show(this._getHintText(e.title));window.is_authenticated
;I.CheckMobile.any()||(null===document.activeElement||document.activeElement===document.body||null!==this._dialog.current&&this._dialog.current.contains(document.activeElement))&&this._searchInputRef.current?.focus()})))}_setProps(e){const t=this._getProps().value(),{isOpened:n}=t;this._isForceRender=n&&"isOpened"in e&&!e.isOpened;const i={...t,...e};this._getProps().setValue(i)}_requestBuiltInJavaStudies(){return(0,ie.studyMetaInfoRepository)().findAllJavaStudies()}_focus(){this._getProps().value().isOpened&&this._dialog.current?.focus()}_getContainer(){return this._container}_getDialog(){return this._dialog}_getSymbol(){return this._symbol}_showHint(e){if(window.matchMedia(oe.DialogBreakpoints.TabletSmall).matches){if(this._hintRenderer?.hide(),!this._hintRenderer){const e=this._dialog.current?.getElement();e&&(this._hintRenderer=new pe(e))}this._hintRenderer?.show(this._getHintText(e))}}_getHintText(e){return te.t(null,{replace:{studyTitle:e}},n(43682))}}function ge(e,t){return e[t]||[]}var ve=n(64483);class ye extends fe{constructor(e,t){super(),this._options={onWidget:!1},this._indicatorData=[],this._chartWidgetCollection=e,t&&(this._options=t),this._props=new re.WatchedValue({data:[],applyStudy:e=>this._applyStudy(e),isOpened:!1,reference:this._getDialog(),onClose:this.hide.bind(this)}),this._getProps().subscribe(this._render.bind(this)),this._init()}async _insertStudyImpl(e,t,n){const i=await async function(e,t,n,i,r,o,a){const l=e.activeChartWidget.value();if(!l)return null;const{studyData:c}=t;if(!c)return Promise.resolve(null);const d=c.descriptor;if("java"===d.type){const e=(0,v.tryFindStudyLineToolNameByStudyId)(d.studyId);if(null!==e)return await(0,v.initLineTool)(e),s.tool.setValue(e),null}return l.insertStudy(c.descriptor,n,{stubTitle:t.shortDescription,isFundamental:t.isFundamental,isOverlay:t.isOverlay,eventSource:i},void 0,a)}(this._chartWidgetCollection,e,this._parentSources,void 0,0,this._symbol,(()=>this._showHint(e.title)));return i?.metaInfo()??null}_updateSymbol(){}_getProps(){return this._props}async _init(){const e=function(e){const t={};return e.forEach((e=>{const{studyData:n}=e;if(!n)return;const{packageName:i}=n;i in t?t[i].push(e):t[i]=[e]})),t}(function(e,t=!0){return e.filter((e=>{const n=!!t||!function(e){return e.isStrategy}(e);return!e.isHidden&&n}))}((await this._requestBuiltInJavaStudies()).map(w)));this._indicatorData=await async function(e,t){let n={...t};return[...ge(n,"tv-basicstudies"),...ge(n,"Script$STD"),...ge(n,"tv-volumebyprice")].filter((e=>!e.isStrategy)).sort(y)}(this._options.onWidget,e),this._setFavorites(),this._setProps({data:this._indicatorData}),X.favoriteAdded.subscribe(null,(()=>this._refreshFavorites())),X.favoriteRemoved.subscribe(null,(()=>this._refreshFavorites()))}_setFavorites(){(0,r.isFeaturesetEnabled)("items_favoriting")&&this._indicatorData.forEach((e=>{e.isFavorite=(0,X.isFavorite)(e.title)}))}_refreshFavorites(){this._setFavorites(),this._setProps({data:this._indicatorData})}_render(){if(this._shouldPreventRender())return
;const{props:e,container:t}=this._getRenderData(),n=i.createElement($,{...e});this._rootInstance?this._rootInstance.render(n):this._rootInstance=(0,ve.createReactRoot)(n,t)}}},28390:(e,t,n)=>{"use strict";n.d(t,{useActiveDescendant:()=>o});var i=n(79474),r=n(73064);function o(e,t=[]){const[n,o]=(0,i.useState)(!1),s=(0,r.useFunctionalRefObject)(e);return(0,i.useLayoutEffect)((()=>{const e=s.current;if(null===e)return;const t=e=>{switch(e.type){case"active-descendant-focus":o(!0);break;case"active-descendant-blur":o(!1)}};return e.addEventListener("active-descendant-focus",t),e.addEventListener("active-descendant-blur",t),()=>{e.removeEventListener("active-descendant-focus",t),e.removeEventListener("active-descendant-blur",t)}}),t),[s,n]}},52462:(e,t,n)=>{"use strict";n.d(t,{ContentIsNotFound:()=>c});var i=n(79474),r=n(14487),o=n.n(r),s=n(66334),a=n(12725),l=n(1699);function c(e){const{className:t,icon:n,title:r,description:c,buttonText:d,buttonAction:u}=e;return i.createElement("div",{className:o()(l.container,t)},n&&i.createElement(s.Icon,{icon:n,className:l.image}),r&&i.createElement("h3",{className:l.title},r),c&&i.createElement("p",{className:l.description},c),d&&u&&i.createElement(a.Button,{onClick:u,className:l.button},d))}},92381:(e,t,n)=>{"use strict";n.d(t,{RemoveTitleType:()=>i,removeTitlesMap:()=>o});var i,r=n(91599);!function(e){e.Add="add",e.Remove="remove"}(i||(i={}));const o={[i.Add]:r.t(null,void 0,n(99529)),[i.Remove]:r.t(null,void 0,n(16590))}},62466:(e,t,n)=>{"use strict";n.d(t,{FavoriteButton:()=>h});var i=n(79474),r=n(14487),o=n.n(r),s=n(66334),a=n(92381),l=n(28390),c=n(72995),d=n(89658),u=n(73832);function h(e){const{className:t,isFilled:n,isActive:r,onClick:h,title:p,...m}=e,[f,g]=(0,l.useActiveDescendant)(null),v=p??(n?a.removeTitlesMap[a.RemoveTitleType.Remove]:a.removeTitlesMap[a.RemoveTitleType.Add]);return(0,i.useLayoutEffect)((()=>{const e=f.current;e instanceof HTMLElement&&v&&e.dispatchEvent(new CustomEvent("common-tooltip-update"))}),[v,f]),i.createElement(s.Icon,{...m,className:o()(u.favorite,"apply-common-tooltip",n&&u.checked,r&&u.active,g&&u.focused,t),onClick:h,icon:n?c:d,title:v,ariaLabel:v,ref:f})}},77982:(e,t,n)=>{"use strict";n.d(t,{createRegExpList:()=>a,getHighlightedChars:()=>l,rankedSearch:()=>s});var i=n(7321);function r(e){return e.replace(/[!-/[-^{-}?]/g,"\\$&")}var o;function s(e){const{data:t,rules:n,queryString:r,isPreventedFromFiltering:o,primaryKey:s,secondaryKey:a=s,optionalPrimaryKey:l,tertiaryKey:c}=e;return t.map((e=>{const t=l&&e[l]?e[l]:e[s],o=e[a],d=c&&e[c];let u,h=0;return n.forEach((e=>{const{re:n,fullMatch:s}=e;if(n.lastIndex=0,(0,i.isString)(t)&&t&&t.toLowerCase()===r.toLowerCase())return h=4,void(u=t.match(s)?.index);if((0,i.isString)(t)&&s.test(t))return h=3,void(u=t.match(s)?.index);if((0,i.isString)(o)&&s.test(o))return h=2,void(u=o.match(s)?.index);if((0,i.isString)(o)&&n.test(o))return h=2,void(u=o.match(n)?.index);if(Array.isArray(d))for(const e of d)if(s.test(e))return h=1,void(u=e.match(s)?.index)})),{matchPriority:h,matchIndex:u,item:e}
})).filter((e=>o||e.matchPriority)).sort(((e,t)=>{if(e.matchPriority<t.matchPriority)return 1;if(e.matchPriority>t.matchPriority)return-1;if(e.matchPriority===t.matchPriority){if(void 0===e.matchIndex||void 0===t.matchIndex)return 0;if(e.matchIndex>t.matchIndex)return 1;if(e.matchIndex<t.matchIndex)return-1}return 0})).map((({item:e})=>e))}function a(e,t){const n=[],i=e.toLowerCase(),o=e.split("").map(((e,t)=>`(${0!==t?`[/\\s-]${r(e)}`:r(e)})`)).join("(.*?)")+"(.*)";return n.push({fullMatch:new RegExp(`(${r(e)})`,"i"),re:new RegExp(`^${o}`,"i"),reserveRe:new RegExp(o,"i"),fuzzyHighlight:!0}),t&&t.hasOwnProperty(i)&&n.push({fullMatch:t[i],re:t[i],fuzzyHighlight:!1}),n}function l(e,t,n){const i=[];return e&&n?(n.forEach((e=>{const{fullMatch:n,re:r,reserveRe:o}=e;n.lastIndex=0,r.lastIndex=0;const s=n.exec(t),a=s||r.exec(t)||o&&o.exec(t);if(e.fuzzyHighlight=!s,a)if(e.fuzzyHighlight){let e=a.index;for(let t=1;t<a.length;t++){const n=a[t],r=a[t].length;if(t%2){const t=n.startsWith(" ")||n.startsWith("/")||n.startsWith("-");i[t?e+1:e]=!0}e+=r}}else for(let e=0;e<a[0].length;e++)i[a.index+e]=!0})),i):i}!function(e){e[e.Low=0]="Low",e[e.MediumLow=1]="MediumLow",e[e.Medium=2]="Medium",e[e.High=3]="High",e[e.Highest=4]="Highest"}(o||(o={}))},42482:(e,t,n)=>{"use strict";n.d(t,{HighlightedText:()=>a});var i=n(79474),r=n(14487),o=n(77982),s=n(1255);function a(e){const{queryString:t,rules:n,text:a,className:l}=e,c=(0,i.useMemo)((()=>(0,o.getHighlightedChars)(t,a,n)),[t,n,a]);return i.createElement(i.Fragment,null,c.length?a.split("").map(((e,t)=>i.createElement(i.Fragment,{key:t},c[t]?i.createElement("span",{className:r(s.highlighted,l)},e):i.createElement("span",null,e)))):a)}},54466:(e,t,n)=>{"use strict";n.d(t,{MatchMedia:()=>r});var i=n(79474);class r extends i.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.addEventListener("change",this._handleChange)}_unsubscribe(e){e.removeEventListener("change",this._handleChange)}}},64888:(e,t,n)=>{"use strict";n.d(t,{Portal:()=>i.Portal,PortalContext:()=>i.PortalContext});var i=n(52885)},55206:(e,t,n)=>{"use strict";n.d(t,{Spinner:()=>c});var i=n(79474),r=n(14487),o=n.n(r),s=n(84674),a=(n(98532),n(25534)),l=n.n(a);function c(e){const{ariaLabel:t,ariaLabelledby:n,className:r,style:a,size:c,id:d,disableSelfPositioning:u}=e;return i.createElement("div",{className:o()(r,"tv-spinner","tv-spinner--shown",`tv-spinner--size_${s.spinnerSizeMap[c||s.DEFAULT_SIZE]}`,u&&l().disableSelfPositioning),style:a,role:"progressbar",id:d,"aria-label":t,"aria-labelledby":n})}},36334:(e,t,n)=>{"use strict"
;var i=n(29365);t.createRoot=i.createRoot,i.hydrateRoot},67985:(e,t,n)=>{"use strict";n.r(t),n.d(t,{favoriteAdded:()=>o,favoriteRemoved:()=>s,favoritesSynced:()=>a,isFavorite:()=>d,saveFavorites:()=>p,toggleFavorite:()=>c});var i=n(36870),r=n(82287);const o=new i.Delegate,s=new i.Delegate,a=new i.Delegate;let l=[];function c(e){return-1===u(e)?(function(e){!d(e)&&(l.push(e),p(),o.fire(e))}(e),!0):(function(e){const t=u(e);-1!==t&&(l.splice(t,1),p(),s.fire(e))}(e),!1)}function d(e){return-1!==u(e)}function u(e){return l.indexOf(e)}function h(){l=[];const e=Boolean(void 0===(0,r.getValue)("chart.favoriteLibraryIndicators")),t=(0,r.getJSON)("chart.favoriteLibraryIndicators",[]);if(l.push(...t),0===l.length&&e&&"undefined"!=typeof window){const e=JSON.parse(window.urlParams?.favorites??"{}").indicators;e&&Array.isArray(e)&&l.push(...e)}a.fire()}function p(){const e=l.slice();(0,r.setJSON)("chart.favoriteLibraryIndicators",e)}h(),r.onSync.subscribe(null,h)},10276:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" fill-rule="evenodd" d="M9 17A8 8 0 1 0 9 1a8 8 0 0 0 0 16Zm4-9.97L11.9 6 8.3 9.82 6.1 7.46 4.99 8.5 8.32 12 13 7.03Z"/></svg>'},47784:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="none"><path stroke="currentcolor" stroke-width="1.3" d="M12 9l5 5-5 5"/></svg>'},72995:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18" fill="none"><path fill="currentColor" d="M9 1l2.35 4.76 5.26.77-3.8 3.7.9 5.24L9 13l-4.7 2.47.9-5.23-3.8-3.71 5.25-.77L9 1z"/></svg>'},89658:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18" fill="none"><path stroke="currentColor" d="M9 2.13l1.903 3.855.116.236.26.038 4.255.618-3.079 3.001-.188.184.044.259.727 4.237-3.805-2L9 12.434l-.233.122-3.805 2.001.727-4.237.044-.26-.188-.183-3.079-3.001 4.255-.618.26-.038.116-.236L9 2.13z"/></svg>'},78275:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" fill-rule="evenodd" d="M18.5 12.5a6 6 0 1 1-12 0 6 6 0 0 1 12 0Zm-1.25 5.8a7.5 7.5 0 1 1 1.06-1.06l4.22 4.23.53.53L22 23.06l-.53-.53-4.22-4.22Z"/></svg>'},92003:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="none"><path stroke="currentColor" d="M17.4 17.5a7 7 0 1 0-4.9 2c1.9 0 3.64-.76 4.9-2zm0 0l5.1 5"/></svg>'},56770:(e,t,n)=>{"use strict";n.d(t,{nanoid:()=>i});let i=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+=(t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_"),"")}}]);