!function(t){function e(e){"v3"==e?(t("#user_registration_integration_setting_recaptcha_site_key_v3").closest("tr").show(),t("#user_registration_integration_setting_recaptcha_site_secret_v3").closest("tr").show(),t("#user_registration_integration_setting_recaptcha_site_key").closest("tr").hide(),t("#user_registration_integration_setting_recaptcha_site_secret").closest("tr").hide()):(t("#user_registration_integration_setting_recaptcha_site_key_v3").closest("tr").hide(),t("#user_registration_integration_setting_recaptcha_site_secret_v3").closest("tr").hide(),t("#user_registration_integration_setting_recaptcha_site_key").closest("tr").show(),t("#user_registration_integration_setting_recaptcha_site_secret").closest("tr").show())}t("select#user_registration_allowed_screens").change(function(){"specific"===t(this).val()?(t(this).closest("tr").next("tr").hide(),t(this).closest("tr").next().next("tr").show()):"all_except"===t(this).val()?(t(this).closest("tr").next("tr").show(),t(this).closest("tr").next().next("tr").hide()):(t(this).closest("tr").next("tr").hide(),t(this).closest("tr").next().next("tr").hide())}).change(),t(".colorpick").iris({change:function(e,i){t(this).parent().find(".colorpickpreview").css({backgroundColor:i.color.toString()})},hide:!0,border:!0}).click(function(){t(".iris-picker").hide(),t(this).closest("td").find(".iris-picker").show()}),t("body").click(function(){t(".iris-picker").hide()}),t(".colorpick").click(function(t){t.stopPropagation()}),t(function(){var e=!1;t("input, textarea, select, checkbox").change(function(){e=!0}),t(".ur-nav-tab-wrapper a").click(function(){window.onbeforeunload=e?function(){return user_registration_settings_params.i18n_nav_warning}:""}),t(".submit input").click(function(){window.onbeforeunload=""})}),t(".user-registration").on("click",".select_all",function(){return t(this).closest("td").find("select option").attr("selected","selected"),t(this).closest("td").find("select").trigger("change"),!1}),t(".user-registration").on("click",".select_none",function(){return t(this).closest("td").find("select option").removeAttr("selected"),t(this).closest("td").find("select").trigger("change"),!1});var i=t(".user-registration").find('input[name="user_registration_integration_setting_recaptcha_version"]:checked').val();i!=undefined&&e(i),t(".user-registration").on("change",'input[name="user_registration_integration_setting_recaptcha_version"]',function(){e(t(this).val())}),t(".ur-redirect-to-login-page").ready(function(){var e=t(".ur-redirect-to-login-page"),i=t("#user_registration_login_options_prevent_core_login"),r=t("#user_registration_login_options_login_redirect_url");i.attr("checked")?r.attr("required",!0):e.val("").closest(".single_select_page").css("display","none")}),t("#user_registration_login_options_prevent_core_login").change(function(){var e=t("#user_registration_login_options_prevent_core_login");t(".single_select_page").toggle(),t("#user_registration_login_options_login_redirect_url").attr("required",function(){return"checked"===e.attr("checked")&&"required"})}),t(".user-registration-custom-file__input").change(function(e){var i=t(".user-registration-custom-file__input").prop("files")[0];t(".user-registration-custom-selected-file").html(i.name)})}(jQuery);