1import{a as T}from"./chunk-UAVCNDR5.js";import{a as I}from"./chunk-SBA3PZVH.js";import{B as R,H as ve,S as O,b as w,ha as Se,ia as we,n as b,o as _e}from"./chunk-ZCGMG3XZ.js";import{$e as Ce,Ac as W,Bc as le,Bf as xe,Cb as ee,Cc as pe,Da as D,Dc as me,Ea as _,Eb as te,Fa as P,H as B,I as U,Ia as Q,Ja as Z,Jb as ie,K as L,Ka as J,M as u,N as C,Ob as re,Pa as r,Tb as ne,Ua as K,Va as X,Wa as Y,X as q,Xe as fe,Za as y,Ze as he,_ as c,_e as ue,bc as oe,cc as se,dc as ae,ea as d,ec as H,fa as v,ff as ge,ga as A,hf as Pe,ja as z,ka as g,oe as ce,qb as x,t as k,ta as m,ua as s,va as a,ve as V,wa as h,zc as S,ze as de,zf as ye}from"./chunk-KIFPKG25.js";var N=(()=>{let i=class i extends me{constructor(e,t,o,l){super(e,t,o,l),this.http=e,this.userContext=t,this.notificationService=o,this.appSettingsService=l}getSystemPreferencesById(e){return this.getAction(`${this.appSettingsService.preferenceApiHostUrl}/systemPreferences/${e}`)}};i.\u0275fac=function(t){return new(t||i)(L(ee),L(S),L(le),L(pe))},i.\u0275prov=B({token:i,factory:i.\u0275fac});let n=i;return n})();function Me(n,i){if(n&1&&(s(0,"div",3),r(1,` 2 `),h(2,"ppw-tabs",4),r(3,` 3 4 `),s(4,"div",5),r(5,` 5 `),h(6,"router-outlet"),r(7,` 6 `),a(),r(8,` 7 `),a()),n&2){let f=P();c(2),m("tabs",f.tabs)("isPrimary",!0)("isPSL",!0)("showActiveIndicator",!1)("showCloseAll",!1)}}function Ue(n,i){n&1&&h(0,"pps-loader")}var G=(()=>{let i=class i{constructor(e,t,o,l,p){if(this._route=e,this._userContextService=t,this.titleService=o,this.preferenceContext=l,this.router=p,this.loaded=!1,this.IsCore=!1,this.tabs=[],this.preferencesReady=!1,this.showLoader=!1,this.selectedPage=E.Contact,this.firmUrlName=e.snapshot.params.firmName,this._userContextService.userContext.firmId===firmID||this._userContextService.userContext.firmUrlName===this.firmUrlName)this.firmName=t.userContext.firmName,this.selectPage(this._route.firstChild?.routeConfig?.path||"contact"),this.IsCore=!t.hasPermissions("PSL Enabled"),t.permissionsUpdated.subscribe(F=>{this.IsCore=!t.hasPermissions("PSL Enabled")});else{window.location.href=window.location.origin+"/"+this.firmUrlName+"/login?returnUrl="+window.location.pathname;return}}ngOnInit(){}onPreferencesLoaded(e){e&&e.length>0&&(this.preferencesReady=!0,this.prepareNav())}prepareNav(){this.showContactUs&&this.tabs.push({Id:"contact",Route:`/${this.firmUrlName}/helpcontact/contact`,Title:"Contact Us",Selected:this.isActiveTab(`/${this.firmUrlName}/helpcontact/contact`),Closable:!1}),this.tabs.push({Id:"userpreference",Route:`/${this.firmUrlName}/helpcontact/userpreference`,Title:"User Preferences",Selected:this.isActiveTab(`/${this.firmUrlName}/helpcontact/userpreference`),Closable:!1})}isActiveTab(e){return e==this.router.url}selectPage(e){switch(e.toLowerCase()){case"contact":this.selectedPage=E.Contact;break;case"userpreference":this.selectedPage=E.Preference;break}this.titleService.setTitle(xe.setPSLTitle(this.title()))}title(){let e="";switch(this.selectedPage){case E.Contact:e="Contact Us";break;case E.Preference:e="User Preferences";break}return e}get showContactUs(){return this._userContextService.hasPermissions("File Storage","PSL Enabled")}};i.\u0275fac=function(t){return new(t||i)(d(oe),d(S),d(te),d(_e),d(ae))},i.\u0275cmp=v({type:i,selectors:[["ng-component"]],standalone:!1,features:[y([T,w,I,N])],decls:8,vars:2,consts:[[3,"preferencesLoaded"],["class","help-layout",4,"ngIf"],[4,"ngIf"],[1,"help-layout"],[3,"tabs","isPrimary","isPSL","showActiveIndicator","showCloseAll"],[1,"route-container"]],template:function(t,o){t&1&&(r(0,` 8`),s(1,"psl-simple-layout",0),_("preferencesLoaded",function(p){return o.onPreferencesLoaded(p)}),r(2,` 9 `),g(3,Me,9,5,"div",1),r(4,` 10 `),g(5,Ue,1,0,"pps-loader",2),r(6,` 11`),a(),r(7,` 12`)),t&2&&(c(3),m("ngIf",o.preferencesReady),c(2),m("ngIf",o.showLoader))},dependencies:[se,x,fe,b,Se],encapsulation:2});let n=i;return n})(),E=(function(n){return n[n.Contact=0]="Contact",n[n.Preference=1]="Preference",n})(E||{});var Ae=["contactsGrid"];function Ve(n,i){n&1&&h(0,"pps-loader")}var $=(()=>{let i=class i extends ve{constructor(e,t,o){super(),this._contactService=e,this._preferenceService=t,this.formatPhoneNumber=o,this.showLoader=!1,this.message="",this._preferenceService.getHelpText().subscribe(l=>{this.message=l.Value})}ngOnInit(){this.showLoader=!0,this.groupLockGroupColumns=1,this.gridOptions.defaultGroupedColumns=["PlanName"],this.gridViewType=ge.Grouped,super.ngOnInit()}getGrid(){return this.contactsGrid}prepareGridColumns(){this.gridColumns=[{field:"PlanName",headerName:"Plan Name",flex:1,width:200,minWidth:200,lockVisible:!0,groupable:!0},{field:"ContactInfo",headerName:"Contact",flex:1,width:400,minWidth:400,lockVisible:!0,cellRenderer:this.getHTMLContent.bind(this)},{field:"AddressInfo",headerName:"Address",width:300,minWidth:300,cellRenderer:this.getHTMLContent.bind(this)},{field:"NumberInfo",headerName:"Phone",width:300,minWidth:300,cellRenderer:this.getHTMLContent.bind(this)},{field:"EmailInfo",headerName:"Email",width:300,minWidth:300,cellRenderer:this.getHTMLContent.bind(this)}]}getGridDataResult(){return this._contactService.getWebContactDetails().pipe(k(e=>{let t=e,o=[];return t!=null&&t.length>0&&t.forEach(l=>
12{l.WebContactDetails.forEach(p=>{p.PlanName=l.PlanName,p.ContactInfo=this.setContactInfo(p),p.AddressInfo=this.setAddressInfo(p),p.NumberInfo=this.setNumberInfo(p),p.EmailInfo=this.setEmailInfo(p),o.push(p)})}),{data:o,total:e.TotalCount}}))}onDataRendered(){super.onDataRendered(),setTimeout(()=>{this.contactsGrid.gridApi.expandAll()}),this.showLoader=!1}setContactInfo(e){return`<h4>${e.FirstName} ${e.LastName}</h4>${e.Roles}`}setAddressInfo(e){let t="";return e.CompanyName&&(t+=`<strong>${e.CompanyName}<br /></strong>`),e.Address1!=null&&e.Address1.trim()!=""&&(t+=`<span>${e.Address1}<br /></span>`),e.Address2!=null&&e.Address2.trim()!=""&&(t+=`<span>${e.Address2}<br /></span>`),e.City!=null&&e.City.trim()!=""&&(t+=`<span>${e.City} </span>`),e.State!=null&&e.State.trim()!=""&&(t+=`<span>${e.State} </span>`),e.Zipcode!=null&&e.Zipcode.trim()!=""&&(t+=`<span>${e.Zipcode}</span>`),t}setNumberInfo(e){let t="";return e.PhoneNumber!=null&&e.PhoneNumber.trim()!=""&&(t+=`<div>${this.formatPhoneNumber.transform(e.PhoneNumber)}`,e.PhoneNumberExtension!=null&&e.PhoneNumberExtension.trim()!=""&&(t+=` Ext: ${e.PhoneNumberExtension}`),t+="</div>"),t}setEmailInfo(e){let t="";return e.EmailAddress!=null&&e.EmailAddress.trim()!=""&&(t+=`<a href="mailto:${e.EmailAddress}">${e.EmailAddress}</a>`),t}getHTMLContent(e){if(e.value){let t=document.createElement("div");return t.innerHTML=e.value,t}}};i.\u0275fac=function(t){return new(t||i)(d(T),d(w),d(R))},i.\u0275cmp=v({type:i,selectors:[["ng-component"]],viewQuery:function(t,o){if(t&1&&Q(Ae,5),t&2){let l;Z(l=J())&&(o.contactsGrid=l.first)}},standalone:!1,features:[y([T,w,R]),z],decls:14,vars:5,consts:[["contactsGrid",""],[1,"help-container"],[3,"title"],[1,"help-content","help-content--contact"],[1,"message",3,"innerHtml"],[3,"ready","selectedData","dataRendered","onRefresh","onGetAllRecords","gridOptions","hasHoverButtons"],[4,"ngIf"]],template:function(t,o){if(t&1){let l=D();s(0,"div",1),r(1,` 13 `),h(2,"ppw-title-bar",2),r(3,` 14 15 `),s(4,"div",3),r(5,` 16 `),h(6,"p",4),r(7,` 17 `),s(8,"ppw-ag-grid",5,0),_("ready",function(){return u(l),C(o.onReady())})("selectedData",function(F){return u(l),C(o.onSelection(F))})("dataRendered",function(){return u(l),C(o.onDataRendered())})("onRefresh",function(){return u(l),C(o.onRefresh())})("onGetAllRecords",function(){return u(l),C(o.onGetAllRecords())}),a(),r(10,` 18 19 `),a(),r(11,` 20`),a(),r(12,` 21`),g(13,Ve,1,0,"pps-loader",6)}t&2&&(c(2),m("title","Contact Us"),c(4),m("innerHtml",o.message,q),c(2),m("gridOptions",o.gridOptions)("hasHoverButtons",!1),c(5),m("ngIf",o.contentLoading))},dependencies:[x,V,Pe,b],encapsulation:2});let n=i;return n})();var j=class extends ye{};function Re(n,i){if(n&1){let f=D();s(0,"div",10),r(1,` 22 `),s(2,"ppw-input-select",11),Y("ngModelChange",function(t){u(f);let o=P(2);return X(o.dataDisplayType.PreferenceValue,t)||(o.dataDisplayType.PreferenceValue=t),C(t)}),_("onChange",function(){u(f);let t=P(2);return C(t.canSave=!0)}),a(),r(3,` 23 `),a()}if(n&2){let f=P(2);c(2),m("appearance","fill"),K("ngModel",f.dataDisplayType.PreferenceValue),m("data",f.displayTypes)("required",!0)}}function Oe(n,i){if(n&1&&(r(0,` 24 `),s(1,"tr"),r(2,` 25 `),s(3,"td",8),r(4,` 26 `),s(5,"span"),r(6,"Data Display Type"),a(),r(7,` 27 `),a(),r(8,` 28 `),s(9,"td"),r(10,` 29 `),g(11,Re,4,4,"div",9),r(12,` 30 `),a(),r(13,` 31 `),a(),r(14,` 32 `),r(15,` 33 `)),n&2){let f=P();c(11),m("ngIf",f.dataDisplayType)}}function je(n,i){if(n&1){let f=D();s(0,"div",12),r(1,` 34 `),s(2,"ppw-button",13),_("click",function(){u(f);let t=P();return C(t.savePreference())}),r(3,"Save"),a(),r(4,` 35 `),a()}if(n&2){let f=P();c(2),m("disabled",!f.canSave)}}function He(n,i){n&1&&h(0,"pps-loader")}var Ne=(()=>{let i=class i{constructor(e,t,o){this._userPreferenceService=e,this._userContextService=t,this._systemPreferenceService=o,this.displayTypes=["Filters","Grouped","Search"],this.dataDisplayType=null,this.canSave=!1,this.userPreferenceErrors=[],this.showLoader=!0}ngOnInit(){this.pageSizes=this._userPreferenceService.pageSizes,this._userPreferenceService.getUserPreferencesByContactId(this._userContextService.userContext.contactId,[O.PSLDataDisplayType]).subscribe(e=>{for(let t of e)t.SystemPreferenceId===O.PSLDataDisplayType&&(this.dataDisplayType=t);this.dataDisplayType===null?this._systemPreferenceService.getSystemPreferencesById(O.PSLDataDisplayType).subscribe(t=>{this.model=new j,this.model.ContactId=this._userContextService.userContext.contactId,this.model.PreferenceValue=t.DefaultValue,this.model.SystemPreferenceId=t.Id,this._userPreferenceService.saveUserPreference(this.model).subscribe(o=>{this.dataDisplayType=o,this.showLoader=!1},o=>{o instanceof W&&(this.userPreferenceErrors=o.Errors),this.showLoader=!1})}):this.showLoader=!1})}savePreference(){this.showLoader=!0,this._userPreferenceService.saveUserPreference(this.dataDisplayType).subscribe(e=>{this.canSave=!1,this.dataDisplayType=e,this.showLoader=!1},e=>{e instanceof W&&(this.userPreferenceErrors=e.Errors),this.showLoader=!1})}};i.\u0275fac=function(t){return new(t||i)(d(I),d(S),d(N))},i.\u0275cmp=v({type:i,selectors:[["ng-component"]],standalone:!1,features:[y([I,N])],decls:23,vars:3,consts:[[1,"help-container"],[3,"title"],[1,"help-content"],["label","Preference Name","width","300px","minWidth","300px"],["label","Value","minWidth","400px"],["ppwTableColumns",""],["class","actions","style","display: flex; align-items: center; height: 70px; justify-content: center; margin-top: 10px;",4,"ngIf"],[4,"ngIf"],[1,"label"],["class","field-container",4,"ngIf"],[1,"field-container"],["name","DataDisplayType",3,"ngModelChange","onChange","appearance","ngModel","data","required"],[1,"actions",2,"display","flex","align-items","center","height","70px","justify-content","center","margin-top","10px"],["title","Save Preference",3,"click","disabled"]],template:function(t,o){t&1&&(s(0,"div",0),r(1,` 36 `),h(2,"ppw-title-bar",1),r(3,` 37 `),s(4,"div",2),r(5,` 38 `),s(6,"div"),r(7,` 39 `),s(8,"ppw-table"),r(9,` 40 `),h(10,"ppw-table-column",3),r(11,` 41 `),h(12,"ppw-table-column",4),r(13,` 42 43 `),g(14,Oe,16,1,"ng-template",5),r(15,` 44 `),a(),r(16,` 45 `),a(),r(17,` 46 47 `),g(18,je,5,1,"div",6),r(19,` 48 `),a(),r(20,` 49`),a(),r(21,` 50`),g(22,He,1,0,"pps-loader",7)),t&2&&(c(2),m("title","User Preferences"),c(16),m("ngIf",o.dataDisplayType!=null),c(4),m("ngIf",o.showLoader))},dependencies:[ie,ne,re,x,ce,de,V,Ce,he,ue,b],styles:["[_nghost-%COMP%] .ppw-table tr td{vertical-align:middle!important}[_nghost-%COMP%] .ppw-table tr td.label{height:60px}[_nghost-%COMP%] .field-container[_ngcontent-%COMP%]{width:400px;position:relative}[_nghost-%COMP%] .field-container[_ngcontent-%COMP%] .mat-mdc-form-field{width:100%}[_nghost-%COMP%] .field-container[_ngcontent-%COMP%] .mat-mdc-form-field .mat-mdc-form-field-infix{width:100%}[_nghost-%COMP%] .field-container[_ngcontent-%COMP%] .mat-mdc-form-field-subscript-wrapper{display:none}[_nghost-%COMP%] .field-container[_ngcontent-%COMP%] .ppw-input-error{margin:.5rem 1rem .25rem}[_nghost-%COMP%] .field-container[_ngcontent-%COMP%] .required[_ngcontent-%COMP%]{color:#f44336;position:absolute;top:5px;left:405px;font-size:16px}"]});let n=i;return n})();var We=[{path:"",component:G,children:[{path:"",component:$},{path:"contact",component:$},{path:"userpreference",component:Ne},{path:"**",redirectTo:""}]},{path:"",component:G}],Ee=(()=>{let i=class i{};i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=A({type:i}),i.\u0275inj=U({imports:[H.forChild(We),H]});let n=i;return n})();var At=(()=>{let i=class i{};i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=A({type:i}),i.\u0275inj=U({imports:[Ee,we]});let n=i;return n})();export{At as HelpModule};
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.