1import{$b as ct,$d as Xt,Aa as de,Ac as tt,Bb as Me,Be as Ke,Ca as E,Cc as L,Ce as Ze,Da as N,Dc as $t,Ea as I,Ec as je,Ee as ft,Fa as w,Fc as J,Fe as _t,Ga as m,Ge as ut,H as jt,Ha as M,I as Ce,Ia as S,Ie as gt,If as H,Ja as De,Je as ht,Jf as oe,K as $,Ka as kt,Kb as Fe,Kd as Wt,Kf as ae,La as Pt,Ld as Yt,Le as xt,M as Q,Ma as At,Mb as ot,Me as vt,N as Se,Na as Te,Nb as O,Nd as pt,Ob as at,Oe as bt,Pa as P,Pb as rt,Pe as Ct,Qa as et,Qb as Ve,Qf as wt,R as g,Ra as zt,Rb as ke,Rd as $e,Re as St,S as h,Sb as Ot,Se as Kt,Tb as Pe,Te as yt,Ub as st,Ue as Zt,Uf as fi,Ve as ti,Vf as _i,Wa as F,Wd as K,We as ei,Wf as ui,Xa as R,Xe as te,Ya as fe,Yb as lt,Ze as ee,_ as pe,_a as T,_d as Qe,aa as l,ac as Ae,af as ie,ba as _,bc as Re,bf as ii,bg as gi,ca as Ut,cb as W,cc as Oe,cf as ni,cg as hi,db as we,df as oi,dg as xi,eg as vi,fa as k,fc as qt,fg as bi,ga as f,gd as Qt,gf as Dt,hc as Le,hd as Ue,he as We,ib as it,ic as X,id as ze,j as me,jc as He,jd as V,je as dt,jf as Tt,ka as c,kb as Ee,kc as Be,kd as _e,ke as Jt,lb as nt,ld as qe,le as Ye,ma as ye,mb as Y,me as Xe,mf as ai,nc as G,nf as ri,p as ve,pa as s,qa as r,qb as Ne,qc as Ge,qf as ne,ra as b,sa as y,sb as Rt,ta as D,te as Je,uf as si,va as C,vc as Lt,vf as li,w as be,wa as v,wb as Ie,wc as mt,wf as ci,xa as d,xc as j,xf as mi,yf as pi,zf as di}from"./chunk-UGWSZHQI.js";var Hi=["warningDialog"],Bi=["settingsDialog"],Gi=["settingsDialog1"],ji=["disableAlertDialog"],Ui=["emailSelect"],zi=["textSelect"],qi=["voiceSelect"],$i=["pushSelect"],se=()=>({standalone:!0});function Qi(t,o){t&1&&(s(0,"div"),b(1,"app-skeleton-grid",23),r()),t&2&&(l(),c("columnCount",6)("rowCount",5)("showPaginator",!1))}function Wi(t,o){t&1&&(s(0,"mat-icon"),m(1,"attach_money"),r())}function Yi(t,o){t&1&&(s(0,"mat-icon"),m(1,"power_off"),r())}function Xi(t,o){t&1&&(s(0,"mat-icon"),m(1,"assessment"),r())}function Ji(t,o){t&1&&(s(0,"mat-icon"),m(1,"person_add"),r())}function Ki(t,o){t&1&&(s(0,"mat-icon"),m(1,"message "),r())}function Zi(t,o){t&1&&(s(0,"mat-icon"),m(1,"question_answer "),r())}function tn(t,o){t&1&&(s(0,"mat-icon"),m(1,"payment"),r())}function en(t,o){t&1&&(s(0,"mat-icon"),m(1,"autorenew "),r())}function nn(t,o){t&1&&(s(0,"th",50),m(1,"Alert Type"),r())}function on(t,o){if(t&1&&(s(0,"td",51),m(1),r()),t&2){let i=o.$implicit;l(),S(" ",i.name," ")}}function an(t,o){t&1&&(s(0,"th",50),m(1,"Description"),r())}function rn(t,o){if(t&1&&(s(0,"td",52),m(1),r()),t&2){let i=o.$implicit;l(),S(" ",i.description," ")}}function sn(t,o){if(t&1&&(s(0,"th",53),m(1,"Email"),r()),t&2){let i=d(5);c("hidden",!i.isEmailAvailable)}}function ln(t,o){if(t&1){let i=C();s(0,"span",58),v("click",function(){g(i);let n=d().$implicit,a=d(5);return h(a.viewSubscriptions(n.id,n.emails,"email"))}),m(1,"Subscribed"),r()}}function cn(t,o){t&1&&(s(0,"span",59),m(1,"Subscribed Notification Not Found"),r())}function mn(t,o){if(t&1&&(s(0,"td",54)(1,"span",55),m(2),r(),f(3,ln,2,0,"span",56)(4,cn,2,0,"span",57),r()),t&2){let i=o.$implicit,e=d(5);c("hidden",!e.isEmailAvailable),l(2),M(e.getNotifyValue(i,"email")),l(),c("ngIf",i.isEmailAvailable&&i.isEmailSubscribed),l(),c("ngIf",!i.isEmailSubscribed&&!i.isSmsSubscribed&&!i.isVoiceSubscribed)}}function pn(t,o){if(t&1&&(s(0,"th",53),m(1,"Text Message"),r()),t&2){let i=d(5);c("hidden",!i.isTextAvailable)}}function dn(t,o){if(t&1){let i=C();s(0,"span",62),v("click",function(){g(i);let n=d().$implicit,a=d(5);return h(a.viewSubscriptions(n.id,n.text,"text"))}),m(1,"Subscribed"),r()}}function fn(t,o){if(t&1&&(s(0,"td",54)(1,"span",60),m(2),r(),f(3,dn,2,0,"span",61),r()),t&2){let i=o.$implicit,e=d(5);c("hidden",!e.isTextAvailable),l(2),S("",e.getNotifyValue(i,"message")," "),l(),c("ngIf",i.isSmsAvailable&&i.isSmsSubscribed)}}function _n(t,o){if(t&1&&(s(0,"th",53),m(1,"Voice"),r()),t&2){let i=d(5);c("hidden",!i.isVoiceAvailable)}}function un(t,o){if(t&1){let i=C();s(0,"span",65),v("click",function(){g(i);let n=d().$implicit,a=d(5);return h(a.viewSubscriptions(n.id,n.voice,"voice"))}),m(1,"Subscribed"),r()}}function gn(t,o){if(t&1&&(s(0,"td",54)(1,"span",63),m(2),r(),f(3,un,2,0,"span",64),r()),t&2){let i=o.$implicit,e=d(5);c("hidden",!e.isVoiceAvailable),l(2),S("",e.getNotifyValue(i,"keyboard_voice")," "),l(),c("ngIf",i.isVoiceAvailable&&i.isVoiceSubscribed)}}function hn(t,o){if(t&1&&(s(0,"th",53),m(1,"Push"),r()),t&2){let i=d(5);c("hidden",!i.isPushAvailable)}}function xn(t,o){if(t&1){let i=C();s(0,"span",68),v("click",function(){g(i);let n=d().$implicit,a=d(5);return h(a.viewSubscriptions(n.id,n.push,"push"))}),m(1,"Subscribed"),r()}}function vn(t,o){if(t&1&&(s(0,"td",54)(1,"span",66),m(2),r(),f(3,xn,2,0,"span",67),r()),t&2){let i=o.$implicit,e=d(5);c("hidden",!e.isPushAvailable),l(2),S("",e.getNotifyValue(i,"notifications")," "),l(),c("ngIf",i.isPushAvailable&&i.isPushSubscribed)}}function bn(t,o){t&1&&b(0,"th",50)}function Cn(t,o){if(t&1){let i=C();s(0,"button",71),v("click",function(){g(i);let n=d().$implicit,a=d(2).$implicit,p=d(3);return h(p.viewSettings(n.id,n,a.id))}),s(1,"mat-icon"),m(2,"settings"),r(),s(3,"span"),m(4,"Setting"),r()()}}function Sn(t,o){if(t&1){let i=C();s(0,"button",71),v("click",function(){g(i);let n=d().$implicit,a=d(5);return h(a.launchEditDialog(n))}),s(1,"mat-icon"),m(2,"notifications_off"),r(),s(3,"span",72),m(4,"Disable alerts"),r()()}}function yn(t,o){if(t&1){let i=C();s(0,"td",52)(1,"button",69)(2,"mat-icon"),m(3,"more_vert"),r()(),s(4,"mat-menu",null,7),f(6,Cn,5,0,"button",70),s(7,"button",71),v("click",function(){g(i);let n=d(5);return h(n.navigateToManageContact())}),s(8,"mat-icon"),m(9,"contact_mail"),r(),s(10,"span"),m(11,"Add Contact"),r()(),f(12,Sn,5,0,"button",70),r()()}if(t&2){let i=o.$implicit,e=w(5),n=d(5);l(),c("matMenuTriggerFor",e),l(5),c("ngIf",!n.hasErrors&&n.destinationVerified),l(6),c("ngIf",!n.hasErrors&&n.destinationVerified&&n.isAlertsSubscribed(i))}}function Dn(t,o){t&1&&b(0,"tr",73)}function Tn(t,o){t&1&&b(0,"tr",74)}function wn(t,o){if(t&1&&(s(0,"table",35),y(1,36),f(2,nn,2,0,"th",37)(3,on,2,1,"td",38),D(),y(4,39),f(5,an,2,0,"th",37)(6,rn,2,1,"td",40),D(),y(7,41),f(8,sn,2,1,"th",42)(9,mn,5,4,"td",43),D(),y(10,44),f(11,pn,2,1,"th",42)(12,fn,4,3,"td",43),D(),y(13,45),f(14,_n,2,1,"th",42)(15,gn,4,3,"td",43),D(),y(16,46),f(17,hn,2,1,"th",42)(18,vn,4,3,"td",43),D(),y(19,47),f(20,bn,1,0,"th",37)(21,yn,13,3,"td",40),D(),f(22,Dn,1,0,"tr",48)(23,Tn,1,0,"tr",49),r()),t&2){let i=d().$implicit,e=d(3);c("dataSource",i==null?null:i.notificationTypes),l(22),c("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",!0),l(),c("matRowDefColumns",e.displayedColumns)}}function En(t,o){if(t&1&&(s(0,"mat-expansion-panel",29)(1,"mat-expansion-panel-header",30,6)(3,"mat-panel-title",31)(4,"div",32),m(5),r()(),s(6,"mat-panel-description"),f(7,Wi,2,0,"mat-icon",33),F(8,"lowercase"),f(9,Yi,2,0,"mat-icon",33),F(10,"lowercase"),f(11,Xi,2,0,"mat-icon",33),F(12,"lowercase"),f(13,Ji,2,0,"mat-icon",33),F(14,"lowercase"),f(15,Ki,2,0,"mat-icon",33),F(16,"lowercase"),f(17,Zi,2,0,"mat-icon",33),F(18,"lowercase"),f(19,tn,2,0,"mat-icon",33),F(20,"lowercase"),f(21,en,2,0,"mat-icon",33),F(22,"lowercase"),r()(),f(23,wn,24,4,"ng-template",34),r()),t&2){let i=o.$implicit,e=o.first;c("expanded",e),l(5),M(i.name),l(2),c("ngIf",R(8,10,i.name)=="billing"),l(2),c("ngIf",R(10,12,i.name)=="outage"),l(2),c("ngIf",R(12,14,i.name)=="usage"),l(2),c("ngIf",R(14,16,i.name)=="registration"),l(2),c("ngIf",R(16,18,i.name)=="coop special messaging"),l(2),c("ngIf",R(18,20,i.name)=="inquiries and requests"),l(2),c("ngIf",R(20,22,i.name)=="prepaid"),l(2),c("ngIf",R(22,24,i.name)=="prepaid auto subscribed")}}function Nn(t,o){if(t&1&&(s(0,"mat-accordion",27,5),f(2,En,24,26,"mat-expansion-panel",28),r()),t&2){let i=d(2);c("multi",!1),l(2),c("ngForOf",i.notificationGroups)}}function In(t,o){t&1&&(s(0,"div",75),m(1," Notifications are not supported for this account at this time. "),r())}function Mn(t,o){if(t&1&&(s(0,"form",24),f(1,Nn,3,2,"mat-accordion",25)(2,In,2,0,"div",26),r()),t&2){let i=d();c("formGroup",i.form),l(),c("ngIf",i.notificationGroups&&i.notificationGroups.length>0),l(),c("ngIf",!i.notificationGroups||i.notificationGroups.length===0)}}function Fn(t,o){if(t&1&&(s(0,"div",94),m(1),r()),t&2){let i=d(2);l(),S(" ",i.errorMessage," ")}}function Vn(t,o){if(t&1){let i=C();s(0,"mat-form-field",95)(1,"mat-label"),m(2,"Reminder Days"),r(),s(3,"input",96),v("input",function(n){g(i);let a=d(2);return h(a.isNumber(n.target.value,"billDueDateLeadDays"))}),r()()}t&2&&(l(3),c("value",2))}function kn(t,o){if(t&1){let i=C();s(0,"mat-form-field",95)(1,"mat-label"),m(2,"Reminder Days"),r(),s(3,"input",97),v("input",function(n){g(i);let a=d(2);return h(a.isNumber(n.target.value,"arrDueDateLeadDays"))}),r()()}t&2&&(l(3),c("value",2))}function Pn(t,o){if(t&1){let i=C();s(0,"mat-form-field",95)(1,"mat-label"),m(2,"Low Balance"),r(),s(3,"input",98),v("input",function(n){g(i);let a=d(2);return h(a.isNumber(n.target.value,"lowBalanceThreshold"))}),r()()}t&2&&(l(3),c("value",2))}function An(t,o){if(t&1){let i=C();
1s(0,"mat-form-field",95)(1,"mat-label"),m(2,"Excessive Usage"),r(),s(3,"input",99),v("input",function(n){g(i);let a=d(2);return h(a.isNumber(n.target.value,"excessiveUsage"))}),r()()}t&2&&(l(3),c("value",2))}function Rn(t,o){t&1&&(s(0,"span",72),m(1,"\xA0\xA0Must be before end time"),r())}function On(t,o){if(t&1&&(s(0,"mat-option",100),m(1),r()),t&2){let i=o.$implicit,e=d(2);c("value",i.value),l(),S(" ",e.formatTimeDisplay(i.display)," ")}}function Ln(t,o){t&1&&(s(0,"span",72),m(1,"\xA0\xA0Must be after start time"),r())}function Hn(t,o){if(t&1&&(s(0,"mat-option",100),m(1),r()),t&2){let i=o.$implicit,e=d(2);c("value",i.value),l(),S(" ",e.formatTimeDisplay(i.display)," ")}}function Bn(t,o){if(t&1){let i=C();s(0,"mat-option",106),v("click",function(){g(i);let n=d(3);return h(n.optionEmailClick())}),m(1),r()}if(t&2){let i=o.$implicit;c("value",i.id),l(),S(" ",i.address," ")}}function Gn(t,o){if(t&1){let i=C();s(0,"mat-form-field",101)(1,"mat-label"),m(2,"Email"),r(),s(3,"mat-select",102,8)(5,"div",103)(6,"mat-checkbox",104),At("ngModelChange",function(n){g(i);let a=d(2);return Pt(a.allEmailSelected,n)||(a.allEmailSelected=n),h(n)}),v("change",function(){g(i);let n=d(2);return h(n.toggleAllEmailSelection())}),m(7,"Select All"),r()(),f(8,Bn,2,2,"mat-option",105),r()()}if(t&2){let i=d(2);l(6),kt("ngModel",i.allEmailSelected),c("ngModelOptions",P(3,se)),l(2),c("ngForOf",i.selectedNotificationType.emails)}}function jn(t,o){if(t&1){let i=C();s(0,"mat-option",106),v("click",function(){g(i);let n=d(3);return h(n.optionTextClick())}),m(1),r()}if(t&2){let i=o.$implicit;c("value",i.id),l(),S(" ",i.address," ")}}function Un(t,o){if(t&1){let i=C();s(0,"mat-form-field",107)(1,"mat-label"),m(2,"Text"),r(),s(3,"mat-select",108,9)(5,"div",103)(6,"mat-checkbox",104),At("ngModelChange",function(n){g(i);let a=d(2);return Pt(a.allTextSelected,n)||(a.allTextSelected=n),h(n)}),v("change",function(){g(i);let n=d(2);return h(n.toggleAllTextSelection())}),m(7,"Select All"),r()(),f(8,jn,2,2,"mat-option",105),r()()}if(t&2){let i=d(2);l(6),kt("ngModel",i.allTextSelected),c("ngModelOptions",P(3,se)),l(2),c("ngForOf",i.selectedNotificationType.text)}}function zn(t,o){if(t&1){let i=C();s(0,"mat-option",106),v("click",function(){g(i);let n=d(3);return h(n.optionVoiceClick())}),m(1),r()}if(t&2){let i=o.$implicit;c("value",i.id),l(),S(" ",i.address," ")}}function qn(t,o){if(t&1){let i=C();s(0,"mat-form-field",107)(1,"mat-label"),m(2,"Voice"),r(),s(3,"mat-select",109,10)(5,"div",103)(6,"mat-checkbox",104),At("ngModelChange",function(n){g(i);let a=d(2);return Pt(a.allVoiceSelected,n)||(a.allVoiceSelected=n),h(n)}),v("change",function(){g(i);let n=d(2);return h(n.toggleAllVoiceSelection())}),m(7,"Select All"),r()(),f(8,zn,2,2,"mat-option",105),r()()}if(t&2){let i=d(2);l(6),kt("ngModel",i.allVoiceSelected),c("ngModelOptions",P(3,se)),l(2),c("ngForOf",i.selectedNotificationType.voice)}}function $n(t,o){if(t&1){let i=C();s(0,"mat-option",106),v("click",function(){g(i);let n=d(3);return h(n.optionPushClick())}),m(1),r()}if(t&2){let i=o.$implicit,e=d(3);c("value",i.id),l(),S(" ",e.getDeviceProfileName(i.address)," ")}}function Qn(t,o){if(t&1){let i=C();s(0,"mat-form-field",107)(1,"mat-label"),m(2,"Push"),r(),s(3,"mat-select",110,11)(5,"div",103)(6,"mat-checkbox",104),At("ngModelChange",function(n){g(i);let a=d(2);return Pt(a.allDevicesSelected,n)||(a.allDevicesSelected=n),h(n)}),v("change",function(){g(i);let n=d(2);return h(n.toggleAllDeviceSelection())}),m(7,"Select All"),r()(),f(8,$n,2,2,"mat-option",105),r()()}if(t&2){let i=d(2);l(6),kt("ngModel",i.allDevicesSelected),c("ngModelOptions",P(3,se)),l(2),c("ngForOf",i.selectedNotificationType.push)}}function Wn(t,o){if(t&1){let i=C();s(0,"form",76),v("ngSubmit",function(){g(i);let n=d();return h(n.saveNotificationSettings(n.notificationSettingsForm.value,n.selectedNotificationType))}),s(1,"div",77)(2,"h5",78),m(3),r()(),f(4,Fn,2,1,"div",79),b(5,"app-alert"),s(6,"div",80)(7,"div",81),f(8,Vn,4,1,"mat-form-field",82)(9,kn,4,1,"mat-form-field",82)(10,Pn,4,1,"mat-form-field",82)(11,An,4,1,"mat-form-field",82),s(12,"mat-form-field",83)(13,"mat-label"),m(14,"Start Time "),f(15,Rn,2,0,"span",84),r(),s(16,"mat-select",85),f(17,On,2,2,"mat-option",86),r()(),s(18,"mat-form-field",83)(19,"mat-label"),m(20,"End Time "),f(21,Ln,2,0,"span",84),r(),s(22,"mat-select",87),f(23,Hn,2,2,"mat-option",86),r()()(),s(24,"div",88),f(25,Gn,9,4,"mat-form-field",89)(26,Un,9,4,"mat-form-field",90)(27,qn,9,4,"mat-form-field",90)(28,Qn,9,4,"mat-form-field",90),r()(),s(29,"div",91)(30,"button",92),m(31,"Close"),r(),s(32,"button",93),m(33,"Save Settings"),r()()()}if(t&2){let i=d();c("formGroup",i.notificationSettingsForm),l(3),M(i.selectedNotificationType.n
1ame),l(),c("ngIf",i.errorMessage),l(4),c("ngIf",i.selectedNotificationType.name==="Custom Bill Due Date Reminder"),l(),c("ngIf",i.selectedNotificationType.name==="Arrangement Due Date Reminder"),l(),c("ngIf",i.selectedNotificationType.name==="Low Balance"),l(),c("ngIf",i.selectedNotificationType.name==="Excessive Usage - (kWh)"),l(4),c("ngIf",i.isInvalidStartTime("startTime","endTime")),l(2),c("ngForOf",i.options),l(4),c("ngIf",i.isInvalidStartTime("startTime","endTime")),l(2),c("ngForOf",i.options),l(2),c("ngIf",i.selectedNotificationType&&i.isEmailAvailable&&i.selectedNotificationType.isEmailAvailable),l(),c("ngIf",i.selectedNotificationType&&i.isTextAvailable&&i.selectedNotificationType.isSmsAvailable),l(),c("ngIf",i.selectedNotificationType&&i.isVoiceAvailable&&i.selectedNotificationType.isVoiceAvailable),l(),c("ngIf",i.selectedNotificationType&&i.isPushAvailable&&i.selectedNotificationType.isPushAvailable),l(4),c("disabled",i.hasDateError)}}function Yn(t,o){if(t&1&&(s(0,"div",77)(1,"h4",111),m(2,"Warning"),r()(),s(3,"div",80)(4,"p",112),m(5),r()(),s(6,"div",91)(7,"button",113),m(8,"Ok"),r()()),t&2){let i=d();l(5),M(i.errorMessage)}}function Xn(t,o){if(t&1&&(s(0,"li"),m(1),r()),t&2){let i=d(2).$implicit;l(),M(i.address)}}function Jn(t,o){if(t&1&&(s(0,"div"),f(1,Xn,2,1,"li",33),r()),t&2){let i=d().$implicit;l(),c("ngIf",i.isSubscribed)}}function Kn(t,o){if(t&1&&(s(0,"li"),m(1),F(2,"formatPhone"),r()),t&2){let i=d(2).$implicit;l(),S(" ",R(2,1,i.address)," ")}}function Zn(t,o){if(t&1&&(s(0,"div"),f(1,Kn,3,3,"li",33),r()),t&2){let i=d().$implicit;l(),c("ngIf",i.isSubscribed)}}function to(t,o){if(t&1&&(y(0),f(1,Jn,2,1,"div",33)(2,Zn,2,1,"div",33),D()),t&2){let i=d(2);l(),c("ngIf",!i.isPhoneFormat),l(),c("ngIf",i.isPhoneFormat)}}function eo(t,o){if(t&1&&(s(0,"div",77)(1,"h5",114),m(2),r()(),s(3,"div",115)(4,"ul"),f(5,to,3,2,"ng-container",116),r()(),s(6,"div",117)(7,"button",92),m(8,"Close"),r()()),t&2){let i=d();l(2),M(i.subscribedTitle),l(3),c("ngForOf",i.selectedNotificationType1)}}function io(t,o){if(t&1){let i=C();s(0,"form",118),v("ngSubmit",function(){g(i);let n=d();return h(n.removeDestination(n.disableNotificationType))}),s(1,"div",80)(2,"p",112),m(3,"The selected notification has subscribed alert. Do you want to disable them?"),r()(),s(4,"div",117)(5,"button",119),m(6,"No"),r(),s(7,"button",120),m(8,"Yes"),r()()()}}var Ei=(()=>{let o=class o{constructor(e,n,a,p,x,u,U,z,q,Z,Nt,It,Mt){this.formBuilder=e,this.notificationService=n,this.dataService=a,this.authService=p,this.changeDetector=x,this.configSettingsService=u,this.router=U,this.alertService=z,this.changeAccountService=q,this.logger=Z,this.dialog=Nt,this.route=It,this.location=Mt,this.isInitCompleted=k(!1),this.isUpdateCompleted=k(!0),this.isDeleteCompleted=k(!0),this.isLoading=we(()=>!this.isInitCompleted()||!this.isUpdateCompleted()||!this.isDeleteCompleted()),this.selectedEmailsFromArray=[],this.selectedTextsFromArray=[],this.selectedVoicesFromArray=[],this.selectedPushDevicesFromArray=[],this.destinationVerified=!1,this.webConfigSettings=["NOTIFICATIONS_NOT_SUPPORTED","NOTIFICATIONVERIFYHELPMSG","NOTIFICATIONDELETEMSG","SMSTERMSMSG","NOTIFICATIONREGHELPMSG","NOTIFICATIONSELECTHELPMSG","NOTIFICATIONMGMTMSG","SUBSCRIBEDHELPMSG","UNSUBSCRIBEDHELPMSG","NOTIFICATIONTIMEMSG","EXCESSIVEUSAGEHELPMSG","LOWBALANCETHRESHOLDHELPMSG","EMAILVERIFYMSG","TEXTVERIFYMSG","VOICEVERIFYMSG","ACCOUNTINFOUPDATESUCCESS"],this.configSettings=["EDIT_LANGUAGE_PREFERENCE","MINUTE_INTERVAL"],this.notificationGroups=[],this.hasErrors=!1,this.allEmailSelected=!1,this.allTextSelected=!1,this.allVoiceSelected=!1,this.allDevicesSelected=!1,this.isEmailAvailable=!1,this.isTextAvailable=!1,this.isVoiceAvailable=!1,this.isPushAvailable=!1,this.isSelectAllEnabled=!1,this.isPhoneFormat=!1,this.availableMsg="Not Available",this.subscribeMsg="Not Subscribed",this.displayedColumns=["name","description","email","sms","voice","push","star"],this.hasDateError=!1,this.accountDevices=[],this.saveNotificationSettings=(B,Ft)=>{let Vt=new Qt;if(Vt.accountNumber=this.accountNumber,Vt.memberNumber=this.memberNumber,this.errorMessage="",B.email?.length===0&&B.text?.length===0&&B.voice?.length===0&&B.push?.length===0){this.errorMessage="Please select at least one alert type.";return}let xe=[];
1switch(Ft.name){case"Excessive Usage - (kWh)":this.excessiveUsage=B.excessiveUsage.toString();break;case"Low Balance":this.lowBalanceThreshold=B.lowBalanceThreshold.toString();break;case"Custom Bill Due Date Reminder":this.billDueDateLeadDays=B.billDueDateLeadDays.toString();break;case"Arrangement Due Date Reminder":this.arrDueDateLeadDays=B.arrDueDateLeadDays.toString();break}if(this.isUpdateCompleted.set(!1),this.errorMessage=this.getErrorMessage(Ft.name),this.errorMessage.length>0){this.isUpdateCompleted.set(!0);return}this.errorMessage="";try{Ft.destinations.forEach(A=>{xe.push({destinationId:A.id,destinationAddress:A.address,destinationStatusId:A.statusId,transportTypeId:A.transportTypeId,notificationTypes:this.buildNotificationTypes(A)})}),Vt.destinations=xe,Vt.memberNumber=this.memberNumber,this.dialog.closeAll(),this.notificationService.updateSubscriptions(Vt).subscribe(A=>{this.alertService.success(A.message),this.isUpdateCompleted.set(!0),this.isInitCompleted.set(!1),this.getData()},A=>{this.alertService.error(A),this.isUpdateCompleted.set(!0),this.logger.error("Error from updateSubscriptions: "+A)})}catch(A){this.isUpdateCompleted.set(!0),this.alertService.error(A),window.scrollTo(0,0)}},this.memberNumber=p.currentUserValue.memberNumber,this.accountNumber=a.accountInfoResp.accountNumber}get f(){return this.form.controls}get formNotificationsArray(){return this.form.controls.notifications}get formNotificationsGroups(){return this.formNotificationsArray.controls}ngOnInit(){this.isInitCompleted.set(!1),this.alertService.clear(),this.router.queryParamMap.subscribe(e=>{let n=e.get("accountno");n!==null&&(this.isInitCompleted.set(!1),this.accountNumber=parseInt(n,10),this.changeAccountService.handleAccountSelection(this.accountNumber),this.location.replaceState(this.location.path().split("?")[0],""),this.getData())}),this.form=this.formBuilder.group({accountNumber:[this.accountNumber],notifications:this.formBuilder.array([this.formBuilder.group({destinationId:[],destinationAddress:[],transportTypeId:[],notificationTypes:this.formBuilder.array([this.formBuilder.group({notifyTypeId:[],notifyTypeName:[],enabled:[],originalStartTime:[],originalEndTime:[],startTime:[],endTime:[],excessiveUsage:[0],lowBalanceThreshold:[0],billDueDateLeadDays:[0],arrDueDateLeadDays:[0]})])})])}),this.getConfigSettings()}initNotifications(e){return this.formBuilder.group({destinationId:[e.id],destinationAddress:[e.address],transportTypeId:[e.transportTypeId],destinationStatusId:[e.statusId],notificationTypes:this.formBuilder.array([])})}getData(){this.notificationService.getSubscriberInformation(this.accountNumber,this.memberNumber).subscribe(e=>{this.logger.info("Response received from getSubscriberInformation:"+e),this.bindData(e),this.isPushAvailable&&this.getAccountDeviceInfo(),this.changeDetector.detectChanges(),this.isInitCompleted.set(!0)},e=>{this.logger.error("Error from getSubscriberInformation: "+e),this.alertService.error(e),this.isInitCompleted.set(!0),this.hasErrors=!0})}async getAccountDeviceInfo(){try{this.accountDevices=await this.notificationService.getAccountDeviceInfo(this.memberNumber).toPromise()}catch(e){this.alertService.error(e),this.hasErrors=!0}}getDeviceProfileName(e){if(this.accountDevices){let n=this.accountDevices.find(a=>a.hardwareId===e);if(n)return n.profileName}return e}bindData(e){try{if(this.notification=e,this.notification.subscriberNotification){this.notificationGroups=this.notification.subscriberNotification.notificationGroups;let n=this.notification.subscriberNotification.notificationTypes,a=this.notification.subscriberNotification.transportTypes;this.isEmailAvailable=a.some(p=>p.notifyTypeName==="Email"),this.isTextAvailable=a.some(p=>p.notifyTypeName==="SMS"),this.isVoiceAvailable=a.some(p=>p.notifyTypeName==="Voice"),this.isPushAvailable=a.some(p=>p.notifyTypeName==="Push"),this.destinations=this.notification.subscriberNotification.subscriber.destinations,this.destinationsVerified=this.destinations.filter(p=>p.statusId===2),this.destinationsVerified.length>0?this.destinationVerified=!0:this.destinationVerified=!1,this.options=this.notification.subscriberNotification.startEndTime.options,this.notificationSettingsForm=this.formBuilder.group({billDueDateLeadDays:"",arrDueDateLeadDays:"",lowBalanceThreshold:"",excessiveUsage:"",startTime:"",endTime:"",email:"",text:"",voice:"",push:""})}}catch(n){this.alertService.error(n),this.logger.error("Error at bindData():"+n)}}toggleAllEmailSelection(){this.allEmailSelected?this.select.options.forEach(e
1=>e.select()):this.select.options.forEach(e=>e.deselect())}optionEmailClick(){let e=!0;this.select.options.forEach(n=>{n.selected||(e=!1)}),this.allEmailSelected=e}toggleAllTextSelection(){this.allTextSelected?this.textSelect.options.forEach(e=>e.select()):this.textSelect.options.forEach(e=>e.deselect())}optionTextClick(){let e=!0;this.textSelect.options.forEach(n=>{n.selected||(e=!1)}),this.allTextSelected=e}toggleAllVoiceSelection(){this.allVoiceSelected?this.voiceSelect.options.forEach(e=>e.select()):this.voiceSelect.options.forEach(e=>e.deselect())}optionVoiceClick(){let e=!0;this.voiceSelect.options.forEach(n=>{n.selected||(e=!1)}),this.allVoiceSelected=e}toggleAllDeviceSelection(){this.allDevicesSelected?this.pushSelect.options.forEach(e=>e.select()):this.pushSelect.options.forEach(e=>e.deselect())}optionPushClick(){let e=!0;this.pushSelect.options.forEach(n=>{n.selected||(e=!1)}),this.allDevicesSelected=e}getConfigSettings(){this.configSettingsService.getConfigSettings(this.configSettings,[],this.webConfigSettings).subscribe(e=>{try{let n=e[0];this.minutesGap=n.find(p=>p.key===this.configSettings[1]).value;let a=e[2];this.isInitCompleted.set(!1),this.getData()}catch(n){this.alertService.error(n),this.logger.error("Error while fetching config settings for notifications: "+n),this.isInitCompleted.set(!0),this.hasErrors=!0}},e=>{this.logger.error("Error while fetching config settings for notifications: "+e),this.alertService.error(e),this.isInitCompleted.set(!0),this.hasErrors=!0})}submit(){let e=new Qt;e.accountNumber=this.accountNumber;let n=[];this.errorMessage="";try{this.formNotificationsGroups.forEach(a=>{let x=a.controls.notificationTypes.controls}),e.destinations=n,e.memberNumber=this.memberNumber,this.notificationService.updateSubscriptions(e).subscribe(a=>{this.alertService.success(a.message),this.isInitCompleted.set(!1),this.getData()},a=>{this.alertService.error(a),this.logger.error("Error from updateSubscriptions: "+a)})}catch(a){this.alertService.error(a),window.scrollTo(0,0)}}navigateToManageContact(){this.route.navigateByUrl("/manage-contacts",{state:{data:{isFromAddContact:!0}}})}getErrorMessage(e){let n="";switch(e){case"Excessive Usage - (kWh)":this.excessiveUsage.length===0?n="Please enter a kWh value for Excessive Usage.":parseInt(this.excessiveUsage,10)<=0&&(n="Please enter a kWh value for Excessive Usage that is greater than 0.");break;case"Low Balance":this.lowBalanceThreshold.length===0?n="Please enter a value for Low Balance.":parseInt(this.lowBalanceThreshold,10)<=0&&(n="Please enter a value for Low Balance that is greater than 0.");break;case"Custom Bill Due Date Reminder":this.billDueDateLeadDays.length===0?n="Please enter a value for Custom Bill Due Date Reminder.":parseInt(this.billDueDateLeadDays,10)<=0?n="Please enter a value for Custom Bill Due Date Reminder that is greater than 0.":parseInt(this.billDueDateLeadDays,10)>10&&(n="Please enter a value for the Custom Bill Due Date Reminder that is 10 or less.");break;case"Arrangement Due Date Reminder":this.arrDueDateLeadDays.length===0?n="Please enter a value for Arrangement Due Date Reminder.":parseInt(this.arrDueDateLeadDays,10)<=0?n="Please enter a value for Arrangement Due Date Reminder that is greater than 0.":parseInt(this.arrDueDateLeadDays,10)>10&&(n="Please enter a value for the Arrangement Due Date Reminder that is 10 or less.");break}return n}populateDueDateLeadDays(e){let n=0;switch(e){case"Custom Bill Due Date Reminder":n=parseInt(this.billDueDateLeadDays,10);break;case"Arrangement Due Date Reminder":n=parseInt(this.arrDueDateLeadDays,10);break}return n}numberOnly(e){let n=e.which?e.which:e.keyCode;return n>47&&n<58}changeExcessiveUsage(e){this.excessiveUsage=e.target.value}changeLowBalanceThreshold(e){this.lowBalanceThreshold=e.target.value}changeBillDueDateLeadDays(e){this.billDueDateLeadDays=e.target.value}changeArrDueDateLeadDays(e){this.arrDueDateLeadDays=e.target.value}launchEditDialog(e){return this.disableNotificationType=e,this.opendisableAlertDialog(this.disableAlertRef1),!1}getNotificationGroup(e,n){return this.formNotificationsGroups[e].controls.notificationTypes.controls[n]}subscribeAllNotifications(e){this.isSelectAllEnabled=e,this.subscribedControls.forEac
1h(n=>{n.patchValue(e)})}setSelectAllEnabled(){this.isSelectAllEnabled=this.subscribedControls.length===this.subscribedControls.filter(e=>e.value===!0).length}hasInvalidControls(e){let n=[],a=p=>{Object.keys(p.controls).forEach(x=>{let u=p.get(x);u.invalid&&n.push(x),(u instanceof Ve||u instanceof Le)&&a(u)})};return a(e),n.length>0}viewSettings(e,n,a){this.selectedNotificationType=this.notificationGroups?.find(u=>u.id===a).notificationTypes.find(u=>u.id===e),this.selectedEmailsFromArray=[],this.selectedTextsFromArray=[],this.selectedVoicesFromArray=[],this.selectedPushDevicesFromArray=[],this.selectedNotificationType.emails.filter(u=>u.isSubscribed===!0).forEach(u=>{this.selectedEmailsFromArray.push(u.id)}),this.selectedNotificationType.text.filter(u=>u.isSubscribed===!0).forEach(u=>{this.selectedTextsFromArray.push(u.id)}),this.selectedNotificationType.voice.filter(u=>u.isSubscribed===!0).forEach(u=>{this.selectedVoicesFromArray.push(u.id)}),this.selectedNotificationType.push.filter(u=>u.isSubscribed===!0).forEach(u=>{this.selectedPushDevicesFromArray.push(u.id)}),this.notificationSettingsForm.controls.billDueDateLeadDays.patchValue(this.selectedNotificationType.customBillDueDateLeadDays),this.notificationSettingsForm.controls.arrDueDateLeadDays.patchValue(this.selectedNotificationType.arrangementDueDateLeadDays),this.notificationSettingsForm.controls.lowBalanceThreshold.patchValue(this.selectedNotificationType.lowBalanceThreshold),this.notificationSettingsForm.controls.excessiveUsage.patchValue(this.selectedNotificationType.excessiveUsage);let p=this.options?.[0]?.value??"",x=this.options?.[this.options.length-1]?.value??p;return this.notificationSettingsForm.controls.startTime.patchValue(this.selectedNotificationType.startTime||p),this.notificationSettingsForm.controls.endTime.patchValue(this.selectedNotificationType.endTime||x),this.notificationSettingsForm.controls.email.patchValue(this.selectedEmailsFromArray),this.notificationSettingsForm.controls.text.patchValue(this.selectedTextsFromArray),this.notificationSettingsForm.controls.voice.patchValue(this.selectedVoicesFromArray),this.notificationSettingsForm.controls.push.patchValue(this.selectedPushDevicesFromArray),this.openNotificationSettingsDialog(this.notificationSettingsRef),!1}viewSubscriptions(e,n,a){switch(this.selectedNotificationType1=n,a){case"email":this.subscribedTitle="Emails subscribed",this.isPhoneFormat=!1;break;case"text":this.subscribedTitle="Phone number subscribed to text message alert",this.isPhoneFormat=!0;break;case"voice":this.subscribedTitle="Phone number subscribed to voice message alert",this.isPhoneFormat=!0;break;case"push":this.subscribedTitle="Devices enabled for Push Notifications",this.isPhoneFormat=!1;break}return this.openSubscriptionDialog(this.notificationSettingsRef1),!1}openSubscriptionDialog(e){return this.dialog.open(e,{autoFocus:!0,width:"500px",disableClose:!1}),!1}opendisableAlertDialog(e){return this.dialog.open(e,{autoFocus:!0,width:"500px",disableClose:!1}),!1}openNotificationSettingsDialog(e){return this.errorMessage="",this.dialog.open(e,{autoFocus:!0,disableClose:!0}),!1}getNotifyValue(e,n){switch(n){case"email":return e.isEmailAvailable?e.isEmailSubscribed?"":this.subscribeMsg:this.availableMsg;case"message":return e.isSmsAvailable?e.isSmsSubscribed?"":this.subscribeMsg:this.availableMsg;case"keyboard_voice":return e.isVoiceAvailable?e.isVoiceSubscribed?"":this.subscribeMsg:this.availableMsg;case"notifications":return e.isPushAvailable?e.isPushSubscribed?"":this.subscribeMsg:this.availableMsg;default:return""}}isInvalidStartTime(e,n){let a=this.notificationSettingsForm.controls[e].value,p=this.notificationSettingsForm.controls[n].value;if(!a||!p)return this.hasDateError=!1,!1;let x=z=>{let[q,Z]=z.split(":").map(Number);return q*60+Z},u=x(a),U=x(p);return u>=U?(this.hasDateError=!0,!0):(this.hasDateError=!1,!1)}removeDestination(e){let n=new Qt;n.accountNumber=this.accountNumber,n.memberNumber=this.memberNumber,this.isDeleteCompleted.set(!1);let a=[];try{e.destinations.forEach(p=>{a.push({destinationId:p.id,destinationAddress:p.address,destinationStatusId:p.statusId,transportTypeId:p.transportTypeId,notificationTypes:this.buildDisableNotificationTypes(p)})}),n.destinations=a,n.memberNumber=this.memberNumber,this.dialog.closeAll(),this.notificationService.updateSubscriptions(n).subscribe(p=>{this.alertService.success(p.message),this.isDeleteCompleted.set(!0),this.isInitCompleted.set(!1),this.getData()},p=>{this.alertService.error(p),this.isDeleteCompleted.set(!0),this.logger.error("Error from updateSubscriptions: "+p)})}catch(p){this.alertService.error(p),this.isDeleteCompleted.set(!0),window.scrollTo(0,0)}}buildDisableNotificationTypes(e){let n=[];return n.push({notifyTypeId:e.notifyTypeId,isEnabled:!1,startTime:e.startTime,endTime:e.endTime,excessiveUsage:0,lowBalanceThreshold:0,dueDateLeadDays:0}),n}buildNotificationTypes(e){let n=[];return n.push({notifyTypeId:e.notifyTypeId,isEnabled:this.notificationSettingsForm.controls.email.value?.indexOf(e.id)>-1||this.notificationSettingsForm.controls.text.value?.indexOf(e.id)>-1||this.notificationSettingsForm.controls.voice.value?.indexOf(e.id)>-1||this.notificationSettingsForm.controls.push.value?.indexOf(e.id)>-1,startTime:this.notificationSettingsForm.controls.startTime.value,endTime:this.notificationSettingsForm.controls.endTime.value,excessiveUsage:e.notifyTypeName==="Excessive Usage - (kWh)"?parseInt(this.excessiveUsage,10):0,lowBalanceThreshold:e.notifyTypeName==="Low Balance"?parseInt(this.lowBalanceThreshold,10):0,dueDateLeadDays:this.populateDueDateLeadDays(e.notifyTypeName)}),n}isNumber(e,n){this.notificationSettingsForm.controls[n].patchValue(e.replace(/[^0-9]/g,"").replace(/(\..*)\./g,"$1"))}isAlertsSubscribed(e){return e.isEmailSubscribed||e.isSmsSubscribed||e.isVoiceSubscribed||e.isPushSubscribed}formatTimeDisplay(e){return e.replace(/([ap]m)$/i,n=>" "+n.toUpperCase())}};o.\u0275fac=function(n){return new(n||o)(_(X),_(K),_(mt),_(j),_(W),_(Wt),_(tt),_(J),_(pt),_(G),_(dt),_(L),_(it))}
1,o.\u0275cmp=Q({type:o,selectors:[["app-notifications"]],viewQuery:function(n,a){if(n&1&&(E(Hi,5),E(Bi,7,Ut),E(Gi,7,Ut),E(ji,7,Ut),E(Ui,5),E(zi,5),E(qi,5),E($i,5)),n&2){let p;N(p=I())&&(a.warningDialogRef=p.first),N(p=I())&&(a.notificationSettingsRef=p.first),N(p=I())&&(a.notificationSettingsRef1=p.first),N(p=I())&&(a.disableAlertRef1=p.first),N(p=I())&&(a.select=p.first),N(p=I())&&(a.textSelect=p.first),N(p=I())&&(a.voiceSelect=p.first),N(p=I())&&(a.pushSelect=p.first)}},inputs:{notificationSettingsForm:"notificationSettingsForm"},decls:24,vars:2,consts:[["NotificationContent",""],["settingsDialog",""],["warningDialog",""],["settingsDialog1",""],["disableAlertDialog",""],["accordion","matAccordion"],["panel",""],["menu","matMenu"],["emailSelect",""],["textSelect",""],["voiceSelect",""],["pushSelect",""],[1,"services-area","ptb-100","bg-gray"],[1,"container","mobile-padding"],[1,"notificationlist","row","mt-1","pt-1"],[1,"col-12","px-0"],[1,"col-12","pt-1","mt-1","pb-0","mb-0"],[1,"filter-header"],[1,"action-buttons"],["href","javascript: void(0)","routerLink","/notifications-history",1,"btn","btn-success","btn-sm"],[1,"icofont-history"],[1,"col-12"],[4,"ngIf","ngIfElse"],[3,"columnCount","rowCount","showPaginator"],[3,"formGroup"],[3,"multi",4,"ngIf"],["class","alert alert-danger w-100",4,"ngIf"],[3,"multi"],["class","expansion-panel",3,"expanded",4,"ngFor","ngForOf"],[1,"expansion-panel",3,"expanded"],[1,"expansion-row"],[1,"group_name"],[1,"fw-semibold"],[4,"ngIf"],["matExpansionPanelContent",""],["mat-table","","matSort","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","","class","m-card-title",4,"matCellDef"],["matColumnDef","description"],["mat-cell","",4,"matCellDef"],["matColumnDef","email"],["mat-header-cell","",3,"hidden",4,"matHeaderCellDef"],["mat-cell","",3,"hidden",4,"matCellDef"],["matColumnDef","sms"],["matColumnDef","voice"],["matColumnDef","push"],["matColumnDef","star"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell","",1,"m-card-title"],["mat-cell",""],["mat-header-cell","",3,"hidden"],["mat-cell","",3,"hidden"],["data-label","email",1,"has_label_on_mobile","mobile_view_hidden","text-danger"],["class","has_label_on_mobile btn-link cursor-text","data-label","email",3,"click",4,"ngIf"],["class","mobile_view text-danger",4,"ngIf"],["data-label","email",1,"has_label_on_mobile","btn-link","cursor-text",3,"click"],[1,"mobile_view","text-danger"],["data-label","message",1,"has_label_on_mobile","mobile_view_hidden","text-danger"],["class","has_label_on_mobile btn-link cursor-text","data-label","message",3,"click",4,"ngIf"],["data-label","message",1,"has_label_on_mobile","btn-link","cursor-text",3,"click"],["data-label","keyboard_voice",1,"has_label_on_mobile","mobile_view_hidden","text-danger"],["class","has_label_on_mobile btn-link cursor-text","data-label","keyboard_voice",3,"click",4,"ngIf"],["data-label","keyboard_voice",1,"has_label_on_mobile","btn-link","cursor-text",3,"click"],["data-label","notifications",1,"has_label_on_mobile","mobile_view_hidden","text-danger"],["class","has_label_on_mobile btn-link cursor-text","data-label","notifications",3,"click",4,"ngIf"],["data-label","notifications",1,"has_label_on_mobile","btn-link","cursor-text",3,"click"],["mat-icon-button","","aria-label","action menu",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click",4,"ngIf"],["mat-menu-item","",3,"click"],[1,"text-danger"],["mat-header-row",""],["mat-row",""],[1,"alert","alert-danger","w-100"],["autocomplete","off","novalidate","",3,"ngSubmit","formGroup"],[1,"modal-header","justify-content-center","bg-info","p-3"],[1,"modal-title","modal
1-text-color"],["class","alert alert-danger",4,"ngIf"],[1,"modal-body","text-center"],[1,"flex-row","flex-column-sm","flex-column-xs","flex-wrap","gap-0-8"],["appearance","fill","class","flex-33",4,"ngIf"],["appearance","fill",1,"time-select-field"],["class","text-danger",4,"ngIf"],["formControlName","startTime","panelClass","time-select-panel"],[3,"value",4,"ngFor","ngForOf"],["formControlName","endTime","panelClass","time-select-panel"],[1,"d-flex","flex-wrap","gap-2","justify-content-start"],["class","dropdown-email-aling","appearance","fill",4,"ngIf"],["class","dropdown-aling","appearance","fill",4,"ngIf"],[1,"modal-footer","p-3"],["mat-mdc-button","","mat-dialog-close","",1,"btn","text-transform"],["mat-mdc-button","","type","submit",1,"btn","btn-primary",3,"disabled"],[1,"alert","alert-danger"],["appearance","fill",1,"flex-33"],["matInput","","type","text","formControlName","billDueDateLeadDays","maxlength","2",3,"input","value"],["matInput","","type","text","formControlName","arrDueDateLeadDays","maxlength","2",3,"input","value"],["matInput","","type","text","formControlName","lowBalanceThreshold","maxlength","12",3,"input","value"],["matInput","","type","text","formControlName","excessiveUsage","maxlength","12",3,"input","value"],[3,"value"],["appearance","fill",1,"dropdown-email-aling"],["multiple","","formControlName","email"],[1,"select-all"],[3,"ngModelChange","change","ngModel","ngModelOptions"],[3,"value","click",4,"ngFor","ngForOf"],[3,"click","value"],["appearance","fill",1,"dropdown-aling"],["multiple","","formControlName","text"],["multiple","","formControlName","voice"],["multiple","","formControlName","push"],[1,"modal-title"],[1,"fw-bold","text-dark"],["mat-mdc-button","","mat-dialog-close","",1,"btn","btn-outline"],[1,"modal-title","modal
1-text-color","text-transform"],[1,"modal-body","word-break"],[4,"ngFor","ngForOf"],[1,"modal-footer","p-3","border-top"],[3,"ngSubmit"],["mat-mdc-button","","mat-dialog-close","",1,"btn"],["mat-mdc-button","","type","submit",1,"btn","btn-primary"]],template:function(n,a){if(n&1&&(s(0,"section",12)(1,"div",13)(2,"div",14)(3,"div",15)(4,"div",16)(5,"div",17),m(6," Manage Notifications "),r(),s(7,"div",18)(8,"a",19),b(9,"i",20),m(10," Notification History"),r()()(),b(11,"app-alert"),s(12,"div",21),f(13,Qi,2,3,"div",22)(14,Mn,3,3,"ng-template",null,0,T),r(),f(16,Wn,34,16,"ng-template",null,1,T)(18,Yn,9,1,"ng-template",null,2,T)(20,eo,9,2,"ng-template",null,3,T)(22,io,9,0,"ng-template",null,4,T),r()()()()),n&2){let p=w(15);l(13),c("ngIf",a.isLoading())("ngIfElse",p)}},dependencies:[nt,Y,yt,ft,ut,vt,gt,_t,bt,ht,xt,Ct,St,ne,di,li,ci,pi,mi,si,ie,te,Zt,Jt,ee,H,ae,Xt,ri,_i,fi,ui,Dt,st,ot,at,rt,qt,Pe,ke,lt,ct,$t,Ne,Tt],styles:[`@charset "UTF-8";div.filter-header{font-size:25px;font-weight:500;margin-bottom:30px;padding-bottom:30px;color:#000}.flex-33{flex:0 0 33%}.time-select-field{flex:1 1 140px;min-width:140px}.time-select-panel .mat-mdc-option{white-space:nowrap!important;word-break:normal!important}.time-select-panel{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.time-select-panel::-webkit-scrollbar{width:4px}.time-select-panel::-webkit-scrollbar-track{background:transparent}.time-select-panel::-webkit-scrollbar-thumb{background-color:#0003;border-radius:4px}.container>.notificationlist i{font-size:18px;display:inline-block;line-height:1;margin-right:10px}.text-transform{text-transform:none!important}.invalidDate{border-color:#dc3545;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.mat-mdc-option{word-break:break-all;white-space:normal;height:unset}.mobile_view{visibility:hidden;clear:both;float:left;margin:10px auto 5px 20px;width:28%;display:none}.select-all{margin:5px}.text-start{text-align:left!important}.error-text{color:red}.modal-text-color{color:#fff!important}.word-break{word-wrap:break-word}.cursor-text{cursor:pointer}ngx-material-timepicker-container{z-index:1030;position:fixed}.mat-expansion-panel-header-description{display:flex;justify-content:flex-end}.mat-mdc-table{overflow:auto;width:100%}.dropdown-aling{max-width:250px}.notificationlist th.mat-mdc-header-cell{font-weight:600!important;font-size:1em;text-align:left!important;background-color:#d3d3d3;padding-left:10px!important;max-width:300px}.notificationlist td.mat-mdc-cell:first-child{padding:0 8px}.notificationlist td.mat-mdc-cell:not(:first-child){padding:8px 8px 8px 10px}.notificationlist tr.mat-mdc-row:nth-child(odd){background-color:#f5f5f5}.notificationlist tr.mat-mdc-row:not(:nth-child(odd)){background-color:#fff}.notificationlist tr.mat-mdc-row:hover{background-color:#e9f3ff}.notificationlist .mat-card-actions>.mat-raised-button{height:47px}div.action-buttons .btn{text-transform:none!important;font-size:1.2em;padding:12px!important;margin:-35px 0 20px}div.modal-body h5{text-transform:none}.dropdown-email-aling{min-width:300px!important}.mat-mdc-dialog-container{padding-top:30px;margin-top:100px;padding-right:30px;overflow:auto}.close-button{float:right;top:4px;right:4px}.modal-body{margin-top:6px;padding:5px}
1.group_name{min-width:200px}@media (max-width: 768px){div.filter-header{font-size:20px;margin-bottom:10px;padding-bottom:10px}dropdown-email-aling{min-width:auto!important}.text-mobile{text-align:center!important}.dropdown-aling{width:auto!important}.mobile_view_hidden{visibility:hidden;clear:both;float:left;margin:10px auto 5px 20px;width:28%;display:none}.mobile_view{visibility:visible;clear:none;display:contents}.container>.notificationlist i{font-size:14px;display:inline-block;line-height:1;margin-right:5px}.container>.notificationlist .mat-elevation-z8{background:transparent;box-shadow:none}.container>.notificationlist .mat-form-field,.container>.notificationlist .mat-raised-button{width:100%}.container>.notificationlist .mat-mdc-header-row{display:none}.container>.notificationlist tbody{display:block;width:100%}.container>.notificationlist .mat-mdc-table{background:transparent}.container>.notificationlist .mat-mdc-table *{box-sizing:border-box}.container>.notificationlist .mat-mdc-table .mat-mdc-row{display:block;overflow:hidden;height:auto;position:relative;clear:both;box-shadow:0 2px 1px -1px #0003,0 1px 1px #00000024,0 1px 3px #0000001f;background-color:#f5f5f5;border-radius:3px;margin:15px 0}.container>.notificationlist .mat-mdc-table .mat-mdc-cell{display:block;width:100%;padding:0 16px;margin:10px 0 -5px;border:0 none}.container>.notificationlist .mat-mdc-table .mat-mdc-cell:first-child{padding:0 48px 0 16px}.container>.notificationlist .mat-mdc-table .mat-mdc-cell:first-child a{font-size:20px;color:inherit}.container>.notificationlist .mat-mdc-table .mat-mdc-cell:first-child:before{display:none}.container>.notificationlist .mat-mdc-table .mat-mdc-cell.m-card-title{font-weight:600;font-size:large}.container>.notificationlist .mat-mdc-table .mat-mdc-cell.m-card-sub-title{margin-top:-8px;padding:0 48px 0 16px;color:#0000008a}.container>.notificationlist .mat-mdc-table .has_label_on_mobile:before{font-family:Material Icons;content:attr(data-label) "\\a0";display:inline;font-weight:600;color:#3e75ff}.container>.notificationlist .mat-mdc-table .mat-column-star{width:auto;padding:8px 0 0!important;margin:0;position:absolute;top:0;right:0}.container>.notificationlist .mat-mdc-table .mat-column-star:before{display:none}.mat-mdc-dialog-container{padding:0!important;height:auto!important;overflow:auto}.mat-mdc-dialog-container .mdc-dialog__title{text-align:center}.mat-mdc-dialog-container .modal-body{margin:0 -20px!important}.close-button{float:right;top:10px;right:10px}div.action-buttons .btn{margin-top:-10px}.modal-body{margin:10px!important;padding:10px!important}.modal-body mat-form-field{margin:0 10px;padding:0 10px}.modal-header{margin:6px 6px 0}.mobile-padding{padding-left:30px;padding-right:30px}}.flex-row{display:flex;flex-direction:row}.flex-column-sm,.flex-column-xs{display:flex;flex-direction:column}.flex-wrap{flex-wrap:wrap}.gap-0-8{gap:.8%}.justify-content-flex-start{justify-content:flex-start} 2`],encapsulation:2});let t=o;return t})();var no=(t,o)=>({"alert-success":t,"alert-danger":o}),Gt=()=>({type:"form-row"}),Ni=(t,o)=>[t,o],le=t=>({"is-invalid":t}),oo=t=>[t];function ao(t,o){if(t&1){let i=C();s(0,"div",15)(1,"span",16),m(2),r(),s(3,"button",17),v("click",function(){g(i);let n=d();return h(n.close())}),r()()}if(t&2){let i=d();c("ngClass",zt(2,no,i.message.type==="success",i.message.type==="error")),l(2),M(i.message.text)}}function ro(t,o){t&1&&m(0,"Setup ")}function so(t,o){t&1&&(s(0,"div"),f(1,ro,1,0,"ng-template",20),b(2,"app-skeleton-form-section",21),r()),t&2&&(l(2),c("layout","dialog")("rows",zt(9,Ni,P(7,Gt),P(8,Gt)))("showHeader",!0)("showDivider",!1)("showActions",!0)("actionButtonCount",1)("actionButtonAlignment","right"))}function lo(t,o){t&1&&m(0,"Setup ")}function co(t,o){if(t&1&&(s(0,"div",38),b(1,"i",39),s(2,"label",40),m(3),r()()),t&2){let i=d(3);l(3),M(i.voiceVerifyMsg)}}function mo(t,o){if(t&1&&(y(0),s(1,"option",41),m(2),r(),D()),t&2){let i=o.$implicit;l(),c("value",i.notifyTypeName),l(),S(" ",i.notifyTypeDescription," ")}}function po(t,o){if(t&1&&b(0,"input",42),t&2){let i=d(3);de("maxlength",i.maxValue),c("ngClass",et(2,le,i.g.contactDestination.errors&&(i.g.contactDestination.dirty||i.g.contactDestination.touched))
2)}}function fo(t,o){if(t&1&&b(0,"input",43),t&2){let i=d(3);de("maxlength",i.maxValue),c("ngClass",et(2,le,i.g.contactDestination.errors&&(i.g.contactDestination.dirty||i.g.contactDestination.touched)))}}function _o(t,o){if(t&1&&(y(0),s(1,"option",41),m(2),r(),D()),t&2){let i=o.$implicit;l(),c("value",i.hardwareId),l(),S(" ",i.profileName," ")}}function uo(t,o){if(t&1&&(y(0),s(1,"option",28),m(2,"Select A Device"),r(),f(3,_o,3,2,"ng-container",29),D()),t&2){let i=d(4);l(3),c("ngForOf",i.accountDevices)}}function go(t,o){t&1&&(s(0,"option",28),m(1,"No Active Devices Found"),r())}function ho(t,o){if(t&1&&(s(0,"select",44),f(1,uo,4,1,"ng-container",14)(2,go,2,0,"ng-template",null,4,T),r()),t&2){let i=w(3),e=d(3);c("ngClass",et(3,le,e.g.contactDestination.errors&&(e.g.contactDestination.dirty||e.g.contactDestination.touched))),l(),c("ngIf",e.accountDevices&&(e.accountDevices==null?null:e.accountDevices.length)>0)("ngIfElse",i)}}function xo(t,o){t&1&&(s(0,"div"),m(1," Please enter a value. "),r())}function vo(t,o){t&1&&m(0,"Select a device.")}function bo(t,o){if(t&1&&(s(0,"div"),f(1,xo,2,0,"div",14)(2,vo,1,0,"ng-template",null,6,T),r()),t&2){let i=w(3),e=d(4);l(),c("ngIf",e.g.transportType.value!=="Push")("ngIfElse",i)}}function Co(t,o){t&1&&(s(0,"div"),m(1," Please enter a valid Email Address. "),r())}function So(t,o){t&1&&(s(0,"div"),m(1," Contact already exists. "),r())}function yo(t,o){if(t&1&&(s(0,"div"),f(1,Co,2,0,"div",46)(2,So,2,0,"div",46),r()),t&2){let i=d(4);l(),c("ngIf",i.g.contactDestination.errors.pattern),l(),c("ngIf",i.g.contactDestination.errors.exists)}}function Do(t,o){t&1&&(s(0,"div"),m(1,"Invalid phone format."),r())}function To(t,o){if(t&1&&(s(0,"div"),m(1),r()),t&2){let i=d(5);l(),S(" ",i.g.transportType.value==="Push"?"Device already exists.":"Contact already exists."," ")}}function wo(t,o){if(t&1&&f(0,Do,2,0,"div",46)(1,To,2,1,"div",46),t&2){let i=d(4);c("ngIf",i.g.contactDestination.errors.pattern),l(),c("ngIf",i.g.contactDestination.errors.exists)}}function Eo(t,o){if(t&1&&(s(0,"div",45),f(1,bo,4,2,"div",46)(2,yo,3,2,"div",14)(3,wo,2,2,"ng-template",null,5,T),r()),t&2){let i=w(4),e=d(3);l(),c("ngIf",e.g.contactDestination.errors.required),l(),c("ngIf",e.g.transportType.value==="Email")("ngIfElse",i)}}function No(t,o){if(t&1&&(s(0,"div",47),b(1,"span",48),r()),t&2){let i=d(3);l(),c("innerHTML",i.smsDisclosureText,pe)}}function Io(t,o){if(t&1){let i=C();s(0,"form",22),v("ngSubmit",function(){g(i);let n=d(2);return h(n.submitSetupForm())}),f(1,lo,1,0,"ng-template",20),s(2,"div",23),f(3,co,4,1,"div",24),s(4,"div",25)(5,"label",26),m(6,"Choose a contact method"),r(),s(7,"select",27),v("change",function(n){g(i);let a=d(2);return h(a.onTransportTypeChange(n.target.value))}),s(8,"option",28),m(9,"Select A Message Type"),r(),f(10,mo,3,2,"ng-container",29),r()(),s(11,"div",25)(12,"label",30),m(13),r(),f(14,po,1,4,"input",31)(15,fo,1,4,"input",32)(16,ho,4,5,"select",33)(17,Eo,5,3,"div",34),r()(),f(18,No,2,1,"div",35),s(19,"div",36)(20,"button",37),m(21,"Continue"),r()()()}if(t&2){let i=d(2);c("formGroup",i.setupForm),l(3),c("ngIf",i.showVoiceVerifyMsg&&i.voiceVerifyMsg),l(7),c("ngForOf",i.transportTypes),l(3),M(i.contactDestinationLabel),l(),c("ngIf",i.g.transportType.value==="Email"||!i.g.transportType.value),l(),c("ngIf",i.g.transportType.value!="Email"&&(i.g.transportType.value==="SMS"||i.g.transportType.value==="Voice")),l(),c("ngIf",i.g.transportType.value==="Push"),l(),c("ngIf",i.g.contactDestination.errors&&(i.g.contactDestination.dirty||i.g.contactDestination.touched)),l(),c("ngIf",i.showSmsDisclosure&&i.smsDisclosureText),l(2),c("disabled",i.disableRegister())}}function Mo(t,o){t&1&&m(0,"Verify ")}function Fo(t,o){t&1&&(s(0,"div"),f(1,Mo,1,0,"ng-template",20),s(2,"div",49),b(3,"app-skeleton-form-section",21),r()()),t&2&&(l(3),c("layout","dialog")("rows",zt(9,Ni,P(7,Gt),P(8,Gt)))("showHeader",!1)("showDivider",!1)("showActions",!0)("actionButtonCount",1)("actionButtonAlignment","right"))}function Vo(t,o){t&1&&m(0,"Verify ")}function ko(t,o){if(t&1){let i=C();s(0,"div",49)(1,"div",23),b(2,"div",51),r(),s(3,"div",36)(4,"button",52),v("click",function(){g(i);let n=d(3);return h(n.navigateToManageNotifications())}),m(5,"Complete"),r()()()}if(t&2){let i=d(3);l(2),c("innerHtml",i.voiceMessageHtml,pe)}}function Po(t,o){t&1&&(s(0,"span",45),m(1," Please enter a valid input. "),r())}function Ao(t,o){if(t&1&&(s(0,"div",49)(1,"div",53)(2,"label",54),m(3),r()(),s(4,"div",53)(5,"label",55),m(6,"Enter Verification Code"),r(),s(7,"div",56),b(8,"input",57),r(),f(9,Po,2,0,"span",34),r(),s(10,"div",36)(11,"button",58),m(12,"Register"),r()()()),t&2){let i=d(3);l(3),S("Please enter the verification code sent to ",i.emailOrPhone,""),l(5),c("ngClass",et(4,le,i.v.verificationCode.errors&&(i.v.verificationCode.dirty||i.v.verificationCode.touched))
2),l(),c("ngIf",i.v.verificationCode.errors&&(i.v.verificationCode.dirty||i.v.verificationCode.touched)),l(2),c("disabled",i.disableSubmit())}}function Ro(t,o){if(t&1){let i=C();s(0,"form",22),v("ngSubmit",function(){g(i);let n=d(2);return h(n.submitVerifyForm())}),f(1,Vo,1,0,"ng-template",20)(2,ko,6,1,"div",50)(3,Ao,13,6,"div",50),r()}if(t&2){let i=d(2);c("formGroup",i.verifyForm),l(2),c("ngIf",i.g.transportType.value==="Voice"),l(),c("ngIf",i.emailOrPhone&&i.g.transportType.value!=="Voice")}}function Oo(t,o){if(t&1&&(s(0,"div")(1,"mat-horizontal-stepper",18,1)(3,"mat-step",19),f(4,so,3,12,"div",14)(5,Io,22,10,"ng-template",null,2,T),r(),s(7,"mat-step",19),f(8,Fo,4,12,"div",14)(9,Ro,4,3,"ng-template",null,3,T),r()()()),t&2){let i=w(6),e=w(10),n=d();l(3),c("stepControl",n.setupForm)("editable",!1),l(),c("ngIf",n.isFormLoading())("ngIfElse",i),l(3),c("stepControl",n.verifyForm)("editable",!1),l(),c("ngIf",n.isVerifyLoading())("ngIfElse",e)}}function Lo(t,o){t&1&&(s(0,"div"),b(1,"app-skeleton-form-section",21),r()),t&2&&(l(),c("layout","dialog")("rows",et(8,oo,P(7,Gt)))("showHeader",!1)("showDivider",!1)("showActions",!0)("actionButtonCount",2)("actionButtonAlignment","right"))}function Ho(t,o){if(t&1){let i=C();s(0,"form",22),v("ngSubmit",function(){g(i);let n=d(2);return h(n.removeDestination())}),s(1,"div",59)(2,"p",60),m(3),r()(),s(4,"div",61)(5,"button",62),m(6,"No"),r(),s(7,"button",63),m(8,"Yes"),r()()()}if(t&2){let i=d(2);c("formGroup",i.removeForm),l(3),M(i.modalText),l(2),c("disabled",i.isRemoveLoading()),l(2),c("disabled",i.isRemoveLoading())}}function Bo(t,o){if(t&1&&f(0,Lo,2,10,"div",14)(1,Ho,9,4,"ng-template",null,7,T),t&2){let i=w(2),e=d();c("ngIf",e.isRemoveLoading())("ngIfElse",i)}}var Ii=(()=>{let o=class o{constructor(e,n,a,p,x,u,U,z,q){this.dialogRef=e,this.formatPhonePipe=n,this.formBuilder=a,this.notificationService=p,this.changeDetector=x,this.sanitizer=u,this.alertService=U,this.logger=z,this.router=q,this.headingText="Add Contact",this.modalText="The selected contact has subscribed alerts. Do you want to disable them?",this.numberRegex=/^\d{5}$/,this.phoneRegex=/^(\()[1-9]\d{2}(\))(\s)[1-9]{1}\d{2}(-)\d{4}$/,this.emailRegex=/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$/,this.message=null,this.maxValue=60,this.registerDestinationResponse=null,this.isSetup=!0,this.isFormLoading=k(!1),this.isVerifyLoading=k(!1),this.isRemoveLoading=k(!1)}get g(){return this.setupForm.controls}get v(){return this.verifyForm.controls}get showSmsDisclosure(){let e=this.setupForm?.controls?.transportType?.value;return Lt.siteConfiguration?.displaySmsDisclosure===!0&&(e===V.SMS||e===V.Voice)}get smsDisclosureText(){return Lt.siteConfiguration?.smsDisclosure}get contactDestinationLabel(){let e=this.g.transportType.value;return e==="SMS"||e==="Voice"?"Enter a phone number":e==="Email"?"Enter an email address":"Enter a contact destination"}ngOnInit(){this.transportTypes&&(this.transportTypes=this.transportTypes.filter(e=>e.notifyTypeName!=="Push")),this.setupForm=this.formBuilder.group({transportType:[""],contactDestination:["",O.required]}),this.verifyForm=this.formBuilder.group({verificationCode:["",O.required]}),this.removeForm=this.formBuilder.group({verifiedDestination:[""]}),this.setupForm.controls.transportType.valueChanges.subscribe(e=>{this.setupForm.controls.contactDestination.setValue(""),this.setupForm.controls.contactDestination.clearValidators(),e===V.Email?this.setupForm.controls.contactDestination.setValidators([O.required,O.pattern(this.emailRegex),O.maxLength(128)]):e===V.SMS||e===V.Voice?this.setupForm.controls.contactDestination.setValidators([O.required,O.pattern(this.phoneRegex)]):e===V.Push&&this.setupForm.controls.contactDestination.setValidators([O.required]),this.setupForm.controls.contactDestination.updateValueAndValidity()}),this.setupForm.controls.contactDestination.valueChanges.subscribe(e=>{let n=!1;e&&(this.setupForm.controls.transportType.value===V.SMS||this.setupForm.controls.transportType.value===V.Voice)?n=this.destinations.filter(a=>a.statusId===_e.Verified&&a.transportTypeName===this.setupForm.controls.transportType.value&&a.address===this.formatPhonePipe.untransform(e)).length>0:n=this.destinations.filter(a=>a.statusId===_e.Verified&&a.transportTypeName===this.setupForm.controls.transportType.value&&a.address===e).length>0,n&&this.setupForm.controls.contactDestination.setErrors({exists:!0})}),this.showSetupForm||(this.headingText="Disable Alerts"),this.showDeleteMsg&&(this.modalText="The selected contact has subscribed alerts. Do you want to delete them?")}submitSetupForm(){this.isFormLoading.set(!0);let e=new Ue;e.accountNumber=this.accountNumber,e.memberNumber=this.memberNumber,e.transportType=this.setupForm.controls.transportType.value,this.emailOrPhone=this.setupForm.controls.contactDestination.value,this.transportType=this.setupForm.controls.transportType.value,this.isSetup=!1,this.setupForm.controls.transportType.value===V.SMS||this.setupForm.controls.transportType.value===V.Voice?e.emailOrPhone=this.formatPhonePipe.untransform(this.emailOrPhone):e.emailOrPhone=this.emailOrPhone,this.notificationService.registerSubscription(e).subscribe(n=>{this.registerDestinationResponse=n,this.voiceMessageHtml=this.sanitizer.bypassSecurityTrustHtml(this.registerDestinationResponse?.verifyCode),this.isFormLoading.set(!1)},n=>{this.registerDestinationResponse=null,this.showMessage("error",n),this.isSetup=!0,this.isFormLoading.set(!1)})}submitVerifyForm(){this.isVerifyLoading.set(!0);let e=new ze;e.accountNumber=this.accountNumber,e.memberNumber=this.memberNumber,this.transportType===V.SMS||this.transportType===V.Voice?this.address=this.formatPhonePipe.untransform(this.emailOrPhone):this.address=this.emailOrPhone,this.registerDestinationResponse&&this.registerDestinationResponse.isCreated&&(e.destinationId=this.registerDestinationResponse.id),e.verificationCode=this.verifyForm.controls.verificationCode.value,this.notificationService.verifySub
2scription(e).subscribe(n=>{this.isVerifyLoading.set(!1),this.dialogRef.close({event:"Close"})},n=>{this.isVerifyLoading.set(!1),this.showMessage("error",n),this.changeDetector.detectChanges()})}removeDestination(){this.isRemoveLoading.set(!0),this.notificationService.deleteSubscription(this.accountNumber,this.memberNumber,this.destinatonIds).subscribe(e=>{this.isRemoveLoading.set(!1),this.dialogRef.close({event:"Close"})},e=>{this.isRemoveLoading.set(!1),this.showMessage("error",e)})}onTransportTypeChange(e){this.showVoiceVerifyMsg=!1,this.setupForm.controls.transportType.value===V.Email?this.maxValue=60:(this.setupForm.controls.transportType.value===V.Voice&&(this.showVoiceVerifyMsg=!0,this.changeDetector.detectChanges()),this.maxValue=14)}disableRegister(){return this.isFormLoading()?!0:!(this.setupForm.controls.transportType.value.length>0&&this.setupForm.controls.contactDestination.value.length>0&&this.setupForm.valid)}disableSubmit(){return this.isVerifyLoading()?!0:!(this.verifyForm.controls.verificationCode.value.length>0&&this.registerDestinationResponse&&this.registerDestinationResponse.isCreated)}showMessage(e,n){this.message={},this.message.type=e,this.message.text=n}close(){this.message=null}numberOnly(e){let n=e.which?e.which:e.keyCode;return n>47&&n<58}navigateToManageNotifications(){event.preventDefault(),this.router.navigate(["manage-contacts"]),this.dialogRef.close()}};o.\u0275fac=function(n){return new(n||o)(_(We),_(Tt),_(X),_(K),_(W),_(Fe),_(J),_(G),_(L))},o.\u0275cmp=Q({type:o,selectors:[["app-setup-notifications"]],inputs:{destinations:"destinations",transportTypes:"transportTypes",accountDevices:"accountDevices",accountNumber:"accountNumber",memberNumber:"memberNumber",destinatonIds:"destinatonIds",showSetupForm:"showSetupForm",showDeleteMsg:"showDeleteMsg",voiceVerifyMsg:"voiceVerifyMsg"},decls:11,vars:4,consts:[["removeNotification",""],["stepper",""],["formContent",""],["verifyFormContent",""],["showNoDevices",""],["SmsEdit",""],["showPushRequiredMessage",""],["removeFormContent",""],[1,"container"],[1,"d-flex","justify-content-between","align-items-center"],["mat-dialog-title","",1,"m-0","flex-grow-1"],["type","button","mat-dialog-close","",1,"btn","btn-link","p-0","ms-2","text-dark"],[1,"fas","fa-times","fa-lg"],["class","alert alert-dismissible fade show p-2 mt-2 d-flex align-items-center","role","alert",3,"ngClass",4,"ngIf"],[4,"ngIf","ngIfElse"],["role","alert",1,"alert","alert-dismissible","fade","show","p-2","mt-2","d-flex","align-items-center",3,"ngClass"],[1,"flex-grow-1","me-2","pt-1"],["type","button","aria-label","Close",1,"btn-close","btn-close-sm","flex-shrink-0",3,"click"],["linear",""],[3,"stepControl","editable"],["matStepLabel","",1,"text-capitalize","m-0","ms-1","my-2","text-3","non-mobile-mode"],[3,"layout","rows","showHeader","showDivider","showActions","actionButtonCount","actionButtonAlignment"],[3,"ngSubmit","formGroup"],[1,"row"],["class","d-flex flex-row align-items-center alert alert-warning",4,"ngIf"],[1,"mb-3","col-12"],["for","transportType",1,"form-label"],["name","transportType","id","transportType","formControlName","transportType",1,"form-select",3,"change"],["value","","selected",""],[4,"ngFor","ngForOf"],["for","contactDestination",1,"form-label"],["type","text","id","contactDestination","formControlName","contactDestination","class","form-control","autocomplete","off",3,"maxlength","ngClass",4,"ngIf"],["type","text","id","contactDestination","formControlName","contactDestination","class","form-control","autocomplete","off","UsPhoneFormat","",3,"maxlength","ngClass",4,"ngIf"],["name","selectContactDestination","id","selectContactDestination","class","form-select","formControlName","contactDestination",3,"ngClass",4,"ngIf"],["class","invalid-feedback d-block",4,"ngIf"],["class","mt-2 mb-2",4,"ngIf"],[1,"d-flex","justify-content-end"],["matStepperNext","",1,"btn","btn-lg","btn-primary","btn-action",3,"disabled"],[1,"d-flex","flex-row","align-items-center","alert","alert-warning"],[1,"fas","fa-info-circle","text-dark","fa-2x"],[1,"form-label","mb-0","ms-2"],[3,"value"],["type","text","id","contactDestination","formControlName","contactDestination","autocomplete","off",1,"form-control",3,"maxlength","ngClass"],["type","text","id","contactDestination","formControlName","contactDestination","autocomplete","off","UsPhoneFormat","",1,"form-control",3,"maxlength","ngClass"],["name","selectContactDestination","id","selectContactDestination","formControlName","contactDestination",1,"form-select",3,"ngClass"],[1,"invalid-feedback","d-block"],[4,"ngIf"],[1,"mt-2","mb-2"],[3,"innerHTML"],[1,"mt-3"],["class","mt-3",4,"ngIf"],[1,"alert","alert-info",3,"innerHtml"],[1,"btn","btn-lg","btn-primary","btn-action",3,"click"],[1,"mb-3"],["for","destinationAddress",1,"form-label"],["for","verificationCode",1,"form-label"],[1,"col-12","col-sm-8","col-md-6","col-lg-4","px-0"],["type","text","id","verificationCode","formControlName","verificationCode","maxlength","20","autocomplete","off",1,"form-control",3,"ngClass"],[1,"btn","btn-lg","btn-primary","btn-action",3,"disabled"],[1,"modal-body","text-center","p-3"],[1,"fw-bold","text-dark"],[1,"modal-footer","p-3","border-top"],["mat-mdc-button","","mat-dialog-close","",1,"btn",3,"disabled"],["mat-mdc-button","",1,"btn","btn-primary",3,"disabled"]],template:function(n,a){if(n&1&&(s(0,"div",8)(1,"div",9)(2,"h4",10),m(3),r(),s(4,"button",11),b(5,"i",12),r()(),f(6,ao,4,5,"div",13),s(7,"mat-dialog-content"),f(8,Oo,11,8,"div",14)(9,Bo,3,2,"ng-template",null,0,T),r()()),n&2){let p=w(10);l(3),M(a.headingText),l(3),c("ngIf",a.message!==null),l(2),c("ngIf",a.showSetupForm)("ngIfElse",p)}},dependencies:[Ee,nt,Y,ai,Jt,Ye,Xe,hi,gi,xi,vi,Ze,st,Re,Oe,ot,Ae,at,rt,qt,lt,ct],styles:[`.cdk-overlay-container{z-index:1030}.form-control{border:1px solid #0088cc;padding:5px}.mdc-dialog .mdc-dialog__content{padding:0!important;font-size:inherit!important}.icon-aling{height:auto;padding-top:15px}.mat-mdc-dialog-container{outline:0;display:block;padding:24px;margin-top:100px;background:#fff}.mat-mdc-dialog-container .mdc-dialog__surface{box-shadow:none!important}.word-break{word-break:break-word}button.btn[disabled]{opacity:.6;cursor:not-allowed}.btn-close-sm{font-size:.65rem}.form-select,.form-select option{font-size:.875rem}@media (max-width: 375px){.btn{width:100%}.form-select{font-size:.8rem}}
2@media (max-width: 768px){.non-mobile-mode,.mat-step-text-label{display:none}.mobile-mode{display:inline-flex}.btn-action{width:100%}}@media (max-width: 568px){.mat-mdc-dialog-container{padding:24px!important;height:100%!important;overflow:auto}.mat-mdc-dialog-container .mdc-dialog__title{text-align:center}.mat-mdc-dialog-container .modal-body{margin:0 -20px!important}}.mat-horizontal-stepper-header{pointer-events:none!important} 3`],encapsulation:2});let t=o;return t})();var Go=["table"],jo=()=>[10,25,50,100];function Uo(t,o){if(t&1&&(s(0,"mat-error"),m(1),r()),t&2){let i=d();l(),M(i.getFromDateErrorMessage())}}function zo(t,o){if(t&1&&(s(0,"mat-error"),m(1),r()),t&2){let i=d();l(),M(i.getToDateErrorMessage())}}function qo(t,o){if(t&1&&(s(0,"mat-option",31),m(1),r()),t&2){let i=o.$implicit;c("value",i.value),l(),S("",i.name," ")}}function $o(t,o){t&1&&(s(0,"div"),b(1,"app-skeleton-grid",32),r()),t&2&&(l(),c("columnCount",4)("rowCount",5)("showPaginator",!0))}function Qo(t,o){t&1&&(s(0,"mat-header-cell",44)(1,"h4",45)(2,"strong"),m(3,"Date Sent"),r()()())}function Wo(t,o){if(t&1&&(s(0,"mat-cell")(1,"span",46),m(2,"Date Sent:"),r(),m(3),r()),t&2){let i=o.$implicit;l(3),S(" ",i.sentDate," ")}}function Yo(t,o){t&1&&(s(0,"mat-header-cell",44)(1,"h4",45)(2,"strong"),m(3,"Type"),r()()())}function Xo(t,o){if(t&1&&(s(0,"mat-cell")(1,"span",46),m(2,"Type:"),r(),m(3),r()),t&2){let i=o.$implicit;l(3),S(" ",i.messageType," ")}}function Jo(t,o){t&1&&(s(0,"mat-header-cell",44)(1,"h4",45)(2,"strong"),m(3,"Message"),r()()())}function Ko(t,o){if(t&1&&(s(0,"mat-cell")(1,"span",46),m(2,"Message:"),r(),m(3),r()),t&2){let i=o.$implicit;l(3),S(" ",i.message," ")}}function Zo(t,o){t&1&&(s(0,"mat-header-cell",44)(1,"h4",45)(2,"strong"),m(3,"Status"),r()()())}function ta(t,o){if(t&1&&(s(0,"mat-cell")(1,"span",46),m(2,"Status:"),r(),m(3),r()),t&2){let i=o.$implicit;l(3),S(" ",i.status," ")}}function ea(t,o){t&1&&b(0,"mat-header-row")}function ia(t,o){t&1&&b(0,"mat-row",47)}function na(t,o){if(t&1&&(s(0,"mat-table",35,4),y(2,36),f(3,Qo,4,0,"mat-header-cell",37)(4,Wo,4,1,"mat-cell",38),D(),y(5,39),f(6,Yo,4,0,"mat-header-cell",37)(7,Xo,4,1,"mat-cell",38),D(),y(8,40),f(9,Jo,4,0,"mat-header-cell",37)(10,Ko,4,1,"mat-cell",38),D(),y(11,41),f(12,Zo,4,0,"mat-header-cell",37)(13,ta,4,1,"mat-cell",38),D(),f(14,ea,1,0,"mat-header-row",42)(15,ia,1,0,"mat-row",43),r()),t&2){let i=d(2);c("dataSource",i.dataSource),l(14),c("matHeaderRowDef",i.displayedColumns),l(),c("matRowDefColumns",i.displayedColumns)}}function oa(t,o){t&1&&(s(0,"div",48),m(1," There is no notification data available. "),r())}function aa(t,o){if(t&1&&(f(0,na,16,3,"mat-table",33),b(1,"mat-paginator",34),f(2,oa,2,0,"ng-template",null,3,T)),t&2){let i=w(3),e=d();c("ngIf",(e.dataSource==null||e.dataSource.data==null?null:e.dataSource.data.length)>0)("ngIfElse",i),l(),c("hidden",!(!(e.dataSource==null||e.dataSource.data==null)&&e.dataSource.data.length))("pageSize",10)("pageSizeOptions",P(5,jo))}}var Mi=(()=>{let o=class o{set content1(e){this.dataSource.sort=e}constructor(e,n,a,p,x,u,U,z,q,Z,Nt,It){this.formBuilder=e,this.notificationService=n,this.dataService=a,this.authService=p,this.datetimeService=x,this.datePipe=u,this.router=U,this.alertService=z,this.changeAccountService=q,this.location=Z,this.route=Nt,this.changeDetector=It,this.displayedColumns=["sentDate","messageType","message","status"],this.defaultDateFormat="yyyy-MM-dd",this.dataSource=new Kt,this.currentDate=new Date,this.minDate=new Date(1990,0,1),this.isInitCompleted=k(!1),this.hasError=Mt=>this.notificationHistoryForm.controls[Mt].hasError,this.memberNumber=this.authService.currentUserValue.memberNumber,this.accountNumber=this.dataService.accountInfoResp.accountNumber,this.timeFrames=[{name:"Last 2 Weeks",value:"lasttwoweeks"},{name:"Last One Month",value:"lastonemonth"},{name:"Last 3 Months",value:"lastthreemonths"},{name:"YTD",value:"ytd"}]}back(){this.route.navigate(["manage-notifications"])}get f(){return this.notificationHistoryForm.controls}ngAfterViewInit(){this.dataSource.paginator=this.paginator}ngOnInit(){this.isInitCompleted.set(!1),this.notificationHistoryForm=this.formBuilder.group({timeframe:"",fromDate:new Ot([O.required]),toDate:new Ot([O.required])}),this.router.queryParamMap.subscribe(e=>{let n=e.get("accountno");n!==null&&(this.accountNumber=parseInt(n,10),this.changeAccountService.handleAccountSelection(parseInt(n,10)),this.location.replaceState(this.location.path().split("?")[0],""))}),this.startDate=this.datePipe.transform(this.datetimeService.addDays(this.datetimeService.CurrentDate,-14),this.defaultDateFormat),this.endDate=this.datePipe.transform(this.datetimeService.CurrentDate,this.defaultDateFormat),this.sortAccessor(),this.getHistory(this.startDate,this.endDate)}sortAccessor(){this.dataSource.sortingDataAccessor=(e,n)=>{switch(n){case"sentDate":return new Date(e.sentDate);default:return e[n]}}}selectTimeFrame(e){if(this.notificationHistoryForm.controls.toDate.reset(),this.notificationHistoryForm.controls.fromDate.reset(),this.notificationHistoryForm.controls.fromDate.setErrors(null),this.notificationHistoryForm.controls.toDate.setErrors(null),this.notificationHistoryForm.setErrors({invalid:!0}),e.value){let n=new Date,a=new Date;switch(e.value){case this.timeFrames[0].value:a.setDate(a.getDate()-14);break;case this.timeFrames[1].value:a.setMonth(a.getMonth()-1);break;case this.timeFrames[2].value:a.setMonth(a.getMonth()-3);break;case this.timeFrames[3].value:a.setFullYear(a.getFullYear(),0,1);break}this.notificationHistoryForm.updateValueAndValidity(),this.startDate=this.datePipe.transform(a,this.defaultDateFormat),this.endDate=this.datePipe.transform(n,this.defaultDateFormat),this.getHistory(this.startDate,this.endDate)}}getHistory(e,n){this.isInitCompleted.set(!1),this.startDate=e,this.endDate=n;let a=new qe;a.accountNumber=this.accountNumber,a.memberNumber=this.memberNumber,a.startDate=this.datePipe.transform(this.startDate,this.defaultDateFormat),a.endDate=this.datePipe.transform(this.endDate,this.defaultDateFormat),this.notificationService.getHistory(a).subscribe(p=>{this.dataSource.data=p,this.changeDetector.detectChanges(),this.isInitCompleted.set(!0),this.notificationHistoryForm.controls.fromDate.setValue(new Date(this.datePipe.transform(a.startDate,"MM/dd
3/yyyy"))),this.notificationHistoryForm.controls.toDate.setValue(new Date(this.datePipe.transform(a.endDate,"MM/dd/yyyy")))},p=>{this.isInitCompleted.set(!0),this.alertService.error(p)})}getFromDateErrorMessage(){if(this.notificationHistoryForm.get("fromDate").hasError("required"))return"Start date is required.";if(this.notificationHistoryForm.get("fromDate").hasError("lessThanMinDate"))return"Choose a later date."}getToDateErrorMessage(){if(this.notificationHistoryForm.get("toDate").hasError("required"))return"End date is required.";if(this.notificationHistoryForm.get("toDate").hasError("lessThanMinDate"))return"Choose a later date.";if(this.notificationHistoryForm.get("toDate").hasError("lessThanFromDate"))return"Invalid date range.";if(this.notificationHistoryForm.get("toDate").hasError("toDateGreaterThanCurrentDate"))return"Invalid date range."}changeDateEvent(e,n){if(e==="fromInput"){if(this.notificationHistoryForm.controls.fromDate.value===null)return this.notificationHistoryForm.controls.fromDate.setErrors({required:!0}),!1;if(n.value<new Date(1990,0,1))return this.notificationHistoryForm.controls.fromDate.setErrors({lessThanMinDate:!0}),!1;if(this.notificationHistoryForm.controls.toDate.value===null)return this.notificationHistoryForm.controls.toDate.setErrors({required:!0}),!1;if(this.notificationHistoryForm.controls.toDate.value!==null&&this.notificationHistoryForm.controls.toDate.value>new Date)return this.notificationHistoryForm.controls.toDate.setErrors({toDateGreaterThanCurrentDate:!0}),!1;if(this.notificationHistoryForm.controls.toDate.value!==null&&n.value>this.notificationHistoryForm.controls.toDate.value)return this.notificationHistoryForm.controls.fromDate.setErrors({greaterThanToDate:!0}),!1}if(e==="endInput"){if(this.notificationHistoryForm.controls.toDate.value===null)return this.notificationHistoryForm.controls.toDate.setErrors({required:!0}),!1;if(n.value<new Date(1990,0,1))return this.notificationHistoryForm.controls.toDate.setErrors({lessThanMinDate:!0}),!1;if(this.notificationHistoryForm.controls.fromDate.value===null)return this.notificationHistoryForm.controls.fromDate.setErrors({required:!0}),!1;if(n.value>new Date)return this.notificationHistoryForm.controls.toDate.setErrors({toDateGreaterThanCurrentDate:!0}),!1;if(this.notificationHistoryForm.controls.fromDate.value!==null&&n.value<this.notificationHistoryForm.controls.fromDate.value.setHours(0,0,0,0))return this.notificationHistoryForm.controls.toDate.setErrors({lessThanFromDate:!0}),!1}return this.notificationHistoryForm.controls.fromDate.setErrors(null),this.notificationHistoryForm.controls.toDate.setErrors(null),!1}};o.\u0275fac=function(n){return new(n||o)(_(X),_(K),_(mt),_(j),_($e),_(Rt),_(tt),_(J),_(pt),_(it),_(L),_(W))},o.\u0275cmp=Q({type:o,selectors:[["app-notifications-history"]],viewQuery:function(n,a){if(n&1&&(E(Go,5,H),E(wt,7)),n&2){let p;N(p=I())&&(a.content1=p.first),N(p=I())&&(a.paginator=p.first)}},features:[Te([Rt])],decls:55,vars:23,consts:[["picker1",""],["picker2",""],["NotificationTableSection",""],["noRecords",""],["table",""],[1,"services-area","ptb-100","bg-gray"],[1,"container"],[1,"contactlist","row","mt-1","pt-1","ms-1","me-1"],[1,"col-md-12","col-lg-12"],[1,"col-md-12","col-lg-12","pt-1","mt-1","pb-0","mb-0"],[1,"flex-row","flex-column-sm","flex-column-xs","flex-wrap"],[1,"flex-center-center","filter-header"],[1,"back"],[1,"icon","me-2","pe-2",3,"click"],["title","Back",1,"fas","fa-arrow-left"],["autocomplete","off","novalidate","",3,"ngSubmit","formGroup"],[1,"col-12","col-sm-12","col-md-4","col-lg-3"],["appearance","fill"],["matInput","","formControlName","fromDate",3,"dateInput","matDatepicker","min","max"],["matSuffix","",3,"for"],["panelClass","datepickerOne"],[4,"ngIf"],["matInput","","formControlName","toDate",3,"dateInput","matDatepicker","min","max"],[1,"col-12","col-sm-12","col-md-4","col-lg-6"],[1,"btn","btn-lg","btn-primary",3,"disabled"],[1,"flex-row","flex-column-sm","flex-column-xs","flex-wrap","mt-3"],[1,"w-auto"],["formControlName","timeframe",3,"selectionChange"],[3,"value",4,"ngFor","ngForOf"],[1,"col-12","col-sm-12","col-md-12","col-lg-12"],[4,"ngIf","ngIfElse"],[3,"value"],[3,"columnCount","rowCount","showPaginator"],["matSort","","multiTemplateDataRows","","class","mat-elevation-z8",3,"dataSource",4,"ngIf","ngIfElse"],["showFirstLastButtons","",3,"hidden","pageSize","pageSizeOptions"],["matSort","","multiTemplateDataRows","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","sentDate"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","messageType"],["matColumnDef","message"],["matColumnDef","status"],[4,"matHeaderRowDef"],["class","element-row",4,"matRowDef","matRowDefColumns"],["mat-sort-header",""],[1,"m-0"],[1,"mobile-label"],[1,"element-row"],[1,"alert","alert-danger","w-100"]],template:function(n,a){if(n&1){let p=C();s(0,"section",5)(1,"div",6)(2,"div",7)(3,"div",8),b(4,"app-alert"),s(5,"div",9)(6,"div",10)(7,"div",11),m(8," Notification History "),s(9,"div",12)(10,"div",13),v("click",function(){return g(p),h(a.back())}),b(11,"i",14),r()()()()(),s(12,"form",15),v("ngSubmit",function(){return g(p),a.getHistory(a.f.fromDate.value,a.f.toDate.value),h(a.f.timeframe.patchValue(""))}),s(13,"div",10)(14,"div",16)(15,"mat-form-field",17)(16,"mat-label"),m(17,"Start Date"),r(),s(18,"input",18),v("dateInput",function(u){return g(p),h(a.changeDateEvent("fromInput",u))}),r(),b(19,"mat-datepicker-toggle",19)(20,"mat-datepicker",20,0),f(22,Uo,2,1,"mat-error",21),r()(),s(23,"div",16)(24,"mat-form-field",17)(25,"mat-label"),m(26,"End Date"),r(),s(27,"input",22),v("dateInput",function(u){return g(p),h(a.changeDateEvent("endInput",u))}),r(),b(28,"mat-datepicker-toggle",19)(29,"mat-datepicker",null,1),f(31,zo,2,1,"mat-error",21),r()(),s(32,"div",23)(33,"mat-card-actions")(34,"button",24),m(35," Submit "),r()()()(),s(36,"div",25)(37,"div",26)(38,"mat-form-field",17)(39,"mat-label"),m(40,"Choose a Timeframe"),r(),s(41,"mat-select",27),v("selectionChange",function(u){return g(p),h(a.selectTimeFrame(u))}),f(42,qo,2,2,"mat-option",28),r()()()(),s(43,"div",10)(44,"div",29)(45,"h6"),m(46," Currently viewing: "),s(47,"strong"),m(48),F(49,"date"),F(50,"date"),r()()()()(),s(51,"div",9),f(52,$o,2,3,"div",30)(53,aa,4,6,"ng-template",null,2,T),r()()()()()}if(n&2){let p=w(21),x=w(30),u=w(54);
3l(12),c("formGroup",a.notificationHistoryForm),l(6),c("matDatepicker",p)("min",a.minDate)("max",a.currentDate),l(),c("for",p),l(3),c("ngIf",a.hasError("fromDate")),l(5),c("matDatepicker",x)("min",a.minDate)("max",a.currentDate),l(),c("for",x),l(3),c("ngIf",a.hasError("toDate")),l(3),c("disabled",!(a.f.fromDate.value&&a.f.toDate.value)),l(8),c("ngForOf",a.timeFrames),l(6),De(" ",fe(49,17,a.startDate,"MM/dd/yyyy")," to ",fe(50,20,a.endDate,"MM/dd/yyyy")," "),l(4),c("ngIf",!a.isInitCompleted()||(a.dataSource==null||a.dataSource.data==null?null:a.dataSource.data.length)===void 0)("ngIfElse",u)}},dependencies:[nt,Y,yt,ft,ut,vt,gt,_t,bt,ht,xt,Ct,St,te,Zt,ti,ei,ee,H,oe,wt,ae,Xt,Je,ii,ni,oi,Dt,st,ot,at,rt,lt,ct,Rt],styles:[".services-area[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] > .contactlist[_ngcontent-%COMP%] .mobile-label[_ngcontent-%COMP%]{display:none}.services-area[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] > .contactlist[_ngcontent-%COMP%] .time-frame-container[_ngcontent-%COMP%]{margin:1rem;padding-left:inherit}.services-area[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] > .contactlist[_ngcontent-%COMP%] .mat-mdc-column-sentDate[_ngcontent-%COMP%]{flex:0 0 21%}.services-area[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] > .contactlist[_ngcontent-%COMP%] .mat-mdc-column-messageType[_ngcontent-%COMP%]{flex:0 0 10%}.services-area[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] > .contactlist[_ngcontent-%COMP%] .mat-mdc-column-message[_ngcontent-%COMP%]{flex:0 0 52%}.services-area[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] > .contactlist[_ngcontent-%COMP%] .mat-mdc-header-cell[_ngcontent-%COMP%]{background-color:#d3d3d3}.services-area[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] > .contactlist[_ngcontent-%COMP%] .btn-align[_ngcontent-%COMP%]{margin-left:15px}.services-area[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] > .contactlist[_ngcontent-%COMP%] button.btn[disabled][_ngcontent-%COMP%]{background:#d3d3d3;opacity:.6;cursor:not-allowed}.services-area[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] > .contactlist[_ngcontent-%COMP%] div.filter-header[_ngcontent-%COMP%]{font-size:25px;font-weight:500;margin:0 0 15px;padding:3px 0 15px;color:#000}.services-area[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] > .contactlist[_ngcontent-%COMP%] .btn-primary[_ngcontent-%COMP%]{min-width:160px;height:52px;font-size:16px}.services-area[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] > .contactlist[_ngcontent-%COMP%] .btn-primary[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:22px;margin-right:10px}.services-area[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] > .contactlist[_ngcontent-%COMP%] .mat-mdc-form-field[_ngcontent-%COMP%]{min-width:260px}@media (max-width: 600px){.mobile-label[_ngcontent-%COMP%]{display:inline-block;font-weight:700}.btn-align[_ngcontent-%COMP%]{margin-left:0}div.filter-header[_ngcontent-%COMP%]{font-size:20px;margin-bottom:10px;padding-bottom:10px}div.action-buttons[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{margin-top:-10px}.mat-mdc-header-row[_ngcontent-%COMP%]{display:none}.mat-mdc-column-message[_ngcontent-%COMP%]{display:block}mat-mdc-cell[_ngcontent-%COMP%]:first-of-type{padding-left:0}.mat-mdc-row[_ngcontent-%COMP%]{flex-direction:column;align-items:start;padding:1px 2px;min-height:10px}.btn.btn-primary[_ngcontent-%COMP%], .mat-mdc-form-field[_ngcontent-%COMP%]{width:100%!important}}.flex-row[_ngcontent-%COMP%]{display:flex;flex-direction:row}.flex-column-sm[_ngcontent-%COMP%], .flex-column-xs[_ngcontent-%COMP%]{display:flex;flex-direction:column}.flex-wrap[_ngcontent-%COMP%]{flex-wrap:wrap}.flex-center-center[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}"]});let t=o;return t})();var ra=["ctrTable"],sa=["warningDialog"];function la(t,o){t&1&&(s(0,"div"),b(1,"app-skeleton-grid",17),r()),t&2&&(l(),c("columnCount",3)("rowCount",5)("showPaginator",!1))}function ca(t,o){t&1&&b(0,"div")}function ma(t,o){t&1&&(s(0,"th",30),m(1,"Contact Method"),r())}function pa(t,o){t&1&&(s(0,"div")(1,"mat-icon"),m(2,"email"),r()())}function da(t,o){t&1&&(s(0,"div")(1,"mat-icon"),m(2,"message"),r()())}function fa(t,o){t&1&&(s(0,"div")(1,"mat-icon"),m(2,"keyboard_voice"),r()())}function _a(t,o){t&1&&(s(0,"div")(1,"mat-icon"),m(2,"notifications"),r()())}function ua(t,o){if(t&1&&(s(0,"td",31),f(1,pa,3,0,"div",32)(2,da,3,0,"div",32)(3,fa,3,0,"div",32)(4,_a,3,0,"div",32),r()),t&2){let i=o.$implicit;l(),c("ngIf",i.transportTypeName=="Email"),l(),c("ngIf",i.transportTypeName=="SMS"),l(),c("ngIf",i.transportTypeName=="Voice"),l(),c("ngIf",i.transportTypeName=="Push")}}function ga(t,o){t&1&&(s(0,"th",30),m(1,"Contact Type"),r())}function ha(t,o){if(t&1&&(s(0,"div",34),m(1),r()),t&2){let i=d().$implicit,e=d(3);l(),S(" ",i.transportTypeName==="Push"?e.getDeviceProfileName(i.address):i.address," ")}}function xa(t,o){if(t&1&&(s(0,"div",34),m(1),F(2,"formatPhone"),r()),t&2){let i=d().$implicit;l(),S(" ",R(2,1,i.address)," ")}}function va(t,o){if(t&1&&(s(0,"td",31),f(1,ha,2,1,"div",33)(2,xa,3,3,"div",33),r()),t&2){let i=o.$implicit;l(),c("ngIf",i.transportTypeName=="Email"||i.transportTypeName=="Push"),l(),c("ngIf",i.transportTypeName=="SMS"||i.transportTypeName=="Voice")}}function ba(t,o){t&1&&(s(0,"th",35),m(1,"Action"),r())}function Ca(t,o){if(t&1){let i=C();s(0,"td",36)(1,"button",37),v("click",function(){let n=g(i).$implicit,a=d(3);return h(a.launchSetupDialog(!1,n))}),s(2,"mat-icon",38),m(3,"delete"),r()()()}}function Sa(t,o){t&1&&b(0,"tr",39)}function ya(t,o){t&1&&b(0,"tr",40)}function Da(t,o){if(t&1&&(s(0,"div",19)(1,"table",20,3),y(3,21),f(4,ma,2,0,"th",22)(
35,ua,5,4,"td",23),D(),y(6,24),f(7,ga,2,0,"th",22)(8,va,3,2,"td",23),D(),y(9,25),f(10,ba,2,0,"th",26)(11,Ca,4,0,"td",27),D(),f(12,Sa,1,0,"tr",28)(13,ya,1,0,"tr",29),r()()),t&2){let i=d(2);l(),c("dataSource",i.dataSource),l(11),c("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",!0),l(),c("matRowDefColumns",i.displayedColumns)}}function Ta(t,o){t&1&&(s(0,"div",41),m(1," There is no contact found. "),r())}function wa(t,o){if(t&1&&f(0,ca,1,0,"div",18)(1,Da,14,4,"ng-template",null,1,T)(3,Ta,2,0,"ng-template",null,2,T),t&2){let i=w(2),e=w(4),n=d();c("ngIf",(n.dataSource==null||n.dataSource.data==null?null:n.dataSource.data.length)>0)("ngIfThen",i)("ngIfElse",e)}}var Fi=(()=>{let o=class o{set content1(e){this.dataSource.sort=e}constructor(e,n,a,p,x,u,U,z,q,Z,Nt,It,Mt,B){this.alertService=e,this.dialog=a,this.notificationService=p,this.route=x,this.router=u,this.logger=U,this.activatedRoute=z,this.authService=q,this.dataService=Z,this.location=Nt,this.changeAccountService=It,this.configSettingsService=Mt,this.changeDetector=B,this.isInitCompleted=k(!1),this.hasNotificationSetup=k(!1),this.displayedColumns=["method","address","star"],this.dataSource=new Kt,this.selection=new Qe(!0,[]),this.configSettings=["EDIT_LANGUAGE_PREFERENCE","MINUTE_INTERVAL"],this.destinationVerified=!1,this.hasErrors=!1,this.floatLabelControl=new Ot("auto"),this.doFilter=Ft=>{this.dataSource.filter=Ft.trim().toLocaleLowerCase()},this.webConfigSettings=["NOTIFICATIONS_NOT_SUPPORTED","NOTIFICATIONVERIFYHELPMSG","NOTIFICATIONDELETEMSG","SMSTERMSMSG","NOTIFICATIONREGHELPMSG","NOTIFICATIONSELECTHELPMSG","NOTIFICATIONMGMTMSG","SUBSCRIBEDHELPMSG","UNSUBSCRIBEDHELPMSG","NOTIFICATIONTIMEMSG","EXCESSIVEUSAGEHELPMSG","LOWBALANCETHRESHOLDHELPMSG","EMAILVERIFYMSG","TEXTVERIFYMSG","VOICEVERIFYMSG","ACCOUNTINFOUPDATESUCCESS"],this.memberNumber=this.authService.currentUserValue.memberNumber,this.accountNumber=this.dataService.accountInfoResp.accountNumber}ngOnInit(){this.isInitCompleted.set(!1),this.alertService.clear(),this.contactState=window.history.state,this.route.queryParamMap.subscribe(e=>{let n=e.get("accountno");n!==null&&(this.isInitCompleted.set(!1),this.accountNumber=parseInt(n,10),this.changeAccountService.handleAccountSelection(this.accountNumber),this.location.replaceState(this.location.path().split("?")[0],""),this.getData())}),this.getConfigSettings()}getData(){let e=this.notificationService.getAccountDeviceInfo(this.memberNumber),n=this.notificationService.getSubscriberInformation(this.accountNumber,this.memberNumber);ve([n,e]).subscribe(a=>{this.logger.info("Response received from getSubscriberInformation:"+a),this.bindData(a[0]),this.accountDevices=a[1],this.contactState?.data?.isFromAddContact&&this.launchSetupDialog(!0),this.changeDetector.detectChanges(),this.isInitCompleted.set(!0)},a=>{this.logger.error("Error from getSubscriberInformation: "+a),this.alertService.error(a),this.isInitCompleted.set(!0),this.hasErrors=!0,this.changeDetector.detectChanges()})}getDeviceProfileName(e){if(this.accountDevices){let n=this.accountDevices.find(a=>a.hardwareId===e);if(n)return n.profileName}return e}bindData(e){try{this.notification=e,this.notification.subscriberNotification&&(this.destinations=this.notification.subscriberNotification.subscriber.destinations,this.destinationsVerified=this.destinations.filter(n=>n.statusId===2),this.dataSource.data=this.destinationsVerified,this.destinationsVerified.length>0&&(this.destinationVerified=!0),this.hasNotificationSetup.set(!0))}catch(n){this.alertService.error(n),this.logger.error("Error at bindData():"+n)}}launchSetupDialog(e,n){let a=this.dialog.open(Ii,{autoFocus:!0,disableClose:!0,width:"600px"});a.componentInstance.destinations=this.destinations,a.componentInstance.transportTypes=this.notification.subscriberNotification.transportTypes,a.componentInstance.accountDevices=this.accountDevices,a.componentInstance.accountNumber=this.accountNumber,a.componentInstance.memberNumber=this.memberNumber,a.componentInstance.showSetupForm=e,a.componentInstance.showDeleteMsg=!e,a.componentInstance.voiceVerifyMsg=this.voiceVerifyMsg,!e&&n&&(a.componentInstance.destinatonIds=n.id),a.afterClosed().subscribe(p=>
3{if(p)p.event==="Close"&&(this.contactState=null,this.alertService.clear(),this.isInitCompleted.set(!1),this.getData());else{let x=a.componentInstance.notificationModel;this.contactState=null,x&&(this.alertService.clear(),this.isInitCompleted.set(!1),this.bindData(x),this.isInitCompleted.set(!0))}})}launchEditDialog(e){let n=this.dialog.open(this.warningDialogRef)}getConfigSettings(){this.configSettingsService.getConfigSettings(this.configSettings,[],this.webConfigSettings).subscribe(e=>{try{let n=e[0],a=e[2];this.voiceVerifyMsg=a.find(p=>p.key==="VOICEVERIFYMSG").value,this.getData()}catch(n){this.isInitCompleted.set(!0),this.alertService.error(n),this.logger.error("Error while fetching config settings for notifications: "+n)}},e=>{this.isInitCompleted.set(!0),this.logger.error("Error while fetching config settings for notifications: "+e),this.alertService.error(e)})}};o.\u0275fac=function(n){return new(n||o)(_(J),_(X),_(dt),_(K),_(tt),_(L),_(G),_(tt),_(j),_(mt),_(it),_(pt),_(Wt),_(W))},o.\u0275cmp=Q({type:o,selectors:[["app-manage-notification-contacts"]],viewQuery:function(n,a){if(n&1&&(E(H,5),E(ra,5,H),E(wt,7),E(sa,5)),n&2){let p;N(p=I())&&(a.sort=p.first),N(p=I())&&(a.content1=p.first),N(p=I())&&(a.paginator=p.first),N(p=I())&&(a.warningDialogRef=p.first)}},inputs:{contractorListForm:"contractorListForm",contractorUploadFilesForm:"contractorUploadFilesForm"},decls:20,vars:4,consts:[["ContentSection",""],["hasContactBlock",""],["noRecords",""],["ctrTable",""],[1,"services-area","ptb-100","bg-gray"],[1,"container"],[1,"contactlist","mt-1","pt-1"],[1,"col-md-12","col-lg-12"],[1,"row"],[1,"filter-header"],[1,"row","action-buttons"],[1,"col-auto"],["href","javascript: void(0)",1,"btn","btn-sm","btn-success","mobile-format",3,"click"],[1,"icofont-plus"],["href","javascript: void(0)","routerLink","/manage-notifications",1,"btn","btn-sm","btn-primary"],[1,"icofont-notification"],[4,"ngIf","ngIfElse"],[3,"columnCount","rowCount","showPaginator"],[4,"ngIf","ngIfThen","ngIfElse"],[1,"row","p-3"],["mat-table","","matSort","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","method"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","address"],["matColumnDef","star","stickyEnd",""],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","","aria-label","action menu",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[4,"ngIf"],["class","word-break",4,"ngIf"],[1,"word-break"],["mat-header-cell",""],["mat-cell","","aria-label","action menu"],["mat-icon-button","","matTooltip","Delete Contact",3,"click"],["color","warn"],["mat-header-row",""],["mat-row",""],[1,"alert","alert-danger","w-100"]],template:function(n,a){if(n&1){let p=C();s(0,"section",4)(1,"div",5)(2,"div",6)(3,"div",7),b(4,"app-alert"),s(5,"div",8)(6,"div",9),m(7," Manage Contacts "),r()(),s(8,"div",10)(9,"div",11)(10,"a",12),v("click",function(){return g(p),h(a.launchSetupDialog(!0))}),b(11,"i",13),m(12," Add Contact"),r()(),s(13,"div",11)(14,"a",14),b(15,"i",15),m(16," Manage Notifications"),r()()(),f(17,la,2,3,"div",16)(18,wa,5,3,"ng-template",null,0,T),r()()()()}if(n&2){let p=w(19);l(10),ye("disabled",!a.hasNotificationSetup()),l(7),c("ngIf",!a.isInitCompleted()||(a.dataSource==null||a.dataSource.data==null?null:a.dataSource.data.length)===void 0)("ngIfElse",p)}},dependencies:[Y,yt,ft,ut,vt,gt,_t,bt,ht,xt,Ct,St,ne,ie,H,oe,Ke,Dt,$t,Tt],styles:[`div.filter-header{font-size:25px;font-weight:500;margin-bottom:20px;padding-bottom:20px;color:#000}.container>.contactlist i{font-size:18px;display:inline-block;line-height:1;margin-right:10px}.mat-table{overflow:auto;width:100%}.mat-table .mat-header-cell{background-color:#d3d3d3}.word-break{word-break:break-word}.mat-table th.mat-header-cell{font-weight:600!important;font-size:1em;text-align:left!important;padding-left:10px!important;max-width:300px}td.mat-cell:first-child{padding:0 8px}td.mat-cell:not(:first-child){padding:8px 8px 8px 10px}tr.mat-row:nth-child(odd){background-color:#f5f5f5}tr.mat-row:not(:nth-child(odd)){background-color:#fff}.mat-card-actions>.mat-raised-button{height:47px}div.action-buttons .btn{text-transform:none!important;font-size:1.2em;padding:12px!important;margin:-35px 0 10px}div.modal-body h5{text-transform:none}.mat-mdc-dialog-container{padding-top:30px;margin-top:100px;padding-right:30px;overflow:auto}.close-button{float:right;top:4px;right:4px}td.mat-column-star{width:20px;padding-right:8px!important}@media (max-width: 568px){.container .contactlist{width:92%;margin-left:4%;margin-right:4%}.container .contactlist i{font-size:14px;display:inline-block;line-height:1;margin-right:5px}.container .contactlist th.mat-header-cell{font-weight:600!important;font-size:1.2em;text-align:left!important;max-width:300px}.container .contactlist td.mat-cell{font-size:1.1em;text-align:left}.container .contactlist .mat-form-field,.container .contactlist .mat-raised-button{width:100%}div.filter-header{font-size:20px;margin-bottom:10px;padding-bottom:10px}.mat-mdc-dialog-container{padding:0!important;overflow:auto}.mat-mdc-dialog-container .mdc-dialog__title{text-align:center}.mat-mdc-dialog-container .modal-body{margin:0 -20px!important}.mobile-format{margin-bottom:20px!important}.close-button{float:right;top:10px;right:10px}div.action-buttons .btn{margin-top:-10px}} 4`],encapsulation:2});let t=o;return t})();var ce=(()=>{let o=class o{constructor(e,n,a){this.router=e,this.authenticationService=n,this.logger=a}canActivate(e,n){let a=this.authenticationService.currentUserValue;return a&&!this.isTokenExpired(a.accessToken)?!0:(this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.navigate(["login"],{queryParams:{returnUrl:n.url}}),!1)}isTokenExpired(e){let n=this.getTokenExpirationDate(e);return n===void 0?!1:!(n.valueOf()>new Date().valueOf())}getTokenExpirationDate(e){let n=Yt(e);if(n.exp===void 0)return null;let a=new Date(0);
4return a.setUTCSeconds(n.exp),a}};o.\u0275fac=function(n){return new(n||o)($(L),$(j),$(G))},o.\u0275prov=jt({token:o,factory:o.\u0275fac,providedIn:"root"});let t=o;return t})();var Vr=(()=>{let o=class o{constructor(e,n,a,p){this.router=e,this.logger=n,this.dialogRef=a,this.authenticationService=p,this.isLoggingOut=!1}intercept(e,n){let a,p=null;if(localStorage.getItem("mcp_currentUser")!==null){try{a=JSON.parse(localStorage.getItem("mcp_currentUser"))}catch(x){this.logger.error("Error parsing JSON:",x)}if(p=a.accessToken,this.isTokenExpired(p))return this.performLogoutAndRedirect(),me(()=>new Error("Token expired"))}return p!=null&&(e=e.clone({setHeaders:{Authorization:`Bearer ${p}`,ApplicationId:`${Ge.Web}`}})),n.handle(e).pipe(be(x=>(x instanceof Me&&(x.status===401?(this.logger.warn("401 Unauthorized received - performing logout",{message:x.error?.message||x.message,url:x.url}),this.performLogoutAndRedirect()):x.status===503&&(Lt.isMaintenance=!0,this.router.navigate(["/maint"]))),me(()=>x))))}isTokenExpired(e){let n=this.getTokenExpirationDate(e);return n===void 0?!1:!(n.valueOf()>new Date().valueOf())}getTokenExpirationDate(e){let n=Yt(e);if(n.exp===void 0)return null;let a=new Date(0);return a.setUTCSeconds(n.exp),a}performLogoutAndRedirect(){if(this.isLoggingOut){this.logger.debug("Logout already in progress, skipping duplicate call");return}this.isLoggingOut=!0;try{this.logger.info("Performing logout and redirect..."),this.authenticationService.logout(),this.dialogRef.closeAll(),this.router.navigate(["/login"],{queryParams:{sessionTimeOut:!0},skipLocationChange:!1}).then(()=>{this.logger.debug("Redirected to login page")}).catch(e=>{this.logger.error("Error during redirect:",e)})}catch(e){this.logger.error("Error during logout process:",e)}finally{setTimeout(()=>{this.isLoggingOut=!1},1e3)}}};o.\u0275fac=function(n){return new(n||o)($(L),$(G),$(dt),$(j))},o.\u0275prov=jt({token:o,factory:o.\u0275fac});let t=o;return t})();var Ea=[{path:"manage-notifications",component:Ei,canActivate:[ce],data:{title:"Notifications"}},{path:"notifications-history",component:Mi,canActivate:[ce],data:{title:"Notifications History"}},{path:"manage-contacts",component:Fi,canActivate:[ce],data:{title:"Manage Contact"}}],Vi=je.forChild(Ea);var es=(()=>{let o=class o{};o.\u0275fac=function(n){return new(n||o)},o.\u0275mod=Se({type:o}),o.\u0275inj=Ce({imports:[Ie,bi,He,Be,Vi]});let t=o;return t})();export{ce as a,Vr as b,es as c};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.