index of
/
home
/
thefkyzp
/
www
/
wp-content
/
plugins
/
ocean-extra
/
includes
/
themepanel
/
assets
/
js
/
File: /home/thefkyzp/www/wp-content/plugins/ocean-extra/includes/themepanel/assets/js/theme-panel.min.js
jQuery(document).ready(function(e){function t(t){var n=e("#oceanwp-switch-customizer-search");n.prop("checked")?t.find('input[name="oe_panels_settings[customizer-search]"]').length?t.find('input[name="oe_panels_settings[customizer-search]"]').val("true"):t.append('<input type="hidden" name="oe_panels_settings[customizer-search]" value="true" />'):t.find('input[name="oe_panels_settings[customizer-search]"]').length&&t.find('input[name="oe_panels_settings[customizer-search]"]').remove(),e.ajax({url:ajaxurl,method:"POST",data:{form_fields:t.serialize(),action:"oceanwp_cp_save_customizer_settings"},beforeSend:function(){window.showNotify("success",oceanwp_cp_textdomain.saving_settings)},success:function(e){window.showNotify(e.success,e.data.message)},error:function(e,t,n){},complete:function(){}})}function n(t){e.ajax({url:ajaxurl,method:"POST",data:{form_fields:t.serialize(),action:"oceanwp_cp_save_panel_settings",nonce:ExtraThemePanelOptions.nonce},beforeSend:function(){window.showNotify("success",oceanwp_cp_textdomain.saving_settings)},success:function(e){window.showNotify(e.success,e.data.message)},error:function(e,t,n){},complete:function(){}})}function o(t){const n=t.data("settings-for");e.ajax({url:ajaxurl,method:"POST",data:{form_fields:t.serialize(),action:"oceanwp_cp_save_integrations_settings",settings_for:n,nonce:ExtraThemePanelOptions.nonce},beforeSend:function(){window.showNotify("success",oceanwp_cp_textdomain.saving_settings)},success:function(t){window.showNotify(t.success,t.data.message),"adobe_fonts"===n&&(t.success?(e(".adobe.adobe-ok").removeClass("hidden"),e(".adobe.adobe-error").addClass("hidden")):(e(".adobe.adobe-ok").addClass("hidden"),e(".adobe.adobe-error").removeClass("hidden")))},error:function(e,t,n){},complete:function(){}})}function a(t,n){""!==t&&void 0!==t&&e.ajax({url:ajaxurl,method:"POST",data:{_nonce:ExtraThemePanelOptions.ocean_save_single_option_nonce,option_name:t,value:n,action:"oceanwp_cp_save_single_option"},beforeSend:function(){window.showNotify("success",oceanwp_cp_textdomain.saving_settings)},success:function(e){window.showNotify(e.success,e.data.message)},error:function(e,t,n){},complete:function(){}})}function c(){var t=confirm("Do you really want to reset customizer settings?");t&&e.ajax({url:ajaxurl,method:"POST",data:{_nonce:ExtraThemePanelOptions.customizer_reset_nonce,action:"oceanwp_cp_customizer_reset"},beforeSend:function(){window.showNotify("success",oceanwp_cp_textdomain.reseting)},success:function(e){window.showNotify(e.success,e.data.message)},error:function(e,t,n){},complete:function(){}})}function s(){e.ajax({url:ajaxurl,method:"POST",dataType:"binary",xhrFields:{responseType:"blob"},data:{_nonce:ExtraThemePanelOptions.customizer_export_nonce,action:"oceanwp_cp_customizer_export"},beforeSend:function(){window.showNotify("success",oceanwp_cp_textdomain.exporting)},success:function(e){var t=document.createElement("a"),n=ExtraThemePanelOptions.customizer_export_filename;t.href=URL.createObjectURL(e),t.download=n,t.click()},error:function(e,t,n){console.log("Something went wrong")},complete:function(){}})}function i(t){var n=new FormData,o=e("#oceanwp-import-file")[0].files;o.length>0?(n.append("file",o[0]),n.append("action","oceanwp_cp_customizer_import"),n.append("_nonce",ExtraThemePanelOptions.customizer_import_nonce),e.ajax({url:ajaxurl,type:"POST",data:n,contentType:!1,processData:!1,beforeSend:function(){window.showNotify("success",oceanwp_cp_textdomain.importing)},success:function(e){window.showNotify(e.success,e.data.message)},error:function(e,t,n){},complete:function(){}})):alert("Please select a file.")}function r(e){if(window.clipboardData&&window.clipboardData.setData)return window.clipboardData.setData("Text",e);if(document.queryCommandSupported&&document.queryCommandSupported("copy")){var t=document.createElement("textarea");t.textContent=e,t.style.position="fixed",document.body.appendChild(t),t.select();try{return document.execCommand("copy")}catch(t){return console.warn("Copy to clipboard failed.",t),prompt("Copy to clipboard: Ctrl+C, Enter",e)}finally{document.body.removeChild(t)}}}window.owpSystemInfoGetter=function(){e("[data-oceanwp-ajax]").each(function(){var t=e(this),n=t.data("oceanwpAjax"),o=t.find(".status-state"),a=t.find(".status-text");wp.ajax.send("oceanwp_cp_system_status",{data:{nonce:ExtraThemePanelOptions.nonce,type:n},success:function(){o.html('<span class="status-invisible">True</span><span class="status-state status-true"></span>')},error:function(e){o.html('<span class="status-invisible">False</span><span class="status-state status-false"></span>'),a.html(e)}})})},e(document.body).on("op_panel_loaded",function(t){let n=e(".multi-checkbox-wrapper");n.each(function(){let t=e(this),n=t.find('input[type="checkbox"]'),o=n.length,a=0;n.each(function(){e(this).prop("checked")&&a++}),o==a&&t.closest("form").find(".oe-switcher-bulk")&&t.closest("form").find(".oe-switcher-bulk").prop("checked",!0)}),jQuery("#owp_adobe_fonts_integration").trigger("change")}),e(document.body).on("submit","#ocean-customizer-control form",function(n){n.preventDefault(),t(e(this))}),e(document.body).on("submit","form.save_panel_settings",function(t){t.preventDefault(),n(e(this))}),e(document.body).on("submit","form.integration-settings",function(t){t.preventDefault(),o(e(this))}),e(document.body).on("change",".oe-switcher-bulk",function(t){t.preventDefault();var n=e(this).prop("checked");e(this).closest(".column-wrap.clr").siblings().each(function(){e(this).find('input[type="checkbox"]').prop("checked",n)})}),e(document.body).on("change",".oceanwp-switch-single-option",function(t){t.preventDefault();var n=e(this).prop("checked")?"yes":"no";a(e(this).attr("name"),n)}),e(document.body).on("change","#oceanwp-switch-customizer-search",function(t){t.preventDefault();var n=e("#ocean-customizer-control form");n.submit()}),e(document.body).on("change","#oceanwp-switch-library-disable",function(t){t.preventDefault();var n=e(this).prop("checked")?"yes":"no";a("oe_library_active_status",n)}),e(document.body).on("change","#owp_adobe_fonts_integration",function(t){t.preventDefault(),"1"===e(this).find("option:selected").val()?e('[data-for="owp_adobe_fonts"]').show():e('[data-for="owp_adobe_fonts"]').hide()}),e(document.body).on("change","#oceanwp-switch-notification-disable",function(t){t.preventDefault();var n=e(this).prop("checked")?"yes":"no";a("oe_notification_active_status",n)}),e(document.body).on("change","#oceanwp-switch-edit-post-disable",function(t){t.preventDefault();var n=e(this).prop("checked")?"yes":"no";a("oe_disable_edit_post_active_status",n)}),e(document.body).on("change","#oceanwp-switch-svg-support-disable",function(t){t.preventDefault();var n=e(this).prop("checked")?"yes":"no";a("oe_svg_support_active_status",n)}),e(document.body).on("change","#oceanwp-switch-install-demos-active",function(t){t.preventDefault();var n=e(this).prop("checked")?"yes":"no";a("oe_install_demos_active",n),e(this).prop("checked")?e("#install-demos").fadeIn():e("#install-demos").fadeOut()}),e(document.body).on("click","#ocean-customizer-reset .btn",function(e){e.preventDefault(),c()}),e(document.body).on("click","#oceanwp-export-button",function(e){e.preventDefault(),s()}),e(document.body).on("submit",".form-oceanwp_import",function(t){t.preventDefault(),i(e(this))}),e(document.body).on("click",".oceanwp-button--get-system-report",function(){var t="";e("#oceanwp-tp-system-info thead, #oceanwp-tp-system-info tbody").each(function(){var n=e(this);if(n.is("thead")){var o=n.find("th:eq(0)").data("export-label")||n.text();t=t+"\n### "+e.trim(o)+" ###\n\n"}else e("tr",n).each(function(){var n=e(this),o=n.find("td:eq(0)").data("export-label")||n.find("td:eq(0)").text(),a=e.trim(o).replace(/(<([^>]+)>)/gi,""),c=e.trim(n.find("td:eq(1)").text().replace(/(\r\n\t|\n|\r|\t)/gm,"")),s=c.split(", ");if(s.length>1){var i="";e.each(s,function(e,t){i=i+t+"\n"}),c=i}t=t+""+a+": "+c+"\n"})});try{return r(t)?void 0!==window.showNotify?window.showNotify("success",oceanwp_cp_textdomain.copied_system_info,!0,6e3):alert(oceanwp_cp_textdomain.copied_system_info):(e("#oceanwp-textarea--get-system-report textarea").val(t).focus().select(),e("#oceanwp-textarea--get-system-report").slideDown()),!1}catch(e){console.log(e)}return!1}),e(document.body).on("change","#owp_recaptcha_version",function(){let t=e(this).find("option:selected");t.length&&(e(this).find("option").each(function(){jQuery("#owp_google_recaptcha-"+jQuery(this).val()).hide(0)}),jQuery("#owp_google_recaptcha-"+t.val()).show(0))}),e("#owp_recaptcha_version").length&&e("#owp_recaptcha_version").trigger("change")});