Your IP : 18.223.210.71


Current Path : /proc/self/root/home/sudancam/public_html/wp-content/plugins/wpforms-lite/assets/js/admin/pages/
Upload File :
Current File : //proc/self/root/home/sudancam/public_html/wp-content/plugins/wpforms-lite/assets/js/admin/pages/mi-analytics.min.js

"use strict";var WPFormsPagesAnalytics=window.WPFormsPagesAnalytics||function(e,l){var i={},o={init:function(){l(o.ready)},ready:function(){o.initVars(),o.events()},initVars:function(){i={$stepInstall:l("section.step-install"),$stepInstallNum:l("section.step-install .num img"),$stepSetup:l("section.step-setup"),$stepSetupNum:l("section.step-setup .num img"),$stepAddon:l("section.step-addon"),$stepAddonNum:l("section.step-addon .num img")}},events:function(){i.$stepInstall.on("click","button",o.stepInstallClick),i.$stepSetup.on("click","button",o.gotoURL),i.$stepAddon.on("click","button",o.gotoURL)},stepInstallClick:function(){var n=l(this),s=n.attr("data-action"),t=n.attr("data-plugin"),a="";if(!n.hasClass("disabled")){switch(s){case"activate":a="wpforms_activate_addon",n.text(wpforms_pluginlanding.activating);break;case"install":a="wpforms_install_addon",n.text(wpforms_pluginlanding.installing);break;case"goto-url":return void(e.location.href=n.attr("data-url"));default:return}n.addClass("disabled"),o.showSpinner(i.$stepInstallNum);t={action:a,nonce:wpforms_admin.nonce,plugin:t,type:"plugin"};l.post(wpforms_admin.ajax_url,t).done(function(t){o.stepInstallDone(t,n,s)}).always(function(){o.hideSpinner(i.$stepInstallNum)})}},stepInstallDone:function(t,n,s){var a;("install"===s?t.success&&t.data.is_activated:t.success)?(i.$stepInstallNum.attr("src",i.$stepInstallNum.attr("src").replace("step-1.","step-complete.")),n.addClass("grey").removeClass("button-primary").text(wpforms_pluginlanding.activated),o.stepInstallPluginStatus()):(s=(t="install"===s&&t.success&&!t.data.is_activated||"activate"===s)?wpforms_pluginlanding.mi_manual_activate_url:wpforms_pluginlanding.mi_manual_install_url,a=t?wpforms_pluginlanding.error_could_not_activate:wpforms_pluginlanding.error_could_not_install,t=t?wpforms_pluginlanding.plugins_page:wpforms_pluginlanding.download_now,n.removeClass("grey disabled").text(t).attr("data-action","goto-url").attr("data-url",s),n.after('<p class="error">'+a+"</p>"))},stepInstallPluginStatus:function(){var t={action:"wpforms_analytics_page_check_plugin_status",nonce:wpforms_admin.nonce};l.post(wpforms_admin.ajax_url,t).done(o.stepInstallPluginStatusDone)},stepInstallPluginStatusDone:function(t){t.success&&(i.$stepSetup.removeClass("grey"),i.$stepSetupBtn=i.$stepSetup.find("button"),0<t.data.setup_status?(i.$stepSetupNum.attr("src",i.$stepSetupNum.attr("src").replace("step-2.svg","step-complete.svg")),i.$stepAddon.removeClass("grey"),i.$stepAddon.find("button").attr("data-url",t.data.step3_button_url).removeClass("grey disabled").addClass("button-primary"),"pro"===t.data.license_level&&(t=0<t.data.addon_installed?wpforms_pluginlanding.activate_now:wpforms_pluginlanding.install_now,i.$stepAddon.find("button").text(t))):i.$stepSetupBtn.removeClass("grey disabled").addClass("button-primary"))},gotoURL:function(){var t=l(this);t.hasClass("disabled")||(e.location.href=t.attr("data-url"))},showSpinner:function(t){t.siblings(".loader").removeClass("hidden")},hideSpinner:function(t){t.siblings(".loader").addClass("hidden")}};return o}((document,window),jQuery);WPFormsPagesAnalytics.init();