Current File : /home/pacjaorg/www/kmm/media/com_akeebabackup/js/Configuration.min.js |
"use strict";function _regeneratorRuntime(){"use strict";function e(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}function t(e,t,r,a){var i=t&&t.prototype instanceof o?t:o,s=Object.create(i.prototype),l=new c(a||[]);return s._invoke=function(e,t,o){var r="suspendedStart";return function(a,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw i;return g()}for(o.method=a,o.arg=i;;){var s=o.delegate;if(s){var l=d(s,o);if(l){if(l===_)continue;return l}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===r)throw r="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);r="executing";var p=n(e,t,o);if("normal"===p.type){if(r=o.done?"completed":"suspendedYield",p.arg===_)continue;return{value:p.arg,done:o.done}}"throw"===p.type&&(r="completed",o.method="throw",o.arg=p.arg)}}}(e,r,l),s}function n(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function o(){}function r(){}function a(){}function i(t){["next","throw","return"].forEach(function(n){e(t,n,function(e){return this._invoke(n,e)})})}function s(e,t){function o(r,a,i,s){var d=n(e[r],e,a);if("throw"!==d.type){var l=d.arg,p=l.value;return p&&"object"==typeof p&&y.call(p,"__await")?t.resolve(p.__await).then(function(e){o("next",e,i,s)},function(e){o("throw",e,i,s)}):t.resolve(p).then(function(e){l.value=e,i(l)},function(e){return o("throw",e,i,s)})}s(d.arg)}var r;this._invoke=function(e,n){function a(){return new t(function(t,r){o(e,n,t,r)})}return r=r?r.then(a,a):a()}}function d(e,t){var o=e.iterator[t.method];if(void 0===o){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,d(e,t),"throw"===t.method))return _;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return _}var r=n(o,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,_;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,_):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,_)}function l(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function p(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function c(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(l,this),this.reset(!0)}function u(e){if(e){var t=e[h];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(y.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:g}}function g(){return{value:void 0,done:!0}}_regeneratorRuntime=function(){return m};var m={},f=Object.prototype,y=f.hasOwnProperty,v="function"==typeof Symbol?Symbol:{},h=v.iterator||"@@iterator",b=v.asyncIterator||"@@asyncIterator",C=v.toStringTag||"@@toStringTag";try{e({},"")}catch(t){e=function(e,t,n){return e[t]=n}}m.wrap=t;var _={},E={};e(E,h,function(){return this});var k=Object.getPrototypeOf,w=k&&k(k(u([])));w&&w!==f&&y.call(w,h)&&(E=w);var B=a.prototype=o.prototype=Object.create(E);return r.prototype=a,e(B,"constructor",a),e(a,"constructor",r),r.displayName=e(a,C,"GeneratorFunction"),m.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===r||"GeneratorFunction"===(t.displayName||t.name))},m.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,a):(t.__proto__=a,e(t,C,"GeneratorFunction")),t.prototype=Object.create(B),t},m.awrap=function(e){return{__await:e}},i(s.prototype),e(s.prototype,b,function(){return this}),m.AsyncIterator=s,m.async=function(e,n,o,r,a){void 0===a&&(a=Promise);var i=new s(t(e,n,o,r),a);return m.isGeneratorFunction(n)?i:i.next().then(function(e){return e.done?e.value:i.next()})},i(B),e(B,C,"Generator"),e(B,h,function(){return this}),e(B,"toString",function(){return"[object Generator]"}),m.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var o=t.pop();if(o in e)return n.value=o,n.done=!1,n}return n.done=!0,n}},m.values=u,c.prototype={constructor:c,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(p),!e)for(var t in this)"t"===t.charAt(0)&&y.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function stop(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function dispatchException(e){function t(t,o){return a.type="throw",a.arg=e,n.next=t,o&&(n.method="next",n.arg=void 0),!!o}if(this.done)throw e;for(var n=this,o=this.tryEntries.length-1;0<=o;--o){var r=this.tryEntries[o],a=r.completion;if("root"===r.tryLoc)return t("end");if(r.tryLoc<=this.prev){var s=y.call(r,"catchLoc"),d=y.call(r,"finallyLoc");if(s&&d){if(this.prev<r.catchLoc)return t(r.catchLoc,!0);if(this.prev<r.finallyLoc)return t(r.finallyLoc)}else if(!s){if(!d)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return t(r.finallyLoc)}else if(this.prev<r.catchLoc)return t(r.catchLoc,!0)}}},abrupt:function abrupt(e,t){for(var n,o=this.tryEntries.length-1;0<=o;--o)if(n=this.tryEntries[o],n.tryLoc<=this.prev&&y.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var r=n;break}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var a=r?r.completion:{};return a.type=e,a.arg=t,r?(this.method="next",this.next=r.finallyLoc,_):this.complete(a)},complete:function complete(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),_},finish:function finish(e){for(var t,n=this.tryEntries.length-1;0<=n;--n)if(t=this.tryEntries[n],t.finallyLoc===e)return this.complete(t.completion,t.afterLoc),p(t),_},catch:function _catch(e){for(var t,n=this.tryEntries.length-1;0<=n;--n)if(t=this.tryEntries[n],t.tryLoc===e){var o=t.completion;if("throw"===o.type){var r=o.arg;p(t)}return r}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,t,n){return this.delegate={iterator:u(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),_}},m}function asyncGeneratorStep(e,t,n,o,r,a,i){try{var s=e[a](i),d=s.value}catch(e){return void n(e)}s.done?t(d):Promise.resolve(d).then(o,r)}function _asyncToGenerator(e){return function(){var t=this,n=arguments;return new Promise(function(o,r){function a(e){asyncGeneratorStep(s,o,r,a,i,"next",e)}function i(e){asyncGeneratorStep(s,o,r,a,i,"throw",e)}var s=e.apply(t,n);a(void 0)})}}if("undefined"==typeof akeebabackup)var akeebabackup={};"undefined"==typeof akeebabackup.Configuration&&(akeebabackup.Configuration={GUI:{renderOptionLabel:function renderOptionLabel(e,t,n){var o,r=0!=(null!==(o=t.nolabel)&&void 0!==o?o:0);if(!(r||"hidden"===t.type||"none"===t.type)){var a=document.createElement("label");a.className="col-sm-3 col-form-label",a.setAttribute("for",e),a.innerHTML=t.title,t.description&&(a.setAttribute("rel","popover"),a.setAttribute("title",t.title),a.setAttribute("data-bs-content",t.description)),t.bold&&(a.className+=" fw-bold"),n.appendChild(a)}},renderOptionTypeNone:function renderOptionTypeNone(){},renderOptionTypeHidden:function renderOptionTypeHidden(e,t,n,o,r){var a=document.createElement("input");a.id=e,a.setAttribute("type","hidden"),a.setAttribute("name",e),a.value=t["default"],r.appendChild(a)},renderOptionTypeSeparator:function renderOptionTypeSeparator(e,t,n,o,r){var a,i,s=null!==(a=t.element)&&void 0!==a?a:"div",d=null!==(i=t.content)&&void 0!==i?i:null,l=document.createElement(s);d&&(l.innerHTML=d),r.appendChild(l)},renderOptionTypeInstaller:function renderOptionTypeInstaller(e,t,n,o){var r=document.createElement("select");for(var a in r.className="form-select akeeba-configuration-select-installer",r.id=e,r.setAttribute("name",e),akeebabackup.Configuration.installers)if(akeebabackup.Configuration.installers.hasOwnProperty(a)){var i=akeebabackup.Configuration.installers[a],s=document.createElement("option");s.value=a,s.innerHTML=i.name,t["default"]===a&&s.setAttribute("selected",1),r.appendChild(s)}n.appendChild(r),o.appendChild(n)},renderOptionTypeEngine:function renderOptionTypeEngine(e,t,n,o){var r=t.subtype;if(null!=akeebabackup.Configuration.engines[r]){var a=e.substr(4,e.length-5),s=document.createElement("div");s.id=a+"_config",s.className="akeeba-engine-options";var d=document.createElement("select");d.className="form-select",d.id=e,d.setAttribute("name",e);var l=akeebabackup.Configuration.engines[r];for(var p in l)if(l.hasOwnProperty(p)){var c=l[p],u=document.createElement("option");u.value=p,u.innerHTML=c.information.title,t["default"]==p&&u.setAttribute("selected","selected"),d.appendChild(u)}akeebabackup.System.addEventListener(d,"change",function(){for(var e={},t=[document.getElementById(a+"_config").querySelectorAll("input"),document.getElementById(a+"_config").querySelectorAll("select")],n=null,o=null,l=null,p=0;p<t.length;p++)if(n=t[p],!!n.length)for(y=0;y<n.length;y++)o=n[y],l=o.id,e[l]=o.value,"checkbox"===o.getAttribute("type")||"radio"===o.getAttribute("type")?e[l]=o.checked:"select"===o.getAttribute("type")&&(e[l]=o.options[o.selectedIndex].value);var c=d.value,u=akeebabackup.Configuration.engines[r][c],g=u.information.title,m={};m[g]=u.parameters,akeebabackup.Configuration.parseGuiData(m,s);var f=s.querySelector("div.card-body");for(f instanceof Element&&f.insertAdjacentHTML("afterbegin","<p class=\"alert alert-info\">"+u.information.description+"</p>"),t=[document.getElementById(a+"_config").querySelectorAll("input"),document.getElementById(a+"_config").querySelectorAll("select")],p=0;p<t.length;p++)if(n=t[p],!!n.length)for(var y=0;y<n.length;y++){o=n[y],l=o.id;var v=e[l];null!=v&&("checkbox"===o.getAttribute("type")||"radio"===o.getAttribute("type")?v?o.setAttribute("checked","checked"):o.removeAttribute("checked"):o.value=v,1===p&&akeebabackup.System.triggerEvent(o,"change"))}akeebabackup.Configuration.initialisePopovers(),"undefined"!=typeof u.information.activation_callback&&window[u.information.activation_callback](u.parameters)});var g=document.createElement("button");g.className="btn btn-secondary btn-sm";var m=document.createElement("span");m.className="fa fa-wrench",g.appendChild(m);var f=document.createElement("span");f.innerHTML=Joomla.Text._("COM_AKEEBABACKUP_CONFIG_UI_CONFIG"),g.appendChild(f),akeebabackup.System.addEventListener(g,"click",function(t){t.preventDefault();var e=new bootstrap.Collapse(s);e.toggle()});var y=document.createElement("div");y.className="input-group",y.appendChild(d),n.appendChild(y),n.appendChild(s),o.appendChild(n),akeebabackup.System.triggerEvent(d,"change")}},renderOptionTypeBrowsedir:function renderOptionTypeBrowsedir(e,t,n,o){var r=document.createElement("input");r.className="form-control",r.setAttribute("type","text"),r.setAttribute("name",e),r.setAttribute("size","30"),r.id=e,r.value=t["default"];var a=document.createElement("button");a.className="btn btn-secondary",a.setAttribute("title",Joomla.Text._("COM_AKEEBABACKUP_CONFIG_UI_BROWSE"));var i=document.createElement("span");i.className="fa fa-folder-open",a.appendChild(i),akeebabackup.System.addEventListener(a,"click",function(t){return t.preventDefault(),null!=akeebabackup.Configuration.onBrowser&&akeebabackup.Configuration.onBrowser(r.value,r),!1});var s=document.createElement("div");s.className="input-group",s.appendChild(r),s.appendChild(a),n.appendChild(s),o.appendChild(n)},renderOptionTypeEnum:function renderOptionTypeEnum(e,t,n,o){var r=document.createElement("select");r.className="form-select akeeba-configuration-select-enum",r.id=e,r.setAttribute("name",e);for(var a=t.enumvalues.split("|"),i=t.enumkeys.split("|"),s=0;s<a.length;s++){var d=a[s],l=i[s],p=document.createElement("option");p.value=d,p.innerHTML=l,d===t["default"]&&p.setAttribute("selected","selected"),r.appendChild(p)}"undefined"!=typeof t.onchange&&akeebabackup.System.addEventListener(r,"change",function(){var e=t.onchange;e(r)}),n.appendChild(r),o.appendChild(n)},renderOptionTypeString:function renderOptionTypeString(e,t,n,o){var r=document.createElement("input");r.className="form-control akeeba-configuration-string",r.setAttribute("type","text"),r.id=e,r.setAttribute("name",e),r.value=t["default"],n.appendChild(r),o.appendChild(n)},renderOptionTypePassword:function renderOptionTypePassword(e,t,n,o){akeebabackup.Configuration.passwordFields[e]=t["default"];var r=document.createElement("input");r.className="form-control akeeba-configuration-password",r.setAttribute("type","password"),r.id=e,r.setAttribute("name",e),r.setAttribute("size",40),r.value=t["default"],r.setAttribute("autocomplete","off"),n.appendChild(r),o.appendChild(n)},renderOptionTypeInteger:function renderOptionTypeInteger(e,t,n,o){var r=e.substr(4,e.length-5),a=document.createElement("input");a.id=r,a.setAttribute("name",e),a.setAttribute("type","hidden"),a.value=t["default"];var i=t.min/t.scale,s=t.max/t.scale,d=1/t.scale;1<t.scale?(i=i.toFixed(2),s=s.toFixed(2),d=d.toFixed(2)):(i=Math.trunc(i),s=Math.trunc(s),d=Math.trunc(d));var l=document.createElement("input");l.className="form-control",l.setAttribute("type","number"),l.id=r+"_custom",l.style.display="none",l.setAttribute("min",i),l.setAttribute("max",s),l.setAttribute("step",d),akeebabackup.System.addEventListener(l,"blur",function(){var e=parseFloat(l.value);e*=t.scale,e<t.min?e=t.min:e>t.max&&(e=t.max),a.value=e;var n=e/t.scale;l.value=1<t.scale?n.toFixed(2):Math.trunc(n)});var p=document.createElement("select");p.id=r+"_dropdown",p.setAttribute("name",r+"_dropdown"),p.className="form-select";for(var c=t.shortcuts.split("|"),u=t.scale,g=!1,m=0;m<c.length;m++){var f=c[m],y=f/u,v=document.createElement("option");v.value=f,v.innerHTML=1<u?y.toFixed(2):Math.trunc(y),f==t["default"]&&(v.setAttribute("selected","selected"),g=!0),p.appendChild(v)}var h=document.createElement("option");h.value=-1,h.innerHTML=Joomla.Text._("COM_AKEEBABACKUP_CONFIG_UI_CUSTOM"),g||(h.setAttribute("selected","selected"),l.value=(t["default"]/t.scale).toFixed(2),l.style.display="block"),p.appendChild(h),akeebabackup.System.addEventListener(p,"change",function(){var e=p.value;return"-1"===e?(l.value=(t["default"]/t.scale).toFixed(2),l.style.display="block",void akeebabackup.System.triggerEvent(l,"focus")):void(a.value=e,l.style.display="none")});var b=document.createElement("div");b.className="input-group";var C=t.uom;if(b.appendChild(p),b.appendChild(l),"string"==typeof C&&0!==C.length){var _=document.createElement("span");_.className="input-group-text",_.textContent=C,b.appendChild(_)}n.appendChild(b),n.appendChild(a),o.appendChild(n)},renderOptionTypeBool:function renderOptionTypeBool(e,t,n,o){var r=e.match(/[a-z0-9]/ig).join(""),a=document.createElement("div");a.className="btn-group",a.setAttribute("role","group");var i=document.createElement("input");i.type="radio",i.className="btn-check",i.name=e,i.setAttribute("autocomplete","off"),i.id=r+"_1",i.value="1";var s=document.createElement("label");s.className="btn btn-outline-success",s.setAttribute("for",r+"_1"),s.innerText=Joomla.Text._("JYES");var d=document.createElement("input");d.type="radio",d.className="btn-check",d.name=e,d.setAttribute("autocomplete","off"),d.id=r+"_0",d.value=0;var l=document.createElement("label");l.className="btn btn-outline-danger",l.setAttribute("for",r+"_0"),l.innerText=Joomla.Text._("JNO"),0==t["default"]?d.setAttribute("checked","checked"):i.setAttribute("checked","checked"),a.appendChild(i),a.appendChild(s),a.appendChild(d),a.appendChild(l),n.appendChild(a),o.appendChild(n)},renderOptionTypeButton:function renderOptionTypeButton(e,t,n,o){var r=o.querySelector("label"),a=t.hook,i=r.innerHTML,s=document.createElement("button");s.id=e,s.innerHTML=i,s.className="btn btn-secondary",r.innerHTML=" ",akeebabackup.System.addEventListener(s,"click",function(t){t.preventDefault();try{window[a]()}catch(e){}}),n.appendChild(s),o.appendChild(n)},renderOptionTypeUnknown:function renderOptionTypeUnknown(e,t,n,o){var r=e.substr(4,e.length-5),a="akeeba_render_"+t.type,i=window[a];if("function"==typeof i)i(r,t,label,o);else try{window[a](r,t,label,o)}catch(t){}}},engines:{},installers:{},URLs:{},FtpTest:{testConnection:function testConnection(e,t,n){var o=document.getElementById("var["+e+"]");if(akeebabackup.Configuration.FtpTest.buttonKey="var["+e+"]",null===o&&(o=document.getElementById(e),akeebabackup.Configuration.FtpTest.buttonKey=e),null===o)return void console.warn("Button "+akeebabackup.Configuration.FtpTest.buttonKey+" not found");o.setAttribute("disabled","disabled");var r={};try{r={isCurl:n?1:0,host:document.getElementById("var["+t+".host]").value,port:document.getElementById("var["+t+".port]").value,user:document.getElementById("var["+t+".user]").value,pass:document.getElementById("var["+t+".pass]").value,initdir:document.getElementById("var["+t+".initial_directory]").value,usessl:document.querySelector("input[name=\""+("var["+t+".ftps]")+"\"]:checked").value,passive:document.querySelector("input[name=\""+("var["+t+".passive_mode]")+"\"]:checked").value,passive_mode_workaround:0}}catch(o){r={isCurl:n?1:0,host:document.getElementById(t+"_host").value,port:document.getElementById(t+"_port").value,user:document.getElementById(t+"_user").value,pass:document.getElementById(t+"_pass").value,initdir:document.getElementById(t+"_initial_directory").value,usessl:document.getElementById(t+"_ftps").checked,passive:document.getElementById(t+"_passive_mode").checked,passive_mode_workaround:0}}if(n)try{r.passive_mode_workaround=document.querySelector("input[name=\"var["+t+".passive_mode_workaround]\"]:checked").value}catch(n){r.passive_mode_workaround=document.getElementById(t+"_passive_mode_workaround").checked}akeebabackup.System.params.AjaxURL=akeebabackup.Configuration.URLs.testFtp,akeebabackup.System.doAjax(r,function(e){var t=document.getElementById(akeebabackup.Configuration.FtpTest.buttonKey);t.removeAttribute("disabled");var n=document.getElementById("testFtpDialogBodyOk"),o=document.getElementById("testFtpDialogBodyFail"),r=document.getElementById("testFtpDialogLabel");if(n.style.display="none",o.style.display="none",!0===(null===e||void 0===e?void 0:e.status))r.textContent=Joomla.Text._("COM_AKEEBABACKUP_CONFIG_DIRECTFTP_TEST_OK"),n.textContent=Joomla.Text._("COM_AKEEBABACKUP_CONFIG_DIRECTFTP_TEST_OK"),n.style.display="block",o.style.display="none";else{var a;r.textContent=Joomla.Text._("COM_AKEEBABACKUP_CONFIG_DIRECTFTP_TEST_FAIL"),o.textContent=null!==(a=null===e||void 0===e?void 0:e.status)&&void 0!==a?a:"???",n.style.display="none",o.style.display="block"}var i=new bootstrap.Modal(document.getElementById("testFtpDialog"),{keyboard:!0,backdrop:!0});i.show()},null,!1,15e3)}},SftpTest:{testConnection:function testConnection(e,t,n){var o=document.getElementById("var["+e+"]");akeebabackup.Configuration.SftpTest.buttonKey="var["+e+"]",o.setAttribute("disabled","disabled");var r={isCurl:n?1:0,host:document.getElementById("var["+t+".host]").value,port:document.getElementById("var["+t+".port]").value,user:document.getElementById("var["+t+".user]").value,pass:document.getElementById("var["+t+".pass]").value,initdir:document.getElementById("var["+t+".initial_directory]").value,privkey:document.getElementById("var["+t+".privkey]").value,pubkey:document.getElementById("var["+t+".pubkey]").value};akeebabackup.System.params.AjaxURL=akeebabackup.Configuration.URLs.testSftp,akeebabackup.System.doAjax(r,function(e){var t=document.getElementById(akeebabackup.Configuration.SftpTest.buttonKey);t.removeAttribute("disabled");var n=document.getElementById("testFtpDialogBodyOk"),o=document.getElementById("testFtpDialogBodyFail"),r=document.getElementById("testFtpDialogLabel");if(n.style.display="none",o.style.display="none",!0===(null===e||void 0===e?void 0:e.status))r.textContent=Joomla.Text._("COM_AKEEBABACKUP_CONFIG_DIRECTSFTP_TEST_OK"),n.textContent=Joomla.Text._("COM_AKEEBABACKUP_CONFIG_DIRECTSFTP_TEST_OK"),n.style.display="block",o.style.display="none";else{var a;r.textContent=Joomla.Text._("COM_AKEEBABACKUP_CONFIG_DIRECTSFTP_TEST_FAIL"),o.textContent=null!==(a=null===e||void 0===e?void 0:e.status)&&void 0!==a?a:"???",n.style.display="none",o.style.display="block"}var i=new bootstrap.Modal(document.getElementById("testFtpDialog"),{keyboard:!0,backdrop:!0});i.show()},null,!1,15e3)}},FtpModal:null,passwordFields:{},fsBrowser:{params:{dialogId:"folderBrowserDialog",dialogBodyId:"folderBrowserDialogBody"},modalObject:null},parseConfigData:function parseConfigData(e){akeebabackup.Configuration.engines=e.engines,akeebabackup.Configuration.installers=e.installers,akeebabackup.Configuration.parseGuiData(e.gui)},restoreDefaultPasswords:function restoreDefaultPasswords(){for(var e in akeebabackup.Configuration.passwordFields)if(akeebabackup.Configuration.passwordFields.hasOwnProperty(e)){var t=akeebabackup.Configuration.passwordFields[e],n=document.getElementById(e);n&&(n.value="WORKAROUND FOR NAUGHTY BROWSERS",n.value=t)}},onBrowser:function onBrowser(e,t){akeebabackup.Configuration.onBrowserCallback=function(e){t.value=e,"object"==typeof akeebabackup.Configuration.fsBrowser.modalObject&&akeebabackup.Configuration.fsBrowser.modalObject.close?akeebabackup.Configuration.fsBrowser.modalObject.close():"object"==typeof akeebabackup.Configuration.fsBrowser.modalObject&&akeebabackup.Configuration.fsBrowser.modalObject.hide&&akeebabackup.Configuration.fsBrowser.modalObject.hide()};var n=akeebabackup.Configuration.URLs.browser+encodeURIComponent(e),o=document.getElementById(akeebabackup.Configuration.fsBrowser.params.dialogBodyId);o.innerHTML="";var r=document.createElement("iframe");r.setAttribute("src",n),r.setAttribute("width","100%"),r.setAttribute("height",400),r.setAttribute("frameborder",0),r.setAttribute("allowtransparency","true"),o.appendChild(r),akeebabackup.Configuration.fsBrowser.modalObject=new bootstrap.Modal(document.getElementById(akeebabackup.Configuration.fsBrowser.params.dialogId),{keyboard:!1,backdrop:"static"}),akeebabackup.Configuration.fsBrowser.modalObject.show()},parseGuiData:function parseGuiData(e,t){null==t&&(t=document.getElementById("akeebagui")),t.innerHTML="";var n=0;for(var o in e)if(e.hasOwnProperty(o)){var r=e[o];if(n++,!!r){var a=document.createElement("div");a.className="card mt-3 rounded-top",t.appendChild(a);var i=document.createElement("h3");i.className="card-header",i.innerHTML=o,i.id="auigrp_"+t.id+"_"+n,a.appendChild(i);var s=document.createElement("div");for(var d in s.className="card-body",a.appendChild(s),r){var l;if(r.hasOwnProperty(d)){var p=r[d],c="var["+d+"]",u=null!==(l=p.showon)&&void 0!==l?l:null,g=document.createElement("div");g.className="row mb-3",g.id="akconfigrow."+d,u&&(g.dataset.showon=JSON.stringify(u)),"hidden"!=p.type&&"none"!=p.type&&s.appendChild(g),akeebabackup.Configuration.GUI.renderOptionLabel(c,p,g);var m=document.createElement("div");m.className="col-sm-9";var f=p.type[0].toUpperCase()+p.type.slice(1),y="renderOptionType"+f;"function"==typeof akeebabackup.Configuration.GUI[y]?akeebabackup.Configuration.GUI[y](c,p,m,g,s):akeebabackup.Configuration.GUI.renderOptionTypeUnknown(c,p,m,g,s)}}}}Joomla.Showon.initialise(t)},onChangeScriptType:function onChangeScriptType(e){for(var t,n=e.options[e.selectedIndex].value,o="joomla"===n?"angie":"angie-"+n,r=document.getElementById("var[akeeba.advanced.embedded_installer]"),a=r.children,s=0;s<a.length;s++)if(t=a[s],t.value===o)return void(r.value=o)},initialisePopovers:function initialisePopovers(){var e=Joomla.getOptions("bootstrap.popover");"object"!=typeof e||null===e||Object.keys(e).forEach(function(t){var n=e[t],o={animation:!n.animation||n.animation,container:!!n.container&&n.container,delay:n.delay?n.delay:0,html:!!n.html&&n.html,placement:n.placement?n.placement:"top",selector:!!n.selector&&n.selector,trigger:n.trigger?n.trigger:"click",offset:n.offset?n.offset:0,fallbackPlacement:n.fallbackPlacement?n.fallbackPlacement:"flip",boundary:n.boundary?n.boundary:"scrollParent",customClass:n.customClass?n.customClass:"",sanitize:!n.sanitize||n.sanitize,sanitizeFn:n.sanitizeFn?n.sanitizeFn:null,popperConfig:n.popperConfig?n.popperConfig:null};n.template&&(o.template=n.template),n.allowList&&(o.allowList=n.allowList);var r=Array.from(document.querySelectorAll(t));r.length&&r.map(function(e){new window.bootstrap.Popover(e,o)})})},onFormSubmit:e=>{var t=document.getElementById("adminForm");return!(t&&"undefined"!=typeof window.FormData&&"undefined"!=typeof Object.fromEntries&&"undefined"!=typeof JSON.stringify)||void(e.preventDefault(),akeebabackup.Configuration.submitJsonForm(JSON.stringify(Object.fromEntries(new FormData(t)))))},submitJsonForm:function(){function e(){return t.apply(this,arguments)}var t=_asyncToGenerator(_regeneratorRuntime().mark(function t(e){var n,o,r;return _regeneratorRuntime().wrap(function a(t){for(;1;)switch(t.prev=t.next){case 0:return n=new FormData,n.set("jsonForm",e),n.set(Joomla.getOptions("csrf.token"),1),n.set("task",document.forms.adminForm.task.value),o=null,t.prev=5,t.next=8,fetch(document.forms.adminForm.action,{method:"POST",body:n});case 8:if(r=t.sent,r.redirected&&(o=r.url),r.ok){t.next=12;break}throw new Error("Error found in network response");case 12:t.next=18;break;case 14:return t.prev=14,t.t0=t["catch"](5),location.reload(),t.abrupt("return");case 18:if(o){t.next=21;break}return location.reload(),t.abrupt("return");case 21:window.location=o;case 22:case"end":return t.stop();}},t,null,[[5,14]])}));return e}()});function directftp_test_connection(){akeebabackup.Configuration.FtpTest.testConnection("engine.archiver.directftp.ftp_test","engine.archiver.directftp",0)}function postprocftp_test_connection(){akeebabackup.Configuration.FtpTest.testConnection("engine.postproc.ftp.ftp_test","engine.postproc.ftp",0)}function directftpcurl_test_connection(){akeebabackup.Configuration.FtpTest.testConnection("engine.archiver.directftpcurl.ftp_test","engine.archiver.directftpcurl",1)}function postprocftpcurl_test_connection(){akeebabackup.Configuration.FtpTest.testConnection("engine.postproc.ftpcurl.ftp_test","engine.postproc.ftpcurl",1)}function directsftp_test_connection(){akeebabackup.Configuration.SftpTest.testConnection("engine.archiver.directsftp.sftp_test","engine.archiver.directsftp",0)}function postprocsftp_test_connection(){akeebabackup.Configuration.SftpTest.testConnection("engine.postproc.sftp.sftp_test","engine.postproc.sftp",0)}function directsftpcurl_test_connection(){akeebabackup.Configuration.SftpTest.testConnection("engine.archiver.directsftpcurl.sftp_test","engine.archiver.directsftpcurl",1)}function postprocsftpcurl_test_connection(){akeebabackup.Configuration.SftpTest.testConnection("engine.postproc.sftpcurl.sftp_test","engine.postproc.sftpcurl",1)}function akconfig_dropbox_openoauth(){var e=akeebabackup.Configuration.URLs.dpeauthopen;e+=-1==e.indexOf("?")?"?":"&",window.open(e+"engine=dropbox","akeeba_dropbox_window","width=1010,height=500,opener")}function akconfig_dropbox_gettoken(){akeebabackup.System.AjaxURL=akeebabackup.Configuration.URLs.dpecustomapi;var e={engine:"dropbox",method:"getauth"};akeebabackup.System.doAjax(e,function(e){""==e.error?(document.getElementById("var[engine.postproc.dropbox.token]").value=e.token.oauth_token,document.getElementById("var[engine.postproc.dropbox.token_secret]").value=e.token.oauth_token_secret,document.getElementById("var[engine.postproc.dropbox.uid]").value=e.token.uid,alert("Authentication successful!")):alert("ERROR: Could not complete authentication; please retry")},function(e){alert("ERROR: Could not complete authentication; please retry\n"+e)},!1,15e3)}function akconfig_dropbox2_openoauth(){var e=akeebabackup.Configuration.URLs.dpeauthopen;e+=-1==e.indexOf("?")?"?":"&",window.open(e+"engine=dropbox2","akeeba_dropbox2_window","width=1010,height=500,opener")}function akeeba_dropbox2_oauth_callback(e){document.getElementById("var[engine.postproc.dropbox2.access_token]").value=e.access_token,document.getElementById("var[engine.postproc.dropbox2.refresh_token]").value=e.refresh_token;var t=window.open("","akeeba_dropbox2_window");t.close()}function akconfig_onedrive_openoauth(){var e=akeebabackup.Configuration.URLs.dpeauthopen;e+=-1==e.indexOf("?")?"?":"&",window.open(e+"engine=onedrive","akeeba_onedrive_window","width=1010,height=500,opener")}function akeeba_onedrive_oauth_callback(e){document.getElementById("var[engine.postproc.onedrive.access_token]").value=e.access_token,document.getElementById("var[engine.postproc.onedrive.refresh_token]").value=e.refresh_token;var t=window.open("","akeeba_onedrive_window");t.close()}function akconfig_onedrivebusiness_openoauth(){var e=akeebabackup.Configuration.URLs.dpeauthopen;e+=-1==e.indexOf("?")?"?":"&",window.open(e+"engine=onedrivebusiness","akeeba_onedrivebusiness_window","width=1010,height=500,opener")}function akeeba_onedrivebusiness_oauth_callback(e){document.getElementById("var[engine.postproc.onedrivebusiness.access_token]").value=e.access_token,document.getElementById("var[engine.postproc.onedrivebusiness.refresh_token]").value=e.refresh_token;var t=window.open("","akeeba_onedrivebusiness_window");t.close()}function akeeba_onedrivebusiness_refreshdrives(e){if("onedrivebusiness"===document.getElementById("var[akeeba.advanced.postproc_engine]").value){e=e||{},"undefined"==typeof e["engine.postproc.onedrivebusiness.drive"]&&(e["engine.postproc.onedrivebusiness.drive"]={default:document.getElementById("var[engine.postproc.googledrive.team_drive]").value}),akeebabackup.System.AjaxURL=akeebabackup.Configuration.URLs.dpecustomapi;var t={engine:"onedrivebusiness",method:"getDrives",params:{"engine.postproc.onedrivebusiness.access_token":document.getElementById("var[engine.postproc.googledrive.access_token]").value,"engine.postproc.onedrivebusiness.refresh_token":document.getElementById("var[engine.postproc.googledrive.refresh_token]").value}};akeebabackup.System.doAjax(t,function(t){var n;if(!(null!==t&&void 0!==t&&null!==(n=t.list)&&void 0!==n&&n.length))return void alert("ERROR: Could not retrieve list of OneDrive Drives.");var o=document.getElementById("var[engine.postproc.onedrivebusiness.drive]");o.innerHTML="",t.list.forEach(t=>{var n=document.createElement("option");n.value=t[0],n.text=t[1],e["engine.postproc.onedrivebusiness.drive"]["default"]===n.value&&(n.selected=!0),o.appendChild(n)})},function(e){alert("ERROR: Could not retrieve list of OneDrive Drives. Error: \n"+e)},!1,15e3)}}function akconfig_onedriveapp_openoauth(){var e=akeebabackup.Configuration.URLs.dpeauthopen;e+=-1==e.indexOf("?")?"?":"&",window.open(e+"engine=onedriveapp","akeeba_onedriveapp_window","width=1010,height=500,opener")}function akeeba_onedriveapp_oauth_callback(e){document.getElementById("var[engine.postproc.onedriveapp.access_token]").value=e.access_token,document.getElementById("var[engine.postproc.onedriveapp.refresh_token]").value=e.refresh_token;var t=window.open("","akeeba_onedriveapp_window");t.close()}function akconfig_googledrive_openoauth(){var e=akeebabackup.Configuration.URLs.dpeauthopen;e+=-1==e.indexOf("?")?"?":"&",window.open(e+"engine=googledrive","akeeba_googledrive_window","width=1010,height=500,opener")}function akeeba_googledrive_oauth_callback(e){document.getElementById("var[engine.postproc.googledrive.access_token]").value=e.access_token,document.getElementById("var[engine.postproc.googledrive.refresh_token]").value=e.refresh_token;var t=window.open("","akeeba_googledrive_window");t.close(),akeeba_googledrive_refreshdrives()}function akeeba_googledrive_refreshdrives(e){if("googledrive"===document.getElementById("var[akeeba.advanced.postproc_engine]").value){e=e||{},"undefined"==typeof e["engine.postproc.googledrive.team_drive"]&&(e["engine.postproc.googledrive.team_drive"]={default:document.getElementById("var[engine.postproc.googledrive.team_drive]").value}),akeebabackup.System.AjaxURL=akeebabackup.Configuration.URLs.dpecustomapi;var t={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}};akeebabackup.System.doAjax(t,function(t){var n;if(console.log(t),!(null!==t&&void 0!==t&&null!==(n=t.list)&&void 0!==n&&n.length))return void alert("ERROR: Could not retrieve list of Google Drives.");var o=document.getElementById("var[engine.postproc.googledrive.team_drive]");o.innerHTML="",t.list.forEach(t=>{var n=document.createElement("option");n.value=t[0],n.text=t[1],e["engine.postproc.googledrive.team_drive"]["default"]===n.value&&(n.selected=!0),o.appendChild(n)})},function(e){alert("ERROR: Could not retrieve list of Google Drives. Error: \n"+e)},!1,15e3)}}function akconfig_box_openoauth(){var e=akeebabackup.Configuration.URLs.dpeauthopen;e+=-1==e.indexOf("?")?"?":"&",window.open(e+"engine=box","akeeba_box_window","width=1010,height=500,opener")}function akconfig_box_oauth_callback(e){document.getElementById("var[engine.postproc.box.access_token]").value=e.access_token,document.getElementById("var[engine.postproc.box.refresh_token]").value=e.refresh_token;var t=window.open("","akeeba_box_window");t.close()}akeebabackup.System.documentReady(function(){akeebabackup.Configuration.URLs=Joomla.getOptions("akeebabackup.Configuration.URLs",{}),"undefined"!=typeof akeebabackup.Configuration.URLs.dpecustomapi&&(akeebabackup.System.params.AjaxURL=akeebabackup.Configuration.URLs.dpecustomapi);var e=Joomla.getOptions("akeebabackup.Configuration.GUIData",null);null!==e&&setTimeout(function(){setTimeout(akeebabackup.Configuration.restoreDefaultPasswords,1e3),akeebabackup.Configuration.parseConfigData(Joomla.getOptions("akeebabackup.Configuration.GUIData",{})),akeebabackup.Configuration.initialisePopovers(),akeeba_googledrive_refreshdrives(akeebabackup.Configuration.engines.postproc.googledrive.parameters),akeeba_onedrivebusiness_refreshdrives(akeebabackup.Configuration.engines.postproc.onedrivebusiness.parameters);var e=document.getElementById("adminForm");e&&e.addEventListener("submit",akeebabackup.Configuration.onFormSubmit)},10)});
//# sourceMappingURL=Configuration.min.js.map