(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[5130],{266783:e=>{"use strict";var t=Object.prototype.hasOwnProperty;function n(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}e.exports=function(e,r){if(n(e,r))return!0;if("object"!=typeof e||null===e||"object"!=typeof r||null===r)return!1;var o=Object.keys(e),s=Object.keys(r);if(o.length!==s.length)return!1;for(var a=0;a<o.length;a++)if(!t.call(r,o[a])||!n(e[o[a]],r[o[a]]))return!1;return!0}},758222:e=>{e.exports={"light-button":"light-button-bYDQcOkp",link:"link-bYDQcOkp",content:"content-bYDQcOkp","visually-hidden":"visually-hidden-bYDQcOkp",nowrap:"nowrap-bYDQcOkp","ellipsis-container":"ellipsis-container-bYDQcOkp","text-wrap-container":"text-wrap-container-bYDQcOkp","text-wrap-with-ellipsis":"text-wrap-with-ellipsis-bYDQcOkp",icon:"icon-bYDQcOkp","force-direction-ltr":"force-direction-ltr-bYDQcOkp","force-direction-rtl":"force-direction-rtl-bYDQcOkp","with-grouped":"with-grouped-bYDQcOkp","variant-quiet-primary":"variant-quiet-primary-bYDQcOkp",selected:"selected-bYDQcOkp","typography-regular16px":"typography-regular16px-bYDQcOkp","typography-medium16px":"typography-medium16px-bYDQcOkp","typography-regular14px":"typography-regular14px-bYDQcOkp","typography-semibold14px":"typography-semibold14px-bYDQcOkp","typography-semibold16px":"typography-semibold16px-bYDQcOkp","size-xsmall":"size-xsmall-bYDQcOkp","with-start-icon":"with-start-icon-bYDQcOkp","with-end-icon":"with-end-icon-bYDQcOkp","no-content":"no-content-bYDQcOkp",wrap:"wrap-bYDQcOkp","size-small":"size-small-bYDQcOkp","size-medium":"size-medium-bYDQcOkp","variant-primary":"variant-primary-bYDQcOkp","color-gray":"color-gray-bYDQcOkp",caret:"caret-bYDQcOkp",grouped:"grouped-bYDQcOkp",pills:"pills-bYDQcOkp",active:"active-bYDQcOkp","disable-active-on-touch":"disable-active-on-touch-bYDQcOkp","disable-active-state-styles":"disable-active-state-styles-bYDQcOkp","color-green":"color-green-bYDQcOkp","color-red":"color-red-bYDQcOkp","variant-secondary":"variant-secondary-bYDQcOkp","variant-ghost":"variant-ghost-bYDQcOkp"}},345350:e=>{e.exports={"nav-button":"nav-button-znwuaSC1",link:"link-znwuaSC1",background:"background-znwuaSC1",icon:"icon-znwuaSC1","flip-icon":"flip-icon-znwuaSC1","size-large":"size-large-znwuaSC1","preserve-paddings":"preserve-paddings-znwuaSC1","size-medium":"size-medium-znwuaSC1","size-small":"size-small-znwuaSC1","size-xsmall":"size-xsmall-znwuaSC1","size-xxsmall":"size-xxsmall-znwuaSC1","visually-hidden":"visually-hidden-znwuaSC1"}},488803:e=>{e.exports={"tablet-normal-breakpoint":"screen and (max-width: 768px)","small-height-breakpoint":"screen and (max-height: 360px)","tablet-small-breakpoint":"screen and (max-width: 430px)"}},755596:e=>{e.exports={dialog:"dialog-b8SxMnzX",wrapper:"wrapper-b8SxMnzX",separator:"separator-b8SxMnzX",bounded:"bounded-b8SxMnzX"}},257240:e=>{e.exports={container:"container-M1mz4quA",pairContainer:"pairContainer-M1mz4quA",logo:"logo-M1mz4quA",hidden:"hidden-M1mz4quA"}},869827:e=>{e.exports={
"small-height-breakpoint":"screen and (max-height: 360px)",container:"container-BZKENkhT",unsetAlign:"unsetAlign-BZKENkhT",title:"title-BZKENkhT",subtitle:"subtitle-BZKENkhT",textWrap:"textWrap-BZKENkhT",ellipsis:"ellipsis-BZKENkhT",close:"close-BZKENkhT",icon:"icon-BZKENkhT"}},140281:e=>{e.exports={container:"container-qm7Rg5MB",inputContainer:"inputContainer-qm7Rg5MB",withCancel:"withCancel-qm7Rg5MB",input:"input-qm7Rg5MB",icon:"icon-qm7Rg5MB",cancel:"cancel-qm7Rg5MB"}},452597:e=>{e.exports={actions:"actions-rarsm4ka",actionButton:"actionButton-rarsm4ka"}},253588:e=>{e.exports={logo:"logo-d0vVmGvT"}},339339:e=>{e.exports={"tablet-small-breakpoint":"screen and (max-width: 430px)",itemRow:"itemRow-oRSs8UQo",multiLine:"multiLine-oRSs8UQo",cell:"cell-oRSs8UQo",itemInfoCell:"itemInfoCell-oRSs8UQo",description:"description-oRSs8UQo",symbolDescription:"symbolDescription-oRSs8UQo",flag:"flag-oRSs8UQo",exchangeDescription:"exchangeDescription-oRSs8UQo",marketType:"marketType-oRSs8UQo",exchangeName:"exchangeName-oRSs8UQo",actionHandleWrap:"actionHandleWrap-oRSs8UQo",source:"source-oRSs8UQo",hover:"hover-oRSs8UQo",selected:"selected-oRSs8UQo",active:"active-oRSs8UQo",highlighted:"highlighted-oRSs8UQo",light:"light-oRSs8UQo","highlight-animation-theme-light":"highlight-animation-theme-light-oRSs8UQo",dark:"dark-oRSs8UQo","highlight-animation-theme-dark":"highlight-animation-theme-dark-oRSs8UQo",markedFlag:"markedFlag-oRSs8UQo",offset:"offset-oRSs8UQo",descriptionCell:"descriptionCell-oRSs8UQo",addition:"addition-oRSs8UQo",exchangeCell:"exchangeCell-oRSs8UQo",fixedWidth:"fixedWidth-oRSs8UQo",expandHandle:"expandHandle-oRSs8UQo",expanded:"expanded-oRSs8UQo",symbolTitle:"symbolTitle-oRSs8UQo",invalid:"invalid-oRSs8UQo",noDescription:"noDescription-oRSs8UQo",highlightedText:"highlightedText-oRSs8UQo",icon:"icon-oRSs8UQo",narrow:"narrow-oRSs8UQo",wide:"wide-oRSs8UQo",dataMode:"dataMode-oRSs8UQo",actionsCell:"actionsCell-oRSs8UQo",action:"action-oRSs8UQo",targetAction:"targetAction-oRSs8UQo",removeAction:"removeAction-oRSs8UQo",addAction:"addAction-oRSs8UQo",markedFlagWrap:"markedFlagWrap-oRSs8UQo",markedFlagMobile:"markedFlagMobile-oRSs8UQo",logo:"logo-oRSs8UQo",isExpandable:"isExpandable-oRSs8UQo",primaryIcon:"primaryIcon-oRSs8UQo"}},433172:e=>{e.exports={icon:"icon-OJpk_CAQ"}},250674:e=>{e.exports={wrap:"wrap-IxKZEhmO",libAllSelected:"libAllSelected-IxKZEhmO",container:"container-IxKZEhmO",iconWrap:"iconWrap-IxKZEhmO",icon:"icon-IxKZEhmO",title:"title-IxKZEhmO",highlighted:"highlighted-IxKZEhmO",description:"description-IxKZEhmO",mobile:"mobile-IxKZEhmO",allSelected:"allSelected-IxKZEhmO",desktop:"desktop-IxKZEhmO",allSelectedIcon:"allSelectedIcon-IxKZEhmO",selected:"selected-IxKZEhmO",focused:"focused-IxKZEhmO",titleWithoutDesc:"titleWithoutDesc-IxKZEhmO",textBlock:"textBlock-IxKZEhmO",bordered:"bordered-IxKZEhmO"}},270699:e=>{e.exports={container:"container-dfKL9A7t",contentList:"contentList-dfKL9A7t",contentListDesktop:"contentListDesktop-dfKL9A7t",searchSourceItemsContainer:"searchSourceItemsContainer-dfKL9A7t",
oneColumn:"oneColumn-dfKL9A7t",searchSourceItemsContainerDesktop:"searchSourceItemsContainerDesktop-dfKL9A7t",groupTitleDesktop:"groupTitleDesktop-dfKL9A7t",column:"column-dfKL9A7t",emptyText:"emptyText-dfKL9A7t",emptyIcon:"emptyIcon-dfKL9A7t",noResultsDesktop:"noResultsDesktop-dfKL9A7t"}},37796:e=>{e.exports={wrap:"wrap-gjrLBBL3",item:"item-gjrLBBL3",small:"small-gjrLBBL3",newStyles:"newStyles-gjrLBBL3",mobile:"mobile-gjrLBBL3",text:"text-gjrLBBL3",exchange:"exchange-gjrLBBL3",filterItem:"filterItem-gjrLBBL3",brokerWrap:"brokerWrap-gjrLBBL3"}},852662:e=>{e.exports={wrap:"wrap-dlewR1s1",watchlist:"watchlist-dlewR1s1",noFeed:"noFeed-dlewR1s1",newStyles:"newStyles-dlewR1s1",scrollContainer:"scrollContainer-dlewR1s1",listContainer:"listContainer-dlewR1s1",multiLineItemsContainer:"multiLineItemsContainer-dlewR1s1",withSpinner:"withSpinner-dlewR1s1",spinnerContainer:"spinnerContainer-dlewR1s1",largeSpinner:"largeSpinner-dlewR1s1"}},285544:e=>{e.exports={search:"search-ZXzPWcCf",upperCase:"upperCase-ZXzPWcCf",withFilters:"withFilters-ZXzPWcCf",withButton:"withButton-ZXzPWcCf",symbolType:"symbolType-ZXzPWcCf",spinnerWrap:"spinnerWrap-ZXzPWcCf",emptyText:"emptyText-ZXzPWcCf",emptyIcon:"emptyIcon-ZXzPWcCf",noResultsDesktop:"noResultsDesktop-ZXzPWcCf",brokerButtonWrap:"brokerButtonWrap-ZXzPWcCf",brokerButton:"brokerButton-ZXzPWcCf"}},314444:e=>{e.exports={flagWrap:"flagWrap-QKnxaZOG",icon:"icon-QKnxaZOG",caret:"caret-QKnxaZOG",title:"title-QKnxaZOG",button:"button-QKnxaZOG",withFlag:"withFlag-QKnxaZOG",buttonContent:"buttonContent-QKnxaZOG"}},362393:e=>{e.exports={dialog:"dialog-u2dP3kv1",tabletDialog:"tabletDialog-u2dP3kv1",desktopDialog:"desktopDialog-u2dP3kv1",backButton:"backButton-u2dP3kv1"}},254638:e=>{e.exports={childrenWrapper:"childrenWrapper-_RhDhmVQ",container:"container-_RhDhmVQ"}},423886:e=>{e.exports={bubbles:"bubbles-Ie7o2cas",multiLine:"multiLine-Ie7o2cas",bubble:"bubble-Ie7o2cas"}},161371:e=>{e.exports={bubble:"bubble-zcjhaZ_y",animated:"animated-zcjhaZ_y",content:"content-zcjhaZ_y","appearance-default":"appearance-default-zcjhaZ_y",active:"active-zcjhaZ_y",gray:"gray-zcjhaZ_y",red:"red-zcjhaZ_y",blue:"blue-zcjhaZ_y",green:"green-zcjhaZ_y",orange:"orange-zcjhaZ_y",purple:"purple-zcjhaZ_y",cyan:"cyan-zcjhaZ_y",pink:"pink-zcjhaZ_y","appearance-text":"appearance-text-zcjhaZ_y","fontSize-s":"fontSize-s-zcjhaZ_y","fontSize-m":"fontSize-m-zcjhaZ_y","size-m":"size-m-zcjhaZ_y","size-l":"size-l-zcjhaZ_y"}},882112:e=>{e.exports={}},645300:e=>{e.exports={}},275623:e=>{e.exports={highlighted:"highlighted-cwp8YRo6"}},345719:e=>{e.exports={separator:"separator-Pf4rIzEt"}},934587:e=>{e.exports={icon:"icon-WB2y0EnP",dropped:"dropped-WB2y0EnP"}},173850:(e,t,n)=>{"use strict";n.d(t,{SEPARATOR_PREFIX:()=>r,isSeparatorItem:()=>o});const r="###";function o(e){return e.startsWith(r)}},380132:(e,t,n)=>{"use strict";n.d(t,{BackButton:()=>v});var r=n(50959),o=n(270762),s=n(295694),a=n(249498),l=n(560176),i=n(935369),c=n(358797),u=n(773063),d=n(914127),m=n(218073),h=n(99243),p=n(142576);function g(e="large",t="1.2"){switch(e){
case"large":return"1.2"===t?s:u;case"medium":return"1.2"===t?a:d;case"small":return"1.2"===t?l:m;case"xsmall":return"1.2"===t?i:h;case"xxsmall":return"1.2"===t?c:p;default:return a}}const v=r.forwardRef(((e,t)=>{const{"aria-label":n,flipIconOnRtl:s,...a}=e;return r.createElement(o.NavButton,{...a,"aria-label":n,ref:t,icon:g(e.size,e.iconStrokeWidth),flipIconOnRtl:s})}))},389986:(e,t,n)=>{"use strict";n.d(t,{CloseButton:()=>d});var r=n(50959),o=n(270762),s=n(117105),a=n(315130),l=n(238822),i=n(663346),c=n(534983);function u(e="large"){switch(e){case"large":return s;case"medium":default:return a;case"small":return l;case"xsmall":return i;case"xxsmall":return c}}const d=r.forwardRef(((e,t)=>r.createElement(o.NavButton,{...e,ref:t,icon:u(e.size)})))},959189:(e,t,n)=>{"use strict";function r(e,t){return t||null==e||("string"==typeof e||Array.isArray(e))&&0===e.length}n.d(t,{isIconOnly:()=>r})},898237:(e,t,n)=>{"use strict";n.d(t,{LightAnchorButton:()=>i,LightButton:()=>o.LightButton});var r=n(418920),o=n(943158),s=n(50959),a=n(591365),l=n(273388);function i(e){const{className:t,isSelected:n,children:o,startIcon:i,iconOnly:c,ellipsis:u,showCaret:d,forceDirection:m,endIcon:h,color:p,variant:g,reference:v,size:f,enableActiveStateStyles:y,renderComponent:b=a.CustomComponentDefaultLink,typography:S,textWrap:x=!1,maxLines:w,style:C={},...k}=e,E=x?null!=w?w:2:1,L=E>0?{...C,"--ui-lib-light-button-content-max-lines":E}:C;return s.createElement(b,{...k,className:(0,r.useLightButtonClasses)({className:t,isSelected:n,children:o,startIcon:i,iconOnly:c,showCaret:d,forceDirection:m,endIcon:h,color:p,variant:g,size:f,enableActiveStateStyles:y,typography:S,textWrap:x,isLink:!0}),reference:(0,l.isomorphicRef)(v),style:L},s.createElement(r.LightButtonContent,{showCaret:d,startIcon:i,endIcon:h,iconOnly:c,ellipsis:u,textWrap:x},o))}},418920:(e,t,n)=>{"use strict";n.d(t,{LightButtonContent:()=>g,useLightButtonClasses:()=>p});var r=n(50959),o=n(497754),s=n(601198),a=n(72571),l=n(234539),i=n(959189),c=n(380327);const u=r.createContext({isInButtonGroup:!1,isGroupPrimary:!1});var d=n(602948),m=n(758222),h=n.n(m);const p=(e,t)=>{const n=(0,r.useContext)(l.CustomBehaviourContext),s=(0,r.useContext)(c.ControlGroupContext),{isInButtonGroup:a,isGroupPrimary:d}=(0,r.useContext)(u),{className:m,isSelected:p,children:g,startIcon:v,showCaret:f,endIcon:y,forceDirection:b,iconOnly:S,color:x="gray",variant:w="primary",size:C="medium",enableActiveStateStyles:k=n.enableActiveStateStyles,typography:E,isLink:L=!1,textWrap:I,isPills:_,isActive:N}=e,T=h()[`typography-${((e,t,n)=>{if(n){const e=n.replace(/^\D+/g,"");return t?`semibold${e}`:n}return"xsmall"===e?t?"semibold14px":"regular14px":"small"===e||"medium"===e?t?"semibold16px":"regular16px":""})(C,p||_,E||void 0)}`];return o(m,h()["light-button"],L&&h().link,N&&h().active,p&&h().selected,(0,
i.isIconOnly)(g,S)&&h()["no-content"],v&&h()["with-start-icon"],(f||y)&&h()["with-end-icon"],t&&h()["with-grouped"],b&&h()[`force-direction-${b}`],h()[`variant-${d?"primary":w}`],h()[`color-${d?"gray":x}`],h()[`size-${C}`],T,!k&&h()["disable-active-state-styles"],s.isGrouped&&h().grouped,I&&h().wrap,a&&h()["disable-active-on-touch"],_&&h().pills)};function g(e){const{startIcon:t,endIcon:n,showCaret:l,iconOnly:c,ellipsis:u=!0,textWrap:m,tooltipText:p,children:g}=e;return r.createElement(r.Fragment,null,t&&r.createElement(a.Icon,{className:h().icon,icon:t}),!(0,i.isIconOnly)(g,c)&&r.createElement("span",{className:o(h().content,!m&&h().nowrap,"apply-overflow-tooltip","apply-overflow-tooltip--check-children-recursively","apply-overflow-tooltip--allow-text"),"data-overflow-tooltip-text":null!=p?p:(0,s.getTextForTooltip)(g)},m||u?r.createElement(r.Fragment,null,r.createElement("span",{className:o(!m&&u&&h()["ellipsis-container"],m&&h()["text-wrap-container"],m&&u&&h()["text-wrap-with-ellipsis"])},g),r.createElement("span",{className:h()["visually-hidden"],"aria-hidden":!0},g)):r.createElement(r.Fragment,null,g,r.createElement("span",{className:h()["visually-hidden"],"aria-hidden":!0},g))),(n||l)&&(e=>r.createElement(a.Icon,{className:o(h().icon,e.showCaret&&h().caret),icon:e.showCaret?d:e.endIcon}))(e))}},943158:(e,t,n)=>{"use strict";n.d(t,{LightButton:()=>a});var r=n(50959),o=n(380327),s=n(418920);function a(e){const{isGrouped:t}=r.useContext(o.ControlGroupContext),{reference:n,className:a,isSelected:l,children:i,startIcon:c,iconOnly:u,ellipsis:d,showCaret:m,forceDirection:h,endIcon:p,color:g,variant:v,size:f,enableActiveStateStyles:y,typography:b,textWrap:S=!1,maxLines:x,style:w={},isPills:C,isActive:k,tooltipText:E,...L}=e,I=S?null!=x?x:2:1,_=I>0?{...w,"--ui-lib-light-button-content-max-lines":I}:w;return r.createElement("button",{...L,className:(0,s.useLightButtonClasses)({className:a,isSelected:l,children:i,startIcon:c,iconOnly:u,showCaret:m,forceDirection:h,endIcon:p,color:g,variant:v,size:f,enableActiveStateStyles:y,typography:b,textWrap:S,isPills:C,isActive:k},t),ref:n,style:_},r.createElement(s.LightButtonContent,{showCaret:m,startIcon:c,endIcon:p,iconOnly:u,ellipsis:d,textWrap:S,tooltipText:E},i))}},270762:(e,t,n)=>{"use strict";n.d(t,{NavButton:()=>c});var r=n(50959),o=n(497754),s=n(72571),a=n(345350);function l(e){const{size:t="large",preservePaddings:n,isLink:r,flipIconOnRtl:s,className:l}=e;return o(a["nav-button"],a[`size-${t}`],n&&a["preserve-paddings"],s&&a["flip-icon"],r&&a.link,l)}function i(e){const{children:t,icon:n}=e;return r.createElement(r.Fragment,null,r.createElement("span",{className:a.background}),r.createElement(s.Icon,{icon:n,className:a.icon,"aria-hidden":!0}),t&&r.createElement("span",{className:a["visually-hidden"]},t))}const c=(0,r.forwardRef)(((e,t)=>{const{icon:n,type:o="button",preservePaddings:s,flipIconOnRtl:a,size:c,"aria-label":u,...d}=e;return r.createElement("button",{...d,className:l({...e,children:u}),ref:t,type:o},r.createElement(i,{icon:n},u))}));c.displayName="NavButton"
;var u=n(591365),d=n(273388);(0,r.forwardRef)(((e,t)=>{const{icon:n,renderComponent:o,"aria-label":s,...a}=e,c=null!=o?o:u.CustomComponentDefaultLink;return r.createElement(c,{...a,className:l({...e,children:s,isLink:!0}),reference:(0,d.isomorphicRef)(t)},r.createElement(i,{icon:n},s))})).displayName="NavAnchorButton"},380327:(e,t,n)=>{"use strict";n.d(t,{ControlGroupContext:()=>r});const r=n(50959).createContext({isGrouped:!1,cellState:{isTop:!0,isRight:!0,isBottom:!0,isLeft:!0}})},409245:(e,t,n)=>{"use strict";function r(e){const{reference:t,...n}=e;return{...n,ref:t}}n.d(t,{renameRef:()=>r})},591365:(e,t,n)=>{"use strict";n.d(t,{CustomComponentDefaultLink:()=>s});var r=n(50959),o=n(409245);function s(e){return r.createElement("a",{...(0,o.renameRef)(e)})}r.PureComponent},234539:(e,t,n)=>{"use strict";n.d(t,{CustomBehaviourContext:()=>r});const r=(0,n(50959).createContext)({enableActiveStateStyles:!0});r.displayName="CustomBehaviourContext"},813550:(e,t,n)=>{"use strict";n.d(t,{useForceUpdate:()=>o});var r=n(50959);const o=()=>{const[,e]=(0,r.useReducer)((e=>e+1),0);return e}},718736:(e,t,n)=>{"use strict";n.d(t,{useFunctionalRefObject:()=>s});var r=n(50959),o=n(855393);function s(e){const t=(0,r.useMemo)((()=>function(e){const t=n=>{e(n),t.current=n};return t.current=null,t}((e=>{l.current(e)}))),[]),n=(0,r.useRef)(null),s=t=>{if(null===t)return a(n.current,t),void(n.current=null);n.current!==e&&(n.current=e,a(n.current,t))},l=(0,r.useRef)(s);return l.current=s,(0,o.useIsomorphicLayoutEffect)((()=>{if(null!==t.current)return l.current(t.current),()=>l.current(null)}),[e]),t}function a(e,t){null!==e&&("function"==typeof e?e(t):e.current=t)}},855393:(e,t,n)=>{"use strict";n.d(t,{useIsomorphicLayoutEffect:()=>o});var r=n(50959);function o(e,t){("undefined"==typeof window?r.useEffect:r.useLayoutEffect)(e,t)}},671129:(e,t,n)=>{"use strict";n.d(t,{useMatchMedia:()=>s,useSafeMatchMedia:()=>o});var r=n(50959);function o(e,t=!1){const[n,o]=(0,r.useState)(t);return(0,r.useEffect)((()=>{const t=window.matchMedia(e);function n(){o(t.matches)}return n(),t.addListener(n),()=>{t.removeListener(n)}}),[e]),n}function s(e){const t=(0,r.useMemo)((()=>window.matchMedia(e).matches),[]);return o(e,t)}},778199:(e,t,n)=>{"use strict";function r(e,t,n,r,o){function s(o){if(e>o.timeStamp)return;const s=o.target;void 0!==n&&null!==t&&null!==s&&s.ownerDocument===r&&(t.contains(s)||n(o))}return o.click&&r.addEventListener("click",s,!1),o.mouseDown&&r.addEventListener("mousedown",s,!1),o.touchEnd&&r.addEventListener("touchend",s,!1),o.touchStart&&r.addEventListener("touchstart",s,!1),()=>{r.removeEventListener("click",s,!1),r.removeEventListener("mousedown",s,!1),r.removeEventListener("touchend",s,!1),r.removeEventListener("touchstart",s,!1)}}n.d(t,{addOutsideEventListener:()=>r})},908783:(e,t,n)=>{"use strict";n.d(t,{useOutsideEvent:()=>s});var r=n(50959),o=n(778199);function s(e){const{click:t,mouseDown:n,touchEnd:s,touchStart:a,handler:l,reference:i,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:s,touchStart:a},r=i?i.current:u.current;return(0,o.addOutsideEventListener)(d.current,r,l,c,e)}),[t,n,s,a,l]),i||u}},664332:(e,t,n)=>{"use strict";n.d(t,{useResizeObserver:()=>l});var r=n(50959),o=n(159255),s=n(855393),a=n(718736);function l(e,t=[]){const{callback:n,ref:l=null}=function(e){return"function"==typeof e?{callback:e}:e}(e),i=(0,r.useRef)(null),c=(0,r.useRef)(n);c.current=n;const u=(0,a.useFunctionalRefObject)(l),d=(0,r.useCallback)((e=>{u(e),null!==i.current&&(i.current.disconnect(),null!==e&&i.current.observe(e))}),[u,i]);return(0,s.useIsomorphicLayoutEffect)((()=>(i.current=new o.default(((e,t)=>{c.current(e,t)})),u.current&&d(u.current),()=>{var e;null===(e=i.current)||void 0===e||e.disconnect()})),[u,...t]),d}},72571:(e,t,n)=>{"use strict";n.d(t,{Icon:()=>o});var r=n(50959);const o=r.forwardRef(((e,t)=>{const{icon:n="",...o}=e;return r.createElement("span",{...o,ref:t,dangerouslySetInnerHTML:{__html:n}})}))},682925:(e,t,n)=>{"use strict";n.d(t,{Slot:()=>o,SlotContext:()=>s});var r=n(50959);class o 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 s=r.createContext(null)},672511:(e,t,n)=>{"use strict";n.d(t,{Spinner:()=>a});var r=n(50959),o=n(497754),s=n(843442);n(683135);function a(e){const t=o(e.className,"tv-spinner","tv-spinner--shown",`tv-spinner--size_${s.spinnerSizeMap[e.size||s.DEFAULT_SIZE]}`);return r.createElement("div",{className:t,style:e.style,role:"progressbar"})}},800417:(e,t,n)=>{"use strict";function r(e){return s(e,a)}function o(e){return s(e,l)}function s(e,t){const n=Object.entries(e).filter(t),r={};for(const[e,t]of n)r[e]=t;return r}function a(e){const[t,n]=e;return 0===t.indexOf("data-")&&"string"==typeof n}function l(e){return 0===e[0].indexOf("aria-")}n.d(t,{filterAriaProps:()=>o,filterDataProps:()=>r,filterProps:()=>s,isAriaAttribute:()=>l,isDataAttribute:()=>a})},601198:(e,t,n)=>{"use strict";n.d(t,{getTextForTooltip:()=>a});var r=n(50959);const o=e=>(0,r.isValidElement)(e)&&Boolean(e.props.children),s=e=>null==e||"boolean"==typeof e||"{}"===JSON.stringify(e)?"":e.toString()+" ",a=e=>Array.isArray(e)||(0,r.isValidElement)(e)?r.Children.toArray(e).reduce(((e,t)=>{let n="";return n=(0,r.isValidElement)(t)&&o(t)?a(t.props.children):(0,r.isValidElement)(t)&&!o(t)?"":s(t),e.concat(n)}),"").trim():s(e)},111706:(e,t,n)=>{"use strict";function r(e){return 0===e.detail}n.d(t,{isKeyboardClick:()=>r})},273388:(e,t,n)=>{"use strict";function r(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function o(e){return r([e])}n.d(t,{isomorphicRef:()=>o,mergeRefs:()=>r})},801808:(e,t,n)=>{"use strict";n.d(t,{OverlapManager:()=>s,getRootOverlapManager:()=>l});var r=n(650151);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 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 a=new WeakMap;function l(e=document){const t=e.getElementById("overlap-manager-root");if(null!==t)return(0,r.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}(e);return a.set(n,t),t.setContainer(n),e.body.appendChild(n),t}}},420066:(e,t,n)=>{"use strict";function r(){var e,t,n;return null!==(n=null===(t=null===(e=window.configurationData)||void 0===e?void 0:e.exchanges)||void 0===t?void 0:t.map((e=>({...e,country:"",providerId:"",flag:""}))))&&void 0!==n?n:[]}n.d(t,{getExchanges:()=>r})},868333:(e,t,n)=>{"use strict";var r;n.d(t,{LogoSize:()=>r,getLogoUrlResolver:()=>a}),function(e){e[e.Medium=0]="Medium",e[e.Large=1]="Large"}(r||(r={}));class o{getSymbolLogoUrl(e){return e}getCountryFlagUrl(){return""}getCryptoLogoUrl(e){return e}getProviderLogoUrl(e){return e}getSourceLogoUrl(e){return e}}let s;function a(){return s||(s=new o),s}},285089:(e,t,n)=>{"use strict";n.d(t,{setFixedBodyState:()=>i});var r=n(735922);const o=()=>!window.matchMedia("screen and (min-width: 768px)").matches,s=()=>!window.matchMedia("screen and (min-width: 1280px)").matches;let a=0,l=!1;function i(e){const{body:t}=document,n=t.querySelector(".widgetbar-wrap");if(e&&1==++a){const e=(0,r.getCSSProperty)(t,"overflow"),o=(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=`${o+(0,r.getScrollbarWidth)()}px`,l=!0),t.classList.add("i-no-scroll")}else if(!e&&a>0&&0==--a&&(t.classList.remove("i-no-scroll"),l)){(0,r.setStyle)(n,"right","0px");let e=0;e=n?(i=(0,r.getContentWidth)(n),o()?0:s()?45:Math.min(Math.max(i,45),450)):0,t.scrollHeight<=t.clientHeight&&(e-=(0,r.getScrollbarWidth)()),t.style.paddingRight=(e<0?0:e)+"px",l=!1}var i}},996038:(e,t,n)=>{"use strict";n.d(t,{DialogBreakpoints:()=>o});var r=n(488803);const o={SmallHeight:r["small-height-breakpoint"],TabletSmall:r["tablet-small-breakpoint"],TabletNormal:r["tablet-normal-breakpoint"]}},533408:(e,t,n)=>{"use strict";n.d(t,{AdaptivePopupDialog:()=>_});var r=n(50959),o=n(650151),s=n(660538),a=n(497754),l=n.n(a),i=n(180185),c=n(710263),u=n(698043),d=n(40766),m=n(494707),h=n(996038),p=n(930052),g=n(910549);var v=n(206594),f=n(559410),y=n(609838),b=n(389986),S=n(190410),x=n(869827);function w(e){const{title:t,titleTextWrap:o=!1,subtitle:s,showCloseIcon:a=!0,onClose:i,onCloseButtonKeyDown:c,renderBefore:u,renderAfter:d,draggable:m,className:h,unsetAlign:p,closeAriaLabel:g=y.t(null,void 0,n(680395)),closeButtonReference:v}=e,[f,w]=(0,r.useState)(!1);return r.createElement(S.DialogHeaderContext.Provider,{value:{setHideClose:w}},r.createElement("div",{className:l()(x.container,h,(s||p)&&x.unsetAlign)},u,r.createElement("div",{"data-dragg-area":m,className:x.title},r.createElement("div",{className:l()(o?x.textWrap:x.ellipsis)},t),s&&r.createElement("div",{className:l()(x.ellipsis,x.subtitle)},s)),d,a&&!f&&r.createElement(b.CloseButton,{className:x.close,"data-name":"close","aria-label":g,onClick:i,onKeyDown:c,ref:v,size:"medium",preservePaddings:!0})))}var C=n(273388),k=n(800417),E=n(755596);const L={vertical:20},I={vertical:0};class _ extends r.PureComponent{constructor(){super(...arguments),this._controller=null,this._reference=null,this._orientationMediaQuery=null,this._renderChildren=(e,t)=>(this._controller=e,this.props.render({requestResize:this._requestResize,centerAndFit:this._centerAndFit,isSmallWidth:t})),this._handleReference=e=>this._reference=e,this._handleCloseBtnClick=()=>{this.props.onKeyboardClose&&this.props.onKeyboardClose(),this._handleClose()},this._handleClose=()=>{this.props.onClose()},this._handleOpen=()=>{void 0!==this.props.onOpen&&this.props.isOpened&&this.props.onOpen(this.props.fullScreen||window.matchMedia(h.DialogBreakpoints.TabletSmall).matches)},this._handleKeyDown=e=>{if(!e.defaultPrevented){if(this.props.onKeyDown&&this.props.onKeyDown(e),27===(0,i.hashFromEvent)(e)){if(e.defaultPrevented)return;if(this.props.forceCloseOnEsc&&this.props.forceCloseOnEsc())return this.props.onKeyboardClose&&this.props.onKeyboardClose(),void this._handleClose();const{activeElement:n}=document,r=(0,o.ensureNotNull)(this._reference);if(null!==n){if(e.preventDefault(),"true"===(t=n).getAttribute("data-haspopup")&&"true"!==t.getAttribute("data-expanded"))return void this._handleClose()
;if((0,u.isTextEditingField)(n))return void r.focus();if(r.contains(n))return this.props.onKeyboardClose&&this.props.onKeyboardClose(),void this._handleClose()}}var t,n;(function(e){if("function"==typeof e)return e();return Boolean(e)})(this.props.disableTabNavigationContainment)||(n=e,[9,i.Modifiers.Shift+9].includes((0,i.hashFromEvent)(n))&&n.stopPropagation())}},this._requestResize=()=>{null!==this._controller&&this._controller.recalculateBounds()},this._centerAndFit=()=>{null!==this._controller&&this._controller.centerAndFit()},this._calculatePositionWithOffsets=(e,t)=>{const n=(0,o.ensureDefined)(this.props.fullScreenViewOffsets).value();return{top:n.top,left:(0,c.isRtl)()?-n.right:n.left,width:t.clientWidth-n.left-n.right,height:t.clientHeight-n.top-n.bottom}}}componentDidMount(){this.props.ignoreClosePopupsAndDialog||f.subscribe(v.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleClose,null),this._handleOpen(),void 0!==this.props.onOpen&&(this._orientationMediaQuery=window.matchMedia("(orientation: portrait)"),(0,s.mediaQueryAddEventListener)(this._orientationMediaQuery,this._handleOpen)),this.props.fullScreenViewOffsets&&this.props.fullScreen&&this.props.fullScreenViewOffsets.subscribe(this._requestResize)}componentWillUnmount(){this.props.ignoreClosePopupsAndDialog||f.unsubscribe(v.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleClose,null),null!==this._orientationMediaQuery&&(0,s.mediaQueryRemoveEventListener)(this._orientationMediaQuery,this._handleOpen),this.props.fullScreenViewOffsets&&this.props.fullScreen&&this.props.fullScreenViewOffsets.unsubscribe(this._requestResize)}focus(){(0,o.ensureNotNull)(this._reference).focus()}getElement(){return this._reference}contains(e){var t,n;return null!==(n=null===(t=this._reference)||void 0===t?void 0:t.contains(e))&&void 0!==n&&n}render(){const{className:e,wrapperClassName:t,headerClassName:n,isOpened:o,title:s,titleTextWrap:a,dataName:i,onClickOutside:c,additionalElementPos:u,additionalHeaderElement:v,backdrop:f,shouldForceFocus:y=!0,shouldReturnFocus:b,onForceFocus:S,showSeparator:x,subtitle:_,draggable:N=!0,fullScreen:T=!1,showCloseIcon:R=!0,rounded:D=!0,isAnimationEnabled:B,growPoint:M,dialogTooltip:O,unsetHeaderAlign:A,onDragStart:F,dataDialogName:z,closeAriaLabel:P,containerAriaLabel:Q,reference:U,containerTabIndex:W,closeButtonReference:V,onCloseButtonKeyDown:Z,shadowed:K,fullScreenViewOffsets:q,fixedBody:H}=this.props,$="after"!==u?v:void 0,G="after"===u?v:void 0,j="string"==typeof s?s:z||"",Y=(0,k.filterDataProps)(this.props),X=(0,C.mergeRefs)([this._handleReference,U]);return r.createElement(p.MatchMedia,{rule:h.DialogBreakpoints.SmallHeight},(u=>r.createElement(p.MatchMedia,{rule:h.DialogBreakpoints.TabletSmall},(h=>r.createElement(d.PopupDialog,{rounded:!(h||T)&&D,className:l()(E.dialog,T&&q&&E.bounded,e),isOpened:o,reference:X,onKeyDown:this._handleKeyDown,onClickOutside:c,onClickBackdrop:c,fullscreen:h||T,guard:u?I:L,boundByScreen:h||T,shouldForceFocus:y,onForceFocus:S,shouldReturnFocus:b,backdrop:f,draggable:N,isAnimationEnabled:B,growPoint:M,
name:this.props.dataName,dialogTooltip:O,onDragStart:F,containerAriaLabel:Q,containerTabIndex:W,calculateDialogPosition:T&&q?this._calculatePositionWithOffsets:void 0,shadowed:K,fixedBody:H,...Y},r.createElement("div",{className:l()(E.wrapper,t),"data-name":i,"data-dialog-name":j},void 0!==s&&r.createElement(w,{draggable:N&&!(h||T),onClose:this._handleCloseBtnClick,renderAfter:G,renderBefore:$,subtitle:_,title:s,titleTextWrap:a,showCloseIcon:R,className:n,unsetAlign:A,closeAriaLabel:P,closeButtonReference:V,onCloseButtonKeyDown:Z}),x&&r.createElement(m.Separator,{className:E.separator}),r.createElement(g.PopupContext.Consumer,null,(e=>this._renderChildren(e,h||T)))))))))}}},789749:(e,t,n)=>{"use strict";n.d(t,{CachedLogo:()=>m});var r=n(50959),o=n(497754),s=n.n(o),a=(n(449943),n(636080)),l=n(439067),i=n(41192),c=n(741134),u=n(855393),d=n(257240);function m(e){const{className:t,placeholderLetter:n,url1:o,url2:m,size:g="xxxsmall"}=e,v=(0,r.useRef)(null),f=(0,r.useRef)(null),y=(0,r.useRef)(null),b=(0,r.useRef)(null),S=(0,r.useRef)(null),x=(0,r.useRef)(null);return(0,u.useIsomorphicLayoutEffect)((()=>{const e=void 0===o?[]:void 0===m?[o]:[o,m],t=x.current=(n=e,Promise.all(n.map((e=>(0,c.getImage)(`symbol_logo_${e}`,e,p).then((e=>e.cloneNode()))))));var n;t.then((e=>{var n,r,o,s,l,i,c,u,m;if(t===x.current)switch(e.length){case 0:null===(n=y.current)||void 0===n||n.classList.add(d.hidden),null===(r=f.current)||void 0===r||r.classList.add(a.hiddenCircleLogoClass),null===(o=v.current)||void 0===o||o.classList.remove(a.hiddenCircleLogoClass);break;case 1:h(f.current,e[0]),null===(s=y.current)||void 0===s||s.classList.add(d.hidden),null===(l=f.current)||void 0===l||l.classList.remove(a.hiddenCircleLogoClass),null===(i=v.current)||void 0===i||i.classList.add(a.hiddenCircleLogoClass);break;case 2:h(b.current,e[0]),h(S.current,e[1]),null===(c=y.current)||void 0===c||c.classList.remove(d.hidden),null===(u=f.current)||void 0===u||u.classList.add(a.hiddenCircleLogoClass),null===(m=v.current)||void 0===m||m.classList.add(a.hiddenCircleLogoClass)}}))}),[o,m]),r.createElement("span",{className:s()(t,d.container)},r.createElement("span",{ref:y,className:s()(d.pairContainer,d.hidden)},r.createElement("span",{className:(0,i.getBlockStyleClasses)(g)},r.createElement("span",{ref:S,className:s()(d.logo,(0,i.getLogoStyleClasses)(g))}),r.createElement("span",{ref:b,className:s()(d.logo,(0,i.getLogoStyleClasses)(g))}))),r.createElement("span",{ref:f,className:s()(d.logo,a.hiddenCircleLogoClass,(0,l.getStyleClasses)(g))}),r.createElement("span",{ref:v,className:s()(d.logo,(0,l.getStyleClasses)(g))},r.createElement(a.CircleLogo,{size:g,placeholderLetter:n})))}function h(e,t){e&&(e.innerHTML="",e.appendChild(t))}function p(e){e.crossOrigin="",e.decoding="async"}},190410:(e,t,n)=>{"use strict";n.d(t,{DialogHeaderContext:()=>r});const r=n(50959).createContext({setHideClose:()=>{}})},231862:(e,t,n)=>{"use strict";n.d(t,{DialogSearch:()=>u});var r=n(50959),o=n(497754),s=n.n(o),a=n(609838),l=n(72571),i=n(969859),c=n(140281);function u(e){
const{children:t,renderInput:o,onCancel:u,containerClassName:m,inputContainerClassName:h,iconClassName:p,...g}=e;return r.createElement("div",{className:s()(c.container,m)},r.createElement("div",{className:s()(c.inputContainer,h,u&&c.withCancel)},o||r.createElement(d,{...g})),t,r.createElement(l.Icon,{className:s()(c.icon,p),icon:i}),u&&r.createElement("div",{className:c.cancel,onClick:u},a.t(null,void 0,n(620036))))}function d(e){const{className:t,reference:n,value:o,onChange:a,onFocus:l,onBlur:i,onKeyDown:u,onSelect:d,placeholder:m,...h}=e;return r.createElement("input",{...h,ref:n,type:"text",className:s()(t,c.input),autoComplete:"off","data-role":"search",placeholder:m,value:o,onChange:a,onFocus:l,onBlur:i,onSelect:d,onKeyDown:u})}},6354:(e,t,n)=>{"use strict";n.d(t,{SymbolLogo:()=>u});var r=n(50959),o=n(497754),s=n.n(o),a=n(118737),l=n(868333),i=n(789749),c=n(253588);function u(e){const{logoId:t,baseCurrencyLogoId:n,currencyLogoId:o,placeholder:u,className:d,size:m="xsmall"}=e,h=(0,r.useMemo)((()=>{const e={logoid:t,"currency-logoid":o,"base-currency-logoid":n};return(0,a.removeUsdFromCryptoPairLogos)((0,a.resolveLogoUrls)(e,l.LogoSize.Medium))}),[t,o,n]);return r.createElement(i.CachedLogo,{key:m,className:s()(c.logo,d),url1:h[0],url2:h[1],placeholderLetter:u,size:m})}},56871:(e,t,n)=>{"use strict";n.d(t,{SymbolSearchDialogContentItem:()=>x});var r=n(50959),o=n(497754),s=n.n(o),a=(n(609838),n(650151)),l=n(72571),i=n(156963),c=n(260598),u=n(512991),d=n(944080),m=n(111982),h=n(297265),p=n(702054),g=n(972535),v=n(311757),f=n(6354),y=n(32465),b=n(569533),S=n(339339);function x(e){var t,n;const{dangerousTitleHTML:o,title:x,dangerousDescriptionHTML:w,description:C,searchToken:k,exchangeName:E,marketType:L,onClick:I,isSelected:_,isEod:N=!1,isActive:T=!1,isOffset:R=!1,invalid:D=!1,isHighlighted:B=!1,hideExchange:M=!1,hideMarkedListFlag:O=!1,onExpandClick:A,isExpanded:F,hoverComponent:z,country:P,providerId:Q,source:U,source2:W,type:V,flag:Z,itemRef:K,onMouseOut:q,onMouseOver:H,className:$,actions:G,reference:j,fullSymbolName:Y,logoId:X,currencyLogoId:J,baseCurrencyLogoId:ee,shortName:te,hideLogo:ne=!1,exchangeTooltip:re,hideMarketType:oe,isPrimary:se}=e,{isSmallWidth:ae,isMobile:le}=(0,a.ensureNotNull)((0,r.useContext)(d.SymbolSearchItemsDialogContext)),ie=Boolean(z),ce=!D&&!M&&(le||!ie),ue=(0,h.useWatchedValueReadonly)({watchedValue:p.watchedTheme})===m.StdTheme.Dark?S.dark:S.light,de=z,me=i.enabled("show_symbol_logos"),he=i.enabled("show_exchange_logos"),pe=me||!1,ge=null!==(t=null==W?void 0:W.description)&&void 0!==t?t:U,ve=null!==(n=null==W?void 0:W.name)&&void 0!==n?n:U;return r.createElement("div",{className:s()(S.itemRow,ae&&S.multiLine,B&&S.highlighted,B&&ue,_&&S.selected,T&&S.active,D&&S.invalid,!le&&g.mobiletouch&&ie&&S.hover,$),onClick:function(e){if(!I||e.defaultPrevented)return;e.preventDefault(),I(e)},"data-role":e["data-role"]||"list-item","data-active":T,"data-type":L,"data-name":"symbol-search-dialog-content-item",onMouseOut:q,onMouseOver:H,ref:j},r.createElement("div",{ref:K,
className:s()(S.itemInfoCell,S.cell,R&&S.offset)},r.createElement("div",{className:s()(S.actionHandleWrap,!pe&&S.fixedWidth)},r.createElement(r.Fragment,null,!1,A&&r.createElement("div",{onClick:function(e){if(!A||e.defaultPrevented)return;e.preventDefault(),A(e)}},r.createElement(l.Icon,{className:s()(S.expandHandle,F&&S.expanded,_&&S.selected),icon:b})),pe&&!R&&r.createElement("div",{className:s()(S.logo,Boolean(A)&&S.isExpandable)},r.createElement(f.SymbolLogo,{key:Y,logoId:X,currencyLogoId:J,baseCurrencyLogoId:ee,placeholder:te?te[0]:void 0})))),r.createElement("div",{className:s()(S.description,pe&&R&&S.offset)},x&&r.createElement("div",{className:s()(S.symbolTitle,T&&S.active,D&&S.invalid,!Boolean(w)&&S.noDescription),"data-name":"list-item-title"},"string"==typeof x&&k?r.createElement(c.HighlightedText,{className:S.highlightedText,text:x,queryString:k,rules:(0,u.createRegExpList)(k)}):x,N&&r.createElement("span",{className:S.dataMode},"E")),!x&&o&&r.createElement("div",{className:s()(S.symbolTitle,T&&S.active,D&&S.invalid),"data-name":"list-item-title"},r.createElement("span",{dangerouslySetInnerHTML:{__html:o}}),N&&r.createElement("span",{className:S.dataMode},"E")),ae&&fe())),!ae&&r.createElement("div",{className:s()(S.cell,S.descriptionCell,Boolean(de)&&S.addition)},fe(),de?r.createElement(de,{...e,className:S.actions,onMouseOver:void 0,onMouseOut:void 0}):null),ae&&de?r.createElement(de,{...e,className:S.cell,onMouseOver:void 0,onMouseOut:void 0}):null,ce&&r.createElement("div",{className:s()(S.exchangeCell,S.cell)},r.createElement("div",{className:s()(S.exchangeDescription)},!oe&&r.createElement("div",{className:s()(S.marketType,T&&S.active)},L),r.createElement("div",{className:S.source},!1,"economic"===V&&ge&&ve?r.createElement("div",{className:s()(S.exchangeName,T&&S.active,"apply-common-tooltip",S.narrow,oe&&S.wide),title:ge},ve):r.createElement("div",{className:s()(S.exchangeName,T&&S.active,re&&"apply-common-tooltip"),title:re},E))),he&&r.createElement("div",{className:S.flag},r.createElement(y.SymbolSearchFlag,{key:he?`${Y}_exchange`:`${P}_${Q}_${null==W?void 0:W.id}_${V}_${Z}`,className:S.icon,country:P,providerId:Q,sourceId:"economic"===V&&W?W.id:void 0}))),r.createElement("div",{className:s()(S.cell,Boolean(G)&&S.actionsCell)},G));function fe(){if(D)return null;const e=s()(S.symbolDescription,T&&S.active,!g.mobiletouch&&"apply-overflow-tooltip apply-overflow-tooltip--allow-text");return C?r.createElement("div",{className:e},k?r.createElement(c.HighlightedText,{className:S.highlightedText,text:C,queryString:k,rules:(0,u.createRegExpList)(k)}):C):w?r.createElement("div",{"data-overflow-tooltip-text":(0,v.removeTags)(w),className:e,dangerouslySetInnerHTML:{__html:w}}):null}}},32465:(e,t,n)=>{"use strict";n.d(t,{SymbolSearchFlag:()=>v});var r=n(50959),o=n(497754),s=n.n(o),a=n(111982),l=n(868333);const i=n.p+"mock-dark.16b5f3a431f502b03ae3.svg",c=n.p+"mock-light.d201313017eb2c1b989f.svg";function u(e){return e===a.StdTheme.Dark?i:c}var d=n(297265),m=n(702054),h=n(650151);const p=l.LogoSize.Medium
;var g=n(433172);function v(e){const{country:t,providerId:n,sourceId:o,className:a}=e,i=(0,d.useWatchedValueReadonly)({watchedValue:m.watchedTheme}),[c,v]=(0,r.useState)(function({country:e,providerId:t,sourceId:n}){const r=(0,l.getLogoUrlResolver)();return o=>{const s=e=>r.getProviderLogoUrl(e,p),a=[{value:n,resolve:s},{value:e,resolve:e=>r.getCountryFlagUrl(e.toUpperCase(),p)},{value:t,resolve:s}].find((({value:e})=>void 0!==e&&e.length>0));return void 0!==a?a.resolve((0,h.ensureDefined)(a.value)):u(o)}}({country:t,providerId:n,sourceId:o})(i));return r.createElement("img",{className:s()(a,g.icon),crossOrigin:"",src:c,onError:function(){v(u(i))}})}},542923:(e,t,n)=>{"use strict";n.d(t,{QualifiedSources:()=>r,qualifyProName:()=>a});var r,o=n(650151),s=n(156963);n(721167);function a(e){return e}!function(e){function t(e){return e.pro_name}function n(e){{const t=s.enabled("pay_attention_to_ticker_not_symbol")?e.ticker:e.full_name;return(0,o.ensureDefined)(t)}}e.fromQuotesSnapshot=function(e){return"error"===e.status?e.symbolname:e.values.pro_name},e.fromQuotesResponse=function(e){const{values:n,symbolname:r,status:o}=e;return"error"===o&&r?r:t(n)},e.fromQuotes=t,e.fromSymbolSearchResult=function(e,t){{const{ticker:n,full_name:r}=null!=t?t:e;return s.enabled("pay_attention_to_ticker_not_symbol")?(0,o.ensureDefined)(null!=n?n:r):(0,o.ensureDefined)(r)}},e.fromSymbolInfo=n,e.fromSymbolMessage=function(e,t){return"symbol_resolved"===t.method?n(t.params[1]):e}}(r||(r={}))},384327:(e,t,n)=>{"use strict";n.d(t,{createSearchSources:()=>l,filterSearchSources:()=>s,isAllSearchSourcesSelected:()=>o,splitSearchSourcesByGroup:()=>a});const r=[];function o(e){return""===e.value()}function s(e,t){return e.filter((e=>e.includes(t)))}function a(e){const t=new Map;e.forEach((e=>{t.has(e.group())?t.get(e.group()).push(e):t.set(e.group(),[e])}));for(const e of t.values()){e[0].group()!==ExchangeGroup.NorthAmerica&&e.sort(((e,t)=>e.name().toLowerCase()>t.name().toLowerCase()?1:-1))}return new Map([...t.entries()].sort((([e],[t])=>r.indexOf(e)-r.indexOf(t))))}function l(e,t){return t.map((t=>new e(t)))}},159223:(e,t,n)=>{"use strict";n.d(t,{SymbolSearchDialogBodyContext:()=>r});const r=n(50959).createContext(null)},944080:(e,t,n)=>{"use strict";n.d(t,{SymbolSearchItemsDialogContext:()=>r});const r=n(50959).createContext(null)},121087:(e,t,n)=>{"use strict";n.d(t,{SymbolSearchItemsDialog:()=>$e});var r=n(50959),o=n(497754),s=n.n(o),a=n(609838),l=n(32012);const i=["futures","forex","bond","economic"];var c=n(313739),u=n(156963),d=n(996038),m=n(533408),h=n(72571),p=n(586240),g=n(671129),v=n(944080),f=n(231862),y=n(930202),b=n(892932);function S(e,t,n){return`source-item-${e}-${t}-${n}`}var x=n(384327),w=n(254638);function C(e){const{children:t,className:n}=e;return r.createElement("div",{className:s()(w.container,n)},r.createElement("div",{className:w.childrenWrapper},t))}var k=n(650151),E=n(840976),L=n(260598),I=n(512991),_=n(721167),N=n(491540),T=n(250674);function R(e){
const{searchSource:t,onClick:n,queryString:o,isFocused:a,id:l}=e,{symbolSearchContent:i,isAllSearchSourcesSelected:c,allSearchSourcesTitle:u,isMobile:d}=(0,E.useEnsuredContext)(v.SymbolSearchItemsDialogContext),m=i.currentSelectedSearchSource,p=(0,k.ensureNotNull)(m).value(),g=c(t),f=t.value()===p,y=(0,r.useMemo)((()=>(0,I.createRegExpList)(o)),[o]),b=t.description(),S=b&&!g,x=_.isSeparateSymbolSearchTabs&&g&&u?u:t.name(),w=s()(T.container,d?T.mobile:T.desktop,f&&T.selected,a&&T.focused,g&&T.allSelected,g&&T.libAllSelected,!g&&d&&T.bordered);return r.createElement("div",{className:s()(!d&&T.wrap,g&&T.libAllSelected),onClick:n,id:l},r.createElement("div",{className:w},r.createElement("div",{className:T.iconWrap},!!g&&r.createElement(h.Icon,{className:s()(T.icon,T.allSelectedIcon),icon:N})),r.createElement("div",{className:T.textBlock},r.createElement("div",{className:s()(T.title,!S&&!d&&T.titleWithoutDesc)},r.createElement(L.HighlightedText,{className:s()(f&&T.highlighted),queryString:o,text:x,rules:y})),S&&r.createElement("div",{className:s()(T.description,"apply-overflow-tooltip")},r.createElement(L.HighlightedText,{className:T.highlighted,queryString:o,rules:y,text:b})))))}var D=n(297265),B=n(702054),M=n(651049),O=n(159223),A=n(366619),F=n(267562),z=n(270699);const P={emptyTextClassName:z.emptyText};function Q(e){const{searchSources:t}=e,{setSelectedIndex:o,setSelectedSearchSource:l,setMode:i,isMobile:c,emptyState:u,autofocus:d}=(0,E.useEnsuredContext)(v.SymbolSearchItemsDialogContext),m=(0,D.useWatchedValueReadonly)({watchedValue:B.watchedTheme})===M.StdTheme.Dark?A:F,w=(0,g.useMatchMedia)(p["media-phone-vertical"]),[k,L]=(0,r.useState)(""),I=(0,r.useMemo)((()=>[{group:null,sources:(0,_.createGroupColumns)((0,x.filterSearchSources)(t,k),w?1:2)}]),[t,k,w]),N=(0,r.useRef)(null),T=(0,r.useRef)(null),{focusedItem:Q,activeDescendant:U,handleKeyDown:W,resetFocusedItem:V}=function(e,t,n){const[o,s]=(0,r.useState)(null),[a,l]=(0,r.useState)("");function i(t){const n=e[t.groupIndex].sources[t.col].length-1;if(t.row===n){const e=d(t.groupIndex+1);if(null===e)return;return t.col>0&&!u({...t,groupIndex:e,row:0})?void s({groupIndex:e,col:0,row:0}):void s({...t,groupIndex:e,row:0})}s({...t,row:t.row+1})}function c(t){var n,r;if(0===t.row){const o=d(t.groupIndex-1,-1);if(null===o)return;const a=null!==(r=null===(n=e[o].sources[t.col])||void 0===n?void 0:n.length)&&void 0!==r?r:0;return 0===a?void s({groupIndex:o,col:0,row:0}):void s({...t,groupIndex:o,row:a-1})}s({...t,row:t.row-1})}function u(t){var n,r;return Boolean(null===(r=null===(n=e[t.groupIndex])||void 0===n?void 0:n.sources[t.col])||void 0===r?void 0:r[t.row])}function d(t=0,n=1){const r=e.length;let o=(t+r)%r;for(;!u({groupIndex:o,col:0,row:0});)if(o=(o+n+r)%r,o===t)return null;return o}return(0,r.useEffect)((()=>{if(!n.current)return;if(!o)return void l("");const e=S(o.groupIndex,o.col,o.row),t=n.current.querySelector(`#${e}`);null==t||t.scrollIntoView({block:"nearest"}),l(e)}),[o]),(0,r.useEffect)((()=>{s(null)}),[t]),{focusedItem:o,activeDescendant:a,
handleKeyDown:function(r){if(!n.current)return;const a=(0,y.hashFromEvent)(r);if(32!==a&&13!==a)switch((0,b.mapKeyCodeToDirection)(a)){case"blockNext":if(r.preventDefault(),!o){const e=d();if(null===e)break;s({groupIndex:e,col:0,row:0});break}i(o);break;case"blockPrev":if(r.preventDefault(),!o)break;c(o);break;case"inlineNext":{if(!o||t)break;r.preventDefault();const n=e[o.groupIndex].sources.length;if(o.col===n-1||!u({...o,col:o.col+1})){i({...o,col:0});break}s({...o,col:o.col+1});break}case"inlinePrev":{if(!o||t)break;r.preventDefault();const n=e[o.groupIndex].sources.length;if(0===o.col){if(0!==o.row){c({...o,col:n-1});break}const t=d(o.groupIndex-1,-1);if(null===t)break;const r=e[t].sources.length,a=e[t].sources[0].length;if(!u({groupIndex:t,col:r-1,row:a-1})){c(o);break}s({groupIndex:t,col:r-1,row:a-1});break}s({...o,col:o.col-1});break}}else{if(!o)return;r.preventDefault();const e=n.current.querySelector(`#${S(o.groupIndex,o.col,o.row)}`);e instanceof HTMLElement&&e.click()}},resetFocusedItem:()=>s(null)}}(I,w,T);(0,r.useLayoutEffect)((()=>{var e;d&&(null===(e=null==N?void 0:N.current)||void 0===e||e.focus())}),[]);const Z=u?r.createElement(u,null):r.createElement(C,{className:z.noResultsDesktop},r.createElement(h.Icon,{icon:m,className:z.emptyIcon}),r.createElement("div",{className:z.emptyText},a.t(null,void 0,n(929673)))),K=!(I.length&&I.every((e=>0===e.sources.length)));return r.createElement(O.SymbolSearchDialogBodyContext.Provider,{value:P},r.createElement(f.DialogSearch,{placeholder:a.t(null,void 0,n(252298)),onChange:function(e){V(),L(e.target.value),T&&T.current&&(T.current.scrollTop=0)},reference:N,onKeyDown:W,onBlur:V,"aria-activedescendant":U}),K?r.createElement("div",{ref:T,className:s()(z.contentList,!c&&z.contentListDesktop),onTouchStart:function(){var e;null===(e=N.current)||void 0===e||e.blur()}},I.map(((e,t)=>{const{group:n,sources:o}=e;return 0===o.length?r.createElement(r.Fragment,{key:n}):r.createElement(r.Fragment,{key:n},!1,r.createElement("div",{className:s()(z.searchSourceItemsContainer,!c&&z.searchSourceItemsContainerDesktop,w&&z.oneColumn)},o.map(((e,n)=>r.createElement("div",{key:`${t}-${n}`,className:z.column},e.map(((e,o)=>r.createElement(R,{id:S(t,n,o),isFocused:!!Q&&(Q.groupIndex===t&&Q.col===n&&Q.row===o),key:e.value(),searchSource:e,queryString:k,onClick:q.bind(null,e)}))))))))}))):Z);function q(e){l(e),i("symbolSearch"),o(-1)}}var U=n(500962),W=n(148442);n(147668),n(352778);function V(e){return e.hasOwnProperty("exchange")}async function Z(e){{const t=await async function(e){return new Promise((t=>{window.ChartApiInstance.searchSymbols(e.text||"",e.exchange||"",e.type||"","",!1,!0,"",!0,"",(e=>{t(e)}))}))}(e);return{symbols:t,symbols_remaining:0}}}new Map([].map((({value:e,search_type:t})=>[e,t])));var K=n(673026),q=n(32133),H=n(180185),$=n(747633),G=n(707002),j=n(900486),Y=n(481574),X=n(935119),J=n(132617),ee=n(569135),te=n(863861),ne=n(452597);function re(e){var t;const{state:n,update:o}=e,{searchRef:s,forceUpdate:a,upperCaseEnabled:i}=(0,k.ensureNotNull)((0,
r.useContext)(v.SymbolSearchItemsDialogContext)),c=(0,G.tokenize)(null===(t=s.current)||void 0===t?void 0:t.value),d=(0,l.validate)(c);let m=[{icon:j,insert:"/",type:"binaryOp",name:"division"},{icon:Y,insert:"-",type:"binaryOp",name:"subtraction"},{icon:X,insert:"+",type:"binaryOp",name:"addition"},{icon:J,insert:"*",type:"binaryOp",name:"multiplication"}];return u.enabled("hide_exponentiation_spread_operator")||(m=m.concat([{icon:ee,insert:"^",type:"binaryOp",name:"exponentiation"}])),u.enabled("hide_reciprocal_spread_operator")||(m=m.concat([{icon:te,type:"complete",name:"1/x",callback:()=>{!s.current||d.errors.length||d.warnings.length||(s.current.value=(0,l.stringifyTokens)((0,l.flip)(c)),a())}}])),r.createElement("div",{className:ne.actions},m.map((e=>r.createElement($.ToolWidgetButton,{className:ne.actionButton,icon:e.icon,key:e.name,isDisabled:oe(e,d),onClick:()=>function(e){var t;if(!oe(e,d)){if(e.insert&&s.current){const t=s.current.value+e.insert;s.current.value=t,s.current.setSelectionRange(t.length,t.length);const[r,,c]=(0,l.getCurrentTokenParamsFromInput)(s.current,i);n.current&&(n.current.selectedIndexValue=-1,n.current.searchSpreadsValue=(0,l.isSpread)(c),n.current.searchTokenValue=r),a(),o()}e.callback&&e.callback(),null===(t=s.current)||void 0===t||t.focus(),(0,q.trackEvent)("GUI","SS",e.name)}}(e)}))))}function oe(e,t){let n=!1;if(!t.errors.length)switch(e.type){case"binaryOp":n="var"===t.currentState;break;case"openBrace":n="var"!==t.currentState;break;case"closeBrace":n="var"===t.currentState&&t.braceBalance>0;break;case"complete":n=!t.errors.length&&!t.warnings.length}return!n}var se=n(800417),ae=n(161371);function le(e){const{title:t,isActive:n,isAnimated:r,activeColor:o,size:a="m",appearance:l="default",fontSize:i="m",grayStyles:c,className:u}=e;return s()(ae.bubble,n&&ae.active,o&&ae[o],t&&"apply-common-tooltip",a&&ae[`size-${a}`],i&&ae[`fontSize-${i}`],l&&ae[`appearance-${l}`],r&&ae.animated,c&&ae.gray,u)}function ie(e){const{id:t,title:n,tabIndex:o,role:a,contentClassName:l,children:i,onClick:c,onMouseDown:u,reference:d,grayStyles:m,...h}=e;return r.createElement("span",{...(0,se.filterAriaProps)(h),...(0,se.filterDataProps)(h),id:t,title:n,tabIndex:o,role:a,className:le(e),onClick:c,onMouseDown:u,ref:d},r.createElement("span",{className:s()(ae.content,l)},i))}var ce=n(423886);function ue(e){const{className:t,itemClassName:n,itemContentClassName:s,items:a,getItemTitle:l,getItemTooltip:i,getItemKey:c,checkItemIsActive:u,getItemColor:d,onBubbleClick:m,multiline:h,children:p,BubbleComponent:g=ie,reference:v,fontSize:f,grayStyles:y}=e;return r.createElement("div",{className:o(t,ce.bubbles,h&&ce.multiLine),ref:v},a.map(((e,t)=>r.createElement(g,{key:c?c(e):t,id:c?c(e):t.toString(),className:o(ce.bubble,n),contentClassName:s,onClick:function(){m(e)},onMouseDown:function(e){e.preventDefault()},isActive:!!u&&u(e),activeColor:d?d(e):void 0,fontSize:f,title:i?i(e):void 0,grayStyles:y},l(e)))),p)}var de=n(132455),me=n(220037),he=n(102478),pe=n(898237),ge=n(515783),ve=n(552019),fe=n(314444)
;const ye=(0,_.getDefaultSearchSource)();function be(e){const{mode:t,setMode:o,searchRef:l,cachedInputValue:i,setSelectedIndex:c,setSelectedSearchSource:u,isAllSearchSourcesSelected:d,allSearchSourcesTitle:m,upperCaseEnabled:p,symbolSearchContent:g}=(0,E.useEnsuredContext)(v.SymbolSearchItemsDialogContext),f=g.currentSelectedSearchSource,y=(0,k.ensureNotNull)(f),b="symbolSearch"===t,S=d(y),x=_.isSeparateSymbolSearchTabs&&S&&m?m:y.name(),w=(0,r.useCallback)((()=>{var e;if(_.isSeparateSymbolSearchTabs&&!S&&ye)return u(ye),c(-1),void(null===(e=l.current)||void 0===e||e.focus());l.current&&(i.current=p?l.current.value.toUpperCase():l.current.value),o("exchange")}),[S,l,p,o,u]);return _.isSeparateSymbolSearchTabs?b?r.createElement(pe.LightButton,{onClick:w,isPills:!S,size:"xsmall",variant:S?"ghost":"quiet-primary",showCaret:S,endIcon:S?void 0:ve,enableActiveStateStyles:!1,className:s()(fe.button,!S&&fe.withFlag),tabIndex:-1,"data-name":"sources-button"},r.createElement("div",{className:fe.buttonContent},null,r.createElement("span",null,x))):null:b?r.createElement("div",{className:s()(fe.flagWrap,"apply-common-tooltip",!S&&fe.withFlag),title:a.t(null,void 0,n(313269)),onClick:w,"data-name":"sources-button"},S&&r.createElement(h.Icon,{className:fe.icon,icon:N}),null,r.createElement("div",{className:s()(fe.title)},x),r.createElement(ge.ToolWidgetCaret,{className:fe.caret,dropped:!1})):null}var Se=n(37796);function xe(e){const{brokerButton:t=null}=e,{isSmallWidth:o,selectedFilterValues:l,setSelectedFilterValues:i,setSelectedIndex:c,isMobile:u,searchRef:d,symbolSearchContent:m}=(0,E.useEnsuredContext)(v.SymbolSearchItemsDialogContext),h=m.tabSelectFilters;return _.isSeparateSymbolSearchTabs?r.createElement("div",{className:s()(Se.wrap,Se.small,Se.newStyles,u&&Se.mobile)},t&&r.createElement("div",{className:Se.brokerWrap},t),m.canChangeExchange&&r.createElement("div",{className:Se.filterItem},r.createElement(be,null)),h&&h.map((e=>{const{id:t,options:n,label:o}=e,s=n.find((e=>e.value===FILTER_DEFAULT_VALUE));if(!s)throw new Error("There must be default filter value in filter definition");const a=n.find((e=>{var n;return e.value===(null===(n=l[m.currentSymbolType])||void 0===n?void 0:n[t])}))||s;return r.createElement("div",{key:t,className:Se.filterItem},r.createElement(SymbolSearchSelectFilter,{selectedOption:a,defaultOption:s,options:n,onSelect:e=>{var n;i(m.currentSymbolType,{[t]:e.value}),trackEvent("New SS",m.currentSymbolType,null===e.value?e.analyticsLabel:e.value),c(-1),null===(n=d.current)||void 0===n||n.focus()},label:o,isMobile:u,"data-name":t}))}))):r.createElement("div",{className:s()(Se.wrap,o&&Se.small)},r.createElement("div",{className:Se.item},r.createElement("div",{className:Se.text},o?a.t(null,void 0,n(948490)):a.t(null,void 0,n(589053)))),r.createElement("div",{className:Se.item},!o&&r.createElement("div",{className:Se.text},a.t(null,void 0,n(629601))),m.canChangeExchange&&r.createElement("div",{className:Se.exchange},r.createElement(be,null))))}var we=n(710263),Ce=n(852662);function ke(e){
const{onTouchMove:t,listRef:n,className:o,listWrapRef:a,virtualListKey:l,items:i,getItemSize:c,hideFeed:u,canLoadMore:d,onLoadMoreSymbols:m}=e,{mode:h,isSmallWidth:p,handleListWidth:g}=(0,E.useEnsuredContext)(v.SymbolSearchItemsDialogContext),[f,y]=(0,r.useState)(null),b=(0,he.useResizeObserver)((function([e]){y(e.contentRect.height),g(e.contentRect.width)})),S=(0,r.useCallback)((e=>{const{index:t,style:n}=e;return r.createElement("div",{style:n},i[t])}),[i]),x=(0,r.useCallback)((e=>(0,k.ensure)(i[e].key)),[i]),w="watchlist"===h&&null!==f;return r.createElement("div",{className:s()(Ce.wrap,w&&Ce.watchlist,u&&Ce.noFeed,u&&_.isSeparateSymbolSearchTabs&&Ce.newStyles,o),onTouchMove:t,ref:b},r.createElement("div",{ref:a,className:s()(Ce.scrollContainer,u&&Ce.noFeed)},w?r.createElement(me.VariableSizeList,{key:l,ref:n,className:Ce.listContainer,width:"100%",height:(0,k.ensureNotNull)(f),itemCount:i.length,itemSize:c,children:S,itemKey:x,overscanCount:20,direction:(0,we.isRtl)()?"rtl":"ltr"}):r.createElement(r.Fragment,null,r.createElement("div",{className:s()(Ce.listContainer,p&&Ce.multiLineItemsContainer)},!_.isSeparateSymbolSearchTabs&&r.createElement(xe,null),...i,!1))))}var Ee=n(965800),Le=n(56871),Ie=n(285544);const _e=u.enabled("hide_image_invalid_symbol");function Ne(e){const{otherSymbolsCount:t,onChangeSymbolTypeFilter:n,onResetFilters:s,onListTouchMove:a,brokerTitle:l,brokerLogoInfo:i,isBrokerActive:c,onBrokerToggle:u,listRef:d,listWrapRef:m,onLoadMoreSymbols:h,canLoadMore:p}=e,{mode:g,isMobile:f,selectedSymbolType:y,symbolTypes:b,feedItems:S,contentItem:x,emptyState:w=Te,symbolSearchContent:C,symbolSearchState:k}=(0,E.useEnsuredContext)(v.SymbolSearchItemsDialogContext),L=l?r.createElement(BrokerButton,{brokerTitle:l,isActive:c,onToggle:u,logoInfo:i}):null,I="symbolSearch"===g&&["good","loadingWithPaginated"].includes(k),N=null!=x?x:Le.SymbolSearchDialogContentItem,T=(0,r.useMemo)((()=>S.map((e=>r.createElement(N,{...e,searchToken:C.token})))),[S]);return r.createElement(r.Fragment,null,"symbolSearch"===g&&r.createElement(r.Fragment,null,b.length>0&&r.createElement(ue,{className:o(_.isSeparateSymbolSearchTabs&&(C.withFilters||f&&L)&&Ie.withFilters,!f&&L&&Ie.withButton),itemClassName:Ie.symbolType,items:b,getItemTitle:e=>e.name,getItemKey:e=>e.value,checkItemIsActive:e=>e.value===y,onBubbleClick:n,multiline:!f,grayStyles:!0},!f&&r.createElement("div",{className:Ie.brokerButton},L)),!_.isSeparateSymbolSearchTabs&&f&&b.length>0&&l&&r.createElement("div",{className:Ie.brokerButtonWrap},L),_.isSeparateSymbolSearchTabs&&r.createElement(xe,{brokerButton:f?L:void 0})),r.createElement(ke,{listRef:d,listWrapRef:m,onTouchMove:a,items:T,getItemSize:()=>De,onLoadMoreSymbols:h,canLoadMore:p,hideFeed:!I}),"loading"===k&&r.createElement("div",{className:Ie.spinnerWrap},r.createElement(de.Spinner,null)),"symbolSearch"===g&&r.createElement(r.Fragment,null,!1,"empty"===k&&r.createElement(w,null)))}function Te(e){const t=(0,Ee.useTheme)()===M.StdTheme.Dark?A:F;return r.createElement(C,{className:Ie.noResultsDesktop
},!_e&&r.createElement(h.Icon,{icon:t,className:Ie.emptyIcon}),r.createElement("div",{className:Ie.emptyText},a.t(null,void 0,n(641379))))}const Re=(0,_.getDefaultSearchSource)(),De=52;function Be(e){const{mode:t,setMode:o,setSelectedIndex:i,isMobile:c,selectedSearchSource:d,setSelectedSearchSource:m,isAllSearchSourcesSelected:h,selectedSymbolType:p,setSelectedSymbolType:g,symbolSearchContent:y,setSymbolSearchContent:b,searchRef:S,setSearchSpreads:x,showSpreadActions:w,selectedItem:C,forceUpdate:k,placeholder:L,initialScreen:I,footer:N,searchInput:T,upperCaseEnabled:R,externalInput:D,handleKeyDown:B,customSearchSymbols:M,filterDefinitions:A,filterQueryParams:F,searchSources:z,symbolSearchState:P,setSymbolSearchState:Q,onEmptyResults:$}=(0,E.useEnsuredContext)(v.SymbolSearchItemsDialogContext),G=(0,r.useRef)(t);G.current=t;const j=(0,r.useRef)(new AbortController),[Y,X]=(0,r.useState)(0),J=(0,r.useRef)(0),[ee,te]=(0,r.useState)(y.token),ne=(0,r.useRef)(null),oe=(0,r.useRef)(null),se=(0,r.useRef)({selectedIndexValue:-1,searchTokenValue:"",searchSpreadsValue:!0}),ae=(0,r.useRef)(null),le=(0,r.useRef)(null),ie=(0,r.useRef)(null),{broker:ce=null,brokerId:ue,brokerTitle:de,brokerLogoInfo:me,isBrokerChecked:he=!1,setIsBrokerChecked:pe=(()=>{}),unhideSymbolSearchGroups:ge=""}={brokerId:void 0,brokerTitle:void 0,brokerLogoInfo:void 0};(0,r.useEffect)((()=>()=>{j.current.abort(),Be(),Me()}),[]),(0,r.useEffect)((()=>{(null==S?void 0:S.current)&&te(S.current.value)}),[]),(0,r.useEffect)((()=>{const e=S.current;if(e)return e.addEventListener("input",we),e.addEventListener("focus",Te),e.addEventListener("select",xe),e.addEventListener("click",xe),e.addEventListener("keyup",De),D&&B&&e.addEventListener("keydown",B),()=>{e&&(e.removeEventListener("input",we),e.removeEventListener("focus",Te),e.removeEventListener("select",xe),e.removeEventListener("click",xe),e.removeEventListener("keyup",De),D&&B&&e.removeEventListener("keydown",B))}}),[B]),(0,r.useEffect)((()=>{Boolean(I)&&""===ee.trim()||(b((e=>({...e,symbolStartIndex:0}))),ke(ee,p,d).then((()=>{ne.current&&(ne.current.scrollTop=0)})))}),[ee,p,d,he,I,F]),(0,r.useEffect)((()=>{var e;if(!C||!S.current)return;if(!u.enabled("show_spread_operators"))return S.current.value=C.symbol,void k();const t=V(C)?C.exchange:C.parent.exchange;let n;n="contracts"in C&&(null===(e=C.contracts)||void 0===e?void 0:e.length)?C.contracts[0]:C;const r={name:n.symbol,exchange:t,prefix:n.prefix,fullName:n.full_name},[o,s]=(0,l.getNextSymbolInputValueAndPosition)(S.current,r,R);S.current.value=o,S.current.setSelectionRange(s,s),k()}),[C]);const ve=null!=I?I:"div",fe=Boolean(I)&&"symbolSearch"!==t,ye=null!=T?T:f.DialogSearch,be=(0,r.useMemo)((()=>({listRef:oe,resetRecommends:_e,updateRecommends:ke,searchToken:ee,emptyTextClassName:Ie.emptyText,isBrokerChecked:he,symbolSearchState:P,currentMode:G})),[oe,ee,he,P,G,F]);return r.createElement(O.SymbolSearchDialogBodyContext.Provider,{value:be},!(D&&"symbolSearch"===t)&&r.createElement(ye,{reference:S,className:s()(Ie.search,R&&Ie.upperCase),
placeholder:L||a.t(null,void 0,n(252298))},w&&r.createElement(re,{state:se,update:Ce})),fe?r.createElement(ve,null):r.createElement(Ne,{otherSymbolsCount:Y,onListTouchMove:function(){var e;null===(e=S.current)||void 0===e||e.blur()},onChangeSymbolTypeFilter:function(e){const{value:t}=e;g(t),i(-1)},onResetFilters:function(){var e;_.isSeparateSymbolSearchTabs?"resetFilter"===P?g((0,_.getAllSymbolTypesValue)()):Re&&m(Re):(g((0,_.getAllSymbolTypesValue)()),Re&&m(Re));pe(!1),c||null===(e=S.current)||void 0===e||e.focus()},brokerTitle:de,brokerLogoInfo:me,isBrokerActive:he,onBrokerToggle:pe,listRef:oe,listWrapRef:ne,onLoadMoreSymbols:void 0,canLoadMore:void 0}),N);function Se(){if(!S.current)return;const[e,t,n]=(0,l.getCurrentTokenParamsFromInput)(S.current,R);J.current=t,se.current={selectedIndexValue:-1,searchSpreadsValue:(0,l.isSpread)(n),searchTokenValue:e},ae.current||(ae.current=setTimeout(Ce,0))}function xe(){if(!S.current)return;const[,e]=(0,l.getCurrentTokenParamsFromInput)(S.current,R);e!==J.current&&Se()}function we(){u.enabled("show_spread_operators")?Se():S.current&&(se.current={selectedIndexValue:-1,searchSpreadsValue:!1,searchTokenValue:S.current.value},ae.current||(ae.current=setTimeout(Ce,0)))}function Ce(){const{selectedIndexValue:e,searchTokenValue:t,searchSpreadsValue:n}=se.current;ae.current=null,(0,U.unstable_batchedUpdates)((()=>{x(n),i(e),te(R?t.toUpperCase():t)}))}async function ke(e,t,n,r){var o,s,a;try{"noop"===P?Q("loading"):r?Q("loadingWithPaginated"):(Be(),Me(),le.current=setTimeout((()=>{b({token:e,canChangeExchange:Boolean(d&&z.length>1&&!(0,_.exchangeSelectDisabled)(t)),tabSelectFilters:null==A?void 0:A[t],withFilters:!!t,currentSymbolType:t,currentSelectedSearchSource:d,currentTabAvailableSearchSources:z,renderSymbolSearchList:[],symbolsRemaining:0,symbolStartIndex:0}),Q("loading")}),500)),Oe();(0,_.getAllSymbolTypesValue)();const i=!1;let c;if(he&&ce){c=(await(0,W.respectAbort)(j.current.signal,ce.accountMetainfo())).prefix}const m=u.enabled("show_spread_operators")?null!==(s=null!==(o=(0,l.getExchange)(e))&&void 0!==o?o:c)&&void 0!==s?s:null==n?void 0:n.getRequestExchangeValue():null==d?void 0:d.getRequestExchangeValue(),h=(0,l.getExchange)(e)||null===(a=n||d)||void 0===a?void 0:a.getRequestCountryValue(),[p,g]=await Promise.all([Le(j.current.signal,e,t,n,m,h,r),i&&!r?getRecent():Promise.resolve([])]),v=g.filter((e=>{var t,n;return m?(null===(t=e.exchange)||void 0===t?void 0:t.toLowerCase())===m.toLowerCase():!h||(null===(n=e.country)||void 0===n?void 0:n.toLowerCase())===h.toLowerCase()})),f=new Set(v.map((e=>`${e.exchange}_${e.symbol}`))),S=p.symbols.filter((e=>!f.has(`${e.exchange}_${e.symbol}`)));let x=function(e,t=window.ChartApiInstance.symbolsGrouping()){var n;const r={},o=[];for(let s=0;s<e.length;++s){const a=e[s];if(a.prefix||Array.isArray(a.contracts))return e;const l=t[a.type];if(void 0===l){o.push(a);continue}const i=l.exec(a.symbol);if(i){const e=i[1];let t;r.hasOwnProperty(e)?t=r[e]:(t=o.length,r[e]=t,o.push({type:a.type,symbol:e,exchange:a.exchange,
description:a.description,full_name:a.exchange+":"+e,contracts:[]})),null===(n=o[t].contracts)||void 0===n||n.push(a)}else o.push(a)}return o}([...v,...S]);if(r&&(x=[...y.renderSymbolSearchList,...x]),!x.length)return b((n=>({...n,canChangeExchange:Boolean(d&&z.length>1&&!(0,_.exchangeSelectDisabled)(t)),tabSelectFilters:null==A?void 0:A[t],token:e,symbolsRemaining:0,withFilters:!!t,currentSymbolType:t,currentSelectedSearchSource:d,currentTabAvailableSearchSources:z}))),Be(),Q("empty"),void Ee();Be(),b((n=>({...n,canChangeExchange:Boolean(d&&z.length>1&&!(0,_.exchangeSelectDisabled)(t)),tabSelectFilters:null==A?void 0:A[t],renderSymbolSearchList:x,token:e,symbolsRemaining:p.symbols_remaining,withFilters:!!t,currentSymbolType:t,currentSelectedSearchSource:d,currentTabAvailableSearchSources:z,symbolStartIndex:n.symbolStartIndex+p.symbols.length}))),Q("good")}catch(e){(0,W.skipAbortError)(e)}}function Ee(){$&&(ie.current=setTimeout((()=>$()),1e3))}async function Le(e,t,n,r,o,s,a){var i;const c={serverHighlight:!1,text:u.enabled("show_spread_operators")?(0,l.shortName)(t):null===(i=S.current)||void 0===i?void 0:i.value,exchange:o,country:s,type:n,lang:window.language||"",sortByCountry:void 0,brokerId:ue,onlyTradable:Boolean(ue)&&he,unhideSymbolSearchGroups:ge,signal:e,start:a,filterQueryParams:F},d=(0,K.getSearchRequestDelay)();return void 0!==d&&await(0,W.delay)(e,d),M?M(c):Z(c)}function _e(){Oe(),Q("empty"),te(""),x(!1),b((e=>({...e,symbolStartIndex:0}))),Be()}function Te(){"watchlist"===G.current&&(o("symbolSearch"),(0,q.trackEvent)("Watchlist","Mobile SS","Go to SS page"))}function De(e){switch((0,H.hashFromEvent)(e)){case 37:case 39:xe()}}function Be(){le.current&&clearTimeout(le.current)}function Me(){ie.current&&clearTimeout(ie.current)}function Oe(){j.current.abort(),j.current=new AbortController}}var Me=n(380132),Oe=n(446209),Ae=n(542923),Fe=n(870122);function ze(e){const[t,n]=(0,r.useState)((()=>{const{defaultSearchSource:t,searchSources:n}=e,r=Fe.getValue("symboledit.exchangefilter","");return n.find((e=>e.value()===r))||t}));return[t,(0,r.useCallback)((e=>{var t;n(e),t=e,Fe.setValue("symboledit.exchangefilter",t.value())}),[])]}function Pe(e){const[t,n]=(0,r.useState)((()=>{if(1===e.types.length)return e.types[0].value;const t=Fe.getValue("symboledit.filter",(0,_.getAllSymbolTypesValue)());return e.types.find((e=>e.value===t))?t:(0,_.getAllSymbolTypesValue)()}));return[t,(0,r.useCallback)((e=>{var t;n(e),t=e,Fe.setValue("symboledit.filter",t)}),[])]}var Qe=n(585938),Ue=n(626800),We=n(44258),Ve=n(111706),Ze=n(362393);const Ke=(0,_.getAvailableSearchSources)(),qe=(0,_.getDefaultSearchSource)(),He=u.enabled("uppercase_instrument_names");function $e(e){var t
;const{onClose:o,initialMode:s,defaultValue:m="",showSpreadActions:h,hideMarkedListFlag:p,selectSearchOnInit:g=!0,onSearchComplete:f,dialogTitle:y=a.t(null,void 0,n(882719)),placeholder:S,fullscreen:w,initialScreen:C,wrapper:k,dialog:E,contentItem:L,footer:I,searchInput:N,emptyState:T,autofocus:R,dialogWidth:D,onKeyDown:B,searchSourcesScreen:M,customSearchSymbols:O,isDisableFiltering:A,disableRecents:F,shouldReturnFocus:z,onSymbolFiltersParamsChange:P,onEmptyResults:U}=e,W=(0,r.useMemo)((()=>A?[]:e.symbolTypes?e.symbolTypes:(0,_.getAvailableSymbolTypes)()),[]),K=void 0!==e.input,q=A?[]:Ke,[$,G]=(0,r.useState)(s),j=(0,r.useRef)(m),[Y,X]=ze({searchSources:q,defaultSearchSource:qe}),[J,ee]=[],[te,ne]=Pe({types:W}),[re,oe]=[{},()=>{}],[se,ae]=(0,r.useState)(!1),[le,ie]=(0,r.useState)(-1),[ce,ue]=(0,r.useState)("noop"),de=_.isSeparateSymbolSearchTabs?TAB_SELECT_FILTER_MAP:void 0,me=_.isSeparateSymbolSearchTabs?(null==J?void 0:J[te])||qe:Y,he=(0,r.useMemo)((()=>{if(!_.isSeparateSymbolSearchTabs)return q;return q.filter((e=>{const t=TAB_SOURCE_FILTER_MAP[te];if(!t)return!1;if(!te)return!0;const n=e.group();return n===ExchangeGroup.AllExchanges||n&&t.value.includes(n)}))}),[q,te]),[pe,ge]=(0,r.useState)((()=>({canChangeExchange:Boolean(Y&&Ke.length>1&&!(0,_.exchangeSelectDisabled)(te)),tabSelectFilters:null==de?void 0:de[te],withFilters:!!te,renderSymbolSearchList:[],token:j.current,symbolsRemaining:0,currentSymbolType:te,currentSelectedSearchSource:me,currentTabAvailableSearchSources:he,symbolStartIndex:0}))),ve=(0,r.useCallback)((e=>{trackEvent("New SS",te,"Change sources"),null==ee||ee(te,e),ge((t=>({...t,currentSelectedSearchSource:e})))}),[te,ge]),fe=(0,r.useRef)(null!==(t=e.input)&&void 0!==t?t:null),[ye,be]=(0,r.useState)(!1),Se=(0,Qe.useForceUpdate)(),[xe,Ce]=(0,r.useState)(new Set),{broker:ke=null,brokerId:Ee,unhideSymbolSearchGroups:Le="",displayBrokerSymbol:Ie=!1}={brokerId:void 0};(0,r.useLayoutEffect)((()=>{var e;!(null==fe?void 0:fe.current)||!K&&Boolean(null===(e=fe.current)||void 0===e?void 0:e.value)||(K||"compare"===$||(fe.current.value=j.current),!R||K&&"symbolSearch"!==$||fe.current.focus())}),[$]),(0,r.useEffect)((()=>{(null==fe?void 0:fe.current)&&g&&R&&fe.current.select()}),[]);const _e=(0,r.useMemo)((()=>pe.renderSymbolSearchList.reduce(((e,t)=>{const n=Ye(t),r=xe.has(n);return e.push(t),r&&t.contracts&&e.push(...t.contracts.map((e=>({...e,parent:t})))),e}),[])),[pe.renderSymbolSearchList,xe]),Ne=(0,r.useRef)(null);(0,r.useEffect)((()=>{var e;-1!==le&&(null===(e=Ne.current)||void 0===e||e.scrollIntoView({block:"nearest"}))}),[le,Ne]);const Te=i.includes(te),Re=(0,r.useMemo)((()=>_e.map(((e,t)=>{var n,r,o,s;if(V(e)){const o=Ye(e),s=e.contracts?xe.has(o):void 0,a=t===le,l=pe.renderSymbolSearchList.findIndex((t=>t.symbol===e.symbol&&t.exchange===e.exchange))+1;return{key:t,numberInList:l,id:o,title:je(e,Ie),description:e.description,isOffset:!1,onClick:at.bind(null,e,l),providerId:e.provider_id,source:e.source,source2:e.source2,country:null===(n=e.country)||void 0===n?void 0:n.toLocaleLowerCase(),
type:e.type,exchangeName:null===e.exchange?void 0:e.exchange,exchangeTooltip:"",prefix:e.prefix||void 0,marketType:(0,Oe.marketType)(e.type,e.typespecs,!1),hideMarketType:Te,isEod:(null===(r=e.params)||void 0===r?void 0:r.includes("eod"))&&"economic"!==e.type,isYield:(0,We.isYield)(e),isExpanded:s,onExpandClick:e.contracts?lt.bind(null,o):void 0,fullSymbolName:e.contracts?Ae.QualifiedSources.fromSymbolSearchResult(e,e.contracts[0]):Ae.QualifiedSources.fromSymbolSearchResult(e),itemRef:a?Ne:void 0,isSelected:t===le,hideMarkedListFlag:p,item:e,logoId:e.logoid,currencyLogoId:e["currency-logoid"],baseCurrencyLogoId:e["base-currency-logoid"],shortName:(0,Ue.safeShortName)(Ae.QualifiedSources.fromSymbolSearchResult(e)),currencyCode:e.currency_code,isPrimary:e.is_primary_listing}}{const{parent:n}=e,r=Ye(n),a=t===le,l=pe.renderSymbolSearchList.findIndex((e=>e.symbol===n.symbol&&e.exchange===n.exchange))+1;return{key:t,numberInList:l,id:r+e.symbol,dangerousTitleHTML:je(e,Ie),dangerousDescriptionHTML:`${n.description}`+(e.description?` (${e.description})`:""),isOffset:!0,isEod:null===(o=e.params)||void 0===o?void 0:o.includes("eod"),isYield:(0,We.isYield)(e),onClick:it.bind(null,e.parent,e,l),providerId:n.provider_id,country:null===(s=n.country)||void 0===s?void 0:s.toLowerCase(),type:n.type,exchangeName:null===n.exchange?void 0:n.exchange,exchangeTooltip:"",marketType:(0,Oe.marketType)(n.type,e.typespecs,!1),hideMarketType:Te,fullSymbolName:Ae.QualifiedSources.fromSymbolSearchResult(e.parent,e),itemRef:a?Ne:void 0,isSelected:a,hideMarkedListFlag:p,item:e}}}))),[pe.renderSymbolSearchList,xe,$,le,B]),De=(0,r.useMemo)((()=>function(e,t,n){const r=null==t?void 0:t[e],o=new Map(null==r?void 0:r.map((e=>[e.id,e.urlParam]))),s=n[e];let a;if(s){a={};for(const[e,t]of Object.entries(s)){const n=o.get(e);n&&(a[n]=t)}}return a}(te,de,re)),[te,de,re]),Fe=(0,r.useMemo)((()=>pe.renderSymbolSearchList.slice(0,20).map((e=>e.contracts?Ae.QualifiedSources.fromSymbolSearchResult(e,e.contracts[0]):Ae.QualifiedSources.fromSymbolSearchResult(e)))),[pe.renderSymbolSearchList]);(0,r.useEffect)((()=>{var e,t,n;if(!P)return;const r=["resetFilter","resetTabFilter","empty"].includes(ce)?[]:Fe,o={...De,result_list:r};if(o.search_type||(o.search_type="bitcoin,crypto"===te?"crypto":te),!_.isSeparateSymbolSearchTabs)return o.exchange=null!==(e=null==me?void 0:me.getRequestCountryValue())&&void 0!==e?e:null,void P(o);if(te){const e=null!==(t=null==me?void 0:me.getRequestCountryValue())&&void 0!==t?t:null;e&&(o.country=e);const r=null!==(n=null==me?void 0:me.getRequestExchangeValue())&&void 0!==n?n:null;r&&(o.exchange=r)}P(o)}),[te,De,Fe,me,ce]);const $e=null!=E?E:Je,et=$e!==Je&&!K,tt=(e,t)=>{var n;return{mode:$,setMode:G,selectedSearchSource:me,setSelectedSearchSource:_.isSeparateSymbolSearchTabs?ve:X,isAllSearchSourcesSelected:x.isAllSearchSourcesSelected,allSearchSourcesTitle:_.isSeparateSymbolSearchTabs?null===(n=TAB_SOURCE_FILTER_MAP[pe.currentSymbolType])||void 0===n?void 0:n.allSearchSourcesTitle:void 0,selectedSymbolType:te,setSelectedSymbolType:ne,
selectedIndex:le,setSelectedIndex:ie,onClose:o,setSymbolSearchContent:ge,symbolSearchContent:pe,searchRef:fe,cachedInputValue:j,searchSpreads:se,setSearchSpreads:ae,handleListWidth:ct,isSmallWidth:ye,feedItems:Re,isMobile:e,showSpreadActions:h,selectSearchOnInit:g,isTablet:t,selectedItem:_e[le],forceUpdate:Se,placeholder:S,initialScreen:C,toggleExpand:lt,openedItems:xe,onSubmit:mt,onSearchComplete:f,footer:I,symbolTypes:W,contentItem:L,searchInput:N,emptyState:T,autofocus:R,upperCaseEnabled:He,externalInput:K,handleKeyDown:et?void 0:dt,customSearchSymbols:O,searchSources:he,filterDefinitions:de,selectedFilterValues:re,setSelectedFilterValues:oe,filterQueryParams:De,symbolSearchState:ce,setSymbolSearchState:ue,onEmptyResults:void 0}},nt=null!=M?M:Q,rt="exchange"===$,ot=rt?{title:a.t(null,void 0,n(719724)),dataName:"exchanges-search",render:()=>r.createElement(nt,{searchSources:pe.currentTabAvailableSearchSources}),additionalHeaderElement:r.createElement(Me.BackButton,{onClick:()=>G("symbolSearch"),className:Ze.backButton,size:"medium","aria-label":a.t(null,{context:"input"},n(716936)),preservePaddings:!0,flipIconOnRtl:(0,we.isRtl)()}),additionalElementPos:"before"}:{title:y,dataName:"symbol-search-items-dialog",render:()=>r.createElement(Be,null),additionalElementPos:"after"},st=null!=k?k:"div";return r.createElement(st,null,r.createElement(c.MatchMediaMap,{rules:d.DialogBreakpoints},(({TabletSmall:e,TabletNormal:t})=>r.createElement(v.SymbolSearchItemsDialogContext.Provider,{value:tt(e,t)},r.createElement($e,{...ot,shouldReturnFocus:z,fullScreen:w,onClose:o,onClickOutside:o,onKeyDown:et?void 0:dt,isOpened:!0})))));function at(e,t,n){if(e.contracts)return e.contracts.length?void it(e,e.contracts[0],t,n):void lt(Ye(e));it(e,void 0,t,n)}function lt(e){const t=new Set(xe);t.has(e)?t.delete(e):t.add(e),Ce(t)}function it(e,t,n,r){const s=t||e,{exchange:a}=e;if(u.enabled("show_spread_operators")){const e={name:s.symbol,exchange:a,prefix:s.prefix,fullName:s.full_name};if(se)return ut(e),void Se();if(fe.current&&fe.current.value.includes(","))return void ut(e)}ht([{resolved:!0,symbol:Ae.QualifiedSources.fromSymbolSearchResult(e,t),result:s}],n,r),o()}function ct(e){be("fixed"===D||e<=640)}function ut(e){if(!fe.current)return;const[t,n]=(0,l.getNextSymbolInputValueAndPosition)(fe.current,e,He);fe.current.value=t,fe.current.setSelectionRange(n,n),fe.current.focus()}function dt(e){const t=(0,H.hashFromEvent)(e);switch(t){case 13:e.preventDefault(),mt(!0);break;case 27:if(e.preventDefault(),rt)return void G("symbolSearch");o()}switch((0,b.mapKeyCodeToDirection)(t)){case"blockPrev":if(e.preventDefault(),0===le||"good"!==ce)return;if(-1===le)return void ie(0);ie(le-1);break;case"blockNext":if(e.preventDefault(),le===Re.length-1||"good"!==ce)return;ie(le+1);break;case"inlinePrev":{if(-1===le)return;const t=Re[le],{id:n,isOffset:r,onExpandClick:o}=t;if(!r&&n&&xe.has(n)&&Boolean(o)&&!Boolean(B)&&(e.preventDefault(),lt(n)),o)return void(null==B||B(e,!0));break}case"inlineNext":{if(-1===le)return
;const t=Re[le],{id:n,isOffset:r,onExpandClick:o}=t;if(r||!n||xe.has(n)||!Boolean(o)||Boolean(B)||(e.preventDefault(),lt(n)),o)return void(null==B||B(e,!0));break}}null==B||B(e)}function mt(e){if(!fe.current)return;let t=fe.current.value;if(u.enabled("show_spread_operators")&&se&&t){const n=Re[le];if(n&&void 0!==n.isExpanded&&(n.onClick(),t=fe.current.value),t.includes(",")){return ht(Xe(t).map(Ge),null),void(e&&o())}return ht([{symbol:He?t.toUpperCase():t,resolved:!1}],null),void(e&&o())}if(t.includes(","))return ht(Xe(t).map(Ge),null),void(e&&o());if(-1!==le){Re[le].onClick()}else{const n=He?t.toUpperCase():t;if(n&&""!==n.trim()){const e=Xe(n);if(void 0!==Ee&&-1===n.indexOf(":"))(function(e){let t=!1;return Promise.all(e.map((e=>-1!==e.indexOf(":")||t?Promise.resolve({symbol:e,resolved:!1}):(t=!0,async function(e){var t;null===(t=await(null==ke?void 0:ke.accountMetainfo()))||void 0===t||t.prefix;const n=void 0,r=await Z({strictMatch:!0,serverHighlight:!1,text:e,lang:window.language||"",brokerId:Ee,onlyTradable:!0,unhideSymbolSearchGroups:Le,exchange:n});if(0!==r.symbols.length){const e=r.symbols[0],{contracts:t}=e,n=t&&t.length>0?t[0]:void 0,o=e.prefix||e.exchange,s=n?n.symbol:e.symbol;if(o&&s)return{symbol:Ae.QualifiedSources.fromSymbolSearchResult(e,n),resolved:!0,result:e}}return{symbol:e,resolved:!1}}(e)))))})(e).then((e=>ht(e,null)));else{ht(e.map(Ge),null)}}e&&o()}}async function ht(e,t,n){var r;const[{result:o,symbol:s,resolved:a}]=e,l=null===(r=fe.current)||void 0===r?void 0:r.value,i=!n||(0,Ve.isKeyboardClick)(n);let c=se;void 0!==o&&V(o)&&(c="spread"===o.type),f(e,{symbolType:te,isKeyboardEvent:i,numberInList:t,inputValue:l,isSpread:c})}}function Ge(e){return{symbol:He?e.toUpperCase():e,resolved:!1}}function je(e,t){const{broker_symbol:n,symbol:r,description:o}=e;return`${"spread"===e.type?o:r}${t&&n?` (${n})`:""}`}function Ye(e){return e.symbol+e.exchange+e.description}function Xe(e){return e.split(",").map((e=>e.trim())).filter((e=>""!==e))}function Je(e){const{isMobile:t,isTablet:n}=(0,E.useEnsuredContext)(v.SymbolSearchItemsDialogContext);return r.createElement(m.AdaptivePopupDialog,{...e,className:s()(Ze.dialog,!t&&(n?Ze.tabletDialog:Ze.desktopDialog)),backdrop:!0,draggable:!1})}},32012:(e,t,n)=>{"use strict";n.d(t,{flip:()=>l,getCurrentTokenParamsFromInput:()=>v,getExchange:()=>h,getNextSymbolInputValueAndPosition:()=>g,isSpread:()=>u,shortName:()=>m,stringifyTokens:()=>i,validate:()=>a});var r=n(156963),o=n(707002),s=n(721167);function a(e){const t={braceBalance:0,currentState:"var",warnings:[],errors:[]};if(r.enabled("charting_library_base")&&!r.enabled("show_spread_operators"))return t;let n="init";const o=[];for(let r=0;r<e.length;r++){const s=e[r];if("whitespace"!==s.type){if("incompleteSymbol"===s.type||"incompleteNumber"===s.type){const n=r!==e.length-1,o={status:n?"error":"incomplete",reason:"incomplete_token",offset:s.offset,token:s};if(n?t.errors.push(o):t.warnings.push(o),n)continue}switch(s.type){case"symbol":case"number":if("var"===n){t.errors.push({status:"error",
reason:"unexpected_token",offset:s.offset,token:s});continue}n="var";break;case"plus":case"minus":case"multiply":case"divide":case"power":if("var"!==n){t.errors.push({status:"error",reason:"unexpected_token",offset:s.offset,token:s});continue}n="operator";break;case"openBrace":if("var"===n){t.errors.push({status:"error",reason:"unexpected_token",offset:s.offset,token:s});continue}o.push(s),n="init";break;case"closeBrace":if("var"!==n){t.errors.push({status:"error",reason:"unexpected_token",offset:s.offset,token:s});continue}o.pop()||t.errors.push({status:"error",reason:"unbalanced_brace",offset:s.offset,token:s}),n="var";break;case"unparsed":t.errors.push({status:"error",reason:"unparsed_entity",offset:s.offset,token:s})}}}for(t.braceBalance=o.length,"var"!==n&&t.warnings.push({status:"incomplete",token:e[e.length-1]});o.length;){const e=o.pop();e&&t.warnings.push({status:"incomplete",reason:"unbalanced_brace",offset:e.offset,token:e})}return t.currentState=n,t}function l(e){const t=function(e){let t,n=0,r=0;for(let o=0;o<e.length;o++){const s=e[o];if("whitespace"!==s.type)switch(n){case 0:if("number"!==s.type||1!=+s.value)return[];n=1;break;case 1:if(1!==n||"divide"!==s.type)return[];n=2,t=o+1;break;case 2:if("openBrace"===s.type)n=3,r=1;else if(c(s.type))return[];break;case 3:"openBrace"===s.type?r++:"closeBrace"===s.type&&(r--,r<=0&&(n=2))}}return e.slice(t)}(e);return t.length?d(t):d((0,o.tokenize)("1/("+i(e)+")"))}function i(e){return e.reduce(((e,t)=>"symbol"===t.type&&o.symbolTokenEscapeRe.test(t.value)?e+`'${t.value}'`:e+t.value),"")}function c(e){return"plus"===e||"minus"===e||"multiply"===e||"divide"===e||"power"===e}function u(e){return e.length>1&&e.some((e=>c(e.type)))}function d(e){e=function(e){const t=[];for(const n of e)"whitespace"!==n.type&&t.push(n);return t}(e);const t=[],n=[];let r;for(let o=0;o<e.length;o++){const s=e[o];switch(s.type){case"plus":case"minus":case"multiply":case"divide":case"power":n.length&&n[n.length-1].minPrecedence>s.precedence&&(n[n.length-1].minPrecedence=s.precedence);break;case"openBrace":r={minPrecedence:1/0,openBraceIndex:o},n.push(r);break;case"closeBrace":{if(r=n.pop(),!r)break;const s=e[r.openBraceIndex-1],a=e[o+1],l=s&&("plus"===s.type||"multiply"===s.type);(!c(null==a?void 0:a.type)||(null==a?void 0:a.precedence)<=r.minPrecedence)&&(!c(null==s?void 0:s.type)||(null==s?void 0:s.precedence)<(null==r?void 0:r.minPrecedence)||(null==s?void 0:s.precedence)===(null==r?void 0:r.minPrecedence)&&l)&&(t.unshift(r.openBraceIndex),t.push(o),n.length&&n[n.length-1].minPrecedence>r.minPrecedence&&(n[n.length-1].minPrecedence=r.minPrecedence))}}}for(let n=t.length;n--;)e.splice(t[n],1);return e}function m(e){return d((0,o.tokenize)(e)).reduce(((e,t)=>{if("symbol"!==t.type)return e+t.value;const[,n]=p(t);return n?e+n:e}),"")}function h(e){const t=function(e){const t=(0,o.tokenize)(e),n=[];return t.forEach((e=>{if("symbol"!==e.type)return;const[t]=p(e);t&&n.push(t)})),n}(e);if(1===t.length)return t[0]}function p(e){const t=/^'?(?:([A-Z0-9_]+):)?(.*?)'?$/i.exec(e.value)
;return null===t?[void 0,void 0]:[t[1],t[2]]}function g(e,t,n){const r=e.value,[a,l]=v(e,n),i=(0,s.getSymbolFullName)(t),c=o.symbolTokenEscapeRe.test(i)?`'${i}'`:i;return[r.substring(0,l)+c+r.substring(l+a.length),l+c.length]}function v(e,t){const{value:n,selectionStart:r}=e,s=(0,o.tokenize)(t?n.toUpperCase():n),a=function(e,t){for(let n=0;n<e.length;n++){const r=e[n],o="symbol"===r.type||"incompleteSymbol"===r.type||"number"===r.type;if(r.offset<=t&&t<=r.offset+r.value.length&&o)return r}return null}(s,r||0);return[(null==a?void 0:a.value)||"",a?a.offset:n.length,s]}},721167:(e,t,n)=>{"use strict";n.d(t,{createGroupColumns:()=>h,exchangeSelectDisabled:()=>m,getAllSymbolTypesValue:()=>d,getAvailableSearchSources:()=>c,getAvailableSymbolTypes:()=>u,getDefaultSearchSource:()=>i,getSymbolFullName:()=>l,isSeparateSymbolSearchTabs:()=>p});var r=n(609838),o=n(384327);class s{constructor(e){this._exchange=e}value(){return this._exchange.value}name(){return(0,o.isAllSearchSourcesSelected)(this)?r.t(null,void 0,n(64498)):this._exchange.name}description(){return this._exchange.desc}country(){return this._exchange.country}providerId(){return this._exchange.providerId}group(){return this._exchange.group}includes(e){return function(e,t){const n=t.toLowerCase(),{name:r,desc:o,searchTerms:s}=e;return r.toLowerCase().includes(n)||o.toLowerCase().includes(n)||void 0!==s&&s.some((e=>e.toLowerCase().includes(n)))}(this._exchange,e)}getRequestExchangeValue(){return this._exchange.value}getRequestCountryValue(){}}var a=n(420066);function l(e){if(e.fullName)return e.fullName;let t;return t=e.prefix||e.exchange?(e.prefix||e.exchange)+":"+e.name:e.name,t.replace(/<\/?[^>]+(>|$)/g,"")}function i(){const e=c();return e.find(o.isAllSearchSourcesSelected)||e[0]||null}function c(){return(0,o.createSearchSources)(s,(0,a.getExchanges)())}function u(){return window.ChartApiInstance.supportedSymbolsTypes()}function d(){return""}function m(e){return!!p&&!TAB_SOURCE_FILTER_MAP[e]}function h(e,t=2){if(0===e.length)return[];if(1===t)return[e];const n=Math.floor(e.length/2)+e.length%2;return[e.slice(0,n),e.slice(n)].filter((e=>e.length>0))}const p=!1},626800:(e,t,n)=>{"use strict";n.d(t,{safeShortName:()=>o});var r=n(949345);function o(e){try{return(0,r.shortName)(e)}catch(t){return e}}},707002:(e,t,n)=>{"use strict";n.d(t,{symbolTokenEscapeRe:()=>a,tokenize:()=>c});var r=n(156963),o=n(173850);const s=r.enabled("charting_library_base")?/(?:[^-+\/*^\s]'|[a-zA-Z0-9_\u0370-\u1FFF_\u2E80-\uFFFF^])(?:[^-+\/*^\s]'|[a-zA-Z0-9_\u0020\u0370-\u1FFF_\u2E80-\uFFFF_!:.&])*|'.+?'/:/(?:[^-+\/*^\s]'|[a-zA-Z0-9_\u0370-\u1FFF_\u2E80-\uFFFF])(?:[^-+\/*^\s]'|[a-zA-Z0-9_\u0020\u0370-\u1FFF_\u2E80-\uFFFF_!|:.&])*|'.+?'/,a=/[+\-/*]/,l={number:/\d+(?:\.\d*|(?![a-zA-Z0-9_!:.&]))|\.\d+/,incompleteNumber:/\./,symbol:s,incompleteSymbol:/'[^']*/,separatorPrefix:o.SEPARATOR_PREFIX,openBrace:"(",closeBrace:")",plus:"+",minus:"-",multiply:"*",divide:"/",power:"^",whitespace:/[\0-\x20\s]+/,unparsed:null},i=new RegExp(Object.values(l).map((e=>{
return null===e?"":`(${"string"==typeof e?(t=e,t.replace(/[\^$()[\]{}*+?|\\]/g,"\\$&")):e.source})`;var t})).filter((e=>""!==e)).concat(".").join("|"),"g");function c(e){if(!e)return[];const t=[],n=Object.keys(l);let r;for(;r=i.exec(e);){let e=!1;for(let o=n.length;o--;)if(r[o+1]){n[o]&&t.push({value:r[o+1],type:n[o],precedence:0,offset:r.index}),e=!0;break}e||t.push({value:r[0],type:"unparsed",precedence:0,offset:r.index})}return t}},118737:(e,t,n)=>{"use strict";n.d(t,{removeUsdFromCryptoPairLogos:()=>a,resolveLogoUrls:()=>s});var r=n(868333);const o=(0,r.getLogoUrlResolver)();function s(e,t=r.LogoSize.Medium){const n=e.logoid,s=e["base-currency-logoid"],a=e["currency-logoid"],l=n&&o.getSymbolLogoUrl(n,t);if(l)return[l];const i=s&&o.getSymbolLogoUrl(s,t),c=a&&o.getSymbolLogoUrl(a,t);return i&&c?[i,c]:i?[i]:c?[c]:[]}function a(e){return 2!==e.length?e:function(e){return e.some((e=>l(e)))}(e)&&!function(e){return e.some((e=>e.includes("country")&&!l(e)))}(e)?e.filter((e=>!l(e))):e}function l(e){return!1}},449943:(e,t,n)=>{"use strict";n.d(t,{CircleLogoPair:()=>s});var r=n(50959),o=n(41192);n(882112);function s(e){const{primaryLogoUrl:t,secondaryLogoUrl:n,size:s,className:l}=e;return r.createElement("span",{className:(0,o.getBlockStyleClasses)(s,l),title:e.title},r.createElement(a,{logoUrl:n,size:s}),r.createElement(a,{logoUrl:t,size:s}))}function a(e){const{logoUrl:t,size:n}=e,s=(0,o.getLogoStyleClasses)(n);return void 0===t?r.createElement("span",{className:s}):r.createElement("img",{className:s,crossOrigin:"",src:t,alt:""})}},41192:(e,t,n)=>{"use strict";n.d(t,{getBlockStyleClasses:()=>o,getLogoStyleClasses:()=>s});var r=n(497754);function o(e,t){return r("tv-circle-logo-pair",`tv-circle-logo-pair--${e}`,t)}function s(e,t){return r("tv-circle-logo-pair__logo",`tv-circle-logo-pair__logo--${e}`,!t&&"tv-circle-logo-pair__logo-empty")}},636080:(e,t,n)=>{"use strict";n.d(t,{CircleLogo:()=>a,hiddenCircleLogoClass:()=>s});var r=n(50959),o=n(439067);n(645300);const s="tv-circle-logo--visually-hidden";function a(e){var t,n;const s=(0,o.getStyleClasses)(e.size,e.className),a=null!==(n=null!==(t=e.alt)&&void 0!==t?t:e.title)&&void 0!==n?n:"";return(0,o.isCircleLogoWithUrlProps)(e)?r.createElement("img",{className:s,crossOrigin:"",src:e.logoUrl,alt:a,title:e.title,loading:e.loading,"aria-label":e["aria-label"],"aria-hidden":e["aria-hidden"]}):r.createElement("span",{className:s,title:e.title,"aria-label":e["aria-label"],"aria-hidden":e["aria-hidden"]},e.placeholderLetter)}},439067:(e,t,n)=>{"use strict";n.d(t,{getStyleClasses:()=>o,isCircleLogoWithUrlProps:()=>s});var r=n(497754);function o(e,t){return r("tv-circle-logo",`tv-circle-logo--${e}`,t)}function s(e){return"logoUrl"in e&&void 0!==e.logoUrl&&0!==e.logoUrl.length}},512991:(e,t,n)=>{"use strict";n.d(t,{createRegExpList:()=>s,getHighlightedChars:()=>a,rankedSearch:()=>o});var r=n(372605);function o(e){const{data:t,rules:n,queryString:o,isPreventedFromFiltering:s,primaryKey:a,secondaryKey:l=a,optionalPrimaryKey:i,tertiaryKey:c}=e;return t.map((e=>{
const t=i&&e[i]?e[i]:e[a],s=e[l],u=c&&e[c];let d,m=0;return n.forEach((e=>{var n,a,l,i,c;const{re:h,fullMatch:p}=e;if(h.lastIndex=0,(0,r.isString)(t)&&t&&t.toLowerCase()===o.toLowerCase())return m=4,void(d=null===(n=t.match(p))||void 0===n?void 0:n.index);if((0,r.isString)(t)&&p.test(t))return m=3,void(d=null===(a=t.match(p))||void 0===a?void 0:a.index);if((0,r.isString)(s)&&p.test(s))return m=2,void(d=null===(l=s.match(p))||void 0===l?void 0:l.index);if((0,r.isString)(s)&&h.test(s))return m=2,void(d=null===(i=s.match(h))||void 0===i?void 0:i.index);if(Array.isArray(u))for(const e of u)if(p.test(e))return m=1,void(d=null===(c=e.match(p))||void 0===c?void 0:c.index)})),{matchPriority:m,matchIndex:d,item:e}})).filter((e=>s||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 s(e,t){const n=[],r=e.toLowerCase(),o=e.split("").map(((e,t)=>`(${0!==t?`[/\\s-]${l(e)}`:l(e)})`)).join("(.*?)")+"(.*)";return n.push({fullMatch:new RegExp(`(${l(e)})`,"i"),re:new RegExp(`^${o}`,"i"),reserveRe:new RegExp(o,"i"),fuzzyHighlight:!0}),t&&t.hasOwnProperty(r)&&n.push({fullMatch:t[r],re:t[r],fuzzyHighlight:!1}),n}function a(e,t,n){const r=[];return e&&n?(n.forEach((e=>{const{fullMatch:n,re:o,reserveRe:s}=e;n.lastIndex=0,o.lastIndex=0;const a=n.exec(t),l=a||o.exec(t)||s&&s.exec(t);if(e.fuzzyHighlight=!a,l)if(e.fuzzyHighlight){let e=l.index;for(let t=1;t<l.length;t++){const n=l[t],o=l[t].length;if(t%2){const t=n.startsWith(" ")||n.startsWith("/")||n.startsWith("-");r[t?e+1:e]=!0}e+=o}}else for(let e=0;e<l[0].length;e++)r[l.index+e]=!0})),r):r}function l(e){return e.replace(/[!-/[-^{-}?]/g,"\\$&")}},260598:(e,t,n)=>{"use strict";n.d(t,{HighlightedText:()=>l});var r=n(50959),o=n(497754),s=n(512991),a=n(275623);function l(e){const{queryString:t,rules:n,text:l,className:i}=e,c=(0,r.useMemo)((()=>(0,s.getHighlightedChars)(t,l,n)),[t,n,l]);return r.createElement(r.Fragment,null,c.length?l.split("").map(((e,t)=>r.createElement(r.Fragment,{key:t},c[t]?r.createElement("span",{className:o(a.highlighted,i)},e):r.createElement("span",null,e)))):l)}},840976:(e,t,n)=>{"use strict";n.d(t,{useEnsuredContext:()=>s});var r=n(50959),o=n(650151);function s(e){return(0,o.ensureNotNull)((0,r.useContext)(e))}},585938:(e,t,n)=>{"use strict";n.d(t,{useForceUpdate:()=>r.useForceUpdate});var r=n(813550)},102478:(e,t,n)=>{"use strict";n.d(t,{useResizeObserver:()=>r.useResizeObserver});var r=n(664332)},965800:(e,t,n)=>{"use strict";n.d(t,{useTheme:()=>s});var r=n(297265),o=n(702054);function s(){return(0,r.useWatchedValueReadonly)({watchedValue:o.watchedTheme})}},297265:(e,t,n)=>{"use strict";n.d(t,{useWatchedValueReadonly:()=>o});var r=n(50959);const o=(e,t=!1)=>{const n="watchedValue"in e?e.watchedValue:void 0,o="defaultValue"in e?e.defaultValue:e.watchedValue.value(),[s,a]=(0,
r.useState)(n?n.value():o);return(t?r.useLayoutEffect:r.useEffect)((()=>{if(n){a(n.value());const e=e=>a(e);return n.subscribe(e),()=>n.unsubscribe(e)}return()=>{}}),[n]),s}},313739:(e,t,n)=>{"use strict";n.d(t,{MatchMediaMap:()=>a});var r=n(50959),o=n(266783),s=n.n(o);class a extends r.Component{constructor(e){super(e),this._handleMediaChange=()=>{const e=i(this.state.queries,((e,t)=>t.matches));let t=!1;for(const n in e)if(e.hasOwnProperty(n)&&this.state.matches[n]!==e[n]){t=!0;break}t&&this.setState({matches:e})};const{rules:t}=this.props;this.state=l(t)}shouldComponentUpdate(e,t){return!s()(e,this.props)||(!s()(t.rules,this.state.rules)||!s()(t.matches,this.state.matches))}componentDidMount(){this._migrate(null,this.state.queries)}componentDidUpdate(e,t){s()(e.rules,this.props.rules)||this._migrate(t.queries,this.state.queries)}componentWillUnmount(){this._migrate(this.state.queries,null)}render(){return this.props.children(this.state.matches)}static getDerivedStateFromProps(e,t){if(s()(e.rules,t.rules))return null;const{rules:n}=e;return l(n)}_migrate(e,t){null!==e&&i(e,((e,t)=>{t.removeListener(this._handleMediaChange)})),null!==t&&i(t,((e,t)=>{t.addListener(this._handleMediaChange)}))}}function l(e){const t=i(e,((e,t)=>window.matchMedia(t)));return{queries:t,matches:i(t,((e,t)=>t.matches)),rules:{...e}}}function i(e,t){const n={};for(const r in e)e.hasOwnProperty(r)&&(n[r]=t(r,e[r]));return n}},930052:(e,t,n)=>{"use strict";n.d(t,{MatchMedia:()=>o});var r=n(50959);class o 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)}}},494707:(e,t,n)=>{"use strict";n.d(t,{Separator:()=>a});var r=n(50959),o=n(497754),s=n(345719);function a(e){return r.createElement("div",{className:o(s.separator,e.className)})}},813113:(e,t,n)=>{"use strict";n.d(t,{Portal:()=>i,PortalContext:()=>c});var r=n(50959),o=n(500962),s=n(925931),a=n(801808),l=n(682925);class i extends r.PureComponent{constructor(){super(...arguments),this._uuid=(0,s.nanoid)()}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||"",this.props.className&&e.classList.add(this.props.className),this.props["aria-hidden"]&&e.setAttribute("aria-hidden","true"),o.createPortal(r.createElement(c.Provider,{
value:this},this.props.children),e)}moveToTop(){this._manager().moveToTop(this._uuid)}_manager(){return null===this.context?(0,a.getRootOverlapManager)():this.context}}i.contextType=l.SlotContext;const c=r.createContext(null)},132455:(e,t,n)=>{"use strict";n.d(t,{Spinner:()=>r.Spinner});var r=n(672511)},515783:(e,t,n)=>{"use strict";n.d(t,{ToolWidgetCaret:()=>i});var r=n(50959),o=n(497754),s=n(72571),a=n(934587),l=n(100578);function i(e){const{dropped:t,className:n}=e;return r.createElement(s.Icon,{className:o(n,a.icon,{[a.dropped]:t}),icon:l})}},278029:e=>{e.exports={button:"button-GwQQdU8S",hover:"hover-GwQQdU8S",clicked:"clicked-GwQQdU8S",isInteractive:"isInteractive-GwQQdU8S",accessible:"accessible-GwQQdU8S",isGrouped:"isGrouped-GwQQdU8S",isActive:"isActive-GwQQdU8S",isOpened:"isOpened-GwQQdU8S",isDisabled:"isDisabled-GwQQdU8S",text:"text-GwQQdU8S",icon:"icon-GwQQdU8S",endIcon:"endIcon-GwQQdU8S"}},747633:(e,t,n)=>{"use strict";n.d(t,{DEFAULT_TOOL_WIDGET_BUTTON_THEME:()=>l,ToolWidgetButton:()=>i});var r=n(50959),o=n(497754),s=n(72571),a=n(278029);const l=a,i=r.forwardRef(((e,t)=>{const{tag:n="div",icon:l,endIcon:i,isActive:c,isOpened:u,isDisabled:d,isGrouped:m,isHovered:h,isClicked:p,onClick:g,text:v,textBeforeIcon:f,title:y,theme:b=a,className:S,forceInteractive:x,inactive:w,"data-name":C,"data-tooltip":k,...E}=e,L=o(S,b.button,(y||k)&&"apply-common-tooltip",{[b.isActive]:c,[b.isOpened]:u,[b.isInteractive]:(x||Boolean(g))&&!d&&!w,[b.isDisabled]:Boolean(d||w),[b.isGrouped]:m,[b.hover]:h,[b.clicked]:p}),I=l&&("string"==typeof l?r.createElement(s.Icon,{className:b.icon,icon:l}):r.cloneElement(l,{className:o(b.icon,l.props.className)}));return"button"===n?r.createElement("button",{...E,ref:t,type:"button",className:o(L,b.accessible),disabled:d&&!w,onClick:g,title:y,"data-name":C,"data-tooltip":k},f&&v&&r.createElement("div",{className:o("js-button-text",b.text)},v),I,!f&&v&&r.createElement("div",{className:o("js-button-text",b.text)},v)):r.createElement("div",{...E,ref:t,"data-role":"button",className:L,onClick:d?void 0:g,title:y,"data-name":C,"data-tooltip":k},f&&v&&r.createElement("div",{className:o("js-button-text",b.text)},v),I,!f&&v&&r.createElement("div",{className:o("js-button-text",b.text)},v),i&&r.createElement(s.Icon,{icon:i,className:a.endIcon}))}))},446209:(e,t,n)=>{"use strict";n.d(t,{VISIBLE_TYPESPECS:()=>a,marketType:()=>l});var r=n(609838);const o=new Map([["cfd",r.t(null,void 0,n(487592))],["dr",r.t(null,void 0,n(667245))],["index",r.t(null,void 0,n(612754))],["forex",r.t(null,void 0,n(739512))],["right",r.t(null,{context:"symbol_type"},n(709898))],["bond",r.t(null,void 0,n(879852))],["bitcoin",r.t(null,void 0,n(308448))],["crypto",r.t(null,void 0,n(308448))],["economic",r.t(null,void 0,n(488720))],["indices",r.t(null,void 0,n(138071))],["futures",r.t(null,void 0,n(781859))],["stock",r.t(null,void 0,n(636931))],["commodity",r.t(null,void 0,n(812629))]]);n(336379)
;const s=new Map,a=new Set(["cfd","spreadbet","defi","yield","government","corporate","mutual","money","etf","unit","trust","reit","etn","convertible","closedend","crypto","oracle"]);function l(e,t=[],n=!0){const r=t.filter((e=>a.has(e))),l=`${e}_${r.sort().join("_")}`,i=s.get(l);if(void 0!==i)return i;const c=n?function(e){return o.get(e)||e}(e):e,u=Boolean(t.length)?[c,...r].join(" "):c;return s.set(l,u),u}},660538:(e,t,n)=>{"use strict";n.d(t,{mediaQueryAddEventListener:()=>r,mediaQueryRemoveEventListener:()=>o});const r=(e,t)=>{(null==e?void 0:e.addEventListener)?e.addEventListener("change",t):e.addListener(t)},o=(e,t)=>{(null==e?void 0:e.removeEventListener)?e.removeEventListener("change",t):e.removeListener(t)}},552019:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" d="M13.35 5.35a.5.5 0 0 0-.7-.7L9 8.29 5.35 4.65a.5.5 0 1 0-.7.7L8.29 9l-3.64 3.65a.5.5 0 0 0 .7.7L9 9.71l3.65 3.64a.5.5 0 0 0 .7-.7L9.71 9l3.64-3.65z"/></svg>'},117105:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path stroke="currentColor" stroke-width="1.2" d="m1.5 1.5 21 21m0-21-21 21"/></svg>'},315130:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path stroke="currentColor" stroke-width="1.2" d="m1.5 1.5 15 15m0-15-15 15"/></svg>'},238822:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14" width="14" height="14"><path stroke="currentColor" stroke-width="1.2" d="m1.5 1.5 11 11m0-11-11 11"/></svg>'},663346:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" width="12" height="12"><path stroke="currentColor" stroke-width="1.2" d="m1.5 1.5 9 9m0-9-9 9"/></svg>'},534983:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10" width="10" height="10"><path stroke="currentColor" stroke-width="1.2" d="m1.5 1.5 7 7m0-7-7 7"/></svg>'},295694:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none"><path stroke="currentColor" stroke-linecap="round" stroke-width="1.2" d="M17 22.5 6.85 12.35a.5.5 0 0 1 0-.7L17 1.5"/></svg>'},249498: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" stroke-linecap="round" stroke-width="1.2" d="M12 16.5 4.85 9.35a.5.5 0 0 1 0-.7L12 1.5"/></svg>'},560176:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14" width="14" height="14" fill="none"><path stroke="currentColor" stroke-linecap="round" stroke-width="1.2" d="M9.5 12.5 3.9 7.37a.5.5 0 0 1 0-.74L9.5 1.5"/></svg>'},935369:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" width="12" height="12" fill="none"><path stroke="currentColor" stroke-linecap="round" stroke-width="1.2" d="M8 10.5 3.85 6.35a.5.5 0 0 1 0-.7L8 1.5"/></svg>'},358797:e=>{
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10" width="10" height="10" fill="none"><path stroke="currentColor" stroke-linecap="round" stroke-width="1.2" d="M7 8.5 3.85 5.35a.5.5 0 0 1 0-.7L7 1.5"/></svg>'},773063:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none"><path stroke="currentColor" stroke-linecap="round" stroke-width="1.5" d="M17 22.5 6.85 12.35a.5.5 0 0 1 0-.7L17 1.5"/></svg>'},914127: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" stroke-linecap="round" stroke-width="1.5" d="M12 16.5 4.85 9.35a.5.5 0 0 1 0-.7L12 1.5"/></svg>'},218073:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14" width="14" height="14" fill="none"><path stroke="currentColor" stroke-linecap="round" stroke-width="1.5" d="M9.5 12.5 3.9 7.37a.5.5 0 0 1 0-.74L9.5 1.5"/></svg>'},99243:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" width="12" height="12" fill="none"><path stroke="currentColor" stroke-linecap="round" stroke-width="1.5" d="M8 10.5 3.85 6.35a.5.5 0 0 1 0-.7L8 1.5"/></svg>'},142576:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10" width="10" height="10" fill="none"><path stroke="currentColor" stroke-linecap="round" stroke-width="1.5" d="M7 8.5 3.85 5.35a.5.5 0 0 1 0-.7L7 1.5"/></svg>'},100578:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 8" width="16" height="8"><path fill="currentColor" d="M0 1.475l7.396 6.04.596.485.593-.49L16 1.39 14.807 0 7.393 6.122 8.58 6.12 1.186.08z"/></svg>'},491540: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="M2.5 14.5c1.68-1.26 3.7-2 6.5-2s4.91.74 6.5 2m-13-11c1.68 1.26 3.7 2 6.5 2s4.91-.74 6.5-2"/><circle stroke="currentColor" cx="9" cy="9" r="8.5"/><path stroke="currentColor" d="M13.5 9c0 2.42-.55 4.58-1.4 6.12-.87 1.56-1.98 2.38-3.1 2.38s-2.23-.82-3.1-2.38c-.85-1.54-1.4-3.7-1.4-6.12s.55-4.58 1.4-6.12C6.77 1.32 7.88.5 9 .5s2.23.82 3.1 2.38c.85 1.54 1.4 3.7 1.4 6.12z"/></svg>'},366619:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" width="120" height="120"><path fill="#B2B5BE" fill-rule="evenodd" d="M23 39a36 36 0 0 1 72 0v13.15l15.1 8.44 2.16 1.2-1.64 1.86-12.85 14.59 3.73 4.03L98.57 85 95 81.13V117H77v-12H67v9H50V95H40v22H23V81.28l-3.8 3.61-2.76-2.9 4.05-3.84-12.77-14.5-1.64-1.86 2.16-1.2L23 52.34V39Zm72 36.33 10.98-12.46L95 56.73v18.6ZM23 56.92v18.03L12.35 62.87 23 56.92ZM59 7a32 32 0 0 0-32 32v74h9V91h18v19h9v-9h18v12h10V39A32 32 0 0 0 59 7Zm-7 36a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm19 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"/></svg>'},267562:e=>{
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" width="120" height="120"><path fill="#131722" fill-rule="evenodd" d="M23 39a36 36 0 0 1 72 0v13.15l15.1 8.44 2.16 1.2-1.64 1.86-12.85 14.59 3.73 4.03L98.57 85 95 81.13V117H77v-12H67v9H50V95H40v22H23V81.28l-3.8 3.61-2.76-2.9 4.05-3.84-12.77-14.5-1.64-1.86 2.16-1.2L23 52.34V39Zm72 36.33 10.98-12.46L95 56.73v18.6ZM23 56.92v18.03L12.35 62.87 23 56.92ZM59 7a32 32 0 0 0-32 32v74h9V91h18v19h9v-9h18v12h10V39A32 32 0 0 0 59 7Zm-7 36a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm19 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"/></svg>'},969859:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="none"><path stroke="currentColor" d="M12.4 12.5a7 7 0 1 0-4.9 2 7 7 0 0 0 4.9-2zm0 0l5.101 5"/></svg>'},569533:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="none"><path stroke="currentColor" d="M8 5l3.5 3.5L8 12"/></svg>'},900486:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13 13" width="13" height="13"><path fill="none" stroke="currentColor" stroke-linecap="square" d="M2.5 6.5h9"/><circle fill="currentColor" cx="7" cy="3" r="1"/><circle fill="currentColor" cx="7" cy="10" r="1"/></svg>'},863861:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13 13" width="13" height="13"><g fill="none" fill-rule="evenodd" stroke="currentColor"><path stroke-linecap="square" stroke-linejoin="round" d="M3.5 10V2.5L1 5"/><path stroke-linecap="square" d="M1.5 10.5h4"/><path d="M8 12l3-11"/></g></svg>'},481574:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13 13" width="13" height="13"><path fill="none" stroke="currentColor" stroke-linecap="square" d="M2.5 6.5h8"/></svg>'},132617:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13 13" width="13" height="13"><path fill="none" stroke="currentColor" stroke-linecap="square" d="M3 10l7-7M3 3l7 7"/></svg>'},935119:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13 13" width="13" height="13"><path fill="none" stroke="currentColor" stroke-linecap="square" d="M2.5 6.5h8m-4-4v8"/></svg>'},569135:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13 13" width="13" height="13"><path fill="none" stroke="currentColor" stroke-linecap="square" d="M3 7l3.5-3.5L10 7"/></svg>'},586240:e=>{"use strict";e.exports=JSON.parse('{"size-header-height":"64px","media-phone-vertical":"screen and (max-width: 479px)","media-mf-phone-landscape":"screen and (min-width: 568px)"}')}}]);