').appendTo(V),F=function(){function t(e){e._childs&&e._childs.length&&$.each(e._childs,function(i,o){"percentage"===o?e.percentage.listeners().fire(e.percentage):t(e[o])})}var e,i,o=[];y&&"function"==typeof y.defaultProperties&&(o=o.concat(y.defaultProperties())),m&&"function"==typeof m.defaultProperties&&(o=o.concat(m.defaultProperties())),0===o.length&&C._source.properties?o=[C._source.properties()]:C._source._sessionsStudy&&(o=o.concat(C._source._sessionsStudy.properties())),o.length&&(e=C._source.priceScale().mode(),$.each(o,function(e,i){C._model.restoreFactoryDefaults(i),C._source.calcIsActualSymbol&&C._source.calcIsActualSymbol(),t(i)}),i=C._source.priceScale(),i&&i.modeChanged().fire(e,i.mode()),C._source.properties().minTick&&C._source.properties().minTick.listeners().fire(C._source.properties().minTick),C._source.properties().precision&&C._source.properties().precision.listeners().fire(C._source.properties().precision),m&&m.loadData(),_&&_.loadData(),y.onResoreDefaults&&y.onResoreDefaults(),y&&y.loadData(),b&&b.loadData())},B=function(){b&&b.loadData(),m&&m.loadData()},(!v||window.is_authenticated)&&y&&"function"==typeof y.createTemplateButton&&e.enabled("linetoolpropertieswidget_template_button")?(M&&E[0].appendChild(M.domNode),C._templateButton=y.createTemplateButton({popupZIndex:A,defaultsCallback:F,loadTemplateCallback:B
}).addClass("tv-left").appendTo(E)):TradingView.isInherited(this._source.constructor,a)?(z=[{title:$.t("Reset Settings"),action:F},{title:$.t("Save As Default"),action:function(){C._source.properties().saveDefaults()}}],L=$('
'),L.on("click",function(t){t.preventDefault();var e=$(this);e.is(".active")||e.trigger("button-popup",[z,!0])}).appendTo(E),c(L,null,{direction:"down",event:"button-popup",notCloseOnButtons:!0,zIndex:A})):$('
").appendTo(E).on("click",function(t){o(t,!0)}),D.find("._tv-dialog-title a").on("click",o),$(window).bind("keyup.hidePropertyDialog",function(t){13===t.keyCode&&"textarea"!==t.target.tagName.toLowerCase()&&(C._templateButton&&C._templateButton.trigger("hide-popup"),C.hide())}),$("select",P).each(function(){var t=$(this),e="tv-select-container dialog";t.hasClass("tv-select-container-fontsize")&&(e+=" tv-select-container-fontsize"),t.selectbox({speed:100,classHolder:e})}),$('input[type="text"]',P).addClass("tv-text-input inset dialog"),$("input.ticker",P).TVTicker(),D.css("min-width",I+"px"),u.applyHandlers(D,t),R={top:($(window).height()-D.height())/2,left:($(window).width()-D.width())/2},y&&"function"==typeof y.dialogPosition&&(R=y.dialogPosition(R,D)||R),u.positionDialog(D,R),window.lineToolPropertiesToolbar&&window.lineToolPropertiesToolbar.hide(),l.emit("edit_object_dialog",{objectType:this._source===this._model.mainSeries()?"mainSeries":this._source instanceof n?"drawing":this._source instanceof a?"study":"other",scriptTitle:this._source.title()}),D},o.prototype._helpItemRequired=function(){return this._source._metaInfo&&!!this._source._metaInfo.helpURL},o.prototype._createHelp=function(){var t=$('
');t.attr("href",this._source._metaInfo.helpURL),this._tabContainer.prepend(t)},t.exports=o}).call(e,i(5))},691:function(t,e,i){"use strict";function o(t,e,i){a.call(this,t,e),this._linetool=i,this.prepareLayout()}var n=i(823),a=n.PropertyPage,s=n.GreateTransformer,r=n.LessTransformer,l=n.ToIntTransformer,c=n.SimpleStringBinder;i(845),inherit(o,a),o.BarIndexPastLimit=-5e4,o.BarIndexFutureLimit=15e3,o.prototype.bindBarIndex=function(t,e,i,n){var a=[l(t.value()),s(o.BarIndexPastLimit),r(o.BarIndexFutureLimit)];this.bindControl(this.createStringBinder(e,t,a,!0,i,n))},o.prototype.createPriceEditor=function(t){var e,i,o,n=this._linetool,a=n.ownerSource().formatter(),s=function(t){return a.format(t)},r=function(t){var e=a.parse(t);if(e.res)return e.price?e.price:e.value},l=$("
");return l.TVTicker({step:a._minMove/a._priceScale||1,formatter:s,parser:r}),t&&(e=[function(e){var i=r(e);return void 0===i?t.value():i}],i="Change "+n.title()+" point price",o=this.createStringBinder(l,t,e,!1,this.model(),i),
o.addFormatter(function(t){return a.format(t)}),this.bindControl(o)),l},o.prototype._createPointRow=function(t,e,i){var o,n,a,s,r,l=$("
"),c=$("");return c.html($.t("Price")+i),c.appendTo(l),o=$(" | "),o.appendTo(l),n=this.createPriceEditor(e.price),n.appendTo(o),a=$(" | "),a.html($.t("Bar #")),a.appendTo(l),s=$(" | "),s.appendTo(l),r=$(""),r.appendTo(s),r.addClass("ticker"),this.bindBarIndex(e.bar,r,this.model(),"Change "+this._linetool.title()+" point bar index"),l},o.prototype.prepareLayoutForTable=function(t){var e,i,o,n,a,s=this._linetool.points(),r=s.length;for(e=0;e1?" "+(e+1):"",a=this._createPointRow(i,o,n),a.appendTo(t))},o.prototype.prepareLayout=function(){this._table=$(document.createElement("table")),this._table.addClass("property-page"),this._table.attr("cellspacing","0"),this._table.attr("cellpadding","2"),this.prepareLayoutForTable(this._table),this.loadData()},o.prototype.widget=function(){return this._table},o.prototype.createStringBinder=function(t,e,i,o,n,a){return new c(t,e,i,o,n,a)},t.exports=o},693:function(t,e,i){"use strict";e.createInputsPropertyPage=function(t,e){var i=t.getInputsPropertyPage();return null==i?null:new i(t.properties(),e,t)},e.createStudyStrategyPropertyPage=function(t,e){var i=t.getStrategyPropertyPage();return null==i?null:new i(t.properties(),e,t)},e.createStylesPropertyPage=function(t,e){var i=t.getStylesPropertyPage();return null==i?null:new i(t.properties(),e,t)},e.createDisplayPropertyPage=function(t,e){var i=t.getDisplayPropertyPage();return null==i?null:new i(t.properties(),e,t)},e.createVisibilitiesPropertyPage=function(t,e){var i=t.getVisibilitiesPropertyPage();return null==i?null:new i(t.properties(),e,t)},e.hasInputsPropertyPage=function(t){return null!==t.getInputsPropertyPage()},e.hasStylesPropertyPage=function(t){return null!==t.getStylesPropertyPage()}},823:function(t,e,i){"use strict";(function(t){function o(t,e){return'"}function n(t,e){this._model=e,this._bindings=[],this._property=t,this.supportThemeSwitcher=!1}function a(t){return t.toUpperCase()}function s(t){return function(e){return et?t:e}}function l(t){return function(e){var i=parseInt(e,10);return E(i)?t:i}}function c(t){var e=new L;return function(i){var o=e.parse(i);return E(o)?t:o}}function p(t){var e=new L;return function(i){var o=e.parse(i);return E(o)?t():o}}function u(t,e){var i=new R(e);return function(e){var o=i.format(e);return E(o)?t:o}}function d(){return function(t){for(var e=t,i=t.replace(/[^\u0000-\u007F]/,"");i.length!==e.length;)e=i,i=e.replace(/[^\u0000-\u007F]/,"");return i}}function h(t){return function(e){return 0===e.length?t:e}}function f(t,e){return function(i){var o=t();return i===e.value()&&o&&(o.ticker||o.full_name)?o.ticker||o.full_name:i}}function v(t,e,i,o,n,a,s){U.call(this,t,e,o,n,a),this._transformFunction=i,this._setter=s,this._attachToControl(t,o)}function g(t,e,i,o,n){
v.call(this,t,e,c(e.value()),i,o,n),this.addFormatter(function(t){return(new L).format(t)})}function _(t,e,i,o,n,a){this._subControlIds=e,U.call(this,t,i,o,n,a),this._forEachSubControl(function(t){this._attachToControl(t,o)})}function m(t,e,i,o,n,a,s){this._model=o,this._mainSeries=a,this._toIntTransformer=l(s),this._disabled=!1,U.call(this,t,e,i,o,n);var r=this;i&&t.change(function(){r.setValueToProperty(r.value())}),this._mainSeries.dataEvents().barReceived().subscribe(this,function(){r.setValue(this.property().value())})}function y(t,e,i,o,n,a,s){U.call(this,t,e,i,o,n),this._transform=a,i&&t.on("accept-symbol",function(t,e){this.setValueToProperty(e),this.setValue(e)}.bind(this)),s&&(s.subscribe(this,this._updateDisplayedSymbol),this._updateDelegate=s)}function b(t,e,i,o,n,a,s,r){U.call(this,t,e,o,n,a),this._transformFunction=i,this._propertyChangedHook=r,this._setter=s;var l=this;o&&t.change(function(){l._setter?l._setter.call(l,l.value()):l.setValueToProperty(l.value())})}function T(t,e){U.call(this,t,e)}function C(t,e,i,o,n,a){if(!t.is(":checkbox, :radio"))return new x(t,e,i,o,n);U.call(this,t,e,i,o,n),this._setter=a;var s=this;i&&t.change(function(){s._setter?s._setter.call(s,s.value()):s.setValueToProperty(s.value())})}function w(t,e,i,o,n,a){U.call(this,t,e,i,o,n),this._inverted=!0===a}function x(t,e,i,o,n){U.call(this,t,e,i,o,n);var a=this;i&&t.click(function(){var t=$(this).toggleClass("active").hasClass("active");a.setValueToProperty(t)})}function k(t,e,i,o,n,a){var s,r;s=t.is("input")?t:t.find("input"),U.call(this,s,e,i,o,n),this._transparencyProperty=a,this.applyOldTransparency(),r=this,i&&s.change(function(){r.setValueToProperty(r.value())})}function D(e,i,o,n,a,s){function r(t,e){var i=c.control().slider("option","min"),o=c.control().slider("option","max"),n=c._property.value();(i<=n&&n<=o||il._transformers[1]&&$(a[1]).val(l._transformers[1]),-1!==$.inArray(t.keyCode,[46,8,9,27,13,110,190])||65===t.keyCode&&!0===t.ctrlKey||67===t.keyCode&&!0===t.ctrlKey||88===t.keyCode&&!0===t.ctrlKey||t.keyCode>=35&&t.keyCode<=39||(t.shiftKey||t.keyCode<48||t.keyCode>57)&&(t.keyCode<96||t.keyCode>105)&&t.preventDefault()})}),$(a[0]).on("keyup",function(t){parseInt($(this).val())l._transformers[1]&&$(this).val(l._transformers[1]),parseInt($(this).val())>parseInt($(a[1]).val())&&$(this).val(a[1].val()),l._control.slider("values",0,$(this).val()),O.prototype.setValueToProperty.call(l,l._control.slider("values"),"from")}),$(a[1]).on("keyup",function(t){parseInt($(this).val())l._transformers[1]&&$(this).val(l._transformers[1]),parseInt($(this).val())<$(a[0]).val()&&$(this).val(a[0].val()),l._control.slider("values",1,$(this).val()),O.prototype.setValueToProperty.call(l,l._control.slider("values"),"to")})),this._propFrom.listeners().subscribe(this,O.prototype.propertyChanged),this._propTo.listeners().subscribe(this,O.prototype.propertyChanged),o&&t.on("slide",function(t,e){l.setValueToProperty(l._control.slider("values"),e.handle)}),t.slider({stop:function(t,e){a&&($(a[0]).val(l._control.slider("values",0)),$(a[1]).val(l._control.slider("values",1))),l.setValueToProperty(l._control.slider("values"),e.handle)},start:function(t,e){a&&($(a[0]).val(l._control.slider("values",0)),$(a[1]).val(l._control.slider("values",1))),l.setValueToProperty(l._control.slider("values"),e.handle)}})}function I(t,e,i,o,n,a){U.call(this,t,e,i,o,n),this._separator=a||" ";var s=this;i&&t.change(function(){s.setValueToProperty(s.value())})}var V,E,N,A,F,B,z,L,R,H,j,U,W;i(866),V=i(7).ensureNotNull,E=i(83).isNaN,N=i(24),A=N.rgba,F=N.rgbaToString,B=N.parseRgb,z=i(72).TimePointIndexSearchMode,L=i(105).NumericFormatter,R=i(193).LimitedPrecisionNumericFormatter,H=i(29),
j=i(829).addColorPicker,U=i(317).Binding,W=i(4).getLogger("Chart.PropertyPage"),n.prototype.model=function(){return this._model},n.prototype.bindControl=function(t){return this._bindings.push(t),t},n.prototype.unbindControl=function(t){var e=this._bindings.indexOf(t);-1!==e&&this._bindings.splice(e,1)},n.prototype.loadData=function(){var t,e,i;for(t=0;t',t).slider({max:4,min:1,step:1})},n.prototype.createColorPicker=function(t){return j(null,t)},n.prototype.createTextEditor=function(t,e){var i={};return t&&(i.width=t),e&&(i.height=e),$(document.createElement("textarea")).css(i).addClass("tv-control-input")},n.prototype.createCombo=function(t){var e=$(document.createElement("select")),i=t.reduce(function(t,e){return t.add($(document.createElement("option")).prop({value:e,text:e}))},$());return e.append(i)},n.prototype.createKeyCombo=function(t){var e=$(document.createElement("select"));return $.each(t||[],function(t,i){$(document.createElement("option")).prop({value:t,text:i}).appendTo(e)}),e},n.prototype.createFontEditor=function(t){var e=t||TradingView.factoryDefaults("chartproperties.editorFontsList");return this.createCombo(e)},n.prototype.createFontSizeEditor=function(t){var e=t||[10,11,12,14,16,20,24,28,32,40];return this.createCombo(e).addClass("tv-select-container-fontsize")},n.prototype.createSeriesMinTickEditor=function(){var t,e,i,o,n="",$(n)},n.prototype.createPrecisionEditor=function(){var t,e="",$(e)},n.prototype.createLabeledCell=function(t,e,i){var o,n,a,s,r=null
;return"number"==typeof t.valueOf()?(r=t,o=e,n=i):(o=t,n=e),o+="",a=this._labelToId(o),s=$(""),$(" | |