"use strict";var App={init:function(){$(".btn-uno").on("click",function(){return App.validationUno()&&App.next(),!1})},next:function(){$("#form").addClass("move")},validationUno:function(){var t=!0;return($("#txtRut").is(":invalid")||$("#txtNombres").is(":invalid")||$("#txtPaterno").is(":invalid")||$("#txtMaterno").is(":invalid")||$("#txtEmail").is(":invalid")||$("#txtCelular").is(":invalid"))&&($(".needs-validation").addClass("was-validated"),t=!1),t},validaRut:function(t){var i=t.value.replace(".",""),n=(i=i.replace("-","")).slice(0,-1),a=i.slice(-1).toUpperCase();if(t.value=n+"-"+a,n.length<7)return t.setCustomValidity("RUT Incompleto"),!1;for(var e=0,l=2,o=1;o<=n.length;o++){e+=l*i.charAt(n.length-o),l<7?l+=1:l=2}if(11-e%11!=(a=0==(a="K"==a?10:a)?11:a))return t.setCustomValidity("RUT Inválido"),!1;t.setCustomValidity("")}};$(App.init);