(window.webpackJsonp=window.webpackJsonp||[]).push([["study-market"],{"++0f":function(e,t){e.exports=''},"+EG+":function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return o}));var i=n("mrSG"),r=n("q1tI"),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.__extends)(t,e),t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.render=function(){return r.createElement("div",{style:{position:"fixed",zIndex:150,left:0,top:0},ref:this.props.reference})},t}(r.Component),o=r.createContext(null)},"/KDZ":function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n("mrSG"),r=n("q1tI"),a=function(e){function t(t){var n=e.call(this,t)||this;return n._handleChange=function(){n.forceUpdate()},n.state={query:window.matchMedia(n.props.rule)},n}return Object(i.__extends)(t,e),t.prototype.componentDidMount=function(){this._subscribe(this.state.query)},t.prototype.componentDidUpdate=function(e,t){this.state.query!==t.query&&(this._unsubscribe(t.query),this._subscribe(this.state.query))},t.prototype.componentWillUnmount=function(){this._unsubscribe(this.state.query)},t.prototype.render=function(){return this.props.children(this.state.query.matches)},t.getDerivedStateFromProps=function(e,t){return e.rule!==t.query.media?{query:window.matchMedia(e.rule)}:null},t.prototype._subscribe=function(e){e.addListener(this._handleChange)},t.prototype._unsubscribe=function(e){e.removeListener(this._handleChange)},t}(r.PureComponent)},"0NLZ":function(e,t,n){e.exports={container:"container-V40c9xRz"}},"2x13":function(e,t,n){e.exports={wrapper:"wrapper-1S1BAxTC",container:"container-2mBp3oqG",tab:"tab-1EqAs-Lb",active:"active-3u5zV0YP",title:"title-1SrCEkqk",icon:"icon-2RKetbyG",titleText:"titleText-QNKMAlbN",nested:"nested-H6CeL6Wc",isTablet:"isTablet-2Pl3hVJ9",isMobile:"isMobile-2OnSZ08h"}},"8Rai":function(e,t,n){"use strict";var i=n("q1tI"),r=function(e,t){var n=void 0===t?{}:t,i=n.bubbles,r=void 0!==i&&i,a=n.cancelable,o=void 0!==a&&a,c=n.detail,s=void 0===c?null:c;try{return new window.CustomEvent(e,{bubbles:r,cancelable:o,detail:s})}catch(u){var l=document.createEvent("CustomEvent");return l.initCustomEvent(e,r,o,s),l}},a=n("R5JZ");function o(e){var t=e.click,n=e.mouseDown,o=e.touchEnd,c=e.touchStart,s=e.handler,l=e.reference,u=e.ownerDocument,d=void 0===u?document:u,p=Object(i.useRef)(null),h=Object(i.useRef)(new r("timestamp").timeStamp);return Object(i.useLayoutEffect)((function(){var e={click:t,mouseDown:n,touchEnd:o,touchStart:c},i=l?l.current:p.current;return Object(a.a)(h.current,i,s,d,e)}),[t,n,o,c,s]),l||p}n.d(t,"a",(function(){return o}))},"9DSJ":function(e,t,n){e.exports={"tablet-small-breakpoint":"screen and (max-width: 419px)",dialog:"dialog-12W2lAaB",dialogLibrary:"dialogLibrary-11wUWBuU",listContainer:"listContainer-313-x-WK",scroll:"scroll-3Eu9HUkX",
sidebarContainer:"sidebarContainer-1lfmvpaZ",backButton:"backButton-C9cNFJsB",noContentBlock:"noContentBlock-Ly1pGn6p"}},ASyk:function(e,t,n){e.exports={"tablet-normal-breakpoint":"screen and (max-width: 768px)","small-height-breakpoint":"screen and (max-height: 360px)","tablet-small-breakpoint":"screen and (max-width: 419px)"}},AiMB:function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return u}));var i=n("mrSG"),r=n("q1tI"),a=n("i8i4"),o=n("e3/o"),c=n("jAh7"),s=n("+EG+"),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._uuid=Object(o.guid)(),t}return Object(i.__extends)(t,e),t.prototype.componentWillUnmount=function(){this._manager().removeWindow(this._uuid)},t.prototype.render=function(){var e=this._manager().ensureWindow(this._uuid,this.props.layerOptions);return e.style.top=this.props.top||"",e.style.bottom=this.props.bottom||"",e.style.left=this.props.left||"",e.style.right=this.props.right||"",e.style.pointerEvents=this.props.pointerEvents||"",a.createPortal(r.createElement(u.Provider,{value:this},this.props.children),e)},t.prototype.moveToTop=function(){this._manager().moveToTop(this._uuid)},t.prototype._manager=function(){return null===this.context?Object(c.getRootOverlapManager)():this.context},t.contextType=s.b,t}(r.PureComponent),u=r.createContext(null)},An2S:function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"c",(function(){return h})),n.d(t,"b",(function(){return f}));var i=n("mrSG"),r=n("q1tI"),a=n.n(r),o=n("TSYQ"),c=n.n(o),s=n("Iivm"),l=n("++0f"),u=n("2x13");function d(e){return{isMobile:"mobile"===e,isTablet:"tablet"===e}}function p(e){var t=e.mode,n=e.className,r=Object(i.__rest)(e,["mode","className"]),o=d(t),s=o.isMobile,l=o.isTablet,p=c()(u.container,l&&u.isTablet,s&&u.isMobile,n);return a.a.createElement("div",Object(i.__assign)({},r,{className:p,"data-role":"dialog-sidebar"}))}function h(e){return a.a.createElement("div",Object(i.__assign)({className:u.wrapper},e))}function f(e){var t=e.mode,n=e.title,r=e.icon,o=e.isActive,p=e.onClick,h=Object(i.__rest)(e,["mode","title","icon","isActive","onClick"]),f=d(t),m=f.isMobile,v=f.isTablet;return a.a.createElement("div",Object(i.__assign)({},h,{className:c()(u.tab,v&&u.isTablet,m&&u.isMobile,o&&u.active),onClick:p}),a.a.createElement(s.Icon,{className:u.icon,icon:r}),!v&&a.a.createElement("span",{className:u.title},a.a.createElement("span",{className:u.titleText},n),m&&a.a.createElement(s.Icon,{className:u.nested,icon:l})))}},Iivm:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n("mrSG").__exportStar(n("swCq"),t)},MyWJ:function(e,t,n){e.exports={container:"container-jKs34Xgq",inputContainer:"inputContainer-1KMWEbBN",withCancel:"withCancel-2WUzxNv9",input:"input-2pz7DtzH",icon:"icon-3SNZP2-_",cancel:"cancel-CnoMjYid"}},PMRz:function(e,t,n){e.exports={"tablet-small-breakpoint":"screen and (max-width: 419px)",container:"container-1e-eHKCj",selected:"selected-ObuRahJa",disabled:"disabled-3lywlGlv",favorite:"favorite-PSp_jkxl",
actions:"actions-29vlkAXU",highlighted:"highlighted-3YDl6jC6",light:"light-2HF6Zxxl","highlight-animation-theme-light":"highlight-animation-theme-light-1TIZ6Gga",dark:"dark-1FO6oC-E","highlight-animation-theme-dark":"highlight-animation-theme-dark-3xWPfm4R",main:"main-34wD0nIh",paddingLeft:"paddingLeft-1urwbIqx",isMobile:"isMobile-2aXWDdT8",isActive:"isActive-2O3vI4me",author:"author-3sD2DZRV",likes:"likes-17ztM5mP"}},PSOE:function(e,t,n){e.exports={highlighted:"highlighted-3Ob1jr_R"}},QHWU:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var i=n("mrSG"),r=n("q1tI"),a=n.n(r),o=n("TSYQ"),c=n.n(o),s=n("YFKU"),l=n("Iivm"),u=n("hYdZ"),d=n("MyWJ");function p(e){var t=e.children,n=e.renderInput,r=e.onCancel,o=Object(i.__rest)(e,["children","renderInput","onCancel"]);return a.a.createElement("div",{className:d.container},a.a.createElement("div",{className:c()(d.inputContainer,r&&d.withCancel)},n||a.a.createElement(h,Object(i.__assign)({},o))),t,a.a.createElement(l.Icon,{className:d.icon,icon:u}),r&&a.a.createElement("div",{className:d.cancel,onClick:r},Object(s.t)("Cancel")))}function h(e){var t=e.className,n=e.reference,r=e.value,o=e.onChange,s=e.onFocus,l=e.onBlur,u=e.onKeyDown,p=e.onSelect,h=e.placeholder,f=Object(i.__rest)(e,["className","reference","value","onChange","onFocus","onBlur","onKeyDown","onSelect","placeholder"]);return a.a.createElement("input",Object(i.__assign)({},f,{ref:n,type:"text",className:c()(t,d.input),autoComplete:"off","data-role":"search",placeholder:h,value:r,onChange:o,onFocus:s,onBlur:l,onSelect:p,onKeyDown:u}))}},QpNh:function(e,t,n){"use strict";function i(e){for(var t={},n=0,i=Object.entries(e).filter(r);nr.timeStamp)){var a=r.target;void 0!==n&&null!==t&&null!==a&&a.ownerDocument===i&&(t.contains(a)||n(r))}}return r.click&&i.addEventListener("click",a,!1),r.mouseDown&&i.addEventListener("mousedown",a,!1),r.touchEnd&&i.addEventListener("touchend",a,!1),r.touchStart&&i.addEventListener("touchstart",a,!1),function(){i.removeEventListener("click",a,!1),i.removeEventListener("mousedown",a,!1),i.removeEventListener("touchend",a,!1),i.removeEventListener("touchstart",a,!1)}}n.d(t,"a",(function(){return i}))},XfUw:function(e,t){e.exports=''},cu5P:function(e,t,n){e.exports={title:"title-34aDs39w",disabled:"disabled-17IgfIYd",icon:"icon-2hTCJTIH",locked:"locked-20ljjQkW",open:"open-19XeUlGJ",actionIcon:"actionIcon-3jB28-_s",selected:"selected-lKkvzAlt",codeIcon:"codeIcon-1DtZ78WN"}},fEjm:function(e,t,n){
e.exports={favorite:"favorite-2V8VHwKe",disabled:"disabled-3ebwimbb",active:"active-3pQAvYvT",checked:"checked-2bhy04CF"}},hYdZ:function(e,t){e.exports=''},iYOJ:function(e,t,n){e.exports={title:"title-34kQlbrM",small:"small-vZQvMj9o",normal:"normal-2Xipsjws",large:"large-3RKX3yN_"}},idtP:function(e,t,n){e.exports={container:"container-1nR_bX0y",image:"image-1upzSf_2",title:"title-3EHABq-W",description:"description-3sR4j2iN"}},jPOK:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("q1tI"),r=n("TSYQ"),a=n("Owlf");n("SzKR");function o(e){var t=r("tv-spinner","tv-spinner--shown","tv-spinner--size_"+(e.size||a.a));return i.createElement("div",{className:t,style:e.style,role:"progressbar"},i.createElement("div",{className:"tv-spinner__spinner-layer"},i.createElement("div",{className:"tv-spinner__background tv-spinner__width_element"}),i.createElement("div",{className:"tv-spinner__circle-clipper tv-spinner__width_element tv-spinner__circle-clipper--left"}),i.createElement("div",{className:"tv-spinner__circle-clipper tv-spinner__width_element tv-spinner__circle-clipper--right"})))}},pr86:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var i=n("mrSG"),r=(n("YFKU"),n("q1tI")),a=n("TSYQ"),o=n("Iivm"),c=n("sg5d"),s=n("XfUw"),l=n("fEjm"),u={add:window.t("Add to favorites"),remove:window.t("Remove from favorites")};function d(e){var t=e.className,n=e.isFilled,d=e.isActive,p=e.onClick,h=Object(i.__rest)(e,["className","isFilled","isActive","onClick"]);return r.createElement(o.Icon,Object(i.__assign)({},h,{className:a(l.favorite,"apply-common-tooltip",n&&l.checked,d&&l.active,t),icon:n?c:s,onClick:p,title:n?u.remove:u.add}))}},sg5d:function(e,t){e.exports=''},swCq:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Icon=void 0;var i=n("mrSG"),r=n("q1tI");t.Icon=r.forwardRef((function(e,t){var n=e.icon,a=void 0===n?"":n,o=i.__rest(e,["icon"]);return r.createElement("span",i.__assign({},o,{ref:t,dangerouslySetInnerHTML:{__html:a}}))}))},uhCe:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("ASyk"),r={SmallHeight:i["small-height-breakpoint"],TabletSmall:i["tablet-small-breakpoint"],TabletNormal:i["tablet-normal-breakpoint"]}},vbTm:function(e,t,n){e.exports={container:"container-2xksDfDy"}},vqb8:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("q1tI"),r=function(e){var t="watchedValue"in e?e.watchedValue:void 0,n="defaultValue"in e?e.defaultValue:e.watchedValue.value(),r=Object(i.useState)(t?t.value():n),a=r[0],o=r[1];return Object(i.useEffect)((function(){if(t){o(t.value());var e=function(e){return o(e)};return t.subscribe(e),function(){
return t.unsubscribe(e)}}return function(){}}),[t]),a}},zbLM:function(e,t,n){"use strict";n.r(t);var i=n("mrSG"),r=n("q1tI"),a=n.n(r),o=n("i8i4"),c=n.n(o),s=n("YFKU"),l=n("mMWL"),u=(n("+GxX"),n("CW80")),d=n("0YCj"),p=n.n(d),h=n("Kxc7");function f(e,t){return void 0===t&&(t=!0),e.filter((function(e){var n=!!t||!function(e){return e.isStrategy}(e);return function(e){0;return!e.isHidden||!1}(e)&&n}))}function m(e){var t={};return e.forEach((function(e){var n=e.packageName;n in t?t[n].push(e):t[n]=[e]})),t}function v(e,t){var n=e.title.toLowerCase(),i=t.title.toLowerCase();return ni?1:0}var g={earning:new RegExp("EPS"),earnings:new RegExp("EPS"),"trailing twelve months":new RegExp("TTM")};function b(e){var t,n=e.id,i=e.description,r=e.shortDescription,a=e.description_localized,o=e.is_hidden_study,c=e.version,l=h.enabled("graying_disabled_tools_enabled")&&(null===(t=window.ChartApiInstance)||void 0===t?void 0:t.studiesAccessController.isToolGrayed(r));return{id:n,title:a||Object(s.t)(i,{context:"study"}),shortDescription:r,isStrategy:p.a.isScriptStrategy(e),isHidden:o,descriptor:{type:"java",studyId:e.id},packageName:p.a.getPackageName(n),isGrayed:l,version:c}}var _=n("TSYQ"),y=n.n(_),w=n("jPOK"),E=n("g89m"),C=n("qFKp"),x=n("QHWU"),O=n("An2S"),S=n("0NLZ");function j(e){var t=e.reference,n=e.className,r=Object(i.__rest)(e,["reference","className"]);return a.a.createElement("div",Object(i.__assign)({ref:t,className:y()(S.container,n)},r,{"data-role":"dialog-content"}))}var k=n("cu5P");function N(e){var t=e.children,n=e.className,i=e.disabled;return a.a.createElement("span",{className:y()(k.title,i&&k.disabled,n)},t)}var I=a.a.createContext(null);function R(e){return e.replace(/[!-/[-^{-}]/g,"\\$&")}var P=n("PSOE");function M(e){var t=e.queryString,n=e.rules,i=e.text,o=e.className,c=Object(r.useMemo)((function(){return function(e,t,n){var i=[];return e&&n?(n.forEach((function(e){var n=e.fullMatch,r=e.re,a=e.reserveRe;n.lastIndex=0,r.lastIndex=0;var o=n.exec(t),c=o||r.exec(t)||a&&a.exec(t);if(e.fuzzyHighlight=!o,c)if(e.fuzzyHighlight)for(var s=c.index,l=1;lt.matchPriority)return-1;if(e.matchPriority===t.matchPriority){if(void 0===e.matchIndex||void 0===t.matchIndex)return 0;if(e.matchIndex>t.matchIndex)return 1;if(e.matchIndex0?0:r,s=t.current.scrollTop;return[s-c,s+o]}(u,l),i=t[0],r=t[1];40===Object(F.hashFromEvent)(e)&&(e.preventDefault(),f(),g(r));38===Object(F.hashFromEvent)(e)&&(e.preventDefault(),m(),g(i));if(13===Object(F.hashFromEvent)(e)&&p){if(!n)return;n(p),s(p)}}};function g(e){null!==l.current&&l.current.scrollTo&&l.current.scrollTo(0,e)}}(i,h,c),m=f.highlightedItem,v=f.selectedItem,b=f.selectedNodeReference,_=f.scrollContainerRef,S=f.searchInputRef,k=f.onClickStudy,N=f.handleKeyDown,I=""===u&&!h.length;return Object(r.useEffect)((function(){var e;i||d(""),C.CheckMobile.any()||null===(e=S.current)||void 0===e||e.focus()}),[i]),a.a.createElement(E.a,{isOpened:i,onClose:o,onClickOutside:o,className:y()(Q.dialogLibrary),render:function(){return a.a.createElement(a.a.Fragment,null,a.a.createElement(x.a,{reference:S,placeholder:Object(s.t)("Search"),onChange:P,onFocus:M}),a.a.createElement(O.c,null,a.a.createElement(j,{reference:_,className:Q.scroll},I?a.a.createElement(w.a,null):h.length?a.a.createElement(a.a.Fragment,null,a.a.createElement(H,null,a.a.createElement(B,{title:Object(s.t)("Script name")})),h.map((function(e){var t=(null==v?void 0:v.id)===e.id;return a.a.createElement(W,{key:e.id,item:e,onClick:function(){return k(e)},query:u,regExpRules:p,reference:t?b:void 0,isSelected:(null==v?void 0:v.id)===e.id,isHighlighted:(null==m?void 0:m.id)===e.id})}))):a.a.createElement(V,{className:Q.noContentBlock,description:Object(s.t)("No indicators matched your criteria.")}))))},title:Object(s.t)("Indicators"),dataName:"indicators-dialog",onKeyDown:N,ref:t});function P(e){d(e.target.value)}function M(){
var e;u.length>0&&(null===(e=S.current)||void 0===e||e.select())}}var $=n("aIyQ"),ee=n.n($),te=n("FQhm"),ne=function(){function e(e){this._searchInputRef=a.a.createRef(),this._dialog=a.a.createRef(),this._visibilityChanged=new ee.a,this._container=document.createElement("div"),this._isForceRender=!1,this._parentSource=null,this._isDestroyed=!1,this._chartWidgetCollection=e}return e.prototype.isVisible=function(){return this._getProps().value().isOpened},e.prototype.isDestroyed=function(){return this._isDestroyed},e.prototype.getVisibilityChanged=function(){return this._visibilityChanged},e.prototype.updateUserStudies=function(){},e.prototype.resetAllStudies=function(){},e.prototype.updateFavorites=function(){},e.prototype.open=function(e){this._parentSource=null!=e?e:null,this._setProps({isOpened:!0}),this._visibilityChanged.fire(!0),te.emit("indicators_dialog")},e.prototype.hide=function(){this._parentSource=null,this._setProps({isOpened:!1}),this._visibilityChanged.fire(!1)},e.prototype.destroy=function(){this._isDestroyed=!0,c.a.unmountComponentAtNode(this._container)},e.prototype._shouldPreventRender=function(){return this._isDestroyed||!this._isForceRender&&!this.isVisible()},e.prototype._getRenderData=function(){return{props:this._getProps().value(),container:this._getContainer()}},e.prototype._applyStudy=function(e){var t,n,r=this;e.isGrayed?te.emit("onGrayedObjectClicked",{type:"study",name:e.shortDescription}):(C.CheckMobile.any()||null===(t=this._searchInputRef.current)||void 0===t||t.select(),function(e,t,n){return Object(i.__awaiter)(this,void 0,void 0,(function(){var r,a,o;return Object(i.__generator)(this,(function(i){return"java"===(r=t.descriptor).type&&null!==(a=Object(u.tryFindStudyLineToolNameByStudyId)(r.studyId))?(l.tool.setValue(a),[2,null]):(o=e.activeChartWidget.value())?[2,o.insertStudy(t.descriptor,n,t.shortDescription)]:[2,null]}))}))}(this._chartWidgetCollection,e,null!==(n=this._parentSource)&&void 0!==n?n:void 0).then((function(){var e;C.CheckMobile.any()||null===(e=r._searchInputRef.current)||void 0===e||e.focus()})))},e.prototype._setProps=function(e){var t=this._getProps().value(),n=t.isOpened;this._isForceRender=n&&"isOpened"in e&&!e.isOpened;var r=Object(i.__assign)(Object(i.__assign)({},t),e);this._getProps().setValue(r)},e.prototype._requestBuiltInJavaStudies=function(){return this._chartWidgetCollection.activeChartWidget.value().metaInfoRepository().findAllJavaStudies()},e.prototype._focus=function(){var e;this._getProps().value().isOpened&&(null===(e=this._dialog.current)||void 0===e||e.focus())},e.prototype._getContainer=function(){return this._container},e.prototype._getDialog=function(){return this._dialog},e}(),ie=n("hY0g"),re=n.n(ie);n.d(t,"IndicatorsLibraryContainer",(function(){return ae}));var ae=function(e){function t(t,n){var i=e.call(this,t)||this;return i._studies={},i._options={onWidget:!1},i._getStudies=function(e){return i._studies[e]||[]},n&&(i._options=n),i._props=new re.a({data:[],applyStudy:i._applyStudy.bind(i),isOpened:!1,reference:i._getDialog(),
onClose:i.hide.bind(i)}),i._getProps().subscribe(i._render.bind(i)),i._init(),i}return Object(i.__extends)(t,e),t.prototype._getProps=function(){return this._props},t.prototype._init=function(){return Object(i.__awaiter)(this,void 0,void 0,(function(){var e,t,n,r;return Object(i.__generator)(this,(function(a){switch(a.label){case 0:return[4,this._requestBuiltInJavaStudies()];case 1:return e=a.sent(),this._studies=m(f(e.map(b))),[3,3];case 2:t=a.sent().pineBuiltInStudies,n=m(f(t.map(mapPineStudy),!1)),this._studies=Object(i.__assign)(Object(i.__assign)({},this._studies),n),a.label=3;case 3:return r=Object(i.__spreadArrays)(this._getStudies("tv-basicstudies"),this._getStudies("Script$STD")).filter((function(e){return!e.isStrategy})).sort(v),this._setProps({data:r}),[2]}}))}))},t.prototype._render=function(){if(!this._shouldPreventRender()){var e=this._getRenderData(),t=e.props,n=e.container;c.a.render(a.a.createElement(X,Object(i.__assign)({},t)),n)}},t}(ne)}}]);