1import{b as He}from"./chunk-EQ7GNPUY.js";import{a as yt,b as wt}from"./chunk-G3NJR4ZN.js";import{Jb as xt,Lb as $e,Tb as gt,h as Fe,kb as vt,l as pt,na as k,oa as I,qa as ft,ra as _t,rb as Pe,s as dt,ta as Dt,tb as Ne}from"./chunk-JQAS4NFY.js";import{a as he,b as ye}from"./chunk-O3U3CUHU.js";import{$a as y,$b as c,$e as ot,Ad as Je,Ae as re,Bc as je,Bd as Ke,Bi as st,Cd as Xe,Ch as Q,Ci as mt,Db as ee,Dh as rt,Eb as s,Ee as le,Ei as ut,Fb as _,Fh as lt,Fi as ht,Gb as u,Id as Ze,Jd as et,Kd as tt,Ld as it,Lf as E,Md as ze,N as q,Ne as ce,Oa as n,Ob as j,Q as Ge,Qh as Ce,R as v,Rh as fe,Sh as _e,Ta as Y,Te as se,U as T,Ub as te,Uh as De,V as B,Va as R,Vb as M,Wa as W,We as me,Xd as U,_b as l,_e as pe,_h as ve,ac as F,ad as qe,ai as xe,bf as de,cf as ue,ci as ge,db as x,df as H,ef as G,fb as g,fi as N,hb as J,ib as K,id as Ye,if as at,ii as we,jb as X,ji as Se,k as P,kb as d,ki as be,l as O,lb as o,mb as a,mi as Te,nb as D,ni as Be,oc as ie,pb as S,pi as ke,pj as Ct,qb as b,qd as We,qe as oe,qi as Ie,re as nt,sb as L,si as Ee,tb as f,tc as V,ti as Le,ub as C,vi as Me,wb as Z,xb as $,xc as ne,xe as ae,yb as A,ye as z,zb as Qe,zi as ct}from"./chunk-5O24QCRC.js";function Ft(t,p){t&1&&(o(0,"div",1)(1,"button",3),s(2),l(3,"translate"),a(),o(4,"button",4),s(5),l(6,"translate"),a()()),t&2&&(n(2),_(c(3,2,"keywords.documents")),n(3),_(c(6,4,"keywords.client")))}function Pt(t,p){t&1&&(o(0,"div",1)(1,"button",4),s(2),l(3,"translate"),a()()),t&2&&(n(2),_(c(3,1,"keywords.documents")))}var kt=(()=>{class t{constructor(e,r,i){this._clinicService=e,this._headerService=r,this._authService=i,this.hideClinicDropdown=!1,this.skipLinks=["catalogue"],this.allSubscriptions=new O}ngOnInit(){this.allSubscriptions.add(this._clinicService.$clinicObservable.subscribe(e=>{this.clinicId=e.clinicID,this.createHeaderForm(e)},e=>console.log("list clients menu",e))),this.isClient$=this._authService.isClient()}ngOnDestroy(){this.allSubscriptions.unsubscribe(),this._headerService.reset()}createHeaderForm(e){if(!e)return;let r=[];e.clinicPhones.length>0&&r.push({label:"phone",type:"phone",value:e.clinicPhones[0]?.phone,hasMultipleValues:e.clinicPhones.length>1,valueList:e.clinicPhones.length>1?e.clinicPhones.map(m=>m.phone):void 0}),e.clinicEmails.length>0&&r.push({label:"emailAddress",type:"email",value:e.clinicEmails[0]?.emailAddress,hasMultipleValues:e.clinicEmails.length>1,valueList:e.clinicEmails.length>1?e.clinicEmails.map(m=>m.emailAddress):void 0}),e.clinicAddresses.length>0&&r.push({label:"address",type:"address",value:e.clinicAddresses[0]?.formattedAddress,hasMultipleValues:e.clinicAddresses.length>1,valueList:e.clinicAddresses.length>1?e.clinicAddresses.map(m=>m?.formattedAddress):void 0});let i={title:e.clinicName,info:r,showHeaderInfoFor:"clinic"};this._headerService.updateValue(i)}static{this.\u0275fac=function(r){return new(r||t)(Y(Q),Y(dt),Y(U))}}static{this.\u0275cmp=R({type:t,selectors:[["app-drive-container"]],standalone:!1,decls:7,vars:6,consts:[["mat-tab-nav-bar","",1,"marginBettwenCardsDashboard","mt-30"],["fxLayout","row","fxLayoutGap","5px"],[1,"example-card","marginBettwenCardsDashboard","mat-card-2"],["mat-raised-button","","id","drive","routerLink","documents","routerLinkActive","mat-tab-link-active",1,"primary-button","extra-long-large"],["mat-raised-button","","id","drive","routerLink","client-documents","routerLinkActive","mat-tab-link-active",1,"primary-button","extra-long-large"]],template:function(r,i){r&1&&(o(0,"nav",0),x(1,Ft,7,6,"div",1),l(2,"async"),x(3,Pt,4,3,"div",1),l(4,"async"),a(),o(5,"mat-card",2),D(6,"router-outlet"),a()),r&2&&(n(),g(c(2,2,i.isClient$)?-1:1),n(2),g(c(4,4,i.isClient$)?3:-1))},dependencies:[Ze,tt,it,G,H,nt,rt,ut,V,z],styles:["@media(max-width:599px){.mat-card-2[_ngcontent-%COMP%] .mat-mdc-cell[_ngcontent-%COMP%]{max-width:390px!important}}@media(max-width:400px){.mat-card-2[_ngcontent-%COMP%] .mat-mdc-cell[_ngcontent-%COMP%]{max-width:350px!important}}"]})}}return t})();var Oe=class extends yt{};function Re(t){switch(t.documentType){case E.PDF:return"fas fa-file-pdf";case E.PlainText:return"fas fa-file-alt";case E.Image:return"fas fa-file-image";case E.WordDoc:return"fas fa-file-word";case E.Video:return"fas fa-video";
1case E.Excel:return"fas fa-file-excel";case E.Other:return t.isExternal?"fas fa-link":"fas fa-question";default:return"fas fa-question"}}var jt=["searchBar"],qt=t=>({"mb-5":t}),Yt=t=>({invisible:t}),Wt=t=>({"blurry-table":t}),Jt=()=>({"pt-30":!0}),Kt=t=>({"disable-pointer-events":t});function Xt(t,p){if(t&1&&(o(0,"mat-option",7),s(1),l(2,"translate"),a()),t&2){let e=p.$implicit;d("value",e.key),n(),u(" ",c(2,2,e.value)," ")}}function Zt(t,p){t&1&&D(0,"div",16)}function ei(t,p){if(t&1&&(o(0,"div",17),s(1),l(2,"pluralTranslate"),a()),t&2){let e=C();n(),u(" ",F(2,1,"keywords.documentsCount",e.docCounter)," ")}}function ti(t,p){if(t&1&&(o(0,"div",20),D(1,"div",50),o(2,"div",51),s(3),l(4,"pluralTranslate"),a()()),t&2){let e=C();d("ngClass.gt-xs",te(5,Jt)),n(3),_(F(4,2,"keywords.documentsCount",e.docCounter))}}function ii(t,p){t&1&&(o(0,"mat-icon"),s(1,"add"),a())}function ni(t,p){t&1&&(o(0,"mat-icon"),s(1,"remove"),a())}function oi(t,p){t&1&&(o(0,"th",52),s(1),l(2,"translate"),a()),t&2&&(n(),u(" ",c(2,1,"keywords.number")," "))}function ai(t,p){if(t&1&&(o(0,"td",53)(1,"div",54),s(2),l(3,"translate"),a(),o(4,"div",55),s(5),a()()),t&2){let e=p.index,r=C();n(2),u(" ",c(3,2,"keywords.number")," "),n(3),_(r.getIndexOfItem(e))}}function ri(t,p){t&1&&(o(0,"th",52),s(1),l(2,"translate"),a()),t&2&&(n(),u("",c(2,1,"keywords.documentName")," "))}function li(t,p){if(t&1){let e=L();o(0,"td",56)(1,"div",54),s(2),l(3,"translate"),a(),o(4,"div",55)(5,"a",57),l(6,"async"),f("click",function(){let i=T(e),m=i.$implicit,h=i.index,w=C();return B(w.previewDocument(m,h))}),D(7,"mat-icon",58),s(8),a()()()}if(t&2){let e=p.$implicit,r=C();d("matTooltip",j(e.documentTitle)),n(2),u(" ",c(3,7,"keywords.documentName")," "),n(3),d("ngClass",M(11,Kt,!c(6,9,r.canPrintDocuments$))),n(2),ee(e.icon_name),n(),u(" ",e.documentTitle," ")}}function ci(t,p){t&1&&(o(0,"th",52),s(1),l(2,"translate"),a()),t&2&&(n(),_(c(2,1,"keywords.documentDate")))}function si(t,p){if(t&1&&(o(0,"td",56),l(1,"date"),o(2,"div",54),s(3),l(4,"translate"),a(),o(5,"div",55),s(6),l(7,"date"),a()()),t&2){let e=p.$implicit,r=C();d("matTooltip",j(F(1,4,e.documentDate,r.selectedClinic==null?null:r.selectedClinic.dateFormatName))),n(3),u(" ",c(4,7,"keywords.documentDate")," "),n(3),u(" ",F(7,9,e.documentDate,r.selectedClinic==null?null:r.selectedClinic.dateFormatName)," ")}}function mi(t,p){t&1&&(o(0,"th",52),s(1),l(2,"translate"),a()),t&2&&(n(),_(c(2,1,"keywords.documentSize")))}function pi(t,p){if(t&1&&(o(0,"td",56)(1,"div",54),s(2),l(3,"translate"),a(),o(4,"div",55),s(5),a()()),t&2){let e=p.$implicit;d("matTooltip",j(e.documentSize)),n(2),u(" ",c(3,4,"keywords.documentSize")," "),n(3),u(" ",e.documentSize," ")}}function di(t,p){t&1&&(o(0,"th",52),s(1),l(2,"translate"),a()),t&2&&(n(),_(c(2,1,"keywords.documentURL")))}function ui(t,p){if(t&1&&(o(0,"td",56)(1,"div",54),s(2),l(3,"translate"),a(),o(4,"div",59),s(5),a()()),t&2){let e=p.$implicit;d("matTooltip",j(e.documentURL)),n(2),u(" ",c(3,4,"keywords.documentURL")," "),n(3),u(" ",e.documentURL," ")}}function hi(t,p){t&1&&(o(0,"th",52),s(1),l(2,"translate"),a()),t&2&&(n(),_(c(2,1,"keywords.isExternal")))}function Ci(t,p){t&1&&(o(0,"mat-icon",60),s(1,"check"),a())}function fi(t,p){if(t&1&&(o(0,"td",53)(1,"div",54),s(2),l(3,"translate"),a(),x(4,Ci,2,0,"mat-icon",60),a()),t&2){let e=p.$implicit;n(2),u(" ",c(3,2,"keywords.isExternal")," "),n(2),g(e.isExternal?4:-1)}}function _i(t,p){t&1&&(o(0,"th",61),s(1),l(2,"translate"),a()),t&2&&(n(),u(" ",c(2,1,"keywords.actions")," "))}function Di(t,p){if(t&1){let e=L();o(0,"td",62)(1,"div",54),s(2),l(3,"translate"),a(),o(4,"div",55)(5,"span")(6,"button",63),l(7,"async"),l(8,"async"),l(9,"translate"),f("click",function(){let i=T(e),m=i.$implicit,h=i.index,w=C();return B(w.previewDocument(m,h))}),o(10,"mat-icon",64),s(11,"visibility"),a()()(),o(12,"span")(13,"button",65),l(14,"async"),l(15,"async"),l(16,"translate"),f("click",function(){let i=T(e).$implicit,m=C();return B(m.downloadDocument(i))}),o(17,"mat-icon",64),s(18,"cloud_download"),a()()(),o(19,"span")(20,"button",66),l(21,"translate"),l(22,"async"),f("click",function(){let i=T(e).$implicit,m=C();return B(m.deleteDocument(i))}),o(23,"mat-icon",67),s(24,"delete_outline"),a()()()()()}if(t&2){let e=p.$implicit,r=C();n(2),u(" ",c(3,7,"keywords.actions")," "),n(4),d("disabled",!c(7,9,r.canPrintDocuments$)||!c(8,11,r.canDownloadDocuments$))("matTooltip",c(9,13,"keywords.preview")),n(7),d("disabled",!c(14,15,r.canPrintDocuments$)||!c(15,17,r.canDownloadDocuments$)||e.isExternal)("matTooltip",c(16,19,"keywords.download")),n(7),d("matTooltip",c(21,21,"keywords.delete"))("disabled",!c(22,23,r.canDeleteDocuments$))}}function vi(t,p){t&1&&D(0,"tr",68)}function xi(t,p){t&1&&D(0,"tr",69)}var It=(()=>{class t{get documentContentTypeList(){return this._enumeratorService.documentContentType}constructor(){this.pageSizeOptions=[5,10,25,100],this.displayedColumns=["position","documentTitle","documentDate","documentSize","documentURL","isExternal","actionButtons"],this.listDocuments=[],this.showLoadingIndicator=!1,this.searchByName="",this.showUploadComponent=!1,this.allSubscriptions=new O,this._clinicService=v(Q),this._clinicDocumentService=v(Dt),this._snackBarTemplate=v(re),this._authService=v(U),this._dialog=v(ce),this._enumeratorService=v(he),this._translateService=v(ae);for(let e=0;
1e<this._clinicDocumentService.noInitElements;e++)this.listDocuments.push(new Oe)}ngOnInit(){this.allSubscriptions.add(this._clinicDocumentService.$paginParamsObservable.subscribe(e=>{this.paging=e,this.startPos=(e.pageNumber-1)*e.pageSize+1,this.docCounter=this.paging.totalCount})),this.allSubscriptions.add(this._clinicService.$clinicObservable.subscribe(e=>{this.clinicID=e.clinicID,this.selectedClinic=e,this.fetchDocuments(this.paging,this.searchByName)})),this.allSubscriptions.add(this.paginator.page.subscribe(e=>{this.paging.pageNumber=e.pageIndex+1,this.paging.pageSize=e.pageSize,this.fetchDocuments(this.paging,this.searchByName)})),this.canUploadDocuments$=this._authService.isFlagClaimTrue(I.documents,k.c_uploadDocuments),this.canDeleteDocuments$=this._authService.isFlagClaimTrue(I.documents,k.c_deleteDocuments),this.canPrintDocuments$=this._authService.isFlagClaimTrue(I.documents,k.c_printDocuments),this.canDownloadDocuments$=this._authService.isFlagClaimTrue(I.documents,k.c_downloadDocuments),this.allSubscriptions.add(this.canPrintDocuments$.subscribe(e=>{this.canPrintDocuments=e})),this.allSubscriptions.add(this.canDownloadDocuments$.subscribe(e=>{this.canDownloadDocuments=e}))}fetchDocuments(e,r){return P(this,null,function*(){this.showLoadingIndicator=!0;let i=new _t;i.documentContentType=this.searchByDocumentType,r&&this.searchByName.length>2?i.searchText=r:this.searchByName.length>=1&&this._snackBarTemplate.errorSnackBar(this._translateService.instant("keywords.youMustEnterAtLeast3Characters"));let m=new le;m.pagingParams=e,m.search=i;let h=yield this._clinicDocumentService.getList(m,this.clinicID).catch(w=>{this.listDocuments=[],this.docCounter=0,this._snackBarTemplate.errorSnackBarGet("List of Clinic Documents",w)});h&&(h.forEach(w=>{w.icon_name=Re(w)}),this.listDocuments=h),this.showUploadComponent=!!(this.listDocuments&&this.listDocuments.length===0||!this.listDocuments),this.showLoadingIndicator=!1})}getIndexOfItem(e){return this.startPos+e}onSearch(e){this.searchByName=e.target.value.trim(),this.fetchDocuments(this.paging,this.searchByName)}onClear(){this.searchByName="",this.fetchDocuments(this.paging,this.searchByName)}onDocumentTypeChange(e){this.searchByDocumentType=e.value,this.fetchDocuments(this.paging,"")}addDocument(){this.showUploadComponent=!this.showUploadComponent}deleteDocument(e){let r=this._translateService.instant("keywords.document"),i=this._translateService.instant("keywords.deleteSelectedDocument"),m=this._translateService.instant("keywords.areYouSureYouWantToDeleteDocument1VALUE",{value:e.documentTitle});this._dialog.open(ye,{width:"500px",data:{title:i,text:m,confirmAction:()=>{this.showLoadingIndicator=!0,this._clinicDocumentService.delete(this.clinicID,e.clinicDocumentID).then(()=>{this.listDocuments.length>1?(this.listDocuments=this.listDocuments.filter(h=>h.clinicDocumentID!=e.clinicDocumentID),this.docCounter--,this.paging.totalCount--,this.showLoadingIndicator=!1):(this.paging.pageNumber=1,this.fetchDocuments(this.paging,this.searchByName)),this._snackBarTemplate.successSnackBarDelete(r)}
1).catch(h=>{this._snackBarTemplate.errorSnackBarDelete(r,h),this.showLoadingIndicator=!1})}}})}saveFiles(e){return P(this,null,function*(){let r=new FormData;e.forEach(i=>{r.append("Files",i,i.name)}),this._clinicDocumentService.create(r,this.clinicID).then(()=>{this.fetchDocuments(this.paging,this.searchByName)}).catch(i=>{this._snackBarTemplate.errorSnackBar(i.error.title)})})}downloadDocument(e){this.canPrintDocuments&&this.canDownloadDocuments&&this._clinicDocumentService.downloadDocument(this.clinicID,e.clinicDocumentID).catch(r=>console.log("download",r))}clearFilters(){this.searchByDocumentType=null,this.searchBar?this.searchBar?.clearSearchFilter():this.fetchDocuments(this.paging,this.searchByName)}ngOnDestroy(){this.allSubscriptions.unsubscribe()}previewDocument(e,r){return P(this,null,function*(){if(e.documentType===E.Other&&e.isExternal===!0){window.open(e.documentURL,"_blank");return}this._dialog.open($e,{width:"60vw",height:"75vh",data:{allDocuments:this.listDocuments,documentToPreviewIndex:r,showNextAndPreviousButtons:!0,clinicID:this.clinicID,clientID:null}})})}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=R({type:t,selectors:[["app-clinic-documents"]],viewQuery:function(r,i){if(r&1&&Z(jt,5)(N,7),r&2){let m;$(m=A())&&(i.searchBar=m.first),$(m=A())&&(i.paginator=m.first)}},standalone:!1,decls:96,vars:70,consts:[["searchBar",""],["menu","matMenu"],["fxLayout","row","fxLayout.xs","column","fxLayoutAlign","start center","fxLayoutGap","10px",1,"header-filter-margin"],["fxFlex","noshrink","fxFlex.gt-sm","200px",1,"width-res",3,"keydown.enter","on-clear","customPlaceholder"],["appearance","outline","fxFlex","noshrink","fxFlex.gt-sm","200px",1,"width-res"],["disableOptionCentering","",3,"selectionChange","value"],[1,"clearOption",3,"value"],[3,"value"],["fxLayout","row","fxLayoutAlign","end center","fxLayoutAlign.lt-md","center center"],["ngClass.gt-xs","mr-20","ngClass.xs","m-20 mt-40",1,"pointer","clear-icon","hover-cancel",3,"click","matTooltip"],[1,"card-radius","p-10"],[3,"on-submit","on-cancel","titleInfo","showUploadComponent"],["fxLayout","row","fxLayoutAlign","space-between center",1,"mat-table-header","padding-table"],["fxLayout","row","fxFlex.xs","60"],["fxHide.gt-xs","","fxLayout","column",1,"mb-20"],[3,"ngClass"],[1,"divider","ml-20"],[1,"light-gray-text","table-responsive-header"],["fxHide.gt-xs","",1,"flex-cell"],["fxHide.xs",""],["fxLayout","row",3,"ngClass.gt-xs"],["fxLayout","column","fxFlex.xs","40"],["fxLayout","row","fxLayoutAlign","center center"],["mat-icon-button","",1,"primary-button","light-buttons",3,"click","matTooltip","disabled"],["mat-icon-button","","color","primary",1,"mat-icon-refresh",3,"click","matTooltip"],[1,"gray-icon","material-icons","hover-refresh"],["mat-icon-button","","color","primary",1,"mat-icon-refresh",3,"matTooltip","matMenuTriggerFor"],["mat-menu-item","",1,"drop-text"],[1,"border"],["fxLayout","column","fxLayoutAlign","center center"],[1,"position-absolute",3,"ngClass"],["mode","indeterminate","diameter","64",1,"loading-indicator"],["fxFill","fill","mat-table","",1,"table-width",3,"dataSource","ngClass"],["matColumnDef","position"],["mat-header-cell","","class","table-title",4,"matHeaderCellDef"],["mat-cell","","class","default",4,"matCellDef"],["matColumnDef","documentTitle"],["mat-cell","","class","default",3,"matTooltip",4,"matCellDef"],["matColumnDef","documentDate"],["matColumnDef","documentSize"],["matColumnDef","documentURL"],["matColumnDef","isExternal"],["matColumnDef","actionButtons"],["mat-header-cell","","class","text-center table-title",4,"matHeaderCellDef"],["mat-cell","","class","text-center",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["fxLayout","row","fxLayoutAlign","end center"],[1,"flex-cell"],["showFirstLastButtons","true",3,"length","pageIndex","pageSize","pageSizeOptions"],[1,"vertical-divider-dashboard"],["fxHide.xs","",1,"light-gray-text"],["mat-header-cell","",1,"table-title"],["mat-cell","",1,"default"],[1,"mat-cell-header"],[1,"mat-cell-value"],["mat-cell","",1,"default",3,"matTooltip"],[1,"curs
1or-pointer-edit",3,"click","ngClass"],[1,"doc-icons"],[1,"mat-cell-value","ml-res-10"],["color","primary",1,"gray-icon","hover-save"],["mat-header-cell","",1,"text-center","table-title"],["mat-cell","",1,"text-center"],["mat-icon-button","","color","warn",3,"click","disabled","matTooltip"],[1,"gray-icon","material-icons","hover-edit"],["mat-icon-button","","color","primary",3,"click","disabled","matTooltip"],["mat-icon-button","","color","warn",3,"click","matTooltip","disabled"],[1,"gray-icon","hover-delete"],["mat-header-row",""],["mat-row",""]],template:function(r,i){if(r&1&&(o(0,"div",2)(1,"app-search-bar",3,0),l(3,"translate"),f("keydown.enter",function(h){return i.onSearch(h)})("on-clear",function(){return i.onClear()}),a(),o(4,"mat-form-field",4)(5,"mat-label"),s(6),l(7,"translate"),a(),o(8,"mat-select",5),f("selectionChange",function(h){return i.onDocumentTypeChange(h)}),o(9,"mat-option",6),s(10),l(11,"translate"),a(),K(12,Xt,3,4,"mat-option",7,J),a()(),o(14,"div",8)(15,"mat-icon",9),l(16,"translate"),f("click",function(){return i.clearFilters()}),s(17,"cancel"),a()()(),o(18,"div",10)(19,"upload-files",11),l(20,"translate"),f("on-submit",function(h){return i.saveFiles(h)})("on-cancel",function(h){return i.showUploadComponent=h}),a()(),o(21,"div",12)(22,"div",13)(23,"div",14)(24,"h2",15),s(25),l(26,"translate"),a(),x(27,Zt,1,0,"div",16),x(28,ei,3,4,"div",17),a(),D(29,"div",18),o(30,"h2",19),s(31),l(32,"translate"),a(),x(33,ti,5,6,"div",20),a(),o(34,"div",21)(35,"div",22)(36,"button",23),l(37,"translate"),l(38,"async"),f("click",function(){return i.addDocument()}),x(39,ii,2,0,"mat-icon"),x(40,ni,2,0,"mat-icon"),a(),o(41,"button",24),l(42,"translate"),f("click",function(){return i.fetchDocuments(i.paging,i.searchByName)}),o(43,"i",25),s(44,"refresh"),a()(),o(45,"button",26),l(46,"translate"),o(47,"i",25),s(48,"more_horiz"),a()(),o(49,"mat-menu",null,1)(51,"button",27),s(52),l(53,"translate"),a(),o(54,"button",27),s(55),l(56,"translate"),a(),o(57,"mat-menu",null,1)(59,"button",27),s(60),l(61,"translate"),a(),o(62,"button",27),s(63),l(64,"translate"),a()()()()()(),o(65,"mat-card-content",28)(66,"div",29)(67,"div",30),D(68,"mat-progress-spinner",31),a(),o(69,"table",32),S(70,33),y(71,oi,3,3,"th",34)(72,ai,6,4,"td",35),b(),S(73,36),y(74,ri,3,3,"th",34)(75,li,9,13,"td",37),b(),S(76,38),y(77,ci,3,3,"th",34)(78,si,8,12,"td",37),b(),S(79,39),y(80,mi,3,3,"th",34)(81,pi,6,6,"td",37),b(),S(82,40),y(83,di,3,3,"th",34)(84,ui,6,6,"td",37),b(),S(85,41),y(86,hi,3,3,"th",34)(87,fi,5,4,"td",35),b(),S(88,42),y(89,_i,3,3,"th",43)(90,Di,25,25,"td",44),b(),y(91,vi,1,0,"tr",45)(92,xi,1,0,"tr",46),a()()(),o(93,"div",47)(94,"div",48),D(95,"mat-paginator",49),a()()),r&2){let m=Qe(50);n(),d("customPlaceholder",c(3,34,"keywords.searchDocuments")),n(5),_(c(7,36,"keywords.filterByDocumentType")),n(2),d("value",i.searchByDocumentType),n(),d("value",null),n(),u(" ",c(11,38,"keywords.filterByDocumentType")," "),n(2),X(i.documentContentTypeList),n(3),d("matTooltip",c(16,40,"keywords.clearFilters")),n(4),d("titleInfo",c(20,42,"keywords.uploadFiles"))("showUploadComponent",i.showUploadComponent),n(5),d("ngClass",M(64,qt,i.docCounter&&i.docCounter>0)),n(),u(" ",c(26,44,"keywords.documents")," "),n(2),g(i.docCounter&&i.docCounter>0?27:-1),n(),g(i.docCounter&&i.docCounter>0?28:-1),n(3),u(" ",c(32,46,"keywords.documents")," "),n(2),g(i.docCounter&&i.docCounter>0?33:-1),n(3),d("matTooltip",c(37,48,"keywords.add"))("disabled",!c(38,50,i.canUploadDocuments$)),n(3),g(i.showUploadComponent?-1:39),n(),g(i.showUploadComponent?40:-1),n(),d("matTooltip",c(42,52,"keywords.refresh")),n(4),d("matTooltip",c(46,54,"keywords.export"))("matMenuTriggerFor",m),n(7),u(" ",c(53,56,"keywords.exportPDF")," "),n(3),u(" ",c(56,58,"keywords.exportExcel")," "),n(5),u(" ",c(61,60,"keywords.exportPDF")," "),n(3),u(" ",c(64,62,"keywords.exportExcel")," "),n(4),d("ngClass",M(66,Yt,!i.showLoadingIndicator)),n(2),d("dataSource",i.listDocuments)("ngClass",M(68,Wt,i.showLoadingIndicator)),n(22),d("matHeaderRowDef",i.displayedColumns),n(),d("matRowDefColumns",i.displayedColumns),n(3),d("length",i.paging.totalCount)("pageIndex",i.paging.pageNumber-1)("pageSize",i.paging.pageSize)("pageSizeOptions",i.pageSizeOptions)}},dependencies:[ie,G,H,ue,pe,de,_e,fe,oe,st,ct,mt,ve,De,se,lt,ge,xe,me,N,we,be,Ie,Te,Se,Ee,Be,ke,Le,Me,Ce,Ne,Fe,V,ne,z,Pe],styles:["@media(max-width:599px){.width-res[_ngcontent-%COMP%]{width:100%}.mat-card-2[_ngcontent-%COMP%] .mat-mdc-cell-value[_ngcontent-%COMP%]{max-width:390px!important}.h2-res[_ngcontent-%COMP%]{margin-left:5px!important}.ml-res[_ngcontent-%COMP%]{margin-left:-15px!important}.ml-res-10[_ngcontent-%COMP%]{margin-left:10px!important}}@media(max-width:400px){.mat-card-2[_ngcontent-%COMP%] .mat-mdc-cell[_ngcontent-%COMP%]{max-width:350px!important}}"]})}}return t})();var Ve=class extends ft{};var Ue=class{};var gi=["clientAutocomplete"],yi=["searchBar"],wi=t=>({"mb-5":t}),Si=()=>({"pt-30":!0}),bi=t=>({invisible:t}),Ti=t=>({"blurry-table":t}),Bi=t=>({"disable-pointer-events":t});function ki(t,p){if(t&1){let e=L();o(0,"div",4)(1,"app-client-autocomplete",27,1),f("selectionChanged",function(i){T(e);let m=C();return B(m.selectClientClick(i))}),a()()}if(t&2){let e=C();n(),d("groupName",e.basicInfoFormGroup)("controlName","client")}}function Ii(t,p){if(t&1&&(o(0,"mat-option",31),s(1),l(2,"translate"),a()),t&2){let e=p.$implicit;d("value",e.key),n(),u(" ",c(2,2,e.value)," ")}}function Ei(t,p){if(t&1){let e=L();o(0,"mat-form-field",28)(1,"mat-label"),s(2),l(3,"translate"),a(),o(4,"mat-select",29),f("selectionChange",function(i){T(e);let m=C();return B(m.onDocumentTypeChange(i))}),o(5,"mat-option",30),s(6),l(7,"translate"),a(),K(8,Ii,3,4,"mat-option",31,J),a()(),o(10,"div",32)(11,"mat-icon",33),l(12,"translate"),f("click",function(){T(e);let i=C();return B(i.clearFilters())}),s(13,"cancel"),a()()}if(t&2){let e=C();n(2),_(c(3,5,"keywords.filterByDocumentType")),n(2),d("value",e.searchByDocumentType),n(),d("value",null),n(),u(" ",c(7,7,"keywords.filterByDocumentType")," "),n(2),X(e.documentContentTypeList),n(3),d("matTooltip",c(12,9,"keywords.clearFilters"))}}function Li(t,p){t&1&&D(0,"div",13)}function Mi(t,p){if(t&1&&(o(0,"div",14),s(1),l(2,"pluralTranslate"),a()),t&2){let e=C();
1n(),u(" ",F(2,1,"keywords.documentsCount",e.docCounter)," ")}}function Fi(t,p){if(t&1&&(o(0,"div",17),D(1,"div",34),o(2,"div",35),s(3),l(4,"pluralTranslate"),a()()),t&2){let e=C();d("ngClass.gt-xs",te(5,Si)),n(3),_(F(4,2,"keywords.documentsCount",e.docCounter))}}function Pi(t,p){t&1&&(o(0,"mat-icon"),s(1,"add"),a())}function Ni(t,p){t&1&&(o(0,"mat-icon"),s(1,"remove"),a())}function $i(t,p){t&1&&(o(0,"th",53),s(1),l(2,"translate"),a()),t&2&&(n(),u(" ",c(2,1,"keywords.number")," "))}function Ai(t,p){if(t&1&&(o(0,"td",54)(1,"div",55),s(2),l(3,"translate"),a(),o(4,"div",56),s(5),a()()),t&2){let e=p.index,r=C(2);n(2),u(" ",c(3,2,"keywords.number")," "),n(3),_(r.getIndexOfItem(e))}}function Oi(t,p){t&1&&(o(0,"th",57),s(1),l(2,"translate"),a()),t&2&&(n(),u("",c(2,1,"keywords.documentName")," "))}function Ri(t,p){if(t&1){let e=L();o(0,"td",54)(1,"div",55),s(2),l(3,"translate"),a(),o(4,"div",56)(5,"a",58),f("click",function(){let i=T(e),m=i.$implicit,h=i.index,w=C(2);return B(w.previewDocument(m,h))}),D(6,"mat-icon",59),s(7),a()()()}if(t&2){let e=p.$implicit;n(2),u(" ",c(3,4,"keywords.documentName")," "),n(4),ee(e.icon_name),n(),u(" ",e.documentTitle," ")}}function Vi(t,p){t&1&&(o(0,"th",57),s(1),l(2,"translate"),a()),t&2&&(n(),_(c(2,1,"keywords.documentDate")))}function Ui(t,p){if(t&1&&(o(0,"td",54)(1,"div",55),s(2),l(3,"translate"),a(),o(4,"div",56),s(5),l(6,"date"),a()()),t&2){let e=p.$implicit,r=C(2);n(2),u(" ",c(3,2,"keywords.documentDate")," "),n(3),u(" ",F(6,4,e.documentDate,r.selectedClinic.dateFormatName)," ")}}function zi(t,p){t&1&&(o(0,"th",57),s(1),l(2,"translate"),a()),t&2&&(n(),_(c(2,1,"keywords.documentSize")))}function Hi(t,p){if(t&1&&(o(0,"td",54)(1,"div",55),s(2),l(3,"translate"),a(),o(4,"div",56),s(5),a()()),t&2){let e=p.$implicit;n(2),u(" ",c(3,2,"keywords.documentSize")," "),n(3),u(" ",e.documentSize," ")}}function Gi(t,p){if(t&1&&(o(0,"th",57),s(1),l(2,"translate"),a()),t&2){let e=C(2);n(),_(c(2,1,"keywords."+e.patientColumName))}}function Qi(t,p){if(t&1){let e=L();o(0,"td",54)(1,"div",55),s(2),l(3,"translate"),a(),o(4,"a",60),f("click",function(){let i=T(e).$implicit,m=C(2);return B(m.navigateToPatient(i))}),o(5,"span"),s(6),a()()()}if(t&2){let e=p.$implicit,r=C(2);n(2),u(" ",c(3,2,"keywords."+r.patientColumName)," "),n(4),_(e.patientName)}}function ji(t,p){t&1&&(o(0,"th",57),s(1),l(2,"translate"),a()),t&2&&(n(),_(c(2,1,"keywords.recordDate")))}function qi(t,p){if(t&1){let e=L();o(0,"td",54)(1,"div",55),s(2),l(3,"translate"),a(),o(4,"a",61),l(5,"async"),l(6,"async"),f("click",function(){let i=T(e).$implicit,m=C(2);return B(m.navigateToPatientRecords(i))}),o(7,"span"),s(8),l(9,"date"),a()()()}if(t&2){let e=p.$implicit,r=C(2);n(2),u(" ",c(3,3,"keywords.recordDate")," "),n(2),d("ngClass",M(11,Bi,!c(5,5,r.canViewRecords$)||!c(6,7,r.canEditRecords$))),n(4),_(c(9,9,e.recordDate))}}function Yi(t,p){t&1&&(o(0,"th",62),s(1),l(2,"translate"),a()),t&2&&(n(),u("",c(2,1,"keywords.actions")," "))}function Wi(t,p){if(t&1){let e=L();o(0,"td",63)(1,"div",55),s(2),l(3,"translate"),a(),o(4,"div",56)(5,"button",64),l(6,"async"),l(7,"async"),l(8,"translate"),f("click",function(){let i=T(e),m=i.$implicit,h=i.index,w=C(2);return B(w.previewDocument(m,h))}),o(9,"mat-icon",65),s(10,"visibility"),a()(),o(11,"button",64),l(12,"async"),l(13,"async"),l(14,"translate"),l(15,"async"),f("click",function(){let i=T(e).$implicit,m=C(2);return B(m.downloadDocument(i))}),o(16,"mat-icon",65),s(17,"cloud_download"),a()(),o(18,"button",66),l(19,"translate"),l(20,"async"),f("click",function(){let i=T(e).$implicit,m=C(2);return B(m.deleteDocument(i))}),o(21,"mat-icon",67),s(22,"delete_outline"),a()()()()}if(t&2){let e=C(2);n(2),u(" ",c(3,8,"keywords.actions")," "),n(3),d("disabled",!c(6,10,e.canPrintDocuments$)||!c(7,12,e.canDownloadDocuments$))("matTooltip",c(8,14,"keywords.preview")),n(6),d("disabled",!c(12,16,e.canPrintDocuments$)||!c(13,18,e.canDownloadDocuments$))("matTooltip",c(14,20,"keywords.download"))("disabled",!c(15,22,e.canDownloadDocuments$)),n(7),d("matTooltip",c(19,24,"keywords.delete"))("disabled",!c(20,26,e.canDeleteDocuments$))}}function Ji(t,p){t&1&&D(0,"tr",68)}function Ki(t,p){t&1&&D(0,"tr",69)}function Xi(t,p){if(t&1&&(o(0,"div",23)(1,"div",36),D(2,"mat-progress-spinner",37),a(),o(3,"table",38),S(4,39),y(5,$i,3,3,"th",40)(6,Ai,6,4,"td",41),b(),S(7,42),y(8,Oi,3,3,"th",43)(9,Ri,8,6,"td",41),b(),S(10,44),y(11,Vi,3,3,"th",43)(12,Ui,7,7,"td",41),b(),S(13,45),y(14,zi,3,3,"th",43)(15,Hi,6,4,"td",41),b(),S(16,46),y(17,Gi,3,3,"th",43)(18,Qi,7,4,"td",41),b(),S(19,47),y(20,ji,3,3,"th",43)(21,qi,10,13,"td",41),b(),S(22,48),y(23,Yi,3,3,"th",49)(24,Wi,23,28,"td",50),b(),y(25,Ji,1,0,"tr",51)(26,Ki,1,0,"tr",52),a()()),t&2){let e=C();n(),d("ngClass",M(5,bi,!e.showLoadingIndicator)),n(2),d("dataSource",e.listDocuments)("ngClass",M(7,Ti,e.showLoadingIndicator)),n(22),d("matHeaderRowDef",e.displayedColumns),n(),d("matRowDefColumns",e.displayedColumns)}}var Et=(()=>{class t{get documentContentTypeList(){return this._enumeratorsService.documentContentType}constructor(){this.showLoadingIndicator=!1,this.displayedColumns=["position","documentName","documentDate","documentSize","patientName","recordDate","actionButtons"],this.listDocuments=[],this.showSearchLoadingIndicator=!1,this.allSubscriptions=new O,this.searchText="",this.searchByName="",this.showUploadComponent=!1,this.isClient=!1,this._clinicService=v(Q),this._authService=v(U),this._clientService=v(pt),this._clientDocumentService=v(xt),this._enumeratorsService=v(he),this._snackBarTemplate=v(re),this._router=v(et),this._fb=v(Je),this._dialog=v(ce),this._translateService=v(ae),this.pageSizeOptions=this._clientDocumentService.pageSizeOptions,this.paging=this._clientDocumentService.defaultPaging;for(let e=0;
1e<this._clientDocumentService.noInitElements;e++)this.listDocuments.push(new wt);this.basicInfoFormGroup=this._fb.group({client:[""]})}ngOnInit(){this.isClient$=this._authService.isClient(),this.allSubscriptions.add(this.isClient$.subscribe(e=>{this.isClient=e})),this.allSubscriptions.add(this._clientDocumentService.$paginParamsObservable.subscribe(e=>{this.paging=e,this.startPos=(e.pageNumber-1)*e.pageSize+1,this.docCounter=this.paging.totalCount})),this.paging.pageNumber=1,this.startPos=1,this.allSubscriptions.add(this._clinicService.$clinicObservable.subscribe(e=>P(this,null,function*(){this.clinicID=e.clinicID,this.selectedClinic=e,this.isClient?(this.patientColumName="petName",this.selectedClient=new Ue,this.selectedClient.clientID=this._clinicService.currentClientID,this.selectClientClick(this.selectedClient)):this.patientColumName="patientName"}))),this.allSubscriptions.add(this.paginator.page.subscribe(e=>{this.paging.pageNumber=e.pageIndex+1,this.paging.pageSize=e.pageSize,this.clinicID&&this.selectedClient&&this.fetchDocuments(this.paging,this.searchByName)})),this.canUploadDocuments$=this._authService.isFlagClaimTrue(I.documents,k.c_uploadDocuments),this.canDeleteDocuments$=this._authService.isFlagClaimTrue(I.documents,k.c_deleteDocuments),this.canPrintDocuments$=this._authService.isFlagClaimTrue(I.documents,k.c_printDocuments),this.canDownloadDocuments$=this._authService.isFlagClaimTrue(I.documents,k.c_downloadDocuments),this.allSubscriptions.add(this.canPrintDocuments$.subscribe(e=>{this.canPrintDocuments=e})),this.allSubscriptions.add(this.canDownloadDocuments$.subscribe(e=>{this.canDownloadDocuments=e}))}selectClientClick(e){this.clientID=e?.clientID??null,this.selectedClient=e,this.searchByDocumentType=null,this.searchByName="",this.searchBar?this.searchBar.clearSearchFilter():e&&this.fetchDocuments(this.paging,this.searchByName)}fetchDocuments(e,r){return P(this,null,function*(){this.showLoadingIndicator=!0;let i=new Ve;r&&r!==""&&(i.searchText=r),i.documentContentType=this.searchByDocumentType;let m=new le;m.pagingParams=e,m.search=i;let h=yield this._clientDocumentService.getList(m,this.clinicID,this.clientID).catch(w=>{this.listDocuments=[],this.docCounter=0,this._snackBarTemplate.errorSnackBarGet("List of Documents",w)});h&&(h.forEach(w=>{w.icon_name=Re(w)}),this.listDocuments=h),this.showUploadComponent=this.listDocuments&&this.listDocuments.length===0||!this.listDocuments,this.showLoadingIndicator=!1})}getIndexOfItem(e){return this.startPos+e}onSearch(e){this.searchByName=e.target.value,this.fetchDocuments(this.paging,this.searchByName)}onClear(){this.searchByName="",this.selectedClient&&this.fetchDocuments(this.paging,this.searchByName)}onDocumentTypeChange(e){this.searchByDocumentType=e.value,this.fetchDocuments(this.paging,"")}addDocument(){this.showUploadComponent=!this.showUploadComponent}deleteDocument(e){let r=this._translateService.instant("keywords.document"),i=this._translateService.instant("keywords.deleteSelectedDocument"),m=this._translateService.instant("keywords.areYouSureYouWantToDeleteDocument1VALUE",{value:e.documentTitle});this._dialog.open(ye,{width:"500px",data:{title:i,text:m,confirmAction:()=>{this.showLoadingIndicator=!0,this._clientDocumentService.delete(this.clinicID,this.clientID,e.clientDocumentID).then(()=>{this.listDocuments.length>1?(this.listDocuments=this.listDocuments.filter(h=>h.clientDocumentID!=e.clientDocumentID),this.docCounter--,this.paging.totalCount--,this.showLoadingIndicator=!1):(this.paging.pageNumber=1,this.fetchDocuments(this.paging,this.searchByName)),this._snackBarTemplate.successSnackBarDelete(r)}
1).catch(h=>{this._snackBarTemplate.errorSnackBarDelete(r,h),this.showLoadingIndicator=!1})}}})}saveFiles(e){let r=new FormData;e.forEach(i=>{r.append("Files",i,i.name)}),this._clientDocumentService.create(r,this.clinicID,this.clientID).then(()=>{this.fetchDocuments(this.paging,this.searchByName),this._snackBarTemplate.successSnackBarUpdate("Document")}).catch(i=>{this._snackBarTemplate.errorSnackBarUpdate("Document",i)})}downloadDocument(e){this.canPrintDocuments&&this.canDownloadDocuments&&this._clientDocumentService.downloadDocument(this.clinicID,this.clientID,e.clientDocumentID)}previewDocument(e,r){return P(this,null,function*(){if(e.documentType===E.Other&&e.isExternal===!0){window.open(e.documentURL,"_blank");return}this._dialog.open($e,{width:"60vw",height:"75vh",data:{allDocuments:this.listDocuments,documentToPreviewIndex:r,showNextAndPreviousButtons:!0,clinicID:this.clinicID,clientID:this.clientID}})})}clearFilters(){if(this.clientAutocomplete){this.clientAutocomplete.clearSelectedValue(!1);return}this.searchByDocumentType=null,this.searchBar?this.searchBar.clearSearchFilter():this.fetchDocuments(this.paging,this.searchByName)}ngOnDestroy(){this.allSubscriptions.unsubscribe()}navigateToPatient({patientID:e,patientName:r}){localStorage.setItem("patientName",r),this._router.navigate(["/patients/patient/modify"],{queryParams:{patientid:e,clientid:this.clientID}})}navigateToPatientRecords({patientID:e,recordID:r,patientName:i}){localStorage.setItem("patientName",i),this._clientService.setSelectedClientID(this.selectedClient.clientID),this._router.navigate(["/patients/patient/records/modify"],{queryParams:{patientid:e,clientid:this.clientID,clientName:"",recordid:r}})}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=R({type:t,selectors:[["app-drive-client-documents"]],viewQuery:function(r,i){if(r&1&&Z(gi,5)(yi,5)(N,7),r&2){let m;$(m=A())&&(i.clientAutocomplete=m.first),$(m=A())&&(i.searchBar=m.first),$(m=A())&&(i.paginator=m.first)}},standalone:!1,decls:40,vars:45,consts:[["searchBar",""],["clientAutocomplete",""],[1,"header-filter-margin"],["fxLayout","row grid","fxLayoutAlign","start start","fxLayoutGap","10px grid",3,"formGroup"],["fxFlex","noshrink","fxLayout.xs","column","fxFlex.gt-md","200px",1,"form-group"],["fxFlex","noshrink","fxFlex.gt-md","210px",1,"width-res",3,"keydown.enter","on-clear","hidden","customPlaceholder"],["fxFlex","","fxLayout","row","fxLayoutAlign","end center","fxLayoutGap","10px","fxFlexOffset.gt-md","auto",3,"hidden"],[1,"card-radius","m-15",3,"hidden"],[3,"on-submit","on-cancel","titleInfo","showUploadComponent"],["fxLayout","row","fxLayoutAlign","space-between center",1,"mat-table-header","padding-table",3,"hidden"],["fxLayout","row","fxFlex.xs","60"],["fxHide.gt-xs","","fxLayout","column",1,"mb-20"],[3,"ngClass"],[1,"divider","ml-20"],[1,"light-gray-text","table-responsive-header"],["fxHide.gt-xs","",1,"flex-cell"],["fxHide.xs",""],["fxLayout","row",3,"ngClass.gt-xs"],["fxLayout","column","fxFlex.xs","40"],["fxLayout","row","fxLayoutAlign","center center"],["mat-icon-button","",1,"primary-button","light-buttons",3,"click","matTooltip","disabled"],["mat-icon-button","","color","primary",1,"mat-icon-refresh",3,"click","matTooltip"],[1,"gray-icon","material-icons","hover-refresh"],["fxLayout","column","fxLayoutAlign","center center"],["fxLayout","row","fxLayoutAlign","end center",3,"hidden"],[1,"flex-cell"],["showFirstLastButtons","true",3,"length","pageIndex","pageSize","pageSizeOptions"],[3,"selectionChanged","groupName","controlName"],["appearance","outline","fxFlex","noshrink","fxFlex.gt-md","220px",1,"width-res"],["disableOptionCentering","",3,"selectionChange","value"],[1,"clearOption",3,"value"],[3,"value"],["fxLayout","row","fxLayoutAlign","end center","fxLayoutAlign.lt-md","center center",1,"mt-15"],["ngClass.gt-xs","mr-20","ngClass.xs","m-20 mt-40",1,"pointer","clear-icon","hover-cancel","mt-5",3,"click","matTooltip"],[1,"vertical-divider-dashboard"],["fxHide.xs","",1,"light-gray-text"],[1,"position-absolute",3,"ngClass"],["mode","indeterminate","diameter","64",1,"loading-indicator"],["fxFill","fill","mat-table","",1,"table-width",3,"dataSource","ngClass"],["matColumnDef","position"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","","class","default",4,"matCellDef"],["matColumnDef","documentName"],["mat-header-cell","","class","table-title",4,"matHeaderCellDef"],["matColumnDef","documentDate"],["matColumnDef","documentSize"],["matColumnDef","patientName"],["matColumnDef","recordDate"],["matColumnDef","actionButtons"],["mat-header-cell","","class","text-center table-title",4,"matHeaderCellDef"],["mat-cell","","class","text-center",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell","",1,"default"],[1,"mat-cell-header"],[1,"mat-cell-value"],["mat-header-cell","",1,"table-title"],[1,"curs
1or-pointer-edit",3,"click"],[1,"doc-icons"],["target","_blank",1,"primary-color","pointer","smart-link",3,"click"],["target","_blank",1,"primary-color","pointer","smart-link",3,"click","ngClass"],["mat-header-cell","",1,"text-center","table-title"],["mat-cell","",1,"text-center"],["mat-icon-button","","color","primary",3,"click","disabled","matTooltip"],[1,"gray-icon","material-icons","hover-edit"],["mat-icon-button","","color","warn",3,"click","matTooltip","disabled"],[1,"gray-icon","hover-delete","m-0"],["mat-header-row",""],["mat-row",""]],template:function(r,i){r&1&&(o(0,"div",2)(1,"form",3),x(2,ki,3,2,"div",4),l(3,"async"),o(4,"app-search-bar",5,0),l(6,"translate"),f("keydown.enter",function(h){return i.onSearch(h)})("on-clear",function(){return i.onClear()}),a(),x(7,Ei,14,11),D(8,"div",6),a()(),o(9,"div",7)(10,"upload-files",8),l(11,"translate"),f("on-submit",function(h){return i.saveFiles(h)})("on-cancel",function(h){return i.showUploadComponent=h}),a()(),o(12,"div",9)(13,"div",10)(14,"div",11)(15,"h2",12),s(16),l(17,"translate"),a(),x(18,Li,1,0,"div",13),x(19,Mi,3,4,"div",14),a(),D(20,"div",15),o(21,"h2",16),s(22),l(23,"translate"),a(),x(24,Fi,5,6,"div",17),a(),o(25,"div",18)(26,"div",19)(27,"button",20),l(28,"translate"),l(29,"async"),f("click",function(){return i.addDocument()}),x(30,Pi,2,0,"mat-icon"),x(31,Ni,2,0,"mat-icon"),a(),o(32,"button",21),l(33,"translate"),f("click",function(){return i.fetchDocuments(i.paging,i.searchByName)}),o(34,"i",22),s(35,"refresh"),a()()()()(),x(36,Xi,27,9,"div",23),o(37,"div",24)(38,"div",25),D(39,"mat-paginator",26),a()()),r&2&&(n(),d("formGroup",i.basicInfoFormGroup),n(),g(c(3,27,i.isClient$)?-1:2),n(2),d("hidden",!i.selectedClient)("customPlaceholder",c(6,29,"keywords.searchDocuments")),n(3),g(i.selectedClient?7:-1),n(),d("hidden",!i.selectedClient),n(),d("hidden",!i.selectedClient),n(),d("titleInfo",c(11,31,"keywords.uploadFiles"))("showUploadComponent",i.showUploadComponent),n(2),d("hidden",!i.selectedClient||i.listDocuments&&i.listDocuments.length==0),n(3),d("ngClass",M(43,wi,i.docCounter&&i.docCounter>0)),n(),u(" ",c(17,33,"keywords.documents")," "),n(2),g(i.docCounter&&i.docCounter>0?18:-1),n(),g(i.docCounter&&i.docCounter>0?19:-1),n(3),u(" ",c(23,35,"keywords.documents")," "),n(2),g(i.docCounter&&i.docCounter>0?24:-1),n(3),d("matTooltip",c(28,37,"keywords.add"))("disabled",!c(29,39,i.canUploadDocuments$)),n(3),g(i.showUploadComponent?-1:30),n(),g(i.showUploadComponent?31:-1),n(),d("matTooltip",c(33,41,"keywords.refresh")),n(4),g(i.selectedClient&&(i.listDocuments==null?null:i.listDocuments.length)>0?36:-1),n(),d("hidden",!i.selectedClient||i.listDocuments&&i.listDocuments.length==0),n(2),d("length",i.paging.totalCount)("pageIndex",i.paging.pageNumber-1)("pageSize",i.paging.pageSize)("pageSizeOptions",i.pageSizeOptions))},dependencies:[ie,Ye,qe,G,H,ue,ot,pe,de,_e,fe,We,oe,ve,De,se,ge,xe,me,N,we,be,Ie,Te,Se,Ee,Be,ke,Le,Me,Ce,Ne,Fe,vt,V,ne,z,Pe],styles:["@media(max-width:599px){.width-res[_ngcontent-%COMP%]{width:100%}.mat-mdc-cell-value[_ngcontent-%COMP%]{max-width:350px!important}}"]})}}return t})();var Zi=[{path:"",component:kt,children:[{path:"documents",component:It,canActivate:[He],data:{userClaims:[{group:I.documents,typeName:k.c_viewDocuments}],localStorageProperty:null,isActiveRoute:!0,breadcrumb:"Breadcrumb.documents"}},{path:"client-documents",component:Et,canActivate:[He],data:{userClaims:[{group:I.documents,typeName:k.c_viewDocuments}],localStorageProperty:null,isActiveRoute:!0,breadcrumb:"Breadcrumb.clientDocuments"}}]}],Lt=(()=>{class t{static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275mod=W({type:t})}static{this.\u0275inj=q({imports:[ze.forChild(Zi),ze]})}}return t})();var $o=(()=>{class t{constructor(e){e.loadAndMerge("portal/document")}static{this.\u0275fac=function(r){return new(r||t)(Ge(at))}}static{this.\u0275mod=W({type:t})}static{this.\u0275inj=q({imports:[je,Lt,Ke,ht,Xe,Ct,gt]})}}return t})();export{Ve as a,Re as b,$o as c};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.