(window.webpackJsonp=window.webpackJsonp||[]).push([[29],{L9lC:function(t,e,o){(function(t){function i(t,e,o,i,n){l.call(this,t,e),this._study=o,this._showOnlyConfirmInputs=i,this._symbolSearchZindex=n,this.prepareLayout(),this._$symbolSearchPopup=null}var n=o("DxCR"),s=n.UppercaseTransformer,r=n.SymbolBinder,a=n.BarTimeBinder,p=n.SessionBinder,l=n.PropertyPage,d=n.GreateTransformer,u=n.LessTransformer,h=n.ToIntTransformer,c=n.ToFloatTransformer,f=n.SymbolInfoSymbolTransformer,y=n.SimpleComboBinder,m=n.BooleanBinder,v=n.SimpleStringBinder,_=o("zXvd").NumericFormatter,b=o("0YCj"),w=o("uOxu").getLogger("Chart.Study.PropertyPage.Inputs"),g=o("pZll").symbolSearchUIService;inherit(i,l),i.prototype._addSessionEditor=function(t,e,o,i){var n,s,r,a,l,d;"session"===o.type?(n=function(t,e){var o,i=$("");i.appendTo(t),i.css("padding-left","0px"),i.css("padding-right","0px"),(o=$("")).attr("type","text"),o.addClass("ticker"),o.css("width","40px"),o.attr("id",e),o.appendTo(i)},s=function(t,e,o){var i,n=$("");n.css("padding-left",o),n.css("padding-right",o),n.appendTo(t),(i=$("
")).appendTo(n),i.append(e),i.css("font-size","150%")},(r=$("")).appendTo(t),(a=$("")).appendTo(r),l=["start_hours","start_minutes","end_hours","end_minutes"],n.call(this,a,l[0]),s.call(this,a,":",0),n.call(this,a,l[1]),s.call(this,a,"-",4),n.call(this,a,l[2]),s.call(this,a,":",0),n.call(this,a,l[3]),d=!1,this.bindControl(new p(a,l,e,d,this.model(),i))):w.logError("Session editor adding FAILED: wrong input type.")},i.prototype.prepareControl=function(e,o,i){var n,s,r,a,p,l,d,u,h,c,f,y,m,v,_,C,x,T,S,k,I,O=this,P=null,E=null,L=null;if("resolution"===e.type)P=$('");else if("symbol"===e.type)P=$(''),g().bindToInput(P,{onPopupOpen:function(t){this._$symbolSearchPopup=t,this._symbolSearchZindex&&t.css("z-index",this._symbolSearchZindex)}.bind(this),onPopupClose:function(){this._$symbolSearchPopup=null}.bind(this),callback:function(t){e.value=t}}),o.attr("colspan",5);else if("session"===e.type)this._addSessionEditor(o,this._property.inputs[e.id],e,i);else if("source"===e.type){for(n={},s={open:window.t("open"),high:window.t("high"),low:window.t("low"),close:window.t("close"),hl2:window.t("hl2"),hlc3:window.t("hlc3"),ohlc4:window.t("ohlc4")},r=Object.keys(s),a=0;a").attr("value",S).text(k).appendTo(P);o.addClass("js-value-cell")}else e.options?(P=$(""),"bool"===e.type?P.attr("type","checkbox"):P.attr("type","text"));return P&&(P.appendTo(o),P.is(":checkbox")||"symbol"===e.type||P.css("width","100px")),{valueEditor:P,valueSetter:E,propertyChangedHook:L}},i.prototype._symbolInfoBySymbolProperty=function(t){return this._study.resolvedSymbolInfoBySymbol(t.value())},i.prototype._sortInputs=function(t){return t},i.prototype.prepareLayoutImpl=function(t,e){function o(t){return(new _).format(t)}var i,n,p,l,b,w,g,C,x,T,S,k,I,O,P,E,L,B,V=this._sortInputs(t.inputs);for(i=0;i")).appendTo(e),(g=$("
")).appendTo(w),g.addClass("propertypage-name-label"),g.text(window.t(l,{context:"input"})),(C=$("")).appendTo(w),x=this.prepareControl(n,C,b),T=x.valueEditor,S=x.valueSetter,k=x.propertyChangedHook,n.options?this.bindControl(new y(T,this._property.inputs[p],null,!0,this.model(),b,S,k)):"bar_time"===n.type?(I=10,this.bindControl(new a(T,this._property.inputs[p],!0,this.model(),b,this.model().mainSeries(),I)), T.addClass("ticker")):"integer"===n.type?(O=[h(n.defval)],(0===n.min||n.min)&&O.push(d(n.min)),(0===n.max||n.max)&&O.push(u(n.max)),this.bindControl(new v(T,this._property.inputs[p],O,!1,this.model(),b)),T.addClass("ticker"),isFinite(n.step)&&n.step>0&&T.attr("data-step",n.step)):"float"===n.type?(O=[c(n.defval)],(0===n.min||n.min)&&O.push(d(n.min)),(0===n.max||n.max)&&O.push(u(n.max)),(P=new v(T,this._property.inputs[p],O,!1,this.model(),b)).addFormatter(o),this.bindControl(P),T.addClass("ticker"),isFinite(n.step)&&n.step>0&&T.attr("data-step",n.step)):"text"===n.type?this.bindControl(new v(T,this._property.inputs[p],null,!1,this.model(),b)):"bool"===n.type?this.bindControl(new m(T,this._property.inputs[p],!0,this.model(),b)):"resolution"===n.type?this.bindControl(new y(T,this._property.inputs[p],s,!0,this.model(),"Change Interval")):"symbol"===n.type&&(E=this._symbolInfoBySymbolProperty.bind(this,this._property.inputs[p]),L=f(E,this._property.inputs[p]),B=new r(T,this._property.inputs[p],!0,this.model(),"Change Symbol",L,this._study.symbolsResolved()),this.bindControl(B))));this._property.offset&&(l=this._property.offset.title?this._property.offset.title.value():window.t("Offset"),T=this.addOffsetEditorRow(e,l),(O=[h(this._property.offset.val)]).push(d(this._property.offset.min)),O.push(u(this._property.offset.max)),this.bindControl(new v(T,this._property.offset.val,O,!1,this.model(),"Undo "+l))),this._property.offsets&&$.each(t.plots,function(t,o){var i,n,s;this._property.offsets[o.id]&&(void 0!==(i=this._property.offsets[o.id]).isHidden&&i.isHidden.value()||(n=i.title.value(),T=this.addOffsetEditorRow(e,n),(s=[h(i.val)]).push(d(i.min)),s.push(u(i.max)),this.bindControl(new v(T,i.val,s,!1,this.model(),"Undo "+n))))}.bind(this))},i.prototype.prepareLayout=function(){this._table=$(""),this._table.addClass("property-page"),this._table.attr("cellspacing","0"),this._table.attr("cellpadding","2");var t=this._study.metaInfo();this.prepareLayoutImpl(t,this._table),this.loadData()},i.prototype.symbolSearchPopup=function(){return this._$symbolSearchPopup},i.prototype.widget=function(){return this._table},e.StudyInputsPropertyPage=i}).call(this,o("Kxc7"))},PVgW:function(t,e,o){"use strict";function i(t){return t=Math.abs(t),!Object(l.isInteger)(t)&&t>1&&(t=parseFloat(t.toString().replace(/^.+\./,"0."))),0').appendTo(a.parent()),o=$('
').html(d).appendTo(e),i=$('
').html(d).appendTo(e),e.on("mousedown",function(t){t.preventDefault(),a.focus()}),o.click(function(){a.is(":disabled")||s(a)}),i.click(function(){a.is(":disabled")||r(a)}),a.keydown(function(t){a.is(":disabled")||(38===t.keyCode?o.addClass("i-active"):40===t.keyCode&&i.addClass("i-active"))}),a.keyup(function(t){a.is(":disabled")||(38===t.keyCode?(s(a),o.removeClass("i-active")):40===t.keyCode&&(r(a),i.removeClass("i-active")))}),a.mousewheel(function(t){t.deltaY*(t.deltaFactor/100)>0?o.click():i.click()}))})}},"R4+T":function(t,e){t.exports=''},"y1L/":function(t,e,o){}}]);