"use strict";void 0===window.clog&&(window.clog=console.log),"function"!=typeof String.prototype.format&&(String.prototype.format=function(){let e=this;for(let t in arguments)e=e.replaceAll("{"+t+"}",arguments[t]);return e}),"undefined"==typeof ProgressLoader&&(window.ProgressLoader=(()=>{const e={};return{setProgress:function(t="panel"){0==$("."+t+"-progress").length&&0==$("header .progress-container, #topbar .progress-container").length&&$("header, #topbar").append('<div class="progress-container"><div class="panel-progress bs-progress d-none"><div class="line"></div><div class="subline inc"></div><div class="subline dec"></div></div></div>');let n=Math.floor(1e6*Math.random());return e[n]=t,$("."+t+"-progress").removeClass("d-none"),$("[data-processdepending="+t+"]").prop("disabled",!0),n},endProgress:function(t){let n=0;t in e?(n=e[t],delete e[t]):console.log("Progress handle not found");let r=0;Object.keys(e).forEach(t=>{e[t]===n&&(r+=1)}),0==r&&($("."+n+"-progress").addClass("d-none"),$("[data-processdepending=table]").prop("disabled",!1))},isBusy:function(t){return void 0===t?Object.keys(e).length>0:t in e}}})()),"undefined"==typeof DecodeEntities&&(window.DecodeEntities=function(){var e=document.createElement("div");return function(t){return t&&"string"==typeof t&&(t=(t=t.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,"")).replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,""),e.innerHTML=t,t=e.textContent,e.textContent=""),t}}()),"undefined"==typeof Template&&(window.Template=(()=>{const e={};let t="";return{load:(n,r=null,s=null)=>new Promise((o,i)=>{if(n in e)o(e[n]);else{if(null!=r&&(t=r),0==t.length)return void console.error("'Template' need a url to fetch templates.");new window.JajaxClass(t,"panel").get({realm:s,action:"template",type:n},t=>{e[n]=t.data,o(e[n])},e=>{i(e.status)})}})}})()),"undefined"==typeof JajaxClass&&(window.JajaxClass=class{#e="";#t="";constructor(e,t="panel"){this.#e=e,this.#t=t}post(e,t=function(){},n=function(){},r=function(){}){this.#n("POST",e,t,n,r)}get(e,t=function(){},n=function(){},r=function(){}){this.#r(e,t,n,r)}del(e,t=function(){},n=function(){},r=function(){}){this.#n("DELETE",e,t,n,r)}put(e,t=function(){},n=function(){},r=function(){}){this.#n("PUT",e,t,n,r)}#n(e,t,n,r,s){var o=ProgressLoader.setProgress(this.#t);$.ajax({url:this.#e,type:e,contentType:"application/json",data:JSON.stringify(t),success:n,error:r,complete:function(e){s(e),ProgressLoader.endProgress(o)}})}#r(e,t,n,r){var s=ProgressLoader.setProgress(this.#t);$.ajax({url:this.#e,type:"GET",data:e,success:t,error:n,complete:function(e){r(e),ProgressLoader.endProgress(s)}})}}),"undefined"==typeof Jajax&&(window.Jajax=(()=>{const e=(e,t,n,r,s)=>{0==this.targetUrl.length&&console.error("Jajax is not initialized. Endpoint is unknown.");var o=ProgressLoader.setProgress(this.targetProgress);$.ajax({url:this.targetUrl,type:e,contentType:"application/json",data:JSON.stringify(t),success:n,error:r,complete:function(e){s(e),ProgressLoader.endProgress(o)}})},t=(e,t,n,r)=>{0==this.targetUrl.length&&console.error("Jajax is not initialized. Endpoint is unknown.");var s=ProgressLoader.setProgress(this.targetProgress);$.ajax({url:this.targetUrl,type:"GET",data:e,success:t,error:n,complete:function(e){r(e),ProgressLoader.endProgress(s)}})};return{init:(e,t="panel")=>{this.targetUrl=e,this.targetProgress=t},post:(t,n=function(){},r=function(){},s=function(){})=>{e("POST",t,n,r,s)},get:(e,n=function(){},r=function(){},s=function(){})=>{t(e,n,r,s)},put:(t,n=function(){},r=function(){},s=function(){})=>{e("PUT",t,n,r,s)},delete:(t,n=function(){},r=function(){},s=function(){})=>{e("DELETE",t,n,r,s)}}})());