1"use strict";(self.webpackChunkunia21=self.webpackChunkunia21||[]).push([[9683],{9683:(e,a,s)=>{s.r(a),s.d(a,{default:()=>t});class t{constructor(){document.querySelectorAll(".powermail_ahv").forEach(e=>{e.value=e.value.replace(" ",""),e.addEventListener("field:success",e=>this.onFieldSuccess(e))})}onFieldSuccess(e){const a=e.target,s=a.value,t=a.Input;t&&""!==s&&(this.validateAHV(s)?t.$feedback&&(t.$feedback.innerHTML=t.feedbackMessage):(a.classList.add("is-invalid"),t.valid=!1,t.$feedback&&(t.$feedback.innerHTML=this.getInvalidMessage(a))))}getInvalidMessage(e){return e.dataset.feedbackInvalid||e.Input.form.options.customFeedback||e.validationMessage}validateAHV(e){let a=!1;if(/^756\.\d{4}\.\d{4}\.\d{2}$/.test(e)){let s=e.replace(/\./g,"").slice(0,-1);s=s.split("").reverse().join("");let t=0;for(let e=0;e<s.length;e++)t+=e%2==0?3*parseInt(s[e],10):parseInt(s[e],10);a=10*Math.ceil(t/10)-t===parseInt(e.slice(-1),10)}return a}}}}]);
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.