Your IP : 216.73.216.240
jQuery(document).ready(function(e){function t(t,n){let i=e(`#${t}`).val();i=acym_helper.parseJson(i);let c=e(".acym__sending__methods__choose .acym__selection__card-selected");if(0===c.length)return;let a=e(`[name="config[${n}]"]`),o=a.closest(".acym__configuration__mail__option").find(".acym__configuration__mail__info__disabled"),l=a.closest(".acym__configuration__mail__option").find("> .switch-label"),_=a.closest(".acym__configuration__mail__option").find(".switch-paddle");void 0===i[c.attr("id")]||i[c.attr("id")]?(a.next().removeAttr("disabled"),_.removeClass("disabled").removeAttr("data-acym-tooltip"),o.closest(".acym__tooltip__info").hide()):(1===parseInt(a.val())&&l.click(),_.addClass("disabled").attr("data-acym-tooltip",o.find(".acym__tooltip__text ").html()),a.next().attr("disabled","true"),o.closest(".acym__tooltip__info").show()),acym_helperTooltip.setTooltip()}function n(){t("acym__config__mail__embed__image__blocked","embed_images"),t("acym__config__mail__embed__attachment__blocked","embed_files")}!function(){let t=e('input[name="config[mailer_method]"]');t.on("change",function(){e(".send_settings").hide();let t=e('input[name="config[mailer_method]"]:checked').val();const n=e(`#${t}_settings`);n.length>0&&n.show()}),t.trigger("change")}(),e("#available_ports_check").off("click").on("click",function(t){t.preventDefault();let n=e(this).parent();n.html('<i class="acymicon-circle-o-notch acymicon-spin"></i>'),e.get(ACYM_AJAX_URL+"&ctrl=configuration&task=ports",function(e){n.html(e)})}),e(".acym_autoselect").off("click").on("click",function(){this.select()}),e("#timeoutcheck_action").off("click").on("click",function(t){t.preventDefault();try{e("#timeoutcheck").html('<i class="acymicon-circle-o-notch acymicon-spin"></i>'),e.get(ACYM_AJAX_URL+"&ctrl=configuration&task=detecttimeout",function(t){e("#timeoutcheck").html("Done!")})}catch(e){alert(acym_helper.sprintf(ACYM_JS_TXT.ACYM_MAX_EXEC_TIME_GET_ERROR,e))}}),e("#checkdb_button").off("click").on("click",function(t){t.preventDefault(),e("#checkdb_report").html('<i class="acymicon-circle-o-notch acymicon-spin"></i>'),e.get(ACYM_AJAX_URL+"&ctrl=configuration&task=checkDB",function(t){e("#checkdb_report").html(t)})}),e('input[name="config[auto_bounce]"]').off("change").on("change",function(){e("#acym__configuration__bounce__auto_bounce__configuration").toggle()}),e("#sendorderid").on("change",function(){"rand"===this.value&&alert(ACYM_JS_TXT.ACYM_NO_RAND_FOR_MULTQUEUE)}),function(){let t=e("#acym__configuration__cron__report--send-to"),n=t.attr("placeholder");t.select2({width:"100%",placeholder:n,tags:!0,theme:"foundation",tokenSeparators:[","," "],createTag:function(t){let n=e.trim(t.term);return acym_helper.emailValid(n)?{id:n,text:n,newTag:!0}:null}})}(),e("#acym__configuration__button__license").off("click").on("click",function(){let t=e("#acym__configuration__license-key").val(),n=parseInt(e(this).attr("data-acym-linked"));if(""===t)return alert(ACYM_JS_TXT.ACYM_PLEASE_SET_A_LICENSE_KEY),!1;let i=n?"unlinkLicense":"attachLicense";e('[name="task"]').val(i),e.acymConfigSave(),e("#acym_form").submit()}),e("#acym__configuration__button__cron").off("click").on("click",function(){let t=parseInt(e(this).attr("data-acym-active")),n=t?"deactivateCron":"activateCron";e('[name="task"]').val(n),e("#acym_form").submit()}),function(){let t="";e("#configmultilingual_default").on("change",function(){let n=e(this).val(),i=e("#configmultilingual_languages");i.find('option[value="'+n+'"]').prop("disabled",!0).prop("selected",!1),i.find('option[value="'+t+'"]').prop("disabled",!1),i.select2({theme:"foundation",width:"100%"}),t=n}).trigger("change"),e.acymConfigSave=function(){e('[name="config[sender_info_translation]"]').length>0&&acym_helperSelectionMultilingual.changeLanguage_configuration(acym_helperSelectionMultilingual.mainLanguage),e('input[id^="delayvar"]').trigger("change"),e('input[id^="config_acl_"][id$="custom"]').each(function(){let e=jQuery('input[name="'+jQuery(this).attr("name")+'"]:checked').val();"custom"!==e&&jQuery(this).closest(".cell").find('div[id^="acl_"][id$="_container"]').remove()});let t=e("#configmultilingual_languages").val(),n=e('[name="previous_multilingual_languages"]').val();if(acym_helper.empty(n))return!0;n=n.split(",");let i=acym_helper.empty(t)?n:n.filter(e=>!t.includes(e));return!!acym_helper.empty(i)||(e.each(i,function(t){i[t]=e('#configmultilingual_default option[value="'+i[t]+'"]').text()}),acym_helper.confirm(acym_helper.sprintf(ACYM_JS_TXT.ACYM_REMOVE_LANG_CONFIRMATION,i.join(", "))))}}(),function(){let t=e("#acym__configuration__acl__zone");e("#acym__configuration__acl__toggle").off("click").on("click",function(){t.slideToggle()}).click(),e('input[name^="config[acl_"]').on("change",function(){let t=e(this).attr("name"),n=e("#"+t.substring(7,t.length-1)+"_container");n.length&&("all"===e('input[name="'+t+'"]:checked').val()?n.addClass("is-hidden"):n.removeClass("is-hidden"))})}(),acym_helperMailer.setTestCredentialsSendingMethods(),acym_helperMailer.setButtonCopyFromPlugin(),acym_helperMailer.setSynchroExistingUsers(),acym_helperSelectionPage.setSelectionElement(!0,!0,n),n(),acym_helperSelectionMultilingual.init("configuration"),e('[data-task="downloadExportChangesFile"]').on("click",function(){setTimeout(function(){e("#formSubmit")[0].disabled=!1,e('[name="task"]').val("")},5)}),function(){let t=e(".acym__allowed__hosts__select");t.select2({width:"100%",placeholder:t.attr("placeholder"),tags:!0,theme:"foundation",tokenSeparators:[" "],createTag:function(e){let t=jQuery.trim(e.term);return""===t?null:{id:t,text:t}}})}()});