Current File : /home/pacjaorg/wpt.pacja.org/cop/media/com_akeeba/js/Configuration.min.js |
/*
Copyright (c)2006-2023 Nicholas K. Dionysopoulos / Akeeba Ltd
@license GNU General Public License version 3, or later
*/
if("undefined"===typeof akeeba)var akeeba={};
"undefined"===typeof akeeba.Configuration&&(akeeba.Configuration={},akeeba.Configuration.GUI={},akeeba.Configuration.engines={},akeeba.Configuration.installers={},akeeba.Configuration.URLs={},akeeba.Configuration.FtpBrowser={params:{}},akeeba.Configuration.SftpBrowser={params:{}},akeeba.Configuration.FtpTest={},akeeba.Configuration.SftpTest={},akeeba.Configuration.FtpModal=null,akeeba.Configuration.passwordFields={},akeeba.Configuration.fsBrowser={params:{dialogId:"folderBrowserDialog",dialogBodyId:"folderBrowserDialogBody"},
modalObject:null});akeeba.Configuration.parseConfigData=function(a){akeeba.Configuration.engines=a.engines;akeeba.Configuration.installers=a.installers;akeeba.Configuration.parseGuiData(a.gui)};
akeeba.Configuration.restoreDefaultPasswords=function(){for(curid in akeeba.Configuration.passwordFields)if(akeeba.Configuration.passwordFields.hasOwnProperty(curid)){var a=akeeba.Configuration.passwordFields[curid];if(myElement=document.getElementById(curid))myElement.value="WORKAROUND FOR NAUGHTY BROWSERS",myElement.value=a}};
akeeba.Configuration.onBrowser=function(a,b){akeeba.Configuration.onBrowserCallback=function(c){b.value=c;"object"==typeof akeeba.Configuration.fsBrowser.modalObject&&akeeba.Configuration.fsBrowser.modalObject.close&&akeeba.Configuration.fsBrowser.modalObject.close()};a=akeeba.Configuration.URLs.browser+encodeURIComponent(a);var d=document.getElementById(akeeba.Configuration.fsBrowser.params.dialogBodyId);d.innerHTML="";var f=document.createElement("iframe");f.setAttribute("src",a);f.setAttribute("width",
"100%");f.setAttribute("height",400);f.setAttribute("frameborder",0);f.setAttribute("allowtransparency","true");d.appendChild(f);akeeba.Loader.add("akeeba.Modal",function(){akeeba.Configuration.fsBrowser.modalObject=akeeba.Modal.open({inherit:"#"+akeeba.Configuration.fsBrowser.params.dialogId,width:"80%"})})};
akeeba.Configuration.FtpBrowser.callback=function(a){var b="/".replace(/([\[\]\(\)\.\?\/\*\{\}\+\$\^:])/g,"$1");a="/"+(a+"").replace(new RegExp("^["+b+"]+","g"),"");document.getElementById("var["+akeeba.Configuration.FtpBrowser.params.key+"]").value=a};
akeeba.Configuration.FtpBrowser.initialise=function(a,b){akeeba.Configuration.FtpBrowser.params.host=document.getElementById("var["+b+".host]").value;akeeba.Configuration.FtpBrowser.params.port=document.getElementById("var["+b+".port]").value;akeeba.Configuration.FtpBrowser.params.username=document.getElementById("var["+b+".user]").value;akeeba.Configuration.FtpBrowser.params.password=document.getElementById("var["+b+".pass]").value;akeeba.Configuration.FtpBrowser.params.passive=document.getElementById("var["+
b+".passive_mode]").checked;akeeba.Configuration.FtpBrowser.params.ssl=document.getElementById("var["+b+".ftps]").checked;akeeba.Configuration.FtpBrowser.params.directory=document.getElementById("var["+b+".initial_directory]").value;akeeba.Configuration.FtpBrowser.params.key=a;akeeba.Configuration.FtpBrowser.open()};
akeeba.Configuration.FtpBrowser.open=function(){var a=document.getElementById("ftpdialog");akeeba.System.addEventListener(document.getElementById("ftpdialogOkButton"),"click",function(b){akeeba.Configuration.FtpBrowser.callback(akeeba.Configuration.FtpBrowser.params.directory);"object"==typeof akeeba.Configuration.FtpModal&&akeeba.Configuration.FtpModal.close&&akeeba.Configuration.FtpModal.close()});akeeba.System.addEventListener(document.getElementById("ftpdialogCancelButton"),"click",function(b){"object"==
typeof akeeba.Configuration.FtpModal&&akeeba.Configuration.FtpModal.close&&akeeba.Configuration.FtpModal.close()});akeeba.Configuration.FtpModal=akeeba.System.Modal.open({inherit:a,width:"80%"});document.getElementById("ftpBrowserErrorContainer").style.display="none";document.getElementById("ftpBrowserFolderList").innerHTML="";document.getElementById("ftpBrowserCrumbs").innerHTML="";akeeba.System.params.AjaxURL=akeeba.Configuration.URLs.ftpBrowser;empty(akeeba.Configuration.FtpBrowser.params.directory)&&
(akeeba.Configuration.FtpBrowser.params.directory="");akeeba.System.doAjax({host:akeeba.Configuration.FtpBrowser.params.host,username:akeeba.Configuration.FtpBrowser.params.username,password:akeeba.Configuration.FtpBrowser.params.password,passive:akeeba.Configuration.FtpBrowser.params.passive?1:0,ssl:akeeba.Configuration.FtpBrowser.params.ssl?1:0,directory:akeeba.Configuration.FtpBrowser.params.directory},function(b){var d=document.getElementById("ak_crumbs2"),f=document.getElementById("ftpBrowserFolderList");
f.style.display="none";d.style.display="none";if(0!=b.error)document.getElementById("ftpBrowserError").innerHTML=b.error,document.getElementById("ftpBrowserErrorContainer").style.display="block";else{document.getElementById("ftpBrowserErrorContainer").style.display="none";if(!empty(b.breadcrumbs)){d.style.display="block";d.innerHTML="";var c="/";akeeba.Configuration.FtpBrowser.addCrumb(akeeba.System.Text._("COM_AKEEBA_FILEFILTERS_LABEL_UIROOT"),"/",d);for(i=0;i<b.breadcrumbs.length;i++){var e=b.breadcrumbs[i];
c+="/"+e;akeeba.Configuration.FtpBrowser.addCrumb(e,c,d)}}if(!empty(b.list))for(f.style.display="block",akeeba.Configuration.FtpBrowser.params.directory||(akeeba.Configuration.FtpBrowser.params.directory=b.directory),i=0;i<b.list.length;i++)d=b.list[i],akeeba.Configuration.FtpBrowser.createLink(b.directory+"/"+d,d,f)}},function(b){document.getElementById("ftpBrowserError").innerHTML=b;document.getElementById("ftpBrowserErrorContainer").style.display="block";document.getElementById("ftpBrowserFolderList").style.display=
"none";document.getElementById("ftpBrowserCrumbs").style.display="none"},!1)};akeeba.Configuration.FtpBrowser.createLink=function(a,b,d,f){"undefined"==typeof f&&(f=akeeba.Configuration.FtpBrowser);var c=document.createElement("tr"),e=document.createElement("td");c.appendChild(e);var g=document.createElement("a");g.textContent=b;akeeba.System.addEventListener(g,"click",function(){f.params.directory=a;f.open()});e.appendChild(g);d.appendChild(c)};
akeeba.Configuration.FtpBrowser.addCrumb=function(a,b,d,f){"undefined"==typeof f&&(f=akeeba.Configuration.FtpBrowser);var c=document.createElement("li"),e=document.createElement("a");e.textContent=a;akeeba.System.addEventListener(e,"click",function(g){f.params.directory=b;f.open();g.preventDefault?g.preventDefault():g.returnValue=!1});c.appendChild(e);d.appendChild(c)};
akeeba.Configuration.SftpBrowser.initialise=function(a,b){akeeba.Configuration.SftpBrowser.params.host=document.getElementById("var["+b+".host]").value;akeeba.Configuration.SftpBrowser.params.port=document.getElementById("var["+b+".port]").value;akeeba.Configuration.SftpBrowser.params.username=document.getElementById("var["+b+".user]").value;akeeba.Configuration.SftpBrowser.params.password=document.getElementById("var["+b+".pass]").value;akeeba.Configuration.SftpBrowser.params.directory=document.getElementById("var["+
b+".initial_directory]").value;akeeba.Configuration.SftpBrowser.params.privKey=document.getElementById("var["+b+".privkey]").value;akeeba.Configuration.SftpBrowser.params.pubKey=document.getElementById("var["+b+".pubkey]").value;akeeba.Configuration.SftpBrowser.params.key=a;akeeba.Configuration.SftpBrowser.open()};
akeeba.Configuration.SftpBrowser.open=function(){var a=document.getElementById("sftpdialog");a.style.display="block";akeeba.System.addEventListener(document.getElementById("sftpdialogOkButton"),"click",function(b){akeeba.Configuration.SftpBrowser.callback(akeeba.Configuration.SftpBrowser.params.directory);"object"==typeof akeeba.Configuration.FtpModal&&akeeba.Configuration.FtpModal.close&&akeeba.Configuration.FtpModal.close()});akeeba.System.addEventListener(document.getElementById("sftpdialogCancelButton"),
"click",function(b){"object"==typeof akeeba.Configuration.FtpModal&&akeeba.Configuration.FtpModal.close&&akeeba.Configuration.FtpModal.close()});akeeba.Configuration.FtpModal=akeeba.System.Modal.open({inherit:a,width:"80%"});document.getElementById("sftpBrowserErrorContainer").style.display="none";document.getElementById("sftpBrowserFolderList").innerHTML="";document.getElementById("sftpBrowserCrumbs").innerHTML="";akeeba.System.params.AjaxURL=akeeba.Configuration.URLs.sftpBrowser;empty(akeeba.Configuration.SftpBrowser.params.directory)&&
(akeeba.Configuration.SftpBrowser.params.directory="");akeeba.System.doAjax({host:akeeba.Configuration.SftpBrowser.params.host,port:akeeba.Configuration.SftpBrowser.params.port,username:akeeba.Configuration.SftpBrowser.params.username,password:akeeba.Configuration.SftpBrowser.params.password,directory:akeeba.Configuration.SftpBrowser.params.directory,privkey:akeeba.Configuration.SftpBrowser.params.privKey,pubkey:akeeba.Configuration.SftpBrowser.params.pubKey},function(b){var d=document.getElementById("sftpBrowserFolderList"),
f=document.getElementById("ak_scrumbs");d.style.display="none";f.style.display="none";if(0!=b.error)document.getElementById("sftpBrowserError").innerHTML=b.error,document.getElementById("sftpBrowserErrorContainer").style.display="block";else{document.getElementById("ftpBrowserErrorContainer").style.display="none";if(!empty(b.breadcrumbs)){f.style.display="block";f.innerHTML="";var c="/";akeeba.Configuration.FtpBrowser.addCrumb(akeeba.System.Text._("COM_AKEEBA_FILEFILTERS_LABEL_UIROOT"),"/",f,akeeba.Configuration.SftpBrowser);
for(i=0;i<b.breadcrumbs.length;i++){var e=b.breadcrumbs[i];c+="/"+e;akeeba.Configuration.FtpBrowser.addCrumb(e,c,f,akeeba.Configuration.SftpBrowser)}}if(!empty(b.list))for(d.style.display="block",akeeba.Configuration.SftpBrowser.params.directory||(akeeba.Configuration.SftpBrowser.params.directory=b.directory),i=0;i<b.list.length;i++)f=b.list[i],akeeba.Configuration.FtpBrowser.createLink(b.directory+"/"+f,f,d,akeeba.Configuration.SftpBrowser)}},function(b){document.getElementById("sftpBrowserError").innerHTML=
b;document.getElementById("sftpBrowserErrorContainer").style.display="block";document.getElementById("sftpBrowserFolderList").style.display="none";document.getElementById("sftpBrowserCrumbs").style.display="none"},!1)};akeeba.Configuration.SftpBrowser.callback=function(a){var b="/".replace(/([\[\]\(\)\.\?\/\*\{\}\+\$\^:])/g,"$1");a="/"+(a+"").replace(new RegExp("^["+b+"]+","g"),"");document.getElementById("var["+akeeba.Configuration.SftpBrowser.params.key+"]").value=a};
akeeba.Configuration.FtpTest.testConnection=function(a,b,d){var f=document.getElementById("var["+a+"]");akeeba.Configuration.FtpTest.buttonKey="var["+a+"]";null===f&&(f=document.getElementById(a),akeeba.Configuration.FtpTest.buttonKey=a);null===f&&console.warn("Button "+akeeba.Configuration.FtpTest.buttonKey+" not found");f.setAttribute("disabled","disabled");a={};try{a={isCurl:d?1:0,host:document.getElementById("var["+b+".host]").value,port:document.getElementById("var["+b+".port]").value,user:document.getElementById("var["+
b+".user]").value,pass:document.getElementById("var["+b+".pass]").value,initdir:document.getElementById("var["+b+".initial_directory]").value,usessl:document.getElementById("var["+b+".ftps]").checked,passive:document.getElementById("var["+b+".passive_mode]").checked,passive_mode_workaround:0}}catch(c){a={isCurl:d?1:0,host:document.getElementById(b+"_host").value,port:document.getElementById(b+"_port").value,user:document.getElementById(b+"_user").value,pass:document.getElementById(b+"_pass").value,
initdir:document.getElementById(b+"_initial_directory").value,usessl:document.getElementById(b+"_ftps").checked,passive:document.getElementById(b+"_passive_mode").checked,passive_mode_workaround:0}}if(d)try{a.passive_mode_workaround=document.getElementById("var["+b+".passive_mode_workaround]").checked}catch(c){a.passive_mode_workaround=document.getElementById(b+"_passive_mode_workaround").checked}akeeba.System.params.AjaxURL=akeeba.Configuration.URLs.testFtp;console.log(a);console.log(akeeba.System.params.AjaxURL);
akeeba.System.doAjax(a,function(c){document.getElementById(akeeba.Configuration.FtpTest.buttonKey).removeAttribute("disabled");var e=document.getElementById("testFtpDialogBodyOk"),g=document.getElementById("testFtpDialogBodyFail"),h=document.getElementById("testFtpDialogLabel");e.style.display="none";g.style.display="none";!0===c?(h.textContent=akeeba.System.Text._("COM_AKEEBA_CONFIG_DIRECTFTP_TEST_OK"),e.textContent=akeeba.System.Text._("COM_AKEEBA_CONFIG_DIRECTFTP_TEST_OK"),e.style.display="block",
g.style.display="none"):(h.textContent=akeeba.System.Text._("COM_AKEEBA_CONFIG_DIRECTFTP_TEST_FAIL"),g.textContent=c,e.style.display="none",g.style.display="block");akeeba.Loader.add("akeeba.Modal",function(){akeeba.Modal.open({inherit:"#testFtpDialog",width:"80%"})})},null,!1,15E3)};
akeeba.Configuration.SftpTest.testConnection=function(a,b,d){var f=document.getElementById("var["+a+"]");akeeba.Configuration.SftpTest.buttonKey="var["+a+"]";f.setAttribute("disabled","disabled");a={isCurl:d?1:0,host:document.getElementById("var["+b+".host]").value,port:document.getElementById("var["+b+".port]").value,user:document.getElementById("var["+b+".user]").value,pass:document.getElementById("var["+b+".pass]").value,initdir:document.getElementById("var["+b+".initial_directory]").value,privkey:document.getElementById("var["+
b+".privkey]").value,pubkey:document.getElementById("var["+b+".pubkey]").value};akeeba.System.params.AjaxURL=akeeba.Configuration.URLs.testSftp;akeeba.System.doAjax(a,function(c){document.getElementById(akeeba.Configuration.SftpTest.buttonKey).removeAttribute("disabled");var e=document.getElementById("testFtpDialogBodyOk"),g=document.getElementById("testFtpDialogBodyFail"),h=document.getElementById("testFtpDialogLabel");e.style.display="none";g.style.display="none";!0===c?(h.textContent=akeeba.System.Text._("COM_AKEEBA_CONFIG_DIRECTSFTP_TEST_OK"),
e.textContent=akeeba.System.Text._("COM_AKEEBA_CONFIG_DIRECTSFTP_TEST_OK"),e.style.display="block",g.style.display="none"):(h.textContent=akeeba.System.Text._("COM_AKEEBA_CONFIG_DIRECTSFTP_TEST_FAIL"),g.textContent=c,e.style.display="none",g.style.display="block");akeeba.Loader.add("akeeba.Modal",function(){akeeba.Modal.open({inherit:"#testFtpDialog",width:"80%"})})},null,!1,15E3)};
akeeba.Configuration.enablePopoverFor=function(a){if("object"==typeof a&&NodeList.prototype.isPrototypeOf(a))for(i=0;i<a.length;i++)akeeba.Configuration.enablePopoverFor(a[i]);else akeeba.Loader.add("akeeba.Tooltip",function(){akeeba.Tooltip.enableFor(a)})};
akeeba.Configuration.parseGuiData=function(a,b){null==b&&(b=document.getElementById("akeebagui"));b.innerHTML="";var d=0,f;for(f in a)if(a.hasOwnProperty(f)){var c=a[f];d++;if(!empty(c)){var e=document.createElement("div");e.className="akeeba-panel--info";b.appendChild(e);var g=document.createElement("header");g.id="auigrp_"+b.id+"_"+d;g.className="akeeba-block-header";var h=document.createElement("h5");h.innerHTML=f;g.appendChild(h);e.appendChild(g);for(var k in c)if(c.hasOwnProperty(k)){g=c[k];
h="var["+k+"]";var p=g.showon??null,l=document.createElement("div");l.className="akeeba-ui-optionrow akeeba-form-group";l.id="akconfigrow."+k;p&&(l.dataset.showon=JSON.stringify(p));"hidden"!=g.type&&"none"!=g.type&&e.appendChild(l);akeeba.Configuration.GUI.renderOptionLabel(h,g,l);p=document.createElement("div");p.className="akeeba-form-controls";var m="renderOptionType"+(g.type[0].toUpperCase()+g.type.slice(1));if("function"===typeof akeeba.Configuration.GUI[m])akeeba.Configuration.GUI[m](h,g,p,
l,e);else akeeba.Configuration.GUI.renderOptionTypeUnknown(h,g,p,l,e)}Joomla.Showon&&Joomla.Showon.initialise(b)}}akeeba.Configuration.enablePopoverFor(b.querySelectorAll('[rel="akeeba-sticky-tooltip"]'))};
akeeba.Configuration.GUI.renderOptionLabel=function(a,b,d){if("hidden"!=b.type&&"none"!=b.type){var f=document.createElement("label");f.className="akeeba-control-label";f.setAttribute("for",a);f.innerHTML=b.title;b.description&&(f.setAttribute("rel","akeeba-sticky-tooltip"),f.setAttribute("data-original-title",b.title),f.setAttribute("data-content",b.description));b.bold&&(f.style.fontWeight="bold");d.appendChild(f)}};akeeba.Configuration.GUI.renderOptionTypeNone=function(a,b,d,f,c){};
akeeba.Configuration.GUI.renderOptionTypeHidden=function(a,b,d,f,c){d=document.createElement("input");d.id=a;d.setAttribute("type","hidden");d.setAttribute("name",a);d.setAttribute("size","40");d.value=b["default"];c.appendChild(d)};akeeba.Configuration.GUI.renderOptionTypeSeparator=function(a,b,d,f,c){a=document.createElement("div");a.className="akeeba_ui_separator";c.appendChild(a)};
akeeba.Configuration.GUI.renderOptionTypeCheckandhide=function(a,b,d,f,c){c=document.createElement("span");d.appendChild(c);f.appendChild(d);d=document.createElement("input");d.setAttribute("type","hidden");d.id=a;d.setAttribute("name",a);d.setAttribute("size","40");d.value=b["default"];c.appendChild(d);a=b.labelempty;""!=b["default"]&&(a=b.labelnotempty);d=document.createElement("span");d.textContent=a;c.appendChild(d);akeeba.System.data.set(d,"labelempty",b.labelempty);akeeba.System.data.set(d,
"labelnotempty",b.labelnotempty)};
akeeba.Configuration.GUI.renderOptionTypeInstaller=function(a,b,d,f,c){c=document.createElement("select");c.className="akeeba-configuration-select-installer";c.id=a;c.setAttribute("name",a);for(key in akeeba.Configuration.installers)if(akeeba.Configuration.installers.hasOwnProperty(key)){a=akeeba.Configuration.installers[key];var e=document.createElement("option");e.value=key;e.innerHTML=a.name;b["default"]==key&&e.setAttribute("selected",1);c.appendChild(e)}d.appendChild(c);f.appendChild(d)};
akeeba.Configuration.GUI.renderOptionTypeEngine=function(a,b,d,f,c){var e=b.subtype;if(null!=akeeba.Configuration.engines[e]){var g=a.substr(4,a.length-5),h=document.createElement("div");h.id=g+"_config";h.className="akeeba-hidden-mobile akeeba-hidden-desktop akeeba-engine-options";var k=document.createElement("select");k.id=a;k.setAttribute("name",a);a=akeeba.Configuration.engines[e];for(key in a)if(a.hasOwnProperty(key)){c=a[key];var p=document.createElement("option");p.value=key;p.innerHTML=c.information.title;
b["default"]==key&&p.setAttribute("selected","selected");k.appendChild(p)}akeeba.System.addEventListener(k,"change",function(l){l={};var m=[document.getElementById(g+"_config").querySelectorAll("input"),document.getElementById(g+"_config").querySelectorAll("select")];for(i=0;i<m.length;i++){var n=m[i];if(n.length)for(j=0;j<n.length;j++){var q=n[j];var r=q.id;l[r]=q.value;"checkbox"==q.getAttribute("type")?l[r]=q.checked:"select"==q.getAttribute("type")&&(l[r]=q.options[q.selectedIndex].value)}}var t=
akeeba.Configuration.engines[e][k.value];m={};m[t.information.title]=t.parameters;akeeba.Configuration.parseGuiData(m,h);m=h.querySelector("header");m instanceof Element&&m.insertAdjacentHTML("afterend",'<p class="akeeba-block--information">'+t.information.description+"</p>");m=[document.getElementById(g+"_config").querySelectorAll("input"),document.getElementById(g+"_config").querySelectorAll("select")];for(i=0;i<m.length;i++)if(n=m[i],n.length)for(j=0;j<n.length;j++)q=n[j],r=q.id,r=l[r],null!=r&&
void 0!=r&&("checkbox"==q.getAttribute("type")?r?q.setAttribute("checked","checked"):q.removeAttribute("checked"):q.value=r,1==i&&akeeba.System.triggerEvent(q,"change"));if("undefined"!==typeof t.information.activation_callback)window[t.information.activation_callback](t.parameters)});a=document.createElement("button");a.className="akeeba-btn--small--dark";c=document.createElement("span");c.className="akion-wrench";a.appendChild(c);c=document.createElement("span");c.innerHTML=akeeba.System.Text._("COM_AKEEBA_CONFIG_UI_CONFIG");
a.appendChild(c);akeeba.System.addEventListener(a,"click",function(l){akeeba.System.toggleClass(h,"akeeba-hidden-mobile");akeeba.System.toggleClass(h,"akeeba-hidden-desktop");l.preventDefault?l.preventDefault():l.returnValue=!1});c=document.createElement("span");c.innerHTML=" ";d.appendChild(k);d.appendChild(c);d.appendChild(a);d.appendChild(h);f.appendChild(d);if(null!=akeeba.Configuration.engines[e][b["default"]]&&(d=akeeba.Configuration.engines[e][b["default"]],f=d.information.title,a={},
a[f]=d.parameters,0!=b["protected"]&&(document.createElement("span").textContent=f,k.style.display="none"),akeeba.Configuration.parseGuiData(a,h),b=h.querySelector("header"),b instanceof Element&&b.insertAdjacentHTML("afterend",'<p class="akeeba-block--information">'+d.information.description+"</p>"),"undefined"!==typeof d.information.activation_callback))window[d.information.activation_callback](d.parameters)}};
akeeba.Configuration.GUI.renderOptionTypeBrowsedir=function(a,b,d,f,c){var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("name",a);e.setAttribute("size","30");e.id=a;e.value=b["default"];a=document.createElement("button");a.className="akeeba-btn--grey";a.setAttribute("title",akeeba.System.Text._("COM_AKEEBA_CONFIG_UI_BROWSE"));b=document.createElement("span");b.className="akion-folder";a.appendChild(b);akeeba.System.addEventListener(a,"click",function(g){g.preventDefault?
g.preventDefault():g.returnValue=!1;if(null!=akeeba.Configuration.onBrowser)akeeba.Configuration.onBrowser(e.value,e);return!1});b=document.createElement("div");b.className="akeeba-input-group";c=document.createElement("span");c.className="akeeba-input-group-btn";b.appendChild(e);c.appendChild(a);b.appendChild(c);d.appendChild(b);f.appendChild(d)};
akeeba.Configuration.GUI.renderOptionTypeButtonedit=function(a,b,d,f,c){var e="hidden"==b.editortype?"hidden":"text";c=document.createElement("input");c.className="akeeba-configuration-buttonedit";c.setAttribute("type",e);c.setAttribute("name",a);c.setAttribute("size",30);c.value=b["default"];"1"==b.editordisabled&&c.setAttribute("disabled","disabled");a=document.createElement("button");a.innerHTML=akeeba.System.Text._(b.buttontitle);a.className="akeeba-btn--grey";akeeba.System.addEventListener(a,
"click",function(g){g.preventDefault?g.preventDefault():g.returnValue=!1;g=b.hook;try{window[g]()}catch(h){}});e=document.createElement("span");e.className="input-append";e.appendChild(c);e.appendChild(a);d.appendChild(e);f.appendChild(d)};
akeeba.Configuration.GUI.renderOptionTypeEnum=function(a,b,d,f,c){var e=document.createElement("select");e.className="akeeba-configuration-select-enum";e.id=a;e.setAttribute("name",a);a=b.enumvalues.split("|");c=b.enumkeys.split("|");for(counter=0;counter<a.length;counter++){var g=a[counter],h=c[counter],k=document.createElement("option");k.value=g;k.innerHTML=h;g==b["default"]&&k.setAttribute("selected","selected");e.appendChild(k)}"undefined"!==typeof b.onchange&&akeeba.System.addEventListener(e,
"change",function(){(0,b.onchange)(e)});d.appendChild(e);f.appendChild(d)};akeeba.Configuration.GUI.renderOptionTypeString=function(a,b,d,f,c){c=document.createElement("input");c.className="akeeba-configuration-string";c.setAttribute("type","text");c.id=a;c.setAttribute("name",a);c.setAttribute("size",40);c.value=b["default"];d.appendChild(c);f.appendChild(d)};
akeeba.Configuration.GUI.renderOptionTypePassword=function(a,b,d,f,c){akeeba.Configuration.passwordFields[a]=b["default"];c=document.createElement("input");c.className="akeeba-configuration-password";c.setAttribute("type","password");c.id=a;c.setAttribute("name",a);c.setAttribute("size",40);c.value=b["default"];c.setAttribute("autocomplete","off");d.appendChild(c);f.appendChild(d)};
akeeba.Configuration.GUI.renderOptionTypeInteger=function(a,b,d,f,c){c=a.substr(4,a.length-5);var e=document.createElement("input");e.id=c;e.setAttribute("name",a);e.setAttribute("type","hidden");e.value=b["default"];var g=document.createElement("input");g.setAttribute("type","text");g.setAttribute("size","10");g.id=c+"_custom";g.style.display="none";g.className="akeeba-form-input-mini";akeeba.System.addEventListener(g,"blur",function(){var n=parseFloat(g.value);n*=b.scale;n<b.min?n=b.min:n>b.max&&
(n=b.max);e.value=n;g.value=(n/b.scale).toFixed(2)});var h=document.createElement("select");h.id=c+"_dropdown";h.setAttribute("name",c+"_dropdown");h.className="akeeba-form-input-small";c=b.shortcuts.split("|");var k=b.scale;a=!1;for(counter=0;counter<c.length;counter++){var p=c[counter],l=p/k,m=document.createElement("option");m.value=p;m.innerHTML=l.toFixed(2);p==b["default"]&&(m.setAttribute("selected","selected"),a=!0);h.appendChild(m)}c=document.createElement("option");c.value=-1;c.innerHTML=
"Custom...";a||(c.setAttribute("selected","selected"),g.value=(b["default"]/b.scale).toFixed(2),g.style.display="inline-block");h.appendChild(c);akeeba.System.addEventListener(h,"change",function(){var n=h.value;-1==n?(g.value=(b["default"]/b.scale).toFixed(2),g.style.display="inline-block",akeeba.System.triggerEvent(g,"focus")):(e.value=n,g.style.display="none")});a=b.uom;"string"!=typeof a||empty(a)?(a="",d.appendChild(h),d.appendChild(g)):(c=document.createElement("div"),c.className="akeeba-input-group--small",
k=document.createElement("span"),k.textContent=" "+a,c.appendChild(h),c.appendChild(g),c.appendChild(k),d.appendChild(c));d.appendChild(e);f.appendChild(d)};
akeeba.Configuration.GUI.renderOptionTypeBool=function(a,b,d,f,c){c=document.createElement("div");c.className="akeeba-ui-checkbox";var e=document.createElement("input");e.setAttribute("name",a);e.setAttribute("type","hidden");e.value=0;c.appendChild(e);e=document.createElement("input");e.id=a;e.setAttribute("name",a);e.setAttribute("type","checkbox");e.setAttribute("value",1);0!=b["default"]&&e.setAttribute("checked","checked");c.appendChild(e);d.appendChild(c);f.appendChild(d)};
akeeba.Configuration.GUI.renderOptionTypeButton=function(a,b,d,f,c){c=f.querySelector("label");var e=b.hook;b=c.innerHTML;var g=document.createElement("button");g.id=a;g.innerHTML=b;g.className="akeeba-btn--grey";c.innerHTML=" ";akeeba.System.addEventListener(g,"click",function(h){h.preventDefault?h.preventDefault():h.returnValue=!1;try{window[e]()}catch(k){}});d.appendChild(g);f.appendChild(d)};
akeeba.Configuration.GUI.renderOptionTypeUnknown=function(a,b,d,f,c){a=a.substr(4,a.length-5);d="akeeba_render_"+b.type;c=window[d];if("function"==typeof c)c(a,b,label,f);else try{window[d](a,b,label,f)}catch(e){}};akeeba.Configuration.onChangeScriptType=function(a){a=a.options[a.selectedIndex].value;a="joomla"===a?"angie":"angie-"+a;for(var b=document.getElementById("var[akeeba.advanced.embedded_installer]"),d=b.children,f=0;f<d.length;f++)if(d[f].value===a){b.value=a;break}};
akeeba_directftp_init_browser=function(){akeeba.Configuration.FtpBrowser.initialise("engine.archiver.directftp.initial_directory","engine.archiver.directftp")};akeeba_postprocftp_init_browser=function(){akeeba.Configuration.FtpBrowser.initialise("engine.postproc.ftp.initial_directory","engine.postproc.ftp")};akeeba_directsftp_init_browser=function(){akeeba.Configuration.SftpBrowser.initialise("engine.archiver.directsftp.initial_directory","engine.archiver.directsftp")};
akeeba_postprocsftp_init_browser=function(){akeeba.Configuration.FtpBrowser.initialise("engine.postproc.sftp.initial_directory","engine.postproc.sftp")};directftp_test_connection=function(){akeeba.Configuration.FtpTest.testConnection("engine.archiver.directftp.ftp_test","engine.archiver.directftp",0)};postprocftp_test_connection=function(){akeeba.Configuration.FtpTest.testConnection("engine.postproc.ftp.ftp_test","engine.postproc.ftp",0)};
directftpcurl_test_connection=function(){akeeba.Configuration.FtpTest.testConnection("engine.archiver.directftpcurl.ftp_test","engine.archiver.directftpcurl",1)};postprocftpcurl_test_connection=function(){akeeba.Configuration.FtpTest.testConnection("engine.postproc.ftpcurl.ftp_test","engine.postproc.ftpcurl",1)};directsftp_test_connection=function(){akeeba.Configuration.SftpTest.testConnection("engine.archiver.directsftp.sftp_test","engine.archiver.directsftp",0)};
postprocsftp_test_connection=function(){akeeba.Configuration.SftpTest.testConnection("engine.postproc.sftp.sftp_test","engine.postproc.sftp",0)};directsftpcurl_test_connection=function(){akeeba.Configuration.SftpTest.testConnection("engine.archiver.directsftpcurl.sftp_test","engine.archiver.directsftpcurl",1)};postprocsftpcurl_test_connection=function(){akeeba.Configuration.SftpTest.testConnection("engine.postproc.sftpcurl.sftp_test","engine.postproc.sftpcurl",1)};
akconfig_dropbox_openoauth=function(){var a=akeeba.Configuration.URLs.dpeauthopen;a=-1==a.indexOf("?")?a+"?":a+"&";window.open(a+"engine=dropbox","akeeba_dropbox_window","width=1010,height=500,opener")};
akconfig_dropbox_gettoken=function(){akeeba.System.AjaxURL=akeeba.Configuration.URLs.dpecustomapi;akeeba.System.doAjax({engine:"dropbox",method:"getauth"},function(a){""!=a.error?alert("ERROR: Could not complete authentication; please retry"):(document.getElementById("var[engine.postproc.dropbox.token]").value=a.token.oauth_token,document.getElementById("var[engine.postproc.dropbox.token_secret]").value=a.token.oauth_token_secret,document.getElementById("var[engine.postproc.dropbox.uid]").value=a.token.uid,
alert("Authentication successful!"))},function(a){alert("ERROR: Could not complete authentication; please retry\n"+a)},!1,15E3)};akconfig_dropbox2_openoauth=function(){var a=akeeba.Configuration.URLs.dpeauthopen;a=-1==a.indexOf("?")?a+"?":a+"&";window.open(a+"engine=dropbox2","akeeba_dropbox2_window","width=1010,height=500,opener")};
akeeba_dropbox2_oauth_callback=function(a){document.getElementById("var[engine.postproc.dropbox2.access_token]").value=a.access_token;document.getElementById("var[engine.postproc.dropbox2.refresh_token]").value=a.refresh_token;myWindow=window.open("","akeeba_dropbox2_window");myWindow.close()};akconfig_onedrive_openoauth=function(){var a=akeeba.Configuration.URLs.dpeauthopen;a=-1==a.indexOf("?")?a+"?":a+"&";window.open(a+"engine=onedrive","akeeba_onedrive_window","width=1010,height=500,opener")};
akeeba_onedrive_oauth_callback=function(a){document.getElementById("var[engine.postproc.onedrive.access_token]").value=a.access_token;document.getElementById("var[engine.postproc.onedrive.refresh_token]").value=a.refresh_token;myWindow=window.open("","akeeba_onedrive_window");myWindow.close()};akconfig_onedrivebusiness_openoauth=function(){var a=akeeba.Configuration.URLs.dpeauthopen;a=-1==a.indexOf("?")?a+"?":a+"&";window.open(a+"engine=onedrivebusiness","akeeba_onedrivebusiness_window","width=1010,height=500,opener")};
akeeba_onedrivebusiness_oauth_callback=function(a){document.getElementById("var[engine.postproc.onedrivebusiness.access_token]").value=a.access_token;document.getElementById("var[engine.postproc.onedrivebusiness.refresh_token]").value=a.refresh_token;myWindow=window.open("","akeeba_onedrivebusiness_window");myWindow.close();akeeba_onedrivebusiness_refreshdrives()};
akeeba_onedrivebusiness_refreshdrives=function(a){if("onedrivebusiness"===document.getElementById("var[akeeba.advanced.postproc_engine]").value){a=a||{};"undefined"===typeof a["engine.postproc.onedrivebusiness.drive"]&&(a["engine.postproc.onedrivebusiness.drive"]={"default":document.getElementById("var[engine.postproc.onedrivebusiness.drive]").value});akeeba.System.AjaxURL=akeeba.Configuration.URLs.dpecustomapi;var b={engine:"onedrivebusiness",method:"getDrives",params:{"engine.postproc.onedrivebusiness.access_token":document.getElementById("var[engine.postproc.onedrivebusiness.access_token]").value,
"engine.postproc.onedrivebusiness.refresh_token":document.getElementById("var[engine.postproc.onedrivebusiness.refresh_token]").value}};akeeba.System.doAjax(b,function(d){if(0===d.length)alert("ERROR: Could not retrieve list of OneDrive Drives.");else{var f=document.getElementById("var[engine.postproc.onedrivebusiness.drive]");f.innerHTML="";for(var c=0;c<d.length;c++){var e=document.createElement("option");e.value=d[c][0];e.text=d[c][1];a["engine.postproc.onedrivebusiness.drive"]["default"]===e.value&&
(e.selected=!0);f.appendChild(e)}}},function(d){alert("ERROR: Could not retrieve list of OneDrive Drives. Error: \n"+d)},!1,15E3)}};akconfig_googledrive_openoauth=function(){var a=akeeba.Configuration.URLs.dpeauthopen;a=-1==a.indexOf("?")?a+"?":a+"&";window.open(a+"engine=googledrive","akeeba_googledrive_window","width=1010,height=500,opener")};
akeeba_googledrive_oauth_callback=function(a){document.getElementById("var[engine.postproc.googledrive.access_token]").value=a.access_token;document.getElementById("var[engine.postproc.googledrive.refresh_token]").value=a.refresh_token;myWindow=window.open("","akeeba_googledrive_window");myWindow.close();akeeba_googledrive_refreshdrives()};
akeeba_googledrive_refreshdrives=function(a){if("googledrive"===document.getElementById("var[akeeba.advanced.postproc_engine]").value){a=a||{};console.log(a);"undefined"===typeof a["engine.postproc.googledrive.team_drive"]&&(a["engine.postproc.googledrive.team_drive"]={"default":document.getElementById("var[engine.postproc.googledrive.team_drive]").value});akeeba.System.AjaxURL=akeeba.Configuration.URLs.dpecustomapi;var b={engine:"googledrive",method:"getDrives",params:{"engine.postproc.googledrive.access_token":document.getElementById("var[engine.postproc.googledrive.access_token]").value,
"engine.postproc.googledrive.refresh_token":document.getElementById("var[engine.postproc.googledrive.refresh_token]").value}};akeeba.System.doAjax(b,function(d){if(0===d.length)alert("ERROR: Could not retrieve list of Google Drives.");else{var f=document.getElementById("var[engine.postproc.googledrive.team_drive]");f.innerHTML="";for(var c=0;c<d.length;c++){var e=document.createElement("option");e.value=d[c][0];e.text=d[c][1];a["engine.postproc.googledrive.team_drive"]["default"]===e.value&&(e.selected=
!0);f.appendChild(e)}}},function(d){alert("ERROR: Could not retrieve list of Google Drives. Error: \n"+d)},!1,15E3)}};akconfig_box_openoauth=function(){var a=akeeba.Configuration.URLs.dpeauthopen;a=-1==a.indexOf("?")?a+"?":a+"&";window.open(a+"engine=box","akeeba_box_window","width=1010,height=500,opener")};
akconfig_box_oauth_callback=function(a){document.getElementById("var[engine.postproc.box.access_token]").value=a.access_token;document.getElementById("var[engine.postproc.box.refresh_token]").value=a.refresh_token;myWindow=window.open("","akeeba_box_window");myWindow.close()};
akeeba.Loader.add(["akeeba.UserInterfaceCommon","akeeba.System","akeeba.Ajax"],function(){akeeba.Configuration.URLs=akeeba.System.getOptions("akeeba.Configuration.URLs",{});"undefined"!==typeof akeeba.Configuration.URLs.dpecustomapi&&(akeeba.System.params.AjaxURL=akeeba.Configuration.URLs.dpecustomapi);null!==akeeba.System.getOptions("akeeba.Configuration.GUIData",null)&&setTimeout(function(){setTimeout(akeeba.Configuration.restoreDefaultPasswords,1E3);akeeba.Configuration.parseConfigData(akeeba.System.getOptions("akeeba.Configuration.GUIData",
{}));akeeba.Configuration.enablePopoverFor(document.querySelectorAll('[rel="popover"]'));akeeba_googledrive_refreshdrives(akeeba.Configuration.engines.postproc.googledrive.parameters);akeeba_onedrivebusiness_refreshdrives(akeeba.Configuration.engines.postproc.onedrivebusiness.parameters)},10)}); //# sourceMappingURL=Configuration.min.map