webpackJsonp([21],{699:function(t,o,i){"use strict";function e(t){this._options=t||{},this._setInput(),this._caption=$('').html(" "),this._helpTooltipTrigger=$('').text("?").attr("title",$.t("Type the interval number for minute charts (i.e. 5 if it is going to be a five minute chart). Or number plus letter for H (Hourly), D (Daily), W (Weekly), M (Monthly) intervals (i.e. D or 2H)")),this._dialogTitle=$.t("Change Interval")}function a(t){var o=/[\dhdwms]/i,i=/[\dhdwm]/i;return r.enabled("seconds_resolution")?o.test(t):i.test(t)}var n=i(62).linking,s=i(311).parseIntervalValue,l=i(311).intervalIsSupported,d=i(311).sanitizeIntervalValue,r=i(5),c=i(61),u=i(883).TVOldDialogs;e.prototype._setInput=function(){this._input=$(''),this._input.on("keypress",this._handleInput.bind(this)).on("input",function(){this._validate(),this._updateCaption()}.bind(this)).on("blur",function(){setTimeout(this._submit.bind(this),0)}.bind(this))},e.prototype._validate=function(){var t,o=this._input.val();this._parsed=s(o),this._valid=!this._parsed.error,this._supported=!this._parsed.error&&l(o),t=this._parsed.unit,this._supported&&("R"===t&&this._parsed.qty>c.getMaxResolutionValue("R")?this._supported=!1:null!==t&&"H"!==t||this._parsed.qty*("H"===t?60:1)>1440&&(this._supported=!1))},e.prototype._updateCaption=function(){var t,o,i;this._valid&&this._supported?(o=this._parsed.qty||1,i=this._parsed.unit||"",t=c.getTranslatedResolutionModel(o+i).hint,this._input.add(this._caption).removeClass("error")):(t=this._parsed.error?" ":$.t("Not applicable"),this._input.add(this._caption).addClass("error")),this._caption.html(t)},e.prototype._handleInput=function(t){if(13===t.which)return void this._submit();t.ctrlKey||t.metaKey||!t.charCode||!t.which||t.which<=32||a(String.fromCharCode(t.charCode))||t.preventDefault()},e.prototype._submit=function(){var t,o;u.isOpen(this._dialogTitle)&&(this._valid&&this._supported&&(t=d(this._input.val()),o=n.interval.value(),t&&o!==t&&"function"==typeof this._options.callback&&this._options.callback(t)),u.destroy(this._dialogTitle))},e.prototype._setInitialValue=function(t){var o,i;t=t||this._options.initialValue,o="",i=!1,t&&","!==t?o=d(t)||"":(t=n.interval.value(),o=t,i=!0),this._input.val(o),i&&this._input.select()},e.prototype.isValid=function(){return!!this._valid},e.prototype.show=function(t){var o=u.createDialog(this._dialogTitle,{hideCloseCross:!0,addClass:"change-interval-dialog",ownerDocument:this._options.ownerDocument}),i=o.find("._tv-dialog-content");return o.css("min-width",0),i.css("min-width",0).mousedown(function(t){this._input.is(t.target)||t.preventDefault()}.bind(this)).append(this._input.add(this._caption).add(this._helpTooltipTrigger)),u.applyHandlers(o),u.positionDialog(o),this._setInitialValue(t),this._validate(),this._updateCaption(),o},t.exports.ChangeIntervalDialog=e},827:function(t,o,i){"use strict" ;function e(t){return t in $.fn?Promise.resolve():(s||(s=new Promise(function(t){i.e(31).then(function(o){i(831),t()}.bind(null,i)).catch(i.oe)})),s)}function a(t){return new l(t)}var n,s,l;Object.defineProperty(o,"__esModule",{value:!0}),i.d(o,"LazyJqueryUI",function(){return l}),o.lazyJqueryUI=a,n=i(14),i.n(n),l=function(){function t(t){this._$elem=t}return t.prototype.draggable=function(){var t=arguments,o=this._$elem;return e("draggable").then(function(){return o.draggable.apply(o,t)})},t.prototype.resizable=function(){var t=arguments,o=this._$elem;return e("resizable").then(function(){return o.resizable.apply(o,t)})},t.prototype.sortable=function(){var t=arguments,o=this._$elem;return e("sortable").then(function(){return o.sortable.apply(o,t)})},t.prototype.datepicker=function(){var t=arguments,o=this._$elem;return e("datepicker").then(function(){return o.datepicker.apply(o,t)})},t}()},836:function(t,o){t.exports=''},845:function(t,o,i){"use strict";function e(t){var o,i,e=(t+"").match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return null===e?0:(o=e[1]?e[1].length:0,i=e[2]?parseInt(e[2],0):0,Math.max(0,o-i))}function a(t){return t=Math.abs(t),!Object(c.isInteger)(t)&&t>1&&(t=parseFloat((""+t).replace(/^.+\./,"0."))),0').appendTo(n.parent()),i=$('
').html(u).appendTo(o),e=$('
').html(u).appendTo(o),o.on("mousedown",function(t){t.preventDefault(),n.focus()}),i.click(function(){n.is(":disabled")||s(n)}),e.click(function(){n.is(":disabled")||l(n)}),n.keydown(function(t){n.is(":disabled")||(38===t.keyCode?i.addClass("i-active"):40===t.keyCode&&e.addClass("i-active"))}),n.keyup(function(t){ n.is(":disabled")||(38===t.keyCode?(s(n),i.removeClass("i-active")):40===t.keyCode&&(l(n),e.removeClass("i-active")))}),n.mousewheel(function(t,o){o>0?i.click():e.click()}))})}},851:function(t,o){},883:function(t,o,i){"use strict";(function(o,e){var a,n=i(50).max,s=i(827).lazyJqueryUI;i(845),a={modalDialog:null,dialogs:[],NOTIFICATION_ANIMATION_START_OFFSET:"-33px",_constrainDraggableOptionsIfNeeded:function(t){return o.enabled("constraint_dialogs_movement")&&(t.containment=".chart-page"),t},showNotice:function(t,o,i){var n,s,l,d,r,c;return"object"==typeof o&&(i=o,o=""),i=i||{},n=i.doNotCloseOnBgClick||!1,s=i.html||"",l=i.width||"400px",d={},d.noClose=i.noClose||null,d.addClass=i.modalDialogClass||null,a.createModalDialog(t,d),r=i.centerCaption?"caption-big-center":"caption-big",a.modalDialog.find("._tv-dialog").css("width",l),c=i.customButtonCaption?i.customButtonCaption:$.t("OK"),a.modalDialog.find("._tv-dialog-content").html(e.render('
{{text}}'+s+'
{{^removeOkButton}}
{{/removeOkButton}}
',{captionClassName:r,classSuffix:i.classSuffix||"",text:o,removeOkButton:i&&i.removeOkButton})),a.modalDialog.find("._tv-button.ok").on("click",function(){a.destroy(),i.onOkButtonClick&&i.onOkButtonClick()}),a.positionDialog(),a.applyHandlers(!1,{doNotCloseOnBgClickIfShadowbox:n,beforeDestroy:i.onClose}),a.modalDialog},showCustomDialog:function(t){function o(t){a.destroy(),t.preventDefault()}return a.createModalDialog(t.title||$.t("Dialog"),{addClass:""}),a.modalDialog.find("._tv-dialog").css("width",t.width||"400px"),a.modalDialog.find("._tv-dialog-content").html('
'+(t.html||$.t("Content"))+"
"),a.modalDialog.find(".ok").click(o),a.modalDialog.find("form").submit(o),a.modalDialog.find(".cancel").click(o),a.modalDialog.find("._tv-dialog-title-close").click(o),a.positionDialog(),a.applyHandlers(),a.modalDialog},createModalDialog:function(t,o){var i,e;return o=o||{},null!==a.modalDialog&&a.destroy(),a.modalDialog=$('
'+(o.noHeader?"":'
'+(o.noClose?"":'')+''+t+"
")+'
').appendTo($("body")).data("title",t),a._addMessageCloseButton(a.modalDialog.find("._tv-dialog-error")),a._addMessageCloseButton(a.modalDialog.find("._tv-dialog-message")),o.noShadowBox&&a.modalDialog.addClass("transparent"),o.addClass&&a.modalDialog.addClass(o.addClass),o.width&&a.modalDialog.find("._tv-dialog").css({width:o.width}),o.content&&a.modalDialog.find("._tv-dialog-content").html(o.content),i=$(".fancybox-overlay"),i.length&&(e=i.css("z-index"), $("._tv-dialog-shadowbox").css("z-index",e+1)),o.draggable&&s(a.modalDialog).draggable(a._constrainDraggableOptionsIfNeeded({handle:a.modalDialog.find("._tv-dialog-title")})),o.zIndex&&a.modalDialog.css("z-index",o.zIndex),a.modalDialog},_addMessageCloseButton:function(t){var o=$(i(884)).attr({class:"close",title:$.t("Close message")});t.append(o),$(o).on("click",function(){t.animate({marginTop:a.NOTIFICATION_ANIMATION_START_OFFSET,opacity:0},"fast",function(){t.hide()})})},createDialog:function(t,o){var i,l,d,r;return a.isOpen(t)?(i=a.get(t),i.find("._tv-dialog-content").html(""),i.data("new",!1),i):(o=o||{},l=o.ownerDocument||document,i=$(e.render('
{{^hideTitle}} {{&title}}{{/hideTitle}}{{^hideCloseCross}}{{/hideCloseCross}}
',{addClass:o.addClass||"",hideTitle:o.hideTitle,hideCloseCross:o.hideCloseCross,title:t}),l).appendTo(l.body),a._addMessageCloseButton(i.find("._tv-dialog-error")),a._addMessageCloseButton(i.find("._tv-dialog-message")),o.width&&i.css({width:o.width}),o.content&&i.find("._tv-dialog-content").html(o.content),d=0,d=o.zIndex?o.zIndex:a.dialogs&&a.dialogs.length?n($.map(a.dialogs,function(t){return parseInt((t.dialog||t).css("z-index"),10)}))+1:110,i.css("z-index",d),i.data("new",!0),i.data("title",t),i.data("id",a.dialogs.length+1),a.dialogs.push({title:t,dialog:i,id:a.dialogs.length+1}),r={start:function(t,o){var i,e,n=o.helper.css("z-index"),s=0,l=null;for(i=0;is&&(s=e,l=a.dialogs[i].dialog);o.helper.css("z-index",s),l.css("z-index",n)}},o.dragHandle?r.handle=o.dragHandle:o.hideTitle||(r.handle="._tv-dialog-title"),o.dragOptions&&$.extend(r,o.dragOptions),s(i).draggable(a._constrainDraggableOptionsIfNeeded(r)),i)},positionDialog:function(t,o,i){function e(){n.css("margin-left",-Math.round(n.outerWidth()/2)+"px"),n.css("margin-top",-Math.round(n.outerHeight()/2)+"px")}var n,s,l,d,r,c,u,p,g,h;i=i||{},o=o||i.position,t?(s=t.prop("ownerDocument"),l=s.defaultView,d=t.width(),r=t.height(),c=$(l).width(),u=$(l).height(),o&&o.top&&o.left?(g=i.forcePosition?o.left:Math.max(2,Math.min(c-d-4,o.left))+"px",p=i.forcePosition?o.top:Math.max(2,Math.min(u-r-4,o.top))+"px"):o&&o.considerScroll?(h=$(s),g=Math.round((c-d)/2+h.scrollLeft())+"px",p=Math.round((u-r)/2+h.scrollTop())+"px"):(g=Math.round((c-d)/2)+"px",p=Math.round((u-r)/2)+"px"),i.fadeIn?t.css({left:g,top:p}).hide().fadeIn("fast"):i.smooth?t.animate({left:g,top:p}):t.css({left:g,top:p})):(t=a.modalDialog,n=t.find("._tv-dialog"),e(),n.resize(e))},applyHandlers:function(t,o){var i,e,n,s=!t||t===this.modalDialog;o=o||{},i=s?function(){a.destroy()}:function(){ a.destroy(t.data("title"))},t=t||a.modalDialog.find("._tv-dialog"),e=t.prop("ownerDocument"),o.beforeDestroy&&t.on("destroy",o.beforeDestroy),t.find("._tv-dialog-title ._tv-dialog-title-close, .js-dialog-close").on("click",function(t){o.closeHandler&&"function"==typeof o.closeHandler?o.closeHandler(t):i()}),o.doNotCloseOnBgClick||setTimeout(function(){$(e).on("mousedown.closeDialog",function(a){var n=$(a.target).parents().andSelf();n.is(t)||o.doNotCloseOnBgClickIfShadowbox&&n.is("._tv-dialog-shadowbox, .tv-dialog__modal-wrap")||n.is(".colorpicker, .charts-popup-list, ._tv-dialog, .tvcolorpicker-popup, .symbol-edit-popup, .ui-datepicker, .clockpicker-popover, .pac-container")||($(e).off("mousedown.closeDialog"),i())})},0),t.find('input[type="checkbox"]').change(function(){var t=$(this);t.next("._tv-dialog-checkbox-mask").toggleClass("disabled",t.prop("disabled")).toggleClass("_tv-dialog-checkbox-mask-active",t.is(":checked"))}),n=t.find('input[type="text"]').focus(function(){$(this).addClass("_tv-dialog-content-textactive")}).blur(function(){$(this).removeClass("_tv-dialog-content-textactive")}).first(),Modernizr.touch||o.notFocusFirst||n.focus(),t.find('input[type="password"]').focus(function(){$(this).addClass("_tv-dialog-content-textactive")}).blur(function(){$(this).removeClass("_tv-dialog-content-textactive")}),t.find("textarea").focus(function(){$(this).addClass("_tv-dialog-content-textareaactive")}).blur(function(){$(this).removeClass("_tv-dialog-content-textareaactive")}),t.find("._tv-dialog-checkbox-mask").click(function(){var t=$(this).prev();t.prop("disabled")||(t.prop("checked",!t[0].checked),t.change())}),o.doNotCloseOnEsc||$(e).bind("keyup.hideDialog",function(o){if(27===o.keyCode)return t?a.destroy(t.data("title")):a.destroy(),!1}),o.processEnterButton&&$(e).bind("keyup.confirmAndCloseDialog",function(t){13===t.keyCode&&"textarea"!==t.target.tagName.toLowerCase()&&(o.processEnterButton.click(),$(e).unbind("keyup.confirmAndCloseDialog"))})},showError:function(t,o,i){a.showMessage(t,o,$.extend(i||{},{isError:!0}))},showMessage:function(t,o,i){var e,n,s;o||(o=$("._tv-dialog")),i=i||{},e=i.isError&&"_tv-dialog-error"||"_tv-dialog-message",n=o.find("."+e),s=n.find(".message"),i.html?s.html("string"==typeof i.html?i.html:t):s.text(t),s.css("width",o.width()).toggleClass("selectable",!!i.selectable),n.toggleClass("with-close",!!i.withClose).css({marginTop:a.NOTIFICATION_ANIMATION_START_OFFSET,opacity:"0"}).show().animate({marginTop:0,opacity:1},"fast"),i.withClose||(i.hideWithoutAnimation?n.on("touchstartoutside mousedownoutside keydownoutside",function t(){n.hide(),n.off("touchstartoutside mousedownoutside keydownoutside",t)}):n.on("touchstartoutside mousedownoutside keydownoutside",function t(){n.animate({marginTop:a.NOTIFICATION_ANIMATION_START_OFFSET,opacity:0},"fast",function(){n.hide()}),n.off("touchstartoutside mousedownoutside keydownoutside",t)}))},isOpen:function(t){for(var o=0;oe&&(a-=t-e,a=Math.max(0,a),o.height(a))}},t.exports.TVOldDialogs=a}).call(o,i(5),i(126))},884:function(t,o){t.exports=''}});