1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[9121,8674],{47699:(T,x,s)=>{s.d(x,{u:()=>c});var c=(()=>{return(p=c||(c={}))[p.Email=0]="Email",p[p.Sms=1]="Sms",p[p.Documento=2]="Documento",p[p.NumeroVerde=3]="NumeroVerde",c;var p})()},27227:(T,x,s)=>{s.d(x,{m:()=>v});var c=s(94650),p=s(51572);let y=(()=>{const t=class{};let f=t;return t.\u0275fac=function(h){return new(h||t)},t.\u0275cmp=c.Xpm({type:t,selectors:[["ar-loading-spinner"]],decls:2,vars:0,consts:[[1,"center-align","mobile-padding-spinner"]],template:function(h,b){1&h&&(c.TgZ(0,"div",0),c._UZ(1,"mat-spinner"),c.qZA())},dependencies:[p.Ou],styles:[".center-align[_ngcontent-%COMP%]{display:flex;max-height:100%;box-sizing:border-box;flex-direction:row;justify-content:center;align-items:stretch;align-content:stretch}@media screen and (max-width: 960px){.mobile-padding-spinner[_ngcontent-%COMP%]{padding-top:60px}}"]}),f})(),v=(()=>{const t=class{constructor(u,h,b){this.templateRef=u,this.vcRef=h,this.componentFactoryResolver=b,this.loadingFactory=this.componentFactoryResolver.resolveComponentFactory(y)}set arLoading(u){this.vcRef.clear(),u?this.loadingComponent=this.vcRef.createComponent(this.loadingFactory):this.vcRef.createEmbeddedView(this.templateRef)}};let f=t;return t.\u0275fac=function(h){return new(h||t)(c.Y36(c.Rgc),c.Y36(c.s_b),c.Y36(c._Vd))},t.\u0275dir=c.lG2({type:t,selectors:[["","arLoading",""]],inputs:{arLoading:"arLoading"}}),f})()},98674:(T,x,s)=>{s.d(x,{z:()=>v});var c=s(27227),p=s(51572),y=s(94650);let v=(()=>{const t=class{};let f=t;return t.\u0275fac=function(h){return new(h||t)},t.\u0275mod=y.oAB({type:t}),t.\u0275inj=y.cJS({providers:[c.m],imports:[p.Cq]}),f})()},1299:(T,x,s)=>{s.d(x,{F:()=>J});var c=s(65938),p=s(591),y=s(21086),v=s(7625),f=s(27221),t=s(94650),m=s(24006),u=s(36895),h=s(8929),b=s(55829);function _(a,o){if(1&a&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&a){const l=t.oxw(3);t.xp6(1),t.hij(" ",l.config.separator," ")}}const F=function(a){return{"error-input":a}};function C(a,o){if(1&a){const l=t.EpF();t.ynx(0),t.TgZ(1,"label",4),t._uU(2),t.qZA(),t.TgZ(3,"input",5,6),t.NdJ("paste",function(i){t.CHM(l);const n=t.oxw(2);return t.KtG(n.handlePaste(i))})("keyup",function(i){const r=t.CHM(l).index,g=t.oxw(2);return t.KtG(g.onKeyUp(i,r))})("input",function(i){const r=t.CHM(l).index,g=t.oxw(2);return t.KtG(g.onInput(i,r))})("keydown",function(i){const r=t.CHM(l).index,g=t.oxw(2);return t.KtG(g.onKeyDown(i,r))}),t.qZA(),t.YNc(5,_,2,1,"span",7),t.BQk()}if(2&a){const l=o.$implicit,e=o.index,i=o.last,n=t.oxw(2);t.xp6(1),t.Q6J("for",n.boxIds[e]),t.xp6(1),t.hij(" cifra ",e+1," del codice otp "),t.xp6(1),t.Gre("otp-input ",n.config.inputClass,""),t.Q6J("pattern",n.config.allowNumbersOnly?"\\d*":"")("type",n.inputType)("placeholder",(null==n.config?null:n.config.placeholder)||"")("ngStyle",n.config.inputStyles)("formControl",n.otpForm.controls[l])("id",n.boxIds[e])("ngClass",t.VKq(13,F,(null==n.config?null:n.config.showError)&&(null==n.formControl?null:n.formControl.invalid)&&((null==n.formControl?null:n.formControl.dirty)||(null==n.formControl?null:n.formControl.touched)))),t.xp6(2),t.Q6J("ngIf",n.config.separator&&!i)}}function d(a,o){if(1&a){const l=t.EpF();t.TgZ(0,"div",1),t.NdJ("focusin",function(){t.CHM(l);const i=t.oxw();return t.KtG(i.onFocusIn())})("focusout",function(){t.CHM(l);const i=t.oxw();return t.KtG(i.onFocusOut())}),t.TgZ(1,"div",2),t.YNc(2,C,6,15,"ng-container",3),t.qZA()()}if(2&a){const l=t.oxw();t.Gre("ng-otp-input-wrapper wrapper ",l.config.containerClass,""),t.MGl("id","c_",l.componentKey,""),t.Q6J("ngStyle",l.config.containerStyles),t.xp6(2),t.Q6J("ngForOf",l.controlKeys)}}let k=(()=>{const o=class{constructor(e,i){this.document=e,this.inj=i,this.config={length:4},this.onBlur=new h.xQ,this.onInputChange=new h.xQ,this.inputControls=new Array(this.config.length),this.componentKey=Math.random().toString(36).substring(2)+(new Date).getTime().toString(36),this.destroy$=new h.xQ,this.activeFocusCount=0,this.onChange=()=>{},this.onTouched=()=>{},this._isDisabled=!1,this.boxIds=[]}set disabled(e){this.setDisabledState(e)}get inputType(){return this.config?.isPasswordInput?"password":this.config?.allowNumbersOnly?"tel":"text"}get controlKeys(){return w.keys(this.otpForm?.controls)}get formControl(){return this.formCtrl??this.inj?.get(m.a5)}ngOnInit(){this.boxIds=Array.from({length:this.config?.length||4},(e,i)=>this.getBoxId(i)),this.otpForm=new m.cw({});for(let e=0;e<this.config.length;e++)this.otpForm.addControl(this.getControlName(e),new m.NI);this.otpForm.valueChanges.pipe((0,v.R)(this.destroy$)).subscribe(e=>
1{w.keys(this.otpForm.controls).forEach(i=>{var n=this.otpForm.controls[i].value;n&&n.length>1&&(n.length>=this.config.length?this.setValue(n):this.rebuildValue())})})}setDisabledState(e){this._isDisabled=e,this.otpForm&&(e?this.otpForm.disable({emitEvent:!1}):this.otpForm.enable({emitEvent:!1}))}writeValue(e){this.currentVal=this.hasVal(e)?e:null,this.setValue(this.currentVal)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}onFocusIn(){this.onTouched(),this.activeFocusCount++}onFocusOut(){setTimeout(()=>{this.activeFocusCount--,0===this.activeFocusCount&&(this.onTouched(),this.onBlur.next())},0)}ngAfterViewInit(){if(!this.config.disableAutoFocus){const e=this.document.getElementById(`c_${this.componentKey}`);if(e){const i=e.getElementsByClassName("otp-input")[0];i&&i.focus&&i.focus()}}}getControlName(e){return`ctrl_${e}`}onKeyDown(e,i){const n=this.getBoxId(i-1),r=this.getBoxId(i);if(O.ifKey(e,"Enter")){const I=this.document.getElementById(r)?.closest("form");if(I){e.preventDefault();const U=new Event("submit",{bubbles:!0,cancelable:!0});return void I.dispatchEvent(U)}}return O.ifSpacebar(e)?(e.preventDefault(),!1):O.ifBackspace(e)||O.ifDelete(e)?(e.target.value?this.clearInput(r,i):(this.clearInput(n,i-1),this.setSelected(n)),void this.rebuildValue()):void 0}hasVal(e){return null!=e&&null!=e&&(!e?.trim||""!=e.trim())}onInput(e,i){let n=this.hasVal(this.currentVal)?`${this.currentVal}${e.target.value}`:e.target.value;if(this.config.allowNumbersOnly&&!this.validateNumber(n))return e.target.value=null,e.stopPropagation(),e.preventDefault(),void this.clearInput(null,i);if(this.ifValidKeyCode(null,e.target.value)){const r=this.getBoxId(i+1);this.setSelected(r),this.rebuildValue()}else{e.target.value=null;let r=this.getControlName(i);this.otpForm.controls[r]?.setValue(null),this.rebuildValue()}}onKeyUp(e,i){O.ifTab(e)&&(i-=1);const n=this.getBoxId(i+1),r=this.getBoxId(i-1);return O.ifRightArrow(e)?(e.preventDefault(),void this.setSelected(n)):O.ifLeftArrow(e)?(e.preventDefault(),void this.setSelected(r)):void 0}validateNumber(e){return e&&/^[0-9]+$/.test(e)}getBoxId(e){return`otp_${e}_${this.componentKey}`}clearInput(e,i){let n=this.getControlName(i);if(this.otpForm.controls[n]?.setValue(null),e){const r=this.document.getElementById(e);r&&r instanceof HTMLInputElement&&(r.value=null)}}setSelected(e){this.focusTo(e);const i=this.document.getElementById(e);i&&i.setSelectionRange&&setTimeout(()=>{i.setSelectionRange(0,1)},0)}ifValidKeyCode(e,i){const n=i??e.key;return this.config?.allowNumbersOnly?this.validateNumber(n):/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)||/^[a-zA-Z0-9%*_\-@#$!]$/.test(n)&&1==n.length}focusTo(e){const i=this.document.getElementById(e);i&&i.focus()}setValue(e){if(!this.config.allowNumbersOnly||!isNaN(e)){if(this.otpForm?.reset(),!this.hasVal(e))return void this.rebuildValue();e=e.toString().replace(/\s/g,""),Array.from(e).forEach((i,n)=>{this.otpForm.get(this.getControlName(n))&&this.otpForm.get(this.getControlName(n)).setValue(i)}),this.config.disableAutoFocus||setTimeout(()=>{const i=this.document.getElementById(`c_${this.componentKey}`);var n=e.length<this.config.length?e.length:this.config.length-1;let r=i.getElementsByClassName("otp-input")[n];r&&r.focus&&setTimeout(()=>{r.focus()},1)},0),this.rebuildValue()}}rebuildValue(){let e=null;w.keys(this.otpForm.controls).forEach(i=>{let n=this.otpForm.controls[i].value;if(n){let r=n.length>1,g=!this.config.allowNumbersOnly&&this.config.letterCase&&("upper"==this.config.letterCase.toLocaleLowerCase()||"lower"==this.config.letterCase.toLocaleLowerCase());n=n[0];let I=g?"upper"==this.config.letterCase.toLocaleLowerCase()?n.toUpperCase():n.toLowerCase():n;g&&I==n?g=!1:n=I,null==e?e=n:e+=n,(r||g)&&this.otpForm.controls[i].setValue(n)}}),this.currentVal!=e&&(this.currentVal=e,this.onChange(e),this.formCtrl?.setValue&&this.formCtrl.setValue(e),this.onInputChange.next(e))}handlePaste(e){let i=e.clipboardData||window.clipboardData;if(i)var n=i.getData("Text");e.stopPropagation(),e.preventDefault(),n&&(!this.config.allowNumbersOnly||this.validateNumber(n))&&this.setValue(n)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};let a=o;return o.\u0275fac=function(i){return new(i||o)(t.Y36(u.K0),t.Y36(t.zs3))}
1,o.\u0275cmp=t.Xpm({type:o,selectors:[["ar-otp-input"]],inputs:{config:"config",formCtrl:"formCtrl",disabled:"disabled"},outputs:{onBlur:"onBlur",onInputChange:"onInputChange"},features:[t._Bn([{provide:m.JU,useExisting:(0,t.Gpc)(()=>o),multi:!0}])],decls:1,vars:1,consts:[[3,"class","id","ngStyle","focusin","focusout",4,"ngIf"],[3,"id","ngStyle","focusin","focusout"],[1,"n-o-c"],[4,"ngFor","ngForOf"],[1,"screen-reader-text",2,"position","absolute","width","1px","height","1px","padding","0","margin","-1px","overflow","hidden","clip","rect(0, 0, 0, 0)","white-space","nowrap","border","0",3,"for"],["autocomplete","one-time-code","autocapitalize","off","autocorrect","off","spellcheck","false",3,"pattern","type","placeholder","ngStyle","formControl","id","ngClass","paste","keyup","input","keydown"],["inp",""],[4,"ngIf"]],template:function(i,n){1&i&&t.YNc(0,d,3,6,"div",0),2&i&&t.Q6J("ngIf",null==n.otpForm?null:n.otpForm.controls)},dependencies:[u.mk,u.sg,u.O5,u.PC,b.oO,b.Zl,m.Fj,m.JJ,m.c5,m.oH],styles:[".otp-input[_ngcontent-%COMP%]{width:50px;height:50px;border-radius:4px;border:solid 1px #767676;text-align:center;font-size:32px;padding:1px 2px}.ng-otp-input-wrapper[_ngcontent-%COMP%] .otp-input[_ngcontent-%COMP%]{margin:0 .51rem}.ng-otp-input-wrapper[_ngcontent-%COMP%] .otp-input[_ngcontent-%COMP%]:first-child{margin-left:0}.ng-otp-input-wrapper[_ngcontent-%COMP%] .otp-input[_ngcontent-%COMP%]:last-child{margin-right:0}.n-o-c[_ngcontent-%COMP%]{display:flex;align-items:center}.error-input[_ngcontent-%COMP%]{border-color:red}@media screen and (max-width: 767px){.otp-input[_ngcontent-%COMP%]{width:44px;height:44px;min-width:44px;min-height:44px;font-size:22px}}@media screen and (max-width: 440px){.otp-input[_ngcontent-%COMP%]{width:44px;height:44px;min-width:44px;min-height:44px;font-size:20px}}@media screen and (max-width: 380px){.otp-input[_ngcontent-%COMP%]{width:44px;height:44px;min-width:44px;min-height:44px;font-size:18px;margin:0 .2rem!important}}@media screen and (max-width: 280px){.otp-input[_ngcontent-%COMP%]{width:40px;height:40px;min-width:40px;min-height:40px;margin:0 1px!important}}"]}),a})();class w{static keys(o){return o?Object.keys(o):[]}}class O{static ifTab(o){return this.ifKey(o,"Tab")}static ifDelete(o){return this.ifKey(o,"Delete;Del")}static ifBackspace(o){return this.ifKey(o,"Backspace")}static ifRightArrow(o){return this.ifKey(o,"ArrowRight;Right")}static ifLeftArrow(o){return this.ifKey(o,"ArrowLeft;Left")}static ifSpacebar(o){return this.ifKey(o,"Spacebar; ")}static ifKey(o,l){return l.split(";").some(i=>i===o.key)}}var V=s(2231),N=s(99571),E=s(74670),S=s(1576),Z=s(4859),D=s(97392),B=s(27227);function K(a,o){if(1&a&&(t.TgZ(0,"div",15)(1,"span",16),t._uU(2,"Tempo rimanente per l'inserimento dell'OTP: "),t.qZA(),t.TgZ(3,"span"),t._uU(4),t.qZA()()),2&a){const l=o.ngIf;t.xp6(4),t.Oqu(l)}}function M(a,o){1&a&&t._UZ(0,"div")}function P(a,o){if(1&a&&(t.TgZ(0,"div",6),t._uU(1),t.qZA()),2&a){const l=o.$implicit;t.xp6(1),t.hij(" ",l," ")}}function L(a,o){if(1&a&&(t.ynx(0),t.YNc(1,P,2,1,"div",17),t.BQk()),2&a){const l=t.oxw().ngIf;t.xp6(1),t.Q6J("ngForOf",l.errorMessages)}}function R(a,o){if(1&a&&(t.ynx(0),t.YNc(1,L,2,1,"ng-container",14),t.BQk()),2&a){const l=o.ngIf;t.xp6(1),t.Q6J("ngIf",!l.valid)}}let J=(()=>{const o=class extends V.P{constructor(e,i,n,r){super(i),this.dialogRef=e,this.otpService=n,this.data=r,this.okBtnText="Ok",this.otpConfig={length:6,disableAutoFocus:!1,allowNumbersOnly:!0},this.$lastOtpCheck=new p.X(null),this.$isChecking=new p.X(!1),this.$timer=new p.X(null),this.$timerText=new p.X(null),this.remainingSeconds=0}closeDialog(){this.dialogRef.close()}ngOnInit(){this.remainingSeconds=this.parseTimeSpan(this.data.expiresIn),this.startCountdown()}okButtonClicked(){}onOtpChange(e){if(e?.length==this.otpConfig.length){let i;if(this.$isChecking.next(!0),"Login"==this.data.mode)i=this.otpService.checkLoginOtp({body:e});else{if("ContactValidation"!=this.data.mode)return;i=this.otpService.checkContactValidationOtp({body:e})}i.pipe((0,v.R)(this._unsubscribeAll),(0,f.K)(n=>(0,y.of)({valid:!1,errorMessages:["Errore generico, riprovare pi\xf9 tardi"]}))).subscribe(n=>{n.valid&&this.dialogRef.close({result:n}),this.otpInputComponent.setValue(""),this.$isChecking.next(!1),setTimeout(()=>{this.$lastOtpCheck.next(n)},0)})}else this.$lastOtpCheck.next(null)}parseTimeSpan(e){const[i,n,r]=e.split(":").map(Number);return 3600*i+60*n+r}startCountdown(){this.updateDisplay(),this.intervalId=setInterval(()=>{if(this.remainingSeconds<=0)return clearInterval(this.intervalId),void this.$lastOtpCheck.next({valid:!1,errorMessages:["Tempo scaduto, chiudi la finestra e riprova"]});this.remainingSeconds--,this.updateDisplay()},1e3)}updateDisplay(){const e=Math.floor(this.remainingSeconds/3600).toString().padStart(2,"0"),i=Math.floor(this.remainingSeconds%3600/60),n=this.remainingSeconds%60,r=i.toString().padStart(2,"0"),g=n.toString().padStart(2,"0");this.$timer.next(`${e}:${r}:${g}`),this.$timerText.next(`${r}:${g}`)}};let a=o;return o.\u0275fac=function(i){return new(i||o)(t.Y36(c.so),t.Y36(N.W),t.Y36(E.no),t.Y36(c.WI))},o.\u0275cmp=t.Xpm({type:o,selectors:[["ar-otp-check-dialog"]],viewQuery:function(i,n){if(1&i&&t.Gf(k,5),2&i){let r;t.iGM(r=t.CRH())&&(n.otpInputComponent=r.first)}},features:[t.qOj],decls:24,vars:11,consts:[[1,"close-btn-container"],["type","button","mat-icon-button","","aria-label","Chiudi",1,"close-btn","ar-button","outline-dark",3,"click"],["aria-hidden","true"],[1,"title-container"],["src","assets/imgs/icons/icon-registrazione.svg","alt","","title",""],["fxLayout","row","fxLayoutAlign","center start",1,"popup-msg-container"],["fxFlex","initial"],["fxLayout","row","fxLayoutAlign","center start"],["cdkFocusInitial","",3,"config","onInputChange"],[2,"min-height","30px","padding","20px"],["fxLayout","row","fxLayoutAlign","center start",1,"otp-timer-container"],["fxFlex","initial","tabindex","0",4,"ngIf"],[4,"arLoading"],["fxLayout","row","fxLayoutAlign","center start","role","alert","aria-live","assertive","aria-atomic","true",1,"otp-error-container"],[4,"ngIf"],["fxFlex","initial","tabindex","0"],[1,"screen-reader-text"],["fxFlex","initial",4,"ngFor","ngForOf"]],template:function(i,n){1&i&&(t.TgZ(0,"mat-dialog-content")(1,"div",0)(2,"button",1),t.NdJ("click",function(){return n.closeDialog()}),t.TgZ(3,"mat-icon",2),t._uU(4,"close"),t.qZA()()(),t.TgZ(5,"div",3),t._UZ(6,"img",4),t.TgZ(7,"h1"),t._uU(8,"Inserisci il codice OTP"),t.qZA()(),t.TgZ(9,"div",5)(10,"div",6),t._uU(11),t.qZA()(),t.TgZ(12,"div",7)(13,"div",6)(14,"ar-otp-input",8),t.
1NdJ("onInputChange",function(g){return n.onOtpChange(g)}),t.qZA()()(),t.TgZ(15,"div",9)(16,"div",10),t.YNc(17,K,5,1,"div",11),t.ALo(18,"async"),t.qZA(),t.YNc(19,M,1,0,"div",12),t.ALo(20,"async"),t.TgZ(21,"div",13),t.YNc(22,R,2,1,"ng-container",14),t.ALo(23,"async"),t.qZA()()()),2&i&&(t.xp6(11),t.hij(" ",n.data.popupMessage," "),t.xp6(3),t.Q6J("config",n.otpConfig),t.xp6(3),t.Q6J("ngIf",t.lcZ(18,5,n.$timerText)),t.xp6(2),t.Q6J("arLoading",t.lcZ(20,7,n.$isChecking)),t.xp6(3),t.Q6J("ngIf",t.lcZ(23,9,n.$lastOtpCheck)))},dependencies:[u.sg,u.O5,S.xw,S.Wh,S.yH,c.xY,Z.RK,D.Hw,k,B.m,u.Ov],styles:["ar-otp-check-dialog .width100{width:100%}ar-otp-check-dialog .close-btn-container{position:absolute;right:-14px;top:-14px}ar-otp-check-dialog .close-btn-container .close-btn{height:35px;width:35px;z-index:1}ar-otp-check-dialog .close-btn-container .close-btn :hover{cursor:pointer}ar-otp-check-dialog .close-btn-container .close-btn .mat-icon{position:absolute;top:5px;left:5px}ar-otp-check-dialog .title-container{color:var(--primary-color)!important;display:flex;flex-direction:row;justify-content:flex-start}ar-otp-check-dialog .title-container img{height:46px;width:46px}ar-otp-check-dialog .title-container h1{margin:10px}ar-otp-check-dialog .popup-msg-container{max-width:370px;padding-top:24px;padding-bottom:24px;font-size:1.2em}ar-otp-check-dialog .otp-error-container{max-width:370px;padding:0px,24px;font-weight:700;color:var(--error-color);text-align:center;font-size:1.2em}ar-otp-check-dialog .otp-timer-container{max-width:370px;padding:24px;font-weight:700;color:var(--primary-color);text-align:center;font-size:1.2em}.otp-check-dialog{position:relative!important}.otp-check-dialog mat-dialog-actions{padding:0 12px;margin-bottom:0}\n"],encapsulation:2,changeDetection:0}),a})()},93967:(T,x,s)=>{s.d(x,{X:()=>F});var c=s(53358),p=s(4859),y=s(65938),v=s(97392),f=s(1576),t=s(284),m=s(69814),u=s(24006),h=s(94650);let b=(()=>{const d=class{};let C=d;return d.\u0275fac=function(w){return new(w||d)},d.\u0275mod=h.oAB({type:d}),d.\u0275inj=h.cJS({imports:[c.m,t.c,m.o9,u.UX]}),C})();var _=s(98674);let F=(()=>{const d=class{};let C=d;return d.\u0275fac=function(w){return new(w||d)},d.\u0275mod=h.oAB({type:d}),d.\u0275inj=h.cJS({imports:[c.m,f.ae,y.Is,p.ot,v.Ps,b,_.z]}),C})()}}]);
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.