File Manager
Viewing File: 136.js
(window.webpackJsonp=window.webpackJsonp||[]).push([[136],{"6q77":function(t,e,o){"use strict";o.d(e,"a",(function(){return r})),o.d(e,"b",(function(){return i}));var r,i,n=o("j+67"),s=o("Vdly");!function(t){t.getDefaultColor=function(){return s.getValue("default_symbol_marker_color",n.b.Red)},t.setDefaultColor=function(t){s.setValue("default_symbol_marker_color",t,{forceFlush:!0})}}(r||(r={})),function(t){t.getDefaultColor=function(){return s.getValue("default_symbols_filter_color",n.b.Red)},t.setDefaultColor=function(t){s.setValue("default_symbols_filter_color",t,{forceFlush:!0})},t.setIsActive=function(t){s.setValue("marked_symbols_filter",t,{forceFlush:!0})},t.getIsActive=function(){return s.getBool("marked_symbols_filter",!1)}}(i||(i={}))},Ke6I:function(t,e,o){"use strict";o.d(e,"a",(function(){return r})),o.d(e,"b",(function(){return l}));var r,i=o("j+67"),n=o("6q77"),s=o("lnbc");!function(t){t[t.SymbolMarker=0]="SymbolMarker",t[t.ScreenerFilter=1]="ScreenerFilter"}(r||(r={}));var l=function(){function t(t){this._context=t.context}return t.prototype.getColor=function(){switch(this._context){case r.SymbolMarker:return this._getAvailableColor(n.a.getDefaultColor());case r.ScreenerFilter:return this._getAvailableColor(n.b.getDefaultColor())}},t.prototype.setColor=function(t){switch(this._context){case r.SymbolMarker:n.a.setDefaultColor(this._getAvailableColor(t));break;case r.ScreenerFilter:n.b.setDefaultColor(this._getAvailableColor(t))}},t.prototype._getAvailableColor=function(t){return Object(s.b)(t)?t:(this.setColor(i.b.Red),i.b.Red)},t}()},M4p8:function(t,e,o){"use strict";o.d(e,"a",(function(){return c}));var r=o("j+67"),i=(o("EsMY"),o("gWrr")),n=o("T6Dw"),s=o("TSYQ"),l=o("xKng"),c=function(){function t(t){var e=this;this._onClick=function(t){e._opts.onClick&&e._opts.onClick(t)},this._onDblClick=function(t){e._opts.onDblClick&&e._opts.onDblClick(t)},this._container=t.container,this._opts=t,this._elem=this._render(t),this._addEventListeners()}return t.prototype.setColor=function(t){this.removeColor(),this._elem.classList.add(l[t])},t.prototype.removeColor=function(){this._elem.classList.remove(l[r.b.Red],l[r.b.Orange],l[r.b.Purple],l[r.b.Green],l[r.b.Blue])},t.prototype.addClass=function(t){this._elem.classList.add(t)},t.prototype.removeClass=function(t){this._elem.classList.remove(t)},t.prototype.getElem=function(){return this._elem},t.prototype.appendTo=function(t){this.detach(),this._container=t,this._container.appendChild(this._elem),this._addEventListeners()},t.prototype.detach=function(){this._removeEventListeners(),this._container&&(this._container.removeChild(this._elem),delete this._container)},t.prototype._render=function(t){var e,o=s(l.uiMarker,((e={})[t.className]=Boolean(t.className),e[l[t.color]]=Boolean(t.color),e)),r=t.specialImage||n,c=Object(i.parseHtmlElement)('<div class="'+o+'">'+r+"</div>");if(!c)throw new Error("Can't parse html");return this._container&&this._container.appendChild(c),c},t.prototype._addEventListeners=function(){var t=Modernizr.mobiletouch?"touchstart":"click"
;this._elem.addEventListener(t,this._onClick),this._opts.onDblClick&&this._elem.addEventListener("dblclick",this._onDblClick)},t.prototype._removeEventListeners=function(){var t=Modernizr.mobiletouch?"touchstart":"click";this._elem.removeEventListener(t,this._onClick),this._opts.onDblClick&&this._elem.removeEventListener("dblclick",this._onDblClick)},t}()},T6Dw:function(t,e){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 12" width="14" height="12" fill="currentColor" focusable="false" preserveAspectRatio="none"><path d="M14 12l-4-6 4-6H0v12z"/></svg>'},fFbJ:function(t,e,o){"use strict";o.d(e,"a",(function(){return c})),o.d(e,"b",(function(){return u}));var r=o("mrSG"),i=(o("YFKU"),o("HbRj"),o("M4p8")),n=o("tEuG"),s=o("+9Gp"),l=o("Ke6I"),c=function(){function t(t){var e=this;this._service=Object(n.a)(),this._colorManager=new l.b({context:l.a.SymbolMarker}),this._onClick=function(t){t.preventDefault();var o=function(){if(null===e._color){var t=e._colorManager.getColor();s.PopupColorSelector.show({elem:e._uimarker.getElem(),currentColor:t,onSelectColor:e._onSelectColor}),e._service.setSymbolsColor([e._symbol],t)}else s.PopupColorSelector.hide(),e._service.setSymbolsColor([e._symbol],null)};window.runOrSignIn((function(){e._opts.onClick?e._opts.onClick(e._symbol,o):o()}),{source:"Set symbol color"})},this._onSelectColor=function(t){e._colorManager.setColor(t),e._service.setSymbolsColor([e._symbol],e._colorManager.getColor())},this._onDblClick=function(t){t.preventDefault()},this._onChange=function(){e._setState(e._service.getSymbolColor(e._symbol))},this._opts=t,this._symbol=t.symbol,this._color=t.color||this._service.getSymbolColor(this._symbol),this._uimarker=new i.a({color:this._color,container:t.container,className:t.className,onClick:this._onClick,onDblClick:this._onDblClick,specialImage:t.specialImage}),null!==this._color&&this._addActiveClassName(),this._service.onSymbolChange(this._symbol,this._onChange)}return t.prototype.updateSubscription=function(){this._setState(this._service.getSymbolColor(this._symbol))},t.prototype.bindTo=function(t,e){this._service.offSymbolChange(this._symbol,this._onChange),this._symbol=t,this._uimarker.appendTo(e),this._setState(this._service.getSymbolColor(t)),this._service.onSymbolChange(t,this._onChange)},t.prototype.unbind=function(){this._service.offSymbolChange(this._symbol,this._onChange),this._uimarker.detach()},t.prototype.getElem=function(){return this._uimarker.getElem()},t.prototype.isMarked=function(){return null!==this._color},t.prototype.destroy=function(){this.unbind(),delete this._uimarker,delete this._opts},t.prototype._setState=function(t){var e=this.isMarked();this._color=t,null!==this._color?(this._uimarker.setColor(this._color),this._addActiveClassName()):(this._uimarker.removeColor(),this._removeActiveClassName()),void 0!==this._opts.onMarkedChanged&&e!==this.isMarked()&&this._opts.onMarkedChanged()},t.prototype._addActiveClassName=function(){this._opts.activeClassName&&this._uimarker.addClass(this._opts.activeClassName)},
t.prototype._removeActiveClassName=function(){this._opts.activeClassName&&this._uimarker.removeClass(this._opts.activeClassName)},t}(),a=function(t){function e(e){var o=t.call(this,e)||this;return o._onInit=function(){o.updateSubscription()},o._service.onInit(o._onInit),o}return Object(r.c)(e,t),e.prototype.destroy=function(){this._service.offInit(this._onInit),t.prototype.destroy.call(this)},e}(c);function u(t){return new a(t)}},xKng:function(t,e,o){t.exports={wrap:"wrap-1PBS_wt6",uiMarker:"uiMarker-1PBS_wt6",red:"red-1PBS_wt6",orange:"orange-1PBS_wt6",green:"green-1PBS_wt6",purple:"purple-1PBS_wt6",blue:"blue-1PBS_wt6",uiMarker__small:"uiMarker__small-1PBS_wt6"}}}]);