?? GreyFile — Mystic File Browser

Current path: home/webdevt/www/cryptoimpot.fr/wp-content/plugins/divi-contact-form-helper/assets/admin/



?? Go up: /home/webdevt/www/cryptoimpot.fr/wp-content/plugins/divi-contact-form-helper/assets

?? Viewing: app.min.js

window.PWH_DCFH=window.PWH_DCFH||{},(h=>{let l=DiviContactFormHelperAdminData.i10n;PWH_DCFH.init=function(){PWH_DCFH.handleUserPermissions(),0<h("#epanel-wrapper").length&&(PWH_DCFH.handleAutoBackup(),PWH_DCFH.handleAutoDelete(),PWH_DCFH.handleSMTP(),PWH_DCFH.handleSMTPEncryption(),PWH_DCFH.handleSMTPAuth(),PWH_DCFH.handleSMTPWorking(),PWH_DCFH.handleTestMailDelivery(),PWH_DCFH.handleMultiLanguage(),PWH_DCFH.handleLog()),0<h("#page-create-post").length&&(PWH_DCFH.handlePostTerms(),PWH_DCFH.handleCopyData(),PWH_DCFH.handleFeaturedImage()),0<h("#page-create-email-template").length&&(PWH_DCFH.handleKeywords(),PWH_DCFH.handleOnChangeEmail()),0<h("#page-send-email").length&&PWH_DCFH.handleSendEmail(),0<h("#page-export-as-csv").length&&PWH_DCFH.handleExportCSV(),0<h(".jquery_ui_datepicker").length&&PWH_DCFH.handleDatePicker(),0<h("#menu-posts-pwh_dcfh").length&&PWH_DCFH.handleMenuLinks()},PWH_DCFH.handleUserPermissions=function(){h("#epanel-save").click(function(){var e=h("#main_options_form").formSerialize();h.ajax({type:"POST",url:ajaxurl,data:{action:"handle_user_permissions",form_data:e},success:function(e){}})})},PWH_DCFH.handleAutoBackup=function(){function t(){var e=h("#pwh_dcfh_backup_email").parents().eq(1),t=h("#pwh_dcfh_backup_schedule").parents().eq(1),n=h("#pwh-dcfh-tab-cron-jobs").find(".et-epanel-box");h("#pwh_dcfh_backup_enabled").is(":checked")?(h(e).show(),h(t).show(),h(n.get(3)).show()):(h(e).hide(),h(t).hide(),h(n.get(3)).hide())}t(),setTimeout(function(){var e=h(h("#pwh_dcfh_backup_enabled").parents().eq(1)).find(".et_pb_yes_no_button");h(e).on("click",function(){setTimeout(function(){t()},100)})},1e3)},PWH_DCFH.handleAutoDelete=function(){function t(){var e=h(h("[id^=pwh_dcfh_delete_entries_status]").get(0)).parents().eq(3),t=h("#pwh_dcfh_delete_entries_schedule").parents().eq(1);h("#pwh_dcfh_delete_entries_enabled").is(":checked")?(h(e).show(),h(t).show()):(h(e).hide(),h(t).hide())}t(),setTimeout(function(){var e=h(h("#pwh_dcfh_delete_entries_enabled").parents().eq(1)).find(".et_pb_yes_no_button");h(e).on("click",function(){setTimeout(function(){t()},100)})},1e3)},PWH_DCFH.handleSMTP=function(){function t(){var e=h("#pwh_dcfh_smtp_host").parents().eq(1),t=h("#pwh_dcfh_smtp_from_email").parents().eq(1),n=h("#pwh_dcfh_smtp_from_name").parents().eq(1),a=h("#pwh_dcfh_smtp_encryption").parents().eq(1),i=h("#pwh_dcfh_smtp_port").parents().eq(1),o=h("#pwh_dcfh_smtp_autotls").parents().eq(1),s=h("#pwh_dcfh_smtp_authentication").parents().eq(1),l=h("#pwh_dcfh_smtp_username").parents().eq(1),c=h("#pwh_dcfh_smtp_password").parents().eq(1),r=h("#pwh-dcfh-smtp-button").parents().eq(1);h(l).hide(),h(c).hide(),h("#pwh_dcfh_smtp_enabled").is(":checked")?(h(e).show(),h(t).show(),h(n).show(),h(a).show(),h(i).show(),h(o).show(),h(s).show(),h("#pwh_dcfh_smtp_authentication").is(":checked")&&(h(l).show(),h(c).show()),h(r).show()):(h(e).hide(),h(t).hide(),h(n).hide(),h(a).hide(),h(i).hide(),h(o).hide(),h(s).hide(),h(r).hide())}t(),setTimeout(function(){var e=h("#pwh_dcfh_smtp_enabled").parents().eq(1).find(".et_pb_yes_no_button");h(e).on("click",function(){setTimeout(function(){t()},100)})},1e3)},PWH_DCFH.handleSMTPEncryption=function(){let e=h("#pwh_dcfh_smtp_encryption");var t=e.val();function n(e){var t=h("#pwh_dcfh_smtp_port"),n=t.val(),a=h("#pwh_dcfh_smtp_autotls").parents().eq(1);h(a).show(),"ssl"===e?t.val(465):"tls"===e?(t.val(587),h(a).hide()):""!==n?t.val(n):t.val(25)}h("#pwh_dcfh_smtp_enabled").is(":checked")&&n(t),setTimeout(function(){e.change(function(){let e=h(this).val();setTimeout(function(){n(e)},100)})},1e3)},PWH_DCFH.handleSMTPAuth=function(){function t(){var e=h("#pwh_dcfh_smtp_username").parents().eq(1),t=h("#pwh_dcfh_smtp_password").parents().eq(1);h("#pwh_dcfh_smtp_enabled").is(":checked")&&h("#pwh_dcfh_smtp_authentication").is(":checked")?(h(e).show(),h(t).show()):(h(e).hide(),h(t).hide())}t(),setTimeout(function(){var e=h("#pwh_dcfh_smtp_authentication").parents().eq(1).find(".et_pb_yes_no_button");h(e).on("click",function(){setTimeout(function(){t()},100)})},1e3)},PWH_DCFH.handleSMTPWorking=function(){h("#pwh-dcfh-smtp-button").click(function(e){e.preventDefault();var e=[],t=(h("#pwh-dcfh-smtp-response").html(""),h('input[name="pwh_dcfh_smtp_host"]').val()),n=h('input[name="pwh_dcfh_smtp_from_name"]').val(),a=h('input[name="pwh_dcfh_smtp_from_email"]').val(),i=h('input[name="pwh_dcfh_smtp_port"]').val(),o=h('input[name="pwh_dcfh_smtp_username"]').val(),s=h('input[name="pwh_dcfh_smtp_password"]').val();if(""===t&&e.push(l.smtp_host),""===n&&e.push(l.smtp_from_name),""===a&&e.push(l.smtp_from_email),""===i&&e.push(l.smtp_port),h("#pwh_dcfh_smtp_enabled").is(":checked")&&h("#pwh_dcfh_smtp_authentication").is(":checked")&&(""===o&&e.push(l.smtp_username),""===s)&&e.push(l.smtp_password),0<e.length)return h("#pwh-dcfh-smtp-response").html(e.join("<br />")),!1;confirm(l.smtp_settings_alert)&&h.ajax({type:"post",dataType:"json",url:ajaxurl,data:{action:"process_smtp_test",_wpnonce:DiviContactFormHelperAdminData.ajaxNonce},beforeSend:function(){h("#pwh-dcfh-smtp-response").html(l.please_wait_text)},success:function(e){h("#pwh-dcfh-smtp-response").html(e.data)},complete:function(e){},error:function(e,t,n){}})})},PWH_DCFH.handleTestMailDelivery=function(){h("#phw_dcfh_test_mail_btn").click(function(e){e.preventDefault();let t=h(this),n,a=t.text();t.prop("disabled",!0),h(".mail_delivery_log").html("");var e=[],i=h('input[name="email_address"]').val();if(""===i.trim()&&e.push(l.tmd_email_address_required),0<e.length)return h(".mail_delivery_log").html(e.join("<br />")),t.prop("disabled",!1),!1;h.ajax({type:"post",dataType:"json",url:ajaxurl,data:{action:"test_mail_delivery",nonce:DiviContactFormHelperAdminData.ajaxNonce,email_address:i},beforeSend:function(){n=PWH_DCFH.animateDots(t)},success:function(e){h(".mail_delivery_log").html(e.data)},complete:function(e){clearInterval(n),t.text(a),t.prop("disabled",!1)},error:function(e,t,n){}})})},PWH_DCFH.handleMultiLanguage=function(){function e(){var e=h("#pwh-dcfh-tab-labels").find(".et-epanel-box");h("#pwh_dcfh_multilingual_enabled").is(":checked")?h.each(e,function(e,t){0!==e&&h(t).hide()}):h.each(e,function(e,t){0!==e&&h(t).show()})}e(),setTimeout(function(){h("#pwh_dcfh_multilingual_enabled").parents().eq(1).find(".et_pb_yes_no_button").on("click",function(){setTimeout(function(){e()},100)})},1e3)},PWH_DCFH.handleLog=function(){function t(){var e=h("#pwh-dcfh-tab-logs").find(".et-epanel-box");h("#pwh_dcfh_logs_enabled").is(":checked")?(h(e.get(1)).show(),h("#pwh-dcfh-tab-logs .CodeMirror").each(function(){this.CodeMirror.refresh()})):h(e.get(1)).hide()}t(),setTimeout(function(){var e=h("#pwh_dcfh_logs_enabled").parents().eq(1).find(".et_pb_yes_no_button");h(e).on("click",function(){setTimeout(function(){t()},100)})},1e3),h(document).on("click",'a[href="#pwh-dcfh-tab-logs"]',function(e){e.preventDefault(),h("#pwh-dcfh-tab-logs .CodeMirror").each(function(){this.CodeMirror.refresh()})}),h(".copy_debug_log").on("click",function(){var e=document.querySelector(".et__logs_display");e&&(""!==(e=e.value).trim()?navigator.clipboard.writeText(e).then(function(){}).catch(function(e){alert("Failed to copy log: "+e)}):alert("Log is empty, nothing to copy!"))})},PWH_DCFH.handlePostTerms=function(){h('select[name="to_post_type"]').change(function(){let t=h("#post_term");var e=h(this).val();""!==e&&h.ajax({type:"post",dataType:"json",url:ajaxurl,data:{action:"terms_list",_wpnonce:DiviContactFormHelperAdminData.ajaxNonce,post_type:e},beforeSend:function(){h(".spinner").addClass("is-active")},success:function(e){!1!==e.success?(t.html('<option value="">'+l.select_term+"</option>"),t.append(e.data),t.removeAttr("disabled")):(t.html('<option value="">'+l.not_applicable+"</option>"),t.prop("disabled",!0))},complete:function(){h(".spinner").removeClass("is-active")},error:function(e,t,n){PWH_DCFH.handleShowHideNotice(e.responseJSON.data,"notice-error",!0,"#poststuff")}})})},PWH_DCFH.handleCopyData=function(){h(".copy-as").change(function(){var e=h(this).val(),t="#"+h(this).data("row");"custom_field"===e?(h(t).prop("readonly",!1),h(t).prop("placeholder",l.custom_field_name),h(t).autocomplete({source:function(e,t){e=e.term;""!==e&&h.ajax({type:"post",dataType:"json",url:ajaxurl,data:{action:"meta_keys",_wpnonce:DiviContactFormHelperAdminData.ajaxNonce,search_meta:e},success:function(e){t(h.map(e,function(e){return e}))}})}})):(h(t).prop("readonly",!0),h(t).prop("placeholder",l.choose_custom_field_name))})},PWH_DCFH.handleFeaturedImage=function(){h("#upload-featured-image").click(function(e){e.preventDefault();let n=wp.media({title:"Insert image",library:{type:"image"},button:{text:"Use this image"},multiple:!1}).on("select",function(){var e=n.state().get("selection").first().toJSON(),t=e.id,e=e.url;h("#uploaded-featured-image-id").val(t),h(".featured-img").css("display","block"),h("#uploaded-featured-image-url").attr("src",e)}).open()}),h("#js-remove-featured-image").click(function(e){e.preventDefault(),h("#uploaded-featured-image-id").val(""),h(".featured-img").css("display","none"),h("#uploaded-featured-image-url").attr("src","")})},PWH_DCFH.handleKeywords=function(){var e='select[name="contact_form_id"]';let t=h("#merge-data-tags-list");var n=h(e+" :selected").val();let a=JSON.parse(DiviContactFormHelperAdminData.tplData);""!==n&&t.html(a[n].contact_form_fields_html),h(e).change(function(){var e=h(this).val();t.html(""),""!==e?t.html(a[e].contact_form_fields_html):(h("table tbody tr:first td:first span").html(""),t.html(""))}),h("body").on("click",".keyword",function(){tinyMCE.activeEditor.insertContent(" "+h(this).text())})},PWH_DCFH.handleOnChangeEmail=function(){let t=h('select[name="tpl_type"]');h(t).on("change",function(){var e=h(this).val();-1!==h.inArray(e,["admin","confirmation"])?(t.closest("table").find("tr.email_from").hide(),t.closest("table").find("tr.email_from_name").hide(),t.closest("table").find("tr.email_subject").hide()):(t.closest("table").find("tr.email_from").show(),t.closest("table").find("tr.email_from_name").show(),t.closest("table").find("tr.email_subject").show())}).trigger("change")},PWH_DCFH.handleSendEmail=function(){var e=DiviContactFormHelperAdminData.emailTemplates;let c=JSON.parse(e);h('select[name="email_template"]').change(function(){var e,t,n,a=h(this).val(),i=h("#email_from"),o=h("#email_from_name"),s=h("#email_subject"),l=h("#email_body");""!==a&&(i.val(""),o.val(""),s.val(""),h(".html-active").length?l.val(""):tinyMCE.activeEditor.setContent(""),e=(a=c[a]).email_from,t=a.email_from_name,n=a.email_subject,a=a.email_body,""!==e)&&""!==n&&""!==a?(i.val(e),o.val(t),s.val(n),h(".html-active").length?l.val(a):tinyMCE.activeEditor.setContent(a)):(i.val(""),o.val(""),s.val(""),h(".html-active").length?l.val(""):tinyMCE.activeEditor.setContent(""))}),h("body").on("click",".keyword",function(){tinyMCE.activeEditor.insertContent(" "+h(this).text())})},PWH_DCFH.handleExportCSV=function(){let t=h(".csv-merge-data-tags-list");var e=h('select[name="contact_form_id"] :selected').val();let n=JSON.parse(DiviContactFormHelperAdminData.csvData),a=h("table tr"),i=h("table tbody tr:first td:first span"),o=h("input:text[name='file_name']"),s="",l=!1;o.on("input",function(){l=!0}),""!==e&&(s=n[e].contact_form_title+"-"+Date.now(),a.eq(0).show(),i.html(n[e].contact_form_total_entries),l||o.val(s),a.eq(3).show(),t.html(n[e].contact_form_fields_html)),h('select[name="contact_form_id"]').change(function(){var e=h(this).val();t.html(""),""!==e?(s=n[e].contact_form_title+"-"+Date.now(),a.eq(0).show(),i.html(n[e].contact_form_total_entries),l||o.val(s),a.eq(3).show(),t.html(n[e].contact_form_fields_html)):(a.eq(0).hide(),i.html(""),l||o.val(""),a.eq(3).hide(),t.html(""))})},PWH_DCFH.handleDatePicker=function(){h(".jquery_ui_datepicker").datepicker({dateFormat:DiviContactFormHelperAdminData.dataPicker.format,defaultDate:new Date,autoclose:!0,orientation:"bottom auto",todayBtn:"linked",changeMonth:!0,changeYear:!0,todayHighlight:!0})},PWH_DCFH.handleShowHideNotice=function(e,t,n=!0,a="#wpbody-content"){let i=h(_.template('<div class="<%= type %>"><p><b><%= message %></b></p><%= isDismiss %></div>')({message:e,type:"notice is-dismissible "+t,isDismiss:n?'<button type="button" class="notice-dismiss"></button>':null}));return i.on("click.wp-dismiss-notice",".notice-dismiss",function(e){e.preventDefault(),i.fadeTo(100,0,function(){h(this).slideUp(100,function(){h(this).remove()})})}),h(a).prepend(i)},PWH_DCFH.handleMenuLinks=function(){h("#menu-posts-pwh_dcfh .wp-submenu.wp-submenu-wrap li a").filter(function(){return!h.trim(h(this).text())}).parent().remove()},h(PWH_DCFH.init)})(jQuery),PWH_DCFH.animateDots=e=>{let t="";return setInterval(function(){e.html("Sending"+t),t=t.length<3?t+".":""},500)};


??

??