"use strict";(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[76103],{607423:(e,t,o)=>{o.d(t,{isNativeUIInteraction:()=>i});var n=o(591800);function r(e){if("INPUT"===e.tagName){const t=e.type;return"text"===t||"email"===t||"number"===t||"password"===t||"search"===t||"tel"===t||"url"===t}return"TEXTAREA"===e.tagName||e.isContentEditable}function i(e,t){if(!t)return!1;const o=255&e;if(27===o||o>>>4==7)return!1;switch(e^o){case n.Modifiers.Alt:return(38===o||40===o)&&"SELECT"===t.tagName||r(t);case n.Modifiers.Alt+n.Modifiers.Shift:return r(t);case n.Modifiers.Mod:if(67===o||!n.isMacKeyboard&&45===o){const e=t.ownerDocument&&t.ownerDocument.getSelection();if(e&&!e.isCollapsed)return!0}return r(t);case n.Modifiers.Mod+n.Modifiers.Shift:return o>=33&&o<=40&&r(t);case n.Modifiers.Shift:case 0:return 9===o?!(!t.ownerDocument||t===t.ownerDocument.body||t===t.ownerDocument.documentElement):(!function(e){if("BUTTON"===e.tagName)return!0;if("INPUT"===e.tagName){const t=e.type;if("submit"===t||"button"===t||"reset"===t||"checkbox"===t||"radio"===t)return!0}return!1}(t)||13===o||32===o||9===o)&&("form"in t||t.isContentEditable)}return!1}},745269:(e,t,o)=>{o.d(t,{color:()=>r,dur:()=>n});const n=350;const r={black70:"#4A4A4A",black80:"#535353"}},673747:(e,t,o)=>{o.d(t,{hide:()=>g,showOnElement:()=>h});var n=o(778785),r=o(112539),i=o(630112),s=o(650151),l=o(779527),c=o(799786);let u=!1,a=null,d=null;n.mobiletouch||document.addEventListener("mouseover",(function(e){var t;if(null===(t=e.sourceCapabilities)||void 0===t?void 0:t.firesTouchEvents)return;const o=e.target,n=e.currentTarget,r=function(e,t,o){const n=[];for(;e&&e!==t;)e.classList&&e.classList.contains(o)&&n.push(e),e=e.parentElement||_(e.parentNode);return n}(o,n,"apply-common-tooltip"),i=()=>{d&&(d.destroy(),d=null)};for(const t of r){if("buttons"in e){if(1&e.buttons)continue}else if(1===e.which)continue;const o=()=>h(t);if(o()){const e=e=>{e.target instanceof Element&&e.target.contains(t)&&n(null,!0)},n=(r,s=!1)=>{t.removeEventListener("common-tooltip-update",o),t.removeEventListener("mouseleave",n),t.removeEventListener("mousedown",n),document.removeEventListener("scroll",e,{capture:!0}),i(),g(s)};t.addEventListener("common-tooltip-update",o),t.addEventListener("mouseleave",n),t.addEventListener("mousedown",n),document.addEventListener("scroll",e,{capture:!0}),null===d&&(d=(0,c.createGroup)({desc:"Tooltip"}),d.add({desc:"Hide",hotkey:27,handler:n}));break}}}),!0);const m=new MutationObserver((()=>{if(a&&a.options.target){let e;e="isConnected"in a.options.target?a.options.target.isConnected:document.body.contains(a.options.target),e||g()}})),h=(e,t={})=>{const{content:o,...n}=v(t),r=l.getDataFromTarget(e),i=Object.assign(r,n);return"none"!==o.type&&(i.content=o),!("none"===i.content.type&&!i.hotkey)&&(i.target=e,p(i),!0)},p=e=>{const t=v(e),o=l.getTooltip(t);if(a={options:t,element:o},(0,i.setTooltip)(o),(0,r.clearSchedule)(),!u)return l.hideTooltip(o),void(0,r.scheduleRender)((()=>y(o)),function(e){ return"number"!=typeof e.tooltipDelay||isNaN(e.tooltipDelay)?500:e.tooltipDelay}(t));const{tooltipDebounce:n}=e;"number"!=typeof n||isNaN(n)?y(o):(0,r.scheduleRender)((()=>y(o)),n)};function f(){(0,i.empty)(),u=!1,a=null}const g=e=>{if((0,r.clearSchedule)(),m.disconnect(),!a)return;if(!e&&!u)return;const{element:t,options:o}=a,n=()=>{t.removeEventListener("mouseleave",n),l.hideTooltip(t),e?f():(0,r.scheduleRemove)((()=>{f()}),250)};o.tooltipHideDelay?(0,r.scheduleHide)((()=>{t.querySelector(":hover")?t.addEventListener("mouseleave",n):n()}),o.tooltipHideDelay):n()};function y(e){const{options:t}=(0,s.ensureNotNull)(a);if(l.setStyle(e,t),l.showTooltip(e),m.observe(document,{childList:!0,subtree:!0}),u=!0,t.forceHideOnMove){const e=()=>{document.removeEventListener("mousemove",e),document.removeEventListener("touchmove",e),g()};document.addEventListener("mousemove",e),document.addEventListener("touchmove",e)}}function _(e){return e&&(e.nodeType===Node.ELEMENT_NODE?e:null)}function v(e){if(function(e){return"content"in e}(e))return e;const{inner:t,html:o,text:n,...r}=e;let i={type:"none"};return t&&(i={type:"element",data:t}),n&&(i={type:o?"html":"text",data:n}),{content:i,...r}}},16899:(e,t,o)=>{o.d(t,{TickerItemAbstract:()=>h});var n=o(673747);function r(e,t="x"){let o=!1;return"x"!==t&&"both"!==t||(o=o||e.offsetWidth{document.addEventListener("mouseenter",(e=>{const t=e.target;if(t instanceof HTMLElement&&t.matches(".apply-overflow-tooltip")){let e="x";if(t.matches(".apply-overflow-tooltip--direction_both")?e="both":t.matches(".apply-overflow-tooltip--direction_y")&&(e="y"),t.matches(".apply-overflow-tooltip--check-children-recursively")){if(!i(t,e))return}else if(t.matches(".apply-overflow-tooltip--check-children")){let o=!1;const n=t.children;for(let t=0;t(t.nodeType===Node.TEXT_NODE&&e.push(t.textContent||""),e)),[]).join("").trim()),(0,n.showOnElement)(t,{text:s});const l=()=>{(0,n.hide)(),["mouseleave","mousedown"].forEach((e=>t.removeEventListener(e,l)))};["mouseleave","mousedown"].forEach((e=>t.addEventListener(e,l)))}}),!0)}));var s=o(201089),l=o(327034),c=o(903972),u=o(707957),a=o(31341),d=o(17966);const m=(0,s.getLogger)("WidgetTicker");class h{constructor(e,t,o){this.onInit=new u.Delegate,this.onComplete=new u.Delegate,this.onError=new u.Delegate,this._quoteTickerComplete=null,this._isRunning=!1,this._prevQuoteSymbol=null,this._el=t||document.createElement("a"),this._symbolData=e,this._options=o||{},(0,c.validateSymbolData)(e)?(this.render(), this.start()):m.logError("symbolData is not valid")}render(){this._el.classList.add(this._getClass()),this._el.innerHTML=this._getView(),this._setTitle(),this._setLink()}start(){this._isRunning||(this._startQuoteTicker(),this._isRunning=!0)}stop(){this._isRunning&&(this._stopQuoteTicker(),this._isRunning=!1)}getElement(){return this._el}changeSymbol(e){const t=e.includes(":")?{proName:e}:{shortName:e};this._prevQuoteSymbol=this._getSymbolName(),this._symbolData=t,this._setTitle(),this._setLink(),this.stop(),this.start()}quoteTicker(){return this._quoteTicker}_getElementClass(e){return this._getClass()+"__"+e}_getSymbolName(){return this._symbolData.proName||this._symbolData.shortName}_renderSymbolLogo(e,t){const o=this._el.querySelector(".js-header-icon"),n=0===e.length?this._getPlaceholderLetter():void 0;o&&this._setSymbolLogoHtml(o,e,t,n)}_getPlaceholderLetter(){const e=this._symbolData.proName,t=e&&e.split(":")[1];return(this._symbolData.title||this._symbolData.description||t||""||" ")[0]}_setSymbolLogoHtml(e,t,o,n){if(t.length>0||void 0!==n){const r=(0,d.getCircleLogoAnyHtml)({logoUrls:t,size:o,className:this._getElementClass("icon"),placeholderLetter:n});e.innerHTML=r}else e.innerHTML=""}_setTitle(){const e=this._getElTitle();if(!e)return;const t=this._symbolData.title||this._symbolData.description||""||this._symbolData.shortName||this._symbolData.proName||"",o=(0,a.detectAutoDirection)(t);o&&(e.dir=o),e.textContent=t}_setLink(){if(!(this._el instanceof HTMLAnchorElement))return;const e=this._symbolData.linkPage;e&&(this._el.href=e),this._options.isEmbedWidget&&(this._el.target="_blank",this._el.rel="external noopener")}_startQuoteTicker(){if(!this._quoteTicker)return void this._createQuoteTicker();const e=this._getSymbolName();this._prevQuoteSymbol!==e?(this._destroyQuoteTicker(),this._createQuoteTicker()):this._quoteTicker.enable()}_stopQuoteTicker(){this._quoteTicker&&(this._quoteTicker.disable(),this._quoteTickerComplete=null)}_createQuoteTicker(){const e=this._getSymbolName(),t=this._getTickerOptions(),o=t.initedHook,n=t.setStateHook;this._quoteTickerComplete=null,this._quoteTicker=new l.QuoteTicker(e,this._el,{noSuchSymbolHook:()=>this.onError.fire("no_symbol"),permissionDeniedHook:()=>this.onError.fire("permission_denied"),...t,initedHook:(...e)=>{null==o||o(...e),this.onInit.fire(...e)},setStateHook:(e,t,o)=>{null==n||n(e,t,o),o&&null===this._quoteTickerComplete&&(this._quoteTickerComplete=o,this.onComplete.fire())}})}_destroyQuoteTicker(){this._stopQuoteTicker(),delete this._quoteTicker}_getElTitle(){return this._el.querySelector(`.${this._getElementClass("title")}`)}}},903972:(e,t,o)=>{function n(e){return Boolean(e)&&("string"==typeof e.proName||"string"==typeof e.shortName)}o.d(t,{validateSymbolData:()=>n})},626333:(e,t,o)=>{function n(e,t=window){const o="theme-"+e,n=t.document.documentElement.classList;for(const e of Array.from(n))e.startsWith("theme-")&&e!==o&&n.remove(e);n.add(o)}o.d(t,{applyTheme:()=>n})},331633:(e,t,o)=>{o.d(t,{setTheme:()=>s});var n=o(401580),r=o(626333) ;const i=new n.WatchedValue;function s(e){i.setValue(e)}i.subscribe((e=>{(0,r.applyTheme)(e,window)}))},607546:(e,t,o)=>{o.d(t,{getLogoUrlsHook:()=>i});var n=o(849204);const r=(0,n.getLogoUrlResolver)();function i(e,t){let o=!1;return(i,l,c)=>{const u=i["currency-logoid"]&&i["base-currency-logoid"];if(!o&&(i.logoid||u||c)){o=!0;const l=function(e){if(2!==e.length)return e;if(function(e){return e.some((e=>s(e)))}(e)&&!function(e){return e.some((e=>e.includes("country")&&!s(e)))}(e))return e.filter((e=>!s(e)));return e}(function(e,t=n.LogoSize.Medium){const o=e.logoid,i=e["base-currency-logoid"],s=e["currency-logoid"],l=o&&r.getSymbolLogoUrl(o,t);if(l)return[l];const c=i&&r.getSymbolLogoUrl(i,t),u=s&&r.getSymbolLogoUrl(s,t);return c&&u?[c,u]:c?[c]:u?[u]:[]}({logoid:i.logoid,"base-currency-logoid":i["base-currency-logoid"],"currency-logoid":i["currency-logoid"]},t));e(l)}}}function s(e){return e.includes("country/US")}},31341:(e,t,o)=>{o.d(t,{detectAutoDirection:()=>a,forceLTRStr:()=>l,isRtl:()=>n,stripLTRMarks:()=>s});o(64531);const n=()=>"rtl"===window.document.dir,r="‬",i=new RegExp("‎|‪|‫|‬","g");function s(e){return""!==e&&n()&&null!=e?e.replace(i,""):e}function l(e){return""!==e&&n()&&null!=e?"‪"+e+r:e}const c=/[^\u0000-\u0040\u005B-\u0060\u007B-\u00BF\u00D7\u00F7\u02B9-\u02FF\u2000-\u200E\u2010-\u2029\u202C\u202F-\u2BFF]/,u=/[\u0590-\u07FF\u200F\u202B\u202E\uFB1D-\uFDFD\uFE70-\uFEFC]/;function a(e){const t=c.exec(e);return t?u.test(t[0])?"rtl":"ltr":""}},81979:(e,t,o)=>{o.d(t,{color:()=>n.color,dur:()=>n.dur});var n=o(745269)},777466:(e,t,o)=>{function n(e){e.preventDefault()}o.d(t,{preventDefault:()=>n})},702269:(e,t,o)=>{function n(e){return e.replace("{{shortName}}","{tvsymbol}").replace("{{proName}}","{tvprosymbol}").replace("{{symbol}}","{tvsymbol}").replace("{{exchange}}","{tvexchange}")}o.d(t,{replaceOldPlaceholders:()=>n})},194058:(e,t,o)=>{o.d(t,{makeWidgetSymbolLink:()=>i});var n=o(702269),r=o(503344);function i(e){const{symbol:t,customUrl:o,utmInfo:i,path:s,typespecs:l}=e;let c,u;return t.includes(":")?[u,c]=t.split(":"):c=t,o?(0,r.makeTemplateSymbolUrl)((0,n.replaceOldPlaceholders)(o),{proName:t}):(0,r.makeSymbolPageUrl)({shortName:c,exchange:u,typespecs:l},i,void 0,s)}}}]);