You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

2 lines
52 KiB

"use strict";(self.webpackChunk_bitwarden_web_vault=self.webpackChunk_bitwarden_web_vault||[]).push([[767],{49767(t,e,i){i.d(e,{OrganizationReportingModule:()=>fi});var n=i(84653),o=i(80504),a=i(72932),s=i(57768),r=i(84522),c=i(67553),l=i(17594),p=i(35284),d=i(68108),h=i(29236),u=i(21571),g=i(3633),b=i(38020),f=i(39488),v=i(61325),m=i(5884),R=i(16568),I=i(81216),w=i(84330),$=i(25065),F=i(14092),S=i(10840),C=i(62819),M=i(85037),k=i(14041),y=i(11217),X=i(5556),G=i(72331),j=i(66316),T=i(35500),z=i(26983),x=i(50700),V=i(84210),U=i(26333),A=i(93103),O=i(47428),E=i(47696),Y=i(56898),N=i(44432),D=i(10672),P=i(58384),W=i(57178),J=i(30930),B=i(38410),Q=i(32316),_=i(12694),H=i(16496),L=i(49112),q=i(46758),K=i(25740),Z=i(55818),tt=function(t,e,i,n){return new(i||(i=Promise))(function(o,a){function s(t){try{c(n.next(t))}catch(e){a(e)}}function r(t){try{c(n.throw(t))}catch(e){a(e)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(s,r)}c((n=n.apply(t,e||[])).next())})};function et(t,e){1&t&&(k.j41(0,"bit-callout",2),k.nI1(1,"i18n"),k.EFF(2),k.nI1(3,"i18n"),k.k0s()),2&t&&(k.Y8G("title",k.mNQ(k.bMT(1,3,"goodNews"))),k.R7$(2),k.SpI(" ",k.bMT(3,5,"noExposedPasswords")," "))}function it(t,e){if(1&t&&(k.j41(0,"bit-toggle",14),k.EFF(1),k.nrm(2,"bit-berry",14),k.k0s()),2&t){const t=e.$implicit,i=k.XpG(5);k.Y8G("value",t),k.R7$(),k.SpI(" ",i.getName(t)," "),k.R7$(),k.Y8G("value",i.getCount(t))}}function nt(t,e){if(1&t){const t=k.RV6();k.j41(0,"bit-toggle-group",13),k.nI1(1,"async"),k.nI1(2,"i18n"),k.bIt("selectedChange",function(e){y.eBV(t);const i=k.XpG(4);return y.Njj(i.filterOrgToggle(e))}),k.Z7z(3,it,3,3,"bit-toggle",14,k.fX1),k.k0s()}if(2&t){const t=k.XpG(4);k.Y8G("selected",k.bMT(1,2,t.filterOrgStatus$))("label",k.bMT(2,4,"addAccessFilter")),k.R7$(3),k.Dyx(t.filterStatus)}}function ot(t,e){if(1&t){const t=k.RV6();k.j41(0,"bit-chip-filter",15),k.bIt("ngModelChange",function(e){y.eBV(t);const i=k.XpG(4);return y.Njj(i.filterOrgToggleChipSelect(e))}),k.k0s()}if(2&t){const t=k.XpG(4);k.Y8G("placeholderText",t.chipSelectOptions[0].label)("options",t.chipSelectOptions)("ngModel",t.selectedFilterChip)}}function at(t,e){if(1&t&&k.nVh(0,nt,5,6,"bit-toggle-group",11)(1,ot,1,3,"bit-chip-filter",12),2&t){const t=k.XpG(3);k.vxM(t.canDisplayToggleGroup()?0:1)}}function st(t,e){1&t&&(k.j41(0,"th",8),k.EFF(1),k.nI1(2,"i18n"),k.k0s()),2&t&&(k.R7$(),k.SpI(" ",k.bMT(2,1,"owner")," "))}function rt(t,e){if(1&t){const t=k.RV6();k.j41(0,"a",23),k.nI1(1,"i18n"),k.bIt("click",function(){y.eBV(t);const e=k.XpG().$implicit,i=k.XpG(3);return y.Njj(i.selectCipher(e))}),k.EFF(2),k.k0s()}if(2&t){const t=k.XpG().$implicit;k.Y8G("title",k.mNQ(k.i5U(1,3,"editItemWithName",t.name))),k.R7$(2),k.SpI(" ",t.name," ")}}function ct(t,e){if(1&t&&(k.j41(0,"span",20),k.EFF(1),k.k0s()),2&t){const t=k.XpG().$implicit;k.Y8G("title",k.mNQ(t.name)),k.R7$(),k.JRh(t.name)}}function lt(t,e){1&t&&(k.nrm(0,"bit-icon",24),k.nI1(1,"i18n"),k.j41(2,"span",25),k.EFF(3),k.nI1(4,"i18n"),k.k0s()),2&t&&(k.Y8G("title",k.bMT(1,2,"shared")),k.R7$(3),k.JRh(k.bMT(4,4,"shared")))}function pt(t,e){1&t&&(k.nrm(0,"bit-icon",26),k.nI1(1,"i18n"),k.j41(2,"span",25),k.EFF(3),k.nI1(4,"i18n"),k.k0s()),2&t&&(k.Y8G("title",k.bMT(1,2,"attachments")),k.R7$(3),k.JRh(k.bMT(4,4,"attachments")))}function dt(t,e){if(1&t&&(k.j41(0,"bit-badge",27),k.EFF(1),k.nI1(2,"async"),k.nI1(3,"orgNameFromId"),k.k0s()),2&t){const t=k.XpG(2).$implicit,e=k.XpG(3);k.R7$(),k.SpI(" ",k.i5U(3,3,t.organizationId,k.bMT(2,1,e.organizations$))," ")}}function ht(t,e){1&t&&(k.j41(0,"bit-badge",27),k.EFF(1),k.nI1(2,"i18n"),k.k0s()),2&t&&(k.R7$(),k.SpI(" ",k.bMT(2,1,"me")," "))}function ut(t,e){if(1&t&&(k.j41(0,"td",16),k.nVh(1,dt,4,6,"bit-badge",27)(2,ht,3,3,"bit-badge",27),k.k0s()),2&t){const t=k.XpG().$implicit;k.R7$(),k.vxM(t.organizationId?1:2)}}function gt(t,e){if(1&t&&(k.j41(0,"td",16),k.nrm(1,"app-vault-icon",17),k.k0s(),k.j41(2,"td",18),k.nVh(3,rt,3,6,"a",19)(4,ct,2,3,"span",20),k.nVh(5,lt,5,6),k.nVh(6,pt,5,6),k.nrm(7,"br"),k.j41(8,"small"),k.EFF(9),k.k0s()(),k.nVh(10,ut,3,1,"td",16),k.j41(11,"td",21)(12,"bit-badge",22),k.EFF(13),k.nI1(14,"number"),k.nI1(15,"i18n"),k.k0s()()),2&t){const t=e.$implicit,i=k.XpG(3);k.R7$(),k.Y8G("cipher",t),k.R7$(2),k.vxM(!i.organization||i.canManageCipher(t)?3:4),k.R7$(2),k.vxM(!i.organization&&t.organizationId?5:-1),k.R7$(),k.vxM(t.hasAttachments?6:-1),k.R7$(3),k.JRh(t.subTitle),k.R7$(),k.vxM(i.isAdminConsoleActive?-1:10),k.R7$(3),k.SpI(" ",k.i5U(15,9,"exposedXTimes",k.bMT(14,7,t.exposedXTimes))," ")}}function bt(t,e){if(1&t&&(k.j41(0,"bit-callout",3),k.nI1(1,"i18n"),k.EFF(2),k.nI1(3,"number"),k.nI1(4,"i18n"),k.k0s(),k.nVh(5,at,2,1),k.j41(6,"bit-table-scroll",4),k.qex(7,5),k.nrm(8,"th",6),k.j41(9,"th",7),k.EFF(10),k.nI1(11,"i18n"),k.k0s(),k.nVh(12,st,3,3,"th",8),k.j41(13,"th",9),k.EFF(14),k.nI1(15,"i18n"),k.k0s(),k.bVm(),k.DNE(16,gt,16,12,"ng-template",10),k.k0s()),2&t){const t=k.XpG(2);k.Y8G("title",k.mNQ(k.bMT(1,9,"exposedPasswordsFound"))),k.R7$(2),k.SpI(" ",k.brH(4,13,"exposedPasswordsFoundReportDesc",k.bMT(3,11,t.ciphers.length),t.vaultMsg)," "),k.R7$(3),k.vxM(t.showFilterToggle&&!t.isAdminConsoleActive?5:-1),k.R7$(),k.Y8G("dataSource",t.dataSource)("rowSize",54),k.R7$(4),k.JRh(k.bMT(11,17,"name")),k.R7$(2),k.vxM(t.isAdminConsoleActive?-1:12),k.R7$(2),k.SpI(" ",k.bMT(15,19,"timesExposed")," ")}}function ft(t,e){if(1&t&&(k.j41(0,"div",1),k.nVh(1,et,4,7,"bit-callout",2)(2,bt,17,21),k.k0s()),2&t){const t=k.XpG();k.R7$(),k.vxM(t.ciphers.length?2:1)}}class vt extends M.y{constructor(t,e,i,n,o,a,s,r,c,l,p,d,h){super(t,e,n,i,o,s,r,c,l,p,h),this.accountService=o,this.route=a,this.collectionService=d,this.logService=h,this.manageableCipherIds=new Set,this.sharedCollectionIds=new Set}ngOnInit(){const t=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return tt(this,void 0,void 0,function*(){var e,i;this.isAdminConsoleActive=!0,null===(i=null===(e=this.route.parent)||void 0===e?void 0:e.parent)||void 0===i||i.params.pipe((0,p.M)(e=>tt(this,void 0,void 0,function*(){const i=yield(0,d._)(this.accountService.activeAccount$.pipe(g.F6));this.organization=yield(0,d._)(this.organizationService.organizations$(i).pipe((0,b.Hc)(e.organizationId)));const n=yield this.cipherService.getAll(i);this.manageableCipherIds=new Set(n.map(t=>t.id));const o=yield(0,d._)(this.collectionService.decryptedCollections$(i));this.sharedCollectionIds=new Set(o.filter(t=>{var e;return!t.isDefaultCollection&&t.organizationId===(null===(e=this.organization)||void 0===e?void 0:e.id)}).map(t=>t.id)),yield t.ngOnInit.call(this)})),(0,h.Q)(this.destroyed$)).subscribe()})}getAllCiphers(){return tt(this,void 0,void 0,function*(){return this.organization?this.cipherService.getAllFromApiForOrganization(this.organization.id,!0):[]})}canManageCipher(t){var e,i;return!(v.n.isUnassigned(t)||!(null===(e=t.collectionIds)||void 0===e?void 0:e.some(t=>this.sharedCollectionIds.has(t))))&&(!!(null===(i=this.organization)||void 0===i?void 0:i.allowAdminAccessToAllCollectionItems)||this.manageableCipherIds.has(t.id))}}vt.ɵfac=function(t){return new(t||vt)(k.rXU(X.p),k.rXU(G.d),k.rXU(j.o),k.rXU(c.PV),k.rXU(T.D),k.rXU(z.nX),k.rXU(w.qX),k.rXU(x.W),k.rXU(f.H),k.rXU(w.hI),k.rXU(C.l),k.rXU(u.YD),k.rXU(I.Kc))},vt.ɵcmp=k.VBU({type:vt,selectors:[["app-org-exposed-passwords-report"]],features:[k.Jv_([{provide:w.hI,useClass:C.l},C.l,w.BR,w.aC]),k.Vt3],decls:9,vars:8,consts:[["type","submit","buttonType","primary","bitButton","",3,"click","loading"],[1,"tw-mt-4"],["type","success",3,"title"],["type","danger",3,"title"],["layout","fixed",3,"dataSource","rowSize"],["header",""],["bitCell","",1,"tw-w-12"],["bitCell","","bitSortable","name"],["bitCell","","bitSortable","organizationId",1,"tw-w-1/4"],["bitCell","","bitSortable","exposedXTimes",1,"tw-w-1/4","tw-text-right"],["bitRowDef",""],[3,"selected","label"],["fullWidth","true",3,"placeholderText","options","ngModel"],[3,"selectedChange","selected","label"],[3,"value"],["fullWidth","true",3,"ngModelChange","placeholderText","options","ngModel"],["bitCell",""],[3,"cipher"],["bitCell","",1,"tw-truncate","tw-max-w-0"],["bitLink","","href","#","appStopClick","",3,"title"],[3,"title"],["bitCell","",1,"tw-text-right"],["variant","warning","size","small"],["bitLink","","href","#","appStopClick","",3,"click","title"],["name","bwi-collection-shared","appStopProp","",1,"tw-ml-1",3,"title"],[1,"tw-sr-only"],["name","bwi-paperclip","appStopProp","",1,"tw-ml-1",3,"title"],["variant","secondary","size","small"]],template:function(t,e){1&t&&(k.nrm(0,"app-header"),k.j41(1,"bit-container")(2,"p"),k.EFF(3),k.nI1(4,"i18n"),k.k0s(),k.j41(5,"button",0),k.bIt("click",function(){return e.load()}),k.EFF(6),k.nI1(7,"i18n"),k.k0s(),k.nVh(8,ft,3,1,"div",1),k.k0s()),2&t&&(k.R7$(3),k.JRh(k.bMT(4,4,"exposedPasswordsReportDesc")),k.R7$(2),k.Y8G("loading",e.loading),k.R7$(),k.SpI(" ",k.bMT(7,6,"checkExposedPasswords")," "),k.R7$(2),k.vxM(e.hasLoaded?8:-1))},dependencies:[$.G,V.BC,V.vS,U.R,A.Y,O.x,E.n,Y.Q,N.G,D.H,P.R,W.g,J.a,B.Q,Q.O,J.N,_.H,H.a,a.G,L.f,F.t,S.Y,m.W,R.c,q.Jj,q.QX,K.$,Z.t],encapsulation:2});var mt=i(56962),Rt=i(58604),It=i(30414),wt=i(24590),$t=function(t,e,i,n){return new(i||(i=Promise))(function(o,a){function s(t){try{c(n.next(t))}catch(e){a(e)}}function r(t){try{c(n.throw(t))}catch(e){a(e)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(s,r)}c((n=n.apply(t,e||[])).next())})};function Ft(t,e){1&t&&(k.j41(0,"div"),k.nrm(1,"bit-icon",1),k.nI1(2,"i18n"),k.j41(3,"span",2),k.EFF(4),k.nI1(5,"i18n"),k.k0s()()),2&t&&(k.R7$(),k.Y8G("title",k.bMT(2,2,"loading")),k.R7$(3),k.JRh(k.bMT(5,4,"loading")))}function St(t,e){1&t&&(k.j41(0,"bit-callout",3),k.nI1(1,"i18n"),k.EFF(2),k.nI1(3,"i18n"),k.k0s()),2&t&&(k.Y8G("title",k.mNQ(k.bMT(1,3,"goodNews"))),k.R7$(2),k.SpI(" ",k.bMT(3,5,"noInactive2fa")," "))}function Ct(t,e){if(1&t&&(k.j41(0,"bit-toggle",14),k.EFF(1),k.nrm(2,"bit-berry",14),k.k0s()),2&t){const t=e.$implicit,i=k.XpG(5);k.Y8G("value",t),k.R7$(),k.SpI(" ",i.getName(t)," "),k.R7$(),k.Y8G("value",i.getCount(t))}}function Mt(t,e){if(1&t){const t=k.RV6();k.j41(0,"bit-toggle-group",13),k.nI1(1,"async"),k.nI1(2,"i18n"),k.bIt("selectedChange",function(e){y.eBV(t);const i=k.XpG(4);return y.Njj(i.filterOrgToggle(e))}),k.Z7z(3,Ct,3,3,"bit-toggle",14,k.fX1),k.k0s()}if(2&t){const t=k.XpG(4);k.Y8G("selected",k.bMT(1,2,t.filterOrgStatus$))("label",k.bMT(2,4,"addAccessFilter")),k.R7$(3),k.Dyx(t.filterStatus)}}function kt(t,e){if(1&t){const t=k.RV6();k.j41(0,"bit-chip-filter",15),k.bIt("ngModelChange",function(e){y.eBV(t);const i=k.XpG(4);return y.Njj(i.filterOrgToggleChipSelect(e))}),k.k0s()}if(2&t){const t=k.XpG(4);k.Y8G("placeholderText",t.chipSelectOptions[0].label)("options",t.chipSelectOptions)("ngModel",t.selectedFilterChip)}}function yt(t,e){if(1&t&&k.nVh(0,Mt,5,6,"bit-toggle-group",11)(1,kt,1,3,"bit-chip-filter",12),2&t){const t=k.XpG(3);k.vxM(t.canDisplayToggleGroup()?0:1)}}function Xt(t,e){1&t&&(k.j41(0,"th",9),k.EFF(1),k.nI1(2,"i18n"),k.k0s()),2&t&&(k.R7$(),k.JRh(k.bMT(2,1,"owner")))}function Gt(t,e){if(1&t){const t=k.RV6();k.j41(0,"a",22),k.nI1(1,"i18n"),k.bIt("click",function(){y.eBV(t);const e=k.XpG().$implicit,i=k.XpG(3);return y.Njj(i.selectCipher(e))}),k.EFF(2),k.k0s()}if(2&t){const t=k.XpG().$implicit;k.Y8G("title",k.mNQ(k.i5U(1,3,"editItemWithName",t.name))),k.R7$(2),k.JRh(t.name)}}function jt(t,e){if(1&t&&(k.j41(0,"span",19),k.EFF(1),k.k0s()),2&t){const t=k.XpG().$implicit;k.Y8G("title",k.mNQ(t.name)),k.R7$(),k.JRh(t.name)}}function Tt(t,e){1&t&&(k.nrm(0,"bit-icon",23),k.nI1(1,"i18n"),k.j41(2,"span",2),k.EFF(3),k.nI1(4,"i18n"),k.k0s()),2&t&&(k.Y8G("title",k.bMT(1,2,"shared")),k.R7$(3),k.JRh(k.bMT(4,4,"shared")))}function zt(t,e){1&t&&(k.nrm(0,"bit-icon",24),k.nI1(1,"i18n"),k.j41(2,"span",2),k.EFF(3),k.nI1(4,"i18n"),k.k0s()),2&t&&(k.Y8G("title",k.bMT(1,2,"attachments")),k.R7$(3),k.JRh(k.bMT(4,4,"attachments")))}function xt(t,e){if(1&t&&(k.j41(0,"bit-badge",25),k.EFF(1),k.nI1(2,"async"),k.nI1(3,"orgNameFromId"),k.k0s()),2&t){const t=k.XpG(2).$implicit,e=k.XpG(3);k.R7$(),k.SpI(" ",k.i5U(3,3,t.organizationId,k.bMT(2,1,e.organizations$))," ")}}function Vt(t,e){1&t&&(k.j41(0,"bit-badge",25),k.EFF(1),k.nI1(2,"i18n"),k.k0s()),2&t&&(k.R7$(),k.SpI(" ",k.bMT(2,1,"me")," "))}function Ut(t,e){if(1&t&&(k.j41(0,"td",8),k.nVh(1,xt,4,6,"bit-badge",25)(2,Vt,3,3,"bit-badge",25),k.k0s()),2&t){const t=k.XpG().$implicit;k.R7$(),k.vxM(t.organizationId?1:2)}}function At(t,e){if(1&t&&(k.nrm(0,"a",21),k.nI1(1,"i18n")),2&t){const t=k.XpG().$implicit,e=k.XpG(3);k.Y8G("href",e.cipherDocs.get(t.id),k.B4B)("label",k.bMT(1,2,"instructions"))}}function Ot(t,e){if(1&t&&(k.j41(0,"td",8),k.nrm(1,"app-vault-icon",16),k.k0s(),k.j41(2,"td",17),k.nVh(3,Gt,3,6,"a",18)(4,jt,2,3,"span",19),k.nVh(5,Tt,5,6),k.nVh(6,zt,5,6),k.nrm(7,"br"),k.j41(8,"small"),k.EFF(9),k.k0s()(),k.nVh(10,Ut,3,1,"td",8),k.j41(11,"td",20),k.nVh(12,At,2,4,"a",21),k.k0s()),2&t){const t=e.$implicit,i=k.XpG(3);k.R7$(),k.Y8G("cipher",t),k.R7$(2),k.vxM(!i.organization||i.canManageCipher(t)?3:4),k.R7$(2),k.vxM(!i.organization&&t.organizationId?5:-1),k.R7$(),k.vxM(t.hasAttachments?6:-1),k.R7$(3),k.JRh(t.subTitle),k.R7$(),k.vxM(i.isAdminConsoleActive?-1:10),k.R7$(2),k.vxM(i.cipherDocs.has(t.id)?12:-1)}}function Et(t,e){if(1&t&&(k.j41(0,"bit-callout",4),k.nI1(1,"i18n"),k.EFF(2),k.nI1(3,"number"),k.nI1(4,"i18n"),k.k0s(),k.nVh(5,yt,2,1),k.j41(6,"bit-table-scroll",5),k.qex(7,6),k.nrm(8,"th",7),k.j41(9,"th",8),k.EFF(10),k.nI1(11,"i18n"),k.k0s(),k.nVh(12,Xt,3,3,"th",9),k.nrm(13,"th",9),k.bVm(),k.DNE(14,Ot,13,7,"ng-template",10),k.k0s()),2&t){const t=k.XpG(2);k.Y8G("title",k.mNQ(k.bMT(1,8,"inactive2faFound"))),k.R7$(2),k.SpI(" ",k.brH(4,12,"inactive2faFoundReportDesc",k.bMT(3,10,t.ciphers.length),t.vaultMsg)," "),k.R7$(3),k.vxM(t.showFilterToggle&&!t.isAdminConsoleActive?5:-1),k.R7$(),k.Y8G("dataSource",t.dataSource)("rowSize",75),k.R7$(4),k.JRh(k.bMT(11,16,"name")),k.R7$(2),k.vxM(t.isAdminConsoleActive?-1:12)}}function Yt(t,e){if(1&t&&(k.j41(0,"div",0),k.nVh(1,St,4,7,"bit-callout",3)(2,Et,15,18),k.k0s()),2&t){const t=k.XpG();k.R7$(),k.vxM(t.ciphers.length?2:1)}}class Nt extends It.O{constructor(t,e,i,n,o,a,s,r,c,l,p,d,h){super(t,a,e,s,n,o,r,c,l,p,d),this.route=i,this.changeDetectorRef=d,this.collectionService=h,this.manageableCipherIds=new Set,this.sharedCollectionIds=new Set}ngOnInit(){const t=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return $t(this,void 0,void 0,function*(){var e,i;this.isAdminConsoleActive=!0,this.logService.info("[InactiveTwoFactorOrganizationReport] org setup start"),null===(i=null===(e=this.route.parent)||void 0===e?void 0:e.parent)||void 0===i||i.params.pipe((0,p.M)(e=>$t(this,void 0,void 0,function*(){this.logService.info("[InactiveTwoFactorOrganizationReport] route params received");try{const i=yield(0,d._)(this.accountService.activeAccount$.pipe(g.F6));this.organization=yield(0,d._)(this.organizationService.organizations$(i).pipe((0,b.Hc)(e.organizationId))),this.logService.info(`[InactiveTwoFactorOrganizationReport] organization context loaded found=${null!=this.organization}`);const n=yield this.cipherService.getAll(i);this.manageableCipherIds=new Set(n.map(t=>t.id)),this.logService.info(`[InactiveTwoFactorOrganizationReport] manageable ciphers loaded count=${this.manageableCipherIds.size}`);const o=yield(0,d._)(this.collectionService.decryptedCollections$(i));this.sharedCollectionIds=new Set(o.filter(t=>{var e;return!t.isDefaultCollection&&t.organizationId===(null===(e=this.organization)||void 0===e?void 0:e.id)}).map(t=>t.id)),this.logService.info(`[InactiveTwoFactorOrganizationReport] shared collections loaded count=${this.sharedCollectionIds.size}`),yield t.ngOnInit.call(this),this.logService.info("[InactiveTwoFactorOrganizationReport] org setup complete"),this.changeDetectorRef.markForCheck()}catch(i){throw this.logService.error("[InactiveTwoFactorOrganizationReport] org setup failure",i),i}})),(0,h.Q)(this.destroyed$)).subscribe()})}getAllCiphers(){return $t(this,void 0,void 0,function*(){return this.organization?this.cipherService.getAllFromApiForOrganization(this.organization.id,!0):[]})}canManageCipher(t){var e,i;return!(v.n.isUnassigned(t)||!(null===(e=t.collectionIds)||void 0===e?void 0:e.some(t=>this.sharedCollectionIds.has(t))))&&(!!(null===(i=this.organization)||void 0===i?void 0:i.allowAdminAccessToAllCollectionItems)||this.manageableCipherIds.has(t.id))}}Nt.ɵfac=function(t){return new(t||Nt)(k.rXU(X.p),k.rXU(j.o),k.rXU(z.nX),k.rXU(mt.K),k.rXU(w.qX),k.rXU(c.PV),k.rXU(T.D),k.rXU(x.W),k.rXU(f.H),k.rXU(w.hI),k.rXU(C.l),k.rXU(wt.gRc),k.rXU(u.YD))},Nt.ɵcmp=k.VBU({type:Nt,selectors:[["app-inactive-two-factor-report"]],features:[k.Jv_([{provide:w.hI,useClass:C.l},C.l,w.BR,w.aC]),k.Vt3],decls:7,vars:4,consts:[[1,"tw-mt-4"],["name","bwi-spinner",1,"bwi-spin","tw-text-muted",3,"title"],[1,"tw-sr-only"],["type","success",3,"title"],["type","danger",3,"title"],["layout","fixed",3,"dataSource","rowSize"],["header",""],["bitCell","",1,"tw-w-12"],["bitCell",""],["bitCell","",1,"tw-w-1/4"],["bitRowDef",""],[3,"selected","label"],["fullWidth","true",3,"placeholderText","options","ngModel"],[3,"selectedChange","selected","label"],[3,"value"],["fullWidth","true",3,"ngModelChange","placeholderText","options","ngModel"],[3,"cipher"],["bitCell","",1,"tw-truncate","tw-max-w-0"],["bitLink","","href","#","appStopClick","",3,"title"],[3,"title"],["bitCell","",1,"tw-text-right"],["bit-chip-action","","target","_blank","rel","noreferrer",3,"href","label"],["bitLink","","href","#","appStopClick","",3,"click","title"],["name","bwi-collection-shared","appStopProp","",1,"tw-ml-1",3,"title"],["name","bwi-paperclip","appStopProp","",1,"tw-ml-1",3,"title"],["variant","secondary"]],template:function(t,e){1&t&&(k.nrm(0,"app-header"),k.j41(1,"bit-container")(2,"p"),k.EFF(3),k.nI1(4,"i18n"),k.k0s(),k.nVh(5,Ft,6,6,"div")(6,Yt,3,1,"div",0),k.k0s()),2&t&&(k.R7$(3),k.JRh(k.bMT(4,2,"inactive2faReportDesc")),k.R7$(2),k.vxM(!e.hasLoaded&&e.loading?5:6))},dependencies:[$.G,V.BC,V.vS,U.R,A.Y,O.x,E.n,N.G,D.H,P.R,W.g,J.a,B.Q,J.N,_.H,H.a,a.G,L.f,F.t,S.Y,m.W,Rt.g,R.c,q.Jj,q.QX,K.$,Z.t],encapsulation:2,changeDetection:0});var Dt=i(17343),Pt=function(t,e,i,n){return new(i||(i=Promise))(function(o,a){function s(t){try{c(n.next(t))}catch(e){a(e)}}function r(t){try{c(n.throw(t))}catch(e){a(e)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(s,r)}c((n=n.apply(t,e||[])).next())})};function Wt(t,e){1&t&&(k.j41(0,"div"),k.nrm(1,"bit-icon",1),k.nI1(2,"i18n"),k.nI1(3,"i18n"),k.j41(4,"span",2),k.EFF(5),k.nI1(6,"i18n"),k.k0s()()),2&t&&(k.R7$(),k.Y8G("ariaLabel",k.bMT(2,3,"loading"))("title",k.bMT(3,5,"loading")),k.R7$(4),k.JRh(k.bMT(6,7,"loading")))}function Jt(t,e){1&t&&(k.j41(0,"bit-callout",3),k.nI1(1,"i18n"),k.EFF(2),k.nI1(3,"i18n"),k.k0s()),2&t&&(k.Y8G("title",k.mNQ(k.bMT(1,3,"goodNews"))),k.R7$(2),k.SpI(" ",k.bMT(3,5,"noReusedPasswords")," "))}function Bt(t,e){if(1&t&&(k.j41(0,"bit-toggle",15),k.EFF(1),k.nrm(2,"bit-berry",15),k.k0s()),2&t){const t=e.$implicit,i=k.XpG(5);k.Y8G("value",t),k.R7$(),k.SpI(" ",i.getName(t)," "),k.R7$(),k.Y8G("value",i.getCount(t))}}function Qt(t,e){if(1&t){const t=k.RV6();k.j41(0,"bit-toggle-group",14),k.nI1(1,"async"),k.nI1(2,"i18n"),k.bIt("selectedChange",function(e){y.eBV(t);const i=k.XpG(4);return y.Njj(i.filterOrgToggle(e))}),k.Z7z(3,Bt,3,3,"bit-toggle",15,k.fX1),k.k0s()}if(2&t){const t=k.XpG(4);k.Y8G("selected",k.bMT(1,2,t.filterOrgStatus$))("label",k.bMT(2,4,"addAccessFilter")),k.R7$(3),k.Dyx(t.filterStatus)}}function _t(t,e){if(1&t){const t=k.RV6();k.j41(0,"bit-chip-filter",16),k.bIt("ngModelChange",function(e){y.eBV(t);const i=k.XpG(4);return y.Njj(i.filterOrgToggleChipSelect(e))}),k.k0s()}if(2&t){const t=k.XpG(4);k.Y8G("placeholderText",t.chipSelectOptions[0].label)("options",t.chipSelectOptions)("ngModel",t.selectedFilterChip)}}function Ht(t,e){if(1&t&&k.nVh(0,Qt,5,6,"bit-toggle-group",12)(1,_t,1,3,"bit-chip-filter",13),2&t){const t=k.XpG(3);k.vxM(t.canDisplayToggleGroup()?0:1)}}function Lt(t,e){1&t&&(k.j41(0,"th",9),k.EFF(1),k.nI1(2,"i18n"),k.k0s()),2&t&&(k.R7$(),k.JRh(k.bMT(2,1,"owner")))}function qt(t,e){if(1&t){const t=k.RV6();k.j41(0,"a",23),k.nI1(1,"i18n"),k.bIt("click",function(){y.eBV(t);const e=k.XpG().$implicit,i=k.XpG(3);return y.Njj(i.selectCipher(e))}),k.EFF(2),k.k0s()}if(2&t){const t=k.XpG().$implicit;k.Y8G("title",k.mNQ(k.i5U(1,3,"editItemWithName",t.name))),k.R7$(2),k.JRh(t.name)}}function Kt(t,e){if(1&t&&(k.j41(0,"span",20),k.EFF(1),k.k0s()),2&t){const t=k.XpG().$implicit;k.Y8G("title",k.mNQ(t.name)),k.R7$(),k.JRh(t.name)}}function Zt(t,e){1&t&&(k.nrm(0,"bit-icon",24),k.nI1(1,"i18n"),k.j41(2,"span",2),k.EFF(3),k.nI1(4,"i18n"),k.k0s()),2&t&&(k.Y8G("title",k.bMT(1,2,"shared")),k.R7$(3),k.JRh(k.bMT(4,4,"shared")))}function te(t,e){1&t&&(k.nrm(0,"bit-icon",25),k.nI1(1,"i18n"),k.j41(2,"span",2),k.EFF(3),k.nI1(4,"i18n"),k.k0s()),2&t&&(k.Y8G("title",k.bMT(1,2,"attachments")),k.R7$(3),k.JRh(k.bMT(4,4,"attachments")))}function ee(t,e){if(1&t&&(k.j41(0,"bit-badge",26),k.EFF(1),k.nI1(2,"async"),k.nI1(3,"orgNameFromId"),k.k0s()),2&t){const t=k.XpG(2).$implicit,e=k.XpG(3);k.R7$(),k.SpI(" ",k.i5U(3,3,t.organizationId,k.bMT(2,1,e.organizations$))," ")}}function ie(t,e){1&t&&(k.j41(0,"bit-badge",26),k.EFF(1),k.nI1(2,"i18n"),k.k0s()),2&t&&(k.R7$(),k.SpI(" ",k.bMT(2,1,"me")," "))}function ne(t,e){if(1&t&&(k.j41(0,"td",8),k.nVh(1,ee,4,6,"bit-badge",26)(2,ie,3,3,"bit-badge",26),k.k0s()),2&t){const t=k.XpG().$implicit;k.R7$(),k.vxM(t.organizationId?1:2)}}function oe(t,e){if(1&t&&(k.j41(0,"td",8),k.nrm(1,"app-vault-icon",17),k.k0s(),k.j41(2,"td",18),k.nVh(3,qt,3,6,"a",19)(4,Kt,2,3,"span",20),k.nVh(5,Zt,5,6),k.nVh(6,te,5,6),k.nrm(7,"br"),k.j41(8,"small"),k.EFF(9),k.k0s()(),k.nVh(10,ne,3,1,"td",8),k.j41(11,"td",21)(12,"bit-badge",22),k.EFF(13),k.nI1(14,"i18n"),k.k0s()()),2&t){const t=e.$implicit,i=k.XpG(3);k.R7$(),k.Y8G("cipher",t),k.R7$(2),k.vxM(!i.organization||i.canManageCipher(t)?3:4),k.R7$(2),k.vxM(!i.organization&&t.organizationId?5:-1),k.R7$(),k.vxM(t.hasAttachments?6:-1),k.R7$(3),k.JRh(t.subTitle),k.R7$(),k.vxM(i.isAdminConsoleActive?-1:10),k.R7$(3),k.SpI(" ",k.i5U(14,7,"reusedXTimes",i.passwordUseMap.get(t.login.password))," ")}}function ae(t,e){if(1&t&&(k.j41(0,"bit-callout",4),k.nI1(1,"i18n"),k.EFF(2),k.nI1(3,"number"),k.nI1(4,"i18n"),k.k0s(),k.nVh(5,Ht,2,1),k.j41(6,"bit-table-scroll",5),k.qex(7,6),k.nrm(8,"th",7),k.j41(9,"th",8),k.EFF(10),k.nI1(11,"i18n"),k.k0s(),k.nVh(12,Lt,3,3,"th",9),k.j41(13,"th",10),k.EFF(14),k.nI1(15,"i18n"),k.k0s(),k.bVm(),k.DNE(16,oe,15,10,"ng-template",11),k.k0s()),2&t){const t=k.XpG(2);k.Y8G("title",k.mNQ(k.bMT(1,9,"reusedPasswordsFound"))),k.R7$(2),k.SpI(" ",k.brH(4,13,"reusedPasswordsFoundReportDesc",k.bMT(3,11,t.ciphers.length),t.vaultMsg)," "),k.R7$(3),k.vxM(t.showFilterToggle&&!t.isAdminConsoleActive?5:-1),k.R7$(),k.Y8G("dataSource",t.dataSource)("rowSize",75),k.R7$(4),k.JRh(k.bMT(11,17,"name")),k.R7$(2),k.vxM(t.isAdminConsoleActive?-1:12),k.R7$(2),k.JRh(k.bMT(15,19,"timesReused"))}}function se(t,e){if(1&t&&(k.j41(0,"div",0),k.nVh(1,Jt,4,7,"bit-callout",3)(2,ae,17,21),k.k0s()),2&t){const t=k.XpG();k.R7$(),k.vxM(t.ciphers.length?2:1)}}class re extends Dt.A{constructor(t,e,i,n,o,a,s,r,c,l,p,d){super(t,n,e,o,s,r,c,l,p,a),this.route=i,this.accountService=o,this.logService=a,this.collectionService=d,this.manageableCipherIds=new Set,this.sharedCollectionIds=new Set}ngOnInit(){const t=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return Pt(this,void 0,void 0,function*(){var e,i;this.isAdminConsoleActive=!0,this.logService.info("[ReusedPasswordsOrganizationReport] org setup start"),null===(i=null===(e=this.route.parent)||void 0===e?void 0:e.parent)||void 0===i||i.params.pipe((0,p.M)(e=>Pt(this,void 0,void 0,function*(){this.logService.info("[ReusedPasswordsOrganizationReport] route params received");try{const i=yield(0,d._)(this.accountService.activeAccount$.pipe(g.F6));this.organization=yield(0,d._)(this.organizationService.organizations$(i).pipe((0,b.Hc)(e.organizationId))),this.logService.info(`[ReusedPasswordsOrganizationReport] organization context loaded found=${null!=this.organization}`);const n=yield this.cipherService.getAll(i);this.manageableCipherIds=new Set(n.map(t=>t.id)),this.logService.info(`[ReusedPasswordsOrganizationReport] manageable ciphers loaded count=${this.manageableCipherIds.size}`);const o=yield(0,d._)(this.collectionService.decryptedCollections$(i));this.sharedCollectionIds=new Set(o.filter(t=>{var e;return!t.isDefaultCollection&&t.organizationId===(null===(e=this.organization)||void 0===e?void 0:e.id)}).map(t=>t.id)),this.logService.info(`[ReusedPasswordsOrganizationReport] shared collections loaded count=${this.sharedCollectionIds.size}`),yield t.ngOnInit.call(this),this.logService.info("[ReusedPasswordsOrganizationReport] org setup complete")}catch(i){throw this.logService.error("[ReusedPasswordsOrganizationReport] org setup failure",i),i}})),(0,h.Q)(this.destroyed$)).subscribe()})}getAllCiphers(){return Pt(this,void 0,void 0,function*(){return this.organization?this.cipherService.getAllFromApiForOrganization(this.organization.id,!0):[]})}canManageCipher(t){var e,i;return!(v.n.isUnassigned(t)||!(null===(e=t.collectionIds)||void 0===e?void 0:e.some(t=>this.sharedCollectionIds.has(t))))&&(!!(null===(i=this.organization)||void 0===i?void 0:i.allowAdminAccessToAllCollectionItems)||this.manageableCipherIds.has(t.id))}}re.ɵfac=function(t){return new(t||re)(k.rXU(X.p),k.rXU(j.o),k.rXU(z.nX),k.rXU(c.PV),k.rXU(T.D),k.rXU(I.Kc),k.rXU(w.qX),k.rXU(x.W),k.rXU(f.H),k.rXU(w.hI),k.rXU(C.l),k.rXU(u.YD))},re.ɵcmp=k.VBU({type:re,selectors:[["app-reused-passwords-report"]],features:[k.Jv_([{provide:w.hI,useClass:C.l},C.l,w.BR,w.aC]),k.Vt3],decls:7,vars:4,consts:[[1,"tw-mt-4"],["name","bwi-spinner",1,"bwi-spin","tw-text-muted",3,"ariaLabel","title"],[1,"tw-sr-only"],["type","success",3,"title"],["type","danger",3,"title"],["layout","fixed",3,"dataSource","rowSize"],["header",""],["bitCell","",1,"tw-w-12"],["bitCell",""],["bitCell","",1,"tw-w-1/4"],["bitCell","",1,"tw-w-1/4","tw-text-right"],["bitRowDef",""],[3,"selected","label"],["fullWidth","true",3,"placeholderText","options","ngModel"],[3,"selectedChange","selected","label"],[3,"value"],["fullWidth","true",3,"ngModelChange","placeholderText","options","ngModel"],[3,"cipher"],["bitCell","",1,"tw-truncate","tw-max-w-0"],["bitLink","","href","#","appStopClick","",3,"title"],[3,"title"],["bitCell","",1,"tw-text-right"],["variant","warning","size","small"],["bitLink","","href","#","appStopClick","",3,"click","title"],["name","bwi-collection-shared","appStopProp","",1,"tw-ml-1",3,"title"],["name","bwi-paperclip","appStopProp","",1,"tw-ml-1",3,"title"],["variant","secondary","size","small"]],template:function(t,e){1&t&&(k.nrm(0,"app-header"),k.j41(1,"bit-container")(2,"p"),k.EFF(3),k.nI1(4,"i18n"),k.k0s(),k.nVh(5,Wt,7,9,"div")(6,se,3,1,"div",0),k.k0s()),2&t&&(k.R7$(3),k.JRh(k.bMT(4,2,"reusedPasswordsReportDesc")),k.R7$(2),k.vxM(!e.hasLoaded&&e.loading?5:6))},dependencies:[$.G,V.BC,V.vS,U.R,A.Y,O.x,E.n,N.G,D.H,P.R,W.g,J.a,B.Q,J.N,_.H,H.a,a.G,L.f,F.t,S.Y,m.W,R.c,q.Jj,q.QX,K.$,Z.t],encapsulation:2});var ce=i(71687),le=function(t,e,i,n){return new(i||(i=Promise))(function(o,a){function s(t){try{c(n.next(t))}catch(e){a(e)}}function r(t){try{c(n.throw(t))}catch(e){a(e)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(s,r)}c((n=n.apply(t,e||[])).next())})};function pe(t,e){1&t&&(k.j41(0,"div"),k.nrm(1,"bit-icon",1),k.nI1(2,"i18n"),k.j41(3,"span",2),k.EFF(4),k.nI1(5,"i18n"),k.k0s()()),2&t&&(k.R7$(),k.Y8G("title",k.bMT(2,2,"loading")),k.R7$(3),k.JRh(k.bMT(5,4,"loading")))}function de(t,e){1&t&&(k.j41(0,"bit-callout",3),k.nI1(1,"i18n"),k.EFF(2),k.nI1(3,"i18n"),k.k0s()),2&t&&(k.Y8G("title",k.mNQ(k.bMT(1,3,"goodNews"))),k.R7$(2),k.SpI(" ",k.bMT(3,5,"noUnsecuredWebsites")," "))}function he(t,e){if(1&t&&(k.j41(0,"bit-toggle",14),k.EFF(1),k.nrm(2,"bit-berry",14),k.k0s()),2&t){const t=e.$implicit,i=k.XpG(5);k.Y8G("value",t),k.R7$(),k.SpI(" ",i.getName(t)," "),k.R7$(),k.Y8G("value",i.getCount(t))}}function ue(t,e){if(1&t){const t=k.RV6();k.j41(0,"bit-toggle-group",13),k.nI1(1,"async"),k.nI1(2,"i18n"),k.bIt("selectedChange",function(e){y.eBV(t);const i=k.XpG(4);return y.Njj(i.filterOrgToggle(e))}),k.Z7z(3,he,3,3,"bit-toggle",14,k.fX1),k.k0s()}if(2&t){const t=k.XpG(4);k.Y8G("selected",k.bMT(1,2,t.filterOrgStatus$))("label",k.bMT(2,4,"addAccessFilter")),k.R7$(3),k.Dyx(t.filterStatus)}}function ge(t,e){if(1&t){const t=k.RV6();k.j41(0,"bit-chip-filter",15),k.bIt("ngModelChange",function(e){y.eBV(t);const i=k.XpG(4);return y.Njj(i.filterOrgToggleChipSelect(e))}),k.k0s()}if(2&t){const t=k.XpG(4);k.Y8G("placeholderText",t.chipSelectOptions[0].label)("options",t.chipSelectOptions)("ngModel",t.selectedFilterChip)}}function be(t,e){if(1&t&&k.nVh(0,ue,5,6,"bit-toggle-group",11)(1,ge,1,3,"bit-chip-filter",12),2&t){const t=k.XpG(3);k.vxM(t.canDisplayToggleGroup()?0:1)}}function fe(t,e){1&t&&(k.j41(0,"th",9),k.EFF(1),k.nI1(2,"i18n"),k.k0s()),2&t&&(k.R7$(),k.JRh(k.bMT(2,1,"owner")))}function ve(t,e){if(1&t){const t=k.RV6();k.j41(0,"a",20),k.nI1(1,"i18n"),k.bIt("click",function(){y.eBV(t);const e=k.XpG().$implicit,i=k.XpG(3);return y.Njj(i.selectCipher(e))}),k.EFF(2),k.k0s()}if(2&t){const t=k.XpG().$implicit;k.Y8G("title",k.mNQ(k.i5U(1,3,"editItemWithName",t.name))),k.R7$(2),k.JRh(t.name)}}function me(t,e){if(1&t&&(k.j41(0,"span",19),k.EFF(1),k.k0s()),2&t){const t=k.XpG().$implicit;k.Y8G("title",k.mNQ(t.name)),k.R7$(),k.JRh(t.name)}}function Re(t,e){1&t&&(k.nrm(0,"bit-icon",21),k.nI1(1,"i18n"),k.j41(2,"span",2),k.EFF(3),k.nI1(4,"i18n"),k.k0s()),2&t&&(k.Y8G("title",k.bMT(1,2,"shared")),k.R7$(3),k.JRh(k.bMT(4,4,"shared")))}function Ie(t,e){1&t&&(k.nrm(0,"bit-icon",22),k.nI1(1,"i18n"),k.j41(2,"span",2),k.EFF(3),k.nI1(4,"i18n"),k.k0s()),2&t&&(k.Y8G("title",k.bMT(1,2,"attachments")),k.R7$(3),k.JRh(k.bMT(4,4,"attachments")))}function we(t,e){if(1&t&&(k.j41(0,"bit-badge",23),k.EFF(1),k.nI1(2,"async"),k.nI1(3,"orgNameFromId"),k.k0s()),2&t){const t=k.XpG(2).$implicit,e=k.XpG(3);k.R7$(),k.SpI(" ",k.i5U(3,3,t.organizationId,k.bMT(2,1,e.organizations$))," ")}}function $e(t,e){1&t&&(k.j41(0,"bit-badge",23),k.EFF(1),k.nI1(2,"i18n"),k.k0s()),2&t&&(k.R7$(),k.SpI(" ",k.bMT(2,1,"me")," "))}function Fe(t,e){if(1&t&&(k.j41(0,"td",8),k.nVh(1,we,4,6,"bit-badge",23)(2,$e,3,3,"bit-badge",23),k.k0s()),2&t){const t=k.XpG().$implicit;k.R7$(),k.vxM(t.organizationId?1:2)}}function Se(t,e){if(1&t&&(k.j41(0,"td",8),k.nrm(1,"app-vault-icon",16),k.k0s(),k.j41(2,"td",17),k.nVh(3,ve,3,6,"a",18)(4,me,2,3,"span",19),k.nVh(5,Re,5,6),k.nVh(6,Ie,5,6),k.nrm(7,"br"),k.j41(8,"small"),k.EFF(9),k.k0s()(),k.nVh(10,Fe,3,1,"td",8)),2&t){const t=e.$implicit,i=k.XpG(3);k.R7$(),k.Y8G("cipher",t),k.R7$(2),k.vxM(!i.organization||i.canManageCipher(t)?3:4),k.R7$(2),k.vxM(!i.organization&&t.organizationId?5:-1),k.R7$(),k.vxM(t.hasAttachments?6:-1),k.R7$(3),k.JRh(t.subTitle),k.R7$(),k.vxM(i.isAdminConsoleActive?-1:10)}}function Ce(t,e){if(1&t&&(k.j41(0,"bit-callout",4),k.nI1(1,"i18n"),k.EFF(2),k.nI1(3,"number"),k.nI1(4,"i18n"),k.k0s(),k.nVh(5,be,2,1),k.j41(6,"bit-table-scroll",5),k.qex(7,6),k.nrm(8,"th",7),k.j41(9,"th",8),k.EFF(10),k.nI1(11,"i18n"),k.k0s(),k.nVh(12,fe,3,3,"th",9),k.bVm(),k.DNE(13,Se,11,6,"ng-template",10),k.k0s()),2&t){const t=k.XpG(2);k.Y8G("title",k.mNQ(k.bMT(1,8,"unsecuredWebsitesFound"))),k.R7$(2),k.SpI(" ",k.brH(4,12,"unsecuredWebsitesFoundReportDesc",k.bMT(3,10,t.ciphers.length),t.vaultMsg)," "),k.R7$(3),k.vxM(t.showFilterToggle&&!t.isAdminConsoleActive?5:-1),k.R7$(),k.Y8G("dataSource",t.dataSource)("rowSize",75),k.R7$(4),k.JRh(k.bMT(11,16,"name")),k.R7$(2),k.vxM(t.isAdminConsoleActive?-1:12)}}function Me(t,e){if(1&t&&(k.j41(0,"div",0),k.nVh(1,de,4,7,"bit-callout",3)(2,Ce,14,18),k.k0s()),2&t){const t=k.XpG();k.R7$(),k.vxM(t.ciphers.length?2:1)}}class ke extends ce.U{constructor(t,e,i,n,o,a,s,r,c,l,p,d){super(t,n,e,o,s,r,c,l,p,d,a),this.route=i,this.accountService=o,this.logService=a,this.manageableCipherIds=new Set,this.sharedCollectionIds=new Set}ngOnInit(){const t=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return le(this,void 0,void 0,function*(){var e,i;this.isAdminConsoleActive=!0,this.logService.info("[UnsecuredWebsitesOrganizationReport] org setup start"),null===(i=null===(e=this.route.parent)||void 0===e?void 0:e.parent)||void 0===i||i.params.pipe((0,p.M)(e=>le(this,void 0,void 0,function*(){this.logService.info("[UnsecuredWebsitesOrganizationReport] route params received");try{const i=yield(0,d._)(this.accountService.activeAccount$.pipe(g.F6));this.organization=yield(0,d._)(this.organizationService.organizations$(i).pipe((0,b.Hc)(e.organizationId))),this.logService.info(`[UnsecuredWebsitesOrganizationReport] organization context loaded found=${null!=this.organization}`);const n=yield this.cipherService.getAll(i);this.manageableCipherIds=new Set(n.map(t=>t.id)),this.logService.info(`[UnsecuredWebsitesOrganizationReport] manageable ciphers loaded count=${this.manageableCipherIds.size}`);const o=yield(0,d._)(this.collectionService.decryptedCollections$(i));this.sharedCollectionIds=new Set(o.filter(t=>{var e;return!t.isDefaultCollection&&t.organizationId===(null===(e=this.organization)||void 0===e?void 0:e.id)}).map(t=>t.id)),this.logService.info(`[UnsecuredWebsitesOrganizationReport] shared collections loaded count=${this.sharedCollectionIds.size}`),yield t.ngOnInit.call(this),this.logService.info("[UnsecuredWebsitesOrganizationReport] org setup complete")}catch(i){throw this.logService.error("[UnsecuredWebsitesOrganizationReport] org setup failure",i),i}})),(0,h.Q)(this.destroyed$)).subscribe()})}getAllCiphers(){return le(this,void 0,void 0,function*(){if(this.logService.info("[UnsecuredWebsitesOrganizationReport] cipher fetch start"),this.organization)try{const t=yield this.cipherService.getAllFromApiForOrganization(this.organization.id,!0);return this.logService.info(`[UnsecuredWebsitesOrganizationReport] cipher fetch complete count=${t.length}`),t}catch(t){throw this.logService.error("[UnsecuredWebsitesOrganizationReport] cipher fetch failure",t),t}return this.logService.info("[UnsecuredWebsitesOrganizationReport] cipher fetch skipped reason=no organization"),[]})}canManageCipher(t){var e,i;return!(v.n.isUnassigned(t)||!(null===(e=t.collectionIds)||void 0===e?void 0:e.some(t=>this.sharedCollectionIds.has(t))))&&(!!(null===(i=this.organization)||void 0===i?void 0:i.allowAdminAccessToAllCollectionItems)||this.manageableCipherIds.has(t.id))}}ke.ɵfac=function(t){return new(t||ke)(k.rXU(X.p),k.rXU(j.o),k.rXU(z.nX),k.rXU(c.PV),k.rXU(T.D),k.rXU(mt.K),k.rXU(w.qX),k.rXU(x.W),k.rXU(f.H),k.rXU(u.YD),k.rXU(w.hI),k.rXU(C.l))},ke.ɵcmp=k.VBU({type:ke,selectors:[["app-unsecured-websites-report"]],features:[k.Jv_([{provide:w.hI,useClass:C.l},C.l,w.BR,w.aC]),k.Vt3],decls:7,vars:4,consts:[[1,"tw-mt-4"],["name","bwi-spinner",1,"bwi-spin","tw-text-muted",3,"title"],[1,"tw-sr-only"],["type","success",3,"title"],["type","danger",3,"title"],["layout","fixed",3,"dataSource","rowSize"],["header",""],["bitCell","",1,"tw-w-12"],["bitCell",""],["bitCell","",1,"tw-w-1/3"],["bitRowDef",""],[3,"selected","label"],["fullWidth","true",3,"placeholderText","options","ngModel"],[3,"selectedChange","selected","label"],[3,"value"],["fullWidth","true",3,"ngModelChange","placeholderText","options","ngModel"],[3,"cipher"],["bitCell","",1,"tw-truncate","tw-max-w-0"],["bitLink","","href","#","appStopClick","",3,"title"],[3,"title"],["bitLink","","href","#","appStopClick","",3,"click","title"],["name","bwi-collection-shared","appStopProp","",1,"tw-ml-1",3,"title"],["name","bwi-paperclip","appStopProp","",1,"tw-ml-1",3,"title"],["variant","secondary"]],template:function(t,e){1&t&&(k.nrm(0,"app-header"),k.j41(1,"bit-container")(2,"p"),k.EFF(3),k.nI1(4,"i18n"),k.k0s(),k.nVh(5,pe,6,6,"div")(6,Me,3,1,"div",0),k.k0s()),2&t&&(k.R7$(3),k.JRh(k.bMT(4,2,"unsecuredWebsitesReportDesc")),k.R7$(2),k.vxM(!e.hasLoaded&&e.loading?5:6))},dependencies:[$.G,V.BC,V.vS,U.R,A.Y,O.x,E.n,N.G,D.H,P.R,W.g,J.a,B.Q,J.N,_.H,H.a,a.G,L.f,F.t,S.Y,m.W,R.c,q.Jj,q.QX,K.$,Z.t],encapsulation:2});var ye=i(63457),Xe=i(72523),Ge=function(t,e,i,n){return new(i||(i=Promise))(function(o,a){function s(t){try{c(n.next(t))}catch(e){a(e)}}function r(t){try{c(n.throw(t))}catch(e){a(e)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(s,r)}c((n=n.apply(t,e||[])).next())})};function je(t,e){1&t&&(k.j41(0,"div"),k.nrm(1,"bit-icon",1),k.nI1(2,"i18n"),k.nI1(3,"i18n"),k.j41(4,"span",2),k.EFF(5),k.nI1(6,"i18n"),k.k0s()()),2&t&&(k.R7$(),k.Y8G("ariaLabel",k.bMT(2,3,"loading"))("title",k.bMT(3,5,"loading")),k.R7$(4),k.JRh(k.bMT(6,7,"loading")))}function Te(t,e){1&t&&(k.j41(0,"bit-callout",3),k.nI1(1,"i18n"),k.EFF(2),k.nI1(3,"i18n"),k.k0s()),2&t&&(k.Y8G("title",k.mNQ(k.bMT(1,3,"goodNews"))),k.R7$(2),k.SpI(" ",k.bMT(3,5,"noWeakPasswords")," "))}function ze(t,e){if(1&t&&(k.j41(0,"bit-toggle",15),k.EFF(1),k.nrm(2,"bit-berry",15),k.k0s()),2&t){const t=e.$implicit,i=k.XpG(5);k.Y8G("value",t),k.R7$(),k.SpI(" ",i.getName(t)," "),k.R7$(),k.Y8G("value",i.getCount(t))}}function xe(t,e){if(1&t){const t=k.RV6();k.j41(0,"bit-toggle-group",14),k.nI1(1,"async"),k.nI1(2,"i18n"),k.bIt("selectedChange",function(e){y.eBV(t);const i=k.XpG(4);return y.Njj(i.filterOrgToggle(e))}),k.Z7z(3,ze,3,3,"bit-toggle",15,k.fX1),k.k0s()}if(2&t){const t=k.XpG(4);k.Y8G("selected",k.bMT(1,2,t.filterOrgStatus$))("label",k.bMT(2,4,"addAccessFilter")),k.R7$(3),k.Dyx(t.filterStatus)}}function Ve(t,e){if(1&t){const t=k.RV6();k.j41(0,"bit-chip-filter",16),k.bIt("ngModelChange",function(e){y.eBV(t);const i=k.XpG(4);return y.Njj(i.filterOrgToggleChipSelect(e))}),k.k0s()}if(2&t){const t=k.XpG(4);k.Y8G("placeholderText",t.chipSelectOptions[0].label)("options",t.chipSelectOptions)("ngModel",t.selectedFilterChip)}}function Ue(t,e){if(1&t&&k.nVh(0,xe,5,6,"bit-toggle-group",12)(1,Ve,1,3,"bit-chip-filter",13),2&t){const t=k.XpG(3);k.vxM(t.canDisplayToggleGroup()?0:1)}}function Ae(t,e){1&t&&(k.j41(0,"th",9),k.EFF(1),k.nI1(2,"i18n"),k.k0s()),2&t&&(k.R7$(),k.SpI(" ",k.bMT(2,1,"owner")," "))}function Oe(t,e){if(1&t){const t=k.RV6();k.j41(0,"a",24),k.nI1(1,"i18n"),k.bIt("click",function(){y.eBV(t);const e=k.XpG().$implicit,i=k.XpG(3);return y.Njj(i.selectCipher(e))}),k.EFF(2),k.k0s()}if(2&t){const t=k.XpG().$implicit;k.Y8G("title",k.mNQ(k.i5U(1,3,"editItemWithName",t.name))),k.R7$(2),k.JRh(t.name)}}function Ee(t,e){if(1&t&&(k.j41(0,"span",21),k.EFF(1),k.k0s()),2&t){const t=k.XpG().$implicit;k.Y8G("title",k.mNQ(t.name)),k.R7$(),k.JRh(t.name)}}function Ye(t,e){1&t&&(k.nrm(0,"bit-icon",25),k.nI1(1,"i18n"),k.j41(2,"span",2),k.EFF(3),k.nI1(4,"i18n"),k.k0s()),2&t&&(k.Y8G("title",k.bMT(1,2,"shared")),k.R7$(3),k.JRh(k.bMT(4,4,"shared")))}function Ne(t,e){1&t&&(k.nrm(0,"bit-icon",26),k.nI1(1,"i18n"),k.j41(2,"span",2),k.EFF(3),k.nI1(4,"i18n"),k.k0s()),2&t&&(k.Y8G("title",k.bMT(1,2,"attachments")),k.R7$(3),k.JRh(k.bMT(4,4,"attachments")))}function De(t,e){if(1&t&&(k.j41(0,"bit-badge",27),k.EFF(1),k.nI1(2,"async"),k.nI1(3,"orgNameFromId"),k.k0s()),2&t){const t=k.XpG(2).$implicit,e=k.XpG(3);k.R7$(),k.SpI(" ",k.i5U(3,3,t.organizationId,k.bMT(2,1,e.organizations$))," ")}}function Pe(t,e){1&t&&(k.j41(0,"bit-badge",27),k.EFF(1),k.nI1(2,"i18n"),k.k0s()),2&t&&(k.R7$(),k.SpI(" ",k.bMT(2,1,"me")," "))}function We(t,e){if(1&t&&(k.j41(0,"td",17),k.nVh(1,De,4,6,"bit-badge",27)(2,Pe,3,3,"bit-badge",27),k.k0s()),2&t){const t=k.XpG().$implicit;k.R7$(),k.vxM(t.organizationId?1:2)}}function Je(t,e){if(1&t&&(k.j41(0,"td",17),k.nrm(1,"app-vault-icon",18),k.k0s(),k.j41(2,"td",19),k.nVh(3,Oe,3,6,"a",20)(4,Ee,2,3,"span",21),k.nVh(5,Ye,5,6),k.nVh(6,Ne,5,6),k.nrm(7,"br"),k.j41(8,"small"),k.EFF(9),k.k0s()(),k.nVh(10,We,3,1,"td",17),k.j41(11,"td",22)(12,"bit-badge",23),k.EFF(13),k.nI1(14,"i18n"),k.k0s()()),2&t){const t=e.$implicit,i=k.XpG(3);k.R7$(),k.Y8G("cipher",t),k.R7$(2),k.vxM(!i.organization||i.canManageCipher(t)?3:4),k.R7$(2),k.vxM(!i.organization&&t.organizationId?5:-1),k.R7$(),k.vxM(t.hasAttachments?6:-1),k.R7$(3),k.JRh(t.subTitle),k.R7$(),k.vxM(i.isAdminConsoleActive?-1:10),k.R7$(2),k.Y8G("variant",t.reportValue.badgeVariant),k.R7$(),k.SpI(" ",k.bMT(14,8,t.reportValue.label)," ")}}function Be(t,e){if(1&t&&(k.j41(0,"bit-callout",4),k.nI1(1,"i18n"),k.EFF(2),k.nI1(3,"number"),k.nI1(4,"i18n"),k.k0s(),k.nVh(5,Ue,2,1),k.j41(6,"bit-table-scroll",5),k.qex(7,6),k.nrm(8,"th",7),k.j41(9,"th",8),k.EFF(10),k.nI1(11,"i18n"),k.k0s(),k.nVh(12,Ae,3,3,"th",9),k.j41(13,"th",10),k.EFF(14),k.nI1(15,"i18n"),k.k0s(),k.bVm(),k.DNE(16,Je,15,10,"ng-template",11),k.k0s()),2&t){const t=k.XpG(2);k.Y8G("title",k.mNQ(k.bMT(1,9,"weakPasswordsFound"))),k.R7$(2),k.SpI(" ",k.brH(4,13,"weakPasswordsFoundReportDesc",k.bMT(3,11,t.ciphers.length),t.vaultMsg)," "),k.R7$(3),k.vxM(t.showFilterToggle&&!t.isAdminConsoleActive?5:-1),k.R7$(),k.Y8G("dataSource",t.dataSource)("rowSize",54),k.R7$(4),k.JRh(k.bMT(11,17,"name")),k.R7$(2),k.vxM(t.isAdminConsoleActive?-1:12),k.R7$(2),k.SpI(" ",k.bMT(15,19,"weakness")," ")}}function Qe(t,e){if(1&t&&(k.j41(0,"div",0),k.nVh(1,Te,4,7,"bit-callout",3)(2,Be,17,21),k.k0s()),2&t){const t=k.XpG();k.R7$(),k.vxM(t.ciphers.length?2:1)}}class _e extends Xe.w{constructor(t,e,i,n,o,a,s,r,c,l,p,d,h){super(t,e,o,i,l,a,s,r,c,p,h),this.route=n,this.accountService=l,this.collectionService=d,this.logService=h,this.manageableCipherIds=new Set,this.sharedCollectionIds=new Set}ngOnInit(){const t=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return Ge(this,void 0,void 0,function*(){var e,i;this.isAdminConsoleActive=!0,null===(i=null===(e=this.route.parent)||void 0===e?void 0:e.parent)||void 0===i||i.params.pipe((0,p.M)(e=>Ge(this,void 0,void 0,function*(){var i,n;try{const o=yield(0,d._)(this.accountService.activeAccount$.pipe(g.F6));this.organization=yield(0,d._)(this.organizationService.organizations$(o).pipe((0,b.Hc)(e.organizationId))),this.logService.info(`[WeakPasswordsReport] Initializing for organization "${null!==(n=null===(i=this.organization)||void 0===i?void 0:i.id)&&void 0!==n?n:e.organizationId}"`);const a=yield this.cipherService.getAll(o);this.logService.info(`[WeakPasswordsReport] User has access to ${a.length} ciphers in organization"`),this.logService.info('[WeakPasswordsReport] Fetching collections for organization"'),this.manageableCipherIds=new Set(a.map(t=>t.id));const s=yield(0,d._)(this.collectionService.decryptedCollections$(o));this.sharedCollectionIds=new Set(s.filter(t=>{var e;return!t.isDefaultCollection&&t.organizationId===(null===(e=this.organization)||void 0===e?void 0:e.id)}).map(t=>t.id)),this.logService.info(`[WeakPasswordsReport] User has access to ${this.sharedCollectionIds.size} shared collections in organization"`),yield t.ngOnInit.call(this)}catch(o){this.logService.error(`[WeakPasswordsReport] Failed to initialize for organization "${e.organizationId}"`,o)}})),(0,h.Q)(this.destroyed$)).subscribe()})}getAllCiphers(){return Ge(this,void 0,void 0,function*(){var t,e,i,n;if(this.logService.info(`[WeakPasswordsReport] Fetching ciphers for organization ${null!==(e=null===(t=this.organization)||void 0===t?void 0:t.id)&&void 0!==e?e:"N/A"}`),this.organization)try{const t=yield this.cipherService.getAllFromApiForOrganization(this.organization.id,!0);return this.logService.info(`[WeakPasswordsReport] Fetched ${t.length} ciphers for organization "${this.organization.id}"`),t}catch(o){throw this.logService.error(`[WeakPasswordsReport] Failed to fetch ciphers for organization "${null!==(n=null===(i=this.organization)||void 0===i?void 0:i.id)&&void 0!==n?n:"N/A"}"`,o),o}return[]})}canManageCipher(t){var e,i;return!(v.n.isUnassigned(t)||!(null===(e=t.collectionIds)||void 0===e?void 0:e.some(t=>this.sharedCollectionIds.has(t))))&&(!!(null===(i=this.organization)||void 0===i?void 0:i.allowAdminAccessToAllCollectionItems)||this.manageableCipherIds.has(t.id))}}_e.ɵfac=function(t){return new(t||_e)(k.rXU(X.p),k.rXU(ye.Q),k.rXU(j.o),k.rXU(z.nX),k.rXU(c.PV),k.rXU(w.qX),k.rXU(x.W),k.rXU(f.H),k.rXU(w.hI),k.rXU(T.D),k.rXU(C.l),k.rXU(u.YD),k.rXU(I.Kc))},_e.ɵcmp=k.VBU({type:_e,selectors:[["app-weak-passwords-report"]],features:[k.Jv_([{provide:w.hI,useClass:C.l},C.l,w.BR,w.aC]),k.Vt3],decls:7,vars:4,consts:[[1,"tw-mt-4"],["name","bwi-spinner",1,"bwi-spin","tw-text-muted",3,"ariaLabel","title"],[1,"tw-sr-only"],["type","success",3,"title"],["type","danger",3,"title"],["layout","fixed",3,"dataSource","rowSize"],["header",""],["bitCell","",1,"tw-w-12"],["bitCell","","bitSortable","name"],["bitCell","","bitSortable","organizationId",1,"tw-w-1/4"],["bitCell","","bitSortable","scoreKey","default","desc",1,"tw-text-right"],["bitRowDef",""],[3,"selected","label"],["fullWidth","true",3,"placeholderText","options","ngModel"],[3,"selectedChange","selected","label"],[3,"value"],["fullWidth","true",3,"ngModelChange","placeholderText","options","ngModel"],["bitCell",""],[3,"cipher"],["bitCell","",1,"tw-truncate","tw-max-w-0"],["bitLink","","href","#","appStopClick","",3,"title"],[3,"title"],["bitCell","",1,"tw-text-right"],["size","small",3,"variant"],["bitLink","","href","#","appStopClick","",3,"click","title"],["name","bwi-collection-shared","appStopProp","",1,"tw-ml-1",3,"title"],["name","bwi-paperclip","appStopProp","",1,"tw-ml-1",3,"title"],["variant","secondary","size","small"]],template:function(t,e){1&t&&(k.nrm(0,"app-header"),k.j41(1,"bit-container")(2,"p"),k.EFF(3),k.nI1(4,"i18n"),k.k0s(),k.nVh(5,je,7,9,"div")(6,Qe,3,1,"div",0),k.k0s()),2&t&&(k.R7$(3),k.JRh(k.bMT(4,2,"weakPasswordsReportDesc")),k.R7$(2),k.vxM(!e.hasLoaded&&e.loading?5:6))},dependencies:[$.G,V.BC,V.vS,U.R,A.Y,O.x,E.n,N.G,D.H,P.R,W.g,J.a,B.Q,Q.O,J.N,_.H,H.a,a.G,L.f,F.t,S.Y,m.W,R.c,q.Jj,q.QX,K.$,Z.t],encapsulation:2});var He=i(69783),Le=function(t,e,i,n){return new(i||(i=Promise))(function(o,a){function s(t){try{c(n.next(t))}catch(e){a(e)}}function r(t){try{c(n.throw(t))}catch(e){a(e)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(s,r)}c((n=n.apply(t,e||[])).next())})};function qe(){return(t,e)=>Le(this,void 0,void 0,function*(){const e=(0,y.WQX)(z.Ix),i=(0,y.WQX)(c.PV),n=(0,y.WQX)(T.D),o=(0,y.WQX)(j.o),a=yield(0,d._)(n.activeAccount$.pipe((0,He.T)(t=>null==t?void 0:t.id))),s=yield(0,d._)(i.organizations$(a).pipe((0,c.Sw)(t.params.organizationId)));if(null==s)return e.createUrlTree(["/"]);if(s.isFreeOrg){if(!s.canEditSubscription)return yield o.openSimpleDialog({title:{key:"upgradeOrganizationCloseSecurityGaps"},content:{key:"upgradeOrganizationCloseSecurityGapsDesc"},acceptButtonText:{key:"ok"},cancelButtonText:null,type:"info"}),!1;(yield o.openSimpleDialog({title:{key:"upgradeOrganizationCloseSecurityGaps"},content:{key:"upgradeOrganizationCloseSecurityGapsDesc"},acceptButtonText:{key:"upgradeOrganization"},type:"info",icon:"bwi-plus-circle"}))&&(yield e.navigate(["organizations",s.id,"billing","subscription"],{queryParams:{upgrade:!0}}))}return!s.isFreeOrg})}var Ke=i(77259),Ze=i(95661),ti=i(38798),ei=i(92128),ii=i(68711),ni=i(34949),oi=i(62423),ai=i(64447),si=i(58806),ri=i(25219),ci=function(t,e,i,n){return new(i||(i=Promise))(function(o,a){function s(t){try{c(n.next(t))}catch(e){a(e)}}function r(t){try{c(n.throw(t))}catch(e){a(e)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(s,r)}c((n=n.apply(t,e||[])).next())})};const li=["backButtonTemplate"];function pi(t,e){if(1&t&&(k.qex(0),k.nrm(1,"app-header"),k.j41(2,"p",3),k.EFF(3),k.nI1(4,"i18n"),k.k0s(),k.nrm(5,"app-report-list",4),k.nI1(6,"async"),k.bVm()),2&t){const t=k.XpG();k.R7$(3),k.JRh(k.bMT(4,2,"orgsReportsDesc")),k.R7$(2),k.Y8G("reports",k.bMT(6,4,t.reports$))}}function di(t,e){if(1&t){const t=k.RV6();k.j41(0,"span",5),k.bIt("keydown.tab",function(e){y.eBV(t);const i=k.XpG();return y.Njj(i.focusOverlayButton(e))}),k.k0s()}}function hi(t,e){if(1&t){const t=k.RV6();k.j41(0,"div",6)(1,"a",7),k.bIt("keydown.tab",function(e){y.eBV(t);const i=k.XpG();return y.Njj(i.returnFocusToPage(e))}),k.EFF(2),k.nI1(3,"i18n"),k.k0s()()}2&t&&(k.R7$(2),k.SpI(" ",k.bMT(3,1,"backToReports")," "))}class ui{constructor(t,e,i,o){this.route=t,this.organizationService=e,this.accountService=i,this.router=o,this.backButtonTemplate=wt.ebz.required("backButtonTemplate"),this.overlayRef=null,this.overlay=(0,y.WQX)(n.hJ),this.viewContainerRef=(0,y.WQX)(k.c1b),this.router.events.pipe((0,ei.pQ)(),(0,ii.p)(t=>t instanceof z.wF)).subscribe(()=>this.updateOverlay())}ngOnInit(){return ci(this,void 0,void 0,function*(){this.homepage$=this.router.events.pipe((0,ii.p)(t=>t instanceof z.wF),(0,He.T)(t=>this.isReportsHomepageRouteUrl(t.urlAfterRedirects)),(0,ni.Z)(this.isReportsHomepageRouteUrl(this.router.url)));const t=yield(0,d._)((0,g.F6)(this.accountService.activeAccount$));this.reports$=this.route.params.pipe((0,oi.H)(e=>this.organizationService.organizations$(t).pipe((0,c.Sw)(e.organizationId))),(0,He.T)(t=>this.buildReports(t.productTierType)))})}ngAfterViewInit(){this.updateOverlay()}ngOnDestroy(){var t;null===(t=this.overlayRef)||void 0===t||t.dispose()}returnFocusToPage(t){if(t.shiftKey)return;t.preventDefault();const e=document.querySelector("[cdktrapfocus] a:not([tabindex='-1'])");null==e||e.focus()}focusOverlayButton(t){var e,i;if(t.shiftKey)return;t.preventDefault();const n=null===(i=null===(e=this.overlayRef)||void 0===e?void 0:e.overlayElement)||void 0===i?void 0:i.querySelector("a");null==n||n.focus()}updateOverlay(){var t;this.isReportsHomepageRouteUrl(this.router.url)?(null===(t=this.overlayRef)||void 0===t||t.dispose(),this.overlayRef=null):this.overlayRef||(this.overlayRef=this.overlay.create({positionStrategy:this.overlay.position().global().bottom("20px").right("32px")}),this.overlayRef.attach(new ti.VA(this.backButtonTemplate(),this.viewContainerRef)))}buildReports(t){const e=t==ai.K_.Free?o.C0.RequiresUpgrade:o.C0.Enabled;return[Object.assign(Object.assign({},o.uE[o.nI.ExposedPasswords]),{variant:e}),Object.assign(Object.assign({},o.uE[o.nI.ReusedPasswords]),{variant:e}),Object.assign(Object.assign({},o.uE[o.nI.WeakPasswords]),{variant:e}),Object.assign(Object.assign({},o.uE[o.nI.UnsecuredWebsites]),{variant:e}),Object.assign(Object.assign({},o.uE[o.nI.Inactive2fa]),{variant:e}),Object.assign(Object.assign({},o.uE[o.nI.MemberAccessReport]),{variant:t==ai.K_.Enterprise?o.C0.Enabled:o.C0.RequiresEnterprise})]}isReportsHomepageRouteUrl(t){return t.endsWith("/reports")}}ui.ɵfac=function(t){return new(t||ui)(k.rXU(z.nX),k.rXU(c.PV),k.rXU(T.D),k.rXU(z.Ix))},ui.ɵcmp=k.VBU({type:ui,selectors:[["app-org-reports-home"]],viewQuery:function(t,e){1&t&&k.wEZ(e.backButtonTemplate,li,5),2&t&&k.NyB()},standalone:!1,decls:7,vars:6,consts:[["backButtonTemplate",""],[4,"ngIf"],["tabindex","0","aria-hidden","true",1,"tw-sr-only"],["bitTypography","body1"],[3,"reports"],["tabindex","0","aria-hidden","true",1,"tw-sr-only",3,"keydown.tab"],[1,"tw-p-3","tw-rounded-lg","tw-opacity-90"],["bitButton","","buttonType","primary","routerLink","./","tabindex","0",3,"keydown.tab"]],template:function(t,e){1&t&&(k.DNE(0,pi,7,6,"ng-container",1),k.nI1(1,"async"),k.nrm(2,"router-outlet"),k.nVh(3,di,1,0,"span",2),k.nI1(4,"async"),k.DNE(5,hi,4,3,"ng-template",null,0,k.C5r)),2&t&&(k.Y8G("ngIf",k.bMT(1,2,e.homepage$)),k.R7$(3),k.vxM(k.bMT(4,4,e.homepage$)?-1:3))},dependencies:[q.bT,z.n3,r.Wk,Y.Q,si.r,ri.i,L.f,q.Jj,K.$],encapsulation:2});const gi=[{path:"",canActivate:[(0,Ke.V)(c.Ue)],children:[{path:"",pathMatch:"full",canActivate:[(0,Ze.r)(function(t){if(t.canAccessEventLogs)return"events";if(t.canAccessReports)return"reports";return})],children:[]},{path:"reports",component:ui,canActivate:[(0,Ke.V)()],data:{titleId:"reports"},children:[{path:"exposed-passwords-report",component:vt,data:{titleId:"exposedPasswordsReport"},canActivate:[qe()]},{path:"inactive-two-factor-report",component:Nt,data:{titleId:"inactive2faReport"},canActivate:[qe()]},{path:"reused-passwords-report",component:re,data:{titleId:"reusedPasswordsReport"},canActivate:[qe()]},{path:"unsecured-websites-report",component:ke,data:{titleId:"unsecuredWebsitesReport"},canActivate:[qe()]},{path:"weak-passwords-report",component:_e,data:{titleId:"weakPasswordsReport"},canActivate:[qe()]}]},{path:"events",component:l.bC,canActivate:[(0,Ke.V)(t=>t.canAccessEventLogs||t.isOwner)],data:{titleId:"eventLogs"}}]}];class bi{}bi.ɵfac=function(t){return new(t||bi)},bi.ɵmod=k.$C({type:bi}),bi.ɵinj=y.G2t({imports:[r.iI.forChild(gi),r.iI]});class fi{}fi.ɵfac=function(t){return new(t||fi)},fi.ɵmod=k.$C({type:fi}),fi.ɵinj=y.G2t({imports:[s.G,n.z_,o.DF,bi,a.G]})}}]);
//# sourceMappingURL=767.ebd16e950a7c6a1c7706.js.map