(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[84431,78775,35698,79274],{128415:e=>{e.exports={"tv-spinner__container-rotate":"tv-spinner__container-rotate-aLqboHuu"}},129592:(e,t,i)=>{"use strict";i.d(t,{createGroup:()=>a,keyboardPressedKeysState:()=>l,pressedKeys:()=>s,registerWindow:()=>d,unregisterWindow:()=>u});var n=i(347136),r=i(615559);i(591800);const o=new n.ActionManager,s=o.pressedKeys(),l=o.keyboardPressedKeysState();function a(e){return new r.ActionGroup(o,e)}function d(e){o.listen(e)}function u(e){o.unlisten(e)}},685023:(e,t,i)=>{"use strict";i.d(t,{DEFAULT_SIZE:()=>n,spinnerSizeMap:()=>r});const n="large",r={mini:"xsmall",xxsmall:"xxsmall",xsmall:"xsmall",small:"small",medium:"medium",large:"large"}},500521:(e,t,i)=>{"use strict";e.exports.pushChartPage=async function(e){const{default:t}=await Promise.all([i.e(69749),i.e(5657),i.e(14260),i.e(8954),i.e(88430),i.e(85686),i.e(60678),i.e(45340),i.e(48691),i.e(25977),i.e(90940),i.e(47484),i.e(74823),i.e(34629)]).then(i.t.bind(i,55244,23)),n=new t.ChartPage(e);TradingView.historyManager.push(n)}},438874:(e,t,i)=>{"use strict";function n(){return window.SCREENER_HOST||"https://scanner.tradingview.com"}function r(e,t){const i=n();return t?`${i}/${t}/`:1===e.length?`${i}/${e[0]}/`:`${i}/global/`}function o(e,t,i,r){const o=n(),s={symbol:e,fields:t};i&&(s.no_404="true"),r&&(s.price_conversion="disabled");const l=new URL(`${o}/symbol`);return Object.keys(s).forEach((e=>{l.searchParams.append(e,s[e])})),l.toString()}i.d(t,{getBackendUrl:()=>r,getSymbolDataUrl:()=>o})},607436:(e,t,i)=>{"use strict";i.d(t,{DEFAULT_SIZE:()=>n.DEFAULT_SIZE,spinnerSizeMap:()=>n.spinnerSizeMap});var n=i(685023)},941285:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Spinner:()=>l,renderSpinnerTemplate:()=>o});i(128415);var n=i(571690),r=i(607436);function o(e=""){return`
`}const s=(0,n.parseHtmlElement)(o());class l{constructor(e){this._shown=!1,this._el=s.cloneNode(!0),this.setSize(r.spinnerSizeMap[e||r.DEFAULT_SIZE])}spin(e){return this._el.classList.add("tv-spinner--shown"),void 0===this._container&&(this._container=e,void 0!==e&&e.appendChild(this._el)),this._shown=!0,this}stop(e){return e&&void 0!==this._container&&this._container.removeChild(this._el),this._el&&this._el.classList.remove("tv-spinner--shown"),this._shown=!1,this}setStyle(e){return Object.keys(e).forEach((t=>{const i=e[t];void 0!==i&&this._el.style.setProperty(t,i)})),this}style(){return this._el.style}setSize(e){const t=void 0!==e?`tv-spinner--size_${e}`:"";return this._el.className=`tv-spinner ${t} ${this._shown?"tv-spinner--shown":""}`,this}getEl(){return this._el}destroy(){this.stop(),delete this._el,delete this._container}}},975420:(e,t,i)=>{"use strict";i.d(t,{trackTiming:()=>u});var n=i(251954),r=i(261030),o=i(588948),s=i(638456),l=i(691805);let a=!1;function d(){if(a)return;(0,o.updateInitData)();const e=(0,o.getInitData)();if(!e.gaId)return void(window.gtag=()=>{});a=!0,(0,l.appendScript)(`https://www.googletagmanager.com/gtag/js?id=${(0,
o.getInitData)().gaId}`),window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},window.gtag("js",new Date);const t={anonymize_ip:!0};window.TVD&&(t.app_name="TVD",t.app_version=(0,s.desktopAppVersion)()),e.gaVars&&window.gtag("set",e.gaVars),window.gtag("consent","default",{analytics_storage:(0,r.getCookieSetting)(r.CookieSettings.Analytics)?"granted":"denied"}),window.gtag("config",e.gaId,t),n.subscribe(r.cookieSettingsChangeEvent,((e,t)=>{e===r.CookieSettings.Analytics&&window.gtag("consent","update",{analytics_storage:t?"granted":"denied"})}),null)}function u(e,t,i,n){d(),window.gtag("event","timing_complete",{name:t,value:i,event_category:e,event_label:n})}},261030:(e,t,i)=>{"use strict";i.d(t,{CookieSettings:()=>n,cookieSettingsChangeEvent:()=>d,getCookieSetting:()=>b});var n,r=i(251954),o=i(268222),s=i(49437),l=i(66974),a=i(16188);!function(e){e.Analytics="analytics",e.Advertising="advertising"}(n||(n={}));const d="cookie_settings_changed",u=((0,o.createDeferredPromise)(),window.location.hostname.split(".")),c=(0,l.isLocal)()?"":"."+u.slice(1,u.length).join("."),h="cookieBanner",p=(0,l.isProd)()?"cookiePrivacyPreferenceBannerProduction":"cookiePrivacyPreferenceBannerLocal",m="accepted",f="notApplicable",v="cookiesSettings",g="localCookiesSettings",_="cookiePrivacyPreferenceBanner",y={[n.Analytics]:!1,[n.Advertising]:!1};function I(){return s.TVLocalStorage.removeItem(h)}function x(e){return s.TVLocalStorage.getItem(e)===m||s.TVLocalStorage.getItem(e)===f}function w(e){a.set(p,e,3653,"/",c)}function T(e,t){y[e]=t,a.set((0,l.isProd)()?v:g,JSON.stringify(y),3653,"/",c),r.emit(d,e,t)}function b(e){return y[e]}function S(){return s.TVLocalStorage.removeItem(_)}!function(){const e=a.get((0,l.isProd)()?v:g),t=s.TVLocalStorage.getItem(_),i=s.TVLocalStorage.getItem(v);if(e){t&&i&&(S(),s.TVLocalStorage.removeItem(v)),x(h)&&I();try{const t=JSON.parse(e);y[n.Analytics]=(null==t?void 0:t[n.Analytics])||!1,y[n.Advertising]=(null==t?void 0:t[n.Advertising])||!1}catch(e){}}else if(x(h)&&(T(n.Analytics,!0),T(n.Advertising,!0),w(m),I()),t&&i){const e=JSON.parse(i);w(t),T(n.Analytics,null==e?void 0:e[n.Analytics]),T(n.Advertising,null==e?void 0:e[n.Advertising]),S(),s.TVLocalStorage.removeItem(v)}}()},461909:(e,t,i)=>{"use strict";function n(e){if(void 0===e)return null;const t=e.match(/(delayed_streaming)_(\d+)/);return null===t?null:{mode:t[1],interval:parseInt(t[2])}}function r(e){const t=n(e.update_mode);return null===t||(e.update_mode=t.mode,e.update_mode_seconds=t.interval),e}i.r(t),i.d(t,{normalizeUpdateMode:()=>r,parseUpdateMode:()=>n})},207678:(e,t,i)=>{"use strict";i.d(t,{breakpoints:()=>n,mobileFirstBreakpoints:()=>r,mobileFirstLegacyBreakpoints:()=>o});const n={desktop:1/0,desktopHd:1919,phone:767,"phone-vertical":479,tablet:1019},r={base:0,"media-mf-phone-vertical":320,"media-mf-phone-landscape":568,"media-mf-tablet-vertical":768,"media-mf-tablet-landscape":1024,"media-mf-laptop":1280,"media-mf-desktop-medium":1440,"media-mf-desktop-large":1920,
"media-mf-desktop-extra-large":2560},o={"media-mf-legacy-phone-vertical":330,"media-mf-legacy-phone":480,"media-mf-legacy-notebook":1020,"media-mf-legacy-desktop-medium":1480,"media-mf-legacy-desktop":1531}},76107:(e,t,i)=>{"use strict";i.d(t,{getCSSProperty:()=>l,getCSSPropertyNumericValue:()=>a,getContentWidth:()=>o,getScrollbarWidth:()=>n,matchMediaMinMax:()=>r,setStyle:()=>s});const n=(()=>{let e;return()=>{var t;if(void 0===e){const i=document.createElement("div"),n=i.style;n.visibility="hidden",n.width="100px",n.msOverflowStyle="scrollbar",document.body.appendChild(i);const r=i.offsetWidth;i.style.overflow="scroll";const o=document.createElement("div");o.style.width="100%",i.appendChild(o);const s=o.offsetWidth;null===(t=i.parentNode)||void 0===t||t.removeChild(i),e=r-s}return e}})();function r(e,t){return t===1/0?window.matchMedia(`(min-width: ${e}px)`):window.matchMedia(`(min-width: ${e}px) and (max-width: ${t}px)`)}function o(e){return a(e,"width")-a(e,"padding-left")-a(e,"padding-right")}function s(e,t,i){null!==e&&e.style.setProperty(t,i)}function l(e,t){return getComputedStyle(e,null).getPropertyValue(t)}function a(e,t){return parseInt(l(e,t))}},850775:(e,t,i)=>{"use strict";i.d(t,{mediaState:()=>d});var n=i(685459),r=i.n(n),o=i(49336),s=i(207678),l=i(76107);class a extends(r()){constructor(){super(),this.width=0,this.height=0,this.device=null,this.breakpoints=s.breakpoints,this._checkDevice(),window.addEventListener("resize",this._checkDevice),Object.entries(s.breakpoints).sort((([e,t],[i,n])=>t-n)).forEach((([e,t],i,n)=>{let r;if(0!==i){const[,e]=n[i-1];r=e+1}else r=0;const o=(0,l.matchMediaMinMax)(r,t);o.matches&&this._setNewDevice(e),o.addListener((t=>{t.matches&&(this._checkDevice(),this._setNewDevice(e))}))})),(0,o.whenDocumentReady)(this._checkDevice.bind(this)),this.isPhoneSizeDevice.bind(this)}isPhoneSizeDevice(){return"phone"===this.device||"phone-vertical"===this.device}_checkDevice(){this.width=window.innerWidth,this.height=window.innerHeight}_setNewDevice(e){const t=this.device;this.device=e,this.trigger("changeDevice",[e,t])}}const d=new a},61499:(e,t,i)=>{"use strict";var n;i.d(t,{StdTheme:()=>n}),function(e){e.Light="light",e.Dark="dark"}(n||(n={}))},226722:(e,t,i)=>{"use strict";i.d(t,{TVXWindowEvents:()=>s});i(586463);var n=i(201089),r=i(49437);const o=(0,n.getLogger)("XWindowEvents");var s;!function(e){const t="tvxwevents.",i={};let n;window.BroadcastChannel?(n=new BroadcastChannel("tvxwevents"),n.addEventListener("message",(function(e){const{data:{event:t,value:n}}=e;i[t]&&i[t].forEach((e=>{e(n)}))})),function(){const e=[],i=performance.now();for(let i=0;i{t(e.newValue)}));r.TVLocalStorage.removeItem(o)})),e.on=function(e,t){i[e]||(i[e]=[]),i[e].push(t)},e.off=function(e,t){if(!i[e])return;const n=i[e].indexOf(t);-1!==n&&(1===i[e].length?delete i[e]:i[e].splice(n,1))},e.emit=function(e,i=Date.now()){try{n?n.postMessage({event:e,value:i}):r.TVLocalStorage.setItem(t+e,i.toString())}catch(e){o.logError(e.message)}}}(s||(s={}))},279274:(e,t,i)=>{e.exports=[{value:"",name:"All Exchanges",desc:i.tf(null,void 0,i(18383)),flag:"",country:"",group:"AllExchanges",providerId:""},{value:"BISWAP",name:"Biswap v2 (BNB chain)",desc:i.tf(null,void 0,i(395526)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"biswap"},{value:"BITAZZA",name:"Bitazza",desc:i.tf(null,void 0,i(616902)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"bitazza"},{value:"BITHUMB",name:"Bithumb",desc:i.tf(null,void 0,i(906984)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"bithumb"},{value:"BITKUB",name:"BITKUB",desc:i.tf(null,void 0,i(973073)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"bitkub"},{value:"BITRUE",name:"Bitrue",desc:i.tf(null,void 0,i(921076)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"bitrue"},{value:"BITMART",name:"Bitmart",desc:i.tf(null,void 0,i(193921)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"bitmart"},{value:"COINMETRICS",name:"Coin Metrics",desc:i.tf(null,void 0,i(476804)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"coinmetrics"},{value:"MEXC",name:"MEXC Global",desc:i.tf(null,void 0,i(42257)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"mexc"},{value:"GATEIO",name:"Gate.io",desc:i.tf(null,void 0,i(434055)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"gateio"},{value:"HTX",name:"HTX",desc:i.tf(null,void 0,i(380187)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"htx"},{value:"796",name:"796",desc:i.tf(null,void 0,i(883762)),flag:"bitcoin",group:"Cryptocurrency",hideInSymbolSearch:!0,country:"",providerId:""},{value:"DERIBIT",name:"Deribit",desc:i.tf(null,void 0,i(864518)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"deribit"},{value:"DEFILLAMA",name:"Defi Llama",desc:i.tf(null,void 0,i(70240)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"defillama"},{value:"GLASSNODE",name:"Glassnode",desc:i.tf(null,void 0,i(934859)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"glassnode"},{value:"OKX",name:"OKX",desc:i.tf(null,void 0,i(308995)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"okx"},{value:"ORCA",name:"Orca (Solana)",desc:i.tf(null,void 0,i(48250)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"orca"},{value:"OSMOSIS",name:"Osmosis",desc:i.tf(null,void 0,i(220606)),flag:"bitcoin",group:"Cryptocurrency",country:"",
providerId:"osmosis"},{value:"PANGOLIN",name:"Pangolin v2 (Avalanche)",desc:i.tf(null,void 0,i(802948)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"pangolin"},{value:"PANCAKESWAP",name:"PancakeSwap v2 (BNB chain)",desc:i.tf(null,void 0,i(587129)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"pancakeswap"},{value:"PANCAKESWAP3BSC",name:"PancakeSwap v3 (BNB chain)",desc:i.tf(null,void 0,i(370173)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"pancakeswap3"},{value:"PANCAKESWAP3ETH",name:"PancakeSwap v3 (Ethereum)",desc:i.tf(null,void 0,i(935239)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"pancakeswap3"},{value:"PIONEX",name:"Pionex",desc:i.tf(null,void 0,i(392381)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"pionex"},{value:"PYTH",name:"Pyth",desc:i.tf(null,void 0,i(403221)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"pyth"},{value:"RAYDIUM",name:"Raydium (Solana)",desc:i.tf(null,void 0,i(122147)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"raydium"},{value:"SPOOKYSWAP",name:"SpookySwap v2 (Fantom)",desc:i.tf(null,void 0,i(245708)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"spookyswap"},{value:"WHITEBIT",name:"WhiteBIT",desc:i.tf(null,void 0,i(592774)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"whitebit"},{value:"WOONETWORK",name:"WOO",desc:i.tf(null,void 0,i(839751)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"woonetwork"},{value:"DYDX",name:"dYdX",desc:i.tf(null,void 0,i(105453)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"dydx"},{value:"VOLMEX",name:"Volmex",desc:i.tf(null,void 0,i(620656)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"volmex"},{value:"ZOOMEX",name:"Zoomex",desc:i.tf(null,void 0,i(825619)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"zoomex"},{value:"ADX",name:"ADX",desc:i.tf(null,void 0,i(936934)),flag:"ae",group:"Middle East / Africa",country:"ae",providerId:"",searchTerms:[i.tf(null,void 0,i(975308)),i.tf(null,void 0,i(287916))]},{value:"DFM",name:"DFM",desc:i.tf(null,void 0,i(535232)),flag:"ae",group:"Middle East / Africa",country:"ae",providerId:"",searchTerms:[i.tf(null,void 0,i(975308)),i.tf(null,void 0,i(287916))]},{value:"NASDAQDUBAI",name:"NASDAQ",desc:i.tf(null,void 0,i(229359)),flag:"ae",group:"Middle East / Africa",country:"ae",priorityInGroup:1,providerId:"",searchTerms:[i.tf(null,void 0,i(975308)),i.tf(null,void 0,i(287916))]},{value:"LSE",name:"LSE",desc:i.tf(null,void 0,i(454623)),flag:"uk",group:"Europe",country:"uk",providerId:"",searchTerms:[i.tf(null,void 0,i(846792)),i.tf(null,void 0,i(606994))]},{value:"LME",name:"LME",desc:i.tf(null,void 0,i(21353)),flag:"uk",group:"Europe",country:"uk",providerId:"",searchTerms:[i.tf(null,void 0,i(846792)),i.tf(null,void 0,i(606994))]},{value:"LSIN",name:"LSIN",desc:i.tf(null,void 0,i(249934)),flag:"uk",group:"Europe",country:"uk",providerId:"",searchTerms:[i.tf(null,void 0,i(846792)),i.tf(null,void 0,i(606994))]},{
value:"TURQUOISE",name:"Turquoise",desc:i.tf(null,void 0,i(258419)),flag:"uk",group:"Europe",country:"uk",providerId:"",searchTerms:[i.tf(null,void 0,i(846792)),i.tf(null,void 0,i(606994))]},{value:"FTSE",name:"FTSE",desc:i.tf(null,void 0,i(749711)),flag:"uk",group:"Europe",country:"uk",providerId:"",searchTerms:[i.tf(null,void 0,i(846792)),i.tf(null,void 0,i(606994))]},{value:"EUREX",name:"EUREX",desc:i.tf(null,void 0,i(376029)),flag:"europe",group:"Europe",country:"eu",providerId:""},{value:"MGEX",name:"MGEX",desc:i.tf(null,void 0,i(14406)),flag:"usa",hideInSymbolSearch:!0,group:"North America",country:"us",providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"NASDAQ",name:"NASDAQ",desc:i.tf(null,void 0,i(227691)),flag:"usa",group:"North America",country:"us",priorityInGroup:1,providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"NYSE",name:"NYSE",desc:i.tf(null,void 0,i(872667)),flag:"usa",group:"North America",country:"us",priorityInGroup:2,providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"AMEX",name:"Arca",desc:i.tf(null,void 0,i(468841)),flag:"usa",group:"North America",country:"us",priorityInGroup:3,providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"OTC",name:"OTC",desc:i.tf(null,void 0,i(448920)),flag:"usa",group:"North America",country:"us",priorityInGroup:4,providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"DJ",name:"DJ",desc:i.tf(null,void 0,i(623778)),flag:"usa",group:"North America",country:"us",priorityInGroup:5,providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"SP",name:"SP",desc:i.tf(null,void 0,i(662397)),flag:"usa",group:"North America",country:"us",priorityInGroup:6,providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"CBOE",name:"CBOE",desc:i.tf(null,void 0,i(1596)),flag:"usa",group:"North America",country:"us",priorityInGroup:7,providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"FINRABTDS",name:"FINRA BTDS",desc:i.tf(null,void 0,i(778257)),flag:"usa",group:"North America",country:"us",providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"FINRAATDS",name:"FINRA ATDS",desc:i.tf(null,void 0,i(400199)),flag:"usa",group:"North America",country:"us",providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"CBOEEU",name:"CBOE EU",desc:i.tf(null,void 0,i(975674)),flag:"europe",group:"Europe",country:"eu",providerId:""},{value:"CBOT",name:"CBOT",desc:i.tf(null,void 0,i(581563)),flag:"usa",group:"North America",country:"us",priorityInGroup:8,providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"CME",name:"CME GLOBEX",desc:i.tf(null,void 0,i(425193)),flag:"usa",group:"North America",country:"us",priorityInGroup:9,providerId:"",
searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"COMEX",name:"COMEX",desc:i.tf(null,void 0,i(584533)),flag:"usa",group:"North America",country:"us",priorityInGroup:10,providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"NYMEX",name:"NYMEX",desc:i.tf(null,void 0,i(336499)),flag:"usa",group:"North America",country:"us",priorityInGroup:11,providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"ICEUS",name:"ICEUS",desc:i.tf(null,void 0,i(403509)),flag:"usa",group:"North America",country:"us",priorityInGroup:12,providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"FAIRX",name:"FairX",desc:i.tf(null,void 0,i(187464)),flag:"usa",group:"North America",country:"us",priorityInGroup:13,providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"CSE",name:"CSE",desc:i.tf(null,void 0,i(465782)),flag:"canada",group:"North America",country:"ca",priorityInGroup:13,providerId:"",searchTerms:[i.tf(null,void 0,i(280206))]},{value:"NEO",name:"NEO",desc:i.tf(null,void 0,i(278436)),flag:"canada",group:"North America",country:"ca",priorityInGroup:14,providerId:"",searchTerms:[i.tf(null,void 0,i(280206))]},{value:"TSX",name:"TSX",desc:i.tf(null,void 0,i(949042)),flag:"canada",group:"North America",country:"ca",priorityInGroup:15,providerId:"",searchTerms:[i.tf(null,void 0,i(280206))]},{value:"TSXV",name:"TSXV",desc:i.tf(null,void 0,i(12815)),flag:"canada",group:"North America",country:"ca",priorityInGroup:16,providerId:"",searchTerms:[i.tf(null,void 0,i(280206))]},{value:"MOEX",name:"MOEX",desc:i.tf(null,void 0,i(73467)),flag:"russia",group:"Europe",country:"ru",providerId:"",searchTerms:[i.tf(null,void 0,i(238201))]},{value:"MYX",name:"MYX",desc:i.tf(null,void 0,i(887964)),flag:"malaysia",group:"Asia / Pacific",country:"my",providerId:"",searchTerms:[i.tf(null,void 0,i(622622))]},{value:"FTSEMYX",name:"FTSE",desc:i.tf(null,void 0,i(40698)),flag:"malaysia",group:"Asia / Pacific",country:"my",providerId:"",searchTerms:[i.tf(null,void 0,i(622622))]},{value:"HOSE",name:"HOSE",desc:i.tf(null,void 0,i(34416)),flag:"vietnam",group:"Asia / Pacific",country:"vn",providerId:"",searchTerms:[i.tf(null,void 0,i(450049))]},{value:"HNX",name:"HNX",desc:i.tf(null,void 0,i(653194)),flag:"vietnam",group:"Asia / Pacific",country:"vn",providerId:"",searchTerms:[i.tf(null,void 0,i(450049))]},{value:"UPCOM",name:"HNX UPCoM",desc:i.tf(null,void 0,i(696591)),flag:"vietnam",group:"Asia / Pacific",country:"vn",providerId:"",searchTerms:[i.tf(null,void 0,i(450049))]},{value:"CSELK",name:"CSE",desc:i.tf(null,void 0,i(429971)),flag:"sri_lanka",group:"Asia / Pacific",country:"lk",providerId:"",searchTerms:[i.tf(null,void 0,i(567835))]},{value:"BITSTAMP",name:"Bitstamp",desc:i.tf(null,void 0,i(42285)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"bitstamp"},{value:"ACTIVTRADES",name:"ActivTrades",desc:i.tf(null,void 0,i(34342)),flag:"forex",group:"Forex",country:"",
providerId:"activtrades"},{value:"AFTERPRIME",name:"Afterprime",desc:i.tf(null,void 0,i(268986)),flag:"forex",group:"Forex",country:"",providerId:"afterprime"},{value:"BLACKBULL",name:"BlackBull Markets",desc:i.tf(null,void 0,i(802620)),flag:"forex",group:"Forex",country:"",providerId:"blackbullmarkets"},{value:"FPMARKETS",name:"FP Markets",desc:i.tf(null,void 0,i(382398)),flag:"forex",group:"Forex",country:"",providerId:"fpmarkets"},{value:"FUSIONMARKETS",name:"Fusion Markets",desc:i.tf(null,void 0,i(488869)),flag:"forex",group:"Forex",country:"",providerId:"fusionmarkets"},{value:"TRADENATION",name:"Trade Nation",desc:i.tf(null,void 0,i(663579)),flag:"forex",group:"Forex",country:"",providerId:"tradenation"},{value:"VANTAGE",name:"Vantage",desc:i.tf(null,void 0,i(606582)),flag:"forex",group:"Forex",country:"",providerId:"vantagefx"},{value:"VELOCITY",name:"Velocity Trade",desc:i.tf(null,void 0,i(650469)),flag:"forex",group:"Forex",country:"",providerId:"velocitytrade"},{value:"FX",name:"FXCM",desc:i.tf(null,void 0,i(592901)),flag:"forex",group:"Forex",country:"",providerId:"fxcm"},{value:"FXOPEN",name:"FXOpen",desc:i.tf(null,void 0,i(638398)),flag:"forex",group:"Forex",country:"",providerId:"fxopen"},{value:"EIGHTCAP",name:"Eightcap",desc:i.tf(null,void 0,i(910807)),flag:"forex",group:"Forex",country:"",providerId:"eightcap"},{value:"BTCE",name:"BTC-e",desc:i.tf(null,void 0,i(675334)),flag:"bitcoin",group:"Cryptocurrency",hideInSymbolSearch:!0,country:"",providerId:""},{value:"HONEYSWAP",name:"Honeyswap v2 (Gnosis)",desc:i.tf(null,void 0,i(836061)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"honeyswap"},{value:"HONEYSWAPPOLYGON",name:"Honeyswap v2 (Polygon)",desc:i.tf(null,void 0,i(703053)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"honeyswap"},{value:"BSE",name:"BSE",desc:i.tf(null,void 0,i(799931)),flag:"india",group:"Asia / Pacific",country:"in",providerId:"",searchTerms:[i.tf(null,void 0,i(16207))]},{value:"MSEI",name:"MSE",desc:i.tf(null,void 0,i(693081)),flag:"india",group:"Asia / Pacific",country:"in",providerId:"",searchTerms:[i.tf(null,void 0,i(16207))]},{value:"NYMEX_MINI",name:"NYMEX",desc:i.tf(null,void 0,i(336499)),flag:"usa",group:"North America",hideInSymbolSearch:!0,country:"us",providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"COMEX_MINI",name:"COMEX",desc:i.tf(null,void 0,i(584533)),flag:"usa",group:"North America",hideInSymbolSearch:!0,country:"us",providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"ICEEURFIN",name:"ICEEUR",desc:i.tf(null,void 0,i(845951)),flag:"europe",group:"Europe",country:"eu",providerId:""},{value:"ICEEURCOMM",name:"ICEEUR",desc:i.tf(null,void 0,i(166982)),flag:"europe",group:"Europe",country:"eu",providerId:""},{value:"NSE",name:"NSE",desc:i.tf(null,void 0,i(803867)),flag:"india",group:"Asia / Pacific",country:"in",providerId:"",searchTerms:[i.tf(null,void 0,i(16207))]},{value:"MCX",name:"MCX",desc:i.tf(null,void 0,i(753577)),flag:"india",
group:"Asia / Pacific",country:"in",providerId:"",searchTerms:[i.tf(null,void 0,i(16207))]},{value:"NCDEX",name:"NCDEX",desc:i.tf(null,void 0,i(915091)),flag:"india",group:"Asia / Pacific",country:"in",providerId:"",searchTerms:[i.tf(null,void 0,i(16207))]},{value:"KCBT",name:"KCBT",desc:i.tf(null,void 0,i(610871)),flag:"usa",hideInSymbolSearch:!0,group:"North America",country:"us",providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"OKCOIN",name:"OKCoin",desc:i.tf(null,void 0,i(798361)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"okcoin"},{value:"CBOT_MINI",name:"CBOT",desc:i.tf(null,void 0,i(581563)),flag:"usa",group:"North America",hideInSymbolSearch:!0,country:"us",providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"KRAKEN",name:"Kraken",desc:i.tf(null,void 0,i(961932)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"kraken"},{value:"KUCOIN",name:"KuCoin",desc:i.tf(null,void 0,i(850627)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"kucoin"},{value:"LUNARCRUSH",name:"LunarCrush",desc:i.tf(null,void 0,i(962455)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"lunarcrush"},{value:"XEXCHANGE",name:"xExchange",desc:i.tf(null,void 0,i(734830)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"xexchange"},{value:"CME_MINI",name:"CME",desc:i.tf(null,void 0,i(425193)),flag:"usa",group:"North America",hideInSymbolSearch:!0,country:"us",providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"DJ",name:"DJ",desc:i.tf(null,void 0,i(973151)),flag:"usa",hideInSymbolSearch:!0,group:"North America",country:"us",providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"SP",name:"SP",desc:i.tf(null,void 0,i(869919)),flag:"usa",hideInSymbolSearch:!0,group:"North America",country:"us",providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"BTCCHINA",name:"BTC China",desc:i.tf(null,void 0,i(599193)),flag:"bitcoin",group:"Cryptocurrency",hideInSymbolSearch:!0,country:"",providerId:""},{value:"THRUSTER3",name:"Thruster v3 (Blast)",desc:i.tf(null,void 0,i(210675)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"thruster"},{value:"TIMEX",name:"TimeX",desc:i.tf(null,void 0,i(773557)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"timex"},{value:"ANX",name:"ANX",desc:i.tf(null,void 0,i(198372)),flag:"bitcoin",group:"Cryptocurrency",hideInSymbolSearch:!0,country:"",providerId:""},{value:"MEXBT",name:"meXBT",desc:i.tf(null,void 0,i(668490)),flag:"bitcoin",group:"Cryptocurrency",hideInSymbolSearch:!0,country:"",providerId:""},{value:"GEMINI",name:"Gemini",desc:i.tf(null,void 0,i(201367)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"gemini"},{value:"BITVC",name:"BitVC",desc:i.tf(null,void 0,i(357531)),flag:"bitcoin",group:"Cryptocurrency",hideInSymbolSearch:!0,country:"",providerId:""},{value:"BITYES",name:"BitYes",desc:i.tf(null,void 0,i(945663)),
flag:"bitcoin",group:"Cryptocurrency",hideInSymbolSearch:!0,country:"",providerId:""},{value:"BITFLYER",name:"bitFlyer",desc:i.tf(null,void 0,i(704862)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"bitflyer"},{value:"BYBIT",name:"Bybit",desc:i.tf(null,void 0,i(801800)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"bybit"},{value:"BITMEX",name:"BitMEX",desc:i.tf(null,void 0,i(890561)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"bitmex"},{value:"CAPITALCOM",name:"Capital.com",desc:i.tf(null,void 0,i(148674)),flag:"forex",group:"Forex",country:"",providerId:"capitalcom"},{value:"CFI",name:"CFI",desc:i.tf(null,void 0,i(730317)),flag:"forex",group:"Forex",country:"",providerId:"cfifinancial"},{value:"COINEX",name:"CoinEx",desc:i.tf(null,void 0,i(328681)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"coinex"},{value:"EXMO",name:"EXMO",desc:i.tf(null,void 0,i(924753)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"exmo2"},{value:"INTOTHEBLOCK",name:"IntoTheBlock",desc:i.tf(null,void 0,i(830996)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"intotheblock"},{value:"EASYMARKETS",name:"easyMarkets",desc:i.tf(null,void 0,i(339210)),flag:"forex",group:"Forex",country:"",providerId:"easymarkets"},{value:"FOREXCOM",name:"FOREX.com",desc:i.tf(null,void 0,i(395068)),flag:"forex",group:"Forex",country:"",providerId:"gain"},{value:"FX_IDC",name:"ICE",desc:i.tf(null,void 0,i(89446)),flag:"forex",group:"Forex",country:"",providerId:"ice"},{value:"IBKR",name:"Interactive Brokers",desc:i.tf(null,void 0,i(508662)),flag:"forex",group:"Forex",country:"",providerId:"ibkr"},{value:"IBROKER",name:"iBroker",desc:i.tf(null,void 0,i(51966)),flag:"forex",group:"Forex",country:"",providerId:"ibroker"},{value:"ICMARKETS",name:"IC Markets",desc:i.tf(null,void 0,i(81698)),flag:"forex",group:"Forex",country:"",providerId:"icmarkets"},{value:"BITFINEX",name:"Bitfinex",desc:i.tf(null,void 0,i(572762)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"bitfinex"},{value:"MTGOX",name:"Mt.Gox",desc:i.tf(null,void 0,i(808754)),flag:"bitcoin",group:"Cryptocurrency",hideInSymbolSearch:!0,country:"",providerId:"mtgox"},{value:"PHEMEX",name:"Phemex",desc:i.tf(null,void 0,i(972718)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"phemex"},{value:"POLONIEX",name:"Poloniex",desc:i.tf(null,void 0,i(311014)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"poloniex"},{value:"PULSEX",name:"Pulsex (Pulsechain)",desc:i.tf(null,void 0,i(899938)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"pulsex"},{value:"QUICKSWAP",name:"QuickSwap v2 (Polygon)",desc:i.tf(null,void 0,i(523815)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"quickswap"},{value:"QUICKSWAP3POLYGONZKEVM",name:"QuickSwap v3 (Polygon zkEVM)",desc:i.tf(null,void 0,i(910402)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"quickswap3"},{value:"QUICKSWAP3POLYGON",name:"QuickSwap v3 (Polygon)",desc:i.tf(null,void 0,i(849738)),flag:"bitcoin",
group:"Cryptocurrency",country:"",providerId:"quickswap3"},{value:"SUSHISWAP",name:"SushiSwap v2 (Ethereum)",desc:i.tf(null,void 0,i(691727)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"sushiswap"},{value:"SUSHISWAPPOLYGON",name:"SushiSwap v2 (Polygon)",desc:i.tf(null,void 0,i(276133)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"sushiswap"},{value:"TOKENIZE",name:"Tokenize",desc:i.tf(null,void 0,i(961326)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"tokenize"},{value:"TRADERJOE",name:"Trader Joe v2 (Avalanche)",desc:i.tf(null,void 0,i(923068)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"traderjoe"},{value:"UNISWAP",name:"Uniswap v2 (Ethereum)",desc:i.tf(null,void 0,i(725990)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"uniswap"},{value:"UNISWAP3ETH",name:"Uniswap v3 (Ethereum)",desc:i.tf(null,void 0,i(670485)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"uniswap3"},{value:"UNISWAP3POLYGON",name:"Uniswap v3 (Polygon)",desc:i.tf(null,void 0,i(96266)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"uniswap3"},{value:"UNISWAP3ARBITRUM",name:"Uniswap v3 (Arbitrum)",desc:i.tf(null,void 0,i(419861)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"uniswap3"},{value:"UNISWAP3OPTIMISM",name:"Uniswap v3 (Optimism)",desc:i.tf(null,void 0,i(754635)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"uniswap3"},{value:"UNISWAP3BSC",name:"Uniswap v3 (BNB chain)",desc:i.tf(null,void 0,i(253229)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"uniswap3"},{value:"UNISWAP3BASE",name:"Uniswap v3 (Base)",desc:i.tf(null,void 0,i(194864)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"uniswap3"},{value:"UNISWAP3AVALANCHE",name:"Uniswap v3 (Avalanche)",desc:i.tf(null,void 0,i(794849)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"uniswap3"},{value:"UPBIT",name:"UpBit",desc:i.tf(null,void 0,i(310430)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"upbit"},{value:"BINGX",name:"BingX",desc:i.tf(null,void 0,i(932032)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"bingx"},{value:"BTSE",name:"BTSE",desc:i.tf(null,void 0,i(621363)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"btse"},{value:"BITTREX",name:"Bittrex",desc:i.tf(null,void 0,i(611622)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"bittrex"},{value:"BINANCE",name:"Binance",desc:i.tf(null,void 0,i(778260)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"binance"},{value:"BITGET",name:"Bitget",desc:i.tf(null,void 0,i(151805)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"bitget"},{value:"BINANCEUS",name:"Binance US",desc:i.tf(null,void 0,i(376868)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"binance"},{value:"DELTA",name:"Delta",desc:i.tf(null,void 0,i(527223)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"delta"},{value:"BLOFIN",name:"Blofin",desc:i.tf(null,void 0,i(429494)),flag:"bitcoin",
group:"Cryptocurrency",country:"",providerId:"blofin"},{value:"BNC",name:"Brave New Coin",desc:i.tf(null,void 0,i(46336)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"bnc"},{value:"KATANA",name:"Katana (Ronin)",desc:i.tf(null,void 0,i(536870)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"katana"},{value:"CAMELOT",name:"Camelot v2 (Arbitrum)",desc:i.tf(null,void 0,i(594003)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"camelot2"},{value:"CAMELOT3ARBITRUM",name:"Camelot v3 (Arbitrum)",desc:i.tf(null,void 0,i(741541)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"camelot3"},{value:"CRYPTOCOM",name:"crypto.com",desc:i.tf(null,void 0,i(911713)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"cryptocom"},{value:"VELODROME",name:"Velodrome (Optimism)",desc:i.tf(null,void 0,i(736379)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"velodrome"},{value:"VVSFINANCE",name:"VVS Finance (Cronos)",desc:i.tf(null,void 0,i(571939)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"vvsfinance"},{value:"MMFINANCE",name:"MM Finance (Cronos)",desc:i.tf(null,void 0,i(196743)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"mmfinance"},{value:"BASESWAP",name:"BaseSwap (Base)",desc:i.tf(null,void 0,i(974045)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"baseswap"},{value:"BCBA",name:"BYMA",desc:i.tf(null,void 0,i(731613)),flag:"argentina",group:"Mexico and South America",country:"ar",providerId:"",searchTerms:[i.tf(null,void 0,i(834742))]},{value:"MATBAROFEX",name:"ROFEX",desc:i.tf(null,void 0,i(477911)),flag:"argentina",group:"Mexico and South America",country:"ar",providerId:"",searchTerms:[i.tf(null,void 0,i(834742))]},{value:"BMFBOVESPA",name:"B3",desc:i.tf(null,void 0,i(866247)),flag:"brasil",group:"Mexico and South America",country:"br",providerId:"",searchTerms:[i.tf(null,void 0,i(228867))]},{value:"BMV",name:"BMV",desc:i.tf(null,void 0,i(203947)),flag:"mexico",group:"Mexico and South America",country:"mx",providerId:"",searchTerms:[i.tf(null,void 0,i(555087))]},{value:"BIVA",name:"BIVA",desc:i.tf(null,void 0,i(219594)),flag:"mexico",group:"Mexico and South America",country:"mx",providerId:"",searchTerms:[i.tf(null,void 0,i(555087))]},{value:"BVL",name:"BVL",desc:i.tf(null,void 0,i(505138)),flag:"peru",group:"Mexico and South America",country:"pe",providerId:"",searchTerms:[i.tf(null,void 0,i(622979))]},{value:"BCS",name:"SSE",desc:i.tf(null,void 0,i(949722)),flag:"chile",group:"Mexico and South America",country:"cl",providerId:"",searchTerms:[i.tf(null,void 0,i(141840))]},{value:"BVC",name:"BVC",desc:i.tf(null,void 0,i(388142)),flag:"colombia",group:"Mexico and South America",country:"co",providerId:"",searchTerms:[i.tf(null,void 0,i(731144))]},{value:"BVCV",name:"BVC",desc:i.tf(null,void 0,i(478271)),flag:"venezuela",group:"Mexico and South America",country:"ve",providerId:"",searchTerms:[i.tf(null,void 0,i(739055))]},{value:"NAG",name:"NSE",desc:i.tf(null,void 0,i(862549)),flag:"japan",
group:"Asia / Pacific",country:"jp",providerId:"",searchTerms:[i.tf(null,void 0,i(692443))]},{value:"TSE",name:"TSE",desc:i.tf(null,void 0,i(453617)),flag:"japan",group:"Asia / Pacific",country:"jp",providerId:"",searchTerms:[i.tf(null,void 0,i(692443))]},{value:"TFEX",name:"TFEX",desc:i.tf(null,void 0,i(197400)),flag:"thailand",group:"Asia / Pacific",country:"th",providerId:"",searchTerms:[i.tf(null,void 0,i(433138))]},{value:"TFX",name:"TFX",desc:i.tf(null,void 0,i(753572)),flag:"japan",group:"Asia / Pacific",country:"jp",providerId:"",searchTerms:[i.tf(null,void 0,i(692443))]},{value:"TOCOM",name:"TOCOM",desc:i.tf(null,void 0,i(30453)),flag:"japan",group:"Asia / Pacific",country:"jp",providerId:"",searchTerms:[i.tf(null,void 0,i(692443))]},{value:"OSE",name:"OSE",desc:i.tf(null,void 0,i(517199)),flag:"japan",group:"Asia / Pacific",country:"jp",providerId:"",searchTerms:[i.tf(null,void 0,i(692443))]},{value:"SGX",name:"SGX",desc:i.tf(null,void 0,i(919973)),flag:"singapore",group:"Asia / Pacific",country:"sg",providerId:"",searchTerms:[i.tf(null,void 0,i(156683))]},{value:"ICESG",name:"ICE Futures Singapore",desc:i.tf(null,void 0,i(448044)),flag:"singapore",group:"Asia / Pacific",country:"sg",providerId:"",searchTerms:[i.tf(null,void 0,i(156683))]},{value:"FTSEST",name:"FTSE ST",desc:i.tf(null,void 0,i(582927)),flag:"singapore",group:"Asia / Pacific",country:"sg",providerId:"",searchTerms:[i.tf(null,void 0,i(156683))]},{value:"SAPSE",name:"SSE",desc:i.tf(null,void 0,i(253961)),flag:"japan",group:"Asia / Pacific",country:"jp",providerId:"",searchTerms:[i.tf(null,void 0,i(692443))]},{value:"FSE",name:"FSE",desc:i.tf(null,void 0,i(461659)),flag:"japan",group:"Asia / Pacific",country:"jp",providerId:"",searchTerms:[i.tf(null,void 0,i(692443))]},{value:"TPEX",name:"TPEx",desc:i.tf(null,void 0,i(215751)),flag:"taiwan",group:"Asia / Pacific",country:"tw",providerId:"",searchTerms:[i.tf(null,void 0,i(460919))]},{value:"TAIFEX",name:"TAIFEX",desc:i.tf(null,void 0,i(686094)),flag:"taiwan",group:"Asia / Pacific",country:"tw",providerId:"",searchTerms:[i.tf(null,void 0,i(460919))]},{value:"TWSE",name:"TWSE",desc:i.tf(null,void 0,i(974013)),flag:"taiwan",group:"Asia / Pacific",country:"tw",providerId:"",searchTerms:[i.tf(null,void 0,i(460919))]},{value:"SET",name:"SET",desc:i.tf(null,void 0,i(905107)),flag:"thailand",group:"Asia / Pacific",country:"th",providerId:"",searchTerms:[i.tf(null,void 0,i(433138))]},{value:"KRX",name:"KRX",desc:i.tf(null,void 0,i(116699)),flag:"south_korea",group:"Asia / Pacific",country:"kr",providerId:"",searchTerms:[i.tf(null,void 0,i(173160))]},{value:"BAHRAIN",name:"BHB",desc:i.tf(null,void 0,i(98343)),flag:"bahrain",group:"Middle East / Africa",country:"bh",providerId:"",searchTerms:[i.tf(null,void 0,i(53260))]},{value:"KSE",name:"KSE",desc:i.tf(null,void 0,i(542319)),flag:"kuwait",group:"Middle East / Africa",country:"kw",providerId:"",searchTerms:[i.tf(null,void 0,i(872374))]},{value:"CSECY",name:"CSE",desc:i.tf(null,void 0,i(4287)),flag:"cyprus",group:"Europe",country:"cy",providerId:"",
searchTerms:[i.tf(null,void 0,i(551017))]},{value:"BVMT",name:"BVMT",desc:i.tf(null,void 0,i(923628)),flag:"tunisia",group:"Middle East / Africa",country:"tn",providerId:"",searchTerms:[i.tf(null,void 0,i(420638))]},{value:"ATHEX",name:"ATHEX",desc:i.tf(null,void 0,i(852002)),flag:"greece",group:"Europe",country:"gr",providerId:""},{value:"BELEX",name:"BELEX",desc:i.tf(null,void 0,i(525246)),flag:"serbia",group:"Europe",country:"rs",providerId:"",searchTerms:[i.tf(null,void 0,i(896573))]},{value:"EGX",name:"EGX",desc:i.tf(null,void 0,i(493792)),flag:"egypt",group:"Middle East / Africa",country:"eg",providerId:"",searchTerms:[i.tf(null,void 0,i(205390))]},{value:"TADAWUL",name:"Tadawul",desc:i.tf(null,void 0,i(401175)),flag:"saudi_arabia",group:"Middle East / Africa",country:"sa",providerId:"",searchTerms:[i.tf(null,void 0,i(936261))]},{value:"CSEMA",name:"CSE",desc:i.tf(null,void 0,i(88329)),flag:"morocco",group:"Middle East / Africa",country:"ma",providerId:"",searchTerms:[i.tf(null,void 0,i(216641))]},{value:"IDX",name:"IDX",desc:i.tf(null,void 0,i(75088)),flag:"indonesia",group:"Asia / Pacific",country:"id",providerId:"",searchTerms:[i.tf(null,void 0,i(609759))]},{value:"HSI",name:"HSI",desc:i.tf(null,void 0,i(259952)),flag:"hong_kong",group:"Asia / Pacific",country:"hk",providerId:"",searchTerms:[i.tf(null,void 0,i(532918))]},{value:"QSE",name:"QSE",desc:i.tf(null,void 0,i(844449)),flag:"qatar",group:"Middle East / Africa",country:"qa",providerId:"",searchTerms:[i.tf(null,void 0,i(619056))]},{value:"OANDA",name:"OANDA",desc:i.tf(null,void 0,i(398585)),flag:"forex",group:"Forex",country:"",providerId:"oanda"},{value:"SAXO",name:"Saxo",desc:i.tf(null,void 0,i(780276)),flag:"forex",group:"Forex",country:"",providerId:"saxobank"},{value:"PEPPERSTONE",name:"Pepperstone",desc:i.tf(null,void 0,i(341557)),flag:"forex",group:"Forex",country:"",providerId:"pepperstone"},{value:"PHILLIPNOVA",name:"Phillip Nova",desc:i.tf(null,void 0,i(574893)),flag:"forex",group:"Forex",country:"",providerId:"phillipnova"},{value:"SKILLING",name:"SKILLING",desc:i.tf(null,void 0,i(434119)),flag:"forex",group:"Forex",country:"",providerId:"skilling"},{value:"SPREADEX",name:"Spreadex",desc:i.tf(null,void 0,i(822963)),flag:"forex",group:"Forex",country:"",providerId:"spreadex"},{value:"GBEBROKERS",name:"GBE brokers",desc:i.tf(null,void 0,i(512579)),flag:"forex",group:"Forex",country:"",providerId:"gbebrokers"},{value:"EURONEXT",name:"Euronext",desc:i.tf(null,void 0,i(70082)),flag:"europe",group:"Europe",country:"eu",providerId:""},{value:"EURONEXTAMS",name:"EURONEXTAMS",desc:i.tf(null,void 0,i(841444)),flag:"netherlands",group:"Europe",country:"nl",providerId:"",searchTerms:[i.tf(null,void 0,i(353770))]},{value:"EURONEXTBRU",name:"EURONEXTBRU",desc:i.tf(null,void 0,i(166201)),flag:"belgium",group:"Europe",country:"be",providerId:"",searchTerms:[i.tf(null,void 0,i(637653))]},{value:"EURONEXTLIS",name:"EURONEXTLIS",desc:i.tf(null,void 0,i(232729)),flag:"portugal",group:"Europe",country:"pt",providerId:"",searchTerms:[i.tf(null,void 0,i(123496))]
},{value:"EURONEXTPAR",name:"EURONEXTPAR",desc:i.tf(null,void 0,i(515894)),flag:"france",group:"Europe",country:"fr",providerId:"",searchTerms:[i.tf(null,void 0,i(696013))]},{value:"OSL",name:"EURONEXTOSE",desc:i.tf(null,void 0,i(255361)),flag:"norway",group:"Europe",country:"no",providerId:"",searchTerms:[i.tf(null,void 0,i(145075))]},{value:"EUROTLX",name:"EUROTLX",desc:i.tf(null,void 0,i(646476)),flag:"italy",group:"Europe",country:"it",providerId:"",searchTerms:[i.tf(null,void 0,i(43246))]},{value:"OMX",name:"OMX",desc:i.tf(null,void 0,i(74125)),flag:"europe",group:"Europe",country:"eu",providerId:""},{value:"FWB",name:"FWB",desc:i.tf(null,void 0,i(670183)),flag:"germany",group:"Europe",country:"de",providerId:"",searchTerms:[i.tf(null,void 0,i(159985))]},{value:"FRA",name:"FRA",desc:i.tf(null,void 0,i(551785)),flag:"germany",hideInSymbolSearch:!0,group:"Europe",country:"de",providerId:"",searchTerms:[i.tf(null,void 0,i(159985))]},{value:"SWB",name:"SWB",desc:i.tf(null,void 0,i(17644)),flag:"germany",group:"Europe",country:"de",providerId:"",searchTerms:[i.tf(null,void 0,i(159985))]},{value:"XETR",name:"XETR",desc:i.tf(null,void 0,i(141173)),flag:"germany",group:"Europe",country:"de",providerId:"",searchTerms:[i.tf(null,void 0,i(159985))]},{value:"BME",name:"BME",desc:i.tf(null,void 0,i(889143)),flag:"spain",group:"Europe",country:"es",providerId:"",searchTerms:[i.tf(null,void 0,i(792334))]},{value:"BSSE",name:"BSSE",desc:i.tf(null,void 0,i(433137)),flag:"slovakia",group:"Europe",country:"sk",providerId:"",searchTerms:[i.tf(null,void 0,i(506262))]},{value:"BVB",name:"BVB",desc:i.tf(null,void 0,i(273573)),flag:"romania",group:"Europe",country:"ro",providerId:"",searchTerms:[i.tf(null,void 0,i(385646))]},{value:"BET",name:"BET",desc:i.tf(null,void 0,i(386479)),flag:"hungary",group:"Europe",country:"hu",providerId:"",searchTerms:[i.tf(null,void 0,i(930646))]},{value:"GPW",name:"GPW",desc:i.tf(null,void 0,i(128008)),flag:"poland",group:"Europe",country:"pl",providerId:"",searchTerms:[i.tf(null,void 0,i(210119))]},{value:"NEWCONNECT",name:"GPW — NewConnect",desc:i.tf(null,void 0,i(253127)),flag:"poland",group:"Europe",country:"pl",providerId:"",searchTerms:[i.tf(null,void 0,i(210119))]},{value:"LUXSE",name:"LUXSE",desc:i.tf(null,void 0,i(299724)),flag:"luxembourg",group:"Europe",country:"lu",providerId:"",searchTerms:[i.tf(null,void 0,i(164352))]},{value:"MIL",name:"MIL",desc:i.tf(null,void 0,i(16930)),flag:"italy",group:"Europe",country:"it",providerId:"",searchTerms:[i.tf(null,void 0,i(43246))]},{value:"NGM",name:"NGM",desc:i.tf(null,void 0,i(414327)),flag:"sweden",group:"Europe",country:"se",providerId:"",searchTerms:[i.tf(null,void 0,i(182404))]},{value:"BER",name:"BER",desc:i.tf(null,void 0,i(320197)),flag:"germany",group:"Europe",country:"de",providerId:"",searchTerms:[i.tf(null,void 0,i(159985))]},{value:"DUS",name:"DUS",desc:i.tf(null,void 0,i(803884)),flag:"germany",group:"Europe",country:"de",providerId:"",searchTerms:[i.tf(null,void 0,i(159985))]},{value:"HAM",name:"HAM",desc:i.tf(null,void 0,i(373414)),
flag:"germany",group:"Europe",country:"de",providerId:"",searchTerms:[i.tf(null,void 0,i(159985))]},{value:"HAN",name:"HAN",desc:i.tf(null,void 0,i(988211)),flag:"germany",group:"Europe",country:"de",providerId:"",searchTerms:[i.tf(null,void 0,i(159985))]},{value:"MUN",name:"MUN",desc:i.tf(null,void 0,i(186042)),flag:"germany",group:"Europe",country:"de",providerId:"",searchTerms:[i.tf(null,void 0,i(159985))]},{value:"TRADEGATE",name:"TRADEGATE",desc:i.tf(null,void 0,i(280394)),flag:"germany",group:"Europe",country:"de",providerId:"",searchTerms:[i.tf(null,void 0,i(159985))]},{value:"GETTEX",name:"GETTEX",desc:i.tf(null,void 0,i(881365)),flag:"germany",group:"Europe",country:"de",providerId:"finanzen",searchTerms:[i.tf(null,void 0,i(159985))]},{value:"MILSEDEX",name:"MILSEDEX",desc:i.tf(null,void 0,i(948741)),flag:"italy",group:"Europe",hideInSymbolSearch:!0,country:"it",providerId:"",searchTerms:[i.tf(null,void 0,i(43246))]},{value:"IST",name:"IST",desc:i.tf(null,void 0,i(757451)),flag:"turkey",hideInSymbolSearch:!0,group:"Europe",country:"tr",providerId:"",searchTerms:[i.tf(null,void 0,i(694398))]},{value:"BIST",name:"BIST",desc:i.tf(null,void 0,i(833187)),flag:"turkey",group:"Europe",country:"tr",providerId:"",searchTerms:[i.tf(null,void 0,i(694398))]},{value:"TASE",name:"TASE",desc:i.tf(null,void 0,i(932457)),flag:"israel",group:"Middle East / Africa",country:"il",providerId:"",searchTerms:[i.tf(null,void 0,i(261935))]},{value:"SIX",name:"SIX",desc:i.tf(null,void 0,i(460854)),flag:"switzerland",group:"Europe",country:"ch",providerId:"",searchTerms:[i.tf(null,void 0,i(440414))]},{value:"BX",name:"BX",desc:i.tf(null,void 0,i(283300)),flag:"switzerland",group:"Europe",country:"ch",providerId:"",searchTerms:[i.tf(null,void 0,i(440414))]},{value:"PSECZ",name:"PSE",desc:i.tf(null,void 0,i(475511)),flag:"czech",group:"Europe",country:"cz",providerId:"",searchTerms:[i.tf(null,void 0,i(342054))]},{value:"ASX",name:"ASX",desc:i.tf(null,void 0,i(252673)),flag:"australia",group:"Asia / Pacific",country:"au",providerId:"",searchTerms:[i.tf(null,void 0,i(50132))]},{value:"CHIXAU",name:"Cboe Australia",desc:i.tf(null,void 0,i(685147)),flag:"australia",group:"Asia / Pacific",country:"au",providerId:"",searchTerms:[i.tf(null,void 0,i(50132))]},{value:"VIE",name:"WB",desc:i.tf(null,void 0,i(791370)),flag:"austria",group:"Europe",country:"at",providerId:"",searchTerms:[i.tf(null,void 0,i(226505))]},{value:"DSEBD",name:"DSE",desc:i.tf(null,void 0,i(105736)),flag:"bangladesh",group:"Asia / Pacific",country:"bd",providerId:"",searchTerms:[i.tf(null,void 0,i(61587))]},{value:"NZX",name:"NZX",desc:i.tf(null,void 0,i(164062)),flag:"new_zealand",group:"Asia / Pacific",country:"nz",providerId:"",searchTerms:[i.tf(null,void 0,i(824143))]},{value:"SSE",name:"SSE",desc:i.tf(null,void 0,i(531385)),flag:"china",group:"Asia / Pacific",country:"cn",providerId:"",searchTerms:[i.tf(null,void 0,i(420844))]},{value:"SHFE",name:"SHFE",desc:i.tf(null,void 0,i(19261)),flag:"china",group:"Asia / Pacific",country:"cn",providerId:"",
searchTerms:[i.tf(null,void 0,i(420844))]},{value:"SZSE",name:"SZSE",desc:i.tf(null,void 0,i(117992)),flag:"china",group:"Asia / Pacific",country:"cn",providerId:"",searchTerms:[i.tf(null,void 0,i(420844))]},{value:"HKEX",name:"HKEX",desc:i.tf(null,void 0,i(686471)),flag:"hong_kong",group:"Asia / Pacific",country:"hk",providerId:"",searchTerms:[i.tf(null,void 0,i(532918))]},{value:"PSE",name:"PSE",desc:i.tf(null,void 0,i(300290)),flag:"philippines",group:"Asia / Pacific",country:"ph",providerId:"",searchTerms:[i.tf(null,void 0,i(226813))]},{value:"PSX",name:"PSX",desc:i.tf(null,void 0,i(871277)),flag:"pakistan",group:"Asia / Pacific",country:"pk",providerId:"",searchTerms:[i.tf(null,void 0,i(49145))]},{value:"NSENG",name:"NSE",desc:i.tf(null,void 0,i(410100)),flag:"nigeria",group:"Middle East / Africa",country:"ng",providerId:"",searchTerms:[i.tf(null,void 0,i(62410))]},{value:"NSEKE",name:"NSE",desc:i.tf(null,void 0,i(297570)),flag:"kenya",group:"Middle East / Africa",country:"ke",providerId:"",searchTerms:[i.tf(null,void 0,i(89080))]},{value:"JSE",name:"JSE",desc:i.tf(null,void 0,i(456781)),flag:"south_africa",group:"Middle East / Africa",country:"za",providerId:"",searchTerms:[i.tf(null,void 0,i(528900))]},{value:"JFX",name:"JFX",desc:i.tf(null,void 0,i(80661)),flag:"forex",group:"Forex",country:"",providerId:"jfx"},{value:"COINBASE",name:"Coinbase",desc:i.tf(null,void 0,i(740182)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"coinbase"},{value:"CITYINDEX",name:"City Index",desc:i.tf(null,void 0,i(858746)),flag:"forex",group:"Forex",country:"",providerId:"cityindex"},{value:"USI",name:"USI",desc:i.tf(null,void 0,i(787839)),flag:"usa",hideInSymbolSearch:!0,group:"North America",country:"us",providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"OMXHEX",name:"HEX",desc:i.tf(null,void 0,i(261969)),flag:"finland",group:"Europe",country:"fi",providerId:"",searchTerms:[i.tf(null,void 0,i(936693))]},{value:"OMXICE",name:"ICEX",desc:i.tf(null,void 0,i(443662)),flag:"iceland",group:"Europe",country:"is",providerId:"",searchTerms:[i.tf(null,void 0,i(664150))]},{value:"OMXCOP",name:"CSE",desc:i.tf(null,void 0,i(290311)),flag:"denmark",group:"Europe",country:"dk",providerId:"",searchTerms:[i.tf(null,void 0,i(64901))]},{value:"OMXSTO",name:"STO",desc:i.tf(null,void 0,i(826846)),flag:"sweden",group:"Europe",country:"se",providerId:"",searchTerms:[i.tf(null,void 0,i(182404))]},{value:"OMXVSE",name:"VSE",desc:i.tf(null,void 0,i(453525)),flag:"lithuania",group:"Europe",country:"lt",providerId:"",searchTerms:[i.tf(null,void 0,i(529113))]},{value:"OMXTSE",name:"TALSE",desc:i.tf(null,void 0,i(807486)),flag:"estonia",group:"Europe",country:"ee",providerId:"",searchTerms:[i.tf(null,void 0,i(959823))]},{value:"OMXRSE",name:"OMXR",desc:i.tf(null,void 0,i(268976)),flag:"latvia",group:"Europe",country:"lv",providerId:"",searchTerms:[i.tf(null,void 0,i(484045))]},{value:"OMXNORDIC",name:"OMXNORDIC",desc:i.tf(null,void 0,i(641835)),flag:"europe",hideInSymbolSearch:!0,group:"Europe",
country:"eu",providerId:""},{value:"OMXBALTIC",name:"OMXBALTIC",desc:i.tf(null,void 0,i(220309)),flag:"europe",hideInSymbolSearch:!0,group:"Europe",country:"eu",providerId:""},{value:"FRED",name:"FRED",desc:i.tf(null,void 0,i(90661)),flag:"usa",group:"Economy",country:"",providerId:"fred2",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"ISM",name:"ISM",desc:i.tf(null,void 0,i(647511)),flag:"usa",group:"Economy",country:"",providerId:"quandl_ism",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"FRBNY",name:"FRBNY",desc:i.tf(null,void 0,i(889838)),flag:"usa",group:"Economy",country:"",providerId:"quandl_frbny",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"FRBP",name:"FRBP",desc:i.tf(null,void 0,i(343244)),flag:"usa",group:"Economy",country:"",providerId:"quandl_frbp",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"ECONOMICS",name:"Trading Economics",desc:i.tf(null,void 0,i(651425)),flag:"usa",group:"Economy",country:"",providerId:"economics",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"WHSELFINVEST",name:"WH SelfInvest",desc:i.tf(null,void 0,i(160923)),flag:"forex",group:"Forex",country:"",providerId:"whselfinvest"}]},963456:(e,t,i)=>{"use strict";i.d(t,{formatStudyError:()=>o,triesTranslateError:()=>r});var n=i(444372);function r(e){return s.get(e)||e}function o(e){return e.format({boldHighlightStart:"",boldHighlightEnd:""})}const s=new Map([["You cannot see this pivot timeframe on this resolution",n.t(null,void 0,i(717126))],["The data vendor doesn't provide volume data for this symbol.",n.t(null,void 0,i(529198))],['Histogram is too large, please increase "Row Size" input.',n.t(null,void 0,i(634041))],["Histogram is too large, please reduce 'Row Size' input.",n.t(null,void 0,i(177607))],['Histogram is too large, please increase "Ticks Per Row" input.',n.t(null,void 0,i(469274))],["This script is invite-only. To request access, please contact its author.",n.t(null,void 0,i(874986))],["Volume Profile indicator available only on our upgraded plans.",n.t(null,void 0,i(961022))],["VOLUME_BIST_MIXED",n.t(null,void 0,i(482772))],["Runtime error",n.t(null,void 0,i(532364))],["Access error",n.t(null,void 0,i(350058))],["User-defined error",n.t(null,void 0,i(241958))],["Compilation error",n.t(null,void 0,i(260649))]])},926225:(e,t,i)=>{"use strict";function n(e){var t,i,n,r,o,s,l,a;const d=null===(i=null===(t=window.widgetbar)||void 0===t?void 0:t.tradingPanelAccessor)||void 0===i?void 0:i.tradingPanel,u=!(null===(r=null===(n=window.widgetbar)||void 0===n?void 0:n.layout)||void 0===r?void 0:r.canOpen());(null==d?void 0:d.isOpened)&&u&&d.close();const c=null===(o=window.widgetbar)||void 0===o?void 0:o.setPage("pine_logs");null===(a=null===(l=null===(s=window.widgetbar)||void 0===s?void 0:s.layout)||void 0===l?void 0:l.widgetBar)||void 0===a||a.saveToTVSettings();const h=null==c?void 0:c.widget("pine_logs"),p=null==h?void 0:h.widgetObject
;e?null==p||p.onSelectStudyFromChart(e):null==p||p.onOpenFromEditor()}i.d(t,{openPineLogsInRightPanel:()=>n})},311225:(e,t,i)=>{"use strict";i.d(t,{isUserStudyWithLogs:()=>o});var n=i(971417),r=i(7288);new Set([r.StudyStatusType.Error,r.StudyStatusType.Completed]);function o(e){if(null==e?void 0:e.metaInfo){const t=null==e?void 0:e.metaInfo(),i=t.graphics.logs,r=(0,n.extractPineId)(t.id),o=t.pine;return Boolean(o&&r&&(0,n.isCustomPineId)(r)&&i)}return!1}},395098:(e,t,i)=>{"use strict";i.d(t,{getIntervalsVisibilitiesForMode:()=>p,isActualInterval:()=>u,makeIntervalsVisibilitiesVisibleAtInterval:()=>a,mergeIntervalVisibilitiesDefaults:()=>h,nonDefaultIntervalsVisibilities:()=>c});var n=i(852290),r=i(822914),o=i(650151),s=i(223699),l=i(808068);function a(e,t){let i=t.multiplier();if(t.isTicks()&&(e.ticks=!0),t.isSeconds()&&(i<60?(e.seconds=!0,e.secondsFrom=Math.min(e.secondsFrom,i),e.secondsTo=Math.max(e.secondsTo,i)):(i=Math.floor(i/60),t=new s.Interval(s.ResolutionKind.Minutes,i))),t.isMinutes())if(i<60)e.minutes=!0,e.minutesFrom=Math.min(e.minutesFrom,i),e.minutesTo=Math.max(e.minutesTo,i);else{const t=Math.floor(i/60);e.hours=!0,e.hoursFrom=Math.min(e.hoursFrom,t),e.hoursTo=Math.max(e.hoursTo,t)}t.isDays()&&(e.days=!0,e.daysFrom=Math.min(e.daysFrom,i),e.daysTo=Math.max(e.daysTo,i)),t.isWeeks()&&(e.weeks=!0,e.weeksFrom=Math.min(e.weeksFrom,i),e.weeksTo=Math.max(e.weeksTo,i)),t.isMonths()&&(e.months=!0,e.monthsFrom=Math.min(e.monthsFrom,i),e.monthsTo=Math.max(e.monthsTo,i)),t.isRange()&&(e.ranges=!0)}function d(e,t,i,n){return e&&n>=t&&n<=i}function u(e,t){const i=t.childs();switch(e.kind()){case s.ResolutionKind.Ticks:return i.ticks.value();case s.ResolutionKind.Seconds:if(e.multiplier()<60)return d(i.seconds.value(),i.secondsFrom.value(),i.secondsTo.value(),e.multiplier());{const t=Math.floor(e.multiplier()/60);return d(i.minutes.value(),i.minutesFrom.value(),i.minutesTo.value(),t)}case s.ResolutionKind.Minutes:if(e.multiplier()<60)return d(i.minutes.value(),i.minutesFrom.value(),i.minutesTo.value(),e.multiplier());{const t=Math.floor(e.multiplier()/60);return d(i.hours.value(),i.hoursFrom.value(),i.hoursTo.value(),t)}case s.ResolutionKind.Days:return d(i.days.value(),i.daysFrom.value(),i.daysTo.value(),e.multiplier());case s.ResolutionKind.Weeks:return d(i.weeks.value(),i.weeksFrom.value(),i.weeksTo.value(),e.multiplier());case s.ResolutionKind.Months:return d(i.months.value(),i.monthsFrom.value(),i.monthsTo.value(),e.multiplier());case s.ResolutionKind.Range:return i.ranges.value()}return(0,o.assert)(!1,`Unsupported resolution: ${e.value()}`),!1}function c(e){const t=Object.keys(e).filter((t=>l.intervalsVisibilitiesDefaults[t]!==e[t]));return 0===t.length?null:t.reduce(((t,i)=>(t[i]=e[i],t)),{})}function h(e){return(0,n.default)((0,r.default)(l.intervalsVisibilitiesDefaults),null!=e?e:{})}function p(e,t){if(0===t||e.isTicks()&&3===t||e.isRange()&&2===t)return h();let i=!1;const n={ticks:!1,seconds:!1,minutes:!1,hours:!1,days:!1,weeks:!1,months:!1,ranges:!1},r=e=>e.multiplier();return[{checker:e=>e.isTicks(),
getIntervalMultiplier:r,markIntervalAsVisible:(e,t)=>{n.ticks=!0}},{checker:e=>e.isSeconds()&&e.multiplier()<60,getIntervalMultiplier:r,markIntervalAsVisible:(e,t)=>{n.seconds=!0,n.secondsFrom=e,n.secondsTo=t}},{checker:e=>e.isSeconds()&&e.multiplier()>=60,getIntervalMultiplier:e=>Math.floor(e.multiplier()/60),markIntervalAsVisible:(e,t)=>{n.minutes=!0,n.minutesFrom=e,n.minutesTo=t}},{checker:e=>e.isMinutes()&&e.multiplier()<60,getIntervalMultiplier:r,markIntervalAsVisible:(e,t)=>{n.minutes=!0,n.minutesFrom=e,n.minutesTo=t}},{checker:e=>e.isMinutes()&&e.multiplier()>=60,getIntervalMultiplier:e=>Math.floor(e.multiplier()/60),markIntervalAsVisible:(e,t)=>{n.hours=!0,n.hoursFrom=e,n.hoursTo=t}},{checker:e=>e.isDays(),getIntervalMultiplier:r,markIntervalAsVisible:(e,t)=>{n.days=!0,n.daysFrom=e,n.daysTo=t}},{checker:e=>e.isWeeks(),getIntervalMultiplier:r,markIntervalAsVisible:(e,t)=>{n.weeks=!0,n.weeksFrom=e,n.weeksTo=t}},{checker:e=>e.isMonths(),getIntervalMultiplier:r,markIntervalAsVisible:(e,t)=>{n.months=!0,n.monthsFrom=e,n.monthsTo=t}},{checker:e=>e.isRange(),getIntervalMultiplier:r,markIntervalAsVisible:(e,t)=>{n.ranges=!0}}].forEach((n=>{if(n.checker(e)){i=!0;const r=n.getIntervalMultiplier(e);1===t?n.markIntervalAsVisible(r,r):3===t?n.markIntervalAsVisible(r,void 0):n.markIntervalAsVisible(void 0,r)}else(!i&&2===t||i&&3===t)&&n.markIntervalAsVisible(void 0,void 0)})),h(n)}},253972:(e,t,i)=>{"use strict";i.d(t,{drawSelection:()=>s,getSymbolCoordinatesInfo:()=>o});var n=i(31341),r=i(199471);function o(e){const{symbolPosition:t,textWidth:i,textByLines:o,lineHeight:s,font:l,textAlign:a,lineSpacing:d=0}=e;let u=-d,c=0;const h=(0,n.isRtl)(),p=s+d;let m=0,f=0,v="";for(let e=0;e_.length){m+=_.length+(s&&!d?0:1),g||(u+=p);continue}g&&(u-=p);const I=s&&!d&&_.length===n&&y&&!y.hidden;if(g&&(v+=" ",n=v.length),"center"===a)if(I)c=i/2;else{const e=(0,r.measureText)(v,l).width,t=(0,r.measureText)(v.slice(0,n),l).width,o=i/2;c=h?o+e/2-t:o-e/2+t}else if("right"===a&&!h||"left"===a&&h||"end"===a)if(I)c=i;else{const e=(0,r.measureText)(v.slice(n),l).width;c=h?e:i-e}else if(I)c=0;else{const e=(0,r.measureText)(v.slice(0,n),l).width;c=h?i-e:e}I?(f=e+1,u+=p):f=e;break}return{x:c,y:u,lineNumber:f}}function s(e,t,i){const{lines:o,selectionStart:s,selectionEnd:a,left:d,right:u,color:c,font:h,lineHeight:p,lineSpacing:m=0}=i;e.save();const f=(d+u)/2,v=p+m,g=(0,n.isRtl)();e.fillStyle=c;const{horizontalPixelRatio:_,verticalPixelRatio:y}=t;if(s.lineNumber===a.lineNumber){const t=Math.round(s.x*_),i=Math.round(s.y*y),n=Math.round(a.x*_);e.fillRect(Math.min(t,n),i,Math.abs(t-n),Math.round(v*y))}else{const t=(0,r.measureText)(" ",h).width;let i=0;for(let n=s.lineNumber;n<=a.lineNumber;n+=1){const r=n===s.lineNumber,c=n===a.lineNumber,p=o[n];if(p.hidden)continue;const m=l(p.text,h);let I,x,w=!1;"center"===e.textAlign?(I=r?s.x:g?f+m/2:f-m/2,
x=c?a.x:g?f-m/2:f+m/2):"right"===e.textAlign||g&&"start"===e.textAlign||!g&&"end"===e.textAlign?(I=r?s.x:u-m,x=c?a.x:u,w=!0):(I=r?s.x:d,x=c?a.x:d+m);let T=Math.min(I,x),b=Math.max(I,x);c||p.wrappedLinePart&&!p.wrappedLineEnd||(w?T-=t:b+=t);const S=Math.round(T*_),P=Math.round(b*_),A=Math.round((s.y+i*v)*y),C=Math.round((s.y+(i+1)*v)*y);e.fillRect(S,A,P-S,C-A),i+=1}}e.restore()}function l(e,t){return(0,r.measureText)(e,t).width}},821979:(e,t,i)=>{"use strict";i.d(t,{LineDataSource:()=>U});var n=i(86441),r=i(650151),o=i(251954),s=i(201089),l=i(244842),a=i(242558),d=i(988124),u=i(707957),c=i(103221),h=i(389137),p=i(558793),m=i(695242),f=i(735337),v=i(811630),g=i(394093),_=i(401580),y=i(572230),I=i(276871),x=i(395098),w=i(808068),T=i(444331),b=i(502141),S=i(223699),P=i(354950),A=i(885482),C=i(996986),E=i(312449),L=i(964824),M=i(981107),D=i(68626),B=i(517067),k=i(902214),N=i(837202),V=i(31712),R=i(918208),O=i(42292);const z=(0,s.getLogger)("Chart.LineDataSource"),F=l.enabled("datasource_copypaste");class H{constructor(){this._states=[]}start(e){this._states.push(e)}finish(e){const t=(0,r.ensureDefined)(this._states.pop());return n=t,(i=e).length!==n.length?{indexesChanged:!0,pricesChanged:!0}:i.reduce(((e,t,i)=>{const r=n[i];return e.indexesChanged=e.indexesChanged||t.index!==r.index,e.pricesChanged=e.pricesChanged||t.price!==r.price,e}),{indexesChanged:!1,pricesChanged:!1});var i,n}isEmpty(){return 0===this._states.length}}let X=0;class U extends C.DataSource{constructor(e,t,i,n){if(super(n),this.version=1,this.toolname="",this.customization={forcePriceAxisLabel:!1,disableErasing:!1,disableSave:!1,showInObjectsTree:!0},this._currentPointsetAndSymbolId=null,this._pointChanged=new u.Delegate,this._pointAdded=new u.Delegate,this._priceAxisViews=[],this._timeAxisViews=[],this._timePoint=[],this._points=[],this._lastPoint=null,this._paneViews=new Map,this._normalizedPointsChanged=new u.Delegate,this._fixedPointsChanged=new u.Delegate,this._changeStatesStack=new H,this._startMovingPoint=null,this._currentMovingPoint=null,this._isActualSymbol=!1,this._isActualInterval=!1,this._isActualCurrency=!1,this._isActualUnit=!1,this._sharingMode=new _.WatchedValue(0),this._onTemplateApplying=new u.Delegate,this._onTemplateApplied=new u.Delegate,this._syncStateExclusions=[],this._definitionsViewModel=null,this._syncLineStyleMuted=!1,this._onIsActualIntervalChange=new u.Delegate,this._onPointsetUpdatedDelegate=new u.Delegate,this._linkKey=new _.WatchedValue(null),this._serverUpdateTime=null,this._boundCalcIsActualSymbol=this.calcIsActualSymbol.bind(this),this._alignerCache=null,this._alertUndoMode=!1,this._onAlertStatusChanged=()=>{this.updateAllViewsAndRedraw((0,L.sourceChangeEvent)(this.id()))},this._model=e,this._properties=t,this._localAndServerAlertsMismatch=!1,this._properties.hasChild("interval")||this._properties.addChild("interval",new P.Property(e.mainSeries().interval())),this.calcIsActualSymbol(),this._properties.childs().intervalsVisibilities.listeners().subscribe(this,this.calcIsActualSymbol),
this._properties.subscribe(this,(()=>this.propertiesChanged())),this._createPointsProperties(),this.pointsCount()>0)for(let e=0;e{const t=!1===(0,A.hideAllDrawings)().value();e.value()?e.value()&&t&&o.emit("drawing_event",this._id,"show"):(this._model.selection().isSelected(this)&&this._model.selectionMacro((e=>{e.removeSourceFromSelection(this)})),t&&o.emit("drawing_event",this._id,"hide")),this._onSourceHiddenMayChange()})),(0,A.hideAllDrawings)().subscribe(this,this._onSourceHiddenMayChange),this._sessionConnected=this._model.chartApi().isConnected().spawn(),this._sessionConnected.subscribe((e=>{e||(this._currentPointsetAndSymbolId=null)})),this._alertStatus.subscribe(this._onAlertStatusChanged),this._definitionsViewModel=null}destroy(){this._paneViews.forEach(((e,t)=>this._destroyPanePaneViews(t))),this.stop(),null!==this._definitionsViewModel&&(this._definitionsViewModel.destroy(),this._definitionsViewModel=null),null!==this._ownerSource&&(this._ownerSource.currencyChanged().unsubscribeAll(this),this._ownerSource.unitChanged().unsubscribeAll(this),(0,M.isSymbolSource)(this._ownerSource)&&(this._ownerSource.symbolResolved().subscribe(this,this._boundCalcIsActualSymbol),this._ownerSource.isActingAsSymbolSource().unsubscribe(this._boundCalcIsActualSymbol))),this.ownerSourceChanged().unsubscribeAll(this),(0,A.hideAllDrawings)().unsubscribeAll(this),this.deleteAlert(),this._sessionConnected.destroy(),this._alertStatus.unsubscribe(this._onAlertStatusChanged),super.destroy()}priceScale(){return this._ownerSource?this._ownerSource.priceScale():null}createPriceAxisView(e){return new N.LineToolPriceAxisView(this,{pointIndex:e})}model(){return this._model}symbol(){return this._properties.childs().symbol.value()}linkKey(){return this._linkKey}serverUpdateTime(){return this._serverUpdateTime}setServerUpdateTime(e){this._serverUpdateTime=e}boundToSymbol(){return!0}isAvailableInFloatingWidget(){return!0}points(){const e=[];for(let t=0;t{const i=(0,r.ensureNotNull)(this.pointToScreenPoint(t)),o=i.x/this._model.timeScale().width(),s=i.y/e.height();return new n.Point(o,s)}))}widthsProperty(){var e;return null!==(e=this._properties.childs().linesWidths)&&void 0!==e?e:null}lineColorsProperty(){var e;return null!==(e=this._properties.childs().linesColors)&&void 0!==e?e:null}backgroundColorsProperty(){var e;return null!==(e=this._properties.childs().backgroundsColors)&&void 0!==e?e:null}textColorsProperty(){var e;return null!==(e=this._properties.childs().textsColors)&&void 0!==e?e:null}pointsProperty(){return this._pointsProperty}hasEditableCoordinates(){return!0}startMoving(e,t,i,n){this.isFixed()&&this.restoreFixedPoint(),this._startMovingPoint=e}move(e,t,i,n){if(i&&(i.shiftOnly()||i.modShift()))if(this.isFixed()){const t=this._alignScreenPointHorizontallyOrVertically((0,r.ensureDefined)(e.screen));this._currentMovingPoint={screen:t}}else{const t=this._alignPointHorizontallyOrVertically((0,r.ensureDefined)(e.logical)),i=(0,r.ensureNotNull)(this.pointToScreenPoint(t));this._currentMovingPoint={logical:t,screen:i}}else this._currentMovingPoint=e;this.updateAllViews((0,L.sourceChangeEvent)(this.id()))}endMoving(e,t,i){let n=!1,s=!1;if(this._currentMovingPoint&&this._startMovingPoint){if(this.isFixed()){const e=this._correctFixedPoint((0,r.ensureDefined)(this._fixedPoint));e.didCorrect&&(this._fixedPoint=e.point,this._fixedPointsChanged.fire())}else{const e=(0,r.ensureDefined)(this._currentMovingPoint.logical),t=(0,r.ensureDefined)(this._startMovingPoint.logical);n=e.index!==t.index,s=e.price!==t.price;if(this._correctPoints(this._points,i)){o.emit("drawing_event",this._id,"move"),o.emit("drawing_event",this._id,"points_changed");for(let e=0;e0&&(this._points=e)}restorePoints(e,t,i){const n=this._timePoint.length>0&&!(0,h.deepEquals)(this._timePoint,e)[0];this._timePoint=(0,c.deepCopy)(e),this._points=t,i||this.denormalizeTimePoints(),n&&this._normalizedPointsChanged.fire()}restorePositionPercents(e){this._positionPercents=e}calcIsActualSymbol(){const e=this.ownerSource();if(null===e)this._isActualSymbol=!1;else{const t=(0,r.ensureNotNull)(e.symbolSource()),i=t.symbolInfo();if(i){this._migrateSymbolProperty(i);const e=this._properties.childs().symbol,n=e.value();if(this._isActualSymbol=t.symbolSameAsCurrent(n),this._isActualSymbol){const r=(0,T.extractLineToolSymbolFromSymbolInfo)(i,t.symbol());(0,b.areEqualSymbols)(n,r)||(z.logWarn('Possible drawing "migrating" detected from "'+n+'" to "'+r+'"'),z.logWarn("Series symbolInfo: "+JSON.stringify(t.symbolInfo())),z.logWarn(`${(new Error).stack}`)),e.setValue(r)}}}this.calcIsActualInterval(),this.calcIsActualCurrency(),this.calcIsActualUnit(),this._onSourceHiddenMayChange()}calcIsActualCurrency(){const e=this.ownerSource();if(null===e)return void(this._isActualCurrency=!1);let t=this._properties.childs().currencyId.value();if(null!==t){const i=e.symbolSource();"pct"===t&&(this._properties.childs().currencyId.setValue(null),t=null),this._isActualCurrency=t===(0,T.symbolCurrency)(i.symbolInfo(),void 0,!0)}else{const t=(0,r.ensureNotNull)(e.symbolSource());this._isActualCurrency=null!==t.symbolInfo()&&!t.isConvertedToOtherCurrency()}this._onSourceHiddenMayChange()}calcIsActualUnit(){const e=this.ownerSource();if(null===e)return void(this._isActualUnit=!1);const t=this._properties.childs().unitId.value();if(null!==t)this._isActualUnit=t===(0,
r.ensureNotNull)(e.symbolSource()).unit();else{const t=(0,r.ensureNotNull)(e.symbolSource());this._isActualUnit=null!==t.symbolInfo()&&!t.isConvertedToOtherUnit()}this._onSourceHiddenMayChange()}calcIsActualInterval(){const e=this._isActualInterval,t=this._properties,i=this._model.mainSeries();this._isActualInterval=(0,x.isActualInterval)(S.Interval.parse(i.interval()),t.childs().intervalsVisibilities),!this._isActualInterval&&this._model.selection().isSelected(this)&&this._model.selectionMacro((e=>e.removeSourceFromSelection(this))),this._isActualInterval!==e&&this._onIsActualIntervalChange.fire(),this._onSourceHiddenMayChange()}paneViews(e){if(this.isSourceHidden())return null;const t=this._getPaneViews(this.isMultiPaneAvailable()?e:void 0);if(null===t)return null;if(1===t.length)return[t[0]];const i=[];for(let e=t.length-1;e>=0;--e)i.push(t[e]);return i}priceAxisViews(e,t){if(t!==this.priceScale()||this.isSourceHidden())return null;if(this._model.lineBeingEdited()===this){const e=this._model.linePointBeingEdited();if(null!==e&&e{t.openEditDialog((0,r.ensureDefined)(this._alertId),{dataSourceHub:this._model,
actionSource:e,onAborted:e=>{e===g.AlertEditorAbortReason.AlertIsInvalid&&this.removeAlert()}})}))}async getAlert(){try{const e=await this._getChartAlert();if(!e)throw z.logError("Failed to get alert, alert will not be saved with drawing in chart"),new Error("got_no_alert");return e}catch(e){if("not_exists"===e)throw new Error(e);return z.logError(`Getting alert failed: ${e instanceof Error?e.message:e}`),null}}getAlertSync(){var e;if(!this._alertId)return null;const t=(0,p.getChartAlertsFacadeIfCreatedBefore)();return null===t?null:null!==(e=t.getAlertSync(this._alertId))&&void 0!==e?e:null}async synchronizeAlert(e=!1){if(this.hasAlert().value()||this._pendingAlertIdPromise)return new Promise(((t,i)=>{setTimeout((async()=>{if(!this._isDestroyed)try{await this.waitSettingAlertId(),0===this._alertStatus.value()&&await this._syncAlertWithAlertFacade(),this.hasAlert().value()&&this._synchronizeAlert(e),t()}catch(e){i(e)}}),0)}))}syncAlert(e){this.hasAlert().value()||this.setAlert(e,{sync:!0})}stateForAlert(){if(!this.canHasAlert())return null;const e={...this.state(),id:this.idForAlert(),uniqueId:this.idForAlert(),title:this.translatedType(),interval:this._model.mainSeries().interval()},t=this._getAlertPlots();return t&&t.length>0&&(e.plots=t),e}getAlertIsActive(){if(!this._alertId)return!1;const e=this.getAlertSync();return Boolean(e&&e.active().value())}detachAlert(){this._removeAlertSubscriptions(),this._hasAlert.setValue(!1),this._alertId=void 0,this._alertStatus.setValue(0)}removeAlert(){this._alertId=void 0,this._hasAlert.setValue(!1),this._alertStatus.setValue(0),this._removeAlertSubscriptions()}deleteAlert(){if(!this.hasAlert().value()||void 0===this._alertId)return;const e=(0,p.getChartAlertsFacadeIfCreatedBefore)();e&&e.deleteAlert(this._alertId),this.removeAlert()}areLocalAndServerAlertsMismatch(){return this._localAndServerAlertsMismatch}showInObjectTree(){return this.customization.showInObjectsTree}setShowInObjectsTreeEnabled(e){this.customization.showInObjectsTree=e}start(){this.createServerPoints()}processHibernate(){this.canBeHibernated()?this.isStarted()&&this.stop():this.isStarted()||this.start()}canBeHibernated(){return this.isSourceHidden()}onData(e){"pointset_error"!==e.method?e.params.customId===this._currentPointsetIdWithPrefix()&&this._onPointsetUpdated(e.params.plots):z.logError(`Error getting pointset: ${e.params[0]} ${e.params[1]}`)}isBeingEdited(){return this===this._model.lineBeingEdited()}isActualSymbol(){return this._isActualSymbol}isActualCurrency(){return this._isActualCurrency}isActualInterval(){return this._isActualInterval}isActualUnit(){return this._isActualUnit}onIsActualIntervalChange(){return this._onIsActualIntervalChange}setOwnerSource(e){null!==this._ownerSource&&(this._ownerSource.currencyChanged().unsubscribeAll(this),this._ownerSource.unitChanged().unsubscribeAll(this)),null!==this._ownerSource&&(0,M.isSymbolSource)(this._ownerSource)&&(this._ownerSource.symbolResolved().unsubscribe(this,this._boundCalcIsActualSymbol),
this._ownerSource.isActingAsSymbolSource().unsubscribe(this._boundCalcIsActualSymbol)),super.setOwnerSource(e),e&&(this.setPriceScale(e.priceScale()),e.currencyChanged().subscribe(this,this.calcIsActualCurrency),e.unitChanged().subscribe(this,this.calcIsActualUnit),this.calcIsActualSymbol(),this._migrateZOrder(),this._updateAlertCreationAvailable()),(0,M.isSymbolSource)(e)&&(e.symbolResolved().subscribe(this,this._boundCalcIsActualSymbol),e.isActingAsSymbolSource().subscribe(this._boundCalcIsActualSymbol))}dataAndViewsReady(){return this._paneViews.size>0}pointAdded(){return this._pointAdded}pointChanged(){return this._pointChanged}pointsetUpdated(){return this._onPointsetUpdatedDelegate}pointToScreenPoint(e){var t;const i=this._model.timeScale(),r=this.priceScale(),o=null===(t=this.ownerSource())||void 0===t?void 0:t.firstValue();if(!r||r.isEmpty()||i.isEmpty()||null==o)return null;const s=i.indexToCoordinate(e.index),l=r.priceToCoordinate(e.price,o);return new n.Point(s,l)}screenPointToPoint(e){var t;const i=this.priceScale(),n=null===(t=this.ownerSource())||void 0===t?void 0:t.firstValue();if(null==n||!isFinite(n)||null===i)return null;const r=this._model.timeScale().coordinateToIndex(e.x);return{price:i.coordinateToPrice(e.y,n),index:r}}calcMiddlePoint(e,t){return new n.Point((e.x+t.x)/2,(e.y+t.y)/2)}addPoint(e,t,i){const n=this._preparePoint(e,t);return this._addPointIntenal(n,t,i)}addFixedPoint(e){return this._fixedPoint=e,this.calcPositionPercents(),!0}calcPositionPercents(){const e=this.priceScale();if(!e||e.isEmpty()||void 0===this._fixedPoint)return;const t=this._fixedPoint.x/this._model.timeScale().width(),i=this._fixedPoint.y/e.height();return this._positionPercents={x:t,y:i},this._positionPercents}restoreFixedPoint(){this._fixedPoint=this.fixedPoint()}propertiesChanged(e){this.calcIsActualInterval(),this.updateAllViewsAndRedraw((0,L.sourceChangeEvent)(this.id())),e||this._syncLineStyleIfNeeded(),void 0===this._pendingPropertyChangedEvent&&(this._pendingPropertyChangedEvent=setTimeout((()=>{this._pendingPropertyChangedEvent=void 0,o.emit("drawing_event",this._id,"properties_changed")}),0))}state(e){var t;const i={type:this.toolname,id:this.id(),state:this.properties().state(this._propertiesStateExclusions()),points:(0,c.deepCopy)(this._timePoint),zorder:this.zorder(),ownerSource:null===(t=this.ownerSource())||void 0===t?void 0:t.id()};return this.linkKey().value()&&(i.linkKey=this.linkKey().value()),0!==this._sharingMode.value()&&(i.sharingMode=this._sharingMode.value()),delete i.state.points,e&&(i.indexes=this._points),this.isFixed()&&(i.positionPercents=this._positionPercents||this.calcPositionPercents()),"version"in this&&1!==this.version&&(i.version=this.version),this._saveAlertIdInState()&&this.hasAlert().value()&&void 0!==this._alertId&&(i.alertId=this._alertId),i}updateAllViews(e){this._isActualSymbol&&this._isActualCurrency&&this._isActualUnit&&this._isActualInterval&&this._properties.childs().visible.value()&&(this._updateAllPaneViews(e),this._priceAxisViews.forEach((t=>t.update(e))),
this._timeAxisViews.forEach((t=>t.update(e))))}updateAllViewsAndRedraw(e){this.updateAllViews(e),this._model.updateSource(this)}tags(){return[this.toolname]}properties(){return this._properties}restoreExternalPoints(e,t){if(this._timePoint=(0,c.deepCopy)(e.points),t.indexesChanged){if(this.properties().childs().interval.setValue(e.interval),!this.isActualSymbol())return this._clearServerPoints(),void this._normalizedPointsChanged.fire();this.createServerPoints()}else{const t=Math.min(this._points.length,e.points.length);for(let i=0;i0&&this._normalizePoints(),!this._readyToCreatePointset())return;const e=this._pointsForPointset();if(0===e.length)return;++X,this._currentPointsetAndSymbolId={pointsetId:X,symbolId:(0,r.ensureNotNull)(this._model.mainSeries().seriesSource().symbolInstanceId())};const t=(0,I.getServerInterval)(this.properties().childs().interval.value());this._model.chartApi().createPointset(this._currentPointsetIdWithPrefix(),"turnaround",this._currentPointsetAndSymbolId.symbolId,t,e,this.onData.bind(this))}finish(){}realign(){var e;this.calcIsActualSymbol(),this.isFixed()||this.isSourceHidden()||this._model.lineBeingCreated()===this||this._model.lineBeingEdited()===this||(null===(e=this._currentPointsetAndSymbolId)||void 0===e?void 0:e.symbolId)===this._model.mainSeries().seriesSource().symbolInstanceId()||this._clearServerPoints(),null===this._model.mainSeries().symbolInfo()&&(this._alignerCache=null),
this.updateAllViews((0,L.sourceChangeEvent)(this.id()))}stop(){this._clearServerPoints()}restart(){this.isFixed()||(this._currentPointsetAndSymbolId=null,this.createServerPoints())}isStarted(){return null!==this._currentPointsetAndSymbolId}convertYCoordinateToPriceForMoving(e,t){var i;const n=(0,r.ensureNotNull)(this.priceScale());if(n.isEmpty())return null;const o=this.ownerSource(),s=(0,r.ensure)(null===(i=o||t)||void 0===i?void 0:i.firstValue());return n.coordinateToPrice(e,s)}syncMultichartState(e){const t={points:this._timePoint,interval:this._model.mainSeries().interval()},i=this.linkKey().value();if(null!==i&&this.isSynchronizable()){const n={model:this._model,linkKey:i,symbol:this._model.mainSeries().symbol(),finalState:t,changes:e};(0,A.finishChangingLineTool)(n)}}enableCurrentIntervalVisibility(){let e=this.properties().childs().intervalsVisibilities.state();void 0!==e&&(e=(0,x.mergeIntervalVisibilitiesDefaults)(e),(0,x.makeIntervalsVisibilitiesVisibleAtInterval)(e,this._model.mainSeries().intervalObj()),this.properties().childs().intervalsVisibilities.mergeAndFire(e))}clonePositionOffset(){return this.isFixed()?{barOffset:0,xCoordOffset:20,yCoordOffset:20}:{barOffset:0,xCoordOffset:0,yCoordOffset:-40}}sharingMode(){return this._sharingMode}share(e){this.isSynchronizable()&&this._sharingMode.setValue(e)}syncLineStyleState(){const e=this.properties().state(this._syncStateExclusions);return delete e.interval,e.intervalsVisibilities=(0,x.mergeIntervalVisibilitiesDefaults)(e.intervalsVisibilities),e}moveLineTool(e){e.forEach(((e,t)=>this._setPoint(t,e))),this._normalizePoints()}_setPoint(e,t){this._points[e]&&(this._points[e].index===t.index?this._points[e].price=t.price:this._points[e]=t,this._pointChanged.fire(e))}_correctLastPoint(e){return(0,h.clone)(e)}_pointsForPointset(){return this._timePoint.map((e=>[e.time_t,e.offset]))}_snapPoint45Degree(e,t,i){const n=this._model.timeScale(),o=n.indexToCoordinate(t.index),s=n.indexToCoordinate(e.index)-o,l=(0,r.ensureNotNull)(this.priceScale()),a=t.price,d=e.price,u=(0,r.ensureNotNull)((0,r.ensureNotNull)(this.ownerSource()).firstValue()),c=l.priceToCoordinate(a,u),h=l.priceToCoordinate(d,u)-c,p=Math.round(Math.atan2(s,h)/Math.PI*4);if(2===Math.abs(p))i||(e.price=a);else if(0===Math.abs(p)||4===Math.abs(p))i||(e.index=t.index);else{const t=Math.sqrt(s*s+h*h),i=s<0?-1:1,r=h<0?-1:1;let a=Math.max(Math.abs(h),Math.abs(s));a/=a*Math.sqrt(2)/t;const d=Math.round(n.coordinateToIndex(o+a*i)),p=Math.abs(n.indexToCoordinate(d)-o),m=l.coordinateToPrice(c+p*r,u);e.index=d,e.price=m}}_normalizePoint(e){return{...this._model.timeScale().normalizeBarIndex(e.index),price:e.price}}_normalizePoints(){this._timePoint=[];for(let e=0;ethis._destroyPanePaneViews(t))),this._model.lightUpdate()}_getPaneViews(e){return this._paneViews.get(e)||null}_updateAllPaneViews(e){this._paneViews.forEach((t=>{for(const i of t)i.update(e)}))}_alignPointHorizontallyOrVertically(e){const t=(0,r.ensureNotNull)(this.pointToScreenPoint(e)),i=(0,r.ensureDefined)((0,r.ensureNotNull)(this._startMovingPoint).logical),n=(0,r.ensureDefined)((0,r.ensureNotNull)(this._startMovingPoint).screen),o=Math.abs(n.x-t.x),s=Math.abs(n.y-t.y);if(o<10&&s<10)return e;return{index:o=1?{didCorrect:!0,point:e.add(n)}:{didCorrect:!1,point:e}}_currentPointsetIdWithPrefix(){return"pointset_"+(0,r.ensureNotNull)(this._currentPointsetAndSymbolId).pointsetId}_clearServerPoints(){null!==this._currentPointsetAndSymbolId&&this._model.chartApi().isConnected().value()&&this._model.chartApi().removePointset(this._currentPointsetIdWithPrefix()),this._currentPointsetAndSymbolId=null}_createPointProperty(e){const t=this._pointsProperty.childs().points;t.addProperty(""+e,{});const i=t[e];i.addChild("price",new B.LineDataSourcePointPriceProperty(this,e)),i.addChild("bar",new D.LineDataSourcePointIndexProperty(this,e))}_createPointsProperties(){this._pointsProperty=new P.Property,
this._pointsProperty.addChild("points",new P.Property);for(let e=0;e=2&&this._snapTo45DegreesAvailable()&&this._snapPoint45Degree(i,this.points()[this.points().length-2]),i}_addPointIntenal(e,t,i){this._points.push(e);const n=this._points.length===this.pointsCount();return n?(this._lastPoint=null,i||(this._normalizePoints(),this.createServerPoints())):this._lastPoint=e,this._pointAdded.fire(this._points.length-1),n}_onSourceHiddenMayChange(){this.isSourceHidden()&&this._model.selectionMacro((e=>{e.removeSourceFromSelection(this)})),this._model.invalidate(y.InvalidationMask.validateAction((()=>{this!==this._model.lineBeingCreated()&&(this._isDestroyed||this.processHibernate())})))}_saveAlertIdInState(){return!0}_onPointsetUpdated(e){if(0!==e.length){for(let t=0;t0}_propertiesStateExclusions(){return[]}_syncLineStyleIfNeeded(){const e=this.linkKey().value();!this._syncLineStyleMuted&&e&&(0,A.changeLineStyle)({linkKey:e,state:this.syncLineStyleState(),model:this._model})}_muteSyncLineStyle(){this._syncLineStyleMuted=!0}_unmuteSyncLineStyleWithoutApplyingChanges(){this.propertiesChanged(),this._syncLineStyleMuted=!1}_applyTemplateImpl(e){e.intervalsVisibilities=(0,x.mergeIntervalVisibilitiesDefaults)(e.intervalsVisibilities);const t=this.properties()
;t.applyTemplate(e,(0,O.factoryDefaults)(this.toolname.toLowerCase())),t.saveDefaults(),this.propertiesChanged()}_getPropertyDefinitionsViewModelClass(){return Promise.resolve(null)}_getAlertPlots(){return[]}_getUndoHistory(){return this._model.undoModel().undoHistory()}_synchronizeAlert(e){const t=this._getUndoHistory();if(!this._undoCheckpointAlert&&!this._alertUndoMode){const e=t.undoStack().pop();this._undoCheckpointAlert=t.createUndoCheckpoint(),e&&t.undoStack().push(e)}const i=e=>{const t=e.description()!==e.defaultDescription(),i=e.description()!==e.defaultDescription(!0),n=this._model.mainSeries().stateForAlert();e.startEditing(),e.isOHLC()&&n.actualSymbol===e.actualSymbol()&&e.setSeriesState(n),e.setMainSeriesState(n),e.setSymbol(n.symbolString);const o=(0,r.ensureNotNull)(this.stateForAlert());e.setResolution(o.interval),e.setLineState(o),t||i||e.resetToDefaultDescription(),e.finishEditing(),this._localAndServerAlertsMismatch=!0},n=()=>{this._alertUndoMode=!0,t.undoToCheckpoint((0,r.ensureDefined)(this._undoCheckpointAlert)),setTimeout((()=>{this._alertUndoMode=!1,this._localAndServerAlertsMismatch=!1}),0)},o=e=>{"not_exists"!==e&&(z.logError("Getting alert failed: "+e),n())},s=async e=>{(await(0,p.getChartAlertsFacade)()).restartAlert(e,{success:()=>this._localAndServerAlertsMismatch=!1,error:o,complete:()=>delete this._undoCheckpointAlert,actionSource:"drawing_sync"})};(0,m.canPlaceAlertOnResolution)(this.stateForAlert().interval)?this.getAlert().then((t=>{t?(i(t),e&&s(t)):z.logError("Failed to get alert, drawing and alert are not synchronized")})).catch(o):this._alertUndoMode||((0,f.showGoProAlertsOnSecondsDialog)(),n(),delete this._undoCheckpointAlert)}_linePointsToAlertPlot(e,t,i,n){if(2!==e.length)return z.logError("[Drawing Alert] Wrong points"),null;const o=this._model.timeScale();return!o||o.isEmpty()?null:{type:"LinePlot",title:t||this.translatedType(),timestamp:(0,r.ensureNotNull)(o.indexToTimePoint(0)),offset1:e[0].index,offset2:e[1].index,price1:e[0].price,price2:e[1].price,extendBackward:i||!1,extendForward:n||!1}}_getAlertCreationAvailable(){return v.alertsAvailable&&super._getAlertCreationAvailable()&&!this._areAlertsOnLineToolProhibited()&&!this._hasAlert.value()}static _configureProperties(e){if(this._addCollectedProperties(e),e.hasChild("symbolStateVersion")||e.addChild("symbolStateVersion",new P.Property(1)),e.hasChild("zOrderVersion")||e.addChild("zOrderVersion",new P.Property(1)),e.hasChild("visible")||e.addChild("visible",new P.Property(!0)),e.hasChild("frozen")||e.addChild("frozen",new P.Property(!1)),e.hasChild("symbol")||e.addChild("symbol",new P.Property("")),e.hasChild("currencyId")||e.addChild("currencyId",new P.Property(null)),e.hasChild("unitId")||e.addChild("unitId",new P.Property(null)),e.addExcludedKey("symbolStateVersion",1),e.addExcludedKey("zOrderVersion",1),e.addExcludedKey("visible",1),e.addExcludedKey("frozen",1),e.addExcludedKey("symbol",1),e.addExcludedKey("currencyId",1),e.addExcludedKey("unitId",1),e.hasChild("intervalsVisibilities")){const t=(0,h.merge)((0,
h.clone)(w.intervalsVisibilitiesDefaults),e.childs().intervalsVisibilities.state());e.removeProperty("intervalsVisibilities"),e.addChild("intervalsVisibilities",new E.IntervalsVisibilitiesProperty(t))}else e.addChild("intervalsVisibilities",new E.IntervalsVisibilitiesProperty(w.intervalsVisibilitiesDefaults));e.hasChild("title")||e.addChild("title",new P.Property("")),e.addExcludedKey("symbolInfo",1),e.addExcludedKey("points",1),e.addExcludedKey("interval",1),e.addExcludedKey("title",1),e.hasChild("singleChartOnly")&&e.removeProperty("singleChartOnly"),e.hasChild("font")&&e.removeProperty("font")}static _addCollectedProperties(e){e.hasChild("linewidth")&&e.addChild("linesWidths",new V.LineToolWidthsProperty([(0,r.ensureDefined)(e.child("linewidth"))])),e.hasChild("linecolor")&&e.addChild("linesColors",new V.LineToolColorsProperty([(0,r.ensureDefined)(e.child("linecolor"))])),e.hasChild("backgroundColor")&&e.addChild("backgroundsColors",new V.LineToolColorsProperty([(0,r.ensureDefined)(e.child("backgroundColor"))])),e.hasChild("textColor")&&e.addChild("textsColors",new V.LineToolColorsProperty([(0,r.ensureDefined)(e.child("textColor"))])),e.hasChild("linestyle")&&e.addChild("linesStyles",new V.LineToolCollectedProperty([(0,r.ensureDefined)(e.child("linestyle"))])),e.addExcludedKey("linesWidths",3),e.addExcludedKey("linesColors",3),e.addExcludedKey("backgroundsColors",3),e.addExcludedKey("textsColors",3),e.addExcludedKey("linesStyles",3)}_areAlertsOnLineToolProhibited(){return null!==this._ownerSource&&!this._ownerSource.canHasAlertOnLineTools()}_removeAlertSubscriptions(){var e;null===(e=this._unsubscribeAlertCallbacks)||void 0===e||e.call(this),this._unsubscribeAlertCallbacks=void 0}_addAlertSubscriptions(e,t={}){if(void 0!==this._unsubscribeAlertCallbacks)return;const i=this.properties().child("extendLeft"),n=this.properties().child("extendRight"),r=e.destroyed().spawn(),o=e.selected().spawn(),s=e.hovered().spawn(),l=e.active().spawn();l.subscribe((e=>this._alertStatus.setValue(e?2:3)),{callWithLast:!0}),r.subscribe(this.removeAlert.bind(this)),o.subscribe((e=>{this._model.selectionMacro((t=>{e?t.addSourceToSelection(this):t.removeSourceFromSelection(this)}))}),{callWithLast:t.syncFocusFromAlert}),s.subscribe((e=>{const t=this._model.hoveredSource();e&&t!==this?this._model.setHoveredSource(this,null):e||t!==this||this._model.setHoveredSource(null,null)})),void 0!==i&&i.subscribe(this,(()=>this.synchronizeAlert(!1))),void 0!==n&&n.subscribe(this,(()=>this.synchronizeAlert(!1))),this._unsubscribeAlertCallbacks=()=>{r.destroy(),s.destroy(),o.destroy(),l.destroy(),void 0!==i&&i.unsubscribeAll(this),void 0!==n&&n.unsubscribeAll(this)}}_destroyPanePaneViews(e){const t=this._paneViews.get(e);if(void 0!==t)for(const e of t)e.destroy&&e.destroy();void 0!==e&&e.onDestroyed().unsubscribeAll(this),this._paneViews.delete(e)}_copyPricesWithoutNormalization(){const e=Math.min(this._points.length,this._timePoint.length);for(let t=0;t{e.getAlert((0,r.ensureDefined)(this._alertId),{success:t,error:i})}))}async _syncAlertWithAlertFacade(e={}){try{const t=await this.getAlert();if(!t)return;if(this._addAlertSubscriptions(t,e),e.syncAlertFocus){const e=this._model.selection().isSelected(this);t.setSelected(e)}}catch(e){if(e instanceof Error&&"not_exists"===e.message&&this.hasAlert().value()){this._alertStatus.setValue(0);return void(await(0,p.getChartAlertsFacade)()).removeAlertFromAllChartsSilently(this.id(),(0,r.ensureDefined)(this._alertId))}z.logError("Failed to set alert, alert will not be saved with drawing in chart")}}}},968361:(e,t,i)=>{"use strict";t.LineToolFibRetracement=i(498995).LineToolFibRetracement,t.LineToolFibChannel=i(965989).LineToolFibChannel,t.LineToolFibSpeedResistanceArcs=i(974472).LineToolFibSpeedResistanceArcs,t.LineToolProjection=i(506416).LineToolProjection,t.LineToolTrendBasedFibExtension=i(882980).LineToolTrendBasedFibExtension,t.LineToolElliott=i(960690).LineToolElliott,t.LineToolFibCircles=i(953718).LineToolFibCircles,t.LineToolVertLine=i(43653).LineToolVertLine,t.LineToolCrossLine=i(73217).LineToolCrossLine,t.LineToolBarsPattern=i(180148).LineToolBarsPattern,t.LineToolTrendBasedFibTime=i(418219).LineToolTrendBasedFibTime,t.LineToolFibTimeZone=i(958849).LineToolFibTimeZone,t.LineToolCircleLines=void 0,t.LineToolDateRange=i(727264).LineToolDateRange,t.LineToolPriceRange=i(830695).LineToolPriceRange,t.LineToolDateAndPriceRange=i(836843).LineToolDateAndPriceRange,t.LineToolParallelChannel=i(247035).LineToolParallelChannel,t.LineToolTrendAngle=i(167723).LineToolTrendAngle,t.LineToolTrendLine=i(956268).LineToolTrendLine,t.LineToolInfoLine=i(933513).LineToolInfoLine,t.LineToolArrowMark=i(41394).LineToolArrowMark,t.LineToolImage=i(17329).LineToolImage,t.LineToolPitchfan=i(932732).LineToolPitchfan,t.LineToolGannSquare=i(168853).LineToolGannSquare,t.LineToolFibSpeedResistanceFan=i(63491).LineToolFibSpeedResistanceFan,t.LineToolGannComplex=i(833762).LineToolGannComplex,t.LineToolGannFixed=i(839386).LineToolGannFixed,t.LineToolGannFan=i(643442).LineToolGannFan,t.LineToolFibWedge=i(781811).LineToolFibWedge,t.LineToolPitchfork=i(9093).LineToolPitchfork,t.LineToolDisjointAngle=i(709638).LineToolDisjointChannel,t.LineToolFlatBottom=i(634659).LineToolFlatBottom,t.LineToolIcon=i(618117).LineToolIcon,t.LineToolEmoji=i(167843).LineToolEmoji,t.LineToolSticker=i(882626).LineToolSticker,t.LineToolRotatedRectangle=i(605703).LineToolRotatedRectangle,t.LineToolFibSpiral=void 0,t.LineToolHeadAndShoulders=i(336471).LineToolHeadAndShoulders,t.LineToolTriangle=i(287743).LineToolTriangle,t.LineToolTrianglePattern=i(948653).LineToolTrianglePattern,t.LineTool5PointsPattern=i(147985).LineTool5PointsPattern,t.LineToolThreeDrivers=i(521600).LineToolThreeDrivers,t.LineToolABCD=i(78).LineToolABCD,t.LineToolPolyline=i(527342).LineToolPolyline,t.LineToolPath=i(999432).LineToolPath,t.LineToolPrediction=i(240569).LineToolPrediction,t.LineToolPriceLabel=i(729443).LineToolPriceLabel,t.LineToolPriceNote=void 0,
t.LineToolNote=void 0,t.LineToolNoteAbsolute=void 0,t.LineToolArrowMarker=i(683396).LineToolArrowMarker,t.LineToolSignpost=i(812788).LineToolSignpost,t.LineToolBrush=i(271133).LineToolBrush,t.LineToolArc=i(907416).LineToolArc,t.LineToolCallout=i(844295).LineToolCallout,t.LineToolBalloon=i(179180).LineToolBalloon,t.LineToolComment=i(768574).LineToolComment,t.LineToolText=i(520259).LineToolText,t.LineToolHorzLine=i(994761).LineToolHorzLine,t.LineToolHorzRay=i(867716).LineToolHorzRay,t.LineToolRectangle=i(442724).LineToolRectangle,t.LineToolCircle=i(638202).LineToolCircle,t.LineToolEllipse=i(43853).LineToolEllipse,t.LineToolTimeCycles=i(36459).LineToolTimeCycles,t.LineToolSineLine=i(305480).LineToolSineLine,t.LineToolGhostFeed=i(711755).LineToolGhostFeed,t.LineToolBezierQuadro=i(516487).LineToolBezierQuadro,t.LineToolBezierCubic=i(511628).LineToolBezierCubic,t.LineToolArrow=i(548160).LineToolArrow,t.LineToolRay=i(352747).LineToolRay,t.LineToolExtended=i(252598).LineToolExtended,t.LineToolSchiffPitchfork=i(115137).LineToolSchiffPitchfork,t.LineToolSchiffPitchfork2=i(126144).LineToolSchiffPitchfork2,t.LineToolInsidePitchfork=i(478760).LineToolInsidePitchfork,t.LineToolTextAbsolute=i(520259).LineToolTextAbsolute,t.LineToolArrowMarkLeft=i(41394).LineToolArrowMarkLeft,t.LineToolArrowMarkRight=i(41394).LineToolArrowMarkRight,t.LineToolArrowMarkUp=i(41394).LineToolArrowMarkUp,t.LineToolArrowMarkDown=i(41394).LineToolArrowMarkDown,t.LineToolFlagMark=i(218032).LineToolFlagMark,t.LineToolCypherPattern=i(224777).LineToolCypherPattern,t.LineToolElliottImpulse=i(960690).LineToolElliottImpulse,t.LineToolElliottTriangle=i(960690).LineToolElliottTriangle,t.LineToolElliottTripleCombo=i(960690).LineToolElliottTripleCombo,t.LineToolElliottCorrection=i(960690).LineToolElliottCorrection,t.LineToolElliottDoubleCombo=i(960690).LineToolElliottDoubleCombo,t.LineToolRiskRewardLong=i(864555).LineToolRiskRewardLong,t.LineToolRiskRewardShort=i(864555).LineToolRiskRewardShort,t.LineToolPosition=i(674053).LineToolPosition,t.LineToolOrder=i(778737).LineToolOrder,t.LineToolHighlighter=i(680330).LineToolHighlighter,t.LineToolTweet=i(623336).LineToolTweet,t.LineToolIdea=i(900569).LineToolIdea},832733:(e,t,i)=>{"use strict";i.d(t,{lineToolsStudyIds:()=>n});const n={LineToolAnchoredVWAP:"AnchoredVWAP@tv-basicstudies",LineToolRegressionTrend:"RegressionTrend@tv-basicstudies",LineToolFixedRangeVolumeProfile:"VbPFixed@tv-basicstudies",LineToolVbPFixed:"VbPFixed@tv-volumebyprice"};{const e={LineToolAnchoredVolumeProfile:"VbPAnchored@tv-basicstudies"};for(const[t,i]of Object.entries(e))n[t]=i}},817724:(e,t,i)=>{"use strict";i.d(t,{StudyLineDataSource:()=>y});var n=i(195447),r=i(821979),o=i(853965),s=i(526075),l=i(484812),a=i(62745),d=i(114315),u=i(799567),c=i(989709),h=i(470452),p=i(964824),m=i(7288),f=i(985715);class v extends f.StatusProviderBase{constructor(e){super(),this._source=e}errorStatus(){const e=this._source.status();return e.type===m.StudyStatusType.Error?{error:this.sourceStatusText(),solutionId:(0,m.studyStatusSolutionId)(e),title:(0,
m.studyStatusTitle)(e),studyFeature:(0,m.studyStatusFeature)(e)}:null}getSplitTitle(){return this._source.titleInParts()}text(){return this._source.translatedType()}sourceStatusText(){return(0,m.convertStudyStatusToString)(this._source.status(),!0)}}var g=i(572230),_=i(855353);class y extends r.LineDataSource{constructor(e,t,n,r,o,s){super(e,r,o,s),this._indexes=null,this._inputs=null,this._definitionsViewModel=null,this._pointsetPoints=null,this._loadedPlots=null,this._loadedGraphics=null,this._beingCreatedPaneView=null,this._anchorsPaneView=null,this._isLegendDisplayed=!1,Promise.all([Promise.all([i.e(36827),i.e(7879),i.e(35367),i.e(35698),i.e(13207),i.e(51583)]).then(i.bind(i,67663)),Promise.all([i.e(36827),i.e(7879),i.e(35367),i.e(35698),i.e(13207),i.e(51583)]).then(i.bind(i,199258))]).then((t=>{const{LineToolBeingCreatedPaneView:i}=t[0],{StudyLineDataSourceAnchorsPaneView:n}=t[1];this._beingCreatedPaneView=new i(this,e),this._anchorsPaneView=new n(this,this.model()),this._model.lightUpdate()})),this._metaInfo=t,this._dataSource=new d.ExtendedStudyDataSource(e.chartApi(),e.mainSeries(),n,t),this._dataSource.dataCleared().subscribe(this,this._onDataCleared),this._dataSource.dataUpdated().subscribe(this,this._onDataUpdated),this._dataSource.studyStatusChanged().subscribe(this,this._onStudyStatusChanged),this._statusProvider=new v(this),this._statusView=new _.LineToolStudyStatusView(this),this._showStudyArgumentsProperty=e.properties().childs().paneProperties.childs().legendProperties.childs().showStudyArguments}isDisplayedInLegend(){return this._isLegendDisplayed}titleInParts(){const e=[];if(this._showStudyArgumentsProperty.value()&&this._inputs)for(const t of this._metaInfo.inputs){if(!0===t.isHidden||"bool"===t.type)continue;const i=this._inputs[t.id];e.push(i.toString())}return[this.name(),e]}destroy(){this._dataSource.dataUpdated().unsubscribeAll(this),this._dataSource.dataCleared().unsubscribeAll(this),this._dataSource.studyStatusChanged().unsubscribeAll(this),this._dataSource.destroy(),null!==this._definitionsViewModel&&(this._definitionsViewModel.destroy(),this._definitionsViewModel=null),this._unsubscribeApplyInputsOnSeriesCompleted(),this._isDestroyed=!0,super.destroy()}stop(){super.stop(),this._isDestroyed||(this._dataSource.stop(),this.clearData())}start(){super.start(),this._isDestroyed||null===this._inputs||this._dataSource.start()}metaInfo(){return this._metaInfo}graphicsInfo(){return this._metaInfo.graphics}series(){return this._model.mainSeries()}translatedType(){return this._metaInfo.description}name(){return this._metaInfo.description}studyId(){return this._metaInfo.id}setPoint(e,t,i){super.setPoint(e,this._preparePoint(t,i))}move(e){}clearData(){this._clearAllDataExceptPointsetPoints(),this._pointsetPoints=null,this.updateAllViews((0,p.sourceChangeEvent)({sourceId:this.id(),clearData:!0})),super.clearData()}data(){return this.plots()}plots(){return this._loadedPlots||this._dataSource.plots()}graphics(){return this._loadedGraphics||this._dataSource.graphics()}valueAt(e,t){var i,n
;return null!==(n=null===(i=this.ownerSource())||void 0===i?void 0:i.symbolSource().valueAt(e,t))&&void 0!==n?n:null}firstValue(){return this._model.mainSeries().firstValue()}state(e){const t={...super.state(e),metaInfo:this.metaInfo().state()};return e&&(t.data=this.plots().state(),t.nonseriesindexes=this._indexes,t.graphics=(0,l.saveStudyGraphics)(this.graphics(),null)),t}restoreData(e){var t;void 0!==e.data&&(this._loadedPlots=new n.PlotList((0,c.studyPlotFunctionMap)(this._metaInfo),c.studyEmptyPlotValuePredicate),this._loadedPlots.restoreState(e.data)),this._indexes=null!==(t=e.nonseriesindexes)&&void 0!==t?t:this._indexes,this._loadedGraphics=e.graphics?(0,l.loadStudyGraphics)(e.graphics):this._loadedGraphics}getPropertyDefinitionsViewModel(){return null===this._definitionsViewModel?this._getPropertyDefinitionsViewModelClass().then((e=>null===e||this._isDestroyed?null:(null===this._definitionsViewModel&&(this._definitionsViewModel=new e(this._model.undoModel(),this)),this._definitionsViewModel))):Promise.resolve(this._definitionsViewModel)}paneViews(e){let t=[];if(this.isSourceHidden())return t;if(this._isReady()&&this._changeStatesStack.isEmpty()){const i=super.paneViews(e);null!==i&&(t=t.concat(i))}else null!==this._beingCreatedPaneView&&t.push(this._beingCreatedPaneView);return null!==this._anchorsPaneView&&t.push(this._anchorsPaneView),t}propertiesChanged(e){super.propertiesChanged(e),this._onStudyInputsMayChange()}dataAndViewsReady(){return super.dataAndViewsReady()&&this._isReady()}endChanging(e,t){const i=super.endChanging(e,t);return i.indexesChanged?this.clearData():this._updateAnchorsPrice(!0),i}moveData(e){this._dataSource.moveData(e)}restorePoints(e,t,i){super.restorePoints(e,t,i),this._updateAnchorsPrice(!0)}statusProvider(e){return this._statusProvider}statusView(){return this._statusView}legendView(){return null}dataProblemModel(){return null}dataUpdatedModeModel(){return null}marketStatusModel(){return null}onStatusChanged(){return this._dataSource.studyStatusChanged()}status(){return this._dataSource.studyStatus()}recalcStudyIfNeeded(){}static createPropertiesFromStudyMetaInfoAndState(e,t,i,n){const r=(0,h.prepareStudyPropertiesForLoadChart)(e,t,i,n);return this._configureProperties(r),r}_onStudyStatusChanged(e,t){let i;switch(t.type){case u.StudyStatusType.Error:i=!0;break;case u.StudyStatusType.Completed:i=!1;break;default:return}if(i===this._isLegendDisplayed)return;this._isLegendDisplayed=i;const n=this._model.paneForSource(this);if(n){const e=this._model.panes().indexOf(n),t=g.InvalidationMask.invalidateLegendWidgetLayout(e);this.model().invalidate(t)}}_studyId(){return this._dataSource.studyId()}_isReady(){return!0}_updateAllPaneViews(e){var t,i;super._updateAllPaneViews(e),null===(t=this._beingCreatedPaneView)||void 0===t||t.update(),null===(i=this._anchorsPaneView)||void 0===i||i.update(e)}_getPointTime(e,t){const i=e.index,n=this._model.timeScale().indexToTimePoint(i);return null!==n?n:t||void 0===e.time?null:this._utcTimeInCurrentResolution(e)}_updateAnchorsPrice(e){}
_onPointsetUpdated(e){super._onPointsetUpdated(e),this._pointsetPoints=this._points.map((e=>({price:e.price,index:e.index,time:e.time}))),this._onStudyInputsMayChange()}_onDataCleared(){this.updateAllViews((0,p.sourceChangeEvent)({sourceId:this.id(),clearData:!0})),this._model.updateSource(this)}_onDataUpdated(e,t,i){var n;this._updateAnchorsPrice(),this.updateAllViews((0,p.sourceChangeEvent)({sourceId:this.id(),firstUpdatedTimePointIndex:null===(n=e[0])||void 0===n?void 0:n.index})),this._model.updateSource(this)}_onStudyInputsMayChange(){let e=null;if(null!==this._pointsetPoints&&this._pointsetPoints.length===this.pointsCount()&&(e=this._studyInputs(this._pointsetPoints),null===e&&(this._clearAllDataExceptPointsetPoints(),this.updateAllViews((0,p.sourceChangeEvent)(this.id())))),null!==e){const t=this.metaInfo().inputs.map((e=>e.id)),i=Object.keys(e);for(const n of i)t.includes(n)||delete e[n]}this._areInputsEqual(this._inputs,e)||this._applyStudyInputs(e)}_preparePoint(e,t){return super._preparePoint(this._alignPointToRangeOfActualData(e),t)}_getPropertyDefinitionsViewModelClass(){return Promise.resolve(null)}_subscribeApplyInputsOnSeriesCompleted(){this._unsubscribeApplyInputsOnSeriesCompleted(),this._model.mainSeries().dataEvents().completed().subscribe(this,(()=>this._onStudyInputsMayChange()),!0)}_unsubscribeApplyInputsOnSeriesCompleted(){this._model.mainSeries().dataEvents().completed().unsubscribeAll(this)}_onInputsChanged(){this.hasAlert().value()&&(this._localAndServerAlertsMismatch=!0)}_clearAllDataExceptPointsetPoints(){this._inputs=null,this._dataSource.clearData(),this._loadedPlots=null,this._indexes=null,this._loadedGraphics=null}static _createPropertiesFromStudyIdAndState(e,t){const i=s.StudyMetaInfo.getStudyPropertyRootNameById(e),n=new o.DefaultProperty({defaultName:i,state:t});return this._configureProperties(n),n}static _configureProperties(e){super._configureProperties(e),e.removeExcludedKey("intervalsVisibilities",1)}_areInputsEqual(e,t){return null===t?null===e:null!==e&&(0,a.areStudyInputsEqual)(this._metaInfo.inputs,e,t)}_applyStudyInputs(e){const t=this._inputs;this._inputs=e,null!==e&&(this._unsubscribeApplyInputsOnSeriesCompleted(),this._dataSource.setInputs(e),null===t&&this.isStarted()&&!this._dataSource.isStarted()&&this._dataSource.start()),this._onInputsChanged()}}},477227:(e,t,i)=>{"use strict";const n=i(821979).LineDataSource,r=i(593804).alignToStep,o=(i(551775).customFormatters,i(444331).createSeriesFormatter);class s extends n{constructor(e,t){super(e,t),this.customization.forcePriceAxisLabel=!0,this.customization.disableErasing=!0,this.customization.showInObjectsTree=!1,this._createFormatter(e.mainSeries().symbolInfo()),this.setSelectionEnabled(!1)}isSynchronizable(){return!1}pointsCount(){return s.POINTS_COUNT}hasContextMenu(){return!1}state(){return null}startMoving(){super.startMoving.apply(this,arguments),this._cursorMoved=!1}endMoving(){super.endMoving.apply(this,arguments),this._cursorMoved=!1}userEditEnabled(){return!0}movable(){return!1}canBeHidden(){return!1}
isUserDeletable(){return!1}showInObjectTree(){return!1}doesMovingAffectsUndo(){return!1}isAvailableInFloatingWidget(){return!1}timeAxisViews(){return null}cloneable(){return!1}copiable(){return!1}_correctPoints(e,t){this._currentMovingPoint&&this._startMovingPoint?this._currentMovingPoint.logical.price-this._startMovingPoint.logical.price&&(this._cursorMoved=!0):this._cursorMoved=!1;for(var i=1/this.priceScale().mainSource().base(),n=0;n{"use strict";i.r(t),i.d(t,{globalChangeEvent:()=>s,selectionChangeEvent:()=>u,sourceChangeEvent:()=>r,viewportChangeEvent:()=>a});var n=i(827147);function r(e){return(0,n.default)(e)?{type:"data-source-change",sourceId:e}:{type:"data-source-change",...e}}const o={type:"global-change"};function s(){return o}const l={type:"viewport-change"};function a(){return l}const d={type:"selection-change"};function u(){return d}},535698:(e,t,i)=>{"use strict";i.d(t,{TextRenderer:()=>D,calculateLabelPosition:()=>f,fontSize:()=>E,getTextBoundaries:()=>v,lineSpacing:()=>C,needTextExclusionPath:()=>g,wordWrap:()=>I});var n=i(86441),r=i(650151),o=i(934026),s=i(31341),l=i(315801),a=i(787123),d=i(253972),u=i(389137),c=i(199471),h=i(458963),p=i(674981),m=i(294162);function f(e,t,i,r,o){const s=.5*(t.x+i.x);let l=i.y;return t.y>i.y?(l-=e.height/2+r.y,l=Math.max(e.height/2,l)):(l+=e.height/2+r.y,l=Math.min(o-e.height/2,l)),new n.Point(s,l)}function v(e,t,i){if(e.isOutOfScreen(t,i))return null;const n=e.getPolygonPoints();return 0===n.length?null:n}function g(e){const t=e.getLinesInfo().lines;if(t.length%2==0)return!1;if(""===t[Math.floor(t.length/2)].text.trim())return!1;return!0}function _(e){const t=[];do{const i=e.match(/\s+/);if(!i||void 0===i.index||-1===i.index){t.push({word:e,spaces:""});break}t.push({word:e.slice(0,i.index),spaces:i[0]}),e=e.slice(i.index+i[0].length)}while(e.length);return t}function y(e,t,i,n){const r=[],o=[];for(let t=0;t(0,c.measureText)(e.slice(0,r+1),t,i).width>n),0,e.length));r.push(e.slice(0,s)),e=e.slice(s)}return r}function I(e,t,i,n=!0,r){r=(0,u.isString)(r)?parseInt(r):r;const o=(e+="").split(/\r\n|\r|\n|$/).map((e=>({text:e,hidden:!1,wrappedLinePart:!1,wrappedLineEnd:!1})));if(!(0,u.isNumber)(r)||!isFinite(r)||r<=0)return o;if((0,c.measureText)("x",t,i).width>r)return o;const s=[];for(let e=0;er){if(""!==u)s.push({text:u,hidden:!1,wrappedLinePart:d,wrappedLineEnd:!1}),u="";else if(1===o.length)s.push({text:o,hidden:!1,wrappedLinePart:d,wrappedLineEnd:!0}),e.word="";else{const n=y(o,t,i,r);for(let e=0;e0,wrappedLinePart:d,wrappedLineEnd:h===a.length-1&&e===m.length-1};i.hidden&&n||s.push(i)}u="",h+=1}""!==u&&s.push({text:u,wrappedLinePart:d,hidden:!1,wrappedLineEnd:!0})}return s}function x(e,t,i){if(0===i)return e.clone();const r=(e.x-t.x)*Math.cos(i)-(e.y-t.y)*Math.sin(i)+t.x,o=(e.x-t.x)*Math.sin(i)+(e.y-t.y)*Math.cos(i)+t.y;return new n.Point(r,o)}function w(e,t){var i,n,r;const o=null===(i=e.decorator)||void 0===i?void 0:i.geometry(e),s=Math.round(t+P(e)+A(e)+(null!==(n=null==o?void 0:o.width)&&void 0!==n?n:0)+(0===e.text.length?0:null!==(r=null==o?void 0:o.decoratorAndTextMargin)&&void 0!==r?r:0));return s%2?s+1:s}function T(e,t){return E(e)*t+C(e)*(t-1)+2*b(e)}function b(e){return void 0!==e.boxPaddingVert?e.boxPaddingVert*M(e):void 0!==e.boxPadding?e.boxPadding*M(e):E(e)/3}function S(e){return void 0!==e.boxPaddingHorz?e.boxPaddingHorz*M(e):void 0!==e.boxPadding?e.boxPadding*M(e):E(e)/3}function P(e){return void 0!==e.boxPaddingLeft?e.boxPaddingLeft*M(e):S(e)}function A(e){return void 0!==e.boxPaddingRight?e.boxPaddingRight*M(e):S(e)}function C(e){return(e.padding||0)*M(e)}function E(e){return Math.ceil(L(e)*M(e))}function L(e){return e.fontsize||e.fontSize||30}function M(e){const t=Math.min(1,Math.max(.2,Math.min(e.scaleX||1,e.scaleY||1)));if(1===t)return t;const i=L(e);return Math.ceil(t*i)/i}class D{constructor(e,t){this._data=null,this._textWidthCache=new m.TextWidthCache,this._internalData=null,this._boxSize=null,this._polygonPoints=null,this._linesInfo=null,this._fontInfo=null,this._centerTextRotationPoint=null,this._rotationPoint=null,this._hitTest=t||new l.HitTestResult(l.HitTarget.MovePoint,{areaName:l.AreaName.Text}),void 0!==e&&this.setData(e)}setHitTest(e){this._hitTest=e}data(){return this._data}setData(e){null!==e?(void 0===e.text&&(e.text=""),e.horzTextAlign||(e.horzTextAlign=e.horzAlign),!function(e,t){if(null===e||null===t)return null===e==(null===t);if(void 0===e.points!=(void 0===t.points))return!1;if(void 0!==e.points&&void 0!==t.points){if(e.points.length!==t.points.length)return!1;for(let r=0;re){const i=(0,n.box)(new n.Point(0,0),new n.Point(e,t));return this.getPolygonPoints().every((e=>!(0,o.pointInBox)(e,i)))}return!1}setPoints(e,t){(0,r.ensureNotNull)(this._data).points=e,this._hitTest=t||new l.HitTestResult(l.HitTarget.MovePoint)}setPoint(e,t,i){const n=(0,r.ensureNotNull)(this._data);this.setData({...n,points:[e],offsetX:null!=t?t:n.offsetX,offsetY:null!=i?i:n.offsetY})}point(){var e,t,i;return null!==(i=null===(t=null===(e=this._data)||void 0===e?void 0:e.points)||void 0===t?void 0:t[0])&&void 0!==i?i:null}fontStyle(e){return null===this._data?"":this._getFontInfo().fontStyle}lineHeight(){return null===this._data?0:E(this._data)}lineSpacing(){return null===this._data?0:C(this._data)}draw(e,t){var i;if(null===this._data||void 0===this._data.points||0===this._data.points.length)return;const{mediaSize:o,horizontalPixelRatio:s,verticalPixelRatio:l}=t;if(this.isOutOfScreen(o.width,o.height))return;const d=this._getInternalData(),u=(0,r.ensureNotNull)(this.rotation()),p=(0,n.point)(u.x*s,u.y*l);e.save(),0!==u.angle&&(e.translate(p.x,p.y),e.rotate(u.angle),e.translate(-p.x,-p.y));const m=this._getFontInfo().fontSize;e.textBaseline=d.textBaseLine,e.textAlign=d.textAlign,
e.font=this.fontStyle();const{scaledLeft:f,scaledRight:v,scaledTop:g,scaledBottom:_}=function(e,t){const{horizontalPixelRatio:i,verticalPixelRatio:n}=t,r=Math.round(e.boxLeft*i),o=Math.round(e.boxTop*n);return{scaledLeft:r,scaledRight:r+Math.round(e.boxWidth*i),scaledTop:o,scaledBottom:o+Math.round(e.boxHeight*n)}}(d,t);if(this._data.backgroundColor||this._data.borderColor||this._data.highlightBorder&&this._data.wordWrapWidth){const t=this._data.borderWidth||Math.max(m/12,1),i=Math.round(t*s),n=i/2;let r=!1;if(this._data.boxShadow){e.save();const{shadowColor:t,shadowBlur:i,shadowOffsetX:n=0,shadowOffsetY:o=0}=this._data.boxShadow;e.shadowColor=t,e.shadowBlur=i,e.shadowOffsetX=n,e.shadowOffsetY=o,r=!0}if(this._data.backgroundRoundRect)this._data.backgroundColor&&((0,a.drawRoundRect)(e,f,g,v-f,_-g,this._data.backgroundRoundRect*s),e.fillStyle=this._data.backgroundColor,e.fill(),r&&(e.restore(),r=!1)),this._data.borderColor&&((0,a.drawRoundRect)(e,f-n,g-n,v-f+i,_-g+i,this._data.backgroundRoundRect*s+i),e.strokeStyle=this._data.borderColor,e.lineWidth=i,e.stroke(),r&&(e.restore(),r=!1));else if(this._data.backgroundColor&&(e.fillStyle=this._data.backgroundColor,e.fillRect(f,g,v-f,_-g),r&&(e.restore(),r=!1)),this._data.borderColor||this._data.highlightBorder){let t;this._data.borderColor?(e.strokeStyle=this._data.borderColor,t=i):(e.strokeStyle=this._data.highlightBorderColor||this._data.color,(0,a.setLineStyle)(e,h.LINESTYLE_DASHED),t=Math.max(1,Math.floor(s))),e.lineWidth=t,e.beginPath(),e.moveTo(f-t/2,g-t/2),e.lineTo(f-t/2,_+t/2),e.lineTo(v+t/2,_+t/2),e.lineTo(v+t/2,g-t/2),e.lineTo(f-t/2,g-t/2),e.stroke(),r&&e.restore()}}this._drawSelectionIfNeeded(e,t),e.fillStyle=this._data.color;const y=(f+Math.round(d.textHorizStart*s))/s,I=.05*m;let x=(g+Math.round((d.textVertStart+I)*l))/l;const w=C(this._data),T=this.getLinesInfo();for(const t of T.lines)(0,c.drawScaled)(e,s,l,(()=>e.fillText(t.text,y,x))),x+=m+w;null===(i=this._data.decorator)||void 0===i||i.draw(e,t,this._data,d),e.restore()}getPolygonPoints(){if(null!==this._polygonPoints)return this._polygonPoints;if(null===this._data)return[];const e=this._data.angle||0,{boxLeft:t,boxTop:i,boxWidth:r,boxHeight:o}=this._getInternalData(),s=this._getRotationPoint();return this._polygonPoints=[x(new n.Point(t,i),s,e),x(new n.Point(t+r,i),s,e),x(new n.Point(t+r,i+o),s,e),x(new n.Point(t,i+o),s,e)],this._polygonPoints}centerTextRotation(){var e;if(null===this._centerTextRotationPoint&&null!==this._data){const t=null!==(e=this._data.angle)&&void 0!==e?e:0,i=this._getRotationPoint(),{textLeft:r,textTop:o,textRight:s,textBottom:l}=this._getInternalData(),a=x(new n.Point((r+s)/2,(o+l)/2),i,t);this._centerTextRotationPoint={x:a.x,y:a.y,angle:t}}return this._centerTextRotationPoint}rotation(){var e;if(null===this._rotationPoint&&null!==this._data){const t=null!==(e=this._data.angle)&&void 0!==e?e:0,i=this._getRotationPoint();this._rotationPoint={x:i.x,y:i.y,angle:t}}return this._rotationPoint}getLinesInfo(){if(null===this._linesInfo){const e=(0,
r.ensureNotNull)(this._data),t=I(e.text,this.fontStyle(),this._textWidthCache,!1,e.wordWrapWidth);let i=t.filter((e=>!e.hidden));if(void 0!==e.maxHeight){const t=function(e){const t=(0,r.ensureDefined)(e.maxHeight),i=E(e),n=C(e);return Math.floor((t+n)/(i+n))}(e);i.length>t&&(i=i.slice(0,t))}this._linesInfo={linesMaxWidth:this._getLinesMaxWidth(i),linesIncludingHidden:t,lines:i}}return this._linesInfo}positionToCoordinate(e){const t=(0,r.ensureNotNull)(this._data),i=this._getInternalData(),n=this.getLinesInfo(),{x:o,y:s,lineNumber:l}=(0,d.getSymbolCoordinatesInfo)({symbolPosition:e,textWidth:i.textRight-i.textLeft,textByLines:n.linesIncludingHidden,lineHeight:E(t),font:this.fontStyle(),textAlign:i.textAlign,lineSpacing:this.lineSpacing()});return{x:o+i.textLeft,y:s+i.textTop,lineNumber:l}}_getInternalData(){var e,t,i;if(null!==this._internalData)return this._internalData;const n=(0,r.ensureNotNull)(this._data),o=this._getBoxSize(),l=o.boxWidth,a=o.boxHeight,d=(0,r.ensureDefined)(n.points)[0];let u=d.y;switch(n.vertAlign){case"bottom":u-=a+n.offsetY;break;case"middle":u-=a/2;break;case"top":u+=n.offsetY}let c=d.x;const h=P(n),p=A(n),m=b(n),f=null===(e=n.decorator)||void 0===e?void 0:e.geometry(n),v=null!==(t=null==f?void 0:f.width)&&void 0!==t?t:0,g=0===n.text.length?0:null!==(i=null==f?void 0:f.decoratorAndTextMargin)&&void 0!==i?i:0,_=null==f?void 0:f.ignoreRtl,y=v+g;let I;const x=u+m+E(n)/2;let w;switch(n.horzAlign){case"left":c+=n.offsetX;break;case"center":c-=l/2;break;case"right":c-=l+n.offsetX}const T=(0,s.isRtl)(),S=T&&!_,C=S?c+l-p-v:c+h;switch((0,r.ensureDefined)(n.horzTextAlign)){case"left":w="start",I=C+y,T&&(n.forceTextAlign?w="left":(I=S?C-g:c+l-p,w="right"));break;case"center":w="center";const e=l-h-p-y;I=S?C-g-e/2:C+y+e/2;break;case"right":w="end",I=S?C-g:c+l-p,T&&n.forceTextAlign&&(w="right")}return this._internalData={boxLeft:c,boxTop:u,boxWidth:l,boxHeight:a,textLeft:c+h+(S?0:y),textRight:c+l-p-(S?y:0),textTop:u+m,textBottom:u+a-m,textHorizStart:I-c,textVertStart:x-u,textAlign:w,textBaseLine:"middle",decoratorLeft:C,decoratorWidth:v},this._internalData}_getFontInfo(){if(null===this._fontInfo){const e=(0,r.ensureNotNull)(this._data),t=E(e),i=(e.bold?"bold ":"")+(e.italic?"italic ":"")+t+"px "+e.font;this._fontInfo={fontStyle:i,fontSize:t}}return this._fontInfo}_drawSelectionIfNeeded(e,t){const i=(0,r.ensureNotNull)(this._data),n=E((0,r.ensureNotNull)(this._data));if(i.selectionHighlight){const r=this.positionToCoordinate(i.selectionHighlight.start),o=this.positionToCoordinate(i.selectionHighlight.end),s=this._getInternalData();(0,d.drawSelection)(e,t,{lines:this.getLinesInfo().linesIncludingHidden,selectionStart:r,selectionEnd:o,left:s.textLeft,right:s.textRight,color:i.selectionHighlight.color,font:this.fontStyle(),lineHeight:n,lineSpacing:this.lineSpacing()})}}_getLinesMaxWidth(e){const t=this.fontStyle();if(null!==this._data&&this._data.wordWrapWidth&&!this._data.forceCalculateMaxLineWidth)return this._data.wordWrapWidth*M(this._data);let i=0;for(const n of e)i=Math.max(i,(0,
c.measureText)(n.text,t,this._textWidthCache).width);return i}_getBoxSize(){if(null===this._boxSize){const e=this.getLinesInfo(),t=(0,r.ensureNotNull)(this._data);this._boxSize={boxWidth:w(t,e.linesMaxWidth),boxHeight:T(t,e.lines.length)}}return this._boxSize}_getRotationPoint(){const{boxLeft:e,boxTop:t,boxWidth:i,boxHeight:o}=this._getInternalData(),{horzAlign:s,vertAlign:l}=(0,r.ensureNotNull)(this._data);let a,d;switch(s){case"center":a=e+i/2;break;case"left":a=e;break;case"right":a=e+i}switch(l){case"middle":d=t+o/2;break;case"top":d=t;break;case"bottom":d=t+o}return new n.Point(a,d)}}},195447:(e,t,i)=>{"use strict";i.d(t,{PlotList:()=>h,mergeMinMax:()=>p});var n=i(650151),r=i(674981),o=i(732149),s=i(201089),l=i(534741);const a=(0,s.getLogger)("Chart.PlotList"),d=30;function u(e){return e.index}function c(e){return e.value[0]}class h{constructor(e=null,t=null){this._items=[],this._start=0,this._end=0,this._shareRead=!1,this._minMaxCache=new Map,this._rowSearchCacheByIndex=new Map,this._rowSearchCacheByIndexWithoutEmptyValues=new Map,this._rowSearchCacheByTime=new Map,this._rowSearchCacheByTimeWithoutEmptyValues=new Map,this._plotFunctions=e||new Map,this._emptyValuePredicate=t}clear(){this._items=[],this._start=0,this._end=0,this._shareRead=!1,this._minMaxCache.clear(),this._invalidateSearchCaches()}first(){return this.size()>0?this._items[this._start]:null}last(){return this.size()>0?this._items[this._end-1]:null}firstIndex(){return this.size()>0?this._indexAt(this._start):null}lastIndex(){return this.size()>0?this._indexAt(this._end-1):null}clone(){const e=this.firstIndex(),t=this.lastIndex();return null===e||null===t?new h:this.range(e,t)}size(){return this._end-this._start}isEmpty(){return 0===this.size()}contains(e){return null!==this.search(e,l.PlotRowSearchMode.Exact)}valueAt(e){const t=this.search(e);return null!==t?t.value:null}add(e,t){if(this._shareRead)return a.logDebug("add: readonly collection modification attempt"),!1;const i={index:e,value:t},n=this._nonCachedSearch(e,l.PlotRowSearchMode.Exact,u);return this._invalidateSearchCaches(),null===n?(this._items.splice(this._lowerbound(e,u),0,i),this._start=0,this._end=this._items.length,!0):(this._items[n]=i,!1)}search(e,t=l.PlotRowSearchMode.Exact,i){return this._searchImpl(e,t,this._rowSearchCacheByIndex,this._rowSearchCacheByIndexWithoutEmptyValues,u,i)}searchByTime(e,t=l.PlotRowSearchMode.Exact,i){return this._searchImpl(e,t,this._rowSearchCacheByTime,this._rowSearchCacheByTimeWithoutEmptyValues,c,i)}fold(e,t){let i=t;for(let t=this._start;t=i;--t){const i=this._indexAt(t),n=this._valueAt(t);if(e(i,n))return{index:i,value:n}}return null}each(e){for(let t=this._start;tthis._start&&(t._start-=1),t}rangeCountback(e,t){if(null===this.firstIndex())return new h;const i=new h(this._plotFunctions,this._emptyValuePredicate);return i._items=this._items,i._end=this._upperbound(e),i._start=Math.max(this._start,i._end-t),i._shareRead=!0,i}rangeIterator(e,t){const i=this._lowerbound(e,u),n=this._upperbound(t);return this._rangeIteratorImpl(i,n)}fullRangeIterator(){return this._rangeIteratorImpl(this._start,this._end)}minMaxOnRangeCached(e,t,i){if(this.isEmpty())return null;let n=null;for(const r of i){n=p(n,this._minMaxOnRangeCachedImpl(e-r.offset,t-r.offset,r.name))}return n}minMaxOnRange(e,t,i){if(this.isEmpty())return null;let n=null;for(const r of i){n=p(n,this._minMaxOnRange(e-r.offset,t-r.offset,r.name))}return n}merge(e){return this._shareRead?(a.logDebug("merge: readonly collection modification attempt"),null):0===e.length?null:this.isEmpty()||e[e.length-1].indexthis._items[this._items.length-1].index?this._append(e):1===e.length&&e[0].index===this._items[this._items.length-1].index?(this._updateLast(e[0]),e[0]):this._merge(e)}addTail(e,t=!1){if(0===e.length)return;let i=0;t&&this._end-this._start>0&&(i=1,this._items[this._end-this._start-1].value=e[0].value);for(let t=i;tvoid 0!==e)).sort(((e,t)=>e.index-t.index)),this._invalidateSearchCaches(),this._minMaxCache.clear(),this._start=0,this._end=this._items.length}remove(e){if(this._shareRead)return a.logDebug("remove: readonly collection modification attempt"),null;const t=this._nonCachedSearch(e,l.PlotRowSearchMode.NearestRight,u);if(null===t)return null;const i=this._items.splice(t);return this._end=this._items.length,this._minMaxCache.clear(),this._invalidateSearchCaches(),i.length>0?i[0]:null}state(){const e=this._items.slice(this._start,this._end);return{start:0,end:e.length,data:e}}restoreState(e){e?(this._start=e.start,this._end=e.end,
this._shareRead=!1,this._items=e.data,this._minMaxCache.clear(),this._invalidateSearchCaches()):this.clear()}_indexAt(e){return this._items[e].index}_valueAt(e){return this._items[e].value}_length(){return this._items.length}_searchImpl(e,t,i,n,r,o){const s=void 0!==o?i:n,l=void 0!==o?1e4*(t+1)+o:t;let a=s.get(e);if(void 0!==a){const e=a.get(l);if(void 0!==e)return e}const d=this._nonCachedSearch(e,t,r,o);if(null===d)return null;const u={index:this._indexAt(d),value:this._valueAt(d)};return void 0===a&&(a=new Map,s.set(e,a)),a.set(l,u),u}_nonCachedSearch(e,t,i,n){const r=this._lowerbound(e,i),o=r===this._end||e!==i(this._items[r]);if(o&&t!==l.PlotRowSearchMode.Exact)switch(t){case l.PlotRowSearchMode.NearestLeft:return this._searchNearestLeft(r,n);case l.PlotRowSearchMode.NearestRight:return this._searchNearestRight(r,n);default:throw new TypeError("Unknown search mode")}if(void 0===n||o||t===l.PlotRowSearchMode.Exact)return o?null:r;switch(t){case l.PlotRowSearchMode.NearestLeft:return this._nonEmptyNearestLeft(r,n);case l.PlotRowSearchMode.NearestRight:return this._nonEmptyNearestRight(r,n);default:throw new TypeError("Unknown search mode")}}_nonEmptyNearestRight(e,t){const i=(0,n.ensure)(this._emptyValuePredicate),r=(0,n.ensure)(t);for(;e=this._start&&i(this._valueAt(e),r);)e-=1;return et(e)t.index>e),this._start,this._end)}_plotMinMax(e,t,i){let n=null;const r=this._plotFunctions.get(i);if(void 0===r)throw new Error(`Plot "${i}" is not registered`);for(let i=e;in.max&&(n.max=e)))}return n}_invalidateCacheForRow(e){const t=Math.floor(e.index/d);this._minMaxCache.forEach((e=>e.delete(t)))}_prepend(e){return(0,n.assert)(!this._shareRead,"collection should not be readonly"),(0,n.assert)(0!==e.length,"plotRows should not be empty"),this._invalidateSearchCaches(),this._minMaxCache.clear(),this._items=e.concat(this._items),this._start=0,this._end=this._items.length,e[0]}_append(e){return(0,n.assert)(!this._shareRead,"collection should not be readonly"),(0,n.assert)(0!==e.length,"plotRows should not be empty"),this._invalidateSearchCaches(),this._minMaxCache.clear(),this._items=this._items.concat(e),this._start=0,this._end=this._items.length,e[0]}_updateLast(e){(0,
n.assert)(!this.isEmpty(),"plot list should not be empty");const t=this._items[this._end-1];(0,n.assert)(t.index===e.index,"last row index should match new row index"),this._invalidateCacheForRow(e),this._invalidateSearchCaches(),this._items[this._end-1]=e}_merge(e){return(0,n.assert)(0!==e.length,"plot rows should not be empty"),this._invalidateSearchCaches(),this._minMaxCache.clear(),this._items=function(e,t){const i=function(e,t){const i=e.length,n=t.length;let r=i+n,o=0,s=0;for(;ot[s].index?s++:(o++,s++,r--);return r}(e,t),n=new Array(i);let r=0,o=0;const s=e.length,l=t.length;let a=0;for(;rt[o].index?(n[a]=t[o],o++):(n[a]=t[o],r++,o++),a++;for(;r(i+=1,i>=t?{done:!0,value:void 0}:{done:!1,value:this._items[i]})}}_invalidateSearchCaches(){this._rowSearchCacheByIndex.clear(),this._rowSearchCacheByIndexWithoutEmptyValues.clear(),this._rowSearchCacheByTime.clear(),this._rowSearchCacheByTimeWithoutEmptyValues.clear()}}function p(e,t){if(null===e)return t;if(null===t)return e;return{min:Math.min(e.min,t.min),max:Math.max(e.max,t.max)}}},229765:(e,t,i)=>{"use strict";i.d(t,{PriceAxisView:()=>o});var n=i(601183),r=i(246733);class o{constructor(e){this._commonRendererData={coordinate:0,textColor:"#FFF",background:"#000",additionalPaddingBottom:0,additionalPaddingTop:0},this._axisRendererData={text:"",visible:!1,separatorVisible:!1,borderVisible:!1,ignoreAdditionalPaddingInner:!1},this._paneRendererData={text:"",visible:!1,separatorVisible:!0,borderVisible:!1,ignoreAdditionalPaddingInner:!0},this._invalidated=!0,this._active=!1,this._axisRenderer=new(e||n.PriceAxisViewRenderer)(this._axisRendererData,this._commonRendererData),this._paneRenderer=new(e||n.PriceAxisViewRenderer)(this._paneRendererData,this._commonRendererData)}setActive(e){this._active=e}text(){return this._updateRendererDataIfNeeded(),this._axisRendererData.text}secondLineText(){return this._updateRendererDataIfNeeded(),this._axisRendererData.secondLine}thirdLineText(){return this._updateRendererDataIfNeeded(),this._axisRendererData.thirdLine}background(){return this._updateRendererDataIfNeeded(),
this._commonRendererData.background}color(){return this._updateRendererDataIfNeeded(),this.generateTextColor(this.background())}generateTextColor(e){return(0,r.colorFromBackground)(e)}coordinate(){return this._updateRendererDataIfNeeded(),this._commonRendererData.coordinate}floatCoordinate(){var e;return this._updateRendererDataIfNeeded(),null!==(e=this._commonRendererData.floatCoordinate)&&void 0!==e?e:this._commonRendererData.coordinate}update(e){this._invalidated=!0}topBottomTotalHeight(e){this._updateRendererDataIfNeeded();const{top:t,bottom:i,total:n}=this._axisRenderer.topBottomTotalHeight(e),{top:r,bottom:o,total:s}=this._paneRenderer.topBottomTotalHeight(e);return{top:Math.max(t,r),bottom:Math.max(i,o),total:Math.max(n,s)}}getFixedCoordinate(){return this._commonRendererData.fixedCoordinate||0}setFixedCoordinate(e){this._commonRendererData.fixedCoordinate=e}isVisible(){return this._updateRendererDataIfNeeded(),this._axisRendererData.visible||this._paneRendererData.visible}isAxisLabelVisible(){return this._updateRendererDataIfNeeded(),this._axisRendererData.visible}isPaneLabelVisible(){return this._updateRendererDataIfNeeded(),this._paneRendererData.visible}renderer(){return this._updateRendererDataIfNeeded(),this._axisRenderer}paneRenderer(){return this._updateRendererDataIfNeeded(),this._paneRenderer}setPaneRendererLabelIcon(e){this._paneRendererData.labelIcon=e}setPaneLabelVisible(e){this._paneRendererData.visible=e,this._invalidated=!0}ignoreAlignment(){return!1}_updateRendererDataIfNeeded(){this._invalidated&&(this._commonRendererData.fixedCoordinate=void 0,this._updateRendererData(this._axisRendererData,this._paneRendererData,this._commonRendererData),this._invalidated=!1)}}},197050:(e,t,i)=>{"use strict";i.d(t,{combineProperty:()=>s.combineProperty,createWVFromGetterAndSubscription:()=>n.createWVFromGetterAndSubscription,createWVFromGetterAndSubscriptions:()=>r.createWVFromGetterAndSubscriptions,createWVFromProperty:()=>o.createWVFromProperty});var n=i(824837),r=i(784547),o=i(936515),s=(i(154718),i(369689))},114315:(e,t,i)=>{"use strict";i.d(t,{ExtendedStudyDataSource:()=>o});var n=i(405721),r=i(470452);class o extends n.StudyDataSource{constructor(e,t,i,n){super(e,t.seriesSource(),i,n),this._series=t}_createStudyError(e){var t;return(0,r.createStudyError)(this._getStudyErrorDescription(e),null===(t=this._series.symbolInfo())||void 0===t?void 0:t.exchange)}}},323109:(e,t,i)=>{"use strict";i.d(t,{containsBackgroundTimePointIndexes:()=>s,dematerializeBackground:()=>a,isBackgroundInBarsRange:()=>d,materializeBackground:()=>l});var n=i(650151),r=i(732149),o=i(387963);const s=!0;function l(e,t){if(e.start>=t.length||e.stop>=t.length)return null;const i=t[e.start],o=t[e.stop];return o===r.INVALID_TIME_POINT_INDEX?null:((0,n.assert)(i===r.INVALID_TIME_POINT_INDEX||i<=o,"start should not exceed stop"),{start:i===r.INVALID_TIME_POINT_INDEX?null:i,stop:o})}function a(e,t,i){return{id:t,start:(0,o.ensureTimePointIndexIndex)(i.indexOf(null!==e.start?e.start:r.INVALID_TIME_POINT_INDEX)),stop:(0,
o.ensureTimePointIndexIndex)(i.indexOf(e.stop))}}function d(e,t){if(null===e.start)return t.firstBar()<=e.stop;const i=Math.min(e.start,e.stop),n=Math.max(e.start,e.stop);return t.contains(i)||t.contains(n)||it.lastBar()}},206395:(e,t,i)=>{"use strict";i.d(t,{DwgBoxFontType:()=>o,DwgBoxStyle:()=>n,containsDwgBoxTimePointIndexes:()=>d,dematerializeDwgBox:()=>c,isDwgBoxInBarsRange:()=>h,materializeDwgBox:()=>u});var n,r,o,s=i(732149),l=i(387963),a=i(92245);!function(e){e.Solid="sol",e.Dotted="dot",e.Dashed="dsh",e.LeftArrow="al",e.RightArrow="ar",e.BothArrow="ab"}(n||(n={})),function(e){e.Top="top",e.Center="center",e.Bottom="bottom"}(r||(r={})),function(e){e.Monospace="monospace"}(o||(o={}));const d=!0;function u(e,t){var i,n;if(e.x1>=t.length||e.x2>=t.length||null===e.y1||null===e.y2)return null;let r=t[e.x1],o=t[e.x2];return r===s.INVALID_TIME_POINT_INDEX&&(r=null),o===s.INVALID_TIME_POINT_INDEX&&(o=null),{left:r,right:o,top:e.y1,bottom:e.y2,borderColorIndex:e.c,backgroundColorIndex:e.bc,extend:e.ex,borderStyle:e.st,borderWidth:e.w,text:e.t,wordWrap:e.tw,horizontalTextAlignment:e.tha,verticalTextAlignment:e.tva,fontSize:e.ts,textColorIndex:null!==(i=e.tc)&&void 0!==i?i:null,fontType:null!==(n=e.tf)&&void 0!==n?n:null,forceOverlay:e.fo}}function c(e,t,i){var n,r,o;return{id:t,x1:(0,l.ensureTimePointIndexIndex)(i.indexOf(null!==(n=e.left)&&void 0!==n?n:s.INVALID_TIME_POINT_INDEX)),x2:(0,l.ensureTimePointIndexIndex)(i.indexOf(null!==(r=e.right)&&void 0!==r?r:s.INVALID_TIME_POINT_INDEX)),y1:e.top,y2:e.bottom,c:e.borderColorIndex,bc:e.backgroundColorIndex,ex:e.extend,st:e.borderStyle,w:e.borderWidth,t:e.text,tw:e.wordWrap,tha:e.horizontalTextAlignment,tva:e.verticalTextAlignment,ts:e.fontSize,tf:null!==(o=e.fontType)&&void 0!==o?o:void 0,tc:e.textColorIndex,fo:e.forceOverlay}}function h(e,t){const i=e.extend;if(i===a.DwgExtend.Both)return null===e.left||null===e.right;if(null===e.left||null===e.right)return null!==e.right?e.right<=t.lastBar()&&i===a.DwgExtend.Right:null!==e.left&&(e.left>=t.firstBar()&&i===a.DwgExtend.Left);const n=Math.min(e.left,e.right),r=Math.max(e.left,e.right);if(t.contains(n)||t.contains(r)||nt.lastBar())return!0;const o=e.leftt.lastBar()&&o}},92245:(e,t,i)=>{"use strict";i.d(t,{DwgExtend:()=>n,convertPointsToScreenDimension:()=>l,doesItemAffectVisibleRange:()=>a,isExtendInSameDirection:()=>s});var n,r=i(650151);function o(e,t){return e===n.None?t:t===n.None?e:e===n.Both||t===n.Both?n.Both:e===t?t:n.Both}function s(e,t){return e===n.Both||e===t}function l(e,t,i,s,l,a,d,u,c,h){let p,m;if(null===e&&null===i){if(l!==n.Right&&l!==n.Both)return null;l=n.Both,p=0,m=u}else null===e?(p=d.indexToCoordinate((0,r.ensureNotNull)(i)-1),l=o(l,n.Left)):p=d.indexToCoordinate(e),null===i?(m=d.indexToCoordinate((0,r.ensureNotNull)(e)-1),l=o(l,n.Right)):m=d.indexToCoordinate(i)
;const f=p,v=a.priceToCoordinate(t,c),g=m,_=a.priceToCoordinate(s,c);return void 0!==h?(h.x1=f,h.y1=v,h.x2=g,h.y2=_,h.extend=l,h):{x1:f,y1:v,x2:g,y2:_,extend:l}}function a(e,t,i,r,o){let s=!1;switch(i){case n.Both:s=!0;break;case n.Right:s=null===t||null===e||e<=o;break;case n.Left:s=null===t||t>=r;break;default:null!==e&&null!==t?s=(e>=r||t>=r)&&(e<=o||t<=o):null!==e&&null===t?s=e<=o:null===e&&null!==t&&(s=t>=r)}return s}!function(e){e.None="n",e.Left="l",e.Right="r",e.Both="b"}(n||(n={}))},294024:(e,t,i)=>{"use strict";i.d(t,{DwgLabelStyle:()=>o,DwgLabelTextAlign:()=>n,DwgLabelYloc:()=>r,containsDwgLabelTimePointIndexes:()=>d,dematerializeDwgLabel:()=>c,isDwgLabelInBarsRange:()=>h,materializeDwgLabel:()=>u});var n,r,o,s,l=i(732149),a=i(387963);!function(e){e.Left="left",e.Center="center",e.Right="right"}(n||(n={})),function(e){e.AboveBar="ab",e.BelowBar="bl",e.Price="pr",e.Auto="auto"}(r||(r={})),function(e){e.Xcross="xcr",e.Cross="cr",e.Triangleup="tup",e.Triangledown="tdn",e.Flag="flg",e.Circle="cir",e.Arrowup="aup",e.Arrowdown="adn",e.LabelUp="lup",e.LabelDown="ldn",e.LabelLeft="llf",e.LabelRight="lrg",e.LabelCenter="lcn",e.LabelLeftUp="luplf",e.LabelLeftDown="llwlf",e.LabelRightUp="luprg",e.LabelRightDown="llwrg",e.Square="sq",e.Diamond="dia",e.TextOutline="to",e.None="n"}(o||(o={})),function(e){e.Monospace="monospace"}(s||(s={}));const d=!0;function u(e,t){var i;if(e.x>=t.length)return null;const r=t[e.x];return r===l.INVALID_TIME_POINT_INDEX?null:{x:r,y:e.y,yloc:e.yl,text:e.t,style:e.st,size:e.sz,colorIndex:e.ci,textColorIndex:e.tci,textAlign:e.ta||n.Center,tooltip:e.tt||"",fontType:null!==(i=e.tf)&&void 0!==i?i:null,forceOverlay:e.fo}}function c(e,t,i){var n;return{id:t,x:(0,a.ensureTimePointIndexIndex)(i.indexOf(e.x)),y:e.y,yl:e.yloc,t:e.text,st:e.style,sz:e.size,ci:e.colorIndex,tci:e.textColorIndex,ta:e.textAlign,tt:e.tooltip,tf:null!==(n=e.fontType)&&void 0!==n?n:void 0,fo:e.forceOverlay}}function h(e,t){return t.contains(e.x)}},258940:(e,t,i)=>{"use strict";i.d(t,{DwgLineStyle:()=>n,containsDwgLineTimePointIndexes:()=>l,dematerializeDwgLine:()=>d,isDwgLineInBarsRange:()=>u,materializeDwgLine:()=>a});var n,r=i(732149),o=i(387963),s=i(92245);!function(e){e.Solid="sol",e.Dotted="dot",e.Dashed="dsh",e.LeftArrow="al",e.RightArrow="ar",e.BothArrow="ab"}(n||(n={}));const l=!0;function a(e,t){if(e.x1>=t.length||e.x2>=t.length||null===e.y1||null===e.y2)return null;let i=t[e.x1],n=t[e.x2];return i===r.INVALID_TIME_POINT_INDEX&&(i=null),n===r.INVALID_TIME_POINT_INDEX&&(n=null),null!==i&&null!==n||e.y1===e.y2?{id:e.id,x1:i,y1:e.y1,x2:n,y2:e.y2,style:e.st,extend:e.ex,width:e.w,colorIndex:e.ci,forceOverlay:e.fo}:null}function d(e,t,i){var n,s;const l=(0,o.ensureTimePointIndexIndex)(i.indexOf(null!==(n=e.x1)&&void 0!==n?n:r.INVALID_TIME_POINT_INDEX)),a=(0,o.ensureTimePointIndexIndex)(i.indexOf(null!==(s=e.x2)&&void 0!==s?s:r.INVALID_TIME_POINT_INDEX));return{id:t,x1:l,y1:e.y1,x2:a,y2:e.y2,st:e.style,ex:e.extend,w:e.width,ci:e.colorIndex,fo:e.forceOverlay}}function u(e,t){const i=e.extend
;if(i===s.DwgExtend.Both)return!0;if(null===e.x1||null===e.x2)return null!==e.x2?e.x2<=t.lastBar()&&i===s.DwgExtend.Right:null!==e.x1&&(e.x1>=t.firstBar()&&i===s.DwgExtend.Left);const n=Math.min(e.x1,e.x2),r=Math.max(e.x1,e.x2);if(t.contains(n)||t.contains(r)||nt.lastBar())return!0;const o=e.x1t.lastBar()&&o}},640073:(e,t,i)=>{"use strict";i.d(t,{DwgPolylineStyle:()=>s,containsDwgPolylineTimePointIndexes:()=>o,dematerializeDwgPolyline:()=>a,isDwgPolylineInBarsRange:()=>d,materializeDwgPolyline:()=>l});var n=i(387963),r=i(732149);const o=!0;var s;function l(e,t){const i=[];for(const n of e.points){if(n.x>=t.length)continue;const e=t[n.x];e!==r.INVALID_TIME_POINT_INDEX&&i.push({x:e,y:n.y})}return 0===i.length?null:{id:e.id,points:i,width:e.w,curved:e.crv,closed:e.cls,color:e.c,fillColor:e.fc,style:e.st,forceOverlay:e.fo}}function a(e,t,i){return{id:t,points:e.points.map((e=>{var t;return{x:(0,n.ensureTimePointIndexIndex)(i.indexOf(null!==(t=e.x)&&void 0!==t?t:r.INVALID_TIME_POINT_INDEX)),y:e.y}})),w:e.width,crv:e.curved,cls:e.closed,c:e.color,fc:e.fillColor,st:e.style,fo:e.forceOverlay}}function d(e,t){if(0===e.points.length)return!1;const i=t.firstBar(),n=t.lastBar();let r=!1,o=!1;for(const s of e.points){if(t.contains(s.x))return!0;if(s.xn&&(o=!0),r&&o)return!0}return!1}!function(e){e.Solid="sol",e.Dotted="dot",e.Dashed="dsh",e.ArrowLeft="al",e.ArrowRight="ar",e.ArrowBoth="ab"}(s||(s={}))},590836:(e,t,i)=>{"use strict";var n,r;i.d(t,{DwgTableCellFontType:()=>r,containsDwgTableCellTimePointIndexes:()=>a,containsDwgTableTimePointIndexes:()=>o,dematerializeDwgTable:()=>l,dematerializeDwgTableCell:()=>u,materializeDwgTable:()=>s,materializeDwgTableCell:()=>d}),function(e){e.Top="top",e.Center="center",e.Bottom="bottom"}(n||(n={})),function(e){e.Monospace="monospace"}(r||(r={}));const o=!1;function s(e,t){return{id:e.id,position:e.pos,rows:e.rows,columns:e.cols,backgroundColorIndex:e.bgc,frameColorIndex:e.frmc,frameWidth:e.frmw,borderColorIndex:e.brdc,borderWidth:e.brdw,forceOverlay:e.fo}}function l(e,t,i){return{id:t,pos:e.position,rows:e.rows,cols:e.columns,bgc:e.backgroundColorIndex,frmc:e.frameColorIndex,frmw:e.frameWidth,brdc:e.borderColorIndex,brdw:e.borderWidth,fo:e.forceOverlay}}const a=!1;function d(e,t){var i,n,r;return{tableId:e.tid,row:e.row,column:e.col,widthInPercentsOfPaneWidth:e.w,heightInPercentOfPaneHeight:e.h,text:e.t,textColorIndex:e.tc,horizontalTextAlignment:e.tha,verticalTextAlignment:e.tva,fontSize:e.ts,backgroundColorIndex:e.bgc,colSpan:null!==(i=e.colspan)&&void 0!==i?i:1,rowSpan:null!==(n=e.rowspan)&&void 0!==n?n:1,tooltip:e.tt,fontType:null!==(r=e.tf)&&void 0!==r?r:null}}function u(e,t,i){var n;return{id:t,tid:e.tableId,row:e.row,col:e.column,w:e.widthInPercentsOfPaneWidth,h:e.heightInPercentOfPaneHeight,t:e.text,tc:e.textColorIndex,tha:e.horizontalTextAlignment,tva:e.verticalTextAlignment,ts:e.fontSize,
bgc:e.backgroundColorIndex,colspan:e.colSpan,rowspan:e.rowSpan,tt:e.tooltip,tf:null!==(n=e.fontType)&&void 0!==n?n:void 0}}},484812:(e,t,i)=>{"use strict";i.d(t,{LiveStudyGraphics:()=>s.LiveStudyGraphics,createGraphicsPaneViews:()=>p,createGraphicsPriceAxisViews:()=>f,emptyStudyGraphics:()=>o.emptyStudyGraphics,isStudyGraphicsEmpty:()=>r.isStudyGraphicsEmpty,loadStudyGraphics:()=>o.loadStudyGraphics,saveStudyGraphics:()=>o.saveStudyGraphics});var n=i(201089),r=i(590713),o=i(2605),s=i(529968),l=i(229765),a=i(246733);class d extends l.PriceAxisView{constructor(e,t){super(),this._source=e,this._data=t}_updateRendererData(e,t,i){var n,r;e.visible=!1;const o=this._source.priceScale(),s=this._source.properties().childs(),l=s.visible.value();if(!o||o.isEmpty()||!l)return;const d=null===(r=null===(n=s.graphics.childs()[this._data.lineType])||void 0===n?void 0:n.childs()[this._data.styleId])||void 0===r?void 0:r.childs();if(!(void 0!==d&&d.visible&&d.visible.value()&&d.showPrice&&d.showPrice.value()&&this._isLabelVisibleAccordinglyToProperties()))return;const u=this._source.firstValue();if(null===u)return;const c=this._data.line.level,h=(0,a.resetTransparency)(d.color.value());i.background=h,i.textColor=this.generateTextColor(h),i.coordinate=o.priceToCoordinate(c,u),e.text=o.formatPrice(c,u,{signPositive:o.isPercentage()}),e.visible=!0}_isLabelVisibleAccordinglyToProperties(){const e=this._source.model().properties().childs().scalesProperties.childs();return(e.showStudyLastValue.value()||e.showFundamentalLastValue.value())&&this._source.properties().childs().showLabelsOnPriceScale.value()}}const u=(0,n.getLogger)("Chart.StudyGraphics"),c=new Set(["dwgtablecells","tpoBlockSets","tpoLevels","tpoVolumeRows","logs","performance"]);async function h(e,t,n,r){const o=e=>({regularPaneView:new e(t,n,r)}),s=e=>({regularPaneView:new e(t,n,!1,r),forceOverlayPaneView:new e(t,n,!0,r)});switch(e){case"hlines":return o((await Promise.all([i.e(35698),i.e(13207),i.e(20507)]).then(i.bind(i,454112))).LevelPaneView);case"lines":return o((await Promise.all([i.e(35698),i.e(13207),i.e(20507)]).then(i.bind(i,556613))).LinePaneView);case"shapemarks":return o((await Promise.all([i.e(35698),i.e(13207),i.e(20507)]).then(i.bind(i,709329))).ShapeMarkPaneView);case"textmarks":return o((await Promise.all([i.e(35698),i.e(13207),i.e(20507)]).then(i.bind(i,99490))).TextMarkPaneView);case"trendchannels":return o((await Promise.all([i.e(35698),i.e(13207),i.e(20507)]).then(i.bind(i,149284))).TrendChannelPaneView);case"dwglabels":return s((await Promise.all([i.e(35698),i.e(13207),i.e(20507)]).then(i.bind(i,531536))).DwgLabelPaneView);case"dwglines":return s((await Promise.all([i.e(35698),i.e(13207),i.e(20507)]).then(i.bind(i,591393))).DwgLinePaneView);case"dwgpolylines":return s((await Promise.all([i.e(35698),i.e(13207),i.e(20507)]).then(i.bind(i,806468))).DwgPolylinePaneView);case"dwgboxes":return s((await Promise.all([i.e(35698),i.e(13207),i.e(20507)]).then(i.bind(i,277150))).DwgBoxPaneView);case"dwgtables":
return s((await Promise.all([i.e(35698),i.e(13207),i.e(20507)]).then(i.bind(i,760269))).DwgTablePaneView);case"dwglinefills":return s((await Promise.all([i.e(35698),i.e(13207),i.e(20507)]).then(i.bind(i,262831))).DwgLineFillPaneView);case"tpos":return{regularPaneView:new((await i.e(769).then(i.bind(i,166077))).TpoPaneView)(t,n,r)};case"footprints":return{regularPaneView:new((await i.e(9141).then(i.bind(i,13755))).VolumeFootprintPaneView)(t,n)}}switch(e){case"hhists":return o((await Promise.all([i.e(35698),i.e(13207),i.e(20507)]).then(i.bind(i,670751))).HHistPaneView);case"horizlines":return o((await Promise.all([i.e(35698),i.e(13207),i.e(20507)]).then(i.bind(i,722669))).HorizLinePaneView);case"vertlines":return o((await Promise.all([i.e(35698),i.e(13207),i.e(20507)]).then(i.bind(i,652742))).VertLinePaneView);case"polygons":return o((await Promise.all([i.e(35698),i.e(13207),i.e(20507)]).then(i.bind(i,842474))).PolygonPaneView);case"backgrounds":return o((await Promise.all([i.e(35698),i.e(13207),i.e(20507)]).then(i.bind(i,209406))).BackgroundPaneView)}return null}async function p(e,t,i){const n=[],r=[],o=Object.keys(e.graphicsInfo());o.sort(((e,t)=>m(e)-m(t)));for(const s of o){const o=await h(s,e,t,i);null!==o?(n.push(o.regularPaneView),o.forceOverlayPaneView&&r.push(o.forceOverlayPaneView)):c.has(s)||u.logWarn(`${s} is not supported by this build of graphics subsystem, skipping`)}return{regularPaneViews:n,forceOverlayPaneViews:r}}function m(e){var t;return null!==(t=r.primitivesZOrders.get(e))&&void 0!==t?t:0}function f(e){const t=Object.keys(e.graphicsInfo()),i=[];for(const n of t)switch(n){case"hlines":e.graphics().hlines().forEach(((t,r)=>{t.forEach((t=>{void 0!==t.level&&i.push(new d(e,{line:{level:t.level},styleId:r,lineType:n}))}))}));break;case"horizlines":e.graphics().horizlines().forEach(((t,r)=>{t.forEach((t=>{void 0!==t.level&&i.push(new d(e,{line:{level:t.level},styleId:r,lineType:n}))}))}))}return i}},396372:(e,t,i)=>{"use strict";i.d(t,{HHistDirection:()=>n,HHistLocation:()=>r,HHistVolumeMode:()=>o,containsHHistTimePointIndexes:()=>d,dematerializeHHist:()=>c,isHHistInBarsRange:()=>h,materializeHHist:()=>u});var n,r,o,s=i(650151),l=i(732149),a=i(387963);!function(e){e.LeftToRight="left_to_right",e.RightToLeft="right_to_left"}(n||(n={})),function(e){e.Relative="relative",e.Absolute="absolute"}(r||(r={})),function(e){e.UpDown="Up/Down",e.Total="Total",e.Delta="Delta"}(o||(o={}));const d=!0;function u(e,t){if(e.firstBarTime>=t.length||e.lastBarTime>=t.length)return null;const i=t[e.firstBarTime],n=t[e.lastBarTime];return i===l.INVALID_TIME_POINT_INDEX||n===l.INVALID_TIME_POINT_INDEX?null:((0,s.assert)(i<=n,"firstBarTime should not exceed lastBarTime"),(0,s.assert)(e.priceLow<=e.priceHigh,"priceLow should not exceed priceHigh"),{firstBarTime:i,lastBarTime:n,rate:e.rate,priceHigh:e.priceHigh,priceLow:e.priceLow})}function c(e,t,i){const n=(0,a.ensureTimePointIndexIndex)(i.indexOf(e.firstBarTime)),r=(0,a.ensureTimePointIndexIndex)(i.indexOf(e.lastBarTime));return{id:t,...e,firstBarTime:n,lastBarTime:r}}
function h(e,t){const i=Math.min(e.firstBarTime,e.lastBarTime),n=Math.max(e.firstBarTime,e.lastBarTime);return t.contains(i)||t.contains(n)||it.lastBar()}},921124:(e,t,i)=>{"use strict";i.d(t,{containsHorizLineTimePointIndexes:()=>s,dematerializeHorizLine:()=>a,isHorizLineInBarsRange:()=>d,materializeHorizLine:()=>l});var n=i(650151),r=i(732149),o=i(387963);const s=!0;function l(e,t){if(e.startIndex>=t.length||e.endIndex>=t.length)return null;const i=t[e.startIndex],o=t[e.endIndex];return i===r.INVALID_TIME_POINT_INDEX||o===r.INVALID_TIME_POINT_INDEX?null:((0,n.assert)(i<=o,"startIndex should not exceed endIndex"),{startIndex:i,endIndex:o,level:e.level,extendLeft:e.extendLeft,extendRight:e.extendRight})}function a(e,t,i){const n=(0,o.ensureTimePointIndexIndex)(i.indexOf(e.startIndex)),r=(0,o.ensureTimePointIndexIndex)(i.indexOf(e.endIndex));return{id:t,...e,startIndex:n,endIndex:r}}function d(e,t){const i=Math.min(e.startIndex,e.endIndex),n=Math.max(e.startIndex,e.endIndex);if(t.contains(i)||t.contains(n)||it.lastBar())return!0;const r=e.startIndext.lastBar()&&r}},276636:(e,t,i)=>{"use strict";var n;i.d(t,{TextPos:()=>n,containsLevelTimePointIndexes:()=>r,dematerializeLevel:()=>s,materializeLevel:()=>o}),function(e){e[e.TopLeft=0]="TopLeft",e[e.TopCenter=1]="TopCenter",e[e.TopRight=2]="TopRight",e[e.MiddleLeft=3]="MiddleLeft",e[e.MiddleCenter=4]="MiddleCenter",e[e.MiddleRight=5]="MiddleRight",e[e.BottomLeft=6]="BottomLeft",e[e.BottomCenter=7]="BottomCenter",e[e.BottomRight=8]="BottomRight"}(n||(n={}));const r=!1;function o(e){return{level:e.level,text:e.text}}function s(e,t,i){return{id:t,...e}}},573947:(e,t,i)=>{"use strict";i.d(t,{containsLineTimePointIndexes:()=>s,dematerializeLine:()=>a,isLineInBarsRange:()=>d,materializeLine:()=>l});var n=i(650151),r=i(732149),o=i(387963);const s=!0;function l(e,t){if(e.startIndex>=t.length||e.endIndex>=t.length)return null;const i=t[e.startIndex],o=t[e.endIndex];return i===r.INVALID_TIME_POINT_INDEX||o===r.INVALID_TIME_POINT_INDEX?null:((0,n.assert)(i<=o,"startIndex should not exceed endIndex"),{startIndex:i,endIndex:o,startOffset:e.startOffset,endOffset:e.endOffset,startPrice:e.startPrice,endPrice:e.endPrice})}function a(e,t,i){const n=(0,o.ensureTimePointIndexIndex)(i.indexOf(e.startIndex)),r=(0,o.ensureTimePointIndexIndex)(i.indexOf(e.endIndex));return{id:t,...e,startIndex:n,endIndex:r}}function d(e,t){var i,n;const r=e.startIndex+(null!==(i=e.startOffset)&&void 0!==i?i:0),o=e.endIndex+(null!==(n=e.endOffset)&&void 0!==n?n:0),s=Math.min(r,o),l=Math.max(r,o);return t.contains(r)||t.contains(o)||st.lastBar()}},529968:(e,t,i)=>{"use strict";i.d(t,{LiveStudyGraphics:()=>D})
;var n=i(650151),r=i(674981),o=i(707957),s=i(396372),l=i(921124),a=i(329081),d=i(878475),u=i(323109),c=i(294024),h=i(258940),p=i(640073),m=i(206395),f=i(276636),v=i(573947),g=i(14721),_=i(593885),y=i(180857),I=i(590836),x=i(934393),w=i(755470),T=i(952499),b=i(583884),S=i(686242),P=i(651788),A=i(229169),C=i(138839),E=i(214798),L=i(590713),M=i(2605);class D{constructor(e={}){this._indexes=[],this._hhistsByTimePointIndex=new Map,this._primitivesCollection=function(e){const t={};for(const i of L.primitiveNames){t[i]=new Map;const n=e[i];if(void 0!==n)for(const e in n)if(n.hasOwnProperty(e))switch(i){case"horizlines":t[i].set(e,z.horizlines());break;case"vertlines":t[i].set(e,z.vertlines());break;case"lines":t[i].set(e,z.lines());break;case"hlines":t[i].set(e,z.hlines());break;case"textmarks":t[i].set(e,z.textmarks());break;case"shapemarks":t[i].set(e,z.shapemarks());break;case"backgrounds":t[i].set(e,z.backgrounds());break;case"polygons":t[i].set(e,z.polygons());break;case"trendchannels":t[i].set(e,z.trendchannels());break;case"hhists":t[i].set(e,z.hhists());break;case"dwglabels":case"dwglines":case"dwgpolylines":case"dwgboxes":case"dwgtables":case"tpoBlockSets":case"tpoLevels":case"tpoVolumeRows":t[i].set(e,new Map);break;case"dwgtablecells":t[i].set(e,z.dwgtablecells());break;case"dwglinefills":t[i].set(e,z.dwglinefills());break;case"tpos":t[i].set(e,z.tpos());break;case"logs":t[i].set(e,z.logs());break;case"footprints":t[i].set(e,z.footprints());break;case"footprintLevels":t[i].set(e,z.footprintLevels())}}t.performance.set("performance",new B(A.materializePerformance,A.containsPerformanceTimePointIndexes));return t}(e)}horizlines(){return this._primitivesCollection.horizlines}vertlines(){return this._primitivesCollection.vertlines}lines(){return this._primitivesCollection.lines}hlines(){return this._primitivesCollection.hlines}textmarks(){return this._primitivesCollection.textmarks}shapemarks(){return this._primitivesCollection.shapemarks}backgrounds(){return this._primitivesCollection.backgrounds}polygons(){return this._primitivesCollection.polygons}trendchannels(){return this._primitivesCollection.trendchannels}hhists(){return this._primitivesCollection.hhists}dwglabels(){return this._primitivesCollection.dwglabels}dwglines(){return this._primitivesCollection.dwglines}dwgpolylines(){return this._primitivesCollection.dwgpolylines}dwgboxes(){return this._primitivesCollection.dwgboxes}dwgtables(){return this._primitivesCollection.dwgtables}dwgtablecells(){return this._primitivesCollection.dwgtablecells}dwglinefills(){return this._primitivesCollection.dwglinefills}tpos(){return this._primitivesCollection.tpos}tpoBlockSets(){return this._primitivesCollection.tpoBlockSets}tpoLevels(){return this._primitivesCollection.tpoLevels}tpoVolumeRows(){return this._primitivesCollection.tpoVolumeRows}logs(){return this._primitivesCollection.logs}observableLogs(){return this._primitivesCollection.logs}performance(){return this._primitivesCollection.performance}observablePerformance(){return this._primitivesCollection.performance}
footprints(){return this._primitivesCollection.footprints}footprintLevels(){return this._primitivesCollection.footprintLevels}hhistsByTimePointIndex(){return this._hhistsByTimePointIndex}clear(){this._indexes=[];for(const e of L.regularPrimitiveNames)this._primitivesCollection[e].forEach((e=>e.clear()));for(const e of L.groupedPrimitiveNames)this._primitivesCollection[e].forEach((e=>{e.forEach((e=>e.clear()))}));this._hhistsByTimePointIndex=new Map}extract(){const e={indexes:this._indexes,horizlines:N(this._primitivesCollection.horizlines),vertlines:N(this._primitivesCollection.vertlines),lines:N(this._primitivesCollection.lines),hlines:N(this._primitivesCollection.hlines),textmarks:N(this._primitivesCollection.textmarks),shapemarks:N(this._primitivesCollection.shapemarks),backgrounds:N(this._primitivesCollection.backgrounds),polygons:N(this._primitivesCollection.polygons),trendchannels:N(this._primitivesCollection.trendchannels),hhists:N(this._primitivesCollection.hhists),dwglabels:V(this._primitivesCollection.dwglabels),dwglines:V(this._primitivesCollection.dwglines),dwgpolylines:V(this._primitivesCollection.dwgpolylines),dwgboxes:V(this._primitivesCollection.dwgboxes),dwgtables:V(this._primitivesCollection.dwgtables),dwgtablecells:N(this._primitivesCollection.dwgtablecells),dwglinefills:N(this._primitivesCollection.dwglinefills),tpos:N(this._primitivesCollection.tpos),tpoBlockSets:V(this._primitivesCollection.tpoBlockSets),tpoLevels:V(this._primitivesCollection.tpoLevels),tpoVolumeRows:V(this._primitivesCollection.tpoVolumeRows),logs:new Map,performance:new Map,footprints:N(this._primitivesCollection.footprints),footprintLevels:N(this._primitivesCollection.footprintLevels)};return this._hhistsByTimePointIndex=new Map,new M.StaticStudyGraphics("data",e)}replaceIndexesTo(e){this._indexes=e;const t=e=>e.replaceIndexesTo(this._indexes);for(const e of L.regularPrimitiveNames)this._primitivesCollection[e].forEach(t);for(const e of L.groupedPrimitiveNames)this._primitivesCollection[e].forEach((e=>{e.forEach(t)}));this._hhistsByTimePointIndex=(0,L.splitHHistsByTimePointIndex)(this._primitivesCollection.hhists)}processCommands(e){void 0!==e.erase&&this._processEraseCommands(e.erase),void 0!==e.create&&this._processCreateCommands(e.create)}_processCreateCommands(e){for(const t in e){if(!e.hasOwnProperty(t))continue;const i=t;switch(i){case"horizlines":R(this._indexes,this._primitivesCollection.horizlines,e[i]);break;case"vertlines":R(this._indexes,this._primitivesCollection.vertlines,e[i]);break;case"lines":R(this._indexes,this._primitivesCollection.lines,e[i]);break;case"hlines":R(this._indexes,this._primitivesCollection.hlines,e[i]);break;case"textmarks":R(this._indexes,this._primitivesCollection.textmarks,e[i]);break;case"shapemarks":R(this._indexes,this._primitivesCollection.shapemarks,e[i]);break;case"backgrounds":R(this._indexes,this._primitivesCollection.backgrounds,e[i]);break;case"polygons":R(this._indexes,this._primitivesCollection.polygons,e[i]);break;case"trendchannels":
R(this._indexes,this._primitivesCollection.trendchannels,e[i]);break;case"hhists":R(this._indexes,this._primitivesCollection.hhists,e[i]);break;case"dwglabels":O(i,this._indexes,this._primitivesCollection.dwglabels,z.dwglabels,e[i]);break;case"dwglines":O(i,this._indexes,this._primitivesCollection.dwglines,z.dwglines,e[i]);break;case"dwgpolylines":O(i,this._indexes,this._primitivesCollection.dwgpolylines,z.dwgpolylines,e[i]);break;case"dwgboxes":O(i,this._indexes,this._primitivesCollection.dwgboxes,z.dwgboxes,e[i]);break;case"dwgtables":O(i,this._indexes,this._primitivesCollection.dwgtables,z.dwgtables,e[i]);break;case"dwgtablecells":R(this._indexes,this._primitivesCollection.dwgtablecells,e[i]);break;case"dwglinefills":R(this._indexes,this._primitivesCollection.dwglinefills,e[i]);break;case"tpos":R(this._indexes,this._primitivesCollection.tpos,e[i]);break;case"tpoBlockSets":O(i,this._indexes,this._primitivesCollection.tpoBlockSets,z.tpoBlockSets,e[i]);break;case"tpoLevels":O(i,this._indexes,this._primitivesCollection.tpoLevels,z.tpoLevels,e[i]);break;case"tpoVolumeRows":O(i,this._indexes,this._primitivesCollection.tpoVolumeRows,z.tpoVolumeRows,e[i]);break;case"logs":R(this._indexes,this._primitivesCollection.logs,e[i]);break;case"performance":R(this._indexes,this._primitivesCollection.performance,e[i]);break;case"footprints":R(this._indexes,this._primitivesCollection.footprints,e[i]);break;case"footprintLevels":R(this._indexes,this._primitivesCollection.footprintLevels,e[i])}}this._hhistsByTimePointIndex=(0,L.splitHHistsByTimePointIndex)(this._primitivesCollection.hhists)}_processEraseCommands(e){for(const t of e)if("all"===t.action){for(const e of L.regularPrimitiveNames)this._primitivesCollection[e].forEach((e=>e.clearPrimitives()));for(const e of L.groupedPrimitiveNames)this._primitivesCollection[e].forEach((e=>{e.forEach((e=>e.clearPrimitives()))}))}else{const e=e=>e.deleteById(t.id);(0,L.isRegularPrimiriveName)(t.type)?this._primitivesCollection[t.type].forEach(e):this._primitivesCollection[t.type].forEach((t=>{t.forEach(e)}))}this._hhistsByTimePointIndex=(0,L.splitHHistsByTimePointIndex)(this._primitivesCollection.hhists)}}class B{constructor(e,t){this._primitivesDataById=new Map,this._primitiveById=new Map,this._changed=new o.Delegate,this._cleared=new o.Delegate,this._materializePrimitive=e,this._isRematerializationRequiredWithNewIndexes=t}changed(){return this._changed}cleared(){return this._cleared}forEach(e,t){this._primitiveById.forEach((i=>{e.call(t,i,i,this)}))}has(e){let t=!1;return this._primitiveById.forEach((i=>{t=t||i===e})),t}get size(){return this._primitiveById.size}[Symbol.iterator](){return this._primitiveById.values()}entries(){throw new Error("Not implemented")}keys(){throw new Error("Not implemented")}values(){return this._primitiveById.values()}hasId(e){return this._primitiveById.has(e)}addData(e,t){const i=[];e.forEach((e=>{this._primitivesDataById.set(e.id,e);const n=this._tryMaterialize(t,e);null!==n&&i.push(n)})),i.length>0&&this._changed.fire({created:i,removed:[]})}deleteById(e){
const t=this._primitiveById.get(e);t&&(this._primitiveById.delete(e),this._primitivesDataById.delete(e),this._changed.fire({created:[],removed:[t]}))}clear(){this.clearPrimitives()}clearPrimitives(){this._primitivesDataById.clear(),this._primitiveById.clear(),this._cleared.fire()}replaceIndexesTo(e){if(!this._isRematerializationRequiredWithNewIndexes)return;const t=Array.from(this._primitiveById.values());this._primitiveById.clear(),this._primitivesDataById.forEach(this._tryMaterialize.bind(this,e),this);const i=Array.from(this._primitiveById.values());this._changed.fire({created:i,removed:t})}extract(){const e=new Set(this._primitivesDataById.values());return this.clearPrimitives(),e}_tryMaterialize(e,t){const i=this._materializePrimitive(t,e);return null!==i&&((0,n.assert)(!this._primitiveById.has(t.id),"primitive with specified id should not exist"),this._primitiveById.set(t.id,i)),i}}function k(e){const t=new Map;for(const[o,s]of e)t.set(o,(i=s,(n=t.get(o))?(0,r.join)(n,i.extract()):i.extract()));var i,n;return t}function N(e){return k((0,r.mapEntriesGenerator)(e))}function V(e){return k((0,r.nestedMapGenerator)(e))}function R(e,t,i=[]){for(const r of i){const i=r.styleId,o=t.get(i);(0,n.assert)(void 0!==o,"Every style used by graphics primitive should be declared in study metainfo"),o.addData(r.data,e)}}function O(e,t,i,r,o=[]){for(const s of o){const o=s.styleId,l=i.get(o);(0,n.assert)(void 0!==l,"Every style used by graphics primitive should be declared in study metainfo"),s.data.forEach((i=>{var n;const o=(0,L.getPrimitiveDataKey)(i,e),s=null!==(n=l.get(o))&&void 0!==n?n:r();s.addData([i],t),l.set(o,s)}))}}const z={horizlines:()=>new B(l.materializeHorizLine,l.containsHorizLineTimePointIndexes),vertlines:()=>new B(a.materializeVertLine,a.containsVertLineTimePointIndexes),lines:()=>new B(v.materializeLine,v.containsLineTimePointIndexes),hlines:()=>new B(f.materializeLevel,f.containsLevelTimePointIndexes),textmarks:()=>new B(_.materializeTextMark,_.containsTextMarkTimePointIndexes),shapemarks:()=>new B(g.materializeShapeMark,g.containsShapeMarkTimePointIndexes),backgrounds:()=>new B(u.materializeBackground,u.containsBackgroundTimePointIndexes),polygons:()=>new B(d.materializePolygon,d.containsPolygonTimePointIndexes),trendchannels:()=>new B(y.materializeTrendChannel,y.containsTrendChannelTimePointIndexes),hhists:()=>new B(s.materializeHHist,s.containsHHistTimePointIndexes),dwglines:()=>new B(h.materializeDwgLine,h.containsDwgLineTimePointIndexes),dwglinefills:()=>new B(x.materializeDwgLineFill,x.containsDwgLineFillTimePointIndexes),dwglabels:()=>new B(c.materializeDwgLabel,c.containsDwgLabelTimePointIndexes),dwgtablecells:()=>new B(I.materializeDwgTableCell,I.containsDwgTableCellTimePointIndexes),dwgpolylines:()=>new B(p.materializeDwgPolyline,p.containsDwgPolylineTimePointIndexes),dwgboxes:()=>new B(m.materializeDwgBox,m.containsDwgBoxTimePointIndexes),dwgtables:()=>new B(I.materializeDwgTable,I.containsDwgTableTimePointIndexes),tpos:()=>new B(w.materializeTpo,w.containsTpoTimePointIndexes),
tpoBlockSets:()=>new B(T.materializeTpoBlockSet,T.containsTpoBlockSetTimePointIndexes),tpoLevels:()=>new B(b.materializeTpoLevelGroup,b.containsTpoLevelGroupTimePointIndexes),tpoVolumeRows:()=>new B(S.materializeTpoVolumeRow,S.containsTpoVolumeRowTimePointIndexes),logs:()=>new B(P.materializeLog,P.containsLogTimePointIndexes),footprints:()=>new B(C.materializeVolumeFootprint,C.containsFootprintTimePointIndexes),footprintLevels:()=>new B(E.materializeVolumeFootprintPriceLevel,E.containsFootprintPriceLevelTimePointIndexes)}},14721:(e,t,i)=>{"use strict";i.d(t,{containsShapeMarkTimePointIndexes:()=>s,dematerializeShapeMark:()=>a,isShapeMarkInBarsRange:()=>d,materializeShapeMark:()=>l});var n,r=i(732149),o=i(387963);!function(e){e.Circle="circle",e.ArrowUp="arrowUp",e.ArrowDown="arrowDown",e.ArrowRight="arrowRight",e.ArrowLeft="arrowLeft",e.Square="square"}(n||(n={}));const s=!0;function l(e,t){if(e.time>=t.length)return null;const i=t[e.time];return i===r.INVALID_TIME_POINT_INDEX?null:{time:i,price:e.price}}function a(e,t,i){const n=(0,o.ensureTimePointIndexIndex)(i.indexOf(e.time));return{id:t,...e,time:n}}function d(e,t){return t.contains(e.time)}},2605:(e,t,i)=>{"use strict";i.d(t,{StaticStudyGraphics:()=>C,emptyStudyGraphics:()=>V,loadStudyGraphics:()=>R,saveStudyGraphics:()=>z});var n=i(732149),r=i(921124),o=i(329081),s=i(396372),l=i(878475),a=i(323109),d=i(276636),u=i(573947),c=i(14721),h=i(593885),p=i(180857),m=i(294024),f=i(258940),v=i(640073),g=i(206395),_=i(590836),y=i(934393),I=i(755470),x=i(952499),w=i(583884),T=i(686242),b=i(138839),S=i(214798),P=i(590713),A=i(389137);class C{constructor(e,t){if(this._indexes=[],this._horizlines=new Map,this._vertlines=new Map,this._lines=new Map,this._hlines=new Map,this._textmarks=new Map,this._shapemarks=new Map,this._backgrounds=new Map,this._polygons=new Map,this._trendchannels=new Map,this._hhists=new Map,this._dwglabels=new Map,this._dwglines=new Map,this._dwgpolylines=new Map,this._dwgboxes=new Map,this._dwgtables=new Map,this._dwgtablecells=new Map,this._dwglinefills=new Map,this._tpos=new Map,this._tpoBlockSets=new Map,this._tpoLevelGroups=new Map,this._tpoVolumeRows=new Map,this._logs=new Map,this._performance=new Map,this._footprints=new Map,this._footprintLevels=new Map,"data"===e){const e=t;this._indexes=e.indexes,this._vertlines=E(e.vertlines,this._indexes,o.materializeVertLine),this._horizlines=E(e.horizlines,this._indexes,r.materializeHorizLine),this._polygons=E(e.polygons,this._indexes,l.materializePolygon),this._hhists=E(e.hhists,this._indexes,s.materializeHHist),this._backgrounds=E(e.backgrounds,this._indexes,a.materializeBackground),this._lines=E(e.lines,this._indexes,u.materializeLine),this._hlines=E(e.hlines,this._indexes,d.materializeLevel),this._textmarks=E(e.textmarks,this._indexes,h.materializeTextMark),this._shapemarks=E(e.shapemarks,this._indexes,c.materializeShapeMark),this._trendchannels=E(e.trendchannels,this._indexes,p.materializeTrendChannel),this._dwglabels=L("dwglabels",e.dwglabels,this._indexes,m.materializeDwgLabel),
this._dwglines=L("dwglines",e.dwglines,this._indexes,f.materializeDwgLine),this._dwgpolylines=L("dwgpolylines",e.dwgpolylines,this._indexes,v.materializeDwgPolyline),this._dwgboxes=L("dwgboxes",e.dwgboxes,this._indexes,g.materializeDwgBox),this._dwgtables=L("dwgtables",e.dwgtables,this._indexes,_.materializeDwgTable),this._dwgtablecells=E(e.dwgtablecells,this._indexes,_.materializeDwgTableCell),this._dwglinefills=E(e.dwglinefills,this._indexes,y.materializeDwgLineFill),this._tpos=E(e.tpos,this._indexes,I.materializeTpo),this._tpoBlockSets=L("tpoBlockSets",e.tpoBlockSets,this._indexes,x.materializeTpoBlockSet),this._tpoVolumeRows=L("tpoVolumeRows",e.tpoVolumeRows,this._indexes,T.materializeTpoVolumeRow),this._tpoLevelGroups=L("tpoLevels",e.tpoLevels,this._indexes,w.materializeTpoLevelGroup),this._footprints=E(e.footprints,this._indexes,b.materializeVolumeFootprint),this._footprintLevels=E(e.footprintLevels,this._indexes,S.materializeVolumeFootprintPriceLevel)}else if("state"===e){const e=t;this._indexes=e.indexes||[],this._vertlines=M(e.vertlines,this._indexes,o.materializeVertLine),this._horizlines=M(e.horizlines,this._indexes,r.materializeHorizLine),this._polygons=M(e.polygons,this._indexes,l.materializePolygon),this._hhists=M(e.hhists,this._indexes,s.materializeHHist),this._backgrounds=M(e.backgrounds,this._indexes,a.materializeBackground),this._lines=M(e.lines,this._indexes,u.materializeLine),this._hlines=M(e.hlines,this._indexes,d.materializeLevel),this._textmarks=M(e.textmarks,this._indexes,h.materializeTextMark),this._shapemarks=M(e.shapemarks,this._indexes,c.materializeShapeMark),this._trendchannels=M(e.trendchannels,this._indexes,p.materializeTrendChannel),this._dwglabels=D("dwglabels",e.dwglabels,this._indexes,m.materializeDwgLabel),this._dwglines=D("dwglines",e.dwglines,this._indexes,f.materializeDwgLine),this._dwgpolylines=D("dwgpolylines",e.dwgpolylines,this._indexes,v.materializeDwgPolyline),this._dwgboxes=D("dwgboxes",e.dwgboxes,this._indexes,g.materializeDwgBox),this._dwgtables=D("dwgtables",e.dwgtables,this._indexes,_.materializeDwgTable),this._dwgtablecells=M(e.dwgtablecells,this._indexes,_.materializeDwgTableCell),this._dwglinefills=M(e.dwglinefills,this._indexes,y.materializeDwgLineFill),this._tpos=M(e.tpos,this._indexes,I.materializeTpo),this._tpoBlockSets=D("tpoBlockSets",e.tpoBlockSets,this._indexes,x.materializeTpoBlockSet),this._tpoVolumeRows=D("tpoVolumeRows",e.tpoVolumeRows,this._indexes,T.materializeTpoVolumeRow),this._tpoLevelGroups=D("tpoLevels",e.tpoLevels,this._indexes,w.materializeTpoLevelGroup),this._footprints=M(e.footprints,this._indexes,b.materializeVolumeFootprint),this._footprintLevels=M(e.footprintLevels,this._indexes,S.materializeVolumeFootprintPriceLevel)}this._hhistsByTimePointIndex=(0,P.splitHHistsByTimePointIndex)(this._hhists)}horizlines(){return this._horizlines}vertlines(){return this._vertlines}lines(){return this._lines}hlines(){return this._hlines}textmarks(){return this._textmarks}shapemarks(){return this._shapemarks}backgrounds(){return this._backgrounds}polygons(){
return this._polygons}trendchannels(){return this._trendchannels}hhists(){return this._hhists}dwglabels(){return this._dwglabels}dwglines(){return this._dwglines}dwgpolylines(){return this._dwgpolylines}dwgboxes(){return this._dwgboxes}dwgtables(){return this._dwgtables}dwgtablecells(){return this._dwgtablecells}dwglinefills(){return this._dwglinefills}tpos(){return this._tpos}tpoBlockSets(){return this._tpoBlockSets}tpoLevels(e){return this._tpoLevelGroups}tpoVolumeRows(e){return this._tpoVolumeRows}logs(){return this._logs}performance(){return this._performance}footprints(){return this._footprints}footprintLevels(){return this._footprintLevels}hhistsByTimePointIndex(){return this._hhistsByTimePointIndex}}function E(e,t,i){return new Map(Array.from(e.entries()).map((e=>[e[0],new Set(Array.from(e[1]).map((e=>i(e,t))).filter(A.notNull))])))}function L(e,t,i,n){const r=t=>{const i=new Map;return t.forEach((t=>{var n;const r=(0,P.getPrimitiveKey)(t,e),o=null!==(n=i.get(r))&&void 0!==n?n:new Set;o.add(t),i.set(r,o)})),i};return new Map(Array.from(t.entries()).map((e=>[e[0],r(Array.from(e[1]).map((e=>n(e,i))).filter(A.notNull))])))}function M(e,t,i){const n=new Map;if(void 0===e)return n;for(const r of e){const e=r.styleId,o=n.get(e)||new Set;r.data.forEach((e=>{const n=i(e,t);null!==n&&o.add(n)})),n.set(e,o)}return n}function D(e,t,i,n){const r=t=>{const i=new Map;return t.forEach((t=>{var n;const r=(0,P.getPrimitiveKey)(t,e),o=null!==(n=i.get(r))&&void 0!==n?n:new Set;o.add(t),i.set(r,o)})),i};return new Map((null!=t?t:[]).map((e=>[e.styleId,r(e.data.map((e=>n(e,i))).filter(A.notNull))])))}function B(e,t,i){let n=null;for(const i of e)i.styleId===t&&(n=i);null===n&&(n={styleId:t,data:[]},e.push(n)),n.data.push(i)}function k(e,t,i,n,r,o){const s=[];return e.forEach(((e,l)=>{e.forEach((e=>{(null===r||n(e,r))&&B(s,l,o(e,t(e),i))}))})),s.length>0?s:void 0}function N(e,t,i,n,r,o){const s=[];return e.forEach(((e,l)=>{e.forEach((e=>{e.forEach((e=>{(null===r||n(e,r))&&B(s,l,o(e,t(e),i))}))}))})),s.length>0?s:void 0}function V(){return new C}function R(e){return new C("state",e)}function O(e,t){return!0}function z(e,t){var i,P,C,E;const L=function(e){const t=new Set,i=e=>{null!=e&&t.add(e)};e.horizlines().forEach(((e,i)=>{e.forEach((e=>{t.add(e.startIndex),t.add(e.endIndex)}))})),e.vertlines().forEach(((e,i)=>{e.forEach((e=>{t.add(e.index)}))})),e.lines().forEach(((e,i)=>{e.forEach((e=>{t.add(e.startIndex),t.add(e.endIndex)}))})),e.textmarks().forEach(((e,i)=>{e.forEach((e=>{t.add(e.time)}))})),e.shapemarks().forEach(((e,i)=>{e.forEach((e=>{t.add(e.time)}))})),e.backgrounds().forEach(((e,i)=>{e.forEach((e=>{t.add(null!==e.start?e.start:n.INVALID_TIME_POINT_INDEX),t.add(e.stop)}))})),e.polygons().forEach(((e,i)=>{e.forEach((e=>{e.points.forEach((e=>{t.add(e.index)}))}))})),e.trendchannels().forEach(((e,i)=>{e.forEach((e=>{t.add(e.startIndex),t.add(e.endIndex)}))})),e.hhists().forEach(((e,i)=>{e.forEach((e=>{t.add(e.firstBarTime),t.add(e.lastBarTime)}))})),e.dwglabels().forEach((e=>{e.forEach((e=>{e.forEach((e=>{t.add(e.x)}))}))
})),e.dwglines().forEach((e=>{e.forEach((e=>{e.forEach((e=>{var i,r;t.add(null!==(i=e.x1)&&void 0!==i?i:n.INVALID_TIME_POINT_INDEX),t.add(null!==(r=e.x2)&&void 0!==r?r:n.INVALID_TIME_POINT_INDEX)}))}))})),e.dwgpolylines().forEach((e=>{e.forEach((e=>{e.forEach((e=>{var i;for(const r of e.points)t.add(null!==(i=r.x)&&void 0!==i?i:n.INVALID_TIME_POINT_INDEX)}))}))})),e.dwgboxes().forEach((e=>{e.forEach((e=>{e.forEach((e=>{var i,r;t.add(null!==(i=e.left)&&void 0!==i?i:n.INVALID_TIME_POINT_INDEX),t.add(null!==(r=e.right)&&void 0!==r?r:n.INVALID_TIME_POINT_INDEX)}))}))})),e.tpos().forEach((e=>{e.forEach((e=>{t.add(e.firstBarTime),t.add(e.lastBarTime)}))})),e.tpoLevels().forEach((e=>{e.forEach((e=>{e.forEach((e=>{var t;i(e.poorHighExtendTo),i(e.poorLowExtendTo),i(e.tpoPocExtendTo),(null!==(t=e.singleprints)&&void 0!==t?t:[]).map((e=>e.extendTo)).map(i)}))}))})),e.footprints().forEach((e=>{e.forEach((e=>{t.add(e.index)}))})),e.footprintLevels().forEach((e=>{e.forEach((e=>{t.add(e.startIndex),i(e.extendTo)}))}));const r=Array.from(t);return r.sort(((e,t)=>e-t)),r}(e),M={indexes:L};let D=0;const B=()=>++D,V=e=>e.id;M.vertlines=k(e.vertlines(),B,L,o.isVertLineInBarsRange,t,o.dematerializeVertLine),M.horizlines=k(e.horizlines(),B,L,r.isHorizLineInBarsRange,t,r.dematerializeHorizLine),M.polygons=k(e.polygons(),B,L,l.isPolygonInBarsRange,t,l.dematerializePolygon),M.hhists=k(e.hhists(),B,L,s.isHHistInBarsRange,t,s.dematerializeHHist),M.backgrounds=k(e.backgrounds(),B,L,a.isBackgroundInBarsRange,t,a.dematerializeBackground);{M.lines=k(e.lines(),B,L,u.isLineInBarsRange,t,u.dematerializeLine),M.hlines=k(e.hlines(),B,L,O,t,d.dematerializeLevel),M.textmarks=k(e.textmarks(),B,L,h.isTextMarkInBarsRange,t,h.dematerializeTextMark),M.shapemarks=k(e.shapemarks(),B,L,c.isShapeMarkInBarsRange,t,c.dematerializeShapeMark),M.trendchannels=k(e.trendchannels(),B,L,p.isTrendChannelInBarsRange,t,p.dematerializeTrendChannel),M.dwglabels=N(e.dwglabels(),B,L,m.isDwgLabelInBarsRange,t,m.dematerializeDwgLabel),M.dwglines=N(e.dwglines(),V,L,f.isDwgLineInBarsRange,t,f.dematerializeDwgLine),M.dwgpolylines=N(e.dwgpolylines(),V,L,v.isDwgPolylineInBarsRange,t,v.dematerializeDwgPolyline),M.dwgboxes=N(e.dwgboxes(),B,L,g.isDwgBoxInBarsRange,t,g.dematerializeDwgBox),M.dwgtables=N(e.dwgtables(),V,L,O,t,_.dematerializeDwgTable),M.dwgtablecells=k(e.dwgtablecells(),B,L,O,t,_.dematerializeDwgTableCell),M.dwglinefills=k(e.dwglinefills(),B,L,O,t,y.dematerializeDwgLineFill);const n=new Map(Array.from(null!==(P=null===(i=e.tpos().get("tpo"))||void 0===i?void 0:i.values())&&void 0!==P?P:[]).map((e=>[e.id,e]))),r=e=>n.get(e),o=N(e.tpoBlockSets(),B,L,x.isTpoBlockSetInBarsRange.bind(null,r),t,x.dematerializeTpoBlockSet);M.tpoLevels=N(e.tpoLevels(),B,L,w.isTpoLevelInBarsRange.bind(null,r),t,w.dematerializeTpoLevelGroup),M.tpoVolumeRows=N(e.tpoVolumeRows(),B,L,T.isTpoVolumeRowsInBarsRange.bind(null,r),t,T.dematerializeTpoVolumeRow)
;const s=[null==o?void 0:o[0].data,null===(C=M.tpoLevels)||void 0===C?void 0:C[0].data,null===(E=M.tpoVolumeRows)||void 0===E?void 0:E[0].data].filter(A.notUndefined).reduce(((e,t)=>e.concat(t.map((e=>e.tpoId)))),[]),l=new Set(s);M.tpos=k(e.tpos(),V,L,(e=>l.has(e.id)),t,I.dematerializeTpo),M.tpoBlockSets=N(e.tpoBlockSets(),B,L,(e=>l.has(e.tpoId)),t,x.dematerializeTpoBlockSet),M.footprints=k(e.footprints(),B,L,b.isVolumeFootprintInBarsRange,t,b.dematerializeVolumeFootprint),M.footprintLevels=k(e.footprintLevels(),B,L,S.isVolumeFootprintPriceLevelInBarsRange,t,S.dematerializeVolumeFootprintPriceLevel)}return M}},590713:(e,t,i)=>{"use strict";i.d(t,{getPrimitiveDataKey:()=>s,getPrimitiveKey:()=>o,groupedPrimitiveNames:()=>a,hasForceOverlayPrimitives:()=>m,isRegularPrimiriveName:()=>u,isStudyGraphicsEmpty:()=>h,primitiveNames:()=>d,primitivesZOrders:()=>c,regularPrimitiveNames:()=>l,splitHHistsByTimePointIndex:()=>p});const n=["dwglines","dwgboxes","dwglabels","dwgpolylines","dwgtables"];function r(e){return n.includes(e)}function o(e,t){return r(t)?(e=>!!e.forceOverlay)(e):(e=>e.tpoId)(e)}function s(e,t){return r(t)?!!e.fo:(e=>e.tpoId)(e)}const l=["horizlines","vertlines","lines","hlines","textmarks","shapemarks","backgrounds","polygons","trendchannels","hhists","dwgtablecells","dwglinefills","tpos","logs","performance","footprints","footprintLevels"],a=n.concat(["tpoBlockSets","tpoLevels","tpoVolumeRows"]),d=l.concat(a);function u(e){return l.includes(e)}const c=new Map([["logs",-4],["performance",-4],["polygons",-4],["trendchannels",-3],["textmarks",-2],["shapemarks",-2],["backgrounds",-1],["footprints",1],["footprintLevels",1],["hlines",1],["horizlines",1],["hhists",1],["dwglinefills",2],["vertlines",3],["lines",3],["dwglines",3],["dwgpolylines",3],["dwgboxes",4],["dwglabels",5],["dwgtables",6],["dwgtablecells",6],["tpos",7],["tpoBlockSets",7],["tpoLevels",7],["tpoVolumeRows",7]]);function h(e){return!d.some((t=>{const i=e[t]();for(const[,e]of i)if(e.size>0)return!0;return!1}))}function p(e){const t=new Map;return e.forEach(((e,i)=>{e.forEach((e=>{const n={...e,styleId:i},r=e.firstBarTime;let o=t.get(r);void 0===o&&(o=new Set,t.set(r,o)),o.add(n)}))})),t}function m(e){return!!(e.graphics.dwglines||e.graphics.dwgboxes||e.graphics.dwglabels||e.graphics.dwgpolylines||e.graphics.dwgtables)}},593885:(e,t,i)=>{"use strict";i.d(t,{TextMarkType:()=>n,containsTextMarkTimePointIndexes:()=>l,dematerializeTextMark:()=>d,isTextMarkInBarsRange:()=>u,materializeTextMark:()=>a});var n,r,o=i(732149),s=i(387963);!function(e){e.Triangle="triangle",e.Rectangle="rectangle"}(n||(n={})),function(e){e.Verdana="Verdana",e.CourierNew="Courier New",e.TimesNewRoman="Times New Roman",e.Arial="Arial"}(r||(r={}));const l=!0;function a(e,t){if(e.time>=t.length)return null;const i=t[e.time];return i===o.INVALID_TIME_POINT_INDEX?null:{time:i,offset:e.offset,text:e.text,price:e.price}}function d(e,t,i){const n=(0,s.ensureTimePointIndexIndex)(i.indexOf(e.time));return{id:t,...e,time:n}}function u(e,t){var i
;return t.contains(e.time+(null!==(i=e.offset)&&void 0!==i?i:0))}},952499:(e,t,i)=>{"use strict";i.d(t,{containsTpoBlockSetTimePointIndexes:()=>r,dematerializeTpoBlockSet:()=>s,isTpoBlockSetInBarsRange:()=>l,materializeTpoBlockSet:()=>o});var n=i(755470);const r=!1;function o(e,t){return{tpoId:e.tpoId,blocks:e.blocks,rowIndex:e.rowIndex}}function s(e,t,i){return{id:t,tpoId:e.tpoId,blocks:e.blocks,rowIndex:e.rowIndex}}function l(e,t,i){const r=e(t.tpoId);return Boolean(r&&(0,n.isTpoInBarsRange)(r,i))}},583884:(e,t,i)=>{"use strict";i.d(t,{containsTpoLevelGroupTimePointIndexes:()=>s,dematerializeTpoLevelGroup:()=>c,isTpoLevelInBarsRange:()=>h,materializeTpoLevelGroup:()=>a});var n=i(389137),r=i(732149),o=i(387963);const s=!0;function l(e,t){const i=null==e?e:t[e];return i===r.INVALID_TIME_POINT_INDEX?null:i}function a(e,t){var i;return{tpoId:e.tpoId,tpoPocIndex:e.tpoPocIndex,tpoPocExtendTo:l(e.tpoPocExtendTo,t),tpoValIndex:e.tpoValIndex,tpoVahIndex:e.tpoVahIndex,tpoMidpointIndex:e.tpoMidpointIndex,volumePocIndex:e.volumePocIndex,volumeValIndex:e.volumeValIndex,volumeVahIndex:e.volumeVahIndex,poorHighIndex:e.poorHighIndex,poorHighExtendTo:l(e.poorHighExtendTo,t),poorLowIndex:e.poorLowIndex,poorLowExtendTo:l(e.poorLowExtendTo,t),singleprints:null===(i=e.singleprints)||void 0===i?void 0:i.map((e=>function(e,t){return{index:e.index,extendTo:l(e.extendTo,t)}}(e,t)))}}function d(e,t){return null==e?e:(0,o.ensureTimePointIndexIndex)(t.indexOf(e))}function u(e){return Object.keys(e).filter((t=>void 0===e[t])).forEach((t=>delete e[t])),e}function c(e,t,i){var n;return u({id:t,tpoId:e.tpoId,tpoPocIndex:e.tpoPocIndex,tpoPocExtendTo:d(e.tpoPocExtendTo,i),tpoValIndex:e.tpoValIndex,tpoVahIndex:e.tpoVahIndex,tpoMidpointIndex:e.tpoMidpointIndex,volumePocIndex:e.volumePocIndex,volumeValIndex:e.volumeValIndex,volumeVahIndex:e.volumeVahIndex,poorHighIndex:e.poorHighIndex,poorHighExtendTo:d(e.poorHighExtendTo,i),poorLowIndex:e.poorLowIndex,poorLowExtendTo:d(e.poorLowExtendTo,i),singleprints:null===(n=e.singleprints)||void 0===n?void 0:n.map((e=>function(e,t){return u({index:e.index,extendTo:d(e.extendTo,t)})}(e,i)))})}function h(e,t,i){var r;const o=e(t.tpoId);if(!o)return!1;const s=o.firstBarTime,l=[t.poorHighExtendTo,t.poorLowExtendTo,t.tpoPocExtendTo].concat((null!==(r=t.singleprints)&&void 0!==r?r:[]).map((e=>e.extendTo))).filter(n.notUndefined).map((e=>null!=e?e:1/0)),a=l.length?Math.max(...l):null;return!((null!=a?a:o.lastBarTime)i.lastBar())}},686242:(e,t,i)=>{"use strict";i.d(t,{containsTpoVolumeRowTimePointIndexes:()=>r,dematerializeTpoVolumeRow:()=>s,isTpoVolumeRowsInBarsRange:()=>l,materializeTpoVolumeRow:()=>o});var n=i(755470);const r=!1;function o(e,t){return{tpoId:e.tpoId,rowIndex:e.rowIndex,volume:e.volume}}function s(e,t,i){return{id:t,tpoId:e.tpoId,rowIndex:e.rowIndex,volume:e.volume}}function l(e,t,i){const r=e(t.tpoId);return Boolean(r&&(0,n.isTpoInBarsRange)(r,i))}},755470:(e,t,i)=>{"use strict";i.d(t,{containsTpoTimePointIndexes:()=>s,dematerializeTpo:()=>a,isTpoInBarsRange:()=>d,materializeTpo:()=>l
});var n=i(650151),r=i(732149),o=i(387963);const s=!0;function l(e,t){if(e.firstBarTime>=t.length||e.lastBarTime>=t.length)return null;const i=t[e.firstBarTime],o=t[e.lastBarTime];return i===r.INVALID_TIME_POINT_INDEX||o===r.INVALID_TIME_POINT_INDEX?null:((0,n.assert)(i<=o,"firstBarTime should not exceed lastBarTime"),{id:e.id,firstBarTime:i,lastBarTime:o,priceRange:e.priceRange,times:e.times})}function a(e,t,i){return{id:t,firstBarTime:(0,o.ensureTimePointIndexIndex)(i.indexOf(e.firstBarTime)),lastBarTime:(0,o.ensureTimePointIndexIndex)(i.indexOf(e.lastBarTime)),priceRange:e.priceRange,times:e.times}}function d(e,t){return!(e.lastBarTimet.lastBar())}},180857:(e,t,i)=>{"use strict";i.d(t,{containsTrendChannelTimePointIndexes:()=>s,dematerializeTrendChannel:()=>a,isTrendChannelInBarsRange:()=>d,materializeTrendChannel:()=>l});var n=i(650151),r=i(732149),o=i(387963);const s=!0;function l(e,t){if(e.startIndex>=t.length||e.endIndex>=t.length)return null;const i=t[e.startIndex],o=t[e.endIndex];return i===r.INVALID_TIME_POINT_INDEX||o===r.INVALID_TIME_POINT_INDEX?null:((0,n.assert)(i<=o,"startIndex should not exceed endIndex"),{startIndex:i,endIndex:o,extendLeft:e.extendLeft,extendRight:e.extendRight,startHighPrice:e.startHighPrice,startLowPrice:e.startLowPrice,endHighPrice:e.endHighPrice,transparency:e.transparency})}function a(e,t,i){const n=(0,o.ensureTimePointIndexIndex)(i.indexOf(e.startIndex)),r=(0,o.ensureTimePointIndexIndex)(i.indexOf(e.endIndex));return{id:t,...e,startIndex:n,endIndex:r}}function d(e,t){const i=Math.min(e.startIndex,e.endIndex),n=Math.max(e.startIndex,e.endIndex);if(t.contains(i)||t.contains(n)||it.lastBar())return!0;const r=e.startIndext.lastBar()&&r}},138839:(e,t,i)=>{"use strict";i.d(t,{VolumeFootprintTypeValues:()=>n,containsFootprintTimePointIndexes:()=>s,dematerializeVolumeFootprint:()=>a,isVolumeFootprintInBarsRange:()=>d,materializeVolumeFootprint:()=>l});var n,r=i(732149),o=i(387963);!function(e){e.BuyAndSell="Buy and sell",e.Delta="Delta",e.Total="Total"}(n||(n={}));const s=!0;function l(e,t){if(e.index>=t.length)return null;let i=t[e.index];return i===r.INVALID_TIME_POINT_INDEX&&(i=null),null===i?null:{id:e.id,index:i,poc:e.poc,val:e.val,vah:e.vah,levels:e.levels}}function a(e,t,i){var n;return{id:t,index:(0,o.ensureTimePointIndexIndex)(i.indexOf(null!==(n=e.index)&&void 0!==n?n:r.INVALID_TIME_POINT_INDEX)),poc:e.poc,val:e.val,vah:e.vah,levels:e.levels}}function d(e,t){return t.contains(e.index)}},799567:(e,t,i)=>{"use strict";var n;i.d(t,{StudyStatusType:()=>n}),function(e){e[e.Undefined=0]="Undefined",e[e.Loading=1]="Loading",e[e.Completed=2]="Completed",e[e.Error=3]="Error"}(n||(n={}))},62745:(e,t,i)=>{"use strict";i.d(t,{ChartColorDependentStudyInputNames:()=>h,InputDisplayFlags:()=>n,RangeDependentStudyInputNames:()=>c,areStudyInputsEqual:()=>u,editableStudyInputs:()=>f,getInputValue:()=>l,isExtendedInput:()=>o,
isExtendedInputSource:()=>s,isStudyInputDependsOnChart:()=>g,isStudyInputDependsOnChartColors:()=>v,isStudyInputOptionsInfo:()=>d,isTimeOrPriceNotHiddenInput:()=>m,rangeDependentStudyInputsToTimeRange:()=>p,studyAvailableConstSources:()=>a});var n,r=i(598279);function o(e){return(0,r.default)(e)}function s(e){return"source"===e.t}function l(e){return o(e)?e.v:e}!function(e){e[e.None=0]="None",e[e.DataWindow=2]="DataWindow",e[e.StatusLine=8]="StatusLine",e[e.All=15]="All"}(n||(n={}));const a=["open","high","low","close","hl2","hlc3","ohlc4","hlcc4"];function d(e){return["text","integer","float","price","session","resolution"].includes(e.type)&&e.hasOwnProperty("options")}function u(e,t,i){for(const n of e)if(t[n.id]!==i[n.id])return!1;return!0}var c,h;function p(e){return{from:Math.round(e.first_visible_bar_time/1e3),to:Math.round(e.last_visible_bar_time/1e3)}}function m(e){return("time"===e.type||"price"===e.type)&&!0!==e.isHidden}function f(e){const t=e.filter(m);if(0===t.length)return[];const i=new Map,n=[];t.forEach((e=>{var t;const{group:r,inline:o}=e;if(void 0===o)return void n.push(e);const s=o+(r||"");if(i.has(s))null===(t=i.get(s))||void 0===t||t.push(e);else{const t=[e];i.set(s,t),n.push(t)}}));const r=[];for(let e=0;ee)).includes(e.id)}function g(e){return!!v(e)||Object.values(c).map((e=>e)).includes(e.id)}!function(e){e.FirstBar="first_visible_bar_time",e.LastBar="last_visible_bar_time",e.Realtime="subscribeRealtime"}(c||(c={})),function(e){e.FgColor="__chart_fgcolor",e.BgColor="__chart_bgcolor"}(h||(h={}))},7288:(e,t,i)=>{"use strict";i.d(t,{StudyStatusType:()=>c,convertStudyStatusToString:()=>h,isVolumeDataError:()=>l,noVolumeErrorTooltip:()=>s,studyErrorStatusStackTrace:()=>v,studyStatusFeature:()=>f,studyStatusSolutionId:()=>p,studyStatusTitle:()=>m});var n=i(444372),r=i(963456),o=i(1500);const s=n.t(null,void 0,i(916971));function l(e){const t=e.toLowerCase();return t.includes("the data vendor doesn't provide volume data for this symbol.")||t.includes("no volume is provided by the data vendor")}const a=new Map([["This script is invite-only",o.solutionIds.PUBLIC_INVITE_ONLY_SCRIPTS]]),d=new Map([["Volume Profile indicator available only on our upgraded plans","volumeProfile"]]),u=n.t(null,void 0,i(930295));var c;function h(e,t){if(e.type===c.Loading)return t?u:"loading...";if(e.type===c.Error){const i=e.errorDescription,n=t?(0,r.triesTranslateError)(i.error):i.error;if(i.ctx){const e={};return Object.entries(i.ctx).forEach((([t,i])=>{e[t]=i.toString()})),n.format(e)}return n}return""}function p(e){if(e.type===c.Error)return e.errorDescription.solution_id?e.errorDescription.solution_id:function(e){for(const t of Array.from(a.keys()))if(e.includes(t))return a.get(t)}(e.errorDescription.error)}function m(e){var t;if(e.type===c.Error)return l(e.errorDescription.error)?s:(0,
r.triesTranslateError)(null!==(t=e.errorDescription.title)&&void 0!==t?t:"Runtime error")}function f(e){const{errorDescription:{error:t}}=e;for(const[e,i]of d)if(t.startsWith(e))return i}function v(e){if(void 0===e)return;const t=[];for(const i of e){const e={functionOrScopeName:i.n,lineNumber:i.p};"id"in i&&(e.id=i.id),"v"in i&&(e.versionScript=i.v),t.push(e)}return t}!function(e){e[e.Undefined=0]="Undefined",e[e.Loading=1]="Loading",e[e.Completed=2]="Completed",e[e.Error=3]="Error"}(c||(c={}))},953725:(e,t,i)=>{"use strict";i.d(t,{getAlertsActionCreators:()=>r});var n=i(895171);const r=(0,n.default)((async()=>new((await Promise.all([i.e(29223),i.e(88104),i.e(31383),i.e(18960),i.e(49502)]).then(i.bind(i,388805))).AlertsActionCreators)));(0,n.default)((async()=>new((await Promise.all([i.e(29223),i.e(88104),i.e(31383),i.e(18960),i.e(68074)]).then(i.bind(i,880190))).FiresActionCreators)))},591427:(e,t,i)=>{"use strict";i.d(t,{getAlertDescription:()=>o});var n=i(919892),r=i(126290);function o(e){return function(e){return"function"==typeof e.name?e.name():e.name}(e)||function(e){return"description"in e?e.description():e.message}(e)||function(e){const t="function"==typeof e.symbol?(0,n.decodeExtendedSymbol)(e.symbol()):e.symbol,i="function"==typeof e.resolution?e.resolution():e.resolution,o="function"==typeof e.crossInterval?e.crossInterval():e.crossInterval;return(0,r.formatSymbolAndResolution)({symbol:t,resolution:i,crossInterval:o})}(e)}},461794:(e,t,i)=>{e=i.nmd(e),TradingView.cleanButAmpersand=function(e,t){var i=t?["&"]:["&"];return TradingView.clean(e,t,i)},TradingView.strip_tags=function(e){return e&&e.replace?e.replace(/(<([^>]+)>)/gi,""):e},TradingView.encodeSpread=function(e){return encodeURIComponent(e)},TradingView.clean=function(e,t,i){var n=[["&","&"],["<","<"],[">",">"],['"',"""],["'","'"],["'","'"]],r=e;if(!e||!e.replace)return r;for(var o=0;o{"use strict";i.d(t,{isShowPromoVideo:()=>c,isSignModalOpen:()=>u,showSignModal:()=>d});var n=i(586240),r=i(901896),o=i(490778);const s=n["media-mf-tablet-landscape"],l=n["media-mf-tablet-vertical"];let a=()=>!1;async function d(e){const t=Object.assign({},e,{isShowVideo:c()});if(window.TVD&&window.TVD.signIn)return window.TVD.signIn(t);{!function(){const e=window.matchMedia(n["media-mf-tablet-landscape"]).matches?o:r,t=document.createElement("link");t.rel="preload",t.as="image",t.href=e,document.head.appendChild(t)}()
;const e=await Promise.all([i.e(77992),i.e(32662),i.e(5987),i.e(98996),i.e(43387),i.e(66458),i.e(4343),i.e(44597),i.e(4908),i.e(52078),i.e(61204),i.e(69749),i.e(19216),i.e(66323),i.e(50473),i.e(35697),i.e(77382),i.e(13031),i.e(11112),i.e(95305),i.e(17228),i.e(90385),i.e(65445),i.e(15850),i.e(62526),i.e(43498),i.e(36123)]).then(i.bind(i,385192));return a=e.isSignModalOpen,e.showSignModal(t)}}function u(){return a()}function c(){const e=window.matchMedia(s).matches,t=window.matchMedia(l).matches,i=window.innerWidth,n=window.innerHeight;return!!e||!!t&&!(!e&&n{"use strict";i.d(t,{disable:()=>d,enable:()=>u,pushBackListener:()=>a});var n=i(541558);const r=[];let o=null;function s(e){for(let t=0;t=0&&!0!==r[t].func(e);t--);}function a(e,t){const i={name:e,func:t},n=s(i.name);n>-1&&r.splice(n,1),r.unshift(i)}function d(){return o?null:(o=(0,n.randomHashN)(4),o)}function u(e){if(e!==o)throw Error("Lock id is outdated");o=null}window.addEventListener("keypress",l,!1)},49336:(e,t,i)=>{"use strict";function n(e,t=!1){"loading"!==document.readyState?t?setTimeout((()=>e()),1):e():document.addEventListener("DOMContentLoaded",(()=>e()))}i.d(t,{whenDocumentReady:()=>n});new Promise((e=>{n(e)}))},930003:(e,t,i)=>{"use strict";i.d(t,{Worker:()=>n});class n extends Worker{constructor(e,t){super(function(e){const t=new URL(e),n=new Blob(["self.WEBPACK_PUBLIC_PATH=",JSON.stringify(new URL(i.p,location.href).href),";\n","self.locale=",JSON.stringify(i.g.locale),";\n",window.language?`self.language=${JSON.stringify(window.language)};\n`:"","importScripts(",JSON.stringify(t.href),");"],{type:"application/javascript"});return URL.createObjectURL(n)}(e),t)}}}}]);