1import{a as pn,b as mn,c as cn,d as un,e as fn}from"./chunk-I4NZSIX6.js";import"./chunk-XGZ6RP3O.js";import{a as xo}from"./chunk-4D236YCA.js";import"./chunk-MJ6T55ZK.js";import"./chunk-6OBF53FV.js";import"./chunk-IJEB6NGI.js";import"./chunk-BM3EAJQA.js";import"./chunk-2B62N3XJ.js";import{a as Xo}from"./chunk-Q55EFUPI.js";import"./chunk-2PSRB2HX.js";import"./chunk-2TUNR6XF.js";import"./chunk-U4LGCQWQ.js";import"./chunk-YWTGBTGW.js";import"./chunk-NWEAQRRZ.js";import{a as Lo}from"./chunk-PQ5DCGJY.js";import"./chunk-LWUS5HAY.js";import{c as en}from"./chunk-XARHNO6S.js";import"./chunk-YGDEMPP3.js";import"./chunk-MUIIJH24.js";import{a as kt}from"./chunk-3CVIZ3BI.js";import{a as Xi,b as mo,c as sn,d as dn}from"./chunk-JYUDMG5X.js";import{a as Gi,b as Ki,c as Co,d as ho}from"./chunk-C2DD4L3W.js";import{e as an,f as rn,g as _o,h as ln}from"./chunk-SNF5L3YI.js";import{a as Fi}from"./chunk-AIZMV7DB.js";import{a as tn}from"./chunk-HJLMKXFS.js";import"./chunk-QB6J6PPH.js";import{f as Ko}from"./chunk-YOZUVNGL.js";import{a as Zo}from"./chunk-6CPWMBJM.js";import{a as Qo}from"./chunk-NPJZFFUS.js";import{a as $o}from"./chunk-CDQSYR5G.js";import{a as so}from"./chunk-2M4MQRSJ.js";import"./chunk-HHCCG76S.js";import"./chunk-YTT7CVRB.js";import"./chunk-KGYW37G4.js";import"./chunk-332WSWJR.js";import{a as po}from"./chunk-HK57VIIW.js";import{a as Bt}from"./chunk-7EX4IX6Y.js";import{a as Uo}from"./chunk-OQALPJAQ.js";import"./chunk-AAM4SBWQ.js";import"./chunk-HNA2X73R.js";import{e as lo,f as Ri,i as Ho}from"./chunk-QY5BYG54.js";import"./chunk-JV54QITB.js";import{a as on,b as nn,f as yi}from"./chunk-3JX5BQ7I.js";import{a as Oi}from"./chunk-EGFBP5DZ.js";import{a as gi}from"./chunk-IE73IGRV.js";import{a as _i}from"./chunk-Q67WLHXZ.js";import"./chunk-SEXQTQLU.js";import{a as Ui}from"./chunk-V5RFXGKQ.js";import"./chunk-HTZKJUEX.js";import{a as Bi}from"./chunk-KUP5NIYO.js";import{a as Jo}from"./chunk-Z5HWP67N.js";import{a as ro}from"./chunk-UA67LKZU.js";import{a as Yo}from"./chunk-XNDBSMZL.js";import"./chunk-YN3LK6TN.js";import{a as St}from"./chunk-DNIN5ZJX.js";import{r as eo}from"./chunk-KV4IOKEI.js";import"./chunk-CHAIIRIE.js";import"./chunk-X6YHEMIY.js";import"./chunk-TUHYM6FZ.js";import{$ as jt,$a as ze,$b as bt,A as ae,Ab as rt,Ba as we,Bb as lt,Ca as Me,Da as De,Db as st,E as re,Eb as no,F as Ro,Fa as Pe,Fb as dt,Ga as oo,Gb as pt,Ha as Te,Ia as Vi,Ib as mt,Ja as Se,Ka as Ae,Kb as ct,La as Bo,Lb as pi,M as Oo,Ma as Ee,Mb as ut,N as le,Na as Ve,Nb as ft,Oa as Ht,Ob as yt,Pa as Le,Q as se,Qa as ke,Qb as Ct,R as de,Ra as Re,Rb as $t,Sa as Oe,Sb as ht,Ua as Be,Ub as _t,Va as Ge,Vb as ao,W as zt,Wa as Fe,Wb as xt,Xb as ei,Y as qt,Ya as Ne,Yb as gt,Zb as vt,_a as We,_b as ti,ab as qe,bb as je,c as It,cb as He,d as Yt,db as Go,e as te,eb as Ue,f as Rt,fa as pe,g as ie,gb as Ze,hb as Qe,ia as me,ib as Fo,j as to,ja as ce,jb as Ke,k as di,ka as ue,kb as Et,l as oe,la as fe,lb as Xe,m as io,ma as wt,mb as Je,na as ye,oa as Ce,ob as Ye,pa as he,pb as $e,qa as _e,qb as et,ra as Ei,rb as tt,sa as xe,tb as it,ua as ge,ub as Vt,v as ko,va as ve,vb as ot,wa as Mt,wb as Ut,xa as be,xb as nt,y as ne,ya as xi,yb as at,za as Ie}from"./chunk-CSP5YOOK.js";import{J as mi,M as qo,N as Zi,S as Qi,d as No,e as Li,f as Pt,g as Wo,h as zo,ta as jo,ua as ki,va as Ot}from"./chunk-XFXITKE5.js";import{B as Ai,Fa as Vo}from"./chunk-FLFZ7VN3.js";import{$b as F,$c as Hi,$d as O,Ae as Ao,Cd as r,Dd as s,Ec as Qt,Ed as y,Fc as Gt,Fd as ui,Gc as Q,Gd as fi,Id as M,Ie as Dt,Jd as _,Je as Ti,Kd as c,Ke as J,Mc as Mi,Nc as C,Nd as W,Ne as si,Oc as h,Od as w,Pc as k,Pd as hi,Qc as U,Rb as Lt,Se as Y,Tc as Yi,Td as z,Uc as Po,Ud as q,Vc as Zt,Vd as j,Wd as Pi,Xc as Nt,Xd as $i,Zd as f,_c as To,_d as T,ae as bi,cc as qi,dd as n,ed as E,ee as v,fc as ji,fe as b,ge as I,he as li,hf as Si,ie as X,je as P,jf as Wt,kd as Ci,kf as Eo,ld as Di,md as yo,nd as K,ne as So,od as u,oe as Xt,qc as Z,qe as Jt,qf as $,td as a,uh as ee,vc as N,xd as Kt,xh as At}from"./chunk-ZDEXLJGG.js";import{a as fo,k as R}from"./chunk-XU43R4EC.js";var jn=["AddPhoneInformationGroup"],Hn=["countryPhoneNumberCode"],Un=["EditPhoneInformationGroup"],Zn=()=>({id:"elementId",class:"popup-outer tooltip-wrapper popup-scroll-inner w-900"}),Qn=()=>({id:"elementId",class:"popup-outer tooltip-wrapper w-900"}),yn=()=>({"aria-label":"Country Code"}),Cn=()=>({"aria-label":"Phone Number"}),hn=()=>({"aria-label":"Phone Type"}),go=()=>({"aria-label":"checked"});function Kn(i,p){if(i&1){let e=M();r(0,"a",18),_("click",function(){C(e);let t=c();return h(t.editPhoneInformationPopupEvent())}),r(1,"span"),k(),r(2,"svg",19),y(3,"path",49),s()(),f(4," Edit "),s()}}function Xn(i,p){i&1&&(r(0,"div",50)(1,"p"),f(2,"There are no Phone added yet."),s()())}function Jn(i,p){i&1&&(r(0,"span",59),f(1,"Primary"),s())}function Yn(i,p){i&1&&(r(0,"span",59),f(1,"Billing"),s())}function $n(i,p){i&1&&(r(0,"span",59),f(1,"Public"),s())}function ea(i,p){if(i&1&&(r(0,"div",53)(1,"div",54)(2,"span"),f(3),s()(),r(4,"div",55)(5,"a",56),f(6),s()(),r(7,"div",57),u(8,Jn,2,0,"span",58)(9,Yn,2,0,"span",58)(10,$n,2,0,"span",58),s()()),i&2){let e=p.$implicit,o=c(2);n(3),T(e.phoneType),n(2),hi("href","tel:",e.countryPhoneNumberCode,"",o.formatPhoneNumber(e.phoneNumber),"",Hi),n(),bi(" ",e.countryPhoneNumberCode," ",o.formatPhoneNumber(e.phoneNumber)," "),n(2),a("ngIf",e.isPrimary),n(),a("ngIf",e.isBilling),n(),a("ngIf",e.isPublic)}}function ta(i,p){if(i&1&&(r(0,"div",51),u(1,ea,11,9,"div",52),s()),i&2){let e=c();n(),a("ngForOf",e.companyPhonesDisplay)}}function ia(i,p){if(i&1&&y(0,"dxi-validation-rule",74),i&2){let e=c().$implicit,o=c(2);w("message","",o.getPhonePropertyLabelForValidation("CountryPhoneNumberCode",e.parentPhoneTypeID)," is required")}}function oa(i,p){if(i&1&&y(0,"dxi-validation-rule",74),i&2){let e=c().$implicit,o=c(2);w("message","",o.getPhonePropertyLabelForValidation("PhoneNumber",e.parentPhoneTypeID)," is required")}}function na(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(2).$implicit,o=c(2);n(),O(" ",o.phoneTooltip("PhoneNumber",e.phoneType)," ")}}function aa(i,p){if(i&1&&(r(0,"div",75),y(1,"i",76),r(2,"dx-tooltip",77),u(3,na,2,1,"div",78),s()()),i&2){let e=c().index;
1n(),w("id","addcompanyPhoneNumber",e,""),n(),w("target","#addcompanyPhoneNumber",e,""),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content")}}function ra(i,p){if(i&1&&y(0,"dxi-validation-rule",74),i&2){let e=c().$implicit,o=c(2);w("message","",o.getPhonePropertyLabelForValidation("PhoneTypeID",e.phoneTypeID)," is required")}}function la(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(2).$implicit,o=c(2);n(),O(" ",o.phoneTooltip("PhoneTypeID",e.phoneType)," ")}}function sa(i,p){if(i&1&&(r(0,"div",75),y(1,"i",76),r(2,"dx-tooltip",77),u(3,la,2,1,"div",78),s()()),i&2){let e=c().index;n(),w("id","addcompanyPhoneTypeID",e,""),n(),w("target","#addcompanyPhoneTypeID",e,""),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content")}}function da(i,p){if(i&1){let e=M();r(0,"div",66)(1,"input",67),_("click",function(t){C(e);let l=c().$implicit,m=c(2);return h(m.handleCompanyPrimaryPhoneValueChange(t,l.parentPhoneTypeID))}),s(),r(2,"label",68)(3,"div",69),f(4),s()()()}if(i&2){let e=c(),o=e.$implicit,t=e.index,l=c(2);n(),w("id","chkeditphone",t,""),w("name","phonetrades",t,""),a("checked",o.isPrimary),n(),w("for","chkeditphone",t,""),n(2),O(" ",l.getPhonePropertyLabel("isPrimary",o.parentPhoneTypeID)," ")}}function pa(i,p){if(i&1){let e=M();r(0,"div",32)(1,"div",33)(2,"div",61)(3,"dx-select-box",62),I("valueChange",function(t){let l=C(e).$implicit;return b(l.countryPhoneNumberCode,t)||(l.countryPhoneNumberCode=t),h(t)}),r(4,"dx-validator"),u(5,ia,1,2,"dxi-validation-rule",36),s()(),r(6,"dx-text-box",63),I("valueChange",function(t){let l=C(e).$implicit;return b(l.phoneNumber,t)||(l.phoneNumber=t),h(t)}),_("onValueChanged",function(){let t=C(e).$implicit,l=c(2);return h(l.onPhoneTypeChanged(t))}),r(7,"dx-validator"),u(8,oa,1,2,"dxi-validation-rule",36),s()(),u(9,aa,4,6,"div",38),s()(),r(10,"div",39)(11,"div",40)(12,"dx-select-box",64),I("valueChange",function(t){let l=C(e).$implicit;return b(l.parentPhoneTypeID,t)||(l.parentPhoneTypeID=t),h(t)}),r(13,"dx-validator"),u(14,ra,1,2,"dxi-validation-rule",36),s()(),u(15,sa,4,6,"div",38),s(),r(16,"div",42),u(17,da,5,8,"div",65),r(18,"div",66)(19,"input",67),_("click",function(t){let l=C(e).$implicit,m=c(2);return h(m.handleCompanyBillingPhoneValueChange(t,l.parentPhoneTypeID))}),s(),r(20,"label",68)(21,"div",69),f(22),s()()(),r(23,"div",66)(24,"input",67),_("click",function(t){let l=C(e).$implicit,m=c(2);return h(m.handleCompanyPublicPhoneValueChange(t,l.parentPhoneTypeID))}),s(),r(25,"label",68)(26,"div",69),f(27),s()()()()(),r(28,"div",70)(29,"a",71),_("click",function(){let t=C(e).$implicit,l=c(2);return h(l.onDeletePhone(t))}),k(),r(30,"svg",72),y(31,"path",73),s()()()()}if(i&2){let e=p.$implicit,o=p.index,t=c(2);n(3),a("labelMode",t.labelMode)("label",t.getPhonePropertyLabel("C
1ountryPhoneNumberCode",e.parentPhoneTypeID))("visible",t.checkPhonePropertyVisible("CountryPhoneNumberCode",e.parentPhoneTypeID))("dataSource",t.country)("searchEnabled",!0),v("value",e.countryPhoneNumberCode),a("inputAttr",P(45,yn))("ngClass",t.isPhonePropertyReadonly("CountryPhoneNumberCode",e.parentPhoneTypeID)?"disabledDiv":""),n(2),a("ngIf",t.isPhoneFieldRequired("CountryPhoneNumberCode",e.phoneType)&&!t.isPhonePropertyReadonly("CountryPhoneNumberCode",e.parentPhoneTypeID)),n(),a("labelMode",t.labelMode)("label",t.getPhonePropertyLabel("PhoneNumber",e.parentPhoneTypeID))("visible",t.checkPhonePropertyVisible("PhoneNumber",e.parentPhoneTypeID)),v("value",e.phoneNumber),a("mask",t.phoneMask)("ngClass",t.isPhonePropertyReadonly("PhoneNumber",e.phoneTypeID)?"disabledDiv":"")("inputAttr",P(46,Cn)),n(2),a("ngIf",t.isPhoneFieldRequired("PhoneNumber",e.phoneType)&&!t.isPhonePropertyReadonly("PhoneNumber",e.parentPhoneTypeID)),n(),a("ngIf",t.isPhoneTooltipVisible("PhoneNumber",e.phoneType)),n(3),a("showClearButton",!0)("labelMode",t.labelMode)("label",t.getPhonePropertyLabel("PhoneTypeID",e.parentPhoneTypeID))("visible",t.checkPhonePropertyVisible("PhoneTypeID",e.parentPhoneTypeID))("items",t.phoneType),v("value",e.parentPhoneTypeID),a("inputAttr",P(47,hn))("ngClass",t.isPhonePropertyReadonly("PhoneTypeID",e.parentPhoneTypeID)?"disabledDiv":""),n(2),a("ngIf",t.isPhoneFieldRequired("PhoneTypeID",e.phoneType)&&!t.isPhonePropertyReadonly("PhoneTypeID",e.phoneTypeID)),n(),a("ngIf",t.isPhoneTooltipVisible("PhoneTypeID",e.phoneType)),n(2),a("ngIf",t.checkPhonePropertyVisible("IsPrimary",e.parentPhoneTypeID)),n(2),w("id","chkeditphoneBilling",o,""),w("name","phonetradesBilling",o,""),a("checked",e.isBilling),n(),w("for","chkeditphoneBilling",o,""),n(2),O(" ",t.getPhonePropertyLabel("IsBilling",e.parentPhoneTypeID)," "),n(2),w("id","chkeditphonePublic",o,""),w("name","phonetradesPublic",o,""),a("checked",e.isPublic),n(),w("for","chkeditphonePublic",o,""),n(2),O(" ",t.getPhonePropertyLabel("IsPublic",e.parentPhoneTypeID)," ")}}function ma(i,p){if(i&1&&(r(0,"div",31),u(1,pa,32,48,"div",60),s()),i&2){let e=c();n(),a("ngForOf",e.getCompanyPhones())}}function ca(i,p){if(i&1&&y(0,"dxi-validation-rule",74),i&2){let e=c();w("message","",e.getPhonePropertyLabelForValidation("CountryPhoneNumberCode",e.addCompanyPhone.phoneTypeID)," is required")}}function ua(i,p){if(i&1&&y(0,"dxi-validation-rule",74),i&2){let e=c();w("message","",e.getPhonePropertyLabelForValidation("PhoneNumber",e.addCompanyPhone.phoneTypeID)," is required")}}function fa(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(2);n(),O(" ",e.phoneTooltip("PhoneNumber",e.addCompanyPhone.phoneType)," ")}}function ya(i,p){i&1&&(r(0,"div",75),y(1,"i",79),r(2,"dx-tooltip",80),u(3,fa,2,1,"div",78),s()()),i&2&&(n(2),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content"))}function Ca(i,p){if(i&1&&y(0,"dxi-validation-rule",74),i&2){let e=c();w("message","",e.getPhonePropertyLabelForValidation("PhoneTypeID",e.addCompanyPhone.phoneTypeID)," is required")}}function ha(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(2);n(),O(" ",e.phoneTooltip("PhoneTypeID",e.addCompanyPhone.phoneType)," ")}}function _a(i,p){i&1&&(r(0,"div",75),y(1,"i",81),r(2,"dx-tooltip",82),u(3,ha,2,1,"div",78),s()()),i&2&&(n(2),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content"))}var _n=(()=>{class i extends ee{constructor(e,o,t){super(),this.companyService=e,this.webStorageService=o,this.memberPermissionService=t,this.phoneType=[],this.companyPhones=[],this.companyPhonesDisplay=[],this.companyPageControls=[],this.country=[],this.getCompanyDetails=new Nt,this.addCompanyPhone=mo,this.isCompanyPhoneEditMode=!0,this.selectedCompanyPhone=new Xi,this.removePhonePopup=!1,this.formData={},this.stylingMode="outlined",this.labelMode="floating",this.phoneMask="(000)000-0000",this.removePhoneAction="delete",this.currentUser=o.getCurrentmemberToken()}checkCompanyLevelPermission(e){return this.memberPermissionService.hasPermission(!0,e)}ngOnInit(){return R(this,null,function*(){this.loadCompanyPhonesDisplayData()})}ngOnChanges(){this.loadCompanyPhonesDisplayData()}loadCompanyPhonesDisplayData(){this.companyPhonesDisplay=this.companyPhones}togglePhoneInformation(){this.phoneInformationCollapseExpand=!this.phoneInformationCollapseExpand}editPhoneInformationPopupEvent(){this.editPhoneInformationPopup=!0}
1checkPhonePropertyVisible(e,o){let t=o==null||o==null||o==0?this.phoneType:this.phoneType.filter(l=>l.phoneTypeID==o);return t.length>0&&this.companyPageControls.length>0?this.companyPageControls.filter(m=>m.sourceColumnName!=null&&m.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&m.pageCategory.toLocaleLowerCase()==t[0].code.toLocaleLowerCase()&&m.isVisible==!0).length>0:!1}addPhoneInformationPopupEvent(e){this.addCompanyPhone=new Xi,this.isCompanyPhoneEditMode=e,this.AddPhoneInformationGroup.instance.reset(),this.checkPhonePropertyVisible("countryPhoneNumberCode",this.addCompanyPhone.phoneTypeID)&&(this.addCompanyPhone.countryPhoneNumberCode=this.country.filter(o=>o.countryCode=="US")[0].countryPhoneNumberCode,this.countryPhoneNumberCodeElement.value=this.addCompanyPhone.countryPhoneNumberCode),this.companyPhonesDisplay.find(o=>o.isPrimary)||(this.addCompanyPhone.isPrimary=!0),this.addPhoneInformationPopup=!0}closePhonePopup(){this.editPhoneInformationPopup=!1}closeAddPhonePopup({validationGroup:e,event:o}){this.addPhoneInformationPopup=!1}getCompanyPhones(){return this.companyPhones.filter(e=>e.isActive)}checkPhoneFieldRequired(e,o){let t=o==null||o==null||o==0?this.phoneType:this.phoneType.filter(m=>m.phoneTypeID==o),l=!1;if(t.length>0&&this.companyPageControls.length>0){let m=this.companyPageControls.find(d=>d.sourceColumnName!=null&&d.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&d.pageCategory.toLocaleLowerCase()==t[0].code.toLocaleLowerCase());m&&(l=m.isRequired)}return l}getPhonePropertyLabel(e,o){let t=o==null||o==null||o==0?this.phoneType:this.phoneType.filter(l=>l.phoneTypeID==o);if(t.length>0&&this.companyPageControls.length>0){let l=this.companyPageControls.filter(m=>m.sourceColumnName!=null&&m.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&m.pageCategory.toLocaleLowerCase()==t[0].code.toLocaleLowerCase());return l.length>0?this.checkPhoneFieldRequired(e,o)?l[0].fieldCaption+" *":l[0].fieldCaption:""}else return""}getPhonePropertyLabelForValidation(e,o){let t=o==null||o==null||o==0?this.phoneType:this.phoneType.filter(l=>l.phoneTypeID==o);if(t.length>0&&this.companyPageControls.length>0){let l=this.companyPageControls.filter(m=>m.sourceColumnName!=null&&m.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&m.pageCategory.toLocaleLowerCase()==t[0].code.toLocaleLowerCase());return l.length>0?l[0].fieldCaption:""}else return""}isPhonePropertyReadonly(e,o){let t=o==null||o==null||o==0?this.phoneType:this.phoneType.filter(l=>l.phoneTypeID==o);return t.length>0&&this.companyPageControls.length>0?this.companyPageControls.filter(m=>m.sourceColumnName!=null&&m.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&m.pageCategory.toLocaleLowerCase()==t[0].code.toLocaleLowerCase()&&m.isReadOnly==!1).length>0:!1}isPhoneFieldRequired(e,o){let t=o==""||o==null?this.phoneType:this.phoneType.filter(m=>m.phoneType.toLowerCase()==o.toLowerCase()),l=!1;if(t!=null&&t.length>0){let m=this.companyPageControls.find(d=>d.sourceColumnName!=null&&d.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&d.pageCategory.toLocaleLowerCase()==t[0].code.toLocaleLowerCase());m&&(l=m.isRequired)}return l}onPhoneTypeChanged(e){if(e&&e.phoneTypeID){let o=this.phoneType.find(t=>t.phoneTypeID==e.phoneTypeID);o&&(e.phoneType=o.phoneType)}}isPhoneTooltipVisible(e,o){let t=o==""||o==null?this.phoneType:this.phoneType.filter(l=>l.phoneType.toLowerCase()==o.toLowerCase());return t!=null&&t.length>0?this.companyPageControls.filter(m=>m.sourceColumnName!=null&&m.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&m.pageCategory.toLocaleLowerCase()==t[0].code.toLocaleLowerCase()&&m.isVisible==!0&&m.formControlTooltip!=null&&m.formControlTooltip!=""&&m.formControlTooltip!="").length>0:!1}phoneTooltip(e,o){let t=o==""||o==null?this.phoneType:this.phoneType.filter(l=>l.phoneType.toLowerCase()==o.toLowerCase());if(t!=null&&t.length>0){let l=this.companyPageControls.filter(m=>m.sourceColumnName!=null&&m.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&m.pageCategory.toLocaleLowerCase()==t[0].code.toLocaleLowerCase());return l.length>0?l[0].formControlTooltip:""}else return""}handleCompanyPublicPhoneValueChange(e,o){e.target.checked?(this.companyPhones.forEac
1h(t=>{t.isPublic=!1}),this.companyPhones.forEach(t=>{o==t.phoneTypeID?t.isPublic=!0:t.isPublic=!1})):this.companyPhones.forEach(t=>{o==t.phoneTypeID&&(t.isPublic=!1)})}handleCompanyBillingPhoneValueChange(e,o){e.target.checked?(this.companyPhones.forEach(t=>{t.isBilling=!1}),this.companyPhones.forEach(t=>{o==t.phoneTypeID?t.isBilling=!0:t.isBilling=!1})):this.companyPhones.forEach(t=>{o==t.phoneTypeID&&(t.isBilling=!1)})}handleCompanyPrimaryPhoneValueChange(e,o){e.target.checked?(this.companyPhones.forEach(t=>{t.isPrimary=!1}),this.companyPhones.forEach(t=>{o==t.phoneTypeID?t.isPrimary=!0:t.isPrimary=!1})):this.companyPhones.forEach(t=>{o==t.phoneTypeID&&(t.isPrimary=!1)})}onDeletePhone(e){this.selectedCompanyPhone=e,this.removePhonePopup=!0}onEditPhoneFormSubmit(t){return R(this,arguments,function*({validationGroup:e,event:o}){if(!this.EditPhoneInformationGroup.instance.validate().isValid)return;let m=!1,d;if(this.companyPhones!=null){if(this.companyPhones.find(x=>x.isPrimary)==null)if(this.companyPhones.length>1){this.showErrorMessage("Please assign primary phone.");return}else{let x=this.companyPhones[0];this.companyPhones.filter(G=>{G.phoneId==x.phoneId&&(G.isPrimary=!0)})}let L=this.companyService.UpdateCompanyPhone(this.companyPhones),V=yield F(L);V&&V.isSuccess?(this.loading=!1,this.showSuccessMessage("Company phone numbers have been updated successfully."),this.getCompanyDetails.emit(),this.companyPhones=this.companyInfo.companyPhones.filter(x=>x.isActive),this.companyPhonesDisplay=this.companyInfo.companyPhones.filter(x=>x.isActive),this.closePhonePopup()):(this.loading=!1,this.showErrorMessage(V.message))}})}onAddPhoneformSubmit(l,m){return R(this,arguments,function*(e,{validationGroup:o,event:t}){if(!this.AddPhoneInformationGroup.instance.validate().isValid)return;let A=!1,L;if(this.addCompanyPhone!=null){this.addCompanyPhone.phoneTypeID>0&&(this.addCompanyPhone.parentPhoneTypeID=this.addCompanyPhone.phoneTypeID,this.addCompanyPhone.phoneType=this.phoneType.filter(B=>B.phoneTypeID==this.addCompanyPhone.phoneTypeID)[0].phoneType);let V=!1;if(this.companyPhones.forEach(B=>{if(!V){if(this.addCompanyPhone.isBilling){let H=this.companyPhones.filter(Tt=>Tt.isBilling==!0&&Tt.rowno!=this.addCompanyPhone.rowno).length>0}if(this.addCompanyPhone.isPublic){let H=this.companyPhones.filter(Tt=>Tt.isPublic==!0&&Tt.rowno!=this.addCompanyPhone.rowno).length>0}}}),V)return;if(this.companyPhonesDisplay.find(B=>B.isPrimary)==null?this.addCompanyPhone.isPrimary=!0:this.addCompanyPhone.isPrimary&&this.isCompanyPhoneEditMode&&this.companyPhonesDisplay.forEach(B=>{B.isPrimary=!1}),this.companyPhonesDisplay.find(B=>B.isBilling)==null||this.addCompanyPhone.isBilling&&this.isCompanyPhoneEditMode&&this.companyPhonesDisplay.forEach(B=>{B.isBilling=!1}),this.companyPhonesDisplay.find(B=>B.isPublic)==null||this.addCompanyPhone.isPublic&&this.isCompanyPhoneEditMode&&this.companyPhonesDisplay.forEach(B=>{B.isPublic=!1}),this.addCompanyPhone.companyId=this.companyInfo.companyId,this.addCompanyPhone.modifiedByUserId=this.currentUser.userId,this.isCompanyPhoneEditMode)this.companyPhonesDisplay.push(this.addCompanyPhone),e?(this.addCompanyPhone=mo,this.addCompanyPhone=new Xi,this.checkPhonePropertyVisible("countryPhoneNumberCode",this.addCompanyPhone.phoneTypeID)&&(this.addCompanyPhone.countryPhoneNumberCode=this.country.find(B=>B.countryCode=="US").countryPhoneNumberCode)):this.addPhoneInformationPopup=!1;else{let B=this.companyService.AddCompanyPhone(this.addCompanyPhone),H=yield F(B);H&&H.isSuccess?(this.loading=!1,this.showSuccessMessage("Company phone number has been added successfully."),this.getCompanyDetails.emit(),e?(this.addCompanyPhone=mo,this.addCompanyPhone=new Xi,this.AddPhoneInformationGroup.instance.reset(),this.checkPhonePropertyVisible("countryPhoneNumberCode",this.addCompanyPhone.phoneTypeID)&&(this.addCompanyPhone.countryPhoneNumberCode=this.country.find(Tt=>Tt.countryCode=="US").countryPhoneNumberCode)):(this.addPhoneInformationPopup=!1,this.getCompanyDetails.emit())):(this.loading=!1,this.showErrorMessage(H.message))}this.resetPhoneRowno()}})}resetPhoneRowno(){let e=0;
1this.companyPhones.forEach(o=>{o.rowno=e+1,e=e+1})}removePhone(e){if(this.companyPhones.find(t=>t.phoneId==e&&t.isPrimary&&!t.isActive)&&this.companyPhones.length>1){this.showErrorMessage("This is the primary phone. To delete this phone, please assign primary phone to another phone.");return}this.companyPhones.filter(t=>t.phoneId==e&&t.companyPhoneId!=0).length>0?(this.companyPhones.filter(t=>t.phoneId==e).map(t=>{t.isActive=!1}),this.companyPhonesDisplay=this.companyPhones.filter(t=>t.phoneId!=e)):this.companyPhonesDisplay=this.companyPhones.filter(t=>t.phoneId!=e)}static{this.\u0275fac=function(o){return new(o||i)(E(Bt),E(At),E(kt))}}static{this.\u0275cmp=Q({type:i,selectors:[["app-company-phone-info"]],viewQuery:function(o,t){if(o&1&&(z(jn,5),z(Hn,5),z(Un,5)),o&2){let l;q(l=j())&&(t.AddPhoneInformationGroup=l.first),q(l=j())&&(t.countryPhoneNumberCodeElement=l.first),q(l=j())&&(t.EditPhoneInformationGroup=l.first)}},inputs:{phoneType:"phoneType",companyPhones:"companyPhones",companyPageControls:"companyPageControls",country:"country",companyInfo:"companyInfo"},outputs:{getCompanyDetails:"getCompanyDetails"},standalone:!0,features:[K,Mi,X],decls:75,vars:67,consts:[["EditPhoneInformationGroup",""],["AddPhoneInformationGroup",""],["countryPhoneNumberCode",""],[1,"scroll-outer"],[1,"information-block",3,"ngClass"],[1,"card-outer"],[1,"card-header"],[1,"card-header__title"],[1,"card-header__edit-collapse"],["class","edits","href","javascript:void(0)",3,"click",4,"ngIf"],["href","javascript:void(0)",1,"collapse",3,"click"],["width","14","height","9","viewBox","0 0 14 9","fill","none","xmlns","http://www.w3.org/2000/svg"],["_ngcontent-uhr-c405","","d","M1 7.5L7 1.5L13 7.5","stroke","#024079","stroke-width","1.8","stroke-linecap","round","stroke-linejoin","round"],["class","empty-card",4,"ngIf"],[1,"card-content"],["class","address-information-box",4,"ngIf"],["container",".dx-viewport",3,"visibleChange","showTitle","dragEnabled","hideOnOutsideClick","visible","wrapperAttr"],[1,"dx-popup-header"],["href","javascript:void(0)",1,"edits",3,"click"],["width","12","height","12","viewBox","0 0 12 12","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M5.94975 0.999959V10.8995M1 5.94971H10.8995","stroke","white","stroke-width","1.8","stroke-linecap","round","stroke-linejoin","round"],[1,"dx-popup-content-block","edit-phone-popup-content"],[1,"form-outer"],["id","form",3,"formData"],[1,"scroll-outer","contact-popup"],["class","address-popup-outer",4,"ngIf"],[1,"dx-popup-footer"],["text","Cancel","stylingMode","contained","type","normal",1,"btn","btn--cancel",3,"onClick"],["text","Save","stylingMode","contained","type","default",1,"btn","btn--primary",3,"onClick"],[1,"dx-popup-content-block"],[1,"scroll-outer","contact-popup","scroll-not-overflow"],[1,"address-popup-outer"],[1,"address-popup-outer__content"],[1,"address-popup-outer__left"],[1,"dx-field","full-width","phone-field-group","add-phone-popup-field"],["displayExpr","countryPhoneNumberCode","valueExpr","countryPhoneNumberCode","placeholder","Select",1,"countries-code",3,"valueChange","labelMode","label","visible","dataSource","searchEnabled","value","inputAttr"],["type","required",3,"message",4,"ngIf"],["placeholder","Number","showMaskMode","onFocus",1,"countries-number",3,"valueChange","labelMode","label","visible","value","mask","inputAttr"],["class","tooltip-info",4,"ngIf"],[1,"address-popup-outer__right"],[1,"dx-field"],["displayExpr","phoneType","valueExpr","phoneTypeID","placeholder","Select",1,"select-box","recordtype",3,"onValueChanged","valueChange","showClearButton","labelMode","label","visible","items","value","inputAttr"],[1,"full-width","checkbox-block"],[1,"dx-field-value","checkbox"],[3,"valueChange","value","elementAttr","text","visible"],[3,"valueChange","value","value","elementAttr","text","visible"],["text","Save & Add Another","stylingMode","contained","type","default",1,"btn","btn--primary",3,"onClick"],["text","Save & Close","stylingMode","contained","type","default",1,"btn","btn--primary",3,"onClick"],[3,"visibleChange","save","visible","action","titleText"],["d","M7.84042 3.24301L1.98458 9.09692L1.60167 10.4027L2.8813 10.0328L8.75657 4.15951L7.84042 3.24301ZM8.8395 2.24426L9.75565 3.1601L10.6096 2.30644C10.6703 2.24571 10.7045 2.16335 10.7045 2.07747C10.7045 1.9916 10.6703 1.90924 10.6096 1.84851L10.1509 1.39059C10.0901 1.32988 10.0077 1.29577 9.92184
11.29577C9.83594 1.29577 9.75356 1.32988 9.6928 1.39059L8.84015 2.24426H8.8395ZM11.0677 0.474742L11.5258 0.932666C11.8294 1.23632 12 1.64811 12 2.07747C12 2.50684 11.8294 2.91863 11.5258 3.22228L3.5616 11.1845L0.827412 11.9746C0.715963 12.0068 0.597932 12.0084 0.48564 11.9794C0.373349 11.9503 0.270914 11.8917 0.18903 11.8096C0.107147 11.7274 0.0488165 11.6248 0.0201294 11.5125C-0.00855774 11.4001 -0.00654986 11.2822 0.0259434 11.1709L0.834539 8.41489L8.77795 0.474094C9.08171 0.170532 9.49363 0 9.92314 0C10.3526 0 10.7646 0.170532 11.0683 0.474094L11.0677 0.474742Z","fill","white"],[1,"empty-card"],[1,"address-information-box"],["class","address-information-box__items",4,"ngFor","ngForOf"],[1,"address-information-box__items"],[1,"address-information-box__address-label"],[1,"address-information-box__email-address"],[3,"href"],[1,"address-information-box__address-tag"],["class","badge",4,"ngIf"],[1,"badge"],["class","address-popup-outer__content",4,"ngFor","ngForOf"],[1,"dx-field","full-width","phone-field-group","edit-phone-popup-field"],["displayExpr","countryPhoneNumberCode","valueExpr","countryPhoneNumberCode","placeholder","Select",1,"countries-code",3,"valueChange","labelMode","label","visible","dataSource","searchEnabled","value","inputAttr","ngClass"],["placeholder","Number","showMaskMode","onFocus",1,"countries-number",3,"valueChange","onValueChanged","labelMode","label","visible","value","mask","ngClass","inputAttr"],["displayExpr","phoneType","valueExpr","phoneTypeID","placeholder","Select",1,"select-box","recordtype",3,"valueChange","showClearButton","labelMode","label","visible","items","value","inputAttr","ngClass"],["class","dx-field-value checkbox checkbox-custom",4,"ngIf"],[1,"dx-field-value","checkbox","checkbox-custom"],["type","checkbox","width","20","height","20",3,"click","id","name","checked"],[3,"for"],[1,"client-name-with-id","checkbox-label",2,"color","#3e3e3e !important"],[1,"address-popup-outer__delete"],["href","javascript:void(0)",1,"delete",3,"click"],["width","12","height","14","viewBox","0 0 12 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M4.84615 2.25V2.5H7.15385V2.25C7.15385 1.91848 7.03228 1.60054 6.81589 1.36612C6.5995 1.1317 6.30602 1 6 1C5.69398 1 5.4005 1.1317 5.18411 1.36612C4.96772 1.60054 4.84615 1.91848 4.84615 2.25ZM3.92308 2.5V2.25C3.92308 1.65326 4.1419 1.08097 4.53139 0.65901C4.92089 0.237053 5.44917 0 6 0C6.55083 0 7.07911 0.237053 7.46861 0.65901C7.8581 1.08097 8.07692 1.65326 8.07692 2.25V2.5H11.5385C11.6609 2.5 11.7783 2.55268 11.8648 2.64645C11.9514 2.74021 12 2.86739 12 3C12 3.13261 11.9514 3.25979 11.8648 3.35355C11.7783 3.44732 11.6609 3.5 11.5385 3.5H10.8425L9.96923 11.784C9.90484 12.3941 9.63543 12.9572 9.21238 13.3659C8.78932 13.7746 8.24222 14.0003 7.67538 14H4.32462C3.75778 14.0003 3.21068 13.7746 2.78762 13.3659C2.36457 12.9572 2.09516 12.3941 2.03077 11.784L1.15754 3.5H0.461538C0.339131 3.5 0.221737 3.44732 0.135181 3.35355C0.0486262 3.25979 0 3.13261 0 3C0 2.86739 0.0486262 2.74021 0.135181 2.64645C0.221737 2.55268 0.339131 2.5 0.461538 2.5H3.92308ZM2.94831 11.67C2.98684 12.036 3.14832 12.3738 3.40196 12.619C3.65561 12.8643 3.9837 12.9999 4.32369 13H7.67585C8.01584 12.9999 8.34393 12.8643 8.59758 12.619C8.85122 12.3738 9.0127 12.036 9.05123 11.67L9.91385 3.5H2.08662L2.94831 11.67ZM4.61538 5.25C4.73779 5.25 4.85519 5.30268 4.94174 5.39645C5.0283 5.49021 5.07692 5.61739 5.07692 5.75V10.75C5.07692 10.8826 5.0283 11.0098 4.94174 11.1036C4.85519 11.1973 4.73779 11.25 4.61538 11.25C4.49298 11.25 4.37558 11.1973 4.28903 11.1036C4.20247 11.0098 4.15385 10.8826 4.15385 10.75V5.75C4.15385 5.61739 4.20247 5.49021 4.28903 5.39645C4.37558 5.30268 4.49298 5.25 4.61538 5.25ZM7.84615 5.75C7.84615 5.61739 7.79753 5.4902
11 7.71097 5.39645C7.62442 5.30268 7.50702 5.25 7.38462 5.25C7.26221 5.25 7.14481 5.30268 7.05826 5.39645C6.9717 5.49021 6.92308 5.61739 6.92308 5.75V10.75C6.92308 10.8826 6.9717 11.0098 7.05826 11.1036C7.14481 11.1973 7.26221 11.25 7.38462 11.25C7.50702 11.25 7.62442 11.1973 7.71097 11.1036C7.79753 11.0098 7.84615 10.8826 7.84615 10.75V5.75Z","fill","white"],["type","required",3,"message"],[1,"tooltip-info"],[1,"icon","dx-icon-info",3,"id"],["showEvent","mouseenter","hideEvent","mouseleave",3,"target","hideOnOutsideClick"],[4,"dxTemplate","dxTemplateOf"],["id","PhoneNumber",1,"icon","dx-icon-info"],["target","#PhoneNumber","showEvent","mouseenter","hideEvent","mouseleave",3,"hideOnOutsideClick"],["id","PhoneTypeId",1,"icon","dx-icon-info"],["target","#PhoneTypeId","showEvent","mouseenter","hideEvent","mouseleave",3,"hideOnOutsideClick"]],template:function(o,t){if(o&1){let l=M();r(0,"dx-scroll-view",3)(1,"div",4)(2,"div",5)(3,"div",6)(4,"h2",7),f(5,"Phone Information"),s(),r(6,"div",8),u(7,Kn,5,0,"a",9),r(8,"a",10),_("click",function(){return C(l),h(t.togglePhoneInformation())}),k(),r(9,"svg",11),y(10,"path",12),s()()()(),u(11,Xn,3,0,"div",13),U(),r(12,"div",14),u(13,ta,2,1,"div",15),s()()()(),r(14,"dx-popup",16),I("visibleChange",function(d){return C(l),b(t.editPhoneInformationPopup,d)||(t.editPhoneInformationPopup=d),h(d)}),r(15,"div",17)(16,"h2"),f(17,"Edit Phone Information"),s(),r(18,"a",18),_("click",function(){return C(l),h(t.addPhoneInformationPopupEvent(!0))}),r(19,"span"),k(),r(20,"svg",19),y(21,"path",20),s()(),f(22," Add "),s()(),U(),r(23,"div",21)(24,"form",22)(25,"dx-validation-group",null,0)(27,"dx-form",23)(28,"dxi-item")(29,"dx-scroll-view",24),u(30,ma,2,1,"div",25),s()()()()()(),r(31,"div",26)(32,"dx-button",27),_("onClick",function(){return C(l),h(t.closePhonePopup())}),s(),r(33,"dx-button",28),_("onClick",function(d){return C(l),h(t.onEditPhoneFormSubmit(d))}),s()()(),r(34,"dx-popup",16),I("visibleChange",function(d){return C(l),b(t.addPhoneInformationPopup,d)||(t.addPhoneInformationPopup=d),h(d)}),r(35,"div",17)(36,"h2"),f(37,"Add Phone Information"),s()(),r(38,"div",29)(39,"form",22)(40,"dx-validation-group",null,1)(42,"dx-form",23)(43,"dxi-item")(44,"dx-scroll-view",30)(45,"div",31)(46,"div",32)(47,"div",33)(48,"div",34)(49,"dx-select-box",35,2),I("valueChange",function(d){return C(l),b(t.addCompanyPhone.countryPhoneNumberCode,d)||(t.addCompanyPhone.countryPhoneNumberCode=d),h(d)}),r(51,"dx-validator"),u(52,ca,1,2,"dxi-validation-rule",36),s()(),r(53,"dx-text-box",37),I("valueChange",function(d){return C(l),b(t.addCompanyPhone.phoneNumber,d)||(t.addCompanyPhone.phoneNumber=d),h(d)}),r(54,"dx-validator"),u(55,ua,1,2,"dxi-validation-rule",36),s()(),u(56,ya,4,2,"div",38),s()(),r(57,"div",39)(58,"div",40)(59,"dx-select-box",41),_("onValueChanged",function(){return C(l),h(t.onPhoneTypeChanged(t.addCompanyPhone))}),I("valueChange",function(d){return C(l),b(t.addCompanyPhone.phoneTypeID,d)||(t.addCompanyPhone.phoneTypeID=d),h(d)}),r(60,"dx-validator"),u(61,Ca,1,2,"dxi-validation-rule",36),s()(),u(62,_a,4,2,"div",38),s(),r(63,"div",42)(64,"div",43)(65,"dx-check-box",44),I("valueChange",function(d){return C(l),b(t.addCompanyPhone.isPrimary,d)||(t.addCompanyPhone.isPrimary=d),h(d)}),s()(),r(66,"div",43)(67,"dx-check-box",45),I("valueChange",function(d){return C(l),b(t.addCompanyPhone.isBilling,d)||(t.addCompanyPhone.isBilling=d),h(d)}),s()(),r(68,"div",43)(69,"dx-check-box",44),I("valueChange",function(d){return C(l),b(t.addCompanyPhone.isPublic,d)||(t.addCompanyPhone.isPublic=d),h(d)}),s()()()()()()()()()()()(),r(70,"div",26)(71,"dx-button",27),_("onClick",function(d){return C(l),h(t.closeAddPhonePopup(d))}),s(),r(72,"dx-button",46),_("onClick",function(d){return C(l),h(t.onAddPhoneformSubmit(!0,d))}),s(),r(73,"dx-button",47),_("onClick",function(d){return C(l),h(t.onAddPhoneformSubmit(!1,d))}),s()()(),r(74,"confirm-popup",48),I("visibleChange",function(d){return C(l),b(t.removePhonePopup,d)||(t.removePhonePopup=d),h(d)}),_("save",function(){return C(l),h(t.removePhone(t.selectedCompanyPhone.phoneId))}),s()}o&2&&(n(),a("ngClass",t.phoneInformationCollapseExpand?"collapse":"expand"),n(6),a("ngIf",t.checkCompanyLevelPermission("Update Company Information")&&t.checkCompanyLevelPermission("Update Phone Information")),n(4),a("ngIf",!t.loading&&(!t.companyPhonesDisplay||(t.companyPhonesDisplay==null?null:t.companyPhonesDisplay.length)==0)),n(2),a("ngIf",t.companyPhonesDisplay!=null&&(t.companyPhonesDisplay==null?null:t.companyPhonesDisplay.length)>0),n(),a("showTitle",!1)("dragEnabled",!1)("hideOnOutsideClick",!1),v("visible",t.editPhoneInformationPopup),a("wrapperAttr",P(59,Zn)),n(13),a("formData",t.formData),n(3),a("ngIf",t.companyPhones.length>0),n(4),a("showTitle",!1)("dragEnabled",!1)("hideOnOutsideClick",!1),v("visible",t.addPhoneInformationPopup),a("wrapperAttr",P(60,Qn)),n(8),a("formData",t.formData),n(7),a("labelMode",t.labelMode)("label",t.getPhonePropertyLabel("C
1ountryPhoneNumberCode",t.addCompanyPhone.phoneTypeID))("visible",t.checkPhonePropertyVisible("CountryPhoneNumberCode",t.addCompanyPhone.phoneTypeID))("dataSource",t.country)("searchEnabled",!0),v("value",t.addCompanyPhone.countryPhoneNumberCode),a("inputAttr",P(61,yn)),n(3),a("ngIf",t.isPhoneFieldRequired("CountryPhoneNumberCode",t.addCompanyPhone.phoneType)),n(),a("labelMode",t.labelMode)("label",t.getPhonePropertyLabel("PhoneNumber",t.addCompanyPhone.phoneTypeID))("visible",t.checkPhonePropertyVisible("PhoneNumber",t.addCompanyPhone.phoneTypeID)),v("value",t.addCompanyPhone.phoneNumber),a("mask",t.phoneMask)("inputAttr",P(62,Cn)),n(2),a("ngIf",t.isPhoneFieldRequired("PhoneNumber",t.addCompanyPhone.phoneType)),n(),a("ngIf",t.isPhoneTooltipVisible("PhoneNumber",t.addCompanyPhone.phoneType)),n(3),a("showClearButton",!0)("labelMode",t.labelMode)("label",t.getPhonePropertyLabel("PhoneTypeID",t.addCompanyPhone.phoneTypeID))("visible",t.checkPhonePropertyVisible("PhoneTypeID",t.addCompanyPhone.phoneTypeID))("items",t.phoneType),v("value",t.addCompanyPhone.phoneTypeID),a("inputAttr",P(63,hn)),n(2),a("ngIf",t.isPhoneFieldRequired("PhoneTypeID",t.addCompanyPhone.phoneType)),n(),a("ngIf",t.isPhoneTooltipVisible("PhoneTypeID",t.addCompanyPhone.phoneType)),n(3),v("value",t.addCompanyPhone.isPrimary),a("elementAttr",P(64,go))("text",t.getPhonePropertyLabel("IsPrimary",t.addCompanyPhone.phoneTypeID))("visible",t.checkPhonePropertyVisible("IsPrimary",t.addCompanyPhone.phoneTypeID)),n(2),a("value",!1),v("value",t.addCompanyPhone.isBilling),a("elementAttr",P(65,go))("text",t.getPhonePropertyLabel("IsBilling",t.addCompanyPhone.phoneTypeID))("visible",t.checkPhonePropertyVisible("IsBilling",t.addCompanyPhone.phoneTypeID)),n(2),v("value",t.addCompanyPhone.isPublic),a("elementAttr",P(66,go))("text",t.getPhonePropertyLabel("IsPublic",t.addCompanyPhone.phoneTypeID))("visible",t.checkPhonePropertyVisible("IsPublic",t.addCompanyPhone.phoneTypeID)),n(5),W("action",t.removePhoneAction),w("titleText","",t.selectedCompanyPhone==null?null:t.selectedCompanyPhone.phoneType," phone"),v("visible",t.removePhonePopup))},dependencies:[Y,Dt,Ti,J,$,pe,jt,zt,qt,gi,se,Rt,It,de,me,ce,ue,fe,ye,wt,Ce,he,_e,xe,Ei,ge,ve,be,Yt,Ie,we,Me,De,Pe,Te,Se,Ae,Ee,Ve,Le,Ht,ke,Re,Oe,Be,Ge,Fe,Ne,We,ze,qe,je,He,Ue,Ze,Qe,Ke,Xe,Et,Je,Ye,$e,et,tt,it,ot,Vt,nt,Ut,at,rt,lt,st,dt,pt,mt,ct,ut,pi,ft,yt,Ct,ht,$t,_t,gt,ei,vt,bt,ti,xt,oe,le,re,ae,ne,ie,te],styles:['.address-information-box[_ngcontent-%COMP%]{width:100%;-ms-display:grid;-webkit-display:grid;-moz-display:grid;display:grid;justify-content:flex-start;grid-row-gap:2rem;grid-column-gap:4rem;grid-template-columns:repeat(auto-fill,minmax(min(240px,100%),1fr))}@media (max-width: 1440px){.address-information-box[_ngcontent-%COMP%]{grid-template-columns:repeat(auto-fill,minmax(min(190px,100%),1fr))}}.address-information-box__items[_ngcontent-%COMP%]{width:100%;position:relative}.address-information-box__items[_ngcontent-%COMP%]:after{content:"";position:absolute;top:0;right:-2rem;width:1px;height:100%;background-color:var(--border-lighter)}.address-information-box__items[_ngcontent-%COMP%]:last-child:after{display:none}.address-information-box__address-label[_ngcontent-%COMP%]{width:100%;-ms-display:flex;-webkit-display:flex;-moz-display:flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;justify-content:space-between;-webkit-justify-content:space-between;margin:0 0 2.5rem}.address-information-box__address-label[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--body-color);display:inline-block;font:var(--font-weight-500) var(--font-14) var(--font-family);line-height:normal;padding:0;position:relative}.address-information-box__address-label[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:after{content:"";position:absolute;left:0;bottom:-1.3rem;width:35px;height:2px;background-color:var(--accent-color)}.address-information-box__address-content[_ngcontent-%COMP%]{width:100%;font:var(--font-weight-400) var(--font-14) var(--font-family);line-height:20px;padding:0;margin:0 0 1.5rem;color:var(--menu-text-color)}.address-information-box__address-tag[_ngcontent-%COMP%]{width:100%;-ms-display:flex;-webkit-display:flex;-moz-display:flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap}.address-information-box__address-tag[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{display:inline-block;border-radius:100px;font:var(--font-weight-600) var(--font-13) var(--font-family);line-height:normal;padding:.3rem 1.5rem .4rem;margin:0 .7rem .7rem 0;border:1px solid var(--border-color);color:var(--tag-color)}.address-information-box__email-address[_ngcontent-%COMP%]{width:100%;min-height:50px}.address-information-box__email-address[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline-block;text-overflow:ellipsis;overflow:hidden;width:100%}.dx-editor-outlined.dx-texteditor-with-floating-label[_ngcontent-%COMP%]{margin-top:0}
1.delete[_ngcontent-%COMP%]{width:26px;height:26px;background-color:var(--delete-new-color);border-radius:100px;margin:0;-ms-display:flex;-webkit-display:flex;-moz-display:flex;display:flex;justify-content:center;-webkit-justify-content:center;-webkit-align-items:center;align-items:center;transition:.35s ease}.delete[_ngcontent-%COMP%]:hover{background-color:var(--delete-new-hover-color)}']})}}return i})();var ga=(i,p,e,o)=>["/member/company-profile/membership",i,p,e,"view",o],va=()=>({id:"elementId",class:"popup-outer w-850"});function ba(i,p){i&1&&(r(0,"div",13)(1,"p"),f(2,"There are no memberships added yet."),s()())}function Ia(i,p){if(i&1&&(r(0,"div",28)(1,"a",29),f(2),s(),r(3,"span"),f(4),s()()),i&2){let e=p.$implicit,o=c(2);n(),W("title",e.data.productName),a("routerLink",So(4,ga,e.data.membershipId,o.companyId,e.data.contactMembershipId,e.data.productId||0)),n(),T(e.data.membershipTitle),n(2),T(e.data.isPrimary?"Primary":"")}}function wa(i,p){if(i&1&&(r(0,"span",30),f(1),Xt(2,"date"),s()),i&2){let e=p.$implicit;n(),O(" ",e.data.membershipStart?Jt(2,1,e.data.membershipStart,"MM/dd/yyyy"):"-"," ")}}function Ma(i,p){if(i&1&&(r(0,"span",31),f(1),Xt(2,"date"),s()),i&2){let e=p.$implicit;n(),O(" ",e.data.membershipEnd?Jt(2,1,e.data.membershipEnd,"MM/dd/yyyy"):"-"," ")}}function Da(i,p){if(i&1&&(r(0,"span"),f(1),s()),i&2){let e=p.$implicit;Kt("status ",e.data.membershipStatus,""),n(),T(e.data.membershipStatus)}}function Pa(i,p){if(i&1){let e=M();r(0,"a",33),_("click",function(){C(e);let t=c().$implicit,l=c(2);return h(l.completeMembershipPopup(t.data))}),k(),r(1,"svg",34),y(2,"path",35),s(),f(3," Complete Now "),s()}}function Ta(i,p){if(i&1&&(r(0,"div",28),u(1,Pa,4,0,"a",32),s()),i&2){let e=p.$implicit;n(),a("ngIf",e.data.isIncompleteAssignment)}}function Sa(i,p){if(i&1&&(r(0,"div",36),y(1,"dx-drop-down-button",37),s()),i&2){let e=c(2);n(),a("showArrowIcon",!1)("useItemTextAsTitle",!1)("useSelectMode",!1)("items",e.membershipInformationMenu)}}function Aa(i,p){if(i&1){let e=M();r(0,"div",14)(1,"dx-data-grid",15),_("onCellClick",function(t){C(e);let l=c();return h(l.onItemClick(t))}),y(2,"dxo-column-chooser",16)(3,"dxo-column-fixing",16),r(4,"dxi-column",17),u(5,Ia,5,9,"div",18),s(),r(6,"dxi-column",19),u(7,wa,3,4,"span",20),s(),r(8,"dxi-column",21),u(9,Ma,3,4,"span",22),s(),r(10,"dxi-column",23),u(11,Da,2,4,"span",24),s(),r(12,"dxi-column",25),u(13,Ta,2,1,"div",18),s(),r(14,"dxi-column",26),u(15,Sa,2,4,"div",27),s()()()}if(i&2){let e=c();n(),a("dataSource",e.companyMemberships)("allowColumnReordering",!0)("allowColumnResizing",!1)("columnAutoWidth",!0)("showBorders",!0),n(),a("enabled",!1),n(),a("enabled",!0),n(),a("alignment","left")("minWidth",280),n(),a("dxTemplateOf","MembershipTitleTemplete"),n(),a("width",130),n(),a("dxTemplateOf","StartDateTemplate"),n(),a("width",140),n(),a("dxTemplateOf","ExpirationDateTemplate"),n(),a("width",160)("showEditorAlways",!1),n(),a("dxTemplateOf","mbershipStatusstatusTemplate"),n(),a("visible",e.hasIncompleteAssignment)("fixed",!0)("width",160),n(),a("dxTemplateOf","IsIncompleteTemplate"),n(),a("fixed",!0)("width",80),n(),a("dxTemplateOf","ActionTemplate")}}function Ea(i,p){if(i&1&&(r(0,"div",45)(1,"div",46)(2,"h3"),f(3,"Membership Summary"),s(),r(4,"ul")(5,"li"),f(6,"Assigned Contacts: "),r(7,"strong"),f(8),s()(),r(9,"li"),f(10,"Unassigned Memberships: "),r(11,"strong"),f(12),s()()()(),r(13,"div",47)(14,"h3"),f(15,"Benefit Allocation"),s(),r(16,"ul")(17,"li"),f(18,"Number of Benefits: "),r(19,"strong"),f(20),s()(),r(21,"li"),f(22,"Benefits with Contact Assignment: "),r(23,"strong"),f(24),s()(),r(25,"li"),f(26,"You must assign contacts to activate benefit usage "),y(27,"strong"),s()()()()),i&2){let e=c(2);n(8),bi("",e.contactMembershipAssignmentPopupDetails==null?null:e.contactMembershipAssignmentPopupDetails.assignedMemberships,"/",e.contactMembershipAssignmentPopupDetails==null?null:e.contactMembershipAssignmentPopupDetails.availableMemberships,""),n(4),O("",e.contactMembershipAssignmentPopupDetails==null?null:e.contactMembershipAssignmentPopupDetails.remainingMemberships," Available"),n(8),T(e.contactMembershipAssignmentPopupDetail
1s==null?null:e.contactMembershipAssignmentPopupDetails.totalBenefits),n(4),T(e.contactMembershipAssignmentPopupDetails==null?null:e.contactMembershipAssignmentPopupDetails.assignmentBenefits)}}function Va(i,p){if(i&1){let e=M();r(0,"div",45)(1,"div",48)(2,"h3"),f(3,"Manage Team Memberships Summary"),s(),r(4,"ul")(5,"li"),f(6,"Assigned Contacts: "),r(7,"strong"),f(8),s()(),r(9,"li"),f(10,"Unassigned Memberships: "),r(11,"strong"),f(12),s()()(),r(13,"a",49),_("click",function(){C(e);let t=c(2);return h(t.onCompleteMembershipClick())}),f(14,"Manage Team Memberships"),s()()()}if(i&2){let e=c(2);n(8),bi("",e.contactMembershipAssignmentPopupDetails==null?null:e.contactMembershipAssignmentPopupDetails.assignedMemberships,"/",e.contactMembershipAssignmentPopupDetails==null?null:e.contactMembershipAssignmentPopupDetails.availableMemberships,""),n(4),O("",e.contactMembershipAssignmentPopupDetails==null?null:e.contactMembershipAssignmentPopupDetails.remainingMemberships," Available")}}function La(i,p){if(i&1){let e=M();r(0,"dx-popup",38),I("visibleChange",function(t){C(e);let l=c();return b(l.openCompleteMembershipPopup,t)||(l.openCompleteMembershipPopup=t),h(t)}),r(1,"div",39)(2,"h2"),f(3,"Incomplete Assignment for "),r(4,"span"),f(5),s()()(),r(6,"div",40),u(7,Ea,28,5,"div",41)(8,Va,15,3,"div",41),s(),r(9,"div",42)(10,"dx-button",43),_("onClick",function(){C(e);let t=c();return h(t.closeCompleteMembershipPopup())}),s(),r(11,"dx-button",44),_("onClick",function(){C(e);let t=c();return h(t.onCompleteMembershipClick())}),s()()()}if(i&2){let e=c();a("showTitle",!1)("dragEnabled",!1)("hideOnOutsideClick",!1),v("visible",e.openCompleteMembershipPopup),a("wrapperAttr",P(8,va)),n(5),T(e.assignContactMembershipsModel==null?null:e.assignContactMembershipsModel.membershipTitle),n(2),a("ngIf",!e.isTeamMembership),n(),a("ngIf",e.isTeamMembership)}}/localhost/.test(document.location.host)||void 0;var gn=(()=>{class i extends ee{get hasIncompleteAssignment(){return this.companyMemberships?.some(e=>e.isIncompleteAssignment)??!1}constructor(e,o,t,l,m,d,A,L,V){super(),this.router=o,this.webStorageService=t,this.authenticationService=l,this.membershipRegistrationCardService=m,this.shoppingCartService=d,this.homePageService=A,this.commonService=L,this.membershipPlanService=V,this.unsubscriber=new Lt,this.isMembershipShownInCataloge=!0,this.userToken=new ro,this.companyMemberships=[],this.selectedMembershipId=0,this.memberShipInformationCollapseExpand=!1,this.openCompleteMembershipPopup=!1,this.contactMembershipAssignmentPopupDetails=null,this.contactId=0,this.companyName="",this.billingTypesModel=[],this.userLimit=0,this.teamMembershipContacts=[],this.isSalesTaxRequired=!1,this.productSettingMappingModel=[],this.invoiceMainDetails=[],this.invoiceResponse=new Array,this.isTeamMembership=!1,this.userToken=t.getCurrentmemberToken(),(!this.userToken||!l.isMemberAuthenticated())&&o.navigate(["member/login"]),this.contactId=this.userToken.contactId,this.companyName=this.userToken.companyName,this.membershipInformationMenu=[{text:"View Membership",value:"View Membership",name:"View Membership",icon:"view",visible:!0,onClick:()=>{this.router.navigate(["/member","company-profile","membership",this.selectedMembershipId,this.companyId,this.assignContactMembershipsModel.contactMembershipId,"view",this.assignContactMembershipsModel.productId||0])}},{text:"Assign Benefits",value:"Assign Benefits",name:"Assign Benefits",icon:"assign",visible:!1,onClick:()=>{}},{text:"Renew Membership",value:"RenewMembership",name:"Renew Membership",icon:"renew",visible:!0,onClick:()=>{this.renewalMembership(this.assignContactMembershipsModel)}}]}renewalMembership(e){e.performaInvoiceID&&e.performaInvoiceID>0?this.GetMembershipRenewalDetailsByOrderIdandContactId(e.performaInvoiceID):this.CheckMembershipSalesTax(!0,e)}GetAllBillingType(){return R(this,null,function*(){let e=yield this.shoppingCartService.GetBillingTypesAsync();e&&e.isSuccess&&e.responseModel!=null&&e.responseModel!=null&&(this.billingTypesModel=e.responseModel,this.billingTypesModel=this.billingTypesModel.filter(o=>o.billingTypeName==jo.PayNow))})}GetMembershipByContactId(e,o,t,l){return R(this,null,function*(){this.loading=!0;let m=yield this.membershipPlanService.GetMembershipForRenewalByContactId({companyId:e,contactId:o,productId:t,quantity:l,year:null});return this.loading=!1,m&&m.responseModel?m.responseModel:null})}getSettingsByProductId(e){return R(this,null,function*(){this.loading=!0;let o=yield this.shoppingCartService.GetProductSettingsByProductId(e);this.loading=!1,o&&o.isSuccess?o.responseModel!=null&&o.responseModel!=null&&(this.productSettingMappingModel=o.responseModel):this.showErrorMessage(o.message)})}CheckMembershipSalesTax(e,o){this.loading=!0,this.shoppingCartService.GetProductCategorySalesTaxDetails(mi.Memberships.toString()).pipe(N(this.unsubscriber)).subscribe(t=>{this.processResult(t,()=>{this.loading=!1,t&&t.isSuccess&&(this.isSalesTaxRequired=t.responseModel),this.AddMembershipToShoppingCart(e,o)})},t=>{this.loading=!1,this.showErrorMessage(t.message)})}isSettingOn(e,o){return e.find(t=>t.settingKey==o)?.settingValue==="true"}AddMembershipToShoppingCart(e=!0,o){return R(this,null,function*(){let t=!1,l="",m=yield this.GetMembershipByContactId(this.userToken.companyId,null,o.productId,1);if(m.length==0)return;let d=!1,A=new lo,L=this.webStorageService.getShoppingCart();if(L&&L.length>0&&L[0]!=null){L=L.filter(x=>x.isIndividual==!1);let V=L.find(x=>x.userId==this.contactId&&x.productType==mi.Memberships.toString());
1if(V){if(V.productItem.length==0)t=!1;else{let x=0;V.productItem.filter(G=>G.isSubItem==!1).forEach(G=>{m.find(D=>D.membershipId==G.itemId)&&(x=x+1)}),m.length==x&&(t=!0)}V.productItem.find(x=>x.isSubItem==!1)&&(l=V.productItem.find(x=>x.isSubItem==!1).itemName)}}else L=new Array;if(t)this.loading=!1,e&&this.showSuccessMessage("Membership plan already added to cart.");else{let V=new Date().getTime();L=L.filter(g=>g.userId==this.userToken.contactId&&g.productType!=mi.Memberships.toString()),A=new lo;let x=!0,G=1,D=m[0],B=V+ ++G;o.productId>0&&(yield this.getSettingsByProductId(o.productId));let H=this.isSettingOn(this.productSettingMappingModel,Ho.isAllowUserAssignmentBeforePurchase),Tt=D.membershipType!=Zi.TeamMembership&&(!this.userToken.companyId||!H),S=new Ri;S.isTeamMembership=D.membershipType==Zi.TeamMembership,S.isTeamMembership&&(yield this.GetTeamMembershipContacts(o)),S.itemUniqId=D.membershipUniqId,S.itemId=D.membershipId,S.itemProductId=o.productId,S.itemName=D.membershipName,S.userBenefitAssignmentId=D?.isBenefitApplied?D?.userBenefitAssignmentId:null,S.price=Number(this.converFlotPrice(D.amount)),S.maximumPrice=S.price,S.quantity=1,Tt?(S.bestPrice=Number(this.converFlotPrice(D.bestPrice)),S.subTotal=Number(this.converFlotPrice(S.quantity*D.bestPrice))):(S.bestPrice=Number(this.converFlotPrice(S.price)),S.subTotal=Number(this.converFlotPrice(S.quantity*S.price))),S.isChecked=!0,D.isMultiprice?(S.priceStructureType=D.priceStructureType,S.priceStructureValue=D.priceStructureValue):(S.priceStructureType=0,S.priceStructureValue=0),S.isAssociateMembership=!1,S.isSubItem=!1,S.isPayNow=!0,S.paymentType=Qi.PayNow.toString(),S.isChecked=!0,S.paymentType=ki.PayNow,S.paymentTypeId=this.billingTypesModel[0].billingTypeId,S.isRenew=!0,S.contactMembershipId=o.contactMembershipId,S.isSendPaymentLink=!1,S.paymentRequiredByCompany=!1,S.contactId=this.userToken.contactId,S.customerId=this.userToken.contactId,S.customerName=this.userToken.userFullName,S.customerPriority=Ot.Contact,S.companyId=0,S.feeId=0,S.productId=D.productCategoryId,S.productTypeId=D.productTypeId,S.productTypeName=D.productTypeName,S.productCategoryId=D.productCategoryId,S.productCategoryName=D.productCategoryName,S.isSalesTaxRequired=this.isSalesTaxRequired,S.itemUniqueId=B,S.paymentTypeId=0,S.productSettingMappingModel=this.productSettingMappingModel,S.isChecked=!0,S.contactMembershipId=o.contactMembershipId;let vi=[];Tt&&(S.customerId=this.userToken.contactId,S.customerName=Ot.Self,S.customerPriority=Ot.Self,vi=yield this.GetAddress(0,this.userToken.contactId,!1),S.shippingAddresses=vi),S.minimumQuantity=1,S.paymentType=ki.PayNow,S.paymentTypeId=this.billingTypesModel[0].billingTypeId,S.isTeamMembership||A.productItem.push(S),S.isTeamMembership&&this.userLimit>1&&(S.minimumQuantity=this.userLimit);let uo;if(D.isBenefitApplied&&Tt){let g=new Ri;g.itemUniqId=D.membershipUniqId,g.itemId=D.membershipId,g.itemProductId=o.productId,g.userBenefitAssignmentId=D.userBenefitAssignmentId,g.feeId=0,g.itemName="Discount - "+D.discountName,g.parentItemName=D.membershipName,g.price=Number(this.converFlotPrice(D?.amount-D?.bestPrice))*-1,g.maximumPrice=g.price,g.quantity=1,g.subTotal=Number(this.converFlotPrice(1*g.price)),g.isChecked=!0,g.priceStructureType=0,g.priceStructureValue=0,g.isSubItem=!0,g.isPayNow=!1,g.isSendPaymentLink=!1,g.paymentRequiredByCompany=!1,g.paymentType="",g.contactId=this.userToken.contactId,g.companyId=0,g.productId=D.productCategoryId,g.productTypeId=D.productTypeId,g.productCategoryId=D.productCategoryId,g.productCategoryName=D.productCategoryName,g.productTypeName=D.productTypeName,g.isTeamMembership=S.isTeamMembership,g.contactMembershipId=S.contactMembershipId,g.isRenew=!0,Tt&&(g.customerId=this.userToken.contactId,g.customerName=Ot.Self,g.customerPriority=Ot.Self,g.shippingAddresses=vi),g.itemUniqueId=B,A.productItem.push(g),uo=g}if(D.applicationFee>0){let g=new Ri;g.itemUniqId=D.membershipUniqId,g.itemId=D.membershipId,g.feeId=D.feeId,g.itemName=qo.ApplicationFee.toString(),g.parentItemName=D.membershipName,g.price=Number(this.converFlotPrice(D.applicationFee)),g.maximumPrice=g.price,S.isTeamMembership?(g.quantity=this.userLimit,g.subTotal=Number(this.converFlotPrice(g.quantity*g.price))):(g.quantity=1,g.subTotal=Number(this.converFlotPrice(1*g.price))),g.isChecked=!0,g.priceStructureType=0,g.priceStructureValue=0,g.isSubItem=!0,g.isPayNow=!0,g.paymentType=Qi.PayNow.toString(),g.isChecked=!0,g.paymentType=ki.PayNow,g.paymentTypeId=this.billingTypesModel[0].billingTypeId,g.isSendPaymentLink=!1,g.paymentRequiredByCompany=!1,g.paymentType="",g.contactId=this.userToken.contactId,g.companyId=0,g.productId=D.productCategoryId,g.productTypeId=D.productTypeId,g.productCategoryId=D.productCategoryId,g.productCategoryName=D.productCategoryName,g.productTypeName=D.productTypeName,g.isTeamMembership=S.isTeamMembership,g.isRenew=!0,g.contactMembershipId=S.contactMembershipId,Tt&&(g.customerId=this.userToken.contactId,g.customerName=Ot.Self,g.customerPriority=Ot.Self,g.shippingAddresses=vi),g.itemUniqueId=B,A.productItem.push(g)}if(S.isTeamMembership&&this.userLimit>1)for(let g=0;g<this.userLimit;g++){let Mo=V+ ++G,ri=fo({},S);ri.itemUniqueId=Mo;let Ji=g;if(this.teamMembershipContacts&&this.teamMembershipContacts.length>Ji){let Ft=this.teamMembershipContacts[Ji];ri.customerId=Ft.contactId,ri.customerName=Ft.contactFullName||Ot.Contact,ri.customerPriority=Ot.Contact,vi=yield this.GetAddress(0,Ft.contactId,!1),ri.shippingAddresses=vi}else ri.customerId=null,ri.customerName=`Team Member ${g+1}`,ri.customerPriority=Ot.Contact,ri.shippingAddresses=[];if(A.productItem.push(ri),uo){let Ft=fo({},uo);if(Ft.itemUniqueId=Mo,this.teamMembershipContacts&&this.teamMembershipContacts.length>Ji){let Do=this.teamMembershipContacts[Ji];Ft.customerId=Do.contactId,Ft.customerName=Do.contactFullName||Ot.Contact,Ft.customerPriority=Ot.Contact,Ft.shippingAddresses=vi}else Ft.customerId=null,Ft.customerName=`Team Member ${g+1}`,Ft.customerPriority=Ot.Contact,Ft.shippingAddresses=[];A.productItem.push(Ft)}}A.isIndividual=!1,A.userId=this.userToken.contactId,A.productSubType=mi.Memberships.toString(),A.productType=mi.Memberships.toString(),L.push(A),L.forEac
1h(g=>{this.webStorageService.deleteShoppingByProductTypeCart(!1,mi.Memberships.toString())}),this.webStorageService.storeShoppingNewCart(L);let wo=this.webStorageService.getShoppingCart();wo=wo.filter(g=>g.isIndividual==!1),this.shoppingCartService.setUpdateCartCount(),this.shoppingCartService.setUpdateCartCountIndividual(),this.shoppingCartService.setUpdateCartCountCorporate(),this.commonService.resetShoppingCartRowNo(),e&&this.showSuccessMessage("Membership plan is added to cart."),this.router.navigate(["member/cart"])}})}GetMembershipRenewalDetailsByOrderIdandContactId(e){if(e<=0)return;this.loading=!0;let o=0;this.shoppingCartService.GetMemebershipDetailsByProformaInvoiceIdForRenewal(e,this.contactId,this.companyId?this.companyId:0).pipe(N(this.unsubscriber)).subscribe(l=>{this.processResult(l,()=>{l.responseModel.invoiceItems.length>0&&this.BindShoppingCartForRenewalV1(e,l.responseModel)})},l=>{this.loading=!1,this.showErrorMessage(l.message)})}BindShoppingCartForRenewalV1(e,o){e>0&&this.homePageService.GetInvoiceDetailForViewByInvoiceId(e).pipe(N(this.unsubscriber)).subscribe(t=>{this.processResult(t,()=>{if(this.loading=!1,t&&t.isSuccess){this.invoiceMainDetails.push(t.responseModel);let l=new fn;this.invoiceResponse.push(o),this.AddProductToShoppingCartCompany()}else this.showErrorMessage(t.message)})},t=>{this.loading=!1,this.showErrorMessage(t.message)})}converFlotPrice(e){return Number(e).toFixed(2)}GetAddress(e=0,o=0,t){return R(this,null,function*(){this.loading=!0;let l=[],m=yield this.shoppingCartService.GetCompanyOrContactAddressesById(e,o,t);return m&&m.responseModel!=null&&m.responseModel!=null&&(l=m.responseModel),this.loading=!1,l})}AddProductToShoppingCartCompany(){return R(this,null,function*(){let e=new lo,o=this.webStorageService.getShoppingCart();if(o&&o.length>0){o=o.filter(d=>d.isIndividual==!1);let m=o.filter(d=>d.userId==this.userToken.contactId&&d.productType=="All Invoices");m&&m.forEach(d=>{d.productItem!=null&&d.productItem.length>0&&JSON.parse(JSON.stringify(this.invoiceResponse)).forEach(L=>{d.productItem.filter(x=>x.itemUniqId==L.invoiceId).length>0&&(this.invoiceResponse=this.invoiceResponse.filter(x=>x.invoiceId!=L.invoiceId))})}),this.invoiceResponse.length>0&&o.find(A=>A.userId==this.userToken.contactId&&A.productType==mi.Memberships.toString())&&(o=o.filter(A=>A.userId==this.userToken.contactId&&A.productType!=mi.Events.toString()&&A.productType!=mi.Memberships.toString()))}else o=new Array;if(this.invoiceResponse.length==0){this.showErrorMessage("Invoices has been already added to the cart.");return}let t=yield this.GetAddress(this.userToken.companyId,0,!1);this.invoiceResponse.forEach(m=>{let d=new Ri;d.itemUniqId=m.invoiceId,d.itemId=m.invoiceId,d.itemName="#INV"+m.invoiceNumber,d.price=Number(this.converFlotPrice(m.totalAmount)),d.bestPrice=d.price,d.maximumPrice=d.price,d.quantity=1,d.subTotal=Number(this.converFlotPrice(1*d.price)),d.isChecked=!0,d.priceStructureType=0,d.priceStructureValue=0,d.isAssociateMembership=!0,d.isSubItem=!1,d.isPayNow=!0,d.isSendPaymentLink=!1,d.paymentRequiredByCompany=!1,d.paymentType=Qi.PayNow.toString(),d.contactId=this.userToken.contactId,d.companyId=this.userToken.companyId,d.customerId=this.userToken.companyId,d.customerName=this.companyName,d.customerPriority=Ot.Company,d.shippingAddresses=t,d.feeId=0,d.invoiceNumber=Number(m.invoiceNumber),d.paymentType=ki.PayNow,d.paymentTypeId=this.billingTypesModel[0].billingTypeId,d.isRenew=!0,e.productItem.push(d),this.invoiceMainDetails.forEach(A=>{let L=A.invoiceItemViewDetailSpModels?.filter(V=>V.invoiceID==m.invoiceId)??[];L.filter(V=>!cn(V)).forEach(V=>{let x=new Ri;x.itemUniqId=Number(V.productUniqueId),x.itemId=V.invoiceID,x.invoiceItemId=V.invoiceItemId||0,x.itemProductId=V.productOriginalId||0,x.productId=V.productId||0,x.productCategoryId=V.productId||0,x.productTypeId=V.productTypeId||0,x.feeId=V.feeId||0,x.promotionId=V.promotionId||0,x.itemName=V.productItemName;let G=Number(this.converFlotPrice(V.totalPrice)),D=un(L,V.productOriginalId||0);x.price=G,x.maximumPrice=G,x.bestPrice=G+Number(D||0),x.quantity=1,x.subTotal=Number(this.converFlotPrice(1*V.totalPrice)),x.isChecked=!0,x.priceStructureType=0,x.priceStructureValue=0,x.isAssociateMembership=!0,x.isSubItem=!0,x.isPayNow=!0,x.isSendPaymentLink=!1,x.paymentRequiredByCompany=!1,x.paymentType=Qi.PayNow.toString(),x.contactId=this.userToken.contactId,x.companyId=this.userToken.companyId,x.customerId=this.userToken.companyId,x.customerName=this.companyName,x.customerPriority=Ot.Company,x.shippingAddresses=t,x.billingId=V.billingId,x.shippingId=V.shippingId,x.paymentType=ki.PayNow,x.paymentTypeId=this.billingTypesModel[0].billingTypeId,x.isRenew=!0,e.productItem.push(x)})})}),e.isIndividual=!1,e.userId=this.userToken.contactId,e.productType="All Invoices",o.push(e),o.forEach(m=>{this.webStorageService.deleteShoppingByProductTypeCart(!1,m.productType)}),this.webStorageService.storeShoppingNewCart(o),this.commonService.resetShoppingCartRowNo();let l=this.webStorageService.getShoppingCart();l=l.filter(m=>m.isIndividual==!1),this.shoppingCartService.callFunction(),this.commonService.resetShoppingCartRowNo(),this.loading=!1,this.shoppingCartService.setUpdateCartCount(),this.shoppingCartService.setUpdateCartCountIndividual(),this.shoppingCartService.setUpdateCartCountCorporate(),this.shoppingCartService.setUpdateCartCount(),this.shoppingCartService.setUpdateCartCount(),this.shoppingCartService.setUpdateCartCountIndividual(),this.shoppingCartService.setUpdateCartCountCorporate(),this.showSuccessMessage("Invoices has been added to the cart.")})}ngOnInit(){return R(this,null,function*(){this.GetAllBillingType(),yield this.getContactMemberships()})}getContactMemberships(){return R(this,null,function*(){this.loading=!0;let e=this.membershipRegistrationCardService.GetCompanyMembershipsByContactId(this.companyId,0).pipe(N(this.unsubscriber),Z(()=>this.loading=!1)),o=yield F(e);this.processResult(o,()=>{o&&o.isSuccess?o.responseModel!=null&&o.responseModel!=null&&(this.companyMemberships=o.responseModel):(this.loading=!1,this.showErrorMessage(o.message))})})}onItemClick(e){if(e.data){this.selectedMembershipId=e.data.membershipId,this.assignContactMembershipsModel=new tn,this.assignContactMembershipsModel=e.data;let o=this.membershipInformationMenu.find(t=>t.value=="RenewMembership");o&&(this.isMembershipShownInCataloge?o.visible=!!(this.assignContactMembershipsModel.isEligibleForRenewal==!0&&this.assignContactMembershipsModel.isGracePeriod):o.visible=!1),e.data.membershipType==Zi.TeamMembership&&(this.userLimit=e.data.userLimit||0)}}redirectViewMembership(e){}toggleMemberShipInformation(){this.memberShipInformationCollapseExpand=!this.memberShipInformationCollapseExpand}completeMembershipPopup(e){return R(this,null,function*(){this.assignContactMembershipsModel=e,this.isTeamMembership=e.membershipType==Zi.TeamMembership,this.loading=!0;let o=yield this.membershipRegistrationCardService.GetContactMembershipAssignmentPopupDetail
1s(e.contactMembershipId,this.companyId);this.loading=!1,o&&o.isSuccess?this.contactMembershipAssignmentPopupDetails=o.responseModel:this.showErrorMessage(o.message),this.openCompleteMembershipPopup=!0})}closeCompleteMembershipPopup(){this.openCompleteMembershipPopup=!1,this.contactMembershipAssignmentPopupDetails=null}onCompleteMembershipClick(){this.closeCompleteMembershipPopup(),this.router.navigate(["/member/company-profile/membership/"+this.selectedMembershipId+"/"+this.companyId+"/"+this.assignContactMembershipsModel.contactMembershipId+"/view/"+this.assignContactMembershipsModel.productId])}GetTeamMembershipContacts(e){return R(this,null,function*(){this.loading=!0;let o=yield this.membershipRegistrationCardService.GetTeamMembershipContacts(e.contactMembershipId);this.loading=!1,o&&o.isSuccess?this.teamMembershipContacts=o.responseModel||[]:this.showErrorMessage(o.message)})}static{this.\u0275fac=function(o){return new(o||i)(E(St),E(Wt),E(At),E(eo),E(Zo),E(Uo),E(po),E(Oi),E(Qo))}}static{this.\u0275cmp=Q({type:i,selectors:[["app-company-membership-info"]],viewQuery:function(o,t){if(o&1&&z(Mt,5),o&2){let l;q(l=j())&&(t.dataGrid=l.first)}},inputs:{companyId:"companyId",isMembershipShownInCataloge:"isMembershipShownInCataloge"},standalone:!0,features:[li([St]),K,X],decls:14,vars:4,consts:[[1,"scroll-outer"],[1,"information-block",3,"ngClass"],[1,"card-outer","member-portal"],[1,"card-header"],[1,"card-header__title"],[1,"card-header__edit-collapse"],["href","javascript:void(0)",1,"collapse",3,"click"],["width","14","height","9","viewBox","0 0 14 9","fill","none","xmlns","http://www.w3.org/2000/svg"],["_ngcontent-uhr-c405","","d","M1 7.5L7 1.5L13 7.5","stroke","#024079","stroke-width","1.8","stroke-linecap","round","stroke-linejoin","round"],["class","empty-card",4,"ngIf"],[1,"card-content"],["class","table-block create-contact-table",4,"ngIf"],["container",".dx-viewport",3,"showTitle","dragEnabled","hideOnOutsideClick","visible","wrapperAttr","visibleChange",4,"ngIf"],[1,"empty-card"],[1,"table-block","create-contact-table"],["id","companyMembershipsContainer",1,"table-outer","contacts-table",3,"onCellClick","dataSource","allowColumnReordering","allowColumnResizing","columnAutoWidth","showBorders"],[3,"enabled"],["dataField","membershipTitle","caption","Membership Name","cellTemplate","MembershipTitleTemplete",3,"alignment","minWidth"],["class","client-name-with-id",4,"dxTemplate","dxTemplateOf"],["dataField","membershipStart","caption","Start Date","cellTemplate","StartDateTemplate",3,"width"],["class","left-margin-start-date","title","Type",4,"dxTemplate","dxTemplateOf"],["dataField","membershipEnd","caption","Expiration Date","cellTemplate","ExpirationDateTemplate",3,"width"],["class","left-margin-expiration-date","title","Type",4,"dxTemplate","dxTemplateOf"],["dataField","membershipStatus","caption","Membership Status","cellTemplate","mbershipStatusstatusTemplate",3,"width","showEditorAlways"],[3,"class",4,"dxTemplate","dxTemplateOf"],["dataField","isIncompleteAssignment","fixedPosition","right","caption","","cellTemplate","IsIncompleteTemplate",3,"visible","fixed","width"],["dataField","action","fixedPosition","right","caption","Action","type","buttons","cellTemplate","ActionTemplate",3,"fixed","width"],["class","action-menu-btn",4,"dxTemplate","dxTemplateOf"],[1,"client-name-with-id"],[1,"client-name",3,"routerLink","title"],["title","Type",1,"left-margin-start-date"],["title","Type",1,"left-margin-expiration-date"],["href","javascript:void(0);","class","incomplete-btn",3,"click",4,"ngIf"],["href","javascript:void(0);",1,"incomplete-btn",3,"click"],["width","11","height","9","viewBox","0 0 11 9","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M0.90625 4.65625L3.96875 7.71875L10.0938 1.15625","stroke","white","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"action-menu-btn"],["icon","dot-icon","cssClass","TestingClass","displayExpr","text","text","","stylingMode","text",1,"overflow-menu",3,"showArrowIcon","useItemTextAsTitle","useSelectMode","items"],["container",".dx-viewport",3,"visibleChange","showTitle","dragEnabled","hideOnOutsideClick","visible","wrapperAttr"],[1,"dx-popup-header"],[1,"dx-popup-content-block"],["class","incomplete_assignment",4,"ngIf"],[1,"dx-popup-footer"],["text","Cancel","stylingMode","contained","type","normal",1,"btn","btn--cancel",3,"onClick"],["text","Manage","stylingMode","contained","type","default",1,"btn","btn--primary",3,"onClick"],[1,"incomplete_assignment"],[1,"incomplete_assignment__left"],[1,"incomplete_assignment__right"],[1,"incomplete_assignment__left","br-0"],["href","javascript:void(0);",1,"link",3,"click"]],template:function(o,t){o&1&&(r(0,"dx-scroll-view",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h2",4),f(5,"Membership Information"),s(),r(6,"div",5)(7,"a",6),_("click",function(){return t.toggleMemberShipInformation()}),k(),r(8,"svg",7),y(9,"path",8),s()()()(),u(10,ba,3,0,"div",9),U(),r(11,"div",10),u(12,Aa,16,24,"div",11),s()()()(),u(13,La,12,9,"dx-popup",12)),o&2&&(n(),a("ngClass",t.memberShipInformationCollapseExpand?"collapse":"expand"),n(9),a("ngIf",!t.loading&&(!t.companyMemberships||(t.companyMemberships==null?null:t.companyMemberships.length)==0)),n(2),a("ngIf",(t.companyMemberships==null?null:t.companyMemberships.length)>0),n(),a("ngIf",t.openCompleteMembershipPopup))},dependencies:[Y,Dt,J,si,$,Eo,pe,se,It,de,me,ce,ue,fe,ye,wt,Ce,he,_e,xe,ge,ve,be,Mt,to,io,di,Ie,we,Me,De,Pe,Te,Se,Vi,Ae,Ee,Ve,Le,ke,Re,Oe,Be,Ge,Fe,Ne,We,ze,qe,je,He,Ue,Ze,Qe,Ke,Xe,Et,Je,Ye,$e,et,tt,it,ot,Vt,nt,at,rt,lt,st,dt,pt,mt,ct,ut,ft,yt,Ct,ht,_t,gt,vt,bt,xt,oe,le,re,ae,ne,ie,te],styles:[".associate-title[_ngcontent-%COMP%]{margin-bottom:2rem;padding-top:2rem}.status[_ngcontent-%COMP%]{font-weight:400}td[_ngcontent-%COMP%]{text-align:left}.left-margin-start-date[_ngcontent-%COMP%], .left-margin-expiration-date[_ngcontent-%COMP%]{margin-left:11px}.left-margin-status[_ngcontent-%COMP%]{margin-left:13px}.left-margin-action[_ngcontent-%COMP%]{margin-left:0}.action-btn[_ngcontent-%COMP%]{-ms-display:flex;-webkit-display:flex;-moz-display:flex;display:flex}.action-btn[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{margin-left:1.5rem;height:32px!important;min-height:30px!important;text-align:center;justify-content:center}.action-btn[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:first-child{margin-left:0}.dx-popup-content-block[_ngcontent-%COMP%] p[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--member-secondary-color)}.types[_ngcontent-%COMP%]{padding:.2rem 1rem;border-radius:50px;border:1px solid var(--member-green-color);color:var(--member-green-color);font:var(--font-weight-500) var(--font-13) var(--font-family)}.incomplete-btn[_ngcontent-%COMP%]{width:auto;font:var(--font-weight-500) var(--font-13) var(--font-family);color:#fff;border:1px solid var(--seat-not-available);background-color:var(--seat-not-available);padding:.8rem 1.5rem;border-radius:5px}.incomplete-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{margin-right:.5rem}.incomplete-btn[_ngcontent-%COMP%]:hover{background-color:var(--member-delete1-hover-color);color:#fff!important}.incomplete_assignment[_ngcontent-%COMP%]{width:100%;margin:0;padding:0;-ms-display:flex;-webkit-display:flex;-moz-display:flex;display:flex;justify-content:space-between}.incomplete_assignment[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{width:100%;margin:0 0 1.8rem;padding:0}.incomplete_assignment__left[_ngcontent-%COMP%]{border-right:1px solid var(--member-border-color)}.incomplete_assignment__left[_ngcontent-%COMP%], .incomplete_assignment__right[_ngcontent-%COMP%]{width:100%;max-width:48%;margin-bottom:1.8rem}.incomplete_assignment__left[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .incomplete_assignment__right[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin:0 0 1rem;list-style:none;padding:0;min-height:75px}.incomplete_assignment__left[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%], .incomplete_assignment__right[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin:0 0 .8rem;list-style:none;padding:0;color:var(--member-body-color);font:var(--font-weight-400) var(--font-15) var(--font-family)}.incomplete_assignment__left[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child, .incomplete_assignment__right[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child{margin-bottom:0}.incomplete_assignment__left[_ngcontent-%COMP%] .link[_ngcontent-%COMP%], .incomplete_assignment__right[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{width:auto;font:var(--font-weight-500) var(--font-15) var(--font-family);color:var(--member-primary-color)}.br-0[_ngcontent-%COMP%]{border-right:none}"]})}}return i})();var ka=["grid"],Ra=()=>({id:"elementId",class:"popup-outer w-600"});function Oa(i,p){if(i&1&&(r(0,"span"),f(1),s()),i&2){let e=p.$implicit;Kt("status ",e.data.isActive==!0?"Active":"Inactive",""),n(),T(e.data.isActive==!0?"Active":"Inactive")}}function Ba(i,p){if(i&1&&(r(0,"div",37),y(1,"dx-drop-down-button",38),s()),i&2){let e=c(3);
1n(),a("showArrowIcon",!1)("useSelectMode",!1)("items",e.RemoveRelationshipAction)}}function Ga(i,p){if(i&1){let e=M();r(0,"dx-data-grid",30),_("onCellClick",function(t){C(e);let l=c(2);return h(l.onRemoveRelationshipAction(t))}),y(1,"dxi-column",31)(2,"dxi-column",32),r(3,"dxi-column",33),u(4,Oa,2,4,"span",34),s(),r(5,"dxi-column",35),u(6,Ba,2,3,"div",36),s()()}if(i&2){let e=c().$implicit;a("dataSource",e.data.companies)("showBorders",!0)("columnAutoWidth",!0),n(),a("width",530),n(),a("width",230),n(),a("fixed",!1)("width",120),n(),a("dxTemplateOf","statusTemplate"),n(),a("width",80),n(),a("dxTemplateOf","ActionTemplate")}}function Fa(i,p){if(i&1&&(r(0,"div",28),u(1,Ga,7,10,"dx-data-grid",29),s()),i&2){let e=p.$implicit;n(),a("ngIf",e.data.companies.length>0)}}function Na(i,p){if(i&1&&(r(0,"p"),f(1," Are you sure want to remove hierarchy affilated company for "),r(2,"b"),f(3),s(),f(4,"? "),s()),i&2){let e=c();n(3),T(e.companyAffiliationName())}}/localhost/.test(document.location.host)||void 0;var bn=(()=>{class i extends ee{constructor(){super(),this.HierarchyAffiliationCollapseExpand=Ci(!1),this.hierarchyAffiliationListModel=[],this.isHierarchyView=!1,this.CompanyId=0,this.totalCount=0,this.dataGrid=Di(Mt),this.showPageSizeSelector=!1,this.showPageNavigation=!1,this.isPagerVisible=!1,this.grid=Di("grid"),this.companyAffiliationId=Ci(0),this.companyAffiliationName=Ci(""),this.dataSourceForGrid=Ci([]),this.UnlinkCompany=Ci(!1),this.router=Qt(Wt),this.webStorageService=Qt(At),this.homePageService=Qt(po),this.activatedRoute=Qt(Si),this.destroyRef=Qt(Yi),this.service=Qt(St),this.activatedRoute.params.pipe(Ui(this.destroyRef)).subscribe(e=>{this.CompanyId=e.companyId}),this.GetHierarchyAffiliationByCompanyId(),this.RemoveRelationshipAction=[{value:"RemoveRelationship",text:"Remove Relationship",name:"Remove Relationship",icon:"",visible:!0,onClick:()=>{this.openUnlinkAffiliatedCompanyPopup()}}]}onOptionChanged(e){let o=!1;if(o=e&&(e.name=="focusedRowIndex"||e.name=="focusedRowKey"),!o&&this.dataGrid()!=null){let t=this.dataGrid().instance;t.clearSelection(),t.option("focusedRowIndex",-1)}}getTotalCountforHirchy(e){this.totalCount=e.component.totalCount(),this.totalCount>0&&(this.isPagerVisible=!0);let o=e.component.pageSize(),t=15;this.totalCount<t?this.showPageSizeSelector=!1:this.showPageSizeSelector=t<=o&&this.totalCount>=t,this.showPageNavigation=!(this.totalCount<o)}HierarchyAffiliation(){this.HierarchyAffiliationCollapseExpand.update(e=>!e)}onValueChangedView(e){this.GetHierarchyAffiliationByCompanyId()}closeUnlinkAffiliatedCompanyPopup(){this.UnlinkCompany.set(!1)}openUnlinkAffiliatedCompanyPopup(){this.UnlinkCompany.set(!0)}UnlinkAffiliatedCompany(){this.companyAffiliationId()!=0&&this.homePageService.UnlinkAffiliatedCompany(this.companyAffiliationId()).pipe(Ui(this.destroyRef)).subscribe(e=>{this.processResult(e,()=>{this.loading=!1,e&&e.isSuccess?(this.GetHierarchyAffiliationByCompanyId(),this.UnlinkCompany.set(!1)):this.showErrorMessage(e.message)})},e=>{this.loading=!1,this.showErrorMessage(e.message)})}onRemoveRelationshipAction(e){e.data&&(this.companyAffiliationId.set(e.data.companyAffiliationId),this.companyAffiliationName.set(e.data.companyName))}GetHierarchyAffiliationByCompanyId(){this.homePageService.GetHierarchyAffiliationByCompanyId(this.CompanyId,!0).subscribe({next:e=>{if(e.responseModel&&e.responseModel.length>0){let o=new Map;e.responseModel.forEach(l=>{let m=l.parentCategoryId,d=l.parentCategoryName;o.has(m)||o.set(m,{productId:m,productName:d,companies:[]}),l.companyId&&l.isActive&&o.get(m).companies.push({companyId:l.companyId,companyName:l.companyName||"",companyAffiliationId:l.companyAffiliationMappingId||"",categoryName:l.categoryName||"",isActive:l.isActive})});let t=Array.from(o.values()).map(l=>(l.companies.length===0&&l.companies.push(null),l));this.dataSourceForGrid.set(t),setTimeout(()=>{t.forEach(l=>{this.dataGrid()?.instance?.expandRow(l.productId)})},0)}else this.dataSourceForGrid.set([])},error:e=>{console.error("Error fetching hierarchy affiliation data:",e)}})}static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275cmp=Q({type:i,selectors:[["app-hierarchy-affiliation"]],viewQuery:function(o,t){o&1&&(Pi(t.dataGrid,Mt,5),Pi(t.grid,ka,5)),o&2&&$i(2)},standalone:!0,features:[li([St]),K,X],decls:31,vars:21,consts:[[1,"scroll-outer"],[1,"information-block",3,"ngClass"],[1,"card-outer","member-portal"],[1,"card-header"],[1,"card-header__title"],[1,"card-header__edit-collapse"],[1,"expand-view-button"],[1,"flex-wrap-outer__right"],["href","javascript:void(0)",1,"collapse",3,"click"],["width","14","height","9","viewBox","0 0 14 9","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M1 7.5L7 1.5L13 7.5","stroke","#024079","stroke-width","1.8","stroke-linecap","round","stroke-linejoin","round"],[1,"card-content"],[1,"client-info","information-box"],[1,"table-block","create-contact-table","new-table","registration-management-tab"],["noDataText","No Records foun
1d.","keyExpr","productId",1,"table-outer",3,"dataSource","showBorders","allowColumnReordering","focusedRowEnabled","columnAutoWidth","allowColumnResizing","columnHidingEnabled"],["dataField","productName","cssClass","organization-name","caption","Organization",3,"width"],["caption","Level","alignment","left",3,"width"],["caption","Status","alignment","left",3,"width"],["alignment","center","caption","","type","buttons",3,"width"],["template","detail",3,"enabled"],["class","sub-table-outer",4,"dxTemplate","dxTemplateOf"],["container",".dx-viewport",3,"visibleChange","showTitle","dragEnabled","hideOnOutsideClick","visible","wrapperAttr"],[1,"dx-popup-header"],[1,"dx-popup-content-block"],[4,"ngIf"],[1,"dx-popup-footer"],["text","Cancel","stylingMode","contained","type","normal",1,"btn","btn--cancel",3,"onClick"],["text","Save","stylingMode","contained","type","default",1,"btn","btn--primary",3,"onClick"],[1,"sub-table-outer"],[3,"dataSource","showBorders","columnAutoWidth","onCellClick",4,"ngIf"],[3,"onCellClick","dataSource","showBorders","columnAutoWidth"],["dataField","companyName","cssClass","hierarchy-affiliation-column","caption","Organization",3,"width"],["dataField","categoryName","caption","Level","alignment","left",3,"width"],["dataField","isActive","caption","Status","cellTemplate","statusTemplate","alignment","left",3,"fixed","width"],[3,"class",4,"dxTemplate","dxTemplateOf"],["caption","Action","type","buttons","cellTemplate","ActionTemplate","alignment","center",3,"width"],["class","action-menu-btn",4,"dxTemplate","dxTemplateOf"],[1,"action-menu-btn"],["icon","dot-icon","cssClass","TestingClass","displayExpr","text","text","","stylingMode","text",1,"overflow-menu",3,"showArrowIcon","useSelectMode","items"]],template:function(o,t){o&1&&(r(0,"dx-scroll-view",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h2",4),f(5,"Connected Companies"),s(),r(6,"div",5)(7,"div",6),y(8,"div",7),s(),r(9,"a",8),_("click",function(){return t.HierarchyAffiliation()}),k(),r(10,"svg",9),y(11,"path",10),s()()()(),U(),r(12,"div",11)(13,"div",12)(14,"div",13)(15,"dx-data-grid",14),y(16,"dxi-column",15)(17,"dxi-column",16)(18,"dxi-column",17)(19,"dxi-column",18)(20,"dxo-master-detail",19),u(21,Fa,2,1,"div",20),s()()()()()()(),r(22,"dx-popup",21),_("visibleChange",function(m){return t.UnlinkCompany.set(m)}),r(23,"div",22)(24,"h2"),f(25,"Confirm Remove Hierarchy Affilated Company"),s()(),r(26,"div",23),u(27,Na,5,1,"p",24),s(),r(28,"div",25)(29,"dx-button",26),_("onClick",function(){return t.closeUnlinkAffiliatedCompanyPopup()}),s(),r(30,"dx-button",27),_("onClick",function(){return t.UnlinkAffiliatedCompany()}),s()()()),o&2&&(n(),a("ngClass",t.HierarchyAffiliationCollapseExpand()?"collapse":"expand"),n(14),a("dataSource",t.dataSourceForGrid())("showBorders",!0)("allowColumnReordering",!1)("focusedRowEnabled",!0)("columnAutoWidth",!1)("allowColumnResizing",!1)("columnHidingEnabled",!1),n(),a("width",500),n(),a("width",230),n(),a("width",120),n(),a("width",80),n(),a("enabled",!0),n(),a("dxTemplateOf","detail"),n(),a("showTitle",!1)("dragEnabled",!1)("hideOnOutsideClick",!0)("visible",t.UnlinkCompany())("wrapperAttr",P(20,Ra)),n(5),a("ngIf",t.companyAffiliationName()!==""))},dependencies:[Y,Dt,J,$,pe,se,It,de,me,ce,ue,fe,ye,wt,Ce,he,_e,xe,ge,ve,be,Mt,di,ko,Ie,we,Me,De,Pe,Te,Se,Vi,Ae,Ee,Ve,Le,ke,Re,Oe,Be,Ge,Fe,Ne,We,ze,qe,je,He,Ue,Ze,Qe,Ke,Xe,Et,Je,Ye,$e,et,tt,it,ot,Vt,nt,at,rt,lt,st,dt,pt,mt,ct,ut,ft,yt,Ct,ht,_t,gt,vt,bt,xt,oe,le,re,ae,ne,ie,te],styles:[".bor-left[_ngcontent-%COMP%]{border-left:0;padding-left:0}.information-block.collapse[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%]{padding-bottom:0}"],changeDetection:0})}}return i})();var Wa=["OrganizationInformationGroup"],za=()=>({id:"elementId",class:"popup-outer tooltip-wrapper w-800"}),qa=()=>({"aria-label":"Organization"}),ja=()=>({"aria-label":"Organization Type"}),Ha=()=>({"aria-label":"Company Type"}),Ua=()=>({"aria-label":"EIN"}),Za=()=>({"aria-label":"https://www.website111.com"}),Qa=()=>({"aria-label":"https://www.website.com"});function Ka(i,p){if(i&1){let e=M();r(0,"a",39),_("click",function(){C(e);let t=c();return h(t.onOrgStructureClick())}),f(1," ORG Structure "),s()}}function Xa(i,p){if(i&1){let e=M();ui(0),r(1,"a",40),_("click",function(){C(e);let t=c();return h(t.showOrganizationInformationPopupEvent())}),r(2,"span"),k(),r(3,"svg",41),y(4,"path",42),s()(),f(5," Edit "),s(),fi()}}function Ja(i,p){if(i&1&&(r(0,"li",43)(1,"label",44),f(2),s(),r(3,"span",45),f(4),s()()),i&2){let e=c();
1n(2),T(e.displayLabel("CompanyName")),n(2),T(e.companyInfo==null?null:e.companyInfo.companyName)}}function Ya(i,p){if(i&1&&(r(0,"li",43)(1,"label",44),f(2),s(),r(3,"span",45),f(4),s()()),i&2){let e=c();n(2),T(e.displayLabel("OrganizationTypes")),n(2),T(e.companyInfo==null?null:e.companyInfo.organizationType)}}function $a(i,p){if(i&1&&(r(0,"li",43)(1,"label",44),f(2),s(),r(3,"span",45),f(4),s()()),i&2){let e=c();n(2),T(e.displayLabel("CompanyTypes")),n(2),T(e.companyInfo==null?null:e.companyInfo.companyTypes)}}function er(i,p){if(i&1&&(r(0,"li",43)(1,"label",44),f(2),s(),r(3,"span",45),f(4),s()()),i&2){let e=c();n(2),T(e.displayLabel("EIN")),n(2),T(e.companyInfo!=null&&e.companyInfo.ein?e.companyInfo.ein:"--")}}function tr(i,p){if(i&1&&(r(0,"li",43)(1,"label",44),f(2),s(),r(3,"span",45),f(4),s()()),i&2){let e=c();n(2),T(e.displayLabel("EmailDomain")),n(2),T((e.companyInfo==null?null:e.companyInfo.effectiveEmailDomain)||(e.companyInfo==null?null:e.companyInfo.emailDomain))}}function ir(i,p){if(i&1&&(r(0,"li",43)(1,"label",44),f(2),s(),r(3,"span",45),f(4),s()()),i&2){let e=c();n(2),T(e.displayLabel("CompanyWebsite")),n(2),T(e.companyInfo!=null&&e.companyInfo.companyWebsite?e.companyInfo==null?null:e.companyInfo.companyWebsite:"-")}}function or(i,p){if(i&1&&y(0,"dxi-validation-rule",46),i&2){let e=c();w("message","",e.labelForValidation("CompanyName")," is required")}}function nr(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(2);n(),T(e.profileTooltip("CompanyName"))}}function ar(i,p){i&1&&(r(0,"div",47),y(1,"i",48),r(2,"dx-tooltip",49),u(3,nr,2,1,"div",50),s()()),i&2&&(n(2),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content"))}function rr(i,p){if(i&1&&y(0,"dxi-validation-rule",46),i&2){let e=c();w("message","",e.labelForValidation("OrganizationTypes")," is required")}}function lr(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(2);n(),T(e.profileTooltip("OrganizationTypes"))}}function sr(i,p){i&1&&(r(0,"div",47),y(1,"i",51),r(2,"dx-tooltip",52),u(3,lr,2,1,"div",50),s()()),i&2&&(n(2),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content"))}function dr(i,p){if(i&1&&y(0,"dxi-validation-rule",46),i&2){let e=c();w("message","",e.labelForValidation("CompanyTypes")," is required")}}function pr(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(2);n(),T(e.profileTooltip("CompanyTypes"))}}function mr(i,p){i&1&&(r(0,"div",47),y(1,"i",53),r(2,"dx-tooltip",54),u(3,pr,2,1,"div",50),s()()),i&2&&(n(2),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content"))}function cr(i,p){if(i&1&&y(0,"dxi-validation-rule",46),i&2){let e=c();w("message","",e.labelForValidation("EIN")," is required")}}function ur(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(2);n(),T(e.profileTooltip("EIN"))}}function fr(i,p){i&1&&(r(0,"div",47),y(1,"i",55),r(2,"dx-tooltip",56),u(3,ur,2,1,"div",50),s()()),i&2&&(n(2),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content"))}function yr(i,p){if(i&1&&y(0,"dxi-validation-rule",46),i&2){let e=c();w("message","",e.labelForValidation("EmailDomain")," is required")}}function Cr(i,p){if(i&1&&y(0,"dxi-validation-rule",57),i&2){let e=c();a("validationCallback",e.asyncOrganizationDomainValidation)}}function hr(i,p){if(i&1&&y(0,"dxi-validation-rule",58),i&2){let e=c();a("pattern",e.emailDomainPattern)}}function _r(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(2);n(),T(e.profileTooltip("EmailDomain"))}}function xr(i,p){i&1&&(r(0,"div",47),y(1,"i",59),r(2,"dx-tooltip",60),u(3,_r,2,1,"div",50),s()()),i&2&&(n(2),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content"))}function gr(i,p){if(i&1&&y(0,"dxi-validation-rule",46),i&2){let e=c(2);w("message","",e.labelForValidation("CompanyWebsite")," is required")}}function vr(i,p){if(i&1){let e=M();r(0,"div",31)(1,"dx-text-box",24),I("valueChange",function(t){C(e);let l=c();return b(l.companyPersonalInfoModel.companyWebsite,t)||(l.companyPersonalInfoModel.companyWebsite=t),h(t)}),r(2,"dx-validator"),u(3,gr,1,2,"dxi-validation-rule",25),y(4,"dxi-validation-rule",61),s()()()}if(i&2){let e=c();n(),a("labelMode",e.labelMode)("label",e.displayLabel("CompanyWebsite"))("visible",e.isVisible("CompanyWebsite")),v("value",e.companyPersonalInfoModel.companyWebsite),a("ngClass",e.isReadonly("CompanyWebsite")?"disabledDiv":"")("inputAttr",P(8,Qa)),n(2),a("ngIf",e.isRequired("CompanyWebsite")&&!e.isReadonly("CompanyWebsite")),n(),a("pattern",e.domainPattern)}}/localhost/.test(document.location.host)||void 0;var In=(()=>{class i extends ee{constructor(e,o,t){super(),this.companyService=e,this.webStorageService=o,this.memberPermissionService=t,this.companyPageControls=[],this.organizationType=[],this.companyType=[],this.getCompanyDetails=new Nt,this.orgStructureClicked=new Nt,this.organizationInfoCollapseExpand=!1,this.domainPattern=/^(?:(?:https?|ftp):\/\/)?(www\.)?([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}(\/.*)?$/,this.emailDomainPattern=/^(?!www\.)([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,this.formData={},this.stylingMode="outlined",this.labelMode="floating",this.asyncOrganizationValidation=l=>this.CheckForExistingOrganization(l.value),this.asyncOrganizationDomainValidation=l=>this.companyInfo?.isInheritedParentDomain||!l?.value?Promise.resolve(!0):this.checkForExistingOrganizationEmailDomain(l.value),this.currentUser=o.getCurrentmemberToken(),this.CompanyStatus=["Company Status 1","Company Status 2","Company Status 3"],this.companyPersonalInfoModel=new _o}checkCompanyLevelPermission(e){return this.memberPermissionService.hasPermission(!0,e)}
1onOrgStructureClick(){this.orgStructureClicked.emit()}showOrganizationInformationPopupEvent(){this.companyPersonalInfoModel=ln,this.companyPersonalInfoModel=new _o,this.companyPersonalInfoModel.companyId=this.companyInfo.companyId,this.companyPersonalInfoModel.companyName=this.companyInfo.companyName,this.companyPersonalInfoModel.organizationTypeId=this.companyInfo.organizationTypeId,this.companyPersonalInfoModel.companyTypeId=this.companyInfo.companyTypeId,this.companyPersonalInfoModel.status=this.companyInfo.status,this.companyPersonalInfoModel.ein=this.companyInfo.ein,this.companyPersonalInfoModel.isInheritedParentDomain=!!this.companyInfo.isInheritedParentDomain,this.companyPersonalInfoModel.emailDomain=this.companyPersonalInfoModel.isInheritedParentDomain?null:this.companyInfo.emailDomain,this.companyPersonalInfoModel.parentEmailDomain=this.companyInfo.effectiveEmailDomain||this.companyInfo.emailDomain,this.companyPersonalInfoModel.companyWebsite=this.companyInfo.companyWebsite,this.organizationInformationPopup=!0}closeOrganizationInfoPopup(){this.organizationInformationPopup=!1}displayLabel(e){let o=" ",t=this.companyPageControls?.find(l=>l.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase());return t&&(o=t.fieldCaption),o}isReadonly(e){let o=!1,t=this.companyPageControls?.find(l=>l.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase());return t!=null?o=!t.isReadOnly:o=!1,o}isVisible(e){let o=!0,t=this.companyPageControls?.find(l=>l.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase());return t?o=t.isVisible:o=!1,o}isRequired(e){let o=!1,t=this.companyPageControls?.find(l=>l.sourceColumnName!=null&&l.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase());return t&&(o=t.isRequired),o}labelForValidation(e){let o=" ",t=this.companyPageControls?.find(l=>l.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase());return t&&this.organizationInformationPopup&&(this.isRequired(e),o=t.fieldCaption),o}CheckForExistingOrganization(e){return R(this,null,function*(){let o=encodeURIComponent(e),t=yield F(this.companyService.CheckCompanyExistenceByNameAndId(o,this.companyInfo.companyId));return!(t.isSuccess&&t.responseModel==!0)})}isProfileTooltipVisible(e){if(this.companyPageControls.length>0){let o=this.companyPageControls.find(t=>t.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase());if(o!=null)return o.formControlTooltip!=null&&o.formControlTooltip!=""&&o.formControlTooltip!=""&&o.isVisible==!0}return!1}profileTooltip(e){let o=this.companyPageControls.find(t=>t.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase());return o!=null?o.formControlTooltip:""}updateOrganizationType(){let e=this.organizationType.find(o=>o.organizationTypeId==this.companyPersonalInfoModel.organizationTypeId);e&&(this.companyPersonalInfoModel.organizationType=e.organizationTypes)}updateCompanyType(){let e=this.companyType.find(o=>o.companyTypeId==this.companyPersonalInfoModel.companyTypeId);e&&(this.companyPersonalInfoModel.companyType=e.companyTypes)}updateOrganizationStatus(){let e=this.status.find(o=>o.contactStatusTypeID==this.companyPersonalInfoModel.status);e&&(this.companyPersonalInfoModel.contactStatus=e.contactStatus)}checkForExistingOrganizationEmailDomain(e){return R(this,null,function*(){if(!e?.trim())return!0;if(this.companyInfo?.emailDomain?.trim()!=e?.trim()){let o=yield F(this.companyService.CheckCompanyExistenceByEmailDomain(e,this.companyInfo.companyId));return!(o.isSuccess&&o.responseModel==!0)}return!0})}onPersonalInfoSubmit(t){return R(this,arguments,function*({validationGroup:e,event:o}){let l=this.OrganizationInformationGroup.instance.validate();l.status==="pending"&&l.complete.then(m=>R(this,null,function*(){if(m.isValid&&this.companyPersonalInfoModel.companyId>0){this.companyPersonalInfoModel.modifiedByUserId=this.currentUser.userId,(this.companyPersonalInfoModel.isInheritedParentDomain||this.companyInfo?.isInheritedParentDomain)&&(this.companyPersonalInfoModel.isInheritedParentDomain=!0,this.companyPersonalInfoModel.emailDomain=null);let d=this.companyService.UpdateCompanyPersonalInformation(this.companyPersonalInfoModel),A=yield F(d);A&&A.isSuccess?(this.loading=!1,this.showSuccessMessage("Company information has been updated successfully."),this.closeOrganizationInfoPopup(),this.getCompanyDetails.emit()):(this.loading=!1,this.showErrorMessage(A.message))}}))})}toggleOrganizationInformation(){this.organizationInfoCollapseExpand=!this.organizationInfoCollapseExpand}static{this.\u0275fac=function(o){return new(o||i)(E(Bt),E(At),E(kt))}}static{this.\u0275cmp=Q({type:i,selectors:[["app-company-organization-info"]],viewQuery:function(o,t){if(o&1&&z(Wa,5),o&2){let l;q(l=j())&&(t.OrganizationInformationGroup=l.first)}},inputs:{companyInfo:"companyInfo",companyPageControls:"companyPageControls",organizationType:"organizationType",companyType:"companyType",status:"status"},outputs:{getCompanyDetails:"getCompanyDetails",orgStructureClicked:"orgStructureClicked"},standalone:!0,features:[K,X],decls:65,vars:72,consts:[["OrganizationInformationGroup",""],[1,"scroll-outer"],[1,"information-block",3,"ngClass"],[1,"card-outer"],[1,"card-header"],[1,"card-header__title"],[1,"card-header__edit-collapse"],["class","edits org-structure-link","href","javascript:void(0)",3,"click",4,"ngIf"],[4,"ngIf"],["href","javascript:void(0)",1,"collapse",3,"click"],["width","14","height","9","viewBox","0 0 14 9","fill","none","xmlns","http://www.w3.org/2000/svg"],["_ngcontent-uhr-c405","","d","M1 7.5L7 1.5L13 7.5","stroke","#024079","stroke-width","1.8","stroke-linecap","round","stroke-linejoin","round"],[1,"card-content"],[1,"personal-information-box"],[1,"personal-information-box__list"],["class","personal-information-box__items",4,"ngIf"],["container",".dx-viewport",3,"visibleChange","showTitle","dragEnabled","hideOnOutsideClick","visible","wrapperAttr"],[1,"dx-popup-header"],[1,"dx-popup-content-block"],[1,"form-outer"],["id","form",3,"formData"],[1,"scroll-outer","contact-popup","scroll-not-overflow"],[1,"personal-info-outer"],[1,"dx-field"],[3,"valueChange","labelMode","label","visible","value","ngClass","inputAttr"],["type","required",3,"message",4,"ngIf"],["type","async",3,"message","validationCallback"],["class","tooltip-info",4,"ngIf"],["displayExpr","organizationTypes","valueExpr","organizationTypeId","placeholder","Select",1,"select-box","re
1cordtype",3,"valueChange","onValueChanged","showClearButton","labelMode","label","visible","items","value","inputAttr","ngClass"],["displayExpr","companyTypes","valueExpr","companyTypeId","placeholder","Select",1,"select-box","recordtype",3,"valueChange","onValueChanged","showClearButton","labelMode","label","visible","items","value","inputAttr","ngClass"],[3,"valueChange","labelMode","label","visible","inputAttr","value","ngClass"],[1,"dx-field","full-width","full-address"],[3,"valueChange","labelMode","label","visible","value","inputAttr","disabled","ngClass"],["type","async","message","Email Domain already exists",3,"validationCallback",4,"ngIf"],["type","pattern","message","Please enter a valid email domain (e.g. company.com)",3,"pattern",4,"ngIf"],["class","dx-field full-width full-address",4,"ngIf"],[1,"dx-popup-footer",2,"padding-top","1.5rem"],["text","Cancel","stylingMode","contained","type","normal",1,"btn","btn--cancel",3,"onClick"],["text","Save","stylingMode","contained","type","default",1,"btn","btn--primary",3,"onClick"],["href","javascript:void(0)",1,"edits","org-structure-link",3,"click"],["href","javascript:void(0)",1,"edits",3,"click"],["width","12","height","12","viewBox","0 0 12 12","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M7.84042 3.24301L1.98458 9.09692L1.60167 10.4027L2.8813 10.0328L8.75657 4.15951L7.84042 3.24301ZM8.8395 2.24426L9.75565 3.1601L10.6096 2.30644C10.6703 2.24571 10.7045 2.16335 10.7045 2.07747C10.7045 1.9916 10.6703 1.90924 10.6096 1.84851L10.1509 1.39059C10.0901 1.32988 10.0077 1.29577 9.92184 1.29577C9.83594 1.29577 9.75356 1.32988 9.6928 1.39059L8.84015 2.24426H8.8395ZM11.0677 0.474742L11.5258 0.932666C11.8294 1.23632 12 1.64811 12 2.07747C12 2.50684 11.8294 2.91863 11.5258 3.22228L3.5616 11.1845L0.827412 11.9746C0.715963 12.0068 0.597932 12.0084 0.48564 11.9794C0.373349 11.9503 0.270914 11.8917 0.18903 11.8096C0.107147 11.7274 0.0488165 11.6248 0.0201294 11.5125C-0.00855774 11.4001 -0.00654986 11.2822 0.0259434 11.1709L0.834539 8.41489L8.77795 0.474094C9.08171 0.170532 9.49363 0 9.92314 0C10.3526 0 10.7646 0.170532 11.0683 0.474094L11.0677 0.474742Z","fill","white"],[1,"personal-information-box__items"],[1,"label-text"],[1,"value-text"],["type","required",3,"message"],[1,"tooltip-info"],["id","CompanyName",1,"icon","dx-icon-info"],["target","#CompanyName","showEvent","mouseenter","hideEvent","mouseleave",3,"hideOnOutsideClick"],[4,"dxTemplate","dxTemplateOf"],["id","RecordType",1,"icon","dx-icon-info"],["target","#RecordType","showEvent","mouseenter","hideEvent","mouseleave",3,"hideOnOutsideClick"],["id","CompanyTypes",1,"icon","dx-icon-info"],["target","#CompanyTypes","showEvent","mouseenter","hideEvent","mouseleave",3,"hideOnOutsideClick"],["id","EIN",1,"icon","dx-icon-info"],["target","#EIN","showEvent","mouseenter","hideEvent","mouseleave",3,"hideOnOutsideClick"],["type","async","message","Email Domain already exists",3,"validationCallback"],["type","pattern","message","Please enter a valid email domain (e.g. company.com)",3,"pattern"],["id","EmailDomain",1,"icon","dx-icon-info"],["target","#EmailDomain","showEvent","mouseenter","hideEvent","mouseleave",3,"hideOnOutsideClick"],["type","pattern","message","Please enter a valid company website URL (e.g. https://www.example.com)",3,"pattern"]],template:function(o,t){if(o&1){let l=M();r(0,"dx-scroll-view",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h2",5),f(5,"Organization Information"),s(),r(6,"div",6),u(7,Ka,2,0,"a",7)(8,Xa,6,0,"ng-container",8),r(9,"a",9),_("click",function(){return C(l),h(t.toggleOrganizationInformation())}),k(),r(10,"svg",10),y(11,"path",11),s()()()(),U(),r(12,"div",12)(13,"div",13)(14,"ul",14),u(15,Ja,5,2,"li",15)(16,Ya,5,2,"li",15)(17,$a,5,2,"li",15)(18,er,5,2,"li",15)(19,tr,5,2,"li",15)(20,ir,5,2,"li",15),s()()()()()(),r(21,"dx-popup",16),I("visibleChange",function(d){return C(l),b(t.organizationInformationPopup,d)||(t.organizationInformationPopup=d),h(d)}),r(22,"div",17)(23,"h2"),f(24,"Edit Organization Information"),s()(),r(25,"div",18)(26,"dx-validation-group",null,0)(28,"form",19)(29,"dx-form",20)(30,"dxi-item")(31,"dx-scroll-view",21)(32,"div",22)(33,"div",23)(34,"dx-text-box",24),I("valueChange",function(d){return C(l),b(t.companyPersonalInfoModel.companyName,d)||(t.companyPersonalInfoModel.companyName=d),h(d)}
1),r(35,"dx-validator"),u(36,or,1,2,"dxi-validation-rule",25),y(37,"dxi-validation-rule",26),s()(),u(38,ar,4,2,"div",27),s(),r(39,"div",23)(40,"dx-select-box",28),I("valueChange",function(d){return C(l),b(t.companyPersonalInfoModel.organizationTypeId,d)||(t.companyPersonalInfoModel.organizationTypeId=d),h(d)}),_("onValueChanged",function(){return C(l),h(t.updateOrganizationType())}),r(41,"dx-validator"),u(42,rr,1,2,"dxi-validation-rule",25),s()(),u(43,sr,4,2,"div",27),s(),r(44,"div",23)(45,"dx-select-box",29),I("valueChange",function(d){return C(l),b(t.companyPersonalInfoModel.companyTypeId,d)||(t.companyPersonalInfoModel.companyTypeId=d),h(d)}),_("onValueChanged",function(){return C(l),h(t.updateCompanyType())}),r(46,"dx-validator"),u(47,dr,1,2,"dxi-validation-rule",25),s()(),u(48,mr,4,2,"div",27),s(),r(49,"div",23)(50,"dx-text-box",30),I("valueChange",function(d){return C(l),b(t.companyPersonalInfoModel.ein,d)||(t.companyPersonalInfoModel.ein=d),h(d)}),r(51,"dx-validator"),u(52,cr,1,2,"dxi-validation-rule",25),s()(),u(53,fr,4,2,"div",27),s(),r(54,"div",31)(55,"dx-text-box",32),I("valueChange",function(d){return C(l),t.companyPersonalInfoModel.isInheritedParentDomain?t.companyPersonalInfoModel.parentEmailDomain:b(t.companyPersonalInfoModel.emailDomain,d)||(t.companyPersonalInfoModel.emailDomain=d),h(d)}),r(56,"dx-validator"),u(57,yr,1,2,"dxi-validation-rule",25)(58,Cr,1,1,"dxi-validation-rule",33)(59,hr,1,1,"dxi-validation-rule",34),s()(),u(60,xr,4,2,"div",27),s(),u(61,vr,5,9,"div",35),s()()()()()()(),r(62,"div",36)(63,"dx-button",37),_("onClick",function(){return C(l),h(t.closeOrganizationInfoPopup())}),s(),r(64,"dx-button",38),_("onClick",function(d){return C(l),h(t.onPersonalInfoSubmit(d))}),s()()()}if(o&2){let l;n(),a("ngClass",t.organizationInfoCollapseExpand?"collapse":"expand"),n(6),a("ngIf",(t.companyInfo==null?null:t.companyInfo.hasChildCompanies)||((l=t.companyInfo==null?null:t.companyInfo.parentCompanyId)!==null&&l!==void 0?l:0)>0),n(),a("ngIf",t.checkCompanyLevelPermission("Update Company Information")),n(7),a("ngIf",t.isVisible("CompanyName")),n(),a("ngIf",t.isVisible("OrganizationTypes")),n(),a("ngIf",t.isVisible("CompanyTypes")),n(),a("ngIf",t.isVisible("EIN")),n(),a("ngIf",t.isVisible("EmailDomain")),n(),a("ngIf",t.isVisible("CompanyWebsite")),n(),a("showTitle",!1)("dragEnabled",!1)("hideOnOutsideClick",!1),v("visible",t.organizationInformationPopup),a("wrapperAttr",P(66,za)),n(8),a("formData",t.formData),n(5),a("labelMode",t.labelMode)("label",t.displayLabel("CompanyName"))("visible",t.isVisible("CompanyName")),v("value",t.companyPersonalInfoModel.companyName),a("ngClass",t.isReadonly("CompanyName")?"disabledDiv":"")("inputAttr",P(67,qa)),n(2),a("ngIf",t.isRequired("CompanyName")&&!t.isReadonly("CompanyName")),n(),w("message","",t.labelForValidation("CompanyName")," already exists"),a("validationCallback",t.asyncOrganizationValidation),n(),a("ngIf",t.isProfileTooltipVisible("CompanyName")),n(2),a("showClearButton",!0)("labelMode",t.labelMode)("label",t.displayLabel("OrganizationTypes"))("visible",t.isVisible("OrganizationTypes"))("items",t.organizationType),v("value",t.companyPersonalInfoModel.organizationTypeId),a("inputAttr",P(68,ja))("ngClass",t.isReadonly("OrganizationTypes")?"disabledDiv":""),n(2),a("ngIf",t.isRequired("OrganizationTypes")&&!t.isReadonly("OrganizationTypes")),n(),a("ngIf",t.isProfileTooltipVisible("OrganizationTypes")),n(2),a("showClearButton",!0)("labelMode",t.labelMode)("label",t.displayLabel("CompanyTypes"))("visible",t.isVisible("CompanyTypes"))("items",t.companyType),v("value",t.companyPersonalInfoModel.companyTypeId),a("inputAttr",P(69,Ha))("ngClass",t.isReadonly("CompanyTypes")?"disabledDiv":""),n(2),a("ngIf",t.isRequired("CompanyTypes")&&!t.isReadonly("CompanyTypes")),n(),a("ngIf",t.isProfileTooltipVisible("CompanyTypes")),n(2),a("labelMode",t.labelMode)("label",t.displayLabel("EIN"))("visible",t.isVisible("EIN"))("inputAttr",P(70,Ua)),v("value",t.companyPersonalInfoModel.ein),a("ngClass",t.isReadonly("EIN")?"disabledDiv":""),n(2),a("ngIf",t.isRequired("EIN")&&!t.isReadonly("EIN")),n(),a("ngIf",t.isProfileTooltipVisible("EIN")),n(2),a("labelMode",t.labelMode)("label",t.displayLabel("EmailDomain"))("visible",t.isVisible("EmailDomain")),v("value",t.companyPersonalInfoModel.isInheritedParentDomain?t.companyPersonalInfoModel.parentEmailDomain:t.companyPersonalInfoModel.emailDomain),a("inputAttr",P(71,Za))("disabled",!!t.companyPersonalInfoModel.isInheritedParentDomain||t.isReadonly("EmailDomain"))("ngClass",t.isReadonly("EmailDomain")||t.companyPersonalInfoModel.isInheritedParentDomain?"disabledDiv":""),n(2),a("ngIf",t.isRequired("EmailDomain")&&!t.isReadonly("EmailDomain")&&!t.companyPersonalInfoModel.isInheritedParentDomain),n(),a("ngIf",!t.companyPersonalInfoModel.isInheritedParentDomain),n(),a("ngIf",!t.companyPersonalInfoModel.isInheritedParentDomain),n(),a("ngIf",t.isProfileTooltipVisible("EmailDomain")),n(),a("ngIf",t.isVisible("CompanyWebsite"))}},dependencies:[Y,Dt,J,$,pe,jt,zt,qt,se,Rt,It,de,me,ce,ue,fe,ye,wt,Ce,he,_e,xe,ge,ve,be,Yt,Ie,we,Me,De,Pe,Te,Se,Ae,Ee,Ve,Le,Ht,ke,Re,Oe,Be,Ge,Fe,Ne,We,ze,qe,je,He,Ue,Ze,Qe,Ke,Xe,Et,Je,Ye,$e,et,tt,it,ot,Vt,nt,Ut,at,rt,lt,st,dt,pt,mt,ct,ut,pi,ft,yt,Ct,ht,$t,_t,gt,ei,vt,bt,ti,xt,oe,le,re,ae,ne,ie,te],styles:[".card-header__edit-collapse[_ngcontent-%COMP%] .org-structure-link[_ngcontent-%COMP%]{margin-right:1.5rem}.associate-title[_ngcontent-%COMP%]{margin-bottom:2rem;padding-top:2rem}.personal-information-box[_ngcontent-%COMP%]{width:100%;display:block}.personal-information-box__list[_ngcontent-%COMP%]{width:100%;max-width:1000px;margin:0;padding:0;list-style:none;-ms-display:grid;-webkit-display:grid;-moz-display:grid;display:grid;justify-content:flex-start;grid-row-gap:2rem;grid-column-gap:4rem;grid-template-columns:repeat(auto-fill,minmax(min(195px,100%),1fr))}@media (max-width: 1440px){.personal-information-box__list[_ngcontent-%COMP%]{grid-template-columns:repeat(auto-fill,minmax(min(165px,100%),1fr))}}.personal-information-box__items[_ngcontent-%COMP%]{width:100%;margin:0;padding:0;border-right:1px solid var(--border-lighter)}@media (max-width: 600px){.personal-information-box__items[_ngcontent-%COMP%]{border:none}}.personal-information-box__items[_ngcontent-%COMP%] .label-text[_ngcontent-%COMP%]{margin-bottom:.7rem}.personal-information-box__items[_ngcontent-%COMP%]:nth-child(4){border:none;margin:0}.personal-information-box__items[_ngcontent-%COMP%]:last-child{border:none}.personal-info-outer[_ngcontent-%COMP%]{-ms-display:flex;-webkit-display:flex;-moz-display:flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;justify-content:space-between;
1-webkit-justify-content:space-between;max-height:calc(100vh - 200px);padding-right:2.8rem}.personal-info-outer[_ngcontent-%COMP%] .full-width[_ngcontent-%COMP%]{width:100%;max-width:100%}.personal-info-outer[_ngcontent-%COMP%] .full-width[_ngcontent-%COMP%] .dx-field[_ngcontent-%COMP%]{margin-bottom:1.2rem}.personal-info-outer[_ngcontent-%COMP%] .full-width.checkbox-block[_ngcontent-%COMP%]{-ms-display:flex;-webkit-display:flex;-moz-display:flex;display:flex;justify-content:flex-end;margin-bottom:0rem;margin-top:0;padding-right:0}.personal-info-outer[_ngcontent-%COMP%] .full-width.checkbox-block[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{width:auto;margin-left:2.2rem}.personal-info-outer[_ngcontent-%COMP%] .dx-field[_ngcontent-%COMP%]{width:100%;max-width:48%}@media (max-width: 600px){.personal-info-outer[_ngcontent-%COMP%] .dx-field[_ngcontent-%COMP%]{max-width:100%}}.personal-info-outer[_ngcontent-%COMP%] .dx-field.full-width[_ngcontent-%COMP%]{max-width:100%}"]})}}return i})();var br=["DemographicInformationGroup"],Ir=()=>({id:"elementId",class:"popup-outer tooltip-wrapper w-800"}),co=()=>({"aria-label":"{{demo.demographics}}"}),wr=()=>({"aria-label":"Position",class:"drop-down-box-box"}),Mr=()=>({"aria-label":"Unchecked"});function Dr(i,p){if(i&1){let e=M();r(0,"a",27),_("click",function(){C(e);let t=c();return h(t.demographicsPopupEvent())}),r(1,"span"),k(),r(2,"svg",28),y(3,"path",29),s()(),f(4," Edit "),s()}}function Pr(i,p){i&1&&(r(0,"div",30)(1,"p"),f(2,"There are no Demographics added yet."),s()())}function Tr(i,p){if(i&1&&(r(0,"li",34)(1,"label",35),f(2),s(),r(3,"span",36),f(4),s()()),i&2){let e=p.$implicit;n(2),T(e.demographicsType),n(2),T(e.demographics===""?"-":e.demographics)}}function Sr(i,p){if(i&1&&(r(0,"div",31)(1,"ul",32),u(2,Tr,5,2,"li",33),s()()),i&2){let e=c();n(2),a("ngForOf",e.getDemographicsActiveDetails())}}function Ar(i,p){i&1&&(r(0,"h2"),f(1,"Edit Demographics"),s())}function Er(i,p){i&1&&(r(0,"h2"),f(1,"Add Demographics"),s())}
1function Vr(i,p){if(i&1&&(r(0,"dx-validator"),y(1,"dxi-validation-rule",46),s()),i&2){let e=c(2).$implicit;n(),w("message","",e.demographics," is required")}}function Lr(i,p){if(i&1){let e=M();r(0,"dx-text-box",45),I("valueChange",function(t){C(e);let l=c().$implicit;return b(l.demographicsStringVal,t)||(l.demographicsStringVal=t),h(t)}),u(1,Vr,2,2,"dx-validator",17),s()}if(i&2){let e=c().$implicit,o=c();hi("label","",e.demographics,"",e.isRequired?"*":"",""),a("labelMode",o.labelMode),v("value",e.demographicsStringVal),a("inputAttr",P(8,co))("ngClass",e.isReadOnly?"":"disabledDiv"),n(),a("ngIf",e.isRequired&&e.isReadOnly)}}function kr(i,p){if(i&1&&(r(0,"dx-validator"),y(1,"dxi-validation-rule",46),s()),i&2){let e=c(2).$implicit;n(),w("message","",e.demographics," is required")}}function Rr(i,p){if(i&1){let e=M();r(0,"dx-select-box",47),I("valueChange",function(t){C(e);let l=c().$implicit;return b(l.demographicsStringVal,t)||(l.demographicsStringVal=t),h(t)}),u(1,kr,2,2,"dx-validator",17),s()}if(i&2){let e=c().$implicit,o=c();hi("label","",e.demographics,"",e.isRequired?"*":"",""),a("labelMode",o.labelMode)("items",e.demographicDetails),v("value",e.demographicsStringVal),a("inputAttr",P(10,co))("ngClass",e.isReadOnly?"":"disabledDiv")("showClearButton",!0),n(),a("ngIf",e.isRequired&&e.isReadOnly)}}
1function Or(i,p){if(i&1&&(r(0,"dx-validator"),y(1,"dxi-validation-rule",46),s()),i&2){let e=c(2).$implicit;n(),w("message","",e.demographics," is required")}}function Br(i,p){if(i&1){let e=M();r(0,"dx-date-box",48),_("onValueChanged",function(t){C(e);let l=c().$implicit,m=c();return h(m.setDateValue(t,l.demographicsTypeID))}),u(1,Or,2,2,"dx-validator",17),s()}if(i&2){let e=c().$implicit,o=c();hi("label","",e.demographics,"",e.isRequired?"*":"",""),a("labelMode",o.labelMode)("value",e.demographicsDateVal)("inputAttr",P(8,co))("ngClass",e.isReadOnly?"":"disabledDiv"),n(),a("ngIf",e.isRequired&&e.isReadOnly)}}function Gr(i,p){if(i&1&&(r(0,"dx-validator"),y(1,"dxi-validation-rule",46),s()),i&2){let e=c(2).$implicit;n(),w("message","",e.demographics," is required")}}function Fr(i,p){if(i&1){let e=M();r(0,"dx-number-box",49),I("valueChange",function(t){C(e);let l=c().$implicit;return b(l.demographicsNumberVal,t)||(l.demographicsNumberVal=t),h(t)}),u(1,Gr,2,2,"dx-validator",17),s()}if(i&2){let e=c().$implicit,o=c();hi("label","",e.demographics,"",e.isRequired?"*":"",""),a("labelMode",o.labelMode)("inputAttr",P(10,co)),v("value",e.demographicsNumberVal),a("min",0)("showSpinButtons",!0)("ngClass",e.isReadOnly?"":"disabledDiv"),n(),a("ngIf",e.isRequired&&e.isReadOnly)}}function Nr(i,p){if(i&1){let e=M();r(0,"div",52)(1,"dx-tree-view",53,1),I("searchValueChange",function(t){C(e);let l=c(2).$implicit;return b(l.treeBoxSearchValue,t)||(l.treeBoxSearchValue=t),h(t)}),_("onContentReady",function(t){C(e);let l=c(2).$implicit,m=c();return h(m.onDemoTreeViewReady(t,l.demographicsTypeID))})("onItemSelectionChanged",function(t){C(e);let l=c(2).$implicit,m=c();return h(m.onDemoTreeViewSelectionChanged(t,l.demographicsTypeID))}),s()()}if(i&2){let e=c(2).$implicit;n(),a("dataSource",e.options)("useNativeScrolling",!0),v("searchValue",e.treeBoxSearchValue),a("searchEnabled",!0)("selectByClick",!0)}}
1function Wr(i,p){if(i&1&&(r(0,"dx-validator"),y(1,"dxi-validation-rule",46),s()),i&2){let e=c(2).$implicit;n(),w("message","",e.demographics," is required")}}function zr(i,p){if(i&1){let e=M();r(0,"dx-drop-down-box",50),I("valueChange",function(t){C(e);let l=c().$implicit;return b(l.demographicsTreeBoxValue,t)||(l.demographicsTreeBoxValue=t),h(t)}),_("onOpened",function(t){C(e);let l=c().$implicit,m=c();return h(m.onDemoMultiselectOpened(t,l.demographicsTypeID))})("onClosed",function(t){C(e);let l=c().$implicit,m=c();return h(m.onDemoMultiselectClosed(t,l.demographicsTypeID))}),u(1,Nr,3,5,"div",51)(2,Wr,2,2,"dx-validator",17),s()}if(i&2){let e=c().$implicit,o=c();hi("label","",e.demographics,"",e.isRequired?"*":"",""),a("labelMode",o.labelMode)("inputAttr",P(10,wr))("dataSource",e.options),v("value",e.demographicsTreeBoxValue),a("disabled",!e.isReadOnly),n(),a("dxTemplateOf","content"),n(),a("ngIf",e.isRequired)}}function qr(i,p){if(i&1){let e=M();r(0,"dx-check-box",54),I("valueChange",function(t){C(e);let l=c().$implicit;return b(l.demographicsBoolVal,t)||(l.demographicsBoolVal=t),h(t)}),s()}if(i&2){let e=c().$implicit;a("elementAttr",P(3,Mr))("text",e.demographics),v("value",e.demographicsBoolVal)}}function jr(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(2).$implicit;n(),O(" ",e.controlTooltip," ")}}function Hr(i,p){if(i&1&&(r(0,"div",55),y(1,"i",56),r(2,"dx-tooltip",57),u(3,jr,2,1,"div",58),s()()),i&2){let e=c().$implicit,o=c();n(),w("id","demographics_",o.removeSpace(e.demographics),""),n(),w("target","#demographics_",o.removeSpace(e.demographics),""),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content")}}function Ur(i,p){if(i&1&&(r(0,"div",37),u(1,Lr,2,9,"dx-text-box",38)(2,Rr,2,11,"dx-select-box",39)(3,Br,2,9,"dx-date-box",40)(4,Fr,2,11,"dx-number-box",41)(5,zr,3,11,"dx-drop-down-box",42)(6,qr,1,4,"dx-check-box",43)(7,Hr,4,6,"div",44),s()),i&2){let e=p.$implicit;n(),a("ngIf",e.controlType==="TextBox"),n(),a("ngIf",e.controlType==="Selectbox"),n(),a("ngIf",e.controlType==="Datepicker"),n(),a("ngIf",e.controlType==="Numberbox"),n(),a("ngIf",e.controlType==="MultiSelectbox"),n(),a("ngIf",e.controlType==="CheckBox"||e.controlType==="Checkbox"),n(),a("ngIf",e.controlTooltip!==""&&e.controlTooltip!=null)}}var Mn=(()=>{class i extends ee{constructor(e,o,t,l,m){super(),this.utilityService=e,this.companyService=o,this.webStorageService=t,this.router=l,this.memberPermissionService=m,this.companyDemographics=[],this.getCompanyDetails=new Nt,this.formData={},this.stylingMode="outlined",this.labelMode="floating",this.demographicsTypes=[],this.unsubscriber=new Lt,this.currentUser=t.getCurrentmemberToken()}ngOnInit(){return R(this,null,function*(){yield this.getDemographicsData()})}checkCompanyLevelPermission(e){return this.memberPermissionService.hasPermission(!0,e)}demographicsPopupEvent(){this.router.navigate(["member/interests/"+this.companyId])}closeDemographicsPopup(){this.addCompanyDemographics=ho,this.addCompanyDemographics=new Co,this.addDemographicsPopup=!1}getDemographicsActiveDetails(){let e=[];return this.companyDemographics?.filter(o=>o.isActive).forEach(o=>{let t=this.demographicsTypes.find(l=>l.demographicsTypeID==o.demographicsTypeID&&l.isVisible);t&&t.controlType=="Checkbox"&&(o.demographics=o.demographics.toString()=="True"||o.demographics.toString()=="Yes"?"Yes":"No"),e.push(o)}),e}getDemographicsData(){return R(this,null,function*(){this.loading=!0;let e=this.utilityService.GetDemographicTypesByEntityName(Wo.Company.toString(),this.companyId).pipe(N(this.unsubscriber),Z(()=>this.loading=!1)),o=yield F(e);this.processResult(o,()=>{this.loading=!1,o&&o.isSuccess?o.responseModel!=null&&o.responseModel!=null&&(this.demographicsTypes=o.responseModel??[],this.demographicsTypes.forEach(t=>{t.isChecked=!1}),console.log(this.demographicsTypes)):(this.loading=!1,this.showErrorMessage(o.message))})})}demographicsInformation(){this.demographicsInfoCollapseExpand=!this.demographicsInfoCollapseExpand}getActiveDemographics(){return this.demographicsTypes.filter(e=>e.isVisible)}setDateValue(e,o){if(e.value!=""&&e.value!=null){let t=this.demographicsTypes.find(l=>l.demographicsTypeID==o);t&&(t.demographicsDateVal=e.value)}}removeSpace(e){return e=e.replace(/[^a-zA-Z0-9]/g,""),e}onFormDemographicsSubmit(t){return R(this,arguments,function*({validationGroup:e,event:o}){if(!this.DemographicInformationGroup.instance.validate().isValid)return;this.loading=!0;let m=!1,d,A=[];
1if(this.demographicsTypes.filter(x=>x.isVisible).forEach(x=>{let G=ho;G=new Co,G.demographicsTypeID=x.demographicsTypeID,G.demographics=x.controlType=="Numberbox"?x.demographicsNumberVal==null||x.demographicsNumberVal==0?"":x.demographicsNumberVal.toString():x.controlType=="Datepicker"?x.demographicsDateVal==null?"":this.convertDemoDate(x.demographicsDateVal.toString()):x.demographicsStringVal,G.demographics==null&&(G.demographics=""),G.modifiedByUserId=this.currentUser.userId,G.companyDemographicsId=x.contactDemographicsId==null?0:x.contactDemographicsId,G.companyId=this.companyId,G.demographicsId=x.demographicsId==null?0:x.demographicsId,G.isActive=!0,A.push(G)}),m)return this.showErrorMessage(d);let L=this.companyService.AddCompanyDemographics(A),V=yield F(L);this.loading=!1,V&&V.isSuccess?(this.companyDemographics?.length>0?this.showSuccessMessage("Company demographic information has been updated successfully"):this.showSuccessMessage("Company demographic information has been added successfully"),yield this.getDemographicsData(),this.getCompanyDetails.emit(),this.closeDemographicsPopup()):(this.loading=!1,this.showErrorMessage(V.message))})}convertDemoDate(e){let o=new Date(e),t=("0"+(o.getMonth()+1)).slice(-2),l=("0"+o.getDate()).slice(-2);return[t,l,o.getFullYear()].join("-")}onDemoMultiselectClosed(e,o){this.demographicsTypes.filter(t=>t.demographicsTypeID==o).forEach(t=>{t.treeBoxSearchValue=""})}onDemoMultiselectOpened(e,o){let t=this.demographicsTypes.find(l=>l.demographicsTypeID==o)?.demographicsTreeBoxValue;setTimeout(()=>{let l=e.component?.content()?.querySelector(".dx-treeview");if(l){let m=window.DevExpress?.ui?.dxTreeView?.getInstance(l);m&&(m.getScrollable()?.update(),t&&this.updateDemographicsSelection(m,t))}})}onDemoTreeViewReady(e,o){let t=this.demographicsTypes.find(l=>l.demographicsTypeID==o)?.demographicsTreeBoxValue;this.updateDemographicsSelection(e.component,t),e.component.getScrollable()?.update()}updateDemographicsSelection(e,o){e&&(o||e.unselectAll(),o&&o.length==0&&e.unselectAll(),o?.forEach(t=>{e.selectItem(t)}))}onDemoTreeViewSelectionChanged(e,o){let t=this.demographicsTypes.find(d=>d.demographicsTypeID==o).demographicsTreeBoxValue,l=t??new Array;e.node.selected==!1&&(l=l.filter(d=>d!=String(e.node.key)));let m=e.component.getSelectedNodeKeys();m.length>0&&m.forEach(d=>{l.find(L=>L==d)||l.push(d)}),this.demographicsTypes.filter(d=>d.demographicsTypeID==o).forEach(d=>{d.demographicsTreeBoxValue=JSON.parse(JSON.stringify(l)),d.demographicsStringVal=d.demographicsTreeBoxValue.join(",")})}static{this.\u0275fac=function(o){return new(o||i)(E(_i),E(Bt),E(At),E(Wt),E(kt))}}static{this.\u0275cmp=Q({type:i,selectors:[["app-company-demographics"]],viewQuery:function(o,t){if(o&1&&z(br,5),o&2){let l;q(l=j())&&(t.DemographicInformationGroup=l.first)}},inputs:{companyDemographics:"companyDemographics",companyId:"companyId"},outputs:{getCompanyDetails:"getCompanyDetails"},standalone:!0,features:[K,X],decls:30,vars:14,consts:[["DemographicInformationGroup",""],["treeView",""],[1,"scroll-outer"],[1,"information-block",3,"ngClass"],[1,"card-outer"],[1,"card-header"],[1,"card-header__title"],[1,"card-header__edit-collapse"],["class","edits","href","javascript:void(0)",3,"click",4,"ngIf"],["href","javascript:void(0)",1,"collapse",3,"click"],["width","14","height","9","viewBox","0 0 14 9","fill","none","xmlns","http://www.w3.org/2000/svg"],["_ngcontent-uhr-c405","","d","M1 7.5L7 1.5L13 7.5","stroke","#024079","stroke-width","1.8","stroke-linecap","round","stroke-linejoin","round"],["class","empty-card",4,"ngIf"],[1,"card-content"],["class","personal-information-box",4,"ngIf"],["container",".dx-viewport",3,"visibleChange","showTitle","dragEnabled","hideOnOutsideClick","visible","wrapperAttr"],[1,"dx-popup-header"],[4,"ngIf"],[1,"dx-popup-content-block"],[1,"form-outer"],["id","demographicsform",3,"formData"],[1,"scroll-outer","contact-popup"],[1,"adddemographics-popup"],["class","dx-field",4,"ngFor","ngForOf"],[1,"dx-popup-footer"],["text","Cancel","stylingMode","contained","type","normal",1,"btn","btn--cancel",3,"onClick"],["text","Save","stylingMode","contained","type","default",1,"btn","btn--primary",3,"onClick"],["href","javascript:void(0)",1,"edits",3,"click"],["width","12","height","12","viewBox","0 0 12 12","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M7.84042 3.24301L1.98458 9.09692L1.60167 10.4027L2.8813 10.0328L8.75657 4.15951L7.84042 3.24301ZM8.8395 2.24426L9.75565 3.1601L10.6096 2.30644C10.6703 2.24571 10.7045 2.16335 10.7045 2.07747C10.7045 1.9916 10.6703 1.90924 10.6096 1.84851L10.1509 1.39059C10.0901 1.32988 10.0077 1.29577 9.92184
11.29577C9.83594 1.29577 9.75356 1.32988 9.6928 1.39059L8.84015 2.24426H8.8395ZM11.0677 0.474742L11.5258 0.932666C11.8294 1.23632 12 1.64811 12 2.07747C12 2.50684 11.8294 2.91863 11.5258 3.22228L3.5616 11.1845L0.827412 11.9746C0.715963 12.0068 0.597932 12.0084 0.48564 11.9794C0.373349 11.9503 0.270914 11.8917 0.18903 11.8096C0.107147 11.7274 0.0488165 11.6248 0.0201294 11.5125C-0.00855774 11.4001 -0.00654986 11.2822 0.0259434 11.1709L0.834539 8.41489L8.77795 0.474094C9.08171 0.170532 9.49363 0 9.92314 0C10.3526 0 10.7646 0.170532 11.0683 0.474094L11.0677 0.474742Z","fill","white"],[1,"empty-card"],[1,"personal-information-box"],[1,"personal-information-box__list"],["class","personal-information-box__items",4,"ngFor","ngForOf"],[1,"personal-information-box__items"],[1,"label-text"],[1,"value-text"],[1,"dx-field"],[3,"labelMode","label","value","inputAttr","ngClass","valueChange",4,"ngIf"],["class","select-box recordtype","placeholder","Select",3,"labelMode","items","label","value","inputAttr","ngClass","showClearButton","valueChange",4,"ngIf"],["class","date-box","type","date",3,"labelMode","label","value","inputAttr","ngClass","onValueChanged",4,"ngIf"],["class","select-box numbertype","format","####",3,"labelMode","label","inputAttr","value","min","showSpinButtons","ngClass","valueChange",4,"ngIf"],["placeholder","Select","class","select-box","valueExpr","description","displayExpr","description",3,"labelMode","label","inputAttr","dataSource","value","disabled","valueChange","onOpened","onClosed",4,"ngIf"],[3,"elementAttr","text","value","valueChange",4,"ngIf"],["class","tooltip-info",4,"ngIf"],[3,"valueChange","labelMode","label","value","inputAttr","ngClass"],["type","required",3,"message"],["placeholder","Select",1,"select-box","recordtype",3,"valueChange","labelMode","items","label","value","inputAttr","ngClass","showClearButton"],["type","date",1,"date-box",3,"onValueChanged","labelMode","label","value","inputAttr","ngClass"],["format","####",1,"select-box","numbertype",3,"valueChange","labelMode","label","inputAttr","value","min","showSpinButtons","ngClass"],["placeholder","Select","valueExpr","description","displayExpr","description",1,"select-box",3,"valueChange","onOpened","onClosed","labelMode","label","inputAttr","dataSource","value","disabled"],["class","multiple-outer",4,"dxTemplate","dxTemplateOf"],[1,"multiple-outer"],["dataStructure","plain","selectionMode","multiple","showCheckBoxesMode","normal","keyExpr","description","displayExpr","description",3,"searchValueChange","onContentReady","onItemSelectionChanged","dataSource","useNativeScrolling","searchValue","searchEnabled","selectByClick"],[3,"valueChange","elementAttr","text","value"],[1,"tooltip-info"],[1,"icon","dx-icon-info",3,"id"],["showEvent","mouseenter","hideEvent","mouseleave",3,"target","hideOnOutsideClick"],[4,"dxTemplate","dxTemplateOf"]],template:function(o,t){if(o&1){let l=M();r(0,"dx-scroll-view",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"h2",6),f(5,"Demographics"),s(),r(6,"div",7),u(7,Dr,5,0,"a",8),r(8,"a",9),_("click",function(){return C(l),h(t.demographicsInformation())}),k(),r(9,"svg",10),y(10,"path",11),s()()()(),u(11,Pr,3,0,"div",12),U(),r(12,"div",13),u(13,Sr,3,1,"div",14),s()()()(),r(14,"dx-popup",15),I("visibleChange",function(d){return C(l),b(t.addDemographicsPopup,d)||(t.addDemographicsPopup=d),h(d)}),r(15,"div",16),u(16,Ar,2,0,"h2",17)(17,Er,2,0,"h2",17),s(),r(18,"div",18)(19,"form",19)(20,"dx-validation-group",null,0)(22,"dx-form",20)(23,"dxi-item")(24,"dx-scroll-view",21)(25,"div",22),u(26,Ur,8,7,"div",23),s()()()()()()(),r(27,"div",24)(28,"dx-button",25),_("onClick",function(){return C(l),h(t.closeDemographicsPopup())}),s(),r(29,"dx-button",26),_("onClick",function(d){return C(l),h(t.onFormDemographicsSubmit(d))}),s()()()}o&2&&(n(),a("ngClass",t.demographicsInfoCollapseExpand?"collapse":"expand"),n(6),a("ngIf",t.checkCompanyLevelPermission("Update Company Information")&&t.checkCompanyLevelPermission("Update Demographics")),n(4),a("ngIf",!t.loading&&(!t.companyDemographics||(t.companyDemographics==null?null:t.companyDemographics.length)==0)),n(2),a("ngIf",(t.companyDemographics==null?null:t.companyDemographics.length)>0),n(),a("showTitle",!1)("dragEnabled",!1)("hideOnOutsideClick",!1),v("visible",t.addDemographicsPopup),a("wrapperAttr",P(13,Ir)),n(2),a("ngIf",t.companyDemographics!=null&&(t.companyDemographics==null?null:t.companyDemographics.length)>0),n(),a("ngIf",t.companyDemographics==null||(t.companyDemographics==null?null:t.companyDemographics.length)==0),n(5),a("formData",t.addCompanyDemographics),n(4),a("ngForOf",t.getActiveDemographics()))},dependencies:[Y,Dt,Ti,J,$,pe,jt,zt,qt,se,Rt,It,de,me,ce,ue,fe,ye,wt,Ce,he,_e,xe,Ei,ge,ve,be,Yt,Ie,xi,we,Me,De,Pe,Te,oo,Se,Ae,Ee,Ve,Le,Ht,ke,Re,Oe,Be,Ge,Fe,Ne,We,ze,qe,je,He,Ue,Go,Ze,Qe,Ke,Xe,Et,Je,Ye,$e,et,tt,it,ot,Vt,nt,Ut,at,rt,lt,st,dt,pt,mt,ct,ut,pi,ft,yt,Ct,ht,$t,_t,gt,ei,vt,bt,ti,xt,ao,oe,le,re,ae,ne,ie,te],styles:[".associate-title[_ngcontent-%COMP%]{margin-bottom:2rem;padding-top:2rem}.personal-information-box[_ngcontent-%COMP%]{width:100%;display:block}.personal-information-box__list[_ngcontent-%COMP%]{width:100%;max-width:1000px;margin:0;padding:0;list-style:none;-ms-display:grid;-webkit-display:grid;-moz-display:grid;display:grid;justify-content:flex-start;grid-row-gap:2rem;grid-column-gap:4rem;grid-template-columns:repeat(auto-fill,minmax(min(195px,100%),1fr))}@media (max-width: 1440px){.personal-information-box__list[_ngcontent-%COMP%]{grid-template-columns:repeat(auto-fill,minmax(min(165px,100%),1fr))}}.personal-information-box__items[_ngcontent-%COMP%]{width:100%;margin:0;padding:0;border-right:1px solid var(--border-lighter)}@media (max-width: 600px){.personal-information-box__items[_ngcontent-%COMP%]{border:none}}.personal-information-box__items[_ngcontent-%COMP%] .label-text[_ngcontent-%COMP%]{margin-bottom:.7rem}.personal-information-box__items[_ngcontent-%COMP%]:nth-child(4){border:none;margin:0}.personal-information-box__items[_ngcontent-%COMP%]:last-child{border:none}.adddemographics-popup[_ngcontent-%COMP%]{-ms-display:flex;-webkit-display:flex;-moz-display:flex;display:flex;flex-wrap:wrap;justify-content:space-between;
1-webkit-justify-content:space-between;max-height:calc(100vh - 200px);padding-right:2.8rem;align-items:flex-start}@media (max-width: 600px){.adddemographics-popup[_ngcontent-%COMP%]{padding-right:0rem}}.personal-info-outer[_ngcontent-%COMP%]{-ms-display:flex;-webkit-display:flex;-moz-display:flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;justify-content:space-between;-webkit-justify-content:space-between;max-height:calc(100vh - 200px);padding-right:2.8rem}.personal-info-outer[_ngcontent-%COMP%] .full-width[_ngcontent-%COMP%]{width:100%;max-width:100%}.personal-info-outer[_ngcontent-%COMP%] .full-width[_ngcontent-%COMP%] .dx-field[_ngcontent-%COMP%]{margin-bottom:1.2rem}.personal-info-outer[_ngcontent-%COMP%] .full-width.checkbox-block[_ngcontent-%COMP%]{-ms-display:flex;-webkit-display:flex;-moz-display:flex;display:flex;justify-content:flex-end;margin-bottom:0rem;margin-top:0;padding-right:0}.personal-info-outer[_ngcontent-%COMP%] .full-width.checkbox-block[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{width:auto;margin-left:2.2rem}.personal-info-outer[_ngcontent-%COMP%] .dx-field[_ngcontent-%COMP%]{width:100%;max-width:48%}.personal-info-outer[_ngcontent-%COMP%] .dx-field.full-width[_ngcontent-%COMP%]{max-width:100%}"]})}}return i})();var Zr=["AddresInformationGroup"],Qr=["AddAddresInformationGroup"],Kr=["addressCountry"],Xr=["addressState"],Jr=()=>({id:"elementId",class:"popup-outer tooltip-wrapper w-1200 popup-scroll-inner"}),Yr=()=>({id:"elementId",class:"popup-outer tooltip-wrapper w-1200"}),Dn=()=>({"aria-label":"StreetAddress"}),Pn=()=>({"aria-label":"Suite/Floor"}),Tn=()=>({"aria-label":"City"}),Sn=()=>({"aria-label":"State"}),An=()=>({"aria-label":"Country"}),En=()=>({"aria-label":"Zip"}),Vn=()=>({"aria-label":"Address Type"}),bo=()=>({"aria-label":"checked"});function $r(i,p){if(i&1){let e=M();r(0,"a",19),_("click",function(){C(e);let t=c();return h(t.EditAddressInformationPopupEvent())}),r(1,"span"),k(),r(2,"svg",20),y(3,"path",50),s()(),f(4," Edit "),s()}}function el(i,p){i&1&&(r(0,"div",51)(1,"p"),f(2,"There are no Address added yet."),s()())}function tl(i,p){i&1&&(r(0,"span",59),f(1,"Primary"),s())}function il(i,p){i&1&&(r(0,"span",59),f(1,"Billing"),s())}function ol(i,p){i&1&&(r(0,"span",59),f(1,"Public"),s())}function nl(i,p){if(i&1&&(r(0,"div",54)(1,"div",55)(2,"span"),f(3),s()(),y(4,"address",56),r(5,"div",57),u(6,tl,2,0,"span",58)(7,il,2,0,"span",58)(8,ol,2,0,"span",58),s()()),i&2){let e=p.$implicit,o=c(2);n(3),T(e.addressType),n(),a("innerHTML",o.displayAddress(e),To),n(2),a("ngIf",e.isPrimary),n(),a("ngIf",e.isBilling),n(),a("ngIf",e.isPublic)}}function al(i,p){if(i&1&&(r(0,"div",52),u(1,nl,9,5,"div",53),s()),i&2){let e=c();n(),a("ngForOf",e.companyAddressesDisplay)}}function rl(i,p){if(i&1&&y(0,"dxi-validation-rule",74),i&2){let e=c().$implicit,o=c(2);w("message","",o.getAddressPropertyLabelForValidation("AddressLine1",e.parentAddressTypeId)," is required")}}function ll(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(2).$implicit,o=c(2);n(),O(" ",o.addressTooltip("AddressLine1",e.addressType)," ")}}function sl(i,p){if(i&1&&(r(0,"div",75),y(1,"i",76),r(2,"dx-tooltip",77),u(3,ll,2,1,"div",78),s()()),i&2){let e=c().index;n(),w("id","addcompanyaddressLine1",e,""),n(),w("target","#addcompanyaddressLine1",e,""),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content")}}function dl(i,p){if(i&1&&y(0,"dxi-validation-rule",74),i&2){let e=c().$implicit,o=c(2);w("message","",o.getAddressPropertyLabelForValidation("AddressLine2",e.parentAddressTypeId)," is required")}}function pl(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(2).$implicit,o=c(2);n(),O(" ",o.addressTooltip("AddressLine2",e.addressType)," ")}}function ml(i,p){if(i&1&&(r(0,"div",75),y(1,"i",76),r(2,"dx-tooltip",77),u(3,pl,2,1,"div",78),s()()),i&2){let e=c().index;n(),w("id","addcompanyAddressLine2",e,""),n(),w("target","#addcompanyAddressLine2",e,""),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content")}}function cl(i,p){if(i&1&&y(0,"dxi-validation-rule",74),i&2){let e=c().$implicit,o=c(2);w("message","",o.getAddressPropertyLabelForValidation("City",e.parentAddressTypeId)," is required")}}function ul(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(2).$implicit,o=c(2);n(),O(" ",o.addressTooltip("City",e.addressType)," ")}}function fl(i,p){if(i&1&&(r(0,"div",75),y(1,"i",76),r(2,"dx-tooltip",77),u(3,ul,2,1,"div",78),s()()),i&2){let e=c().index;
1n(),w("id","addcompanyCity",e,""),n(),w("target","#addcompanyCity",e,""),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content")}}function yl(i,p){if(i&1&&y(0,"dxi-validation-rule",74),i&2){let e=c().$implicit,o=c(2);w("message","",o.getAddressPropertyLabelForValidation("State",e.parentAddressTypeId)," is required")}}function Cl(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(2).$implicit,o=c(2);n(),O(" ",o.addressTooltip("State",e.addressType)," ")}}function hl(i,p){if(i&1&&(r(0,"div",75),y(1,"i",76),r(2,"dx-tooltip",77),u(3,Cl,2,1,"div",78),s()()),i&2){let e=c().index;n(),w("id","addcompanyState",e,""),n(),w("target","#addcompanyState",e,""),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content")}}function _l(i,p){if(i&1&&y(0,"dxi-validation-rule",74),i&2){let e=c().$implicit,o=c(2);w("message","",o.getAddressPropertyLabelForValidation("Country",e.parentAddressTypeId)," is required")}}function xl(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(2).$implicit,o=c(2);n(),O(" ",o.addressTooltip("Country",e.addressType)," ")}}function gl(i,p){if(i&1&&(r(0,"div",75),y(1,"i",76),r(2,"dx-tooltip",77),u(3,xl,2,1,"div",78),s()()),i&2){let e=c().index;n(),w("id","addcompanyCountry",e,""),n(),w("target","#addcompanyCountry",e,""),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content")}}function vl(i,p){if(i&1&&y(0,"dxi-validation-rule",74),i&2){let e=c().$implicit,o=c(2);w("message","",o.getAddressPropertyLabelForValidation("Zipcode",e.parentAddressTypeId)," is required")}}function bl(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(2).$implicit,o=c(2);n(),O(" ",o.addressTooltip("Zipcode",e.addressType)," ")}}function Il(i,p){if(i&1&&(r(0,"div",75),y(1,"i",76),r(2,"dx-tooltip",77),u(3,bl,2,1,"div",78),s()()),i&2){let e=c().index;n(),w("id","addcompanyZipcode",e,""),n(),w("target","#addcompanyZipcode",e,""),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content")}}function wl(i,p){if(i&1&&y(0,"dxi-validation-rule",74),i&2){let e=c().$implicit,o=c(2);w("message","",o.getAddressPropertyLabelForValidation("AddressTypeId",e.parentAddressTypeId)," is required")}}function Ml(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(2).$implicit,o=c(2);n(),O(" ",o.addressTooltip("AddressTypeId",e.addressType)," ")}}function Dl(i,p){if(i&1&&(r(0,"div",75),y(1,"i",76),r(2,"dx-tooltip",77),u(3,Ml,2,1,"div",78),s()()),i&2){let e=c().index;n(),w("id","addcompanyAddressTypeId",e,""),n(),w("target","#addcompanyAddressTypeId",e,""),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content")}}function Pl(i,p){if(i&1){let e=M();r(0,"div",33)(1,"div",34)(2,"div",35)(3,"dx-text-box",62),I("valueChange",function(t){let l=C(e).$implicit;return b(l.addressLine1,t)||(l.addressLine1=t),h(t)}),r(4,"dx-validator"),u(5,rl,1,2,"dxi-validation-rule",37),s()(),u(6,sl,4,6,"div",38),s(),r(7,"div",39)(8,"dx-text-box",62),I("valueChange",function(t){let l=C(e).$implicit;return b(l.addressLine2,t)||(l.addressLine2=t),h(t)}),r(9,"dx-validator"),u(10,dl,1,2,"dxi-validation-rule",37),s()(),u(11,ml,4,6,"div",38),s(),r(12,"div",39)(13,"dx-text-box",62),I("valueChange",function(t){let l=C(e).$implicit;return b(l.city,t)||(l.city=t),h(t)}),r(14,"dx-validator"),u(15,cl,1,2,"dxi-validation-rule",37),s()(),u(16,fl,4,6,"div",38),s(),r(17,"div",39)(18,"dx-select-box",63),I("valueChange",function(t){let l=C(e).$implicit;return b(l.state,t)||(l.state=t),h(t)}),r(19,"dx-validator"),u(20,yl,1,2,"dxi-validation-rule",37),s()(),u(21,hl,4,6,"div",38),s(),r(22,"div",39)(23,"dx-select-box",64),I("valueChange",function(t){let l=C(e).$implicit;return b(l.country,t)||(l.country=t),h(t)}),_("onValueChanged",function(t){let l=C(e).$implicit,m=c(2);return h(m.onSelectCompanyCountry(t,l))}),r(24,"dx-validator"),u(25,_l,1,2,"dxi-validation-rule",37),s()(),u(26,gl,4,6,"div",38),s(),r(27,"div",39)(28,"dx-text-box",62),I("valueChange",function(t){let l=C(e).$implicit;return b(l.zipcode,t)||(l.zipcode=t),h(t)}),r(29,"dx-validator"),u(30,vl,1,2,"dxi-validation-rule",37),s()(),u(31,Il,4,6,"div",38),s()(),r(32,"div",42)(33,"div",39)(34,"dx-select-box",65),I("valueChange",function(t){let l=C(e).$implicit;return b(l.parentAddressTypeId,t)||(l.parentAddressTypeId=t),h(t)}),_("onValueChanged",function(){let t=C(e).$implicit,l=c(2);return h(l.onAddressTypeChanged(t))}
1),r(35,"dx-validator"),u(36,wl,1,2,"dxi-validation-rule",37),s()(),u(37,Dl,4,6,"div",38),s(),r(38,"div",44)(39,"div",66)(40,"input",67),_("click",function(t){let l=C(e).$implicit,m=c(2);return h(m.handleCompanyPrimaryValueChange(t,l.addressId))}),s(),r(41,"label",68)(42,"div",69),f(43),s()()(),r(44,"div",66)(45,"input",67),_("click",function(t){let l=C(e).$implicit,m=c(2);return h(m.handleCompanyBillingValueChange(t,l.addressId))}),s(),r(46,"label",68)(47,"div",69),f(48),s()()(),r(49,"div",66)(50,"input",67),_("click",function(t){let l=C(e).$implicit,m=c(2);return h(m.handleCompanyPublicValueChange(t,l.addressId))}),s(),r(51,"label",68)(52,"div",69),f(53),s()()()()(),r(54,"div",70)(55,"a",71),_("click",function(){let t=C(e).$implicit,l=c(2);return h(l.onDeleteAddress(t))}),k(),r(56,"svg",72),y(57,"path",73),s()()()()}if(i&2){let e=p.$implicit,o=c(2);n(3),a("labelMode",o.labelMode)("label",o.getAddressPropertyLabel("AddressLine1",e.parentAddressTypeId))("visible",o.checkAddressPropertyVisible("AddressLine1",e.parentAddressTypeId)),v("value",e.addressLine1),a("inputAttr",P(88,Dn))("ngClass",o.isAddressPropertyVisible("AddressLine1",e.parentAddressTypeId)?"disabledDiv":""),n(2),a("ngIf",o.isAddressFieldRequired("AddressLine1",e.addressType)&&!o.isAddressPropertyVisible("AddressLine1",e.addressTypeId)),n(),a("ngIf",o.isAddressTooltipVisible("AddressLine1",e.addressType)),n(2),a("labelMode",o.labelMode)("label",o.getAddressPropertyLabel("AddressLine2",e.parentAddressTypeId))("visible",o.checkAddressPropertyVisible("AddressLine2",e.parentAddressTypeId)),v("value",e.addressLine2),a("inputAttr",P(89,Pn))("ngClass",o.isAddressPropertyVisible("AddressLine2",e.parentAddressTypeId)?"disabledDiv":""),n(2),a("ngIf",o.isAddressFieldRequired("AddressLine2",e.addressType)&&!o.isAddressPropertyVisible("AddressLine2",e.parentAddressTypeId)),n(),a("ngIf",o.isAddressTooltipVisible("AddressLine2",e.addressType)),n(2),a("labelMode",o.labelMode)("label",o.getAddressPropertyLabel("City",e.parentAddressTypeId))("visible",o.checkAddressPropertyVisible("City",e.parentAddressTypeId)),v("value",e.city),a("inputAttr",P(90,Tn))("ngClass",o.isAddressPropertyVisible("City",e.parentAddressTypeId)?"disabledDiv":""),n(2),a("ngIf",o.isAddressFieldRequired("City",e.addressType)&&!o.isAddressPropertyVisible("City",e.parentAddressTypeId)),n(),a("ngIf",o.isAddressTooltipVisible("City",e.addressType)),n(2),a("showClearButton",!0)("labelMode",o.labelMode)("label",o.getAddressPropertyLabel("State",e.parentAddressTypeId))("visible",o.checkAddressPropertyVisible("State",e.parentAddressTypeId))("searchEnabled",!0)("items",e.states),v("value",e.state),a("inputAttr",P(91,Sn))("ngClass",o.isAddressPropertyVisible("State",e.parentAddressTypeId)?"disabledDiv":""),n(2),a("ngIf",o.isAddressFieldRequired("State",e.addressType)&&!o.isAddressPropertyVisible("State",e.parentAddressTypeId)),n(),a("ngIf",o.isAddressTooltipVisible("State",e.addressType)),n(2),a("showClearButton",!0)("labelMode",o.labelMode)("label",o.getAddressPropertyLabel("C
1ountry",e.parentAddressTypeId))("visible",o.checkAddressPropertyVisible("Country",e.parentAddressTypeId))("items",o.country)("searchEnabled",!0),v("value",e.country),a("inputAttr",P(92,An))("ngClass",o.isAddressPropertyVisible("Country",e.parentAddressTypeId)?"disabledDiv":""),n(2),a("ngIf",o.isAddressFieldRequired("Country",e.addressType)&&!o.isAddressPropertyVisible("Country",e.parentAddressTypeId)),n(),a("ngIf",o.isAddressTooltipVisible("Country",e.addressType)),n(2),a("labelMode",o.labelMode)("label",o.getAddressPropertyLabel("Zipcode",e.parentAddressTypeId))("visible",o.checkAddressPropertyVisible("Zipcode",e.parentAddressTypeId)),v("value",e.zipcode),a("inputAttr",P(93,En))("ngClass",o.isAddressPropertyVisible("Zipcode",e.parentAddressTypeId)?"disabledDiv":""),n(2),a("ngIf",o.isAddressFieldRequired("Zipcode",e.addressType)&&!o.isAddressPropertyVisible("Zipcode",e.parentAddressTypeId)),n(),a("ngIf",o.isAddressTooltipVisible("Zipcode",e.addressType)),n(3),a("showClearButton",!0)("labelMode",o.labelMode)("label",o.getAddressPropertyLabel("AddressTypeId",e.parentAddressTypeId))("visible",o.checkAddressPropertyVisible("AddressTypeId",e.parentAddressTypeId))("items",o.addressType),v("value",e.parentAddressTypeId),a("inputAttr",P(94,Vn))("ngClass",o.isAddressPropertyVisible("AddressTypeId",e.parentAddressTypeId)?"disabledDiv":""),n(2),a("ngIf",o.isAddressFieldRequired("AddressTypeId",e.addressType)&&!o.isAddressPropertyVisible("AddressTypeId",e.parentAddressTypeId)),n(),a("ngIf",o.isAddressTooltipVisible("AddressTypeId",e.addressType)),n(3),w("id","chkcontactAddressPrimary",e.addressId,""),w("name","trades",e.addressId,""),a("checked",e.isPrimary),n(),w("for","chkcontactAddressPrimary",e.addressId,""),n(2),O(" ",o.getAddressPropertyLabel("IsPrimary",e.parentAddressTypeId)," "),n(2),w("id","chkcontactAddressBilling",e.addressId,""),w("name","trades",e.addressId,""),a("checked",e.isBilling),n(),w("for","chkcontactAddressBilling",e.addressId,""),n(2),O(" ",o.getAddressPropertyLabel("IsBilling",e.parentAddressTypeId)," "),n(2),w("id","chkcontactAddressPublic",e.addressId,""),w("name","trades",e.addressId,""),a("checked",e.isPublic),n(),w("for","chkcontactAddressPublic",e.addressId,""),n(2),O(" ",o.getAddressPropertyLabel("IsPublic",e.parentAddressTypeId)," ")}}function Tl(i,p){if(i&1&&(r(0,"dx-scroll-view",60)(1,"div",32),u(2,Pl,58,95,"div",61),s()()),i&2){let e=c();n(2),a("ngForOf",e.getCompanyAddresses())}}function Sl(i,p){if(i&1&&y(0,"dxi-validation-rule",74),i&2){let e=c();w("message","",e.getAddressPropertyLabelForValidation("AddressLine1",e.addCompanyAddress==null?null:e.addCompanyAddress.addressTypeId)," is required")}}function Al(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(2);n(),O(" ",e.addressTooltip("AddressLine1",e.addCompanyAddress==null?null:e.addCompanyAddress.addressType)," ")}}function El(i,p){i&1&&(r(0,"div",75),y(1,"i",79),r(2,"dx-tooltip",80),u(3,Al,2,1,"div",78),s()()),i&2&&(n(2),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content"))}function Vl(i,p){if(i&1&&y(0,"dxi-validation-rule",74),i&2){let e=c();w("message","",e.getAddressPropertyLabelForValidation("AddressLine2",e.addCompanyAddress==null?null:e.addCompanyAddress.addressTypeId)," is required")}}function Ll(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(2);n(),O(" ",e.addressTooltip("AddressLine2",e.addCompanyAddress==null?null:e.addCompanyAddress.addressType)," ")}}function kl(i,p){i&1&&(r(0,"div",75),y(1,"i",81),r(2,"dx-tooltip",82),u(3,Ll,2,1,"div",78),s()()),i&2&&(n(2),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content"))}function Rl(i,p){if(i&1&&y(0,"dxi-validation-rule",74),i&2){let e=c();w("message","",e.getAddressPropertyLabelForValidation("City",e.addCompanyAddress==null?null:e.addCompanyAddress.addressTypeId)," is required")}}function Ol(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(2);n(),O(" ",e.addressTooltip("City",e.addCompanyAddress==null?null:e.addCompanyAddress.addressType)," ")}}function Bl(i,p){i&1&&(r(0,"div",75),y(1,"i",83),r(2,"dx-tooltip",84),u(3,Ol,2,1,"div",78),s()()),i&2&&(n(2),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content"))}function Gl(i,p){if(i&1&&y(0,"dxi-validation-rule",74),i&2){let e=c();w("message","",e.getAddressPropertyLabelForValidation("State",e.addCompanyAddress==null?null:e.addCompanyAddress.addressTypeId)," is required")}}function Fl(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(2);n(),O(" ",e.addressTooltip("State",e.addCompanyAddress==null?null:e.addCompanyAddress.addressType)," ")}}function Nl(i,p){i&1&&(r(0,"div",75),y(1,"i",85),r(2,"dx-tooltip",86),u(3,Fl,2,1,"div",78),s()()),i&2&&(n(2),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content"))}function Wl(i,p){if(i&1&&y(0,"dxi-validation-rule",74),i&2){let e=c();w("message","",e.getAddressPropertyLabelForValidation("Country",e.addCompanyAddress==null?null:e.addCompanyAddress.addressTypeId)," is required")}}function zl(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(2);n(),O(" ",e.addressTooltip("Country",e.addCompanyAddress==null?null:e.addCompanyAddress.addressType)," ")}}function ql(i,p){i&1&&(r(0,"div",75),y(1,"i",87),r(2,"dx-tooltip",88),u(3,zl,2,1,"div",78),s()()),i&2&&(n(2),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content"))}function jl(i,p){if(i&1&&y(0,"dxi-validation-rule",74),i&2){let e=c();w("message","",e.getAddressPropertyLabelForValidation("Zipcode",e.addCompanyAddress==null?null:e.addCompanyAddress.addressTypeId)," is required")}}function Hl(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(2);n(),O(" ",e.addressTooltip("Zipcode",e.addCompanyAddress==null?null:e.addCompanyAddress.addressType)," ")}}function Ul(i,p){i&1&&(r(0,"div",75),y(1,"i",89),r(2,"dx-tooltip",90),u(3,Hl,2,1,"div",78),s()()),i&2&&(n(2),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content"))}function Zl(i,p){if(i&1&&y(0,"dxi-validation-rule",74),i&2){let e=c();w("message","",e.getAddressPropertyLabelForValidation("AddressTypeId",e.addCompanyAddress==null?null:e.addCompanyAddress.addressTypeId)," is required")}}function Ql(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(2);n(),O(" ",e.addressTooltip("addressTypeID",e.addCompanyAddress==null?null:e.addCompanyAddress.addressType)," ")}}function Kl(i,p){i&1&&(r(0,"div",75),y(1,"i",91),r(2,"dx-tooltip",92),u(3,Ql,2,1,"div",78),s()()),i&2&&(n(2),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content"))}var Ln=(()=>{class i extends ee{constructor(e,o,t,l,m){super(),this.companyService=e,this.webStorageService=o,this.countryPostalCodesService=t,this.activatedRoute=l,this.memberPermissionService=m,this.getCompanyDetails=new Nt,this.isCompanyAddressEditMode=!0,this.formData={},this.stylingMode="outlined",this.labelMode="floating",this.removeAddressAction="delete",this.addCompanyAddress=Ki,this.selectedCompanyAddress=new Gi,this.removeAddressPopup=!1,this.companyId=0,this.addressType=[],this.companyAddresses=[],this.companyAddressesDisplay=[],this.companyPageControls=[],this.country=[],this.state=[],this.unsubscriber=new Lt,this.currentUser=o.getCurrentmemberToken(),this.customCallbackZipcode=this.customCallbackZipcode.bind(this),this.customCallbackZipcodeForCompanyMultiAddress=this.customCallbackZipcodeForCompanyMultiAddress.bind(this)}ngOnInit(){return R(this,null,function*(){this.loadCompanyAddressDisplayData(),this.countryPostalCodesPatternItems=this.countryPostalCodesService.getCountryPostalCodes(),this.activatedRoute.params.pipe(N(this.unsubscriber)).subscribe(e=>R(this,null,function*(){this.companyId=e.companyId}))})}checkCompanyLevelPermission(e){return this.memberPermissionService.hasPermission(!0,e)}ngOnChanges(){this.loadCompanyAddressDisplayData()}loadCompanyAddressDisplayData(){this.companyAddressesDisplay=this.companyAddresses??[]}toggleAddressInformation(){this.addressInfoCollapseExpand=!this.addressInfoCollapseExpand}EditAddressInformationPopupEvent(){this.EditAddressInformationPopup=!0}addAddressInformationPopupEvent(e){if(this.addCompanyAddress=Ki,this.addCompanyAddress=new Gi,this.AddAddresInformationGroup.instance.reset(),this.isCompanyAddressEditMode=e,this.checkAddressPropertyVisible("country",this.addCompanyAddress.addressTypeId)){let o=this.country.find(t=>t.countryCode=="US");o?(this.addCompanyAddress.country=o.countryName,this.addressCountryElement.value=o.countryName):(this.addCompanyAddress.country="",this.addressCountryElement.value="")}if(this.checkAddressPropertyVisible("state",this.addCompanyAddress.addressTypeId)){let o=this.state.filter(t=>t.countryCode=="US");this.addCompanyAddress.states=o,o.length>0&&(this.addCompanyAddress.state=o[0].stateName),this.addressStateElement.value=o[0].stateName}this.addCompanyAddress.isPrimary=!1,this.companyAddressesDisplay.find(o=>o.isPrimary)||(this.addCompanyAddress.isPrimary=!0),this.AddAddressInformationPopup=!0}closeAddressPopup({validationGroup:e,event:o}){this.companyAddresses=this.companyAddresses.filter(t=>t.addressId>0),this.EditAddressInformationPopup=!1}closeAddAddressPopup({validationGroup:e,event:o}){if(this.addCompanyAddress=new Gi,this.checkAddressPropertyVisible("country",this.addCompanyAddress.addressTypeId)&&(this.addCompanyAddress.country=this.country.filter(t=>t.countryCode=="US")[0].countryName),this.checkAddressPropertyVisible("state",this.addCompanyAddress.addressTypeId)){let t=this.state.filter(l=>l.countryCode=="US");this.addCompanyAddress.states=t,this.addCompanyAddress.state=t[0].stateName}this.AddAddressInformationPopup=!1}checkAddressPropertyVisible(e,o){let t=this.addressType||[],l=o==null||o==null||o==0?t:t.filter(m=>m&&Number(m.addressTypeID)===Number(o));if(l.length>0&&this.companyPageControls&&this.companyPageControls.length>0){let m=l[0]?.code,d=this.companyPageControls.filter(A=>A&&A.sourceColumnName!=null&&e!=null&&A.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&A.pageCategory!=null&&m!=null&&A.pageCategory.toLocaleLowerCase()==m.toLocaleLowerCase());if(d.length>0)return d[0].isVisible!==!1}return!0}displayAddress(e){let o=Object.assign({},e);this.checkAddressPropertyVisible("country",o.parentAddressTypeId)||(o.country=""),this.checkAddressPropertyVisible("zipcode",o.parentAddressTypeId)||(o.zipcode=""),this.checkAddressPropertyVisible("city",o.parentAddressTypeId)||(o.city=""),this.checkAddressPropertyVisible("state",o.parentAddressTypeId)||(o.state=""),this.checkAddressPropertyVisible("addressLine2",o.parentAddressTypeId)||(o.addressLine2=""),this.checkAddressPropertyVisible("addressLine1",o.parentAddressTypeId)||(o.addressLine1="");
1let t=o.country+(o.zipcode==""?"":(o.country!=""?" - ":"")+o.zipcode),l=o.city+(o.state==""?"":", "+o.state);l=l==""?"":l+(t!=""?",":"");let m=o.addressLine1+(o.addressLine2==""?"":", "+o.addressLine2);return m=m==""?"":m+(l!=""?",":""),(m!=""?m+"<br />":"")+(l!=""?l+"<br />":"")+t}getCompanyAddresses(){return this.companyAddresses.filter(e=>e.isActive)}isAddressPropertyVisible(e,o){let t=o==null||o==null||o==0?this.addressType:this.addressType.filter(l=>l.addressTypeID==o);return t.length>0&&this.companyPageControls.length>0?this.companyPageControls.filter(m=>m.sourceColumnName!=null&&m.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&m.pageCategory.toLocaleLowerCase()==t[0].code.toLocaleLowerCase()&&m.isReadOnly==!1).length>0:!1}isAddressFieldRequired(e,o){let t=o==""||o==null?this.addressType:this.addressType.filter(m=>m.addressType.toLowerCase()==o.toLowerCase()),l=!1;if(t!=null&&t.length>0){let m=this.companyPageControls.find(d=>d.sourceColumnName!=null&&d.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&d.pageCategory.toLocaleLowerCase()==t[0].code.toLocaleLowerCase());m&&(l=m.isRequired)}return l}getAddressPropertyLabel(e,o){let t=o==null||o==null||o==0?this.addressType:this.addressType.filter(l=>l.addressTypeID==o);if(t.length>0&&this.companyPageControls.length>0){let l=this.companyPageControls.filter(m=>m.sourceColumnName!=null&&m.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&m.pageCategory.toLocaleLowerCase()==t[0].code.toLocaleLowerCase());return l.length>0?this.CheckAddressFieldRequired(e,o)?l[0].fieldCaption+" *":l[0].fieldCaption:""}else return""}getAddressPropertyLabelForValidation(e,o){let t=o==null||o==null||o==0?this.addressType:this.addressType.filter(l=>l.addressTypeID==o);if(t.length>0&&this.companyPageControls.length>0){let l=this.companyPageControls.filter(m=>m.sourceColumnName!=null&&m.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&m.pageCategory.toLocaleLowerCase()==t[0].code.toLocaleLowerCase());return l.length>0?l[0].fieldCaption:""}else return""}CheckAddressFieldRequired(e,o){let t=o==null||o==null||o==0?this.addressType:this.addressType.filter(m=>m.addressTypeID==o),l=!1;if(t!=null&&t.length>0){let m=this.companyPageControls.find(d=>d.sourceColumnName!=null&&d.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&d.pageCategory.toLocaleLowerCase()==t[0].code.toLocaleLowerCase());m&&(l=m.isRequired)}return l}resetAddressRowno(){let e=0;this.companyAddresses.forEach(o=>{o.rowno=e+1,e=e+1})}onAddAddressFormSubmit(l,m){return R(this,arguments,function*(e,{validationGroup:o,event:t}){if(!this.AddAddresInformationGroup.instance.validate().isValid)return;let A=!1,L;if(this.addCompanyAddress!=null){if(this.addCompanyAddress.addressTypeId>0&&(this.addCompanyAddress.addressType=this.addressType.filter(D=>D.addressTypeID==this.addCompanyAddress.addressTypeId)[0].addressType,this.addCompanyAddress.parentAddressTypeId=this.addCompanyAddress.addressTypeId),this.addressType.forEach(D=>{this.companyAddresses.filter(H=>H.addressTypeId==D.addressTypeID&&H.isActive!=!1).length>1&&(A=!0,L="You have multiple addresses with same address type")}),this.companyAddressesDisplay.find(D=>D.isPrimary)==null?this.addCompanyAddress.isPrimary=!0:this.addCompanyAddress.isPrimary&&this.isCompanyAddressEditMode&&this.companyAddressesDisplay.forEach(D=>{D.isPrimary=!1}),this.companyAddressesDisplay.find(D=>D.isBilling)==null||this.addCompanyAddress.isBilling&&this.isCompanyAddressEditMode&&this.companyAddressesDisplay.forEach(D=>{D.isBilling=!1}),this.companyAddressesDisplay.find(D=>D.isPublic)==null||this.addCompanyAddress.isPublic&&this.isCompanyAddressEditMode&&this.companyAddressesDisplay.forEach(D=>{D.isPublic=!1}),this.addCompanyAddress.isActive=!0,this.addCompanyAddress.companyId=this.companyId,this.addCompanyAddress.modifiedByUserId=this.currentUser.userId,this.isCompanyAddressEditMode){let D=this.country.find(B=>B.countryName==this.addCompanyAddress.country);if(this.addCompanyAddress.states=this.state.filter(B=>B.countryCode==D.countryCode),this.companyAddresses.push(this.addCompanyAddress),e){if(this.addCompanyAddress=Ki,this.addCompanyAddress=new Gi,this.checkAddressPropertyVisible("country",this.addCompanyAddress.addressTypeId)&&(this.addCompanyAddress.country=this.country.find(B=>B.countryCode=="US").countryName),this.checkAddressPropertyVisible("state",this.addCompanyAddress.addressTypeId)){let B=this.state.filter(H=>H.countryCode=="US");this.addCompanyAddress.state=B[0].stateName}}else this.AddAddressInformationPopup=!1}else{let D=this.companyService.AddCompanyAddress(this.addCompanyAddress),B=yield F(D);if(B&&B.isSuccess){if(this.loading=!1,this.showSuccessMessage("Company Address has been added successfully"),this.getCompanyDetails.emit(),!e)this.AddAddressInformationPopup=!1,this.getCompanyDetails.emit();else if(this.AddAddresInformationGroup.instance.reset(),this.addCompanyAddress=Ki,this.addCompanyAddress=new Gi,this.checkAddressPropertyVisible("country",this.addCompanyAddress.addressTypeId)&&(this.addCompanyAddress.country=this.country.find(H=>H.countryCode=="US").countryName),this.checkAddressPropertyVisible("state",this.addCompanyAddress.addressTypeId)){let H=this.state.filter(Tt=>Tt.countryCode=="US");this.addCompanyAddress.states=H,this.addCompanyAddress.state=H[0].stateName}}else this.loading=!1,this.showErrorMessage(B.message)}this.resetAddressRowno()}})}
1isAddressTooltipVisible(e,o){let t=o==""||o==null?this.addressType:this.addressType.filter(l=>l.addressType.toLowerCase()==o.toLowerCase());return t!=null&&t.length>0?this.companyPageControls.filter(m=>m.sourceColumnName!=null&&m.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&m.pageCategory.toLocaleLowerCase()==t[0].code.toLocaleLowerCase()&&m.isVisible==!0&&m.formControlTooltip!=null&&m.formControlTooltip!=""&&m.formControlTooltip!="").length>0:!1}addressTooltip(e,o){let t=o==""||o==null?this.addressType:this.addressType.filter(l=>l.addressType.toLowerCase()==o.toLowerCase());if(t!=null&&t.length>0){let l=this.companyPageControls.filter(m=>m.sourceColumnName!=null&&m.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&m.pageCategory.toLocaleLowerCase()==t[0].code.toLocaleLowerCase());return l.length>0?l[0].formControlTooltip:""}else return""}customCallbackZipcode(e){let o=this.addCompanyAddress.country;if(o){let t=this.country.find(l=>l.countryName==o);if(t){let l=t.countryCode,m=this.countryPostalCodesPatternItems.find(d=>d.countryCode==l);if(m){let d=m.pattern,A=new RegExp(d);if(e.value)return e.value.match(A)!==null}else return!0}else return!0}else return!0;return!0}onAddSelectcountry({value:e}){if(!e){let o=this.country.find(t=>t.countryCode=="US");o?e=o.countryName:e="United States"}if(this.country!=null){let o=this.country.find(t=>t.countryName==e);if(o!=null||o!=null){let t=this.state.filter(m=>m.countryCode==o.countryCode);this.addCompanyAddress&&(this.addCompanyAddress.states=this.state.filter(m=>m.countryCode==o.countryCode)),t.find(m=>m.stateName==this.addCompanyAddress.state)&&this.addCompanyAddress!=null?this.addCompanyAddress.state=this.addCompanyAddress.state:t?.length>0&&(this.addCompanyAddress.state=t[0].stateName)}else this.addCompanyAddress&&(this.addCompanyAddress.states=this.state)}else this.addCompanyAddress&&(this.addCompanyAddress.states=this.state)}onAddressTypeChanged(e){if(e&&e.addressTypeId){e.parentAddressTypeId=Number(e.addressTypeId),e.addressTypeId=Number(e.addressTypeId);let o=(this.addressType||[]).find(t=>Number(t.addressTypeID)===Number(e.addressTypeId));o&&(e.addressType=o.addressType)}}onEditAddressFormSubmit(t){return R(this,arguments,function*({validationGroup:e,event:o}){if(!this.AddresInformationGroup.instance.validate().isValid)return;let m=!1,d;if(this.companyAddresses!=null){if(this.companyAddresses.filter(x=>x.isActive).length!=0&&this.companyAddresses.find(G=>G.isPrimary)==null)if(this.companyAddresses.length>1){this.showErrorMessage("Please assign primary address.");return}else{let G=this.companyAddresses[0];this.companyAddresses.filter(D=>{D.addressId==G.addressId&&(D.isPrimary=!0)})}let L=this.companyService.UpdateCompanyAddress(this.companyAddresses),V=yield F(L);V&&V.isSuccess?(this.loading=!1,this.showSuccessMessage("Company Addresses have been updated successfully"),this.getCompanyDetails.emit(),this.companyAddresses=this.companyInfo.companyAddresses.filter(x=>x.isActive==!0),this.companyAddressesDisplay=this.companyInfo.companyAddresses.filter(x=>x.isActive==!0),this.EditAddressInformationPopup=!1):(this.loading=!1,this.showErrorMessage(V.message))}})}onDeleteAddress(e){this.selectedCompanyAddress=e,this.removeAddressPopup=!0}customCallbackZipcodeForCompanyMultiAddress(e){let o=!0;return this.companyAddresses.filter(t=>t.isActive&&t.zipcode==e.value).forEach(t=>{if(o){let l=t.country;if(l){let m=this.country.find(d=>d.countryName==l);if(m){let d=m.countryCode,A=this.countryPostalCodesPatternItems.find(L=>L.countryCode==d);if(A){let L=A.pattern,V=new RegExp(L);if(e.value)if(e.value.toString().match(V)===null){o=!1;return}else o=!0}else o=!0}else o=!0}else o=!0;o=!0}}),o}onSelectCompanyCountry({value:e},o){let t=this.companyAddresses.find(l=>l.companyAddressId==o.companyAddressId);if(!e){let l=this.country.find(m=>m.countryCode=="US");l?(e=l.countryName,t&&(t.country=e)):(t&&(t.country="United States"),e="United States")}if(this.country!=null){let l=this.country.find(m=>m.countryName==e);if(l!=null||l!=null){if(t){let m=this.state.filter(A=>A.countryCode==l.countryCode);t.states=m,m.find(A=>A.stateName==o.state)&&o!=null?t.state=o.state:t.state=t.states.length>0?t.states[0].stateName:""}}else t.states=this.state}else t.states=this.state}handleCompanyPublicValueChange(e,o){e.target.checked?(this.companyAddresses.forEac
1h(t=>{t.isPublic=!1}),this.companyAddresses.forEach(t=>{o==t.addressId?t.isPublic=!0:t.isPublic=!1})):this.companyAddresses.forEach(t=>{o==t.addressId&&(t.isPublic=!1)})}handleCompanyBillingValueChange(e,o){e.target.checked?(this.companyAddresses.forEach(t=>{t.isBilling=!1}),this.companyAddresses.forEach(t=>{o==t.addressId?t.isBilling=!0:t.isBilling=!1})):this.companyAddresses.forEach(t=>{o==t.addressId&&(t.isBilling=!1)})}handleCompanyPrimaryValueChange(e,o){e.target.checked?(this.companyAddresses.forEach(t=>{t.isPrimary=!1}),this.companyAddresses.forEach(t=>{o==t.addressId?t.isPrimary=!0:t.isPrimary=!1})):this.companyAddresses.forEach(t=>{o==t.addressId&&(t.isPrimary=!1)})}removeAddress(e,o){let t=this.companyAddresses.filter(d=>d.isActive).length;if(this.companyAddresses.find(d=>d.addressId==e&&d.isPrimary)&&t>1){this.showErrorMessage("This is the primary address. To delete this address, please assign primary phone to another address.");return}if(this.companyAddresses.filter(d=>d.addressId==e&&d.addressId!=0).length>0?(this.companyAddresses.filter(d=>d.addressId==e).map(d=>{d.isActive=!1}),this.companyAddressesDisplay=this.companyAddresses):e>0?this.companyAddresses=this.companyAddresses.filter(d=>d.addressId!=e):this.companyAddresses=this.companyAddresses.filter(d=>d.rowno!=o),this.companyAddresses.filter(d=>d.isActive).length==0){let d={component:null,element:null,event:null};this.onEditAddressFormSubmit(d)}}static{this.\u0275fac=function(o){return new(o||i)(E(Bt),E(At),E($o),E(Si),E(kt))}}static{this.\u0275cmp=Q({type:i,selectors:[["app-company-address-info"]],viewQuery:function(o,t){if(o&1&&(z(Zr,5),z(Qr,5),z(Kr,5),z(Xr,5)),o&2){let l;q(l=j())&&(t.AddresInformationGroup=l.first),q(l=j())&&(t.AddAddresInformationGroup=l.first),q(l=j())&&(t.addressCountryElement=l.first),q(l=j())&&(t.addressStateElement=l.first)}},inputs:{companyInfo:"companyInfo",addressType:"addressType",companyAddresses:"companyAddresses",companyPageControls:"companyPageControls",country:"country",status:"status",state:"state"},outputs:{getCompanyDetails:"getCompanyDetails"},standalone:!0,features:[K,Mi,X],decls:99,vars:101,consts:[["AddresInformationGroup",""],["AddAddresInformationGroup",""],["addressState",""],["addressCountry",""],[1,"scroll-outer"],[1,"information-block",3,"ngClass"],[1,"card-outer"],[1,"card-header"],[1,"card-header__title"],[1,"card-header__edit-collapse"],["class","edits","href","javascript:void(0)",3,"click",4,"ngIf"],["href","javascript:void(0)",1,"collapse",3,"click"],["width","14","height","9","viewBox","0 0 14 9","fill","none","xmlns","http://www.w3.org/2000/svg"],["_ngcontent-uhr-c405","","d","M1 7.5L7 1.5L13 7.5","stroke","#024079","stroke-width","1.8","stroke-linecap","round","stroke-linejoin","round"],["class","empty-card",4,"ngIf"],[1,"card-content"],["class","address-information-box",4,"ngIf"],["container",".dx-viewport",3,"visibleChange","showTitle","dragEnabled","hideOnOutsideClick","visible","wrapperAttr"],[1,"dx-popup-header"],["href","javascript:void(0)",1,"edits",3,"click"],["width","12","height","12","viewBox","0 0 12 12","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M5.94975 0.999959V10.8995M1 5.94971H10.8995","stroke","white","stroke-width","1.8","stroke-linecap","round","stroke-linejoin","round"],[1,"dx-popup-content-block","edit-address-popup-content"],[1,"form-outer"],["id","form",3,"formData"],[1,"popup-content-title"],["class","scroll-outer contact-popup",4,"ngIf"],[1,"dx-popup-footer"],["text","Cancel","stylingMode","contained","type","normal",1,"btn","btn--cancel",3,"onClick"],["text","Save","stylingMode","contained","type","default",1,"btn","btn--primary",3,"onClick"],[1,"dx-popup-content-block"],[1,"scroll-outer","contact-popup","scroll-not-overflow"],[1,"address-popup-outer","address-popup-block-outer"],[1,"address-popup-outer__content"],[1,"address-popup-outer__left"],[1,"dx-field","full-width","full-address"],[3,"valueChange","labelMode","label","visible","value","inputAttr"],["type","required",3,"message",4,"ngIf"],["class","tooltip-info",4,"ngIf"],[1,"dx-field"],["displayExpr","stateName","valueExpr","stateName","placeholder","Select",1,"select-box","re
1cordtype",3,"valueChange","showClearButton","labelMode","label","visible","searchEnabled","items","value","inputAttr"],["displayExpr","countryName","valueExpr","countryName","placeholder","Select",1,"select-box","recordtype",3,"valueChange","onValueChanged","showClearButton","labelMode","label","visible","items","searchEnabled","value","inputAttr"],[1,"address-popup-outer__right"],["displayExpr","addressType","valueExpr","addressTypeID","placeholder","Select",1,"select-box","recordtype",3,"valueChange","onValueChanged","showClearButton","labelMode","label","visible","items","value","inputAttr"],[1,"full-width","checkbox-block"],[1,"dx-field-value","checkbox"],[3,"valueChange","value","elementAttr","text","visible"],["text","Save & Add Another","stylingMode","contained","type","default",1,"btn","btn--primary",3,"onClick"],["text","Save & Close","stylingMode","contained","type","default",1,"btn","btn--primary",3,"onClick"],[3,"visibleChange","save","visible","action","titleText"],["d","M7.84042 3.24301L1.98458 9.09692L1.60167 10.4027L2.8813 10.0328L8.75657 4.15951L7.84042 3.24301ZM8.8395 2.24426L9.75565 3.1601L10.6096 2.30644C10.6703 2.24571 10.7045 2.16335 10.7045 2.07747C10.7045 1.9916 10.6703 1.90924 10.6096 1.84851L10.1509 1.39059C10.0901 1.32988 10.0077 1.29577 9.92184 1.29577C9.83594 1.29577 9.75356 1.32988 9.6928 1.39059L8.84015 2.24426H8.8395ZM11.0677 0.474742L11.5258 0.932666C11.8294 1.23632 12 1.64811 12 2.07747C12 2.50684 11.8294 2.91863 11.5258 3.22228L3.5616 11.1845L0.827412 11.9746C0.715963 12.0068 0.597932 12.0084 0.48564 11.9794C0.373349 11.9503 0.270914 11.8917 0.18903 11.8096C0.107147 11.7274 0.0488165 11.6248 0.0201294 11.5125C-0.00855774 11.4001 -0.00654986 11.2822 0.0259434 11.1709L0.834539 8.41489L8.77795 0.474094C9.08171 0.170532 9.49363 0 9.92314 0C10.3526 0 10.7646 0.170532 11.0683 0.474094L11.0677 0.474742Z","fill","white"],[1,"empty-card"],[1,"address-information-box"],["class","address-information-box__items",4,"ngFor","ngForOf"],[1,"address-information-box__items"],[1,"address-information-box__address-label"],[1,"address-information-box__address-content",3,"innerHTML"],[1,"address-information-box__address-tag"],["class","badge",4,"ngIf"],[1,"badge"],[1,"scroll-outer","contact-popup"],["class","address-popup-outer__content",4,"ngFor","ngForOf"],[3,"valueChange","labelMode","label","visible","value","inputAttr","ngClass"],["displayExpr","stateName","valueExpr","stateName","placeholder","Select",1,"select-box","recordtype",3,"valueChange","showClearButton","labelMode","label","visible","searchEnabled","items","value","inputAttr","ngClass"],["displayExpr","countryName","valueExpr","countryName","placeholder","Select",1,"select-box","recordtype",3,"valueChange","onValueChanged","showClearButton","labelMode","label","visible","items","searchEnabled","value","inputAttr","ngClass"],["displayExpr","addressType","valueExpr","addressTypeID","placeholder","Select",1,"select-box","recordtype",3,"valueChange","onValueChanged","showClearButton","labelMode","label","visible","items","value","inputAttr","ngClass"],[1,"dx-field-value","checkbox","checkbox-custom"],["type","checkbox","width","20","height","20",3,"click","id","name","checked"],[3,"for"],[1,"client-name-with-id","checkbox-label",2,"color","#3e3e3e !important"],[1,"address-popup-outer__delete"],["href","javascript:void(0)",1,"delete",3,"click"],["width","12","height","14","viewBox","0 0 12 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M4.84615 2.25V2.5H7.15385V2.25C7.15385 1.91848 7.03228 1.60054 6.81589 1.36612C6.5995 1.1317 6.30602 1 6 1C5.69398 1 5.4005 1.1317 5.18411 1.36612C4.96772 1.60054 4.84615 1.91848 4.84615 2.25ZM3.92308 2.5V2.25C3.92308 1.65326 4.1419 1.08097 4.53139 0.65901C4.92089 0.237053 5.44917 0 6 0C6.55083 0 7.07911 0.237053 7.46861 0.65901C7.8581 1.08097 8.07692 1.65326 8.07692 2.25V2.5H11.5385C11.6609 2.5 11.7783 2.55268 11.8648 2.64645C11.9514 2.74021 12 2.86739 12 3C12 3.13261 11.9514 3.25979 11.8648 3.35355C11.7783 3.44732 11.6609 3.5 11.5385 3.5H10.8425L9.96923 11.784C9.90484 12.3941 9.63543 12.9572 9.21238 13.3659C8.78932
113.7746 8.24222 14.0003 7.67538 14H4.32462C3.75778 14.0003 3.21068 13.7746 2.78762 13.3659C2.36457 12.9572 2.09516 12.3941 2.03077 11.784L1.15754 3.5H0.461538C0.339131 3.5 0.221737 3.44732 0.135181 3.35355C0.0486262 3.25979 0 3.13261 0 3C0 2.86739 0.0486262 2.74021 0.135181 2.64645C0.221737 2.55268 0.339131 2.5 0.461538 2.5H3.92308ZM2.94831 11.67C2.98684 12.036 3.14832 12.3738 3.40196 12.619C3.65561 12.8643 3.9837 12.9999 4.32369 13H7.67585C8.01584 12.9999 8.34393 12.8643 8.59758 12.619C8.85122 12.3738 9.0127 12.036 9.05123 11.67L9.91385 3.5H2.08662L2.94831 11.67ZM4.61538 5.25C4.73779 5.25 4.85519 5.30268 4.94174 5.39645C5.0283 5.49021 5.07692 5.61739 5.07692 5.75V10.75C5.07692 10.8826 5.0283 11.0098 4.94174 11.1036C4.85519 11.1973 4.73779 11.25 4.61538 11.25C4.49298 11.25 4.37558 11.1973 4.28903 11.1036C4.20247 11.0098 4.15385 10.8826 4.15385 10.75V5.75C4.15385 5.61739 4.20247 5.49021 4.28903 5.39645C4.37558 5.30268 4.49298 5.25 4.61538 5.25ZM7.84615 5.75C7.84615 5.61739 7.79753 5.49021 7.71097 5.39645C7.62442 5.30268 7.50702 5.25 7.38462 5.25C7.26221 5.25 7.14481 5.30268 7.05826 5.39645C6.9717 5.49021 6.92308 5.61739 6.92308 5.75V10.75C6.92308 10.8826 6.9717 11.0098 7.05826 11.1036C7.14481 11.1973 7.26221 11.25 7.38462 11.25C7.50702 11.25 7.62442 11.1973 7.71097 11.1036C7.79753 11.0098 7.84615 10.8826 7.84615 10.75V5.75Z","fill","white"],["type","required",3,"message"],[1,"tooltip-info"],[1,"icon","dx-icon-info",3,"id"],["showEvent","mouseenter","hideEvent","mouseleave",3,"target","hideOnOutsideClick"],[4,"dxTemplate","dxTemplateOf"],["id","AddressLine1",1,"icon","dx-icon-info"],["target","#AddressLine1","showEvent","mouseenter","hideEvent","mouseleave",3,"hideOnOutsideClick"],["id","AddressLine2",1,"icon","dx-icon-info"],["target","#AddressLine2","showEvent","mouseenter","hideEvent","mouseleave",3,"hideOnOutsideClick"],["id","City",1,"icon","dx-icon-info"],["target","#City","showEvent","mouseenter","hideEvent","mouseleave",3,"hideOnOutsideClick"],["id","State",1,"icon","dx-icon-info"],["target","#State","showEvent","mouseenter","hideEvent","mouseleave",3,"hideOnOutsideClick"],["id","Country",1,"icon","dx-icon-info"],["target","#Country","showEvent","mouseenter","hideEvent","mouseleave",3,"hideOnOutsideClick"],["id","Zipcode",1,"icon","dx-icon-info"],["target","#Zipcode","showEvent","mouseenter","hideEvent","mouseleave",3,"hideOnOutsideClick"],["id","addressTypeID",1,"icon","dx-icon-info"],["target","#addressTypeID","showEvent","mouseenter","hideEvent","mouseleave",3,"hideOnOutsideClick"]],template:function(o,t){if(o&1){let l=M();r(0,"dx-scroll-view",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"h2",8),f(5,"Address Information"),s(),r(6,"div",9),u(7,$r,5,0,"a",10),r(8,"a",11),_("click",function(){return C(l),h(t.toggleAddressInformation())}),k(),r(9,"svg",12),y(10,"path",13),s()()()(),u(11,el,3,0,"div",14),U(),r(12,"div",15),u(13,al,2,1,"div",16),s()()()(),r(14,"dx-popup",17),I("visibleChange",function(d){return C(l),b(t.EditAddressInformationPopup,d)||(t.EditAddressInformationPopup=d),h(d)}),r(15,"div",18)(16,"h2"),f(17,"Edit Address Information"),s(),r(18,"a",19),_("click",function(){return C(l),h(t.addAddressInformationPopupEvent(!0))}),r(19,"span"),k(),r(20,"svg",20),y(21,"path",21),s()(),f(22," Add "),s()(),U(),r(23,"div",22)(24,"form",23)(25,"dx-validation-group",null,0)(27,"dx-form",24)(28,"dxi-item")(29,"div",25),f(30,"Address"),s(),u(31,Tl,3,1,"dx-scroll-view",26),s()()()()(),r(32,"div",27)(33,"dx-button",28),_("onClick",function(d){return C(l),h(t.closeAddressPopup(d))}),s(),r(34,"dx-button",29),_("onClick",function(d){return C(l),h(t.onEditAddressFormSubmit(d))}),s()()(),r(35,"dx-popup",17),I("visibleChange",function(d){return C(l),b(t.AddAddressInformationPopup,d)||(t.AddAddressInformationPopup=d),h(d)}),r(36,"div",18)(37,"h2"),f(38,"Add Address"),s()(),r(39,"div",30)(40,"form",23)(41,"dx-validation-group",null,1)(43,"dx-form",24)(44,"dxi-item")(45,"dx-scroll-view",31)(46,"div",32)(47,"div",33)(48,"div",34)(49,"div",35)(50,"dx-text-box",36),I("valueChange",function(d){return C(l),b(t.addCompanyAddress.addressLine1,d)||(t.addCompanyAddress.addressLine1=d),h(d)}
1),r(51,"dx-validator"),u(52,Sl,1,2,"dxi-validation-rule",37),s()(),u(53,El,4,2,"div",38),s(),r(54,"div",39)(55,"dx-text-box",36),I("valueChange",function(d){return C(l),b(t.addCompanyAddress.addressLine2,d)||(t.addCompanyAddress.addressLine2=d),h(d)}),r(56,"dx-validator"),u(57,Vl,1,2,"dxi-validation-rule",37),s()(),u(58,kl,4,2,"div",38),s(),r(59,"div",39)(60,"dx-text-box",36),I("valueChange",function(d){return C(l),b(t.addCompanyAddress.city,d)||(t.addCompanyAddress.city=d),h(d)}),r(61,"dx-validator"),u(62,Rl,1,2,"dxi-validation-rule",37),s()(),u(63,Bl,4,2,"div",38),s(),r(64,"div",39)(65,"dx-select-box",40,2),I("valueChange",function(d){return C(l),b(t.addCompanyAddress.state,d)||(t.addCompanyAddress.state=d),h(d)}),r(67,"dx-validator"),u(68,Gl,1,2,"dxi-validation-rule",37),s()(),u(69,Nl,4,2,"div",38),s(),r(70,"div",39)(71,"dx-select-box",41,3),I("valueChange",function(d){return C(l),b(t.addCompanyAddress.country,d)||(t.addCompanyAddress.country=d),h(d)}),_("onValueChanged",function(d){return C(l),h(t.onAddSelectcountry(d))}),r(73,"dx-validator"),u(74,Wl,1,2,"dxi-validation-rule",37),s()(),u(75,ql,4,2,"div",38),s(),r(76,"div",39)(77,"dx-text-box",36),I("valueChange",function(d){return C(l),b(t.addCompanyAddress.zipcode,d)||(t.addCompanyAddress.zipcode=d),h(d)}),r(78,"dx-validator"),u(79,jl,1,2,"dxi-validation-rule",37),s()(),u(80,Ul,4,2,"div",38),s()(),r(81,"div",42)(82,"div",39)(83,"dx-select-box",43),I("valueChange",function(d){return C(l),b(t.addCompanyAddress.addressTypeId,d)||(t.addCompanyAddress.addressTypeId=d),h(d)}),_("onValueChanged",function(){return C(l),h(t.onAddressTypeChanged(t.addCompanyAddress))}),r(84,"dx-validator"),u(85,Zl,1,2,"dxi-validation-rule",37),s()(),u(86,Kl,4,2,"div",38),s(),r(87,"div",44)(88,"div",45)(89,"dx-check-box",46),I("valueChange",function(d){return C(l),b(t.addCompanyAddress.isPrimary,d)||(t.addCompanyAddress.isPrimary=d),h(d)}),s()(),r(90,"div",45)(91,"dx-check-box",46),I("valueChange",function(d){return C(l),b(t.addCompanyAddress.isBilling,d)||(t.addCompanyAddress.isBilling=d),h(d)}),s()(),r(92,"div",45)(93,"dx-check-box",46),I("valueChange",function(d){return C(l),b(t.addCompanyAddress.isPublic,d)||(t.addCompanyAddress.isPublic=d),h(d)}),s()()()()()()()()()()()(),r(94,"div",27)(95,"dx-button",28),_("onClick",function(d){return C(l),h(t.closeAddAddressPopup(d))}),s(),r(96,"dx-button",47),_("onClick",function(d){return C(l),h(t.onAddAddressFormSubmit(!0,d))}),s(),r(97,"dx-button",48),_("onClick",function(d){return C(l),h(t.onAddAddressFormSubmit(!1,d))}),s()()(),r(98,"confirm-popup",49),I("visibleChange",function(d){return C(l),b(t.removeAddressPopup,d)||(t.removeAddressPopup=d),h(d)}),_("save",function(){return C(l),h(t.removeAddress(t.selectedCompanyAddress.addressId,t.selectedCompanyAddress.rowno))}),s()}o&2&&(n(),a("ngClass",t.addressInfoCollapseExpand?"collapse":"expand"),n(6),a("ngIf",t.checkCompanyLevelPermission("Update Company Information")&&t.checkCompanyLevelPermission("Update Address Information")),n(4),a("ngIf",!t.loading&&(!t.companyAddressesDisplay||(t.companyAddressesDisplay==null?null:t.companyAddressesDisplay.length)==0)),n(2),a("ngIf",t.companyAddressesDisplay!=null&&(t.companyAddressesDisplay==null?null:t.companyAddressesDisplay.length)>0),n(),a("showTitle",!1)("dragEnabled",!1)("hideOnOutsideClick",!1),v("visible",t.EditAddressInformationPopup),a("wrapperAttr",P(89,Jr)),n(13),a("formData",t.formData),n(4),a("ngIf",t.companyAddresses!=null&&t.companyAddresses.length>0),n(4),a("showTitle",!1)("dragEnabled",!1)("hideOnOutsideClick",!1),v("visible",t.AddAddressInformationPopup),a("wrapperAttr",P(90,Yr)),n(8),a("formData",t.formData),n(7),a("labelMode",t.labelMode)("label",t.getAddressPropertyLabel("AddressLine1",t.addCompanyAddress==null?null:t.addCompanyAddress.addressTypeId))("visible",t.checkAddressPropertyVisible("AddressLine1",t.addCompanyAddress==null?null:t.addCompanyAddress.addressTypeId)),v("value",t.addCompanyAddress.addressLine1),a("inputAttr",P(91,Dn)),n(2),a("ngIf",t.isAddressFieldRequired("AddressLine1",t.addCompanyAddress==null?null:t.addCompanyAddress.addressType)),n(),a("ngIf",t.isAddressTooltipVisible("AddressLine1",t.addCompanyAddress==null?null:t.addCompanyAddress.addressType)),n(2),a("labelMode",t.labelMode)("label",t.getAddressPropertyLabel("AddressLine2",t.addCompanyAddress==null?null:t.addCompanyAddress.addressTypeId))("visible",t.checkAddressPropertyVisible("AddressLine2",t.addCompanyAddress==null?null:t.addCompanyAddress.addressTypeId)),v("value",t.addCompanyAddress.addressLine2),a("inputAttr",P(92,Pn)),n(2),a("ngIf",t.isAddressFieldRequired("AddressLine2",t.addCompanyAddress==null?null:t.addCompanyAddress.addressType)),n(),a("ngIf",t.isAddressTooltipVisible("AddressLine2",t.addCompanyAddress==null?null:t.addCompanyAddress.addressType)),n(2),a("labelMode",t.labelMode)("label",t.getAddressPropertyLabel("City",t.addCompanyAddress==null?null:t.addCompanyAddress.addressTypeId))("visible",t.checkAddressPropertyVisible("City",t.addCompanyAddress==null?null:t.addCompanyAddress.addressTypeId)),v("value",t.addCompanyAddress.city),a("inputAttr",P(93,Tn)),n(2),a("ngIf",t.isAddressFieldRequired("City",t.addCompanyAddress==null?null:t.addCompanyAddress.addressType)),n(),a("ngIf",t.isAddressTooltipVisible("City",t.addCompanyAddress==null?null:t.addCompanyAddress.addressType)),n(2),a("showClearButton",!0)("labelMode",t.labelMode)("label",t.getAddressPropertyLabel("State",t.addCompanyAddress==null?null:t.addCompanyAddress.addressTypeId))("visible",t.checkAddressPropertyVisible("State",t.addCompanyAddress==null?null:t.addCompanyAddress.addressTypeId))("searchEnabled",!0)("items",t.addCompanyAddress==null?null:t.addCompanyAddress.states),v("value",t.addCompanyAddress.state),a("inputAttr",P(94,Sn)),n(3),a("ngIf",t.isAddressFieldRequired("State",t.addCompanyAddress==null?null:t.addCompanyAddress.addressType)),n(),a("ngIf",t.isAddressTooltipVisible("State",t.addCompanyAddress==null?null:t.addCompanyAddress.addressType)),n(2),a("showClearButton",!0)("labelMode",t.labelMode)("label",t.getAddressPropertyLabel("C
1ountry",t.addCompanyAddress==null?null:t.addCompanyAddress.addressTypeId))("visible",t.checkAddressPropertyVisible("Country",t.addCompanyAddress==null?null:t.addCompanyAddress.addressTypeId))("items",t.country)("searchEnabled",!0),v("value",t.addCompanyAddress.country),a("inputAttr",P(95,An)),n(3),a("ngIf",t.isAddressFieldRequired("Country",t.addCompanyAddress==null?null:t.addCompanyAddress.addressType)),n(),a("ngIf",t.isAddressTooltipVisible("Country",t.addCompanyAddress==null?null:t.addCompanyAddress.addressType)),n(2),a("labelMode",t.labelMode)("label",t.getAddressPropertyLabel("Zipcode",t.addCompanyAddress==null?null:t.addCompanyAddress.addressTypeId))("visible",t.checkAddressPropertyVisible("Zipcode",t.addCompanyAddress==null?null:t.addCompanyAddress.addressTypeId)),v("value",t.addCompanyAddress.zipcode),a("inputAttr",P(96,En)),n(2),a("ngIf",t.isAddressFieldRequired("Zipcode",t.addCompanyAddress==null?null:t.addCompanyAddress.addressType)),n(),a("ngIf",t.isAddressTooltipVisible("Zipcode",t.addCompanyAddress==null?null:t.addCompanyAddress.addressType)),n(3),a("showClearButton",!0)("labelMode",t.labelMode)("label",t.getAddressPropertyLabel("AddressTypeId",t.addCompanyAddress==null?null:t.addCompanyAddress.addressTypeId))("visible",t.checkAddressPropertyVisible("AddressTypeId",t.addCompanyAddress==null?null:t.addCompanyAddress.addressTypeId))("items",t.addressType),v("value",t.addCompanyAddress.addressTypeId),a("inputAttr",P(97,Vn)),n(2),a("ngIf",t.isAddressFieldRequired("AddressTypeId",t.addCompanyAddress==null?null:t.addCompanyAddress.addressType)),n(),a("ngIf",t.isAddressTooltipVisible("AddressTypeId",t.addCompanyAddress==null?null:t.addCompanyAddress.addressType)),n(3),v("value",t.addCompanyAddress.isPrimary),a("elementAttr",P(98,bo))("text",t.getAddressPropertyLabel("IsPrimary",t.addCompanyAddress==null?null:t.addCompanyAddress.addressTypeId))("visible",t.checkAddressPropertyVisible("IsPrimary",t.addCompanyAddress==null?null:t.addCompanyAddress.addressTypeId)),n(2),v("value",t.addCompanyAddress.isBilling),a("elementAttr",P(99,bo))("text",t.getAddressPropertyLabel("IsBilling",t.addCompanyAddress==null?null:t.addCompanyAddress.addressTypeId))("visible",t.checkAddressPropertyVisible("IsBilling",t.addCompanyAddress==null?null:t.addCompanyAddress.addressTypeId)),n(2),v("value",t.addCompanyAddress.isPublic),a("elementAttr",P(100,bo))("text",t.getAddressPropertyLabel("IsPublic",t.addCompanyAddress==null?null:t.addCompanyAddress.addressTypeId))("visible",t.checkAddressPropertyVisible("IsPublic",t.addCompanyAddress==null?null:t.addCompanyAddress.addressTypeId)),n(5),W("action",t.removeAddressAction),W("titleText",t.selectedCompanyAddress==null?null:t.selectedCompanyAddress.addressType),v("visible",t.removeAddressPopup))},dependencies:[Y,Dt,Ti,J,$,pe,jt,zt,qt,gi,se,Rt,It,de,me,ce,ue,fe,ye,wt,Ce,he,_e,xe,Ei,ge,ve,be,Yt,Ie,we,Me,De,Pe,Te,Se,Ae,Ee,Ve,Le,Ht,ke,Re,Oe,Be,Ge,Fe,Ne,We,ze,qe,je,He,Ue,Ze,Qe,Ke,Xe,Et,Je,Ye,$e,et,tt,it,ot,Vt,nt,Ut,at,rt,lt,st,dt,pt,mt,ct,ut,pi,ft,yt,Ct,ht,$t,_t,gt,ei,vt,bt,ti,xt,oe,le,re,ae,ne,ie,te],styles:['.address-information-box[_ngcontent-%COMP%]{width:100%;-ms-display:grid;-webkit-display:grid;-moz-display:grid;display:grid;justify-content:flex-start;grid-row-gap:2rem;grid-column-gap:4rem;grid-template-columns:repeat(auto-fill,minmax(min(240px,100%),1fr))}@media (max-width: 1440px){.address-information-box[_ngcontent-%COMP%]{grid-template-columns:repeat(auto-fill,minmax(min(190px,100%),1fr))}}.address-information-box__items[_ngcontent-%COMP%]{width:100%;position:relative}.address-information-box__items[_ngcontent-%COMP%]:after{content:"";position:absolute;top:0;right:-2rem;width:1px;height:100%;background-color:var(--border-lighter)}@media (max-width: 600px){.address-information-box__items[_ngcontent-%COMP%]:after{display:none}}.address-information-box__items[_ngcontent-%COMP%]:last-child:after{display:none}.address-information-box__address-label[_ngcontent-%COMP%]{width:100%;-ms-display:flex;-webkit-display:flex;-moz-display:flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;justify-content:space-between;
1-webkit-justify-content:space-between;margin:0 0 2.5rem}.address-information-box__address-label[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--body-color);display:inline-block;font:var(--font-weight-500) var(--font-14) var(--font-family);line-height:normal;padding:0;position:relative}.address-information-box__address-label[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:after{content:"";position:absolute;left:0;bottom:-1.3rem;width:35px;height:2px;background-color:var(--accent-color)}.address-information-box__address-content[_ngcontent-%COMP%]{width:100%;font:var(--font-weight-400) var(--font-14) var(--font-family);line-height:20px;padding:0;margin:0 0 1.5rem;color:var(--menu-text-color)}.address-information-box__address-tag[_ngcontent-%COMP%]{width:100%;-ms-display:flex;-webkit-display:flex;-moz-display:flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap}.address-information-box__address-tag[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{display:inline-block;border-radius:100px;font:var(--font-weight-600) var(--font-13) var(--font-family);line-height:normal;padding:.3rem 1.5rem .4rem;margin:0 .7rem .7rem 0;border:1px solid var(--border-color);color:var(--tag-color)}.address-information-box__email-address[_ngcontent-%COMP%]{width:100%;min-height:50px}.address-information-box__email-address[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline-block;text-overflow:ellipsis;overflow:hidden;width:100%}.delete[_ngcontent-%COMP%]{width:26px;height:26px;background-color:var(--delete-new-color);border-radius:100px;margin:0;-ms-display:flex;-webkit-display:flex;-moz-display:flex;display:flex;justify-content:center;-webkit-justify-content:center;-webkit-align-items:center;align-items:center;transition:.35s ease}.delete[_ngcontent-%COMP%]:hover{background-color:var(--delete-new-hover-color)}']})}}return i})();var Xl=["EditContactsPopup"],Jl=["treeView"],kn=()=>({"aria-label":"Position"}),Rn=()=>({"aria-label":"Date"}),Yl=()=>({"aria-label":"Product Attribute"});function $l(i,p){if(i&1&&y(0,"dxi-validation-rule",18),i&2){let e=c(3);w("message","",e.GetAfflicationCompanyPropertyLabel("AffiliationRoleId")," is required")}}function es(i,p){if(i&1){let e=M();r(0,"dx-select-box",16),I("valueChange",function(t){C(e);let l=c(2);return b(l.affiliatedContact().affiliationRoleId,t)||(l.affiliatedContact().affiliationRoleId=t),h(t)}),r(1,"dx-validator"),u(2,$l,1,2,"dxi-validation-rule",17),s()()}if(i&2){let e=c(2);a("showClearButton",!0)("labelMode",e.labelMode)("label",e.GetAfflicationCompanyPropertyLabel("AffiliationRoleId"))("searchEnabled",!0)("items",e.affiliationRolesCompany()),v("value",e.affiliatedContact().affiliationRoleId),a("inputAttr",P(9,kn))("ngClass",e.IsAfflicationCompanyPropertyReadonly("AffiliationRoleId")?"disabledDiv":""),n(2),a("ngIf",!e.IsAfflicationCompanyPropertyReadonly("AffiliationRoleId")&&e.CheckAfflicationCompanyPropertyRequired("AffiliationRoleId"))}}function ts(i,p){if(i&1&&y(0,"dxi-validation-rule",18),i&2){let e=c(3);w("message","",e.GetAfflicationCompanyPropertyLabel("AffiliationRoleId")," is required")}}function is(i,p){if(i&1){let e=M();r(0,"dx-select-box",16),I("valueChange",function(t){C(e);let l=c(2);return b(l.affiliatedContact().affiliationRoleId,t)||(l.affiliatedContact().affiliationRoleId=t),h(t)}),r(1,"dx-validator"),u(2,ts,1,2,"dxi-validation-rule",17),s()()}if(i&2){let e=c(2);a("showClearButton",!0)("labelMode",e.labelMode)("label",e.GetAfflicationCompanyPropertyLabel("AffiliationRoleId"))("searchEnabled",!0)("items",e.affiliationRolesContact()),v("value",e.affiliatedContact().affiliationRoleId),a("inputAttr",P(9,kn))("ngClass",e.IsAfflicationCompanyPropertyReadonly("AffiliationRoleId")?"disabledDiv":""),n(2),a("ngIf",!e.IsAfflicationCompanyPropertyReadonly("AffiliationRoleId")&&e.CheckAfflicationCompanyPropertyRequired("AffiliationRoleId"))}}function os(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(3);n(),T(e.GetAffiliationCompanyPropertyTooltip("AffiliationRoleId"))}}function ns(i,p){i&1&&(r(0,"div",19),y(1,"i",20),r(2,"dx-tooltip",21),u(3,os,2,1,"div",22),s()()),i&2&&(n(2),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content"))}function as(i,p){if(i&1&&(r(0,"div",13),u(1,es,3,10,"dx-select-box",14)(2,is,3,10,"dx-select-box",14)(3,ns,4,2,"div",15),s()),i&2){let e=c();n(),a("ngIf",e.isCompanyRoles()),n(),a("ngIf",!e.isCompanyRoles()),n(),a("ngIf",e.IsAffiliationCompanyTooltipVisible("AffiliationRoleId"))}}function rs(i,p){if(i&1&&y(0,"dxi-validation-rule",18),i&2){let e=c(2);w("message","",e.GetAfflicationCompanyPropertyLabel("AffiliationStartDate")," is required")}}function ls(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(3);
1n(),T(e.GetAffiliationCompanyPropertyTooltip("AffiliationStartDate"))}}function ss(i,p){i&1&&(r(0,"div",19),y(1,"i",25),r(2,"dx-tooltip",26),u(3,ls,2,1,"div",22),s()()),i&2&&(n(2),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content"))}function ds(i,p){if(i&1){let e=M();r(0,"div",23)(1,"dx-date-box",24),I("valueChange",function(t){C(e);let l=c();return b(l.affiliatedContact().affiliationStartDate,t)||(l.affiliatedContact().affiliationStartDate=t),h(t)}),r(2,"dx-validator"),u(3,rs,1,2,"dxi-validation-rule",17),s()(),u(4,ss,4,2,"div",15),s()}if(i&2){let e=c();n(),a("labelMode",e.labelMode)("label",e.GetAfflicationCompanyPropertyLabel("AffiliationStartDate")),v("value",e.affiliatedContact().affiliationStartDate),a("showClearButton",!0)("acceptCustomValue",!0)("inputAttr",P(10,Rn))("max",e.affiliatedContact().affiliationEndDate)("ngClass",e.IsAfflicationCompanyPropertyReadonly("AffiliationStartDate")?"disabledDiv":""),n(2),a("ngIf",e.CheckAfflicationCompanyPropertyRequired("AffiliationStartDate")&&!e.IsAfflicationCompanyPropertyReadonly("AffiliationStartDate")),n(),a("ngIf",e.IsAffiliationCompanyTooltipVisible("AffiliationStartDate"))}}function ps(i,p){if(i&1&&y(0,"dxi-validation-rule",18),i&2){let e=c(2);w("message","",e.GetAfflicationCompanyPropertyLabel("AffiliationEndDate")," is required")}}function ms(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(3);n(),T(e.GetAffiliationCompanyPropertyTooltip("AffiliationEndDate"))}}function cs(i,p){i&1&&(r(0,"div",19),y(1,"i",28),r(2,"dx-tooltip",29),u(3,ms,2,1,"div",22),s()()),i&2&&(n(2),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content"))}function us(i,p){if(i&1){let e=M();r(0,"div",23)(1,"dx-date-box",27),I("valueChange",function(t){C(e);let l=c();return b(l.affiliatedContact().affiliationEndDate,t)||(l.affiliatedContact().affiliationEndDate=t),h(t)}),r(2,"dx-validator"),u(3,ps,1,2,"dxi-validation-rule",17),s()(),u(4,cs,4,2,"div",15),s()}if(i&2){let e=c();n(),a("labelMode",e.labelMode)("label",e.GetAfflicationCompanyPropertyLabel("AffiliationEndDate")),v("value",e.affiliatedContact().affiliationEndDate),a("acceptCustomValue",!0)("showClearButton",!0)("inputAttr",P(10,Rn))("min",e.affiliatedContact().affiliationStartDate)("ngClass",e.IsAfflicationCompanyPropertyReadonly("AffiliationEndDate")?"disabledDiv":""),n(2),a("ngIf",e.CheckAfflicationCompanyPropertyRequired("AffiliationEndDate")&&!e.IsAfflicationCompanyPropertyReadonly("AffiliationEndDate")),n(),a("ngIf",e.IsAffiliationCompanyTooltipVisible("AffiliationEndDate"))}}function fs(i,p){if(i&1){let e=M();r(0,"div",34)(1,"dx-tree-view",35,2),_("onContentReady",function(t){C(e);let l=c(2);return h(l.onMembershipTypeTreeViewReady(t))})("onItemRendered",function(t){C(e);let l=c(2);return h(l.onMembershipTypeTreeRendered(t))})("onItemSelectionChanged",function(t){C(e);let l=c(2);return h(l.onMembershipTypeTreeViewSelectionChanged(t))}),s()()}if(i&2){let e=c(2);n(),a("dataSource",e.affiliatedContact().permissionRoles)("selectByClick",!0)}}function ys(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(2);n(),T(e.GetAffiliationCompanyPropertyTooltip("PermissionRoleId"))}}function Cs(i,p){if(i&1){let e=M();r(0,"div",13)(1,"dx-drop-down-box",30,1),I("valueChange",function(t){C(e);let l=c();return b(l.membershipTypeFilterForCompany,t)||(l.membershipTypeFilterForCompany=t),h(t)}),_("onValueChanged",function(){C(e);let t=c();return h(t.onMembershipTypeDropDownBoxValueChanged())}),u(3,fs,3,2,"div",31),s(),r(4,"div",19),y(5,"i",32),r(6,"dx-tooltip",33),u(7,ys,2,1,"div",22),s()()()}if(i&2){let e=c();n(),a("labelMode",e.labelMode)("label",e.GetAfflicationCompanyPropertyLabel("PermissionRoleId"))("inputAttr",P(8,Yl))("dataSource",e.affiliatedContact().permissionRoles),v("value",e.membershipTypeFilterForCompany),n(2),a("dxTemplateOf","content"),n(3),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content")}}var On=(()=>{class i extends ee{onDropDownBoxValueChanged(){throw new Error("Method not implemented.")}onTreeViewSelectionChanged(e){throw new Error("Method not implemented.")}onTreeViewReady(e){throw new Error("Method not implemented.")}
1constructor(){super(),this.destroyRef=Qt(Yi),this.EditContactsPopup=Di("EditContactsPopup"),this.titleText=Zt(""),this.width=Zt(480),this.height=Zt("auto"),this.wrapperAttr=Zt({}),this.visible=yo(!1),this.isSaveDisabled=Zt(!1),this.save=Po(),this.companyId=Zt(0),this.companyName=Zt(),this.userTokenId=Zt(0),this.affiliationRolesCompany=Zt([]),this.affiliatedContact=Zt(new Fi),this.properties=Zt([]),this.permissionRolesCompany=Zt([]),this.membershipTypeFilterForCompany=yo([]),this.formData={},this.stylingMode="outlined",this.labelMode="floating",this.isCompanyRoles=Ao(()=>this.affiliatedContact()?.affiliationType==No.CompanyToContact.toString()),this.affiliationRolesContact=Ci([]),this.companyService=Qt(Bt),this.utilityService=Qt(_i),this.contactService=Qt(so),this.loadData=()=>{ji([this.utilityService.GetAllContactAffiliationRoles(),this.utilityService.GetAllPermissionRoles()]).pipe(qi(([e,o])=>({affiliationRolesContact:e,permissionRoles:o}))).subscribe(e=>{this.affiliationRolesContact.set(e.affiliationRolesContact?.responseModel??[]);let o=e.permissionRoles?.responseModel??[];this.Rolelist=o.map(t=>t?.roleDescriptions).filter(t=>!!t&&t.trim()!=="")})},this.treeView=Di("treeView"),this.Rolelist=[],this.loadData()}ngOnChanges(){}onFormSubmit(e){this.EditContactsPopup()?.instance?.validate()?.isValid&&(this.affiliatedContact().permissionRoleIds=this.membershipTypeFilterForCompany()?.map(t=>t)??[],this.loading=!0,this.companyService.UpdateContactToCompanyAffiliation(this.affiliatedContact()).pipe(Ui(this.destroyRef),Z(()=>this.loading=!1)).subscribe(t=>{t&&t.isSuccess?(this.loading=!1,this.showSuccessMessage("Company affiliation information has been updated successfully"),this.save.emit(),this.closePopup()):(this.loading=!1,this.showErrorMessage(t.message))},t=>{this.loading=!1,this.showErrorMessage(t.message)}))}closePopup(){this.visible.set(!1)}GetAfflicationCompanyPropertyLabel(e){let o=this.properties().filter(t=>t.sourceColumnName!=null&&t.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&t.page
1Category.toLocaleLowerCase()==Pt.Affiliations.toString().toLocaleLowerCase());return o.length>0?o[0].fieldCaption:""}CheckAfflicationCompanyPropertyVisible(e){return this.properties().filter(t=>t.sourceColumnName!=null&&t.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&t.pageCategory.toLocaleLowerCase()==Pt.Affiliations.toString().toLocaleLowerCase()&&t.isVisible==!0).length>0}CheckAfflicationCompanyPropertyRequired(e){return this.properties().filter(t=>t.sourceColumnName!=null&&t.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&t.pageCategory.toLocaleLowerCase()==Pt.Affiliations.toString().toLocaleLowerCase()&&t.isRequired==!0).length>0}GetAffiliationCompanyPropertyTooltip(e){let o=this.properties().filter(t=>t.sourceColumnName!=null&&t.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&t.pageCategory.toLocaleLowerCase()==Pt.Affiliations.toString().toLocaleLowerCase());return o.length>0?o[0].formControlTooltip:""}IsAffiliationCompanyTooltipVisible(e){return this.properties().filter(t=>t.isVisible&&t.sourceColumnName!=null&&t.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&t.page
1Category.toLocaleLowerCase()==Pt.Affiliations.toString().toLocaleLowerCase()&&t.formControlTooltip!=null&&t.formControlTooltip!=""&&t.formControlTooltip!="").length>0}IsAfflicationCompanyPropertyReadonly(e){return this.properties().filter(t=>t.sourceColumnName!=null&&t.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&t.pageCategory.toLocaleLowerCase()==Pt.Affiliations.toString().toLocaleLowerCase()&&t.isReadOnly==!1).length>0}onMembershipTypeTreeRendered(e){if(e.node.children.length>0){let o=e.itemElement.querySelector(".dx-checkbox");Vo.getInstance(o).option("visible",!1)}}onMembershipTypeTreeViewSelectionChanged(e){this.membershipTypeFilterForCompany.set(e.component.getSelectedNodeKeys())}onMembershipTypeDropDownBoxValueChanged(){this.updateSelection(this.treeView()?.instance)}onMembershipTypeTreeViewReady(e){this.updateSelection(e.component)}updateSelection(e){e&&((!this.membershipTypeFilterForCompany()||this.membershipTypeFilterForCompany().length==0)&&e.unselectAll(),this.membershipTypeFilterForCompany()?.forEach(o=>{e.selectItem(o)}))}static{this.\u0275fac=function(o){return new(o||i)}}static{this.\u0275cmp=Q({type:i,selectors:[["edit-contacts-popup"]],viewQuery:function(o,t){o&1&&(Pi(t.EditContactsPopup,Xl,5),Pi(t.treeView,Jl,5)),o&2&&$i(2)},inputs:{titleText:[Gt.SignalBased,"titleText"],width:[Gt.SignalBased,"width"],height:[Gt.SignalBased,"height"],wrapperAttr:[Gt.SignalBased,"wrapperAttr"],visible:[Gt.SignalBased,"visible"],isSaveDisabled:[Gt.SignalBased,"isSaveDisabled"],companyId:[Gt.SignalBased,"companyId"],companyName:[Gt.SignalBased,"companyName"],userTokenId:[Gt.SignalBased,"userTokenId"],affiliationRolesCompany:[Gt.SignalBased,"affiliationRolesCompany"],affiliatedContact:[Gt.SignalBased,"affiliatedContact"],properties:[Gt.SignalBased,"properties"],permissionRolesCompany:[Gt.SignalBased,"permissionRolesCompany"],membershipTypeFilterForCompany:[Gt.SignalBased,"membershipTypeFilterForCompany"]},outputs:{visible:"visibleChange",save:"save",membershipTypeFilterForCompany:"membershipTypeFilterForCompanyChange"},standalone:!0,features:[K,Mi,X],decls:15,vars:5,consts:[["EditContactsPopup",""],["dropdownBox",""],["treeViewBox",""],[1,"dx-popup-content-block"],[1,"form-outer"],["id","form",3,"formData"],[1,"group-info"],[1,"full-width"],["class","dx-field multi-select",4,"ngIf"],["class","dx-field",4,"ngIf"],[1,"dx-popup-footer"],["text","Cancel","stylingMode","contained","type","normal",1,"btn","btn--cancel",3,"onClick"],["text","Save","stylingMode","contained","type","default",1,"btn","btn--primary",3,"onClick"],[1,"dx-field","multi-select"],["class","select-box","displayExpr","affiliationRole","valueExpr","affiliationRoleID","placeholder","Select",3,"showClearButton","labelMode","label","searchEnabled","items","value","inputAttr","ngClass","valueChange",4,"ngIf"],["class","tooltip-info",4,"ngIf"],["displayExpr","affiliationRole","valueExpr","affiliationRoleID","placeholder","Select",1,"select-box",3,"valueChange","showClearButton","labelMode","label","searchEnabled","items","value","inputAttr","ngClass"],["type","required",3,"message",4,"ngIf"],["type","required",3,"message"],[1,"tooltip-info"],["id","editContactGroupPositionId",1,"icon","dx-icon-info"],["target","#editContactGroupPositionId","showEvent","mouseenter","hideEvent","mouseleave",3,"hideOnOutsideClick"],[4,"dxTemplate","dxTemplateOf"],[1,"dx-field"],["type","date",1,"date-box",3,"valueChange","labelMode","label","value","showClearButton","acceptCustomValue","inputAttr","max","ngClass"],["id","editContactStartDate",1,"icon","dx-icon-info"],["target","#editContactStartDate","showEvent","mouseenter","hideEvent","mouseleave",3,"hideOnOutsideClick"],["type","date",1,"date-box",3,"valueChange","labelMode","label","value","acceptCustomValue","showClearButton","inputAttr","min","ngClass"],["id","editContactEndDate",1,"icon","dx-icon-info"],["target","#editContactEndDate","showEvent","mouseenter","hideEvent","mouseleave",3,"hideOnOutsideClick"],["valueExpr","permissionRoleId","displayExpr","roleDescriptions","placeholder","Select",1,"select-box",3,"valueChange","onValueChanged","labelMode","label","inputAttr","dataSource","value"],["class","multiple-outer select-box",4,"dxTemplate","dxTemplateOf"],["id","PermissionRoleId",1,"icon","dx-icon-info"],["target","#PermissionRoleId","showEvent","mouseenter","hideEvent","mouseleave",3,"hideOnOutsideClick"],[1,"multiple-outer","select-box"],["dataStructure","plain","keyExpr","permissionRoleId","selectionMode","multiple","showCheckBoxesM
1ode","normal","displayExpr","roleDescriptions",3,"onContentReady","onItemRendered","onItemSelectionChanged","dataSource","selectByClick"]],template:function(o,t){if(o&1){let l=M();r(0,"div",3)(1,"dx-validation-group",null,0)(3,"form",4)(4,"dx-form",5)(5,"dxi-item")(6,"div",6)(7,"div",7),u(8,as,4,3,"div",8),s(),u(9,ds,5,11,"div",9)(10,us,5,11,"div",9)(11,Cs,8,9,"div",8),s()()()()()(),r(12,"div",10)(13,"dx-button",11),_("onClick",function(){return C(l),h(t.closePopup())}),s(),r(14,"dx-button",12),_("onClick",function(d){return C(l),h(t.onFormSubmit(d))}),s()()}o&2&&(n(4),a("formData",t.formData),n(4),a("ngIf",t.CheckAfflicationCompanyPropertyVisible("AffiliationRoleId")),n(),a("ngIf",t.CheckAfflicationCompanyPropertyVisible("AffiliationStartDate")),n(),a("ngIf",t.CheckAfflicationCompanyPropertyVisible("AffiliationEndDate")),n(),a("ngIf",t.CheckAfflicationCompanyPropertyVisible("PermissionRoleId")))},dependencies:[Y,Dt,J,$,pe,jt,zt,qt,se,Rt,It,de,me,ce,ue,fe,ye,wt,Ce,he,_e,xe,ge,ve,be,Yt,Ie,xi,we,Me,De,Pe,Te,oo,Se,Ae,Ee,Ve,Le,Ht,ke,Re,Oe,Be,Ge,Fe,Ne,We,ze,qe,je,He,Ue,Ze,Qe,Ke,Xe,Je,Ye,$e,et,tt,it,ot,nt,Ut,at,rt,lt,st,dt,pt,mt,ct,ut,ft,yt,Ct,ht,$t,_t,gt,ei,vt,bt,ti,xt,ao,oe,le,re,ae,ne,ie,te],styles:[".form-popup .dx-toolbar-center{width:100%}.form-popup-buttons-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:var(--popup-toolbar-item-spacing)}.form-popup-buttons-container.flex-buttons[_ngcontent-%COMP%] .dx-button{flex:1}.group-info[_ngcontent-%COMP%]{width:100%;-ms-display:flex;-webkit-display:flex;-moz-display:flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;justify-content:space-between;align-items:baseline;align-content:baseline}.group-info[_ngcontent-%COMP%] .full-width[_ngcontent-%COMP%]{width:100%;max-width:100%}.dx-field.multi-select[_ngcontent-%COMP%] .select-box[_ngcontent-%COMP%]{padding-right:10px}.disabledDiv[_ngcontent-%COMP%]{pointer-events:none;opacity:.4}"],changeDetection:0})}}return i})();var Io=()=>({id:"elementId",class:"popup-outer company-history-table-list w-900"}),hs=()=>({id:"elementId",class:"overlay overly-status popup-filter-company-contacts-expand-view"}),Bn=()=>({"aria-label":"Date Picker"}),_s=()=>({"aria-label":"Financial Periods"}),xs=()=>({"aria-label":"Select Status"}),gs=()=>({id:"elementId",class:"overlay overly-status popup-filter-key-contacts-expand-view"}),vs=()=>({"aria-label":"Role"}),bs=()=>({id:"elementId",class:"popup-outer tooltip-wrapper w-800"});function Is(i,p){if(i&1){let e=M();r(0,"a",69),_("click",function(){C(e);let t=c();return h(t.toggleContactInformation())}),k(),r(1,"svg",70),y(2,"path",71),s()()}}function ws(i,p){if(i&1){let e=M();r(0,"a",79),_("click",function(){C(e);let t=c(2);return h(t.keyContactsEvent())}),k(),r(1,"svg",80),y(2,"path",81)(3,"path",82),s(),f(4," Expand View "),s()}}function Ms(i,p){if(i&1){let e=M();r(0,"a",79),_("click",function(){C(e);let t=c(2);return h(t.viewCompanyContactsEvent())}),k(),r(1,"svg",80),y(2,"path",81)(3,"path",82),s(),f(4," Expand View "),s()}}function Ds(i,p){if(i&1){let e=M();r(0,"a",79),_("click",function(){C(e);let t=c(2);return h(t.viewAffiliationRequestsExpandPopupEvent())}),k(),r(1,"svg",80),y(2,"path",81)(3,"path",82),s(),f(4," Expand View "),s()}}function Ps(i,p){i&1&&(r(0,"div",83),f(1," Key Contacts "),s())}function Ts(i,p){if(i&1&&(r(0,"div",89)(1,"div",90),f(2),s(),r(3,"span",91),f(4),s()()),i&2){let e=p.$implicit;n(),W("title",e.data.displayName),n(),T(e.data.displayName),n(),W("title",e.data.displayId),n(),T(e.data.displayId)}}function Ss(i,p){if(i&1&&y(0,"dxi-column",92),i&2){let e=c(3);a("minWidth",200)("caption",e.getAfflicationCompanyPropertyLabel("AffiliationRoleId"))("fixed",!1)}}function As(i,p){if(i&1&&y(0,"dxi-column",93),i&2){let e=c(3);a("caption",e.getAfflicationCompanyPropertyLabel("PermissionRoleId"))("calculateCellValue",e.calculateRoleDescriptionCellValue)("allowSorting",!1)("fixed",!1)("minWidth",200)}}function Es(i,p){if(i&1){let e=M();r(0,"a",98),_("click",function(){C(e);let t=c().$implicit,l=c(4);return h(l.editContactsPopupEvent(t.data))}),k(),r(1,"svg",99),y(2,"path",100),s()()}}function Vs(i,p){if(i&1){let e=M();r(0,"a",98),_("click",function(){C(e);let t=c().$implicit,l=c(4);return h(l.deleteContactsPopupEvent(t.data))}),k(),r(1,"svg",99),y(2,"path",101),s()()}}
1function Ls(i,p){if(i&1&&(r(0,"span",96),u(1,Es,3,0,"a",97)(2,Vs,3,0,"a",97),s()),i&2){let e=c(4);n(),a("ngIf",e.checkCompanyLevelPermission("Edit Contacts")),n(),a("ngIf",e.checkCompanyLevelPermission("Delete Contacts"))}}function ks(i,p){i&1&&(r(0,"dxi-column",94),u(1,Ls,3,2,"span",95),s()),i&2&&(a("fixed",!1)("width",100),n(),a("dxTemplateOf","KeyExpandAction"))}function Rs(i,p){if(i&1&&(r(0,"div",84)(1,"div",85)(2,"dx-data-grid",86)(3,"dxi-column",87),u(4,Ts,5,4,"div",61),s(),u(5,Ss,1,3,"dxi-column",88)(6,As,1,5,"dxi-column",51)(7,ks,2,3,"dxi-column",62),s()()()),i&2){let e=c(2);n(2),a("dataSource",e.keyActiveContactAffiliationGroupsGrid),n(),a("minWidth",200)("fixed",!0),n(),a("dxTemplateOf","ContactName"),n(),a("ngIf",e.checkAfflicationCompanyPropertyVisible("AffiliationRoleId")),n(),a("ngIf",e.checkAfflicationCompanyPropertyVisible("PermissionRoleId")),n(),a("ngIf",e.checkCompanyLevelPermission("Edit Contacts")||e.checkCompanyLevelPermission("Delete Contacts"))}}function Os(i,p){i&1&&(r(0,"div",83),f(1," Company Contacts "),s())}function Bs(i,p){if(i&1&&(r(0,"div",89)(1,"div",90),f(2),s(),r(3,"span",91),f(4),s()()),i&2){let e=p.$implicit;n(),W("title",e.data.displayName),n(),T(e.data.displayName),n(),W("title",e.data.displayId),n(),T(e.data.displayId)}}function Gs(i,p){if(i&1&&y(0,"dxi-column",108),i&2){let e=c(3);a("caption",e.getAfflicationCompanyPropertyLabel("AffiliationRoleId"))("fixed",!1)("minWidth",200)}}function Fs(i,p){if(i&1&&y(0,"dxi-column",109),i&2){let e=c(3);a("caption",e.getAfflicationCompanyPropertyLabel("AffiliationStartDate"))("customizeText",e.customizeDateTime)("fixed",!1)("minWidth",200)}}function Ns(i,p){if(i&1&&y(0,"dxi-column",110),i&2){let e=c(3);a("caption",e.getAfflicationCompanyPropertyLabel("AffiliationEndDate"))("customizeText",e.customizeDateTime)("fixed",!1)("minWidth",200)}}function Ws(i,p){if(i&1&&y(0,"dxi-column",93),i&2){let e=c(3);a("caption",e.getAfflicationCompanyPropertyLabel("PermissionRoleId"))("calculateCellValue",e.calculateRoleDescriptionCellValue)("allowSorting",!1)("fixed",!1)("minWidth",200)}}function zs(i,p){if(i&1&&(r(0,"span"),f(1),s()),i&2){let e=p.$implicit;Kt("status ",e.data.activeStatus==!0?"Active":"Inactive",""),n(),T(e.data.activeStatus==!0?"Active":"Inactive")}}function qs(i,p){if(i&1){let e=M();r(0,"a",98),_("click",function(){C(e);let t=c().$implicit,l=c(4);return h(l.editContactsPopupEvent(t.data))}),k(),r(1,"svg",99),y(2,"path",100),s()()}}function js(i,p){if(i&1){let e=M();r(0,"a",98),_("click",function(){C(e);let t=c().$implicit,l=c(4);return h(l.deleteContactsPopupEvent(t.data))}),k(),r(1,"svg",99),y(2,"path",101),s()()}}function Hs(i,p){if(i&1&&(r(0,"span",96),u(1,qs,3,0,"a",97)(2,js,3,0,"a",97),s()),i&2){let e=c(4);n(),a("ngIf",e.checkCompanyLevelPermission("Edit Contacts")),n(),a("ngIf",e.checkCompanyLevelPermission("Delete Contacts"))}}function Us(i,p){i&1&&(r(0,"dxi-column",111),u(1,Hs,3,2,"span",95),s()),i&2&&(a("fixed",!1)("width",100),n(),a("dxTemplateOf","ActionCheck"))}function Zs(i,p){if(i&1&&(r(0,"div",84)(1,"div",85)(2,"dx-data-grid",102)(3,"dxi-column",103),u(4,Bs,5,4,"div",61),s(),u(5,Gs,1,3,"dxi-column",104)(6,Fs,1,4,"dxi-column",105)(7,Ns,1,4,"dxi-column",106)(8,Ws,1,5,"dxi-column",51),r(9,"dxi-column",107),u(10,zs,2,4,"span",53),s(),u(11,Us,2,3,"dxi-column",54),s()()()),i&2){let e=c(2);n(2),a("dataSource",e.activeContactAffiliationGroupsGrid)("showBorders",!0)("allowColumnReordering",!1)("focusedRowEnabled",!0)("columnAutoWidth",!0)("allowColumnResizing",!1)("columnHidingEnabled",!1),n(),a("fixed",!0)("minWidth",200),n(),a("dxTemplateOf","ContactName"),n(),a("ngIf",e.checkAfflicationCompanyPropertyVisible("AffiliationRoleId")),n(),a("ngIf",e.checkAfflicationCompanyPropertyVisible("AffiliationStartDate")),n(),a("ngIf",e.checkAfflicationCompanyPropertyVisible("AffiliationEndDate")),n(),a("ngIf",e.checkAfflicationCompanyPropertyVisible("PermissionRoleId")),n(),a("fixed",!1)("minWidth",150),n(),a("dxTemplateOf","statusTemplate"),n(),a("ngIf",e.checkCompanyLevelPermission("Edit Contacts")||e.checkCompanyLevelPermission("Delete Contacts"))}}function Qs(i,p){i&1&&(r(0,"div",83),f(1," Affiliation Requests "),s())}function Ks(i,p){i&1&&(r(0,"div",83),f(1,"Pending"),s())}function Xs(i,p){if(i&1&&(r(0,"div",89)(1,"div",121),f(2),s(),r(3,"span"),f(4),s()()),i&2){let e=p.$implicit;n(2),T(e.data.contactName),n(2),T(e.data.contactCustomerId)}}function Js(i,p){if(i&1&&(r(0,"div"),y(1,"app-status-badge",122),s()),i&2){let e=p.$implicit;n(),a("status",e.data.status)}}function Ys(i,p){if(i&1){let e=M();
1r(0,"span",96)(1,"a",124),_("click",function(){let t=C(e).$implicit,l=c(5);return h(l.approveAffiliationRequest(t.data))}),k(),r(2,"svg",99),y(3,"path",125),s()(),U(),r(4,"a",126),_("click",function(){let t=C(e).$implicit,l=c(5);return h(l.rejectAffiliationRequest(t.data))}),k(),r(5,"svg",99),y(6,"path",127),s()()()}}function $s(i,p){i&1&&(r(0,"dxi-column",123),u(1,Ys,7,0,"span",95),s()),i&2&&(a("width",100),n(),a("dxTemplateOf","PendingActionTpl"))}function ed(i,p){if(i&1&&(r(0,"div",84)(1,"div",85)(2,"dx-data-grid",115)(3,"dxi-column",116),u(4,Xs,5,2,"div",61),s(),y(5,"dxi-column",117),r(6,"dxi-column",118),u(7,Js,2,1,"div",47),s(),y(8,"dxi-column",119),u(9,$s,2,2,"dxi-column",120),s()()()),i&2){let e=c(3);n(2),a("dataSource",e.pendingRequests)("showBorders",!0)("columnAutoWidth",!0),n(),a("minWidth",200),n(),a("dxTemplateOf","PendingContactTpl"),n(),a("customizeText",e.customizeDateTime)("minWidth",150),n(),a("minWidth",120),n(),a("dxTemplateOf","PendingStatusTpl"),n(),a("minWidth",150),n(),a("ngIf",e.canAcceptDeclineAffiliationRequests)}}function td(i,p){i&1&&(r(0,"div",83),f(1,"Approved"),s())}function id(i,p){if(i&1&&(r(0,"div",89)(1,"div",121),f(2),s(),r(3,"span"),f(4),s()()),i&2){let e=p.$implicit;n(2),T(e.data.contactName),n(2),T(e.data.contactCustomerId)}}function od(i,p){if(i&1&&(r(0,"div"),y(1,"app-status-badge",122),s()),i&2){let e=p.$implicit;n(),a("status",e.data.status)}}function nd(i,p){if(i&1&&(r(0,"div",84)(1,"div",85)(2,"dx-data-grid",115)(3,"dxi-column",128),u(4,id,5,2,"div",61),s(),y(5,"dxi-column",117),r(6,"dxi-column",129),u(7,od,2,1,"div",47),s(),y(8,"dxi-column",119)(9,"dxi-column",130),s()()()),i&2){let e=c(3);n(2),a("dataSource",e.approvedRequests)("showBorders",!0)("columnAutoWidth",!0),n(),a("minWidth",200),n(),a("dxTemplateOf","ApprovedContactTpl"),n(),a("customizeText",e.customizeDateTime)("minWidth",150),n(),a("minWidth",120),n(),a("dxTemplateOf","ApprovedStatusTpl"),n(),a("minWidth",150),n(),a("minWidth",150)}}function ad(i,p){i&1&&(r(0,"div",83),f(1,"Rejected"),s())}function rd(i,p){if(i&1&&(r(0,"div",89)(1,"div",121),f(2),s(),r(3,"span"),f(4),s()()),i&2){let e=p.$implicit;n(2),T(e.data.contactName),n(2),T(e.data.contactCustomerId)}}function ld(i,p){if(i&1&&(r(0,"div"),y(1,"app-status-badge",122),s()),i&2){let e=p.$implicit;n(),a("status",e.data.status)}}function sd(i,p){if(i&1&&(r(0,"div",84)(1,"div",85)(2,"dx-data-grid",115)(3,"dxi-column",131),u(4,rd,5,2,"div",61),s(),y(5,"dxi-column",117),r(6,"dxi-column",132),u(7,ld,2,1,"div",47),s(),y(8,"dxi-column",119)(9,"dxi-column",133),s()()()),i&2){let e=c(3);n(2),a("dataSource",e.rejectedRequests)("showBorders",!0)("columnAutoWidth",!0),n(),a("minWidth",200),n(),a("dxTemplateOf","RejectedContactTpl"),n(),a("customizeText",e.customizeDateTime)("minWidth",150),n(),a("minWidth",120),n(),a("dxTemplateOf","RejectedStatusTpl"),n(),a("minWidth",150),n(),a("minWidth",150)}}function dd(i,p){if(i&1){let e=M();r(0,"div",84)(1,"dx-tab-panel",63),I("selectedIndexChange",function(t){C(e);let l=c(2);return b(l.affiliationSubTabIndex,t)||(l.affiliationSubTabIndex=t),h(t)}),y(2,"dxi-item",112),u(3,Ks,2,0,"div",65)(4,ed,10,11,"div",66),y(5,"dxi-item",113),u(6,td,2,0,"div",65)(7,nd,10,11,"div",66),y(8,"dxi-item",114),u(9,ad,2,0,"div",65)(10,sd,10,11,"div",66),s()()}if(i&2){let e=c(2);n(),v("selectedIndex",e.affiliationSubTabIndex),a("loop",!1)("animationEnabled",!1)("swipeEnabled",!1)("tabsPosition",e.tabsPosition),n(2),a("dxTemplateOf","AffPendingTabHeader"),n(),a("dxTemplateOf","AffPendingTabContent"),n(2),a("dxTemplateOf","AffApprovedTabHeader"),n(),a("dxTemplateOf","AffApprovedTabContent"),n(2),a("dxTemplateOf","AffRejectedTabHeader"),n(),a("dxTemplateOf","AffRejectedTabContent")}}function pd(i,p){if(i&1){let e=M();r(0,"div",72)(1,"div",73),u(2,ws,5,0,"a",74)(3,Ms,5,0,"a",74)(4,Ds,5,0,"a",74),s(),r(5,"dx-tab-panel",75,3),_("onTitleClick",function(t){C(e);let l=c();return h(l.setSelectedIndex(t))}),y(7,"dxi-item",76),u(8,Ps,2,0,"div",65)(9,Rs,8,7,"div",66),ui(10),y(11,"dxi-item",77),u(12,Os,2,0,"div",65)(13,Zs,12,18,"div",66),fi(),ui(14),y(15,"dxi-item",78),u(16,Qs,2,0,"div",65)(17,dd,11,11,"div",66),fi(),s()()}if(i&2){let e=c();n(2),a("ngIf",e.selectedIndex==0),n(),a("ngIf",e.selectedIndex==1),n(),a("ngIf",e.selectedIndex==2),n(),a("selectedIndex",e.selectedIndex)("loop",!1)("animationEnabled",!1)("swipeEnabled",!1)("tabsPosition",e.tabsPosition)("height",418),n(3),a("dxTemplateOf","KeyContactsHeader"),n(),a("dxTemplateOf","KeyContactsContent"),n(3),a("dxTemplateOf","CompanyContactsHeader"),n(),a("dxTemplateOf","CompanyContactsContent"),n(3),a("dxTemplateOf","AffiliationRequestsHeader"),n(),a("dxTemplateOf","AffiliationRequestsContent")}}function md(i,p){i&1&&(r(0,"div",134)(1,"p"),f(2,"There are no contacts added yet."),s()())}function cd(i,p){if(i&1&&(r(0,"div")(1,"div",135)(2,"span",121),f(3),s(),r(4,"em",136),f(5),s()()()),i&2){let e=p.$implicit;n(),W("title",e.data.displayName),W("title",e.data.displayId),n(2),T(e.data.displayName),n(2),T(e.data.displayId)}}function ud(i,p){if(i&1&&y(0,"dxi-column",137),i&2){let e=c();a("caption",e.getAfflicationCompanyPropertyLabel("AffiliationRoleId"))("fixed",!1)("width",150)}}function fd(i,p){if(i&1&&y(0,"dxi-column",138),i&2){let e=c();a("caption",e.getAfflicationCompanyPropertyLabel("AffiliationStartDate"))("customizeText",e.customizeDateTime)("fixed",!1)("width",150)}}function yd(i,p){if(i&1&&y(0,"dxi-column",139),i&2){let e=c();a("caption",e.getAfflicationCompanyPropertyLabel("AffiliationEndDate"))("customizeText",e.customizeDateTime)("fixed",!1)("width",150)}}function Cd(i,p){if(i&1&&y(0,"dxi-column",93),i&2){let e=c();a("caption",e.getAfflicationCompanyPropertyLabel("PermissionRoleId"))("calculateCellValue",e.calculateRoleDescriptionCellValue)("allowSorting",!1)("fixed",!1)("minWidth",200)}}function hd(i,p){if(i&1&&(r(0,"span"),f(1),s()),i&2){let e=p.$implicit;Kt("status ",e.data.activeStatus==!0?"Active":"Inactive",""),n(),T(e.data.activeStatus==!0?"Active":"Inactive")}}function _d(i,p){if(i&1){let e=M();r(0,"a",98),_("click",function(){C(e);let t=c().$implicit,l=c(2);return h(l.editContactsPopupEvent(t.data))}),k(),r(1,"svg",99),y(2,"path",100),s()()}}function xd(i,p){if(i&1){let e=M();r(0,"a",98),_("click",function(){C(e);let t=c().$implicit,l=c(2);return h(l.deleteContactsPopupEvent(t.data))}),k(),r(1,"svg",99),y(2,"path",101),s()()}}
1function gd(i,p){if(i&1&&(r(0,"span",96),u(1,_d,3,0,"a",97)(2,xd,3,0,"a",97),s()),i&2){let e=c(2);n(),a("ngIf",e.checkCompanyLevelPermission("Edit Contacts")),n(),a("ngIf",e.checkCompanyLevelPermission("Delete Contacts"))}}function vd(i,p){i&1&&(r(0,"dxi-column",111),u(1,gd,3,2,"span",95),s()),i&2&&(a("fixed",!1)("width",100),n(),a("dxTemplateOf","ActionCheck"))}function bd(i,p){if(i&1){let e=M();r(0,"dx-popup",14),I("visibleChange",function(t){C(e);let l=c();return b(l.editContactsPopup,t)||(l.editContactsPopup=t),h(t)}),r(1,"div",15)(2,"h2"),f(3),s()(),r(4,"edit-contacts-popup",140),I("visibleChange",function(t){C(e);let l=c();return b(l.editContactsPopup,t)||(l.editContactsPopup=t),h(t)}),_("visibleChange",function(){C(e);let t=c();return h(t.closeEditcontactPopup())})("save",function(){C(e);let t=c();return h(t.bindContactAffiliation())}),s()()}if(i&2){let e=c();a("showTitle",!1)("dragEnabled",!1)("hideOnOutsideClick",!0),v("visible",e.editContactsPopup),a("wrapperAttr",P(14,bs)),n(3),O("Edit affiliation with ",e.selectedAffiliationGroup==null?null:e.selectedAffiliationGroup.displayName,""),n(),v("visible",e.editContactsPopup),a("affiliationRolesCompany",e.affiliationRoles)("affiliatedContact",e.selectedAffiliationGroup)("companyId",e.companyInfo==null?null:e.companyInfo.companyId)("companyName",e.companyInfo==null?null:e.companyInfo.companyName)("permissionRolesCompany",e.permissionRoles)("membershipTypeFilterForCompany",e.membershipTypeFilter)("properties",e.companyPageControls)}}function Id(i,p){if(i&1&&(r(0,"div",89)(1,"div",90),f(2),s(),r(3,"span",91),f(4),s()()),i&2){let e=p.$implicit;n(),W("title",e.data.displayName),n(),O(" ",e.data.displayName," "),n(),W("title",e.data.displayId),n(),T(e.data.displayId)}}function wd(i,p){if(i&1&&y(0,"dxi-column",137),i&2){let e=c();a("caption",e.getAfflicationCompanyPropertyLabel("AffiliationRoleId"))("fixed",!1)("width",150)}}function Md(i,p){if(i&1&&y(0,"dxi-column",93),i&2){let e=c();a("caption",e.getAfflicationCompanyPropertyLabel("PermissionRoleId"))("calculateCellValue",e.calculateRoleDescriptionCellValue)("allowSorting",!1)("fixed",!1)("minWidth",200)}}function Dd(i,p){if(i&1){let e=M();r(0,"a",98),_("click",function(){C(e);let t=c().$implicit,l=c(2);return h(l.editContactsPopupEvent(t.data))}),k(),r(1,"svg",99),y(2,"path",100),s()()}}function Pd(i,p){if(i&1){let e=M();r(0,"a",98),_("click",function(){C(e);let t=c().$implicit,l=c(2);return h(l.deleteContactsPopupEvent(t.data))}),k(),r(1,"svg",99),y(2,"path",101),s()()}}function Td(i,p){if(i&1&&(r(0,"span",96),u(1,Dd,3,0,"a",97)(2,Pd,3,0,"a",97),s()),i&2){let e=c(2);n(),a("ngIf",e.checkCompanyLevelPermission("Edit Contacts")),n(),a("ngIf",e.checkCompanyLevelPermission("Delete Contacts"))}}function Sd(i,p){i&1&&(r(0,"dxi-column",94),u(1,Td,3,2,"span",95),s()),i&2&&(a("fixed",!1)("width",100),n(),a("dxTemplateOf","KeyExpandAction"))}function Ad(i,p){i&1&&(r(0,"div",83),f(1,"Pending"),s())}function Ed(i,p){if(i&1&&(r(0,"div",89)(1,"div",121),f(2),s(),r(3,"span"),f(4),s()()),i&2){let e=p.$implicit;n(2),T(e.data.contactName),n(2),T(e.data.contactCustomerId)}}function Vd(i,p){if(i&1&&(r(0,"div"),y(1,"app-status-badge",122),s()),i&2){let e=p.$implicit;n(),a("status",e.data.status)}}function Ld(i,p){if(i&1){let e=M();r(0,"span",96)(1,"a",124),_("click",function(){let t=C(e).$implicit,l=c(3);return h(l.approveAffiliationRequest(t.data))}),k(),r(2,"svg",99),y(3,"path",125),s()(),U(),r(4,"a",126),_("click",function(){let t=C(e).$implicit,l=c(3);return h(l.rejectAffiliationRequest(t.data))}),k(),r(5,"svg",99),y(6,"path",127),s()()()}}function kd(i,p){i&1&&(r(0,"dxi-column",145),u(1,Ld,7,0,"span",95),s()),i&2&&(a("width",100),n(),a("dxTemplateOf","PopupPendingActionTpl"))}function Rd(i,p){if(i&1&&(r(0,"div",84)(1,"dx-data-grid",115),y(2,"dxo-search-panel",141),r(3,"dxi-column",142),u(4,Ed,5,2,"div",61),s(),y(5,"dxi-column",117),r(6,"dxi-column",143),u(7,Vd,2,1,"div",47),s(),y(8,"dxi-column",119),u(9,kd,2,2,"dxi-column",144),s()()),i&2){let e=c();n(),a("dataSource",e.pendingRequests)("showBorders",!0)("columnAutoWidth",!0),n(),a("visible",!0),n(),a("minWidth",200),n(),a("dxTemplateOf","PopupPendingContactTpl"),n(),a("customizeText",e.customizeDateTime)("minWidth",150),n(),a("minWidth",120),n(),a("dxTemplateOf","PopupPendingStatusTpl"),n(),a("minWidth",150),n(),a("ngIf",e.canAcceptDeclineAffiliationRequests)}}function Od(i,p){i&1&&(r(0,"div",83),f(1,"Approved"),s())}function Bd(i,p){if(i&1&&(r(0,"div",89)(1,"div",121),f(2),s(),r(3,"span"),f(4),s()()),i&2){let e=p.$implicit;n(2),T(e.data.contactName),n(2),T(e.data.contactCustomerId)}}function Gd(i,p){if(i&1&&(r(0,"div"),y(1,"app-status-badge",122),s()),i&2){let e=p.$implicit;n(),a("status",e.data.status)}}function Fd(i,p){if(i&1&&(r(0,"div",84)(1,"dx-data-grid",115),y(2,"dxo-search-panel",141),r(3,"dxi-column",146),u(4,Bd,5,2,"div",61),s(),y(5,"dxi-column",117),r(6,"dxi-column",147),u(7,Gd,2,1,"div",47),s(),y(8,"dxi-column",119)(9,"dxi-column",130),s()()),i&2){let e=c();n(),a("dataSource",e.approvedRequests)("showBorders",!0)("columnAutoWidth",!0),n(),a("visible",!0),n(),a("minWidth",200),n(),a("dxTemplateOf","PopupApprovedContactTpl"),n(),a("customizeText",e.customizeDateTime)("minWidth",150),n(),a("minWidth",120),n(),a("dxTemplateOf","PopupApprovedStatusTpl"),n(),a("minWidth",150),n(),a("minWidth",150)}}function Nd(i,p){i&1&&(r(0,"div",83),f(1,"Rejected"),s())}function Wd(i,p){if(i&1&&(r(0,"div",89)(1,"div",121),f(2),s(),r(3,"span"),f(4),s()()),i&2){let e=p.$implicit;n(2),T(e.data.contactName),n(2),T(e.data.contactCustomerId)}}function zd(i,p){if(i&1&&(r(0,"div"),y(1,"app-status-badge",122),s()),i&2){let e=p.$implicit;n(),a("status",e.data.status)}}function qd(i,p){if(i&1&&(r(0,"div",84)(1,"dx-data-grid",115),y(2,"dxo-search-panel",141),r(3,"dxi-column",148),u(4,Wd,5,2,"div",61),s(),y(5,"dxi-column",117),r(6,"dxi-column",149),u(7,zd,2,1,"div",47),s(),y(8,"dxi-column",119)(9,"dxi-column",133),s()()),i&2){let e=c();n(),a("dataSource",e.rejectedRequests)("showBorders",!0)("columnAutoWidth",!0),n(),a("visible",!0),n(),a("minWidth",200),n(),a("dxTemplateOf","PopupRejectedContactTpl"),n(),a("customizeText",e.customizeDateTime)("minWidth",150),n(),a("minWidth",120),n(),a("dxTemplateOf","PopupRejectedStatusTpl"),n(),a("minWidth",150),n(),a("minWidth",150)}}/localhost/.test(document.location.host)||void 0;var Fn=(()=>{class i extends ee{constructor(e,o,t,l,m,d,A,L){super(),this.router=o,this.companyService=t,this.commonService=l,this.groupService=m,this.webStorageService=d,this.memberPermissionService=A,this.utilityService=L,this.companyPageControls=[],this.affiliationRoles=[],this.permissionRoles=[],this.getCompanyDetails=new Nt,this.keyActiveContactAffiliationGroups=[],this.keyActiveContactAffiliationGroupsGrid=[],this.selectedAffiliationGroup=new Fi,this.selectedGroupConstituent=new yi,this.unsubscriber=new Lt,this.tabsPositions=["top"],this.tabsPosition=this.tabsPositions[0],this.membershipTypeFilter=[],this.affiliationGroups=[],this.inactiveContactAffiliationGroups=[],this.activeContactAffiliationGroups=[],this.activeContactAffiliationGroupsGrid=[],this.filteredCompanyContacts=[],this.filteredKeyContacts=[],this.viewKeyContactsPopup=!1,this.viewCompanyContactsPopup=!1,this.selectedIndex=0,this.companyContactsKey="Company Contacts",this.now=new Date,this.roleStatus=[],this.deleteContactAction="delete",this.affiliationRequests=[],this.pendingRequests=[],this.approvedRequests=[],this.rejectedRequests=[],this.affiliationSubTabIndex=0,this.affiliationPopupSubTabIndex=0,this.viewAffiliationRequestsExpandPopup=!1,this.canAcceptDeclineAffiliationRequests=!1,this.companyPermissions=[],this.stylingMode="outlined",this.labelMode="floating",this.loadPermissionRoleList=()=>{this.utilityService.GetAllPermissionRoles().pipe(N(this.unsubscriber)).subscribe(V=>{V?.isSuccess&&V.responseModel&&(this.rolelist=V.responseModel.map(x=>x?.roleDescriptions).filter(x=>!!x&&x.trim()!==""))})},this.calculateRoleDescriptionCellValue=V=>{let x=this.getRoleNames(V?.roleDescription);return x.length>0?x.join(", "):"-"},this.customizeDateTime=({value:V}
1)=>V?new Date(V).toLocaleDateString("en-US",{year:"numeric",month:"numeric",day:"numeric"}):"-",this.eligibilityRules=new Ai({key:"ID",data:e.getEligibility()}),this.currentUser=d.getCurrentmemberToken(),this.rolelist=[],this.roleStatus=["Active","Inactive"]}ngOnInit(){return R(this,null,function*(){this.loadPermissionRoleList(),yield this.bindContactAffiliation(),this.companyPermissions=this.memberPermissionService.getAllCompanyPermissions(),this.canAcceptDeclineAffiliationRequests=this.hasCompanyPermission("Accept/Decline Requests")})}isKeyContactRole(e){if(!e)return!1;let o=new Set(["primary","billing","organizationadministrator"]);return e.split(",").map(t=>t.trim().toLowerCase()).some(t=>o.has(t))}hasCompanyPermission(e){return this.companyPermissions.some(o=>o.featureDisplayName.trim()===e.trim()&&o.isActive&&this.currentUser?.contactRoles?.includes((o.roleName??o.roleDescriptions)?.trim()))}checkCompanyLevelPermission(e){return this.hasCompanyPermission(e)}toggleContactInformation(){this.contactInformationCollapseExpand=!this.contactInformationCollapseExpand}checkAfflicationCompanyPropertyVisible(e){return this.companyPageControls.filter(t=>t.sourceColumnName!=null&&t.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&t.page
1Category.toLocaleLowerCase()==Pt.Affiliations.toString().toLocaleLowerCase()&&t.isVisible==!0).length>0}getAfflicationCompanyPropertyLabel(e){let o=this.companyPageControls.filter(t=>t.sourceColumnName!=null&&t.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&t.pageCategory.toLocaleLowerCase()==Pt.Affiliations.toString().toLocaleLowerCase());return o.length>0?o[0].fieldCaption:""}bindContactAffiliation(){return R(this,null,function*(){this.loading=!0;let e=this.companyService.GetAllCompanyContactAffiliationByCompanyId(Number(this.companyId)).pipe(N(this.unsubscriber),Z(()=>this.loading=!1)),o=yield F(e);this.processResult(o,()=>{if(this.affiliationGroups=[],this.activeContactAffiliationGroups=[],this.inactiveContactAffiliationGroups=[],this.keyActiveContactAffiliationGroups=[],this.loading=!1,o&&o.isSuccess){if(o.responseModel!=null&&o.responseModel!=null){this.affiliationGroups=o.responseModel;let t=this.affiliationGroups.filter(d=>d.activeStatus==!0||this.commonService.formateConstituentDate(d.affiliationStartDate)>=this.commonService.getTodayDate());this.activeContactAffiliationGroups=Object.assign([],t).sort((d,A)=>(d.fromEntityName??"").localeCompare(A.fromEntityName??"")),this.activeContactAffiliationGroupsGrid=this.activeContactAffiliationGroups.slice(0,5),this.keyActiveContactAffiliationGroups=this.activeContactAffiliationGroups.filter(d=>this.isKeyContactRole(d.roleName)).sort((d,A)=>(d.fromEntityName??"").localeCompare(A.fromEntityName??"")),this.keyActiveContactAffiliationGroupsGrid=this.keyActiveContactAffiliationGroups.slice(0,5),this.filteredCompanyContacts=this.activeContactAffiliationGroups,this.filteredKeyContacts=this.keyActiveContactAffiliationGroups;let l=this.affiliationGroups.filter(d=>d.activeStatus!=!0&&this.commonService.formateConstituentDate(d.affiliationEndDate)<this.commonService.getTodayDate());this.inactiveContactAffiliationGroups=Object.assign([],l);let m=[...this.affiliationGroups].reverse()[0];m!=null&&this.getEntityByEntityId(m.toEntityId)}}else this.loading=!1,this.showErrorMessage(o.message)})})}getEntityByEntityId(e){return R(this,null,function*(){this.loading=!0;let o=this.companyService.GetEntityByEntityId(e).pipe(N(this.unsubscriber),Z(()=>this.loading=!1)),t=yield F(o);this.processResult(t,()=>{this.loading=!1,t&&t.isSuccess?this.name=t.responseModel.name:(this.loading=!1,this.showErrorMessage(t.message))})})}navigateToContact(e){let o=e?.data??e;if(!o)return;let t=this.resolveContactIdFromAffiliation(o);t>0&&this.router.navigate(["admin/client/contacts/"+t+"/view"])}resolveContactIdFromAffiliation(e){let o=(e.affiliationType||"").toString().toLowerCase();if(o==="companytocontact")return Number(e.toEntityValueId)||0;if(o==="contacttocompany")return Number(e.fromEntityValueId)||0;let t=Number(this.companyId);if(t>0){if(Number(e.fromEntityValueId)===t)return Number(e.toEntityValueId)||0;if(Number(e.toEntityValueId)===t)return Number(e.fromEntityValueId)||0}return Number(e.fromEntityValueId)||Number(e.toEntityValueId)||0}keyContactsEvent(){this.viewKeyContactsPopup=!0}viewCompanyContactsEvent(){this.viewCompanyContactsPopup=!0}setSelectedIndex(e){if(e!=null&&e!=null&&e?.itemElement?.innerText!=null&&e?.itemElement?.innerText!=null){let o=e?.itemElement?.innerText?.trim();o==="Affiliation Requests"?(this.selectedIndex=2,this.loadAffiliationRequests()):o===this.companyContactsKey?this.selectedIndex=1:this.selectedIndex=0}}approveAffiliationRequest(e){this.companyService.UpdateAffiliationRequestStatus(e.affiliationRequestId,"Approved",this.currentUser.contactId).pipe(N(this.unsubscriber)).subscribe(o=>{o&&o.isSuccess?(this.showSuccessMessage("Affiliation request approved successfully"),this.loadAffiliationRequests()):this.showErrorMessage(o.message)})}rejectAffiliationRequest(e){this.companyService.UpdateAffiliationRequestStatus(e.affiliationRequestId,"Rejected",this.currentUser.contactId).pipe(N(this.unsubscriber)).subscribe(o=>{o&&o.isSuccess?(this.showSuccessMessage("Affiliation request rejected successfully"),this.loadAffiliationRequests()):this.showErrorMessage(o.message)})}
1loadAffiliationRequests(){this.companyService.GetAllAffiliationRequests(this.companyId).pipe(N(this.unsubscriber)).subscribe(e=>{e&&e.isSuccess&&e.responseModel&&(this.affiliationRequests=e.responseModel,this.pendingRequests=this.affiliationRequests.filter(o=>o.status==="Pending"),this.approvedRequests=this.affiliationRequests.filter(o=>o.status==="Approved"),this.rejectedRequests=this.affiliationRequests.filter(o=>o.status==="Rejected"))})}deleteContactsPopupEvent(e){this.selectedAffiliationGroup=new Fi,e&&(this.selectedAffiliationGroup=Object.assign({},e)),this.deleteContactPopup=!0}deleteAffiliationGroup(){return R(this,null,function*(){let e=this.companyService.ActiveInactiveAffiliation(this.selectedAffiliationGroup.affiliationGroupID,!1),o=yield F(e);o&&o.isSuccess?(this.loading=!1,this.showSuccessMessage("Company affiliation has been deleted successfully"),this.selectedAffiliationGroup=new Fi,this.getCompanyDetails.emit(),this.bindContactAffiliation(),this.deleteContactPopup=!1):(this.loading=!1,this.showErrorMessage(o.message))})}editContactsPopupEvent(e){e&&(this.selectedAffiliationGroup=Object.assign({},e),this.membershipTypeFilter=e.permissionRoleIds),this.editContactsPopup=!0}closeCompanyContactsPopup(){this.viewCompanyContactsPopup=!1}exportCompanyContacts(){this.loading=!0,this.companyService.ExportAllCompanyContactAffiliationByCompanyId(Number(this.companyId)).pipe(N(this.unsubscriber),Z(()=>this.loading=!1)).subscribe(e=>{let o=new Blob([e],{type:e.type}),t=new Date,l=`${(t.getMonth()+1).toString().padStart(2,"0")}-${t.getDate().toString().padStart(2,"0")}-${t.getFullYear()}`,m=`Company_Contacts_${this.companyId}_${l}.csv`,d=document.createElement("a");d.setAttribute("style","display:none;"),d.download=m,document.body.appendChild(d),d.target="_blank",d.href=URL.createObjectURL(o),d.click(),document.body.removeChild(d)},e=>{this.showErrorMessage(this.getErrorMessage(e))})}viewAffiliationRequestsExpandPopupEvent(){this.viewAffiliationRequestsExpandPopup=!0}closeAffiliationRequestsExpandPopup(){this.viewAffiliationRequestsExpandPopup=!1}applyCompanyContactsFilter(){let e=[...this.activeContactAffiliationGroups];if(this.startDateFilter){let o=this.commonService.formateConstituentDate(this.startDateFilter);e=e.filter(t=>t.affiliationStartDate&&this.commonService.formateConstituentDate(t.affiliationStartDate)>=o)}if(this.endDateFilter){let o=this.commonService.formateConstituentDate(this.endDateFilter);e=e.filter(t=>t.affiliationStartDate&&this.commonService.formateConstituentDate(t.affiliationStartDate)<=o)}if(this.selectedCustomer&&(e=e.filter(o=>this.getRoleNames(o.roleDescription).includes(this.selectedCustomer))),this.selectedStatus){let o=this.selectedStatus==="Active";e=e.filter(t=>t.activeStatus===o)}this.filteredCompanyContacts=e,this.isPopoverFilterVisible=!1}resetFilter(){this.startDateFilter=null,this.endDateFilter=null,this.selectedCustomer=null,this.selectedStatus=null,this.filteredCompanyContacts=this.activeContactAffiliationGroups,this.isPopoverFilterVisible=!1}applyKeyContactsFilter(){let e=[...this.keyActiveContactAffiliationGroups];this.selectedKeyContactRole&&(e=e.filter(o=>this.getRoleNames(o.roleDescription).includes(this.selectedKeyContactRole))),this.filteredKeyContacts=e,this.isPopoverFilterVisible=!1}resetKeyContactsFilter(){this.selectedKeyContactRole=null,this.filteredKeyContacts=this.keyActiveContactAffiliationGroups,this.isPopoverFilterVisible=!1}closeEditcontactPopup(){this.editContactsPopup=!1}closeKeyContacts(){this.viewKeyContactsPopup=!1}static{this.\u0275fac=function(o){return new(o||i)(E(St),E(Wt),E(Bt),E(Oi),E(Bi),E(At),E(kt),E(_i))}}static{this.\u0275cmp=Q({type:i,selectors:[["app-company-contact-info"]],viewQuery:function(o,t){if(o&1&&z(Mt,5),o&2){let l;q(l=j())&&(t.dataGrid=l.first)}},inputs:{companyInfo:"companyInfo",companyPageControls:"companyPageControls",affiliationRoles:"affiliationRoles",permissionRoles:"permissionRoles",companyId:"companyId"},outputs:{getCompanyDetails:"getCompanyDetails"},standalone:!0,features:[li([St]),K,X],decls:134,vars:104,consts:[["popover",""],["startDateBox",""],["endDateBox",""],["tabPanel",""],[1,"scroll-outer"],[1,"information-block",3,"ngClass"],[1,"card-outer"],[1,"card-header"],[1,"card-header__title"],[1,"card-header__edit-collapse"],["href","javascript:void(0)","class","collapse",3,"click",4,"ngIf"],[1,"card-content"],["class","client-info information-box",4,"ngIf"],["class","empty-card",4,"ngIf"],["container",".dx-viewport",3,"visibleChange","showTitle","dragEnabled","hideOnOutsideClick","visible","wrapperAttr"],[1,"dx-popup-header"],[1,"total-records"],[1,"close-button","collapse-view",2,"height","26px !important",3,"onClick"],["width","19","height","19","viewBox","0 0 19 19","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M17.8627 8.43359C18.0143 8.43359 18.1596 8.37339 18.2668 8.26623C18.3739 8.15906 18.4341 8.01372 18.4341 7.86217C18.4341 7.71061 18.3739 7.56527 18.2668 7.4581C18.1596 7.35094 18.0143 7.29074 17.8627 7.29074L12.3827 7.29074L18.6684 1.00502C18.7282 0.953795 18.7768 0.890757 18.8111 0.819862C18.8454 0.748968 18.8647 0.67175 18.8677 0.593053C18.8708 0.514356 18.8575 0.43588 18.8288 0.362552C18.8001 0.289223 18.7565 0.222626 18.7008 0.166937C18.6451 0.111248 18.5785 0.0676718 18.5052 0.0389433C18.4319 0.0102148 18.3534 -0.00304513 18.2747 -5.77393e-06C18.196 0.00303358 18.1188 0.0223092 18.0479 0.0566081C17.977 0.090907 17.9139 0.13949 17.8627 0.199308L11.577 6.48502L11.577 1.00502
1C11.577 0.853469 11.5168 0.708124 11.4096 0.60096C11.3025 0.493797 11.1571 0.433593 11.0056 0.433593C10.854 0.433593 10.7087 0.493797 10.6015 0.60096C10.4943 0.708123 10.4341 0.853469 10.4341 1.00502L10.4341 8.43359L17.8627 8.43359Z","fill","#219EBC"],["d","M8.43359 17.8627C8.43359 18.0143 8.37339 18.1596 8.26623 18.2668C8.15906 18.3739 8.01372 18.4341 7.86217 18.4341C7.71061 18.4341 7.56527 18.3739 7.4581 18.2668C7.35094 18.1596 7.29074 18.0143 7.29074 17.8627L7.29074 12.3827L1.00502 18.6684C0.953795 18.7282 0.890756 18.7768 0.819862 18.8111C0.748968 18.8454 0.67175 18.8647 0.593053 18.8677C0.514356 18.8708 0.43588 18.8575 0.362552 18.8288C0.289223 18.8001 0.222626 18.7565 0.166937 18.7008C0.111248 18.6451 0.0676718 18.5785 0.0389433 18.5052C0.0102148 18.4319 -0.00304504 18.3534 -5.67016e-06 18.2747C0.0030337 18.196 0.0223094 18.1188 0.0566083 18.0479C0.0909072 17.977 0.13949 17.9139 0.199308 17.8627L6.48502 11.577L1.00502 11.577C0.85347 11.577 0.708125 11.5168 0.600961 11.4096C0.493798 11.3025 0.433594 11.1571 0.433594 11.0056C0.433594 10.854 0.493798 10.7087 0.600961 10.6015C0.708125 10.4943 0.853471 10.4341 1.00502 10.4341L8.43359 10.4341L8.43359 17.8627Z","fill","#219EBC"],[1,"dx-popup-content-block"],[1,"content-inner"],["id","gridCompanyContactsExpand","keyExpr","affiliationGroupID",1,"table-outer","contacts-table",3,"dataSource","showBorders","allowColumnReordering","focusedRowEnabled","columnAutoWidth","allowColumnResizing","columnHidingEnabled"],["placeholder","Search by Contact or Position",3,"textChange","visible","text"],["name","searchPanel","location","before","locateInMenu","auto"],["location","after","locateInMenu","auto",1,"dx-toolbar-after-item"],["text","Export","id","Export","type","normal","icon","download","stylingMode","contained",1,"btn","btn--secondary","search-criteria","mr-15",3,"click"],[1,"filters-block"],["text","Filters","id","ListFiltersCompanyContacts","icon","filters","type","normal","stylingMode","contained",1,"btn","btn--primary","filters-btn"],["target","#ListFiltersCompanyContacts","showEvent","click","placement","right","position","bottom",3,"visibleChange","width","visible","wrapperAttr"],[1,"filters-outer"],[1,"filters-outer__form"],[1,"filters-outer__title"],[1,"filters-outer__content"],[1,"dx-field"],["pickerType","rollers","label","From Date",1,"date-box",3,"valueChange","value","labelMode","value","inputAttr"],["pickerType","rollers","label","End Date",1,"date-box",3,"valueChange","value","labelMode","value","inputAttr"],["label","Role",3,"valueChange","labelMode","items","value","showClearButton","inputAttr"],["label","Status",3,"valueChange","labelMode","items","value","inputAttr"],[1,"dx-field","full-width","buttons"],["href","javascript:void(0)",1,"reset-filter",3,"click"],[1,"reset-filter__icon"],["width","11","height","11","viewBox","0 0 11 11","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M2.73056 0.633529C2.77509 0.675749 2.81043 0.725904 2.83453 0.781123C2.85864 0.836341 2.87105 0.895537 2.87105 0.955321C2.87105 1.0151 2.85864 1.0743 2.83453 1.12952C2.81043 1.18474 2.77509 1.23489 2.73056 1.27711L1.63351 2.31885H6.69599C7.83748 2.31885 8.93222 2.74982 9.73938 3.51695C10.5465 4.28408 11 5.32453 11 6.40942C11 7.49431 10.5465 8.53477 9.73938 9.3019C8.93222 10.069 7.83748 10.5 6.69599 10.5H2.8702C2.74336 10.5 2.62173 10.4521 2.53204 10.3669C2.44236 10.2816 2.39197 10.166 2.39197 10.0455C2.39197 9.92495 2.44236 9.80934 2.53204 9.7241C2.62173 9.63887 2.74336 9.59098 2.8702 9.59098H6.69599C7.58382 9.59098 8.43528 9.25578 9.06307 8.65913C9.69086 8.06247 10.0436 7.25323 10.0436 6.40942C10.0436 5.56562 9.69086 4.75638 9.06307 4.15972C8.43528 3.56306 7.58382 3.22786 6.69599 3.22786H1.63351L2.73056 4.2696C2.77502 4.31186 2.81029 4.36202 2.83435 4.41724C2.85842 4.47245 2.8708 4.53163 2.8708 4.59139C2.8708 4.65115 2.85842 4.71033 2.83435 4.76554C2.81029 4.82076 2.77502 4.87092 2.73056 4.91318C2.68609 4.95544 2.63331 4.98896 2.57521 5.01183C2.51712 5.0347 2.45485 5.04647 2.39197 5.04647C2.32909 5.04647 2.26683 5.0347 2.20873 5.01183C2.15064 4.98896 2.09785 4.95544 2.05339 4.91318L0.140496 3.09515C0.0959608 3.05293 0.0606271 3.00277 0.0365184 2.94755C0.0124098 2.89234 0 2.83314 0 2.77336C0 2.71357 0.0124098 2.65438 0.0365184 2.59916C0.0606271 2.54394 0.0959608 2.49378 0.140496 2.45156L2.05339 0.633529C2.09781 0.591202 2.15059 0.557621 2.20869 0.534707C2.26679 0.511794 2.32907 0.5 2.39197 0.5C2.45488 0.5 2.51716 0.511794 2.57526 0.534707C2.63336 0.557621 2.68613 0.591202 2.73056 0.633529Z","fill","white"],["text","Search","stylingMode","contained","type","default",1,"btn","btn--primary",3,"onClick"],["dataField","displayName","caption","Contact","dataType","string","cellTemplate","ContactName","alignment","left",3,"fixed","width"],[4,"dxTemplate","dxTemplateOf"],["dataField","affiliationRole","dataType","string","alignment","left",3,"caption","fixed","width",4,"ngIf"],["dataField","affiliationStartDate","dataType","date","alignment","left",3,"caption","customizeText","fixed","width",4,"ngIf"],["dataField","affiliationEndDate","dataType","date","alignment","left",3,"caption","customizeText","fixed","width",4,"ngIf"],["dataField","roleDescription",3,"caption","calculateCellValue","allowSorting","fixed","minWidth",4,"ngIf"],["dataField","activeStatus","caption","Status","cellTemplate","statusTemplate","alignment","right",3,"fixed","width"],[3,"class",4,"dxTemplate","dxTemplateOf"],["dataField","A
1ction","caption","Action","cellTemplate","ActionCheck","alignment","right",3,"fixed","width",4,"ngIf"],[3,"visibleChange","save","visible","action","titleText"],["container",".dx-viewport",3,"showTitle","dragEnabled","hideOnOutsideClick","visible","wrapperAttr","visibleChange",4,"ngIf"],["id","gridKeyContactsExpand","keyExpr","affiliationGroupID",1,"table-outer","contacts-table",3,"dataSource"],["text","Filters","id","ListFiltersKeyContacts","icon","filters","type","normal","stylingMode","contained",1,"btn","btn--primary","filters-btn"],["target","#ListFiltersKeyContacts","showEvent","click","placement","right","position","bottom",3,"visibleChange","width","visible","wrapperAttr"],[1,"dx-field","full-width"],["class","client-name-with-id",4,"dxTemplate","dxTemplateOf"],["dataField","Action","caption","Action","cellTemplate","KeyExpandAction","alignment","right",3,"fixed","width",4,"ngIf"],[1,"tabs-outer","affiliation-sub-tabs",3,"selectedIndexChange","selectedIndex","loop","animationEnabled","swipeEnabled","tabsPosition"],["tabTemplate","PopupAffPendingTabHeader","template","PopupAffPendingTabContent"],["class","tabs-outer__header",4,"dxTemplate","dxTemplateOf"],["class","tabs-outer__content",4,"dxTemplate","dxTemplateOf"],["tabTemplate","PopupAffApprovedTabHeader","template","PopupAffApprovedTabContent"],["tabTemplate","PopupAffRejectedTabHeader","template","PopupAffRejectedTabContent"],["href","javascript:void(0)",1,"collapse",3,"click"],["width","14","height","9","viewBox","0 0 14 9","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M1 7.5L7 1.5L13 7.5","stroke","#024079","stroke-width","1.8","stroke-linecap","round","stroke-linejoin","round"],[1,"client-info","information-box"],[1,"expand-view-button"],["href","javascript:void(0)","class","large-view",3,"click",4,"ngIf"],[1,"tabs-outer","registration-management-tabs",3,"onTitleClick","selectedIndex","loop","animationEnabled","swipeEnabled","tabsPosition","height"],["tabTemplate","KeyContactsHeader","template","KeyContactsContent"],["tabTemplate","CompanyContactsHeader","template","CompanyContactsContent"],["tabTemplate","AffiliationRequestsHeader","template","AffiliationRequestsContent"],["href","javascript:void(0)",1,"large-view",3,"click"],["width","16","height","17","viewBox","0 0 16 17","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M8.57143 0.5C8.41988 0.5 8.27453 0.560204 8.16737 0.667368C8.0602 0.774531 8 0.919876 8 1.07143C8 1.22298 8.0602 1.36833 8.16737 1.47549C8.27453 1.58265 8.41988 1.64286 8.57143 1.64286H14.0514L8.76571 6.92857C8.7059 6.9798 8.65731 7.04284 8.62301 7.11373C8.58872 7.18463 8.56944 7.26184 8.5664 7.34054C8.56336 7.41924 8.57662 7.49771 8.60535 7.57104C8.63408 7.64437 8.67765 7.71097 8.73334 7.76666C8.78903 7.82235 8.85563 7.86592 8.92896 7.89465C9.00229 7.92338 9.08076 7.93664 9.15946 7.9336C9.23816 7.93056 9.31537 7.91129 9.38627 7.87699C9.45716 7.84269 9.5202 7.7941 9.57143 7.73429L14.8571 2.44857V7.92857C14.8571 8.08012 14.9173 8.22547 15.0245 8.33263C15.1317 8.4398 15.277 8.5 15.4286 8.5C15.5801 8.5 15.7255 8.4398 15.8326 8.33263C15.9398 8.22547 16 8.08012 16 7.92857V0.5H8.57143Z","fill","#219EBC"],["d","M0 9.07143C0 8.91988 0.060204 8.77453 0.167368 8.66737C0.274531 8.5602 0.419876 8.5 0.571429 8.5C0.722981 8.5 0.868326 8.5602 0.975489 8.66737C1.08265 8.77453 1.14286 8.91988 1.14286 9.07143V14.5514L6.42857 9.26571C6.4798 9.2059 6.54284 9.15731 6.61373 9.12301C6.68463 9.08872 6.76184 9.06944 6.84054 9.0664C6.91924 9.06336 6.99771 9.07662 7.07104 9.10535C7.14437 9.13408 7.21097 9.17765 7.26666 9.23334C7.32235 9.28903 7.36592 9.35563 7.39465 9.42896C7.42338 9.50229 7.43664 9.58076 7.4336 9.65946C7.43056 9.73816 7.41129 9.81537 7.37699 9.88627C7.34269 9.95716 7.2941 10.0202 7.23429 10.0714L1.94857 15.3571H7.42857C7.58012 15.3571 7.72547 15.4173 7.83263 15.5245C7.9398 15.6317 8 15.777 8 15.9286C8 16.0801 7.9398 16.2255 7.83263 16.3326C7.72547 16.4398 7.58012 16.5 7.42857 16.5H0V9.07143Z","fill","#219EBC"],[1,"tabs-outer__header"],[1,"tabs-outer__content"],[1,"table-block","create-contact-table"],["id","gridKeyContacts","keyExpr","affiliationGroupID",1,"table-outer","contacts-table",3,"dataSource"],["dataField","displayName","caption","Contact","dataType","string","cellTemplate","ContactName","alignment","left",3,"minWidth","fixed"],["dataField","affiliationRole","dataType","string","alignment","left",3,"minWidth","caption","fixed",4,"ngIf"],[1,"client-name-with-id"],["dataField","displayName","datatype","string",1,"client-name",3,"title"],["dataField","displayId","datatype","string",3,"title"],["dataField","affiliationRole","dataType","string","alignment","left",3,"minWidth","caption","fixed"],["dataField","roleDescription",3,"caption","calculateCellValue","allowSorting","fixed","minWidth"],["dataField","A
1ction","caption","Action","cellTemplate","KeyExpandAction","alignment","right",3,"fixed","width"],["class","action-icon",4,"dxTemplate","dxTemplateOf"],[1,"action-icon"],["href","javascript:void(0);",3,"click",4,"ngIf"],["href","javascript:void(0);",3,"click"],["width","18","height","18","viewBox","0 0 18 18","fill","none","xmlns","http://www.w3.org/2000/svg"],["id","Vector","d","M16.9328 0.883653C16.3213 0.297172 15.6467 0 14.9265 0C13.8005 0 12.979 0.728045 12.7541 0.951064C12.4378 1.26453 1.64777 12.0669 1.64777 12.0669C1.57706 12.1381 1.526 12.2263 1.4996 12.3231C1.25627 13.223 0.0373541 17.2161 0.0252506 17.2562C-0.0373195 17.4607 0.0185147 17.6835 0.16923 17.8343C0.275547 17.9404 0.419566 18 0.569717 18C0.627814 18 0.686455 17.9913 0.74371 17.9725C0.784967 17.959 4.9034 16.6268 5.58118 16.4243C5.67061 16.3973 5.75211 16.3489 5.81862 16.2833C6.24691 15.8597 16.3106 5.90019 16.9786 5.20979C17.6696 4.49719 18.0128 3.7551 17.9996 3.00459C17.9859 2.26362 17.6269 1.55018 16.9328 0.883653ZM12.5754 2.74758C12.8614 2.81696 13.5358 3.0436 14.2246 3.73907C14.9206 4.44184 15.1089 5.24516 15.144 5.42801C12.9369 7.62535 7.85633 12.6559 5.85353 14.6387C5.66857 14.2075 5.36967 13.6882 4.88888 13.2034C4.30175 12.6113 3.7042 12.2768 3.24336 12.0886C5.22539 10.1047 10.4016 4.92216 12.5754 2.74758ZM2.4811 13.0368C2.78954 13.1188 3.43028 13.3567 4.08339 14.0157C4.58634 14.5232 4.82378 15.083 4.93043 15.4243C4.15019 15.6754 2.4418 16.2655 1.3562 16.6158C1.67784 15.5566 2.22118 13.907 2.4811 13.0368ZM16.1639 4.40699C16.1285 4.44313 16.0931 4.47917 16.0575 4.51513C15.8801 4.05784 15.5689 3.47025 15.03 2.92647C14.4794 2.37088 13.9208 2.0431 13.4732 1.84929C13.5114 1.81137 13.5408 1.78158 13.5523 1.77036C13.6166 1.70686 14.1996 1.14933 14.9262 1.14933C15.3444 1.14933 15.755 1.34033 16.1474 1.71671C16.6124 2.16303 16.8521 2.60345 16.86 3.02618C16.8675 3.45761 16.6334 3.92219 16.1639 4.40699Z","fill","#5C5C5C"],["d","M7.2 3.07317H10.8C10.8 2.60742 10.6104 2.16075 10.2728 1.83142C9.93523 1.50209 9.47739 1.31707 9 1.31707C8.52261 1.31707 8.06477 1.50209 7.72721 1.83142C7.38964 2.16075 7.2 2.60742 7.2 3.07317ZM5.85 3.07317C5.85 2.6696 5.93148 2.26997 6.08978 1.89712C6.24808 1.52427 6.48011 1.18548 6.77261 0.900111C7.06512 0.614741 7.41237 0.388373 7.79455 0.233931C8.17672 0.0794899 8.58634 0 9 0C9.41366 0 9.82328 0.0794899 10.2055 0.233931C10.5876 0.388373 10.9349 0.614741 11.2274 0.900111C11.5199 1.18548 11.7519 1.52427 11.9102 1.89712C12.0685 2.26997 12.15 2.6696 12.15 3.07317H17.325C17.504 3.07317 17.6757 3.14255 17.8023 3.26605C17.9289 3.38955 18 3.55705 18 3.73171C18 3.90636 17.9289 4.07386 17.8023 4.19736C17.6757 4.32086 17.504 4.39024 17.325 4.39024H16.137L15.084 15.0243C15.0032 15.8391 14.6142 16.5953 13.9929 17.1455C13.3716 17.6957 12.5625 18.0003 11.7234 18H6.2766C5.43768 18.0001 4.62879 17.6954 4.00765 17.1452C3.38652 16.5951 2.99766 15.839 2.9169 15.0243L1.863 4.39024H0.675C0.495979 4.39024 0.32429 4.32086 0.197703 4.19736C0.0711158 4.07386 0 3.90636 0 3.73171C0 3.55705 0.0711158 3.38955 0.197703 3.26605C0.32429 3.14255 0.495979 3.07317 0.675 3.07317H5.85ZM7.65 7.2439C7.65 7.06925 7.57888 6.90175 7.4523 6.77825C7.32571 6.65475 7.15402 6.58537 6.975 6.58537C6.79598 6.58537 6.62429 6.65475 6.4977 6.77825C6.37112 6.90175 6.3 7.06925 6.3 7.2439V13.8293C6.3 14.0039 6.37112 14.1714 6.4977 14.2949C6.62429 14.4184 6.79598 14.4878 6.975 14.4878C7.15402 14.4878 7.32571 14.4184 7.4523 14.2949C7.57888 14.1714 7.65 14.0039 7.65 13.8293V7.2439ZM11.025 6.58537C11.204 6.58537 11.3757 6.65475 11.5023 6.77825C11.6289 6.90175 11.7 7.06925 11.7 7.2439V13.8293C11.7 14.0039 11.6289 14.1714 11.5023 14.2949C11.3757 14.4184 11.204 14.4878 11.025 14.4878C10.846 14.4878 10.6743 14.4184 10.5477 14.2949C10.4211 14.1714 10.35 14.0039 10.35 13.8293V7.2439C10.35 7.06925 10.4211 6.90175 10.5477 6.77825C10.6743 6.65475 10.846 6.58537 11.025 6.58537ZM4.2606 14.8979C4.30914 15.3866 4.54252 15.8402 4.91523 16.1702C5.28794 16.5003 5.77327 16.683 6.2766 16.6829H11.7234C12.2267 16.683 12.7121 16.5003 13.0848 16.1702C13.4575 15.8402 13.6909 15.3866 13.7394 14.8979L14.7816 4.39024H3.2184L4.2606 14.8979Z","fill","#5C5C5C"],["id","gridCompanyContacts","keyExpr","affiliationGroupID",1,"table-outer","contacts-table",3,"dataSource","showBorders","allowColumnReordering","focusedRowEnabled","columnAutoWidth","allowColumnResizing","columnHidingEnabled"],["dataField","displayName","caption","Contact","dataType","string","cellTemplate","ContactName","alignment","left",3,"fixed","minWidth"],["dataField","affiliationRole","dataType","string","alignment","left",3,"caption","fixed","minWidth",4,"ngIf"],["dataField","affiliationStartDate","dataType","date","alignment","left",3,"caption","customizeText","fixed","minWidth",4,"ngIf"],["dataField","affiliationEndDate","dataType","date","alignment","left",3,"caption","customizeText","fixed","minWidth",4,"ngIf"],["dataField","activeStatus","caption","Status","cellTemplate","statusTemplate","alignment","right",3,"fixed","minWidth"],["dataField","affiliationRole","dataType","string","alignment","left",3,"caption","fixed","minWidth"],["dataField","affiliationStartDate","dataType","date","alignment","left",3,"caption","customizeText","fixed","minWidth"],["dataField","affiliationEndDate","dataType","date","alignment","left",3,"caption","customizeText","fixed","minWidth"],["dataField","A
1ction","caption","Action","cellTemplate","ActionCheck","alignment","right",3,"fixed","width"],["tabTemplate","AffPendingTabHeader","template","AffPendingTabContent"],["tabTemplate","AffApprovedTabHeader","template","AffApprovedTabContent"],["tabTemplate","AffRejectedTabHeader","template","AffRejectedTabContent"],["keyExpr","affiliationRequestId",1,"table-outer","contacts-table",3,"dataSource","showBorders","columnAutoWidth"],["dataField","contactName","caption","Contact","cellTemplate","PendingContactTpl","alignment","left",3,"minWidth"],["dataField","requestDate","caption","Request Date","dataType","date","alignment","left",3,"customizeText","minWidth"],["dataField","status","caption","Status","cellTemplate","PendingStatusTpl","alignment","left",3,"minWidth"],["dataField","role","caption","Role","alignment","left",3,"minWidth"],["caption","Action","cellTemplate","PendingActionTpl","alignment","center",3,"width",4,"ngIf"],[1,"client-name"],[3,"status"],["caption","Action","cellTemplate","PendingActionTpl","alignment","center",3,"width"],["href","javascript:void(0);","title","Approve",3,"click"],["d","M9 0C4.032 0 0 4.032 0 9C0 13.968 4.032 18 9 18C13.968 18 18 13.968 18 9C18 4.032 13.968 0 9 0ZM7.2 13.5L2.7 9L3.969 7.731L7.2 10.953L14.031 4.122L15.3 5.4L7.2 13.5Z","fill","#28A745"],["href","javascript:void(0);","title","Reject",3,"click"],["d","M9 0C4.032 0 0 4.032 0 9C0 13.968 4.032 18 9 18C13.968 18 18 13.968 18 9C18 4.032 13.968 0 9 0ZM13.5 12.231L12.231 13.5L9 10.269L5.769 13.5L4.5 12.231L7.731 9L4.5 5.769L5.769 4.5L9 7.731L12.231 4.5L13.5 5.769L10.269 9L13.5 12.231Z","fill","#DC3545"],["dataField","contactName","caption","Contact","cellTemplate","ApprovedContactTpl","alignment","left",3,"minWidth"],["dataField","status","caption","Status","cellTemplate","ApprovedStatusTpl","alignment","left",3,"minWidth"],["dataField","reviewedByName","caption","Approved By","alignment","left",3,"minWidth"],["dataField","contactName","caption","Contact","cellTemplate","RejectedContactTpl","alignment","left",3,"minWidth"],["dataField","status","caption","Status","cellTemplate","RejectedStatusTpl","alignment","left",3,"minWidth"],["dataField","reviewedByName","caption","Rejected By","alignment","left",3,"minWidth"],[1,"empty-card"],["dataField","displayName","datatype","string",3,"title"],[1,"company-id"],["dataField","affiliationRole","dataType","string","alignment","left",3,"caption","fixed","width"],["dataField","affiliationStartDate","dataType","date","alignment","left",3,"caption","customizeText","fixed","width"],["dataField","affiliationEndDate","dataType","date","alignment","left",3,"caption","customizeText","fixed","width"],[3,"visibleChange","save","visible","affiliationRolesCompany","affiliatedContact","companyId","companyName","permissionRolesCompany","membershipTypeFilterForCompany","properties"],["placeholder","Search",3,"visible"],["dataField","contactName","caption","Contact","cellTemplate","PopupPendingContactTpl","alignment","left",3,"minWidth"],["dataField","status","caption","Status","cellTemplate","PopupPendingStatusTpl","alignment","left",3,"minWidth"],["caption","Action","cellTemplate","PopupPendingActionTpl","alignment","center",3,"width",4,"ngIf"],["caption","Action","cellTemplate","PopupPendingActionTpl","alignment","center",3,"width"],["dataField","contactName","caption","Contact","cellTemplate","PopupApprovedContactTpl","alignment","left",3,"minWidth"],["dataField","status","caption","Status","cellTemplate","PopupApprovedStatusTpl","alignment","left",3,"minWidth"],["dataField","contactName","caption","Contact","cellTemplate","PopupRejectedContactTpl","alignment","left",3,"minWidth"],["dataField","status","caption","Status","cellTemplate","PopupRejectedStatusTpl","alignment","left",3,"minWidth"]],template:function(o,t){if(o&1){let l=M();r(0,"dx-scroll-view",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"h2",8),f(5,"Contact Information"),s(),r(6,"div",9),u(7,Is,3,0,"a",10),s()(),r(8,"div",11),u(9,pd,18,15,"div",12)(10,md,3,0,"div",13),s()()()(),r(11,"dx-popup",14),I("visibleChange",function(d){return C(l),b(t.viewCompanyContactsPopup,d)||(t.viewCompanyContactsPopup=d),h(d)}),r(12,"div",15)(13,"h2"),f(14," Company Contacts "),s(),r(15,"div",16)(16,"dx-button",17),_("onClick",function(){return C(l),h(t.closeCompanyContactsPopup())}),k(),r(17,"svg",18),y(18,"path",19)(19,"path",20),s(),f(20," Show Collapse View "),s()()(),U(),r(21,"div",21)(22,"div",22)(23,"dx-data-grid",23)(24,"dxo-search-panel",24),I("textChange",function(d){return C(l),b(t.searchText,d)||(t.searchText=d),h(d)}),s(),r(25,"dxo-toolbar"),y(26,"dxi-item",25),r(27,"dxi-item",26)(28,"dx-button",27),_("click",function(){return C(l),h(t.exportCompanyContacts())}),s(),r(29,"strong"),f(30),s(),r(31,"div",28),y(32,"dx-button",29),r(33,"dx-popover",30,0),I("visibleChange",function(d){return C(l),b(t.isPopoverFilterVisible,d)||(t.isPopoverFilterVisible=d),h(d)}),r(35,"form",31)(36,"dx-form",32)(37,"dxi-item")(38,"h3",33),f(39,"Filters"),s(),r(40,"div",34)(41,"div",35)(42,"dx-date-box",3
16,1),I("valueChange",function(d){return C(l),b(t.startDateFilter,d)||(t.startDateFilter=d),h(d)}),s()(),r(44,"div",35)(45,"dx-date-box",37,2),I("valueChange",function(d){return C(l),b(t.endDateFilter,d)||(t.endDateFilter=d),h(d)}),s()(),r(47,"div",35)(48,"dx-select-box",38),I("valueChange",function(d){return C(l),b(t.selectedCustomer,d)||(t.selectedCustomer=d),h(d)}),s()(),r(49,"div",35)(50,"dx-select-box",39),I("valueChange",function(d){return C(l),b(t.selectedStatus,d)||(t.selectedStatus=d),h(d)}),s()(),r(51,"div",40)(52,"a",41),_("click",function(){return C(l),h(t.resetFilter())}),r(53,"span",42),k(),r(54,"svg",43),y(55,"path",44),s()(),f(56," Reset "),s(),U(),r(57,"dx-button",45),_("onClick",function(){return C(l),h(t.applyCompanyContactsFilter())}),s()()()()()()()()()(),r(58,"dxi-column",46),u(59,cd,6,4,"div",47),s(),u(60,ud,1,3,"dxi-column",48)(61,fd,1,4,"dxi-column",49)(62,yd,1,4,"dxi-column",50)(63,Cd,1,5,"dxi-column",51),r(64,"dxi-column",52),u(65,hd,2,4,"span",53),s(),u(66,vd,2,3,"dxi-column",54),s()()()(),r(67,"confirm-popup",55),I("visibleChange",function(d){return C(l),b(t.deleteContactPopup,d)||(t.deleteContactPopup=d),h(d)}),_("save",function(){return C(l),h(t.deleteAffiliationGroup())}),s(),u(68,bd,5,15,"dx-popup",56),r(69,"dx-popup",14),I("visibleChange",function(d){return C(l),b(t.viewKeyContactsPopup,d)||(t.viewKeyContactsPopup=d),h(d)}),r(70,"div",15)(71,"h2"),f(72," Key Contacts "),s(),r(73,"div",16)(74,"dx-button",17),_("onClick",function(){return C(l),h(t.closeKeyContacts())}),k(),r(75,"svg",18),y(76,"path",19)(77,"path",20),s(),f(78," Show Collapse View "),s()()(),U(),r(79,"div",21)(80,"div",22)(81,"dx-data-grid",57)(82,"dxo-search-panel",24),I("textChange",function(d){return C(l),b(t.searchText,d)||(t.searchText=d),h(d)}),s(),r(83,"dxo-toolbar"),y(84,"dxi-item",25),r(85,"dxi-item",26)(86,"strong"),f(87),s(),r(88,"div",28),y(89,"dx-button",58),r(90,"dx-popover",59,0),I("visibleChange",function(d){return C(l),b(t.isPopoverFilterVisible,d)||(t.isPopoverFilterVisible=d),h(d)}),r(92,"form",31)(93,"dx-form",32)(94,"dxi-item")(95,"h3",33),f(96,"Filters"),s(),r(97,"div",34)(98,"div",60)(99,"dx-select-box",38),I("valueChange",function(d){return C(l),b(t.selectedKeyContactRole,d)||(t.selectedKeyContactRole=d),h(d)}),s()(),r(100,"div",40)(101,"a",41),_("click",function(){return C(l),h(t.resetKeyContactsFilter())}),r(102,"span",42),k(),r(103,"svg",43),y(104,"path",44),s()(),f(105," Reset "),s(),U(),r(106,"dx-button",45),_("onClick",function(){return C(l),h(t.applyKeyContactsFilter())}),s()()()()()()()()()(),r(107,"dxi-column",46),u(108,Id,5,4,"div",61),s(),u(109,wd,1,3,"dxi-column",48)(110,Md,1,5,"dxi-column",51)(111,Sd,2,3,"dxi-column",62),s()()()(),r(112,"dx-popup",14),I("visibleChange",function(d){return C(l),b(t.viewAffiliationRequestsExpandPopup,d)||(t.viewAffiliationRequestsExpandPopup=d),h(d)}),r(113,"div",15)(114,"h2"),f(115,"Affiliation Requests"),s(),r(116,"div",16)(117,"dx-button",17),_("onClick",function(){return C(l),h(t.closeAffiliationRequestsExpandPopup())}),k(),r(118,"svg",18),y(119,"path",19)(120,"path",20),s(),f(121," Show Collapse View "),s()()(),U(),r(122,"div",21)(123,"div",22)(124,"dx-tab-panel",63),I("selectedIndexChange",function(d){return C(l),b(t.affiliationPopupSubTabIndex,d)||(t.affiliationPopupSubTabIndex=d),h(d)}),y(125,"dxi-item",64),u(126,Ad,2,0,"div",65)(127,Rd,10,12,"div",66),y(128,"dxi-item",67),u(129,Od,2,0,"div",65)(130,Fd,10,12,"div",66),y(131,"dxi-item",68),u(132,Nd,2,0,"div",65)(133,qd,10,12,"div",66),s()()()()}o&2&&(n(),a("ngClass",t.contactInformationCollapseExpand?"collapse":"expand"),n(6),a("ngIf",(t.activeContactAffiliationGroups==null?null:t.activeContactAffiliationGroups.length)>0),n(2),a("ngIf",(t.activeContactAffiliationGroups==null?null:t.activeContactAffiliationGroups.length)>0),n(),a("ngIf",!t.loading&&(t.activeContactAffiliationGroups==null?null:t.activeContactAffiliationGroups.length)==0),n(),a("showTitle",!1)("dragEnabled",!1)("hideOnOutsideClick",!0),v("visible",t.viewCompanyContactsPopup),a("wrapperAttr",P(94,Io)),n(12),a("dataSource",t.filteredCompanyContacts)("showBorders",!0)("allowColumnReordering",!1)("focusedRowEnabled",!0)("columnAutoWidth",!0)("allowColumnResizing",!1)("columnHidingEnabled",!1),n(),a("visible",!0),v("text",t.searchText),n(6),O(" (Total ",t.filteredCompanyContacts!=null&&(t.filteredCompanyContacts==null?null:t.filteredCompanyContacts.length)>
10?t.filteredCompanyContacts==null?null:t.filteredCompanyContacts.length:0," records) "),n(3),a("width",640),v("visible",t.isPopoverFilterVisible),a("wrapperAttr",P(95,hs)),n(9),a("value",t.now)("labelMode",t.labelMode),v("value",t.startDateFilter),a("inputAttr",P(96,Bn)),n(3),a("value",t.now)("labelMode",t.labelMode),v("value",t.endDateFilter),a("inputAttr",P(97,Bn)),n(3),a("labelMode",t.labelMode)("items",t.rolelist),v("value",t.selectedCustomer),a("showClearButton",!0)("inputAttr",P(98,_s)),n(2),a("labelMode",t.labelMode)("items",t.roleStatus),v("value",t.selectedStatus),a("inputAttr",P(99,xs)),n(8),a("fixed",!0)("width",200),n(),a("dxTemplateOf","ContactName"),n(),a("ngIf",t.checkAfflicationCompanyPropertyVisible("AffiliationRoleId")),n(),a("ngIf",t.checkAfflicationCompanyPropertyVisible("AffiliationStartDate")),n(),a("ngIf",t.checkAfflicationCompanyPropertyVisible("AffiliationEndDate")),n(),a("ngIf",t.checkAfflicationCompanyPropertyVisible("PermissionRoleId")),n(),a("fixed",!1)("width",120),n(),a("dxTemplateOf","statusTemplate"),n(),a("ngIf",t.checkCompanyLevelPermission("Edit Contacts")||t.checkCompanyLevelPermission("Delete Contacts")),n(),W("action",t.deleteContactAction),w("titleText","affiliation with ",t.selectedAffiliationGroup==null?null:t.selectedAffiliationGroup.displayName,""),v("visible",t.deleteContactPopup),n(),a("ngIf",t.selectedAffiliationGroup!=null),n(),a("showTitle",!1)("dragEnabled",!1)("hideOnOutsideClick",!0),v("visible",t.viewKeyContactsPopup),a("wrapperAttr",P(100,Io)),n(12),a("dataSource",t.filteredKeyContacts),n(),a("visible",!0),v("text",t.searchText),n(5),O(" (Total ",t.filteredKeyContacts!==null&&(t.filteredKeyContacts==null?null:t.filteredKeyContacts.length)>0?t.filteredKeyContacts.length:0," records) "),n(3),a("width",640),v("visible",t.isPopoverFilterVisible),a("wrapperAttr",P(101,gs)),n(9),a("labelMode",t.labelMode)("items",t.rolelist),v("value",t.selectedKeyContactRole),a("showClearButton",!0)("inputAttr",P(102,vs)),n(8),a("fixed",!0)("width",200),n(),a("dxTemplateOf","ContactName"),n(),a("ngIf",t.checkAfflicationCompanyPropertyVisible("AffiliationRoleId")),n(),a("ngIf",t.checkAfflicationCompanyPropertyVisible("PermissionRoleId")),n(),a("ngIf",t.checkCompanyLevelPermission("Edit Contacts")||t.checkCompanyLevelPermission("Delete Contacts")),n(),a("showTitle",!1)("dragEnabled",!1)("hideOnOutsideClick",!0),v("visible",t.viewAffiliationRequestsExpandPopup),a("wrapperAttr",P(103,Io)),n(12),v("selectedIndex",t.affiliationPopupSubTabIndex),a("loop",!1)("animationEnabled",!1)("swipeEnabled",!1)("tabsPosition",t.tabsPosition),n(2),a("dxTemplateOf","PopupAffPendingTabHeader"),n(),a("dxTemplateOf","PopupAffPendingTabContent"),n(2),a("dxTemplateOf","PopupAffApprovedTabHeader"),n(),a("dxTemplateOf","PopupAffApprovedTabContent"),n(2),a("dxTemplateOf","PopupAffRejectedTabHeader"),n(),a("dxTemplateOf","PopupAffRejectedTabContent"))},dependencies:[sn,Y,Dt,J,$,pe,jt,zt,qt,gi,On,se,Rt,It,de,me,ce,ue,fe,ye,wt,Ce,he,_e,xe,ge,ve,be,Mt,di,Ro,Oo,Ie,xi,we,Me,De,Pe,Te,Se,Ae,Ee,Ve,Le,Ht,ke,Re,Oe,Be,Ge,Fe,Ne,We,ze,qe,je,He,Ue,Ze,Qe,Ke,Fo,Xe,Et,Je,Ye,$e,et,tt,it,ot,Vt,nt,Ut,at,rt,lt,st,dt,no,pt,mt,ct,ut,ft,yt,Ct,ht,_t,gt,vt,bt,xt,oe,le,re,ae,ne,ie,te],styles:["@media (max-width: 600px){.client-info.information-box[_ngcontent-%COMP%] .expand-view-button[_ngcontent-%COMP%]{position:relative;width:100%;display:flex;justify-content:flex-end}}a.large-view[_ngcontent-%COMP%]{display:flex;gap:1rem;align-items:center;font:var(--font-weight-600) var(--font-14) var(--font-family);color:var(--secondary-color)!important}"]})}}return i})();var jd=["EditGroupPopup"],Hd=()=>({"aria-label":"Position"}),Nn=()=>({"aria-label":"Date"});function Ud(i,p){if(i&1&&y(0,"dxi-validation-rule",16),i&2){let e=c();w("message","",e.GetAfflicationCompanyPropertyLabel("GroupPositionId")," is required")}}function Zd(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(2);n(),T(e.GetAffiliationCompanyPropertyTooltip("GroupPositionId"))}}function Qd(i,p){i&1&&(r(0,"div",17),y(1,"i",18),r(2,"dx-tooltip",19),u(3,Zd,2,1,"div",20),s()()),i&2&&(n(2),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content"))}function Kd(i,p){if(i&1&&y(0,"dxi-validation-rule",16),i&2){let e=c();w("message","",e.GetAfflicationCompanyPropertyLabel("StartDate")," is required")}}function Xd(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(2);n(),T(e.GetAffiliationCompanyPropertyTooltip("StartDate"))}}function Jd(i,p){i&1&&(r(0,"div",17),y(1,"i",21),r(2,"dx-tooltip",22),u(3,Xd,2,1,"div",20),s()()),i&2&&(n(2),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content"))}function Yd(i,p){if(i&1&&y(0,"dxi-validation-rule",16),i&2){let e=c();w("message","",e.GetAfflicationCompanyPropertyLabel("EndDate")," is required")}}function $d(i,p){if(i&1&&(r(0,"div"),f(1),s()),i&2){let e=c(2);n(),T(e.GetAffiliationCompanyPropertyTooltip("EndDate"))}}function ep(i,p){i&1&&(r(0,"div",17),y(1,"i",23),r(2,"dx-tooltip",24),u(3,$d,2,1,"div",20),s()()),i&2&&(n(2),a("hideOnOutsideClick",!1),n(),a("dxTemplateOf","content"))}var Wn=(()=>{class i extends ee{constructor(e,o){super(),this.groupService=e,this.datepipe=o,this.unsubscriber=new Lt,this.progress=new Lt,this.titleText="",this.width=480,this.height="auto",this.wrapperAttr={},this.visible=!1,this.isSaveDisabled=!1,this.save=new Nt,this.visibleChange=new Nt,this.companyId=0,this.userTokenId=0,this.companyGroupConstituents=new yi,this.properties=[],this.formData={},this.stylingMode="outlined",this.labelMode="floating",this.groupPositions=[],this.ConstituentTypeValidator=[{type:"required",message:"Position is required"}],this.StartDateValidator=[{type:"required",message:"Start date is required"}],this.EndDateValidator=[{type:"required",message:"End date is required"}]}
1closePopup(){this.visible=!1,this.visibleChange.emit(this.visible)}onFormSubmit(e){if(!this.EditGroupPopup.instance.validate().isValid)return;this.loading=!0;let t=new nn;t.groupId=this.companyGroupConstituents.groupId,t.groupName=this.companyGroupConstituents.groupName,t.modifiedByUserId=this.userTokenId;let l=new on;l.groupConstituentId=this.companyGroupConstituents.groupConstituentId,l.groupId=this.companyGroupConstituents.groupConstituentId,l.groupPositionId=this.companyGroupConstituents.groupPositionId?this.companyGroupConstituents.groupPositionId:null,l.groupPositionId&&(l.position=this.companyGroupConstituents.groupPositions.filter(m=>m.groupPositionId==this.companyGroupConstituents.groupPositionId)[0].position),l.startDate=this.companyGroupConstituents.startDate,l.endDate=this.companyGroupConstituents.endDate,this.companyGroupConstituents.startDate&&(l.strStartDate=this.datepipe.transform(this.companyGroupConstituents.startDate,"MM/dd/yyyy")),this.companyGroupConstituents.endDate&&(l.strEndDate=this.datepipe.transform(this.companyGroupConstituents.endDate,"MM/dd/yyyy")),l.memberId=this.companyGroupConstituents.companyId,l.groupConstituentType=zo.Companies.toString(),t.groupConstituentsRequestModel=l,this.groupService.UpdateGroupConstituent(t).pipe(N(this.unsubscriber),Z(()=>this.loading=!1)).subscribe(m=>{this.processResult(m,()=>{m&&m.isSuccess?(this.loading=!1,m.responseModel!=null&&m.responseModel!=null&&(this.loading=!1,this.showSuccessMessage("Group affiliation information has been updated successfully"),this.save.emit(),this.closePopup())):(this.loading=!1,this.showErrorMessage(m.message))})},m=>{this.loading=!1,this.showErrorMessage(m.message)})}GetAfflicationCompanyPropertyLabel(e){let o=this.properties.filter(t=>t.sourceColumnName!=null&&t.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&t.page
1Category.toLocaleLowerCase()==Pt.ConstituentsInformation.toString().toLocaleLowerCase());return o.length>0?o[0].fieldCaption:""}CheckAfflicationCompanyPropertyVisible(e){return this.properties.filter(t=>t.sourceColumnName!=null&&t.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&t.pageCategory.toLocaleLowerCase()==Pt.ConstituentsInformation.toString().toLocaleLowerCase()&&t.isVisible==!0).length>0}GetAffiliationCompanyPropertyTooltip(e){let o=this.properties.filter(t=>t.isVisible&&t.sourceColumnName!=null&&t.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&t.pageCategory.toLocaleLowerCase()==Pt.ConstituentsInformation.toString().toLocaleLowerCase());return o.length>0?o[0].formControlTooltip:""}IsAffiliationCompanyTooltipVisible(e){return this.properties.filter(t=>t.isVisible&&t.sourceColumnName!=null&&t.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&t.pageCategory.toLocaleLowerCase()==Pt.ConstituentsInformation.toString().toLocaleLowerCase()&&t.formControlTooltip!=null&&t.formControlTooltip!=""&&t.formControlTooltip!="").length>0}CheckAfflicationCompanyPropertyRequired(e){return this.properties.filter(t=>t.sourceColumnName!=null&&t.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&t.page
1Category.toLocaleLowerCase()==Pt.ConstituentsInformation.toString().toLocaleLowerCase()&&t.isRequired==!0).length>0}IsAfflicationCompanyPropertyReadonly(e){return this.properties.filter(t=>t.sourceColumnName!=null&&t.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&t.pageCategory.toLocaleLowerCase()==Pt.ConstituentsInformation.toString().toLocaleLowerCase()&&t.isReadOnly==!1).length>0}static{this.\u0275fac=function(o){return new(o||i)(E(Bi),E(si))}}static{this.\u0275cmp=Q({type:i,selectors:[["edit-company-group-popup"]],viewQuery:function(o,t){if(o&1&&z(jd,5),o&2){let l;q(l=j())&&(t.EditGroupPopup=l.first)}},inputs:{titleText:"titleText",width:"width",height:"height",wrapperAttr:"wrapperAttr",visible:"visible",isSaveDisabled:"isSaveDisabled",companyId:"companyId",companyName:"companyName",userTokenId:"userTokenId",companyGroupConstituents:"companyGroupConstituents",properties:"properties"},outputs:{save:"save",visibleChange:"visibleChange"},standalone:!0,features:[K,X],decls:26,vars:36,consts:[["EditGroupPopup",""],[1,"dx-popup-content-block"],[1,"form-outer"],["id","form",3,"formData"],[1,"group-info"],[1,"full-width"],[1,"dx-field","multi-select"],["valueExpr","groupPositionId","displayExpr","position",1,"select-box",3,"valueChange","labelMode","label","items","inputAttr","visible","value","showClearButton","ngClass"],["type","required",3,"message",4,"ngIf"],["class","tooltip-info",4,"ngIf"],[1,"dx-field"],["type","date",1,"date-box",3,"valueChange","labelMode","label","visible","acceptCustomValue","showClearButton","max","value","inputAttr","ngClass"],["type","date",1,"date-box",3,"valueChange","labelMode","label","visible","acceptCustomValue","showClearButton","min","value","inputAttr","ngClass"],[1,"dx-popup-footer"],["text","Cancel","stylingMode","contained","type","normal",1,"btn","btn--cancel",3,"onClick"],["text","Save","stylingMode","contained","type","default",1,"btn","btn--primary",3,"onClick"],["type","required",3,"message"],[1,"tooltip-info"],["id","editGroupPositionId",1,"icon","dx-icon-info"],["target","#editGroupPositionId","showEvent","mouseenter","hideEvent","mouseleave",3,"hideOnOutsideClick"],[4,"dxTemplate","dxTemplateOf"],["id","companyGroupStartDate",1,"icon","dx-icon-info"],["target","#companyGroupStartDate","showEvent","mouseenter","hideEvent","mouseleave",3,"hideOnOutsideClick"],["id","companyGroupEndDate",1,"icon","dx-icon-info"],["target","#companyGroupEndDate","showEvent","mouseenter","hideEvent","mouseleave",3,"hideOnOutsideClick"]],template:function(o,t){if(o&1){let l=M();r(0,"div",1)(1,"dx-validation-group",null,0)(3,"form",2)(4,"dx-form",3)(5,"dxi-item")(6,"div",4)(7,"div",5)(8,"div",6)(9,"dx-select-box",7),I("valueChange",function(d){return C(l),b(t.companyGroupConstituents.groupPositionId,d)||(t.companyGroupConstituents.groupPositionId=d),h(d)}),r(10,"dx-validator"),u(11,Ud,1,2,"dxi-validation-rule",8),s()(),u(12,Qd,4,2,"div",9),s()(),r(13,"div",10)(14,"dx-date-box",11),I("valueChange",function(d){return C(l),b(t.companyGroupConstituents.startDate,d)||(t.companyGroupConstituents.startDate=d),h(d)}),r(15,"dx-validator"),u(16,Kd,1,2,"dxi-validation-rule",8),s()(),u(17,Jd,4,2,"div",9),s(),r(18,"div",10)(19,"dx-date-box",12),I("valueChange",function(d){return C(l),b(t.companyGroupConstituents.endDate,d)||(t.companyGroupConstituents.endDate=d),h(d)}),r(20,"dx-validator"),u(21,Yd,1,2,"dxi-validation-rule",8),s()(),u(22,ep,4,2,"div",9),s()()()()()()(),r(23,"div",13)(24,"dx-button",14),_("onClick",function(){return C(l),h(t.closePopup())}),s(),r(25,"dx-button",15),_("onClick",function(d){return C(l),h(t.onFormSubmit(d))}),s()()}o&2&&(n(4),a("formData",t.formData),n(5),a("labelMode",t.labelMode)("label",t.GetAfflicationCompanyPropertyLabel("GroupPositionId"))("items",t.companyGroupConstituents.groupPositions)("inputAttr",P(33,Hd))("visible",t.CheckAfflicationCompanyPropertyVisible("GroupPositionId")),v("value",t.companyGroupConstituents.groupPositionId),a("showClearButton",!0)("ngClass",t.IsAfflicationCompanyPropertyReadonly("GroupPositionId")?"disabledDiv":""),n(2),a("ngIf",!t.IsAfflicationCompanyPropertyReadonly("GroupPositionId")&&t.CheckAfflicationCompanyPropertyRequired("GroupPositionId")),n(),a("ngIf",t.IsAffiliationCompanyTooltipVisible("GroupPositionId")),n(2),a("labelMode",t.labelMode)("label",t.GetAfflicationCompanyPropertyLabel("StartDate"))("visible",t.CheckAfflicationCompanyPropertyVisible("StartDate"))("acceptCustomValue",!0)("showClearButton",!0)("max",t.companyGroupConstituents.endDate),v("value",t.companyGroupConstituents.startDate),a("inputAttr",P(34,Nn))("ngClass",t.IsAfflicationCompanyPropertyReadonly("StartDate")?"disabledDiv":""),n(2),a("ngIf",t.CheckAfflicationCompanyPropertyRequired("StartDate")&&!t.IsAfflicationCompanyPropertyReadonly("StartDate")),n(),a("ngIf",t.IsAffiliationCompanyTooltipVisible("StartDate")),n(2),a("labelMode",t.labelMode)("label",t.GetAfflicationCompanyPropertyLabel("EndDate"))("visible",t.CheckAfflicationCompanyPropertyVisible("EndDate"))("acceptCustomValue",!0)("showClearButton",!0)("min",t.companyGroupConstituents.startDate),v("value",t.companyGroupConstituents.endDate),a("inputAttr",P(35,Nn))("ngClass",t.IsAfflicationCompanyPropertyReadonly("EndDate")?"disabledDiv":""),n(2),a("ngIf",t.CheckAfflicationCompanyPropertyRequired("End
1Date")&&!t.IsAfflicationCompanyPropertyReadonly("EndDate")),n(),a("ngIf",t.IsAffiliationCompanyTooltipVisible("EndDate")))},dependencies:[Y,Dt,J,$,pe,jt,zt,qt,se,Rt,It,de,me,ce,ue,fe,ye,wt,Ce,he,_e,xe,ge,ve,be,Yt,Ie,xi,we,Me,De,Pe,Te,Se,Ae,Ee,Ve,Le,Ht,ke,Re,Oe,Be,Ge,Fe,Ne,We,ze,qe,je,He,Ue,Ze,Qe,Ke,Xe,Je,Ye,$e,et,tt,it,ot,nt,Ut,at,rt,lt,st,dt,pt,mt,ct,ut,ft,yt,Ct,ht,$t,_t,gt,ei,vt,bt,ti,xt,oe,le,re,ae,ne,ie,te],styles:[".form-popup .dx-toolbar-center{width:100%}.form-popup-buttons-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:var(--popup-toolbar-item-spacing)}.form-popup-buttons-container.flex-buttons[_ngcontent-%COMP%] .dx-button{flex:1}.group-info[_ngcontent-%COMP%]{width:100%;-ms-display:flex;-webkit-display:flex;-moz-display:flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;justify-content:space-between;align-items:baseline;align-content:baseline}.group-info[_ngcontent-%COMP%] .full-width[_ngcontent-%COMP%]{width:100%;max-width:100%}.dx-field.multi-select[_ngcontent-%COMP%] .select-box[_ngcontent-%COMP%]{padding-right:10px}.disabledDiv[_ngcontent-%COMP%]{pointer-events:none;opacity:.4}"]})}}return i})();var tp=()=>({id:"elementId",class:"popup-outer company-history-table-list w-900"}),ip=()=>({id:"elementId",class:"popup-outer tooltip-wrapper w-800"});function op(i,p){if(i&1){let e=M();r(0,"a",25),_("click",function(){C(e);let t=c();return h(t.largeViewConstituentGroupListPopupEvent())}),k(),r(1,"svg",26),y(2,"path",27)(3,"path",28),s(),f(4," View History "),s()}}function np(i,p){if(i&1){let e=M();r(0,"a",29),_("click",function(){C(e);let t=c();return h(t.toggleGroupInformation())}),k(),r(1,"svg",30),y(2,"path",31),s()()}}function ap(i,p){if(i&1){let e=M();r(0,"div",43)(1,"div",44),_("click",function(){let t=C(e).$implicit,l=c(2);return h(l.navigateToGroup(t))}),f(2),s(),r(3,"span",45),f(4),s()()}if(i&2){let e=p.$implicit;n(),W("title",e.data.groupName),n(),T(e.data.groupName),n(2),T(e.data.groupUniqueId)}}function rp(i,p){if(i&1&&y(0,"dxi-column",46),i&2){let e=c(2);a("minWidth",200)("caption",e.getGroupConstituentPropertyLabel("GroupPositionId"))}}function lp(i,p){if(i&1&&y(0,"dxi-column",47),i&2){let e=c(2);a("minWidth",200)("caption",e.getGroupConstituentPropertyLabel("StartDate"))("customizeText",e.customizeDateTime)}}function sp(i,p){if(i&1&&y(0,"dxi-column",48),i&2){let e=c(2);a("minWidth",200)("caption",e.getGroupConstituentPropertyLabel("EndDate"))("customizeText",e.customizeDateTime)}}function dp(i,p){if(i&1&&(r(0,"span"),f(1),s()),i&2){let e=p.$implicit;Kt("status ",e.data.isActive==!0?"Active":"Inactive",""),n(),T(e.data.isActive==!0?"Active":"Inactive")}}function pp(i,p){if(i&1){let e=M();r(0,"span",51)(1,"a",52),_("click",function(){let t=C(e).$implicit,l=c(3);return h(l.editGroupPopupEvent(t.data))}),k(),r(2,"svg",53),y(3,"path",54),s()(),U(),r(4,"a",52),_("click",function(){let t=C(e).$implicit,l=c(3);return h(l.deleteCompanyGroupPopupEvent(t.data))}),k(),r(5,"svg",53),y(6,"path",55),s()()()}}function mp(i,p){i&1&&(r(0,"dxi-column",49),u(1,pp,7,0,"span",50),s()),i&2&&(a("minWidth",120),n(),a("dxTemplateOf","ActionCheck"))}function cp(i,p){if(i&1&&(r(0,"div",32)(1,"div",33)(2,"dx-data-grid",34)(3,"dxi-column",35),u(4,ap,5,3,"div",36),s(),u(5,rp,1,2,"dxi-column",37)(6,lp,1,3,"dxi-column",38)(7,sp,1,3,"dxi-column",39),r(8,"dxi-column",40),u(9,dp,2,4,"span",41),s(),u(10,mp,2,2,"dxi-column",42),s()()()),i&2){let e=c();n(2),a("dataSource",e.activeGroupConstituentsResponseModel),n(),a("fixed",!0)("width",150),n(),a("dxTemplateOf","GroupName"),n(),a("ngIf",e.checkGroupConstituentPropertyVisible("GroupPositionId")),n(),a("ngIf",e.checkGroupConstituentPropertyVisible("StartDate")),n(),a("ngIf",e.checkGroupConstituentPropertyVisible("EndDate")),n(),a("minWidth",200)("showEditorAlways",!1),n(),a("dxTemplateOf","statusTemplate"),n(),a("ngIf",e.checkCompanyLevelPermission("Update Company Information")&&e.checkCompanyLevelPermission("Update Group Information"))}}function up(i,p){i&1&&(r(0,"div",58)(1,"a",59)(2,"span"),k(),r(3,"svg",60),y(4,"path",61),s()(),f(5," Add Group "),s()())}function fp(i,p){i&1&&(r(0,"div",56)(1,"p"),f(2,"There is no groups added yet."),s(),u(3,up,6,0,"div",57),s()),i&2&&(n(3),a("ngIf",!1))}function yp(i,p){if(i&1){let e=M();r(0,"dx-popup",13),I("visibleChange",function(t){C(e);let l=c();return b(l.editGroupPopup,t)||(l.editGroupPopup=t),h(t)}),r(1,"div",14)(2,"h2"),f(3),s()(),r(4,"edit-company-group-popup",62),I("visibleChange",function(t){C(e);let l=c();return b(l.editGroupPopup,t)||(l.editGroupPopup=t),h(t)}),_("visibleChange",function(){C(e);let t=c();return h(t.closeEditGroupPopup())})("save",function(){C(e);let t=c();return h(t.bindContactGroup())}),s()()}if(i&2){let e=c();a("showTitle",!1)("dragEnabled",!1)("hideOnOutsideClick",!1),v("visible",e.editGroupPopup),a("wrapperAttr",P(12,ip)),n(3),O("Edit ",e.selectedGroupConstituent.groupName,""),n(),v("visible",e.editGroupPopup),a("companyGroupConstituents",e.selectedGroupConstituent)("userTokenId",e.currentUser==null?null:e.currentUser.userId)("companyId",e.companyInfo==null?null:e.companyInfo.companyId)("companyName",e.companyInfo==null?null:e.companyInfo.companyName)("properties",e.companyPageControls)}}function Cp(i,p){if(i&1){let e=M();r(0,"div",43)(1,"div",44),_("click",function(){let t=C(e).$implicit,l=c(2);return h(l.navigateToGroup(t))}),f(2),s(),r(3,"span",45),f(4),s()()}if(i&2){let e=p.$implicit;n(),W("title",e.data.groupName),n(),O(" ",e.data.groupName,""),n(2),T(e.data.groupUniqueId)}}function hp(i,p){if(i&1&&y(0,"dxi-column",46),i&2){let e=c(2);a("minWidth",200)("caption",e.getGroupConstituentPropertyLabel("GroupPositionId"))}}function _p(i,p){if(i&1&&y(0,"dxi-column",66),i&2){let e=c(2);a("minWidth",130)("caption",e.getGroupConstituentPropertyLabel("StartDate"))}}function xp(i,p){if(i&1&&y(0,"dxi-column",67),i&2){let e=c(2);a("minWidth",130)("caption",e.getGroupConstituentPropertyLabel("EndDate"))}}function gp(i,p){if(i&1&&(r(0,"span"),f(1),s()),i&2){let e=p.$implicit;Kt("status ",e.data.isActive==!0?"Active":"Inactive",""),n(),T(e.data.isActive==!0?"Active":"Inactive")}}function vp(i,p){if(i&1&&(r(0,"div",33)(1,"dx-data-grid",34)(2,"dxi-column",63),u(3,Cp,5,3,"div",36),s(),u(4,hp,1,2,"dxi-column",37)(5,_p,1,2,"dxi-column",64)(6,xp,1,2,"dxi-column",65),r(7,"dxi-column",40),u(8,gp,2,4,"span",41),s()()()),i&2){let e=c();n(),a("dataSource",e.inactiveGroupConstituentsResponseModel),n(),a("fixed",!0)("minWidth",200),n(),a("dxTemplateOf","GroupName"),n(),a("ngIf",e.checkGroupConstituentPropertyVisible("GroupPositionId")),n(),a("ngIf",e.checkGroupConstituentPropertyVisible("StartDate")),n(),a("ngIf",e.checkGroupConstituentPropertyVisible("EndDate")),n(),a("minWidth",120)("showEditorAlways",!1),n(),a("dxTemplateOf","statusTemplate")}}/localhost/.test(document.location.host)||void 0;var zn=(()=>{class i extends ee{constructor(e,o,t,l,m,d,A){super(),this.router=o,this.groupService=t,this.datepipe=l,this.commonService=m,this.webStorageService=d,this.memberPermissionService=A,this.companyPageControls=[],this.companyGroupConstituentsResponseModel=[],this.activeGroupConstituentsResponseModel=[],this.inactiveGroupConstituentsResponseModel=[],this.unsubscriber=new Lt,this.selectedGroupConstituent=new yi,this.deleteCompanyGroupAction="delete",this.currentUser=new ro,this.formData={},this.stylingMode="outlined",this.labelMode="floating",this.customizeDateTime=({value:L})=>L?new Date(L).toLocaleDateString("en-US",{year:"numeric",month:"numeric",day:"numeric"}):"-",this.eligibilityRules=new Ai({key:"ID",data:e.getEligibility()}),this.currentUser=d.getCurrentmemberToken()}ngOnInit(){return R(this,null,function*(){yield this.bindContactGroup()})}checkCompanyLevelPermission(e){return this.memberPermissionService.hasPermission(!0,e)}toggleGroupInformation(){this.groupInfoCollapseExpand=!this.groupInfoCollapseExpand}checkGroupConstituentPropertyVisible(e){return this.companyPageControls.filter(t=>t.sourceColumnName!=null&&t.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&t.page
1Category.toLocaleLowerCase()==Pt.ConstituentsInformation.toString().toLocaleLowerCase()&&t.isVisible==!0).length>0}getGroupConstituentPropertyLabel(e){let o=this.companyPageControls.filter(t=>t.sourceColumnName!=null&&t.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase()&&t.pageCategory.toLocaleLowerCase()==Pt.ConstituentsInformation.toString().toLocaleLowerCase());return o.length>0?o[0].fieldCaption:""}navigateToGroup(e){let o=e.data,t=0;t=o.groupId}bindContactGroup(){return R(this,null,function*(){this.companyGroupConstituentsResponseModel=[],this.loading=!0;let e=this.groupService.GetAllGroupCompanyConstituentsById(Number(this.companyId)).pipe(N(this.unsubscriber),Z(()=>this.loading=!1)),o=yield F(e);this.processResult(o,()=>{if(this.loading=!1,o&&o.isSuccess){if(o.responseModel!=null&&o.responseModel!=null&&(this.companyGroupConstituentsResponseModel=o.responseModel,this.companyGroupConstituentsResponseModel!=null&&this.companyGroupConstituentsResponseModel.length>0)){let t=new Date;t.setHours(0,0,0,0),this.companyGroupConstituentsResponseModel.forEach(d=>{d.groupStartDate=this.datepipe.transform(d.startDate,"MM/dd/yyyy"),d.groupEndDate=this.datepipe.transform(d.endDate,"MM/dd/yyyy"),d.isLeaveGroup==!0||d.endDate!=null&&new Date(d.endDate)<t?d.isActive=!1:d.isActive=!0});let l=this.companyGroupConstituentsResponseModel.filter(d=>d.isActive==!0);this.activeGroupConstituentsResponseModel=Object.assign([],l);let m=this.companyGroupConstituentsResponseModel.filter(d=>d.isActive==!1);this.inactiveGroupConstituentsResponseModel=Object.assign([],m)}}else this.loading=!1,this.showErrorMessage(o.message)})})}deleteCompanyGroupPopupEvent(e){this.selectedGroupConstituent=new yi,this.selectedGroupConstituent=Object.assign({},e),this.deleteCompanyGroupPopup=!0}largeViewConstituentGroupListPopupEvent(){this.inactiveGroupConstituentsResponseModel=[];let e=this.companyGroupConstituentsResponseModel.filter(o=>o.isLeaveGroup||this.commonService.formateConstituentDate(o.endDate)<this.commonService.getTodayDate());this.inactiveGroupConstituentsResponseModel=Object.assign([],e),this.largeViewConstituentGroupListPopup=!0}closeLargeGroupViewPopup(){this.largeViewGroupSearchText=null,this.largeViewConstituentGroupListPopup=!1}onLargeViewGroupNameUpdate(e){let o=e.previousValue,t=e.value;if(e.value!=null||e.value!=null){let l=this.companyGroupConstituentsResponseModel.filter(m=>m.isLeaveGroup||this.commonService.formateConstituentDate(m.endDate)<this.commonService.getTodayDate()&&(m.groupName==null?"":m.groupName).toLowerCase().includes(e.value.toLowerCase()));this.inactiveGroupConstituentsResponseModel=Object.assign([],l)}else{this.inactiveGroupConstituentsResponseModel=[],this.inactiveGroupConstituentsResponseModel.length=0;let l=this.companyGroupConstituentsResponseModel.filter(m=>m.isLeaveGroup||this.commonService.formateConstituentDate(m.endDate)<this.commonService.getTodayDate());this.inactiveGroupConstituentsResponseModel=Object.assign([],l)}}deleteCompanyGroup(){return R(this,null,function*(){let e=this.groupService.LeaveGroupConstituentsById(this.selectedGroupConstituent.groupConstituentId,!0,this.currentUser.userId).pipe(N(this.unsubscriber),Z(()=>this.loading=!1)),o=yield F(e);this.processResult(o,()=>{o&&o.isSuccess?(this.loading=!1,o.responseModel!=null&&o.responseModel!=null&&(this.loading=!1,this.showSuccessMessage("Group affiliation has been deleted successfully"),this.selectedGroupConstituent=new yi,this.bindContactGroup(),this.deleteCompanyGroupPopup=!1)):(this.loading=!1,this.showErrorMessage(o.message))})})}editGroupPopupEvent(e){return R(this,null,function*(){this.selectedGroupConstituent=new yi,this.selectedGroupConstituent=Object.assign({},e),yield this.getGroupPositionsByGroupId(e.groupId),this.editGroupPopup=!0})}getGroupPositionsByGroupId(e){return R(this,null,function*(){this.loading=!0;let o=this.groupService.GetGroupPositionsByGroupId(e).pipe(N(this.unsubscriber),Z(()=>this.loading=!1)),t=yield F(o);this.processResult(t,()=>{this.loading=!1,t&&t.isSuccess?t.responseModel!=null&&t.responseModel!=null&&(this.selectedGroupConstituent.groupPositions=t.responseModel,this.selectedGroupConstituent.groupPositions=this.selectedGroupConstituent.groupPositions.sort((l,m)=>l.position.localeCompare(m.position,void 0,{numeric:!0}))):(this.loading=!1,this.showErrorMessage(t.message))})})}closeEditGroupPopup(){this.editGroupPopup=!1}static{this.\u0275fac=function(o){return new(o||i)(E(St),E(Wt),E(Bi),E(si),E(Oi),E(At),E(kt))}}static{this.\u0275cmp=Q({type:i,selectors:[["app-company-group-info"]],viewQuery:function(o,t){if(o&1&&z(Mt,5),o&2){let l;
vendor: 4,461 bytes, line 1
1q(l=j())&&(t.dataGrid=l.first)}},inputs:{companyId:"companyId",companyPageControls:"companyPageControls",companyInfo:"companyInfo"},standalone:!0,features:[li([St]),K,X],decls:29,vars:19,consts:[[1,"scroll-outer"],[1,"information-block",3,"ngClass"],[1,"card-outer"],[1,"card-header"],[1,"card-header__title"],[1,"card-header__edit-collapse"],["href","javascript:void(0)","class","large-view",3,"click",4,"ngIf"],["href","javascript:void(0)","class","collapse",3,"click",4,"ngIf"],[1,"card-content"],["class","client-info information-box",4,"ngIf"],["class","empty-card",4,"ngIf"],["container",".dx-viewport",3,"showTitle","dragEnabled","hideOnOutsideClick","visible","wrapperAttr","visibleChange",4,"ngIf"],[3,"visibleChange","save","visible","action","titleText"],["container",".dx-viewport",3,"visibleChange","showTitle","dragEnabled","hideOnOutsideClick","visible","wrapperAttr"],[1,"dx-popup-header"],[1,"total-records"],[1,"close-button",3,"onClick"],["width","14","height","14","viewBox","0 0 9 9","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M8 1L1 8M1 1L8 8","stroke","#5C5C5C","stroke-width","1.4","stroke-linecap","round","stroke-linejoin","round"],[1,"dx-popup-content-block"],[1,"popup-form-row"],[1,"dx-field","company-contact-search"],["classlist","autocomplete","valueChangeEvent","keyup","placeholder","Search...",1,"autocomplete",3,"valueChange","onValueChanged","value","showClearButton"],[1,"content-inner"],["class","table-block create-contact-table",4,"ngIf"],["href","javascript:void(0)",1,"large-view",3,"click"],["_ngcontent-woh-c409","","width","22px","height","22px","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["_ngcontent-woh-c409","","d","M12 8V12L14.5 14.5","stroke","#219ebc","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["_ngcontent-woh-c409","","d","M5.60423 5.60423L5.0739 5.0739V5.0739L5.60423 5.60423ZM4.33785 6.87061L3.58786 6.87438C3.58992 7.28564 3.92281 7.61853 4.33408 7.6206L4.33785 6.87061ZM6.87963 7.63339C7.29384 7.63547 7.63131 7.30138 7.63339 6.88717C7.63547 6.47296 7.30138 6.13549 6.88717 6.13341L6.87963 7.63339ZM5.07505 4.32129C5.07296 3.90708 4.7355 3.57298 4.32129 3.57506C3.90708 3.57715 3.57298 3.91462 3.57507 4.32882L5.07505 4.32129ZM3.75 12C3.75 11.5858 3.41421 11.25 3 11.25C2.58579 11.25 2.25 11.5858 2.25 12H3.75ZM16.8755 20.4452C17.2341 20.2378 17.3566 19.779 17.1492 19.4204C16.9418 19.0619 16.483 18.9393 16.1245 19.1468L16.8755 20.4452ZM19.1468 16.1245C18.9393 16.483 19.0619 16.9418 19.4204 17.1492C19.779 17.3566 20.2378 17.2341 20.4452 16.8755L19.1468 16.1245ZM5.14033 5.07126C4.84598 5.36269 4.84361 5.83756 5.13505 6.13191C5.42648 6.42626 5.90134 6.42862 6.19569 6.13719L5.14033 5.07126ZM18.8623 5.13786C15.0421 1.31766 8.86882 1.27898 5.0739 5.0739L6.13456 6.13456C9.33366 2.93545 14.5572 2.95404 17.8017 6.19852L18.8623 5.13786ZM5.0739 5.0739L3.80752 6.34028L4.86818 7.40094L6.13456 6.13456L5.0739 5.0739ZM4.33408 7.6206L6.87963 7.63339L6.88717 6.13341L4.34162 6.12062L4.33408 7.6206ZM5.08784 6.86684L5.07505 4.32129L3.57507 4.32882L3.58786 6.87438L5.08784 6.86684ZM12 3.75C16.5563 3.75 20.25 7.44365 20.25 12H21.75C21.75 6.61522 17.3848 2.25 12 2.25V3.75ZM12 20.25C7.44365 20.25 3.75 16.5563 3.75 12H2.25C2.25 17.3848 6.61522 21.75 12 21.75V20.25ZM16.1245 19.1468C14.9118 19.8483 13.5039 20.25 12 20.25V21.75C13.7747 21.75 15.4407 21.2752 16.8755 20.4452L16.1245 19.1468ZM20.25 12C20.25 13.5039 19.8483 14.9118 19.1468 16.1245L20.4452 16.8755C21.2752 15.4407 21.75 13.7747 21.75 12H20.25ZM6.19569 6.13719C7.68707 4.66059 9.73646 3.75 12 3.75V2.25C9.32542 2.25 6.90113 3.32791 5.14033 5.07126L6.19569 6.13719Z","fill","#219ebc"],["href","javascript:void(0)",1,"collapse",3,"click"],["width","14","height","9","viewBox","0 0 14 9","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M1 7.5L7 1.5L13 7.5","stroke","#024079","stroke-width","1.8","stroke-linecap","round","stroke-linejoin","round"],[1,"client-info","information-box"],[1,"table-block","create-contact-table"],["id","gridContainer",1,"table-outer","contacts-table",3,"dataSource"],["dataField","groupName","caption","Group Name","dataType","string","cellTemplate","GroupName",3,"fixed","width"],["class","client-name-with-id",4,"dxTemplate","dxTemplateOf"],["dataField","groupPosition","dataType","string",3,"minWidth","caption",4,"ngIf"],["dataField","startDate","dataType","date",3,"minWidth","caption","customizeText",4,"ngIf"],["dataField","endD
1ate","dataType","date",3,"minWidth","caption","customizeText",4,"ngIf"],["dataField","isActive","caption","Status","cellTemplate","statusTemplate",3,"minWidth","showEditorAlways"],[3,"class",4,"dxTemplate","dxTemplateOf"],["dataField","Action","caption","Action","alignment","center","cellTemplate","ActionCheck",3,"minWidth",4,"ngIf"],[1,"client-name-with-id"],[1,"client-name",3,"click","title"],["dataField","ID"],["dataField","groupPosition","dataType","string",3,"minWidth","caption"],["dataField","startDate","dataType","date",3,"minWidth","caption","customizeText"],["dataField","endDate","dataType","date",3,"minWidth","caption","customizeText"],["dataField","Action","caption","Action","alignment","center","cellTemplate","ActionCheck",3,"minWidth"],["class","action-icon",4,"dxTemplate","dxTemplateOf"],[1,"action-icon"],["href","javascript:void(0);",3,"click"],["width","18","height","18","viewBox","0 0 18 18","fill","none","xmlns","http://www.w3.org/2000/svg"],["id","Vector","d","M16.9328 0.883653C16.3213 0.297172 15.6467 0 14.9265 0C13.8005 0 12.979 0.728045 12.7541 0.951064C12.4378 1.26453 1.64777 12.0669 1.64777 12.0669C1.57706 12.1381 1.526 12.2263 1.4996 12.3231C1.25627 13.223 0.0373541 17.2161 0.0252506 17.2562C-0.0373195 17.4607 0.0185147 17.6835 0.16923 17.8343C0.275547 17.9404 0.419566 18 0.569717 18C0.627814 18 0.686455 17.9913 0.74371 17.9725C0.784967 17.959 4.9034 16.6268 5.58118 16.4243C5.67061 16.3973 5.75211 16.3489 5.81862 16.2833C6.24691 15.8597 16.3106 5.90019 16.9786 5.20979C17.6696 4.49719 18.0128 3.7551 17.9996 3.00459C17.9859 2.26362 17.6269 1.55018 16.9328 0.883653ZM12.5754 2.74758C12.8614 2.81696 13.5358 3.0436 14.2246 3.73907C14.9206 4.44184 15.1089 5.24516 15.144 5.42801C12.9369 7.62535 7.85633 12.6559 5.85353 14.6387C5.66857 14.2075 5.36967 13.6882 4.88888 13.2034C4.30175 12.6113 3.7042 12.2768 3.24336 12.0886C5.22539 10.1047 10.4016 4.92216 12.5754 2.74758ZM2.4811 13.0368C2.78954 13.1188 3.43028 13.3567 4.08339 14.0157C4.58634 14.5232 4.82378 15.083 4.93043 15.4243C4.15019 15.6754 2.4418 16.2655 1.3562 16.6158C1.67784 15.5566 2.22118 13.907 2.4811 13.0368ZM16.1639 4.40699C16.1285 4.44313 16.0931 4.47917 16.0575 4.51513C15.8801 4.05784 15.5689 3.47025 15.03 2.92647C14.4794 2.37088 13.9208 2.0431 13.4732 1.84929C13.5114 1.81137 13.5408 1.78158 13.5523 1.77036C13.6166 1.70686 14.1996 1.14933 14.9262 1.14933C15.3444 1.14933 15.755 1.34033 16.1474 1.71671C16.6124 2.16303 16.8521 2.60345 16.86 3.02618C16.8675 3.45761 16.6334 3.92219 16.1639 4.40699Z","fill","#5C5C5C"],["d","M7.2 3.07317H10.8C10.8 2.60742 10.6104 2.16075 10.2728 1.83142C9.93523 1.50209 9.47739 1.31707 9 1.31707C8.52261 1.31707 8.06477 1.50209 7.72721 1.83142C7.38964 2.16075 7.2 2.60742 7.2 3.07317ZM5.85 3.07317C5.85 2.6696 5.93148 2.26997 6.08978 1.89712C6.24808 1.52427 6.48011 1.18548 6.77261 0.900111C7.06512 0.614741 7.41237 0.388373 7.79455 0.233931C8.17672 0.0794899 8.58634 0 9 0C9.41366 0 9.82328 0.0794899 10.2055 0.233931C10.5876 0.388373 10.9349 0.614741 11.2274 0.900111C11.5199 1.18548 11.7519 1.52427 11.9102 1.89712C12.0685 2.26997 12.15 2.6696 12.15 3.07317H17.325C17.504 3.07317 17.6757 3.14255 17.8023 3.26605C17.9289 3.38955 18 3.55705 18 3.73171C18 3.90636 17.9289 4.07386 17.8023 4.19736C17.6757 4.32086 17.504 4.39024 17.325 4.39024H16.137L15.084 15.0243C15.0032 15.8391 14.6142 16.5953 13.9929 17.1455C13.3716 17.6957 12.5625 18.0003 11.7234 18H6.2766C5.43768 18.0001 4.62879 17.6954 4.00765 17.1452C3.38652 16.5951 2.99766 15.839 2.9169 15.0243L1.863 4.39024H0.675C0.495979 4.39024 0.32429 4.32086 0.197703 4.19736C0.0711158 4.07386 0 3.90636 0 3.73171C0 3.55705 0.0711158 3.38955 0.197703 3.26605C0.32429 3.14255 0.495979 3.07317 0.675 3.07317H5.85ZM7.65 7.2439C7.65 7.06925 7.57888 6.90175 7.4523 6.77825C7.32571 6.65475 7.15402 6.58537 6.975 6.58537C6.79598 6.58537 6.62429 6.65475 6.4977 6.77825C6.37112 6.90175 6.3 7.06925 6.3 7.2439V13.8293C6.3 14.0039 6.37112 14.1714 6.4977 14.2949C6.62429 14.4184 6.79598 14.4878 6.975 14.4878C7.15402 14.4878 7.32571 14.4184 7.4523 14.2949C7.57888 14.1714 7.65 14.0039 7.65 13.8293V7.2439ZM11.025 6.58537C11.204 6.58537 11.3757 6.65475 11.5023 6.77825C11.6289 6.90175 11.7 7.06925 11.7 7.2439V13.8293C11.7 14.0039 11.6289 14.1714 11.5023 14.2949C11.3757 14.4184 11.204 14.4878 11.025 14.4878C10.846 14.4878 10.6743 14.4184 10.5477 14.2949C10.4211 14.1714 10.35 14.0039 10.35 13.8293V7.2439C10.35 7.06925 10.4211 6.90175 10.5477 6.77825C10.6743 6.65475 10.846 6.58537 11.025 6.58537ZM4.2606 14.8979C4.30914 15.3866 4.54252 15.8402 4.91523 16.1702C5.28794 16.5003 5.77327 16.683 6.2766 16.6829H11.7234C12.2267 16.683 12.7121 16.5003 13.0848 16.1702C13.4575 15.8402 13.6909 15.3866 13.7394 14.8979L14.7816 4.39024H3.2184L4.2606 14.8979Z","fill","#5C5C5C"],[1,"empty-card"],["class","add-new",4,"ngIf"],[1,"add-new"],["href","javascript:void(0)",1,"edits","add-plus"],["width","12","height","12","viewBox","0 0 12 12","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M6.02518 1.00021V11.0506M1 6.02539H11.0504","stroke","white","stroke-width","1.8","stroke-linecap","round","stroke-linejoin","round"],[3,"visibleChange","save","visible","companyGroupConstituents","userTokenId","companyId","companyName","properties"],["dataField","groupName","caption","Group Name","dataType","string","cellTemplate","GroupName",3,"fixed","minWidth"],["dataField","groupStartDate","dataType","date",3,"minWidth","caption",4,"ngIf"],["dataField","groupEndDate","dataType","date",3,"minWidth","caption",4,"ngIf"],["dataField","groupStartDate","dataType","date",3,"minWidth","caption"],["dataField","groupEndDate","dataType","date",3,"minWidth","caption"]],template:function(o,t){o&1&&(r(0,"dx-scroll-view",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h2",4),f(5,"Group Information"),s(),r(6,"div",5),u(7,op,5,0,"a",6)(8,np,3,0,"a",7),s()(),r(9,"div",8),u(10,cp,11,11,"div",9)(11,fp,4,1,"div",10),s()()()(),u(12,yp,5,13,"dx-popup",11),r(13,"confirm-popup",12),I("visibleChange",function(m){return b(t.deleteCompanyGroupPopup,m)||(t.deleteCompanyGroupPopup=m),m}),_("save",function(){return t.deleteCompanyGroup()}),s(),r(14,"dx-popup",13),I("visibleChange",function(m){return b(t.largeViewConstituentGroupListPopup,m)||(t.largeViewConstituentGroupListPopup=m),m}),r(15,"div",14)(16,"h2"),f(17," Group History "),s(),r(18,"div",15),f(19),r(20,"dx-button",16),_("onClick",function(){return t.closeLargeGroupViewPopup()}),k(),r(21,"svg",17),y(22,"path",18),s()()()(),U(),r(23,"div",19)(24,"div",20)(25,"div",21)(26,"dx-text-box",22),I("valueChange",function(m){return b(t.largeViewGroupSearchText,m)||(t.largeViewGroupSearchText=m),m}),_("onValueChanged",function(m){return t.onLargeViewGroupNameUpdate(m)}),s()()(),r(27,"div",23),u(28,vp,9,10,"div",24),s()()()),o&2&&(n(),a("ngClass",t.groupInfoCollapseExpand?"collapse":"expand"),n(6),a("ngIf",(t.inactiveGroupConstituentsResponseModel==null?null:t.inactiveGroupConstituentsResponseModel.length)>0),n(),a("ngIf",(t.activeGroupConstituentsResponseModel==null?null:t.activeGroupConstituentsResponseModel.length)>0),n(2),a("ngIf",(t.activeGroupConstituentsResponseModel==null?null:t.activeGroupConstituentsResponseModel.length)>0),n(),a("ngIf",!t.loading&&(t.activeGroupConstituentsResponseModel==null?null:t.activeGroupConstituentsResponseModel.length)==0),n(),a("ngIf",t.selectedGroupConstituent!=null),n(),W("action",t.deleteCompanyGroupAction),W("titleText",t.selectedGroupConstituent==null?null:t.selectedGroupConstituent.groupName),v("visible",t.deleteCompanyGroupPopup),n(),a("showTitle",!1)("dragEnabled",!1)("hideOnOutsideClick",!0),v("visible",t.largeViewConstituentGroupListPopup),a("wrapperAttr",P(18,tp)),n(5),O(" (Total ",t.inactiveGroupConstituentsResponseModel==null?null:t.inactiveGroupConstituentsResponseModel.length," records) "),n(7),v("value",t.largeViewGroupSearchText),a("showClearButton",!0),n(2),a("ngIf",(t.inactiveGroupConstituentsResponseModel==null?null:t.inactiveGroupConstituentsResponseModel.length)>0))},dependencies:[Y,Dt,J,$,pe,gi,Wn,se,It,de,me,ce,ue,fe,ye,wt,Ce,he,_e,xe,ge,ve,be,Mt,di,Ie,we,Me,De,Pe,Te,Se,Ae,Ee,Ve,Le,ke,Re,Oe,Be,Ge,Fe,Ne,We,ze,qe,je,He,Ue,Ze,Qe,Ke,Xe,Et,Je,Ye,$e,et,tt,it,ot,Vt,nt,at,rt,lt,st,dt,pt,mt,ct,ut,pi,ft,yt,Ct,ht,_t,gt,vt,bt,xt,oe,le,re,ae,ne,ie,te],styles:[".expand-view-button[_ngcontent-%COMP%]{position:relative;width:100%;display:flex;justify-content:flex-end}.large-view[_ngcontent-%COMP%]{display:flex}"]}
1)}}return i})();var bp=()=>({id:"elementId",class:"popup-outer w-600"});function Ip(i,p){i&1&&(r(0,"div",19),f(1," In Person "),s())}function wp(i,p){if(i&1){let e=M();r(0,"div",35)(1,"a",36),_("click",function(){let t=C(e).$implicit,l=c(4);return h(l.navigateToEventRegistration(t))}),f(2),s(),r(3,"span",37),f(4),s()()}if(i&2){let e=p.$implicit;n(),W("title",e.data.productName),n(),T(e.data.productName),n(),W("title",e.data.eventId),n(),T(e.data.eventCode)}}function Mp(i,p){i&1&&(r(0,"dxi-column",33),u(1,wp,5,4,"div",34),s()),i&2&&(a("fixed",!0),n(),a("dxTemplateOf","EventIdTemp"))}function Dp(i,p){if(i&1&&(r(0,"div",38)(1,"span",39),f(2),Xt(3,"date"),r(4,"span"),f(5),Xt(6,"date"),s()()()),i&2){let e=p.$implicit;n(2),O(" ",Jt(3,2,e.data.eventStartDateTime,"MM/dd/yyyy"),""),n(3),O(" | ",Jt(6,5,e.data.eventStartDateTime,"shortTime")," ")}}function Pp(i,p){if(i&1&&(r(0,"div",38)(1,"span",39),f(2),Xt(3,"date"),r(4,"span"),f(5),Xt(6,"date"),s()()()),i&2){let e=p.$implicit;n(2),O(" ",Jt(3,2,e.data.eventEndDateTime,"MM/dd/yyyy"),""),n(3),O(" | ",Jt(6,5,e.data.eventEndDateTime,"shortTime")," ")}}function Tp(i,p){if(i&1&&(r(0,"span"),f(1),s()),i&2){let e=p.$implicit;Kt("status ",e.data.paymentStatus==="Paid"?"Paid":"Unpaid",""),n(),T(e.data.paymentStatus==="Paid"?"Paid":"Unpaid")}}function Sp(i,p){if(i&1&&(r(0,"div",42),y(1,"dx-drop-down-button",43),s()),i&2){let e=c(4);n(),a("showArrowIcon",!1)("useItemTextAsTitle",!1)("useSelectMode",!1)("items",e.eventRegistrationMenu)}}function Ap(i,p){i&1&&(ui(0),r(1,"dxi-column",40),u(2,Sp,2,4,"div",41),s(),fi()),i&2&&(n(),a("fixed",!0)("width",130),n(),a("dxTemplateOf","ActionTemplate"))}function Ep(i,p){if(i&1){let e=M();r(0,"div",24)(1,"dx-data-grid",25),_("onCellClick",function(t){C(e);let l=c(2);return h(l.onEventItemClick(t))}),y(2,"dxo-column-chooser",26)(3,"dxo-column-fixing",26),u(4,Mp,2,2,"dxi-column",27),r(5,"dxi-column",28),u(6,Dp,7,8,"div",29),s(),r(7,"dxi-column",30),u(8,Pp,7,8,"div",29),s(),r(9,"dxi-column",31),u(10,Tp,2,4,"span",32),s(),u(11,Ap,3,3,"ng-container",15),s()()}if(i&2){let e=c(2);n(),a("dataSource",e.eventsInforamtion)("allowColumnReordering",!0)("allowColumnResizing",!1)("columnAutoWidth",!1)("showBorders",!0)("focusedRowEnabled",!0)("focusedRowIndex",0),n(),a("enabled",!1),n(),a("enabled",!0),n(),a("ngIf",!0),n(),a("customizeText",e.customizeDateTime),n(),a("dxTemplateOf","EventStartDateTemp"),n(),a("customizeText",e.customizeDateTime),n(),a("dxTemplateOf","EventEndDateTemp"),n(2),a("dxTemplateOf","statusTemplate"),n(),a("ngIf",!0)}}function Vp(i,p){i&1&&(r(0,"div",44)(1,"p"),f(2,"There are no event registration yet."),s()())}function Lp(i,p){if(i&1&&(r(0,"div",20)(1,"div",21),u(2,Ep,12,16,"div",22)(3,Vp,3,0,"div",23),s()()),i&2){let e=c();n(2),a("ngIf",(e.eventsInforamtion==null?null:e.eventsInforamtion.length)>0),n(),a("ngIf",!e.loading&&(e.eventsInforamtion==null?null:e.eventsInforamtion.length)==0)}}function kp(i,p){i&1&&(r(0,"div",19),f(1," Virtual "),s())}function Rp(i,p){i&1&&(r(0,"div",20)(1,"div",21),y(2,"virtual-events"),s()())}function Op(i,p){if(i&1&&(r(0,"p"),f(1),s()),i&2){let e=c();n(),O("Are you sure want to cancel registration for ",e.selectedEventRegistration.productName,"?")}}/localhost/.test(document.location.host)||void 0;var qn=(()=>{class i extends ee{constructor(e,o,t,l,m){super(),this.router=o,this.companyService=t,this.eventService=l,this.memberPermissionService=m,this.eventsInforamtion=[],this.unsubscriber=new Lt,this.formData={},this.stylingMode="outlined",this.labelMode="floating",this.tabsPositions=["top"],this.tabsPosition=this.tabsPositions[0],this.customizeDateTime=({value:A})=>A?new Date(A).toLocaleDateString("en-US",{year:"numeric",month:"numeric",day:"numeric"}):"-",this.eligibilityRules=new Ai({key:"ID",data:e.getEligibility()});let d=this.memberPermissionService.hasPermission(!0,"Update Company Information")&&this.memberPermissionService.hasPermission(!0,"Update Event Registration Information");this.eventRegistrationMenu=[{value:"ViewEvent",text:"View Event",name:"View Event",icon:"view",visible:!0,onClick:()=>{}},{value:"CancelRegistration",text:"Cancel Registration",name:"Cancel Registration",icon:"cancel",visible:!0,onClick:()=>{this.cancelRegistration()}},{value:"Edit",text:"Edit",name:"Edit",icon:"edit",visible:!0,onClick:()=>{}}],d||(this.eventRegistrationMenu=this.eventRegistrationMenu.filter(A=>A.value=="ViewEvent"))}ngOnInit(){return R(this,null,function*(){yield this.getEventsByCompanyId()})}onItemClick(e){}getEventsByCompanyId(){return R(this,null,function*(){this.loading=!0;let e=this.companyService.GetEventsByCompanyId(this.companyId).pipe(N(this.unsubscriber),Z(()=>this.loading=!1)),o=yield F(e);this.processResult(o,()=>{this.loading=!1,o&&o.isSuccess?o.responseModel!=null&&o.responseModel!=null&&(this.eventsInforamtion=o.responseModel):(this.loading=!1,this.showErrorMessage(o.message))})})}navigateToEventRegistration(e){let o=e.data;console.log(o)}onEventItemClick(e){this.selectedEventRegistration=new Ko,this.selectedEventRegistration=e.data,this.selectedEventRegistration.registrationStatus=="Canceled"?this.eventRegistrationMenu.forEach(o=>{o.value==="CancelRegistration"&&(o.visible=!1)}):this.eventRegistrationMenu.forEach(o=>{o.value==="CancelRegistration"&&(o.visible=!0)})}cancelRegistration(){this.cancelRegistraionEvent=!0}closeCancelRegistrationPopup(){this.cancelRegistraionEvent=!1}cancelEventRegistration(){return R(this,null,function*(){this.loading=!0;let e=this.eventService.CancleEventRegistrations(this.selectedEventRegistration.eventId,0,this.companyId).pipe(N(this.unsubscriber),Z(()=>this.loading=!1)),o=yield F(e);this.processResult(o,()=>R(this,null,function*(){o.responseModel?(this.loading=!1,this.cancelRegistraionEvent=!1,yield this.getEventsByCompanyId(),this.showSuccessMessage("Event registration has been canceled successfully")):(this.loading=!1,this.showErrorMessage(o.message))}))})}static{this.\u0275fac=function(o){return new(o||i)(E(St),E(Wt),E(Bt),E(Jo),E(kt))}}static{this.\u0275cmp=Q({type:i,selectors:[["app-company-event-info"]],viewQuery:function(o,t){if(o&1&&z(Mt,5),o&2){let l;
1q(l=j())&&(t.dataGrid=l.first)}},inputs:{companyId:"companyId"},standalone:!0,features:[li([St]),K,X],decls:24,vars:16,consts:[["tabPanel",""],[1,"card-outer"],[1,"card-header"],[1,"card-header__title"],[1,"card-header__edit-collapse"],[1,"card-content"],[1,"client-info","information-box","membership-info-block","event-registration-table"],[1,"tabs-outer","registration-management-tabs",3,"loop","animationEnabled","swipeEnabled","tabsPosition","height"],["tabTemplate","RegularEventsHeader","template","RegularEventsContent"],["class","tabs-outer__header",4,"dxTemplate","dxTemplateOf"],["class","tabs-outer__content",4,"dxTemplate","dxTemplateOf"],["tabTemplate","VirtualEventsHeader","template","VirtualEventsContent"],["container",".dx-viewport",3,"visibleChange","showTitle","dragEnabled","hideOnOutsideClick","visible","wrapperAttr"],[1,"dx-popup-header"],[1,"dx-popup-content-block"],[4,"ngIf"],[1,"dx-popup-footer"],["text","Cancel","stylingMode","contained","type","normal",1,"btn","btn--cancel",3,"onClick"],["text","Save","stylingMode","contained","type","default",1,"btn","btn--primary",3,"onClick"],[1,"tabs-outer__header"],[1,"tabs-outer__content"],[1,"card-content","card-content-new"],["class","table-block create-contact-table",4,"ngIf"],["class","empty-card",4,"ngIf"],[1,"table-block","create-contact-table"],["id","gridContainer",1,"table-outer","contacts-table",3,"onCellClick","dataSource","allowColumnReordering","allowColumnResizing","columnAutoWidth","showBorders","focusedRowEnabled","focusedRowIndex"],[3,"enabled"],["dataField","eventName","caption","Event Name","cellTemplate","EventIdTemp",3,"fixed",4,"ngIf"],["dataField","eventStartDateTime","caption","Start Date & Time","cellTemplate","EventStartDateTemp",3,"customizeText"],["class","event-status-temp",4,"dxTemplate","dxTemplateOf"],["dataField","eventEndDateTime","caption","End Date & Time","cellTemplate","EventEndDateTemp",3,"customizeText"],["dataField","paymentStatus","caption","Status","cellTemplate","statusTemplate"],[3,"class",4,"dxTemplate","dxTemplateOf"],["dataField","eventName","caption","Event Name","cellTemplate","EventIdTemp",3,"fixed"],["class","client-name-with-id",4,"dxTemplate","dxTemplateOf"],[1,"client-name-with-id"],["href","javascript:void(0)",1,"client-name",3,"click","title"],[3,"title"],[1,"event-status-temp"],[1,"date-time"],["dataField","action","caption","Action","type","buttons","cellTemplate","ActionTemplate",3,"fixed","width"],["class","action-menu-btn",4,"dxTemplate","dxTemplateOf"],[1,"action-menu-btn"],["icon","dot-icon","cssClass","TestingClass","displayExpr","text","text","","stylingMode","text",1,"overflow-menu","single-overflow-menu",3,"showArrowIcon","useItemTextAsTitle","useSelectMode","items"],[1,"empty-card"]],template:function(o,t){if(o&1){let l=M();r(0,"div",1)(1,"div",2)(2,"h2",3),f(3,"Event Registration Information"),s(),y(4,"div",4),s(),r(5,"div",5)(6,"div",6)(7,"dx-tab-panel",7,0),y(9,"dxi-item",8),u(10,Ip,2,0,"div",9)(11,Lp,4,2,"div",10),y(12,"dxi-item",11),u(13,kp,2,0,"div",9)(14,Rp,3,0,"div",10),s()()()(),r(15,"dx-popup",12),I("visibleChange",function(d){return C(l),b(t.cancelRegistraionEvent,d)||(t.cancelRegistraionEvent=d),h(d)}),r(16,"div",13)(17,"h2"),f(18,"Confirm Cancel Registration"),s()(),r(19,"div",14),u(20,Op,2,1,"p",15),s(),r(21,"div",16)(22,"dx-button",17),_("onClick",function(){return C(l),h(t.closeCancelRegistrationPopup())}),s(),r(23,"dx-button",18),_("onClick",function(){return C(l),h(t.cancelEventRegistration())}),s()()()}o&2&&(n(7),a("loop",!1)("animationEnabled",!1)("swipeEnabled",!1)("tabsPosition",t.tabsPosition)("height",418),n(3),a("dxTemplateOf","RegularEventsHeader"),n(),a("dxTemplateOf","RegularEventsContent"),n(2),a("dxTemplateOf","VirtualEventsHeader"),n(),a("dxTemplateOf","VirtualEventsContent"),n(),a("showTitle",!1)("dragEnabled",!1)("hideOnOutsideClick",!0),v("visible",t.cancelRegistraionEvent),a("wrapperAttr",P(15,bp)),n(5),a("ngIf",t.selectedEventRegistration!=null))},dependencies:[Y,J,si,$,pe,en,se,Rt,It,de,me,ce,ue,fe,ye,wt,Ce,he,_e,xe,ge,ve,be,Mt,to,io,di,Ie,we,Me,De,Pe,Te,Se,Vi,Ae,Ee,Ve,Le,ke,Re,Oe,Be,Ge,Fe,Ne,We,ze,qe,je,He,Ue,Ze,Qe,Ke,Xe,Et,Je,Ye,$e,et,tt,it,ot,nt,at,rt,lt,st,dt,no,pt,mt,ct,ut,ft,yt,Ct,ht,_t,gt,vt,bt,xt,oe,le,re,ae,ne,ie,te],styles:[".my-events[_ngcontent-%COMP%] .contacts-table[_ngcontent-%COMP%] .first-child[_ngcontent-%COMP%]{font:var(--font-weight-500) var(--font-14) var(--font-family);color:var(--member-primary-color)!important}.card-content-new[_ngcontent-%COMP%]{padding-top:1rem}"]})}}return i})();var Bp=["myInputFile"],Gp=["orgStructurePopup"],Fp=()=>[".jpg",".jpeg",".png"];function Np(i,p){if(i&1){let e=M();r(0,"dx-file-uploader",29,0),_("change",function(t){C(e);let l=c(2);return h(l.handleInputChange(t))}),s()}if(i&2){let e=c(2);W("selectButtonText",e.uploadButtonText),a("maxFileSize",4e6)("allowedFileExtensions",P(3,Fp))}}function Wp(i,p){if(i&1){let e=M();r(0,"a",30),_("click",function(t){C(e);let l=c(2);return h(l.removeLogo(t))}),k(),r(1,"svg",31),_("click",function(t){C(e);let l=c(2);return h(l.removeLogo(t))}),y(2,"path",32),s()()}}function zp(i,p){if(i&1){let e=M();r(0,"div",21)(1,"div",22)(2,"div",23)(3,"div",24)(4,"span")(5,"img",25),_("error",function(t){C(e);let l=c();return h(l.onImageError(t))}),s()()(),r(6,"div",26),u(7,Np,2,4,"dx-file-uploader",27)(8,Wp,3,0,"a",28),s()()()()}if(i&2){let e=c();n(5),W("src",e.editCardImageBase64Default,Hi),n(2),a("ngIf",!e.IsReadonly("CompanyLogo")),n(),a("ngIf",e.isShowRemoveLogoButton&&!e.IsReadonly("CompanyLogo"))}}function qp(i,p){if(i&1&&(r(0,"h3"),f(1),Xt(2,"date"),s()),i&2){let e=c();n(),bi("",e.label("joinDate")," : ",Jt(2,2,e.companyInfo==null?null:e.companyInfo.joinDate,"MM/dd
1/yyyy")," ")}}function jp(i,p){if(i&1&&(r(0,"a",33),f(1),s()),i&2){let e=c();W("href",e.checkUrlContainHttp((e.companyInfo==null?null:e.companyInfo.effectiveEmailDomain)||(e.companyInfo==null?null:e.companyInfo.emailDomain))?(e.companyInfo==null?null:e.companyInfo.effectiveEmailDomain)||(e.companyInfo==null?null:e.companyInfo.emailDomain):"https://"+((e.companyInfo==null?null:e.companyInfo.effectiveEmailDomain)||(e.companyInfo==null?null:e.companyInfo.emailDomain)),Hi),n(),T((e.companyInfo==null?null:e.companyInfo.effectiveEmailDomain)||(e.companyInfo==null?null:e.companyInfo.emailDomain))}}function Hp(i,p){if(i&1){let e=M();r(0,"a",36),_("click",function(){C(e);let t=c(2);return h(t.openTwitterHandle(t.companyInfo==null?null:t.companyInfo.twitterHandle))}),k(),r(1,"svg",37),y(2,"rect",38)(3,"path",39),s()()}}function Up(i,p){if(i&1){let e=M();r(0,"a",36),_("click",function(){C(e);let t=c(2);return h(t.openLinkedInHandle(t.companyInfo==null?null:t.companyInfo.linkedInProfile))}),k(),r(1,"svg",37),y(2,"path",40),s()()}}function Zp(i,p){if(i&1&&(r(0,"div",34),u(1,Hp,4,0,"a",35)(2,Up,3,0,"a",35),s()),i&2){let e=c();n(),a("ngIf",e.companyInfo==null?null:e.companyInfo.twitterHandle),n(),a("ngIf",e.companyInfo==null?null:e.companyInfo.linkedInProfile)}}function Qp(i,p){if(i&1&&(r(0,"div",5),y(1,"app-company-membership-info",45),s()),i&2){let e=c(2);n(),a("isMembershipShownInCataloge",e.isMembershipShownInCataloge)("companyId",e.companyId)}}function Kp(i,p){if(i&1){let e=M();r(0,"div",5)(1,"app-company-demographics",46),_("getCompanyDetails",function(){C(e);let t=c(2);return h(t.getCompanyDetails())}),s()()}if(i&2){let e=c(2);n(),a("companyDemographics",e.companyInfo==null?null:e.companyInfo.companyDemogrpahics)("companyId",e.companyId)}}function Xp(i,p){if(i&1){let e=M();r(0,"div",5)(1,"app-company-address-info",47),_("getCompanyDetails",function(){C(e);let t=c(2);return h(t.getCompanyDetails())}),s()()}if(i&2){let e=c(2);n(),a("companyInfo",e.companyInfo)("addressType",e.addressType)("companyAddresses",e.companyAddresses)("companyPageControls",e.companyPageControls)("country",e.country)("state",e.state)("status",e.status)}}function Jp(i,p){if(i&1){let e=M();r(0,"div",5)(1,"app-company-phone-info",48),_("getCompanyDetails",function(){C(e);let t=c(2);return h(t.getCompanyDetails())}),s()()}if(i&2){let e=c(2);n(),a("companyInfo",e.companyInfo)("phoneType",e.phoneType)("companyPageControls",e.companyPageControls)("companyPhones",e.companyPhones)("country",e.country)}}function Yp(i,p){if(i&1){let e=M();r(0,"div",5)(1,"app-company-contact-info",49),_("getCompanyDetails",function(){C(e);let t=c(2);return h(t.getCompanyDetails())}),s()()}if(i&2){let e=c(2);n(),a("companyId",e.companyId)("companyInfo",e.companyInfo)("companyPageControls",e.companyPageControls)("affiliationRoles",e.affiliationRoles)("permissionRoles",e.permissionRoles)}}function $p(i,p){if(i&1&&(r(0,"div",5),y(1,"app-company-group-info",50),s()),i&2){let e=c(2);n(),a("companyId",e.companyId)("companyInfo",e.companyInfo)("companyPageControls",e.companyPageControls)}}function em(i,p){if(i&1&&(r(0,"div",5),y(1,"app-company-event-info",51),s()),i&2){let e=c(2);n(),a("companyId",e.companyId)}}function tm(i,p){i&1&&(r(0,"div",5),y(1,"app-donation-information"),s())}function im(i,p){if(i&1){let e=M();ui(0),u(1,Qp,2,2,"div",41),r(2,"div",5),y(3,"app-hierarchy-affiliation"),s(),r(4,"div",5)(5,"app-company-organization-info",42),_("getCompanyDetails",function(){C(e);let t=c();return h(t.getCompanyDetails())})("orgStructureClicked",function(){C(e);let t=c();return h(t.openOrgStructure())}),s()(),u(6,Kp,2,2,"div",41)(7,Xp,2,7,"div",41)(8,Jp,2,5,"div",41)(9,Yp,2,5,"div",41)(10,$p,2,3,"div",41)(11,em,2,1,"div",41)(12,tm,2,0,"div",41),r(13,"div",43),y(14,"app-digital-product",44),s(),fi()}if(i&2){let e=c();n(),a("ngIf",e.isMembershipShownInProfiles&&e.checkCompanyLevelPermission("View Membership")),n(4),a("companyInfo",e.companyInfo)("companyPageControls",e.companyPageControls)("organizationType",e.organizationType)("companyType",e.companyType)("status",e.status),n(),a("ngIf",e.checkCompanyLevelPermission("View Demographics")),n(),a("ngIf",e.checkCompanyLevelPermission("View Address Information")),n(),a("ngIf",e.checkCompanyLevelPermission("View Phone Information")),n(),a("ngIf",e.checkCompanyLevelPermission("View Contacts")),n(),a("ngIf",e.checkCompanyLevelPermission("View Group Information")),n(),a("ngIf",e.isEventsShownInProfiles&&e.checkCompanyLevelPermission("View Event Information")),n(),a("ngIf",e.isDonationShowInProfile),n(2),a("isCompanyProfile",!0)}}function om(i,p){i&1&&(r(0,"div",52),f(1," You don't have access to see Company Information. "),s())}function nm(i,p){if(i&1&&y(0,"app-company-hierarchy-popup",53,1),i&2){let e=c();a("companyId",e.companyId)("amsMode",!1)}}var Qf=(()=>{class i extends ee{get isMembershipShownInCataloge(){return this.catalogVisibility.isMembershipShown()}constructor(e,o,t,l,m,d,A,L,V,x){super(),this.companyService=e,this.propertyService=o,this.activatedRoute=t,this.utilityService=l,this.contactService=m,this.webStorageService=d,this.router=A,this.memberPermissionService=L,this.authenticationService=V,this.catalogVisibility=x,this.unsubscriber=new Lt,this.companyPageControls=[],this.profileInformationControls=[],this.OrganizationInformationControls=[],this.PhoneInformationControls=[],this.AddressInformationControls=[],this.constituentsInformationControls=[],this.companyAddresses=[],this.companyPhones=[],this.companyTypeModel=[],this.addressType=[],this.phoneType=[],this.organizationType=[],this.companyType=[],this.country=[],this.state=[],this.affiliationRoles=[],this.permissionRoles=[],this.companyId=0,this.uploadButtonText="Change Logo",this.isShowRemoveLogoButton=!1,this.companyLogoDefaultImage="assets/img/placeholder-img.png",this.isImageSaved=!1,this.isTempImage=!1,this.loadDataCompany=()=>{this.loading=!0,ji([this.utilityService.IsProductVisibleByProductVisibilityType("Memberships","ShowInCompanyProfilesInMemberPortal"),this.utilityService.IsProductVisibleByProductVisibilityType("Events","ShowInCompanyProfilesInMemberPortal"),this.utilityService.IsProductVisibleByProductVisibilityType("Donations","ShowInCompanyProfilesInMemberPortal"),this.utilityService.IsProductVisibleByProductVisibilityType("BaseProduct","ShowInCompanyProfilesInMemberPortal")]).pipe(qi(([D,B,H,Tt])=>({isMembershipShownInProfiles:D,isEventsShownInProfiles:B,isDonationShowInProfile:H,isBaseProductShownInProfile:Tt}))).subscribe(D=>
1{this.loading=!1,Object.keys(D).forEach(B=>this[B]=D[B].responseModel)})},this.loadData=()=>R(this,null,function*(){this.loading=!0;let D=ji([this.utilityService.GetAllMasterDataForCompany(),this.contactService.GetAffiliationGroupRolesAsync(),this.utilityService.GetAllCompanyType()]).pipe(qi(([H,Tt,S])=>({masterData:H,affiliationGroupRoleModel:Tt,companyTypeModel:S})),Z(()=>this.loading=!1)),B=yield F(D);B!=null&&(Object.keys(B).forEach(H=>this[H]=B[H].responseModel),this.addressType=this.masterData.addressTypes,this.country=this.masterData.countries,this.state=this.masterData.states,this.phoneType=this.masterData.phoneTypes,this.status=this.masterData.contactStatus,this.affiliationRoles=this.masterData.affiliationRoles,this.organizationType=this.masterData.organizationTypes,this.permissionRoles=this.masterData.permissionRoles,this.companyType=this.companyTypeModel)}),(!d.getCurrentmemberToken()||!V.isMemberAuthenticated())&&this.router.navigate(["/member/login"]),this.currentUser=d.getCurrentmemberToken(),localStorage.setItem("isIndividualLogin",JSON.stringify(!1)),this.loadData(),this.loadDataCompany(),this.getCompanyPageControls(),this.activatedRoute.params.pipe(N(this.unsubscriber)).subscribe(D=>R(this,null,function*(){let B=Number(D.companyId);this.companyId=Number.isFinite(B)?B:0,this.companyId>0&&(yield this.getCompanyDetails())}))}checkCompanyLevelPermission(e){return this.memberPermissionService.hasPermission(!0,e)}getCompanyDetails(){return R(this,null,function*(){this.loading=!0;let e=this.companyService.GetCompanyByID(Number(this.companyId)).pipe(N(this.unsubscriber),Z(()=>this.loading=!1)),o=yield F(e);this.processResult(o,()=>{o&&o.isSuccess?(this.companyInfo=o.responseModel,this.companyInfo.companyAddresses!=null&&(this.companyAddresses=this.companyInfo.companyAddresses.filter(t=>t.isActive)),this.companyInfo.companyPhones!=null&&(this.companyPhones=this.companyInfo.companyPhones),this.companyInfo.companyAddresses!=null&&(this.companyAddresses=this.companyInfo.companyAddresses.filter(t=>t.isActive),this.companyAddresses.forEach(t=>{let l=t.country,m="US",d=this.country.find(L=>L.countryName==l);d&&(m=d.countryCode);let A=this.state.filter(L=>L.countryCode==m);t.states=A})),this.bindCompanyLogo()):(this.loading=!1,this.showErrorMessage(o.message))})})}getCompanyPageControls(){return R(this,null,function*(){this.loading=!0;let e=this.propertyService.GetAllCompanyPageControls().pipe(N(this.unsubscriber),Z(()=>this.loading=!1)),o=yield F(e);this.processResult(o,()=>{o&&o.isSuccess?o.responseModel!=null&&o.responseModel!=null&&(this.companyPageControls=o.responseModel,this.companyPageControls.forEach(t=>{t.pageName==Li.ProfileInformation?this.profileInformationControls.push(t):t.pageName==Li.OrganizationInformation?this.OrganizationInformationControls.push(t):t.pageName==Li.PhoneInformation?this.PhoneInformationControls.push(t):t.pageName==Li.AddressInformation?this.AddressInformationControls.push(t):t.pageName==Li.ConstituentsInformation&&this.constituentsInformationControls.push(t)}),this.profileInformationControls.length>0&&(this.profileInformationControls=this.profileInformationControls.sort((t,l)=>t.controlDisplayOrder-l.controlDisplayOrder)),this.OrganizationInformationControls.length>0&&(this.OrganizationInformationControls=this.OrganizationInformationControls.sort((t,l)=>t.controlDisplayOrder-l.controlDisplayOrder)),this.PhoneInformationControls.length>0&&(this.PhoneInformationControls=this.PhoneInformationControls.sort((t,l)=>t.controlDisplayOrder-l.controlDisplayOrder)),this.AddressInformationControls.length>0&&(this.AddressInformationControls=this.AddressInformationControls.sort((t,l)=>t.controlDisplayOrder-l.controlDisplayOrder)),this.constituentsInformationControls.length>0&&(this.constituentsInformationControls=this.constituentsInformationControls.sort((t,l)=>t.controlDisplayOrder-l.controlDisplayOrder))):(this.loading=!1,this.showErrorMessage(o.message))})})}bindCompanyLogo(){let e=new Image;e.src="data:image/png;base64,"+this.companyInfo.companyLogo,this.companyInfo.companyLogo!=""&&this.companyInfo.companyLogo!=null&&this.companyInfo.companyLogo!=""?(this.uploadButtonText="Change Logo",this.isShowRemoveLogoButton=!0):(this.uploadButtonText="Upload Logo",this.isShowRemoveLogoButton=!1,this.companyLogoDefaultImage="assets/img/placeholder-img.png"),e.onload=()=>{let o="data:image/png;base64,"+this.companyInfo.companyLogo;this.companyLogoDefaultImage=o,this.companyLogoBase64Image=o,this.editCompanyLogoDefaultImage=o,this.editCardImageBase64Default=o;let t=this.companyLogoDefaultImage.indexOf(",",0),l=this.companyLogoDefaultImage.slice(t+1);this.companyLogo=l,this.companyLogoContentType=this.companyInfo.logoImageFormat},this.companyProfileModel=rn,this.companyProfileModel=new an,this.companyProfileModel.companyId=Number(this.companyId),this.companyProfileModel.twitterHandle=this.companyInfo.twitterHandle,this.companyProfileModel.linkedInProfile=this.companyInfo.linkedInProfile,this.companyInfo.companyLogo!=""&&this.companyInfo.companyLogo!=""&&this.companyInfo.companyLogo!=null?this.isShowRemoveLogoButton=!0:this.isShowRemoveLogoButton=!1}IsVisible(e){let o=!0,t=this.companyPageControls.find(l=>l.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase());return t?o=t.isVisible:o=!1,o}IsReadonly(e){let o=!1,t=this.companyPageControls.find(l=>l.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase());return t!=null?o=!t.isReadOnly:o=!1,o}handleInputChange(e){if(e.target.files&&e.target.files[0]){let o=["image/png","image/jpeg","image/jpg"];if(e.target.files[0].size>4e6)return this.showErrorMessage("Maximum size allowed is 4000Kb"),!1;let d=!1;
1if(o.forEach(L=>{L===e.target.files[0].type&&(d=!0)}),!d)return this.showErrorMessage("Only png, jpeg, jpg images are allowed."),!1;let A=new FileReader;A.onload=L=>R(this,null,function*(){let V=new Image;V.src=L.target.result;let x=L.target.result;this.editCardImageBase64Default=x;let G=x.indexOf(",",0),D=this.editCardImageBase64Default.slice(G+1);this.companyLogoContentType=e.target.files[0].type,this.companyLogo=D,this.isImageSaved=!0,this.isTempImage=!0,this.isShowRemoveLogoButton=!0,yield this.onLogoSubmit()}),A.readAsDataURL(e.target.files[0])}return this.companyLogo}removeLogo(e){return R(this,null,function*(){if(this.fileInput.value="",this.isTempImage){this.isTempImage=!1;let l=new Image;l.src="",this.companyLogoBase64Image?(this.editCardImageBase64Default=this.companyLogoBase64Image,this.isShowRemoveLogoButton=!0):(this.editCardImageBase64Default="assets/img/placeholder-img.png",this.isShowRemoveLogoButton=!1),this.uploadButtonText="Upload Logo",this.companyInfo.companyLogo="",this.companyLogo="",this.companyLogoContentType="",this.isImageSaved=!1;return}let o=this.companyService.RemoveCompanyLogo(this.companyId,this.currentUser.userId).pipe(N(this.unsubscriber),Z(()=>{this.loading=!1}));(yield F(o)).isSuccess&&(this.showSuccessMessage("Company photo removed successfully."),this.resetImageLogo(),this.headerChild.getCompanyDetails())})}resetImageLogo(){let e=new Image;e.src="",this.companyLogoBase64Image="assets/img/placeholder-img.png",this.editCardImageBase64Default="assets/img/placeholder-img.png",this.uploadButtonText="Upload Logo",this.isShowRemoveLogoButton=!1,this.companyInfo.companyLogo="",this.companyLogo="",this.companyLogoContentType="",this.isImageSaved=!1}onImageError(e){let o=e.target;o.src=this.companyLogoDefaultImage}checkUrlContainHttp(e){return!!(e&&(e.indexOf("http://")==0||e.indexOf("https://")==0))}openTwitterHandle(e){if(e==null||e==null||e=="")return;let o="";this.checkUrlContainHttp(e)?o=e:o="https://x.com/"+e,window.open(o,"_blank")}openLinkedInHandle(e){if(e==null||e==null||e=="")return;let o="";this.checkUrlContainHttp(e)?o=e:o="https://"+e,window.open(o,"_blank")}onLogoSubmit(){return R(this,null,function*(){if(this.companyProfileModel.companyId>0){this.isImageSaved?(this.companyProfileModel.companyLogo=this.companyLogo,this.companyProfileModel.logoImageFormat=this.companyLogoContentType):(this.companyProfileModel.companyLogo="",this.companyProfileModel.logoImageFormat=""),this.companyProfileModel.modifiedByUserId=this.currentUser.userId;let e=this.companyService.UpdateCompanyProfile(this.companyProfileModel),o=yield F(e);o&&o.isSuccess?(this.loading=!1,this.showSuccessMessage("Company profile information has been updated successfully"),this.getCompanyDetails(),this.headerChild.getCompanyDetails()):(this.loading=!1,this.showErrorMessage(o.message))}})}label(e){let o=" ";return o=this.companyPageControls.find(l=>l.sourceColumnName!=null&&l.sourceColumnName.toLocaleLowerCase()==e.toLocaleLowerCase())?.fieldCaption,o}openOrgStructure(){this.orgStructurePopup?.openPopup()}static{this.\u0275fac=function(o){return new(o||i)(E(Bt),E(Yo),E(Si),E(_i),E(so),E(At),E(Wt),E(kt),E(eo),E(Lo))}}static{this.\u0275cmp=Q({type:i,selectors:[["app-company-profile"]],viewQuery:function(o,t){if(o&1&&(z(Bp,5),z(xo,5),z(Gp,5)),o&2){let l;q(l=j())&&(t.fileInput=l.first),q(l=j())&&(t.headerChild=l.first),q(l=j())&&(t.orgStructurePopup=l.first)}},standalone:!0,features:[K,X],decls:35,vars:17,consts:[["myInputFile",""],["orgStructurePopup",""],[1,"wrapper-outer","home-outer"],[1,"scroll-outer","main-scroll"],[1,"container"],[1,"single-block"],[1,"about-me"],[1,"about-me__left"],["class","file-upload-outer",4,"ngIf"],[1,"about-me__right"],[1,"top-buttons"],[1,"member-title"],[4,"ngIf"],[1,"company-profiles"],[1,"company-profiles__id"],[1,"company-profiles__last-update"],[1,"company-profiles__time"],["class","website-link",3,"href",4,"ngIf"],["class","social-media",4,"ngIf"],["class","not-access",4,"ngIf"],[3,"companyId","amsMode",4,"ngIf"],[1,"file-upload-outer"],[1,"file-upload"],[1,"file-upload__box"],[1,"file-upload__img"],["alt","Company Logo","title","Company Logo","width","115","height","115",3,"error","src"],[1,"file-upload__button"],["class","file-upload__edit","labelText","","accept","image/*","uploadMode","useForm",3,"selectButtonText","maxFileSize","allowedFileExtensions","change",4,"ngIf"],["href","javascript:void(0)","class","file-upload__delete","title","Remove Logo",3,"click",4,"ngIf"],["labelText","","accept","image/*","uploadMode","useForm",1,"file-upload__edit",3,"change","selectButtonText","maxFileSize","allowedFileExtensions"],["href","javascript:void(0)","title","Remove Logo",1,"file-upload__delete",3,"click"],["width","9","height","9","viewBox","0 0 9 9","fill","none","xmlns","http://www.w3.org/2000/svg",3,"click"],["d","M8 1L1 8M1 1L8 8","stroke","white","stroke-width","1.8","stroke-linecap","round","stroke-linejoin","round"],[1,"website-link",3,"href"],[1,"social-media"],["class","social-media__icon cursor-pointer",3,"click",4,"ngIf"],[1,"social-media__icon","cursor-pointer",3,"click"],["width","40","height","39","viewBox","0 0 40 39","fill","none","xmlns","http://www.w3.org/2000/svg"],["y","0.5","width","39.4615","height","38","rx","2","fill","#5C5C5C"],["d","M22.1269 17.9994L29.3146 9.26953H26.1065L20.6205 15.9369L15.7536 9.26953H8.76953L16.9187 20.4313L9.26019 29.7311H12.4693L18.4251 22.4979L23.7085 29.7311
1H30.6926L22.1269 17.9994ZM19.6423 21.0175L18.1338 18.9519L12.2772 10.9341H14.6888L19.4158 17.3969L20.9222 19.4635L27.2048 28.0665H24.7932L19.6423 21.0175Z","fill","white"],["d","M36.5771 0.500266H3.34474C2.97118 0.495241 2.60025 0.561535 2.25314 0.695362C1.90604 0.829189 1.58955 1.02793 1.32176 1.28023C1.05396 1.53253 0.840111 1.83345 0.692411 2.1658C0.54471 2.49815 0.466055 2.85543 0.460938 3.21723V35.7828C0.466055 36.1446 0.54471 36.5018 0.692411 36.8342C0.840111 37.1665 1.05396 37.4675 1.32176 37.7198C1.58955 37.9721 1.90604 38.1708 2.25314 38.3046C2.60025 38.4385 2.97118 38.5048 3.34474 38.4997H36.5771C36.9507 38.5048 37.3216 38.4385 37.6687 38.3046C38.0158 38.1708 38.3323 37.9721 38.6001 37.7198C38.8679 37.4675 39.0818 37.1665 39.2295 36.8342C39.3772 36.5018 39.4558 36.1446 39.4609 35.7828V3.21723C39.4558 2.85543 39.3772 2.49815 39.2295 2.1658C39.0818 1.83345 38.8679 1.53253 38.6001 1.28023C38.3323 1.02793 38.0158 0.829189 37.6687 0.695362C37.3216 0.561535 36.9507 0.495241 36.5771 0.500266ZM12.2904 32.3058H6.4051V15.2061H12.2904V32.3058ZM9.34776 12.8121C8.5361 12.8121 7.75768 12.4998 7.18375 11.944C6.60983 11.3881 6.2874 10.6342 6.2874 9.84813C6.2874 9.06204 6.60983 8.30815 7.18375 7.7523C7.75768 7.19645 8.5361 6.88418 9.34776 6.88418C9.77875 6.83684 10.2152 6.8782 10.6285 7.00555C11.0419 7.13291 11.4228 7.34338 11.7463 7.62319C12.0699 7.90301 12.3287 8.24585 12.506 8.62927C12.6832 9.01269 12.7748 9.42804 12.7748 9.84813C12.7748 10.2682 12.6832 10.6836 12.506 11.067C12.3287 11.4504 12.0699 11.7933 11.7463 12.0731C11.4228 12.3529 11.0419 12.5634 10.6285 12.6907C10.2152 12.8181 9.77875 12.8594 9.34776 12.8121ZM33.5168 32.3058H27.6315V23.129C27.6315 20.83 26.7879 19.329 24.6496 19.329C23.9878 19.3337 23.3434 19.5347 22.8032 19.905C22.263 20.2753 21.853 20.7971 21.6284 21.4C21.4749 21.8465 21.4084 22.3168 21.4323 22.787V32.2868H15.547V15.1871H21.4323V17.6C21.9669 16.7015 22.7445 15.9613 23.6813 15.4591C24.6181 14.9569 25.6786 14.7118 26.7487 14.7501C30.6722 14.7501 33.5168 17.201 33.5168 22.464V32.3058Z","fill","#5C5C5C"],["class","single-block",4,"ngIf"],[3,"getCompanyDetails","orgStructureClicked","companyInfo","companyPageControls","organizationType","companyType","status"],[1,"boxs"],[3,"isCompanyProfile"],[3,"isMembershipShownInCataloge","companyId"],[3,"getCompanyDetails","companyDemographics","companyId"],[3,"getCompanyDetails","companyInfo","addressType","companyAddresses","companyPageControls","country","state","status"],[3,"getCompanyDetails","companyInfo","phoneType","companyPageControls","companyPhones","country"],[3,"getCompanyDetails","companyId","companyInfo","companyPageControls","affiliationRoles","permissionRoles"],[3,"companyId","companyInfo","companyPageControls"],[3,"companyId"],[1,"not-access"],[3,"companyId","amsMode"]],template:function(o,t){o&1&&(y(0,"app-header")(1,"app-menu"),r(2,"div",2)(3,"dx-scroll-view",3)(4,"div",4)(5,"div",5)(6,"div",6)(7,"div",7),u(8,zp,9,3,"div",8),s(),r(9,"div",9),y(10,"div",10),r(11,"h1",11),f(12),s(),u(13,qp,3,5,"h3",12),r(14,"div",13)(15,"span",14),f(16," (ID: "),r(17,"strong"),f(18),s(),f(19,") "),s(),r(20,"span",15)(21,"span"),f(22,"Last Updated Date:"),s(),f(23),Xt(24,"date"),s(),r(25,"span",16),f(26),Xt(27,"date"),r(28,"span"),f(29,"EST"),s()()(),u(30,jp,2,2,"a",17)(31,Zp,3,2,"div",18),s()()(),u(32,im,15,14,"ng-container",12)(33,om,2,0,"div",19),s()()(),u(34,nm,2,2,"app-company-hierarchy-popup",20)),o&2&&(n(8),a("ngIf",t.IsVisible("CompanyLogo")),n(4),T(t.companyInfo==null?null:t.companyInfo.companyName),n(),a("ngIf",t.companyInfo==null?null:t.companyInfo.joinDate),n(5),T(t.companyInfo==null?null:t.companyInfo.organizationId),n(5),O(" ",Jt(24,11,t.companyInfo==null?null:t.companyInfo.dateTimeLastModified,"MM/dd/yyyy")," "),n(3),O(" ",Jt(27,14,t.companyInfo==null?null:t.companyInfo.dateTimeLastModified,"h:mm a")," "),n(4),a("ngIf",(t.companyInfo==null?null:t.companyInfo.effectiveEmailDomain)||(t.companyInfo==null?null:t.companyInfo.emailDomain)),n(),a("ngIf",(t.companyInfo==null?null:t.companyInfo.twitterHandle)||(t.companyInfo==null?null:t.companyInfo.linkedInProfile)),n(),a("ngIf",t.checkCompanyLevelPermission("View Company Information")),n(),a("ngIf",!t.checkCompanyLevelPermission("View Company Information")),n(),a("ngIf",t.companyId>0))},dependencies:[Y,J,si,$,pe,xo,Xo,_n,gn,bn,In,Mn,Ln,Fn,zn,qn,mn,pn,dn,se,de,me,ce,ue,fe,ye,Ce,he,_e,xe,ge,ve,be,Ie,we,Me,De,Pe,Te,Se,Ae,Ee,Bo,Ve,Le,ke,Re,Oe,Be,Ge,Fe,Ne,We,ze,qe,je,He,Ue,Ze,Qe,Ke,Xe,Je,Ye,$e,et,tt,it,ot,Vt,nt,at,rt,lt,st,dt,pt,mt,ct,ut,ft,yt,Ct,ht,_t,gt,vt,bt,xt,oe,le,re,ae,ne,ie,te],styles:[".changes-password[_ngcontent-%COMP%]{position:absolute;top:0;right:0;background-color:var(--yellow-color);color:var(--black-color)!important;display:flex;align-items:center;padding:1.2rem 2rem;border-radius:5px;font:var(--font-weight-600) var(--font-14) var(--font-family)}.changes-password[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{margin-right:.8rem}.changes-password[_ngcontent-%COMP%]:hover{opacity:.8;color:var(--black-color)!important}@media (max-width: 1600px){.changes-password[_ngcontent-%COMP%]{right:4rem}}.single-block[_ngcontent-%COMP%]{width:100%;margin:0 0 2rem;position:relative}.two-column-block[_ngcontent-%COMP%]{width:100%;margin:0 0 2rem;-ms-display:flex;-webkit-display:flex;-moz-display:flex;display:flex;position:relative}@media (max-width: 992px){.two-column-block[_ngcontent-%COMP%]{-webkit-flex-wrap:wrap;flex-wrap:wrap}}.two-column-block__left[_ngcontent-%COMP%]{width:calc(100% - 470px);margin-right:2rem}@media (max-width: 992px){.two-column-block__left[_ngcontent-%COMP%]{width:calc(100% + -0px);margin-right:0;margin-bottom:2rem}}.two-column-block__right[_ngcontent-%COMP%]{width:450px}@media (max-width: 992px){.two-column-block__right[_ngcontent-%COMP%]{width:100%}}
1.two-column-block[_ngcontent-%COMP%] .boxs[_ngcontent-%COMP%]{width:100%;margin-bottom:2rem;position:relative}.two-column-block[_ngcontent-%COMP%] .boxs[_ngcontent-%COMP%]:last-child{margin-bottom:0}.about-me[_ngcontent-%COMP%]{width:100%;margin:0;padding:2rem 0;-ms-display:flex;-webkit-display:flex;-moz-display:flex;display:flex}@media (max-width: 767px){.about-me[_ngcontent-%COMP%]{-webkit-flex-wrap:wrap;flex-wrap:wrap}}.about-me__left[_ngcontent-%COMP%]{width:300px}@media (max-width: 767px){.about-me__left[_ngcontent-%COMP%]{width:190px;margin:0 auto}}.about-me__left[_ngcontent-%COMP%] .file-upload__box[_ngcontent-%COMP%]{width:190px;height:190px}.about-me__left[_ngcontent-%COMP%] .file-upload__box[_ngcontent-%COMP%] .file-upload__edit[_ngcontent-%COMP%]{right:12px;bottom:20px}.about-me__left[_ngcontent-%COMP%] .file-upload__img[_ngcontent-%COMP%]{width:190px;height:190px}.about-me__left[_ngcontent-%COMP%] .file-upload__img[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;margin-bottom:-1px}.about-me__right[_ngcontent-%COMP%]{width:100%;position:relative}@media (max-width: 767px){.about-me__right[_ngcontent-%COMP%]{text-align:center}}.about-me__right[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{display:block;margin-bottom:1rem;text-transform:capitalize}.about-me__right[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:block;font:var(--h3-font);color:var(--member-primary-color);margin-bottom:1rem;text-transform:capitalize}.about-me__right[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{display:block;font:var(--h4-font);color:var(--body-color);margin-bottom:2.4rem;text-transform:capitalize}.about-me__right[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:block;font:var(--font-weight-400) var(--font-15) var(--font-family)}.about-me__right[_ngcontent-%COMP%] .readmore-btn[_ngcontent-%COMP%]{width:100%;margin-bottom:1.5rem}.about-me__right[_ngcontent-%COMP%] .readmore-btn[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{display:inline-flex;-webkit-align-items:center;align-items:center;font:var(--font-weight-500) var(--font-15) var(--font-family);justify-content:flex-start}.about-me__right[_ngcontent-%COMP%] .readmore-btn[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{margin-left:1rem}.file-upload__delete[_ngcontent-%COMP%]{right:78px!important}.action-btn[_ngcontent-%COMP%]{-ms-display:flex;-webkit-display:flex;-moz-display:flex;display:flex}.action-btn[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{height:30px!important;min-width:inherit;margin:0 1.5rem 0 0;padding:0 1.5rem}.action-btn[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:last-child{margin-right:0}.dx-popup-content-block[_ngcontent-%COMP%]{margin-bottom:1rem!important}.top-buttons[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.top-buttons[_ngcontent-%COMP%] .changes-password[_ngcontent-%COMP%]{position:relative;top:inherit;right:inherit}.switch-profile-company[_ngcontent-%COMP%]{background-color:var(--member-primary-color);color:var(--white-color);display:inline-flex;align-items:center;padding:1.3rem 2rem;border-radius:5px;font:var(--font-weight-600) var(--font-14) var(--font-family);margin-right:1.5rem;width:auto;min-height:42px}.switch-profile-company[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{margin-right:.8rem}.switch-profile-company[_ngcontent-%COMP%]:hover{opacity:.8;color:var(--white-color)!important}.switch-profile-company.manage-permission-link[_ngcontent-%COMP%]{background-color:#219ebc}.company-profiles[_ngcontent-%COMP%]{width:100%;margin:0;padding:1rem 0;-ms-display:flex;-webkit-display:flex;-moz-display:flex;display:flex;-webkit-align-items:center;align-items:center}@media (max-width: 600px){.company-profiles[_ngcontent-%COMP%]{-webkit-flex-wrap:wrap;flex-wrap:wrap}}.company-profiles__id[_ngcontent-%COMP%]{margin:0 .6rem 0 0;padding:0;font:var(--font-weight-400) var(--font-13) var(--font-family);color:var(--member-small-text-color)}@media (max-width: 600px){.company-profiles__id[_ngcontent-%COMP%]{width:100%}}.company-profiles__id[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--member-black-color)}.company-profiles__last-update[_ngcontent-%COMP%]{margin:0 .6rem 0 0;padding:0;font:var(--font-weight-400) var(--font-13) var(--font-family);color:var(--member-black-color)}@media (max-width: 600px){.company-profiles__last-update[_ngcontent-%COMP%]{width:100%;padding:.5rem 0}}
1.company-profiles__last-update[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(-member-grey-light1-color)}.company-profiles__time[_ngcontent-%COMP%]{margin:0;padding:0;font:var(--font-weight-400) var(--font-13) var(--font-family);color:var(--member-small-text-color)}@media (max-width: 600px){.company-profiles__time[_ngcontent-%COMP%]{width:100%}}.company-profiles__time[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{border-left:1px solid var(--border-lighter);padding-left:.5rem;margin-left:.5rem}.website-link[_ngcontent-%COMP%]{display:inline-block}.social-media[_ngcontent-%COMP%]{width:100%;-ms-display:flex;-webkit-display:flex;-moz-display:flex;display:flex;-webkit-align-items:center;align-items:center;padding-top:1.5rem}@media (max-width: 992px){.social-media[_ngcontent-%COMP%]{justify-content:center}}.social-media__icon[_ngcontent-%COMP%]{margin-right:1.5rem}.not-access[_ngcontent-%COMP%]{border:1px solid #ddd;text-align:center;display:flex;align-items:center;justify-content:center;border-radius:5px;padding:2rem 0;font-weight:600}.hierarchy-section__toolbar[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-bottom:.75rem}.org-structure-btn[_ngcontent-%COMP%]{background-color:var(--member-primary-color);color:var(--white-color)!important;display:inline-flex;align-items:center;justify-content:center;padding:.9rem 1.6rem;border-radius:5px;font:var(--font-weight-600) var(--font-14) var(--font-family);min-height:42px;text-decoration:none;text-transform:capitalize;cursor:pointer}.org-structure-btn[_ngcontent-%COMP%]:hover{opacity:.8;color:var(--white-color)!important}"]})}}return i})();export{Qf as CompanyProfileComponent};
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.