(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[2301],{66783: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),a=Object.keys(r);if(o.length!==a.length)return!1;for(var s=0;s<o.length;s++)if(!t.call(r,o[s])||!n(e[o[s]],r[o[s]]))return!1;return!0}},55576:e=>{e.exports={button:"button-9pA37sIi",hover:"hover-9pA37sIi",isInteractive:"isInteractive-9pA37sIi",isGrouped:"isGrouped-9pA37sIi",newStyles:"newStyles-9pA37sIi",isActive:"isActive-9pA37sIi",isOpened:"isOpened-9pA37sIi",isDisabled:"isDisabled-9pA37sIi",text:"text-9pA37sIi",icon:"icon-9pA37sIi"}},96746: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: 428px)"}},67179:e=>{e.exports={dialog:"dialog-HExheUfY",wrapper:"wrapper-HExheUfY",separator:"separator-HExheUfY"}},91441:e=>{e.exports={"small-height-breakpoint":"screen and (max-height: 360px)",container:"container-tuOy5zvD",unsetAlign:"unsetAlign-tuOy5zvD",title:"title-tuOy5zvD",subtitle:"subtitle-tuOy5zvD",ellipsis:"ellipsis-tuOy5zvD",close:"close-tuOy5zvD"}},28712:e=>{e.exports={container:"container-CcsqUMct",inputContainer:"inputContainer-CcsqUMct",withCancel:"withCancel-CcsqUMct",input:"input-CcsqUMct",icon:"icon-CcsqUMct",cancel:"cancel-CcsqUMct"}},74246:e=>{e.exports={actions:"actions-FZxvEi7a",actionButton:"actionButton-FZxvEi7a"}},82132:e=>{e.exports={"tablet-small-breakpoint":"screen and (max-width: 428px)",itemRow:"itemRow-uhHv1IHJ",multiLine:"multiLine-uhHv1IHJ",cell:"cell-uhHv1IHJ",itemInfoCell:"itemInfoCell-uhHv1IHJ",description:"description-uhHv1IHJ",symbolDescription:"symbolDescription-uhHv1IHJ",flag:"flag-uhHv1IHJ",exchangeDescription:"exchangeDescription-uhHv1IHJ",marketType:"marketType-uhHv1IHJ",exchangeName:"exchangeName-uhHv1IHJ",actionHandleWrap:"actionHandleWrap-uhHv1IHJ",hover:"hover-uhHv1IHJ",selected:"selected-uhHv1IHJ",active:"active-uhHv1IHJ",highlighted:"highlighted-uhHv1IHJ",light:"light-uhHv1IHJ","highlight-animation-theme-light":"highlight-animation-theme-light-uhHv1IHJ",dark:"dark-uhHv1IHJ","highlight-animation-theme-dark":"highlight-animation-theme-dark-uhHv1IHJ",markedFlag:"markedFlag-uhHv1IHJ",offset:"offset-uhHv1IHJ",descriptionCell:"descriptionCell-uhHv1IHJ",addition:"addition-uhHv1IHJ",exchangeCell:"exchangeCell-uhHv1IHJ",fixedWidth:"fixedWidth-uhHv1IHJ",expandHandle:"expandHandle-uhHv1IHJ",expanded:"expanded-uhHv1IHJ",symbolTitle:"symbolTitle-uhHv1IHJ",invalid:"invalid-uhHv1IHJ",noDescription:"noDescription-uhHv1IHJ",highlightedText:"highlightedText-uhHv1IHJ",icon:"icon-uhHv1IHJ",narrow:"narrow-uhHv1IHJ",dataMode:"dataMode-uhHv1IHJ",actionsCell:"actionsCell-uhHv1IHJ",action:"action-uhHv1IHJ",targetAction:"targetAction-uhHv1IHJ",removeAction:"removeAction-uhHv1IHJ",addAction:"addAction-uhHv1IHJ",
markedFlagWrap:"markedFlagWrap-uhHv1IHJ",markedFlagMobile:"markedFlagMobile-uhHv1IHJ",logo:"logo-uhHv1IHJ",isExpandable:"isExpandable-uhHv1IHJ"}},42608:e=>{e.exports={wrap:"wrap-nJ9riypy",libAllSelected:"libAllSelected-nJ9riypy",container:"container-nJ9riypy",iconWrap:"iconWrap-nJ9riypy",icon:"icon-nJ9riypy",title:"title-nJ9riypy",highlighted:"highlighted-nJ9riypy",description:"description-nJ9riypy",mobile:"mobile-nJ9riypy",allSelected:"allSelected-nJ9riypy",desktop:"desktop-nJ9riypy",allSelectedIcon:"allSelectedIcon-nJ9riypy",selected:"selected-nJ9riypy",titleWithoutDesc:"titleWithoutDesc-nJ9riypy",textBlock:"textBlock-nJ9riypy",bordered:"bordered-nJ9riypy"}},90819:e=>{e.exports={container:"container-ZOfHxh0z",contentList:"contentList-ZOfHxh0z",contentListDesktop:"contentListDesktop-ZOfHxh0z",searchSourceItemsContainer:"searchSourceItemsContainer-ZOfHxh0z",searchSourceItemsContainerDesktop:"searchSourceItemsContainerDesktop-ZOfHxh0z",groupTitleDesktop:"groupTitleDesktop-ZOfHxh0z",emptyText:"emptyText-ZOfHxh0z",noResultsDesktop:"noResultsDesktop-ZOfHxh0z"}},77338:e=>{e.exports={wrap:"wrap-LlwUhJDs",item:"item-LlwUhJDs",small:"small-LlwUhJDs",text:"text-LlwUhJDs",exchange:"exchange-LlwUhJDs"}},74915:e=>{e.exports={wrap:"wrap-SLQfcZ66",watchlist:"watchlist-SLQfcZ66",noFeed:"noFeed-SLQfcZ66",scrollContainer:"scrollContainer-SLQfcZ66",listContainer:"listContainer-SLQfcZ66",multiLineItemsContainer:"multiLineItemsContainer-SLQfcZ66"}},98749:e=>{e.exports={button:"button-v1WheJQo",desktop:"desktop-v1WheJQo"}},92540:e=>{e.exports={search:"search-RSKUFnp7",upperCase:"upperCase-RSKUFnp7",symbolType:"symbolType-RSKUFnp7",spinnerWrap:"spinnerWrap-RSKUFnp7",emptyText:"emptyText-RSKUFnp7",noResultsDesktop:"noResultsDesktop-RSKUFnp7",brokerCheckboxWrap:"brokerCheckboxWrap-RSKUFnp7"}},53474:e=>{e.exports={flagWrap:"flagWrap-7I0uFLqE",icon:"icon-7I0uFLqE",caret:"caret-7I0uFLqE",title:"title-7I0uFLqE"}},6215:e=>{e.exports={dialog:"dialog-JcokGZNe",tabletDialog:"tabletDialog-JcokGZNe",desktopDialog:"desktopDialog-JcokGZNe"}},70516:e=>{e.exports={childrenWrapper:"childrenWrapper-HNZPlz4e",container:"container-HNZPlz4e"}},99167:e=>{e.exports={bubbles:"bubbles-bgopH9MJ",multiLine:"multiLine-bgopH9MJ",bubble:"bubble-bgopH9MJ"}},74765:e=>{e.exports={bubble:"bubble-vcCjkHCG",animated:"animated-vcCjkHCG",content:"content-vcCjkHCG","appearance-default":"appearance-default-vcCjkHCG",active:"active-vcCjkHCG",red:"red-vcCjkHCG",blue:"blue-vcCjkHCG",green:"green-vcCjkHCG",orange:"orange-vcCjkHCG",purple:"purple-vcCjkHCG",cyan:"cyan-vcCjkHCG",pink:"pink-vcCjkHCG","appearance-text":"appearance-text-vcCjkHCG","fontSize-s":"fontSize-s-vcCjkHCG","fontSize-m":"fontSize-m-vcCjkHCG","size-m":"size-m-vcCjkHCG","size-l":"size-l-vcCjkHCG"}},81524:e=>{e.exports={highlighted:"highlighted-YWUtZHTy"}},91626:e=>{e.exports={separator:"separator-jtAq6E4V"}},40367:e=>{e.exports={icon:"icon-AL2odtws",dropped:"dropped-AL2odtws"}},90186:(e,t,n)=>{"use strict";function r(e){return a(e,s)}function o(e){return a(e,l)}function a(e,t){
const n=Object.entries(e).filter(t),r={};for(const[e,t]of n)r[e]=t;return r}function s(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,{filterDataProps:()=>r,filterAriaProps:()=>o,filterProps:()=>a,isDataAttribute:()=>s,isAriaAttribute:()=>l})},4825:(e,t,n)=>{"use strict";n.d(t,{DEFAULT_TOOL_WIDGET_BUTTON_THEME:()=>i,ToolWidgetButton:()=>c});var r=n(59496),o=n(97754),a=n(9745),s=n(37669),l=n(55576);const i=l,c=r.forwardRef((e,t)=>{const{icon:n,isActive:i,isOpened:c,isDisabled:u,isGrouped:d,isHovered:h,onClick:p,text:m,textBeforeIcon:v,title:f,theme:g=l,className:y,forceInteractive:b,"data-name":S,...x}=e,C=o(y,g.button,f&&"apply-common-tooltip",{[g.isActive]:i,[g.isOpened]:c,[g.isInteractive]:(b||Boolean(p))&&!u,[g.isDisabled]:u,[g.isGrouped]:d,[g.hover]:h,[g.newStyles]:s.hasNewHeaderToolbarStyles}),k=n&&("string"==typeof n?r.createElement(a.Icon,{className:g.icon,icon:n}):r.cloneElement(n,{className:o(g.icon,n.props.className)}));return r.createElement("div",{...x,ref:t,"data-role":"button",className:C,onClick:u?void 0:p,title:f,"data-name":S},v&&m&&r.createElement("div",{className:o("js-button-text",g.text)},m),k,!v&&m&&r.createElement("div",{className:o("js-button-text",g.text)},m))})},37669:(e,t,n)=>{"use strict";n.d(t,{hasNewHeaderToolbarStyles:()=>r});n(67337);const r=!1},47670:(e,t,n)=>{"use strict";n.d(t,{marketType:()=>i});var r=n(28353);n(94419);const o=new Map,a={context:"market_type"},s={cfd:(0,r.t)("cfd",a),bitcoin:(0,r.t)("crypto",a),crypto:(0,r.t)("crypto",a),dr:(0,r.t)("dr",a),forex:(0,r.t)("forex",a),futures:(0,r.t)("futures",a),index:(0,r.t)("index",a),stock:(0,r.t)("stock",a),economic:(0,r.t)("economy",a)},l=new Set(["cfd","spreadbet","defi"]);function i(e,t=[]){const n=t.filter(e=>l.has(e)),i=`${e}_${n.sort().join("_")}`,c=o.get(i);if(void 0!==c)return c;const u=Boolean(t.length)?(0,r.t)(e,a)+" "+n.join(" "):s[e]||e;return o.set(i,u),u}},39640:(e,t,n)=>{"use strict";function r(e,t,n,r,o){function a(o){if(e>o.timeStamp)return;const a=o.target;void 0!==n&&null!==t&&null!==a&&a.ownerDocument===r&&(t.contains(a)||n(o))}return o.click&&r.addEventListener("click",a,!1),o.mouseDown&&r.addEventListener("mousedown",a,!1),o.touchEnd&&r.addEventListener("touchend",a,!1),o.touchStart&&r.addEventListener("touchstart",a,!1),()=>{r.removeEventListener("click",a,!1),r.removeEventListener("mousedown",a,!1),r.removeEventListener("touchend",a,!1),r.removeEventListener("touchstart",a,!1)}}n.d(t,{addOutsideEventListener:()=>r})},24437:(e,t,n)=>{"use strict";n.d(t,{DialogBreakpoints:()=>o});var r=n(96746);const o={SmallHeight:r["small-height-breakpoint"],TabletSmall:r["tablet-small-breakpoint"],TabletNormal:r["tablet-normal-breakpoint"]}},85457:(e,t,n)=>{"use strict";n.d(t,{AdaptivePopupDialog:()=>E});var r=n(59496),o=n(88537);var a=n(97754),s=n.n(a),l=n(68335),i=n(35749),c=n(63016),u=n(1109),d=n(24437),h=n(90692),p=n(95711),m=n(52092),v=n(76422),f=n(9745);const g=r.createContext({setHideClose:()=>{}});var y=n(37257),b=n(91441);function S(e){
const{title:t,subtitle:n,showCloseIcon:o=!0,onClose:a,renderBefore:l,renderAfter:i,draggable:c,className:u,unsetAlign:d}=e,[h,p]=(0,r.useState)(!1);return r.createElement(g.Provider,{value:{setHideClose:p}},r.createElement("div",{className:s()(b.container,u,(n||d)&&b.unsetAlign)},l,r.createElement("div",{"data-dragg-area":c,className:b.title},r.createElement("div",{className:b.ellipsis},t),n&&r.createElement("div",{className:s()(b.ellipsis,b.subtitle)},n)),i,o&&!h&&r.createElement(f.Icon,{className:b.close,icon:y,onClick:a,"data-name":"close","data-role":"button"})))}var x=n(67179);const C={vertical:20},k={vertical:0};class E 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._handleClose=()=>{this.props.onClose()},this._handleOpen=()=>{void 0!==this.props.onOpen&&this.props.isOpened&&this.props.onOpen(this.props.fullScreen||window.matchMedia(d.DialogBreakpoints.TabletSmall).matches)},this._handleKeyDown=e=>{var t;if(!e.defaultPrevented)switch(this.props.onKeyDown&&this.props.onKeyDown(e),(0,l.hashFromEvent)(e)){case 27:if(e.defaultPrevented)return;if(this.props.forceCloseOnEsc&&this.props.forceCloseOnEsc())return 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,i.isTextEditingField)(n))return void r.focus();if(r.contains(n))return void this._handleClose()}}},this._requestResize=()=>{null!==this._controller&&this._controller.recalculateBounds()},this._centerAndFit=()=>{null!==this._controller&&this._controller.centerAndFit()}}componentDidMount(){var e,t;v.subscribe(m.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleClose,null),this._handleOpen(),void 0!==this.props.onOpen&&(this._orientationMediaQuery=window.matchMedia("(orientation: portrait)"),e=this._orientationMediaQuery,t=this._handleOpen,(null==e?void 0:e.addEventListener)?e.addEventListener("change",t):e.addListener(t))}componentWillUnmount(){var e,t;v.unsubscribe(m.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleClose,null),null!==this._orientationMediaQuery&&(e=this._orientationMediaQuery,t=this._handleOpen,(null==e?void 0:e.removeEventListener)?e.removeEventListener("change",t):e.removeListener(t))}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:a,dataName:l,onClickOutside:i,additionalElementPos:m,additionalHeaderElement:v,backdrop:f,shouldForceFocus:g=!0,showSeparator:y,subtitle:b,draggable:E=!0,fullScreen:w=!1,showCloseIcon:I=!0,rounded:N=!0,isAnimationEnabled:H,growPoint:_,dialogTooltip:D,unsetHeaderAlign:T,onDragStart:M,dataDialogName:L}=this.props,A="after"!==m?v:void 0,F="after"===m?v:void 0,O="string"==typeof a?a:L||"";return r.createElement(h.MatchMedia,{rule:d.DialogBreakpoints.SmallHeight},m=>r.createElement(h.MatchMedia,{rule:d.DialogBreakpoints.TabletSmall},d=>r.createElement(c.PopupDialog,{rounded:!(d||w)&&N,className:s()(x.dialog,e),isOpened:o,reference:this._handleReference,onKeyDown:this._handleKeyDown,onClickOutside:i,onClickBackdrop:i,fullscreen:d||w,guard:m?k:C,boundByScreen:d||w,shouldForceFocus:g,backdrop:f,draggable:E,isAnimationEnabled:H,growPoint:_,name:this.props.dataName,dialogTooltip:D,onDragStart:M},r.createElement("div",{className:s()(x.wrapper,t),"data-name":l,"data-dialog-name":O},void 0!==a&&r.createElement(S,{draggable:E&&!(d||w),onClose:this._handleClose,renderAfter:F,renderBefore:A,subtitle:b,title:a,showCloseIcon:I,className:n,unsetAlign:T}),y&&r.createElement(u.Separator,{className:x.separator}),r.createElement(p.PopupContext.Consumer,null,e=>this._renderChildren(e,d||w))))))}}},69654:(e,t,n)=>{"use strict";n.d(t,{DialogSearch:()=>u});var r=n(59496),o=n(97754),a=n.n(o),s=n(28353),l=n(9745),i=n(5639),c=n(28712);function u(e){const{children:t,renderInput:n,onCancel:o,...u}=e;return r.createElement("div",{className:c.container},r.createElement("div",{className:a()(c.inputContainer,o&&c.withCancel)},n||r.createElement(d,{...u})),t,r.createElement(l.Icon,{className:c.icon,icon:i}),o&&r.createElement("div",{className:c.cancel,onClick:o},(0,s.t)("Cancel")))}function d(e){const{className:t,reference:n,value:o,onChange:s,onFocus:l,onBlur:i,onKeyDown:u,onSelect:d,placeholder:h,...p}=e;return r.createElement("input",{...p,ref:n,type:"text",className:a()(t,c.input),autoComplete:"off","data-role":"search",placeholder:h,value:o,onChange:s,onFocus:l,onBlur:i,onSelect:d,onKeyDown:u})}},5648:(e,t,n)=>{"use strict";n.d(t,{SymbolSearchDialogContentItem:()=>g});var r=n(59496),o=n(97754),a=n.n(o),s=n(88537),l=n(9745),i=(n(67337),n(24637)),c=n(19785),u=n(84524),d=n(24633),h=n(77975),p=n(45345),m=n(32563),v=n(88142),f=n(82132);function g(e){const{dangerousTitleHTML:t,title:n,dangerousDescriptionHTML:o,description:g,searchToken:y,exchangeName:b,marketType:S,onClick:x,isSelected:C,isEod:k=!1,isActive:E=!1,isOffset:w=!1,invalid:I=!1,isHighlighted:N=!1,hideExchange:H=!1,hideMarkedListFlag:_=!1,onExpandClick:D,isExpanded:T,hoverComponent:M,country:L,providerId:A,source:F,type:O,flag:R,itemRef:B,onMouseOut:P,onMouseOver:J,className:z,actions:V,reference:W,fullSymbolName:U,logoId:q,currencyLogoId:Z,baseCurrencyLogoId:G,shortName:j,hideLogo:K=!1}=e,{isSmallWidth:Q,isMobile:$}=(0,s.ensureNotNull)((0,
r.useContext)(u.SymbolSearchItemsDialogContext)),Y=Boolean(M),X=!I&&!H&&($||!Y),ee=(0,h.useWatchedValueReadonly)({watchedValue:p.watchedTheme})===d.StdTheme.Dark?f.dark:f.light,te=M;return r.createElement("div",{className:a()(f.itemRow,Q&&f.multiLine,N&&f.highlighted,N&&ee,C&&f.selected,E&&f.active,I&&f.invalid,!$&&m.mobiletouch&&Y&&f.hover,z),onClick:function(e,t){if(!e||t.defaultPrevented)return;t.preventDefault(),e(t)}.bind(null,x),"data-role":e["data-role"]||"list-item","data-active":E,"data-name":"symbol-search-dialog-content-item",onMouseOut:P,onMouseOver:J,ref:W},r.createElement("div",{ref:B,className:a()(f.itemInfoCell,f.cell,w&&f.offset)},r.createElement("div",{className:a()(f.actionHandleWrap,f.fixedWidth)},r.createElement(r.Fragment,null,!1,D&&r.createElement("div",{onClick:function(e){if(!D||e.defaultPrevented)return;e.preventDefault(),D(e)}},r.createElement(l.Icon,{className:a()(f.expandHandle,T&&f.expanded,C&&f.selected),icon:v})),!1)),r.createElement("div",{className:a()(f.description,!1)},n&&r.createElement("div",{className:a()(f.symbolTitle,E&&f.active,I&&f.invalid,!Boolean(o)&&f.noDescription),"data-name":"list-item-title"},"string"==typeof n&&y?r.createElement(i.HighlightedText,{className:f.highlightedText,text:n,queryString:y,rules:(0,c.createRegExpList)(y)}):n,k&&r.createElement("span",{className:f.dataMode},"E")),!n&&t&&r.createElement("div",{className:a()(f.symbolTitle,E&&f.active,I&&f.invalid),"data-name":"list-item-title"},r.createElement("span",{dangerouslySetInnerHTML:{__html:t}}),k&&r.createElement("span",{className:f.dataMode},"E")),Q&&ne())),!Q&&r.createElement("div",{className:a()(f.cell,f.descriptionCell,Boolean(te)&&f.addition)},ne(),te?r.createElement(te,{...e,className:f.actions,onMouseOver:void 0,onMouseOut:void 0}):null),Q&&te?r.createElement(te,{...e,className:f.cell,onMouseOver:void 0,onMouseOut:void 0}):null,X&&r.createElement("div",{className:a()(f.exchangeCell,f.cell)},r.createElement("div",{className:a()(f.exchangeDescription)},r.createElement("div",{className:a()(f.marketType,E&&f.active)},S),"economic"===O&&F?r.createElement("div",{className:a()(f.exchangeName,E&&f.active,"apply-common-tooltip",f.narrow),title:F},F):r.createElement("div",{className:a()(f.exchangeName,E&&f.active)},b)),!1),r.createElement("div",{className:a()(f.cell,Boolean(V)&&f.actionsCell)},V));function ne(){if(I)return null;const e=a()(f.symbolDescription,E&&f.active,!m.mobiletouch&&"apply-overflow-tooltip apply-overflow-tooltip--allow-text");return g?r.createElement("div",{className:e},y?r.createElement(i.HighlightedText,{className:f.highlightedText,text:g,queryString:y,rules:(0,c.createRegExpList)(y)}):g):o?r.createElement("div",{className:e,dangerouslySetInnerHTML:{__html:o}}):null}}},58442:(e,t,n)=>{"use strict";n.d(t,{qualifyProName:()=>s,QualifiedSources:()=>r});var r,o=n(88537),a=n(67337);n(81319);function s(e){return e}!function(e){function t(e){return e.pro_name}function n(e){{const t=a.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 a.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={}))},24389:(e,t,n)=>{"use strict";n.d(t,{QuoteSessionContext:()=>r});const r=n(59496).createContext(null)},20882:(e,t,n)=>{"use strict";function r(e){return""===e.value()}function o(e,t){return e.filter(e=>e.includes(t))}function a(e){const t=new Map;return e.forEach(e=>{t.has(e.group())?t.get(e.group()).push(e):t.set(e.group(),[e])}),t}function s(e,t){return t.map(t=>new e(t))}n.d(t,{isAllSearchSourcesSelected:()=>r,filterSearchSources:()=>o,splitSearchSourcesByGroup:()=>a,createSearchSources:()=>s})},1861:(e,t,n)=>{"use strict";n.d(t,{showSymbolSearchItemsDialog:()=>c});var r=n(59496),o=n(87995),a=n(50655),s=n(24389),l=n(51826),i=n(12045);function c(e){const{initialMode:t="symbolSearch",autofocus:n=!0,defaultValue:c,showSpreadActions:u,selectSearchOnInit:d,onSearchComplete:h,onSearchFeedReady:p,dialogTitle:m,placeholder:v,fullscreen:f,initialScreen:g,wrapper:y,dialog:b,contentItem:S,onClose:x,footer:C,symbolTypes:k,searchInput:E,emptyState:w,hideMarkedListFlag:I,dialogWidth:N="auto",manager:H}=e;if(l.dialogsOpenerManager.isOpened("SymbolSearch")||l.dialogsOpenerManager.isOpened("ChangeIntervalDialog"))return;const _=document.createElement("div"),D=r.createElement(a.SlotContext.Provider,{value:null!=H?H:null},r.createElement(s.QuoteSessionContext.Provider,{value:null},r.createElement(i.SymbolSearchItemsDialog,{onClose:T,initialMode:t,defaultValue:c,showSpreadActions:u,hideMarkedListFlag:I,onSearchFeedReady:p,selectSearchOnInit:d,onSearchComplete:h,dialogTitle:m,placeholder:v,fullscreen:f,initialScreen:g,wrapper:y,dialog:b,contentItem:S,footer:C,symbolTypes:k,searchInput:E,emptyState:w,autofocus:n,dialogWidth:N})));function T(){o.unmountComponentAtNode(_),l.dialogsOpenerManager.setAsClosed("SymbolSearch"),x&&x()}return o.render(D,_),l.dialogsOpenerManager.setAsOpened("SymbolSearch"),{close:T}}},70613:(e,t,n)=>{"use strict";n.d(t,{SymbolSearchDialogBodyContext:()=>r});const r=n(59496).createContext(null)},84524:(e,t,n)=>{"use strict";n.d(t,{SymbolSearchItemsDialogContext:()=>r});const r=n(59496).createContext(null)},12045:(e,t,n)=>{"use strict";n.d(t,{SymbolSearchItemsDialog:()=>Pe});var r=n(59496),o=n(97754),a=n.n(o),s=n(28353),l=n(7785),i=n(15983),c=n(84877),u=n(67337),d=n(24437),h=n(85457),p=n(9745),m=n(84524),v=n(69654),f=n(20882),g=n(70516);function y(e){const{children:t,className:n}=e;return r.createElement("div",{className:a()(g.container,n)},r.createElement("div",{className:g.childrenWrapper},t))}var b=n(88537),S=n(78036),x=n(24637),C=n(19785),k=n(29601),E=n(42608);function w(e){
const{searchSource:t,onClick:n,queryString:o}=e,{selectedSearchSource:s,isAllSearchSourcesSelected:l,isMobile:i}=(0,S.useEnsuredContext)(m.SymbolSearchItemsDialogContext),c=(0,b.ensureNotNull)(s).value(),u=l(t),d=t.value()===c,h=(0,r.useMemo)(()=>(0,C.createRegExpList)(o),[o]),v=t.description(),f=v&&!u,g=a()(E.container,i?E.mobile:E.desktop,d&&E.selected,u&&E.allSelected,u&&E.libAllSelected,!u&&i&&E.bordered);return r.createElement("div",{className:a()(!i&&E.wrap,u&&E.libAllSelected),onClick:n},r.createElement("div",{className:g},r.createElement("div",{className:E.iconWrap},!!u&&r.createElement(p.Icon,{className:a()(E.icon,E.allSelectedIcon),icon:k})),r.createElement("div",{className:E.textBlock},r.createElement("div",{className:a()(E.title,!f&&!i&&E.titleWithoutDesc)},r.createElement(x.HighlightedText,{className:a()(d&&E.highlighted),queryString:o,text:t.name(),rules:h})),f&&r.createElement("div",{className:a()(E.description,"apply-overflow-tooltip")},r.createElement(x.HighlightedText,{className:E.highlighted,queryString:o,rules:h,text:v})))))}var I=n(77975),N=n(45345),H=n(26843),_=n(70613),D=n(70029),T=n(72802),M=n(90819);const L={emptyTextClassName:M.emptyText};function A(e){const{searchSources:t}=e,{setSelectedSearchSource:n,setMode:o,isMobile:l,emptyState:i,autofocus:c}=(0,S.useEnsuredContext)(m.SymbolSearchItemsDialogContext),u=(0,I.useWatchedValueReadonly)({watchedValue:N.watchedTheme})===H.StdTheme.Dark?D:T,[d,h]=(0,r.useState)(""),g=(0,r.useMemo)(()=>[{group:null,sources:(0,f.filterSearchSources)(t,d)}],[t,d]),b=(0,r.useRef)(null),x=(0,r.useRef)(null);(0,r.useLayoutEffect)(()=>{var e;c&&(null===(e=null==b?void 0:b.current)||void 0===e||e.focus())},[]);const C=i?r.createElement(i,null):r.createElement(y,{className:M.noResultsDesktop},r.createElement(p.Icon,{icon:u}),r.createElement("div",{className:M.emptyText},(0,s.t)("No exchanges match your criteria"))),k=!(g.length&&g.every(e=>0===e.sources.length));return r.createElement(_.SymbolSearchDialogBodyContext.Provider,{value:L},r.createElement(v.DialogSearch,{placeholder:(0,s.t)("Search"),onChange:function(e){h(e.target.value),x&&x.current&&(x.current.scrollTop=0)},reference:b}),k?r.createElement("div",{ref:x,className:a()(M.contentList,!l&&M.contentListDesktop),onTouchStart:function(){var e;null===(e=b.current)||void 0===e||e.blur()}},g.map(e=>{const{group:t,sources:n}=e;return 0===n.length?r.createElement(r.Fragment,{key:t}):r.createElement(r.Fragment,{key:t},!1,r.createElement("div",{className:a()(M.searchSourceItemsContainer,!l&&M.searchSourceItemsContainerDesktop)},n.map(e=>r.createElement(w,{key:e.value(),searchSource:e,queryString:d,onClick:E.bind(null,e)}))))})):C);function E(e){n(e),o("symbolSearch")}}var F=n(87995),O=n(8128);n(76861),n(85198);function R(e){return e.hasOwnProperty("exchange")}async function B(e){return new Promise(t=>{window.ChartApiInstance.searchSymbols(e.text||"",e.exchange||"",e.type||"","",!1,!0,"",!0,"",e=>{t(e)})})}
var P=n(81319),J=n(78136),z=n(51768),V=n(68335),W=n(4825),U=n(20832),q=n(21740),Z=n(38927),G=n(43088),j=n(56584),K=n(19586),Q=n(74246);function $(e){var t;const{state:n,update:o}=e,{searchRef:a,forceUpdate:s,upperCaseEnabled:c}=(0,b.ensureNotNull)((0,r.useContext)(m.SymbolSearchItemsDialogContext)),d=(0,l.tokenize)(null===(t=a.current)||void 0===t?void 0:t.value),h=(0,i.validate)(d);let p=[{icon:U,insert:"/",type:"binaryOp",name:"division"},{icon:q,insert:"-",type:"binaryOp",name:"subtraction"},{icon:Z,insert:"+",type:"binaryOp",name:"addition"},{icon:G,insert:"*",type:"binaryOp",name:"multiplication"}];return u.enabled("hide_exponentiation_spread_operator")||(p=p.concat([{icon:j,insert:"^",type:"binaryOp",name:"exponentiation"}])),u.enabled("hide_reciprocal_spread_operator")||(p=p.concat([{icon:K,type:"complete",name:"1/x",callback:()=>{!a.current||h.errors.length||h.warnings.length||(a.current.value=(0,i.stringifyTokens)((0,i.flip)(d)),s())}}])),r.createElement("div",{className:Q.actions},p.map(e=>r.createElement(W.ToolWidgetButton,{className:Q.actionButton,icon:e.icon,key:e.name,isDisabled:Y(e,h),onClick:()=>function(e){var t;if(!Y(e,h)){if(e.insert&&a.current){const t=a.current.value+e.insert;a.current.value=t,a.current.setSelectionRange(t.length,t.length);const[r,,l]=(0,i.getCurrentTokenParamsFromInput)(a.current,c);n.current&&(n.current.selectedIndexValue=-1,n.current.searchSpreadsValue=(0,i.isSpread)(l),n.current.searchTokenValue=r),s(),o()}e.callback&&e.callback(),null===(t=a.current)||void 0===t||t.focus(),(0,z.trackEvent)("GUI","SS",e.name)}}(e)})))}function Y(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 X=n(90186),ee=n(74765);function te(e){const{title:t,isActive:n,isAnimated:r,activeColor:o,size:s="m",appearance:l="default",fontSize:i="m",className:c}=e;return a()(ee.bubble,n&&ee.active,o&&ee[o],t&&"apply-common-tooltip",s&&ee["size-"+s],i&&ee["fontSize-"+i],l&&ee["appearance-"+l],r&&ee.animated,c)}function ne(e){const{id:t,title:n,tabIndex:o,role:s,contentClassName:l,children:i,onClick:c,onMouseDown:u,reference:d,...h}=e;return r.createElement("span",{...(0,X.filterAriaProps)(h),...(0,X.filterDataProps)(h),id:t,title:n,tabIndex:o,role:s,className:te(e),onClick:c,onMouseDown:u,ref:d},r.createElement("span",{className:a()(ee.content,l)},i))}var re=n(99167);function oe(e){const{className:t,itemClassName:n,itemContentClassName:a,items:s,getItemTitle:l,getItemTooltip:i,getItemKey:c,checkItemIsActive:u,getItemColor:d,onBubbleClick:h,multiline:p,children:m,BubbleComponent:v=ne,reference:f,fontSize:g}=e;return r.createElement("div",{className:o(t,re.bubbles,p&&re.multiLine),ref:f},s.map((e,t)=>r.createElement(v,{key:c?c(e):t,id:c?c(e):t.toString(),className:o(re.bubble,n),contentClassName:a,onClick:function(){h(e)},onMouseDown:function(e){e.preventDefault()},isActive:!!u&&u(e),
activeColor:d?d(e):void 0,fontSize:g,title:i?i(e):void 0},l(e))),m)}var ae=n(61074),se=n(83199),le=n(9837),ie=n.n(le),ce=n(10381),ue=n(53474);function de(e){const{mode:t,setMode:n,searchRef:o,cachedInputValue:l,selectedSearchSource:i,isAllSearchSourcesSelected:c,upperCaseEnabled:u}=(0,S.useEnsuredContext)(m.SymbolSearchItemsDialogContext),d=(0,b.ensureNotNull)(i),h="symbolSearch"===t,v=c(d);return h?r.createElement("div",{className:a()(ue.flagWrap,"apply-common-tooltip"),title:(0,s.t)("Select source"),onClick:function(){o.current&&(l.current=u?o.current.value.toUpperCase():o.current.value);n("exchange")}},!!v&&r.createElement(p.Icon,{className:ue.icon,icon:k}),r.createElement("div",{className:ue.title},d.name()),r.createElement(ce.ToolWidgetCaret,{className:ue.caret,dropped:!1})):null}var he=n(77338);function pe(e){const{isSmallWidth:t,selectedSearchSource:n,searchSources:o}=(0,b.ensureNotNull)((0,r.useContext)(m.SymbolSearchItemsDialogContext)),l=n&&o.length>1&&!(0,P.exchangeSelectDisabled)();return r.createElement("div",{className:a()(he.wrap,t&&he.small)},r.createElement("div",{className:he.item},r.createElement("div",{className:he.text},t?(0,s.t)("Symbol & description"):(0,s.t)("Symbol"))),r.createElement("div",{className:he.item},!t&&r.createElement("div",{className:he.text},(0,s.t)("Description")),l&&r.createElement("div",{className:he.exchange},r.createElement(de,null))))}var me=n(62820),ve=n(74915);function fe(e){const{onTouchMove:t,listRef:n,className:o,listWrapRef:s,virtualListKey:l,items:i,getItemSize:c,hideFeed:u}=e,{mode:d,isSmallWidth:h,handleListWidth:p}=(0,S.useEnsuredContext)(m.SymbolSearchItemsDialogContext),[v,f]=(0,r.useState)(null),g=(0,r.useCallback)(e=>{const{index:t,style:n}=e;return r.createElement("div",{style:n},i[t])},[i]),y=(0,r.useCallback)(e=>(0,b.ensure)(i[e].key),[i]),x="watchlist"===d&&null!==v;return r.createElement(ie(),{onMeasure:function(e){f(e.height),p(e.width)}},r.createElement("div",{ref:s,className:a()(ve.wrap,x&&ve.watchlist,u&&ve.noFeed,o),onTouchMove:t},r.createElement("div",{className:a()(ve.scrollContainer,u&&ve.noFeed)},x?r.createElement(se.VariableSizeList,{key:l,ref:n,className:ve.listContainer,width:"100%",height:(0,b.ensureNotNull)(v),itemCount:i.length,itemSize:c,children:g,itemKey:y,overscanCount:20,direction:(0,me.isRtl)()?"rtl":"ltr"}):r.createElement("div",{className:a()(ve.listContainer,h&&ve.multiLineItemsContainer)},r.createElement(pe,null),...i))))}var ge=n(5648),ye=n(92540);const be=u.enabled("hide_image_invalid_symbol");function Se(e){const{token:t,state:n,otherSymbolsCount:o,onChangeSymbolTypeFilter:a,onResetFilters:s,onListTouchMove:l,brokerTitle:i,isBrokerChecked:c,onBrokerCheckboxChange:u,listRef:d,listWrapRef:h}=e,{mode:p,isMobile:v,selectedSymbolType:f,symbolTypes:g,feedItems:y,contentItem:b,emptyState:x=xe}=(0,S.useEnsuredContext)(m.SymbolSearchItemsDialogContext),C=i&&r.createElement(BrokerCheckbox,{brokerTitle:i,checked:c,onCheckboxChange:u}),k="symbolSearch"===p&&"good"===n,E=null!=b?b:ge.SymbolSearchDialogContentItem,w=(0,
r.useMemo)(()=>y.map(e=>r.createElement(E,{...e,searchToken:t})),[y]);return r.createElement(r.Fragment,null,"symbolSearch"===p&&r.createElement(r.Fragment,null,g.length>0&&r.createElement(oe,{itemClassName:ye.symbolType,items:g,getItemTitle:e=>e.name,getItemKey:e=>e.value,checkItemIsActive:e=>e.value===f,onBubbleClick:a,multiline:!v},!v&&C),v&&g.length>0&&i&&r.createElement("div",{className:ye.brokerCheckboxWrap},C)),r.createElement(fe,{listRef:d,listWrapRef:h,onTouchMove:l,items:w,getItemSize:()=>ke,hideFeed:!k}),"loading"===n&&r.createElement("div",{className:ye.spinnerWrap},r.createElement(ae.Spinner,null)),"symbolSearch"===p&&r.createElement(r.Fragment,null,!1,"empty"===n&&r.createElement(x,null)))}function xe(e){const t=(0,I.useWatchedValueReadonly)({watchedValue:N.watchedTheme})===H.StdTheme.Dark?D:T;return r.createElement(y,{className:ye.noResultsDesktop},!be&&r.createElement(p.Icon,{icon:t}),r.createElement("div",{className:ye.emptyText},(0,s.t)("No symbols match your criteria")))}const Ce=(0,P.getDefaultSearchSource)(),ke=52;function Ee(e){const{mode:t,setMode:n,setSelectedIndex:o,isMobile:l,selectedSearchSource:c,setSelectedSearchSource:d,isAllSearchSourcesSelected:h,selectedSymbolType:p,setSelectedSymbolType:f,setRenderSymbolSearchList:g,searchRef:y,cachedInputValue:b,setSearchSpreads:x,showSpreadActions:C,selectedItem:k,onSearchFeedReady:E,forceUpdate:w,placeholder:I,initialScreen:N,footer:H,searchInput:D,upperCaseEnabled:T,externalInput:M,handleKeyDown:L,customSearchSymbols:A}=(0,S.useEnsuredContext)(m.SymbolSearchItemsDialogContext),W=(0,r.useRef)(t);W.current=t;const U=(0,r.useRef)(new AbortController),[q,Z]=(0,r.useState)(0),[G,j]=(0,r.useState)("noop"),K=(0,r.useRef)(0),[Q,Y]=(0,r.useState)(b.current),X=(0,r.useRef)(null),ee=(0,r.useRef)(null),te=(0,r.useRef)({selectedIndexValue:-1,searchTokenValue:"",searchSpreadsValue:!0}),ne=(0,r.useRef)(null),re=(0,r.useRef)(null),{broker:oe=null,brokerId:ae,brokerTitle:se,isBrokerChecked:le=!1,setIsBrokerChecked:ie=(()=>{}),unhideSymbolSearchGroups:ce=""}={brokerId:void 0,brokerTitle:void 0};(0,r.useEffect)(()=>()=>{U.current.abort(),Ie()},[]),(0,r.useEffect)(()=>{(null==y?void 0:y.current)&&Y(y.current.value)},[]),(0,r.useEffect)(()=>{const e=y.current;if(e)return e.addEventListener("input",ge),e.addEventListener("focus",Ee),e.addEventListener("select",fe),e.addEventListener("click",fe),e.addEventListener("keyup",we),M&&L&&e.addEventListener("keydown",L),()=>{e&&(e.removeEventListener("input",ge),e.removeEventListener("focus",Ee),e.removeEventListener("select",fe),e.removeEventListener("click",fe),e.removeEventListener("keyup",we),M&&L&&e.removeEventListener("keydown",L))}},[L]),(0,r.useEffect)(()=>{Boolean(N)&&""===Q.trim()||(xe(Q,p,c),X.current&&(X.current.scrollTop=0))},[Q,p,c,le,N]),(0,r.useEffect)(()=>{if(!k||!y.current)return;if(!u.enabled("show_spread_operators"))return y.current.value=k.symbol,void w();const e=R(k)?k.exchange:k.parent.exchange,t={name:k.symbol,exchange:e,prefix:k.prefix,fullName:k.full_name},[n,r]=(0,
i.getNextSymbolInputValueAndPosition)(y.current,t,T);y.current.value=n,y.current.setSelectionRange(r,r),w()},[k]);const ue=(0,r.useCallback)(e=>E?E(e):e,[E]),de=null!=N?N:"div",he=Boolean(N)&&"symbolSearch"!==t,pe=null!=D?D:v.DialogSearch,me=(0,r.useMemo)(()=>({listRef:ee,resetRecommends:ke,updateRecommends:xe,searchToken:Q,emptyTextClassName:ye.emptyText,isBrokerChecked:le,symbolSearchState:G,currentMode:W}),[ee,Q,le,G,W]);return r.createElement(_.SymbolSearchDialogBodyContext.Provider,{value:me},!(M&&"symbolSearch"===t)&&r.createElement(pe,{reference:y,className:a()(ye.search,T&&ye.upperCase),placeholder:I||(0,s.t)("Search")},C&&r.createElement($,{state:te,update:be})),he?r.createElement(de,null):r.createElement(Se,{token:Q,state:G,otherSymbolsCount:q,onListTouchMove:function(){var e;null===(e=y.current)||void 0===e||e.blur()},onChangeSymbolTypeFilter:function(e){const{value:t}=e;f(t),o(-1)},onResetFilters:function(){var e;f((0,P.getAllSymbolTypesValue)()),Ce&&d(Ce);ie(!1),l||null===(e=y.current)||void 0===e||e.focus()},brokerTitle:se,isBrokerChecked:le,onBrokerCheckboxChange:function(e){ie("on"!==e)},listRef:ee,listWrapRef:X}),H);function ve(){if(!y.current)return;const[e,t,n]=(0,i.getCurrentTokenParamsFromInput)(y.current,T);K.current=t,te.current={selectedIndexValue:-1,searchSpreadsValue:(0,i.isSpread)(n),searchTokenValue:e},ne.current||(ne.current=setTimeout(be,0))}function fe(){if(!y.current)return;const[,e]=(0,i.getCurrentTokenParamsFromInput)(y.current,T);e!==K.current&&ve()}function ge(){u.enabled("show_spread_operators")?ve():y.current&&(te.current={selectedIndexValue:-1,searchSpreadsValue:!1,searchTokenValue:y.current.value},ne.current||(ne.current=setTimeout(be,0)))}function be(){const{selectedIndexValue:e,searchTokenValue:t,searchSpreadsValue:n}=te.current;ne.current=null,(0,F.unstable_batchedUpdates)(()=>{x(n),o(e),Y(T?t.toUpperCase():t)})}async function xe(e,t,n){try{"noop"===G?j("loading"):(Ie(),re.current=setTimeout(()=>{j("loading")},500)),Ne();const r=await async function(e,t,n,r){var o,a,s,l;const d=u.enabled("show_spread_operators")?(0,i.shortName)(t):null===(o=y.current)||void 0===o?void 0:o.value;let h;if(le&&oe){const t=await(0,O.respectAbort)(e,oe.accountMetainfo());h=t.prefix}const p=u.enabled("show_spread_operators")?null!==(s=null!==(a=(0,i.getExchange)(t))&&void 0!==a?a:h)&&void 0!==s?s:null==r?void 0:r.getRequestExchangeValue():null==c?void 0:c.getRequestExchangeValue(),m=(0,i.getExchange)(t)||null===(l=r||c)||void 0===l?void 0:l.getRequestCountryValue(),v={serverHighlight:!1,text:d,exchange:p,country:m,type:n,lang:window.language||"",brokerId:ae,onlyTradable:Boolean(ae)&&le,unhideSymbolSearchGroups:ce,signal:e},f=(0,J.getSearchRequestDelay)();void 0!==f&&await(0,O.delay)(e,f);return A?A(v):B(v)}(U.current.signal,e,t,n),o=ue(function(e,t=window.ChartApiInstance.symbolsGrouping()){var n;const r={},o=[];for(let a=0;a<e.length;++a){const s=e[a];if(s.prefix||Array.isArray(s.contracts))return e;const l=t[s.type];if(void 0===l){o.push(s);continue}const i=l.exec(s.symbol);if(i){const e=i[1]
;let t;r.hasOwnProperty(e)?t=r[e]:(t=o.length,r[e]=t,o.push({type:s.type,symbol:e,exchange:s.exchange,description:s.description,full_name:s.exchange+":"+e,contracts:[]})),null===(n=o[t].contracts)||void 0===n||n.push(s)}else o.push(s)}return o}(r));if(!o.length)return Ie(),void j("empty");Ie(),g(o),j("good")}catch(e){(0,O.skipAbortError)(e)}}function ke(){Ne(),j("empty"),Y(""),x(!1),Ie()}function Ee(){"watchlist"===W.current&&(n("symbolSearch"),(0,z.trackEvent)("Watchlist","Mobile SS","Go to SS page"))}function we(e){switch((0,V.hashFromEvent)(e)){case 37:case 39:fe()}}function Ie(){re.current&&clearTimeout(re.current)}function Ne(){U.current.abort(),U.current=new AbortController}}var we=n(64360),Ie=n(98749);function Ne(e){const{theme:t=Ie}=e,{setMode:n,isMobile:o}=(0,S.useEnsuredContext)(m.SymbolSearchItemsDialogContext);return r.createElement(p.Icon,{className:a()(e.className,t.button,!o&&t.desktop),icon:we,onClick:function(){n("symbolSearch")}})}var He=n(47670),_e=n(58442),De=n(56840);function Te(e){const[t,n]=(0,r.useState)(()=>{const{defaultSearchSource:t,searchSources:n}=e,r=De.getValue("symboledit.exchangefilter","");return n.find(e=>e.value()===r)||t});return[t,(0,r.useCallback)(e=>{var t;n(e),t=e,De.setValue("symboledit.exchangefilter",t.value())},[])]}function Me(e){const[t,n]=(0,r.useState)(()=>{if(1===e.types.length)return e.types[0].value;const t=De.getValue("symboledit.filter",(0,P.getAllSymbolTypesValue)());return e.types.find(e=>e.value===t)?t:(0,P.getAllSymbolTypesValue)()});return[t,(0,r.useCallback)(e=>{var t;n(e),t=e,De.setValue("symboledit.filter",t)},[])]}var Le=n(36947),Ae=n(82708),Fe=n(6215);const Oe=(0,P.getAvailableSearchSources)(),Re=(0,P.getDefaultSearchSource)(),Be=u.enabled("uppercase_instrument_names");function Pe(e){var t;const{onClose:n,initialMode:o,defaultValue:a="",showSpreadActions:h,hideMarkedListFlag:p,selectSearchOnInit:v=!0,onSearchComplete:g,onSearchFeedReady:y,dialogTitle:b=(0,s.t)("Symbol Search"),placeholder:S,fullscreen:x,initialScreen:C,wrapper:k,dialog:E,contentItem:w,footer:I,searchInput:N,emptyState:H,autofocus:_,dialogWidth:D,onKeyDown:T,searchSourcesScreen:M,customSearchSymbols:L,isDisableFiltering:F}=e,O=(0,r.useMemo)(()=>F?[]:e.symbolTypes?e.symbolTypes:(0,P.getAvailableSymbolTypes)(),[]),J=void 0!==e.input,z=F?[]:Oe,[W,U]=(0,r.useState)(o),q=(0,r.useRef)(a),[Z,G]=Te({searchSources:z,defaultSearchSource:Re}),[j,K]=Me({types:O}),[Q,$]=(0,r.useState)([]),[Y,X]=(0,r.useState)(!1),[ee,te]=(0,r.useState)(-1),ne=(0,r.useRef)(null!==(t=e.input)&&void 0!==t?t:null),[re,oe]=(0,r.useState)(!1),ae=(0,Le.useForceUpdate)(),[se,le]=(0,r.useState)(new Set),{broker:ie=null,brokerId:ce,unhideSymbolSearchGroups:ue="",displayBrokerSymbol:de=!1}={brokerId:void 0};(0,r.useLayoutEffect)(()=>{var e;!(null==ne?void 0:ne.current)||!J&&Boolean(null===(e=ne.current)||void 0===e?void 0:e.value)||(J||"compare"===W||(ne.current.value=q.current),!_||J&&"symbolSearch"!==W||ne.current.focus())},[W]),(0,r.useEffect)(()=>{(null==ne?void 0:ne.current)&&v&&_&&ne.current.select()},[]);const he=(0,
r.useMemo)(()=>Q.reduce((e,t)=>{const n=Ve(t),r=se.has(n);return e.push(t),r&&t.contracts&&e.push(...t.contracts.map(e=>({...e,parent:t}))),e},[]),[Q,se]),pe=(0,r.useRef)(null);(0,r.useEffect)(()=>{var e;-1!==ee&&(null===(e=pe.current)||void 0===e||e.scrollIntoView({block:"nearest"}))},[ee,pe]);const me=(0,r.useMemo)(()=>he.map((e,t)=>{var n,r,o,a;if(R(e)){const o=Ve(e),a=e.contracts?se.has(o):void 0,s=t===ee;return{key:t,id:o,title:ze(e,de),description:e.description,isOffset:!1,onClick:xe.bind(null,e),providerId:e.provider_id,source:e.source,country:null===(n=e.country)||void 0===n?void 0:n.toLocaleLowerCase(),type:e.type,exchangeName:e.exchange,marketType:(0,He.marketType)(e.type,e.typespecs),isEod:null===(r=e.params)||void 0===r?void 0:r.includes("eod"),isExpanded:a,onExpandClick:e.contracts?Ce.bind(null,o):void 0,fullSymbolName:P.isOpenFirstContractEnabled&&e.contracts?_e.QualifiedSources.fromSymbolSearchResult(e,e.contracts[0]):_e.QualifiedSources.fromSymbolSearchResult(e),itemRef:s?pe:void 0,isSelected:t===ee,hideMarkedListFlag:p,item:e,logoId:e.logoid,currencyLogoId:e["currency-logoid"],baseCurrencyLogoId:e["base-currency-logoid"],shortName:(0,Ae.safeShortName)(_e.QualifiedSources.fromSymbolSearchResult(e)),currencyCode:e.currency_code}}{const{parent:n}=e,r=Ve(n),s=t===ee;return{key:t,id:r+e.symbol,dangerousTitleHTML:ze(e,de),dangerousDescriptionHTML:`${n.description} (${e.description})`,isOffset:!0,isEod:null===(o=e.params)||void 0===o?void 0:o.includes("eod"),onClick:ke.bind(null,e.parent,e),providerId:n.provider_id,country:null===(a=n.country)||void 0===a?void 0:a.toLowerCase(),type:n.type,exchangeName:n.exchange,marketType:(0,He.marketType)(n.type,e.typespecs),fullSymbolName:_e.QualifiedSources.fromSymbolSearchResult(e.parent,e),itemRef:s?pe:void 0,isSelected:s,hideMarkedListFlag:p,item:e}}}),[Q,se,W,ee,T]),ve=null!=E?E:Ue,fe=ve!==Ue&&!J,ge=(e,t)=>({mode:W,setMode:U,selectedSearchSource:Z,setSelectedSearchSource:G,isAllSearchSourcesSelected:f.isAllSearchSourcesSelected,selectedSymbolType:j,setSelectedSymbolType:K,selectedIndex:ee,setSelectedIndex:te,onClose:n,setRenderSymbolSearchList:$,searchRef:ne,cachedInputValue:q,searchSpreads:Y,setSearchSpreads:X,handleListWidth:we,isSmallWidth:re,feedItems:me,isMobile:e,showSpreadActions:h,selectSearchOnInit:v,isTablet:t,selectedItem:he[ee],onSearchFeedReady:y,forceUpdate:ae,placeholder:S,initialScreen:C,toggleExpand:Ce,openedItems:se,onSubmit:Fe,onSearchComplete:g,footer:I,symbolTypes:O,contentItem:w,searchInput:N,emptyState:H,autofocus:_,upperCaseEnabled:Be,externalInput:J,handleKeyDown:fe?void 0:De,customSearchSymbols:L,searchSources:z}),ye=null!=M?M:A,be="exchange"===W?{title:(0,s.t)("Sources"),dataName:"exchanges-search",render:()=>r.createElement(ye,{searchSources:z}),additionalHeaderElement:r.createElement(Ne,null),additionalElementPos:"before"}:{title:b,dataName:"symbol-search-items-dialog",render:()=>r.createElement(Ee,null),additionalElementPos:"after"},Se=null!=k?k:"div";return r.createElement(Se,null,r.createElement(c.MatchMediaMap,{
rules:d.DialogBreakpoints},({TabletSmall:e,TabletNormal:t})=>r.createElement(m.SymbolSearchItemsDialogContext.Provider,{value:ge(e,t)},r.createElement(ve,{...be,fullScreen:x,onClose:n,onClickOutside:n,onKeyDown:fe?void 0:De,isOpened:!0}))));function xe(e){if(e.contracts)return P.isOpenFirstContractEnabled&&e.contracts.length?void ke(e,e.contracts[0]):void Ce(Ve(e));ke(e)}function Ce(e){const t=new Set(se);t.has(e)?t.delete(e):t.add(e),le(t)}function ke(e,t){const r=t||e,{exchange:o}=e;if(u.enabled("show_spread_operators")){const e={name:r.symbol,exchange:o,prefix:r.prefix,fullName:r.full_name};if(Y)return Ie(e),void ae();if(ne.current&&ne.current.value.includes(","))return void Ie(e)}const a=[{resolved:!0,symbol:_e.QualifiedSources.fromSymbolSearchResult(e,t),result:r}];g(a),n()}function we(e){oe("fixed"===D||e<=640)}function Ie(e){if(!ne.current)return;const[t,n]=(0,i.getNextSymbolInputValueAndPosition)(ne.current,e,Be);ne.current.value=t,ne.current.setSelectionRange(n,n),ne.current.focus()}function De(e){switch((0,V.hashFromEvent)(e)){case 38:if(e.preventDefault(),0===ee)return;if(-1===ee)return void te(0);te(ee-1);break;case 40:if(e.preventDefault(),ee===me.length-1)return;te(ee+1);break;case 37:{if(-1===ee)return;const t=me[ee],{id:n,isOffset:r,onExpandClick:o}=t;if(r||!n||!se.has(n)||!Boolean(o)||P.isOpenFirstContractEnabled&&Boolean(T)||(e.preventDefault(),Ce(n)),o)return void(null==T||T(e,!0));break}case 39:{if(-1===ee)return;const t=me[ee],{id:n,isOffset:r,onExpandClick:o}=t;if(r||!n||se.has(n)||!Boolean(o)||P.isOpenFirstContractEnabled&&Boolean(T)||(e.preventDefault(),Ce(n)),o)return void(null==T||T(e,!0));break}case 13:e.preventDefault(),Fe(!0);break;case 27:e.preventDefault(),n()}null==T||T(e)}function Fe(e){if(!ne.current)return;const t=ne.current.value;if(u.enabled("show_spread_operators")&&Y&&t){if(t.includes(",")){const r=We(t);if(r.some(e=>!Pe(e)))return;return g(r.map(Je)),void(e&&n())}if(!Pe(t))return;return g([{symbol:Be?t.toUpperCase():t,resolved:!1}]),void(e&&n())}if(t.includes(","))return g(We(t).map(Je)),void(e&&n());if(-1!==ee){me[ee].onClick()}else{const r=Be?t.toUpperCase():t;if(r&&""!==r.trim()){const e=We(r);if(void 0!==ce&&-1===r.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==ie?void 0:ie.accountMetainfo()))||void 0===t||t.prefix;const n=await B({strictMatch:!0,serverHighlight:!1,text:e,lang:window.language||"",brokerId:ce,onlyTradable:!0,unhideSymbolSearchGroups:ue,exchange:void 0});if(0!==n.length){const e=n[0],{contracts:t}=e,r=t&&t.length>0?t[0]:void 0,o=e.prefix||e.exchange,a=r?r.symbol:e.symbol;if(o&&a)return{symbol:_e.QualifiedSources.fromSymbolSearchResult(e,r),resolved:!0,result:e}}return{symbol:e,resolved:!1}}(e))))})(e).then(e=>g(e));else{const t=e.map(Je);g(t)}}e&&n()}}function Pe(e){const t=(0,l.tokenize)(e),n=(0,i.validate)(t);if(n.errors.length||n.warnings.length)return!1;const r=me[ee];return!r||void 0===r.isExpanded||(r.onClick(),!1)}}
function Je(e){return{symbol:Be?e.toUpperCase():e,resolved:!1}}function ze(e,t){const{broker_symbol:n,symbol:r}=e;return`${r}${t&&n?` (${n})`:""}`}function Ve(e){return e.symbol+e.exchange+e.description}function We(e){return e.split(",").map(e=>e.trim()).filter(e=>""!==e)}function Ue(e){const{isMobile:t,isTablet:n}=(0,S.useEnsuredContext)(m.SymbolSearchItemsDialogContext);return r.createElement(h.AdaptivePopupDialog,{...e,className:a()(Fe.dialog,!t&&(n?Fe.tabletDialog:Fe.desktopDialog)),backdrop:!0,draggable:!1})}},15983:(e,t,n)=>{"use strict";n.d(t,{validate:()=>s,flip:()=>l,stringifyTokens:()=>i,isSpread:()=>u,shortName:()=>h,getExchange:()=>p,getNextSymbolInputValueAndPosition:()=>v,getCurrentTokenParamsFromInput:()=>f});var r=n(67337),o=n(7785),a=n(81319);function s(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 a=e[r];if("whitespace"!==a.type){if("incompleteSymbol"===a.type||"incompleteNumber"===a.type){const n=r!==e.length-1,o={status:n?"error":"incomplete",reason:"incomplete_token",offset:a.offset,token:a};if(n?t.errors.push(o):t.warnings.push(o),n)continue}switch(a.type){case"symbol":case"number":if("var"===n){t.errors.push({status:"error",reason:"unexpected_token",offset:a.offset,token:a});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:a.offset,token:a});continue}n="operator";break;case"openBrace":if("var"===n){t.errors.push({status:"error",reason:"unexpected_token",offset:a.offset,token:a});continue}o.push(a),n="init";break;case"closeBrace":if("var"!==n){t.errors.push({status:"error",reason:"unexpected_token",offset:a.offset,token:a});continue}o.pop()||t.errors.push({status:"error",reason:"unbalanced_brace",offset:a.offset,token:a}),n="var";break;case"unparsed":t.errors.push({status:"error",reason:"unparsed_entity",offset:a.offset,token:a})}}}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 a=e[o];if("whitespace"!==a.type)switch(n){case 0:if("number"!==a.type||1!=+a.value)return[];n=1;break;case 1:if(1!==n||"divide"!==a.type)return[];n=2,t=o+1;break;case 2:if("openBrace"===a.type)n=3,r=1;else if(c(a.type))return[];break;case 3:"openBrace"===a.type?r++:"closeBrace"===a.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 a=e[o];switch(a.type){case"plus":case"minus":case"multiply":case"divide":case"power":n.length&&n[n.length-1].minPrecedence>a.precedence&&(n[n.length-1].minPrecedence=a.precedence);break;case"openBrace":r={minPrecedence:1/0,openBraceIndex:o},n.push(r);break;case"closeBrace":{if(r=n.pop(),!r)break;const a=e[r.openBraceIndex-1],s=e[o+1],l=a&&("plus"===a.type||"multiply"===a.type);(!c(null==s?void 0:s.type)||(null==s?void 0:s.precedence)<=r.minPrecedence)&&(!c(null==a?void 0:a.type)||(null==a?void 0:a.precedence)<(null==r?void 0:r.minPrecedence)||(null==a?void 0:a.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 h(e){return d((0,o.tokenize)(e)).reduce((e,t)=>{if("symbol"!==t.type)return e+t.value;const[,n]=m(t);return n?e+n:e},"")}function p(e){const t=function(e){const t=(0,o.tokenize)(e),n=[];return t.forEach(e=>{if("symbol"!==e.type)return;const[t]=m(e);t&&n.push(t)}),n}(e);if(1===t.length)return t[0]}function m(e){const t=/^'?(?:([A-Z0-9_]+):)?(.*?)'?$/i.exec(e.value);return null===t?[void 0,void 0]:[t[1],t[2]]}function v(e,t,n){const r=e.value,[s,l]=f(e,n),i=(0,a.getSymbolFullName)(t),c=o.symbolTokenEscapeRe.test(i)?`'${i}'`:i;return[r.substring(0,l)+c+r.substring(l+s.length),l+c.length]}function f(e,t){const{value:n,selectionStart:r}=e,a=(0,o.tokenize)(t?n.toUpperCase():n),s=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}(a,r||0);return[(null==s?void 0:s.value)||"",s?s.offset:n.length,a]}},81319:(e,t,n)=>{"use strict";n.d(t,{exchangeSelectDisabled:()=>p,getAllSymbolTypesValue:()=>h,getAvailableExchanges:()=>c,getAvailableSearchSources:()=>i,getAvailableSymbolTypes:()=>d,getDefaultSearchSource:()=>l,getSymbolFullName:()=>s,isOpenFirstContractEnabled:()=>m});var r=n(28353),o=n(20882);class a{constructor(e){this._exchange=e}value(){return this._exchange.value}name(){return(0,o.isAllSearchSourcesSelected)(this)?(0,r.t)("All sources"):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:a}=e;return r.toLowerCase().includes(n)||o.toLowerCase().includes(n)||void 0!==a&&a.some(e=>e.toLowerCase().includes(n))}(this._exchange,e)}getRequestExchangeValue(){return this._exchange.value}getRequestCountryValue(){}}function s(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 l(){const e=i();return e.find(o.isAllSearchSourcesSelected)||e[0]||null}
function i(){return(0,o.createSearchSources)(a,u())}function c(){return u()}function u(){return window.ChartApiInstance.supportedExchangesList().map(e=>({...e,country:"",providerId:"",flag:""}))}function d(){return window.ChartApiInstance.supportedSymbolsTypes()}function h(){return""}function p(){return!1}const m=!1},51826:(e,t,n)=>{"use strict";n.d(t,{DialogsOpenerManager:()=>r,dialogsOpenerManager:()=>o});class r{constructor(){this._storage=new Map}setAsOpened(e,t){this._storage.set(e,t)}setAsClosed(e){this._storage.delete(e)}isOpened(e){return this._storage.has(e)}getDialogPayload(e){return this._storage.get(e)}}const o=new r},82708:(e,t,n)=>{"use strict";n.d(t,{safeShortName:()=>o});var r=n(82029);function o(e){try{return(0,r.shortName)(e)}catch(t){return e}}},7785:(e,t,n)=>{"use strict";n.d(t,{symbolTokenEscapeRe:()=>a,tokenize:()=>i});var r=n(67337);const o=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=/[+\-/*]/,s={number:/\d+(?:\.\d*|(?![a-zA-Z0-9_!:.&]))|\.\d+/,incompleteNumber:/\./,symbol:o,incompleteSymbol:/'[^']*/,separatorPrefix:"###",openBrace:"(",closeBrace:")",plus:"+",minus:"-",multiply:"*",divide:"/",power:"^",whitespace:/[\0-\x20\s]+/,unparsed:null},l=new RegExp(Object.values(s).map(e=>{return null===e?"":`(${"string"==typeof e?(t=e,t.replace(/[\^$()[\]{}*+?|\\]/g,"\\$&")):e.source})`;var t}).filter(e=>""!==e).concat(".").join("|"),"g");function i(e){if(!e)return[];const t=[],n=Object.keys(s);let r;for(;r=l.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}},19785:(e,t,n)=>{"use strict";n.d(t,{rankedSearch:()=>o,createRegExpList:()=>a,getHighlightedChars:()=>s});var r=n(80643);function o(e){const{data:t,rules:n,queryString:o,isPreventedFromFiltering:a,primaryKey:s,secondaryKey:l=s,optionalPrimaryKey:i}=e;return t.map(e=>{const t=i&&e[i]?e[i]:e[s],a=e[l];let c,u=0;return n.forEach(e=>{var n,s,l,i;const{re:d,fullMatch:h}=e;return d.lastIndex=0,t&&t.toLowerCase()===o.toLowerCase()?(u=3,void(c=null===(n=t.match(h))||void 0===n?void 0:n.index)):(0,r.isString)(t)&&h.test(t)?(u=2,void(c=null===(s=t.match(h))||void 0===s?void 0:s.index)):(0,r.isString)(a)&&h.test(a)?(u=1,void(c=null===(l=a.match(h))||void 0===l?void 0:l.index)):void((0,r.isString)(a)&&d.test(a)&&(u=1,c=null===(i=a.match(d))||void 0===i?void 0:i.index))}),{matchPriority:u,matchIndex:c,item:e}}).filter(e=>a||e.matchPriority).sort((e,t)=>{if(e.matchPriority<t.matchPriority)return 1;if(e.matchPriority>t.matchPriority)return-1;if(e.matchPriority===t.matchPriority){if(void 0===e.matchIndex||void 0===t.matchIndex)return 0;if(e.matchIndex>t.matchIndex)return 1;if(e.matchIndex<t.matchIndex)return-1}return 0}).map(({item:e})=>e)}
function a(e,t){const n=[],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 s(e,t,n){const r=[];return e&&n?(n.forEach(e=>{const{fullMatch:n,re:o,reserveRe:a}=e;n.lastIndex=0,o.lastIndex=0;const s=n.exec(t),l=s||o.exec(t)||a&&a.exec(t);if(e.fuzzyHighlight=!s,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,"\\$&")}},24637:(e,t,n)=>{"use strict";n.d(t,{HighlightedText:()=>l});var r=n(59496),o=n(97754),a=n(19785),s=n(81524);function l(e){const{queryString:t,rules:n,text:l,className:i}=e,c=(0,r.useMemo)(()=>(0,a.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(s.highlighted,i)},e):r.createElement("span",null,e))):l)}},78036:(e,t,n)=>{"use strict";n.d(t,{useEnsuredContext:()=>a});var r=n(59496),o=n(88537);function a(e){return(0,o.ensureNotNull)((0,r.useContext)(e))}},36947:(e,t,n)=>{"use strict";n.d(t,{useForceUpdate:()=>o});var r=n(59496);const o=()=>{const[,e]=(0,r.useReducer)((e,t)=>e+1,0);return e}},77975:(e,t,n)=>{"use strict";n.d(t,{useWatchedValueReadonly:()=>o});var r=n(59496);const o=(e,t=!1)=>{const n="watchedValue"in e?e.watchedValue:void 0,o="defaultValue"in e?e.defaultValue:e.watchedValue.value(),[a,s]=(0,r.useState)(n?n.value():o);return(t?r.useLayoutEffect:r.useEffect)(()=>{if(n){s(n.value());const e=e=>s(e);return n.subscribe(e),()=>n.unsubscribe(e)}return()=>{}},[n]),a}},84877:(e,t,n)=>{"use strict";n.d(t,{MatchMediaMap:()=>s});var r=n(59496),o=n(66783),a=n.n(o);class s 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!a()(e,this.props)||(!a()(t.rules,this.state.rules)||!a()(t.matches,this.state.matches))}componentDidMount(){this._migrate(null,this.state.queries)}componentDidUpdate(e,t){a()(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(a()(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}},1109:(e,t,n)=>{"use strict";n.d(t,{Separator:()=>s});var r=n(59496),o=n(97754),a=n(91626);function s(e){return r.createElement("div",{className:o(a.separator,e.className)})}},61074:(e,t,n)=>{"use strict";n.d(t,{Spinner:()=>s});var r=n(59496),o=n(97754),a=n(33134);n(24780);function s(e){const t=o(e.className,"tv-spinner","tv-spinner--shown","tv-spinner--size_"+a.spinnerSizeMap[e.size||a.DEFAULT_SIZE]);return r.createElement("div",{className:t,style:e.style,role:"progressbar"})}},10381:(e,t,n)=>{"use strict";n.d(t,{ToolWidgetCaret:()=>i});var r=n(59496),o=n(97754),a=n(9745),s=n(40367),l=n(81268);function i(e){const{dropped:t,className:n}=e;return r.createElement(a.Icon,{className:o(n,s.icon,{[s.dropped]:t}),icon:l})}},81268: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>'},64360:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="none"><path stroke="currentcolor" stroke-width="1.2" d="M17 21l-7.5-7.5L17 6"/></svg>'},29601: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>'},37257:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 17 17" width="17" height="17" fill="currentColor"><path d="m.58 1.42.82-.82 15 15-.82.82z"/><path d="m.58 15.58 15-15 .82.82-15 15z"/></svg>'},70029: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>'},72802: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>'},5639: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>'},88142: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>'},20832: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>'},19586: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>'},21740: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>'},43088: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>'},38927: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>'},56584: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>'}}]);