1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[1855],{42501:(D,T,a)=>{a.d(T,{h:()=>f});var e=a(24006),E=a(55062);let f=(()=>{var m;class O{constructor(){}conditionalRequiredCheck(l){return R=>R.parent&&l(R)?e.kI.required(R):null}}return(m=O).\u0275fac=function(l){return new(l||m)},m.\u0275cmp=E.Xpm({type:m,selectors:[["ng-component"]],decls:0,vars:0,template:function(l,R){},encapsulation:2}),O})()},71855:(D,T,a)=>{a.d(T,{a:()=>h});var e=a(24006),E=a(53132),f=a(86147),m=a(59163),O=a(98384),u=a(15439),R=a(42501),o=a(55062),F=a(89383),A=a(36895),I=a(21094),M=a(11133);function L(_,C){if(1&_&&(o.TgZ(0,"div",1)(1,"div",2),o._UZ(2,"input",3),o.TgZ(3,"span",4),o._uU(4,"$"),o.qZA(),o._UZ(5,"app-form-error",5),o.qZA()()),2&_){const r=o.oxw();o.Q6J("formGroup",r.formRef),o.xp6(2),o.ekj("error",r.formRef.get(r.fieldOptions.ctrlName).touched&&!r.formRef.get(r.fieldOptions.ctrlName).valid),o.s9C("maxlength",r.fieldOptions.maxLength),o.Q6J("placeholder",r.actualLabel)("mask",r.fieldOptions.mask)("formControlName",r.fieldOptions.ctrlName),o.uIk("aria-label",r.fieldLabel),o.xp6(1),o.Q6J("hidden",null==r.fieldOptions||null==r.fieldOptions.type||"currency"!=r.fieldOptions.type),o.xp6(2),o.Q6J("formFieldRef",r.formRef.get(r.fieldOptions.ctrlName))("formLabel",r.fieldLabel)("inputType",r.fieldOptions.type)}}let h=(()=>{var _;class C extends R.h{constructor(n,s,c){super(),this.formsService=n,this.formValidatorUtility=s,this.translateService=c,this.fieldOptions=new O.gU,this.isTranslateReady=!1}set fieldOptParam(n){n&&(this.fieldOptions=new O.gU(n))}static dateValidatorFn(){return n=>{const s=n.value;return s&&s.length>
10?u(s,"MM/DD/YYYY",!0).isValid()?null:{invalidDateSlashes:!0}:null}}ngOnInit(){this.translateService.get([this.fieldLabel]).subscribe(n=>{this.fieldLabel=n[this.fieldLabel],this.actualLabel=this.formsService.rebuildLabelIfRequired(this.fieldLabel,this.fieldOptions),this.fieldOptions.ctrlName=this.formsService.buildgenerateCtrlName(this.fieldOptions,this.fieldLabel),this.fieldOptions.customValidators=this.formsService.buildvalidators(this.fieldOptions),this.fieldOptions.customValidators=this.fieldOptions.customValidators.concat(this.buildTextValidators(this.fieldOptions.type)),this.fieldOptions.conditionalRequiredFn&&(this.fieldOptions.customValidators=this.fieldOptions.customValidators.concat(this.conditionalRequiredCheck(()=>this.fieldOptions.conditionalRequiredFn(this.formRef)))),this.formRef.addControl(this.fieldOptions.ctrlName,new e.p4(this.fieldOptions.value,this.fieldOptions.customValidators)),this.fieldOptions.maxLength=this.setMaxLength(this.fieldOptions.type),this.fieldOptions.mask=this.setMask(this.fieldOptions.type),this.fieldOptions.disabled&&this.formRef.get(this.fieldOptions.ctrlName).disable(),this.isTranslateReady=!0})}buildTextValidators(n){const s=[];
1switch(n){case"five digits":case"account number":case"whole number":case"all digit":let c;if(c=m.s.regExpValidator(E.i.allDigit,"whole number"===n?"wholeNumbersOnly":"numbersOnly"),s.push(c),"account number"===n){const P=e.kI.minLength(this.setMaxLength(n));s.push(P);const S=m.s.regExpValidator(E.i.accountNumberPrefix,"invalidAcctPrefix");s.push(S)}break;case"name":const d=m.s.regExpValidator(E.i.names,"alphaNumSpaceOnly");s.push(d);break;case"phone number":const t=m.s.regExpValidator(E.i.phone,"invalidPhone");s.push(t);break;case"service ZIP":const p=new RegExp(E.i.zipCode,"g"),i=m.s.regExpValidator(p,"invalidServiceZip");s.push(i);break;case"email":const N=this.formValidatorUtility.EmailRegExValidator(!1);s.push(N);break;case"date-slashes":const g=C.dateValidatorFn();s.push(g);break;case"currency":const x=m.s.regExpValidator(E.i.currency,"invalidCurrency");s.push(x)}return s}setMaxLength(n){switch(n){case"five digits":case"service ZIP":return 5;case"account number":return 19;case"date-slashes":return 10}}setMask(n){return"phone number"===n?"(000) 000-0000":""}}return(_=C).\u0275fac=function(n){return new(n||_)(o.Y36(m.s),o.Y36(f.u),o.Y36(F.sK))},_.\u0275cmp=o.Xpm({type:_,selectors:[["app-text-field"]],inputs:{formRef:"formRef",fieldLabel:"fieldLabel",fieldOptParam:"fieldOptParam"},features:[o.qOj],decls:1,vars:1,consts:[[3,"formGroup",4,"ngIf"],[3,"formGroup"],[1,"clearfix"],["type","text","role","form","tabindex","0",1,"form-control",3,"placeholder","mask","maxlength","formControlName"],[1,"dollar-symbol",3,"hidden"],[3,"formFieldRef","formLabel","inputType"]],template:function(n,s){1&n&&o.YNc(0,L,6,12,"div",0),2&n&&o.Q6J("ngIf",s.isTranslateReady)},dependencies:[A.O5,e.Fj,e.JJ,e.JL,e.nD,e.sg,e.u,I.Z6,M.A],styles:[".dollar-symbol[_ngcontent-%COMP%]{position:absolute;top:8px;left:19px;z-index:99}"]}),C})()},11133:(D,T,a)=>{a.d(T,{A:()=>d});var e=a(55062),E=a(36895),f=a(89383);function m(t,p){1&t&&(e.TgZ(0,"span")(1,"div",4),e._uU(2),e.ALo(3,"translate"),e.qZA()()),2&t&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"COMPONENTS.FORMS.FIELD.GENERICERROR.CHECKBOXREQUIRED")," "))}function O(t,p){if(1&t&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t){const i=e.oxw(3);e.xp6(1),e.AsE(" ",i.formLabel," ",e.lcZ(2,2,"COMPONENTS.FORMS.FIELD.GENERICERROR.REQUIRED")," ")}}function u(t,p){1&t&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"COMPONENTS.FORMS.FIELD.CONTACT.EMAIL.ERRORMESSAGE")," "))}function l(t,p){if(1&t&&(e.TgZ(0,"span"),e.YNc(1,m,4,3,"span",3),e.YNc(2,O,3,4,"span",3),e.YNc(3,u,3,3,"span",3),e.qZA()),2&t){const i=e.oxw(2);e.xp6(1),e.Q6J("ngIf",i.inputType&&"checkbox"==i.inputType),e.xp6(1),e.Q6J("ngIf",i.inputType&&"email"!=i.inputType&&"checkbox"!=i.inputType),e.xp6(1),e.Q6J("ngIf",i.inputType&&"email"===i.inputType)}}function R(t,p){if(1&t&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t){const i=e.oxw(2);e.xp6(1),e.AsE(" ",i.formLabel," ",e.lcZ(2,2,"COMPONENTS.FORMS.FIELD.GENERICERROR.ALPHANUMSPACE")," ")}}function o(t,p){if(1&t&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t){const i=e.oxw(2);e.xp6(1),e.AsE(" ",i.formLabel," ",e.lcZ(2,2,"COMPONENTS.FORMS.FIELD.CONTACT.PHONENUMBER.ERRORMESSSAGE")," ")}}function F(t,p){1&t&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"COMPONENTS.FORMS.FIELD.GENERICERROR.NUMBERSONLY")," "))}function A(t,p){1&t&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"COMPONENTS.FORMS.FIELD.GENERICERROR.WHOLENUMBERSONLY")," "))}function I(t,p){1&t&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"COMPONENTS.FORMS.FIELD.GENERICERROR.ONECHECKREQUIRED")," "))}function M(t,p){1&t&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"COMPONENTS.FORMS.FIELD.GENERICERROR.INVALIDSERVICEZIPCODE")," "))}function L(t,p){1&t&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"COMPONENTS.FORMS.FIELD.GENERICERROR.INVALIDACCTPREFIX")," "))}function h(t,p){1&t&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"COMPONENTS.FORGOTUSERNAME.ACCOUNTNUMBER.ERRORMESSSAGE")," "))}function _(t,p){if(1&t&&(e.TgZ(0,"span"),e.YNc(1,h,3,3,"span",3),e.qZA()),2&t){const i=e.oxw(2);e.xp6(1),e.Q6J("ngIf","account number"==i.inputType)}}function C(t,p){1&t&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.ALo(3,"translate"),e.ALo(4,"translate"),e.qZA()),2&t&&(e.xp6(1),e.lnq(" ",e.lcZ(2,3,"COMPONENTS.FORMS.FIELD.GENERICERROR.INVALIDDATE"),". ",e.lcZ(3,5,"COMPONENTS.FORMS.FIELD.GENERICERROR.FORMATPRE")," ",e.lcZ(4,7,"COMPONENTS.FORMS.FIELD.FORMAT.DATESLASH")," "))}function r(t,p){1&t&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"COMPONENTS.FORMS.FIELD.GENERICERROR.INVALIDCURRENCY")," "))}function n(t,p){if(1&t&&(e.TgZ(0,"span",2),e.YNc(1,l,4,3,"span",3),e.YNc(2,R,3,4,"span",3),e.YNc(3,o,3,4,"span",3),e.YNc(4,F,3,3,"span",3),e.YNc(5,A,3,3,"span",3),e.YNc(6,I,3,3,"span",3),e.YNc(7,M,3,3,"span",3),e.YNc(8,L,3,3,"span",3),e.YNc(9,_,2,1,"span",3),e.YNc(10,C,5,9,"span",3),e.YNc(11,r,3,3,"span",3),e.qZA()),2&t){const i=e.oxw();e.xp6(1),e.Q6J("ngIf",i.formFieldRef.errors.required||i.formFieldRef.errors.selectRequired),e.xp6(1),e.Q6J("ngIf",i.formFieldRef.errors.alphaNumSpaceOnly),e.xp6(1),e.Q6J("ngIf",i.formFieldRef.errors.invalidPhone),e.xp6(1),e.Q6J("ngIf",i.formFieldRef.errors.numbersOnly),e.xp6(1),e.Q6J("ngIf",i.formFieldRef.errors.wholeNumbersOnly),e.xp6(1),e.Q6J("ngIf",i.formFieldRef.errors.oneCheckRequired),e.xp6(1),e.Q6J("ngIf",i.formFieldRef.errors.invalidServiceZip),e.xp6(1),e.Q6J("ngIf",i.formFieldRef.errors.invalidAcctPrefix),e.xp6(1),e.Q6J("ngIf",null==i.formFieldRef.errors?null:i.formFieldRef.errors.minlength),e.xp6(1),e.Q6J("ngIf",i.formFieldRef.errors.invalidDateSlashes),e.xp6(1),e.Q6J("ngIf",i.formFieldRef.errors.invalidCurrency)}}function s(t,p){if(1&t&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&t){const i=e.oxw(2);e.xp6(1),e.hij(" ",i.formFieldRef.errors.error," ")}}function c(t,p){if(1&t&&(e.TgZ(0,"span",2),e.YNc(1,s,2,1,"span",3),e.qZA()),2&t){const i=e.oxw();e.xp6(1),e.Q6J("ngIf",i.formFieldRef.touched&&i.formFieldRef.hasError("error"))}}let d=(()=>{var t;class p{constructor(){}}return(t=p).\u0275fac=function(N){return new(N||t)},t.\u0275cmp=e.Xpm({type:t,selectors:[["app-form-error"]],inputs:{formFieldRef:"formFieldRef",formLabel:"formLabel",inputType:"inputType"},decls:3,vars:2,consts:[[1,"clearfix"],["class","validation-form-error",4,"ngIf"],[1,"validation-form-error"],[4,"ngIf"],[2,"margin-top","10px"]],template:function(N,g){1&N&&(e.TgZ(0,"div",0),e.YNc(1,n,12,11,"span",1),e.YNc(2,c,2,1,"span",1),e.qZA()),2&N&&(e.xp6(1),e.Q6J("ngIf",g.formFieldRef.touched&&!g.formFieldRef.valid),e.xp6(1),e.Q6J("ngIf",g.inputType&&"email"==g.inputType))},dependencies:[E.O5,f.X$]}),p})()},59163:(D,T,a)=>{a.d(T,{s:()=>L});var e=a(15861),E=a(24006),f=a(89976),m=a(30100),O=a(61213),u=a(5592),l=a(42311),R=a(36895),o=a(55062),F=a(90603),A=a(53093),I=a(33441),M=a(89383);let L=(()=>{var h;class _{constructor(r,n,s,c,d,t,p){this.http=r,this.modalCtrl=n,this.window=s,this.userService=c,this.logger=
1d,this.locale=t,this.translateService=p,this.formsEmailURL="/forms/sendEmail",this.recaptchaDisabledFlagURL="/forms/get-recaptcha-flag/"}static regExpValidator(r,n){return s=>{const c=s.value;return c&&c.length>0?r.test(c)?null:{[n]:!0}:null}}static oneCheckRequired(r){let n=!1;return Object.keys(r.controls).forEach(s=>{n=!!r.get(s).value||n}),n?null:{oneCheckRequired:{}}}static transformToKey(r,n){let s="--";if(r&&r.length>0)switch(r.toUpperCase()){case"YES":s="COMPONENTS.AMP.PAYMENTDUE.YES";break;case"NO":s="COMPONENTS.AMP.PAYMENTDUE.NO";break;case"NONE":s="GENERAL.NONE";break;case"UNSURE":s="GENERAL.UNSURE";break;case"OTHER":s="GENERAL.OTHER";break;case"$3":s="GENERAL.AMOUNT.$3";break;case"$5":s="GENERAL.AMOUNT.$5";break;case"$10":s="GENERAL.AMOUNT.$10";break;case"$20":s="GENERAL.AMOUNT.$20";break;case"$30":s="GENERAL.AMOUNT.$30";break;case"LOW-INCOME ELIGIBLE":s="COMPONENTS.FORMS.ESAPSPECIFIC.LOWINCOMEELIGIBLE";break;case"ELIGIBLE PREMISE CUSTOMER":s="COMPONENTS.FORMS.ESAPSPECIFIC.ELIGIBLEPREMISECUSTOMER";break;case"DISADVANTAGED BUSINESS OR NON-PROFIT ORGANIZATION":s="COMPONENTS.FORMS.ESAPSPECIFIC.DISADVANTAGEDBUSINESSORNONPROFIT";break;case"NEW":s="COMPONENTS.FORMS.ESAPSPECIFIC.NEW";break;case"RECERTIFICATION":s="COMPONENTS.FORMS.ESAPSPECIFIC.RECERTIFICATION";break;default:s=n+r.replace(/ /g,"_").toUpperCase()}return s}static getAnswerKeys(r,n,s){for(const c in r)n[c]&&(r[c]=_.transformToKey(n[c],s));return r}static extractValue(r){return(new R.rS).transform(r.split(".").pop().replace(/_/g," "))}static onAddressAutoCompleteDismiss(r){const n=new u.lX;if(null!=r){const s=[];if(r.description&&void 0!==r.detail){s.push(r.detail);const c=r.description.split(",");n.addressLong=r.description,n.streetLong=c[0],n.city=c[1],n.state=c[2]||"NV",n.zipCode=this.getAddressComponent(s,"postal_code"),n.country=c[3],n.streetNumber=this.getAddressComponent(s,"street_number")||r.description.split(" ")[0],n.overrideCode="",n.addressLine1="",n.addressLine2="",n.addressLine3="",n.unitNumber=""}}return n}static getAddressComponent(r,n){if(void 0!==r&&r.length>0&&null!==r[0]){const s=r[0].address_components.find(c=>void 0!==c.types.find(d=>d===n));return void 0!==s?"administrative_area_level_1"===n||"route"===n?s.short_name.toString():s.long_name.toString():""}return""}static encodeStringValues(r){for(const n in r)"string"==typeof r[n]&&(r[n]=encodeURI(r[n].trim()));return r}buildgenerateCtrlName(r,n){return r.ctrlName&&r.ctrlName.length>0?r.ctrlName:n.toLowerCase().split(" ").join("")}rebuildLabelIfRequired(r,n){return n.required?"* "+r:r}buildvalidators(r){let n=[];return r.required&&null==r.conditionalRequiredFn&&n.push(E.kI.required),n=n.concat(r.customValidators),n}postSubmission(r,n,s,c,d){const t=Object.assign({},r);switch(t.cmxType=n,t.recaptchaResponse=s,t.isMobileApp=c,t.cmxSubType="",t.cmxDocEffectiveDate="",t.cmxDocExpirationDate="",t.cmxFileOriginalName="",t.cmxFileMimeType="",t.cmxFileData="",n){case"TOUEVRApplicationResidential":case"TOUEVRApplicationBusiness":case"GreenEnergyChoiceSignup":t.cmxFullName=t.cmxLastName&&t.cmxFirstName?t.cmxLastName+",%20"+t.cmxFirstName:(t.cmxLastName||"")+(t.cmxFirstName||"");break;default:t.cmxFullName=((t.cmxFirstName||"")+" "+(t.cmxLastName||"")).trim()}t.cmxFirstName=t.cmxLastName="";const p=this.userService.getUser();let N;t.cmxAuthenticatedUsername=p.getUserID()||"",t.cmxOrigin=this.window.nativeWindow.location.href,["cmxComments","cmxFullName","cmxFirstName","cmxLastName","cmxPrimaryPhone","cmxPrimaryPhoneExtension","cmxEmailAddress","cmxAccountNumber"].forEach(x=>{t.hasOwnProperty(x)||(t[x]="")});const g=this.locale.locale.formsApiUrl+n;return N=d&&d.length>0?this.extractFormData(d,t):{resource:t},this.http.sendExternalRequest(f.a.POST,g,N,!0).then(x=>{const P=x||null;return P&&P.isSuccess?Promise.resolve(P):(this.logger.error("Internal Server Error occurred while posting to Forms API"),Promise.reject(""))}).catch(x=>(this.logger.error("Error occurred while while posting to Forms API",x),Promise.reject("")))}extractFormData(r,n){const s=new FormData;return s.append("cmxFormData",JSON.stringify({resource:n})),r.forEach(c=>{s.append("cmxFileData",c._file)}),s}sendEmail(r,n,s){return this.http.sendRequest(f.a.POST,this.formsEmailURL,JSON.stringify({emailTemplate:r,emailRecipient:n,emailVariableList:s}),null,!0).then(d=>d.isSuccess?Promise.resolve(d.ResponseBody):Promise.reject("")).catch(d=>(this.logger.error("Error occured while fetching response for formsservice.sendEmail from server.",d),Promise.reject("")))}getRecaptchaDisabledFlag(r){var n=this;return(0,e.Z)(function*(){return yield n.http.sendAnonymousRequest(f.a.GET,n.recaptchaDisabledFlagURL+r)})()}}return(h=_).\u0275fac=function(r){return new(r||h)(o.LFG(m.r),o.LFG(F.IN),o.LFG(A.X),o.LFG(O.K),o.LFG(I.Y),o.LFG(l.O),o.LFG(M.sK))},h.\u0275prov=o.Yz7({token:h,factory:h.\u0275fac,providedIn:"root"}),_})()},98384:(D,T,a)=>{a.d(T,{A0:()=>f,Ei:()=>m,Wy:()=>e,gU:()=>E,r9:()=>O});class e{constructor(l={}){this.value=l.value||"",this.ctrlName=l.ctrlName||"",this.required=l.required||!1,this.disabled=l.disabled||!1,this.conditionalRequiredFn=null==l?void 0:l.conditionalRequiredFn,this.customValidators=l.customValidators||[]}}class E extends e{constructor(l={}){super(l),this.mask=l.mask||{mask:!1},this.maxLength=l.maxLength||void 0,this.type=l.type||""}}class f extends e{constructor(l={}){super(l),this.row=l.row||6}}class m extends e{constructor(l={}){super(l),this.doTranslate=null==l.doTranslate||l.doTranslate}}class O extends e{constructor(l={}){super(l),this.selectionOrientation=l.selectionOrientation||"portrait",this.doTranslate=null==l.doTranslate||l.doTranslate}}}}]);
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.