From 0f3519d03f9945504f2693bee8dcd84eccfe66b3 Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Mon, 25 Sep 2023 23:45:58 +0300 Subject: [PATCH] Add support to preserve last selected server https://forum.virtualmin.com/t/dashboard-defaults-to-alpha-domain/122757/11?u=ilia --- navigation-lib.pl | 25 ++++++++++++++++++++----- unauthenticated/js/bundle.min.js | 2 +- unauthenticated/js/bundle.min.js.gz | Bin 490211 -> 490410 bytes 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/navigation-lib.pl b/navigation-lib.pl index 3bf0a89bd..ab2963768 100644 --- a/navigation-lib.pl +++ b/navigation-lib.pl @@ -338,8 +338,8 @@ sub nav_virtualmin_menu $rv .= nav_theme_links(); $rv .= nav_links($menu->{'mode'}); $rv .= nav_menu_html_snippet(); - $rv .= nav_detect_page($page); - $rv .= nav_detect_script(); + $rv .= nav_detect_page($page, 1); + $rv .= nav_detect_script(1); return $rv; } @@ -427,14 +427,27 @@ sub nav_get_server_id return $default; } +sub nav_set_last_id +{ + my ($link) = @_; + if ($link && $link =~ /(id|dom)=(\d+)/) { + return "vars.navigation.select.last='$2';"; + } + return undef; +} + sub nav_detect_page { - my ($page) = @_; + my ($page, $set_last) = @_; my $rv; if ($page) { $page = quote_escape($page); $page =~ s/&/&/g; - $rv .= "
  • \n"; + my $last_id = $set_last ? nav_set_last_id($page) : undef; + if ($last_id) { + $last_id = ""; + } + $rv .= "
  • $last_id
  • \n"; } return $rv; } @@ -442,12 +455,14 @@ sub nav_detect_page sub nav_detect_script { # Get goto hidden li element + my ($set_last) = @_; my $rv; if ($server_x_goto) { my $link = quote_escape($server_x_goto); $link =~ s/&/&/g; + my $last_id = $set_last ? nav_set_last_id($link) : undef; $rv = -"
  • \n"; +"
  • \n"; } return $rv; } diff --git a/unauthenticated/js/bundle.min.js b/unauthenticated/js/bundle.min.js index baa733d0f..6ee2195d2 100644 --- a/unauthenticated/js/bundle.min.js +++ b/unauthenticated/js/bundle.min.js @@ -165,4 +165,4 @@ if(typeof jQuery==="undefined"){throw new Error("Bootstrap's JavaScript requires * Copyright Ilia Rostovtsev * Licensed under MIT (https://github.com/authentic-theme/authentic-theme/blob/master/LICENSE) */ -if(!Array.prototype.includes){Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(this==null){throw new TypeError('"this" is null or not defined')}var n=Object(this);var a=n.length>>>0;if(a===0){return false}var i=t|0;var s=Math.max(i>=0?i:a-Math.abs(i),0);function r(e,t){return e===t||typeof e==="number"&&typeof t==="number"&&isNaN(e)&&isNaN(t)}while(s>>0;for(var i=0;i input"}},event:{page:{end:"ready pjax:end"}}},level:-1,cache:{}};const browser={detect:{internet_explorer:function e(){var t=0,n=/MSIE (\d+\.\d+);/.test(navigator.userAgent),a=!!navigator.userAgent.match(/Trident\/7.0/),i=navigator.userAgent.indexOf("rv:11.0");return n&&(t=new Number(RegExp.$1)),-1!=navigator.appVersion.indexOf("MSIE 10")&&(t=10),a&&-1!=i&&(t=11),t},safari:function e(t){var n=window.navigator.userAgent,a=(!!n.match(/iPad/i)||!!n.match(/iPhone/i))&&!!n.match(/WebKit/i)&&!n.match(/CriOS/i)&&!n.match(/OPiOS/i),i=navigator.vendor&&navigator.vendor.indexOf("Apple")>-1&&navigator.userAgent&&!navigator.userAgent.match("CriOS");return t?a:i},firefox:function(){return/firefox/i.test(navigator.userAgent)},chrome:function(){return/chrome/i.test(navigator.userAgent)}},storage:{size:function e(t){var n=String(),a=t?"MB":"KB";for(var i in window.localStorage){window.localStorage.hasOwnProperty(i)&&(n+=window.localStorage[i])}return n?((3+16*n.length/8192)/(t?1024:1)).toFixed(2)+" "+a:"Empty (0 "+a+")"}},set:function(){if(browser.detect.safari()){$(document.body).attr("data-browser","safari")}else if(browser.detect.firefox()){$(document.body).attr("data-browser","firefox")}}};const platform={detect:function(){var e=window.navigator.userAgent,t=window.navigator.platform,n=["Macintosh","MacIntel","MacPPC","Mac68K"],a=["Win32","Win64","Windows","WinCE"],i=["iPhone","iPad","iPod"],s=null;if(n.indexOf(t)!==-1){s="mac"}else if(i.indexOf(t)!==-1){s="ios"}else if(a.indexOf(t)!==-1){s="windows"}else if(/Android/.test(e)){s="android"}else if(!s&&/Linux/.test(t)){s="linux"}return s},set:function(){var e=this.detect();if(e){$(document.body).attr("data-platform",e)}}};const Convert={arrFlip:function(e){var t,n={};for(t in e){if(e.hasOwnProperty(t)){n[e[t]]=t}}return n},arrPrepend:function(e,t){var n=t.slice();n.unshift(e);return n},uriDecodeComponent:function(e,t){var n=String(),a,i=0,s,r;typeof t==="undefined"?t=0:0;a=e?e.split(/(%(?:d0|d1)%.{2})/):[];if($.isEmptyObject(a)){return e}for(s=a.length;i":">",'"':""","'":"'","=":"="};return String(e).replace(/[&<>"'=]/g,function(e){return t[e]})},htmlUnEscape:function(e){var t=[["amp","&"],["apos","'"],["#x27","'"],["#x2F","/"],["#39","'"],["#47","/"],["#61","="],["lt","<"],["gt",">"],["nbsp"," "],["quot",'"']];if(!!e){for(var n=0,a=t.length;n");n=n.replaceAll("&","&");e=e.replaceAll(t,n)});return e},htmlDecode:function(e){return e.replace(/\\x([0-9A-Fa-f]{2})/g,function(){return String.fromCharCode(parseInt(arguments[1],16))})},textTruncate:function(e,t,n){if(e.length<=t)return e;n=n||"...";var a=n.length,i=t-a,s=Math.ceil(i/2),r=Math.floor(i/2);return e.substr(0,s)+n+e.substr(e.length-r)},htmlStrip:function(e){var t=(new DOMParser).parseFromString(e,"text/html");return t.body.textContent||""},pathnamePopLast:function(e){var t=!!~e.indexOf("%2F")?"%2F":"/",n=e.split(t),a;n.pop();a=n.join(t);return a?a:"/"},strUpFirst:function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},strUpFirstEach:function(e){return e.replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})},strUpInitial:function(e){return e.length?this.strUpFirst(e.toLowerCase()):e},json_to_query:function(e){if(typeof e!=="object"){return String()}return""+Object.entries(e).map(function(e){var t=e[0],n=e[1];return t+"="+encodeURIComponent(n)}).join("&")},json_to_string:function(e,t){var n="";for(var a in e){if(e.hasOwnProperty(a)){n+=a+": "+e[a]+(t?"
    ":"")}}return n},serialized_to_json:function(e){if(e.startsWith('"')||e.endsWith('"')){e=e.replace(/^"|"$/g,String())}var t={},n=(e[0]==="?"?e.substr(1):e).split("&");for(var a=0;a=n&&d=5&&f<=100){f=Math.round(f/5)*5}else if(f>100&&f<=1e3){f=Math.round(f/50)*50}else if(f>1e3&&f<=1e4){f=Math.round(f/100)*100}else if(f>1e4&&f<=1e5){f=Math.round(f/250)*250}else if(f>1e5){f=Math.round(f/500)*500}}return f+" "+c[d]}};const core={error:{get:function(){return $(".container-fluid .panel-body [data-fatal-error-text]").html()},clean:function(){$(".container-fluid [data-fatal-error-text] ~ .btn-primary.btn-lg.page_footer_submit").remove();$(".container-fluid [data-header-left] .btn-group").empty()}},get_global_vars:function(e,t){var n=t?{}:[],a=window;for(var i=0;i-1){return true}else{return false}},curModuleFileQuery:function(e,t,n){return $('body[class*="'+e+'"]').length&&v___location_file==t&&(v___location_query&&v___location_query.indexOf(n)!==-1)},curModuleFile:function(e,t,n){var a=v___location_file==t;if(!t){if(typeof t==="undefined"){t=""}a=v___location_file===t||v___location_file==="index.cgi"}var i=$('body[class*="'+e+'"]').length;if(n){i=$("body").hasClass(e)}return i&&a},curModule:function(e,t){var n=$('body[class*="'+e+'"]').length;if(t){n=$("body").hasClass(e)}return n},moduleFile:function(e,t,n){if(e.includes("/")&&e.includes(".cgi")){var a=e.split("/"),i,s,r;a.filter(function(e,t){if(e.includes(".cgi")){i=t}});s=a[i-1];r=a[i];if(s&&s.includes(t)&&r&&r.includes(n)){return 1}}return 0},updateModuleData:function(e,t,n,a){$.ajax({type:"POST",url:v___location_prefix+e,data:false,dataType:"text",success:function(e){if(!session.status(e)){return}var i=$(e).find("form.ui_form");$.each(n,function(e,t){var n=i.find('[name="'+e+'"]'),a=n.filter(":checked").val(),s=t==="+!"?+!parseInt(a):t;n.val(s)});setTimeout(function(){var e=$(i).serializeArray(),n=[];e.map(function(t,a){if(n.includes(t.name)){e.splice(a,1)}n.push(t.name)});e=Convert.json_to_query(Convert.serialized_to_json($.param(e)));$.ajax({type:"POST",url:v___location_prefix+t+(a?(t.includes(".cgi?")?"&":"?")+e:String()),data:a?false:e,dataType:"text",success:function(e){if(!session.status(e)){return}},error:function(){}})},100)},error:function(){}})},getModuleData:function(e){return $.ajax({type:"POST",url:v___location_prefix+e,data:false,dataType:"text",success:function(e){if(!session.status(e)){return}},error:function(){}})},setModuleData:function(e,t){this.getModuleData(e).then(function(e){return $(e).find("form.ui_form").serializeArray()}).done(function(e){var n={};$.each($(e),function(){n[this.name]=this.value}).promise().done(function(){$.each(t,function(e,t){var a=$('[name="'+t+'"]');a.val(n[t]);if(a.is("select")){a.find("[data-clear]").remove()}})})})}};const HTML={bottom_progress:function(e,t,n){return'
    '+(n?'
    ':"")+'
    '+(n?"":"1%")+""+(n?'':"")+'
    '},label:{textMaxLevels:function(e,t,n){var a="bg-",i=a+"semi-transparent",s=a+"warning",r=a+"danger",n=t.indexOf("°C")>-1,o=30,l=60,c=80,d=86,f=140,u=176,_=parseInt(settings_sysinfo_cpu_fans_base_rpm),g=_,p=_*2;t=parseInt(t);if(e==="temperature"){if(n){return t<=o?i:t>o&&t<=l?i:t>l&&t<=c?s:t>c?r:""}else{return t<=d?i:t>d&&t<=f?i:t>f&&t<=u?s:t>u?r:""}}else if(e==="rpm"){return t<=g?i:t>=g+1&&t<=p?s:r}}},template:{accordion:function(e,t,n,a){var i='
    ';for(var s=0;s'+'"+'
    '+'
    '+n[s]+"
    "+"
    "}i+="";return i},page_content_preloader:function(e,t,n){return'
     '+e+'
    '},reauthenticate:function(e){var t=Test.strContains(session.server.data("webprefix"),"servers/link.cgi")?1:0;return'
    '+'
    '+'
    '+'
    '+'
    '+''+"
    "+'
    '+"

    "+theme_language("session_expired")+"

    "+""+theme_language("session_expired_details")+""+"
    "+"
    "+'
    '+'
    '+'
    '+'"+'
    '+'"+''+"
    "+'"+""+"
    "+"
    "+"
    "+"
    "+"
    "}}};const load={loaded:[],bundle:function($scripts__,$css__,callBack__,callBackCalledNoEval__,opts){var execute_load=function($script,$css,callBack,callBackCalledNoEval,opts){var head=$("head"),initial_name=$script,opts_local={};if(!opts){opts={}}opts_local.sourceType="."+v___source_type;opts_local.cssPath=v___server_css_path;opts_local.jsPath=v___server_js_path;opts_local={...opts_local,...opts};callBack=typeof callBack=="object"?callBack:false;var css=(!$css?0:$css===1?$script:$css)+opts_local.sourceType+".css",js=$script+opts_local.sourceType+".js";if(css||js){if(css.toString().includes(":min")){css=css.replace(":min"+opts_local.sourceType,".min")}if(js.toString().includes(":min")){js=js.replace(":min"+opts_local.sourceType,".min")}}if(!Test.strContains(initial_name,v___server_extensions_path)&&!Test.strContains(initial_name,v___server_js_path)){css=opts_local.cssPath+"/"+css;js=opts_local.jsPath+"/"+js}var processCallbacks=function(_callBack,_callBackCalledNoEval){if(_callBack&&!_callBackCalledNoEval){$.each(_callBack,function(i2,v2){try{eval(v2)}catch(e){var attemp=0;var check_loaded_func=setInterval(function(){attemp++;if(attemp>1e3){clearInterval(check_loaded_func)}try{eval(v2);clearInterval(check_loaded_func)}catch(e){}},10)}})}else if(_callBack&&_callBackCalledNoEval&&_callBackCalledNoEval!==2&&_callBackCalledNoEval!==3){$.each(_callBack,function(e,t){t.call()})}else if(_callBack&&_callBackCalledNoEval&&(_callBackCalledNoEval===2||_callBackCalledNoEval===3)){$.each(_callBack,function(e,t){if(_callBackCalledNoEval===3){window[e].call(null,t)}else{window[e].apply(null,t)}})}};if(!load.loaded.includes(initial_name)){o___gotten_scripts.push(js);load.loaded.push(initial_name);var thecsslink='';$css&&(css.includes(v___server_extensions_path)?head.append(thecsslink):head.find('link[rel="stylesheet"]:first').before(thecsslink));$.getScript(js+"?"+theme.version(true)).done(function(){processCallbacks(callBack,callBackCalledNoEval)}).fail(function(e){if(e.statusText!=="canceled"&&e.statusText!=="abort"){connection_error(e,1)}})}else if(callBack||callBackCalledNoEval){processCallbacks(callBack,callBackCalledNoEval)}};if($.isArray($scripts__)){$scripts__.forEach(function(e,t,n){if(Object.is(n.length-1,t)){execute_load(e,$css__,callBack__,callBackCalledNoEval__,opts)}else{execute_load(e,$css__,0,0,opts)}})}else{execute_load($scripts__,$css__,callBack__,callBackCalledNoEval__,opts)}},css:{_linkBuild:function(e){return e&&!e.startsWith("/")&&(e=`${v___server_css_path}/${e}.${v___source_type}.css?${parseInt(theme.version().replace(".",""))}`)},_styleExists:function(e){return document.head.querySelector('link[href^="'+e+'"]')},add:function(e,t,n){const a=[];(typeof e==="string"?[e]:e).forEach(async i=>{i=this._linkBuild(i);if(!this._styleExists(i)){const s=()=>{return new Promise(e=>{const t=document.createElement("link");t.type="text/css";t.rel="stylesheet";t.onload=(()=>{e(true)});t.href=i;if(!this._styleExists(i)){$(document.head).append(t)}})};const r=await s();r&&a.push(i);if(e.length===a.length){if(t){t.apply(this,n);return a}}}})},remove:function(e){e=this._linkBuild(e,true);const t=this._styleExists(e);if(t){t.remove()}}}};const page={handle:{content:{offset:function(e){var t=core.curModuleFile("mailbox","",1)||core.curModuleFile("mailbox","index.cgi",1);is_offset=core.curModuleFileQuery("logviewer","view_log.cgi","view=")||core.curModuleFileQuery("syslog","save_log.cgi","view=")||core.curModuleFile("virtual-server","edit_html.cgi")||core.curModuleFile("mysql","view_table.cgi")||core.curModuleFile("postgresql","view_table.cgi")||t||core.curModule(v___module_file_manager)||v___page_hasEditor||!settings_enable_container_offset?0:1;if(t&&settings_mail_ui&&e){if(!$(".container-fluid > .panel-mail").length){return}}if(e){var n=$(".container-fluid");if(page.handle.content.offset()){n.addClass("col-lg-10 col-lg-offset-1").removeClass("margined-top-15")}else{n.removeClass("col-lg-10 col-lg-offset-1").addClass("margined-top-15")}}else{return is_offset}},preloader:{processing:function(){return $(".container-fluid-loading").length},hide:function(){if(page.handle.content.preloader.processing()){page.handle.content.preloader.show()}},show:function(e,t,n){var a=this,i=$("#content"),s=$(".container-fluid"),r=$(".container-fluid-loading"),o=t?t:$("span[data-main_title]").text(),l="container-fluid-loading-persistent",c=e===-2?l:0,d=HTML.template.page_content_preloader(o,c,n);if(e!==-2&&r.length&&r.hasClass(l)){r.removeClass(l);return}if(e===-1){return i.hasClass("progressing")}if(r.length){r.remove();s.removeClass("invisible");i.removeClass("progressing progressing-preloading");setTimeout(function(){if(progress.status()){progress.end()}},10)}else{if(!core.error.get()){i.addClass("progressing progressing-preloading").prepend(d);s.addClass("invisible")}}if(e&&e!==-2){setTimeout(function(){a.preloader()},e)}}}}},render:{content:{filter:{init:function(e,t){var n=this,a="container-fluid",i=""+a+" .nav.nav-tabs",s="dataTables_filter",r=$(".__page ."+s+""),o=$(".__page .panel-filter"),l=".panel-filter .panel.panel-default",c="dataTable-mirror",d="filter_mirror_clear",f="filter-value",u="btn-filter-top-right",_="btn-accordion-filter",g="btn-toggle-accordions",p=$("body"),h="."+u+" span, ."+_+" span",m="."+u+" i, ."+_+" i",v="ui_form_elements_wrapper_search",b=function(){return $("form:visible ."+v+"").length?$("form:visible ."+v+""):$("."+v+"")},y=function(){return b().length},x=function(){if(y()){var e=b().find('[type="text"]');e.val("");$("#"+e.attr("form")).submit()}},k=function(){if(y()){var e=$("."+u),t=b().find('[type="text"]'),n=t.val();$("."+u+" ."+c).val(n);if($.trim(n).length>0){$(h).removeClass("text-lighter");$(m).addClass("text-danger");e.addClass("opened");e.find("label").show()}else{$(h).addClass("text-lighter");$(m).removeClass("text-danger");e.removeClass("opened");e.find("label").removeAttr("style")}if(y){e.show()}else{e.hide()}}};if(r.length||o.length||y){setTimeout(function(){if(!$("."+u+"").length&&!$("."+_+"").length){$("#headln2r .btn-group a").addClass("pull-left").attr("style","");$("#headln2r .btn-group").prepend(''+""+''+""+(e?'':"")+"")}$(".btn-filter-gl").data("title",theme_language(y()?"global_search":"datatable_filter")).attr("aria-label",theme_language(y()?"global_search":"datatable_filter"));$("."+g).data("title",theme_language("toggle_accordions")).attr("aria-label",theme_language("toggle_accordions"));$(".btn-group").tooltip({selector:'a[data-toggle="tooltip"][data-skip]',container:"body",trigger:"hover",delay:{show:vars.plugins.tooltip.delay.show,hide:vars.plugins.tooltip.delay.hide}});n.clear();if($("."+i+"").length){let t='a[data-toggle="tab"]',a="hide.bs.tab",s="shown.bs.tab";if(e){p.undelegate(t,a);p.on(a,t,function(e){n.clear()})}p.undelegate(t,s);p.on(s,t,function(e){var t=$(e.target).parent(".active");if(t.data(f)){$("."+c+"").val(t.data(f)).trigger("input")}else{$("."+c+"").val("").trigger("input")}n.visibility(u,_,g,i);k()})}var t="shown.bs.collapse.config hidden.bs.collapse.config";p.undelegate(l,t);p.on(t,l,function(e){var t=$("."+a+" .collapsing").length;if(t){return}setTimeout(function(){var e=$("."+a).find("."+g).find("i");if(o.find(".panel-collapse").length===o.find(".panel-collapse.in").length){e.addClass("fa-toggle-switch text-light")}else{e.removeClass("fa-toggle-switch text-light")}},0)});var r=$("."+g+"");if(!e){var v=$("."+s+"");v.hide()}else{$(o).find('a[data-toggle="collapse"]').on("click",function(e){$.trim($("."+c).val()).length&&page.render.content.filter.clear();e.originalEvent&&$("."+g+"").find("i").removeClass("fa-toggle-switch text-light")})}$("."+d+"").mousedown(function(e){if($(e.target).is("."+d+"")){n.clear();x()}});$("."+u+", ."+_+"").click(function(e){$(this).addClass("opened");!$(e.target).is("input")&&$(this).find("label").slideToggle(0,function(){$(this).find("input").focus()})});r.click(function(e){e.stopImmediatePropagation();var t="fa-toggle-switch",a=$(this).find(".fa"),i=$(this).find("."+t).length?1:0,s=$(".__page .panel-filter:visible");if(i===0){if(s.find(".panel-collapse.in").length===s.find(".panel-collapse").length){}s.find(".panel-collapse:not(.in):not(.collapsing)").filter(function(){$(this).removeData("bs.collapse").collapse({parent:true,toggle:false}).collapse("show").removeData("bs.collapse")})}else{s.find(".panel-collapse.in:not(.collapsing)").filter(function(){$(this).attr("aria-static")!=="true"&&$(this).collapse("hide")})}a.toggleClass(t+" text-light");if(e.originalEvent!==undefined&&$("."+_+" input").val().length){n.clear()}});function w(t){var n=t.val(),a=$(".__page .panel-filter:visible");if(!e){var o="."+s+" input";if($("."+i+"").length){$(".nav-tabs li.active").data(f,n);$(".active "+o).val(n).trigger("input")}else{$(o).val(n).trigger("input")}}else{if(n){$.support.transition&&($.support.transition=false);r.find(".fa-toggle-switch-off:not(.fa-toggle-switch)").trigger("click");a.find(".panel tr:not([data-empty-row]):not(.hidden-skip)").addClass("hidden-forged");var c=a.find('.panel tbody tr:contains("'+n+'")');c.removeClass("hidden-forged");$.each($(l=" .hidden-dependent-skip"),function(e){if($(this).hasClass("hidden-forged")){$(this).nextAll(".hidden-skip").addClass("hidden-forged")}else{$(this).nextAll(".hidden-skip").removeClass("hidden-forged")}});var d=$(".__page .panel-filter:visible");$.each(d.find(".panel"),function(){var e=$(this).find("tr").first().find("td").length;rows=$(this).find("tbody").find("tr:not([data-empty-row])"),hidden_rows=$(this).find("tbody tr:not([data-empty-row]):hidden");var t=$(this).find("tbody tr[data-empty-row]");if(rows.length===hidden_rows.length){!t.length?$(this).find("tbody").append(''+theme_language("filter_content_no_matches_query").replace("%str",""+n+"")+""):$(this).find("tbody").find("var[data-query-str]").text(n)}else{t.remove()}})}else{r.find(".fa-toggle-switch").trigger("click");a.find(".panel tr").removeClass("hidden-forged");a.find(".panel tr[data-empty-row]").remove();!$.support.transition&&($.support.transition={end:"webkitTransitionEnd"})}}if($.trim(n).length>0){$(h).removeClass("text-lighter");$(m).addClass("text-danger")}else{$(h).addClass("text-lighter");$(m).removeClass("text-danger")}}var C;var T=200;$("."+c+"").keydown(function(e){var t=e.originalEvent!==undefined?T:0;if(e.keyCode==76&&e.ctrlKey||e.keyCode==27){e.preventDefault();e.stopPropagation();if(t){setTimeout(function(){n.clear();x()},t)}else{n.clear();x()}}else{t&&clearTimeout(C)}}).on("input keyup",function(e){$(".btn-filter-gl").tooltip("hide");if(y()){var t=e.keyCode?e.keyCode:e.which;if(t===13){var n=b().find('[type="text"]');n.val($(this).val());$("#"+n.attr("form")).submit()}}else{var a=$(this),i=e.originalEvent!==undefined?T:0;if(i){clearTimeout(C);C=setTimeout(function(){w(a)},i)}else{w(a)}}});$("."+u+" input, ."+_+" input").blur(function(e){$(this).parent("label").slideToggle(0);$(this).closest(".opened").removeClass("opened")});n.visibility(u,_,g,i);k()},0)}},visibility:function(e,t,n,a){var i=$("."+e+", ."+t+", ."+n+"");if($("."+a+"").length&&($(".active .dataTables_filter").length||$(".active #conf-_-gr").length)||!$("."+a+"").length&&($(".dataTables_filter").length||$("#conf-_-gr").length)){i.show()}else{i.hide()}},clear:function(){var e="btn-filter-top-right",t="dataTable-mirror",n="btn-accordion-filter",a=$("."+e+" ."+t+", ."+n+" ."+t+""),i=$("."+e+" input, ."+n+" input");a.val("").trigger("input");i.is(":visible")&&i.trigger("blur");$(".panel-filter").find("tr[data-empty-row]").remove();!$.support.transition&&($.support.transition={end:"webkitTransitionEnd"})}}}},branding:{selector:function(){return $("body").find(".branding-backdrop")},status:function(){return this.selector().length},process:function(e){var t=this,n=settings_product_branding_show_time_min_privileged,a=n>=1&&n<=10?n*1e3:1e3,i=settings_product_branding_show_time_max_privileged,s=i>=1&&i<=120?i*1e3:2e3,r=a/10,o="keydown.brand click.brand",l=function(){clearInterval(t.tiktok);t._stopped=1;vars.page.shown=1;var e=function(){setTimeout(function(){t.selector().off(o).remove();!page.load.happening()&&theme_title_generate();!page.load.happening()&&progress.end()},50)};vars.page.locked=0;e()};if(t._stopped){return}if(e){if(t._running2){clearInterval(t._tiktok);clearTimeout(t._exec);l()}}})}}}},load:{happening:function(){var e=vars.pjax.progressing,t=vars.ajax.progressing;if(e||t){return 1}else{return 0}}}};const pjax={clear:{modules:function(e){if(v___module==="csf"&&typeof __c_____undel==="function"){__c_____undel(e.url)}if(v___module===v___module_file_manager&&typeof __f_____undel==="function"&&typeof jsPanel==="object"&&typeof $v__fm__container_fluid==="string"){if(!Test.strContains(e.url,v___module_file_manager+"/config.cgi")&&!Test.strContains(e.url,v___module_file_manager+"/index.cgi")&&!Test.strContains(e.url,"save_config.cgi")){__f_____undel()}}if((v___module==="mysql"||v___module==="postgresql")&&typeof __sql_____undel==="function"){__sql_____undel()}if(v___module==="syslog"||v___module==="logviewer"){typeof refreshTimer==="number"&&clearInterval(refreshTimer)}}}};const progress_percent={body:"body",control:function(e,t,n,a){var i=this,s="bottom_progress",r="."+s+"_level",o="."+s+"_cancel",l=100,c="bottom_progress_horizontal";if(!$(i.body).find("."+s+"es").length){$(i.body).append('
    ')}var d=$(i.body).find("."+s+"es");if(!d.find('div[data-progress-id="'+e+'"]').length){d.append(HTML.bottom_progress(e,t,a));if(a||d.find("."+c+"").length){d=$(i.body).find("."+s+"es");var f=d.find("."+s+':not(".'+c+'")').addClass("no-animation").detach();d.prepend(f)}d.find('div[data-progress-id="'+e+'"]').find(o).one("click",function(){var e=$(this).parent(),t=e.data("progress-id");e.find(r).removeClass("success").addClass("danger");$(this).remove();setTimeout(function(){e.remove();if(d.find("div[data-progress-id]").length===0){d.remove()}},10*l);window["progress_id_ref_"+t].abort();if(a){window["progress_id_ref_"+t+"_tracker"].abort()}})}var u=d.find('div[data-progress-id="'+e+'"]');u.find(r).css("height",n+"%");if(a){var _=u.find("."+s+"_overlay"),g=".bottom_progress_";u.find(g+"filename").html(''+(!a[0]?"unknown-file-name":Convert.htmlEscape(Convert.textTruncate(Convert.htmlDecode(a[0]),24)))).attr("title",Convert.htmlEscape(a[0]));_.find(g+"data").text($(Convert.htmlDecode(a[1])).text());_.find(g+"percent").text(a[2]+"%")}else{u.find("."+s+"_overlay").text(n+"%")}if(n==l){u.find(o).remove();setTimeout(function(){u.remove();if(d.find("div[data-progress-id]").length===0){d.remove()}},10*l)}}};const progress={target:"body",element:"top-aprogress",blocked:function(){return vars.page.locked},status:function(){return!settings_hide_top_loader},start:function(){if(this.status()&&!$(this.target).find("."+this.element+"").length){!this.blocked()&&vars.allow_ui_features&&$(this.target).append('
    ')}},end:function(){!this.blocked()&&!page.load.happening()&&$(this.target).find("."+this.element+"").remove()}};const session={reauthenticate:{start:function(){var e=this,t=e.target;var n=0;!$("."+t).length&&$.ajax({type:"GET",url:v___location_prefix+"/index.cgi",data:false,dataType:"text",success:function(a){var i="container session_login",s="form-signin-banner",r=Test.strContains(a,i+" pam_");if(!Test.strContains(a,s)){var o=e.lock_targets,l=e.lock_type,c='',d=$(a).find("._logo_welcome > img").attr("src"),f=function(){return $("."+t).find('input:not([name="user"]):not([name="twofactor"])')};$(o).addClass(l);var u=$("body").append(HTML.template.reauthenticate(t));u.find("."+t+"").find(".fa-times-thin").one("click",function(){session.reauthenticate.end()});plugins.navigation.load.stop();plugins.navigation.detect();plugins.navigation.switch.reset();despinnerfy_buttons();if(session.server.data("terminal")==1){plugins.terminal.close()}else if(session.server.data("shell")==1){plugins.shell.unlock();plugins.shell.close()}if(d){$("."+t).append("")}setTimeout(function(){f().trigger("focus")},1e3);$("."+t).find("form").on("submit",function(e){e.preventDefault();e.stopImmediatePropagation();if(r){var i=$("."+t).find('form input[name="user"]');i.attr("name","answer").val(session.server.data("user"))}var s=$(a).find("form").append(c),o=s.attr("action"),l=$("."+t).find("form").serialize(),d=$("."+t).find("[data-submit]"),u=$("."+t+"-header-icon i"),_=$("."+t+"-header-title h3"),g=$("."+t+"-header-title small"),p='input[name="twofactor"]';if(!r){if($("."+t).find(p).is(":visible")){n++}l+="&save=1&failed_twofactor_attempt="+n+""}if(d.hasClass("disabled")){return}g.text(theme_language("signing_in")+"").removeClass("text-danger").addClass("loading-dots");d.addClass("btn-grey disabled").removeClass("btn-success");function h(e,n,a,i,s){var r=function(e){if(!e.endsWith(".")){e=e+"."}e=e.replace(/\n/gm,"");return e};if(n){var o=theme_language(n,1)==="session_failed"?theme_language("session_failed_password"):n;o=r(o);g.text(o).addClass("text-danger").removeClass("loading-dots");d.removeClass("btn-grey disabled").addClass("btn-success");var l=s,c=l.length?$("."+t).find(p):f();c.addClass("faa-horizontal animated");c[0].focus();setTimeout(function(){c.removeClass("faa-horizontal animated");c[0].select()},1e3)}else if(s.length){$("."+t).find("[data-container-twofactor]").removeClass("hidden");var h=r(theme_language("login_message_2fa"));g.text(h).removeClass("loading-dots");d.removeClass("btn-grey disabled").addClass("btn-success");setTimeout(function(){$("."+t).find(p).trigger("focus")})}else if(e&&!a){g.text(theme_language("signing_success")).removeClass("text-danger").removeClass("loading-dots").addClass("text-success");u.removeClass("fa-lock").addClass("fa-unlock fa-rotate-180 fa-flip-horizontal");_.text(theme_language("session_unlocked"));session.alive=1;setTimeout(function(){session.reauthenticate.end()},1800)}}$.ajax({type:"GET",url:o,data:l,dataType:"text",success:function(e){var n=$(e).find(".switch-toggle").text().length,a=$(e).find(".alert span").text(),i=$(e).find(p),s=i.length,l=a.length;if(r){var d=$(e).find("form").append(c),f=d.find('input[name="answer"]').val($("."+t).find('input[type="password"]').val()),u=d.serialize();$.ajax({type:"GET",url:o,data:u,dataType:"text",success:function(e){n=$(e).find(".switch-toggle").text().length;a=$(e).find(".alert span").text();l=a.length;h(n,a,l,e)}})}else if(s){h(n,a,l,e,i)}else{h(n,a,l,e,i)}},error:function(){d.removeClass("btn-grey disabled").addClass("btn-success");g.text(theme_language("connection_error")).addClass("text-danger").addClass("loading-dots")}})})}}})},end:function(){session.alive=1;$("."+this.target).remove();$(this.lock_targets).removeClass(this.lock_type)},target:"session-reauthenticate",lock_targets:"aside, aside .navigation, .form-control.sidebar-search, .jsPanel, #jsPanel-replacement-container, .popover, .container-fluid, .right-side-tabs, .right-side-tabs-toggler",lock_type:"pointer-events-none bg-filter-blur3-grayscale100-opacity35-contrast1-2-brightness0-9 disabled"},status:function(e){if(e&&Test.strContains(e,"container session_login")){this.alive=0;return 0}else{return 1}},server:{data:function(e,t,n){var a=$("html"),i=$("body"),s="data-"+e,r=e.replace("data-","");if(typeof n!="undefined"){if(e.startsWith("data-")){a.removeAttr(e);a.removeData(r)}else{a.removeAttr(s);a.removeData(e)}if(e==="data-uri"){i.removeAttr(e)}}else if(typeof t=="undefined"){if(e.startsWith("data-")){return a.attr(e)}else{return a.data(e)}}else{if(e.startsWith("data-")){a.attr(e,t).data(r,t)}else{a.data(e,t).attr(s)}if(e==="data-uri"||e==="data-module"){i.attr(e,t);if(e==="data-module"){i.removeClass().addClass(t)}}}}},alive:1};const Test={true:function(e){return!/^(false|0)$/i.test(e)&&!!e},false:function(e){return/^(false|0)$/i.test(e)||!e},numeric:function(e){return Number(parseFloat(e))==e},string:function(e){return"string"===typeof e||e instanceof String?1:0},strContains:function(e,t){return"string"!==typeof e?!1:!!~e.indexOf(t)},str_contains_multi:function(e,t){if(e){for(var n in t){var a=t[n];if(e.toString().indexOf(a)>-1){return true}}}return false},str_contains_multi_regex:function(e,t,n){if(e){for(var a in n){var i=n[a],s=t.toString();s=new RegExp(s.replace("::M::",i));if(s.test(e)){return true}}}return false},arrContains:function(e,t,n){typeof n=="undefined"?n=0:!1;e=$.inArray(t,e);return n?e:-1=a},occurrences:function(e,t,n){e+="";t+="";if(t.length<=0)return e.length+1;var a=0,i=0,s=n?1:t.length;while(true){i=e.indexOf(t,i);if(i>=0){++a;i+=s}else break}return a},editing:function(){return $("input:focus").length||$("textarea:focus").length||$('[contenteditable="true"]:focus').length||$('[contenteditable="true"]:focus').length||$(document.activeElement).is("textarea")||$(document.activeElement).is("input")}};const theme={api:{version:function(e,t){return theme.version(e,t)},page:{refresh:function(){return plugins.pjax.page.refresh()},refreshForce:function(){return plugins.pjax.page.refresh(true,true)},headers:{getAll:function(){return plugins.pjax.headers.getAll()}}},event:{on:{page:{error:function(e,t){$(document).on("pjax:error",function(n,a,i){try{e.call(this,t,n,a,i)}catch(e){console.warn("Error executing custom function on page load error event",e)}})},beforeSend:function(e,t){$(document).on("ready pjax:beforeSend",function(n,a,i){try{e.call(this,t,n,a,i)}catch(e){console.warn("Error executing custom function on page load beforeSend event",e)}})},start:function(e,t){$(document).on("pjax:start",function(n,a,i){try{e.call(this,t,n,a,i)}catch(e){console.warn("Error executing custom function on page load start event",e)}})},complete:function(e,t){$(document).on("pjax:complete",function(n,a,i){try{e.call(this,t,n,a,i)}catch(e){console.warn("Error executing custom function on page load complete event",e)}})},success:function(e,t){$(document).on("pjax:success",function(n,a,i){try{e.call(this,t,n,a,i)}catch(e){console.warn("Error executing custom function on page load success event",e)}})},beforeReplace:function(e,t){$(document).on("pjax:beforeReplace",function(n,a,i){try{e.call(this,t,n,a,i)}catch(e){console.warn("Error executing custom function on page load beforeReplace content event",e)}})},afterReplace:function(e,t){$(document).on(vars.h.event.page.end,function(n,a){try{e.call(this,t,n,a)}catch(e){console.warn("Error executing custom function on page afterReplace content event",e)}})},popstate:function(e,t){$(document).on("pjax:popstate",function(n){try{e.call(this,t,n)}catch(e){console.warn("Error executing custom function on page popstate event",e)}})}}},one:{document:{init:null,ready:null},page:{reset:function(){return plugins.pjax.page.events.reset()},beforeSend:function(e){return plugins.pjax.page.events.beforeSend.set(e)},start:function(e){return plugins.pjax.page.events.start.set(e)},complete:function(e){return plugins.pjax.page.events.complete.set(e)},success:function(e){return plugins.pjax.page.events.success.set(e)},beforeReplace:function(e){return plugins.pjax.page.events.beforeReplace.set(e)},afterReplace:function(e){return plugins.pjax.page.events.end.set(e)}}}}},help:{_selector:"hotkeys-help",show:function(){const e=this;if(e._loading){return}e._loading=1;progress.start();$.ajax({type:"POST",url:v___location_prefix+"/xhr.cgi?type=data&subtype=theme&action=list-hotkeys",dataType:"JSON",complete:function(){e._loading=0;progress.end()},success:function(t){const n=theme_shortcuts_modifier_name(),a=hotkey_variation=settings_hotkey_open_module_config_privileged==="dot"?".":settings_hotkey_open_module_config_privileged==="comma"?",":settings_hotkey_open_module_config_privileged;let i="Ctrl",s="Alt",r="Shift",o="Meta",l=" + ",c=String();if(platform.detect()==="mac"){i="⌃";s="⌥";r="⇧";o="⌘";l=" "}let d=[];t["hotkeys-global"].forEach(function(e){let t=String();if(e.key&&e.key.includes("hotkey_custom")){return}if(session.server.data("product")!=="usermin"&&(e.key==="settings_hotkey_toggle_key_usermin"||e.key==="settings_hotkey_toggle_key_webmail")){return}if(session.server.data("product")==="usermin"&&(e.key==="settings_hotkey_toggle_key_webmin"||e.key==="settings_hotkey_toggle_key_virtualmin"||e.key==="settings_hotkey_toggle_key_cloudmin")){return}c+='
    '+e.title+""+n+l+(t||window[e.key]).toUpperCase()+"
    ";let a=parseInt(e.section.replace(/\D+/g,String()));if(!d.includes(a)){d.push(a)}});let f='
    '+theme_language("hotkey_open_new")+""+i+l+s+l+" D"+"
    ";f+='
    '+theme_language("hotkey_clear_cache")+""+i+l+s+l+r+l+o+l+" R"+"
    ";f+='
    '+theme_language("hotkey_open_module_config_privileged")+""+n+l+a.toUpperCase()+"
    ";f+='
    '+theme_language("hotkey_open_theme_config")+""+n+l+r+l+a.toUpperCase()+"
    ";f+='
    '+theme_language("hotkey_list_table")+""+s+l+"⏴, "+s+l+"⏵"+"
    ";c+='
    '+theme_language("hotkey_copy_to_clipboard")+""+o+l+s+l+" "+theme_language("hotkey_copy_to_clipboard_click")+"
    ";d=d.sort((e,t)=>e-t);let u=d[0];let _=String(),g=t["hotkeys-file-manager"];if(g){g.forEach(function(e){let t=String();if(!_){_='
    '+theme_language("hotkeys_help_title_fm")+"
    "}_+='
    '+e.title+""+theme_modifiers_replace_for_mac(e.key.replaceAll("

    ",", ").replaceAll("
    ",", "),"Ctrl","Meta")+"
    "})}let p=String(),h=t["hotkeys-editor"];if(h){h.forEach(function(e){let t=String();if(!p){p='
    '+theme_language("hotkeys_help_title_edit")+"
    "}p+='
    '+e.title+""+theme_modifiers_replace_for_mac(e.key,"Ctrl","Meta")+"
    "})}const m=''+'   '+theme_language("hotkeys_help_title")+''+""+'
    "+'
    '+'   '+theme_language("hotkeys_help_title_docs")+""+''+""+'"+""+"
    "+'

    '+'   '+theme_language("theme_xhred_global_community")+""+''+""+'"+""+"
    ",v='",b=$(v).appendTo($("body"));b.modal("show");b.on("hide.bs.modal",function(){$(".popover.module-help .close").trigger("click")});b.on("hidden.bs.modal",function(){$(".modal."+e._selector+"").remove()})},error:function(e){session.status(e.responseText);plugins.messenger.post({type:"error",icon:"fa fa-exclamation-triangle fa-lg fa-fw",id:"hotkeysHelp",title:theme_language("global_error"),message:theme_language("hotkeys_server_error"),layout:1,displayMode:1,position:"bottomCenter",cancel:true,close:true,timeout:false,progressBar:false})}})},config:function(e){const t=$(".modal."+this._selector+"");t.modal("hide");t.remove();get_pjax_content($(e).attr("data-href"))},print:function(){$("."+this._selector).printThis({importStyle:true,pageTitle:theme_language("hotkey_print_title")})}},errors:{onload:function(){var e=$(".container-fluid > .panel > .panel-body > [data-fatal-error-text]").length||$("body.err-body > .err-head").length;return e}},download:function(e,t,n,a){var i=true;if(a===undefined||a==1||a===true){i=false}if(e&&t){t=typeof t=="string"?t:$.param(t);var s=document.createElement("form");s.method=n||"POST";s.action=e;if(i){s.target="_blank"}$.each(t.split("&"),function(){var e=this.split("=");if(e[1]){try{e[1]=Convert.uriDecodeComponent(e[1])}catch(e){}}var t=document.createElement("input");t.type="hidden";t.name=e[0];t.value=e[1];s.appendChild(t)});$(s).appendTo("body").submit().remove()}},veiled:function(e,t,n){var a=$(t||".container-fluid, .container-fluid-loading, .popover, .tooltip, .jsPanel, #jsPanel-replacement-container, aside, .mobile-menu-toggler, #right-side-tabs, .right-side-tabs-toggler"),i=n||"pointer-events-none bg-filter-blur-grayscale-opacity50";if(e===-1){return a.hasClass(i)}if(e){a.addClass(i)}else{a.removeClass(i)}},update:function(e,t,n){var a=e===1?"-release":"-beta",i=n?"&xhr-update-version="+n+"":String();theme.veiled(1);set_onbeforeunload_status(1,0);plugins.messenger.post(''+theme_language("git_patch_initiated")+" "+theme_language("global_please_wait")+'   ',1800,"info","themeUpgrade",0);$.ajax({type:"POST",url:v___location_prefix+"/index.cgi?xhr-update=1&xhr-update-type="+a+"&xhr-update-force="+t+""+i,data:false,dataType:"json",success:function(e){if(e[0]&&e[0].success){plugins.messenger.post(''+e[0].success,4,"success","themeUpgrade");plugins.slider.notifications.dismiss("authentic_remote_version");set_server_theme_temp_data("goto",v___location_prefix+"/sysinfo.cgi");setTimeout(function(){theme_reload()},2e3)}else if(e[0]&&e[0].no_connection){plugins.messenger.post(''+e[0].no_connection,40,"warning","themeUpgrade");theme.veiled(0)}else if(e[0]&&e[0].no_git){plugins.messenger.post(''+e[0].no_git,20,"warning","themeUpgrade");theme.veiled(0)}else if(e[0]&&e[0].incompatible){plugins.messenger.post(''+e[0].incompatible,120,"error","themeUpgrade");theme.veiled(0)}else{plugins.messenger.post(''+theme_language("git_patch_update"),20,"error","themeUpgrade");theme.veiled(0)}},error:function(e){session.status(e.responseText);plugins.messenger.post(''+theme_language("git_patch_update"),20,"error","themeUpgrade");theme.veiled(0)},complete:function(e){set_onbeforeunload_status(0,0)}})},update_message:function(){var e="theme_update_refresh";if(!theme_message_exists(e)){var t=function(){progress.start();vars.cache.theme_updating=true;theme.veiled(true,false,"bg-filter-grayscale-opacity50");$.ajax({type:"POST",url:v___location_prefix+"/index.cgi/?xhr-theme_clear_cache=1",data:false,dataType:"text",complete:function(){location.reload()}})};plugins.messenger.post({id:e,class:"theme-refresh-to-update",position:"bottomLeft",timeout:false,close:false,message:theme_language("theme_update_available"),icon:"exclamation-circle",buttons:plugins.messenger.toast.construct.button(theme_language("filemanager_context_refresh").toUpperCase(),t),layout:1})}},restart_message:function(e){var t=0,n=0;if(e&&e.toString().includes("systemctl")){e+=" restart webmin";t=4500}else{e+="/restart"}var a="webmin_restart_notice",i=function(){return $("."+a+"").find(".bootbox-body")};if(i().length){return}var s=bootbox.alert({message:"

    "+"  "+theme_language("global_warning")+"!

    "+theme_language("webmin_requires_restart").replace("$1",e),className:""+a+" bootbox-centered font-medium warning"});s.init(function(){var e=i(),a="data-p-restart",r="data-p-cancel";e.append("

    "+"
    "+""+""+"
    ");e=i();var o=e.find("["+a+"]"),l=e.find("["+r+"]");o.one("click",function(){n=1;e.append(theme_countdown_animated(false,7));theme_countdown_animated(e,7);progress.start();spinnerfy_buttons(o);l.off("click").addClass("pointer-events-none");despinnerfy_buttons=function(){};vars.page.locked=1;$.ajax({type:"POST",url:v___location_prefix+"/xhr.cgi?type=cmd&action=restart",data:false,dataType:"text",complete:function(){setTimeout(function(){location.reload()},t)}})});l.one("click",function(){vars.cache.norestart=true;s.modal("hide")})});s.on("escape.close.bb",function(e){e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();n&&theme.veiled(1)})},version:function(e,t){ver=session.server.data("theme-version-data");if(!ver){return String()}ver=Convert.uriDecodeComponent(ver);if(!ver.startsWith("{")||!ver.endsWith("}")){console.warn("Error parsing theme version data object");return"19.99"}ver=JSON.parse(ver);!theme.version.current&&(theme.version.current=ver.versionfull.toString());if(e){return ver.timestamped.toString()}if(t){return ver.versionfull.toString()}return ver.version.toString()},visibility:{set:function(e){var t=this;if(!t.calling&&settings_sysinfo_real_time_status!==2){if(e===true){typeof stats==="object"&&stats.general.enable()}else{typeof stats==="object"&&stats.general.disable()}t.calling=1;setTimeout(function(){t.calling=0},1)}vars.events.keypressed.meta=false;vars.events.keypressed.ctrl=false;vars.events.keypressed.shift=false;vars.events.keypressed.alt=false},get:function(){return document.hasFocus()}},config:{_:{form:{tconfig:function(){return $('body[data-uri*="tconfig.cgi"] form[action*="tconfig.cgi"]#settings_')}},funcs:{event:function(e){var t=e==="reset"?"evttcrs":"";return t},dependent_radios:function(e,t,n,a){var i=theme.config._.funcs.event("reset");if(!a){a=theme.config._.form.tconfig()}var s=function(e,t,n,a){var i=a.find('input[name="'+e+'"]:checked'),s=t,r=i.val()=="true"||parseInt(i.val())>0?true:false,o="disabled pointer-events-none";if(n){r=!r}$.each(s,function(e,t){a.find('[name="'+t+'"]:not(a)').toggleClass(""+o+" opacity-0_6",r);a.find('[name="'+t+'"]').parent(".awradio").toggleClass(o,r)})};a.find('input[name="'+e+'"]').on("change "+i+"",function(){s(e,t,n,a)}).trigger("change")}}},current:{_data:{},set:function(){this._data=core.get_global_vars(["config_portable","settings"])},get:function(){return this._data},reset:function(){var e=theme.config._.form.tconfig(),t=e[0],n=this.get();if(t){var a=t.elements,i=theme.config._.funcs.event("reset");for(var s=0,r;r=a[s++];){if(typeof n[r.name]!=="undefined"){window[r.name]=n[r.name];if(r.type==="radio"){e.find('[name="'+r.name+'"][value="'+n[r.name]+'"]').prop("checked",true).trigger(i)}else{e.find('[name="'+r.name+'"]').val(n[r.name]).trigger(i)}}}theme_config_controls(0);set_onbeforeunload_status(0,0)}}},format:function(e,t){var n;if(t=="true"||t=="false"){if(t=="true"){n=true}else{if(t=="false"){n=false}}}else{n=t}var a=Test.numeric(n)?n&&n.length>16?n:parseFloat(n):n;window[e]=a},apply:function(e,t){var n=this;if(!e){e=n._.form.tconfig()}$.each($(e.serializeArray()),function(e,t){if(t.name.endsWith("_user")||!t.name.startsWith("settings_")&&!t.name.startsWith("config_portable")){return true}n.format(t.name,t.value)}).promise().done(function(){if(t){n.save()}})},save:function(e){var t=core.get_global_vars(e||["config_portable","settings"]);$.ajax({type:"POST",url:v___location_prefix+"/index.cgi?xhr-manage-config=1&save=1&"+Convert.json_to_query(t),dataType:"text",success:function(e){if(!session.status(e)){return}plugins.page.format.columns(true)},error:function(){}});this.current.set()},events:function(e){var t=this,n=t._.funcs.event("reset");if(v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"tconfig.cgi"){var a=this._.form.tconfig(),i=a.find("select, input"),s="body";t.apply();i.on("input",function(e){t.format($(this).attr("name"),$(this).val());if(e.originalEvent!==undefined){theme_config_controls(1)}});var r="resize.cnff";$(window).off(r);$(window).on(r,function(e){e.preventDefault();var n=t._.form.tconfig(),a=n.find(".ui_form_end_buttons"),i=a.length;if(!i){$(this).off()}else{var s=n.find('input[name="settings_leftmenu_width"]');$(".mobile-menu-toggler:visible").length?s.prop("disabled",true):s.prop("disabled",false);var r='input[name="settings_side_slider_fixed"]',o=settings_navigation_always_collapse||window.matchMedia("(max-width: 1365px)").matches?true:false,l=n.find('input[name="settings_side_slider_enabled"]:checked').val()!="false";if(o&&!$.browser.mobile){n.find('input[name="settings_side_slider_fixed"][value="false"]').trigger("click")}l&&n.find(r).prop("disabled",o)}}).trigger(r);(function(){var e=a.find("#atrestore:not(.disabled)");$(s).undelegate(e,"click");$(e).off("click.confirm");$(e).on("click",function(){var e=get_onbeforeunload_status(),t=2500;set_onbeforeunload_status(0);if(e){setTimeout(function(){set_onbeforeunload_status(e)},t)}});$(e).confirmation({classNameRemove:"btn-default"},function(){$(this).off();var e=$(this);if(!e.hasClass("btn-inverse")){setTimeout(function(){spinnerfy_buttons(e,[1.5,-33,"small",false]);$.ajax({type:"POST",url:v___location_prefix+"/index.cgi?xhr-settings=1&restore=1",success:function(e){if(!session.status(e)){return}theme_reload()},error:function(t){e.addClass("btn-danger").removeClass("btn-default btn-inverse opacity-0_5")}})},0)}})})();(function(){var e=a.find('input[name="settings_sysinfo_theme_updates"]').first().parents("td").parent("tr");if(e.length){var t=theme.version(),n="tmp_spinner_theme_version",i="data-theme-version-container",s="data-theme-versions",r="data-theme-stable-version",o=e.find("td").first(),l=o.find(".smaller"),c=e.next("tr").find("td").first().find("b");l.append(' ('+theme_language("global_installed_version").toLowerCase()+" "+theme.version(0,1)+')"+theme_spinner_small("in-btn-md "+n+""," ","width:10px; height:10px; margin-left: 5px;"));$.ajax({type:"POST",url:v___location_prefix+"/index.cgi/?xhr-theme_latest_version=1",data:false,dataType:"json",success:function(e){var a=String(),o=e[0],l=o!=e[1]?e[1]:false,c=$("[data-text-installed]"),d=$("."+n),f=$("em["+r+"]"),u=$("span["+s+"]"),_=5;if(t){t=t.toString();var g=t.match(/([\d\.]+)/);if(g){_=g[1].length}}if(o){o=o.toString();var p=o.match(/([\d\.]+)/);if(p){_=p[1].length}}if(l){l=l.toString()}if(o&&o!=t){a+=", "+theme_language("global_latest_stable").toLowerCase()+" '+o+""}if(l&&l!=t){a+=", "+theme_language("global_latest_beta").toLowerCase()+" '+l+""}if(t&&t.length<=_&&o&&o.length<=_&&o.toString()!=t.toString()){f.addClass("text-danger")}if(a&&!a.length){c.text(theme_language("global_installed_and_latest_version").toLowerCase());f.addClass("text-success")}u.replaceWith(a);d.remove()},error:function(){}})}})();this._.funcs.dependent_radios("settings_right_table_links_type",["settings_right_table_animate_icons","settings_right_table_grayscaled_icons"],true);this._.funcs.dependent_radios("settings_hotkeys_active",["settings_hotkey_custom_1_user","settings_hotkey_custom_2_user","settings_hotkey_custom_3_user","settings_hotkey_custom_4_user","settings_hotkey_custom_5_user","settings_hotkey_custom_6_user","settings_hotkey_custom_7_user","settings_hotkey_custom_8_user","settings_hotkey_custom_9_user","settings_hotkey_toggle_modifier","settings_hotkey_toggle_hold_modifier","settings_hotkey_toggle_key_webmin","settings_hotkey_toggle_key_virtualmin","settings_hotkey_toggle_key_cloudmin","settings_hotkey_toggle_key_usermin","settings_hotkey_toggle_key_webmail","settings_hotkey_shell","settings_hotkey_shell2","settings_hotkey_focus_search","settings_hotkey_navigation","settings_hotkey_slider","settings_hotkey_toggle_slider","settings_hotkey_reload","settings_hotkey_reload","settings_hotkey_toggle_key_night_mode","settings_hotkey_sysinfo","settings_hotkey_favorites"],true);this._.funcs.dependent_radios("settings_side_slider_enabled",["settings_side_slider_fixed","settings_side_slider_fixed_toggle","settings_side_slider_sysinfo_enabled","settings_side_slider_notifications_enabled","settings_side_slider_favorites_enabled"],true);this._.funcs.dependent_radios("settings_sysinfo_real_time_status",["settings_sysinfo_real_time_status_disk","settings_sysinfo_real_time_stored","settings_sysinfo_real_time_stored_length"],true);this._.funcs.dependent_radios("settings_sysinfo_easypie_charts",["settings_sysinfo_easypie_charts_size","settings_sysinfo_easypie_charts_width","settings_sysinfo_easypie_charts_scale"],true);this._.funcs.dependent_radios("settings_sysinfo_theme_updates",["settings_cache_interval"],true);if(plugins.navigation.switch.dashboard.get()){a.find('[name="settings_sysinfo_link_mini"]').parents("span").parent("td").parent("tr").remove()}(function(){var e=a.find('input[name="settings_table_init_datatables"]');e.on("input "+n+"",function(){var e=$(this).next("span"),t=parseFloat(this.value),n=t+" "+theme_language("theme_xhred_global_rows").toLowerCase();n=" ("+n+")";if(!e.is("span")){$(this).after('  '+n+"")}else{e.text(n)}});e.trigger("input")})();(function(){a.find('select[name="settings_navigation_color"]').on("keyup change "+n+"",function(){var e=$(this).val(),n=$("link[data-palette]"),a=e!="blue";if(a){$("head").append('')}setTimeout(function(){session.server.data("data-theme",e);n.remove();session.server.data("data-default-theme",e);$(s).find(".user-link.palette-toggle").find(".fa-sun").trigger("click");t.apply()},a?800:0)})})();(function(){a.find('input[name="settings_side_slider_enabled"]').on("change "+n+"",function(){var e="body .right-side-tabs",n=$(this).val()=="true"?true:false;$(""+e+"-toggler").toggleClass("hidden",!n);$(""+e+"").toggleClass("hidden",!n);if(n){$('input[name="settings_side_slider_sysinfo_enabled"][value="true"], input[name="settings_side_slider_notifications_enabled"][value="true"], input[name="settings_side_slider_favorites_enabled"][value="true"]').trigger("click")}t.apply();page_resized();settings_side_slider_fixed&&plugins.slider.state(~~n)});a.find('input[name="settings_side_slider_fixed"]').on("change "+n+"",function(){vars.slider.pinned=-1;var e=$(".right-side-tabs-dismiss .fa2-collapse-right"),n=$(this).val()=="true"?true:false;plugins.slider.state(n);e.toggleClass("fa-rotate-45",!n);t.apply()});a.find('input[name="settings_side_slider_sysinfo_enabled"], input[name="settings_side_slider_notifications_enabled"], input[name="settings_side_slider_favorites_enabled"]').on("change "+n+"",function(){var e="right-side-tabs-"+$(this).attr("name").split("_")[3],t=$(this).attr("name"),n=$(s).find("#"+e).hasClass("active"),a=$('input[name="settings_side_slider_sysinfo_enabled"][value="true"]:checked, input[name="settings_side_slider_notifications_enabled"][value="true"]:checked, input[name="settings_side_slider_favorites_enabled"][value="true"]:checked').length;if($(this).val()=="true"){$(s).find('a[href="#'+e+'"], #'+e+"").removeClass("hidden").parent().removeClass("hidden");if(t==="settings_side_slider_notifications_enabled"){$(".right-side-tab-notification-asterix").removeClass("invisible hidden hidden-forged");$(".right-side-tabs-toggler .badge.badge-danger").removeClass("invisible hidden hidden-forged");setTimeout(function(){if(typeof plugins.slider.badge==="function"){plugins.slider.badge()}},300)}}else{$(s).find('a[href="#'+e+'"], #'+e+"").addClass("hidden");if(n&&a){$("body #right-side-tabs").find("li:not(.active) a:not(.hidden)").first().trigger("click")}else if(a===0){$('input[name="settings_side_slider_enabled"][value="false"]').trigger("click")}if(t==="settings_side_slider_notifications_enabled"){$(".right-side-tab-notification-asterix").addClass("invisible hidden hidden-forged");$(".right-side-tabs-toggler .badge.badge-danger").addClass("invisible hidden hidden-forged");plugins.favicon.set(0)}}theme.config.apply()})})();(function(){a.find('select[name="settings_navigation_color"]').after(' ');var e=a.find(".settings_navigation_color_toggle");e.on("click",function(){a.find("."+$(this).attr("data-name")+"_reset, ."+$(this).attr("data-name")+"_rows").toggleClass("hidden");$(this).toggleClass("forced")});var i=a.find('input[name="settings_grayscale_level_navigation"], input[name="settings_sepia_level_navigation"], input[name="settings_saturation_level_navigation"], input[name="settings_hue_level_navigation"], input[name="settings_invert_level_navigation"], input[name="settings_brightness_level_navigation"], input[name="settings_contrast_level_navigation"]');a.find(".settings_navigation_color_reset").on("click",function(){var e="grayscale(0) sepia(0) saturate(1) hue-rotate(0deg) invert(0) brightness(1) contrast(1)",t="filter: "+e+";";$(".visible-xs.mobile-menu-toggler").attr("style","position: fixed;"+t);$("aside, .visible-xs.mobile-menu-toggler").attr("style","z-index: 10; overflow: visible; transform: translate("+settings_leftmenu_width+"px, 0px);"+t);settings_side_slider_palette==="nav"&&$("#right-side-tabs").add("#right-side-tabs + .right-side-tabs-toggler").css({filter:e});a.find('input[name="settings_grayscale_level_navigation"], input[name="settings_sepia_level_navigation"], input[name="settings_hue_level_navigation"], input[name="settings_invert_level_navigation"]').val(0);a.find('input[name="settings_saturation_level_navigation"], input[name="settings_brightness_level_navigation"], input[name="settings_contrast_level_navigation"]').val(1);i.each(function(){$('code[data-name="'+$(this).attr("name")+'"]').text($(this).val())})});i.on("input "+n+"",function(){var e="grayscale("+a.find('input[name="settings_grayscale_level_navigation"]').val()+") sepia("+a.find('input[name="settings_sepia_level_navigation"]').val()+") saturate("+a.find('input[name="settings_saturation_level_navigation"]').val()+") hue-rotate("+a.find('input[name="settings_hue_level_navigation"]').val()+"deg) invert("+a.find('input[name="settings_invert_level_navigation"]').val()+") brightness("+a.find('input[name="settings_brightness_level_navigation"]').val()+") contrast("+a.find('input[name="settings_contrast_level_navigation"]').val()+")";style="filter: "+e+";";$(".visible-xs.mobile-menu-toggler").attr("style","position: fixed;"+style);$("aside, .visible-xs.mobile-menu-toggler").attr("style","z-index: 10; overflow: visible; transform: translate("+settings_leftmenu_width+"px, 0px);"+style);settings_side_slider_palette==="nav"&&$("#right-side-tabs").add("#right-side-tabs + .right-side-tabs-toggler").css({filter:e});a.find('code[data-name="'+$(this).attr("name")+'"]').text($(this).val());theme.config.apply()});i.each(function(e){a.find('code[data-name="'+$(this).attr("name")+'"]').text($(this).val());$(this).parent().parent("td").parent("tr").addClass("hidden settings_navigation_color_rows hidden-skip");if(e===0){$(this).parent().parent("td").parent("tr").prev("tr").addClass("hidden-dependent-skip")}}).promise().done(function(){if(uri_parse_param("search")){e.trigger("click")}});setTimeout(function(){$(".mobile-menu-toggler:visible").length&&$('input[name="settings_leftmenu_width"]').prop("disabled",true)},100);var s=a.find('input[name="settings_leftmenu_width"]');s.on("click keyup change "+n+"",function(e){page_adjust($(this).val(),$(this).val());a.find('code[data-name="'+$(this).attr("name")+'"]').text($(this).val());theme.config.apply();vars.navigation.width_initial=parseInt($(this).val())});s.each(function(){a.find('code[data-name="'+$(this).attr("name")+'"]').text($(this).val());vars.navigation.width_initial=parseInt($(this).val())});(function(){t._.funcs.dependent_radios("settings_navigation_always_collapse",["settings_leftmenu_width"]);a.find('input[name="settings_navigation_always_collapse"]').on("change "+n+"",function(){if($(this).val()=="true"){$("html").attr("data-navigation-collapsed",1);$(".mobile-menu-toggler").removeClass("visible-xs");plugins.navigation.collapse()}else if($(this).val()=="false"){$("html").attr("data-navigation-collapsed",0);$(".mobile-menu-toggler").addClass("visible-xs")}page_resized()})})();a.find('input[name="settings_leftmenu_user_html"]').on("keyup "+n+"",function(){$("aside ul.user-html li.user-html-string").html($(this).val())});t._.funcs.dependent_radios("settings_leftmenu_netdata",["settings_leftmenu_netdata_link"],true);if(!$(".right-side-tabs-toggler").length){a.find('input[name="settings_side_slider_enabled"][value="false"]').trigger("click");a.find('input[name="settings_side_slider_enabled"]').attr("disabled","disabled")}page_resized()})();$('[data-toggle="popover"]:not(.tconfig-popover)').popover({sanitize:false});var o=$('[action="tconfig.cgi"] sup.tconfig-popover');o.popover({sanitize:false,container:$('[action="tconfig.cgi"] .col_value').first()}).on("shown.bs.popover",function(){$(this).parent().parent().parent().addClass("popover-active")}).on("hidden.bs.popover",function(){$(this).parent().parent().parent().removeClass("popover-active")});var l=$('[name="settings_sysinfo_hidden_panels_user"]');l.on("input "+n+"",function(){settings_sysinfo_hidden_panels_user={};var e=$(this),t=e.val();if(t&&t.length){t.forEach(function(t){var n=e.find('option[value="'+t+'"]').text();settings_sysinfo_hidden_panels_user[t]=n})}setTimeout(function(){if($.isEmptyObject(settings_sysinfo_hidden_panels_user)){settings_sysinfo_hidden_panels_user=""}else{settings_sysinfo_hidden_panels_user=JSON.stringify(settings_sysinfo_hidden_panels_user)}})});var c=$('textarea[name="settings_leftmenu_custom_links"]'),d=c.val();c.length&&c.val(Convert.htmlDecode(d).replace(///g,"/"));a.find("#atsave:not(.btn-inverse):not(.disabled)").on("click",function(e){e.preventDefault();var t=$(this);spinnerfy_buttons(t);set_onbeforeunload_status(0,0);var n="goto_webmin_default_module",i=a.find('select[name="'+n+'"]');if(i.length){var s=$.trim(i.val());if(get_access_level()===0){core.updateModuleData("/webmin/edit_startpage.cgi","/webmin/change_startpage.cgi",{gotomodule:s})}else{settings_webmin_default_module=s}}theme.config.apply();theme.config.save();setTimeout(function(){plugins.navigation.reload();theme_config_controls(0);despinnerfy_buttons(0,t);if(get_access_level()===0){if(settings_sysinfo_real_time_status){if(typeof stats==="object"){stats.general.enable()}else{load.bundle(v___server_extensions_path+"/stats/stats",0,["stats.general.query()"])}}else{if(typeof stats==="object"){stats.general.disable()}}}},600);$(window).trigger("resize")})}(function(){var t=v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"tconfig.cgi"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"settings-editor_read.cgi"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"settings-logos.cgi"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"settings-backgrounds.cgi";if(!e&&t){plugins.navigation.reset()}if(!e&&t){if(check_location_resource("/settings-logos.cgi?saved=1")){$.each($(".file_chooser_button_preview:first"),function(){if(!$(this).hasClass("disabled")){if(!matchMedia("(max-width: 1080px)").matches){if($("aside + .__logo").length){$(".__logo img").attr("src",$("[data-image-lga]").attr("data-image"));$("aside + .__logo").attr("style","transform: translate(0px, 0px);");setTimeout(function(){$(".__logo").transition({y:"-140px"},1200)},400)}else{$("aside").after('');setTimeout(function(){$(".__logo").transition({y:"-140px"},1200)},400)}}}else{$("aside + .__logo").remove()}})}var n=$(".btn.authentic_update:not(.disabled), .page_footer_ajax_submit:not(.disabled)");n.on("click",function(){spinnerfy_buttons($(this),[1.5,-28,"small",false])});setTimeout(function(){if(v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"settings-editor_read.cgi"){$(".end_submits").parent("td").after(' '+theme_language("settings_right_theme_bgs")+' '+theme_language("settings_right_theme_logos")+" '+theme_language("global_save")+" ")}},1300)},10)}if(!e&&(v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"settings-logos.cgi"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"settings-backgrounds.cgi")){$(function(){var e=$('input[name="authenticated_logo"]:checked, input[name="authenticated_bg"]:checked'),t=e.val(),n=$('input[name="unauthenticated_logo"]:checked, input[name="unauthenticated_bg"]:checked'),a=n.val();function i(n){typeof n=="undefined"?n=e:false;var a=["authenticated_logo_file","authenticated_bg_file"];if(n.val()!="1"){$.each(a,function(e,t){$('input[name="'+t+'"]').parents(".file-input-wrapper").addClass("disabled").prev(".file_chooser_button_preview").addClass("disabled")})}else{$.each(a,function(e,n){$('input[name="'+n+'"]').parents(".file-input-wrapper").removeClass("disabled");if(t=="1"){$('input[name="'+n+'"]').parents(".file-input-wrapper").prev(".file_chooser_button_preview").removeClass("disabled")}})}}i();$('input[name="authenticated_logo"], input[name="authenticated_bg"]').on("change",function(){i($(this))});function s(e){typeof e=="undefined"?e=n:false;var t=["unauthenticated_logo_file","unauthenticated_bg_file"];if(e.val()!="1"){$.each(t,function(e,t){$('input[name="'+t+'"]').parents(".file-input-wrapper").addClass("disabled").prev(".file_chooser_button_preview").addClass("disabled")})}else{$.each(t,function(e,t){$('input[name="'+t+'"]').parents(".file-input-wrapper").removeClass("disabled");if(n=="1"){$('input[name="'+t+'"]').parents(".file-input-wrapper").prev(".file_chooser_button_preview").removeClass("disabled")}})}}s();$('input[name="unauthenticated_logo"], input[name="unauthenticated_bg"]').on("change",function(){s($(this))})});$(".file_chooser_button_preview").on("mouseout",function(e){$(this).css("background","white")}).on("mouseover",function(e){$(this).css("background","#eee")});$.each($(".file_chooser_button_preview"),function(){if($(this).data("image")){$(this).popover({trigger:"hover",sanitize:false,html:true,content:function(){return""}})}})}})();(function(){var e=theme.config._.form.tconfig(),t=e.find("div > table > tbody"),n=e.find("#atsave");t.on("keydown",function(e){var t=e.keyCode?e.keyCode:e.which;if(t===13){n.not(".disabled").trigger("click")}})})();this.current.set()}}};const quirks={active_element:function(){if(document.activeElement&&$(document.activeElement).is("body")){return v___page_activeElement}else{return document.activeElement}},local_storage:{safari:function(){if(typeof localStorage=="object"){try{localStorage.setItem("d41d8cd98f00",1);localStorage.removeItem("d41d8cd98f00")}catch(e){Storage.prototype._setItem=Storage.prototype.setItem;Storage.prototype.setItem=function(){};vars.local_storage=0}}}},render:{apple:function(){browser.detect.safari(1)&&$("html").css("overflow","auto");var e=vars.h.selector.content.get();if(browser.detect.safari()){e.addClass("browser_safari")}if(browser.detect.chrome()){e.addClass("browser_chrome")}if(navigator.userAgent.match(/(iPod|iPhone|iPad)/)){e.data("AppleMobileDev",true);e.attr("style","-webkit-overflow-scrolling: touch !important; overflow-y: scroll !important;")}}},clean:function(){$("style[data-err]").remove()},temporary:function(){setTimeout(function(){if(typeof settings_sysinfo_real_time_status==="boolean"){settings_sysinfo_real_time_status=~~settings_sysinfo_real_time_status;theme.config.save()}},2e3)}};const regex={matches:function(e,t,n,a){n||(n=1);var i=[];var s;while(s=t.exec(e)){i.push(s[n])}if(a){i=i.slice(-1)[0]}return i}};const XHR={headers:function(e){return[e.getAllResponseHeaders(),e.getResponseHeader("content-type"),e.getResponseHeader("content-disposition"),e.getResponseHeader("content-length")]}};const plugins={};plugins.terminal=function(){var e={},t={},a=function(e){if(typeof t==="function"){t(e)}},i=function(a,i){if(!i){i={};i.container_id="terminal"}if(typeof a==="object"&&!$.isEmptyObject(a)&&a.files&&a.cols&&a.rows&&a.socket_url&&a.port){const o=a;if(o.files.js){const a=o.files.js,r=session.server.data("webprefix"),c=r+"/xterm",d="WebglAddon",f="CanvasAddon",p=detectWebGLContext()?d:f;if(p===d){a.splice(3,1)}else if(p===f){a.splice(4,1)}$.each(a,function(r,f){f=f.replace(/(.*?)\.(js|css)\?.*/,"$1");load.bundle(f,+!r,a.length-1===r?[function(){var a=setInterval(function(){if(typeof Terminal==="function"&&typeof AttachAddon==="object"&&typeof FitAddon==="object"&&typeof window[p]==="object"){clearInterval(a);const f=new WebSocket(""+o.socket_url+"","binary"),u=function(a){if(!$.isEmptyObject(e)){for(const t in e){try{if(t!==a){e[t].onclose=function(){};e[t].readyState===1&&e[t].send("exit\r");setTimeout(function(){e[t].close();delete e[t]},300)}}catch(e){}}}if(a===null){t={}}},g=function(){return document.getElementById(i.container_id)};var r={},c;f.onerror=function(){_(i.container_id,"socket_conn_sock_error");c&&c.disconnect();n=false};f.onclose=function(){if(core.curModule("xterm",1)||i.dropdown){setTimeout(function(){var e="Connection to "+(session.server.data("host")||"localhost")+" closed.";if(!$.isEmptyObject(r)){var t=i.dropdown?"xxs":"tiny",a=i.dropdown?"plugins.terminal.reconnect":"page_refresh";r.writeln(e);$(g()).find(".xterm-viewport").css("overflow","hidden");$(g()).find(".xterm-rows").html(""+e+"
    "+''+theme_language("socket_conn_lost_reconnect")+"")}},1e3)}c&&c.disconnect();n=false};f.onopen=function(){if(!i.detached){t=u;u(o.port);e[o.port]=f}var a={cols:o.cols,rows:o.rows,fontFamily:browser.detect.firefox()&&config_portable_module_xterm_render_addon?"courier-new, courier, monospace":"RobotoMonoLocal",letterSpacing:1,fontSize:12,screenReaderMode:o.conf.screen_reader==="true"?true:false,theme:{background:"#00000000"}};if(i.terminal){a={...a,...i.terminal}}try{let e=config_portable_module_xterm_options;e=JSON.parse(e.replace(/'/g,'"'));if(!$.isEmptyObject(e)){a={...a,...e}}}catch(e){}var n=new Terminal(a),_=g(),m=new AttachAddon.AttachAddon(this),h=new FitAddon.FitAddon,v=p===d?new WebglAddon.WebglAddon:new CanvasAddon.CanvasAddon;call_default_cmds=function(e){if(i.cmd){if(i.cmd.startsWith("!")){i.cmd=i.cmd.replace(/^!/,"")}setTimeout(function(){e.send(i.cmd);setTimeout(function(){e.send("\r")},420)},40)}};n.loadAddon(m);n.loadAddon(h);if(config_portable_module_xterm_render_addon){n.loadAddon(v)}n.open(_);setTimeout(function(){n.focus()},600);setTimeout(function(){c=new ResizeObserver(function(){h.fit()});c.observe(_);if(config_portable_module_xterm_render_addon&&typeof WebglAddon==="object"){v.onContextLoss(function(){v.dispose()})}n.onResize(function(e){f.send("\\033[8;("+e.rows+");("+e.cols+")t")});setTimeout(function(){h.fit()},2)},1);call_default_cmds(this);r=n;if(i.dropdown){s={term:n,sock:this}}if(i.detached){r.onKey(function(e){if(e.key===""&&(vars.events.keypressed.ctrl||vars.events.keypressed.shift||vars.events.keypressed.meta)){l()}})}if(!i.detached){window.xterm_argv={}}}}},0)}]:0,1,{sourceType:String(),cssPath:c,jsPath:c})})}}else{if(core.curModule("xterm",1)&&!i.dropdown){_(i.container_id,"socket_conn_parse_error")}else{console.warn(theme_language("socket_conn_parse_error"))}}},n=false,s={},o=function(e){if(session.server.data("terminal")==1){var t="-shell-port-",a="terminal-dd",s=function(e){plugins.messenger.post({type:e,icon:"fa2 fa2-terminal fa-lg fa-fw",id:"xtermErr",title:theme_language("xterm_error_title"),message:theme_language("xterm_error"),layout:1,displayMode:1,position:"bottomCenter",cancel:true,close:false,timeout:false,progressBar:false,buttons:plugins.messenger.toast.construct.button(theme_language("global_open").toUpperCase(),function(){get_pjax_content(v___location_prefix+"/xterm")})})};$(function(){var e=$("."+t+"container"),i=e.find('[data-output="true"]'),n=$("#"+a);e.find("."+t+"cmd").remove();if(n.length){n.empty()}else{i.replaceWith('
    ')}});$.ajax({type:"GET",url:session.server.data("webprefix")+"/xterm/",dataType:"text",error:function(){n=false;console.warn("Cannot load the terminal");setTimeout(function(){l();s("error")},1e3)},success:function(t){if(!session.status(t)){return}if(t){var o=t.match(/xterm_argv\s*=\s({.*})/);if(o&&o[0]&&o[1]){var r=JSON.parse(o[1]);i(r,{dropdown:true,container_id:a,detached:true,cmd:e})}else{n=false;console.warn("Cannot start the terminal");setTimeout(function(){l();s("warning")},1e3)}}else{n=false;console.warn("Cannot start the terminal");setTimeout(function(){l();s("warning")},1e3)}}})}},r=function(e){if(!n){n=true;o(e)}else{if(typeof s.term==="object"&&typeof s.term.focus==="function"){if(typeof e==="string"){if(e.startsWith("!")){e=e.replace(/^!/,"")}setTimeout(function(){s.sock.send(" "+e);setTimeout(function(){s.sock.send("\r")},420)},40)}let t=460;setTimeout(function(){const e=function(){if(t<600){const a=quirks.active_element(),i=$(a).is(".xterm-helper-textarea");t++;!i&&setTimeout(e,0);s.term.focus()}};e()},t)}}setTimeout(function(){c().css("bottom","0vh").addClass("opened")},20)},l=function(){c().css("bottom","100vh").removeClass("opened")},c=function(){return $("body").find(".-shell-port-")},_=function(e,t){if($("[data-fatal-error-text]").length){return}var a="
    "+'

    '+theme_language(t)+"

    "+"
    "+" "+''+'  '+""+theme_language("socket_conn_lost_try")+""+"";$(document.getElementById(e)).closest(".panel-body").html(a);$("#headln2c .favorites").hide()};return{new:i,reconnect:o,clean:a,open:r,close:l}}();plugins.shell=function(){var e=function(){return $("body").find(".-shell-port-").hasClass("opened")},t=function(){return $t_uri_cloudmin&&$('a[target="page"][href*="/server-manager/save_serv.cgi"][href*="shell=1"]').length},a=function(){var e=t();if(e){return v___location_prefix+"/server-manager/shell.cgi"}else if(core.moduleAvailable("shell")){return v___location_prefix+"/shell/index.cgi"}else{return 0}},n=function(){if(!g()){$(".user-link.ported-console").addClass("hidden")}else{if(settings_show_terminal_link!==false||settings_show_terminal_link2!==false){$(".user-link.ported-console").removeClass("hidden")}}},s=function(){vars.shell.processing=0;$('.-shell-port- input[data-command="true"]').removeAttr("readonly")},o=function(e,t,a,i){return'"},r=function(e){var a=t(),i=$('select[name="sid"]').val();if(!e){e=""}if(!i){i=0}$.ajax({type:"POST",url:v___location_prefix+"/index.cgi/?xhr-shell-insert=1&xhr-shell-inserted="+e+"&xhr-shell-cms="+a+"&xhr-shell-cmsid="+i,dataType:"text",complete:function(e){e=e.responseText;if(!session.status(e)){return}if(!e){return}var t=JSON.parse(e);localStorage.setItem(v___server_hostname+"-"+"shell_commands",JSON.stringify(t))}})},l=function(e,t,a){$(e).next("pre").remove();u();_(t);a.scrollTop(a[0].scrollHeight);setTimeout(function(){vars.shell.processing=0;vars.shell.history=0;t.removeAttr("readonly").focus()},100)},c=function(e){var t="TERM environment variable not set.\n";if(e==="
    \n"+t+"
    "||e.endsWith(t)){e=e.replace(t,"Cannot run interactive commands in this shell.\n")}return e},_=function(e){e.val("");e.focus()},d=function(e){var t=$("body").find(".-shell-port-"),a=e&&e.startsWith("!")?e.replace(/^!/,""):false,i=t.find("input"),n="data-shell-host",s=t.find(".-shell-port-pwd").attr("data-pwd"),o=t.find("["+n+"]"),l=o.attr(n);if($t_uri_cloudmin){var c=$('aside [name="sid"] option:selected');current_host_name=c.attr("title")||c.text();o.text(current_host_name)}else{o.text(l)}r(false);if(a){i.val(a);var _=$.Event("keydown");_.which=13;i.trigger(_)}t.css("bottom","0vh").addClass("opened");h();u();setTimeout(function(){if(!a){focus();i.focus()}},20)},f=function(){var e=$("body").find(".-shell-port-"),t="command-shell-editor-spinner";e.css("bottom","100vh").removeClass("opened");$("."+t).remove();h(true)},p=function(e){var t=$(".-shell-port-container .-shell-port-cmd"),a="invisible";if(e){t.addClass(a)}else{t.removeClass(a)}},u=function(){if(core.moduleAvailable("shell")==1&&session.server.data("terminal")==="0"){var e=parseInt($("body").find(".-shell-port-cmd").width()),t=parseInt($("body").find(".-shell-port-prompt").width());$("body").find('.-shell-port- input[data-command="true"]').css("width",e-t-50+"px")}},g=function(){var e=t();if(core.moduleAvailable("shell")==1||e||session.server.data("terminal")==1){return 1}else{return 0}},m=function(e){var t=$("body").find(".-shell-port-"),a=t.find(".-shell-port-pwd"),i=a.attr("data-home");if(typeof e==="string"){e=Convert.uriDecodeComponent(e);var n=e&&e.endsWith("/")?e.slice(0,-1):e,s=n.split("/").pop();if(!s){s="/";e="/"}if(get_access_level()==2){e=get_user_home()+e}if(e===i){s="~"}e=Convert.htmlEscape(e);a.attr("data-pwd",e).attr("title",e).text(s)}},h=function(n){var s=$(document.body).find(".-shell-port-"),g='[data-command="true"]',m=s.find("input"+g+""),h=s.find("div[data-output]"),b=s.find(".-shell-port-container"),y=s.data("autocomplete"),x=$(window),k=".plugin-shell";if(n){x.off("keydown"+k+"");x.off("keyup"+k+"");b.off("click"+k+"");return}x.on("keydown"+k+"",function(t){var a=this,i=e(),n=$(".modal-shell-config:visible").length,o=String.fromCharCode(t.which).toLowerCase();if(t[settings_hotkey_toggle_modifier]&&o==settings_hotkey_shell2&&theme_shortcuts_modifier_unique(t)){t.preventDefault();if(i){f()}return}if((t.altKey||t.ctrlKey)&&String.fromCharCode(t.which).toLowerCase()=="l"){t.preventDefault()}if(typeof a.shell_request_interrupted==="undefined"){a.shell_request_interrupted=0}if(typeof this.last_pressed_times==="undefined"){this.last_pressed_times=0}else{this.last_pressed_times+=1}setTimeout(function(){a.last_pressed_times=0},vars.event.double_click_delay);if(o==="c"&&a.last_pressed_times>1&&t.ctrlKey&&!t.shiftKey&&!t.altKey&&!t.metaKey){a.shell_request_interrupted=1;typeof a.shell_request==="object"&&a.shell_request.state()==="pending"&&a.shell_request.abort();setTimeout(function(){a.shell_request_interrupted=0},1e3);return}var r=platform.detect()==="mac",l=r?t.metaKey:t.ctrlKey,c=r?t.ctrlKey:t.metaKey;if(this.searching||o==="r"&&l&&!t.shiftKey&&!t.altKey&&!c){t.preventDefault();if(typeof a.shell_request==="object"&&a.shell_request.state()==="pending"){return}var _=$(".-shell-port-type"),d=$('.-shell-port- input[data-command="true"]'),p="reverse-i-search",g="data-searching";b.scrollTop(b[0].scrollHeight);this.searching=1;run_search=function(e){var t=JSON.parse(localStorage.getItem(v___server_hostname+"-"+"shell_commands")),a=t.filter(function(t){return t.includes(e)});return $.unique(a).reverse()},update_search=function(e,i){if(!this.used_index||i){this.used_index=0}if(t.ctrlKey){if(o==="c"){cancel_search(1);return}if(o!=="r"){return}}if(JSON.stringify(e)==JSON.stringify(this.results)&&!i){if(t.shiftKey){--this.used_index}else{++this.used_index}}else{this.results=e}if(e.length<=this.used_index){this.used_index=0}if(this.used_index<0){this.used_index=e.length-this.used_index-2}var n=this.searching_shell_str_replaced.find("span["+g+"]"),s=n.text();var r=localStorage.getItem(v___server_hostname+"-"+"shell_command_last");if(!a.pre_searched&&r){if(r==="undefined"){r=String()}a.pre_searched=r}if(!s&&a.pre_searched){n.text(a.pre_searched);var l=run_search(a.pre_searched);update_search(l,0);return}if(!s||!e.length){failed_search();return}else{success_search()}if(e){d.val(Convert.htmlUnEscape(e[this.used_index]))}u()},failed_search=function(){var e=a.searching_shell_str_replaced.html();if(!e.includes("failed reverse")){a.searching_shell_str_replaced.html(e.replace(p,"failed "+p+""))}u();var t=new Audio("data:audio/ogg; codecs=opus;base64,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MsYYY85BCJ1zjjHnIITQOceYcxBC55xjzDkIoXOMMeacAACgAgcAgAAbRTYnGAkqNGQlABAOAAAYw5hzjDkGnYQKIecgdA5CKqlUCDkHoXMQSkmpeA46KSGUUkoqxXMQSgmhlJRaKy6GUkoopaTUUpExhFJKKSWl1ooxpoSQUkqptVaMMaGEVFJKKbZijI2lpNRaa60VY2wsJZXWWmutGGOMaym1FmOsxRhjXEuppRhrLMYY43tqLcZYYzHGGJ9baimmXAsAMHlwAIBKsHGGlaSzwtHgQkNWAgC5AQAIQkoxxphjzjnnnHPOSaUYc8455yCEEEIIIZRKMeacc85BByGEEEIoGXPOOQchhBBCCCGEUFLqmHMOQgghhBBCCCGl1DnnIIQQQgghhBBCSqlzzkEIIYQQQgghhJRSCCGEEEIIIYQQQggppZRCCCGEEEIIIZQSUkophRBCCCWEEkoIJaSUUgohhBBCKaWEUkJJKaUUQgillFBKKaGUkFJKKaUQQiillFBKKSWllFJKJZRSSikllFBKSimllEoooZRQSimllJRSSimVUkopJZRSSgkppZRSSqmUUkoppZRSUkoppZRSKaWUUkoppaSUUkoppVJKKaWUEkpJKaWUUkqllFBKKaWUUlJKKaWUSgqllFJKKaUAAKADBwCAACMqLcROM648AkcUMkxAhYasBABSAQAAQiillFJKKTWMUUoppZRSihyklFJKKaWUUkoppZRSSimVUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKAcDdFw6APhM2rI5wUjQWWGjISgAgFQAAMIYxxphyzjmllHPOOQadlEgp5yB0TkopPYQQQgidhJR6ByGEEEIpKfUYQyghlJRS67GGTjoIpbTUaw8hhJRaaqn3HjKoKKWSUu89tVBSainG3ntLJbPSWmu9595LKinG2nrvObeSUkwtFgBgEuEAgLhgw+oIJ0VjgYWGrAIAYgAACEMMQkgppZRSSinGGGOMMcYYY4wxxhhjjDHGGGOMMQEAgAkOAAABVrArs7Rqo7ipk7zog8AndMRmZMilVMzkRNAjNdRiJdihFdzgBWChISsBADIAAMRRrDXGXitiGISSaiwNQYxBibllxijlJObWKaWU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");t.play()},success_search=function(){var e=a.searching_shell_str_replaced.html();a.searching_shell_str_replaced.html(e.replace("failed "+p+"",p));u()},cancel_search=function(e){_.html(a.searching_shell_str);a.searching_shell_str=0;a.searching_shell_str_replaced=0;a.searching=0;if(e){d.val(String())}u()};if(!this.searching_shell_str){this.searching_shell_str=_.html()}if(!this.searching_shell_str_replaced){this.searching_shell_str_replaced=_.html("("+p+")`': ");u()}else{var x=this.searching_shell_str_replaced.find("span["+g+"]"),k=x.text();if(t.key&&t.key.length===1){var w=t.ctrlKey||t.altKey||t.metaKey?String():t.key,A=k+w;A&&(a.pre_searched=A,localStorage.setItem(v___server_hostname+"-"+"shell_command_last",A));x.text(A);var C=run_search(x.text());update_search(C,w)}}if(t.keyCode===8){var S=this.searching_shell_str_replaced.find("span["+g+"]"),I=S.text(),T=I.slice(0,-1);I&&(a.pre_searched=T,localStorage.setItem(v___server_hostname+"-"+"shell_command_last",A));S.text(T);var V=run_search(S.text());update_search(V,1);return}if(t.keyCode===9||t.keyCode===13||t.keyCode===27||t.keyCode===37||t.keyCode===38||t.keyCode===39||t.keyCode===40){cancel_search()}return}if(i&&t.keyCode===27&&!n){f();return}if(i&&t.keyCode===38){t.preventDefault()}if(i&&t.keyCode===9&&m.is(":focus")){t.preventDefault();if(!y){return}var E=":"+":"+":"+":",j=m.val().trim().split(/\s+(?!-)/),O=j.length,z=j[0]&&j[0].indexOf("-")===-1?0:1,M=j[1]&&j[1].indexOf(":")===-1?0:1,q=m.val().endsWith(" "),U=$.trim(j[0])==="service",Z=$.trim(j[0])==="systemctl",J=$.trim(j[0])&&$.trim(j[0]).startsWith("chown"),K=j.length===1&&m.val().length&&!z&&!q?"commands":U||Z?"services":J?"permissions":"lists";if(!$.trim(m.val()).length){return}var W=m.val(),R=s.find(".-shell-port-pwd"),D=R.attr("data-pwd");if(K==="services"){K=U?"service":"systemctl";if(K==="systemctl"&&j.length!==3){return}W=K=="service"?$.trim(j[1]):$.trim(j[2]);if($.trim(j[0])==="service"&&(j.length===2&&q||j.length===3)){if(j.length===3){W=E+$.trim(j[1])+E+$.trim(j[2])}else{W=E+$.trim(j[1])}}}if(J){if(O===1&&!q){m.val($.trim(j[0])+" ");return}if(!M||!$.trim(j[1])){K="users";W=$.trim(j[1])}else if(!q&&!j[2]){K="groups";W=$.trim($.trim(j[1]).split(":")[1])}else{K="lists";W=D+"/"+E+$.trim(j[2])}}if(K==="lists"&&!J){W=D+"/"+E+$.trim(j[1])+E+$.trim(j[0])+E+$.trim(j[2])}$.ajax({type:"POST",url:v___location_prefix+"/index.cgi?xhr-get_autocompletes=1&xhr-get_autocomplete_type="+K+"&xhr-get_autocomplete_string="+W+"",data:false,dataType:"json",success:function(e){var t=e.length;if(t===1){if(K==="service"||K==="systemctl"||K==="lists"){var a=$.trim(j[0]),i=$.trim(j[0])+" "+$.trim(j[1]);if(K==="lists"){if(a==="cd"&&e[0].endsWith("/")||a!=="cd"){if(a==="cd"||a==="cat"){m.val(a+" "+e[0])}else{if($.trim(j[2])){m.val(i+" "+e[0]+"")}else{m.val(a+" "+e[0]+"")}}}}else{if(a==="service"&&(j.length===2||j.length===3)){if(j.length===2){m.val(a+" "+e[0]+" ")}else if(j.length===3){m.val($.trim(j[0])+" "+$.trim(j[1])+" "+e[0])}}else if(a==="systemctl"&&j.length===3){m.val(a+" "+$.trim(j[1])+" "+e[0])}}}else{if(J){if(!M){m.val($.trim(j[0])+" "+e[0]+":")}else if(!q&&!j[2]){m.val($.trim(j[0])+" "+$.trim($.trim(j[1]).split(":")[0])+":"+e[0]+" ")}else{m.val($.trim(j[0])+" "+$.trim(j[1])+" "+e[0]+"")}}else{m.val(e[0]+" ")}}}else if(t>1){var n=""+v()+" "+Convert.htmlEscape(m.val())+""+"\n";h.find("pre").append(n);h.find("pre").append(Convert.htmlEscape(e.join("\n")+"\n"));b.scrollTop(b[0].scrollHeight)}setTimeout(function(){m.focus().mousedown()},10)},error:function(e){session.status(e.responseText)}})}}).on("keyup"+k+"",function(n){var g=this,b=e(),y=$(".modal-shell-config:visible").length;if(b&&!y){var x=0,k=0,w=0,A=$(".form-control.sidebar-search"),C=t(),S=$('select[name="sid"]').val(),I=0;var T=a();if(!T){return}if(b||A.is(":focus")){if(n.keyCode===8){vars.shell.history=0}}if(b){x=$.trim(m.val());k=1;w=1}else{x=A.val();k=typeof A.val()!="undefined";w=0}if((w||k&&(!x.trim()||x.trim().startsWith("!")))&&(n.keyCode==38||n.keyCode==40)){n.preventDefault();n.stopPropagation();typeof localStorage.getItem(v___server_hostname+"-"+"shell_commands")=="undefined"?localStorage.setItem(v___server_hostname+"-"+"shell_commands",JSON.stringify({})):false;var V=JSON.parse(localStorage.getItem(v___server_hostname+"-"+"shell_commands")),E=V?V.length:0;if(vars.shell.history===0&&!x&&n.keyCode==40){return}else if(vars.shell.history===0&&x&&n.keyCode==38){I=1;return}else{vars.shell.history=n.keyCode==40?++vars.shell.history:--vars.shell.history}if(vars.shell.history<0&&n.keyCode===38){vars.shell.history=E-1}else if(vars.shell.history>E){vars.shell.history=0}if(V&&V[vars.shell.history%E]){if(!$.isEmptyObject(V)&&(vars.shell.history==E&&n.keyCode===38||vars.shell.history==E&&n.keyCode===40||I)){if(b){m.val("").focus()}else{A.val("").focus()}vars.shell.history=0;return}if(b){var j=V[vars.shell.history%E].replace(/^!/,"");m.val(Convert.htmlUnEscape(j)).focus()}}return}else if(k&&x.trim().startsWith("!")&&n.keyCode==27){n.preventDefault();n.stopPropagation();A.val("").focus();return}if(k&&x.trim().startsWith("!")&&n.keyCode==13){A.addClass("_shell_form_");n.preventDefault();n.stopPropagation();if(core.moduleAvailable("shell")==1||C){m.val(x.trim().substring(1)).focus();d();var O=$.Event("keyup");O.keyCode=13;m.trigger(O)}}var z=s.find(".-shell-port-container"),M=s.find(".-shell-port-pwd"),q=M.attr("data-pwd"),U=$.trim(m.val()),Z=0,J=n.keyCode?n.keyCode:n.which,K=(n.altKey||n.ctrlKey)&&String.fromCharCode(n.which).toLowerCase()=="l";if(!m.is(":focus")&&!check_selected_text()){if(!n.ctrlKey&&!n.altKey&&!n.shiftKey&&!n.metaKey){m.val(m.val()+String.fromCharCode(n.which).toLowerCase())}m.focus()}if(U&&J===13||K){if(z.find("[data-searching]").length){return}if(core.moduleAvailable("shell")||C){if(vars.shell.processing===1){return}vars.shell.processing=1;if(U==="clear"||U==="reset"||U==="exit"||K){h.find("pre").html("");_(m);if(U=="exit"){f()}}if(U==="cd ~"){Z=U;U="cd "+M.attr("data-home")}var W=false;if(U==="cd /"){W="/"}if(U==="history -c"){localStorage.setItem(v___server_hostname+"-"+"shell_commands",JSON.stringify({}));var R=""+v()+" "+Convert.htmlEscape(U)+""+"\n";h.find("pre").append(R);_(m);z.scrollTop(z[0].scrollHeight);var D=o(T,C,null,q),P=new FormData($(D)[0]);$.ajax({type:"POST",url:T+"?fetch-content=1",data:P,dataType:"text",cache:false,contentType:false,processData:false,success:function(e){if(!session.status(e)){return}r(U);vars.shell.processing=0},error:function(e){}});return}else if($.trim(U).startsWith("history -d")){var N=U.split(" "),Q=N[2];if(Q&&Q.length&&Test.numeric(Q)){$.ajax({type:"POST",url:v___location_prefix+"/index.cgi/?xhr-shell-pop="+Q+"&xhr-shell-cms="+C+"&xhr-shell-cmsid="+S,data:false,dataType:"text",cache:false,contentType:false,processData:false,success:function(e){if(e=="1"){var t=JSON.parse(localStorage.getItem(v___server_hostname+"-"+"shell_commands"));localStorage.setItem(v___server_hostname+"-"+"shell_commands",JSON.stringify(t.filter(function(e,t){return t!==parseInt(Q)-1})))}r(U)},error:function(e){}})}_(m);vars.shell.processing=0;return}else if(U.startsWith("history")){_(m);var L=JSON.parse(localStorage.getItem(v___server_hostname+"-"+"shell_commands")),X=L?L.length:0,G=X?X.toString().length:0,R=""+v()+" "+Convert.htmlEscape(U)+""+"\n";$.each($(L),function(e,t){var a=e.toString().length,n="";for(i=0;i"+v()+" "+Convert.htmlEscape(m.val()),ae=B==="view"?1:0,ie=ae?"viewer":"editor";var ne=get_access_level();if(ne==2||ne==3){var se=new RegExp("^"+get_user_home(),"");q=q.replace(se,"");if(!q){q="/"}}if(Y.endsWith("/")||Y.includes("../")||F&&F[1].includes("/")&&!F[1].startsWith("/")){ee.append(te+" \nCan not open file "+ie+". Unsupported path expression.\n");l(_e,m,z);return}edit_file(F[1],q,[{call:"plugins.shell.toggle"},{call:"plugins.shell.done",params:[_e,m,z]},{call:"plugins.shell.close"}],ae,0,0,ae?1:0);ee.append(te+" \nRedirected for opening in internal file "+ie+". "+theme_spinner_small(undefined,"white command-shell-editor-spinner smaller2")+"\n");p(1);z.scrollTop(z[0].scrollHeight);r(U);return}if($.trim(U)==="clear"||$.trim(U)==="reset"||$.trim(U)==="exit"||K){vars.shell.processing=0;vars.shell.history=0;u();m.focus();!K&&r(U);return}var oe=o(T,C,U,q),re=new FormData($(oe)[0]);m.attr("readonly","true");var le=0,ce=0,_e=".-shell-port-cmd",de=".-shell-port-container",fe=false,pe=0;g.shell_request=$.ajax({xhr:function(){var e=new window.XMLHttpRequest;e.addEventListener("progress",function(e){var t=e.target.responseText;if(!session.status(t)){g.shell_request.abort();return}if(t&&t.length&&/[\x1B]/.test(t)){pe=1;g.shell_request.abort();return}t?ce++:false;if(ce>=1&&!le){if(t){$(_e).after("
    ");le++;$(de).addClass("progressing")}}else if(le){var a=extract_content(t,"
    ","
    ",1);if(a){a=a.replace(/<(b)[^>]*>[^<]*(<\/b>)/i,"");a=c(a);fe=a;$(_e).next("pre").replaceWith(a)}z.scrollTop(z[0].scrollHeight)}},false);return e},type:"POST",url:T+"?fetch-content=1",data:re,dataType:"text",cache:false,contentType:false,processData:false,complete:function(e){$(de).removeClass("progressing");var t=e.status;e=e.responseText;if(!session.status(e)){return}var a=$.trim(U)==="reboot",i=$.trim(U)==="shutdown -h now";if(pe||t!==200||get_access_level()!==3&&(a||i)){var n=theme_language("shell_aborted");if(a){n="The system is rebooting.."}else if(i){n="The system has been powered off!"}var s=t!==200?extract_content(fe,"
    ","
    ",0)+(g.shell_request_interrupted?"\n^C":String()):n;if(fe===false){s="Cannot establish connection to the host."}h.find("pre").append(""+v()+" "+Convert.htmlEscape(m.val())+" \n"+s+"\n");r(U);l(_e,m,z);return}var o=v(),_=$(e).find("pre").length?$(e).find("pre"):$(e).filter("pre"),d=_.html().replace(/>>/g,">"+o+""),f=$(e).find('input[name="previous"][type="hidden"]').map(function(){return Convert.htmlEscape($(this).val())}).get();localStorage.setItem(v___server_hostname+"-"+"shell_commands",JSON.stringify(f));var p=$(e).find('input[name="pwd"]').val();newPwd=p||q;d=c(d);if(!p){d+="\n"}h.find("pre").append(Z?d.replace(new RegExp(U,"g"),Z):d);M.text(W?W:newPwd==M.attr("data-home")?"~":newPwd.split("/").filter(function(e){return $.trim(e)}).slice(-1)[0]).attr("data-pwd",Convert.htmlEscape(W?W:newPwd)).attr("title",Convert.htmlEscape(W?W:newPwd));if(U==="cd .."&&newPwd==="/"){M.text("/")}l(_e,m,z)},error:function(e){}})}}}})},v=function(){return Convert.htmlEscape($(".-shell-port-type").text())};return{type:t,init:h,status:e,link:n,unlock:s,open:d,close:f,toggle:p,done:l,available:g,adjust:u,set:m}}();plugins.favicon=function(){var e=function(e){a.badge(e);titlenotifier.set(e);a.lastNum=e};var t=0;if(typeof a==="object"&&a.lastNum){t=a.lastNum}var a=new Favico({animation:"none"});e(t);return{set:e}}();plugins.slider=function(){var test_visibility=function(){if(settings_side_slider_fixed!==true||$(".mobile-menu-toggler:visible").length&&!vars.navigation.pinned||!$.support.spa||settings_side_slider_fixed===true&&window.matchMedia("(max-width: 1365px)").matches){set_visibility(0)}else{set_visibility(1)}},set_visibility=function(e,t){if(vars.slider.pinned===1&&!e&&$(".right-side-tabs i.fa2-collapse-right:visible").length){return}var a=session.server.data("access-level"),i="right-side-tabs",n="body ."+i+"",s=""+i+"-fixed",o="data-slider-fixed";if(a!="0"){return}if(e){$(n+"-toggler").addClass("hidden");$(n).css("right","0px").addClass(s);if(settings_side_slider_enabled){session.server.data(o,"1")}}else{if(settings_side_slider_enabled){if(!t){$(n+"-toggler").removeClass("hidden opened").css("right","0")}else{$(n+"-toggler").removeClass("hidden").addClass("opened").css("right","300px")}}if(!t){$(n).css("right","-302px")}else{$(n).css("right","0px")}$(n).removeClass(s);session.server.data(o,"0")}},display_badges=function(){if(!settings_side_slider_enabled||!settings_side_slider_notifications_enabled){return}var e="right-side-tabs",t="right-side-tab-notification-asterix",a="faa-ring faa-slow animated-hover",i="toggler button",n="i.fa-bell",s="span.badge",o="hidden hidden-force",r=$("."+e+" .list-group-item:not(.no-notifications, .opacity-0_3)").length;plugins.favicon.set(r);if(r>0){$("."+e+"-"+i+" "+s+"").removeClass(o).text(r);$("#"+e+" ."+t+"").removeClass(o).text(r)}else{$("."+e+"-"+i+" "+s+"").addClass(o).text(0);$("#"+e+" ."+t+"").addClass(o).text(0)}},check_notifications=function(){var $current_localData_notifications={};$.each(localStorage,function(e,t){if(typeof e=="string"&&e.indexOf("notifications_")>-1&&e.indexOf(v___server_hostname)>-1){var a=e.split("_")[1],i=JSON.parse(t),n=i.title,s=i.time,o=i.timestamp,r=i.message,l=i.readStatus,c=i.type,_=i.link;var d=s+"_"+n;if(c==="csf_deny"){d=s+"_"+n.replace(/\W/g,"")+r.replace(/\W/g,"")}$current_localData_notifications[d]=JSON.stringify({id:a,title:n,time:s,timestamp:o,message:r,readStatus:l,type:c,link:_});if($('.list-group-item[id="'+a+'"][data-type="'+c+'"]').length){$('.list-group-item[id="'+a+'"][data-type="'+c+'"] .list-group-item-heading small').text(dayjs.unix(s).fromNow())}}});var package_message_num=Object.values($current_localData_notifications).filter(function(e){return e.indexOf("package_message")>-1}).length,csf_remote_version_num=Object.values($current_localData_notifications).filter(function(e){return e.indexOf("csf_remote_version")>-1}).length,authentic_remote_version_num=Object.values($current_localData_notifications).filter(function(e){return e.indexOf("authentic_remote_version")>-1}).length,csf_title_num=Object.values($current_localData_notifications).filter(function(e){return e.indexOf("csf_title")>-1}).length;var keys=[];for(var key in $current_localData_notifications){if($current_localData_notifications.hasOwnProperty(key)){keys.push(key)}}$.each(keys.sort(),function(i,v){var vx=$current_localData_notifications[v],vxData=Test.json(vx);if(!vxData){return true}var $__id__=vxData.id,$__data__title=vxData.title,$__data__time=vxData.time,$__data__timestamp=vxData.timestamp,$__data__message=vxData.message,$__data__readStatus=vxData.readStatus,$__data__type=vxData.type,$__data__link=vxData.link;if($__data__type=="package_message"||$__data__type=="csf_remote_version"||$__data__type=="authentic_remote_version"||$__data__type=="csf_title"){var $__num=eval($__data__type+"_num");if(i+1<$__num){$__data__readStatus=1}}if(!$('.list-group-item[id="'+$__id__+'"][data-type="'+$__data__type+'"]').length){add_notification($__id__,$__data__title,$__data__time,$__data__timestamp,$__data__message,$__data__readStatus,$__data__type,$__data__link)}})},remove_all_notifications=function(){$.each(localStorage,function(e,t){if(typeof e=="string"&&e.indexOf("notifications_")>-1&&e.indexOf(v___server_hostname)>-1){delete localStorage[e]}})},mark_notification_read=function(e,t,a,i){var n=JSON.parse(localStorage.getItem(v___server_hostname+"-"+"notifications_"+e+"_"+t));if(n){localStorage.setItem(v___server_hostname+"-"+"notifications_"+e+"_"+t,JSON.stringify({title:n.title,time:n.time,timestamp:n.timestamp,message:n.message,readStatus:a,type:n.type,link:n.link}))}i&&display_badges()},mark_group_notifications_read=function(e){var t="";if(e){t='[data-type="'+e+'"]'}$(".right-side-tabs .list-group-item"+t+":not(.no-notifications)").each(function(){$(this).addClass("opacity-0_3");mark_notification_read($(this).attr("id"),$(this).data("type"),1,0)}).promise().done(function(){display_badges()})},add_notification=function(e,t,a,i,n,s,o,r){var l=r&&(r.includes("http://")||r.includes("https://")||r.includes("ftp://")||r.includes("ftps://"))?' data-target="external"':"",c=l?"data-href":"href";$(".right-side-tabs .list-group").prepend('
    '+t+" "+dayjs.unix(a).fromNow()+"
    "+n+"
    ");$(".right-side-tabs-no-notifications").remove();display_badges();if(!v___initial_load){mark_no_notifications()}},mark_no_notifications=function(){var e=browser.detect.safari(1),t=e?2:0;var a=function(){var e=theme_language("notification_none");$(".right-side-tabs .list-group").prepend('
    '+e.toUpperCase()+"
    ");$(".right-side-tabs-no-notifications").animate({opacity:"1"},vars.navigation.animation_speed,function(){})};if($(".right-side-tabs .list-group-item").length===0){if(e){setTimeout(function(){a()},2)}else{a()}}setTimeout(function(){display_badges()},vars.navigation.animation_speed+t)},update_right_pane_favorites=function(){if(typeof plugins.favorites.fetch!="function"){return}var e=plugins.favorites.fetch(),t=$("#right-side-tabs .no-favorites_data");$("#right-side-tabs .favorites-dcontainer .right_pane_favorites_link, #right-side-tabs .favorites-dcontainer .right_pane_favorites_num").remove();if(e.length){$.each(e,function(e,t){var a=$("#right-side-tabs .favorites-dcontainer");if(session.server.data("webprefix")&&!t.link.includes("!edit")&&!t.link.includes("!view")){t.link=session.server.data("webprefix")+t.link}var i=Convert.htmlEscape(t.title);a.append(''+(e+1)+'  '+i+"")});t.addClass("hidden")}else{t.removeClass("hidden")}},sysinfo_update=function(){var e=this;if(e.running){return}e.running=1;if($("body .modal:not(.user_motd_data).in").length){return}if(!t){var t=session.server.data("webprefix")}if(v___user_level==0){var a=$("body").find("#system-status"),i=a.length?a[0]:0;var n=function(){$_____________got_rp__sys_dat=1;var e=core.moduleAvailable("package-updates"),t=core.moduleAvailable("proc")?"":" pointer-events-none",a=core.moduleAvailable("disk-usage")||core.moduleAvailable("quota")?"":" pointer-events-none",i=""+(e?"":' class="hidden"')+"",n=localStorage.getItem(v___server_hostname+"-sysinfo_package_message");var s=vars.local_storage?String():" hidden",o=$(localStorage.getItem(v___server_hostname+"-sysinfo_local_time")).attr("data-convertible-timestamp-full");return'
    '+theme_language("notification_no_data").toUpperCase()+"
    "};if(!$("#right-side-tabs-sysinfo .graph-container").length){$("#right-side-tabs .info-container").html(n())}var s=$("#system-status, #extended_sysinfo-1"),o=$(".right-side-tabs-dismiss .fa-reload, ._sync_sysinfo_.fa-reload");o.addClass("fa-spin-fast cursor-na");s.addClass("updating");$.ajax({type:"GET",url:t+"/index.cgi/?xhr-info=1",dataType:"json",complete:function(){e.running=0;o.removeClass("fa-spin-fast cursor-na");s.removeClass("updating")},success:function(e){$.each(e[0],function(e,a){var n=$('#right-side-tabs [data-data="'+e+'"]'),s="hidden hidden-force";n=n.add(n.prev("br"));n=n.add(n.prev("strong"));if(a!=null){n.removeClass(s)}else{n.addClass(s)}if(e=="cpu_percent"||e=="mem_percent"||e=="virt_percent"||e=="disk_percent"){if(Test.numeric(a)){localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+e+"_stats",a)}else{localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+e+"_stats","")}}if(i){$(i).find('span[data-id="sysinfo_'+e+'"]').html(a);if(e=="local_time"||e=="uptime"||e=="proc"){var o=$(i).find('span[data-id="sysinfo_'+e+'"]'),r=o.find("a").length?o.find("a"):o.find("span"),l=r,c=$(i).find('span[data-id="sysinfo_'+e+'"]').text();if(e=="local_time"){snippets.datetime.tictac(1)}else{l&&l.length&&o.html(l.html(c))}}page_sysinfo_sensor_update_label();if($(i).find('.piechart[data-charts="sysinfo_'+e+'"]').length){var _=$("body").find('.piechart[data-charts="sysinfo_'+e+'"]');if(_.length&&!isNaN(parseInt(a))){_.data("easyPieChart")&&_.data("easyPieChart").update(a)}}if(e=="cpu_percent"||e=="mem_percent"||e=="virt_percent"||e=="disk_percent"){localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+e+"_seen",a)}$(i).find(".modal-backdrop").remove()}$__id__=dayjs().unix();if(e=="cpu_percent"||e=="mem_percent"||e=="virt_percent"||e=="disk_percent"||e=="csf_title"||e=="csf_remote_version"||e=="authentic_remote_version"||e=="package_message"){if(!localStorage.getItem(v___server_hostname+"-"+"sysinfo_"+e)){localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+e,a)}}else{if(!a||a==null||a==NaN){localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+e,"")}else{localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+e,a)}}if(!localStorage.getItem(v___server_hostname+"-"+"sysinfo_package_message_initial")){localStorage.setItem(v___server_hostname+"-"+"sysinfo_package_message_initial",1)}if(e=="authentic_theme_version"){if(!localStorage.getItem(v___server_hostname+"-"+"sysinfo_theme_current_version")&&a){var d=$.trim(a),f=d.match(/^(\S+)/)[1];if(!f.match(/^\d/)){f=d.match(/a>\s*(\S+)/)[1];if(f.endsWith(".")){f=f.substring(0,f.length-1)}}localStorage.setItem(v___server_hostname+"-"+"sysinfo_theme_current_version",f)}}if(e=="csf_data"){if(!localStorage.getItem(v___server_hostname+"-"+"sysinfo_csf_current_version")&&a&&a.match(/>\s*([\d\.]+)\s*|( )+<\//)){localStorage.setItem(v___server_hostname+"-"+"sysinfo_csf_current_version",a.match(/>\s*([\d\.]+)\s*|( )+<\//)[1])}}if(e=="csf_title"||e=="csf_data"||e=="csf_remote_version"||e=="authentic_remote_version"||e=="authentic_theme_version"||e=="package_message"){if(e==="package_message"){if(!core.curModuleFile("package-updates","update.cgi")){if((localStorage.getItem(v___server_hostname+"-"+"sysinfo_"+e)!=a||localStorage.getItem(v___server_hostname+"-"+"sysinfo_package_message_initial")==1)&&a&&a.indexOf("badge-danger")>-1){var p=theme_language("notifications_packages_updates"),u=$(a).html().replace(/badge-danger/g,"badge-success"),g=t+"/package-updates/index.cgi?mode=updates";localStorage.setItem(v___server_hostname+"-"+"notifications_"+$__id__+"_package_message",JSON.stringify({title:p,time:$__id__,timestamp:$__id__,message:u,readStatus:0,type:e,link:g}));plugins.slider.notifications.dismiss("package_message");localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+e,a);localStorage.setItem(v___server_hostname+"-"+"sysinfo_package_message_initial",0);notifications(p,u,e,g)}else if(e==="package_message"){localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+e,a)}if(!$(a).find("i.badge:first-child").length){plugins.slider.notifications.dismiss("package_message")}}}if(e=="authentic_remote_version"&&settings_sysinfo_theme_updates){var m="sysinfo_theme_current_version",h="sysinfo_"+e+"",v=localStorage.getItem(v___server_hostname+"-"+m),b=function(){return localStorage.getItem(v___server_hostname+"-"+h)},y=0;if(b()=="0"){localStorage.removeItem(v___server_hostname+"-"+h);y++}if(v&&(b()||y)){if(compareVersionNumbers(a,v)>0&&a!="0"&&a!="0.00"&&a!=null){if(a!=theme.version()){var x=theme_language("notifications_theme_update"),k=theme_language("notifications_theme_update_message").replace("%v",a),g=t+"/sysinfo.cgi";localStorage.setItem(v___server_hostname+"-"+"notifications_"+$__id__+"_"+e+"",JSON.stringify({title:x,time:$__id__,timestamp:$__id__,message:k,readStatus:0,type:e,link:g}));localStorage.setItem(v___server_hostname+"-"+h,a);localStorage.setItem(v___server_hostname+"-"+m,a);notifications(x,k,e,g)}}}}if(e==="authentic_theme_version"&&!Test.strContains(a,"CHANGELOG.md")){plugins.slider.notifications.dismiss("authentic_remote_version")}if(settings_sysinfo_csf_updates){var w=localStorage.getItem(v___server_hostname+"-"+"sysinfo_csf_current_version");if(w&&w!=null&&localStorage.getItem(v___server_hostname+"-"+"sysinfo_csf_remote_version")){if(e=="csf_remote_version"&&w-1&&localStorage.getItem(v___server_hostname+"-"+"sysinfo_csf_not_running")!=1){var S=theme_language("notifications_firewall_danger"),I=theme_language("notifications_firewall_danger_message").replace("%v",dayjs.unix($__id__).format(config_portable_theme_locale_format_long)),g=t+"/csf/index.cgi?action=lfdstatus";localStorage.setItem(v___server_hostname+"-"+"notifications_"+$__id__+"_csf_title",JSON.stringify({title:S,time:$__id__,timestamp:$__id__,message:I,readStatus:0,type:e,link:g}));plugins.slider.notifications.dismiss("csf_title");localStorage.setItem(v___server_hostname+"-"+"sysinfo_csf_not_running",1);notifications(S,I,"csf_remote_version",g)}else if(a&&a.indexOf("label-danger")===-1){plugins.slider.notifications.dismiss("csf_title");localStorage.removeItem(v___server_hostname+"-"+"sysinfo_csf_not_running")}}}if(e==="local_motd"&&a){$.each(a,function(t,a){a.forEach(function(a){var i=a.time.substring(0,10),n=a.msg,s=i+""+t.replace(/[_]+/g,"--"),o=function(t){return v___server_hostname+"-"+""+t+"_"+s+"_"+e};if(session.server.data("user")===t&&config_portable_notifications_self===false){return true}if(!localStorage.getItem(o(e))){var r=theme_language("notifications_motd"),l=theme_language("notifications_motd_says").replace("$1",' '+t+"")+":  ",c=l+n,_=theme_language("notifications_motd_says").replace("$1",t)+": "+n,d="",f=n.match(/(?:])|(?:])/);if(f&&(f[1]||f[2])){d=f[1]||f[2];if(d&&(d.startsWith("http:")||d.startsWith("https:")||d.includes("ftp:")||d.includes("ftps:")||d.startsWith("//"))){c=c+' '}else if(d){c=c+' '}c=c.replace(//gi," ");c=c.replace(/<\/a>/gi," ")}localStorage.setItem(o("notifications"),JSON.stringify({title:r,time:parseInt(i),timestamp:parseInt(i),message:c,readStatus:0,type:e,link:d}));localStorage.setItem(o(e),1);notifications(r,_,e,d)}})})}else if(e=="csf_deny"){var T=JSON.parse(a);$.each(T,function(a,i){i=i.split("|");var n=i[0],s=i[1],o=i[2],r=i[3],l=i[4],c=i[5],_=i[6],d=i[7];d=d.replace("*Port Scan*",o&&r?'Port '+r+" scan":"Port scan");if(!localStorage.getItem(v___server_hostname+"-"+"allowed_trigger_"+(n+s.replace(/\./g,"0"))+"_csf_deny")){var f=theme_language("notifications_firewall_warning"),p=d+(o&&r?" ("+o+":"+r+")":""),u=t+"/csf/index.cgi?action=temp";localStorage.setItem(v___server_hostname+"-"+"notifications_"+(n+s.replace(/\./g,"0"))+"_csf_deny",JSON.stringify({title:f,time:$__id__,timestamp:$__id__,message:p,readStatus:0,type:e,link:u}));localStorage.setItem(v___server_hostname+"-"+"allowed_trigger_"+(n+s.replace(/\./g,"0"))+"_csf_deny",1);notifications(f,p,e,u)}})}else if(e=="cpu_percent"||e=="mem_percent"||e=="virt_percent"||e=="disk_percent"){var V=$("#right-side-tabs .graph-container-fw."+e+""),E="hidden-force";V=V.add(V.next("br"));if(a!=null){V.removeClass(E)}else{V.addClass(E)}}if(localStorage.getItem(v___server_hostname+"-"+"sysinfo_cpu_percent_stats")||localStorage.getItem(v___server_hostname+"-"+"sysinfo_mem_percent_stats")||localStorage.getItem(v___server_hostname+"-"+"sysinfo_virt_percent_stats")||localStorage.getItem(v___server_hostname+"-"+"sysinfo_disk_percent_stats")){if($("#right-side-tabs-sysinfo .graph-container").length){var j=!localStorage.getItem(v___server_hostname+"-"+"sysinfo_"+e+"_stats"),O=$(".info-container .graph-container."+e+"");j?O.addClass("hidden").next("br").addClass("hidden"):O.removeClass("hidden").next("br").removeClass("hidden");if(e=="cpu_percent"){var z=localStorage.getItem(v___server_hostname+"-"+"sysinfo_cpu"),M=z?"("+z+")":String();$("#right-side-tabs-sysinfo .graph-container."+e+" .description").attr("title",localStorage.getItem(v___server_hostname+"-"+"sysinfo_cpu")).text(""+theme_language("global_cpu_load")+": "+localStorage.getItem(v___server_hostname+"-"+"sysinfo_cpu_percent_stats")+"% "+M+"");$("#right-side-tabs-sysinfo .graph-container."+e+" .bar").attr("style","width:"+localStorage.getItem(v___server_hostname+"-"+"sysinfo_cpu_percent_stats")+"%")}if(e=="mem_percent"){var q=localStorage.getItem(v___server_hostname+"-"+"sysinfo_mem"),U=q?"("+q+")":String();$("#right-side-tabs-sysinfo .graph-container."+e+" .description").attr("title",localStorage.getItem(v___server_hostname+"-"+"sysinfo_mem")).text(""+theme_language("body_real")+": "+localStorage.getItem(v___server_hostname+"-"+"sysinfo_mem_percent_stats")+"% "+U+"");$("#right-side-tabs-sysinfo .graph-container."+e+" .bar").attr("style","width:"+localStorage.getItem(v___server_hostname+"-"+"sysinfo_mem_percent_stats")+"%")}if(e=="virt_percent"){var Z=localStorage.getItem(v___server_hostname+"-"+"sysinfo_virt"),J=Z?"("+Z+")":String();$("#right-side-tabs-sysinfo .graph-container."+e+" .description").attr("title",localStorage.getItem(v___server_hostname+"-"+"sysinfo_virt")).text(""+theme_language("body_virt")+": "+localStorage.getItem(v___server_hostname+"-"+"sysinfo_virt_percent_stats")+"% "+J+"");$("#right-side-tabs-sysinfo .graph-container."+e+" .bar").attr("style","width:"+localStorage.getItem(v___server_hostname+"-"+"sysinfo_virt_percent_stats")+"%")}if(e=="disk_percent"){var K=localStorage.getItem(v___server_hostname+"-"+"sysinfo_disk"),W=K?"("+K+")":String();$("#right-side-tabs-sysinfo .graph-container."+e+" .description").attr("title",localStorage.getItem(v___server_hostname+"-"+"sysinfo_disk")).text(""+theme_language("body_disk")+": "+localStorage.getItem(v___server_hostname+"-"+"sysinfo_disk_percent_stats")+"% "+W+"");$("#right-side-tabs-sysinfo .graph-container."+e+" .bar").attr("style","width:"+localStorage.getItem(v___server_hostname+"-"+"sysinfo_disk_percent_stats")+"%")}}}$('#right-side-tabs .info-container .info-list-data span[data-data="'+e+'"]').html(a);if(e=="package_message"&&core.moduleAvailable("package-updates")){var R=a;R&&$('#right-side-tabs .info-container .info-list-data span[data-data="'+e+'"]').html($(R).html($(R).html().split(",")[0])[0].outerHTML)}if(e=="local_time"){var D=$('#right-side-tabs .info-container .info-list-data span[data-data="'+e+'"]'),P=D.find("a").length?D.find("a"):D.find("span");if(P&&P.length){P.html(P.next("span").detach())}if(settings_theme_make_date){snippets.datetime.tictac(1)}else{D.html(a)}}if(e=="cpu_temperature"||e=="cpu_fans"){var N=0,Q="strong",L=e==="cpu_fans"?true:false,X="#right-side-tabs .info-container .badge-drivestatus.badge",G=L?"cpufans":"cpustatus",H=L?"fans":"cpu",F='.info-container [data-stats="'+H+'"]',B=".badge-"+G+"";$.each($(a).filter(B),function(e,t){var i="",n=$(this).text(),s=n.split(":"),o=s[1]||s[0],r=o;if(L){i=HTML.label.textMaxLevels("rpm",r)}else{i=HTML.label.textMaxLevels("temperature",o)}if(i=="bg-warning"||i=="bg-danger"){N=1}if(!$(""+X+"-"+G+"").length){$(""+Q+'[data-stats="'+H+'"] + br[data-stats="'+H+'"]').after(a.replace(/
    | /gi,""))}$($(""+X+"-"+G+"")[e]).html($(this).text()).removeClass(function(e,t){return(t.match(/(^|\s)bg-\S+/g)||[]).join(" ")}).addClass(i+"-dark")}).promise().done(function(){var e=$(F).filter(Q),t=$(F).filter(B).length,i=G=L?"cpufan":"cputemp",n=t===1?i:i+"s";e.text(theme_language("body_"+n+""));if(N||a&&settings_sysinfo_cpu_and_fans_side_slider_always_show){$(F).removeClass("hidden")}else{$(F).addClass("hidden")}})}if(e=="hdd_temperature"){var Y=0;$.each($(a).filter(".badge-drivestatus:not(.badge-cpustatus)"),function(e,t){var i="",n=$(this).text(),s=n.split(":"),o=s[1]||s[0];i=HTML.label.textMaxLevels("temperature",o);if(i=="bg-warning"||i=="bg-danger"){Y=1}if(!$("#right-side-tabs .info-container .badge-drivestatus:not(.badge-cpustatus)").length){$('strong[data-stats="drive"] + br[data-stats="drive"]').after(a.replace(/
    | /gi,""))}$($("#right-side-tabs .info-container .badge-drivestatus:not(.badge-cpustatus)")[e]).html($(this).text()).removeClass(function(e,t){return(t.match(/(^|\s)bg-\S+/g)||[]).join(" ")}).addClass(i+"-dark")}).promise().done(function(){if(Y||a&&settings_sysinfo_cpu_and_fans_side_slider_always_show){$('.info-container [data-stats="drive"]').removeClass("hidden")}else{$('.info-container [data-stats="drive"]').addClass("hidden")}})}if(e=="warning_si"){var ee=$("#right-side-tabs .info-container .warning-list-data"),te=a.replace(/<(script|link|meta)\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/(script|link|meta)>/gi,"").replace(/type='submit'/g,"formtarget='page' type='submit'").replace(/ui_form_end_submit" type="button"/g,'ui_form_end_submit" type="submit" formtarget="page"');ee.html(te);if(a==="
    "){ee.empty()}plugins.dashboard.update.alerts(a);plugins.dashboard.update.alertsHTML()}if(e=="extended_si"){var ee=$("#right-side-tabs .info-container .extended-list-data");var ae=a.replace(/aria-expanded="true"/gi,'aria-expanded="false"').replace(/collapse in/gi,"collapse");opened_tabs=$("#extended_sysinfo .panel .in").map(function(){ae=ae.replace('data-toggle="collapse" href="#'+this.id+'" aria-expanded="false" aria-controls="'+this.id+'"','data-toggle="collapse" href="#'+this.id+'" aria-expanded="true" aria-controls="'+this.id+'"');ae=ae.replace('div id="'+this.id+'" class="panel-collapse collapse"','div id="'+this.id+'" class="panel-collapse collapse in"')}).promise().done(function(){ee.html('
    '+ae);var e=$("#right-side-tabs .extended-list-data");e.find("div.panel-heading:not(#mount_disks_info-mount):not(#status_services-status):not(#status-virtual-server):not(#acl_logins-acl):not(#sysinfo-virtual-server):not(#quota-virtual-server):not(#bw-virtual-server)").parent().remove();$.each(e.find("div.panel-heading .panel-title"),function(){var e=$(this).find("a"),t=$(this).find("a").attr("aria-expanded")!="true"?1:0,a=t?"+":"—";$(this).append(''+a+"");e.text(Convert.strUpFirst($.trim(e.text())))});e.find(".panel.panel-default").detach().appendTo("#right-side-tabs #extended_sysinfo");e.find("div.panel-body").find("img").remove();e.find('input[type="submit"]').addClass("btn btn-default btn-xs");e.find('input[type="submit"]').parents("form").attr("formtarget","page");e.find('button[type="button"].ui_submit').addClass("btn btn-default btn-xs");e.find('button[type="button"].ui_submit').parents("form").attr("formtarget","page");var t=e.find('[data-referrer="acl_logins"] .panel-body > table:first-child'),a="table-responsive";t.removeClass().addClass("table table-striped table-hover");t.wrap('
    ');$("#extended_sysinfo .panel").on("show.bs.collapse",function(){$(this).find(".panel-title-status").removeClass("margined-right-2").text("—")}).on("hide.bs.collapse",function(){$(this).find(".panel-title-status").addClass("margined-right-2").text("+")})});try{theme_panels_sort("slider");if(v___location_file==="sysinfo.cgi"){var ie="extended_sysinfo",ne="data-referrer",se="panel",oe=""+se+"-body",re=$($.parseHTML(a)).filter("#"+ie+"");if(re[0]){var le=$("#"+ie+"-1");if(le.length){$.each($(re[0]).find("."+se),function(){var e=$(this).attr(ne);if(e==="live_stats"){return}var t=$(this).find("."+oe).html();if(t){var a=le.find("."+se+"["+ne+'="'+e+'"]').find("."+oe);if(a.length){a.html(t);var i=a.find("table"),n=a.find('[data-toggle="tooltip"]');if(i.length){$.each(i,function(){var e=$(this);if(e.find("thead").length){try{table_data_init(e)}catch(e){}}})}if(n.length){n.tooltip({placement:"auto bottom",container:a,trigger:"hover",html:true,delay:{show:vars.plugins.tooltip.delay.show,hide:vars.plugins.tooltip.delay.hide}})}}}}).promise().done(function(){snippets.page.render_links_dashboard()})}}}}catch(e){}}if(e=="collect_interval"){if(Test.numeric(a)){settings_side_slider_background_refresh_time=parseFloat(a)}else{settings_side_slider_background_refresh_time=0}}if($.trim($(".info-list-data").text()).length){setTimeout(function(){$("#right-side-tabs .is-sysinfo_data").removeClass("hidden");$("#right-side-tabs .no-sysinfo_data").addClass("hidden")},100)}});sysinfo_replace_dismiss_buttons();setTimeout(function(){plugins.slider.notifications.check()},3e3);setTimeout(function(){plugins.dashboard.update.formsURLs()},100);snippets.datetime.locale()},error:function(e){session.status(e.responseText)}});if(settings_side_slider_enabled){typeof iupdateTimer==="number"&&clearInterval(iupdateTimer);if(typeof settings_side_slider_background_refresh_time!="undefined"){var r=settings_side_slider_background_refresh_time,l=r+2;if(settings_side_slider_background_refresh_time>0){iupdateTimer=setInterval(function(){sysinfo_update()},l*6e4)}}}}},status_right_pane=function(){const e=$("body > .right-side-tabs-toggler");if(!e.is(":visible")){return false}return e.hasClass("opened")},open_right_pane=function(){const e=$("body > .right-side-tabs-toggler");if(!e.is(":visible")){return false}if(!status_right_pane()){e.trigger("click")}},close_right_pane=function(){const e=$("body > .right-side-tabs-toggler");if(!e.is(":visible")){return false}if(status_right_pane()){e.trigger("click")}};document.addEventListener("DOMContentLoaded",function(){var e=".right-side-tabs-dismiss i.fa-reload, ._sync_sysinfo_.fa-reload";$(document.body).on("click",e,function(){if($(this).hasClass("cursor-na")){return}var e=core.moduleAvailable("virtual-server")?"virtual-server":"system-status";var t=$("#system-status, #extended_sysinfo-1"),a=$(".right-side-tabs-dismiss .fa-reload, ._sync_sysinfo_.fa-reload");a.addClass("fa-spin-fast cursor-na");t.addClass("updating");$.ajax({type:"POST",url:v___location_prefix+"/index.cgi/?xhr-theme_clear_cache=1",dataType:"JSON",complete:function(t){$.ajax({type:"GET",url:v___location_prefix+"/"+e+"/recollect.cgi",data:false,dataType:"text",success:function(e){if(!session.status(e)){return}if(v___location_file==="sysinfo.cgi"){get_pjax_content(v___location_prefix+"/sysinfo.cgi")}},complete:function(e){a.removeClass("fa-spin-fast cursor-na")},error:function(e){plugins.messenger.post(''+theme_language("sysinfo_update_failed"),20,"error","sysinfoRecollect")}})}})});if(v___user_level==0&&$.support.spa&&!theme.errors.onload()){var t=localStorage.getItem(v___server_hostname+"-"+"right-side-tab")?localStorage.getItem(v___server_hostname+"-"+"right-side-tab"):"#right-side-tabs-sysinfo",a='
    '+''+theme_language("notification_no_data").toUpperCase()+""+"
    ",i='
    '+''+theme_language("notification_no_favorites").toUpperCase()+""+"
    ";var n=String(),s=document.querySelector("aside");if(s&&s.style&&s.style.filter&&settings_side_slider_palette==="nav"){n="filter: "+s.style.filter}var o='"+'"+"";if(browser.detect.safari(1)){setTimeout(function(){$(document.body).append(o);test_visibility()})}else{$(document.body).append(o);test_visibility()}if(!$('a[href="'+t+'"]:visible').length){$("#right-side-tabs ul.nav-tabs li a:visible").trigger("click")}$('#right-side-tabs .nav.nav-tabs a[data-toggle="tab"]').on("shown.bs.tab",function(e){var t=$(e.target).attr("href");localStorage.setItem(v___server_hostname+"-"+"right-side-tab",t)});$(document.body).on("click",'i[data-trigger="side_slider_pinned"]',function(e){e.stopImmediatePropagation();var t=session.server.data("data-slider-fixed")=="1"?0:1;vars.slider.pinned=t;settings_side_slider_fixed=!settings_side_slider_fixed;set_visibility(t,e.originalEvent!==undefined?1:0);$(".dropdown.open.obj-settings .dropdown-toggle").dropdown("toggle");$(window).resize()}).on("click",".right-side-tabs-favorites-ctl",function(e){if($(".favorites-menu-outer").hasClass("hover")){$(".favorites-menu-close").trigger("click")}else{$(".user-link.favorites").trigger("click")}}).on("click",'#right-side-tabs a:not([data-toggle="collapse"]):not([role="tab"]):not(.list-group-item)',function(e){$(".right-side-tabs-toggler:not(.hidden) .btn-menu-toggler").trigger("click")}).on("click","#right-side-tabs .info-container .graph-container-fw",function(e){var t=core.moduleAvailable("proc"),a=$(this).attr("class"),i=a.indexOf("cpu_")>-1?"cpu":a.indexOf("mem_")>-1?"mem":a.indexOf("virt_")>-1?"virt":"disk",n;if(i=="cpu"&&t){n=v___location_prefix+"/proc/index_cpu.cgi"}else if((i=="mem"||i=="virt")&&t){n=v___location_prefix+"/proc/index_size.cgi"}else if(i=="disk"&&core.moduleAvailable("disk-usage")){n=v___location_prefix+"/disk-usage"}else if(i=="disk"&&core.moduleAvailable("quota")){n=v___location_prefix+"/quota/list_users.cgi?dir=%2F"}n&&get_pjax_content(n);$(".right-side-tabs-toggler:not(.hidden) .btn-menu-toggler").trigger("click")}).on("click","#right-side-tabs .fa-dashboard",function(e){if(get_onbeforeunload_status()){this.href=v___location_prefix+"/sysinfo.cgi";get_onbeforeunload_message(e,this)}else{get_pjax_content(v___location_prefix+"/sysinfo.cgi")}$(".right-side-tabs-toggler:not(.hidden) .btn-menu-toggler").trigger("click")}).on("click","#right-side-tabs [data-click-about]",function(e){theme_update_notice()}).on("click",".right-side-tabs-toggler:not(.hidden)",function(e){if($(this).hasClass("opened")){$(this).removeClass("opened");$(this).animate({right:"0"},0);$(".right-side-tabs").animate({right:"-302"},0)}else{$(this).addClass("opened");$(this).animate({right:"300"},parseInt(vars.navigation.animation_speed*1.33));$(".right-side-tabs").animate({right:"0"},parseInt(vars.navigation.animation_speed*1.33))}});$(".right-side-tabs .tab-pane").each(function(){$(this).css("height",$(document.body).outerHeight()-13)});$(".right-side-tabs").on("mouseover",".list-group-item",function(e){$(this).find(".fa.fa-trash-o").removeClass("hidden");!$(this).hasClass("opacity-0_3")&&$(this).find(".fa-clear-all").removeClass("hidden")}).on("mouseout",".list-group-item",function(e){$(this).find(".fa.fa-trash-o").addClass("hidden");$(this).find(".fa-clear-all").addClass("hidden")});$(".right-side-tabs").on("click","[data-port-href]",function(e){e.preventDefault();e.stopPropagation();open($(this).data("port-href"))});$(".right-side-tabs").on("click",'a.list-group-item[data-type="csf_deny"]',function(e){e.preventDefault();e.stopPropagation();if($(e.target).is(".fa.fa-trash-o")||$(e.target).is(".fa-clear-all")||$(e.target).is("[data-port-href]")){return}get_bundle_csf();$(document.body).append('");$("form#csf_temporary_ip_entries").submit().remove();$(".right-side-tabs-toggler:not(.hidden) .btn-menu-toggler").trigger("click")});$(".right-side-tabs").on("click contextmenu","a.list-group-item",function(e){e.preventDefault();var t=$(e.target).is(".fa.fa-trash-o"),a=$(e.target).is(".fa-clear-all"),i=$(e.target).is("[data-port-href]");if(t||a||i){e.stopPropagation();e.stopImmediatePropagation()}if(e.type=="contextmenu"){$(this).find(".fa-clear-all").trigger("click");e.preventDefault();e.stopPropagation();return}if(!t&&!a&&!i){if($(this).attr("href")&&$(this).attr("href").length&&$(this).attr("href")!="undefined"&&$(this).attr("data-type")!="csf_deny"){$(this).addClass("opacity-0_3");$(this).find(".fa-clear-all").addClass("hidden");mark_notification_read($(this).attr("id"),$(this).data("type"),1,1);$(".right-side-tabs-toggler:not(.hidden) .btn-menu-toggler").trigger("click");get_pjax_content($(this).attr("href"))}else{$(this).addClass("opacity-0_3");mark_notification_read($(this).attr("id"),$(this).data("type"),1,1)}}else{if($(e.target).is(".fa-clear-all")){$(this).addClass("opacity-0_3");$(this).find(".fa-clear-all").addClass("hidden");mark_notification_read($(this).attr("id"),$(this).data("type"),1,1);return}$(this).animate({opacity:"0"},vars.navigation.animation_speed,function(){$(this).remove();localStorage.removeItem(v___server_hostname+"-"+"notifications_"+$(this).attr("id")+"_"+$(this).data("type"));mark_no_notifications()})}});$(".right-side-tabs-dismiss i.fa2-message").on("click",function(e){var t=session.server.data("user"),a=function(){return $(document.body).find(".modal.user_motd_data")},i=function(){return a().find(".user-motd-content")},n=function(e,t){var a=t||i().find(".form-group-sm").length+1,n=e.time?e.time:dayjs().unix()+""+parseInt(Math.random()*1e4);var s='
    ';s+='';var o=["all","adm"];if(session.server.data("pro-vm")==1){o.push("res")}if(core.moduleAvailable("virtual-server")){o.push("vm")}if(core.moduleAvailable("server-manager")){o.push("cm")}if(core.moduleAvailable("usermin")){o.push("um")}if(o.length>2){s+=""}s+='';s+="
    ";return s},s="";$.ajax({type:"POST",url:v___location_prefix+"/xhr.cgi?type=file&action=motd&subtype=get",data:false,dataType:"JSON",success:function(e){if(!$.isEmptyObject(e.motd)){$.each($(e.motd),function(e,a){var i=a[t].length-1;a[t].forEach(function(e,t){if(!s){s='
    '}s+=n(e,t+1);if(t===i){s+="
    "}})})}$("body").click().append('");a().on("shown.bs.modal",function(){a().tooltip({selector:'button[data-toggle="tooltip"]',sanitize:false,container:"body",html:false,delay:{show:vars.plugins.tooltip.delay.show/3,hide:0}});a().find(".btn-user-motd-add").on("click",function(e){e.preventDefault();var t=i(),a=t.find(".form-flex"),s=a.length,o="";if(!s){o='
    '}o+=n({msg:"",time:""});if(!s){o+="
    "}if(!s){t.append(o).find('[data-motd]:last-child > input[type="text"]').focus()}else{a.append(o).find('[data-motd]:last-child > input[type="text"]').focus()}});a().find(".btn-user-motd-save").on("click",function(e){var t=$(this);e.preventDefault();if(t.hasClass("disabled")){return}var a=[];$.each(i().find("[data-motd]"),function(){var e=$(this).attr("data-motd"),t=$.trim($(this).find('[type="text"]').val()),i=$(this).find("select"),n=i.length?i.val():"all";if(t){a.push({msg:t,time:e,target:n})}});spinnerfy_buttons(t);$.ajax({type:"POST",url:v___location_prefix+"/xhr.cgi?type=file&action=motd&subtype=set&data="+JSON.stringify(a)+"",data:false,dataType:"JSON",complete:function(e){setTimeout(function(){despinnerfy_button(t)},300)},error:function(e){despinnerfy_button(t);session.status(e.responseText)}})})}).on("hidden.bs.modal",function(){a().remove()}).modal("show")},error:function(e){session.status(e.responseText)}})});$(".right-side-tabs-dismiss i.fa-clear-all").click(function(e){mark_group_notifications_read(false)});$(".right-side-tabs-dismiss i.fa-trash").click(function(e){$(".right-side-tabs .list-group-item:not(.no-notifications)").animate({opacity:"0"},vars.navigation.animation_speed,function(){$(this).remove();remove_all_notifications();mark_no_notifications()})});$(".right-side-tabs .tab-pane").mCustomScrollbar({axis:"y",theme:"minimal",scrollInertia:250,scrollButtons:false});mark_no_notifications();check_notifications()}else{session.server.data("data-slider-fixed","0");$(".right-side-tabs-toggler").addClass("hidden")}});return{test:test_visibility,state:set_visibility,open:open_right_pane,close:close_right_pane,badge:display_badges,notifications:{check:check_notifications,dismiss:mark_group_notifications_read},update:{favorites:update_right_pane_favorites},data:{fetch:sysinfo_update}}}();plugins.notifications=function(){var e={format_links:function(e,t){var a="",i=e.match(/(?:])|(?:])/),n=function(e,a,i){if(t){return"'+e.replace(""}else{return e}};if(i&&(i[1]||i[2])){a=i[1]||i[2];if(a&&(a.startsWith("http:")||a.startsWith("https:")||a.includes("ftp:")||a.includes("ftps:")||a.startsWith("//"))){e=e+" "+n('',a,true)+""}else if(a){e=e+" "+n('',a,false)+""}e=e.replace(//gi," ");e=e.replace(/<\/a>/gi," ")}return{msg:e,link:a}}},t={get:function(){$.ajax({type:"POST",url:v___location_prefix+"/xhr.cgi?type=file&action=motd&subtype=receive",dataType:"JSON",success:function(e){t._pull();t._show(e)},error:function(e){session.status(e.responseText)}})},_pull_timer:1e10,_pull:function(){var e=this,t=typeof settings_side_slider_background_refresh_time=="undefined"?5:settings_side_slider_background_refresh_time>0?settings_side_slider_background_refresh_time:5,a=(t+2)*6e4;clearInterval(this._pull_timer);a&&(e._pull_timer=setInterval(function(){e.get()},a))},_show:function(t){if(!$.isEmptyObject(t.motd)){var a=session.server.data("user"),i=function(e){var t=v___server_hostname+"-"+a+"-"+c+"_"+e;t=t.replace(/[^0-9a-z]/gi,"");return t};for(var n in t.motd){for(var s in t.motd[n]){var o=t.motd[n][s],r=o.msg,l=theme_language("notifications_motd2"),c="user_motd",_=o.time.substring(0,10),d=o.time+"-"+n,f=i(d),p=e.format_links(r,true),u=p.link;r=p.msg;if(!localStorage.getItem(f)){var g=plugins.messenger.post({icon:"fa2 fa2-message fa-1_25x",title:l+'  '+dayjs.unix(_).fromNow()+"

    ",message:r,type:"success",id:f,position:"bottomRight",close:false,timeout:false,progressBar:false,buttons:plugins.messenger.toast.construct.button(theme_language("global_hide").toUpperCase(),function(e){localStorage.setItem(e.id.replace("toastid_-_",""),"1")}),layout:2,balloon:true});var m=g.find("x-a");if(m.length){m.on("click",function(e){e.preventDefault();var t=$(this).attr("href"),a=$(this).attr("target");if(a){window.open(t,a)}else{get_pjax_content(t)}})}notifications(l,r,c,u,1)}}}}}},a={get:function(){}},i={post:function(){}};return{user:t.get,administrator:a.get,desktop:i.post}}();plugins.dashboard=function(){var e=".container-fluid .panel-group .panel:not(#system-status)",t="panel-heading",a="panel-collapse",i="dashboard_panels",n=function(){localStorage.removeItem(v___server_hostname+"-"+v___server_username+"-"+i)},s=function(){return v___location_path&&v___location_path.indexOf("/sysinfo.cgi")>-1},o=function(){if(s()){var a=localStorage.getItem(v___server_hostname+"-"+v___server_username+"-"+i);if(a!=null){a=Object.entries(JSON.parse(a));for(var n=0;n"?0:1,a=$("#system-status > .panel-body > .table.table-hover");if(a.length){a.nextAll().remove();if(t){a.after(e)}}},l=function(){$.each(["system-status","right-side-tabs-sysinfo"],function(e,t){const a=$("#"+t+' .alert > [action*="webmin/upgrade.cgi"] [data-entry], #'+t+' .alert > [action*="webmin/fix_repo.cgi"] [data-entry]'),i=a.parents("form").attr("action");if(a.length){const e=a.parent(".btn");let t="fa-update";if(i&&i.toString().includes("fix_repo")){t="fa-git-pull"}if(e.length){if(!e.find(".fa").length){e.removeClass("btn-default").addClass("btn-warning").prepend('')}}}})},c=function(){$.each($("#system-status form:visible, #right-side-tabs form:visible"),function(){var e=$(this).attr("action"),t="?";if(e&&!e.includes("licence.cgi")){if(e.includes("?")){t="&"}$(this).attr("action",e+t+"pass-query-string=1&no-cache=1&no-query=string")}})},_=function(e,t){var a="#content #system-status ",i="table > tbody > tr > td ",n=function(e){return"+ .panel-group > .panel > #"+e+"-virtual-server-1-collapse "},s="System Information",o="Account Information",r="Software Versions",l="Virtualmin Counts",c="Virtualmin License",_=v___user_level==3?o:s,d=function(e){return e&&/(webmin|virtualmin|cloudmin|usermin|authentic)/i.test(e)},f=[],p=[],u=false,g=[],m=[],h=[],v=[],b="",y="",x=function(){if(!e){var a;$.each($(v),function(e,t){if(typeof t==="string"){a=t;b+=(e!==0?"\n":"")+t+"\n"}else{var i=Object.keys(t),n=Object.values(t);if(u&&a===_&&d(i)){return true}b+=$.trim(i[0])+": "+$.trim(n[0])+"\n"}})}else{var i=" ",n=v.length-1,a;$.each($(v),function(e,s){if(typeof s==="string"){a=s;var o=i.repeat(_.length-a.length+(a===_?3:a===r?4:5)+2);b+=(e!==0?"\n|":"|")+s.toUpperCase()+o+"| |\n|---|---|\n"}else{var l=Object.keys(s),c=Object.values(s);if(u&&a===_&&d(l)){return true}b+="| "+$.trim(l[0])+" | "+$.trim(c[0])+" |\n"}if(n===e){!t&&(b+="\n\n\n")}})}};$.each($(""+a+" > .panel-body > "+i+""),function(){var e=$(this)[0].outerText;f.push(e);if(d(e)){p.push(e);p.push($(this).next()[0].outerText)}}).promise().done(function(){$.each($(f),function(e,t){if(e===0){v.push(_)}if(e&1){v.push({[f[e-1]]:t})}}).promise().done(function(){$.each($(""+a+n("sysinfo")+i+""),function(){g.push($(this)[0].outerText)}).promise().done(function(){if(g.length&&p.length){g=p.concat(g);u=true}$.each($(g),function(e,t){if(e===0){v.push(r)}if(e&1&&e!==1+p.length){v.push({[g[e-1]]:t})}}).promise().done(function(){$.each($(""+a+n("ftypes")+i+""),function(){m.push($(this)[0].outerText)}).promise().done(function(){$.each($(m),function(e,t){if(e===0){v.push(l)}if(e&1){v.push({[m[e-1]]:t})}}).promise().done(function(){if(t){$.each($(""+a+n("serial")+i+""),function(){h.push($(this)[0].outerText)}).promise().done(function(){$.each($(h),function(e,t){if(e===0){v.push(c)}if(e&1){v.push({[h[e-1]]:t})}}).promise().done(function(){x()})})}else{x()}})})})})})});return b},d=function(e,t,a){if(!s()){return}if(e==="reset"){t="keyup";a={holdModifer:~~!false}}if(e==="reset"||e==="support-header-icon"){var i=$("#content #system-status ._support_ticket_cnt ._support_ticket_"),n="fa2-life-ring-solid";a.holdModifer&&i.toggleClass(n,t==="keydown")}if(e==="reset"||e==="copy/paste-header-icon"){var i=$("#content #system-status ._clipboard_sysinfo_cnt ._clipboard_sysinfo_"),n="fa2-clipboard-text";a.holdModifer&&i.toggleClass(n,t==="keydown")}};document.addEventListener("DOMContentLoaded",function(){$(document.body).on("shown.bs.collapse hidden.bs.collapse",""+e+"",function(){var n=$(""+e+""),s={};$.each(n,function(){$target=$(this).find("."+t+""),id=$target.attr("id"),state=$target.next("."+a).hasClass("in");s[id]=state});localStorage.setItem(v___server_hostname+"-"+v___server_username+"-"+i,JSON.stringify(s))})});return{restore:o,reset:n,update:{alerts:r,alertsHTML:l,formsURLs:c},system_info:_,events:d}}();plugins.favorites=function(){var e=function(){return $("#favorites-menu .favorites-menu-content li:not(.exclude)").length},t=function(){var e=[];$.each($("#favorites-menu .favorites-menu-content li:not(.exclude) a"),function(){var t=$(this).text(),a=$(this).attr("href"),i=$(this).find("[data-product]").attr("data-product");favorite={};if(session.server.data("webprefix")&&!a.includes("!edit")&&!a.includes("!view")){favorite.link=link_type_convert(a.replace(session.server.data("webprefix"),""),1)}else{favorite.link=link_type_convert(a,1)}favorite.title=t.trim();favorite.icon=i=="virtualmin"?i+"":i;e.push(favorite)});return e},a=function(){var e="#favorites-menu > div > nav > ul";if(typeof sortable!="function"||!$("#favorites-menu > div > nav > ul").length){return}sortable(e,{items:":not(.favorites-title)",forcePlaceholderSize:false}).on("sortupdate",function(){i()})},i=function(){$.ajax({type:"POST",url:v___location_prefix+"/settings-favorites_save.cgi",data:{favorites:'{"favorites":'+JSON.stringify(t(),null,4).replace(/\\n/g,"\\n").replace(/\\'/g,"\\'").replace(/\\"/g,'\\"').replace(/\\&/g,"\\&").replace(/\\r/g,"\\r").replace(/\\t/g,"\\t").replace(/\\b/g,"\\b").replace(/\\f/g,"\\f")+"}"},success:function(e){if(!session.status(e)){return}plugins.slider.update.favorites()},error:function(e){}});sortable("#favorites-menu > div > nav > ul")},n=function(){var t="favorites-menu .favorites-menu-content";if(e()===0){$("#"+t+" li.favorites-no-message").removeClass("hidden");$("#"+t+" .favorites-title sup a").addClass("hidden")}},s=function(t,a,i){var n="favorites-menu .favorites-menu-content";if(e()===0){$("#"+n+" li.favorites-no-message").addClass("hidden");$("#"+n+" .favorites-title sup a").removeClass("hidden")}var s;s='class="wbm-'+i+""+(i=="virtualmin"?"":"")+' wbm-sm"';$("#"+n+" li.favorites-title").after('')},o=function(e,t){var a=snippets.parser.fileviewer.getSuffix(false,1),s=a[0],o=a[1],r=a[2],l=a[3],c=a[4],_=a[5],d=a[6],f=a[7],p=a[8];var u=e.replace(/["\\]/g,"\\$&"),g=function(){var e="",t=[u,u+s+_+f,u+o+_+d+f,u+r+_+p,u+l+_+d+p,u+c+_],a="";$.each(t,function(t,i){if(e){a=", "}e+=""+a+'a[href="'+i+'"], a[href="'+link_type_convert(i,2)+'"]'});return e};$("#favorites-menu .favorites-menu-content").find(g()).parent("li").remove();!e.startsWith("!edit")&&!e.startsWith("!view")&&$("#headln2c > .favorites, .xcustom-favorites").addClass("fa-star-o").removeClass("fa-star text-warning");if(!t){n();i()}},r=function(e){var t=$("#favorites-menu li a.menu-exclude-link"),a=e,s=$('aside select option[value="'+a+'"]').attr("title");if(t&&t.length){$.each(t,function(t,a){var i=$(a),n=i.attr("href"),r=i.find("span").text();if(n){if(n.includes(e)||r&&$.trim(r).startsWith(s)){o(n,1)}}}).promise().done(function(){setTimeout(function(){n();i()},300)})}},l=function(e,t){n();var a=$("#favorites-menu .favorites-menu-content li:not(.exclude) a").map(function(e,t){return link_type_convert($(t).attr("href"),1)}).toArray(),i,s,o,r=0,l="!edit ";if(e){o=e.find(".favorites-editor");if(o.hasClass("viewer")){l="!view ";r=1}}else{o=$("#headln2c > .favorites, .xcustom-favorites");i=link_type_convert(URI(v___location).resource(),1);if(i.includes("index.cgi")){s=i.replace("index.cgi","")}else{s=i+"index.cgi"}}if(t){t=t.replace(/\/\//g,"/")}if(r){t=t+snippets.parser.fileviewer.getSuffix(o)}if(i&&$.inArray(i,a)>-1||s&&$.inArray(s,a)>-1||a.includes(l+t)){var c=theme_language("favorites_remove");o.addClass("fa-star").removeClass("fa-star-o").attr("aria-label",c);o.attr("data-original-title",c).tooltip("fixTitle")}else{var _=theme_language("favorites_add");o.removeClass("fa-star").addClass("fa-star-o").attr("aria-label",_);o.attr("data-original-title",_).tooltip("fixTitle")}};document.addEventListener("DOMContentLoaded",function(){(function(){$(document.body).on("click",'.favorites-menu a.menu-exclude-link, .right_pane_favorites_link:not([href^="!edit"]):not([href^="!view"])',function(){var e=$(this).attr("href"),t=e.startsWith("!edit"),a=e.startsWith("!view"),i=Test.strContains(e,"virtual-server/")?"dom":Test.strContains(e,"server-manager/")?"id":false,n=Test.strContains(e,"gparent")?"gparent":i,s=URI.parseQuery(URI(e).query())[n],o=i==="dom"?"virtualmin":i==="id"?"cloudmin":"webmin",r=$('.switch-toggle input:not([id="open_'+o+'"]):checked').length;if(i){setTimeout(function(){if($("aside select").val()!=s){if(i==="dom"){plugins.navigation.get.virtualmin(s)}else if(i==="id"){plugins.navigation.get.cloudmin(s)}}},300)}else{if(!t&&!a&&r){plugins.navigation.get.webmin()}}}).on("click","#headln2c > .favorites:not(.dummy), .xcustom-favorites:not(.dummy), button.favorites-editor",function(e){e.preventDefault();var t=URI(v___location).resource(),a=$(this),n=snippets.parser.fileviewer.getOpts(a),r=n[5],l=a.is(".favorites-editor"),c,_=function(e){var t=edit_file_parse_target(e.prev("strong"));file__name=t[0],file__path=t[1],c=t[2];c=c.replace(/\/\//g,"/");return c},d=function(e){return _(e)+snippets.parser.fileviewer.getSuffix(e)},f=function(e){var t=e+snippets.parser.fileviewer.getSuffix(a);return e!=t?t:""},p=function(e){var t=theme_language("favorites_remove");e.removeClass("fa-star-o").addClass("fa-star text-warning").attr("aria-label",t);e.attr("data-original-title",t).tooltip("fixTitle")},u=function(e){var t=theme_language("favorites_add");e.addClass("fa-star-o").removeClass("fa-star text-warning").attr("aria-label",t);e.attr("data-original-title",t).tooltip("fixTitle")},g=$(".jsPanel button.favorites-editor"+(r?".viewer":"")+"").not(a);if(a.hasClass("fa-star-o")){p(a);if(l||r){$.each(g,function(){if(r&&!$(this).hasClass("viewer")){return true}if(!r&&$(this).hasClass("viewer")){return true}if(_($(this))===_(a)&&!r){p($(this))}if(r&&d($(this))===f(_(a))){p($(this))}});c=_(a);var m=Convert.htmlEscape(a.prev("[data-file-container]").attr("title")||c);if(get_access_level()===2||get_access_level()===3||get_access_level()===4){var h=new RegExp("^"+get_user_home(),"");var v=new RegExp("\\("+get_user_home(),"");c=c.replace(h,"");m=m.replace(v,"(")}var b="!edit ";if(r){c=f(c);b="!view "}c&&s(b+c,""+theme_language(r?"file_viewer":"file_editor")+" - "+m,r?"x wbm2-viewer":"editor")}else{var y=" ⇾ ",x=theme.config._.form.tconfig(),k=v___location_file==="tconfig.cgi"&&x.length,w=v___location_path===v___location_prefix+"/config.cgi"||v___location_path===v___location_prefix+"/uconfig.cgi"||v___location_path===v___location_prefix+"/mconfig.cgi"||v___location_path===v___location_prefix+"/tconfig.cgi",A=Convert.htmlEscape($("#headln2c > span[data-main_title]").text().trim()),C=Convert.htmlEscape($(".has-sub.active").text().trim()),S=Convert.htmlEscape($(".sub_active").text().trim()),I=S.trim()!==A.trim(),T="",V="";if(($t_uri_virtualmin||$t_uri_cloudmin)&&!w){T=Convert.htmlEscape($("aside .ui_select option:selected").text())}if($('body[class^="'+v___module_file_manager+'"]').length){if(typeof fm_get_current_path==="function"){V=fm_get_current_path();var E=function(e){if(get_access_level()==2||get_access_level()==3){if(fm_user_data&&fm_user_data.allowed_paths&&fm_user_data.allowed_paths.length===1){e="~"+e}}return e};if(!V){V=E("/");V="["+V+"]"}else{V="["+Convert.htmlEscape(E(Convert.uriDecodeComponent(V)))+"]"}}}if(w){if(!k){var j=v___location_file.match(/(.*?)\./),O=j?j[1]:parseInt(Math.random()*1e4);x=$('.container-fluid form[action*="'+O+'_save.cgi"]');var z=Convert.htmlEscape($("#headln2c > span[data-sub_title] span").text().trim());C=C?C+y+z:z;S=A}else{S=A}A=$.trim(x.find(".table-title").text())}else{if(($t_uri_virtualmin||$t_uri_cloudmin)&&v___location_query&&($t_uri_virtualmin&&!v___location_query.includes("dom=")||$t_uri_cloudmin&&!v___location_query.includes("id="))&&!core.curModule(v___module_file_manager)&&!core.curModule("webminlog")&&!core.curModule("phpini")&&!core.curModule("apache")&&!core.curModule("logviewer")&&!core.curModule("syslog")){T=""}}var M=(C.length?C+y:"")+(S.length?S+(A.length&&I?": ":""):"")+(I?A:"")+(V.length?" "+V:"");if(vars.events.keypressed.alt&&!vars.events.keypressed.shift&&vars.events.keypressed.ctrl&&!vars.events.keypressed.meta){theme_copy_to_clipboard(M);console.warn("Copied to clipboard:");console.log(M);u(a);setTimeout(function(){plugins.messenger.post({type:"success",icon:"fa fa-exclamation-circle fa-lg fa-fw",id:"copiedToClipboardSuccess",title:theme_language("global_success"),message:theme_language("filemanager_copying_successful").replace(".",String()),layout:1,displayMode:1,position:"bottomCenter",cancel:true,close:true,timeout:3e3,progressBar:true})},22)}else{s(t,M,w&&k?"theme":$t_uri_virtualmin?"virtualmin":$t_uri_cloudmin?"cloudmin":"webmin")}}i()}else{u(a);if(l||r){$.each(g,function(){if(r&&!$(this).hasClass("viewer")){return true}if(!r&&$(this).hasClass("viewer")){return true}if(_($(this))===_(a)&&!r){u($(this))}if(r&&d($(this))===f(_(a))){u($(this))}});c=_(a);var b="!edit ";if(r){c=f(c);b="!view "}c&&o(b+c)}else{o(link_type_convert(t,1))}}}).on("click","#right-side-tabs .right_pane_favorites_link",function(e){$(".favorites-menu-outer.hover + .favorites-menu-close").trigger("click")}).on("click",".favorites-menu-close, nav.favorites-menu li a",function(){$(".favorites-menu-outer").removeClass("hover")}).on("keydown",function(e){if($(".favorites-menu-outer").css("left")=="0px"&&e.keyCode==27){$(".favorites-menu-outer").removeClass("hover")}});$("#favorites-menu .favorites-menu-content").on("mouseover","li:not(.exclude) span.f__c, li:not(.exclude) span.f__c small",function(){$(this).find("small").removeClass("hidden")}).on("mouseleave","li:not(.exclude) span.f__c, li:not(.exclude) span.f__c small",function(){$(this).find("small").addClass("hidden")});$("#favorites-menu .favorites-menu-content").on("mouseover","li:not(.exclude) small",function(){$(this).find(".fa-times").removeClass("fa-times").addClass("fa-times-circle");$(this).animate({"font-size":"0.7em","margin-top":"-2px","margin-left":"-1px"},0)}).on("mouseleave","li:not(.exclude) small",function(){$(this).find(".fa-times-circle").removeClass("fa-times-circle").addClass("fa-times");$(this).animate({"font-size":"0.6em","margin-top":"-1px","margin-left":"0"},0)});$("#favorites-menu .favorites-menu-content").on("click","li:not(.exclude) small .fa-times-circle",function(e){e.preventDefault();e.stopPropagation();o($(this).parents("a").attr("href"))})})();a()});return{detect:l,fetch:t,remove:r}}();plugins.update_notice=function(){$(document.body).on("hidden.bs.modal","#update_notice",function(){$(".modal#update_notice").remove()});$(document.body).on("show.bs.modal","#update_notice",function(){var e=$(this),t=e.find(".modal-body > h4:first-child"),a=t.text().split(/\s+/)[1],i=e.find(".versionSeparator:last").text(),n=e.find(".versionSeparator").length,s=theme.version(),o=i+" ... "+s;var r=false,l=i.match(/([\d]+\.[\d]+)/),c=s.match(/([\d]+\.[\d]+)/);if(l&&c){l=l[1];c=c[1]}$(this).addClass("update_notice_subvers");var _=e.find(".versionSeparator"),d=theme_language("global_development_version");$.each(_,function(){$(this).attr("target","_blank")});var f=$(this).find(".modal-body h4"),p=$(this).find(".modal-body h4:first");if(!$(this).find(".modal-body h4:first .diffctl").length){var u=new RegExp(RegExp.quote(a),"g");if(n){f.replaceText(u,""+o+"");f.replaceText(/Version/,"Versions")}var g=$(this).find('.modal-body h4:contains("alpha"), .modal-body h4:contains("beta"), .modal-body h4:contains("RC")').length;if(f.length&&g){var m=$(this).find('.modal-body a[href*="authentic-theme/releases"]:first').text().match(/-?(?:\d+(?:\.\d*)?|\.\d+)/);latest_release=parseFloat(m?m[0]:theme.version());var h=p.text(),v=h.split("..."),b=0,y=e.find('a.versionSeparator[href*="releases"]:not(:empty)').first().text();if(v[1]){b=v[0].replace("Versions ","");p.text(p.text())}p.append('');p.after(''+''+d+"")}else{p.append('').append(''+a+"")}}})};plugins.icons_row=function(){$(document.body).on("click",".inline-row input",function(e){if(!$(this).is(":checked")){$(this).parents(".gl-icon-container").removeClass("highlighted")}else{$(this).parents(".gl-icon-container").addClass("highlighted")}}).on("click contextmenu","div.icons-container, div.small-icons-container",function(e){var t=$(e.target).find("a[href]").first();if(e.type==="click"&&$(e.target).is($(this))&&t.length){t.trigger("click");return}if(e.type==="click"&&$(e.target).is(".gl-icon-select")&&!$.support.spa){e.preventDefault();$(this).trigger("contextmenu")}else if(e.type==="contextmenu"){e.preventDefault();if($(this).find("input").is(":checked")){$(this).find("input").prop("checked",false);$(this).removeClass("highlighted")}else{if($(this).find("input").length){$(this).find("input").prop("checked",true);$(this).addClass("highlighted")}}var a=$(e.target).is(".icon_link")?$(e.target).parent(".gl-icon-container").find(".fa-select, .fa-selected"):$(e.target).is(".gl-icon-select")?$(e.target):$(e.target).is("img")?$(e.target).parent("a").parent(".gl-icon-container").find(".fa-select, .fa-selected"):$(e.target).find(".fa-select, .fa-selected");a.hasClass("fa-select")?a.removeClass("fa-select").addClass("fa-selected"):a.removeClass("fa-selected").addClass("fa-select")}typeof db_check_selected==="function"&&db_check_selected()}).on("click",".row.icons-row .icons-container, .row.icons-row .small-icons-container",function(){if(!$(this).hasClass("forged-xx-skip")){return}})};plugins.chooser=function(){var e=false,t=false,a=false,i=function(e){$(".mppopup .cspinner.hidden").removeClass("hidden");$.ajax({type:"POST",url:e,data:false,dataType:"text",success:function(e){if(!session.status(e)){return}var t=e.replace(/<(!doctype|script|link|meta)\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/(script|link|meta)>/gi,"").replace(/<\/body>|<\/html>/gi,""),a=$(t).filter(".table").html(),i=$(t).filter(".table").prev("b").html();i=r(i);if(a){a=a.replace(//gm,'').replace(//gm,'')}$(".mppopup .modal-body").html(i+''+a+"
    ");$v__mpp__g_gp=0;$(".mppopup_filter_input").focus();$(".mppopup_filter_input").val("")}})},n=function(e){return e.replace(/&file.*&chroot/,"&file="+Convert.uriEncodeComponent(($v__mpp__g_ol+"/").replace(/\/\/+/g,"/").replace(/:\//g,"://"))+"&chroot")},s=function(e,t){var a=e.prev('input[type="text"], input[name]');if(!a.is("input")&&!e.prev("textarea").length&&!e.prev("br").prev("textarea").length){a=e.prev("span:not(.awradio)").find('input[type="text"]')}else if(!a.length&&!a.is("input")&&t){a=e.prev("textarea");if(!a.length){a=e.prev("br").prev("textarea")}}return a},o=function(t,i,n){e&&(a=t);if(n){if($(".refInputData").is("textarea")){var s=$(".refInputData");if(s.val()){s.val(s.val()+"\n"+t.replace(/\/\/+/g,"/").replace(/:\//g,"://"))}else{s.val(t.replace(/\/\/+/g,"/").replace(/:\//g,"://"))}}else{$(".refInputData").val(t.replace(/\/\/+/g,"/").replace(/:\//g,"://"))}var o=$(".refInputData").parent("td").prev("td").find('input[type="radio"]'),r=$(".refInputData").parent("span").prev("span").find('input[type="radio"]'),l=$(".refInputData").prev("span").find('input[type="radio"]'),c=$(".refInputData").prev("select").find('option[value="*"]');if(r.length){r.trigger("click")}else if(l.length){l.trigger("click")}else if(c.length){c.parent("select").val("*").trigger("change")}else{o.trigger("click")}}if(i){$("body .mppopup").modal("hide")}},r=function(e){e=$.url(e).attr("path").replace(/\/$/g,"").split("/");var t="",a="/",i=a,n=get_access_level()==2||get_access_level()==3,s=get_user_home();if(n){i=s}$.each(e,function(e,o){if(o===""){var r="onclick=\"parentdir('"+i+"'); return false\"";if(n){r=String()}t+=""+(get_access_level()==0?'':'')+""+"\n"}else{a+=o+"/";var r="onclick=\"parentdir('"+a+"'); return false\"";if(n&&!a.includes(s)){r=String()}t+=""+o+""+"\n"}});var o='";return o+''},l=function(t){var i=String();!t&&(t={});if(t.file){i=t.file}var n='";$("body").append(n);$(document).find("._xcustom_file_select button[data-custom-chooser]").trigger("click");if(t.resolve!==false){return new Promise(function(t){setTimeout(function(){var i=setInterval(function(){if(!e){clearInterval(i);t(a);a=false}},100)},10)})}};document.addEventListener("DOMContentLoaded",function(){(function(){var l=document.body;$(l).on("dblclick",'.mppopup a[onclick*="fileclick("], .mppopup a[onclick*="parentdir("]',function(e){e.preventDefault()}).on("dblclick",'.mppopup a[onclick*="select("]',function(){$(".mppopup button[data-mppopup_confirm]").trigger("click")}).on("click",'.mppopup a[onclick*="fileclick("], .mppopup a[onclick*="parentdir("]',function(e){e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();var t=this;if(!t.clicks){t.clicks=0}if(!t.timer){t.timer=null}t.clicks++;$data_mppopup_value.val($v__mpp__g_ol);if(t.clicks===1){t.timer=setTimeout(function(){t.clicks=0;typeof $v__mpp__g_gp=="undefined"?$v__mpp__g_gp=0:0;if(!$v__mpp__g_gp){o($v__mpp__g_ol,0,0)}else{var e=n($v__mpp__g_op);i(e)}$v__mpp__g_gp=0},vars.event.double_click_delay)}else{clearTimeout(t.timer);t.clicks=0;if($v__mpp__g_olt){var a=n($v__mpp__g_op);i(a)}else{o($v__mpp__g_ol,1,1)}}}).on("click",".mppopup button[data-mppopup_confirm]",function(){var e=$data_mppopup_value.val();o(e,1,1);if(core.curModule("custom")){refInput.trigger("input")}}).on("show.bs.modal",".mppopup",function(){setTimeout(function(){$("body").addClass("mppopup-open")},120);v__mpp__ml_t__e=0;$data_mppopup_value=$(".mppopup input[data-mppopup_value]");$('.mppopup input[data-role="tagsinput"]').tagsinput({onTagExists:function(e,t){t.hide().fadeIn();v__mpp__ml_t__e=1}})}).on("shown.bs.modal",".mppopup",function(){var e=$("body .mppopup").find(".modal-head"),t=$("body .mppopup").find(".modal-body"),a=$("body .mppopup").find(".modal-body table"),i=e.find(".mppopup_filter > input");setTimeout(function(){$(".mppopup_filter_input").animate({opacity:1},0);$(".mppopup_filter_input").focus()},0)}).on("hide.bs.modal",".mppopup",function(){var e=$(".modal.in");e.removeClass("in");$("body").removeClass("mppopup-open");setTimeout(function(){e.addClass("in")},150)}).on("hidden.bs.modal",".mppopup",function(){refInput.removeClass("refInputData");$('.mppopup input[data-role="tagsinput"]').tagsinput("destroy");$("body .mppopup").remove();$("button[data-mmclick].disabled, input[data-mmclick].disabled").removeClass("disabled").removeAttr("disabled");setTimeout(function(){if($(".modal.in").length){$("body").addClass("modal-open")}})}).on("click",".mppopup_multi_done",function(){refInput.val($.trim($('.mppopup input[data-role="tagsinput"]').val().replace(/,/g," ")));$('.mppopup span[aria-hidden="true"]').trigger("click")}).on("keyup",".mppopup_filter_input",function(e){var t=e.which,a=$(".mppopup table tbody tr:visible"),i=a.find("td:first-child a"),n=$(".mppopup .breadcrumbx").length;if(n){return}if(t==13&&a.length===1&&!e.shiftKey){i.trigger("click")}else if(t==13&&a.length===1&&e.shiftKey){i.trigger("click").trigger("dblclick");var s=$(".mppopup .mppopup_multi_done:visible");if(s.length){setTimeout(function(){s.trigger("click")},240)}}if(!$(".mppopup table tbody tr.noresults").length){$(".mppopup table tbody").append(''+theme_language("global_no_results_found")+"")}var o=$(".mppopup table tbody tr:visible:not(.noresults)"),r=$(".mppopup table tbody tr.noresults");if(o.length){r.addClass("hidden")}else{r.removeClass("hidden")}}).on("click","button[data-mmclick]:not(.disabled), input[data-mmclick]:not(.disabled)",function(i){i.preventDefault();i.stopPropagation();refInput=s($(this),1);e=!!+$(this).parent("._xcustom_file_select").length,custom_window={shown:function(){a=false;t=true},hidden:function(){t=false;e=false;$("._xcustom_file_select").remove()}};var n=$(this),o=refInput.val(),l=encodeURIComponent(o),c=$(this).attr("data-mmclick"),_=c.match("window.open\\(['\"]*(.*?)(\\s*['\"]*,.*?)"),d=_[1].match(/(\w+\.[a-z]{3,4})/gi)[0],f=d.replace(".cgi",""),p=false,u=false;n.addClass("disabled").attr("disabled","disabled");if(_[1]){var g=_[1].replace("encodeURIComponent(ifield.value)","refInputCurrValSafe");g=g.replace('"+"',"").replace('"+',"").replace("refInputCurrValSafe",l);var m=function(t,a,i,n,s,r,l,c,_,d,p){var u;if(!r){r=String()}if(!l){l=String()}if(s){u='"}else{u='"}var g='";$(document.body).append(g);refInput.addClass("refInputData");$("body .mppopup").on("show.bs.modal",function(){if(p&&typeof p==="function"){p()}}).on("shown.bs.modal",function(){if(d&&typeof d==="function"){d()}e&&custom_window.shown()}).on("hidden.bs.modal",function(){e&&custom_window.hidden()}).modal("show")},h=function(e){var t=parseInt(session.server.data("webprefix-proxy")),a=String();if(t){a=v___location_prefix}if(core.curModule("cluster-useradmin")&&(e[1].startsWith("my_user_chooser")||e[1].startsWith("my_group_chooser"))){$v__mpp__g_op=v___location_prefix+"/useradmin/"+e[1]}else if(!e[1].startsWith("/")){$v__mpp__g_op=a+"/"+e[1]}else{$v__mpp__g_op=a+e[1]}};var v=String(),b="cron_chooser",y='form[action*="backup_sched.cgi"], form[action*="save_newquotas.cgi"], form[action*="save_validate.cgi"]',x='[name="enabled_hidden"], [name="sched_hidden"], [name="when_hidden"]';y+=', form[action*="save_backup.cgi"], form[action*="save_vbackup.cgi"], form[action*="save_vsync.cgi"]';if(f===b){var k=$(y),w=k.find(x).val();v=""+b+".cgi?complex="+w+""}$.ajax({type:"POST",url:v||g,data:false,dataType:"text",success:function(e){if(!session.status(e)){return}var t=e;var a=e.match(''+i+"","",0,refInput,1,"modal-lg","modal-no-header",1,1,u,p)}else if($.isArray(a)&&a[1]&&a[1].indexOf("&multi=1")===-1){h(a);$.ajax({type:"POST",url:$v__mpp__g_op,data:false,dataType:"text",success:function(e){if(!session.status(e)){return}var t=e.replace(/<(!doctype|script|link|meta)\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/(script|link|meta)>/gi,"").replace(/<\/body>|<\/html>/gi,""),a=$(t).filter(".table").html(),i=$(t).filter(".table").prev("b").html();var n=r(i),s=$(a).find("td").length;if(s===0&&a){a=a.replace("thead","tbody");a=a.replace("",''+theme_language("datatable_semptydirectory")+"")}t=n+''+a+"
    ";if(t){t=t.replace(//gm,'').replace(//gm,'')}m(t,"type1",0,refInput,0)}})}else if(!$.isArray(a)){if($.isArray(a)&&a[1].indexOf("&multi=1")===-1){return}var i=t,n=$(i).filter("table").html();m(''+n+"
    ","",1,refInput,0)}else{h(a);$.ajax({type:"POST",url:$v__mpp__g_op,data:false,dataType:"text",success:function(e){if(!session.status(e)){return}var t=e.replace(/<(!doctype|script|link|meta)\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/(script|link|meta)>/gi,"").replace(/<\/body>|<\/html>/gi,""),a=$(t).filter("table").html();t=''+a+"
    ";m(t,"type2",0,refInput,1)}})}}})}else{$(this).removeClass("disabled");$(this).attr("onclick",$(this).attr("data-mmclick")).removeAttr("data-mmclick");$(this).trigger("click")}})})()});return{target:s,file:l}}();plugins.navigation=function(){document.addEventListener("DOMContentLoaded",function(){r();c();n();$("aside").on("click",".select2-container .select2-selection__arrow b",function(e){e.preventDefault();e.stopPropagation()}).on("click",'a[href*="/cwaf/"], a[href*="/file/"], a[href*="server-manager/bwgraph.cgi"], a[href*="history.cgi"]',function(e){e.preventDefault();e.stopPropagation();window.open($(this).attr("href"),"_blank")}).on("contextmenu auxclick",".switch-toggle label",function(e){const t=this;e.preventDefault();if(t._processing){return}t._processing=true;setTimeout(function(){t._processing=false},99);var a=$(this).attr("for").replace("open_",""),i=$(this).prev("input").is(":checked");if(i){var n=v___location_href;set_server_theme_temp_data("goto",link_type_convert(n,1));setTimeout(function(){theme_open_new_tab(n)},200)}else if(a==="virtualmin"||a==="cloudmin"){var s;if(a==="cloudmin"){s="/server-manager/index.cgi"}else{s="/virtual-server/index.cgi"}var o=link_type_convert(s,2);set_server_theme_temp_data("goto",link_type_convert(o,1));setTimeout(function(){theme_open_new_tab(o)},200)}else if(a==="webmail"){var r=v___location_prefix+"/mailbox/index.cgi?"+$__theme_navigation;set_server_theme_temp_data("goto",link_type_convert(r,1));setTimeout(function(){theme_open_new_tab(r)},200)}else{var r=v___location_prefix+"/sysinfo.cgi?"+$__theme_navigation;set_server_theme_temp_data("goto",link_type_convert(r,1));setTimeout(function(){theme_open_new_tab(r)},200)}}).on("click",".switch-toggle input.dynamic",function(e){if(get_onbeforeunload_status()){e.preventDefault();var t=$(".switch-toggle input:checked").attr("id");get_onbeforeunload_message([],{href:"::switch::"+t});return}C($(this).attr("id").replace("open_",""));if($(this).attr("id")=="open_dashboard"){get_pjax_content(v___location_prefix+"/sysinfo.cgi");return}get_navigation_and_content($(this).attr("id").replace("open_",""))}).on("focus",".sidebar-search",function(){f("c",false)}).on("blur",".sidebar-search",function(){setTimeout(function(){f("c",true)},150)}).on("click",'.navigation a[target="page"], .user-links a[target="page"]',function(){l()}).on("click",".navigation > li .navigation_external_link",function(e){e.preventDefault();e.stopPropagation();b=$(this);window.open(b.attr("href"),"_blank")}).on("click",".navigation > li:not('.sub-wrapper'):not('.menu-container'):not('.navigation_external'):not([data-linked])",function(e){e.preventDefault();e.stopPropagation();var t=1;if(e.target&&e.target.classList&&e.target.classList.value&&(e.target.classList.value.includes("fancytree")||e.target.classList.value.includes("label-danger"))){t=0}v___blocked_navigation=t;typeof $processing=="undefined"?$processing=false:false;if(!$processing){$processing=true;var a=$("a",this).attr("href"),i=$("a",this).attr("target"),n=$(this);if(i){$(".navigation > li > ul.sub > li").each(function(){$(this).removeClass("sub_active").find("span.current").remove()})}$.when($("#sidebar .navigation > li").each(function(){var e=$(this),t=e.find("a"),a=t.is("[data-has-sub-link]");if((typeof settings_navigation_auto_fold_category=="undefined"||settings_navigation_auto_fold_category)&&!e.is(n)){e.removeClass("active");if(e.find("a").attr("href")!="#search"&&a){$(e.find("a").attr("href")).slideUp(vars.navigation.animation_speed)}}})).done(function(){n.hasClass("active")?n.removeClass("active"):a!="#hide"&&!i?n.addClass("active"):false;setTimeout(function(){if($(a).is(":visible")&&a!="#hide"&&!i){n.addClass("active")}else{n.removeClass("active")}$processing=false},2*vars.navigation.animation_speed>0?2*vars.navigation.animation_speed:1);$(a).slideToggle(vars.navigation.animation_speed)});if(a=="#search"){$('#sidebar input[name="search"]').focus()}}}).on("click",".navigation > li.has-sub",function(){page.load.happening()&&(plugins.navigation.detectAllowed=false)}).on("click",".navigation > li > ul.sub > li:not([data-link-inactive]):not('.menu-container')",function(e){if(e.target&&$(e.target).is("li")){return}var t=window.navigator.platform==="MacIntel"?1:0;if(!t&&e.ctrlKey||t&&e.metaKey){return}var a=$(this);$(".navigation > li:not('.has-sub')").removeClass("sub_active").find("span.current-large").remove();$(".navigation > li > ul.sub > li").each(function(){$(this).removeClass("sub_active").find("span.current").remove()});$("#webmin_search_form").find('input[name="search"]').val("");$("aside .navigation .fancytree-node.fancytree-active").removeClass("fancytree-active");a.addClass("sub_active").append('')}).on("click",'a[data-refresh="true"]',function(e){e.preventDefault();page_refresh()}).on("focus",".form-control.sidebar-search",function(e){page.load.happening()&&(plugins.navigation.detectAllowed=false);$(".__logo").addClass("inited");e.preventDefault();e.stopPropagation();vars.shell.history=0}).on("keydown","#webmin_search_form",function(e){var t=$(this),a=t.find("input.sidebar-search"),i=a.val(),n=$("body").find(".-shell-port-");if(i&&e.keyCode===13){e.preventDefault();if(!i.startsWith("!")){$(this).find('input[name="title"]').remove();var s=M(1),o=theme_language("search_in_"+(s==="mailbox"?"usermin":s)+"");o=o?o:theme_language("filemanager_context_search");$("").attr({type:"hidden",name:"title",value:o}).appendTo($(this));var r=$(this).attr("action")+"?"+$(this).serialize();if(get_onbeforeunload_status()){get_onbeforeunload_message(false,{href:r})}else{get_pjax_content(r);a.val("")}}else{if(core.moduleAvailable("xterm")){var l=i.includes("!edit ")||i.includes("!editor "),c=i.includes("!view ")||i.includes("!viewer ");if(l||c){var _=i.replace("!edit ","").replace("!editor ","").replace("!view ","").replace("!viewer ",""),d=_.split("\\").pop().split("/").pop(),f=_.replace("/"+d,"");plugins.navigation.collapse();progress.start();if(c){edit_file(d,f||"/",false,1,0)}else{edit_file(d,f||"/")}}else{plugins.terminal.open(i)}}else if(core.moduleAvailable("shell")){plugins.shell.open(i)}}}}).on("click","[data-collapse-trigger]",function(e){e.stopImmediatePropagation();var t=session.server.data("data-navigation-collapsed")=="1"?0:1;vars.navigation.pinned=t;settings_navigation_always_collapse=!settings_navigation_always_collapse;if(settings_navigation_always_collapse){session.server.data("data-navigation-collapsed",1);$(".mobile-menu-toggler").removeClass("visible-xs");l()}else{session.server.data("data-navigation-collapsed",0);$(".mobile-menu-toggler").addClass("visible-xs")}setTimeout(function(){page_resized()},0);$(window).resize()}).on("click",".user-links > li.favorites",function(){$(".favorites-menu-outer").addClass("hover")}).on("click",".user-link.palette-toggle",function(){theme_toggle_night_mode()}).on("click",".user-link.ported-console",function(){if(plugins.shell.available()){if(session.server.data("terminal")==1){plugins.terminal.open()}else{plugins.shell.open()}}}).on("click",".user-links > li",function(e){if($(e.target).is($(this))){var t=$(this).find("a"),a=t&&t[0]&&t[0].hasAttribute("data-nref");if(a){location.href=t.attr("href")}else{$(this).find("a, [data-collapse-trigger]").trigger("click")}}}).on("click",".__logout-link",function(){progress.start();get_server_theme_temp_data("goto",0)}).on("click",".servers-index-link > a",function(e){e.preventDefault();e.stopPropagation();progress.start();location.href=this.href}).mCustomScrollbar({axis:"y",theme:"minimal",scrollInertia:250,scrollButtons:false,advanced:{autoScrollOnFocus:false},callbacks:{onScroll:function(){if(!$(".mobile-menu-toggler").is(":visible")){$(".form-control.sidebar-search").blur();if($("aside select")&&$("aside select").length>0&&$("aside select").hasClass("select2-hidden-accessible")){$("aside select").select2("close")}}if($(".popover-servers-index:visible").length){$('aside [data-servers-index="popover"]').trigger("click")}}}});$("body").on("click",".popover-servers-index.in .popover-content a",function(e){e.preventDefault();progress.start();location.href=this.href})});var e=function(){var e=".navigation",t=typeof settings_navigation_auto_fold_category=="undefined"||settings_navigation_auto_fold_category;t&&$(e+" li.has-sub").removeClass("sub_active");$(e+" > li:not('.has-sub')").removeClass("sub_active").find("span.current-large").remove();$(e+" > li > ul.sub > li").removeClass("sub_active").find("span.current").remove();t&&$(e+" > li.has-sub").removeClass("active");t&&$(e+" > li > ul.sub").hide();t&&$(e+" > li > a > i.fa.fa-folder-open-o").removeClass("fa-folder-open-o")},t=function(t,a){if(v___theme_pjax_call===0){return}if(J()){return}var i=function(e){return e?e.replace("/edit_users.cgi","/list_users.cgi").replace("/edit_user.cgi","/list_users.cgi").replace("/edit_alias.cgi","/list_aliases.cgi").replace("/edit_database.cgi","/list_databases.cgi").replace("/save_database.cgi","/list_databases.cgi").replace("/edit_script.cgi","/list_scripts.cgi").replace("/script_form.cgi","/list_scripts.cgi").replace("/save_domain.cgi","/edit_domain.cgi"):e};var n=false,s=function(){n=false;if(!plugins.navigation.detectAllowed){return}typeof t=="undefined"&&(n=true);if(Test.arrContains(["webmin_search.cgi","tconfig.cgi","settings-editor_favorites_read.cgi"],v___location_file)||page_extended()){e();return}if(v___blocked_navigation){return}if(typeof a=="undefined"){var s=function(e){var t=":not([data-parent-hidden]):first",a='a[href*="'+e+'"]'+t+"";if(e&&e.includes("/virtual-server/")){var i=e.match(/.*(dom|gparent)=(\d+)/),n=e.match(/.*?\.cgi/);if(i&&i[1]&&i[2]&&n){a='a[href*="'+n[0]+'"][href*="'+(i[1]+"="+i[2])+'"]'+t+""}}return a},o=v___location_path==="/"?t:v___location_path+(v___location_query?"?"+v___location_query:"");if(v___initial_load&&!o){return}if(!o){o="/"}$nearExactMatchStatus=1,$superExactMatchStatus=0,$nearExactMatch=$('.navigation a[href*="'+o+'"]:not([data-parent-hidden]):first'),$nearExactMatchPostSave=$(".navigation "+s(o.replace("save_","edit_"))),$nearExactMatchPostList=$(".navigation "+s(o.replace("edit_","list_"))),$nearExactMatchPostListSingular=$(".navigation "+s(o.replace("edit_","list_").replace(".cgi","s.cgi"))),$nearExactMatchPostListPlural=$(".navigation "+s(o.replace("edit_","list_").replace(".cgi","es.cgi")));if(!$nearExactMatch.length){$nearExactMatch=$nearExactMatchPostSave;if(!$nearExactMatch.length){$nearExactMatch=$nearExactMatchPostList;if(!$nearExactMatch.length){$nearExactMatch=$nearExactMatchPostListSingular}if(!$nearExactMatch.length){$nearExactMatch=$nearExactMatchPostListPlural}}}if(Test.strContains(v___location_file||t,"cgi")&&$nearExactMatch.length){t=$nearExactMatch.attr("href");$nearExactMatchStatus=0}else if($('.navigation a[href="'+v___location_resource+'"]:not([data-parent-hidden]):first, .navigation a[href*="'+link_type_convert(v___location_path,2)+'"]:not([data-parent-hidden]):first').length){t=v___location_resource;$superExactMatchStatus=1}else if($('.navigation a[href^="'+v___location_resource+'"]:not([data-parent-hidden]):first').length){t=v___location_resource;$nearExactMatchStatus=0}t=i(t);var r=v___location_file==="config.cgi"||v___location_file==="uconfig.cgi",l=v___location_file==="mconfig.cgi"&&uri_parse_param("module")===v___module_file_manager;if(r&&!l){if($t_uri_virtualmin&&!core.curModule("virtualmin-awstats")){t=v___location_prefix+"/config.cgi?virtual-server"}else if($t_uri_cloudmin){t=v___location_prefix+"/config.cgi?server-manager"}else if($t_uri_webmail){t=v___location_prefix+"/uconfig.cgi?mailbox"}else{t=v___location_prefix+"/"+v___location_query+"/"}}if(l){t=v___location_prefix+"/"+v___module_file_manager}var c=$t_uri_webmin||$t_uri_usermin;if(!t&&c){if(Test.strContains(v___location_file,".cgi")&&!Test.strContains(v___location_file,"sysinfo.cgi")){t=v___location_path.replace(v___location_file,"")}else if(!t){var _=new RegExp("^"+v___location_prefix,"i");t=session.server.data("data-uri").replace(_,"").split("/").filter(function(e){return e.length!==0})[0];t=v___location_prefix+"/"+t}}if($superExactMatchStatus){targeted_menu_link=$('.navigation a[href="'+t+'"]:not([data-parent-hidden]):first, .navigation a[href="'+link_type_convert(t,2)+'"]:not([data-parent-hidden]):first')}else{if(t&&(t.endsWith("/virtual-server/")||t.endsWith("/server-manager/"))){t+="index.cgi"}targeted_menu_link=$('.navigation a[href^="'+t+'"]:not([data-parent-hidden]):first')}if(targeted_menu_link.length){e()}}else{var d=".navigation a[href",f=":not([data-parent-hidden]):first";if(a==="progress"){t=i(t);targeted_menu_link=$(""+d+'*="'+t+'"]'+f+"")}else{targeted_menu_link=$(""+d+'^="'+t+'"]'+f+"")}if(targeted_menu_link.length){e()}}$("aside .navigation .fancytree-node.fancytree-active").removeClass("fancytree-active");if(t==="/"){return}targeted_menu_link.parent("li:not(.menu-exclude):not(.user-link)").addClass("sub_active").append('').parent("ul.sub").show().parent("li:not(.menu-exclude):not(.user-link)").prev("li").addClass("active")};s();n&&setTimeout(s,1)},a=function(){$(".mCSB_container, .mCSB_dragger").css("top","0");!$("#_menu_loader").length&&$("body ul.navigation").before('');$("body aside .mCSB_scrollTools, body ul.navigation, body ul.user-links").css("visibility","hidden");$("aside ul.user-html").addClass("invisible")},i=function(){$("aside ul.user-html").removeClass("invisible");$("body aside .mCSB_scrollTools, body ul.navigation, body ul.user-links").css("visibility","visible");$("#_menu_loader").remove();c();n();bind_sameorigin(1);theme_to_new_tab();s()},n=function(){vars.navigation.servers_index_control=false;var e=$('aside [data-servers-index="popover"]'),t=e.parent(),a=t.data("http-webmin-servers");if(e.length){vars.navigation.servers_index_control=true;$.ajax({type:"GET",url:a+"index-json.cgi",dataType:"JSON",success:function(i){var n="",s=session.server.data("data-webprefix");if(i&&i.length>1){t.removeClass("hidden");$.each(i,function(){if(!s.endsWith(this.id)){n+=' '+Convert.htmlEscape(this.host)+(this.desc?" ("+Convert.htmlEscape(this.desc)+")":"")+"
    "}});n&&e.popover({animation:"false",placement:"top",html:"true",container:"body",template:'
    ',trigger:"click",content:n});e.on("shown.bs.popover",function(){$(".popover-servers-index").removeClass("fade")})}}})}},s=function(){var e=$('aside a[href*="'+v___module_file_manager+'"]');if(e&&e.length){var t=e.attr("href"),a=uri_parse_param("path",t);if(a&&!a.startsWith("/")&&!a.startsWith("%2F")){var i=new URI(t),n=i.pathname(),s="/"+a,o=n+"?path="+Convert.uriEncodeComponent(s);e.attr("href",o)}}},o=function(){return $("#_menu_loader").length},r=function(){if($("aside").css("transform")=="none"&&$("html").attr("data-navigation-collapsed")!="1"){$("aside").transition({x:settings_leftmenu_width},0,function(){if($(".__logo")&&$(".__logo").css("transform")=="none"&&!$(".mobile-menu-toggler:visible").length){$(".__logo").transition({y:"-140px"},vars.navigation.animation_speed*1.7)}})}},l=function(){var e=dayjs().unix()-vars.navigation.opened>=1,t="mobile-menu-toggler",a="__logo";if(typeof jQuery().transition=="function"&&($("."+t+":visible").length&&e)){if($("."+a+"")){$("."+a+"").transition({y:0},vars.navigation.animation_speed*1.7)}$("aside, ."+t+"").transition({x:0},0,function(){$("."+t+"").removeClass("selected");$("aside").addClass("hidden-xs")})}},c=function(e){var t="body aside",a="select2";vars.navigation.select.back=false;if($(".form-control.sidebar-search").is(":focus")){return}$.each($(""+t+" select > option"),function(){var e=$(this).text().match(/^\s{0,4}/)[0].length,t=$(this).text();if(settings_leftmenu_vm_cm_dropdown_icons){if(e===4&&t.indexOf("↱")===-1){$(this).html("    ↱ "+t.replace(/\s/g,""))}else if(e===2&&t.indexOf("↴")===-1){$(this).html("  ↴ "+t.replace(/\s/g,""))}}}).promise().done(function(){var i=$(""+t+" select");i.removeAttr("id");if(i.length){i.removeAttr("onchange disabled");i.data(a)?i.select2("destroy"):false;i.unbind(""+a+":select");i.select2({minimumResultsForSearch:3,dropdownCssClass:"aside-select2"});var n=i.data(a);if(e){i.select2("open")}i.on(""+a+":selecting",function(){i.data("previous-value",$(this).val())});i.on(""+a+":select",function(e){var t=e.currentTarget.value;if(e.currentTarget.name==="dom"){if(get_onbeforeunload_status()){vars.navigation.select.back=true;get_onbeforeunload_message(e,this,{"plugins.navigation.get.virtualmin":[t],get_pre_default_content:[t]})}else{T(t);get_pre_default_content(t)}}else{if(e.currentTarget.name==="sid"){if(get_onbeforeunload_status()){vars.navigation.select.back=true;get_onbeforeunload_message(e,this,{"plugins.navigation.get.cloudmin":[t],get_pre_default_content:[t]})}else{V(t);get_pre_default_content(t)}}}});var s=".select2-dropdown.aside-select2",o=function(){$.each($(""+t+" select > option"),function(){if($(this).attr("style")&&$(this).attr("style").indexOf("italic")>-1){var e=$(this);setTimeout(function(){$(s).find('li[id$="'+e.attr("value")+'"]').addClass("text-danger")},0)}})};i.on(""+a+":opening",function(){o();setTimeout(function(){var e=""+s+" .select2-search__field",t="keydown.colorfilter";$(e).off(t);$(e).on(t,function(){o()})},0);$(t).find("."+a+"-container:not(."+a+"), "+v___class_select2_leak).addClass(""+a+"-aside")});i.on(""+a+":open",function(){setTimeout(function(){var e=document.querySelector(".select2-search__field");e&&e.focus()})});i.on(""+a+":closing",function(){$(t).find("."+a+"-container, "+v___class_select2_leak).removeClass(""+a+"-aside")});if($(""+t+" select option").length===1){$(t+" ."+a+" span").css("cursor","default");$(t+" ."+a+" ."+a+"-selection__arrow").remove();i.on(""+a+":open",function(){$(t+" ."+a+"-container ."+a+"-dropdown").css("opacity","0")})}$.each($(""+t+" select > option"),function(){if($(this).attr("style")&&$(this).attr("style").indexOf("italic")>-1){var e=$($("."+a+"-selection > ."+a+"-selection__rendered")[0]);if(e.text().trim()==$(this).text().trim()){e.addClass("text-danger")}}})}})},_=function(e,t){var a=$("aside select");a.val(e).trigger("change");if(t){a.trigger("select2:select")}},d=function(){if(vars.navigation.select.back){var e=$("aside select");_(e.data("previous-value"),0);vars.navigation.select.back=false}},f=function(e,t){var i="aside .form-control.sidebar-search",n="aside .autocomplete-suggestions",s=function(e){return e&&(e.includes("http://")||e.includes("https://")||e.includes("ftp://")||e.includes("ftps://"))?1:0};if(e=="c"){$(n).remove();$(i).removeAttr("disabled");$(i).autocomplete("dispose");!get_onbeforeunload_status()&&$(i).val("");if(t){return}}var o={},r="li:not(.menu-exclude):not(.user-link)";$.each($(""+r+' > ul[id^="global_"].sub > '+r+' > a, ul.navigation > [data-after] > a, ul.navigation > li > a[href*="virtual-server/index.cgi"], ul.navigation > li > a[href*="server-manager/index.cgi"]'),function(){var e=$(this).attr("href"),t=s(e),a=(e.substring(0,1)=="/"?"":"/")+e;if(t){a=e}o[a]=$.trim($(this).text())});$('li > a[target="page"][data-href="/virtual-server/index.cgi"], '+r+' > a[target="page"][data-href="/sysinfo.cgi"], '+r+' > a[target="page"][data-href="/virtual-server/pro/history.cgi"], '+r+' > a[target="page"][data-href="/server-manager/one_history.cgi"], '+r+' > a[target="page"][data-href="/server-manager/bwgraph.cgi"], '+r+' > a[target="page"][data-href="/server-manager/history.cgi"], '+r+' > a[target="page"][data-href="/mailbox/list_folders.cgi"], '+r+' > a[target="page"][data-href="/mailbox/list_ifolders.cgi"], '+r+' > a[target="page"][data-href="/mailbox/list_addresses.cgi"], '+r+' > a[target="page"][data-href="/filter/edit_forward.cgi"], '+r+' > a[target="page"][data-href="/filter/edit_auto.cgi"], '+r+' > a[target="page"][data-href="/filter/edit_auto.cgi"], '+r+' > a[target="page"][data-href="/filter/"], '+r+' > a[target="page"][data-href="/mailbox/edit_sig.cgi"]').each(function(){o[$(this).attr("data-href")]=$.trim($(this).text())});var c=function(e){var t="🔒",a=e&&e.includes(t);return a},d=$.map(o,function(e,t){if(t!="undefined"&&!c(e)){return{value:e,url:t,data:{category:z()}}}});var f={};if(core.curModule("custom")||v___location_path==v___location_prefix+"/backup-config/"||v___location_path==v___location_prefix+"/backup-config/index.cgi"||v___location_path==v___location_prefix+"/usermin/"||v___location_path==v___location_prefix+"/usermin/index.cgi"||v___location_path==v___location_prefix+"/webmin/"||v___location_path==v___location_prefix+"/webmin/index.cgi"||v___location_path==v___location_prefix+"/acl/"||v___location_path==v___location_prefix+"/acl/index.cgi"||v___location_path==v___location_prefix+"/init/"||v___location_path==v___location_prefix+"/init/index.cgi"||v___location_path==v___location_prefix+"/mount/"||v___location_path==v___location_prefix+"/mount/index.cgi"||v___location_path==v___location_prefix+"/quota/"||v___location_path==v___location_prefix+"/quota/index.cgi"||v___location_path==v___location_prefix+"/fsdump/"||v___location_path==v___location_prefix+"/fsdump/index.cgi"||v___location_path==v___location_prefix+"/inittab/"||v___location_path==v___location_prefix+"/inittab/index.cgi"||v___location_path==v___location_prefix+"/logrotate/"||v___location_path==v___location_prefix+"/logrotate/index.cgi"||v___location_path==v___location_prefix+"/mailcap/"||v___location_path==v___location_prefix+"/mailcap/index.cgi"||v___location_path==v___location_prefix+"/pam/"||v___location_path==v___location_prefix+"/pam/index.cgi"||v___location_path==v___location_prefix+"/proc/"||v___location_path==v___location_prefix+"/proc/index_tree.cgi"||v___location_path==v___location_prefix+"/proc/index_user.cgi"||v___location_path==v___location_prefix+"/proc/index_size.cgi"||v___location_path==v___location_prefix+"/proc/index_cpu.cgi"||v___location_path==v___location_prefix+"/proc/index_tree.cgi"||v___location_path==v___location_prefix+"/proc/index_search.cgi"||v___location_path==v___location_prefix+"/cron/"||v___location_path==v___location_prefix+"/cron/index.cgi"||v___location_path==v___location_prefix+"/syslog/"||v___location_path==v___location_prefix+"/syslog/index.cgi"||v___location_path==v___location_prefix+"/logviewer/"||v___location_path==v___location_prefix+"/logviewer/index.cgi"||v___location_path==v___location_prefix+"/useradmin/"||v___location_path==v___location_prefix+"/useradmin/index.cgi"||v___location_path==v___location_prefix+"/apache/"||v___location_path==v___location_prefix+"/apache/index.cgi"||v___location_path==v___location_prefix+"/bind8/"||v___location_path==v___location_prefix+"/bind8/index.cgi"||v___location_path==v___location_prefix+"/dhcpd/"||v___location_path==v___location_prefix+"/dhcpd/index.cgi"||v___location_path==v___location_prefix+"/dovecot/"||v___location_path==v___location_prefix+"/dovecot/index.cgi"||v___location_path==v___location_prefix+"/ldap-server/"||v___location_path==v___location_prefix+"/ldap-server/index.cgi"||v___location_path==v___location_prefix+"/virtualmin-nginx/"||v___location_path==v___location_prefix+"/virtualmin-nginx/index.cgi"||v___location_path==v___location_prefix+"/fetchmail/"||v___location_path==v___location_prefix+"/fetchmail/index.cgi"||v___location_path==v___location_prefix+"/mysql/"||v___location_path==v___location_prefix+"/mysql/index.cgi"||v___location_path==v___location_prefix+"/mysql/edit_dbase.cgi"||v___location_path==v___location_prefix+"/postgresql/"||v___location_path==v___location_prefix+"/postgresql/index.cgi"||v___location_path==v___location_prefix+"/postgresql/edit_dbase.cgi"||v___location_path==v___location_prefix+"/postfix/"||v___location_path==v___location_prefix+"/postfix/index.cgi"||v___location_path==v___location_prefix+"/procmail/"||v___location_path==v___location_prefix+"/procmail/index.cgi"||v___location_path==v___location_prefix+"/proftpd/"||v___location_path==v___location_prefix+"/proftpd/index.cgi"||v___location_path==v___location_prefix+"/mailboxes/"||v___location_path==v___location_prefix+"/mailboxes/index.cgi"||v___location_path==v___location_prefix+"/mailboxes/list_mail.cgi"||v___location_path==v___location_prefix+"/mailbox/"||v___location_path==v___location_prefix+"/mailbox/index.cgi"||v___location_path==v___location_prefix+"/samba/"||v___location_path==v___location_prefix+"/samba/index.cgi"||v___location_path==v___location_prefix+"/spam/"||v___location_path==v___location_prefix+"/spam/index.cgi"||v___location_path==v___location_prefix+"/squid/"||v___location_path==v___location_prefix+"/squid/index.cgi"||v___location_path==v___location_prefix+"/sshd/"||v___location_path==v___location_prefix+"/sshd/index.cgi"||v___location_path==v___location_prefix+"/webalizer/"||v___location_path==v___location_prefix+"/webalizer/index.cgi"||v___location_path==v___location_prefix+"/cpan/"||v___location_path==v___location_prefix+"/cpan/index.cgi"||v___location_path==v___location_prefix+"/htaccess-htpasswd/"||v___location_path==v___location_prefix+"/htaccess-htpasswd/index.cgi"||v___location_path==v___location_prefix+"/status/"||v___location_path==v___location_prefix+"/status/index.cgi"||v___location_path==v___location_prefix+"/net/"||v___location_path==v___location_prefix+"/net/index.cgi"||v___location_path==v___location_prefix+"/tcpwrappers/"||v___location_path==v___location_prefix+"/tcpwrappers/index.cgi"||v___location_path==v___location_prefix+"/fdisk/"||v___location_path==v___location_prefix+"/fdisk/index.cgi"||v___location_path==v___location_prefix+"/fail2ban/"||v___location_path==v___location_prefix+"/fail2ban/index.cgi"||v___location_path==v___location_prefix+"/nis/"||v___location_path==v___location_prefix+"/nis/index.cgi"||v___location_path==v___location_prefix+"/passwd/"||v___location_path==v___location_prefix+"/passwd/index.cgi"){$($(".container-fluid .panel-body a[href]:not([href*='javascript'],[href*='list_users.cgi?dom'],[href*='edit_hdparm.cgi?disk'],[href*='blink.cgi?disk'],[href*='smart-status/index.cgi?drive'],[href*='help.cgi'],[href*='edit_user.cgi?new='],[href*='edit_user.cgi?idx='],[href*='edit_recipe.cgi'],[href*='up.cgi'],[href*='down.cgi'],[href*='virt_index.cgi'],[href*='save_log.cgi'],[href*='backup.cgi'],[href*='activate.cgi'],[href*='#'])")).each(function(){if(v___location_path==v___location_prefix+"/syslog/"||v___location_path==v___location_prefix+"/syslog/index.cgi"||v___location_path==v___location_prefix+"/logviewer/"||v___location_path==v___location_prefix+"/logviewer/index.cgi"){f["/"+v___location_path_lead_unslashed+$(this).parent("td").next("td[data-td-e]").next("td[data-td-e]").next("td[data-td-e]").find("a").attr("href")]=$.trim($(this).text())}else{if(v___location_path==v___location_prefix+"/backup-config/"||v___location_path==v___location_prefix+"/backup-config/index.cgi"){$description=$.trim($(this).parent("td").next("td[data-td-e]").next("td[data-td-e]").text())}else{if(v___location_path==v___location_prefix+"/mount/"||v___location_path==v___location_prefix+"/mount/index.cgi"||v___location_path==v___location_prefix+"/quota/"||v___location_path==v___location_prefix+"/quota/index.cgi"){$description=$.trim($(this).parent("td").next("td[data-td-e]").next("td[data-td-e]").text())}else{if(v___location_path==v___location_prefix+"/fsdump/"||v___location_path==v___location_prefix+"/fsdump/index.cgi"){$description=$.trim($(this).parents("td").next("td").next("td").next("td").find("label").find("tt").find("tt").text())}else{if(v___location_path==v___location_prefix+"/proc/"||v___location_path==v___location_prefix+"/proc/index_tree.cgi"||v___location_path==v___location_prefix+"/proc/index_user.cgi"||v___location_path==v___location_prefix+"/proc/index_size.cgi"||v___location_path==v___location_prefix+"/proc/index_cpu.cgi"||v___location_path==v___location_prefix+"/proc/index_tree.cgi"||v___location_path==v___location_prefix+"/proc/index_search.cgi"){if(v___location_path==v___location_prefix+"/proc/index_size.cgi"||v___location_path==v___location_prefix+"/proc/index_cpu.cgi"){$description=$.trim($(this).parent("td").next("td[data-td-e]").text())+" — "+$.trim($(this).parent("td").next("td[data-td-e]").next("td[data-td-e]").text())+" - "+$.trim($(this).parents("td").next("td").next("td").next("td").text())}else{if(v___location_path==v___location_prefix+"/proc/index_search.cgi"){$description=$.trim($(this).parent("td").next("td[data-td-e]").text())+" — "+$.trim($(this).parent("td").next("td[data-td-e]").next("td[data-td-e]").text())+" - "+$.trim($(this).parents("td").next("td").next("td").next("td").next("td").text())}else{$description=$.trim($(this).parent("td").next("td[data-td-e]").text())+" — "+$.trim($(this).parents("td").next("td").next("td").next("td").text())}}}else{if(v___location_path==v___location_prefix+"/useradmin/"||v___location_path==v___location_prefix+"/useradmin/index.cgi"){$description=$.trim($(this).parents("td").next("td").find("label").text())+" — "+$(this).text()+":"+$.trim($(this).parents("td").next("td").next("td").find("label").text())+" - "+$.trim($(this).parents("td").next("td").next("td").next("td").next("td").find("label").text())+", "+$.trim($(this).parents("td").next("td").next("td").next("td").next("td").next("td").find("label").text())}else{if(v___location_path==v___location_prefix+"/mailboxes/list_mail.cgi"||v___location_path==v___location_prefix+"/mailbox/"||v___location_path==v___location_prefix+"/mailbox/index.cgi"){$description=$.trim($(this).parents("td").next("td").next("td").next("td").find("label").text())+" — "+$.trim($(this).parents("td").next("td").find("label").text())+" ["+$.trim($(this).parents("td").next("td").next("td").find("label").text())+"]"}else{if(v___location_path==v___location_prefix+"/cpan/"||v___location_path==v___location_prefix+"/cpan/index.cgi"){$description=$.trim($(this).parents("td").next("td").next("td").find("label").text())}else{if(v___location_path==v___location_prefix+"/fdisk/"||v___location_path==v___location_prefix+"/fdisk/index.cgi"){$description=$.trim($(this).parent("td").next("td[data-td-e]").text())+" - "+$.trim($(this).parent("td").next("td[data-td-e]").next("td[data-td-e]").text())}else{$description=$.trim($(this).parent("td").next("td[data-td-e]").text())}}}}}}}}$description?$_description=true:$_description=false;var e=$.trim($(this).text());if(core.curModule("bind8")){var t=$(this).parents("form").prev("br").prev("b").find("tt");if(t.length){var a=t.text(),i=!$(this).parent(".ui_links_row").length;if(i&&a){e=e+" ("+a+")"}}}f[($(this).attr("href").substring(0,1)=="/"?"":"/")+v___location_directory_unslashed_trail_slashed+$(this).attr("href")]=e+($_description?" (":"")+$description+($_description?")":"")}})}var p=$.map(f,function(e,t){if(t!="undefined"){return{value:e,url:t,data:{category:get_module_title()}}}});var u={};$.each($(""+r+' > ul.sub:not([id^="global_"]) > '+r+' > a, ul.navigation > [data-linked]:not([data-after]) > a:not([href*="virtual-server/index.cgi"]):not([href*="server-manager/index.cgi"])'),function(e,t){u[($(this).attr("href").substring(0,1)=="/"?"":"/")+$(this).attr("href")]=$.trim($(this).text())});$(""+r+' > a[target="page"]:not([data-href="/acl/edit_user.cgi"],[data-href="/virtual-server/index.cgi"],[data-href="/sysinfo.cgi"],[data-href="/virtual-server/pro/history.cgi"], [data-href="/mailbox/list_folders.cgi"], [data-href="/mailbox/list_ifolders.cgi"], [data-href="/mailbox/list_addresses.cgi"], [data-href="/filter/edit_forward.cgi"], [data-href="/filter/edit_auto.cgi"], [data-href="/filter/edit_auto.cgi"], [data-href="/filter/"], [data-href="/mailbox/edit_sig.cgi"])').each(function(e,t){if(!$t_uri_usermin&&!y()){u[$(this).attr("data-href")]=$.trim($(this).text())}});var g=$.map(u,function(e,t){if(t!="undefined"){var a=c(e);return{value:a?"":e,url:a?"":t,data:{category:$("aside .select2-selection__rendered").text()?''+$("aside .select2-selection__rendered").clone().children().remove().end().text()+"":z()}}}});var m={};$("aside select option").each(function(){m[$(this).val()+":::"+$(this).parent("select").attr("name")]=$.trim($(this).text())});var h=$.map(m,function(e,t){if(t!="undefined"){return{value:e,url:t,data:{category:$("aside select").data("autocomplete-title")}}}});var v=h.concat(p).concat(g).concat(d);try{const e="x-hidden";$.map(v,function(t,a){if(typeof settings_autocomplete_extra_associations_privileged==="object"){var i=session.server.data("language"),n=settings_autocomplete_extra_associations_privileged[i]?settings_autocomplete_extra_associations_privileged[i]:settings_autocomplete_extra_associations_privileged.en;if(typeof n==="object"){for(const[i,s]of Object.entries(n)){if(typeof s==="object"){for(const[i,n]of Object.entries(s)){if(typeof n==="object"){for(const[s,o]of Object.entries(n)){if(t&&t.url&&t.url.includes(i+"/")&&t.url.includes(o[0]+".cgi")){t.value=t.value+"<"+e+">"+o[1]+"";v[a]=t}}}else{if(t&&t.url&&(t.url.endsWith("/"+i+"/")||t.url.endsWith("/"+i+"/index.cgi"))){t.value=t.value+"<"+e+">"+n+"";v[a]=t}}}}}}}})}catch(e){}$(i).on("keydown",function(e){if(e.keyCode==34||e.keyCode==33||e.keyCode==20||e.keyCode==17||e.keyCode==16||e.keyCode==9){e.preventDefault();e.stopPropagation()}});$(i).autocomplete({lookup:v,orientation:"auto",onSelect:function(e,t){var i=$.Autocomplete.externalEvent;if(!$.isEmptyObject(i)){var n=i.keyCode?i.keyCode:i.which;if(i.ctrlKey||i.shiftKey||i.altKey||i.metaKey||n===20||n===32||n===33||n===34||n===35||n===36||n===37||n===38||n===39||n===40||n===45||n===46||n===112||n===113||n===114||n===115||n===116||n===117||n===118||n===119||n===120||n===121||n===122||n===123||n===144||n===145){return}}if(y()===true&&$t_uri_dashboard&&get_access_level()!=2&&get_access_level()!=4){C("webmin")}$(this).val("").blur();l();var o=s(e.url);if(e.url.substring(0,1)=="/"||o){var r=e.url&&(o||e.url.includes("/file/")||e.url.includes("/cwaf/")||e.url.includes("virtual-server/pro/history.cgi")||e.url.includes("server-manager/bwgraph.cgi")||e.url.includes("server-manager/history.cgi")||e.url.includes("server-manager/one_history.cgi"));if(r){theme_open_new_tab(e.url,1);return}else{var c=e.url;if(v___location_prefix&&!c.startsWith(v___location_prefix)){c=v___location_prefix+c}if(Test.strContains(v___location_prefix,v___target_servers_index)&&c&&c.endsWith("/servers/")){return}if(c&&(c.includes("switch_user.cgi")||c.includes("/shell")||c.includes("shell=1"))){set_onbeforeunload_status(0,0);$('aside [data-linked] a[href="'+e.url+'"]').click();return}if(get_onbeforeunload_status()){if(t){t.preventDefault()}get_onbeforeunload_message([],{href:c})}else{get_pjax_content(c,["reference"])}}}else if(e.url&&e.url.indexOf(":::")>-1){var d=e.url.split(":::")[0];if(get_onbeforeunload_status()){get_onbeforeunload_message(g,this,{"plugins.navigation.select.set":[d,1]})}else{a();_(d,1)}}},groupBy:"category"})},p=function(){var e="data-goto",t=$("aside").find("li["+e+"]"),a=t.attr(e);t.remove();return a},u=function(){const e=$t_uri_virtualmin?"virtualmin":$t_uri_cloudmin?"cloudmin":false;if(e){if(e=="virtualmin"){U(location.href)}else if(e=="cloudmin"){Z(location.href)}}},g=function(e,t){if(get_onbeforeunload_status()){return}var e=typeof e=="undefined"||e==-1||e==""?$("aside select").val():e,a=$t_uri_virtualmin?"virtualmin":$t_uri_cloudmin?"cloudmin":$t_uri_usermin?"usermin":$t_uri_webmin?"webmin":"mail";if(a=="webmin"){C("webmin");I("webmin",t)}else if(a=="virtualmin"){C("virtualmin");T(e,t)}else if(a=="cloudmin"){C("cloudmin");V(e,t)}else if(a=="usermin"){C("usermin");I("usermin",t)}else if(a=="mail"){C("webmail");I("webmail",t)}},m=function(e,t){if(!t){t=600}var i=e?" #open_"+e+"":' [id^="open_"]',n=$(".switch-toggle"+i+":checked");if(n.length){a();var s=0;if(!s){s++;setTimeout(function(){n.click()},t)}}},h=function(e){var t="aside",a="form",i=a+"s",n="select",s=$(t+" "+n),o=s.data(n+"2"),r=$(t+" .sidebar-search").val();if(r){return}if(!e){vars.navigation.select.obj=o&&o!="undefined"&&!e&&s.select2("isOpen")}if(!e){if(o){s.select2("destroy")}$.each($(t).find(a),function(){$(this).replaceTagName(i)})}else{$.each($(t).find(i),function(){$(this).replaceTagName(a)}).promise().done(function(){c(vars.navigation.select.obj)})}},v=function(){if(vars.navigation.width_initial===false){vars.navigation.width_initial=settings_leftmenu_width}if(matchMedia("(max-width: 1080px)").matches||$("html").attr("data-navigation-collapsed")=="1"){settings_leftmenu_width=260;page_adjust(settings_leftmenu_width,0)}else{if(v___initial_load===1){return}settings_leftmenu_width=vars.navigation.width_initial;page_adjust(settings_leftmenu_width,settings_leftmenu_width)}},y=function(){if(x("dashboard")=="1"){return true}else{return false}},x=function(e){if(e){e='[id="open_'+e+'"]'}else{e=String()}return $(".switch-toggle input"+e+"").length},k=function(){C("dashboard");e();get_pjax_content(v___location_prefix+"/sysinfo.cgi")},w=function(){if(Test.string(S)){C(S)}},A=function(){var e=$('aside .switch-toggle [name="product-switcher"]:checked').attr("id");if(typeof e==="string"){return e.replace("open_","")}return null},C=function(e){if(get_onbeforeunload_status()){return}$('.switch-toggle input:not([id="open_'+e+'"])').each(function(){$(this).removeAttr("checked")}).promise().done(function(){var t=$("#open_"+e),a='.dynamic[name="product-switcher"]';if(!t.length){$(a).first().prop("checked",true)}else{$("#open_"+e).prop("checked",true)}});q()},S=setTimeout(A),I=function(n,s){if(get_onbeforeunload_status()){return}a();var o=n=="webmail"?"webmail":session.server.data("product");C(o);vars.ajax.processing.navMenu&&vars.ajax.processing.navMenu.abort();vars.ajax.processing.navMenu=$.ajax({type:"GET",url:v___location_prefix+"/xhr.cgi?type=nav&action=get&subtype="+o,dataType:"JSON",success:function(e){S=o;$("body ul.navigation").html(e.menu);plugins.shell.link();i();!session.server.data("loading")&&t();if(n==="webmail"&&settings_mail_ui&&get_access_level()==3){typeof mail==="object"&&typeof mail.folders==="object"&&typeof mail.folders.get==="function"?mail.folders.get():load.bundle(v___server_extensions_path+"/mail/mail",1,["mail.folders.get()"])}setTimeout(function(){if(typeof s==="function"){s.call()}},10)},error:function(t){session.status(t.responseText);i();e()}})},T=function(n,s){if(get_onbeforeunload_status()){return}a();C("virtualmin");vars.ajax.processing.navMenu&&vars.ajax.processing.navMenu.abort();vars.ajax.processing.navMenu=$.ajax({type:"GET",url:v___location_prefix+"/xhr.cgi?type=nav&action=get&subtype=virtualmin&dom="+n+"",dataType:"JSON",success:function(e){S="virtualmin";$("body ul.navigation").html(e.menu);plugins.shell.link();i();!session.server.data("loading")&&t();setTimeout(function(){if(typeof s==="function"){s.call()}},10)},error:function(t){session.status(t.responseText);i();e()}})},V=function(n,s){if(get_onbeforeunload_status()){return}a();C("cloudmin");vars.ajax.processing.navMenu&&vars.ajax.processing.navMenu.abort();vars.ajax.processing.navMenu=$.ajax({type:"GET",url:v___location_prefix+"/xhr.cgi?type=nav&action=get&subtype=cloudmin&sid="+n+"",dataType:"JSON",success:function(e){S="cloudmin";$("body ul.navigation").html(e.menu);plugins.shell.link();i();!session.server.data("loading")&&t();setTimeout(function(){if(typeof s==="function"){s.call()}},10)},error:function(t){session.status(t.responseText);i();e()}})},E=function(){const e=$("body > .mobile-menu-toggler");if(!e.is(":visible")){return true}return e.offset().left>1},j=function(){const e=$("body > .mobile-menu-toggler:visible");if(e.length&&!E()){e.trigger("click")}},O=function(){const e=$("body > .mobile-menu-toggler:visible");if(e.length&&E()){e.trigger("click")}},z=function(){if($t_uri_webmin){return theme_language("titles_wm")}else if($t_uri_usermin){return theme_language("titles_um")}else if($t_uri_virtualmin){return theme_language("titles_vm")}else if($t_uri_cloudmin){return theme_language("titles_cm")}else if($t_uri_webmail){return theme_language("titles_mail")}else if($t_uri_dashboard){return theme_language("titles_dashboard")}},M=function(e,t){if($t_uri_webmin){return"webmin"}else if($t_uri_usermin){return"usermin"}else if($t_uri_dashboard){return"dashboard"}else if($t_uri_virtualmin){if(t){return"virtualmin"}else if(e){return"virtualserver"}else{return"virtual-server"}}else if($t_uri_cloudmin){if(t){return"cloudmin"}else if(e){return"servermanager"}else{return"server-manager"}}else if($t_uri_webmail){return"mailbox"}},q=function(){$t_uri_webmin=$('.switch-toggle input[id="open_webmin"]:checked').length?1:0;$t_uri_usermin=$('.switch-toggle input[id="open_usermin"]:checked').length?1:0;$t_uri_virtualmin=$('.switch-toggle input[id="open_virtualmin"]:checked').length?1:0;$t_uri_cloudmin=$('.switch-toggle input[id="open_cloudmin"]:checked').length?1:0;$t_uri_webmail=$('.switch-toggle input[id="open_webmail"]:checked').length?1:0;$t_uri_dashboard=$('.switch-toggle input[id="open_dashboard"]:checked').length?1:0},U=function(e){var e=typeof e==="object"?e.attr("href"):e,t=URI.parseQuery(URI(e).query())["dom"]||URI.parseQuery(URI(e).query())["gparent"],a=$('select[name="dom"]'),i=a.val();if(t&&t!=i){T(t)}},Z=function(e){var e=typeof e==="object"?e.attr("href"):e,t=URI.parseQuery(URI(e).query())["id"],t=!t?URI.parseQuery(URI(e).query())["d"]:t,a=$('select[name="sid"]'),i=a.val();if(t&&t!=i){V(t)}},J=function(){if(settings_mail_ui&&(v___location_file==="view_mail.cgi"||v___location_file==="send_mail.cgi"||v___location_file==="reply_mail.cgi")){return true}return false};return{reset:e,select:{set:_,back:d,load:c},detect:t,detectAllowed:true,load:{start:a,stop:i},collapse:l,reload:g,sync:u,update:m,deform:h,lock:v,switch:{dashboard:{get:y,set:k},available:x,get:A,set:C,reset:w},get:{webmin:I,virtualmin:T,cloudmin:V},intersect:{virtualmin:U,cloudmin:Z},state:{opened:E,close:O,open:j,title:z,module:M,update:q,loading:o,target:p}}}();plugins.messenger=function(){var e=function(e){e=e||"toastid_-_";return e+Date.now()+""+parseInt(Math.random()*1e6)},t=function(t,a,i,n,s,o,r){var l,c=function(e){return e==="info"||e==="success"||e==="warning"||e==="error"?e:"show"},_=c(i),d=function(e){var t=String();if(e&&e.includes("fa2")){t="2"}return"fa%pack fa%pack-%ico".replace(/%pack/g,t).replace(/%ico/,e)},f=function(e){return"placed-"+(e.position||"bottomCenter")+""+" type-"+e.type+""+" message-length-"+(e.message.length<=32?32:e.message.length<128?128:e.message.length<256?256:e.message.length<384?384:e.message.length<512?512:"1024")+""+" message-delay-"+(Test.numeric(e.timeout)&&parseInt(e.timeout)<=5?"short":"long")+" message-delay-timeout-"+parseInt(e.timeout)+""};if(typeof t==="object"&&!$.isEmptyObject(t)&&!$.isArray(t)){l=t;if(l.id){l.id="toastid_-_"+l.id+""}_=c(l.type);l.type=_;if(l.icon){l.icon=d(l.icon)}l.class=(l.class?l.class+" ":String())+f(l)}else{n=n?"toastid_-_"+n+"":null;s=typeof s=="undefined"?true:Boolean(s);o=$.isArray(o)&&o.length?o[1]?(o[1]=Convert.strUpFirst(o[1].toString()),o.join("")):o.join(""):"bottomCenter";var p=2;var u={};if(!$.isEmptyObject(r)){var g=r.cancel.label,m=r.cancel.action;u=plugins.messenger.toast.construct.button(g,m);p=1}var h=null,v=null,b;if($.isArray(t)){h=t[0]||"";v=t[1]}else if(typeof t==="string"&&t&&(b=t.match(/<*.?class=["'](.*?)["']><\/*.?>(.*)/))){h=b[1];v=b[2]}else{v=t}if(h){h=d(h)}if(!v){console.warn("Cannot post notification toast as message text is missing");return}var y=a=="0"?false:parseInt(a)||2;l={icon:h,title:String(),message:v,position:o,class:f({position:o,message:v,type:_,timeout:y}),id:n,close:s,buttons:u,layout:p,timeout:y?y*1e3:y}}if(!l.id){l.id=e()}if(!l.zindex){l.zindex=10010}if(typeof iziToast==="object"){iziToast[_](l);return $("#"+l.id)}else{console.warn("Cannot load iziToast notification plugin")}},a=function(t){defaults={timeout:2e4,close:false,overlay:true,zindex:999999999,displayMode:"once",id:e(),color:"yellow",position:"center",buttons:[["",function(e,t){e.hide({transitionOut:"fadeOut"},t,"yes")},true],["",function(e,t){e.hide({transitionOut:"fadeOut"},t,"no")}]],onClosing:function(e,a,i){if(i==="yes"&&t.onCloseCallback&&typeof t.onCloseCallback==="function"){setTimeout(function(){t.onCloseCallback.call()},101)}}};defaults=$.extend(defaults,t||{});iziToast.question(defaults);return $("#"+defaults.id)},i={get:function(e){var t=$(document).find("#toastid_-_"+e+"");return t.length?t:null},hide:function(e){var t=this.get(e);if(t&&t.length){iziToast.hide({},t[0])}},destroy:function(e){var t=this.get(e);if(t&&t.length){$("#toastid_-_"+e+"").parent(".iziToast-capsule").remove()}}},n=function(e,t,a){if(e==="reset"){t="keyup";a={holdModifer:~~!false}}if(e==="reset"||e==="message-user-select"){var i=$(".iziToast > .iziToast-body > .iziToast-texts > .iziToast-message");a.holdModifer&&i.toggleClass("user-select-all",t==="keydown")}};document.addEventListener("DOMContentLoaded",function(){iziToast.settings({timeout:2e3,drag:$.browser.mobile,transitionIn:"fadeIn",transitionOut:"fadeOut",animateInside:false,position:"bottomCenter",layout:2,displayMode:2})});return{post:t,ask:a,toast:{get:i.get,hide:i.hide,destroy:i.destroy,hideAll:iziToast.destroy,construct:{button:function(t,a){var i=e("toastBtnClose");return[["",function(e,t){e.hide({onClosing:function(e,t,n){if(n===i){if(typeof a==="function"){a.call(this,t)}}}},t,i)},true]]}}},events:n}}();plugins.upload=function(e){e.removeAttr("onsubmit");e.on("submit.fm",function(e){e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();var t=dayjs().unix()+""+parseInt(Math.random()*1e5),a=$(this),i=a.find(".ui_form_end_submit"),n=a.find('input[type="file"]')[0],s=n.files.length,o=a.find('input[name="dir"]').val(),r=$(n.files).map(function(e,t){return t.name}).get(),l=r.join("\n"),c=function(){theme_restore_buttons_class();$.fn.bootstrapFileInputReset(a);despinnerfy_buttons(0,i);i.addClass("disabled")},_=function(){if(s>1){plugins.messenger.post(''+theme_language("upload_successful").replace("$1",""+s+"").replace("$2","`"+o+"`").replace("'+theme_language("upload_successful_single").replace("$1",""+s+"").replace("$2","`"+o+"`").replace("'+theme_language("global_error")+": "+a.replace(/\s:\s/g," — "),15,"error","uploadError_"+t+"",0,["top","right"]);return 1}else{return 0}};spinnerfy_buttons(i);window["progress_id_ref_"+t]=$.ajax({type:"POST",url:"upload.cgi?id="+t+"",processData:false,contentType:false,data:new FormData(a[0]),complete:function(e){c();if(d(e)){return}e.status===200&&_()},error:function(){$("[data-progress-id="+t+"] .bottom_progress_cancel").trigger("click")}});theme_message_dismiss("upload_error");var f=1;window["progress_id_ref_"+t+"_tracker"]=$.ajax({xhr:function(){var e=new window.XMLHttpRequest,a=0;e.addEventListener("progress",function(e){var i=e.target.responseText,n=/.file\.value\s+=\s+"(.*)";/g,s=/.size\.value\s+=\s+"(.*)";/g,o=/.pc\.value\s+=\s+"(.*)";/g,r=regex.matches(i,n,0,1),l=regex.matches(i,s,0,1),_=regex.matches(i,o,0,1);if(l){if(f){f=0;c()}var _=_||a?parseInt((_.match(/|/g)||[]).length/50*100):0;if(!_){a++}if(_>100){_=100}progress_percent.control(t,"success",_,[r,l,_])}if(!session.status(i)){window["progress_id_ref_"+t].abort();window["progress_id_ref_"+t+"_tracker"].abort();return}},false);return e},type:a.attr("method"),url:v___location_prefix+"/uptracker.cgi?id="+t+"&uid="+(get_access_level()===0||get_access_level()===1?"":session.server.data("user-id"))+"",complete:function(e){if(f){f=0;c()}if(theme_message_exists("uploadError_"+t+"")){return}e.status===200&&_()}})})};plugins.filter={options:function(e){var t='body[data-uri*="/'+v___location_file+'"] form[action="'+v___location_file+'"]',a="autocomplete-suggestions",i=" .select2 + .end_submits",n=i+" > .btn-group > .dropdown-toggle",s=$(n).parent(),o=n+" + ul",r=o+" > li ",l=r+" > input";var c=function(){$(l).autocomplete({lookup:e&&e.data?e.data:config_quick_access,minChars:0,appendTo:$(r),onSearchComplete:function(){var e=$(this).next("."+a+"");width=e.outerWidth()-20;parseInt(width)>0&&$(this).width(width)},onSelect:function(a){var i=$.Autocomplete.externalEvent;if(!$.isEmptyObject(i)){var s=i.keyCode?i.keyCode:i.which;if(i.ctrlKey||i.shiftKey||i.altKey||i.metaKey||s===20||s===32||s===33||s===34||s===35||s===36||s===37||s===38||s===39||s===40||s===45||s===46||s===112||s===113||s===114||s===115||s===116||s===117||s===118||s===119||s===120||s===121||s===122||s===123||s===144||s===145){return}}data_url_query=v___location_file+"?module="+($(t).find('input[name="module"]').val()||"")+"§ion=";if(e&&e.url){data_url_query=e.url}var o=data_url_query+a.section+"&search="+($(this).val()||"");$(this).val("").blur();$(n).parent().trigger("click");$(this).autocomplete("dispose");get_pjax_content(o)},groupBy:"category",showNoSuggestionNotice:true,noSuggestionNotice:theme_language("global_no_results_found")})};if(e&&e.unlock){s.removeClass("cursor-na").find(".dropdown-toggle").removeClass("pointer-events-none").find(".cspinner").remove()}s.attr("data-placement","auto top").data("placement","auto top").tooltip("fixTitle");if(e&&e.tooltip&&e.tooltip.title){s.attr("data-original-title",theme_language(e.tooltip.title)).data("original-title",theme_language(e.tooltip.title)).attr("data-title",theme_language(e.tooltip.title)).data("title",theme_language(e.tooltip.title)).tooltip("fixTitle")}$(n).parent().on("hidden.bs.dropdown",function(){$(l).val("").blur().trigger("input")});$(n).parent().on("shown.bs.dropdown",function(){var e=$(this);c();$(l).focus();$(l).on("keydown.configauto",function(e){if(!e.ctrlKey&&!e.altKey&&!e.shiftKey&&!e.metaKey){var t=$(this).next("."+a+"");if(t&&t.length){t[0].scrollTop=0}$(this).off("keydown.configauto")}});var t=$(i).prev().prev("select"),n=t.val();if(n){var s=t.find('option[value="'+n+'"]').text(),o=$(i).find("."+a+""),r=o.find("strong:contains("+s+")");if(r&&r.length){r[0].parentNode.parentNode.scrollTop=r[0].offsetTop}}$(l).off("keydown.cqa").on("keydown.cqa",function(t){if(t.keyCode==13){t.preventDefault()}if(t.keyCode==27){e.trigger("click")}})});var _=uri_parse_param("search");if(_){var d=$('.container-fluid td:contains("'+_+'")').last().parent();if(d&&d.length){d[0].scrollIntoView();setTimeout(function(){var e="vertical";d.find("td").first().addClass("faa-"+e+"-narrow animated animated-count-1");setTimeout(function(){var e=d.find("td").last().find('input:not([type="radio"]), input[type="radio"]:checked, textarea, select').first();if(e&&e.length){e[0].focus()}},740)},0)}}}};plugins.pjax=function(){var e={_:null,set:function(e){this._=e},get:function(e){return this._?this._.getResponseHeader(e):null},getAll:function(){if(this._){var e=this._.getAllResponseHeaders(),t=e.trim().split(/[\r\n]+/),a={};t.forEach(function(e){var t=e.split(": ");var i=t.shift();var n=t.join(": ");a[i]=n});return a}else{return null}},send:{data:{},set:function(e){this.data=e},get:function(){var e=this.data;this.data={};return e}}},t={refresh:function(e,t){this.modal=$(".modal.in").length;if(this.modal&&!t){console.warn("Cannot refresh the page with opened modal window");return}else if(t){$(".modal.in").modal("hide")}if(location.pathname&&location.pathname.includes("/xerror")){window.history.back();console.warn("Cannot refresh error page. Commanded the browser to move back one page in the session history");return}if(e){set_onbeforeunload_status(0,0)}if(get_onbeforeunload_status()){get_onbeforeunload_message(false,"get_pjax_content(v___location_resource, false, false)","ev")}else{var a=vars.previous_request,i=vars.source_request,n=unbuffered_header_processor_allow(a&&a.target?a.target.action:false);if(a.type==="submit"){if(Test.str_contains_multi(a.target.action,["new","delete","add","remove"])||Test.str_contains_multi_regex($(a.currentTarget).serialize(),"::M::=[^0&\\s]",["new","delete","add","remove"])){var s=$('.container-fluid form [data-entry="view_refresh"]');if(s&&s.length===1){s.trigger("click")}console.warn("Cannot refresh modifier page");return}get_pjax_action_submit(a,false)}else{if(n&&i.length){get_pjax_content(i,false,false)}else{get_pjax_content(v___location_resource,false,false)}}}},link:{alter:function(e){const t=function(e){var t=e,a=function(){var e=localStorage.getItem(v___server_hostname+"-"+v___server_username+"-"+"fm-last-visited-dir");return e},i=a();if(i&&(t&&typeof t==="string"&&t.includes("/"+v___module_file_manager))){if(!uri_parse_param2("path",e)){var n="path="+i;if(t.includes(".cgi")){if(t.includes(".cgi?")){t+="&"+n}else{t+="?"+n}}else{t+="/index.cgi?"+n}t.replace(/[\/]+/g,"/");return t}return e}return e};e=t(e);return e}},interaction:{set:function(e){this.last=e},get:function(e){this.now=Date.now();if(e){return[this.last,this.now]}else{return parseInt((this.now-(this.last||this.now))/1e3)}}},events:{reset:function(){this.beforeSend._=[];this.start._=[];this.success._=[];this.complete._=[];this.beforeReplace._=[];this.end._=[]},beforeSend:{_:[],set:function(e){typeof e==="function"&&this._.push(e)},get:function(){!$.isEmptyObject(this._)&&this._.forEach(function(e){e.call()});this._=[]}},start:{_:[],set:function(e){typeof e==="function"&&this._.push(e)},get:function(){!$.isEmptyObject(this._)&&this._.forEach(function(e){e.call()});this._=[]}},success:{_:[],set:function(e){typeof e==="function"&&this._.push(e)},get:function(){!$.isEmptyObject(this._)&&this._.forEach(function(e){e.call()});this._=[]}},complete:{_:[],set:function(e){typeof e==="function"&&this._.push(e)},get:function(){!$.isEmptyObject(this._)&&this._.forEach(function(e){e.call()});this._=[]}},beforeReplace:{_:[],set:function(e){typeof e==="function"&&this._.push(e)},get:function(){!$.isEmptyObject(this._)&&this._.forEach(function(e){e.call()});this._=[]}},end:{_:[],set:function(e){typeof e==="function"&&this._.push(e)},get:function(){!$.isEmptyObject(this._)&&this._.forEach(function(e){e.call()});this._=[]}}}};return{headers:{set:e.set,get:e.get,getAll:e.getAll,send:e.send},page:{refresh:t.refresh,link:t.link,interaction:{set:t.interaction.set,get:t.interaction.get},events:{reset:t.events.reset,beforeSend:{set:t.events.beforeSend.set,get:t.events.beforeSend.get},start:{set:t.events.start.set,get:t.events.start.get},success:{set:t.events.success.set,get:t.events.success.get},complete:{set:t.events.complete.set,get:t.events.complete.get},beforeReplace:{set:t.events.beforeReplace.set,get:t.events.beforeReplace.get},end:{set:t.events.end.set,get:t.events.end.get}}}}}();plugins.page=function(){const e={register:function(){(function(e){var t=plugins.pjax.headers.get("refresh");e.clear();if(Test.numeric(t)){t=parseInt(t);if(t>=1){e.refreshTimer=setInterval(function(){var e=$(quirks.active_element());if(!e.is('input[type="search"]')&&!e.is('input[type="text"]')&&(vars.page_interaction<=0||plugins.pjax.page.interaction.get()>4)){plugins.pjax.page.refresh()}},t*1e3)}}})(e.refresh)},refresh:{clear:function(){typeof this.refreshTimer==="number"&&clearInterval(this.refreshTimer)}},mousemove:function(){const e=$(document.body),t="mousemove.tracker",a="#content";e.off(t,a);if(!settings_auto_open_panels_on_proximity){return}if(matchMedia("(any-hover: hover)").matches&&(matchMedia("(max-width: 1080px)").matches||parseInt(session.server.data("data-navigation-collapsed")))){e.on(t,a,function(e){const t=$(window).width(),a=this;if(e.pageX<=15&&!a._leftA&&!a._leftAStart){a._leftAStart=true;setTimeout(function(){a._leftA=true},vars.navigation.animation_speed*1.7+3);plugins.navigation.state.open()}else if(e.pageX>15&&a._leftA){a._leftA=false;a._leftAStart=false;plugins.navigation.state.close()}if(e.pageX>=t-15&&a._rightA&&a._rightAStart){a._rightAStart=false;setTimeout(function(){a._rightA=false},vars.navigation.animation_speed*1.7+3);plugins.slider.open()}else if(e.pageX .panel > .panel-body [data-row-type="ui-table"]'),_=c.length,d=matchMedia("(max-width: 992px)").matches,f=function(e,t){const a=e.closest('[data-row-type="ui-table"]');a.attr("data-column-span","all");if(t){a.attr("data-column-locked","1")}},p=function(e){e.attr({"data-column-span":"all","data-column-separator":"1","data-column-locked":"1"})},u=function(e,t){e.attr({"data-column-span":"all"});if(t){e.attr("data-column-locked","1")}},g=function(e){e.not("[data-column-locked]").removeAttr("data-column-span");e.find("[data-content-separator]").remove()},m=function(){const e=['[data-tbody-type="ui-table"]'];e.forEach(function(e){const t=document.querySelectorAll(e);t.forEach(function(e){const t=$(e).find('input[name="all_mins"], input[name="all_hours"], input[name="all_days"], input[name="all_months"], input[name="all_weekdays"]');if(t.length===10){const e=t.first();f(e,true);u(e.closest('[data-row-type="ui-table"]').prev("tr"),true);const a=e.closest("table");if(a.hasClass("table-hardcoded")){a.removeClass().addClass("table table-striped table-condensed no-hover").parent("td").removeClass().addClass("col_value col_header").parent("tr").attr({"data-row-type":"ui-table","data-column-span":"all","data-column-locked":"1"})}}const a=[".ui_multi_select_row",".opener_table_cell_style_small",".vui_features_sorted_grid",".opener_table_style",".CodeMirror",".dnd_updown","table.no-hover",'textarea[name="extracas"]','[data-radio-table] textarea[name="paste"]','input[name="php_log"]','input[name="resources_mode"]','textarea[name="dns"]','textarea[name="namedconf"]','textarea[name="web"]','textarea[name="disabled_web"]','textarea[name="logrotate"]','textarea[name="logrotate_files"]','textarea[name="ftp"]','input[name="ftp_dir"]',".col_value > textarea:only-child","[data-table-backup-mode]",'textarea[name="settings_leftmenu_custom_links"]',"td:only-child > .ui_textarea:first-child",'td[colspan="3"] > .awradio:first-child ~ br ~ .ui_textarea:last-child',"#show_backup_destination",'input[name="what_nofiles"]',".table-cell-padded"];f($(e).find(a.join()).not("[name*='extra_']"),true);const i=$(e).find('[data-row-type="ui-table"]');if(i.length===1){i.attr("data-column-span","all")}p($(e).find("td.no-border").parents("tr").add($(e).find("hr[data-row-separator]").parents("td").parents("tr")));const n=$(e).parents(".sub_table_container").parent("td").parent("tr").addClass("bg-transparent");const s=n.find("> td").find("p, b");s.each(function(){if(!$.trim($(this).html())){$(this).remove()}});const o=$(e).find('> [data-row-type="ui-table"]'),r="column-overflow-x-auto",l="data-content-separator";o.each(function(){const e=$(this).find("> td.col_value"),t=e.innerWidth();g($(this));e.removeClass(r);if(Math.ceil($(this).outerWidth())=Math.ceil(t-12)){const t='input[type="text"], input[type="password"], textarea, select';e.find("> .awradio").each(function(){if($(this).index()>0&&!$(this).prev().is("br, ["+l+"]")&&!$(this).next().is("br, .awradio, table")&&($(this).next().is(t)||$(this).next().has(t).length)){$(this).before("
    ")}})}});if(browser.detect.firefox()){e.find(".ui_radio_table > tbody").find('tr:last-child:has(input[type="text"], select)').addClass("firefox__has_input_select")}});$(e).find("> tr:not([data-row-subtype='injected'])").each(function(){if($(this).find("> td.col_value").children().length===1&&$(this).find("> td.col_value").children(".awobject").length===1){$(this).attr("data-row-subtype","narrow")}})})})},h="layout-columns",v="layout-width";$(document.documentElement).attr("data-"+h+"",config_portable_table_rows_to_columns_number);$(document.documentElement).attr("data-"+v+"",config_portable_table_rows_to_columns_width);r.removeAttr(l);if(_&&(s(d)||n())){r.attr(l,1),o=true}else{r.removeAttr(l)}if(_){m()}const b="ui-table-layout",y="data-"+b+"",x="a["+y+"]";$(x).remove();if(_&&settings_right_table_layout_control&&a()&&i()){const e=config_portable_table_rows_to_columns||d?true:false,t=config_portable_table_rows_to_columns_break?true:false,a=e?"on":"off",i=e?' checked="checked"':String(),n=!e?' checked="checked"':String(),s=t?' checked="checked"':String(),o=!t?' checked="checked"':String(),_=d?"disabled ":String(),f="layout-popover",p="layout-type",u="layout-break",g="layout-remove-control",k="data-layout-opts",w="data-layout-control-save",A="why-explanation",C="#headln2l .btn-group",S=$(C).length?$(C):$(C+"-vertical-small");S.first().append('');$(x).find("i").tooltip({container:"body",trigger:"hover",placement:"bottom",delay:{show:vars.plugins.tooltip.delay.show,hide:vars.plugins.tooltip.delay.hide}});const I=`\n
    \n \n
    \n \n \n \n   \n \n \n \n \n \n
    \n
    \n
    \n \n
    \n
    \n \n \n ${config_portable_table_rows_to_columns_number}\n \n \n
    \n
    \n \n \n ${config_portable_table_rows_to_columns_width}px\n \n \n
    \n \n
    \n \n \n \n   \n \n \n \n \n
    \n
    \n
    \n \n \n \n \n
    \n
    \n \n
    \n `;$(x).popover({html:true,sanitize:false,container:"#content",title:function(){return theme_language("columns_layout_title")+'"},content:function(){return I},placement:window.matchMedia("(max-width: 767px)").matches?"left":"right"});$("."+f).remove();$(x).on("inserted.bs.popover",function(){const e=$(this).attr("aria-describedby"),t=$("#"+e),a=t.find(".close"),i=t.find("["+k+"]"),n=t.find('input[name="'+p+'"]'),s=t.find('input[name="'+h+'"]'),o=t.find('input[name="'+v+'"]'),_=t.find('input[name="'+u+'"]'),d=t.find('input[name="'+g+'"]'),y=t.find('[type="button"]').last();t.addClass("z-index-10001 "+f+"").find(".popover-content").addClass("overflow-hidden");n.on("input",function(e){const t=$(x),a=t.data(b),n=a==="on"?"off":"on",s=t.find(".fa2");if(a==="on"){r.removeAttr(l);config_portable_table_rows_to_columns=false;i.addClass("hidden");$.each(c,function(){snippets.page.render_table_labels(c)})}else{r.attr(l,1);config_portable_table_rows_to_columns=true;i.removeClass("hidden");c.find(".col_label").removeClass().addClass("col_label").find("b").removeClass();m()}t.data(b,n);s.removeClass("fa2-grid-"+a+"").addClass("fa2-grid-"+n+"");$(x).popover("reposition")});a.on("click",function(){$(x).trigger("click");plugins.page.format.columns(true)});s[0].addEventListener("input",function(e){$(document.documentElement).attr("data-"+h+"",e.target.value);$(e.target).prev().text(e.target.value);config_portable_table_rows_to_columns_number=parseInt(e.target.value);m()});o[0].addEventListener("input",function(e){$(document.documentElement).attr("data-"+v+"",e.target.value);$(e.target).prev().text(e.target.value+"px");config_portable_table_rows_to_columns_width=parseInt(e.target.value);m()});_.on("input",function(e){const t=$(x);config_portable_table_rows_to_columns_break=!!parseInt(this.value);m()});d[0].addEventListener("input",function(e){y.toggleClass("btn-grey",e.target.checked);y.find("span").text(theme_language(e.target.checked?"columns_layout_remove_button":"global_save"))});y[0].addEventListener("click",function(e){settings_right_table_layout_control=d.is(":checked")?false:true;spinnerfy_button_tiny($(this));theme.config.save();setTimeout(function(){if(!settings_right_table_layout_control){$("."+f).remove()}},vars.event.double_click_delay)});t.find("."+A).tooltip({container:"body",trigger:"hover",placement:"bottom",delay:{show:0,hide:vars.plugins.tooltip.delay.hide}})})}}};return{format:{columns:t.columns},events:{register:e.register,mousemove:e.mousemove,refresh:{clear:e.refresh.clear},pjax:{start:e.pjax.start,before:e.pjax.before}}}}();const snippets={};snippets.datetime={};snippets.page={};snippets.patches={};snippets.parser={};snippets.initial=function(){snippets.get_goto();plugins.navigation.update("webmail");$(function(){plugins.slider.update.favorites()})};snippets.form_pre_submitter=function(){$("body").on("click",'button.ui_form_end_submit[type="button"]:not(.disabled)',function(){var e=$(this).next('input[type="submit"].hidden'),t=$(this).parent(".btn-group").next('input[type="submit"].hidden');if(!e.length){e=t}var i="form",a=e.parent(),n=a.parent("tr").find(i),r=e.parents(i);if(!r.length){r=e.closest(i);if(!r.length){r=a.prev(i)}if(!r.length){r=a.prev().prev(i)}if(!r.length){r=a.prev().prev().prev(i)}r.append(r.nextUntil(a));$.each(a.find("select, input"),function(){$('').attr({type:"hidden",class:"hidden-force",name:$(this).attr("name")?$(this).attr("name"):$(this).attr("id"),value:$(this).val()}).appendTo(r)}).promise().done(function(){r.submit()});return}var o=e.attr("name")?e.attr("name"):e.attr("id"),l=$.trim(e.val());var s=r;if(r.parents(".alert").length&&r.find(".ui_form_end_buttons .end_submits").length){s=r.find(".ui_form_end_buttons .end_submits")}$('').attr({type:"hidden",class:"hidden hidden-force",name:o,value:l}).appendTo(s);e.trigger("click")});$("body").on("click",'.ui_form_end_submit:not(.disabled), .page_footer_submit:not(.disabled):not([href*="javascript:history"])',function(){var e=false,t=false,i=$(this);var a=0;$(".container-fluid > .panel > .panel-body form").each(function(){if(this&&typeof this.checkValidity==="function"&&this.checkValidity()==false){a++}}).promise().done(function(){if(!a){if(core.curModule("csf")){spinnerfy_buttons(i,[2,-29,"small",t])}else{spinnerfy_buttons(i,false,e,t)}}})})};snippets.form_input_tester=function(e){var t="input.tester",i="click-event",a="btn-warning dt-tester-btn",n="data-tester",r="ui_form_elements_wrapper",o=".btn-group.end_submits:visible button.ui_form_end_submit",l='form:not([data-tester="1"]):not(#webmin_search_form)';if(e){return $(o).hasClass(a)}$(document).on(t,l,function(e){if(e.originalEvent===undefined||e.originalEvent&&!e.originalEvent.inputType){return}if($(e.target).parent().is("."+r)){return}if(vars.pjax.post_page_fetch){return}if(!v___location_file||v___location_file==="index.cgi"){return}var t=$(this);if(t.attr(n)==1){return}var l=t.find(".CodeMirror").length,s=$(this).attr("action");if(l&&!core.curModule("init")||(core.curModuleFile("mysql","")||core.curModuleFile("postgresql","")||core.curModuleFile("mysql","index.cgi")||core.curModuleFile("postgresql","index.cgi"))&&$(".ui_grid_table.table-hardcoded").length||core.curModuleFile("bind8","")||core.curModuleFile("bind8","index.cgi")||core.curModuleFile("mailbox","reply_mail.cgi")||core.curModuleFile("virtual-server","wizard.cgi")||core.curModuleFile("virtual-server","list_scripts.cgi")||core.curModuleFile("virtual-server","list_scripts.cgi")||core.curModuleFile("mysql","list_vars.cgi")||core.curModuleFile("ruby-gems","index.cgi")||(s&&s.includes("edit_tmpl.cgi")||s&&s.includes("config.cgi"))||$(".modal.in.mppopup").length){t.attr(n,1);return}var _=$(e.target).is('input[type="checkbox"], input[type="radio"]'),c=$(e.target).parents("tr"),d=_&&c&&c.length&&c.attr("class")&&c.attr("class").includes("ui_checked");if(d){return}theme_restore_buttons_class();var f=t.find(o),p=f.first(),u=String("btn-xclass"),h=f.data(i)===1;if(p[0]&&p[0].classList){var g=p[0].classList.value.match(/.*(btn-\S+)/);if(g){u=g[1];p.attr("data-class-restore",u)}}if(f&&f.length){set_onbeforeunload_status(1);if(!h){f.data(i,1);p.removeClass(u).addClass(a);t.attr(n,1);f.one("click",function(){f.data(i,0);t.attr(n,0);set_onbeforeunload_status(0)});t.on("keydown",function(e){var t=e.keyCode?e.keyCode:e.which;if(t===13&&!$(e.target).is("textarea")||t===13&&e.ctrlKey&&$(e.target).is("textarea")){if(p.hasClass(a)){e.preventDefault();p.trigger("click")}else{set_onbeforeunload_status(0)}}})}}})};snippets.inject_extra_option=function(e,t,i,a,n,r){if(e==="tr/yes:no"){var o=$("body"),l=t.parents("form"),s=config_portable_table_rows_to_columns?' data-row-type="ui-table"':"";t.parents("td.col_value").parent("tr").after('"+''+a+""+''+''+''+'"+''+'"+""+""+"");var _="submit."+i+"";o.off(_);o.one(_,l,function(){var e=Test.true($("[name="+i+"]:checked").val());window[i]=e;theme.config.save()})}if(e&&e.includes("checkbox:")){var c=parseInt(Math.random(11)*100),d=n&&n.checked?"checked ":String(),f=n&&n.extraClass&&n.extraClass.main?" "+n.extraClass.main:String(),p,u=''+"'+" '+'"+""+''+"";if(n){if(n.getHtml){return u}if(n.style){p=$(u).css(n.style)}}if(e==="checkbox:after"){t.after(p||u)}if(e==="checkbox:before"){t.before(p||u)}if(r){r.call()}}};snippets.datetime.tictac=function(e){var t="convertible-date-full",i="convertible-timestamp-full",a=i,n=$("[data-"+a+"]");n.parent().contents().filter(function(){return this.nodeType===3}).remove();if(typeof dayjs!=="undefined"){var r=n.data(a);if(r){var o=r+1;n.data(a,o);n.text(dayjs(o*1e3).utcOffset(get_utc_offset()).format(config_portable_theme_locale_format_full))}!e&&setInterval(snippets.datetime.tictac.bind(null,1),1e3)}};snippets.datetime.locale=function(){var e="x",t="-",i="md",a="d",n="t",r=e+t+i+t,o=function(e,i){var o=e.tagName.endsWith((t+a).toUpperCase())?1:0,l=e.tagName.includes(r+n)?0:1,s=e.outerHTML.indexOf(";1")>-1?1:0,_=e.outerHTML.indexOf(";2")>-1?1:0,c=e.outerHTML.indexOf(";-1")>-1?1:0,d=core.curModule("proc")?1:0,f=$(e).text(),p=o?f.split(";")[0]:f,u=config_portable_theme_locale_format_short||"L",h=config_portable_theme_locale_format_long||"LL",g=config_portable_theme_locale_format_time||"LT",m=dayjs.unix(p).format("l");m=m.indexOf("/")>-1?"/":m.indexOf("-")>-1?"-":".";var v=dayjs.unix(p).utcOffset(get_utc_offset()).format(g),b=_?dayjs.unix(p).utcOffset(get_utc_offset()).format("YYYY["+m+"]MM["+m+"]DD")+" "+(l?String():v):dayjs.unix(p).utcOffset(get_utc_offset()).format(!s?u:h);if(d){c=1;if(e&&typeof e.outerHTML==="string"&&e.outerHTML.includes(r+n)){$(e).remove()}}if(c){if(!isNaN(p)){p*=1e3}var x=dayjs(p).fromNow(),y=parseInt((dayjs().unix()-dayjs(p).unix())/(60*60*24)),w=dayjs(p).format("LT"),k=dayjs().format("YYYY"),C=dayjs(p).format("YYYY"),M=dayjs(p).format("ll"),F=dayjs(p).format(u);if(core.curModule("mailbox")){if(y===0){x=w}else if(k==C){x=M.replace(k,"").replace(",","")}else{x=F}}v=x;b=x}var j;if($(e).is("td")){j=$(e)}else{j=$(e).parent("td")}j.is("td")&&j.attr("data-order",p);if(i){return!o?v:b}else{$(e).replaceWith(!o?v:"-1?' data-placement="auto top" data-container="body" data-toggle="tooltip" data-title="'+(c?dayjs(p).calendar(null,{sameElse:"LLL"}):dayjs.unix(p).fromNow())+'"':"")+">"+b+"")}};$.each($(r+a).add(r+n).add($("td:contains("+(r+a)+")")).add($("td:contains("+(r+n)+")")).add("option:contains("+(r+a)+")").add("option:contains("+(r+n)+")"),function(a,n){var l=!n.tagName.startsWith(r.toUpperCase());if(l){var s=$(n).text(),_=Convert.htmlUnEscape(s);var c="";$.each($(_),function(a,n){var r=$(n)[0].tagName&&$(n)[0].tagName.startsWith((e+t+i).toUpperCase());if(r){c+=o($(n)[0],1)+" "}}).promise().done(function(){$(n).text(c)})}else{o(n,0)}})};snippets.ajax=function(){$(document).ajaxStop(function(){setTimeout(function(){if(session.alive===0){session.reauthenticate.start()}},300)}).ajaxSuccess(function(){v___theme_ajax_error=0;if(typeof stats==="object"&&stats.general.error&&get_access_level()===0&&settings_sysinfo_real_time_status){stats.general.disable();stats.general.enable();stats.general.error=0}setTimeout(function(){var e=theme.version(false,true);if(theme.version.current&&e&&e!==theme.version.current&&!vars.cache.theme_updating){!theme_message_exists("theme_update_refresh")&&theme.update_message()}},300)}).ajaxError(function(e,t,i){if(t.statusText!=="canceled"&&t.statusText!=="abort"){connection_error(t,0,false,i)}});$.ajaxSetup({complete:function(e,t){var i="container session_login";if(Test.strContains(e.responseText,i)||e&&(e.getResponseHeader("Auth-type")==="auth-required=1"||e.responseText&&(e.responseText.indexOf("reset-fonts-grids-base")>-1&&e.responseText.indexOf("window.top.location = window.location;")>-1))){session.reauthenticate.start()}},beforeSend:function(e,t){t.url=link_type_convert(t.url,1);set_ajax_send_headers(e,t)}})};snippets.pjax=function(){$(document).on("submit","form",function(e){if(e.originalEvent!==undefined){v___theme_content_history=0}if($(this).attr("data-download")=="true"){return}if(e.target.target==="_blank"){return}try{if(core.curModuleFile("virtual-server","edit_newfeatures.cgi")){page.render.content.filter.clear()}}catch(e){}e.preventDefault();if(get_onbeforeunload_status()){get_onbeforeunload_message(e,this)}else{get_pjax_action_submit(e)}});$(document).on("click","a"+$__theme_default_deselectors+"",function(e){if(e.originalEvent!==undefined){v___theme_content_history=0}if(get_onbeforeunload_status()&&$(quirks.active_element()).is("a"+$__theme_event_deselectors)&&(!this.href||this.href&&this.href.length>0&&(!this.href.includes("!edit")&&!this.href.includes("!view")))){e.preventDefault();var t=this.getAttribute("href");if(t===null){return}get_onbeforeunload_message(e,this)}else{get_pjax_action_click(e,this)}});$(document).on("pjax:error",function(e,t,i,a,n){plugins.pjax.page.events.reset();if(i==="error"){var r=$.active;if(r){$.active=r-1}if(Test.strContains(n.url,"/csf/index.cgi")){theme_reload();return}}});$(document).on("pjax:start",function(e,t,i){plugins.pjax.page.events.start.get();plugins.page.events.refresh.clear();vars.pjax.replace_contents=1;vars.pjax.event.end=1;vars.pjax.progressing=1;plugins.navigation.detectAllowed=true;if(t){session.server.data("loading",1);$("body").addClass("loading-bg")}vars.page_user_inactive=1;vars.requested_page=i.url;if(typeof set_server_theme_temp_data_timeout==="number"){clearTimeout(set_server_theme_temp_data_timeout)}});$(document).on("pjax:beforeReplace",function(e,t,i){if(vars.pjax.popstate&&core.curModuleFile("virtual-server","domain_form.cgi")){$(t).find("[data-nocache]").remove()}plugins.pjax.page.events.beforeReplace.get();if(vars.ajax.progressing){vars.pjax.replace_contents=-1;vars.pjax.event.end=0;return}if(settings_mail_ui){if(uri_parse("directory",i.url).indexOf("/mailboxes")===-1&&uri_parse("directory",i.url).indexOf("/mailbox")>-1&&(!uri_parse("file",i.url)||uri_parse("file",i.url).indexOf("index.cgi")>-1)){vars.pjax.replace_contents=0;mail_page_check()}}plugins.navigation.deform(0);pjax.clear.modules(i);if(i.push===false){if(Test.strContains(i.url,"/config.cgi?")||Test.strContains(i.url,"/uconfig.cgi?")||Test.strContains(i.url,"/mconfig.cgi?")||Test.strContains(i.url,"/tconfig.cgi")){t.find(".btn-accordion-filter, .btn-toggle-accordions").remove()}}plugins.page.events.pjax.before()});$(document).on("ready pjax:beforeSend",function(e,t,i){plugins.pjax.page.events.beforeSend.get();if(vars.pjax.cancel===1){vars.pjax.cancel=0;return false}else if(e&&e.relatedTarget&&e.relatedTarget.dataset&&e.relatedTarget.dataset.pjax==="no"){return false}if(theme_download_link_blob(i)){return false}if(theme_download_link(i)){return false}if($t_uri_webmail&&settings_mail_ui){if(core.moduleAvailable("mailbox")){if(core.curModule(v___module_file_manager)||i.url&&!i.url.includes(v___location_file)&&v___location_file==="tconfig.cgi"){page.handle.content.preloader.show(false,false,true);plugins.navigation.reset()}plugins.page.format.columns(true);if(typeof mail==="object"){if($("aside .fancytree-container").length===0){mail_load_folders()}}else{load.bundle(v___server_extensions_path+"/mail/mail",1,["mail.folders.get()"])}}}if(settings_mail_ui){if(core.curModule("mailbox")&&(core.curModuleFile("mailbox","")||core.curModuleFile("mailbox","index.cgi"))){if(uri_parse("directory",i.url).indexOf("/mailboxes")===-1&&uri_parse("directory",i.url).indexOf("/mailbox")>-1&&(!uri_parse("file",i.url)||uri_parse("file",i.url).indexOf("index.cgi")>-1)){mail_load(i.url);return false}}}i.url=plugins.pjax.page.link.alter(i.url);progress.start();typeof v___theme_postponed_fetcher==="number"&&clearInterval(v___theme_postponed_fetcher);var a=$(e.relatedTarget),n=a.attr("href");n=n?n:i.url.replace(v___location_origin,""),clicked_in_nav_menu=a.parent().is("[data-linked], .favorites-dcontainer, .menu-exclude.ui-sortable-handle")||typeof i.callback==="object"&&i.callback[0]==="reference";if(clicked_in_nav_menu){check_bundle(n)}if(typeof i.callback==="object"&&i.callback[0]==="beforeSend"){if(i.callback[3]){setTimeout(function(){window[i.callback[1].apply(this,i.callback[2])]},i.callback[3])}else{window[i.callback[1].apply(this,i.callback[2])]}}plugins.page.events.pjax.before();v___theme_pjax_call+=1});$(document).on("pjax:success",function(event,data,status,xhr,options){plugins.pjax.page.events.success.get();theme_message_dismiss("ajaxError");if(typeof options.callback==="object"&&options.callback[0]==="success"){if(options.callback[3]){setTimeout(function(){if(typeof options.callback[1]==="string"){eval(options.callback[1])}else{window[options.callback[1].apply(this,options.callback[2])]}},options.callback[3])}else{if(typeof options.callback[1]==="string"){eval(options.callback[1])}else{window[options.callback[1].apply(this,options.callback[2])]}}}});$(document).on("pjax:complete",function(e,t,i){plugins.page.events.refresh.clear();vars.pjax.initial_load=1;vars.allow_ui_features=1;vars.pjax.progressing=0;plugins.pjax.page.events.complete.get();if(v___theme_reload){theme_reload()}progress.end();session.server.data("loading",0,1);$("body").removeClass("loading-bg");v___theme_connection_triggered_origin=0;typeof stats==="object"&&stats.general.error&&(stats.general.disable(),stats.general.enable());setTimeout(function(){plugins.navigation.detectAllowed=true},1e3)});$(document).on(vars.h.event.page.end,function(e,t){vars.pjax.cache.set("enable");plugins.pjax.page.events.end.get();if(!vars.pjax.event.end){return}if(session.alive===0||v___theme_reload===1){return}if(t!=undefined&&t.responseText&&t.responseText.includes("data-predownload")){return}plugins.navigation.deform(1);vars.pjax.popstate&&plugins.page.format.columns(true);get_pjax_event_end(e,t);setTimeout(function(){var e=link_type_convert(location.hash,1).replace("#","");if(e&&e.length>0){var t=$('[name="'+e+'"]');if(t.length){t[0].scrollIntoView({duration:200,smooth:true,direction:"vertical",complete:function(){}})}}},200);v___page_container.find(".panel > .panel-body:first").one("click mousedown keypress",function(){vars.page_user_inactive=0});vars.pjax.post_page_fetch=true;setTimeout(function(){vars.pjax.post_page_fetch=false},100);if(settings_embed_product_branding_privileged){!vars.page.shown&&page.branding.process(true)}});$(document).on("pjax:popstate",function(e){var t=e.state;vars.pjax.popstate=true;setTimeout(function(){vars.pjax.popstate=false},10);set_pjax_send_headers(e.state.url,e);var i=vars.pjax.page_cache&&!vars.pjax.cache.disabled(false,true);if(e.hasContents){get_pjax_event_end_funcs(0,!i)}vars.previous_request=String();vars.source_request=String()})};snippets.pjaxHooks=function(e,t){if(e&&t==="csf"){var i=e.substring(0,2048);var a=i.match(/.*(ConfigServer Security.*Firewall)/),n=i.match(/.*'+theme_language("notify_patching_module_style").replace("$1",""+theme_language("csf")+"")+" "+theme_language("global_please_wait")+'   ',300,"info","csf_patching");theme.veiled(1);$.post(v___location_prefix+"/index.cgi/?xhr-csf-unload=1",function(e){setTimeout(function(){v___module="csf";window.history.pushState({},false,link_type_convert(v___location_prefix+"/csf/index.cgi",2));theme_title_generate()},200);setTimeout(function(){location.reload()},3e3)});return 1}}};snippets.get_goto=function(){plugins.navigation.state.update();var e=plugins.navigation.state.target(),t=function(){if($t_uri_virtualmin){get_default_virtualmin_content(false)}else if($t_uri_cloudmin){get_default_cloudmin_content(false)}else{get_default_content()}};var i=session.server.data("webprefix");if(i&&e){e=e.toString();if(!e.startsWith(i)){e=i+(e.startsWith("/")?e:"/"+e)}}if(!e){t();return}var a=unbuffered_header_processor_allow,n=!a(e),r=function(e){var t=URI(e).directory();if(t&&t!="/"&&t!=v___location_prefix){return t}else{return false}};if(a(e,1)){n=0;var o=r(e);if(o){get_pjax_content(o+"/");return}}if(e&&(e.match(/.*(save|change|install|backup|fetch|upload|delete|modify|view_table|reboot|shutdown|copy|move).*\.cgi$/g)||e.match(/.*(enable_domain|disable_domain|delete_domain).*\.cgi.*/g)||e.match(/.*(newkey|savekey|save_ipkey|newcsr).*\.cgi.*/g)||e.includes("index.cgi?action=upgrade")||e.includes("shell/index.cgi"))){var l=r(e);if(l){get_pjax_content(l);return}}var s=session.server.data("initial-wizard");if(e&&n){if(Test.strContains(e,v___module_file_manager+"/config.cgi")){get_pjax_content(v___location_prefix+"/"+v___module_file_manager);return}if(s!="1"&&$t_uri_virtualmin){get_pjax_content(v___location_prefix+"/virtual-server/wizard.cgi");return}if(URI(e).hostname()&&URI(e).hostname()!==URI(location.href).hostname()||Test.strContains(e,"/servers/link.cgi/")||Test.strContains(e,"/mailbox/view_mail.cgi")||Test.strContains(e,"/mailbox/reply_mail.cgi")||Test.strContains(e,"xerror")||e==="/"||e===v___location_prefix+"/"||e==="%2F"||Test.strContains(e,"config_save")||e==="/?"+$__theme_navigation){t();return}check_bundle(e);if(document.hasFocus()||document.visibilityState!=="hidden"){e&&get_pjax_content(e)}else{page.branding.process(true);e&&get_pjax_content(e)}}};snippets.tooltips=function(e){if(e){var t='[data-toggle="tooltip"]:not([data-skip]), [data-toggle="virtualmin-license"], .panel-body td a:not([data-skip]), .icons-container',i=vars.h.selector.content.get();try{i.tooltip("destroy")}catch(e){}var a="container-fluid",n=$("."+a+" .gl-icon-container").length||("."+a+" .small-icons-container").length;i.tooltip({selector:t,sanitize:false,placement:n||$("[data-fbplacement]").length?"auto bottom":"auto top",trigger:"hover",html:true,delay:{show:n?vars.plugins.tooltip.delay.show/10:vars.plugins.tooltip.delay.show,hide:vars.plugins.tooltip.delay.hide}})}else{$("aside").tooltip({selector:'li[data-toggle="tooltip"], li > a[data-toggle="tooltip"].menu-exclude-link, label[data-toggle="tooltip"], .servers-index-link .popover-trigger',sanitize:false,container:"body",html:true,delay:{show:vars.plugins.tooltip.delay.show,hide:vars.plugins.tooltip.delay.hide}})}};snippets.progressive_button=function(e,t){var i=e.querySelector(".progressing");i&&(i.style.width=t+"%")};snippets.button_lock=function(e,t){if(t){e.setAttribute("disabled","disabled")}else{e.removeAttribute("disabled")}};snippets.help_popup=function(){var e=$("body");e.on("click",".help_popup",function(e){e.stopPropagation();e.preventDefault();plugins.page.format.columns(true);var t=$(this),i=function(e){e=e.replace(/

    [\n]+<\/p>/gi,"
    ");e=e.replace(/

    [\n]+

    /gi,"
    ");e=e.replace(/�/gi,"");var t=$(e).filter(".ui_subheading").first().text(),i=$.parseHTML(e),a="";i=i.filter(function(e){if(e.nodeName&&e.nodeName.toLowerCase()!=="meta"&&e.nodeName.toLowerCase()!=="link"&&e.nodeName.toLowerCase()!=="title"&&e.nodeName.toLowerCase()!=="hr"&&e.nodeName.toLowerCase()!=="style"&&(e.nodeName.toLowerCase()!=="h3"&&e.className!=="ui_subheading")){e.outerHTML?a+=e.outerHTML:a+=$.trim(e.textContent)?""+$.trim(e.textContent)+"":$.trim(e.textContent);return e}});if(platform.detect()==="mac"){a=a.replaceAll("Ctrl +","⌘ +");a=a.replaceAll("Alt +","⌥ +")}return[t,i,a]};var a=t.attr("href").indexOf("showpass.cgi")>-1?v___location_directory_trail_slashed+t.attr("href"):t.attr("href");$.ajax({type:"POST",url:a,data:false,dataType:"text",success:function(e){if(!session.status(e)){return}var n=i(e),r=n[0],o=n[1],l=n[2];if(!o){return}var s=t.attr("href").indexOf("/file-manager")>-1,_='',c=t.attr("href").indexOf("showpass.cgi")>-1,d=t.attr("href").indexOf("/locale")>-1||s;if(c){_=""}r=_+""+r+"";t.data("title",r);t.data("content",l);var f=String(),p=t.hasClass("btn-link");if(l&&(l.length>1024||l.includes("

    ")||l.includes("