Your IP : 3.138.35.255


Current Path : /proc/self/root/home/sudancam/public_html3/host/wp-content/plugins/wpforms-lite/lite/assets/js/admin/education/
Upload File :
Current File : //proc/self/root/home/sudancam/public_html3/host/wp-content/plugins/wpforms-lite/lite/assets/js/admin/education/lite-connect.min.js

"use strict";var WPFormsEducation=window.WPFormsEducation||{};WPFormsEducation.liteConnect=window.WPFormsEducation.liteConnect||function(i,n,c){var l={init:function(){c(l.ready),c(n).on("load",function(){"function"==typeof c.ready.then?c.ready.then(l.load):l.load()})},ready:function(){},load:function(){l.events(),l.maybeRevealBuilderTopBar()},events:function(){l.enableLiteConnectToggleClick(),l.enableLiteConnectButtonClick(),l.dismissBuilderTopBarClick(),l.autoSaveToggleChange()},enableLiteConnectToggleClick:function(){c(i).on("mousedown",".wpforms-toggle-control.wpforms-setting-lite-connect-auto-save-toggle",function(e){var t=c(this).find("input"),n=t.is(":checked");e.preventDefault(),l.openSettingsLiteConnectModal(n,function(){t.click()})})},enableLiteConnectButtonClick:function(){c(i).on("click",".wpforms-dyk-lite-connect .button-primary",function(e){e.preventDefault();e=c(this);e.hasClass("wpforms-is-enabled")?n.open(e.attr("href")):l.openSettingsLiteConnectModal(!1,l.enableLiteConnectButtonModalConfirm)})},enableLiteConnectButtonModalConfirm:function(){var e=c(".wpforms-dyk-lite-connect .button-primary");l.saveSettingAjaxPost(!0,e,function(){l.switchSettingView(!0,e)})},openSettingsLiteConnectModal:function(e,t){e?l.openSettingsLiteConnectDisableModal(t):l.openSettingsLiteConnectEnableModal(t)},openSettingsLiteConnectEnableModal:function(t){c.alert({title:!1,content:wp.template("wpforms-settings-lite-connect-modal-content")(),icon:!1,type:"orange",boxWidth:"550px",theme:"modern",useBootstrap:!1,scrollToPreviousElement:!1,buttons:{confirm:{text:wpforms_education_lite_connect.enable_modal.confirm,btnClass:"btn-confirm",keys:["enter"],action:function(){var e;"function"==typeof t&&t(),"function"==typeof(e=n.WPFormsChallenge?WPFormsChallenge.embed&&WPFormsChallenge.embed.completeChallenge:e)&&e()}},cancel:{text:wpforms_education_lite_connect.enable_modal.cancel,action:function(){c(".wpforms-challenge-popup-container").removeClass("wpforms-invisible")}}},onOpenBefore:function(){c("body").addClass("wpforms-setting-lite-connect-modal"),c(".wpforms-challenge-popup-container").addClass("wpforms-invisible")},onDestroy:function(){c("body").removeClass("wpforms-setting-lite-connect-modal")}})},openSettingsLiteConnectDisableModal:function(e){c.alert({title:wpforms_education_lite_connect.disable_modal.title,content:wpforms_education_lite_connect.disable_modal.content,icon:"fa fa-exclamation-circle",type:"red",boxWidth:"400px",theme:"modern",useBootstrap:!1,animateFromElement:!1,scrollToPreviousElement:!1,buttons:{cancel:{text:wpforms_education_lite_connect.disable_modal.cancel,keys:["enter"],btnClass:"btn-confirm"},confirm:{text:wpforms_education_lite_connect.disable_modal.confirm,action:function(){"function"==typeof e&&e()}}}})},saveSettingAjaxPost:function(o,e,t){var i=(e=e||c()).find("input");c.post(wpforms_education_lite_connect.ajax_url,{action:"wpforms_update_lite_connect_enabled_setting",value:o?1:0,nonce:wpforms_education_lite_connect.nonce}).done(function(e){if(!e.success)return i.prop("checked",!o),void l.updateResultModal("error");l.updateResultModal(o?"enabled":"disabled"),"function"==typeof t&&t()}).fail(function(e,t,n){i.prop("checked",!o),l.updateResultModal("error")})},autoSaveToggleChange:function(){c(i).on("change",".wpforms-toggle-control.wpforms-setting-lite-connect-auto-save-toggle input",function(){var e=c(this),t=e.closest(".wpforms-toggle-control"),n=e.is(":checked");l.saveSettingAjaxPost(n,t,function(){l.switchSettingView(n,t)})})},switchSettingView:function(e,t){var t=t.closest(".wpforms-education-lite-connect-wrapper"),n=t.find(".wpforms-education-lite-connect-setting"),t=t.find(".wpforms-education-lite-connect-enabled-info");n.toggleClass("wpforms-hidden",e),t.toggleClass("wpforms-hidden",!e)},updateResultModal:function(e){wpforms_education_lite_connect.update_result[e]&&c.alert({title:wpforms_education_lite_connect.update_result[e+"_title"],content:wpforms_education_lite_connect.update_result[e],icon:"fa fa-check-circle",type:"error"===e?"red":"green",theme:"modern",boxWidth:"400px",useBootstrap:!1,animation:"scale",closeAnimation:"scale",animateFromElement:!1,scrollToPreviousElement:!1,buttons:{confirm:{text:wpforms_education_lite_connect.update_result.close,btnClass:"btn-confirm",keys:["enter"]}}})},maybeRevealBuilderTopBar:function(){n.wpforms_builder&&"1"!==wpforms_education_lite_connect.is_enabled&&0!==c("#wpforms-builder-lite-connect-top-bar").length&&setTimeout(function(){l.toggleBuilderTopBar(!0)},3e3)},toggleBuilderTopBar:function(e){var t="--wpforms-admin-bar-height",n=i.documentElement,o=parseInt(getComputedStyle(n).getPropertyValue(t),10);n.setAttribute("style",t+": "+(o+=e?45:-45)+"px!important;")},dismissBuilderTopBarClick:function(){c(i).on("click","#wpforms-builder-lite-connect-top-bar .wpforms-dismiss-button",function(){l.toggleBuilderTopBar(!1)})}};return l}(document,window,jQuery),WPFormsEducation.liteConnect.init();