1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[66123],{6043(v,C,r){var f,i;f=[r(67910),r(17459),r(7065),r(49897),r(29930)],i=(function(g,y,P,x,l){const u={};u.init=function(){g.init(),E()};function E(){const e=$("#inputCurrentPassword"),n=$("#password-notify"),s=$("#password-confirm-notify"),a=$("#inputNewPassword"),c=$("#inputNewPasswordAgain");let o=!1,t=!1;function p(){o=!1;try{if(utils.assertPasswordValidity(a.val(),P),a.val()===ajaxify.data.username)throw new Error("[[user:password-same-as-username]]");if(a.val()===ajaxify.data.email)throw new Error("[[user:password-same-as-email]]");h(n),o=!0}catch(d){w(n,d.message)}}function m(){a.val()!==c.val()?(w(s,"[[user:change-password-error-match]]"),t=!1):(a.val()?h(s):(s.parent().removeClass("alert-success alert-danger"),s.children().show(),s.find(".msg").html("")),t=!0)}a.on("input",p),c.on("input",m),$("#changePasswordBtn").on("click",function(){p(),m();const d=$(this);return o&&t?(d.addClass("disabled").find("i").removeClass("hide"),x.put("/users/"+ajaxify.data.theirid+"/password",{currentPassword:e.val(),newPassword:a.val()}).then(()=>{parseInt(app.user.uid,10)===parseInt(ajaxify.data.uid,10)?window.location.href=config.relative_path+"/login":ajaxify.go("user/"+ajaxify.data.userslug+"/edit")}).catch(l.error).finally(()=>{d.removeClass("disabled").find("i").addClass("hide"),e.val(""),a.val(""),c.val(""),n.parent().removeClass("show-success show-danger"),s.parent().removeClass("show-success show-danger"),t=!1,o=!1})):(t||l.error("[[user:change-password-error-match]]"),o||l.error("[[user:change-password-error]]")),!1})}function w(e,n){y.translate(n,function(s){e.html(s).removeClass("text-success").addClass("text-danger")})}function h(e){e.html("").removeClass("text-danger").addClass("text-success")}return u}).apply(C,f),i!==void 0&&(v.exports=i)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.