PageSourceSearch

https://www.tiledmedia.com/wp-content/themes/tlm/resources/assets/…/dist/js/plugins/PasswordStrength.min.js

js tiledmedia.com collected 2026-10-01 11:58:49 UTC 2,903 bytes, 1 lines download raw bytes

1!function(e,t){typeof exports==='object'&&typeof module!=='undefined'?module.exports=t():typeof define==='function'&&define.amd?define(t):(e=e||self, (e.FormValidation=e.FormValidation||{}, e.FormValidation.plugins=e.FormValidation.plugins||{}, e.FormValidation.plugins.PasswordStrength=t()))}(this,(function(){"use strict";function e(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}function t(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||!1;r.configurable=!0;"value" in r&&(r.writable=!0);Object.defineProperty(e,r.key,r)}}function a(e,a,r){a&&t(e.prototype,a);r&&t(e,r);return e}function r(e,t,a){t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):(e[t]=a);return e}function n(e,t){if(typeof t!=="function"&&t!==null){throw new TypeError("Super expression must either be null or a function")}e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&i(e,t)}function o(e){o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return o(e)}
1function i(e,t){i=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return i(e,t)}function l(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function d(e,t){if(t&&(typeof t==="object"||typeof t==="function")){return t}return l(e)}var s=FormValidation.Plugin,u=function(t){n(i,t);function i(t){var a;e(this,i);a=d(this,o(i).call(this,t));a.opts=Object.assign({},{minimalScore:3,onValidated:function(){}},t);a.validatePassword=a.checkPasswordStrength.bind(l(a));a.validatorValidatedHandler=a.onValidatorValidated.bind(l(a));return a}a(i,[{key:"install",value:function(){this.core.registerValidator(i.PASSWORD_STRENGTH_VALIDATOR,this.validatePassword);this.core.on('core.validator.validated',this.validatorValidatedHandler);this.core.addField(this.opts.field,{validators:r({},i.PASSWORD_STRENGTH_VALIDATOR,{message:this.opts.message,minimalScore:this.opts.minimalScore})})}},{key:"uninstall",value:function(){this.core.off('core.validator.validated',this.validatorValidatedHandler);this.core.disableValidator(this.opts.field,i.PASSWORD_STRENGTH_VALIDATOR)}},{key:"checkPasswordStrength",value:function(){var e=this;return{validate:function(t){var a=t.value;if(a===''){return{valid:!0}}var r=zxcvbn(a),n=r.score,o=r.feedback.warning||'The password is weak';if(n<e.opts.minimalScore){return{message:o,meta:{message:o,score:n},valid:!1}}else{return{meta:{message:o,score:n},valid:!0}}}}}},{key:"onValidatorValidated",value:function(e){if(e.field===this.opts.field&&e.validator===i.PASSWORD_STRENGTH_VALIDATOR&&e.result.meta){var t=e.result.meta.message,a=e.result.meta.score;this.opts.onValidated(e.result.valid,t,a)}}}]);return i}(s);u.PASSWORD_STRENGTH_VALIDATOR='___PasswordStrengthValidator';return u}))

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.