vendor: 22,547 bytes, lines 1-3
1import{a as Qs}from"./chunk-3X35YDMQ.js";import{a as Ys}from"./chunk-AEM26G3S.js";import{a as Ws}from"./chunk-UGLJJWBK.js";import{a as $s}from"./chunk-7F5QVEOD.js";import{a as zs}from"./chunk-CPUT3POM.js";import{c as Hs}from"./chunk-YYO3JVDI.js";import{l as qs}from"./chunk-CXC5ESIB.js";import{a as js}from"./chunk-5I522D47.js";import{a as Ks}from"./chunk-AWCPMMPC.js";import{a as bs}from"./chunk-CLU2SV7I.js";import{f as Us}from"./chunk-ABWHJ46K.js";import{b as Jt,c as ei}from"./chunk-QO7X6R4Q.js";import{a as Vs,c as Gs}from"./chunk-D73LI26Y.js";import{a as Mn}from"./chunk-C3KWFFS2.js";import{a as Fs}from"./chunk-DQYY35SV.js";import"./chunk-XJHAQDGV.js";import{a as Ns}from"./chunk-SJUGD2RF.js";import{a as Rs,b as Os}from"./chunk-HWZ4F4PK.js";import{a as ki}from"./chunk-GVFFMUQG.js";import{a as Is,b as Ps,c as ks}from"./chunk-LK56TUOZ.js";import{a as kn}from"./chunk-6VUEXIHP.js";import{a as Ms}from"./chunk-LIY4MLI7.js";import{a as Ue}from"./chunk-6I7336MH.js";import{c as Ds}from"./chunk-GKQUDWY2.js";import{b as Ls}from"./chunk-2HZUZXBZ.js";import{a as Bs}from"./chunk-QJQQZDRG.js";import{a as xs,b as ys}from"./chunk-ED2UCULX.js";import{a as Q,b as ot,e as ws,f as wr,i as pi,j as An,k as Hi}from"./chunk-DUKSTT3K.js";import{b as kt}from"./chunk-JA22VBO7.js";import"./chunk-4PH7MLCE.js";import{a as Pi}from"./chunk-UNVQ5NXZ.js";import{a as Ts,f as Xt}from"./chunk-6P5FJ3ME.js";import"./chunk-KJKOVUXC.js";import"./chunk-PSPL2KL4.js";import"./chunk-D2J64VUP.js";import"./chunk-UNG4Z4QB.js";import{b as _t,g as vt}from"./chunk-SNGOU643.js";import"./chunk-HYCLKCRN.js";import"./chunk-UISGJ2GT.js";import"./chunk-H3FC7ZI2.js";import{b as Ct,d as G,g as Et,h as St,k as _e,m as Tt,n as As,p as xt,q as Zt,s as yt,v as wt,x as bt,y as It,z as Pt}from"./chunk-H5UP2OAC.js";import"./chunk-YVHMR5AX.js";import"./chunk-4WV4YYVY.js";import{a as Ze,b as Ge}from"./chunk-HPPOTNKQ.js";import{b as Nn}from"./chunk-THALPHSH.js";import{a as Kt,h as Pn,i as Cs,j as Es,k as Ii,m as Ss,n as Pe}from"./chunk-VUASBBXJ.js";import{a as Qt,e as bi}from"./chunk-O6L37FVV.js";import{a as Oe}from"./chunk-EN33RNOB.js";import{a as ji,b as Yt}from"./chunk-YGRMDJRB.js";import{a as gt}from"./chunk-55WYSX2S.js";import{Ba as wi,Ca as _s,Da as vs,E as ne,F as ie,Fa as In,G as ds,H as rt,Ha as Se,J as ps,M as ms,N as yn,R as us,a as yr,b as V,d as yi,na as wn,oa as bn,pa as hs,qa as Xe,ra as Re,ta as fs,ua as pe,va as $t,wa as Wt,xa as gs,ya as ge}from"./chunk-MGYJXOAP.js";import{a as D,b as Ee}from"./chunk-THXBBYWB.js";import{A as xr,B as Zo,C as Jo,D as es,E as ts,F as is,G as ns,I as rs,J as os,K as ss,L as as,M as xn,N as xi,O as de,P as qt,R as ls,S as cs,b as ht,d as ft,k as $o,m as Wo,q as Yo,s as Qo,t as Xo,x as zi,y as Ti}from"./chunk-J4K66FRB.js";import{$c as Tn,A as Mo,B as No,Ca as Fo,Cc as ce,D as Ro,Dc as Fe,Ea as Ie,Ec as jo,F as Ke,Fc as Ho,Hb as g,Ib as _,Ic as Si,J as Oo,Jb as Uo,Jc as J,Ka as Tr,Lb as Cn,M as Er,Mb as En,Nb as S,Nc as v,Ob as c,Oc as C,Pb as a,Qb as w,Rb as ue,Sb as fe,Tb as nt,Tc as qo,W as Sr,Wc as Ko,X as hn,Xa as Ve,Xb as L,Ya as Y,Yb as zo,Z as fn,_ as te,ac as k,ba as le,bb as s,bc as Vt,cc as u,f as un,fa as W,fb as Vo,g as ko,gc as ai,hb as _n,hc as li,i as Ao,ia as Do,ic as ci,kb as vn,lb as Go,ma as I,mb as b,mc as se,na as P,o as Ne,oa as Bo,oc as di,p as si,pa as Lo,pc as ut,qc as h,ra as gn,rc as R,sb as K,sc as T,t as vr,tc as Sn,z as Cr}from"./chunk-7DQSQO6M.js";import{a as Ei,b as Io,c as Po,d as cc,e as dc}from"./chunk-EQDQRRRY.js";var Dl=cc((l1,ar)=>{"use strict";(function(i,r,e,t){"use strict";var n=["","webkit","Moz","MS","ms","o"],o=r.createElement("div"),l="function",m=Math.round,E=Math.abs,y=Date.now;function M(d,p,f){return setTimeout(ve(d,f),p)}function N(d,p,f){return Array.isArray(d)?(U(d,f[p],f),!0):!1}function U(d,p,f){var x;if(d)if(d.forEach)d.forEach(p,f);else if(d.length!==t)for(x=0;x<d.length;)p.call(f,d[x],x,d),x++;else for(x in d)d.hasOwnProperty(x)&&p.call(f,d[x],x,d)}function j(d,p,f){var x="DEPRECATED METHOD: "+p+` 2`+f+` AT 3`;return function(){var A=new Error("get-stack-trace"),B=A&&A.stack?A.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",$=i.console&&(i.console.warn||i.console.log);return $&&$.call(i.console,x,B),d.apply(this,arguments)}}var O;typeof Object.assign!="function"?O=function(p){if(p===t||p===null)throw new TypeError("Cannot convert undefined or null to object");for(var f=Object(p),x=1;x<arguments.length;x++){var A=arguments[x];if(A!==t&&A!==null)for(var B in A)A.hasOwnProperty(B)&&(f[B]=A[B])}return f}:O=Object.assign;var q=j(function(p,f,x){for(var A=Object.keys(f),B=0;B<A.length;)(!x||x&&p[A[B]]===t)&&(p[A[B]]=f[A[B]]),B++;return p},"extend","Use `assign`."),ae=j(function(p,f){return q(p,f,!0)},"merge","Use `assign`.");function ee(d,p,f){var x=p.prototype,A;A=d.prototype=Object.create(x),A.constructor=d,A._super=x,f&&O(A,f)}function ve(d,p){return function(){return d.apply(p,arguments)}}function ye(d,p){return typeof d==l?d.apply(p&&p[0]||t,p):d}function Te(d,p){return d===t?p:d}function tt(d,p,f){U($e(p),function(x){d.addEventListener(x,f,!1)})}function De(d,p,f){U($e(p),function(x){d.removeEventListener(x,f,!1)})}function we(d,p){for(;d;){if(d==p)return!0;d=d.parentNode}return!1}function Ce(d,p){return d.indexOf(p)>-1}function $e(d){return d.trim().split(/\s+/g)}function qe(d,p,f){if(d.indexOf&&!f)return d.indexOf(p);for(var x=0;x<d.length;){if(f&&d[x][f]==p||!f&&d[x]===p)return x;x++}return-1}function ni(d){return Array.prototype.slice.call(d,0)}function ct(d,p,f){for(var x=[],A=[],B=0;B<d.length;){var $=p?d[B][p]:d[B];qe(A,$)<0&&x.push(d[B]),A[B]=$,B++}return f&&(p?x=x.sort(function(Ae,Le){return Ae[p]>Le[p]}):x=x.sort()),x}function jt(d,p){for(var f,x,A=p[0].toUpperCase()+p.slice(1),B=0;B<n.length;){if(f=n[B],x=f?f+A:p,x in d)return x;B++}return t}var en=1;function tn(){return en++}function F(d){var p=d.ownerDocument||d;return p.defaultView||p.parentWindow||i}var z=/mobile|tablet|ip(ad|hone|od)|android/i,H="ontouchstart"in i,X=jt(i,"PointerEvent")!==t,xe=H&&z.test(navigator.userAgent),Me="touch",Be="pen",We="mouse",me="kinect",nn=25,ke=1,he=2,re=4,oe=8,Ot=1,Dt=2,Bi=4,Li=8,Fi=16,dt=Dt|Bi,ri=Li|Fi,ao=dt|ri,lo=["x","y"],rn=["clientX","clientY"];function Ye(d,p){var f=this;this.manager=d,this.callback=p,this.element=d.element,this.target=d.options.inputTarget,this.domHandler=function(x){ye(d.options.enable,[d])&&f.handler(x)},this.init()}Ye.prototype={handler:function(){},init:function(){this.evEl&&tt(this.element,this.evEl,this.domHandler),this.evTarget&&tt(this.target,this.evTarget,this.domHandler),this.evWin&&tt(F(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&De(this.element,this.evEl,this.domHandler),this.evTarget&&De(this.target,this.evTarget,this.domHandler),this.evWin&&De(F(this.element),this.evWin,this.domHandler)}};function Bl(d){var p,f=d.options.inputClass;return f?p=f:X?p=cr:xe?p=an:H?p=dr:p=sn,new p(d,Ll)}function Ll(d,p,f){var x=f.pointers.length,A=f.changedPointers.length,B=p&ke&&x-A===0,$=p&(re|oe)&&x-A===0;f.isFirst=!!B,f.isFinal=!!$,B&&(d.session={}),f.eventType=p,Fl(d,f),d.emit("hammer.input",f),d.recognize(f),d.session.prevInput=f}function Fl(d,p){var f=d.session,x=p.pointers,A=x.length;f.firstInput||(f.firstInput=co(p)),A>1&&!f.firstMultiple?f.firstMultiple=co(p):A===1&&(f.firstMultiple=!1);var B=f.firstInput,$=f.firstMultiple,be=$?$.center:B.center,Ae=p.center=po(x);p.timeStamp=y(),p.deltaTime=p.timeStamp-B.timeStamp,p.angle=lr(be,Ae),p.distance=on(be,Ae),Vl(f,p),p.offsetDirection=uo(p.deltaX,p.deltaY);var Le=mo(p.deltaTime,p.deltaX,p.deltaY);p.overallVelocityX=Le.x,p.overallVelocityY=Le.y,p.overallVelocity=E(Le.x)>E(Le.y)?Le.x:Le.y,p.scale=$?zl($.pointers,x):1,p.rotation=$?Ul($.pointers,x):0,p.maxPointers=f.prevInput?p.pointers.length>f.prevInput.maxPointers?p.pointers.length:f.prevInput.maxPointers:p.pointers.length,Gl(f,p);var mt=d.element;we(p.srcEvent.target,mt)&&(mt=p.srcEvent.target),p.target=mt}function Vl(d,p){var f=p.center,x=d.offsetDelta||{},A=d.prevDelta||{},B=d.prevInput||{};(p.eventType===ke||B.eventType===re)&&(A=d.prevDelta={x:B.deltaX||0,y:B.deltaY||0},x=d.offsetDelta={x:f.x,y:f.y}),p.deltaX=A.x+(f.x-x.x),p.deltaY=A.y+(f.y-x.y)}function Gl(d,p){var f=d.lastInterval||p,x=p.timeStamp-f.timeStamp,A,B,$,be;if(p.eventType!=oe&&(x>nn||f.velocity===t)){var Ae=p.deltaX-f.deltaX,Le=p.deltaY-f.deltaY,mt=mo(x,Ae,Le);B=mt.x,$=mt.y,A=E(mt.x)>E(mt.y)?mt.x:mt.y,be=uo(Ae,Le),d.lastInterval=p}else A=f.velocity,B=f.velocityX,$=f.velocityY,be=f.direction;p.velocity=A,p.velocityX=B,p.velocityY=$,p.direction=be}function co(d){for(var p=[],f=0;f<d.pointers.length;)p[f]={clientX:m(d.pointers[f].clientX),clientY:m(d.pointers[f].clientY)},f++;return{timeStamp:y(),pointers:p,center:po(p),deltaX:d.deltaX,deltaY:d.deltaY}}function po(d){var p=d.length;if(p===1)return{x:m(d[0].clientX),y:m(d[0].clientY)};for(var f=0,x=0,A=0;A<p;)f+=d[A].clientX,x+=d[A].clientY,A++;return{x:m(f/p),y:m(x/p)}}function mo(d,p,f){return{x:p/d||0,y:f/d||0}}function uo(d,p){return d===p?Ot:E(d)>=E(p)?d<0?Dt:Bi:p<0?Li:Fi}function on(d,p,f){f||(f=lo);var x=p[f[0]]-d[f[0]],A=p[f[1]]-d[f[1]];return Math.sqrt(x*x+A*A)}function lr(d,p,f){f||(f=lo);var x=p[f[0]]-d[f[0]],A=p[f[1]]-d[f[1]];return Math.atan2(A,x)*180/Math.PI}function Ul(d,p){return lr(p[1],p[0],rn)+lr(d[1],d[0],rn)}function zl(d,p){return on(p[0],p[1],rn)/on(d[0],d[1],rn)}var jl={mousedown:ke,mousemove:he,mouseup:re},Hl="mousedown",ql="mousemove mouseup";function sn(){this.evEl=Hl,this.evWin=ql,this.pressed=!1,Ye.apply(this,arguments)}ee(sn,Ye,{handler:function(p){var f=jl[p.type];f&ke&&p.button===0&&(this.pressed=!0),f&he&&p.which!==1&&(f=re),this.pressed&&(f&re&&(this.pressed=!1),this.callback(this.manager,f,{pointers:[p],changedPointers:[p],pointerType:We,srcEvent:p}))}});var Kl={pointerdown:ke,pointermove:he,pointerup:re,pointercancel:oe,pointerout:oe},$l={2:Me,3:Be,4:We,5:me},ho="pointerdown",fo="pointermove pointerup pointercancel";i.MSPointerEvent&&!i.PointerEvent&&(ho="MSPointerDown",fo="MSPointerMove MSPointerUp MSPointerCancel");function cr(){this.evEl=ho,this.evWin=fo,Ye.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}ee(cr,Ye,{handler:function(p){var f=this.store,x=!1,A=p.type.toLowerCase().replace("ms",""),B=Kl[A],$=$l[p.pointerType]||p.pointerType,be=$==Me,Ae=qe(f,p.pointerId,"pointerId");B&ke&&(p.button===0||be)?Ae<0&&(f.push(p),Ae=f.length-1):B&(re|oe)&&(x=!0),!(Ae<0)&&(f[Ae]=p,this.callback(this.manager,B,{pointers:f,changedPointers:[p],pointerType:$,srcEvent:p}),x&&f.splice(Ae,1))}});var Wl={touchstart:ke,touchmove:he,touchend:re,touchcancel:oe},Yl="touchstart",Ql="touchstart touchmove touchend touchcancel";function go(){this.evTarget=Yl,this.evWin=Ql,this.started=!1,Ye.apply(this,arguments)}ee(go,Ye,{handler:function(p){var f=Wl[p.type];if(f===ke&&(this.started=!0),!!this.started){var x=Xl.call(this,p,f);f&(re|oe)&&x[0].length-x[1].length===0&&(this.started=!1),this.callback(this.manager,f,{pointers:x[0],changedPointers:x[1],pointerType:Me,srcEvent:p})}}});function Xl(d,p){var f=ni(d.touches),x=ni(d.changedTouches);return p&(re|oe)&&(f=ct(f.concat(x),"identifier",!0)),[f,x]}var Zl={touchstart:ke,touchmove:he,touchend:re,touchcancel:oe},Jl="touchstart touchmove touchend touchcancel";function an(){this.evTarget=Jl,this.targetIds={},Ye.apply(this,arguments)}ee(an,Ye,{handler:function(p){var f=Zl[p.type],x=ec.call(this,p,f);x&&this.callback(this.manager,f,{pointers:x[0],changedPointers:x[1],pointerType:Me,srcEvent:p})}});function ec(d,p){var f=ni(d.touches),x=this.targetIds;if(p&(ke|he)&&f.length===1)return x[f[0].identifier]=!0,[f,f];var A,B,$=ni(d.changedTouches),be=[],Ae=this.target;if(B=f.filter(function(Le){return we(Le.target,Ae)}),p===ke)for(A=0;A<B.length;)x[B[A].identifier]=!0,A++;for(A=0;A<$.length;)x[$[A].identifier]&&be.push($[A]),p&(re|oe)&&delete x[$[A].identifier],A++;if(be.length)return[ct(B.concat(be),"identifier",!0),be]}var tc=2500,_o=25;function dr(){Ye.apply(this,arguments);var d=ve(this.handler,this);this.touch=new an(this.manager,d),this.mouse=new sn(this.manager,d),this.primaryTouch=null,this.lastTouches=[]}ee(dr,Ye,{handler:function(p,f,x){var A=x.pointerType==Me,B=x.pointerType==We;if(!(B&&x.sourceCapabilities&&x.sourceCapabilities.firesTouchEvents)){if(A)ic.call(this,f,x);else if(B&&nc.call(this,x))return;this.callback(p,f,x)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function ic(d,p){d&ke?(this.primaryTouch=p.changedPointers[0].identifier,vo.call(this,p)):d&(re|oe)&&vo.call(this,p)}function vo(d){var p=d.changedPointers[0];if(p.identifier===this.primaryTouch){var f={x:p.clientX,y:p.clientY};this.lastTouches.push(f);var x=this.lastTouches,A=function(){var B=x.indexOf(f);B>-1&&x.splice(B,1)};setTimeout(A,tc)}}function nc(d){for(var p=d.srcEvent.clientX,f=d.srcEvent.clientY,x=0;x<this.lastTouches.length;x++){var A=this.lastTouches[x],B=Math.abs(p-A.x),$=Math.abs(f-A.y);if(B<=_o&&$<=_o)return!0}return!1}var Co=jt(o.style,"touchAction"),Eo=Co!==t,So="compute",To="auto",pr="manipulation",oi="none",Vi="pan-x",Gi="pan-y",ln=oc();function mr(d,p){this.manager=d,this.set(p)}mr.prototype={set:function(d){d==So&&(d=this.compute()),Eo&&this.manager.element.style&&ln[d]&&(this.manager.element.style[Co]=d),this.actions=d.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var d=[];return U(this.manager.recognizers,function(p){ye(p.options.enable,[p])&&(d=d.concat(p.getTouchAction()))}),rc(d.join(" "))},preventDefaults:function(d){var p=d.srcEvent,f=d.offsetDirection;if(this.manager.session.prevented){p.preventDefault();return}var x=this.actions,A=Ce(x,oi)&&!ln[oi],B=Ce(x,Gi)&&!ln[Gi],$=Ce(x,Vi)&&!ln[Vi];if(A){var be=d.pointers.length===1,Ae=d.distance<2,Le=d.deltaTime<250;if(be&&Ae&&Le)return}if(!($&&B)&&(A||B&&f&dt||$&&f&ri))return this.preventSrc(p)},preventSrc:function(d){this.manager.session.prevented=!0,d.preventDefault()}};function rc(d){if(Ce(d,oi))return oi;var p=Ce(d,Vi),f=Ce(d,Gi);return p&&f?oi:p||f?p?Vi:Gi:Ce(d,pr)?pr:To}function oc(){if(!Eo)return!1;var d={},p=i.CSS&&i.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(f){d[f]=p?i.CSS.supports("touch-action",f):!0}),d}var cn=1,Qe=2,Ci=4,Ht=8,Bt=Ht,Ui=16,pt=32;function Lt(d){this.options=O({},this.defaults,d||{}),this.id=tn(),this.manager=null,this.options.enable=Te(this.options.enable,!0),this.state=cn,this.simultaneous={},this.requireFail=[]}Lt.prototype={defaults:{},set:function(d){return O(this.options,d),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(d){if(N(d,"recognizeWith",this))return this;var p=this.simultaneous;return d=dn(d,this),p[d.id]||(p[d.id]=d,d.recognizeWith(this)),this},dropRecognizeWith:function(d){return N(d,"dropRecognizeWith",this)?this:(d=dn(d,this),delete this.simultaneous[d.id],this)},requireFailure:function(d){if(N(d,"requireFailure",this))return this;var p=this.requireFail;return d=dn(d,this),qe(p,d)===-1&&(p.push(d),d.requireFailure(this)),this},dropRequireFailure:function(d){if(N(d,"dropRequireFailure",this))return this;d=dn(d,this);var p=qe(this.requireFail,d);return p>-1&&this.requireFail.splice(p,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(d){return!!this.simultaneous[d.id]},emit:function(d){var p=this,f=this.state;function x(A){p.manager.emit(A,d)}f<Ht&&x(p.options.event+xo(f)),x(p.options.event),d.additionalEvent&&x(d.additionalEvent),f>=Ht&&x(p.options.event+xo(f))},tryEmit:function(d){if(this.canEmit())return this.emit(d);this.state=pt},canEmit:function(){for(var d=0;d<this.requireFail.length;){if(!(this.requireFail[d].state&(pt|cn)))return!1;d++}return!0},recognize:function(d){var p=O({},d);if(!ye(this.options.enable,[this,p])){this.reset(),this.state=pt;return}this.state&(Bt|Ui|pt)&&(this.state=cn),this.state=this.process(p),this.state&(Qe|Ci|Ht|Ui)&&this.tryEmit(p)},process:function(d){},getTouchAction:function(){},reset:function(){}};function xo(d){return d&Ui?"cancel":d&Ht?"end":d&Ci?"move":d&Qe?"start":""}function yo(d){return d==Fi?"down":d==Li?"up":d==Dt?"left":d==Bi?"right":""}function dn(d,p){var f=p.manager;return f?f.get(d):d}function it(){Lt.apply(this,arguments)}ee(it,Lt,{defaults:{pointers:1},attrTest:function(d){var p=this.options.pointers;return p===0||d.pointers.length===p},process:function(d){var p=this.state,f=d.eventType,x=p&(Qe|Ci),A=this.attrTest(d);return x&&(f&oe||!A)?p|Ui:x||A?f&re?p|Ht:p&Qe?p|Ci:Qe:pt}});function pn(){it.apply(this,arguments),this.pX=null,this.pY=null}ee(pn,it,{defaults:{event:"pan",threshold:10,pointers:1,direction:ao},getTouchAction:function(){var d=this.options.direction,p=[];return d&dt&&p.push(Gi),d&ri&&p.push(Vi),p},directionTest:function(d){var p=this.options,f=!0,x=d.distance,A=d.direction,B=d.deltaX,$=d.deltaY;return A&p.direction||(p.direction&dt?(A=B===0?Ot:B<0?Dt:Bi,f=B!=this.pX,x=Math.abs(d.deltaX)):(A=$===0?Ot:$<0?Li:Fi,f=$!=this.pY,x=Math.abs(d.deltaY))),d.direction=A,f&&x>p.threshold&&A&p.direction},attrTest:function(d){return it.prototype.attrTest.call(this,d)&&(this.state&Qe||!(this.state&Qe)&&this.directionTest(d))},emit:function(d){this.pX=d.deltaX,this.pY=d.deltaY;var p=yo(d.direction);p&&(d.additionalEvent=this.options.event+p),this._super.emit.call(this,d)}});function ur(){it.apply(this,arguments)}ee(ur,it,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[oi]},attrTest:function(d){return this._super.attrTest.call(this,d)&&(Math.abs(d.scale-1)>this.options.threshold||this.state&Qe)},emit:function(d){if(d.scale!==1){var p=d.scale<1?"in":"out";d.additionalEvent=this.options.event+p}this._super.emit.call(this,d)}});function hr(){Lt.apply(this,arguments),this._timer=null,this._input=null}ee(hr,Lt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[To]},process:function(d){var p=this.options,f=d.pointers.length===p.pointers,x=d.distance<p.threshold,A=d.deltaTime>p.time;if(this._input=d,!x||!f||d.eventType&(re|oe)&&!A)this.reset();else if(d.eventType&ke)this.reset(),this._timer=M(function(){this.state=Bt,this.tryEmit()},p.time,this);else if(d.eventType&re)return Bt;return pt},reset:function(){clearTimeout(this._timer)},emit:function(d){this.state===Bt&&(d&&d.eventType&re?this.manager.emit(this.options.event+"up",d):(this._input.timeStamp=y(),this.manager.emit(this.options.event,this._input)))}});function fr(){it.apply(this,arguments)}ee(fr,it,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[oi]},attrTest:function(d){return this._super.attrTest.call(this,d)&&(Math.abs(d.rotation)>this.options.threshold||this.state&Qe)}});function gr(){it.apply(this,arguments)}ee(gr,it,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:dt|ri,pointers:1},getTouchAction:function(){return pn.prototype.getTouchAction.call(this)},attrTest:function(d){var p=this.options.direction,f;return p&(dt|ri)?f=d.overallVelocity:p&dt?f=d.overallVelocityX:p&ri&&(f=d.overallVelocityY),this._super.attrTest.call(this,d)&&p&d.offsetDirection&&d.distance>this.options.threshold&&d.maxPointers==this.options.pointers&&E(f)>this.options.velocity&&d.eventType&re},emit:function(d){var p=yo(d.offsetDirection);p&&this.manager.emit(this.options.event+p,d),this.manager.emit(this.options.event,d)}});function mn(){Lt.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}ee(mn,Lt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[pr]},process:function(d){var p=this.options,f=d.pointers.length===p.pointers,x=d.distance<p.threshold,A=d.deltaTime<p.time;if(this.reset(),d.eventType&ke&&this.count===0)return this.failTimeout();if(x&&A&&f){if(d.eventType!=re)return this.failTimeout();var B=this.pTime?d.timeStamp-this.pTime<p.interval:!0,$=!this.pCenter||on(this.pCenter,d.center)<p.posThreshold;this.pTime=d.timeStamp,this.pCenter=d.center,!$||!B?this.count=1:this.count+=1,this._input=d;var be=this.count%p.taps;if(be===0)return this.hasRequireFailures()?(this._timer=M(function(){this.state=Bt,this.tryEmit()},p.interval,this),Qe):Bt}return pt},failTimeout:function(){return this._timer=M(function(){this.state=pt},this.options.interval,this),pt},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==Bt&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function Ft(d,p){return p=p||{},p.recognizers=Te(p.recognizers,Ft.defaults.preset),new _r(d,p)}Ft.VERSION="2.0.7",Ft.defaults={domEvents:!1,touchAction:So,enable:!0,inputTarget:null,inputClass:null,preset:[[fr,{enable:!1}],[ur,{enable:!1},["rotate"]],[gr,{direction:dt}],[pn,{direction:dt},["swipe"]],[mn],[mn,{event:"doubletap",taps:2},["tap"]],[hr]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var sc=1,wo=2;function _r(d,p){this.options=O({},Ft.defaults,p||{}),this.options.inputTarget=this.options.inputTarget||d,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=d,this.input=Bl(this),this.touchAction=new mr(this,this.options.touchAction),bo(this,!0),U(this.options.recognizers,function(f){var x=this.add(new f[0](f[1]));f[2]&&x.recognizeWith(f[2]),f[3]&&x.requireFailure(f[3])},this)}_r.prototype={set:function(d){return O(this.options,d),d.touchAction&&this.touchAction.update(),d.inputTarget&&(this.input.destroy(),this.input.target=d.inputTarget,this.input.init()),this},stop:function(d){this.session.stopped=d?wo:sc},recognize:function(d){var p=this.session;if(!p.stopped){this.touchAction.preventDefaults(d);var f,x=this.recognizers,A=p.curRecognizer;(!A||A&&A.state&Bt)&&(A=p.curRecognizer=null);for(var B=0;B<x.length;)f=x[B],p.stopped!==wo&&(!A||f==A||f.canRecognizeWith(A))?f.recognize(d):f.reset(),!A&&f.state&(Qe|Ci|Ht)&&(A=p.curRecognizer=f),B++}},get:function(d){if(d instanceof Lt)return d;for(var p=this.recognizers,f=0;f<p.length;f++)if(p[f].options.event==d)return p[f];return null},add:function(d){if(N(d,"add",this))return this;var p=this.get(d.options.event);return p&&this.remove(p),this.recognizers.push(d),d.manager=this,this.touchAction.update(),d},remove:function(d){if(N(d,"remove",this))return this;if(d=this.get(d),d){var p=this.recognizers,f=qe(p,d);f!==-1&&(p.splice(f,1),this.touchAction.update())}return this}
3,on:function(d,p){if(d!==t&&p!==t){var f=this.handlers;return U($e(d),function(x){f[x]=f[x]||[],f[x].push(p)}),this}},off:function(d,p){if(d!==t){var f=this.handlers;return U($e(d),function(x){p?f[x]&&f[x].splice(qe(f[x],p),1):delete f[x]}),this}},emit:function(d,p){this.options.domEvents&&ac(d,p);var f=this.handlers[d]&&this.handlers[d].slice();if(!(!f||!f.length)){p.type=d,p.preventDefault=function(){p.srcEvent.preventDefault()};for(var x=0;x<f.length;)f[x](p),x++}},destroy:function(){this.element&&bo(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function bo(d,p){var f=d.element;if(f.style){var x;U(d.options.cssProps,function(A,B){x=jt(f.style,B),p?(d.oldCssProps[x]=f.style[x],f.style[x]=A):f.style[x]=d.oldCssProps[x]||""}),p||(d.oldCssProps={})}}function ac(d,p){var f=r.createEvent("Event");f.initEvent(d,!0,!0),f.gesture=p,p.target.dispatchEvent(f)}O(Ft,{INPUT_START:ke,INPUT_MOVE:he,INPUT_END:re,INPUT_CANCEL:oe,STATE_POSSIBLE:cn,STATE_BEGAN:Qe,STATE_CHANGED:Ci,STATE_ENDED:Ht,STATE_RECOGNIZED:Bt,STATE_CANCELLED:Ui,STATE_FAILED:pt,DIRECTION_NONE:Ot,DIRECTION_LEFT:Dt,DIRECTION_RIGHT:Bi,DIRECTION_UP:Li,DIRECTION_DOWN:Fi,DIRECTION_HORIZONTAL:dt,DIRECTION_VERTICAL:ri,DIRECTION_ALL:ao,Manager:_r,Input:Ye,TouchAction:mr,TouchInput:an,MouseInput:sn,PointerEventInput:cr,TouchMouseInput:dr,SingleTouchInput:go,Recognizer:Lt,AttrRecognizer:it,Tap:mn,Pan:pn,Swipe:gr,Pinch:ur,Rotate:fr,Press:hr,on:tt,off:De,each:U,merge:ae,extend:q,assign:O,inherit:ee,bindFn:ve,prefixed:jt});var lc=typeof i<"u"?i:typeof self<"u"?self:{};lc.Hammer=Ft,typeof define=="function"&&define.amd?define(function(){return Ft}):typeof ar<"u"&&ar.exports?ar.exports=Ft:i[e]=Ft})(window,document,"Hammer")});function pc(i){return i===1?1:5}var Xs=["bg",[["am","pm"],void 0,["\u043F\u0440.\u043E\u0431.","\u0441\u043B.\u043E\u0431."]],[["am","pm"]],[["\u043D","\u043F","\u0432","\u0441","\u0447","\u043F","\u0441"],["\u043D\u0434","\u043F\u043D","\u0432\u0442","\u0441\u0440","\u0447\u0442","\u043F\u0442","\u0441\u0431"],["\u043D\u0435\u0434\u0435\u043B\u044F","\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u043D\u0438\u043A","\u0432\u0442\u043E\u0440\u043D\u0438\u043A","\u0441\u0440\u044F\u0434\u0430","\u0447\u0435\u0442\u0432\u044A\u0440\u0442\u044A\u043A","\u043F\u0435\u0442\u044A\u043A","\u0441\u044A\u0431\u043E\u0442\u0430"],["\u043D\u0434","\u043F\u043D","\u0432\u0442","\u0441\u0440","\u0447\u0442","\u043F\u0442","\u0441\u0431"]],void 0,[["\u044F","\u0444","\u043C","\u0430","\u043C","\u044E","\u044E","\u0430","\u0441","\u043E","\u043D","\u0434"],["\u044F\u043D\u0443","\u0444\u0435\u0432","\u043C\u0430\u0440\u0442","\u0430\u043F\u0440","\u043C\u0430\u0439","\u044E\u043D\u0438","\u044E\u043B\u0438","\u0430\u0432\u0433","\u0441\u0435\u043F","\u043E\u043A\u0442","\u043D\u043E\u0435","\u0434\u0435\u043A"],["\u044F\u043D\u0443\u0430\u0440\u0438","\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438","\u043C\u0430\u0440\u0442","\u0430\u043F\u0440\u0438\u043B","\u043C\u0430\u0439","\u044E\u043D\u0438","\u044E\u043B\u0438","\u0430\u0432\u0433\u0443\u0441\u0442","\u0441\u0435\u043F\u0442\u0435\u043C\u0432\u0440\u0438","\u043E\u043A\u0442\u043E\u043C\u0432\u0440\u0438","\u043D\u043E\u0435\u043C\u0432\u0440\u0438","\u0434\u0435\u043A\u0435\u043C\u0432\u0440\u0438"]],void 0,[["\u043F\u0440.\u0425\u0440.","\u0441\u043B.\u0425\u0440."],void 0,["\u043F\u0440\u0435\u0434\u0438 \u0425\u0440\u0438\u0441\u0442\u0430","\u0441\u043B\u0435\u0434 \u0425\u0440\u0438\u0441\u0442\u0430"]],1,[6,0],["d.MM.yy '\u0433'.","d.MM.y '\u0433'.","d MMMM y '\u0433'.","EEEE, d MMMM y '\u0433'."],["H:mm '\u0447'.","H:mm:ss '\u0447'.","H:mm:ss '\u0447'. z","H:mm:ss '\u0447'. zzzz"],["{1}, {0}",void 0,void 0,void 0],[",","\xA0",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","0.00\xA0\xA4","#E0"],"BGN","\u043B\u0432.","\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438 \u043B\u0435\u0432",{AFN:[void 0,"Af"],AMD:[],ARS:[],AUD:[],AZN:[],BBD:[],BDT:[],BGN:["\u043B\u0432."],BMD:[],BND:[],BRL:[],BSD:[],BZD:[],CAD:[],CLP:[],CNY:[],COP:[],CRC:[],CUP:[],DOP:[],FJD:[],FKP:[],GBP:[void 0,"\xA3"],GHS:[],GIP:[],GYD:[],HKD:[],ILS:[],INR:[],JMD:[],JPY:[void 0,"\xA5"],KHR:[],KRW:[],KYD:[],KZT:[],LAK:[],LRD:[],MNT:[],MXN:[],NAD:[],NGN:[],NZD:[],PHP:[],PYG:[],RON:[],SBD:[],SGD:[],SRD:[],SSP:[],TRY:[],TTD:[],TWD:[],UAH:[],USD:["\u0449.\u0434.","$"],UYU:[],VND:[],XCD:[void 0,"$"]},"ltr",pc];var Zs="/forgotten-password";function Js(i,r){if(!i)return!1;let e=i.replace(/\/+$/,""),t=(r??"").replace(/\/+$/,"");return e===Zs||!!t&&e===`${t}${Zs}`}var ea=(()=>{class i{constructor(e,t){this.storageService=t,this.colorScheme="light",this.colorSchemePrefix="color-scheme-",this.renderer=e.createRenderer(null,null)}_detectPrefersColorScheme(){window.matchMedia("(prefers-color-scheme)").media!=="not all"?this.colorScheme=window.matchMedia("(prefers-color-scheme: light)").matches?"dar
3k":"light":this.colorScheme="light"}_setColorScheme(e){this.colorScheme=e,this.storageService.set(D.PREFERS_COLOR,e)}_getColorScheme(){this.storageService.has(D.PREFERS_COLOR)?this.colorScheme=this.storageService.get(D.PREFERS_COLOR)||"light":this.colorScheme="light"}load(){this._getColorScheme(),this.renderer.addClass(document.body,this.colorSchemePrefix+this.colorScheme)}update(e){this._setColorScheme(e),this.renderer.removeClass(document.body,this.colorSchemePrefix+(this.colorScheme==="dark"?"light":"dark")),this.renderer.addClass(document.body,this.colorSchemePrefix+e)}currentActive(){if(this.colorScheme==="dark")return!0}static{this.\u0275fac=function(t){return new(t||i)(W(vn),W(Ee))}}static{this.\u0275prov=le({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function hc(i,r){i&1&&(c(0,"div",3)(1,"h4",4),h(2),v(3,"translate"),a(),c(4,"p",5),h(5),v(6,"translate"),a()()),i&2&&(s(2),T(" ",C(3,2,"loadingText.title")," "),s(3),T(" ",C(6,4,"loadingText.description")," "))}function fc(i,r){if(i&1&&(c(0,"div",0),w(1,"mat-progress-spinner",2),g(2,hc,7,6,"div",3),a()),i&2){let e=u();s(),S("mode",e.commonService.mode)("strokeWidth",2)("diameter",80),s(),_(e.customerService.isResolvingRouteShowText()?2:-1)}}function gc(i,r){if(i&1&&(c(0,"div",1)(1,"span",6),w(2,"img",7),a(),c(3,"h3"),h(4),a()()),i&2){let e=u();s(4),R(e.notificationMessage)}}function _c(i,r){i&1&&(c(0,"span",8),h(1),a()),i&2&&(s(),R(r))}function vc(i,r){if(i&1&&(c(0,"div",1)(1,"span",6),w(2,"img",7),a(),c(3,"h3"),h(4),g(5,_c,2,1,"span",8),a()()),i&2){let e,t=u();s(4),T(" ",t.config.setMaintenanceRibbon?t.trs.trsTs("maintenance.description"):t.maintenanceService.ribbonMessage()," "),s(),_((e=t.maintenanceService.period(t.maintenanceService.ribbon()))?5:-1,e)}}var ia=(()=>{class i{constructor(e,t,n,o,l,m,E,y,M,N,U){this.router=e,this.customerService=t,this.billsCustomerService=n,this.elRef=o,this.trs=l,this.colorSchemeService=m,this.commonService=E,this.metaService=y,this.authService=M,this.notificationService=N,this.maintenanceService=U,this.notificationMessage=null,this.config=V,this.router.events.subscribe(O=>{O?.url&&O.url!=="/signin"&&this.commonService.isOnSigningPage&&this.checkRouterEvent(O)}),this.colorSchemeService.load();let j=V.webDomain+"/assets/img/logo.svg";this.metaService.addTag({property:"og:image",content:j}),this.visitor={name:"",email:M.username},Ko(()=>this.handleMaintenanceRibbon(this.maintenanceService.isRibbonVisible()))}ngOnInit(){console.log("LOGGED USER:",this.authService.isLoggedIn),this.maintenanceService.probe(),window.location.href.indexOf("signin")>-1&&(this.commonService.isOnSigningPage=!0),this.commonService.svgIcons()}handleMaintenanceRibbon(e){let t=this.elRef.nativeElement.closest("body");e?t?.classList.add("show-maintenance-ribbon"):t?.classList.remove("show-maintenance-ribbon")}isResolverLoading(){return!this.isOnLogin()&&!Js(window.location.pathname,V.accountPath)&&this.customerService.isResolvingRoute()&&!this.commonService.terminateLoader}checkRouterEvent(e){e instanceof rs&&(this.commonService.isOnSigningPage=!0),(e instanceof os||e instanceof ss||e instanceof as)&&(this.commonService.isOnSigningPage=!1)}isOnLogin(){return window.location.href.indexOf("signin")>-1}static{this.\u0275fac=function(t){return new(t||i)(b(de),b(Pe),b(Xt),b(Ie),b(pe),b(ea),b(Se),b(es),b(ge),b(Oe),b(kn))}}static{this.\u0275cmp=K({type:i,selectors:[["app-root"]],decls:4,vars:3,consts:[[1,"page-spinner","full-width","spinner-with-text"],[1,"main-app-notification"],[3,"mode","strokeWidth","diameter"],[1,"text-wrapper"],[1,"title"],[1,"description"],[1,"icon"],["src","assets/img/info-icon.svg","alt","info icon"],[1,"period"]],template:function(t,n){t&1&&(g(0,fc,3,4,"div",0),g(1,gc,5,1,"div",1),g(2,vc,6,2,"div",1),w(3,"router-outlet")),t&2&&(_(n.isResolverLoading()?0:-1),s(),_(n.notificationMessage!==null?1:-1),s(),_(n.maintenanceService.isRibbonVisible()?2:-1))},dependencies:[gt,xi,ie,ne],styles:[".spinner-with-text[_ngcontent-%COMP%]{flex-direction:column;text-align:center}.spinner-with-text[_ngcontent-%COMP%] .text-wrapper[_ngcontent-%COMP%]{margin-top:30px}.spinner-with-text[_ngcontent-%COMP%] .text-wrapper[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{margin-bottom:10px;font-weight:600;font-size:18px}.spinner-with-text[_ngcontent-%COMP%] .text-wrapper[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{font-weight:500;font-size:14px}"]})}}return i})();function na(i){return new te(3e3,!1)}function Cc(){return new te(3100,!1)}function Ec(){return new te(3101,!1)}function Sc(i){return new te(3001,!1)}function Tc(i){return new te(3003,!1)}function xc(i){return new te(3004,!1)}function oa(i,r){return new te(3005,!1)}function sa(){return new te(3006,!1)}function aa(){return new te(3007,!1)}function la(i,r){return new te(3008,!1)}function ca(i){return new te(3002,!1)}function da(i,r,e,t,n){return new te(3010,!1)}function pa(){return new te(3011,!1)}function ma(){return new te(3012,!1)}function ua(){return new te(3200,!1)}function ha(){return new te(3202,!1)}function fa(){return new te(3013,!1)}function ga(i){return new te(3014,!1)}function _a(i){return new te(3015,!1)}function va(i){return new te(3016,!1)}function Ca(i,r){return new te(3404,!1)}function yc(i){return new te(3502,!1)}function Ea(i){return new te(3503,!1)}function Sa(){return new te(3300,!1)}function Ta(i){return new te(3504,!1)}function xa(i){return new te(3301,!1)}function ya(i,r){return new te(3302,!1)}function wa(i){return new te(3303,!1)}function ba(i,r){return new te(3400,!1)}function Ia(i){return new te(3401,!1)}function Pa(i){return new te(3402,!1)}function ka(i,r){return new te(3505,!1)}function Gt(i){switch(i.length){case 0:return new pi;case 1:return i[0];default:return new An(i)}}function kr(i,r,e=new Map,t=new Map){let n=[],o=[],l=-1,m=null;if(r.forEach(E=>{let y=E.get("offset"),M=y==l,N=M&&m||new Map;
vendor: 57,120 bytes, line 3
3E.forEach((U,j)=>{let O=j,q=U;if(j!=="offset")switch(O=i.normalizePropertyName(O,n),q){case Hi:q=e.get(j);break;case ot:q=t.get(j);break;default:q=i.normalizeStyleValue(j,O,q,n);break}N.set(O,q)}),M||o.push(N),m=N,l=y}),n.length)throw yc(n);return o}function Rn(i,r,e,t){switch(r){case"start":i.onStart(()=>t(e&&br(e,"start",i)));break;case"done":i.onDone(()=>t(e&&br(e,"done",i)));break;case"destroy":i.onDestroy(()=>t(e&&br(e,"destroy",i)));break}}function br(i,r,e){let t=e.totalTime,n=!!e.disabled,o=On(i.element,i.triggerName,i.fromState,i.toState,r||i.phaseName,t??i.totalTime,n),l=i._data;return l!=null&&(o._data=l),o}function On(i,r,e,t,n="",o=0,l){return{element:i,triggerName:r,fromState:e,toState:t,phaseName:n,totalTime:o,disabled:!!l}}function je(i,r,e){let t=i.get(r);return t||i.set(r,t=e),t}function Ar(i){let r=i.indexOf(":"),e=i.substring(1,r),t=i.slice(r+1);return[e,t]}var wc=typeof document>"u"?null:document.documentElement;function Dn(i){let r=i.parentNode||i.host||null;return r===wc?null:r}function bc(i){return i.substring(1,6)=="ebkit"}var ui=null,ra=!1;function Aa(i){ui||(ui=Ic()||{},ra=ui.style?"WebkitAppearance"in ui.style:!1);let r=!0;return ui.style&&!bc(i)&&(r=i in ui.style,!r&&ra&&(r="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in ui.style)),r}function Ic(){return typeof document<"u"?document.body:null}function Mr(i,r){for(;r;){if(r===i)return!0;r=Dn(r)}return!1}function Nr(i,r,e){if(e)return Array.from(i.querySelectorAll(r));let t=i.querySelector(r);return t?[t]:[]}var Pc=1e3,Rr="{{",kc="}}",Or="ng-enter",Bn="ng-leave",qi="ng-trigger",Ki=".ng-trigger",Dr="ng-animating",Ln=".ng-animating";function Rt(i){if(typeof i=="number")return i;let r=i.match(/^(-?[\.\d]+)(m?s)/);return!r||r.length<2?0:Ir(parseFloat(r[1]),r[2])}function Ir(i,r){switch(r){case"s":return i*Pc;default:return i}}function $i(i,r,e){return i.hasOwnProperty("duration")?i:Mc(i,r,e)}var Ac=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;function Mc(i,r,e){let t,n=0,o="";if(typeof i=="string"){let l=i.match(Ac);if(l===null)return r.push(na(i)),{duration:0,delay:0,easing:""};t=Ir(parseFloat(l[1]),l[2]);let m=l[3];m!=null&&(n=Ir(parseFloat(m),l[4]));let E=l[5];E&&(o=E)}else t=i;if(!e){let l=!1,m=r.length;t<0&&(r.push(Cc()),l=!0),n<0&&(r.push(Ec()),l=!0),l&&r.splice(m,0,na(i))}return{duration:t,delay:n,easing:o}}function Ma(i){return i.length?i[0]instanceof Map?i:i.map(r=>new Map(Object.entries(r))):[]}function at(i,r,e){r.forEach((t,n)=>{let o=Fn(n);e&&!e.has(n)&&e.set(n,i.style[o]),i.style[o]=t})}function ti(i,r){r.forEach((e,t)=>{let n=Fn(t);i.style[n]=""})}function Mi(i){return Array.isArray(i)?i.length==1?i[0]:ws(i):i}function Na(i,r,e){let t=r.params||{},n=Br(i);n.length&&n.forEach(o=>{t.hasOwnProperty(o)||e.push(Sc(o))})}var Pr=new RegExp(`${Rr}\\s*(.+?)\\s*${kc}`,"g");function Br(i){let r=[];if(typeof i=="string"){let e;for(;e=Pr.exec(i);)r.push(e[1]);Pr.lastIndex=0}return r}function Ni(i,r,e){let t=`${i}`,n=t.replace(Pr,(o,l)=>{let m=r[l];return m==null&&(e.push(Tc(l)),m=""),m.toString()});return n==t?i:n}var Nc=/-+([a-z0-9])/g;function Fn(i){return i.replace(Nc,(...r)=>r[1].toUpperCase())}function Ra(i,r){return i===0||r===0}function Oa(i,r,e){if(e.size&&r.length){let t=r[0],n=[];if(e.forEach((o,l)=>{t.has(l)||n.push(l),t.set(l,o)}),n.length)for(let o=1;o<r.length;o++){let l=r[o];n.forEach(m=>l.set(m,Vn(i,m)))}}return r}function He(i,r,e){switch(r.type){case Q.Trigger:return i.visitTrigger(r,e);case Q.State:return i.visitState(r,e);case Q.Transition:return i.visitTransition(r,e);case Q.Sequence:return i.visitSequence(r,e);case Q.Group:return i.visitGroup(r,e);case Q.Animate:return i.visitAnimate(r,e);case Q.Keyframes:return i.visitKeyframes(r,e);case Q.Style:return i.visitStyle(r,e);case Q.Reference:return i.visitReference(r,e);case Q.AnimateChild:return i.visitAnimateChild(r,e);case Q.AnimateRef:return i.visitAnimateRef(r,e);case Q.Query:return i.visitQuery(r,e);case Q.Stagger:return i.visitStagger(r,e);default:throw xc(r.type)}}function Vn(i,r){return window.getComputedStyle(i)[r]}var Jr=(()=>{class i{validateStyleProperty(e){return Aa(e)}containsElement(e,t){return Mr(e,t)}getParentElement(e){return Dn(e)}query(e,t,n){return Nr(e,t,n)}computeStyle(e,t,n){return n||""}animate(e,t,n,o,l,m=[],E){return new pi(n,o)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=le({token:i,factory:i.\u0275fac})}return i})(),fi=class{static NOOP=new Jr},gi=class{};var Rc=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),Hn=class extends gi{normalizePropertyName(r,e){return Fn(r)}normalizeStyleValue(r,e,t,n){let o="",l=t.toString().trim();if(Rc.has(e)&&t!==0&&t!=="0")if(typeof t=="number")o="px";else{let m=t.match(/^[+-]?[\d\.]+([a-z]*)$/);m&&m[1].length==0&&n.push(oa(r,t))}return l+o}};var qn="*";function Oc(i,r){let e=[];return typeof i=="string"?i.split(/\s*,\s*/).forEach(t=>Dc(t,e,r)):e.push(i),e}function Dc(i,r,e){if(i[0]==":"){let E=Bc(i,e);if(typeof E=="function"){r.push(E);return}i=E}let t=i.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(t==null||t.length<4)return e.push(_a(i)),r;let n=t[1],o=t[2],l=t[3];r.push(Da(n,l));let m=n==qn&&l==qn;o[0]=="<"&&!m&&r.push(Da(l,n))}function Bc(i,r){switch(i){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,t)=>parseFloat(t)>parseFloat(e);case":decrement":return(e,t)=>parseFloat(t)<parseFloat(e);default:return r.push(va(i)),"* => *"}}var Gn=new Set(["true","1"]),Un=new Set(["false","0"]);function Da(i,r){let e=Gn.has(i)||Un.has(i),t=Gn.has(r)||Un.has(r);return(n,o)=>{let l=i==qn||i==n,m=r==qn||r==o;return!l&&e&&typeof n=="boolean"&&(l=n?Gn.has(i):Un.has(i)),!m&&t&&typeof o=="boolean"&&(m=o?Gn.has(r):Un.has(r)),l&&m}}var qa=":self",Lc=new RegExp(`s*${qa}s*,?`,"g");function Ka(i,r,e,t){return new zr(i).build(r,e,t)}var Ba="",zr=class{_driver;constructor(r){this._driver=r}build(r,e,t){let n=new jr(e);return this._resetContextStyleTimingState(n),He(this,Mi(r),n)}_resetContextStyleTimingState(r){r.currentQuerySelector=Ba,r.collectedStyles=new Map,r.collectedStyles.set(Ba,new Map),r.currentTime=0}visitTrigger(r,e){let t=e.queryCount=0,n=e.depCount=0,o=[],l=[];return r.name.charAt(0)=="@"&&e.errors.push(sa()),r.definitions.forEach(m=>{if(this._resetContextStyleTimingState(e),m.type==Q.State){let E=m,y=E.name;y.toString().split(/\s*,\s*/).forEach(M=>{E.name=M,o.push(this.visitState(E,e))}),E.name=y}else if(m.type==Q.Transition){let E=this.visitTransition(m,e);t+=E.queryCount,n+=E.depCount,l.push(E)}else e.errors.push(aa())}),{type:Q.Trigger,name:r.name,states:o,transitions:l,queryCount:t,depCount:n,options:null}}visitState(r,e){let t=this.visitStyle(r.styles,e),n=r.options&&r.options.params||null;if(t.containsDynamicStyles){let o=new Set,l=n||{};t.styles.forEach(m=>{m instanceof Map&&m.forEach(E=>{Br(E).forEach(y=>{l.hasOwnProperty(y)||o.add(y)})})}),o.size&&e.errors.push(la(r.name,[...o.values()]))}return{type:Q.State,name:r.name,style:t,options:n?{params:n}:null}}visitTransition(r,e){e.queryCount=0,e.depCount=0;let t=He(this,Mi(r.animation),e),n=Oc(r.expr,e.errors);return{type:Q.Transition,matchers:n,animation:t,queryCount:e.queryCount,depCount:e.depCount,options:hi(r.options)}}visitSequence(r,e){return{type:Q.Sequence,steps:r.steps.map(t=>He(this,t,e)),options:hi(r.options)}}visitGroup(r,e){let t=e.currentTime,n=0,o=r.steps.map(l=>{e.currentTime=t;let m=He(this,l,e);return n=Math.max(n,e.currentTime),m});return e.currentTime=n,{type:Q.Group,steps:o,options:hi(r.options)}}visitAnimate(r,e){let t=Uc(r.timings,e.errors);e.currentAnimateTimings=t;let n,o=r.styles?r.styles:wr({});if(o.type==Q.Keyframes)n=this.visitKeyframes(o,e);else{let l=r.styles,m=!1;if(!l){m=!0;let y={};t.easing&&(y.easing=t.easing),l=wr(y)}e.currentTime+=t.duration+t.delay;let E=this.visitStyle(l,e);E.isEmptyStep=m,n=E}return e.currentAnimateTimings=null,{type:Q.Animate,timings:t,style:n,options:null}}visitStyle(r,e){let t=this._makeStyleAst(r,e);return this._validateStyleAst(t,e),t}_makeStyleAst(r,e){let t=[],n=Array.isArray(r.styles)?r.styles:[r.styles];for(let m of n)typeof m=="string"?m===ot?t.push(m):e.errors.push(ca(m)):t.push(new Map(Object.entries(m)));let o=!1,l=null;return t.forEach(m=>{if(m instanceof Map&&(m.has("easing")&&(l=m.get("easing"),m.delete("easing")),!o)){for(let E of m.values())if(E.toString().indexOf(Rr)>=0){o=!0;break}}}),{type:Q.Style,styles:t,easing:l,offset:r.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(r,e){let t=e.currentAnimateTimings,n=e.currentTime,o=e.currentTime;t&&o>0&&(o-=t.duration+t.delay),r.styles.forEach(l=>{typeof l!="string"&&l.forEach((m,E)=>{let y=e.collectedStyles.get(e.currentQuerySelector),M=y.get(E),N=!0;M&&(o!=n&&o>=M.startTime&&n<=M.endTime&&(e.errors.push(da(E,M.startTime,M.endTime,o,n)),N=!1),o=M.startTime),N&&y.set(E,{startTime:o,endTime:n}),e.options&&Na(m,e.options,e.errors)})})}visitKeyframes(r,e){let t={type:Q.Keyframes,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(pa()),t;let n=1,o=0,l=[],m=!1,E=!1,y=0,M=r.steps.map(ee=>{let ve=this._makeStyleAst(ee,e),ye=ve.offset!=null?ve.offset:Gc(ve.styles),Te=0;return ye!=null&&(o++,Te=ve.offset=ye),E=E||Te<0||Te>1,m=m||Te<y,y=Te,l.push(Te),ve});E&&e.errors.push(ma()),m&&e.errors.push(ua());let N=r.steps.length,U=0;o>0&&o<N?e.errors.push(ha()):o==0&&(U=n/(N-1));let j=N-1,O=e.currentTime,q=e.currentAnimateTimings,ae=q.duration;return M.forEach((ee,ve)=>{let ye=U>0?ve==j?1:U*ve:l[ve],Te=ye*ae;e.currentTime=O+q.delay+Te,q.duration=Te,this._validateStyleAst(ee,e),ee.offset=ye,t.styles.push(ee)}),t}visitReference(r,e){return{type:Q.Reference,animation:He(this,Mi(r.animation),e),options:hi(r.options)}}visitAnimateChild(r,e){return e.depCount++,{type:Q.AnimateChild,options:hi(r.options)}}visitAnimateRef(r,e){return{type:Q.AnimateRef,animation:this.visitReference(r.animation,e),options:hi(r.options)}}visitQuery(r,e){let t=e.currentQuerySelector,n=r.options||{};e.queryCount++,e.currentQuery=r;let[o,l]=Fc(r.selector);e.currentQuerySelector=t.length?t+" "+o:o,je(e.collectedStyles,e.currentQuerySelector,new Map);let m=He(this,Mi(r.animation),e);return e.currentQuery=null,e.currentQuerySelector=t,{type:Q.Query,selector:o,limit:n.limit||0,optional:!!n.optional,includeSelf:l,animation:m,originalSelector:r.selector,options:hi(r.options)}}visitStagger(r,e){e.currentQuery||e.errors.push(fa());let t=r.timings==="full"?{duration:0,delay:0,easing:"full"}:$i(r.timings,e.errors,!0);return{type:Q.Stagger,animation:He(this,Mi(r.animation),e),timings:t,options:null}}};function Fc(i){let r=!!i.split(/\s*,\s*/).find(e=>e==qa);return r&&(i=i.replace(Lc,"")),i=i.replace(/@\*/g,Ki).replace(/@\w+/g,e=>Ki+"-"+e.slice(1)).replace(/:animating/g,Ln),[i,r]}function Vc(i){return i?Ei({},i):null}var jr=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(r){this.errors=r}};function Gc(i){if(typeof i=="string")return null;let r=null;if(Array.isArray(i))i.forEach(e=>{if(e instanceof Map&&e.has("offset")){let t=e;r=parseFloat(t.get("offset")),t.delete("offset")}});else if(i instanceof Map&&i.has("offset")){let e=i;r=parseFloat(e.get("offset")),e.delete("offset")}return r}function Uc(i,r){if(i.hasOwnProperty("duration"))return i;if(typeof i=="number"){let o=$i(i,r).duration;return Lr(o,0,"")}let e=i;if(e.split(/\s+/).some(o=>o.charAt(0)=="{"&&o.charAt(1)=="{")){let o=Lr(0,0,"");return o.dynamic=!0,o.strValue=e,o}let n=$i(e,r);return Lr(n.duration,n.delay,n.easing)}function hi(i){return i?(i=Ei({},i),i.params&&(i.params=Vc(i.params))):i={},i}function Lr(i,r,e){return{duration:i,delay:r,easing:e}}function eo(i,r,e,t,n,o,l=null,m=!1){return{type:1,element:i,keyframes:r,preStyleProps:e,postStyleProps:t,duration:n,delay:o,totalTime:n+o,easing:l,subTimeline:m}}var Yi=class{_map=new Map;get(r){return this._map.get(r)||[]}append(r,e){let t=this._map.get(r);t||this._map.set(r,t=[]),t.push(...e)}has(r){return this._map.has(r)}clear(){this._map.clear()}},zc=1,jc=":enter",Hc=new RegExp(jc,"g"),qc=":leave",Kc=new RegExp(qc,"g");function $a(i,r,e,t,n,o=new Map,l=new Map,m,E,y=[]){return new Hr().buildKeyframes(i,r,e,t,n,o,l,m,E,y)}var Hr=class{buildKeyframes(r,e,t,n,o,l,m,E,y,M=[]){y=y||new Yi;let N=new qr(r,e,y,n,o,M,[]);N.options=E;let U=E.delay?Rt(E.delay):0;N.currentTimeline.delayNextStep(U),N.currentTimeline.setStyles([l],null,N.errors,E),He(this,t,N);let j=N.timelines.filter(O=>O.containsAnimation());if(j.length&&m.size){let O;for(let q=j.length-1;q>=0;q--){let ae=j[q];if(ae.element===e){O=ae;break}}O&&!O.allowOnlyTimelineStyles()&&O.setStyles([m],null,N.errors,E)}return j.length?j.map(O=>O.buildKeyframes()):[eo(e,[],[],[],0,U,"",!1)]}visitTrigger(r,e){}visitState(r,e){}visitTransition(r,e){}visitAnimateChild(r,e){let t=e.subInstructions.get(e.element);if(t){let n=e.createSubContext(r.options),o=e.currentTimeline.currentTime,l=this._visitSubInstructions(t,n,n.options);o!=l&&e.transformIntoNewTimeline(l)}e.previousNode=r}visitAnimateRef(r,e){let t=e.createSubContext(r.options);t.transformIntoNewTimeline(),this._applyAnimationRefDelays([r.options,r.animation.options],e,t),this.visitReference(r.animation,t),e.transformIntoNewTimeline(t.currentTimeline.currentTime),e.previousNode=r}_applyAnimationRefDelays(r,e,t){for(let n of r){let o=n?.delay;if(o){let l=typeof o=="number"?o:Rt(Ni(o,n?.params??{},e.errors));t.delayNextStep(l)}}}_visitSubInstructions(r,e,t){let o=e.currentTimeline.currentTime,l=t.duration!=null?Rt(t.duration):null,m=t.delay!=null?Rt(t.delay):null;return l!==0&&r.forEach(E=>{let y=e.appendInstructionToTimeline(E,l,m);o=Math.max(o,y.duration+y.delay)}),o}visitReference(r,e){e.updateOptions(r.options,!0),He(this,r.animation,e),e.previousNode=r}visitSequence(r,e){let t=e.subContextCount,n=e,o=r.options;if(o&&(o.params||o.delay)&&(n=e.createSubContext(o),n.transformIntoNewTimeline(),o.delay!=null)){n.previousNode.type==Q.Style&&(n.currentTimeline.snapshotCurrentStyles(),n.previousNode=Kn);let l=Rt(o.delay);n.delayNextStep(l)}r.steps.length&&(r.steps.forEach(l=>He(this,l,n)),n.currentTimeline.applyStylesToKeyframe(),n.subContextCount>t&&n.transformIntoNewTimeline()),e.previousNode=r}visitGroup(r,e){let t=[],n=e.currentTimeline.currentTime,o=r.options&&r.options.delay?Rt(r.options.delay):0;r.steps.forEach(l=>{let m=e.createSubContext(r.options);o&&m.delayNextStep(o),He(this,l,m),n=Math.max(n,m.currentTimeline.currentTime),t.push(m.currentTimeline)}),t.forEach(l=>e.currentTimeline.mergeTimelineCollectedStyles(l)),e.transformIntoNewTimeline(n),e.previousNode=r}_visitTiming(r,e){if(r.dynamic){let t=r.strValue,n=e.params?Ni(t,e.params,e.errors):t;return $i(n,e.errors)}else return{duration:r.duration,delay:r.delay,easing:r.easing}}visitAnimate(r,e){let t=e.currentAnimateTimings=this._visitTiming(r.timings,e),n=e.currentTimeline;t.delay&&(e.incrementTime(t.delay),n.snapshotCurrentStyles());let o=r.style;o.type==Q.Keyframes?this.visitKeyframes(o,e):(e.incrementTime(t.duration),this.visitStyle(o,e),n.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=r}visitStyle(r,e){let t=e.currentTimeline,n=e.currentAnimateTimings;!n&&t.hasCurrentStyleProperties()&&t.forwardFrame();let o=n&&n.easing||r.easing;r.isEmptyStep?t.applyEmptyStep(o):t.setStyles(r.styles,o,e.errors,e.options),e.previousNode=r}visitKeyframes(r,e){let t=e.currentAnimateTimings,n=e.currentTimeline.duration,o=t.duration,m=e.createSubContext().currentTimeline;m.easing=t.easing,r.styles.forEach(E=>{let y=E.offset||0;m.forwardTime(y*o),m.setStyles(E.styles,E.easing,e.errors,e.options),m.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(m),e.transformIntoNewTimeline(n+o),e.previousNode=r}visitQuery(r,e){let t=e.currentTimeline.currentTime,n=r.options||{},o=n.delay?Rt(n.delay):0;o&&(e.previousNode.type===Q.Style||t==0&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Kn);let l=t,m=e.invokeQuery(r.selector,r.originalSelector,r.limit,r.includeSelf,!!n.optional,e.errors);e.currentQueryTotal=m.length;let E=null;m.forEach((y,M)=>{e.currentQueryIndex=M;let N=e.createSubContext(r.options,y);o&&N.delayNextStep(o),y===e.element&&(E=N.currentTimeline),He(this,r.animation,N),N.currentTimeline.applyStylesToKeyframe();let U=N.currentTimeline.currentTime;l=Math.max(l,U)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(l),E&&(e.currentTimeline.mergeTimelineCollectedStyles(E),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=r}visitStagger(r,e){let t=e.parentContext,n=e.currentTimeline,o=r.timings,l=Math.abs(o.duration),m=l*(e.currentQueryTotal-1),E=l*e.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":E=m-E;break;case"full":E=t.currentStaggerTime;break}let M=e.currentTimeline;E&&M.delayNextStep(E);let N=M.currentTime;He(this,r.animation,e),e.previousNode=r,t.currentStaggerTime=n.currentTime-N+(n.startTime-t.currentTimeline.startTime)}},Kn={},qr=class i{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=Kn;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(r,e,t,n,o,l,m,E){this._driver=r,this.element=e,this.subInstructions=t,this._enterClassName=n,this._leaveClassName=o,this.errors=l,this.timelines=m,this.currentTimeline=E||new $n(this._driver,e,0),m.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(r,e){if(!r)return;let t=r,n=this.options;t.duration!=null&&(n.duration=Rt(t.duration)),t.delay!=null&&(n.delay=Rt(t.delay));let o=t.params;if(o){let l=n.params;l||(l=this.options.params={}),Object.keys(o).forEach(m=>{(!e||!l.hasOwnProperty(m))&&(l[m]=Ni(o[m],l,this.errors))})}}_copyOptions(){let r={};if(this.options){let e=this.options.params;if(e){let t=r.params={};Object.keys(e).forEach(n=>{t[n]=e[n]})}}return r}createSubContext(r=null,e,t){let n=e||this.element,o=new i(this._driver,n,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(n,t||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(r),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(r){return this.previousNode=Kn,this.currentTimeline=this.currentTimeline.fork(this.element,r),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(r,e,t){let n={duration:e??r.duration,delay:this.currentTimeline.currentTime+(t??0)+r.delay,easing:""},o=new Kr(this._driver,r.element,r.keyframes,r.preStyleProps,r.postStyleProps,n,r.stretchStartingKeyframe);return this.timelines.push(o),n}incrementTime(r){this.currentTimeline.forwardTime(this.currentTimeline.duration+r)}delayNextStep(r){r>0&&this.currentTimeline.delayNextStep(r)}invokeQuery(r,e,t,n,o,l){let m=[];if(n&&m.push(this.element),r.length>0){r=r.replace(Hc,"."+this._enterClassName),r=r.replace(Kc,"."+this._leaveClassName);let E=t!=1,y=this._driver.query(this.element,r,E);t!==0&&(y=t<0?y.slice(y.length+t,y.length):y.slice(0,t)),m.push(...y)}return!o&&m.length==0&&l.push(ga(e)),m}},$n=class i{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(r,e,t,n){this._driver=r,this.element=e,this.startTime=t,this._elementTimelineStylesLookup=n,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(r){let e=this._keyframes.size===1&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+r),e&&this.snapshotCurrentStyles()):this.startTime+=r}fork(r,e){return this.applyStylesToKeyframe(),new i(this._driver,r,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=zc,this._loadKeyframe()}forwardTime(r){this.applyStylesToKeyframe(),this.duration=r,this._loadKeyframe()}_updateStyle(r,e){this._localTimelineStyles.set(r,e),this._globalTimelineStyles.set(r,e),this._styleSummary.set(r,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(r){r&&this._previousKeyframe.set("easing",r);for(let[e,t]of this._globalTimelineStyles)this._backFill.set(e,t||ot),this._currentKeyframe.set(e,ot);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(r,e,t,n){e&&this._previousKeyframe.set("easing",e);let o=n&&n.params||{},l=$c(r,this._globalTimelineStyles);for(let[m,E]of l){let y=Ni(E,o,t);this._pendingStyles.set(m,y),this._localTimelineStyles.has(m)||this._backFill.set(m,this._globalTimelineStyles.get(m)??ot),this._updateStyle(m,y)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((r,e)=>{this._currentKeyframe.set(e,r)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((r,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,r)}))}snapshotCurrentStyles(){for(let[r,e]of this._localTimelineStyles)this._pendingStyles.set(r,e),this._updateStyle(r,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let r=[];for(let e in this._currentKeyframe)r.push(e);return r}mergeTimelineCollectedStyles(r){r._styleSummary.forEach((e,t)=>{let n=this._styleSummary.get(t);(!n||e.time>n.time)&&this._updateStyle(t,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();let r=new Set,e=new Set,t=this._keyframes.size===1&&this.duration===0,n=[];this._keyframes.forEach((m,E)=>{let y=new Map([...this._backFill,...m]);y.forEach((M,N)=>{M===Hi?r.add(N):M===ot&&e.add(N)}),t||y.set("offset",E/this.duration),n.push(y)});let o=[...r.values()],l=[...e.values()];if(t){let m=n[0],E=new Map(m);m.set("offset",0),E.set("offset",1),n=[m,E]}return eo(this.element,n,o,l,this.duration,this.startTime,this.easing,!1)}},Kr=class extends $n{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(r,e,t,n,o,l,m=!1){super(r,e,l.delay),this.keyframes=t,this.preStyleProps=n,this.postStyleProps=o,this._stretchStartingKeyframe=m,this.timings={duration:l.duration,delay:l.delay,easing:l.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let r=this.keyframes,{delay:e,duration:t,easing:n}=this.timings;if(this._stretchStartingKeyframe&&e){let o=[],l=t+e,m=e/l,E=new Map(r[0]);E.set("offset",0),o.push(E);let y=new Map(r[0]);y.set("offset",La(m)),o.push(y);let M=r.length-1;for(let N=1;N<=M;N++){let U=new Map(r[N]),j=U.get("offset"),O=e+j*t;U.set("offset",La(O/l)),o.push(U)}t=l,e=0,n="",r=o}return eo(this.element,r,this.preStyleProps,this.postStyleProps,t,e,n,!0)}};function La(i,r=3){let e=Math.pow(10,r-1);return Math.round(i*e)/e}function $c(i,r){let e=new Map,t;return i.forEach(n=>{if(n==="*"){t??=r.keys();for(let o of t)e.set(o,ot)}else for(let[o,l]of n)e.set(o,l)}),e}function Fa(i,r,e,t,n,o,l,m,E,y,M,N,U){return{type:0,element:i,triggerName:r,isRemovalTransition:n,fromState:e,fromStyles:o,toState:t,toStyles:l,timelines:m,queriedElements:E,preStyleProps:y,postStyleProps:M,totalTime:N,errors:U}}var Fr={},Wn=class{_triggerName;ast;_stateStyles;constructor(r,e,t){this._triggerName=r,this.ast=e,this._stateStyles=t}match(r,e,t,n){return Wc(this.ast.matchers,r,e,t,n)}buildStyles(r,e,t){let n=this._stateStyles.get("*");return r!==void 0&&(n=this._stateStyles.get(r?.toString())||n),n?n.buildStyles(e,t):new Map}build(r,e,t,n,o,l,m,E,y,M){let N=[],U=this.ast.options&&this.ast.options.params||Fr,j=m&&m.params||Fr,O=this.buildStyles(t,j,N),q=E&&E.params||Fr,ae=this.buildStyles(n,q,N),ee=new Set,ve=new Map,ye=new Map,Te=n==="void",tt={params:Wa(q,U),delay:this.ast.options?.delay},De=M?[]:$a(r,e,this.ast.animation,o,l,O,ae,tt,y,N),we=0;return De.forEach(Ce=>{we=Math.max(Ce.duration+Ce.delay,we)}),N.length?Fa(e,this._triggerName,t,n,Te,O,ae,[],[],ve,ye,we,N):(De.forEach(Ce=>{let $e=Ce.element,qe=je(ve,$e,new Set);Ce.preStyleProps.forEach(ct=>qe.add(ct));let ni=je(ye,$e,new Set);Ce.postStyleProps.forEach(ct=>ni.add(ct)),$e!==e&&ee.add($e)}),Fa(e,this._triggerName,t,n,Te,O,ae,De,[...ee.values()],ve,ye,we))}};function Wc(i,r,e,t,n){return i.some(o=>o(r,e,t,n))}function Wa(i,r){let e=Ei({},r);return Object.entries(i).forEach(([t,n])=>{n!=null&&(e[t]=n)}),e}var $r=class{styles;defaultParams;normalizer;constructor(r,e,t){this.styles=r,this.defaultParams=e,this.normalizer=t}buildStyles(r,e){let t=new Map,n=Wa(r,this.defaultParams);return this.styles.styles.forEach(o=>{typeof o!="string"&&o.forEach((l,m)=>{l&&(l=Ni(l,n,e));let E=this.normalizer.normalizePropertyName(m,e);l=this.normalizer.normalizeStyleValue(m,E,l,e),t.set(m,l)})}),t}};function Yc(i,r,e){return new Wr(i,r,e)}var Wr=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(r,e,t){this.name=r,this.ast=e,this._normalizer=t,e.states.forEach(n=>{let o=n.options&&n.options.params||{};this.states.set(n.name,new $r(n.style,o,t))}),Va(this.states,"true","1"),Va(this.states,"false","0"),e.transitions.forEach(n=>{this.transitionFactories.push(new Wn(r,n,this.states))}),this.fallbackTransition=Qc(r,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(r,e,t,n){return this.transitionFactories.find(l=>l.match(r,e,t,n))||null}matchStyles(r,e,t){return this.fallbackTransition.buildStyles(r,e,t)}};function Qc(i,r,e){let t=[(l,m)=>!0],n={type:Q.Sequence,steps:[],options:null},o={type:Q.Transition,animation:n,matchers:t,options:null,queryCount:0,depCount:0};return new Wn(i,o,r)}function Va(i,r,e){i.has(r)?i.has(e)||i.set(e,i.get(r)):i.has(e)&&i.set(r,i.get(e))}var Xc=new Yi,Yr=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(r,e,t){this.bodyNode=r,this._driver=e,this._normalizer=t}register(r,e){let t=[],n=[],o=Ka(this._driver,e,t,n);if(t.length)throw Ea(t);this._animations.set(r,o)}_buildPlayer(r,e,t){let n=r.element,o=kr(this._normalizer,r.keyframes,e,t);return this._driver.animate(n,o,r.duration,r.delay,r.easing,[],!0)}create(r,e,t={}){let n=[],o=this._animations.get(r),l,m=new Map;if(o?(l=$a(this._driver,e,o,Or,Bn,new Map,new Map,t,Xc,n),l.forEach(M=>{let N=je(m,M.element,new Map);M.postStyleProps.forEach(U=>N.set(U,null))})):(n.push(Sa()),l=[]),n.length)throw Ta(n);m.forEach((M,N)=>{M.forEach((U,j)=>{M.set(j,this._driver.computeStyle(N,j,ot))})});let E=l.map(M=>{let N=m.get(M.element);return this._buildPlayer(M,new Map,N)}),y=Gt(E);return this._playersById.set(r,y),y.onDestroy(()=>this.destroy(r)),this.players.push(y),y}destroy(r){let e=this._getPlayer(r);e.destroy(),this._playersById.delete(r);let t=this.players.indexOf(e);t>=0&&this.players.splice(t,1)}_getPlayer(r){let e=this._playersById.get(r);if(!e)throw xa(r);return e}listen(r,e,t,n){let o=On(e,"","","");return Rn(this._getPlayer(r),t,o,n),()=>{}}command(r,e,t,n){if(t=="register"){this.register(r,n[0]);return}if(t=="create"){let l=n[0]||{};this.create(r,e,l);return}let o=this._getPlayer(r);switch(t){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(n[0]));break;case"destroy":this.destroy(r);break}}},Ga="ng-animate-queued",Zc=".ng-animate-queued",Vr="ng-animate-disabled",Jc=".ng-animate-disabled",ed="ng-star-inserted",td=".ng-star-inserted",id=[],Ya={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},nd={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},lt="__ng_removed",Qi=class{namespaceId;value;options;get params(){return this.options.params}constructor(r,e=""){this.namespaceId=e;let t=r&&r.hasOwnProperty("value"),n=t?r.value:r;if(this.value=od(n),t){let o=r,{value:l}=o,m=Po(o,["value"]);this.options=m}else this.options={};this.options.params||(this.options.params={})}absorbOptions(r){let e=r.params;if(e){let t=this.options.params;Object.keys(e).forEach(n=>{t[n]==null&&(t[n]=e[n])})}}},Wi="void",Gr=new Qi(Wi),Qr=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(r,e,t){this.id=r,this.hostElement=e,this._engine=t,this._hostClassName="ng-tns-"+r,et(e,this._hostClassName)}listen(r,e,t,n){if(!this._triggers.has(e))throw ya(t,e);if(t==null||t.length==0)throw wa(e);if(!sd(t))throw ba(t,e);let o=je(this._elementListeners,r,[]),l={name:e,phase:t,callback:n};o.push(l);let m=je(this._engine.statesByElement,r,new Map);return m.has(e)||(et(r,qi),et(r,qi+"-"+e),m.set(e,Gr)),()=>{this._engine.afterFlush(()=>{let E=o.indexOf(l);E>=0&&o.splice(E,1),this._triggers.has(e)||m.delete(e)})}}register(r,e){return this._triggers.has(r)?!1:(this._triggers.set(r,e),!0)}_getTrigger(r){let e=this._triggers.get(r);if(!e)throw Ia(r);return e}trigger(r,e,t,n=!0){let o=this._getTrigger(e),l=new Xi(this.id,e,r),m=this._engine.statesByElement.get(r);m||(et(r,qi),et(r,qi+"-"+e),this._engine.statesByElement.set(r,m=new Map));let E=m.get(e),y=new Qi(t,this.id);if(!(t&&t.hasOwnProperty("value"))&&E&&y.absorbOptions(E.options),m.set(e,y),E||(E=Gr),!(y.value===Wi)&&E.value===y.value){if(!cd(E.params,y.params)){let q=[],ae=o.matchStyles(E.value,E.params,q),ee=o.matchStyles(y.value,y.params,q);q.length?this._engine.reportError(q):this._engine.afterFlush(()=>{ti(r,ae),at(r,ee)})}return}let U=je(this._engine.playersByElement,r,[]);U.forEach(q=>{q.namespaceId==this.id&&q.triggerName==e&&q.queued&&q.destroy()});let j=o.matchTransition(E.value,y.value,r,y.params),O=!1;if(!j){if(!n)return;j=o.fallbackTransition,O=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:r,triggerName:e,transition:j,fromState:E,toState:y,player:l,isFallbackTransition:O}),O||(et(r,Ga),l.onStart(()=>{Ri(r,Ga)})),l.onDone(()=>{let q=this.players.indexOf(l);q>=0&&this.players.splice(q,1);let ae=this._engine.playersByElement.get(r);if(ae){let ee=ae.indexOf(l);ee>=0&&ae.splice(ee,1)}}),this.players.push(l),U.push(l),l}deregister(r){this._triggers.delete(r),this._engine.statesByElement.forEach(e=>e.delete(r)),this._elementListeners.forEach((e,t)=>{this._elementListeners.set(t,e.filter(n=>n.name!=r))})}clearElementCache(r){this._engine.statesByElement.delete(r),this._elementListeners.delete(r);let e=this._engine.playersByElement.get(r);e&&(e.forEach(t=>t.destroy()),this._engine.playersByElement.delete(r))}_signalRemovalForInnerTriggers(r,e){let t=this._engine.driver.query(r,Ki,!0);t.forEach(n=>{if(n[lt])return;let o=this._engine.fetchNamespacesByElement(n);o.size?o.forEach(l=>l.triggerLeaveAnimation(n,e,!1,!0)):this.clearElementCache(n)}),this._engine.afterFlushAnimationsDone(()=>t.forEach(n=>this.clearElementCache(n)))}triggerLeaveAnimation(r,e,t,n){let o=this._engine.statesByElement.get(r),l=new Map;if(o){let m=[];if(o.forEach((E,y)=>{if(l.set(y,E.value),this._triggers.has(y)){let M=this.trigger(r,y,Wi,n);M&&m.push(M)}}),m.length)return this._engine.markElementAsRemoved(this.id,r,!0,e,l),t&&Gt(m).onDone(()=>this._engine.processLeaveNode(r)),!0}return!1}prepareLeaveAnimationListeners(r){let e=this._elementListeners.get(r),t=this._engine.statesByElement.get(r);if(e&&t){let n=new Set;e.forEach(o=>{let l=o.name;if(n.has(l))return;n.add(l);let E=this._triggers.get(l).fallbackTransition,y=t.get(l)||Gr,M=new Qi(Wi),N=new Xi(this.id,l,r);this._engine.totalQueuedPlayers++,this._queue.push({element:r,triggerName:l,transition:E,fromState:y,toState:M,player:N,isFallbackTransition:!0})})}}removeNode(r,e){let t=this._engine;if(r.childElementCount&&this._signalRemovalForInnerTriggers(r,e),this.triggerLeaveAnimation(r,e,!0))return;let n=!1;if(t.totalAnimations){let o=t.players.length?t.playersByQueriedElement.get(r):[];if(o&&o.length)n=!0;else{let l=r;for(;l=l.parentNode;)if(t.statesByElement.get(l)){n=!0;break}}}if(this.prepareLeaveAnimationListeners(r),n)t.markElementAsRemoved(this.id,r,!1,e);else{let o=r[lt];(!o||o===Ya)&&(t.afterFlush(()=>this.clearElementCache(r)),t.destroyInnerAnimations(r),t._onRemovalComplete(r,e))}}insertNode(r,e){et(r,this._hostClassName)}drainQueuedTransitions(r){let e=[];return this._queue.forEach(t=>{let n=t.player;if(n.destroyed)return;let o=t.element,l=this._elementListeners.get(o);l&&l.forEach(m=>{if(m.name==t.triggerName){let E=On(o,t.triggerName,t.fromState.value,t.toState.value);E._data=r,Rn(t.player,m.phase,E,m.callback)}}),n.markedForDestroy?this._engine.afterFlush(()=>{n.destroy()}):e.push(t)}),this._queue=[],e.sort((t,n)=>{let o=t.transition.ast.depCount,l=n.transition.ast.depCount;return o==0||l==0?o-l:this._engine.driver.containsElement(t.element,n.element)?1:-1})}destroy(r){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,r)}},Xr=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(r,e)=>{};_onRemovalComplete(r,e){this.onRemovalComplete(r,e)}constructor(r,e,t){this.bodyNode=r,this.driver=e,this._normalizer=t}get queuedPlayers(){let r=[];return this._namespaceList.forEach(e=>{e.players.forEach(t=>{t.queued&&r.push(t)})}),r}createNamespace(r,e){let t=new Qr(r,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(t,e):(this.newHostElements.set(e,t),this.collectEnterElement(e)),this._namespaceLookup[r]=t}_balanceNamespaceList(r,e){let t=this._namespaceList,n=this.namespacesByHostElement;if(t.length-1>=0){let l=!1,m=this.driver.getParentElement(e);for(;m;){let E=n.get(m);if(E){let y=t.indexOf(E);t.splice(y+1,0,r),l=!0;break}m=this.driver.getParentElement(m)}l||t.unshift(r)}else t.push(r);return n.set(e,r),r}register(r,e){let t=this._namespaceLookup[r];return t||(t=this.createNamespace(r,e)),t}registerTrigger(r,e,t){let n=this._namespaceLookup[r];n&&n.register(e,t)&&this.totalAnimations++}destroy(r,e){r&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let t=this._fetchNamespace(r);this.namespacesByHostElement.delete(t.hostElement);let n=this._namespaceList.indexOf(t);n>=0&&this._namespaceList.splice(n,1),t.destroy(e),delete this._namespaceLookup[r]}))}_fetchNamespace(r){return this._namespaceLookup[r]}fetchNamespacesByElement(r){let e=new Set,t=this.statesByElement.get(r);if(t){for(let n of t.values())if(n.namespaceId){let o=this._fetchNamespace(n.namespaceId);o&&e.add(o)}}return e}trigger(r,e,t,n){if(zn(e)){let o=this._fetchNamespace(r);if(o)return o.trigger(e,t,n),!0}return!1}insertNode(r,e,t,n){if(!zn(e))return;let o=e[lt];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;let l=this.collectedLeaveElements.indexOf(e);l>=0&&this.collectedLeaveElements.splice(l,1)}if(r){let l=this._fetchNamespace(r);l&&l.insertNode(e,t)}n&&this.collectEnterElement(e)}collectEnterElement(r){this.collectedEnterElements.push(r)}markElementAsDisabled(r,e){e?this.disabledNodes.has(r)||(this.disabledNodes.add(r),et(r,Vr)):this.disabledNodes.has(r)&&(this.disabledNodes.delete(r),Ri(r,Vr))}removeNode(r,e,t){if(zn(e)){let n=r?this._fetchNamespace(r):null;n?n.removeNode(e,t):this.markElementAsRemoved(r,e,!1,t);let o=this.namespacesByHostElement.get(e);o&&o.id!==r&&o.removeNode(e,t)}else this._onRemovalComplete(e,t)}markElementAsRemoved(r,e,t,n,o){this.collectedLeaveElements.push(e),e[lt]={namespaceId:r,setForRemoval:n,hasAnimation:t,removedBeforeQueried:!1,previousTriggersValues:o}}listen(r,e,t,n,o){return zn(e)?this._fetchNamespace(r).listen(e,t,n,o):()=>{}}_buildInstruction(r,e,t,n,o){return r.transition.build(this.driver,r.element,r.fromState.value,r.toState.value,t,n,r.fromState.options,r.toState.options,e,o)}destroyInnerAnimations(r){let e=this.driver.query(r,Ki,!0);e.forEach(t=>this.destroyActiveAnimationsForElement(t)),this.playersByQueriedElement.size!=0&&(e=this.driver.query(r,Ln,!0),e.forEach(t=>this.finishActiveQueriedAnimationOnElement(t)))}destroyActiveAnimationsForElement(r){let e=this.playersByElement.get(r);e&&e.forEach(t=>{t.queued?t.markedForDestroy=!0:t.destroy()})}finishActiveQueriedAnimationOnElement(r){let e=this.playersByQueriedElement.get(r);e&&e.forEach(t=>t.finish())}whenRenderingDone(){return new Promise(r=>{if(this.players.length)return Gt(this.players).onDone(()=>r());r()})}processLeaveNode(r){let e=r[lt];if(e&&e.setForRemoval){if(r[lt]=Ya,e.namespaceId){this.destroyInnerAnimations(r);let t=this._fetchNamespace(e.namespaceId);t&&t.clearElementCache(r)}this._onRemovalComplete(r,e.setForRemoval)}r.classList?.contains(Vr)&&this.markElementAsDisabled(r,!1),this.driver.query(r,Jc,!0).forEach(t=>{this.markElementAsDisabled(t,!1)})}flush(r=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((t,n)=>this._balanceNamespaceList(t,n)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let t=0;t<this.collectedEnterElements.length;t++){let n=this.collectedEnterElements[t];et(n,ed)}if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){let t=[];try{e=this._flushAnimations(t,r)}finally{for(let n=0;n<t.length;n++)t[n]()}}else for(let t=0;t<this.collectedLeaveElements.length;t++){let n=this.collectedLeaveElements[t];this.processLeaveNode(n)}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(t=>t()),this._flushFns=[],this._whenQuietFns.length){let t=this._whenQuietFns;this._whenQuietFns=[],e.length?Gt(e).onDone(()=>{t.forEach(n=>n())}):t.forEach(n=>n())}}reportError(r){throw Pa(r)}_flushAnimations(r,e){let t=new Yi,n=[],o=new Map,l=[],m=new Map,E=new Map,y=new Map,M=new Set;this.disabledNodes.forEach(F=>{M.add(F);let z=this.driver.query(F,Zc,!0);for(let H=0;H<z.length;H++)M.add(z[H])});let N=this.bodyNode,U=Array.from(this.statesByElement.keys()),j=ja(U,this.collectedEnterElements),O=new Map,q=0;j.forEach((F,z)=>{let H=Or+q++;O.set(z,H),F.forEach(X=>et(X,H))});let ae=[],ee=new Set,ve=new Set;for(let F=0;F<this.collectedLeaveElements.length;F++){let z=this.collectedLeaveElements[F],H=z[lt];H&&H.setForRemoval&&(ae.push(z),ee.add(z),H.hasAnimation?this.driver.query(z,td,!0).forEach(X=>ee.add(X)):ve.add(z))}let ye=new Map,Te=ja(U,Array.from(ee));Te.forEach((F,z)=>{let H=Bn+q++;ye.set(z,H),F.forEach(X=>et(X,H))}),r.push(()=>{j.forEach((F,z)=>{let H=O.get(z);F.forEach(X=>Ri(X,H))}),Te.forEach((F,z)=>{let H=ye.get(z);F.forEach(X=>Ri(X,H))}),ae.forEach(F=>{this.processLeaveNode(F)})});let tt=[],De=[];for(let F=this._namespaceList.length-1;F>=0;F--)this._namespaceList[F].drainQueuedTransitions(e).forEach(H=>{let X=H.player,xe=H.element;if(tt.push(X),this.collectedEnterElements.length){let he=xe[lt];if(he&&he.setForMove){if(he.previousTriggersValues&&he.previousTriggersValues.has(H.triggerName)){let re=he.previousTriggersValues.get(H.triggerName),oe=this.statesByElement.get(H.element);if(oe&&oe.has(H.triggerName)){let Ot=oe.get(H.triggerName);Ot.value=re,oe.set(H.triggerName,Ot)}}X.destroy();return}}let Me=!N||!this.driver.containsElement(N,xe),Be=ye.get(xe),We=O.get(xe),me=this._buildInstruction(H,t,We,Be,Me);if(me.errors&&me.errors.length){De.push(me);return}if(Me){X.onStart(()=>ti(xe,me.fromStyles)),X.onDestroy(()=>at(xe,me.toStyles)),n.push(X);return}if(H.isFallbackTransition){X.onStart(()=>ti(xe,me.fromStyles)),X.onDestroy(()=>at(xe,me.toStyles)),n.push(X);return}let nn=[];me.timelines.forEach(he=>{he.stretchStartingKeyframe=!0,this.disabledNodes.has(he.element)||nn.push(he)}),me.timelines=nn,t.append(xe,me.timelines);let ke={instruction:me,player:X,element:xe};l.push(ke),me.queriedElements.forEach(he=>je(m,he,[]).push(X)),me.preStyleProps.forEach((he,re)=>{if(he.size){let oe=E.get(re);oe||E.set(re,oe=new Set),he.forEach((Ot,Dt)=>oe.add(Dt))}}),me.postStyleProps.forEach((he,re)=>{let oe=y.get(re);oe||y.set(re,oe=new Set),he.forEach((Ot,Dt)=>oe.add(Dt))})});if(De.length){let F=[];De.forEach(z=>{F.push(ka(z.triggerName,z.errors))}),tt.forEach(z=>z.destroy()),this.reportError(F)}let we=new Map,Ce=new Map;l.forEach(F=>{let z=F.element;t.has(z)&&(Ce.set(z,z),this._beforeAnimationBuild(F.player.namespaceId,F.instruction,we))}),n.forEach(F=>{let z=F.element;this._getPreviousPlayers(z,!1,F.namespaceId,F.triggerName,null).forEach(X=>{je(we,z,[]).push(X),X.destroy()})});let $e=ae.filter(F=>Ha(F,E,y)),qe=new Map;za(qe,this.driver,ve,y,ot).forEach(F=>{Ha(F,E,y)&&$e.push(F)});let ct=new Map;j.forEach((F,z)=>{za(ct,this.driver,new Set(F),E,Hi)}),$e.forEach(F=>{let z=qe.get(F),H=ct.get(F);qe.set(F,new Map([...z?.entries()??[],...H?.entries()??[]]))});let jt=[],en=[],tn={};l.forEach(F=>{let{element:z,player:H,instruction:X}=F;if(t.has(z)){if(M.has(z)){H.onDestroy(()=>at(z,X.toStyles)),H.disabled=!0,H.overrideTotalTime(X.totalTime),n.push(H);return}let xe=tn;if(Ce.size>1){let Be=z,We=[];for(;Be=Be.parentNode;){let me=Ce.get(Be);if(me){xe=me;break}We.push(Be)}We.forEach(me=>Ce.set(me,xe))}let Me=this._buildAnimation(H.namespaceId,X,we,o,ct,qe);if(H.setRealPlayer(Me),xe===tn)jt.push(H);else{let Be=this.playersByElement.get(xe);Be&&Be.length&&(H.parentPlayer=Gt(Be)),n.push(H)}}else ti(z,X.fromStyles),H.onDestroy(()=>at(z,X.toStyles)),en.push(H),M.has(z)&&n.push(H)}),en.forEach(F=>{let z=o.get(F.element);if(z&&z.length){let H=Gt(z);F.setRealPlayer(H)}}),n.forEach(F=>{F.parentPlayer?F.syncPlayerEvents(F.parentPlayer):F.destroy()});for(let F=0;F<ae.length;F++){let z=ae[F],H=z[lt];if(Ri(z,Bn),H&&H.hasAnimation)continue;let X=[];if(m.size){let Me=m.get(z);Me&&Me.length&&X.push(...Me);let Be=this.driver.query(z,Ln,!0);for(let We=0;We<Be.length;We++){let me=m.get(Be[We]);me&&me.length&&X.push(...me)}}let xe=X.filter(Me=>!Me.destroyed);xe.length?ad(this,z,xe):this.processLeaveNode(z)}return ae.length=0,jt.forEach(F=>{this.players.push(F),F.onDone(()=>{F.destroy();let z=this.players.indexOf(F);this.players.splice(z,1)}),F.play()}),jt}afterFlush(r){this._flushFns.push(r)}afterFlushAnimationsDone(r){this._whenQuietFns.push(r)}_getPreviousPlayers(r,e,t,n,o){let l=[];if(e){let m=this.playersByQueriedElement.get(r);m&&(l=m)}else{let m=this.playersByElement.get(r);if(m){let E=!o||o==Wi;m.forEach(y=>{y.queued||!E&&y.triggerName!=n||l.push(y)})}}return(t||n)&&(l=l.filter(m=>!(t&&t!=m.namespaceId||n&&n!=m.triggerName))),l}_beforeAnimationBuild(r,e,t){let n=e.triggerName,o=e.element,l=e.isRemovalTransition?void 0:r,m=e.isRemovalTransition?void 0:n;for(let E of e.timelines){let y=E.element,M=y!==o,N=je(t,y,[]);this._getPreviousPlayers(y,M,l,m,e.toState).forEach(j=>{let O=j.getRealPlayer();O.beforeDestroy&&O.beforeDestroy(),j.destroy(),N.push(j)})}ti(o,e.fromStyles)}_buildAnimation(r,e,t,n,o,l){let m=e.triggerName,E=e.element,y=[],M=new Set,N=new Set,U=e.timelines.map(O=>{let q=O.element;M.add(q);let ae=q[lt];if(ae&&ae.removedBeforeQueried)return new pi(O.duration,O.delay);let ee=q!==E,ve=ld((t.get(q)||id).map(we=>we.getRealPlayer())).filter(we=>{let Ce=we;return Ce.element?Ce.element===q:!1}),ye=o.get(q),Te=l.get(q),tt=kr(this._normalizer,O.keyframes,ye,Te),De=this._buildPlayer(O,tt,ve);if(O.subTimeline&&n&&N.add(q),ee){let we=new Xi(r,m,q);we.setRealPlayer(De),y.push(we)}return De});y.forEach(O=>{je(this.playersByQueriedElement,O.element,[]).push(O),O.onDone(()=>rd(this.playersByQueriedElement,O.element,O))}),M.forEach(O=>et(O,Dr));let j=Gt(U);return j.onDestroy(()=>{M.forEach(O=>Ri(O,Dr)),at(E,e.toStyles)}),N.forEach(O=>{je(n,O,[]).push(j)}),j}_buildPlayer(r,e,t){return e.length>0?this.driver.animate(r.element,e,r.duration,r.delay,r.easing,t):new pi(r.duration,r.delay)}},Xi=class{namespaceId;triggerName;element;_player=new pi;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(r,e,t){this.namespaceId=r,this.triggerName=e,this.element=t}setRealPlayer(r){this._containsRealPlayer||(this._player=r,this._queuedCallbacks.forEach((e,t)=>{e.forEach(n=>Rn(r,t,void 0,n))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(r.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(r){this.totalTime=r}syncPlayerEvents(r){let e=this._player;e.triggerCallback&&r.onStart(()=>e.triggerCallback("start")),r.onDone(()=>this.finish()),r.onDestroy(()=>this.destroy())}_queueEvent(r,e){je(this._queuedCallbacks,r,[]).push(e)}onDone(r){this.queued&&this._queueEvent("done",r),this._player.onDone(r)}onStart(r){this.queued&&this._queueEvent("start",r),this._player.onStart(r)}onDestroy(r){this.queued&&this._queueEvent("destroy",r),this._player.onDestroy(r)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(r){this.queued||this._player.setPosition(r)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(r){let e=this._player;e.triggerCallback&&e.triggerCallback(r)}};function rd(i,r,e){let t=i.get(r);if(t){if(t.length){let n=t.indexOf(e);t.splice(n,1)}t.length==0&&i.delete(r)}return t}function od(i){return i??null}function zn(i){return i&&i.nodeType===1}function sd(i){return i=="start"||i=="done"}function Ua(i,r){let e=i.style.display;return i.style.display=r??"none",e}function za(i,r,e,t,n){let o=[];e.forEach(E=>o.push(Ua(E)));let l=[];t.forEach((E,y)=>{let M=new Map;E.forEach(N=>{let U=r.computeStyle(y,N,n);M.set(N,U),(!U||U.length==0)&&(y[lt]=nd,l.push(y))}),i.set(y,M)});let m=0;return e.forEach(E=>Ua(E,o[m++])),l}function ja(i,r){let e=new Map;if(i.forEach(m=>e.set(m,[])),r.length==0)return e;let t=1,n=new Set(r),o=new Map;function l(m){if(!m)return t;let E=o.get(m);if(E)return E;let y=m.parentNode;return e.has(y)?E=y:n.has(y)?E=t:E=l(y),o.set(m,E),E}return r.forEach(m=>{let E=l(m);E!==t&&e.get(E).push(m)}),e}function et(i,r){i.classList?.add(r)}function Ri(i,r){i.classList?.remove(r)}function ad(i,r,e){Gt(e).onDone(()=>i.processLeaveNode(r))}function ld(i){let r=[];return Qa(i,r),r}function Qa(i,r){for(let e=0;e<i.length;e++){let t=i[e];t instanceof An?Qa(t.players,r):r.push(t)}}function cd(i,r){let e=Object.keys(i),t=Object.keys(r);if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let o=e[n];if(!r.hasOwnProperty(o)||i[o]!==r[o])return!1}return!0}function Ha(i,r,e){let t=e.get(i);if(!t)return!1;let n=r.get(i);return n?t.forEach(o=>n.add(o)):r.set(i,t),e.delete(i),!0}var Oi=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(r,e)=>{};constructor(r,e,t){this._driver=e,this._normalizer=t,this._transitionEngine=new Xr(r.body,e,t),this._timelineEngine=new Yr(r.body,e,t),this._transitionEngine.onRemovalComplete=(n,o)=>this.onRemovalComplete(n,o)}registerTrigger(r,e,t,n,o){let l=r+"-"+n,m=this._triggerCache[l];if(!m){let E=[],y=[],M=Ka(this._driver,o,E,y);if(E.length)throw Ca(n,E);m=Yc(n,M,this._normalizer),this._triggerCache[l]=m}this._transitionEngine.registerTrigger(e,n,m)}register(r,e){this._transitionEngine.register(r,e)}destroy(r,e){this._transitionEngine.destroy(r,e)}onInsert(r,e,t,n){this._transitionEngine.insertNode(r,e,t,n)}onRemove(r,e,t){this._transitionEngine.removeNode(r,e,t)}disableAnimations(r,e){this._transitionEngine.markElementAsDisabled(r,e)}process(r,e,t,n){if(t.charAt(0)=="@"){let[o,l]=Ar(t),m=n;this._timelineEngine.command(o,e,l,m)}else this._transitionEngine.trigger(r,e,t,n)}listen(r,e,t,n,o){if(t.charAt(0)=="@"){let[l,m]=Ar(t);return this._timelineEngine.listen(l,e,m,o)}return this._transitionEngine.listen(r,e,t,n,o)}flush(r=-1){this._transitionEngine.flush(r)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(r){this._transitionEngine.afterFlushAnimationsDone(r)}};function dd(i,r){let e=null,t=null;return Array.isArray(r)&&r.length?(e=Ur(r[0]),r.length>1&&(t=Ur(r[r.length-1]))):r instanceof Map&&(e=Ur(r)),e||t?new pd(i,e,t):null}var pd=(()=>{class i{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(e,t,n){this._element=e,this._startStyles=t,this._endStyles=n;let o=i.initialStylesByElement.get(e);o||i.initialStylesByElement.set(e,o=new Map),this._initialStyles=o}start(){this._state<1&&(this._startStyles&&at(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(at(this._element,this._initialStyles),this._endStyles&&(at(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(i.initialStylesByElement.delete(this._element),this._startStyles&&(ti(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(ti(this._element,this._endStyles),this._endStyles=null),at(this._element,this._initialStyles),this._state=3)}}return i})();function Ur(i){let r=null;return i.forEach((e,t)=>{md(t)&&(r=r||new Map,r.set(t,e))}),r}function md(i){return i==="display"||i==="position"}var Yn=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer=null;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(r,e,t,n){this.element=r,this.keyframes=e,this.options=t,this._specialStyles=n,this._duration=t.duration,this._delay=t.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(r=>r()),this._onDoneFns=[])}init(){this._buildPlayer()&&this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return this.domPlayer;this._initialized=!0;let r=this.keyframes,e=this._triggerWebAnimation(this.element,r,this.options);if(!e)return this._onFinish(),null;this.domPlayer=e,this._finalKeyframe=r.length?r[r.length-1]:new Map;let t=()=>this._onFinish();return e.addEventListener("finish",t),this.onDestroy(()=>{e.removeEventListener("finish",t)}),e}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer?.pause()}_convertKeyframesToObject(r){let e=[];return r.forEach(t=>{e.push(Object.fromEntries(t))}),e}_triggerWebAnimation(r,e,t){let n=this._convertKeyframesToObject(e);try{return r.animate(n,t)}catch{return null}}onStart(r){this._originalOnStartFns.push(r),this._onStartFns.push(r)}onDone(r){this._originalOnDoneFns.push(r),this._onDoneFns.push(r)}onDestroy(r){this._onDestroyFns.push(r)}play(){let r=this._buildPlayer();r&&(this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),r.play())}pause(){this.init(),this.domPlayer?.pause()}finish(){this.init(),this.domPlayer&&(this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish())}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer?.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(r=>r()),this._onDestroyFns=[])}setPosition(r){this.domPlayer||this.init(),this.domPlayer&&(this.domPlayer.currentTime=r*this.time)}getPosition(){return this.domPlayer?+(this.domPlayer.currentTime??0)/this.time:this._initialized?1:0}get totalTime(){return this._delay+this._duration}beforeDestroy(){let r=new Map;this.hasStarted()&&this._finalKeyframe.forEach((t,n)=>{n!=="offset"&&r.set(n,this._finished?t:Vn(this.element,n))}),this.currentSnapshot=r}triggerCallback(r){let e=r==="start"?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}},Qn=class{validateStyleProperty(r){return!0}validateAnimatableStyleProperty(r){return!0}containsElement(r,e){return Mr(r,e)}getParentElement(r){return Dn(r)}query(r,e,t){return Nr(r,e,t)}computeStyle(r,e,t){return Vn(r,e)}animate(r,e,t,n,o,l=[]){let m=n==0?"both":"forwards",E={duration:t,delay:n,fill:m};o&&(E.easing=o);let y=new Map,M=l.filter(j=>j instanceof Yn);Ra(t,n)&&M.forEach(j=>{j.currentSnapshot.forEach((O,q)=>y.set(q,O))});let N=Ma(e).map(j=>new Map(j));N=Oa(r,N,y);let U=dd(r,N);return new Yn(r,N,E,U)}};var jn="@",Xa="@.disabled",Xn=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(r,e,t,n){this.namespaceId=r,this.delegate=e,this.engine=t,this._onDestroy=n}get data(){return this.delegate.data}destroyNode(r){this.delegate.destroyNode?.(r)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(r,e){return this.delegate.createElement(r,e)}createComment(r){return this.delegate.createComment(r)}createText(r){return this.delegate.createText(r)}appendChild(r,e){this.delegate.appendChild(r,e),this.engine.onInsert(this.namespaceId,e,r,!1)}insertBefore(r,e,t,n=!0){this.delegate.insertBefore(r,e,t),this.engine.onInsert(this.namespaceId,e,r,n)}removeChild(r,e,t,n){if(n){this.delegate.removeChild(r,e,t,n);return}this.parentNode(e)&&this.engine.onRemove(this.namespaceId,e,this.delegate)}selectRootElement(r,e){return this.delegate.selectRootElement(r,e)}parentNode(r){return this.delegate.parentNode(r)}nextSibling(r){return this.delegate.nextSibling(r)}setAttribute(r,e,t,n){this.delegate.setAttribute(r,e,t,n)}removeAttribute(r,e,t){this.delegate.removeAttribute(r,e,t)}addClass(r,e){this.delegate.addClass(r,e)}removeClass(r,e){this.delegate.removeClass(r,e)}setStyle(r,e,t,n){this.delegate.setStyle(r,e,t,n)}removeStyle(r,e,t){this.delegate.removeStyle(r,e,t)}setProperty(r,e,t){e.charAt(0)==jn&&e==Xa?this.disableAnimations(r,!!t):this.delegate.setProperty(r,e,t)}setValue(r,e){this.delegate.setValue(r,e)}listen(r,e,t,n){return this.delegate.listen(r,e,t,n)}disableAnimations(r,e){this.engine.disableAnimations(r,e)}},Zr=class extends Xn{factory;constructor(r,e,t,n,o){super(e,t,n,o),this.factory=r,this.namespaceId=e}setProperty(r,e,t){e.charAt(0)==jn?e.charAt(1)=="."&&e==Xa?(t=t===void 0?!0:!!t,this.disableAnimations(r,t)):this.engine.process(this.namespaceId,r,e.slice(1),t):this.delegate.setProperty(r,e,t)}listen(r,e,t,n){if(e.charAt(0)==jn){let o=ud(r),l=e.slice(1),m="";return l.charAt(0)!=jn&&([l,m]=hd(l)),this.engine.listen(this.namespaceId,o,l,m,E=>{let y=E._data||-1;this.factory.scheduleListenerCallback(y,t,E)})}return this.delegate.listen(r,e,t,n)}};function ud(i){switch(i){case"body":return document.body;case"document":return document;case"window":return window;default:return i}}function hd(i){let r=i.indexOf("."),e=i.substring(0,r),t=i.slice(r+1);return[e,t]}var Zn=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(r,e,t){this.delegate=r,this.engine=e,this._zone=t,e.onRemovalComplete=(n,o)=>{o?.removeChild(null,n)}}createRenderer(r,e){let n=this.delegate.createRenderer(r,e);if(!r||!e?.data?.animation){let y=this._rendererCache,M=y.get(n);if(!M){let N=()=>y.delete(n);M=new Xn("",n,this.engine,N),y.set(n,M)}return M}let o=e.id,l=e.id+"-"+this._currentId;this._currentId++,this.engine.register(l,r);let m=y=>
3{Array.isArray(y)?y.forEach(m):this.engine.registerTrigger(o,l,r,y.name,y)};return e.data.animation.forEach(m),new Zr(this,l,n,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(r,e,t){if(r>=0&&r<this._microtaskId){this._zone.run(()=>e(t));return}let n=this._animationCallbacksBuffer;n.length==0&&queueMicrotask(()=>{this._zone.run(()=>{n.forEach(o=>{let[l,m]=o;l(m)}),this._animationCallbacksBuffer=[]})}),n.push([e,t])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}componentReplaced(r){this.engine.flush(),this.delegate.componentReplaced?.(r)}};var gd=(()=>{class i extends Oi{constructor(e,t,n){super(e,t,n)}ngOnDestroy(){this.flush()}static \u0275fac=function(t){return new(t||i)(W(gn),W(fi),W(gi))};static \u0275prov=le({token:i,factory:i.\u0275fac})}return i})();function _d(){return new Hn}function vd(i,r,e){return new Zn(i,r,e)}var Za=[{provide:gi,useFactory:_d},{provide:Oi,useClass:gd},{provide:vn,useFactory:vd,deps:[Qo,Oi,_n]}],Qh=[{provide:fi,useClass:Jr},{provide:Tr,useValue:"NoopAnimations"},...Za],Cd=[{provide:fi,useFactory:()=>new Qn},{provide:Tr,useFactory:()=>"BrowserAnimations"},...Za];function Ja(){return Vo("NgEagerAnimations"),[...Cd]}var Ut=(function(i){return i.GENERAL="General",i.BILL="Bill",i.OFFER="Offer",i.ADDON="Addon",i})(Ut||{});function Ed(i,r){if(i&1){let e=L();c(0,"button",8),k("click",function(){I(e);let n=u();return P(n.submitAction())}),h(1),a()}if(i&2){let e=u();S("ladda",!1),s(),T(" ",e.btnText," ")}}var el=(()=>{class i{constructor(e,t,n,o,l,m,E){this.dialogRef=e,this.data=t,this.trs=n,this.customerService=o,this.router=l,this.notificationService=m,this.storageService=E,this.hasActionType=!0,this.btnText=""}ngOnInit(){console.log("this.data",this.data),this.hasActionBtn(this.data.type),this.findKeyValues(this.data.customUrl)}findKeyValues(e){e.split(",").forEach(n=>{let[o,l]=n.split(":").map(m=>m.trim());o==="WEB_URL"?this.webUrl=l:o==="contractNo"?this.contractNo=l:o==="serviceType"&&(this.serviceType=l)})}hasActionBtn(e){switch(console.log("notification type: ",e),e){case Ut.GENERAL:this.hasActionType=!0;break;case Ut.BILL:this.hasActionType=!0,this.btnText=this.trs.trsTs("notifications.goToBill");break;case Ut.ADDON:this.hasActionType=!0,this.btnText=this.trs.trsTs("notifications.goToAddon");break;case Ut.OFFER:this.hasActionType=!0,this.btnText=this.trs.trsTs("notifications.goToOffer");break;default:this.hasActionType=!0,this.btnText="Learn more";break}}submitAction(){let e=this.notificationService.notifications.find(o=>o.itemID===this.data.itemID);window.Opal.presentInboxMessage(e,!0).then(o=>{console.log("Success OPAL PRESENT INBOX MESSAGE! result",o)})}setContractData(e,t,n){if(e===Ut.ADDON||e===Ut.OFFER){if(!this.customerService.customersData)return;this.customerService.customersData.forEach(o=>{let l=o.contracts?.find(m=>m.contractNo===t);if(l){let m={customerIdentity:o.customerIdentity,customerName:o.customerName,customerType:o.customerType,contractIdentity:l.contractIdentity,contractNo:l.contractNo,contractType:l.contractType,contractLock:l.contractLock,contractMsisdn:l.msisdn||"",fixNumber:l.fixNumber||"",contractServiceType:n,prepaidEonStatus:l?.prepaidEonStatus,prepaidMobStatus:l?.prepaidMobStatus,bulsatcom:l?.bulsatcom,productPackageCode:l.productPackageCode,packagePrice:l.packagePrice,insertTime:l.insertTime,prepaidPlanName:l.PrepaidData?.prepaidPlanName||"",payerIdentity:l.payerIdentity,payerId:l.payerId,nextPaymentDate:l.nextPaymentDate,address:l.address||"",contractLabel:l.contractLabel||"",CampaignOffers:l?.CampaignOffers||[]};e===Ut.OFFER&&(this.storageService.set(D.OFFER_CONTRACT,l.contractNo),l.msisdn&&this.storageService.set(D.MSISDN,l.msisdn)),this.storageService.set(D.CAID,o.customerIdentity),this.storageService.set(D.CID,l.contractIdentity||""),this.storageService.setJson(D.SELECTED_CONTRACT,m)}})}}closeDialog(e){this.dialogRef.close(e)}static{this.\u0275fac=function(t){return new(t||i)(b(wn),b(bn),b(pe),b(Pe),b(de),b(Oe),b(Ee))}}static{this.\u0275cmp=K({type:i,selectors:[["app-notifications-dialog"]],decls:12,vars:9,consts:[[1,"dialog-wrap"],[1,"img-wrap"],["alt","image",3,"src"],[1,"desc-wrap"],[1,"title","font-size-15","font-bold","text-color-2"],[1,"desc","font-size-12"],[1,"radius100","white-bordered","text-color-2",3,"click"],[1,"radius100","background-2","ladda-fix",3,"ladda"],[1,"radius100","background-2","ladda-fix",3,"click","ladda"]],template:function(t,n){t&1&&(c(0,"div",0)(1,"div",1),w(2,"img",2),a(),c(3,"div",3)(4,"h3",4),h(5),a(),c(6,"p",5),h(7),a(),c(8,"div")(9,"button",6),k("click",function(){return n.closeDialog()}),h(10),a(),g(11,Ed,2,2,"button",7),a()()()),t&2&&(s(2),S("src",ce(n.data.img),Y),s(3),R(n.data.title),s(2),R(n.data.desc),s(),ut(Fe("buttons-wrap ",n.hasActionType?"":"single")),s(2),R(n.data.closeButtonText),s(),_(n.hasActionType?11:-1))},dependencies:[Ge,Ze],styles:[".gd-v3.notification-dialog mat-dialog-container.mat-mdc-dialog-container{padding:0}
3 .gd-v3.notification-dialog .img-wrap{line-height:0;margin-bottom:32px}@media only screen and (min-width: 1000px){ .gd-v3.notification-dialog .img-wrap{margin-bottom:44px}} .gd-v3.notification-dialog .desc-wrap{max-width:400px;margin:0 auto;padding-bottom:49px;padding-left:29px;padding-right:37px} .gd-v3.notification-dialog .title{margin-bottom:13px}@media only screen and (min-width: 1000px){ .gd-v3.notification-dialog .title{margin-bottom:20px}} .gd-v3.notification-dialog .desc{margin-bottom:20px}@media only screen and (min-width: 1000px){ .gd-v3.notification-dialog .desc{margin-bottom:25px}} .gd-v3.notification-dialog .buttons-wrap{display:flex;align-items:center;justify-content:space-between} .gd-v3.notification-dialog .buttons-wrap.single{justify-content:center} .gd-v3.notification-dialog .buttons-wrap button{font-family:Manrope,sans-serif;font-weight:600;height:45px;width:105px;font-size:12px;display:flex;align-items:center;justify-content:center}@media only screen and (min-width: 600px){ .gd-v3.notification-dialog .buttons-wrap button{width:128px}}"]})}}return i})();var Sd=i=>({"has-active-filter":i});function Td(i,r){if(i&1&&(c(0,"span",5),h(1),a()),i&2){let e=u();s(),T(" ",e.commonService.activeFiltersCount," ")}}var Jn=(()=>{class i{constructor(e,t){this.commonService=e,this.customerService=t,this.config=V,this.hasActiveFilter=!1}ngOnInit(){}static{this.\u0275fac=function(t){return new(t||i)(b(Se),b(Pe))}}static{this.\u0275cmp=K({type:i,selectors:[["app-header-addons-filter-menu-button"]],inputs:{hasActiveFilter:"hasActiveFilter"},decls:6,vars:4,consts:[[1,"reset-btn",3,"click"],[1,"filter-wrapper",3,"ngClass"],[1,"filter-item"],[1,"lh-0"],["src","assets/img/addons-filter.svg","alt","filter",1,"not-responsive"],[1,"active-filter-counter"]],template:function(t,n){t&1&&(c(0,"button",0),k("click",function(){return n.commonService.isAddonFilterMenuVisible=!n.commonService.isAddonFilterMenuVisible}),c(1,"span",1)(2,"span",2)(3,"span",3),w(4,"img",4),a()(),g(5,Td,2,1,"span",5),a()()),t&2&&(s(),S("ngClass",J(2,Sd,n.hasActiveFilter)),s(4),_(n.hasActiveFilter?5:-1))},dependencies:[ft],styles:["[_nghost-%COMP%]{display:block}@media (max-width: 999px){[_nghost-%COMP%]{position:absolute;top:50%;right:0;transform:translateY(-50%)}}@media (min-width: 1000px){[_nghost-%COMP%]{margin-right:20px}}.filter-item[_ngcontent-%COMP%]{width:30px;height:30px;display:flex;align-items:center;justify-content:center}.has-active-filter[_ngcontent-%COMP%]{position:relative}.has-active-filter[_ngcontent-%COMP%] .filter-item[_ngcontent-%COMP%]{width:28px;height:28px;background-color:#fff;border-radius:50%}.has-active-filter[_ngcontent-%COMP%] .filter-item[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:18px;height:13px}.has-active-filter[_ngcontent-%COMP%] .active-filter-counter[_ngcontent-%COMP%]{min-width:17px;height:17px;border-radius:50%;background-color:#f84343;color:#fff;font-weight:500;font-size:8px;display:flex;align-items:center;justify-content:center;position:absolute;top:-6px;right:-6px}"]})}}return i})();function xd(i,r){if(i&1){let e=L();c(0,"button",6),k("click",function(){I(e);let n=u();return P(n.setAllNotificationStatus(!1))}),h(1),v(2,"translate"),a()}i&2&&(s(),R(C(2,1,"notifications.markAllAsRead")))}function yd(i,r){if(i&1){let e=L();c(0,"button",6),k("click",function(){I(e);let n=u();return P(n.setAllNotificationStatus(!0))}),h(1),v(2,"translate"),a()}i&2&&(s(),R(C(2,1,"notifications.markAllAsUnread")))}var er=(()=>{class i{constructor(e,t,n){this.dialog=e,this.trs=t,this.notificationService=n}ngOnInit(){}setAllNotificationStatus(e){this.notificationService.updateUserNotifications(this.notificationService.notificationIdList,e?"unread":"read").subscribe(()=>{this.notificationService.notifications.forEach(t=>{t.isRead=!e}),this.notificationService.notReadNotificationNumber=e?this.notificationService?.notificationIdList?.length:0},t=>{console.log("Error occurred while set all notifications status: ",t),this.openConfirmationDialog("error",this.trs.trsTs("notifications.unSuccessReadAll"))})}deleteAllNotification(){this.notificationService.updateUserNotifications(this.notificationService.n
3otificationIdList,"delete").subscribe(()=>{this.notificationService.notifications=[],this.notificationService.notificationIdList=[],this.notificationService.notReadNotificationNumber=0,this.openConfirmationDialog("success",this.trs.trsTs("notifications.successDeleteAll"))},e=>{console.log("Error occurred while delete all notifications: ",e),this.openConfirmationDialog("error",this.trs.trsTs("notifications.unSuccessDeleteAll"))})}openAskingConfirmationDialog(){this.dialog.open(bs,{width:"812px",panelClass:["global-dialog","gd-v3","text-align-center","confirmation-dialog-v3"],data:{title:this.trs.trsTs("notifications.deleteAll"),desc:this.trs.trsTs("notifications.areYouSureDeleteAll")}}).afterClosed().subscribe(t=>{t==="confirm"&&this.deleteAllNotification()})}openConfirmationDialog(e,t){this.dialog.open(Pi,{width:"812px",panelClass:["global-dialog","gd-v3","text-align-center","confirmation-dialog-v3"],data:{image:e==="success"?"assets/img/success-dialog-icon.svg":"assets/img/unsuccess-dialog-icon.svg",title:e==="success"?this.trs.trsTs("success"):this.trs.trsTs("error"),desc:t,close:this.trs.trsTs("close")}}).afterClosed().subscribe(()=>{})}static{this.\u0275fac=function(t){return new(t||i)(b(Xe),b(pe),b(Oe))}}static{this.\u0275cmp=K({type:i,selectors:[["app-header-notification-menu-button"]],decls:10,vars:6,consts:[["menu","matMenu"],[1,"notification-menu"],[1,"reset-btn","toggle-btn-icon",3,"matMenuTriggerFor"],["src","assets/img/menu-trigger-icon.svg","alt","menu trigger"],["xPosition","before",1,"box-device-menu","notification-menu"],["mat-menu-item",""],["mat-menu-item","",3,"click"]],template:function(t,n){if(t&1){let o=L();c(0,"div",1)(1,"button",2),w(2,"img",3),a(),c(3,"mat-menu",4,0),g(5,xd,3,3,"button",5),g(6,yd,3,3,"button",5),c(7,"button",6),k("click",function(){return I(o),P(n.openAskingConfirmationDialog())}),h(8),v(9,"translate"),a()()()}if(t&2){let o=se(4);s(),S("matMenuTriggerFor",o),s(4),_(n.notificationService.notReadNotificationNumber!==0?5:-1),s(),_(!(n.notificationService==null||n.notificationService.notifications==null)&&n.notificationService.notifications.length&&n.notificationService.notReadNotificationNumber===0?6:-1),s(2),R(C(9,4,"notifications.deleteAll"))}},dependencies:[ks,Ps,Is,ie,ne],encapsulation:2})}}return i})();var bd=["customerPicker"],to=i=>({"dark-mode-img":i}),Id=()=>["notifications"];function Pd(i,r){if(i&1){let e=L();c(0,"button",5),k("click",function(){I(e);let n=u();return P(n.navigateBack())}),w(1,"img",6),a()}if(i&2){let e=u();ut(Fe("reset-btn go-back-button ",e.commonService.isCustomerPickerActivated?"":"no-cp")),s(),S("ngClass",J(4,to,e.commonService.isDarkModeEnabled()))}}function kd(i,r){if(i&1&&h(0),i&2){let e=u(3);T(" ",e.commonService.getLanguage()==="EN"?e.commonService.pageSubtitle==null?null:e.commonService.pageSubtitle.subtitleEN:e.commonService.pageSubtitle==null?null:e.commonService.pageSubtitle.subtitle," ")}}function Ad(i,r){if(i&1&&h(0),i&2){let e=u(3);T(" ",e.commonService.pageSubtitle," ")}}function Md(i,r){if(i&1&&g(0,kd,1,1)(1,Ad,1,1),i&2){let e=u(2);_(e.commonService.pageSubtitle!=null&&e.commonService.pageSubtitle.subtitle?0:1)}}function Nd(i,r){if(i&1&&(c(0,"div",3),h(1),g(2,Md,2,1),a()),i&2){let e=u();s(),T(" ",e.commonService.productPackageNameActivated?e.commonService.getLanguage()==="EN"?(e.customerService==null||e.customerService.selectedContract==null?null:e.customerService.selectedContract.productPackageNameEN)||"":(e.customerService==null||e.customerService.selectedContract==null?null:e.customerService.selectedContract.productPackageName)||"":""," "),s(),_(e.commonService.pageSubtitle?2:-1)}}function Rd(i,r){if(i&1&&(c(0,"div",3),h(1),a()),i&2){let e=u();s(),R(e.commonService.pageSubtitleSecond)}}function Od(i,r){if(i&1&&(c(0,"span",9),h(1),a()),i&2){let e=u(2);s(),R(e.notificationService.notReadNotificationNumber)}}function Dd(i,r){if(i&1){let e=L();c(0,"div",4)(1,"button",7),w(2,"img",8),g(3,Od,2,1,"span",9),a(),c(4,"button",10),k("click",function(){I(e);let n=u();return P(n.closingSideMenu())}),w(5,"img",11),a()()}if(i&2){let e=u();s(),S("routerLink",Si(4,Id)),s(),S("ngClass",J(5,to,e.commonService.isDarkModeEnabled())),s(),_(e.notificationService.n
3otReadNotificationNumber>0?3:-1),s(2),S("ngClass",J(7,to,e.commonService.isDarkModeEnabled()))}}function Bd(i,r){i&1&&w(0,"app-header-notification-menu-button")}function Ld(i,r){if(i&1&&w(0,"app-header-addons-filter-menu-button",12),i&2){let e=u(2);S("hasActiveFilter",e.commonService.filterIsActive)}}function Fd(i,r){if(i&1&&g(0,Ld,1,1,"app-header-addons-filter-menu-button",12),i&2){let e=u();_(e.addonsService.isAddonsLoaded()&&e.commonService.hasfilterMetadata&&e.commonService.isHeaderFilterButtonActivated?0:-1)}}var ir=(()=>{class i{constructor(e,t,n,o,l,m,E,y,M,N){this.location=e,this.customerService=t,this.commonService=n,this.breakpointObserver=o,this.router=l,this.dialog=m,this.trs=E,this.notificationService=y,this.navigationService=M,this.addonsService=N,this.config=V,this.isSmallDisplay=!1,this.isSmallDisplay=this.breakpointObserver.isMatched("(max-width: 1000px)")}ngOnInit(){this.selectedCustomer=this.customerService.selectedCustomer,this.customerService.onCustomerChangedSubject.subscribe(e=>{this.selectedCu
3stomer=e})}closingMenu(){this.isSmallDisplay&&(this.commonService.menuOpen=!this.commonService.menuOpen)}closingSideMenu(){this.closingMenu(),this.router.navigate(["settings"])}settingsNavigate(){this.closingMenu(),this.router.navigate(["bills/settings"])}openConfirmationDialog(e){this.closingMenu(),this.dialog.open(fs,{width:"420px",panelClass:["global-dialog","confirmation-dialog","bills-information-dialog"],data:{type:e,confirmButtonText:this.trs.trsTs("done"),confirmButtonAction:!0,title:this.titleMessage(),description:this.descriptionMessage(),description2:this.descriptionMessage2()}}).afterClosed().subscribe(()=>{})}titleMessage(){return'<h3 class="title">'+this.trs.trsTs("pageTitle.bills")+"</h3>"}descriptionMessage(){return this.trs.trsTs("headerMenu.billsConfirmationDescription")}descriptionMessage2(){return this.trs.trsTs("headerMenu.billsConfirmationDescription2")}navigateBack(){this.navigationService.navigateBack()}goBackMobile(){this.closingMenu(),this.location.back()}static{this.\u0275fac=function(t){return new(t||i)(b(ht),b(Pe),b(Se),b(yi),b(de),b(Xe),b(pe),b(Oe),b($t),b(bi))}}static{this.\u0275cmp=K({type:i,selectors:[["app-fixed-header"]],viewQuery:function(t,n){if(t&1&&ai(bd,5),t&2){let o;li(o=ci())&&(n.customerPicker=o.first)}},inputs:{showOnDevice:"showOnDevice"},decls:10,vars:12,consts:[[3,"class"],[1,"settings-account-wrapper"],[1,"pager-title","font-bold"],[1,"subtitle"],[1,"user-actions"],[3,"click"],["src","assets/img/back-icon-black.svg","alt","back",3,"ngClass"],[1,"notification-link","reset-btn",3,"routerLink"],["src","assets/img/bell.svg","alt","bell",1,"img","bell-icon",3,"ngClass"],[1,"notification-alert"],[1,"reset-btn",3,"click"],["src","assets/img/user-profile.svg","alt","User image",1,"img","user-icon",3,"ngClass"],[3,"hasActiveFilter"]],template:function(t,n){t&1&&(c(0,"div"),g(1,Pd,2,6,"button",0),c(2,"div",1)(3,"h2",2),h(4),g(5,Nd,3,2,"div",3),g(6,Rd,2,1,"div",3),a()(),g(7,Dd,6,9,"div",4),g(8,Bd,1,0,"app-header-notification-menu-button"),g(9,Fd,1,1),a()),t&2&&(ut(Ho(`fixed-header 4 `,n.showOnDevice,` 5 `,n.showOnDevice==="mobile"&&!n.commonService.isBackButtonActivated?"direction-col":"",` 6 `,n.commonService.isBackButtonActivated?"space-between":"")),s(),_(n.commonService.isBackButtonActivated?1:-1),s(3),T(" ",n.commonService.addonPageTitle?n.commonService.getLanguage()==="EN"?n.commonService.addonPageTitle==null?null:n.commonService.addonPageTitle.billingProductDisplayNameEN:n.commonService.addonPageTitle==null?null:n.commonService.addonPageTitle.billingProductDisplayName:n.commonService.pageTitle," "),s(),_(n.commonService.isPageSubtitleActivated?5:-1),s(),_(n.commonService.isPageSubtitleSecondActivated?6:-1),s(),_(n.commonService.isCustomerPickerActivated?7:-1),s(),_(n.commonService.isNotificationMenuActivated&&(!(n.notificationService==null||n.notificationService.notifications==null)&&n.notificationService.notifications.length)?8:-1),s(),_(n.config.hasAddonFilter?9:-1))},dependencies:[ft,qt,Jn,er],encapsulation:2})}}return i})();var nr=(function(i){return i.EN="en",i.RS="sr",i.BA="en",i.ME="me",i.SI="sl",i.HR="hr",i.GR="el",i.BG="bg",i["EN-BG"]="en",i["EN-GR"]="en",i["EN-SI"]="en",i["EN-HR"]="en",i["EN-RS"]="en",i["EN-BA"]="en",i["EN-ME"]="en",i})(nr||{});var Di=(()=>{class i{constructor(e,t){this.renderer2=e,this.trs=t}ngOnInit(){this.initUserway(),this.initMutationObserver(),this.cleanupExisting()}initUserway(){let e=document.getElementsByTagName("head")[0],t=this.renderer2.createElement("script");t.type="text/javascript",t.src="https://cdn.userway.org/widget.js",t.setAttribute("data-account","4rQJ0yC16o"),this.renderer2.appendChild(e,t),this.initCompletedListener=n=>{let o=n.detail.userWayInstance;o.iconVisibilityOff(),o.changeWidgetLanguage(nr[this.trs.currentLang])},document.addEventListener("userway:init_completed",this.initCompletedListener),this.renderCompletedListener=n=>{let o=n.detail.userWayInstance;document.querySelectorAll("#accessibilityWidget").forEach(l=>{l.addEventListener("click",this.handleClick.bind(this,o))})},document.addEventListener("userway:render_completed",this.renderCompletedListener)}cleanupElement(e){e.hasAttribute("data-data-uw-rm-outline-styled")&&e.removeAttribute("data-data-uw-rm-outline-styled"),e.hasAttribute("data-uw-rm-outline")&&e.removeAttribute("data-uw-rm-outline"),e.style&&(e.style.removeProperty("outline"),e.style.removeProperty("transition"),e.style.removeProperty("outline-offset"))}
6cleanupExisting(){document.querySelectorAll("[data-data-uw-rm-outline-styled], [data-uw-rm-outline], [style]").forEach(e=>{this.cleanupElement(e)})}initMutationObserver(){this.mutationObserver=new MutationObserver(e=>{e.forEach(t=>{t.type==="attributes"&&t.target instanceof HTMLElement&&this.cleanupElement(t.target)})}),this.mutationObserver.observe(document.body,{attributes:!0,subtree:!0,attributeFilter:["style","data-data-uw-rm-outline-styled","data-uw-rm-outline"]})}handleClick(e){e.changeWidgetLanguage(nr[this.trs.currentLang]),e.widgetToggle()}ngOnDestroy(){this.initCompletedListener&&document.removeEventListener("userway:init_completed",this.initCompletedListener),this.renderCompletedListener&&document.removeEventListener("userway:render_completed",this.renderCompletedListener),this.mutationObserver&&this.mutationObserver.disconnect(),document.querySelectorAll("#accessibilityWidget").forEach(e=>{e.removeEventListener("click",this.handleClick)})}static{this.\u0275fac=function(t){return new(t||i)(b(Go),b(pe))}}static{this.\u0275cmp=K({type:i,selectors:[["app-userway"]],decls:7,vars:3,consts:[["id","accessibilityWidget","aria-label","Click for Accessibility","type","button",1,"accessibility"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg"],["cx","10","cy","10","r","9.35","stroke","#000000","stroke-width","1.3"],["d","M10 4.306c.611 0 1.111.5 1.111 1.11 0 .612-.5 1.112-1.111 1.112s-1.111-.5-1.111-1.111.5-1.111 1.111-1.111zm4.444 3.888h-2.777v6.667c0 .306-.25.556-.556.556a.557.557 0 01-.555-.556v-2.778H9.444v2.778c0 .306-.25.556-.555.556a.557.557 0 01-.556-.556V8.194H5.556A.557.557 0 015 7.64c0-.306.25-.556.556-.556h8.888c.306 0 .556.25.556.556 0 .305-.25.555-.556.555z","fill","#000000"],["id","accessibility-info","aria-hidden","true",1,"sr-only","accessibility__info"]],template:function(t,n){t&1&&(ue(0,"button",0),Bo(),ue(1,"svg",1),nt(2,"circle",2)(3,"path",3),fe(),Lo(),ue(4,"span",4),h(5),v(6,"translate"),fe()()),t&2&&(s(5),T(" ",C(6,1,"accessibility")," "))},dependencies:[ie,ne],styles:[".accessibility[_ngcontent-%COMP%]{margin-top:12px;margin-bottom:12px;padding:5px 16px 5px 7px;background-color:transparent;height:100%;display:flex;gap:7px;align-items:center;border-radius:16px;border:1px solid #A9B3C7;min-height:34px}@media only screen and (min-width: 1300px){.accessibility[_ngcontent-%COMP%]{margin-bottom:16px}}.accessibility[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:20px;height:20px}.accessibility__info[_ngcontent-%COMP%]{color:#000;font-size:12px;font-weight:400}"]})}}return i})();var Gd=i=>({"menu-open":i}),nl=i=>({active:i}),vi=i=>({"dark-mode-img":i}),Ud=()=>["notifications"];function zd(i,r){i&1&&w(0,"mat-icon",22)}function jd(i,r){i&1&&w(0,"mat-icon",22)}function Hd(i,r){i&1&&(c(0,"picture"),w(1,"source",23)(2,"img",24),a())}function qd(i,r){if(i&1&&(g(0,jd,1,0,"mat-icon",22),g(1,Hd,3,0,"picture")),i&2){let e=u(2);_(e.customerService!=null&&e.customerService.hasResidentialCustomer()?0:-1),s(),_(e.customerService!=null&&e.customerService.hasResidentialCustomer()?-1:1)}}function Kd(i,r){if(i&1&&g(0,zd,1,0,"mat-icon",22)(1,qd,2,2),i&2){let e=u();_(!(e.customerService==null||e.customerService.customersData==null)&&e.customerService.customersData.length?1:0)}}function $d(i,r){i&1&&(c(0,"picture"),w(1,"source",23)(2,"img",24),a())}function Wd(i,r){if(i&1&&(c(0,"span",27),h(1),a()),i&2){let e=u(2);s(),R(e.notificationService.notReadNotificationNumber)}}function Yd(i,r){if(i&1){let e=L();c(0,"div",3)(1,"button",25),w(2,"img",26),g(3,Wd,2,1,"span",27),a(),c(4,"button",28),k("click",function(){I(e);let n=u();return P(n.showProfile())}),w(5,"img",29),a()()}if(i&2){let e=u();s(),S("routerLink",Si(2,Ud)),s(2),_(e.notificationService.notReadNotificationNumber>0?3:-1)}}function Qd(i,r){if(i&1&&w(0,"img",11),i&2){let e=u();S("src",Fe("assets/img/",e.isActiveRoute("/bills")?"bills-icon-active.png":"bills-icon-gr.png"),Y)("ngClass",J(3,vi,e.commonService.isDarkModeEnabled()))}}function Xd(i,r){if(i&1&&(c(0,"div",12),w(1,"img",11)(2,"span",30),a()),i&2){let e=u();s(),S("src",Fe("assets/img/",e.isActiveRoute("/bills")?"bills-icon-active.png":"bills-icon-gr.png"),Y)("ngClass",J(3,vi,e.commonService.isDarkModeEnabled()))}}function Zd(i,r){if(i&1&&w(0,"img",13),i&2){let e=u(2);S("src",Fe("assets/img/",e.isActiveRoute("/offers")?"offer-icon-active.svg":"offer-icon.svg"),Y)("ngClass",J(3,vi,e.commonService.isDarkModeEnabled()))}}function Jd(i,r){if(i&1&&(c(0,"div",12),w(1,"img",13)(2,"span",31),a()),i&2){let e=u(2);s(),S("src",Fe("assets/img/",e.isActiveRoute("/offers")?"offer-icon-active.svg":"offer-icon.svg"),Y)("ngClass",J(3,vi,e.commonService.isDarkModeEnabled()))}}function ep(i,r){if(i&1){let e=L();c(0,"li",7)(1,"a",10),k("click",function(){I(e);let n=u();return n.closingSideMenu(),P(n.goToSelectedPage("/offers"))}),g(2,Zd,1,5,"img",13)(3,Jd,3,5,"div",12),h(4),v(5,"translate"),a()()}if(i&2){let e=u();s(),di("active",e.isActiveRoute("/offers")),s(),_(e.offersService.showOfferIndicator()?3:2),s(2),T(" ",C(5,4,"pageTitle.offers")," ")}}function tp(i,r){if(i&1&&w(0,"img",13),i&2){let e=u();S("src",Fe("assets/img/",e.isActiveRoute("/support")?"support-icon-active.png":"support-icon.png"),Y)("ngClass",J(3,vi,e.commonService.isDarkModeEnabled()))}}function ip(i,r){if(i&1&&(c(0,"div",12),w(1,"img",13)(2,"span",30),a()),i&2){let e=u();s(),S("src",Fe("assets/img/",e.isActiveRoute("/support")?"support-icon-active.png":"support-icon.png"),Y)("ngClass",J(3,vi,e.commonService.isDarkModeEnabled()))}}function np(i,r){i&1&&w(0,"span",21)}var ol=(()=>{class i{constructor(e,t,n,o,l,m,E,y,M,N,U,j,O){this.customerService=e,this.breakpointObserver=t,this.trs=n,this.commonService=o,this.router=l,this.notificationService=m,this.navigationService=E,this.technicalSupp
6ortService=y,this.document=M,this.storageService=N,this.b2bDashboardService=U,this.outagesSupportService=j,this.offersService=O,this.config=V,this.lines=new Array(3),this.isSmallDisplay=!1,this.eCustomerType=ds,this.isSmallDisplay=this.breakpointObserver.isMatched("(max-width: 1000px)")}ngOnInit(){}isActiveRoute(e){return this.router.url.startsWith(e)}goToSelectedPage(e){if(this.storageService.get(D.PROMPT)==="true"){this.navigationService.navigateBack(e);return}this.router.navigateByUrl(e)}closingSideMenu(){this.isSmallDisplay&&(this.commonService.menuOpen=!this.commonService.menuOpen,this.commonService.menuOpen?this.document.body.classList.add("menu-open-detect"):this.document.body.classList.remove("menu-open-detect"))}showProfile(){this.router.navigate(["settings"])}static{this.\u0275fac=function(t){return new(t||i)(b(Pe),b(yi),b(pe),b(Se),b(de),b(Oe),b($t),b(Mn),b(gn),b(Ee),b(Qt),b(Pn),b(Ii))}}static{this.\u0275cmp=K({type:i,selectors:[["app-side-menu"]],decls:47,vars:50,consts:[[1,"header-wrap"],[1,"app-logo"],[1,"logo-link","c-pointer",3,"click"],[1,"user-actions"],[3,"ngClass"],[3,"showOnDevice"],[1,"nav-menu","bg-env"],[1,"main-nav-item"],[1,"main-nav-link",3,"click","ngClass"],["alt","home",1,"main-nav-ico",3,"src","ngClass"],[1,"main-nav-link",3,"click"],["alt","bills",1,"main-nav-ico",3,"src","ngClass"],[1,"alert-notification"],["alt","support",1,"main-nav-ico",3,"src","ngClass"],[1,"main-nav-item","lang-switch-item","tile-card-box-wrapper"],[1,""],[1,"bg-env"],[1,"mb-10"],[3,"isLoginStyle"],[1,"reset-btn","terms-links",3,"click"],[1,"reset-btn","hamburger",3,"click","ngClass"],[1,"hamburger--line"],["svgIcon","vivacom-logo",1,"logo-vivacom"],["srcset","assets/img/logo/b2b/logo-vivacom-black.svg","media","(min-width:1000px)"],["src","assets/img/logo/b2b/logo-vivacom-white.svg","alt","logo",1,"logo-max-200"],[1,"notification-link","reset-btn",3,"routerLink"],["src","assets/img/bell-white.svg","alt","bell",1,"img","bell-icon"],[1,"notification-alert"],[1,"reset-btn",3,"click"],["src","assets/img/user-profile-white.svg","alt","User image",1,"img","user-icon"],[1,"alert","unpaid-icon"],[1,"alert","offer-indicator"]],template:function(t,n){if(t&1&&(c(0,"div",0)(1,"h1",1)(2,"a",2),k("click",function(){return n.goToSelectedPage(n.b2bDashboardService.isCustomerB2BUser()?"/home-overview":"/home")}),g(3,Kd,2,1),g(4,$d,3,0,"picture"),a()(),g(5,Yd,6,3,"div",3),c(6,"nav",4),w(7,"app-fixed-header",5),c(8,"ul",6)(9,"li",7)(10,"a",8),k("click",function(){return n.closingSideMenu(),n.goToSelectedPage(n.b2bDashboardService.isCustomerB2BUser()?"/home-overview":"/home")}),w(11,"img",9),h(12),v(13,"translate"),a()(),c(14,"li",7)(15,"a",10),k("click",function(){return n.closingSideMenu(),n.goToSelectedPage("/bills")}),g(16,Qd,1,5,"img",11)(17,Xd,3,5,"div",12),h(18),v(19,"translate"),a()(),g(20,ep,6,6,"li",7),c(21,"li",7)(22,"a",10),k("click",function(){return n.closingSideMenu(),n.goToSelectedPage("/support")}),g(23,tp,1,5,"img",13)(24,ip,3,5,"div",12),h(25),v(26,"translate"),a()(),c(27,"li",14)(28,"div",15),w(29,"app-userway",16),a(),c(30,"div",17),w(31,"app-language-toggle-bar",18),a(),c(32,"div",17)(33,"button",19),k("click",function(){return n.commonService.goToLink("https://www.vivacom.bg/bg/residential/obshti-uslovija")}),h(34),v(35,"translate"),a()(),c(36,"div",17)(37,"button",19),k("click",function(){return n.commonService.goToLink("https://www.vivacom.bg/bg/residential/ceni-i-uslugi/mobilni-uslugi/pokritie/interaktivna-karta")}),h(38),v(39,"translate"),a()(),c(40,"div")(41,"button",19),k("click",function(){return n.commonService.goToLink(n.trs.trsTs("appUrl"))}),h(42),v(43,"translate"),a()()()()(),c(44,"button",20),k("click",function(){return n.commonService.toggleMenu()}),Cn(45,np,1,0,"span",21,Uo),a()()),t&2){let o;s(3),_(n.b2bDashboardService.isCustomerB2BUser()?-1:3),s(),_(n.b2bDashboardService.isCustomerB2BUser()?4:-1),s(),_(n.commonService.isCustomerPickerActivated?5:-1),s(),ut(jo("nav-wrapper ",!n.commonService.menuOpen&&n.commonService.isClosedActive?"menu-close":""," ",n.commonService.hasWorkOnSiteNotification?"notification-show":"")),S("ngClass",J(42,Gd,n.commonService.menuOpen)),s(),S("showOnDevice","mobile"),s(3),di("active",n.isActiveRoute(n.b2bDashboardService.isCustomerB2BUser()?"/home-overview":"/home")),S("ngClass",J(44,nl,n.isActiveRoute(n.b2bDashboardService.isCustomerB2BUser()?"/home-overview":"/home"))),s(),S("src",Fe("assets/img/",n.isActiveRoute(n.b2bDashboardService.isCustomerB2BUser()?"/home-overview":"/home")?"home-icon-active.png":"home-icon.svg"),Y)("ngClass",J(46,vi,n.commonService.isDarkModeEnabled())),s(),T(" ",C(13,30,"pageTitle.home")," "),s(3),di("active",n.isActiveRoute("/bills")),s(),_(n.customerService.hasUnpaidBills()?17:16),s(2),T(" ",C(19,32,"pageTitle.bills")," "),s(2),_(n.config.newDashboardFlag?20:-1),s(2),di("active",n.isActiveRoute("/support")),s(),_(!((o=n.outagesSupportService.outageStatus())!=null&&o.length)&&!n.outagesSupportService.hasNewOpenTickets()?23:24),s(2),T(" ",C(26,34,"pageTitle.support")," "),s(6),S("isLoginStyle",!1),s(3),T(" ",C(35,36,"termsConditions")),s(4),T(" ",C(39,38,"mobileCoverage")),s(4),T(" ",C(43,40,"appUrlPreview")," "),s(2),S("ngClass",J(48,nl,n.commonService.menuOpen)),s(),En(n.lines)}},dependencies:[Di,Re,qt,ft,ir,Ue,ie,ne],encapsulation:2})}}return i})();var rp=i=>({"dark-mode-img":i});function op(i,r){if(i&1&&(c(0,"div",4),h(1),a()),i&2){let e=u();s(),R(e.commonService.pageSubtitle)}}function sp(i,r){i&1&&w(0,"app-header-notification-menu-button")}
6function ap(i,r){if(i&1&&w(0,"app-header-addons-filter-menu-button",5),i&2){let e=u(2);S("hasActiveFilter",e.commonService.filterIsActive)}}function lp(i,r){if(i&1&&g(0,ap,1,1,"app-header-addons-filter-menu-button",5),i&2){let e=u();_(e.addonsService.isAddonsLoaded()&&e.commonService.hasfilterMetadata&&e.commonService.isHeaderFilterButtonActivated?0:-1)}}var sl=(()=>{class i{constructor(e,t,n,o){this.location=e,this.commonService=t,this.customerService=n,this.addonsService=o,this.config=V}ngOnInit(){}goBack(){this.location.back()}static{this.\u0275fac=function(t){return new(t||i)(b(ht),b(Se),b(Pe),b(bi))}}static{this.\u0275cmp=K({type:i,selectors:[["app-user-info-header"]],decls:9,vars:7,consts:[[1,"reset-btn","go-back-button-uih",3,"click"],["src","assets/img/back-icon-black.svg","alt","back",3,"ngClass"],[1,"info-wrap"],[1,"pager-title","font-bold"],[1,"subtitle"],[3,"hasActiveFilter"]],template:function(t,n){t&1&&(c(0,"header")(1,"button",0),k("click",function(){return n.goBack()}),w(2,"img",1),a(),c(3,"div",2)(4,"h2",3),h(5),g(6,op,2,1,"div",4),a()(),g(7,sp,1,0,"app-header-notification-menu-button"),g(8,lp,1,1),a()),t&2&&(s(2),S("ngClass",J(5,rp,n.commonService.isDarkModeEnabled())),s(3),T(" ",n.commonService.pageTitle," "),s(),_(n.commonService.isPageSubtitleActivated?6:-1),s(),_(n.commonService.isNotificationMenuActivated?7:-1),s(),_(n.config.hasAddonFilter?8:-1))},dependencies:[ft,er,Jn],styles:["@media only screen and (min-width: 1000px){[_nghost-%COMP%]{display:none}}.pager-title[_ngcontent-%COMP%]{padding-left:35px;padding-right:35px;font-size:20px}.pager-title[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{font-size:14px}header[_ngcontent-%COMP%]{text-align:center;position:relative;margin-bottom:25px}.go-back-button-uih[_ngcontent-%COMP%]{position:absolute;left:0;top:50%;transform:translateY(-50%)}app-header-notification-menu-button[_ngcontent-%COMP%]{position:absolute;top:0;right:0}"]})}}return i})();var al=(()=>{class i{constructor(e,t,n,o,l,m,E,y,M,N,U){this.router=e,this.location=t,this.commonService=n,this.brakepointObserver=o,this.customerService=l,this.b2bDashboardService=m,this.cdr=E,this.dialog=y,this.notificationService=M,this.route=N,this.storageService=U,this.showOnWeb=!1,this.showOnWeb=o.isMatched("(min-width: 1000px)")}ngOnInit(){this.commonService.menuOpen=!1,this.commonService.isClosedActive=!1,this.location.path()===""&&this.router.navigate([this.b2bDashboardService.isCustomerB2BUser()?"/home-overview":"/home"]),this.route.queryParams.subscribe(e=>{e.ResponseCode&&this.router.navigate([this.b2bDashboardService.isCustomerB2BUser()?"/home-overview":"/home"])})}ngAfterContentChecked(){this.cdr.detectChanges()}checkUserNotification(){this.notificationService.notifications.length&&this.notificationService.notifications.length>=1&&this.showNotificationDialog()}showNotificationDialog(){this.dialog.open(el,{width:"665px",panelClass:["global-dialog","gd-v3","text-align-center","notification-dialog"],data:{img:"assets/img/notification-dialog-img.png",title:"Get EON 4P",desc:"Check EON 4P packages with discounted price & find which one suits you the best!",submitText:"Check offer"}}).afterClosed().subscribe(()=>{})}ngOnDestroy(){this.storageService.remove(D.ROUTED_ACCESS_INFO),this.storageService.remove(D.ACCESS_TYPE)}static{this.\u0275fac=function(t){return new(t||i)(b(de),b(ht),b(Se),b(yi),b(Pe),b(Qt),b(Tn),b(Xe),b(Oe),b(xn),b(Ee))}}static{this.\u0275cmp=K({type:i,selectors:[["app-home"]],decls:8,vars:1,consts:[[1,"app-wrapper"],[1,"main-header"],[1,"container"],[1,"main-content-wrapper"],[3,"showOnDevice"]],template:function(t,n){t&1&&(c(0,"main",0)(1,"header",1),w(2,"app-side-menu"),a(),c(3,"div",2),w(4,"app-user-info-header"),a(),c(5,"div",3),w(6,"app-fixed-header",4)(7,"router-outlet"),a()()),t&2&&(s(6),S("showOnDevice","web"))},dependencies:[ol,sl,ir,xi],encapsulation:2})}}return i})();var rr=(()=>{class i{constructor(e){this.authService=e}canActivate(e,t){return this.authService.userAuth?Ne(!0):(this.authService.logout(),Ne(!1))}static{this.\u0275fac=function(t){return new(t||i)(W(ge))}}static{this.\u0275prov=le({token:i,factory:i.\u0275fac})}}return i})();var or=class i{static{this.MOBILE_CONTRACT_TYPES=[Kt.MOB,Kt.MOB_DATA,Kt.MOBILE_PREPAID,Kt.MOB_DATA_PREPAID]}static{this.NON_MOBILE_CONTRACT_TYPES=[Kt.FIX,Kt.EON_POSTPAID,Kt.EON_PREPAID]}initializeBuzzeasy(r,e){if(!r?.length)return;let n=this.collectAllContractNumbers(r).join(","),o=this.findCustomerByContractTypes(r,i.MOBILE_CONTRACT_TYPES);if(o){this.processCustomer(o,i.MOBILE_CONTRACT_TYPES,n,e);return}let l=this.findCustomerByContractTypes(r,i.NON_MOBILE_CONTRACT_TYPES);l&&this.processCustomer(l,i.NON_MOBILE_CONTRACT_TYPES,n,e)}collectAllContractNumbers(r){let e=[];return r.forEach(t=>{t?.contracts?.forEach(n=>{e.push(n.contractNo)})}),e}findCustomerByContractTypes(r,e){return r.find(t=>t?.contracts?.some(n=>e.includes(n.contractType)))}processCustomer(r,e,t,n){let o=r.contracts?.filter(M=>e.includes(M.contractType));if(!o?.length)return;let l=o[0],[m,...E]=r.customerName.split(" "),y=E.join(" ");this.setWindowCallback(m,y,l,t,n)}setWindowCallback(r,e,t,n,o){let l=t?.msisdn||t?.fixNumber||"",m={customernumber:t?.payerId?.trim()||"",first_name:r?.trim()||"",last_name:e?.trim()||"",email_address:o?.trim()||"",contract_number:n?.toString()||"",phone_number:l,ws_phoneNumber:l};window.getDataForBuzzeasy=()=>Promise.resolve({workflowData:m})}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275prov=le({token:i,factory:i.\u0275fac,providedIn:"root"})}};var ll=(()=>{class i{constructor(e){this.storageService=e}enrichBillsAndContracts(e,t){this.enrichContracts(t,e),this.checkUnpaidBills(e)}enrichBillsWithoutContracts(e){e?.forEach(t=>{t.Services||(t.Services=[]),this.initBillSearchCriteria(t,[]),t.multiPayer="false",t.customerName=t.payerName;let n=this.computeBillingPermissions(this.storageService.get(D.USER_TYPE),null);t.BillingDocuments?.forEach(o=>{t.noPayButton=n.noPayButton,o.noPayButton=n.noPayButton,t.businessChild=!1,t.residentalChild=!1,t.noM
6anageSettings=!1})})}computeHasUnpaidBills(e){return e?.length?e.some(t=>t.currentMonthBalance!==0&&!t.isPayedBill&&!t.bulsatcom):!1}enrichContracts(e,t){let n=this.storageService.get(D.USER_TYPE);e?.forEach(o=>{o?.contracts?.forEach(l=>{this.setContractBaseProperties(l,o,n),this.enrichContractBanners(l,o),this.setDataSolutionIndicator(l),this.initSubscriptionSearchCriteria(l,l?.serviceType?[l.serviceType]:[]),this.correlateContractWithBills(l,o,t)})})}setContractBaseProperties(e,t,n){e.customerType=t.customerType,e.customerIdentity=t.customerIdentity,e.userType=n||void 0,e.hasUnpaidBills=!1,e.pinnedAccount=!1,e.pinned=e?.pinned,e.contractLabel=e?.contractLabel?.trim()||""}enrichContractBanners(e,t){e?.Banners?.forEach(n=>{n.customerIdentity=t.customerIdentity,n.contractIdentity=e.contractIdentity,n.contractNo=e.contractNo,n.contractType=e.contractType,n.msisdn=e.msisdn||""})}setDataSolutionIndicator(e){e.dataSolutionContract=wi.REGULAR,e?.productPackageName===wi.CPE_MANAGEMENT?e.dataSolutionContract=wi.CPE_MANAGEMENT:e?.productPackageName===wi.NETWORK&&(e.dataSolutionContract=wi.NETWORK)}
6correlateContractWithBills(e,t,n){n?.forEach(o=>{e.payerId===o.payerId&&this.linkContractToBill(e,t,o);let l=(o?.Services?.map(m=>m.serviceType)||[]).filter(m=>!!m);this.initBillSearchCriteria(o,l),o.multiPayer="false",this.enrichBillingDocuments(e,t,o),this.enrichSingleBillingDocument(e,t,o)})}linkContractToBill(e,t,n){n.Services||(n.Services=[]),n.customerName=t.customerName,n.contractType=e.contractType,e.serviceType&&(n.Services.some(l=>l.serviceType===e.serviceType)||n.Services.push({serviceType:e.serviceType,serviceName:e.productPackageName})),e.payerName=n?.payerName,e.pinnedAccount=n?.pinnedAccount,e.currentMonthBalance=n?.currentMonthBalance,e.payerIdentity=n?.payerIdentity,e.billDetailsVisible=this.hasBillAccess(n?.billDetailsVisible),e.billsDetailsVisibleHome=this.hasBillAccess(n?.billDetailsVisible),e.billsVisibleHome=this.hasBillAccess(n?.billsVisible),e.lastBillPrice=0,e.lastUnpaidBillingDocument=n?.billingDocument?.billingDocument||n?.BillingDocuments?.filter(o=>o.toBePayed!==void 0&&!o.toBePayed.toString().startsWith("-")&&o.toBePayed!==0)?.pop()?.billingDocument}hasBillAccess(e){return e!==Ts.NO_ACCESS}enrichBillingDocuments(e,t,n){n.BillingDocuments?.forEach(o=>{if(o.Items?.find(m=>m.contractNo===e.contractNo)){n.customerType=e.customerType,n.customerIdentity=t.customerIdentity,this.computeLastBillPrices(e,n);let m=this.computeBillingPermissions(e.userType||null,e.customerType||null);n.noPayButton=m.noPayButton,o.noPayButton=m.noPayButton,n.businessChild=m.businessChild,n.residentalChild=m.residentalChild,n.noManageSettings=m.noManageSettings}})}enrichSingleBillingDocument(e,t,n){if(!n.BillingDocuments?.length&&n.billingDocument){n.customerType=e.customerType,n.customerIdentity=t.customerIdentity;let o=this.computeBillingPermissions(e.userType||null,e.customerType||null);n.noPayButton=o.noPayButton,n.businessChild=o.businessChild,n.residentalChild=o.residentalChild,n.noManageSettings=o.noManageSettings}}computeBillingPermissions(e,t){return ms(e,t)}computeLastBillPrices(e,t){if(e.lastBillPrice=0,!t?.BillingDocuments?.length)return;let n=t.BillingDocuments;n.length>1?e.lastBillPrice=n.slice(1).reduce((o,l)=>{let m=l?.toBePayed;return m&&!m.toString().startsWith("-")&&m!==0?o+m:o},0):e.lastBillPrice=n[0]?.toBePayed??0,e.billingItemsCount=n.length}initBillSearchCriteria(e,t){e.searchCriterias={searchByBillingAccount:!0,searchByPaidStatus:["all"],searchByServiceType:["all",...t]}}initSubscriptionSearchCriteria(e,t){e.subscriptionSearchCriterias={searchByLines:!0,searchByPaidStatus:["all"],searchByServiceStatus:["all"],searchByServiceType:["all",...t],searchByProductPackageNames:["all"]}}checkUnpaidBills(e){if(!e?.length)return!1;for(let t of e)if(t.currentMonthBalance!==0&&!t.isPayedBill&&!t.bulsatcom)return!0;return!1}static{this.\u0275fac=function(t){return new(t||i)(W(Ee))}}static{this.\u0275prov=le({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var io=(()=>{class i{constructor(e,t,n,o,l,m,E,y,M,N,U,j,O){this.authService=e,this.customerService=t,this.b2bDashboardService=n,this.offersService=o,this.profileService=l,this.billsCustomerService=m,this.bannerService=E,this.notificationService=y,this.gtmService=M,this.router=N,this.storageService=U,this.buzzeasyService=j,this.dataEnrichmentService=O,this.profileDataDestroy$=new un,this.billsDestroy$=new un,this.loadingTextTimer$=new un,this.authService.logoutSubject.subscribe(()=>this.billsDestroy$.next()),this.billsCustomerService.billsLoaded$.subscribe(()=>{this.b2bDashboardService.setDebtFromBills(this.billsCustomerService.payersBillingDocuments)})}resolve(){if(!this.authService.checkUserAuth())return this.router.navigate(["/signin"]),Ao;V.cookieSession&&this.authService.checkUserSession(),this.initLocalStorageDefaults(),this.customerService.isResolvingRoute.set(!0),this.customerService.userTemplate=this.storageService.getJson(D.USER_TEMPLATE)??null,this.gtmService.userAuthIdentity=this.gtmService.returnUserIdentity(),this.loadingTextTimer$.next(),Mo(5e3).pipe(hn(this.loadingTextTimer$)).subscribe(()=>{this.customerService.isResolvingRouteShowText.set(!0)});let e=this.storageService.get(D.USER_TYPE)===rt.B2B_ADMIN&&V.hasB2BView;return Cr([this.fetchMainData(),this.fetchBanners(),this.fetchNotifications()]).pipe(vr(([t,n,o])=>({mainData:t,bannersData:n,notificationsData:o,isB2BAdmin:e})),Ke(()=>(this.storageService.clear(),this.router.navigate(["/signin"]),Ne({mainData:{},bannersData:{},notificationsData:{},isB2BAdmin:!1}))),Er(()=>{this.loadingTextTimer$.next(),this.loadingTextTimer$.complete(),this.customerService.isResolvingRouteShowText.set(!1)}))}fetchMainData(){return this.loadProfileDataAsync(),this.loadBillsAsync(),this.loadInitData().pipe(vr(e=>{let t=e?.[1]||[],n=t?.some(o=>o?.contracts?.length>0);return t?.length&&n&&this.dataEnrichmentService.enrichBillsAndContracts([],t),e}))}loadInitData(){this.customerService.isResolvingRoute.set(!0);let e=this.customerService.getCustomersData().pipe(Ke(o=>(this.customerService.customerResponse=void 0,this.offersService.isOffersLoaded.set(!0),Ne(null)))),t=this.storageService.get(D.USER_TYPE)===rt.B2B_ADMIN&&V.hasB2BView,n=[Ne(null),e];return t&&n.push(this.b2bDashboardService.fetchB2BDataServices().pipe(Ke(o=>(console.error("Error in b2bData dashboard data:",o),Ne(null))))),Cr(n).pipe(Er(()=>{this.customerService.isResolvingRoute.set(!1),this.authService.blockStepBack=!1}))}fetchBanners(){return this.bannerService.fetchBanners().pipe(Ke(e=>(this.bannerService.banners=[],console.error("Error in banners:",e),Ne(null))))}fetchNotifications(){return this.notificationService.fetchNotifications().pipe(Ke(()=>
6(this.notificationService.notifications=[],this.notificationService.notReadNotificationNumber=0,Ne(null))))}loadProfileDataAsync(){this.profileDataDestroy$.next(),this.profileService.getProfileData().pipe(hn(this.profileDataDestroy$),Ke(e=>(console.error("Error fetching profile data:",e),Ne(null)))).subscribe(e=>{if(e?.UserProfile){let t=this.customerService.customersData;t?.length&&t.some(o=>o?.contracts?.length>0)&&this.buzzeasyService.initializeBuzzeasy(t,e?.UserProfile?.usernameClear)}})}loadBillsAsync(){this.billsDestroy$.next(),this.billsCustomerService.fetchBillsDocuments().pipe(hn(this.billsDestroy$),Ke(e=>(this.billsCustomerService.payersBillingDocuments=void 0,this.billsCustomerService.hasBillingDocument=!1,this.billsCustomerService.billsLoading=!1,Ne(null)))).subscribe(e=>{if(e){let t=e?.userBillingDocuments||[],n=this.customerService.customersData;n?.length?n.some(l=>l?.contracts?.length>0)?this.dataEnrichmentService.enrichBillsAndContracts(t,n):this.dataEnrichmentService.enrichBillsWithoutContracts(t):this.dataEnrichmentService.enrichBillsWithoutContracts(t),this.customerService.hasUnpaidBills.set(this.dataEnrichmentService.computeHasUnpaidBills(t))}})}initLocalStorageDefaults(){if(!this.storageService.get(D.AUTH))return;let e=this.authService?.userAuth?.userType;!this.storageService.get(D.USER_TYPE)&&e&&this.storageService.set(D.USER_TYPE,e),this.storageService.get(D.FIRST_LOGIN)||this.storageService.set(D.FIRST_LOGIN,this.authService?.userAuth?.firstLogin?.toString()||"false"),this.storageService.get(D.XAPP)||this.authService.generateAppID(),this.storageService.getJson(D.USER_TEMPLATE)||this.initUserTemplateForChild()}initUserTemplateForChild(){let e=this.authService?.userAuth?.userType;e&&yn(e)&&V.hasEasyAccess&&this.storageService.setJson(D.USER_TEMPLATE,{userType:e,registered:this.authService?.userAuth?.registered,registeredUsers:this.authService?.userAuth?.registeredUsers?.[0]?.username||""})}static{this.\u0275fac=function(t){return new(t||i)(W(ge),W(Pe),W(Qt),W(Ii),W(In),W(Xt),W(Nn),W(Oe),W(Yt),W(de),W(Ee),W(or),W(ll))}}static{this.\u0275prov=le({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var dl=(()=>{class i{constructor(e){this.location=e,this.config=V}ngOnInit(){}goHome(){window.location.href=V.webDomain}goBack(){this.location.back()}static{this.\u0275fac=function(t){return new(t||i)(b(ht))}}static{this.\u0275cmp=K({type:i,selectors:[["app-default404"]],decls:14,vars:11,consts:[[1,"messages-pages","page-404"],[1,"wrap"],[1,"logo"],[1,"logo-wrap",3,"href"],["svgIcon","vivacom-logo-colored",1,"logo-vivacom","log-reg"],[1,"title"],[1,"btn-1","radius100","background-2",3,"click"]],template:function(t,n){t&1&&(c(0,"main",0)(1,"div",1)(2,"h1",2)(3,"a",3),w(4,"mat-icon",4),a()(),c(5,"h3",5),h(6),v(7,"translate"),a(),c(8,"p"),h(9),v(10,"translate"),a(),c(11,"button",6),k("click",function(){return n.goHome()}),h(12),v(13,"translate"),a()()()),t&2&&(s(3),S("href",ce(n.config.webDomain),Y),s(3),R(C(7,5,"messagesPages.title404")),s(3),R(C(10,7,"messagesPages.description404")),s(3),R(C(13,9,"messagesPages.back")))},dependencies:[Re,ie,ne],encapsulation:2})}}return i})();var pl=(()=>{class i{constructor(){this.config=V}ngOnInit(){}goHome(){window.location.href=V.webDomain}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=K({type:i,selectors:[["app-thank-you"]],decls:13,vars:9,consts:[[1,"messages-pages","thank-you-page"],[1,"wrap"],[1,"icon-wrap"],["src","assets/img/success-dialog-icon.svg","alt","success"],[1,"title"],[1,"btn-1","radius100","background-2",3,"click"]],template:function(t,n){t&1&&(ue(0,"main",0)(1,"div",1)(2,"div",2),nt(3,"img",3),fe(),ue(4,"h3",4),h(5),v(6,"translate"),fe(),ue(7,"p"),h(8),v(9,"translate"),fe(),ue(10,"button",5),Vt("click",function(){return n.goHome()}),h(11),v(12,"translate"),fe()()()),t&2&&(s(5),R(C(6,3,"messagesPages.thankYouTitle")),s(3),R(C(9,5,"messagesPages.thankYouDescription")),s(3),R(C(12,7,"messagesPages.back")))},dependencies:[ie,ne],encapsulation:2})}}return i})();var ml=(()=>{class i{constructor(){this.config=V}ngOnInit(){}goHome(){window.location.href=V.webDomain}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=K({type:i,selectors:[["app-error"]],decls:13,vars:9,consts:[[1,"messages-pages","error-page"],[1,"wrap"],[1,"icon-wrap"],["src","assets/img/unsuccess-dialog-icon.svg","alt","success"],[1,"title"],[1,"btn-1","radius100","background-2",3,"click"]],template:function(t,n){t&1&&(ue(0,"main",0)(1,"div",1)(2,"div",2),nt(3,"img",3),fe(),ue(4,"h3",4),h(5),v(6,"translate"),fe(),ue(7,"p"),h(8),v(9,"translate"),fe(),ue(10,"button",5),Vt("click",function(){return n.goHome()}),h(11),v(12,"translate"),fe()()()),t&2&&(s(5),R(C(6,3,"messagesPages.errorTitle")),s(3),R(C(9,5,"messagesPages.errorDescription")),s(3),R(C(12,7,"messagesPages.back")))},dependencies:[ie,ne],encapsulation:2})}}return i})();var ul=(()=>{class i{constructor(){this.config=V}ngOnInit(){}goHome(){window.location.href=V.webDomain}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=K({type:i,selectors:[["app-cancel"]],decls:13,vars:9,consts:[[1,"messages-pages","cancel-page"],[1,"wrap"],[1,"icon-wrap"],["src","assets/img/unsuccess-dialog-icon.svg","alt","success"],[1,"title"],[1,"btn-1","radius100","background-2",3,"click"]],template:function(t,n){t&1&&(ue(0,"main",0)(1,"div",1)(2,"div",2),nt(3,"img",3),fe(),ue(4,"h3",4),h(5),v(6,"translate"),fe(),ue(7,"p"),h(8),v(9,"translate"),fe(),ue(10,"button",5),Vt("click",function(){return n.goHome()}),h(11),v(12,"translate"),fe()()()),t&2&&(s(5),R(C(6,3,"messagesPages.cancelTitle")),s(3),R(C(9,5,"messagesPages.cancelDescription")),s(3),R(C(12,7,"messagesPages.back")))},dependencies:[ie,ne],encapsulation:2})}}return i})();var no=i=>({email:i});function pp(i,r){if(i&1&&(c(0,"div",1),w(1,"mat-progress-spinner",10),a()),i&2){let e=u();s(),S("mode",e.commonService.mode)("strokeWidth",2)("diameter",80)}}function mp(i,r){if(i&1){let e=L();c(0,"div",8)(1,"div",11),w(2,"img",12),a(),c(3,"div",13),h(4),v(5,"translate"),a(),c(6,"div",14)(7,"button",15),k("click",function(){I(e);let n=u();return P(n.userLogin())}),h(8),v(9,"translate"),a()()()}if(i&2){let e=u();s(4),T(" ",C(5,3,"forgottenPassword.yourPasswordChanged")," "),s(3),S("ladda",e.passwordGroupLoader),s(),T(" ",C(9,5,"login.signIn")," ")}}function up(i,r){if(i&1){let e=L();c(0,"mat-step")(1,"a",18),w(2,"mat-icon",19),a(),c(3,"div",13),h(4),v(5,"translate"),a(),c(6,"div",13),h(7),a(),c(8,"div",20)(9,"button",15),k("click",function(){I(e),u();let n=se(1),o=u();return P(o.submitOtpSend(n))}),h(10),v(11,"translate"),a()()()}if(i&2){let e=u(2);s(),S("href",ce(e.config.webDomain),Y),s(3),T(" ",C(5,6,"forgottenPassword.forgotPass")," "),s(3),T(" ",e.pageDescription()," "),s(2),S("ladda",e.isOtpSend),s(),T(" ",C(11,8,"forgottenPassword.sendMeALink")," ")}}function hp(i,r){i&1&&(c(0,"p",25),h(1),v(2,"translate"),a()),i&2&&(s(),R(C(2,1,"registration.resendEmailSent")))}function fp(i,r){if(i&1){let e=L();c(0,"mat-step")(1,"a",18),w(2,"mat-icon",19),a(),c(3,"div",13),h(4),v(5,"translate"),a(),c(6,"div",21),h(7),a(),c(8,"div",22)(9,"div",23)(10,"button",24),k("click",function(){I(e);let n=u(2);return P(n.validateOtp())}),h(11),v(12,"translate"),a(),g(13,hp,3,3,"p",25),a()()()}if(i&2){let e=u(2);s(),S("href",ce(e.config.webDomain),Y),s(3),T(" ",C(5,6,"registration.checkYourEmail")," "),s(3),T(" ",e.trs.trsTsParams("forgottenPassword.changePassLinkDesc",J(10,no,e.validateEmail))," "),s(4),T(" ",C(12,8,"registration.resendEmail")," "),s(2),_(e.resendEmailA
6ctivated?13:-1)}}function gp(i,r){if(i&1){let e=L();c(0,"span",40),k("click",function(){I(e);let n=u(4);return P(n.hidePassword=!n.hidePassword)}),w(1,"img",41),a()}}function _p(i,r){if(i&1){let e=L();c(0,"span",40),k("click",function(){I(e);let n=u(4);return P(n.hidePassword=!n.hidePassword)}),w(1,"img",42),a()}}function vp(i,r){if(i&1){let e=L();c(0,"span",40),k("click",function(){I(e);let n=u(4);return P(n.hideConfirmPassword=!n.hideConfirmPassword)}),w(1,"img",41),a()}}function Cp(i,r){if(i&1){let e=L();c(0,"span",40),k("click",function(){I(e);let n=u(4);return P(n.hideConfirmPassword=!n.hideConfirmPassword)}),w(1,"img",42),a()}}function Ep(i,r){i&1&&(c(0,"div",44),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"validationMessage.passwordMismatch")," "))}function Sp(i,r){i&1&&(c(0,"div",44),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"validationMessage.requiredField")," "))}function Tp(i,r){i&1&&(c(0,"div"),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"validationMessage.passwordHint2")," "))}function xp(i,r){i&1&&(c(0,"div",44),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"validationMessage.passwordHint2")," "))}function yp(i,r){if(i&1&&g(0,xp,3,3,"div",44),i&2){let e=u(6);_(e.formPasswordGroup.password.errors.pattern?0:-1)}}function wp(i,r){if(i&1&&(c(0,"mat-error",43),g(1,Ep,3,3,"div",44),g(2,Sp,3,3,"div",44),g(3,Tp,3,3,"div"),g(4,yp,1,1),a()),i&2){let e=u(5);s(),_(e.passwordMismatch?1:-1),s(),_(e.formPasswordGroup.repeatPassword.errors&&e.formPasswordGroup.repeatPassword.errors.required?2:-1),s(),_(e.formPasswordGroup.repeatPassword.errors&&e.formPasswordGroup.repeatPassword.errors.pattern&&e.formPasswordGroup.repeatPassword.value!==""?3:-1),s(),_(e.isPasswordSubmitted&&e.formPasswordGroup.password.errors?4:-1)}}function bp(i,r){if(i&1&&g(0,wp,5,4,"mat-error",43),i&2){let e=u(4);_(e.passwordMismatch||e.formPasswordGroup.repeatPassword.errors&&e.formPasswordGroup.repeatPassword.errors.required||e.formPasswordGroup.repeatPassword.errors&&e.formPasswordGroup.repeatPassword.errors.pattern&&e.formPasswordGroup.repeatPassword.value!==""||e.isPasswordSubmitted&&e.formPasswordGroup.password.errors&&e.formPasswordGroup.password.errors.pattern?0:-1)}}function Ip(i,r){if(i&1){let e=L();c(0,"div",13),h(1),v(2,"translate"),c(3,"div",26)(4,"button",27),w(5,"img",28),a(),c(6,"div",29)(7,"p"),h(8),v(9,"translate"),a()()()(),c(10,"div",30)(11,"div",31)(12,"mat-form-field",32)(13,"label"),h(14),v(15,"translate"),a(),c(16,"input",33),k("input",function(){I(e);let n=u(3);return P(n.onPasswordInput())}),a(),g(17,gp,2,0,"span",34),g(18,_p,2,0,"span",34),a(),c(19,"mat-form-field",35)(20,"label"),h(21),v(22,"translate"),a(),c(23,"input",36),k("input",function(){I(e);let n=u(3);return P(n.onPasswordInput())})("paste",function(){return I(e),P(!1)}),a(),g(24,vp,2,0,"span",34),g(25,Cp,2,0,"span",34),a(),g(26,bp,1,1),a()(),c(27,"div",37)(28,"button",38),k("click",function(){I(e);let n=u(3);return P(n.goBack())}),h(29),v(30,"translate"),a(),c(31,"button",39),k("click",function(){I(e);let n=u(3);return P(n.submitResetPassword())}),h(32),v(33,"translate"),a()()}if(i&2){let e=u(3);s(),T(" ",C(2,16,"forgottenPassword.enterNewPass")," "),s(7),R(C(9,18,"validationMessage.passwordHint2")),s(6),R(C(15,20,"registration.password")),s(2),S("type",e.hidePassword?"password":"text"),s(),_(e.hidePassword?17:-1),s(),_(e.hidePassword?-1:18),s(3),R(C(22,22,"forgottenPassword.enterNewPassAgain")),s(2),S("type",e.hideConfirmPassword?"password":"text"),s(),_(e.hideConfirmPassword?24:-1),s(),_(e.hideConfirmPassword?-1:25),s(),_(e.isPasswordSubmitted?26:-1),s(2),S("disabled",e.isPasswordChanging),s(),T(" ",C(30,24,"forgottenPassword.cancel")," "),s(2),S("ladda",e.isPasswordChanging)("disabled",e.isPasswordChanging),s(),T(" ",C(33,26,"forgottenPassword.confirm")," ")}}function Pp(i,r){i&1&&(c(0,"p",25),h(1),v(2,"translate"),a()),i&2&&(s(),R(C(2,1,"registration.resendEmailSent")))}function kp(i,r){if(i&1){let e=L();c(0,"div",8)(1,"div",13),h(2),v(3,"translate"),a(),c(4,"div",21),h(5),a(),c(6,"div",22)(7,"div",23)(8,"button",24),k("click",function(){I(e);let n=u(3);return P(n.validateOtp())}),h(9),v(10,"translate"),a(),g(11,Pp,3,3,"p",25),a()()()}if(i&2){let e=u(3);s(2),T(" ",C(3,4,"forgottenPassword.expiredLinkTitle")," "),s(3),T(" ",e.trs.trsTsParams("forgottenPassword.expiredLinkDesc",J(8,no,e.validateEmail))," "),s(4),T(" ",C(10,6,"registration.resendEmail")," "),s(2),_(e.resendEmailA
6ctivated?11:-1)}}function Ap(i,r){i&1&&(c(0,"p",25),h(1),v(2,"translate"),a()),i&2&&(s(),R(C(2,1,"registration.resendEmailSent")))}function Mp(i,r){if(i&1){let e=L();c(0,"div",13),h(1),v(2,"translate"),a(),c(3,"div",21),h(4),a(),c(5,"div",22)(6,"div",23)(7,"button",24),k("click",function(){I(e);let n=u(3);return P(n.validateOtp())}),h(8),v(9,"translate"),a(),g(10,Ap,3,3,"p",25),a()()}if(i&2){let e=u(3);s(),T(" ",C(2,4,"registration.checkYourEmail")," "),s(3),T(" ",e.trs.trsTsParams("forgottenPassword.changePassLinkDesc",J(8,no,e.validateEmail))," "),s(4),T(" ",C(9,6,"registration.resendEmail")," "),s(2),_(e.resendEmailActivated?10:-1)}}function Np(i,r){if(i&1&&(c(0,"mat-step",17)(1,"a",18),w(2,"mat-icon",19),a(),g(3,Ip,34,28),g(4,kp,12,10,"div",8),g(5,Mp,11,10),a()),i&2){let e=u(2);s(),S("href",ce(e.config.webDomain),Y),s(2),_(e.isTokenValidated&&e.isTokenValid&&!e.resendEmailActivated?3:-1),s(),_(e.isTokenValidated&&!e.isTokenValid&&!e.resendEmailActivated?4:-1),s(),_(e.isTokenValidated&&e.resendEmailActivated?5:-1)}}function Rp(i,r){if(i&1&&(c(0,"mat-horizontal-stepper",9,0)(2,"form",16),g(3,up,12,10,"mat-step"),g(4,fp,14,12,"mat-step"),g(5,Np,6,5,"mat-step",17),a()()),i&2){let e=u();S("linear",!0),s(2),S("formGroup",e.forgottenPasswordForm),s(),_(e.hashInUrl?-1:3),s(),_(e.hashInUrl?-1:4),s(),_(e.hashInUrl?5:-1)}}var hl=(()=>{class i{get formPasswordGroup(){return this.forgottenPasswordForm.get("passwordGroup").controls}get newPassword(){return this.forgottenPasswordForm.get("passwordGroup")}get newRepeatPassword(){return this.forgottenPasswordForm.get("passwordGroup")}get otpGroup(){return this.forgottenPasswordForm.get("otpGroup")}constructor(e,t,n,o,l,m,E,y,M){this.elRef=e,this.trs=t,this.formBuilder=n,this.commonService=o,this.authService=l,this.dialog=m,this.router=E,this.gtmService=y,this.storageService=M,this.config=V,this.hidePassword=!0,this.hideConfirmPassword=!0,this.checkIcon=!1,this.passwordGroupLoader=!1,this.otpCode="",this.isOtpSend=!1,this.hashInUrl=!1,this.hash="",this.passwordMismatch=!1,this.isPasswordChanging=!1,this.isPasswordSubmitted=!1,this.code="",this.validateEmail="",this.preventBack=!1,this.resendCodeOTPActivated=!1,this.resendEmailActivated=!1,this.emailOrMsisdn="",this.isTokenValidated=!1,this.isTokenValid=!1,this.showSignInStep=!1}ngOnInit(){this.elRef.nativeElement.closest("body").classList.remove("color-scheme-light"),this.elRef.nativeElement.closest("body").classList.add("login-register-body"),this.forgottenPasswordForm=this.formBuilder.group({otpGroup:this.formBuilder.group({0:new _e("",[G.required]),1:new _e("",[G.required]),2:new _e("",[G.required]),3:new _e("",[G.required]),4:new _e("",[G.required]),5:new _e("",[G.required])},{validators:[G.max(1),G.required]}),passwordGroup:this.formBuilder.group({password:["",[G.required,G.pattern(V.passwordRegexPattern)]],repeatPassword:["",[G.required]]})}),this.checkDoesTokenExist(),this.hashInUrl&&(this.validateEmail=this.storageService.get(D.USERNAME)||"",this.linkCheck()),this.forgottenPasswordSetup(),this.commonService.setNumericKeyboardOnInput("otp-input-phone")}linkCheck(){this.isTokenValidated=!1,this.authService.forgottenPasswordLinkCheck(this.hash).subscribe(e=>{this.validateEmail=e?.username||this.validateEmail,this.isTokenValid=!0,this.isTokenValidated=!0},e=>{console.log("Error occurred while validate token: ",e),this.isTokenValid=!1,this.isTokenValidated=!0,e.status===500&&this.openConfirmationDialog("error","forgottenPasswordLinkCheck",e)})}forgottenPasswordSetup(){}resetOtpGroup(e){this.codesForm.reset(),this.otpGroup.reset(),this.moveToNext("reset"),e&&e.reset()}fixTabAndDelete(e){e.target.value!==""&&e.key==="Backspace"?(e.preventDefault(),e.target.value="",this.preventBack=!0):this.preventBack=!1,e.key==="Tab"&&e.preventDefault()}moveToNext(e){let t;if(!this.preventBack){if(e==="reset"){this.codesForm.get(String(0))?.enable();for(let n=1;n<6;n++)this.codesForm.get(String(n))?.disable();return}if(e?.srcElement?.value?.length>0){if(t=Number(e.srcElement.id)+1,t<=5)for(let n=0;n<this.otpInputs?.length;n++)t!==n?this.codesForm.get(String(n))?.disable():this.codesForm.get(String(n))?.enable();t>6&&(this.isOtpSend=!1)}else{if(t=Number(e.srcElement.id)-1,t>=0)for(let n=0;n<this.otpInputs?.length;
6n++)t!==n?this.codesForm.get(String(n))?.disable():this.codesForm.get(String(n))?.enable();if(t<0)return}this.otpInputs[t]&&this.otpInputs[t].focus()}}onPasswordInput(){this.isPasswordSubmitted=!1,this.formPasswordGroup.password.value!==this.formPasswordGroup.repeatPassword.value?this.passwordMismatch=!0:this.passwordMismatch=!1}checkDoesTokenExist(){let e=new URL(window.location.href);e.searchParams.has("token")&&(this.hashInUrl=e.searchParams.has("token"),this.hash=e.searchParams.get("token")||"")}validateOtp(){this.requestForgottenPasswordLink(void 0,!0)}submitOtpSend(e){this.hash===""&&this.requestForgottenPasswordLink(e)}requestForgottenPasswordLink(e,t=!1){let n=this.storageService.get(D.USERNAME);if(!n){this.openConfirmationDialog("error","forgottenPasswordLink",new Ti({status:400}));return}this.isOtpSend=!0,this.authService.initiateForgottenPassword(n).subscribe(()=>{this.validateEmail=n,this.resendEmailActivated=t,e&&e.next(),this.isOtpSend=!1},o=>{console.log("Error occurred while reset forgotten password: ",o),this.openConfirmationDialog("error",Wt(o)?"captchaFailed":"forgottenPasswordLink",o),this.isOtpSend=!1})}submitResetPassword(){this.isPasswordSubmitted=!0,!(this.formPasswordGroup.password.invalid||this.passwordMismatch)&&(this.isPasswordChanging=!0,this.authService.submitResetForgottenPassword(this.formPasswordGroup.repeatPassword.value.trim(),this.hash).subscribe(()=>{this.isPasswordChanging=!1,this.finishPasswordReset()},e=>{console.log("Error occurred while reset password: ",e),this.openConfirmationDialog("error",Wt(e)?"captchaFailed":"resetPassword",e),this.isPasswordChanging=!1}))}openConfirmationDialog(e,t,n){this.dialog.open(Pi,{width:"812px",panelClass:["global-dialog","gd-v3","text-align-center","confirmation-dialog-v3"],data:{image:e==="success"?"assets/img/success-dialog-icon.svg":"assets/img/unsuccess-dialog-icon.svg",title:e==="success"?this.trs.trsTs("success"):this.trs.trsTs("error"),desc:e==="success"?this.trs.trsTs("account.tileCard.accountSettings.changePassword.changeSuccessTitle"):"",desc2:e==="success"?this.trs.trsTs("account.tileCard.accountSettings.changePassword.changeSuccessDescription"):this.descriptionMessage(t,n),close:this.trs.trsTs("close")}}).afterClosed().subscribe(()=>{(n?.status===414||t==="forgottenPasswordLinkCheck"&&n?.status===500)&&this.router.navigate(["/signin"])})}descriptionMessage(e,t){switch(t?.status){case 400:return e==="forgottenPasswordLink"?this.trs.trsTs("validationMessage.enterEmail"):e==="resetPassword"?this.trs.trsTs("validationMessage.requiredField"):this.trs.trsTs("httpErrorCode.default");case 406:return e==="validateOTP"?this.trs.trsTs("httpErrorCode.eon400"):e==="forgottenPasswordLink"?this.trs.trsTs("httpErrorCode.forgotten406"):e==="resetPassword"?this.trs.trsTs("httpErrorCode.resetPassword406"):this.trs.trsTs("httpErrorCode.default");case 409:return e==="validateOTP"?this.trs.trsTs("httpErrorCode.validateOTP409"):e==="forgottenPasswordLink"?this.trs.trsTs("httpErrorCode.tokenForgotten409"):e==="resetPassword"?this.trs.trsTs("httpErrorCode.resetPassword409"):this.trs.trsTs("httpErrorCode.default");case 410:return e==="validateOTP"?this.trs.trsTs("httpErrorCode.default"):e==="resetPassword"?this.trs.trsTs("httpErrorCode.resetPassword410"):this.trs.trsTs("httpErrorCode.default");case 411:return e==="resetPassword"?this.trs.trsTs("httpErrorCode.resetPassword411"):this.trs.trsTs("httpErrorCode.default");case 414:return e==="validateOTP"?this.trs.trsTs("httpErrorCode.resetPassword414"):e==="resetPassword"?this.trs.trsTs("httpErrorCode.resetPassword414"):this.trs.trsTs("httpErrorCode.default");case 508:return e==="forgottenPasswordLink"?this.trs.trsTs("httpErrorCode.forgottenPassword508"):this.trs.trsTs("httpErrorCode.default");default:return e==="captchaFailed"?this.trs.trsTs("validationMessage.captchaFailed"):e==="validateOTP"?this.trs.trsTs("httpErrorCode.resetPassword414"):e==="forgottenPasswordLink"||e==="forgottenPasswordLinkCheck"?this.trs.trsTs("httpErrorCode.forgotten406"):e==="resetPassword"?this.trs.trsTs("httpErrorCode.default"):this.trs.trsTs("httpErrorCode.default")}}pageDescription(){return this.trs.trsTsParams("forgottenPassword.description",{username:this.storageService.get(D.USERNAME)})}goBack(){this.storageService.set(D.STEP,"password"),this.router.navigate(["/signin"])}userLogin(){this.passwordGroupLoader||(this.passwordGroupLoader=!0,this.loginData())}finishPasswordReset(){this.showSignInStep=!0}loginData(){this.authService.generateAppID();let e=this.storageService.get(D.USERNAME)||"",t={username:e,password:this.formPasswordGroup.password.value,applicationId:this.authService.getAppID()||""};this.authService.login(t).subscribe(n=>{n?.accessToken?(this.storageService.remove(D.BLOCK_SESSION_NO),this.authService.setLoggedDataFromLoginResponse(n),this.authService.username=e,this.gtmService.pushToDataLayer(ji.PAGE_VIEW,{user_id:this.storageService.get(D.NOTIFICATION_UUID)||this.gtmService.returnUserIdentity()||"",account_type:n?.userType||""}),this.router.navigate([n?.userType===rt.B2B_ADMIN&&V.hasB2BView?"../home-overview":"../home"])):(this.router.navigate(["/signin"]),this.authService.blockStepBack=!1),this.passwordGroupLoader=!1},n=>{this.passwordGroupLoader=!1,this.router.navigate(["/signin"]),this.authService.blockStepBack=!1})}ngOnDestroy(){this.elRef.nativeElement.closest("body").classList.add("color-scheme-light"),this.elRef.nativeElement.closest("body").classList.remove("login-register-body"),this.storageService.remove(D.USERNAME)}static{this.\u0275fac=function(t){return new(t||i)(b(Ie),b(pe),b(bt),b(Se),b(ge),b(Xe),b(de),b(Yt),b(Ee))}}static{this.\u0275cmp=K({type:i,selectors:[["app-forgotten-password"]],decls:11,vars:7,consts:[["stepper",""],[1,"page-spinner","full-width","black-bgd"],[1,"log-reg-lang-wrapper","tile-card-box-wrapper"],[3,"isBlackBG","isLoginStyle"],[1,"login-registration-pages","forgotten-password"],[1,"container-400"],[1,"reset-btn","step-back-button",3,"click"],["src","assets/img/back-icon-white.svg","alt","back"],[1,"success-step-page"],[3,"linear"],[3,"mode","strokeWidth","diameter"],[1,"img-wrap"],["src","assets/img/success-dialog-icon.svg","alt","success icon"],[1,"description"],[1,"text-align-center"],["type","button",1,"radius100","btn-4-v3","bg-white","ladda-fix-v3",3,"click","ladda"],["autocomplete","off",3,"formGroup"],["formGroupName","passwordGroup"],[1,"logo-wrap",3,"href"],["svgIcon","vivacom-logo-colored",1,"logo-vivacom","log-reg"],[1,"text-align-center","mt-100"],[1,"small-description","age-text-2","text-align-center"],[1,"text-align-center","mt-auto"],[1,"mb-25"],["type","button",1,"reset-btn","text-color-11","font-bold","font-size-13",3,"click"],[1,"text-color-3","c-auto"],[1,"tooltip-wrap","align-fix","tooltip-login"],["type","button",1,"reset-btn","tooltip-link"],["src","assets/img/more-info-icon.svg","alt","info",1,"not-responsive"],[1,"tooltip","info"],[1,"new-pass-form"],[1,"grouped-mat-form-field","only-inputs"],[1,"style-type-v3","reset-margin","with-icon","reduced-pa
6dding"],["matInput","","autocomplete","new-password","formControlName","password","maxlength","64",3,"input","type"],[1,"eye-icon-wrap"],[1,"style-type-v3","reset-margin","with-icon","with-check-icon","reduced-padding","reset-border-bottom"],["matInput","","autocomplete","new-password","formControlName","repeatPassword","maxlength","64",3,"input","paste","type"],[1,"button-two-col-wrap"],["type","button",1,"radius100","btn-3-v3","white-border","bg-main","ladda-fix-v3","black-with-ladda",3,"click","disabled"],["type","button",1,"radius100","btn-3-v3","bg-white","ladda-fix-v3",3,"click","ladda","disabled"],[1,"eye-icon-wrap",3,"click"],["src","assets/img/eye-icon.svg","alt","eye-icon",1,"icon"],["src","assets/img/eye-hide-icon.svg","alt","eye-icon",1,"icon"],[1,"error-v3"],[1,"padding-space"]],template:function(t,n){t&1&&(g(0,pp,2,3,"div",1),c(1,"div",2),w(2,"app-language-toggle-bar",3),a(),c(3,"div",4)(4,"div",5)(5,"button",6),k("click",function(){return n.goBack()}),w(6,"img",7),h(7),v(8,"translate"),a(),g(9,mp,10,7,"div",8)(10,Rp,6,5,"mat-horizontal-stepper",9),a()()),t&2&&(_(n.hashInUrl&&!n.isTokenValidated?0:-1),s(2),S("isBlackBG",!0)("isLoginStyle",!0),s(5),T(" ",C(8,5,"login.back")," "),s(2),_(n.showSignInStep?9:10))},dependencies:[gt,Ue,ei,It,Tt,Ct,Et,St,wt,Pt,xt,yt,Zt,Jt,Re,Ge,Ze,vt,kt,_t,ie,ne],encapsulation:2})}}return i})();var zt=(function(i){return i.VALIDATING="validating",i.FORM="form",i.INVALID_LINK="invalid-link",i.SUCCESS="success",i})(zt||{}),Op=new Set([404,409,411,419]);function ro(i){return i===200?zt.FORM:zt.INVALID_LINK}function fl(i){return i===200?"success":Op.has(i)?"invalid-link":"error"}function Dp(i,r){i&1&&(c(0,"div",0),w(1,"mat-progress-spinner",9),a()),i&2&&(s(),S("mode","indeterminate")("strokeWidth",2)("diameter",80))}function Bp(i,r){i&1&&(c(0,"div",26),h(1),v(2,"translate"),a()),i&2&&(s(),R(C(2,1,"validationMessage.passwordMismatch")))}function Lp(i,r){i&1&&(c(0,"div",26),h(1),v(2,"translate"),a()),i&2&&(s(),R(C(2,1,"validationMessage.requiredField")))}function Fp(i,r){i&1&&(c(0,"div",26),h(1),v(2,"translate"),a()),i&2&&(s(),R(C(2,1,"validationMessage.passwordHint2")))}function Vp(i,r){if(i&1&&(c(0,"mat-error",25),g(1,Bp,3,3,"div",26),g(2,Lp,3,3,"div",26),g(3,Fp,3,3,"div",26),a()),i&2){let e=u(3);s(),_(e.passwordMismatch?1:-1),s(),_(e.form.controls.repeatPassword.errors&&e.form.controls.repeatPassword.errors.required?2:-1),s(),_(e.form.controls.password.errors&&e.form.controls.password.errors.pattern?3:-1)}}function Gp(i,r){if(i&1&&g(0,Vp,4,3,"mat-error",25),i&2){let e=u(2);_(e.passwordMismatch||e.form.controls.repeatPassword.errors&&e.form.controls.repeatPassword.errors.required||e.form.controls.password.errors&&e.form.controls.password.errors.pattern?0:-1)}}function Up(i,r){if(i&1){let e=L();c(0,"form",7)(1,"div",10),h(2),v(3,"translate"),c(4,"div",11)(5,"button",12),w(6,"img",13),a(),c(7,"div",14)(8,"p"),h(9),v(10,"translate"),a()()()(),c(11,"div",15)(12,"div",16)(13,"mat-form-field",17)(14,"label"),h(15),v(16,"translate"),a(),c(17,"input",18),k("input",function(){I(e);let n=u();return P(n.onPasswordInput())}),a(),c(18,"span",19),k("click",function(){I(e);let n=u();return P(n.hidePassword=!n.hidePassword)}),w(19,"img",20),a()(),c(20,"mat-form-field",21)(21,"label"),h(22),v(23,"translate"),a(),c(24,"input",22),k("input",function(){I(e);let n=u();return P(n.onPasswordInput())})("paste",function(){return I(e),P(!1)}),a(),c(25,"span",19),k("click",function(){I(e);let n=u();return P(n.hideConfirmPassword=!n.hideConfirmPassword)}),w(26,"img",20),a()(),g(27,Gp,1,1),a()(),c(28,"div",23)(29,"button",24),k("click",function(){I(e);let n=u();return P(n.submit())}),h(30),v(31,"translate"),a()()()}if(i&2){let e=u();S("formGroup",e.form),s(2),T(" ",C(3,13,"changeUsernameLink.createPasswordTitle")," "),s(7),R(C(10,15,"validationMessage.passwordHint2")),s(6),R(C(16,17,"registration.password")),s(2),S("type",e.hidePassword?"password":"text"),s(2),S("src",e.hidePassword?"assets/img/eye-icon.svg":"assets/img/eye-hide-icon.svg",Y),s(3),R(C(23,19,"changeUsernameLink.repeatPassword")),s(2),S("type",e.hideConfirmPassword?"password":"text"),s(2),S("src",e.hideConfirmPassword?"assets/img/eye-icon.svg":"assets/img/eye-hide-icon.svg",Y),s(),_(e.submitted?27:-1),s(2),S("ladda",e.isSubmitting)("disabled",e.isSubmitting),s(),T(" ",C(31,21,"changeUsernameLink.confirm")," ")}}function zp(i,r){if(i&1){let e=L();c(0,"div",8)(1,"div",10),h(2),v(3,"translate"),a(),c(4,"div",27)(5,"button",28),k("click",function(){I(e);let n=u();return P(n.goToSignIn())}),h(6),v(7,"translate"),a()()()}i&2&&(s(2),T(" ",C(3,2,"changeUsernameLink.invalidLinkTitle")," "),s(4),T(" ",C(7,4,"changeUsernameLink.signIn")," "))}function jp(i,r){if(i&1){let e=L();c(0,"div",8)(1,"div",29),w(2,"img",30),a(),c(3,"div",10),h(4),v(5,"translate"),a(),c(6,"div",31),h(7),v(8,"translate"),a(),c(9,"div",27)(10,"button",28),k("click",function(){I(e);let n=u();return P(n.goToSignIn())}),h(11),v(12,"translate"),a()()()}i&2&&(s(4),T(" ",C(5,3,"changeUsernameLink.successTitle")," "),s(3),T(" ",C(8,5,"changeUsernameLink.successDescription")," "),s(4),T(" ",C(12,7,"changeUsernameLink.signIn")," "))}var gl=(()=>{class i{constructor(e,t,n,o,l,m,E){this.authService=e,this.route=t,this.router=n,this.dialog=o,this.trs=l,this.formBuilder=m,this.elRef=E,this.config=V,this.EView=zt,this.view=zt.VALIDATING,this.submitted=!1,this.passwordMismatch=!1,this.isSubmitting=!1,this.hidePassword=!0,this.hideConfirmPassword=!0,this.token=null,this.form=this.formBuilder.group({password:["",[G.required,G.pattern(V.passwordRegexPattern)]],repeatPassword:["",[G.required]]})}ngOnInit(){this.elRef.nativeElement.closest("body")?.classList.remove("color-scheme-light"),this.elRef.nativeElement.closest("body")?.classList.add("login-register-body"),this.validateToken()}
6validateToken(){if(this.token=this.route.snapshot.queryParamMap.get("token"),!this.token){this.view=zt.INVALID_LINK;return}this.authService.changeUsernameLinkCheck(this.token).subscribe({next:()=>{this.view=ro(200)},error:e=>{this.view=ro(e.status)}})}onPasswordInput(){this.submitted=!1,this.passwordMismatch=this.form.controls.password.value!==this.form.controls.repeatPassword.value}submit(){this.submitted=!0,this.passwordMismatch=this.form.controls.password.value!==this.form.controls.repeatPassword.value,!(this.form.invalid||this.passwordMismatch)&&(this.isSubmitting=!0,this.authService.submitChangeUsernameViaToken(this.form.controls.repeatPassword.value.trim(),this.token).subscribe({next:()=>{this.isSubmitting=!1,this.view=zt.SUCCESS},error:e=>{this.isSubmitting=!1,fl(e.status)==="invalid-link"?this.view=zt.INVALID_LINK:this.openErrorDialog()}}))}goToSignIn(){this.router.navigate(["/signin"])}openErrorDialog(){this.dialog.open(Pi,{width:"812px",panelClass:["global-dialog","gd-v3","text-align-center","confirmation-dialog-v3"],data:{image:"assets/img/unsuccess-dialog-icon.svg",title:this.trs.trsTs("error"),desc2:this.trs.trsTs("httpErrorCode.default"),close:this.trs.trsTs("close")}})}ngOnDestroy(){this.elRef.nativeElement.closest("body")?.classList.add("color-scheme-light"),this.elRef.nativeElement.closest("body")?.classList.remove("login-register-body")}static{this.\u0275fac=function(t){return new(t||i)(b(ge),b(xn),b(de),b(Xe),b(pe),b(bt),b(Ie))}}static{this.\u0275cmp=K({type:i,selectors:[["app-change-username-link"]],decls:10,vars:8,consts:[[1,"page-spinner","full-width","black-bgd"],[1,"log-reg-lang-wrapper","tile-card-box-wrapper"],[3,"isBlackBG","isLoginStyle"],[1,"login-registration-pages","change-username-link"],[1,"container-400"],[1,"logo-wrap",3,"href"],["svgIcon","vivacom-logo-colored",1,"logo-vivacom","log-reg"],["autocomplete","off",3,"formGroup"],[1,"success-step-page"],[3,"mode","strokeWidth","diameter"],[1,"description"],[1,"tooltip-wrap","align-fix","tooltip-login"],["type","button",1,"reset-btn","tooltip-link"],["src","assets/img/more-info-icon.svg","alt","info",1,"not-responsive"],[1,"tooltip","info"],[1,"new-pass-form"],[1,"grouped-mat-form-field","only-inputs"],[1,"style-type-v3","reset-margin","with-icon","reduced-padding"],["matInput","","autocomplete","new-password","formControlName","password","maxlength","64",3,"input","type"],[1,"eye-icon-wrap",3,"click"],["alt","eye-icon",1,"icon",3,"src"],[1,"style-type-v3","reset-margin","with-icon","with-check-icon","reduced-padding","reset-border-bottom"],["matInput","","autocomplete","new-password","formControlName","repeatPassword","maxlength","64",3,"input","paste","type"],[1,"text-align-center","mt-100"],["type","button",1,"radius100","btn-4-v3","bg-white","ladda-fix-v3",3,"click","ladda","disabled"],[1,"error-v3"],[1,"padding-space"],[1,"text-align-center","mt-auto"],["type","button",1,"radius100","btn-4-v3","bg-white","ladda-fix-v3",3,"click"],[1,"img-wrap"],["src","assets/img/success-dialog-icon.svg","alt","success icon"],[1,"small-description","age-text-2","text-align-center"]],template:function(t,n){t&1&&(g(0,Dp,2,3,"div",0),c(1,"div",1),w(2,"app-language-toggle-bar",2),a(),c(3,"div",3)(4,"div",4)(5,"a",5),w(6,"mat-icon",6),a(),g(7,Up,32,23,"form",7),g(8,zp,8,6,"div",8),g(9,jp,13,9,"div",8),a()()),t&2&&(_(n.view===n.EView.VALIDATING?0:-1),s(2),S("isBlackBG",!0)("isLoginStyle",!0),s(3),S("href",ce(n.config.webDomain),Y),s(2),_(n.view===n.EView.FORM?7:-1),s(),_(n.view===n.EView.INVALID_LINK?8:-1),s(),_(n.view===n.EView.SUCCESS?9:-1))},dependencies:[It,Tt,Ct,Et,St,wt,Pt,xt,yt,gt,Re,vt,_t,kt,Ge,Ze,ie,Ue,ne],encapsulation:2})}}return i})();var Hp=["inputUsername"],qp=["inputPassword"],Kp=i=>({number:i}),$p=i=>({msisdn:i});function Wp(i,r){i&1&&(c(0,"mat-error",23),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"login.usernameIncorrect")," "))}function Yp(i,r){if(i&1&&w(0,"mat-error",28),i&2){let e=u(3);S("innerHTML",e.addTargetToAnchor(e.httpErrorTxtUsernameCheck)?e.addTargetToAnchor(e.httpErrorTxtUsernameCheck):e.httpErrorTxtUsernameCheck,Ve)}}function Qp(i,r){if(i&1&&(g(0,Wp,3,3,"mat-error",23),g(1,Yp,1,1,"mat-error",28)),i&2){let e=u(2);_(!(e.usernameFormGroup==null||e.usernameFormGroup.username==null||e.usernameFormGroup.username.errors==null)&&e.usernameFormGroup.username.errors.required?0:-1),s(),_(e.errorCheckUsername?1:-1)}}function Xp(i,r){if(i&1&&(c(0,"mat-error",23),h(1),v(2,"translate"),v(3,"translate"),a()),i&2){let e=u(2);s(),T(" ",e.usernameFormGroup.username.value===""?C(2,1,"login.enterYourPassword"):C(3,3,"login.usernameIncorrect")," ")}}function Zp(i,r){i&1&&(c(0,"mat-error",23),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"validationMessage.captchaFailed")," "))}function Jp(i,r){if(i&1){let e=L();c(0,"mat-step",10)(1,"form",9)(2,"div",13),h(3),c(4,"span",14)(5,"button",15),w(6,"img",16),a(),c(7,"div",17),w(8,"div",18),a()()(),c(9,"div",19)(10,"div",20)(11,"mat-form-field",21)(12,"label"),h(13),v(14,"translate"),a(),c(15,"input",22,1),k("input",function(n){I(e);let o=u();return P(o.onEmailInputChange(n))})("keyup",function(){I(e);let n=u();return P(n.checkIsEmptyInput())}),a()(),g(17,Qp,2,2),g(18,Xp,4,5,"mat-error",23),g(19,Zp,3,3,"mat-error",23),a(),c(20,"div",24)(21,"button",25),k("click",function(){I(e);let n=u(),o=se(8);return P(n.stepUsernameGroupSubmitted(o))}),h(22),v(23,"translate"),a()()(),c(24,"div",26),h(25),v(26,"translate"),c(27,"a",27),h(28),v(29,"translate"),a()()()()}if(i&2){let e=u();S("stepControl",e.loginFormGroup.get("usernameGroup")),s(),S("formGroup",e.loginFormGroup),s(2),T(" ",e.trs.trsTs("login.startLoginDesc")," "),s(5),S("innerHTML",e.trs.trsTs("login.tooltipText1"),Ve),s(5),R(C(14,13,"login.enterData")),s(4),_(e.errorUsernameGroup?17:-1),s(),_(e.showErrorEmail?18:-1),s(),_(e.captchaError?19:-1),s(2),S("ladda",e.usernameGroupLoader),s(),T(" ",C(23,15,"login.next")," "),s(3),T(" ",C(26,17,"login.dontHaveAccount")," "),s(2),S("routerLink","../registration"),s(),R(C(29,19,"login.register"))}}function em(i,r){if(i&1){let e=L();c(0,"span",38),k("click",function(){I(e);let n=u(2);return P(n.hidePass=!n.hidePass)}),w(1,"img",39),a()}}function tm(i,r){if(i&1){let e=L();c(0,"span",38),k("click",function(){I(e);let n=u(2);return P(n.hidePass=!n.hidePass)}),w(1,"img",40),a()}}function im(i,r){if(i&1&&w(0,"mat-error",28),i&2){let e=u(3);S("innerHTML",e.httpErrorTxt,Ve)}}function nm(i,r){if(i&1&&w(0,"mat-error",28),i&2){let e=u(3);S("innerHTML",e.addTargetToAnchor(e.trs.trsTs("login.enterYourPassword"))?e.addTargetToAnchor(e.trs.trsTs("login.enterYourPassword")):e.trs.trsTs("login.enterYourPassword"),Ve)}}function rm(i,r){if(i&1&&w(0,"mat-error",28),i&2){let e=u(3);S("innerHTML",e.addTargetToAnchor(e.trs.trsTs("validationMessage.requiredField"))?e.addTargetToAnchor(e.trs.trsTs("validationMessage.requiredField")):e.trs.trsTs("validationMessage.requiredField"),Ve)}}function om(i,r){if(i&1&&(g(0,im,1,1,"mat-error",28),g(1,nm,1,1,"mat-error",28),g(2,rm,1,1,"mat-error",28)),i&2){let e=u(2);_(e.httpErrorTxt!=="password"&&e.httpErrorTxt!=="requiredField"?0:-1),s(),_(e.httpErrorTxt==="password"?1:-1),s(),_(e.httpErrorTxt==="requiredField"?2:-1)}}function sm(i,r){if(i&1&&(c(0,"mat-error",28),h(1,"> "),a()),i&2){let e=u(2);S("innerHTML",e.addTargetToAnchor(e.trs.trsTs("login.error436Auth"))?e.addTargetToAnchor(e.trs.trsTs("login.error436Auth")):e.trs.trsTs("login.error436Auth"),Ve)}}function am(i,r){i&1&&(c(0,"mat-error",23),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"validationMessage.captchaFailed")," "))}function lm(i,r){if(i&1){let e=L();c(0,"mat-step",11)(1,"form",29)(2,"button",30),k("click",function(){I(e);let n=u(),o=se(8);return P(n.authService.blockStepBack?"":n.goBackPassStep(n.showStepPassword,o))}),w(3,"img",31),h(4),v(5,"translate"),a(),c(6,"div",32),h(7),v(8,"translate"),a(),c(9,"div",33)(10,"mat-form-field",34)(11,"label"),h(12),v(13,"translate"),a(),c(14,"input",35,2),k("input",function(n){I(e);let o=u();return P(o.passwordInputChange(n))})("keydown",function(n){I(e);let o=u();return P(o.onKeyDownSubmit(n))}),a(),g(16,em,2,0,"span",36),g(17,tm,2,0,"span",36),c(18,"a",37),h(19),v(20,"translate"),a()(),g(21,om,3,3),g(22,sm,2,1,"mat-error",28),g(23,am,3,3,"mat-error",23),a(),c(24,"div",24)(25,"button",25),k("click",function(){I(e);let n=u();return P(n.userLogin())}),h(26),v(27,"translate"),a()()()()}if(i&2){let e=u();S("stepControl",e.loginFormGroup.get("passwordGroup")),s(),S("formGroup",e.loginFormGroup),s(3),T(" ",C(5,15,"login.back")," "),s(3),T(" ",C(8,17,"login.enterYourPassword")," "),s(5),R(C(13,19,"login.password")),s(2),S("type",e.hidePass?"password":"text"),s(2),_(e.hidePass?16:-1),s(),_(e.hidePass?-1:17),s(),S("routerLink","../forgotten-password"),s(),R(C(20,21,"login.forgotPassword")),s(2),_(e.errorPasswordGroup&&e.httpErrorTxt?21:-1),s(),_(e.loginToManyAttempts&&e.httpErrorTxtUsernameCheck!==""?22:-1),s(),_(e.captchaError?23:-1),s(2),S("ladda",e.passwordGroupLoader),s(),T(" ",C(27,23,"login.signIn")," ")}}function cm(i,r){if(i&1&&(c(0,"div",32),h(1),a()),i&2){let e=u(2);
6s(),T(" ",e.trs.trsTsParams("login.verificationCodeDesc",J(1,Kp,e.maskedMsisdn))," ")}}function dm(i,r){i&1&&(c(0,"mat-error",55),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"validationMessage.emptyOtp")," "))}function pm(i,r){if(i&1){let e=L();c(0,"div",41)(1,"div",49)(2,"div",50)(3,"input",51),k("keyup",function(n){I(e);let o=u(2);return P(o.moveToNext(n))})("keydown",function(n){I(e);let o=u(2);return P(o.fixTabAndDelete(n,0))}),a()(),c(4,"div",50)(5,"input",52),k("keyup",function(n){I(e);let o=u(2);return P(o.moveToNext(n))})("keydown",function(n){I(e);let o=u(2);return P(o.fixTabAndDelete(n,1))}),a()(),c(6,"div",50)(7,"input",53),k("keyup",function(n){I(e);let o=u(2);return P(o.moveToNext(n))})("keydown",function(n){I(e);let o=u(2);return P(o.fixTabAndDelete(n,2))}),a()(),c(8,"div",50)(9,"input",54),k("keyup",function(n){I(e);let o=u(2);return P(o.moveToNext(n))})("keydown",function(n){I(e);let o=u(2);return P(o.fixTabAndDelete(n,3))})("keyup.enter",function(){I(e);let n=u(2);return P(n.userLogin("otp"))}),a()()(),g(10,dm,3,3,"mat-error",55),a()}if(i&2){let e=u(2);s(10),_(e.loginFormGroup&&e.code.length!==e.config.numOtpBox&&e.otpError?10:-1)}}function mm(i,r){i&1&&(c(0,"div")(1,"mat-error",23),h(2),v(3,"translate"),a()()),i&2&&(s(2),R(C(3,1,"login.wrongCodeEntered")))}function um(i,r){i&1&&(c(0,"div")(1,"mat-error",23),h(2),v(3,"translate"),a()()),i&2&&(s(2),R(C(3,1,"validationMessage.captchaFailed")))}function hm(i,r){if(i&1&&(c(0,"div")(1,"mat-error",23),h(2),a()()),i&2){let e=u(2);s(2),R(e.blockSession24Error)}}function fm(i,r){if(i&1&&(c(0,"div")(1,"mat-error",23),h(2),a()()),i&2){let e=u(2);s(2),R(e.httpErrorTxtUsernameCheck)}}function gm(i,r){i&1&&(c(0,"mat-error",60),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"registration.pleaseAcceptCondition")," "))}function _m(i,r){if(i&1&&(c(0,"div"),g(1,gm,3,3,"mat-error",60),a()),i&2){let e=u(3);s(),_(e.codeFormGroup.termOfUse.value!==!0?1:-1)}}function vm(i,r){if(i&1&&(c(0,"div",42),w(1,"p",56),v(2,"translate"),c(3,"div",57)(4,"div",58),w(5,"mat-slide-toggle",59),g(6,_m,2,1,"div"),a()()()),i&2){let e=u(2);s(),S("innerHTML",C(2,2,"registration.termsOfUse"),Ve),s(5),_(e.loginInProcess?6:-1)}}function Cm(i,r){i&1&&(c(0,"p",48),h(1),v(2,"translate"),a()),i&2&&(s(),R(C(2,1,"registration.resendCodeSent")))}function Em(i,r){if(i&1){let e=L();c(0,"mat-step")(1,"button",30),k("click",function(){I(e);let n=u(),o=se(8);return P(n.resetOtpGroup(o))}),w(2,"img",31),h(3),v(4,"translate"),a(),g(5,cm,2,3,"div",32),c(6,"form",29),g(7,pm,11,1,"div",41),g(8,mm,4,3,"div"),g(9,um,4,3,"div"),g(10,hm,3,1,"div"),g(11,fm,3,1,"div"),g(12,vm,7,4,"div",42),c(13,"div",43)(14,"div",44)(15,"button",45),k("click",function(){I(e);let n=u();return P(n.userLogin("otp"))}),h(16),v(17,"translate"),a()(),c(18,"div")(19,"span",46),h(20),v(21,"translate"),a(),c(22,"button",47),k("click",function(){I(e);let n=u(),o=se(8);return P(n.usernameCheck(o,"resend"))}),h(23),v(24,"translate"),a(),g(25,Cm,3,3,"p",48),a()()()()}if(i&2){let e=u();s(3),T(" ",C(4,23,"login.back")," "),s(2),_(e.isMsisdn?5:-1),s(),S("formGroup",e.loginFormGroup),s(),_(e.isOtpSend?7:-1),s(),_(e.wrongOtpCode?8:-1),s(),_(e.captchaError?9:-1),s(),_(e.blockSession24Error&&e.blockSession24Error!=="true"?10:-1),s(),_(e.loginToManyAttempts&&e.httpErrorTxtUsernameCheck!==""?11:-1),s(),_(e.firstLogin?12:-1),s(3),ut(Fe("radius100 btn-4-v3 bg-white ladda-fix-v3 ",e.blockSession24Error==="true"?"disabled":"")),S("disabled",e.blockSession24Error==="true"||e.disableResendButton)("ladda",e.passwordGroupLoader),s(),T(" ",C(17,25,"login.submit")," "),s(4),R(C(21,27,"login.didntGetCode")),s(2),ut(Fe("reset-btn text-color-11 font-bold font-size-14 ladda-fix-v3 ",e.otpCountError===3||e.blockSession24Error?"resend-disabled disabled":"")),S("disabled",e.disableResendButton),s(),Sn(" ",C(24,29,"login.resendCode")," ",e.countdownSeconds>0?"("+e.formattedCountdown()+")":""," "),s(2),_(e.resendCodeActivated?25:-1)}}function Sm(i,r){if(i&1&&(c(0,"div"),w(1,"mat-error",28),a()),i&2){let e=u(2);s(),S("innerHTML",e.addTargetToAnchor(e.httpErrorTxt)?e.addTargetToAnchor(e.httpErrorTxt):e.httpErrorTxt,Ve)}}function Tm(i,r){i&1&&(c(0,"mat-error",23),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"validationMessage.requiredField")," "))}function xm(i,r){i&1&&(c(0,"mat-error",23),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"validationMessage.required8chars")," "))}function ym(i,r){if(i&1&&(c(0,"div"),g(1,Tm,3,3,"mat-error",23),g(2,xm,3,3,"mat-error",23),a()),i&2){let e=u(2);s(),_(e.pukFormGroup.puk.errors&&e.pukFormGroup.puk.errors.required?1:-1),s(),_(e.pukFormGroup.puk.errors&&(e.pukFormGroup.puk.errors.minlength||e.pukFormGroup.puk.errors&&e.pukFormGroup.puk.errors.maxlength)?2:-1)}}function wm(i,r){i&1&&(c(0,"mat-error",23),h(1),v(2,"translate"),a()),i&2&&(s(),R(C(2,1,"validationMessage.captchaFailed")))}function bm(i,r){if(i&1){let e=L();c(0,"mat-step")(1,"div",61)(2,"div",32),h(3),a(),c(4,"mat-form-field",62)(5,"label"),h(6),v(7,"translate"),a(),c(8,"input",63),k("keydown",function(n){I(e);let o=u();return P(o.onKeyDownSubmit(n,"puk"))}),a(),g(9,Sm,2,1,"div"),g(10,ym,3,2,"div"),a(),g(11,wm,3,3,"mat-error",23),c(12,"button",25),k("click",function(){I(e);let n=u();return P(n.userLogin("puk"))}),h(13),v(14,"translate"),a()()()}if(i&2){let e=u();s(3),T(" ",e.trs.trsTsParams("login.enterPukText",J(11,$p,e.maskedMsisdn))," "),s(3),R(C(7,7,"login.pukInput")),s(3),_(e.errorPukGroup&&e.httpErrorTxt?9:-1),s(),_(e.errorPukGroup?10:-1),s(),_(e.captchaError?11:-1),s(),S("ladda",e.pukGroupLoader),s(),T(" ",C(14,9,"login.next")," ")}}function Im(i,r){i&1&&w(0,"app-mobile-app-download",12),i&2&&S("noDetectedOS",!1)}var _l=(()=>{class i{get usernameFormGroup(){return this.loginFormGroup.get("usernameGroup").controls}get pukFormGroup(){return this.loginFormGroup.get("pukGroup").controls}get passwordFormGroup(){return this.loginFormGroup.get("passwordGroup").controls}get codeFormGroup(){return this.loginFormGroup.get("codeGroup").controls}constructor(e,t,n,o,l,m,E,y,M){this.authService=e,this.router=t,this.trs=n,this.elRef=o,this.formBuilder=l,this.commonService=m,this.navigationService=E,this.zone=y,this.storageService=M,this.config=V,this.cKey="controls",this.errorUsernameGroup=!1,this.errorCheckUsername=!1,this.usernameGroupLoader=!1,this.pukGroupLoader=!1,this.errorPasswordGroup=!1,this.errorPukGroup=!1,this.passwordGroupLoader=!1,this.codeGroupLoader=!1,this.showErrorEmail=!1,this.loginToManyAttempts=!1,this.msisdn="",this.isMsisdn=!1,this.showPuk=!1,this.maskedMsisdn="",this.wrongOtpCode=!1,this.phoneHashed="",this.httpErrorTxt="",this.isOtpSend=!1,this.code="",this.otpError=!1,this.firstLogin=!1,this.loginInProcess=!1,this.customValidationErrorUsername=!1,this.preventBack=!1,this.resendCodeActivated=!1,this.hidePass=!0,this.numberFromUsernameCheck="false",this.httpErrorTxtUsernameCheck="",this.countdownSeconds=0,this.otpCountError=0,this.blockSessionNumber=0,this.blockSession24Error="",this.disableResendButton=!1,this.showStepPassword=!1,this.captchaError=!1;let N=this.storageService.get(D.BLOCK_SESSION_NO);N&&N==="4"&&(this.blockSession24Error=this.trs.trsTs("login.accessRestricted")),this.navigationService.history=[]}ngOnInit(){this.storageService.remove(D.LANGUAGE),this.commonService.setDefaultLanguage(),this.commonService.isOnSigningPage=!0,this.elRef.nativeElement.closest("body").classList.remove("color-scheme-light"),this.elRef.nativeElement.closest("body").classList.add("login-register-body"),this.initiateLoginForm(),this.checkPasswordStep()}ngAfterViewInit(){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.inputUsername?.nativeElement?.focus()})},350)})}checkPasswordStep(){let e=this.storageService.get(D.USERNAME)||"";e||this.storageService.remove(D.STEP);let t=this.storageService.get(D.STEP)||"";this.showStepPassword=!!t,this.showStepPassword?this.usernameFormGroup.username.setValue(e):this.storageService.remove(D.USERNAME)}goBackPassStep(e,t){e&&(this.showStepPassword=!1,this.storageService.remove(D.STEP),this.storageService.remove(D.USERNAME)),t.previous()}initiateLoginForm(){this.loginFormGroup=this.formBuilder.group({usernameGroup:this.formBuilder.group({username:["",[G.required,this.commonService.customUsernameValidator]]}),passwordGroup:this.formBuilder.group({password:["",[G.required]]}),codeGroup:this.formBuilder.group({code:["",[G.required]],termOfUse:[!1,[G.required]]}),otpGroup:this.formBuilder.group({},{validators:[G.max(1),G.required]}),pukGroup:this.formBuilder.group({puk:["",[G.required,G.minLength(8),G.maxLength(8)]]})}),Array.from({length:V.numOtpBox},(t,n)=>
6this.createOtpControl(n)).forEach((t,n)=>{this.loginFormGroup.get("otpGroup").addControl(n.toString(),t)});for(let t=1;t<V.numOtpBox;t++)this.loginFormGroup.get("otpGroup").get(String(t)).disable();this.inputs=document.getElementsByClassName("otp-input-phone")}createOtpControl(e){return new _e("",[G.required])}stepUsernameGroupSubmitted(e){this.usernameFormGroup.username.setValue(this.usernameFormGroup.username.value.trim()),this.customValidationErrorUsername=!1,this.usernameGroupLoader=!0,this.errorUsernameGroup=!1,this.errorCheckUsername=!1,this.usernameFormGroup.username.markAsTouched(),this.usernameFormGroup.username.updateValueAndValidity(),this.usernameFormGroup.username.invalid?(this.errorUsernameGroup=!0,this.customValidationErrorUsername=!0,this.usernameGroupLoader=!1):(this.customValidationErrorUsername=!1,this.usernameCheck(e))}checkIsEmptyInput(){this.usernameFormGroup.username.value.trim()===""&&(this.errorUsernameGroup=!1,this.showErrorEmail=!1,this.customValidationErrorUsername=!1),this.usernameFormGroup.username.value.includes("mailto:")&&this.usernameFormGroup.username.setValue(this.usernameFormGroup.username.value.replace("mailto:",""))}onEmailInputChange(e){let t=e.target,n=t.value.toLowerCase();t.value=n,this.usernameFormGroup.username?.setValue(n,{emitEvent:!1}),this.errorUsernameGroup=!1,this.errorCheckUsername=!1,this.showErrorEmail=!1,this.customValidationErrorUsername=!1}usernameCheck(e,t){this.loginToManyAttempts=!1,this.captchaError=!1,this.httpErrorTxtUsernameCheck="",this.showErrorEmail=!1,this.wrongOtpCode=!1,this.disableResendButton=!1,this.countdownSeconds=0;let n=this.usernameFormGroup?.username?.value?.trim(),o=this.normalizeLoginMsisdn(n);if(n.includes("@")){if(!vs(n))return this.usernameGroupLoader=!1,this.showErrorEmail=!0}else if(this.isPhoneLikeLoginInput(n)){if(!o){this.usernameGroupLoader=!1,this.errorUsernameGroup=!0,this.errorCheckUsername=!0,this.httpErrorTxtUsernameCheck=this.trs.trsTs("login.error409");return}}else return this.usernameGroupLoader=!1,this.showErrorEmail=!0;this.firstLogin=!1,this.numberFromUsernameCheck="false",this.httpErrorTxt="",this.resendCodeActivated=!1,this.resetOtpGroup(),t?this.resendCodeActivated=!0:(this.isOtpSend=!0,this.isMsisdn=!1,this.commonService.setNumericKeyboardOnInput("otp-input-phone")),this.usernameGroupLoader=!0,this.errorUsernameGroup=!1,this.errorCheckUsername=!1;let l={username:o||this.usernameFormGroup?.username?.value?.trim().toLowerCase()};this.blockSession24Error="",this.authService.checkUsername(l).subscribe(m=>{let E=m?.checkUsername;if(E?.number===!0&&!!E?.msisdn&&E){this.usernameGroupLoader=!1,this.storageService.set(D.USERNAME,l.username||""),this.storageService.set(D.EASY_ACCESS_MSISDN,l.username||""),this.storageService.set(D.USER_LOGGED_WITH_MOBILE_NUMBER,"true"),this.firstLogin=E.firstLogin===!0,this.numberFromUsernameCheck="true",this.isMsisdn=!0,this.showPuk=!1,this.msisdn=E.msisdn||"",this.maskedMsisdn=E.sendOtpDialog||this.maskMsisdn(E.msisdn||""),this.phoneHashed=this.maskPhoneForDisplay(E.msisdn||""),this.authService.sessionId=E.sessionId||"",this.passwordFormGroup.password.setValue(""),setTimeout(()=>{this.inputs?.length&&this.inputs?.[0]?.focus()},300),t||e.next();return}this.openPasswordStep(e,l.username||"",t)},m=>{if(console.log("Error while checking username: ",m),this.usernameGroupLoader=!1,this.errorUsernameGroup=!0,this.errorCheckUsername=!0,Wt(m)){this.errorUsernameGroup=!1,this.errorCheckUsername=!1,this.captchaError=!0;return}let E=m?.error?.blockFor;(m.status===431||m.status===432||m.status===433)&&E&&this.startCountdown(E,String(m.status)),this.handleErrorUsernameCheckBg(m),this.resetOtpGroup(),this.usernameGroupLoader=!1})}normalizeLoginMsisdn(e){let t=[/^\+359([89]\d{8})$/,/^359([89]\d{8})$/,/^\(0\)([89]\d{8})$/,/^0([89]\d{8})$/,/^([89]\d{8})$/];for(let n of t){let o=e.match(n);if(o)return o[1]}return null}isPhoneLikeLoginInput(e){return/^[+()\d]+$/.test(e)}maskedMsisdnSymbolsLength(e){let t="",n=e.length-7;for(let o=0;o<n;o++)t+="x";return t}maskMsisdn(e){return`${e.substring(0,4)}${this.maskedMsisdnSymbolsLength(e)}${e.substring(e.length-3)}`}maskPhoneForDisplay(e){return`${e.substring(0,4)} xxxx ${e.substring(e.length-3)}`}openPasswordStep(e,t,n){this.usernameGroupLoader=!1,this.storageService.set(D.USERNAME,t),this.storageService.remove(D.EASY_ACCESS_MSISDN),this.storageService.remove(D.USER_LOGGED_WITH_MOBILE_NUMBER),this.passwordFormGroup.password.setValue(""),this.isMsisdn=!1,this.showPuk=!1,this.numberFromUsernameCheck="false",this.msisdn="",this.maskedMsisdn="",this.phoneHashed="",this.authService.sessionId="",n||e.next(),this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.inputPassword?.nativeElement?.focus()})},350)})}onKeyDownSubmit(e,t){e.key==="Enter"&&(e.preventDefault(),this.userLogin(t))}userLogin(e){if(!(this.blockSession24Error==="true"||this.disableResendButton)&&!this.passwordGroupLoader){if(this.captchaError=!1,this.passwordGroupLoader=!0,this.firstLogin&&!this.codeFormGroup?.termOfUse?.value){this.passwordGroupLoader=!1,this.loginInProcess=!0;return}this.passwordFormGroup.invalid||this.passwordFormGroup?.password?.value?.trim()===""&&e!=="otp"?(this.passwordGroupLoader=!1,this.errorPasswordGroup=!0,this.passwordFormGroup.password.value.trim()===""?this.httpErrorTxt="password":this.httpErrorTxt="requiredField",this.passwordGroupLoader=!1):(this.passwordGroupLoader=!0,this.errorPasswordGroup=!1,this.loginData(e))}}formattedCountdown(){return this.formatTime(this.countdownSeconds)}startCountdown(e,t){this.countdownIntervalId&&clearInterval(this.countdownIntervalId),this.countdownSeconds=e,this.blockSession24Error="true",this.disableResendButton=!0,this.countdownIntervalId=setInterval(()=>{this.countdownSeconds--,this.countdownSeconds===0&&(this.disableResendButton=!1,this.blockSession24Error="",clearInterval(this.countdownIntervalId),this.countdownIntervalId=null)},1e3)}formatTime(e){let t=Math.floor(e/3600),n=Math.floor(e%3600/60),o=e%60;return`${this.padZero(t)}:${this.padZero(n)}:${this.padZero(o)}`}padZero(e){return e<10?`0${e}`:e.toString()}loginData(e){this.otpError=!1;let t="";for(let o=0;o<V.numOtpBox;o++)t+=this.loginFormGroup.get("otpGroup").get(String(o)).value;if(e&&e==="otp"&&t.length!==V.numOtpBox)return console.log("code",t),this.passwordGroupLoader=!1,this.otpError=!0;if(this.code=t,e==="puk"&&(this.code=this.pukFormGroup.puk.value.trim(),this.code.length!==8))return console.log("this.pukFormGroup.puk.errors",this.pukFormGroup.puk.errors),console.log("this.pukFormGroup.puk",this.pukFormGroup.puk),this.errorPukGroup=!0;this.passwordGroupLoader=!0,this.authService.generateAppID();let n;if(!e)n={username:this.usernameFormGroup.username.value.trim(),password:this.passwordFormGroup.password.value.trim(),applicationId:this.authService.getAppID()||void 0};else{if(!this.code||this.code.length<V.numOtpBox)return this.passwordGroupLoader=!1,this.resetOtpGroup(),this.wrongOtpCode=!0;
6this.wrongOtpCode=!1,console.log("this.code",this.code),console.log("updated",this.code+"77"),n={username:this.numberFromUsernameCheck==="true"?this.msisdn:this.usernameFormGroup.username.value.trim(),password:this.code,applicationId:this.authService.getAppID()||void 0}}this.pukGroupLoader=!0,this.errorPukGroup=!1,this.disableResendButton=!1,console.log("request LOGIN"),this.httpErrorTxtUsernameCheck="",this.authService.login(n).subscribe(o=>{if(o?.accessToken){this.storageService.remove(D.USERNAME),this.storageService.remove(D.STEP),this.storageService.remove(D.BLOCK_SESSION_NO),this.authService.setLoggedDataFromLoginResponse(o),this.authService.username=this.usernameFormGroup?.username?.value,this.httpErrorTxt="",this.router.navigate([o?.userType===rt.B2B_ADMIN&&V.hasB2BView?"../home-overview":"../home"]);return}else this.passwordGroupLoader=!1,this.pukGroupLoader=!1,this.authService.blockStepBack=!1,e||(this.httpErrorTxt=this.trs.trsTs("httpErrorCode.default"),this.errorPasswordGroup=!0),this.resetOtpGroup();this.pukGroupLoader=!1},o=>{if(this.passwordGroupLoader=!1,this.pukGroupLoader=!1,this.authService.blockStepBack=!1,Wt(o)){this.captchaError=!0;return}let l=o?.error?.blockFor;if(o.status===431){this.disableResendButton=!0,this.loginToManyAttempts=!0,this.resetOtpGroup(),this.errorPukGroup=!0,this.handleErrorUsernameCheckBg(o,!0),this.startCountdown(l,"431");return}if(o.status===433){this.disableResendButton=!0,this.loginToManyAttempts=!0,this.resetOtpGroup(),this.errorPukGroup=!0,this.handleErrorUsernameCheckBg(o,!0),this.startCountdown(l,"433");return}if(o.status===432){this.disableResendButton=!0,this.loginToManyAttempts=!0,this.resetOtpGroup(),this.errorPukGroup=!0,this.handleErrorUsernameCheckBg(o,!0),this.startCountdown(l,"432");return}if(o.status===430){this.disableResendButton=!0,this.loginToManyAttempts=!0,this.resetOtpGroup(),this.errorPukGroup=!0,this.handleErrorUsernameCheckBg(o,!0),l&&this.startCountdown(l,"430");return}if(o.status===436){this.loginToManyAttempts=!0,this.handleErrorUsernameCheckBg(o,!0),this.startCountdown(l,"436");return}this.wrongOtpCode=!0,this.resetOtpGroup("wrongOTP"),this.httpErrorTxt="",this.errorPasswordGroup=!0,this.handleError(o),this.errorPukGroup=!0})}passwordInputChange(e){this.errorPasswordGroup=!1,this.loginToManyAttempts=!1,this.httpErrorTxtUsernameCheck=""}handleError(e){switch(e.status){case 403:this.httpErrorTxt=this.trs.trsTs("httpErrorCode.auth403");return;case 406:this.httpErrorTxt=this.trs.trsTs("httpErrorCode.auth406");return;case 408:this.httpErrorTxt=this.trs.trsTs("httpErrorCode.auth408");return;case 409:this.httpErrorTxt=this.trs.trsTs("httpErrorCode.auth409");return;case 410:this.httpErrorTxt=this.trs.trsTs("httpErrorCode.auth410");return;case 413:this.httpErrorTxt=this.trs.trsTs("httpErrorCode.auth413");return;case 414:this.httpErrorTxt=this.trs.trsTs("httpErrorCode.auth414");return;case 421:this.httpErrorTxt=this.trs.trsTs("httpErrorCode.auth421");return;case 422:this.httpErrorTxt=this.trs.trsTs("httpErrorCode.auth422");return;case 423:this.httpErrorTxt=this.trs.trsTs("httpErrorCode.auth423");return;case 434:this.httpErrorTxt=this.trs.trsTs("httpErrorCode.auth424");case 435:this.httpErrorTxt=this.trs.trsTs("httpErrorCode.auth425");return;default:this.httpErrorTxt=this.trs.trsTs("httpErrorCode.default");return}}handleErrorUsernameCheckBg(e,t){switch(console.log("httpError",e),e.status){case 406:this.httpErrorTxtUsernameCheck=this.trs.trsTs("login.error406");return;case 408:this.httpErrorTxtUsernameCheck=this.trs.trsTs("login.error408");return;case 409:this.httpErrorTxtUsernameCheck=this.trs.trsTs("login.error409");return;case 415:this.httpErrorTxtUsernameCheck=this.trs.trsTs("login.error415");return;case 410:this.httpErrorTxtUsernameCheck=this.trs.trsTs("login.error410");return;case 411:this.httpErrorTxtUsernameCheck=this.trs.trsTs("login.error411");return;case 412:this.httpErrorTxtUsernameCheck=this.trs.trsTs("login.error412");return;case 413:this.httpErrorTxtUsernameCheck=this.trs.trsTs("login.error413");return;case 414:this.httpErrorTxtUsernameCheck=this.trs.trsTs("login.error414");return;case 416:this.httpErrorTxtUsernameCheck=this.trs.trsTs("login.error416");return;case 417:this.httpErrorTxtUsernameCheck=this.trs.trsTs("login.error417");return;case 418:this.httpErrorTxtUsernameCheck=this.trs.trsTs("login.error418");return;case 419:this.httpErrorTxtUsernameCheck=this.trs.trsTs("login.error419");return;case 421:this.httpErrorTxtUsernameCheck=this.trs.trsTs("login.error421");return;case 430:this.loginToManyAttempts=!0,this.httpErrorTxtUsernameCheck=this.trs.trsTs("login.error430");return;case 431:this.loginToManyAttempts=!0,this.httpErrorTxtUsernameCheck=this.trs.trsTs("login.error431");return;case 432:this.loginToManyAttempts=!0,this.httpErrorTxtUsernameCheck=this.trs.trsTs("login.error432");return;case 433:this.loginToManyAttempts=!0,this.httpErrorTxtUsernameCheck=this.trs.trsTs("login.error433");return;case 436:this.httpErrorTxtUsernameCheck=this.trs.trsTs("login.error436Auth");return;default:this.httpErrorTxtUsernameCheck=this.trs.trsTs("login.errorField1");return}}resetOtpGroup(e){this.loginFormGroup.get("otpGroup").reset(),this.moveToNext("reset"),e&&e!=="wrongOTP"&&(e.reset(),this.wrongOtpCode=!1)}fixTabAndDelete(e,t){e.target.value!==""&&e.key==="Backspace"?(e.preventDefault(),e.target.value="",this.loginFormGroup.get("otpGroup").get(String(t)).setValue(""),this.preventBack=!0):this.preventBack=!1,e.key==="Tab"&&e.preventDefault()}moveToNext(e){let t;if(!this.preventBack){if(e==="reset"){this.blockSession24Error||this.loginFormGroup.get("otpGroup").get(String(0)).enable();for(let n=1;n<V.numOtpBox;n++)this.loginFormGroup.get("otpGroup").get(String(n)).disable();return}if(this.httpErrorTxtUsernameCheck="",this.wrongOtpCode=!1,this.blockSession24Error="",e.srcElement.value.length>0){if(t=Number(e.srcElement.id)+1,t<=V.numOtpBox-1)for(let n=0;n<this.inputs.length;n++)t!==n?this.loginFormGroup.get("otpGroup").get(String(n)).disable():this.loginFormGroup.get("otpGroup").get(String(n)).enable();t>V.numOtpBox&&(this.isOtpSend=!1)}else{if(t=Number(e.srcElement.id)-1,t>=0)for(let n=0;n<this.inputs.length;n++)t!==n?this.loginFormGroup.get("otpGroup").get(String(n)).disable():this.loginFormGroup.get("otpGroup").get(String(n)).enable();if(t<0)return}this.inputs[t]&&this.inputs[t].focus()}}addTargetToAnchor(e){let n=new DOMParser().parseFromString(e,"text/html"),o=n.querySelector("a");if(o)return o.setAttribute("target","_blank"),new XMLSerializer().serializeToString(n)}goToHome(){this.storageService.remove(D.STEP),window.location.href=V.webDomain}ngOnDestroy(){this.elRef.nativeElement.closest("body").classList.add("color-scheme-light"),this.elRef.nativeElement.closest("body").classList.remove("login-register-body")}static{this.\u0275fac=function(t){return new(t||i)(b(ge),b(de),b(pe),b(Ie),b(bt),b(Se),b($t),b(_n),b(Ee))}}static{this.\u0275cmp=K({type:i,selectors:[["app-login"]],viewQuery:function(t,n){if(t&1&&(ai(Hp,5),ai(qp,5)),t&2){let o;li(o=ci())&&(n.inputUsername=o.first),li(o=ci())&&(n.inputPassword=o.first)}},decls:15,vars:11,consts:[["stepper",""],["inputUsername",""],["inputPassword",""],[1,"log-reg-lang-wrapper","tile-card-box-wrapper"],[3,"isBlackBG","isLoginStyle"],[1,"login-registration-pages"],[1,"container-400"],[1,"logo-wrap",3,"click"],["svgIcon","vivacom-logo-colored",1,"logo-vivacom","log-reg"],[3,"formGroup"],["formGroupName","usernameGroup",3,"stepControl"],["formGroupName","passwordGroup",3,"stepControl"],[3,"noDetectedOS"],[1,"description","start-login-desc"],[1,"tooltip-wrap","align-fix","tooltip-login"],["type","button",1,"reset-btn","tooltip-link"],["src","assets/img/more-info-icon.svg","alt","info",1,"not-responsive"],[1,"tooltip","info"],[1,"user-content",3,"innerHTML"],["formGroupName","usernameGroup",1,"main-login-form"],[1,"mb-32"],["floatLabel","never",1,"style-type-v3","reset-margin"],["matInput","","autocomplete","new-password","type","text","formControlName","username",3,"input","keyup"],[1,"error-v3"],[1,"text-align-center","mt-auto"],["type","submit",1,"radius100","btn-4-v3","bg-white","ladda-fix-v3",3,"click","ladda"],[1,"footer-desc"],[3,"routerLink"],[1,"error-v3",3,"innerHTML"],[1,"main-login-form",3,"formGroup"],["type","button",1,"reset-btn","step-back-button",3,"click"],["src","assets/img/back-icon-white.svg","alt","back"],[1,"description"],["formGroupName","passwordGroup",1,"mb-52"],["floatLabel","never",1,"style-type-v3","reset-margin","with-icon"],["matInput","","autocomplete","off","formControlName","password","maxlength","64",3,"input","keydown","type"],[1,"eye-icon-wrap"],[1,"forgot-link",3,"routerLink"],[1,"eye-icon-wrap",3,"click"],["src","assets/img/eye-icon.svg","alt","eye-icon",1,"icon"],["src","assets/img/eye-hide-icon.svg","alt","eye-icon",1,"icon"],["formGroupName","otpGroup",1,"form-field-holder"],[1,"terms-wrap","bg-wrap","mt-60","text-align-left"],[1,"text-align-center","mt-50"],[1,"mb-25"],["type","submit",3,"click","disabled","ladda"],[1,"text-color-3","font-size-14"],["type","button",3,"click","disabled"],[1,"text-color-3","c-auto"],[1,"otp-inputs-wrap","redesign-wrap","reset-margin","black-bg"],[1,"form-group-field"],["id","0","maxlength","1","autocomplete","off","formControlName","0",1,"otp-input-phone",3,"keyup","keydown"],["id","1","maxlength","1","autocomplete","off","formControlName","1",1,"otp-input-phone",3,"keyup","keydown"],["id","2","maxlength","1","autocomplete","off","formControlName","2",1,"otp-input-phone",3,"keyup","keydown"],["id","3","maxlength","1","autocomplete","off","formControlName","3",1,"otp-input-phone",3,"keyup","keydown","keyup.enter"],[1,"error-v3","reset-style"],[3,"innerHTML"],[1,"terms-slide-wrap"],["formGroupName","codeGroup"],["formControlName","termOfUse",1,"global-mat-slide-toggle"],[1,"error-v3","terms-error"],["formGroupName","pukGroup",1,"main-login-form"],["floatLabel","never",1,"style-type-v3","reset-margin","mb-32"],["matInput","","autocomplete","off","type","text","formControlName","puk",3,"keydown"]],template:function(t,n){if(t&1){let o=L();c(0,"div",3),w(1,"app-language-toggle-bar",4),a(),c(2,"div",5)(3,"div",6)(4,"a",7),k("click",function(){return I(o),P(n.goToHome())}),w(5,"mat-icon",8),a(),w(6,"app-userway"),c(7,"mat-horizontal-stepper",null,0)(9,"form",9),g(10,Jp,30,21,"mat-step",10),g(11,lm,28,25,"mat-step",11),g(12,Em,26,31,"mat-step"),g(13,bm,15,13,"mat-step"),a()()(),g(14,Im,1,1,"app-mobile-app-download",12),a()}t&2&&(s(),S("isBlackBG",!0)("isLoginStyle",!0),s(5),di("bg-env",!0),s(),S("@.disabled",!0),s(2),S("formGroup",n.loginFormGroup),s(),_(n.showStepPassword?-1:10),s(),_(!n.isMsisdn&&!n.showPuk?11:-1),s(),_(n.isMsisdn&&!n.showPuk?12:-1),s(),_(n.showPuk?13:-1),s(),_(n.config.hasQrCode?14:-1))},dependencies:[Ge,Ze,Ue,Di,Re,ei,It,Tt,Ct,Et,St,wt,Pt,xt,yt,Zt,Jt,vt,kt,_t,qt,ki,Ms,ie,ne],encapsulation:2})}}return i})();var Ji=(()=>{class i{constructor(e,t){this.authService=e,this.router=t}canActivate(e,t){let n=this.authService.userAuth;if(n){let l=n.userType===rt.B2B_ADMIN&&V.hasB2BView?"/home-overview":"/home";return this.router.navigateByUrl(l),!1}return!0}static{this.\u0275fac=function(t){return new(t||i)(W(ge),W(de))}}static{this.\u0275prov=le({token:i,factory:i.\u0275fac})}}return i})();var ii=(function(i){return i.EGN="EGN",i.LNC="LNC",i.PASSPORT_ID="PASSPORT",i.BULSTAT="BULSTAT",i})(ii||{});function Pm(i,r){if(i&1&&(ue(0,"p",7),h(1),fe()),i&2){let e=u();s(),R(e.data.desc)}}var vl=(()=>{class i{constructor(e,t){this.dialogRef=e,this.data=t,this.config=V}ngOnInit(){}closeDialog(){this.dialogRef.close()}static{this.\u0275fac=function(t){return new(t||i)(b(wn),b(bn))}}static{this.\u0275cmp=K({type:i,selectors:[["app-app-what-is-contract-number-dialog"]],decls:13,vars:7,consts:[[1,"dialog-content"],[1,"reset-btn","close-icon",3,"click"],["src","assets/img/close-icon.png","alt","close"],[1,"container-400"],[1,"title"],[1,"img-wrapper"],["alt","bill",3,"src"],[1,"font-size-14","font-light","mb-35","text-align-left"],[1,"text-align-center"],[1,"btn-3-v3","radius100","background-2",3,"click"]],template:function(t,n){t&1&&(ue(0,"div",0)(1,"button",1),Vt("click",function(){return n.closeDialog()}),nt(2,"img",2),fe(),ue(3,"div",3)(4,"h3",4),h(5),fe(),ue(6,"div",5),nt(7,"img",6),fe(),g(8,Pm,2,1,"p",7),ue(9,"div",8)(10,"button",9),Vt("click",function(){return n.closeDialog()}),h(11),v(12,"translate"),fe()()()()),t&2&&(s(5),R(n.data.title),s(2),zo("src",ce(n.data.img),Y),s(),_(n.data.desc?8:-1),s(3),T(" ",C(12,5,"ok")," "))},dependencies:[ie,ne],styles:["@media (min-width: 1000px){ .gd-v3 mat-dialog-container.mat-mdc-dialog-container{padding:32px!important}}.title[_ngcontent-%COMP%]{font-weight:700;font-size:18px;margin-bottom:39px;text-align:center}.img-wrapper[_ngcontent-%COMP%]{_height:180px;display:flex;align-items:center;justify-content:center;margin-bottom:15px;border:1px solid #D4D7E4;border-radius:5px}.img-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%}.dialog-content[_ngcontent-%COMP%]{position:relative;padding-top:10px}@media (min-width: 600px){.dialog-content[_ngcontent-%COMP%]{padding-top:0}}.dialog-content[_ngcontent-%COMP%] .close-icon[_ngcontent-%COMP%]{width:20px;position:absolute;right:0;top:-20px}@media (min-width: 600px){.dialog-content[_ngcontent-%COMP%] .close-icon[_ngcontent-%COMP%]{top:-10px}}@media (min-width: 1000px){.dialog-content[_ngcontent-%COMP%] .close-icon[_ngcontent-%COMP%]{right:10px}}"]})}}return i})();var oo={sendingNotPossible:"registration.resend412Error",resendLimitReached:"registration.resend434Error",generic:"httpErrorCode.default"};function Cl(i){switch(i){case 412:return oo.sendingNotPossible;case 434:return oo.resendLimitReached;default:return oo.generic}}var km=["stepper"],Am=()=>["/signin"],El=i=>({email:i}),Mm=i=>({number:i}),Nm=i=>({"fix-large-error":i}),Rm=i=>({"fix-large-error-114":i}
6),Om=(i,r)=>r.value;function Dm(i,r){if(i&1&&w(0,"app-server-error",1),i&2){let e=u();S("callback",e.reloadPage.bind(e))}}function Bm(i,r){if(i&1&&(c(0,"div",2),w(1,"mat-progress-spinner",7),a()),i&2){let e=u();s(),S("mode",e.commonService.mode)("strokeWidth",2)("diameter",80)}}function Lm(i,r){i&1&&(c(0,"button",9),w(1,"img",17),h(2),v(3,"translate"),a()),i&2&&(S("routerLink",Si(4,Am)),s(2),T(" ",C(3,2,"login.back")," "))}function Fm(i,r){if(i&1){let e=L();c(0,"button",18),k("click",function(){I(e);let n=u(2);return P(n.goBack())}),w(1,"img",17),h(2),v(3,"translate"),a()}i&2&&(s(2),T(" ",C(3,1,"login.back")," "))}function Vm(i,r){if(i&1&&w(0,"div",27),i&2){let e=u(3);S("innerHTML",e.httpInitiatedErrorTxt,Ve)}}function Gm(i,r){i&1&&(c(0,"mat-error",32),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"registration.registrationRequired")," "))}function Um(i,r){i&1&&(c(0,"mat-error",32),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"registration.idNumberCharactersLength")," "))}function zm(i,r){if(i&1&&(c(0,"div"),g(1,Gm,3,3,"mat-error",32),g(2,Um,3,3,"mat-error",32),a()),i&2){let e=u(3);s(),_(e.formInitiateGroup[e.cKey].taxNumber.errors&&e.formInitiateGroup[e.cKey].taxNumber.errors.required?1:-1),s(),_(e.formInitiateGroup[e.cKey].taxNumber.errors&&(e.formInitiateGroup[e.cKey].taxNumber.value.length<5||e.formInitiateGroup[e.cKey].taxNumber.value.length>15)&&e.formInitiateGroup[e.cKey].taxNumber.value!==""?2:-1)}}function jm(i,r){i&1&&(c(0,"mat-error",32),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"registration.idNumberCharactersLength")," "))}function Hm(i,r){i&1&&(c(0,"mat-error",32),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"registration.registrationRequired")," "))}function qm(i,r){i&1&&(c(0,"div")(1,"mat-error",32),h(2),v(3,"translate"),a()()),i&2&&(s(2),T(" ",C(3,1,"login.usernameIncorrect")," "))}function Km(i,r){i&1&&(c(0,"mat-error",32),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"registration.emailPatternError")," "))}function $m(i,r){if(i&1&&(c(0,"div"),g(1,Hm,3,3,"mat-error",32),g(2,qm,4,3,"div"),g(3,Km,3,3,"mat-error",32),a()),i&2){let e=u(3);s(),_(e.formInitiateGroup[e.cKey].email.errors.required?1:-1),s(),_(e.isInitiatedSubmitted&&e.customValidationErrorEmail&&e.formInitiateGroup[e.cKey].email.value.trim()!==""?2:-1),s(),_(e.formInitiateGroup[e.cKey].email.errors.pattern?3:-1)}}function Wm(i,r){i&1&&(c(0,"mat-error",46),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"registration.pleaseAcceptCondition")," "))}function Ym(i,r){if(i&1&&(c(0,"div"),g(1,Wm,3,3,"mat-error",46),a()),i&2){let e=u(3);s(),_(e.formInitiateGroup[e.cKey].termOfUse.value===!1&&!(e.formInitiateGroup[e.cKey].email.errors!=null&&e.formInitiateGroup[e.cKey].email.errors.required)&&!(e.formInitiateGroup[e.cKey].email.errors!=null&&e.formInitiateGroup[e.cKey].email.errors.pattern)?1:-1)}}function Qm(i,r){if(i&1){let e=L();c(0,"mat-step",13)(1,"a",19),w(2,"mat-icon",20),a(),c(3,"div",21),h(4),v(5,"translate"),c(6,"div",22)(7,"button",23),w(8,"img",24),a(),c(9,"div",25),w(10,"div",26),a()()(),g(11,Vm,1,1,"div",27),c(12,"div",28)(13,"div",29)(14,"mat-form-field",30)(15,"label"),h(16),v(17,"translate"),a(),c(18,"input",31),k("input",function(){I(e);let n=u(2);return P(n.initiatedRegistrationError=!1)})("keyup.enter",function(){I(e),u();let n=se(5),o=u();return P(o.stepRegistrationInitiate(n))}),a()(),g(19,zm,3,2,"div"),g(20,jm,3,3,"mat-error",32),c(21,"mat-form-field",33)(22,"label"),h(23),v(24,"translate"),a(),c(25,"input",34),k("input",function(n){I(e);let o=u(2);return o.onEmailInputChange(n),P(o.initiatedRegistrationError=!1)})("keyup.enter",function(){I(e),u();let n=se(5),o=u();return P(o.stepRegistrationInitiate(n))}),a()(),g(26,$m,4,3,"div"),c(27,"div",35)(28,"div",36)(29,"div",37)(30,"div",38),w(31,"p",39),v(32,"translate"),c(33,"div",40),w(34,"mat-slide-toggle",41),g(35,Ym,2,1,"div"),a()(),c(36,"div",42)(37,"p"),h(38),v(39,"translate"),a(),c(40,"div",40),w(41,"mat-slide-toggle",43),a()()()()()()(),c(42,"div",44)(43,"button",45),k("click",function(){I(e),u();let n=se(5),o=u();return P(o.stepRegistrationInitiate(n))}),h(44),v(45,"translate"),a()()()}if(i&2){let e=u(2);S("stepControl",e.registrationForm.get("initiateGroup")),s(),S("href",ce(e.config.webDomain),Y),s(3),T(" ",C(5,19,"login.register")," "),s(6),S("innerHTML",e.trs.trsTs("registration.tooltipText"),Ve),s(),_(e.initiatedRegistrationError?11:-1),s(),S("formGroup",e.registrationForm),s(4),R(C(17,21,"registration.pinBulstatPassport")),s(3),_(e.isInitiatedSubmitted&&e.formInitiateGroup[e.cKey].taxNumber.value===""||e.isInitiatedSubmitted&&e.formInitiateGroup[e.cKey].taxNumber.value.length<5||e.isInitiatedSubmitted&&e.formInitiateGroup[e.cKey].taxNumber.value.length>15?19:-1),s(),_(e.isInitiatedSubmitted&&e.formInitiateGroup[e.cKey].taxNumber.errors&&e.formInitiateGroup[e.cKey].taxNumber.errors.pattern&&e.isInitiatedSubmitted&&e.formInitiateGroup[e.cKey].taxNumber.value!==""?20:-1),s(3),R(C(24,23,"registration.yourEmail")),s(3),_(e.isInitiatedSubmitted&&e.formInitiateGroup[e.cKey].email.errors?26:-1),s(5),S("innerHTML",C(32,25,"registration.termsOfUse"),Ve),s(3),S("checked",e.formInitiateGroup[e.cKey].termOfUse.value),s(),_(e.isInitiatedSubmitted?35:-1),s(3),R(C(39,27,"registration.marketingMessages")),s(3),S("checked",e.formInitiateGroup[e.cKey].termOfMarketing.value),s(2),S("ladda",e.isInitiatedStarted),s(),T(" ",C(45,29,"login.next")," ")}}function Xm(i,r){if(i&1&&(c(0,"div",48),h(1),a()),i&2){let e=u(3);s(),T(" ",e.httpCustomerCodesErrorTxt," ")}}function Zm(i,r){if(i&1){let e=L();c(0,"mat-radio-button",54),k("click",function(){let n=I(e).$implicit,o=u(3);return P(o.checkedIdType=n.value)}),c(1,"mat-form-field",30),w(2,"input",55),v(3,"translate"),a()()}if(i&2){let e=r.$implicit;S("value",e.value),s(2),S("value",C(3,2,e.label))}}function Jm(i,r){if(i&1&&(c(0,"div",48),h(1),a()),i&2){let e=u(3);s(),T(" ",e.httpSingleCustomerCodeErrorTxt," ")}}function eu(i,r){if(i&1){let e=L();c(0,"mat-step")(1,"a",19),w(2,"mat-icon",20),a(),c(3,"div",47),h(4),v(5,"translate"),a(),g(6,Xm,2,1,"div",48),c(7,"div")(8,"div",49)(9,"mat-radio-group",50),Cn(10,Zm,4,4,"mat-radio-button",51,Om),a()(),g(12,Jm,2,1,"div",48),c(13,"div",52)(14,"button",53),k("click",function(){I(e),u();let n=se(5),o=u();return P(o.stepSingleCustomerCode(n))}),h(15),v(16,"translate"),a()()()()}if(i&2){let e=u(2);s(),S("href",ce(e.config.webDomain),Y),s(3),R(C(5,8,"registration.chooseCompany")),s(2),_(e.customerCodesRegistrationError?6:-1),s(3),S("value",e.checkedIdType),s(),En(e.registrationIdTypeOptions),s(2),_(e.singleCustomerCodeRegistrationError?12:-1),s(2),S("ladda",e.isSingleCustomerCodeStarted),s(),T(" ",C(16,10,"login.next")," ")}}function tu(i,r){i&1&&(c(0,"div",47),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"registration.enterVivacomAccountNumber")," "))}function iu(i,r){i&1&&(c(0,"div",47),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"registration.enterVivacomCustomerNumber")," "))}function nu(i,r){i&1&&(c(0,"mat-error",59),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"registration.inputBillingNumberRequired")," "))}function ru(i,r){if(i&1&&g(0,nu,3,3,"mat-error",59),i&2){let e=u(3);_(e.formVivacomNumber[e.cKey].vivacomAccountNumber.errors&&e.formVivacomNumber[e.cKey].vivacomAccountNumber.errors.required&&e.formVivacomNumber[e.cKey].vivacomAccountNumber.value.length<1?0:-1)}}function ou(i,r){if(i&1&&(c(0,"mat-error",59),h(1),a()),i&2){let e=u(3);s(),T(" ",e.httpMsisdnError," ")}}function su(i,r){if(i&1){let e=L();c(0,"div",61)(1,"p",62),h(2),v(3,"translate"),a(),c(4,"button",63),k("click",function(){I(e);let n=u(3);return P(n.openWhatIsContractNoDialog())}),h(5),v(6,"translate"),a()()}i&2&&(s(2),T(" ",C(3,2,"registration.dontKnowBillingNumber")," "),s(3),R(C(6,4,"registration.findIt")))}function au(i,r){if(i&1){let e=L();c(0,"mat-step")(1,"a",19),w(2,"mat-icon",20),a(),c(3,"form",28),g(4,tu,3,3,"div",47),g(5,iu,3,3,"div",47),c(6,"div",56)(7,"div",57)(8,"mat-form-field",30)(9,"label"),h(10),v(11,"translate"),a(),c(12,"input",58),k("keyup",function(){I(e);let n=u(2);return P(n.validateVivacomAccountNumberOnKey())}),a()(),g(13,ru,1,1),g(14,ou,2,1,"mat-error",59),a(),c(15,"div",60)(16,"button",45),k("click",function(){I(e),u();let n=se(5),o=u();return P(o.validateVivacomAccountNumber(n))}),h(17),v(18,"translate"),a()(),g(19,su,7,6,"div",61),a()()()}if(i&2){let e=u(2);s(),S("href",ce(e.config.webDomain),Y),s(2),S("formGroup",e.registrationForm),s(),_(e.fixPrepaid?-1:4),s(),_(e.fixPrepaid?5:-1),s(5),R(C(11,11,"registration.accountNumber")),s(3),_(e.vivacomBillingSubmitted?13:-1),s(),_(e.httpMsisdnError!==""?14:-1),s(2),S("ladda",e.validationBaInProgress),s(),T(" ",C(18,13,"login.next")," "),s(2),_(e.fixPrepaid?-1:19)}}function lu(i,r){if(i&1&&w(0,"div",27),i&2){let e=u(4);S("innerHTML",e.httpInitiatedErrorTxt,Ve)}}function cu(i,r){i&1&&(c(0,"p",64),h(1),v(2,"translate"),a()),i&2&&(s(),R(C(2,1,"registration.resendEmailSent")))}function du(i,r){if(i&1&&g(0,lu,1,1,"div",27)(1,cu,3,3,"p",64),i&2){let e=u(3);_(e.httpInitiatedErrorTxt?0:1)}}function pu(i,r){if(i&1){let e=L();c(0,"mat-step")(1,"a",19),w(2,"mat-icon",20),a(),c(3,"div",47),h(4),v(5,"translate"),a(),c(6,"div",64),h(7),a(),c(8,"div",44)(9,"div",65)(10,"button",66),k("click",function(){I(e),u();let n=se(5),o=u();return P(o.registrationInitContinuation(o.formInitiateGroup[o.cKey],o.formCustomerCodesGroup[o.cKey],n,"resend"))}),h(11),v(12,"translate"),a(),g(13,du,2,1),a()()()}if(i&2){let e=u(2);s(),S("href",ce(e.config.webDomain),Y),s(3),T(" ",C(5,6,"registration.checkYourEmail")," "),s(3),T(" ",e.trs.trsTsParams("registration.confirmRegistrationDesc",J(10,El,e.userEmail))," "),s(4),T(" ",C(12,8,"registration.resendEmail")," "),s(2),_(e.resendCodeContinuationActivated?13:-1)}}function mu(i,r){i&1&&(c(0,"mat-error",59),h(1),v(2,"translate"),a()),i&2&&(s(),R(C(2,1,"validationMessage.requiredField")))}function uu(i,r){i&1&&(c(0,"mat-error",59),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"login.error409")," "))}function hu(i,r){i&1&&(c(0,"mat-error",59),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"login.error409")," "))}function fu(i,r){i&1&&(c(0,"mat-error",59),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"login.error409")," "))}function gu(i,r){if(i&1&&(g(0,uu,3,3,"mat-error",59),g(1,hu,3,3,"mat-error",59),g(2,fu,3,3,"mat-error",59)),i&2){let e=u(4);_(e.notGoodMsisdnFormat?0:-1),s(),_(e.formVivacomNumber[e.cKey].vivacomPhoneNumber.errors&&e.formVivacomNumber[e.cKey].vivacomPhoneNumber.errors.pattern?1:-1),s(),_(e.showMsisdnError?2:-1)}}function _u(i,r){if(i&1&&g(0,mu,3,3,"mat-error",59)(1,gu,3,3),i&2){let e=u(3);_(e.formVivacomNumber[e.cKey].vivacomPhoneNumber.value===""?0:1)}}function vu(i,r){if(i&1&&(c(0,"mat-error",59),h(1),a()),i&2){let e=u(3);s(),T(" ",e.httpMsisdnError," ")}}function Cu(i,r){if(i&1){let e=L();c(0,"div",72)(1,"button",73),k("click",function(){I(e),u(2);let n=se(5),o=u();return P(o.skipPhoneNumberStep(n))}),h(2),v(3,"translate"),a()()}if(i&2){let e=u(3);s(),S("ladda",e.skipOtpLaddaValidation)("disabled",e.validationPhoneInProcess||e.skipOtpLaddaValidation),s(),T(" ",C(3,3,"registration.skipThis")," ")}}function Eu(i,r){if(i&1){let e=L();c(0,"mat-step")(1,"a",19),w(2,"mat-icon",20),a(),c(3,"form",28)(4,"div",67),h(5),v(6,"translate"),a(),c(7,"div",68)(8,"div",69)(9,"mat-form-field",30)(10,"label"),h(11),v(12,"translate"),a(),c(13,"input",70),k("input",function(){I(e);let n=u(2);return n.vivacomNumberSubmitted=!1,P(n.httpMsisdnError="")}),a()(),g(14,_u,2,1),c(15,"div"),g(16,vu,2,1,"mat-error",59),a()(),c(17,"div",44)(18,"button",71),k("click",function(){I(e),u();let n=se(5),o=u();return P(o.validateVivacomNumberAndSendOtp(n))}),h(19),v(20,"translate"),a()(),g(21,Cu,4,5,"div",72),a()()()}if(i&2){let e=u(2);s(),S("href",ce(e.config.webDomain),Y),s(2),S("formGroup",e.registrationForm),s(2),T(" ",C(6,
611,"registration.enterVivacomNumber")," "),s(6),R(C(12,13,"registration.mobileNumber")),s(3),_(e.vivacomNumberSubmitted?14:-1),s(2),_(e.httpMsisdnError?16:-1),s(2),S("ladda",e.validationPhoneInProcess)("disabled",e.validationPhoneInProcess||e.skipOtpLaddaValidation),s(),T(" ",C(20,15,"login.next")," "),s(2),_(e.customerEnters!=="msisdn"?21:-1)}}function Su(i,r){i&1&&(c(0,"p"),h(1),v(2,"translate"),a()),i&2&&(s(),R(C(2,1,"registration.resendEmailSent")))}function Tu(i,r){i&1&&(c(0,"p"),h(1),v(2,"translate"),a()),i&2&&(s(),R(C(2,1,"httpErrorCode.registrationInit417")))}function xu(i,r){if(i&1){let e=L();c(0,"mat-step")(1,"a",19),w(2,"mat-icon",20),a(),c(3,"div",47),h(4),v(5,"translate"),a(),c(6,"div",64),h(7),a(),c(8,"div",44)(9,"div",65)(10,"button",66),k("click",function(){I(e);let n=u(2);return P(n.registrationInitContinuationBG())}),h(11),v(12,"translate"),g(13,Su,3,3,"p"),g(14,Tu,3,3,"p"),a()()()()}if(i&2){let e=u(2);s(),S("href",ce(e.config.webDomain),Y),s(3),T(" ",C(5,7,"forgottenPassword.expiredLinkTitle")," "),s(3),T(" ",e.trs.trsTsParams("registration.expiredLinkDesc",J(11,El,e.userEmailExpired))," "),s(4),T(" ",C(12,9,"registration.resendEmail")," "),s(2),_(e.resendCodeContinuationActivated&&e.httpInitiatedErrorTxt!==e.trs.trsTs("httpErrorCode.registrationInit417")?13:-1),s(),_(e.resendCodeContinuationActivated&&e.httpInitiatedErrorTxt===e.trs.trsTs("httpErrorCode.registrationInit417")?14:-1)}}function yu(i,r){if(i&1&&(c(0,"mat-step")(1,"a",19),w(2,"mat-icon",20),a(),c(3,"div",64),h(4),a()()),i&2){let e=u(2);s(),S("href",ce(e.config.webDomain),Y),s(3),T(" ",e.trs.trsTs("registration.expiredLinkNoMoreResend")," ")}}function wu(i,r){if(i&1&&(c(0,"mat-error",59),h(1),a()),i&2){let e=u(3);s(),T(" ",e.httpOtpErrorTxt," ")}}function bu(i,r){if(i&1&&(c(0,"mat-error",59),h(1),a()),i&2){let e=u(3);s(),T(" ",e.httpOtpErrorTxt," ")}}function Iu(i,r){i&1&&(c(0,"mat-error",59),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"registration.errorRequired")," "))}function Pu(i,r){if(i&1&&(c(0,"div"),g(1,Iu,3,3,"mat-error",59),a()),i&2){let e=u(3);s(),_(e.code===""?1:-1)}}function ku(i,r){if(i&1&&(c(0,"p",85),h(1),v(2,"translate"),a()),i&2){let e=u(4);s(),T(" ",e.httpOtpErrorTxt?e.httpOtpErrorTxt:C(2,1,"registration.newResendCodeSent")," ")}}function Au(i,r){if(i&1){let e=L();c(0,"div"),g(1,ku,3,3,"p",85),c(2,"span",86),h(3),v(4,"translate"),a(),c(5,"button",87),k("click",function(){I(e);let n=u(3);return P(n.resendSmsCode())}),h(6),v(7,"translate"),a()()}if(i&2){let e=u(3);s(),_(e.resendCodeOTPSmsBa&&!e.otpInProgress?1:-1),s(2),R(C(4,6,"login.didntGetCode")),s(2),S("ladda",e.otpInProgress)("disabled",e.disableResendButton),s(),Sn(" ",C(7,8,"login.resendCode")," ",e.countdownSeconds>0?"("+e.formattedCountdown()+")":""," ")}}function Mu(i,r){if(i&1){let e=L();c(0,"mat-step",14)(1,"a",19),w(2,"mat-icon",20),a(),c(3,"div",28)(4,"div",74)(5,"p",75),h(6),a(),c(7,"div",76)(8,"div",77)(9,"div",78)(10,"input",79),k("paste",function(n){I(e);let o=u(2);return P(o.handleOtpPaste(n))})("keyup",function(n){I(e);let o=u(2);return P(o.moveToNextBg(n))})("keydown",function(n){I(e);let o=u(2);return P(o.fixTabAndDelete(n))}),a()(),c(11,"div",78)(12,"input",80),k("paste",function(n){I(e);let o=u(2);return P(o.handleOtpPaste(n))})("keyup",function(n){I(e);let o=u(2);return P(o.moveToNextBg(n))})("keydown",function(n){I(e);let o=u(2);return P(o.fixTabAndDelete(n))}),a()(),c(13,"div",78)(14,"input",81),k("paste",function(n){I(e);let o=u(2);return P(o.handleOtpPaste(n))})("keyup",function(n){I(e);let o=u(2);return P(o.moveToNextBg(n))})("keydown",function(n){I(e);let o=u(2);return P(o.fixTabAndDelete(n))}),a()(),c(15,"div",78)(16,"input",82),k("paste",function(n){I(e);let o=u(2);return P(o.handleOtpPaste(n))})("keyup",function(n){I(e);let o=u(2);return P(o.moveToNextBg(n))})("keydown",function(n){I(e);let o=u(2);return P(o.fixTabAndDelete(n))})("keyup.enter",function(){I(e),u();let n=se(5),o=u();return P(o.stepRegistrationOtp(n))}),a()()(),c(17,"div",47),h(18),g(19,wu,2,1,"mat-error",59),g(20,bu,2,1,"mat-error",59),a(),g(21,Pu,2,1,"div"),a(),c(22,"div",44)(23,"div",83)(24,"button",84),k("click",function(){I(e),u();let n=se(5),o=u();return P(o.stepRegistrationOtp(n))}),h(25),v(26,"translate"),a()(),g(27,Au,8,10,"div"),a()()()()}if(i&2){let e=u(2);S("stepControl",e.registrationForm.get("otpGroup")),s(),S("href",ce(e.config.webDomain),Y),s(2),S("formGroup",e.registrationForm),s(3),R(e.trs.trsTsParams("login.verificationCodeDe
6sc",J(15,Mm,e.maskedMsisdn))),s(12),T(" ",e.otpCodeDesc," "),s(),_(e.otpRegistrationError&&e.httpOtpErrorTxt&&e.httpOtpErrorTxt!==""?19:-1),s(),_(e.disableResendButton&&e.httpOtpErrorTxt!==""&&!e.resendCodeOTPSmsBa?20:-1),s(),_(e.isOtpSubmitted?21:-1),s(3),S("disabled",e.tokenDecryptError||e.disableResendButton)("ladda",e.isOtpStarted),s(),T(" ",C(26,13,"login.next")," "),s(2),_(e.paramToken?27:-1)}}function Nu(i,r){i&1&&(c(0,"mat-step")(1,"div",88)(2,"div",89),w(3,"img",90),a(),c(4,"div",91),h(5),v(6,"translate"),a(),c(7,"div",92),h(8),v(9,"translate"),a()()()),i&2&&(s(5),T(" ",C(6,2,"registration.success")," "),s(3),T(" ",C(9,4,"registration.successRegisterDesc2")," "))}function Ru(i,r){if(i&1){let e=L();c(0,"span",104),k("click",function(){I(e);let n=u(3);return P(n.hidePassword=!n.hidePassword)}),w(1,"img",105),a()}}function Ou(i,r){if(i&1){let e=L();c(0,"span",104),k("click",function(){I(e);let n=u(3);return P(n.hidePassword=!n.hidePassword)}),w(1,"img",106),a()}}function Du(i,r){if(i&1){let e=L();c(0,"span",104),k("click",function(){I(e);let n=u(3);return P(n.hideConfirmPassword=!n.hideConfirmPassword)}),w(1,"img",105),a()}}function Bu(i,r){if(i&1){let e=L();c(0,"span",104),k("click",function(){I(e);let n=u(3);return P(n.hideConfirmPassword=!n.hideConfirmPassword)}),w(1,"img",106),a()}}function Lu(i,r){if(i&1){let e=L();c(0,"div",103)(1,"p"),h(2),v(3,"translate"),a(),c(4,"div",107)(5,"mat-slide-toggle",108),k("change",function(n){I(e);let o=u(3);return P(o.toggleInvoiceBgOptional(n))}),a()()()}i&2&&(s(2),R(C(3,2,"registration.eInvoiceSliderText")),s(3),S("checked",!1))}function Fu(i,r){if(i&1&&(c(0,"mat-error",59),h(1),a()),i&2){let e=u(3);s(),T(" ",e.httpPasswordErrorTxt," ")}}function Vu(i,r){i&1&&(c(0,"mat-error",59),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"validationMessage.passwordHint2")," "))}function Gu(i,r){i&1&&(c(0,"mat-error",59),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"validationMessage.requiredFieldRegistration")," "))}function Uu(i,r){if(i&1&&(c(0,"div"),g(1,Vu,3,3,"mat-error",59),g(2,Gu,3,3,"mat-error",59),a()),i&2){let e=u(3);s(),_(e.formPasswordGroup[e.cKey].password.errors.pattern?1:-1),s(),_(e.formPasswordGroup[e.cKey].password.errors&&e.formPasswordGroup[e.cKey].password.errors&&e.formPasswordGroup[e.cKey].password.errors.required?2:-1)}}function zu(i,r){if(i&1&&(c(0,"mat-error",109),h(1),v(2,"translate"),a()),i&2){let e=u(4);S("ngClass",J(4,Nm,e.isPasswordSubmitted&&e.formPasswordGroup[e.cKey].password.errors&&e.formPasswordGroup[e.cKey].password.errors.pattern)),s(),T(" ",C(2,2,"validationMessage.passwordHint2")," ")}}function ju(i,r){if(i&1&&(c(0,"mat-error",109),h(1),v(2,"translate"),a()),i&2){let e=u(4);S("ngClass",J(4,Rm,e.isPasswordSubmitted&&e.formPasswordGroup[e.cKey].password.errors&&e.formPasswordGroup[e.cKey].password.errors.pattern)),s(),T(" ",C(2,2,"validationMessage.passwordMismatch")," ")}}function Hu(i,r){if(i&1&&(c(0,"div"),g(1,zu,3,6,"mat-error",109),g(2,ju,3,6,"mat-error",109),a()),i&2){let e=u(3);s(),_(e.formPasswordGroup[e.cKey].repeatPassword.errors.pattern?1:-1),s(),_(e.formPasswordGroup[e.cKey].repeatPassword.errors[0]&&e.formPasswordGroup[e.cKey].repeatPassword.errors[0].passwordMismatch?2:-1)}}function qu(i,r){if(i&1){let e=L();c(0,"div",103)(1,"div",110)(2,"p"),h(3),v(4,"translate"),a()(),c(5,"div",107)(6,"mat-slide-toggle",111),k("change",function(n){I(e);let o=u(3);return P(o.toggleInvoiceBgOptional(n))}),a()()()}i&2&&(s(3),R(C(4,2,"registration.optionalInvoiceMonthly")),s(3),S("checked",!1))}function Ku(i,r){if(i&1){let e=L();c(0,"mat-step",15)(1,"a",19),w(2,"mat-icon",20),a(),c(3,"div",47),h(4),v(5,"translate"),c(6,"div",93)(7,"button",94),w(8,"img",95),a(),c(9,"div",25)(10,"p"),h(11),v(12,"translate"),a()()()(),c(13,"div",28)(14,"div",96)(15,"div",97)(16,"mat-form-field",98)(17,"label"),h(18),v(19,"translate"),a(),c(20,"input",99),k("input",function(n){I(e);let o=u(2);return P(o.onPasswordInput(n))})("keyup.enter",function(){I(e),u();let n=se(5),o=u();return P(o.stepPassword(n))}),a(),g(21,Ru,2,0,"span",100),g(22,Ou,2,0,"span",100),a(),c(23,"mat-form-field",101)(24,"label"),h(25),v(26,"translate"),a(),c(27,"input",102),k("input",function(n){I(e);let o=u(2);return P(o.onPasswordInput(n))})("keyup.enter",function(){I(e),u();let n=se(5),o=u();return P(o.stepPassword(n))}),a(),g(28,Du,2,0,"span",100),g(29,Bu,2,0,"span",100),a(),g(30,Lu,6,4,"div",103),g(31,Fu,2,1,"mat-error",59),g(32,Uu,3,2,"div"),g(33,Hu,3,2,"div"),g(34,qu,7,4,"div",103),a(),c(35,"div",52)(36,"button",45),k("click",function(){I(e),u();let n=se(5),o=u();return P(o.stepPassword(n))}),h(37),v(38,"translate"),a()()()()()}if(i&2){let e=u(2);S("hidden",!e.showFinalPageRegistered&&!e.hidePasswordStep)("stepControl",e.registrationForm.get("passwordGroup")),s(),S("href",ce(e.config.webDomain),Y),s(3),T(" ",C(5,22,"registration.createUsernameDesc")," "),s(7),R(C(12,24,"validationMessage.passwordHint2")),s(2),S("formGroup",e.registrationForm),s(5),R(C(19,26,"registration.password")),s(2),S("type",e.hidePassword?"password":"text"),s(),_(e.hidePassword?-1:21),s(),_(e.hidePassword?22:-1),s(3),R(C(26,28,"registration.confirmPassword")),s(2),S("type",e.hideConfirmPassword?"password":"text"),s(),_(e.hideConfirmPassword?-1:28),s(),_(e.hideConfirmPassword?29:-1),s(),_(e.showEInvoiceSlider?30:-1),s(),_(e.passwordError?31:-1),s(),_(e.isPasswordSubmitted&&e.formPasswordGroup[e.cKey].password.errors?32:-1),s(),_(e.isPasswordSubmitted&&e.formPasswordGroup[e.cKey].repeatPassword.errors?33:-1),s(),_(e.showMonthlyInvoiceOption&&!e.fixPrepaid?34:-1),s(2),S("ladda",e.isPasswordStarted),s(),T(" ",C(38,30,"login.next")," ")}}function $u(i,r){if(i&1&&(c(0,"mat-step",16)(1,"div",88)(2,"div",89),w(3,"img",90),a(),c(4,"div",91),h(5),v(6,"translate"),a(),c(7,"div",112),h(8),v(9,"translate"),a(),c(10,"div",52)(11,"button",113),h(12),v(13,"translate"),a()()()()),i&2){let e=u(2);S("hidden",e.showFinalPage),s(5),T(" ",C(6,5,"registration.success")," "),s(3),T(" ",C(9,7,"registration.successRegisterDesc")," "),s(3),S("routerLink","../signin"),s(),R(C(13,9,"login.signIn"))}}function Wu(i,r){i&1&&(c(0,"mat-step")(1,"div",88)(2,"div",89),w(3,"img",90),a(),c(4,"div",114),h(5),v(6,"translate"),a(),c(7,"div",112),h(8),v(9,"translate"),a()()()),i&2&&(s(5),T(" ",C(6,2,"registration.success")," "),s(3),T(" ",C(9,4,"registration.successRegisterDesc2")," "))}function Yu(i,r){if(i&1){let e=L();c(0,"div",6)(1,"div",8),g(2,Lm,4,5,"button",9),g(3,Fm,4,3,"button",10),c(4,"mat-horizontal-stepper",11,0),k("selectionChange",function(n){I(e);let o=u();return P(o.onStepChange(n))}),c(6,"form",12),g(7,Qm,46,31,"mat-step",13),g(8,eu,17,12,"mat-step"),g(9,au,20,15,"mat-step"),g(10,pu,14,12,"mat-step"),g(11,Eu,22,17,"mat-step"),g(12,xu,15,13,"mat-step"),g(13,yu,5,3,"mat-step"),g(14,Mu,28,17,"mat-step",14),g(15,Nu,10,6,"mat-step"),g(16,Ku,39,32,"mat-step",15),g(17,$u,14,11,"mat-step",16),g(18,Wu,10,6,"mat-step"),a()()()()}if(i&2){let e=u();s(2),_(e.paramToken==="null"&&e.firstStep?2:-1),s(),_(!e.firstStep&&e.checkBackVisibility()&&!e.linkExpired?3:-1),s(),S("linear",!0),s(2),S("formGroup",e.registrationForm),s(),_(e.paramToken==="null"?7:-1),s(),_(e.idNumberTypeRequired===!0&&e.paramToken==="null"?8:-1),s(),_(!e.accountManaged&&e.paramToken!=="null"&&e.customerEnters==="billingAccount"?9:-1),s(),_(e.paramToken==="null"?10:-1),s(),_((e.enterPhoneNumber&&e.paramToken!=="null"&&!e.resendCodeOTPActivated||e.customerEnters!=="billingAccount")&&!e.showFinalPage&&!e.showFinalPageRegistered&&!e.linkExpired&&!e.resendCodeOTPActivated&&!e.amApproved&&!e.userTypeChild?11:-1),s(),_(e.linkExpired&&e.userEmailExpired?12:-1),s(),_(e.linkExpired&&!e.userEmailExpired?13:-1),s(),_(e.paramToken!=="null"&&!e.skipOtpValidation&&!e.showFinalPage&&!e.showFinalPageRegistered?14:-1),s(),_(e.show412AmpStep?15:-1),s(),_(e.hidePasswordStep?-1:16),s(),_(e.showFinalPage?17:-1),s(),_(!e.showFinalPage&&e.showFinalPageRegistered?18:-1)}}var Sl=(()=>{class i{get formInitiateGroup(){return this.registrationForm.get("initiateGroup")}get formVivacomNumber(){return this.registrationForm.get("vivacomNumberGroup")}get formSingleCustomerCodeGroup(){return this.registrationForm.get("singleCustomerCodeGroup")}get formCustomerCodesGroup(){return this.registrationForm.get("customerCodesGroup")}get formOtpGroup(){return this.registrationForm.get("otpGroup")}get formPasswordGroup(){return this.registrationForm.get("passwordGroup")}get initiateGroup(){return this.formInitiateGroup}get vivacomNumberGroup(){return this.formVivacomNumber}get singleCustomerCodeGrp(){return this.formSingleCustomerCodeGroup}get customerCodesGrp(){return this.formCustomerCodesGroup}get otpGroup(){return this.formOtpGroup}get passwordGroup(){return this.formPasswordGroup}get newRepeatPassword(){return this.passwordGroup.get("repeatPassword")}constructor(e,t,n,o,l,m,E,y,M,N){this.elRef=e,this.trs=t,this.authService=n,this.commonService=o,this.formBuilder=l,this.gtmService=m,this.router=E,this.dialog=y,this.cdr=M,this.storageService=N,this.config=V,this.hidePassword=!0,this.hideConfirmPassword=!0,this.regex=new RegExp("^[a-zA-Z0-9]*$"),this.userRegistered=!1,this.userRegistrationInitiated="false",this.notificationInitiated="",this.customerCodeInitiated="",this.userTypeChild=!1,this.displayCustomerCode=!1,this.accountManaged=!1,this.amApproved=!1,this.customerEntersCheck=!1,this.enterPhoneNumber=!1,this.skipOtpValidation=!1,this.skipOtpLaddaValidation=!1,this.show
6FinalPage=!1,this.showFinalPageRegistered=!1,this.customValidationErrorEmail=!1,this.customerEnters="",this.httpMsisdnError="",this.maskedMsisdn="",this.showMsisdnError="",this.userEmailExpired="",this.userPreRegActive=!1,this.validationPhoneInProcess=!1,this.linkExpired=!1,this.show412AmpStep=!1,this.hidePasswordStep=!1,this.fixPrepaid=!1,this.initiatedRegistrationError=!1,this.isInitiatedSubmitted=!1,this.isInitiatedStarted=!1,this.hideOtpStep=!1,this.singleCustomerCodeRegistrationError=!1,this.isSingleCustomerCodeStarted=!1,this.isSingleCustomerCodeSubmitted=!1,this.customerCodesRegistrationError=!1,this.isCustomerCodesStarted=!1,this.isCustomerCodesSubmitted=!1,this.resendCodeContinuationActivated=!1,this.otpRegistrationError=!1,this.isOtpSubmitted=!1,this.isOtpStarted=!1,this.resendCodeOTPActivated=!1,this.tokenDecryptError=!0,this.passwordError=!1,this.isPasswordSubmitted=!1,this.isPasswordStarted=!1,this.decryptionHashUrlBg=!1,this.vivacomNumberSubmitted=!1,this.vivacomBillingSubmitted=!1,this.notGoodMsisdnFormat=!1,this.otpInProgress=!1,this.showPasswordStep=!1,this.validationBaInProgress=!1,this.resendCodeOTPSmsBa=!1,this.disableResendButton=!1,this.showMonthlyInvoiceOption=!1,this.userWantGettingInvoices=!1,this.showEInvoiceSlider=!1,this.resendDisable=!1,this.billingCodeList=[],this.countdownSeconds=0,this.errorMethod500=!1,this.cKey="controls",this.customerCodeForExecution="",this.customerExtIdForExecution="",this.taxNumberForExecution="",this.code="",this.preventBack=!1,this.idNumberTypeRequired=!1,this.registrationIdTypeEnum=ii,this.checkedIdType=ii.EGN,this.registrationIdTypeOptions=[{value:ii.EGN,label:"registration.idTypeEgn"},{value:ii.LNC,label:"registration.idTypeLnc"},{value:ii.PASSPORT_ID,label:"registration.idTypePassport"},{value:ii.BULSTAT,label:"registration.idTypeBulstat"}],this.firstStep=!1,this.loggedUser=!1,this.loggedUser=this.authService.isLoggedIn;let U=encodeURI(this.commonService.getParameterByName("tkn")??"null");this.paramToken=U,this.loggedUser&&this.paramToken&&this.logoutUser();let j=this.storageService.get(D.PARAM_TOKEN);this.paramToken==="null"&&j&&(this.paramToken=j),console.log("this.paramToken",this.paramToken)}logoutUser(){this.authService.logout(!0,this.paramToken)}ngOnInit(){this.elRef.nativeElement.closest("body").classList.remove("color-scheme-light"),this.elRef.nativeElement.closest("body").classList.add("login-register-body");let e=[],t=this.storageService.get(D.EASY_ACCESS_MSISDN);this.registrationForm=this.formBuilder.group({initiateGroup:this.formBuilder.group({taxNumber:["",[G.required,G.minLength(5),G.maxLength(15),G.pattern(/^[a-zA-Z0-9\s]+$/)]],phoneNumber:[t,e],email:["",[G.required,G.pattern(_s),this.commonService.customUsernameValidator]],termOfUse:[!1,[G.required]],termOfMarketing:[!1,[]]}),customerCodesGroup:this.formBuilder.group({customerCode:[""]}),singleCustomerCodeGroup:this.formBuilder.group({singleCustomerCode:[""]}),vivacomNumberGroup:this.formBuilder.group({vivacomPhoneNumber:["",[G.pattern("^\\+?[0-9]*$")]],vivacomAccountNumber:["",[G.required]]}),otpGroup:this.formBuilder.group({0:new _e("",[G.required]),1:new _e("",[G.required]),2:new _e("",[G.required]),3:new _e("",[G.required]),4:new _e("",[G.required]),5:new _e("",[G.required])},{validators:[G.max(1),G.required]}),passwordGroup:this.formBuilder.group({password:["",[G.required,G.pattern(V.passwordRegexPattern)]],repeatPassword:["",[G.required]]},{validator:this.passwordMatchValidator})});for(let n=1;n<6;n++)this.otpGroup.get(String(n)).disable();this.inputs=document.getElementsByClassName("otp-input-phone"),this.authService.ensureRegistrationSession().subscribe({next:()=>{this.isTokenExist(this.paramToken)},error:()=>{this.isTokenExist(this.paramToken)}})}ngAfterViewInit(){this.stepper!==void 0&&this.getCurrentFormGroup(),this.cdr.detectChanges()}onStepChange(e){this.firstStep=e.selectedIndex===0}reloadPage(){window.location.reload()}getCurrentFormGroup(){let e=this.stepper.selectedIndex,t="";switch(e){case 0:t="initiateGroup",this.firstStep=!0;return;case 1:t="customerCodesGroup",this.firstStep=!1;return;case 2:t="singleCustomerCodeGroup",this.firstStep=!1;return;case 3:t="vivacomNumberGroup",this.firstStep=!1;return;case 4:t="otpGroup",this.firstStep=!1;return;case 5:t="passwordGroup",this.firstStep=!1;return;default:t="";return}}onEmailInputChange(e){let t=e.target,n=t.value.toLowerCase();t.value=n,this.initiateGroup.controls.email.setValue(n,{emitEvent:!1})}
6passwordMatchValidator(e){let t=e.get("password").value,n=e.get("repeatPassword").value;return t===n?null:{passwordMismatch:!0}}onPasswordInput(e){e.target.value===""&&(this.isPasswordSubmitted=!1),this.setPasswordMismatch()}setPasswordMismatch(){this.passwordGroup.hasError("passwordMismatch")?this.newRepeatPassword.setErrors([{passwordMismatch:!0}]):this.newRepeatPassword.setErrors(null)}isTokenExist(e){e!=="null"&&this.link_check()}link_check(){this.decryptionHashUrlBg=!0,this.authService.registrationLinkCheck(this.paramToken).subscribe(e=>{e.valid?(this.userEmail=e.username||this.userEmail,this.tokenDecryption(this.paramToken)):(this.linkExpired=!0,this.userEmailExpired=e.username||"",this.decryptionHashUrlBg=!1)},e=>{e.status===500&&(this.errorMethod500=!0),console.log("Error occurred while validate token: ",e),this.decryptionHashUrlBg=!1})}validateVivacomAccountNumber(e){this.vivacomBillingSubmitted=!0,this.vivacomNumberGroup.get("vivacomAccountNumber").value!==""&&this.validateBillingNumber(e)}validateVivacomAccountNumberOnKey(){this.vivacomBillingSubmitted=!1,this.httpMsisdnError=""}validateBillingNumber(e){this.validationBaInProgress=!0,this.httpMsisdnError="",this.showFinalPage=!1,this.isPasswordStarted=!1,this.authService.billingNumberValidation(this.userEmail,this.vivacomNumberGroup.controls.vivacomAccountNumber.value).subscribe(t=>{console.log("response",t),this.enterPhoneNumber=!0,e.next(),this.validationBaInProgress=!1},t=>{console.log("Error occurred while validating billing number: ",t),this.handleRegistrationError(t,"ba-verification"),this.validationBaInProgress=!1})}skipPhoneNumberStep(e){this.validationPhoneInProcess=!0,this.skipOtpValidation=!0,this.skipOtpLaddaValidation=!0,this.userMsisdn="",this.authService.msisdnBaValidation(this.userEmail,this.userMsisdn,this.vivacomNumberGroup.controls.vivacomAccountNumber.value).subscribe(t=>{console.log("response validate phone number",t),t?.eInvoiceCheck&&t?.eInvoiceCheck?.eInvoiceActive===!1&&t?.eInvoiceCheck?.billingCodeList&&t?.eInvoiceCheck?.billingCodeList?.length&&(this.showMonthlyInvoiceOption=!0,this.billingCodeList=t.eInvoiceCheck.billingCodeList),e.next(),this.validationPhoneInProcess=!1,this.skipOtpLaddaValidation=!1},t=>{console.log("Error occurred while validating phone number: ",t),this.handleRegistrationError(t,"msisdn-ba-validation"),this.validationPhoneInProcess=!1})}toggleInvoiceBgOptional(e){this.userWantGettingInvoices=e.checked,console.log("this.userWantGettingInvoices",this.userWantGettingInvoices)}validateVivacomNumberAndSendOtp(e){this.httpMsisdnError="",this.notGoodMsisdnFormat=!1,this.vivacomNumberSubmitted=!0,console.log("this.formVivacomNumber",this.formVivacomNumber),console.log("this.customerEnters",this.customerEnters);let t=this.vivacomNumberGroup.controls,n=(t.vivacomPhoneNumber.value||"").trim(),o="";if(this.customerEnters==="msisdn"||n!==""){let l=this.normalizeMsisdn(n);if(!l)return this.notGoodMsisdnFormat=!0;o=l}if(this.httpMsisdnError="",this.validationPhoneInProcess=!0,t.vivacomPhoneNumber.errors||n===""){this.validationPhoneInProcess=!1;return}else this.vivacomNumberSubmitted=!1,this.userMsisdn=o,this.authService.msisdnBaValidation(this.userEmail,this.userMsisdn,t.vivacomAccountNumber.value).subscribe(l=>{let m=l?.msisdn||this.userMsisdn;if(!m){this.httpMsisdnError=this.trs.trsTs("httpErrorCode.default"),this.validationPhoneInProcess=!1;return}this.maskedMsisdn=m.substring(0,4)+this.xCharactersForString(m)+m.substring(m.length-3),console.log("response validate phone number",l),e.next(),this.validationPhoneInProcess=!1},l=>{console.log("Error occurred while validating phone number: ",l),this.handleRegistrationError(l,"msisdn-ba-validation"),this.validationPhoneInProcess=!1})}xCharactersForString(e){let t=e.length-6,n="";for(let o=0;o<t;o++)n+="x";return n}normalizeMsisdn(e){let t=[/^\+359([89]\d{8})$/,/^359([89]\d{8})$/,/^0([89]\d{8})$/,/^([89]\d{8})$/];for(let n of t){let o=e.trim().match(n);if(o)return o[1]}return null}tokenDecryption(e,t){this.otpInProgress=!0,this.tokenDecryptError=!0,this.firstStep=!0,this.decryptionHashUrlBg=!0,this.resendCodeOTPActivated=!!t;let n=e.replace(/%20/g,"+"),o=decodeURI(n);this.httpOtpErrorTxt="",this.authService.tokenDecryption(o).subscribe(l=>{console.log("response tokenDecryption",l),this.userMsisdn=l.msisdn,this.userEmail=l.email||this.userEmail,this.userExternalId=l.externalId,this.userCustomerCode=l.customerCode,this.userPreRegistered=l.preRegistered,this.userDecryptToken=l.decryptedToken,this.userTypeChild=yn(l.userType),this.fixPrepaid=l.fixPrepaid,this.tokenDecryptError=!1,this.accountManaged=l.accountManaged,this.amApproved=l.amApproved,this.customerEntersCheck=l.customerEnters!=="",console.log("this.resendCodeOTPActivated",this.resendCodeOTPActivated),console.log("accountManaged",this.accountManaged),console.log("this.amApproved",this.amApproved),this.resendCodeOTPActivated||(this.accountManaged?(this.skipOtpValidation=!0,this.show
6FinalPage=!1,this.amApproved?this.showFinalPageRegistered=!1:this.showFinalPageRegistered=!0,this.decryptionHashUrlBg=!1):this.customerEntersCheck&&(this.customerEnters=l.customerEnters||""),this.accountManaged&&!this.amApproved&&(this.showFinalPageRegistered=!0),this.userTypeChild&&(this.skipOtpValidation=!0,this.showFinalPageRegistered=!1,this.showFinalPage=!1)),this.decryptionHashUrlBg=!1,this.userPreRegActive=l.preRegistered==="false"&&l.registrationStatus==="Active",l.billingCodeList?.length&&l.eInvoiceActive===!1&&(this.showEInvoiceSlider=!0,this.billingCodeList=l.billingCodeList),this.tokenDecryptError=!1,this.otpInProgress=!1},l=>{if(console.log("Error occurred while decrypt token: ",l),this.decryptionHashUrlBg=!1,this.otpInProgress=!1,this.tokenDecryptError=!1,l.status===410)this.router.navigate(["../signin"]);else if(l.status===412){this.skipOtpValidation=!0,this.showFinalPageRegistered=!0,this.decryptionHashUrlBg=!1,this.show412AmpStep=!0;return}else this.otpRegistrationError=!0,this.handleRegistrationError(l,"decrypt"),this.tokenDecryptError=!0;l.status===500&&(this.errorMethod500=!0)})}stepRegistrationInitiate(e){this.customValidationErrorEmail=!1,this.initiatedRegistrationError=!1,this.httpInitiatedErrorTxt="",this.isInitiatedSubmitted=!0,this.isInitiatedStarted=!0;let t=this.initiateGroup.controls;if(t.taxNumber.markAsTouched(),t.taxNumber.updateValueAndValidity(),t.phoneNumber.markAsTouched(),t.phoneNumber.updateValueAndValidity(),t.email.markAsTouched(),t.email.updateValueAndValidity(),this.formInitiateGroup.invalid||t.termOfUse.value===!1){this.isInitiatedStarted=!1,this.customValidationErrorEmail=!0,console.log("formInitiateGroup ERROR",this.formInitiateGroup);return}else this.customValidationErrorEmail=!1,console.log("formInitiateGroup",this.formInitiateGroup),this.registrationInitiation(t,e)}registrationInitiation(e,t){this.singleCustomerCodeRegistrationError=!1,this.initiatedRegistrationError=!1,this.httpInitiatedErrorTxt="";let n={idNumber:e.taxNumber.value.trim(),username:e.email.value.trim(),emailNotify:!!this.initiateGroup.controls.termOfMarketing.value,smsNotify:!!this.initiateGroup.controls.termOfMarketing.value};this.authService.registrationInitiation(n).subscribe(o=>{console.log("response registrationInitiation",o),this.handleRegistrationInitiationResponse(o,t)},o=>{if(o.status===303&&o.error?.userRegistrationInitiate){this.handleRegistrationInitiationResponse(o.error,t);return}if(console.log("Error occurred while trying to initiate registration: ",o),this.initiatedRegistrationError=!0,Wt(o)){this.httpInitiatedErrorTxt=this.trs.trsTs("validationMessage.captchaFailed"),this.isInitiatedStarted=!1;return}this.handleRegistrationError(o,"initiate"),this.isInitiatedStarted=!1})}handleRegistrationInitiationResponse(e,t){this.isInitiatedStarted=!1;let n=e?.userRegistrationInitiate;if(!n){this.initiatedRegistrationError=!0,this.httpInitiatedErrorTxt=this.trs.trsTs("httpErrorCode.default"),this.isInitiatedSubmitted=!1;return}this.displayCustomerCode=n.displayCustomerCodes,this.setCustomerCodeStep(e,this.displayCustomerCode),this.idNumberTypeRequired=n.idNumberTypeRequired,this.userRegistered=n.registered,this.userEmail=n.email,this.userMsisdn=n.msisdn||"",console.log("idNumberTypeRequired",this.idNumberTypeRequired),t&&t.next(),this.commonService.setNumericKeyboardOnInput("otp-input-phone"),this.isInitiatedSubmitted=!1}setCustomerCodeStep(e,t){this.customerCodesSelection=e?.userRegistrationInitiate?.customerCodes||[]}stepSingleCustomerCode(e){if(console.log("checkedIdType",this.checkedIdType),this.singleCustomerCodeRegistrationError=!1,this.httpSingleCustomerCodeErrorTxt="",this.isSingleCustomerCodeSubmitted=!0,this.isSingleCustomerCodeStarted=!0,console.log("this.formSingleCustomerCodeGroup",this.formSingleCustomerCodeGroup),this.singleCustomerCodeGrp.invalid){this.isSingleCustomerCodeStarted=!1;return}else this.registrationInitContinuation(this.initiateGroup.controls,this.singleCustomerCodeGrp.controls,e)}registrationInitContinuation(e,t,n,o){if(this.resendCodeContinuationActivated=!!o,o)return this.registrationInitiation(this.initiateGroup.controls);let l={idNumberType:this.checkedIdType};console.log("registrationInitContinuationRequest",l),this.authService.registrationInitContinuation(l).subscribe(()=>{this.singleCustomerCodeRegistrationError=!1,this.isSingleCustomerCodeStarted=!1,n.next()},m=>{console.log("Error occurred while setting registration init continuation: ",m),this.singleCustomerCodeRegistrationError=!0,this.isSingleCustomerCodeStarted=!1,this.handleRegistrationError(m,"continuationSingle")})}registrationInitContinuationBG(){this.resendCodeContinuationActivated=!0;let e={hash:this.paramToken};this.authService.registrationInitiationFromHash(e).subscribe(t=>{console.log("response registrationInitiation",t),t.status&&t.status},t=>{console.log("Error occurred while trying to initiate registration: ",t),this.handleRegistrationError(t,"initiate")})}stepRegistrationOtp(e){if(this.resendCodeOTPSmsBa=!1,!this.disableResendButton)if(this.otpRegistrationError=!1,this.httpOtpErrorTxt="",this.isOtpSubmitted=!0,this.isOtpStarted=!0,console.log("formOtpGroup",this.formOtpGroup),this.otpGroup.invalid){this.isOtpStarted=!1;return}else this.otpValidation(e)}getOtpCode(e,t){this.resetOtpGroup(),this.resendCodeOTPActivated=!!t;let n=this.initiateGroup.controls,o={taxNumber:n.taxNumber.value.trim(),phoneNumber:n.phoneNumber.value?n.phoneNumber.value.toString().trim():""};e&&(o.customerCode=e),this.authService.getOtpCode(o).subscribe(l=>{console.log("response getOtpCode",l),l?.status==="OK"&&l?.UserOtpSend&&(this.customerCodeForExecution=l?.UserOtpSend?.customerCode?.trim(),this.customerExtIdForExecution=l?.UserOtpSend?.customerExtId?.trim(),this.taxNumberForExecution=l?.UserOtpSend?.taxNumber?.trim())},l=>
6{console.log("Error occurred while getting OTP code: ",l),this.otpRegistrationError=!0,this.handleRegistrationError(l,"otp")})}otpValidation(e){let t="";if(Object.values(this.otpGroup.controls).forEach(n=>{n.value&&(t+=n.value)}),this.code=t,console.log("this.code",this.code),console.log("this.userMsisdn",this.userMsisdn),this.code&&this.userMsisdn){let n={msisdn:this.userMsisdn.trim(),otp:this.code.trim()};this.authService.otpValidation(n).subscribe(o=>{console.log("response otpValidation",o),o?.userOtpValidation?.valid?(this.userOtpCode=this.code,this.showPasswordStep=!0,o?.userOtpValidation?.einvoiceActive===!1&&o?.userOtpValidation?.billingCodeList&&o?.userOtpValidation?.billingCodeList?.length&&(this.showMonthlyInvoiceOption=!0,this.billingCodeList=o.userOtpValidation.billingCodeList),e.next(),this.resetOtpGroup(),this.isOtpStarted=!1):(this.otpRegistrationError=!0,this.httpOtpErrorTxt=this.trs.trsTs("httpErrorCode.otpIncorrect"),this.isOtpStarted=!1,this.resetOtpGroup()),this.isOtpStarted=!1},o=>{console.log("Error occurred while validate OTP code: ",o),(o.status===431||o.status===432||o.status===433||o.status===436)&&o.error?.blockFor&&(this.disableResendButton=!0,this.handleErrorUsernameCheckBg({status:o.status}),this.startCountdown(o.error.blockFor)),this.otpRegistrationError=!0,this.handleRegistrationError(o,"otp-code"),this.isOtpStarted=!1,this.resetOtpGroup()})}else this.otpRegistrationError=!0,this.isOtpStarted=!1,this.httpOtpErrorTxt=this.trs.trsTs("httpErrorCode.otpIncorrect"),this.resetOtpGroup()}stepPassword(e){this.passwordError=!1,this.httpPasswordErrorTxt="",this.isPasswordSubmitted=!0,this.isPasswordStarted=!0;let t=this.passwordGroup.controls;if(t.password.markAsTouched(),t.password.updateValueAndValidity(),t.repeatPassword.markAsTouched(),t.repeatPassword.updateValueAndValidity(),this.passwordGroup.invalid){this.isPasswordStarted=!1,this.setPasswordMismatch(),console.log("formPasswordGroup ERROR",this.formPasswordGroup);return}else{if(console.log("formPasswordGroup",this.formPasswordGroup),console.log("EXECUTION -> this.userRegistrationInitiated",this.userRegistrationInitiated),console.log("EXECUTION -> this.userRegistered",this.userRegistered),console.log("FINAL & EXECUTION -> this.userEmail",this.userEmail),console.log("EXECUTION -> this.userTaxNumber",this.userTaxNumber),console.log("FINAL & EXECUTION -> this.userMsisdn",this.userMsisdn),console.log("FINAL & EXECUTION -> this.userOtpCode",this.userOtpCode),console.log("FINAL & EXECUTION -> this.userExternalId",this.userExternalId),console.log("FINAL & EXECUTION -> this.userCustomerCode",this.userCustomerCode),console.log("FINAL -> this.userPreRegistered",this.userPreRegistered),console.log("FINAL -> this.userPreRegActive",this.userPreRegActive),this.userRegistered||this.userRegistrationInitiated&&this.userRegistrationInitiated==="true")return this.registrationFinish(t,e,"execution");if(!this.userRegistered&&!this.userPreRegActive)return this.registrationFinish(t,e,"finalization");if(this.userPreRegActive)return this.registrationFinish(t,e,"finalization")}}registrationFinish(e,t,n){n==="execution"&&this.regExecution(e,t),n==="finalization"&&this.regFinalization(e,t)}regExecution(e,t){let n={username:this.userEmail.trim(),password:e.repeatPassword.value,taxNumber:this.userTaxNumber?this.userTaxNumber.trim():this.taxNumberForExecution?this.taxNumberForExecution:"",msisdn:this.userMsisdn.trim(),otp:this.userOtpCode.trim(),externalId:this.userExternalId?this.userExternalId.trim():this.customerExtIdForExecution?this.customerExtIdForExecution:"",customerCode:this.userCustomerCode?this.userCustomerCode.trim():this.customerCodeForExecution?this.customerCodeForExecution:"",isMobile:"",language:this.commonService.getLanguage()==="EN"?"EN":"BG"};this.authService.registrationExecution(n).subscribe(o=>{console.log("response registrationExecution: ",o),o.status&&o.status==="OK"?(this.gtmService.pushToDataLayer(ji.SELFCARE_ACTIONS,{registration_type:"username"}),this.hideOtpStep=!0,this.hidePasswordStep=!0,setTimeout(()=>{this.isPasswordStarted=!1,this.showFinalPage=!0},500)):(this.passwordError=!0,this.httpPasswordErrorTxt=this.trs.trsTs("httpErrorCode.default"),this.isPasswordStarted=!1)},o=>{console.log("Error occurred while trying to register user (execution): ",o),this.passwordError=!0,this.handleRegistrationError(o,"execution"),this.isPasswordStarted=!1})}regFinalization(e,t){this.cdr.detectChanges();let n={password:e.repeatPassword.value,eInvoice:this.userWantGettingInvoices};this.authService.registrationFinalization(n).subscribe(o=>{console.log("response registrationFinalization: ",o),this.gtmService.pushToDataLayer(ji.SELFCARE_ACTIONS,{registration_type:"username"}),this.hideOtpStep=!0,this.hidePasswordStep=!0,setTimeout(()=>
6{this.isPasswordStarted=!1,this.showFinalPage=!0},500)},o=>{console.log("Error occurred while trying to register user (finalization): ",o),this.passwordError=!0,this.handleRegistrationError(o,"finalization"),this.isPasswordStarted=!1})}handleRegistrationError(e,t){switch(e.status){case 406:t==="initiate"?this.httpInitiatedErrorTxt=this.trs.trsTs("httpErrorCode.registrationInitiate406"):t==="otp"?this.httpOtpErrorTxt=this.trs.trsTs("httpErrorCode.userOtp406"):t==="otp-code"?this.httpOtpErrorTxt=this.trs.trsTs("validationMessage.emptyOtp"):t==="decrypt"?this.httpOtpErrorTxt=this.trs.trsTs("httpErrorCode.decrypt406"):t==="finalization"?this.httpPasswordErrorTxt=this.trs.trsTs("httpErrorCode.finalization406"):t==="execution"?this.httpPasswordErrorTxt="":t==="continuation"?this.httpCustomerCodesErrorTxt=this.trs.trsTs("httpErrorCode.continuation406"):t==="continuationSingle"?this.httpSingleCustomerCodeErrorTxt=this.trs.trsTs("httpErrorCode.continuationSingle406"):t==="ba-verification"?this.httpMsisdnError=this.trs.trsTs("httpErrorCode.baVerification406"):t==="msisdn-ba-validation"&&(this.httpMsisdnError=this.trs.trsTs("httpErrorCode.msisdnCheckBaValidation406"));return;case 409:t==="initiate"?this.httpInitiatedErrorTxt=this.trs.trsTs("httpErrorCode.registrationInit409"):t==="otp"?this.httpOtpErrorTxt="":t==="otp-code"?this.httpOtpErrorTxt=this.trs.trsTs("httpErrorCode.otpValidation409"):t==="decrypt"?this.httpOtpErrorTxt=this.trs.trsTs("httpErrorCode.decrypt409"):t==="finalization"?this.httpPasswordErrorTxt=this.trs.trsTs("httpErrorCode.finalization409"):t==="execution"?this.httpPasswordErrorTxt=this.trs.trsTs("httpErrorCode.execution409"):t==="continuation"?this.httpCustomerCodesErrorTxt=this.trs.trsTs("httpErrorCode.continuation409"):t==="continuationSingle"?this.httpSingleCustomerCodeErrorTxt=this.trs.trsTs("httpErrorCode.continuationSingle409"):t==="msisdn-ba-validation"&&(this.httpMsisdnError=this.trs.trsTs("httpErrorCode.msisdnCheckBaValidation409"));return;case 410:t==="initiate"?this.httpInitiatedErrorTxt=this.trs.trsTs("httpErrorCode.registrationInit410"):t==="otp"?this.httpOtpErrorTxt="":t==="otp-code"?this.httpOtpErrorTxt="":t==="decrypt"?this.httpOtpErrorTxt=this.trs.trsTs("httpErrorCode.decrypt410"):t==="finalization"?this.httpPasswordErrorTxt=this.trs.trsTs("httpErrorCode.finalization410"):t==="execution"?this.httpPasswordErrorTxt="":t==="continuation"?this.httpCustomerCodesErrorTxt="":t==="continuationSingle"?this.httpSingleCustomerCodeErrorTxt=this.trs.trsTs("httpErrorCode.continuationSingle410"):t==="msisdn-ba-validation"&&(this.httpMsisdnError=this.trs.trsTs("httpErrorCode.msisdnCheckBaValidation410"));return;case 411:t==="initiate"?this.httpInitiatedErrorTxt=this.trs.trsTs("httpErrorCode.registrationInit411"):t==="otp"?this.httpOtpErrorTxt="":t==="otp-code"?this.httpOtpErrorTxt="":t==="finalization"?this.httpPasswordErrorTxt=this.trs.trsTs("httpErrorCode.finalization411"):t==="execution"?this.httpPasswordErrorTxt="":t==="continuation"?this.httpCustomerCodesErrorTxt="":t==="continuationSingle"?this.httpSingleCustomerCodeErrorTxt="":t==="msisdn-ba-validation"?this.httpMsisdnError=this.trs.trsTs("httpErrorCode.default"):t==="ba-verification"&&(this.httpMsisdnError=this.trs.trsTs("httpErrorCode.baVerification411"));return;case 412:t==="initiate"?this.httpInitiatedErrorTxt=this.trs.trsTs("httpErrorCode.registrationInit412"):t==="finalization"?this.httpPasswordErrorTxt=this.trs.trsTs("httpErrorCode.finalization412"):t==="msisdn-ba-validation"&&(this.httpMsisdnError=this.trs.trsTs("httpErrorCode.changeContactPhone413"));return;case 413:t==="initiate"?this.httpInitiatedErrorTxt=this.trs.trsTs("httpErrorCode.registrationInit413"):t==="otp"?this.httpOtpErrorTxt="":t==="otp-code"?this.httpOtpErrorTxt="":t==="finalization"?this.httpPasswordErrorTxt="":t==="execution"?this.httpPasswordErrorTxt="":t==="continuation"?this.httpCustomerCodesErrorTxt=this.trs.trsTs("httpErrorCode.continuation413"):t==="continuationSingle"?this.httpSingleCustomerCodeErrorTxt=this.trs.trsTs("httpErrorCode.continuationSingle413"):t==="ba-verification"&&(this.httpMsisdnError=this.trs.trsTs("httpErrorCode.baVerification413"));return;case 414:t==="initiate"?this.httpInitiatedErrorTxt=this.trs.trsTs("httpErrorCode.registrationInit414"):t==="otp"?this.httpOtpErrorTxt="":t==="otp-code"?this.httpOtpErrorTxt="":t==="finalization"?this.httpPasswordErrorTxt=this.trs.trsTs("httpErrorCode.finalization414"):t==="execution"?this.httpPasswordErrorTxt="":t==="continuation"?this.httpCustomerCodesErrorTxt=this.trs.trsTs("httpErrorCode.continuation414"):t==="continuationSingle"?this.httpSingleCustomerCodeErrorTxt=this.trs.trsTs("httpErrorCode.continuationSingle414"):t==="msisdn-ba-validation"&&(this.httpMsisdnError=this.trs.trsTs("httpErrorCode.msisdnCheck414"));return;case 415:t==="initiate"&&(this.httpInitiatedErrorTxt=this.trs.trsTs("httpErrorCode.registrationInit415"));return;case 416:t==="initiate"?this.httpInitiatedErrorTxt=this.trs.trsTs("httpErrorCode.registrationInit416"):t==="otp"?this.httpOtpErrorTxt="":t==="otp-code"?this.httpOtpErrorTxt="":t==="finalization"?this.httpPasswordErrorTxt="":t==="execution"?this.httpPasswordErrorTxt="":t==="continuation"?this.httpCustomerCodesErrorTxt=this.trs.trsTs("httpErrorCode.continuation416"):t==="continuationSingle"?this.httpSingleCustomerCodeErrorTxt=this.trs.trsTs("httpErrorCode.continuationSingle416"):t==="ba-verification"&&(this.httpMsisdnError=this.trs.trsTs("httpErrorCode.baVerification416"));return;case 417:t==="initiate"&&(this.httpInitiatedErrorTxt=this.trs.trsTs("httpErrorCode.registrationInit417"));return;case 418:t==="initiate"&&(this.httpInitiatedErrorTxt=this.trs.trsTs("httpErrorCode.registrationInit418"));return;case 419:t==="initiate"?this.httpInitiatedErrorTxt=this.trs.trsTs("httpErrorCode.registrationInit419"):t==="otp"?this.httpOtpErrorTxt="":t==="otp-code"?this.httpOtpErrorTxt="":t==="finalization"?this.httpPasswordErrorTxt="":t==="execution"?this.httpPasswordErrorTxt="":t==="continuation"?this.httpCustomerCodesErrorTxt=this.trs.trsTs("httpErrorCode.continuation419"):t==="continuationSingle"?this.httpSingleCustomerCodeErrorTxt=this.trs.trsTs("httpErrorCode.continuationSingle419"):t==="msisdn-ba-validation"&&(this.httpMsisdnError=this.trs.trsTs("httpErrorCode.msisdnCheck419"));return;case 420:t==="initiate"?this.httpInitiatedErrorTxt=this.trs.trsTs("httpErrorCode.registrationInit420"):t==="msisdn-ba-validation"&&(this.httpMsisdnError=this.trs.trsTs("httpErrorCode.msisdnCheck420"));return;case 421:t==="msisdn-ba-validation"&&(this.httpMsisdnError=this.trs.trsTs("httpErrorCode.msisdnCheck421"));return;case 422:t==="initiate"?this.httpInitiatedErrorTxt=this.trs.trsTs("httpErrorCode.registrationInit422"):t==="msisdn-ba-validation"&&(this.httpMsisdnError=this.trs.trsTs("httpErrorCode.msisdnCheck422"));return;case 423:t==="otp-code"?this.httpOtpErrorTxt=this.trs.trsTs("httpErrorCode.smsOtp423"):t==="initiate"?this.httpInitiatedErrorTxt=this.trs.trsTs("httpErrorCode.registrationInit423"):t==="msisdn-ba-validation"&&(this.httpMsisdnError=this.trs.trsTs("httpErrorCode.msisdnCheck423"));return;case 424:t==="initiate"&&(this.httpInitiatedErrorTxt=this.trs.trsTs("httpErrorCode.registrationInit424"));return;case 425:t==="initiate"&&(this.httpInitiatedErrorTxt=this.trs.trsTs("httpErrorCode.registrationInit425"));return;case 426:t==="initiate"?this.httpInitiatedErrorTxt=this.trs.trsTs("httpErrorCode.registrationInit426"):t==="continuation"?this.httpCustomerCodesErrorTxt=this.trs.trsTs("httpErrorCode.continuation426"):t==="continuationSingle"&&(this.httpSingleCustomerCodeErrorTxt=this.trs.trsTs("httpErrorCode.continuation426"));return;case 427:t==="initiate"&&(this.httpInitiatedErrorTxt=this.trs.trsTs("httpErrorCode.registrationInit427"));return;case 428:t==="initiate"?this.httpInitiatedErrorTxt=this.trs.trsTs("httpErrorCode.registrationInit428"):t==="continuation"?this.httpCustomerCodesErrorTxt=this.trs.trsTs("httpErrorCode.registrationInit428"):t==="continuationSingle"&&(this.httpSingleCustomerCodeErrorTxt=this.trs.trsTs("httpErrorCode.registrationInit428"));return;case 430:t==="initiate"?this.httpInitiatedErrorTxt=this.trs.trsTs("httpErrorCode.registrationInit430"):t==="otp"?this.httpOtpErrorTxt="":t==="otp-code"?this.httpOtpErrorTxt="":t==="finalization"?this.httpPasswordErrorTxt="":t==="execution"?this.httpPasswordErrorTxt="":t==="continuation"&&(this.httpCustomerCodesErrorTxt="");return;case 431:t==="otp-code"&&(this.httpOtpErrorTxt=this.trs.trsTs("login.error431Auth"));return;case 432:t==="otp-code"&&(this.httpOtpErrorTxt=this.trs.trsTs("login.error432"));return;case 433:t==="otp-code"&&(this.httpOtpErrorTxt=this.trs.trsTs("login.error433"));return;case 441:t==="initiate"?this.httpInitiatedErrorTxt=this.trs.trsTs("httpErrorCode.registrationInit441"):t==="continuation"&&(this.httpCustomerCodesErrorTxt=this.trs.trsTs("httpErrorCode.registrationInit441"));return;case 442:t==="initiate"?this.httpInitiatedErrorTxt=this.trs.trsTs("httpErrorCode.registrationInit442"):t==="continuation"&&(this.httpCustomerCodesErrorTxt=this.trs.trsTs("httpErrorCode.registrationInit442"));return;case 443:t==="initiate"?this.httpInitiatedErrorTxt=this.trs.trsTs("httpErrorCode.registrationInit443"):t==="continuation"&&(this.httpCustomerCodesErrorTxt=this.trs.trsTs("httpErrorCode.registrationInit443"));return;case 500:t==="initiate"?this.httpInitiatedErrorTxt=this.trs.trsTs("httpErrorCode.default"):t==="otp"?this.httpOtpErrorTxt=this.trs.trsTs("httpErrorCode.default"):t==="otp-code"?this.httpOtpErrorTxt=this.trs.trsTs("httpErrorCode.default"):t==="finalization"?this.httpPasswordErrorTxt=this.trs.trsTs("httpErrorCode.default"):t==="execution"?this.httpPasswordErrorTxt=this.trs.trsTs("httpErrorCode.default"):t==="continuation"?this.httpCustomerCodesErrorTxt=this.trs.trsTs("httpErrorCode.default"):t==="decrypt"&&(this.httpOtpErrorTxt=this.trs.trsTs("httpErrorCode.default"));return;default:t==="initiate"?this.httpInitiatedErrorTxt=this.trs.trsTs("httpErrorCode.default"):t==="otp"?this.httpOtpErrorTxt=this.trs.trsTs("httpErrorCode.default"):t==="otp-code"?this.httpOtpErrorTxt=this.trs.trsTs("httpErrorCode.default"):t==="finalization"?this.httpPasswordErrorTxt=this.trs.trsTs("httpErrorCode.default"):t==="execution"?this.httpPasswordErrorTxt=this.trs.trsTs("httpErrorCode.default"):t==="continuation"?this.httpCustomerCodesErrorTxt=this.trs.trsTs("httpErrorCode.default"):t==="decrypt"&&(this.httpOtpErrorTxt=this.trs.trsTs("httpErrorCode.default"));return}}fixTabAndDelete(e){e.target.value!==""&&e.key==="Backspace"?(e.preventDefault(),e.target.value="",this.preventBack=!0):this.preventBack=!1,e.key==="Tab"&&e.preventDefault()}handleOtpPaste(e){let t=e.clipboardData?.getData("text")?.replace(/\D/g,"").slice(0,4)||"";if(!t)return;e.preventDefault(),this.otpRegistrationError=!1,this.httpOtpErrorTxt="",this.co
6de=t;for(let l=0;l<4;l++){let m=this.registrationForm.get("otpGroup")?.get(String(l));m&&(m.enable({emitEvent:!1}),m.setValue(t[l]||"",{emitEvent:!1}))}let n=t.length===4?3:t.length;for(let l=0;l<4;l++){let m=this.registrationForm.get("otpGroup")?.get(String(l));m&&(l===n?m.enable({emitEvent:!1}):m.disable({emitEvent:!1}))}let o=this.inputs?.[n];o&&o.focus()}moveToNext(e){let t;if(!this.preventBack){if(e==="reset"){this.otpGroup.get(String(0)).enable();for(let n=1;n<6;n++)this.otpGroup.get(String(n)).disable();return}if(e.srcElement.value.length>0){if(this.otpRegistrationError=!1,this.httpOtpErrorTxt="",t=Number(e.srcElement.id)+1,t<=5)for(let n=0;n<this.inputs.length;n++)t!==n?this.otpGroup.get(String(n)).disable():this.otpGroup.get(String(n)).enable();t>6&&(this.isOtpStarted=!1)}else{if(t=Number(e.srcElement.id)-1,t>=0)for(let n=0;n<this.inputs.length;n++)t!==n?this.otpGroup.get(String(n)).disable():this.otpGroup.get(String(n)).enable();if(t<0)return}this.inputs[t]&&this.inputs[t].focus()}}moveToNextBg(e){this.resendCodeOTPSmsBa=!1;let t;if(!this.preventBack){if(e==="reset"){this.otpGroup.get(String(0)).enable();for(let n=1;n<4;n++)this.otpGroup.get(String(n)).disable();return}if(e.srcElement.value.length>0){if(this.otpRegistrationError=!1,this.httpOtpErrorTxt="",t=Number(e.srcElement.id)+1,t<=3)for(let n=0;n<this.inputs.length;n++)t!==n?this.otpGroup.get(String(n)).disable():this.otpGroup.get(String(n)).enable();t>6&&(this.isOtpStarted=!1)}else{if(t=Number(e.srcElement.id)-1,t>=0)for(let n=0;n<this.inputs.length;n++)t!==n?this.otpGroup.get(String(n)).disable():this.otpGroup.get(String(n)).enable();if(t<0)return}this.inputs[t]&&this.inputs[t].focus()}}resetOtpGroup(e){this.otpGroup.reset(),this.moveToNext("reset"),e&&e.reset()}openWhatIsContractNoDialog(){this.dialog.open(vl,{width:"674px",panelClass:["global-dialog","gd-v3","text-align-center","confirmation-dialog-v3"],data:{title:this.trs.trsTs("registration.whatIsBillingNoDialogTitle"),img:"assets/img/billing-number-bg.png",desc:this.trs.trsTs("registration.whatIsBillingNoDialogDesc")}}).afterClosed().subscribe(()=>{})}goBack(){this.hidePasswordStep||this.resetPasswordGroup(),this.stepper.previous()}resetPasswordGroup(){this.isPasswordSubmitted=!1,this.passwordError=!1,this.userWantGettingInvoices=!1,this.passwordGroup.get("password").setValue(""),this.passwordGroup.get("repeatPassword").setValue("")}checkBackVisibility(){return!this.firstStep&&(this.idNumberTypeRequired===!0&&this.paramToken==="null"||this.paramToken==="null"||!this.show
6FinalPage)||!this.showPasswordStep}resendSmsCode(){this.otpRegistrationError=!1,this.httpOtpErrorTxt="",this.otpInProgress=!0,this.resendCodeOTPSmsBa=!0,this.authService.resendSmsOtpBg(this.userMsisdn).subscribe(()=>{this.otpInProgress=!1,this.tokenDecryptError=!1},e=>{if((e.status===431||e.status===432||e.status===433||e.status===436)&&e.error?.blockFor){this.disableResendButton=!0,this.handleErrorUsernameCheckBg({status:e.status}),this.startCountdown(e.error.blockFor),this.otpInProgress=!1,this.tokenDecryptError=!0;return}e.status===412&&(this.resendDisable=!0),this.httpOtpErrorTxt=this.trs.trsTs(Cl(e.status)),this.otpInProgress=!1,this.tokenDecryptError=!1})}handleErrorUsernameCheckBg(e){switch(console.log("httpError",e),e.status){case 431:this.httpOtpErrorTxt=this.trs.trsTs("login.error431Auth");return;case 432:this.httpOtpErrorTxt=this.trs.trsTs("login.error432");return;case 433:this.httpOtpErrorTxt=this.trs.trsTs("login.error433");return;default:this.httpOtpErrorTxt=this.trs.trsTs("login.errorField1");return}}startCountdown(e){this.countdownSeconds=e;let t=setInterval(()=>{this.countdownSeconds--,this.countdownSeconds===0&&(this.disableResendButton=!1,clearInterval(t))},1e3)}formattedCountdown(){return this.formatTime(this.countdownSeconds)}formatTime(e){let t=Math.floor(e/3600),n=Math.floor(e%3600/60),o=e%60;return`${this.padZero(t)}:${this.padZero(n)}:${this.padZero(o)}`}padZero(e){return e<10?`0${e}`:e.toString()}ngOnDestroy(){this.elRef.nativeElement.closest("body").classList.add("color-scheme-light"),this.elRef.nativeElement.closest("body").classList.remove("login-register-body"),this.storageService.remove(D.PARAM_TOKEN)}static{this.\u0275fac=function(t){return new(t||i)(b(Ie),b(pe),b(ge),b(Se),b(bt),b(Yt),b(de),b(Xe),b(Tn),b(Ee))}}static{this.\u0275cmp=K({type:i,selectors:[["app-registration"]],viewQuery:function(t,n){if(t&1&&ai(km,5),t&2){let o;li(o=ci())&&(n.stepper=o.first)}},decls:6,vars:5,consts:[["stepper",""],[1,"log-reg-se","black-bg",3,"callback"],[1,"page-spinner","full-width","black-bgd"],[1,"log-reg-lang-wrapper","tile-card-box-wrapper"],[3,"isBlackBG","isLoginStyle"],[1,"bg-env"],[1,"login-registration-pages","registration"],[3,"mode","strokeWidth","diameter"],[1,"container-400"],["
6id","go-home",1,"reset-btn","step-back-button",3,"routerLink"],["id","step-back",1,"reset-btn","step-back-button"],[3,"selectionChange","linear"],["autocomplete","off",3,"formGroup"],["formGroupName","initiateGroup",3,"stepControl"],[3,"stepControl"],["formGroupName","passwordGroup",3,"hidden","stepControl"],[3,"hidden"],["src","assets/img/back-icon-white.svg","alt","back"],["id","step-back",1,"reset-btn","step-back-button",3,"click"],[1,"logo-wrap",3,"href"],["svgIcon","vivacom-logo-colored",1,"logo-vivacom","log-reg"],[1,"description","registration-description"],[1,"tooltip-wrap","reg-init-tooltip"],[1,"reset-btn","tooltip-link"],["src","assets/img/more-info-icon.svg","alt","info"],[1,"tooltip","info"],[1,"user-content",3,"innerHTML"],[1,"http-validate-error","error-v3",3,"innerHTML"],[3,"formGroup"],["formGroupName","initiateGroup",1,"grouped-mat-form-field","only-inputs"],["floatLabel","never",1,"style-type-v3","reset-margin"],["matInput","","autocomplete","off","type","text","formControlName","taxNumber",3,"input","keyup.enter"],[1,"error-v3","left-align"],["floatLabel","never",1,"style-type-v3","reset-margin","reset-border-radius-bottom"],["matInput","","autocomplete","off","type","email","formControlName","email",3,"input","keyup.enter"],[1,"mat-radio-button"],[1,"form-description-field","mat-form-field","style-type-v3"],[1,"mat-form-field-infix"],[1,"terms-wrap","black","bg-wrap","mb-20"],[3,"innerHTML"],[1,"terms-slide-wrap"],["formControlName","termOfUse",1,"global-mat-slide-toggle",3,"checked"],[1,"terms-wrap","black","bg-wrap"],["formControlName","termOfMarketing",1,"global-mat-slide-toggle",3,"checked"],[1,"text-align-center","mt-auto"],[1,"radius100","btn-4-v3","bg-white","ladda-fix-v3",3,"click","ladda"],[1,"error-v3","terms-error","left-align"],[1,"description"],[1,"http-validate-error","error-v3"],[1,"mb-60"],[1,"grouped-mat-form-field","bg-style",3,"value"],[1,"variant-type-v3","radio-centered-top",3,"value"],[1,"text-align-center"],[1,"radius100","btn-4-v3","bg-white",3,"click","ladda"],[1,"variant-type-v3","radio-centered-top",3,"click","value"],["matInput","","autocomplete","off","type","text","readonly","",3,"value"],["formGroupName","vivacomNumberGroup",1,"main-login-form","mt-50"],[1,"mb-32"],["matInput","","autocomplete","off","type","text","formControlName","vivacomAccountNumber",3,"keyup"],[1,"error-v3"],[1,"text-align-center","mt-auto","mb-60"],[1,"dont-know-billing-no"],[1,"font-size-14","font-medium","text-color-3"],[1,"reset-btn","text-color-11","font-medium",3,"click"],[1,"small-description","age-text-2","text-align-center"],[1,"mb-25"],[1,"reset-btn","text-color-11","font-bold","font-size-13",3,"click"],[1,"description","mb32"],["formGroupName","vivacomNumberGroup",1,"main-login-form"],[1,"mb-100"],["matInput","","autocomplete","off","type","text","formControlName","vivacomPhoneNumber",3,"input"],[1,"radius100","btn-4-v3","bg-white","ladda-fix-v3",3,"click","ladda","disabled"],[1,"text-align-center","mt-20"],[1,"reset-btn","skip-button-ladda",3,"click","ladda","disabled"],["formGroupName","otpGroup",1,"relative"],[1,"mb-32","text-color-3","font-bold"],[1,"mb-114"],[1,"otp-inputs-wrap","redesign-wrap","black-bg","reset-margin"],[1,"form-group-field"],["id","0","maxlength","1","autocomplete","off","formControlName","0",1,"otp-input-phone",3,"paste","keyup","keydown"],["id","1","maxlength","1","autocomplete","off","formControlName","1",1,"otp-input-phone",3,"paste","keyup","keydown"],["id","2","maxlength","1","autocomplete","off","formControlName","2",1,"otp-input-phone",3,"paste","keyup","keydown"],["id","3","maxlength","1","autocomplete","off","formControlName","3",1,"otp-input-phone",3,"paste","keyup","keydown","keyup.enter"],[1,"mb-22"],[1,"radius100","btn-4-v3","bg-white","ladda-fix-v3",3,"click","disabled","ladda"],[1,"text-color-3","font-size-14","mb-40"],[1,"text-color-3","font-size-14"],[1,"reset-btn","font-bold","skip-button-ladda",3,"click","ladda","disabled"],[1,"success-step-page"],[1,"img-wrap"],["src","assets/img/success-dialog-icon.svg","alt","success icon"],[1,"description","mb32","regular-desc"],[1,"description","regular-small-desc","mb-40"],[1,"tooltip-wrap","align-fix","tooltip-login"],["type","button",1,"reset-btn","tooltip-link"],["src","assets/img/more-info-icon.svg","alt","info",1,"not-responsive"],["formGroupName","passwordGroup"],[1,"grouped-mat-form-field","only-inputs","mb-60"],["floatLabel","never",1,"style-type-v3","reset-margin","with-icon","reduced-pa
6dding"],["matInput","","formControlName","password","autocomplete","new-password","maxlength","64",3,"input","keyup.enter","type"],[1,"eye-icon-wrap"],["floatLabel","never",1,"style-type-v3","reset-margin","with-icon","reduced-padding","reset-border-bottom"],["matInput","","formControlName","repeatPassword","autocomplete","new-password","maxlength","64",3,"input","keyup.enter","type"],[1,"terms-wrap","bg-wrap","mb-20","mt-25","e-invoice-wrapper"],[1,"eye-icon-wrap",3,"click"],["src","assets/img/eye-icon.svg","alt","eye-icon",1,"icon"],["src","assets/img/eye-hide-icon.svg","alt","eye-icon",1,"icon"],[1,"terms-slide-wrap","lh-0"],["formControlName","termOfMarketing",1,"global-mat-slide-toggle",3,"change","checked"],[1,"error-v3",3,"ngClass"],[1,"with-tooltip-wrapper"],[1,"global-mat-slide-toggle",3,"change","checked"],[1,"description","regular-small-desc","mb-86"],[1,"radius100","btn-4-v3","bg-white",3,"routerLink"],[1,"description","regular-desc"]],template:function(t,n){t&1&&(g(0,Dm,1,1,"app-server-error",1),g(1,Bm,2,3,"div",2),c(2,"div",3),w(3,"app-language-toggle-bar",4),a(),w(4,"app-userway",5),g(5,Yu,19,16,"div",6)),t&2&&(_(n.errorMethod500?0:-1),s(),_(n.decryptionHashUrlBg?1:-1),s(2),S("isBlackBG",!0)("isLoginStyle",!0),s(2),_(!n.decryptionHashUrlBg&&!n.errorMethod500?5:-1))},dependencies:[Ns,Di,gt,Ue,qt,ei,It,Tt,Ct,Et,St,wt,Pt,xt,yt,Zt,Jt,Re,vt,kt,_t,ki,Ge,Ze,Rs,Os,ft,ie,ne],encapsulation:2})}}return i})();var Qu=i=>({number:i});function Xu(i,r){if(i&1&&(c(0,"mat-error",19),h(1),a()),i&2){let e=u(2);s(),T(" ",e.httpOtpErrorTxt," ")}}function Zu(i,r){i&1&&(c(0,"mat-error",50),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"registration.errorRequired")," "))}function Ju(i,r){if(i&1&&(c(0,"div"),g(1,Zu,3,3,"mat-error",50),a()),i&2){let e=u(2);s(),_(e.code===""?1:-1)}}function eh(i,r){i&1&&(c(0,"mat-error",51),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"registration.pleaseAcceptCondition")," "))}function th(i,r){if(i&1&&(c(0,"div"),g(1,eh,3,3,"mat-error",51),a()),i&2){let e=u(2);s(),_(e.formInitiateGroup[e.cKey].termOfUse.value===!1?1:-1)}}function ih(i,r){if(i&1){let e=L();c(0,"span",52),k("click",function(){I(e);let n=u(2);return P(n.hidePassword=!n.hidePassword)}),w(1,"img",53),a()}}function nh(i,r){if(i&1){let e=L();c(0,"span",52),k("click",function(){I(e);let n=u(2);return P(n.hidePassword=!n.hidePassword)}),w(1,"img",54),a()}}function rh(i,r){i&1&&(c(0,"mat-error",43),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"validationMessage.passwordHint2")," "))}function oh(i,r){if(i&1&&(c(0,"div"),g(1,rh,3,3,"mat-error",43),a()),i&2){let e=u(2);s(),_(e.formPasswordGroup[e.cKey].password.errors.pattern?1:-1)}}function sh(i,r){if(i&1){let e=L();c(0,"span",52),k("click",function(){I(e);let n=u(2);return P(n.hideConfirmPassword=!n.hideConfirmPassword)}),w(1,"img",53),a()}}function ah(i,r){if(i&1){let e=L();c(0,"span",52),k("click",function(){I(e);let n=u(2);return P(n.hideConfirmPassword=!n.hideConfirmPassword)}),w(1,"img",54),a()}}function lh(i,r){if(i&1&&(c(0,"mat-error",43),h(1),a()),i&2){let e=u(2);s(),T(" ",e.httpPasswordErrorTxt," ")}}function ch(i,r){i&1&&(c(0,"mat-error",43),h(1),v(2,"translate"),a()),i&2&&(s(),T(" ",C(2,1,"validationMessage.passwordHint2")," "))}function dh(i,r){if(i&1&&(c(0,"div"),g(1,ch,3,3,"mat-error",43),a()),i&2){let e=u(2);s(),_(e.formPasswordGroup[e.cKey].repeatPassword.errors.pattern?1:-1)}}function ph(i,r){i&1&&(c(0,"div")(1,"mat-error",43),h(2),v(3,"translate"),a()()),i&2&&(s(2),T(" ",C(3,1,"validationMessage.passwordMismatch")," "))}function mh(i,r){if(i&1){let e=L();c(0,"mat-stepper",5,0)(2,"form",7)(3,"mat-step",8)(4,"div",6),h(5),a(),c(6,"div",9)(7,"div",10)(8,"div",11)(9,"div",12)(10,"input",13),k("keyup",function(n){I(e);let o=u();return P(o.moveToNext(n))})("keydown",function(n){I(e);let o=u();return P(o.fixTabAndDelete(n))}),a()(),c(11,"div",12)(12,"input",14),k("keyup",function(n){I(e);let o=u();return P(o.moveToNext(n))})("keydown",function(n){I(e);let o=u();return P(o.fixTabAndDelete(n))}),a()(),c(13,"div",12)(14,"input",15),k("keyup",function(n){I(e);let o=u();return P(o.moveToNext(n))})("keydown",function(n){I(e);let o=u();return P(o.fixTabAndDelete(n))}),a()(),c(15,"div",12)(16,"input",16),k("keyup",function(n){I(e);let o=u();return P(o.moveToNext(n))})("keydown",function(n){I(e);let o=u();return P(o.fixTabAndDelete(n))}),a()(),c(17,"div",12)(18,"input",17),k("keyup",function(n){I(e);let o=u();return P(o.moveToNext(n))})("keydown",function(n){I(e);let o=u();return P(o.fixTabAndDelete(n))}),a()(),c(19,"div",12)(20,"input",18),k("keyup",function(n){I(e);let o=u();return P(o.moveToNext(n))})("keydown",function(n){I(e);let o=u();return P(o.fixTabAndDelete(n))}),a()(),g(21,Xu,2,1,"mat-error",19),a(),g(22,Ju,2,1,"div"),c(23,"div",20)(24,"button",21),k("click",function(){I(e);let n=se(1),o=u();return P(o.stepOtp(n))}),h(25),v(26,"translate"),a()()()()(),c(27,"mat-step",22)(28,"div",23),h(29),v(30,"translate"),a(),c(31,"div",9)(32,"div",24)(33,"mat-form-field",25)(34,"label"),h(35),v(36,"translate"),a(),w(37,"input",26),a(),c(38,"mat-form-field",25)(39,"label"),h(40),v(41,"translate"),a(),w(42,"input",27),a(),c(43,"div",28)(44,"div",29)(45,"div",30)(46,"div",31)(47,"p"),h(48),v(49,"translate"),c(50,"a",32),h(51),v(52,"translate"),a()(),c(53,"div",33),w(54,"mat-slide-toggle",34),g(55,th,2,1,"div"),a()()()()()()(),c(56,"div",20)(57,"button",21),k("click",function(){I(e);let n=se(1),o=u();return P(o.stepInitiate(n))}),h(58),v(59,"translate"),a()()(),c(60,"mat-step",35)(61,"div",23),h(62),v(63,"translate"),a(),c(64,"div",36)(65,"div",37)(66,"div",38)(67,"mat-form-field",39)(68,"label"),h(69),v(70,"translate"),a(),c(71,"input",40),k("input",function(){I(e);let n=u();return P(n.onPasswordInput())}),a(),g(72,ih,2,0,"span",41),g(73,nh,2,0,"span",41),a(),g(74,oh,2,1,"div"),c(75,"mat-form-field",39)(76,"label"),h(77),v(78,"translate"),a(),c(79,"input",42),k("input",function(){I(e);let n=u();return P(n.onPasswordInput())}),a(),g(80,sh,2,0,"span",41),g(81,ah,2,0,"span",41),a(),g(82,lh,2,1,"mat-error",43),g(83,dh,2,1,"div"),g(84,ph,4,3,"div"),a()()(),c(85,"div",44)(86,"button",21),k("click",function(){I(e);let n=se(1),o=u();return P(o.stepPassword(n))}),h(87),v(88,"translate"),a()()(),c(89,"mat-step")(90,"div",45)(91,"div",46),w(92,"img",47),a(),c(93,"div",48),h(94),v(95,"translate"),a(),c(96,"div",44)(97,"button",49),k("click",function(){I(e);let n=u();return P(n.goHome())}),h(98),v(99,"translate"),a()()()()()()}if(i&2){let e=u();S("linear",!0)("@.disabled",!0),s(2),S("formGroup",e.emailVerificationForm),s(),S("stepControl",e.emailVerificationForm.get("otpGroup")),s(2),T(" ",e.trs.trsTsParams("login.verificationCodeDe
6sc",J(66,Qu,e.phoneHashed))," "),s(),S("formGroup",e.emailVerificationForm),s(15),_(e.otpRegistrationError?21:-1),s(),_(e.isOtpSubmitted?22:-1),s(2),S("ladda",e.isOtpStarted),s(),T(" ",C(26,40,"login.next")," "),s(2),S("stepControl",e.emailVerificationForm.get("initiateGroup")),s(2),T(" ",C(30,42,"emailVerification.dataDescVerification")," "),s(2),S("formGroup",e.emailVerificationForm),s(4),R(C(36,44,"emailVerification.yourEmail")),s(5),R(C(41,46,"emailVerification.phone")),s(8),T("",C(49,48,"registration.accept")," "),s(3),R(C(52,50,"registration.termsOfUse")),s(3),S("checked",e.formInitiateGroup[e.cKey].termOfUse.value),s(),_(e.isInitiatedSubmitted?55:-1),s(2),S("ladda",e.isInitiatedStarted),s(),T(" ",C(59,52,"login.next")," "),s(2),S("stepControl",e.emailVerificationForm.get("passwordGroup")),s(2),T(" ",C(63,54,"emailVerification.newPassDesc")," "),s(2),S("formGroup",e.emailVerificationForm),s(5),R(C(70,56,"emailVerification.password")),s(2),S("type",e.hidePassword?"password":"text"),s(),_(e.hidePassword?72:-1),s(),_(e.hidePassword?-1:73),s(),_(e.isPasswordSubmitted&&e.formPasswordGroup[e.cKey].password.errors?74:-1),s(3),R(C(78,58,"emailVerification.repeatPassword")),s(2),S("type",e.hideConfirmPassword?"password":"text"),s(),_(e.hideConfirmPassword?80:-1),s(),_(e.hideConfirmPassword?-1:81),s(),_(e.passwordError?82:-1),s(),_(e.isPasswordSubmitted&&e.formPasswordGroup[e.cKey].repeatPassword.errors?83:-1),s(),_(e.isPasswordSubmitted&&e.passwordMismatch?84:-1),s(2),S("ladda",e.isPasswordStarted),s(),T(" ",C(88,60,"login.submit")," "),s(7),T(" ",C(95,62,"registration.successRegisterDesc")," "),s(4),T(" ",C(99,64,"login.goToDashboard")," ")}}function uh(i,r){if(i&1){let e=L();c(0,"div",6),h(1),v(2,"translate"),c(3,"button",55),k("click",function(){I(e);let n=u();return P(n.goHome())}),h(4),v(5,"translate"),a()()}if(i&2){let e=u();s(),T(" ",C(2,2,e.httpDecryptErrorTxt)," "),s(3),T(" ",C(5,4,"login.goToDashboard")," ")}}var Tl=(()=>{class i{get formOtpGroup(){return this.emailVerificationForm.get("otpGroup")}get formInitiateGroup(){return this.emailVerificationForm.get("initiateGroup")}get formPasswordGroup(){return this.emailVerificationForm.get("passwordGroup")}get otpGroup(){return this.formOtpGroup}get initiateGroup(){return this.formInitiateGroup}get passwordGroup(){return this.formPasswordGroup}constructor(e,t,n,o,l,m){this.elRef=e,this.location=t,this.trs=n,this.commonService=o,this.formBuilder=l,this.authService=m,this.loaderTimer$=No(500),this.config=V,this.hidePassword=!0,this.hideConfirmPassword=!0,this.preventBack=!1,this.phoneHashed="",this.passwordMismatch=!1,this.cKey="controls",this.isOtpSubmitted=!1,this.isOtpStarted=!1,this.wrongOtpCode=!1,this.code="";let E=encodeURI(this.commonService.getParameterByName("tkn")??"null");this.paramToken=E}ngOnInit(){this.elRef.nativeElement.closest("body").classList.remove("color-scheme-light"),this.elRef.nativeElement.closest("body").classList.add("login-register-body"),this.emailVerificationForm=this.formBuilder.group({otpGroup:this.formBuilder.group({0:new _e("",[G.required]),1:new _e("",[G.required]),2:new _e("",[G.required]),3:new _e("",[G.required]),4:new _e("",[G.required]),5:new _e("",[G.required])},{validators:[G.max(1),G.required]}),initiateGroup:this.formBuilder.group({userMsisdn:[{value:"",disabled:!0},[G.required]],userEmail:[{value:"",disabled:!0},[G.required]],termOfUse:[!1,[G.required]]}),passwordGroup:this.formBuilder.group({password:["",[G.required,G.pattern(V.passwordRegexPattern)]],repeatPassword:["",[G.required]]},{validator:this.passwordMatchValidator})}),this.isTokenExist(this.paramToken);for(let e=1;e<6;e++)this.otpGroup.get(String(e)).disable();this.inputs=document.getElementsByClassName("otp-input-phone"),this.commonService.setNumericKeyboardOnInput("otp-input-phone")}resetOtpGroup(e){this.wrongOtpCode=!1,this.otpGroup.reset(),this.moveToNext("reset"),e&&e.reset()}passwordMatchValidator(e){let t=e.get("password").value,n=e.get("repeatPassword").value;return t===n?null:{passwordMismatch:!0}}onPasswordInput(){let e=this.passwordGroup.controls;e.password.value!==e.repeatPassword.value?(e.repeatPassword.setErrors([{passwordMismatch:!0}]),this.passwordMismatch=!0):(e.repeatPassword.setErrors(null),this.passwordMismatch=!1)}isTokenExist(e){e!=="null"?(console.log("this.paramToken",this.paramToken),this.tokenDecryption(this.paramToken)):this.httpDecryptErrorTxt=this.trs.trsTs("httpErrorCode.decryptError")}tokenDecryption(e){this.httpDecryptErrorTxt="";let t=e.replace(/%20/g,"+"),n=decodeURI(t);this.authService.tokenDecryption(n).subscribe(o=>{console.log("response tokenDecryption",o),this.userMsisdn=o.msisdn,this.phoneHashed=`${o.msisdn.substring(0,4)} xxxx ${o.msisdn.substring(o.msisdn.length-3)}`,this.userEmail=o.email,this.userCustomerCode=o.customerCode,this.userExternalId=o.externalId,this.decryptedToken=o.decryptedToken,this.registered=o.preRegistered,this.patchFormInitiateGroup()},o=>{console.log("Error occurred while decrypt token: ",o),this.handleError(o,"decrypt")})}patchFormInitiateGroup(){this.initiateGroup.patchValue({userMsisdn:this.userMsisdn?this.userMsisdn:"",userEmail:this.userEmail?this.userEmail:""});let e=this.initiateGroup.controls;
6e.userMsisdn.markAsTouched(),e.userMsisdn.updateValueAndValidity(),e.userEmail.markAsTouched(),e.userEmail.updateValueAndValidity()}stepOtp(e){if(this.otpRegistrationError=!1,this.httpOtpErrorTxt="",this.isOtpSubmitted=!0,this.isOtpStarted=!0,this.formOtpGroup.invalid){this.loaderTimer$.subscribe(()=>{this.isOtpStarted=!1}),console.log("formOtpGroup ERROR",this.formOtpGroup);return}else this.otpValidation(e)}otpValidation(e){let t="";if(Object.values(this.otpGroup.controls).forEach(n=>{t+=n.value}),this.code=t,this.code){let n={msisdn:this.userMsisdn,otp:this.code};this.authService.otpValidation(n).subscribe(o=>{console.log("response otpValidation",o),o?.userOtpValidation?.valid?(this.userOtpCode=this.code,e.next()):(this.otpRegistrationError=!0,this.httpOtpErrorTxt=this.trs.trsTs("httpErrorCode.otpIncorrect"),this.isOtpStarted=!1,this.resetOtpGroup())},o=>{console.log("Error occurred while validate OTP code: ",o),this.otpRegistrationError=!0,this.handleError(o,"otp-code"),this.isOtpStarted=!1,this.resetOtpGroup()})}else this.otpRegistrationError=!0,this.httpOtpErrorTxt=this.trs.trsTs("httpErrorCode.default")}stepInitiate(e){this.isInitiatedSubmitted=!0,this.isInitiatedStarted=!0;let t=this.initiateGroup.controls;if(this.formInitiateGroup.invalid||t.termOfUse.value===!1){this.loaderTimer$.subscribe(()=>{this.isInitiatedStarted=!1}),console.log("formInitiateGroup ERROR",this.formInitiateGroup);return}else console.log("formInitiateGroup",this.formInitiateGroup),e.next(),this.loaderTimer$.subscribe(()=>{this.isInitiatedSubmitted=!1,this.isInitiatedStarted=!1})}stepPassword(e){this.passwordError=!1,this.httpPasswordErrorTxt="",this.isPasswordSubmitted=!0,this.isPasswordStarted=!0;let t=this.passwordGroup.controls;if(console.log("formPasswordGroup[cKey].repeatPassword",t.repeatPassword),console.log("formPasswordGroup[cKey].repeatPassword.errors",t.repeatPassword.errors),t.password.markAsTouched(),t.password.updateValueAndValidity(),t.repeatPassword.markAsTouched(),t.repeatPassword.updateValueAndValidity(),this.formPasswordGroup.invalid){this.loaderTimer$.subscribe(()=>{this.isPasswordStarted=!1}),console.log("formPasswordGroup ERROR",this.formPasswordGroup);return}else console.log("formPasswordGroup",this.formPasswordGroup),console.log("FINAL & EXECUTION -> this.userEmail",this.userEmail),console.log("FINAL & EXECUTION -> this.userMsisdn",this.userMsisdn),console.log("FINAL & EXECUTION -> this.userOtpCode",this.userOtpCode),console.log("FINAL & EXECUTION -> this.userExternalId",this.userExternalId),console.log("FINAL & EXECUTION -> this.userCustomerCode",this.userCustomerCode),this.regFinalize(t,e)}regFinalize(e,t){let n={password:e.repeatPassword.value,eInvoice:!1};this.authService.registrationFinalization(n).subscribe(o=>{console.log("response registrationFinalization: ",o),t.next()},o=>{console.log("Error occurred while trying to register user (finalization): ",o),this.passwordError=!0,this.handleError(o,"finalization"),this.loaderTimer$.subscribe(()=>{this.isPasswordStarted=!1})})}fixTabAndDelete(e){e.target.value!==""&&e.key==="Backspace"?(e.preventDefault(),e.target.value="",this.preventBack=!0):this.preventBack=!1,e.key==="Tab"&&e.preventDefault()}moveToNext(e){let t;if(!this.preventBack){if(e==="reset"){this.otpGroup.get(String(0)).enable();for(let n=1;n<6;n++)this.otpGroup.get(String(n)).disable();return}if(this.otpRegistrationError=!1,e.srcElement.value.length>0){if(t=Number(e.srcElement.id)+1,t<=5)for(let n=0;n<this.inputs.length;n++)t!==n?this.otpGroup.get(String(n)).disable():this.otpGroup.get(String(n)).enable();t>6&&(this.isOtpStarted=!1)}else{if(t=Number(e.srcElement.id)-1,t>=0)for(let n=0;n<this.inputs.length;n++)t!==n?this.otpGroup.get(String(n)).disable():this.otpGroup.get(String(n)).enable();if(t<0)return}this.inputs[t]&&this.inputs[t].focus()}}handleError(e,t){switch(e.status){case 406:t==="otp-code"?this.httpOtpErrorTxt=this.trs.trsTs("httpErrorCode.otpValidation406"):t==="password"?this.httpPasswordErrorTxt="":t==="finalization"&&(this.httpPasswordErrorTxt=this.trs.trsTs("httpErrorCode.finalization406"));return;case 409:t==="otp-code"?this.httpOtpErrorTxt="":t==="password"?this.httpPasswordErrorTxt=this.trs.trsTs("httpErrorCode.execution409"):t==="finalization"&&(this.httpPasswordErrorTxt=this.trs.trsTs("httpErrorCode.finalization409"));return;case 410:t==="otp-code"?this.httpOtpErrorTxt="":t==="password"?this.httpPasswordErrorTxt="":t==="finalization"&&(this.httpPasswordErrorTxt=this.trs.trsTs("httpErrorCode.finalization410"));return;case 411:t==="otp-code"?this.httpOtpErrorTxt="":t==="password"?this.httpPasswordErrorTxt="":t==="finalization"&&(this.httpPasswordErrorTxt="");return;default:t==="decrypt"?this.httpDecryptErrorTxt=this.trs.trsTs("httpErrorCode.decryptError"):t==="otp-code"?this.httpOtpErrorTxt=this.trs.trsTs("httpErrorCode.default"):t==="password"?this.httpPasswordErrorTxt=this.trs.trsTs("httpErrorCode.default"):t==="finalization"&&(this.httpPasswordErrorTxt=this.trs.trsTs("httpErrorCode.default"));return}}goBack(){this.location.back()}goHome(){window.location.href=V.webDomain}ngOnDestroy(){this.elRef.nativeElement.closest("body").classList.add("color-scheme-light"),this.elRef.nativeElement.closest("body").classList.remove("login-register-body")}static{this.\u0275fac=function(t){return new(t||i)(b(Ie),b(ht),b(pe),b(Se),b(bt),b(ge))}}static{this.\u0275cmp=K({type:i,selectors:[["app-email-verification"]],decls:6,vars:3,consts:[["stepper",""],[1,"login-registration-pages","email-verification"],[1,"container-400"],[1,"logo-wrap",3,"href"],["svgIcon","vivacom-logo-colored",1,"logo-vivacom","log-reg"],[3,"linear"],[1,"description"],["autocomplete","off",3,"formGroup"],["formGroupName","otpGroup",3,"stepControl"],[3,"formGroup"],["formGroupName","otpGroup",1,"relative"],[1,"otp-inputs-wrap","redesign-wrap","black-bg"],[1,"form-group-field"],["id","0","maxlength","1","autocomplete","off","formControlName","0",1,"otp-input-phone",3,"keyup","keydown"],["id","1","maxlength","1","autocomplete","off","formControlName","1",1,"otp-input-phone",3,"keyup","keydown"],["id","2","maxlength","1","autocomplete","off","formControlName","2",1,"otp-input-phone",3,"keyup","keydown"],["id","3","maxlength","1","autocomplete","off","formControlName","3",1,"otp-input-phone",3,"keyup","keydown"],["id","4","maxlength","1","autocomplete","off","formControlName","4",1,"otp-input-phone",3,"keyup","keydown"],["id","5","maxlength","1","autocomplete","off","formControlName","5",1,"otp-input-phone",3,"keyup","keydown"],[1,"error-v3","fix-error-v3"],[1,"text-align-center","mt-auto"],[1,"radius100","btn-4-v3","bg-white","ladda-fix-v3",3,"click","ladda"],["formGroupName","initiateGroup",3,"stepControl"],[1,"description","text-align-center"],["formGroupName","initiateGroup",1,"grouped-mat-form-field","only-inputs"],["floatLabel","never",1,"style-type-v3","reset-margin"],["matInput","","autocomplete","off","type","email","formControlName","userEmail"],["matInput","","autocomplete","off","type","number","formControlName","userMsisdn"],[1,"mat-radio-button"],[1,"form-description-field","mat-form-field","style-type-v3"],[1,"mat-form-field-infix"],[1,"terms-wrap","black"],["href","javascript:void(0)",1,"text-underline"],[1,"terms-slide-wrap"],["formControlName","termOfUse",1,"global-mat-slide-toggle",3,"checked"],["formGroupName","passwordGroup",3,"stepControl"],[1,"mb-60",3,"formGroup"],["formGroupName","passwordGroup"],[1,"grouped-mat-form-field","only-inputs"],["floatLabel","never",1,"style-type-v3","reset-margin","with-icon"],["matInput","","formControlName","password","autocomplete","new-password","maxlength","24",3,"input","type"],[1,"eye-icon-wrap"],["matInput","","autocomplete","off","formControlName","repeatPassword","autocomplete","new-password","maxlength","24",3,"input","type"],[1,"error-v3"],[1,"text-align-center"],[1,"success-step-page"],[1,"img-wrap"],["src","assets/img/success-dialog-icon.svg","alt","success icon"],[1,"description","regular-small-desc","mb-40"],[1,"radius100","btn-4-v3","bg-white",3,"click"],[1,"error-v3","otp-error"],[1,"error-v3","terms-error"],[1,"eye-icon-wrap",3,"click"],["src","assets/img/eye-icon.svg","alt","eye-icon",1,"icon"],["src","assets/img/eye-hide-icon.svg","alt","eye-icon",1,"icon"],[1,"radius100","btn-4-v3","bg-white","mt-25",3,"click"]],template:function(t,n){t&1&&(c(0,"div",1)(1,"div",2)(2,"a",3),w(3,"mat-icon",4),a(),g(4,mh,100,68,"mat-stepper",5)(5,uh,6,6,"div",6),a()()),t&2&&(s(2),S("href",ce(n.config.webDomain),Y),s(2),_(n.paramToken!=="null"?4:5))},dependencies:[Re,ei,It,Tt,Ct,As,Et,St,wt,Pt,xt,yt,Zt,Jt,_t,Ge,Ze,vt,kt,ki,ie,ne],styles:[".login-registration-pages[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{margin-bottom:40px}@media only screen and (min-width: 1300px){.login-registration-pages[_ngcontent-%COMP%] .logo-wrap-gr[_ngcontent-%COMP%]{margin-bottom:120px}}.mdc-text-field--disabled[_ngcontent-%COMP%]{opacity:.38}.otp-inputs-wrap[_ngcontent-%COMP%]{margin-bottom:100px}.otp-error[_ngcontent-%COMP%]{position:absolute;
6left:0;top:60px}"]})}}return i})();function hh(i,r){if(i&1&&(c(0,"div",0),w(1,"mat-progress-spinner",1),a()),i&2){let e=u();s(),S("mode",e.commonService.mode)("strokeWidth",2)("diameter",80)}}function fh(i,r){i&1&&(c(0,"div",13),w(1,"img",14),a(),c(2,"div",15),h(3),v(4,"translate"),a()),i&2&&(s(3),T(" ",C(4,1,"eBillActivation.successfulActivation")," "))}function gh(i,r){i&1&&(c(0,"div",13),w(1,"img",16),a(),c(2,"div",15),h(3),v(4,"translate"),a()),i&2&&(s(3),T(" ",C(4,1,"eBillActivation.errorActivation")," "))}function _h(i,r){if(i&1){let e=L();c(0,"div",2),w(1,"app-language-toggle-bar",3),a(),c(2,"div",4)(3,"div",5)(4,"button",6),k("click",function(){I(e);let n=u();return P(n.goToPage())}),w(5,"img",7),h(6),v(7,"translate"),a(),c(8,"a",8),w(9,"mat-icon",9),a(),c(10,"div",10),g(11,fh,5,3),g(12,gh,5,3),c(13,"div",11)(14,"button",12),k("click",function(){I(e);let n=u();return P(n.goToPage())}),h(15),v(16,"translate"),v(17,"translate"),a()()()()()}if(i&2){let e=u();s(),S("isBlackBG",!0)("isLoginStyle",!0),s(5),T(" ",C(7,8,"login.back")," "),s(2),S("href",ce(e.config.webDomain),Y),s(3),_(e.tokenError?-1:11),s(),_(e.tokenError?12:-1),s(3),T(" ",e.activeUser?C(16,10,"eBillActivation.billsBtn"):C(17,12,"login.signIn")," ")}}var xl=(()=>{class i{constructor(e,t,n,o,l,m){this.elRef=e,this.auth=t,this.router=n,this.billsCustomerService=o,this.commonService=l,this.trs=m,this.config=V,this.isEBillActivateLoading=!0,this.hash="",this.activeUser=!1,this.tokenError=!1}ngOnInit(){this.elRef.nativeElement.closest("body").classList.remove("color-scheme-light"),this.elRef.nativeElement.closest("body").classList.add("login-register-body"),this.checkDoesTokenExist(),this.hash?(this.activeUser=!!this.auth.userAuth,this.confirmEBillRegistration()):this.router.navigate(["/signin"])}confirmEBillRegistration(){this.billsCustomerService.confirmEBillRegistration(this.hash).subscribe(e=>{e.status&&e.status!=="OK"&&(this.tokenError=!0),this.isEBillActivateLoading=!1},e=>{console.log("Server error: ",e),this.isEBillActivateLoading=!1,this.tokenError=!0})}checkDoesTokenExist(){let e=new URL(window.location.href);e.searchParams.has("token")&&(this.hash=e.searchParams.get("token")||"")}goToPage(){this.router.navigate([this.activeUser?"/bills/dashboard":"/signin"])}ngOnDestroy(){this.elRef.nativeElement.closest("body").classList.add("color-scheme-light"),this.elRef.nativeElement.closest("body").classList.remove("login-register-body")}static{this.\u0275fac=function(t){return new(t||i)(b(Ie),b(ge),b(de),b(Xt),b(Se),b(pe))}}static{this.\u0275cmp=K({type:i,selectors:[["app-ebill-activation"]],decls:2,vars:2,consts:[[1,"page-spinner","full-width","black-bgd"],[3,"mode","strokeWidth","diameter"],[1,"log-reg-lang-wrapper","tile-card-box-wrapper"],[3,"isBlackBG","isLoginStyle"],[1,"login-registration-pages","forgotten-password"],[1,"container-400"],[1,"reset-btn","step-back-button",3,"click"],["src","assets/img/back-icon-white.svg","alt","back"],[1,"logo-wrap",3,"href"],["svgIcon","vivacom-logo-colored",1,"logo-vivacom","log-reg"],[1,"success-step-page"],[1,"text-align-center"],[1,"radius100","btn-4-v3","bg-white",3,"click"],[1,"img-wrap"],["src","assets/img/success-dialog-icon.svg","alt","success icon"],[1,"description"],["src","assets/img/unsuccess-dialog-icon.svg","alt","unsuccess icon"]],template:function(t,n){t&1&&(g(0,hh,2,3,"div",0),g(1,_h,18,14)),t&2&&(_(n.isEBillActivateLoading?0:-1),s(),_(n.hash?1:-1))},dependencies:[gt,Ue,Re,ie,ne],encapsulation:2})}}return i})();var yl=(()=>{class i{constructor(e,t){this.router=e,this.storageService=t}canActivate(e,t){let o=e?.data?.isB2BAdmin??(this.storageService.get(D.USER_TYPE)===rt.B2B_ADMIN&&V.hasB2BView);return o?(this.router.navigate(["/home-overview"]),Ne(!1)):o===!1?(this.router.navigate(["/home"]),Ne(!0)):(this.storageService.clear(),this.router.navigate(["/signin"]),Ne(!1))}static{this.\u0275fac=function(t){return new(t||i)(W(de),W(Ee))}}static{this.\u0275prov=le({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var wl=(()=>{class i{constructor(){}ngOnInit(){}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=K({type:i,selectors:[["app-qr-code"]],decls:1,vars:0,template:function(t,n){t&1&&w(0,"router-outlet")},dependencies:[xi],encapsulation:2})}}return i})();var bl=(()=>{class i{constructor(e){this.elRef=e}ngOnInit(){this.elRef.nativeElement.closest("body").classList.remove("color-scheme-light"),this.elRef.nativeElement.closest("body").classList.add("login-register-body")}ngOnDestroy(){this.elRef.nativeElement.closest("body").classList.add("color-scheme-light"),this.elRef.nativeElement.closest("body").classList.remove("login-register-body")}static{this.\u0275fac=function(t){return new(t||i)(b(Ie))}}static{this.\u0275cmp=K({type:i,selectors:[["app-promo"]],decls:4,vars:2,consts:[[1,"log-reg-lang-wrapper","tile-card-box-wrapper"],[3,"isBlackBG","isLoginStyle"]],template:function(t,n){t&1&&(c(0,"div",0),w(1,"app-language-toggle-bar",1),a(),c(2,"h1"),h(3,"PROMO PAGE"),a()),t&2&&(s(),S("isBlackBG",!0)("isLoginStyle",!0))},dependencies:[Ue],styles:["h1[_ngcontent-%COMP%]{text-align:center;padding-top:20%;color:#fff;font-size:40px}"]})}}return i})();var Il=(()=>{class i{constructor(e){this.elRef=e}ngOnInit(){this.elRef.nativeElement.closest("body").classList.remove("color-scheme-light"),this.elRef.nativeElement.closest("body").classList.add("login-register-body"),window.location.href="https://united.group/"}ngOnDestroy(){this.elRef.nativeElement.closest("body").classList.add("color-scheme-light"),this.elRef.nativeElement.closest("body").classList.remove("login-register-body")}static{this.\u0275fac=function(t){return new(t||i)(b(Ie))}}static{this.\u0275cmp=K({type:i,selectors:[["app-redirection"]],decls:0,vars:0,template:function(t,n){},encapsulation:2})}}return i})();var Pl=[{path:"maintenance",loadChildren:()=>import("./chunk-5HVEEHYZ.js").then(i=>i.MAINTENANCE_ROUTES)},{path:"signin",component:_l,canActivate:[Ji]},{path:"registration",component:Sl},{path:"forgotten-password",component:hl},{path:"change-username",component:gl,canActivate:[Ji]},{path:"registration/email-verification",component:Tl},{path:"ebill-activation",component:xl},{path:"thank-you",component:pl},{path:"error",component:ml},{path:"cancel",component:ul},{path:"qr-code",component:wl,children:[{path:"",loadChildren:()=>import("./chunk-IU3V3YMV.js").then(i=>i.QR_CODE_REDIRECT_ROUTES)},{path:"",loadChildren:()=>import("./chunk-OB54KIVL.js").then(i=>i.QR_CODE_OPTIONS_ROUTES)}]},{path:"promo",component:bl},{path:"redirection",component:Il},{path:"",component:al,canActivate:[rr],resolve:{customers:io},children:[{path:"",redirectTo:"",pathMatch:"full",resolve:{isB2BAdmin:io},canActivate:[yl]},{path:"home",loadChildren:()=>import("./chunk-BKX24UO3.js").then(i=>i.DASHBOARD_ROUTES)},{path:"home-overview",loadChildren:()=>import("./chunk-D5HC4MAK.js").then(i=>i.DASHBOARD_OVERVIEW_ROUTES)},{path:"services",loadChildren:()=>import("./chunk-VDEN2Z6R.js").then(i=>i.SERVICES_ROUTES)},{path:"bills",loadChildren:()=>import("./chunk-6NEJUL46.js").then(i=>i.BILLS_ROUTES)},{path:"support",loadChildren:()=>import("./chunk-SHXAWRLO.js").then(i=>i.SUPPORT_ROUTES)},{path:"settings",loadChildren:()=>import("./chunk-KYOMLMQ7.js").then(i=>i.ACCOUNT_ROUTES)},{path:"notifications",loadChildren:()=>import("./chunk-NEFU2YEL.js").then(i=>i.NOTIFICATIONS_ROUTES)},{path:"service-details",loadChildren:()=>import("./chunk-OG2XUXFO.js").then(i=>i.SERVICE_DETAILS_ROUTES)},{path:"send-gift",loadChildren:()=>import("./chunk-KKDPYE7M.js").then(i=>i.SEND_GIFT_ROUTES)},{path:"offers",loadChildren:()=>import("./chunk-XTQLAUBS.js").then(i=>i.OFFERS_ROUTES)},{path:"access-info",loadChildren:()=>import("./chunk-WNFHZID3.js").then(i=>i.ACCESS_INFO_ROUTES)},{path:"payment-viva",loadChildren:()=>import("./chunk-YBRTDKA7.js").then(i=>i.PAYMENT_VIVA_ROUTES)},{path:"eon-kids",loadChildren:()=>import("./chunk-AJCGACX7.js").then(i=>i.EON_KIDS_ROUTES)},{path:"showtime",loadChildren:()=>import("./chunk-GXWE4D6W.js").then(i=>i.STREAMING_HOME_PAGE_ROUTES)}]},{path:"**",component:dl}];var kl={hasBackdrop:!0,backdropClass:"global-dialog-backdrop"};var Al=(()=>{class i extends is{constructor(){super(...arguments),this.overrides={swipe:{direction:Hammer.DIRECTION_All}}}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=Fo(i)))(n||i)}})()}static{this.\u0275prov=le({token:i,factory:i.\u0275fac})}}return i})();var Ml=(()=>
6{class i{static{this.LOGIN_SESSION_HEADER="x-login-session"}static{this.CHECK_USERNAME_URL="/api/self-care/auth/check-username"}static{this.LOGIN_URL="/api/self-care/auth/login"}constructor(e,t,n){this.authService=e,this.storageService=t,this.requestContextService=n,this.refreshTokenSubject=new ko(null)}decorateRequest(e,t=!0){let n=this.addRequestContextHeaders(e);return n=this.addLoginSessionHeader(n),t&&(n=this.addAuthHeader(n)),n}addLoginSessionHeader(e){let t=this.authService?.loginSessionId;return!t||!e.url.includes(i.LOGIN_URL)?e:e.clone({setHeaders:{[i.LOGIN_SESSION_HEADER]:t}})}adoptLoginSessionId(e,t){if(!(e instanceof zi)||!t.url.includes(i.CHECK_USERNAME_URL))return;let n=e.headers.get(i.LOGIN_SESSION_HEADER);n&&(this.authService.loginSessionId=n)}addRequestContextHeaders(e){let t=this.requestContextService.decorate(e),n=this.storageService.get(D.REGISTRATION_SESSION_ID);return!n||!this.isRegistrationRequest(e)||e.headers.has("sessionId")?t:t.clone({setHeaders:{sessionId:n}})}adoptRegistrationSessionId(e,t){if(!(e instanceof zi)||!this.isRegistrationRequest(t))return;let n=e.headers.get("sessionId");n&&this.storageService.set(D.REGISTRATION_SESSION_ID,n)}isRegistrationRequest(e){return e.url.includes("/api/self-care/registration/user/session")?!1:["/api/self-care/registration/","/user/registration_initiation","/user/registration_init_continuation","/user/registration_execution","/user/registration_finalization","/user/user_otp","/user/resend_sms","/user/otp_validation","/user/decryption","/user/msisdn-ba-validation","/user/ba_verification"].some(t=>e.url.includes(t))}requiresAuthHeader(e){return!e.url.includes("/auth/login")&&!e.url.includes("/auth/refresh")}addAuthHeader(e){return this.authService?.userAuth?.accessToken&&(e=e.clone({setHeaders:{accessToken:this.authService?.userAuth?.accessToken,Authorization:`Bearer ${this.authService?.userAuth?.accessToken}`}})),e}intercept(e,t){return e=this.decorateRequest(e,this.requiresAuthHeader(e)),t.handle(e).pipe(fn(n=>{this.adoptRegistrationSessionId(n,e),this.adoptLoginSessionId(n,e)}),Ke(n=>n instanceof Ti&&(n.status===401||n.status===415||n.status===440)?e.url.includes("/auth/login")||e.url.includes("/auth/refresh")?(this.authService.isRefreshing=!1,si(()=>n)):this.handleErrors(n,e,t):si(()=>n)))}
6handleErrors(e,t,n){if(e.status===415)return this.authService.logout(),si(()=>e);if(e.status===440)return n.handle(this.decorateRequest(t));if(e.status===401)return this.authService.isRefreshing?this.refreshTokenSubject.pipe(Ro(o=>o!==null),Oo(1),Sr(()=>n.handle(this.decorateRequest(t)))):(this.authService.isRefreshing=!0,this.refreshTokenSubject.next(null),this.authService.refreshAccessToken().pipe(Sr(o=>{let l=this.authService.userAuth;return this.authService.userAuth=Io(Ei({},l),{accessToken:o.accessToken,refreshToken:o.refreshToken,tokenType:"Bearer"}),o.userType&&this.storageService.set(D.USER_TYPE,o.userType),this.authService.isRefreshing=!1,this.storageService.set(D.INITIALIZED_ACCESS_TOKEN,"true"),this.storageService.set(D.EXPIRED_ACCESS_TOKEN,"true"),this.refreshTokenSubject.next(o),n.handle(this.decorateRequest(t))}),Ke(o=>(this.authService.isRefreshing=!1,this.authService.logout(),si(()=>o)))))}static{this.\u0275fac=function(t){return new(t||i)(W(ge),W(Ee),W(gs))}}static{this.\u0275prov=le({token:i,factory:i.\u0275fac})}}return i})();var Nl=(()=>{class i{constructor(e){this.maintenanceService=e}intercept(e,t){return t.handle(e).pipe(fn(n=>{n instanceof zi&&this.maintenanceService.applyResponse(n,e.url)}),Ke(n=>(n instanceof Ti&&this.maintenanceService.applyResponse(n,e.url),si(()=>n))))}static{this.\u0275fac=function(t){return new(t||i)(W(kn))}}static{this.\u0275prov=le({token:i,factory:i.\u0275fac})}}return i})();var Rl=(()=>{class i{constructor(){}isEmptyObject(e){return Object.keys(e).length===0&&e.constructor===Object}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=le({token:i,factory:i.\u0275fac})}}return i})();var Ol={providers:[ls(Pl,cs({anchorScrolling:"enabled",scrollPositionRestoration:"enabled"})),Do(ie.forRoot(),ns,Ge.forRoot({style:"slide-down",spinnerSize:30,spinnerColor:"#000",spinnerLines:12})),$o,ps,rr,Rl,ge,pe,Pn,Qt,Cs,Es,bi,Ii,Ss,Pe,Ls,Xt,Ws,Nn,Bs,Ji,Wo,In,$s,Hs,Oe,Qs,zs,qs,Ks,Us,Fs,Ys,us,Yt,$t,js,Ds,Mn,{provide:xr,useClass:Ml,multi:!0},{provide:xr,useClass:Nl,multi:!0},{provide:ys,useValue:Vs},{provide:hs,useValue:kl},{provide:xs,useClass:Gs},{provide:ts,useClass:Al},{provide:qo,useValue:"bg-BG"},Zo(Jo()),Ja()]};var f1=dc(Dl());Yo(Xs);yr.production&&(window&&yr.realProduction&&(window.console.log=()=>{},window.console.table=()=>{},window.console.warn=()=>{},window.console.error=()=>{}));var so=()=>{document.documentElement.classList.add("mat-icons-ready")};document.fonts.load('24px "Material Icons"').then(so,so);setTimeout(so,2e3);Xo(ia,Ol).catch(i=>console.error(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.